UNPKG

app-lib-trans-storage

Version:

文本文件进行转换JSON存储,常用于exec执行文件场景

3 lines 47.1 kB
/*! For license information please see index-bundle-min.js.LICENSE.txt */ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("app-lib-nobuild"),require("child_process"),require("fs"),require("os"),require("path"),require("readline"));else if("function"==typeof define&&define.amd)define(["app-lib-nobuild","child_process","fs","os","path","readline"],t);else{var r="object"==typeof exports?t(require("app-lib-nobuild"),require("child_process"),require("fs"),require("os"),require("path"),require("readline")):t(e["app-lib-nobuild"],e.child_process,e.fs,e.os,e.path,e.readline);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,((e,t,r,o,n,s)=>{return i={798:function(e){var t;t=()=>(()=>{"use strict";var e={d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{ENV:()=>r,bindToGlobal:()=>c,default:()=>u,getEnv:()=>o,getGlobal:()=>i,getbindData:()=>l,isBindToGlobal:()=>a,isBroswerEnv:()=>s,isNodeEnv:()=>n});const r={NODE:"node",BROWSER:"browser"},o=()=>{let e=i();return e.window==e?r.BROWSER:r.NODE},n=()=>o()===r.NODE,s=()=>o()===r.BROWSER,i=()=>{let t;return"object"==typeof e.g?t=e.g:"object"==typeof window&&(t=window),t},l=e=>{let t=i();if(!t)throw new Error("未找到当前环境的全局变量");return t[e]},c=(e,t,r)=>a(e)&&!r?l(e):(i()[e]=t,t),a=(e,t)=>{if(!e)throw new Error("必须执行绑定名称");let r=i();if(!r)throw new Error("未找到当前环境的全局变量");let o=r[e];return void 0!==o&&(null==t||o===t||JSON.stringify(o)===JSON.stringify(t))},u=c;return t})(),e.exports=t()},810:function(e,t,r){var o;o=e=>(()=>{"use strict";var t={"app-lib-global":t=>{t.exports=e},"./src/chalk/source/index.js":(e,t,r)=>{r.r(t),r.d(t,{Chalk:()=>g,backgroundColorNames:()=>o.backgroundColorNames,backgroundColors:()=>o.backgroundColorNames,chalkStderr:()=>T,colorNames:()=>o.colorNames,colors:()=>o.colorNames,default:()=>C,foregroundColorNames:()=>o.foregroundColorNames,foregroundColors:()=>o.foregroundColorNames,modifierNames:()=>o.modifierNames,modifiers:()=>o.modifierNames,supportsColor:()=>i,supportsColorStderr:()=>l});var o=r("./src/chalk/source/vendor/ansi-styles/index.js"),n=r("./src/chalk/source/vendor/supports-color/browser.js"),s=r("./src/chalk/source/utilities.js");const{stdout:i,stderr:l}=n.default,c=Symbol("GENERATOR"),a=Symbol("STYLER"),u=Symbol("IS_EMPTY"),f=["ansi","ansi","ansi256","ansi16m"],d=Object.create(null);class g{constructor(e){return p(e)}}const p=e=>{const t=(...e)=>e.join(" ");return((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");const r=i?i.level:0;e.level=void 0===t.level?r:t.level})(t,e),Object.setPrototypeOf(t,h.prototype),t};function h(e){return p(e)}Object.setPrototypeOf(h.prototype,Function.prototype);for(const[e,t]of Object.entries(o.default))d[e]={get(){const r=y(this,w(t.open,t.close,this[a]),this[u]);return Object.defineProperty(this,e,{value:r}),r}};d.visible={get(){const e=y(this,this[a],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const b=(e,t,r,...n)=>"rgb"===e?"ansi16m"===t?o.default[r].ansi16m(...n):"ansi256"===t?o.default[r].ansi256(o.default.rgbToAnsi256(...n)):o.default[r].ansi(o.default.rgbToAnsi(...n)):"hex"===e?b("rgb",t,r,...o.default.hexToRgb(...n)):o.default[r][e](...n),m=["rgb","hex","ansi256"];for(const e of m)d[e]={get(){const{level:t}=this;return function(...r){const n=w(b(e,f[t],"color",...r),o.default.color.close,this[a]);return y(this,n,this[u])}}},d["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const n=w(b(e,f[t],"bgColor",...r),o.default.bgColor.close,this[a]);return y(this,n,this[u])}}};const x=Object.defineProperties((()=>{}),{...d,level:{enumerable:!0,get(){return this[c].level},set(e){this[c].level=e}}}),w=(e,t,r)=>{let o,n;return void 0===r?(o=e,n=t):(o=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:n,parent:r}},y=(e,t,r)=>{const o=(...e)=>v(o,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(o,x),o[c]=e,o[a]=t,o[u]=r,o},v=(e,t)=>{if(e.level<=0||!t)return e[u]?"":t;let r=e[a];if(void 0===r)return t;const{openAll:o,closeAll:n}=r;if(t.includes(""))for(;void 0!==r;)t=(0,s.stringReplaceAll)(t,r.close,r.open),r=r.parent;const i=t.indexOf("\n");return-1!==i&&(t=(0,s.stringEncaseCRLFWithFirstIndex)(t,n,o,i)),o+t+n};Object.defineProperties(h.prototype,d);const E=h(),T=h({level:l?l.level:0}),C=E},"./src/chalk/source/utilities.js":(e,t,r)=>{function o(e,t,r){let o=e.indexOf(t);if(-1===o)return e;const n=t.length;let s=0,i="";do{i+=e.slice(s,o)+t+r,s=o+n,o=e.indexOf(t,s)}while(-1!==o);return i+=e.slice(s),i}function n(e,t,r,o){let n=0,s="";do{const i="\r"===e[o-1];s+=e.slice(n,i?o-1:o)+t+(i?"\r\n":"\n")+r,n=o+1,o=e.indexOf("\n",n)}while(-1!==o);return s+=e.slice(n),s}r.r(t),r.d(t,{stringEncaseCRLFWithFirstIndex:()=>n,stringReplaceAll:()=>o})},"./src/chalk/source/vendor/ansi-styles/index.js":(e,t,r)=>{r.r(t),r.d(t,{backgroundColorNames:()=>a,colorNames:()=>u,default:()=>f,foregroundColorNames:()=>c,modifierNames:()=>l});const o=(e=0)=>t=>`[${t+e}m`,n=(e=0)=>t=>`[${38+e};5;${t}m`,s=(e=0)=>(t,r,o)=>`[${38+e};2;${t};${r};${o}m`,i={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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},l=Object.keys(i.modifier),c=Object.keys(i.color),a=Object.keys(i.bgColor),u=[...c,...a],f=function(){const e=new Map;for(const[t,r]of Object.entries(i)){for(const[t,o]of Object.entries(r))i[t]={open:`[${o[0]}m`,close:`[${o[1]}m`},r[t]=i[t],e.set(o[0],o[1]);Object.defineProperty(i,t,{value:r,enumerable:!1})}return Object.defineProperty(i,"codes",{value:e,enumerable:!1}),i.color.close="",i.bgColor.close="",i.color.ansi=o(),i.color.ansi256=n(),i.color.ansi16m=s(),i.bgColor.ansi=o(10),i.bgColor.ansi256=n(10),i.bgColor.ansi16m=s(10),Object.defineProperties(i,{rgbToAnsi256:{value:(e,t,r)=>e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[r]=t;3===r.length&&(r=[...r].map((e=>e+e)).join(""));const o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,255&o]},enumerable:!1},hexToAnsi256:{value:e=>i.rgbToAnsi256(...i.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,r,o;if(e>=232)t=(10*(e-232)+8)/255,r=t,o=t;else{const n=(e-=16)%36;t=Math.floor(e/36)/5,r=Math.floor(n/6)/5,o=n%6/5}const n=2*Math.max(t,r,o);if(0===n)return 30;let s=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(t));return 2===n&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,t,r)=>i.ansi256ToAnsi(i.rgbToAnsi256(e,t,r)),enumerable:!1},hexToAnsi:{value:e=>i.ansi256ToAnsi(i.hexToAnsi256(e)),enumerable:!1}}),i}()},"./src/chalk/source/vendor/supports-color/browser.js":(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});let o=!1;"undefined"!=typeof navigator&&(o=navigator&&navigator.userAgentData?navigator.userAgentData.brands.some((({brand:e})=>"Chromium"===e)):/\b(Chrome|Chromium)\//.test(navigator.userAgent));const n=!!o&&{level:1,hasBasic:!0,has256:!1,has16m:!1},s={stdout:n,stderr:n}}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{ALL_FUNCTIONS:()=>r,LEVEL:()=>a,Logger:()=>H,TYPE:()=>c,create:()=>U,default:()=>q,log:()=>Y});var e=o("./src/chalk/source/index.js"),t=o("app-lib-global");const r=[],s=(0,t.isBroswerEnv)(),i=(0,t.getEnv)(),l=new e.Chalk({level:2}),c={TRACE:"trace",DEBUG:"debug",INFO:"info",LOG:"log",SUCCESS:"success",TABLE:"table",TIME:"time",WARN:"warn",ERROR:"error"},a={trace:10,debug:20,info:30,log:31,success:32,table:33,time:40,warn:60,error:70},u={node:{maxCharLength:9,textAlgin:"right",space:"",module:{background:"#0a0afb",color:"#ffffff"},trace:{background:"#4a4848",color:"#ffffff"},debug:{background:"#4a4848",color:"#ffffff",index:" "},info:{background:"#08df08",color:"#ffffff",index:" "},success:{background:"#0808ef",color:"#ffffff",index:" "},warn:{background:"#ffff08",color:"#ff0000"},error:{background:"#f50303",color:"#ffffff"},time:{background:"#47b2b2",color:"#ffffff",index:" "}},browser:{maxCharLength:9,textAlgin:"right",index:"background: transparent;margin-left:4px;",space:"background: transparent;",trace:"background: linear-gradient(90deg, #b7b2b2,#8080804d, #b7b2b2); color:white; font-weight:bold; border-radius: 1px; ",debug:"background:linear-gradient(70deg, #b7b2b2, #8080804d, #b7b2b2); color:white; font-weight:bold; border-radius: 1px;",info:"background: linear-gradient(70deg, #00800085, #57d4c1,#57d4c1, #00800085); color:white; font-weight:bold;border-radius: 1px;",success:"background: linear-gradient(70deg, #172bdca1, #0000ff36, #172bdca1); color:white; font-weight:bold;border-radius: 1px;",time:"background: linear-gradient(70deg, #00bfffcf,#00bfff4f,#00bfffcf); color:white; font-weight:bold;border-radius: 1px;",warn:"background: linear-gradient(90deg, #eab60e, #eab60e6e, #eab60e); color:yellow; font-weight:bold; border-radius: 1px;",error:"background: linear-gradient(90deg, #ff00006b, #ff000033,#ff000033, #ff00006b); color:red; font-weight:bold; border-radius: 1px;",dateTime:"background: none; border: 1px #ad10da4d solid; color:#ad10dacf; font-weight:bold; border-radius: 1px;",module:"background: linear-gradient(70deg, #0a0afb, #44448a); color:white; font-weight:bold; border-radius: 1px;padding:0 5px"}},f={bindGlobalName:"log",level:0,moduleName:"",isModule:!1,isColorful:!0,colorful:u[i],LEVEL:a,dateFormatter:"YYYY-MM-DD HH:mm:ss",onLogger:null},d=(e,t)=>{var r={"M+":e.getMonth()+1,"D+":e.getDate(),"H+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(var o in/(Y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[o]:("00"+r[o]).substr((""+r[o]).length)));return t},g=function(){const{DEBUG:e}=process?.env||{};let t=process.argv.slice(2).includes("--debug")||e;this.setOption({level:t&&"undefined"!=t?0:21})};function p(e,t){let{indent:r,width:o,algin:n,color:s,background:i}=t;return Y.fill(r||0)+Y.tx(Y.autoFillText(e,o,n),s,i)}function h(e,t,r){let o=l.hex(t||"#ffffff");return r&&(o=o.bgHex(r)),o(e)}function b(e,t,r){let o=this.tx(e,t,r);return console.log(o),o}function m(e=c.INFO,t="",r=!0){let{background:o,color:n}=u.node[e]||u.node[c.INFO],s=l.hex(n||o||"#ffffff");return r&&o&&(s=s.bgHex(o)),s(t)}function x(e=c.INFO,t="",r=!1){console.log.apply(null,this.tl(e,t,r))}function w(e,t,r){if(!["object","undefined"].includes(typeof r))return this.error("transLevelTextColorAndLog(level,text,chalkOption)方法参数chalkOption传递错误, 请传递{ bg, color }对象形式");let o=e?this._getTerminalColorfulArguments(e):[];o=o.length?[o.join("")]:o;let{background:n}=u.node[e],{bg:s,color:i}=r||{color:n||"#ffffff"},c=l.hex(i||n||"#ffffff");return s&&(c=c.bgHex(s)),o.push(c(" "+t+" ")),o.join("")}function y(...e){return this.exe(c.TRACE,e)}function v(...e){return this.exe(c.DEBUG,[...arguments])}function E(...e){return this.exe(c.INFO,[...arguments])}function T(...e){return this.exe(c.LOG,[...arguments])}function C(...e){return this.exe(c.SUCCESS,[...arguments])}function O(...e){return this.exe(c.TIME,[...arguments])}function j(...e){return this.exe(c.TABLE,[...arguments])}function A(...e){return this.exe(c.WARN,[...arguments])}function N(...e){return this.exe(c.WARN,[...arguments],{noTrace:!0})}function S(...e){return this.exe(c.ERROR,[...arguments])}function k(...e){return this.exe(c.ERROR,[...arguments],{noTrace:!0})}function R(...e){return this._mExecute(c.TRACE,[...arguments])}function L(...e){return this._mExecute(c.DEBUG,[...arguments])}function _(...e){return this._mExecute(c.INFO,[...arguments])}function F(...e){return this._mExecute(c.LOG,[...arguments])}function B(...e){return this._mExecute(c.SUCCESS,[...arguments])}function M(...e){return this._mExecute(c.TIME,[...arguments])}function P(...e){return this._mExecute(c.TABLE,[...arguments])}function $(...e){return this._mExecute(c.WARN,[...arguments])}function I(...e){return this._mExecute(c.WARN,[...arguments],{noTrace:!0})}function D(...e){return this._mExecute(c.ERROR,[...arguments])}function G(...e){return this._mExecute(c.ERROR,[...arguments],{noTrace:!0})}const W={setOption:function(e){return this.option={...this.option,...e},this.option},getOption:function(){return this.option},auotLogLevel:g,auotLevel:g,autoFillText:function(e,t,r="right"){let o=this.option.colorful.maxCharLength;return this._autoFillLength(t||o,e,r)},fill:function(e,t){return this._fill(e,t)},transTextColorBlock:p,tb:p,trace:y,debug:v,info:E,log:T,success:C,time:O,table:j,warn:A,warnNoTrace:N,error:S,errorNoTrace:k,t:y,d:v,i:E,l:T,s:C,tt:O,T:j,w:A,wn:N,e:S,en:k,mTrace:R,mDebug:L,mInfo:_,mLog:F,mSuccess:B,mTime:M,mTable:P,mWarn:$,mWarnNoTrace:I,mError:D,mErrorNoTrace:G,mt:R,md:L,mi:_,ml:F,ms:B,mtt:M,mT:P,mw:$,mwn:I,me:D,men:G,transTextColor:h,transTextColorAndLog:b,transLevelTextColor:m,transLevelTextColorAndLog:x,transLevelHeaderAndLog:w,tx:h,txl:b,tl:m,tll:x,tlh:w};class H{constructor(e){this.option={...f,...e},(e=>{for(let t in W)e[t]=W[t]})(this)}_isIndex(e){return![c.TRACE,c.WARN,c.ERROR].includes(e)}_getSpace(e){let t="";for(let r=0;r<e;r++)t+=" ";return t}_getAlgin(e,t,r){let o=r-e.length,n=0,s=1;return"center"===t?(n=Math.floor(o/2),s=Math.ceil(o/2)):n=o-1,"%c"+this._getSpace(n)+e.toLowerCase()+this._getSpace(s)}_getBroswerColorfulArguments(e){let{isColorful:t,colorful:r,moduleName:o,dateFormatter:n}=this.option,{textAlgin:s,maxCharLength:i,index:l,space:a,module:u,dateTime:f}=r;if(!t)return[];let g="",p=[];if(this._isIndex(e)&&(g+="%c ",p.push(l)),g+=this._getAlgin(e,s,i),p.push(r[e.toLowerCase()]),o&&(g+="%c %c%s",p=p.concat([a,u,o])),e===c.TIME){g+="%c %c%s";let e="string"==typeof n?d(new Date,n):n(new Date);p=p.concat([a,f,e])}return[g].concat(p)}_fill(e,t=" "){let r=[];for(let o=0;o<e;o++)r.push(t);return r.join("")}_getPosition(e){let t=e/2;return[Math.ceil(t),Math.floor(t)]}_autoFillLength(e,t,r="right"){let o=e-(t+=" ").length;if("center"===r){let[e,r]=this._getPosition(o);return this._fill(e)+t+this._fill(r)}return o<=0?t:"right"==r?this._fill(o)+t:t+this._fill(o)}_getTerminalColorfulArguments(e,t={}){let{isColorful:r,colorful:o,moduleName:n,dateFormatter:s}=this.option;if(!r)return[];let{textAlgin:i,maxCharLength:a,space:u,module:f}=o,{background:g,color:p,index:h}=o[e]||o.trace,b=[];(t.noTrace||h)&&b.push(t.noTrace?o.debug.index:h);let m=this._autoFillLength(a,e.toLowerCase(),i);if(b.push(l.bgHex(g).hex(p)(m)),b.push(u),n&&b.push(l.bgHex(f.background).hex(f.color)(" "+n+" ")),e===c.TIME){let e="string"==typeof s?d(new Date,s):s(new Date);b=b.concat([e])}return b}_output(e,t,r,o={}){let{onLogger:n,level:i}=this.option;if("number"==typeof i){if(i>this.option.LEVEL[e])return}else if(Array.isArray(i)&&!i.includes(e))return!1;if(n&&n(e,r),console){let n=s||![c.WARN,c.ERROR].includes(e)||o.noTrace?e:c.TRACE;n=s&&[c.DEBUG].includes(e)?c.INFO:n;let i=console[n.toLowerCase()]||console[c.INFO];n.toLowerCase()===c.TABLE?console.table.apply(null,r):n.toLowerCase()===c.TIME?console.log.apply(null,t.concat(r)):n.toLowerCase()===c.LOG?console.log.apply(null,r):i.apply(null,t.concat(r))}}exe(e,t,r){let o=s?this._getBroswerColorfulArguments(e):this._getTerminalColorfulArguments(e,r);return this._output(e,o,t,r),null}_mExecute(e,t,r={}){this.option.moduleName=t[0];let o=e.toLowerCase()+(r.noTrace?"NoTrace":"");this[o]&&this[o].apply(this,t.slice(1,t.length)),this.option.moduleName=""}}const U=function(e){let r=e.bindGlobalName;return(0,t.isBindToGlobal)(r)?(0,t.getbindData)(r):(0,t.bindToGlobal)(r,new H(e||{}))},Y=U(f),q=Y})(),n})(),e.exports=o(r(798))},905:function(e,t,r){var o;o=(e,t,r,o)=>(()=>{var n={"./src/cross-spawn/index.js":(e,t,r)=>{"use strict";const o=r("child_process"),n=r("./src/cross-spawn/lib/parse.js"),s=r("./src/cross-spawn/lib/enoent.js"),{log:i}=r("app-lib-log");function l(e,t,r){const i=n(e,t,r),l=o.spawn(i.command,i.args,i.options);return s.hookChildProcess(l,i),l}e.exports=l,e.exports.spawn=l,e.exports.sync=function(e,t,r){const l=n(e,t,r);i.md("exe node:",l.command,l.args,{...l.options,windowsHide:!0});const c=o.spawnSync(l.command,l.args,{...l.options});return c.error=c.error||s.verifyENOENTSync(c.status,l),c},e.exports._parse=n,e.exports._enoent=s},"./src/cross-spawn/lib/enoent.js":e=>{"use strict";const t="win32"===process.platform;function r(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function o(e,o){return t&&1===e&&!o.file?r(o.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;const n=e.emit;e.emit=function(t,s){if("exit"===t){const t=o(s,r);if(t)return n.call(e,"error",t)}return n.apply(e,arguments)}},verifyENOENT:o,verifyENOENTSync:function(e,o){return t&&1===e&&!o.file?r(o.original,"spawnSync"):null},notFoundError:r}},"./src/cross-spawn/lib/parse.js":(e,t,r)=>{"use strict";const o=r("path"),n=r("./src/cross-spawn/lib/util/resolveCommand.js"),s=r("./src/cross-spawn/lib/util/escape.js"),i=r("./src/cross-spawn/lib/util/readShebang.js"),l="win32"===process.platform,c=/\.(?:com|exe)$/i,a=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const u={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?u:function(e){if(!l)return e;const t=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(e),r=!c.test(t);if(e.options.forceShell||r){const r=a.test(t);e.command=o.normalize(e.command),e.command=s.command(e.command),e.args=e.args.map((e=>s.argument(e,r)));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(u)}},"./src/cross-spawn/lib/util/escape.js":e=>{"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},"./src/cross-spawn/lib/util/path-key/path-key.js":e=>{"use strict";const t=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};e.exports=t,e.exports.default=t},"./src/cross-spawn/lib/util/readShebang.js":(e,t,r)=>{"use strict";const o=r("fs"),n=r("./src/cross-spawn/lib/util/shebang-command/shebang-command.js");e.exports=function(e){const t=Buffer.alloc(150);let r;try{r=o.openSync(e,"r"),o.readSync(r,t,0,150,0),o.closeSync(r)}catch(e){}return n(t.toString())}},"./src/cross-spawn/lib/util/resolveCommand.js":(e,t,r)=>{"use strict";const o=r("path"),n=r("./src/cross-spawn/lib/util/which/which.js"),s=r("./src/cross-spawn/lib/util/path-key/path-key.js");function i(e,t){const r=e.options.env||process.env,i=process.cwd(),l=null!=e.options.cwd,c=l&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}let a;try{a=n.sync(e.command,{path:r[s({env:r})],pathExt:t?o.delimiter:void 0})}catch(e){}finally{c&&process.chdir(i)}return a&&(a=o.resolve(l?e.options.cwd:"",a)),a}e.exports=function(e){return i(e)||i(e,!0)}},"./src/cross-spawn/lib/util/shebang-command/shebang-command.js":(e,t,r)=>{"use strict";const o=r("./src/cross-spawn/lib/util/shebang-command/shebang-regex/shebang-regex.js");e.exports=(e="")=>{const t=e.match(o);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return"env"===s?n:n?`${s} ${n}`:s}},"./src/cross-spawn/lib/util/shebang-command/shebang-regex/shebang-regex.js":e=>{"use strict";e.exports=/^#!(.*)/},"./src/cross-spawn/lib/util/which/isexe/isexe.js":(e,t,r)=>{var o;function n(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,o){n(e,t||{},(function(e,t){e?o(e):r(t)}))}))}o(e,t||{},(function(e,o){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,o=!1),r(e,o)}))}r("fs"),o="win32"===process.platform||r.g.TESTING_WINDOWS?r("./src/cross-spawn/lib/util/which/isexe/windows.js"):r("./src/cross-spawn/lib/util/which/isexe/mode.js"),e.exports=n,n.sync=function(e,t){try{return o.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},"./src/cross-spawn/lib/util/which/isexe/mode.js":(e,t,r)=>{e.exports=n,n.sync=function(e,t){return s(o.statSync(e),t)};var o=r("fs");function n(e,t,r){o.stat(e,(function(e,o){r(e,!e&&s(o,t))}))}function s(e,t){return e.isFile()&&function(e,t){var r=e.mode,o=e.uid,n=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),i=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),l=parseInt("100",8),c=parseInt("010",8);return r&parseInt("001",8)||r&c&&n===i||r&l&&o===s||r&(l|c)&&0===s}(e,t)}},"./src/cross-spawn/lib/util/which/isexe/windows.js":(e,t,r)=>{e.exports=s,s.sync=function(e,t){return n(o.statSync(e),e,t)};var o=r("fs");function n(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var o=0;o<r.length;o++){var n=r[o].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}(t,r)}function s(e,t,r){o.stat(e,(function(o,s){r(o,!o&&n(s,e,t))}))}},"./src/cross-spawn/lib/util/which/which.js":(e,t,r)=>{const o="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,n=r("path"),s=o?";":":",i=r("./src/cross-spawn/lib/util/which/isexe/isexe.js"),l=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),c=(e,t)=>{const r=t.colon||s,n=e.match(/\//)||o&&e.match(/\\/)?[""]:[...o?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=o?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",l=o?i.split(r):[""];return o&&-1!==e.indexOf(".")&&""!==l[0]&&l.unshift(""),{pathEnv:n,pathExt:l,pathExtExe:i}},a=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:o,pathExt:s,pathExtExe:a}=c(e,t),u=[],f=r=>new Promise(((s,i)=>{if(r===o.length)return t.all&&u.length?s(u):i(l(e));const c=o[r],a=/^".*"$/.test(c)?c.slice(1,-1):c,f=n.join(a,e),g=!a&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;s(d(g,r,0))})),d=(e,r,o)=>new Promise(((n,l)=>{if(o===s.length)return n(f(r+1));const c=s[o];i(e+c,{pathExt:a},((s,i)=>{if(!s&&i){if(!t.all)return n(e+c);u.push(e+c)}return n(d(e,r,o+1))}))}));return r?f(0).then((e=>r(null,e)),r):f(0)};e.exports=a,a.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:o,pathExtExe:s}=c(e,t),a=[];for(let l=0;l<r.length;l++){const c=r[l],u=/^".*"$/.test(c)?c.slice(1,-1):c,f=n.join(u,e),d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;for(let e=0;e<o.length;e++){const r=d+o[e];try{if(i.sync(r,{pathExt:s})){if(!t.all)return r;a.push(r)}}catch(e){}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw l(e)}},"app-lib-log":e=>{"use strict";e.exports=o},child_process:t=>{"use strict";t.exports=e},fs:e=>{"use strict";e.exports=r},path:e=>{"use strict";e.exports=t}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var l={};return(()=>{var e=l;const t=i("./src/cross-spawn/index.js"),{log:r}=i("app-lib-log");e.exec=(e,o,n,s=!0)=>{let i=s?t.sync:t,l=n||{};return l.stdio||(l.stdio=(()=>{const{DEBUG:e}=process?.env||{};return process.argv.slice(2).includes("--debug")||e})()?"inherit":["ignore","ignore","inherit"]),r.md.apply(r,[i.name,e,JSON.stringify(o),n,l,s]),i(e,o,l)}})(),l})(),e.exports=o(r(198),r(56),r(89),r(181))},181:function(e,t,r){var o;o=e=>(()=>{"use strict";var t={"app-lib-global":t=>{t.exports=e},"./src/chalk/source/index.js":(e,t,r)=>{r.r(t),r.d(t,{Chalk:()=>g,backgroundColorNames:()=>o.backgroundColorNames,backgroundColors:()=>o.backgroundColorNames,chalkStderr:()=>T,colorNames:()=>o.colorNames,colors:()=>o.colorNames,default:()=>C,foregroundColorNames:()=>o.foregroundColorNames,foregroundColors:()=>o.foregroundColorNames,modifierNames:()=>o.modifierNames,modifiers:()=>o.modifierNames,supportsColor:()=>i,supportsColorStderr:()=>l});var o=r("./src/chalk/source/vendor/ansi-styles/index.js"),n=r("./src/chalk/source/vendor/supports-color/browser.js"),s=r("./src/chalk/source/utilities.js");const{stdout:i,stderr:l}=n.default,c=Symbol("GENERATOR"),a=Symbol("STYLER"),u=Symbol("IS_EMPTY"),f=["ansi","ansi","ansi256","ansi16m"],d=Object.create(null);class g{constructor(e){return p(e)}}const p=e=>{const t=(...e)=>e.join(" ");return((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");const r=i?i.level:0;e.level=void 0===t.level?r:t.level})(t,e),Object.setPrototypeOf(t,h.prototype),t};function h(e){return p(e)}Object.setPrototypeOf(h.prototype,Function.prototype);for(const[e,t]of Object.entries(o.default))d[e]={get(){const r=y(this,w(t.open,t.close,this[a]),this[u]);return Object.defineProperty(this,e,{value:r}),r}};d.visible={get(){const e=y(this,this[a],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const b=(e,t,r,...n)=>"rgb"===e?"ansi16m"===t?o.default[r].ansi16m(...n):"ansi256"===t?o.default[r].ansi256(o.default.rgbToAnsi256(...n)):o.default[r].ansi(o.default.rgbToAnsi(...n)):"hex"===e?b("rgb",t,r,...o.default.hexToRgb(...n)):o.default[r][e](...n),m=["rgb","hex","ansi256"];for(const e of m)d[e]={get(){const{level:t}=this;return function(...r){const n=w(b(e,f[t],"color",...r),o.default.color.close,this[a]);return y(this,n,this[u])}}},d["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const n=w(b(e,f[t],"bgColor",...r),o.default.bgColor.close,this[a]);return y(this,n,this[u])}}};const x=Object.defineProperties((()=>{}),{...d,level:{enumerable:!0,get(){return this[c].level},set(e){this[c].level=e}}}),w=(e,t,r)=>{let o,n;return void 0===r?(o=e,n=t):(o=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:n,parent:r}},y=(e,t,r)=>{const o=(...e)=>v(o,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(o,x),o[c]=e,o[a]=t,o[u]=r,o},v=(e,t)=>{if(e.level<=0||!t)return e[u]?"":t;let r=e[a];if(void 0===r)return t;const{openAll:o,closeAll:n}=r;if(t.includes(""))for(;void 0!==r;)t=(0,s.stringReplaceAll)(t,r.close,r.open),r=r.parent;const i=t.indexOf("\n");return-1!==i&&(t=(0,s.stringEncaseCRLFWithFirstIndex)(t,n,o,i)),o+t+n};Object.defineProperties(h.prototype,d);const E=h(),T=h({level:l?l.level:0}),C=E},"./src/chalk/source/utilities.js":(e,t,r)=>{function o(e,t,r){let o=e.indexOf(t);if(-1===o)return e;const n=t.length;let s=0,i="";do{i+=e.slice(s,o)+t+r,s=o+n,o=e.indexOf(t,s)}while(-1!==o);return i+=e.slice(s),i}function n(e,t,r,o){let n=0,s="";do{const i="\r"===e[o-1];s+=e.slice(n,i?o-1:o)+t+(i?"\r\n":"\n")+r,n=o+1,o=e.indexOf("\n",n)}while(-1!==o);return s+=e.slice(n),s}r.r(t),r.d(t,{stringEncaseCRLFWithFirstIndex:()=>n,stringReplaceAll:()=>o})},"./src/chalk/source/vendor/ansi-styles/index.js":(e,t,r)=>{r.r(t),r.d(t,{backgroundColorNames:()=>a,colorNames:()=>u,default:()=>f,foregroundColorNames:()=>c,modifierNames:()=>l});const o=(e=0)=>t=>`[${t+e}m`,n=(e=0)=>t=>`[${38+e};5;${t}m`,s=(e=0)=>(t,r,o)=>`[${38+e};2;${t};${r};${o}m`,i={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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},l=Object.keys(i.modifier),c=Object.keys(i.color),a=Object.keys(i.bgColor),u=[...c,...a],f=function(){const e=new Map;for(const[t,r]of Object.entries(i)){for(const[t,o]of Object.entries(r))i[t]={open:`[${o[0]}m`,close:`[${o[1]}m`},r[t]=i[t],e.set(o[0],o[1]);Object.defineProperty(i,t,{value:r,enumerable:!1})}return Object.defineProperty(i,"codes",{value:e,enumerable:!1}),i.color.close="",i.bgColor.close="",i.color.ansi=o(),i.color.ansi256=n(),i.color.ansi16m=s(),i.bgColor.ansi=o(10),i.bgColor.ansi256=n(10),i.bgColor.ansi16m=s(10),Object.defineProperties(i,{rgbToAnsi256:{value:(e,t,r)=>e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[r]=t;3===r.length&&(r=[...r].map((e=>e+e)).join(""));const o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,255&o]},enumerable:!1},hexToAnsi256:{value:e=>i.rgbToAnsi256(...i.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,r,o;if(e>=232)t=(10*(e-232)+8)/255,r=t,o=t;else{const n=(e-=16)%36;t=Math.floor(e/36)/5,r=Math.floor(n/6)/5,o=n%6/5}const n=2*Math.max(t,r,o);if(0===n)return 30;let s=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(t));return 2===n&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,t,r)=>i.ansi256ToAnsi(i.rgbToAnsi256(e,t,r)),enumerable:!1},hexToAnsi:{value:e=>i.ansi256ToAnsi(i.hexToAnsi256(e)),enumerable:!1}}),i}()},"./src/chalk/source/vendor/supports-color/browser.js":(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});let o=!1;"undefined"!=typeof navigator&&(o=navigator&&navigator.userAgentData?navigator.userAgentData.brands.some((({brand:e})=>"Chromium"===e)):/\b(Chrome|Chromium)\//.test(navigator.userAgent));const n=!!o&&{level:1,hasBasic:!0,has256:!1,has16m:!1},s={stdout:n,stderr:n}}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{ALL_FUNCTIONS:()=>r,LEVEL:()=>a,Logger:()=>H,TYPE:()=>c,create:()=>U,default:()=>q,log:()=>Y});var e=o("./src/chalk/source/index.js"),t=o("app-lib-global");const r=[],s=(0,t.isBroswerEnv)(),i=(0,t.getEnv)(),l=new e.Chalk({level:2}),c={TRACE:"trace",DEBUG:"debug",INFO:"info",LOG:"log",SUCCESS:"success",TABLE:"table",TIME:"time",WARN:"warn",ERROR:"error"},a={trace:10,debug:20,info:30,log:31,success:32,table:33,time:40,warn:60,error:70},u={node:{maxCharLength:9,textAlgin:"right",space:"",module:{background:"#0a0afb",color:"#ffffff"},trace:{background:"#4a4848",color:"#ffffff"},debug:{background:"#4a4848",color:"#ffffff",index:" "},info:{background:"#08df08",color:"#ffffff",index:" "},success:{background:"#0808ef",color:"#ffffff",index:" "},warn:{background:"#ffff08",color:"#ff0000"},error:{background:"#f50303",color:"#ffffff"},time:{background:"#47b2b2",color:"#ffffff",index:" "}},browser:{maxCharLength:9,textAlgin:"right",index:"background: transparent;margin-left:4px;",space:"background: transparent;",trace:"background: linear-gradient(90deg, #b7b2b2,#8080804d, #b7b2b2); color:white; font-weight:bold; border-radius: 1px; ",debug:"background:linear-gradient(70deg, #b7b2b2, #8080804d, #b7b2b2); color:white; font-weight:bold; border-radius: 1px;",info:"background: linear-gradient(70deg, #00800085, #57d4c1,#57d4c1, #00800085); color:white; font-weight:bold;border-radius: 1px;",success:"background: linear-gradient(70deg, #172bdca1, #0000ff36, #172bdca1); color:white; font-weight:bold;border-radius: 1px;",time:"background: linear-gradient(70deg, #00bfffcf,#00bfff4f,#00bfffcf); color:white; font-weight:bold;border-radius: 1px;",warn:"background: linear-gradient(90deg, #eab60e, #eab60e6e, #eab60e); color:yellow; font-weight:bold; border-radius: 1px;",error:"background: linear-gradient(90deg, #ff00006b, #ff000033,#ff000033, #ff00006b); color:red; font-weight:bold; border-radius: 1px;",dateTime:"background: none; border: 1px #ad10da4d solid; color:#ad10dacf; font-weight:bold; border-radius: 1px;",module:"background: linear-gradient(70deg, #0a0afb, #44448a); color:white; font-weight:bold; border-radius: 1px;padding:0 5px"}},f={bindGlobalName:"log",level:0,moduleName:"",isModule:!1,isColorful:!0,colorful:u[i],LEVEL:a,dateFormatter:"YYYY-MM-DD HH:mm:ss",onLogger:null},d=(e,t)=>{var r={"M+":e.getMonth()+1,"D+":e.getDate(),"H+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(var o in/(Y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[o]:("00"+r[o]).substr((""+r[o]).length)));return t},g=function(){const{DEBUG:e}=process?.env||{};let t=process.argv.slice(2).includes("--debug")||e;this.setOption({level:t&&"undefined"!=t?0:21})};function p(e,t){let{indent:r,width:o,algin:n,color:s,background:i}=t;return Y.fill(r||0)+Y.tx(Y.autoFillText(e,o,n),s,i)}function h(e,t,r){let o=l.hex(t||"#ffffff");return r&&(o=o.bgHex(r)),o(e)}function b(e,t,r){let o=this.tx(e,t,r);return console.log(o),o}function m(e=c.INFO,t="",r=!0){let{background:o,color:n}=u.node[e]||u.node[c.INFO],s=l.hex(n||o||"#ffffff");return r&&o&&(s=s.bgHex(o)),s(t)}function x(e=c.INFO,t="",r=!1){console.log.apply(null,this.tl(e,t,r))}function w(e,t,r){if(!["object","undefined"].includes(typeof r))return this.error("transLevelTextColorAndLog(level,text,chalkOption)方法参数chalkOption传递错误, 请传递{ bg, color }对象形式");let o=e?this._getTerminalColorfulArguments(e):[];o=o.length?[o.join("")]:o;let{background:n}=u.node[e],{bg:s,color:i}=r||{color:n||"#ffffff"},c=l.hex(i||n||"#ffffff");return s&&(c=c.bgHex(s)),o.push(c(" "+t+" ")),o.join("")}function y(...e){return this.exe(c.TRACE,e)}function v(...e){return this.exe(c.DEBUG,[...arguments])}function E(...e){return this.exe(c.INFO,[...arguments])}function T(...e){return this.exe(c.LOG,[...arguments])}function C(...e){return this.exe(c.SUCCESS,[...arguments])}function O(...e){return this.exe(c.TIME,[...arguments])}function j(...e){return this.exe(c.TABLE,[...arguments])}function A(...e){return this.exe(c.WARN,[...arguments])}function N(...e){return this.exe(c.WARN,[...arguments],{noTrace:!0})}function S(...e){return this.exe(c.ERROR,[...arguments])}function k(...e){return this.exe(c.ERROR,[...arguments],{noTrace:!0})}function R(...e){return this._mExecute(c.TRACE,[...arguments])}function L(...e){return this._mExecute(c.DEBUG,[...arguments])}function _(...e){return this._mExecute(c.INFO,[...arguments])}function F(...e){return this._mExecute(c.LOG,[...arguments])}function B(...e){return this._mExecute(c.SUCCESS,[...arguments])}function M(...e){return this._mExecute(c.TIME,[...arguments])}function P(...e){return this._mExecute(c.TABLE,[...arguments])}function $(...e){return this._mExecute(c.WARN,[...arguments])}function I(...e){return this._mExecute(c.WARN,[...arguments],{noTrace:!0})}function D(...e){return this._mExecute(c.ERROR,[...arguments])}function G(...e){return this._mExecute(c.ERROR,[...arguments],{noTrace:!0})}const W={setOption:function(e){return this.option={...this.option,...e},this.option},getOption:function(){return this.option},auotLogLevel:g,auotLevel:g,autoFillText:function(e,t,r="right"){let o=this.option.colorful.maxCharLength;return this._autoFillLength(t||o,e,r)},fill:function(e,t){return this._fill(e,t)},transTextColorBlock:p,tb:p,trace:y,debug:v,info:E,log:T,success:C,time:O,table:j,warn:A,warnNoTrace:N,error:S,errorNoTrace:k,t:y,d:v,i:E,l:T,s:C,tt:O,T:j,w:A,wn:N,e:S,en:k,mTrace:R,mDebug:L,mInfo:_,mLog:F,mSuccess:B,mTime:M,mTable:P,mWarn:$,mWarnNoTrace:I,mError:D,mErrorNoTrace:G,mt:R,md:L,mi:_,ml:F,ms:B,mtt:M,mT:P,mw:$,mwn:I,me:D,men:G,transTextColor:h,transTextColorAndLog:b,transLevelTextColor:m,transLevelTextColorAndLog:x,transLevelHeaderAndLog:w,tx:h,txl:b,tl:m,tll:x,tlh:w};class H{constructor(e){this.option={...f,...e},(e=>{for(let t in W)e[t]=W[t]})(this)}_isIndex(e){return![c.TRACE,c.WARN,c.ERROR].includes(e)}_getSpace(e){let t="";for(let r=0;r<e;r++)t+=" ";return t}_getAlgin(e,t,r){let o=r-e.length,n=0,s=1;return"center"===t?(n=Math.floor(o/2),s=Math.ceil(o/2)):n=o-1,"%c"+this._getSpace(n)+e.toLowerCase()+this._getSpace(s)}_getBroswerColorfulArguments(e){let{isColorful:t,colorful:r,moduleName:o,dateFormatter:n}=this.option,{textAlgin:s,maxCharLength:i,index:l,space:a,module:u,dateTime:f}=r;if(!t)return[];let g="",p=[];if(this._isIndex(e)&&(g+="%c ",p.push(l)),g+=this._getAlgin(e,s,i),p.push(r[e.toLowerCase()]),o&&(g+="%c %c%s",p=p.concat([a,u,o])),e===c.TIME){g+="%c %c%s";let e="string"==typeof n?d(new Date,n):n(new Date);p=p.concat([a,f,e])}return[g].concat(p)}_fill(e,t=" "){let r=[];for(let o=0;o<e;o++)r.push(t);return r.join("")}_getPosition(e){let t=e/2;return[Math.ceil(t),Math.floor(t)]}_autoFillLength(e,t,r="right"){let o=e-(t+=" ").length;if("center"===r){let[e,r]=this._getPosition(o);return this._fill(e)+t+this._fill(r)}return o<=0?t:"right"==r?this._fill(o)+t:t+this._fill(o)}_getTerminalColorfulArguments(e,t={}){let{isColorful:r,colorful:o,moduleName:n,dateFormatter:s}=this.option;if(!r)return[];let{textAlgin:i,maxCharLength:a,space:u,module:f}=o,{background:g,color:p,index:h}=o[e]||o.trace,b=[];(t.noTrace||h)&&b.push(t.noTrace?o.debug.index:h);let m=this._autoFillLength(a,e.toLowerCase(),i);if(b.push(l.bgHex(g).hex(p)(m)),b.push(u),n&&b.push(l.bgHex(f.background).hex(f.color)(" "+n+" ")),e===c.TIME){let e="string"==typeof s?d(new Date,s):s(new Date);b=b.concat([e])}return b}_output(e,t,r,o={}){let{onLogger:n,level:i}=this.option;if("number"==typeof i){if(i>this.option.LEVEL[e])return}else if(Array.isArray(i)&&!i.includes(e))return!1;if(n&&n(e,r),console){let n=s||![c.WARN,c.ERROR].includes(e)||o.noTrace?e:c.TRACE;n=s&&[c.DEBUG].includes(e)?c.INFO:n;let i=console[n.toLowerCase()]||console[c.INFO];n.toLowerCase()===c.TABLE?console.table.apply(null,r):n.toLowerCase()===c.TIME?console.log.apply(null,t.concat(r)):n.toLowerCase()===c.LOG?console.log.apply(null,r):i.apply(null,t.concat(r))}}exe(e,t,r){let o=s?this._getBroswerColorfulArguments(e):this._getTerminalColorfulArguments(e,r);return this._output(e,o,t,r),null}_mExecute(e,t,r={}){this.option.moduleName=t[0];let o=e.toLowerCase()+(r.noTrace?"NoTrace":"");this[o]&&this[o].apply(this,t.slice(1,t.length)),this.option.moduleName=""}}const U=function(e){let r=e.bindGlobalName;return(0,t.isBindToGlobal)(r)?(0,t.getbindData)(r):(0,t.bindToGlobal)(r,new H(e||{}))},Y=U(f),q=Y})(),n})(),e.exports=o(r(798))},882:function(e,t,r){var o;o=(e,t,r,o,n,s,i)=>(()=>{var l={138:(e,t,r)=>{const o=r(56),n=r(89),{log:s}=r(668),{exec:i}=r(86),l=r(908),{appRequire:c}=r(305),a=Object.keys(process.binding("natives")).filter((e=>!/^internal\//.test(e))).sort(),u=n.existsSync,f=o.resolve,d=()=>{let e=E();return b(f(e,"../../node.exe"))},g=(e,t)=>{let r=f(e,`./node_modules/.bin/${t}`);return u(r)?r:null},p=()=>["DEVELOP","DEV","develop","dev"].includes(process.env.MODE||process.env.M),h=(e,t,r={})=>n.writeFileSync(e,t,{encoding:"utf8",options:r}),b=e=>!!n.existsSync(e)&&n.statSync(e).isDirectory(),m=(e,t,r=0,o=[])=>{let n=f(e,t);return n===f(e,"../",t)?null:b(n)?{path:n,layer:r,paths:o}:(o.push(e.split("\\").pop()),m(f(e,"../"),t,r+1,o))},x=(e,t,r,o=0)=>new Promise(((o,i)=>{const l=f(t,"../"),c=()=>{n.copyFileSync(e,t),o()};n.existsSync(l)||y(l),(async()=>{if(!r)if(u(t)){s.mwn(`exist file [${t}], recover it ?`);let e=await v("yes/no","yes");["yes","y"].includes(e)?c():o()}else c()})()})),w=(e,t)=>{const r=f(t,"../");n.existsSync(r)||y(r),n.copyFileSync(e,t),res()},y=(e,t={recursive:!0})=>{n.mkdirSync(e,t)},v=(e="",t="",r=!1)=>new Promise((o=>{s.mi(e+"");const n=l.createInterface({input:process.stdin,output:process.stdout});let i=t?`(${t})`:"",c=`${s.fill(7)+s.tx(s.autoFillText("default"),"#FFFFFF","#7506ef")} ${s.tx(i,"#00ffdc")}`,a=()=>{n.question(c,(e=>{if(r)n.close(),o(e||t);else{let r=e||t;r?(n.close(),o(r)):(s.mwn("can't empty! please input again"),a())}}))};a()})),E=(e="./")=>f(T(),e),T=(e="../../")=>f(c.main.filename,e),C=e=>{let t=[];n.existsSync(e)&&(t=n.readdirSync(e),t.forEach(((t,r)=>{let o=e+"/"+t;n.statSync(o).isDirectory()?C(o):n.unlinkSync(o)})),n.rmdirSync(e))},O=e=>{let t=f(E(),"./init.justport.used.config.ps1"),r=i("powershell",[t,e],{stdio:"pipe"}).stdout.toString();return s.md("test port result:",r),!!r},j=async e=>{let t=1*e;return await O(t)?await j(t+1):t},A=(e,t)=>{n.existsSync(t)||n.mkdirSync(t),n.readdirSync(e).forEach((r=>{const s=o.join(e,r),i=o.join(t,r);n.lstatSync(s).isDirectory()?A(s,i):((e,t)=>{n.copyFileSync(e,t)})(s,i)}))};e.exports={copyFile:x,copyFileSync:w,copyProjectFile:async(e,t,r=0)=>{let o=f(E(),e),n=f(t);return u(o)?(await x(o,n),s.md(`finish copy [${o}] to ${n}`),0):(s.mwn(`not exist [${o}]`),r)},copyFolder:A,copyProjectFileSync:(e,t,r=0)=>{let o=f(E(),e),n=f(t);return u(o)?(w(o,n),s.md(`finish copy [${o}] to ${n}`),0):(s.mwn(`not exist [${o}]`),r)},delDir:C,delFile:e=>n.unlinkSync(e),getBin:e=>{let t=T(),r=g(t,e);return s.md("getBin:",e,r),r||e},getBinPath:()=>{let e=E();return d()?f(e,"../.."):p()?f(e,"./node_modules/.bin"):f(e,"../.bin")},getCanUsePort:j,getLocalIP:function(){const e=r(44),t=e.type(),o=e.networkInterfaces();let n="";if("Windows_NT"===t){for(let e in o)if("本地连接"===e||"以太网"===e)for(let t=0;t<o[e].length;t++)if("IPv4"===o[e][t].family){n=o[e][t].address;break}}else"Linux"===t&&(n=o.eth0[0].address);return n},getMainPath:T,getParentDir:m,getRootPath:E,getTemplate:()=>{let e="./src/template.html";return u(e)||(s.mi(`use default tempalte config! diy in [${e}]`),e=f(E(),"../../","./src/template","./init.index.default.template.html")),e},isDev:p,isExistBin:g,isExistDir:b,isExistFile:u,isGlobalInstall:d,isSysUsePort:O,mkdir:y,NODE_INNER_MODULES:a,readFile:(e,t={})=>new Promise(((r,o)=>{(!0===t||t.cwd)&&(e=f(e),(t={}).cwd&&delete t.cwd),n.readFile(e,{encoding:"utf8",...t},(function(e,t){if(e)return o(e);r(t)}))})),readFileSync:(e,t={})=>n.readFileSync(e,{encoding:"utf8",options:t}),readdirSync:(e,t)=>n.readdirSync(e,t),readline:v,resolve:f,updateContent:({content:e,startflag:t,endFalg:r,appContent:o,isRepalce:n,isStart:s,isInnerStart:i,space:l,newHeader:c})=>{const a=l||"\r\n";let u=e.indexOf(t),f=e.indexOf(r);if(-1===u||-1===f){let n=[t,c,o,r].filter((e=>e));return s?n.concat([e]).join(a):[e].concat(n).join(a)}let d=e.substr(u,f-u),g=d.replace(/\r\n$/,"").replace(/\r\n$/,""),p=[];return p=n?[t,c,o].filter((e=>e)):i?c?[t,c,o,g.replace(t,"").replace(c,"")]:[o,g]:[g,o],p=p.join(a)+a,e.replace(d,p)},writeFile:(e,t,r={})=>new Promise(((o,s)=>{(!0===r||r.cwd)&&(e=o(e),(r={}).cwd&&delete r.cwd),n.writeFile(e,t,{encoding:"utf8",flag:"w+",...r},(function(e){if(e)return s(e);o(t)}))})),writeFileSync:h,writeFileSyncAndCreate:(e,t,r={})=>{let n=o.parse(e).dir;b(n)||y(n),h(e,t,{})},yesOrNo:async(e,t="yes")=>{let r=await v(`${e} [yes/no]`,t);return["yes","y"].includes(r)}}},86:t=>{"use strict";t.exports=e},668:e=>{"use strict";e.exports=t},305:e=>{"use strict";e.exports=r},89:e=>{"use strict";e.exports=o},44:e=>{"use strict";e.exports=n},56:e=>{"use strict";e.exports=s},908:e=>{"use strict";e.exports=i}},c={},a=function e(t){var r=c[t];if(void 0!==r)return r.exports;var o=c[t]={exports:{}};return l[t](o,o.exports,e),o.exports}(138);return a})(),e.exports=o(r(905),r(181),r(305),r(89),r(44),r(56),r(908))},138:(e,t,r)=>{const o=r(56),{readFileSync:n,isExistFile:s,resolve:i,isExistDir:l,writeFileSyncAndCreate:c,readdirSync:a,getRootPath:u}=r(882),{log:f}=r(810),d="./static/",g="./static/store.json",p=(e=[],t=g)=>{let r=e.map((e=>{if(s(e)){let t=n(e);return{name:e.split("\\").pop(),content:t}}return f.men("不存在文件文件",o.resolve(e)),null})).filter((e=>!!e));return r.length&&c(t,JSON.stringify(r,null,2)),r},h=(e=[],t=d,r=!1)=>e.map((({name:e,content:n})=>{let i=u(o.join(t||"",e));return!r&&s(i)||c(i,n),i}));e.exports={filesToJson:p,pathToFile:(e=g,t=d)=>s(e)?h(JSON.parse(n(e)),t):f.men("不存在文件文件",e),jsonToFile:h,buildDirFiles:(e="./src/trans-static",t=g)=>{if(!l(e))return f.md("不存在静态文件目录",e);let r=a(e).filter((t=>!l(o.resolve(e,t)))).map((t=>o.resolve(e,t)));return p(r,t)}}},305:t=>{"use strict";t.exports=e},198:e=>{"use strict";e.exports=t},89:e=>{"use strict";e.exports=r},44:e=>{"use strict";e.exports=o},56:e=>{"use strict";e.exports=n},908:e=>{"use strict";e.exports=s}},l={},function e(t){var r=l[t];if(void 0!==r)return r.exports;var o=l[t]={exports:{}};return i[t].call(o.exports,o,o.exports,e),o.exports}(138);var i,l})); //# sourceMappingURL=index-bundle-min.js.map