valaxy 0.15.12 → 0.15.14
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/components/ValaxyMd.vue +2 -1
- package/client/composables/features/collapse-code.ts +42 -0
- package/client/composables/features/index.ts +1 -0
- package/client/composables/widgets/aplayer.ts +1 -0
- package/client/styles/common/code.scss +30 -0
- package/client/styles/css-vars.scss +1 -0
- package/dist/chunk-G2HMAIG3.mjs +135 -0
- package/dist/chunk-Q624MH4A.cjs +134 -0
- package/dist/{config-0d4945ff.d.ts → config-a1820a44.d.ts} +16 -0
- 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 +2 -1
- package/dist/node/index.d.ts +2 -1
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.ts +3 -2
- package/package.json +25 -26
- package/types/config.ts +6 -0
- package/types/posts.ts +14 -0
- package/dist/chunk-HAVGXIHI.mjs +0 -130
- package/dist/chunk-HZFTOKBG.cjs +0 -129
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
|
|
2
|
+
import{a as U,b,c as Me,d as g,e as c}from"./chunk-GY4S4RDR.mjs";var Oi=b(ft=>{"use strict";c();Object.defineProperty(ft,"__esModule",{value:!0});ft.splitWhen=ft.flatten=void 0;function Lf(e){return e.reduce((t,r)=>[].concat(t,r),[])}ft.flatten=Lf;function Mf(e,t){let r=[[]],n=0;for(let o of e)t(o)?(n++,r[n]=[]):r[n].push(o);return r}ft.splitWhen=Mf});var Ti=b(Zt=>{"use strict";c();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.isEnoentCodeError=void 0;function Nf(e){return e.code==="ENOENT"}Zt.isEnoentCodeError=Nf});var $i=b(Jt=>{"use strict";c();Object.defineProperty(Jt,"__esModule",{value:!0});Jt.createDirentFromStats=void 0;var nn=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 Df(e,t){return new nn(e,t)}Jt.createDirentFromStats=Df});var Mi=b(te=>{"use strict";c();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 Vf=U("os"),Hf=U("path"),Fi=Vf.platform()==="win32",jf=2,qf=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Bf=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Uf=/^\\\\([.?])/,Gf=/\\(?![!()+@[\]{}])/g;function Wf(e){return e.replace(/\\/g,"/")}te.unixify=Wf;function zf(e,t){return Hf.resolve(e,t)}te.makeAbsolute=zf;function Kf(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(jf)}return e}te.removeLeadingDotSegment=Kf;te.escape=Fi?on:sn;function on(e){return e.replace(Bf,"\\$2")}te.escapeWindowsPath=on;function sn(e){return e.replace(qf,"\\$2")}te.escapePosixPath=sn;te.convertPathToPattern=Fi?Ii:Li;function Ii(e){return on(e).replace(Uf,"//$1").replace(Gf,"/")}te.convertWindowsPathToPattern=Ii;function Li(e){return sn(e)}te.convertPosixPathToPattern=Li});var Di=b(($x,Ni)=>{"use strict";c();Ni.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 ji=b((Ix,Hi)=>{"use strict";c();var Yf=Di(),Vi={"{":"}","(":")","[":"]"},Xf=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 u=Vi[a];if(u){var f=e.indexOf(u,t);f!==-1&&(t=f+1)}if(e[t]==="!")return!0}else t++}return!1},Qf=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=Vi[r];if(n){var o=e.indexOf(n,t);o!==-1&&(t=o+1)}if(e[t]==="!")return!0}else t++}return!1};Hi.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(Yf(t))return!0;var n=Xf;return r&&r.strict===!1&&(n=Qf),n(t)}});var Bi=b((Mx,qi)=>{"use strict";c();var Zf=ji(),Jf=U("path").posix.dirname,ep=U("os").platform()==="win32",an="/",tp=/\\/g,rp=/[\{\[].*[\}\]]$/,np=/(^|[^\\])([\{\[]|\([^\)]+$)/,op=/\\([\!\*\?\|\[\]\(\)\{\}])/g;qi.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&ep&&t.indexOf(an)<0&&(t=t.replace(tp,an)),rp.test(t)&&(t+=an),t+="a";do t=Jf(t);while(Zf(t)||np.test(t));return t.replace(op,"$1")}});var er=b(xe=>{"use strict";c();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 tr=b((Hx,Gi)=>{"use strict";c();var Ui=er();Gi.exports=(e,t={})=>{let r=(n,o={})=>{let i=t.escapeInvalid&&Ui.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(i||s)&&Ui.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var zi=b((qx,Wi)=>{"use strict";c();Wi.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var rs=b((Ux,ts)=>{"use strict";c();var Ki=zi(),Je=(e,t,r)=>{if(Ki(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(Ki(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),u=e+":"+t+"="+o+i+s+a;if(Je.cache.hasOwnProperty(u))return Je.cache[u].result;let f=Math.min(e,t),l=Math.max(e,t);if(Math.abs(f-l)===1){let x=e+"|"+t;return n.capture?`(${x})`:n.wrap===!1?x:`(?:${x})`}let p=es(e)||es(t),d={min:e,max:t,a:f,b:l},C=[],v=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),f<0){let x=l<0?Math.abs(l):1;v=Yi(x,Math.abs(f),d,n),f=d.a=0}return l>=0&&(C=Yi(f,l,d,n)),d.negatives=v,d.positives=C,d.result=ip(v,C,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&C.length+v.length>1&&(d.result=`(?:${d.result})`),Je.cache[u]=d,d.result};function ip(e,t,r){let n=cn(e,t,"-",!1,r)||[],o=cn(t,e,"",!1,r)||[],i=cn(e,t,"-?",!0,r)||[];return n.concat(i).concat(o).join("|")}function sp(e,t){let r=1,n=1,o=Qi(e,r),i=new Set([t]);for(;e<=o&&o<=t;)i.add(o),r+=1,o=Qi(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(lp),i}function ap(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=cp(e,t),o=n.length,i="",s=0;for(let a=0;a<o;a++){let[u,f]=n[a];u===f?i+=u:u!=="0"||f!=="9"?i+=up(u,f,r):s++}return s&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function Yi(e,t,r,n){let o=sp(e,t),i=[],s=e,a;for(let u=0;u<o.length;u++){let f=o[u],l=ap(String(s),String(f),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+Ji(a.count),s=f+1;continue}r.isPadded&&(p=fp(f,r,n)),l.string=p+l.pattern+Ji(l.count),i.push(l),s=f+1,a=l}return i}function cn(e,t,r,n,o){let i=[];for(let s of e){let{string:a}=s;!n&&!Xi(t,"string",a)&&i.push(r+a),n&&Xi(t,"string",a)&&i.push(r+a)}return i}function cp(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function lp(e,t){return e>t?1:t>e?-1:0}function Xi(e,t,r){return e.some(n=>n[t]===r)}function Qi(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Zi(e,t){return e-e%Math.pow(10,t)}function Ji(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function up(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function es(e){return/^-?(0+)\d/.test(e)}function fp(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}}`}}Je.cache={};Je.clearCache=()=>Je.cache={};ts.exports=Je});var fn=b((Wx,us)=>{"use strict";c();var pp=U("util"),is=rs(),ns=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),dp=e=>t=>e===!0?Number(t):String(t),ln=e=>typeof e=="number"||typeof e=="string"&&e!=="",kt=e=>Number.isInteger(+e),un=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},mp=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,gp=(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},os=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},hp=(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},ss=(e,t,r,n)=>{if(r)return is(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let i=String.fromCharCode(t);return`[${o}-${i}]`},as=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return is(e,t,r)},cs=(...e)=>new RangeError("Invalid range arguments: "+pp.inspect(...e)),ls=(e,t,r)=>{if(r.strictRanges===!0)throw cs([e,t]);return[]},yp=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},vp=(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),u=String(t),f=String(r);r=Math.max(Math.abs(r),1);let l=un(a)||un(u)||un(f),p=l?Math.max(a.length,u.length,f.length):0,d=l===!1&&mp(e,t,n)===!1,C=n.transform||dp(d);if(n.toRegex&&r===1)return ss(os(e,p),os(t,p),!0,n);let v={negatives:[],positives:[]},x=I=>v[I<0?"negatives":"positives"].push(Math.abs(I)),R=[],S=0;for(;s?o>=i:o<=i;)n.toRegex===!0&&r>1?x(o):R.push(gp(C(o,S),p,d)),o=s?o-r:o+r,S++;return n.toRegex===!0?r>1?hp(v,n):as(R,null,{wrap:!1,...n}):R},_p=(e,t,r=1,n={})=>{if(!kt(e)&&e.length>1||!kt(t)&&t.length>1)return ls(e,t,n);let o=n.transform||(d=>String.fromCharCode(d)),i=`${e}`.charCodeAt(0),s=`${t}`.charCodeAt(0),a=i>s,u=Math.min(i,s),f=Math.max(i,s);if(n.toRegex&&r===1)return ss(u,f,!1,n);let l=[],p=0;for(;a?i>=s:i<=s;)l.push(o(i,p)),i=a?i-r:i+r,p++;return n.toRegex===!0?as(l,null,{wrap:!1,options:n}):l},rr=(e,t,r,n={})=>{if(t==null&&ln(e))return[e];if(!ln(e)||!ln(t))return ls(e,t,n);if(typeof r=="function")return rr(e,t,1,{transform:r});if(ns(r))return rr(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,kt(r)?kt(e)&&kt(t)?vp(e,t,r,o):_p(e,t,Math.max(Math.abs(r),1),o):r!=null&&!ns(r)?yp(r,o):rr(e,t,1,r)};us.exports=rr});var ds=b((Kx,ps)=>{"use strict";c();var xp=fn(),fs=er(),Cp=(e,t={})=>{let r=(n,o={})=>{let i=fs.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a=i===!0||s===!0,u=t.escapeInvalid===!0?"\\":"",f="";if(n.isOpen===!0||n.isClose===!0)return u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+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 l=fs.reduce(n.nodes),p=xp(...l,{...t,wrap:!1,toRegex:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)f+=r(l,n);return f};return r(e)};ps.exports=Cp});var hs=b((Xx,gs)=>{"use strict";c();var bp=fn(),ms=tr(),pt=er(),et=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?pt.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let i of o)n.push(et(i,t,r));else for(let i of t)r===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?et(o,i,r):o+i);return pt.flatten(n)},Sp=(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(et(a.pop(),ms(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(et(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let p=pt.reduce(o.nodes);if(pt.exceedsLimit(...p,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=bp(...p,t);d.length===0&&(d=ms(o,t)),a.push(et(a.pop(),d)),o.nodes=[];return}let u=pt.encloseBrace(o),f=o.queue,l=o;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,f=l.queue;for(let p=0;p<o.nodes.length;p++){let d=o.nodes[p];if(d.type==="comma"&&o.type==="brace"){p===1&&f.push(""),f.push("");continue}if(d.type==="close"){a.push(et(a.pop(),f,u));continue}if(d.value&&d.type!=="open"){f.push(et(f.pop(),d.value));continue}d.nodes&&n(d,o)}return f};return pt.flatten(n(e))};gs.exports=Sp});var vs=b((Zx,ys)=>{"use strict";c();ys.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 Ss=b((eC,bs)=>{"use strict";c();var Rp=tr(),{MAX_LENGTH:_s,CHAR_BACKSLASH:pn,CHAR_BACKTICK:wp,CHAR_COMMA:Ep,CHAR_DOT:Ap,CHAR_LEFT_PARENTHESES:kp,CHAR_RIGHT_PARENTHESES:Pp,CHAR_LEFT_CURLY_BRACE:Op,CHAR_RIGHT_CURLY_BRACE:Tp,CHAR_LEFT_SQUARE_BRACKET:xs,CHAR_RIGHT_SQUARE_BRACKET:Cs,CHAR_DOUBLE_QUOTE:$p,CHAR_SINGLE_QUOTE:Fp,CHAR_NO_BREAK_SPACE:Ip,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Lp}=vs(),Mp=(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,u=0,f=e.length,l=0,p=0,d,C={},v=()=>e[l++],x=R=>{if(R.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&R.type==="text"){a.value+=R.value;return}return s.nodes.push(R),R.parent=s,R.prev=a,a=R,R};for(x({type:"bos"});l<f;)if(s=i[i.length-1],d=v(),!(d===Lp||d===Ip)){if(d===pn){x({type:"text",value:(t.keepEscaping?d:"")+v()});continue}if(d===Cs){x({type:"text",value:"\\"+d});continue}if(d===xs){u++;let R=!0,S;for(;l<f&&(S=v());){if(d+=S,S===xs){u++;continue}if(S===pn){d+=v();continue}if(S===Cs&&(u--,u===0))break}x({type:"text",value:d});continue}if(d===kp){s=x({type:"paren",nodes:[]}),i.push(s),x({type:"text",value:d});continue}if(d===Pp){if(s.type!=="paren"){x({type:"text",value:d});continue}s=i.pop(),x({type:"text",value:d}),s=i[i.length-1];continue}if(d===$p||d===Fp||d===wp){let R=d,S;for(t.keepQuotes!==!0&&(d="");l<f&&(S=v());){if(S===pn){d+=S+v();continue}if(S===R){t.keepQuotes===!0&&(d+=S);break}d+=S}x({type:"text",value:d});continue}if(d===Op){p++;let S={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||s.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};s=x(S),i.push(s),x({type:"open",value:d});continue}if(d===Tp){if(s.type!=="brace"){x({type:"text",value:d});continue}let R="close";s=i.pop(),s.close=!0,x({type:R,value:d}),p--,s=i[i.length-1];continue}if(d===Ep&&p>0){if(s.ranges>0){s.ranges=0;let R=s.nodes.shift();s.nodes=[R,{type:"text",value:Rp(s)}]}x({type:"comma",value:d}),s.commas++;continue}if(d===Ap&&p>0&&s.commas===0){let R=s.nodes;if(p===0||R.length===0){x({type:"text",value:d});continue}if(a.type==="dot"){if(s.range=[],a.value+=d,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"){R.pop();let S=R[R.length-1];S.value+=a.value+d,a=S,s.ranges--;continue}x({type:"dot",value:d});continue}x({type:"text",value:d})}do if(s=i.pop(),s.type!=="root"){s.nodes.forEach(I=>{I.nodes||(I.type==="open"&&(I.isOpen=!0),I.type==="close"&&(I.isClose=!0),I.nodes||(I.type="text"),I.invalid=!0)});let R=i[i.length-1],S=R.nodes.indexOf(s);R.nodes.splice(S,1,...s.nodes)}while(i.length>0);return x({type:"eos"}),o};bs.exports=Mp});var Es=b((rC,ws)=>{"use strict";c();var Rs=tr(),Np=ds(),Dp=hs(),Vp=Ss(),he=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=he.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(he.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};he.parse=(e,t={})=>Vp(e,t);he.stringify=(e,t={})=>Rs(typeof e=="string"?he.parse(e,t):e,t);he.compile=(e,t={})=>(typeof e=="string"&&(e=he.parse(e,t)),Np(e,t));he.expand=(e,t={})=>{typeof e=="string"&&(e=he.parse(e,t));let r=Dp(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};he.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?he.compile(e,t):he.expand(e,t);ws.exports=he});var Pt=b((oC,Ts)=>{"use strict";c();var Hp=U("path"),Ae="\\\\/",As=`[^${Ae}]`,Ne="\\.",jp="\\+",qp="\\?",nr="\\/",Bp="(?=.)",ks="[^/]",dn=`(?:${nr}|$)`,Ps=`(?:^|${nr})`,mn=`${Ne}{1,2}${dn}`,Up=`(?!${Ne})`,Gp=`(?!${Ps}${mn})`,Wp=`(?!${Ne}{0,1}${dn})`,zp=`(?!${mn})`,Kp=`[^.${nr}]`,Yp=`${ks}*?`,Os={DOT_LITERAL:Ne,PLUS_LITERAL:jp,QMARK_LITERAL:qp,SLASH_LITERAL:nr,ONE_CHAR:Bp,QMARK:ks,END_ANCHOR:dn,DOTS_SLASH:mn,NO_DOT:Up,NO_DOTS:Gp,NO_DOT_SLASH:Wp,NO_DOTS_SLASH:zp,QMARK_NO_DOT:Kp,STAR:Yp,START_ANCHOR:Ps},Xp={...Os,SLASH_LITERAL:`[${Ae}]`,QMARK:As,STAR:`${As}*?`,DOTS_SLASH:`${Ne}{1,2}(?:[${Ae}]|$)`,NO_DOT:`(?!${Ne})`,NO_DOTS:`(?!(?:^|[${Ae}])${Ne}{1,2}(?:[${Ae}]|$))`,NO_DOT_SLASH:`(?!${Ne}{0,1}(?:[${Ae}]|$))`,NO_DOTS_SLASH:`(?!${Ne}{1,2}(?:[${Ae}]|$))`,QMARK_NO_DOT:`[^.${Ae}]`,START_ANCHOR:`(?:^|[${Ae}])`,END_ANCHOR:`(?:[${Ae}]|$)`},Qp={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"};Ts.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Qp,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:Hp.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?Xp:Os}}});var Ot=b(ge=>{"use strict";c();var Zp=U("path"),Jp=process.platform==="win32",{REGEX_BACKSLASH:ed,REGEX_REMOVE_BACKSLASH:td,REGEX_SPECIAL_CHARS:rd,REGEX_SPECIAL_CHARS_GLOBAL:nd}=Pt();ge.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);ge.hasRegexChars=e=>rd.test(e);ge.isRegexChar=e=>e.length===1&&ge.hasRegexChars(e);ge.escapeRegex=e=>e.replace(nd,"\\$1");ge.toPosixSlashes=e=>e.replace(ed,"/");ge.removeBackslashes=e=>e.replace(td,t=>t==="\\"?"":t);ge.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};ge.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:Jp===!0||Zp.sep==="\\";ge.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?ge.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};ge.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};ge.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",i=`${n}(?:${e})${o}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var Vs=b((cC,Ds)=>{"use strict";c();var $s=Ot(),{CHAR_ASTERISK:gn,CHAR_AT:od,CHAR_BACKWARD_SLASH:Tt,CHAR_COMMA:id,CHAR_DOT:hn,CHAR_EXCLAMATION_MARK:yn,CHAR_FORWARD_SLASH:Ns,CHAR_LEFT_CURLY_BRACE:vn,CHAR_LEFT_PARENTHESES:_n,CHAR_LEFT_SQUARE_BRACKET:sd,CHAR_PLUS:ad,CHAR_QUESTION_MARK:Fs,CHAR_RIGHT_CURLY_BRACE:cd,CHAR_RIGHT_PARENTHESES:Is,CHAR_RIGHT_SQUARE_BRACKET:ld}=Pt(),Ls=e=>e===Ns||e===Tt,Ms=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},ud=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,i=[],s=[],a=[],u=e,f=-1,l=0,p=0,d=!1,C=!1,v=!1,x=!1,R=!1,S=!1,I=!1,L=!1,G=!1,O=!1,D=0,A,w,T={value:"",depth:0,isGlob:!1},z=()=>f>=n,m=()=>u.charCodeAt(f+1),k=()=>(A=w,u.charCodeAt(++f));for(;f<n;){w=k();let q;if(w===Tt){I=T.backslashes=!0,w=k(),w===vn&&(S=!0);continue}if(S===!0||w===vn){for(D++;z()!==!0&&(w=k());){if(w===Tt){I=T.backslashes=!0,k();continue}if(w===vn){D++;continue}if(S!==!0&&w===hn&&(w=k())===hn){if(d=T.isBrace=!0,v=T.isGlob=!0,O=!0,o===!0)continue;break}if(S!==!0&&w===id){if(d=T.isBrace=!0,v=T.isGlob=!0,O=!0,o===!0)continue;break}if(w===cd&&(D--,D===0)){S=!1,d=T.isBrace=!0,O=!0;break}}if(o===!0)continue;break}if(w===Ns){if(i.push(f),s.push(T),T={value:"",depth:0,isGlob:!1},O===!0)continue;if(A===hn&&f===l+1){l+=2;continue}p=f+1;continue}if(r.noext!==!0&&(w===ad||w===od||w===gn||w===Fs||w===yn)===!0&&m()===_n){if(v=T.isGlob=!0,x=T.isExtglob=!0,O=!0,w===yn&&f===l&&(G=!0),o===!0){for(;z()!==!0&&(w=k());){if(w===Tt){I=T.backslashes=!0,w=k();continue}if(w===Is){v=T.isGlob=!0,O=!0;break}}continue}break}if(w===gn){if(A===gn&&(R=T.isGlobstar=!0),v=T.isGlob=!0,O=!0,o===!0)continue;break}if(w===Fs){if(v=T.isGlob=!0,O=!0,o===!0)continue;break}if(w===sd){for(;z()!==!0&&(q=k());){if(q===Tt){I=T.backslashes=!0,k();continue}if(q===ld){C=T.isBracket=!0,v=T.isGlob=!0,O=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&w===yn&&f===l){L=T.negated=!0,l++;continue}if(r.noparen!==!0&&w===_n){if(v=T.isGlob=!0,o===!0){for(;z()!==!0&&(w=k());){if(w===_n){I=T.backslashes=!0,w=k();continue}if(w===Is){O=!0;break}}continue}break}if(v===!0){if(O=!0,o===!0)continue;break}}r.noext===!0&&(x=!1,v=!1);let $=u,V="",y="";l>0&&(V=u.slice(0,l),u=u.slice(l),p-=l),$&&v===!0&&p>0?($=u.slice(0,p),y=u.slice(p)):v===!0?($="",y=u):$=u,$&&$!==""&&$!=="/"&&$!==u&&Ls($.charCodeAt($.length-1))&&($=$.slice(0,-1)),r.unescape===!0&&(y&&(y=$s.removeBackslashes(y)),$&&I===!0&&($=$s.removeBackslashes($)));let _={prefix:V,input:e,start:l,base:$,glob:y,isBrace:d,isBracket:C,isGlob:v,isExtglob:x,isGlobstar:R,negated:L,negatedExtglob:G};if(r.tokens===!0&&(_.maxDepth=0,Ls(w)||s.push(T),_.tokens=s),r.parts===!0||r.tokens===!0){let q;for(let F=0;F<i.length;F++){let M=q?q+1:l,W=i[F],j=e.slice(M,W);r.tokens&&(F===0&&l!==0?(s[F].isPrefix=!0,s[F].value=V):s[F].value=j,Ms(s[F]),_.maxDepth+=s[F].depth),(F!==0||j!=="")&&a.push(j),q=W}if(q&&q+1<e.length){let F=e.slice(q+1);a.push(F),r.tokens&&(s[s.length-1].value=F,Ms(s[s.length-1]),_.maxDepth+=s[s.length-1].depth)}_.slashes=i,_.parts=a}return _};Ds.exports=ud});var qs=b((uC,js)=>{"use strict";c();var or=Pt(),ye=Ot(),{MAX_LENGTH:ir,POSIX_REGEX_SOURCE:fd,REGEX_NON_SPECIAL_CHARS:pd,REGEX_SPECIAL_CHARS_BACKREF:dd,REPLACEMENTS:Hs}=or,md=(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=>ye.escapeRegex(o)).join("..")}return r},dt=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,xn=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Hs[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(ir,r.maxLength):ir,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?"":"?:",u=ye.isWindows(t),f=or.globChars(u),l=or.extglobChars(f),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:C,ONE_CHAR:v,DOTS_SLASH:x,NO_DOT:R,NO_DOT_SLASH:S,NO_DOTS_SLASH:I,QMARK:L,QMARK_NO_DOT:G,STAR:O,START_ANCHOR:D}=f,A=P=>`(${a}(?:(?!${D}${P.dot?x:p}).)*?)`,w=r.dot?"":R,T=r.dot?L:G,z=r.bash===!0?A(r):O;r.capture&&(z=`(${z})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let m={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=ye.removePrefix(e,m),o=e.length;let k=[],$=[],V=[],y=i,_,q=()=>m.index===o-1,F=m.peek=(P=1)=>e[m.index+P],M=m.advance=()=>e[++m.index]||"",W=()=>e.slice(m.index+1),j=(P="",K=0)=>{m.consumed+=P,m.index+=K},ne=P=>{m.output+=P.output!=null?P.output:P.value,j(P.value)},J=()=>{let P=1;for(;F()==="!"&&(F(2)!=="("||F(3)==="?");)M(),m.start++,P++;return P%2===0?!1:(m.negated=!0,m.start++,!0)},Le=P=>{m[P]++,V.push(P)},le=P=>{m[P]--,V.pop()},H=P=>{if(y.type==="globstar"){let K=m.braces>0&&(P.type==="comma"||P.type==="brace"),E=P.extglob===!0||k.length&&(P.type==="pipe"||P.type==="paren");P.type!=="slash"&&P.type!=="paren"&&!K&&!E&&(m.output=m.output.slice(0,-y.output.length),y.type="star",y.value="*",y.output=z,m.output+=y.output)}if(k.length&&P.type!=="paren"&&(k[k.length-1].inner+=P.value),(P.value||P.output)&&ne(P),y&&y.type==="text"&&P.type==="text"){y.value+=P.value,y.output=(y.output||"")+P.value;return}P.prev=y,s.push(P),y=P},me=(P,K)=>{let E={...l[K],conditions:1,inner:""};E.prev=y,E.parens=m.parens,E.output=m.output;let B=(r.capture?"(":"")+E.open;Le("parens"),H({type:P,value:K,output:m.output?"":v}),H({type:"paren",extglob:!0,value:M(),output:B}),k.push(E)},lt=P=>{let K=P.close+(r.capture?")":""),E;if(P.type==="negate"){let B=z;if(P.inner&&P.inner.length>1&&P.inner.includes("/")&&(B=A(r)),(B!==z||q()||/^\)+$/.test(W()))&&(K=P.close=`)$))${B}`),P.inner.includes("*")&&(E=W())&&/^\.[^\\/.]+$/.test(E)){let Q=xn(E,{...t,fastpaths:!1}).output;K=P.close=`)${Q})${B})`}P.prev.type==="bos"&&(m.negatedExtglob=!0)}H({type:"paren",extglob:!0,value:_,output:K}),le("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let P=!1,K=e.replace(dd,(E,B,Q,de,oe,rn)=>de==="\\"?(P=!0,E):de==="?"?B?B+de+(oe?L.repeat(oe.length):""):rn===0?T+(oe?L.repeat(oe.length):""):L.repeat(Q.length):de==="."?p.repeat(Q.length):de==="*"?B?B+de+(oe?z:""):z:B?E:`\\${E}`);return P===!0&&(r.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,E=>E.length%2===0?"\\\\":E?"\\":"")),K===e&&r.contains===!0?(m.output=e,m):(m.output=ye.wrapOutput(K,m,t),m)}for(;!q();){if(_=M(),_==="\0")continue;if(_==="\\"){let E=F();if(E==="/"&&r.bash!==!0||E==="."||E===";")continue;if(!E){_+="\\",H({type:"text",value:_});continue}let B=/^\\+/.exec(W()),Q=0;if(B&&B[0].length>2&&(Q=B[0].length,m.index+=Q,Q%2!==0&&(_+="\\")),r.unescape===!0?_=M():_+=M(),m.brackets===0){H({type:"text",value:_});continue}}if(m.brackets>0&&(_!=="]"||y.value==="["||y.value==="[^")){if(r.posix!==!1&&_===":"){let E=y.value.slice(1);if(E.includes("[")&&(y.posix=!0,E.includes(":"))){let B=y.value.lastIndexOf("["),Q=y.value.slice(0,B),de=y.value.slice(B+2),oe=fd[de];if(oe){y.value=Q+oe,m.backtrack=!0,M(),!i.output&&s.indexOf(y)===1&&(i.output=v);continue}}}(_==="["&&F()!==":"||_==="-"&&F()==="]")&&(_=`\\${_}`),_==="]"&&(y.value==="["||y.value==="[^")&&(_=`\\${_}`),r.posix===!0&&_==="!"&&y.value==="["&&(_="^"),y.value+=_,ne({value:_});continue}if(m.quotes===1&&_!=='"'){_=ye.escapeRegex(_),y.value+=_,ne({value:_});continue}if(_==='"'){m.quotes=m.quotes===1?0:1,r.keepQuotes===!0&&H({type:"text",value:_});continue}if(_==="("){Le("parens"),H({type:"paren",value:_});continue}if(_===")"){if(m.parens===0&&r.strictBrackets===!0)throw new SyntaxError(dt("opening","("));let E=k[k.length-1];if(E&&m.parens===E.parens+1){lt(k.pop());continue}H({type:"paren",value:_,output:m.parens?")":"\\)"}),le("parens");continue}if(_==="["){if(r.nobracket===!0||!W().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(dt("closing","]"));_=`\\${_}`}else Le("brackets");H({type:"bracket",value:_});continue}if(_==="]"){if(r.nobracket===!0||y&&y.type==="bracket"&&y.value.length===1){H({type:"text",value:_,output:`\\${_}`});continue}if(m.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(dt("opening","["));H({type:"text",value:_,output:`\\${_}`});continue}le("brackets");let E=y.value.slice(1);if(y.posix!==!0&&E[0]==="^"&&!E.includes("/")&&(_=`/${_}`),y.value+=_,ne({value:_}),r.literalBrackets===!1||ye.hasRegexChars(E))continue;let B=ye.escapeRegex(y.value);if(m.output=m.output.slice(0,-y.value.length),r.literalBrackets===!0){m.output+=B,y.value=B;continue}y.value=`(${a}${B}|${y.value})`,m.output+=y.value;continue}if(_==="{"&&r.nobrace!==!0){Le("braces");let E={type:"brace",value:_,output:"(",outputIndex:m.output.length,tokensIndex:m.tokens.length};$.push(E),H(E);continue}if(_==="}"){let E=$[$.length-1];if(r.nobrace===!0||!E){H({type:"text",value:_,output:_});continue}let B=")";if(E.dots===!0){let Q=s.slice(),de=[];for(let oe=Q.length-1;oe>=0&&(s.pop(),Q[oe].type!=="brace");oe--)Q[oe].type!=="dots"&&de.unshift(Q[oe].value);B=md(de,r),m.backtrack=!0}if(E.comma!==!0&&E.dots!==!0){let Q=m.output.slice(0,E.outputIndex),de=m.tokens.slice(E.tokensIndex);E.value=E.output="\\{",_=B="\\}",m.output=Q;for(let oe of de)m.output+=oe.output||oe.value}H({type:"brace",value:_,output:B}),le("braces"),$.pop();continue}if(_==="|"){k.length>0&&k[k.length-1].conditions++,H({type:"text",value:_});continue}if(_===","){let E=_,B=$[$.length-1];B&&V[V.length-1]==="braces"&&(B.comma=!0,E="|"),H({type:"comma",value:_,output:E});continue}if(_==="/"){if(y.type==="dot"&&m.index===m.start+1){m.start=m.index+1,m.consumed="",m.output="",s.pop(),y=i;continue}H({type:"slash",value:_,output:C});continue}if(_==="."){if(m.braces>0&&y.type==="dot"){y.value==="."&&(y.output=p);let E=$[$.length-1];y.type="dots",y.output+=_,y.value+=_,E.dots=!0;continue}if(m.braces+m.parens===0&&y.type!=="bos"&&y.type!=="slash"){H({type:"text",value:_,output:p});continue}H({type:"dot",value:_,output:p});continue}if(_==="?"){if(!(y&&y.value==="(")&&r.noextglob!==!0&&F()==="("&&F(2)!=="?"){me("qmark",_);continue}if(y&&y.type==="paren"){let B=F(),Q=_;if(B==="<"&&!ye.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(y.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(W()))&&(Q=`\\${_}`),H({type:"text",value:_,output:Q});continue}if(r.dot!==!0&&(y.type==="slash"||y.type==="bos")){H({type:"qmark",value:_,output:G});continue}H({type:"qmark",value:_,output:L});continue}if(_==="!"){if(r.noextglob!==!0&&F()==="("&&(F(2)!=="?"||!/[!=<:]/.test(F(3)))){me("negate",_);continue}if(r.nonegate!==!0&&m.index===0){J();continue}}if(_==="+"){if(r.noextglob!==!0&&F()==="("&&F(2)!=="?"){me("plus",_);continue}if(y&&y.value==="("||r.regex===!1){H({type:"plus",value:_,output:d});continue}if(y&&(y.type==="bracket"||y.type==="paren"||y.type==="brace")||m.parens>0){H({type:"plus",value:_});continue}H({type:"plus",value:d});continue}if(_==="@"){if(r.noextglob!==!0&&F()==="("&&F(2)!=="?"){H({type:"at",extglob:!0,value:_,output:""});continue}H({type:"text",value:_});continue}if(_!=="*"){(_==="$"||_==="^")&&(_=`\\${_}`);let E=pd.exec(W());E&&(_+=E[0],m.index+=E[0].length),H({type:"text",value:_});continue}if(y&&(y.type==="globstar"||y.star===!0)){y.type="star",y.star=!0,y.value+=_,y.output=z,m.backtrack=!0,m.globstar=!0,j(_);continue}let P=W();if(r.noextglob!==!0&&/^\([^?]/.test(P)){me("star",_);continue}if(y.type==="star"){if(r.noglobstar===!0){j(_);continue}let E=y.prev,B=E.prev,Q=E.type==="slash"||E.type==="bos",de=B&&(B.type==="star"||B.type==="globstar");if(r.bash===!0&&(!Q||P[0]&&P[0]!=="/")){H({type:"star",value:_,output:""});continue}let oe=m.braces>0&&(E.type==="comma"||E.type==="brace"),rn=k.length&&(E.type==="pipe"||E.type==="paren");if(!Q&&E.type!=="paren"&&!oe&&!rn){H({type:"star",value:_,output:""});continue}for(;P.slice(0,3)==="/**";){let Qt=e[m.index+4];if(Qt&&Qt!=="/")break;P=P.slice(3),j("/**",3)}if(E.type==="bos"&&q()){y.type="globstar",y.value+=_,y.output=A(r),m.output=y.output,m.globstar=!0,j(_);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&!de&&q()){m.output=m.output.slice(0,-(E.output+y.output).length),E.output=`(?:${E.output}`,y.type="globstar",y.output=A(r)+(r.strictSlashes?")":"|$)"),y.value+=_,m.globstar=!0,m.output+=E.output+y.output,j(_);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&P[0]==="/"){let Qt=P[1]!==void 0?"|$":"";m.output=m.output.slice(0,-(E.output+y.output).length),E.output=`(?:${E.output}`,y.type="globstar",y.output=`${A(r)}${C}|${C}${Qt})`,y.value+=_,m.output+=E.output+y.output,m.globstar=!0,j(_+M()),H({type:"slash",value:"/",output:""});continue}if(E.type==="bos"&&P[0]==="/"){y.type="globstar",y.value+=_,y.output=`(?:^|${C}|${A(r)}${C})`,m.output=y.output,m.globstar=!0,j(_+M()),H({type:"slash",value:"/",output:""});continue}m.output=m.output.slice(0,-y.output.length),y.type="globstar",y.output=A(r),y.value+=_,m.output+=y.output,m.globstar=!0,j(_);continue}let K={type:"star",value:_,output:z};if(r.bash===!0){K.output=".*?",(y.type==="bos"||y.type==="slash")&&(K.output=w+K.output),H(K);continue}if(y&&(y.type==="bracket"||y.type==="paren")&&r.regex===!0){K.output=_,H(K);continue}(m.index===m.start||y.type==="slash"||y.type==="dot")&&(y.type==="dot"?(m.output+=S,y.output+=S):r.dot===!0?(m.output+=I,y.output+=I):(m.output+=w,y.output+=w),F()!=="*"&&(m.output+=v,y.output+=v)),H(K)}for(;m.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(dt("closing","]"));m.output=ye.escapeLast(m.output,"["),le("brackets")}for(;m.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(dt("closing",")"));m.output=ye.escapeLast(m.output,"("),le("parens")}for(;m.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(dt("closing","}"));m.output=ye.escapeLast(m.output,"{"),le("braces")}if(r.strictSlashes!==!0&&(y.type==="star"||y.type==="bracket")&&H({type:"maybe_slash",value:"",output:`${C}?`}),m.backtrack===!0){m.output="";for(let P of m.tokens)m.output+=P.output!=null?P.output:P.value,P.suffix&&(m.output+=P.suffix)}return m};xn.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(ir,r.maxLength):ir,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=Hs[e]||e;let i=ye.isWindows(t),{DOT_LITERAL:s,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:f,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:C,START_ANCHOR:v}=or.globChars(i),x=r.dot?p:l,R=r.dot?d:l,S=r.capture?"":"?:",I={negated:!1,prefix:""},L=r.bash===!0?".*?":C;r.capture&&(L=`(${L})`);let G=w=>w.noglobstar===!0?L:`(${S}(?:(?!${v}${w.dot?f:s}).)*?)`,O=w=>{switch(w){case"*":return`${x}${u}${L}`;case".*":return`${s}${u}${L}`;case"*.*":return`${x}${L}${s}${u}${L}`;case"*/*":return`${x}${L}${a}${u}${R}${L}`;case"**":return x+G(r);case"**/*":return`(?:${x}${G(r)}${a})?${R}${u}${L}`;case"**/*.*":return`(?:${x}${G(r)}${a})?${R}${L}${s}${u}${L}`;case"**/.*":return`(?:${x}${G(r)}${a})?${s}${u}${L}`;default:{let T=/^(.*?)\.(\w+)$/.exec(w);if(!T)return;let z=O(T[1]);return z?z+s+T[2]:void 0}}},D=ye.removePrefix(e,I),A=O(D);return A&&r.strictSlashes!==!0&&(A+=`${a}?`),A};js.exports=xn});var Us=b((pC,Bs)=>{"use strict";c();var gd=U("path"),hd=Vs(),Cn=qs(),bn=Ot(),yd=Pt(),vd=e=>e&&typeof e=="object"&&!Array.isArray(e),ee=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(d=>ee(d,t,r));return d=>{for(let C of l){let v=C(d);if(v)return v}return!1}}let n=vd(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=bn.isWindows(t),s=n?ee.compileRe(e,t):ee.makeRe(e,t,!1,!0),a=s.state;delete s.state;let u=()=>!1;if(o.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};u=ee(o.ignore,l,r)}let f=(l,p=!1)=>{let{isMatch:d,match:C,output:v}=ee.test(l,s,t,{glob:e,posix:i}),x={glob:e,state:a,regex:s,posix:i,input:l,output:v,match:C,isMatch:d};return typeof o.onResult=="function"&&o.onResult(x),d===!1?(x.isMatch=!1,p?x:!1):u(l)?(typeof o.onIgnore=="function"&&o.onIgnore(x),x.isMatch=!1,p?x:!1):(typeof o.onMatch=="function"&&o.onMatch(x),p?x:!0)};return r&&(f.state=a),f};ee.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?bn.toPosixSlashes:null),a=e===n,u=a&&s?s(e):e;return a===!1&&(u=s?s(e):e,a=u===n),(a===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?a=ee.matchBase(e,t,r,o):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};ee.matchBase=(e,t,r,n=bn.isWindows(r))=>(t instanceof RegExp?t:ee.makeRe(t,r)).test(gd.basename(e));ee.isMatch=(e,t,r)=>ee(t,r)(e);ee.parse=(e,t)=>Array.isArray(e)?e.map(r=>ee.parse(r,t)):Cn(e,{...t,fastpaths:!1});ee.scan=(e,t)=>hd(e,t);ee.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 u=ee.toRegex(a,t);return n===!0&&(u.state=e),u};ee.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=Cn.fastpaths(e,t)),o.output||(o=Cn(e,t)),ee.compileRe(o,t,r,n)};ee.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/$^/}};ee.constants=yd;Bs.exports=ee});var Ws=b((mC,Gs)=>{"use strict";c();Gs.exports=Us()});var Qs=b((hC,Xs)=>{"use strict";c();var Ks=U("util"),Ys=Es(),ke=Ws(),Sn=Ot(),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=l=>{i.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let p=ke(String(t[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&s++;for(let C of e){let v=p(C,!0);(d?!v.isMatch:v.isMatch)&&(d?n.add(v.output):(n.delete(v.output),o.add(v.output)))}}let f=(s===t.length?[...i]:[...o]).filter(l=>!n.has(l));if(r&&f.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(l=>l.replace(/\\/g,"")):t}return f};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: "${Ks.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(!Sn.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: "${Ks.inspect(e)}"`);return[].concat(t).every(n=>ke(n,r)(e))};Y.capture=(e,t,r)=>{let n=Sn.isWindows(r),i=ke.makeRe(String(e),{...r,capture:!0}).exec(n?Sn.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 Ys(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]:Ys(e,t)};Y.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return Y.braces(e,{...t,expand:!0})};Xs.exports=Y});var ia=b(N=>{"use strict";c();Object.defineProperty(N,"__esModule",{value:!0});N.removeDuplicateSlashes=N.matchAny=N.convertPatternsToRe=N.makeRe=N.getPatternParts=N.expandBraceExpansion=N.expandPatternsWithBraceExpansion=N.isAffectDepthOfReadingPattern=N.endsWithSlashGlobStar=N.hasGlobStar=N.getBaseDirectory=N.isPatternRelatedToParentDirectory=N.getPatternsOutsideCurrentDirectory=N.getPatternsInsideCurrentDirectory=N.getPositivePatterns=N.getNegativePatterns=N.isPositivePattern=N.isNegativePattern=N.convertToNegativePattern=N.convertToPositivePattern=N.isDynamicPattern=N.isStaticPattern=void 0;var _d=U("path"),xd=Bi(),Rn=Qs(),Zs="**",Cd="\\",bd=/[*?]|^!/,Sd=/\[[^[]*]/,Rd=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,wd=/[!*+?@]\([^(]*\)/,Ed=/,|\.\./,Ad=/(?!^)\/{2,}/g;function Js(e,t={}){return!ea(e,t)}N.isStaticPattern=Js;function ea(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(Cd)||bd.test(e)||Sd.test(e)||Rd.test(e)||t.extglob!==!1&&wd.test(e)||t.braceExpansion!==!1&&kd(e))}N.isDynamicPattern=ea;function kd(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 Ed.test(n)}function Pd(e){return sr(e)?e.slice(1):e}N.convertToPositivePattern=Pd;function Od(e){return"!"+e}N.convertToNegativePattern=Od;function sr(e){return e.startsWith("!")&&e[1]!=="("}N.isNegativePattern=sr;function ta(e){return!sr(e)}N.isPositivePattern=ta;function Td(e){return e.filter(sr)}N.getNegativePatterns=Td;function $d(e){return e.filter(ta)}N.getPositivePatterns=$d;function Fd(e){return e.filter(t=>!wn(t))}N.getPatternsInsideCurrentDirectory=Fd;function Id(e){return e.filter(wn)}N.getPatternsOutsideCurrentDirectory=Id;function wn(e){return e.startsWith("..")||e.startsWith("./..")}N.isPatternRelatedToParentDirectory=wn;function Ld(e){return xd(e,{flipBackslashes:!1})}N.getBaseDirectory=Ld;function Md(e){return e.includes(Zs)}N.hasGlobStar=Md;function ra(e){return e.endsWith("/"+Zs)}N.endsWithSlashGlobStar=ra;function Nd(e){let t=_d.basename(e);return ra(e)||Js(t)}N.isAffectDepthOfReadingPattern=Nd;function Dd(e){return e.reduce((t,r)=>t.concat(na(r)),[])}N.expandPatternsWithBraceExpansion=Dd;function na(e){let t=Rn.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}N.expandBraceExpansion=na;function Vd(e,t){let{parts:r}=Rn.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}N.getPatternParts=Vd;function oa(e,t){return Rn.makeRe(e,t)}N.makeRe=oa;function Hd(e,t){return e.map(r=>oa(r,t))}N.convertPatternsToRe=Hd;function jd(e,t){return t.some(r=>r.test(e))}N.matchAny=jd;function qd(e){return e.replace(Ad,"/")}N.removeDuplicateSlashes=qd});var la=b((xC,ca)=>{"use strict";c();var Bd=U("stream"),sa=Bd.PassThrough,Ud=Array.prototype.slice;ca.exports=Gd;function Gd(){let e=[],t=Ud.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=sa(n);function a(){for(let l=0,p=arguments.length;l<p;l++)e.push(aa(arguments[l],n));return u(),this}function u(){if(r)return;r=!0;let l=e.shift();if(!l){process.nextTick(f);return}Array.isArray(l)||(l=[l]);let p=l.length+1;function d(){--p>0||(r=!1,u())}function C(v){function x(){v.removeListener("merge2UnpipeEnd",x),v.removeListener("end",x),i&&v.removeListener("error",R),d()}function R(S){s.emit("error",S)}if(v._readableState.endEmitted)return d();v.on("merge2UnpipeEnd",x),v.on("end",x),i&&v.on("error",R),v.pipe(s,{end:!1}),v.resume()}for(let v=0;v<l.length;v++)C(l[v]);d()}function f(){r=!1,s.emit("queueDrain"),o&&s.end()}return s.setMaxListeners(0),s.add=a,s.on("unpipe",function(l){l.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),s}function aa(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=aa(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(sa(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var fa=b(ar=>{"use strict";c();Object.defineProperty(ar,"__esModule",{value:!0});ar.merge=void 0;var Wd=la();function zd(e){let t=Wd(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>ua(e)),t.once("end",()=>ua(e)),t}ar.merge=zd;function ua(e){e.forEach(t=>t.emit("close"))}});var pa=b(mt=>{"use strict";c();Object.defineProperty(mt,"__esModule",{value:!0});mt.isEmpty=mt.isString=void 0;function Kd(e){return typeof e=="string"}mt.isString=Kd;function Yd(e){return e===""}mt.isEmpty=Yd});var De=b(ue=>{"use strict";c();Object.defineProperty(ue,"__esModule",{value:!0});ue.string=ue.stream=ue.pattern=ue.path=ue.fs=ue.errno=ue.array=void 0;var Xd=Oi();ue.array=Xd;var Qd=Ti();ue.errno=Qd;var Zd=$i();ue.fs=Zd;var Jd=Mi();ue.path=Jd;var em=ia();ue.pattern=em;var tm=fa();ue.stream=tm;var rm=pa();ue.string=rm});var ha=b(fe=>{"use strict";c();Object.defineProperty(fe,"__esModule",{value:!0});fe.convertPatternGroupToTask=fe.convertPatternGroupsToTasks=fe.groupPatternsByBaseDirectory=fe.getNegativePatternsAsPositive=fe.getPositivePatterns=fe.convertPatternsToTasks=fe.generate=void 0;var Re=De();function nm(e,t){let r=da(e,t),n=da(t.ignore,t),o=ma(r),i=ga(r,n),s=o.filter(l=>Re.pattern.isStaticPattern(l,t)),a=o.filter(l=>Re.pattern.isDynamicPattern(l,t)),u=En(s,i,!1),f=En(a,i,!0);return u.concat(f)}fe.generate=nm;function da(e,t){let r=e;return t.braceExpansion&&(r=Re.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>Re.pattern.removeDuplicateSlashes(n))}function En(e,t,r){let n=[],o=Re.pattern.getPatternsOutsideCurrentDirectory(e),i=Re.pattern.getPatternsInsideCurrentDirectory(e),s=An(o),a=An(i);return n.push(...kn(s,t,r)),"."in a?n.push(Pn(".",i,t,r)):n.push(...kn(a,t,r)),n}fe.convertPatternsToTasks=En;function ma(e){return Re.pattern.getPositivePatterns(e)}fe.getPositivePatterns=ma;function ga(e,t){return Re.pattern.getNegativePatterns(e).concat(t).map(Re.pattern.convertToPositivePattern)}fe.getNegativePatternsAsPositive=ga;function An(e){let t={};return e.reduce((r,n)=>{let o=Re.pattern.getBaseDirectory(n);return o in r?r[o].push(n):r[o]=[n],r},t)}fe.groupPatternsByBaseDirectory=An;function kn(e,t,r){return Object.keys(e).map(n=>Pn(n,e[n],t,r))}fe.convertPatternGroupsToTasks=kn;function Pn(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(Re.pattern.convertToNegativePattern))}}fe.convertPatternGroupToTask=Pn});var va=b(cr=>{"use strict";c();Object.defineProperty(cr,"__esModule",{value:!0});cr.read=void 0;function om(e,t,r){t.fs.lstat(e,(n,o)=>{if(n!==null){ya(r,n);return}if(!o.isSymbolicLink()||!t.followSymbolicLink){On(r,o);return}t.fs.stat(e,(i,s)=>{if(i!==null){if(t.throwErrorOnBrokenSymbolicLink){ya(r,i);return}On(r,o);return}t.markSymbolicLink&&(s.isSymbolicLink=()=>!0),On(r,s)})})}cr.read=om;function ya(e,t){e(t)}function On(e,t){e(null,t)}});var _a=b(lr=>{"use strict";c();Object.defineProperty(lr,"__esModule",{value:!0});lr.read=void 0;function im(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}}lr.read=im});var xa=b(je=>{"use strict";c();Object.defineProperty(je,"__esModule",{value:!0});je.createFileSystemAdapter=je.FILE_SYSTEM_ADAPTER=void 0;var ur=U("fs");je.FILE_SYSTEM_ADAPTER={lstat:ur.lstat,stat:ur.stat,lstatSync:ur.lstatSync,statSync:ur.statSync};function sm(e){return e===void 0?je.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},je.FILE_SYSTEM_ADAPTER),e)}je.createFileSystemAdapter=sm});var Ca=b($n=>{"use strict";c();Object.defineProperty($n,"__esModule",{value:!0});var am=xa(),Tn=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=am.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}};$n.default=Tn});var tt=b(qe=>{"use strict";c();Object.defineProperty(qe,"__esModule",{value:!0});qe.statSync=qe.stat=qe.Settings=void 0;var ba=va(),cm=_a(),Fn=Ca();qe.Settings=Fn.default;function lm(e,t,r){if(typeof t=="function"){ba.read(e,In(),t);return}ba.read(e,In(t),r)}qe.stat=lm;function um(e,t){let r=In(t);return cm.read(e,r)}qe.statSync=um;function In(e={}){return e instanceof Fn.default?e:new Fn.default(e)}});var wa=b((HC,Ra)=>{"use strict";c();var Sa;Ra.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(Sa||(Sa=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var Aa=b((qC,Ea)=>{"use strict";c();Ea.exports=pm;var fm=wa();function pm(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(u){function f(){t&&t(u,r),t=null}i?fm(f):f()}function a(u,f,l){r[u]=l,(--n===0||f)&&s(f)}n?o?o.forEach(function(u){e[u](function(f,l){a(u,f,l)})}):e.forEach(function(u,f){u(function(l,p){a(f,l,p)})}):s(null),i=!1}});var Ln=b(pr=>{"use strict";c();Object.defineProperty(pr,"__esModule",{value:!0});pr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var fr=process.versions.node.split(".");if(fr[0]===void 0||fr[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var ka=Number.parseInt(fr[0],10),dm=Number.parseInt(fr[1],10),Pa=10,mm=10,gm=ka>Pa,hm=ka===Pa&&dm>=mm;pr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=gm||hm});var Oa=b(dr=>{"use strict";c();Object.defineProperty(dr,"__esModule",{value:!0});dr.createDirentFromStats=void 0;var Mn=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 ym(e,t){return new Mn(e,t)}dr.createDirentFromStats=ym});var Nn=b(mr=>{"use strict";c();Object.defineProperty(mr,"__esModule",{value:!0});mr.fs=void 0;var vm=Oa();mr.fs=vm});var Dn=b(gr=>{"use strict";c();Object.defineProperty(gr,"__esModule",{value:!0});gr.joinPathSegments=void 0;function _m(e,t,r){return e.endsWith(r)?e+t:e+r+t}gr.joinPathSegments=_m});var Ma=b(Be=>{"use strict";c();Object.defineProperty(Be,"__esModule",{value:!0});Be.readdir=Be.readdirWithFileTypes=Be.read=void 0;var xm=tt(),Ta=Aa(),Cm=Ln(),$a=Nn(),Fa=Dn();function bm(e,t,r){if(!t.stats&&Cm.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Ia(e,t,r);return}La(e,t,r)}Be.read=bm;function Ia(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,o)=>{if(n!==null){hr(r,n);return}let i=o.map(a=>({dirent:a,name:a.name,path:Fa.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){Vn(r,i);return}let s=i.map(a=>Sm(a,t));Ta(s,(a,u)=>{if(a!==null){hr(r,a);return}Vn(r,u)})})}Be.readdirWithFileTypes=Ia;function Sm(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=$a.fs.createDirentFromStats(e.name,o),r(null,e)})}}function La(e,t,r){t.fs.readdir(e,(n,o)=>{if(n!==null){hr(r,n);return}let i=o.map(s=>{let a=Fa.joinPathSegments(e,s,t.pathSegmentSeparator);return u=>{xm.stat(a,t.fsStatSettings,(f,l)=>{if(f!==null){u(f);return}let p={name:s,path:a,dirent:$a.fs.createDirentFromStats(s,l)};t.stats&&(p.stats=l),u(null,p)})}});Ta(i,(s,a)=>{if(s!==null){hr(r,s);return}Vn(r,a)})})}Be.readdir=La;function hr(e,t){e(t)}function Vn(e,t){e(null,t)}});var ja=b(Ue=>{"use strict";c();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.readdir=Ue.readdirWithFileTypes=Ue.read=void 0;var Rm=tt(),wm=Ln(),Na=Nn(),Da=Dn();function Em(e,t){return!t.stats&&wm.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Va(e,t):Ha(e,t)}Ue.read=Em;function Va(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let o={dirent:n,name:n.name,path:Da.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let i=t.fs.statSync(o.path);o.dirent=Na.fs.createDirentFromStats(o.name,i)}catch(i){if(t.throwErrorOnBrokenSymbolicLink)throw i}return o})}Ue.readdirWithFileTypes=Va;function Ha(e,t){return t.fs.readdirSync(e).map(n=>{let o=Da.joinPathSegments(e,n,t.pathSegmentSeparator),i=Rm.statSync(o,t.fsStatSettings),s={name:n,path:o,dirent:Na.fs.createDirentFromStats(n,i)};return t.stats&&(s.stats=i),s})}Ue.readdir=Ha});var qa=b(Ge=>{"use strict";c();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.createFileSystemAdapter=Ge.FILE_SYSTEM_ADAPTER=void 0;var gt=U("fs");Ge.FILE_SYSTEM_ADAPTER={lstat:gt.lstat,stat:gt.stat,lstatSync:gt.lstatSync,statSync:gt.statSync,readdir:gt.readdir,readdirSync:gt.readdirSync};function Am(e){return e===void 0?Ge.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ge.FILE_SYSTEM_ADAPTER),e)}Ge.createFileSystemAdapter=Am});var Ba=b(jn=>{"use strict";c();Object.defineProperty(jn,"__esModule",{value:!0});var km=U("path"),Pm=tt(),Om=qa(),Hn=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Om.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,km.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Pm.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};jn.default=Hn});var yr=b(We=>{"use strict";c();Object.defineProperty(We,"__esModule",{value:!0});We.Settings=We.scandirSync=We.scandir=void 0;var Ua=Ma(),Tm=ja(),qn=Ba();We.Settings=qn.default;function $m(e,t,r){if(typeof t=="function"){Ua.read(e,Bn(),t);return}Ua.read(e,Bn(t),r)}We.scandir=$m;function Fm(e,t){let r=Bn(t);return Tm.read(e,r)}We.scandirSync=Fm;function Bn(e={}){return e instanceof qn.default?e:new qn.default(e)}});var Wa=b((cb,Ga)=>{"use strict";c();function Im(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=Im});var Ka=b((ub,Un)=>{"use strict";c();var Lm=Wa();function za(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var n=Lm(Mm),o=null,i=null,s=0,a=null,u={push:x,drain:Ce,saturated:Ce,pause:l,paused:!1,concurrency:r,running:f,resume:C,idle:v,length:p,getQueue:d,unshift:R,empty:Ce,kill:I,killAndDrain:L,error:G};return u;function f(){return s}function l(){u.paused=!0}function p(){for(var O=o,D=0;O;)O=O.next,D++;return D}function d(){for(var O=o,D=[];O;)D.push(O.value),O=O.next;return D}function C(){if(u.paused){u.paused=!1;for(var O=0;O<u.concurrency;O++)s++,S()}}function v(){return s===0&&u.length()===0}function x(O,D){var A=n.get();A.context=e,A.release=S,A.value=O,A.callback=D||Ce,A.errorHandler=a,s===u.concurrency||u.paused?i?(i.next=A,i=A):(o=A,i=A,u.saturated()):(s++,t.call(e,A.value,A.worked))}function R(O,D){var A=n.get();A.context=e,A.release=S,A.value=O,A.callback=D||Ce,s===u.concurrency||u.paused?o?(A.next=o,o=A):(o=A,i=A,u.saturated()):(s++,t.call(e,A.value,A.worked))}function S(O){O&&n.release(O);var D=o;D?u.paused?s--:(i===o&&(i=null),o=D.next,D.next=null,t.call(e,D.value,D.worked),i===null&&u.empty()):--s===0&&u.drain()}function I(){o=null,i=null,u.drain=Ce}function L(){o=null,i=null,u.drain(),u.drain=Ce}function G(O){a=O}}function Ce(){}function Mm(){this.value=null,this.callback=Ce,this.next=null,this.release=Ce,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=Ce,e.errorHandler&&i(r,s),o.call(e.context,r,n),e.release(e)}}function Nm(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(l,p){t.call(this,l).then(function(d){p(null,d)},p)}var o=za(e,n,r),i=o.push,s=o.unshift;return o.push=a,o.unshift=u,o.drained=f,o;function a(l){var p=new Promise(function(d,C){i(l,function(v,x){if(v){C(v);return}d(x)})});return p.catch(Ce),p}function u(l){var p=new Promise(function(d,C){s(l,function(v,x){if(v){C(v);return}d(x)})});return p.catch(Ce),p}function f(){if(o.idle())return new Promise(function(d){d()});var l=o.drain,p=new Promise(function(d){o.drain=function(){l(),d()}});return p}}Un.exports=za;Un.exports.promise=Nm});var vr=b(Pe=>{"use strict";c();Object.defineProperty(Pe,"__esModule",{value:!0});Pe.joinPathSegments=Pe.replacePathSegmentSeparator=Pe.isAppliedFilter=Pe.isFatalError=void 0;function Dm(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}Pe.isFatalError=Dm;function Vm(e,t){return e===null||e(t)}Pe.isAppliedFilter=Vm;function Hm(e,t){return e.split(/[/\\]/).join(t)}Pe.replacePathSegmentSeparator=Hm;function jm(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}Pe.joinPathSegments=jm});var zn=b(Wn=>{"use strict";c();Object.defineProperty(Wn,"__esModule",{value:!0});var qm=vr(),Gn=class{constructor(t,r){this._root=t,this._settings=r,this._root=qm.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};Wn.default=Gn});var Xn=b(Yn=>{"use strict";c();Object.defineProperty(Yn,"__esModule",{value:!0});var Bm=U("events"),Um=yr(),Gm=Ka(),_r=vr(),Wm=zn(),Kn=class extends Wm.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=Um.scandir,this._emitter=new Bm.EventEmitter,this._queue=Gm(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||!_r.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=_r.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),_r.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&_r.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};Yn.default=Kn});var Ya=b(Zn=>{"use strict";c();Object.defineProperty(Zn,"__esModule",{value:!0});var zm=Xn(),Qn=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new zm.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{Km(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Ym(t,this._storage)}),this._reader.read()}};Zn.default=Qn;function Km(e,t){e(t)}function Ym(e,t){e(null,t)}});var Xa=b(eo=>{"use strict";c();Object.defineProperty(eo,"__esModule",{value:!0});var Xm=U("stream"),Qm=Xn(),Jn=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new Qm.default(this._root,this._settings),this._stream=new Xm.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}};eo.default=Jn});var Qa=b(ro=>{"use strict";c();Object.defineProperty(ro,"__esModule",{value:!0});var Zm=yr(),xr=vr(),Jm=zn(),to=class extends Jm.default{constructor(){super(...arguments),this._scandir=Zm.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(xr.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=xr.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),xr.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&xr.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};ro.default=to});var Za=b(oo=>{"use strict";c();Object.defineProperty(oo,"__esModule",{value:!0});var eg=Qa(),no=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new eg.default(this._root,this._settings)}read(){return this._reader.read()}};oo.default=no});var Ja=b(so=>{"use strict";c();Object.defineProperty(so,"__esModule",{value:!0});var tg=U("path"),rg=yr(),io=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,tg.sep),this.fsScandirSettings=new rg.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}};so.default=io});var br=b(Oe=>{"use strict";c();Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Settings=Oe.walkStream=Oe.walkSync=Oe.walk=void 0;var ec=Ya(),ng=Xa(),og=Za(),ao=Ja();Oe.Settings=ao.default;function ig(e,t,r){if(typeof t=="function"){new ec.default(e,Cr()).read(t);return}new ec.default(e,Cr(t)).read(r)}Oe.walk=ig;function sg(e,t){let r=Cr(t);return new og.default(e,r).read()}Oe.walkSync=sg;function ag(e,t){let r=Cr(t);return new ng.default(e,r).read()}Oe.walkStream=ag;function Cr(e={}){return e instanceof ao.default?e:new ao.default(e)}});var Sr=b(lo=>{"use strict";c();Object.defineProperty(lo,"__esModule",{value:!0});var cg=U("path"),lg=tt(),tc=De(),co=class{constructor(t){this._settings=t,this._fsStatSettings=new lg.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return cg.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:tc.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!tc.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};lo.default=co});var po=b(fo=>{"use strict";c();Object.defineProperty(fo,"__esModule",{value:!0});var ug=U("stream"),fg=tt(),pg=br(),dg=Sr(),uo=class extends dg.default{constructor(){super(...arguments),this._walkStream=pg.walkStream,this._stat=fg.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),o=new ug.PassThrough({objectMode:!0});o._write=(i,s,a)=>this._getEntry(n[i],t[i],r).then(u=>{u!==null&&r.entryFilter(u)&&o.push(u),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))})}};fo.default=uo});var rc=b(go=>{"use strict";c();Object.defineProperty(go,"__esModule",{value:!0});var mg=br(),gg=Sr(),hg=po(),mo=class extends gg.default{constructor(){super(...arguments),this._walkAsync=mg.walk,this._readerStream=new hg.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))})}};go.default=mo});var nc=b(yo=>{"use strict";c();Object.defineProperty(yo,"__esModule",{value:!0});var $t=De(),ho=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 $t.pattern.getPatternParts(t,this._micromatchOptions).map(n=>$t.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:$t.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return $t.array.splitWhen(t,r=>r.dynamic&&$t.pattern.hasGlobStar(r.pattern))}};yo.default=ho});var oc=b(_o=>{"use strict";c();Object.defineProperty(_o,"__esModule",{value:!0});var yg=nc(),vo=class extends yg.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((u,f)=>{let l=i.segments[f];return!!(l.dynamic&&l.patternRe.test(u)||!l.dynamic&&l.pattern===u)}))return!0}return!1}};_o.default=vo});var ic=b(Co=>{"use strict";c();Object.defineProperty(Co,"__esModule",{value:!0});var Rr=De(),vg=oc(),xo=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 vg.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(Rr.pattern.isAffectDepthOfReadingPattern);return Rr.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let i=Rr.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!Rr.pattern.matchAny(t,r)}};Co.default=xo});var sc=b(So=>{"use strict";c();Object.defineProperty(So,"__esModule",{value:!0});var rt=De(),bo=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let n=rt.pattern.convertPatternsToRe(t,this._micromatchOptions),o=rt.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return i=>this._filter(i,n,o)}_filter(t,r,n){let o=rt.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=rt.path.makeAbsolute(this._settings.cwd,t);return rt.pattern.matchAny(n,r)}_isMatchToPatterns(t,r,n){let o=rt.pattern.matchAny(t,r);return!o&&n?rt.pattern.matchAny(t+"/",r):o}};So.default=bo});var ac=b(wo=>{"use strict";c();Object.defineProperty(wo,"__esModule",{value:!0});var _g=De(),Ro=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return _g.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};wo.default=Ro});var lc=b(Ao=>{"use strict";c();Object.defineProperty(Ao,"__esModule",{value:!0});var cc=De(),Eo=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=cc.path.makeAbsolute(this._settings.cwd,r),r=cc.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};Ao.default=Eo});var wr=b(Po=>{"use strict";c();Object.defineProperty(Po,"__esModule",{value:!0});var xg=U("path"),Cg=ic(),bg=sc(),Sg=ac(),Rg=lc(),ko=class{constructor(t){this._settings=t,this.errorFilter=new Sg.default(this._settings),this.entryFilter=new bg.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Cg.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Rg.default(this._settings)}_getRootDirectory(t){return xg.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}}};Po.default=ko});var uc=b(To=>{"use strict";c();Object.defineProperty(To,"__esModule",{value:!0});var wg=rc(),Eg=wr(),Oo=class extends Eg.default{constructor(){super(...arguments),this._reader=new wg.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)}};To.default=Oo});var fc=b(Fo=>{"use strict";c();Object.defineProperty(Fo,"__esModule",{value:!0});var Ag=U("stream"),kg=po(),Pg=wr(),$o=class extends Pg.default{constructor(){super(...arguments),this._reader=new kg.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new Ag.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)}};Fo.default=$o});var pc=b(Lo=>{"use strict";c();Object.defineProperty(Lo,"__esModule",{value:!0});var Og=tt(),Tg=br(),$g=Sr(),Io=class extends $g.default{constructor(){super(...arguments),this._walkSync=Tg.walkSync,this._statSync=Og.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)}};Lo.default=Io});var dc=b(No=>{"use strict";c();Object.defineProperty(No,"__esModule",{value:!0});var Fg=pc(),Ig=wr(),Mo=class extends Ig.default{constructor(){super(...arguments),this._reader=new Fg.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)}};No.default=Mo});var mc=b(yt=>{"use strict";c();Object.defineProperty(yt,"__esModule",{value:!0});yt.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var ht=U("fs"),Lg=U("os"),Mg=Math.max(Lg.cpus().length,1);yt.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:ht.lstat,lstatSync:ht.lstatSync,stat:ht.stat,statSync:ht.statSync,readdir:ht.readdir,readdirSync:ht.readdirSync};var Do=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,Mg),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({},yt.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};yt.default=Do});var Er=b((sS,hc)=>{"use strict";c();var gc=ha(),Ng=uc(),Dg=fc(),Vg=dc(),Vo=mc(),be=De();async function Ho(e,t){we(e);let r=jo(e,Ng.default,t),n=await Promise.all(r);return be.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(f,l){we(f);let p=jo(f,Vg.default,l);return be.array.flatten(p)}e.sync=t;function r(f,l){we(f);let p=jo(f,Dg.default,l);return be.stream.merge(p)}e.stream=r;function n(f,l){we(f);let p=[].concat(f),d=new Vo.default(l);return gc.generate(p,d)}e.generateTasks=n;function o(f,l){we(f);let p=new Vo.default(l);return be.pattern.isDynamicPattern(f,p)}e.isDynamicPattern=o;function i(f){return we(f),be.path.escape(f)}e.escapePath=i;function s(f){return we(f),be.path.convertPathToPattern(f)}e.convertPathToPattern=s;let a;(function(f){function l(d){return we(d),be.path.escapePosixPath(d)}f.escapePath=l;function p(d){return we(d),be.path.convertPosixPathToPattern(d)}f.convertPathToPattern=p})(a=e.posix||(e.posix={}));let u;(function(f){function l(d){return we(d),be.path.escapeWindowsPath(d)}f.escapePath=l;function p(d){return we(d),be.path.convertWindowsPathToPattern(d)}f.convertPathToPattern=p})(u=e.win32||(e.win32={}))})(Ho||(Ho={}));function jo(e,t,r){let n=[].concat(e),o=new Vo.default(r),i=gc.generate(n,o),s=new t(o);return i.map(s.read,s)}function we(e){if(![].concat(e).every(n=>be.string.isString(n)&&!be.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}hc.exports=Ho});var vc=b((cS,yc)=>{"use strict";c();var vt=1e3,_t=vt*60,xt=_t*60,nt=xt*24,Hg=nt*7,jg=nt*365.25;yc.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return qg(e);if(r==="number"&&isFinite(e))return t.long?Ug(e):Bg(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function qg(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*jg;case"weeks":case"week":case"w":return r*Hg;case"days":case"day":case"d":return r*nt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*xt;case"minutes":case"minute":case"mins":case"min":case"m":return r*_t;case"seconds":case"second":case"secs":case"sec":case"s":return r*vt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Bg(e){var t=Math.abs(e);return t>=nt?Math.round(e/nt)+"d":t>=xt?Math.round(e/xt)+"h":t>=_t?Math.round(e/_t)+"m":t>=vt?Math.round(e/vt)+"s":e+"ms"}function Ug(e){var t=Math.abs(e);return t>=nt?Ar(e,t,nt,"day"):t>=xt?Ar(e,t,xt,"hour"):t>=_t?Ar(e,t,_t,"minute"):t>=vt?Ar(e,t,vt,"second"):e+" ms"}function Ar(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var qo=b((uS,_c)=>{"use strict";c();function Gg(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=s,r.humanize=vc(),r.destroy=f,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(l){let p,d=null,C,v;function x(...R){if(!x.enabled)return;let S=x,I=Number(new Date),L=I-(p||I);S.diff=L,S.prev=p,S.curr=I,p=I,R[0]=r.coerce(R[0]),typeof R[0]!="string"&&R.unshift("%O");let G=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,(D,A)=>{if(D==="%%")return"%";G++;let w=r.formatters[A];if(typeof w=="function"){let T=R[G];D=w.call(S,T),R.splice(G,1),G--}return D}),r.formatArgs.call(S,R),(S.log||r.log).apply(S,R)}return x.namespace=l,x.useColors=r.useColors(),x.color=r.selectColor(l),x.extend=n,x.destroy=r.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(C!==r.namespaces&&(C=r.namespaces,v=r.enabled(l)),v),set:R=>{d=R}}),typeof r.init=="function"&&r.init(x),x}function n(l,p){let d=r(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function o(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p,d=(typeof l=="string"?l:"").split(/[\s,]+/),C=d.length;for(p=0;p<C;p++)d[p]&&(l=d[p].replace(/\*/g,".*?"),l[0]==="-"?r.skips.push(new RegExp("^"+l.slice(1)+"$")):r.names.push(new RegExp("^"+l+"$")))}function i(){let l=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),l}function s(l){if(l[l.length-1]==="*")return!0;let p,d;for(p=0,d=r.skips.length;p<d;p++)if(r.skips[p].test(l))return!1;for(p=0,d=r.names.length;p<d;p++)if(r.names[p].test(l))return!0;return!1}function a(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function u(l){return l instanceof Error?l.stack||l.message:l}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}_c.exports=Gg});var xc=b((ve,kr)=>{"use strict";c();ve.formatArgs=zg;ve.save=Kg;ve.load=Yg;ve.useColors=Wg;ve.storage=Xg();ve.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ve.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Wg(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function zg(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+kr.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}ve.log=console.debug||console.log||(()=>{});function Kg(e){try{e?ve.storage.setItem("debug",e):ve.storage.removeItem("debug")}catch{}}function Yg(){let e;try{e=ve.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Xg(){try{return localStorage}catch{}}kr.exports=qo()(ve);var{formatters:Qg}=kr.exports;Qg.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var bc=b((dS,Cc)=>{"use strict";c();Cc.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var wc=b((gS,Rc)=>{"use strict";c();var Zg=U("os"),Sc=U("tty"),Se=bc(),{env:ae}=process,Pr;Se("no-color")||Se("no-colors")||Se("color=false")||Se("color=never")?Pr=0:(Se("color")||Se("colors")||Se("color=true")||Se("color=always"))&&(Pr=1);function Jg(){if("FORCE_COLOR"in ae)return ae.FORCE_COLOR==="true"?1:ae.FORCE_COLOR==="false"?0:ae.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ae.FORCE_COLOR,10),3)}function eh(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function th(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=Jg();n!==void 0&&(Pr=n);let o=r?Pr:n;if(o===0)return 0;if(r){if(Se("color=16m")||Se("color=full")||Se("color=truecolor"))return 3;if(Se("color=256"))return 2}if(e&&!t&&o===void 0)return 0;let i=o||0;if(ae.TERM==="dumb")return i;if(process.platform==="win32"){let s=Zg.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in ae)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(s=>s in ae)||ae.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in ae)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ae.TEAMCITY_VERSION)?1:0;if(ae.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ae){let s=Number.parseInt((ae.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ae.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ae.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ae.TERM)||"COLORTERM"in ae?1:i}function Bo(e,t={}){let r=th(e,{streamIsTTY:e&&e.isTTY,...t});return eh(r)}Rc.exports={supportsColor:Bo,stdout:Bo({isTTY:Sc.isatty(1)}),stderr:Bo({isTTY:Sc.isatty(2)})}});var Ac=b((ce,Tr)=>{"use strict";c();var rh=U("tty"),Or=U("util");ce.init=lh;ce.log=sh;ce.formatArgs=oh;ce.save=ah;ce.load=ch;ce.useColors=nh;ce.destroy=Or.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ce.colors=[6,2,3,4,5,1];try{let e=wc();e&&(e.stderr||e).level>=2&&(ce.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ce.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function nh(){return"colors"in ce.inspectOpts?!!ce.inspectOpts.colors:rh.isatty(process.stderr.fd)}function oh(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
|
|
4
|
+
`).join(`
|
|
5
|
+
`+i),e.push(o+"m+"+Tr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=ih()+t+" "+e[0]}function ih(){return ce.inspectOpts.hideDate?"":new Date().toISOString()+" "}function sh(...e){return process.stderr.write(Or.format(...e)+`
|
|
6
|
+
`)}function ah(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function ch(){return process.env.DEBUG}function lh(e){e.inspectOpts={};let t=Object.keys(ce.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=ce.inspectOpts[t[r]]}Tr.exports=qo()(ce);var{formatters:Ec}=Tr.exports;Ec.o=function(e){return this.inspectOpts.colors=this.useColors,Or.inspect(e,this.inspectOpts).split(`
|
|
7
|
+
`).map(t=>t.trim()).join(" ")};Ec.O=function(e){return this.inspectOpts.colors=this.useColors,Or.inspect(e,this.inspectOpts)}});var Go=b((vS,Uo)=>{"use strict";c();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Uo.exports=xc():Uo.exports=Ac()});var $c=b((xS,Tc)=>{"use strict";c();var{hasOwnProperty:Wo}=Object.prototype,zo=(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
|
|
8
|
+
`:`
|
|
9
|
+
`,n=t.whitespace?" = ":"=",o=[],i=t.sort?Object.keys(e).sort():Object.keys(e),s=0;t.align&&(s=Ve(i.filter(f=>e[f]===null||Array.isArray(e[f])||typeof e[f]!="object").map(f=>Array.isArray(e[f])?`${f}[]`:f).concat([""]).reduce((f,l)=>Ve(f).length>=Ve(l).length?f:l)).length);let a="",u=t.bracketedArray?"[]":"";for(let f of i){let l=e[f];if(l&&Array.isArray(l))for(let p of l)a+=Ve(`${f}${u}`).padEnd(s," ")+n+Ve(p)+r;else l&&typeof l=="object"?o.push(f):a+=Ve(f).padEnd(s," ")+n+Ve(l)+r}t.section&&a.length&&(a="["+Ve(t.section)+"]"+(t.newline?r+r:r)+a);for(let f of o){let l=Pc(f,".").join("\\."),p=(t.section?t.section+".":"")+l,d=zo(e[f],{...t,section:p});a.length&&d.length&&(a+=r),a+=d}return a};function Pc(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 kc=(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 f of s){if(!f||f.match(/^\s*[;#]/)||f.match(/^\s*$/))continue;let l=f.match(i);if(!l)continue;if(l[1]!==void 0){if(o=$r(l[1]),o==="__proto__"){n=Object.create(null);continue}n=r[o]=r[o]||Object.create(null);continue}let p=$r(l[2]),d;t.bracketedArray?d=p.length>2&&p.slice(-2)==="[]":(a[p]=(a?.[p]||0)+1,d=a[p]>1);let C=d?p.slice(0,-2):p;if(C==="__proto__")continue;let v=l[3]?$r(l[4]):!0,x=v==="true"||v==="false"||v==="null"?JSON.parse(v):v;d&&(Wo.call(n,C)?Array.isArray(n[C])||(n[C]=[n[C]]):n[C]=[]),Array.isArray(n[C])?n[C].push(x):n[C]=x}let u=[];for(let f of Object.keys(r)){if(!Wo.call(r,f)||typeof r[f]!="object"||Array.isArray(r[f]))continue;let l=Pc(f,".");n=r;let p=l.pop(),d=p.replace(/\\\./g,".");for(let C of l)C!=="__proto__"&&((!Wo.call(n,C)||typeof n[C]!="object")&&(n[C]=Object.create(null)),n=n[C]);n===r&&d===p||(n[d]=r[f],u.push(f))}for(let f of u)delete r[f];return r},Oc=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),Ve=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Oc(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),$r=(e,t)=>{if(e=(e||"").trim(),Oc(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};Tc.exports={parse:kc,decode:kc,stringify:zo,encode:zo,safe:Ve,unsafe:$r}});var Xo=b((kS,Nc)=>{"use strict";c();var gh=U("os");Nc.exports=gh.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 Qo=b((OS,Dc)=>{"use strict";c();Dc.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 Vc=b(($S,Lt)=>{"use strict";c();var hh=process.platform==="win32",yh=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,Zo={};function vh(e){return yh.exec(e).slice(1)}Zo.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=vh(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 _h=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Jo={};function xh(e){return _h.exec(e).slice(1)}Jo.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=xh(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]}};hh?Lt.exports=Zo.parse:Lt.exports=Jo.parse;Lt.exports.posix=Jo.parse;Lt.exports.win32=Zo.parse});var ei=b((IS,Bc)=>{"use strict";c();var qc=U("path"),Hc=qc.parse||Vc(),jc=function(t,r){var n="/";/^([A-Za-z]:)/.test(t)?n="":/^\\\\/.test(t)&&(n="\\\\");for(var o=[t],i=Hc(t);i.dir!==o[o.length-1];)o.push(i.dir),i=Hc(i.dir);return o.reduce(function(s,a){return s.concat(r.map(function(u){return qc.resolve(n,a,u)}))},[])};Bc.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 jc(t,o)},r);var i=jc(t,o);return r&&r.paths?i.concat(r.paths):i}});var ti=b((MS,Uc)=>{"use strict";c();Uc.exports=function(e,t){return t||{}}});var zc=b((DS,Wc)=>{"use strict";c();var Ch="Function.prototype.bind called on incompatible ",bh=Object.prototype.toString,Sh=Math.max,Rh="[object Function]",Gc=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},wh=function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},Eh=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};Wc.exports=function(t){var r=this;if(typeof r!="function"||bh.apply(r)!==Rh)throw new TypeError(Ch+r);for(var n=wh(arguments,1),o,i=function(){if(this instanceof o){var l=r.apply(this,Gc(n,arguments));return Object(l)===l?l:this}return r.apply(t,Gc(n,arguments))},s=Sh(0,r.length-n.length),a=[],u=0;u<s;u++)a[u]="$"+u;if(o=Function("binder","return function ("+Eh(a,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var f=function(){};f.prototype=r.prototype,o.prototype=new f,f.prototype=null}return o}});var Yc=b((HS,Kc)=>{"use strict";c();var Ah=zc();Kc.exports=Function.prototype.bind||Ah});var Qc=b((qS,Xc)=>{"use strict";c();var kh=Function.prototype.call,Ph=Object.prototype.hasOwnProperty,Oh=Yc();Xc.exports=Oh.call(kh,Ph)});var Zc=b((US,Th)=>{Th.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 Mt=b((GS,tl)=>{"use strict";c();var $h=Qc();function Fh(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),u=parseInt(i[s]||0,10);if(a!==u)return o==="<"?a<u:o===">="?a>=u:!1}return o===">="}function Jc(e,t){var r=t.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!Fh(e,r[n]))return!1;return!0}function Ih(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(Jc(r,t[n]))return!0;return!1}return Jc(r,t)}var el=Zc();tl.exports=function(t,r){return $h(el,t)&&Ih(r,el[t])}});var ol=b((zS,nl)=>{"use strict";c();var ot=U("fs"),Lh=Xo(),re=U("path"),Mh=Qo(),Nh=ei(),Dh=ti(),Vh=Mt(),Hh=process.platform!=="win32"&&ot.realpath&&typeof ot.realpath.native=="function"?ot.realpath.native:ot.realpath,rl=Lh(),jh=function(){return[re.join(rl,".node_modules"),re.join(rl,".node_libraries")]},qh=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())})},Bh=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())})},Uh=function(t,r){Hh(t,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?t:o)})},Nt=function(t,r,n,o){n&&n.preserveSymlinks===!1?t(r,o):o(null,r)},Gh=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)}})},Wh=function(t,r,n){for(var o=Nh(r,n,t),i=0;i<o.length;i++)o[i]=re.join(o[i],t);return o};nl.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=Dh(t,i);var a=i.isFile||qh,u=i.isDirectory||Bh,f=i.readFile||ot.readFile,l=i.realpath||Uh,p=i.readPackage||Gh;if(i.readFile&&i.readPackage){var d=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(d)})}var C=i.packageIterator,v=i.extensions||[".js"],x=i.includeCoreModules!==!1,R=i.basedir||re.dirname(Mh()),S=i.filename||R;i.paths=i.paths||jh();var I=re.resolve(R);Nt(l,I,i,function(m,k){m?o(m):G(k)});var L;function G(m){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t))L=re.resolve(m,t),(t==="."||t===".."||t.slice(-1)==="/")&&(L+="/"),/\/$/.test(t)&&L===m?w(L,i.package,O):D(L,i.package,O);else{if(x&&Vh(t))return o(null,t);z(t,m,function(k,$,V){if(k)o(k);else{if($)return Nt(l,$,i,function(_,q){_?o(_):o(null,q,V)});var y=new Error("Cannot find module '"+t+"' from '"+S+"'");y.code="MODULE_NOT_FOUND",o(y)}})}}function O(m,k,$){m?o(m):k?o(null,k,$):w(L,function(V,y,_){if(V)o(V);else if(y)Nt(l,y,i,function(F,M){F?o(F):o(null,M,_)});else{var q=new Error("Cannot find module '"+t+"' from '"+S+"'");q.code="MODULE_NOT_FOUND",o(q)}})}function D(m,k,$){var V=k,y=$;typeof V=="function"&&(y=V,V=void 0);var _=[""].concat(v);q(_,m,V);function q(F,M,W){if(F.length===0)return y(null,void 0,W);var j=M+F[0],ne=W;ne?J(null,ne):A(re.dirname(j),J);function J(le,H,me){if(ne=H,le)return y(le);if(me&&ne&&i.pathFilter){var lt=re.relative(me,j),P=lt.slice(0,lt.length-F[0].length),K=i.pathFilter(ne,M,P);if(K)return q([""].concat(v.slice()),re.resolve(me,K),ne)}a(j,Le)}function Le(le,H){if(le)return y(le);if(H)return y(null,j,ne);q(F.slice(1),M,ne)}}}function A(m,k){if(m===""||m==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(m)||/[/\\]node_modules[/\\]*$/.test(m))return k(null);Nt(l,m,i,function($,V){if($)return A(re.dirname(m),k);var y=re.join(V,"package.json");a(y,function(_,q){if(!q)return A(re.dirname(m),k);p(f,y,function(F,M){F&&k(F);var W=M;W&&i.packageFilter&&(W=i.packageFilter(W,y)),k(null,W,m)})})})}function w(m,k,$){var V=$,y=k;typeof y=="function"&&(V=y,y=i.package),Nt(l,m,i,function(_,q){if(_)return V(_);var F=re.join(q,"package.json");a(F,function(M,W){if(M)return V(M);if(!W)return D(re.join(m,"index"),y,V);p(f,F,function(j,ne){if(j)return V(j);var J=ne;if(J&&i.packageFilter&&(J=i.packageFilter(J,F)),J&&J.main){if(typeof J.main!="string"){var Le=new TypeError("package \u201C"+J.name+"\u201D `main` must be a string");return Le.code="INVALID_PACKAGE_MAIN",V(Le)}(J.main==="."||J.main==="./")&&(J.main="index"),D(re.resolve(m,J.main),J,function(le,H,me){if(le)return V(le);if(H)return V(null,H,me);if(!me)return D(re.join(m,"index"),me,V);var lt=re.resolve(m,me.main);w(lt,me,function(P,K,E){if(P)return V(P);if(K)return V(null,K,E);D(re.join(m,"index"),E,V)})});return}D(re.join(m,"/index"),J,V)})})})}function T(m,k){if(k.length===0)return m(null,void 0);var $=k[0];u(re.dirname($),V);function V(q,F){if(q)return m(q);if(!F)return T(m,k.slice(1));D($,i.package,y)}function y(q,F,M){if(q)return m(q);if(F)return m(null,F,M);w($,i.package,_)}function _(q,F,M){if(q)return m(q);if(F)return m(null,F,M);T(m,k.slice(1))}}function z(m,k,$){var V=function(){return Wh(m,k,i)};T($,C?C(m,k,V,i):V())}}});var il=b((YS,zh)=>{zh.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 ll=b((XS,cl)=>{"use strict";c();var Kh=Mt(),sl=il(),al={};for(Ir in sl)Object.prototype.hasOwnProperty.call(sl,Ir)&&(al[Ir]=Kh(Ir));var Ir;cl.exports=al});var fl=b((ZS,ul)=>{"use strict";c();var Yh=Mt();ul.exports=function(t){return Yh(t)}});var ml=b((eR,dl)=>{"use strict";c();var Xh=Mt(),it=U("fs"),pe=U("path"),Qh=Xo(),Zh=Qo(),Jh=ei(),ey=ti(),ty=process.platform!=="win32"&&it.realpathSync&&typeof it.realpathSync.native=="function"?it.realpathSync.native:it.realpathSync,pl=Qh(),ry=function(){return[pe.join(pl,".node_modules"),pe.join(pl,".node_libraries")]},ny=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())},oy=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()},iy=function(t){try{return ty(t)}catch(r){if(r.code!=="ENOENT")throw r}return t},Dt=function(t,r,n){return n&&n.preserveSymlinks===!1?t(r):r},sy=function(t,r){var n=t(r);try{var o=JSON.parse(n);return o}catch{}},ay=function(t,r,n){for(var o=Jh(r,n,t),i=0;i<o.length;i++)o[i]=pe.join(o[i],t);return o};dl.exports=function(t,r){if(typeof t!="string")throw new TypeError("Path must be a string.");var n=ey(t,r),o=n.isFile||ny,i=n.readFileSync||it.readFileSync,s=n.isDirectory||oy,a=n.realpathSync||iy,u=n.readPackageSync||sy;if(n.readFileSync&&n.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var f=n.packageIterator,l=n.extensions||[".js"],p=n.includeCoreModules!==!1,d=n.basedir||pe.dirname(Zh()),C=n.filename||d;n.paths=n.paths||ry();var v=Dt(a,pe.resolve(d),n);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)){var x=pe.resolve(v,t);(t==="."||t===".."||t.slice(-1)==="/")&&(x+="/");var R=L(x)||O(x);if(R)return Dt(a,R,n)}else{if(p&&Xh(t))return t;var S=D(t,v);if(S)return Dt(a,S,n)}var I=new Error("Cannot find module '"+t+"' from '"+C+"'");throw I.code="MODULE_NOT_FOUND",I;function L(A){var w=G(pe.dirname(A));if(w&&w.dir&&w.pkg&&n.pathFilter){var T=pe.relative(w.dir,A),z=n.pathFilter(w.pkg,A,T);z&&(A=pe.resolve(w.dir,z))}if(o(A))return A;for(var m=0;m<l.length;m++){var k=A+l[m];if(o(k))return k}}function G(A){if(!(A===""||A==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(A))&&!/[/\\]node_modules[/\\]*$/.test(A)){var w=pe.join(Dt(a,A,n),"package.json");if(!o(w))return G(pe.dirname(A));var T=u(i,w);return T&&n.packageFilter&&(T=n.packageFilter(T,A)),{pkg:T,dir:A}}}function O(A){var w=pe.join(Dt(a,A,n),"/package.json");if(o(w)){try{var T=u(i,w)}catch{}if(T&&n.packageFilter&&(T=n.packageFilter(T,A)),T&&T.main){if(typeof T.main!="string"){var z=new TypeError("package \u201C"+T.name+"\u201D `main` must be a string");throw z.code="INVALID_PACKAGE_MAIN",z}(T.main==="."||T.main==="./")&&(T.main="index");try{var m=L(pe.resolve(A,T.main));if(m)return m;var k=O(pe.resolve(A,T.main));if(k)return k}catch{}}}return L(pe.join(A,"/index"))}function D(A,w){for(var T=function(){return ay(A,w,n)},z=f?f(A,w,T,n):T(),m=0;m<z.length;m++){var k=z[m];if(s(pe.dirname(k))){var $=L(k);if($)return $;var V=O(k);if(V)return V}}}}});var hl=b((rR,gl)=>{"use strict";c();var Lr=ol();Lr.core=ll();Lr.isCore=fl();Lr.sync=ml();gl.exports=Lr});var gi=b((HE,mi)=>{"use strict";c();var n_=U("tty"),o_=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||n_.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),X=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+Iu(o,t,r,i)+t:e+o+t},Iu=(e,t,r,n)=>{let o=e.substring(0,n)+r,i=e.substring(n+t.length),s=i.indexOf(t);return~s?o+Iu(i,t,r,s):o+i},Lu=(e=o_)=>({isColorSupported:e,reset:e?t=>`\x1B[0m${t}\x1B[0m`:String,bold:e?X("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?X("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?X("\x1B[3m","\x1B[23m"):String,underline:e?X("\x1B[4m","\x1B[24m"):String,inverse:e?X("\x1B[7m","\x1B[27m"):String,hidden:e?X("\x1B[8m","\x1B[28m"):String,strikethrough:e?X("\x1B[9m","\x1B[29m"):String,black:e?X("\x1B[30m","\x1B[39m"):String,red:e?X("\x1B[31m","\x1B[39m"):String,green:e?X("\x1B[32m","\x1B[39m"):String,yellow:e?X("\x1B[33m","\x1B[39m"):String,blue:e?X("\x1B[34m","\x1B[39m"):String,magenta:e?X("\x1B[35m","\x1B[39m"):String,cyan:e?X("\x1B[36m","\x1B[39m"):String,white:e?X("\x1B[37m","\x1B[39m"):String,gray:e?X("\x1B[90m","\x1B[39m"):String,bgBlack:e?X("\x1B[40m","\x1B[49m"):String,bgRed:e?X("\x1B[41m","\x1B[49m"):String,bgGreen:e?X("\x1B[42m","\x1B[49m"):String,bgYellow:e?X("\x1B[43m","\x1B[49m"):String,bgBlue:e?X("\x1B[44m","\x1B[49m"):String,bgMagenta:e?X("\x1B[45m","\x1B[49m"):String,bgCyan:e?X("\x1B[46m","\x1B[49m"):String,bgWhite:e?X("\x1B[47m","\x1B[49m"):String});mi.exports=Lu();mi.exports.createColors=Lu});c();import _x from"node:process";import xx from"yargs";import{hideBin as Cx}from"yargs/helpers";var ut="0.15.14";c();var eu=Me(Er(),1);import{dirname as zy,resolve as Ky}from"node:path";import{readFile as Yy}from"node:fs/promises";import{cyan as Xy,dim as Ql,yellow as Qy}from"kolorist";import Zl from"fs-extra";import Zy from"gray-matter";import Jy from"markdown-it";import{Feed as ev}from"feed";import Ht from"consola";c();var Bl=Me(Go(),1),Ul=Me(Er(),1);import{dirname as Dy,resolve as Vr}from"node:path";import jl from"node:process";import Vy from"fs-extra";import{ensureSuffix as ql,uniq as Hy}from"@antfu/utils";import Gl from"defu";import{cyan as jy,magenta as qy,yellow as By}from"kolorist";import Wl from"consola";c();import{join as Rl}from"node:path";import xy from"is-installed-globally";c();var Ic=Me($c(),1);import ie from"node:process";import se from"node:path";import Ko from"node:os";import Fr from"node:fs";var It=ie.platform==="win32",Fc=e=>{try{return Ic.default.parse(Fr.readFileSync(e,"utf8")).prefix}catch{}},uh=()=>Object.keys(ie.env).reduce((e,t)=>/^npm_config_prefix$/i.test(t)?ie.env[t]:e,void 0),fh=()=>{if(It&&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")}},ph=()=>{if(It){let{APPDATA:e}=ie.env;return e?se.join(e,"npm"):se.dirname(ie.execPath)}return se.dirname(se.dirname(ie.execPath))},dh=()=>{let e=uh();if(e)return e;let t=Fc(se.join(Ko.homedir(),".npmrc"));if(t)return t;if(ie.env.PREFIX)return ie.env.PREFIX;let r=Fc(fh());return r||ph()},Ft=se.resolve(dh()),Lc=()=>{if(It&&ie.env.LOCALAPPDATA){let e=se.join(ie.env.LOCALAPPDATA,"Yarn");if(Fr.existsSync(e))return e}return!1},mh=()=>{if(ie.env.PREFIX)return ie.env.PREFIX;let e=Lc();if(e)return e;let t=se.join(Ko.homedir(),".config/yarn");if(Fr.existsSync(t))return t;let r=se.join(Ko.homedir(),".yarn-config");return Fr.existsSync(r)?r:Ft},Te={};Te.npm={};Te.npm.prefix=Ft;Te.npm.packages=se.join(Ft,It?"node_modules":"lib/node_modules");Te.npm.binaries=It?Ft:se.join(Ft,"bin");var Mc=se.resolve(mh());Te.yarn={};Te.yarn.prefix=Mc;Te.yarn.packages=se.join(Mc,Lc()?"Data/global/node_modules":"global/node_modules");Te.yarn.binaries=se.join(Te.yarn.packages,".bin");var Yo=Te;var El=Me(hl(),1);import wl from"consola";c();import{spawn as cy}from"cross-spawn";function Vt(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=cy("git",o),s="";i.stdout.on("data",a=>s+=String(a)),i.on("close",()=>{r(+new Date(s))}),i.on("error",()=>{r(0)})})}c();c();var Mr="<!-- more -->",Ct=/^https?:/i,yl=/^pathname:\/\//,vl="/:all(.*)*";function _l(e){return Ct.test(e)}function $e(e){return e.replace(/\\/g,"/")}function ri(e,t){return t.startsWith(e)?t:e+t}function Z(e){return`/@fs${ri("/",$e(e))}`}function xl(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}c();import{existsSync as py}from"node:fs";import{resolve as dy}from"node:path";import my from"node:process";import{mergeConfig as gy}from"vite";import{createDefu as hy}from"defu";import{isFunction as Cl}from"@antfu/utils";import{cyan as yy,dim as vy}from"kolorist";import _y from"consola";c();import ly from"node:process";import{loadConfig as uy}from"unconfig";import{normalizePath as fy}from"vite";async function st(e,t={}){let{config:r,sources:n}=await uy({sources:{files:e,rewrite:t.rewrite},cwd:t.cwd||ly.cwd()}),o=fy(n[0]||"");return{config:r,configFile:o}}var bt=hy((e,t,r)=>{if(Cl(e[t])&&Cl(r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=gy(e[t],r),!0});async function ni(e,t){return st("valaxy.config",{rewrite(r){return typeof r=="function"?r(t||{}):r},cwd:e})}async function bl(e){let t=e.userRoot||my.cwd(),{config:r,configFile:n}=await ni(t);r&&_y.success(`Resolve ${yy("userValaxyConfig")} from ${vy(n)}`);let o=e.theme||r?.theme||"yun";return{config:r,configFile:n,theme:o}}async function Sl(e,t){let r={};for(let n of e){if(!py(dy(n.root,"valaxy.config.ts")))continue;let{config:o,configFile:i}=await st("valaxy.config",{rewrite(s,a){return typeof s=="function"?s(n,t):s},cwd:n.root});o&&(n.configFile=i,r=bt(o,r))}return r}function Al(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}function Fe(e,t=!1,r={preserveSymlinks:!1}){try{return(0,El.sync)(e,r)}catch(n){wl.log(n)}if(xy){try{return U.resolve(Rl(Yo.yarn.packages,e))}catch{}try{return U.resolve(Rl(Yo.npm.packages,e))}catch{}}if(t)throw new Error(`Failed to resolve package ${e}`);wl.error(`Failed to resolve package ${e}`)}c();import{webcrypto as kl}from"node:crypto";c();function Cy(e){return e}var DR=Cy;function by(e){return e}var VR=by;function BR(e){return e}function Sy(e){return e}var UR=Sy,oi={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:kl.getRandomValues(new Uint8Array(16)),iv:kl.getRandomValues(new Uint8Array(16))}},Pl={ignoreDeadLinks:!0,siteConfig:oi,theme:"yun",themeConfig:{pkg:{name:"",version:""}},runtimeConfig:{addons:{}},modules:{rss:{enable:!0}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}}};function GR(e){return e}c();import{resolve as Ay}from"node:path";import Nl from"node:process";import $l from"fs-extra";import Fl from"defu";import{cyan as Il,dim as Ll,yellow as ky}from"kolorist";import Py from"ora";c();import Ry from"consola";c();import Ol from"node:process";function ii(){return Ol.env.NODE_ENV==="production"}function si(e="development"){Ol.env.NODE_ENV=e,at.level=ii()?2:3}function St(){return si("production")}var at=Ry.create({level:ii()?2:3});c();import{dirname as Tl,resolve as wy}from"node:path";import Ey from"fs-extra";function Nr(e,t){if(!e)return"";if(xl(e))if(t){let r=Ey.lstatSync(t).isFile();return wy(r?Tl(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return Tl(Fe(`${e}/package.json`)||"")}async function Dl(e,t=Nl.cwd()){let r=Py(`Resolve ${Il("addons")} from ${Ll(t)}`).start(),n={},o=s=>{s&&(n[s.name]=Fl(n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await Ml(s,{cwd:t}));continue}typeof s=="object"&&o(Fl(await Ml(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{at.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${ky(s.name)}${s.global?Il(" (global)"):""} ${Ll(s.pkg.homepage||s.pkg.repository)}`)}),i}async function Ml(e,t={}){let r=Oy(e,t.cwd||Nl.cwd()),n=Ay(r,"./package.json");if(!$l.existsSync(n)){at.error(`No addon named ${e} found`);return}let o=await $l.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}function Oy(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return Nr(r,t)}c();function Vl(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return Nr(r,t)}c();import{cyan as Ty,dim as $y}from"kolorist";import Fy from"consola";async function Iy(e){return st("site.config",{cwd:e})}async function Dr(e){let{config:t,configFile:r}=await Iy(e);return t&&Fy.success(`Resolve ${Ty("siteConfig")} from ${$y(r)}`),{siteConfig:t,siteConfigFile:r}}c();import{cyan as Ly,dim as My}from"kolorist";async function Ny(e){return st("theme.config",{cwd:e})}async function Hl(e){let{config:t,configFile:r}=await Ny(e);return t&&at.info(`Resolve ${Ly("themeConfig")} from ${My(r)}`),{themeConfig:t,themeConfigFile:r}}var Uy=(0,Bl.default)("valaxy:options");async function Gy(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=ql("/",o.url||""),o.cdn.prefix=ql("/",o.cdn.prefix||"");let i=Vr(r,"package.json");try{t.themeConfig.pkg=await Vy.readJson(i,"utf-8")}catch{console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function ai(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await Dl(t.addons||[],e.userRoot),s=await Sl(i,e);t=bt(t,s);let a=Gl(t,Pl);e.config={...a,runtimeConfig:{addons:{}}},e.addons=i,i.forEach(p=>{e.config.runtimeConfig.addons[p.name]=p});let u=i.map(({root:p})=>p),f=i.map(({name:p})=>p);e.addonRoots=u,e.roots=Hy([r,n,...u,o]);let l=e.config.vite?.build?.rollupOptions?.external||[];return e.config.vite.build.rollupOptions.external=l.filter(p=>!f.includes(p)),await Gy(e),e}async function _e(e={userRoot:jl.cwd()},t="dev"){let r=Dy(Fe("valaxy/package.json",!0)),n=Vr(r,"client"),o=$e(Vr(e.userRoot||jl.cwd()));Wl.start(`Resolve ${qy("valaxy")} config...`);let[i,s,a,u]=await Promise.all([bl(e),Dr(e.userRoot),Hl(e.userRoot),(0,Ul.default)(["**.md"],{cwd:Vr(o,"pages"),ignore:["**/node_modules"]})]),{config:f,configFile:l,theme:p}=i,{siteConfig:d,siteConfigFile:C}=s,{themeConfig:v,themeConfigFile:x}=a;f=Gl({siteConfig:d},{themeConfig:v},f);let R=Vl(p,e.userRoot),S={mode:t,pkgRoot:r,clientRoot:n,userRoot:o,themeRoot:R,addonRoots:[],roots:[],theme:p,config:{...f,runtimeConfig:{addons:{}}},configFile:l||"",siteConfigFile:C||"",themeConfigFile:x||"",pages:u.sort(),addons:[]};Uy(S);let I=await ci(S),L=bt(f,I);return S=await ai(S,L),S}async function ci(e){let{config:t}=await ni(e.themeRoot,e);return t&&Wl.success(`Resolve ${jy("valaxy.config.ts")} from ${By(`theme(${e.theme})`)}`),t}c();import zl from"fs-extra";async function Kl(e){return await Vt(e,"created")||(await zl.stat(e)).ctime}async function Yl(e){return await Vt(e,"created")||(await zl.stat(e)).mtime}c();function ze(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}c();function Xl(e,t){t.forEach(r=>{r.setup?.(e)})}var tv=Jy({html:!0,breaks:!0,linkify:!0});async function Jl(e){Ht.info(`${Qy("RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){Ht.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};Ht.info(`RSS Site Url: ${Xy(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`},u={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(x=>{u.feedLinks[x]=`${n}${a[x]}`});let f=await(0,eu.default)(`${e.userRoot}/pages/posts/**/*.md`),l=[];for await(let x of f){let R=await Yy(x,"utf-8"),{data:S,content:I,excerpt:L}=Zy(R,{excerpt_separator:Mr});if(S.password)continue;if(S.draft){Ht.warn(`Ignore draft post: ${Ql(x)}`);continue}if(S.hide)continue;let G=x;S.date||(S.date=await Kl(G)),r.lastUpdated&&(S.updated||(S.updated=await Yl(G)));let O=tv.render(L||I.slice(0,100)).replace('src="/',`src="${o}/`);S.image?.startsWith("/")&&(S.image=o+S.image),l.push({title:"",...S,id:(S.id||"").toString(),date:new Date(S.date),published:new Date(S.updated||S.date),content:O,author:[i],link:o+x.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}l.sort((x,R)=>+new Date(R.published||R.date)-+new Date(x.published||x.date));let p=r.author?.avatar||"/favicon.svg";u.author=i,u.image=_l(p)?r.author?.avatar:`${o}${ri("/",p)}`,u.favicon=`${o}${r.feed?.favicon||r.favicon}`;let d=new ev(u);l.forEach(x=>d.addItem(x)),await Zl.ensureDir(zy(`./dist/${a.atom}`));let C=Ky(e.userRoot,"./dist");["rss","atom","json"].forEach(x=>{let R="",S=`${C}/${a[x]}`;x==="rss"?R=d.rss2():x==="atom"?R=d.atom1():x==="json"&&(R=d.json1()),Zl.writeFileSync(S,R,"utf-8"),Ht.info(`${x}: ${Ql(S)}`)})}var Hr={extendCli(e){e.command("rss [root]","generate rss feed",t=>ze(t).strict().help(),async({root:t})=>{St();let r=await _e({userRoot:t},"build");await Jl(r)})},setup(e){e.hook("build:after",()=>{console.log(),Jl(e.options)})}};c();var tu=Me(Er(),1);import jt from"node:path";import Ke from"fs-extra";import Rt from"consola";import rv from"gray-matter";import{cyan as nv,dim as qt}from"kolorist";async function ru(e){Rt.start(`Generate List for Fuse Search by (${nv("fuse.js")}) ...`);let t=await(0,tu.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=Ke.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=rv(o,{excerpt_separator:"<!-- more -->"});if(i.draft){Rt.warn(`Ignore draft post: ${qt(n)}`);continue}if(i.hide||i.password)continue;let u=e.config.siteConfig.fuse.options.keys||[],f={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$/,""))};u.includes("content")&&(f.content=a||""),r.push(f)}return r}function ov(e){e.command("fuse [root]","generate fuse list for search",t=>ze(t).strict().help(),async({root:t})=>{Rt.info("Please generate it before build."),St();let r=await _e({userRoot:t},"build"),n=await ru(r);await Ke.ensureDir("./dist");let o=jt.resolve(r.userRoot,"public"),i=jt.resolve(o,r.config.siteConfig.fuse.dataPath),s=jt.join("public",r.config.siteConfig.fuse.dataPath);await Ke.ensureFile(i),Ke.writeJSONSync(i,n),Rt.success(`Generate fuse list in ${qt(o)}`);let a=jt.resolve(r.userRoot,"dist"),u=jt.resolve(a,r.config.siteConfig.fuse.dataPath);await Ke.ensureDir(a),Ke.writeJSONSync(u,n),Rt.success(`Generate fuse list in ${qt(a)}`);try{if(!(await Ke.readFile(`${r.userRoot}/.gitignore`,"utf-8")).includes(s)){let l=s.replace(/\\/g,"/");await Ke.appendFile(`${r.userRoot}/.gitignore`,`
|
|
10
|
+
# valaxy
|
|
11
|
+
${l}
|
|
12
|
+
`),Rt.success(`Add ${qt(l)} to ${qt(".gitignore")}`)}}catch{}})}var nu={extendCli(e){ov(e)},setup(e){e.hook("build:before",()=>{ru(e.options)})}};c();c();import{join as lv,resolve as su}from"node:path";import{writeFile as uv}from"node:fs/promises";import{render as fv}from"ejs";import pv from"dayjs";import{ensureSuffix as dv}from"@antfu/utils";import{consola as li}from"consola";import{green as mv,magenta as gv}from"kolorist";c();import{access as iv}from"node:fs/promises";async function jr(e){try{return await iv(e),!0}catch{return!1}}c();import av from"node:path";import{readFile as cv}from"node:fs/promises";c();import sv from"node:process";var Bt=sv.cwd(),ou=`---
|
|
13
|
+
layout: <%=layout%>
|
|
14
|
+
title: <%=title%>
|
|
15
|
+
date: <%=date%>
|
|
16
|
+
---
|
|
17
|
+
`;async function iu(e){let{clientRoot:t,themeRoot:r}=await _e({userRoot:Bt}),n=[Bt,r,t];for(let o of n){let i=av.resolve(o,"scaffolds",`${e}.md`);if(await jr(i))return cv(i,"utf-8")}return!1}async function au(e){let t=su(Bt,"pages"),{path:r,title:n}=e,o=r||lv("posts",n),i=0;for(;;){let s=su(t,o);if(i&&(s=`${s}-${i}`),s=dv(".md",s),!await jr(s)){let a=await hv(e);try{await uv(s,a,"utf-8"),li.success(`[valaxy new]: successfully generated file ${gv(s)}`)}catch(u){console.log(u),li.error(`[valaxy new]: failed to write file ${s}`),li.warn(`You should run ${mv("valaxy new")} in your valaxy project root directory.`)}return s}i++}}async function hv({date:e,title:t,layout:r="post"}){let n=await iu(r);n||(n=ou);let o="YYYY-MM-DD HH:mm:ss";return fv(n,{title:t,layout:r,date:e?pv().format(o):""})}function cu(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 au({title:t,date:n,layout:o,path:r})})}c();import en from"node:path";import ki from"consola";import{mergeConfig as Of}from"vite";import tn from"fs-extra";import{yellow as ux}from"kolorist";c();import{resolve as K1}from"node:path";import{mergeConfig as xf,build as Y1}from"vite";import{build as X1}from"vite-ssg/node";import Q1 from"vite-ssg-sitemap";import Ei from"fs-extra";import Z1 from"consola";c();import{splitVendorChunkPlugin as j1}from"vite";import q1 from"markdown-it";import B1 from"@vitejs/plugin-vue";import U1 from"vite-plugin-vue-layouts";import G1 from"unplugin-vue-components/vite";import W1 from"@intlify/unplugin-vue-i18n/vite";import z1 from"@unhead/addons/vite";c();import v_ from"markdown-it";import Ku from"markdown-it-anchor";import __ from"markdown-it-attrs";import x_ from"markdown-it-emoji";import C_ from"markdown-it-task-lists";c();var lu=new Set([!0,!1,"alt","title"]);function uu(e,t){return(Array.isArray(e)?e:[]).filter(([r])=>r!==t)}function fu(e,t){e&&e.attrs&&(e.attrs=uu(e.attrs,t))}function yv(e,t){if(!lu.has(e))throw new TypeError(`figcaption must be one of: ${[...lu]}.`);if(e==="alt")return t.content;let r=t.attrs.find(([n])=>n==="title");return Array.isArray(r)&&r[1]?(fu(t,"title"),r[1]):void 0}function pu(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[f,l,p]=s.children;if(f.type!=="link_open"||l.type!=="image"||p.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],u;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){[u]=s.children;let f=new r.Token("link_open","a",1);f.attrPush(["href",u.attrGet("src")]),s.children.unshift(f),s.children.push(new r.Token("link_close","a",-1))}if(u=s.children.length===1?s.children[0]:s.children[1],t.figcaption){let f=yv(t.figcaption,u);if(f){let[l]=e.parseInline(f,r.env);s.children.push(new r.Token("figcaption_open","figcaption",1)),s.children.push(...l.children),s.children.push(new r.Token("figcaption_close","figcaption",-1)),u.attrs&&(u.attrs=uu(u.attrs,"title"))}}if(t.copyAttrs&&u.attrs){let f=t.copyAttrs===!0?"":t.copyAttrs;a.attrs=u.attrs.filter(([l])=>l.match(f)).map(l=>Array.from(l))}if(t.tabindex&&(r.tokens[o-1].attrPush(["tabindex",n]),n++),t.lazy&&(u.attrs.some(([f])=>f==="loading")||u.attrs.push(["loading","lazy"])),t.async&&(u.attrs.some(([f])=>f==="decoding")||u.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let f=!1;for(let l=0,p=u.attrs.length;l<p&&!f;l++){let d=u.attrs[l];d[0]==="class"&&(d[1]=`${d[1]} ${t.classes}`,f=!0)}f||u.attrs.push(["class",t.classes])}if(t.removeSrc){let f=u.attrs.find(([l])=>l==="src");u.attrs.push(["data-src",f[1]]),fu(u,"src")}}})}c();import vv from"markdown-it/lib/common/html_blocks.js";var _v="[a-zA-Z_:@][a-zA-Z0-9:._-]*",xv="[^\"'=<>`\\x00-\\x20]+",Cv="'[^']*'",bv='"[^"]*"',Sv="(?:"+xv+"|"+Cv+"|"+bv+")",ui="(?:\\s+"+_v+"(?:\\s*=\\s*"+Sv+")?)",du="<[A-Za-z][A-Za-z0-9\\-]*"+ui+"*\\s*\\/?>",mu="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Rv="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",wv="<[?][\\s\\S]*?[?]>",Ev="<![A-Z]+\\s+[^>]*>",Av="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",kv=new RegExp("^(?:"+du+"|"+mu+"|"+Rv+"|"+wv+"|"+Ev+"|"+Av+")"),Pv=new RegExp("^(?:"+du+"|"+mu+")"),Ov=new RegExp("^<[A-Za-z][A-Za-z0-9\\-]*"+ui+"*\\s*\\/>"),Tv=new RegExp("^<([A-Za-z][A-Za-z0-9\\-]*)"+ui+"*\\s*>.*<\\/\\1\\s*>"),$v=vv,Fv=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],Iv=["template","component","transition","transition-group","keep-alive","slot","teleport"],Lv=({blockTags:e,inlineTags:t})=>{let r=[...e,...$v],n=[...t,...Fv.filter(i=>!Iv.includes(i))];return[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp("^</?(?!("+n.join("|")+")(?![\\w-]))[A-Za-z][A-Za-z0-9\\-]*(?=(\\s|/?>|$))"),/^$/,!0],[new RegExp(Pv.source+"\\s*$"),/^$/,!1]]},Mv=e=>{let t=Lv(e);return(r,n,o,i)=>{let s,a,u,f=r.bMarks[n]+r.tShift[n],l=r.eMarks[n];if(r.sCount[n]-r.blkIndent>=4||!r.md.options.html||r.src.charCodeAt(f)!==60)return!1;for(u=r.src.slice(f,l),s=0;s<t.length&&!t[s][0].test(u);s++);if(s===t.length)return!1;if(i)return t[s][2];if(s===6){let d=u.match(Ov)??u.match(Tv);if(d){r.line=n+1;let C=r.push("html_inline","",0);return C.content=d[0],C.map=[n,r.line],C=r.push("inline","",0),C.content=u.slice(d[0].length),C.map=[n,r.line],C.children=[],!0}}if(a=n+1,!t[s][1].test(u)){for(;a<o&&!(r.sCount[a]<r.blkIndent);a++)if(f=r.bMarks[a]+r.tShift[a],l=r.eMarks[a],u=r.src.slice(f,l),t[s][1].test(u)){u.length!==0&&a++;break}}r.line=a;let p=r.push("html_block","",0);return p.map=[n,a],p.content=r.getLines(n,a,r.blkIndent,!0),!0}},Nv=e=>{let t=e|32;return t>=97&&t<=122},Dv=(e,t)=>{let{pos:r}=e;if(!e.md.options.html)return!1;let n=e.posMax;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!Nv(o))return!1;let i=e.src.slice(r).match(kv);if(!i)return!1;if(!t){let s=e.push("html_inline","",0);s.content=e.src.slice(r,r+i[0].length)}return e.pos+=i[0].length,!0},gu=(e,{blockTags:t=[],inlineTags:r=[]}={})=>{let n=Mv({blockTags:t,inlineTags:r});e.block.ruler.at("html_block",n,{alt:["paragraph","reference","blockquote"]}),e.inline.ruler.at("html_inline",Dv)};c();import Vv from"gray-matter";var hu=(e,{grayMatterOptions:t,renderExcerpt:r=!0}={})=>{let n=e.render.bind(e);e.render=(o,i={})=>{let{data:s,content:a,excerpt:u=""}=Vv(o,t);return i.content=a,i.frontmatter={...i.frontmatter,...s},i.excerpt=r&&u?n(u,{...i}):u,n(a,i)}};c();c();var Hv={"&":"&","<":"<",">":">","'":"'",'"':"""},jv=/[&<>'"]/g,ct=e=>e.replace(jv,t=>Hv[t]);var Ut=(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}${ct(a.content)}`:`${s}${a.content}`,"").trim()},qr=(e,{level:t,shouldAllowHtml:r,shouldAllowNested:n,shouldEscapeText:o,slugify:i,format:s})=>{let a=[],u=[],f=l=>{for(;u.length!==0&&l.level<=u[0].level;)u.shift();u.length===0?(a.push(l),u.push(l)):(u[0].children.push(l),u.unshift(l))};for(let l=0;l<e.length;l+=1){let p=e[l];if(p?.type!=="heading_open"||p?.level!==0&&!n)continue;let d=Number.parseInt(p.tag.slice(1),10);if(!t.includes(d))continue;let C=e[l+1];if(!C)continue;let v=Ut(C,{shouldAllowHtml:r,shouldEscapeText:o}),x=p.attrGet("id")??i(v);f({level:d,title:s?.(v)??v,slug:x,link:`#${x}`,children:[]})}return a},qv=/[\u0000-\u001f]/g,Bv=/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g,Uv=/[\u0300-\u036F]/g,Ye=e=>e.normalize("NFKD").replace(Uv,"").replace(qv,"").replace(Bv,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase();var yu=(e,{level:t=[2,3],shouldAllowNested:r=!1,slugify:n=Ye,format:o}={})=>{let i=e.renderer.render.bind(e.renderer);e.renderer.render=(s,a,u)=>(u.headers=qr(s,{level:t,shouldAllowHtml:!1,shouldAllowNested:r,shouldEscapeText:!1,slugify:n,format:o}),i(s,a,u))};c();var vu="script",_u="style",Gt="template",Gv=/^<script\s+.*?\bsetup\b.*?>$/is,Wv=({customBlocks:e})=>{let t=Array.from(new Set([vu,_u,...e])).join("|");return new RegExp(`^\\s*(?<content>(?<tagOpen><(?<type>${t})\\s?.*?>)(?<contentStripped>.*)(?<tagClose><\\/\\k<type>\\s*>))\\s*$`,"is")},xu=(e,{customBlocks:t=[]}={})=>{let r=Wv({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:Gt,content:`<${Gt}>${a}</${Gt}>`,contentStripped:a,tagOpen:`<${Gt}>`,tagClose:`</${Gt}>`},a};let o=e.renderer.rules.html_block;e.renderer.rules.html_block=(i,s,a,u,f)=>{if(!u.sfcBlocks)return o(i,s,a,u,f);let d=i[s].content.match(r);if(!d)return o(i,s,a,u,f);let C=d.groups;return C.type===vu?(u.sfcBlocks.scripts.push(C),Gv.test(C.tagOpen)?u.sfcBlocks.scriptSetup=C:u.sfcBlocks.script=C):C.type===_u?u.sfcBlocks.styles.push(C):u.sfcBlocks.customBlocks.push(C),""}};c();var Cu=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?Ut(r[i+1],{shouldAllowHtml:!1,shouldEscapeText:!1}):"",t(r,n,o)}};c();var zv=({listTag:e,listClass:t,itemClass:r,linkTag:n,linkClass:o})=>{let i=ct(e),s=t?` class="${ct(t)}"`:"",a="li",u=r?` class="${ct(r)}"`:"",f=ct(n),l=o?` class="${ct(o)}"`:"",p=C=>n==="router-link"?` to="${C}"`:` href="${C}"`,d=C=>`<${i}${s}>${C.map(v=>`<${a}${u}><${f}${l}${p(v.link)}>${v.title}</${f}>${v.children.length>0?d(v.children):""}</${a}>`).join("")}</${i}>`;return d},Kv=({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],u=n.eMarks[o],f=n.src.slice(a,u).split(" ")[0];if(!e.test(f))return!1;if(s)return!0;n.line=o+1;let l=n.push("toc_open",t,1);l.markup="",l.map=[o,n.line],r&&l.attrSet("class",r);let p=n.push("toc_body","",0);p.markup=f,p.map=[o,n.line],p.hidden=!0;let d=n.push("toc_close",t,-1);return d.markup="",p.map=[o,n.line],!0},bu=(e,{pattern:t=/^\[\[toc\]\]$/i,slugify:r=Ye,format:n,level:o=[2,3],shouldAllowNested:i=!1,containerTag:s="nav",containerClass:a="table-of-contents",listTag:u="ul",listClass:f="",itemClass:l="",linkTag:p="a",linkClass:d=""}={})=>{e.block.ruler.before("heading","toc",Kv({pattern:t,containerTag:s,containerClass:a}),{alt:["paragraph","reference","blockquote"]});let C=zv({listTag:u,listClass:f,itemClass:l,linkTag:p,linkClass:d});e.renderer.rules.toc_body=v=>C(qr(v,{level:o,shouldAllowHtml:!0,shouldAllowNested:i,shouldEscapeText:!0,slugify:r,format:n}))};import{cssI18nContainer as b_}from"css-i18n";c();import Su from"katex";function Ru(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 Yv(e,t){let r,n,o,i;if(e.src[e.pos]!=="$")return!1;if(o=Ru(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=Ru(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 Xv(e,t,r,n){let o,i,s,a,u=!1,f=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(f+2>l||e.src.slice(f,f+2)!=="$$")return!1;if(f+=2,o=e.src.slice(f,l),n)return!0;for(o.trim().slice(-2)==="$$"&&(o=o.trim().slice(0,-2),u=!0),s=t;!u&&(s++,!(s>=r||(f=e.bMarks[s]+e.tShift[s],l=e.eMarks[s],f<l&&e.tShift[s]<e.blkIndent)));)e.src.slice(f,l).trim().slice(-2)==="$$"&&(a=e.src.slice(0,l).lastIndexOf("$$"),i=e.src.slice(f,a),u=!0);e.line=s+1;let p=e.push("math_block","math",0);return p.block=!0,p.content=(o&&o.trim()?`${o}
|
|
18
|
+
`:"")+e.getLines(t+1,s,e.tShift[t],!0)+(i&&i.trim()?i:""),p.map=[t,e.line],p.markup="$$",!0}function fi(e,t){t=t||{};let r=function(s){t.displayMode=!1;try{return Su.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>${Su.renderToString(s,t)}</p>`}catch(a){return t.throwOnError&&console.warn(a),s}},i=function(s,a){return`${o(s[a].content)}
|
|
19
|
+
`};e.inline.ruler.after("escape","math_inline",Yv),e.block.ruler.after("blockquote","math_block",Xv,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=n,e.renderer.rules.math_block=i}c();import Br from"markdown-it-container";c();import Eu from"crypto";c();var wu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var Qv=128,Xe,Qe,Au=e=>{!Xe||Xe.length<e?(Xe=Buffer.allocUnsafe(e*Qv),Eu.randomFillSync(Xe),Qe=0):Qe+e>Xe.length&&(Eu.randomFillSync(Xe),Qe=0),Qe+=e},Zv=e=>(Au(e-=0),Xe.subarray(Qe-e,Qe)),Jv=(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),u=o;for(;u--;)if(s+=e[a[u]&n]||"",s.length===i)return s}}},ku=(e,t=21)=>Jv(e,t,Zv),pi=(e=21)=>{Au(e-=0);let t="";for(let r=Qe-e;r<Qe;r++)t+=wu[Xe[r]&63];return t};c();function Pu(e){return e.trim().replace(/=(\d*)/,"").replace(/:(no-)?line-numbers({| |$|=\d*).*/,"").replace(/(-vue|{| ).*$/,"").replace(/^vue-html$/,"template").replace(/^ansi$/,"")}function di(e){let{theme:t}=e,r=typeof t=="string"||"name"in t,n="";if(r){n=" va-adaptive-theme";let o=typeof t=="string"?t:t.name;n=o.includes("dark")||o.includes("night")?" dark":" light"}return n}function Ou(e,t=!1){return t?e.replace(/<!--[^]*?-->/g,"").match(/data-title="(.*?)"/)?.[1]||"":e.match(/\[(.*)\]/)?.[1]||Pu(e)||"txt"}function e_(e){let t=e?.siteConfig?.codeHeightLimit;return t===void 0||t<=0?"":`style="max-height: ${t}px;"`}function Tu(e,t){let r=e.renderer.rules.fence;e.renderer.rules.fence=(...n)=>{let[o,i]=n,s=o[i];s.info=s.info.replace(/\[.*\]/,"");let a=Pu(s.info),u=r(...n);return`
|
|
20
|
+
<div ${e_(t)} class="language-${a}${di(t)}${/ active( |$)/.test(s.info)?" active":""}">
|
|
21
|
+
<button title="Copy Code" class="copy"></button><span class="lang">${a}</span>${u}<button class="collapse"></button>
|
|
22
|
+
</div>`}}function t_(e,{icon:t,color:r,text:n,langs:o}={}){return[Br,e,{render(i,s){let a=i[s],u=a.info.trim().slice(e.length).trim();if(a.nesting===1){if(e==="details")return`<details class="${e} custom-block">${`<summary>${u}</summary>`}
|
|
23
|
+
`;let f="";t&&(f=`<i class="icon ${t}" ${r?`style="color: ${r}"`:""}></i>`);let l=`<span lang="en">${u||n}</span>`;return o&&Object.keys(o).forEach(p=>{l+=`<span lang="${p}">${u||o[p]}</span>`}),`<div class="${e} custom-block"><p class="custom-block-title">${f}${l}</p>
|
|
24
|
+
`}else return e==="details"?`</details>
|
|
25
|
+
`:`</div>
|
|
26
|
+
`}}]}var $u={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 Fu(e,t={}){Object.keys($u).forEach(n=>{let o={...$u[n],...t[n]||{}};e.use(...t_(n,o))}),e.use(...r_(t)),e.use(Br,"v-pre",{render:(n,o)=>n[o].nesting===1?`<div v-pre>
|
|
27
|
+
`:`</div>
|
|
28
|
+
`}),["zh-CN","en"].forEach(n=>{e.use(Br,n,{render:(o,i)=>o[i].nesting===1?`<div lang="${n}">
|
|
29
|
+
`:`</div>
|
|
30
|
+
`})})}function r_(e){return[Br,"code-group",{render(t,r){if(t[r].nesting===1){let n=pi(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 u=Ou(a?t[s].content:t[s].info,a);if(u){let f=pi(7);o+=`<input type="radio" name="group-${n}" id="tab-${f}" ${i}><label for="tab-${f}">${u}</label>`,i&&!a&&(t[s].info+=" active"),i=""}}}return`<div class="vp-code-group${di({theme:e.theme})}"><div class="tabs">${o}</div><div class="blocks">
|
|
31
|
+
`}return`</div></div>
|
|
32
|
+
`}}]}c();var Hu=Me(gi(),1);import{BUNDLED_LANGUAGES as c_}from"shiki";c();import{getHighlighter as i_}from"shiki";function Wt(e,t={}){return({code:r})=>{let n=t.tagRegExp??/(?:\/\/|\/\*{1,2}) *\[!code ([\w+-]+)(?::(\d+))?] *(?:\*{1,2}\/)?/,o=[];return r=r.split(`
|
|
33
|
+
`).map((i,s)=>{let[a,u,f]=i.match(n)??[];return!a||!Object.keys(e).includes(u)?i:(Array.from({length:Number(f??1)}).forEach((l,p)=>{o.push({line:s+p+1,classes:e[u]})}),i.replace(n,""))}).join(`
|
|
34
|
+
`),{code:r,lineOptions:o}}}function wt(e,t,r){let n=new RegExp(`<${r??"w+"}[^>]*class="([\\w+-:;\\/* ]*)"`);return t=Array.isArray(t)?t:[t],e.replace(n,(o,i)=>o.replace(i,`${i} ${t}`))}function Mu(e={}){let t=e.commonDiffClass??"diff",r=e.removedLinesClasses??["remove"],n=e.removedLinesClasses??["add"],o=e.removeLineTag??"--",i=e.addLineTag??"++",s=e.hasDiffClass??"has-diff";return{name:"diff",handler:Wt({[o]:[t,...r],[i]:[t,...n]},e),postProcess:({code:a})=>a.includes(t)?wt(a,s,"pre"):a}}function Nu(e={}){let t=e.hasFocusClass??"has-focus",r=e.hasFocusedLinesClass??"has-focused-lines",n=e.focusTag??"focus";return{name:"focus",handler:Wt({[n]:[t]},e),postProcess:({code:o})=>o.includes(t)?wt(o,r,"pre"):o}}function Du(e={}){let t=e.hasHighlightClass??"has-highlight",r=e.hasHighlightedLinesClass??"has-highlighted-lines",n=e.highlightTag??"hl";return{name:"highlight",handler:Wt({[n]:[t]},e),postProcess:({code:o})=>o.includes(t)?wt(o,r,"pre"):o}}function s_(e,t,r){return e.reduce((n,o)=>{let{code:i,lineOptions:s}=o.handler?.({code:n.code,lang:r})??n;return{code:i,lineOptions:[...n.lineOptions,...s]}},{code:t,lineOptions:[]})}function a_(e,t,r){return e.reduce((n,o)=>o.postProcess?.({code:n,lang:r})??n,t)}async function Vu(e={}){let t=await i_(e),r=e.processors??[];return{...t,codeToHtml:(n,o)=>{let i=typeof o=="object"?o.lang:o,s=typeof o=="object"?o.lineOptions??[]:[],a=typeof o=="object"?o.theme:void 0,{code:u,lineOptions:f}=s_(r,n,i),l=t.codeToHtml(u,{lang:i,theme:a,lineOptions:[...f,...s]});return a_(r,l,i)}}}var l_=ku("abcdefghijklmnopqrstuvwxyz",10);function u_(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"]}))):[]}var f_={name:"error-level",handler:Wt({error:["highlighted","error"],warning:["highlighted","warning"]})};async function ju(e,t=[],r="",n=console){let o=typeof e=="string"||"name"in e,i=v=>typeof v=="string"?v:v.name,s=[Nu(),Du({hasHighlightClass:"highlighted"}),Mu(),f_],a=await Vu({themes:o?[e]:[e.dark,e.light],langs:[...c_,...t],processors:s}),u=/<pre[^>]*(style=".*?")/,f=/^<pre(.*?)>/,l=/-vue$/,p=/=(\d*)/,d=/:(no-)?line-numbers(=\d*)?$/,C=/\{\{.*?\}\}/g;return(v,x,R)=>{let S=l.test(x)?"":"v-pre";x=x.replace(p,"").replace(d,"").replace(l,"").toLowerCase()||r,x&&!a.getLoadedLanguages().includes(x)&&!["ansi","plaintext","txt","text"].includes(x)&&(n.warn(Hu.default.yellow(`
|
|
35
|
+
The language '${x}' is not loaded, falling back to '${r||"txt"}' for syntax highlighting.`)),x=r);let I=u_(R),L=m=>m.replace(f,(k,$)=>`<pre ${S}${$.replace(' tabindex="0"',"")}>`).replace(u,(k,$)=>k.replace($,"")),G=new Map,O=m=>S?m:m.replace(C,k=>{let $=G.get(k);return $||($=l_(),G.set(k,$)),$}),D=m=>(G.forEach((k,$)=>{m=m.replaceAll(k,$)}),m),A=m=>m.replace(/(<span class="line highlighted">)(<\/span>)/g,"$1<wbr>$2");v=O(v).trimEnd();let w=m=>{let k=x==="ansi"?a.ansiToHtml(v,{lineOptions:I,theme:i(m)}):a.codeToHtml(v,{lang:x,lineOptions:I,theme:i(m)});return A(L(D(k)))};if(o)return w(e);let T=wt(w(e.dark),"vp-code-dark","pre"),z=wt(w(e.light),"vp-code-light","pre");return T+z}}c();var hi=/{([\d,-]+)}/;function qu(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 u=i.info;if(!u||!hi.test(u))return t(...r);let f=u.replace(hi,"").trim();i.info=f,a=hi.exec(u)[1]}return!a&&(a=s[0],!a||!/[\d,-]+/.test(a))?t(...r):(i.info+=` ${a}`,t(...r))}}c();import{URL as p_}from"node:url";var d_=/(^|.*\/)index.md(#?.*)$/i;function Bu(e,t,r){e.renderer.rules.link_open=(i,s,a,u,f)=>{let l=i[s],p=l.attrIndex("href");if(p>=0){let d=l.attrs[p],C=d[1];Ct.test(C)?(Object.entries(t).forEach(([x,R])=>{l.attrSet(x,R)}),d[1]=C.replace(yl,"")):!C.startsWith("#")&&!C.startsWith("mailto:")&&!/\.(?!html|md)\w+($|\?)/i.test(C)&&n(d,u),d[1]=d[1].replace(/\bimport\.meta/g,"import%2Emeta").replace(/\bprocess\.env/g,"process%2Eenv")}return f.renderToken(i,s,a)};function n(i,s){let a=i[1],u=a.match(d_);if(u){let[,f,l]=u;a=f+l}else{let f=a.replace(/[?#].*$/,"");f.endsWith(".md")&&(f=f.replace(/\.md$/,s.cleanUrls==="disabled"?".html":"")),s.cleanUrls==="disabled"&&!f.endsWith(".html")&&!f.endsWith("/")&&(f+=".html");let l=new p_(a,"http://a.com");a=f+l.search+l.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)}}c();function Uu(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 u=1,f=a.match(/=(\d*)/);f&&f[1]&&(u=Number.parseInt(f[1]));let p=o.slice(o.indexOf("<code>"),o.indexOf("</code>")).split(`
|
|
36
|
+
`),C=`<div class="line-numbers-wrapper" aria-hidden="true">${[...Array(p.length)].map((x,R)=>`<span class="line-number">${R+u}</span><br>`).join("")}</div>`;return o.replace(/<\/div>$/,`${C}</div>`).replace(/"(language-[^"]*?)"/,'"$1 line-numbers-mode"')}}c();import Gu from"node:path";import yi from"fs-extra";var m_=/^(.+?(?:(?:\.([a-z0-9]+))?))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))? ?(?:\[(.+)\])?$/;function g_(e){let[t="",r="",n="",o="",i="",s=""]=(m_.exec(e)||[]).slice(1),a=s||t.split("/").pop()||"";return{filepath:t,extension:r,region:n,lines:o,lang:i,title:a}}function h_(e){let t=e.split(`
|
|
37
|
+
`),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(`
|
|
38
|
+
`):e}function Wu(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 y_(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(Wu(s,a,t)){o=i+1,n=a;break}}else if(Wu(s,n,t,!0))return{start:o,end:i,regexp:n};return null}function zu(e,t){let r=(o,i,s,a)=>{let u="<".charCodeAt(0),f=o.bMarks[i]+o.tShift[i],l=o.eMarks[i];if(o.sCount[i]-o.blkIndent>=4)return!1;for(let w=0;w<3;++w)if(o.src.charCodeAt(f+w)!==u||f+w>=l)return!1;if(a)return!0;let p=f+3,d=o.skipSpacesBack(l,f),C=o.src.slice(p,d).trim().replace(/^@/,t).trim(),{filepath:v,extension:x,region:R,lines:S,lang:I,title:L}=g_(C);o.line=i+1;let G=o.push("fence","code",0);G.info=`${I||x}${S?`{${S}}`:""}${L?`[${L}]`:""}`;let{realPath:O,path:D}=o.env,A=Gu.resolve(Gu.dirname(O??D),v);return G.src=[A,R.slice(1)],G.markup="```",G.map=[i,i+1],!0},n=e.renderer.rules.fence;e.renderer.rules.fence=(...o)=>{let[i,s,,{includes:a}]=o,u=i[s],[f,l]=u.src??[];if(!f)return n(...o);a&&a.push(f);let p=yi.statSync(f).isFile();if(!yi.existsSync(f)||!p)return u.content=p?`Code snippet path not found: ${f}`:"Invalid code snippet option",u.info="",n(...o);let d=yi.readFileSync(f,"utf8");if(l){let C=d.split(/\r?\n/),v=y_(C,l);v&&(d=h_(C.slice(v.start,v.end).filter(x=>!v.regexp.test(x.trim())).join(`
|
|
39
|
+
`)))}return u.content=d,n(...o)},e.block.ruler.before("fence","snippet",r)}c();var Yu={light:"github-light",dark:"github-dark"};async function vi(e,t,r=!1,n="/"){let o=t?.config.markdown||{},i=o.theme??Yu,s=t?.config.siteConfig||{};e.use(qu).use(Tu,{theme:i,siteConfig:s}).use(zu,t?.userRoot).use(Fu,{...o.blocks,theme:i}).use(b_,{languages:t?.config.siteConfig.languages}).use(Bu,{target:"_blank",rel:"noreferrer",...o.externalLinks},n),o.attrs?.disable||e.use(__,o.attrs),e.use(fi,o.katex),e.use(x_),r||e.use(Ku,{slugify:Ye,permalink:Ku.permalink.linkInsideHeader({symbol:"​",renderAttrs:(u,f)=>{let l=f.tokens.findIndex(d=>{let v=d.attrs?.find(x=>x[0]==="id");return v&&u===v[1]});return{"aria-label":`Permalink to "${f.tokens[l+1].content}"`}}}),...o.anchor});let a=t?.config.siteConfig.vanillaLazyload||{enable:!1};return e.use(pu,{figcaption:!0,lazy:!0,async:!0,...a.enable?{lazy:!1,async:!1,removeSrc:!0,classes:"lazy"}:{},...o.imageFigures}),e.use(gu).use(hu,{...o.frontmatter}).use(yu,{slugify:Ye,...o.headers}).use(xu,{...o.sfc}).use(Cu).use(bu,{slugify:Ye,...o.toc}),e.use(Uu,o.lineNumbers),e.use(C_),o.config&&o.config(e),e}async function Xu(e){let t=e?.config.markdown||{},r=t.theme??Yu,n=v_({html:!0,linkify:!0,highlight:await ju(r,t.languages,t.defaultHighlightLang),...t.options});return await vi(n,e),n}c();import{resolve as A_}from"node:path";import{existsSync as k_}from"node:fs";import P_ from"jiti";import Ju from"defu";import{presetAttributify as O_,presetIcons as T_,presetTypography as $_,presetUno as F_,transformerDirectives as I_,transformerVariantGroup as L_}from"unocss";c();import{resolve as S_}from"node:path";import R_ from"fs-extra";import{isObject as w_}from"@antfu/utils";import E_ from"jiti";function Qu(e,t,r=""){return e={...e},Object.keys(t).forEach(n=>{w_(e[n])?e[n]=Qu(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 Zu(e,t,r,n,o=!0){let i=n;for(let s of e){let a=S_(s,"setup",t);if(R_.existsSync(a)){let{default:u}=E_(g)(a),f=await u(r);f!==null&&(i=o?Qu(i,f):f)}}return i}async function M_(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 N_(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:[F_(t.unocssPresets?.uno),O_(t.unocssPresets?.attributify),T_({scale:1.2,...t.unocssPresets?.icons}),$_(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:[I_(),L_()],safelist:await M_(e)}}async function ef(e){let t=await import("unocss/vite").then(d=>d.default),{unocss:r}=e.config,n=await N_(e),{themeRoot:o,clientRoot:i,roots:s}=e,a=["uno.config.ts","unocss.config.ts"],u=[];[o,i].forEach(d=>a.forEach(C=>u.push(A_(d,C))));let l={},p=[];return u.forEach(d=>{if(k_(d)){let C=P_(g)(d);"default"in C&&(C=C.default),l=Ju(l,C),p.push(d)}}),l=await Zu(s,"unocss.ts",{},l,!0),t({configDeps:p,configFile:!1,...Ju(r||{},l,n)})}c();import{dirname as q_,join as tf,resolve as Ie}from"node:path";import{mergeConfig as B_,searchForWorkspaceRoot as xi}from"vite";import U_ from"is-installed-globally";import G_ from"fs-extra";import{uniq as rf}from"@antfu/utils";c();import{join as _i,resolve as D_}from"node:path";import Ur from"fs-extra";import{uniq as V_}from"@antfu/utils";import{loadConfigFromFile as H_,mergeConfig as j_}from"vite";async function Gr({userRoot:e,themeRoot:t},r){let n={mode:"development",command:r},o={},i=V_([t,e]).map(s=>_i(s,"vite.config.ts"));for await(let s of i){if(!Ur.existsSync(s))continue;let a=await H_(n,s);a?.config&&(o=j_(o,a.config))}return o}async function Wr({clientRoot:e,themeRoot:t,userRoot:r,config:n}){let o=D_(e,"template.html"),i=await Ur.readFile(o,"utf-8"),s="",a="";n.siteConfig.favicon&&(s+=`<link rel="icon" href="${n.siteConfig.favicon}">`);let u=[r,t];n.siteConfig.mode==="auto"&&(s+=`
|
|
40
|
+
<script>
|
|
41
|
+
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
42
|
+
const colorSchemeSetting = localStorage.getItem('vueuse-color-scheme') || 'auto';
|
|
43
|
+
if (colorSchemeSetting === 'dark' || (prefersDark && colorSchemeSetting !== 'light')) {
|
|
44
|
+
document.documentElement.classList.toggle('dark', true);
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
`),n.siteConfig.lang&&(s+=`
|
|
48
|
+
<script>
|
|
49
|
+
const locale = localStorage.getItem('valaxy-locale') || '${n.siteConfig.lang}';
|
|
50
|
+
document.documentElement.setAttribute('lang', locale);
|
|
51
|
+
</script>
|
|
52
|
+
`);for(let f of u){let l=_i(f,"index.html");if(!Ur.existsSync(l))continue;let p=await Ur.readFile(l,"utf-8");s+=`
|
|
53
|
+
${(p.match(/<head>([\s\S]*?)<\/head>/im)?.[1]||"").trim()}`,a+=`
|
|
54
|
+
${(p.match(/<body>([\s\S]*?)<\/body>/im)?.[1]||"").trim()}`}return i=i.replace("__ENTRY__",Z(_i(e,"main.ts"))).replace("<!-- head -->",s).replace("<!-- body -->",a),i}var W_=["@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"],nf=["@docsearch/css","@vueuse/core","@vueuse/shared","@unocss/reset","unocss","vue","vue-demi","meting","valaxy","/@valaxyjs/config","/@valaxyjs/context","/@valaxyjs/addons","/@valaxyjs/locales","/@valaxyjs/styles"];function of(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",config(n){let o={root:e.clientRoot,publicDir:tf(e.userRoot,"public"),define:Ci(e),resolve:{alias:z_(e),dedupe:["vue"]},optimizeDeps:{entries:[Ie(e.clientRoot,"main.ts")],include:rf([...W_,...t,...r]).filter(i=>!nf.includes(i)),exclude:nf},server:{fs:{allow:rf([xi(e.clientRoot),xi(e.themeRoot),xi(e.userRoot),q_(Fe("katex/package.json",!0))])}}};return U_&&(o.cacheDir=tf(e.pkgRoot,"node_modules/.vite"),o.resolve.alias.vue=`${Fe("vue/dist/vue.esm-browser.js",!0)}`),B_(n,o)},configureServer(n){return()=>{n.middlewares.use(async(o,i,s)=>{if(o.url.endsWith(".html")){i.setHeader("Content-Type","text/html"),i.statusCode=200,i.end(await Wr(e));return}if(o.url==="/atom.xml"){i.setHeader("Content-Type","application/xml"),i.statusCode=200,i.end(await G_.readFile(Ie(e.userRoot,"dist/atom.xml"),"utf-8"));return}s()})}}}}function Ci(e){return{}}function z_(e){let t=[{find:"~/",replacement:`${Z(e.userRoot)}/`},{find:"valaxy/client/",replacement:`${Z(e.clientRoot)}/`},{find:"valaxy/package.json",replacement:Z(Ie(e.clientRoot,"../package.json"))},{find:/^valaxy$/,replacement:Z(Ie(e.clientRoot,"index.ts"))},{find:"@valaxyjs/client/",replacement:`${Z(e.clientRoot)}/`},{find:`valaxy-theme-${e.theme}/`,replacement:`${Z(Ie(e.themeRoot))}/`},{find:`valaxy-theme-${e.theme}`,replacement:`${Z(Ie(e.themeRoot))}/client/index.ts`}];return e.config.siteConfig.encrypt.enable&&t.push({find:/^vue$/,replacement:Fe("vue/dist/vue.esm-bundler.js",!0)}),e.addons.forEach(r=>{t.push({find:`${r.name}/client/`,replacement:`${Z(`${Ie(r.root)}`)}/client/`}),t.push({find:`${r.name}/App.vue`,replacement:`${Z(Ie(r.root))}/App.vue`}),t.push({find:r.name,replacement:`${Z(Ie(r.root))}/client/index.ts`})}),t.push({find:/^valaxy-addon-(.*)$/,replacement:Z(Ie(e.clientRoot,"./addons/index.ts"))}),t}c();import{existsSync as K_}from"node:fs";import{join as Y_,resolve as X_}from"node:path";import{slash as Q_,uniq as Z_}from"@antfu/utils";function sf({clientRoot:e,themeRoot:t,userRoot:r}){let n=Q_(X_(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=[],u=[];return Z_([t,r]).map(l=>Y_(l,"setup",s)).forEach((l,p)=>{if(!K_(l))return;a.push(`import __n${p} from '${Z(l)}'`);let d=`__n${p}`;/\binjection_return\b/g.test(o)&&(d=`injection_return = ${d}`),/\binjection_arg\b/g.test(o)?d+="(injection_arg)":d+="()",u.push(`// ${l}`,d)}),o=o.replace("/* __imports__ */",a.join(`
|
|
55
|
+
`)),o=o.replace("/* __injections__ */",u.join(`
|
|
56
|
+
`)),o}return null}}}c();import{objectEntries as J_}from"@antfu/utils";function af(e){let t=J_(Ci(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}}}]}c();import s1 from"vite-plugin-pages";import zr from"fs-extra";import a1 from"gray-matter";import{isDate as lf}from"@antfu/utils";import{convert as c1}from"html-to-text";c();import{existsSync as e1,readFileSync as t1}from"node:fs";function r1(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 n1({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 o1({cn:e,en:t}){let r=e+t;return r<1e3?r:`${Math.round(r/100)/10}k`}function i1(e,t){let r=r1(e);return{countData:r,wordCount:o1(r),readingTime:n1(r,t.readTime)}}function cf({route:e,options:t}){if(e1(e.component)){let r=t1(e.component,"utf-8"),{wordCount:n,readingTime:o}=i1(r,{readTime:Object.assign({speed:{cn:300,en:100}},t.readTime)});e.meta.frontmatter&&(e.meta.frontmatter.wordCount||(e.meta.frontmatter.wordCount=n),e.meta.frontmatter.readingTime||(e.meta.frontmatter.readingTime=o))}}function l1(e="",t="html"){switch(t){case"ai":case"md":return e;case"html":return Kr.render(e);case"text":return c1(Kr.render(e));default:return e}}function uf(e){let{roots:t,config:r}=e;return s1({extensions:["vue","md"],dirs:t.map(n=>`${n}/pages`),...r.pages,async extendRoute(n,o){let i=n.component,s=JSON.parse(JSON.stringify(r.siteConfig.frontmatter))||{};if(n.meta?n.meta.frontmatter||(n.meta.frontmatter=s):n.meta={frontmatter:s},n.path=encodeURI(n.path),n.path==="/"&&(n.meta.layout="home"),t.forEach(a=>{let u=a+n.component;zr.existsSync(u)&&(i=u)}),n.path.startsWith("/posts/")&&(n.meta.layout="post"),i.endsWith(".md")){let a=zr.readFileSync(i,"utf-8"),{data:u,excerpt:f,content:l}=a1(a,{excerpt_separator:Mr}),p=u,d=e.config.siteConfig.lastUpdated;if(delete p.password,p.gallery_password&&(delete p.gallery_password,delete p.photos),p.date||(p.date=zr.statSync(i).mtime),d&&(p.updated||(p.updated=zr.statSync(i).ctime)),lf(p.date)||(p.date=new Date(p.date)),lf(p.updated)||(p.updated=new Date(p.updated)),n.meta=Object.assign(n.meta,{frontmatter:Object.assign(s,p),excerpt:f?l1(f,p.excerpt_type):""}),u.layout&&(n.meta.layout=u.layout),n.meta.frontmatter?.updated||(n.meta.frontmatter.updated=n.meta.frontmatter.date),n.meta.frontmatter.tags){let v=n.meta.frontmatter.tags;typeof v=="string"&&(n.meta.frontmatter.tags=[v])}r.siteConfig.statistics.enable&&cf({options:r.siteConfig.statistics,route:n});let C={route:n,data:u,excerpt:f,content:l,path:i};r.extendMd?.(C)}return r.pages?.extendRoute?.(n,o),n}})}c();import{join as At,relative as F1,resolve as I1}from"node:path";import zt from"fs-extra";import{defu as L1}from"defu";import M1 from"pascalcase";c();var Et=Me(gi(),1),mf=Me(Go(),1);import He from"node:path";import wi from"fs-extra";import{LRUCache as m1}from"lru-cache";c();import{webcrypto as bi}from"node:crypto";function u1(e){let t=new TextEncoder;return bi.subtle.importKey("raw",t.encode(e),"PBKDF2",!1,["deriveBits","deriveKey"])}function f1(e,t){return bi.subtle.deriveKey({name:"PBKDF2",salt:t,iterations:1e5,hash:"SHA-256"},e,{name:"AES-CBC",length:256},!0,["encrypt","decrypt"])}async function Yr(e,t){let{password:r,iv:n,salt:o}=t,i=await u1(r),s=await f1(i,o),a=new TextEncoder,u=await bi.subtle.encrypt({name:"AES-CBC",iv:n},s,a.encode(e));return String.fromCharCode(...new Uint8Array(u))}c();import Si from"node:path";import p1 from"fs-extra";import{slash as d1}from"@antfu/utils";function Ri(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 u=a.match(i);u&&(a=a.slice(0,-u[0].length));let f=a[0]==="@";try{let l=f?Si.join(e,a.slice(a[1]==="/"?2:1)):Si.join(Si.dirname(r),a),p=p1.readFileSync(l,"utf-8");if(u){let[,d,C]=u;p=p.split(/\r?\n/).slice(d?Number.parseInt(d,10)-1:void 0,C?Number.parseInt(C,10):void 0).join(`
|
|
57
|
+
`)}return n.push(d1(l)),Ri(e,p,l,n)}catch{return s}})}var g1="\u200B",h1="<wbr>",ff=(0,mf.default)("vitepress:md"),pf=new m1({max:1024}),y1=/<!--\s*@include:\s*(.*?)\s*-->/g;function v1(e={},t){let r=["process.env"];return t&&r.push("import.meta",...Object.keys(e)),new RegExp(`\\b(${r.map(n=>n.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")).join("|")})`,"g")}function gf(e,t,r){return e=e.replace(/<a (.*?)>(.*?)<\/a>/g,"<AppLink $1>$2</AppLink>"),e.replace(t,n=>`${n[0]}${r}${n.slice(1)}`)}function _1(e,t,r){if(typeof t.title=="string"){let n=e.parseInline(t.title,{})[0];if(n)return Ut(n,{shouldAllowHtml:!1,shouldEscapeText:!1})}return r}function x1(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 C1(e){let{description:t,head:r}=e;return t!==void 0?t:r&&x1(r,"description")||""}function b1(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}async function hf(e,t,r,n,o=!1,i=!1,s="with-subfolders"){let a=await Xu(e);r=r.map(f=>$e(f.replace(/\.md$/,"")).replace(/\/index$/,""));let u=v1(n,o);return async(f,l,p)=>{let d=l,C=He.dirname(l),v=$e(He.relative(t,l)),x=JSON.stringify({src:f,file:d}),R=pf.get(x);if(R)return ff(`[cache hit] ${v}`),R;let S=Date.now(),I=[];f=Ri(t,f,d,I),f=f.replace(y1,(M,W)=>{try{let j=He.join(C,W),ne=wi.readFileSync(j,"utf-8");return I.push($e(j)),ne}catch{return M}});let L={path:l,relativePath:v,cleanUrls:s,realPath:d},G=a.render(f,L),{frontmatter:O={},headers:D=[],links:A=[],sfcBlocks:w,title:T=""}=L,z=[],m=M=>{console.warn(Et.default.yellow(`
|
|
58
|
+
(!) Found dead link ${Et.default.cyan(M)} in file ${Et.default.white(Et.default.dim(l))}
|
|
59
|
+
If it is intended, you can use:
|
|
60
|
+
${Et.default.cyan(`<a href="${M}" target="_blank" rel="noreferrer">${M}</a>`)}`)),z.push(M)};if(A){let M=He.dirname(l);for(let W of A){if(/\.(?!html|md)\w+($|\?)/i.test(W))continue;if(W.replace(Ct,"").startsWith("//localhost:")){m(W);continue}W=W.replace(/[?#].*$/,"").replace(/\.(html|md)$/,"");let j=decodeURIComponent($e(W.startsWith("/")?W.slice(1):He.relative(t,He.resolve(M,W)))).replace(/\/index$/,"");(j.endsWith("/")?r.includes(j.slice(0,-1)):r.includes(j)||wi.existsSync(He.resolve(M,p,`${j}.html`))||wi.existsSync(He.resolve(M,p,`${j}/index.html`)))||m(W)}}let k={title:_1(a,O,T),titleTemplate:O.titleTemplate,description:C1(O),frontmatter:O,headers:D,relativePath:v,path:He.join(t,v)};i&&(k.lastUpdated=await Vt(l));let $="ValaxyMain";function V(){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(j=>`<template #${j}><slot name="${j}" /></template>`).join("")}let y=gf(G,u,h1);y=b1(y,e,O.codeHeightLimit);let{config:{siteConfig:{encrypt:_}}}=e;if(_.enable){let M=/<!-- valaxy-encrypt-start:(?<password>\w+) -->(?<content>.*?)<!-- valaxy-encrypt-end -->/gs,W=/((<!-- valaxy-encrypt-start:\w+ -->)|(<!-- valaxy-encrypt-end -->))/g;if(O.password)y=y.replaceAll(W,"");else{let j=[];for(let J of y.matchAll(M))j.push(await Yr(J.groups.content,{password:J.groups.password,iv:_.iv,salt:_.salt}));O.partiallyEncryptedContents=j.length?j:void 0;let ne=0;y=y.replaceAll(M,()=>`<ValaxyDecrypt :encrypted-content="frontmatter.partiallyEncryptedContents[${ne++}]" />`)}if(O.password){let j=await Yr(y,{password:O.password,iv:_.iv,salt:_.salt});y="",O.encryptedContent=j,O.encrypt=!0,delete O.password}if(O.gallery_password){let j=await Yr(JSON.stringify(O.photos),{password:O.gallery_password,iv:_.iv,salt:_.salt});O.encryptedPhotos=j,delete O.gallery_password,delete O.photos}}let q=[...k1(w?.scripts.map(M=>M.content)??[],k,u),`<template><${$} :frontmatter="frontmatter" :data="data">`,`<template #main-content-md>${y}</template>`,V(),"<slot />",`</${$}></template>`,...w?.styles.map(M=>M.content)??[],...w?.customBlocks.map(M=>M.content)??[]].join(`
|
|
61
|
+
`);ff(`[render] ${l} in ${Date.now()-S}ms.`);let F={vueSrc:q,pageData:k,deadLinks:z,includes:I};return pf.set(f,F),F}}var df=/<\/script>/,S1=/<\s*script[^>]*\blang=['"]ts['"][^>]*/,R1=/<\s*script[^>]*\bsetup\b[^>]*/,w1=/<\s*script[^>]*\bclient\b[^>]*/,E1=/((?:^|\n|;)\s*)export(\s*)default/,A1=/((?:^|\n|;)\s*)export(.+)as(\s*)default/;function k1(e,t,r){let n=JSON.stringify(t),o=`
|
|
62
|
+
export const __pageData = JSON.parse(${JSON.stringify(gf(n,r,g1))})`,i=e.findIndex(u=>df.test(u)&&!R1.test(u)&&!w1.test(u)),s=e.findIndex(u=>S1.test(u))>-1,a=`
|
|
63
|
+
import { provide } from 'vue'
|
|
64
|
+
import { useRoute } from 'vue-router'
|
|
65
|
+
const data = ${Al(t)}
|
|
66
|
+
|
|
67
|
+
export default {
|
|
68
|
+
name:'${t.relativePath}',
|
|
69
|
+
data() {
|
|
70
|
+
return { data, frontmatter: data.frontmatter, $frontmatter: data.frontmatter }
|
|
71
|
+
},
|
|
72
|
+
setup() {
|
|
73
|
+
const route = useRoute()
|
|
74
|
+
route.meta.frontmatter = Object.assign(route.meta.frontmatter, data.frontmatter)
|
|
75
|
+
provide('pageData', data)
|
|
76
|
+
}
|
|
77
|
+
}`;if(i>-1){let u=e[i],f=E1.test(u)||A1.test(u);e[i]=u.replace(df,`${o+(f?"":`
|
|
78
|
+
${a}`)}</script>`)}else e.unshift(`<script ${s?'lang="ts"':""}>${o}
|
|
79
|
+
${a}</script>`);return e}c();import{cyan as P1,red as O1,yellow as T1}from"kolorist";import $1 from"consola";function yf(e,t){e.includes("{%")&&e.includes("%}")&&$1.error(`${`${t}
|
|
80
|
+
`} Please ${O1("remove")} ${P1("{% %}")}, because it conflicts with ${T1("markdown-it-attrs")}.`)}function N1(e,t){let r=[];t.config.features?.katex&&(r.push(`import "${Z(Fe("katex/dist/katex.min.css",!0))}"`),r.push(`import "${Z(At(t.clientRoot,"styles/third/katex.scss"))}"`));for(let n of e){let o=[];["index","css-vars"].forEach(s=>{o.push(At(n,"styles",`${s}.css`)),o.push(At(n,"styles",`${s}.scss`))});for(let s of o)zt.existsSync(s)&&r.push(`import "${Z(s)}"`)}return r.join(`
|
|
81
|
+
`)}function D1(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 "${Z(s)}"`),t.push(`messages['${i}'] = defu(${a}, messages['${i}'])`)}})}),t.push("export default messages"),t.join(`
|
|
82
|
+
`)}function V1(e){let t=e.addons.filter(i=>i.global).filter(i=>zt.existsSync(At(i.root,"./App.vue"))),r=i=>`Addon${M1(i)}App`,n=t.map(i=>`import ${r(i.name)} from "${i.name}/App.vue"`).join(`
|
|
83
|
+
`),o=t.map(i=>`{ component: ${r(i.name)}, props: ${JSON.stringify(i.props)} }`).join(",");return`${n}
|
|
84
|
+
export default [${o}]`}var H1='import { defineComponent } from "vue"; export default defineComponent({ render: () => null });';function vf(e){let t=At(e,"App.vue");return zt.existsSync(t)?[`import AppVue from "${Z(t)}"`,"export default AppVue"].join(`
|
|
85
|
+
`):H1}function _f(e,t={}){let{config:r}=e,n="/@valaxy",o=e.roots,i,s=!1,a;return{name:"valaxy:loader",enforce:"pre",async configResolved(u){a=u,i=await hf(e,e.userRoot,e.pages,a.define,a.command==="build",e.config.siteConfig.lastUpdated)},configureServer(u){u.watcher.add([e.configFile,e.clientRoot,e.themeRoot,e.userRoot])},resolveId(u){return u.startsWith(n)?u:null},load(u){if(u==="/@valaxyjs/config")return`export default ${JSON.stringify(JSON.stringify(r))}`;if(u==="/@valaxyjs/context")return`export default ${JSON.stringify(JSON.stringify({userRoot:e.userRoot}))}`;if(u==="/@valaxyjs/styles")return N1(o,e);if(u==="/@valaxyjs/locales")return D1(o);if(u==="/@valaxyjs/addons")return V1(e);if(u==="/@valaxyjs/UserAppVue")return vf(e.userRoot);if(u==="/@valaxyjs/ThemeAppVue")return vf(e.themeRoot);if(u.startsWith(n))return{code:"",map:{mappings:""}}},async transform(u,f){if(f.endsWith(".md")){yf(u,f),u.replace("{%","{%"),u.replace("%}","%}");let{vueSrc:l,deadLinks:p,includes:d}=await i(u,f,a.publicDir);return p.length&&(s=!0),d.length&&d.forEach(C=>{this.addWatchFile(C)}),l}},renderStart(){if(s&&!r.ignoreDeadLinks)throw new Error("One or more pages contain dead links.")},async handleHotUpdate(u){let{file:f,server:l,read:p}=u,d=v=>{t.onConfigReload?.(v,e.config),Object.assign(e.config,v),r=v;let x=["/@valaxyjs/config","/@valaxyjs/context"];return[...Array.from(x).map(S=>l.moduleGraph.getModuleById(S))].filter(S=>!!S)};if([e.configFile].includes(f)){let{config:v}=await _e({userRoot:e.userRoot});return d(v)}if(f===e.siteConfigFile){let{siteConfig:v}=await Dr(e.userRoot);return r.siteConfig=L1(v,oi),d(r)}if(f===e.themeConfigFile){let{config:v}=await _e({userRoot:e.userRoot});return d(v)}if(f===I1(e.themeRoot,"valaxy.config.ts")){let v=ci(e),x=bt(e.config,v),{config:R}=await ai(e,x);return d(R)}if(f.endsWith(".md")){let v=await p(),{pageData:x,vueSrc:R}=await i(v,f,At(e.userRoot,"public")),I={path:`/${$e(F1(`${e.userRoot}/pages`,f))}`,pageData:x};l.ws.send({type:"custom",event:"valaxy:pageData",data:I}),u.read=()=>R}}}}var Kr=new q1({html:!0});async function Kt(e,t={}){let{roots:r,config:n}=e;await vi(Kr,e,!0);let o=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","meting-js"]);return[B1({include:[/\.vue$/,/\.md$/],template:{compilerOptions:{isCustomElement:i=>o.has(i)},...n.vue?.template},...n.vue}),z1(),of(e),sf(e),_f(e,t),uf(e),U1({layoutsDirs:r.map(i=>`${i}/layouts`)}),G1({extensions:["vue","md"],include:[/\.vue$/,/\.vue\?vue/,/\.md$/],exclude:[],allowOverrides:!0,dirs:r.map(i=>`${i}/components`).concat(r.map(i=>`${i}/layouts`)).concat(["src/components","components"]),dts:`${e.userRoot}/components.d.ts`,...n.components}),await ef(e),W1({runtimeOnly:!0,compositionOnly:!0,include:r.map(i=>`${i}/locales/**`)}),j1(),af(e)]}async function Cf(e,t={}){let r=xf(t,{plugins:await Kt(e)});await Y1(r)}async function bf(e,t={}){let r={plugins:await Kt(e),ssr:{noExternal:["workbox-window",/vue-i18n/]}};r.ssgOptions={script:"async",formatting:"minify",includedRoutes(o,i){let s=["/:..all",vl],a=o.filter(l=>l.startsWith("/posts/")).length,u=Math.ceil(a/e.config.siteConfig.pageSize),f=Array.from({length:u},(l,p)=>p+1);return i.filter(l=>!s.includes(l.path)).flatMap(l=>l.path==="/page/:page"?f.map(p=>`/page/${p}`):l.path)},onFinished(){Q1({hostname:e.config.siteConfig.url})}};let n=xf(r,t);await X1({},n)}async function Sf(e){let{userRoot:t}=e,r=K1(t,"dist/index.html");if(Ei.existsSync(r)){Z1.info("post process for ssg...");let n=await Ei.readFile(r,"utf-8"),o="</html>";if(!n.endsWith(o)){let i=n.lastIndexOf(o);await Ei.writeFile(r,n.slice(0,i+o.length),"utf-8")}}}c();c();c();import Rf from"node:process";import{createServer as J1,mergeConfig as ex}from"vite";async function wf(e,t={},r={}){Rf.env.EDITOR=Rf.env.EDITOR||"code";let n=await Kt(e,r),o=ex(t,{plugins:n});return await J1(o)}c();c();import{createHooks as tx}from"hookable";var rx=["build:before","build:after"];function Xr(e){let t=tx();typeof e.config.hooks=="object"&&Object.keys(e.config.hooks).forEach(n=>{let o=n,i=e.config.hooks[o];typeof i=="function"&&(rx.includes(o)?e.mode==="build"&&t.hook(o,i):t.hook(o,i))});let r={version:ut,hooks:t,hook:t.hook,options:e};return e.addons.forEach(n=>{typeof n.setup=="function"&&n.setup(r)}),r}c();import*as kf from"node:readline";import nx from"node:path";import ox from"node:os";import Ze from"node:process";import{blue as Ef,bold as Ai,cyan as ix,dim as Ee,gray as sx,green as ax,underline as Qr,yellow as cx}from"kolorist";import Af from"consola";import{mergeConfig as lx}from"vite";var Zr;function Jr(e,t,r){if(console.log(),console.log(` ${Ai("\u{1F30C} Valaxy")} ${Ef(`v${ut}`)}`),console.log(),console.log(`${Ee(" \u{1FA90} theme ")} > ${e.theme?ax(e.theme):sx("none")}`),console.log(` ${Ee("\u{1F4C1}")} ${Ee(nx.resolve(e.userRoot))}`),t){console.log(),console.log(`${Ee(" Preview ")} > ${ix(`http://localhost:${Ai(t)}/`)}`),r&&Object.values(ox.networkInterfaces()).forEach(u=>(u||[]).filter(f=>f.family==="IPv4"&&!f.address.includes("127.0.0.1")).forEach(({address:f})=>{console.log(`${Ee(" Network ")} > ${Ef(`http://${f}:${Ai(t)}/`)}`)})),console.log();let n=`${Qr("r")}${Ee("estart")}`,o=`${Qr("e")}${Ee("dit")}`,i=`${Qr("o")}${Ee("pen")}`,s=`${Qr("q")}${Ee("r")}`,a=`${Ee(" | ")}`;console.log(`${Ee(" shortcuts ")} > ${n}${a}${i}${a}${s}${a}${o}`)}console.log()}async function Yt(e,t){Zr&&await Zr.close();let r=lx(await Gr(e,"serve"),t);try{Zr=await wf(e,r,{async onConfigReload(n,o,i=!1){i&&(Af.info("[valaxy]",`${cx("force")} reload the server`),Yt(e,t));let s=!1;n.theme!==o.theme&&(s=!0),s&&Yt(e,t)}}),await Zr.listen()}catch(n){Af.error(`failed to start server. error:
|
|
86
|
+
`),console.error(n),Ze.exit(1)}}function Pf(e){Ze.stdin.resume(),Ze.stdin.setEncoding("utf8"),kf.emitKeypressEvents(Ze.stdin),Ze.stdin.isTTY&&Ze.stdin.setRawMode(!0),Ze.stdin.on("keypress",(t,r)=>{if(r.ctrl&&r.name==="c")Ze.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 Tf(e){e.command("build [root]","build your blog to static content",t=>ze(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})=>{St();let i=await _e({userRoot:r},"build");Jr(i);let s=Xr(i);await s.hooks.callHook("options:resolved");let a=[];i.config.modules.rss.enable&&a.push(Hr),Xl(s,a);let u=Of(await Gr(i,"build"),i.config.vite||{}),f=Of(u,{configFile:en.resolve(i.clientRoot,"vite.config.ts"),build:{emptyOutDir:!0,outDir:en.resolve(i.userRoot,n)},logLevel:o});await s.hooks.callHook("config:init");let l=en.resolve(i.clientRoot,"template.html"),p=en.resolve(i.clientRoot,"index.html");tn.existsSync(l)&&await tn.copyFile(l,p);let d=await Wr(i);await tn.writeFile(p,d,"utf-8"),await s.hooks.callHook("build:before");try{if(t){ki.info(`use ${ux("vite-ssg")} to do ssg build...`);try{await bf(i,f),await Sf(i)}catch(C){ki.error("[vite-ssg] An internal error occurred."),console.log(C)}}else ki.info("use vite do spa build..."),await Cf(i,f)}catch(C){console.log(C)}finally{await tn.copyFile(l,p),await s.hooks.callHook("build:after")}})}c();import $f from"node:path";import{exec as dx}from"node:child_process";import mx from"node:process";import gx from"node:os";import hx from"fs-extra";import{mergeConfig as yx}from"vite";import vx from"qrcode";c();import fx from"node:net";async function Pi(e){return await px(e)?e:await Pi(e+1)}function px(e){return new Promise(t=>{let r=fx.createServer(n=>{n.write(`Echo server\r
|
|
87
|
+
`),n.pipe(n)});r.listen(e,"0.0.0.0"),r.on("error",()=>{t(!1)}),r.on("listening",()=>{r.close(),t(!0)})})}function Ff(e){e.command("* [root]","Start a local server for Valaxy",t=>ze(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})=>{si(),hx.existsSync($f.resolve(t,"pages"))||mx.exit(0);let s=r||await Pi(4859),a=await _e({userRoot:t});Xr(a);let u=yx({configFile:$f.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 Yt(a,u),Jr(a,s,o),Pf([{name:"r",fullName:"restart",action(){Yt(a,u)}},{name:"o",fullName:"open",async action(){let{default:l}=await import("open");l(`http://localhost:${s}`)}},{name:"q",fullName:"qr",action(){let p=`http://${Object.values(gx.networkInterfaces()).flat().filter(d=>d?.family==="IPv4"&&!d.address.includes("127.0.0.1"))[0]?.address||"localhost"}:${s}`;vx.toString(p,{type:"terminal"},(d,C)=>{if(d)throw d;console.log(C)})}},{name:"e",fullName:"edit",action(){dx(`code "${t}"`)}}])})}var Xt=xx(Cx(_x.argv)).scriptName("valaxy").usage("$0 [args]").version(ut).showHelpOnFail(!1).alias("h","help").alias("v","version");Ff(Xt);Tf(Xt);cu(Xt);var bx=[Hr,nu];bx.forEach(e=>{e.extendCli?.(Xt)});function cT(){Xt.help().parse()}export{Vt as a,_l as b,$e as c,ri as d,Z as e,xl as f,bt as g,ni as h,bl as i,Sl as j,Al as k,Fe as l,Cy as m,DR as n,by as o,VR as p,BR as q,Sy as r,UR as s,oi as t,Pl as u,GR as v,ai as w,_e as x,ci as y,Gr as z,Wr as A,Cf as B,bf as C,Sf as D,wf as E,Xt as F,cT as G};
|
|
88
|
+
/*! Bundled license information:
|
|
89
|
+
|
|
90
|
+
is-extglob/index.js:
|
|
91
|
+
(*!
|
|
92
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
93
|
+
*
|
|
94
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
95
|
+
* Licensed under the MIT License.
|
|
96
|
+
*)
|
|
97
|
+
|
|
98
|
+
is-glob/index.js:
|
|
99
|
+
(*!
|
|
100
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
101
|
+
*
|
|
102
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
103
|
+
* Released under the MIT License.
|
|
104
|
+
*)
|
|
105
|
+
|
|
106
|
+
is-number/index.js:
|
|
107
|
+
(*!
|
|
108
|
+
* is-number <https://github.com/jonschlinkert/is-number>
|
|
109
|
+
*
|
|
110
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
111
|
+
* Released under the MIT License.
|
|
112
|
+
*)
|
|
113
|
+
|
|
114
|
+
to-regex-range/index.js:
|
|
115
|
+
(*!
|
|
116
|
+
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
117
|
+
*
|
|
118
|
+
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
119
|
+
* Released under the MIT License.
|
|
120
|
+
*)
|
|
121
|
+
|
|
122
|
+
fill-range/index.js:
|
|
123
|
+
(*!
|
|
124
|
+
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
125
|
+
*
|
|
126
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
127
|
+
* Licensed under the MIT License.
|
|
128
|
+
*)
|
|
129
|
+
|
|
130
|
+
queue-microtask/index.js:
|
|
131
|
+
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
132
|
+
|
|
133
|
+
run-parallel/index.js:
|
|
134
|
+
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
135
|
+
*/
|