valaxy 0.18.6 → 0.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/App.vue +1 -7
- package/client/composables/index.ts +0 -1
- package/client/composables/locale.ts +6 -5
- package/client/locales/zh-CN.yml +1 -1
- package/client/setup/main.ts +0 -11
- package/client/styles/palette.scss +2 -2
- package/client/utils/time.ts +4 -8
- package/dist/chunk-RVJR5LVN.mjs +149 -0
- package/dist/chunk-Z7ZWNIK2.cjs +148 -0
- package/dist/{config-BqkMQ-w8.d.cts → config-Kdq8Mya1.d.cts} +14 -1
- package/dist/{config-BqkMQ-w8.d.ts → config-Kdq8Mya1.d.ts} +14 -1
- package/dist/node/cli/index.cjs +1 -1
- package/dist/node/cli/index.mjs +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +9 -5
- package/dist/node/index.d.ts +9 -5
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +1 -1
- package/package.json +27 -26
- package/types/config.ts +14 -1
- package/client/composables/body-scroll-lock.ts +0 -17
- package/dist/chunk-VQ75V4CX.mjs +0 -149
- package/dist/chunk-Z6VKLD6E.cjs +0 -148
- /package/dist/{chunk-NC2VW3FJ.mjs → chunk-A5LNZCPK.mjs} +0 -0
- /package/dist/{chunk-TA326ETE.cjs → chunk-TEJFRXY5.cjs} +0 -0
package/dist/chunk-VQ75V4CX.mjs
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
-
import{a as B,b as R,c as oe,d as l}from"./chunk-NC2VW3FJ.mjs";var me=R((u_,on)=>{"use strict";l();var Cf=B("tty"),Ef=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||Cf.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),z=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+Pi(o,t,r,i)+t:e+o+t},Pi=(e,t,r,n)=>{let o=e.substring(0,n)+r,i=e.substring(n+t.length),s=i.indexOf(t);return~s?o+Pi(i,t,r,s):o+i},Oi=(e=Ef)=>({isColorSupported:e,reset:e?t=>`\x1B[0m${t}\x1B[0m`:String,bold:e?z("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?z("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?z("\x1B[3m","\x1B[23m"):String,underline:e?z("\x1B[4m","\x1B[24m"):String,inverse:e?z("\x1B[7m","\x1B[27m"):String,hidden:e?z("\x1B[8m","\x1B[28m"):String,strikethrough:e?z("\x1B[9m","\x1B[29m"):String,black:e?z("\x1B[30m","\x1B[39m"):String,red:e?z("\x1B[31m","\x1B[39m"):String,green:e?z("\x1B[32m","\x1B[39m"):String,yellow:e?z("\x1B[33m","\x1B[39m"):String,blue:e?z("\x1B[34m","\x1B[39m"):String,magenta:e?z("\x1B[35m","\x1B[39m"):String,cyan:e?z("\x1B[36m","\x1B[39m"):String,white:e?z("\x1B[37m","\x1B[39m"):String,gray:e?z("\x1B[90m","\x1B[39m"):String,bgBlack:e?z("\x1B[40m","\x1B[49m"):String,bgRed:e?z("\x1B[41m","\x1B[49m"):String,bgGreen:e?z("\x1B[42m","\x1B[49m"):String,bgYellow:e?z("\x1B[43m","\x1B[49m"):String,bgBlue:e?z("\x1B[44m","\x1B[49m"):String,bgMagenta:e?z("\x1B[45m","\x1B[49m"):String,bgCyan:e?z("\x1B[46m","\x1B[49m"):String,bgWhite:e?z("\x1B[47m","\x1B[49m"):String});on.exports=Oi();on.exports.createColors=Oi});var Ti=R(pt=>{"use strict";l();Object.defineProperty(pt,"__esModule",{value:!0});pt.splitWhen=pt.flatten=void 0;function kf(e){return e.reduce((t,r)=>[].concat(t,r),[])}pt.flatten=kf;function Af(e,t){let r=[[]],n=0;for(let o of e)t(o)?(n++,r[n]=[]):r[n].push(o);return r}pt.splitWhen=Af});var $i=R(er=>{"use strict";l();Object.defineProperty(er,"__esModule",{value:!0});er.isEnoentCodeError=void 0;function Pf(e){return e.code==="ENOENT"}er.isEnoentCodeError=Pf});var Ii=R(tr=>{"use strict";l();Object.defineProperty(tr,"__esModule",{value:!0});tr.createDirentFromStats=void 0;var sn=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function Of(e,t){return new sn(e,t)}tr.createDirentFromStats=Of});var Di=R(te=>{"use strict";l();Object.defineProperty(te,"__esModule",{value:!0});te.convertPosixPathToPattern=te.convertWindowsPathToPattern=te.convertPathToPattern=te.escapePosixPath=te.escapeWindowsPath=te.escape=te.removeLeadingDotSegment=te.makeAbsolute=te.unixify=void 0;var Tf=B("os"),$f=B("path"),Mi=Tf.platform()==="win32",If=2,Mf=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Nf=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Lf=/^\\\\([.?])/,Df=/\\(?![!()+@[\]{}])/g;function Ff(e){return e.replace(/\\/g,"/")}te.unixify=Ff;function Vf(e,t){return $f.resolve(e,t)}te.makeAbsolute=Vf;function Hf(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(If)}return e}te.removeLeadingDotSegment=Hf;te.escape=Mi?an:ln;function an(e){return e.replace(Nf,"\\$2")}te.escapeWindowsPath=an;function ln(e){return e.replace(Mf,"\\$2")}te.escapePosixPath=ln;te.convertPathToPattern=Mi?Ni:Li;function Ni(e){return an(e).replace(Lf,"//$1").replace(Df,"/")}te.convertWindowsPathToPattern=Ni;function Li(e){return ln(e)}te.convertPosixPathToPattern=Li});var Vi=R((__,Fi)=>{"use strict";l();Fi.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var qi=R((b_,ji)=>{"use strict";l();var jf=Vi(),Hi={"{":"}","(":")","[":"]"},qf=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,n=-2,o=-2,i=-2,s=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||n!==-1&&e[t]==="["&&e[t+1]!=="]"&&(n<t&&(n=e.indexOf("]",t)),n>t&&(s===-1||s>n||(s=e.indexOf("\\",t),s===-1||s>n)))||o!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(o=e.indexOf("}",t),o>t&&(s=e.indexOf("\\",t),s===-1||s>o))||i!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(i=e.indexOf(")",t),i>t&&(s=e.indexOf("\\",t),s===-1||s>i))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(i=e.indexOf(")",r),i>r&&(s=e.indexOf("\\",r),s===-1||s>i))))return!0;if(e[t]==="\\"){var a=e[t+1];t+=2;var f=Hi[a];if(f){var u=e.indexOf(f,t);u!==-1&&(t=u+1)}if(e[t]==="!")return!0}else t++}return!1},Bf=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var n=Hi[r];if(n){var o=e.indexOf(n,t);o!==-1&&(t=o+1)}if(e[t]==="!")return!0}else t++}return!1};ji.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(jf(t))return!0;var n=qf;return r&&r.strict===!1&&(n=Bf),n(t)}});var Ui=R((w_,Bi)=>{"use strict";l();var Uf=qi(),Wf=B("path").posix.dirname,Gf=B("os").platform()==="win32",cn="/",Kf=/\\/g,zf=/[\{\[].*[\}\]]$/,Yf=/(^|[^\\])([\{\[]|\([^\)]+$)/,Xf=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Bi.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&Gf&&t.indexOf(cn)<0&&(t=t.replace(Kf,cn)),zf.test(t)&&(t+=cn),t+="a";do t=Wf(t);while(Uf(t)||Yf.test(t));return t.replace(Xf,"$1")}});var rr=R(xe=>{"use strict";l();xe.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;xe.find=(e,t)=>e.nodes.find(r=>r.type===t);xe.exceedsLimit=(e,t,r=1,n)=>n===!1||!xe.isInteger(e)||!xe.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;xe.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};xe.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);xe.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;xe.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;xe.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);xe.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let i=n[o];Array.isArray(i)?r(i,t):i!==void 0&&t.push(i)}return t};return r(e),t}});var nr=R((A_,Gi)=>{"use strict";l();var Wi=rr();Gi.exports=(e,t={})=>{let r=(n,o={})=>{let i=t.escapeInvalid&&Wi.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(i||s)&&Wi.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let f of n.nodes)a+=r(f);return a};return r(e)}});var zi=R((O_,Ki)=>{"use strict";l();Ki.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var ns=R(($_,rs)=>{"use strict";l();var Yi=zi(),et=(e,t,r)=>{if(Yi(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(Yi(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let o=String(n.relaxZeros),i=String(n.shorthand),s=String(n.capture),a=String(n.wrap),f=e+":"+t+"="+o+i+s+a;if(et.cache.hasOwnProperty(f))return et.cache[f].result;let u=Math.min(e,t),c=Math.max(e,t);if(Math.abs(u-c)===1){let S=e+"|"+t;return n.capture?`(${S})`:n.wrap===!1?S:`(?:${S})`}let d=ts(e)||ts(t),p={min:e,max:t,a:u,b:c},y=[],x=[];if(d&&(p.isPadded=d,p.maxLen=String(p.max).length),u<0){let S=c<0?Math.abs(c):1;x=Xi(S,Math.abs(u),p,n),u=p.a=0}return c>=0&&(y=Xi(u,c,p,n)),p.negatives=x,p.positives=y,p.result=Qf(x,y,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&y.length+x.length>1&&(p.result=`(?:${p.result})`),et.cache[f]=p,p.result};function Qf(e,t,r){let n=un(e,t,"-",!1,r)||[],o=un(t,e,"",!1,r)||[],i=un(e,t,"-?",!0,r)||[];return n.concat(i).concat(o).join("|")}function Jf(e,t){let r=1,n=1,o=Ji(e,r),i=new Set([t]);for(;e<=o&&o<=t;)i.add(o),r+=1,o=Ji(e,r);for(o=Zi(t+1,n)-1;e<o&&o<=t;)i.add(o),n+=1,o=Zi(t+1,n)-1;return i=[...i],i.sort(tp),i}function Zf(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=ep(e,t),o=n.length,i="",s=0;for(let a=0;a<o;a++){let[f,u]=n[a];f===u?i+=f:f!=="0"||u!=="9"?i+=rp(f,u,r):s++}return s&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function Xi(e,t,r,n){let o=Jf(e,t),i=[],s=e,a;for(let f=0;f<o.length;f++){let u=o[f],c=Zf(String(s),String(u),n),d="";if(!r.isPadded&&a&&a.pattern===c.pattern){a.count.length>1&&a.count.pop(),a.count.push(c.count[0]),a.string=a.pattern+es(a.count),s=u+1;continue}r.isPadded&&(d=np(u,r,n)),c.string=d+c.pattern+es(c.count),i.push(c),s=u+1,a=c}return i}function un(e,t,r,n,o){let i=[];for(let s of e){let{string:a}=s;!n&&!Qi(t,"string",a)&&i.push(r+a),n&&Qi(t,"string",a)&&i.push(r+a)}return i}function ep(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function tp(e,t){return e>t?1:t>e?-1:0}function Qi(e,t,r){return e.some(n=>n[t]===r)}function Ji(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Zi(e,t){return e-e%Math.pow(10,t)}function es(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function rp(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function ts(e){return/^-?(0+)\d/.test(e)}function np(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}et.cache={};et.clearCache=()=>et.cache={};rs.exports=et});var dn=R((M_,fs)=>{"use strict";l();var op=B("util"),ss=ns(),os=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),ip=e=>t=>e===!0?Number(t):String(t),fn=e=>typeof e=="number"||typeof e=="string"&&e!=="",Ot=e=>Number.isInteger(+e),pn=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},sp=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,ap=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},is=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},lp=(e,t)=>{e.negatives.sort((s,a)=>s<a?-1:s>a?1:0),e.positives.sort((s,a)=>s<a?-1:s>a?1:0);let r=t.capture?"":"?:",n="",o="",i;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(o=`-(${r}${e.negatives.join("|")})`),n&&o?i=`${n}|${o}`:i=n||o,t.wrap?`(${r}${i})`:i},as=(e,t,r,n)=>{if(r)return ss(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let i=String.fromCharCode(t);return`[${o}-${i}]`},ls=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return ss(e,t,r)},cs=(...e)=>new RangeError("Invalid range arguments: "+op.inspect(...e)),us=(e,t,r)=>{if(r.strictRanges===!0)throw cs([e,t]);return[]},cp=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},up=(e,t,r=1,n={})=>{let o=Number(e),i=Number(t);if(!Number.isInteger(o)||!Number.isInteger(i)){if(n.strictRanges===!0)throw cs([e,t]);return[]}o===0&&(o=0),i===0&&(i=0);let s=o>i,a=String(e),f=String(t),u=String(r);r=Math.max(Math.abs(r),1);let c=pn(a)||pn(f)||pn(u),d=c?Math.max(a.length,f.length,u.length):0,p=c===!1&&sp(e,t,n)===!1,y=n.transform||ip(p);if(n.toRegex&&r===1)return as(is(e,d),is(t,d),!0,n);let x={negatives:[],positives:[]},S=O=>x[O<0?"negatives":"positives"].push(Math.abs(O)),b=[],E=0;for(;s?o>=i:o<=i;)n.toRegex===!0&&r>1?S(o):b.push(ap(y(o,E),d,p)),o=s?o-r:o+r,E++;return n.toRegex===!0?r>1?lp(x,n):ls(b,null,{wrap:!1,...n}):b},fp=(e,t,r=1,n={})=>{if(!Ot(e)&&e.length>1||!Ot(t)&&t.length>1)return us(e,t,n);let o=n.transform||(p=>String.fromCharCode(p)),i=`${e}`.charCodeAt(0),s=`${t}`.charCodeAt(0),a=i>s,f=Math.min(i,s),u=Math.max(i,s);if(n.toRegex&&r===1)return as(f,u,!1,n);let c=[],d=0;for(;a?i>=s:i<=s;)c.push(o(i,d)),i=a?i-r:i+r,d++;return n.toRegex===!0?ls(c,null,{wrap:!1,options:n}):c},or=(e,t,r,n={})=>{if(t==null&&fn(e))return[e];if(!fn(e)||!fn(t))return us(e,t,n);if(typeof r=="function")return or(e,t,1,{transform:r});if(os(r))return or(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,Ot(r)?Ot(e)&&Ot(t)?up(e,t,r,o):fp(e,t,Math.max(Math.abs(r),1),o):r!=null&&!os(r)?cp(r,o):or(e,t,1,r)};fs.exports=or});var ms=R((L_,ds)=>{"use strict";l();var pp=dn(),ps=rr(),dp=(e,t={})=>{let r=(n,o={})=>{let i=ps.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a=i===!0||s===!0,f=t.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0||n.isClose===!0)return f+n.value;if(n.type==="open")return a?f+n.value:"(";if(n.type==="close")return a?f+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let c=ps.reduce(n.nodes),d=pp(...c,{...t,wrap:!1,toRegex:!0});if(d.length!==0)return c.length>1&&d.length>1?`(${d})`:d}if(n.nodes)for(let c of n.nodes)u+=r(c,n);return u};return r(e)};ds.exports=dp});var ys=R((F_,hs)=>{"use strict";l();var mp=dn(),gs=nr(),dt=rr(),tt=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?dt.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let i of o)n.push(tt(i,t,r));else for(let i of t)r===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?tt(o,i,r):o+i);return dt.flatten(n)},gp=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(o,i={})=>{o.queue=[];let s=i,a=i.queue;for(;s.type!=="brace"&&s.type!=="root"&&s.parent;)s=s.parent,a=s.queue;if(o.invalid||o.dollar){a.push(tt(a.pop(),gs(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(tt(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let d=dt.reduce(o.nodes);if(dt.exceedsLimit(...d,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=mp(...d,t);p.length===0&&(p=gs(o,t)),a.push(tt(a.pop(),p)),o.nodes=[];return}let f=dt.encloseBrace(o),u=o.queue,c=o;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,u=c.queue;for(let d=0;d<o.nodes.length;d++){let p=o.nodes[d];if(p.type==="comma"&&o.type==="brace"){d===1&&u.push(""),u.push("");continue}if(p.type==="close"){a.push(tt(a.pop(),u,f));continue}if(p.value&&p.type!=="open"){u.push(tt(u.pop(),p.value));continue}p.nodes&&n(p,o)}return u};return dt.flatten(n(e))};hs.exports=gp});var xs=R((H_,vs)=>{"use strict";l();vs.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
3
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var ws=R((q_,Rs)=>{"use strict";l();var hp=nr(),{MAX_LENGTH:_s,CHAR_BACKSLASH:mn,CHAR_BACKTICK:yp,CHAR_COMMA:vp,CHAR_DOT:xp,CHAR_LEFT_PARENTHESES:_p,CHAR_RIGHT_PARENTHESES:Sp,CHAR_LEFT_CURLY_BRACE:bp,CHAR_RIGHT_CURLY_BRACE:Rp,CHAR_LEFT_SQUARE_BRACKET:Ss,CHAR_RIGHT_SQUARE_BRACKET:bs,CHAR_DOUBLE_QUOTE:wp,CHAR_SINGLE_QUOTE:Cp,CHAR_NO_BREAK_SPACE:Ep,CHAR_ZERO_WIDTH_NOBREAK_SPACE:kp}=xs(),Ap=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(_s,r.maxLength):_s;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let o={type:"root",input:e,nodes:[]},i=[o],s=o,a=o,f=0,u=e.length,c=0,d=0,p,y={},x=()=>e[c++],S=b=>{if(b.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&b.type==="text"){a.value+=b.value;return}return s.nodes.push(b),b.parent=s,b.prev=a,a=b,b};for(S({type:"bos"});c<u;)if(s=i[i.length-1],p=x(),!(p===kp||p===Ep)){if(p===mn){S({type:"text",value:(t.keepEscaping?p:"")+x()});continue}if(p===bs){S({type:"text",value:"\\"+p});continue}if(p===Ss){f++;let b=!0,E;for(;c<u&&(E=x());){if(p+=E,E===Ss){f++;continue}if(E===mn){p+=x();continue}if(E===bs&&(f--,f===0))break}S({type:"text",value:p});continue}if(p===_p){s=S({type:"paren",nodes:[]}),i.push(s),S({type:"text",value:p});continue}if(p===Sp){if(s.type!=="paren"){S({type:"text",value:p});continue}s=i.pop(),S({type:"text",value:p}),s=i[i.length-1];continue}if(p===wp||p===Cp||p===yp){let b=p,E;for(t.keepQuotes!==!0&&(p="");c<u&&(E=x());){if(E===mn){p+=E+x();continue}if(E===b){t.keepQuotes===!0&&(p+=E);break}p+=E}S({type:"text",value:p});continue}if(p===bp){d++;let E={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||s.dollar===!0,depth:d,commas:0,ranges:0,nodes:[]};s=S(E),i.push(s),S({type:"open",value:p});continue}if(p===Rp){if(s.type!=="brace"){S({type:"text",value:p});continue}let b="close";s=i.pop(),s.close=!0,S({type:b,value:p}),d--,s=i[i.length-1];continue}if(p===vp&&d>0){if(s.ranges>0){s.ranges=0;let b=s.nodes.shift();s.nodes=[b,{type:"text",value:hp(s)}]}S({type:"comma",value:p}),s.commas++;continue}if(p===xp&&d>0&&s.commas===0){let b=s.nodes;if(d===0||b.length===0){S({type:"text",value:p});continue}if(a.type==="dot"){if(s.range=[],a.value+=p,a.type="range",s.nodes.length!==3&&s.nodes.length!==5){s.invalid=!0,s.ranges=0,a.type="text";continue}s.ranges++,s.args=[];continue}if(a.type==="range"){b.pop();let E=b[b.length-1];E.value+=a.value+p,a=E,s.ranges--;continue}S({type:"dot",value:p});continue}S({type:"text",value:p})}do if(s=i.pop(),s.type!=="root"){s.nodes.forEach(O=>{O.nodes||(O.type==="open"&&(O.isOpen=!0),O.type==="close"&&(O.isClose=!0),O.nodes||(O.type="text"),O.invalid=!0)});let b=i[i.length-1],E=b.nodes.indexOf(s);b.nodes.splice(E,1,...s.nodes)}while(i.length>0);return S({type:"eos"}),o};Rs.exports=Ap});var ks=R((U_,Es)=>{"use strict";l();var Cs=nr(),Pp=ms(),Op=ys(),Tp=ws(),ye=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=ye.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(ye.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};ye.parse=(e,t={})=>Tp(e,t);ye.stringify=(e,t={})=>Cs(typeof e=="string"?ye.parse(e,t):e,t);ye.compile=(e,t={})=>(typeof e=="string"&&(e=ye.parse(e,t)),Pp(e,t));ye.expand=(e,t={})=>{typeof e=="string"&&(e=ye.parse(e,t));let r=Op(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};ye.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?ye.compile(e,t):ye.expand(e,t);Es.exports=ye});var Tt=R((G_,$s)=>{"use strict";l();var $p=B("path"),Ee="\\\\/",As=`[^${Ee}]`,Ne="\\.",Ip="\\+",Mp="\\?",ir="\\/",Np="(?=.)",Ps="[^/]",gn=`(?:${ir}|$)`,Os=`(?:^|${ir})`,hn=`${Ne}{1,2}${gn}`,Lp=`(?!${Ne})`,Dp=`(?!${Os}${hn})`,Fp=`(?!${Ne}{0,1}${gn})`,Vp=`(?!${hn})`,Hp=`[^.${ir}]`,jp=`${Ps}*?`,Ts={DOT_LITERAL:Ne,PLUS_LITERAL:Ip,QMARK_LITERAL:Mp,SLASH_LITERAL:ir,ONE_CHAR:Np,QMARK:Ps,END_ANCHOR:gn,DOTS_SLASH:hn,NO_DOT:Lp,NO_DOTS:Dp,NO_DOT_SLASH:Fp,NO_DOTS_SLASH:Vp,QMARK_NO_DOT:Hp,STAR:jp,START_ANCHOR:Os},qp={...Ts,SLASH_LITERAL:`[${Ee}]`,QMARK:As,STAR:`${As}*?`,DOTS_SLASH:`${Ne}{1,2}(?:[${Ee}]|$)`,NO_DOT:`(?!${Ne})`,NO_DOTS:`(?!(?:^|[${Ee}])${Ne}{1,2}(?:[${Ee}]|$))`,NO_DOT_SLASH:`(?!${Ne}{0,1}(?:[${Ee}]|$))`,NO_DOTS_SLASH:`(?!${Ne}{1,2}(?:[${Ee}]|$))`,QMARK_NO_DOT:`[^.${Ee}]`,START_ANCHOR:`(?:^|[${Ee}])`,END_ANCHOR:`(?:[${Ee}]|$)`},Bp={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};$s.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Bp,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:$p.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?qp:Ts}}});var $t=R(he=>{"use strict";l();var Up=B("path"),Wp=process.platform==="win32",{REGEX_BACKSLASH:Gp,REGEX_REMOVE_BACKSLASH:Kp,REGEX_SPECIAL_CHARS:zp,REGEX_SPECIAL_CHARS_GLOBAL:Yp}=Tt();he.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);he.hasRegexChars=e=>zp.test(e);he.isRegexChar=e=>e.length===1&&he.hasRegexChars(e);he.escapeRegex=e=>e.replace(Yp,"\\$1");he.toPosixSlashes=e=>e.replace(Gp,"/");he.removeBackslashes=e=>e.replace(Kp,t=>t==="\\"?"":t);he.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};he.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:Wp===!0||Up.sep==="\\";he.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?he.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};he.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};he.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",i=`${n}(?:${e})${o}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var Hs=R((X_,Vs)=>{"use strict";l();var Is=$t(),{CHAR_ASTERISK:yn,CHAR_AT:Xp,CHAR_BACKWARD_SLASH:It,CHAR_COMMA:Qp,CHAR_DOT:vn,CHAR_EXCLAMATION_MARK:xn,CHAR_FORWARD_SLASH:Fs,CHAR_LEFT_CURLY_BRACE:_n,CHAR_LEFT_PARENTHESES:Sn,CHAR_LEFT_SQUARE_BRACKET:Jp,CHAR_PLUS:Zp,CHAR_QUESTION_MARK:Ms,CHAR_RIGHT_CURLY_BRACE:ed,CHAR_RIGHT_PARENTHESES:Ns,CHAR_RIGHT_SQUARE_BRACKET:td}=Tt(),Ls=e=>e===Fs||e===It,Ds=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},rd=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,i=[],s=[],a=[],f=e,u=-1,c=0,d=0,p=!1,y=!1,x=!1,S=!1,b=!1,E=!1,O=!1,M=!1,V=!1,P=!1,N=0,C,A,$={value:"",depth:0,isGlob:!1},G=()=>u>=n,h=()=>f.charCodeAt(u+1),T=()=>(C=A,f.charCodeAt(++u));for(;u<n;){A=T();let q;if(A===It){O=$.backslashes=!0,A=T(),A===_n&&(E=!0);continue}if(E===!0||A===_n){for(N++;G()!==!0&&(A=T());){if(A===It){O=$.backslashes=!0,T();continue}if(A===_n){N++;continue}if(E!==!0&&A===vn&&(A=T())===vn){if(p=$.isBrace=!0,x=$.isGlob=!0,P=!0,o===!0)continue;break}if(E!==!0&&A===Qp){if(p=$.isBrace=!0,x=$.isGlob=!0,P=!0,o===!0)continue;break}if(A===ed&&(N--,N===0)){E=!1,p=$.isBrace=!0,P=!0;break}}if(o===!0)continue;break}if(A===Fs){if(i.push(u),s.push($),$={value:"",depth:0,isGlob:!1},P===!0)continue;if(C===vn&&u===c+1){c+=2;continue}d=u+1;continue}if(r.noext!==!0&&(A===Zp||A===Xp||A===yn||A===Ms||A===xn)===!0&&h()===Sn){if(x=$.isGlob=!0,S=$.isExtglob=!0,P=!0,A===xn&&u===c&&(V=!0),o===!0){for(;G()!==!0&&(A=T());){if(A===It){O=$.backslashes=!0,A=T();continue}if(A===Ns){x=$.isGlob=!0,P=!0;break}}continue}break}if(A===yn){if(C===yn&&(b=$.isGlobstar=!0),x=$.isGlob=!0,P=!0,o===!0)continue;break}if(A===Ms){if(x=$.isGlob=!0,P=!0,o===!0)continue;break}if(A===Jp){for(;G()!==!0&&(q=T());){if(q===It){O=$.backslashes=!0,T();continue}if(q===td){y=$.isBracket=!0,x=$.isGlob=!0,P=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&A===xn&&u===c){M=$.negated=!0,c++;continue}if(r.noparen!==!0&&A===Sn){if(x=$.isGlob=!0,o===!0){for(;G()!==!0&&(A=T());){if(A===Sn){O=$.backslashes=!0,A=T();continue}if(A===Ns){P=!0;break}}continue}break}if(x===!0){if(P=!0,o===!0)continue;break}}r.noext===!0&&(S=!1,x=!1);let L=f,H="",v="";c>0&&(H=f.slice(0,c),f=f.slice(c),d-=c),L&&x===!0&&d>0?(L=f.slice(0,d),v=f.slice(d)):x===!0?(L="",v=f):L=f,L&&L!==""&&L!=="/"&&L!==f&&Ls(L.charCodeAt(L.length-1))&&(L=L.slice(0,-1)),r.unescape===!0&&(v&&(v=Is.removeBackslashes(v)),L&&O===!0&&(L=Is.removeBackslashes(L)));let _={prefix:H,input:e,start:c,base:L,glob:v,isBrace:p,isBracket:y,isGlob:x,isExtglob:S,isGlobstar:b,negated:M,negatedExtglob:V};if(r.tokens===!0&&(_.maxDepth=0,Ls(A)||s.push($),_.tokens=s),r.parts===!0||r.tokens===!0){let q;for(let I=0;I<i.length;I++){let K=q?q+1:c,ee=i[I],J=e.slice(K,ee);r.tokens&&(I===0&&c!==0?(s[I].isPrefix=!0,s[I].value=H):s[I].value=J,Ds(s[I]),_.maxDepth+=s[I].depth),(I!==0||J!=="")&&a.push(J),q=ee}if(q&&q+1<e.length){let I=e.slice(q+1);a.push(I),r.tokens&&(s[s.length-1].value=I,Ds(s[s.length-1]),_.maxDepth+=s[s.length-1].depth)}_.slashes=i,_.parts=a}return _};Vs.exports=rd});var Bs=R((J_,qs)=>{"use strict";l();var sr=Tt(),ve=$t(),{MAX_LENGTH:ar,POSIX_REGEX_SOURCE:nd,REGEX_NON_SPECIAL_CHARS:od,REGEX_SPECIAL_CHARS_BACKREF:id,REPLACEMENTS:js}=sr,sd=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(o=>ve.escapeRegex(o)).join("..")}return r},mt=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,bn=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=js[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(ar,r.maxLength):ar,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);let i={type:"bos",value:"",output:r.prepend||""},s=[i],a=r.capture?"":"?:",f=ve.isWindows(t),u=sr.globChars(f),c=sr.extglobChars(u),{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:y,ONE_CHAR:x,DOTS_SLASH:S,NO_DOT:b,NO_DOT_SLASH:E,NO_DOTS_SLASH:O,QMARK:M,QMARK_NO_DOT:V,STAR:P,START_ANCHOR:N}=u,C=k=>`(${a}(?:(?!${N}${k.dot?S:d}).)*?)`,A=r.dot?"":b,$=r.dot?M:V,G=r.bash===!0?C(r):P;r.capture&&(G=`(${G})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let h={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=ve.removePrefix(e,h),o=e.length;let T=[],L=[],H=[],v=i,_,q=()=>h.index===o-1,I=h.peek=(k=1)=>e[h.index+k],K=h.advance=()=>e[++h.index]||"",ee=()=>e.slice(h.index+1),J=(k="",W=0)=>{h.consumed+=k,h.index+=W},pe=k=>{h.output+=k.output!=null?k.output:k.value,J(k.value)},ae=()=>{let k=1;for(;I()==="!"&&(I(2)!=="("||I(3)==="?");)K(),h.start++,k++;return k%2===0?!1:(h.negated=!0,h.start++,!0)},Me=k=>{h[k]++,H.push(k)},le=k=>{h[k]--,H.pop()},F=k=>{if(v.type==="globstar"){let W=h.braces>0&&(k.type==="comma"||k.type==="brace"),w=k.extglob===!0||T.length&&(k.type==="pipe"||k.type==="paren");k.type!=="slash"&&k.type!=="paren"&&!W&&!w&&(h.output=h.output.slice(0,-v.output.length),v.type="star",v.value="*",v.output=G,h.output+=v.output)}if(T.length&&k.type!=="paren"&&(T[T.length-1].inner+=k.value),(k.value||k.output)&&pe(k),v&&v.type==="text"&&k.type==="text"){v.value+=k.value,v.output=(v.output||"")+k.value;return}k.prev=v,s.push(k),v=k},ge=(k,W)=>{let w={...c[W],conditions:1,inner:""};w.prev=v,w.parens=h.parens,w.output=h.output;let j=(r.capture?"(":"")+w.open;Me("parens"),F({type:k,value:W,output:h.output?"":x}),F({type:"paren",extglob:!0,value:K(),output:j}),T.push(w)},ut=k=>{let W=k.close+(r.capture?")":""),w;if(k.type==="negate"){let j=G;if(k.inner&&k.inner.length>1&&k.inner.includes("/")&&(j=C(r)),(j!==G||q()||/^\)+$/.test(ee()))&&(W=k.close=`)$))${j}`),k.inner.includes("*")&&(w=ee())&&/^\.[^\\/.]+$/.test(w)){let X=bn(w,{...t,fastpaths:!1}).output;W=k.close=`)${X})${j})`}k.prev.type==="bos"&&(h.negatedExtglob=!0)}F({type:"paren",extglob:!0,value:_,output:W}),le("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let k=!1,W=e.replace(id,(w,j,X,de,ne,nn)=>de==="\\"?(k=!0,w):de==="?"?j?j+de+(ne?M.repeat(ne.length):""):nn===0?$+(ne?M.repeat(ne.length):""):M.repeat(X.length):de==="."?d.repeat(X.length):de==="*"?j?j+de+(ne?G:""):G:j?w:`\\${w}`);return k===!0&&(r.unescape===!0?W=W.replace(/\\/g,""):W=W.replace(/\\+/g,w=>w.length%2===0?"\\\\":w?"\\":"")),W===e&&r.contains===!0?(h.output=e,h):(h.output=ve.wrapOutput(W,h,t),h)}for(;!q();){if(_=K(),_==="\0")continue;if(_==="\\"){let w=I();if(w==="/"&&r.bash!==!0||w==="."||w===";")continue;if(!w){_+="\\",F({type:"text",value:_});continue}let j=/^\\+/.exec(ee()),X=0;if(j&&j[0].length>2&&(X=j[0].length,h.index+=X,X%2!==0&&(_+="\\")),r.unescape===!0?_=K():_+=K(),h.brackets===0){F({type:"text",value:_});continue}}if(h.brackets>0&&(_!=="]"||v.value==="["||v.value==="[^")){if(r.posix!==!1&&_===":"){let w=v.value.slice(1);if(w.includes("[")&&(v.posix=!0,w.includes(":"))){let j=v.value.lastIndexOf("["),X=v.value.slice(0,j),de=v.value.slice(j+2),ne=nd[de];if(ne){v.value=X+ne,h.backtrack=!0,K(),!i.output&&s.indexOf(v)===1&&(i.output=x);continue}}}(_==="["&&I()!==":"||_==="-"&&I()==="]")&&(_=`\\${_}`),_==="]"&&(v.value==="["||v.value==="[^")&&(_=`\\${_}`),r.posix===!0&&_==="!"&&v.value==="["&&(_="^"),v.value+=_,pe({value:_});continue}if(h.quotes===1&&_!=='"'){_=ve.escapeRegex(_),v.value+=_,pe({value:_});continue}if(_==='"'){h.quotes=h.quotes===1?0:1,r.keepQuotes===!0&&F({type:"text",value:_});continue}if(_==="("){Me("parens"),F({type:"paren",value:_});continue}if(_===")"){if(h.parens===0&&r.strictBrackets===!0)throw new SyntaxError(mt("opening","("));let w=T[T.length-1];if(w&&h.parens===w.parens+1){ut(T.pop());continue}F({type:"paren",value:_,output:h.parens?")":"\\)"}),le("parens");continue}if(_==="["){if(r.nobracket===!0||!ee().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(mt("closing","]"));_=`\\${_}`}else Me("brackets");F({type:"bracket",value:_});continue}if(_==="]"){if(r.nobracket===!0||v&&v.type==="bracket"&&v.value.length===1){F({type:"text",value:_,output:`\\${_}`});continue}if(h.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(mt("opening","["));F({type:"text",value:_,output:`\\${_}`});continue}le("brackets");let w=v.value.slice(1);if(v.posix!==!0&&w[0]==="^"&&!w.includes("/")&&(_=`/${_}`),v.value+=_,pe({value:_}),r.literalBrackets===!1||ve.hasRegexChars(w))continue;let j=ve.escapeRegex(v.value);if(h.output=h.output.slice(0,-v.value.length),r.literalBrackets===!0){h.output+=j,v.value=j;continue}v.value=`(${a}${j}|${v.value})`,h.output+=v.value;continue}if(_==="{"&&r.nobrace!==!0){Me("braces");let w={type:"brace",value:_,output:"(",outputIndex:h.output.length,tokensIndex:h.tokens.length};L.push(w),F(w);continue}if(_==="}"){let w=L[L.length-1];if(r.nobrace===!0||!w){F({type:"text",value:_,output:_});continue}let j=")";if(w.dots===!0){let X=s.slice(),de=[];for(let ne=X.length-1;ne>=0&&(s.pop(),X[ne].type!=="brace");ne--)X[ne].type!=="dots"&&de.unshift(X[ne].value);j=sd(de,r),h.backtrack=!0}if(w.comma!==!0&&w.dots!==!0){let X=h.output.slice(0,w.outputIndex),de=h.tokens.slice(w.tokensIndex);w.value=w.output="\\{",_=j="\\}",h.output=X;for(let ne of de)h.output+=ne.output||ne.value}F({type:"brace",value:_,output:j}),le("braces"),L.pop();continue}if(_==="|"){T.length>0&&T[T.length-1].conditions++,F({type:"text",value:_});continue}if(_===","){let w=_,j=L[L.length-1];j&&H[H.length-1]==="braces"&&(j.comma=!0,w="|"),F({type:"comma",value:_,output:w});continue}if(_==="/"){if(v.type==="dot"&&h.index===h.start+1){h.start=h.index+1,h.consumed="",h.output="",s.pop(),v=i;continue}F({type:"slash",value:_,output:y});continue}if(_==="."){if(h.braces>0&&v.type==="dot"){v.value==="."&&(v.output=d);let w=L[L.length-1];v.type="dots",v.output+=_,v.value+=_,w.dots=!0;continue}if(h.braces+h.parens===0&&v.type!=="bos"&&v.type!=="slash"){F({type:"text",value:_,output:d});continue}F({type:"dot",value:_,output:d});continue}if(_==="?"){if(!(v&&v.value==="(")&&r.noextglob!==!0&&I()==="("&&I(2)!=="?"){ge("qmark",_);continue}if(v&&v.type==="paren"){let j=I(),X=_;if(j==="<"&&!ve.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(v.value==="("&&!/[!=<:]/.test(j)||j==="<"&&!/<([!=]|\w+>)/.test(ee()))&&(X=`\\${_}`),F({type:"text",value:_,output:X});continue}if(r.dot!==!0&&(v.type==="slash"||v.type==="bos")){F({type:"qmark",value:_,output:V});continue}F({type:"qmark",value:_,output:M});continue}if(_==="!"){if(r.noextglob!==!0&&I()==="("&&(I(2)!=="?"||!/[!=<:]/.test(I(3)))){ge("negate",_);continue}if(r.nonegate!==!0&&h.index===0){ae();continue}}if(_==="+"){if(r.noextglob!==!0&&I()==="("&&I(2)!=="?"){ge("plus",_);continue}if(v&&v.value==="("||r.regex===!1){F({type:"plus",value:_,output:p});continue}if(v&&(v.type==="bracket"||v.type==="paren"||v.type==="brace")||h.parens>0){F({type:"plus",value:_});continue}F({type:"plus",value:p});continue}if(_==="@"){if(r.noextglob!==!0&&I()==="("&&I(2)!=="?"){F({type:"at",extglob:!0,value:_,output:""});continue}F({type:"text",value:_});continue}if(_!=="*"){(_==="$"||_==="^")&&(_=`\\${_}`);let w=od.exec(ee());w&&(_+=w[0],h.index+=w[0].length),F({type:"text",value:_});continue}if(v&&(v.type==="globstar"||v.star===!0)){v.type="star",v.star=!0,v.value+=_,v.output=G,h.backtrack=!0,h.globstar=!0,J(_);continue}let k=ee();if(r.noextglob!==!0&&/^\([^?]/.test(k)){ge("star",_);continue}if(v.type==="star"){if(r.noglobstar===!0){J(_);continue}let w=v.prev,j=w.prev,X=w.type==="slash"||w.type==="bos",de=j&&(j.type==="star"||j.type==="globstar");if(r.bash===!0&&(!X||k[0]&&k[0]!=="/")){F({type:"star",value:_,output:""});continue}let ne=h.braces>0&&(w.type==="comma"||w.type==="brace"),nn=T.length&&(w.type==="pipe"||w.type==="paren");if(!X&&w.type!=="paren"&&!ne&&!nn){F({type:"star",value:_,output:""});continue}for(;k.slice(0,3)==="/**";){let Zt=e[h.index+4];if(Zt&&Zt!=="/")break;k=k.slice(3),J("/**",3)}if(w.type==="bos"&&q()){v.type="globstar",v.value+=_,v.output=C(r),h.output=v.output,h.globstar=!0,J(_);continue}if(w.type==="slash"&&w.prev.type!=="bos"&&!de&&q()){h.output=h.output.slice(0,-(w.output+v.output).length),w.output=`(?:${w.output}`,v.type="globstar",v.output=C(r)+(r.strictSlashes?")":"|$)"),v.value+=_,h.globstar=!0,h.output+=w.output+v.output,J(_);continue}if(w.type==="slash"&&w.prev.type!=="bos"&&k[0]==="/"){let Zt=k[1]!==void 0?"|$":"";h.output=h.output.slice(0,-(w.output+v.output).length),w.output=`(?:${w.output}`,v.type="globstar",v.output=`${C(r)}${y}|${y}${Zt})`,v.value+=_,h.output+=w.output+v.output,h.globstar=!0,J(_+K()),F({type:"slash",value:"/",output:""});continue}if(w.type==="bos"&&k[0]==="/"){v.type="globstar",v.value+=_,v.output=`(?:^|${y}|${C(r)}${y})`,h.output=v.output,h.globstar=!0,J(_+K()),F({type:"slash",value:"/",output:""});continue}h.output=h.output.slice(0,-v.output.length),v.type="globstar",v.output=C(r),v.value+=_,h.output+=v.output,h.globstar=!0,J(_);continue}let W={type:"star",value:_,output:G};if(r.bash===!0){W.output=".*?",(v.type==="bos"||v.type==="slash")&&(W.output=A+W.output),F(W);continue}if(v&&(v.type==="bracket"||v.type==="paren")&&r.regex===!0){W.output=_,F(W);continue}(h.index===h.start||v.type==="slash"||v.type==="dot")&&(v.type==="dot"?(h.output+=E,v.output+=E):r.dot===!0?(h.output+=O,v.output+=O):(h.output+=A,v.output+=A),I()!=="*"&&(h.output+=x,v.output+=x)),F(W)}for(;h.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(mt("closing","]"));h.output=ve.escapeLast(h.output,"["),le("brackets")}for(;h.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(mt("closing",")"));h.output=ve.escapeLast(h.output,"("),le("parens")}for(;h.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(mt("closing","}"));h.output=ve.escapeLast(h.output,"{"),le("braces")}if(r.strictSlashes!==!0&&(v.type==="star"||v.type==="bracket")&&F({type:"maybe_slash",value:"",output:`${y}?`}),h.backtrack===!0){h.output="";for(let k of h.tokens)h.output+=k.output!=null?k.output:k.value,k.suffix&&(h.output+=k.suffix)}return h};bn.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(ar,r.maxLength):ar,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=js[e]||e;let i=ve.isWindows(t),{DOT_LITERAL:s,SLASH_LITERAL:a,ONE_CHAR:f,DOTS_SLASH:u,NO_DOT:c,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:y,START_ANCHOR:x}=sr.globChars(i),S=r.dot?d:c,b=r.dot?p:c,E=r.capture?"":"?:",O={negated:!1,prefix:""},M=r.bash===!0?".*?":y;r.capture&&(M=`(${M})`);let V=A=>A.noglobstar===!0?M:`(${E}(?:(?!${x}${A.dot?u:s}).)*?)`,P=A=>{switch(A){case"*":return`${S}${f}${M}`;case".*":return`${s}${f}${M}`;case"*.*":return`${S}${M}${s}${f}${M}`;case"*/*":return`${S}${M}${a}${f}${b}${M}`;case"**":return S+V(r);case"**/*":return`(?:${S}${V(r)}${a})?${b}${f}${M}`;case"**/*.*":return`(?:${S}${V(r)}${a})?${b}${M}${s}${f}${M}`;case"**/.*":return`(?:${S}${V(r)}${a})?${s}${f}${M}`;default:{let $=/^(.*?)\.(\w+)$/.exec(A);if(!$)return;let G=P($[1]);return G?G+s+$[2]:void 0}}},N=ve.removePrefix(e,O),C=P(N);return C&&r.strictSlashes!==!0&&(C+=`${a}?`),C};qs.exports=bn});var Ws=R((e1,Us)=>{"use strict";l();var ad=B("path"),ld=Hs(),Rn=Bs(),wn=$t(),cd=Tt(),ud=e=>e&&typeof e=="object"&&!Array.isArray(e),Z=(e,t,r=!1)=>{if(Array.isArray(e)){let c=e.map(p=>Z(p,t,r));return p=>{for(let y of c){let x=y(p);if(x)return x}return!1}}let n=ud(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},i=wn.isWindows(t),s=n?Z.compileRe(e,t):Z.makeRe(e,t,!1,!0),a=s.state;delete s.state;let f=()=>!1;if(o.ignore){let c={...t,ignore:null,onMatch:null,onResult:null};f=Z(o.ignore,c,r)}let u=(c,d=!1)=>{let{isMatch:p,match:y,output:x}=Z.test(c,s,t,{glob:e,posix:i}),S={glob:e,state:a,regex:s,posix:i,input:c,output:x,match:y,isMatch:p};return typeof o.onResult=="function"&&o.onResult(S),p===!1?(S.isMatch=!1,d?S:!1):f(c)?(typeof o.onIgnore=="function"&&o.onIgnore(S),S.isMatch=!1,d?S:!1):(typeof o.onMatch=="function"&&o.onMatch(S),d?S:!0)};return r&&(u.state=a),u};Z.test=(e,t,r,{glob:n,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=r||{},s=i.format||(o?wn.toPosixSlashes:null),a=e===n,f=a&&s?s(e):e;return a===!1&&(f=s?s(e):e,a=f===n),(a===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?a=Z.matchBase(e,t,r,o):a=t.exec(f)),{isMatch:!!a,match:a,output:f}};Z.matchBase=(e,t,r,n=wn.isWindows(r))=>(t instanceof RegExp?t:Z.makeRe(t,r)).test(ad.basename(e));Z.isMatch=(e,t,r)=>Z(t,r)(e);Z.parse=(e,t)=>Array.isArray(e)?e.map(r=>Z.parse(r,t)):Rn(e,{...t,fastpaths:!1});Z.scan=(e,t)=>ld(e,t);Z.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let o=t||{},i=o.contains?"":"^",s=o.contains?"":"$",a=`${i}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let f=Z.toRegex(a,t);return n===!0&&(f.state=e),f};Z.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=Rn.fastpaths(e,t)),o.output||(o=Rn(e,t)),Z.compileRe(o,t,r,n)};Z.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};Z.constants=cd;Us.exports=Z});var Ks=R((r1,Gs)=>{"use strict";l();Gs.exports=Ws()});var Js=R((o1,Qs)=>{"use strict";l();var Ys=B("util"),Xs=ks(),ke=Ks(),Cn=$t(),zs=e=>e===""||e==="./",Y=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,i=new Set,s=0,a=c=>{i.add(c.output),r&&r.onResult&&r.onResult(c)};for(let c=0;c<t.length;c++){let d=ke(String(t[c]),{...r,onResult:a},!0),p=d.state.negated||d.state.negatedExtglob;p&&s++;for(let y of e){let x=d(y,!0);(p?!x.isMatch:x.isMatch)&&(p?n.add(x.output):(n.delete(x.output),o.add(x.output)))}}let u=(s===t.length?[...i]:[...o]).filter(c=>!n.has(c));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(c=>c.replace(/\\/g,"")):t}return u};Y.match=Y;Y.matcher=(e,t)=>ke(e,t);Y.isMatch=(e,t,r)=>ke(t,r)(e);Y.any=Y.isMatch;Y.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],i=a=>{r.onResult&&r.onResult(a),o.push(a.output)},s=new Set(Y(e,t,{...r,onResult:i}));for(let a of o)s.has(a)||n.add(a);return[...n]};Y.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Ys.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>Y.contains(e,n,r));if(typeof t=="string"){if(zs(e)||zs(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return Y.isMatch(e,t,{...r,contains:!0})};Y.matchKeys=(e,t,r)=>{if(!Cn.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=Y(Object.keys(e),t,r),o={};for(let i of n)o[i]=e[i];return o};Y.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=ke(String(o),r);if(n.some(s=>i(s)))return!0}return!1};Y.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=ke(String(o),r);if(!n.every(s=>i(s)))return!1}return!0};Y.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Ys.inspect(e)}"`);return[].concat(t).every(n=>ke(n,r)(e))};Y.capture=(e,t,r)=>{let n=Cn.isWindows(r),i=ke.makeRe(String(e),{...r,capture:!0}).exec(n?Cn.toPosixSlashes(t):t);if(i)return i.slice(1).map(s=>s===void 0?"":s)};Y.makeRe=(...e)=>ke.makeRe(...e);Y.scan=(...e)=>ke.scan(...e);Y.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of Xs(String(n),t))r.push(ke.parse(o,t));return r};Y.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:Xs(e,t)};Y.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return Y.braces(e,{...t,expand:!0})};Qs.exports=Y});var sa=R(D=>{"use strict";l();Object.defineProperty(D,"__esModule",{value:!0});D.removeDuplicateSlashes=D.matchAny=D.convertPatternsToRe=D.makeRe=D.getPatternParts=D.expandBraceExpansion=D.expandPatternsWithBraceExpansion=D.isAffectDepthOfReadingPattern=D.endsWithSlashGlobStar=D.hasGlobStar=D.getBaseDirectory=D.isPatternRelatedToParentDirectory=D.getPatternsOutsideCurrentDirectory=D.getPatternsInsideCurrentDirectory=D.getPositivePatterns=D.getNegativePatterns=D.isPositivePattern=D.isNegativePattern=D.convertToNegativePattern=D.convertToPositivePattern=D.isDynamicPattern=D.isStaticPattern=void 0;var fd=B("path"),pd=Ui(),En=Js(),Zs="**",dd="\\",md=/[*?]|^!/,gd=/\[[^[]*]/,hd=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,yd=/[!*+?@]\([^(]*\)/,vd=/,|\.\./,xd=/(?!^)\/{2,}/g;function ea(e,t={}){return!ta(e,t)}D.isStaticPattern=ea;function ta(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(dd)||md.test(e)||gd.test(e)||hd.test(e)||t.extglob!==!1&&yd.test(e)||t.braceExpansion!==!1&&_d(e))}D.isDynamicPattern=ta;function _d(e){let t=e.indexOf("{");if(t===-1)return!1;let r=e.indexOf("}",t+1);if(r===-1)return!1;let n=e.slice(t,r);return vd.test(n)}function Sd(e){return lr(e)?e.slice(1):e}D.convertToPositivePattern=Sd;function bd(e){return"!"+e}D.convertToNegativePattern=bd;function lr(e){return e.startsWith("!")&&e[1]!=="("}D.isNegativePattern=lr;function ra(e){return!lr(e)}D.isPositivePattern=ra;function Rd(e){return e.filter(lr)}D.getNegativePatterns=Rd;function wd(e){return e.filter(ra)}D.getPositivePatterns=wd;function Cd(e){return e.filter(t=>!kn(t))}D.getPatternsInsideCurrentDirectory=Cd;function Ed(e){return e.filter(kn)}D.getPatternsOutsideCurrentDirectory=Ed;function kn(e){return e.startsWith("..")||e.startsWith("./..")}D.isPatternRelatedToParentDirectory=kn;function kd(e){return pd(e,{flipBackslashes:!1})}D.getBaseDirectory=kd;function Ad(e){return e.includes(Zs)}D.hasGlobStar=Ad;function na(e){return e.endsWith("/"+Zs)}D.endsWithSlashGlobStar=na;function Pd(e){let t=fd.basename(e);return na(e)||ea(t)}D.isAffectDepthOfReadingPattern=Pd;function Od(e){return e.reduce((t,r)=>t.concat(oa(r)),[])}D.expandPatternsWithBraceExpansion=Od;function oa(e){let t=En.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}D.expandBraceExpansion=oa;function Td(e,t){let{parts:r}=En.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return r.length===0&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}D.getPatternParts=Td;function ia(e,t){return En.makeRe(e,t)}D.makeRe=ia;function $d(e,t){return e.map(r=>ia(r,t))}D.convertPatternsToRe=$d;function Id(e,t){return t.some(r=>r.test(e))}D.matchAny=Id;function Md(e){return e.replace(xd,"/")}D.removeDuplicateSlashes=Md});var ua=R((l1,ca)=>{"use strict";l();var Nd=B("stream"),aa=Nd.PassThrough,Ld=Array.prototype.slice;ca.exports=Dd;function Dd(){let e=[],t=Ld.call(arguments),r=!1,n=t[t.length-1];n&&!Array.isArray(n)&&n.pipe==null?t.pop():n={};let o=n.end!==!1,i=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let s=aa(n);function a(){for(let c=0,d=arguments.length;c<d;c++)e.push(la(arguments[c],n));return f(),this}function f(){if(r)return;r=!0;let c=e.shift();if(!c){process.nextTick(u);return}Array.isArray(c)||(c=[c]);let d=c.length+1;function p(){--d>0||(r=!1,f())}function y(x){function S(){x.removeListener("merge2UnpipeEnd",S),x.removeListener("end",S),i&&x.removeListener("error",b),p()}function b(E){s.emit("error",E)}if(x._readableState.endEmitted)return p();x.on("merge2UnpipeEnd",S),x.on("end",S),i&&x.on("error",b),x.pipe(s,{end:!1}),x.resume()}for(let x=0;x<c.length;x++)y(c[x]);p()}function u(){r=!1,s.emit("queueDrain"),o&&s.end()}return s.setMaxListeners(0),s.add=a,s.on("unpipe",function(c){c.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),s}function la(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=la(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(aa(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var pa=R(cr=>{"use strict";l();Object.defineProperty(cr,"__esModule",{value:!0});cr.merge=void 0;var Fd=ua();function Vd(e){let t=Fd(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>fa(e)),t.once("end",()=>fa(e)),t}cr.merge=Vd;function fa(e){e.forEach(t=>t.emit("close"))}});var da=R(gt=>{"use strict";l();Object.defineProperty(gt,"__esModule",{value:!0});gt.isEmpty=gt.isString=void 0;function Hd(e){return typeof e=="string"}gt.isString=Hd;function jd(e){return e===""}gt.isEmpty=jd});var Le=R(ce=>{"use strict";l();Object.defineProperty(ce,"__esModule",{value:!0});ce.string=ce.stream=ce.pattern=ce.path=ce.fs=ce.errno=ce.array=void 0;var qd=Ti();ce.array=qd;var Bd=$i();ce.errno=Bd;var Ud=Ii();ce.fs=Ud;var Wd=Di();ce.path=Wd;var Gd=sa();ce.pattern=Gd;var Kd=pa();ce.stream=Kd;var zd=da();ce.string=zd});var ya=R(ue=>{"use strict";l();Object.defineProperty(ue,"__esModule",{value:!0});ue.convertPatternGroupToTask=ue.convertPatternGroupsToTasks=ue.groupPatternsByBaseDirectory=ue.getNegativePatternsAsPositive=ue.getPositivePatterns=ue.convertPatternsToTasks=ue.generate=void 0;var we=Le();function Yd(e,t){let r=ma(e,t),n=ma(t.ignore,t),o=ga(r),i=ha(r,n),s=o.filter(c=>we.pattern.isStaticPattern(c,t)),a=o.filter(c=>we.pattern.isDynamicPattern(c,t)),f=An(s,i,!1),u=An(a,i,!0);return f.concat(u)}ue.generate=Yd;function ma(e,t){let r=e;return t.braceExpansion&&(r=we.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>we.pattern.removeDuplicateSlashes(n))}function An(e,t,r){let n=[],o=we.pattern.getPatternsOutsideCurrentDirectory(e),i=we.pattern.getPatternsInsideCurrentDirectory(e),s=Pn(o),a=Pn(i);return n.push(...On(s,t,r)),"."in a?n.push(Tn(".",i,t,r)):n.push(...On(a,t,r)),n}ue.convertPatternsToTasks=An;function ga(e){return we.pattern.getPositivePatterns(e)}ue.getPositivePatterns=ga;function ha(e,t){return we.pattern.getNegativePatterns(e).concat(t).map(we.pattern.convertToPositivePattern)}ue.getNegativePatternsAsPositive=ha;function Pn(e){let t={};return e.reduce((r,n)=>{let o=we.pattern.getBaseDirectory(n);return o in r?r[o].push(n):r[o]=[n],r},t)}ue.groupPatternsByBaseDirectory=Pn;function On(e,t,r){return Object.keys(e).map(n=>Tn(n,e[n],t,r))}ue.convertPatternGroupsToTasks=On;function Tn(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(we.pattern.convertToNegativePattern))}}ue.convertPatternGroupToTask=Tn});var xa=R(ur=>{"use strict";l();Object.defineProperty(ur,"__esModule",{value:!0});ur.read=void 0;function Xd(e,t,r){t.fs.lstat(e,(n,o)=>{if(n!==null){va(r,n);return}if(!o.isSymbolicLink()||!t.followSymbolicLink){$n(r,o);return}t.fs.stat(e,(i,s)=>{if(i!==null){if(t.throwErrorOnBrokenSymbolicLink){va(r,i);return}$n(r,o);return}t.markSymbolicLink&&(s.isSymbolicLink=()=>!0),$n(r,s)})})}ur.read=Xd;function va(e,t){e(t)}function $n(e,t){e(null,t)}});var _a=R(fr=>{"use strict";l();Object.defineProperty(fr,"__esModule",{value:!0});fr.read=void 0;function Qd(e,t){let r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{let n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw n}}fr.read=Qd});var Sa=R(Ve=>{"use strict";l();Object.defineProperty(Ve,"__esModule",{value:!0});Ve.createFileSystemAdapter=Ve.FILE_SYSTEM_ADAPTER=void 0;var pr=B("fs");Ve.FILE_SYSTEM_ADAPTER={lstat:pr.lstat,stat:pr.stat,lstatSync:pr.lstatSync,statSync:pr.statSync};function Jd(e){return e===void 0?Ve.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ve.FILE_SYSTEM_ADAPTER),e)}Ve.createFileSystemAdapter=Jd});var ba=R(Mn=>{"use strict";l();Object.defineProperty(Mn,"__esModule",{value:!0});var Zd=Sa(),In=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Zd.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,r){return t??r}};Mn.default=In});var rt=R(He=>{"use strict";l();Object.defineProperty(He,"__esModule",{value:!0});He.statSync=He.stat=He.Settings=void 0;var Ra=xa(),em=_a(),Nn=ba();He.Settings=Nn.default;function tm(e,t,r){if(typeof t=="function"){Ra.read(e,Ln(),t);return}Ra.read(e,Ln(t),r)}He.stat=tm;function rm(e,t){let r=Ln(t);return em.read(e,r)}He.statSync=rm;function Ln(e={}){return e instanceof Nn.default?e:new Nn.default(e)}});var Ea=R((A1,Ca)=>{"use strict";l();var wa;Ca.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(wa||(wa=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var Aa=R((O1,ka)=>{"use strict";l();ka.exports=om;var nm=Ea();function om(e,t){let r,n,o,i=!0;Array.isArray(e)?(r=[],n=e.length):(o=Object.keys(e),r={},n=o.length);function s(f){function u(){t&&t(f,r),t=null}i?nm(u):u()}function a(f,u,c){r[f]=c,(--n===0||u)&&s(u)}n?o?o.forEach(function(f){e[f](function(u,c){a(f,u,c)})}):e.forEach(function(f,u){f(function(c,d){a(u,c,d)})}):s(null),i=!1}});var Dn=R(mr=>{"use strict";l();Object.defineProperty(mr,"__esModule",{value:!0});mr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var dr=process.versions.node.split(".");if(dr[0]===void 0||dr[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var Pa=Number.parseInt(dr[0],10),im=Number.parseInt(dr[1],10),Oa=10,sm=10,am=Pa>Oa,lm=Pa===Oa&&im>=sm;mr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=am||lm});var Ta=R(gr=>{"use strict";l();Object.defineProperty(gr,"__esModule",{value:!0});gr.createDirentFromStats=void 0;var Fn=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function cm(e,t){return new Fn(e,t)}gr.createDirentFromStats=cm});var Vn=R(hr=>{"use strict";l();Object.defineProperty(hr,"__esModule",{value:!0});hr.fs=void 0;var um=Ta();hr.fs=um});var Hn=R(yr=>{"use strict";l();Object.defineProperty(yr,"__esModule",{value:!0});yr.joinPathSegments=void 0;function fm(e,t,r){return e.endsWith(r)?e+t:e+r+t}yr.joinPathSegments=fm});var Da=R(je=>{"use strict";l();Object.defineProperty(je,"__esModule",{value:!0});je.readdir=je.readdirWithFileTypes=je.read=void 0;var pm=rt(),$a=Aa(),dm=Dn(),Ia=Vn(),Ma=Hn();function mm(e,t,r){if(!t.stats&&dm.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Na(e,t,r);return}La(e,t,r)}je.read=mm;function Na(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,o)=>{if(n!==null){vr(r,n);return}let i=o.map(a=>({dirent:a,name:a.name,path:Ma.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){jn(r,i);return}let s=i.map(a=>gm(a,t));$a(s,(a,f)=>{if(a!==null){vr(r,a);return}jn(r,f)})})}je.readdirWithFileTypes=Na;function gm(e,t){return r=>{if(!e.dirent.isSymbolicLink()){r(null,e);return}t.fs.stat(e.path,(n,o)=>{if(n!==null){if(t.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,e);return}e.dirent=Ia.fs.createDirentFromStats(e.name,o),r(null,e)})}}function La(e,t,r){t.fs.readdir(e,(n,o)=>{if(n!==null){vr(r,n);return}let i=o.map(s=>{let a=Ma.joinPathSegments(e,s,t.pathSegmentSeparator);return f=>{pm.stat(a,t.fsStatSettings,(u,c)=>{if(u!==null){f(u);return}let d={name:s,path:a,dirent:Ia.fs.createDirentFromStats(s,c)};t.stats&&(d.stats=c),f(null,d)})}});$a(i,(s,a)=>{if(s!==null){vr(r,s);return}jn(r,a)})})}je.readdir=La;function vr(e,t){e(t)}function jn(e,t){e(null,t)}});var qa=R(qe=>{"use strict";l();Object.defineProperty(qe,"__esModule",{value:!0});qe.readdir=qe.readdirWithFileTypes=qe.read=void 0;var hm=rt(),ym=Dn(),Fa=Vn(),Va=Hn();function vm(e,t){return!t.stats&&ym.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Ha(e,t):ja(e,t)}qe.read=vm;function Ha(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let o={dirent:n,name:n.name,path:Va.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let i=t.fs.statSync(o.path);o.dirent=Fa.fs.createDirentFromStats(o.name,i)}catch(i){if(t.throwErrorOnBrokenSymbolicLink)throw i}return o})}qe.readdirWithFileTypes=Ha;function ja(e,t){return t.fs.readdirSync(e).map(n=>{let o=Va.joinPathSegments(e,n,t.pathSegmentSeparator),i=hm.statSync(o,t.fsStatSettings),s={name:n,path:o,dirent:Fa.fs.createDirentFromStats(n,i)};return t.stats&&(s.stats=i),s})}qe.readdir=ja});var Ba=R(Be=>{"use strict";l();Object.defineProperty(Be,"__esModule",{value:!0});Be.createFileSystemAdapter=Be.FILE_SYSTEM_ADAPTER=void 0;var ht=B("fs");Be.FILE_SYSTEM_ADAPTER={lstat:ht.lstat,stat:ht.stat,lstatSync:ht.lstatSync,statSync:ht.statSync,readdir:ht.readdir,readdirSync:ht.readdirSync};function xm(e){return e===void 0?Be.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Be.FILE_SYSTEM_ADAPTER),e)}Be.createFileSystemAdapter=xm});var Ua=R(Bn=>{"use strict";l();Object.defineProperty(Bn,"__esModule",{value:!0});var _m=B("path"),Sm=rt(),bm=Ba(),qn=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=bm.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,_m.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Sm.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Bn.default=qn});var xr=R(Ue=>{"use strict";l();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Settings=Ue.scandirSync=Ue.scandir=void 0;var Wa=Da(),Rm=qa(),Un=Ua();Ue.Settings=Un.default;function wm(e,t,r){if(typeof t=="function"){Wa.read(e,Wn(),t);return}Wa.read(e,Wn(t),r)}Ue.scandir=wm;function Cm(e,t){let r=Wn(t);return Rm.read(e,r)}Ue.scandirSync=Cm;function Wn(e={}){return e instanceof Un.default?e:new Un.default(e)}});var Ka=R((X1,Ga)=>{"use strict";l();function Em(e){var t=new e,r=t;function n(){var i=t;return i.next?t=i.next:(t=new e,r=t),i.next=null,i}function o(i){r.next=i,r=i}return{get:n,release:o}}Ga.exports=Em});var Ya=R((J1,Gn)=>{"use strict";l();var km=Ka();function za(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=km(Am),o=null,i=null,s=0,a=null,f={push:S,drain:_e,saturated:_e,pause:c,paused:!1,get concurrency(){return r},set concurrency(P){if(!(P>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=P,!f.paused)for(;o&&s<r;)s++,E()},running:u,resume:y,idle:x,length:d,getQueue:p,unshift:b,empty:_e,kill:O,killAndDrain:M,error:V};return f;function u(){return s}function c(){f.paused=!0}function d(){for(var P=o,N=0;P;)P=P.next,N++;return N}function p(){for(var P=o,N=[];P;)N.push(P.value),P=P.next;return N}function y(){if(f.paused){if(f.paused=!1,o===null){s++,E();return}for(;o&&s<r;)s++,E()}}function x(){return s===0&&f.length()===0}function S(P,N){var C=n.get();C.context=e,C.release=E,C.value=P,C.callback=N||_e,C.errorHandler=a,s>=r||f.paused?i?(i.next=C,i=C):(o=C,i=C,f.saturated()):(s++,t.call(e,C.value,C.worked))}function b(P,N){var C=n.get();C.context=e,C.release=E,C.value=P,C.callback=N||_e,C.errorHandler=a,s>=r||f.paused?o?(C.next=o,o=C):(o=C,i=C,f.saturated()):(s++,t.call(e,C.value,C.worked))}function E(P){P&&n.release(P);var N=o;N&&s<=r?f.paused?s--:(i===o&&(i=null),o=N.next,N.next=null,t.call(e,N.value,N.worked),i===null&&f.empty()):--s===0&&f.drain()}function O(){o=null,i=null,f.drain=_e}function M(){o=null,i=null,f.drain(),f.drain=_e}function V(P){a=P}}function _e(){}function Am(){this.value=null,this.callback=_e,this.next=null,this.release=_e,this.context=null,this.errorHandler=null;var e=this;this.worked=function(r,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=_e,e.errorHandler&&i(r,s),o.call(e.context,r,n),e.release(e)}}function Pm(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(c,d){t.call(this,c).then(function(p){d(null,p)},d)}var o=za(e,n,r),i=o.push,s=o.unshift;return o.push=a,o.unshift=f,o.drained=u,o;function a(c){var d=new Promise(function(p,y){i(c,function(x,S){if(x){y(x);return}p(S)})});return d.catch(_e),d}function f(c){var d=new Promise(function(p,y){s(c,function(x,S){if(x){y(x);return}p(S)})});return d.catch(_e),d}function u(){if(o.idle())return new Promise(function(p){p()});var c=o.drain,d=new Promise(function(p){o.drain=function(){c(),p()}});return d}}Gn.exports=za;Gn.exports.promise=Pm});var _r=R(Ae=>{"use strict";l();Object.defineProperty(Ae,"__esModule",{value:!0});Ae.joinPathSegments=Ae.replacePathSegmentSeparator=Ae.isAppliedFilter=Ae.isFatalError=void 0;function Om(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}Ae.isFatalError=Om;function Tm(e,t){return e===null||e(t)}Ae.isAppliedFilter=Tm;function $m(e,t){return e.split(/[/\\]/).join(t)}Ae.replacePathSegmentSeparator=$m;function Im(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}Ae.joinPathSegments=Im});var Yn=R(zn=>{"use strict";l();Object.defineProperty(zn,"__esModule",{value:!0});var Mm=_r(),Kn=class{constructor(t,r){this._root=t,this._settings=r,this._root=Mm.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};zn.default=Kn});var Jn=R(Qn=>{"use strict";l();Object.defineProperty(Qn,"__esModule",{value:!0});var Nm=B("events"),Lm=xr(),Dm=Ya(),Sr=_r(),Fm=Yn(),Xn=class extends Fm.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=Lm.scandir,this._emitter=new Nm.EventEmitter,this._queue=Dm(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,r){let n={directory:t,base:r};this._queue.push(n,o=>{o!==null&&this._handleError(o)})}_worker(t,r){this._scandir(t.directory,this._settings.fsScandirSettings,(n,o)=>{if(n!==null){r(n,void 0);return}for(let i of o)this._handleEntry(i,t.base);r(null,void 0)})}_handleError(t){this._isDestroyed||!Sr.isFatalError(this._settings,t)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,r){if(this._isDestroyed||this._isFatalError)return;let n=t.path;r!==void 0&&(t.path=Sr.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),Sr.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&Sr.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};Qn.default=Xn});var Xa=R(eo=>{"use strict";l();Object.defineProperty(eo,"__esModule",{value:!0});var Vm=Jn(),Zn=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new Vm.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{Hm(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{jm(t,this._storage)}),this._reader.read()}};eo.default=Zn;function Hm(e,t){e(t)}function jm(e,t){e(null,t)}});var Qa=R(ro=>{"use strict";l();Object.defineProperty(ro,"__esModule",{value:!0});var qm=B("stream"),Bm=Jn(),to=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new Bm.default(this._root,this._settings),this._stream=new qm.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(t=>{this._stream.emit("error",t)}),this._reader.onEntry(t=>{this._stream.push(t)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};ro.default=to});var Ja=R(oo=>{"use strict";l();Object.defineProperty(oo,"__esModule",{value:!0});var Um=xr(),br=_r(),Wm=Yn(),no=class extends Wm.default{constructor(){super(...arguments),this._scandir=Um.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,r){this._queue.add({directory:t,base:r})}_handleQueue(){for(let t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,r){try{let n=this._scandir(t,this._settings.fsScandirSettings);for(let o of n)this._handleEntry(o,r)}catch(n){this._handleError(n)}}_handleError(t){if(br.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=br.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),br.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&br.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};oo.default=no});var Za=R(so=>{"use strict";l();Object.defineProperty(so,"__esModule",{value:!0});var Gm=Ja(),io=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new Gm.default(this._root,this._settings)}read(){return this._reader.read()}};so.default=io});var el=R(lo=>{"use strict";l();Object.defineProperty(lo,"__esModule",{value:!0});var Km=B("path"),zm=xr(),ao=class{constructor(t={}){this._options=t,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Km.sep),this.fsScandirSettings=new zm.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};lo.default=ao});var wr=R(Pe=>{"use strict";l();Object.defineProperty(Pe,"__esModule",{value:!0});Pe.Settings=Pe.walkStream=Pe.walkSync=Pe.walk=void 0;var tl=Xa(),Ym=Qa(),Xm=Za(),co=el();Pe.Settings=co.default;function Qm(e,t,r){if(typeof t=="function"){new tl.default(e,Rr()).read(t);return}new tl.default(e,Rr(t)).read(r)}Pe.walk=Qm;function Jm(e,t){let r=Rr(t);return new Xm.default(e,r).read()}Pe.walkSync=Jm;function Zm(e,t){let r=Rr(t);return new Ym.default(e,r).read()}Pe.walkStream=Zm;function Rr(e={}){return e instanceof co.default?e:new co.default(e)}});var Cr=R(fo=>{"use strict";l();Object.defineProperty(fo,"__esModule",{value:!0});var eg=B("path"),tg=rt(),rl=Le(),uo=class{constructor(t){this._settings=t,this._fsStatSettings=new tg.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return eg.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:rl.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!rl.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};fo.default=uo});var go=R(mo=>{"use strict";l();Object.defineProperty(mo,"__esModule",{value:!0});var rg=B("stream"),ng=rt(),og=wr(),ig=Cr(),po=class extends ig.default{constructor(){super(...arguments),this._walkStream=og.walkStream,this._stat=ng.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),o=new rg.PassThrough({objectMode:!0});o._write=(i,s,a)=>this._getEntry(n[i],t[i],r).then(f=>{f!==null&&r.entryFilter(f)&&o.push(f),i===n.length-1&&o.end(),a()}).catch(a);for(let i=0;i<n.length;i++)o.write(i);return o}_getEntry(t,r,n){return this._getStat(t).then(o=>this._makeEntry(o,r)).catch(o=>{if(n.errorFilter(o))return null;throw o})}_getStat(t){return new Promise((r,n)=>{this._stat(t,this._fsStatSettings,(o,i)=>o===null?r(i):n(o))})}};mo.default=po});var nl=R(yo=>{"use strict";l();Object.defineProperty(yo,"__esModule",{value:!0});var sg=wr(),ag=Cr(),lg=go(),ho=class extends ag.default{constructor(){super(...arguments),this._walkAsync=sg.walk,this._readerStream=new lg.default(this._settings)}dynamic(t,r){return new Promise((n,o)=>{this._walkAsync(t,r,(i,s)=>{i===null?n(s):o(i)})})}async static(t,r){let n=[],o=this._readerStream.static(t,r);return new Promise((i,s)=>{o.once("error",s),o.on("data",a=>n.push(a)),o.once("end",()=>i(n))})}};yo.default=ho});var ol=R(xo=>{"use strict";l();Object.defineProperty(xo,"__esModule",{value:!0});var Mt=Le(),vo=class{constructor(t,r,n){this._patterns=t,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let t of this._patterns){let r=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:t,segments:r,sections:n})}}_getPatternSegments(t){return Mt.pattern.getPatternParts(t,this._micromatchOptions).map(n=>Mt.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Mt.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return Mt.array.splitWhen(t,r=>r.dynamic&&Mt.pattern.hasGlobStar(r.pattern))}};xo.default=vo});var il=R(So=>{"use strict";l();Object.defineProperty(So,"__esModule",{value:!0});var cg=ol(),_o=class extends cg.default{match(t){let r=t.split("/"),n=r.length,o=this._storage.filter(i=>!i.complete||i.segments.length>n);for(let i of o){let s=i.sections[0];if(!i.complete&&n>s.length||r.every((f,u)=>{let c=i.segments[u];return!!(c.dynamic&&c.patternRe.test(f)||!c.dynamic&&c.pattern===f)}))return!0}return!1}};So.default=_o});var sl=R(Ro=>{"use strict";l();Object.defineProperty(Ro,"__esModule",{value:!0});var Er=Le(),ug=il(),bo=class{constructor(t,r){this._settings=t,this._micromatchOptions=r}getFilter(t,r,n){let o=this._getMatcher(r),i=this._getNegativePatternsRe(n);return s=>this._filter(t,s,o,i)}_getMatcher(t){return new ug.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(Er.pattern.isAffectDepthOfReadingPattern);return Er.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let i=Er.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(i,n)?!1:this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(t,r){return this._settings.deep===1/0?!1:this._getEntryLevel(t,r)>=this._settings.deep}_getEntryLevel(t,r){let n=r.split("/").length;if(t==="")return n;let o=t.split("/").length;return n-o}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,r){return!this._settings.baseNameMatch&&!r.match(t)}_isSkippedByNegativePatterns(t,r){return!Er.pattern.matchAny(t,r)}};Ro.default=bo});var al=R(Co=>{"use strict";l();Object.defineProperty(Co,"__esModule",{value:!0});var nt=Le(),wo=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let n=nt.pattern.convertPatternsToRe(t,this._micromatchOptions),o=nt.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return i=>this._filter(i,n,o)}_filter(t,r,n){let o=nt.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(o)||this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)||this._isSkippedByAbsoluteNegativePatterns(o,n))return!1;let i=t.dirent.isDirectory(),s=this._isMatchToPatterns(o,r,i)&&!this._isMatchToPatterns(o,n,i);return this._settings.unique&&s&&this._createIndexRecord(o),s}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,void 0)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,r){if(!this._settings.absolute)return!1;let n=nt.path.makeAbsolute(this._settings.cwd,t);return nt.pattern.matchAny(n,r)}_isMatchToPatterns(t,r,n){let o=nt.pattern.matchAny(t,r);return!o&&n?nt.pattern.matchAny(t+"/",r):o}};Co.default=wo});var ll=R(ko=>{"use strict";l();Object.defineProperty(ko,"__esModule",{value:!0});var fg=Le(),Eo=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return fg.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};ko.default=Eo});var ul=R(Po=>{"use strict";l();Object.defineProperty(Po,"__esModule",{value:!0});var cl=Le(),Ao=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=cl.path.makeAbsolute(this._settings.cwd,r),r=cl.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};Po.default=Ao});var kr=R(To=>{"use strict";l();Object.defineProperty(To,"__esModule",{value:!0});var pg=B("path"),dg=sl(),mg=al(),gg=ll(),hg=ul(),Oo=class{constructor(t){this._settings=t,this.errorFilter=new gg.default(this._settings),this.entryFilter=new mg.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new dg.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new hg.default(this._settings)}_getRootDirectory(t){return pg.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){let r=t.base==="."?"":t.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};To.default=Oo});var fl=R(Io=>{"use strict";l();Object.defineProperty(Io,"__esModule",{value:!0});var yg=nl(),vg=kr(),$o=class extends vg.default{constructor(){super(...arguments),this._reader=new yg.default(this._settings)}async read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return(await this.api(r,t,n)).map(i=>n.transform(i))}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};Io.default=$o});var pl=R(No=>{"use strict";l();Object.defineProperty(No,"__esModule",{value:!0});var xg=B("stream"),_g=go(),Sg=kr(),Mo=class extends Sg.default{constructor(){super(...arguments),this._reader=new _g.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new xg.Readable({objectMode:!0,read:()=>{}});return o.once("error",s=>i.emit("error",s)).on("data",s=>i.emit("data",n.transform(s))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};No.default=Mo});var dl=R(Do=>{"use strict";l();Object.defineProperty(Do,"__esModule",{value:!0});var bg=rt(),Rg=wr(),wg=Cr(),Lo=class extends wg.default{constructor(){super(...arguments),this._walkSync=Rg.walkSync,this._statSync=bg.statSync}dynamic(t,r){return this._walkSync(t,r)}static(t,r){let n=[];for(let o of t){let i=this._getFullEntryPath(o),s=this._getEntry(i,o,r);s===null||!r.entryFilter(s)||n.push(s)}return n}_getEntry(t,r,n){try{let o=this._getStat(t);return this._makeEntry(o,r)}catch(o){if(n.errorFilter(o))return null;throw o}}_getStat(t){return this._statSync(t,this._fsStatSettings)}};Do.default=Lo});var ml=R(Vo=>{"use strict";l();Object.defineProperty(Vo,"__esModule",{value:!0});var Cg=dl(),Eg=kr(),Fo=class extends Eg.default{constructor(){super(...arguments),this._reader=new Cg.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return this.api(r,t,n).map(n.transform)}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};Vo.default=Fo});var gl=R(vt=>{"use strict";l();Object.defineProperty(vt,"__esModule",{value:!0});vt.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var yt=B("fs"),kg=B("os"),Ag=Math.max(kg.cpus().length,1);vt.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:yt.lstat,lstatSync:yt.lstatSync,stat:yt.stat,statSync:yt.statSync,readdir:yt.readdir,readdirSync:yt.readdirSync};var Ho=class{constructor(t={}){this._options=t,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,Ag),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(t,r){return t===void 0?r:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},vt.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};vt.default=Ho});var Ar=R((zS,yl)=>{"use strict";l();var hl=ya(),Pg=fl(),Og=pl(),Tg=ml(),jo=gl(),Se=Le();async function qo(e,t){Ce(e);let r=Bo(e,Pg.default,t),n=await Promise.all(r);return Se.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(u,c){Ce(u);let d=Bo(u,Tg.default,c);return Se.array.flatten(d)}e.sync=t;function r(u,c){Ce(u);let d=Bo(u,Og.default,c);return Se.stream.merge(d)}e.stream=r;function n(u,c){Ce(u);let d=[].concat(u),p=new jo.default(c);return hl.generate(d,p)}e.generateTasks=n;function o(u,c){Ce(u);let d=new jo.default(c);return Se.pattern.isDynamicPattern(u,d)}e.isDynamicPattern=o;function i(u){return Ce(u),Se.path.escape(u)}e.escapePath=i;function s(u){return Ce(u),Se.path.convertPathToPattern(u)}e.convertPathToPattern=s;let a;(function(u){function c(p){return Ce(p),Se.path.escapePosixPath(p)}u.escapePath=c;function d(p){return Ce(p),Se.path.convertPosixPathToPattern(p)}u.convertPathToPattern=d})(a=e.posix||(e.posix={}));let f;(function(u){function c(p){return Ce(p),Se.path.escapeWindowsPath(p)}u.escapePath=c;function d(p){return Ce(p),Se.path.convertWindowsPathToPattern(p)}u.convertPathToPattern=d})(f=e.win32||(e.win32={}))})(qo||(qo={}));function Bo(e,t,r){let n=[].concat(e),o=new jo.default(r),i=hl.generate(n,o),s=new t(o);return i.map(s.read,s)}function Ce(e){if(![].concat(e).every(n=>Se.string.isString(n)&&!Se.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}yl.exports=qo});var bl=R((ZS,Sl)=>{"use strict";l();var{hasOwnProperty:Uo}=Object.prototype,Wo=(e,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;let r=t.platform==="win32"?`\r
|
|
4
|
-
`:`
|
|
5
|
-
`,n=t.whitespace?" = ":"=",o=[],i=t.sort?Object.keys(e).sort():Object.keys(e),s=0;t.align&&(s=De(i.filter(u=>e[u]===null||Array.isArray(e[u])||typeof e[u]!="object").map(u=>Array.isArray(e[u])?`${u}[]`:u).concat([""]).reduce((u,c)=>De(u).length>=De(c).length?u:c)).length);let a="",f=t.bracketedArray?"[]":"";for(let u of i){let c=e[u];if(c&&Array.isArray(c))for(let d of c)a+=De(`${u}${f}`).padEnd(s," ")+n+De(d)+r;else c&&typeof c=="object"?o.push(u):a+=De(u).padEnd(s," ")+n+De(c)+r}t.section&&a.length&&(a="["+De(t.section)+"]"+(t.newline?r+r:r)+a);for(let u of o){let c=xl(u,".").join("\\."),d=(t.section?t.section+".":"")+c,p=Wo(e[u],{...t,section:d});a.length&&p.length&&(a+=r),a+=p}return a};function xl(e,t){var r=0,n=0,o=0,i=[];do if(o=e.indexOf(t,r),o!==-1){if(r=o+t.length,o>0&&e[o-1]==="\\")continue;i.push(e.slice(n,o)),n=o+t.length}while(o!==-1);return i.push(e.slice(n)),i}var vl=(e,t={})=>{t.bracketedArray=t.bracketedArray!==!1;let r=Object.create(null),n=r,o=null,i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,s=e.split(/[\r\n]+/g),a={};for(let u of s){if(!u||u.match(/^\s*[;#]/)||u.match(/^\s*$/))continue;let c=u.match(i);if(!c)continue;if(c[1]!==void 0){if(o=Pr(c[1]),o==="__proto__"){n=Object.create(null);continue}n=r[o]=r[o]||Object.create(null);continue}let d=Pr(c[2]),p;t.bracketedArray?p=d.length>2&&d.slice(-2)==="[]":(a[d]=(a?.[d]||0)+1,p=a[d]>1);let y=p?d.slice(0,-2):d;if(y==="__proto__")continue;let x=c[3]?Pr(c[4]):!0,S=x==="true"||x==="false"||x==="null"?JSON.parse(x):x;p&&(Uo.call(n,y)?Array.isArray(n[y])||(n[y]=[n[y]]):n[y]=[]),Array.isArray(n[y])?n[y].push(S):n[y]=S}let f=[];for(let u of Object.keys(r)){if(!Uo.call(r,u)||typeof r[u]!="object"||Array.isArray(r[u]))continue;let c=xl(u,".");n=r;let d=c.pop(),p=d.replace(/\\\./g,".");for(let y of c)y!=="__proto__"&&((!Uo.call(n,y)||typeof n[y]!="object")&&(n[y]=Object.create(null)),n=n[y]);n===r&&p===d||(n[p]=r[u],f.push(u))}for(let u of f)delete r[u];return r},_l=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),De=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&_l(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),Pr=(e,t)=>{if(e=(e||"").trim(),_l(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let r=!1,n="";for(let o=0,i=e.length;o<i;o++){let s=e.charAt(o);if(r)"\\;#".indexOf(s)!==-1?n+=s:n+="\\"+s,r=!1;else{if(";#".indexOf(s)!==-1)break;s==="\\"?r=!0:n+=s}}return r&&(n+="\\"),n.trim()}return e};Sl.exports={parse:vl,decode:vl,stringify:Wo,encode:Wo,safe:De,unsafe:Pr}});var zo=R((ab,kl)=>{"use strict";l();var Fg=B("os");kl.exports=Fg.homedir||function(){var t=process.env.HOME,r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||t||null:process.platform==="darwin"?t||(r?"/Users/"+r:null):process.platform==="linux"?t||(process.getuid()===0?"/root":r?"/home/"+r:null):t||null}});var Yo=R((cb,Al)=>{"use strict";l();Al.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(r,n){return n};var t=new Error().stack;return Error.prepareStackTrace=e,t[2].getFileName()}});var Pl=R((fb,Ft)=>{"use strict";l();var Vg=process.platform==="win32",Hg=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,Xo={};function jg(e){return Hg.exec(e).slice(1)}Xo.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=jg(e);if(!t||t.length!==5)throw new TypeError("Invalid path '"+e+"'");return{root:t[1],dir:t[0]===t[1]?t[0]:t[0].slice(0,-1),base:t[2],ext:t[4],name:t[3]}};var qg=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Qo={};function Bg(e){return qg.exec(e).slice(1)}Qo.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Bg(e);if(!t||t.length!==5)throw new TypeError("Invalid path '"+e+"'");return{root:t[1],dir:t[0].slice(0,-1),base:t[2],ext:t[4],name:t[3]}};Vg?Ft.exports=Xo.parse:Ft.exports=Qo.parse;Ft.exports.posix=Qo.parse;Ft.exports.win32=Xo.parse});var Jo=R((db,Il)=>{"use strict";l();var $l=B("path"),Ol=$l.parse||Pl(),Tl=function(t,r){var n="/";/^([A-Za-z]:)/.test(t)?n="":/^\\\\/.test(t)&&(n="\\\\");for(var o=[t],i=Ol(t);i.dir!==o[o.length-1];)o.push(i.dir),i=Ol(i.dir);return o.reduce(function(s,a){return s.concat(r.map(function(f){return $l.resolve(n,a,f)}))},[])};Il.exports=function(t,r,n){var o=r&&r.moduleDirectory?[].concat(r.moduleDirectory):["node_modules"];if(r&&typeof r.paths=="function")return r.paths(n,t,function(){return Tl(t,o)},r);var i=Tl(t,o);return r&&r.paths?i.concat(r.paths):i}});var Zo=R((gb,Ml)=>{"use strict";l();Ml.exports=function(e,t){return t||{}}});var Dl=R((yb,Ll)=>{"use strict";l();var Ug="Function.prototype.bind called on incompatible ",Wg=Object.prototype.toString,Gg=Math.max,Kg="[object Function]",Nl=function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},zg=function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},Yg=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};Ll.exports=function(t){var r=this;if(typeof r!="function"||Wg.apply(r)!==Kg)throw new TypeError(Ug+r);for(var n=zg(arguments,1),o,i=function(){if(this instanceof o){var c=r.apply(this,Nl(n,arguments));return Object(c)===c?c:this}return r.apply(t,Nl(n,arguments))},s=Gg(0,r.length-n.length),a=[],f=0;f<s;f++)a[f]="$"+f;if(o=Function("binder","return function ("+Yg(a,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var u=function(){};u.prototype=r.prototype,o.prototype=new u,u.prototype=null}return o}});var Vl=R((xb,Fl)=>{"use strict";l();var Xg=Dl();Fl.exports=Function.prototype.bind||Xg});var jl=R((Sb,Hl)=>{"use strict";l();var Qg=Function.prototype.call,Jg=Object.prototype.hasOwnProperty,Zg=Vl();Hl.exports=Zg.call(Qg,Jg)});var ql=R((Rb,eh)=>{eh.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var Vt=R((wb,Wl)=>{"use strict";l();var th=jl();function rh(e,t){for(var r=e.split("."),n=t.split(" "),o=n.length>1?n[0]:"=",i=(n.length>1?n[1]:n[0]).split("."),s=0;s<3;++s){var a=parseInt(r[s]||0,10),f=parseInt(i[s]||0,10);if(a!==f)return o==="<"?a<f:o===">="?a>=f:!1}return o===">="}function Bl(e,t){var r=t.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!rh(e,r[n]))return!1;return!0}function nh(e,t){if(typeof t=="boolean")return t;var r=typeof e>"u"?process.versions&&process.versions.node:e;if(typeof r!="string")throw new TypeError(typeof e>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(t&&typeof t=="object"){for(var n=0;n<t.length;++n)if(Bl(r,t[n]))return!0;return!1}return Bl(r,t)}var Ul=ql();Wl.exports=function(t,r){return th(Ul,t)&&nh(r,Ul[t])}});var zl=R((Eb,Kl)=>{"use strict";l();var ot=B("fs"),oh=zo(),re=B("path"),ih=Yo(),sh=Jo(),ah=Zo(),lh=Vt(),ch=process.platform!=="win32"&&ot.realpath&&typeof ot.realpath.native=="function"?ot.realpath.native:ot.realpath,Gl=oh(),uh=function(){return[re.join(Gl,".node_modules"),re.join(Gl,".node_libraries")]},fh=function(t,r){ot.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},ph=function(t,r){ot.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},dh=function(t,r){ch(t,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?t:o)})},Ht=function(t,r,n,o){n&&n.preserveSymlinks===!1?t(r,o):o(null,r)},mh=function(t,r,n){t(r,function(o,i){if(o)n(o);else try{var s=JSON.parse(i);n(null,s)}catch{n(null)}})},gh=function(t,r,n){for(var o=sh(r,n,t),i=0;i<o.length;i++)o[i]=re.join(o[i],t);return o};Kl.exports=function(t,r,n){var o=n,i=r;if(typeof r=="function"&&(o=i,i={}),typeof t!="string"){var s=new TypeError("Path must be a string.");return process.nextTick(function(){o(s)})}i=ah(t,i);var a=i.isFile||fh,f=i.isDirectory||ph,u=i.readFile||ot.readFile,c=i.realpath||dh,d=i.readPackage||mh;if(i.readFile&&i.readPackage){var p=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(p)})}var y=i.packageIterator,x=i.extensions||[".js"],S=i.includeCoreModules!==!1,b=i.basedir||re.dirname(ih()),E=i.filename||b;i.paths=i.paths||uh();var O=re.resolve(b);Ht(c,O,i,function(h,T){h?o(h):V(T)});var M;function V(h){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t))M=re.resolve(h,t),(t==="."||t===".."||t.slice(-1)==="/")&&(M+="/"),/\/$/.test(t)&&M===h?A(M,i.package,P):N(M,i.package,P);else{if(S&&lh(t))return o(null,t);G(t,h,function(T,L,H){if(T)o(T);else{if(L)return Ht(c,L,i,function(_,q){_?o(_):o(null,q,H)});var v=new Error("Cannot find module '"+t+"' from '"+E+"'");v.code="MODULE_NOT_FOUND",o(v)}})}}function P(h,T,L){h?o(h):T?o(null,T,L):A(M,function(H,v,_){if(H)o(H);else if(v)Ht(c,v,i,function(I,K){I?o(I):o(null,K,_)});else{var q=new Error("Cannot find module '"+t+"' from '"+E+"'");q.code="MODULE_NOT_FOUND",o(q)}})}function N(h,T,L){var H=T,v=L;typeof H=="function"&&(v=H,H=void 0);var _=[""].concat(x);q(_,h,H);function q(I,K,ee){if(I.length===0)return v(null,void 0,ee);var J=K+I[0],pe=ee;pe?ae(null,pe):C(re.dirname(J),ae);function ae(le,F,ge){if(pe=F,le)return v(le);if(ge&&pe&&i.pathFilter){var ut=re.relative(ge,J),k=ut.slice(0,ut.length-I[0].length),W=i.pathFilter(pe,K,k);if(W)return q([""].concat(x.slice()),re.resolve(ge,W),pe)}a(J,Me)}function Me(le,F){if(le)return v(le);if(F)return v(null,J,pe);q(I.slice(1),K,pe)}}}function C(h,T){if(h===""||h==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(h)||/[/\\]node_modules[/\\]*$/.test(h))return T(null);Ht(c,h,i,function(L,H){if(L)return C(re.dirname(h),T);var v=re.join(H,"package.json");a(v,function(_,q){if(!q)return C(re.dirname(h),T);d(u,v,function(I,K){I&&T(I);var ee=K;ee&&i.packageFilter&&(ee=i.packageFilter(ee,v)),T(null,ee,h)})})})}function A(h,T,L){var H=L,v=T;typeof v=="function"&&(H=v,v=i.package),Ht(c,h,i,function(_,q){if(_)return H(_);var I=re.join(q,"package.json");a(I,function(K,ee){if(K)return H(K);if(!ee)return N(re.join(h,"index"),v,H);d(u,I,function(J,pe){if(J)return H(J);var ae=pe;if(ae&&i.packageFilter&&(ae=i.packageFilter(ae,I)),ae&&ae.main){if(typeof ae.main!="string"){var Me=new TypeError("package \u201C"+ae.name+"\u201D `main` must be a string");return Me.code="INVALID_PACKAGE_MAIN",H(Me)}(ae.main==="."||ae.main==="./")&&(ae.main="index"),N(re.resolve(h,ae.main),ae,function(le,F,ge){if(le)return H(le);if(F)return H(null,F,ge);if(!ge)return N(re.join(h,"index"),ge,H);var ut=re.resolve(h,ge.main);A(ut,ge,function(k,W,w){if(k)return H(k);if(W)return H(null,W,w);N(re.join(h,"index"),w,H)})});return}N(re.join(h,"/index"),ae,H)})})})}function $(h,T){if(T.length===0)return h(null,void 0);var L=T[0];f(re.dirname(L),H);function H(q,I){if(q)return h(q);if(!I)return $(h,T.slice(1));N(L,i.package,v)}function v(q,I,K){if(q)return h(q);if(I)return h(null,I,K);A(L,i.package,_)}function _(q,I,K){if(q)return h(q);if(I)return h(null,I,K);$(h,T.slice(1))}}function G(h,T,L){var H=function(){return gh(h,T,i)};$(L,y?y(h,T,H,i):H())}}});var Yl=R((Ab,hh)=>{hh.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var Zl=R((Pb,Jl)=>{"use strict";l();var yh=Vt(),Xl=Yl(),Ql={};for(Tr in Xl)Object.prototype.hasOwnProperty.call(Xl,Tr)&&(Ql[Tr]=yh(Tr));var Tr;Jl.exports=Ql});var tc=R((Tb,ec)=>{"use strict";l();var vh=Vt();ec.exports=function(t){return vh(t)}});var oc=R((Ib,nc)=>{"use strict";l();var xh=Vt(),it=B("fs"),fe=B("path"),_h=zo(),Sh=Yo(),bh=Jo(),Rh=Zo(),wh=process.platform!=="win32"&&it.realpathSync&&typeof it.realpathSync.native=="function"?it.realpathSync.native:it.realpathSync,rc=_h(),Ch=function(){return[fe.join(rc,".node_modules"),fe.join(rc,".node_libraries")]},Eh=function(t){try{var r=it.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},kh=function(t){try{var r=it.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},Ah=function(t){try{return wh(t)}catch(r){if(r.code!=="ENOENT")throw r}return t},jt=function(t,r,n){return n&&n.preserveSymlinks===!1?t(r):r},Ph=function(t,r){var n=t(r);try{var o=JSON.parse(n);return o}catch{}},Oh=function(t,r,n){for(var o=bh(r,n,t),i=0;i<o.length;i++)o[i]=fe.join(o[i],t);return o};nc.exports=function(t,r){if(typeof t!="string")throw new TypeError("Path must be a string.");var n=Rh(t,r),o=n.isFile||Eh,i=n.readFileSync||it.readFileSync,s=n.isDirectory||kh,a=n.realpathSync||Ah,f=n.readPackageSync||Ph;if(n.readFileSync&&n.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var u=n.packageIterator,c=n.extensions||[".js"],d=n.includeCoreModules!==!1,p=n.basedir||fe.dirname(Sh()),y=n.filename||p;n.paths=n.paths||Ch();var x=jt(a,fe.resolve(p),n);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)){var S=fe.resolve(x,t);(t==="."||t===".."||t.slice(-1)==="/")&&(S+="/");var b=M(S)||P(S);if(b)return jt(a,b,n)}else{if(d&&xh(t))return t;var E=N(t,x);if(E)return jt(a,E,n)}var O=new Error("Cannot find module '"+t+"' from '"+y+"'");throw O.code="MODULE_NOT_FOUND",O;function M(C){var A=V(fe.dirname(C));if(A&&A.dir&&A.pkg&&n.pathFilter){var $=fe.relative(A.dir,C),G=n.pathFilter(A.pkg,C,$);G&&(C=fe.resolve(A.dir,G))}if(o(C))return C;for(var h=0;h<c.length;h++){var T=C+c[h];if(o(T))return T}}function V(C){if(!(C===""||C==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(C))&&!/[/\\]node_modules[/\\]*$/.test(C)){var A=fe.join(jt(a,C,n),"package.json");if(!o(A))return V(fe.dirname(C));var $=f(i,A);return $&&n.packageFilter&&($=n.packageFilter($,C)),{pkg:$,dir:C}}}function P(C){var A=fe.join(jt(a,C,n),"/package.json");if(o(A)){try{var $=f(i,A)}catch{}if($&&n.packageFilter&&($=n.packageFilter($,C)),$&&$.main){if(typeof $.main!="string"){var G=new TypeError("package \u201C"+$.name+"\u201D `main` must be a string");throw G.code="INVALID_PACKAGE_MAIN",G}($.main==="."||$.main==="./")&&($.main="index");try{var h=M(fe.resolve(C,$.main));if(h)return h;var T=P(fe.resolve(C,$.main));if(T)return T}catch{}}}return M(fe.join(C,"/index"))}function N(C,A){for(var $=function(){return Oh(C,A,n)},G=u?u(C,A,$,n):$(),h=0;h<G.length;h++){var T=G[h];if(s(fe.dirname(T))){var L=M(T);if(L)return L;var H=P(T);if(H)return H}}}}});var sc=R((Nb,ic)=>{"use strict";l();var $r=zl();$r.core=Zl();$r.isCore=tc();$r.sync=oc();ic.exports=$r});l();import i_ from"node:process";import s_ from"yargs";import{hideBin as a_}from"yargs/helpers";var ft="0.18.6";l();var Re=oe(me(),1),Bc=oe(Ar(),1);import{dirname as py,join as dy,resolve as qr}from"node:path";import{readFile as my}from"node:fs/promises";import Wt from"fs-extra";import gy from"gray-matter";import hy from"markdown-it";import{Feed as yy}from"feed";import at from"consola";l();var Nc=oe(Ar(),1),Ge=oe(me(),1);import{dirname as sy}from"node:path";import $c from"node:process";import{resolve as Ut}from"pathe";import Mc from"fs-extra";import ay from"debug";import{ensureSuffix as Ic,uniq as ly}from"@antfu/utils";import Lc from"defu";import Dc from"consola";l();l();import{spawn as $g}from"cross-spawn";function Nt(e,t="updated"){return new Promise((r,n)=>{let o=["log"];t==="updated"&&o.push("-1"),o.push('--pretty="%ci"',e),t==="created"&&o.push("|","tail","-1");let i=$g("git",o),s="";i.stdout.on("data",a=>s+=String(a)),i.on("close",()=>{r(+new Date(s))}),i.on("error",()=>{r(0)})})}l();import{join as ac}from"node:path";import Th from"is-installed-globally";l();var wl=oe(bl(),1);import ie from"node:process";import se from"node:path";import Go from"node:os";import Or from"node:fs";var Dt=ie.platform==="win32",Rl=e=>{try{return wl.default.parse(Or.readFileSync(e,"utf8")).prefix}catch{}},Ig=()=>Object.keys(ie.env).reduce((e,t)=>/^npm_config_prefix$/i.test(t)?ie.env[t]:e,void 0),Mg=()=>{if(Dt&&ie.env.APPDATA)return se.join(ie.env.APPDATA,"/npm/etc/npmrc");if(ie.execPath.includes("/Cellar/node")){let e=ie.execPath.slice(0,ie.execPath.indexOf("/Cellar/node"));return se.join(e,"/lib/node_modules/npm/npmrc")}if(ie.execPath.endsWith("/bin/node")){let e=se.dirname(se.dirname(ie.execPath));return se.join(e,"/etc/npmrc")}},Ng=()=>{if(Dt){let{APPDATA:e}=ie.env;return e?se.join(e,"npm"):se.dirname(ie.execPath)}return se.dirname(se.dirname(ie.execPath))},Lg=()=>{let e=Ig();if(e)return e;let t=Rl(se.join(Go.homedir(),".npmrc"));if(t)return t;if(ie.env.PREFIX)return ie.env.PREFIX;let r=Rl(Mg());return r||Ng()},Lt=se.resolve(Lg()),Cl=()=>{if(Dt&&ie.env.LOCALAPPDATA){let e=se.join(ie.env.LOCALAPPDATA,"Yarn");if(Or.existsSync(e))return e}return!1},Dg=()=>{if(ie.env.PREFIX)return ie.env.PREFIX;let e=Cl();if(e)return e;let t=se.join(Go.homedir(),".config/yarn");if(Or.existsSync(t))return t;let r=se.join(Go.homedir(),".yarn-config");return Or.existsSync(r)?r:Lt},Oe={};Oe.npm={};Oe.npm.prefix=Lt;Oe.npm.packages=se.join(Lt,Dt?"node_modules":"lib/node_modules");Oe.npm.binaries=Dt?Lt:se.join(Lt,"bin");var El=se.resolve(Dg());Oe.yarn={};Oe.yarn.prefix=El;Oe.yarn.packages=se.join(El,Cl()?"Data/global/node_modules":"global/node_modules");Oe.yarn.binaries=se.join(Oe.yarn.packages,".bin");var Ko=Oe;var cc=oe(sc(),1);import lc from"consola";function Te(e,t=!1,r={preserveSymlinks:!1}){try{return(0,cc.sync)(e,r)}catch(n){lc.log(n)}if(Th){try{return B.resolve(ac(Ko.yarn.packages,e))}catch{}try{return B.resolve(ac(Ko.npm.packages,e))}catch{}}if(t)throw new Error(`Failed to resolve package ${e}`);lc.error(`Failed to resolve package ${e}`)}l();l();var Ir="<!-- more -->",xt=/^https?:/i,uc=/^pathname:\/\//,Ub="/:all(.*)*",fc=new Set(["annotation","math","menclose","mfrac","mglyph","mi","mlabeledtr","mn","mo","mover","mpadded","mphantom","mroot","mrow","mspace","msqrt","mstyle","msub","msubsup","msup","mtable","mtd","mtext","mtr","munder","munderover","semantics"]);function pc(e){return xt.test(e)}function $h(e){return e.replace(/\\/g,"/")}function ei(e,t){return t.startsWith(e)?t:e+t}function Q(e){return`/@fs${ei("/",$h(e))}`}function dc(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}function mc(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}l();l();import Ih from"node:process";import{fileURLToPath as Mh}from"node:url";import Nh from"jiti";import{resolve as Lh}from"pathe";import Dh from"consola";function Fh(e){let{name:t,cwd:r}=e,n=Lh(r,`${t}.config.ts`),o={};try{o=Nh(Mh(import.meta.url),{interopDefault:!0,requireCache:!1,esmResolve:!0})(n)}catch{Dh.debug(`Failed to load config file: ${n}`)}return{config:o,configFile:n}}async function _t(e,t={}){let{config:r,configFile:n}=Fh({name:e,cwd:t.cwd||Ih.cwd()}),o=r;return typeof r=="function"&&(o=await r(t.valaxyOptions||{})),{config:o,configFile:n}}l();var bt=oe(me(),1);import jh from"node:process";import{createDefu as qh}from"defu";import{mergeConfig as Bh}from"vite";import{isFunction as hc}from"@antfu/utils";import Uh from"consola";l();function We(){let e=performance.now();return()=>{let r=performance.now()-e;return r>1e3?`${(r/1e3).toFixed(2)}s`:`${r.toFixed(2)}ms`}}l();var St=oe(me(),1);import{webcrypto as gc}from"node:crypto";import Vh from"consola";var Mr={mode:"auto",url:"/",lang:"en",languages:["en","zh-CN"],timezone:"",title:"Valaxy Blog",description:"A blog generated by Valaxy.",subtitle:"Next Generation Static Blog Framework.",author:{avatar:"https://valaxy.site/valaxy-logo.png",email:"i@valaxy.site",link:"https://valaxy.site",name:"VALAXY Developer",status:{emoji:"\u{1F30C}",message:"The moonlight is beautiful."}},favicon:"/favicon.svg",feed:{name:"",favicon:"/favicon.svg"},social:[],lastUpdated:!0,license:{enabled:!0,language:"",type:"by-nc-sa"},sponsor:{enable:!0,description:"\u8FD9\u662F\u5173\u4E8E\u8D5E\u52A9\u7684\u4E00\u4E9B\u63CF\u8FF0",methods:[]},search:{enable:!1,type:"fuse"},fuse:{dataPath:"valaxy-fuse-list.json",options:{keys:[]}},comment:{enable:!1},frontmatter:{time_warning:180*24*60*60*1e3},cdn:{prefix:"https://unpkg.com/"},mediumZoom:{enable:!1,selector:"",options:{}},vanillaLazyload:{enable:!1,options:{}},statistics:{enable:!1,readTime:{speed:{cn:300,en:100}}},pageSize:7,encrypt:{enable:!1,algorithm:"AES-CBC",salt:gc.getRandomValues(new Uint8Array(16)),iv:gc.getRandomValues(new Uint8Array(16))},redirects:{useVueRouter:!0,rules:[]}};function mR(e){return e}async function Hh(e){return _t("site",{cwd:e})}async function Nr(e){let t=We(),{config:r,configFile:n}=await Hh(e),o=t();return r&&n&&Vh.success(`Resolve ${(0,St.cyan)("siteConfig")} from ${(0,St.dim)(n)} ${(0,St.yellow)(o)}`),{siteConfig:r,siteConfigFile:n}}var yc={siteConfig:Mr,theme:"yun",themeConfig:{pkg:{name:"",version:""}},runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}},modules:{rss:{enable:!0}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}},devtools:!0};function Wh(e){return e}var CR=Wh;async function qt(e,t){return await _t("valaxy",{cwd:e,valaxyOptions:t})}var st=qh((e,t,r)=>{if(hc(e[t])&&hc(r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=Bh(e[t],r),!0});async function vc(e){let t=e.userRoot||jh.cwd(),r=We(),{config:n,configFile:o}=await qt(t),i=r();n&&o&&Uh.success(`Resolve ${(0,bt.cyan)("userValaxyConfig")} from ${(0,bt.dim)(o)} ${(0,bt.yellow)(i)}`);let s=e.theme||n?.theme||"yun";return{config:n,configFile:o,theme:s}}l();import Gh from"node:path";import Kh from"fs-extra";function zh(e){return e}var TR=zh;async function xc(e,t){let r={};for(let n of e){if(!Kh.existsSync(Gh.resolve(n.root,"valaxy.config.ts")))continue;let{config:o,configFile:i}=await qt(n.root,t);o&&(n.configFile=i,r=st(o,r))}return r}l();var Fr=oe(me(),1);import Jh from"defu";l();var Sc=oe(me(),1);import Qh from"consola";l();import _c from"node:process";import Yh from"node:fs";import Xh from"node:path";function Bt(){return _c.env.NODE_ENV==="production"}function ti(e="development"){_c.env.NODE_ENV=e,$e.level=Bt()?2:3}function Rt(){return ti("production")}function Lr(e){let t=Yh.existsSync(Xh.resolve(e,"pages"));return t||$e.error(`No pages directory found in ${e}`),t}var $e=Qh.create({level:Bt()?2:3}),ri=`${(0,Sc.magenta)("valaxy")}:`,wt={success:e=>$e.success(ri,e),info:e=>$e.info(ri,e),ready:e=>$e.ready(ri,e)};async function Dr(e){return _t("theme",{cwd:e})}async function bc(e){let{config:t,configFile:r}=await Dr(e.userRoot);if(t&&r&&$e.info(`Resolve ${(0,Fr.cyan)("themeConfig")} from ${(0,Fr.dim)(r)}`),e?.themeRoot){let{config:n}=await Dr(e.themeRoot);t=Jh(t||{},n)}return{themeConfig:t,themeConfigFile:r}}function Zh(e){return e}var KR=Zh;function XR(e){return e}l();var Ie=oe(me(),1);import Ac from"node:process";import{resolve as ty}from"pathe";import Cc from"fs-extra";import Ec from"defu";import ry from"ora";l();import{dirname as Rc}from"node:path";import{resolve as wc}from"pathe";import ey from"fs-extra";function Vr(e,t){if(!e)return"";if(dc(e))if(t){let r=ey.lstatSync(t).isFile();return wc(r?Rc(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return wc(Rc(Te(`${e}/package.json`)||""))}async function Pc(e,t=Ac.cwd()){let r=ry(`Resolve ${(0,Ie.cyan)("addons")} from ${(0,Ie.dim)(t)}`).start(),n={},o=s=>{s&&(n[s.name]=Ec(n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await kc(s,{cwd:t}));continue}typeof s=="object"&&o(Ec(await kc(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{console.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${(0,Ie.yellow)(s.name)} ${(0,Ie.blue)(`v${s.pkg?.version}`)}${s.global?(0,Ie.cyan)(" (global)"):""} ${(0,Ie.dim)(s.pkg.homepage||s.pkg.repository?.url||s.pkg.repository||"")}`)}),i}async function kc(e,t={}){let r=ny(e,t.cwd||Ac.cwd()),n=ty(r,"./package.json");if(!Cc.existsSync(n)){$e.error(`No addon named ${e} found`);return}let o=await Cc.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}function ny(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return Vr(r,t)}l();function Oc(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return Vr(r,t)}l();import{writeFile as oy}from"node:fs/promises";import{ensureFile as iy}from"fs-extra";function Hr(e){return e==="/"?"/index":e.endsWith("/")?e.slice(0,-1):e}function jr(e){if(!e)return[];let t=[];for(let r of e)if(Array.isArray(r.from))for(let n of r.from)t.push({from:Hr(n),to:Hr(r.to)});else t.push({from:Hr(r.from),to:Hr(r.to)});return t}async function Tc(e,t){await iy(t),await oy(t,`
|
|
6
|
-
<!DOCTYPE html>
|
|
7
|
-
<html lang="en">
|
|
8
|
-
<head>
|
|
9
|
-
<meta charset="UTF-8">
|
|
10
|
-
<meta http-equiv="refresh" content="0; url=${e}">
|
|
11
|
-
<link rel="canonical" href="${e}">
|
|
12
|
-
</head>
|
|
13
|
-
<script>
|
|
14
|
-
window.location.href = '${e}' + window.location.search + window.location.hash
|
|
15
|
-
</script>
|
|
16
|
-
</html>
|
|
17
|
-
`)}var cy=ay("valaxy:options");async function uy(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=Ic("/",o.url||""),o.cdn.prefix=Ic("/",o.cdn.prefix||"");let i=Ut(r,"package.json");try{t.themeConfig.pkg=await Mc.readJson(i,"utf-8")}catch{console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function ni(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await Pc(t.addons||[],e.userRoot),s=await xc(i,e);t=st(t,s);let a=Lc(t,yc);e.config={...a,runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}}},e.addons=i,i.forEach(d=>{e.config.runtimeConfig.addons[d.name]=d});let f=i.map(({root:d})=>d),u=i.map(({name:d})=>d);e.addonRoots=f,e.roots=ly([r,n,...f,o]);let c=e.config.vite?.build?.rollupOptions?.external||[];return e.config.vite.build.rollupOptions.external=c.filter(d=>!u.includes(d)),await uy(e),e}async function be(e={userRoot:$c.cwd()},t="dev"){let r=sy(Te("valaxy/package.json",!0)),n=Ut(r,"client"),o=Ut(e.userRoot||$c.cwd());Dc.start(`Resolve ${(0,Ge.magenta)("valaxy")} config...`);let[i,s,a,f]=await Promise.all([vc(e),Nr(e.userRoot),Dr(e.userRoot),(0,Nc.default)(["**.md"],{cwd:Ut(o,"pages"),ignore:["**/node_modules"]})]),{config:u,configFile:c,theme:d}=i,p=Oc(d,e.userRoot),{siteConfig:y,siteConfigFile:x}=s,{config:S,configFile:b}=a,E=jr(y.redirects?.rules);u=Lc({siteConfig:y},{themeConfig:S},u);let O={mode:t,pkgRoot:r,tempDir:Ut(o,".valaxy"),clientRoot:n,userRoot:o,themeRoot:p,addonRoots:[],roots:[],theme:d,config:{...u,runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}}},configFile:c||"",siteConfigFile:x||"",themeConfigFile:b||"",pages:f.sort(),addons:[],redirects:E,env:{id:"",links:[]}};cy(O);let M=await oi(O),V=st(u,M);return O=await ni(O,V),Mc.ensureDirSync(O.tempDir),O}async function oi(e){let t=We(),{config:r}=await qt(e.themeRoot,e),n=t();return r&&Dc.success(`Resolve ${(0,Ge.cyan)("valaxy.config.ts")} from ${(0,Ge.blue)(`theme(${e.theme})`)} ${(0,Ge.yellow)(n)}`),r}l();import Fc from"fs-extra";async function Vc(e){return await Nt(e,"created")||(await Fc.stat(e)).ctime}async function Hc(e){return await Nt(e,"created")||(await Fc.stat(e)).mtime}l();function Ke(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}l();function jc(e,t){t.forEach(r=>{r.setup?.(e)})}var vy=hy({html:!0,breaks:!0,linkify:!0});async function qc(e){at.info(`${(0,Re.yellow)("RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){at.error("You must set `url` (like `https://example.com`) in `site.config.ts` to generate rss.");return}let n=r.url,o=r.url.slice(0,-1),i={name:r.author?.name,email:r.author?.email,link:r.author?.link};at.info(`RSS Site Url: ${(0,Re.cyan)(n)}`);let s=r.license?.type==="zero"?"1.0":"4.0",a={atom:r.feed?.name?`${r.feed?.name}.atom`:"atom.xml",json:`${r.feed?.name||"feed"}.json`,rss:`${r.feed?.name||"feed"}.xml`},f={title:r.title||"Valaxy Blog",description:r.description,id:n||"valaxy",link:n,copyright:`CC ${r.license?.type?.toUpperCase()} ${s} ${new Date().getFullYear()} \xA9 ${r.author?.name}`,feedLinks:{}};Object.keys(a).forEach(b=>{f.feedLinks[b]=`${n}${a[b]}`});let u=await(0,Bc.default)(`${e.userRoot}/pages/posts/**/*.md`),c=[];for await(let b of u){let E=await my(b,"utf-8"),{data:O,content:M,excerpt:V}=gy(E,{excerpt_separator:Ir});if(O.password)continue;if(O.draft){at.warn(`Ignore draft post: ${(0,Re.dim)(b)}`);continue}if(O.hide)continue;let P=b;O.date||(O.date=await Vc(P)),r.lastUpdated&&(O.updated||(O.updated=await Hc(P)));let N=vy.render(V||M.slice(0,100)).replace('src="/',`src="${o}/`);O.image?.startsWith("/")&&(O.image=o+O.image),c.push({title:"",...O,id:(O.id||"").toString(),date:new Date(O.date),published:new Date(O.updated||O.date),content:N,author:[i],link:o+b.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}c.sort((b,E)=>+new Date(E.published||E.date)-+new Date(b.published||b.date));let d=r.author?.avatar||"/favicon.svg";f.author=i,f.image=pc(d)?r.author?.avatar:`${o}${ei("/",d)}`,f.favicon=`${o}${r.feed?.favicon||r.favicon}`;let p=new yy(f);c.forEach(b=>p.addItem(b)),await Wt.ensureDir(py(`./dist/${a.atom}`));let y=qr(e.userRoot,"./dist"),x=qr(e.userRoot,"public");["rss","atom","json"].forEach(async b=>{let E="",O=`${y}/${a[b]}`;b==="rss"?E=p.rss2():b==="atom"?E=p.atom1():b==="json"&&(E=p.json1()),Wt.writeFileSync(O,E,"utf-8"),at.success(`[${(0,Re.cyan)(b)}] dist: ${(0,Re.dim)(O)}`);let M=qr(x,a[b]),V=dy("public",a[b]);Wt.writeFileSync(M,E,"utf-8"),at.success(`[${(0,Re.cyan)(b)}] public: ${(0,Re.dim)(O)}`);try{let P=qr(e.userRoot,".gitignore"),N=await Wt.readFile(P,"utf-8"),C=V.replace(/\\/g,"/");N.includes(C)||(await Wt.appendFile(P,`
|
|
18
|
-
# valaxy rss
|
|
19
|
-
${C}
|
|
20
|
-
`),at.success(`Add ${(0,Re.dim)(C)} to ${(0,Re.dim)(".gitignore")}`))}catch{}})}var Br={extendCli(e){e.command("rss [root]","generate rss feed",t=>Ke(t).strict().help(),async({root:t})=>{Rt();let r=await be({userRoot:t},"build");await qc(r)})},setup(e){e.hook("build:after",()=>{console.log(),qc(e.options)})}};l();var Uc=oe(Ar(),1),Ye=oe(me(),1);import Ct from"node:path";import ze from"fs-extra";import Et from"consola";import xy from"gray-matter";async function _y(e){Et.start(`Generate List for Fuse Search by (${(0,Ye.cyan)("fuse.js")}) ...`);let t=await(0,Uc.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=ze.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=xy(o,{excerpt_separator:"<!-- more -->"});if(i.draft){Et.warn(`Ignore draft post: ${(0,Ye.dim)(n)}`);continue}if(i.hide||i.password)continue;let f=e.config.siteConfig.fuse.options.keys||[],u={title:i.title||"",tags:(typeof i.tags=="string"?[i.tags]:i.tags)||[],categories:i.categories||[],author:e.config.siteConfig.author.name,excerpt:s||a.slice(0,100),link:encodeURI(n.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,""))};f.includes("content")&&(u.content=a||""),r.push(u)}return r}async function Wc(e){Et.info("Start generate fuse list...");let t=await _y(e);await ze.ensureDir("./dist");let r=Ct.resolve(e.userRoot,"public"),n=Ct.resolve(r,e.config.siteConfig.fuse.dataPath),o=Ct.join("public",e.config.siteConfig.fuse.dataPath);await ze.ensureFile(n),ze.writeJSONSync(n,t),Et.success(`Generate fuse list in ${(0,Ye.dim)(r)}`);let i=Ct.resolve(e.userRoot,"dist"),s=Ct.resolve(i,e.config.siteConfig.fuse.dataPath);await ze.ensureDir(i),ze.writeJSONSync(s,t),Et.success(`Generate fuse list in ${(0,Ye.dim)(i)}`);try{let a=Ct.resolve(e.userRoot,".gitignore"),f=await ze.readFile(a,"utf-8"),u=o.replace(/\\/g,"/");f.includes(u)||(await ze.appendFile(a,`
|
|
21
|
-
# valaxy fuse
|
|
22
|
-
${u}
|
|
23
|
-
`),Et.success(`Add ${(0,Ye.dim)(u)} to ${(0,Ye.dim)(".gitignore")}`))}catch{}}function Sy(e){e.command("fuse [root]","generate fuse list for search",t=>Ke(t).strict().help(),async({root:t})=>{Rt();let r=await be({userRoot:t},"build");await Wc(r)})}var Ur={extendCli(e){Sy(e)},setup(e){e.hook("build:before",async()=>{await Wc(e.options)})}};l();l();var Gr=oe(me(),1);import{join as Ey,resolve as zc}from"node:path";import{writeFile as ky}from"node:fs/promises";import{render as Ay}from"ejs";import Py from"dayjs";import{ensureSuffix as Oy}from"@antfu/utils";import{consola as ii}from"consola";l();import{access as by}from"node:fs/promises";async function Wr(e){try{return await by(e),!0}catch{return!1}}l();import wy from"node:path";import{readFile as Cy}from"node:fs/promises";l();import Ry from"node:process";var Gt=Ry.cwd(),Gc=`---
|
|
24
|
-
layout: <%=layout%>
|
|
25
|
-
title: <%=title%>
|
|
26
|
-
date: <%=date%>
|
|
27
|
-
---
|
|
28
|
-
`;async function Kc(e){let{clientRoot:t,themeRoot:r}=await be({userRoot:Gt}),n=[Gt,r,t];for(let o of n){let i=wy.resolve(o,"scaffolds",`${e}.md`);if(await Wr(i))return Cy(i,"utf-8")}return!1}async function Yc(e){let t=zc(Gt,"pages"),{path:r,title:n}=e,o=r||Ey("posts",n),i=0;for(;;){let s=zc(t,o);if(i&&(s=`${s}-${i}`),s=Oy(".md",s),!await Wr(s)){let a=await Ty(e);try{await ky(s,a,"utf-8"),ii.success(`[valaxy new]: successfully generated file ${(0,Gr.magenta)(s)}`)}catch(f){console.log(f),ii.error(`[valaxy new]: failed to write file ${s}`),ii.warn(`You should run ${(0,Gr.green)("valaxy new")} in your valaxy project root directory.`)}return s}i++}}async function Ty({date:e,title:t,layout:r="post"}){let n=await Kc(r);return n||(n=Gc),Ay(n,{title:t,layout:r,date:e?Py().format("YYYY-MM-DD HH:mm:ss"):""})}function Xc(e){e.command("new <title>","Draft a new post",t=>{t.usage("$0 <title> -p [path] -l [layout]").positional("title",{describe:"The title of the new post",required:!0}).option("path",{alias:"p",type:"string",describe:"the path to generate new post. Customize the path of post to generate"}).option("layout",{alias:"l",type:"string",default:"post"}).option("date",{alias:"d",type:"boolean",default:!0,describe:"Generate post with the current date"}).strict().help()},async({title:t,path:r,date:n,layout:o})=>{await Yc({title:t,date:n,layout:o,path:r})})}l();var Pt=oe(me(),1);import ki from"node:path";import Xx from"node:process";import Ze from"consola";import{mergeConfig as Sf}from"vite";l();import{join as ff,resolve as pf}from"node:path";import{mergeConfig as df,build as Fx}from"vite";import{build as Vx}from"vite-ssg/node";import Hx from"vite-ssg-sitemap";import Zr from"fs-extra";import Ei from"consola";l();import{splitVendorChunkPlugin as Tx}from"vite";import $x from"@vitejs/plugin-vue";import Ix from"vite-plugin-vue-layouts";import Mx from"unplugin-vue-components/vite";import Nx from"@intlify/unplugin-vue-i18n/vite";import Lx from"@unhead/addons/vite";import{resolve as Dx}from"pathe";l();import{resolve as Dy}from"node:path";import{existsSync as Fy}from"node:fs";import{fileURLToPath as Vy}from"node:url";import Hy from"jiti";import Zc from"defu";import{presetAttributify as jy,presetIcons as qy,presetTypography as By,presetUno as Uy,transformerDirectives as Wy,transformerVariantGroup as Gy}from"unocss";l();import{resolve as $y}from"node:path";import{fileURLToPath as Iy}from"node:url";import My from"fs-extra";import{isObject as Ny}from"@antfu/utils";import Ly from"jiti";function Qc(e,t,r=""){return e={...e},Object.keys(t).forEach(n=>{Ny(e[n])?e[n]=Qc(e[n],t[n],r?`${r}.${n}`:n):Array.isArray(e[n])?e[n]=[...e[n],...t[n]]:e[n]=t[n]}),e}async function Jc(e,t,r,n,o=!0){let i=n;for(let s of e){let a=$y(s,"setup",t);if(My.existsSync(a)){let{default:f}=Ly(Iy(import.meta.url),{esmResolve:!0})(a),u=await f(r);u!==null&&(i=o?Qc(i,u):u)}}return i}async function Ky(e){let{config:t}=e,r=["i-ri-clipboard-line","i-ri-archive-line","i-ri-folder-2-line","i-ri-price-tag-3-line","i-ri-cloud-line"].concat(e.config.unocss?.safelist||[]),n="animate-fade-in m-auto text-left".split(" ").concat(["rotate-y-180"]).concat(r),o=t.siteConfig;o.social?.length&&o.social.forEach(s=>n.push(s?.icon||""));let i=o.sponsor?.methods||[];return i.length&&i.forEach(s=>n.push(s?.icon||"")),n}async function zy(e){let{config:t}=e;return{shortcuts:[["flex-center","flex items-center justify-center"],["inline-flex-center","inline-flex items-center justify-center"],["btn","px-4 py-1 rounded inline-block bg-$va-c-primary text-white cursor-pointer transition hover:bg-$va-c-primary-light disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50"],["icon-btn","inline-flex justify-center items-center cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-sky-600"],["va-card","shadow hover:shadow-lg bg-$va-c-bg-light"]],presets:[Uy(t.unocssPresets?.uno),jy(t.unocssPresets?.attributify),qy({scale:1.2,...t.unocssPresets?.icons}),By(t.unocssPresets?.typography)],rules:[["font-serif",{"font-family":"var(--va-font-serif)"}],["font-sans",{"font-family":"var(--va-font-sans)"}],["font-mono",{"font-family":"var(--va-font-mono)"}]],transformers:[Wy(),Gy()],safelist:await Ky(e)}}async function eu(e){let t=await import("unocss/vite").then(p=>p.default),{unocss:r}=e.config,n=await zy(e),{themeRoot:o,clientRoot:i,roots:s}=e,a=["uno.config.ts","unocss.config.ts"],f=[];[o,i].forEach(p=>a.forEach(y=>f.push(Dy(p,y))));let c={},d=[];return f.forEach(p=>{if(Fy(p)){let y=Hy(Vy(import.meta.url),{esmResolve:!0})(p);"default"in y&&(y=y.default),c=Zc(c,y),d.push(p)}}),c=await Jc(s,"unocss.ts",{},c,!0),t({configDeps:d,configFile:!1,...Zc(r||{},c,n)})}l();import{dirname as Jy,join as li,resolve as Fe}from"node:path";import{mergeConfig as Zy,searchForWorkspaceRoot as ci}from"vite";import ev from"is-installed-globally";import{uniq as ru}from"@antfu/utils";l();import{join as si}from"node:path";import ai from"fs-extra";import{uniq as Yy}from"@antfu/utils";import{loadConfigFromFile as Xy,mergeConfig as Qy}from"vite";async function Kr({userRoot:e,themeRoot:t},r){let n={mode:"development",command:r},o={},i=Yy([t,e]).map(s=>si(s,"vite.config.ts"));for await(let s of i){if(!ai.existsSync(s))continue;let a=await Xy(n,s);a?.config&&(o=Qy(o,a.config))}return o}async function tu({clientRoot:e,themeRoot:t,userRoot:r,config:n},o){let i=o,s="",a="";n.siteConfig.favicon&&(s+=`<link rel="icon" href="${n.siteConfig.favicon}">`);let f=[r,t];n.siteConfig.mode==="auto"&&(s+=`
|
|
29
|
-
<script>
|
|
30
|
-
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
31
|
-
const colorSchemeSetting = localStorage.getItem('vueuse-color-scheme') || 'auto';
|
|
32
|
-
if (colorSchemeSetting === 'dark' || (prefersDark && colorSchemeSetting !== 'light')) {
|
|
33
|
-
document.documentElement.classList.toggle('dark', true);
|
|
34
|
-
}
|
|
35
|
-
</script>
|
|
36
|
-
`),n.siteConfig.lang&&(s+=`
|
|
37
|
-
<script>
|
|
38
|
-
const locale = localStorage.getItem('valaxy-locale') || '${n.siteConfig.lang}';
|
|
39
|
-
document.documentElement.setAttribute('lang', locale);
|
|
40
|
-
</script>
|
|
41
|
-
`);for(let u of f){let c=si(u,"index.html");if(!ai.existsSync(c))continue;let d=await ai.readFile(c,"utf-8");s+=`
|
|
42
|
-
${(d.match(/<head>([\s\S]*?)<\/head>/im)?.[1]||"").trim()}`,a+=`
|
|
43
|
-
${(d.match(/<body>([\s\S]*?)<\/body>/im)?.[1]||"").trim()}`}return i=i.replace("__ENTRY__",Q(si(e,"main.ts"))).replace("<!-- head -->",s).replace("<!-- body -->",a),i}var tv=["@unhead/schema-org","@unhead/vue","@vueuse/integrations/useFuse","body-scroll-lock","defu","dayjs","dayjs/locale/zh-cn","dayjs/plugin/relativeTime","dayjs/plugin/timezone","dayjs/plugin/utc","katex","nprogress","unocss","vue","vue-router","vue-i18n","fuse.js","medium-zoom","vanilla-lazyload","@vue/devtools-api"],nu=["@docsearch/css","@vueuse/core","@vueuse/shared","@unocss/reset","unocss","vue","vue-router","vue-demi","@vue/devtools-api","meting","valaxy","/@valaxyjs/config","/@valaxyjs/context","/@valaxyjs/addons","/@valaxyjs/locales","/@valaxyjs/styles"];function ou(e){let t=Object.keys(e.config.themeConfig.pkg.dependencies||{}),r=e.addons.map(n=>Object.keys(n.pkg.dependencies||{})).flat();return{name:"valaxy:site",enforce:"pre",config(n){let o={root:e.clientRoot,cacheDir:li(e.userRoot,"node_modules/.vite"),publicDir:li(e.userRoot,"public"),define:ui(e),resolve:{alias:rv(e),dedupe:["vue"]},optimizeDeps:{entries:[Fe(e.clientRoot,"main.ts")],include:ru([...tv,...t,...r]).filter(i=>!nu.includes(i)),exclude:nu},server:{fs:{allow:ru([ci(e.clientRoot),ci(e.themeRoot),ci(e.userRoot),Jy(Te("katex/package.json",!0))])}}};return ev&&(o.cacheDir=li(e.pkgRoot,"node_modules/.vite"),o.resolve.alias.vue=`${Te("vue/dist/vue.esm-browser.js",!0)}`),Zy(n,o)},async transformIndexHtml(n){return n=await tu(e,n),{html:n,tags:[]}}}}function ui(e){return{__VUE_PROD_DEVTOOLS__:!1,__INTLIFY_PROD_DEVTOOLS__:!1}}function rv(e){let t=[{find:"~/",replacement:`${Q(e.userRoot)}/`},{find:"valaxy/client/",replacement:`${Q(e.clientRoot)}/`},{find:"valaxy/package.json",replacement:Q(Fe(e.clientRoot,"../package.json"))},{find:/^valaxy$/,replacement:Q(Fe(e.clientRoot,"index.ts"))},{find:"@valaxyjs/client/",replacement:`${Q(e.clientRoot)}/`},{find:`valaxy-theme-${e.theme}/`,replacement:`${Q(Fe(e.themeRoot))}/`},{find:`valaxy-theme-${e.theme}`,replacement:`${Q(Fe(e.themeRoot))}/client/index.ts`}];return e.config.siteConfig.encrypt.enable&&t.push({find:/^vue$/,replacement:Te("vue/dist/vue.esm-bundler.js",!0)}),e.addons.forEach(r=>{t.push({find:`${r.name}/client/`,replacement:`${Q(`${Fe(r.root)}`)}/client/`}),t.push({find:`${r.name}/App.vue`,replacement:`${Q(Fe(r.root))}/App.vue`}),t.push({find:r.name,replacement:`${Q(Fe(r.root))}/client/index.ts`})}),t.push({find:/^valaxy-addon-(.*)$/,replacement:Q(Fe(e.clientRoot,"./addons/index.ts"))}),t}l();import{existsSync as nv}from"node:fs";import{join as ov,resolve as iv}from"node:path";import{slash as sv,uniq as av}from"@antfu/utils";function iu({clientRoot:e,themeRoot:t,userRoot:r}){let n=sv(iv(e,"setup"));return{name:"valaxy:setup",enforce:"pre",async transform(o,i){if(i.startsWith(n)){let s=i.slice(n.length+1).replace(/\?.*$/,""),a=[],f=[];return av([t,r]).map(c=>ov(c,"setup",s)).forEach((c,d)=>{if(!nv(c))return;a.push(`import __n${d} from '${Q(c)}'`);let p=`__n${d}`;/\binjection_return\b/g.test(o)&&(p=`injection_return = ${p}`),/\binjection_arg\b/g.test(o)?p+="(injection_arg)":p+="()",f.push(`// ${c}`,p)}),o=o.replace("/* __imports__ */",a.join(`
|
|
44
|
-
`)),o=o.replace("/* __injections__ */",f.join(`
|
|
45
|
-
`)),o}return null}}}l();import{objectEntries as lv}from"@antfu/utils";function su(e){let t=lv(ui(e));return[{name:"valaxy:flags",enforce:"pre",transform(r,n){if(n.match(/\.vue($|\?)/)){let o=r;if(t.forEach(([i,s])=>{r=r.replace(new RegExp(i,"g"),s)}),o!==r)return r}}}]}l();import gv from"unplugin-vue-router/vite";import fi from"fs-extra";import{resolve as hv}from"pathe";import yv from"gray-matter";import{isDate as lu}from"@antfu/utils";import{convert as vv}from"html-to-text";import xv from"markdown-it";l();import{existsSync as cv,readFileSync as uv}from"node:fs";function fv(e){let t=(e.match(/[\u4E00-\u9FA5]/g)||[]).length,r=(e.replace(/[\u4E00-\u9FA5]/g,"").match(/[a-zA-Z0-9_\u0392-\u03C9\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF\u0400-\u04FF]+|[\u00E4\u00C4\u00E5\u00C5\u00F6\u00D6]+|\w+/g)||[]).length;return{cn:t,en:r}}function pv({cn:e,en:t},r){let n=e/(r.speed.cn||300)+t/(r.speed.en||100);return n<1?1:Math.ceil(n)}function dv({cn:e,en:t}){let r=e+t;return r<1e3?r:`${Math.round(r/100)/10}k`}function mv(e,t){let r=fv(e);return{countData:r,wordCount:dv(r),readingTime:pv(r,t.readTime)}}function au({route:e,options:t}){let r=e.components.get("default")||"";if(cv(r)){let n=uv(r,"utf-8"),{wordCount:o,readingTime:i}=mv(n,{readTime:Object.assign({speed:{cn:300,en:100}},t.readTime)});e.meta.frontmatter&&(e.meta.frontmatter.wordCount||(e.meta.frontmatter.wordCount=o),e.meta.frontmatter.readingTime||(e.meta.frontmatter.readingTime=i))}}var cu=new xv({html:!0});function _v(e="",t="html"){switch(t){case"ai":case"md":return e;case"html":return cu.render(e);case"text":return vv(cu.render(e));default:return e}}function uu(e){let{roots:t,config:r}=e;return gv({extensions:[".vue",".md"],routesFolder:t.map(n=>`${n}/pages`),dts:hv(e.tempDir,"typed-router.d.ts"),...r.router,async extendRoute(n){let o=JSON.parse(JSON.stringify(r.siteConfig.frontmatter))||{};if(n.meta&&n.meta.frontmatter){let{frontmatter:s,otherMeta:a}=n.meta;n.meta=a}n.addToMeta({frontmatter:o}),(n.fullPath==="/"||n.fullPath==="/page")&&n.addToMeta({layout:"home"}),n.fullPath==="/posts"?n.addToMeta({layout:!1}):n.fullPath.startsWith("/posts/")&&n.children.length===0&&n.addToMeta({layout:"post"});let i=n.components.get("default")||"";if(i.endsWith(".md")){let s=fi.readFileSync(i,"utf-8"),{data:a,excerpt:f,content:u}=yv(s,{excerpt_separator:Ir}),c=a,d=e.config.siteConfig.lastUpdated;if(delete c.password,c.gallery_password&&(delete c.gallery_password,delete c.photos),c.date||(c.date=fi.statSync(i).mtime),d&&(c.updated||(c.updated=fi.statSync(i).ctime)),lu(c.date)||(c.date=new Date(c.date)),lu(c.updated)||(c.updated=new Date(c.updated)),c.from&&(Array.isArray(c.from)?c.from.forEach(y=>{e.redirects.push({from:y,to:n.fullPath})}):e.redirects.push({from:c.from,to:n.fullPath})),n.addToMeta({frontmatter:c,excerpt:f?_v(f,c.excerpt_type):""}),a.layout&&n.addToMeta({layout:a.layout}),n.meta.frontmatter?.updated||(n.meta.frontmatter.updated=n.meta.frontmatter.date),n.meta.frontmatter.tags){let y=n.meta.frontmatter.tags;typeof y=="string"&&(n.meta.frontmatter.tags=[y])}r.siteConfig.statistics.enable&&au({options:r.siteConfig.statistics,route:n});let p={route:n,data:a,excerpt:f,content:u,path:i};r.extendMd?.(p)}return r.router?.extendRoute?.(n)}})}l();var Yr=oe(me(),1);import{join as Kt,relative as Vv,resolve as Hv}from"pathe";import zt from"fs-extra";import{defu as jv}from"defu";import qv from"pascalcase";import wu from"consola";l();import{LRUCache as Nv}from"lru-cache";import Lv from"debug";import Dv from"pathe";l();import pu from"pathe";import Rv from"fs-extra";l();l();import pi from"node:process";var di=new Set;function fu(e){if(di.size===0){let r=typeof pi=="object"&&pi.env.VITE_EXTRA_EXTENSIONS||pi.env?.VITE_EXTRA_EXTENSIONS||"";`3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip${r&&typeof r=="string"?`,${r}`:""}`.split(",").forEach(n=>di.add(n))}let t=e.split(".").pop();return t==null||!di.has(t.toLowerCase())}l();import mi from"node:path";import Sv from"fs-extra";import{slash as bv}from"@antfu/utils";function gi(e,t,r,n){let o=/<!--\s*@include:\s*(.*?)\s*-->/g,i=/\{(\d*),(\d*)\}$/;return t.replace(o,(s,a)=>{if(!a.length)return s;let f=a.match(i);f&&(a=a.slice(0,-f[0].length));let u=a[0]==="@";try{let c=u?mi.join(e,a.slice(a[1]==="/"?2:1)):mi.join(mi.dirname(r),a),d=Sv.readFileSync(c,"utf-8");if(f){let[,p,y]=f;d=d.split(/\r?\n/).slice(p?Number.parseInt(p,10)-1:void 0,y?Number.parseInt(y,10):void 0).join(`
|
|
46
|
-
`)}return n.push(bv(c)),gi(e,d,c,n)}catch{return s}})}var wv=/<!--\s*@include:\s*(.*?)\s*-->/g;function du(e){let t=e.userRoot;return(r,n)=>{let o=n,i=[],s=pu.dirname(n);return r=gi(t,r,o,i),r=r.replace(wv,(a,f)=>{try{let u=pu.join(s,f),c=Rv.readFileSync(u,"utf-8");return i.push(u),c}catch{return a}}),{code:r,includes:i}}}l();import kt from"pathe";import{slash as Cv}from"@antfu/utils";import Ev from"fs-extra";function mu(e){let t=kt.resolve(e.userRoot,"pages"),{ignoreDeadLinks:r}=e.config,n=e.config.vite?.publicDir||"public";return(o,i)=>{let{links:s=[]}=e.env,a=i,f=i,u=[],c=p=>{u.push({url:p,file:kt.relative(t,a)})};function d(p){return r?r===!0?!0:r==="localhostLinks"?p.replace(xt,"").startsWith("//localhost"):r.some(y=>typeof y=="string"?p===y:y instanceof RegExp?y.test(p):typeof y=="function"?y(p):!1):!1}if(s){let p=kt.dirname(f);for(let y of s){let{pathname:x}=new URL(y,"http://a.com");if(!fu(x))continue;y=y.replace(/[?#].*$/,"").replace(/\.(html|md)$/,""),y.endsWith("/")&&(y+="index");let S=decodeURIComponent(Cv(y.startsWith("/")?y.slice(1):kt.relative(t,kt.resolve(p,y)))).replace(/\/index$/,"");!e.pages.includes(S)&&!Ev.existsSync(kt.resolve(p,n,`${S}.html`))&&!d(y)&&c(y)}}return u}}l();function kv(e){return["import { provide } from 'vue'","import { useRoute } from 'vue-router'",`
|
|
47
|
-
const data = ${mc(e)}
|
|
48
|
-
const route = useRoute()`,`const $frontmatter = data.frontmatter || {}
|
|
49
|
-
route.meta.frontmatter = Object.assign(route.meta.frontmatter || {}, data.frontmatter || {})
|
|
50
|
-
provide('pageData', data)
|
|
51
|
-
provide('valaxy:frontmatter', $frontmatter)
|
|
52
|
-
`]}function gu(e){return(t,r,n)=>{let o=kv(n),i=e.mode==="dev",s=[...o,i?`
|
|
53
|
-
window.$pageData = data
|
|
54
|
-
window.$frontmatter = $frontmatter
|
|
55
|
-
`:"","globalThis.$frontmatter = $frontmatter"],a=t.indexOf("<script setup>");a!==-1?t=t.slice(0,a+14)+s.join(`
|
|
56
|
-
`)+t.slice(a+14):t=`<script setup>
|
|
57
|
-
${s.join(`
|
|
58
|
-
`)}
|
|
59
|
-
</script>
|
|
60
|
-
${t}`;let f=t.indexOf("<template>")+10,u=t.lastIndexOf("</template>"),c=t.slice(f,u).trim();return c.startsWith("<div>")&&c.endsWith("</div>")&&(c=c.slice(5,-6)),t=`${t.slice(0,f)}
|
|
61
|
-
${hu(c)}
|
|
62
|
-
${t.slice(u)}`,t}}l();import Av from"pathe";function Pv(e,t){if(!e||!e.length)return;let r=e.find(([n,o={}])=>n==="meta"&&o.name===t&&o.content);return r&&r[1].content}function Ov(e){let{description:t,head:r}=e;return t!==void 0?t:r&&Pv(r,"description")||""}async function yu(e,t,r){let{frontmatter:n={}}=r.env,o=Av.relative(r.userRoot,t),i=JSON.parse(JSON.stringify(n)),s={title:i.title||r.env.title||"",titleTemplate:i.titleTemplate,description:Ov(i),frontmatter:i,headers:r.env.headers||[],relativePath:o,path:t};return s.lastUpdated=await Nt(t),s}l();function Tv(e,t,r){if(typeof r!="number"||r<=0)return e;let n=t.config.siteConfig.codeHeightLimit;return e=e.replaceAll(/<div.+class="language-\w+">/g,o=>(n!==void 0&&n>0?o=o.replace(/\d+/,r.toString()):o=`${o.slice(0,5)}style="max-height: ${r}px;"${o.slice(5)}`,o)),e}function vu(e){return t=>{let{frontmatter:r={}}=e.env;return Tv(t,e,r.codeHeightLimit)}}l();l();import{webcrypto as hi}from"node:crypto";function $v(e){let t=new TextEncoder;return hi.subtle.importKey("raw",t.encode(e),"PBKDF2",!1,["deriveBits","deriveKey"])}function Iv(e,t){return hi.subtle.deriveKey({name:"PBKDF2",salt:t,iterations:1e5,hash:"SHA-256"},e,{name:"AES-CBC",length:256},!0,["encrypt","decrypt"])}async function zr(e,t){let{password:r,iv:n,salt:o}=t,i=await $v(r),s=await Iv(i,o),a=new TextEncoder,f=await hi.subtle.encrypt({name:"AES-CBC",iv:n},s,a.encode(e));return String.fromCharCode(...new Uint8Array(f))}function xu(e){let{config:{siteConfig:{encrypt:t}}}=e;return async(r,n,o)=>{let{frontmatter:i={}}=o;if(t.enable){let s=/<!-- valaxy-encrypt-start:(?<password>\w+) -->(?<content>.*?)<!-- valaxy-encrypt-end -->/gs,a=/((<!-- valaxy-encrypt-start:\w+ -->)|(<!-- valaxy-encrypt-end -->))/g;if(i.password)r=r.replaceAll(a,"");else{let f=[];for(let c of r.matchAll(s))f.push(await zr(c.groups.content,{password:c.groups.password,iv:t.iv,salt:t.salt}));let u=0;f.length&&(i.partiallyEncryptedContents=f,r=r.replaceAll(s,()=>`<ClientOnly><ValaxyDecrypt :encrypted-content="${`$frontmatter.partiallyEncryptedContents[${u++}]`}" /></ClientOnly>`))}if(i.password){let f=r.indexOf("<template>"),u=r.lastIndexOf("</template>"),c=r.slice(f+10,u),d=await zr(c,{password:i.password,iv:t.iv,salt:t.salt});i.encryptedContent=d,i.encrypt=!0,delete i.password,r=r.replace(c,'<ClientOnly><ValaxyDecrypt :encrypted-content="$frontmatter.encryptedContent" /></ClientOnly>');let y=r.lastIndexOf("<script setup>"),x=r.lastIndexOf("</script>"),S=r.slice(y+14,x);r=r.replace(S,"")}if(i.gallery_password){let f=await zr(JSON.stringify(i.photos),{password:i.gallery_password,iv:t.iv,salt:t.salt});i.encryptedPhotos=f,delete i.gallery_password,delete i.photos}}return r}}l();var At=oe(me(),1);import Mv from"consola";function _u(e,t){return e.includes("{%")&&e.includes("%}")&&Mv.error(`${`${t}
|
|
63
|
-
`} Please ${(0,At.red)("remove")} ${(0,At.cyan)("{% %}")}, because it conflicts with ${(0,At.yellow)("markdown-it-attrs")}.`),e.replace("{%","{%"),e.replace("%}","%}"),e}var Su=Lv("valaxy:md"),bu=new Nv({max:128});function Fv(){return["main-header","main-header-after","main-nav","main-content","main-content-after","main-nav-before","main-nav-after","comment","footer","aside","aside-custom"].map(r=>`<template #${r}><slot name="${r}" /></template>`).join("")}function hu(e){let t="ValaxyMain";return`
|
|
64
|
-
<${t} :frontmatter="$frontmatter">
|
|
65
|
-
<template #main-content-md>${e}</template>
|
|
66
|
-
${Fv()}
|
|
67
|
-
<slot />
|
|
68
|
-
</${t}>
|
|
69
|
-
`}async function Ru(e,t){e.pages=e.pages.map(u=>u.replace(/\.md$/,"").replace(/\/index$/,""));let r=du(e),n=vu(e),o=gu(e),i=xu(e),s=mu(e),a=e.userRoot,f=e.mode==="build";return async(u,c)=>{let d=c,p=Dv.relative(a,d),y=s(u,c),x=JSON.stringify({code:u,id:c});if(f){let V=JSON.stringify({code:u,id:c}),P=bu.get(V);if(P)return Su(`[cache hit] ${p}`),P}let S=Date.now(),b=await yu(u,c,e);u=_u(u,c);let E=r(u,c),O=E.includes;u=E.code,u=n(u),u=await i(u,c,b),u=o(u,c,b),Su(`[render] ${d} in ${Date.now()-S}ms.`);let M={code:u,pageData:b,deadLinks:y,includes:O};return f&&bu.set(x,M),M}}function Bv(e){let t=e.redirects.map(r=>({path:r.from,redirect:r.to}));return e.config.runtimeConfig.redirects={useVueRouter:Bt()?e.config.siteConfig.redirects.useVueRouter:!0,redirectRoutes:t},`export default ${JSON.stringify(JSON.stringify(e.config))}`}function Uv(e,t){let r=[];t.config.features?.katex&&(r.push(`import "${Q(Te("katex/dist/katex.min.css",!0))}"`),r.push(`import "${Q(Kt(t.clientRoot,"styles/third/katex.scss"))}"`));for(let n of e){let o=[];["index","css-vars"].forEach(s=>{o.push(Kt(n,"styles",`${s}.css`)),o.push(Kt(n,"styles",`${s}.scss`))});for(let s of o)zt.existsSync(s)&&r.push(`import "${Q(s)}"`)}return r.join(`
|
|
70
|
-
`)}function Wv(e){let t=['import { defu } from "defu"','const messages = { "zh-CN": {}, en: {} }'],r=["zh-CN","en"];return e.forEach((n,o)=>{r.forEach(i=>{let s=`${n}/locales/${i}.yml`;if(zt.existsSync(s)&&zt.readFileSync(s,"utf-8")){let a=i.replace("-","")+o;t.unshift(`import ${a} from "${Q(s)}"`),t.push(`messages['${i}'] = defu(${a}, messages['${i}'])`)}})}),t.push("export default messages"),t.join(`
|
|
71
|
-
`)}function Gv(e){let t=e.addons.filter(i=>i.global).filter(i=>zt.existsSync(Kt(i.root,"./App.vue"))),r=i=>`Addon${qv(i)}App`,n=t.map(i=>`import ${r(i.name)} from "${i.name}/App.vue"`).join(`
|
|
72
|
-
`),o=t.map(i=>`{ component: ${r(i.name)}, props: ${JSON.stringify(i.props)} }`).join(",");return`${n}
|
|
73
|
-
export default [${o}]`}var Kv='import { defineComponent } from "vue"; export default defineComponent({ render: () => null });';function Cu(e){let t=Kt(e,"App.vue");return zt.existsSync(t)?[`import AppVue from "${Q(t)}"`,"export default AppVue"].join(`
|
|
74
|
-
`):Kv}async function Eu(e,t={}){let{config:r}=e,n="/@valaxy",o=e.roots,i=!1,s,a;return[{name:"valaxy:loader",enforce:"pre",async configResolved(f){a=f,s=await Ru(e,a)},configureServer(f){f.watcher.add([e.configFile,e.clientRoot,e.themeRoot,e.userRoot])},resolveId(f){return f.startsWith(n)?f:null},load(f){if(f==="/@valaxyjs/config")return Bv(e);if(f==="/@valaxyjs/context")return`export default ${JSON.stringify(JSON.stringify({userRoot:e.userRoot}))}`;if(f==="/@valaxyjs/styles")return Uv(o,e);if(f==="/@valaxyjs/locales")return Wv(o);if(f==="/@valaxyjs/addons")return Gv(e);if(f==="/@valaxyjs/UserAppVue")return Cu(e.userRoot);if(f==="/@valaxyjs/ThemeAppVue")return Cu(e.themeRoot);if(f.startsWith(n))return{code:"",map:{mappings:""}}},async transform(f,u){if(u.endsWith(".md")){let{code:c,deadLinks:d,includes:p}=await s(f,u);return d.length&&(i=!0,wu.error(`Dead links found in ${u}`),wu.error(d)),p.length&&p.forEach(y=>{this.addWatchFile(y)}),c}},renderStart(){if(i&&!r.ignoreDeadLinks)throw new Error("One or more pages contain dead links.")},async handleHotUpdate(f){let{file:u,server:c,read:d}=f,p=x=>{t.onConfigReload?.(x,e.config),Object.assign(e.config,x),r=x;let S=["/@valaxyjs/config","/@valaxyjs/context"];return[...Array.from(S).map(E=>c.moduleGraph.getModuleById(E))].filter(E=>!!E)};if([e.configFile].includes(u)){let{config:x}=await be({userRoot:e.userRoot});return p(x)}if(u===e.siteConfigFile){let{siteConfig:x}=await Nr(e.userRoot);return r.siteConfig=jv(x,Mr),p(r)}if(u===e.themeConfigFile){let{themeConfig:x}=await bc(e),S=r.themeConfig.pkg;return x.pkg=S,r.themeConfig=x,p(r)}if(u===Hv(e.themeRoot,"valaxy.config.ts")){let x=await oi(e),S=st(e.config,x),{config:b}=await ni(e,S);return p(b)}if(u.endsWith(".md")){let x=We(),S=await d(),{code:b,pageData:E}=await s(S,u),M={path:`/${Vv(`${e.userRoot}/pages`,u)}`,pageData:E};c.hot.send({type:"custom",event:"valaxy:pageData",data:M}),wt.success(`${(0,Yr.yellow)("[HMR]")} ${u} ${(0,Yr.dim)(`updated in ${x()}`)}`),f.read=()=>b}}}]}l();import VP from"markdown-it";l();l();import Au from"crypto";l();var ku="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var zv=128,Xe,Qe,Pu=e=>{!Xe||Xe.length<e?(Xe=Buffer.allocUnsafe(e*zv),Au.randomFillSync(Xe),Qe=0):Qe+e>Xe.length&&(Au.randomFillSync(Xe),Qe=0),Qe+=e},Yv=e=>(Pu(e-=0),Xe.subarray(Qe-e,Qe)),Xv=(e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(i=t)=>{let s="";for(;;){let a=r(o),f=o;for(;f--;)if(s+=e[a[f]&n]||"",s.length===i)return s}}},Ou=(e,t=21)=>Xv(e,t,Yv),yi=(e=21)=>{Pu(e-=0);let t="";for(let r=Qe-e;r<Qe;r++)t+=ku[Xe[r]&63];return t};var Lu=oe(me(),1);l();function Tu(e=[]){return{name:"@shikijs/transformers:compact-line-options",line(t,r){let n=e.find(o=>o.line===r);return n?.classes&&this.addClassToHast(t,n.classes),t}}}function Qv(e,t,r,n=!1){return{name:e,code(o){let i=o.children.filter(a=>a.type==="element"),s=[];i.forEach((a,f)=>{let u;for(let c of a.children){if(c.type!=="element")continue;let d=c.children[0];if(d.type!=="text")continue;let p=!1;d.value=d.value.replace(t,(...y)=>r.call(this,y,a,c,i,f)?(p=!0,""):y[0]),p&&!d.value.trim()&&(u=c)}if(u&&(a.children.splice(a.children.indexOf(u),1),a.children.length===0&&(s.push(a),n))){let c=o.children[o.children.indexOf(a)+1];c&&c.type==="text"&&c.value===`
|
|
75
|
-
`&&s.push(c)}});for(let a of s)o.children.splice(o.children.indexOf(a),1)}}}function Jv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xr(e={},t="@shikijs/transformers:notation-map"){let{classMap:r={},classActivePre:n=void 0}=e;return Qv(t,new RegExp(`\\s*(?://|/\\*|<!--|#)\\s+\\[!code (${Object.keys(r).map(Jv).join("|")})(:\\d+)?\\]\\s*(?:\\*/|-->)?`),function([o,i,s=":1"],a,f,u,c){let d=Number.parseInt(s.slice(1),10);return u.slice(c,c+d).forEach(p=>{this.addClassToHast(p,r[i])}),n&&this.addClassToHast(this.pre,n),!0})}function $u(e={}){let{classActiveLine:t="focused",classActivePre:r="has-focused"}=e;return Xr({classMap:{focus:t},classActivePre:r},"@shikijs/transformers:notation-focus")}function Iu(e={}){let{classActiveLine:t="highlighted",classActivePre:r="has-highlighted"}=e;return Xr({classMap:{highlight:t,hl:t},classActivePre:r},"@shikijs/transformers:notation-highlight")}function Mu(e={}){let{classLineAdd:t="diff add",classLineRemove:r="diff remove",classActivePre:n="has-diff"}=e;return Xr({classMap:{"++":t,"--":r},classActivePre:n},"@shikijs/transformers:notation-diff")}function Nu(e={}){let{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:r="has-highlighted"}=e;return Xr({classMap:t,classActivePre:r},"@shikijs/transformers:notation-error-level")}var vA=Symbol("highlighted-lines");import{addClassToHast as Zv,bundledLanguages as ex,getHighlighter as tx,isSpecialLang as rx}from"shiki";var nx=Ou("abcdefghijklmnopqrstuvwxyz",10);function ox(e){e=e.replace(/^(?:\[.*?\])?.*?([\d,-]+).*/,"$1").trim();let t=[];return e?(e.split(",").map(r=>r.split("-").map(n=>Number.parseInt(n,10))).forEach(([r,n])=>{r&&n?t.push(...Array.from({length:n-r+1},(o,i)=>r+i)):t.push(r)}),t.map(r=>({line:r,classes:["highlighted"]}))):[]}async function vi(e,t,r=console){let{defaultHighlightLang:n="",codeTransformers:o=[]}=t,i=await tx({themes:typeof e=="object"&&"light"in e&&"dark"in e?[e.light,e.dark]:[e],langs:[...Object.keys(ex),...t.languages||[]],langAlias:t.languageAlias});await t?.shikiSetup?.(i);let s=[Mu(),$u({classActiveLine:"has-focus",classActivePre:"has-focused-lines"}),Iu(),Nu(),{name:"valaxy:add-class",pre(d){Zv(d,"vp-code")}},{name:"valaxy:clean-up",pre(d){delete d.properties.tabindex,delete d.properties.style}}],a=/-vue$/,f=/=(\d*)/,u=/:(no-)?line-numbers(=\d*)?$/,c=/\{\{.*?\}\}/g;return(d,p,y)=>{let x=a.test(p)?"":"v-pre";p=p.replace(f,"").replace(u,"").replace(a,"").toLowerCase()||n,p&&!i.getLoadedLanguages().includes(p)&&!rx(p)&&(r.warn(Lu.default.yellow(`
|
|
76
|
-
The language '${p}' is not loaded, falling back to '${n||"txt"}' for syntax highlighting.`)),p=n);let S=ox(y),b=new Map,E=V=>x?V:V.replace(c,P=>{let N=b.get(P);return N||(N=nx(),b.set(P,N)),N}),O=V=>(b.forEach((P,N)=>{V=V.replaceAll(P,N)}),V);d=E(d).trimEnd();let M=i.codeToHtml(d,{lang:p,transformers:[...s,Tu(S),{name:"valaxy:v-pre",pre(V){x&&(V.properties["v-pre"]="")}},{name:"valaxy:empty-line",code(V){V.children.forEach(P=>{P.type==="element"&&P.tagName==="span"&&Array.isArray(P.properties.class)&&P.properties.class.includes("line")&&P.children.length===0&&P.children.push({type:"element",tagName:"wbr",properties:{},children:[]})})}},...o],meta:{__raw:y},...typeof e=="object"&&"light"in e&&"dark"in e?{themes:e,defaultColor:!1}:{theme:e}});return O(M)}}l();import af from"markdown-it-anchor";import Ex from"markdown-it-attrs";import{full as kx}from"markdown-it-emoji";import Ax from"markdown-it-task-lists";l();var Du=new Set([!0,!1,"alt","title"]);function Fu(e,t){return(Array.isArray(e)?e:[]).filter(([r])=>r!==t)}function Vu(e,t){e&&e.attrs&&(e.attrs=Fu(e.attrs,t))}function ix(e,t){if(!Du.has(e))throw new TypeError(`figcaption must be one of: ${[...Du]}.`);if(e==="alt")return t.content;let r=t.attrs.find(([n])=>n==="title");return Array.isArray(r)&&r[1]?(Vu(t,"title"),r[1]):void 0}function Hu(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(r){let n=1;for(let o=1,i=r.tokens.length;o<i-1;++o){let s=r.tokens[o];if(s.type!=="inline"||!s.children||s.children.length!==1&&s.children.length!==3||s.children.length===1&&s.children[0].type!=="image")continue;if(s.children.length===3){let[u,c,d]=s.children;if(u.type!=="link_open"||c.type!=="image"||d.type!=="link_close")continue}if(o!==0&&r.tokens[o-1].type!=="paragraph_open"||o!==i-1&&r.tokens[o+1].type!=="paragraph_close")continue;let a=r.tokens[o-1],f;if(a.type="figure_open",a.tag="figure",r.tokens[o+1].type="figure_close",r.tokens[o+1].tag="figure",t.dataType&&r.tokens[o-1].attrPush(["data-type","image"]),t.link&&s.children.length===1){[f]=s.children;let u=new r.Token("link_open","a",1);u.attrPush(["href",f.attrGet("src")]),s.children.unshift(u),s.children.push(new r.Token("link_close","a",-1))}if(f=s.children.length===1?s.children[0]:s.children[1],t.figcaption){let u=ix(t.figcaption,f);if(u){let[c]=e.parseInline(u,r.env);s.children.push(new r.Token("figcaption_open","figcaption",1)),s.children.push(...c.children),s.children.push(new r.Token("figcaption_close","figcaption",-1)),f.attrs&&(f.attrs=Fu(f.attrs,"title"))}}if(t.copyAttrs&&f.attrs){let u=t.copyAttrs===!0?"":t.copyAttrs;a.attrs=f.attrs.filter(([c])=>c.match(u)).map(c=>Array.from(c))}if(t.tabindex&&(r.tokens[o-1].attrPush(["tabindex",n]),n++),t.lazy&&(f.attrs.some(([u])=>u==="loading")||f.attrs.push(["loading","lazy"])),t.async&&(f.attrs.some(([u])=>u==="decoding")||f.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let u=!1;for(let c=0,d=f.attrs.length;c<d&&!u;c++){let p=f.attrs[c];p[0]==="class"&&(p[1]=`${p[1]} ${t.classes}`,u=!0)}u||f.attrs.push(["class",t.classes])}if(t.removeSrc){let u=f.attrs.find(([c])=>c==="src");f.attrs.push(["data-src",u[1]]),Vu(f,"src")}}})}l();l();var sx={"&":"&","<":"<",">":">","'":"'",'"':"""},ax=/[&<>'"]/g,lt=e=>e.replace(ax,t=>sx[t]);var xi=(e,{shouldAllowHtml:t,shouldEscapeText:r})=>{let n=e.children??[],o=["text","emoji","code_inline"];return t&&o.push("html_inline"),n.filter(s=>o.includes(s.type)&&!s.meta?.isPermalinkSymbol).reduce((s,a)=>r&&(a.type==="code_inline"||a.type==="text")?`${s}${lt(a.content)}`:`${s}${a.content}`,"").trim()},Qr=(e,{level:t,shouldAllowHtml:r,shouldAllowNested:n,shouldEscapeText:o,slugify:i,format:s})=>{let a=[],f=[],u=c=>{for(;f.length!==0&&c.level<=f[0].level;)f.shift();f.length===0?(a.push(c),f.push(c)):(f[0].children.push(c),f.unshift(c))};for(let c=0;c<e.length;c+=1){let d=e[c];if(d.type!=="heading_open"||d.level!==0&&!n)continue;let p=Number.parseInt(d.tag.slice(1),10);if(!t.includes(p))continue;let y=e[c+1];if(!y)continue;let x=xi(y,{shouldAllowHtml:r,shouldEscapeText:o}),S=d.attrGet("id")??i(x);u({level:p,title:s?.(x)??x,slug:S,link:`#${S}`,children:[]})}return a},lx=/[\u0000-\u001f]/g,cx=/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g,ux=/[\u0300-\u036F]/g,ct=e=>e.normalize("NFKD").replace(ux,"").replace(lx,"").replace(cx,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase();var ju=(e,{level:t=[2,3],shouldAllowNested:r=!1,slugify:n=ct,format:o}={})=>{let i=e.renderer.render.bind(e.renderer);e.renderer.render=(s,a,f)=>(f.headers=Qr(s,{level:t,shouldAllowHtml:!1,shouldAllowNested:r,shouldEscapeText:!1,slugify:n,format:o}),i(s,a,f))};l();var qu="script",Bu="style",Yt="template",fx=/^<script\s+.*?\bsetup\b.*?>$/is,px=({customBlocks:e})=>{let t=Array.from(new Set([qu,Bu,...e])).join("|");return new RegExp(`^\\s*(?<content>(?<tagOpen><(?<type>${t})\\s?.*?>)(?<contentStripped>.*)(?<tagClose><\\/\\k<type>\\s*>))\\s*$`,"is")},Uu=(e,{customBlocks:t=[]}={})=>{let r=px({customBlocks:t}),n=e.render.bind(e);e.render=(i,s={})=>{s.sfcBlocks={template:null,script:null,scriptSetup:null,scripts:[],styles:[],customBlocks:[]};let a=n(i,s);return s.sfcBlocks.template={type:Yt,content:`<${Yt}>${a}</${Yt}>`,contentStripped:a,tagOpen:`<${Yt}>`,tagClose:`</${Yt}>`},a};let o=e.renderer.rules.html_block;e.renderer.rules.html_block=(i,s,a,f,u)=>{if(!f.sfcBlocks)return o(i,s,a,f,u);let p=i[s].content.match(r);if(!p)return o(i,s,a,f,u);let y=p.groups;return y.type===qu?(f.sfcBlocks.scripts.push(y),fx.test(y.tagOpen)?f.sfcBlocks.scriptSetup=y:f.sfcBlocks.script=y):y.type===Bu?f.sfcBlocks.styles.push(y):f.sfcBlocks.customBlocks.push(y),""}};l();var Wu=e=>{let t=e.renderer.render.bind(e.renderer);e.renderer.render=(r,n,o)=>{let i=r.findIndex(s=>s.tag==="h1");return o.title=i>-1?xi(r[i+1],{shouldAllowHtml:!1,shouldEscapeText:!1}):"",t(r,n,o)}};l();var dx=({listTag:e,listClass:t,itemClass:r,linkTag:n,linkClass:o})=>{let i=lt(e),s=t?` class="${lt(t)}"`:"",a="li",f=r?` class="${lt(r)}"`:"",u=lt(n),c=o?` class="${lt(o)}"`:"",d=y=>n==="router-link"?` to="${y}"`:` href="${y}"`,p=y=>`<${i}${s}>${y.map(x=>`<${a}${f}><${u}${c}${d(x.link)}>${x.title}</${u}>${x.children.length>0?p(x.children):""}</${a}>`).join("")}</${i}>`;return p},mx=({pattern:e,containerTag:t,containerClass:r})=>(n,o,i,s)=>{if(n.sCount[o]-n.blkIndent>=4)return!1;let a=n.bMarks[o]+n.tShift[o],f=n.eMarks[o],u=n.src.slice(a,f).split(" ")[0];if(!e.test(u))return!1;if(s)return!0;n.line=o+1;let c=n.push("toc_open",t,1);c.markup="",c.map=[o,n.line],r&&c.attrSet("class",r);let d=n.push("toc_body","",0);d.markup=u,d.map=[o,n.line],d.hidden=!0;let p=n.push("toc_close",t,-1);return p.markup="",d.map=[o,n.line],!0},Gu=(e,{pattern:t=/^\[\[toc\]\]$/i,slugify:r=ct,format:n,level:o=[2,3],shouldAllowNested:i=!1,containerTag:s="nav",containerClass:a="table-of-contents",listTag:f="ul",listClass:u="",itemClass:c="",linkTag:d="a",linkClass:p=""}={})=>{e.block.ruler.before("heading","toc",mx({pattern:t,containerTag:s,containerClass:a}),{alt:["paragraph","reference","blockquote"]});let y=dx({listTag:f,listClass:u,itemClass:c,linkTag:d,linkClass:p});e.renderer.rules.toc_body=x=>y(Qr(x,{level:o,shouldAllowHtml:!0,shouldAllowNested:i,shouldEscapeText:!0,slugify:r,format:n}))};import{cssI18nContainer as Px}from"css-i18n";l();import Ku from"katex";function zu(e,t){let r=e.posMax,n=!0,o=!0,i=t>0?e.src.charCodeAt(t-1):-1,s=t+1<=r?e.src.charCodeAt(t+1):-1;return(i===32||i===9||s>=48&&s<=57)&&(o=!1),(s===32||s===9)&&(n=!1),{can_open:n,can_close:o}}function gx(e,t){let r,n,o,i;if(e.src[e.pos]!=="$")return!1;if(o=zu(e,e.pos),!o.can_open)return t||(e.pending+="$"),e.pos+=1,!0;let s=e.pos+1;for(r=s;(r=e.src.indexOf("$",r))!==-1;){for(i=r-1;e.src[i]==="\\";)i-=1;if((r-i)%2===1)break;r+=1}return r===-1?(t||(e.pending+="$"),e.pos=s,!0):r-s===0?(t||(e.pending+="$$"),e.pos=s+1,!0):(o=zu(e,r),o.can_close?(t||(n=e.push("math_inline","math",0),n.markup="$",n.content=e.src.slice(s,r)),e.pos=r+1,!0):(t||(e.pending+="$"),e.pos=s,!0))}function hx(e,t,r,n){let o,i,s,a,f=!1,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(u+2>c||e.src.slice(u,u+2)!=="$$")return!1;if(u+=2,o=e.src.slice(u,c),n)return!0;for(o.trim().slice(-2)==="$$"&&(o=o.trim().slice(0,-2),f=!0),s=t;!f&&(s++,!(s>=r||(u=e.bMarks[s]+e.tShift[s],c=e.eMarks[s],u<c&&e.tShift[s]<e.blkIndent)));)e.src.slice(u,c).trim().slice(-2)==="$$"&&(a=e.src.slice(0,c).lastIndexOf("$$"),i=e.src.slice(u,a),f=!0);e.line=s+1;let d=e.push("math_block","math",0);return d.block=!0,d.content=(o&&o.trim()?`${o}
|
|
77
|
-
`:"")+e.getLines(t+1,s,e.tShift[t],!0)+(i&&i.trim()?i:""),d.map=[t,e.line],d.markup="$$",!0}function _i(e,t){t=t||{};let r=function(s){t.displayMode=!1;try{return Ku.renderToString(s,t)}catch(a){return t.throwOnError&&console.warn(a),s}},n=function(s,a){return r(s[a].content)},o=function(s){t.displayMode=!0;try{return`<p>${Ku.renderToString(s,t)}</p>`}catch(a){return t.throwOnError&&console.warn(a),s}},i=function(s,a){return`${o(s[a].content)}
|
|
78
|
-
`};e.inline.ruler.after("escape","math_inline",gx),e.block.ruler.after("blockquote","math_block",hx,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=n,e.renderer.rules.math_block=i}l();import bi from"markdown-it-container";l();function Yu(e){return e.trim().replace(/=(\d*)/,"").replace(/:(no-)?line-numbers({| |$|=\d*).*/,"").replace(/(-vue|{| ).*$/,"").replace(/^vue-html$/,"template").replace(/^ansi$/,"")}function Si(e){return e.hasSingleTheme?"":" vp-adaptive-theme"}function Xu(e,t=!1){return t?e.replace(/<!--[^]*?-->/g,"").match(/data-title="(.*?)"/)?.[1]||"":e.match(/\[(.*)\]/)?.[1]||Yu(e)||"txt"}function yx(e,t){let r=t.frontmatter?.codeHeightLimit||e?.siteConfig?.codeHeightLimit;return r===void 0||r<=0?"":`style="max-height: ${r}px;"`}function Qu(e,t){let r=e.renderer.rules.fence;e.renderer.rules.fence=(...n)=>{let[o,i,s,a]=n,f=o[i];f.info=f.info.replace(/\[.*\]/,"");let u=Yu(f.info),c=r(...n);return`
|
|
79
|
-
<div ${yx(t,a)} class="language-${u}${Si(t)}${/ active( |$)/.test(f.info)?" active":""}">
|
|
80
|
-
<button title="Copy Code" class="copy"></button><span class="lang">${u}</span>${c}<button class="collapse"></button>
|
|
81
|
-
</div>`}}function vx(e,{icon:t,color:r,text:n,langs:o}={}){return[bi,e,{render(i,s){let a=i[s],f=a.info.trim().slice(e.length).trim();if(a.nesting===1){if(e==="details")return`<details class="${e} custom-block">${`<summary>${f}</summary>`}
|
|
82
|
-
`;let u="";t&&(u=`<i class="icon ${t}" ${r?`style="color: ${r}"`:""}></i>`);let c=`<span lang="en">${f||n}</span>`;return o&&Object.keys(o).forEach(d=>{c+=`<span lang="${d}">${f||o[d]}</span>`}),`<div class="${e} custom-block"><p class="custom-block-title">${u}${c}</p>
|
|
83
|
-
`}else return e==="details"?`</details>
|
|
84
|
-
`:`</div>
|
|
85
|
-
`}}]}var Ju={tip:{text:"TIP",langs:{"zh-CN":"\u63D0\u793A"}},warning:{text:"WARNING",langs:{"zh-CN":"\u6CE8\u610F"}},danger:{text:"DANGER",langs:{"zh-CN":"\u8B66\u544A"}},info:{text:"INFO",langs:{"zh-CN":"\u4FE1\u606F"}},details:{text:"Details",langs:{"zh-CN":"\u8BE6\u60C5"}}};function Zu(e,t,r={}){Object.keys(Ju).forEach(o=>{let i={...Ju[o],...r[o]||{}};e.use(...vx(o,i))}),e.use(...xx(t)),["zh-CN","en"].forEach(o=>{e.use(bi,o,{render:(i,s)=>i[s].nesting===1?`<div lang="${o}">
|
|
86
|
-
`:`</div>
|
|
87
|
-
`})})}function xx(e){return[bi,"code-group",{render(t,r){if(t[r].nesting===1){let n=yi(5),o="",i='checked="checked"';for(let s=r+1;!(t[s].nesting===-1&&t[s].type==="container_code-group_close");++s){let a=t[s].type==="html_block";if(t[s].type==="fence"&&t[s].tag==="code"||a){let f=Xu(a?t[s].content:t[s].info,a);if(f){let u=yi(7);o+=`<input type="radio" name="group-${n}" id="tab-${u}" ${i}><label for="tab-${u}">${f}</label>`,i&&!a&&(t[s].info+=" active"),i=""}}}return`<div class="vp-code-group${Si(e)}"><div class="tabs">${o}</div><div class="blocks">
|
|
88
|
-
`}return`</div></div>
|
|
89
|
-
`}}]}l();var Ri=/{([\d,-]+)}/;function ef(e){let t=e.renderer.rules.fence;e.renderer.rules.fence=(...r)=>{let[n,o]=r,i=n[o],s=i.attrs&&i.attrs[0],a=null;if(!s){let f=i.info;if(!f||!Ri.test(f))return t(...r);let u=f.replace(Ri,"").trim();i.info=u,a=Ri.exec(f)[1]}return!a&&(a=s[0],!a||!/[\d,-]+/.test(a))?t(...r):(i.info+=` ${a}`,t(...r))}}l();import{URL as _x}from"node:url";var Sx=/(^|.*\/)index.md(#?.*)$/i;function tf(e,t,r){e.renderer.rules.link_open=(i,s,a,f,u)=>{let c=i[s],d=c.attrIndex("href");if(d>=0){let p=c.attrs[d],y=p[1];xt.test(y)?(Object.entries(t).forEach(([S,b])=>{c.attrSet(S,b)}),p[1]=y.replace(uc,"")):!y.startsWith("#")&&!y.startsWith("mailto:")&&!/\.(?!html|md)\w+($|\?)/i.test(y)&&n(p,f),p[1]=p[1].replace(/\bimport\.meta/g,"import%2Emeta").replace(/\bprocess\.env/g,"process%2Eenv")}return u.renderToken(i,s,a)};function n(i,s){let a=i[1],f=a.match(Sx);if(f){let[,u,c]=f;a=u+c}else{let u=a.replace(/[?#].*$/,"");u.endsWith(".md")&&(u=u.replace(/\.md$/,s.cleanUrls==="disabled"?".html":"")),s.cleanUrls==="disabled"&&!u.endsWith(".html")&&!u.endsWith("/")&&(u+=".html");let c=new _x(a,"http://a.com");a=u+c.search+c.hash}!a.startsWith("/")&&!/^\.\//.test(a)&&(a=`./${a}`),o(a.replace(/\.html$/,""),s),a.startsWith("/")&&(a=`${r}${a}`.replace(/\/+/g,"/")),i[1]=decodeURI(a)}function o(i,s){(s.links||(s.links=[])).push(i)}}l();function rf(e,t=!1){let r=e.renderer.rules.fence;e.renderer.rules.fence=(...n)=>{let o=r(...n),[i,s]=n,a=i[s].info;if(!t&&!/:line-numbers($| |=)/.test(a)||t&&/:no-line-numbers($| )/.test(a))return o;let f=1,u=a.match(/=(\d*)/);u&&u[1]&&(f=Number.parseInt(u[1]));let d=o.slice(o.indexOf("<code>"),o.indexOf("</code>")).split(`
|
|
90
|
-
`),y=`<div class="line-numbers-wrapper" aria-hidden="true">${[...Array(d.length)].map((S,b)=>`<span class="line-number">${b+f}</span><br>`).join("")}</div>`;return o.replace(/<\/div>$/,`${y}</div>`).replace(/"(language-[^"]*?)"/,'"$1 line-numbers-mode"')}}l();import nf from"pathe";import wi from"fs-extra";var bx=/^(.+?(?:(?:\.([a-z0-9]+))?))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))? ?(?:\[(.+)\])?$/;function Rx(e){let[t="",r="",n="",o="",i="",s=""]=(bx.exec(e)||[]).slice(1),a=s||t.split("/").pop()||"";return{filepath:t,extension:r,region:n,lines:o,lang:i,title:a}}function wx(e){let t=e.split(`
|
|
91
|
-
`),r=t.reduce((n,o)=>{for(let i=0;i<o.length;i++)if(o[i]!==" "&&o[i]!==" ")return Math.min(i,n);return n},Number.POSITIVE_INFINITY);return r<Number.POSITIVE_INFINITY?t.map(n=>n.slice(r)).join(`
|
|
92
|
-
`):e}function of(e,t,r,n=!1){let[o,i,s]=t.exec(e.trim())||[];return o&&i&&s===r&&i.match(n?/^[Ee]nd ?[rR]egion$/:/^[rR]egion$/)}function Cx(e,t){let r=[/^\/\/ ?#?((?:end)?region) ([\w*-]+)$/,/^\/\* ?#((?:end)?region) ([\w*-]+) ?\*\/$/,/^#pragma ((?:end)?region) ([\w*-]+)$/,/^<!-- #?((?:end)?region) ([\w*-]+) -->$/,/^#((?:End )Region) ([\w*-]+)$/,/^::#((?:end)region) ([\w*-]+)$/,/^# ?((?:end)?region) ([\w*-]+)$/],n=null,o=-1;for(let[i,s]of e.entries())if(n===null){for(let a of r)if(of(s,a,t)){o=i+1,n=a;break}}else if(of(s,n,t,!0))return{start:o,end:i,regexp:n};return null}function sf(e,t){let r=(o,i,s,a)=>{let u=o.bMarks[i]+o.tShift[i],c=o.eMarks[i];if(o.sCount[i]-o.blkIndent>=4)return!1;for(let A=0;A<3;++A)if(o.src.charCodeAt(u+A)!==60||u+A>=c)return!1;if(a)return!0;let d=u+3,p=o.skipSpacesBack(c,u),y=o.src.slice(d,p).trim().replace(/^@/,t).trim(),{filepath:x,extension:S,region:b,lines:E,lang:O,title:M}=Rx(y);o.line=i+1;let V=o.push("fence","code",0);V.info=`${O||S}${E?`{${E}}`:""}${M?`[${M}]`:""}`;let{realPath:P,path:N}=o.env,C=nf.resolve(nf.dirname(P??N),x);return V.src=[C,b.slice(1)],V.markup="```",V.map=[i,i+1],!0},n=e.renderer.rules.fence;e.renderer.rules.fence=(...o)=>{let[i,s,,{includes:a}]=o,f=i[s],[u,c]=f.src??[];if(!u)return n(...o);a&&a.push(u);let d=wi.statSync(u).isFile();if(!wi.existsSync(u)||!d)return f.content=d?`Code snippet path not found: ${u}`:"Invalid code snippet option",f.info="",n(...o);let p=wi.readFileSync(u,"utf8");if(c){let y=p.split(/\r?\n/),x=Cx(y,c);x&&(p=wx(y.slice(x.start,x.end).filter(S=>!x.regexp.test(S.trim())).join(`
|
|
93
|
-
`)))}return f.content=p,n(...o)},e.block.ruler.before("fence","snippet",r)}var Jr={light:"github-light",dark:"github-dark"};async function Ci(e,t,r="/"){let n=t?.config.markdown||{},o=n.theme??Jr,i=typeof o=="string"||"name"in o,s=t?.config.siteConfig||{};n.preConfig&&n.preConfig(e),e.use(ef).use(Qu,{theme:o,siteConfig:s}).use(sf,t?.userRoot).use(Zu,{hasSingleTheme:i},{...n.blocks,...n?.container}).use(Px,{languages:t?.config.siteConfig.languages}).use(tf,{target:"_blank",rel:"noreferrer",...n.externalLinks},r),e.use(rf,n.lineNumbers),n.attrs?.disable||e.use(Ex,n.attrs),e.use(kx),e.use(af,{slugify:ct,permalink:af.permalink.linkInsideHeader({symbol:"​",renderAttrs:(f,u)=>{let c=u.tokens.findIndex(p=>{let x=p.attrs?.find(S=>S[0]==="id");return x&&f===x[1]});return{"aria-label":`Permalink to "${u.tokens[c+1].content}"`}}}),...n.anchor}),e.use(ju,{slugify:ct,...typeof n.headers=="boolean"?void 0:n.headers}).use(Uu,{...n.sfc}).use(Wu).use(Gu,{...n.toc}),e.use(_i,n.katex);let a=t?.config.siteConfig.vanillaLazyload||{enable:!1};return e.use(Hu,{figcaption:!0,lazy:!0,async:!0,...a.enable?{lazy:!0,async:!0,classes:"lazy"}:{},...n.imageFigures}),e.use(Ax),n.config&&n.config(e),e}l();l();import Ox from"unplugin-vue-markdown/vite";l();import*as lf from"js-base64";function cf(e){return e=e.replace(/^````txt\n```mermaid/mg,"````txt\n\\`\\`\\`mermaid"),e=e.replace(/^```mermaid\s*?({.*?})?\n([\s\S]+?)\n```/mg,(t,r="",n="")=>(n=n.trim(),r=r.trim()||"{}",`<ValaxyMermaid :code="'${lf.encode(n,!0)}'" v-bind="${r}" />`)),e=e.replace(/^````txt\n\\`\\`\\`mermaid/mg,"````txt\n```mermaid"),e}async function uf(e){let t=e?.config.markdown||{},r=t.theme??Jr;return Ox({include:[/\.md$/],wrapperClasses:"",frontmatter:!0,exportFrontmatter:!1,escapeCodeTagInterpolation:!0,markdownItOptions:{quotes:`""''`,html:!0,xhtmlOut:!0,linkify:!0,highlight:await vi(r,t),...t?.markdownItOptions},async markdownItSetup(n){n.linkify.set({fuzzyLink:!1}),await Ci(n,e),e?.config.markdown?.markdownItSetup?.(n);function o(i){i.core.ruler.push("valaxy_md_env",s=>{e.env=s.env})}n.use(o)},transforms:{before(n,o){return n=cf(n),n}},...t})}async function Xt(e,t={}){let{roots:r,config:n}=e,o=await uf(e),i=await Eu(e,t);return[o,ou(e),iu(e),$x({include:[/\.vue$/,/\.md$/],exclude:[],template:{compilerOptions:{isCustomElement:s=>{let a=fc.has(s);return n.vue?.isCustomElement?.forEach(f=>{a=a||f(s)}),a}}},...n.vue}),i,Lx(),uu(e),Ix({layoutsDirs:r.map(s=>`${s}/layouts`),...n.layouts}),Mx({extensions:["vue","md"],include:[/\.vue$/,/\.vue\?vue/,/\.md$/],exclude:[],allowOverrides:!0,dirs:r.map(s=>`${s}/components`).concat(["src/components","components"]),dts:Dx(e.tempDir,"components.d.ts"),...n.components}),await eu(e),Nx({runtimeOnly:!0,compositionOnly:!0,include:r.map(s=>`${s}/locales/**`)}),Tx(),su(e)]}async function mf(e,t={}){let r=df(t,{plugins:await Xt(e)});await Fx(r)}async function gf(e,t={}){let r={plugins:await Xt(e),ssr:{noExternal:["workbox-window",/vue-i18n/,"@vue/devtools-api"]}};r.ssgOptions={script:"async",formatting:"minify",crittersOptions:{reduceInlineStyles:!1},onFinished(){Hx({hostname:e.config.siteConfig.url})}};let n=df(r,t);await Vx({},n)}async function hf(e){let{userRoot:t}=e,r=pf(t,"dist/index.html");if(Zr.existsSync(r)){Ei.info("post process for ssg...");let n=await Zr.readFile(r,"utf-8"),o="</html>";if(!n.endsWith(o)){Ei.warn("fix incomplete index.html...");let i=n.lastIndexOf(o);await Zr.writeFile(r,n.slice(0,i+o.length),"utf-8")}}e.config.siteConfig.redirects?.useVueRouter||await jx(e)}async function jx(e){Ei.info("generate client redirects...");let t=pf(e.userRoot,"dist"),n=jr(e.redirects).map(async o=>{let i=ff(t,`${o.from}.html`),s=ff(t,`${o.to}.html`);if(!await Zr.pathExists(s))throw new Error(`the route of '${o.to}' not exists`);await Tc(o.to,i)});await Promise.all(n)}l();l();l();l();import yf from"node:process";import{createServer as qx,mergeConfig as Bx}from"vite";async function vf(e,t={},r={}){yf.env.EDITOR=yf.env.EDITOR||"code";let n=await Xt(e,r),o=e.mode==="dev"&&e.config.devtools,i=[...n];o&&i.push((await import("vite-plugin-vue-devtools")).default(),(await import("@valaxyjs/devtools")).default());let s=Bx(t,{plugins:i});return await qx(s)}l();l();import{createHooks as Ux}from"hookable";var Wx=["build:before","build:after"];function en(e){let t=Ux();typeof e.config.hooks=="object"&&Object.keys(e.config.hooks).forEach(n=>{let o=n,i=e.config.hooks[o];typeof i=="function"&&(Wx.includes(o)?e.mode==="build"&&t.hook(o,i):t.hook(o,i))});let r={version:ft,hooks:t,hook:t.hook,options:e};return e.addons.forEach(n=>{typeof n.setup=="function"&&n.setup(r)}),r}l();var U=oe(me(),1);import*as xf from"node:readline";import Gx from"node:path";import Kx from"node:os";import Je from"node:process";import zx from"consola";import{mergeConfig as Yx}from"vite";var tn;function rn(e,t,r){if(console.log(),console.log(` ${(0,U.bold)("\u{1F30C} Valaxy")} ${(0,U.blue)(`v${ft}`)}`),console.log(),console.log(`${(0,U.dim)(" \u{1FA90} theme ")} > ${e.theme?(0,U.green)(e.theme):(0,U.gray)("none")}`),console.log(` ${(0,U.dim)("\u{1F4C1}")} ${(0,U.dim)(Gx.resolve(e.userRoot))}`),t){console.log(),console.log(`${(0,U.dim)(" Preview ")} > ${(0,U.cyan)(`http://localhost:${(0,U.bold)(t)}/`)}`),r&&Object.values(Kx.networkInterfaces()).forEach(f=>(f||[]).filter(u=>u.family==="IPv4"&&!u.address.includes("127.0.0.1")).forEach(({address:u})=>{console.log(`${(0,U.dim)(" Network ")} > ${(0,U.blue)(`http://${u}:${(0,U.bold)(t)}/`)}`)})),console.log();let n=`${(0,U.underline)("r")}${(0,U.dim)("estart")}`,o=`${(0,U.underline)("e")}${(0,U.dim)("dit")}`,i=`${(0,U.underline)("o")}${(0,U.dim)("pen")}`,s=`${(0,U.underline)("q")}${(0,U.dim)("r")}`,a=`${(0,U.dim)(" | ")}`;console.log(`${(0,U.dim)(" shortcuts ")} > ${n}${a}${i}${a}${s}${a}${o}`)}console.log()}async function Qt(e,t){tn&&(wt.info("close server..."),await tn.close());let r=Yx(await Kr(e,"serve"),t);try{tn=await vf(e,r,{async onConfigReload(n,o,i=!1){i&&(wt.info(`${(0,U.yellow)("force")} reload the server`),Qt(e,t));let s=!1;n.theme!==o.theme&&(s=!0),s&&Qt(e,t)}}),await tn.listen(),wt.ready("server ready")}catch(n){zx.error(`failed to start server. error:
|
|
94
|
-
`),console.error(n),Je.exit(1)}}function _f(e){Je.stdin.resume(),Je.stdin.setEncoding("utf8"),xf.emitKeypressEvents(Je.stdin),Je.stdin.isTTY&&Je.stdin.setRawMode(!0),Je.stdin.on("keypress",(t,r)=>{if(r.ctrl&&r.name==="c")Je.exit();else{let[n]=e.filter(o=>o.name===t);if(n)try{n.action()}catch(o){console.error(`Failed to execute shortcut ${n.fullName}`,o)}}})}function bf(e){e.command("build [root]","build your blog to static content",t=>Ke(t).option("ssg",{alias:"s",type:"boolean",default:!1,describe:"static site generate"}).option("output",{alias:"o",type:"string",default:"dist",describe:"output dir"}).option("log",{default:"warn",type:"string",choices:["error","warn","info","silent"],describe:"log level"}).strict().help(),async({ssg:t,root:r,output:n,log:o})=>{Rt(),Lr(r)||Xx.exit(0);let i=ki.resolve(r),s=await be({userRoot:i},"build");rn(s);let a=en(s);Ze.start(`Run ${(0,Pt.yellow)("options:resolved")} hooks`),await a.hooks.callHook("options:resolved");let f=[];s.config.siteConfig.search.type==="fuse"&&f.push(Ur),s.config.modules.rss.enable&&f.push(Br),jc(a,f);let u=Sf(await Kr(s,"build"),s.config.vite||{}),c=Sf(u,{configFile:ki.resolve(s.clientRoot,"vite.config.ts"),build:{emptyOutDir:!0,outDir:ki.resolve(s.userRoot,n)},logLevel:o});Ze.start(`Run ${(0,Pt.yellow)("config:init")} hooks`),await a.hooks.callHook("config:init"),Ze.start(`Run ${(0,Pt.yellow)("build:before")} hooks`),await a.hooks.callHook("build:before"),Ze.box("\u{1F320} Start building...");try{if(t){Ze.info(`use ${(0,Pt.yellow)("vite-ssg")} to do ssg build...`);try{await gf(s,c),await hf(s)}catch(d){Ze.error("[vite-ssg] An internal error occurred."),console.log(d)}}else Ze.info("use vite do spa build..."),await mf(s,c)}catch(d){console.log(d)}finally{Ze.start(`Run ${(0,Pt.yellow)("build:after")} hooks`),await a.hooks.callHook("build:after")}})}l();import Zx from"node:path";import{exec as e_}from"node:child_process";import t_ from"node:process";import r_ from"node:os";import{mergeConfig as n_}from"vite";import o_ from"qrcode";l();import Qx from"node:net";async function Ai(e){return await Jx(e)?e:await Ai(e+1)}function Jx(e){return new Promise(t=>{let r=Qx.createServer(n=>{n.write(`Echo server\r
|
|
95
|
-
`),n.pipe(n)});r.listen(e,"0.0.0.0"),r.on("error",()=>{t(!1)}),r.on("listening",()=>{r.close(),t(!0)})})}function Rf(e){e.command("* [root]","Start a local server for Valaxy",t=>Ke(t).option("port",{alias:"p",type:"number",describe:"port"}).option("open",{alias:"o",default:!1,type:"boolean",describe:"open in browser"}).option("remote",{default:!0,type:"boolean",describe:"listen public host and enable remote control"}).option("log",{default:"info",type:"string",choices:["error","warn","info","silent"],describe:"log level"}).strict().help(),async({root:t,port:r,open:n,remote:o,log:i})=>{ti(),Lr(t)||t_.exit(0);let s=r||await Ai(4859),a=await be({userRoot:t});en(a);let f=n_({configFile:Zx.resolve(a.clientRoot,"vite.config.ts"),server:{watch:{ignored:[`!${a.themeRoot}/**`,`${a.userRoot}/**.md`]},port:s,strictPort:!0,open:n,host:o?"0.0.0.0":"localhost"},logLevel:i},a.config.vite||{});await Qt(a,f),rn(a,s,o),_f([{name:"r",fullName:"restart",action(){Qt(a,f)}},{name:"o",fullName:"open",async action(){let{default:c}=await import("open");c(`http://localhost:${s}`)}},{name:"q",fullName:"qr",action(){let d=`http://${Object.values(r_.networkInterfaces()).flat().filter(p=>p?.family==="IPv4"&&!p.address.includes("127.0.0.1"))[0]?.address||"localhost"}:${s}`;o_.toString(d,{type:"terminal"},(p,y)=>{if(p)throw p;console.log(y)})}},{name:"e",fullName:"edit",action(){e_(`code "${t}"`)}}])})}var Jt=s_(a_(i_.argv)).scriptName("valaxy").usage("$0 [args]").version(ft).showHelpOnFail(!1).alias("h","help").alias("v","version");Rf(Jt);bf(Jt);Xc(Jt);var l_=[Ur,Br];l_.forEach(e=>{e.extendCli?.(Jt)});function GO(){Jt.help().parse()}export{Nt as a,Te as b,Ir as c,xt as d,uc as e,Ub as f,fc as g,pc as h,$h as i,ei as j,Q as k,dc as l,mc as m,Fh as n,_t as o,Mr as p,mR as q,Hh as r,Nr as s,yc as t,Wh as u,CR as v,qt as w,st as x,vc as y,zh as z,TR as A,xc as B,Dr as C,bc as D,Zh as E,KR as F,XR as G,ni as H,be as I,oi as J,Kr as K,tu as L,Eu as M,Xt as N,mf as O,gf as P,hf as Q,jx as R,vf as S,Jt as T,GO as U};
|
|
96
|
-
/*! Bundled license information:
|
|
97
|
-
|
|
98
|
-
is-extglob/index.js:
|
|
99
|
-
(*!
|
|
100
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
101
|
-
*
|
|
102
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
103
|
-
* Licensed under the MIT License.
|
|
104
|
-
*)
|
|
105
|
-
|
|
106
|
-
is-glob/index.js:
|
|
107
|
-
(*!
|
|
108
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
109
|
-
*
|
|
110
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
111
|
-
* Released under the MIT License.
|
|
112
|
-
*)
|
|
113
|
-
|
|
114
|
-
is-number/index.js:
|
|
115
|
-
(*!
|
|
116
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
117
|
-
*
|
|
118
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
119
|
-
* Released under the MIT License.
|
|
120
|
-
*)
|
|
121
|
-
|
|
122
|
-
to-regex-range/index.js:
|
|
123
|
-
(*!
|
|
124
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
125
|
-
*
|
|
126
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
127
|
-
* Released under the MIT License.
|
|
128
|
-
*)
|
|
129
|
-
|
|
130
|
-
fill-range/index.js:
|
|
131
|
-
(*!
|
|
132
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
133
|
-
*
|
|
134
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
135
|
-
* Licensed under the MIT License.
|
|
136
|
-
*)
|
|
137
|
-
|
|
138
|
-
queue-microtask/index.js:
|
|
139
|
-
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
140
|
-
|
|
141
|
-
run-parallel/index.js:
|
|
142
|
-
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
143
|
-
|
|
144
|
-
@mdit-vue/shared/dist/index.mjs:
|
|
145
|
-
(* istanbul ignore if -- @preserve *)
|
|
146
|
-
|
|
147
|
-
@mdit-vue/plugin-sfc/dist/index.mjs:
|
|
148
|
-
(* istanbul ignore if -- @preserve *)
|
|
149
|
-
*/
|