@visulima/vis 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/CONFIG_FILES.js +3 -3
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog.js +1 -1
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler72.js +1 -1
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/ts-loader.js +13 -13
- package/dist/packem_shared/{advisories-CaP4uNhD.js → advisories-B76fBVL-.js} +1 -1
- package/dist/packem_shared/{index-CgXLAAVI.js → index-BIKG7bQs.js} +1 -1
- package/dist/packem_shared/{osv-bloom-BAyJUnRx.js → osv-bloom-DMhXP184.js} +1 -1
- package/dist/packem_shared/target-merge-Dg25Izl5.js +11 -0
- package/index.d.ts +204 -204
- package/index.js +572 -655
- package/package.json +11 -11
- package/dist/packem_shared/target-merge-D2eTghgd.js +0 -11
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{createRequire as ge}from"node:module";import{v as z,z as ve,s as we,U as ke,L as xe,B as R,H as K,y as Cu,e as se,m as I,A as Mu,g as Bu,w as $e,h as Te,f as _,F as hu}from"../packem_shared/index-BVuCxe14.js";import{parse as Se}from"./index5.js";import{E as Ku}from"../packem_shared/public-api-WqUCiyIe.js";import{transformTs as ne}from"#native";const ye=ge(import.meta.url),uu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wu=u=>{if(typeof uu<"u"&&uu.versions&&uu.versions.node){const[e,o]=uu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return uu.getBuiltinModule(u)}return ye(u)},{readFileSync:Vu,statSync:ie,writeFileSync:be,unlinkSync:Oe}=Wu("node:fs"),Pu=Wu("node:module"),{createRequire:Z}=Pu,{fileURLToPath:fu,pathToFileURL:mu}=Wu("node:url");var Ne=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ie=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Pe=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,vu={Space_Separator:Ne,ID_Start:Ie,ID_Continue:Pe},T={isSpaceSeparator(u){return typeof u=="string"&&vu.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||vu.ID_Start.test(u))},isIdContinueChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u===""||u===""||vu.ID_Continue.test(u))},isDigit(u){return typeof u=="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u=="string"&&/[0-9A-Fa-f]/.test(u)}};let ju,P,V,gu,J,U,N,Ju,au;var je=function(u,e){ju=String(u),P="start",V=[],gu=0,J=1,U=0,N=void 0,Ju=void 0,au=void 0;do N=Le(),Ue[P]();while(N.type!=="eof");return typeof e=="function"?Lu({"":au},"",e):au};function Lu(u,e,o){const t=u[e];if(t!=null&&typeof t=="object")if(Array.isArray(t))for(let r=0;r<t.length;r++){const D=String(r),i=Lu(t,D,o);i===void 0?delete t[D]:Object.defineProperty(t,D,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(const r in t){const D=Lu(t,r,o);D===void 0?delete t[r]:Object.defineProperty(t,r,{value:D,writable:!0,enumerable:!0,configurable:!0})}return o.call(u,e,t)}let h,m,cu,W,b;function Le(){for(h="default",m="",cu=!1,W=1;;){b=M();const u=De[h]();if(u)return u}}function M(){if(ju[gu])return String.fromCodePoint(ju.codePointAt(gu))}function s(){const u=M();return u===`
|
|
1
|
+
import{createRequire as ge}from"node:module";import{v as z,z as ve,s as we,U as ke,L as xe,B as R,H as K,y as Cu,e as ie,m as I,A as Mu,g as Bu,w as $e,h as Te,f as _,F as hu}from"../packem_shared/index-BVuCxe14.js";import{parse as Se}from"./index5.js";import{E as Ku}from"../packem_shared/public-api-WqUCiyIe.js";import{transformTs as ne}from"#native";const ye=ge(import.meta.url),uu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wu=u=>{if(typeof uu<"u"&&uu.versions&&uu.versions.node){const[e,o]=uu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return uu.getBuiltinModule(u)}return ye(u)},{readFileSync:Vu,statSync:se,writeFileSync:be,unlinkSync:Oe}=Wu("node:fs"),Pu=Wu("node:module"),{createRequire:Z}=Pu,{fileURLToPath:fu,pathToFileURL:mu}=Wu("node:url");var Ne=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ie=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Pe=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,vu={Space_Separator:Ne,ID_Start:Ie,ID_Continue:Pe},T={isSpaceSeparator(u){return typeof u=="string"&&vu.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||vu.ID_Start.test(u))},isIdContinueChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u===""||u===""||vu.ID_Continue.test(u))},isDigit(u){return typeof u=="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u=="string"&&/[0-9A-Fa-f]/.test(u)}};let ju,P,V,gu,J,U,N,Ju,au;var je=function(u,e){ju=String(u),P="start",V=[],gu=0,J=1,U=0,N=void 0,Ju=void 0,au=void 0;do N=Le(),Ue[P]();while(N.type!=="eof");return typeof e=="function"?Lu({"":au},"",e):au};function Lu(u,e,o){const t=u[e];if(t!=null&&typeof t=="object")if(Array.isArray(t))for(let r=0;r<t.length;r++){const D=String(r),s=Lu(t,D,o);s===void 0?delete t[D]:Object.defineProperty(t,D,{value:s,writable:!0,enumerable:!0,configurable:!0})}else for(const r in t){const D=Lu(t,r,o);D===void 0?delete t[r]:Object.defineProperty(t,r,{value:D,writable:!0,enumerable:!0,configurable:!0})}return o.call(u,e,t)}let h,m,cu,W,b;function Le(){for(h="default",m="",cu=!1,W=1;;){b=M();const u=De[h]();if(u)return u}}function M(){if(ju[gu])return String.fromCodePoint(ju.codePointAt(gu))}function i(){const u=M();return u===`
|
|
2
2
|
`?(J++,U=0):u?U+=u.length:U++,u&&(gu+=u.length),u}const De={default(){switch(b){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
3
|
-
`:case"\r":case"\u2028":case"\u2029":
|
|
4
|
-
`:case"\r":case"\u2028":case"\u2029":
|
|
5
|
-
`:case"\r":throw x(
|
|
6
|
-
`;case"r":return
|
|
7
|
-
`:case"\u2028":case"\u2029":return
|
|
8
|
-
`&&
|
|
3
|
+
`:case"\r":case"\u2028":case"\u2029":i();return;case"/":i(),h="comment";return;case void 0:return i(),k("eof")}if(T.isSpaceSeparator(b)){i();return}return De[P]()},comment(){switch(b){case"*":i(),h="multiLineComment";return;case"/":i(),h="singleLineComment";return}throw x(i())},multiLineComment(){switch(b){case"*":i(),h="multiLineCommentAsterisk";return;case void 0:throw x(i())}i()},multiLineCommentAsterisk(){switch(b){case"*":i();return;case"/":i(),h="default";return;case void 0:throw x(i())}i(),h="multiLineComment"},singleLineComment(){switch(b){case`
|
|
4
|
+
`:case"\r":case"\u2028":case"\u2029":i(),h="default";return;case void 0:return i(),k("eof")}i()},value(){switch(b){case"{":case"[":return k("punctuator",i());case"n":return i(),q("ull"),k("null",null);case"t":return i(),q("rue"),k("boolean",!0);case"f":return i(),q("alse"),k("boolean",!1);case"-":case"+":i()==="-"&&(W=-1),h="sign";return;case".":m=i(),h="decimalPointLeading";return;case"0":m=i(),h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m=i(),h="decimalInteger";return;case"I":return i(),q("nfinity"),k("numeric",1/0);case"N":return i(),q("aN"),k("numeric",NaN);case'"':case"'":cu=i()==='"',m="",h="string";return}throw x(i())},identifierNameStartEscape(){if(b!=="u")throw x(i());i();const u=_u();switch(u){case"$":case"_":break;default:if(!T.isIdStartChar(u))throw zu();break}m+=u,h="identifierName"},identifierName(){switch(b){case"$":case"_":case"":case"":m+=i();return;case"\\":i(),h="identifierNameEscape";return}if(T.isIdContinueChar(b)){m+=i();return}return k("identifier",m)},identifierNameEscape(){if(b!=="u")throw x(i());i();const u=_u();switch(u){case"$":case"_":case"":case"":break;default:if(!T.isIdContinueChar(u))throw zu();break}m+=u,h="identifierName"},sign(){switch(b){case".":m=i(),h="decimalPointLeading";return;case"0":m=i(),h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m=i(),h="decimalInteger";return;case"I":return i(),q("nfinity"),k("numeric",W*(1/0));case"N":return i(),q("aN"),k("numeric",NaN)}throw x(i())},zero(){switch(b){case".":m+=i(),h="decimalPoint";return;case"e":case"E":m+=i(),h="decimalExponent";return;case"x":case"X":m+=i(),h="hexadecimal";return}return k("numeric",W*0)},decimalInteger(){switch(b){case".":m+=i(),h="decimalPoint";return;case"e":case"E":m+=i(),h="decimalExponent";return}if(T.isDigit(b)){m+=i();return}return k("numeric",W*Number(m))},decimalPointLeading(){if(T.isDigit(b)){m+=i(),h="decimalFraction";return}throw x(i())},decimalPoint(){switch(b){case"e":case"E":m+=i(),h="decimalExponent";return}if(T.isDigit(b)){m+=i(),h="decimalFraction";return}return k("numeric",W*Number(m))},decimalFraction(){switch(b){case"e":case"E":m+=i(),h="decimalExponent";return}if(T.isDigit(b)){m+=i();return}return k("numeric",W*Number(m))},decimalExponent(){switch(b){case"+":case"-":m+=i(),h="decimalExponentSign";return}if(T.isDigit(b)){m+=i(),h="decimalExponentInteger";return}throw x(i())},decimalExponentSign(){if(T.isDigit(b)){m+=i(),h="decimalExponentInteger";return}throw x(i())},decimalExponentInteger(){if(T.isDigit(b)){m+=i();return}return k("numeric",W*Number(m))},hexadecimal(){if(T.isHexDigit(b)){m+=i(),h="hexadecimalInteger";return}throw x(i())},hexadecimalInteger(){if(T.isHexDigit(b)){m+=i();return}return k("numeric",W*Number(m))},string(){switch(b){case"\\":i(),m+=_e();return;case'"':if(cu)return i(),k("string",m);m+=i();return;case"'":if(!cu)return i(),k("string",m);m+=i();return;case`
|
|
5
|
+
`:case"\r":throw x(i());case"\u2028":case"\u2029":We(b);break;case void 0:throw x(i())}m+=i()},start(){switch(b){case"{":case"[":return k("punctuator",i())}h="value"},beforePropertyName(){switch(b){case"$":case"_":m=i(),h="identifierName";return;case"\\":i(),h="identifierNameStartEscape";return;case"}":return k("punctuator",i());case'"':case"'":cu=i()==='"',h="string";return}if(T.isIdStartChar(b)){m+=i(),h="identifierName";return}throw x(i())},afterPropertyName(){if(b===":")return k("punctuator",i());throw x(i())},beforePropertyValue(){h="value"},afterPropertyValue(){switch(b){case",":case"}":return k("punctuator",i())}throw x(i())},beforeArrayValue(){if(b==="]")return k("punctuator",i());h="value"},afterArrayValue(){switch(b){case",":case"]":return k("punctuator",i())}throw x(i())},end(){throw x(i())}};function k(u,e){return{type:u,value:e,line:J,column:U}}function q(u){for(const e of u){if(M()!==e)throw x(i());i()}}function _e(){switch(M()){case"b":return i(),"\b";case"f":return i(),"\f";case"n":return i(),`
|
|
6
|
+
`;case"r":return i(),"\r";case"t":return i()," ";case"v":return i(),"\v";case"0":if(i(),T.isDigit(M()))throw x(i());return"\0";case"x":return i(),Re();case"u":return i(),_u();case`
|
|
7
|
+
`:case"\u2028":case"\u2029":return i(),"";case"\r":return i(),M()===`
|
|
8
|
+
`&&i(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw x(i());case void 0:throw x(i())}return i()}function Re(){let u="",e=M();if(!T.isHexDigit(e)||(u+=i(),e=M(),!T.isHexDigit(e)))throw x(i());return u+=i(),String.fromCodePoint(parseInt(u,16))}function _u(){let u="",e=4;for(;e-- >0;){const o=M();if(!T.isHexDigit(o))throw x(i());u+=i()}return String.fromCodePoint(parseInt(u,16))}const Ue={start(){if(N.type==="eof")throw H();wu()},beforePropertyName(){switch(N.type){case"identifier":case"string":Ju=N.value,P="afterPropertyName";return;case"punctuator":Au();return;case"eof":throw H()}},afterPropertyName(){if(N.type==="eof")throw H();P="beforePropertyValue"},beforePropertyValue(){if(N.type==="eof")throw H();wu()},beforeArrayValue(){if(N.type==="eof")throw H();if(N.type==="punctuator"&&N.value==="]"){Au();return}wu()},afterPropertyValue(){if(N.type==="eof")throw H();switch(N.value){case",":P="beforePropertyName";return;case"}":Au()}},afterArrayValue(){if(N.type==="eof")throw H();switch(N.value){case",":P="beforeArrayValue";return;case"]":Au()}},end(){}};function wu(){let u;switch(N.type){case"punctuator":switch(N.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=N.value;break}if(au===void 0)au=u;else{const e=V[V.length-1];Array.isArray(e)?e.push(u):Object.defineProperty(e,Ju,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(u!==null&&typeof u=="object")V.push(u),Array.isArray(u)?P="beforeArrayValue":P="beforePropertyName";else{const e=V[V.length-1];e==null?P="end":Array.isArray(e)?P="afterArrayValue":P="afterPropertyValue"}}function Au(){V.pop();const u=V[V.length-1];u==null?P="end":Array.isArray(u)?P="afterArrayValue":P="afterPropertyValue"}function x(u){return qu(u===void 0?`JSON5: invalid end of input at ${J}:${U}`:`JSON5: invalid character '${ce(u)}' at ${J}:${U}`)}function H(){return qu(`JSON5: invalid end of input at ${J}:${U}`)}function zu(){return U-=5,qu(`JSON5: invalid identifier character at ${J}:${U}`)}function We(u){console.warn(`JSON5: '${ce(u)}' in strings is not valid ECMAScript; consider escaping`)}function ce(u){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[u])return e[u];if(u<" "){const o=u.charCodeAt(0).toString(16);return"\\x"+("00"+o).substring(o.length)}return u}function qu(u){const e=new SyntaxError(u);return e.lineNumber=J,e.columnNumber=U,e}var Ve=function(u,e,o){const t=[];let r="",D,s,c="",a;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(o=e.space,a=e.quote,e=e.replacer),typeof e=="function")s=e;else if(Array.isArray(e)){D=[];for(const C of e){let y;typeof C=="string"?y=C:(typeof C=="number"||C instanceof String||C instanceof Number)&&(y=String(C)),y!==void 0&&D.indexOf(y)<0&&D.push(y)}}return o instanceof Number?o=Number(o):o instanceof String&&(o=String(o)),typeof o=="number"?o>0&&(o=Math.min(10,Math.floor(o)),c=" ".substr(0,o)):typeof o=="string"&&(c=o.substr(0,10)),l("",{"":u});function l(C,y){let A=y[C];switch(A!=null&&(typeof A.toJSON5=="function"?A=A.toJSON5(C):typeof A.toJSON=="function"&&(A=A.toJSON(C))),s&&(A=s.call(y,C,A)),A instanceof Number?A=Number(A):A instanceof String?A=String(A):A instanceof Boolean&&(A=A.valueOf()),A){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof A=="string")return f(A);if(typeof A=="number")return String(A);if(typeof A=="object")return Array.isArray(A)?O(A):E(A)}function f(C){const y={"'":.1,'"':.2},A={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let w="";for(let n=0;n<C.length;n++){const d=C[n];switch(d){case"'":case'"':y[d]++,w+=d;continue;case"\0":if(T.isDigit(C[n+1])){w+="\\x00";continue}}if(A[d]){w+=A[d];continue}if(d<" "){let g=d.charCodeAt(0).toString(16);w+="\\x"+("00"+g).substring(g.length);continue}w+=d}const F=a||Object.keys(y).reduce((n,d)=>y[n]<y[d]?n:d);return w=w.replace(new RegExp(F,"g"),A[F]),F+w+F}function E(C){if(t.indexOf(C)>=0)throw TypeError("Converting circular structure to JSON5");t.push(C);let y=r;r=r+c;let A=D||Object.keys(C),w=[];for(const n of A){const d=l(n,C);if(d!==void 0){let g=$(n)+":";c!==""&&(g+=" "),g+=d,w.push(g)}}let F;if(w.length===0)F="{}";else{let n;if(c==="")n=w.join(","),F="{"+n+"}";else{let d=`,
|
|
9
9
|
`+r;n=w.join(d),F=`{
|
|
10
10
|
`+r+n+`,
|
|
11
11
|
`+y+"}"}}return t.pop(),r=y,F}function $(C){if(C.length===0)return f(C);const y=String.fromCodePoint(C.codePointAt(0));if(!T.isIdStartChar(y))return f(C);for(let A=y.length;A<C.length;A++)if(!T.isIdContinueChar(String.fromCodePoint(C.codePointAt(A))))return f(C);return C}function O(C){if(t.indexOf(C)>=0)throw TypeError("Converting circular structure to JSON5");t.push(C);let y=r;r=r+c;let A=[];for(let F=0;F<C.length;F++){const n=l(String(F),C);A.push(n!==void 0?n:"null")}let w;if(A.length===0)w="[]";else if(c==="")w="["+A.join(",")+"]";else{let F=`,
|
|
12
12
|
`+r,n=A.join(F);w=`[
|
|
13
13
|
`+r+n+`,
|
|
14
|
-
`+y+"]"}return t.pop(),r=y,w}};const Me={parse:je,stringify:Ve};var Je=Me;function qe(u,e,o){const{beforeParse:t,buffer:r,compression:D,encoding:
|
|
15
|
-
`;break;case 114:n+="\r";break;case 116:n+=" ";break;case 117:const B=$(4);B>=0?n+=String.fromCharCode(B):E=4;break;default:E=5}d=t;continue}if(g>=0&&g<=31)if(ru(g)){n+=u.substring(d,t),E=2;break}else E=6;t++}return n}function A(){if(r="",E=0,D=t,a=c,f=l,t>=o)return D=o,
|
|
16
|
-
`),c++,l=t,
|
|
14
|
+
`+y+"]"}return t.pop(),r=y,w}};const Me={parse:je,stringify:Ve};var Je=Me;function qe(u,e,o){const{beforeParse:t,buffer:r,compression:D,encoding:s="utf8",flag:c}={},a=z(u,{buffer:r,compression:D,encoding:s,flag:c}),l=typeof t=="function"?t(a):a;return Je.parse(l,e)}const He=Z(import.meta.url),eu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ke=u=>{if(typeof eu<"u"&&eu.versions&&eu.versions.node){const[e,o]=eu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return eu.getBuiltinModule(u)}return He(u)};Ke("node:fs/promises");const ze=Z(import.meta.url),tu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ge=u=>{if(typeof tu<"u"&&tu.versions&&tu.versions.node){const[e,o]=tu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return tu.getBuiltinModule(u)}return ze(u)};Ge("node:fs");function Qe(u,e=!1){const o=u.length;let t=0,r="",D=0,s=16,c=0,a=0,l=0,f=0,E=0;function $(n,d){let g=0,B=0;for(;g<n;){let p=u.charCodeAt(t);if(p>=48&&p<=57)B=B*16+p-48;else if(p>=65&&p<=70)B=B*16+p-65+10;else if(p>=97&&p<=102)B=B*16+p-97+10;else break;t++,g++}return g<n&&(B=-1),B}function O(n){t=n,r="",D=0,s=16,E=0}function C(){let n=t;if(u.charCodeAt(t)===48)t++;else for(t++;t<u.length&&G(u.charCodeAt(t));)t++;if(t<u.length&&u.charCodeAt(t)===46)if(t++,t<u.length&&G(u.charCodeAt(t)))for(t++;t<u.length&&G(u.charCodeAt(t));)t++;else return E=3,u.substring(n,t);let d=t;if(t<u.length&&(u.charCodeAt(t)===69||u.charCodeAt(t)===101))if(t++,(t<u.length&&u.charCodeAt(t)===43||u.charCodeAt(t)===45)&&t++,t<u.length&&G(u.charCodeAt(t))){for(t++;t<u.length&&G(u.charCodeAt(t));)t++;d=t}else E=3;return u.substring(n,d)}function y(){let n="",d=t;for(;;){if(t>=o){n+=u.substring(d,t),E=2;break}const g=u.charCodeAt(t);if(g===34){n+=u.substring(d,t),t++;break}if(g===92){if(n+=u.substring(d,t),t++,t>=o){E=2;break}switch(u.charCodeAt(t++)){case 34:n+='"';break;case 92:n+="\\";break;case 47:n+="/";break;case 98:n+="\b";break;case 102:n+="\f";break;case 110:n+=`
|
|
15
|
+
`;break;case 114:n+="\r";break;case 116:n+=" ";break;case 117:const B=$(4);B>=0?n+=String.fromCharCode(B):E=4;break;default:E=5}d=t;continue}if(g>=0&&g<=31)if(ru(g)){n+=u.substring(d,t),E=2;break}else E=6;t++}return n}function A(){if(r="",E=0,D=t,a=c,f=l,t>=o)return D=o,s=17;let n=u.charCodeAt(t);if(ku(n)){do t++,r+=String.fromCharCode(n),n=u.charCodeAt(t);while(ku(n));return s=15}if(ru(n))return t++,r+=String.fromCharCode(n),n===13&&u.charCodeAt(t)===10&&(t++,r+=`
|
|
16
|
+
`),c++,l=t,s=14;switch(n){case 123:return t++,s=1;case 125:return t++,s=2;case 91:return t++,s=3;case 93:return t++,s=4;case 58:return t++,s=6;case 44:return t++,s=5;case 34:return t++,r=y(),s=10;case 47:const d=t-1;if(u.charCodeAt(t+1)===47){for(t+=2;t<o&&!ru(u.charCodeAt(t));)t++;return r=u.substring(d,t),s=12}if(u.charCodeAt(t+1)===42){t+=2;const g=o-1;let B=!1;for(;t<g;){const p=u.charCodeAt(t);if(p===42&&u.charCodeAt(t+1)===47){t+=2,B=!0;break}t++,ru(p)&&(p===13&&u.charCodeAt(t)===10&&t++,c++,l=t)}return B||(t++,E=1),r=u.substring(d,t),s=13}return r+=String.fromCharCode(n),t++,s=16;case 45:if(r+=String.fromCharCode(n),t++,t===o||!G(u.charCodeAt(t)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=C(),s=11;default:for(;t<o&&w(n);)t++,n=u.charCodeAt(t);if(D!==t){switch(r=u.substring(D,t),r){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return r+=String.fromCharCode(n),t++,s=16}}function w(n){if(ku(n)||ru(n))return!1;switch(n){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function F(){let n;do n=A();while(n>=12&&n<=15);return n}return{setPosition:O,getPosition:()=>t,scan:e?F:A,getToken:()=>s,getTokenValue:()=>r,getTokenOffset:()=>D,getTokenLength:()=>t-D,getTokenStartLine:()=>a,getTokenStartCharacter:()=>D-f,getTokenError:()=>E}}function ku(u){return u===32||u===9}function ru(u){return u===10||u===13}function G(u){return u>=48&&u<=57}var Gu;(function(u){u[u.lineFeed=10]="lineFeed",u[u.carriageReturn=13]="carriageReturn",u[u.space=32]="space",u[u._0=48]="_0",u[u._1=49]="_1",u[u._2=50]="_2",u[u._3=51]="_3",u[u._4=52]="_4",u[u._5=53]="_5",u[u._6=54]="_6",u[u._7=55]="_7",u[u._8=56]="_8",u[u._9=57]="_9",u[u.a=97]="a",u[u.b=98]="b",u[u.c=99]="c",u[u.d=100]="d",u[u.e=101]="e",u[u.f=102]="f",u[u.g=103]="g",u[u.h=104]="h",u[u.i=105]="i",u[u.j=106]="j",u[u.k=107]="k",u[u.l=108]="l",u[u.m=109]="m",u[u.n=110]="n",u[u.o=111]="o",u[u.p=112]="p",u[u.q=113]="q",u[u.r=114]="r",u[u.s=115]="s",u[u.t=116]="t",u[u.u=117]="u",u[u.v=118]="v",u[u.w=119]="w",u[u.x=120]="x",u[u.y=121]="y",u[u.z=122]="z",u[u.A=65]="A",u[u.B=66]="B",u[u.C=67]="C",u[u.D=68]="D",u[u.E=69]="E",u[u.F=70]="F",u[u.G=71]="G",u[u.H=72]="H",u[u.I=73]="I",u[u.J=74]="J",u[u.K=75]="K",u[u.L=76]="L",u[u.M=77]="M",u[u.N=78]="N",u[u.O=79]="O",u[u.P=80]="P",u[u.Q=81]="Q",u[u.R=82]="R",u[u.S=83]="S",u[u.T=84]="T",u[u.U=85]="U",u[u.V=86]="V",u[u.W=87]="W",u[u.X=88]="X",u[u.Y=89]="Y",u[u.Z=90]="Z",u[u.asterisk=42]="asterisk",u[u.backslash=92]="backslash",u[u.closeBrace=125]="closeBrace",u[u.closeBracket=93]="closeBracket",u[u.colon=58]="colon",u[u.comma=44]="comma",u[u.dot=46]="dot",u[u.doubleQuote=34]="doubleQuote",u[u.minus=45]="minus",u[u.openBrace=123]="openBrace",u[u.openBracket=91]="openBracket",u[u.plus=43]="plus",u[u.slash=47]="slash",u[u.formFeed=12]="formFeed",u[u.tab=9]="tab"})(Gu||(Gu={}));new Array(20).fill(0).map((u,e)=>" ".repeat(e));const Q=200;new Array(Q).fill(0).map((u,e)=>`
|
|
17
17
|
`+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>`\r
|
|
18
18
|
`+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>`
|
|
19
19
|
`+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>"\r"+" ".repeat(e)),new Array(Q).fill(0).map((u,e)=>`\r
|
|
20
|
-
`+" ".repeat(e));var yu;(function(u){u.DEFAULT={allowTrailingComma:!1}})(yu||(yu={}));function Ye(u,e=[],o=yu.DEFAULT){let t=null,r=[];const D=[];function i(c){Array.isArray(r)?r.push(c):t!==null&&(r[t]=c)}return Ze(u,{onObjectBegin:()=>{const c={};i(c),D.push(r),r=c,t=null},onObjectProperty:c=>{t=c},onObjectEnd:()=>{r=D.pop()},onArrayBegin:()=>{const c=[];i(c),D.push(r),r=c,t=null},onArrayEnd:()=>{r=D.pop()},onLiteralValue:i,onError:(c,a,l)=>{e.push({error:c,offset:a,length:l})}},o),r[0]}function Ze(u,e,o=yu.DEFAULT){const t=Qe(u,!1),r=[];let D=0;function i(v){return v?()=>D===0&&v(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function c(v){return v?S=>D===0&&v(S,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function a(v){return v?S=>D===0&&v(S,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>r.slice()):()=>!0}function l(v){return v?()=>{D>0?D++:v(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>r.slice())===!1&&(D=1)}:()=>!0}function f(v){return v?()=>{D>0&&D--,D===0&&v(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter())}:()=>!0}const E=l(e.onObjectBegin),$=a(e.onObjectProperty),O=f(e.onObjectEnd),C=l(e.onArrayBegin),y=f(e.onArrayEnd),A=a(e.onLiteralValue),w=c(e.onSeparator),F=i(e.onComment),n=c(e.onError),d=o&&o.disallowComments,g=o&&o.allowTrailingComma;function B(){for(;;){const v=t.scan();switch(t.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:d||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(v){case 12:case 13:d?p(10):F();break;case 16:p(1);break;case 15:case 14:break;default:return v}}}function p(v,S=[],Hu=[]){if(n(v),S.length+Hu.length>0){let pu=t.getToken();for(;pu!==17;){if(S.indexOf(pu)!==-1){B();break}else if(Hu.indexOf(pu)!==-1)break;pu=B()}}}function L(v){const S=t.getTokenValue();return v?A(S):($(S),r.push(S)),B(),!0}function X(){switch(t.getToken()){case 11:const v=t.getTokenValue();let S=Number(v);isNaN(S)&&(p(2),S=0),A(S);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return B(),!0}function Fu(){return t.getToken()!==10?(p(3,[],[2,5]),!1):(L(!1),t.getToken()===6?(w(":"),B(),Ou()||p(4,[],[2,5])):p(5,[],[2,5]),r.pop(),!0)}function Be(){E(),B();let v=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(v||p(4,[],[]),w(","),B(),t.getToken()===2&&g)break}else v&&p(6,[],[]);Fu()||p(4,[],[2,5]),v=!0}return O(),t.getToken()!==2?p(7,[2],[]):B(),!0}function he(){C(),B();let v=!0,S=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(S||p(4,[],[]),w(","),B(),t.getToken()===4&&g)break}else S&&p(6,[],[]);v?(r.push(0),v=!1):r[r.length-1]++,Ou()||p(4,[],[4,5]),S=!0}return y(),v||r.pop(),t.getToken()!==4?p(8,[4],[]):B(),!0}function Ou(){switch(t.getToken()){case 3:return he();case 1:return Be();case 10:return L(!0);default:return X()}}return B(),t.getToken()===17?o.allowEmptyContent?!0:(p(4,[],[]),!1):Ou()?(t.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}var Qu;(function(u){u[u.None=0]="None",u[u.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=2]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",u[u.InvalidUnicode=4]="InvalidUnicode",u[u.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",u[u.InvalidCharacter=6]="InvalidCharacter"})(Qu||(Qu={}));var Yu;(function(u){u[u.OpenBraceToken=1]="OpenBraceToken",u[u.CloseBraceToken=2]="CloseBraceToken",u[u.OpenBracketToken=3]="OpenBracketToken",u[u.CloseBracketToken=4]="CloseBracketToken",u[u.CommaToken=5]="CommaToken",u[u.ColonToken=6]="ColonToken",u[u.NullKeyword=7]="NullKeyword",u[u.TrueKeyword=8]="TrueKeyword",u[u.FalseKeyword=9]="FalseKeyword",u[u.StringLiteral=10]="StringLiteral",u[u.NumericLiteral=11]="NumericLiteral",u[u.LineCommentTrivia=12]="LineCommentTrivia",u[u.BlockCommentTrivia=13]="BlockCommentTrivia",u[u.LineBreakTrivia=14]="LineBreakTrivia",u[u.Trivia=15]="Trivia",u[u.Unknown=16]="Unknown",u[u.EOF=17]="EOF"})(Yu||(Yu={}));const bu=Ye;var Zu;(function(u){u[u.InvalidSymbol=1]="InvalidSymbol",u[u.InvalidNumberFormat=2]="InvalidNumberFormat",u[u.PropertyNameExpected=3]="PropertyNameExpected",u[u.ValueExpected=4]="ValueExpected",u[u.ColonExpected=5]="ColonExpected",u[u.CommaExpected=6]="CommaExpected",u[u.CloseBraceExpected=7]="CloseBraceExpected",u[u.CloseBracketExpected=8]="CloseBracketExpected",u[u.EndOfFileExpected=9]="EndOfFileExpected",u[u.InvalidCommentToken=10]="InvalidCommentToken",u[u.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=12]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",u[u.InvalidUnicode=14]="InvalidUnicode",u[u.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",u[u.InvalidCharacter=16]="InvalidCharacter"})(Zu||(Zu={}));function Xe(u){switch(u){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}const ut=(u,e,o,t)=>{if(u.length===0)return;const r=u[0],D=ve(e,r.offset),i=new we(`${Xe(r.error)} at offset ${r.offset}`);throw i.fileName=o,i.codeFrame=ke(e,{start:D},{tabWidth:!1,...t}),i},et=(u,e)=>{const{allowEmptyContent:o,allowTrailingComma:t=!0,beforeParse:r,buffer:D,color:i,compression:c,disallowComments:a,encoding:l="utf8",flag:f}=e??{},E=z(u,{buffer:D,compression:c,encoding:l,flag:f}),$=typeof r=="function"?r(E):E,O=[],C=bu($,O,{allowEmptyContent:o,allowTrailingComma:t,disallowComments:a});return ut(O,$,xe(u),{color:i}),C},tt=Z(import.meta.url),ou=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rt=u=>{if(typeof ou<"u"&&ou.versions&&ou.versions.node){const[e,o]=ou.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ou.getBuiltinModule(u)}return tt(u)};rt("node:fs/promises");const ot=Z(import.meta.url),iu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,it=u=>{if(typeof iu<"u"&&iu.versions&&iu.versions.node){const[e,o]=iu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return iu.getBuiltinModule(u)}return ot(u)};it("node:fs");const st=(u,e)=>{const o=z(u,{encoding:"utf8",...e});return Se(o)};function nt(u,e,o){const{buffer:t,compression:r,encoding:D="utf8",flag:i,...c}={},a=z(u,{buffer:t,compression:r,encoding:D,flag:i});return typeof e=="function"?Ku(a,e,c):Ku(a,c)}var su={},Xu;function Dt(){if(Xu)return su;Xu=1,Object.defineProperty(su,"__esModule",{value:!0});const u=F=>F!==null&&typeof F=="object",e=(F,n)=>Object.assign(new Error(`[${F}]: ${n}`),{code:F}),o="ERR_INVALID_PACKAGE_CONFIG",t="ERR_INVALID_PACKAGE_TARGET",r="ERR_PACKAGE_PATH_NOT_EXPORTED",D="ERR_PACKAGE_IMPORT_NOT_DEFINED",i=/^\d+$/,c=/^(\.{1,2}|node_modules)$/i,a=/\/|\\/;var l=(F=>(F.Export="exports",F.Import="imports",F))(l||{});const f=(F,n,d,g,B)=>{if(n==null)return[];if(typeof n=="string"){const[p,...L]=n.split(a);if(p===".."||L.some(X=>c.test(X)))throw e(t,`Invalid "${F}" target "${n}" defined in the package config`);return[B?n.replace(/\*/g,B):n]}if(Array.isArray(n))return n.flatMap(p=>f(F,p,d,g,B));if(u(n)){for(const p of Object.keys(n)){if(i.test(p))throw e(o,"Cannot contain numeric property keys");if(p==="default"||g.includes(p))return f(F,n[p],d,g,B)}return[]}throw e(t,`Invalid "${F}" target "${n}"`)},E="*",$=(F,n)=>{const d=F.indexOf(E),g=n.indexOf(E);return d===g?n.length>F.length:g>d};function O(F,n){if(!n.includes(E)&&F.hasOwnProperty(n))return[n];let d,g;for(const B of Object.keys(F))if(B.includes(E)){const[p,L,X]=B.split(E);if(X===void 0&&n.startsWith(p)&&n.endsWith(L)){const Fu=n.slice(p.length,-L.length||void 0);Fu&&(!d||$(d,B))&&(d=B,g=Fu)}}return[d,g]}const C=F=>Object.keys(F).reduce((n,d)=>{const g=d===""||d[0]!==".";if(n===void 0||n===g)return g;throw e(o,'"exports" cannot contain some keys starting with "." and some not')},void 0),y=/^\w+:/,A=(F,n,d)=>{if(!F)throw new Error('"exports" is required');n=n===""?".":`./${n}`,(typeof F=="string"||Array.isArray(F)||u(F)&&C(F))&&(F={".":F});const[g,B]=O(F,n),p=f(l.Export,F[g],n,d,B);if(p.length===0)throw e(r,n==="."?'No "exports" main defined':`Package subpath '${n}' is not defined by "exports"`);for(const L of p)if(!L.startsWith("./")&&!y.test(L))throw e(t,`Invalid "exports" target "${L}" defined in the package config`);return p},w=(F,n,d)=>{if(!F)throw new Error('"imports" is required');const[g,B]=O(F,n),p=f(l.Import,F[g],n,d,B);if(p.length===0)throw e(D,`Package import specifier "${n}" is not defined in package`);return p};return su.resolveExports=A,su.resolveImports=w,su}var ct=Dt();const at=Z(import.meta.url),nu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ae=u=>{if(typeof nu<"u"&&nu.versions&&nu.versions.node){const[e,o]=nu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return nu.getBuiltinModule(u)}return at(u)},{statSync:Eu}=ae("node:fs"),lt=ae("node:module"),le=(u=process.cwd())=>{const{findPnpApi:e}=lt;return e?e(u):void 0},Ct=u=>bu(z(u,{buffer:!1})),xu=(u,e,o,t)=>{const r=`resolveFromPackageJsonPath:${u}:${e}:${o?"yes":"no"}`;if(t?.has(r))return t.get(r);const D=Ct(u);if(!D)return;let i=e||"tsconfig.json";if(!o&&D.exports)try{const[c]=ct.resolveExports(D.exports,e,["require","types"]);i=c}catch{return!1}else!e&&D.tsconfig&&(i=D.tsconfig);return i=I(u,"..",i),t?.set(r,i),i},$u="package.json",Tu="tsconfig.json",Ft=(u,e,o)=>{let t=u;if(u===".."&&(t=I(t,Tu)),u.startsWith(".")&&(t=R(e,t)),Mu(t)){if(_(t)){if(Eu(t).isFile())return t}else if(!t.endsWith(".json")){const O=`${t}.json`;if(_(O))return O}return}const[r="",...D]=u.split("/"),i=r.startsWith("@")?`${r}/${String(D.shift())}`:r,c=D.join("/"),a=le(e);if(a){const{resolveRequest:O}=a;try{if(i===u){const C=O(I(i,$u),e);if(C){const y=xu(C,c,!1,o);if(y&&_(y))return y}}else{let C;try{C=O(u,e,{extensions:[".json"]})}catch{C=O(I(u,Tu),e)}if(C)return C}}catch{}}const l=hu(O=>{const C=I(R(O),"node_modules",i);if(_(C))return I("node_modules",i)},{cwd:e,type:"directory"});if(!l||!Eu(l).isDirectory())return;const f=I(l,$u);if(_(f)){const O=xu(f,c,!1,o);if(O===!1)return;if(O&&_(O)&&Eu(O).isFile())return O}const E=I(l,c),$=E.endsWith(".json");if(!$){const O=`${E}.json`;if(_(O))return O}if(_(E)){if(Eu(E).isDirectory()){const O=I(E,$u);if(_(O)){const y=xu(O,"",!0,o);if(y&&_(y))return y}const C=I(E,Tu);if(_(C))return C}else if($)return E}},pt=u=>{const e=R(u);let o;const t=le(e);if(t)try{o=t.resolveRequest("typescript/package.json",e)??void 0}catch{}if(o??=hu(r=>I(r,"node_modules","typescript","package.json"),{cwd:e,type:"file"}),!!o)try{const r=bu(z(o,{buffer:!1}));if(typeof r?.version=="string")return r.version}catch{}},ft=new Set(["node16","node18","node20","nodenext"]),Ce=u=>u!==void 0&&ft.has(u),At=(u,e)=>{!e.has("target")&&!Ce(u.module)&&(u.target="es3")},Et=(u,e)=>{!e.has("target")&&!Ce(u.module)&&(u.target="es5")},dt=(u,e)=>{e.has("strict")||(u.strict=!0),e.has("target")||(u.target="es2025"),e.has("module")||(u.module="es2022"),e.has("moduleResolution")||(u.moduleResolution="bundler"),e.has("rootDir")||(u.rootDir="."),e.has("types")||(u.types=[]),e.has("noUncheckedSideEffectImports")||(u.noUncheckedSideEffectImports=!0),e.has("libReplacement")||(u.libReplacement=!1),e.has("alwaysStrict")||(u.alwaysStrict=!0)},mt=[[4,At],[5,Et],[6,dt]],Bt=/^v?(\d+)/,ht=u=>{const e=Bt.exec(u);return e?Number(e[1]):void 0},gt=(u,e)=>{const o=ht(e);if(o===void 0)return;const t=new Set(Object.keys(u));for(const[r,D]of mt)r<=o&&D(u,t)},yt=u=>bu(z(u,{buffer:!1})),bt=u=>u.replaceAll("\\","/"),lu=u=>{const e=$e(u);return Te(e)?e:`./${e}`},Ru=["files","include","exclude"],ue=(u,e,o)=>{const t=I(e,o),r=Cu(u,t);return Bu(r)||"./"},Ot=(u,e,o)=>{const t=Cu(u,e);if(!t)return o;const r=o.startsWith("./")?o.slice(2):o;return`${t}/${r}`},vt=(u,e,o,t,r)=>{if(o.has(u))throw new Error(`Circularity detected while resolving configuration: ${u}`);o.add(u);const D=K(u),i=Fe(u,t,o,r);delete i.references;const{compilerOptions:c}=i;if(c){const{baseUrl:a}=c;a&&!a.startsWith(j)&&(c.baseUrl=ue(e,D,a));const{outDir:l}=c;l&&!l.startsWith(j)&&(c.outDir=ue(e,D,l))}for(const a of Ru){const l=i[a];l&&(i[a]=l.map(f=>f.startsWith(j)||Mu(f)?f:Ot(e,D,f)))}return i},Fe=(u,e,o=new Set,t=new Map)=>{let r;try{r=yt(u)??{}}catch(i){throw new Error(`Cannot resolve tsconfig at path: ${u}`,{cause:i})}if(typeof r!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const D=K(u);if(r.compilerOptions){const{compilerOptions:i}=r;i.paths&&!i.baseUrl&&(i[pe]=D)}if(r.extends){const i=Array.isArray(r.extends)?r.extends:[r.extends];delete r.extends;const c=i.toReversed();for(let a=0;a<c.length;a++){const l=c[a],f=Ft(l,D,t);if(!f)throw new se(`No such file or directory, for '${l}' found.`);const E=vt(f,D,new Set(o),e,t);E.compilerOptions?.rootDir!==void 0&&!E.compilerOptions.rootDir.startsWith(j)&&(E.compilerOptions.rootDir=I(K(f),E.compilerOptions.rootDir));const $={...E,...r,compilerOptions:{...E.compilerOptions,...r.compilerOptions}};E.watchOptions&&($.watchOptions={...E.watchOptions,...r.watchOptions}),r=$}}if(r.compilerOptions){const{compilerOptions:i}=r;for(const c of["baseUrl","rootDir"]){const a=i[c];if(a&&!a.startsWith(j)){const l=R(D,a);i[c]=lu(Cu(D,l))}}for(const c of["outDir","declarationDir"]){let a=i[c];a&&(Array.isArray(r.exclude)||(r.exclude=["outDir","declarationDir"].map(l=>{const f=i[l];if(f)return f.startsWith(j)||Mu(f)?f:I(D,f)}).filter(Boolean)),a.startsWith(j)||(a=lu(a)),i[c]=a)}}else r.compilerOptions={};if(r.include&&(r.include=r.include.map(i=>bt(i))),r.files&&(r.files=r.files.map(i=>i.startsWith(j)?i:lu(i))),r.watchOptions){const{watchOptions:i}=r;i.excludeDirectories&&(i.excludeDirectories=i.excludeDirectories.map(c=>Bu(R(D,c)))),i.excludeFiles&&(i.excludeFiles=i.excludeFiles.map(c=>Bu(R(D,c)))),i.watchFile&&(i.watchFile=i.watchFile.toLowerCase()),i.watchDirectory&&(i.watchDirectory=i.watchDirectory.toLowerCase()),i.fallbackPolling&&(i.fallbackPolling=i.fallbackPolling.toLowerCase())}if(r.compilerOptions.lib&&(r.compilerOptions.lib=r.compilerOptions.lib.map(i=>i.toLowerCase())),r.compilerOptions.module){let i=r.compilerOptions.module.toLowerCase();i==="es2015"&&(i="es6"),r.compilerOptions.module=i}if(r.compilerOptions.target){let i=r.compilerOptions.target.toLowerCase();i==="es2015"&&(i="es6"),r.compilerOptions.target=i}if(r.compilerOptions.moduleResolution){let i=r.compilerOptions.moduleResolution.toLowerCase();i==="node"&&(i="node10"),r.compilerOptions.moduleResolution=i}return r.compilerOptions.jsx&&(r.compilerOptions.jsx=r.compilerOptions.jsx.toLowerCase()),r.compilerOptions.moduleDetection&&(r.compilerOptions.moduleDetection=r.compilerOptions.moduleDetection.toLowerCase()),r.compilerOptions.importsNotUsedAsValues&&(r.compilerOptions.importsNotUsedAsValues=r.compilerOptions.importsNotUsedAsValues.toLowerCase()),r.compilerOptions.newLine&&(r.compilerOptions.newLine=r.compilerOptions.newLine.toLowerCase()),r},du=(u,e)=>{if(u.startsWith(j))return Bu(I(e,u.slice(j.length)))},wt=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Su=u=>u==="es2022"||u==="es2023"||u==="es2024"||u==="es2025"||u==="esnext",kt=(u,e)=>{if(u.compilerOptions===void 0)return u;if(u.compilerOptions.rewriteRelativeImportExtensions&&(u.compilerOptions.allowImportingTsExtensions??=!0),u.compilerOptions.composite&&(u.compilerOptions.declaration??=!0,u.compilerOptions.incremental??=!0),u.compilerOptions.checkJs&&(u.compilerOptions.allowJs??=!0),u.compilerOptions.verbatimModuleSyntax&&(u.compilerOptions.isolatedModules??=!0,u.compilerOptions.preserveConstEnums??=!0),["5.4","5.5","5.6","5.7","5.8","5.9","true"].includes(String(e?.tscCompatible))){if(u.compilerOptions.esModuleInterop===void 0&&(u.compilerOptions.module==="node16"||u.compilerOptions.module==="node18"||u.compilerOptions.module==="node20"||u.compilerOptions.module==="nodenext"||u.compilerOptions.module==="preserve")&&(u.compilerOptions.esModuleInterop=!0),u.compilerOptions.moduleDetection===void 0&&u.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(u.compilerOptions.module)&&(u.compilerOptions.moduleDetection="force"),u.compilerOptions.moduleResolution===void 0){let o="classic";if(u.compilerOptions.module!==void 0)switch(u.compilerOptions.module.toLocaleLowerCase()){case"commonjs":{o="node10";break}case"node16":case"node18":{o="node16";break}case"node20":{o="node16";break}case"nodenext":{o="nodenext";break}case"preserve":{o="bundler";break}}o!=="classic"&&(u.compilerOptions.moduleResolution=o)}if(u.compilerOptions.moduleResolution==="bundler"&&(u.compilerOptions.resolveJsonModule??=!0),u.compilerOptions.module&&["node20","nodenext"].includes(u.compilerOptions.module)&&(u.compilerOptions.resolveJsonModule??=!0),(u.compilerOptions.esModuleInterop||u.compilerOptions.module==="system"||u.compilerOptions.moduleResolution==="bundler")&&u.compilerOptions.allowSyntheticDefaultImports===void 0&&(u.compilerOptions.allowSyntheticDefaultImports=!0),["5.7","5.8","5.9","true"].includes(String(e?.tscCompatible))&&u.compilerOptions.moduleResolution){let o=!1;["bundler","node16","nodenext"].includes(u.compilerOptions.moduleResolution.toLocaleLowerCase())&&(o=!0),u.compilerOptions.resolvePackageJsonExports===void 0&&o&&(u.compilerOptions.resolvePackageJsonExports=!0),u.compilerOptions.resolvePackageJsonImports===void 0&&o&&(u.compilerOptions.resolvePackageJsonImports=!0)}if(u.compilerOptions.target===void 0){let o="es5";switch(u.compilerOptions.module){case"node16":case"node18":{o="es2022";break}case"node20":{o="es2023";break}case"nodenext":{o="esnext";break}}o!=="es5"&&(u.compilerOptions.target=o)}u.compilerOptions.useDefineForClassFields===void 0&&u.compilerOptions.target&&Su(u.compilerOptions.target)&&(u.compilerOptions.useDefineForClassFields=!0)}if(["5.6","5.7","5.8","5.9","true"].includes(String(e?.tscCompatible))&&u.compilerOptions.strict&&u.compilerOptions.strictBuiltinIteratorReturn===void 0&&(u.compilerOptions.strictBuiltinIteratorReturn=!0),["5.4","5.5","5.6","5.7","5.8","5.9","true"].includes(String(e?.tscCompatible))&&(u.compilerOptions.strict&&(u.compilerOptions.noImplicitAny=u.compilerOptions.noImplicitAny??!0,u.compilerOptions.noImplicitThis=u.compilerOptions.noImplicitThis??!0,u.compilerOptions.strictNullChecks=u.compilerOptions.strictNullChecks??!0,u.compilerOptions.strictFunctionTypes=u.compilerOptions.strictFunctionTypes??!0,u.compilerOptions.strictBindCallApply=u.compilerOptions.strictBindCallApply??!0,u.compilerOptions.strictPropertyInitialization=u.compilerOptions.strictPropertyInitialization??!0,u.compilerOptions.alwaysStrict=u.compilerOptions.alwaysStrict??!0),u.compilerOptions.useDefineForClassFields===void 0&&u.compilerOptions.target&&Su(u.compilerOptions.target)&&(u.compilerOptions.useDefineForClassFields=!0),u.compilerOptions.strict&&u.compilerOptions.useUnknownInCatchVariables===void 0&&(u.compilerOptions.useUnknownInCatchVariables=!0),u.compilerOptions.isolatedModules&&(u.compilerOptions.preserveConstEnums=u.compilerOptions.preserveConstEnums??!0)),String(e?.tscCompatible)==="6.0"){if(u.compilerOptions.moduleDetection===void 0&&u.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(u.compilerOptions.module)&&(u.compilerOptions.moduleDetection="force"),u.compilerOptions.moduleResolution===void 0&&u.compilerOptions.module){const o=u.compilerOptions.module.toLocaleLowerCase();o==="node16"||o==="node18"||o==="node20"?u.compilerOptions.moduleResolution="node16":o==="nodenext"&&(u.compilerOptions.moduleResolution="nodenext")}if(u.compilerOptions.useDefineForClassFields===void 0&&u.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(u.compilerOptions.module)&&u.compilerOptions.target&&!Su(u.compilerOptions.target)&&(u.compilerOptions.useDefineForClassFields=!1),u.compilerOptions.isolatedModules&&u.compilerOptions.preserveConstEnums===void 0&&(u.compilerOptions.preserveConstEnums=!0),u.compilerOptions.resolveJsonModule===void 0){const o=u.compilerOptions.module,t=u.compilerOptions.moduleResolution?.toLocaleLowerCase();!(o!==void 0&&["node20","nodenext"].includes(o)||t==="bundler")&&t&&(u.compilerOptions.resolveJsonModule=!1)}if(u.compilerOptions.moduleResolution){const o=u.compilerOptions.moduleResolution.toLocaleLowerCase();["bundler","node16","nodenext"].includes(o)||(u.compilerOptions.resolvePackageJsonExports??=!1,u.compilerOptions.resolvePackageJsonImports??=!1)}}return u.compileOnSave===!1&&delete u.compileOnSave,u},xt=(u,e)=>{const o=u?.typescriptVersion;if(!(o===!1||o===void 0))return o==="auto"?pt(e):o},j="${configDir}",pe=Symbol("implicitBaseUrl"),$t=(u,e)=>{const o=R(u),t=Fe(o,e),r=K(o),D=xt(e,r);D&&t.compilerOptions&>(t.compilerOptions,D);const{compilerOptions:i}=t;if(i){for(const a of wt){const l=i[a];if(l){const f=du(l,r);i[a]=f?lu(Cu(r,f)):l}}for(const a of["rootDirs","typeRoots"]){const l=i[a];l&&(i[a]=l.map(f=>{const E=du(f,r);return E?lu(Cu(r,E)):f}))}const{paths:c}=i;if(c){const a=Object.keys(c);for(let l=0;l<a.length;l++){const f=a[l];c[f]=c[f].map(E=>du(E,r)??E)}}}for(let c=0;c<Ru.length;c++){const a=Ru[c],l=t[a];l&&(t[a]=l.map(f=>du(f,r)??f))}return kt(t,e)},Tt=Z(import.meta.url),Du=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,St=u=>{if(typeof Du<"u"&&Du.versions&&Du.versions.node){const[e,o]=Du.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Du.getBuiltinModule(u)}return Tt(u)},{statSync:Nt}=St("node:fs"),It=new Map,Pt="tsconfig.json",jt=(u,e)=>{let o=0;try{o=Nt(u).mtimeMs}catch{}return`${u}::${String(e.tscCompatible)}::${String(e.typescriptVersion)}::${String(o)}`},Lt=(u,e={})=>{const o=e.configFileName??Pt,t=e.configFileName===void 0;let r=hu(o,{...u&&{cwd:u},type:"file"});if(!r&&t&&(r=hu("jsconfig.json",{...u&&{cwd:u},type:"file"})),!r)throw new se(t?`No such file or directory, for '${o}' or 'jsconfig.json' found.`:`No such file or directory, for '${o}' found.`);const D=e.cache&&typeof e.cache!="boolean"?e.cache:It,i=jt(r,e);if(e.cache&&D.has(i))return D.get(i);const c={config:$t(r,{tscCompatible:e.tscCompatible,typescriptVersion:e.typescriptVersion}),path:r};return e.cache&&D.set(i,c),c},_t=/\.[cm]?tsx?$/,Rt=[".yaml",".yml",".toml",".jsonc",".json5",".txt"],fe=/\.(?:ya?ml|toml|jsonc|json5|txt)$/,Ut=u=>u.endsWith(".yaml")||u.endsWith(".yml")?nt(u):u.endsWith(".toml")?st(u):u.endsWith(".jsonc")?et(u,{allowTrailingComma:!0}):u.endsWith(".json5")?qe(u):Vu(u,"utf8"),Uu=u=>u===void 0?"undefined":u===null?"null":typeof u=="number"?Number.isNaN(u)?"NaN":u===Number.POSITIVE_INFINITY?"Infinity":u===Number.NEGATIVE_INFINITY?"-Infinity":String(u):typeof u=="bigint"?`${u}n`:typeof u=="boolean"?String(u):typeof u=="string"?JSON.stringify(u):u instanceof Date?`new Date(${JSON.stringify(u.toISOString())})`:Array.isArray(u)?`[${u.map(e=>Uu(e)).join(",")}]`:typeof u=="object"?`{${Object.entries(u).map(([e,o])=>`${JSON.stringify(e)}:${Uu(o)}`).join(",")}}`:"null",Nu=new Map,Wt=(u,e)=>u.startsWith(j)?I(e,u.slice(j.length)):u,Vt=u=>{if(Nu.has(u))return Nu.get(u);let e;try{const{config:o,path:t}=Lt(u,{cache:!1}),r=K(t),D=o.compilerOptions,i=D?.paths??{};if(D!==void 0){const{baseUrl:c}=D;let a,l=!1;if(c===void 0){const f=D[pe];a=typeof f=="string"?f:r}else l=!0,a=R(r,Wt(c,r));e={hasBaseUrl:l,paths:i,pathsBase:a}}}catch{e=void 0}return Nu.set(u,e),e},Ae=(u,e)=>{const o=Vt(e);if(o===void 0)return;const{hasBaseUrl:t,pathsBase:r}=o,D=i=>Ee(i)??de(i);for(const[i,c]of Object.entries(o.paths)){const a=i.indexOf("*");if(a===-1){if(i===u)for(const E of c){const $=D(R(r,E));if($!==void 0)return $}continue}const l=i.slice(0,a),f=i.slice(a+1);if(u.startsWith(l)&&u.endsWith(f)&&u.length>=l.length+f.length){const E=u.slice(l.length,u.length-f.length);for(const $ of c){const O=$.replace("*",E),C=D(R(r,O));if(C!==void 0)return C}}}if(t){const i=D(R(r,u));if(i!==void 0)return i}};let ee=!1,Iu=0,te=!1,re=!1;const Mt=()=>{re||(re=!0,process.setSourceMapsEnabled?.(!0))},Jt=u=>{const e=u.indexOf("?");return e===-1?u:u.slice(0,e)},qt=u=>u.endsWith(".cts")?"commonjs":"module",oe=[".ts",".tsx",".mts",".cts",".js",".mjs",".cjs",".json"],Y=u=>{try{return ie(u).isFile()}catch{return!1}},Ht=u=>{try{return ie(u).isDirectory()}catch{return!1}},Kt=u=>{if(u.endsWith(".js"))return`${u.slice(0,-3)}.ts`;if(u.endsWith(".mjs"))return`${u.slice(0,-4)}.mts`;if(u.endsWith(".cjs"))return`${u.slice(0,-4)}.cts`},Ee=u=>{if(Y(u))return u;const e=Kt(u);if(e!==void 0&&Y(e))return e;for(const o of oe)if(Y(u+o))return u+o;if(Ht(u))for(const o of oe){const t=`${u}/index${o}`;if(Y(t))return t}},de=u=>{if(Y(u)&&fe.test(u))return u;for(const e of Rt)if(Y(u+e))return u+e},me=()=>{Mt();const{registerHooks:u}=Pu;return typeof u!="function"?!1:(ee||(u({load(e,o,t){const r=Jt(e);if(r.startsWith("file:")&&_t.test(r)){const D=fu(r),{code:i}=ne(D,Vu(D,"utf8"));return{format:qt(D),shortCircuit:!0,source:i}}if(r.startsWith("file:")&&fe.test(r)){const D=fu(r),i=Ut(D);return{format:"module",shortCircuit:!0,source:`export default ${Uu(i)};
|
|
21
|
-
`}}return t(e,o)},resolve(e,o,t){if((e.startsWith(".")||e.startsWith("/"))&&o.parentURL!==void 0){let r;try{r=new URL(e,o.parentURL)}catch{r=void 0}if(r?.protocol==="file:"){const D=fu(r),
|
|
22
|
-
`));const{code:e}=ne(u,Vu(u,"utf8")),o=I(K(u),`.vis-ts-${String(Iu)}-${String(process.pid)}.mjs`);be(o,e);try{return await import(mu(o).href)}finally{try{Oe(o)}catch{}}},
|
|
20
|
+
`+" ".repeat(e));var yu;(function(u){u.DEFAULT={allowTrailingComma:!1}})(yu||(yu={}));function Ye(u,e=[],o=yu.DEFAULT){let t=null,r=[];const D=[];function s(c){Array.isArray(r)?r.push(c):t!==null&&(r[t]=c)}return Ze(u,{onObjectBegin:()=>{const c={};s(c),D.push(r),r=c,t=null},onObjectProperty:c=>{t=c},onObjectEnd:()=>{r=D.pop()},onArrayBegin:()=>{const c=[];s(c),D.push(r),r=c,t=null},onArrayEnd:()=>{r=D.pop()},onLiteralValue:s,onError:(c,a,l)=>{e.push({error:c,offset:a,length:l})}},o),r[0]}function Ze(u,e,o=yu.DEFAULT){const t=Qe(u,!1),r=[];let D=0;function s(v){return v?()=>D===0&&v(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function c(v){return v?S=>D===0&&v(S,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function a(v){return v?S=>D===0&&v(S,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>r.slice()):()=>!0}function l(v){return v?()=>{D>0?D++:v(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>r.slice())===!1&&(D=1)}:()=>!0}function f(v){return v?()=>{D>0&&D--,D===0&&v(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter())}:()=>!0}const E=l(e.onObjectBegin),$=a(e.onObjectProperty),O=f(e.onObjectEnd),C=l(e.onArrayBegin),y=f(e.onArrayEnd),A=a(e.onLiteralValue),w=c(e.onSeparator),F=s(e.onComment),n=c(e.onError),d=o&&o.disallowComments,g=o&&o.allowTrailingComma;function B(){for(;;){const v=t.scan();switch(t.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:d||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(v){case 12:case 13:d?p(10):F();break;case 16:p(1);break;case 15:case 14:break;default:return v}}}function p(v,S=[],Hu=[]){if(n(v),S.length+Hu.length>0){let pu=t.getToken();for(;pu!==17;){if(S.indexOf(pu)!==-1){B();break}else if(Hu.indexOf(pu)!==-1)break;pu=B()}}}function L(v){const S=t.getTokenValue();return v?A(S):($(S),r.push(S)),B(),!0}function X(){switch(t.getToken()){case 11:const v=t.getTokenValue();let S=Number(v);isNaN(S)&&(p(2),S=0),A(S);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return B(),!0}function Fu(){return t.getToken()!==10?(p(3,[],[2,5]),!1):(L(!1),t.getToken()===6?(w(":"),B(),Ou()||p(4,[],[2,5])):p(5,[],[2,5]),r.pop(),!0)}function Be(){E(),B();let v=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(v||p(4,[],[]),w(","),B(),t.getToken()===2&&g)break}else v&&p(6,[],[]);Fu()||p(4,[],[2,5]),v=!0}return O(),t.getToken()!==2?p(7,[2],[]):B(),!0}function he(){C(),B();let v=!0,S=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(S||p(4,[],[]),w(","),B(),t.getToken()===4&&g)break}else S&&p(6,[],[]);v?(r.push(0),v=!1):r[r.length-1]++,Ou()||p(4,[],[4,5]),S=!0}return y(),v||r.pop(),t.getToken()!==4?p(8,[4],[]):B(),!0}function Ou(){switch(t.getToken()){case 3:return he();case 1:return Be();case 10:return L(!0);default:return X()}}return B(),t.getToken()===17?o.allowEmptyContent?!0:(p(4,[],[]),!1):Ou()?(t.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}var Qu;(function(u){u[u.None=0]="None",u[u.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=2]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",u[u.InvalidUnicode=4]="InvalidUnicode",u[u.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",u[u.InvalidCharacter=6]="InvalidCharacter"})(Qu||(Qu={}));var Yu;(function(u){u[u.OpenBraceToken=1]="OpenBraceToken",u[u.CloseBraceToken=2]="CloseBraceToken",u[u.OpenBracketToken=3]="OpenBracketToken",u[u.CloseBracketToken=4]="CloseBracketToken",u[u.CommaToken=5]="CommaToken",u[u.ColonToken=6]="ColonToken",u[u.NullKeyword=7]="NullKeyword",u[u.TrueKeyword=8]="TrueKeyword",u[u.FalseKeyword=9]="FalseKeyword",u[u.StringLiteral=10]="StringLiteral",u[u.NumericLiteral=11]="NumericLiteral",u[u.LineCommentTrivia=12]="LineCommentTrivia",u[u.BlockCommentTrivia=13]="BlockCommentTrivia",u[u.LineBreakTrivia=14]="LineBreakTrivia",u[u.Trivia=15]="Trivia",u[u.Unknown=16]="Unknown",u[u.EOF=17]="EOF"})(Yu||(Yu={}));const bu=Ye;var Zu;(function(u){u[u.InvalidSymbol=1]="InvalidSymbol",u[u.InvalidNumberFormat=2]="InvalidNumberFormat",u[u.PropertyNameExpected=3]="PropertyNameExpected",u[u.ValueExpected=4]="ValueExpected",u[u.ColonExpected=5]="ColonExpected",u[u.CommaExpected=6]="CommaExpected",u[u.CloseBraceExpected=7]="CloseBraceExpected",u[u.CloseBracketExpected=8]="CloseBracketExpected",u[u.EndOfFileExpected=9]="EndOfFileExpected",u[u.InvalidCommentToken=10]="InvalidCommentToken",u[u.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",u[u.UnexpectedEndOfString=12]="UnexpectedEndOfString",u[u.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",u[u.InvalidUnicode=14]="InvalidUnicode",u[u.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",u[u.InvalidCharacter=16]="InvalidCharacter"})(Zu||(Zu={}));function Xe(u){switch(u){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}const ut=(u,e,o,t)=>{if(u.length===0)return;const r=u[0],D=ve(e,r.offset),s=new we(`${Xe(r.error)} at offset ${r.offset}`);throw s.fileName=o,s.codeFrame=ke(e,{start:D},{tabWidth:!1,...t}),s},et=(u,e)=>{const{allowEmptyContent:o,allowTrailingComma:t=!0,beforeParse:r,buffer:D,color:s,compression:c,disallowComments:a,encoding:l="utf8",flag:f}=e??{},E=z(u,{buffer:D,compression:c,encoding:l,flag:f}),$=typeof r=="function"?r(E):E,O=[],C=bu($,O,{allowEmptyContent:o,allowTrailingComma:t,disallowComments:a});return ut(O,$,xe(u),{color:s}),C},tt=Z(import.meta.url),ou=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rt=u=>{if(typeof ou<"u"&&ou.versions&&ou.versions.node){const[e,o]=ou.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ou.getBuiltinModule(u)}return tt(u)};rt("node:fs/promises");const ot=Z(import.meta.url),su=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,st=u=>{if(typeof su<"u"&&su.versions&&su.versions.node){const[e,o]=su.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return su.getBuiltinModule(u)}return ot(u)};st("node:fs");const it=(u,e)=>{const o=z(u,{encoding:"utf8",...e});return Se(o)};function nt(u,e,o){const{buffer:t,compression:r,encoding:D="utf8",flag:s,...c}={},a=z(u,{buffer:t,compression:r,encoding:D,flag:s});return typeof e=="function"?Ku(a,e,c):Ku(a,c)}var iu={},Xu;function Dt(){if(Xu)return iu;Xu=1,Object.defineProperty(iu,"__esModule",{value:!0});const u=F=>F!==null&&typeof F=="object",e=(F,n)=>Object.assign(new Error(`[${F}]: ${n}`),{code:F}),o="ERR_INVALID_PACKAGE_CONFIG",t="ERR_INVALID_PACKAGE_TARGET",r="ERR_PACKAGE_PATH_NOT_EXPORTED",D="ERR_PACKAGE_IMPORT_NOT_DEFINED",s=/^\d+$/,c=/^(\.{1,2}|node_modules)$/i,a=/\/|\\/;var l=(F=>(F.Export="exports",F.Import="imports",F))(l||{});const f=(F,n,d,g,B)=>{if(n==null)return[];if(typeof n=="string"){const[p,...L]=n.split(a);if(p===".."||L.some(X=>c.test(X)))throw e(t,`Invalid "${F}" target "${n}" defined in the package config`);return[B?n.replace(/\*/g,B):n]}if(Array.isArray(n))return n.flatMap(p=>f(F,p,d,g,B));if(u(n)){for(const p of Object.keys(n)){if(s.test(p))throw e(o,"Cannot contain numeric property keys");if(p==="default"||g.includes(p))return f(F,n[p],d,g,B)}return[]}throw e(t,`Invalid "${F}" target "${n}"`)},E="*",$=(F,n)=>{const d=F.indexOf(E),g=n.indexOf(E);return d===g?n.length>F.length:g>d};function O(F,n){if(!n.includes(E)&&F.hasOwnProperty(n))return[n];let d,g;for(const B of Object.keys(F))if(B.includes(E)){const[p,L,X]=B.split(E);if(X===void 0&&n.startsWith(p)&&n.endsWith(L)){const Fu=n.slice(p.length,-L.length||void 0);Fu&&(!d||$(d,B))&&(d=B,g=Fu)}}return[d,g]}const C=F=>Object.keys(F).reduce((n,d)=>{const g=d===""||d[0]!==".";if(n===void 0||n===g)return g;throw e(o,'"exports" cannot contain some keys starting with "." and some not')},void 0),y=/^\w+:/,A=(F,n,d)=>{if(!F)throw new Error('"exports" is required');n=n===""?".":`./${n}`,(typeof F=="string"||Array.isArray(F)||u(F)&&C(F))&&(F={".":F});const[g,B]=O(F,n),p=f(l.Export,F[g],n,d,B);if(p.length===0)throw e(r,n==="."?'No "exports" main defined':`Package subpath '${n}' is not defined by "exports"`);for(const L of p)if(!L.startsWith("./")&&!y.test(L))throw e(t,`Invalid "exports" target "${L}" defined in the package config`);return p},w=(F,n,d)=>{if(!F)throw new Error('"imports" is required');const[g,B]=O(F,n),p=f(l.Import,F[g],n,d,B);if(p.length===0)throw e(D,`Package import specifier "${n}" is not defined in package`);return p};return iu.resolveExports=A,iu.resolveImports=w,iu}var ct=Dt();const at=Z(import.meta.url),nu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ae=u=>{if(typeof nu<"u"&&nu.versions&&nu.versions.node){const[e,o]=nu.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return nu.getBuiltinModule(u)}return at(u)},{statSync:Eu}=ae("node:fs"),lt=ae("node:module"),le=(u=process.cwd())=>{const{findPnpApi:e}=lt;return e?e(u):void 0},Ct=u=>bu(z(u,{buffer:!1})),xu=(u,e,o,t)=>{const r=`resolveFromPackageJsonPath:${u}:${e}:${o?"yes":"no"}`;if(t?.has(r))return t.get(r);const D=Ct(u);if(!D)return;let s=e||"tsconfig.json";if(!o&&D.exports)try{const[c]=ct.resolveExports(D.exports,e,["require","types"]);s=c}catch{return!1}else!e&&D.tsconfig&&(s=D.tsconfig);return s=I(u,"..",s),t?.set(r,s),s},$u="package.json",Tu="tsconfig.json",Ft=(u,e,o)=>{let t=u;if(u===".."&&(t=I(t,Tu)),u.startsWith(".")&&(t=R(e,t)),Mu(t)){if(_(t)){if(Eu(t).isFile())return t}else if(!t.endsWith(".json")){const O=`${t}.json`;if(_(O))return O}return}const[r="",...D]=u.split("/"),s=r.startsWith("@")?`${r}/${String(D.shift())}`:r,c=D.join("/"),a=le(e);if(a){const{resolveRequest:O}=a;try{if(s===u){const C=O(I(s,$u),e);if(C){const y=xu(C,c,!1,o);if(y&&_(y))return y}}else{let C;try{C=O(u,e,{extensions:[".json"]})}catch{C=O(I(u,Tu),e)}if(C)return C}}catch{}}const l=hu(O=>{const C=I(R(O),"node_modules",s);if(_(C))return I("node_modules",s)},{cwd:e,type:"directory"});if(!l||!Eu(l).isDirectory())return;const f=I(l,$u);if(_(f)){const O=xu(f,c,!1,o);if(O===!1)return;if(O&&_(O)&&Eu(O).isFile())return O}const E=I(l,c),$=E.endsWith(".json");if(!$){const O=`${E}.json`;if(_(O))return O}if(_(E)){if(Eu(E).isDirectory()){const O=I(E,$u);if(_(O)){const y=xu(O,"",!0,o);if(y&&_(y))return y}const C=I(E,Tu);if(_(C))return C}else if($)return E}},pt=u=>{const e=R(u);let o;const t=le(e);if(t)try{o=t.resolveRequest("typescript/package.json",e)??void 0}catch{}if(o??=hu(r=>I(r,"node_modules","typescript","package.json"),{cwd:e,type:"file"}),!!o)try{const r=bu(z(o,{buffer:!1}));if(typeof r?.version=="string")return r.version}catch{}},ft=new Set(["node16","node18","node20","nodenext"]),Ce=u=>u!==void 0&&ft.has(u),At=(u,e)=>{!e.has("target")&&!Ce(u.module)&&(u.target="es3")},Et=(u,e)=>{!e.has("target")&&!Ce(u.module)&&(u.target="es5")},dt=(u,e)=>{e.has("strict")||(u.strict=!0),e.has("target")||(u.target="es2025"),e.has("module")||(u.module="es2022"),e.has("moduleResolution")||(u.moduleResolution="bundler"),e.has("rootDir")||(u.rootDir="."),e.has("types")||(u.types=[]),e.has("noUncheckedSideEffectImports")||(u.noUncheckedSideEffectImports=!0),e.has("libReplacement")||(u.libReplacement=!1),e.has("alwaysStrict")||(u.alwaysStrict=!0)},mt=(u,e)=>{e.has("module")||(u.module="esnext"),e.has("moduleResolution")||(u.moduleResolution="bundler"),e.has("stableTypeOrdering")||(u.stableTypeOrdering=!0)},Bt=[[4,At],[5,Et],[6,dt],[7,mt]],ht=/^v?(\d+)/,gt=u=>{const e=ht.exec(u);return e?Number(e[1]):void 0},yt=(u,e)=>{const o=gt(e);if(o===void 0)return;const t=new Set(Object.keys(u));for(const[r,D]of Bt)r<=o&&D(u,t)},bt=u=>bu(z(u,{buffer:!1})),Ot=u=>u.replaceAll("\\","/"),lu=u=>{const e=$e(u);return Te(e)?e:`./${e}`},Ru=["files","include","exclude"],ue=(u,e,o)=>{const t=I(e,o),r=Cu(u,t);return Bu(r)||"./"},vt=(u,e,o)=>{const t=Cu(u,e);if(!t)return o;const r=o.startsWith("./")?o.slice(2):o;return`${t}/${r}`},wt=(u,e,o,t,r)=>{if(o.has(u))throw new Error(`Circularity detected while resolving configuration: ${u}`);o.add(u);const D=K(u),s=Fe(u,t,o,r);delete s.references;const{compilerOptions:c}=s;if(c){const{baseUrl:a}=c;a&&!a.startsWith(j)&&(c.baseUrl=ue(e,D,a));const{outDir:l}=c;l&&!l.startsWith(j)&&(c.outDir=ue(e,D,l))}for(const a of Ru){const l=s[a];l&&(s[a]=l.map(f=>f.startsWith(j)||Mu(f)?f:vt(e,D,f)))}return s},Fe=(u,e,o=new Set,t=new Map)=>{let r;try{r=bt(u)??{}}catch(s){throw new Error(`Cannot resolve tsconfig at path: ${u}`,{cause:s})}if(typeof r!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${u}`);const D=K(u);if(r.compilerOptions){const{compilerOptions:s}=r;s.paths&&!s.baseUrl&&(s[pe]=D)}if(r.extends){const s=Array.isArray(r.extends)?r.extends:[r.extends];delete r.extends;const c=s.toReversed();for(let a=0;a<c.length;a++){const l=c[a],f=Ft(l,D,t);if(!f)throw new ie(`No such file or directory, for '${l}' found.`);const E=wt(f,D,new Set(o),e,t);E.compilerOptions?.rootDir!==void 0&&!E.compilerOptions.rootDir.startsWith(j)&&(E.compilerOptions.rootDir=I(K(f),E.compilerOptions.rootDir));const $={...E,...r,compilerOptions:{...E.compilerOptions,...r.compilerOptions}};E.watchOptions&&($.watchOptions={...E.watchOptions,...r.watchOptions}),r=$}}if(r.compilerOptions){const{compilerOptions:s}=r;for(const c of["baseUrl","rootDir"]){const a=s[c];if(a&&!a.startsWith(j)){const l=R(D,a);s[c]=lu(Cu(D,l))}}for(const c of["outDir","declarationDir"]){let a=s[c];a&&(Array.isArray(r.exclude)||(r.exclude=["outDir","declarationDir"].map(l=>{const f=s[l];if(f)return f.startsWith(j)||Mu(f)?f:I(D,f)}).filter(Boolean)),a.startsWith(j)||(a=lu(a)),s[c]=a)}}else r.compilerOptions={};if(r.include&&(r.include=r.include.map(s=>Ot(s))),r.files&&(r.files=r.files.map(s=>s.startsWith(j)?s:lu(s))),r.watchOptions){const{watchOptions:s}=r;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(c=>Bu(R(D,c)))),s.excludeFiles&&(s.excludeFiles=s.excludeFiles.map(c=>Bu(R(D,c)))),s.watchFile&&(s.watchFile=s.watchFile.toLowerCase()),s.watchDirectory&&(s.watchDirectory=s.watchDirectory.toLowerCase()),s.fallbackPolling&&(s.fallbackPolling=s.fallbackPolling.toLowerCase())}if(r.compilerOptions.lib&&(r.compilerOptions.lib=r.compilerOptions.lib.map(s=>s.toLowerCase())),r.compilerOptions.module){let s=r.compilerOptions.module.toLowerCase();s==="es2015"&&(s="es6"),r.compilerOptions.module=s}if(r.compilerOptions.target){let s=r.compilerOptions.target.toLowerCase();s==="es2015"&&(s="es6"),r.compilerOptions.target=s}if(r.compilerOptions.moduleResolution){let s=r.compilerOptions.moduleResolution.toLowerCase();s==="node"&&(s="node10"),r.compilerOptions.moduleResolution=s}return r.compilerOptions.jsx&&(r.compilerOptions.jsx=r.compilerOptions.jsx.toLowerCase()),r.compilerOptions.moduleDetection&&(r.compilerOptions.moduleDetection=r.compilerOptions.moduleDetection.toLowerCase()),r.compilerOptions.importsNotUsedAsValues&&(r.compilerOptions.importsNotUsedAsValues=r.compilerOptions.importsNotUsedAsValues.toLowerCase()),r.compilerOptions.newLine&&(r.compilerOptions.newLine=r.compilerOptions.newLine.toLowerCase()),r},du=(u,e)=>{if(u.startsWith(j))return Bu(I(e,u.slice(j.length)))},kt=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Su=u=>u==="es2022"||u==="es2023"||u==="es2024"||u==="es2025"||u==="esnext",xt=(u,e)=>{if(u.compilerOptions===void 0)return u;if(u.compilerOptions.rewriteRelativeImportExtensions&&(u.compilerOptions.allowImportingTsExtensions??=!0),u.compilerOptions.composite&&(u.compilerOptions.declaration??=!0,u.compilerOptions.incremental??=!0),u.compilerOptions.checkJs&&(u.compilerOptions.allowJs??=!0),u.compilerOptions.verbatimModuleSyntax&&(u.compilerOptions.isolatedModules??=!0,u.compilerOptions.preserveConstEnums??=!0),["5.4","5.5","5.6","5.7","5.8","5.9"].includes(String(e?.tscCompatible))){if(u.compilerOptions.esModuleInterop===void 0&&(u.compilerOptions.module==="node16"||u.compilerOptions.module==="node18"||u.compilerOptions.module==="node20"||u.compilerOptions.module==="nodenext"||u.compilerOptions.module==="preserve")&&(u.compilerOptions.esModuleInterop=!0),u.compilerOptions.moduleDetection===void 0&&u.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(u.compilerOptions.module)&&(u.compilerOptions.moduleDetection="force"),u.compilerOptions.moduleResolution===void 0){let o="classic";if(u.compilerOptions.module!==void 0)switch(u.compilerOptions.module.toLocaleLowerCase()){case"commonjs":{o="node10";break}case"node16":case"node18":{o="node16";break}case"node20":{o="node16";break}case"nodenext":{o="nodenext";break}case"preserve":{o="bundler";break}}o!=="classic"&&(u.compilerOptions.moduleResolution=o)}if(u.compilerOptions.moduleResolution==="bundler"&&(u.compilerOptions.resolveJsonModule??=!0),u.compilerOptions.module&&["node20","nodenext"].includes(u.compilerOptions.module)&&(u.compilerOptions.resolveJsonModule??=!0),(u.compilerOptions.esModuleInterop||u.compilerOptions.module==="system"||u.compilerOptions.moduleResolution==="bundler")&&u.compilerOptions.allowSyntheticDefaultImports===void 0&&(u.compilerOptions.allowSyntheticDefaultImports=!0),["5.7","5.8","5.9"].includes(String(e?.tscCompatible))&&u.compilerOptions.moduleResolution){let o=!1;["bundler","node16","nodenext"].includes(u.compilerOptions.moduleResolution.toLocaleLowerCase())&&(o=!0),u.compilerOptions.resolvePackageJsonExports===void 0&&o&&(u.compilerOptions.resolvePackageJsonExports=!0),u.compilerOptions.resolvePackageJsonImports===void 0&&o&&(u.compilerOptions.resolvePackageJsonImports=!0)}if(u.compilerOptions.target===void 0){let o="es5";switch(u.compilerOptions.module){case"node16":case"node18":{o="es2022";break}case"node20":{o="es2023";break}case"nodenext":{o="esnext";break}}o!=="es5"&&(u.compilerOptions.target=o)}u.compilerOptions.useDefineForClassFields===void 0&&u.compilerOptions.target&&Su(u.compilerOptions.target)&&(u.compilerOptions.useDefineForClassFields=!0)}if(["5.6","5.7","5.8","5.9"].includes(String(e?.tscCompatible))&&u.compilerOptions.strict&&u.compilerOptions.strictBuiltinIteratorReturn===void 0&&(u.compilerOptions.strictBuiltinIteratorReturn=!0),["5.4","5.5","5.6","5.7","5.8","5.9"].includes(String(e?.tscCompatible))&&(u.compilerOptions.strict&&(u.compilerOptions.noImplicitAny=u.compilerOptions.noImplicitAny??!0,u.compilerOptions.noImplicitThis=u.compilerOptions.noImplicitThis??!0,u.compilerOptions.strictNullChecks=u.compilerOptions.strictNullChecks??!0,u.compilerOptions.strictFunctionTypes=u.compilerOptions.strictFunctionTypes??!0,u.compilerOptions.strictBindCallApply=u.compilerOptions.strictBindCallApply??!0,u.compilerOptions.strictPropertyInitialization=u.compilerOptions.strictPropertyInitialization??!0,u.compilerOptions.alwaysStrict=u.compilerOptions.alwaysStrict??!0),u.compilerOptions.useDefineForClassFields===void 0&&u.compilerOptions.target&&Su(u.compilerOptions.target)&&(u.compilerOptions.useDefineForClassFields=!0),u.compilerOptions.strict&&u.compilerOptions.useUnknownInCatchVariables===void 0&&(u.compilerOptions.useUnknownInCatchVariables=!0),u.compilerOptions.isolatedModules&&(u.compilerOptions.preserveConstEnums=u.compilerOptions.preserveConstEnums??!0)),["6.0","7.0","true"].includes(String(e?.tscCompatible))){if(u.compilerOptions.moduleDetection===void 0&&u.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(u.compilerOptions.module)&&(u.compilerOptions.moduleDetection="force"),u.compilerOptions.moduleResolution===void 0&&u.compilerOptions.module){const o=u.compilerOptions.module.toLocaleLowerCase();o==="node16"||o==="node18"||o==="node20"?u.compilerOptions.moduleResolution="node16":o==="nodenext"&&(u.compilerOptions.moduleResolution="nodenext")}if(u.compilerOptions.useDefineForClassFields===void 0&&u.compilerOptions.module&&["node16","node18","node20","nodenext"].includes(u.compilerOptions.module)&&u.compilerOptions.target&&!Su(u.compilerOptions.target)&&(u.compilerOptions.useDefineForClassFields=!1),u.compilerOptions.isolatedModules&&u.compilerOptions.preserveConstEnums===void 0&&(u.compilerOptions.preserveConstEnums=!0),u.compilerOptions.resolveJsonModule===void 0){const o=u.compilerOptions.module,t=u.compilerOptions.moduleResolution?.toLocaleLowerCase();!(o!==void 0&&["node20","nodenext"].includes(o)||t==="bundler")&&t&&(u.compilerOptions.resolveJsonModule=!1)}if(u.compilerOptions.moduleResolution){const o=u.compilerOptions.moduleResolution.toLocaleLowerCase();["bundler","node16","nodenext"].includes(o)||(u.compilerOptions.resolvePackageJsonExports??=!1,u.compilerOptions.resolvePackageJsonImports??=!1)}}return u.compileOnSave===!1&&delete u.compileOnSave,u},$t=(u,e)=>{const o=u?.typescriptVersion;if(!(o===!1||o===void 0))return o==="auto"?pt(e):o},j="${configDir}",pe=Symbol("implicitBaseUrl"),Tt=(u,e)=>{const o=R(u),t=Fe(o,e),r=K(o),D=$t(e,r);D&&t.compilerOptions&&yt(t.compilerOptions,D);const{compilerOptions:s}=t;if(s){for(const a of kt){const l=s[a];if(l){const f=du(l,r);s[a]=f?lu(Cu(r,f)):l}}for(const a of["rootDirs","typeRoots"]){const l=s[a];l&&(s[a]=l.map(f=>{const E=du(f,r);return E?lu(Cu(r,E)):f}))}const{paths:c}=s;if(c){const a=Object.keys(c);for(let l=0;l<a.length;l++){const f=a[l];c[f]=c[f].map(E=>du(E,r)??E)}}}for(let c=0;c<Ru.length;c++){const a=Ru[c],l=t[a];l&&(t[a]=l.map(f=>du(f,r)??f))}return xt(t,e)},St=Z(import.meta.url),Du=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Nt=u=>{if(typeof Du<"u"&&Du.versions&&Du.versions.node){const[e,o]=Du.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Du.getBuiltinModule(u)}return St(u)},{statSync:It}=Nt("node:fs"),Pt=new Map,jt="tsconfig.json",Lt=(u,e)=>{let o=0;try{o=It(u).mtimeMs}catch{}return`${u}::${String(e.tscCompatible)}::${String(e.typescriptVersion)}::${String(o)}`},_t=(u,e={})=>{const o=e.configFileName??jt,t=e.configFileName===void 0;let r=hu(o,{...u&&{cwd:u},type:"file"});if(!r&&t&&(r=hu("jsconfig.json",{...u&&{cwd:u},type:"file"})),!r)throw new ie(t?`No such file or directory, for '${o}' or 'jsconfig.json' found.`:`No such file or directory, for '${o}' found.`);const D=e.cache&&typeof e.cache!="boolean"?e.cache:Pt,s=Lt(r,e);if(e.cache&&D.has(s))return D.get(s);const c={config:Tt(r,{tscCompatible:e.tscCompatible,typescriptVersion:e.typescriptVersion}),path:r};return e.cache&&D.set(s,c),c},Rt=/\.[cm]?tsx?$/,Ut=[".yaml",".yml",".toml",".jsonc",".json5",".txt"],fe=/\.(?:ya?ml|toml|jsonc|json5|txt)$/,Wt=u=>u.endsWith(".yaml")||u.endsWith(".yml")?nt(u):u.endsWith(".toml")?it(u):u.endsWith(".jsonc")?et(u,{allowTrailingComma:!0}):u.endsWith(".json5")?qe(u):Vu(u,"utf8"),Uu=u=>u===void 0?"undefined":u===null?"null":typeof u=="number"?Number.isNaN(u)?"NaN":u===Number.POSITIVE_INFINITY?"Infinity":u===Number.NEGATIVE_INFINITY?"-Infinity":String(u):typeof u=="bigint"?`${u}n`:typeof u=="boolean"?String(u):typeof u=="string"?JSON.stringify(u):u instanceof Date?`new Date(${JSON.stringify(u.toISOString())})`:Array.isArray(u)?`[${u.map(e=>Uu(e)).join(",")}]`:typeof u=="object"?`{${Object.entries(u).map(([e,o])=>`${JSON.stringify(e)}:${Uu(o)}`).join(",")}}`:"null",Nu=new Map,Vt=(u,e)=>u.startsWith(j)?I(e,u.slice(j.length)):u,Mt=u=>{if(Nu.has(u))return Nu.get(u);let e;try{const{config:o,path:t}=_t(u,{cache:!1}),r=K(t),D=o.compilerOptions,s=D?.paths??{};if(D!==void 0){const{baseUrl:c}=D;let a,l=!1;if(c===void 0){const f=D[pe];a=typeof f=="string"?f:r}else l=!0,a=R(r,Vt(c,r));e={hasBaseUrl:l,paths:s,pathsBase:a}}}catch{e=void 0}return Nu.set(u,e),e},Ae=(u,e)=>{const o=Mt(e);if(o===void 0)return;const{hasBaseUrl:t,pathsBase:r}=o,D=s=>Ee(s)??de(s);for(const[s,c]of Object.entries(o.paths)){const a=s.indexOf("*");if(a===-1){if(s===u)for(const E of c){const $=D(R(r,E));if($!==void 0)return $}continue}const l=s.slice(0,a),f=s.slice(a+1);if(u.startsWith(l)&&u.endsWith(f)&&u.length>=l.length+f.length){const E=u.slice(l.length,u.length-f.length);for(const $ of c){const O=$.replace("*",E),C=D(R(r,O));if(C!==void 0)return C}}}if(t){const s=D(R(r,u));if(s!==void 0)return s}};let ee=!1,Iu=0,te=!1,re=!1;const Jt=()=>{re||(re=!0,process.setSourceMapsEnabled?.(!0))},qt=u=>{const e=u.indexOf("?");return e===-1?u:u.slice(0,e)},Ht=u=>u.endsWith(".cts")?"commonjs":"module",oe=[".ts",".tsx",".mts",".cts",".js",".mjs",".cjs",".json"],Y=u=>{try{return se(u).isFile()}catch{return!1}},Kt=u=>{try{return se(u).isDirectory()}catch{return!1}},zt=u=>{if(u.endsWith(".js"))return`${u.slice(0,-3)}.ts`;if(u.endsWith(".mjs"))return`${u.slice(0,-4)}.mts`;if(u.endsWith(".cjs"))return`${u.slice(0,-4)}.cts`},Ee=u=>{if(Y(u))return u;const e=zt(u);if(e!==void 0&&Y(e))return e;for(const o of oe)if(Y(u+o))return u+o;if(Kt(u))for(const o of oe){const t=`${u}/index${o}`;if(Y(t))return t}},de=u=>{if(Y(u)&&fe.test(u))return u;for(const e of Ut)if(Y(u+e))return u+e},me=()=>{Jt();const{registerHooks:u}=Pu;return typeof u!="function"?!1:(ee||(u({load(e,o,t){const r=qt(e);if(r.startsWith("file:")&&Rt.test(r)){const D=fu(r),{code:s}=ne(D,Vu(D,"utf8"));return{format:Ht(D),shortCircuit:!0,source:s}}if(r.startsWith("file:")&&fe.test(r)){const D=fu(r),s=Wt(D);return{format:"module",shortCircuit:!0,source:`export default ${Uu(s)};
|
|
21
|
+
`}}return t(e,o)},resolve(e,o,t){if((e.startsWith(".")||e.startsWith("/"))&&o.parentURL!==void 0){let r;try{r=new URL(e,o.parentURL)}catch{r=void 0}if(r?.protocol==="file:"){const D=fu(r),s=Ee(D)??de(D);if(s!==void 0)return{shortCircuit:!0,url:mu(s).href}}}if(o.parentURL!==void 0&&!e.startsWith(".")&&!e.startsWith("/")&&!e.startsWith("#")&&!e.startsWith("node:")&&!Pu.isBuiltin?.(e)){let r;try{r=K(fu(o.parentURL))}catch{r=void 0}if(r!==void 0){const D=Ae(e,r);if(D!==void 0)return{shortCircuit:!0,url:mu(D).href}}}return t(e,o)}}),ee=!0),!0)},Gt=()=>me(),Qt=async u=>{if(Iu+=1,me())return await import(`${mu(u).href}?v=${String(Iu)}`);te||(te=!0,process.stderr.write(`vis: Node < 22.15 has no module.registerHooks — only the entry file is transpiled; local TypeScript imports won't load. Upgrade to Node >= 22.15 for full support.
|
|
22
|
+
`));const{code:e}=ne(u,Vu(u,"utf8")),o=I(K(u),`.vis-ts-${String(Iu)}-${String(process.pid)}.mjs`);be(o,e);try{return await import(mu(o).href)}finally{try{Oe(o)}catch{}}},tr=Object.defineProperty({__proto__:null,importTs:Qt,registerTsHooks:Gt,resolveTsConfigPaths:Ae},Symbol.toStringTag,{value:"Module"});export{Qt as i,it as m,Gt as r,tr as t,nt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as
|
|
1
|
+
import{createRequire as D}from"node:module";import{w as L}from"./target-merge-Dg25Izl5.js";import{advisoriesQuery as M,advisoriesIngest as W,advisoriesStatus as A,NATIVE_BINDING_VERSION as w}from"#native";const R=D(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=s=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[e,t]=l.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return l.getBuiltinModule(s)}return R(s)},{randomUUID:I}=c("node:crypto"),{existsSync:$,createWriteStream:T}=c("node:fs"),{mkdir:O,unlink:P,stat:U}=c("node:fs/promises"),{join:g,dirname:k}=c("node:path"),{Readable:x}=c("node:stream"),{pipeline:C}=c("node:stream/promises"),f=6;if(w!==f)throw new Error(`vis native binding ABI mismatch in advisories: expected ${f}, got ${w}. Rebuild via \`pnpm --filter @visulima/vis run build:native\` or reinstall the platform binding package.`);const Q="https://osv-vulnerabilities.storage.googleapis.com",j=new Set(["osv-vulnerabilities.storage.googleapis.com"]);class q extends Error{cause="DB_NOT_FOUND";constructor(e){super(`No local advisory DB at ${e}. Run 'vis advisories sync' first.`),this.name="AdvisoryDbNotFoundError"}}class p extends Error{cause="SOURCE_NOT_ALLOWED";constructor(e){super(`Advisory source host '${e}' is not in the built-in allowlist. Add it to \`security.audit.advisories.allowedHosts\` if intentional.`),this.name="AdvisorySourceNotAllowedError"}}class E extends Error{cause="SYNC_NETWORK";constructor(e,t){super(`Advisory sync failed for ${e}: ${t}. Check connectivity, proxy env vars, or --source.`),this.name="AdvisorySyncNetworkError"}}const y=s=>{const e=L("vis",{create:!0,cwd:s})??g(s,"node_modules",".cache","vis");return g(e,"advisories","db.sqlite")},B=(s,e)=>{let t;try{t=new URL(s)}catch{throw new p(s)}if(t.protocol!=="https:")throw new p(`${t.protocol}//${t.host}`);if(!new Set([...j,...e??[]]).has(t.host))throw new p(t.host);return t},J=async s=>{const e=s.dbPath??y(s.workspaceRoot);await O(k(e),{recursive:!0});const t=B(s.source,s.allowedHosts),d=new URL(`${s.ecosystem}/all.zip`,z(t.toString())),u=await V(e,s.ecosystem);let r=null;if(!s.force){const i=await b(d,{method:"HEAD"});if(i.ok&&(r=i.headers.get("etag"),r&&u&&r===u))return{advisoriesIngested:0,dbPath:e,durationMs:0,upToDate:!0}}const n=`${e}.${s.ecosystem}.${process.pid}.${I()}.zip.tmp`,o=await b(d,{method:"GET"});if(!o.ok||!o.body)throw new E(d.toString(),o.status);r||(r=o.headers.get("etag"));const v=o.headers.get("content-length"),a=v?Number.parseInt(v,10):null;let m=0;const _=T(n),h=x.fromWeb(o.body);s.onProgress&&a&&h.on("data",i=>{m+=i.byteLength,s.onProgress?.(m,a,"download")}),await C(h,_);try{const i=await W({dbPath:e,ecosystem:s.ecosystem,manifestEtag:r??void 0,zipPath:n},(S,N)=>s.onProgress?.(S,N,"ingest"));return{advisoriesIngested:i.advisoriesIngested,dbPath:e,durationMs:i.durationMs,upToDate:!1}}finally{await P(n).catch(()=>{})}},X=(s,e)=>{if(s.length===0)return new Map;const t=e.dbPath??y(e.workspaceRoot),d=e.ecosystem??"npm";if(!$(t))throw new q(t);const u=s.map(o=>({ecosystem:d,name:o.name,version:o.version})),r=M(t,u),n=new Map;for(const[o,v]of s.entries()){const a=r[o];!a||a.vulnerabilities.length===0||n.set(v.name,a.vulnerabilities.map(m=>H(m)))}return n},Z=async(s,e)=>{const t=e??y(s);return A(t)},V=async(s,e)=>{try{await U(s)}catch{return null}return A(s).ecosystems.find(t=>t.name===e)?.manifestEtag??null},H=s=>({aliases:s.aliases.length>0?s.aliases:void 0,cvssScore:s.cvssScore??void 0,fixedVersions:s.fixedVersions,id:s.id,severity:F(s.severity),summary:s.summary}),F=s=>{const e=s.toUpperCase();return e==="CRITICAL"||e==="HIGH"||e==="MODERATE"||e==="LOW"?e:"UNKNOWN"},z=s=>s.endsWith("/")?s:`${s}/`,b=async(s,e)=>{try{return await fetch(s,e)}catch(t){throw new E(s.toString(),t instanceof Error?t.message:String(t))}};export{q as A,Q as D,Z as g,X as q,y as r,J as s};
|
|
@@ -25,4 +25,4 @@ ${s}`},Un=(t,e)=>(t.length>0?`
|
|
|
25
25
|
`)},Vn=(t,e={})=>{if(e.framesMaxLimit!==void 0&&e.framesMaxLimit<=0)throw new RangeError("The 'framesMaxLimit' option must be a positive number");return vt(t,e,0)};class te extends Error{loc;title;hint;type="VisulimaError";constructor({cause:e,hint:n,location:i,message:s,name:o,stack:c,title:a}){super(s,{cause:e}),this.title=a,this.name=o,this.stack=c??this.stack,this.loc=i,this.hint=n}setLocation(e){this.loc=e}setName(e){this.name=e}setMessage(e){this.message=e}setHint(e){this.hint=e}}class k extends te{code;context;constructor(e,n,i){super({message:e,name:"CerebroError"}),this.code=n,this.context=i}}const R=new Uint32Array(65536),Tn=(t,e)=>{const n=t.length,i=e.length,s=1<<n-1;let o=-1,c=0,a=n,u=n;for(;u--;)R[t.charCodeAt(u)]|=1<<u;for(u=0;u<i;u++){let r=R[e.charCodeAt(u)];const l=r|c;r|=(r&o)+o^o,c|=~(r|o),o&=r,c&s&&a++,o&s&&a--,c=c<<1|1,o=o<<1|~(l|c),c&=l}for(u=n;u--;)R[t.charCodeAt(u)]=0;return a},jn=(t,e)=>{const n=e.length,i=t.length,s=[],o=[],c=Math.ceil(n/32),a=Math.ceil(i/32);for(let h=0;h<c;h++)o[h]=-1,s[h]=0;let u=0;for(;u<a-1;u++){let h=0,g=-1;const $=u*32,w=Math.min(32,i)+$;for(let y=$;y<w;y++)R[t.charCodeAt(y)]|=1<<y;for(let y=0;y<n;y++){const x=R[e.charCodeAt(y)],N=o[y/32|0]>>>y&1,E=s[y/32|0]>>>y&1,I=x|h,O=((x|E)&g)+g^g|x|E;let m=h|~(O|g),v=g&O;m>>>31^N&&(o[y/32|0]^=1<<y),v>>>31^E&&(s[y/32|0]^=1<<y),m=m<<1|N,v=v<<1|E,g=v|~(I|m),h=m&I}for(let y=$;y<w;y++)R[t.charCodeAt(y)]=0}let r=0,l=-1;const d=u*32,p=Math.min(32,i-d)+d;for(let h=d;h<p;h++)R[t.charCodeAt(h)]|=1<<h;let f=i;for(let h=0;h<n;h++){const g=R[e.charCodeAt(h)],$=o[h/32|0]>>>h&1,w=s[h/32|0]>>>h&1,y=g|r,x=((g|w)&l)+l^l|g|w;let N=r|~(x|l),E=l&x;f+=N>>>i-1&1,f-=E>>>i-1&1,N>>>31^$&&(o[h/32|0]^=1<<h),E>>>31^w&&(s[h/32|0]^=1<<h),N=N<<1|$,E=E<<1|w,l=E|~(y|N),r=N&y}for(let h=d;h<p;h++)R[t.charCodeAt(h)]=0;return f},Rn=(t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return e.length===0?t.length:t.length<=32?Tn(t,e):jn(t,e)},Bn=Ce(import.meta.url),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wn=t=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,n]=se.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return se.getBuiltinModule(t)}return Bn(t)},{createRequire:zn}=Wn("node:module"),$t=String.raw,Ue=$t`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Fn=()=>new RegExp($t`\p{RI}{2}|(?)${Ue}(?:\u200D${Ue})*`,"gu");Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]]));const ss=/^[ \t]*(?:\r\n|\r|\n)/,rs=/(?:\r\n|\r|\n)[ \t]*$/,as=/^(?:[\r\n]|$)/,ls=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,cs=/^[ \t]*[\r\n][ \t\r\n]*$/,us=/\r\n|\n|\r/g,ps=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,hs=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,z=Fn(),qn=/[-_./\s]+/g,de=/(\u001B\[[0-9;]*[a-z])/i,Ve=new RegExp("\\p{Script=Arabic}","u"),Gn=new RegExp("\\p{Script=Bengali}","u"),X=new RegExp("\\p{Script=Cyrillic}","u"),Hn=new RegExp("\\p{Script=Devanagari}","u"),Jn=new RegExp("\\p{Script=Ethiopic}","u"),we=new RegExp("\\p{Script=Greek}","u"),Te=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),Kn=new RegExp("\\p{Script=Gujarati}","u"),Yn=new RegExp("\\p{Script=Gurmukhi}","u"),je=new RegExp("\\p{Script=Hangul}","u"),Re=new RegExp("\\p{Script=Hebrew}","u"),Xn=new RegExp("\\p{Script=Hiragana}","u"),Be=new RegExp("\\p{Script=Han}","u"),Qn=new RegExp("\\p{Script=Kannada}","u"),Zn=new RegExp("\\p{Script=Katakana}","u"),ei=new RegExp("\\p{Script=Khmer}","u"),ti=new RegExp("\\p{Script=Lao}","u"),P=new RegExp("\\p{Script=Latin}","u"),ni=new RegExp("\\p{Script=Malayalam}","u"),ii=new RegExp("\\p{Script=Myanmar}","u"),oi=new RegExp("\\p{Script=Oriya}","u"),si=new RegExp("\\p{Script=Sinhala}","u"),ri=new RegExp("\\p{Script=Tamil}","u"),ai=new RegExp("\\p{Script=Telugu}","u"),li=new RegExp("\\p{Script=Thai}","u"),ci=new RegExp("\\p{Script=Tibetan}","u"),We=/[\u02BB\u02BC\u0027]/u,ui=t=>t.replace(z,"");let pi=class{capacity;cache;constructor(e){this.capacity=e,this.cache=new Map}get(e){if(!this.cache.has(e))return;const n=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,n),n}has(e){return this.cache.has(e)}set(e,n){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){const i=this.cache.keys().next().value;i!==void 0&&this.cache.delete(i)}this.cache.set(e,n)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}size(){return this.cache.size}};const hi=zn(import.meta.url),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,di=t=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,n]=re.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return re.getBuiltinModule(t)}return hi(t)},{stripVTControlCharacters:fi}=di("node:util"),ye=new pi(1e3),mi=/[.*+?^${}()|[\]\\]/g,gi=t=>{const e=t.join("");if(ye.has(e)){const s=ye.get(e);return s.lastIndex=0,s}const n=t.map(s=>s.replaceAll(mi,String.raw`\$&`)).join("|"),i=new RegExp(n,"g");return ye.set(e,i),i},wi=t=>{const e=[];let n=0,i;for(z.lastIndex=0;(i=z.exec(t))!==null;)i.index>n&&e.push(t.slice(n,i.index)),e.push(i[0]),n=z.lastIndex;return n<t.length&&e.push(t.slice(n)),e.filter(Boolean)},yi=/[ČŠŽĐ]/i,xt=new Uint8Array(128),bt=new Uint8Array(128),Nt=new Uint8Array(128);for(let t=0;t<128;t++)xt[t]=t>=65&&t<=90?1:0,bt[t]=t>=97&&t<=122?1:0,Nt[t]=t>=48&&t<=57?1:0;const ve=t=>xt[t],ze=t=>bt[t],$e=t=>Nt[t],B=(t,e,n,i,s)=>{if(t.length===0)return[];let o=!1;const c=Object.values(e);for(const f of c)if(f(t[0])){o=!0;break}if(!o&&!n)return[t];const a=[...t],u=[];let r=a[0],l="other";const d=Object.entries(e);for(const f of d){const[h,g]=f;if(g(a[0])){l=h;break}}let p=n&&i?a[0]===a[0].toLocaleUpperCase(i):!1;for(let f=1;f<a.length;f++){const h=a[f];let g="other";for(const y of d){const[x,N]=y;if(N(h)){g=x;break}}const $=n&&i?h===h.toLocaleUpperCase(i):!1;let w=!1;s?w=s(l,g,p,$,h,f,a):(l!==g&&l!=="other"&&g!=="other"&&(w=!0),n&&g!=="other"&&!p&&$&&(w=!0)),w?(u.push(r),r=h):r+=h,l=g,n&&(p=$)}return r&&r.length>0&&u.push(r),u.length>0?u:[t]},vi=(t,e,n,i)=>{if(n.size===0)return e;for(const s of n)if(t.startsWith(s,e))return i.push(s),e+s.length;return e},At=(t,e=new Set)=>{if(t.length===0)return[];if(t.toUpperCase()===t)return[t];let n=0;const i=[],s=t.length;for(let o=1;o<s;o++){const c=vi(t,n,e,i);if(c!==n){n=c,o=n-1;continue}const a=t.codePointAt(o-1),u=t.codePointAt(o),r=a&&a<128&&ve(a),l=u&&u<128&&ve(u),d=a&&a<128&&ze(a),p=a&&a<128&&$e(a),f=u&&u<128&&$e(u);if(d&&l){i.push(t.slice(n,o)),n=o;continue}if(p&&!f||!p&&f){i.push(t.slice(n,o)),n=o;continue}if(f&&!p){let h=!1,g=!1;if(o+1<s){const $=t.codePointAt(o+1);h=$&&$<128&&ve($),g=$&&$<128&&$e($)}if(!g&&h){i.push(t.slice(n,o),t.slice(o,o+1)),n=o+1;continue}}if(o+1<s){const h=t.codePointAt(o+1),g=h&&h<128&&ze(h);if(r&&l&&g){const $=t.slice(n,o+1);e.has($)||(i.push(t.slice(n,o)),n=o)}}}return n<s&&i.push(t.slice(n)),i.filter(o=>o!=="")},kt=(t,e,n)=>{if(t.length===0)return[];const i=t===t.toLocaleUpperCase(e);if(e.startsWith("de")){if(!i&&t.replaceAll("ß","SS")===t.toLocaleUpperCase(e))return[t];const r=[...t],l=r.length,d=[];let p=r[0],f=r[0]===r[0].toLocaleUpperCase(e),h=f,g=f?0:-1;for(let $=1;$<l;$++){const w=r[$],y=w===w.toLocaleUpperCase(e);if(y===f)p+=w;else if(y)p&&p.length>0&&(d.push(p),p=w),h=!0,g=$;else{if(h&&$-g>1){const x=r[$-1],N=p.slice(0,-1);N&&N.length>0&&d.push(N),p=x+w}else p+=w;h=!1,g=-1}f=y}return p&&p.length>0&&d.push(p),d}if(e.startsWith("uk")||e.startsWith("ru")||e.startsWith("bg")||e.startsWith("sr")||e.startsWith("mk")||e.startsWith("be")){if(!X.test(t)&&!P.test(t))return[t];const r=[...t],l=r.length,d=[];let p=r[0];const f=r[0];let h;X.test(f)?h=1:P.test(f)?h=2:h=0;let g=f===f.toLocaleUpperCase(e);for(let w=1;w<l;w++){const y=r[w];let x;X.test(y)?x=1:P.test(y)?x=2:x=0;const N=y===y.toLocaleUpperCase(e);h!==x&&(h===1||h===2)&&(x===1||x===2)||x===h&&!g&&N?(d.push(p),p=y):p+=y,h=x,g=N}p&&p.length>0&&d.push(p);const $=[];for(let w=0;w<d.length;w++)w<d.length-1&&d[w].length===1&&P.test(d[w])&&X.test(d[w+1][0])?($.push(d[w]+d[w+1]),w+=1):$.push(d[w]);return $}if(e.startsWith("el")){if(!we.test(t)&&!P.test(t))return[t];const r=[];Te.lastIndex=0;let l;for(;(l=Te.exec(t))!==null;)r.push(l[0]);r.length===0&&r.push(t);const d=[];if(r.length===1){const p=r[0];if(!p||!we.test(p[0])||p.length===1)return[p??t]}for(const p of r){if(!p)continue;if(!we.test(p[0])||p.length===1){d.push(p);continue}const f=p.length;let h=p[0],g=p[0]===p[0].toLocaleUpperCase(e);for(let $=1;$<f;$++){const w=p[$],y=w===w.toLocaleUpperCase(e);!g&&y?(d.push(h),h=w):h+=w,g=y}h&&d.push(h)}return d}if(e.startsWith("ja")||e.startsWith("ko")){const r=e.startsWith("ja"),l=r?{hiragana:p=>Xn.test(p),kanji:p=>Be.test(p),katakana:p=>Zn.test(p),latin:p=>P.test(p)}:{hangul:p=>je.test(p),latin:p=>P.test(p)},d=new Set(["が","で","と","に","の","は","へ","も","や","を"]);if(r){const p=B(t,l,!1,e,(h,g)=>h==="hiragana"&&g==="katakana"||h==="katakana"&&g==="hiragana"||h==="hiragana"&&g==="latin"||h==="katakana"&&g==="latin"||h==="kanji"&&g==="latin"||h==="latin"&&(g==="hiragana"||g==="katakana"||g==="kanji")),f=[];for(const h of p){const g=h;g.length===1&&d.has(g)&&f.length>0?f[f.length-1]=f.at(-1)+g:f.push(g)}return f.length>0?f:[t]}return B(t,l,!1,e,(p,f)=>p==="hangul"&&f==="latin"||p==="latin"&&f==="hangul")}if(e.startsWith("sl")){const r=[...t],l=r.length,d=[];let p=r[0],f=r[0]===r[0].toLocaleUpperCase(e);for(let h=1;h<l;h++){const g=r[h],$=g===g.toLocaleUpperCase(e),w=yi.test(g),y=h<l-1&&r[h+1]===r[h+1].toLocaleUpperCase(e);!f&&$||w&&y?(d.push(p),p=g,w&&y&&(d.push(p),p="")):p+=g,f=$}return p&&p.length>0&&d.push(p),d}if(e.startsWith("zh"))return B(t,{han:r=>Be.test(r),latin:r=>P.test(r)},!1,e);if(["ar","fa","he","ur"].includes(e.split("-")[0])){const r=l=>Re.test(l)||Ve.test(l);return B(t,{latin:l=>P.test(l),rtl:l=>r(l)},!1,e)}if(["am","bn","gu","hi","km","kn","lo","ml","mr","ne","or","pa","si","ta","te","th"].includes(e.split("-")[0])){const r=l=>Hn.test(l)||Gn.test(l)||Kn.test(l)||Yn.test(l)||Qn.test(l)||ri.test(l)||ai.test(l)||ni.test(l)||si.test(l)||li.test(l)||ti.test(l)||ci.test(l)||ii.test(l)||Jn.test(l)||ei.test(l)||oi.test(l);return B(t,{indic:l=>r(l),latin:l=>P.test(l)},!1,e)}if(["be","bg","ru","sr","uk"].includes(e))return B(t,{cyrillic:r=>X.test(r),latin:r=>P.test(r)},!0,e);if(["ar","fa","he"].includes(e))return B(t,{latin:r=>P.test(r),rtl:r=>Re.test(r)||Ve.test(r)},!1,e);if(e.startsWith("ko"))return B(t,{hangul:r=>je.test(r),latin:r=>P.test(r)},!1,e);if(e.startsWith("uz")){if(!X.test(t)&&!P.test(t))return[t];const r=[...t],l=r.length,d=[];let p=r[0],f=r[0]===r[0].toLocaleUpperCase(e);for(let h=1;h<l;h++){const g=r[h],$=g===g.toLocaleUpperCase(e);if(We.test(g)||We.test(r[h-1])){p+=g;continue}!f&&$?(d.push(p),p=g):p+=g,f=$}return p&&p.length>0&&d.push(p),d}const s=[...t],o=s.length,c=[];let a=s[0],u=s[0]===s[0].toLocaleUpperCase(e);for(const r of n)if(t.startsWith(r)){c.push(r),a=s[r.length],u=a===a.toLocaleUpperCase(e);break}for(let r=1;r<o;r++){const l=s[r],d=l===l.toLocaleUpperCase(e);let p=0;for(const f of n)if(t.startsWith(f,r)){c.push(a,f),p=f.length,a="";const h=f.at(-1);h&&(u=h===h.toLocaleUpperCase(e));break}if(p>0){r+=p-1;continue}!u&&d?(c.push(a),a=l):a+=l,u=d}return a&&c.push(a),c},$i=(t,e,n)=>{const i=[],s=de.test(t)?t.split(de).filter(Boolean):[t];for(const o of s){const c=o;if(de.test(c))i.push(c);else{z.lastIndex=0;const a=z.test(c)?wi(c).filter(Boolean):[c];for(const u of a)if(z.lastIndex=0,z.test(u))i.push(u);else if(e){const r=e.toLowerCase().split("-")[0];i.push(...kt(u,r,n))}else i.push(...At(u,n))}}return i},xi=(t,e={})=>{if(!t||typeof t!="string")return[];const{handleAnsi:n=!1,handleEmoji:i=!1,knownAcronyms:s=[],locale:o,normalize:c=!1,separators:a,stripAnsi:u=!1,stripEmoji:r=!1}=e,l=new Set([...s].toSorted((w,y)=>y.length-w.length));let d=t;u&&(d=fi(d)),r&&(d=ui(d));let p;Array.isArray(a)?p=gi(a):a instanceof RegExp?p=a:p=qn;const f=[];let h=d;const g=p.flags.includes("g")?p:new RegExp(p.source,`${p.flags}g`);for(;h.length>0;){const w=g.exec(h);if(!w){h===".."?f.push(".."):h==="."?f.push("."):h.length>0&&f.push(h);break}const y=w.index,x=w[0],N=x.length,E=h.slice(0,y),I=h.slice(y+N);if(x.startsWith("../"))f.push(".."),h=h.slice(y+3);else if(x.startsWith("./"))f.push("."),h=h.slice(y+2);else if(y===0&&x==="..")f.push(".."),h=h.slice(2);else if(y===0&&x===".")f.push("."),h=h.slice(1);else{E.length>0&&f.push(E);let O=0;for(;(O=x.indexOf("../",O))!==-1;)f.push(".."),O+=3;for(O=0;(O=x.indexOf("./",O))!==-1;)(O===0||x[O-1]!==".")&&f.push("."),O+=2;let m=I;for(;m.startsWith("../");)f.push(".."),m=m.slice(3);for(;m.startsWith("./");)f.push("."),m=m.slice(2);if(m===".."){f.push("..");break}else if(m==="."){f.push(".");break}else h=m}g.lastIndex=0}if(f.length===0){const w=d.split(p).filter(Boolean);f.push(...w)}let $=[];for(const w of f)n||i?$.push(...$i(w,o,l)):o?$.push(...kt(w,o,l)):$.push(...At(w,l));return c&&($=$.map(w=>l.has(w)?w:o&&w===w.toLocaleUpperCase(o)?w[0]+w.slice(1).toLocaleLowerCase(o):w.toUpperCase()===w&&!l.has(w)?w.slice(0,1)+w.slice(1).toLowerCase():w)),$},bi=Ce(import.meta.url),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ni=t=>{if(typeof ae<"u"&&ae.versions&&ae.versions.node){const[e,n]=ae.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ae.getBuiltinModule(t)}return bi(t)},{writeFile:Ai,stat:ki,rm:Ei,readFile:Fe,readdir:Ci,mkdir:Oi,access:_i}=Ni("node:fs/promises"),ce=[{alias:"v",description:"Turn on verbose output",group:"global",name:"verbose",type:Boolean},{description:"Turn on debugging output",group:"global",name:"debug",type:Boolean},{alias:"h",description:"Print out helpful usage information",group:"global",name:"help",type:Boolean},{alias:"q",description:"Silence output",group:"global",name:"quiet",type:Boolean},{alias:"V",description:"Print version info",group:"global",name:"version",type:Boolean},{description:"Turn off colored output",group:"global",name:"no-color",type:Boolean},{description:"Force colored output",group:"global",name:"color",type:Boolean}];let F=class extends k{commandName;constructor(t,e=[]){const n=`Command "${t}" not found${e.length>0?`. Did you mean: ${e.join(", ")}?`:""}`;super(n,"COMMAND_NOT_FOUND",{commandName:t,suggestions:e}),this.name="CommandNotFoundError",this.commandName=t,e.length>0&&(this.hint=`Try one of these commands: ${e.join(", ")}`)}},Et=class extends k{option1;option2;constructor(t,e){super(`Options "${t}" and "${e}" cannot be used together`,"CONFLICTING_OPTIONS",{option1:t,option2:e}),this.name="ConflictingOptionsError",this.option1=t,this.option2=e,this.hint=`Remove either --${t} or --${e}`}},Ii=class extends k{unknownOptions;constructor(t,e){const n=t.join(", "),i=`Found unknown ${t.length===1?"option":"options"}: ${n}`;super(i,"UNKNOWN_OPTION",{suggestions:e,unknownOptions:t}),this.name="UnknownOptionError",this.unknownOptions=t,e&&e.length>0&&(this.hint=`Did you mean: ${e.join(", ")}?`)}},Li=class extends k{pluginName;constructor(t,e,n){super(`Plugin "${t}" error: ${e}`,"PLUGIN_ERROR",{originalError:n,pluginName:t}),this.name="PluginError",this.pluginName=t,n&&(this.cause=n)}},Si=class{logger;plugins=new Map;initialized=!1;cachedDependencyOrder=void 0;constructor(t){this.logger=t}hasPlugins(){return this.plugins.size>0}register(t){if(this.initialized)throw new Error(`Cannot register plugin "${t.name}" after initialization`);if(this.plugins.has(t.name))throw new Error(`Plugin "${t.name}" is already registered`);fe().CEREBRO_OUTPUT_LEVEL===String(j)&&this.logger.debug(`registering plugin: ${t.name}`),this.plugins.set(t.name,t),this.cachedDependencyOrder=void 0}async init(t){if(this.initialized)throw new Error("PluginManager already initialized");if(this.plugins.size===0){this.logger.debug("no plugins registered, skipping initialization"),this.initialized=!0;return}this.validateDependencies();const e=this.getDependencyOrder();this.logger.debug(`initializing ${String(e.length)} plugin(s)...`);for(const n of e)if(typeof n.init=="function"){this.logger.debug(`initializing plugin: ${n.name}`);try{await n.init(t)}catch(i){const s=new Li(n.name,`Failed to initialize: ${i instanceof Error?i.message:String(i)}`,i instanceof Error?i:void 0);throw this.logger.error(s.message),s}}this.initialized=!0}async executeLifecycle(t,e,n){if(!this.initialized)throw new Error("PluginManager not initialized");if(this.plugins.size===0)return;const i=this.getDependencyOrder();for(const s of i){const o=s[t];if(typeof o=="function"){this.logger.debug(`executing ${t} hook for plugin: ${s.name}`);try{await(t==="afterCommand"?o(e,n):o(e))}catch(c){throw this.logger.error(`Error in ${t} hook for plugin "${s.name}":`,c),c}}}}async executeErrorHandlers(t,e){if(!this.initialized||this.plugins.size===0)return;const n=this.getDependencyOrder();for(const i of n)if(typeof i.onError=="function"){this.logger.debug(`executing error handler for plugin: ${i.name}`);try{await i.onError(t,e)}catch(s){this.logger.error(`Error in error handler for plugin "${i.name}":`,s)}}}getDependencyOrder(){if(this.cachedDependencyOrder!==void 0)return this.cachedDependencyOrder;const t=[],e=new Set,n=new Set,i=s=>{if(e.has(s))return;if(n.has(s))throw new Error(`Circular dependency detected involving plugin "${s}"`);const o=this.plugins.get(s);if(!o)throw new Error(`Plugin "${s}" not found`);if(n.add(s),o.dependencies)for(const c of o.dependencies)i(c);n.delete(s),e.add(s),t.push(o)};for(const s of this.plugins.keys())i(s);return this.cachedDependencyOrder=t,t}validateDependencies(){for(const t of this.plugins.values())if(t.dependencies){for(const e of t.dependencies)if(!this.plugins.has(e))throw new Error(`Plugin "${t.name}" depends on "${e}" which is not registered`)}}};const le=t=>t.type?.name==="Boolean",Mi=t=>{let e=t.type?t.type.name.toLowerCase():"string";const n=t.multiple??t.lazyMultiple?"[]":"";return e&&(e=e==="boolean"?"":`{underline ${e}${n}}`),e},qe=t=>(le(t)||(t.typeLabel=t.typeLabel??Mi(t),t.defaultOption&&(t.typeLabel=`${t.typeLabel} (D)`),t.required&&(t.typeLabel=`${t.typeLabel} (R)`)),t),Pi=new RegExp(/^-([^\d-])$/),Di=new RegExp(/^--(\S+)/),Ui=new RegExp(/^-([^\d-]{2,})$/),Vi=t=>Pi.test(t)||Di.test(t)||Ui.test(t),Ti=(t,e)=>{const n=e[0]&&Vi(e[0])||e.length===0?null:e.shift()??null;if(!t.includes(n)){const i=new Error(`Command not recognised: ${String(n)}`);throw i.command=n,i.name="INVALID_COMMAND",i}return{argv:e,command:n}};class Ie extends te{optionName;value;constructor(e,n,i){super({hint:`Pass a valid ${i} value for '${e}'.`,message:`Invalid ${i} value '${n}' for option '${e}'`,name:"INVALID_VALUE",title:"Invalid Value"}),this.optionName=e,this.value=n,Object.setPrototypeOf(this,Ie.prototype)}}let ji=class Ct extends te{optionName;constructor(e){super({cause:void 0,hint:`Remove the duplicate option '${e}' from your command line arguments.`,location:void 0,message:`Option '${e}' is already set`,name:"ALREADY_SET",stack:void 0,title:"Option Already Set"}),this.optionName=e,Object.setPrototypeOf(this,Ct.prototype)}},Ge=class Ot extends te{optionName;constructor(e){super({cause:void 0,hint:`Check your option definitions or remove the unknown option '${e}' from your command line arguments.`,location:void 0,message:`Unknown option: --${e}`,name:"UNKNOWN_OPTION",stack:void 0,title:"Unknown Option"}),this.optionName=`--${e}`,Object.setPrototypeOf(this,Ot.prototype)}},Ri=class _t extends te{value;constructor(e){super({hint:"Use a defined option or add a defaultOption to capture this value.",message:`Unknown value: ${e}`,name:"UNKNOWN_VALUE",title:"Unknown Value"}),this.value=e,Object.setPrototypeOf(this,_t.prototype)}};class S extends te{constructor(e,n){super({cause:void 0,hint:n,location:void 0,message:e,name:"INVALID_DEFINITIONS",stack:void 0,title:"Invalid Option Definition"}),Object.setPrototypeOf(this,S.prototype)}}const He=(t,e,n)=>{const i=Number(t);if(e&&Number.isNaN(i)&&String(t).trim().toLowerCase()!=="nan")throw new Ie(n??"",String(t),"Number");return i},Je=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",Ke=t=>t===Number||typeof t=="function"&&t.name==="Number",Ye=t=>t===String||typeof t=="function"&&t.name==="String",Bi=(t,e,n={})=>{const{optionName:i,strictTypes:s}=n;return Array.isArray(t)?Je(e)?t.map(Boolean):Ke(e)?t.map(o=>He(o,s,i)):Ye(e)?t.map(String):t.map(o=>e(String(o))):t===null?null:Je(e)?!!t:Ke(e)?He(t,s,i):Ye(e)?typeof t=="string"?t:String(t):e(typeof t=="string"?t:String(t))},_=(t,e,n,...i)=>{t&&console.debug(`[command-line-args:${n}] ${e}`,...i)},Wi=/-([a-z])/g,zi=/^\d+$/,ue=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",Fi=t=>t.codePointAt(0)===95,Xe=(t,e)=>Array.isArray(t)?[...t,...e]:[t,...e],Qe=t=>t==="__proto__"||t==="constructor"||t==="prototype",Ze=(t,e,n,i=!1)=>{t[e]===void 0?t[e]=i?[n]:n:i&&Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]},et=(t,e,n,i,s)=>{let o=e.get(t)??n.get(t);if(!o&&i){const c=t.toLowerCase();o=i.get(c)??s?.get(c)}return o},qi=(t,e,n,i)=>{const s=n.debug??!1;_(s,"resolveArgs called with options:","resolver",{partial:n.partial,stopAtFirstUnknown:n.stopAtFirstUnknown}),_(s,"Starting argument resolution","resolver"),_(s,"Tokens:","resolver",t),_(s,"Definitions:","resolver",e),_(s,"Processing tokens...","resolver");const o=new Map,c=new Map,a=n.caseInsensitive?new Map:void 0,u=n.caseInsensitive?new Map:void 0,r=n.camelCase?new Map:void 0,l=n.camelCase?new Map:void 0;for(const m of e)if(o.set(m.name,m),m.alias&&c.set(m.alias,m),n.caseInsensitive&&a&&(a.set(m.name.toLowerCase(),m),m.alias&&u&&u.set(m.alias.toLowerCase(),m)),n.camelCase&&r&&l){const v=m.name.replaceAll(Wi,(b,L)=>L.toUpperCase());r.set(m.name,v),l.set(v,m.name)}const d=Object.create(null),p=Object.create(null),f=[],h=[],g=new Set;let $=!1;const w=e.find(m=>m.defaultOption),y=e.some(m=>m.group),x=e.find(m=>m.type===Number);for(let m=0;m<t.length;m++){const v=t[m];if(v.kind==="option-terminator"){d._unknown=i.slice(v.index),$=!0;break}if(v.kind==="option"&&v.name){let b=et(v.name,o,c,a,u);!b&&v.value===void 0&&x&&zi.test(v.name)&&(b=x,v.value=v.name,v.name=x.name);let L=!1;if(!b&&n.negation&&v.value===void 0&&v.name.startsWith("no-")){const C=v.name.slice(3),D=et(C,o,c,a,u);D?.type&&ue(D.type)&&(b=D,L=!0)}const A=b?b.name:v.name,M=b?.multiple,U=b?.lazyMultiple;if(Object.hasOwn(p,A)&&p[A]!==void 0&&!M&&!U&&!n.partial)throw new ji(A);if(!b&&n.partial){const C=v.rawName??`--${v.name}${v.value!==void 0&&v.inlineValue?`=${v.value}`:""}`;f.push({index:v.index,value:C});continue}if(!b&&n.stopAtFirstUnknown){d._unknown=i.slice(v.index);break}if(!b&&!n.partial)throw new Ge(v.name);if(v.value===void 0){const C=t[m+1],D=C?.kind==="option"&&!("name"in C)&&C.value!==void 0,V=C&&b&&!(b.type&&ue(b.type))&&(C.kind==="positional"||D),Pt=b&&b.defaultOption&&!b.multiple&&!b.lazyMultiple;if(V&&(!b?.defaultOption||Pt))if(M){let T=m+1;const me=[];for(;T<t.length&&(t[T].kind==="positional"||t[T].kind==="option"&&!("name"in t[T])&&t[T].value!==void 0);)me.push(t[T].value),g.add(t[T].index),T++;p[A]=p[A]===void 0?me:Xe(p[A],me),m=T-1}else U?(Ze(p,A,C.value,!0),g.add(C.index),m++):(p[A]=C.value,g.add(C.index),m++);else b?.type&&ue(b.type)?Ze(p,A,!L,M):p[A]=M?[]:null}else{let{value:C}=v;if(b?.type&&ue(b.type))switch(C){case"":{if(n.partial){p._unknown??=[];const V=`${v.rawName??`--${v.name}`}${v.value?`=${v.value}`:""}`;p._unknown.push(V),h.push({index:v.index,value:V}),C=!0}else throw new Ge(v.name);break}case"false":{C=!1;break}case"true":{C=!0;break}default:C=!0}const D=[C];if(M){let V=m+1;for(;V<t.length&&t[V].kind==="positional";)D.push(t[V].value),g.add(t[V].index),V++;m=V-1}p[A]===void 0?p[A]=M||U?D:C:M||U?p[A]=Xe(p[A],D):p[A]=C}}else if(v.kind==="positional"&&n.stopAtFirstUnknown&&!g.has(v.index)&&!w){_(s,`Found unconsumed positional token at index ${String(v.index)}, stopping processing`,"resolver"),d._unknown=i.slice(v.index);break}}for(const[m,v]of Object.entries(p)){const b=o.get(m);b&&(b.multiple||b.lazyMultiple)&&!Array.isArray(v)&&(p[m]=[v])}const N=m=>m.kind==="option"&&!o.has(m.name??"")&&!c.has(m.name??"")&&(!n.caseInsensitive||!a?.has(m.name?.toLowerCase()??"")&&!u?.has(m.name?.toLowerCase()??""));let E=-1,I=Number.POSITIVE_INFINITY;if(n.stopAtFirstUnknown&&!$&&(E=t.findIndex(m=>N(m)),E!==-1&&(I=t[E].index)),w){const m=[],v=[];for(const b of t)b.kind==="positional"&&!g.has(b.index)&&b.index<I&&(m.push(b.value),v.push(b));if(m.length>0){const b=p[w.name],L=w.multiple??w.lazyMultiple;b===void 0?L?(v.forEach(A=>g.add(A.index)),p[w.name]=m):(g.add(v[0].index),p[w.name]=m[0]):L&&(v.forEach(A=>g.add(A.index)),p[w.name]=Array.isArray(b)?[...m,...b]:[...m,b])}}if(!n.partial){for(const m of t)if(m.kind==="positional"&&!g.has(m.index))throw new Ri(i[m.index])}if(n.partial&&!n.stopAtFirstUnknown){const m=[...f];if(p._unknown)for(const v of h)m.push({index:v.index,value:v.value});for(const v of t)v.kind==="positional"&&!g.has(v.index)&&m.push({index:v.index,value:i[v.index]});m.length>0&&(m.sort((v,b)=>v.index-b.index),d._unknown=m.map(v=>v.value))}if(n.stopAtFirstUnknown&&!$){const m=t.findIndex(b=>b.kind==="positional"&&!g.has(b.index));let v=-1;if(E!==-1&&m!==-1?v=Math.min(E,m):E!==-1?v=E:m!==-1&&(v=m),v>=0){const b=t[v].index;d._unknown=i.slice(b)}}else f.length>0&&!n.partial&&(d._unknown=f.map(m=>m.value));for(const[m,v]of Object.entries(p)){const b=n.camelCase?r?.get(m)??m:m,L=o.get(m);L?.type?d[b]=Bi(v,L.type,{optionName:L.name,strictTypes:n.strictTypes}):d[b]=v===void 0?null:v}for(const m of e){const v=n.camelCase?r?.get(m.name)??m.name:m.name;!(v in d)&&m.defaultValue!==void 0&&(m.multiple??m.lazyMultiple?d[v]=Array.isArray(m.defaultValue)?[...m.defaultValue]:[m.defaultValue]:d[v]=m.defaultValue)}if(y){const m={},v={},b={};for(const A of e)if(A.group){const M=Array.isArray(A.group)?A.group:[A.group];for(const U of M)Qe(U)||(m[U]??={})}for(const A of Object.keys(d))if(!Fi(A)){v[A]=d[A];let M=A;n.camelCase&&(M=l?.get(A)??A);const U=o.get(M);if(U?.group){const C=Array.isArray(U.group)?U.group:[U.group];for(const D of C)Qe(D)||m[D]&&(m[D][A]=d[A])}else b[A]=d[A]}const L={_all:v};for(const[A,M]of Object.entries(m))L[A]=M;Object.keys(b).length>0&&(L._none=b),d._unknown&&(L._unknown=d._unknown),Object.keys(d).forEach(A=>delete d[A]),Object.assign(d,L)}const O=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));return _(s,"Final parsed result:","resolver",O),O},ee="-".codePointAt(0),H="=",Gi=H.codePointAt(0),Hi="--",Ji="-",Ki="--",It=t=>t.length>2&&t.startsWith(Ki),Yi=t=>It(t)&&!t.includes(H,3),Xi=t=>It(t)&&t.includes(H,3),Qi=t=>{if(t.length!==2||t.codePointAt(0)!==ee||t.codePointAt(1)===ee)return!1;const e=t.codePointAt(1);return e!==void 0&&(e<48||e>57)},Zi=t=>!(t.length<=2||t.codePointAt(0)!==ee||t.codePointAt(1)===ee),eo=t=>{const e=[];let n=0,i=[],s=0,o=-1,c=0;for(;s<i.length||n<t.length;){let a;if(s<i.length?(a=i[s],s++):(a=t[n],n++),c>0?c--:o++,a===Hi){e.push({index:o,kind:"option-terminator"});const u=[...i.slice(s),...t.slice(n)],r=u.map((l,d)=>({index:o+d+1,kind:"positional",value:l}));e.push(...r),o+=u.length;break}if(Qi(a)){const u=a.charAt(1);e.push({index:o,kind:"option",name:u,rawName:a});continue}if(Zi(a)&&!a.includes(H)){const u=[];let r="",l=!1;for(let d=1;d<a.length;d++){const p=a.charAt(d);l?r+=p:p.codePointAt(0)===Gi?l=!0:u.push(`${Ji}${p}`)}if(l)if(u.length>0){const d=u.pop();u.push(`${d}=${r}`)}else u.push(r);i=s<i.length?[...u,...i.slice(s)]:u,s=0,c=u.length;continue}if(Yi(a)){const u=a.slice(2);e.push({index:o,kind:"option",name:u,rawName:a});continue}if(Xi(a)){const u=a.indexOf(H),r=a.slice(2,u),l=a.slice(u+1);e.push({index:o,inlineValue:!0,kind:"option",name:r,rawName:a,value:l});continue}if(a.length>2&&a.codePointAt(0)===ee&&a.codePointAt(1)!==ee&&a.includes(H)){const u=a.indexOf(H),r=a.charAt(1),l=a.slice(u+1);e.push({index:o,inlineValue:!0,kind:"option",name:r,rawName:a,value:l});continue}e.push({index:o,kind:"positional",value:a})}return e},to=/\d/,no=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",io=t=>typeof t=="function",oo=(t,e,n)=>{const i=n?.debug??!1;_(i,"Validating definitions:","validation",t,"caseInsensitive:",e);const s=new Set,o=new Set,c=new Set,a=new Set;let u=0;for(const r of t){if(_(i,"Checking definition:","validation",r),!r.name)throw _(i,"Validation failed: name is required","validation"),new S("Invalid option definition: name is required");if(typeof r.name!="string")throw new S("Invalid option definition: name must be a string");if(r.name.trim()==="")throw new S("Invalid option definition: name cannot be empty");const l=e?r.name.toLowerCase():"";if(s.has(r.name)||e&&c.has(l))throw new S(`Invalid option definition: duplicate name '${r.name}'`);if(o.has(r.name)||e&&a.has(l))throw new S(`Invalid option definition: name '${r.name}' conflicts with an existing alias`);if(s.add(r.name),e&&c.add(l),r.alias!==void 0){if(typeof r.alias!="string")throw new S("Invalid option definition: alias must be a string");if(r.alias.length!==1)throw new S("Invalid option definition: alias must be a single character");if(to.test(r.alias))throw new S("Invalid option definition: alias cannot be numeric");if(r.alias==="-")throw new S('Invalid option definition: alias cannot be "-"');const d=e?r.alias.toLowerCase():"";if(o.has(r.alias)||e&&a.has(d))throw new S(`Invalid option definition: duplicate alias '${r.alias}'`);if(s.has(r.alias)||e&&c.has(d))throw new S(`Invalid option definition: alias '${r.alias}' conflicts with an existing option name`);o.add(r.alias),e&&a.add(d)}if(r.defaultOption&&(u++,r.type!==void 0&&no(r.type)))throw new S("Invalid option definition: defaultOption cannot be Boolean type");if(r.type!==void 0&&!(r.type===Boolean||r.type===Number||r.type===String||typeof r.type=="function"&&io(r.type)))throw new S("Invalid option definition: invalid type")}if(u>1)throw _(i,"Validation failed: multiple defaultOptions not allowed","validation"),new S("Invalid option definition: multiple defaultOptions not allowed");_(i,"Validation completed successfully","validation")};function so(t,e={}){const n=e.debug??!1;_(n,"Starting command-line-args parsing","index"),_(n,"Options:","index",e);const i={...e};i.stopAtFirstUnknown&&(i.partial=!0);const s=Array.isArray(t)?t:[t];_(n,"Normalized definitions:","index",s),oo(s,i.caseInsensitive,n?i:void 0);let{argv:o}=i;if(!o&&(o=process.argv.slice(2),process.execArgv.length>0)){const r=new Set(process.execArgv);o=o.filter(l=>!r.has(l))}_(n,"Using argv:","index",o);let c=o;i.caseInsensitive&&(c=o.map(r=>{if(r.startsWith("--")){const l=r.indexOf("="),d=(l===-1?r.slice(2):r.slice(2,l)).toLowerCase();return l===-1?`--${d}`:`--${d}${r.slice(l)}`}if(r.startsWith("-")&&!r.startsWith("--")&&r.length>1){const l=r.slice(1).split("=",2),d=l[0],p=l[1];if(!d)return r;const f=d.toLowerCase();return p===void 0?`-${f}`:`-${f}=${p}`}return r}));const a=eo(c.map(String));_(n,"Tokenized arguments:","index",a);const u=qi(a,s,i,o);return _(n,"Command-line-args parsing completed","index"),u}class ro{result;argv;options;argument;command;commandName;env;logger;console;fs;process;runtime;rawUnknown;constructor(e,n){this.commandName=e,this.command=n}}let xe=class extends k{commandName;constructor(t,e,n){super(`Failed to load command "${t}": ${e}`,"COMMAND_LOADER_ERROR",{commandName:t,reason:e}),this.name="CommandLoaderError",this.commandName=t,this.hint="Ensure the loader resolves to a module with a default export that is the command handler function.",n!==void 0&&(this.cause=n)}};const ao=/^-{1,2}(\w+)(=(.+))?$/,Lt=(t,e,n,i)=>{const s=ao.exec(t);if(s===null)return{};const o=s[1];if(!o)return{};const c=n&&i?n.get(o)??i.get(o):e.find(a=>a.name===o||a.alias===o);return c!==void 0?{argName:c.name,argValue:s[3],option:c}:{}},tt=(t,e)=>{if(e.type===void 0)return t;if(e.type.name==="Boolean"){if(t==="true"||t==="1")return e.type(!0);if(t==="false"||t==="0")return e.type(!1)}return e.type(t)},lo=new Set(["0","1","false","true"]),co=(t,e,n,i)=>{if(e.length===0||t.length===0)return{};const s=(o,c)=>{const{argName:a,argValue:u,option:r}=Lt(c,e,n,i),{lastOption:l}=o;return r&&le(r)&&u&&a?o.partial[a]=tt(u,r):o.lastName&&l&&le(l)&&lo.has(c)&&(o.partial[o.lastName]=tt(c,l)),{lastName:a,lastOption:r,partial:o.partial}};return t.reduce(s,{partial:{}}).partial},uo=new Set(["0","1","false","true"]),po=(t,e,n,i)=>{if(e.length===0||t.length===0)return t;const s=(o,c)=>{const{argValue:a,option:u}=Lt(c,e,n,i),{lastOption:r}=o;if(r&&le(r)&&uo.has(c)){const{args:l}=o;return{args:l.slice(0,-1)}}return u&&le(u)&&a?{args:o.args}:{args:[...o.args,c],lastOption:u}};return t.reduce(s,{args:[]}).args},ho=t=>{const e=new Map;for(const n of t){const i=e.get(n.name);i?e.set(n.name,{...i,...n}):e.set(n.name,n)}return[...e.values()]},fo=t=>{if(t===void 0)return;const e=t.toLowerCase().trim();return e==="true"||e==="1"||e==="yes"||e==="on"},mo=(t,e)=>{if(!t.type)return e;if(e!==void 0){if(t.type===Boolean||typeof t.type=="function"&&t.type.name==="Boolean")return fo(e);if(t.type===Number||typeof t.type=="function"&&t.type.name==="Number"){const n=Number.parseFloat(e);return Number.isNaN(n)?void 0:n}return t.type===String||typeof t.type=="function"&&t.type.name==="String"?e:t.type(e)}},go=/_./g,wo=/^[A-Z]/,yo=t=>t.toLowerCase().replaceAll(go,e=>e[1]?.toUpperCase()??e).replace(wo,e=>e.toLowerCase()),vo=t=>{if(!t||t.length===0)return{};const e={},n=fe();for(const i of t){const s=n[i.name],o=mo(i,s),c=o===void 0?i.defaultValue:o,a=yo(i.name);e[a]=c}return e},$o=t=>{const e=new Map,n=new Map;for(const i of t)if(e.set(i.name,i),i.alias){const s=Array.isArray(i.alias)?i.alias:[i.alias];for(const o of s)n.set(o,i)}return{optionMapByAlias:n,optionMapByName:e}},St=async t=>{if(typeof t.__resolvedExecute__=="function")return t.__resolvedExecute__;if(typeof t.loader!="function")throw new xe(t.name,"no execute or loader defined");let e;try{e=await t.loader()}catch(i){throw new xe(t.name,i instanceof Error?i.message:String(i),i)}const n=e.default;if(typeof n!="function")throw new xe(t.name,"loader did not return a module with a default-exported handler function");return t.__resolvedExecute__=n,n},xo=(t,e,n,i)=>{const s=new ro(t.name,t),{_all:o,_unknown:c,positionals:a}=e,u=Object.keys(n).length>0?{...o,...n}:o;he in u&&delete u[he],s.argument=a?.[he]??[],s.rawUnknown=[...c??[]];const r=Object.keys(i).length>0;return s.options=r?{...u,...i}:u,s.env=vo(t.env),s},bo=(t,e,n)=>{const i=t.options??[],s=i.length>0;let o=ho(s?[...i,...n]:n);if(o.length>0){for(const r of o)if(r.multiple&&r.lazyMultiple)throw new Error(`Argument "${r.name}" cannot have both multiple and lazyMultiple options, please choose one.`)}t.argument&&(o=[{defaultOption:!0,description:t.argument.description,group:"positionals",multiple:!0,name:he,type:t.argument.type,typeLabel:t.argument.typeLabel},...o]);let c,a;if(s){const{optionMapByAlias:r,optionMapByName:l}=$o(i);c=po(e,i,l,r),a=co(e,i,l,r)}else c=e,a={};const u=so(o,{argv:c,camelCase:!0,partial:!0,stopAtFirstUnknown:!0});return{arguments_:o,booleanValues:a,parsedArgs:u}},Q=async(t,e,n)=>typeof t.execute=="function"?t.execute(e):(await St(t))(e);let No=class extends k{commandName;missingOptions;constructor(t,e){super(`Command "${t}" is missing required options: ${e.join(", ")}`,"COMMAND_VALIDATION_ERROR",{commandName:t,missingOptions:e}),this.name="CommandValidationError",this.commandName=t,this.missingOptions=e,this.hint=`Provide the following required options: ${e.join(", ")}`}},Ao=class extends k{choices;option;value;constructor(t,e,n){super(`Invalid value "${e}" for option "${t}". Allowed values: ${n.join(", ")}`,"INVALID_CHOICE",{choices:n,option:t,value:e}),this.name="InvalidChoiceError",this.option=t,this.value=e,this.choices=n,this.hint=`Use one of: ${n.map(i=>`--${t} ${i}`).join(", ")}`}};const nt=(t,e,n=!1)=>{const i=[];for(const s of t)if(!(!n&&!s.required)&&e[s.name]===void 0){if(s.type?.name==="Boolean"){e[s.name]=!1;continue}i.push(s)}return i},ko=(t,e)=>e.includes(t)?!0:Math.abs(t.length-e.length)>t.length/2?!1:Rn(t,e)<=t.length/3,W=(t,e)=>{const n=t.toLowerCase();return e.filter(i=>ko(i.toLowerCase(),n))},Eo=(t,e)=>{const n=[];if(t._unknown&&t._unknown.forEach(i=>{const s=i.startsWith("--");let o=`Found unknown ${s?"option":"argument"} "${i}"`;if(s){const c=W(i.replace("--",""),(e.options??[]).map(a=>a.name));if(c.length>0){const[a,...u]=c.map(r=>`--${r}`);o+=u.length>0?`, did you mean ${a??""} or ${u.join(", ")}?`:`, did you mean ${a??""}?`}}n.push(o)}),n.length>0)throw new Error(n.join(`
|
|
26
26
|
`))},Co=(t,e,n)=>{const i=n.__requiredOptions__,s=i?nt(i,e,!0):nt(t,e,!1);if(s.length>0)throw new No(n.name,s.map(o=>o.name));e._unknown&&e._unknown.length>0&&!n.argument&&Eo(e,n)},Oo=(t,e,n)=>{const i=n.__conflictingOptions__??t.filter(s=>s.conflicts!==void 0);if(i.length>0){const s=i.find(o=>Array.isArray(o.conflicts)?o.conflicts.some(c=>e[c]!==void 0)&&e[o.name]!==void 0:e[o.conflicts]!==void 0&&e[o.name]!==void 0);if(s)throw new Et(s.name,typeof s.conflicts=="string"?s.conflicts:s.conflicts?.[0]??"unknown")}},_o=(t,e)=>{const n=e.options;if(n)for(const i of n){if(!i.choices||i.choices.length===0)continue;const s=t[i.name];if(s==null)continue;const o=Array.isArray(s)?s:[s];for(const c of o){const a=String(c);if(!i.choices.includes(a))throw new Ao(i.name,a,i.choices)}}},Io=t=>{if(!Array.isArray(t.options))return;const e=new Map,n=new Map;for(const s of t.options){if(s.name){const o=e.get(s.name)??[];o.push(s),e.set(s.name,o)}if(typeof s.alias=="string"&&s.alias.length>0){const o=n.get(s.alias)??[];o.push(s),n.set(s.alias,o)}else if(Array.isArray(s.alias)){for(const o of s.alias)if(o.length>0){const c=n.get(o)??[];c.push(s),n.set(o,c)}}}const i=[];for(const[s,o]of e)o.length>1&&i.push(`Duplicate option name "${s}" in command "${t.name}": ${JSON.stringify(o)}`);for(const[s,o]of n)o.length>1&&i.push(`Duplicate option alias "-${s}" used by options ${o.map(c=>`"${c.name}"`).join(", ")} in command "${t.name}"`);if(i.length>0)throw new Error(i.join(`
|
|
27
27
|
`))},Lo=(t,e)=>{if(e.length===0)return{argv:[],commandPath:void 0};const n=[];let i;for(let s=1;s<=e.length;s+=1){const o=e[s-1];if(o===void 0||o.startsWith("-"))break;n.push(o);const c=n.join(" ");t.has(c)&&(i={commandPath:[...n],depth:s})}return i?{argv:e.slice(i.depth),commandPath:i.commandPath}:{argv:e,commandPath:void 0}},q=t=>t.join(" "),it=(t,e)=>e&&e.length>0?[...e,t]:[t],So=(t,e)=>typeof t!="string"||t===""?"":t[0].toLowerCase()+t.slice(1),Mo=(t,e)=>typeof t!="string"||t===""?"":t[0].toUpperCase()+t.slice(1),Po=(t,e)=>{const{length:n}=t;if(n===0)return"";if(n===1)return t[0];const i=[];let s="",o="";for(let c=0;c<n;c++){const a=t[c];if(de.test(a)){s?(i.push(s+o+a),s="",o=""):(i.length>0&&i.push(e),s=a);continue}s?(o&&(o+=e),o+=a):(i.length>0&&i.push(e),i.push(a))}return i.join("")},Mt=(t,e)=>{if(typeof t!="string"||!t)return"";let n=!0;return Po(xi(t,{handleAnsi:e?.handleAnsi,handleEmoji:e?.handleEmoji,knownAcronyms:e?.knownAcronyms,locale:e?.locale,normalize:e?.normalize,separators:void 0,stripAnsi:e?.stripAnsi,stripEmoji:e?.stripEmoji}).map(i=>{const s=i,o=s.toLowerCase();return n?(n=!1,So(o)):Mo(o)}),"")},Do=/^no-/,Uo=t=>{t.options?.forEach(e=>{e.__camelCaseName__=Mt(e.name)})},Vo=t=>{if(!Array.isArray(t.options)||t.options.length===0)return;const e=new Set;for(const i of t.options)e.add(i.name);const n=[];for(const i of t.options)if(i.name.startsWith("no-")){const s=i.name.replace(Do,"");if(!e.has(s)){if(i.type!==Boolean)throw new Error(`Cannot add negated option "${i.name}" to command "${t.name}" because it is not a boolean.`);const o={...i,defaultValue:i.defaultValue===void 0?!0:!i.defaultValue,name:s};n.push(o),e.add(s)}}n.length>0&&t.options.push(...n)},To=(t,e)=>{if(!e.options||e.options.length===0)return;const{options:n}=t,i=new Map;for(const o of e.options)if(o.name.startsWith("no-")){const c=Mt(o.name);i.set(c,o)}const s=Object.keys(n).filter(o=>i.has(o));if(s.length!==0)for(const o of s){const c=o.charAt(2);if(!c)continue;const a=c.toLowerCase()+o.slice(3),u=i.get(o);u&&(u.__negated__=!0),n[a]=!n[o],Reflect.deleteProperty(n,o)}},jo=(t,e)=>{if(!e.options||e.options.length===0)return;const n=new Map;for(const s of e.options)s.__camelCaseName__&&s.__negated__===void 0&&s.implies!==void 0&&n.set(s.__camelCaseName__,s);if(n.size===0)return;const{options:i}=t;for(const s of Object.keys(i)){const o=n.get(s);if(o?.implies){const{implies:c}=o;for(const[a,u]of Object.entries(c))i[a]===void 0&&(i[a]=u)}}},Ro=()=>!!process.versions.electron,Bo=()=>Ro()&&!process.defaultApp,Wo=()=>Bo()?0:1,zo=t=>t.slice(Wo()+1),Fo=" ",qo=(t,e)=>t===e?!0:t.length!==e.length?!1:t.every((n,i)=>n===e[i]),Go=t=>{if(typeof t=="string")return t.split(Fo);const e=Ae();return qo(t,e)?zo(t):t},Ho=t=>{const e=o=>{t.error(`Uncaught exception: ${o.message||o}`),o.stack&&t.error(o.stack),G(1)},n=(o,c)=>{if(o instanceof Error)t.error(`Promise rejection: ${o.message||o}`),o.stack&&t.error(o.stack);else{let a;if(typeof o=="string")a=o;else try{a=JSON.stringify(o)}catch{a=String(o)}t.error(`Promise rejection: ${a}`)}G(1)},i=Se("uncaughtException",e),s=Se("unhandledRejection",n);return()=>{i(),s()}},ot=100,Jo=/^[a-z][\w-]*$/i,Ee=(t,e)=>{if(typeof t!="string"||t.trim().length===0)throw new k(`${e} must be a non-empty string`,"INVALID_INPUT",{fieldName:e,value:t});return t.trim()},st=(t,e)=>{if(!Array.isArray(t)||!t.every(n=>typeof n=="string"))throw new k(`${e} must be an array of strings`,"INVALID_INPUT",{fieldName:e,value:t});return t},be=(t,e)=>{if(typeof t!="object"||t===null)throw new k(`${e} must be an object`,"INVALID_INPUT",{fieldName:e,value:t});return t},pe=t=>{const e=Ee(t,"Command name");if(e.length>ot)throw new k(`Command name is too long (maximum ${String(ot)} characters)`,"INVALID_COMMAND_NAME",{commandName:e,length:e.length});if(e.includes("..")||e.includes("/")||e.includes("\\")||e.includes(";")||e.includes("|")||e.includes("&"))throw new k(`Command name "${e}" contains invalid characters`,"INVALID_COMMAND_NAME",{commandName:e});if(!Jo.test(e))throw new k(`Command name "${e}" must start with a letter and contain only letters, numbers, hyphens, and underscores`,"INVALID_COMMAND_NAME",{commandName:e});return e},Ko=new Set([`
|
|
28
|
-
`,"\r"," ","\0",'"',"$","&","'","(",")",";","<",">","[","\\","]","`","{","|","}"]),Yo=(t,e={})=>{if(typeof t!="string")throw new TypeError("Argument must be a string");const n=typeof e=="boolean"?{checkDangerousChars:e}:e,i=n.maxArgumentLength??1e6;if(Number.isFinite(i)&&i>0&&t.length>i)throw new Error(`Argument is too long (maximum ${String(i)} characters)`);if(n.checkDangerousChars){for(const s of t)if(Ko.has(s))throw new Error(`Argument contains dangerous character: ${s}`)}return n.trim?t.trim():t},rt=(t,e={})=>{if(!Array.isArray(t))throw new TypeError("Arguments must be an array");const n=typeof e=="boolean"?{checkDangerousChars:e}:e,i=n.maxArguments??1e5;if(Number.isFinite(i)&&i>0&&t.length>i)throw new Error(`Too many arguments (maximum ${String(i)})`);return t.map(s=>Yo(s,n))},Xo=/^-([^\d-])$/,Qo=/^--(\S+)/,Zo=/^-([^\d-]{2,})$/,Ne=t=>Xo.test(t)||Qo.test(t)||Zo.test(t),es={access:(t,e)=>_i(t,e),mkdir:(t,e)=>Oi(t,e),readdir:t=>Ci(t),readFile:(async(t,e)=>e===void 0?Fe(t):Fe(t,e)),rm:(t,e)=>Ei(t,e),stat:t=>ki(t),writeFile:(t,e,n)=>Ai(t,e,n)},ts=(t,e,n)=>{const i=e.indexOf("--"),s=i===-1?new Set:new Set(e.slice(i+1)),o=n.filter(u=>u.startsWith("--")&&u!=="--"&&!s.has(u));if(o.length===0)return;const c=(t.options??[]).map(u=>u.name),a=o.flatMap(u=>W(u.slice(2),c).map(r=>`--${r}`));throw new Ii(o,a)};class Le{#t;#e;#u;#p;#f;#m;#A;#k;#E;#$;#C;#x;#O;#_=ge;#h;#n;#i;#o;#s;#r;#g=!1;#I;#L=!1;#w;#y;#v;#l=[];#U(){return this.#w===void 0&&(this.#w=[...this.#i.keys()]),this.#w}#S(){return this.#y===void 0&&(this.#y=[...this.#n.keys()]),this.#y}#a(){return this.#v===void 0&&(this.#v=[...this.#U(),...this.#S()]),this.#v}#M(){return this.#l.length===0?ce:[...ce,...this.#l]}#P(){this.#w=void 0,this.#y=void 0,this.#v=void 0}#b(){if(this.#u===void 0){const e=Go(this.#e.argv);this.#u=rt(e,{maxArguments:this.#x}),this.#V()}return this.#u}#N(){return this.#$??fe()}#d(e){this.#_=e,this.#N().CEREBRO_OUTPUT_LEVEL=String(e)}#c(){const e=this.#N().CEREBRO_OUTPUT_LEVEL,n=e===void 0?Number.NaN:Number(e);return Number.isNaN(n)?this.#_:n}#V(){if(!this.#u)return;let e=!1;for(const n of this.#u){if(n==="--quiet"||n==="-q"){this.#d(zt),e=!0;break}if(n==="--verbose"||n==="-v"){this.#d(Ft),e=!0;break}if(n==="--debug"){this.#d(j),e=!0;break}}e||this.#d(Object.hasOwn(this.#N(),"DEBUG")?j:ge)}#T(){this.#L||(this.#I=Ho(this.#t),this.#L=!0)}#j(){return{arch:jt(),argv:this.#b(),cwd:this.#p,env:this.#$??fe(),exit:this.#E??(e=>G(e??0)),platform:Tt(),stdin:this.#C}}#D(e,n,i,s){this.#c()===j&&this.#t.debug(`command '${s}' found, parsing command args: ${n.join(", ")}`);const{arguments_:o,booleanValues:c,parsedArgs:a}=bo(e,n,this.#M()),u=Object.keys(c).length>0;let r=a;u&&(r={...a,_all:{...a._all,...c}}),Co(o,r,e);const l=xo(e,a,c,i);l.runtime=this,l.argv=this.#b(),l.fs=this.#k??es,l.process=this.#j(),l.console=this.#t;const d=e.options&&e.options.length>0;if(d&&e.options){const p=e.options.filter(f=>f.name.startsWith("no-"));for(const f of p){const h=f.name.slice(3),g=`--${f.name}`,$=`--${h}`,w=n.includes(g),y=n.includes($);if(w&&y)throw new Et(h,f.name)}}return d&&(To(l,e),jo(l,e)),Oo(o,l.options,e),_o(l.options,e),this.#O&&ts(e,n,l.rawUnknown),this.#c()===j&&(this.#t.debug("command options parsed from options:"),this.#t.debug(JSON.stringify(l.options,null,2)),this.#t.debug("command argument parsed from argument:"),this.#t.debug(JSON.stringify(l.argument,null,2))),{arguments_:o,booleanValues:c,commandArgs:r,parsedArgs:a,toolbox:l}}constructor(e,n={}){if(typeof e!="string"||e.trim().length===0)throw new k("CLI name must be a non-empty string","INVALID_INPUT",{cliName:e});this.#f=e.trim();const i=n.argv??Ae(),s=n.cwd??Rt();if(this.#e={...n,argv:i,cwd:s},this.#e.argv&&!Array.isArray(this.#e.argv))throw new k("CLI argv option must be an array of strings","INVALID_INPUT",{argv:this.#e.argv});if(this.#e.cwd&&typeof this.#e.cwd!="string")throw new k("CLI cwd option must be a string","INVALID_INPUT",{cwd:this.#e.cwd});if(this.#e.packageName&&typeof this.#e.packageName!="string")throw new k("CLI packageName option must be a string","INVALID_INPUT",{packageName:this.#e.packageName});if(this.#e.packageVersion&&typeof this.#e.packageVersion!="string")throw new k("CLI packageVersion option must be a string","INVALID_INPUT",{packageVersion:this.#e.packageVersion});if(typeof this.#e.logger=="object"){const r=["debug","error","info","log","warn"],l=[],d=this.#e.logger;for(const p of r)typeof d[p]!="function"&&l.push(p);if(l.length>0)throw new k(`Logger object is missing required methods: ${l.join(", ")}`,"INVALID_INPUT",{logger:this.#e.logger,missingMethods:l});this.#t=this.#e.logger}else this.#t={...console,debug:(...r)=>{this.#c()===j&&console.debug(...r)}};this.#m=this.#e.packageVersion,this.#A=this.#e.packageName,this.#p=this.#e.cwd,this.#s="help",this.#r={};const o=n.fs;if(o!==void 0&&(typeof o!="object"||o===null))throw new k("CLI fs option must be an object implementing the CerebroFs interface","INVALID_INPUT",{fs:n.fs});const c=n.exit;if(c!==void 0&&typeof c!="function")throw new k("CLI exit option must be a function","INVALID_INPUT",{exit:n.exit});const a=n.env;if(a!==void 0&&(typeof a!="object"||a===null))throw new k("CLI env option must be a record of string keys","INVALID_INPUT",{env:n.env});const u=n.stdin;if(u!==void 0&&typeof u!="string")throw new k("CLI stdin option must be a string","INVALID_INPUT",{stdin:n.stdin});this.#k=n.fs,this.#E=n.exit,this.#$=n.env,this.#C=n.stdin??"",this.#x=n.maxArguments,this.#O=n.strictOptions??!1,this.#d(ge),this.#n=new Map,this.#i=new Map,this.#o=new Map}setCommandSection(e){return this.#r=e,this}getCommandSection(){return this.#r.header||(this.#r.header=`${this.#f}${this.#m?` v${this.#m}`:""}`),this.#r}setDefaultCommand(e){return this.#s=e,this}get defaultCommand(){return this.#s}addCommand(e){be(e,"Command"),pe(e.name);const n=typeof e.execute=="function",i=typeof e.loader=="function";if(n&&i)throw new k(`Command "${e.name}" cannot define both "execute" and "loader" — choose one`,"INVALID_COMMAND",{commandName:e.name});if(!n&&!i)throw new k(`Command "${e.name}" must define either "execute" or "loader"`,"INVALID_COMMAND",{commandName:e.name});e.alias&&(typeof e.alias=="string"?pe(e.alias):st(e.alias,"Command alias").forEach(r=>pe(r))),e.argument&&be(e.argument,"Command argument"),e.options&&be(e.options,"Command options"),e.commandPath&&(st(e.commandPath,"Command commandPath"),e.commandPath.forEach(r=>{pe(r)}));const s=it(e.name,e.commandPath),o=q(s);if(this.#i.has(o))throw new k(`Command with path "${o}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name,commandPath:e.commandPath});const c=Array.isArray(e.commandPath)&&e.commandPath.length>0,a=this.#n.get(e.name),u=a!==void 0&&(a.commandPath===void 0||a.commandPath.length===0);if(!c&&u)throw new k(`Command with name "${e.name}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name});if(e.options)for(const r of e.options)qe(r);if(Io(e),Vo(e),Uo(e),e.options&&(e.__conflictingOptions__=e.options.filter(r=>r.conflicts!==void 0),e.__requiredOptions__=e.options.filter(r=>r.required===!0)),c&&a!==void 0)this.#n.set(o,e);else{if(!c&&a!==void 0&&!u){const r=it(a.name,a.commandPath);this.#n.set(q(r),a)}this.#n.set(e.name,e)}if(this.#i.set(o,s),this.#o.set(o,e),this.#P(),e.alias!==void 0){const r=typeof e.alias=="string"?[e.alias]:e.alias;for(const l of r){if(this.#c()===j&&this.#t.debug("adding alias",l),this.#n.has(l))throw new k(`Command alias "${l}" conflicts with existing command`,"DUPLICATE_COMMAND",{alias:l,commandName:e.name});this.#n.set(l,e)}}return this}addGlobalOption(e){const n=e,i=new Set(ce.map(o=>o.name)),s=new Set(ce.map(o=>o.alias).filter(Boolean));if(i.has(n.name))throw new k(`Cannot add global option "--${n.name}": it conflicts with a built-in global option`,"DUPLICATE_OPTION",{optionName:n.name});if(n.alias&&s.has(n.alias))throw new k(`Cannot add global option with alias "-${n.alias}": it conflicts with a built-in global option alias`,"DUPLICATE_OPTION",{alias:n.alias,optionName:n.name});if(new Set(this.#l.map(o=>o.name)).has(n.name))throw new k(`Global option "--${n.name}" has already been added`,"DUPLICATE_OPTION",{optionName:n.name});return n.group="global",qe(n),this.#l.push(n),this}getGlobalOptions(){return this.#M()}addPlugin(e){return this.getPluginManager().register(e),this}getPluginManager(){return this.#h?this.#h:(this.#h=new Si(this.#t),this.#h.register({description:"Attaches the logger to the toolbox",execute:e=>{e.logger=this.#t,e.console=e.logger},name:"logger"}),this.#h)}getCliName(){return this.#f}getPackageVersion(){return this.#m}getPackageName(){return this.#A}getCommands(){return this.#n}getCwd(){return this.#p}dispose(){this.#I?.()}async run(e={}){const{autoDispose:n=!0,shouldExitProcess:i=!0,...s}=e;if(!this.#n.has("help")){const{default:y}=await import("../packem_chunks/help-command.js");this.addCommand(new y(this.#n))}const o=this.#S(),c=this.#i;this.#T();const a=this.#b();let u,r=[...a];this.#c()===j&&(this.#t.debug(`process.execPath: ${Bt()}`),this.#t.debug(`process.execArgv: ${Wt().join(" ")}`),this.#t.debug(`process.argv: ${Ae().join(" ")}`));const l=Lo(c,[...a]);if(l.commandPath)u=l.commandPath,r=l.argv;else{if(a.length>1&&a[0]&&a[1]&&!Ne(a[0])&&!Ne(a[1])){const x=[];let N=0;for(;N<a.length;){const I=a[N];if(!I||Ne(I))break;x.push(I),N+=1}const E=q(x);if(x[0]&&!o.includes(x[0])){const I=this.#a(),O=W(E,I);throw new F(E,O)}}let y;try{y=Ti([null,...o],[...a])}catch(x){if(x instanceof Error&&x.name==="INVALID_COMMAND"&&"command"in x){const N=x.command,E=this.#a(),I=W(N,E);throw new F(N,I)}throw x}y.command&&(u=[y.command],r=y.argv)}if(!u)if(this.#s)u=[this.#s];else{const y=this.#a();throw new F("",y)}const d=q(u),p=this.#i.get(d);let f;if(p){if(f=this.#o.get(d),!f||q(p)!==d){const y=this.#a(),x=W(d,y);throw new F(d,x)}}else{const y=u.at(-1);if(f=y?this.#n.get(y):void 0,!f){const x=this.#a(),N=W(d,x);throw new F(d,N)}}if(typeof f.execute!="function"&&typeof f.loader!="function")return this.#t.error(`Command "${f.name}" has no function to execute.`),i?G(1):void 0;const h=r;let g,$;try{({commandArgs:g,toolbox:$}=this.#D(f,h,s,d))}catch(y){if(this.#t.error(y),i)return G(1);throw y}const w=this.getPluginManager();try{!this.#g&&w.hasPlugins()&&(await w.init({cli:this,cwd:this.#p,logger:this.#t}),this.#g=!0),await w.executeLifecycle("execute",$),await w.executeLifecycle("beforeCommand",$);let y;const x=g.global;if(x?.help){const N=this.#n.get("help");if(!N)throw new k("Help command not found","COMMAND_NOT_FOUND");y=await Q(N,$)}else if(x?.version??x?.V){const N=this.#n.get("version");if(!N)throw new k("Version command not found","COMMAND_NOT_FOUND");y=await Q(N,$)}else y=await Q(f,$);return await w.executeLifecycle("afterCommand",$,y),i?G(0):void 0}catch(y){throw await w.executeErrorHandlers(y,$),y}finally{n&&this.dispose()}}async runCommand(e,n={}){const{argv:i=[],...s}=n;Ee(e,"Command name");const o=e.split(" ").filter(Boolean),c=q(o),a=this.#i.get(c)?this.#o.get(c):this.#n.get(e);if(!a){const p=this.#a(),f=W(c||e,p);throw new F(e,f)}if(typeof a.execute!="function"&&typeof a.loader!="function")throw new k(`Command "${a.name}" has no function to execute`,"INVALID_COMMAND",{commandName:a.name});const u=[...rt(i,{maxArguments:this.#x})];this.#c()===j&&this.#t.debug(`running command '${e}' programmatically with args: ${u.join(", ")}`);const{commandArgs:r,toolbox:l}=this.#D(a,u,s,c||e),d=this.getPluginManager();try{!this.#g&&d.hasPlugins()&&(await d.init({cli:this,cwd:this.#p,logger:this.#t}),this.#g=!0),await d.executeLifecycle("execute",l),await d.executeLifecycle("beforeCommand",l);let p;const f=r.global;if(f?.help){const h=this.#n.get("help");if(!h)throw new k("Help command not found","COMMAND_NOT_FOUND");p=await Q(h,l)}else if(f?.version??f?.V){const h=this.#n.get("version");if(!h)throw new k("Version command not found","COMMAND_NOT_FOUND");p=await Q(h,l)}else p=await Q(a,l);return await d.executeLifecycle("afterCommand",l,p),p}catch(p){throw await d.executeErrorHandlers(p,l),p}}clone(e){const n={...this.#e,...e},i=new Le(this.#f,n);for(const[s,o]of this.#n)i.#n.set(s,o);for(const[s,o]of this.#i)i.#i.set(s,[...o]);for(const[s,o]of this.#o)i.#o.set(s,o);for(const s of this.#l)i.#l.push(s);return i.#s=this.#s,i.#r={...this.#r},i.#P(),i}async getAction(e){Ee(e,"Command name");const n=e.split(" ").filter(Boolean),i=q(n),s=this.#i.get(i)?this.#o.get(i):this.#n.get(e);if(!s){const o=this.#a(),c=W(i||e,o);throw new F(e,c)}if(typeof s.execute=="function")return s.execute;if(typeof s.loader=="function")return St(s);throw new k(`Command "${s.name}" has no execute or loader defined`,"INVALID_COMMAND",{commandName:s.name})}}const fs=(t,e)=>new Le(t,e),ms=(t={})=>({description:"Enhanced error handling and reporting with beautiful code frames",name:"error-handler",onError:(e,n)=>{const{logger:i,runtime:s}=n,{detailed:o=!1,exitOnError:c=!0,formatter:a,logErrors:u=!0,renderOptions:r={}}=t;if(u)if(a)i.error(a(e));else if(o){const l=s.getCwd(),d=Vn(e,{cwd:l,hideErrorCodeView:!1,hideErrorTitle:!1,hideMessage:!1,linesAbove:2,linesBelow:3,...r});i.error(d)}else i.error(e);c&&G(1)},version:"1.0.0"});var ns="1.0.0";const gs={version:ns},ws=async t=>{try{await t.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}},ys={argument:{description:"Package to execute (optionally with @version)",name:"package",type:String},description:"Execute a remote package without permanent installation",examples:[["vis dlx create-vite my-app","Scaffold a new project"],["vis dlx typescript@5.5.4 tsc --version","Run specific version"],["vis dlx -p cowsay -p lolcatjs -c 'echo hi | cowsay | lolcatjs'","Multiple packages with shell"],["vis install && vis dlx --offline typescript tsc --version","Hardened: pre-install + offline (no registry fetch on dlx)"],["vis dlx --info create-vite","Always show the first-run panel (size, score, permissions, changelog)"],["vis dlx --yes create-vite my-app","Skip the first-run panel and confirmation"]],group:"Run & Execute",loader:()=>import("../packem_chunks/handler66.js"),name:"dlx",options:[{alias:"p",description:"Additional packages to install (repeatable)",multiple:!0,name:"package",type:String},{alias:"c",defaultValue:!1,description:"Execute within shell environment",name:"shell-mode",type:Boolean},{alias:"s",defaultValue:!1,description:"Suppress output except command results",name:"silent",type:Boolean},{defaultValue:!1,description:"Resolve from local store only — fail rather than fetch from the registry. Pair with `vis install` for hardened npx-style workflows.",name:"offline",type:Boolean},{alias:"y",defaultValue:!1,description:"Skip the first-run info panel and confirmation prompt (also via VIS_DLX_YES — note this auto-approves every package)",name:"yes",type:Boolean},{defaultValue:!1,description:"Always show the first-run info panel (size, security score, permissions, changelog), even for an approved package",name:"info",type:Boolean},{defaultValue:!1,description:"Disable the first-run info panel entirely (also via VIS_DLX_NO_INFO)",name:"no-info",type:Boolean}]};export{z as L,fs as V,us as a,ls as b,gs as c,k as d,ys as e,ms as h,cs as i,as as n,ps as o,hs as p,ws as r,rs as s,ss as t};
|
|
28
|
+
`,"\r"," ","\0",'"',"$","&","'","(",")",";","<",">","[","\\","]","`","{","|","}"]),Yo=(t,e={})=>{if(typeof t!="string")throw new TypeError("Argument must be a string");const n=typeof e=="boolean"?{checkDangerousChars:e}:e,i=n.maxArgumentLength??1e6;if(Number.isFinite(i)&&i>0&&t.length>i)throw new Error(`Argument is too long (maximum ${String(i)} characters)`);if(n.checkDangerousChars){for(const s of t)if(Ko.has(s))throw new Error(`Argument contains dangerous character: ${s}`)}return n.trim?t.trim():t},rt=(t,e={})=>{if(!Array.isArray(t))throw new TypeError("Arguments must be an array");const n=typeof e=="boolean"?{checkDangerousChars:e}:e,i=n.maxArguments??1e5;if(Number.isFinite(i)&&i>0&&t.length>i)throw new Error(`Too many arguments (maximum ${String(i)})`);return t.map(s=>Yo(s,n))},Xo=/^-([^\d-])$/,Qo=/^--(\S+)/,Zo=/^-([^\d-]{2,})$/,Ne=t=>Xo.test(t)||Qo.test(t)||Zo.test(t),es={access:(t,e)=>_i(t,e),mkdir:(t,e)=>Oi(t,e),readdir:t=>Ci(t),readFile:(async(t,e)=>e===void 0?Fe(t):Fe(t,e)),rm:(t,e)=>Ei(t,e),stat:t=>ki(t),writeFile:(t,e,n)=>Ai(t,e,n)},ts=(t,e,n)=>{const i=e.indexOf("--"),s=i===-1?new Set:new Set(e.slice(i+1)),o=n.filter(u=>u.startsWith("--")&&u!=="--"&&!s.has(u));if(o.length===0)return;const c=(t.options??[]).map(u=>u.name),a=o.flatMap(u=>W(u.slice(2),c).map(r=>`--${r}`));throw new Ii(o,a)};class Le{#t;#e;#u;#p;#f;#m;#A;#k;#E;#$;#C;#x;#O;#_=ge;#h;#n;#i;#o;#s;#r;#g=!1;#I;#L=!1;#w;#y;#v;#l=[];#U(){return this.#w===void 0&&(this.#w=[...this.#i.keys()]),this.#w}#S(){return this.#y===void 0&&(this.#y=[...this.#n.keys()]),this.#y}#a(){return this.#v===void 0&&(this.#v=[...this.#U(),...this.#S()]),this.#v}#M(){return this.#l.length===0?ce:[...ce,...this.#l]}#P(){this.#w=void 0,this.#y=void 0,this.#v=void 0}#b(){if(this.#u===void 0){const e=Go(this.#e.argv);this.#u=rt(e,{maxArguments:this.#x}),this.#V()}return this.#u}#N(){return this.#$??fe()}#d(e){this.#_=e,this.#N().CEREBRO_OUTPUT_LEVEL=String(e)}#c(){const e=this.#N().CEREBRO_OUTPUT_LEVEL,n=e===void 0?Number.NaN:Number(e);return Number.isNaN(n)?this.#_:n}#V(){if(!this.#u)return;let e=!1;for(const n of this.#u){if(n==="--quiet"||n==="-q"){this.#d(zt),e=!0;break}if(n==="--verbose"||n==="-v"){this.#d(Ft),e=!0;break}if(n==="--debug"){this.#d(j),e=!0;break}}e||this.#d(Object.hasOwn(this.#N(),"DEBUG")?j:ge)}#T(){this.#L||(this.#I=Ho(this.#t),this.#L=!0)}#j(){return{arch:jt(),argv:this.#b(),cwd:this.#p,env:this.#$??fe(),exit:this.#E??(e=>G(e??0)),platform:Tt(),stdin:this.#C}}#D(e,n,i,s){this.#c()===j&&this.#t.debug(`command '${s}' found, parsing command args: ${n.join(", ")}`);const{arguments_:o,booleanValues:c,parsedArgs:a}=bo(e,n,this.#M()),u=Object.keys(c).length>0;let r=a;u&&(r={...a,_all:{...a._all,...c}}),Co(o,r,e);const l=xo(e,a,c,i);l.runtime=this,l.argv=this.#b(),l.fs=this.#k??es,l.process=this.#j(),l.console=this.#t;const d=e.options&&e.options.length>0;if(d&&e.options){const p=e.options.filter(f=>f.name.startsWith("no-"));for(const f of p){const h=f.name.slice(3),g=`--${f.name}`,$=`--${h}`,w=n.includes(g),y=n.includes($);if(w&&y)throw new Et(h,f.name)}}return d&&(To(l,e),jo(l,e)),Oo(o,l.options,e),_o(l.options,e),this.#O&&ts(e,n,l.rawUnknown),this.#c()===j&&(this.#t.debug("command options parsed from options:"),this.#t.debug(JSON.stringify(l.options,null,2)),this.#t.debug("command argument parsed from argument:"),this.#t.debug(JSON.stringify(l.argument,null,2))),{arguments_:o,booleanValues:c,commandArgs:r,parsedArgs:a,toolbox:l}}constructor(e,n={}){if(typeof e!="string"||e.trim().length===0)throw new k("CLI name must be a non-empty string","INVALID_INPUT",{cliName:e});this.#f=e.trim();const i=n.argv??Ae(),s=n.cwd??Rt();if(this.#e={...n,argv:i,cwd:s},this.#e.argv&&!Array.isArray(this.#e.argv))throw new k("CLI argv option must be an array of strings","INVALID_INPUT",{argv:this.#e.argv});if(this.#e.cwd&&typeof this.#e.cwd!="string")throw new k("CLI cwd option must be a string","INVALID_INPUT",{cwd:this.#e.cwd});if(this.#e.packageName&&typeof this.#e.packageName!="string")throw new k("CLI packageName option must be a string","INVALID_INPUT",{packageName:this.#e.packageName});if(this.#e.packageVersion&&typeof this.#e.packageVersion!="string")throw new k("CLI packageVersion option must be a string","INVALID_INPUT",{packageVersion:this.#e.packageVersion});if(typeof this.#e.logger=="object"){const r=["debug","error","info","log","warn"],l=[],d=this.#e.logger;for(const p of r)typeof d[p]!="function"&&l.push(p);if(l.length>0)throw new k(`Logger object is missing required methods: ${l.join(", ")}`,"INVALID_INPUT",{logger:this.#e.logger,missingMethods:l});this.#t=this.#e.logger}else this.#t={...console,debug:(...r)=>{this.#c()===j&&console.debug(...r)}};this.#m=this.#e.packageVersion,this.#A=this.#e.packageName,this.#p=this.#e.cwd,this.#s="help",this.#r={};const o=n.fs;if(o!==void 0&&(typeof o!="object"||o===null))throw new k("CLI fs option must be an object implementing the CerebroFs interface","INVALID_INPUT",{fs:n.fs});const c=n.exit;if(c!==void 0&&typeof c!="function")throw new k("CLI exit option must be a function","INVALID_INPUT",{exit:n.exit});const a=n.env;if(a!==void 0&&(typeof a!="object"||a===null))throw new k("CLI env option must be a record of string keys","INVALID_INPUT",{env:n.env});const u=n.stdin;if(u!==void 0&&typeof u!="string")throw new k("CLI stdin option must be a string","INVALID_INPUT",{stdin:n.stdin});this.#k=n.fs,this.#E=n.exit,this.#$=n.env,this.#C=n.stdin??"",this.#x=n.maxArguments,this.#O=n.strictOptions??!1,this.#d(ge),this.#n=new Map,this.#i=new Map,this.#o=new Map}setCommandSection(e){return this.#r=e,this}getCommandSection(){return this.#r.header||(this.#r.header=`${this.#f}${this.#m?` v${this.#m}`:""}`),this.#r}setDefaultCommand(e){return this.#s=e,this}get defaultCommand(){return this.#s}addCommand(e){be(e,"Command"),pe(e.name);const n=typeof e.execute=="function",i=typeof e.loader=="function";if(n&&i)throw new k(`Command "${e.name}" cannot define both "execute" and "loader" — choose one`,"INVALID_COMMAND",{commandName:e.name});if(!n&&!i)throw new k(`Command "${e.name}" must define either "execute" or "loader"`,"INVALID_COMMAND",{commandName:e.name});e.alias&&(typeof e.alias=="string"?pe(e.alias):st(e.alias,"Command alias").forEach(r=>pe(r))),e.argument&&be(e.argument,"Command argument"),e.options&&be(e.options,"Command options"),e.commandPath&&(st(e.commandPath,"Command commandPath"),e.commandPath.forEach(r=>{pe(r)}));const s=it(e.name,e.commandPath),o=q(s);if(this.#i.has(o))throw new k(`Command with path "${o}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name,commandPath:e.commandPath});const c=Array.isArray(e.commandPath)&&e.commandPath.length>0,a=this.#n.get(e.name),u=a!==void 0&&(a.commandPath===void 0||a.commandPath.length===0);if(!c&&u)throw new k(`Command with name "${e.name}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name});if(e.options)for(const r of e.options)qe(r);if(Io(e),Vo(e),Uo(e),e.options&&(e.__conflictingOptions__=e.options.filter(r=>r.conflicts!==void 0),e.__requiredOptions__=e.options.filter(r=>r.required===!0)),c&&a!==void 0)this.#n.set(o,e);else{if(!c&&a!==void 0&&!u){const r=it(a.name,a.commandPath);this.#n.set(q(r),a)}this.#n.set(e.name,e)}if(this.#i.set(o,s),this.#o.set(o,e),this.#P(),e.alias!==void 0){const r=typeof e.alias=="string"?[e.alias]:e.alias;for(const l of r){if(this.#c()===j&&this.#t.debug("adding alias",l),this.#n.has(l))throw new k(`Command alias "${l}" conflicts with existing command`,"DUPLICATE_COMMAND",{alias:l,commandName:e.name});this.#n.set(l,e)}}return this}addGlobalOption(e){const n=e,i=new Set(ce.map(o=>o.name)),s=new Set(ce.map(o=>o.alias).filter(Boolean));if(i.has(n.name))throw new k(`Cannot add global option "--${n.name}": it conflicts with a built-in global option`,"DUPLICATE_OPTION",{optionName:n.name});if(n.alias&&s.has(n.alias))throw new k(`Cannot add global option with alias "-${n.alias}": it conflicts with a built-in global option alias`,"DUPLICATE_OPTION",{alias:n.alias,optionName:n.name});if(new Set(this.#l.map(o=>o.name)).has(n.name))throw new k(`Global option "--${n.name}" has already been added`,"DUPLICATE_OPTION",{optionName:n.name});return n.group="global",qe(n),this.#l.push(n),this}getGlobalOptions(){return this.#M()}addPlugin(e){return this.getPluginManager().register(e),this}getPluginManager(){return this.#h?this.#h:(this.#h=new Si(this.#t),this.#h.register({description:"Attaches the logger to the toolbox",execute:e=>{e.logger=this.#t,e.console=e.logger},name:"logger"}),this.#h)}getCliName(){return this.#f}getPackageVersion(){return this.#m}getPackageName(){return this.#A}getCommands(){return this.#n}getCwd(){return this.#p}dispose(){this.#I?.()}async run(e={}){const{autoDispose:n=!0,shouldExitProcess:i=!0,...s}=e;if(!this.#n.has("help")){const{default:y}=await import("../packem_chunks/help-command.js");this.addCommand(new y(this.#n))}const o=this.#S(),c=this.#i;this.#T();const a=this.#b();let u,r=[...a];this.#c()===j&&(this.#t.debug(`process.execPath: ${Bt()}`),this.#t.debug(`process.execArgv: ${Wt().join(" ")}`),this.#t.debug(`process.argv: ${Ae().join(" ")}`));const l=Lo(c,[...a]);if(l.commandPath)u=l.commandPath,r=l.argv;else{if(a.length>1&&a[0]&&a[1]&&!Ne(a[0])&&!Ne(a[1])){const x=[];let N=0;for(;N<a.length;){const I=a[N];if(!I||Ne(I))break;x.push(I),N+=1}const E=q(x);if(x[0]&&!o.includes(x[0])){const I=this.#a(),O=W(E,I);throw new F(E,O)}}let y;try{y=Ti([null,...o],[...a])}catch(x){if(x instanceof Error&&x.name==="INVALID_COMMAND"&&"command"in x){const N=x.command,E=this.#a(),I=W(N,E);throw new F(N,I)}throw x}y.command&&(u=[y.command],r=y.argv)}if(!u)if(this.#s)u=[this.#s];else{const y=this.#a();throw new F("",y)}const d=q(u),p=this.#i.get(d);let f;if(p){if(f=this.#o.get(d),!f||q(p)!==d){const y=this.#a(),x=W(d,y);throw new F(d,x)}}else{const y=u.at(-1);if(f=y?this.#n.get(y):void 0,!f){const x=this.#a(),N=W(d,x);throw new F(d,N)}}if(typeof f.execute!="function"&&typeof f.loader!="function")return this.#t.error(`Command "${f.name}" has no function to execute.`),i?G(1):void 0;const h=r;let g,$;try{({commandArgs:g,toolbox:$}=this.#D(f,h,s,d))}catch(y){if(this.#t.error(y),i)return G(1);throw y}const w=this.getPluginManager();try{!this.#g&&w.hasPlugins()&&(await w.init({cli:this,cwd:this.#p,logger:this.#t}),this.#g=!0),await w.executeLifecycle("execute",$),await w.executeLifecycle("beforeCommand",$);let y;const x=g.global;if(x?.help){const N=this.#n.get("help");if(!N)throw new k("Help command not found","COMMAND_NOT_FOUND");y=await Q(N,$)}else if(x?.version??x?.V){const N=this.#n.get("version");if(!N)throw new k("Version command not found","COMMAND_NOT_FOUND");y=await Q(N,$)}else y=await Q(f,$);return await w.executeLifecycle("afterCommand",$,y),i?G(0):void 0}catch(y){throw await w.executeErrorHandlers(y,$),y}finally{n&&this.dispose()}}async runCommand(e,n={}){const{argv:i=[],...s}=n;Ee(e,"Command name");const o=e.split(" ").filter(Boolean),c=q(o),a=this.#i.get(c)?this.#o.get(c):this.#n.get(e);if(!a){const p=this.#a(),f=W(c||e,p);throw new F(e,f)}if(typeof a.execute!="function"&&typeof a.loader!="function")throw new k(`Command "${a.name}" has no function to execute`,"INVALID_COMMAND",{commandName:a.name});const u=[...rt(i,{maxArguments:this.#x})];this.#c()===j&&this.#t.debug(`running command '${e}' programmatically with args: ${u.join(", ")}`);const{commandArgs:r,toolbox:l}=this.#D(a,u,s,c||e),d=this.getPluginManager();try{!this.#g&&d.hasPlugins()&&(await d.init({cli:this,cwd:this.#p,logger:this.#t}),this.#g=!0),await d.executeLifecycle("execute",l),await d.executeLifecycle("beforeCommand",l);let p;const f=r.global;if(f?.help){const h=this.#n.get("help");if(!h)throw new k("Help command not found","COMMAND_NOT_FOUND");p=await Q(h,l)}else if(f?.version??f?.V){const h=this.#n.get("version");if(!h)throw new k("Version command not found","COMMAND_NOT_FOUND");p=await Q(h,l)}else p=await Q(a,l);return await d.executeLifecycle("afterCommand",l,p),p}catch(p){throw await d.executeErrorHandlers(p,l),p}}clone(e){const n={...this.#e,...e},i=new Le(this.#f,n);for(const[s,o]of this.#n)i.#n.set(s,o);for(const[s,o]of this.#i)i.#i.set(s,[...o]);for(const[s,o]of this.#o)i.#o.set(s,o);for(const s of this.#l)i.#l.push(s);return i.#s=this.#s,i.#r={...this.#r},i.#P(),i}async getAction(e){Ee(e,"Command name");const n=e.split(" ").filter(Boolean),i=q(n),s=this.#i.get(i)?this.#o.get(i):this.#n.get(e);if(!s){const o=this.#a(),c=W(i||e,o);throw new F(e,c)}if(typeof s.execute=="function")return s.execute;if(typeof s.loader=="function")return St(s);throw new k(`Command "${s.name}" has no execute or loader defined`,"INVALID_COMMAND",{commandName:s.name})}}const fs=(t,e)=>new Le(t,e),ms=(t={})=>({description:"Enhanced error handling and reporting with beautiful code frames",name:"error-handler",onError:(e,n)=>{const{logger:i,runtime:s}=n,{detailed:o=!1,exitOnError:c=!0,formatter:a,logErrors:u=!0,renderOptions:r={}}=t;if(u)if(a)i.error(a(e));else if(o){const l=s.getCwd(),d=Vn(e,{cwd:l,hideErrorCodeView:!1,hideErrorTitle:!1,hideMessage:!1,linesAbove:2,linesBelow:3,...r});i.error(d)}else i.error(e);c&&G(1)},version:"1.0.0"});var ns="1.0.2";const gs={version:ns},ws=async t=>{try{await t.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}},ys={argument:{description:"Package to execute (optionally with @version)",name:"package",type:String},description:"Execute a remote package without permanent installation",examples:[["vis dlx create-vite my-app","Scaffold a new project"],["vis dlx typescript@5.5.4 tsc --version","Run specific version"],["vis dlx -p cowsay -p lolcatjs -c 'echo hi | cowsay | lolcatjs'","Multiple packages with shell"],["vis install && vis dlx --offline typescript tsc --version","Hardened: pre-install + offline (no registry fetch on dlx)"],["vis dlx --info create-vite","Always show the first-run panel (size, score, permissions, changelog)"],["vis dlx --yes create-vite my-app","Skip the first-run panel and confirmation"]],group:"Run & Execute",loader:()=>import("../packem_chunks/handler66.js"),name:"dlx",options:[{alias:"p",description:"Additional packages to install (repeatable)",multiple:!0,name:"package",type:String},{alias:"c",defaultValue:!1,description:"Execute within shell environment",name:"shell-mode",type:Boolean},{alias:"s",defaultValue:!1,description:"Suppress output except command results",name:"silent",type:Boolean},{defaultValue:!1,description:"Resolve from local store only — fail rather than fetch from the registry. Pair with `vis install` for hardened npx-style workflows.",name:"offline",type:Boolean},{alias:"y",defaultValue:!1,description:"Skip the first-run info panel and confirmation prompt (also via VIS_DLX_YES — note this auto-approves every package)",name:"yes",type:Boolean},{defaultValue:!1,description:"Always show the first-run info panel (size, security score, permissions, changelog), even for an approved package",name:"info",type:Boolean},{defaultValue:!1,description:"Disable the first-run info panel entirely (also via VIS_DLX_NO_INFO)",name:"no-info",type:Boolean}]};export{z as L,fs as V,us as a,ls as b,gs as c,k as d,ys as e,ms as h,cs as i,as as n,ps as o,hs as p,ws as r,rs as s,ss as t};
|