valaxy 0.15.11 → 0.15.12

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.
@@ -1,5 +1,7 @@
1
1
  import { useDark, useToggle } from '@vueuse/core'
2
2
 
3
+ import 'valaxy/client/styles/common/view-transition.css'
4
+
3
5
  export const isDark = useDark()
4
6
  export const toggleDark = useToggle(isDark)
5
7
 
@@ -22,25 +22,3 @@
22
22
  }
23
23
  }
24
24
 
25
- // dark toggle
26
- // transition
27
- ::view-transition-old(root),
28
- ::view-transition-new(root) {
29
- animation: none;
30
- mix-blend-mode: normal;
31
- }
32
-
33
- /* 进入dark模式和退出dark模式时,两个图像的位置顺序正好相反 */
34
- .dark::view-transition-old(root) {
35
- z-index: 9999;
36
- }
37
- .dark::view-transition-new(root) {
38
- z-index: 1;
39
- }
40
-
41
- ::view-transition-old(root) {
42
- z-index: 1;
43
- }
44
- ::view-transition-new(root) {
45
- z-index: 9999;
46
- }
@@ -0,0 +1,21 @@
1
+ /* dark */
2
+ ::view-transition-old(root),
3
+ ::view-transition-new(root) {
4
+ animation: none;
5
+ mix-blend-mode: normal;
6
+ }
7
+
8
+ /* 进入dark模式和退出dark模式时,两个图像的位置顺序正好相反 */
9
+ .dark::view-transition-old(root) {
10
+ z-index: 9999;
11
+ }
12
+ .dark::view-transition-new(root) {
13
+ z-index: 1;
14
+ }
15
+
16
+ ::view-transition-old(root) {
17
+ z-index: 1;
18
+ }
19
+ ::view-transition-new(root) {
20
+ z-index: 9999;
21
+ }
@@ -4,7 +4,7 @@ import{a as B,b as S,c as Le,d as g,e as c}from"./chunk-GY4S4RDR.mjs";var _i=S(a
4
4
  `).join(`
5
5
  `+i),e.push(o+"m+"+wr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Lg()+t+" "+e[0]}function Lg(){return se.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ng(...e){return process.stderr.write(Rr.format(...e)+`
6
6
  `)}function Dg(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Vg(){return process.env.DEBUG}function Hg(e){e.inspectOpts={};let t=Object.keys(se.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=se.inspectOpts[t[r]]}wr.exports=Fo()(se);var{formatters:gc}=wr.exports;gc.o=function(e){return this.inspectOpts.colors=this.useColors,Rr.inspect(e,this.inspectOpts).split(`
7
- `).map(t=>t.trim()).join(" ")};gc.O=function(e){return this.inspectOpts.colors=this.useColors,Rr.inspect(e,this.inspectOpts)}});var Lo=S(($S,Mo)=>{"use strict";c();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Mo.exports=lc():Mo.exports=hc()});var No=S((IS,yc)=>{"use strict";c();var jg=B("os");yc.exports=jg.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 Do=S((LS,vc)=>{"use strict";c();vc.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 _c=S((DS,Pt)=>{"use strict";c();var qg=process.platform==="win32",Bg=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,Vo={};function Ug(e){return Bg.exec(e).slice(1)}Vo.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Ug(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 Gg=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Ho={};function Wg(e){return Gg.exec(e).slice(1)}Ho.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Wg(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]}};qg?Pt.exports=Vo.parse:Pt.exports=Ho.parse;Pt.exports.posix=Ho.parse;Pt.exports.win32=Vo.parse});var jo=S((HS,bc)=>{"use strict";c();var Sc=B("path"),xc=Sc.parse||_c(),Cc=function(t,r){var n="/";/^([A-Za-z]:)/.test(t)?n="":/^\\\\/.test(t)&&(n="\\\\");for(var o=[t],i=xc(t);i.dir!==o[o.length-1];)o.push(i.dir),i=xc(i.dir);return o.reduce(function(s,a){return s.concat(r.map(function(l){return Sc.resolve(n,a,l)}))},[])};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 Cc(t,o)},r);var i=Cc(t,o);return r&&r.paths?i.concat(r.paths):i}});var qo=S((qS,Rc)=>{"use strict";c();Rc.exports=function(e,t){return t||{}}});var Ac=S((US,Ec)=>{"use strict";c();var wc={}.hasOwnProperty,Bo=Function.prototype.call;Ec.exports=Bo.bind?Bo.bind(wc):function(e,t){return Bo.call(wc,e,t)}});var kc=S((WS,zg)=>{zg.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 Tt=S((zS,Oc)=>{"use strict";c();var Kg=Ac();function Yg(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),l=parseInt(i[s]||0,10);if(a!==l)return o==="<"?a<l:o===">="?a>=l:!1}return o===">="}function Pc(e,t){var r=t.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!Yg(e,r[n]))return!1;return!0}function Qg(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(Pc(r,t[n]))return!0;return!1}return Pc(r,t)}var Tc=kc();Oc.exports=function(t,r){return Kg(Tc,t)&&Qg(r,Tc[t])}});var Ic=S((YS,Fc)=>{"use strict";c();var et=B("fs"),Zg=No(),te=B("path"),Xg=Do(),Jg=jo(),eh=qo(),th=Tt(),rh=process.platform!=="win32"&&et.realpath&&typeof et.realpath.native=="function"?et.realpath.native:et.realpath,$c=Zg(),nh=function(){return[te.join($c,".node_modules"),te.join($c,".node_libraries")]},oh=function(t,r){et.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},ih=function(t,r){et.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},sh=function(t,r){rh(t,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?t:o)})},Ot=function(t,r,n,o){n&&n.preserveSymlinks===!1?t(r,o):o(null,r)},ah=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)}})},ch=function(t,r,n){for(var o=Jg(r,n,t),i=0;i<o.length;i++)o[i]=te.join(o[i],t);return o};Fc.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=eh(t,i);var a=i.isFile||oh,l=i.isDirectory||ih,f=i.readFile||et.readFile,u=i.realpath||sh,p=i.readPackage||ah;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||te.dirname(Xg()),b=i.filename||R;i.paths=i.paths||nh();var I=te.resolve(R);Ot(u,I,i,function(m,k){m?o(m):U(k)});var M;function U(m){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t))M=te.resolve(m,t),(t==="."||t===".."||t.slice(-1)==="/")&&(M+="/"),/\/$/.test(t)&&M===m?w(M,i.package,T):D(M,i.package,T);else{if(x&&th(t))return o(null,t);W(t,m,function(k,$,V){if(k)o(k);else{if($)return Ot(u,$,i,function(_,j){_?o(_):o(null,j,V)});var y=new Error("Cannot find module '"+t+"' from '"+b+"'");y.code="MODULE_NOT_FOUND",o(y)}})}}function T(m,k,$){m?o(m):k?o(null,k,$):w(M,function(V,y,_){if(V)o(V);else if(y)Ot(u,y,i,function(F,L){F?o(F):o(null,L,_)});else{var j=new Error("Cannot find module '"+t+"' from '"+b+"'");j.code="MODULE_NOT_FOUND",o(j)}})}function D(m,k,$){var V=k,y=$;typeof V=="function"&&(y=V,V=void 0);var _=[""].concat(v);j(_,m,V);function j(F,L,z){if(F.length===0)return y(null,void 0,z);var G=L+F[0],ie=z;ie?ne(null,ie):A(te.dirname(G),ne);function ne(ae,H,pe){if(ie=H,ae)return y(ae);if(pe&&ie&&i.pathFilter){var it=te.relative(pe,G),P=it.slice(0,it.length-F[0].length),K=i.pathFilter(ie,L,P);if(K)return j([""].concat(v.slice()),te.resolve(pe,K),ie)}a(G,Oe)}function Oe(ae,H){if(ae)return y(ae);if(H)return y(null,G,ie);j(F.slice(1),L,ie)}}}function A(m,k){if(m===""||m==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(m)||/[/\\]node_modules[/\\]*$/.test(m))return k(null);Ot(u,m,i,function($,V){if($)return A(te.dirname(m),k);var y=te.join(V,"package.json");a(y,function(_,j){if(!j)return A(te.dirname(m),k);p(f,y,function(F,L){F&&k(F);var z=L;z&&i.packageFilter&&(z=i.packageFilter(z,y)),k(null,z,m)})})})}function w(m,k,$){var V=$,y=k;typeof y=="function"&&(V=y,y=i.package),Ot(u,m,i,function(_,j){if(_)return V(_);var F=te.join(j,"package.json");a(F,function(L,z){if(L)return V(L);if(!z)return D(te.join(m,"index"),y,V);p(f,F,function(G,ie){if(G)return V(G);var ne=ie;if(ne&&i.packageFilter&&(ne=i.packageFilter(ne,F)),ne&&ne.main){if(typeof ne.main!="string"){var Oe=new TypeError("package \u201C"+ne.name+"\u201D `main` must be a string");return Oe.code="INVALID_PACKAGE_MAIN",V(Oe)}(ne.main==="."||ne.main==="./")&&(ne.main="index"),D(te.resolve(m,ne.main),ne,function(ae,H,pe){if(ae)return V(ae);if(H)return V(null,H,pe);if(!pe)return D(te.join(m,"index"),pe,V);var it=te.resolve(m,pe.main);w(it,pe,function(P,K,E){if(P)return V(P);if(K)return V(null,K,E);D(te.join(m,"index"),E,V)})});return}D(te.join(m,"/index"),ne,V)})})})}function O(m,k){if(k.length===0)return m(null,void 0);var $=k[0];l(te.dirname($),V);function V(j,F){if(j)return m(j);if(!F)return O(m,k.slice(1));D($,i.package,y)}function y(j,F,L){if(j)return m(j);if(F)return m(null,F,L);w($,i.package,_)}function _(j,F,L){if(j)return m(j);if(F)return m(null,F,L);O(m,k.slice(1))}}function W(m,k,$){var V=function(){return ch(m,k,i)};O($,C?C(m,k,V,i):V())}}});var Mc=S((ZS,lh)=>{lh.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 Vc=S((XS,Dc)=>{"use strict";c();var uh=Tt(),Lc=Mc(),Nc={};for(Er in Lc)Object.prototype.hasOwnProperty.call(Lc,Er)&&(Nc[Er]=uh(Er));var Er;Dc.exports=Nc});var jc=S((eb,Hc)=>{"use strict";c();var fh=Tt();Hc.exports=function(t){return fh(t)}});var Uc=S((rb,Bc)=>{"use strict";c();var ph=Tt(),tt=B("fs"),ue=B("path"),dh=No(),mh=Do(),gh=jo(),hh=qo(),yh=process.platform!=="win32"&&tt.realpathSync&&typeof tt.realpathSync.native=="function"?tt.realpathSync.native:tt.realpathSync,qc=dh(),vh=function(){return[ue.join(qc,".node_modules"),ue.join(qc,".node_libraries")]},_h=function(t){try{var r=tt.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},xh=function(t){try{var r=tt.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},Ch=function(t){try{return yh(t)}catch(r){if(r.code!=="ENOENT")throw r}return t},$t=function(t,r,n){return n&&n.preserveSymlinks===!1?t(r):r},Sh=function(t,r){var n=t(r);try{var o=JSON.parse(n);return o}catch{}},bh=function(t,r,n){for(var o=gh(r,n,t),i=0;i<o.length;i++)o[i]=ue.join(o[i],t);return o};Bc.exports=function(t,r){if(typeof t!="string")throw new TypeError("Path must be a string.");var n=hh(t,r),o=n.isFile||_h,i=n.readFileSync||tt.readFileSync,s=n.isDirectory||xh,a=n.realpathSync||Ch,l=n.readPackageSync||Sh;if(n.readFileSync&&n.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var f=n.packageIterator,u=n.extensions||[".js"],p=n.includeCoreModules!==!1,d=n.basedir||ue.dirname(mh()),C=n.filename||d;n.paths=n.paths||vh();var v=$t(a,ue.resolve(d),n);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)){var x=ue.resolve(v,t);(t==="."||t===".."||t.slice(-1)==="/")&&(x+="/");var R=M(x)||T(x);if(R)return $t(a,R,n)}else{if(p&&ph(t))return t;var b=D(t,v);if(b)return $t(a,b,n)}var I=new Error("Cannot find module '"+t+"' from '"+C+"'");throw I.code="MODULE_NOT_FOUND",I;function M(A){var w=U(ue.dirname(A));if(w&&w.dir&&w.pkg&&n.pathFilter){var O=ue.relative(w.dir,A),W=n.pathFilter(w.pkg,A,O);W&&(A=ue.resolve(w.dir,W))}if(o(A))return A;for(var m=0;m<u.length;m++){var k=A+u[m];if(o(k))return k}}function U(A){if(!(A===""||A==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(A))&&!/[/\\]node_modules[/\\]*$/.test(A)){var w=ue.join($t(a,A,n),"package.json");if(!o(w))return U(ue.dirname(A));var O=l(i,w);return O&&n.packageFilter&&(O=n.packageFilter(O,A)),{pkg:O,dir:A}}}function T(A){var w=ue.join($t(a,A,n),"/package.json");if(o(w)){try{var O=l(i,w)}catch{}if(O&&n.packageFilter&&(O=n.packageFilter(O,A)),O&&O.main){if(typeof O.main!="string"){var W=new TypeError("package \u201C"+O.name+"\u201D `main` must be a string");throw W.code="INVALID_PACKAGE_MAIN",W}(O.main==="."||O.main==="./")&&(O.main="index");try{var m=M(ue.resolve(A,O.main));if(m)return m;var k=T(ue.resolve(A,O.main));if(k)return k}catch{}}}return M(ue.join(A,"/index"))}function D(A,w){for(var O=function(){return bh(A,w,n)},W=f?f(A,w,O,n):O(),m=0;m<W.length;m++){var k=W[m];if(s(ue.dirname(k))){var $=M(k);if($)return $;var V=T(k);if(V)return V}}}}});var Wc=S((ob,Gc)=>{"use strict";c();var Ar=Ic();Ar.core=Vc();Ar.isCore=jc();Ar.sync=Uc();Gc.exports=Ar});var ni=S((q0,ri)=>{"use strict";c();var vv=B("tty"),_v=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||vv.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),Q=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+fu(o,t,r,i)+t:e+o+t},fu=(e,t,r,n)=>{let o=e.substring(0,n)+r,i=e.substring(n+t.length),s=i.indexOf(t);return~s?o+fu(i,t,r,s):o+i},pu=(e=_v)=>({isColorSupported:e,reset:e?t=>`\x1B[0m${t}\x1B[0m`:String,bold:e?Q("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?Q("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?Q("\x1B[3m","\x1B[23m"):String,underline:e?Q("\x1B[4m","\x1B[24m"):String,inverse:e?Q("\x1B[7m","\x1B[27m"):String,hidden:e?Q("\x1B[8m","\x1B[28m"):String,strikethrough:e?Q("\x1B[9m","\x1B[29m"):String,black:e?Q("\x1B[30m","\x1B[39m"):String,red:e?Q("\x1B[31m","\x1B[39m"):String,green:e?Q("\x1B[32m","\x1B[39m"):String,yellow:e?Q("\x1B[33m","\x1B[39m"):String,blue:e?Q("\x1B[34m","\x1B[39m"):String,magenta:e?Q("\x1B[35m","\x1B[39m"):String,cyan:e?Q("\x1B[36m","\x1B[39m"):String,white:e?Q("\x1B[37m","\x1B[39m"):String,gray:e?Q("\x1B[90m","\x1B[39m"):String,bgBlack:e?Q("\x1B[40m","\x1B[49m"):String,bgRed:e?Q("\x1B[41m","\x1B[49m"):String,bgGreen:e?Q("\x1B[42m","\x1B[49m"):String,bgYellow:e?Q("\x1B[43m","\x1B[49m"):String,bgBlue:e?Q("\x1B[44m","\x1B[49m"):String,bgMagenta:e?Q("\x1B[45m","\x1B[49m"):String,bgCyan:e?Q("\x1B[46m","\x1B[49m"):String,bgWhite:e?Q("\x1B[47m","\x1B[49m"):String});ri.exports=pu();ri.exports.createColors=pu});c();import F1 from"node:process";import I1 from"yargs";import{hideBin as M1}from"yargs/helpers";var st="0.15.11";c();var Ol=Le(xr(),1);import{dirname as ly,resolve as uy}from"node:path";import{readFile as fy}from"node:fs/promises";import{cyan as py,dim as kl,yellow as dy}from"kolorist";import Pl from"fs-extra";import my from"gray-matter";import gy from"markdown-it";import{Feed as hy}from"feed";import It from"consola";c();var xl=Le(Lo(),1),Cl=Le(xr(),1);import{dirname as ey,resolve as Or}from"node:path";import vl from"node:process";import ty from"fs-extra";import{ensureSuffix as _l,uniq as ry}from"@antfu/utils";import Sl from"defu";import{cyan as ny,magenta as oy,yellow as iy}from"kolorist";import bl from"consola";c();var nl=Le(Wc(),1);import{join as el}from"node:path";import Lh from"is-installed-globally";import tl from"global-dirs";import rl from"consola";c();import{spawn as Rh}from"cross-spawn";function Ft(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=Rh("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 kr="<!-- more -->",yt=/^https?:/i,zc=/^pathname:\/\//,Kc="/:all(.*)*";function Yc(e){return yt.test(e)}function Pe(e){return e.replace(/\\/g,"/")}function Uo(e,t){return t.startsWith(e)?t:e+t}function J(e){return`/@fs${Uo("/",Pe(e))}`}function Qc(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}c();import{existsSync as kh}from"node:fs";import{resolve as Ph}from"node:path";import Th from"node:process";import{mergeConfig as Oh}from"vite";import{createDefu as $h}from"defu";import{isFunction as Zc}from"@antfu/utils";import{cyan as Fh,dim as Ih}from"kolorist";import Mh from"consola";c();import wh from"node:process";import{loadConfig as Eh}from"unconfig";import{normalizePath as Ah}from"vite";async function rt(e,t={}){let{config:r,sources:n}=await Eh({sources:{files:e,rewrite:t.rewrite},cwd:t.cwd||wh.cwd()}),o=Ah(n[0]||"");return{config:r,configFile:o}}var vt=$h((e,t,r)=>{if(Zc(e[t])&&Zc(r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=Oh(e[t],r),!0});async function Go(e,t){return rt("valaxy.config",{rewrite(r){return typeof r=="function"?r(t||{}):r},cwd:e})}async function Xc(e){let t=e.userRoot||Th.cwd(),{config:r,configFile:n}=await Go(t);r&&Mh.success(`Resolve ${Fh("userValaxyConfig")} from ${Ih(n)}`);let o=e.theme||r?.theme||"yun";return{config:r,configFile:n,theme:o}}async function Jc(e,t){let r={};for(let n of e){if(!kh(Ph(n.root,"valaxy.config.ts")))continue;let{config:o,configFile:i}=await rt("valaxy.config",{rewrite(s,a){return typeof s=="function"?s(n,t):s},cwd:n.root});o&&(n.configFile=i,r=vt(o,r))}return r}function ol(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}function Te(e,t=!1,r={preserveSymlinks:!1}){try{return(0,nl.sync)(e,r)}catch(n){rl.log(n)}if(Lh){try{return B.resolve(el(tl.yarn.packages,e))}catch{}try{return B.resolve(el(tl.npm.packages,e))}catch{}}if(t)throw new Error(`Failed to resolve package ${e}`);rl.error(`Failed to resolve package ${e}`)}c();import{webcrypto as il}from"node:crypto";c();function Nh(e){return e}var Hb=Nh;function Dh(e){return e}var jb=Dh;function Gb(e){return e}function Vh(e){return e}var Wb=Vh,Wo={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:il.getRandomValues(new Uint8Array(16)),iv:il.getRandomValues(new Uint8Array(16))}},sl={ignoreDeadLinks:!0,siteConfig:Wo,theme:"yun",themeConfig:{pkg:{name:"",version:""}},runtimeConfig:{addons:{}},modules:{rss:{enable:!0}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}}};function zb(e){return e}c();import{resolve as Bh}from"node:path";import ml from"node:process";import ll from"fs-extra";import ul from"defu";import{cyan as fl,dim as pl,yellow as Uh}from"kolorist";import Gh from"ora";c();import Hh from"consola";c();import al from"node:process";function zo(){return al.env.NODE_ENV==="production"}function Ko(e="development"){al.env.NODE_ENV=e,nt.level=zo()?2:3}function _t(){return Ko("production")}var nt=Hh.create({level:zo()?2:3});c();import{dirname as cl,resolve as jh}from"node:path";import qh from"fs-extra";function Pr(e,t){if(!e)return"";if(Qc(e))if(t){let r=qh.lstatSync(t).isFile();return jh(r?cl(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return cl(Te(`${e}/package.json`)||"")}async function gl(e,t=ml.cwd()){let r=Gh(`Resolve ${fl("addons")} from ${pl(t)}`).start(),n={},o=s=>{s&&(n[s.name]=ul(n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await dl(s,{cwd:t}));continue}typeof s=="object"&&o(ul(await dl(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{nt.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${Uh(s.name)}${s.global?fl(" (global)"):""} ${pl(s.pkg.homepage||s.pkg.repository)}`)}),i}async function dl(e,t={}){let r=Wh(e,t.cwd||ml.cwd()),n=Bh(r,"./package.json");if(!ll.existsSync(n)){nt.error(`No addon named ${e} found`);return}let o=await ll.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}function Wh(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return Pr(r,t)}c();function hl(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return Pr(r,t)}c();import{cyan as zh,dim as Kh}from"kolorist";import Yh from"consola";async function Qh(e){return rt("site.config",{cwd:e})}async function Tr(e){let{config:t,configFile:r}=await Qh(e);return t&&Yh.success(`Resolve ${zh("siteConfig")} from ${Kh(r)}`),{siteConfig:t,siteConfigFile:r}}c();import{cyan as Zh,dim as Xh}from"kolorist";async function Jh(e){return rt("theme.config",{cwd:e})}async function yl(e){let{config:t,configFile:r}=await Jh(e);return t&&nt.info(`Resolve ${Zh("themeConfig")} from ${Xh(r)}`),{themeConfig:t,themeConfigFile:r}}var sy=(0,xl.default)("valaxy:options");async function ay(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=_l("/",o.url||""),o.cdn.prefix=_l("/",o.cdn.prefix||"");let i=Or(r,"package.json");try{t.themeConfig.pkg=await ty.readJson(i,"utf-8")}catch{console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function Yo(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await gl(t.addons||[],e.userRoot),s=await Jc(i,e);t=vt(t,s);let a=Sl(t,sl);e.config={...a,runtimeConfig:{addons:{}}},e.addons=i,i.forEach(p=>{e.config.runtimeConfig.addons[p.name]=p});let l=i.map(({root:p})=>p),f=i.map(({name:p})=>p);e.addonRoots=l,e.roots=ry([r,n,...l,o]);let u=e.config.vite?.build?.rollupOptions?.external||[];return e.config.vite.build.rollupOptions.external=u.filter(p=>!f.includes(p)),await ay(e),e}async function ye(e={userRoot:vl.cwd()},t="dev"){let r=ey(Te("valaxy/package.json",!0)),n=Or(r,"client"),o=Pe(Or(e.userRoot||vl.cwd()));bl.start(`Resolve ${oy("valaxy")} config...`);let[i,s,a,l]=await Promise.all([Xc(e),Tr(e.userRoot),yl(e.userRoot),(0,Cl.default)(["**.md"],{cwd:Or(o,"pages"),ignore:["**/node_modules"]})]),{config:f,configFile:u,theme:p}=i,{siteConfig:d,siteConfigFile:C}=s,{themeConfig:v,themeConfigFile:x}=a;f=Sl({siteConfig:d},{themeConfig:v},f);let R=hl(p,e.userRoot),b={mode:t,pkgRoot:r,clientRoot:n,userRoot:o,themeRoot:R,addonRoots:[],roots:[],theme:p,config:{...f,runtimeConfig:{addons:{}}},configFile:u||"",siteConfigFile:C||"",themeConfigFile:x||"",pages:l.sort(),addons:[]};sy(b);let I=await Qo(b),M=vt(f,I);return b=await Yo(b,M),b}async function Qo(e){let{config:t}=await Go(e.themeRoot,e);return t&&bl.success(`Resolve ${ny("valaxy.config.ts")} from ${iy(`theme(${e.theme})`)}`),t}c();import Rl from"fs-extra";async function wl(e){return await Ft(e,"created")||(await Rl.stat(e)).ctime}async function El(e){return await Ft(e,"created")||(await Rl.stat(e)).mtime}c();function Be(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}c();function Al(e,t){t.forEach(r=>{r.setup?.(e)})}var yy=gy({html:!0,breaks:!0,linkify:!0});async function Tl(e){It.info(`${dy("RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){It.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};It.info(`RSS Site Url: ${py(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`},l={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=>{l.feedLinks[x]=`${n}${a[x]}`});let f=await(0,Ol.default)(`${e.userRoot}/pages/posts/**/*.md`),u=[];for await(let x of f){let R=await fy(x,"utf-8"),{data:b,content:I,excerpt:M}=my(R,{excerpt_separator:kr});if(b.password)continue;if(b.draft){It.warn(`Ignore draft post: ${kl(x)}`);continue}if(b.hide)continue;let U=x;b.date||(b.date=await wl(U)),r.lastUpdated&&(b.updated||(b.updated=await El(U)));let T=yy.render(M||I.slice(0,100)).replace('src="/',`src="${o}/`);b.image?.startsWith("/")&&(b.image=o+b.image),u.push({title:"",...b,id:(b.id||"").toString(),date:new Date(b.date),published:new Date(b.updated||b.date),content:T,author:[i],link:o+x.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}u.sort((x,R)=>+new Date(R.published||R.date)-+new Date(x.published||x.date));let p=r.author?.avatar||"/favicon.svg";l.author=i,l.image=Yc(p)?r.author?.avatar:`${o}${Uo("/",p)}`,l.favicon=`${o}${r.feed?.favicon||r.favicon}`;let d=new hy(l);u.forEach(x=>d.addItem(x)),await Pl.ensureDir(ly(`./dist/${a.atom}`));let C=uy(e.userRoot,"./dist");["rss","atom","json"].forEach(x=>{let R="",b=`${C}/${a[x]}`;x==="rss"?R=d.rss2():x==="atom"?R=d.atom1():x==="json"&&(R=d.json1()),Pl.writeFileSync(b,R,"utf-8"),It.info(`${x}: ${kl(b)}`)})}var $r={extendCli(e){e.command("rss [root]","generate rss feed",t=>Be(t).strict().help(),async({root:t})=>{_t();let r=await ye({userRoot:t},"build");await Tl(r)})},setup(e){e.hook("build:after",()=>{console.log(),Tl(e.options)})}};c();var $l=Le(xr(),1);import Mt from"node:path";import Ue from"fs-extra";import xt from"consola";import vy from"gray-matter";import{cyan as _y,dim as Lt}from"kolorist";async function Fl(e){xt.start(`Generate List for Fuse Search by (${_y("fuse.js")}) ...`);let t=await(0,$l.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=Ue.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=vy(o,{excerpt_separator:"<!-- more -->"});if(i.draft){xt.warn(`Ignore draft post: ${Lt(n)}`);continue}if(i.hide||i.password)continue;let l=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$/,""))};l.includes("content")&&(f.content=a||""),r.push(f)}return r}function xy(e){e.command("fuse [root]","generate fuse list for search",t=>Be(t).strict().help(),async({root:t})=>{xt.info("Please generate it before build."),_t();let r=await ye({userRoot:t},"build"),n=await Fl(r);await Ue.ensureDir("./dist");let o=Mt.resolve(r.userRoot,"public"),i=Mt.resolve(o,r.config.siteConfig.fuse.dataPath),s=Mt.join("public",r.config.siteConfig.fuse.dataPath);await Ue.ensureFile(i),Ue.writeJSONSync(i,n),xt.success(`Generate fuse list in ${Lt(o)}`);let a=Mt.resolve(r.userRoot,"dist"),l=Mt.resolve(a,r.config.siteConfig.fuse.dataPath);await Ue.ensureDir(a),Ue.writeJSONSync(l,n),xt.success(`Generate fuse list in ${Lt(a)}`);try{if(!(await Ue.readFile(`${r.userRoot}/.gitignore`,"utf-8")).includes(s)){let u=s.replace(/\\/g,"/");await Ue.appendFile(`${r.userRoot}/.gitignore`,`
7
+ `).map(t=>t.trim()).join(" ")};gc.O=function(e){return this.inspectOpts.colors=this.useColors,Rr.inspect(e,this.inspectOpts)}});var Lo=S(($S,Mo)=>{"use strict";c();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Mo.exports=lc():Mo.exports=hc()});var No=S((IS,yc)=>{"use strict";c();var jg=B("os");yc.exports=jg.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 Do=S((LS,vc)=>{"use strict";c();vc.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 _c=S((DS,Pt)=>{"use strict";c();var qg=process.platform==="win32",Bg=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,Vo={};function Ug(e){return Bg.exec(e).slice(1)}Vo.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Ug(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 Gg=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Ho={};function Wg(e){return Gg.exec(e).slice(1)}Ho.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Wg(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]}};qg?Pt.exports=Vo.parse:Pt.exports=Ho.parse;Pt.exports.posix=Ho.parse;Pt.exports.win32=Vo.parse});var jo=S((HS,bc)=>{"use strict";c();var Sc=B("path"),xc=Sc.parse||_c(),Cc=function(t,r){var n="/";/^([A-Za-z]:)/.test(t)?n="":/^\\\\/.test(t)&&(n="\\\\");for(var o=[t],i=xc(t);i.dir!==o[o.length-1];)o.push(i.dir),i=xc(i.dir);return o.reduce(function(s,a){return s.concat(r.map(function(l){return Sc.resolve(n,a,l)}))},[])};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 Cc(t,o)},r);var i=Cc(t,o);return r&&r.paths?i.concat(r.paths):i}});var qo=S((qS,Rc)=>{"use strict";c();Rc.exports=function(e,t){return t||{}}});var Ac=S((US,Ec)=>{"use strict";c();var wc={}.hasOwnProperty,Bo=Function.prototype.call;Ec.exports=Bo.bind?Bo.bind(wc):function(e,t){return Bo.call(wc,e,t)}});var kc=S((WS,zg)=>{zg.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 Tt=S((zS,Oc)=>{"use strict";c();var Kg=Ac();function Yg(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),l=parseInt(i[s]||0,10);if(a!==l)return o==="<"?a<l:o===">="?a>=l:!1}return o===">="}function Pc(e,t){var r=t.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!Yg(e,r[n]))return!1;return!0}function Qg(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(Pc(r,t[n]))return!0;return!1}return Pc(r,t)}var Tc=kc();Oc.exports=function(t,r){return Kg(Tc,t)&&Qg(r,Tc[t])}});var Ic=S((YS,Fc)=>{"use strict";c();var et=B("fs"),Zg=No(),te=B("path"),Xg=Do(),Jg=jo(),eh=qo(),th=Tt(),rh=process.platform!=="win32"&&et.realpath&&typeof et.realpath.native=="function"?et.realpath.native:et.realpath,$c=Zg(),nh=function(){return[te.join($c,".node_modules"),te.join($c,".node_libraries")]},oh=function(t,r){et.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},ih=function(t,r){et.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},sh=function(t,r){rh(t,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?t:o)})},Ot=function(t,r,n,o){n&&n.preserveSymlinks===!1?t(r,o):o(null,r)},ah=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)}})},ch=function(t,r,n){for(var o=Jg(r,n,t),i=0;i<o.length;i++)o[i]=te.join(o[i],t);return o};Fc.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=eh(t,i);var a=i.isFile||oh,l=i.isDirectory||ih,f=i.readFile||et.readFile,u=i.realpath||sh,p=i.readPackage||ah;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||te.dirname(Xg()),b=i.filename||R;i.paths=i.paths||nh();var I=te.resolve(R);Ot(u,I,i,function(m,k){m?o(m):U(k)});var M;function U(m){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t))M=te.resolve(m,t),(t==="."||t===".."||t.slice(-1)==="/")&&(M+="/"),/\/$/.test(t)&&M===m?w(M,i.package,T):D(M,i.package,T);else{if(x&&th(t))return o(null,t);W(t,m,function(k,$,V){if(k)o(k);else{if($)return Ot(u,$,i,function(_,j){_?o(_):o(null,j,V)});var y=new Error("Cannot find module '"+t+"' from '"+b+"'");y.code="MODULE_NOT_FOUND",o(y)}})}}function T(m,k,$){m?o(m):k?o(null,k,$):w(M,function(V,y,_){if(V)o(V);else if(y)Ot(u,y,i,function(F,L){F?o(F):o(null,L,_)});else{var j=new Error("Cannot find module '"+t+"' from '"+b+"'");j.code="MODULE_NOT_FOUND",o(j)}})}function D(m,k,$){var V=k,y=$;typeof V=="function"&&(y=V,V=void 0);var _=[""].concat(v);j(_,m,V);function j(F,L,z){if(F.length===0)return y(null,void 0,z);var G=L+F[0],ie=z;ie?ne(null,ie):A(te.dirname(G),ne);function ne(ae,H,pe){if(ie=H,ae)return y(ae);if(pe&&ie&&i.pathFilter){var it=te.relative(pe,G),P=it.slice(0,it.length-F[0].length),K=i.pathFilter(ie,L,P);if(K)return j([""].concat(v.slice()),te.resolve(pe,K),ie)}a(G,Oe)}function Oe(ae,H){if(ae)return y(ae);if(H)return y(null,G,ie);j(F.slice(1),L,ie)}}}function A(m,k){if(m===""||m==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(m)||/[/\\]node_modules[/\\]*$/.test(m))return k(null);Ot(u,m,i,function($,V){if($)return A(te.dirname(m),k);var y=te.join(V,"package.json");a(y,function(_,j){if(!j)return A(te.dirname(m),k);p(f,y,function(F,L){F&&k(F);var z=L;z&&i.packageFilter&&(z=i.packageFilter(z,y)),k(null,z,m)})})})}function w(m,k,$){var V=$,y=k;typeof y=="function"&&(V=y,y=i.package),Ot(u,m,i,function(_,j){if(_)return V(_);var F=te.join(j,"package.json");a(F,function(L,z){if(L)return V(L);if(!z)return D(te.join(m,"index"),y,V);p(f,F,function(G,ie){if(G)return V(G);var ne=ie;if(ne&&i.packageFilter&&(ne=i.packageFilter(ne,F)),ne&&ne.main){if(typeof ne.main!="string"){var Oe=new TypeError("package \u201C"+ne.name+"\u201D `main` must be a string");return Oe.code="INVALID_PACKAGE_MAIN",V(Oe)}(ne.main==="."||ne.main==="./")&&(ne.main="index"),D(te.resolve(m,ne.main),ne,function(ae,H,pe){if(ae)return V(ae);if(H)return V(null,H,pe);if(!pe)return D(te.join(m,"index"),pe,V);var it=te.resolve(m,pe.main);w(it,pe,function(P,K,E){if(P)return V(P);if(K)return V(null,K,E);D(te.join(m,"index"),E,V)})});return}D(te.join(m,"/index"),ne,V)})})})}function O(m,k){if(k.length===0)return m(null,void 0);var $=k[0];l(te.dirname($),V);function V(j,F){if(j)return m(j);if(!F)return O(m,k.slice(1));D($,i.package,y)}function y(j,F,L){if(j)return m(j);if(F)return m(null,F,L);w($,i.package,_)}function _(j,F,L){if(j)return m(j);if(F)return m(null,F,L);O(m,k.slice(1))}}function W(m,k,$){var V=function(){return ch(m,k,i)};O($,C?C(m,k,V,i):V())}}});var Mc=S((ZS,lh)=>{lh.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 Vc=S((XS,Dc)=>{"use strict";c();var uh=Tt(),Lc=Mc(),Nc={};for(Er in Lc)Object.prototype.hasOwnProperty.call(Lc,Er)&&(Nc[Er]=uh(Er));var Er;Dc.exports=Nc});var jc=S((eb,Hc)=>{"use strict";c();var fh=Tt();Hc.exports=function(t){return fh(t)}});var Uc=S((rb,Bc)=>{"use strict";c();var ph=Tt(),tt=B("fs"),ue=B("path"),dh=No(),mh=Do(),gh=jo(),hh=qo(),yh=process.platform!=="win32"&&tt.realpathSync&&typeof tt.realpathSync.native=="function"?tt.realpathSync.native:tt.realpathSync,qc=dh(),vh=function(){return[ue.join(qc,".node_modules"),ue.join(qc,".node_libraries")]},_h=function(t){try{var r=tt.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},xh=function(t){try{var r=tt.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},Ch=function(t){try{return yh(t)}catch(r){if(r.code!=="ENOENT")throw r}return t},$t=function(t,r,n){return n&&n.preserveSymlinks===!1?t(r):r},Sh=function(t,r){var n=t(r);try{var o=JSON.parse(n);return o}catch{}},bh=function(t,r,n){for(var o=gh(r,n,t),i=0;i<o.length;i++)o[i]=ue.join(o[i],t);return o};Bc.exports=function(t,r){if(typeof t!="string")throw new TypeError("Path must be a string.");var n=hh(t,r),o=n.isFile||_h,i=n.readFileSync||tt.readFileSync,s=n.isDirectory||xh,a=n.realpathSync||Ch,l=n.readPackageSync||Sh;if(n.readFileSync&&n.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var f=n.packageIterator,u=n.extensions||[".js"],p=n.includeCoreModules!==!1,d=n.basedir||ue.dirname(mh()),C=n.filename||d;n.paths=n.paths||vh();var v=$t(a,ue.resolve(d),n);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)){var x=ue.resolve(v,t);(t==="."||t===".."||t.slice(-1)==="/")&&(x+="/");var R=M(x)||T(x);if(R)return $t(a,R,n)}else{if(p&&ph(t))return t;var b=D(t,v);if(b)return $t(a,b,n)}var I=new Error("Cannot find module '"+t+"' from '"+C+"'");throw I.code="MODULE_NOT_FOUND",I;function M(A){var w=U(ue.dirname(A));if(w&&w.dir&&w.pkg&&n.pathFilter){var O=ue.relative(w.dir,A),W=n.pathFilter(w.pkg,A,O);W&&(A=ue.resolve(w.dir,W))}if(o(A))return A;for(var m=0;m<u.length;m++){var k=A+u[m];if(o(k))return k}}function U(A){if(!(A===""||A==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(A))&&!/[/\\]node_modules[/\\]*$/.test(A)){var w=ue.join($t(a,A,n),"package.json");if(!o(w))return U(ue.dirname(A));var O=l(i,w);return O&&n.packageFilter&&(O=n.packageFilter(O,A)),{pkg:O,dir:A}}}function T(A){var w=ue.join($t(a,A,n),"/package.json");if(o(w)){try{var O=l(i,w)}catch{}if(O&&n.packageFilter&&(O=n.packageFilter(O,A)),O&&O.main){if(typeof O.main!="string"){var W=new TypeError("package \u201C"+O.name+"\u201D `main` must be a string");throw W.code="INVALID_PACKAGE_MAIN",W}(O.main==="."||O.main==="./")&&(O.main="index");try{var m=M(ue.resolve(A,O.main));if(m)return m;var k=T(ue.resolve(A,O.main));if(k)return k}catch{}}}return M(ue.join(A,"/index"))}function D(A,w){for(var O=function(){return bh(A,w,n)},W=f?f(A,w,O,n):O(),m=0;m<W.length;m++){var k=W[m];if(s(ue.dirname(k))){var $=M(k);if($)return $;var V=T(k);if(V)return V}}}}});var Wc=S((ob,Gc)=>{"use strict";c();var Ar=Ic();Ar.core=Vc();Ar.isCore=jc();Ar.sync=Uc();Gc.exports=Ar});var ni=S((q0,ri)=>{"use strict";c();var vv=B("tty"),_v=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||vv.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),Q=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+fu(o,t,r,i)+t:e+o+t},fu=(e,t,r,n)=>{let o=e.substring(0,n)+r,i=e.substring(n+t.length),s=i.indexOf(t);return~s?o+fu(i,t,r,s):o+i},pu=(e=_v)=>({isColorSupported:e,reset:e?t=>`\x1B[0m${t}\x1B[0m`:String,bold:e?Q("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?Q("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?Q("\x1B[3m","\x1B[23m"):String,underline:e?Q("\x1B[4m","\x1B[24m"):String,inverse:e?Q("\x1B[7m","\x1B[27m"):String,hidden:e?Q("\x1B[8m","\x1B[28m"):String,strikethrough:e?Q("\x1B[9m","\x1B[29m"):String,black:e?Q("\x1B[30m","\x1B[39m"):String,red:e?Q("\x1B[31m","\x1B[39m"):String,green:e?Q("\x1B[32m","\x1B[39m"):String,yellow:e?Q("\x1B[33m","\x1B[39m"):String,blue:e?Q("\x1B[34m","\x1B[39m"):String,magenta:e?Q("\x1B[35m","\x1B[39m"):String,cyan:e?Q("\x1B[36m","\x1B[39m"):String,white:e?Q("\x1B[37m","\x1B[39m"):String,gray:e?Q("\x1B[90m","\x1B[39m"):String,bgBlack:e?Q("\x1B[40m","\x1B[49m"):String,bgRed:e?Q("\x1B[41m","\x1B[49m"):String,bgGreen:e?Q("\x1B[42m","\x1B[49m"):String,bgYellow:e?Q("\x1B[43m","\x1B[49m"):String,bgBlue:e?Q("\x1B[44m","\x1B[49m"):String,bgMagenta:e?Q("\x1B[45m","\x1B[49m"):String,bgCyan:e?Q("\x1B[46m","\x1B[49m"):String,bgWhite:e?Q("\x1B[47m","\x1B[49m"):String});ri.exports=pu();ri.exports.createColors=pu});c();import F1 from"node:process";import I1 from"yargs";import{hideBin as M1}from"yargs/helpers";var st="0.15.12";c();var Ol=Le(xr(),1);import{dirname as ly,resolve as uy}from"node:path";import{readFile as fy}from"node:fs/promises";import{cyan as py,dim as kl,yellow as dy}from"kolorist";import Pl from"fs-extra";import my from"gray-matter";import gy from"markdown-it";import{Feed as hy}from"feed";import It from"consola";c();var xl=Le(Lo(),1),Cl=Le(xr(),1);import{dirname as ey,resolve as Or}from"node:path";import vl from"node:process";import ty from"fs-extra";import{ensureSuffix as _l,uniq as ry}from"@antfu/utils";import Sl from"defu";import{cyan as ny,magenta as oy,yellow as iy}from"kolorist";import bl from"consola";c();var nl=Le(Wc(),1);import{join as el}from"node:path";import Lh from"is-installed-globally";import tl from"global-dirs";import rl from"consola";c();import{spawn as Rh}from"cross-spawn";function Ft(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=Rh("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 kr="<!-- more -->",yt=/^https?:/i,zc=/^pathname:\/\//,Kc="/:all(.*)*";function Yc(e){return yt.test(e)}function Pe(e){return e.replace(/\\/g,"/")}function Uo(e,t){return t.startsWith(e)?t:e+t}function J(e){return`/@fs${Uo("/",Pe(e))}`}function Qc(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}c();import{existsSync as kh}from"node:fs";import{resolve as Ph}from"node:path";import Th from"node:process";import{mergeConfig as Oh}from"vite";import{createDefu as $h}from"defu";import{isFunction as Zc}from"@antfu/utils";import{cyan as Fh,dim as Ih}from"kolorist";import Mh from"consola";c();import wh from"node:process";import{loadConfig as Eh}from"unconfig";import{normalizePath as Ah}from"vite";async function rt(e,t={}){let{config:r,sources:n}=await Eh({sources:{files:e,rewrite:t.rewrite},cwd:t.cwd||wh.cwd()}),o=Ah(n[0]||"");return{config:r,configFile:o}}var vt=$h((e,t,r)=>{if(Zc(e[t])&&Zc(r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=Oh(e[t],r),!0});async function Go(e,t){return rt("valaxy.config",{rewrite(r){return typeof r=="function"?r(t||{}):r},cwd:e})}async function Xc(e){let t=e.userRoot||Th.cwd(),{config:r,configFile:n}=await Go(t);r&&Mh.success(`Resolve ${Fh("userValaxyConfig")} from ${Ih(n)}`);let o=e.theme||r?.theme||"yun";return{config:r,configFile:n,theme:o}}async function Jc(e,t){let r={};for(let n of e){if(!kh(Ph(n.root,"valaxy.config.ts")))continue;let{config:o,configFile:i}=await rt("valaxy.config",{rewrite(s,a){return typeof s=="function"?s(n,t):s},cwd:n.root});o&&(n.configFile=i,r=vt(o,r))}return r}function ol(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}function Te(e,t=!1,r={preserveSymlinks:!1}){try{return(0,nl.sync)(e,r)}catch(n){rl.log(n)}if(Lh){try{return B.resolve(el(tl.yarn.packages,e))}catch{}try{return B.resolve(el(tl.npm.packages,e))}catch{}}if(t)throw new Error(`Failed to resolve package ${e}`);rl.error(`Failed to resolve package ${e}`)}c();import{webcrypto as il}from"node:crypto";c();function Nh(e){return e}var Hb=Nh;function Dh(e){return e}var jb=Dh;function Gb(e){return e}function Vh(e){return e}var Wb=Vh,Wo={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:il.getRandomValues(new Uint8Array(16)),iv:il.getRandomValues(new Uint8Array(16))}},sl={ignoreDeadLinks:!0,siteConfig:Wo,theme:"yun",themeConfig:{pkg:{name:"",version:""}},runtimeConfig:{addons:{}},modules:{rss:{enable:!0}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}}};function zb(e){return e}c();import{resolve as Bh}from"node:path";import ml from"node:process";import ll from"fs-extra";import ul from"defu";import{cyan as fl,dim as pl,yellow as Uh}from"kolorist";import Gh from"ora";c();import Hh from"consola";c();import al from"node:process";function zo(){return al.env.NODE_ENV==="production"}function Ko(e="development"){al.env.NODE_ENV=e,nt.level=zo()?2:3}function _t(){return Ko("production")}var nt=Hh.create({level:zo()?2:3});c();import{dirname as cl,resolve as jh}from"node:path";import qh from"fs-extra";function Pr(e,t){if(!e)return"";if(Qc(e))if(t){let r=qh.lstatSync(t).isFile();return jh(r?cl(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return cl(Te(`${e}/package.json`)||"")}async function gl(e,t=ml.cwd()){let r=Gh(`Resolve ${fl("addons")} from ${pl(t)}`).start(),n={},o=s=>{s&&(n[s.name]=ul(n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await dl(s,{cwd:t}));continue}typeof s=="object"&&o(ul(await dl(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{nt.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${Uh(s.name)}${s.global?fl(" (global)"):""} ${pl(s.pkg.homepage||s.pkg.repository)}`)}),i}async function dl(e,t={}){let r=Wh(e,t.cwd||ml.cwd()),n=Bh(r,"./package.json");if(!ll.existsSync(n)){nt.error(`No addon named ${e} found`);return}let o=await ll.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}function Wh(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return Pr(r,t)}c();function hl(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return Pr(r,t)}c();import{cyan as zh,dim as Kh}from"kolorist";import Yh from"consola";async function Qh(e){return rt("site.config",{cwd:e})}async function Tr(e){let{config:t,configFile:r}=await Qh(e);return t&&Yh.success(`Resolve ${zh("siteConfig")} from ${Kh(r)}`),{siteConfig:t,siteConfigFile:r}}c();import{cyan as Zh,dim as Xh}from"kolorist";async function Jh(e){return rt("theme.config",{cwd:e})}async function yl(e){let{config:t,configFile:r}=await Jh(e);return t&&nt.info(`Resolve ${Zh("themeConfig")} from ${Xh(r)}`),{themeConfig:t,themeConfigFile:r}}var sy=(0,xl.default)("valaxy:options");async function ay(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=_l("/",o.url||""),o.cdn.prefix=_l("/",o.cdn.prefix||"");let i=Or(r,"package.json");try{t.themeConfig.pkg=await ty.readJson(i,"utf-8")}catch{console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function Yo(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await gl(t.addons||[],e.userRoot),s=await Jc(i,e);t=vt(t,s);let a=Sl(t,sl);e.config={...a,runtimeConfig:{addons:{}}},e.addons=i,i.forEach(p=>{e.config.runtimeConfig.addons[p.name]=p});let l=i.map(({root:p})=>p),f=i.map(({name:p})=>p);e.addonRoots=l,e.roots=ry([r,n,...l,o]);let u=e.config.vite?.build?.rollupOptions?.external||[];return e.config.vite.build.rollupOptions.external=u.filter(p=>!f.includes(p)),await ay(e),e}async function ye(e={userRoot:vl.cwd()},t="dev"){let r=ey(Te("valaxy/package.json",!0)),n=Or(r,"client"),o=Pe(Or(e.userRoot||vl.cwd()));bl.start(`Resolve ${oy("valaxy")} config...`);let[i,s,a,l]=await Promise.all([Xc(e),Tr(e.userRoot),yl(e.userRoot),(0,Cl.default)(["**.md"],{cwd:Or(o,"pages"),ignore:["**/node_modules"]})]),{config:f,configFile:u,theme:p}=i,{siteConfig:d,siteConfigFile:C}=s,{themeConfig:v,themeConfigFile:x}=a;f=Sl({siteConfig:d},{themeConfig:v},f);let R=hl(p,e.userRoot),b={mode:t,pkgRoot:r,clientRoot:n,userRoot:o,themeRoot:R,addonRoots:[],roots:[],theme:p,config:{...f,runtimeConfig:{addons:{}}},configFile:u||"",siteConfigFile:C||"",themeConfigFile:x||"",pages:l.sort(),addons:[]};sy(b);let I=await Qo(b),M=vt(f,I);return b=await Yo(b,M),b}async function Qo(e){let{config:t}=await Go(e.themeRoot,e);return t&&bl.success(`Resolve ${ny("valaxy.config.ts")} from ${iy(`theme(${e.theme})`)}`),t}c();import Rl from"fs-extra";async function wl(e){return await Ft(e,"created")||(await Rl.stat(e)).ctime}async function El(e){return await Ft(e,"created")||(await Rl.stat(e)).mtime}c();function Be(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}c();function Al(e,t){t.forEach(r=>{r.setup?.(e)})}var yy=gy({html:!0,breaks:!0,linkify:!0});async function Tl(e){It.info(`${dy("RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){It.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};It.info(`RSS Site Url: ${py(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`},l={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=>{l.feedLinks[x]=`${n}${a[x]}`});let f=await(0,Ol.default)(`${e.userRoot}/pages/posts/**/*.md`),u=[];for await(let x of f){let R=await fy(x,"utf-8"),{data:b,content:I,excerpt:M}=my(R,{excerpt_separator:kr});if(b.password)continue;if(b.draft){It.warn(`Ignore draft post: ${kl(x)}`);continue}if(b.hide)continue;let U=x;b.date||(b.date=await wl(U)),r.lastUpdated&&(b.updated||(b.updated=await El(U)));let T=yy.render(M||I.slice(0,100)).replace('src="/',`src="${o}/`);b.image?.startsWith("/")&&(b.image=o+b.image),u.push({title:"",...b,id:(b.id||"").toString(),date:new Date(b.date),published:new Date(b.updated||b.date),content:T,author:[i],link:o+x.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}u.sort((x,R)=>+new Date(R.published||R.date)-+new Date(x.published||x.date));let p=r.author?.avatar||"/favicon.svg";l.author=i,l.image=Yc(p)?r.author?.avatar:`${o}${Uo("/",p)}`,l.favicon=`${o}${r.feed?.favicon||r.favicon}`;let d=new hy(l);u.forEach(x=>d.addItem(x)),await Pl.ensureDir(ly(`./dist/${a.atom}`));let C=uy(e.userRoot,"./dist");["rss","atom","json"].forEach(x=>{let R="",b=`${C}/${a[x]}`;x==="rss"?R=d.rss2():x==="atom"?R=d.atom1():x==="json"&&(R=d.json1()),Pl.writeFileSync(b,R,"utf-8"),It.info(`${x}: ${kl(b)}`)})}var $r={extendCli(e){e.command("rss [root]","generate rss feed",t=>Be(t).strict().help(),async({root:t})=>{_t();let r=await ye({userRoot:t},"build");await Tl(r)})},setup(e){e.hook("build:after",()=>{console.log(),Tl(e.options)})}};c();var $l=Le(xr(),1);import Mt from"node:path";import Ue from"fs-extra";import xt from"consola";import vy from"gray-matter";import{cyan as _y,dim as Lt}from"kolorist";async function Fl(e){xt.start(`Generate List for Fuse Search by (${_y("fuse.js")}) ...`);let t=await(0,$l.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=Ue.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=vy(o,{excerpt_separator:"<!-- more -->"});if(i.draft){xt.warn(`Ignore draft post: ${Lt(n)}`);continue}if(i.hide||i.password)continue;let l=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$/,""))};l.includes("content")&&(f.content=a||""),r.push(f)}return r}function xy(e){e.command("fuse [root]","generate fuse list for search",t=>Be(t).strict().help(),async({root:t})=>{xt.info("Please generate it before build."),_t();let r=await ye({userRoot:t},"build"),n=await Fl(r);await Ue.ensureDir("./dist");let o=Mt.resolve(r.userRoot,"public"),i=Mt.resolve(o,r.config.siteConfig.fuse.dataPath),s=Mt.join("public",r.config.siteConfig.fuse.dataPath);await Ue.ensureFile(i),Ue.writeJSONSync(i,n),xt.success(`Generate fuse list in ${Lt(o)}`);let a=Mt.resolve(r.userRoot,"dist"),l=Mt.resolve(a,r.config.siteConfig.fuse.dataPath);await Ue.ensureDir(a),Ue.writeJSONSync(l,n),xt.success(`Generate fuse list in ${Lt(a)}`);try{if(!(await Ue.readFile(`${r.userRoot}/.gitignore`,"utf-8")).includes(s)){let u=s.replace(/\\/g,"/");await Ue.appendFile(`${r.userRoot}/.gitignore`,`
8
8
  # valaxy
9
9
  ${u}
10
10
  `),xt.success(`Add ${Lt(u)} to ${Lt(".gitignore")}`)}}catch{}})}var Il={extendCli(e){xy(e)},setup(e){e.hook("build:before",()=>{Fl(e.options)})}};c();c();import{join as wy,resolve as Nl}from"node:path";import{writeFile as Ey}from"node:fs/promises";import{render as Ay}from"ejs";import ky from"dayjs";import{ensureSuffix as Py}from"@antfu/utils";import{consola as Zo}from"consola";import{green as Ty,magenta as Oy}from"kolorist";c();import{access as Cy}from"node:fs/promises";async function Fr(e){try{return await Cy(e),!0}catch{return!1}}c();import by from"node:path";import{readFile as Ry}from"node:fs/promises";c();import Sy from"node:process";var Nt=Sy.cwd(),Ml=`---
@@ -3,7 +3,7 @@
3
3
  `).join(`
4
4
  `+i),e.push(o+"m+"+Rr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Mg()+t+" "+e[0]}function Mg(){return ie.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Lg(...e){return process.stderr.write(br.format(...e)+`
5
5
  `)}function Ng(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Dg(){return process.env.DEBUG}function Vg(e){e.inspectOpts={};let t=Object.keys(ie.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=ie.inspectOpts[t[r]]}Rr.exports=$o()(ie);var{formatters:mc}=Rr.exports;mc.o=function(e){return this.inspectOpts.colors=this.useColors,br.inspect(e,this.inspectOpts).split(`
6
- `).map(t=>t.trim()).join(" ")};mc.O=function(e){return this.inspectOpts.colors=this.useColors,br.inspect(e,this.inspectOpts)}});var Mo=_chunkYDNPXS5Ucjs.b.call(void 0, (OS,Io)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Io.exports=cc():Io.exports=gc()});var Lo=_chunkYDNPXS5Ucjs.b.call(void 0, (FS,hc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Hg=_chunkYDNPXS5Ucjs.a.call(void 0, "os");hc.exports=Hg.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 No=_chunkYDNPXS5Ucjs.b.call(void 0, (MS,yc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );yc.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=_chunkYDNPXS5Ucjs.b.call(void 0, (NS,kt)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var jg=process.platform==="win32",qg=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,Do={};function Bg(e){return qg.exec(e).slice(1)}Do.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Bg(e);if(!t||t.length!==5)throw new TypeError("Invalid path '"+e+"'");return{root:t[1],dir:t[0]===t[1]?t[0]:t[0].slice(0,-1),base:t[2],ext:t[4],name:t[3]}};var Ug=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Vo={};function Gg(e){return Ug.exec(e).slice(1)}Vo.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Gg(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]}};jg?kt.exports=Do.parse:kt.exports=Vo.parse;kt.exports.posix=Vo.parse;kt.exports.win32=Do.parse});var Ho=_chunkYDNPXS5Ucjs.b.call(void 0, (VS,Sc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Cc=_chunkYDNPXS5Ucjs.a.call(void 0, "path"),_c=Cc.parse||vc(),xc=function(t,r){var n="/";/^([A-Za-z]:)/.test(t)?n="":/^\\\\/.test(t)&&(n="\\\\");for(var o=[t],i=_c(t);i.dir!==o[o.length-1];)o.push(i.dir),i=_c(i.dir);return o.reduce(function(s,a){return s.concat(r.map(function(l){return Cc.resolve(n,a,l)}))},[])};Sc.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 xc(t,o)},r);var i=xc(t,o);return r&&r.paths?i.concat(r.paths):i}});var jo=_chunkYDNPXS5Ucjs.b.call(void 0, (jS,bc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );bc.exports=function(e,t){return t||{}}});var Ec=_chunkYDNPXS5Ucjs.b.call(void 0, (BS,wc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Rc={}.hasOwnProperty,qo=Function.prototype.call;wc.exports=qo.bind?qo.bind(Rc):function(e,t){return qo.call(Rc,e,t)}});var Ac=_chunkYDNPXS5Ucjs.b.call(void 0, (GS,Wg)=>{Wg.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 Pt=_chunkYDNPXS5Ucjs.b.call(void 0, (WS,Tc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var zg=Ec();function Kg(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),l=parseInt(i[s]||0,10);if(a!==l)return o==="<"?a<l:o===">="?a>=l:!1}return o===">="}function kc(e,t){var r=t.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!Kg(e,r[n]))return!1;return!0}function Yg(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(kc(r,t[n]))return!0;return!1}return kc(r,t)}var Pc=Ac();Tc.exports=function(t,r){return zg(Pc,t)&&Yg(r,Pc[t])}});var Fc=_chunkYDNPXS5Ucjs.b.call(void 0, (KS,$c)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Je=_chunkYDNPXS5Ucjs.a.call(void 0, "fs"),Qg=Lo(),ee=_chunkYDNPXS5Ucjs.a.call(void 0, "path"),Zg=No(),Xg=Ho(),Jg=jo(),eh=Pt(),th=process.platform!=="win32"&&Je.realpath&&typeof Je.realpath.native=="function"?Je.realpath.native:Je.realpath,Oc=Qg(),rh=function(){return[ee.join(Oc,".node_modules"),ee.join(Oc,".node_libraries")]},nh=function(t,r){Je.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},oh=function(t,r){Je.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},ih=function(t,r){th(t,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?t:o)})},Tt=function(t,r,n,o){n&&n.preserveSymlinks===!1?t(r,o):o(null,r)},sh=function(t,r,n){t(r,function(o,i){if(o)n(o);else try{var s=JSON.parse(i);n(null,s)}catch (e7){n(null)}})},ah=function(t,r,n){for(var o=Xg(r,n,t),i=0;i<o.length;i++)o[i]=ee.join(o[i],t);return o};$c.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=Jg(t,i);var a=i.isFile||nh,l=i.isDirectory||oh,f=i.readFile||Je.readFile,u=i.realpath||ih,p=i.readPackage||sh;if(i.readFile&&i.readPackage){var d=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(d)})}var x=i.packageIterator,y=i.extensions||[".js"],_=i.includeCoreModules!==!1,b=i.basedir||ee.dirname(Zg()),S=i.filename||b;i.paths=i.paths||rh();var F=ee.resolve(b);Tt(u,F,i,function(m,A){m?o(m):B(A)});var I;function B(m){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t))I=ee.resolve(m,t),(t==="."||t===".."||t.slice(-1)==="/")&&(I+="/"),/\/$/.test(t)&&I===m?R(I,i.package,P):N(I,i.package,P);else{if(_&&eh(t))return o(null,t);G(t,m,function(A,O,D){if(A)o(A);else{if(O)return Tt(u,O,i,function(v,H){v?o(v):o(null,H,D)});var h=new Error("Cannot find module '"+t+"' from '"+S+"'");h.code="MODULE_NOT_FOUND",o(h)}})}}function P(m,A,O){m?o(m):A?o(null,A,O):R(I,function(D,h,v){if(D)o(D);else if(h)Tt(u,h,i,function($,M){$?o($):o(null,M,v)});else{var H=new Error("Cannot find module '"+t+"' from '"+S+"'");H.code="MODULE_NOT_FOUND",o(H)}})}function N(m,A,O){var D=A,h=O;typeof D=="function"&&(h=D,D=void 0);var v=[""].concat(y);H(v,m,D);function H($,M,W){if($.length===0)return h(null,void 0,W);var U=M+$[0],oe=W;oe?re(null,oe):E(ee.dirname(U),re);function re(se,V,fe){if(oe=V,se)return h(se);if(fe&&oe&&i.pathFilter){var ot=ee.relative(fe,U),k=ot.slice(0,ot.length-$[0].length),z=i.pathFilter(oe,M,k);if(z)return H([""].concat(y.slice()),ee.resolve(fe,z),oe)}a(U,Te)}function Te(se,V){if(se)return h(se);if(V)return h(null,U,oe);H($.slice(1),M,oe)}}}function E(m,A){if(m===""||m==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(m)||/[/\\]node_modules[/\\]*$/.test(m))return A(null);Tt(u,m,i,function(O,D){if(O)return E(ee.dirname(m),A);var h=ee.join(D,"package.json");a(h,function(v,H){if(!H)return E(ee.dirname(m),A);p(f,h,function($,M){$&&A($);var W=M;W&&i.packageFilter&&(W=i.packageFilter(W,h)),A(null,W,m)})})})}function R(m,A,O){var D=O,h=A;typeof h=="function"&&(D=h,h=i.package),Tt(u,m,i,function(v,H){if(v)return D(v);var $=ee.join(H,"package.json");a($,function(M,W){if(M)return D(M);if(!W)return N(ee.join(m,"index"),h,D);p(f,$,function(U,oe){if(U)return D(U);var re=oe;if(re&&i.packageFilter&&(re=i.packageFilter(re,$)),re&&re.main){if(typeof re.main!="string"){var Te=new TypeError("package \u201C"+re.name+"\u201D `main` must be a string");return Te.code="INVALID_PACKAGE_MAIN",D(Te)}(re.main==="."||re.main==="./")&&(re.main="index"),N(ee.resolve(m,re.main),re,function(se,V,fe){if(se)return D(se);if(V)return D(null,V,fe);if(!fe)return N(ee.join(m,"index"),fe,D);var ot=ee.resolve(m,fe.main);R(ot,fe,function(k,z,w){if(k)return D(k);if(z)return D(null,z,w);N(ee.join(m,"index"),w,D)})});return}N(ee.join(m,"/index"),re,D)})})})}function T(m,A){if(A.length===0)return m(null,void 0);var O=A[0];l(ee.dirname(O),D);function D(H,$){if(H)return m(H);if(!$)return T(m,A.slice(1));N(O,i.package,h)}function h(H,$,M){if(H)return m(H);if($)return m(null,$,M);R(O,i.package,v)}function v(H,$,M){if(H)return m(H);if($)return m(null,$,M);T(m,A.slice(1))}}function G(m,A,O){var D=function(){return ah(m,A,i)};T(O,x?x(m,A,D,i):D())}}});var Ic=_chunkYDNPXS5Ucjs.b.call(void 0, (QS,ch)=>{ch.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 Dc=_chunkYDNPXS5Ucjs.b.call(void 0, (ZS,Nc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var lh=Pt(),Mc=Ic(),Lc={};for(wr in Mc)Object.prototype.hasOwnProperty.call(Mc,wr)&&(Lc[wr]=lh(wr));var wr;Nc.exports=Lc});var Hc=_chunkYDNPXS5Ucjs.b.call(void 0, (JS,Vc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var uh=Pt();Vc.exports=function(t){return uh(t)}});var Bc=_chunkYDNPXS5Ucjs.b.call(void 0, (tb,qc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var fh=Pt(),et=_chunkYDNPXS5Ucjs.a.call(void 0, "fs"),le=_chunkYDNPXS5Ucjs.a.call(void 0, "path"),ph=Lo(),dh=No(),mh=Ho(),gh=jo(),hh=process.platform!=="win32"&&et.realpathSync&&typeof et.realpathSync.native=="function"?et.realpathSync.native:et.realpathSync,jc=ph(),yh=function(){return[le.join(jc,".node_modules"),le.join(jc,".node_libraries")]},vh=function(t){try{var r=et.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},_h=function(t){try{var r=et.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},xh=function(t){try{return hh(t)}catch(r){if(r.code!=="ENOENT")throw r}return t},Ot=function(t,r,n){return n&&n.preserveSymlinks===!1?t(r):r},Ch=function(t,r){var n=t(r);try{var o=JSON.parse(n);return o}catch (e8){}},Sh=function(t,r,n){for(var o=mh(r,n,t),i=0;i<o.length;i++)o[i]=le.join(o[i],t);return o};qc.exports=function(t,r){if(typeof t!="string")throw new TypeError("Path must be a string.");var n=gh(t,r),o=n.isFile||vh,i=n.readFileSync||et.readFileSync,s=n.isDirectory||_h,a=n.realpathSync||xh,l=n.readPackageSync||Ch;if(n.readFileSync&&n.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var f=n.packageIterator,u=n.extensions||[".js"],p=n.includeCoreModules!==!1,d=n.basedir||le.dirname(dh()),x=n.filename||d;n.paths=n.paths||yh();var y=Ot(a,le.resolve(d),n);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)){var _=le.resolve(y,t);(t==="."||t===".."||t.slice(-1)==="/")&&(_+="/");var b=I(_)||P(_);if(b)return Ot(a,b,n)}else{if(p&&fh(t))return t;var S=N(t,y);if(S)return Ot(a,S,n)}var F=new Error("Cannot find module '"+t+"' from '"+x+"'");throw F.code="MODULE_NOT_FOUND",F;function I(E){var R=B(le.dirname(E));if(R&&R.dir&&R.pkg&&n.pathFilter){var T=le.relative(R.dir,E),G=n.pathFilter(R.pkg,E,T);G&&(E=le.resolve(R.dir,G))}if(o(E))return E;for(var m=0;m<u.length;m++){var A=E+u[m];if(o(A))return A}}function B(E){if(!(E===""||E==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(E))&&!/[/\\]node_modules[/\\]*$/.test(E)){var R=le.join(Ot(a,E,n),"package.json");if(!o(R))return B(le.dirname(E));var T=l(i,R);return T&&n.packageFilter&&(T=n.packageFilter(T,E)),{pkg:T,dir:E}}}function P(E){var R=le.join(Ot(a,E,n),"/package.json");if(o(R)){try{var T=l(i,R)}catch (e9){}if(T&&n.packageFilter&&(T=n.packageFilter(T,E)),T&&T.main){if(typeof T.main!="string"){var G=new TypeError("package \u201C"+T.name+"\u201D `main` must be a string");throw G.code="INVALID_PACKAGE_MAIN",G}(T.main==="."||T.main==="./")&&(T.main="index");try{var m=I(le.resolve(E,T.main));if(m)return m;var A=P(le.resolve(E,T.main));if(A)return A}catch (e10){}}}return I(le.join(E,"/index"))}function N(E,R){for(var T=function(){return Sh(E,R,n)},G=f?f(E,R,T,n):T(),m=0;m<G.length;m++){var A=G[m];if(s(le.dirname(A))){var O=I(A);if(O)return O;var D=P(A);if(D)return D}}}}});var Gc=_chunkYDNPXS5Ucjs.b.call(void 0, (nb,Uc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Er=Fc();Er.core=Dc();Er.isCore=Hc();Er.sync=Bc();Uc.exports=Er});var ri=_chunkYDNPXS5Ucjs.b.call(void 0, (j0,ti)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var yv=_chunkYDNPXS5Ucjs.a.call(void 0, "tty"),vv=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||yv.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),Y=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+uu(o,t,r,i)+t:e+o+t},uu=(e,t,r,n)=>{let o=e.substring(0,n)+r,i=e.substring(n+t.length),s=i.indexOf(t);return~s?o+uu(i,t,r,s):o+i},fu=(e=vv)=>({isColorSupported:e,reset:e?t=>`\x1B[0m${t}\x1B[0m`:String,bold:e?Y("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?Y("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?Y("\x1B[3m","\x1B[23m"):String,underline:e?Y("\x1B[4m","\x1B[24m"):String,inverse:e?Y("\x1B[7m","\x1B[27m"):String,hidden:e?Y("\x1B[8m","\x1B[28m"):String,strikethrough:e?Y("\x1B[9m","\x1B[29m"):String,black:e?Y("\x1B[30m","\x1B[39m"):String,red:e?Y("\x1B[31m","\x1B[39m"):String,green:e?Y("\x1B[32m","\x1B[39m"):String,yellow:e?Y("\x1B[33m","\x1B[39m"):String,blue:e?Y("\x1B[34m","\x1B[39m"):String,magenta:e?Y("\x1B[35m","\x1B[39m"):String,cyan:e?Y("\x1B[36m","\x1B[39m"):String,white:e?Y("\x1B[37m","\x1B[39m"):String,gray:e?Y("\x1B[90m","\x1B[39m"):String,bgBlack:e?Y("\x1B[40m","\x1B[49m"):String,bgRed:e?Y("\x1B[41m","\x1B[49m"):String,bgGreen:e?Y("\x1B[42m","\x1B[49m"):String,bgYellow:e?Y("\x1B[43m","\x1B[49m"):String,bgBlue:e?Y("\x1B[44m","\x1B[49m"):String,bgMagenta:e?Y("\x1B[45m","\x1B[49m"):String,bgCyan:e?Y("\x1B[46m","\x1B[49m"):String,bgWhite:e?Y("\x1B[47m","\x1B[49m"):String});ti.exports=fu();ti.exports.createColors=fu});_chunkYDNPXS5Ucjs.d.call(void 0, );var _process = require('process'); var _process2 = _interopRequireDefault(_process);var _yargs = require('yargs'); var _yargs2 = _interopRequireDefault(_yargs);var _helpers = require('yargs/helpers');var it="0.15.11";_chunkYDNPXS5Ucjs.d.call(void 0, );var Tl=_chunkYDNPXS5Ucjs.c.call(void 0, _r(),1);var _path = require('path'); var _path2 = _interopRequireDefault(_path);var _promises = require('fs/promises');var _kolorist = require('kolorist');var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);var _graymatter = require('gray-matter'); var _graymatter2 = _interopRequireDefault(_graymatter);var _markdownit = require('markdown-it'); var _markdownit2 = _interopRequireDefault(_markdownit);var _feed = require('feed');var _consola = require('consola'); var _consola2 = _interopRequireDefault(_consola);_chunkYDNPXS5Ucjs.d.call(void 0, );var _l=_chunkYDNPXS5Ucjs.c.call(void 0, Mo(),1),xl=_chunkYDNPXS5Ucjs.c.call(void 0, _r(),1);var _utils = require('@antfu/utils');var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);_chunkYDNPXS5Ucjs.d.call(void 0, );var rl=_chunkYDNPXS5Ucjs.c.call(void 0, Gc(),1);var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);var _globaldirs = require('global-dirs'); var _globaldirs2 = _interopRequireDefault(_globaldirs);_chunkYDNPXS5Ucjs.d.call(void 0, );var _crossspawn = require('cross-spawn');function $t(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=_crossspawn.spawn.call(void 0, "git",o),s="";i.stdout.on("data",a=>s+=String(a)),i.on("close",()=>{r(+new Date(s))}),i.on("error",()=>{r(0)})})}_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );var Ar="<!-- more -->",ht=/^https?:/i,Wc=/^pathname:\/\//,zc="/:all(.*)*";function Kc(e){return ht.test(e)}function ke(e){return e.replace(/\\/g,"/")}function Bo(e,t){return t.startsWith(e)?t:e+t}function X(e){return`/@fs${Bo("/",ke(e))}`}function Yc(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}_chunkYDNPXS5Ucjs.d.call(void 0, );var _fs = require('fs');var _vite = require('vite');_chunkYDNPXS5Ucjs.d.call(void 0, );var _unconfig = require('unconfig');async function tt(e,t={}){let{config:r,sources:n}=await _unconfig.loadConfig.call(void 0, {sources:{files:e,rewrite:t.rewrite},cwd:t.cwd||_process2.default.cwd()}),o=_vite.normalizePath.call(void 0, n[0]||"");return{config:r,configFile:o}}var yt=_defu.createDefu.call(void 0, (e,t,r)=>{if(_utils.isFunction.call(void 0, e[t])&&_utils.isFunction.call(void 0, r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=_vite.mergeConfig.call(void 0, e[t],r),!0});async function Uo(e,t){return tt("valaxy.config",{rewrite(r){return typeof r=="function"?r(t||{}):r},cwd:e})}async function Zc(e){let t=e.userRoot||_process2.default.cwd(),{config:r,configFile:n}=await Uo(t);r&&_consola2.default.success(`Resolve ${_kolorist.cyan.call(void 0, "userValaxyConfig")} from ${_kolorist.dim.call(void 0, n)}`);let o=e.theme||_optionalChain([r, 'optionalAccess', _2 => _2.theme])||"yun";return{config:r,configFile:n,theme:o}}async function Xc(e,t){let r={};for(let n of e){if(!_fs.existsSync.call(void 0, _path.resolve.call(void 0, n.root,"valaxy.config.ts")))continue;let{config:o,configFile:i}=await tt("valaxy.config",{rewrite(s,a){return typeof s=="function"?s(n,t):s},cwd:n.root});o&&(n.configFile=i,r=yt(o,r))}return r}function nl(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}function Pe(e,t=!1,r={preserveSymlinks:!1}){try{return(0,rl.sync)(e,r)}catch(n){_consola2.default.log(n)}if(_isinstalledglobally2.default){try{return _chunkYDNPXS5Ucjs.a.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages,e))}catch (e11){}try{return _chunkYDNPXS5Ucjs.a.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages,e))}catch (e12){}}if(t)throw new Error(`Failed to resolve package ${e}`);_consola2.default.error(`Failed to resolve package ${e}`)}_chunkYDNPXS5Ucjs.d.call(void 0, );var _crypto = require('crypto'); var _crypto2 = _interopRequireDefault(_crypto);_chunkYDNPXS5Ucjs.d.call(void 0, );function Lh(e){return e}var Vb=Lh;function Nh(e){return e}var Hb=Nh;function Ub(e){return e}function Dh(e){return e}var Gb=Dh,Go= exports.t ={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:_crypto.webcrypto.getRandomValues(new Uint8Array(16)),iv:_crypto.webcrypto.getRandomValues(new Uint8Array(16))}},il= exports.u ={ignoreDeadLinks:!0,siteConfig:Go,theme:"yun",themeConfig:{pkg:{name:"",version:""}},runtimeConfig:{addons:{}},modules:{rss:{enable:!0}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}}};function Wb(e){return e}_chunkYDNPXS5Ucjs.d.call(void 0, );var _ora = require('ora'); var _ora2 = _interopRequireDefault(_ora);_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );function Wo(){return _process2.default.env.NODE_ENV==="production"}function zo(e="development"){_process2.default.env.NODE_ENV=e,rt.level=Wo()?2:3}function vt(){return zo("production")}var rt=_consola2.default.create({level:Wo()?2:3});_chunkYDNPXS5Ucjs.d.call(void 0, );function kr(e,t){if(!e)return"";if(Yc(e))if(t){let r=_fsextra2.default.lstatSync(t).isFile();return _path.resolve.call(void 0, r?_path.dirname.call(void 0, t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return _path.dirname.call(void 0, Pe(`${e}/package.json`)||"")}async function ml(e,t=_process2.default.cwd()){let r=_ora2.default.call(void 0, `Resolve ${_kolorist.cyan.call(void 0, "addons")} from ${_kolorist.dim.call(void 0, t)}`).start(),n={},o=s=>{s&&(n[s.name]=_defu2.default.call(void 0, n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await pl(s,{cwd:t}));continue}typeof s=="object"&&o(_defu2.default.call(void 0, await pl(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{rt.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${_kolorist.yellow.call(void 0, s.name)}${s.global?_kolorist.cyan.call(void 0, " (global)"):""} ${_kolorist.dim.call(void 0, s.pkg.homepage||s.pkg.repository)}`)}),i}async function pl(e,t={}){let r=Gh(e,t.cwd||_process2.default.cwd()),n=_path.resolve.call(void 0, r,"./package.json");if(!_fsextra2.default.existsSync(n)){rt.error(`No addon named ${e} found`);return}let o=await _fsextra2.default.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}function Gh(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return kr(r,t)}_chunkYDNPXS5Ucjs.d.call(void 0, );function gl(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return kr(r,t)}_chunkYDNPXS5Ucjs.d.call(void 0, );async function Yh(e){return tt("site.config",{cwd:e})}async function Pr(e){let{config:t,configFile:r}=await Yh(e);return t&&_consola2.default.success(`Resolve ${_kolorist.cyan.call(void 0, "siteConfig")} from ${_kolorist.dim.call(void 0, r)}`),{siteConfig:t,siteConfigFile:r}}_chunkYDNPXS5Ucjs.d.call(void 0, );async function Xh(e){return tt("theme.config",{cwd:e})}async function hl(e){let{config:t,configFile:r}=await Xh(e);return t&&rt.info(`Resolve ${_kolorist.cyan.call(void 0, "themeConfig")} from ${_kolorist.dim.call(void 0, r)}`),{themeConfig:t,themeConfigFile:r}}var iy=(0,_l.default)("valaxy:options");async function sy(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=_utils.ensureSuffix.call(void 0, "/",o.url||""),o.cdn.prefix=_utils.ensureSuffix.call(void 0, "/",o.cdn.prefix||"");let i=_path.resolve.call(void 0, r,"package.json");try{t.themeConfig.pkg=await _fsextra2.default.readJson(i,"utf-8")}catch (e13){console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function Ko(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await ml(t.addons||[],e.userRoot),s=await Xc(i,e);t=yt(t,s);let a=_defu2.default.call(void 0, t,il);e.config={...a,runtimeConfig:{addons:{}}},e.addons=i,i.forEach(p=>{e.config.runtimeConfig.addons[p.name]=p});let l=i.map(({root:p})=>p),f=i.map(({name:p})=>p);e.addonRoots=l,e.roots=_utils.uniq.call(void 0, [r,n,...l,o]);let u=_optionalChain([e, 'access', _3 => _3.config, 'access', _4 => _4.vite, 'optionalAccess', _5 => _5.build, 'optionalAccess', _6 => _6.rollupOptions, 'optionalAccess', _7 => _7.external])||[];return e.config.vite.build.rollupOptions.external=u.filter(p=>!f.includes(p)),await sy(e),e}async function he(e={userRoot:_process2.default.cwd()},t="dev"){let r=_path.dirname.call(void 0, Pe("valaxy/package.json",!0)),n=_path.resolve.call(void 0, r,"client"),o=ke(_path.resolve.call(void 0, e.userRoot||_process2.default.cwd()));_consola2.default.start(`Resolve ${_kolorist.magenta.call(void 0, "valaxy")} config...`);let[i,s,a,l]=await Promise.all([Zc(e),Pr(e.userRoot),hl(e.userRoot),(0,xl.default)(["**.md"],{cwd:_path.resolve.call(void 0, o,"pages"),ignore:["**/node_modules"]})]),{config:f,configFile:u,theme:p}=i,{siteConfig:d,siteConfigFile:x}=s,{themeConfig:y,themeConfigFile:_}=a;f=_defu2.default.call(void 0, {siteConfig:d},{themeConfig:y},f);let b=gl(p,e.userRoot),S={mode:t,pkgRoot:r,clientRoot:n,userRoot:o,themeRoot:b,addonRoots:[],roots:[],theme:p,config:{...f,runtimeConfig:{addons:{}}},configFile:u||"",siteConfigFile:x||"",themeConfigFile:_||"",pages:l.sort(),addons:[]};iy(S);let F=await Yo(S),I=yt(f,F);return S=await Ko(S,I),S}async function Yo(e){let{config:t}=await Uo(e.themeRoot,e);return t&&_consola2.default.success(`Resolve ${_kolorist.cyan.call(void 0, "valaxy.config.ts")} from ${_kolorist.yellow.call(void 0, `theme(${e.theme})`)}`),t}_chunkYDNPXS5Ucjs.d.call(void 0, );async function Rl(e){return await $t(e,"created")||(await _fsextra2.default.stat(e)).ctime}async function wl(e){return await $t(e,"created")||(await _fsextra2.default.stat(e)).mtime}_chunkYDNPXS5Ucjs.d.call(void 0, );function qe(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}_chunkYDNPXS5Ucjs.d.call(void 0, );function El(e,t){t.forEach(r=>{_optionalChain([r, 'access', _8 => _8.setup, 'optionalCall', _9 => _9(e)])})}var hy=_markdownit2.default.call(void 0, {html:!0,breaks:!0,linkify:!0});async function Pl(e){_consola2.default.info(`${_kolorist.yellow.call(void 0, "RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){_consola2.default.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:_optionalChain([r, 'access', _10 => _10.author, 'optionalAccess', _11 => _11.name]),email:_optionalChain([r, 'access', _12 => _12.author, 'optionalAccess', _13 => _13.email]),link:_optionalChain([r, 'access', _14 => _14.author, 'optionalAccess', _15 => _15.link])};_consola2.default.info(`RSS Site Url: ${_kolorist.cyan.call(void 0, n)}`);let s=_optionalChain([r, 'access', _16 => _16.license, 'optionalAccess', _17 => _17.type])==="zero"?"1.0":"4.0",a={atom:_optionalChain([r, 'access', _18 => _18.feed, 'optionalAccess', _19 => _19.name])?`${_optionalChain([r, 'access', _20 => _20.feed, 'optionalAccess', _21 => _21.name])}.atom`:"atom.xml",json:`${_optionalChain([r, 'access', _22 => _22.feed, 'optionalAccess', _23 => _23.name])||"feed"}.json`,rss:`${_optionalChain([r, 'access', _24 => _24.feed, 'optionalAccess', _25 => _25.name])||"feed"}.xml`},l={title:r.title||"Valaxy Blog",description:r.description,id:n||"valaxy",link:n,copyright:`CC ${_optionalChain([r, 'access', _26 => _26.license, 'optionalAccess', _27 => _27.type, 'optionalAccess', _28 => _28.toUpperCase, 'call', _29 => _29()])} ${s} ${new Date().getFullYear()} \xA9 ${_optionalChain([r, 'access', _30 => _30.author, 'optionalAccess', _31 => _31.name])}`,feedLinks:{}};Object.keys(a).forEach(_=>{l.feedLinks[_]=`${n}${a[_]}`});let f=await(0,Tl.default)(`${e.userRoot}/pages/posts/**/*.md`),u=[];for await(let _ of f){let b=await _promises.readFile.call(void 0, _,"utf-8"),{data:S,content:F,excerpt:I}=_graymatter2.default.call(void 0, b,{excerpt_separator:Ar});if(S.password)continue;if(S.draft){_consola2.default.warn(`Ignore draft post: ${_kolorist.dim.call(void 0, _)}`);continue}if(S.hide)continue;let B=_;S.date||(S.date=await Rl(B)),r.lastUpdated&&(S.updated||(S.updated=await wl(B)));let P=hy.render(I||F.slice(0,100)).replace('src="/',`src="${o}/`);_optionalChain([S, 'access', _32 => _32.image, 'optionalAccess', _33 => _33.startsWith, 'call', _34 => _34("/")])&&(S.image=o+S.image),u.push({title:"",...S,id:(S.id||"").toString(),date:new Date(S.date),published:new Date(S.updated||S.date),content:P,author:[i],link:o+_.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}u.sort((_,b)=>+new Date(b.published||b.date)-+new Date(_.published||_.date));let p=_optionalChain([r, 'access', _35 => _35.author, 'optionalAccess', _36 => _36.avatar])||"/favicon.svg";l.author=i,l.image=Kc(p)?_optionalChain([r, 'access', _37 => _37.author, 'optionalAccess', _38 => _38.avatar]):`${o}${Bo("/",p)}`,l.favicon=`${o}${_optionalChain([r, 'access', _39 => _39.feed, 'optionalAccess', _40 => _40.favicon])||r.favicon}`;let d=new (0, _feed.Feed)(l);u.forEach(_=>d.addItem(_)),await _fsextra2.default.ensureDir(_path.dirname.call(void 0, `./dist/${a.atom}`));let x=_path.resolve.call(void 0, e.userRoot,"./dist");["rss","atom","json"].forEach(_=>{let b="",S=`${x}/${a[_]}`;_==="rss"?b=d.rss2():_==="atom"?b=d.atom1():_==="json"&&(b=d.json1()),_fsextra2.default.writeFileSync(S,b,"utf-8"),_consola2.default.info(`${_}: ${_kolorist.dim.call(void 0, S)}`)})}var Or={extendCli(e){e.command("rss [root]","generate rss feed",t=>qe(t).strict().help(),async({root:t})=>{vt();let r=await he({userRoot:t},"build");await Pl(r)})},setup(e){e.hook("build:after",()=>{console.log(),Pl(e.options)})}};_chunkYDNPXS5Ucjs.d.call(void 0, );var Ol=_chunkYDNPXS5Ucjs.c.call(void 0, _r(),1);async function $l(e){_consola2.default.start(`Generate List for Fuse Search by (${_kolorist.cyan.call(void 0, "fuse.js")}) ...`);let t=await(0,Ol.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=_fsextra2.default.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=_graymatter2.default.call(void 0, o,{excerpt_separator:"<!-- more -->"});if(i.draft){_consola2.default.warn(`Ignore draft post: ${_kolorist.dim.call(void 0, n)}`);continue}if(i.hide||i.password)continue;let l=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$/,""))};l.includes("content")&&(f.content=a||""),r.push(f)}return r}function _y(e){e.command("fuse [root]","generate fuse list for search",t=>qe(t).strict().help(),async({root:t})=>{_consola2.default.info("Please generate it before build."),vt();let r=await he({userRoot:t},"build"),n=await $l(r);await _fsextra2.default.ensureDir("./dist");let o=_path2.default.resolve(r.userRoot,"public"),i=_path2.default.resolve(o,r.config.siteConfig.fuse.dataPath),s=_path2.default.join("public",r.config.siteConfig.fuse.dataPath);await _fsextra2.default.ensureFile(i),_fsextra2.default.writeJSONSync(i,n),_consola2.default.success(`Generate fuse list in ${_kolorist.dim.call(void 0, o)}`);let a=_path2.default.resolve(r.userRoot,"dist"),l=_path2.default.resolve(a,r.config.siteConfig.fuse.dataPath);await _fsextra2.default.ensureDir(a),_fsextra2.default.writeJSONSync(l,n),_consola2.default.success(`Generate fuse list in ${_kolorist.dim.call(void 0, a)}`);try{if(!(await _fsextra2.default.readFile(`${r.userRoot}/.gitignore`,"utf-8")).includes(s)){let u=s.replace(/\\/g,"/");await _fsextra2.default.appendFile(`${r.userRoot}/.gitignore`,`
6
+ `).map(t=>t.trim()).join(" ")};mc.O=function(e){return this.inspectOpts.colors=this.useColors,br.inspect(e,this.inspectOpts)}});var Mo=_chunkYDNPXS5Ucjs.b.call(void 0, (OS,Io)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Io.exports=cc():Io.exports=gc()});var Lo=_chunkYDNPXS5Ucjs.b.call(void 0, (FS,hc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Hg=_chunkYDNPXS5Ucjs.a.call(void 0, "os");hc.exports=Hg.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 No=_chunkYDNPXS5Ucjs.b.call(void 0, (MS,yc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );yc.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=_chunkYDNPXS5Ucjs.b.call(void 0, (NS,kt)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var jg=process.platform==="win32",qg=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,Do={};function Bg(e){return qg.exec(e).slice(1)}Do.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Bg(e);if(!t||t.length!==5)throw new TypeError("Invalid path '"+e+"'");return{root:t[1],dir:t[0]===t[1]?t[0]:t[0].slice(0,-1),base:t[2],ext:t[4],name:t[3]}};var Ug=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Vo={};function Gg(e){return Ug.exec(e).slice(1)}Vo.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Gg(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]}};jg?kt.exports=Do.parse:kt.exports=Vo.parse;kt.exports.posix=Vo.parse;kt.exports.win32=Do.parse});var Ho=_chunkYDNPXS5Ucjs.b.call(void 0, (VS,Sc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Cc=_chunkYDNPXS5Ucjs.a.call(void 0, "path"),_c=Cc.parse||vc(),xc=function(t,r){var n="/";/^([A-Za-z]:)/.test(t)?n="":/^\\\\/.test(t)&&(n="\\\\");for(var o=[t],i=_c(t);i.dir!==o[o.length-1];)o.push(i.dir),i=_c(i.dir);return o.reduce(function(s,a){return s.concat(r.map(function(l){return Cc.resolve(n,a,l)}))},[])};Sc.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 xc(t,o)},r);var i=xc(t,o);return r&&r.paths?i.concat(r.paths):i}});var jo=_chunkYDNPXS5Ucjs.b.call(void 0, (jS,bc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );bc.exports=function(e,t){return t||{}}});var Ec=_chunkYDNPXS5Ucjs.b.call(void 0, (BS,wc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Rc={}.hasOwnProperty,qo=Function.prototype.call;wc.exports=qo.bind?qo.bind(Rc):function(e,t){return qo.call(Rc,e,t)}});var Ac=_chunkYDNPXS5Ucjs.b.call(void 0, (GS,Wg)=>{Wg.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 Pt=_chunkYDNPXS5Ucjs.b.call(void 0, (WS,Tc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var zg=Ec();function Kg(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),l=parseInt(i[s]||0,10);if(a!==l)return o==="<"?a<l:o===">="?a>=l:!1}return o===">="}function kc(e,t){var r=t.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!Kg(e,r[n]))return!1;return!0}function Yg(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(kc(r,t[n]))return!0;return!1}return kc(r,t)}var Pc=Ac();Tc.exports=function(t,r){return zg(Pc,t)&&Yg(r,Pc[t])}});var Fc=_chunkYDNPXS5Ucjs.b.call(void 0, (KS,$c)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Je=_chunkYDNPXS5Ucjs.a.call(void 0, "fs"),Qg=Lo(),ee=_chunkYDNPXS5Ucjs.a.call(void 0, "path"),Zg=No(),Xg=Ho(),Jg=jo(),eh=Pt(),th=process.platform!=="win32"&&Je.realpath&&typeof Je.realpath.native=="function"?Je.realpath.native:Je.realpath,Oc=Qg(),rh=function(){return[ee.join(Oc,".node_modules"),ee.join(Oc,".node_libraries")]},nh=function(t,r){Je.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},oh=function(t,r){Je.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},ih=function(t,r){th(t,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?t:o)})},Tt=function(t,r,n,o){n&&n.preserveSymlinks===!1?t(r,o):o(null,r)},sh=function(t,r,n){t(r,function(o,i){if(o)n(o);else try{var s=JSON.parse(i);n(null,s)}catch (e7){n(null)}})},ah=function(t,r,n){for(var o=Xg(r,n,t),i=0;i<o.length;i++)o[i]=ee.join(o[i],t);return o};$c.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=Jg(t,i);var a=i.isFile||nh,l=i.isDirectory||oh,f=i.readFile||Je.readFile,u=i.realpath||ih,p=i.readPackage||sh;if(i.readFile&&i.readPackage){var d=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(d)})}var x=i.packageIterator,y=i.extensions||[".js"],_=i.includeCoreModules!==!1,b=i.basedir||ee.dirname(Zg()),S=i.filename||b;i.paths=i.paths||rh();var F=ee.resolve(b);Tt(u,F,i,function(m,A){m?o(m):B(A)});var I;function B(m){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t))I=ee.resolve(m,t),(t==="."||t===".."||t.slice(-1)==="/")&&(I+="/"),/\/$/.test(t)&&I===m?R(I,i.package,P):N(I,i.package,P);else{if(_&&eh(t))return o(null,t);G(t,m,function(A,O,D){if(A)o(A);else{if(O)return Tt(u,O,i,function(v,H){v?o(v):o(null,H,D)});var h=new Error("Cannot find module '"+t+"' from '"+S+"'");h.code="MODULE_NOT_FOUND",o(h)}})}}function P(m,A,O){m?o(m):A?o(null,A,O):R(I,function(D,h,v){if(D)o(D);else if(h)Tt(u,h,i,function($,M){$?o($):o(null,M,v)});else{var H=new Error("Cannot find module '"+t+"' from '"+S+"'");H.code="MODULE_NOT_FOUND",o(H)}})}function N(m,A,O){var D=A,h=O;typeof D=="function"&&(h=D,D=void 0);var v=[""].concat(y);H(v,m,D);function H($,M,W){if($.length===0)return h(null,void 0,W);var U=M+$[0],oe=W;oe?re(null,oe):E(ee.dirname(U),re);function re(se,V,fe){if(oe=V,se)return h(se);if(fe&&oe&&i.pathFilter){var ot=ee.relative(fe,U),k=ot.slice(0,ot.length-$[0].length),z=i.pathFilter(oe,M,k);if(z)return H([""].concat(y.slice()),ee.resolve(fe,z),oe)}a(U,Te)}function Te(se,V){if(se)return h(se);if(V)return h(null,U,oe);H($.slice(1),M,oe)}}}function E(m,A){if(m===""||m==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(m)||/[/\\]node_modules[/\\]*$/.test(m))return A(null);Tt(u,m,i,function(O,D){if(O)return E(ee.dirname(m),A);var h=ee.join(D,"package.json");a(h,function(v,H){if(!H)return E(ee.dirname(m),A);p(f,h,function($,M){$&&A($);var W=M;W&&i.packageFilter&&(W=i.packageFilter(W,h)),A(null,W,m)})})})}function R(m,A,O){var D=O,h=A;typeof h=="function"&&(D=h,h=i.package),Tt(u,m,i,function(v,H){if(v)return D(v);var $=ee.join(H,"package.json");a($,function(M,W){if(M)return D(M);if(!W)return N(ee.join(m,"index"),h,D);p(f,$,function(U,oe){if(U)return D(U);var re=oe;if(re&&i.packageFilter&&(re=i.packageFilter(re,$)),re&&re.main){if(typeof re.main!="string"){var Te=new TypeError("package \u201C"+re.name+"\u201D `main` must be a string");return Te.code="INVALID_PACKAGE_MAIN",D(Te)}(re.main==="."||re.main==="./")&&(re.main="index"),N(ee.resolve(m,re.main),re,function(se,V,fe){if(se)return D(se);if(V)return D(null,V,fe);if(!fe)return N(ee.join(m,"index"),fe,D);var ot=ee.resolve(m,fe.main);R(ot,fe,function(k,z,w){if(k)return D(k);if(z)return D(null,z,w);N(ee.join(m,"index"),w,D)})});return}N(ee.join(m,"/index"),re,D)})})})}function T(m,A){if(A.length===0)return m(null,void 0);var O=A[0];l(ee.dirname(O),D);function D(H,$){if(H)return m(H);if(!$)return T(m,A.slice(1));N(O,i.package,h)}function h(H,$,M){if(H)return m(H);if($)return m(null,$,M);R(O,i.package,v)}function v(H,$,M){if(H)return m(H);if($)return m(null,$,M);T(m,A.slice(1))}}function G(m,A,O){var D=function(){return ah(m,A,i)};T(O,x?x(m,A,D,i):D())}}});var Ic=_chunkYDNPXS5Ucjs.b.call(void 0, (QS,ch)=>{ch.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 Dc=_chunkYDNPXS5Ucjs.b.call(void 0, (ZS,Nc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var lh=Pt(),Mc=Ic(),Lc={};for(wr in Mc)Object.prototype.hasOwnProperty.call(Mc,wr)&&(Lc[wr]=lh(wr));var wr;Nc.exports=Lc});var Hc=_chunkYDNPXS5Ucjs.b.call(void 0, (JS,Vc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var uh=Pt();Vc.exports=function(t){return uh(t)}});var Bc=_chunkYDNPXS5Ucjs.b.call(void 0, (tb,qc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var fh=Pt(),et=_chunkYDNPXS5Ucjs.a.call(void 0, "fs"),le=_chunkYDNPXS5Ucjs.a.call(void 0, "path"),ph=Lo(),dh=No(),mh=Ho(),gh=jo(),hh=process.platform!=="win32"&&et.realpathSync&&typeof et.realpathSync.native=="function"?et.realpathSync.native:et.realpathSync,jc=ph(),yh=function(){return[le.join(jc,".node_modules"),le.join(jc,".node_libraries")]},vh=function(t){try{var r=et.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},_h=function(t){try{var r=et.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},xh=function(t){try{return hh(t)}catch(r){if(r.code!=="ENOENT")throw r}return t},Ot=function(t,r,n){return n&&n.preserveSymlinks===!1?t(r):r},Ch=function(t,r){var n=t(r);try{var o=JSON.parse(n);return o}catch (e8){}},Sh=function(t,r,n){for(var o=mh(r,n,t),i=0;i<o.length;i++)o[i]=le.join(o[i],t);return o};qc.exports=function(t,r){if(typeof t!="string")throw new TypeError("Path must be a string.");var n=gh(t,r),o=n.isFile||vh,i=n.readFileSync||et.readFileSync,s=n.isDirectory||_h,a=n.realpathSync||xh,l=n.readPackageSync||Ch;if(n.readFileSync&&n.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var f=n.packageIterator,u=n.extensions||[".js"],p=n.includeCoreModules!==!1,d=n.basedir||le.dirname(dh()),x=n.filename||d;n.paths=n.paths||yh();var y=Ot(a,le.resolve(d),n);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)){var _=le.resolve(y,t);(t==="."||t===".."||t.slice(-1)==="/")&&(_+="/");var b=I(_)||P(_);if(b)return Ot(a,b,n)}else{if(p&&fh(t))return t;var S=N(t,y);if(S)return Ot(a,S,n)}var F=new Error("Cannot find module '"+t+"' from '"+x+"'");throw F.code="MODULE_NOT_FOUND",F;function I(E){var R=B(le.dirname(E));if(R&&R.dir&&R.pkg&&n.pathFilter){var T=le.relative(R.dir,E),G=n.pathFilter(R.pkg,E,T);G&&(E=le.resolve(R.dir,G))}if(o(E))return E;for(var m=0;m<u.length;m++){var A=E+u[m];if(o(A))return A}}function B(E){if(!(E===""||E==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(E))&&!/[/\\]node_modules[/\\]*$/.test(E)){var R=le.join(Ot(a,E,n),"package.json");if(!o(R))return B(le.dirname(E));var T=l(i,R);return T&&n.packageFilter&&(T=n.packageFilter(T,E)),{pkg:T,dir:E}}}function P(E){var R=le.join(Ot(a,E,n),"/package.json");if(o(R)){try{var T=l(i,R)}catch (e9){}if(T&&n.packageFilter&&(T=n.packageFilter(T,E)),T&&T.main){if(typeof T.main!="string"){var G=new TypeError("package \u201C"+T.name+"\u201D `main` must be a string");throw G.code="INVALID_PACKAGE_MAIN",G}(T.main==="."||T.main==="./")&&(T.main="index");try{var m=I(le.resolve(E,T.main));if(m)return m;var A=P(le.resolve(E,T.main));if(A)return A}catch (e10){}}}return I(le.join(E,"/index"))}function N(E,R){for(var T=function(){return Sh(E,R,n)},G=f?f(E,R,T,n):T(),m=0;m<G.length;m++){var A=G[m];if(s(le.dirname(A))){var O=I(A);if(O)return O;var D=P(A);if(D)return D}}}}});var Gc=_chunkYDNPXS5Ucjs.b.call(void 0, (nb,Uc)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var Er=Fc();Er.core=Dc();Er.isCore=Hc();Er.sync=Bc();Uc.exports=Er});var ri=_chunkYDNPXS5Ucjs.b.call(void 0, (j0,ti)=>{"use strict";_chunkYDNPXS5Ucjs.d.call(void 0, );var yv=_chunkYDNPXS5Ucjs.a.call(void 0, "tty"),vv=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||yv.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),Y=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+uu(o,t,r,i)+t:e+o+t},uu=(e,t,r,n)=>{let o=e.substring(0,n)+r,i=e.substring(n+t.length),s=i.indexOf(t);return~s?o+uu(i,t,r,s):o+i},fu=(e=vv)=>({isColorSupported:e,reset:e?t=>`\x1B[0m${t}\x1B[0m`:String,bold:e?Y("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?Y("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?Y("\x1B[3m","\x1B[23m"):String,underline:e?Y("\x1B[4m","\x1B[24m"):String,inverse:e?Y("\x1B[7m","\x1B[27m"):String,hidden:e?Y("\x1B[8m","\x1B[28m"):String,strikethrough:e?Y("\x1B[9m","\x1B[29m"):String,black:e?Y("\x1B[30m","\x1B[39m"):String,red:e?Y("\x1B[31m","\x1B[39m"):String,green:e?Y("\x1B[32m","\x1B[39m"):String,yellow:e?Y("\x1B[33m","\x1B[39m"):String,blue:e?Y("\x1B[34m","\x1B[39m"):String,magenta:e?Y("\x1B[35m","\x1B[39m"):String,cyan:e?Y("\x1B[36m","\x1B[39m"):String,white:e?Y("\x1B[37m","\x1B[39m"):String,gray:e?Y("\x1B[90m","\x1B[39m"):String,bgBlack:e?Y("\x1B[40m","\x1B[49m"):String,bgRed:e?Y("\x1B[41m","\x1B[49m"):String,bgGreen:e?Y("\x1B[42m","\x1B[49m"):String,bgYellow:e?Y("\x1B[43m","\x1B[49m"):String,bgBlue:e?Y("\x1B[44m","\x1B[49m"):String,bgMagenta:e?Y("\x1B[45m","\x1B[49m"):String,bgCyan:e?Y("\x1B[46m","\x1B[49m"):String,bgWhite:e?Y("\x1B[47m","\x1B[49m"):String});ti.exports=fu();ti.exports.createColors=fu});_chunkYDNPXS5Ucjs.d.call(void 0, );var _process = require('process'); var _process2 = _interopRequireDefault(_process);var _yargs = require('yargs'); var _yargs2 = _interopRequireDefault(_yargs);var _helpers = require('yargs/helpers');var it="0.15.12";_chunkYDNPXS5Ucjs.d.call(void 0, );var Tl=_chunkYDNPXS5Ucjs.c.call(void 0, _r(),1);var _path = require('path'); var _path2 = _interopRequireDefault(_path);var _promises = require('fs/promises');var _kolorist = require('kolorist');var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);var _graymatter = require('gray-matter'); var _graymatter2 = _interopRequireDefault(_graymatter);var _markdownit = require('markdown-it'); var _markdownit2 = _interopRequireDefault(_markdownit);var _feed = require('feed');var _consola = require('consola'); var _consola2 = _interopRequireDefault(_consola);_chunkYDNPXS5Ucjs.d.call(void 0, );var _l=_chunkYDNPXS5Ucjs.c.call(void 0, Mo(),1),xl=_chunkYDNPXS5Ucjs.c.call(void 0, _r(),1);var _utils = require('@antfu/utils');var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);_chunkYDNPXS5Ucjs.d.call(void 0, );var rl=_chunkYDNPXS5Ucjs.c.call(void 0, Gc(),1);var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);var _globaldirs = require('global-dirs'); var _globaldirs2 = _interopRequireDefault(_globaldirs);_chunkYDNPXS5Ucjs.d.call(void 0, );var _crossspawn = require('cross-spawn');function $t(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=_crossspawn.spawn.call(void 0, "git",o),s="";i.stdout.on("data",a=>s+=String(a)),i.on("close",()=>{r(+new Date(s))}),i.on("error",()=>{r(0)})})}_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );var Ar="<!-- more -->",ht=/^https?:/i,Wc=/^pathname:\/\//,zc="/:all(.*)*";function Kc(e){return ht.test(e)}function ke(e){return e.replace(/\\/g,"/")}function Bo(e,t){return t.startsWith(e)?t:e+t}function X(e){return`/@fs${Bo("/",ke(e))}`}function Yc(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}_chunkYDNPXS5Ucjs.d.call(void 0, );var _fs = require('fs');var _vite = require('vite');_chunkYDNPXS5Ucjs.d.call(void 0, );var _unconfig = require('unconfig');async function tt(e,t={}){let{config:r,sources:n}=await _unconfig.loadConfig.call(void 0, {sources:{files:e,rewrite:t.rewrite},cwd:t.cwd||_process2.default.cwd()}),o=_vite.normalizePath.call(void 0, n[0]||"");return{config:r,configFile:o}}var yt=_defu.createDefu.call(void 0, (e,t,r)=>{if(_utils.isFunction.call(void 0, e[t])&&_utils.isFunction.call(void 0, r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=_vite.mergeConfig.call(void 0, e[t],r),!0});async function Uo(e,t){return tt("valaxy.config",{rewrite(r){return typeof r=="function"?r(t||{}):r},cwd:e})}async function Zc(e){let t=e.userRoot||_process2.default.cwd(),{config:r,configFile:n}=await Uo(t);r&&_consola2.default.success(`Resolve ${_kolorist.cyan.call(void 0, "userValaxyConfig")} from ${_kolorist.dim.call(void 0, n)}`);let o=e.theme||_optionalChain([r, 'optionalAccess', _2 => _2.theme])||"yun";return{config:r,configFile:n,theme:o}}async function Xc(e,t){let r={};for(let n of e){if(!_fs.existsSync.call(void 0, _path.resolve.call(void 0, n.root,"valaxy.config.ts")))continue;let{config:o,configFile:i}=await tt("valaxy.config",{rewrite(s,a){return typeof s=="function"?s(n,t):s},cwd:n.root});o&&(n.configFile=i,r=yt(o,r))}return r}function nl(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}function Pe(e,t=!1,r={preserveSymlinks:!1}){try{return(0,rl.sync)(e,r)}catch(n){_consola2.default.log(n)}if(_isinstalledglobally2.default){try{return _chunkYDNPXS5Ucjs.a.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages,e))}catch (e11){}try{return _chunkYDNPXS5Ucjs.a.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages,e))}catch (e12){}}if(t)throw new Error(`Failed to resolve package ${e}`);_consola2.default.error(`Failed to resolve package ${e}`)}_chunkYDNPXS5Ucjs.d.call(void 0, );var _crypto = require('crypto'); var _crypto2 = _interopRequireDefault(_crypto);_chunkYDNPXS5Ucjs.d.call(void 0, );function Lh(e){return e}var Vb=Lh;function Nh(e){return e}var Hb=Nh;function Ub(e){return e}function Dh(e){return e}var Gb=Dh,Go= exports.t ={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:_crypto.webcrypto.getRandomValues(new Uint8Array(16)),iv:_crypto.webcrypto.getRandomValues(new Uint8Array(16))}},il= exports.u ={ignoreDeadLinks:!0,siteConfig:Go,theme:"yun",themeConfig:{pkg:{name:"",version:""}},runtimeConfig:{addons:{}},modules:{rss:{enable:!0}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}}};function Wb(e){return e}_chunkYDNPXS5Ucjs.d.call(void 0, );var _ora = require('ora'); var _ora2 = _interopRequireDefault(_ora);_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );function Wo(){return _process2.default.env.NODE_ENV==="production"}function zo(e="development"){_process2.default.env.NODE_ENV=e,rt.level=Wo()?2:3}function vt(){return zo("production")}var rt=_consola2.default.create({level:Wo()?2:3});_chunkYDNPXS5Ucjs.d.call(void 0, );function kr(e,t){if(!e)return"";if(Yc(e))if(t){let r=_fsextra2.default.lstatSync(t).isFile();return _path.resolve.call(void 0, r?_path.dirname.call(void 0, t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return _path.dirname.call(void 0, Pe(`${e}/package.json`)||"")}async function ml(e,t=_process2.default.cwd()){let r=_ora2.default.call(void 0, `Resolve ${_kolorist.cyan.call(void 0, "addons")} from ${_kolorist.dim.call(void 0, t)}`).start(),n={},o=s=>{s&&(n[s.name]=_defu2.default.call(void 0, n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await pl(s,{cwd:t}));continue}typeof s=="object"&&o(_defu2.default.call(void 0, await pl(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{rt.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${_kolorist.yellow.call(void 0, s.name)}${s.global?_kolorist.cyan.call(void 0, " (global)"):""} ${_kolorist.dim.call(void 0, s.pkg.homepage||s.pkg.repository)}`)}),i}async function pl(e,t={}){let r=Gh(e,t.cwd||_process2.default.cwd()),n=_path.resolve.call(void 0, r,"./package.json");if(!_fsextra2.default.existsSync(n)){rt.error(`No addon named ${e} found`);return}let o=await _fsextra2.default.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}function Gh(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return kr(r,t)}_chunkYDNPXS5Ucjs.d.call(void 0, );function gl(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return kr(r,t)}_chunkYDNPXS5Ucjs.d.call(void 0, );async function Yh(e){return tt("site.config",{cwd:e})}async function Pr(e){let{config:t,configFile:r}=await Yh(e);return t&&_consola2.default.success(`Resolve ${_kolorist.cyan.call(void 0, "siteConfig")} from ${_kolorist.dim.call(void 0, r)}`),{siteConfig:t,siteConfigFile:r}}_chunkYDNPXS5Ucjs.d.call(void 0, );async function Xh(e){return tt("theme.config",{cwd:e})}async function hl(e){let{config:t,configFile:r}=await Xh(e);return t&&rt.info(`Resolve ${_kolorist.cyan.call(void 0, "themeConfig")} from ${_kolorist.dim.call(void 0, r)}`),{themeConfig:t,themeConfigFile:r}}var iy=(0,_l.default)("valaxy:options");async function sy(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=_utils.ensureSuffix.call(void 0, "/",o.url||""),o.cdn.prefix=_utils.ensureSuffix.call(void 0, "/",o.cdn.prefix||"");let i=_path.resolve.call(void 0, r,"package.json");try{t.themeConfig.pkg=await _fsextra2.default.readJson(i,"utf-8")}catch (e13){console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function Ko(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await ml(t.addons||[],e.userRoot),s=await Xc(i,e);t=yt(t,s);let a=_defu2.default.call(void 0, t,il);e.config={...a,runtimeConfig:{addons:{}}},e.addons=i,i.forEach(p=>{e.config.runtimeConfig.addons[p.name]=p});let l=i.map(({root:p})=>p),f=i.map(({name:p})=>p);e.addonRoots=l,e.roots=_utils.uniq.call(void 0, [r,n,...l,o]);let u=_optionalChain([e, 'access', _3 => _3.config, 'access', _4 => _4.vite, 'optionalAccess', _5 => _5.build, 'optionalAccess', _6 => _6.rollupOptions, 'optionalAccess', _7 => _7.external])||[];return e.config.vite.build.rollupOptions.external=u.filter(p=>!f.includes(p)),await sy(e),e}async function he(e={userRoot:_process2.default.cwd()},t="dev"){let r=_path.dirname.call(void 0, Pe("valaxy/package.json",!0)),n=_path.resolve.call(void 0, r,"client"),o=ke(_path.resolve.call(void 0, e.userRoot||_process2.default.cwd()));_consola2.default.start(`Resolve ${_kolorist.magenta.call(void 0, "valaxy")} config...`);let[i,s,a,l]=await Promise.all([Zc(e),Pr(e.userRoot),hl(e.userRoot),(0,xl.default)(["**.md"],{cwd:_path.resolve.call(void 0, o,"pages"),ignore:["**/node_modules"]})]),{config:f,configFile:u,theme:p}=i,{siteConfig:d,siteConfigFile:x}=s,{themeConfig:y,themeConfigFile:_}=a;f=_defu2.default.call(void 0, {siteConfig:d},{themeConfig:y},f);let b=gl(p,e.userRoot),S={mode:t,pkgRoot:r,clientRoot:n,userRoot:o,themeRoot:b,addonRoots:[],roots:[],theme:p,config:{...f,runtimeConfig:{addons:{}}},configFile:u||"",siteConfigFile:x||"",themeConfigFile:_||"",pages:l.sort(),addons:[]};iy(S);let F=await Yo(S),I=yt(f,F);return S=await Ko(S,I),S}async function Yo(e){let{config:t}=await Uo(e.themeRoot,e);return t&&_consola2.default.success(`Resolve ${_kolorist.cyan.call(void 0, "valaxy.config.ts")} from ${_kolorist.yellow.call(void 0, `theme(${e.theme})`)}`),t}_chunkYDNPXS5Ucjs.d.call(void 0, );async function Rl(e){return await $t(e,"created")||(await _fsextra2.default.stat(e)).ctime}async function wl(e){return await $t(e,"created")||(await _fsextra2.default.stat(e)).mtime}_chunkYDNPXS5Ucjs.d.call(void 0, );function qe(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}_chunkYDNPXS5Ucjs.d.call(void 0, );function El(e,t){t.forEach(r=>{_optionalChain([r, 'access', _8 => _8.setup, 'optionalCall', _9 => _9(e)])})}var hy=_markdownit2.default.call(void 0, {html:!0,breaks:!0,linkify:!0});async function Pl(e){_consola2.default.info(`${_kolorist.yellow.call(void 0, "RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){_consola2.default.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:_optionalChain([r, 'access', _10 => _10.author, 'optionalAccess', _11 => _11.name]),email:_optionalChain([r, 'access', _12 => _12.author, 'optionalAccess', _13 => _13.email]),link:_optionalChain([r, 'access', _14 => _14.author, 'optionalAccess', _15 => _15.link])};_consola2.default.info(`RSS Site Url: ${_kolorist.cyan.call(void 0, n)}`);let s=_optionalChain([r, 'access', _16 => _16.license, 'optionalAccess', _17 => _17.type])==="zero"?"1.0":"4.0",a={atom:_optionalChain([r, 'access', _18 => _18.feed, 'optionalAccess', _19 => _19.name])?`${_optionalChain([r, 'access', _20 => _20.feed, 'optionalAccess', _21 => _21.name])}.atom`:"atom.xml",json:`${_optionalChain([r, 'access', _22 => _22.feed, 'optionalAccess', _23 => _23.name])||"feed"}.json`,rss:`${_optionalChain([r, 'access', _24 => _24.feed, 'optionalAccess', _25 => _25.name])||"feed"}.xml`},l={title:r.title||"Valaxy Blog",description:r.description,id:n||"valaxy",link:n,copyright:`CC ${_optionalChain([r, 'access', _26 => _26.license, 'optionalAccess', _27 => _27.type, 'optionalAccess', _28 => _28.toUpperCase, 'call', _29 => _29()])} ${s} ${new Date().getFullYear()} \xA9 ${_optionalChain([r, 'access', _30 => _30.author, 'optionalAccess', _31 => _31.name])}`,feedLinks:{}};Object.keys(a).forEach(_=>{l.feedLinks[_]=`${n}${a[_]}`});let f=await(0,Tl.default)(`${e.userRoot}/pages/posts/**/*.md`),u=[];for await(let _ of f){let b=await _promises.readFile.call(void 0, _,"utf-8"),{data:S,content:F,excerpt:I}=_graymatter2.default.call(void 0, b,{excerpt_separator:Ar});if(S.password)continue;if(S.draft){_consola2.default.warn(`Ignore draft post: ${_kolorist.dim.call(void 0, _)}`);continue}if(S.hide)continue;let B=_;S.date||(S.date=await Rl(B)),r.lastUpdated&&(S.updated||(S.updated=await wl(B)));let P=hy.render(I||F.slice(0,100)).replace('src="/',`src="${o}/`);_optionalChain([S, 'access', _32 => _32.image, 'optionalAccess', _33 => _33.startsWith, 'call', _34 => _34("/")])&&(S.image=o+S.image),u.push({title:"",...S,id:(S.id||"").toString(),date:new Date(S.date),published:new Date(S.updated||S.date),content:P,author:[i],link:o+_.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}u.sort((_,b)=>+new Date(b.published||b.date)-+new Date(_.published||_.date));let p=_optionalChain([r, 'access', _35 => _35.author, 'optionalAccess', _36 => _36.avatar])||"/favicon.svg";l.author=i,l.image=Kc(p)?_optionalChain([r, 'access', _37 => _37.author, 'optionalAccess', _38 => _38.avatar]):`${o}${Bo("/",p)}`,l.favicon=`${o}${_optionalChain([r, 'access', _39 => _39.feed, 'optionalAccess', _40 => _40.favicon])||r.favicon}`;let d=new (0, _feed.Feed)(l);u.forEach(_=>d.addItem(_)),await _fsextra2.default.ensureDir(_path.dirname.call(void 0, `./dist/${a.atom}`));let x=_path.resolve.call(void 0, e.userRoot,"./dist");["rss","atom","json"].forEach(_=>{let b="",S=`${x}/${a[_]}`;_==="rss"?b=d.rss2():_==="atom"?b=d.atom1():_==="json"&&(b=d.json1()),_fsextra2.default.writeFileSync(S,b,"utf-8"),_consola2.default.info(`${_}: ${_kolorist.dim.call(void 0, S)}`)})}var Or={extendCli(e){e.command("rss [root]","generate rss feed",t=>qe(t).strict().help(),async({root:t})=>{vt();let r=await he({userRoot:t},"build");await Pl(r)})},setup(e){e.hook("build:after",()=>{console.log(),Pl(e.options)})}};_chunkYDNPXS5Ucjs.d.call(void 0, );var Ol=_chunkYDNPXS5Ucjs.c.call(void 0, _r(),1);async function $l(e){_consola2.default.start(`Generate List for Fuse Search by (${_kolorist.cyan.call(void 0, "fuse.js")}) ...`);let t=await(0,Ol.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=_fsextra2.default.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=_graymatter2.default.call(void 0, o,{excerpt_separator:"<!-- more -->"});if(i.draft){_consola2.default.warn(`Ignore draft post: ${_kolorist.dim.call(void 0, n)}`);continue}if(i.hide||i.password)continue;let l=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$/,""))};l.includes("content")&&(f.content=a||""),r.push(f)}return r}function _y(e){e.command("fuse [root]","generate fuse list for search",t=>qe(t).strict().help(),async({root:t})=>{_consola2.default.info("Please generate it before build."),vt();let r=await he({userRoot:t},"build"),n=await $l(r);await _fsextra2.default.ensureDir("./dist");let o=_path2.default.resolve(r.userRoot,"public"),i=_path2.default.resolve(o,r.config.siteConfig.fuse.dataPath),s=_path2.default.join("public",r.config.siteConfig.fuse.dataPath);await _fsextra2.default.ensureFile(i),_fsextra2.default.writeJSONSync(i,n),_consola2.default.success(`Generate fuse list in ${_kolorist.dim.call(void 0, o)}`);let a=_path2.default.resolve(r.userRoot,"dist"),l=_path2.default.resolve(a,r.config.siteConfig.fuse.dataPath);await _fsextra2.default.ensureDir(a),_fsextra2.default.writeJSONSync(l,n),_consola2.default.success(`Generate fuse list in ${_kolorist.dim.call(void 0, a)}`);try{if(!(await _fsextra2.default.readFile(`${r.userRoot}/.gitignore`,"utf-8")).includes(s)){let u=s.replace(/\\/g,"/");await _fsextra2.default.appendFile(`${r.userRoot}/.gitignore`,`
7
7
  # valaxy
8
8
  ${u}
9
9
  `),_consola2.default.success(`Add ${_kolorist.dim.call(void 0, u)} to ${_kolorist.dim.call(void 0, ".gitignore")}`)}}catch (e14){}})}var Fl={extendCli(e){_y(e)},setup(e){e.hook("build:before",()=>{$l(e.options)})}};_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );var _ejs = require('ejs');var _dayjs = require('dayjs'); var _dayjs2 = _interopRequireDefault(_dayjs);_chunkYDNPXS5Ucjs.d.call(void 0, );async function $r(e){try{return await _promises.access.call(void 0, e),!0}catch (e15){return!1}}_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );var Lt=_process2.default.cwd(),Il=`---
@@ -1,7 +1,6 @@
1
1
  import { ZoomOptions } from 'medium-zoom';
2
2
  import { FuseOptions } from '@vueuse/integrations/useFuse';
3
3
  import { ILazyLoadOptions } from 'vanilla-lazyload';
4
- import * as DefaultTheme from 'valaxy/default-theme';
5
4
 
6
5
  interface ValaxyAddon<AddonOptions = Record<string, any>> {
7
6
  name: string;
@@ -13,6 +12,17 @@ interface ValaxyAddon<AddonOptions = Record<string, any>> {
13
12
  options?: AddonOptions;
14
13
  }
15
14
 
15
+ declare namespace DefaultTheme {
16
+ interface Config {
17
+ /**
18
+ * Custom header levels of outline in the aside component.
19
+ *
20
+ * @default 2
21
+ */
22
+ outline?: number | [number, number] | 'deep' | false;
23
+ }
24
+ }
25
+
16
26
  interface Album {
17
27
  /**
18
28
  * @description:en-US Album Link
@@ -568,4 +578,4 @@ type UserSiteConfig = PartialDeep<SiteConfig>;
568
578
  */
569
579
  type UserValaxyConfig<ThemeConfig = DefaultTheme.Config> = PartialDeep<ValaxyConfig<ThemeConfig>>;
570
580
 
571
- export { Album as A, ExcerptType as E, FuseListItem as F, PartialDeep as P, RuntimeConfig as R, SiteConfig as S, UserSiteConfig as U, ValaxyConfig as V, ValaxyAddon as a, Post as b, SocialLink as c, UserValaxyConfig as d, Photo as e, PageFrontMatter as f, PostFrontMatter as g, Page as h };
581
+ export { Album as A, DefaultTheme as D, ExcerptType as E, FuseListItem as F, PartialDeep as P, RuntimeConfig as R, SiteConfig as S, UserSiteConfig as U, ValaxyConfig as V, ValaxyAddon as a, Post as b, SocialLink as c, UserValaxyConfig as d, Photo as e, PageFrontMatter as f, PostFrontMatter as g, Page as h };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRDNVTVQ5cjs = require('../../chunk-RDNVTVQ5.cjs');require('../../chunk-YDNPXS5U.cjs');exports.cli = _chunkRDNVTVQ5cjs.F; exports.run = _chunkRDNVTVQ5cjs.G;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHZFTOKBGcjs = require('../../chunk-HZFTOKBG.cjs');require('../../chunk-YDNPXS5U.cjs');exports.cli = _chunkHZFTOKBGcjs.F; exports.run = _chunkHZFTOKBGcjs.G;
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{F as a,G as b}from"../../chunk-3EJGKTUH.mjs";import"../../chunk-GY4S4RDR.mjs";export{a as cli,b as run};
2
+ import{F as a,G as b}from"../../chunk-HAVGXIHI.mjs";import"../../chunk-GY4S4RDR.mjs";export{a as cli,b as run};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRDNVTVQ5cjs = require('../chunk-RDNVTVQ5.cjs');require('../chunk-YDNPXS5U.cjs');exports.build = _chunkRDNVTVQ5cjs.B; exports.cli = _chunkRDNVTVQ5cjs.F; exports.createServer = _chunkRDNVTVQ5cjs.E; exports.defaultSiteConfig = _chunkRDNVTVQ5cjs.t; exports.defaultValaxyConfig = _chunkRDNVTVQ5cjs.u; exports.defineAddon = _chunkRDNVTVQ5cjs.n; exports.defineConfig = _chunkRDNVTVQ5cjs.s; exports.defineSiteConfig = _chunkRDNVTVQ5cjs.q; exports.defineTheme = _chunkRDNVTVQ5cjs.p; exports.defineUnoSetup = _chunkRDNVTVQ5cjs.v; exports.defineValaxyAddon = _chunkRDNVTVQ5cjs.m; exports.defineValaxyConfig = _chunkRDNVTVQ5cjs.r; exports.defineValaxyTheme = _chunkRDNVTVQ5cjs.o; exports.ensurePrefix = _chunkRDNVTVQ5cjs.d; exports.getGitTimestamp = _chunkRDNVTVQ5cjs.a; exports.getIndexHtml = _chunkRDNVTVQ5cjs.A; exports.isExternal = _chunkRDNVTVQ5cjs.b; exports.isPath = _chunkRDNVTVQ5cjs.f; exports.mergeValaxyConfig = _chunkRDNVTVQ5cjs.g; exports.mergeViteConfigs = _chunkRDNVTVQ5cjs.z; exports.postProcessForSSG = _chunkRDNVTVQ5cjs.D; exports.processValaxyOptions = _chunkRDNVTVQ5cjs.w; exports.resolveAddonConfig = _chunkRDNVTVQ5cjs.j; exports.resolveImportPath = _chunkRDNVTVQ5cjs.l; exports.resolveOptions = _chunkRDNVTVQ5cjs.x; exports.resolveThemeValaxyConfig = _chunkRDNVTVQ5cjs.y; exports.resolveValaxyConfig = _chunkRDNVTVQ5cjs.i; exports.resolveValaxyConfigFromRoot = _chunkRDNVTVQ5cjs.h; exports.run = _chunkRDNVTVQ5cjs.G; exports.slash = _chunkRDNVTVQ5cjs.c; exports.ssgBuild = _chunkRDNVTVQ5cjs.C; exports.toAtFS = _chunkRDNVTVQ5cjs.e; exports.transformObject = _chunkRDNVTVQ5cjs.k;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHZFTOKBGcjs = require('../chunk-HZFTOKBG.cjs');require('../chunk-YDNPXS5U.cjs');exports.build = _chunkHZFTOKBGcjs.B; exports.cli = _chunkHZFTOKBGcjs.F; exports.createServer = _chunkHZFTOKBGcjs.E; exports.defaultSiteConfig = _chunkHZFTOKBGcjs.t; exports.defaultValaxyConfig = _chunkHZFTOKBGcjs.u; exports.defineAddon = _chunkHZFTOKBGcjs.n; exports.defineConfig = _chunkHZFTOKBGcjs.s; exports.defineSiteConfig = _chunkHZFTOKBGcjs.q; exports.defineTheme = _chunkHZFTOKBGcjs.p; exports.defineUnoSetup = _chunkHZFTOKBGcjs.v; exports.defineValaxyAddon = _chunkHZFTOKBGcjs.m; exports.defineValaxyConfig = _chunkHZFTOKBGcjs.r; exports.defineValaxyTheme = _chunkHZFTOKBGcjs.o; exports.ensurePrefix = _chunkHZFTOKBGcjs.d; exports.getGitTimestamp = _chunkHZFTOKBGcjs.a; exports.getIndexHtml = _chunkHZFTOKBGcjs.A; exports.isExternal = _chunkHZFTOKBGcjs.b; exports.isPath = _chunkHZFTOKBGcjs.f; exports.mergeValaxyConfig = _chunkHZFTOKBGcjs.g; exports.mergeViteConfigs = _chunkHZFTOKBGcjs.z; exports.postProcessForSSG = _chunkHZFTOKBGcjs.D; exports.processValaxyOptions = _chunkHZFTOKBGcjs.w; exports.resolveAddonConfig = _chunkHZFTOKBGcjs.j; exports.resolveImportPath = _chunkHZFTOKBGcjs.l; exports.resolveOptions = _chunkHZFTOKBGcjs.x; exports.resolveThemeValaxyConfig = _chunkHZFTOKBGcjs.y; exports.resolveValaxyConfig = _chunkHZFTOKBGcjs.i; exports.resolveValaxyConfigFromRoot = _chunkHZFTOKBGcjs.h; exports.run = _chunkHZFTOKBGcjs.G; exports.slash = _chunkHZFTOKBGcjs.c; exports.ssgBuild = _chunkHZFTOKBGcjs.C; exports.toAtFS = _chunkHZFTOKBGcjs.e; exports.transformObject = _chunkHZFTOKBGcjs.k;
@@ -2,8 +2,7 @@ import { ViteSSGOptions } from 'vite-ssg';
2
2
  export { cli, run } from './cli/index.cjs';
3
3
  import * as vite from 'vite';
4
4
  import { UserConfig, InlineConfig } from 'vite';
5
- import { V as ValaxyConfig, P as PartialDeep, a as ValaxyAddon, R as RuntimeConfig, U as UserSiteConfig, S as SiteConfig } from '../config-e5704a2c.js';
6
- import * as DefaultTheme from 'valaxy/default-theme';
5
+ import { D as DefaultTheme, V as ValaxyConfig, P as PartialDeep, a as ValaxyAddon, R as RuntimeConfig, U as UserSiteConfig, S as SiteConfig } from '../config-0d4945ff.js';
7
6
  import Vue from '@vitejs/plugin-vue';
8
7
  import Components from 'unplugin-vue-components/vite';
9
8
  import { VitePluginConfig } from 'unocss/vite';
@@ -2,8 +2,7 @@ import { ViteSSGOptions } from 'vite-ssg';
2
2
  export { cli, run } from './cli/index.js';
3
3
  import * as vite from 'vite';
4
4
  import { UserConfig, InlineConfig } from 'vite';
5
- import { V as ValaxyConfig, P as PartialDeep, a as ValaxyAddon, R as RuntimeConfig, U as UserSiteConfig, S as SiteConfig } from '../config-e5704a2c.js';
6
- import * as DefaultTheme from 'valaxy/default-theme';
5
+ import { D as DefaultTheme, V as ValaxyConfig, P as PartialDeep, a as ValaxyAddon, R as RuntimeConfig, U as UserSiteConfig, S as SiteConfig } from '../config-0d4945ff.js';
7
6
  import Vue from '@vitejs/plugin-vue';
8
7
  import Components from 'unplugin-vue-components/vite';
9
8
  import { VitePluginConfig } from 'unocss/vite';
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{A,B,C,D,E,F,G,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-3EJGKTUH.mjs";import"../chunk-GY4S4RDR.mjs";export{B as build,F as cli,E as createServer,t as defaultSiteConfig,u as defaultValaxyConfig,n as defineAddon,s as defineConfig,q as defineSiteConfig,p as defineTheme,v as defineUnoSetup,m as defineValaxyAddon,r as defineValaxyConfig,o as defineValaxyTheme,d as ensurePrefix,a as getGitTimestamp,A as getIndexHtml,b as isExternal,f as isPath,g as mergeValaxyConfig,z as mergeViteConfigs,D as postProcessForSSG,w as processValaxyOptions,j as resolveAddonConfig,l as resolveImportPath,x as resolveOptions,y as resolveThemeValaxyConfig,i as resolveValaxyConfig,h as resolveValaxyConfigFromRoot,G as run,c as slash,C as ssgBuild,e as toAtFS,k as transformObject};
2
+ import{A,B,C,D,E,F,G,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-HAVGXIHI.mjs";import"../chunk-GY4S4RDR.mjs";export{B as build,F as cli,E as createServer,t as defaultSiteConfig,u as defaultValaxyConfig,n as defineAddon,s as defineConfig,q as defineSiteConfig,p as defineTheme,v as defineUnoSetup,m as defineValaxyAddon,r as defineValaxyConfig,o as defineValaxyTheme,d as ensurePrefix,a as getGitTimestamp,A as getIndexHtml,b as isExternal,f as isPath,g as mergeValaxyConfig,z as mergeViteConfigs,D as postProcessForSSG,w as processValaxyOptions,j as resolveAddonConfig,l as resolveImportPath,x as resolveOptions,y as resolveThemeValaxyConfig,i as resolveValaxyConfig,h as resolveValaxyConfigFromRoot,G as run,c as slash,C as ssgBuild,e as toAtFS,k as transformObject};
@@ -1 +1 @@
1
- "use strict";var _chunkYDNPXS5Ucjs = require('../chunk-YDNPXS5U.cjs');_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );
1
+ "use strict";var _chunkYDNPXS5Ucjs = require('../chunk-YDNPXS5U.cjs');_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );_chunkYDNPXS5Ucjs.d.call(void 0, );
@@ -1,7 +1,5 @@
1
- import { b as Post } from '../config-e5704a2c.js';
2
- export { A as Album, E as ExcerptType, F as FuseListItem, h as Page, f as PageFrontMatter, P as PartialDeep, e as Photo, g as PostFrontMatter, R as RuntimeConfig, S as SiteConfig, c as SocialLink, U as UserSiteConfig, d as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-e5704a2c.js';
3
- import * as DefaultTheme from 'valaxy/default-theme';
4
- export { DefaultTheme };
1
+ import { b as Post } from '../config-0d4945ff.js';
2
+ export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem, h as Page, f as PageFrontMatter, P as PartialDeep, e as Photo, g as PostFrontMatter, R as RuntimeConfig, S as SiteConfig, c as SocialLink, U as UserSiteConfig, d as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-0d4945ff.js';
5
3
  import 'medium-zoom';
6
4
  import '@vueuse/integrations/useFuse';
7
5
  import 'vanilla-lazyload';
@@ -1,7 +1,5 @@
1
- import { b as Post } from '../config-e5704a2c.js';
2
- export { A as Album, E as ExcerptType, F as FuseListItem, h as Page, f as PageFrontMatter, P as PartialDeep, e as Photo, g as PostFrontMatter, R as RuntimeConfig, S as SiteConfig, c as SocialLink, U as UserSiteConfig, d as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-e5704a2c.js';
3
- import * as DefaultTheme from 'valaxy/default-theme';
4
- export { DefaultTheme };
1
+ import { b as Post } from '../config-0d4945ff.js';
2
+ export { A as Album, D as DefaultTheme, E as ExcerptType, F as FuseListItem, h as Page, f as PageFrontMatter, P as PartialDeep, e as Photo, g as PostFrontMatter, R as RuntimeConfig, S as SiteConfig, c as SocialLink, U as UserSiteConfig, d as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-0d4945ff.js';
5
3
  import 'medium-zoom';
6
4
  import '@vueuse/integrations/useFuse';
7
5
  import 'vanilla-lazyload';
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{e as t}from"../chunk-GY4S4RDR.mjs";t();t();t();t();t();t();
2
+ import{e}from"../chunk-GY4S4RDR.mjs";e();e();e();e();e();e();e();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.15.11",
4
+ "version": "0.15.12",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -30,7 +30,6 @@
30
30
  "require": "./dist/node/index.cjs"
31
31
  },
32
32
  "./types": "./dist/types/index.d.ts",
33
- "./default-theme": "./types/default-theme.d.ts",
34
33
  "./*": "./*"
35
34
  },
36
35
  "main": "dist/node/index.cjs",
package/types/config.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  import type { ZoomOptions } from 'medium-zoom'
2
2
  import type { FuseOptions } from '@vueuse/integrations/useFuse'
3
3
  import type { ILazyLoadOptions } from 'vanilla-lazyload'
4
- import type * as DefaultTheme from 'valaxy/default-theme'
5
4
  import type { ValaxyAddon } from '../types'
5
+ import type { DefaultTheme } from './default-theme'
6
6
  import type { PostFrontMatter } from './posts'
7
7
  import type { FuseListItem } from './node'
8
8
 
9
+ import './default-theme'
10
+
9
11
  export interface SocialLink {
10
12
  /**
11
13
  * The title of your link
@@ -1,4 +1,5 @@
1
- declare module 'valaxy/default-theme' {
1
+ // eslint-disable-next-line ts/no-namespace
2
+ export namespace DefaultTheme {
2
3
  export interface Config {
3
4
  /**
4
5
  * Custom header levels of outline in the aside component.
package/types/index.ts CHANGED
@@ -7,4 +7,5 @@ export * from './posts'
7
7
  // used in node, but without node deps
8
8
  export * from './node'
9
9
 
10
- export type * as DefaultTheme from 'valaxy/default-theme'
10
+ // default theme
11
+ export * from './default-theme'