metascope 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/chunk-Bdh3yLIe.js +1 -0
- package/dist/bin/cli.js +271 -272
- package/dist/bin/dns-CUigd8AG.js +1 -0
- package/dist/bin/{jiti-D2Njwwqq.js → jiti-BTBDwj9g.js} +2 -2
- package/dist/bin/renovate-DecR7mby.js +1 -0
- package/dist/bin/shared-C_yS1qGF.js +5 -0
- package/dist/lib/file-matching.js +20 -13
- package/dist/lib/log.d.ts +6 -4
- package/dist/lib/log.js +5 -3
- package/dist/lib/metadata-types.d.ts +33 -21
- package/dist/lib/metadata-types.js +8 -9
- package/dist/lib/metadata.js +7 -7
- package/dist/lib/package.js +1 -1
- package/dist/lib/parsers/gemspec-parser.js +16 -14
- package/dist/lib/parsers/go-mod-parser.js +13 -10
- package/dist/lib/parsers/makefile-config-parser.js +20 -17
- package/dist/lib/parsers/properties-parser.js +3 -3
- package/dist/lib/parsers/rfc822-header-parser.js +4 -4
- package/dist/lib/parsers/setup-py-parser.js +3 -4
- package/dist/lib/source.d.ts +1 -0
- package/dist/lib/source.js +5 -4
- package/dist/lib/sources/arduino-library-properties.js +32 -15
- package/dist/lib/sources/cinder-cinderblock-xml.js +21 -9
- package/dist/lib/sources/codemeta-json.js +24 -20
- package/dist/lib/sources/git-stats.js +1 -1
- package/dist/lib/sources/github-actions.js +9 -2
- package/dist/lib/sources/github.js +1 -1
- package/dist/lib/sources/go-goreleaser-yaml.js +5 -4
- package/dist/lib/sources/java-pom-xml.js +38 -19
- package/dist/lib/sources/metadata-file.js +15 -12
- package/dist/lib/sources/node-npm-registry.js +1 -1
- package/dist/lib/sources/openframeworks-addon-config-mk.js +7 -0
- package/dist/lib/sources/openframeworks-install-xml.js +24 -14
- package/dist/lib/sources/processing-library-properties.js +25 -10
- package/dist/lib/sources/processing-sketch-properties.js +51 -7
- package/dist/lib/sources/publiccode-yaml.js +37 -5
- package/dist/lib/sources/python-pkg-info.js +2 -2
- package/dist/lib/sources/python-setup-cfg.js +2 -2
- package/dist/lib/sources/readme-file.js +9 -2
- package/dist/lib/sources/ruby-gemspec.js +1 -0
- package/dist/lib/sources/rust-cargo-toml.js +29 -10
- package/dist/lib/sources/xcode-info-plist.js +48 -24
- package/dist/lib/sources/xcode-project-pbxproj.js +22 -12
- package/dist/lib/templates/codemeta-json.d.ts +4 -5
- package/dist/lib/templates/codemeta-json.js +4 -5
- package/dist/lib/templates/codemeta.js +30 -30
- package/dist/lib/templates/metadata.d.ts +2 -2
- package/dist/lib/templates/metadata.js +3 -3
- package/dist/lib/utilities/codemeta-helpers.d.ts +3 -2
- package/dist/lib/utilities/codemeta-helpers.js +14 -12
- package/dist/lib/utilities/fetch.js +2 -2
- package/dist/lib/utilities/formatting.js +4 -3
- package/dist/lib/utilities/github.js +3 -3
- package/dist/lib/utilities/license-identification.d.ts +3 -1
- package/dist/lib/utilities/license-identification.js +21 -25
- package/dist/lib/utilities/schema-primitives.js +11 -10
- package/dist/lib/utilities/template-helpers.js +3 -3
- package/package.json +12 -12
- package/readme.md +7 -3
- package/dist/.DS_Store +0 -0
- package/dist/bin/chunk-BjEoQXZ0.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"node:dns";function t(){let t=new Map,n=new Map,r=e.lookup;e.lookup=function(i,...a){let o={},s;typeof a[0]==`function`?s=a[0]:(o=typeof a[0]==`number`?{family:a[0]}:a[0]||{},s=a[1]);let c=t.get(i);if(c){o.all?s(null,c):s(null,c[0].address,c[0].family);return}if(n.has(i)){n.get(i).push({options:o,callback:s});return}n.set(i,[{options:o,callback:s}]),r.call(e,i,{all:!0},(e,r)=>{let a=n.get(i);n.delete(i),!e&&r?.length&&t.set(i,r);for(let{options:t,callback:n}of a)e?n(e):t.all?n(null,r):n(null,r[0].address,r[0].family)})}}export{t as enableDnsCache};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./chunk-BjEoQXZ0.js";import{createRequire as r}from"node:module";var i=t(n(((t,n)=>{(()=>{var t={"./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive":function(e){function t(e){return Promise.resolve().then(function(){var t=Error(`Cannot find module '`+e+`'`);throw t.code=`MODULE_NOT_FOUND`,t})}t.keys=()=>[],t.resolve=t,t.id=`./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive`,e.exports=t}},r={};function i(e){var n=r[e];if(n!==void 0)return n.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};(()=>{i.d(a,{default:()=>Gr});let t=e(`node:os`);var n=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],r=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],o=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,s={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},c=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,l={5:c,"5module":c+` export import`,6:c+` const class extends export import super`},u=/^in(stanceof)?$/,d=RegExp(`[`+o+`]`),f=RegExp(`[`+o+`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]`);function p(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}return!1}function m(e,t){return e<65?e===36:e<91||(e<97?e===95:e<123||(e<=65535?e>=170&&d.test(String.fromCharCode(e)):!1!==t&&p(e,r)))}function h(e,t){return e<48?e===36:e<58||!(e<65)&&(e<91||(e<97?e===95:e<123||(e<=65535?e>=170&&f.test(String.fromCharCode(e)):!1!==t&&(p(e,r)||p(e,n)))))}var g=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function _(e,t){return new g(e,{beforeExpr:!0,binop:t})}var v={beforeExpr:!0},y={startsExpr:!0},ee={};function b(e,t){return t===void 0&&(t={}),t.keyword=e,ee[e]=new g(e,t)}var x={num:new g(`num`,y),regexp:new g(`regexp`,y),string:new g(`string`,y),name:new g(`name`,y),privateId:new g(`privateId`,y),eof:new g(`eof`),bracketL:new g(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new g(`]`),braceL:new g(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new g(`}`),parenL:new g(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new g(`)`),comma:new g(`,`,v),semi:new g(`;`,v),colon:new g(`:`,v),dot:new g(`.`),question:new g(`?`,v),questionDot:new g(`?.`),arrow:new g(`=>`,v),template:new g(`template`),invalidTemplate:new g(`invalidTemplate`),ellipsis:new g(`...`,v),backQuote:new g("`",y),dollarBraceL:new g("${",{beforeExpr:!0,startsExpr:!0}),eq:new g(`=`,{beforeExpr:!0,isAssign:!0}),assign:new g(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new g(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new g(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:_(`||`,1),logicalAND:_(`&&`,2),bitwiseOR:_(`|`,3),bitwiseXOR:_(`^`,4),bitwiseAND:_(`&`,5),equality:_(`==/!=/===/!==`,6),relational:_(`</>/<=/>=`,7),bitShift:_(`<</>>/>>>`,8),plusMin:new g(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:_(`%`,10),star:_(`*`,10),slash:_(`/`,10),starstar:new g(`**`,{beforeExpr:!0}),coalesce:_(`??`,1),_break:b(`break`),_case:b(`case`,v),_catch:b(`catch`),_continue:b(`continue`),_debugger:b(`debugger`),_default:b(`default`,v),_do:b(`do`,{isLoop:!0,beforeExpr:!0}),_else:b(`else`,v),_finally:b(`finally`),_for:b(`for`,{isLoop:!0}),_function:b(`function`,y),_if:b(`if`),_return:b(`return`,v),_switch:b(`switch`),_throw:b(`throw`,v),_try:b(`try`),_var:b(`var`),_const:b(`const`),_while:b(`while`,{isLoop:!0}),_with:b(`with`),_new:b(`new`,{beforeExpr:!0,startsExpr:!0}),_this:b(`this`,y),_super:b(`super`,y),_class:b(`class`,y),_extends:b(`extends`,v),_export:b(`export`),_import:b(`import`,y),_null:b(`null`,y),_true:b(`true`,y),_false:b(`false`,y),_in:b(`in`,{beforeExpr:!0,binop:7}),_instanceof:b(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:b(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},S=/\r\n?|\n|\u2028|\u2029/,te=new RegExp(S.source,`g`);function ne(e){return e===10||e===13||e===8232||e===8233}function re(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(ne(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var ie=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ae=Object.prototype,oe=ae.hasOwnProperty,se=ae.toString,w=Object.hasOwn||function(e,t){return oe.call(e,t)},ce=Array.isArray||function(e){return se.call(e)===`[object Array]`},le=Object.create(null);function T(e){return le[e]||(le[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function E(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,de=function(e,t){this.line=e,this.column=t};de.prototype.offset=function(e){return new de(this.line,this.column+e)};var fe=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function pe(e,t){for(var n=1,r=0;;){var i=re(e,r,t);if(i<0)return new de(n,t-r);++n,r=i}}var me={ecmaVersion:null,sourceType:`script`,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},he=!1;function ge(e){var t={};for(var n in me)t[n]=e&&w(e,n)?e[n]:me[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!he&&typeof console==`object`&&console.warn&&(he=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
1
|
+
import{i as e,o as t,t as n}from"./chunk-Bdh3yLIe.js";import{createRequire as r}from"node:module";var i=t(n(((t,n)=>{(()=>{var t={"./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive":function(e){function t(e){return Promise.resolve().then(function(){var t=Error(`Cannot find module '`+e+`'`);throw t.code=`MODULE_NOT_FOUND`,t})}t.keys=()=>[],t.resolve=t,t.id=`./node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist lazy recursive`,e.exports=t}},r={};function i(e){var n=r[e];if(n!==void 0)return n.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};(()=>{i.d(a,{default:()=>Gr});let t=e(`node:os`);var n=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],r=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],o=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,s={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},c=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,l={5:c,"5module":c+` export import`,6:c+` const class extends export import super`},u=/^in(stanceof)?$/,d=RegExp(`[`+o+`]`),f=RegExp(`[`+o+`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]`);function p(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}return!1}function m(e,t){return e<65?e===36:e<91||(e<97?e===95:e<123||(e<=65535?e>=170&&d.test(String.fromCharCode(e)):!1!==t&&p(e,r)))}function h(e,t){return e<48?e===36:e<58||!(e<65)&&(e<91||(e<97?e===95:e<123||(e<=65535?e>=170&&f.test(String.fromCharCode(e)):!1!==t&&(p(e,r)||p(e,n)))))}var g=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function _(e,t){return new g(e,{beforeExpr:!0,binop:t})}var v={beforeExpr:!0},y={startsExpr:!0},ee={};function b(e,t){return t===void 0&&(t={}),t.keyword=e,ee[e]=new g(e,t)}var x={num:new g(`num`,y),regexp:new g(`regexp`,y),string:new g(`string`,y),name:new g(`name`,y),privateId:new g(`privateId`,y),eof:new g(`eof`),bracketL:new g(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new g(`]`),braceL:new g(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new g(`}`),parenL:new g(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new g(`)`),comma:new g(`,`,v),semi:new g(`;`,v),colon:new g(`:`,v),dot:new g(`.`),question:new g(`?`,v),questionDot:new g(`?.`),arrow:new g(`=>`,v),template:new g(`template`),invalidTemplate:new g(`invalidTemplate`),ellipsis:new g(`...`,v),backQuote:new g("`",y),dollarBraceL:new g("${",{beforeExpr:!0,startsExpr:!0}),eq:new g(`=`,{beforeExpr:!0,isAssign:!0}),assign:new g(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new g(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new g(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:_(`||`,1),logicalAND:_(`&&`,2),bitwiseOR:_(`|`,3),bitwiseXOR:_(`^`,4),bitwiseAND:_(`&`,5),equality:_(`==/!=/===/!==`,6),relational:_(`</>/<=/>=`,7),bitShift:_(`<</>>/>>>`,8),plusMin:new g(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:_(`%`,10),star:_(`*`,10),slash:_(`/`,10),starstar:new g(`**`,{beforeExpr:!0}),coalesce:_(`??`,1),_break:b(`break`),_case:b(`case`,v),_catch:b(`catch`),_continue:b(`continue`),_debugger:b(`debugger`),_default:b(`default`,v),_do:b(`do`,{isLoop:!0,beforeExpr:!0}),_else:b(`else`,v),_finally:b(`finally`),_for:b(`for`,{isLoop:!0}),_function:b(`function`,y),_if:b(`if`),_return:b(`return`,v),_switch:b(`switch`),_throw:b(`throw`,v),_try:b(`try`),_var:b(`var`),_const:b(`const`),_while:b(`while`,{isLoop:!0}),_with:b(`with`),_new:b(`new`,{beforeExpr:!0,startsExpr:!0}),_this:b(`this`,y),_super:b(`super`,y),_class:b(`class`,y),_extends:b(`extends`,v),_export:b(`export`),_import:b(`import`,y),_null:b(`null`,y),_true:b(`true`,y),_false:b(`false`,y),_in:b(`in`,{beforeExpr:!0,binop:7}),_instanceof:b(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:b(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},S=/\r\n?|\n|\u2028|\u2029/,te=new RegExp(S.source,`g`);function ne(e){return e===10||e===13||e===8232||e===8233}function re(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(ne(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var ie=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ae=Object.prototype,oe=ae.hasOwnProperty,se=ae.toString,w=Object.hasOwn||function(e,t){return oe.call(e,t)},ce=Array.isArray||function(e){return se.call(e)===`[object Array]`},le=Object.create(null);function T(e){return le[e]||(le[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function E(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var ue=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,de=function(e,t){this.line=e,this.column=t};de.prototype.offset=function(e){return new de(this.line,this.column+e)};var fe=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function pe(e,t){for(var n=1,r=0;;){var i=re(e,r,t);if(i<0)return new de(n,t-r);++n,r=i}}var me={ecmaVersion:null,sourceType:`script`,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},he=!1;function ge(e){var t={};for(var n in me)t[n]=e&&w(e,n)?e[n]:me[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!he&&typeof console==`object`&&console.warn&&(he=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
2
2
|
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,e&&e.allowHashBang!=null||(t.allowHashBang=t.ecmaVersion>=14),ce(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return ce(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new fe(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}(t,t.onComment)),t}var _e=256,ve=259;function ye(e,t){return 2|(e?4:0)|(t?8:0)}var D=function(e,t,n){this.options=e=ge(e),this.sourceFile=e.sourceFile,this.keywords=T(l[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;!0!==e.allowReserved&&(r=s[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=T(r);var i=(r?r+` `:``)+s.strict;this.reservedWordsStrict=T(i),this.reservedWordsStrictBind=T(i+` `+s.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
|
|
3
3
|
`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(S).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=x.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType===`module`,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},O={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};D.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},O.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},O.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},O.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},O.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t)return!1;if(2&t)return(4&t)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},O.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},O.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},O.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},O.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t||2&t&&!(16&t))return!0}return!1},O.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&_e)>0},D.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},D.parse=function(e,t){return new this(t,e).parse()},D.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},D.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(D.prototype,O);var k=D.prototype,be=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;k.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){C.lastIndex=e,e+=C.exec(this.input)[0].length;var t=be.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){C.lastIndex=e+t[0].length;var n=C.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||S.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`)}e+=t[0].length,C.lastIndex=e,e+=C.exec(this.input)[0].length,this.input[e]===`;`&&e++}},k.eat=function(e){return this.type===e&&(this.next(),!0)},k.isContextual=function(e){return this.type===x.name&&this.value===e&&!this.containsEsc},k.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},k.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},k.canInsertSemicolon=function(){return this.type===x.eof||this.type===x.braceR||S.test(this.input.slice(this.lastTokEnd,this.start))},k.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},k.semicolon=function(){this.eat(x.semi)||this.insertSemicolon()||this.unexpected()},k.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},k.expect=function(e){this.eat(e)||this.unexpected()},k.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var xe=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};k.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},k.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},k.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,`Yield expression cannot be a default value`),this.awaitPos&&this.raise(this.awaitPos,`Await expression cannot be a default value`)},k.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var A=D.prototype;A.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==x.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,`Export '`+a+`' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,`Program`)};var Se={kind:`loop`},Ce={kind:`switch`};A.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;C.lastIndex=this.pos;var t=C.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123||r>55295&&r<56320)return!0;if(m(r,!0)){for(var i=n+1;h(r=this.input.charCodeAt(i),!0);)++i;if(r===92||r>55295&&r<56320)return!0;var a=this.input.slice(n,i);if(!u.test(a))return!0}return!1},A.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;C.lastIndex=this.pos;var e,t=C.exec(this.input),n=this.pos+t[0].length;return!(S.test(this.input.slice(this.pos,n))||this.input.slice(n,n+8)!==`function`||n+8!==this.input.length&&(h(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},A.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;C.lastIndex=this.pos;var n=C.exec(this.input),r=this.pos+n[0].length;if(S.test(this.input.slice(this.pos,r)))return!1;if(e){var i,a=r+5;if(this.input.slice(r,a)!==`using`||a===this.input.length||h(i=this.input.charCodeAt(a))||i>55295&&i<56320)return!1;C.lastIndex=a;var o=C.exec(this.input);if(o&&S.test(this.input.slice(a,a+o[0].length)))return!1}if(t){var s,c=r+2;if(!(this.input.slice(r,c)!==`of`||c!==this.input.length&&(h(s=this.input.charCodeAt(c))||s>55295&&s<56320)))return!1}var l=this.input.charCodeAt(r);return m(l,!0)||l===92},A.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},A.isUsing=function(e){return this.isUsingKeyword(!1,e)},A.parseStatement=function(e,t,n){var r,i=this.type,a=this.startNode();switch(this.isLet(e)&&(i=x._var,r=`let`),i){case x._break:case x._continue:return this.parseBreakContinueStatement(a,i.keyword);case x._debugger:return this.parseDebuggerStatement(a);case x._do:return this.parseDoStatement(a);case x._for:return this.parseForStatement(a);case x._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!e);case x._class:return e&&this.unexpected(),this.parseClass(a,!0);case x._if:return this.parseIfStatement(a);case x._return:return this.parseReturnStatement(a);case x._switch:return this.parseSwitchStatement(a);case x._throw:return this.parseThrowStatement(a);case x._try:return this.parseTryStatement(a);case x._const:case x._var:return r||=this.value,e&&r!==`var`&&this.unexpected(),this.parseVarStatement(a,r);case x._while:return this.parseWhileStatement(a);case x._with:return this.parseWithStatement(a);case x.braceL:return this.parseBlock(!0,a);case x.semi:return this.parseEmptyStatement(a);case x._export:case x._import:if(this.options.ecmaVersion>10&&i===x._import){C.lastIndex=this.pos;var o=C.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,`'import' and 'export' may only appear at the top level`),this.inModule||this.raise(this.start,`'import' and 'export' may appear only with 'sourceType: module'`)),i===x._import?this.parseImport(a):this.parseExport(a,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return t&&this.options.sourceType===`script`&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(a,!1,l),this.semicolon(),this.finishNode(a,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return i===x.name&&d.type===`Identifier`&&this.eat(x.colon)?this.parseLabeledStatement(a,u,d,e):this.parseExpressionStatement(a,d)}},A.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(x.semi)||this.insertSemicolon()?e.label=null:this.type===x.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},A.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},A.parseDoStatement=function(e){return this.next(),this.labels.push(Se),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(x._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(x.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},A.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(Se),this.enterScope(0),this.expect(x.parenL),this.type===x.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===x._var||this.type===x._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&this.next(),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new xe,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===x._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===x._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start!==d||l||f.type!==`Identifier`||f.name!==`async`?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},A.parseForAfterInit=function(e,t,n){return(this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===x._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},A.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,Te|(n?0:Ee),!1,t)},A.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(x._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},A.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(x.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},A.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(x.braceL),this.labels.push(Ce),this.enterScope(0);for(var n=!1;this.type!==x.braceR;)if(this.type===x._case||this.type===x._default){var r=this.type===x._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(x.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,`SwitchCase`),this.next(),this.labels.pop(),this.finishNode(e,`SwitchStatement`)},A.parseThrowStatement=function(e){return this.next(),S.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,`Illegal newline after throw`),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)};var we=[];A.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(x.parenR),e},A.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===x._catch){var t=this.startNode();this.next(),this.eat(x.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(x._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},A.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},A.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Se),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},A.parseWithStatement=function(e){return this.strict&&this.raise(this.start,`'with' in strict mode`),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(`with`),this.finishNode(e,`WithStatement`)},A.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},A.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===x._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart!==e.start)break;c.statementStart=this.start,c.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},A.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},A.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(x.braceL),e&&this.enterScope(0);this.type!==x.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},A.parseFor=function(e,t){return e.init=t,this.expect(x.semi),e.test=this.type===x.semi?null:this.parseExpression(),this.expect(x.semi),e.update=this.type===x.parenR?null:this.parseExpression(),this.expect(x.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},A.parseForIn=function(e,t){var n=this.type===x._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(x.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},A.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(x.eq)?i.init=this.parseMaybeAssign(t):r||n!==`const`||this.type===x._in||this.options.ecmaVersion>=6&&this.isContextual(`of`)?r||n!==`using`&&n!==`await using`||!(this.options.ecmaVersion>=17)||this.type===x._in||this.isContextual(`of`)?r||i.id.type===`Identifier`||t&&(this.type===x._in||this.isContextual(`of`))?i.init=null:this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):this.unexpected(),e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(x.comma))break}return e},A.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?1:2,!1)};var Te=1,Ee=2;function De(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type!==`MethodDefinition`||t.kind!==`get`&&t.kind!==`set`||(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):!!r||(e[n]=i,!1)}function Oe(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}A.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===x.star&&t&Ee&&this.unexpected(),e.generator=this.eat(x.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Te&&(e.id=4&t&&this.type!==x.name?null:this.parseIdent(),!e.id||t&Ee||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ye(e.async,e.generator)),t&Te||(e.id=this.type===x.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&Te?`FunctionDeclaration`:`FunctionExpression`)},A.parseFunctionParams=function(e){this.expect(x.parenL),e.params=this.parseBindingList(x.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},A.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(x.braceL);this.type!==x.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type===`MethodDefinition`&&o.kind===`constructor`?(a&&this.raiseRecoverable(o.start,`Duplicate constructor in the same class`),a=!0):o.key&&o.key.type===`PrivateIdentifier`&&De(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},A.parseClassElement=function(e){if(this.eat(x.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(x.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===x.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&(!this.isClassElementNameStart()&&this.type!==x.star||this.canInsertSemicolon()?r=`async`:a=!0),!r&&(t>=9||!a)&&this.eat(x.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===x.parenL||o!==`method`||i||a){var l=!n.static&&Oe(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},A.isClassElementNameStart=function(){return this.type===x.name||this.type===x.privateId||this.type===x.num||this.type===x.string||this.type===x.bracketL||this.type.keyword},A.parseClassElementName=function(e){this.type===x.privateId?(this.value===`constructor`&&this.raise(this.start,`Classes can't have an element named '#constructor'`),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},A.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&Oe(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);return e.kind===`get`&&a.params.length!==0&&this.raiseRecoverable(a.start,`getter should have no params`),e.kind===`set`&&a.params.length!==1&&this.raiseRecoverable(a.start,`setter should have exactly one param`),e.kind===`set`&&a.params[0].type===`RestElement`&&this.raiseRecoverable(a.params[0].start,`Setter cannot use rest params`),this.finishNode(e,`MethodDefinition`)},A.parseClassField=function(e){return Oe(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&Oe(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(x.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},A.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==x.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},A.parseClassId=function(e,t){this.type===x.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},A.parseClassSuper=function(e){e.superClass=this.eat(x._extends)?this.parseExprSubscripts(null,!1):null},A.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},A.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];w(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}},A.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual(`as`)?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual(`from`),this.type!==x.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},A.parseExport=function(e,t){if(this.next(),this.eat(x.star))return this.parseExportAllDeclaration(e,t);if(this.eat(x._default))return this.checkExport(t,`default`,this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,`ExportDefaultDeclaration`);if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type===`VariableDeclaration`?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(`from`))this.type!==x.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type===`Literal`&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,`ExportNamedDeclaration`)},A.parseExportDeclaration=function(e){return this.parseStatement(null)},A.parseExportDefaultDeclaration=function(){var e;if(this.type===x._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|Te,!1,e)}if(this.type===x._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}var r=this.parseMaybeAssign();return this.semicolon(),r},A.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),w(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},A.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},A.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},A.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},A.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual(`as`)?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,`ExportSpecifier`)},A.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(x.braceL);!this.eat(x.braceR);){if(n)n=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;t.push(this.parseExportSpecifier(e))}return t},A.parseImport=function(e){return this.next(),this.type===x.string?(e.specifiers=we,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===x.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},A.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual(`as`)?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,2),this.finishNode(e,`ImportSpecifier`)},A.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,`ImportDefaultSpecifier`)},A.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,`ImportNamespaceSpecifier`)},A.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===x.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(x.comma)))return e;if(this.type===x.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(x.braceL);!this.eat(x.braceR);){if(t)t=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;e.push(this.parseImportSpecifier())}return e},A.parseWithClause=function(){var e=[];if(!this.eat(x._with))return e;this.expect(x.braceL);for(var t={},n=!0;!this.eat(x.braceR);){if(n)n=!1;else if(this.expect(x.comma),this.afterTrailingComma(x.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;w(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},A.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===x.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(x.colon),this.type!==x.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},A.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===x.string){var e=this.parseLiteral(this.value);return ue.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},A.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},A.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&(this.input[e.start]===`"`||this.input[e.start]===`'`)};var j=D.prototype;j.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case`Identifier`:this.inAsync&&e.name===`await`&&this.raise(e.start,`Cannot use 'await' as identifier inside an async function`);break;case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:break;case`ObjectExpression`:e.type=`ObjectPattern`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type!==`RestElement`||a.argument.type!==`ArrayPattern`&&a.argument.type!==`ObjectPattern`||this.raise(a.argument.start,`Unexpected token`)}break;case`Property`:e.kind!==`init`&&this.raise(e.key.start,`Object pattern can't contain getter or setter`),this.toAssignable(e.value,t);break;case`ArrayExpression`:e.type=`ArrayPattern`,n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case`SpreadElement`:e.type=`RestElement`,this.toAssignable(e.argument,t),e.argument.type===`AssignmentPattern`&&this.raise(e.argument.start,`Rest elements cannot have a default value`);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(e.left.end,`Only '=' operator can be used for specifying default value.`),e.type=`AssignmentPattern`,delete e.operator,this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(e.expression,t,n);break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:if(!t)break;default:this.raise(e.start,`Assigning to rvalue`)}else n&&this.checkPatternErrors(n,!0);return e},j.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},j.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},j.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==x.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},j.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case x.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(x.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case x.braceL:return this.parseObj(!0)}return this.parseIdent()},j.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(x.comma),t&&this.type===x.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===x.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===x.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}i.push(this.parseAssignableListItem(r))}return i},j.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},j.parseBindingListItem=function(e){return e},j.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(x.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},j.checkLValSimple=function(e,t,n){t===void 0&&(t=0);var r=t!==0;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===2&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(w(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==5&&this.declareName(e.name,t,e.start));break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},j.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=0),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},j.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=0),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var M=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},N={b_stat:new M(`{`,!1),b_expr:new M(`{`,!0),b_tmpl:new M("${",!1),p_stat:new M(`(`,!1),p_expr:new M(`(`,!0),q_tmpl:new M("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new M(`function`,!1),f_expr:new M(`function`,!0),f_expr_gen:new M(`function`,!0,!1,null,!0),f_gen:new M(`function`,!1,!1,null,!0)},ke=D.prototype;ke.initialContext=function(){return[N.b_stat]},ke.curContext=function(){return this.context[this.context.length-1]},ke.braceIsBlock=function(e){var t=this.curContext();return t===N.f_expr||t===N.f_stat||(e!==x.colon||t!==N.b_stat&&t!==N.b_expr?e===x._return||e===x.name&&this.exprAllowed?S.test(this.input.slice(this.lastTokEnd,this.start)):e===x._else||e===x.semi||e===x.eof||e===x.parenR||e===x.arrow||(e===x.braceL?t===N.b_stat:e!==x._var&&e!==x._const&&e!==x.name&&!this.exprAllowed):!t.isExpr)},ke.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token===`function`)return t.generator}return!1},ke.updateContext=function(e){var t,n=this.type;n.keyword&&e===x.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},ke.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},x.parenR.updateContext=x.braceR.updateContext=function(){if(this.context.length!==1){var e=this.context.pop();e===N.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},x.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?N.b_stat:N.b_expr),this.exprAllowed=!0},x.dollarBraceL.updateContext=function(){this.context.push(N.b_tmpl),this.exprAllowed=!0},x.parenL.updateContext=function(e){var t=e===x._if||e===x._for||e===x._with||e===x._while;this.context.push(t?N.p_stat:N.p_expr),this.exprAllowed=!0},x.incDec.updateContext=function(){},x._function.updateContext=x._class.updateContext=function(e){!e.beforeExpr||e===x._else||e===x.semi&&this.curContext()!==N.p_stat||e===x._return&&S.test(this.input.slice(this.lastTokEnd,this.start))||(e===x.colon||e===x.braceL)&&this.curContext()===N.b_stat?this.context.push(N.f_stat):this.context.push(N.f_expr),this.exprAllowed=!1},x.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},x.backQuote.updateContext=function(){this.curContext()===N.q_tmpl?this.context.pop():this.context.push(N.q_tmpl),this.exprAllowed=!1},x.star.updateContext=function(e){if(e===x._function){var t=this.context.length-1;this.context[t]===N.f_expr?this.context[t]=N.f_expr_gen:this.context[t]=N.f_gen}this.exprAllowed=!0},x.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==x.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var P=D.prototype;function Ae(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&Ae(e.expression)}function je(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&je(e.expression)||e.type===`ParenthesizedExpression`&&je(e.expression)}P.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case`Identifier`:r=i.name;break;case`Literal`:r=String(i.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6)r===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=i.start):this.raiseRecoverable(i.start,`Redefinition of __proto__ property`)),t.proto=!0);else{var o=t[r=`$`+r];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(i.start,`Redefinition of property`):o=t[r]={init:!1,get:!1,set:!1},o[a]=!0}}},P.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===x.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(x.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,`SequenceExpression`)}return i},P.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new xe,r=!0);var s=this.start,c=this.startLoc;this.type!==x.parenL&&this.type!==x.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===x.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===x.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},P.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(x.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(x.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},P.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},P.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==x._in)&&a>r){var o=this.type===x.logicalOR||this.type===x.logicalAND,s=this.type===x.coalesce;s&&(a=x.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===x.coalesce||s&&(this.type===x.logicalOR||this.type===x.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},P.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},P.parseMaybeUnary=function(e,t,n,r){var i,a=this.start,o=this.startLoc;if(this.isContextual(`await`)&&this.canAwait)i=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===x.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&Ae(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&je(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,i=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(t||this.type!==x.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(a,o);l.operator=this.value,l.prefix=!1,l.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(l,`UpdateExpression`)}}else (r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==x._in&&this.unexpected();return n||!this.eat(x.starstar)?i:t?void this.unexpected(this.lastTokStart):this.buildBinary(a,o,i,this.parseMaybeUnary(null,!1,!1,r),`**`,!1)},P.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type===`ArrowFunctionExpression`&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==`)`)return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&a.type===`MemberExpression`&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a},P.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type===`Identifier`&&e.name===`async`&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,n,r,a,o,i);if(s.optional&&(o=!0),s===e||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s}},P.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(x.arrow)},P.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},P.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(x.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(x.bracketL);if(l||c&&this.type!==x.parenL&&this.type!==x.backQuote||this.eat(x.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(x.bracketR)):this.type===x.privateId&&e.type!==`Super`?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(x.parenL)){var d=new xe,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(x.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===x.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},P.parseExprAtom=function(e,t,n){this.type===x.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case x._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type!==x.parenL||this.allowDirectSuper||this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==x.dot&&this.type!==x.bracketL&&this.type!==x.parenL&&this.unexpected(),this.finishNode(r,`Super`);case x._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case x.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(x._function))return this.overrideContext(N.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(x.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===x.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(x.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case x.regexp:var l=this.value;return(r=this.parseLiteral(l.value)).regex={pattern:l.pattern,flags:l.flags},r;case x.num:case x.string:return this.parseLiteral(this.value);case x._null:case x._true:case x._false:return(r=this.startNode()).value=this.type===x._null?null:this.type===x._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case x.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case x.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(x.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case x.braceL:return this.overrideContext(N.b_expr),this.parseObj(!1,e);case x._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case x._class:return this.parseClass(this.startNode(),!1);case x._new:return this.parseNew();case x.backQuote:return this.parseTemplate();case x._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},P.parseExprAtomDefault=function(){this.unexpected()},P.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===x.parenL&&!e)return this.parseDynamicImport(t);if(this.type===x.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}this.unexpected()},P.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(x.parenR)?e.options=null:(this.expect(x.comma),this.afterTrailingComma(x.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(x.parenR)||(this.expect(x.comma),this.afterTrailingComma(x.parenR)||this.unexpected())));else if(!this.eat(x.parenR)){var t=this.start;this.eat(x.comma)&&this.eat(x.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},P.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`meta`&&this.raiseRecoverable(e.property.start,`The only valid meta property for import is 'import.meta'`),t&&this.raiseRecoverable(e.start,`'import.meta' must not contain escaped characters`),this.options.sourceType===`module`||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,`Cannot use 'import.meta' outside a module`),this.finishNode(e,`MetaProperty`)},P.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value==null?t.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},P.parseParenExpression=function(){this.expect(x.parenL);var e=this.parseExpression();return this.expect(x.parenR),e},P.shouldParseArrow=function(e){return!this.canInsertSemicolon()},P.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,s=this.start,c=this.startLoc,l=[],u=!0,d=!1,f=new xe,p=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==x.parenR;){if(u?u=!1:this.expect(x.comma),a&&this.afterTrailingComma(x.parenR,!0)){d=!0;break}if(this.type===x.ellipsis){o=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===x.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}l.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(x.parenR),e&&this.shouldParseArrow(l)&&this.eat(x.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=m,this.parseParenArrowList(r,i,l,t);l.length&&!d||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(f,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=m||this.awaitPos,l.length>1?((n=this.startNodeAt(s,c)).expressions=l,this.finishNodeAt(n,`SequenceExpression`,h,g)):n=l[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(r,i);return _.expression=n,this.finishNode(_,`ParenthesizedExpression`)}return n},P.parseParenItem=function(e){return e},P.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Me=[];P.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword new`);var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===x.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`target`&&this.raiseRecoverable(e.property.start,`The only valid meta property for new is 'new.target'`),n&&this.raiseRecoverable(e.start,`'new.target' must not contain escaped characters`),this.allowNewDotTarget||this.raiseRecoverable(e.start,`'new.target' can only be used in functions and class static block`),this.finishNode(e,`MetaProperty`)}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(x.parenL)?e.arguments=this.parseExprList(x.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Me,this.finishNode(e,`NewExpression`)},P.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===x.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
|
|
4
4
|
`),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
@@ -6,4 +6,4 @@ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=1
|
|
|
6
6
|
`;break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else ++this.pos}},R.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(x.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
|
|
7
7
|
`&&++this.pos;case`
|
|
8
8
|
`:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,`Unterminated template`)},R.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
|
9
|
-
`;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return E(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),r===`0`&&t!==56&&t!==57||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return ne(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},R.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},R.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(h(i,r))this.pos+=i<=65535?1:2;else{if(i!==92)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?m:h)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=E(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},R.readWord=function(){var e=this.readWord1(),t=x.name;return this.keywords.test(e)&&(t=ee[e]),this.finishToken(t,e)},D.acorn={Parser:D,version:`8.15.0`,defaultOptions:me,Position:de,SourceLocation:fe,getLineInfo:pe,Node:Fe,TokenType:g,tokTypes:x,keywordTypes:ee,TokContext:M,tokContexts:N,isIdentifierChar:h,isIdentifierStart:m,Token:ut,isNewLine:ne,lineBreak:S,lineBreakG:te,nonASCIIwhitespace:ie};let pt=e(`node:module`),z=e(`node:fs`);String.fromCharCode;let mt=/\/$|\/\?|\/#/,ht=/^\.?\//;function gt(e=``,t){return t?mt.test(e):e.endsWith(`/`)}function _t(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(gt(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function vt(e){return e&&e!==`/`}function yt(e,...t){let n=e||``;for(let e of t.filter(e=>vt(e)))if(n){let t=e.replace(ht,``);n=_t(n)+t}else n=e;return n}let bt=/^[A-Za-z]:\//;function xt(e=``){return e&&e.replace(/\\/g,`/`).replace(bt,e=>e.toUpperCase())}let St=/^[/\\]{2}/,Ct=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,wt=/^[A-Za-z]:$/,Tt=/.(\.[^./]+|\.)$/,Et=function(e){if(e.length===0)return`.`;let t=(e=xt(e)).match(St),n=V(e),r=e[e.length-1]===`/`;return(e=kt(e,!n)).length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),wt.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!V(e)?`/${e}`:e)},B=function(...e){let t=``;for(let n of e)if(n)if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;t+=e&&r?n.slice(1):e||r?n:`/${n}`}else t+=n;return Et(t)};function Dt(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}let Ot=function(...e){let t=``,n=!1;for(let r=(e=e.map(e=>xt(e))).length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:Dt();i&&i.length!==0&&(t=`${i}/${t}`,n=V(i))}return t=kt(t,!n),n&&!V(t)?`/${t}`:t.length>0?t:`.`};function kt(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else{if(o===`/`)break;o=`/`}if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}let V=function(e){return Ct.test(e)},At=function(e){if(e===`..`)return``;let t=Tt.exec(xt(e));return t&&t[1]||``},jt=function(e){let t=xt(e).replace(/\/$/,``).split(`/`).slice(0,-1);return t.length===1&&wt.test(t[0])&&(t[0]+=`/`),t.join(`/`)||(V(e)?`/`:`.`)},Mt=function(e,t){let n=xt(e).split(`/`),r=``;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t){r=t;break}}return t&&r.endsWith(t)?r.slice(0,-t.length):r},H=e(`node:url`),U=e(`node:assert`),W=e(`node:process`),Nt=e(`node:path`),Pt=e(`node:v8`),Ft=e(`node:util`),It=new Set(pt.builtinModules);function Lt(e){return e.replace(/\\/g,`/`)}let Rt={}.hasOwnProperty,zt=/^([A-Z][a-z\d]*)+$/,Bt=new Set([`string`,`function`,`number`,`object`,`Function`,`Object`,`boolean`,`bigint`,`symbol`]),G={};function Vt(e,t=`and`){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(`, `)}, ${t} ${e[e.length-1]}`}let Ht=new Map,Ut;function K(e,t,n){return Ht.set(e,t),function(e,t){return n;function n(...n){let r=Error.stackTraceLimit;Wt()&&(Error.stackTraceLimit=0);let i=new e;Wt()&&(Error.stackTraceLimit=r);let a=function(e,t,n){let r=Ht.get(e);if(U(r!==void 0,"expected `message` to be found"),typeof r==`function`)return U(r.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`),Reflect.apply(r,n,t);let i=/%[dfijoOs]/g,a=0;for(;i.exec(r)!==null;)a++;return U(a===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${a}).`),t.length===0?r:(t.unshift(r),Reflect.apply(Ft.format,null,t))}(t,n,i);return Object.defineProperties(i,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Gt(i),i.code=t,i}}(n,e)}function Wt(){try{if(Pt.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Rt.call(e,`writable`)&&e.writable!==void 0?e.writable:e.set!==void 0}G.ERR_INVALID_ARG_TYPE=K(`ERR_INVALID_ARG_TYPE`,(e,t,n)=>{U(typeof e==`string`,`'name' must be a string`),Array.isArray(t)||(t=[t]);let r=`The `;if(e.endsWith(` argument`))r+=`${e} `;else{let t=e.includes(`.`)?`property`:`argument`;r+=`"${e}" ${t} `}r+=`must be `;let i=[],a=[],o=[];for(let e of t)U(typeof e==`string`,`All expected entries have to be of type string`),Bt.has(e)?i.push(e.toLowerCase()):zt.exec(e)===null?(U(e!==`object`,`The value "object" should be written as "Object"`),o.push(e)):a.push(e);if(a.length>0){let e=i.indexOf(`object`);e!==-1&&(i.slice(e,1),a.push(`Object`))}return i.length>0&&(r+=`${i.length>1?`one of type`:`of type`} ${Vt(i,`or`)}`,(a.length>0||o.length>0)&&(r+=` or `)),a.length>0&&(r+=`an instance of ${Vt(a,`or`)}`,o.length>0&&(r+=` or `)),o.length>0&&(o.length>1?r+=`one of ${Vt(o,`or`)}`:(o[0].toLowerCase()!==o[0]&&(r+=`an `),r+=`${o[0]}`)),r+=`. Received ${function(e){if(e==null)return String(e);if(typeof e==`function`&&e.name)return`function ${e.name}`;if(typeof e==`object`)return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${(0,Ft.inspect)(e,{depth:-1})}`;let t=(0,Ft.inspect)(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}(n)}`,r},TypeError),G.ERR_INVALID_MODULE_SPECIFIER=K(`ERR_INVALID_MODULE_SPECIFIER`,(e,t,n=void 0)=>`Invalid module "${e}" ${t}${n?` imported from ${n}`:``}`,TypeError),G.ERR_INVALID_PACKAGE_CONFIG=K(`ERR_INVALID_PACKAGE_CONFIG`,(e,t,n)=>`Invalid package config ${e}${t?` while importing ${t}`:``}${n?`. ${n}`:``}`,Error),G.ERR_INVALID_PACKAGE_TARGET=K(`ERR_INVALID_PACKAGE_TARGET`,(e,t,n,r=!1,i=void 0)=>{let a=typeof n==`string`&&!r&&n.length>0&&!n.startsWith(`./`);return t===`.`?(U(!1===r),`Invalid "exports" main target ${JSON.stringify(n)} defined in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`):`Invalid "${r?`imports`:`exports`}" target ${JSON.stringify(n)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`},Error),G.ERR_MODULE_NOT_FOUND=K(`ERR_MODULE_NOT_FOUND`,(e,t,n=!1)=>`Cannot find ${n?`module`:`package`} '${e}' imported from ${t}`,Error),G.ERR_NETWORK_IMPORT_DISALLOWED=K(`ERR_NETWORK_IMPORT_DISALLOWED`,`import of '%s' by %s is not supported: %s`,Error),G.ERR_PACKAGE_IMPORT_NOT_DEFINED=K(`ERR_PACKAGE_IMPORT_NOT_DEFINED`,(e,t,n)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:``} imported from ${n}`,TypeError),G.ERR_PACKAGE_PATH_NOT_EXPORTED=K(`ERR_PACKAGE_PATH_NOT_EXPORTED`,(e,t,n=void 0)=>t===`.`?`No "exports" main defined in ${e}package.json${n?` imported from ${n}`:``}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${n?` imported from ${n}`:``}`,Error),G.ERR_UNSUPPORTED_DIR_IMPORT=K(`ERR_UNSUPPORTED_DIR_IMPORT`,`Directory import '%s' is not supported resolving ES modules imported from %s`,Error),G.ERR_UNSUPPORTED_RESOLVE_REQUEST=K(`ERR_UNSUPPORTED_RESOLVE_REQUEST`,`Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.`,TypeError),G.ERR_UNKNOWN_FILE_EXTENSION=K(`ERR_UNKNOWN_FILE_EXTENSION`,(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError),G.ERR_INVALID_ARG_VALUE=K(`ERR_INVALID_ARG_VALUE`,(e,t,n=`is invalid`)=>{let r=(0,Ft.inspect)(t);return r.length>128&&(r=`${r.slice(0,128)}...`),`The ${e.includes(`.`)?`property`:`argument`} '${e}' ${n}. Received ${r}`},TypeError);let Gt=function(e){let t=`__node_internal_`+e.name;return Object.defineProperty(e,`name`,{value:t}),e}(function(e){let t=Wt();return t&&(Ut=Error.stackTraceLimit,Error.stackTraceLimit=1/0),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=Ut),e}),Kt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:qt}=G,Jt=new Map;function Yt(e,{base:t,specifier:n}){let r=Jt.get(e);if(r)return r;let i;try{i=z.readFileSync(Nt.toNamespacedPath(e),`utf8`)}catch(e){let t=e;if(t.code!==`ENOENT`)throw t}let a={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:`none`,exports:void 0,imports:void 0};if(i!==void 0){let r;try{r=JSON.parse(i)}catch(r){let i=r,a=new qt(e,(t?`"${n}" from `:``)+(0,H.fileURLToPath)(t||n),i.message);throw a.cause=i,a}a.exists=!0,Kt.call(r,`name`)&&typeof r.name==`string`&&(a.name=r.name),Kt.call(r,`main`)&&typeof r.main==`string`&&(a.main=r.main),Kt.call(r,`exports`)&&(a.exports=r.exports),Kt.call(r,`imports`)&&(a.imports=r.imports),!Kt.call(r,`type`)||r.type!==`commonjs`&&r.type!==`module`||(a.type=r.type)}return Jt.set(e,a),a}function Xt(e){let t=new URL(`package.json`,e);for(;!t.pathname.endsWith(`node_modules/package.json`);){let n=Yt((0,H.fileURLToPath)(t),{specifier:e});if(n.exists)return n;let r=t;if(t=new URL(`../package.json`,t),t.pathname===r.pathname)break}return{pjsonPath:(0,H.fileURLToPath)(t),exists:!1,type:`none`}}function Zt(e){return Xt(e).type}let{ERR_UNKNOWN_FILE_EXTENSION:Qt}=G,$t={}.hasOwnProperty,en={__proto__:null,".cjs":`commonjs`,".js":`module`,".json":`json`,".mjs":`module`},tn={__proto__:null,"data:":function(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return function(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?`module`:e===`application/json`?`json`:null}(t)},"file:":function(e,t,n){let r=function(e){let t=e.pathname,n=t.length;for(;n--;){let e=t.codePointAt(n);if(e===47)return``;if(e===46)return t.codePointAt(n-1)===47?``:t.slice(n)}return``}(e);if(r===`.js`){let t=Zt(e);return t===`none`?`commonjs`:t}if(r===``){let t=Zt(e);return t===`none`||t===`commonjs`?`commonjs`:`module`}let i=en[r];if(i)return i;if(!n)throw new Qt(r,(0,H.fileURLToPath)(e))},"http:":nn,"https:":nn,"node:":()=>`builtin`};function nn(){}let rn=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:an,ERR_INVALID_PACKAGE_CONFIG:on,ERR_INVALID_PACKAGE_TARGET:sn,ERR_MODULE_NOT_FOUND:cn,ERR_PACKAGE_IMPORT_NOT_DEFINED:ln,ERR_PACKAGE_PATH_NOT_EXPORTED:un,ERR_UNSUPPORTED_DIR_IMPORT:dn,ERR_UNSUPPORTED_RESOLVE_REQUEST:fn}=G,pn={}.hasOwnProperty,mn=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,hn=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,gn=/^\.|%|\\/,_n=/\*/g,vn=/%2f|%5c/i,yn=new Set,bn=/[/\\]{2}/;function xn(e,t,n,r,i,a,o){if(W.noDeprecation)return;let s=(0,H.fileURLToPath)(r),c=bn.exec(o?e:t)!==null;W.emitWarning(`Use of deprecated ${c?`double slash`:`leading or trailing slash matching`} resolving "${e}" for module request "${t}" ${t===n?``:`matched to "${n}" `}in the "${i?`imports`:`exports`}" field module resolution of the package at ${s}${a?` imported from ${(0,H.fileURLToPath)(a)}`:``}.`,`DeprecationWarning`,`DEP0166`)}function Sn(e,t,n,r){if(W.noDeprecation||function(e,t){let n=e.protocol;return $t.call(tn,n)&&tn[n](e,t,!0)||null}(e,{parentURL:n.href})!==`module`)return;let i=(0,H.fileURLToPath)(e.href),a=(0,H.fileURLToPath)(new H.URL(`.`,t)),o=(0,H.fileURLToPath)(n);r?Nt.resolve(a,r)!==i&&W.emitWarning(`Package ${a} has a "main" field set to "${r}", excluding the full filename and extension to the resolved file at "${i.slice(a.length)}", imported from ${o}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`):W.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${i.slice(a.length)}", imported from ${o}.\nDefault "index" lookups for the main are deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`)}function Cn(e){try{return(0,z.statSync)(e)}catch{}}function wn(e){let t=(0,z.statSync)(e,{throwIfNoEntry:!1}),n=t?t.isFile():void 0;return n!=null&&n}function Tn(e,t,n){let r;if(t.main!==void 0){if(r=new H.URL(t.main,e),wn(r))return r;let i=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],a=-1;for(;++a<i.length&&(r=new H.URL(i[a],e),!wn(r));)r=void 0;if(r)return Sn(r,e,n,t.main),r}let i=[`./index.js`,`./index.json`,`./index.node`],a=-1;for(;++a<i.length&&(r=new H.URL(i[a],e),!wn(r));)r=void 0;if(r)return Sn(r,e,n,t.main),r;throw new cn((0,H.fileURLToPath)(new H.URL(`.`,e)),(0,H.fileURLToPath)(n))}function En(e,t,n){return new un((0,H.fileURLToPath)(new H.URL(`.`,t)),e,n&&(0,H.fileURLToPath)(n))}function Dn(e,t,n,r,i){return t=typeof t==`object`&&t?JSON.stringify(t,null,``):`${t}`,new sn((0,H.fileURLToPath)(new H.URL(`.`,n)),e,t,r,i&&(0,H.fileURLToPath)(i))}function On(e,t,n,r,i,a,o,s,c){if(t!==``&&!a&&e[e.length-1]!==`/`)throw Dn(n,e,r,o,i);if(!e.startsWith(`./`)){if(o&&!e.startsWith(`../`)&&!e.startsWith(`/`)){let n=!1;try{new H.URL(e),n=!0}catch{}if(!n)return Fn(a?rn.call(_n,e,()=>t):e+t,r,c)}throw Dn(n,e,r,o,i)}if(mn.exec(e.slice(2))!==null){if(hn.exec(e.slice(2))!==null)throw Dn(n,e,r,o,i);if(!s){let s=a?n.replace(`*`,()=>t):n+t;xn(a?rn.call(_n,e,()=>t):e,s,n,r,o,i,!0)}}let l=new H.URL(e,r),u=l.pathname,d=new H.URL(`.`,r).pathname;if(!u.startsWith(d))throw Dn(n,e,r,o,i);if(t===``)return l;if(mn.exec(t)!==null){let c=a?n.replace(`*`,()=>t):n+t;hn.exec(t)===null?s||xn(a?rn.call(_n,e,()=>t):e,c,n,r,o,i,!1):(function(e,t,n,r,i){throw new an(e,`request is not a valid match in pattern "${t}" for the "${r?`imports`:`exports`}" resolution of ${(0,H.fileURLToPath)(n)}`,i&&(0,H.fileURLToPath)(i))})(c,n,r,o,i)}return a?new H.URL(rn.call(_n,l.href,()=>t)):new H.URL(t,l)}function kn(e){let t=Number(e);return`${t}`===e&&t>=0&&t<4294967295}function An(e,t,n,r,i,a,o,s,c){if(typeof t==`string`)return On(t,n,r,e,i,a,o,s,c);if(Array.isArray(t)){let l=t;if(l.length===0)return null;let u,d=-1;for(;++d<l.length;){let t=l[d],f;try{f=An(e,t,n,r,i,a,o,s,c)}catch(e){if(u=e,e.code===`ERR_INVALID_PACKAGE_TARGET`)continue;throw e}if(f!==void 0){if(f!==null)return f;u=null}}if(u==null)return null;throw u}if(typeof t==`object`&&t){let l=Object.getOwnPropertyNames(t),u=-1;for(;++u<l.length;)if(kn(l[u]))throw new on((0,H.fileURLToPath)(e),i,`"exports" cannot contain numeric property keys.`);for(u=-1;++u<l.length;){let d=l[u];if(d===`default`||c&&c.has(d)){let l=An(e,t[d],n,r,i,a,o,s,c);if(l===void 0)continue;return l}}return null}if(t===null)return null;throw Dn(r,t,e,o,i)}function jn(e,t,n){if(W.noDeprecation)return;let r=(0,H.fileURLToPath)(t);yn.has(r+`|`+e)||(yn.add(r+`|`+e),W.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${r}${n?` imported from ${(0,H.fileURLToPath)(n)}`:``}. Mapping specifiers ending in "/" is no longer supported.`,`DeprecationWarning`,`DEP0155`))}function Mn(e,t,n,r,i){let a=n.exports;if(function(e,t,n){if(typeof e==`string`||Array.isArray(e))return!0;if(typeof e!=`object`||!e)return!1;let r=Object.getOwnPropertyNames(e),i=!1,a=0,o=-1;for(;++o<r.length;){let e=r[o],s=e===``||e[0]!==`.`;if(a++===0)i=s;else if(i!==s)throw new on((0,H.fileURLToPath)(t),n,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}(a,e,r)&&(a={".":a}),pn.call(a,t)&&!t.includes(`*`)&&!t.endsWith(`/`)){let n=An(e,a[t],``,t,r,!1,!1,!1,i);if(n==null)throw En(t,e,r);return n}let o=``,s=``,c=Object.getOwnPropertyNames(a),l=-1;for(;++l<c.length;){let n=c[l],i=n.indexOf(`*`);if(i!==-1&&t.startsWith(n.slice(0,i))){t.endsWith(`/`)&&jn(t,e,r);let a=n.slice(i+1);t.length>=n.length&&t.endsWith(a)&&Nn(o,n)===1&&n.lastIndexOf(`*`)===i&&(o=n,s=t.slice(i,t.length-a.length))}}if(o){let n=An(e,a[o],s,o,r,!0,!1,t.endsWith(`/`),i);if(n==null)throw En(t,e,r);return n}throw En(t,e,r)}function Nn(e,t){let n=e.indexOf(`*`),r=t.indexOf(`*`),i=n===-1?e.length:n+1,a=r===-1?t.length:r+1;return i>a?-1:a>i||n===-1?1:r===-1||e.length>t.length?-1:t.length>e.length?1:0}function Pn(e,t,n){if(e===`#`||e.startsWith(`#/`)||e.endsWith(`/`))throw new an(e,`is not a valid internal imports specifier name`,(0,H.fileURLToPath)(t));let r,i=Xt(t);if(i.exists){r=(0,H.pathToFileURL)(i.pjsonPath);let a=i.imports;if(a)if(pn.call(a,e)&&!e.includes(`*`)){let i=An(r,a[e],``,e,t,!1,!0,!1,n);if(i!=null)return i}else{let i=``,o=``,s=Object.getOwnPropertyNames(a),c=-1;for(;++c<s.length;){let t=s[c],n=t.indexOf(`*`);if(n!==-1&&e.startsWith(t.slice(0,-1))){let r=t.slice(n+1);e.length>=t.length&&e.endsWith(r)&&Nn(i,t)===1&&t.lastIndexOf(`*`)===n&&(i=t,o=e.slice(n,e.length-r.length))}}if(i){let e=An(r,a[i],o,i,t,!0,!0,!1,n);if(e!=null)return e}}}throw function(e,t,n){return new ln(e,t&&(0,H.fileURLToPath)(new H.URL(`.`,t)),(0,H.fileURLToPath)(n))}(e,r,t)}function Fn(e,t,n){if(pt.builtinModules.includes(e))return new H.URL(`node:`+e);let{packageName:r,packageSubpath:i,isScoped:a}=function(e,t){let n=e.indexOf(`/`),r=!0,i=!1;e[0]===`@`&&(i=!0,n===-1||e.length===0?r=!1:n=e.indexOf(`/`,n+1));let a=n===-1?e:e.slice(0,n);if(gn.exec(a)!==null&&(r=!1),!r)throw new an(e,`is not a valid package name`,(0,H.fileURLToPath)(t));return{packageName:a,packageSubpath:`.`+(n===-1?``:e.slice(n)),isScoped:i}}(e,t),o=Xt(t);if(o.exists){let e=(0,H.pathToFileURL)(o.pjsonPath);if(o.name===r&&o.exports!==void 0&&o.exports!==null)return Mn(e,i,o,t,n)}let s,c=new H.URL(`./node_modules/`+r+`/package.json`,t),l=(0,H.fileURLToPath)(c);do{let o=Cn(l.slice(0,-13));if(!o||!o.isDirectory()){s=l,c=new H.URL((a?`../../../../node_modules/`:`../../../node_modules/`)+r+`/package.json`,c),l=(0,H.fileURLToPath)(c);continue}let u=Yt(l,{base:t,specifier:e});return u.exports!==void 0&&u.exports!==null?Mn(c,i,u,t,n):i===`.`?Tn(c,u,t):new H.URL(i,c)}while(l.length!==s.length);throw new cn(r,(0,H.fileURLToPath)(t),!1)}function In(e,t,n,r){let i=t.protocol,a=i===`data:`||i===`http:`||i===`https:`,o;if(function(e){return e!==``&&(e[0]===`/`||function(e){return e[0]===`.`&&(e.length===1||e[1]===`/`||e[1]===`.`&&(e.length===2||e[2]===`/`))}(e))}(e))try{o=new H.URL(e,t)}catch(n){let r=new fn(e,t);throw r.cause=n,r}else if(i===`file:`&&e[0]===`#`)o=Pn(e,t,n);else try{o=new H.URL(e)}catch(r){if(a&&!pt.builtinModules.includes(e)){let n=new fn(e,t);throw n.cause=r,n}o=Fn(e,t,n)}return U(o!==void 0,`expected to be defined`),o.protocol===`file:`?function(e,t){if(vn.exec(e.pathname)!==null)throw new an(e.pathname,`must not include encoded "/" or "\\" characters`,(0,H.fileURLToPath)(t));let n;try{n=(0,H.fileURLToPath)(e)}catch(n){let r=n;throw Object.defineProperty(r,`input`,{value:String(e)}),Object.defineProperty(r,`module`,{value:String(t)}),r}let r=Cn(n.endsWith(`/`)?n.slice(-1):n);if(r&&r.isDirectory()){let r=new dn(n,(0,H.fileURLToPath)(t));throw r.url=String(e),r}if(!r||!r.isFile()){let r=new cn(n||e.pathname,t&&(0,H.fileURLToPath)(t),!0);throw r.url=String(e),r}{let t=(0,z.realpathSync)(n),{search:r,hash:i}=e;(e=(0,H.pathToFileURL)(t+(n.endsWith(Nt.sep)?`/`:``))).search=r,e.hash=i}return e}(o,t):o}function Ln(e){return typeof e!=`string`||e.startsWith(`file://`)?Lt((0,H.fileURLToPath)(e)):Lt(e)}function Rn(e){return(0,H.pathToFileURL)(Ln(e)).toString()}let zn=new Set([`node`,`import`]),Bn=[`.mjs`,`.cjs`,`.js`,`.json`],Vn=new Set([`ERR_MODULE_NOT_FOUND`,`ERR_UNSUPPORTED_DIR_IMPORT`,`MODULE_NOT_FOUND`,`ERR_PACKAGE_PATH_NOT_EXPORTED`]);function Hn(e,t,n){try{return In(e,t,n)}catch(e){if(!Vn.has(e?.code))throw e}}function Un(e,t={}){if(typeof e!=`string`){if(!(e instanceof URL))throw TypeError("input must be a `string` or `URL`");e=Ln(e)}if(/(?:node|data|http|https):/.test(e))return e;if(It.has(e))return`node:`+e;if(e.startsWith(`file://`)&&(e=Ln(e)),V(e))try{if((0,z.statSync)(e).isFile())return Rn(e)}catch(e){if(e?.code!==`ENOENT`)throw e}let n=t.conditions?new Set(t.conditions):zn,r=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(e=>new URL(function(e){return typeof e!=`string`&&(e=e.toString()),/(?:node|data|http|https|file):/.test(e)?e:It.has(e)?`node:`+e:`file://`+encodeURI(Lt(e))}(e.toString())));r.length===0&&r.push(new URL(Rn(process.cwd())));let i=[...r];for(let e of r)e.protocol===`file:`&&i.push(new URL(`./`,e),new URL(yt(e.pathname,`_index.js`),e),new URL(`node_modules`,e));let a;for(let r of i){if(a=Hn(e,r,n),a)break;for(let i of[``,`/index`]){for(let o of t.extensions||Bn)if(a=Hn(yt(e,i)+o,r,n),a)break;if(a)break}if(a)break}if(!a){let t=Error(`Cannot find module ${e} imported from ${i.join(`, `)}`);throw t.code=`ERR_MODULE_NOT_FOUND`,t}return Rn(a)}function Wn(e,t){return Un(e,t)}function Gn(e,t){return Ln(Wn(e,t))}let Kn=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,qn=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function Jn(e,t={}){return t.stripComments&&(e=e.replace(qn,``)),Kn.test(e)}function Yn(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}let Xn=new Set([`/`,`\\`,void 0]),Zn=Symbol.for(`pathe:normalizedAlias`),Qn=/[/\\]/;function $n(e){if(e[Zn])return e;let t=Object.fromEntries(Object.entries(e).sort(([e],[t])=>function(e,t){return t.split(`/`).length-e.split(`/`).length}(e,t)));for(let e in t)for(let n in t)n===e||e.startsWith(n)||t[e]?.startsWith(n)&&Xn.has(t[e][n.length])&&(t[e]=t[n]+t[e].slice(n.length));return Object.defineProperty(t,Zn,{value:!0,enumerable:!1}),t}function er(e=`/`){let t=e[e.length-1];return t===`/`||t===`\\`}var tr={rE:`2.6.1`};let nr=e(`node:crypto`);var rr=i.n(nr);let ir=Object.create(null),ar=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?ir:globalThis),q=new Proxy(ir,{get:(e,t)=>ar()[t]??ir[t],has:(e,t)=>t in ar()||t in ir,set:(e,t,n)=>(ar(!0)[t]=n,!0),deleteProperty(e,t){return t?(delete ar(!0)[t],!0):!1},ownKeys(){let e=ar(!0);return Object.keys(e)}}),or=typeof process<`u`&&process.env&&process.env.NODE_ENV||``,sr=[[`APPVEYOR`],[`AWS_AMPLIFY`,`AWS_APP_ID`,{ci:!0}],[`AZURE_PIPELINES`,`SYSTEM_TEAMFOUNDATIONCOLLECTIONURI`],[`AZURE_STATIC`,`INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN`],[`APPCIRCLE`,`AC_APPCIRCLE`],[`BAMBOO`,`bamboo_planKey`],[`BITBUCKET`,`BITBUCKET_COMMIT`],[`BITRISE`,`BITRISE_IO`],[`BUDDY`,`BUDDY_WORKSPACE_ID`],[`BUILDKITE`],[`CIRCLE`,`CIRCLECI`],[`CIRRUS`,`CIRRUS_CI`],[`CLOUDFLARE_PAGES`,`CF_PAGES`,{ci:!0}],[`CLOUDFLARE_WORKERS`,`WORKERS_CI`,{ci:!0}],[`CODEBUILD`,`CODEBUILD_BUILD_ARN`],[`CODEFRESH`,`CF_BUILD_ID`],[`DRONE`],[`DRONE`,`DRONE_BUILD_EVENT`],[`DSARI`],[`GITHUB_ACTIONS`],[`GITLAB`,`GITLAB_CI`],[`GITLAB`,`CI_MERGE_REQUEST_ID`],[`GOCD`,`GO_PIPELINE_LABEL`],[`LAYERCI`],[`HUDSON`,`HUDSON_URL`],[`JENKINS`,`JENKINS_URL`],[`MAGNUM`],[`NETLIFY`],[`NETLIFY`,`NETLIFY_LOCAL`,{ci:!1}],[`NEVERCODE`],[`RENDER`],[`SAIL`,`SAILCI`],[`SEMAPHORE`],[`SCREWDRIVER`],[`SHIPPABLE`],[`SOLANO`,`TDDIUM`],[`STRIDER`],[`TEAMCITY`,`TEAMCITY_VERSION`],[`TRAVIS`],[`VERCEL`,`NOW_BUILDER`],[`VERCEL`,`VERCEL`,{ci:!1}],[`VERCEL`,`VERCEL_ENV`,{ci:!1}],[`APPCENTER`,`APPCENTER_BUILD_ID`],[`CODESANDBOX`,`CODESANDBOX_SSE`,{ci:!1}],[`CODESANDBOX`,`CODESANDBOX_HOST`,{ci:!1}],[`STACKBLITZ`],[`STORMKIT`],[`CLEAVR`],[`ZEABUR`],[`CODESPHERE`,`CODESPHERE_APP_ID`,{ci:!0}],[`RAILWAY`,`RAILWAY_PROJECT_ID`],[`RAILWAY`,`RAILWAY_SERVICE_ID`],[`DENO-DEPLOY`,`DENO_DEPLOYMENT_ID`],[`FIREBASE_APP_HOSTING`,`FIREBASE_APP_HOSTING`,{ci:!0}]],cr=function(){if(globalThis.process?.env)for(let e of sr){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL===`/bin/jsh`&&globalThis.process?.versions?.webcontainer?{name:`stackblitz`,ci:!1}:{name:``,ci:!1}}();cr.name;function lr(e){return!!e&&e!==`false`}let ur=globalThis.process?.platform||``;lr(q.CI)||cr.ci;let dr=lr(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);q.DEBUG,or===`test`||q.TEST;let fr=(q.MINIMAL,/^win/i.test(ur)),pr=(/^linux/i.test(ur),/^darwin/i.test(ur),!lr(q.NO_COLOR)&&(lr(q.FORCE_COLOR)||(dr||fr)&&q.TERM),(globalThis.process?.versions?.node||``).replace(/^v/,``)||null),mr=(Number(pr?.split(`.`)[0]),globalThis.process||Object.create(null)),hr={versions:{}},gr=(new Proxy(mr,{get:(e,t)=>t===`env`?q:t in e?e[t]:t in hr?hr[t]:void 0}),globalThis.process?.release?.name===`node`),_r=!!globalThis.Bun||!!globalThis.process?.versions?.bun,vr=!!globalThis.Deno,yr=!!globalThis.fastly,br=[[!!globalThis.Netlify,`netlify`],[!!globalThis.EdgeRuntime,`edge-light`],[globalThis.navigator?.userAgent===`Cloudflare-Workers`,`workerd`],[yr,`fastly`],[vr,`deno`],[_r,`bun`],[gr,`node`]];(function(){let e=br.find(e=>e[0]);e&&e[1]})();let xr=e(`node:tty`)?.WriteStream?.prototype?.hasColors?.()??!1,J=(e,t)=>{if(!xr)return e=>e;let n=`[${e}m`,r=`[${t}m`;return e=>{let i=e+``,a=i.indexOf(r);if(a===-1)return n+i+r;let o=n,s=0,c=(t===22?r:``)+n;for(;a!==-1;)o+=i.slice(s,a)+c,s=a+r.length,a=i.indexOf(r,s);return o+=i.slice(s)+r,o}},Sr=(J(0,0),J(1,22),J(2,22),J(3,23),J(4,24),J(53,55),J(7,27),J(8,28),J(9,29),J(30,39),J(31,39)),Cr=J(32,39),wr=J(33,39),Tr=J(34,39),Er=(J(35,39),J(36,39)),Dr=(J(37,39),J(90,39));J(40,49),J(41,49),J(42,49),J(43,49),J(44,49),J(45,49),J(46,49),J(47,49),J(100,49),J(91,39),J(92,39),J(93,39),J(94,39),J(95,39),J(96,39),J(97,39),J(101,49),J(102,49),J(103,49),J(104,49),J(105,49),J(106,49),J(107,49);function Or(e){if(typeof e!=`string`||e.startsWith(`file://`))return!1;try{return(0,z.lstatSync)(e).isDirectory()}catch{return!1}}function kr(e,t=8){return(function(){if(jr!==void 0)return jr;try{return jr=!!rr().getFips?.(),jr}catch{return jr=!1,jr}}()?rr().createHash(`sha256`):rr().createHash(`md5`)).update(e).digest(`hex`).slice(0,t)}let Ar={true:Cr(`true`),false:wr(`false`),"[rebuild]":wr(`[rebuild]`),"[esm]":Tr(`[esm]`),"[cjs]":Cr(`[cjs]`),"[import]":Tr(`[import]`),"[require]":Cr(`[require]`),"[native]":Er(`[native]`),"[transpile]":wr(`[transpile]`),"[fallback]":Sr(`[fallback]`),"[unknown]":Sr(`[unknown]`),"[hit]":Cr(`[hit]`),"[miss]":wr(`[miss]`),"[json]":Cr(`[json]`),"[data]":Cr(`[data]`)};function Y(e,...t){if(!e.opts.debug)return;let n=process.cwd();console.log(Dr([`[jiti]`,...t.map(e=>e in Ar?Ar[e]:typeof e==`string`?e.replace(n,`.`):JSON.stringify(e))].join(` `)))}function X(e,t){return e.opts.interopDefault?function(e){let t=typeof e;if(e===null||t!==`object`&&t!==`function`)return e;let n=e.default,r=typeof n,i=n==null,a=r===`object`||r===`function`;return i&&e instanceof Promise?e:new Proxy(e,{get(t,r,o){if(r===`__esModule`)return!0;if(r===`default`)return i?e:typeof n?.default==`function`&&e.__esModule?n.default:n;if(Reflect.has(t,r))return Reflect.get(t,r,o);if(a&&!(n instanceof Promise)){let e=Reflect.get(n,r,o);return typeof e==`function`&&(e=e.bind(n)),e}},apply:(e,t,i)=>typeof e==`function`?Reflect.apply(e,t,i):r===`function`?Reflect.apply(n,t,i):void 0})}(t):t}let jr;function Z(e,t){return!!Q(e,t)}function Q(e,t){let n=process.env[e];if(!(e in process.env))return t;try{return JSON.parse(n)}catch{return t}}let Mr=/\.(c|m)?j(sx?)$/,Nr=/\.(c|m)?t(sx?)$/;function Pr(e,t,n){let r,i;if(e.isNativeRe.test(t))return t;e.alias&&(t=function(e,t){let n=xt(e);t=$n(t);for(let[e,r]of Object.entries(t))if(n.startsWith(e)&&er(n[(er(e)?e.slice(0,-1):e).length]))return B(r,n.slice(e.length));return n}(t,e.alias));let a=n?.parentURL||e.url;Or(a)&&(a=B(a,`_index.js`));let o=(n?.async?[n?.conditions,[`node`,`import`],[`node`,`require`]]:[n?.conditions,[`node`,`require`],[`node`,`import`]]).filter(Boolean);for(let n of o){try{r=Gn(t,{url:a,conditions:n,extensions:e.opts.extensions})}catch(e){i=e}if(r)return r}try{return e.nativeRequire.resolve(t,{paths:n.paths})}catch(e){i=e}for(let i of e.additionalExts)if(r=Fr(e,t+i,a,n)||Fr(e,t+`/index`+i,a,n),r||(Nr.test(e.filename)||Nr.test(e.parentModule?.filename||``)||Mr.test(t))&&(r=Fr(e,t.replace(Mr,`.$1t$2`),a,n),r))return r;if(!n?.try)throw i}function Fr(e,t,n,r){try{return e.nativeRequire.resolve(t,{...r,paths:[jt(Ln(n)),...r?.paths||[]]})}catch{}}let Ir=e(`node:perf_hooks`),Lr=e(`node:vm`);var Rr=i.n(Lr);function zr(e,t,n){let r=e.parentCache||{};if(t.startsWith(`node:`))return $(e,t,n.async);if(t.startsWith(`file:`))t=(0,H.fileURLToPath)(t);else if(t.startsWith(`data:`)){if(!n.async)throw Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return Y(e,`[native]`,`[data]`,`[import]`,t),$(e,t,!0)}if(pt.builtinModules.includes(t)||t===`.pnp.js`)return $(e,t,n.async);if(e.opts.tryNative&&!e.opts.transformOptions)try{if(!(t=Pr(e,t,n))&&n.try)return;if(Y(e,`[try-native]`,n.async&&e.nativeImport?`[import]`:`[require]`,t),n.async&&e.nativeImport)return e.nativeImport(t).then(n=>(!1===e.opts.moduleCache&&delete e.nativeRequire.cache[t],X(e,n)));{let n=e.nativeRequire(t);return!1===e.opts.moduleCache&&delete e.nativeRequire.cache[t],X(e,n)}}catch(n){Y(e,`[try-native] Using fallback for ${t} because of an error:`,n)}let i=Pr(e,t,n);if(!i&&n.try)return;let a=At(i);if(a===`.json`){Y(e,`[json]`,i);let t=e.nativeRequire(i);return t&&!(`default`in t)&&Object.defineProperty(t,`default`,{value:t,enumerable:!1}),t}if(a&&!e.opts.extensions.includes(a))return Y(e,`[native]`,`[unknown]`,n.async?`[import]`:`[require]`,i),$(e,i,n.async);if(e.isNativeRe.test(i))return Y(e,`[native]`,n.async?`[import]`:`[require]`,i),$(e,i,n.async);if(r[i])return X(e,r[i]?.exports);if(e.opts.moduleCache){let t=e.nativeRequire.cache[i];if(t?.loaded)return X(e,t.exports)}return Ur(e,(0,z.readFileSync)(i,`utf8`),{id:t,filename:i,ext:a,cache:r,async:n.async})}function $(e,t,n){return n&&e.nativeImport?e.nativeImport(function(e){return fr&&V(e)?Rn(e):e}(t)).then(t=>X(e,t)):X(e,e.nativeRequire(t))}function Br(e,t,n){if(!e.opts.fsCache||!t.filename)return n();let r=` /* v9-${kr(t.source,16)} */\n`,i=`${Mt(jt(t.filename))}-${function(e){let t=e.split(Qn).pop();if(!t)return;let n=t.lastIndexOf(`.`);return n<=0?t:t.slice(0,n)}(t.filename)}`+(e.opts.sourceMaps?`+map`:``)+(t.interopDefault?`.i`:``)+`.${kr(t.filename)}`+(t.async?`.mjs`:`.cjs`);t.jsx&&t.filename.endsWith(`x`)&&(i+=`x`);let a=e.opts.fsCache,o=B(a,i);if(!e.opts.rebuildFsCache&&(0,z.existsSync)(o)){let n=(0,z.readFileSync)(o,`utf8`);if(n.endsWith(r))return Y(e,`[cache]`,`[hit]`,t.filename,`~>`,o),n}Y(e,`[cache]`,`[miss]`,t.filename);let s=n();return s.includes(`__JITI_ERROR__`)||((0,z.writeFileSync)(o,s+r,`utf8`),Y(e,`[cache]`,`[store]`,t.filename,`~>`,o)),s}function Vr(e){if(!0===e.opts.fsCache&&(e.opts.fsCache=function(e){let n=e.filename&&Ot(e.filename,`../node_modules`);if(n&&(0,z.existsSync)(n))return B(n,`.cache/jiti`);let r=(0,t.tmpdir)();if(process.env.TMPDIR&&r===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let e=process.env.TMPDIR;delete process.env.TMPDIR,r=(0,t.tmpdir)(),process.env.TMPDIR=e}return B(r,`jiti`)}(e)),e.opts.fsCache)try{if((0,z.mkdirSync)(e.opts.fsCache,{recursive:!0}),!function(e){try{return(0,z.accessSync)(e,z.constants.W_OK),!0}catch{return!1}}(e.opts.fsCache))throw Error(`directory is not writable!`)}catch(t){Y(e,`Error creating cache directory at `,e.opts.fsCache,t),e.opts.fsCache=!1}}function Hr(e,t){let n=Br(e,t,()=>{let n=e.opts.transform({...e.opts.transformOptions,babel:{...e.opts.sourceMaps?{sourceFileName:t.filename,sourceMaps:`inline`}:{},...e.opts.transformOptions?.babel},interopDefault:e.opts.interopDefault,...t});return n.error&&e.opts.debug&&Y(e,n.error),n.code});return n.startsWith(`#!`)&&(n=`// `+n),n}function Ur(e,t,n={}){let r=n.id||(n.filename?Mt(n.filename):`_jitiEval.${n.ext||(n.async?`mjs`:`js`)}`),i=n.filename||Pr(e,r,{async:n.async}),a=n.ext||At(i),o=n.cache||e.parentCache||{},s=/\.[cm]?tsx?$/.test(a),c=a===`.mjs`||a===`.js`&&function(e){for(;e&&e!==`.`&&e!==`/`;){e=B(e,`..`);try{let t=(0,z.readFileSync)(B(e,`package.json`),`utf8`);try{return JSON.parse(t)}catch{}break}catch{}}}(i)?.type===`module`,l=a===`.cjs`,u=n.forceTranspile??(!l&&!(c&&n.async)&&(s||c||e.isTransformRe.test(i)||Jn(t))),d=Ir.performance.now();if(u){t=Hr(e,{filename:i,source:t,ts:s,async:n.async??!1,jsx:e.opts.jsx});let r=Math.round(1e3*(Ir.performance.now()-d))/1e3;Y(e,`[transpile]`,n.async?`[esm]`:`[cjs]`,i,`(${r}ms)`)}else{if(Y(e,`[native]`,n.async?`[import]`:`[require]`,i),n.async)return Promise.resolve($(e,i,n.async)).catch(r=>(Y(e,`Native import error:`,r),Y(e,`[fallback]`,i),Ur(e,t,{...n,forceTranspile:!0})));try{return $(e,i,n.async)}catch(r){Y(e,`Native require error:`,r),Y(e,`[fallback]`,i),t=Hr(e,{filename:i,source:t,ts:s,async:n.async??!1,jsx:e.opts.jsx})}}let f=new pt.Module(i);f.filename=i,e.parentModule&&(f.parent=e.parentModule,Array.isArray(e.parentModule.children)&&!e.parentModule.children.includes(f)&&e.parentModule.children.push(f));let p=Gr(i,e.opts,{parentModule:f,parentCache:o,nativeImport:e.nativeImport,onError:e.onError,createRequire:e.createRequire},!0),m;f.require=p,f.path=jt(i),f.paths=pt.Module._nodeModulePaths(f.path),o[i]=f,e.opts.moduleCache&&(e.nativeRequire.cache[i]=f);let h=function(e,t){return`(${t?.async?`async `:``}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${e}\n});`}(t,{async:n.async});try{m=Rr().runInThisContext(h,{filename:i,lineOffset:0,displayErrors:!1})}catch(t){t.name===`SyntaxError`&&n.async&&e.nativeImport?(Y(e,`[esm]`,`[import]`,`[fallback]`,i),m=function(e,t){let n=`data:text/javascript;base64,${Buffer.from(`export default ${e}`).toString(`base64`)}`;return(...e)=>t(n).then(t=>t.default(...e))}(h,e.nativeImport)):(e.opts.moduleCache&&delete e.nativeRequire.cache[i],e.onError(t))}let g;try{g=m(f.exports,f.require,f,f.filename,jt(f.filename),p.import,p.esmResolve)}catch(t){e.opts.moduleCache&&delete e.nativeRequire.cache[i],e.onError(t)}function _(){if(f.exports&&f.exports.__JITI_ERROR__){let{filename:t,line:n,column:r,code:i,message:a}=f.exports.__JITI_ERROR__,o=Error(`${i}: ${a} \n ${`${t}:${n}:${r}`}`);Error.captureStackTrace(o,zr),e.onError(o)}return f.loaded=!0,X(e,f.exports)}return n.async?Promise.resolve(g).then(_):_()}let Wr=(0,t.platform)()===`win32`;function Gr(e,t={},n,r=!1){let i=r?t:function(e){let t={fsCache:Z(`JITI_FS_CACHE`,Z(`JITI_CACHE`,!0)),rebuildFsCache:Z(`JITI_REBUILD_FS_CACHE`,!1),moduleCache:Z(`JITI_MODULE_CACHE`,Z(`JITI_REQUIRE_CACHE`,!0)),debug:Z(`JITI_DEBUG`,!1),sourceMaps:Z(`JITI_SOURCE_MAPS`,!1),interopDefault:Z(`JITI_INTEROP_DEFAULT`,!0),extensions:Q(`JITI_EXTENSIONS`,[`.js`,`.mjs`,`.cjs`,`.ts`,`.tsx`,`.mts`,`.cts`,`.mtsx`,`.ctsx`]),alias:Q(`JITI_ALIAS`,{}),nativeModules:Q(`JITI_NATIVE_MODULES`,[]),transformModules:Q(`JITI_TRANSFORM_MODULES`,[]),tryNative:Q(`JITI_TRY_NATIVE`,`Bun`in globalThis),jsx:Z(`JITI_JSX`,!1)};t.jsx&&t.extensions.push(`.jsx`,`.tsx`);let n={};return e.cache!==void 0&&(n.fsCache=e.cache),e.requireCache!==void 0&&(n.moduleCache=e.requireCache),{...t,...n,...e}}(t),a=i.alias&&Object.keys(i.alias).length>0?$n(i.alias||{}):void 0,o=[`typescript`,`jiti`,...i.nativeModules||[]],s=RegExp(`node_modules/(${o.map(e=>Yn(e)).join(`|`)})/`),c=[...i.transformModules||[]],l=RegExp(`node_modules/(${c.map(e=>Yn(e)).join(`|`)})/`);e||=process.cwd(),!r&&Or(e)&&(e=B(e,`_index.js`));let u=Rn(e),d=[...i.extensions].filter(e=>e!==`.js`),f=n.createRequire(Wr?e.replace(/\//g,`\\`):e),p={filename:e,url:u,opts:i,alias:a,nativeModules:o,transformModules:c,isNativeRe:s,isTransformRe:l,additionalExts:d,nativeRequire:f,onError:n.onError,parentModule:n.parentModule,parentCache:n.parentCache,nativeImport:n.nativeImport,createRequire:n.createRequire};return r||Y(p,`[init]`,...[[`version:`,tr.rE],[`module-cache:`,i.moduleCache],[`fs-cache:`,i.fsCache],[`rebuild-fs-cache:`,i.rebuildFsCache],[`interop-defaults:`,i.interopDefault]].flat()),r||Vr(p),Object.assign(function(e){return zr(p,e,{async:!1})},{cache:i.moduleCache?f.cache:Object.create(null),extensions:f.extensions,main:f.main,options:i,resolve:Object.assign(function(e){return Pr(p,e,{async:!1})},{paths:f.resolve.paths}),transform:e=>Hr(p,e),evalModule:(e,t)=>Ur(p,e,t),async import(e,t){let n=await zr(p,e,{...t,async:!0});return t?.default?n?.default??n:n},esmResolve(e,t){typeof t==`string`&&(t={parentURL:t});let n=Pr(p,e,{parentURL:u,...t,async:!0});return!n||typeof n!=`string`||n.startsWith(`file://`)?n:Rn(n)}})}})(),n.exports=a.default})()}))(),1);function a(e){throw e}const o=e=>import(e);let s;function c(...e){return s||=r(import.meta.url)(`../dist/babel.cjs`),s(...e)}function l(e,t={}){return t.transform||(t={...t,transform:c}),(0,i.default)(e,t,{onError:a,nativeImport:o,createRequire:r})}export{l as createJiti,l as default};
|
|
9
|
+
`;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return E(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),r===`0`&&t!==56&&t!==57||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return ne(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},R.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},R.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(h(i,r))this.pos+=i<=65535?1:2;else{if(i!==92)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?m:h)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=E(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},R.readWord=function(){var e=this.readWord1(),t=x.name;return this.keywords.test(e)&&(t=ee[e]),this.finishToken(t,e)},D.acorn={Parser:D,version:`8.15.0`,defaultOptions:me,Position:de,SourceLocation:fe,getLineInfo:pe,Node:Fe,TokenType:g,tokTypes:x,keywordTypes:ee,TokContext:M,tokContexts:N,isIdentifierChar:h,isIdentifierStart:m,Token:ut,isNewLine:ne,lineBreak:S,lineBreakG:te,nonASCIIwhitespace:ie};let pt=e(`node:module`),z=e(`node:fs`);String.fromCharCode;let mt=/\/$|\/\?|\/#/,ht=/^\.?\//;function gt(e=``,t){return t?mt.test(e):e.endsWith(`/`)}function _t(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(gt(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function vt(e){return e&&e!==`/`}function yt(e,...t){let n=e||``;for(let e of t.filter(e=>vt(e)))if(n){let t=e.replace(ht,``);n=_t(n)+t}else n=e;return n}let bt=/^[A-Za-z]:\//;function xt(e=``){return e&&e.replace(/\\/g,`/`).replace(bt,e=>e.toUpperCase())}let St=/^[/\\]{2}/,Ct=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,wt=/^[A-Za-z]:$/,Tt=/.(\.[^./]+|\.)$/,Et=function(e){if(e.length===0)return`.`;let t=(e=xt(e)).match(St),n=V(e),r=e[e.length-1]===`/`;return(e=kt(e,!n)).length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),wt.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!V(e)?`/${e}`:e)},B=function(...e){let t=``;for(let n of e)if(n)if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;t+=e&&r?n.slice(1):e||r?n:`/${n}`}else t+=n;return Et(t)};function Dt(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}let Ot=function(...e){let t=``,n=!1;for(let r=(e=e.map(e=>xt(e))).length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:Dt();i&&i.length!==0&&(t=`${i}/${t}`,n=V(i))}return t=kt(t,!n),n&&!V(t)?`/${t}`:t.length>0?t:`.`};function kt(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else{if(o===`/`)break;o=`/`}if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}let V=function(e){return Ct.test(e)},At=function(e){if(e===`..`)return``;let t=Tt.exec(xt(e));return t&&t[1]||``},jt=function(e){let t=xt(e).replace(/\/$/,``).split(`/`).slice(0,-1);return t.length===1&&wt.test(t[0])&&(t[0]+=`/`),t.join(`/`)||(V(e)?`/`:`.`)},Mt=function(e,t){let n=xt(e).split(`/`),r=``;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t){r=t;break}}return t&&r.endsWith(t)?r.slice(0,-t.length):r},H=e(`node:url`),U=e(`node:assert`),W=e(`node:process`),Nt=e(`node:path`),Pt=e(`node:v8`),Ft=e(`node:util`),It=new Set(pt.builtinModules);function Lt(e){return e.replace(/\\/g,`/`)}let Rt={}.hasOwnProperty,zt=/^([A-Z][a-z\d]*)+$/,Bt=new Set([`string`,`function`,`number`,`object`,`Function`,`Object`,`boolean`,`bigint`,`symbol`]),G={};function Vt(e,t=`and`){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(`, `)}, ${t} ${e[e.length-1]}`}let Ht=new Map,Ut;function K(e,t,n){return Ht.set(e,t),function(e,t){return n;function n(...n){let r=Error.stackTraceLimit;Wt()&&(Error.stackTraceLimit=0);let i=new e;Wt()&&(Error.stackTraceLimit=r);let a=function(e,t,n){let r=Ht.get(e);if(U(r!==void 0,"expected `message` to be found"),typeof r==`function`)return U(r.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`),Reflect.apply(r,n,t);let i=/%[dfijoOs]/g,a=0;for(;i.exec(r)!==null;)a++;return U(a===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${a}).`),t.length===0?r:(t.unshift(r),Reflect.apply(Ft.format,null,t))}(t,n,i);return Object.defineProperties(i,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Gt(i),i.code=t,i}}(n,e)}function Wt(){try{if(Pt.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Rt.call(e,`writable`)&&e.writable!==void 0?e.writable:e.set!==void 0}G.ERR_INVALID_ARG_TYPE=K(`ERR_INVALID_ARG_TYPE`,(e,t,n)=>{U(typeof e==`string`,`'name' must be a string`),Array.isArray(t)||(t=[t]);let r=`The `;if(e.endsWith(` argument`))r+=`${e} `;else{let t=e.includes(`.`)?`property`:`argument`;r+=`"${e}" ${t} `}r+=`must be `;let i=[],a=[],o=[];for(let e of t)U(typeof e==`string`,`All expected entries have to be of type string`),Bt.has(e)?i.push(e.toLowerCase()):zt.exec(e)===null?(U(e!==`object`,`The value "object" should be written as "Object"`),o.push(e)):a.push(e);if(a.length>0){let e=i.indexOf(`object`);e!==-1&&(i.slice(e,1),a.push(`Object`))}return i.length>0&&(r+=`${i.length>1?`one of type`:`of type`} ${Vt(i,`or`)}`,(a.length>0||o.length>0)&&(r+=` or `)),a.length>0&&(r+=`an instance of ${Vt(a,`or`)}`,o.length>0&&(r+=` or `)),o.length>0&&(o.length>1?r+=`one of ${Vt(o,`or`)}`:(o[0].toLowerCase()!==o[0]&&(r+=`an `),r+=`${o[0]}`)),r+=`. Received ${function(e){if(e==null)return String(e);if(typeof e==`function`&&e.name)return`function ${e.name}`;if(typeof e==`object`)return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${(0,Ft.inspect)(e,{depth:-1})}`;let t=(0,Ft.inspect)(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}(n)}`,r},TypeError),G.ERR_INVALID_MODULE_SPECIFIER=K(`ERR_INVALID_MODULE_SPECIFIER`,(e,t,n=void 0)=>`Invalid module "${e}" ${t}${n?` imported from ${n}`:``}`,TypeError),G.ERR_INVALID_PACKAGE_CONFIG=K(`ERR_INVALID_PACKAGE_CONFIG`,(e,t,n)=>`Invalid package config ${e}${t?` while importing ${t}`:``}${n?`. ${n}`:``}`,Error),G.ERR_INVALID_PACKAGE_TARGET=K(`ERR_INVALID_PACKAGE_TARGET`,(e,t,n,r=!1,i=void 0)=>{let a=typeof n==`string`&&!r&&n.length>0&&!n.startsWith(`./`);return t===`.`?(U(!1===r),`Invalid "exports" main target ${JSON.stringify(n)} defined in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`):`Invalid "${r?`imports`:`exports`}" target ${JSON.stringify(n)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:``}${a?`; targets must start with "./"`:``}`},Error),G.ERR_MODULE_NOT_FOUND=K(`ERR_MODULE_NOT_FOUND`,(e,t,n=!1)=>`Cannot find ${n?`module`:`package`} '${e}' imported from ${t}`,Error),G.ERR_NETWORK_IMPORT_DISALLOWED=K(`ERR_NETWORK_IMPORT_DISALLOWED`,`import of '%s' by %s is not supported: %s`,Error),G.ERR_PACKAGE_IMPORT_NOT_DEFINED=K(`ERR_PACKAGE_IMPORT_NOT_DEFINED`,(e,t,n)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:``} imported from ${n}`,TypeError),G.ERR_PACKAGE_PATH_NOT_EXPORTED=K(`ERR_PACKAGE_PATH_NOT_EXPORTED`,(e,t,n=void 0)=>t===`.`?`No "exports" main defined in ${e}package.json${n?` imported from ${n}`:``}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${n?` imported from ${n}`:``}`,Error),G.ERR_UNSUPPORTED_DIR_IMPORT=K(`ERR_UNSUPPORTED_DIR_IMPORT`,`Directory import '%s' is not supported resolving ES modules imported from %s`,Error),G.ERR_UNSUPPORTED_RESOLVE_REQUEST=K(`ERR_UNSUPPORTED_RESOLVE_REQUEST`,`Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.`,TypeError),G.ERR_UNKNOWN_FILE_EXTENSION=K(`ERR_UNKNOWN_FILE_EXTENSION`,(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError),G.ERR_INVALID_ARG_VALUE=K(`ERR_INVALID_ARG_VALUE`,(e,t,n=`is invalid`)=>{let r=(0,Ft.inspect)(t);return r.length>128&&(r=`${r.slice(0,128)}...`),`The ${e.includes(`.`)?`property`:`argument`} '${e}' ${n}. Received ${r}`},TypeError);let Gt=function(e){let t=`__node_internal_`+e.name;return Object.defineProperty(e,`name`,{value:t}),e}(function(e){let t=Wt();return t&&(Ut=Error.stackTraceLimit,Error.stackTraceLimit=1/0),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=Ut),e}),Kt={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:qt}=G,Jt=new Map;function Yt(e,{base:t,specifier:n}){let r=Jt.get(e);if(r)return r;let i;try{i=z.readFileSync(Nt.toNamespacedPath(e),`utf8`)}catch(e){let t=e;if(t.code!==`ENOENT`)throw t}let a={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:`none`,exports:void 0,imports:void 0};if(i!==void 0){let r;try{r=JSON.parse(i)}catch(r){let i=r,a=new qt(e,(t?`"${n}" from `:``)+(0,H.fileURLToPath)(t||n),i.message);throw a.cause=i,a}a.exists=!0,Kt.call(r,`name`)&&typeof r.name==`string`&&(a.name=r.name),Kt.call(r,`main`)&&typeof r.main==`string`&&(a.main=r.main),Kt.call(r,`exports`)&&(a.exports=r.exports),Kt.call(r,`imports`)&&(a.imports=r.imports),!Kt.call(r,`type`)||r.type!==`commonjs`&&r.type!==`module`||(a.type=r.type)}return Jt.set(e,a),a}function Xt(e){let t=new URL(`package.json`,e);for(;!t.pathname.endsWith(`node_modules/package.json`);){let n=Yt((0,H.fileURLToPath)(t),{specifier:e});if(n.exists)return n;let r=t;if(t=new URL(`../package.json`,t),t.pathname===r.pathname)break}return{pjsonPath:(0,H.fileURLToPath)(t),exists:!1,type:`none`}}function Zt(e){return Xt(e).type}let{ERR_UNKNOWN_FILE_EXTENSION:Qt}=G,$t={}.hasOwnProperty,en={__proto__:null,".cjs":`commonjs`,".js":`module`,".json":`json`,".mjs":`module`},tn={__proto__:null,"data:":function(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return function(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?`module`:e===`application/json`?`json`:null}(t)},"file:":function(e,t,n){let r=function(e){let t=e.pathname,n=t.length;for(;n--;){let e=t.codePointAt(n);if(e===47)return``;if(e===46)return t.codePointAt(n-1)===47?``:t.slice(n)}return``}(e);if(r===`.js`){let t=Zt(e);return t===`none`?`commonjs`:t}if(r===``){let t=Zt(e);return t===`none`||t===`commonjs`?`commonjs`:`module`}let i=en[r];if(i)return i;if(!n)throw new Qt(r,(0,H.fileURLToPath)(e))},"http:":nn,"https:":nn,"node:":()=>`builtin`};function nn(){}let rn=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:an,ERR_INVALID_PACKAGE_CONFIG:on,ERR_INVALID_PACKAGE_TARGET:sn,ERR_MODULE_NOT_FOUND:cn,ERR_PACKAGE_IMPORT_NOT_DEFINED:ln,ERR_PACKAGE_PATH_NOT_EXPORTED:un,ERR_UNSUPPORTED_DIR_IMPORT:dn,ERR_UNSUPPORTED_RESOLVE_REQUEST:fn}=G,pn={}.hasOwnProperty,mn=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,hn=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,gn=/^\.|%|\\/,_n=/\*/g,vn=/%2f|%5c/i,yn=new Set,bn=/[/\\]{2}/;function xn(e,t,n,r,i,a,o){if(W.noDeprecation)return;let s=(0,H.fileURLToPath)(r),c=bn.exec(o?e:t)!==null;W.emitWarning(`Use of deprecated ${c?`double slash`:`leading or trailing slash matching`} resolving "${e}" for module request "${t}" ${t===n?``:`matched to "${n}" `}in the "${i?`imports`:`exports`}" field module resolution of the package at ${s}${a?` imported from ${(0,H.fileURLToPath)(a)}`:``}.`,`DeprecationWarning`,`DEP0166`)}function Sn(e,t,n,r){if(W.noDeprecation||function(e,t){let n=e.protocol;return $t.call(tn,n)&&tn[n](e,t,!0)||null}(e,{parentURL:n.href})!==`module`)return;let i=(0,H.fileURLToPath)(e.href),a=(0,H.fileURLToPath)(new H.URL(`.`,t)),o=(0,H.fileURLToPath)(n);r?Nt.resolve(a,r)!==i&&W.emitWarning(`Package ${a} has a "main" field set to "${r}", excluding the full filename and extension to the resolved file at "${i.slice(a.length)}", imported from ${o}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`):W.emitWarning(`No "main" or "exports" field defined in the package.json for ${a} resolving the main entry point "${i.slice(a.length)}", imported from ${o}.\nDefault "index" lookups for the main are deprecated for ES modules.`,`DeprecationWarning`,`DEP0151`)}function Cn(e){try{return(0,z.statSync)(e)}catch{}}function wn(e){let t=(0,z.statSync)(e,{throwIfNoEntry:!1}),n=t?t.isFile():void 0;return n!=null&&n}function Tn(e,t,n){let r;if(t.main!==void 0){if(r=new H.URL(t.main,e),wn(r))return r;let i=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],a=-1;for(;++a<i.length&&(r=new H.URL(i[a],e),!wn(r));)r=void 0;if(r)return Sn(r,e,n,t.main),r}let i=[`./index.js`,`./index.json`,`./index.node`],a=-1;for(;++a<i.length&&(r=new H.URL(i[a],e),!wn(r));)r=void 0;if(r)return Sn(r,e,n,t.main),r;throw new cn((0,H.fileURLToPath)(new H.URL(`.`,e)),(0,H.fileURLToPath)(n))}function En(e,t,n){return new un((0,H.fileURLToPath)(new H.URL(`.`,t)),e,n&&(0,H.fileURLToPath)(n))}function Dn(e,t,n,r,i){return t=typeof t==`object`&&t?JSON.stringify(t,null,``):`${t}`,new sn((0,H.fileURLToPath)(new H.URL(`.`,n)),e,t,r,i&&(0,H.fileURLToPath)(i))}function On(e,t,n,r,i,a,o,s,c){if(t!==``&&!a&&e[e.length-1]!==`/`)throw Dn(n,e,r,o,i);if(!e.startsWith(`./`)){if(o&&!e.startsWith(`../`)&&!e.startsWith(`/`)){let n=!1;try{new H.URL(e),n=!0}catch{}if(!n)return Fn(a?rn.call(_n,e,()=>t):e+t,r,c)}throw Dn(n,e,r,o,i)}if(mn.exec(e.slice(2))!==null){if(hn.exec(e.slice(2))!==null)throw Dn(n,e,r,o,i);if(!s){let s=a?n.replace(`*`,()=>t):n+t;xn(a?rn.call(_n,e,()=>t):e,s,n,r,o,i,!0)}}let l=new H.URL(e,r),u=l.pathname,d=new H.URL(`.`,r).pathname;if(!u.startsWith(d))throw Dn(n,e,r,o,i);if(t===``)return l;if(mn.exec(t)!==null){let c=a?n.replace(`*`,()=>t):n+t;hn.exec(t)===null?s||xn(a?rn.call(_n,e,()=>t):e,c,n,r,o,i,!1):(function(e,t,n,r,i){throw new an(e,`request is not a valid match in pattern "${t}" for the "${r?`imports`:`exports`}" resolution of ${(0,H.fileURLToPath)(n)}`,i&&(0,H.fileURLToPath)(i))})(c,n,r,o,i)}return a?new H.URL(rn.call(_n,l.href,()=>t)):new H.URL(t,l)}function kn(e){let t=Number(e);return`${t}`===e&&t>=0&&t<4294967295}function An(e,t,n,r,i,a,o,s,c){if(typeof t==`string`)return On(t,n,r,e,i,a,o,s,c);if(Array.isArray(t)){let l=t;if(l.length===0)return null;let u,d=-1;for(;++d<l.length;){let t=l[d],f;try{f=An(e,t,n,r,i,a,o,s,c)}catch(e){if(u=e,e.code===`ERR_INVALID_PACKAGE_TARGET`)continue;throw e}if(f!==void 0){if(f!==null)return f;u=null}}if(u==null)return null;throw u}if(typeof t==`object`&&t){let l=Object.getOwnPropertyNames(t),u=-1;for(;++u<l.length;)if(kn(l[u]))throw new on((0,H.fileURLToPath)(e),i,`"exports" cannot contain numeric property keys.`);for(u=-1;++u<l.length;){let d=l[u];if(d===`default`||c&&c.has(d)){let l=An(e,t[d],n,r,i,a,o,s,c);if(l===void 0)continue;return l}}return null}if(t===null)return null;throw Dn(r,t,e,o,i)}function jn(e,t,n){if(W.noDeprecation)return;let r=(0,H.fileURLToPath)(t);yn.has(r+`|`+e)||(yn.add(r+`|`+e),W.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${r}${n?` imported from ${(0,H.fileURLToPath)(n)}`:``}. Mapping specifiers ending in "/" is no longer supported.`,`DeprecationWarning`,`DEP0155`))}function Mn(e,t,n,r,i){let a=n.exports;if(function(e,t,n){if(typeof e==`string`||Array.isArray(e))return!0;if(typeof e!=`object`||!e)return!1;let r=Object.getOwnPropertyNames(e),i=!1,a=0,o=-1;for(;++o<r.length;){let e=r[o],s=e===``||e[0]!==`.`;if(a++===0)i=s;else if(i!==s)throw new on((0,H.fileURLToPath)(t),n,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}(a,e,r)&&(a={".":a}),pn.call(a,t)&&!t.includes(`*`)&&!t.endsWith(`/`)){let n=An(e,a[t],``,t,r,!1,!1,!1,i);if(n==null)throw En(t,e,r);return n}let o=``,s=``,c=Object.getOwnPropertyNames(a),l=-1;for(;++l<c.length;){let n=c[l],i=n.indexOf(`*`);if(i!==-1&&t.startsWith(n.slice(0,i))){t.endsWith(`/`)&&jn(t,e,r);let a=n.slice(i+1);t.length>=n.length&&t.endsWith(a)&&Nn(o,n)===1&&n.lastIndexOf(`*`)===i&&(o=n,s=t.slice(i,t.length-a.length))}}if(o){let n=An(e,a[o],s,o,r,!0,!1,t.endsWith(`/`),i);if(n==null)throw En(t,e,r);return n}throw En(t,e,r)}function Nn(e,t){let n=e.indexOf(`*`),r=t.indexOf(`*`),i=n===-1?e.length:n+1,a=r===-1?t.length:r+1;return i>a?-1:a>i||n===-1?1:r===-1||e.length>t.length?-1:+(t.length>e.length)}function Pn(e,t,n){if(e===`#`||e.startsWith(`#/`)||e.endsWith(`/`))throw new an(e,`is not a valid internal imports specifier name`,(0,H.fileURLToPath)(t));let r,i=Xt(t);if(i.exists){r=(0,H.pathToFileURL)(i.pjsonPath);let a=i.imports;if(a)if(pn.call(a,e)&&!e.includes(`*`)){let i=An(r,a[e],``,e,t,!1,!0,!1,n);if(i!=null)return i}else{let i=``,o=``,s=Object.getOwnPropertyNames(a),c=-1;for(;++c<s.length;){let t=s[c],n=t.indexOf(`*`);if(n!==-1&&e.startsWith(t.slice(0,-1))){let r=t.slice(n+1);e.length>=t.length&&e.endsWith(r)&&Nn(i,t)===1&&t.lastIndexOf(`*`)===n&&(i=t,o=e.slice(n,e.length-r.length))}}if(i){let e=An(r,a[i],o,i,t,!0,!0,!1,n);if(e!=null)return e}}}throw function(e,t,n){return new ln(e,t&&(0,H.fileURLToPath)(new H.URL(`.`,t)),(0,H.fileURLToPath)(n))}(e,r,t)}function Fn(e,t,n){if(pt.builtinModules.includes(e))return new H.URL(`node:`+e);let{packageName:r,packageSubpath:i,isScoped:a}=function(e,t){let n=e.indexOf(`/`),r=!0,i=!1;e[0]===`@`&&(i=!0,n===-1||e.length===0?r=!1:n=e.indexOf(`/`,n+1));let a=n===-1?e:e.slice(0,n);if(gn.exec(a)!==null&&(r=!1),!r)throw new an(e,`is not a valid package name`,(0,H.fileURLToPath)(t));return{packageName:a,packageSubpath:`.`+(n===-1?``:e.slice(n)),isScoped:i}}(e,t),o=Xt(t);if(o.exists){let e=(0,H.pathToFileURL)(o.pjsonPath);if(o.name===r&&o.exports!==void 0&&o.exports!==null)return Mn(e,i,o,t,n)}let s,c=new H.URL(`./node_modules/`+r+`/package.json`,t),l=(0,H.fileURLToPath)(c);do{let o=Cn(l.slice(0,-13));if(!o||!o.isDirectory()){s=l,c=new H.URL((a?`../../../../node_modules/`:`../../../node_modules/`)+r+`/package.json`,c),l=(0,H.fileURLToPath)(c);continue}let u=Yt(l,{base:t,specifier:e});return u.exports!==void 0&&u.exports!==null?Mn(c,i,u,t,n):i===`.`?Tn(c,u,t):new H.URL(i,c)}while(l.length!==s.length);throw new cn(r,(0,H.fileURLToPath)(t),!1)}function In(e,t,n,r){let i=t.protocol,a=i===`data:`||i===`http:`||i===`https:`,o;if(function(e){return e!==``&&(e[0]===`/`||function(e){return e[0]===`.`&&(e.length===1||e[1]===`/`||e[1]===`.`&&(e.length===2||e[2]===`/`))}(e))}(e))try{o=new H.URL(e,t)}catch(n){let r=new fn(e,t);throw r.cause=n,r}else if(i===`file:`&&e[0]===`#`)o=Pn(e,t,n);else try{o=new H.URL(e)}catch(r){if(a&&!pt.builtinModules.includes(e)){let n=new fn(e,t);throw n.cause=r,n}o=Fn(e,t,n)}return U(o!==void 0,`expected to be defined`),o.protocol===`file:`?function(e,t){if(vn.exec(e.pathname)!==null)throw new an(e.pathname,`must not include encoded "/" or "\\" characters`,(0,H.fileURLToPath)(t));let n;try{n=(0,H.fileURLToPath)(e)}catch(n){let r=n;throw Object.defineProperty(r,`input`,{value:String(e)}),Object.defineProperty(r,`module`,{value:String(t)}),r}let r=Cn(n.endsWith(`/`)?n.slice(-1):n);if(r&&r.isDirectory()){let r=new dn(n,(0,H.fileURLToPath)(t));throw r.url=String(e),r}if(!r||!r.isFile()){let r=new cn(n||e.pathname,t&&(0,H.fileURLToPath)(t),!0);throw r.url=String(e),r}{let t=(0,z.realpathSync)(n),{search:r,hash:i}=e;(e=(0,H.pathToFileURL)(t+(n.endsWith(Nt.sep)?`/`:``))).search=r,e.hash=i}return e}(o,t):o}function Ln(e){return typeof e!=`string`||e.startsWith(`file://`)?Lt((0,H.fileURLToPath)(e)):Lt(e)}function Rn(e){return(0,H.pathToFileURL)(Ln(e)).toString()}let zn=new Set([`node`,`import`]),Bn=[`.mjs`,`.cjs`,`.js`,`.json`],Vn=new Set([`ERR_MODULE_NOT_FOUND`,`ERR_UNSUPPORTED_DIR_IMPORT`,`MODULE_NOT_FOUND`,`ERR_PACKAGE_PATH_NOT_EXPORTED`]);function Hn(e,t,n){try{return In(e,t,n)}catch(e){if(!Vn.has(e?.code))throw e}}function Un(e,t={}){if(typeof e!=`string`){if(!(e instanceof URL))throw TypeError("input must be a `string` or `URL`");e=Ln(e)}if(/(?:node|data|http|https):/.test(e))return e;if(It.has(e))return`node:`+e;if(e.startsWith(`file://`)&&(e=Ln(e)),V(e))try{if((0,z.statSync)(e).isFile())return Rn(e)}catch(e){if(e?.code!==`ENOENT`)throw e}let n=t.conditions?new Set(t.conditions):zn,r=(Array.isArray(t.url)?t.url:[t.url]).filter(Boolean).map(e=>new URL(function(e){return typeof e!=`string`&&(e=e.toString()),/(?:node|data|http|https|file):/.test(e)?e:It.has(e)?`node:`+e:`file://`+encodeURI(Lt(e))}(e.toString())));r.length===0&&r.push(new URL(Rn(process.cwd())));let i=[...r];for(let e of r)e.protocol===`file:`&&i.push(new URL(`./`,e),new URL(yt(e.pathname,`_index.js`),e),new URL(`node_modules`,e));let a;for(let r of i){if(a=Hn(e,r,n),a)break;for(let i of[``,`/index`]){for(let o of t.extensions||Bn)if(a=Hn(yt(e,i)+o,r,n),a)break;if(a)break}if(a)break}if(!a){let t=Error(`Cannot find module ${e} imported from ${i.join(`, `)}`);throw t.code=`ERR_MODULE_NOT_FOUND`,t}return Rn(a)}function Wn(e,t){return Un(e,t)}function Gn(e,t){return Ln(Wn(e,t))}let Kn=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,qn=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function Jn(e,t={}){return t.stripComments&&(e=e.replace(qn,``)),Kn.test(e)}function Yn(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}let Xn=new Set([`/`,`\\`,void 0]),Zn=Symbol.for(`pathe:normalizedAlias`),Qn=/[/\\]/;function $n(e){if(e[Zn])return e;let t=Object.fromEntries(Object.entries(e).sort(([e],[t])=>function(e,t){return t.split(`/`).length-e.split(`/`).length}(e,t)));for(let e in t)for(let n in t)n===e||e.startsWith(n)||t[e]?.startsWith(n)&&Xn.has(t[e][n.length])&&(t[e]=t[n]+t[e].slice(n.length));return Object.defineProperty(t,Zn,{value:!0,enumerable:!1}),t}function er(e=`/`){let t=e[e.length-1];return t===`/`||t===`\\`}var tr={rE:`2.6.1`};let nr=e(`node:crypto`);var rr=i.n(nr);let ir=Object.create(null),ar=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?ir:globalThis),q=new Proxy(ir,{get:(e,t)=>ar()[t]??ir[t],has:(e,t)=>t in ar()||t in ir,set:(e,t,n)=>(ar(!0)[t]=n,!0),deleteProperty(e,t){return t?(delete ar(!0)[t],!0):!1},ownKeys(){let e=ar(!0);return Object.keys(e)}}),or=typeof process<`u`&&process.env&&process.env.NODE_ENV||``,sr=[[`APPVEYOR`],[`AWS_AMPLIFY`,`AWS_APP_ID`,{ci:!0}],[`AZURE_PIPELINES`,`SYSTEM_TEAMFOUNDATIONCOLLECTIONURI`],[`AZURE_STATIC`,`INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN`],[`APPCIRCLE`,`AC_APPCIRCLE`],[`BAMBOO`,`bamboo_planKey`],[`BITBUCKET`,`BITBUCKET_COMMIT`],[`BITRISE`,`BITRISE_IO`],[`BUDDY`,`BUDDY_WORKSPACE_ID`],[`BUILDKITE`],[`CIRCLE`,`CIRCLECI`],[`CIRRUS`,`CIRRUS_CI`],[`CLOUDFLARE_PAGES`,`CF_PAGES`,{ci:!0}],[`CLOUDFLARE_WORKERS`,`WORKERS_CI`,{ci:!0}],[`CODEBUILD`,`CODEBUILD_BUILD_ARN`],[`CODEFRESH`,`CF_BUILD_ID`],[`DRONE`],[`DRONE`,`DRONE_BUILD_EVENT`],[`DSARI`],[`GITHUB_ACTIONS`],[`GITLAB`,`GITLAB_CI`],[`GITLAB`,`CI_MERGE_REQUEST_ID`],[`GOCD`,`GO_PIPELINE_LABEL`],[`LAYERCI`],[`HUDSON`,`HUDSON_URL`],[`JENKINS`,`JENKINS_URL`],[`MAGNUM`],[`NETLIFY`],[`NETLIFY`,`NETLIFY_LOCAL`,{ci:!1}],[`NEVERCODE`],[`RENDER`],[`SAIL`,`SAILCI`],[`SEMAPHORE`],[`SCREWDRIVER`],[`SHIPPABLE`],[`SOLANO`,`TDDIUM`],[`STRIDER`],[`TEAMCITY`,`TEAMCITY_VERSION`],[`TRAVIS`],[`VERCEL`,`NOW_BUILDER`],[`VERCEL`,`VERCEL`,{ci:!1}],[`VERCEL`,`VERCEL_ENV`,{ci:!1}],[`APPCENTER`,`APPCENTER_BUILD_ID`],[`CODESANDBOX`,`CODESANDBOX_SSE`,{ci:!1}],[`CODESANDBOX`,`CODESANDBOX_HOST`,{ci:!1}],[`STACKBLITZ`],[`STORMKIT`],[`CLEAVR`],[`ZEABUR`],[`CODESPHERE`,`CODESPHERE_APP_ID`,{ci:!0}],[`RAILWAY`,`RAILWAY_PROJECT_ID`],[`RAILWAY`,`RAILWAY_SERVICE_ID`],[`DENO-DEPLOY`,`DENO_DEPLOYMENT_ID`],[`FIREBASE_APP_HOSTING`,`FIREBASE_APP_HOSTING`,{ci:!0}]],cr=function(){if(globalThis.process?.env)for(let e of sr){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL===`/bin/jsh`&&globalThis.process?.versions?.webcontainer?{name:`stackblitz`,ci:!1}:{name:``,ci:!1}}();cr.name;function lr(e){return!!e&&e!==`false`}let ur=globalThis.process?.platform||``;lr(q.CI)||cr.ci;let dr=lr(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);q.DEBUG,or===`test`||q.TEST;let fr=(q.MINIMAL,/^win/i.test(ur)),pr=(/^linux/i.test(ur),/^darwin/i.test(ur),!lr(q.NO_COLOR)&&(lr(q.FORCE_COLOR)||(dr||fr)&&q.TERM),(globalThis.process?.versions?.node||``).replace(/^v/,``)||null),mr=(Number(pr?.split(`.`)[0]),globalThis.process||Object.create(null)),hr={versions:{}},gr=(new Proxy(mr,{get:(e,t)=>t===`env`?q:t in e?e[t]:t in hr?hr[t]:void 0}),globalThis.process?.release?.name===`node`),_r=!!globalThis.Bun||!!globalThis.process?.versions?.bun,vr=!!globalThis.Deno,yr=!!globalThis.fastly,br=[[!!globalThis.Netlify,`netlify`],[!!globalThis.EdgeRuntime,`edge-light`],[globalThis.navigator?.userAgent===`Cloudflare-Workers`,`workerd`],[yr,`fastly`],[vr,`deno`],[_r,`bun`],[gr,`node`]];(function(){let e=br.find(e=>e[0]);e&&e[1]})();let xr=e(`node:tty`)?.WriteStream?.prototype?.hasColors?.()??!1,J=(e,t)=>{if(!xr)return e=>e;let n=`[${e}m`,r=`[${t}m`;return e=>{let i=e+``,a=i.indexOf(r);if(a===-1)return n+i+r;let o=n,s=0,c=(t===22?r:``)+n;for(;a!==-1;)o+=i.slice(s,a)+c,s=a+r.length,a=i.indexOf(r,s);return o+=i.slice(s)+r,o}},Sr=(J(0,0),J(1,22),J(2,22),J(3,23),J(4,24),J(53,55),J(7,27),J(8,28),J(9,29),J(30,39),J(31,39)),Cr=J(32,39),wr=J(33,39),Tr=J(34,39),Er=(J(35,39),J(36,39)),Dr=(J(37,39),J(90,39));J(40,49),J(41,49),J(42,49),J(43,49),J(44,49),J(45,49),J(46,49),J(47,49),J(100,49),J(91,39),J(92,39),J(93,39),J(94,39),J(95,39),J(96,39),J(97,39),J(101,49),J(102,49),J(103,49),J(104,49),J(105,49),J(106,49),J(107,49);function Or(e){if(typeof e!=`string`||e.startsWith(`file://`))return!1;try{return(0,z.lstatSync)(e).isDirectory()}catch{return!1}}function kr(e,t=8){return(function(){if(jr!==void 0)return jr;try{return jr=!!rr().getFips?.(),jr}catch{return jr=!1,jr}}()?rr().createHash(`sha256`):rr().createHash(`md5`)).update(e).digest(`hex`).slice(0,t)}let Ar={true:Cr(`true`),false:wr(`false`),"[rebuild]":wr(`[rebuild]`),"[esm]":Tr(`[esm]`),"[cjs]":Cr(`[cjs]`),"[import]":Tr(`[import]`),"[require]":Cr(`[require]`),"[native]":Er(`[native]`),"[transpile]":wr(`[transpile]`),"[fallback]":Sr(`[fallback]`),"[unknown]":Sr(`[unknown]`),"[hit]":Cr(`[hit]`),"[miss]":wr(`[miss]`),"[json]":Cr(`[json]`),"[data]":Cr(`[data]`)};function Y(e,...t){if(!e.opts.debug)return;let n=process.cwd();console.log(Dr([`[jiti]`,...t.map(e=>e in Ar?Ar[e]:typeof e==`string`?e.replace(n,`.`):JSON.stringify(e))].join(` `)))}function X(e,t){return e.opts.interopDefault?function(e){let t=typeof e;if(e===null||t!==`object`&&t!==`function`)return e;let n=e.default,r=typeof n,i=n==null,a=r===`object`||r===`function`;return i&&e instanceof Promise?e:new Proxy(e,{get(t,r,o){if(r===`__esModule`)return!0;if(r===`default`)return i?e:typeof n?.default==`function`&&e.__esModule?n.default:n;if(Reflect.has(t,r))return Reflect.get(t,r,o);if(a&&!(n instanceof Promise)){let e=Reflect.get(n,r,o);return typeof e==`function`&&(e=e.bind(n)),e}},apply:(e,t,i)=>typeof e==`function`?Reflect.apply(e,t,i):r===`function`?Reflect.apply(n,t,i):void 0})}(t):t}let jr;function Z(e,t){return!!Q(e,t)}function Q(e,t){let n=process.env[e];if(!(e in process.env))return t;try{return JSON.parse(n)}catch{return t}}let Mr=/\.(c|m)?j(sx?)$/,Nr=/\.(c|m)?t(sx?)$/;function Pr(e,t,n){let r,i;if(e.isNativeRe.test(t))return t;e.alias&&(t=function(e,t){let n=xt(e);t=$n(t);for(let[e,r]of Object.entries(t))if(n.startsWith(e)&&er(n[(er(e)?e.slice(0,-1):e).length]))return B(r,n.slice(e.length));return n}(t,e.alias));let a=n?.parentURL||e.url;Or(a)&&(a=B(a,`_index.js`));let o=(n?.async?[n?.conditions,[`node`,`import`],[`node`,`require`]]:[n?.conditions,[`node`,`require`],[`node`,`import`]]).filter(Boolean);for(let n of o){try{r=Gn(t,{url:a,conditions:n,extensions:e.opts.extensions})}catch(e){i=e}if(r)return r}try{return e.nativeRequire.resolve(t,{paths:n.paths})}catch(e){i=e}for(let i of e.additionalExts)if(r=Fr(e,t+i,a,n)||Fr(e,t+`/index`+i,a,n),r||(Nr.test(e.filename)||Nr.test(e.parentModule?.filename||``)||Mr.test(t))&&(r=Fr(e,t.replace(Mr,`.$1t$2`),a,n),r))return r;if(!n?.try)throw i}function Fr(e,t,n,r){try{return e.nativeRequire.resolve(t,{...r,paths:[jt(Ln(n)),...r?.paths||[]]})}catch{}}let Ir=e(`node:perf_hooks`),Lr=e(`node:vm`);var Rr=i.n(Lr);function zr(e,t,n){let r=e.parentCache||{};if(t.startsWith(`node:`))return $(e,t,n.async);if(t.startsWith(`file:`))t=(0,H.fileURLToPath)(t);else if(t.startsWith(`data:`)){if(!n.async)throw Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return Y(e,`[native]`,`[data]`,`[import]`,t),$(e,t,!0)}if(pt.builtinModules.includes(t)||t===`.pnp.js`)return $(e,t,n.async);if(e.opts.tryNative&&!e.opts.transformOptions)try{if(!(t=Pr(e,t,n))&&n.try)return;if(Y(e,`[try-native]`,n.async&&e.nativeImport?`[import]`:`[require]`,t),n.async&&e.nativeImport)return e.nativeImport(t).then(n=>(!1===e.opts.moduleCache&&delete e.nativeRequire.cache[t],X(e,n)));{let n=e.nativeRequire(t);return!1===e.opts.moduleCache&&delete e.nativeRequire.cache[t],X(e,n)}}catch(n){Y(e,`[try-native] Using fallback for ${t} because of an error:`,n)}let i=Pr(e,t,n);if(!i&&n.try)return;let a=At(i);if(a===`.json`){Y(e,`[json]`,i);let t=e.nativeRequire(i);return t&&!(`default`in t)&&Object.defineProperty(t,`default`,{value:t,enumerable:!1}),t}if(a&&!e.opts.extensions.includes(a))return Y(e,`[native]`,`[unknown]`,n.async?`[import]`:`[require]`,i),$(e,i,n.async);if(e.isNativeRe.test(i))return Y(e,`[native]`,n.async?`[import]`:`[require]`,i),$(e,i,n.async);if(r[i])return X(e,r[i]?.exports);if(e.opts.moduleCache){let t=e.nativeRequire.cache[i];if(t?.loaded)return X(e,t.exports)}return Ur(e,(0,z.readFileSync)(i,`utf8`),{id:t,filename:i,ext:a,cache:r,async:n.async})}function $(e,t,n){return n&&e.nativeImport?e.nativeImport(function(e){return fr&&V(e)?Rn(e):e}(t)).then(t=>X(e,t)):X(e,e.nativeRequire(t))}function Br(e,t,n){if(!e.opts.fsCache||!t.filename)return n();let r=` /* v9-${kr(t.source,16)} */\n`,i=`${Mt(jt(t.filename))}-${function(e){let t=e.split(Qn).pop();if(!t)return;let n=t.lastIndexOf(`.`);return n<=0?t:t.slice(0,n)}(t.filename)}`+(e.opts.sourceMaps?`+map`:``)+(t.interopDefault?`.i`:``)+`.${kr(t.filename)}`+(t.async?`.mjs`:`.cjs`);t.jsx&&t.filename.endsWith(`x`)&&(i+=`x`);let a=e.opts.fsCache,o=B(a,i);if(!e.opts.rebuildFsCache&&(0,z.existsSync)(o)){let n=(0,z.readFileSync)(o,`utf8`);if(n.endsWith(r))return Y(e,`[cache]`,`[hit]`,t.filename,`~>`,o),n}Y(e,`[cache]`,`[miss]`,t.filename);let s=n();return s.includes(`__JITI_ERROR__`)||((0,z.writeFileSync)(o,s+r,`utf8`),Y(e,`[cache]`,`[store]`,t.filename,`~>`,o)),s}function Vr(e){if(!0===e.opts.fsCache&&(e.opts.fsCache=function(e){let n=e.filename&&Ot(e.filename,`../node_modules`);if(n&&(0,z.existsSync)(n))return B(n,`.cache/jiti`);let r=(0,t.tmpdir)();if(process.env.TMPDIR&&r===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let e=process.env.TMPDIR;delete process.env.TMPDIR,r=(0,t.tmpdir)(),process.env.TMPDIR=e}return B(r,`jiti`)}(e)),e.opts.fsCache)try{if((0,z.mkdirSync)(e.opts.fsCache,{recursive:!0}),!function(e){try{return(0,z.accessSync)(e,z.constants.W_OK),!0}catch{return!1}}(e.opts.fsCache))throw Error(`directory is not writable!`)}catch(t){Y(e,`Error creating cache directory at `,e.opts.fsCache,t),e.opts.fsCache=!1}}function Hr(e,t){let n=Br(e,t,()=>{let n=e.opts.transform({...e.opts.transformOptions,babel:{...e.opts.sourceMaps?{sourceFileName:t.filename,sourceMaps:`inline`}:{},...e.opts.transformOptions?.babel},interopDefault:e.opts.interopDefault,...t});return n.error&&e.opts.debug&&Y(e,n.error),n.code});return n.startsWith(`#!`)&&(n=`// `+n),n}function Ur(e,t,n={}){let r=n.id||(n.filename?Mt(n.filename):`_jitiEval.${n.ext||(n.async?`mjs`:`js`)}`),i=n.filename||Pr(e,r,{async:n.async}),a=n.ext||At(i),o=n.cache||e.parentCache||{},s=/\.[cm]?tsx?$/.test(a),c=a===`.mjs`||a===`.js`&&function(e){for(;e&&e!==`.`&&e!==`/`;){e=B(e,`..`);try{let t=(0,z.readFileSync)(B(e,`package.json`),`utf8`);try{return JSON.parse(t)}catch{}break}catch{}}}(i)?.type===`module`,l=a===`.cjs`,u=n.forceTranspile??(!l&&!(c&&n.async)&&(s||c||e.isTransformRe.test(i)||Jn(t))),d=Ir.performance.now();if(u){t=Hr(e,{filename:i,source:t,ts:s,async:n.async??!1,jsx:e.opts.jsx});let r=Math.round(1e3*(Ir.performance.now()-d))/1e3;Y(e,`[transpile]`,n.async?`[esm]`:`[cjs]`,i,`(${r}ms)`)}else{if(Y(e,`[native]`,n.async?`[import]`:`[require]`,i),n.async)return Promise.resolve($(e,i,n.async)).catch(r=>(Y(e,`Native import error:`,r),Y(e,`[fallback]`,i),Ur(e,t,{...n,forceTranspile:!0})));try{return $(e,i,n.async)}catch(r){Y(e,`Native require error:`,r),Y(e,`[fallback]`,i),t=Hr(e,{filename:i,source:t,ts:s,async:n.async??!1,jsx:e.opts.jsx})}}let f=new pt.Module(i);f.filename=i,e.parentModule&&(f.parent=e.parentModule,Array.isArray(e.parentModule.children)&&!e.parentModule.children.includes(f)&&e.parentModule.children.push(f));let p=Gr(i,e.opts,{parentModule:f,parentCache:o,nativeImport:e.nativeImport,onError:e.onError,createRequire:e.createRequire},!0),m;f.require=p,f.path=jt(i),f.paths=pt.Module._nodeModulePaths(f.path),o[i]=f,e.opts.moduleCache&&(e.nativeRequire.cache[i]=f);let h=function(e,t){return`(${t?.async?`async `:``}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${e}\n});`}(t,{async:n.async});try{m=Rr().runInThisContext(h,{filename:i,lineOffset:0,displayErrors:!1})}catch(t){t.name===`SyntaxError`&&n.async&&e.nativeImport?(Y(e,`[esm]`,`[import]`,`[fallback]`,i),m=function(e,t){let n=`data:text/javascript;base64,${Buffer.from(`export default ${e}`).toString(`base64`)}`;return(...e)=>t(n).then(t=>t.default(...e))}(h,e.nativeImport)):(e.opts.moduleCache&&delete e.nativeRequire.cache[i],e.onError(t))}let g;try{g=m(f.exports,f.require,f,f.filename,jt(f.filename),p.import,p.esmResolve)}catch(t){e.opts.moduleCache&&delete e.nativeRequire.cache[i],e.onError(t)}function _(){if(f.exports&&f.exports.__JITI_ERROR__){let{filename:t,line:n,column:r,code:i,message:a}=f.exports.__JITI_ERROR__,o=Error(`${i}: ${a} \n ${`${t}:${n}:${r}`}`);Error.captureStackTrace(o,zr),e.onError(o)}return f.loaded=!0,X(e,f.exports)}return n.async?Promise.resolve(g).then(_):_()}let Wr=(0,t.platform)()===`win32`;function Gr(e,t={},n,r=!1){let i=r?t:function(e){let t={fsCache:Z(`JITI_FS_CACHE`,Z(`JITI_CACHE`,!0)),rebuildFsCache:Z(`JITI_REBUILD_FS_CACHE`,!1),moduleCache:Z(`JITI_MODULE_CACHE`,Z(`JITI_REQUIRE_CACHE`,!0)),debug:Z(`JITI_DEBUG`,!1),sourceMaps:Z(`JITI_SOURCE_MAPS`,!1),interopDefault:Z(`JITI_INTEROP_DEFAULT`,!0),extensions:Q(`JITI_EXTENSIONS`,[`.js`,`.mjs`,`.cjs`,`.ts`,`.tsx`,`.mts`,`.cts`,`.mtsx`,`.ctsx`]),alias:Q(`JITI_ALIAS`,{}),nativeModules:Q(`JITI_NATIVE_MODULES`,[]),transformModules:Q(`JITI_TRANSFORM_MODULES`,[]),tryNative:Q(`JITI_TRY_NATIVE`,`Bun`in globalThis),jsx:Z(`JITI_JSX`,!1)};t.jsx&&t.extensions.push(`.jsx`,`.tsx`);let n={};return e.cache!==void 0&&(n.fsCache=e.cache),e.requireCache!==void 0&&(n.moduleCache=e.requireCache),{...t,...n,...e}}(t),a=i.alias&&Object.keys(i.alias).length>0?$n(i.alias||{}):void 0,o=[`typescript`,`jiti`,...i.nativeModules||[]],s=RegExp(`node_modules/(${o.map(e=>Yn(e)).join(`|`)})/`),c=[...i.transformModules||[]],l=RegExp(`node_modules/(${c.map(e=>Yn(e)).join(`|`)})/`);e||=process.cwd(),!r&&Or(e)&&(e=B(e,`_index.js`));let u=Rn(e),d=[...i.extensions].filter(e=>e!==`.js`),f=n.createRequire(Wr?e.replace(/\//g,`\\`):e),p={filename:e,url:u,opts:i,alias:a,nativeModules:o,transformModules:c,isNativeRe:s,isTransformRe:l,additionalExts:d,nativeRequire:f,onError:n.onError,parentModule:n.parentModule,parentCache:n.parentCache,nativeImport:n.nativeImport,createRequire:n.createRequire};return r||Y(p,`[init]`,...[[`version:`,tr.rE],[`module-cache:`,i.moduleCache],[`fs-cache:`,i.fsCache],[`rebuild-fs-cache:`,i.rebuildFsCache],[`interop-defaults:`,i.interopDefault]].flat()),r||Vr(p),Object.assign(function(e){return zr(p,e,{async:!1})},{cache:i.moduleCache?f.cache:Object.create(null),extensions:f.extensions,main:f.main,options:i,resolve:Object.assign(function(e){return Pr(p,e,{async:!1})},{paths:f.resolve.paths}),transform:e=>Hr(p,e),evalModule:(e,t)=>Ur(p,e,t),async import(e,t){let n=await zr(p,e,{...t,async:!0});return t?.default?n?.default??n:n},esmResolve(e,t){typeof t==`string`&&(t={parentURL:t});let n=Pr(p,e,{parentURL:u,...t,async:!0});return!n||typeof n!=`string`||n.startsWith(`file://`)?n:Rn(n)}})}})(),n.exports=a.default})()}))(),1);function a(e){throw e}const o=e=>import(e);let s;function c(...e){return s||=r(import.meta.url)(`../dist/babel.cjs`),s(...e)}function l(e,t={}){return t.transform||(t={...t,transform:c}),(0,i.default)(e,t,{onError:a,nativeImport:o,createRequire:r})}export{l as createJiti,l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./shared-C_yS1qGF.js";import{join as n}from"node:path";import{readFile as r}from"node:fs/promises";const i=[`renovate.json`,`renovate.json5`,...[`.github`,`.gitea`,`.forgejo`,`.gitlab`].flatMap(e=>[`${e}/renovate.json`,`${e}/renovate.json5`]),`.renovaterc`,`.renovaterc.json`,`.renovaterc.json5`],a={y:365,year:365,years:365,mo:30,month:30,months:30,w:7,week:7,weeks:7,d:1,day:1,days:1,h:1/24,hour:1/24,hours:1/24,min:1/1440,minute:1/1440,minutes:1/1440,s:1/86400,second:1/86400,seconds:1/86400};function o(e){let t=0,n=!1,r=/(\d+(?:\.\d+)?)\s*([a-z]+)/gi,i;for(;(i=r.exec(e))!==null;){let e=a[i[2].toLowerCase()];if(e===void 0)return;t+=Number(i[1])*e,n=!0}return n?t:void 0}function s(e){if(!Array.isArray(e.matchPackageNames)||!e.matchPackageNames.length)return!1;for(let t of Object.keys(e))if(t.startsWith(`match`)&&t!==`matchPackageNames`)return!1;return!0}async function c(e){for(let t of i){let i=n(e,...t.split(`/`));try{return{path:i,text:await r(i,`utf8`)}}catch{}}try{let t=await r(n(e,`package.json`),`utf8`),i=JSON.parse(t);if(i&&typeof i==`object`&&i.renovate&&typeof i.renovate==`object`)return{path:`package.json`,text:JSON.stringify(i.renovate)}}catch{}}function l(e){let t=/^\/(.+)\/([a-z]*)$/.exec(e);if(!t)return e;try{return new RegExp(t[1],t[2])}catch{return e}}function u(e,n){let r={};if(n.cooldown&&typeof e.minimumReleaseAge==`string`){let t=o(e.minimumReleaseAge);t!==void 0&&t>0&&(r.cooldown=t)}let i=[],a={};if(Array.isArray(e.ignoreDeps))for(let t of e.ignoreDeps)typeof t==`string`&&t&&i.push(t);if(Array.isArray(e.packageRules))for(let n of e.packageRules){if(!n||typeof n!=`object`||!s(n))continue;let e=n.matchPackageNames.filter(e=>typeof e==`string`&&!!e);if(n.enabled===!1)for(let t of e)i.push(l(t));if(typeof n.allowedVersions==`string`&&t(n.allowedVersions))for(let t of e)a[t]=n.allowedVersions}return i.length&&(r.exclude=i),Object.keys(a).length&&(r.pin=a),r}async function d(t,n={}){let r=await c(t);if(!r)return{};let i;try{i=e(r.text)}catch(e){throw Error(`Unable to parse renovate config ${r.path}: ${e.message}`)}return!i||typeof i!=`object`?{}:u(i,n)}export{d as loadRenovateConfig};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{accessSync as e,globSync as t,lstatSync as n,readFileSync as r,readdirSync as i,statSync as a,truncateSync as o,writeFileSync as s}from"node:fs";import{basename as c,dirname as l,join as u,relative as d,resolve as f}from"node:path";import{homedir as p}from"node:os";import{cwd as m,env as h,platform as g,stderr as _}from"node:process";import{styleText as v}from"node:util";import{mkdir as y,readFile as b,writeFile as ee}from"node:fs/promises";import{pathToFileURL as x}from"node:url";import{createHash as S}from"node:crypto";function C(e){let t={},n=t,r=e.split(/\r?\n/);for(let e=0;e<r.length;e++){let i=r[e],a=ae(i).trim();if(!a)continue;let o=/^\[\[([^\]]+)\]\]$/.exec(a);if(o){let e=t,r=ie(o[1]);for(let t=0;t<r.length-1;t++){let n=e[r[t]];Array.isArray(n)?e=n[n.length-1]:((!n||typeof n!=`object`)&&(e[r[t]]={}),e=e[r[t]])}let i=r[r.length-1];Array.isArray(e[i])||(e[i]=[]);let a={};e[i].push(a),n=a;continue}let s=/^\[([^[\]]+)\]$/.exec(a);if(s){n=t;for(let e of ie(s[1]))(!(e in n)||typeof n[e]!=`object`||Array.isArray(n[e]))&&(n[e]={}),n=n[e];continue}let c=se(a);if(c<0)continue;let l=a.slice(0,c).trim(),u=a.slice(c+1).trim(),d=ie(l),f=n;for(let e=0;e<d.length-1;e++)(!(d[e]in f)||typeof f[d[e]]!=`object`||Array.isArray(f[d[e]]))&&(f[d[e]]={}),f=f[d[e]];let p=d[d.length-1];if(u.startsWith(`[`)&&E(u,`]`)<0){let t=[];w(u.slice(1),t);for(let n=e+1;n<r.length;n++){let i=ae(r[n]).trim();if(!i)continue;let a=E(i,`]`);if(a>=0){w(i.slice(0,a),t),e=n;break}w(i,t)}f[p]=t}else f[p]=T(u)}return t}function w(e,t){let n=e.trim();if(n)for(let e of re(n)){let n=e.trim();n&&t.push(T(n))}}function T(e){if(e.startsWith(`[`)){let t=[],n=oe(e,`]`);return w(e.slice(1,n<0?e.length:n),t),t}return e.startsWith(`{`)?ne(e):e.startsWith(`"""`)?ce(e.slice(3,e.lastIndexOf(`"""`))):e.startsWith(`'''`)?e.slice(3,e.lastIndexOf(`'''`)):e.startsWith(`"`)?ce(e.slice(1,e.lastIndexOf(`"`))):e.startsWith(`'`)?e.slice(1,e.lastIndexOf(`'`)):te(e)}function te(e){return e===`true`?!0:e===`false`?!1:/^[+-]?\d+(\.\d+)?$/.test(e)?Number(e):e}function ne(e){let t={},n=e.slice(1,e.lastIndexOf(`}`)).trim();if(!n)return t;for(let e of re(n)){let n=e.indexOf(`=`);if(n<0)continue;let r=e.slice(0,n).trim().replace(/^["']|["']$/g,``);t[r]=T(e.slice(n+1).trim())}return t}function re(e){let t=[],n=0,r=null,i=0;for(let a=0;a<e.length;a++){let o=e[a];if(r){if(o===`\\`&&r===`"`){a++;continue}o===r&&(r=null)}else o===`"`||o===`'`?r=o:o===`[`||o===`{`?n++:o===`]`||o===`}`?n--:o===`,`&&n===0&&(t.push(e.slice(i,a)),i=a+1)}return i<e.length&&t.push(e.slice(i)),t}function ie(e){let t=[],n=``,r=null;for(let i of e)if(r){if(i===r){r=null;continue}n+=i}else i===`"`||i===`'`?r=i:i===`.`?(t.push(n.trim()),n=``):n+=i;return n.trim()&&t.push(n.trim()),t}function ae(e){let t=E(e,`#`);return t<0?e:e.slice(0,t)}function E(e,t){let n=null;for(let r=0;r<e.length;r++){let i=e[r];if(n){if(i===`\\`&&n===`"`){r++;continue}i===n&&(n=null)}else if(i===`"`||i===`'`)n=i;else if(i===t)return r}return-1}function oe(e,t){let n=-1,r=null;for(let i=0;i<e.length;i++){let a=e[i];if(r){if(a===`\\`&&r===`"`){i++;continue}a===r&&(r=null)}else a===`"`||a===`'`?r=a:a===t&&(n=i)}return n}function se(e){let t=null;for(let n=0;n<e.length;n++){let r=e[n];if(t){if(r===`\\`&&t===`"`){n++;continue}r===t&&(t=null)}else if(r===`"`||r===`'`)t=r;else if(r===`=`)return n}return-1}function ce(e){return e.replace(/\\(["\\bfnrt]|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/g,(e,t)=>{switch(t[0]){case`"`:return`"`;case`\\`:return`\\`;case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
|
|
2
|
+
`;case`r`:return`\r`;case`t`:return` `;case`u`:case`U`:return String.fromCodePoint(Number.parseInt(t.slice(1),16));default:return t}})}const le=/^v?(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*))?(?:\+[a-zA-Z0-9._-]+)?$/,ue=new Map;function D(e){if(typeof e!=`string`)return null;let t=ue.get(e);if(t!==void 0)return t;let n=le.exec(e.trim());if(!n)return ue.set(e,null),null;let r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=n[4]?n[4].split(`.`).map(e=>/^\d+$/.test(e)?Number(e):e):[],s={major:r,minor:i,patch:a,prerelease:o,version:`${r}.${i}.${a}${o.length?`-${o.join(`.`)}`:``}`};return ue.set(e,s),s}function O(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?e-t:n?-1:r?1:e<t?-1:+(e>t)}function k(e,t){return e.major-t.major||e.minor-t.minor||e.patch-t.patch}function A(e,t){let n=k(e,t);if(n!==0)return n;if(!e.prerelease.length&&!t.prerelease.length)return 0;if(e.prerelease.length&&!t.prerelease.length)return-1;if(!e.prerelease.length&&t.prerelease.length)return 1;let r=Math.max(e.prerelease.length,t.prerelease.length);for(let n=0;n<r;n++){if(e.prerelease[n]===void 0)return-1;if(t.prerelease[n]===void 0)return 1;let r=O(e.prerelease[n],t.prerelease[n]);if(r!==0)return r}return 0}function j(e){return D(e)?.version??null}function M(e){return D(e)}const N=new Map,P=/(?:^|[^.\d])(\d+)(?:\.(\d+))?(?:\.(\d+))?/;function F(e){if(typeof e!=`string`)return null;let t=N.get(e);if(t!==void 0)return t;let n=P.exec(e);if(!n)return N.set(e,null),null;let r={version:`${n[1]||`0`}.${n[2]||`0`}.${n[3]||`0`}`};return N.set(e,r),r}function I(e,t){let n=D(e),r=D(t);if(!n||!r||n.version===r.version)return null;let i=A(n,r),a=i>0?n:r,o=i>0?r:n,s=a.prerelease.length>0;if(o.prerelease.length>0&&!s){if(!o.patch&&!o.minor)return`major`;if(k(o,a)===0)return o.minor&&!o.patch?`minor`:`patch`}let c=s?`pre`:``;return n.major===r.major?n.minor===r.minor?n.patch===r.patch?`prerelease`:`${c}patch`:`${c}minor`:`${c}major`}function L(e,t){let n=D(e),r=D(t);return n&&r?A(n,r):null}function de(e,t){return(L(e,t)??-1)>0}function R(e,t){return(L(e,t)??-1)>=0}function fe(e,t){return(L(e,t)??1)<0}function z(e,t){return(L(e,t)??1)!==0}function pe(e){let t=/^(>=|<=|>|<|=)?\s*v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*)?)$/.exec(e.trim());if(!t)return null;let n=t[2],r=D(`${n}.${t[3]??`0`}.${t[4]??`0`}${t[5]||``}`);return r?{op:t[1]||`=`,semver:r}:null}function me(e,t){let n=A(e,t.semver);switch(t.op){case`>=`:return n>=0;case`<=`:return n<=0;case`>`:return n>0;case`<`:return n<0;case`=`:return n===0;default:return n===0}}function B(e,t,n){return`${e}.${t}.${n}-0`}function he(e){return e.replace(/~\s*v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9._-]+)?)/g,(e,t,n,r,i)=>{let a=Number(t);if(n===void 0)return`>=${a}.0.0 <${B(a+1,0,0)}`;let o=Number(n);return`>=${a}.${o}.${r===void 0?0:Number(r)}${i||``} <${B(a,o+1,0)}`})}function ge(e){return e.replace(/\^\s*v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9._-]+)?)/g,(e,t,n,r,i)=>{let a=Number(t),o=i||``;if(n===void 0)return`>=${a}.0.0 <${B(a+1,0,0)}`;let s=Number(n);if(r===void 0)return a===0?`>=${a}.${s}.0 <${B(a,s+1,0)}`:`>=${a}.${s}.0 <${B(a+1,0,0)}`;let c=Number(r);return a===0?s===0?`>=${a}.${s}.${c}${o} <${B(a,s,c+1)}`:`>=${a}.${s}.${c}${o} <${B(a,s+1,0)}`:`>=${a}.${s}.${c}${o} <${B(a+1,0,0)}`})}function _e(e){return e.replace(/v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9._-]+)?)\s+-\s+v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9._-]+)?)/g,(e,t,n,r,i,a,o,s,c)=>{let l=Number(t),u=n===void 0?0:Number(n),d=r===void 0?0:Number(r),f=i||``,p=Number(a),m;return m=s===void 0?o===void 0?`<${B(p+1,0,0)}`:`<${B(p,Number(o)+1,0)}`:`<=${p}.${Number(o)}.${Number(s)}${c||``}`,`>=${l}.${u}.${d}${f} ${m}`})}function V(e){return/^\s*[*xX]\s*$/.test(e)?`>=0.0.0`:(e=e.replace(/v?(\d+)\.[xX*](?:\.[xX*])?/g,(e,t)=>{let n=Number(t);return`>=${n}.0.0 <${B(n+1,0,0)}`}),e=e.replace(/v?(\d+)\.(\d+)\.[xX*]/g,(e,t,n)=>{let r=Number(t),i=Number(n);return`>=${r}.${i}.0 <${B(r,i+1,0)}`}),e=e.replace(/(^|[\s|])(\d+)\.(\d+)(?=\s|$)/g,(t,n,r,i,a)=>{let o=e.substring(0,a).trimEnd();if(/[<>=]$/.test(o))return t;let s=Number(r),c=Number(i);return`${n}>=${s}.${c}.0 <${B(s,c+1,0)}`}),e=e.replace(/(^|[\s|])(\d+)(?=\s|$)/g,(t,n,r,i)=>{let a=e.substring(0,i).trimEnd();if(/[<>=]$/.test(a))return t;let o=Number(r);return`${n}>=${o}.0.0 <${B(o+1,0,0)}`}),e)}const H=new Map;function ve(e){let t=H.get(e);if(t!==void 0)return t;let n=e.split(`||`).map(e=>e.trim()),r=[];for(let t of n){if(!t){r.push([]);continue}t=_e(t),t=ge(t),t=he(t),t=V(t),t=t.replace(/(^|[\s])v?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*)?)\b/g,(e,t)=>/[<>=]/.test(t)?e:`${t}=${e.trim()}`),t=t.replace(/(>=|<=|>|<|=)\s+/g,`$1`);let n=t.split(/\s+/).filter(Boolean),i=[];for(let t of n){let n=pe(t);if(!n)return H.set(e,null),null;i.push(n)}if(i.length===0)return H.set(e,null),null;r.push(i)}let i=r.length?r:null;return H.set(e,i),i}function ye(e,t){for(let n of t)if(!me(e,n))return!1;if(e.prerelease.length>0){for(let n of t)if(n.semver.prerelease.length>0&&n.semver.major===e.major&&n.semver.minor===e.minor&&n.semver.patch===e.patch)return!0;return!1}return!0}function U(e,t){let n=D(e);if(!n)return!1;let r=ve(t);if(!r)return!1;for(let e of r)if(e.length===0||ye(n,e))return!0;return!1}function be(e){return typeof e==`string`&&ve(e)?e:null}const xe=[[1e3,6e4,`sec`],[6e4,36e5,`min`],[36e5,864e5,`hour`],[864e5,6048e5,`day`],[6048e5,2628e6,`week`],[2628e6,31536e6,`month`],[31536e6,1/0,`year`]],Se={"1 day ago":`yesterday`,"1 week ago":`last week`,"1 month ago":`last month`,"1 year ago":`last year`,"in 1 day":`tomorrow`,"in 1 week":`next week`,"in 1 month":`next month`,"in 1 year":`next year`},Ce={sec:`second`,min:`minute`};function we(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function Te(e,{now:t,noAffix:n=!1,times:r=xe,nowThreshold:i=2e3,nowString:a=`now`,unknownString:o=``,aliases:s=!1,aliasesMap:c=Se,longUnits:l=!1}={}){let u=we(e),d=t===void 0?Date.now():we(t);if(u!==u)return o||String(e);let f=d-u,p=f<0;if(p&&(f=-f),f<i)return a;let m=0,h=``;for(let e=0,t=r.length;e<t;e++){let t=r[e];if(!(f>=t[1])){m=f/t[0]|0,h=(l&&Ce[t[2]]||t[2])+(m>1?`s`:``);break}}let g=`${m} ${h}`,_;return _=n?g:p?`in ${g}`:`${g} ago`,s?c[_]??_:_}function Ee(e){let t=[];for(let n of e){let[e,r]=n.replaceAll(/\s+/g,``).split(/[<>=~]+/),i=e?.replace(/\[.*?\]$/,``);i&&/^[0-9.a-z]+$/.test(r)&&t.push({name:i,version:r})}return t}const De=[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`,`resolutions`,`packageManager`],Oe=[`node`,`deno`,`bun`],ke=[`project.dependencies`,`project.optional-dependencies`,`dependency-groups.dev`,`dependency-groups.lint`,`dependency-groups.test`],Ae=[`deps`,`indirect`,`replace`,`tool`],je=[`dependencies`,`dev-dependencies`,`build-dependencies`,`workspace.dependencies`];function W(e,t){for(let n of t instanceof Set?t:[])if(n.test(e))return!0;return!1}function Me(e,t){return t.split(`.`).reduce((e,t)=>e?.[t]??null,e)}function Ne(){let e=new Date;return[e.getFullYear(),`-`,String(e.getMonth()+1).padStart(2,`0`),`-`,String(e.getDate()).padStart(2,`0`),` `,String(e.getHours()).padStart(2,`0`),`:`,String(e.getMinutes()).padStart(2,`0`),`:`,String(e.getSeconds()).padStart(2,`0`),`.`,String(e.getMilliseconds()).padStart(3,`0`)].join(``)}const Pe={y:365,m:30,w:7,d:1,h:1/24,s:1/86400};function Fe(e){let t=/^(\d+(?:\.\d+)?)\s*([a-z])$/i.exec(e);if(t){let[,e,n]=t,r=Pe[n.toLowerCase()];if(r)return Number(e)*r}let n=Number(e);if(!Number.isFinite(n))throw Error(`Invalid cooldown value: ${e}`);return n}async function G(e,t,{concurrency:n=1/0}={}){let r=Array.from(e);if(!Number.isFinite(n))return Promise.all(r.map(t));let i=Array(r.length),a=0;return await Promise.all(Array.from({length:Math.min(n,r.length)},async()=>{for(;a<r.length;){let e=a++;i[e]=await t(r[e])}})),i}const K=e=>e.replace(/[|\\{}()[\]^$+*?.-]/g,`\\$&`),Ie=u(g===`win32`?h.LOCALAPPDATA||u(p(),`AppData`,`Local`):h.XDG_CACHE_HOME||u(p(),`.cache`),`updates`);let Le=null;function Re(e){return S(`sha256`).update(e).digest(`hex`).substring(0,16)}async function ze(e){try{let t=await b(u(Ie,`${Re(e)}.cache`),`utf8`),n=t.indexOf(`
|
|
3
|
+
`);if(n===-1)return null;let r=t.substring(0,n),i=t.substring(n+1);return r&&i?{etag:r,body:i}:null}catch{return null}}async function Be(e,t,n){try{await(Le??=y(Ie,{recursive:!0})),await ee(u(Ie,`${Re(e)}.cache`),`${t}\n${n}`)}catch{}}var Ve=`17.16.6`;function He(e,t,n){if(!t||!n||!e)return!0;let r=Date.parse(e);return Number.isNaN(r)?!0:(n-r)/(24*3600*1e3)>=t}const Ue=Ve,q=e=>e.replace(/^v/,``),We=e=>e.endsWith(`/`)?e.slice(0,-1):e;function Ge(e,t){return{headers:{"user-agent":`updates/${Ue}`,"accept-encoding":`gzip, deflate, br`,...t&&{Authorization:`${e} ${t}`}}}}async function Ke(e,t){try{return await fetch(e,t)}catch(t){throw Error(`Failed to fetch ${e}${t?.message?`: ${t.message}`:``}`)}}async function qe(e){return typeof e.text==`function`?e.text():JSON.stringify(await e.json())}async function Je(e,t,n={}){let r=t.noCache?null:await ze(e),i=n.headers,a=r?{...i,"if-none-match":r.etag}:i,o=await t.doFetch(e,{...n,headers:a,signal:AbortSignal.timeout(t.fetchTimeout)});if(!o)return{res:void 0};if(o.status===304&&r)return{body:r.body,res:o};if(!o.ok)return{res:o};let s=await qe(o),c=o.headers?.get?.(`etag`);return c&&!t.noCache&&await Be(e,c,s),{body:s,res:o}}async function Ye(e,t,n={}){if(!t.noCache){let t=await ze(e);if(t)return{body:t.body}}let r=await t.doFetch(e,{...n,signal:AbortSignal.timeout(t.fetchTimeout)});if(!r)return{res:void 0};if(!r.ok)return{res:r};let i=await qe(r);return t.noCache||await Be(e,`immutable`,i),{body:i,res:r}}function Xe(e){return(M(e)?.prerelease.length??0)>0}function Ze(e){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(e)}function Qe(e,t,{useRel:n,allowDowngrade:r,name:i,matchesAny:a}){let o=J(e),s=J(t);if(!o||!s)return!0;let c=Ze(e)||Xe(e),l=Xe(t);return c&&!l?de(s,o)||n:!l&&fe(s,o)?r===!0||a(i,r):!0}function J(e){return F(e)?.version??``}function $e(e,t,{range:n,semvers:r,usePre:i,useRel:a,useGreatest:o,pinnedRange:s,cooldownDays:c,now:l,getVersionDate:u}){let d=J(n);if(!d)return d;i=Ze(n)||i,i&&(r.add(`prerelease`),r.has(`patch`)&&r.add(`prepatch`),r.has(`minor`)&&r.add(`preminor`),r.has(`major`)&&r.add(`premajor`));let f=u??(t=>e?.time?.[t]),p=0,m=d;for(let n of t){let t=M(n);if(!t?.version||t.prerelease.length&&(!i||a))continue;let u=t.version;if(s&&!U(u,s)||!He(f(n),c,l))continue;let d=I(m,u);if(!(!d||!r.has(d)))if(o||!(`time`in e))(R(J(u),m)||s&&!U(m,s))&&(m=u);else{let t=Date.parse(e.time[n]);t>=0&&t>p&&(m=u,p=t)}}return m||null}function et(e,{mode:t,range:n,useGreatest:r,useRel:i,usePre:a,semvers:o,pinnedRange:s,cooldownDays:c,now:l},{allowDowngrade:u,matchesAny:d,isGoPseudoVersion:f}){if(n===`*`||n.includes(`||`))return null;let p=[],m;if(t===`pypi`)p=Object.keys(e.releases).filter(e=>j(e)),m=t=>e.releases?.[t]?.[0]?.upload_time_iso_8601;else if(t===`npm`||t===`cargo`)p=Object.keys(e.versions).filter(e=>j(e)),m=t=>e.time?.[t];else if(t===`go`){let t=J(n);if(!t)return null;let r=a||Ze(n),p=e=>Xe(e)&&(!r||i),m={useRel:i,allowDowngrade:u,name:e.name,matchesAny:d},h=e.old||n,g=J(e.new);if(g&&!f(e.new)&&!p(e.new)){let n=I(t,g);if(n&&o.has(n)&&Qe(h,e.new,m)&&He(e.Time,c,l)&&(!s||U(g,s)))return e.new}let _=J(e.sameMajorNew);if(_&&!f(e.sameMajorNew)&&!p(e.sameMajorNew)){let n=I(t,_);if(n&&o.has(n)&&Qe(h,e.sameMajorNew,m)&&He(e.sameMajorTime,c,l)&&(!s||U(_,s)))return e.Time=e.sameMajorTime,delete e.newPath,e.sameMajorNew}if(c&&l&&e.olderEligible&&!p(e.olderEligible.version)){let n=J(e.olderEligible.version);if(n){let r=I(t,n);if(r&&o.has(r)&&Qe(h,e.olderEligible.version,m)&&(!s||U(n,s)))return e.Time=e.olderEligible.time,delete e.newPath,e.olderEligible.version}}return null}let h=$e(e,p,{range:n,semvers:o,usePre:a,useRel:i,useGreatest:r,pinnedRange:s,cooldownDays:c,now:l,getVersionDate:m});if(!h)return null;if(r)return h;{let r=``,f=``;t===`pypi`?(f=e.info.version,r=J(e.info.version)):r=e[`dist-tags`].latest;let p=J(n),m=Ze(n),g=Xe(h),_=Xe(r),v={useRel:i,allowDowngrade:u,name:e.name,matchesAny:d};if(!i&&a||m&&g)return h;if(m&&!g)return Qe(n,h,v)?h:null;let y=I(p,r);return y&&y!==`prerelease`&&!o.has(y.replace(/^pre/,``))||i&&Xe(r)?h:fe(r,p)&&!_?Qe(n,r,v)?r:null:!m&&_&&!a||s&&!U(r,s)||c&&l&&!He(t===`pypi`?e.releases?.[f||r]?.[0]?.upload_time_iso_8601:e.time?.[f||r]??e.time?.[r],c,l)?h:f||r}}const tt=new Map;if(h.UPDATES_FORGE_TOKENS)for(let e of h.UPDATES_FORGE_TOKENS.split(`,`)){let t=e.indexOf(`:`);t>0&&tt.set(e.substring(0,t),e.substring(t+1))}const nt=Array.from(new Set([`UPDATES_GITHUB_API_TOKEN`,`GITHUB_API_TOKEN`,`GH_TOKEN`,`GITHUB_TOKEN`,`HOMEBREW_GITHUB_API_TOKEN`].map(e=>h[e]).filter(Boolean)));let rt;function it(){return nt.length?Promise.resolve(nt):rt??=(async()=>{try{let[{execFile:e},{promisify:t}]=await Promise.all([import(`node:child_process`),import(`node:util`)]),{stdout:n}=await t(e)(`gh`,[`auth`,`token`],{encoding:`utf8`,timeout:5e3}),r=n.trim();return r?[r]:nt}catch{return nt}})()}const at=new Map;async function ot(e){try{let t=tt.get(new URL(e).hostname);if(t)return[t]}catch{}return it()}async function st(e,t,n){let r;try{r=new URL(e).hostname}catch{r=``}let i=await(r?ot(e):it()),a=AbortSignal.timeout(t.fetchTimeout),o=e=>{let t=Ge(`Bearer`,e);return n&&(t.headers={...t.headers,...n}),t.signal=a,t};if(!i.length)return t.doFetch(e,o());let s=r?at.get(r):void 0;if(s)return t.doFetch(e,o(s));for(let n of i){let i=await t.doFetch(e,o(n));if(i.status!==401&&i.status!==403)return r&&at.set(r,n),i}return t.doFetch(e,o())}function ct(e,t,n){let r=q(t);if(!j(r))return null;if(n){let n=t,i=q(t);for(let t of e){let e=q(t);j(e)&&(!n||de(e,i))&&(n=t,i=e)}if(z(r,i))return n}else{let t=e.at(-1);if(!t)return null;let n=q(t);if(!j(n))return null;if(z(r,n))return t}return null}function lt(e){return e=e.replace(`git@`,``).replace(/.+?\/\//,`https://`).replace(/\.git$/,``),/^[a-z]+:[a-z0-9-]\/[a-z0-9-]$/.test(e)?e.replace(/^(.+?):/,(e,t)=>`https://${t}.com/`):/^[a-z0-9-]\/[a-z0-9-]$/.test(e)?`https://github.com/${e}`:e}const ut=/^[0-9a-f]{7,}$/i;function dt(e){return e.map(e=>({name:e.name,commitSha:e.commit?.sha||``}))}async function ft(e,t){let n=t.noCache?null:await ze(e),r=await st(e,t,n?{"if-none-match":n.etag}:void 0);if(r?.status===304&&n)try{let e=JSON.parse(n.body);return{tags:e.tags||[],link:e.link||``}}catch{return null}if(!r?.ok)return null;let i=dt(await r.json()),a=r.headers.get(`link`)||``,o=r.headers.get(`etag`);return o&&!t.noCache&&await Be(e,o,JSON.stringify({link:a,tags:i})),{tags:i,link:a}}async function pt(e,t,n,r){let i=r=>`${e}/repos/${t}/${n}/tags?per_page=100&page=${r}`;try{let e=await ft(i(1),r);if(!e)return[];let t=Array.from(e.tags),n=/<([^>]+)>;\s*rel="last"/.exec(e.link);if(!n)return t;let a=Number(new URL(n[1]).searchParams.get(`page`));if(a<2)return t;let o=await Promise.all(Array.from({length:a-1},(e,t)=>ft(i(t+2),r)));for(let e of o)e&&t.push(...e.tags);return t}catch{return[]}}function mt(e,t,n,r){throw e?.status&&e?.statusText?Error(`Received ${e.status} ${e.statusText} from ${t}`):Error(`Unable to fetch ${n} from ${r}`)}function ht(e,t,n=``){let r=t.startsWith(`v`),i=q(e),a=q(t).split(`.`).length,o=i.split(`.`),s;return s=a===1?o[0]:a===2?`${o[0]}.${o[1]||`0`}`:i,`${r?`v`:``}${s}${n}`}function gt(e){return e.startsWith(`https://bitbucket.org`)?`src/HEAD`:`tree/HEAD`}function _t({repository:e,homepage:t,info:n},r,i){if(n){let t=n.project_urls;for(let n of[`repository`,`Repository`,`repo`,`Repo`,`source`,`Source`,`source code`,`Source code`,`Source Code`,`homepage`,`Homepage`])if(t[n]){e=t[n];break}e??=`https://pypi.org/project/${i}/`}let a=``;return r===`https://npm.pkg.github.com`?`https://github.com/${i.replace(/^@/,``)}`:(e&&(a=lt(typeof e==`string`?e:e.url),a&&typeof e!=`string`&&e.directory&&(a=`${a}/${gt(a)}/${e.directory}`)),a||t||``)}function vt(e,t){return RegExp(`^${K(e).replaceAll(`\\*`,`.*`)}$`,t?`i`:``)}function yt(e,t,n){return t&&typeof e==`string`?/^\/.+\/$/.test(e)?new RegExp(e.slice(1,-1)):vt(e,n):e instanceof RegExp?e:vt(e,n)}function bt(e){return new Set(e.map(e=>yt(e,!1,!0)))}function xt(e){if(typeof e==`boolean`)return e;if(!Array.isArray(e)||!e.length)return!1;let t=new Set;for(let n of e)t.add(yt(n,!1,!1));return t}async function St(t){let n=[];for(let e of[`js`,`ts`,`mjs`,`mts`])n.push(`updates.config.${e}`);let r={};try{({default:r}=await Promise.any(n.map(async n=>{let r=u(t,...n.split(`/`)),i=x(r);try{e(r)}catch{throw Error(`File not found: ${n}`)}try{return await import(i.href)}catch(e){throw Error(`Unable to parse config file ${n}: ${e.message}`)}})))}catch(e){if(e instanceof AggregateError){let t=e.errors.filter(e=>e.message.startsWith(`Unable to parse`));if(t.length>0)throw t[0]}}let{loadRenovateConfig:i}=await import(`./renovate-DecR7mby.js`);return{...await i(t,r.inherit?.renovate),...r}}function Ct(e){if(/^\s*\{/.test(e))return JSON.parse(e);let t={};for(let n of e.split(/\r?\n/)){let e=n.trim();if(!e||e.startsWith(`#`)||e.startsWith(`;`))continue;let r=e.indexOf(`=`);if(r===-1)continue;let i=e.slice(r+1).trim();i.length>=2&&(i.startsWith(`"`)&&i.endsWith(`"`)||i.startsWith(`'`)&&i.endsWith(`'`))&&(i=i.slice(1,-1)),t[e.slice(0,r).trim()]=i}return t}function wt(e){try{return Ct(r(e,`utf-8`))}catch{return}}function Tt(e){let t=m();for(;;){let n=u(t,e);try{return a(n),n}catch{}let r=l(t);if(r===t)break;t=r}}function Et(e){let t={},n=e.toLowerCase();for(let[r,i]of Object.entries(h))if(r.toLowerCase().startsWith(n)){let n=r.substring(e.length).split(`__`).filter(Boolean);if(n.length===0)continue;let a=t;for(let e=0;e<n.length;e++){let t=n[e];if(e===n.length-1)a[t]=i;else if(a[t]===void 0&&(a[t]={}),typeof a[t]==`object`)a=a[t];else break}}return t}function Dt(e,t={}){let n=g===`win32`,r=n?h.USERPROFILE:h.HOME,i=[{...t}],a=[];function o(e){if(!e||a.includes(e))return;let t=wt(e);t&&(i.push(t),a.push(e))}n||(o(u(`/etc`,e,`config`)),o(u(`/etc`,`${e}rc`))),r&&(o(u(r,`.config`,e,`config`)),o(u(r,`.config`,e)),o(u(r,`.${e}`,`config`)),o(u(r,`.${e}rc`))),o(Tt(`.${e}rc`));let s=Et(`${e}_`);return s.config&&o(s.config),Object.assign({},...i,s,a.length?{configs:a,config:a[a.length-1]}:void 0)}const Ot=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,kt=/^([^/]+)\/([^/]+)\/(?:.*\/)?([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,At=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,jt=/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,Mt=`https://registry.npmjs.org`;let Y=null;const Nt=new Map;function Pt(){return Y??=Dt(`npm`,{registry:Mt})}function Ft(e){return e.replace(/^\$\{?([^}]*)\}?$/,(e,t)=>h[t]||``)}function It(e,t){let n=n=>t[`${e}:${n}`]||t[`${e}/:${n}`],r=n(`_authToken`);if(r)return{token:Ft(r),type:`Bearer`};let i=n(`username`),a=n(`_password`);if(i&&a){let e=Buffer.from(Ft(a),`base64`).toString(`utf8`);return{token:Buffer.from(`${i}:${e}`).toString(`base64`),type:`Basic`,username:i,password:e}}let o=n(`_auth`);if(o)return{token:Ft(o),type:`Basic`}}function Lt(e,t){let n=new URL(e.startsWith(`//`)?`http:${e}`:e),r;for(;r!==`/`&&n.pathname!==r;){r=n.pathname||`/`;let e=It(`//${n.host}${r.replace(/\/$/,``)}`,t);if(e)return e;let i=r.endsWith(`/`)?r:`${r}/`;n.pathname=new URL(`..`,new URL(i,`http://x`)).pathname}let i=t._auth;if(i)return{token:Ft(i),type:`Basic`}}function Rt(e,t){let n=t[`${e}:registry`]||t.registry;return n.endsWith(`/`)?n:`${n}/`}function zt(e,t){Y||=Pt();let n=e.startsWith(`@`)?(/@[a-z0-9][\w.-]+/.exec(e)||[``])[0]:``,r=`${n}:${t}`,i=Nt.get(r);if(i)return i;let a=()=>({auth:Lt(t,Y),registry:t}),o;if(!e.startsWith(`@`))o=a();else{let e=We(Rt(n,Y));if(e!==t)try{let t=Lt(e,Y);o=t?.token?{auth:t,registry:e}:a()}catch{o=a()}else o=a()}return Nt.set(r,o),o}function Bt(e,t,n){Y||=Pt();let r=We((typeof n.registry==`string`?n.registry:!1)||t.registry||Y.registry||Mt);return{...zt(e,r),originalRegistry:r}}function Vt(e,t,n){let r=`${e}/${t.replace(/\//g,`%2f`)}`;return n?`${r}/${n}`:r}const Ht=new Map,Ut=new Map,Wt=new Map;async function Gt(e,t,n,r,i){let{auth:a,registry:o}=Bt(e,n,r),s=Vt(o,t===`resolutions`?c(e):e),l=Ht.get(s);if(!l){let t=Ge(a?.type,a?.token),n={...t.headers,accept:`application/vnd.npm.install-v1+json`};t.headers=n,l=(async()=>{let r=i.noCache?null:await ze(s);r&&(n[`if-none-match`]=r.etag);let a=await i.doFetch(s,{signal:AbortSignal.timeout(i.fetchTimeout),...t});if(a?.status===304&&r)return JSON.parse(r.body);if(a?.ok){let e=await a.text(),t=a.headers.get(`etag`);return t&&!i.noCache&&await Be(s,t,e),JSON.parse(e)}mt(a,s,e,o)})().catch(e=>{throw Ht.delete(s),e}),Ht.set(s,l)}return[await l,t,o,e]}async function Kt(e,t,n,r,i){let{auth:a,registry:o}=Bt(e,n,r),s=Vt(o,e,t),c=Ut.get(s);if(c)return c;let l=(async()=>{try{let n=Ge(a?.type,a?.token),r=await Ye(s,i,n);if(!(`body`in r))return{};let c=JSON.parse(r.body),l=``,u=c?._npmOperationalInternal?.tmp;if(u){let e=/(\d{13})/.exec(u);e&&(l=new Date(Number(e[1])).toISOString())}if(!l){let r=Vt(o,e),a=Wt.get(r);a||(a=i.doFetch(r,{...n,signal:AbortSignal.timeout(i.fetchTimeout)}).then(e=>e?.ok?e.json():null).catch(()=>(Wt.delete(r),null)),Wt.set(r,a)),l=(await a)?.time?.[t]||``}return{repository:c.repository,homepage:c.homepage,date:l}}catch{return{}}})();return Ut.set(s,l),l}function qt(e){return e.startsWith(`npm:@jsr/`)||e.startsWith(`jsr:`)}function Jt(e){return e.startsWith(`link:`)||e.startsWith(`file:`)}function Yt(e,t){if(e.startsWith(`npm:@jsr/`)){let t=/^npm:@jsr\/([^_]+)__([^@]+)@(.+)$/.exec(e);if(t)return{scope:t[1],name:t[2],version:t[3]}}else if(e.startsWith(`jsr:@`)){let t=/^jsr:@([^/]+)\/([^@]+)@(.+)$/.exec(e);if(t)return{scope:t[1],name:t[2],version:t[3]}}else if(e.startsWith(`jsr:`)){let n=e.substring(4);if(t?.startsWith(`@`)){let e=/^@([^/]+)\/(.+)$/.exec(t);if(e)return{scope:e[1],name:e[2],version:n}}}return{scope:null,name:null,version:``}}async function Xt(e,t,n){let r=/^@([^/]+)\/(.+)$/.exec(e);if(!r)throw Error(`Invalid JSR package name: ${e}`);let[,i,a]=r,o=`${n.jsrApiUrl}/@${i}/${a}/meta.json`,s=await Je(o,n,{headers:{"accept-encoding":`gzip, deflate, br`}});if(`body`in s){let r=JSON.parse(s.body),i={},a={};for(let[e,t]of Object.entries(r.versions))i[e]={version:e,time:t.createdAt},a[e]=t.createdAt;return[{name:e,"dist-tags":{latest:r.latest},versions:i,time:a},t,n.jsrApiUrl,e]}mt(s.res,o,e,`JSR`)}function Zt(e,t){let n=new Map;for(let[e,{old:r,oldOrig:i,new:a}]of Object.entries(t)){let[t,o]=e.split(`\0`),s=i||r;t===`packageManager`?n.set(`${t}\0${o}@${s}`,`"${t}": "${o}@${a}"`):n.set(`${o}\0${s}`,`"${o}": "${a}"`)}return n.size?e.replace(/"((?:[^"\\]|\\.)*)": *"((?:[^"\\]|\\.)*)"/g,(e,t,r)=>n.get(`${t}\0${r}`)??e):e}function Qt(e,t,n){let r=e.replace(jt,t);if(n&&n!==e&&/^[\^~]/.test(r)){let e=n.substring(1).split(`.`),t=r.substring(1).split(`.`);e.length!==t.length&&(r=`${r[0]}${t.slice(0,e.length).join(`.`)}`)}if(n&&n!==e&&r.startsWith(`>=`)){let e=/^>=\s/.test(n)?`>= `:`>=`,t=n.replace(/^>=\s*/,``),i=r.replace(/^>=\s*/,``),a=t.split(`.`),o=i.split(`.`);a.length!==o.length&&(r=`${e}${o.slice(0,a.length).join(`.`)}`)}return r}function X(e){let t=e.match(At);return t?.length===1?e.replace(At,J(t[0])):e}async function $t(e,t,n){let r=`${n.forgeApiUrl}/repos/${e}/${t}/commits`;try{let e=n.noCache?null:await ze(r),t=await st(r,n,e?{"if-none-match":e.etag}:void 0);if(t?.status===304&&e){let{sha:t,commit:n}=JSON.parse(e.body)[0];return{hash:t,commit:n}}if(!t?.ok)return{hash:``,commit:{}};let i=await t.text(),a=t.headers.get(`etag`);a&&!n.noCache&&await Be(r,a,i);let{sha:o,commit:s}=JSON.parse(i)[0];return{hash:o,commit:s}}catch{return{hash:``,commit:{}}}}async function en(e,t,n){return(await pt(n.forgeApiUrl,e,t,n)).map(e=>e.name)}async function tn(e,t,n,r){let i=t.old.replace(Ot,``),[a,o,s,c]=kt.exec(i)||[];if(!o||!s||!c)return null;if(ut.test(c)){let{hash:n,commit:i}=await $t(o,s,r);if(!n)return null;let a=i?.committer?.date??i?.author?.date,l=n.substring(0,c.length);if(c!==l)return{key:e,newRange:t.old.replace(c,l),user:o,repo:s,oldRef:c,newRef:l,newDate:a}}else{let t=ct(await en(o,s,r),c,n);if(t)return{key:e,newRange:t,user:o,repo:s,oldRef:c,newRef:t}}return null}async function nn(e,t,n){let r=`${n.pypiApiUrl}/pypi/${e}/json`,i=await Je(r,n,{headers:{"accept-encoding":`gzip, deflate, br`}});if(`body`in i)return[JSON.parse(i.body),t,null,e];mt(i.res,r,e,n.pypiApiUrl)}function rn(e,t){let n=e;for(let[e,{old:r,oldOrig:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r;n=n.replace(RegExp(`("${K(o)} *[<>=~]+ *)${K(s)}(")`,`g`),(n,r,i)=>`${r}${t[e].new}${i}`)}return n}let an;async function on(){let[{execFile:e},{promisify:t}]=await Promise.all([import(`node:child_process`),import(`node:util`)]);return t(e)}function sn(){return an??=on()}function cn(){let e=h.GOPROXY||`https://proxy.golang.org,direct`;for(let t of e.split(/[,|]/)){let e=t.trim();if(e&&e!==`direct`&&e!==`off`)return We(e)}return`https://proxy.golang.org`}function ln(){return(h.GONOPROXY||h.GOPRIVATE||``).split(`,`).map(e=>e.trim()).filter(Boolean)}function un(e,t){return t.some(t=>e===t||e.startsWith(`${t}/`))}function dn(e){return e.replace(/[A-Z]/g,e=>`!${e.toLowerCase()}`)}function fn(e){let t=/\/v(\d+)$/.exec(e);return t?Number.parseInt(t[1]):1}function pn(e,t){return t<=1?e.replace(/\/v\d+$/,``):`${e.replace(/\/v\d+$/,``)}/v${t}`}function mn(e,t){let n=t?/^(\S+)(?:\s+v\S+)?\s+=>\s+(\S+)\s+(v\S+)/.exec(e):/^replace\s+(\S+)(?:\s+v\S+)?\s+=>\s+(\S+)\s+(v\S+)/.exec(e);if(!n)return null;let[,r,i,a]=n;return i.startsWith(`./`)||i.startsWith(`/`)||i.startsWith(`../`)?null:{origModule:r,targetModule:i,targetVersion:a}}function hn(e,t,n){return t===`indirect`||e.startsWith(`golang.org/x/`)||gn(n)}function gn(e){return/\d{14}-[0-9a-f]{12}$/.test(e)}function _n(e,t,n){return[{name:e,old:t,new:t},n,null,e]}async function vn(e,t,n){if(!t)return null;let r=t,i=e+101,a=e+2,o=7;for(;a<=i;){let e=Math.min(a+o-1,i),t=await Promise.all(Array.from({length:e-a+1},(e,t)=>n(a+t))),s=t.indexOf(null),c=s===-1?t:t.slice(0,s);if(c.length&&(r=c.at(-1)),s!==-1)break;a=e+1,o*=2}return r}function yn(e,t,n,r,i,a){let o=r?.Version??i,s=r?.Time??a,c=r?.path??e;return[{name:e,old:n,new:q(o),Time:s,...c===e?{}:{newPath:c},sameMajorNew:q(i),sameMajorTime:a},t,null,e]}function bn(e){let t={},n={},r={},i={},a=new Set,o=[],s=e.split(/\r?\n/),c=!1,l=!1,u=!1;for(let e of s){let i=e.trim();if(/^require\s*\(/.test(i)){c=!0;continue}if(/^replace\s*\(/.test(i)){l=!0;continue}if(/^tool\s*\(/.test(i)){u=!0;continue}if(i===`)`){c=!1,l=!1,u=!1;continue}if(u){i&&!i.startsWith(`//`)&&o.push(i);continue}let s=/^tool\s+(\S+)/.exec(i);if(s){o.push(s[1]);continue}let d=i.includes(`// indirect`);if(l||/^replace\s+/.test(i)){let e=mn(i,l);e&&(r[e.targetModule]=e.targetVersion,a.add(e.origModule));continue}let f=c?/^(\S+)\s+(v\S+)/.exec(i):/^require\s+(\S+)\s+(v\S+)/.exec(i);f&&((d?n:t)[f[1]]=f[2])}for(let e of a)delete t[e],delete n[e];if(o.length){let e=[...Object.keys(n),...Object.keys(t)];for(let r of o){let a=``;for(let t of e)(r===t||r.startsWith(`${t}/`))&&t.length>a.length&&(a=t);let o=a?n[a]?n:t[a]?t:null:null;o&&(i[a]=o[a],delete o[a])}}return{deps:t,indirect:n,replace:r,tool:i}}async function xn(e,t,n,r,i){let a=fn(e),o=async(e,t)=>{try{let{stdout:n}=await(await sn())(`go`,[`list`,`-m`,`-json`,`${e}@latest`],{timeout:t,cwd:r,env:h}),i=JSON.parse(n);return{Version:i.Version,Time:i.Time||``,path:e}}catch{return null}},s=hn(e,t,n),[c,l]=await Promise.all([o(e,i.fetchTimeout),s?null:o(pn(e,a+1),i.goProbeTimeout)]);return c?yn(e,t,n,await vn(a,l,t=>o(pn(e,t),i.goProbeTimeout)),c.Version,c.Time):_n(e,n,t)}async function Sn(e,t,n,r,i,a){if(un(e,a))return xn(e,t,n,r,i);let o=dn(e),s=fn(e),c=async t=>{let n=pn(e,t);return i.doFetch(`${i.goProxyUrl}/${dn(n)}/@latest`,{signal:AbortSignal.timeout(i.goProbeTimeout),headers:{"accept-encoding":`gzip, deflate, br`}}).then(async e=>e.ok?{...await e.json(),path:n}:null).catch(()=>null)},l=hn(e,t,n),[u,d]=await Promise.all([i.doFetch(`${i.goProxyUrl}/${o}/@latest`,{signal:AbortSignal.timeout(i.fetchTimeout),headers:{"accept-encoding":`gzip, deflate, br`}}),l?null:c(s+1)]);if(!u.ok)return _n(e,n,t);let f,p;try{let e=await u.json();f=e.Version,p=e.Time}catch{return _n(e,n,t)}return yn(e,t,n,await vn(s,d,c),f,p)}function Cn(e,t){let n=K(t);return e=e.replace(RegExp(`^replace\\s+${n}(\\s+v\\S+)?\\s+=>\\s+\\S+(\\s+v\\S+)?\\s*\\n`,`gm`),``),e=e.replace(RegExp(`^\\s+${n}(\\s+v\\S+)?\\s+=>\\s+\\S+(\\s+v\\S+)?\\s*\\n`,`gm`),``),e=e.replace(/^replace\s*\(\s*\)\s*\n/gm,``),e}function wn(e,t){let n=e,r={};for(let[e,{old:i,oldOrig:a}]of Object.entries(t)){let[o,s]=e.split(`\0`),c=a||i,l=t[e].new;if(o===`replace`){n=n.replace(RegExp(`(=>\\s+${K(s)}\\s+)v${K(c)}`,`g`),`$1v${l}`);continue}if(o===`indirect`){n=n.replace(RegExp(`(${K(s)}) +v${K(c)}`,`g`),`$1 v${l}`);continue}let u=fn(s),d=Number.parseInt(l.split(`.`)[0]);if(u!==d&&d>1){let e=pn(s,d);n=n.replace(RegExp(`${K(s)} +v${K(c)}`,`g`),`${e} v${l}`),o===`tool`&&(n=n.replace(RegExp(`(^\\s+|^tool\\s+)${K(s)}(/\\S+)?\\s*$`,`gm`),`$1${e}$2`)),r[s]=e}else n=n.replace(RegExp(`(${K(s)}) +v${K(c)}`,`g`),`$1 v${l}`);o!==`tool`&&(n=Cn(n,s))}return[n,r]}function Tn(e,n,i){if(!Object.keys(n).length)return;let a=t(`**/*.go`,{cwd:e});for(let t of a){let a=u(e,t),o=r(a,`utf8`),s=!1;for(let[e,t]of Object.entries(n)){let n=RegExp(`"${K(e)}(/|")`,`g`),r=o.replace(n,`"${t}$1`);r!==o&&(o=r,s=!0)}s&&i(a,o)}}function En(e){let t=[],n={},r=e.split(/\r?\n/),i=!1,a=!1;for(let e of r){let r=e.trim();if(/^use\s*\(/.test(r)){i=!0;continue}if(/^replace\s*\(/.test(r)){a=!0;continue}if(r===`)`){i=!1,a=!1;continue}if(i){let e=/^(\S+)/.exec(r);e&&!r.startsWith(`//`)&&t.push(e[1]);continue}let o=/^use\s+(\S+)/.exec(r);if(o){t.push(o[1]);continue}if(a||/^replace\s+/.test(r)){let e=mn(r,a);e&&(n[e.targetModule]=e.targetVersion);continue}}return{use:t,replace:n}}function Dn(e){let t=`https://${On(e)}`,n=new URL(t),r=n.pathname.split(`/`);if(r.length>3){let[e,i,a,...o]=r;return n.pathname=`/${i}/${a}/${gt(t)}/${o.join(`/`)}`,n.toString()}else return t}function On(e){return/\/v[0-9]$/.test(e)?l(e):e}function kn(e){return e.replace(/(\d{7})\d{7}-[0-9a-f]{12}$/,`$1`)}const An=/^\s*(?:-\s*)?uses:\s*['"]?([^'"#\s]+)['"]?/gm;function jn(e){if(e.startsWith(`docker://`)||e.startsWith(`./`))return null;let t=/^https?:\/\/([^/]+)\/(.+)$/.exec(e),n=t?.[1]??null,r=t?.[2]??e,i=r.indexOf(`@`);if(i===-1)return null;let a=r.substring(0,i),o=r.substring(i+1);if(!o)return null;let s=a.split(`/`);if(s.length<2)return null;let c=n?`${n}/${a}`:a;return{host:n,owner:s[0],repo:s[1],ref:o,name:c,isHash:ut.test(o)}}function Mn(e,t){return e?e===`github.com`?`https://api.github.com`:`https://${e}/api/v1`:t}async function Nn(e,t,n,r,i){let a=`${e}/repos/${t}/${n}/git/commits/${r}`;if(!i.noCache){let e=await ze(a);if(e)return e.body}try{let e=await st(a,i);if(!e?.ok)return``;let t=await e.json(),n=t?.committer?.date||t?.author?.date||``;return n&&!i.noCache&&await Be(a,`immutable`,n),n}catch{return``}}function Pn(e,t){return ht(M(q(e))?.version??q(e),t)}function Fn(e,t){let n=e;for(let{name:e,oldRef:r,newRef:i}of t){let t=RegExp(`(uses:\\s*['"]?)${K(e)}@${K(r)}`,`g`);n=n.replace(t,`$1${e}@${i}`)}return n}function In(e){let t=e.replace(/\\/g,`/`);return/\.github\/workflows\/[^/]+\.(ya?ml)$/.test(t)}function Ln(e){try{return i(e).filter(e=>/\.(ya?ml)$/.test(e)).map(t=>f(u(e,t)))}catch{return[]}}const Rn=/^(v?\d+(?:\.\d+){0,2})(-.+)?$/,zn=/^\s*FROM\s+(?:--platform=\S+\s+)?(\S+)/gm,Bn=/^\s*image:\s*['"]?([^\s'"#]+)['"]?/gm,Vn=/^\s*container:\s*['"]?([^\s'"#{}]+:[^\s'"#{}:]+)['"]?\s*$/gm,Hn=/^\s*(?:-\s*)?uses:\s*['"]?docker:\/\/([^'"#\s]+)['"]?/gm;function Un(e){let t=e.split(`/`);return t.length===1?{registry:null,namespace:`library`,repo:t[0]}:t.length===2&&!t[0].includes(`.`)&&!t[0].includes(`:`)?{registry:null,namespace:t[0],repo:t[1]}:{registry:t[0],namespace:t.slice(1,-1).join(`/`)||t[1],repo:t[t.length-1]}}function Wn(e){if(e=e.replace(/^docker:\/\//,``),e.includes(`@`))return null;let t=e.lastIndexOf(`:`),n,r;if(t===-1||e.lastIndexOf(`/`)>t||(n=e.substring(0,t),r=e.substring(t+1),!r||!Rn.test(r)))return null;let{registry:i,namespace:a,repo:o}=Un(n);return{registry:i,namespace:a,repo:o,tag:r,fullImage:n}}function Gn(e){let t=Rn.exec(e);return t?{version:t[1],suffix:t[2]||``}:null}function Kn(e,t){let n=Gn(t);return n?ht(e,n.version,n.suffix):t}function qn(e,t){let n=[];for(let r of e.matchAll(t)){let e=Wn(r[1]);e&&n.push({ref:e,match:r[1]})}return n}async function Jn(e,t,n){let r={},i=`${n.dockerApiUrl}/v2/repositories/${e}/${t}/tags`,a=e=>`${i}?page_size=100&ordering=last_updated&page=${e}`,o={headers:{"accept-encoding":`gzip, deflate, br`}},s=async e=>{try{let t=await Je(a(e),n,o);return`body`in t?JSON.parse(t.body):null}catch{return null}},c=await s(1);if(!c)return r;for(let e of c.results||[])r[e.name]=e.tag_last_pushed||e.last_updated||``;let l=Math.min(Math.ceil((c.count||0)/100),10);if(l<2)return r;let u=await Promise.all(Array.from({length:l-1},(e,t)=>s(t+2)));for(let e of u)if(e)for(let t of e.results||[])r[t.name]=t.tag_last_pushed||t.last_updated||``;return r}async function Yn(e,t,n){let{registry:r,namespace:i,repo:a}=Un(e);if(r)throw Error(`Non-Docker-Hub registries are not yet supported: ${r}`);return[{tags:await Jn(i,a,n),name:e},t,null,e]}function Xn(e,t,n,r,i){let a=Gn(t);if(!a)return null;let o=F(q(a.version))?.version;if(!o)return null;let s=o,c=``,l=``;for(let[t,o]of Object.entries(e)){let e=Gn(t);if(!e||e.suffix!==a.suffix)continue;let u=F(q(e.version))?.version;if(!u||!He(o,r,i))continue;let d=I(s,u);!d||!n.has(d)||R(u,s)&&(s=u,c=t,l=o)}if(!c||s===o)return null;let u=Kn(s,t);return u===t?null:{newTag:u,date:l}}function Zn(e,t,n){let r=e;for(let[e,i]of Object.entries(t)){let[t,a]=e.split(`\0`),o=i.oldOrig||i.old;for(let e of n)r=r.replace(e(K(a),K(o)),`$1${a}:${i.new}`)}return r}function Qn(e,t){return Zn(e,t,[(e,t)=>RegExp(`(FROM\\s+(?:--platform=\\S+\\s+)?)${e}:${t}`,`g`)])}function $n(e,t){return Zn(e,t,[(e,t)=>RegExp(`(image:\\s*['"]?)${e}:${t}`,`g`)])}function er(e,t){return Zn(e,t,[(e,t)=>RegExp(`((?:container|image):\\s*['"]?)${e}:${t}`,`g`),(e,t)=>RegExp(`(uses:\\s*['"]?docker://)${e}:${t}`,`g`)])}const tr=[`Dockerfile`,`docker-compose.yml`,`docker-compose.yaml`];function nr(e){return/^docker-.+\.ya?ml$/.test(e)}function rr(e){return/^Dockerfile(\..+)?$/.test(e)}function ir(e){return rr(e)||nr(e)}function ar(e){return rr(e)?zn:Bn}function or(e){return e.registry?``:e.namespace===`library`?`https://hub.docker.com/_/${e.repo}`:`https://hub.docker.com/r/${e.namespace}/${e.repo}`}const sr=new Map;async function cr(e,t,n){let r=`${We(n.cratesIoUrl)}/api/v1/crates/${encodeURIComponent(e)}/versions?per_page=100`,i=n.noCache?void 0:sr.get(r);return i||(i=Je(r,n,Ge()).then(t=>{`body`in t||mt(t.res,r,e,n.cratesIoUrl);let i;try{i=JSON.parse(t.body)}catch{throw Error(`Invalid JSON from ${r}`)}let a=(i.versions||[]).filter(e=>!e.yanked),o={},s={};for(let e of a)e.num&&(o[e.num]={},s[e.num]=e.created_at||``);return{name:e,versions:o,time:s,"dist-tags":{latest:a[0]?.num??``}}}).catch(e=>{throw sr.delete(r),e}),sr.set(r,i)),[await i,t,null,e]}function lr(e){let t=new Map;for(let n of e.split(`[[package]]`)){let e=/\bname\s*=\s*"([^"]+)"/.exec(n),r=/\bversion\s*=\s*"([^"]+)"/.exec(n);if(!e||!r)continue;let i=e[1],a=r[1];if(!j(a))continue;let o=t.get(i)||[];o.push(a),t.set(i,o)}return t}const ur=/^\d/;function dr(e,t){return ur.test(e)?Qt(X(`^${e}`),t,`^${e}`).replace(/^\^/,``):Qt(X(e),t,e)}function fr(e,t,n){let r=e.get(t);if(!r)return;let i=ur.test(n)?`^${n}`:n,a;for(let e of r)U(e,i)&&(!a||de(e,a))&&(a=e);return a}const pr=je.map(K).join(`|`);function mr(e,t){let n=e;for(let[e,r]of Object.entries(t)){let[,t]=e.split(`\0`),i=r.oldOrig||r.old,a=r.new,o=K(t),s=K(i);n=n.replace(RegExp(`^(\\s*${o}\\s*=\\s*["'])${s}(["'].*)$`,`gm`),`$1${a}$2`),n=n.replace(RegExp(`(\\s*${o}\\s*=\\s*\\{\\s*version\\s*=\\s*["'])${s}(["'])`,`g`),`$1${a}$2`),n=n.replace(RegExp(`(\\[(?:${pr})\\.${o}\\][^\\[]*?version\\s*=\\s*["'])${s}(["'])`,`g`),`$1${a}$2`)}return n}function hr(e){return e.split(`|`)[0]}function gr(e,t){let n=t===`.`?``:`|${t}`,r={};for(let[t,i]of Object.entries(e)){let[e,a]=t.split(`\0`),o=hr(e);e===`${o}${n}`&&(r[`${o}${a}`]=i)}return r}const _r=/[*?{[]/;async function vr(e,n,r,i=32){let a=new Set,o=[];for(let i of e){let e=_r.test(i)?t(i,{cwd:n}).map(e=>f(u(n,e))):[f(u(n,i))];for(let t of e){let e=u(t,r);if(a.has(e))continue;a.add(e);let i=d(n,t);o.push({absPath:e,memberPath:`./${i.replace(/\\/g,`/`)}`})}}return(await G(o,async({absPath:e,memberPath:t})=>{try{return{absPath:e,content:await b(e,`utf8`),memberPath:t}}catch{return null}},{concurrency:i})).filter(e=>e!==null)}function yr(e){let t=[],n=e.split(`
|
|
4
|
+
`),r=!1;for(let e of n){if(/^packages\s*:/.test(e)){r=!0;continue}if(r){if(/^\S/.test(e))break;let n=/^\s+-\s+['"]?([^'"#\s]+)['"]?/.exec(e);n&&t.push(n[1])}}return t}const br={"pnpm-workspace.yaml":`npm`,"package.json":`npm`,"pyproject.toml":`pypi`,"go.work":`go`,"go.mod":`go`,"Cargo.toml":`cargo`},xr=new Set([`npm`,`pypi`,`go`,`cargo`,`actions`,`docker`]),Sr=(e,t)=>typeof e==`string`?We(e):typeof t==`function`?t():t;function Cr(t,n){let r=new Map,i=new Set(t),a=n;for(;i.size;){for(let t of i){let n=u(a,t);try{e(n),r.set(t,n),i.delete(t)}catch{}}let t=l(a);if(t===a)break;a=t}return r}async function wr(e,t){let n=await G(e,async e=>{try{return[e,await b(e,`utf8`)]}catch(t){throw Error(`Unable to open ${e}: ${t.message}`)}},{concurrency:t});return new Map(n)}function Z(e,t){t&&(e.date=t,e.age=Te(t,{noAffix:!0}))}function Tr(e){let t=0;for(let n of Object.keys(e))t+=Object.keys(e[n]).length;return t}function Er(e){console.error(`${Ne()} ${e}`)}function Dr(e){return e.replace(`${m()}/`,``).replace(`${m()}\\`,``)}function Q(e,t,n,r,i){if(i===`engines`&&Oe.includes(e)||t===`pypi`&&e===`python`)return!1;if(!n.size&&!r.size)return!0;let a=t===`go`?e.replace(/\/v\d+$/,``):e;for(let t of r)if(t.test(e)||t.test(a))return!1;for(let t of n)if(t.test(e)||t.test(a))return!0;return!n.size}function Or(e){let t=new Set;if(e)for(let r of e){let e;try{e=n(r)}catch(e){throw Error(`Unable to open ${r}: ${e.message}`)}if(e?.isFile())t.add(f(r));else if(e?.isDirectory()){for(let e of Object.keys(br)){let i=u(r,e),a=null;try{a=n(i)}catch{}a?.isFile()&&t.add(f(i))}try{for(let e of i(r,{withFileTypes:!0}))e.isFile()&&ir(e.name)&&t.add(f(u(r,e.name)))}catch{}let e=f(r).replace(/\\/g,`/`),a;a=e.endsWith(`.github/workflows`)?e:e.endsWith(`.github`)?u(e,`workflows`):u(e,`.github`,`workflows`);for(let e of Ln(a))t.add(e)}else throw Error(`${r} is neither a file nor directory`)}else{let e=u(`.github`,`workflows`),n=[...Object.keys(br),...tr,e];for(let[r,i]of Cr(n,m()))if(r===e)for(let e of Ln(i))t.add(e);else t.add(f(i));try{for(let e of i(m(),{withFileTypes:!0}))e.isFile()&&ir(e.name)&&!tr.includes(e.name)&&t.add(f(u(m(),e.name)))}catch{}}for(let e of t)c(e)===`go.work`&&t.delete(u(l(e),`go.mod`));for(let e of t)c(e)===`pnpm-workspace.yaml`&&t.delete(u(l(e),`package.json`));return t}function $(e,t){g===`win32`&&o(e,0),s(e,t,g===`win32`?{flag:`r+`}:void 0)}function kr(e){let t={results:{}};for(let n of Object.keys(e))for(let[r,i]of Object.entries(e[n])){typeof i.oldPrint==`string`&&(i.old=i.oldPrint),typeof i.newPrint==`string`&&(i.new=i.newPrint),typeof i.oldOrig==`string`&&!qt(i.oldOrig)&&(i.old=n===`go`?kn(i.oldOrig):i.oldOrig),n===`go`&&(i.new=kn(i.new)),n===`actions`&&(i.old=q(i.old),i.new=q(i.new)),delete i.oldPrint,delete i.newPrint,delete i.oldOrig,delete i.date;let[e,a]=r.split(`\0`),o=t.results[n]??={};(o[e]??={})[a]=i}return t}let Ar=!1;async function jr(e={}){if(!Ar){let{enableDnsCache:e}=await import(`./dns-CUigd8AG.js`);e(),Ar=!0}let t={...e},n=t.sockets??25,r=t.timeout??0,i=Sr(e.forgeapi,`https://api.github.com`),a=Sr(e.pypiapi,`https://pypi.org`),o=Sr(e.jsrapi,`https://jsr.io`),s=Sr(e.goproxy,cn),d=Sr(e.cargoapi,`https://crates.io`),p=Sr(e.dockerapi,`https://hub.docker.com`),h=ln(),g=t.color===!0||t.noColor!==!0&&_.isTTY,y=e=>g?t=>v(e,String(t)):String,ee=y(`magenta`),x=y(`green`),S=y(`red`),w={fetchTimeout:r||5e3,goProbeTimeout:r?r/2:2500,forgeApiUrl:i,pypiApiUrl:a,jsrApiUrl:o,goProxyUrl:s,cratesIoUrl:d,dockerApiUrl:p,doFetch:async(e,n)=>{t.verbose&&Er(`${ee(n?.method||`GET`)} ${e}`);let r=await Ke(e,n);return t.verbose&&Er(`${r.ok?x(r.status):S(r.status)} ${e}`),r},noCache:!!t.noCache},T=xt(t.greatest),te=xt(t.prerelease),ne=xt(t.release),re=xt(t.patch),ie=xt(t.minor),ae=xt(t.allowDowngrade),E=t.modes?.length?new Set(t.modes):xr;E.has(`actions`)&&it();function oe(e){return re===!0||W(e,re)?new Set([`patch`]):ie===!0||W(e,ie)?new Set([`patch`,`minor`]):new Set([`patch`,`minor`,`major`])}let se=new Map;function ce(e){let t=se.get(e);return t||(t={useGreatest:typeof T==`boolean`?T:W(e,T),usePre:typeof te==`boolean`?te:W(e,te),useRel:typeof ne==`boolean`?ne:W(e,ne),semvers:oe(e)},se.set(e,t)),t}let le=bt(t.include??[]),ue=bt(t.exclude??[]),D=t.pin??{},O={},k={},A={},M={},N=Date.now(),P=0,F=(e,t,n,r,i,a)=>{O[e][`${t}${n}${r}`]={old:i,oldOrig:a}},I=Or(t.files?.length?new Set(t.files):!1),L=await wr(Array.from(I).filter(e=>{if(In(e))return E.has(`actions`)||E.has(`docker`);let t=c(e);if(ir(t))return E.has(`docker`);let n=br[t];return!!n&&E.has(n)}),n),de={},R={},fe=[],z=null,pe=[],me=!1,B=[],he=!1,ge=[],_e=[],V={};async function H(e){let n=e===m()?t:await St(e);return{modeConfig:n,modeInclude:n!==t&&n?.include?bt([...t.include??[],...n.include]):le,modeExclude:n!==t&&n?.exclude?bt([...t.exclude??[],...n.exclude]):ue,pin:{...n?.pin,...D}}}function ve(e,n){return t.types?.length?t.types:n?.types?.length?n.types:e===`npm`?De:e===`pypi`?ke:e===`go`?t.indirect?Ae:Ae.filter(e=>e!==`indirect`):e===`cargo`?je:[]}function ye(e,t,n){O.docker??={};for(let r of n)for(let{ref:n}of qn(e,r)){if(!Q(n.fullImage,`docker`,le,ue,`docker`))continue;let e=`${t}${n.fullImage}`;if(O.docker[e])continue;let r=Gn(n.tag);r&&(O.docker[e]={old:r.version,oldOrig:n.tag},_e.push({key:e,fullImage:n.fullImage,ref:n}))}}for(let e of I){if(In(e)){let t=E.has(`actions`),n=E.has(`docker`);if(!t&&!n)continue;let r=L.get(e),a=Dr(e);if(de[a]={absPath:e,content:r},t){O.actions??={};let e=Array.from(r.matchAll(An),e=>jn(e[1])).filter(e=>e!==null);for(let t of e){if(!Q(t.name,`actions`,le,ue,`actions`))continue;let e=`${a}${t.name}`;O.actions[e]||(O.actions[e]={old:t.ref},ge.push({...t,key:e,apiUrl:Mn(t.host,i)}))}}n&&(R[a]={absPath:e,content:r,fileType:`workflow`},ye(r,a,[Bn,Vn,Hn]));continue}let t=c(e);if(ir(t)){if(!E.has(`docker`))continue;let n=L.get(e),r=Dr(e);R[r]={absPath:e,content:n,fileType:rr(t)?`dockerfile`:`compose`},ye(n,r,[ar(t)]);continue}let r=br[t];if(!E.has(r))continue;if(t===`go.work`){O[r]??={};let t=l(f(e)),i=L.get(e);z={file:e,content:i};let a=En(i),[o,s]=await Promise.all([H(t),G(a.use,async e=>{let n=f(u(t,e,`go.mod`));try{return{usePath:e,modPath:n,content:await b(n,`utf8`)}}catch{return null}},{concurrency:n})]),{modeConfig:c,modeInclude:d,modeExclude:p,pin:m}=o,h=ve(r,c);M[r]=e,V[r]={modeConfig:c,projectDir:t,pin:m};for(let e of s){if(!e)continue;let{usePath:t,modPath:n,content:i}=e,a=bn(i),o=l(n);fe.push({absPath:n,content:i,projectDir:o,usePath:t});let s=t===`.`?``:`|${t}`;for(let e of h){let t=a[e]||{};for(let[n,i]of Object.entries(t))Q(n,r,d,p,e)&&F(r,e,s,n,kn(i),q(i))}}for(let[e,t]of Object.entries(a.replace))Q(e,r,d,p,`replace`)&&F(r,`replace`,``,e,kn(t),q(t));P+=Object.keys(O[r]).length;continue}if(t===`go.mod`&&z||t===`package.json`&&he)continue;if(t===`Cargo.toml`){O[r]??={};let t=L.get(e),i=C(t),a=l(f(e));M[r]=e;let o=Cr([`Cargo.lock`],a).get(`Cargo.lock`),s=i.workspace?.members,c=Array.isArray(s)&&s.length,[u,d,p]=await Promise.all([H(a),o?b(o,`utf8`):Promise.resolve(null),c?vr(s,a,`Cargo.toml`,n):Promise.resolve([])]),{modeConfig:m,modeInclude:h,modeExclude:g,pin:_}=u,v=ve(r,m);V[r]={modeConfig:m,projectDir:a,pin:_};let y=d?lr(d):new Map,ee=(e,t)=>{for(let n of v){let i=Me(e,n)||{};if(!(typeof i!=`object`||Array.isArray(i))){for(let[e,a]of Object.entries(i))if(Q(e,r,h,g,n))if(typeof a==`object`&&a&&`version`in a&&!(`git`in a)&&!(`path`in a)){let i=String(a.version);be(i)&&F(r,n,t,e,fr(y,e,i)??X(i),i)}else typeof a==`string`&&be(a)&&F(r,n,t,e,fr(y,e,a)??X(a),a)}}};if(c){me=!0,ee(i,``),pe.push({absPath:f(e),content:t,memberPath:`.`});for(let e of p){pe.push(e);try{ee(C(e.content),`|${e.memberPath}`)}catch(t){throw Error(`Error parsing ${e.absPath}: ${t.message}`)}}}else A[r]=t,ee(i,``);P+=Object.keys(O[r]).length;continue}if(t===`pnpm-workspace.yaml`){O[r]??={};let t=l(f(e)),i=L.get(e);he=!0;let a=yr(i),o=u(t,`package.json`),[s,c,d]=await Promise.all([H(t),b(o,`utf8`).catch(()=>null),vr(a,t,`package.json`,n)]),{modeConfig:p,modeInclude:m,modeExclude:h,pin:g}=s,_=ve(r,p);M[r]=e,V[r]={modeConfig:p,projectDir:t,pin:g};let v=(e,t)=>{for(let n of _){let i=e[n]||{};if(typeof i==`string`){let[e,a]=i.split(`@`);Q(e,r,m,h,n)&&F(r,n,t,e,X(a),a)}else if(typeof i==`object`&&!Array.isArray(i))for(let[e,a]of Object.entries(i))Q(e,r,m,h,n)&&(qt(a)?F(r,n,t,e,Yt(a,e).version,a):be(a)?F(r,n,t,e,X(a),a):Jt(a)?F(r,n,t,e,`0.0.0`,a):k[`${n}${t}${e}`]={old:a})}};if(c!==null){let e;try{e=JSON.parse(c)}catch(e){throw Error(`Error parsing ${o}: ${e.message}`)}B.push({absPath:f(o),content:c,memberPath:`.`}),v(e,``)}for(let e of d){let t;try{t=JSON.parse(e.content)}catch(t){throw Error(`Error parsing ${e.absPath}: ${t.message}`)}B.push(e),v(t,`|${e.memberPath}`)}P+=Object.keys(O[r]).length+Object.keys(k).length;continue}M[r]=e,O[r]??={};let a=l(f(e)),{modeConfig:o,modeInclude:s,modeExclude:d,pin:p}=await H(a),m=ve(r,o),h={};A[r]=L.get(e);try{if(r===`npm`)h=JSON.parse(A[r]);else if(r===`pypi`)h=C(A[r]);else if(r===`go`){let e=bn(A[r]);h.deps=e.deps,h.indirect=e.indirect,h.replace=e.replace,h.tool=e.tool}}catch(t){throw Error(`Error parsing ${e}: ${t.message}`)}for(let e of m){let t;if(t=r===`npm`||r===`go`?h[e]||{}:Me(h,e)||{},Array.isArray(t)&&r===`pypi`)for(let{name:n,version:i}of Ee(t))Q(n,r,s,d,e)&&F(r,e,``,n,X(i),i);else if(typeof t==`string`){let[n,i]=t.split(`@`);Q(n,r,s,d,e)&&F(r,e,``,n,X(i),i)}else for(let[n,i]of Object.entries(t))Q(n,r,s,d,e)&&(r===`npm`&&qt(i)?F(r,e,``,n,Yt(i,n).version,i):r!==`go`&&be(i)?F(r,e,``,n,X(i),i):r===`npm`&&Jt(i)?F(r,e,``,n,`0.0.0`,i):r===`npm`?k[`${e}${n}`]={old:i}:r===`go`&&F(r,e,``,n,kn(i),q(i)))}P+=Object.keys(O[r]).length+Object.keys(k).length,V[r]={modeConfig:o,projectDir:a,pin:p}}if(O.actions&&(P+=Object.keys(O.actions).length),O.docker&&(P+=Object.keys(O.docker).length),P===0)return{results:{},message:`No dependencies found, nothing to do.`};let U=[],xe={registry:t.registry};for(let e of Object.keys(V)){if(!O[e]||!Object.keys(O[e]).length&&!Object.keys(k).length)continue;let{modeConfig:r,projectDir:i,pin:a}=V[e];U.push((async()=>{let o=new Map,s=t.cooldown??r.cooldown,c=s?Fe(String(s)):0,l=e=>{if(c)for(let[t,{date:n}]of Object.entries(e))n&&(N-Date.parse(n))/864e5<c&&delete e[t]};if(await G(Object.keys(O[e]),async t=>{let[n,s]=t.split(`\0`),l=hr(n),u=O[e][t],d=null;if(e===`npm`){let{oldOrig:n}=u;if(n&&qt(n))d=await Xt(s,l,w);else if(n&&Jt(n))try{d=await Gt(s,l,r,xe,w)}catch{delete O[e][t];return}else d=await Gt(s,l,r,xe,w)}else d=e===`go`?await Sn(s,l,u.oldOrig||u.old,i,w,h):e===`cargo`?await cr(s,l,w):await nn(s,n,w);if(!d)return;let[f,,p]=d;if(f?.error)throw Error(f.error);let{useGreatest:m,usePre:g,useRel:_,semvers:v}=ce(f.name),y=u.old,b=u.oldOrig,ee=a[s],x=et(f,{usePre:g,useRel:_,useGreatest:m,semvers:v,range:y,mode:e,pinnedRange:ee,cooldownDays:c||void 0,now:c?N:void 0},{allowDowngrade:ae,matchesAny:W,isGoPseudoVersion:gn}),S=``;if([`go`,`pypi`].includes(e)&&x)S=x;else if(e===`cargo`&&x&&b)S=dr(b,x);else if(x)if(b&&Jt(b))S=String(Pt()[`save-exact`])===`true`?x:`^${x}`;else if(b&&qt(b)){let e=/^(npm:@jsr\/[^@]+@|jsr:@[^@]+@)(.+)$/.exec(b);e?S=`${e[1]}${x}`:b.startsWith(`jsr:`)&&(S=`jsr:${x}`)}else S=Qt(y,x,b);if(!x||x===y||b&&b===S){delete O[e][t];return}let C=``;e===`pypi`&&f.releases?.[x]?.[0]?.upload_time_iso_8601?C=f.releases[x][0].upload_time_iso_8601:e===`go`&&f.Time?C=f.Time:e===`cargo`&&f.time?.[x]&&(C=f.time[x]),u.new=S,b&&qt(b)&&(u.newPrint=x),e===`npm`?o.set(t,{name:s,promise:Kt(f.name,x,r,xe,w)}):e===`pypi`?u.info=_t(f,p,f.info.name):e===`go`?u.info=Dn(f.newPath||s):e===`cargo`&&(u.info=`https://crates.io/crates/${s}`),C&&Z(u,C)},{concurrency:n}),await Promise.all(Array.from(o,async([t,{name:n,promise:r}])=>{let i=await r,a=O[e][t];a&&(a.info=_t({repository:i.repository,homepage:i.homepage},null,n),i.date&&Z(a,i.date))})),Object.keys(k).length){let t=(await G(Object.entries(k),([e,t])=>{let n=e.split(`\0`)[1];return tn(e,t,typeof T==`boolean`?T:W(n,T),w)},{concurrency:n})).filter(e=>e!==null);for(let n of t){let{key:t,newRange:r,user:i,repo:a,oldRef:o,newRef:s,newDate:c}=n;O[e][t]={old:k[t].old,new:r,oldPrint:ut.test(o)?o.substring(0,7):o,newPrint:ut.test(s)?s.substring(0,7):s,info:`https://github.com/${i}/${a}`},c&&Z(O[e][t],c)}}l(O[e])})())}if(ge.length&&U.push((async()=>{let e=new Map;for(let t of ge){let n=`${t.apiUrl}/${t.owner}/${t.repo}`,r=e.get(n);r||e.set(n,r={apiUrl:t.apiUrl,owner:t.owner,repo:t.repo,infos:[]}),r.infos.push(t)}let r=t.cooldown?Fe(String(t.cooldown)):0;await G(e.values(),async({apiUrl:e,owner:t,repo:i,infos:a})=>{let o=await pt(e,t,i,w),s=[],c=new Map,l=new Map,u=new Map;for(let e of o){l.set(e.name,e);let t=q(e.name);j(t)&&(s.push(t),c.has(t)||c.set(t,e.name)),e.commitSha&&u.set(e.commitSha,e.name)}let d=new Map;async function f(n){if(d.has(n))return d.get(n);let r=await Nn(e,t,i,n,w);return d.set(n,r),r}async function p(e){let t=new Set;for(let n=0;n<20;n++){let n=$e({},t.size?s.filter(e=>!t.has(e)):s,e);if(!n||n===e.range)return null;let i=c.get(n);if(!i){t.add(n);continue}let a=l.get(i)?.commitSha||``;if(!r)return{version:n,tag:i,commitSha:a,date:``};let o=a?await f(a):``;if(He(o,r,N))return{version:n,tag:i,commitSha:a,date:o};t.add(n)}return null}await G(a,async({key:e,host:n,ref:r,name:a,isHash:o})=>{let s=O.actions[e],c=`https://${n||`github.com`}/${t}/${i}`;if(o){let{usePre:t,useRel:n}=ce(a),i=await p({range:`0.0.0`,semvers:new Set([`patch`,`minor`,`major`]),usePre:t,useRel:n,useGreatest:!0,pinnedRange:D[a]});if(!i){delete O.actions[e];return}let{tag:o,commitSha:l,date:d}=i;if(!l||l===r||l.startsWith(r)||r.startsWith(l)){delete O.actions[e];return}let f=u.get(r);if(!f){for(let[e,t]of u)if(e.startsWith(r)){f=t;break}}s.old=r,s.new=l.substring(0,r.length),s.oldPrint=f||r.substring(0,7),s.newPrint=o,s.info=c,d&&Z(s,d)}else{let t=J(q(r));if(!t){delete O.actions[e];return}let{useGreatest:n,usePre:i,useRel:o,semvers:u}=ce(a),d=await p({range:t,semvers:u,usePre:i,useRel:o,useGreatest:n||!0,pinnedRange:D[a]});if(!d){delete O.actions[e];return}let{tag:m,commitSha:h,date:g}=d,_=Pn(m,r);if(_===r){delete O.actions[e];return}if(s.new=l.has(_)?_:m,s.info=c,h&&g)Z(s,g);else if(h){let e=await f(h);e&&Z(s,e)}}},{concurrency:n})},{concurrency:n}),Object.keys(O.actions).length||delete O.actions})()),_e.length&&U.push((async()=>{let e=new Map;for(let t of _e){let n=e.get(t.fullImage);n||e.set(t.fullImage,n=[]),n.push(t)}let r=t.cooldown?Fe(String(t.cooldown)):0;await G(e.entries(),async([e,t])=>{let n;try{let[t]=await Yn(e,`docker`,w);n=t}catch{for(let e of t)delete O.docker[e.key];return}for(let e of t){let t=O.docker[e.key],i=t.oldOrig||t.old,{semvers:a}=ce(e.fullImage),o=Xn(n.tags,i,a,r||void 0,r?N:void 0);if(!o){delete O.docker[e.key];continue}t.new=o.newTag,t.info=or(e.ref),Z(t,o.date)}},{concurrency:n}),Object.keys(O.docker).length||delete O.docker})()),await Promise.all(U),!Tr(O))return{results:{},message:`All dependencies are up to date.`};if(t.update){let e=(e,t,n)=>{for(let r of t){let t=gr(O[e],r.memberPath);Object.keys(t).length&&$(r.absPath,n(r.content,t))}},t=new Map;if(O.actions)for(let[e,n]of Object.entries(O.actions)){let[r,i]=e.split(`\0`),a=t.get(r);a||t.set(r,a=[]),a.push({name:i,oldRef:n.old,newRef:n.new})}let n=new Map;if(O.docker)for(let[e,t]of Object.entries(O.docker)){let[r]=e.split(`\0`),i=n.get(r);i||n.set(r,i={}),i[e]=t}let r=kr(O);for(let r of Object.keys(O)){if(!Object.keys(O[r]).length)continue;if(r===`actions`){for(let[e,n]of t){let{absPath:t,content:r}=de[e]||{};if(!t)continue;let i=Fn(r,n);$(t,i),R[e]&&(R[e].content=i)}continue}if(r===`docker`){for(let[e,t]of n){let n=R[e];if(!n)continue;let{absPath:r,content:i,fileType:a}=n;$(r,(a===`dockerfile`?Qn:a===`compose`?$n:er)(i,t))}continue}let i=A[r];if(r===`go`&&z){for(let e of fe){let t=gr(O[r],e.usePath);if(!Object.keys(t).length)continue;let[n,i]=wn(e.content,t);n!==e.content&&$(e.absPath,n),Tn(e.projectDir,i,$)}let e={};for(let[t,n]of Object.entries(O[r]))t.split(`\0`)[0]===`replace`&&(e[t]=n);if(Object.keys(e).length){let[t]=wn(z.content,e);t!==z.content&&$(z.file,t)}}else if(r===`go`){let[e,t]=wn(i,O[r]);$(M[r],e),Tn(l(f(M[r])),t,$)}else if(r===`cargo`&&me)e(r,pe,mr);else if(r===`cargo`)$(M[r],mr(i,O[r]));else if(r===`npm`&&he)e(r,B,Zt);else{let e=r===`npm`?Zt:rn;$(M[r],e(i,O[r]))}}return r}return kr(O)}function Mr(e){let t=``,n=0,r=e.length;for(;n<r;){let i=e[n];if(i===`"`){for(t+=i,n++;n<r;){let i=e[n];if(t+=i,n++,i===`\\`&&n<r){t+=e[n],n++;continue}if(i===`"`)break}continue}if(i===`/`&&n+1<r&&e[n+1]===`/`){for(n+=2;n<r&&e[n]!==`
|
|
5
|
+
`;)n++;continue}if(i===`/`&&n+1<r&&e[n+1]===`*`){for(n+=2;n<r&&(e[n]!==`*`||e[n+1]!==`/`);)n++;n+=2;continue}t+=i,n++}return t=t.replace(/,(\s*[}\]])/g,`$1`),JSON.parse(t)}export{Mr as n,be as r,jr as t};
|