@tsmodule/tsmodule 40.0.13 → 40.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{bin/index.d.ts → bin.d.ts} +0 -0
  2. package/dist/bin.js +89 -0
  3. package/dist/commands/build/index.js +62 -6
  4. package/dist/commands/build/lib/emitTsDeclarations.js +18 -1
  5. package/dist/commands/convert/index.js +51 -1
  6. package/dist/commands/create/index.js +51 -1
  7. package/dist/commands/create/lib/templates.js +51 -1
  8. package/dist/commands/dev/index.js +66 -3
  9. package/dist/commands/execute/index.js +10 -1
  10. package/dist/commands/index.js +66 -1
  11. package/dist/commands/normalize/index.js +47 -1
  12. package/dist/commands/normalize/lib/typescriptApi.js +14 -1
  13. package/dist/constants.js +4 -1
  14. package/dist/index.js +66 -1
  15. package/dist/loader/index.js +12 -1
  16. package/dist/loader/types.js +3 -0
  17. package/dist/specification/index.js +4 -1
  18. package/dist/specification/types.js +3 -0
  19. package/{templates → dist/templates}/default/.eslintrc +0 -0
  20. package/{templates → dist/templates}/default/.github/workflows/ci.yml +0 -0
  21. package/{templates → dist/templates}/default/.gitignore +0 -0
  22. package/{templates → dist/templates}/default/LICENSE +0 -0
  23. package/{templates → dist/templates}/default/README.md +0 -0
  24. package/{templates → dist/templates}/default/package.json +0 -0
  25. package/{templates → dist/templates}/default/src/index.ts +0 -0
  26. package/{templates → dist/templates}/default/test/example.test.ts +0 -0
  27. package/{templates → dist/templates}/default/tsconfig.json +0 -0
  28. package/{templates → dist/templates}/react/.eslintrc +0 -0
  29. package/{templates → dist/templates}/react/.gitignore +0 -0
  30. package/{templates → dist/templates}/react/LICENSE +0 -0
  31. package/{templates → dist/templates}/react/README.md +0 -0
  32. package/{templates → dist/templates}/react/next-env.d.ts +0 -0
  33. package/{templates → dist/templates}/react/next.config.js +0 -0
  34. package/{templates → dist/templates}/react/package.json +0 -0
  35. package/{templates → dist/templates}/react/postcss.config.js +0 -0
  36. package/{templates → dist/templates}/react/public/vercel.svg +0 -0
  37. package/{templates → dist/templates}/react/src/components/Card/index.css +0 -0
  38. package/{templates → dist/templates}/react/src/components/Card/index.tsx +0 -0
  39. package/{templates → dist/templates}/react/src/components/CardGrid/index.tsx +0 -0
  40. package/{templates → dist/templates}/react/src/components/Footer/index.tsx +0 -0
  41. package/{templates → dist/templates}/react/src/components/GetStarted/index.tsx +0 -0
  42. package/{templates → dist/templates}/react/src/components/Welcome/index.tsx +0 -0
  43. package/{templates → dist/templates}/react/src/components/index.css +0 -0
  44. package/{templates → dist/templates}/react/src/components/index.ts +0 -0
  45. package/{templates → dist/templates}/react/src/index.css +0 -0
  46. package/{templates → dist/templates}/react/src/index.ts +0 -0
  47. package/{templates → dist/templates}/react/src/pages/_app.tsx +0 -0
  48. package/{templates → dist/templates}/react/src/pages/api/hello.ts +0 -0
  49. package/{templates → dist/templates}/react/src/pages/index.tsx +0 -0
  50. package/{templates → dist/templates}/react/tailwind.config.js +0 -0
  51. package/dist/types/index.js +66 -1
  52. package/dist/utils/cwd.js +8 -1
  53. package/dist/utils/packageJson.js +4 -1
  54. package/dist/utils/programCatch.js +46 -1
  55. package/dist/utils/require.js +4 -1
  56. package/dist/utils/resolve.js +4 -1
  57. package/dist/utils/showProgress.js +12 -1
  58. package/dist/utils/stdin.js +12 -1
  59. package/package.json +10 -13
  60. package/dist/bin/index.js +0 -7
@@ -1 +1,4 @@
1
- import{existsSync as i}from"fs";import{fileURLToPath as c}from"url";import{posix as x}from"path";import{sep as p}from"path";const g=!1,O=/\.[mc]?tsx?(?=\?|$)/,h=/\.([mc])?js$/,S=/\.([mc])?[tj]sx$/,L=/\.([mc])?[tj]sx?$/,e={format:"esm",charset:"utf8",sourcemap:"inline",target:"node16",minify:!1},a={".mts":{...e,loader:"ts"},".jsx":{...e,loader:"jsx"},".tsx":{...e,loader:"tsx"},".cts":{...e,loader:"ts"},".ts":{...e,loader:"ts"},".json":{...e,loader:"json"}},n=Object.keys(a),M=s=>s.split(p).join(x.sep),l=s=>{const t=c(s);if(i(t))return s},r=s=>{for(const t of s)if(l(t))return t},m=s=>{const t=n.filter(o=>o.includes("ts")).concat([".js"]);return r(t.map(o=>s+o))},f=s=>{const t=n.filter(o=>o.includes("js")).concat([".js"]);return r(t.map(o=>s+o))},T=s=>{const t=f(s);if(t)return t;const o=m(s);if(o)return o};export{e as BASE_CONFIG,g as DEVELOPMENT_MODE,a as MODULE_LOADERS,n as POSSIBLE_EXTENSIONS,T as checkExtensions,f as checkJsExtension,m as checkTsExtensions,l as fileExists,r as fileExistsAny,h as isJs,L as isJsOrTs,O as isTs,S as isTsxOrJsx,M as normalizeSpecifier};
1
+
2
+ typeof document>"u"&&await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
3
+
4
+ import{existsSync as i}from"fs";import{fileURLToPath as c}from"url";import{posix as x}from"path";import{sep as p}from"path";var g=!1,O=/\.[mc]?tsx?(?=\?|$)/,h=/\.([mc])?js$/,S=/\.([mc])?[tj]sx$/,L=/\.([mc])?[tj]sx?$/,e={format:"esm",charset:"utf8",sourcemap:"inline",target:"node16",minify:!1},a={".mts":{...e,loader:"ts"},".jsx":{...e,loader:"jsx"},".tsx":{...e,loader:"tsx"},".cts":{...e,loader:"ts"},".ts":{...e,loader:"ts"},".json":{...e,loader:"json"}},n=Object.keys(a),M=s=>s.split(p).join(x.sep),l=s=>{let t=c(s);if(i(t))return s},r=s=>{for(let t of s)if(l(t))return t},m=s=>{let t=n.filter(o=>o.includes("ts")).concat([".js"]);return r(t.map(o=>s+o))},f=s=>{let t=n.filter(o=>o.includes("js")).concat([".js"]);return r(t.map(o=>s+o))},T=s=>{let t=f(s);if(t)return t;let o=m(s);if(o)return o};export{e as BASE_CONFIG,g as DEVELOPMENT_MODE,a as MODULE_LOADERS,n as POSSIBLE_EXTENSIONS,T as checkExtensions,f as checkJsExtension,m as checkTsExtensions,l as fileExists,r as fileExistsAny,h as isJs,L as isJsOrTs,O as isTs,S as isTsxOrJsx,M as normalizeSpecifier};
@@ -1 +1,12 @@
1
- import e from"ora";const c=async(o,r)=>{const s=e(r.start);try{await o(),s.succeed(r.success)}catch(t){throw s.fail(r.error),t}};export{c as showProgress};
1
+
2
+ typeof document>"u"&&await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
3
+
4
+ var $i=Object.create;var Jt=Object.defineProperty;var Yi=Object.getOwnPropertyDescriptor;var Vi=Object.getOwnPropertyNames;var Ki=Object.getPrototypeOf,Zi=Object.prototype.hasOwnProperty;var S=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var h=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Xi=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Vi(t))!Zi.call(e,n)&&n!==r&&Jt(e,n,{get:()=>t[n],enumerable:!(i=Yi(t,n))||i.enumerable});return e};var le=(e,t,r)=>(r=e!=null?$i(Ki(e)):{},Xi(t||!e||!e.__esModule?Jt(r,"default",{value:e,enumerable:!0}):r,e));var ur=h((qs,lt)=>{"use strict";var lr=(e,t)=>{for(let r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};lt.exports=lr;lt.exports.default=lr});var cr=h((ks,Be)=>{"use strict";var hn=ur(),Oe=new WeakMap,hr=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,i=0,n=e.displayName||e.name||"<anonymous>",o=function(...s){if(Oe.set(o,++i),i===1)r=e.apply(this,s),e=null;else if(t.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r};return hn(o,e),Oe.set(o,i),o};Be.exports=hr;Be.exports.default=hr;Be.exports.callCount=e=>{if(!Oe.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Oe.get(e)}});var dr=h((Us,Me)=>{Me.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Me.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Me.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var xr=h((Ws,re)=>{var b=global.process,H=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};H(b)?(pr=S("assert"),ee=dr(),_r=/^win/i.test(b.platform),ce=S("events"),typeof ce!="function"&&(ce=ce.EventEmitter),b.__signal_exit_emitter__?m=b.__signal_exit_emitter__:(m=b.__signal_exit_emitter__=new ce,m.count=0,m.emitted={}),m.infinite||(m.setMaxListeners(1/0),m.infinite=!0),re.exports=function(e,t){if(!H(global.process))return function(){};pr.equal(typeof e,"function","a callback must be provided for exit handler"),te===!1&&ut();var r="exit";t&&t.alwaysLast&&(r="afterexit");var i=function(){m.removeListener(r,e),m.listeners("exit").length===0&&m.listeners("afterexit").length===0&&De()};return m.on(r,e),i},De=function(){!te||!H(global.process)||(te=!1,ee.forEach(function(t){try{b.removeListener(t,Ie[t])}catch{}}),b.emit=Le,b.reallyExit=ht,m.count-=1)},re.exports.unload=De,$=function(t,r,i){m.emitted[t]||(m.emitted[t]=!0,m.emit(t,r,i))},Ie={},ee.forEach(function(e){Ie[e]=function(){if(!!H(global.process)){var r=b.listeners(e);r.length===m.count&&(De(),$("exit",null,e),$("afterexit",null,e),_r&&e==="SIGHUP"&&(e="SIGINT"),b.kill(b.pid,e))}}}),re.exports.signals=function(){return ee},te=!1,ut=function(){te||!H(global.process)||(te=!0,m.count+=1,ee=ee.filter(function(t){try{return b.on(t,Ie[t]),!0}catch{return!1}}),b.emit=br,b.reallyExit=gr)},re.exports.load=ut,ht=b.reallyExit,gr=function(t){!H(global.process)||(b.exitCode=t||0,$("exit",b.exitCode,null),$("afterexit",b.exitCode,null),ht.call(b,b.exitCode))},Le=b.emit,br=function(t,r){if(t==="exit"&&H(global.process)){r!==void 0&&(b.exitCode=r);var i=Le.apply(this,arguments);return $("exit",b.exitCode,null),$("afterexit",b.exitCode,null),i}else return Le.apply(this,arguments)}):re.exports=function(){return function(){}};var pr,ee,_r,ce,m,De,$,Ie,te,ut,ht,gr,Le,br});var Er=h((Ks,pn)=>{pn.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["😄 ","😝 "]},monkey:{interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},hearts:{interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},clock:{interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},earth:{interval:180,frames:["🌍 ","🌎 ","🌏 "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},runner:{interval:140,frames:["🚶 ","🏃 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["🌲","🎄"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},fistBump:{interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},soccerHeader:{interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},mindblown:{interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},speaker:{interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},orangePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},bluePulse:{interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},orangeBluePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},timeTravel:{interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]}}});var Tr=h((Zs,Rr)=>{"use strict";var Pe=Object.assign({},Er()),Sr=Object.keys(Pe);Object.defineProperty(Pe,"random",{get(){let e=Math.floor(Math.random()*Sr.length),t=Sr[e];return Pe[t]}});Rr.exports=Pe});var Ar=h((na,Fe)=>{var xn=function(){"use strict";function e(s,a,f,c){var _;typeof a=="object"&&(f=a.depth,c=a.prototype,_=a.filter,a=a.circular);var g=[],E=[],O=typeof Buffer<"u";typeof a>"u"&&(a=!0),typeof f>"u"&&(f=1/0);function R(d,P){if(d===null)return null;if(P==0)return d;var y,fe;if(typeof d!="object")return d;if(e.__isArray(d))y=[];else if(e.__isRegExp(d))y=new RegExp(d.source,o(d)),d.lastIndex&&(y.lastIndex=d.lastIndex);else if(e.__isDate(d))y=new Date(d.getTime());else{if(O&&Buffer.isBuffer(d))return Buffer.allocUnsafe?y=Buffer.allocUnsafe(d.length):y=new Buffer(d.length),d.copy(y),y;typeof c>"u"?(fe=Object.getPrototypeOf(d),y=Object.create(fe)):(y=Object.create(c),fe=c)}if(a){var Xt=g.indexOf(d);if(Xt!=-1)return E[Xt];g.push(d),E.push(y)}for(var it in d){var nt;fe&&(nt=Object.getOwnPropertyDescriptor(fe,it)),!(nt&&nt.set==null)&&(y[it]=R(d[it],P-1))}return y}return R(s,f)}e.clonePrototype=function(a){if(a===null)return null;var f=function(){};return f.prototype=a,new f};function t(s){return Object.prototype.toString.call(s)}e.__objToStr=t;function r(s){return typeof s=="object"&&t(s)==="[object Date]"}e.__isDate=r;function i(s){return typeof s=="object"&&t(s)==="[object Array]"}e.__isArray=i;function n(s){return typeof s=="object"&&t(s)==="[object RegExp]"}e.__isRegExp=n;function o(s){var a="";return s.global&&(a+="g"),s.ignoreCase&&(a+="i"),s.multiline&&(a+="m"),a}return e.__getRegExpFlags=o,e}();typeof Fe=="object"&&Fe.exports&&(Fe.exports=xn)});var Or=h((oa,Cr)=>{var yn=Ar();Cr.exports=function(e,t){return e=e||{},Object.keys(t).forEach(function(r){typeof e[r]>"u"&&(e[r]=yn(t[r]))}),e}});var Mr=h((sa,Br)=>{Br.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]});var Nr=h((aa,_t)=>{"use strict";var vn=Or(),_e=Mr(),Ir={nul:0,control:0};_t.exports=function(t){return Lr(t,Ir)};_t.exports.config=function(e){return e=vn(e||{},Ir),function(r){return Lr(r,e)}};function Lr(e,t){if(typeof e!="string")return Dr(e,t);for(var r=0,i=0;i<e.length;i++){var n=Dr(e.charCodeAt(i),t);if(n<0)return-1;r+=n}return r}function Dr(e,t){return e===0?t.nul:e<32||e>=127&&e<160?t.control:mn(e)?0:1+(e>=4352&&(e<=4447||e==9001||e==9002||e>=11904&&e<=42191&&e!=12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}function mn(e){var t=0,r=_e.length-1,i;if(e<_e[0][0]||e>_e[r][1])return!1;for(;r>=t;)if(i=Math.floor((t+r)/2),e>_e[i][1])t=i+1;else if(e<_e[i][0])r=i-1;else return!0;return!1}});var bt=h((la,Pr)=>{Pr.exports=S("stream")});var kr=h((ua,qr)=>{"use strict";function Fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function wn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fr(Object(r),!0).forEach(function(i){En(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function En(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jr(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Rn(e,t,r){return t&&jr(e.prototype,t),r&&jr(e,r),e}var Tn=S("buffer"),je=Tn.Buffer,An=S("util"),xt=An.inspect,Cn=xt&&xt.custom||"inspect";function On(e,t,r){je.prototype.copy.call(e,t,r)}qr.exports=function(){function e(){Sn(this,e),this.head=null,this.tail=null,this.length=0}return Rn(e,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return je.alloc(0);for(var i=je.allocUnsafe(r>>>0),n=this.head,o=0;n;)On(n.data,i,o),o+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,o=i.data;for(r-=o.length;i=i.next;){var s=i.data,a=r>s.length?s.length:r;if(a===s.length?o+=s:o+=s.slice(0,r),r-=a,r===0){a===s.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++n}return this.length-=n,o}},{key:"_getBuffer",value:function(r){var i=je.allocUnsafe(r),n=this.head,o=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var s=n.data,a=r>s.length?s.length:r;if(s.copy(i,i.length-r,0,a),r-=a,r===0){a===s.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++o}return this.length-=o,i}},{key:Cn,value:function(r,i){return xt(this,wn({},i,{depth:0,customInspect:!1}))}}]),e}()});var vt=h((ha,Wr)=>{"use strict";function Bn(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(yt,this,e)):process.nextTick(yt,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(qe,r):(r._writableState.errorEmitted=!0,process.nextTick(Ur,r,o)):process.nextTick(Ur,r,o):t?(process.nextTick(qe,r),t(o)):process.nextTick(qe,r)}),this)}function Ur(e,t){yt(e,t),qe(e)}function qe(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Mn(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function yt(e,t){e.emit("error",t)}function Dn(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}Wr.exports={destroy:Bn,undestroy:Mn,errorOrDestroy:Dn}});var q=h((ca,$r)=>{"use strict";var Hr={};function A(e,t,r){r||(r=Error);function i(o,s,a){return typeof t=="string"?t:t(o,s,a)}class n extends r{constructor(s,a,f){super(i(s,a,f))}}n.prototype.name=r.name,n.prototype.code=e,Hr[e]=n}function Gr(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(i=>String(i)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function In(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function Ln(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Nn(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}A("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);A("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;typeof t=="string"&&In(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let n;if(Ln(e," argument"))n=`The ${e} ${i} ${Gr(t,"type")}`;else{let o=Nn(e,".")?"property":"argument";n=`The "${e}" ${o} ${i} ${Gr(t,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");A("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});A("ERR_STREAM_PREMATURE_CLOSE","Premature close");A("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});A("ERR_MULTIPLE_CALLBACK","Callback called multiple times");A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");A("ERR_STREAM_WRITE_AFTER_END","write after end");A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);A("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");$r.exports.codes=Hr});var mt=h((da,Yr)=>{"use strict";var Pn=q().codes.ERR_INVALID_OPT_VALUE;function Fn(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function jn(e,t,r,i){var n=Fn(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var o=i?r:"highWaterMark";throw new Pn(o,n)}return Math.floor(n)}return e.objectMode?16:16*1024}Yr.exports={getHighWaterMark:jn}});var Vr=h((pa,wt)=>{typeof Object.create=="function"?wt.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:wt.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var Y=h((_a,St)=>{try{if(Et=S("util"),typeof Et.inherits!="function")throw"";St.exports=Et.inherits}catch{St.exports=Vr()}var Et});var Zr=h((ga,Kr)=>{Kr.exports=S("util").deprecate});var At=h((ba,ti)=>{"use strict";ti.exports=x;function Jr(e){var t=this;this.next=null,this.entry=null,this.finish=function(){ho(t,e)}}var ne;x.WritableState=be;var qn={deprecate:Zr()},Qr=bt(),Ue=S("buffer").Buffer,kn=global.Uint8Array||function(){};function Un(e){return Ue.from(e)}function Wn(e){return Ue.isBuffer(e)||e instanceof kn}var Tt=vt(),Gn=mt(),Hn=Gn.getHighWaterMark,k=q().codes,$n=k.ERR_INVALID_ARG_TYPE,Yn=k.ERR_METHOD_NOT_IMPLEMENTED,Vn=k.ERR_MULTIPLE_CALLBACK,Kn=k.ERR_STREAM_CANNOT_PIPE,Zn=k.ERR_STREAM_DESTROYED,Xn=k.ERR_STREAM_NULL_VALUES,Jn=k.ERR_STREAM_WRITE_AFTER_END,Qn=k.ERR_UNKNOWN_ENCODING,oe=Tt.errorOrDestroy;Y()(x,Qr);function zn(){}function be(e,t,r){ne=ne||V(),e=e||{},typeof r!="boolean"&&(r=t instanceof ne),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=Hn(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){so(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Jr(this)}be.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(be.prototype,"buffer",{get:qn.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ke;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ke=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(t){return ke.call(this,t)?!0:this!==x?!1:t&&t._writableState instanceof be}})):ke=function(t){return t instanceof this};function x(e){ne=ne||V();var t=this instanceof ne;if(!t&&!ke.call(x,this))return new x(e);this._writableState=new be(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Qr.call(this)}x.prototype.pipe=function(){oe(this,new Kn)};function eo(e,t){var r=new Jn;oe(e,r),process.nextTick(t,r)}function to(e,t,r,i){var n;return r===null?n=new Xn:typeof r!="string"&&!t.objectMode&&(n=new $n("chunk",["string","Buffer"],r)),n?(oe(e,n),process.nextTick(i,n),!1):!0}x.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&Wn(e);return o&&!Ue.isBuffer(e)&&(e=Un(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=zn),i.ending?eo(this,r):(o||to(this,i,e,r))&&(i.pendingcb++,n=io(this,i,o,e,t,r)),n};x.prototype.cork=function(){this._writableState.corked++};x.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&zr(this,e))};x.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Qn(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ro(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Ue.from(t,r)),t}Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function io(e,t,r,i,n,o){if(!r){var s=ro(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Rt(e,t,!1,a,i,n,o);return f}function Rt(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Zn("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function no(e,t,r,i,n){--t.pendingcb,r?(process.nextTick(n,i),process.nextTick(ge,e,t),e._writableState.errorEmitted=!0,oe(e,i)):(n(i),e._writableState.errorEmitted=!0,oe(e,i),ge(e,t))}function oo(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function so(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Vn;if(oo(r),t)no(e,r,i,t,n);else{var o=ei(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&zr(e,r),i?process.nextTick(Xr,e,r,o,n):Xr(e,r,o,n)}}function Xr(e,t,r,i){r||ao(e,t),t.pendingcb--,i(),ge(e,t)}function ao(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function zr(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)n[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;n.allBuffers=a,Rt(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Jr(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,_=r.callback,g=t.objectMode?1:f.length;if(Rt(e,t,!1,g,f,c,_),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}x.prototype._write=function(e,t,r){r(new Yn("_write()"))};x.prototype._writev=null;x.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||uo(this,i,r),this};Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ei(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function fo(e,t){e._final(function(r){t.pendingcb--,r&&oe(e,r),t.prefinished=!0,e.emit("prefinish"),ge(e,t)})}function lo(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(fo,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function ge(e,t){var r=ei(t);if(r&&(lo(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function uo(e,t,r){t.ending=!0,ge(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function ho(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){!this._writableState||(this._writableState.destroyed=t)}});x.prototype.destroy=Tt.destroy;x.prototype._undestroy=Tt.undestroy;x.prototype._destroy=function(e,t){t(e)}});var V=h((xa,ii)=>{"use strict";var co=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};ii.exports=L;var ri=Bt(),Ot=At();Y()(L,ri);for(Ct=co(Ot.prototype),We=0;We<Ct.length;We++)Ge=Ct[We],L.prototype[Ge]||(L.prototype[Ge]=Ot.prototype[Ge]);var Ct,Ge,We;function L(e){if(!(this instanceof L))return new L(e);ri.call(this,e),Ot.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",po)))}Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function po(){this._writableState.ended||process.nextTick(_o,this)}function _o(e){e.end()}Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var si=h((Mt,oi)=>{var He=S("buffer"),N=He.Buffer;function ni(e,t){for(var r in e)t[r]=e[r]}N.from&&N.alloc&&N.allocUnsafe&&N.allocUnsafeSlow?oi.exports=He:(ni(He,Mt),Mt.Buffer=K);function K(e,t,r){return N(e,t,r)}K.prototype=Object.create(N.prototype);ni(N,K);K.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return N(e,t,r)};K.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=N(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};K.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return N(e)};K.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return He.SlowBuffer(e)}});var Lt=h(fi=>{"use strict";var It=si().Buffer,ai=It.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function go(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function bo(e){var t=go(e);if(typeof t!="string"&&(It.isEncoding===ai||!ai(e)))throw new Error("Unknown encoding: "+e);return t||e}fi.StringDecoder=xe;function xe(e){this.encoding=bo(e);var t;switch(this.encoding){case"utf16le":this.text=Eo,this.end=So,t=4;break;case"utf8":this.fillLast=vo,t=4;break;case"base64":this.text=Ro,this.end=To,t=3;break;default:this.write=Ao,this.end=Co;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=It.allocUnsafe(t)}xe.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};xe.prototype.end=wo;xe.prototype.text=mo;xe.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Dt(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function xo(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Dt(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Dt(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Dt(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function yo(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"�"}}function vo(e){var t=this.lastTotal-this.lastNeed,r=yo(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function mo(e,t){var r=xo(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function wo(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function Eo(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function So(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function Ro(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function To(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Ao(e){return e.toString(this.encoding)}function Co(e){return e&&e.length?this.write(e):""}});var $e=h((va,hi)=>{"use strict";var li=q().codes.ERR_STREAM_PREMATURE_CLOSE;function Oo(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}function Bo(){}function Mo(e){return e.setHeader&&typeof e.abort=="function"}function ui(e,t,r){if(typeof t=="function")return ui(e,null,t);t||(t={}),r=Oo(r||Bo);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||a()},s=e._writableState&&e._writableState.finished,a=function(){n=!1,s=!0,i||r.call(e)},f=e._readableState&&e._readableState.endEmitted,c=function(){i=!1,f=!0,n||r.call(e)},_=function(R){r.call(e,R)},g=function(){var R;if(i&&!f)return(!e._readableState||!e._readableState.ended)&&(R=new li),r.call(e,R);if(n&&!s)return(!e._writableState||!e._writableState.ended)&&(R=new li),r.call(e,R)},E=function(){e.req.on("finish",a)};return Mo(e)?(e.on("complete",a),e.on("abort",g),e.req?E():e.on("request",E)):n&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",c),e.on("finish",a),t.error!==!1&&e.on("error",_),e.on("close",g),function(){e.removeListener("complete",a),e.removeListener("abort",g),e.removeListener("request",E),e.req&&e.req.removeListener("finish",a),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",a),e.removeListener("end",c),e.removeListener("error",_),e.removeListener("close",g)}}hi.exports=ui});var di=h((ma,ci)=>{"use strict";var Ye;function U(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Do=$e(),W=Symbol("lastResolve"),Z=Symbol("lastReject"),ye=Symbol("error"),Ve=Symbol("ended"),X=Symbol("lastPromise"),Nt=Symbol("handlePromise"),J=Symbol("stream");function G(e,t){return{value:e,done:t}}function Io(e){var t=e[W];if(t!==null){var r=e[J].read();r!==null&&(e[X]=null,e[W]=null,e[Z]=null,t(G(r,!1)))}}function Lo(e){process.nextTick(Io,e)}function No(e,t){return function(r,i){e.then(function(){if(t[Ve]){r(G(void 0,!0));return}t[Nt](r,i)},i)}}var Po=Object.getPrototypeOf(function(){}),Fo=Object.setPrototypeOf((Ye={get stream(){return this[J]},next:function(){var t=this,r=this[ye];if(r!==null)return Promise.reject(r);if(this[Ve])return Promise.resolve(G(void 0,!0));if(this[J].destroyed)return new Promise(function(s,a){process.nextTick(function(){t[ye]?a(t[ye]):s(G(void 0,!0))})});var i=this[X],n;if(i)n=new Promise(No(i,this));else{var o=this[J].read();if(o!==null)return Promise.resolve(G(o,!1));n=new Promise(this[Nt])}return this[X]=n,n}},U(Ye,Symbol.asyncIterator,function(){return this}),U(Ye,"return",function(){var t=this;return new Promise(function(r,i){t[J].destroy(null,function(n){if(n){i(n);return}r(G(void 0,!0))})})}),Ye),Po),jo=function(t){var r,i=Object.create(Fo,(r={},U(r,J,{value:t,writable:!0}),U(r,W,{value:null,writable:!0}),U(r,Z,{value:null,writable:!0}),U(r,ye,{value:null,writable:!0}),U(r,Ve,{value:t._readableState.endEmitted,writable:!0}),U(r,Nt,{value:function(o,s){var a=i[J].read();a?(i[X]=null,i[W]=null,i[Z]=null,o(G(a,!1))):(i[W]=o,i[Z]=s)},writable:!0}),r));return i[X]=null,Do(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[Z];o!==null&&(i[X]=null,i[W]=null,i[Z]=null,o(n)),i[ye]=n;return}var s=i[W];s!==null&&(i[X]=null,i[W]=null,i[Z]=null,s(G(void 0,!0))),i[Ve]=!0}),t.on("readable",Lo.bind(null,i)),i};ci.exports=jo});var bi=h((wa,gi)=>{"use strict";function pi(e,t,r,i,n,o,s){try{var a=e[o](s),f=a.value}catch(c){r(c);return}a.done?t(f):Promise.resolve(f).then(i,n)}function qo(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var o=e.apply(t,r);function s(f){pi(o,i,n,s,a,"next",f)}function a(f){pi(o,i,n,s,a,"throw",f)}s(void 0)})}}function _i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function ko(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_i(Object(r),!0).forEach(function(i){Uo(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_i(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Uo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Wo=q().codes.ERR_INVALID_ARG_TYPE;function Go(e,t,r){var i;if(t&&typeof t.next=="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new Wo("iterable",["Iterable"],t);var n=new e(ko({objectMode:!0},r)),o=!1;n._read=function(){o||(o=!0,s())};function s(){return a.apply(this,arguments)}function a(){return a=qo(function*(){try{var f=yield i.next(),c=f.value,_=f.done;_?n.push(null):n.push(yield c)?s():o=!1}catch(g){n.destroy(g)}}),a.apply(this,arguments)}return n}gi.exports=Go});var Bt=h((Sa,Ai)=>{"use strict";Ai.exports=u;var se;u.ReadableState=mi;var Ea=S("events").EventEmitter,vi=function(t,r){return t.listeners(r).length},me=bt(),Ke=S("buffer").Buffer,Ho=global.Uint8Array||function(){};function $o(e){return Ke.from(e)}function Yo(e){return Ke.isBuffer(e)||e instanceof Ho}var Pt=S("util"),l;Pt&&Pt.debuglog?l=Pt.debuglog("stream"):l=function(){};var Vo=kr(),Gt=vt(),Ko=mt(),Zo=Ko.getHighWaterMark,Ze=q().codes,Xo=Ze.ERR_INVALID_ARG_TYPE,Jo=Ze.ERR_STREAM_PUSH_AFTER_EOF,Qo=Ze.ERR_METHOD_NOT_IMPLEMENTED,zo=Ze.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ae,Ft,jt;Y()(u,me);var ve=Gt.errorOrDestroy,qt=["error","close","destroy","pause","resume"];function es(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function mi(e,t,r){se=se||V(),e=e||{},typeof r!="boolean"&&(r=t instanceof se),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Zo(this,e,"readableHighWaterMark",r),this.buffer=new Vo,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ae||(ae=Lt().StringDecoder),this.decoder=new ae(e.encoding),this.encoding=e.encoding)}function u(e){if(se=se||V(),!(this instanceof u))return new u(e);var t=this instanceof se;this._readableState=new mi(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),me.call(this)}Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){!this._readableState||(this._readableState.destroyed=t)}});u.prototype.destroy=Gt.destroy;u.prototype._undestroy=Gt.undestroy;u.prototype._destroy=function(e,t){t(e)};u.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Ke.from(e,t),t=""),i=!0),wi(this,e,t,!1,i)};u.prototype.unshift=function(e){return wi(this,e,null,!0,!1)};function wi(e,t,r,i,n){l("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,is(e,o);else{var s;if(n||(s=ts(o,t)),s)ve(e,s);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Ke.prototype&&(t=$o(t)),i)o.endEmitted?ve(e,new zo):kt(e,o,t,!0);else if(o.ended)ve(e,new Jo);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?kt(e,o,t,!1):Wt(e,o)):kt(e,o,t,!1)}else i||(o.reading=!1,Wt(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function kt(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Xe(e)),Wt(e,t)}function ts(e,t){var r;return!Yo(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Xo("chunk",["string","Buffer","Uint8Array"],t)),r}u.prototype.isPaused=function(){return this._readableState.flowing===!1};u.prototype.setEncoding=function(e){ae||(ae=Lt().StringDecoder);var t=new ae(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var xi=1073741824;function rs(e){return e>=xi?e=xi:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function yi(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=rs(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}u.prototype.read=function(e){l("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return l("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Ut(this):Xe(this),null;if(e=yi(e,t),e===0&&t.ended)return t.length===0&&Ut(this),null;var i=t.needReadable;l("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,l("length less than watermark",i)),t.ended||t.reading?(i=!1,l("reading or ended",i)):i&&(l("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=yi(r,t)));var n;return e>0?n=Ri(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Ut(this)),n!==null&&this.emit("data",n),n};function is(e,t){if(l("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Xe(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,Ei(e)))}}function Xe(e){var t=e._readableState;l("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(Ei,e))}function Ei(e){var t=e._readableState;l("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Ht(e)}function Wt(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(ns,e,t))}function ns(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(l("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}u.prototype._read=function(e){ve(this,new Qo("_read()"))};u.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,o=n?a:d;i.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",s);function s(P,y){l("onunpipe"),P===r&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,_())}function a(){l("onend"),e.end()}var f=os(r);e.on("drain",f);var c=!1;function _(){l("cleanup"),e.removeListener("close",O),e.removeListener("finish",R),e.removeListener("drain",f),e.removeListener("error",E),e.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",d),r.removeListener("data",g),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&f()}r.on("data",g);function g(P){l("ondata");var y=e.write(P);l("dest.write",y),y===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&Ti(i.pipes,e)!==-1)&&!c&&(l("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function E(P){l("onerror",P),d(),e.removeListener("error",E),vi(e,"error")===0&&ve(e,P)}es(e,"error",E);function O(){e.removeListener("finish",R),d()}e.once("close",O);function R(){l("onfinish"),e.removeListener("close",O),d()}e.once("finish",R);function d(){l("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(l("pipe resume"),r.resume()),e};function os(e){return function(){var r=e._readableState;l("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&vi(e,"data")&&(r.flowing=!0,Ht(e))}}u.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=Ti(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};u.prototype.on=function(e,t){var r=me.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,l("on readable",i.length,i.reading),i.length?Xe(this):i.reading||process.nextTick(ss,this)),r};u.prototype.addListener=u.prototype.on;u.prototype.removeListener=function(e,t){var r=me.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(Si,this),r};u.prototype.removeAllListeners=function(e){var t=me.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(Si,this),t};function Si(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function ss(e){l("readable nexttick read 0"),e.read(0)}u.prototype.resume=function(){var e=this._readableState;return e.flowing||(l("resume"),e.flowing=!e.readableListening,as(this,e)),e.paused=!1,this};function as(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(fs,e,t))}function fs(e,t){l("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Ht(e),t.flowing&&!t.reading&&e.read(0)}u.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ht(e){var t=e._readableState;for(l("flow",t.flowing);t.flowing&&e.read()!==null;);}u.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(l("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(l("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var a=t.push(s);a||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=function(a){return function(){return e[a].apply(e,arguments)}}(n));for(var o=0;o<qt.length;o++)e.on(qt[o],this.emit.bind(this,qt[o]));return this._read=function(s){l("wrapped _read",s),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(u.prototype[Symbol.asyncIterator]=function(){return Ft===void 0&&(Ft=di()),Ft(this)});Object.defineProperty(u.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(u.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(u.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});u._fromList=Ri;Object.defineProperty(u.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ri(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Ut(e){var t=e._readableState;l("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(ls,t,e))}function ls(e,t){if(l("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(u.from=function(e,t){return jt===void 0&&(jt=bi()),jt(u,e,t)});function Ti(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var $t=h((Ra,Oi)=>{"use strict";Oi.exports=j;var Je=q().codes,us=Je.ERR_METHOD_NOT_IMPLEMENTED,hs=Je.ERR_MULTIPLE_CALLBACK,cs=Je.ERR_TRANSFORM_ALREADY_TRANSFORMING,ds=Je.ERR_TRANSFORM_WITH_LENGTH_0,Qe=V();Y()(j,Qe);function ps(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new hs);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function j(e){if(!(this instanceof j))return new j(e);Qe.call(this,e),this._transformState={afterTransform:ps.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",_s)}function _s(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Ci(e,t,r)}):Ci(this,null,null)}j.prototype.push=function(e,t){return this._transformState.needTransform=!1,Qe.prototype.push.call(this,e,t)};j.prototype._transform=function(e,t,r){r(new us("_transform()"))};j.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};j.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};j.prototype._destroy=function(e,t){Qe.prototype._destroy.call(this,e,function(r){t(r)})};function Ci(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new ds;if(e._transformState.transforming)throw new cs;return e.push(null)}});var Di=h((Ta,Mi)=>{"use strict";Mi.exports=we;var Bi=$t();Y()(we,Bi);function we(e){if(!(this instanceof we))return new we(e);Bi.call(this,e)}we.prototype._transform=function(e,t,r){r(null,e)}});var Fi=h((Aa,Pi)=>{"use strict";var Yt;function gs(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Ni=q().codes,bs=Ni.ERR_MISSING_ARGS,xs=Ni.ERR_STREAM_DESTROYED;function Ii(e){if(e)throw e}function ys(e){return e.setHeader&&typeof e.abort=="function"}function vs(e,t,r,i){i=gs(i);var n=!1;e.on("close",function(){n=!0}),Yt===void 0&&(Yt=$e()),Yt(e,{readable:t,writable:r},function(s){if(s)return i(s);n=!0,i()});var o=!1;return function(s){if(!n&&!o){if(o=!0,ys(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(s||new xs("pipe"))}}}function Li(e){e()}function ms(e,t){return e.pipe(t)}function ws(e){return!e.length||typeof e[e.length-1]!="function"?Ii:e.pop()}function Es(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=ws(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new bs("streams");var n,o=t.map(function(s,a){var f=a<t.length-1,c=a>0;return vs(s,f,c,function(_){n||(n=_),_&&o.forEach(Li),!f&&(o.forEach(Li),i(n))})});return t.reduce(ms)}Pi.exports=Es});var ji=h((C,Se)=>{var Ee=S("stream");process.env.READABLE_STREAM==="disable"&&Ee?(Se.exports=Ee.Readable,Object.assign(Se.exports,Ee),Se.exports.Stream=Ee):(C=Se.exports=Bt(),C.Stream=Ee||C,C.Readable=C,C.Writable=At(),C.Duplex=V(),C.Transform=$t(),C.PassThrough=Di(),C.finished=$e(),C.pipeline=Fi())});var Ui=h((Ca,ki)=>{"use strict";var{Buffer:D}=S("buffer"),qi=Symbol.for("BufferList");function p(e){if(!(this instanceof p))return new p(e);p._init.call(this,e)}p._init=function(t){Object.defineProperty(this,qi,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)};p.prototype._new=function(t){return new p(t)};p.prototype._offset=function(t){if(t===0)return[0,0];let r=0;for(let i=0;i<this._bufs.length;i++){let n=r+this._bufs[i].length;if(t<n||i===this._bufs.length-1)return[i,t-r];r=n}};p.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let i=0;i<t;i++)r+=this._bufs[i].length;return r};p.prototype.get=function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]};p.prototype.slice=function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)};p.prototype.copy=function(t,r,i,n){if((typeof i!="number"||i<0)&&(i=0),(typeof n!="number"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return t||D.alloc(0);let o=!!t,s=this._offset(i),a=n-i,f=a,c=o&&r||0,_=s[1];if(i===0&&n===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:D.concat(this._bufs,this.length);for(let g=0;g<this._bufs.length;g++)this._bufs[g].copy(t,c),c+=this._bufs[g].length;return t}if(f<=this._bufs[s[0]].length-_)return o?this._bufs[s[0]].copy(t,r,_,_+f):this._bufs[s[0]].slice(_,_+f);o||(t=D.allocUnsafe(a));for(let g=s[0];g<this._bufs.length;g++){let E=this._bufs[g].length-_;if(f>E)this._bufs[g].copy(t,c,_),c+=E;else{this._bufs[g].copy(t,c,_,_+f),c+=E;break}f-=E,_&&(_=0)}return t.length>c?t.slice(0,c):t};p.prototype.shallowSlice=function(t,r){if(t=t||0,r=typeof r!="number"?this.length:r,t<0&&(t+=this.length),r<0&&(r+=this.length),t===r)return this._new();let i=this._offset(t),n=this._offset(r),o=this._bufs.slice(i[0],n[0]+1);return n[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),i[1]!==0&&(o[0]=o[0].slice(i[1])),this._new(o)};p.prototype.toString=function(t,r,i){return this.slice(r,i).toString(t)};p.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};p.prototype.duplicate=function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t};p.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(D.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(D.from(t));return this};p.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};p.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t=="string"&&(r=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=D.from([e]):typeof e=="string"?e=D.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=D.from(e.buffer,e.byteOffset,e.byteLength):D.isBuffer(e)||(e=D.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;let i=this._offset(t),n=i[0],o=i[1];for(;n<this._bufs.length;n++){let s=this._bufs[n];for(;o<s.length;)if(s.length-o>=e.length){let f=s.indexOf(e,o);if(f!==-1)return this._reverseOffset([n,f]);o=s.length-e.length+1}else{let f=this._reverseOffset([n,o]);if(this._match(f,e))return f;o++}o=0}return-1};p.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in e)(function(r){e[r]===null?p.prototype[r]=function(i,n){return this.slice(i,i+n)[r](0,n)}:p.prototype[r]=function(i=0){return this.slice(i,i+e[r])[r](0)}})(t)})();p.prototype._isBufferList=function(t){return t instanceof p||p.isBufferList(t)};p.isBufferList=function(t){return t!=null&&t[qi]};ki.exports=p});var Wi=h((Oa,ze)=>{"use strict";var Vt=ji().Duplex,Ss=Y(),Re=Ui();function w(e){if(!(this instanceof w))return new w(e);if(typeof e=="function"){this._callback=e;let t=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",t)}),this.on("unpipe",function(i){i.removeListener("error",t)}),e=null}Re._init.call(this,e),Vt.call(this)}Ss(w,Vt);Object.assign(w.prototype,Re.prototype);w.prototype._new=function(t){return new w(t)};w.prototype._write=function(t,r,i){this._appendBuffer(t),typeof i=="function"&&i()};w.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};w.prototype.end=function(t){Vt.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};w.prototype._destroy=function(t,r){this._bufs.length=0,this.length=0,r(t)};w.prototype._isBufferList=function(t){return t instanceof w||t instanceof Re||w.isBufferList(t)};w.isBufferList=Re.isBufferList;ze.exports=w;ze.exports.BufferListStream=w;ze.exports.BufferList=Re});import tt from"node:process";var Qt=(e=0)=>t=>`\x1B[${t+e}m`,zt=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,er=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`;function Ji(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,i]of Object.entries(t)){for(let[n,o]of Object.entries(i))t[n]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},i[n]=t[n],e.set(o[0],o[1]);Object.defineProperty(t,r,{value:i,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",t.color.ansi=Qt(),t.color.ansi256=zt(),t.color.ansi16m=er(),t.bgColor.ansi=Qt(10),t.bgColor.ansi256=zt(10),t.bgColor.ansi16m=er(10),Object.defineProperties(t,{rgbToAnsi256:{value:(r,i,n)=>r===i&&i===n?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:r=>{let i=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(r.toString(16));if(!i)return[0,0,0];let{colorString:n}=i.groups;n.length===3&&(n=[...n].map(s=>s+s).join(""));let o=Number.parseInt(n,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:r=>t.rgbToAnsi256(...t.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value:r=>{if(r<8)return 30+r;if(r<16)return 90+(r-8);let i,n,o;if(r>=232)i=((r-232)*10+8)/255,n=i,o=i;else{r-=16;let f=r%36;i=Math.floor(r/36)/5,n=Math.floor(f/6)/5,o=f%6/5}let s=Math.max(i,n,o)*2;if(s===0)return 30;let a=30+(Math.round(o)<<2|Math.round(n)<<1|Math.round(i));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(r,i,n)=>t.ansi256ToAnsi(t.rgbToAnsi256(r,i,n)),enumerable:!1},hexToAnsi:{value:r=>t.ansi256ToAnsi(t.hexToAnsi256(r)),enumerable:!1}}),t}var Qi=Ji(),B=Qi;import ot from"node:process";import zi from"node:os";import tr from"node:tty";function T(e,t=ot.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(r+e),n=t.indexOf("--");return i!==-1&&(n===-1||i<n)}var{env:v}=ot,Ae;T("no-color")||T("no-colors")||T("color=false")||T("color=never")?Ae=0:(T("color")||T("colors")||T("color=true")||T("color=always"))&&(Ae=1);function en(){if("FORCE_COLOR"in v)return v.FORCE_COLOR==="true"?1:v.FORCE_COLOR==="false"?0:v.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(v.FORCE_COLOR,10),3)}function tn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function rn(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let i=en();i!==void 0&&(Ae=i);let n=r?Ae:i;if(n===0)return 0;if(r){if(T("color=16m")||T("color=full")||T("color=truecolor"))return 3;if(T("color=256"))return 2}if(e&&!t&&n===void 0)return 0;let o=n||0;if(v.TERM==="dumb")return o;if(ot.platform==="win32"){let s=zi.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in v)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(s=>s in v)||v.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in v)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(v.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in v&&"AGENT_NAME"in v)return 1;if(v.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in v){let s=Number.parseInt((v.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(v.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(v.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(v.TERM)||"COLORTERM"in v?1:o}function rr(e,t={}){let r=rn(e,{streamIsTTY:e&&e.isTTY,...t});return tn(r)}var nn={stdout:rr({isTTY:tr.isatty(1)}),stderr:rr({isTTY:tr.isatty(2)})},ir=nn;function nr(e,t,r){let i=e.indexOf(t);if(i===-1)return e;let n=t.length,o=0,s="";do s+=e.substr(o,i-o)+t+r,o=i+n,i=e.indexOf(t,o);while(i!==-1);return s+=e.slice(o),s}function or(e,t,r,i){let n=0,o="";do{let s=e[i-1]==="\r";o+=e.substr(n,(s?i-1:i)-n)+t+(s?`\r
5
+ `:`
6
+ `)+r,n=i+1,i=e.indexOf(`
7
+ `,n)}while(i!==-1);return o+=e.slice(n),o}var{stdout:sr,stderr:ar}=ir,st=Symbol("GENERATOR"),Q=Symbol("STYLER"),ue=Symbol("IS_EMPTY"),fr=["ansi","ansi","ansi256","ansi16m"],z=Object.create(null),on=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=sr?sr.level:0;e.level=t.level===void 0?r:t.level};var sn=e=>{let t=(...r)=>r.join(" ");return on(t,e),Object.setPrototypeOf(t,he.prototype),t};function he(e){return sn(e)}Object.setPrototypeOf(he.prototype,Function.prototype);for(let[e,t]of Object.entries(B))z[e]={get(){let r=Ce(this,ft(t.open,t.close,this[Q]),this[ue]);return Object.defineProperty(this,e,{value:r}),r}};z.visible={get(){let e=Ce(this,this[Q],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var at=(e,t,r,...i)=>e==="rgb"?t==="ansi16m"?B[r].ansi16m(...i):t==="ansi256"?B[r].ansi256(B.rgbToAnsi256(...i)):B[r].ansi(B.rgbToAnsi(...i)):e==="hex"?at("rgb",t,r,...B.hexToRgb(...i)):B[r][e](...i),an=["rgb","hex","ansi256"];for(let e of an){z[e]={get(){let{level:r}=this;return function(...i){let n=ft(at(e,fr[r],"color",...i),B.color.close,this[Q]);return Ce(this,n,this[ue])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);z[t]={get(){let{level:r}=this;return function(...i){let n=ft(at(e,fr[r],"bgColor",...i),B.bgColor.close,this[Q]);return Ce(this,n,this[ue])}}}}var fn=Object.defineProperties(()=>{},{...z,level:{enumerable:!0,get(){return this[st].level},set(e){this[st].level=e}}}),ft=(e,t,r)=>{let i,n;return r===void 0?(i=e,n=t):(i=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:i,closeAll:n,parent:r}},Ce=(e,t,r)=>{let i=(...n)=>ln(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,fn),i[st]=e,i[Q]=t,i[ue]=r,i},ln=(e,t)=>{if(e.level<=0||!t)return e[ue]?"":t;let r=e[Q];if(r===void 0)return t;let{openAll:i,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=nr(t,r.close,r.open),r=r.parent;let o=t.indexOf(`
8
+ `);return o!==-1&&(t=or(t,n,i,o)),i+t+n};Object.defineProperties(he.prototype,z);var un=he(),Fs=he({level:ar?ar.level:0});var M=un;import wr from"node:process";var yr=le(cr(),1),vr=le(xr(),1);import cn from"node:process";var dn=(0,yr.default)(()=>{(0,vr.default)(()=>{cn.stderr.write("\x1B[?25h")},{alwaysLast:!0})}),mr=dn;var Ne=!1,ie={};ie.show=(e=wr.stderr)=>{!e.isTTY||(Ne=!1,e.write("\x1B[?25h"))};ie.hide=(e=wr.stderr)=>{!e.isTTY||(mr(),Ne=!0,e.write("\x1B[?25l"))};ie.toggle=(e,t)=>{e!==void 0&&(Ne=e),Ne?ie.show(t):ie.hide(t)};var ct=ie;var Te=le(Tr(),1);import F from"node:process";function de(){return F.platform!=="win32"?F.env.TERM!=="linux":Boolean(F.env.CI)||Boolean(F.env.WT_SESSION)||F.env.ConEmuTask==="{cmd::Cmder}"||F.env.TERM_PROGRAM==="vscode"||F.env.TERM==="xterm-256color"||F.env.TERM==="alacritty"||F.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var _n={info:M.blue("ℹ"),success:M.green("✔"),warning:M.yellow("⚠"),error:M.red("✖")},gn={info:M.blue("i"),success:M.green("√"),warning:M.yellow("‼"),error:M.red("×")},bn=de()?_n:gn,pe=bn;function dt({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function pt(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(dt(),"")}var Hi=le(Nr(),1);function gt({stream:e=process.stdout}={}){return Boolean(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Gi=le(Wi(),1);import I from"node:process";import Rs from"node:readline";var Ts=3,et=class{#r=0;#u=new Gi.BufferListStream;#n;#i;constructor(){this.#u.pipe(I.stdout);let t=this;this.#n=function(r,i,...n){let{stdin:o}=I;if(t.#r>0||o.emit===t.#n){if(r==="keypress")return;r==="data"&&i.includes(Ts)&&I.emit("SIGINT"),Reflect.apply(t.#n,this,[r,i,...n])}else Reflect.apply(I.stdin.emit,this,[r,i,...n])}}start(){this.#r++,this.#r===1&&this._realStart()}stop(){if(this.#r<=0)throw new Error("`stop` called more times than `start`");this.#r--,this.#r===0&&this._realStop()}_realStart(){I.platform!=="win32"&&(this.#i=Rs.createInterface({input:I.stdin,output:this.#u}),this.#i.on("SIGINT",()=>{I.listenerCount("SIGINT")===0?I.emit("SIGINT"):(this.#i.close(),I.kill(I.pid,"SIGINT"))}))}_realStop(){I.platform!=="win32"&&(this.#i.close(),this.#i=void 0)}};var rt,Kt=class{#r=0;#u=!1;#n=0;#i=0;#e;#s;#t;#h;#c;#a;#f;#l;#d;#o;color;constructor(t){rt||(rt=new et),typeof t=="string"&&(t={text:t}),this.#e={color:"cyan",stream:tt.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#e.color,this.spinner=this.#e.spinner,this.#c=this.#e.interval,this.#t=this.#e.stream,this.#a=typeof this.#e.isEnabled=="boolean"?this.#e.isEnabled:gt({stream:this.#t}),this.#f=typeof this.#e.isSilent=="boolean"?this.#e.isSilent:!1,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.indent=this.#e.indent,tt.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#a,Object.defineProperty(this,"_linesToClear",{get(){return this.#r},set(r){this.#r=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#n}}))}get indent(){return this.#l}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#l=t,this.updateLineCount()}get interval(){return this.#c||this.#s.interval||100}get spinner(){return this.#s}set spinner(t){if(this.#i=0,this.#c=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#s=t}else if(!de())this.#s=Te.default.line;else if(t===void 0)this.#s=Te.default.dots;else if(t!=="default"&&Te.default[t])this.#s=Te.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#d}set text(t){this.#d=t||"",this.updateLineCount()}get prefixText(){return this.#o}set prefixText(t){this.#o=t||"",this.updateLineCount()}get isSpinning(){return this.#h!==void 0}getFullPrefixText(t=this.#o,r=" "){return typeof t=="string"&&t!==""?t+r:typeof t=="function"?t()+r:""}updateLineCount(){let t=this.#t.columns||80,r=this.getFullPrefixText(this.#o,"-");this.#n=0;for(let i of pt(" ".repeat(this.#l)+r+"--"+this.#d).split(`
9
+ `))this.#n+=Math.max(1,Math.ceil((0,Hi.default)(i)/t))}get isEnabled(){return this.#a&&!this.#f}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#a=t}get isSilent(){return this.#f}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#f=t}frame(){let{frames:t}=this.#s,r=t[this.#i];this.color&&(r=M[this.color](r)),this.#i=++this.#i%t.length;let i=typeof this.#o=="string"&&this.#o!==""?this.#o+" ":"",n=typeof this.text=="string"?" "+this.text:"";return i+r+n}clear(){if(!this.#a||!this.#t.isTTY)return this;this.#t.cursorTo(0);for(let t=0;t<this.#r;t++)t>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);return(this.#l||this.lastIndent!==this.#l)&&this.#t.cursorTo(this.#l),this.lastIndent=this.#l,this.#r=0,this}render(){return this.#f?this:(this.clear(),this.#t.write(this.frame()),this.#r=this.#n,this)}start(t){return t&&(this.text=t),this.#f?this:this.#a?this.isSpinning?this:(this.#e.hideCursor&&ct.hide(this.#t),this.#e.discardStdin&&tt.stdin.isTTY&&(this.#u=!0,rt.start()),this.render(),this.#h=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#t.write(`- ${this.text}
10
+ `),this)}stop(){return this.#a?(clearInterval(this.#h),this.#h=void 0,this.#i=0,this.clear(),this.#e.hideCursor&&ct.show(this.#t),this.#e.discardStdin&&tt.stdin.isTTY&&this.#u&&(rt.stop(),this.#u=!1),this):this}succeed(t){return this.stopAndPersist({symbol:pe.success,text:t})}fail(t){return this.stopAndPersist({symbol:pe.error,text:t})}warn(t){return this.stopAndPersist({symbol:pe.warning,text:t})}info(t){return this.stopAndPersist({symbol:pe.info,text:t})}stopAndPersist(t={}){if(this.#f)return this;let r=t.prefixText||this.#o,i=t.text||this.text,n=typeof i=="string"?" "+i:"";return this.stop(),this.#t.write(`${this.getFullPrefixText(r," ")}${t.symbol||" "}${n}
11
+ `),this}};function Zt(e){return new Kt(e)}var Ga=async(e,t)=>{let r=Zt(t.start);try{await e(),r.succeed(t.success)}catch(i){throw r.fail(t.error),i}};export{Ga as showProgress};
12
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -1 +1,12 @@
1
- import{readFileSync as c}from"fs";import{createDebugLogger as d,log as a}from"debug-logging";import m from"chalk";function g(n){return new Promise((e,r)=>{const t=[];function i(o){t.push(o)}function s(){u(),e(Buffer.concat(t))}function f(o){u(),r(o)}function u(){n.removeListener("data",i),n.removeListener("end",s),n.removeListener("error",f)}n.on("data",i),n.on("end",s),n.on("error",f)})}const p=async()=>{const n=d(p);n.log("Reading stdin");try{const r=c(0).toString();if(r)return n.log("Found stdin",{stdin:r}),r}catch(r){n.log("Could not read stdin",{e:r})}return a(m.gray("Type your source code. Press Ctrl+D to finish.")),(await g(process.stdin)).toString()};export{p as readStdin};
1
+
2
+ typeof document>"u"&&await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
3
+
4
+ import{readFileSync as Z}from"fs";var v={NODE_ENV:"production"};try{let{env:r}=await import("process");r.NODE_ENV&&(v.NODE_ENV=r.NODE_ENV)}catch{}var O=typeof window>"u"&&v.NODE_ENV==="development";import{Console as X}from"console";var N=(r=0)=>e=>`\x1B[${e+r}m`,x=(r=0)=>e=>`\x1B[${38+r};5;${e}m`,M=(r=0)=>(e,o,t)=>`\x1B[${38+r};2;${e};${o};${t}m`;function j(){let r=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[o,t]of Object.entries(e)){for(let[n,s]of Object.entries(t))e[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},t[n]=e[n],r.set(s[0],s[1]);Object.defineProperty(e,o,{value:t,enumerable:!1})}return Object.defineProperty(e,"codes",{value:r,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=N(),e.color.ansi256=x(),e.color.ansi16m=M(),e.bgColor.ansi=N(10),e.bgColor.ansi256=x(10),e.bgColor.ansi16m=M(10),Object.defineProperties(e,{rgbToAnsi256:{value:(o,t,n)=>o===t&&t===n?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:o=>{let t=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(o.toString(16));if(!t)return[0,0,0];let{colorString:n}=t.groups;n.length===3&&(n=[...n].map(l=>l+l).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:o=>e.rgbToAnsi256(...e.hexToRgb(o)),enumerable:!1},ansi256ToAnsi:{value:o=>{if(o<8)return 30+o;if(o<16)return 90+(o-8);let t,n,s;if(o>=232)t=((o-232)*10+8)/255,n=t,s=t;else{o-=16;let f=o%36;t=Math.floor(o/36)/5,n=Math.floor(f/6)/5,s=f%6/5}let l=Math.max(t,n,s)*2;if(l===0)return 30;let b=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(t));return l===2&&(b+=60),b},enumerable:!1},rgbToAnsi:{value:(o,t,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(o,t,n)),enumerable:!1},hexToAnsi:{value:o=>e.ansi256ToAnsi(e.hexToAnsi256(o)),enumerable:!1}}),e}var $=j(),c=$;import C from"node:process";import k from"node:os";import S from"node:tty";function u(r,e=C.argv){let o=r.startsWith("-")?"":r.length===1?"-":"--",t=e.indexOf(o+r),n=e.indexOf("--");return t!==-1&&(n===-1||t<n)}var{env:i}=C,E;u("no-color")||u("no-colors")||u("color=false")||u("color=never")?E=0:(u("color")||u("colors")||u("color=true")||u("color=always"))&&(E=1);function V(){if("FORCE_COLOR"in i)return i.FORCE_COLOR==="true"?1:i.FORCE_COLOR==="false"?0:i.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(i.FORCE_COLOR,10),3)}function Y(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function U(r,{streamIsTTY:e,sniffFlags:o=!0}={}){let t=V();t!==void 0&&(E=t);let n=o?E:t;if(n===0)return 0;if(o){if(u("color=16m")||u("color=full")||u("color=truecolor"))return 3;if(u("color=256"))return 2}if(r&&!e&&n===void 0)return 0;let s=n||0;if(i.TERM==="dumb")return s;if(C.platform==="win32"){let l=k.release().split(".");return Number(l[0])>=10&&Number(l[2])>=10586?Number(l[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(l=>l in i)||i.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in i&&"AGENT_NAME"in i)return 1;if(i.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in i){let l=Number.parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:s}function I(r,e={}){let o=U(r,{streamIsTTY:r&&r.isTTY,...e});return Y(o)}var K={stdout:I({isTTY:S.isatty(1)}),stderr:I({isTTY:S.isatty(2)})},F=K;function L(r,e,o){let t=r.indexOf(e);if(t===-1)return r;let n=e.length,s=0,l="";do l+=r.substr(s,t-s)+e+o,s=t+n,t=r.indexOf(e,s);while(t!==-1);return l+=r.slice(s),l}function w(r,e,o,t){let n=0,s="";do{let l=r[t-1]==="\r";s+=r.substr(n,(l?t-1:t)-n)+e+(l?`\r
5
+ `:`
6
+ `)+o,n=t+1,t=r.indexOf(`
7
+ `,n)}while(t!==-1);return s+=r.slice(n),s}var{stdout:_,stderr:P}=F,R=Symbol("GENERATOR"),g=Symbol("STYLER"),d=Symbol("IS_EMPTY"),D=["ansi","ansi","ansi256","ansi16m"],p=Object.create(null),W=(r,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let o=_?_.level:0;r.level=e.level===void 0?o:e.level};var J=r=>{let e=(...o)=>o.join(" ");return W(e,r),Object.setPrototypeOf(e,h.prototype),e};function h(r){return J(r)}Object.setPrototypeOf(h.prototype,Function.prototype);for(let[r,e]of Object.entries(c))p[r]={get(){let o=T(this,B(e.open,e.close,this[g]),this[d]);return Object.defineProperty(this,r,{value:o}),o}};p.visible={get(){let r=T(this,this[g],!0);return Object.defineProperty(this,"visible",{value:r}),r}};var y=(r,e,o,...t)=>r==="rgb"?e==="ansi16m"?c[o].ansi16m(...t):e==="ansi256"?c[o].ansi256(c.rgbToAnsi256(...t)):c[o].ansi(c.rgbToAnsi(...t)):r==="hex"?y("rgb",e,o,...c.hexToRgb(...t)):c[o][r](...t),H=["rgb","hex","ansi256"];for(let r of H){p[r]={get(){let{level:o}=this;return function(...t){let n=B(y(r,D[o],"color",...t),c.color.close,this[g]);return T(this,n,this[d])}}};let e="bg"+r[0].toUpperCase()+r.slice(1);p[e]={get(){let{level:o}=this;return function(...t){let n=B(y(r,D[o],"bgColor",...t),c.bgColor.close,this[g]);return T(this,n,this[d])}}}}var q=Object.defineProperties(()=>{},{...p,level:{enumerable:!0,get(){return this[R].level},set(r){this[R].level=r}}}),B=(r,e,o)=>{let t,n;return o===void 0?(t=r,n=e):(t=o.openAll+r,n=e+o.closeAll),{open:r,close:e,openAll:t,closeAll:n,parent:o}},T=(r,e,o)=>{let t=(...n)=>z(t,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(t,q),t[R]=r,t[g]=e,t[d]=o,t},z=(r,e)=>{if(r.level<=0||!e)return r[d]?"":e;let o=r[g];if(o===void 0)return e;let{openAll:t,closeAll:n}=o;if(e.includes("\x1B"))for(;o!==void 0;)e=L(e,o.close,o.open),o=o.parent;let s=e.indexOf(`
8
+ `);return s!==-1&&(e=w(e,n,t,s)),t+e+n};Object.defineProperties(h.prototype,p);var Q=h(),ge=h({level:P?P.level:0});var m=Q;var a=new X({stdout:process.stdout,stderr:process.stderr,groupIndentation:4}),A=r=>{if(O){let{name:e}=r;return{log(...o){let t=m.bgBlue.white(` [${e}] `);a.log(`${t}`,`
9
+
10
+ `,...o),a.log()},group(){a.log();let o=m.bgBlue.white(` [${e}] `);a.group(o),a.log()},groupEnd(){a.log(`
11
+ `,"-".repeat(20),`
12
+ `),a.groupEnd()}}}else return{log(){},group(){},groupEnd(){}}};var G=(...r)=>{console.log(),console.log(...r),console.log()};function ee(r){return new Promise((e,o)=>{let t=[];function n(f){t.push(f)}function s(){b(),e(Buffer.concat(t))}function l(f){b(),o(f)}function b(){r.removeListener("data",n),r.removeListener("end",s),r.removeListener("error",l)}r.on("data",n),r.on("end",s),r.on("error",l)})}var re=async()=>{let r=A(re);r.log("Reading stdin");try{let o=Z(0).toString();if(o)return r.log("Found stdin",{stdin:o}),o}catch(o){r.log("Could not read stdin",{e:o})}return G(m.gray("Type your source code. Press Ctrl+D to finish.")),(await ee(process.stdin)).toString()};export{re as readStdin};
package/package.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "name": "@tsmodule/tsmodule",
3
3
  "platform": "node",
4
4
  "type": "module",
5
- "version": "40.0.13",
5
+ "version": "40.0.16",
6
6
  "repository": "tsmodule/tsmodule",
7
7
  "description": "TypeScript Module loader and compiler",
8
8
  "license": "MIT",
9
9
  "types": "dist/types/index.d.ts",
10
10
  "bin": {
11
- "tsmodule": "dist/bin/index.js"
11
+ "tsmodule": "dist/bin.js"
12
12
  },
13
13
  "exports": {
14
14
  ".": "./dist/index.js",
@@ -17,27 +17,24 @@
17
17
  },
18
18
  "files": [
19
19
  "dist/",
20
- "templates/",
21
- "templates/**/.gitignore"
20
+ "dist/templates/",
21
+ "dist/templates/**/.gitignore"
22
22
  ],
23
23
  "engines": {
24
24
  "node": ">=14"
25
25
  },
26
26
  "scripts": {
27
- "prebootload": "node bootstrap.js",
27
+ "prebootload": "node scripts/bootstrap.js",
28
28
  "bootload": "node --no-warnings --loader ./dist/loader/index.js src/index.ts build -r",
29
29
  "prebuild": "yarn bootload && yarn link",
30
- "build": "node dist/bin/index.js build",
31
- "dev": "node dist/bin/index.js dev",
32
- "test-bundle": "yarn build && ava --no-worker-threads",
33
- "test-production-bundle": "node runBundleTests.js",
30
+ "build": "node dist/bin.js build",
31
+ "dev": "node dist/bin.js dev",
32
+ "test-bundle": "yarn build -b && ava --no-worker-threads",
34
33
  "test": "yarn test-bundle",
35
34
  "retest": "SKIP_TEST_SETUP=1 yarn test-bundle",
36
35
  "retest-bundle": "SKIP_TEST_SETUP=1 yarn test-bundle",
37
36
  "lint": "eslint --fix src",
38
- "prepare": "yarn build",
39
- "prepublishOnly": "yarn test-production-bundle",
40
- "release": "release-it"
37
+ "prepublishOnly": "node scripts/prepublish.js"
41
38
  },
42
39
  "dependencies": {
43
40
  "esbuild": "0.14.50",
@@ -84,7 +81,7 @@
84
81
  },
85
82
  "nodeArguments": [
86
83
  "--no-warnings",
87
- "--loader=@tsmodule/tsmodule/loader"
84
+ "--loader=./dist/loader/index.js"
88
85
  ]
89
86
  },
90
87
  "keywords": [
package/dist/bin/index.js DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- import t from"chalk";import{Command as n}from"commander";import{build as r}from"../commands/build/index.js";import{convert as a}from"../commands/convert/index.js";import{create as s}from"../commands/create/index.js";import{dev as m}from"../commands/dev/index.js";import{execute as d}from"../commands/execute/index.js";import{localPackageJson as p}from"../constants.js";import{normalizeImportSpecifiers as c}from"../commands/normalize/index.js";import{programCatch as e}from"../utils/programCatch.js";const{version:l}=await p(),o=new n;o.name(t.white(t.bold("tsmodule"))).usage(t.white(t.bold("<file | command> [options]"))).description(t.blueBright(`A tool for building TypeScript modules.
3
-
4
- Run TS directly: ${t.bold("tsmodule src/index.ts")}
5
- Use a command: ${t.bold("tsmodule build")}`)).version(String(l)),o.command("dev").description("Build and watch for changes.").action(e(m)),o.command("build").description("Builds TS files to output in dist/.").option("-i, --input <files>","Entrypoints to compile.").option("-j, --js-only","Do not build styles").option("-s, --styles <styles>","Specify stylesheet entrypoint.").option("-t, --target <target>","ECMAScript featureset to target.").option("-b, --bundle","Bundle dependencies into entrypoints.").option("-d, --dev","Build development runtime.").option("-r, --runtime-only","Do not emit type declarations, only build JS runtime.").option("--stdin [source]","Read from a string or stdin.").option("--stdin-file [file]","File path to mock for stdin.").option("--no-write",`Return code from build() rather than write to disk.
6
- For programmatic use alongside { stdin: ... }.`).action(e(async i=>{await r(i)})),o.command("create <name>").option("--react","Create React component library with Next.js").description("Create a new project.").action(e(s)),o.command("convert").description("Convert an existing project to a TS module.").action(e(a)),o.command("normalize [files]").description(`Rewrites import specifiers in files to ESM-compliant paths.
7
- (default: dist/**/*.js)`).action(e(async({files:i})=>{await c(i)})),o.command("execute",{isDefault:!0}).argument("<file>","The file to execute.").option("--d, --dev","Enable development mode").description("Run the given TS program, analogous to `node <file>`.").action(e(d)),o.parse(process.argv);