@visulima/vis 2.0.2 → 3.0.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/LICENSE.md +95 -65
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +1 -1
  5. package/dist/packem_chunks/CONFIG_FILES.js +2 -2
  6. package/dist/packem_chunks/bloom-status.js +1 -1
  7. package/dist/packem_chunks/bloom-sync.js +1 -1
  8. package/dist/packem_chunks/catalog.js +47 -47
  9. package/dist/packem_chunks/cli-exec.js +1 -1
  10. package/dist/packem_chunks/cli-main.js +141 -141
  11. package/dist/packem_chunks/dispatch.js +1 -1
  12. package/dist/packem_chunks/fix.js +1 -1
  13. package/dist/packem_chunks/handler.js +1 -1
  14. package/dist/packem_chunks/handler10.js +1 -1
  15. package/dist/packem_chunks/handler11.js +1 -1
  16. package/dist/packem_chunks/handler12.js +1 -1
  17. package/dist/packem_chunks/handler13.js +1 -1
  18. package/dist/packem_chunks/handler14.js +1 -1
  19. package/dist/packem_chunks/handler15.js +1 -1
  20. package/dist/packem_chunks/handler16.js +1 -1
  21. package/dist/packem_chunks/handler17.js +1 -1
  22. package/dist/packem_chunks/handler18.js +1 -1
  23. package/dist/packem_chunks/handler19.js +1 -1
  24. package/dist/packem_chunks/handler2.js +1 -1
  25. package/dist/packem_chunks/handler20.js +1 -1
  26. package/dist/packem_chunks/handler21.js +1 -1
  27. package/dist/packem_chunks/handler22.js +1 -1
  28. package/dist/packem_chunks/handler23.js +1 -1
  29. package/dist/packem_chunks/handler24.js +1 -1
  30. package/dist/packem_chunks/handler26.js +1 -1
  31. package/dist/packem_chunks/handler27.js +1 -1
  32. package/dist/packem_chunks/handler28.js +1 -1
  33. package/dist/packem_chunks/handler29.js +1 -1
  34. package/dist/packem_chunks/handler3.js +1 -1
  35. package/dist/packem_chunks/handler30.js +1 -1
  36. package/dist/packem_chunks/handler4.js +1 -1
  37. package/dist/packem_chunks/handler5.js +1 -1
  38. package/dist/packem_chunks/handler50.js +1 -1
  39. package/dist/packem_chunks/handler51.js +1 -1
  40. package/dist/packem_chunks/handler53.js +1 -1
  41. package/dist/packem_chunks/handler54.js +1 -1
  42. package/dist/packem_chunks/handler55.js +1 -1
  43. package/dist/packem_chunks/handler58.js +1 -1
  44. package/dist/packem_chunks/handler59.js +1 -1
  45. package/dist/packem_chunks/handler6.js +1 -1
  46. package/dist/packem_chunks/handler60.js +1 -1
  47. package/dist/packem_chunks/handler61.js +1 -1
  48. package/dist/packem_chunks/handler62.js +1 -1
  49. package/dist/packem_chunks/handler63.js +1 -1
  50. package/dist/packem_chunks/handler64.js +1 -1
  51. package/dist/packem_chunks/handler66.js +1 -1
  52. package/dist/packem_chunks/handler67.js +13 -13
  53. package/dist/packem_chunks/handler68.js +1 -1
  54. package/dist/packem_chunks/handler69.js +1 -1
  55. package/dist/packem_chunks/handler7.js +1 -1
  56. package/dist/packem_chunks/handler70.js +5 -5
  57. package/dist/packem_chunks/handler71.js +1 -1
  58. package/dist/packem_chunks/handler72.js +1 -1
  59. package/dist/packem_chunks/handler73.js +1 -1
  60. package/dist/packem_chunks/handler74.js +15 -15
  61. package/dist/packem_chunks/handler75.js +1 -1
  62. package/dist/packem_chunks/handler76.js +1 -1
  63. package/dist/packem_chunks/handler77.js +1 -1
  64. package/dist/packem_chunks/handler78.js +1 -1
  65. package/dist/packem_chunks/handler8.js +1 -1
  66. package/dist/packem_chunks/handler9.js +1 -1
  67. package/dist/packem_chunks/heal-accept.js +1 -1
  68. package/dist/packem_chunks/heal.js +1 -1
  69. package/dist/packem_chunks/help-command.js +1 -1
  70. package/dist/packem_chunks/index2.js +6 -4
  71. package/dist/packem_chunks/index3.js +1 -1
  72. package/dist/packem_chunks/index4.js +49 -49
  73. package/dist/packem_chunks/keys-refresh.js +1 -1
  74. package/dist/packem_chunks/lean.js +1 -1
  75. package/dist/packem_chunks/list.js +1 -1
  76. package/dist/packem_chunks/loader.js +1 -1
  77. package/dist/packem_chunks/orchestrator.js +2 -2
  78. package/dist/packem_chunks/prune.js +1 -1
  79. package/dist/packem_chunks/registry.js +10 -10
  80. package/dist/packem_chunks/status.js +1 -1
  81. package/dist/packem_chunks/sync.js +1 -1
  82. package/dist/packem_chunks/sync2.js +1 -1
  83. package/dist/packem_chunks/tripwire.js +1 -1
  84. package/dist/packem_chunks/ts-loader.js +1 -1
  85. package/dist/packem_chunks/verify-lockfile.js +1 -1
  86. package/dist/packem_shared/{advisories-CCBGdU8U.js → advisories-DsXRmIA5.js} +1 -1
  87. package/dist/packem_shared/{affected-selection-Dj-ymxhw.js → affected-selection-BE6VFCDV.js} +1 -1
  88. package/dist/packem_shared/{affected-shas-PwkVbPch.js → affected-shas-BKEu4RZc.js} +1 -1
  89. package/dist/packem_shared/{ai-analysis-bGCAc1jR.js → ai-analysis-DikAj6rX.js} +1 -1
  90. package/dist/packem_shared/{ai-fix-DV5-dHBY.js → ai-fix-bfWo0cZX.js} +1 -1
  91. package/dist/packem_shared/{augment-24KX2nkI.js → augment-BkJxi_GW.js} +1 -1
  92. package/dist/packem_shared/{bin-CtzhnYMp.js → bin-B-TytgzW.js} +1 -1
  93. package/dist/packem_shared/{build-scripts-w4SNeR7D.js → build-scripts-DWypBQ--.js} +1 -1
  94. package/dist/packem_shared/{command-runtime-BLFPUYAT.js → command-runtime-DQ7ZpLYL.js} +1 -1
  95. package/dist/packem_shared/{cyclonedx-C4KaVTn1.js → cyclonedx-DLBi65MV.js} +1 -1
  96. package/dist/packem_shared/dependency-scan-ZLOuLkGN.js +1 -0
  97. package/dist/packem_shared/{docker-DaVs-9wK.js → docker-B4zAZCZG.js} +15 -15
  98. package/dist/packem_shared/{en-D3CfXlO7.js → en-BDYMmM2_.js} +1 -1
  99. package/dist/packem_shared/{failure-log-CTneNcio.js → failure-log-DyhWPqno.js} +1 -1
  100. package/dist/packem_shared/glob-BUjyjdE8-Dp_QcayW.js +1 -0
  101. package/dist/packem_shared/index-BLtnel38.js +35 -0
  102. package/dist/packem_shared/index-CuKDxOCI.js +1 -0
  103. package/dist/packem_shared/index-tNFGWxc0.js +39 -0
  104. package/dist/packem_shared/{lifecycle-B8A2T3gx.js → lifecycle-KY9umOg6.js} +1 -1
  105. package/dist/packem_shared/{lockfile-Bccery3L.js → lockfile-YAuZf1gh.js} +1 -1
  106. package/dist/packem_shared/{manifests-BDkwiVbh.js → manifests-BwTn_1ad.js} +1 -1
  107. package/dist/packem_shared/{min-release-age-OaYpLwux.js → min-release-age-6avfn81h.js} +1 -1
  108. package/dist/packem_shared/{missing-package-json-BqS-OnKd.js → missing-package-json-Cl0vdz6K.js} +1 -1
  109. package/dist/packem_shared/{native-config-sync-Ds1FtcrM.js → native-config-sync-CHMCJx7H.js} +7 -7
  110. package/dist/packem_shared/{osv-bloom-pKp7urSB.js → osv-bloom-DdqDnLCt.js} +2 -2
  111. package/dist/packem_shared/package-version-BNRJ3o9C.js +4 -0
  112. package/dist/packem_shared/{packument-HBVbyf7x.js → packument-B9-WqReu.js} +1 -1
  113. package/dist/packem_shared/{pm-runner-C6eTANt1.js → pm-runner-DRybtzOV.js} +1 -1
  114. package/dist/packem_shared/{project-name-filter-CJ3XX2TI.js → project-name-filter-Dw0fC6IO.js} +1 -1
  115. package/dist/packem_shared/{provenance-D4Cza8cp.js → provenance-CLxuqCfL.js} +1 -1
  116. package/dist/packem_shared/{readJsonSync-DweZd5ZA-0eZh9sGm.js → readJsonSync-DweZd5ZA-CtrDlqpb.js} +1 -1
  117. package/dist/packem_shared/{registry-keys-C0ez2VND.js → registry-keys-cTN24144.js} +1 -1
  118. package/dist/packem_shared/{resolve-explicit-BbT764KS.js → resolve-explicit-Uw6WQl9R.js} +1 -1
  119. package/dist/packem_shared/{resolve-runtime-D_vZovbB.js → resolve-runtime-DztanwkZ.js} +1 -1
  120. package/dist/packem_shared/{run-file-DyPFFN9U.js → run-file-CaE5_xBY.js} +1 -1
  121. package/dist/packem_shared/{runtime-check-D4um-yQq.js → runtime-check-C32yE57I.js} +1 -1
  122. package/dist/packem_shared/{s1ngularity-St6dhKiq.js → s1ngularity-BIYhg82u.js} +1 -1
  123. package/dist/packem_shared/{scan-progress-q-N2JtIp.js → scan-progress-DWfY4zkp.js} +1 -1
  124. package/dist/packem_shared/{selectors-Ce_6UAoY.js → selectors-D2j4M9Ul.js} +1 -1
  125. package/dist/packem_shared/{signatures-Dyeyg1q9.js → signatures-C8iQ5fUq.js} +1 -1
  126. package/dist/packem_shared/target-merge-DLxJTcxn.js +11 -0
  127. package/dist/packem_shared/{target-options-7XcbqGDe.js → target-options-3t4-2F-F.js} +1 -1
  128. package/dist/packem_shared/{toolchain-C_pNMBM6.js → toolchain-BPzbahcQ.js} +1 -1
  129. package/dist/packem_shared/{typosquats-xzcAGPiM.js → typosquats-BWrmhh36.js} +1 -1
  130. package/dist/packem_shared/{use-measured-height-CBjN0fle.js → use-measured-height-BwAwGHjw.js} +1 -1
  131. package/dist/packem_shared/verify-CzUPT6Uk.js +1 -0
  132. package/dist/packem_shared/{vis-update-app-DMAC2pPf.js → vis-update-app-D6Wq8ZHM.js} +1 -1
  133. package/dist/packem_shared/{vis-user-error-xmha3L4n.js → vis-user-error-CfM4_ORo.js} +1 -1
  134. package/dist/packem_shared/{watch-BXOOX7lx.js → watch-D_oAxW_Z.js} +1 -1
  135. package/dist/packem_shared/{watch-loop-Q7UpkVbr.js → watch-loop-BrjblOz5.js} +1 -1
  136. package/dist/runtime/preload.js +1 -1
  137. package/index.d.ts +204 -204
  138. package/index.js +26 -26
  139. package/package.json +13 -13
  140. package/dist/packem_shared/dependency-scan-D_ona0Qm.js +0 -1
  141. package/dist/packem_shared/glob-BUjyjdE8-C4M8e02u.js +0 -1
  142. package/dist/packem_shared/index-CTMU29dI.js +0 -1
  143. package/dist/packem_shared/index-uBVnF4ji.js +0 -35
  144. package/dist/packem_shared/package-version-C47v64aB.js +0 -4
  145. package/dist/packem_shared/public-api-WqUCiyIe.js +0 -131
  146. package/dist/packem_shared/target-merge-Cfy7c__2.js +0 -11
  147. package/dist/packem_shared/verify-Dve9PQj3.js +0 -1
@@ -1,131 +0,0 @@
1
- const tt=Symbol.for("yaml.alias"),He=Symbol.for("yaml.document"),V=Symbol.for("yaml.map"),At=Symbol.for("yaml.pair"),D=Symbol.for("yaml.scalar"),re=Symbol.for("yaml.seq"),K=Symbol.for("yaml.node.type"),oe=n=>!!n&&typeof n=="object"&&n[K]===tt,ye=n=>!!n&&typeof n=="object"&&n[K]===He,be=n=>!!n&&typeof n=="object"&&n[K]===V,T=n=>!!n&&typeof n=="object"&&n[K]===At,N=n=>!!n&&typeof n=="object"&&n[K]===D,we=n=>!!n&&typeof n=="object"&&n[K]===re;function A(n){if(n&&typeof n=="object")switch(n[K]){case V:case re:return!0}return!1}function I(n){if(n&&typeof n=="object")switch(n[K]){case tt:case V:case D:case re:return!0}return!1}const It=n=>(N(n)||A(n))&&!!n.anchor,J=Symbol("break visit"),bs=Symbol("skip children"),de=Symbol("remove node");function ae(n,e){const t=ws(e);ye(n)?z(null,n.contents,t,Object.freeze([n]))===de&&(n.contents=null):z(null,n,t,Object.freeze([]))}ae.BREAK=J;ae.SKIP=bs;ae.REMOVE=de;function z(n,e,t,s){const i=ks(n,e,t,s);if(I(i)||T(i))return vs(n,s,i),z(n,i,t,s);if(typeof i!="symbol"){if(A(e)){s=Object.freeze(s.concat(e));for(let r=0;r<e.items.length;++r){const o=z(r,e.items[r],t,s);if(typeof o=="number")r=o-1;else{if(o===J)return J;o===de&&(e.items.splice(r,1),r-=1)}}}else if(T(e)){s=Object.freeze(s.concat(e));const r=z("key",e.key,t,s);if(r===J)return J;r===de&&(e.key=null);const o=z("value",e.value,t,s);if(o===J)return J;o===de&&(e.value=null)}}return i}function ws(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function ks(n,e,t,s){if(typeof t=="function")return t(n,e,s);if(be(e))return t.Map?.(n,e,s);if(we(e))return t.Seq?.(n,e,s);if(T(e))return t.Pair?.(n,e,s);if(N(e))return t.Scalar?.(n,e,s);if(oe(e))return t.Alias?.(n,e,s)}function vs(n,e,t){const s=e[e.length-1];if(A(s))s.items[n]=t;else if(T(s))n==="key"?s.key=t:s.value=t;else if(ye(s))s.contents=t;else{const i=oe(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const $s={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ss=n=>n.replace(/[!,[\]{}]/g,e=>$s[e]);let te=class q{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},q.defaultYaml,e),this.tags=Object.assign({},q.defaultTags,t)}clone(){const e=new q(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new q(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:q.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},q.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:q.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},q.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),i=s.shift();switch(i){case"%TAG":{if(s.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[r,o]=s;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[r]=s;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{const o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,s,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);const r=this.tags[s];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return s==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+Ss(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let i;if(e&&s.length>0&&I(e.contents)){const r={};ae(e.contents,(o,a)=>{I(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[r,o]of s)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
2
- `)}};te.defaultYaml={explicit:!1,version:"1.2"};te.defaultTags={"!!":"tag:yaml.org,2002:"};function Tt(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const e=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(e)}return!0}function xt(n){const e=new Set;return ae(n,{Value(t,s){s.anchor&&e.add(s.anchor)}}),e}function Lt(n,e){for(let t=1;;++t){const s=`${n}${t}`;if(!e.has(s))return s}}function Es(n,e){const t=[],s=new Map;let i=null;return{onAnchor:r=>{t.push(r),i??(i=xt(n));const o=Lt(e,i);return i.add(o),o},setAnchors:()=>{for(const r of t){const o=s.get(r);if(typeof o=="object"&&o.anchor&&(N(o.node)||A(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:s}}function Z(n,e,t,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let i=0,r=s.length;i<r;++i){const o=s[i],a=Z(n,s,String(i),o);a===void 0?delete s[i]:a!==o&&(s[i]=a)}else if(s instanceof Map)for(const i of Array.from(s.keys())){const r=s.get(i),o=Z(n,s,i,r);o===void 0?s.delete(i):o!==r&&s.set(i,o)}else if(s instanceof Set)for(const i of Array.from(s)){const r=Z(n,s,i,i);r===void 0?s.delete(i):r!==i&&(s.delete(i),s.add(r))}else for(const[i,r]of Object.entries(s)){const o=Z(n,s,i,r);o===void 0?delete s[i]:o!==r&&(s[i]=o)}return n.call(e,t,s)}function B(n,e,t){if(Array.isArray(n))return n.map((s,i)=>B(s,String(i),t));if(n&&typeof n.toJSON=="function"){if(!t||!It(n))return n.toJSON(e,t);const s={aliasCount:0,count:1,res:void 0};t.anchors.set(n,s),t.onCreate=r=>{s.res=r,delete t.onCreate};const i=n.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof n=="bigint"&&!t?.keep?Number(n):n}let st=class{constructor(e){Object.defineProperty(this,K,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:i,reviver:r}={}){if(!ye(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=B(this,"",o);if(typeof i=="function")for(const{count:c,res:l}of o.anchors.values())i(l,c);return typeof r=="function"?Z(r,{"":a},"",a):a}},nt=class extends st{constructor(e){super(tt),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 s;t?.aliasResolveCache?s=t.aliasResolveCache:(s=[],ae(e,{Node:(r,o)=>{(oe(o)||It(o))&&s.push(o)}}),t&&(t.aliasResolveCache=s));let i;for(const r of s){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};const{anchors:s,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=s.get(o);if(a||(B(o,null,t),a=s.get(o)),a?.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Ae(i,o,s)),a.count*a.aliasCount>r)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,t,s){const i=`*${this.source}`;if(e){if(Tt(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function Ae(n,e,t){if(oe(e)){const s=e.resolve(n),i=t&&s&&t.get(s);return i?i.count*i.aliasCount:0}else if(A(e)){let s=0;for(const i of e.items){const r=Ae(n,i,t);r>s&&(s=r)}return s}else if(T(e)){const s=Ae(n,e.key,t),i=Ae(n,e.value,t);return Math.max(s,i)}return 1}const Ct=n=>!n||typeof n!="function"&&typeof n!="object";let $=class extends st{constructor(e){super(D),this.value=e}toJSON(e,t){return t?.keep?this.value:B(this.value,e,t)}toString(){return String(this.value)}};$.BLOCK_FOLDED="BLOCK_FOLDED";$.BLOCK_LITERAL="BLOCK_LITERAL";$.PLAIN="PLAIN";$.QUOTE_DOUBLE="QUOTE_DOUBLE";$.QUOTE_SINGLE="QUOTE_SINGLE";const Ns="tag:yaml.org,2002:";function Os(n,e,t){if(e){const s=t.filter(r=>r.tag===e),i=s.find(r=>!r.format)??s[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(s=>s.identify?.(n)&&!s.format)}function me(n,e,t){if(ye(n)&&(n=n.contents),I(n))return n;if(T(n)){const u=t.schema[V].createNode?.(t.schema,null,t);return u.items.push(n),u}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:s,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=t;let c;if(s&&n&&typeof n=="object"){if(c=a.get(n),c)return c.anchor??(c.anchor=i(n)),new nt(c.anchor);c={anchor:null,node:null},a.set(n,c)}e?.startsWith("!!")&&(e=Ns+e.slice(2));let l=Os(n,e,o.tags);if(!l){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const u=new $(n);return c&&(c.node=u),u}l=n instanceof Map?o[V]:Symbol.iterator in Object(n)?o[re]:o[V]}r&&(r(l),delete t.onTagObj);const d=l?.createNode?l.createNode(t.schema,n,t):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(t.schema,n,t):new $(n);return e?d.tag=e:l.default||(d.tag=l.tag),c&&(c.node=d),d}function Le(n,e,t){let s=t;for(let i=e.length-1;i>=0;--i){const r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){const o=[];o[r]=s,s=o}else s=new Map([[r,s]])}return me(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const fe=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;let _t=class extends st{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(s=>I(s)||T(s)?s.clone(e):s),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(fe(e))this.add(t);else{const[s,...i]=e,r=this.get(s,!0);if(A(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(s,Le(this.schema,i,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}deleteIn(e){const[t,...s]=e;if(s.length===0)return this.delete(t);const i=this.get(t,!0);if(A(i))return i.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){const[s,...i]=e,r=this.get(s,!0);return i.length===0?!t&&N(r)?r.value:r:A(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!T(t))return!1;const s=t.value;return s==null||e&&N(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[t,...s]=e;if(s.length===0)return this.has(t);const i=this.get(t,!0);return A(i)?i.hasIn(s):!1}setIn(e,t){const[s,...i]=e;if(i.length===0)this.set(s,t);else{const r=this.get(s,!0);if(A(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(s,Le(this.schema,i,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}}};const As=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function P(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const W=(n,e,t)=>n.endsWith(`
3
- `)?P(t,e):t.includes(`
4
- `)?`
5
- `+P(t,e):(n.endsWith(" ")?"":" ")+t,Bt="flow",Qe="block",Ie="quoted";function Ke(n,e,t="flow",{indentAtStart:s,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return n;i<r&&(r=0);const c=Math.max(1+r,1+i-e.length);if(n.length<=c)return n;const l=[],d={};let u=i-e.length;typeof s=="number"&&(s>i-Math.max(2,r)?l.push(0):u=i-s);let f,m,g=!1,h=-1,p=-1,y=-1;t===Qe&&(h=yt(n,h,e.length),h!==-1&&(u=h+c));for(let k;k=n[h+=1];){if(t===Ie&&k==="\\"){switch(p=h,n[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}y=h}if(k===`
6
- `)t===Qe&&(h=yt(n,h,e.length)),u=h+e.length+c,f=void 0;else{if(k===" "&&m&&m!==" "&&m!==`
7
- `&&m!==" "){const v=n[h+1];v&&v!==" "&&v!==`
8
- `&&v!==" "&&(f=h)}if(h>=u)if(f)l.push(f),u=f+c,f=void 0;else if(t===Ie){for(;m===" "||m===" ";)m=k,k=n[h+=1],g=!0;const v=h>y+1?h-2:p-1;if(d[v])return n;l.push(v),d[v]=!0,u=v+c,f=void 0}else g=!0}m=k}if(g&&a&&a(),l.length===0)return n;o&&o();let w=n.slice(0,l[0]);for(let k=0;k<l.length;++k){const v=l[k],E=l[k+1]||n.length;v===0?w=`
9
- ${e}${n.slice(0,E)}`:(t===Ie&&d[v]&&(w+=`${n[v]}\\`),w+=`
10
- ${e}${n.slice(v+1,E)}`)}return w}function yt(n,e,t){let s=e,i=e+1,r=n[i];for(;r===" "||r===" ";)if(e<i+t)r=n[++e];else{do r=n[++e];while(r&&r!==`
11
- `);s=e,i=e+1,r=n[i]}return s}const je=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Me=n=>/^(%|---|\.\.\.)/m.test(n);function Is(n,e,t){if(!e||e<0)return!1;const s=e-t,i=n.length;if(i<=s)return!1;for(let r=0,o=0;r<i;++r)if(n[r]===`
12
- `){if(r-o>s)return!0;if(o=r+1,i-o<=s)return!1}return!0}function pe(n,e){const t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:s}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(Me(n)?" ":"");let o="",a=0;for(let c=0,l=t[c];l;l=t[++c])if(l===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(o+=t.slice(a,c)+"\\ ",c+=1,a=c,l="\\"),l==="\\")switch(t[c+1]){case"u":{o+=t.slice(a,c);const d=t.substr(c+2,4);switch(d){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:d.substr(0,2)==="00"?o+="\\x"+d.substr(2):o+=t.substr(c,6)}c+=5,a=c+1}break;case"n":if(s||t[c+2]==='"'||t.length<i)c+=1;else{for(o+=t.slice(a,c)+`
13
-
14
- `;t[c+2]==="\\"&&t[c+3]==="n"&&t[c+4]!=='"';)o+=`
15
- `,c+=2;o+=r,t[c+2]===" "&&(o+="\\"),c+=1,a=c+1}break;default:c+=1}return o=a?o+t.slice(a):t,s?o:Ke(o,r,Ie,je(e,!1))}function Xe(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
16
- `)||/[ \t]\n|\n[ \t]/.test(n))return pe(n,e);const t=e.indent||(Me(n)?" ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
17
- ${t}`)+"'";return e.implicitKey?s:Ke(s,t,Bt,je(e,!1))}function ee(n,e){const{singleQuote:t}=e.options;let s;if(t===!1)s=pe;else{const i=n.includes('"'),r=n.includes("'");i&&!r?s=Xe:r&&!i?s=pe:s=t?Xe:pe}return s(n,e)}let ze;try{ze=new RegExp(`(^|(?<!
18
- ))
19
- +(?!
20
- |$)`,"g")}catch{ze=/\n+(?!\n|$)/g}function Te({comment:n,type:e,value:t},s,i,r){const{blockQuote:o,commentString:a,lineWidth:c}=s.options;if(!o||/\n[\t ]+$/.test(t))return ee(t,s);const l=s.indent||(s.forceBlockIndent||Me(t)?" ":""),d=o==="literal"?!0:o==="folded"||e===$.BLOCK_FOLDED?!1:e===$.BLOCK_LITERAL?!0:!Is(t,c,l.length);if(!t)return d?`|
21
- `:`>
22
- `;let u,f;for(f=t.length;f>0;--f){const v=t[f-1];if(v!==`
23
- `&&v!==" "&&v!==" ")break}let m=t.substring(f);const g=m.indexOf(`
24
- `);g===-1?u="-":t===m||g!==m.length-1?(u="+",r&&r()):u="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
25
- `&&(m=m.slice(0,-1)),m=m.replace(ze,`$&${l}`));let h=!1,p,y=-1;for(p=0;p<t.length;++p){const v=t[p];if(v===" ")h=!0;else if(v===`
26
- `)y=p;else break}let w=t.substring(0,y<p?y+1:p);w&&(t=t.substring(w.length),w=w.replace(/\n+/g,`$&${l}`));let k=(h?l?"2":"1":"")+u;if(n&&(k+=" "+a(n.replace(/ ?[\r\n]+/g," ")),i&&i()),!d){const v=t.replace(/\n+/g,`
27
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`);let E=!1;const S=je(s,!0);o!=="folded"&&e!==$.BLOCK_FOLDED&&(S.onOverflow=()=>{E=!0});const O=Ke(`${w}${v}${m}`,l,Qe,S);if(!E)return`>${k}
28
- ${l}${O}`}return t=t.replace(/\n+/g,`$&${l}`),`|${k}
29
- ${l}${w}${t}${m}`}function Ts(n,e,t,s){const{type:i,value:r}=n,{actualString:o,implicitKey:a,indent:c,indentStep:l,inFlow:d}=e;if(a&&r.includes(`
30
- `)||d&&/[[\]{},]/.test(r))return ee(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||d||!r.includes(`
31
- `)?ee(r,e):Te(n,e,t,s);if(!a&&!d&&i!==$.PLAIN&&r.includes(`
32
- `))return Te(n,e,t,s);if(Me(r)){if(c==="")return e.forceBlockIndent=!0,Te(n,e,t,s);if(a&&c===l)return ee(r,e)}const u=r.replace(/\n+/g,`$&
33
- ${c}`);if(o){const f=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(u),{compat:m,tags:g}=e.doc.schema;if(g.some(f)||m?.some(f))return ee(r,e)}return a?u:Ke(u,c,Bt,je(e,!1))}function it(n,e,t,s){const{implicitKey:i,inFlow:r}=e,o=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:a}=n;a!==$.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=$.QUOTE_DOUBLE);const c=d=>{switch(d){case $.BLOCK_FOLDED:case $.BLOCK_LITERAL:return i||r?ee(o.value,e):Te(o,e,t,s);case $.QUOTE_DOUBLE:return pe(o.value,e);case $.QUOTE_SINGLE:return Xe(o.value,e);case $.PLAIN:return Ts(o,e,t,s);default:return null}};let l=c(a);if(l===null){const{defaultKeyType:d,defaultStringType:u}=e.options,f=i&&d||u;if(l=c(f),l===null)throw new Error(`Unsupported default string type ${f}`)}return l}function Kt(n,e){const t=Object.assign({blockQuote:!0,commentString:As,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},n.schema.toStringOptions,e);let s;switch(t.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:s,options:t}}function xs(n,e){if(e.tag){const i=n.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,s;if(N(e)){s=e.value;let i=n.filter(r=>r.identify?.(s));if(i.length>1){const r=i.filter(o=>o.test);r.length>0&&(i=r)}t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else s=e,t=n.find(i=>i.nodeClass&&s instanceof i.nodeClass);if(!t){const i=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${i} value`)}return t}function Ls(n,e,{anchors:t,doc:s}){if(!s.directives)return"";const i=[],r=(N(n)||A(n))&&n.anchor;r&&Tt(r)&&(t.add(r),i.push(`&${r}`));const o=n.tag??(e.default?null:e.tag);return o&&i.push(s.directives.tagString(o)),i.join(" ")}function ne(n,e,t,s){if(T(n))return n.toString(e,t,s);if(oe(n)){if(e.doc.directives)return n.toString(e);if(e.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let i;const r=I(n)?n:e.doc.createNode(n,{onTagObj:c=>i=c});i??(i=xs(e.doc.schema.tags,r));const o=Ls(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(r,e,t,s):N(r)?it(r,e,t,s):r.toString(e,t,s);return o?N(r)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
34
- ${e.indent}${a}`:a}function Cs({key:n,value:e},t,s,i){const{allNullValues:r,doc:o,indent:a,indentStep:c,options:{commentString:l,indentSeq:d,simpleKeys:u}}=t;let f=I(n)&&n.comment||null;if(u){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(A(n)||!I(n)&&typeof n=="object"){const O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let m=!u&&(!n||f&&e==null&&!t.inFlow||A(n)||(N(n)?n.type===$.BLOCK_FOLDED||n.type===$.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(u||!r),indent:a+c});let g=!1,h=!1,p=ne(n,t,()=>g=!0,()=>h=!0);if(!m&&!t.inFlow&&p.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(r||e==null)return g&&s&&s(),p===""?"?":m?`? ${p}`:p}else if(r&&!u||e==null&&m)return p=`? ${p}`,f&&!g?p+=W(p,t.indent,l(f)):h&&i&&i(),p;g&&(f=null),m?(f&&(p+=W(p,t.indent,l(f))),p=`? ${p}
35
- ${a}:`):(p=`${p}:`,f&&(p+=W(p,t.indent,l(f))));let y,w,k;I(e)?(y=!!e.spaceBefore,w=e.commentBefore,k=e.comment):(y=!1,w=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!m&&!f&&N(e)&&(t.indentAtStart=p.length+1),h=!1,!d&&c.length>=2&&!t.inFlow&&!m&&we(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let v=!1;const E=ne(e,t,()=>v=!0,()=>h=!0);let S=" ";if(f||y||w){if(S=y?`
36
- `:"",w){const O=l(w);S+=`
37
- ${P(O,t.indent)}`}E===""&&!t.inFlow?S===`
38
- `&&k&&(S=`
39
-
40
- `):S+=`
41
- ${t.indent}`}else if(!m&&A(e)){const O=E[0],b=E.indexOf(`
42
- `),x=b!==-1,R=t.inFlow??e.flow??e.items.length===0;if(x||!R){let H=!1;if(x&&(O==="&"||O==="!")){let L=E.indexOf(" ");O==="&"&&L!==-1&&L<b&&E[L+1]==="!"&&(L=E.indexOf(" ",L+1)),(L===-1||b<L)&&(H=!0)}H||(S=`
43
- ${t.indent}`)}}else(E===""||E[0]===`
44
- `)&&(S="");return p+=S+E,t.inFlow?v&&s&&s():k&&!v?p+=W(p,t.indent,l(k)):h&&i&&i(),p}function jt(n,e){(n==="debug"||n==="warn")&&console.warn(e)}const $e="<<",U={identify:n=>n===$e||typeof n=="symbol"&&n.description===$e,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new $(Symbol($e)),{addToJSMap:Mt}),stringify:()=>$e},_s=(n,e)=>(U.identify(e)||N(e)&&(!e.type||e.type===$.PLAIN)&&U.identify(e.value))&&n?.doc.schema.tags.some(t=>t.tag===U.tag&&t.default);function Mt(n,e,t){const s=Dt(n,t);if(we(s))for(const i of s.items)Fe(n,e,i);else if(Array.isArray(s))for(const i of s)Fe(n,e,i);else Fe(n,e,s)}function Fe(n,e,t){const s=Dt(n,t);if(!be(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,n,Map);for(const[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function Dt(n,e){return n&&oe(e)?e.resolve(n.doc,n):e}function qt(n,e,{key:t,value:s}){if(I(t)&&t.addToJSMap)t.addToJSMap(n,e,s);else if(_s(n,t))Mt(n,e,s);else{const i=B(t,"",n);if(e instanceof Map)e.set(i,B(s,i,n));else if(e instanceof Set)e.add(i);else{const r=Bs(t,i,n),o=B(s,r,n);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function Bs(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(I(n)&&t?.doc){const s=Kt(t.doc,{});s.anchors=new Set;for(const r of t.anchors.keys())s.anchors.add(r.anchor);s.inFlow=!0,s.inStringifyKey=!0;const i=n.toString(s);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),jt(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function rt(n,e,t){const s=me(n,void 0,t),i=me(e,void 0,t);return new C(s,i)}let C=class Pt{constructor(e,t=null){Object.defineProperty(this,K,{value:At}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return I(t)&&(t=t.clone(e)),I(s)&&(s=s.clone(e)),new Pt(t,s)}toJSON(e,t){const s=t?.mapAsMap?new Map:{};return qt(t,s,this)}toString(e,t,s){return e?.doc?Cs(this,e,t,s):JSON.stringify(this)}};function Ut(n,e,t){return(e.inFlow??n.flow?js:Ks)(n,e,t)}function Ks({comment:n,items:e},t,{blockItemPrefix:s,flowChars:i,itemIndent:r,onChompKeep:o,onComment:a}){const{indent:c,options:{commentString:l}}=t,d=Object.assign({},t,{indent:r,type:null});let u=!1;const f=[];for(let g=0;g<e.length;++g){const h=e[g];let p=null;if(I(h))!u&&h.spaceBefore&&f.push(""),Ce(t,f,h.commentBefore,u),h.comment&&(p=h.comment);else if(T(h)){const w=I(h.key)?h.key:null;w&&(!u&&w.spaceBefore&&f.push(""),Ce(t,f,w.commentBefore,u))}u=!1;let y=ne(h,d,()=>p=null,()=>u=!0);p&&(y+=W(y,r,l(p))),u&&p&&(u=!1),f.push(s+y)}let m;if(f.length===0)m=i.start+i.end;else{m=f[0];for(let g=1;g<f.length;++g){const h=f[g];m+=h?`
45
- ${c}${h}`:`
46
- `}}return n?(m+=`
47
- `+P(l(n),c),a&&a()):u&&o&&o(),m}function js({items:n},e,{flowChars:t,itemIndent:s}){const{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:a}}=e;s+=r;const c=Object.assign({},e,{indent:s,inFlow:!0,type:null});let l=!1,d=0;const u=[];for(let g=0;g<n.length;++g){const h=n[g];let p=null;if(I(h))h.spaceBefore&&u.push(""),Ce(e,u,h.commentBefore,!1),h.comment&&(p=h.comment);else if(T(h)){const w=I(h.key)?h.key:null;w&&(w.spaceBefore&&u.push(""),Ce(e,u,w.commentBefore,!1),w.comment&&(l=!0));const k=I(h.value)?h.value:null;k?(k.comment&&(p=k.comment),k.commentBefore&&(l=!0)):h.value==null&&w?.comment&&(p=w.comment)}p&&(l=!0);let y=ne(h,c,()=>p=null);l||(l=u.length>d||y.includes(`
48
- `)),g<n.length-1?y+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(l||(l=u.reduce((w,k)=>w+k.length+2,2)+(y.length+2)>e.options.lineWidth)),l&&(y+=",")),p&&(y+=W(y,s,a(p))),u.push(y),d=u.length}const{start:f,end:m}=t;if(u.length===0)return f+m;if(!l){const g=u.reduce((h,p)=>h+p.length+2,2);l=e.options.lineWidth>0&&g>e.options.lineWidth}if(l){let g=f;for(const h of u)g+=h?`
49
- ${r}${i}${h}`:`
50
- `;return`${g}
51
- ${i}${m}`}else return`${f}${o}${u.join(" ")}${o}${m}`}function Ce({indent:n,options:{commentString:e}},t,s,i){if(s&&i&&(s=s.replace(/^\n+/,"")),s){const r=P(e(s),n);t.push(r.trimStart())}}function Y(n,e){const t=N(e)?e.value:e;for(const s of n)if(T(s)&&(s.key===e||s.key===t||N(s.key)&&s.key.value===t))return s}class _ extends _t{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(V,e),this.items=[]}static from(e,t,s){const{keepUndefined:i,replacer:r}=s,o=new this(e),a=(c,l)=>{if(typeof r=="function")l=r.call(t,c,l);else if(Array.isArray(r)&&!r.includes(c))return;(l!==void 0||i)&&o.items.push(rt(c,l,s))};if(t instanceof Map)for(const[c,l]of t)a(c,l);else if(t&&typeof t=="object")for(const c of Object.keys(t))a(c,t[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let s;T(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new C(e,e?.value):s=new C(e.key,e.value);const i=Y(this.items,s.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${s.key} already set`);N(i.value)&&Ct(s.value)?i.value.value=s.value:i.value=s.value}else if(r){const o=this.items.findIndex(a=>r(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){const t=Y(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const s=Y(this.items,e)?.value;return(!t&&N(s)?s.value:s)??void 0}has(e){return!!Y(this.items,e)}set(e,t){this.add(new C(e,t),!0)}toJSON(e,t,s){const i=s?new s:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(const r of this.items)qt(t,i,r);return i}toString(e,t,s){if(!e)return JSON.stringify(this);for(const i of this.items)if(!T(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Ut(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}const ce={collection:"map",default:!0,nodeClass:_,tag:"tag:yaml.org,2002:map",resolve(n,e){return be(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,t)=>_.from(n,e,t)};let G=class extends _t{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(re,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Se(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const s=Se(e);if(typeof s!="number")return;const i=this.items[s];return!t&&N(i)?i.value:i}has(e){const t=Se(e);return typeof t=="number"&&t<this.items.length}set(e,t){const s=Se(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[s];N(i)&&Ct(t)?i.value=t:this.items[s]=t}toJSON(e,t){const s=[];t?.onCreate&&t.onCreate(s);let i=0;for(const r of this.items)s.push(B(r,String(i++),t));return s}toString(e,t,s){return e?Ut(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){const{replacer:i}=s,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof i=="function"){const c=t instanceof Set?a:String(o++);a=i.call(t,c,a)}r.items.push(me(a,void 0,s))}}return r}};function Se(n){let e=N(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const le={collection:"seq",default:!0,nodeClass:G,tag:"tag:yaml.org,2002:seq",resolve(n,e){return we(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,t)=>G.from(n,e,t)},De={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,t,s){return e=Object.assign({actualString:!0},e),it(n,e,t,s)}},qe={identify:n=>n==null,createNode:()=>new $(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new $(null),stringify:({source:n},e)=>typeof n=="string"&&qe.test.test(n)?n:e.options.nullStr},ot={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new $(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},t){if(n&&ot.test.test(n)){const s=n[0]==="t"||n[0]==="T";if(e===s)return n}return e?t.options.trueStr:t.options.falseStr}};function M({format:n,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);const i=typeof s=="number"?s:Number(s);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(s,-0)?"-0":JSON.stringify(s);if(!n&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(r)&&!r.includes("e")){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let a=e-(r.length-o-1);for(;a-- >0;)r+="0"}return r}const Rt={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:M},Ft={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():M(n)}},Vt={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){const e=new $(parseFloat(n)),t=n.indexOf(".");return t!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-t-1),e},stringify:M},Pe=n=>typeof n=="bigint"||Number.isInteger(n),at=(n,e,t,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),t);function Jt(n,e,t){const{value:s}=n;return Pe(s)&&s>=0?t+s.toString(e):M(n)}const Wt={identify:n=>Pe(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,t)=>at(n,2,8,t),stringify:n=>Jt(n,8,"0o")},Yt={identify:Pe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,t)=>at(n,0,10,t),stringify:M},Gt={identify:n=>Pe(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,t)=>at(n,2,16,t),stringify:n=>Jt(n,16,"0x")},Ms=[ce,le,De,qe,ot,Wt,Yt,Gt,Rt,Ft,Vt];function bt(n){return typeof n=="bigint"||Number.isInteger(n)}const Ee=({value:n})=>JSON.stringify(n),Ds=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Ee},{identify:n=>n==null,createNode:()=>new $(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ee},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:n=>n==="true",stringify:Ee},{identify:bt,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:t})=>t?BigInt(n):parseInt(n,10),stringify:({value:n})=>bt(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:Ee}],qs={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},Ps=[ce,le].concat(Ds,qs),ct={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof atob=="function"){const t=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let i=0;i<t.length;++i)s[i]=t.charCodeAt(i);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:t},s,i,r){if(!t)return"";const o=t;let a;if(typeof btoa=="function"){let c="";for(let l=0;l<o.length;++l)c+=String.fromCharCode(o[l]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=$.BLOCK_LITERAL),e!==$.QUOTE_DOUBLE){const c=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),l=Math.ceil(a.length/c),d=new Array(l);for(let u=0,f=0;u<l;++u,f+=c)d[u]=a.substr(f,c);a=d.join(e===$.BLOCK_LITERAL?`
52
- `:" ")}return it({comment:n,type:e,value:a},s,i,r)}};function Ht(n,e){if(we(n))for(let t=0;t<n.items.length;++t){let s=n.items[t];if(!T(s)){if(be(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const i=s.items[0]||new C(new $(null));if(s.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${s.commentBefore}
53
- ${i.key.commentBefore}`:s.commentBefore),s.comment){const r=i.value??i.key;r.comment=r.comment?`${s.comment}
54
- ${r.comment}`:s.comment}s=i}n.items[t]=T(s)?s:new C(s)}}else e("Expected a sequence for this tag");return n}function Qt(n,e,t){const{replacer:s}=t,i=new G(n);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(r++),o));let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const l=Object.keys(o);if(l.length===1)a=l[0],c=o[a];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else a=o;i.items.push(rt(a,c,t))}return i}const lt={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ht,createNode:Qt};let xe=class Xt extends G{constructor(){super(),this.add=_.prototype.add.bind(this),this.delete=_.prototype.delete.bind(this),this.get=_.prototype.get.bind(this),this.has=_.prototype.has.bind(this),this.set=_.prototype.set.bind(this),this.tag=Xt.tag}toJSON(e,t){if(!t)return super.toJSON(e);const s=new Map;t?.onCreate&&t.onCreate(s);for(const i of this.items){let r,o;if(T(i)?(r=B(i.key,"",t),o=B(i.value,r,t)):r=B(i,"",t),s.has(r))throw new Error("Ordered maps must not include duplicate keys");s.set(r,o)}return s}static from(e,t,s){const i=Qt(e,t,s),r=new this;return r.items=i.items,r}};xe.tag="tag:yaml.org,2002:omap";const ut={collection:"seq",identify:n=>n instanceof Map,nodeClass:xe,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const t=Ht(n,e),s=[];for(const{key:i}of t.items)N(i)&&(s.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):s.push(i.value));return Object.assign(new xe,t)},createNode:(n,e,t)=>xe.from(n,e,t)};function zt({value:n,source:e},t){return e&&(n?Zt:es).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}const Zt={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new $(!0),stringify:zt},es={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new $(!1),stringify:zt},Us={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:M},Rs={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():M(n)}},Fs={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new $(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){const s=n.substring(t+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:M},ke=n=>typeof n=="bigint"||Number.isInteger(n);function Ue(n,e,t,{intAsBigInt:s}){const i=n[0];if((i==="-"||i==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),s){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const o=BigInt(n);return i==="-"?BigInt(-1)*o:o}const r=parseInt(n,t);return i==="-"?-1*r:r}function ft(n,e,t){const{value:s}=n;if(ke(s)){const i=s.toString(e);return s<0?"-"+t+i.substr(1):t+i}return M(n)}const Vs={identify:ke,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>Ue(n,2,2,t),stringify:n=>ft(n,2,"0b")},Js={identify:ke,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>Ue(n,1,8,t),stringify:n=>ft(n,8,"0")},Ws={identify:ke,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>Ue(n,0,10,t),stringify:M},Ys={identify:ke,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>Ue(n,2,16,t),stringify:n=>ft(n,16,"0x")};class se extends _{constructor(e){super(e),this.tag=se.tag}add(e){let t;T(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new C(e.key,null):t=new C(e,null),Y(this.items,t.key)||this.items.push(t)}get(e,t){const s=Y(this.items,e);return!t&&T(s)?N(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const s=Y(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new C(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw new Error("Set items must all have null values")}static from(e,t,s){const{replacer:i}=s,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(rt(o,null,s));return r}}se.tag="tag:yaml.org,2002:set";const ht={collection:"map",identify:n=>n instanceof Set,nodeClass:se,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>se.from(n,e,t),resolve(n,e){if(be(n)){if(n.hasAllNullValues(!0))return Object.assign(new se,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function dt(n,e){const t=n[0],s=t==="-"||t==="+"?n.substring(1):n,i=o=>e?BigInt(o):Number(o),r=s.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*r:r}function ts(n){let{value:e}=n,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return M(n);let s="";e<0&&(s="-",e*=t(-1));const i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),s+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const ss={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>dt(n,t),stringify:ts},ns={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>dt(n,!1),stringify:ts},Re={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){const e=n.match(Re.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,s,i,r,o,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0;let l=Date.UTC(t,s-1,i,r||0,o||0,a||0,c);const d=e[8];if(d&&d!=="Z"){let u=dt(d,!1);Math.abs(u)<30&&(u*=60),l-=6e4*u}return new Date(l)},stringify:({value:n})=>n?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},wt=[ce,le,De,qe,Zt,es,Vs,Js,Ws,Ys,Us,Rs,Fs,ct,U,ut,lt,ht,ss,ns,Re],kt=new Map([["core",Ms],["failsafe",[ce,le,De]],["json",Ps],["yaml11",wt],["yaml-1.1",wt]]),vt={binary:ct,bool:ot,float:Vt,floatExp:Ft,floatNaN:Rt,floatTime:ns,int:Yt,intHex:Gt,intOct:Wt,intTime:ss,map:ce,merge:U,null:qe,omap:ut,pairs:lt,seq:le,set:ht,timestamp:Re},Gs={"tag:yaml.org,2002:binary":ct,"tag:yaml.org,2002:merge":U,"tag:yaml.org,2002:omap":ut,"tag:yaml.org,2002:pairs":lt,"tag:yaml.org,2002:set":ht,"tag:yaml.org,2002:timestamp":Re};function Ve(n,e,t){const s=kt.get(e);if(s&&!n)return t&&!s.includes(U)?s.concat(U):s.slice();let i=s;if(!i)if(Array.isArray(n))i=[];else{const r=Array.from(kt.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(n))for(const r of n)i=i.concat(r);else typeof n=="function"&&(i=n(i.slice()));return t&&(i=i.concat(U)),i.reduce((r,o)=>{const a=typeof o=="string"?vt[o]:o;if(!a){const c=JSON.stringify(o),l=Object.keys(vt).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return r.includes(a)||r.push(a),r},[])}const Hs=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;let Qs=class is{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Ve(e,"compat"):e?Ve(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Gs:{},this.tags=Ve(t,this.name,s),this.toStringOptions=a??null,Object.defineProperty(this,V,{value:ce}),Object.defineProperty(this,D,{value:De}),Object.defineProperty(this,re,{value:le}),this.sortMapEntries=typeof o=="function"?o:o===!0?Hs:null}clone(){const e=Object.create(is.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};function Xs(n,e){const t=[];let s=e.directives===!0;if(e.directives!==!1&&n.directives){const c=n.directives.toString(n);c?(t.push(c),s=!0):n.directives.docStart&&(s=!0)}s&&t.push("---");const i=Kt(n,e),{commentString:r}=i.options;if(n.commentBefore){t.length!==1&&t.unshift("");const c=r(n.commentBefore);t.unshift(P(c,""))}let o=!1,a=null;if(n.contents){if(I(n.contents)){if(n.contents.spaceBefore&&s&&t.push(""),n.contents.commentBefore){const d=r(n.contents.commentBefore);t.push(P(d,""))}i.forceBlockIndent=!!n.comment,a=n.contents.comment}const c=a?void 0:()=>o=!0;let l=ne(n.contents,i,()=>a=null,c);a&&(l+=W(l,"",r(a))),(l[0]==="|"||l[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${l}`:t.push(l)}else t.push(ne(n.contents,i));if(n.directives?.docEnd)if(n.comment){const c=r(n.comment);c.includes(`
55
- `)?(t.push("..."),t.push(P(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=n.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(P(r(c),"")))}return t.join(`
56
- `)+`
57
- `}let pt=class rs{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,K,{value:He});let i=null;typeof t=="function"||Array.isArray(t)?i=t:s===void 0&&t&&(s=t,t=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=r;let{version:o}=r;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new te({version:o}),this.setSchema(o,s),this.contents=e===void 0?null:this.createNode(e,i,s)}clone(){const e=Object.create(rs.prototype,{[K]:{value:He}});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=I(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Q(this.contents)&&this.contents.add(e)}addIn(e,t){Q(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=xt(this);e.anchor=!t||s.has(t)?Lt(t||"a",s):t}return new nt(e.anchor)}createNode(e,t,s){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){const p=w=>typeof w=="number"||w instanceof String||w instanceof Number,y=t.filter(p).map(String);y.length>0&&(t=t.concat(y)),i=t}else s===void 0&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:l,tag:d}=s??{},{onAnchor:u,setAnchors:f,sourceObjects:m}=Es(this,o||"a"),g={aliasDuplicateObjects:r??!0,keepUndefined:c??!1,onAnchor:u,onTagObj:l,replacer:i,schema:this.schema,sourceObjects:m},h=me(e,d,g);return a&&A(h)&&(h.flow=!0),f(),h}createPair(e,t,s={}){const i=this.createNode(e,null,s),r=this.createNode(t,null,s);return new C(i,r)}delete(e){return Q(this.contents)?this.contents.delete(e):!1}deleteIn(e){return fe(e)?this.contents==null?!1:(this.contents=null,!0):Q(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return A(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return fe(e)?!t&&N(this.contents)?this.contents.value:this.contents:A(this.contents)?this.contents.getIn(e,t):void 0}has(e){return A(this.contents)?this.contents.has(e):!1}hasIn(e){return fe(e)?this.contents!==void 0:A(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Le(this.schema,[e],t):Q(this.contents)&&this.contents.set(e,t)}setIn(e,t){fe(e)?this.contents=t:this.contents==null?this.contents=Le(this.schema,Array.from(e),t):Q(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new te({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new te({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Qs(Object.assign(s,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:i,onAnchor:r,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=B(this.contents,t??"",a);if(typeof r=="function")for(const{count:l,res:d}of a.anchors.values())r(d,l);return typeof o=="function"?Z(o,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Xs(this,e)}};function Q(n){if(A(n))return!0;throw new Error("Expected a YAML collection as document contents")}let os=class extends Error{constructor(e,t,s,i){super(),this.name=e,this.code=s,this.message=i,this.pos=t}},he=class extends os{constructor(e,t,s){super("YAMLParseError",e,t,s)}},zs=class extends os{constructor(e,t,s){super("YAMLWarning",e,t,s)}};const _e=(n,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));const{line:s,col:i}=t.linePos[0];t.message+=` at line ${s}, column ${i}`;let r=i-1,o=n.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){const a=Math.min(r-39,o.length-79);o="…"+o.substring(a),r-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),s>1&&/^ *$/.test(o.substring(0,r))){let a=n.substring(e.lineStarts[s-2],e.lineStarts[s-1]);a.length>80&&(a=a.substring(0,79)+`…
58
- `),o=a+o}if(/[^ ]/.test(o)){let a=1;const c=t.linePos[1];c?.line===s&&c.col>i&&(a=Math.max(1,Math.min(c.col-i,80-r)));const l=" ".repeat(r)+"^".repeat(a);t.message+=`:
59
-
60
- ${o}
61
- ${l}
62
- `}};function ie(n,{flow:e,indicator:t,next:s,offset:i,onError:r,parentIndent:o,startOnNewline:a}){let c=!1,l=a,d=a,u="",f="",m=!1,g=!1,h=null,p=null,y=null,w=null,k=null,v=null,E=null;for(const b of n)switch(g&&(b.type!=="space"&&b.type!=="newline"&&b.type!=="comma"&&r(b.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),h&&(l&&b.type!=="comment"&&b.type!=="newline"&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),b.type){case"space":!e&&(t!=="doc-start"||s?.type!=="flow-collection")&&b.source.includes(" ")&&(h=b),d=!0;break;case"comment":{d||r(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=b.source.substring(1)||" ";u?u+=f+x:u=x,f="",l=!1;break}case"newline":l?u?u+=b.source:(!v||t!=="seq-item-ind")&&(c=!0):f+=b.source,l=!0,m=!0,(p||y)&&(w=b),d=!0;break;case"anchor":p&&r(b,"MULTIPLE_ANCHORS","A node can have at most one anchor"),b.source.endsWith(":")&&r(b.offset+b.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=b,E??(E=b.offset),l=!1,d=!1,g=!0;break;case"tag":{y&&r(b,"MULTIPLE_TAGS","A node can have at most one tag"),y=b,E??(E=b.offset),l=!1,d=!1,g=!0;break}case t:(p||y)&&r(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`),v&&r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${e??"collection"}`),v=b,l=t==="seq-item-ind"||t==="explicit-key-ind",d=!1;break;case"comma":if(e){k&&r(b,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),k=b,l=!1,d=!1;break}default:r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),l=!1,d=!1}const S=n[n.length-1],O=S?S.offset+S.source.length:i;return g&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&r(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(l&&h.indent<=o||s?.type==="block-map"||s?.type==="block-seq")&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:v,spaceBefore:c,comment:u,hasNewline:m,anchor:p,tag:y,newlineAfterProp:w,end:O,start:E??O}}function ge(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
63
- `))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(ge(e.key)||ge(e.value))return!0}return!1;default:return!0}}function Ze(n,e,t){if(e?.type==="flow-collection"){const s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&ge(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function as(n,e,t){const{uniqueKeys:s}=n.options;if(s===!1)return!1;const i=typeof s=="function"?s:(r,o)=>r===o||N(r)&&N(o)&&r.value===o.value;return e.some(r=>i(r.key,t))}const $t="All mapping items must start at the same column";function Zs({composeNode:n,composeEmptyNode:e},t,s,i,r){const o=r?.nodeClass??_,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let c=s.offset,l=null;for(const d of s.items){const{start:u,key:f,sep:m,value:g}=d,h=ie(u,{indicator:"explicit-key-ind",next:f??m?.[0],offset:c,onError:i,parentIndent:s.indent,startOnNewline:!0}),p=!h.found;if(p){if(f&&(f.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==s.indent&&i(c,"BAD_INDENT",$t)),!h.anchor&&!h.tag&&!m){l=h.end,h.comment&&(a.comment?a.comment+=`
64
- `+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||ge(f))&&i(f??u[u.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==s.indent&&i(c,"BAD_INDENT",$t);t.atKey=!0;const y=h.end,w=f?n(t,f,h,i):e(t,y,u,null,h,i);t.schema.compat&&Ze(s.indent,f,i),t.atKey=!1,as(t,a.items,w)&&i(y,"DUPLICATE_KEY","Map keys must be unique");const k=ie(m??[],{indicator:"map-value-ind",next:g,offset:w.range[2],onError:i,parentIndent:s.indent,startOnNewline:!f||f.type==="block-scalar"});if(c=k.end,k.found){p&&(g?.type==="block-map"&&!k.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<k.found.offset-1024&&i(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const v=g?n(t,g,k,i):e(t,c,m,null,k,i);t.schema.compat&&Ze(s.indent,g,i),c=v.range[2];const E=new C(w,v);t.options.keepSourceTokens&&(E.srcToken=d),a.items.push(E)}else{p&&i(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(w.comment?w.comment+=`
65
- `+k.comment:w.comment=k.comment);const v=new C(w);t.options.keepSourceTokens&&(v.srcToken=d),a.items.push(v)}}return l&&l<c&&i(l,"IMPOSSIBLE","Map comment with trailing content"),a.range=[s.offset,c,l??c],a}function en({composeNode:n,composeEmptyNode:e},t,s,i,r){const o=r?.nodeClass??G,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let c=s.offset,l=null;for(const{start:d,value:u}of s.items){const f=ie(d,{indicator:"seq-item-ind",next:u,offset:c,onError:i,parentIndent:s.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||u)u?.type==="block-seq"?i(f.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{l=f.end,f.comment&&(a.comment=f.comment);continue}const m=u?n(t,u,f,i):e(t,f.end,d,null,f,i);t.schema.compat&&Ze(s.indent,u,i),c=m.range[2],a.items.push(m)}return a.range=[s.offset,c,l??c],a}function ve(n,e,t,s){let i="";if(n){let r=!1,o="";for(const a of n){const{source:c,type:l}=a;switch(l){case"space":r=!0;break;case"comment":{t&&!r&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const d=c.substring(1)||" ";i?i+=o+d:i=d,o="";break}case"newline":i&&(o+=c),r=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=c.length}}return{comment:i,offset:e}}const Je="Block collections are not allowed within flow collections",We=n=>n&&(n.type==="block-map"||n.type==="block-seq");function tn({composeNode:n,composeEmptyNode:e},t,s,i,r){const o=s.start.source==="{",a=o?"flow map":"flow sequence",c=r?.nodeClass??(o?_:G),l=new c(t.schema);l.flow=!0;const d=t.atRoot;d&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let u=s.offset+s.start.source.length;for(let p=0;p<s.items.length;++p){const y=s.items[p],{start:w,key:k,sep:v,value:E}=y,S=ie(w,{flow:a,indicator:"explicit-key-ind",next:k??v?.[0],offset:u,onError:i,parentIndent:s.indent,startOnNewline:!1});if(!S.found){if(!S.anchor&&!S.tag&&!v&&!E){p===0&&S.comma?i(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):p<s.items.length-1&&i(S.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),S.comment&&(l.comment?l.comment+=`
66
- `+S.comment:l.comment=S.comment),u=S.end;continue}!o&&t.options.strict&&ge(k)&&i(k,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)S.comma&&i(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(S.comma||i(S.start,"MISSING_CHAR",`Missing , between ${a} items`),S.comment){let O="";e:for(const b of w)switch(b.type){case"comma":case"space":break;case"comment":O=b.source.substring(1);break e;default:break e}if(O){let b=l.items[l.items.length-1];T(b)&&(b=b.value??b.key),b.comment?b.comment+=`
67
- `+O:b.comment=O,S.comment=S.comment.substring(O.length+1)}}if(!o&&!v&&!S.found){const O=E?n(t,E,S,i):e(t,S.end,v,null,S,i);l.items.push(O),u=O.range[2],We(E)&&i(O.range,"BLOCK_IN_FLOW",Je)}else{t.atKey=!0;const O=S.end,b=k?n(t,k,S,i):e(t,O,w,null,S,i);We(k)&&i(b.range,"BLOCK_IN_FLOW",Je),t.atKey=!1;const x=ie(v??[],{flow:a,indicator:"map-value-ind",next:E,offset:b.range[2],onError:i,parentIndent:s.indent,startOnNewline:!1});if(x.found){if(!o&&!S.found&&t.options.strict){if(v)for(const L of v){if(L===x.found)break;if(L.type==="newline"){i(L,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}S.start<x.found.offset-1024&&i(x.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else E&&("source"in E&&E.source?.[0]===":"?i(E,"MISSING_CHAR",`Missing space after : in ${a}`):i(x.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const R=E?n(t,E,x,i):x.found?e(t,x.end,v,null,x,i):null;R?We(E)&&i(R.range,"BLOCK_IN_FLOW",Je):x.comment&&(b.comment?b.comment+=`
68
- `+x.comment:b.comment=x.comment);const H=new C(b,R);if(t.options.keepSourceTokens&&(H.srcToken=y),o){const L=l;as(t,L.items,b)&&i(O,"DUPLICATE_KEY","Map keys must be unique"),L.items.push(H)}else{const L=new _(t.schema);L.flow=!0,L.items.push(H);const gt=(R??b).range;L.range=[b.range[0],gt[1],gt[2]],l.items.push(L)}u=R?R.range[2]:x.end}}const f=o?"}":"]",[m,...g]=s.end;let h=u;if(m?.source===f)h=m.offset+m.source.length;else{const p=a[0].toUpperCase()+a.substring(1),y=d?`${p} must end with a ${f}`:`${p} in block collection must be sufficiently indented and end with a ${f}`;i(u,d?"MISSING_CHAR":"BAD_INDENT",y),m&&m.source.length!==1&&g.unshift(m)}if(g.length>0){const p=ve(g,h,t.options.strict,i);p.comment&&(l.comment?l.comment+=`
69
- `+p.comment:l.comment=p.comment),l.range=[s.offset,h,p.offset]}else l.range=[s.offset,h,h];return l}function Ye(n,e,t,s,i,r){const o=t.type==="block-map"?Zs(n,e,t,s,r):t.type==="block-seq"?en(n,e,t,s,r):tn(n,e,t,s,r),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function sn(n,e,t,s,i){const r=s.tag,o=r?e.directives.tagName(r.source,f=>i(r,"TAG_RESOLVE_FAILED",f)):null;if(t.type==="block-seq"){const{anchor:f,newlineAfterProp:m}=s,g=f&&r?f.offset>r.offset?f:r:f??r;g&&(!m||m.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===_.tagName&&a==="map"||o===G.tagName&&a==="seq")return Ye(n,e,t,i,o);let c=e.schema.tags.find(f=>f.tag===o&&f.collection===a);if(!c){const f=e.schema.knownTags[o];if(f?.collection===a)e.schema.tags.push(Object.assign({},f,{default:!1})),c=f;else return f?i(r,"BAD_COLLECTION_TYPE",`${f.tag} used for ${a} collection, but expects ${f.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Ye(n,e,t,i,o)}const l=Ye(n,e,t,i,o,c),d=c.resolve?.(l,f=>i(r,"TAG_RESOLVE_FAILED",f),e.options)??l,u=I(d)?d:new $(d);return u.range=l.range,u.tag=o,c?.format&&(u.format=c.format),u}function nn(n,e,t){const s=e.offset,i=rn(e,n.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[s,s,s]};const r=i.mode===">"?$.BLOCK_FOLDED:$.BLOCK_LITERAL,o=e.source?on(e.source):[];let a=o.length;for(let h=o.length-1;h>=0;--h){const p=o[h][1];if(p===""||p==="\r")a=h;else break}if(a===0){const h=i.chomp==="+"&&o.length>0?`
70
- `.repeat(Math.max(1,o.length-1)):"";let p=s+i.length;return e.source&&(p+=e.source.length),{value:h,type:r,comment:i.comment,range:[s,p,p]}}let c=e.indent+i.indent,l=e.offset+i.length,d=0;for(let h=0;h<a;++h){const[p,y]=o[h];if(y===""||y==="\r")i.indent===0&&p.length>c&&(c=p.length);else{p.length<c&&t(l+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=p.length),d=h,c===0&&!n.atRoot&&t(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=p.length+y.length+1}for(let h=o.length-1;h>=a;--h)o[h][0].length>c&&(a=h+1);let u="",f="",m=!1;for(let h=0;h<d;++h)u+=o[h][0].slice(c)+`
71
- `;for(let h=d;h<a;++h){let[p,y]=o[h];l+=p.length+y.length+1;const w=y[y.length-1]==="\r";if(w&&(y=y.slice(0,-1)),y&&p.length<c){const k=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(l-y.length-(w?2:1),"BAD_INDENT",k),p=""}r===$.BLOCK_LITERAL?(u+=f+p.slice(c)+y,f=`
72
- `):p.length>c||y[0]===" "?(f===" "?f=`
73
- `:!m&&f===`
74
- `&&(f=`
75
-
76
- `),u+=f+p.slice(c)+y,f=`
77
- `,m=!0):y===""?f===`
78
- `?u+=`
79
- `:f=`
80
- `:(u+=f+y,f=" ",m=!1)}switch(i.chomp){case"-":break;case"+":for(let h=a;h<o.length;++h)u+=`
81
- `+o[h][0].slice(c);u[u.length-1]!==`
82
- `&&(u+=`
83
- `);break;default:u+=`
84
- `}const g=s+i.length+e.source.length;return{value:u,type:r,comment:i.comment,range:[s,g,g]}}function rn({offset:n,props:e},t,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],r=i[0];let o=0,a="",c=-1;for(let f=1;f<i.length;++f){const m=i[f];if(!a&&(m==="-"||m==="+"))a=m;else{const g=Number(m);!o&&g?o=g:c===-1&&(c=n+f)}}c!==-1&&s(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,d="",u=i.length;for(let f=1;f<e.length;++f){const m=e[f];switch(m.type){case"space":l=!0;case"newline":u+=m.source.length;break;case"comment":t&&!l&&s(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=m.source.length,d=m.source.substring(1);break;case"error":s(m,"UNEXPECTED_TOKEN",m.message),u+=m.source.length;break;default:{const g=`Unexpected token in block scalar header: ${m.type}`;s(m,"UNEXPECTED_TOKEN",g);const h=m.source;h&&typeof h=="string"&&(u+=h.length)}}}return{mode:r,indent:o,chomp:a,comment:d,length:u}}function on(n){const e=n.split(/\n( *)/),t=e[0],s=t.match(/^( *)/),i=[s?.[1]?[s[1],t.slice(s[1].length)]:["",t]];for(let r=1;r<e.length;r+=2)i.push([e[r],e[r+1]]);return i}function an(n,e,t){const{offset:s,type:i,source:r,end:o}=n;let a,c;const l=(f,m,g)=>t(s+f,m,g);switch(i){case"scalar":a=$.PLAIN,c=cn(r,l);break;case"single-quoted-scalar":a=$.QUOTE_SINGLE,c=ln(r,l);break;case"double-quoted-scalar":a=$.QUOTE_DOUBLE,c=un(r,l);break;default:return t(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[s,s+r.length,s+r.length]}}const d=s+r.length,u=ve(o,d,e,t);return{value:c,type:a,comment:u.comment,range:[s,d,u.offset]}}function cn(n,e){let t="";switch(n[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 ${n[0]}`;break}case"@":case"`":{t=`reserved character ${n[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),cs(n)}function ln(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),cs(n.slice(1,-1)).replace(/''/g,"'")}function cs(n){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
85
- `,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
86
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(n);if(!s)return n;let i=s[1],r=" ",o=e.lastIndex;for(t.lastIndex=o;s=t.exec(n);)s[1]===""?r===`
87
- `?i+=r:r=`
88
- `:(i+=r+s[1],r=" "),o=t.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,s=a.exec(n),i+r+(s?.[1]??"")}function un(n,e){let t="";for(let s=1;s<n.length-1;++s){const i=n[s];if(!(i==="\r"&&n[s+1]===`
89
- `))if(i===`
90
- `){const{fold:r,offset:o}=fn(n,s);t+=r,s=o}else if(i==="\\"){let r=n[++s];const o=hn[r];if(o)t+=o;else if(r===`
91
- `)for(r=n[s+1];r===" "||r===" ";)r=n[++s+1];else if(r==="\r"&&n[s+1]===`
92
- `)for(r=n[++s+1];r===" "||r===" ";)r=n[++s+1];else if(r==="x"||r==="u"||r==="U"){const a=r==="x"?2:r==="u"?4:8;t+=dn(n,s+1,a,e),s+=a}else{const a=n.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(i===" "||i===" "){const r=s;let o=n[s+1];for(;o===" "||o===" ";)o=n[++s+1];o!==`
93
- `&&!(o==="\r"&&n[s+2]===`
94
- `)&&(t+=s>r?n.slice(r,s+1):i)}else t+=i}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function fn(n,e){let t="",s=n[e+1];for(;(s===" "||s===" "||s===`
95
- `||s==="\r")&&!(s==="\r"&&n[e+2]!==`
96
- `);)s===`
97
- `&&(t+=`
98
- `),e+=1,s=n[e+1];return t||(t=" "),{fold:t,offset:e}}const hn={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
99
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function dn(n,e,t,s){const i=n.substr(e,t),r=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(r)}catch{const o=n.substr(e-2,t+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}}function ls(n,e,t,s){const{value:i,type:r,comment:o,range:a}=e.type==="block-scalar"?nn(n,e,s):an(e,n.options.strict,s),c=t?n.directives.tagName(t.source,u=>s(t,"TAG_RESOLVE_FAILED",u)):null;let l;n.options.stringKeys&&n.atKey?l=n.schema[D]:c?l=pn(n.schema,i,c,t,s):e.type==="scalar"?l=mn(n,i,e,s):l=n.schema[D];let d;try{const u=l.resolve(i,f=>s(t??e,"TAG_RESOLVE_FAILED",f),n.options);d=N(u)?u:new $(u)}catch(u){const f=u instanceof Error?u.message:String(u);s(t??e,"TAG_RESOLVE_FAILED",f),d=new $(i)}return d.range=a,d.source=i,r&&(d.type=r),c&&(d.tag=c),l.format&&(d.format=l.format),o&&(d.comment=o),d}function pn(n,e,t,s,i){if(t==="!")return n[D];const r=[];for(const a of n.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)r.push(a);else return a;for(const a of r)if(a.test?.test(e))return a;const o=n.knownTags[t];return o&&!o.collection?(n.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),n[D])}function mn({atKey:n,directives:e,schema:t},s,i,r){const o=t.tags.find(a=>(a.default===!0||n&&a.default==="key")&&a.test?.test(s))||t[D];if(t.compat){const a=t.compat.find(c=>c.default&&c.test?.test(s))??t[D];if(o.tag!==a.tag){const c=e.tagString(o.tag),l=e.tagString(a.tag),d=`Value may be parsed as either ${c} or ${l}`;r(i,"TAG_RESOLVE_FAILED",d,!0)}}return o}function gn(n,e,t){if(e){t??(t=e.length);for(let s=t-1;s>=0;--s){let i=e[s];switch(i.type){case"space":case"comment":case"newline":n-=i.source.length;continue}for(i=e[++s];i?.type==="space";)n+=i.source.length,i=e[++s];break}}return n}const yn={composeNode:us,composeEmptyNode:mt};function us(n,e,t,s){const i=n.atKey,{spaceBefore:r,comment:o,anchor:a,tag:c}=t;let l,d=!0;switch(e.type){case"alias":l=bn(n,e,s),(a||c)&&s(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":l=ls(n,e,c,s),a&&(l.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=sn(yn,n,e,t,s),a&&(l.anchor=a.source.substring(1))}catch(u){const f=u instanceof Error?u.message:String(u);s(e,"RESOURCE_EXHAUSTION",f)}break;default:{const u=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",u),d=!1}}return l??(l=mt(n,e.offset,void 0,null,t,s)),a&&l.anchor===""&&s(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&n.options.stringKeys&&(!N(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&s(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(l.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?l.comment=o:l.commentBefore=o),n.options.keepSourceTokens&&d&&(l.srcToken=e),l}function mt(n,e,t,s,{spaceBefore:i,comment:r,anchor:o,tag:a,end:c},l){const d={type:"scalar",offset:gn(e,t,s),indent:-1,source:""},u=ls(n,d,a,l);return o&&(u.anchor=o.source.substring(1),u.anchor===""&&l(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),r&&(u.comment=r,u.range[2]=c),u}function bn({options:n},{offset:e,source:t,end:s},i){const r=new nt(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+t.length,a=ve(s,o,n.strict,i);return r.range=[e,o,a.offset],a.comment&&(r.comment=a.comment),r}function wn(n,e,{offset:t,start:s,value:i,end:r},o){const a=Object.assign({_directives:e},n),c=new pt(void 0,a),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=ie(s,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?us(l,i,d,o):mt(l,d.end,s,null,d,o);const u=c.contents.range[2],f=ve(r,u,!1,o);return f.comment&&(c.comment=f.comment),c.range=[t,u,f.offset],c}function ue(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];const{offset:e,source:t}=n;return[e,e+(typeof t=="string"?t.length:1)]}function St(n){let e="",t=!1,s=!1;for(let i=0;i<n.length;++i){const r=n[i];switch(r[0]){case"#":e+=(e===""?"":s?`
100
-
101
- `:`
102
- `)+(r.substring(1)||" "),t=!0,s=!1;break;case"%":n[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(s=!0),t=!1}}return{comment:e,afterEmptyLine:s}}class fs{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,s,i,r)=>{const o=ue(t);r?this.warnings.push(new zs(o,s,i)):this.errors.push(new he(o,s,i))},this.directives=new te({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:i}=St(this.prelude);if(s){const r=e.contents;if(t)e.comment=e.comment?`${e.comment}
103
- ${s}`:s;else if(i||e.directives.docStart||!r)e.commentBefore=s;else if(A(r)&&!r.flow&&r.items.length>0){let o=r.items[0];T(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${s}
104
- ${a}`:s}else{const o=r.commentBefore;r.commentBefore=o?`${s}
105
- ${o}`:s}}if(t){for(let r=0;r<this.errors.length;++r)e.errors.push(this.errors[r]);for(let r=0;r<this.warnings.length;++r)e.warnings.push(this.warnings[r])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:St(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const i of e)yield*this.next(i);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,i)=>{const r=ue(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",s,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=wn(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":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new he(ue(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new he(ue(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const t=ve(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
106
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new he(ue(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){const s=Object.assign({_directives:this.directives},this.options),i=new pt(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}}const hs="\uFEFF",ds="",ps="",et="";function kn(n){switch(n){case hs:return"byte-order-mark";case ds:return"doc-mode";case ps:return"flow-error-end";case et:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
107
- `:case`\r
108
- `: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(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function j(n){switch(n){case void 0:case" ":case`
109
- `:case"\r":case" ":return!0;default:return!1}}const Et=new Set("0123456789ABCDEFabcdef"),vn=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ne=new Set(",[]{}"),$n=new Set(` ,[]{}
110
- \r `),Ge=n=>!n||$n.has(n);class Sn{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 s=this.next??"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
111
- `?!0:t==="\r"?this.buffer[e+1]===`
112
- `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;for(;t===" ";)t=this.buffer[++s+e];if(t==="\r"){const i=this.buffer[s+e+1];if(i===`
113
- `||!i&&!this.atEnd)return e+s+1}return t===`
114
- `||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if(t==="-"||t==="."){const s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&j(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(`
115
- `,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]===hs&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,s=e.indexOf("#");for(;s!==-1;){const r=e[s-1];if(r===" "||r===" "){t=s-1;break}else s=e.indexOf("#",s+1)}for(;;){const r=e[t-1];if(r===" "||r===" ")t-=1;else break}const i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield ds,yield*this.parseLineStart()}*parseLineStart(){const 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");const t=this.peek(3);if((t==="---"||t==="...")&&j(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&&!j(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&j(t)){const s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const 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(Ge),"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,s=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=s=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&i[0]!=="#"||s===0&&(i.startsWith("---")||i.startsWith("..."))&&j(i[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield ps,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Ge),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||j(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}const s=this.buffer.substring(0,t);let i=s.indexOf(`
116
- `,this.pos);if(i!==-1){for(;i!==-1;){const r=this.continueScalar(i+1);if(r===-1)break;i=s.indexOf(`
117
- `,r)}i!==-1&&(t=i-(s[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const 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=>j(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,s;e:for(let r=this.pos;s=this.buffer[r];++r)switch(s){case" ":t+=1;break;case`
118
- `:e=r,t=0;break;case"\r":{const o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
119
- `)break}default:break e}if(!s&&!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{const r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
120
- `,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(s=this.buffer[i];s===" ";)s=this.buffer[++i];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
121
- `;)s=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);const a=r;for(;o===" ";)o=this.buffer[--r];if(o===`
122
- `&&r>=this.pos&&r+1+t>a)e=r;else break}while(!0);return yield et,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,s=this.pos-1,i;for(;i=this.buffer[++s];)if(i===":"){const r=this.buffer[s+1];if(j(r)||e&&Ne.has(r))break;t=s}else if(j(i)){let r=this.buffer[s+1];if(i==="\r"&&(r===`
123
- `?(s+=1,i=`
124
- `,r=this.buffer[s+1]):t=s),r==="#"||e&&Ne.has(r))break;if(i===`
125
- `){const o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(e&&Ne.has(i))break;t=s}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield et,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){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.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(Ge),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{const t=this.flowLevel>0,s=this.charAt(1);if(j(s)||t&&Ne.has(s)){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(;!j(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(vn.has(t))t=this.buffer[++e];else if(t==="%"&&Et.has(this.buffer[e+1])&&Et.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
126
- `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
127
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,s;do s=this.buffer[++t];while(s===" "||e&&s===" ");const i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class En{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t<s;){const r=t+s>>1;this.lineStarts[r]<e?t=r+1:s=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}}function F(n,e){for(let t=0;t<n.length;++t)if(n[t].type===e)return!0;return!1}function Nt(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function ms(n){switch(n?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Oe(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function X(n){if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;n[++e]?.type==="space";);return n.splice(e,n.length)}function Be(n,e){if(e.length<1e5)Array.prototype.push.apply(n,e);else for(let t=0;t<e.length;++t)n.push(e[t])}function Ot(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!F(e.start,"explicit-key-ind")&&!F(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,ms(e.value)?e.value.end?Be(e.value.end,e.sep):e.value.end=e.sep:Be(e.start,e.sep),delete e.sep)}class gs{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 Sn,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=kn(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{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,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(){const 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){const 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{const s=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in s?s.indent:0:t.type==="flow-collection"&&s.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Ot(t),s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{const i=s.items[s.items.length-1];if(i.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{const i=s.items[s.items.length-1];i.value?s.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{const i=s.items[s.items.length-1];!i||i.value?s.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Nt(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(s.type==="document"?s.end=i.start:s.items.push({start:i.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const 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":{Nt(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}const 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"){const t=Oe(this.peek(2)),s=X(t);let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
128
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
129
- `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const s="end"in t.value?t.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.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)){const s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Be(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const s=!this.onKeyLine&&this.indent===e.indent,i=s&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let r=[];if(i&&t.sep&&!t.value){const o=[];for(let a=0;a<t.sep.length;++a){const c=t.sep[a];switch(c.type){case"newline":o.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(F(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(ms(t.key)&&!F(t.sep,"newline")){const o=X(t.start),a=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:c}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(F(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const o=X(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):F(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":{const o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!F(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 s&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const s="end"in t.value?t.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.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)){const s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Be(s,t.start),s.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||F(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.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":{const i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const i=Oe(s),r=X(i);Ot(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
130
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
131
- `,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;const t=Oe(e),s=X(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Oe(e),s=X(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function ys(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new En||null,prettyErrors:e}}function Bn(n,e={}){const{lineCounter:t,prettyErrors:s}=ys(e),i=new gs(t?.addNewLine),r=new fs(e),o=Array.from(r.compose(i.parse(n)));if(s&&t)for(const a of o)a.errors.forEach(_e(n,t)),a.warnings.forEach(_e(n,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function Nn(n,e={}){const{lineCounter:t,prettyErrors:s}=ys(e),i=new gs(t?.addNewLine),r=new fs(e);let o=null;for(const a of r.compose(i.parse(n),!0,n.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new he(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(o.errors.forEach(_e(n,t)),o.warnings.forEach(_e(n,t))),o}function Kn(n,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);const i=Nn(n,t);if(!i)return null;if(i.warnings.forEach(r=>jt(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:s},t))}function jn(n,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(n===void 0){const{keepUndefined:i}=t??e??{};if(!i)return}return ye(n)&&!s?n.toString(t):new pt(n,s,t).toString(t)}export{Kn as E,jn as L,Nn as a,Bn as h};
@@ -1,11 +0,0 @@
1
- import{createRequire as co}from"node:module";let fo;const go=e=>(fo??=co(import.meta.url))(e),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mo=e=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[t,o]=be.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return be.getBuiltinModule(e)}return go(e)},{createRequire:ho}=mo("node:module");let bo;const vo=e=>(bo??=ho(import.meta.url))(e),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zt=e=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[t,o]=me.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return me.getBuiltinModule(e)}return vo(e)},{homedir:yo,tmpdir:gt}=Zt("node:os"),{env:ot,cwd:xo,platform:wt}=me,{createRequire:k}=Zt("node:module"),Ao=0,Yt=2,Ro=Symbol("findUpStop"),_o=/^[A-Z]:\//i,st=(e="")=>e&&e.replaceAll("\\","/").replace(_o,t=>t.toUpperCase()),Eo=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,To=/^[A-Z]:$/i,Co=/.(\.[^./]+)$/,So=/^[/\\]|^[a-z]:[/\\]/i,$o=/\/$/,wo=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",ko=(e,t)=>{let o="",c=0,p=-1,r=0,i;for(let l=0;l<=e.length;++l){if(l<e.length)i=e[l];else{if(i==="/")break;i="/"}if(i==="/"){if(!(p===l-1||r===1))if(r===2){if(o.length<2||c!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const f=o.lastIndexOf("/");f===-1?(o="",c=0):(o=o.slice(0,f),c=o.length-1-o.lastIndexOf("/")),p=l,r=0;continue}else if(o.length>0){o="",c=0,p=l,r=0;continue}}t&&(o+=o.length>0?"/..":"..",c=2)}else o.length>0?o+=`/${e.slice(p+1,l)}`:o=e.slice(p+1,l),c=l-p-1;p=l,r=0}else i==="."&&r!==-1?++r:r=-1}return o},rt=e=>Eo.test(e),dt=function(...e){e=e.map(c=>st(c));let t="",o=!1;for(let c=e.length-1;c>=-1&&!o;c--){const p=c>=0?e[c]:wo();!p||p.length===0||(t=`${p}/${t}`,o=rt(p))}return t=ko(t,!o),o&&!rt(t)?`/${t}`:t.length>0?t:"."},Oo=function(e){return Co.exec(st(e))?.[1]??""},Vt=e=>{const t=st(e).replace($o,""),o=t.lastIndexOf("/");if(o===-1)return rt(e)?"/":".";const c=t.slice(0,o);return To.test(c)?`${c}/`:c||(rt(e)?"/":".")},Ho=(e,t)=>{const o=st(e);return o.slice(o.lastIndexOf("/")+1)},No=function(e){const t=So.exec(e)?.[0]?.replaceAll("\\","/")??"",o=Ho(e),c=Oo(o);return{base:o,dir:Vt(e),ext:c,name:o.slice(0,o.length-c.length),root:t}},Lo=k(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bo=e=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[t,o]=ve.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ve.getBuiltinModule(e)}return Lo(e)},{fileURLToPath:Mo}=Bo("node:url");function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kt,Ot;function Do(){return Ot||(Ot=1,kt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),kt}var Go=Do();const zo=Io(Go);new Set(zo);const lt=e=>st(e instanceof URL?Mo(e):e),Jt=e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},Po=k(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Uo=e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,o]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ye.getBuiltinModule(e)}return Po(e)};Uo("node:fs/promises");const jo=k(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fo=e=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[t,o]=xe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return xe.getBuiltinModule(e)}return jo(e)};Fo("node:fs");const Ht=e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},Ko=k(import.meta.url),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xo=e=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[t,o]=Ae.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ae.getBuiltinModule(e)}return Ko(e)};Xo("node:fs/promises");const Wo=k(import.meta.url),Re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Qo=e=>{if(typeof Re<"u"&&Re.versions&&Re.versions.node){const[t,o]=Re.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Re.getBuiltinModule(e)}return Wo(e)},{lstatSync:Nt,mkdirSync:qo}=Qo("node:fs"),_e=e=>{Jt(e);try{const t=Nt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ht(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{qo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const o=Nt(e);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ht(o))}'`,{cause:t})}},Zo=k(import.meta.url),Ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yo=e=>{if(typeof Ee<"u"&&Ee.versions&&Ee.versions.node){const[t,o]=Ee.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ee.getBuiltinModule(e)}return Zo(e)};Yo("node:fs/promises");const Vo=k(import.meta.url),Te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jo=e=>{if(typeof Te<"u"&&Te.versions&&Te.versions.node){const[t,o]=Te.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Te.getBuiltinModule(e)}return Vo(e)};Jo("node:fs");const er=k(import.meta.url),Ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tr=e=>{if(typeof Ce<"u"&&Ce.versions&&Ce.versions.node){const[t,o]=Ce.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ce.getBuiltinModule(e)}return er(e)};tr("node:fs/promises");const or=k(import.meta.url),Se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rr=e=>{if(typeof Se<"u"&&Se.versions&&Se.versions.node){const[t,o]=Se.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Se.getBuiltinModule(e)}return or(e)};rr("node:fs");const sr=k(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nr=e=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[t,o]=$e.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return $e.getBuiltinModule(e)}return sr(e)};nr("node:fs/promises");const ur=k(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ir=e=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[t,o]=we.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return we.getBuiltinModule(e)}return ur(e)};ir("node:fs");k(import.meta.url);const ar=k(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lr=e=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[t,o]=ke.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ke.getBuiltinModule(e)}return ar(e)};lr("node:fs/promises");const pr=k(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,cr=e=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[t,o]=Oe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Oe.getBuiltinModule(e)}return pr(e)};cr("node:fs");const fr=k(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gr=e=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[t,o]=He.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return He.getBuiltinModule(e)}return fr(e)};gr("node:fs/promises");const dr=k(import.meta.url),Ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mr=e=>{if(typeof Ne<"u"&&Ne.versions&&Ne.versions.node){const[t,o]=Ne.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ne.getBuiltinModule(e)}return dr(e)},{statSync:hr,lstatSync:br}=mr("node:fs"),vr=(e,t={})=>{const o=t.cwd?lt(t.cwd):process.cwd();let c=dt(o);const{root:p}=No(c),r=lt(t.stopAt??p),i=dt(c,r),l=t.type??"file",f=function(d){return[e]};t.allowSymlinks??=!0;const x=t.allowSymlinks?hr:br;for(;c&&c!==i&&c!==p;){for(let d of f()){if(d===Ro)return;if(d===void 0)continue;Buffer.isBuffer(d)?d=d.toString():d instanceof URL&&(d=lt(d));const T=rt(d)?d:dt(c,d);try{const C=x(T);if(l==="file"&&C.isFile()||l==="directory"&&C.isDirectory())return T}catch{}}c=Vt(c)}};function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lt={},mt,Bt;function ct(){if(Bt)return mt;Bt=1;const e="[^\\\\/]",t=Symbol("unignore"),o="\\.",c="\\+",p="\\?",r="\\/",i="(?=.)",l="[^/]",f=`(?:${r}|$)`,x=`(?:^|${r})`,d=`${o}{1,2}${f}`,T=`(?!${o})`,C=`(?!${x}${d})`,_=`(?!${o}{0,1}${f})`,B=`(?!${d})`,te=`[^.${r}]`,q=`${l}*?`,K="/",m={DOT_LITERAL:o,PLUS_LITERAL:c,QMARK_LITERAL:p,SLASH_LITERAL:r,ONE_CHAR:i,QMARK:l,END_ANCHOR:f,DOTS_SLASH:d,NO_DOT:T,NO_DOTS:C,NO_DOT_SLASH:_,NO_DOTS_SLASH:B,QMARK_NO_DOT:te,STAR:q,START_ANCHOR:x,SEP:K},b={...m,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${o}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[\\\\/])${o}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},s={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return mt={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:s,UNIGNORE:t,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(v){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${v.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(v){return v===!0?b:m}},mt}var Mt;function ft(){return Mt||(Mt=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_GLOBAL:p}=ct();e.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e.hasRegexChars=r=>c.test(r),e.isRegexChar=r=>r.length===1&&e.hasRegexChars(r),e.escapeRegex=r=>r.replace(p,"\\$1"),e.toPosixSlashes=r=>r.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const r=navigator.platform.toLowerCase();return r==="win32"||r==="windows"}return process.platform?process.platform==="win32":!1},e.removeBackslashes=r=>r.replace(o,i=>i==="\\"?"":i),e.escapeLast=(r,i,l)=>{const f=r.lastIndexOf(i,l);return f===-1?r:r[f-1]==="\\"?e.escapeLast(r,i,f-1):`${r.slice(0,f)}\\${r.slice(f)}`},e.removePrefix=(r,i={})=>{let l=r;return l.startsWith("./")&&(l=l.slice(2),i.prefix="./"),l},e.wrapOutput=(r,i={},l={})=>{const f=l.contains?"":"^",x=l.contains?"":"$";let d=`${f}(?:${r})${x}`;return i.negated===!0&&(d=`(?:^(?!${d}).*$)`),d},e.basename=(r,{windows:i}={})=>{const l=r.split(i?/[\\/]/:"/"),f=l[l.length-1];return f===""?l[l.length-2]:f}})(Lt)),Lt}var ht,It;function yr(){if(It)return ht;It=1;const e=ft(),{CHAR_ASTERISK:t,CHAR_AT:o,CHAR_BACKWARD_SLASH:c,CHAR_COMMA:p,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:f,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:T,CHAR_QUESTION_MARK:C,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:B,CHAR_RIGHT_SQUARE_BRACKET:te}=ct(),q=m=>m===l||m===c,K=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return ht=(m,b)=>{const s=b||{},v=m.length-1,A=s.parts===!0||s.scanToEnd===!0,R=[],y=[],O=[];let X=m,Z=-1,P=0,re=0,W=!1,se=!1,I=!1,le=!1,ge=!1,ne=!1,L=!1,ue=!1,de=!1,Q=!1,F=0,V,E,w={value:"",depth:0,isGlob:!1};const a=()=>Z>=v,Y=()=>X.charCodeAt(Z+1),U=()=>(V=E,X.charCodeAt(++Z));for(;Z<v;){E=U();let H;if(E===c){L=w.backslashes=!0,E=U(),E===f&&(ne=!0);continue}if(ne===!0||E===f){for(F++;a()!==!0&&(E=U());){if(E===c){L=w.backslashes=!0,U();continue}if(E===f){F++;continue}if(ne!==!0&&E===r&&(E=U())===r){if(W=w.isBrace=!0,I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(ne!==!0&&E===p){if(W=w.isBrace=!0,I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(E===_&&(F--,F===0)){ne=!1,W=w.isBrace=!0,Q=!0;break}}if(A===!0)continue;break}if(E===l){if(R.push(Z),y.push(w),w={value:"",depth:0,isGlob:!1},Q===!0)continue;if(V===r&&Z===P+1){P+=2;continue}re=Z+1;continue}if(s.noext!==!0&&(E===T||E===o||E===t||E===C||E===i)&&Y()===x){if(I=w.isGlob=!0,le=w.isExtglob=!0,Q=!0,E===i&&Z===P&&(de=!0),A===!0){for(;a()!==!0&&(E=U());){if(E===c){L=w.backslashes=!0,E=U();continue}if(E===B){I=w.isGlob=!0,Q=!0;break}}continue}break}if(E===t){if(V===t&&(ge=w.isGlobstar=!0),I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(E===C){if(I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(E===d){for(;a()!==!0&&(H=U());){if(H===c){L=w.backslashes=!0,U();continue}if(H===te){se=w.isBracket=!0,I=w.isGlob=!0,Q=!0;break}}if(A===!0)continue;break}if(s.nonegate!==!0&&E===i&&Z===P){ue=w.negated=!0,P++;continue}if(s.noparen!==!0&&E===x){if(I=w.isGlob=!0,A===!0){for(;a()!==!0&&(E=U());){if(E===x){L=w.backslashes=!0,E=U();continue}if(E===B){Q=!0;break}}continue}break}if(I===!0){if(Q=!0,A===!0)continue;break}}s.noext===!0&&(le=!1,I=!1);let z=X,n="",u="";P>0&&(n=X.slice(0,P),X=X.slice(P),re-=P),z&&I===!0&&re>0?(z=X.slice(0,re),u=X.slice(re)):I===!0?(z="",u=X):z=X,z&&z!==""&&z!=="/"&&z!==X&&q(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),s.unescape===!0&&(u&&(u=e.removeBackslashes(u)),z&&L===!0&&(z=e.removeBackslashes(z)));const ee={prefix:n,input:m,start:P,base:z,glob:u,isBrace:W,isBracket:se,isGlob:I,isExtglob:le,isGlobstar:ge,negated:ue,negatedExtglob:de};if(s.tokens===!0&&(ee.maxDepth=0,q(E)||y.push(w),ee.tokens=y),s.parts===!0||s.tokens===!0){let H;for(let D=0;D<R.length;D++){const pe=H?H+1:P,J=R[D],ce=m.slice(pe,J);s.tokens&&(D===0&&P!==0?(y[D].isPrefix=!0,y[D].value=n):y[D].value=ce,K(y[D]),ee.maxDepth+=y[D].depth),(D!==0||ce!=="")&&O.push(ce),H=J}if(H&&H+1<m.length){const D=m.slice(H+1);O.push(D),s.tokens&&(y[y.length-1].value=D,K(y[y.length-1]),ee.maxDepth+=y[y.length-1].depth)}ee.slashes=R,ee.parts=O}return ee},ht}var bt,Dt;function xr(){if(Dt)return bt;Dt=1;const e=ct(),t=ft(),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:c,REGEX_NON_SPECIAL_CHARS:p,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:i}=e,l=(m,b)=>typeof b.expandRange=="function"?b.expandRange(...m,b):(m.sort(),`[${m.join("-")}]`),f=(m,b)=>`Missing ${m}: "${b}" - use "\\\\${b}" to match literal characters`,x=m=>{const b=[];let s=0,v=0,A=0,R="",y=!1;for(const O of m){if(y===!0){R+=O,y=!1;continue}if(O==="\\"){R+=O,y=!0;continue}if(O==='"'){A=A===1?0:1,R+=O;continue}if(A===0){if(O==="[")s++;else if(O==="]"&&s>0)s--;else if(s===0){if(O==="(")v++;else if(O===")"&&v>0)v--;else if(O==="|"&&v===0){b.push(R),R="";continue}}}R+=O}return b.push(R),b},d=m=>{let b=!1;for(const s of m){if(b===!0){b=!1;continue}if(s==="\\"){b=!0;continue}if(/[?*+@!()[\]{}]/.test(s))return!1}return!0},T=m=>{let b=m.trim(),s=!0;for(;s===!0;)s=!1,/^@\([^\\()[\]{}|]+\)$/.test(b)&&(b=b.slice(2,-1),s=!0);if(d(b))return b.replace(/\\(.)/g,"$1")},C=m=>{const b=m.map(T).filter(Boolean);for(let s=0;s<b.length;s++)for(let v=s+1;v<b.length;v++){const A=b[s],R=b[v],y=A[0];if(!(!y||A!==y.repeat(A.length)||R!==y.repeat(R.length))&&(A===R||A.startsWith(R)||R.startsWith(A)))return!0}return!1},_=(m,b=!0)=>{if(m[0]!=="+"&&m[0]!=="*"||m[1]!=="(")return;let s=0,v=0,A=0,R=!1;for(let y=1;y<m.length;y++){const O=m[y];if(R===!0){R=!1;continue}if(O==="\\"){R=!0;continue}if(O==='"'){A=A===1?0:1;continue}if(A!==1){if(O==="["){s++;continue}if(O==="]"&&s>0){s--;continue}if(!(s>0)){if(O==="("){v++;continue}if(O===")"&&(v--,v===0))return b===!0&&y!==m.length-1?void 0:{type:m[0],body:m.slice(2,y),end:y}}}}},B=m=>{let b=0;const s=[];for(;b<m.length;){const v=_(m.slice(b),!1);if(!v||v.type!=="*")return;const A=x(v.body).map(y=>y.trim());if(A.length!==1)return;const R=T(A[0]);if(!R||R.length!==1)return;s.push(R),b+=v.end+1}return s.length<1?void 0:`${s.length===1?t.escapeRegex(s[0]):`[${s.map(v=>t.escapeRegex(v)).join("")}]`}*`},te=m=>{let b=0,s=m.trim(),v=_(s);for(;v;)b++,s=v.body.trim(),v=_(s);return b},q=(m,b)=>{if(b.maxExtglobRecursion===!1)return{risky:!1};const s=typeof b.maxExtglobRecursion=="number"?b.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,v=x(m).map(A=>A.trim());if(v.length>1&&(v.some(A=>A==="")||v.some(A=>/^[*?]+$/.test(A))||C(v)))return{risky:!0};for(const A of v){const R=B(A);if(R)return{risky:!0,safeOutput:R};if(te(A)>s)return{risky:!0}}return{risky:!1}},K=(m,b)=>{if(typeof m!="string")throw new TypeError("Expected a string");m=i[m]||m;const s={...b},v=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o;let A=m.length;if(A>v)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${v}`);const R={type:"bos",value:"",output:s.prepend||""},y=[R],O=s.capture?"":"?:",X=e.globChars(s.windows),Z=e.extglobChars(X),{DOT_LITERAL:P,PLUS_LITERAL:re,SLASH_LITERAL:W,ONE_CHAR:se,DOTS_SLASH:I,NO_DOT:le,NO_DOT_SLASH:ge,NO_DOTS_SLASH:ne,QMARK:L,QMARK_NO_DOT:ue,STAR:de,START_ANCHOR:Q}=X,F=h=>`(${O}(?:(?!${Q}${h.dot?I:P}).)*?)`,V=s.dot?"":le,E=s.dot?L:ue;let w=s.bash===!0?F(s):de;s.capture&&(w=`(${w})`),typeof s.noext=="boolean"&&(s.noextglob=s.noext);const a={input:m,index:-1,start:0,dot:s.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};m=t.removePrefix(m,a),A=m.length;const Y=[],U=[],z=[];let n=R,u;const ee=()=>a.index===A-1,H=a.peek=(h=1)=>m[a.index+h],D=a.advance=()=>m[++a.index]||"",pe=()=>m.slice(a.index+1),J=(h="",M=0)=>{a.consumed+=h,a.index+=M},ce=h=>{a.output+=h.output!=null?h.output:h.value,J(h.value)},lo=()=>{let h=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)D(),a.start++,h++;return h%2===0?!1:(a.negated=!0,a.start++,!0)},it=h=>{a[h]++,z.push(h)},fe=h=>{a[h]--,z.pop()},S=h=>{if(n.type==="globstar"){const M=a.braces>0&&(h.type==="comma"||h.type==="brace"),g=h.extglob===!0||Y.length&&(h.type==="pipe"||h.type==="paren");h.type!=="slash"&&h.type!=="paren"&&!M&&!g&&(a.output=a.output.slice(0,-n.output.length),n.type="star",n.value="*",n.output=w,a.output+=n.output)}if(Y.length&&h.type!=="paren"&&(Y[Y.length-1].inner+=h.value),(h.value||h.output)&&ce(h),n&&n.type==="text"&&h.type==="text"){n.output=(n.output||n.value)+h.value,n.value+=h.value;return}h.prev=n,y.push(h),n=h},at=(h,M)=>{const g={...Z[M],conditions:1,inner:""};g.prev=n,g.parens=a.parens,g.output=a.output,g.startIndex=a.index,g.tokensIndex=y.length;const $=(s.capture?"(":"")+g.open;it("parens"),S({type:h,value:M,output:a.output?"":se}),S({type:"paren",extglob:!0,value:D(),output:$}),Y.push(g)},po=h=>{const M=m.slice(h.startIndex,a.index+1),g=m.slice(h.startIndex+2,a.index),$=q(g,s);if((h.type==="plus"||h.type==="star")&&$.risky){const N=$.safeOutput?(h.output?"":se)+(s.capture?`(${$.safeOutput})`:$.safeOutput):void 0,ie=y[h.tokensIndex];ie.type="text",ie.value=M,ie.output=N||t.escapeRegex(M);for(let ae=h.tokensIndex+1;ae<y.length;ae++)y[ae].value="",y[ae].output="",delete y[ae].suffix;a.output=h.output+ie.output,a.backtrack=!0,S({type:"paren",extglob:!0,value:u,output:""}),fe("parens");return}let G=h.close+(s.capture?")":""),j;if(h.type==="negate"){let N=w;if(h.inner&&h.inner.length>1&&h.inner.includes("/")&&(N=F(s)),(N!==w||ee()||/^\)+$/.test(pe()))&&(G=h.close=`)$))${N}`),h.inner.includes("*")&&(j=pe())&&/^\.[^\\/.]+$/.test(j)){const ie=K(j,{...b,fastpaths:!1}).output;G=h.close=`)${ie})${N})`}h.prev.type==="bos"&&(a.negatedExtglob=!0)}S({type:"paren",extglob:!0,value:u,output:G}),fe("parens")};if(s.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(m)){let h=!1,M=m.replace(r,(g,$,G,j,N,ie)=>j==="\\"?(h=!0,g):j==="?"?$?$+j+(N?L.repeat(N.length):""):ie===0?E+(N?L.repeat(N.length):""):L.repeat(G.length):j==="."?P.repeat(G.length):j==="*"?$?$+j+(N?w:""):w:$?g:`\\${g}`);return h===!0&&(s.unescape===!0?M=M.replace(/\\/g,""):M=M.replace(/\\+/g,g=>g.length%2===0?"\\\\":g?"\\":"")),M===m&&s.contains===!0?(a.output=m,a):(a.output=t.wrapOutput(M,a,b),a)}for(;!ee();){if(u=D(),u==="\0")continue;if(u==="\\"){const g=H();if(g==="/"&&s.bash!==!0||g==="."||g===";")continue;if(!g){u+="\\",S({type:"text",value:u});continue}const $=/^\\+/.exec(pe());let G=0;if($&&$[0].length>2&&(G=$[0].length,a.index+=G,G%2!==0&&(u+="\\")),s.unescape===!0?u=D():u+=D(),a.brackets===0){S({type:"text",value:u});continue}}if(a.brackets>0&&(u!=="]"||n.value==="["||n.value==="[^")){if(s.posix!==!1&&u===":"){const g=n.value.slice(1);if(g.includes("[")&&(n.posix=!0,g.includes(":"))){const $=n.value.lastIndexOf("["),G=n.value.slice(0,$),j=n.value.slice($+2),N=c[j];if(N){n.value=G+N,a.backtrack=!0,D(),!R.output&&y.indexOf(n)===1&&(R.output=se);continue}}}(u==="["&&H()!==":"||u==="-"&&H()==="]")&&(u=`\\${u}`),u==="]"&&(n.value==="["||n.value==="[^")&&(u=`\\${u}`),s.posix===!0&&u==="!"&&n.value==="["&&(u="^"),n.value+=u,ce({value:u});continue}if(a.quotes===1&&u!=='"'){u=t.escapeRegex(u),n.value+=u,ce({value:u});continue}if(u==='"'){a.quotes=a.quotes===1?0:1,s.keepQuotes===!0&&S({type:"text",value:u});continue}if(u==="("){it("parens"),S({type:"paren",value:u});continue}if(u===")"){if(a.parens===0&&s.strictBrackets===!0)throw new SyntaxError(f("opening","("));const g=Y[Y.length-1];if(g&&a.parens===g.parens+1){po(Y.pop());continue}S({type:"paren",value:u,output:a.parens?")":"\\)"}),fe("parens");continue}if(u==="["){if(s.nobracket===!0||!pe().includes("]")){if(s.nobracket!==!0&&s.strictBrackets===!0)throw new SyntaxError(f("closing","]"));u=`\\${u}`}else it("brackets");S({type:"bracket",value:u});continue}if(u==="]"){if(s.nobracket===!0||n&&n.type==="bracket"&&n.value.length===1){S({type:"text",value:u,output:`\\${u}`});continue}if(a.brackets===0){if(s.strictBrackets===!0)throw new SyntaxError(f("opening","["));S({type:"text",value:u,output:`\\${u}`});continue}fe("brackets");const g=n.value.slice(1);if(n.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(u=`/${u}`),n.value+=u,ce({value:u}),s.literalBrackets===!1||t.hasRegexChars(g))continue;const $=t.escapeRegex(n.value);if(a.output=a.output.slice(0,-n.value.length),s.literalBrackets===!0){a.output+=$,n.value=$;continue}n.value=`(${O}${$}|${n.value})`,a.output+=n.value;continue}if(u==="{"&&s.nobrace!==!0){it("braces");const g={type:"brace",value:u,output:"(",outputIndex:a.output.length,tokensIndex:a.tokens.length};U.push(g),S(g);continue}if(u==="}"){const g=U[U.length-1];if(s.nobrace===!0||!g){S({type:"text",value:u,output:u});continue}let $=")";if(g.dots===!0){const G=y.slice(),j=[];for(let N=G.length-1;N>=0&&(y.pop(),G[N].type!=="brace");N--)G[N].type!=="dots"&&j.unshift(G[N].value);$=l(j,s),a.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const G=a.output.slice(0,g.outputIndex),j=a.tokens.slice(g.tokensIndex);g.value=g.output="\\{",u=$="\\}",a.output=G;for(const N of j)a.output+=N.output||N.value}S({type:"brace",value:u,output:$}),fe("braces"),U.pop();continue}if(u==="|"){Y.length>0&&Y[Y.length-1].conditions++,S({type:"text",value:u});continue}if(u===","){let g=u;const $=U[U.length-1];$&&z[z.length-1]==="braces"&&($.comma=!0,g="|"),S({type:"comma",value:u,output:g});continue}if(u==="/"){if(n.type==="dot"&&a.index===a.start+1){a.start=a.index+1,a.consumed="",a.output="",y.pop(),n=R;continue}S({type:"slash",value:u,output:W});continue}if(u==="."){if(a.braces>0&&n.type==="dot"){n.value==="."&&(n.output=P);const g=U[U.length-1];n.type="dots",n.output+=u,n.value+=u,g.dots=!0;continue}if(a.braces+a.parens===0&&n.type!=="bos"&&n.type!=="slash"){S({type:"text",value:u,output:P});continue}S({type:"dot",value:u,output:P});continue}if(u==="?"){if(!(n&&n.value==="(")&&s.noextglob!==!0&&H()==="("&&H(2)!=="?"){at("qmark",u);continue}if(n&&n.type==="paren"){const g=H();let $=u;(n.value==="("&&!/[!=<:]/.test(g)||g==="<"&&!/<([!=]|\w+>)/.test(pe()))&&($=`\\${u}`),S({type:"text",value:u,output:$});continue}if(s.dot!==!0&&(n.type==="slash"||n.type==="bos")){S({type:"qmark",value:u,output:ue});continue}S({type:"qmark",value:u,output:L});continue}if(u==="!"){if(s.noextglob!==!0&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){at("negate",u);continue}if(s.nonegate!==!0&&a.index===0){lo();continue}}if(u==="+"){if(s.noextglob!==!0&&H()==="("&&H(2)!=="?"){at("plus",u);continue}if(n&&n.value==="("||s.regex===!1){S({type:"plus",value:u,output:re});continue}if(n&&(n.type==="bracket"||n.type==="paren"||n.type==="brace")||a.parens>0){S({type:"plus",value:u});continue}S({type:"plus",value:re});continue}if(u==="@"){if(s.noextglob!==!0&&H()==="("&&H(2)!=="?"){S({type:"at",extglob:!0,value:u,output:""});continue}S({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);const g=p.exec(pe());g&&(u+=g[0],a.index+=g[0].length),S({type:"text",value:u});continue}if(n&&(n.type==="globstar"||n.star===!0)){n.type="star",n.star=!0,n.value+=u,n.output=w,a.backtrack=!0,a.globstar=!0,J(u);continue}let h=pe();if(s.noextglob!==!0&&/^\([^?]/.test(h)){at("star",u);continue}if(n.type==="star"){if(s.noglobstar===!0){J(u);continue}const g=n.prev,$=g.prev,G=g.type==="slash"||g.type==="bos",j=$&&($.type==="star"||$.type==="globstar");if(s.bash===!0&&(!G||h[0]&&h[0]!=="/")){S({type:"star",value:u,output:""});continue}const N=a.braces>0&&(g.type==="comma"||g.type==="brace"),ie=Y.length&&(g.type==="pipe"||g.type==="paren");if(!G&&g.type!=="paren"&&!N&&!ie){S({type:"star",value:u,output:""});continue}for(;h.slice(0,3)==="/**";){const ae=m[a.index+4];if(ae&&ae!=="/")break;h=h.slice(3),J("/**",3)}if(g.type==="bos"&&ee()){n.type="globstar",n.value+=u,n.output=F(s),a.output=n.output,a.globstar=!0,J(u);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!j&&ee()){a.output=a.output.slice(0,-(g.output+n.output).length),g.output=`(?:${g.output}`,n.type="globstar",n.output=F(s)+(s.strictSlashes?")":"|$)"),n.value+=u,a.globstar=!0,a.output+=g.output+n.output,J(u);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&h[0]==="/"){const ae=h[1]!==void 0?"|$":"";a.output=a.output.slice(0,-(g.output+n.output).length),g.output=`(?:${g.output}`,n.type="globstar",n.output=`${F(s)}${W}|${W}${ae})`,n.value+=u,a.output+=g.output+n.output,a.globstar=!0,J(u+D()),S({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&h[0]==="/"){n.type="globstar",n.value+=u,n.output=`(?:^|${W}|${F(s)}${W})`,a.output=n.output,a.globstar=!0,J(u+D()),S({type:"slash",value:"/",output:""});continue}if(N&&h[0]==="/"){n.type="globstar",n.value+=u,n.output=`(?:^|${W}|${F(s)}${W})`,a.output+=n.output,a.globstar=!0,J(u+D()),S({type:"slash",value:"/",output:""});continue}a.output=a.output.slice(0,-n.output.length),n.type="globstar",n.output=F(s),n.value+=u,a.output+=n.output,a.globstar=!0,J(u);continue}const M={type:"star",value:u,output:w};if(s.bash===!0){M.output=".*?",(n.type==="bos"||n.type==="slash")&&(M.output=V+M.output),S(M);continue}if(n&&(n.type==="bracket"||n.type==="paren")&&s.regex===!0){M.output=u,S(M);continue}(a.index===a.start||n.type==="slash"||n.type==="dot")&&(n.type==="dot"?(a.output+=ge,n.output+=ge):s.dot===!0?(a.output+=ne,n.output+=ne):(a.output+=V,n.output+=V),H()!=="*"&&(a.output+=se,n.output+=se)),S(M)}for(;a.brackets>0;){if(s.strictBrackets===!0)throw new SyntaxError(f("closing","]"));a.output=t.escapeLast(a.output,"["),fe("brackets")}for(;a.parens>0;){if(s.strictBrackets===!0)throw new SyntaxError(f("closing",")"));a.output=t.escapeLast(a.output,"("),fe("parens")}for(;a.braces>0;){if(s.strictBrackets===!0)throw new SyntaxError(f("closing","}"));a.output=t.escapeLast(a.output,"{"),fe("braces")}if(s.strictSlashes!==!0&&(n.type==="star"||n.type==="bracket")&&S({type:"maybe_slash",value:"",output:`${W}?`}),a.backtrack===!0){a.output="";for(const h of a.tokens)a.output+=h.output!=null?h.output:h.value,h.suffix&&(a.output+=h.suffix)}return a};return K.fastpaths=(m,b)=>{const s={...b},v=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o,A=m.length;if(A>v)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${v}`);m=i[m]||m;const{DOT_LITERAL:R,SLASH_LITERAL:y,ONE_CHAR:O,DOTS_SLASH:X,NO_DOT:Z,NO_DOTS:P,NO_DOTS_SLASH:re,STAR:W,START_ANCHOR:se}=e.globChars(s.windows),I=s.dot?P:Z,le=s.dot?re:Z,ge=s.capture?"":"?:",ne={negated:!1,prefix:""};let L=s.bash===!0?".*?":W;s.capture&&(L=`(${L})`);const ue=V=>V.noglobstar===!0?L:`(${ge}(?:(?!${se}${V.dot?X:R}).)*?)`,de=V=>{switch(V){case"*":return`${I}${O}${L}`;case".*":return`${R}${O}${L}`;case"*.*":return`${I}${L}${R}${O}${L}`;case"*/*":return`${I}${L}${y}${O}${le}${L}`;case"**":return I+ue(s);case"**/*":return`(?:${I}${ue(s)}${y})?${le}${O}${L}`;case"**/*.*":return`(?:${I}${ue(s)}${y})?${le}${L}${R}${O}${L}`;case"**/.*":return`(?:${I}${ue(s)}${y})?${R}${O}${L}`;default:{const E=/^(.*?)\.(\w+)$/.exec(V);if(!E)return;const w=de(E[1]);return w?w+R+E[2]:void 0}}},Q=t.removePrefix(m,ne);let F=de(Q);return F&&s.strictSlashes!==!0&&(F+=`${y}?`),F},bt=K,bt}var vt,Gt;function Ar(){if(Gt)return vt;Gt=1;const e=yr(),t=xr(),o=ft(),c=ct(),p=i=>i&&typeof i=="object"&&!Array.isArray(i),r=(i,l,f=!1)=>{if(Array.isArray(i)){const q=i.map(K=>r(K,l,f));return K=>{for(const m of q){const b=m(K);if(b)return b}return!1}}const x=p(i)&&i.tokens&&i.input;if(i===""||typeof i!="string"&&!x)throw new TypeError("Expected pattern to be a non-empty string");const d=l||{},T=d.windows,C=x?r.compileRe(i,l):r.makeRe(i,l,!1,!0),_=C.state;delete C.state;let B=()=>!1;if(d.ignore){const q={...l,ignore:null,onMatch:null,onResult:null};B=r(d.ignore,q,f)}const te=(q,K=!1)=>{const{isMatch:m,match:b,output:s}=r.test(q,C,l,{glob:i,posix:T}),v={glob:i,state:_,regex:C,posix:T,input:q,output:s,match:b,isMatch:m};if(typeof d.onResult=="function"&&d.onResult(v),m===!1)return v.isMatch=!1,K?v:!1;e:if(B(q)){if(typeof d.onIgnore=="function"&&d.onIgnore(v)===c.UNIGNORE){v.isMatch=!0;break e}return v.isMatch=!1,K?v:!1}return typeof d.onMatch=="function"&&d.onMatch(v),K?v:!0};return f&&(te.state=_),te};return r.test=(i,l,f,{glob:x,posix:d}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const T=f||{},C=T.format||(d?o.toPosixSlashes:null);let _=i===x,B=_&&C?C(i):i;return _===!1&&(B=C?C(i):i,_=B===x),(_===!1||T.capture===!0)&&(T.matchBase===!0||T.basename===!0?_=r.matchBase(i,l,f,d):_=l.exec(B)),{isMatch:!!_,match:_,output:B}},r.matchBase=(i,l,f)=>(l instanceof RegExp?l:r.makeRe(l,f)).test(o.basename(i)),r.isMatch=(i,l,f)=>r(l,f)(i),r.parse=(i,l)=>Array.isArray(i)?i.map(f=>r.parse(f,l)):t(i,{...l,fastpaths:!1}),r.scan=(i,l)=>e(i,l),r.compileRe=(i,l,f=!1,x=!1)=>{if(f===!0)return i.output;const d=l||{},T=d.contains?"":"^",C=d.contains?"":"$";let _=`${T}(?:${i.output})${C}`;i&&i.negated===!0&&(_=`^(?!${_}).*$`);const B=r.toRegex(_,l);return x===!0&&(B.state=i),B},r.makeRe=(i,l={},f=!1,x=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(i[0]==="."||i[0]==="*")&&(d.output=t.fastpaths(i,l)),d.output||(d=t(i,l)),r.compileRe(d,l,f,x)},r.toRegex=(i,l)=>{try{const f=l||{};return new RegExp(i,f.flags||(f.nocase?"i":""))}catch(f){if(l&&l.debug===!0)throw f;return/$^/}},r.constants=c,vt=r,vt}var yt,zt;function Rr(){if(zt)return yt;zt=1;const e=Ar(),t=ft();function o(c,p,r=!1){return p&&(p.windows===null||p.windows===void 0)&&(p={...p,windows:t.isWindows()}),e(c,p,r)}return Object.assign(o,e),yt=o,yt}var _r=Rr();Tt(_r);const Er=k(import.meta.url),Le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nt=e=>{if(typeof Le<"u"&&Le.versions&&Le.versions.node){const[t,o]=Le.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Le.getBuiltinModule(e)}return Er(e)};nt("fs");nt("fs");nt("path");nt("url");const{createRequire:Tr}=nt("module");var Pt=Tr(import.meta.url);try{Pt.resolve("picomatch"),Pt("picomatch")}catch{}var xt,Ut;function Cr(){if(Ut)return xt;Ut=1;/*!
2
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
- *
4
- * Copyright (c) 2014-2016, Jon Schlinkert.
5
- * Licensed under the MIT License.
6
- */return xt=function(e){if(typeof e!="string"||e==="")return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1},xt}var At,jt;function eo(){if(jt)return At;jt=1;/*!
7
- * is-glob <https://github.com/jonschlinkert/is-glob>
8
- *
9
- * Copyright (c) 2014-2017, Jon Schlinkert.
10
- * Released under the MIT License.
11
- */var e=Cr(),t={"{":"}","(":")","[":"]"},o=function(p){if(p[0]==="!")return!0;for(var r=0,i=-2,l=-2,f=-2,x=-2,d=-2;r<p.length;){if(p[r]==="*"||p[r+1]==="?"&&/[\].+)]/.test(p[r])||l!==-1&&p[r]==="["&&p[r+1]!=="]"&&(l<r&&(l=p.indexOf("]",r)),l>r&&(d===-1||d>l||(d=p.indexOf("\\",r),d===-1||d>l)))||f!==-1&&p[r]==="{"&&p[r+1]!=="}"&&(f=p.indexOf("}",r),f>r&&(d=p.indexOf("\\",r),d===-1||d>f))||x!==-1&&p[r]==="("&&p[r+1]==="?"&&/[:!=]/.test(p[r+2])&&p[r+3]!==")"&&(x=p.indexOf(")",r),x>r&&(d=p.indexOf("\\",r),d===-1||d>x))||i!==-1&&p[r]==="("&&p[r+1]!=="|"&&(i<r&&(i=p.indexOf("|",r)),i!==-1&&p[i+1]!==")"&&(x=p.indexOf(")",i),x>i&&(d=p.indexOf("\\",i),d===-1||d>x))))return!0;if(p[r]==="\\"){var T=p[r+1];r+=2;var C=t[T];if(C){var _=p.indexOf(C,r);_!==-1&&(r=_+1)}if(p[r]==="!")return!0}else r++}return!1},c=function(p){if(p[0]==="!")return!0;for(var r=0;r<p.length;){if(/[*?{}()[\]]/.test(p[r]))return!0;if(p[r]==="\\"){var i=p[r+1];r+=2;var l=t[i];if(l){var f=p.indexOf(l,r);f!==-1&&(r=f+1)}if(p[r]==="!")return!0}else r++}return!1};return At=function(p,r){if(typeof p!="string"||p==="")return!1;if(e(p))return!0;var i=o;return r&&r.strict===!1&&(i=c),i(p)},At}const Sr=k(import.meta.url),Be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,to=e=>{if(typeof Be<"u"&&Be.versions&&Be.versions.node){const[t,o]=Be.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Be.getBuiltinModule(e)}return Sr(e)},$r=to("path"),wr=to("os");var Rt,Ft;function kr(){if(Ft)return Rt;Ft=1;var e=eo(),t=$r.posix.dirname,o=wr.platform()==="win32",c="/",p=/\\/g,r=/\\([!*?|[\](){}])/g;Rt=function(f,x){var d=Object.assign({flipBackslashes:!0},x);d.flipBackslashes&&o&&f.indexOf(c)<0&&(f=f.replace(p,c)),i(f)&&(f+=c),f+="a";do f=t(f);while(l(f));return f.replace(r,"$1")};function i(f){var x=f.slice(-1),d;switch(x){case"}":d="{";break;case"]":d="[";break;default:return!1}var T=f.indexOf(d);return T<0?!1:f.slice(T+1,-1).includes(c)}function l(f){return/\([^()]+$/.test(f)||f[0]==="{"||f[0]==="["||/[^\\][{[]/.test(f)?!0:e(f)}return Rt}var Or=kr();Tt(Or);const Hr=k(import.meta.url),Me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Nr=e=>{if(typeof Me<"u"&&Me.versions&&Me.versions.node){const[t,o]=Me.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Me.getBuiltinModule(e)}return Hr(e)};Nr("node:fs/promises");const Lr=k(import.meta.url),Ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Br=e=>{if(typeof Ie<"u"&&Ie.versions&&Ie.versions.node){const[t,o]=Ie.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ie.getBuiltinModule(e)}return Lr(e)},{accessSync:Mr}=Br("node:fs");function pt(e,t=Ao){Jt(e),e=lt(e);try{return Mr(e,t),!0}catch{return!1}}var Ir=eo();Tt(Ir);const Dr=k(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,oo=e=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[t,o]=De.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return De.getBuiltinModule(e)}return Dr(e)};oo("node:fs/promises");oo("node:fs");let Gr=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}};const zr=k(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ro=e=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[t,o]=Ge.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ge.getBuiltinModule(e)}return zr(e)};ro("node:fs/promises");ro("node:zlib");const Pr=k(import.meta.url),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,so=e=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[t,o]=ze.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ze.getBuiltinModule(e)}return Pr(e)};so("node:fs");so("node:zlib");const Ur=k(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jr=e=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[t,o]=Pe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Pe.getBuiltinModule(e)}return Ur(e)},{createRequire:no}=jr("node:module"),Fr=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&Fr.set("AggregateError",AggregateError);const Kr=no(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xr=e=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[t,o]=Ue.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ue.getBuiltinModule(e)}return Kr(e)};Xr("node:util");const Wr=no(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ct=e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,o]=je.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return je.getBuiltinModule(e)}return Wr(e)};Ct("node:fs");Ct("node:path");Ct("node:url");const Qr=k(import.meta.url),Fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,uo=e=>{if(typeof Fe<"u"&&Fe.versions&&Fe.versions.node){const[t,o]=Fe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Fe.getBuiltinModule(e)}return Qr(e)};uo("node:fs");uo("node:fs/promises");const qr=k(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zr=e=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[t,o]=Ke.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ke.getBuiltinModule(e)}return qr(e)};Zr("node:fs");const Yr=k(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vr=e=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[t,o]=Xe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Xe.getBuiltinModule(e)}return Yr(e)};Vr("node:fs/promises");const Jr=k(import.meta.url),We=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,es=e=>{if(typeof We<"u"&&We.versions&&We.versions.node){const[t,o]=We.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return We.getBuiltinModule(e)}return Jr(e)};es("node:fs");k(import.meta.url);const ts=k(import.meta.url),Qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,os=e=>{if(typeof Qe<"u"&&Qe.versions&&Qe.versions.node){const[t,o]=Qe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Qe.getBuiltinModule(e)}return ts(e)};os("node:crypto");new TextEncoder;const rs=k(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ss=e=>{if(typeof qe<"u"&&qe.versions&&qe.versions.node){const[t,o]=qe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return qe.getBuiltinModule(e)}return rs(e)};ss("node:fs/promises");const ns=k(import.meta.url),Ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,us=e=>{if(typeof Ze<"u"&&Ze.versions&&Ze.versions.node){const[t,o]=Ze.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ze.getBuiltinModule(e)}return ns(e)};us("node:fs");const is=k(import.meta.url),Ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,as=e=>{if(typeof Ye<"u"&&Ye.versions&&Ye.versions.node){const[t,o]=Ye.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ye.getBuiltinModule(e)}return is(e)};as("node:fs/promises");const ls=k(import.meta.url),Ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ps=e=>{if(typeof Ve<"u"&&Ve.versions&&Ve.versions.node){const[t,o]=Ve.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ve.getBuiltinModule(e)}return ls(e)};ps("node:fs");const cs=k(import.meta.url),Je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,St=e=>{if(typeof Je<"u"&&Je.versions&&Je.versions.node){const[t,o]=Je.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Je.getBuiltinModule(e)}return cs(e)},fs=St("fs"),gs=St("os"),ds=St("path");var _t={},Kt;function ms(){if(Kt)return _t;Kt=1;var e=Object.defineProperty,t=(d,T)=>e(d,"name",{value:T,configurable:!0}),o=fs,c=gs,p=ds;const r=t(d=>{let T="";for(let C=0;C<d.length;C+=1){const _=d[C],B=_.toUpperCase();T+=_===B?_.toLowerCase():B}return T},"invertCase"),i=new Map,l=t((d,T)=>{const C=p.join(d,`.is-fs-case-sensitive-test-${process.pid}`);try{return T.writeFileSync(C,""),!T.existsSync(r(C))}finally{try{T.unlinkSync(C)}catch{}}},"checkDirectoryCaseWithWrite"),f=t((d,T,C)=>{try{return l(d,C)}catch(_){if(T===void 0)return l(c.tmpdir(),C);throw _}},"checkDirectoryCaseWithFallback"),x=t((d,T=o,C=!0)=>{const _=d??process.cwd();if(C&&i.has(_))return i.get(_);let B;const te=r(_);return te!==_&&T.existsSync(_)?B=!T.existsSync(te):B=f(_,d,T),C&&i.set(_,B),B},"isFsCaseSensitive");return _t.isFsCaseSensitive=x,_t}ms();const hs=/^[A-Z]:\//i,ut=(e="")=>e&&e.replaceAll("\\","/").replace(hs,t=>t.toUpperCase()),bs=/^[/\\]{2}/,vs=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,$t=/^[A-Z]:$/i,ys=/\/$/,xs=()=>{if(typeof process.cwd=="function")try{const e=process.cwd();if(typeof e=="string")return ut(e)}catch{}return"/"},Et="/",io=(e,t)=>{let o="",c=0,p=-1,r=0,i;for(let l=0;l<=e.length;++l){if(l<e.length)i=e[l];else{if(i==="/")break;i="/"}if(i==="/"){if(!(p===l-1||r===1))if(r===2){if(o.length<2||c!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const f=o.lastIndexOf("/");f===-1?(o="",c=0):(o=o.slice(0,f),c=o.length-1-o.lastIndexOf("/")),p=l,r=0;continue}else if(o.length>0){o="",c=0,p=l,r=0;continue}}t&&(o+=o.length>0?"/..":"..",c=2)}else o.length>0?o+=`/${e.slice(p+1,l)}`:o=e.slice(p+1,l),c=l-p-1;p=l,r=0}else i==="."&&r!==-1?++r:r=-1}return o},he=e=>vs.test(e),As=function(e){if(e.length===0)return".";e=ut(e);const t=bs.exec(e),o=he(e),c=e.at(-1)==="/";return e=io(e,!o),e.length===0?o?"/":c?"./":".":(c&&(e+="/"),$t.test(e)&&(e+="/"),t?o?`//${e}`:`//./${e}`:o&&!he(e)?`/${e}`:e)},oe=(...e)=>{let t="";for(const o of e)if(o)if(t.length>0){const c=t.at(-1)==="/",p=o[0]==="/";c&&p?t+=o.slice(1):t+=c||p?o:`/${o}`}else t+=o;return As(t)},Rs=function(...e){e=e.map(c=>ut(c));let t="",o=!1;for(let c=e.length-1;c>=-1&&!o;c--){const p=c>=0?e[c]:xs();!p||p.length===0||(t=`${p}/${t}`,o=he(p))}return t=io(t,!o),$t.test(t)?`${t}/`:o&&!he(t)?`/${t}`:t.length>0?t:"."},_s=e=>{const t=ut(e).replace(ys,""),o=t.lastIndexOf("/");if(o===-1)return he(e)?"/":".";const c=t.slice(0,o);return $t.test(c)?`${c}/`:c||(he(e)?"/":".")};let Es;const Ts=e=>(Es??=k(import.meta.url))(e),et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cs=e=>{if(typeof et<"u"&&et.versions&&et.versions.node){const[t,o]=et.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return et.getBuiltinModule(e)}return Ts(e)},{fileURLToPath:Ss}=Cs("node:url");function $s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xt,Wt;function ws(){return Wt||(Wt=1,Xt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Xt}var ks=ws();const Os=$s(ks);new Set(Os);const ao=e=>ut(e instanceof URL?Ss(e):e),Qt=e=>{const t=yo();if(wt==="win32"){const r=ot.LOCALAPPDATA,i=t?oe(t,"AppData","Local"):gt(),l=r&&r.length>0?r:i;return oe(l,e,"Cache")}if(wt==="darwin"){const r=t?oe(t,"Library","Caches"):gt();return oe(r,e)}const o=ot.XDG_CACHE_HOME,c=t?oe(t,".cache"):gt(),p=o&&o.length>0?o:c;return oe(p,e)},Hs=e=>{if(e.length===0)return;const t=e.map(r=>Rs(ao(r)).split(Et));let o=Number.POSITIVE_INFINITY;for(const r of t)r.length<o&&(o=r.length);const c=[];for(let r=0;r<o;r+=1){const i=t[0][r];if(t.every(l=>l[r]===i))c.push(i);else break}const p=c.join(Et);return p===""?Et:p},tt=(e,t)=>{if(e!==void 0)return t?(...o)=>oe(e,...o):e},Ns=e=>{if(e?.files&&e.files.length>0){const t=Hs(e.files);if(t!==void 0)return t}return e?.cwd??xo()},Ls=e=>new Gr(`No package.json found searching upwards from '${ao(e)}'.`),Bs=e=>!pt(e,Yt)&&pt(e),Ms=(e,t)=>{if(ot.CACHE_DIR&&!["0","1","false","true"].includes(ot.CACHE_DIR)){const x=oe(ot.CACHE_DIR,e);return t?.create&&_e(x),tt(x,t?.thunk)}const o=Ns(t),c=vr("package.json",{cwd:o,type:"file"});if(!c){if(t?.useGlobalCacheFallback){const x=Qt(e);return t.create&&_e(x),tt(x,t.thunk)}if(t?.throwError)throw Ls(o);return}const p=_s(c),r=oe(p,"node_modules"),i=oe(r,".cache"),l=oe(i,e);if(pt(l,Yt))return t?.create&&_e(l),tt(l,t?.thunk);const f=[l,i,r];if(pt(r)||f.push(p),f.some(x=>Bs(x))){if(t?.useGlobalCacheFallback){const x=Qt(e);return t.create&&_e(x),tt(x,t.thunk)}return}return t?.create&&_e(l),tt(l,t?.thunk)},zs=Ms,qt="@inherit",Is=["aliases","dependsOn","inputs","outputs"],Ds=(e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(qt))return[...t];const o=[];for(const c of t){if(c===qt){e!==void 0&&o.push(...e);continue}o.push(c)}return o},Ps=(e,t)=>{const o={...e,...t};for(const c of Is){const p=e?.[c],r=t?.[c],i=Ds(p,r);i===void 0?delete o[c]:o[c]=i}return o};export{zs as F,Ps as m};
@@ -1 +0,0 @@
1
- import{createRequire as g}from"node:module";import{w as i,l as a,z as d,u as b}from"./index-uBVnF4ji.js";import"./public-api-WqUCiyIe.js";let h;const u=n=>(h??=g(import.meta.url))(n),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,m=n=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[s,e]=p.versions.node.split(".").map(Number);if(s>22||s===22&&e>=3||s===20&&e>=16)return p.getBuiltinModule(n)}return u(n)},{readdirSync:j}=m("node:fs"),v=[".husky/pre-commit",".vis/hooks/pre-commit",".git/hooks/pre-commit"],$=[".secretlintrc",".secretlintrc.json",".secretlintrc.js",".secretlintrc.mjs",".secretlintrc.cjs",".secretlintrc.yml",".secretlintrc.yaml"],w=[".syncpackrc",".syncpackrc.json",".syncpackrc.yaml",".syncpackrc.yml",".syncpackrc.cjs",".syncpackrc.js",".syncpackrc.mjs",".syncpackrc.ts","syncpack.config.cjs","syncpack.config.js","syncpack.config.mjs","syncpack.config.ts"],_=n=>{const s=i(n,"package.json");if(!a(s))return[];let e;try{e=JSON.parse(d(s))}catch{return[]}const o=[];if(e.scripts)for(const[t,c]of Object.entries(e.scripts))typeof c=="string"&&(/\bgitleaks\b/.test(c)&&o.push({detail:`Script "${t}" still invokes gitleaks: ${c}`,kind:"script",location:"package.json",tool:"gitleaks"}),/\bsecretlint\b/.test(c)&&o.push({detail:`Script "${t}" still invokes secretlint: ${c}`,kind:"script",location:"package.json",tool:"secretlint"}),/\bsyncpack\b/.test(c)&&o.push({detail:`Script "${t}" still invokes syncpack: ${c}`,kind:"script",location:"package.json",tool:"syncpack"}),/\bsherif\b/.test(c)&&o.push({detail:`Script "${t}" still invokes sherif: ${c}`,kind:"script",location:"package.json",tool:"sherif"}));if(e.devDependencies)for(const t of Object.keys(e.devDependencies))(t==="gitleaks"||t==="@gitleaks/cli")&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"gitleaks"}),(t==="secretlint"||t.startsWith("@secretlint/"))&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"secretlint"}),t==="syncpack"&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"syncpack"}),t==="sherif"&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"sherif"});return e.sherif&&o.push({detail:"`sherif` config block still present in package.json",kind:"config",location:"package.json",tool:"sherif"}),o},D=n=>{const s=[];for(const e of v){const o=i(n,e);if(!a(o))continue;const t=d(o);/\bgitleaks\b/.test(t)&&s.push({detail:"gitleaks invocation still present in hook",kind:"hook",location:e,tool:"gitleaks"}),/\bsecretlint\b/.test(t)&&s.push({detail:"secretlint invocation still present in hook",kind:"hook",location:e,tool:"secretlint"}),/\bsyncpack\b/.test(t)&&s.push({detail:"syncpack invocation still present in hook",kind:"hook",location:e,tool:"syncpack"}),/\bsherif\b/.test(t)&&s.push({detail:"sherif invocation still present in hook",kind:"hook",location:e,tool:"sherif"})}return s},S=n=>{const s=[];for(const e of $)a(i(n,e))&&s.push({detail:"secretlint config should be removed after migration",kind:"config",location:e,tool:"secretlint"});for(const e of w)a(i(n,e))&&s.push({detail:"syncpack config should be removed after migration",kind:"config",location:e,tool:"syncpack"});return s},O=[".github/workflows",".gitlab-ci.yml",".circleci/config.yml",".woodpecker.yml",".drone.yml"],q=n=>{const s=[],e=o=>{const t=i(n,o);if(!a(t))return;const c=d(t);/\bsyncpack\b/.test(c)&&s.push({detail:"syncpack invocation still present in CI",kind:"ci",location:o,tool:"syncpack"}),/\bsherif\b/.test(c)&&s.push({detail:"sherif invocation still present in CI",kind:"ci",location:o,tool:"sherif"})};for(const o of O){const t=i(n,o);if(a(t)){if(o===".github/workflows"){try{for(const c of j(t))(c.endsWith(".yml")||c.endsWith(".yaml"))&&e(`.github/workflows/${c}`)}catch{}continue}e(o)}}return s},M=n=>{const s=[],e=i(n,"pnpm-workspace.yaml");if(a(e)){let t;try{t=b(e)}catch{t=void 0}if(t&&typeof t=="object"){const c=t.catalog;c&&typeof c.syncpack=="string"&&s.push({detail:"`syncpack` still listed in pnpm-workspace.yaml#catalog",kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"});const l=t.catalogs;if(l&&typeof l=="object")for(const[k,r]of Object.entries(l))r&&typeof r.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in pnpm-workspace.yaml#catalogs.${k}`,kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"})}}const o=i(n,"package.json");if(a(o)){let t;try{t=JSON.parse(d(o))}catch{return s}const c=t.workspaces;if(c&&typeof c=="object"&&!Array.isArray(c)){const k=c.catalog;k&&typeof k.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#workspaces.catalog",kind:"catalog",location:"package.json",tool:"syncpack"});const r=c.catalogs;if(r&&typeof r=="object")for(const[y,f]of Object.entries(r))f&&typeof f.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in package.json#workspaces.catalogs.${y}`,kind:"catalog",location:"package.json",tool:"syncpack"})}const l=t.catalog;l&&typeof l.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#catalog",kind:"catalog",location:"package.json",tool:"syncpack"})}return s},N=n=>[..._(n),...D(n),...S(n),...q(n),...M(n)],W=(n,s)=>{const e=N(n);if(e.length===0)return s.info("✓ No unmigrated gitleaks/secretlint/sherif/syncpack references found."),[];s.warn(`Found ${String(e.length)} unmigrated reference(s):`);for(const o of e)s.warn(` [${o.kind}] ${o.location} — ${o.detail}`);return e};export{N as s,W as v};