valaxy 0.7.7 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/components/ValaxyRightSidebar.vue +1 -1
- package/client/components/ValaxyToc.vue +1 -1
- package/client/composables/category.ts +1 -1
- package/client/composables/comments/twikoo.ts +25 -1
- package/client/composables/comments/waline.ts +32 -23
- package/client/composables/common.ts +1 -1
- package/client/composables/outline.ts +1 -1
- package/client/composables/post.ts +1 -1
- package/client/composables/tag.ts +1 -1
- package/client/composables/widgets/aplayer.ts +10 -5
- package/client/config.ts +1 -1
- package/client/modules/valaxy.ts +1 -1
- package/client/utils/cdn.ts +1 -0
- package/client/utils/index.ts +1 -0
- package/client/utils/time.ts +1 -1
- package/dist/chunk-2QVEQP3K.js +1 -0
- package/dist/chunk-4FKSRP5I.mjs +0 -0
- package/dist/{chunk-HP2UOVSL.mjs → chunk-EIYDDCHI.mjs} +91 -91
- package/dist/{chunk-BTP4CLJN.js → chunk-EYC2AAUG.js} +91 -91
- package/dist/chunk-IMWNMHRD.mjs +0 -0
- package/dist/chunk-KP3MIFG6.js +1 -0
- package/dist/client/index.d.ts +227 -0
- package/dist/client/index.js +1 -0
- package/dist/client/index.mjs +1 -0
- package/dist/{index-df14d281.d.ts → index-328992a1.d.ts} +12 -2
- package/dist/node/cli.js +10 -10
- package/dist/node/cli.mjs +10 -10
- package/dist/node/index.d.ts +4 -6
- package/dist/node/index.js +1 -1
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.js +1 -1
- package/dist/types/index.mjs +1 -0
- package/index.d.ts +1 -1
- package/package.json +7 -6
- package/client/shims.d.ts +0 -42
package/dist/node/cli.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{a as le,b,c as Y,d as ct,h as ut,k as P,l as $,m as ae,n as ce,o as G,p as ue}from"../chunk-HP2UOVSL.mjs";var ge=b((Cn,me)=>{"use strict";me.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var H=b(($n,ye)=>{var R=ge(),be={};for(let e of Object.keys(R))be[R[e]]=e;var a={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};ye.exports=a;for(let e of Object.keys(a)){if(!("channels"in a[e]))throw new Error("missing channels property: "+e);if(!("labels"in a[e]))throw new Error("missing channel labels property: "+e);if(a[e].labels.length!==a[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],"channels",{value:t}),Object.defineProperty(a[e],"labels",{value:r})}a.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),s=Math.max(t,r,n),i=s-o,l,c;s===o?l=0:t===s?l=(r-n)/i:r===s?l=2+(n-t)/i:n===s&&(l=4+(t-r)/i),l=Math.min(l*60,360),l<0&&(l+=360);let u=(o+s)/2;return s===o?c=0:u<=.5?c=i/(s+o):c=i/(2-s-o),[l,c*100,u*100]};a.rgb.hsv=function(e){let t,r,n,o,s,i=e[0]/255,l=e[1]/255,c=e[2]/255,u=Math.max(i,l,c),f=u-Math.min(i,l,c),h=function(p){return(u-p)/6/f+1/2};return f===0?(o=0,s=0):(s=f/u,t=h(i),r=h(l),n=h(c),i===u?o=n-r:l===u?o=1/3+t-n:c===u&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,s*100,u*100]};a.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],o=a.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,s*100,n*100]};a.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),s=(1-t-o)/(1-o)||0,i=(1-r-o)/(1-o)||0,l=(1-n-o)/(1-o)||0;return[s*100,i*100,l*100,o*100]};function yt(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}a.rgb.keyword=function(e){let t=be[e];if(t)return t;let r=1/0,n;for(let o of Object.keys(R)){let s=R[o],i=yt(e,s);i<r&&(r=i,n=o)}return n};a.keyword.rgb=function(e){return R[e]};a.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let o=t*.4124+r*.3576+n*.1805,s=t*.2126+r*.7152+n*.0722,i=t*.0193+r*.1192+n*.9505;return[o*100,s*100,i*100]};a.rgb.lab=function(e){let t=a.rgb.xyz(e),r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let s=116*n-16,i=500*(r-n),l=200*(n-o);return[s,i,l]};a.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o,s,i;if(r===0)return i=n*255,[i,i,i];n<.5?o=n*(1+r):o=n+r-n*r;let l=2*n-o,c=[0,0,0];for(let u=0;u<3;u++)s=t+1/3*-(u-1),s<0&&s++,s>1&&s--,6*s<1?i=l+(o-l)*6*s:2*s<1?i=o:3*s<2?i=l+(o-l)*(2/3-s)*6:i=l,c[u]=i*255;return c};a.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=s<=1?s:2-s;let i=(n+r)/2,l=n===0?2*o/(s+o):2*r/(n+r);return[t,l*100,i*100]};a.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,s=t-Math.floor(t),i=255*n*(1-r),l=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,o){case 0:return[n,c,i];case 1:return[l,n,i];case 2:return[i,n,c];case 3:return[i,l,n];case 4:return[c,i,n];case 5:return[n,i,l]}};a.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01),s,i;i=(2-r)*n;let l=(2-r)*o;return s=r*o,s/=l<=1?l:2-l,s=s||0,i/=2,[t,s*100,i*100]};a.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o=r+n,s;o>1&&(r/=o,n/=o);let i=Math.floor(6*t),l=1-n;s=6*t-i,(i&1)!==0&&(s=1-s);let c=r+s*(l-r),u,f,h;switch(i){default:case 6:case 0:u=l,f=c,h=r;break;case 1:u=c,f=l,h=r;break;case 2:u=r,f=l,h=c;break;case 3:u=r,f=c,h=l;break;case 4:u=c,f=r,h=l;break;case 5:u=l,f=r,h=c;break}return[u*255,f*255,h*255]};a.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,s=1-Math.min(1,t*(1-o)+o),i=1-Math.min(1,r*(1-o)+o),l=1-Math.min(1,n*(1-o)+o);return[s*255,i*255,l*255]};a.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o,s,i;return o=t*3.2406+r*-1.5372+n*-.4986,s=t*-.9689+r*1.8758+n*.0415,i=t*.0557+r*-.204+n*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),[o*255,s*255,i*255]};a.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let o=116*r-16,s=500*(t-r),i=200*(r-n);return[o,s,i]};a.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],o,s,i;s=(t+16)/116,o=r/500+s,i=s-n/200;let l=s**3,c=o**3,u=i**3;return s=l>.008856?l:(s-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,o*=95.047,s*=100,i*=108.883,[o,s,i]};a.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],o;o=Math.atan2(n,r)*360/2/Math.PI,o<0&&(o+=360);let i=Math.sqrt(r*r+n*n);return[t,i,o]};a.lch.lab=function(e){let t=e[0],r=e[1],o=e[2]/360*2*Math.PI,s=r*Math.cos(o),i=r*Math.sin(o);return[t,s,i]};a.rgb.ansi16=function(e,t=null){let[r,n,o]=e,s=t===null?a.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),s===0)return 30;let i=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(i+=60),i};a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])};a.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};a.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,s=(t>>2&1)*r*255;return[n,o,s]};a.ansi256.rgb=function(e){if(e>=232){let s=(e-232)*10+8;return[s,s,s]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};a.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};a.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(l=>l+l).join(""));let n=parseInt(r,16),o=n>>16&255,s=n>>8&255,i=n&255;return[o,s,i]};a.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),s=Math.min(Math.min(t,r),n),i=o-s,l,c;return i<1?l=s/(1-i):l=0,i<=0?c=0:o===t?c=(r-n)/i%6:o===r?c=2+(n-t)/i:c=4+(t-r)/i,c/=6,c%=1,[c*360,i*100,l*100]};a.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],n*100,o*100]};a.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],n*100,o*100]};a.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let o=[0,0,0],s=t%1*6,i=s%1,l=1-i,c=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return c=(1-r)*n,[(r*o[0]+c)*255,(r*o[1]+c)*255,(r*o[2]+c)*255]};a.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),o=0;return n>0&&(o=t/n),[e[0],o*100,n*100]};a.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,o=0;return n>0&&n<.5?o=t/(2*n):n>=.5&&n<1&&(o=t/(2*(1-n))),[e[0],o*100,n*100]};a.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};a.hwb.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=1-r,o=n-t,s=0;return o<1&&(s=(n-o)/(1-o)),[e[0],o*100,s*100]};a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};a.gray.hsl=function(e){return[0,0,e[0]]};a.gray.hsv=a.gray.hsl;a.gray.hwb=function(e){return[0,100,e[0]]};a.gray.cmyk=function(e){return[0,0,0,e[0]]};a.gray.lab=function(e){return[e[0],0,0]};a.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var we=b((Rn,ve)=>{var A=H();function vt(){let e={},t=Object.keys(A);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function wt(e){let t=vt(),r=[e];for(t[e].distance=0;r.length;){let n=r.pop(),o=Object.keys(A[n]);for(let s=o.length,i=0;i<s;i++){let l=o[i],c=t[l];c.distance===-1&&(c.distance=t[n].distance+1,c.parent=n,r.unshift(l))}}return t}function xt(e,t){return function(r){return t(e(r))}}function kt(e,t){let r=[t[e].parent,e],n=A[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),n=xt(A[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}ve.exports=function(e){let t=wt(e),r={},n=Object.keys(t);for(let o=n.length,s=0;s<o;s++){let i=n[s];t[i].parent!==null&&(r[i]=kt(i,t))}return r}});var ke=b((Mn,xe)=>{var X=H(),Ot=we(),x={},Ct=Object.keys(X);function $t(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function Rt(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let o=e(r);if(typeof o=="object")for(let s=o.length,i=0;i<s;i++)o[i]=Math.round(o[i]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}Ct.forEach(e=>{x[e]={},Object.defineProperty(x[e],"channels",{value:X[e].channels}),Object.defineProperty(x[e],"labels",{value:X[e].labels});let t=Ot(e);Object.keys(t).forEach(n=>{let o=t[n];x[e][n]=Rt(o),x[e][n].raw=$t(o)})});xe.exports=x});var je=b((jn,Me)=>{"use strict";var Oe=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,Ce=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};5;${n}m`},$e=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},T=e=>e,Re=(e,t,r)=>[e,t,r],k=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},J,O=(e,t,r,n)=>{J===void 0&&(J=ke());let o=n?10:0,s={};for(let[i,l]of Object.entries(J)){let c=i==="ansi16"?"ansi":i;i===t?s[c]=e(r,o):typeof l=="object"&&(s[c]=e(l[t],o))}return s};function Mt(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[o,s]of Object.entries(n))t[o]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[o]=t[o],e.set(s[0],s[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",k(t.color,"ansi",()=>O(Oe,"ansi16",T,!1)),k(t.color,"ansi256",()=>O(Ce,"ansi256",T,!1)),k(t.color,"ansi16m",()=>O($e,"rgb",Re,!1)),k(t.bgColor,"ansi",()=>O(Oe,"ansi16",T,!0)),k(t.bgColor,"ansi256",()=>O(Ce,"ansi256",T,!0)),k(t.bgColor,"ansi16m",()=>O($e,"rgb",Re,!0)),t}Object.defineProperty(Me,"exports",{enumerable:!0,get:Mt})});var Pe=b((En,Ee)=>{"use strict";Ee.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var Be=b((Pn,Se)=>{"use strict";var jt=le("os"),Ie=le("tty"),g=Pe(),{env:d}=process,w;g("no-color")||g("no-colors")||g("color=false")||g("color=never")?w=0:(g("color")||g("colors")||g("color=true")||g("color=always"))&&(w=1);"FORCE_COLOR"in d&&(d.FORCE_COLOR==="true"?w=1:d.FORCE_COLOR==="false"?w=0:w=d.FORCE_COLOR.length===0?1:Math.min(parseInt(d.FORCE_COLOR,10),3));function Q(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Z(e,t){if(w===0)return 0;if(g("color=16m")||g("color=full")||g("color=truecolor"))return 3;if(g("color=256"))return 2;if(e&&!t&&w===void 0)return 0;let r=w||0;if(d.TERM==="dumb")return r;if(process.platform==="win32"){let n=jt.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in d)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in d)||d.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in d)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d.TEAMCITY_VERSION)?1:0;if(d.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in d){let n=parseInt((d.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(d.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(d.TERM)||"COLORTERM"in d?1:r}function Et(e){let t=Z(e,e&&e.isTTY);return Q(t)}Se.exports={supportsColor:Et,stdout:Q(Z(!0,Ie.isatty(1))),stderr:Q(Z(!0,Ie.isatty(2)))}});var Ae=b((In,Fe)=>{"use strict";var Pt=(e,t,r)=>{let n=e.indexOf(t);if(n===-1)return e;let o=t.length,s=0,i="";do i+=e.substr(s,n-s)+t+r,s=n+o,n=e.indexOf(t,s);while(n!==-1);return i+=e.substr(s),i},It=(e,t,r,n)=>{let o=0,s="";do{let i=e[n-1]==="\r";s+=e.substr(o,(i?n-1:n)-o)+t+(i?`\r
|
|
1
|
+
import{a as le,b,c as Y,d as ct,h as ut,k as P,l as $,m as ae,n as ce,o as G,p as ue}from"../chunk-EIYDDCHI.mjs";var ge=b((Rn,he)=>{"use strict";he.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var H=b((Mn,ye)=>{var R=ge(),be={};for(let e of Object.keys(R))be[R[e]]=e;var a={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};ye.exports=a;for(let e of Object.keys(a)){if(!("channels"in a[e]))throw new Error("missing channels property: "+e);if(!("labels"in a[e]))throw new Error("missing channel labels property: "+e);if(a[e].labels.length!==a[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],"channels",{value:t}),Object.defineProperty(a[e],"labels",{value:r})}a.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),s=Math.max(t,r,n),i=s-o,l,c;s===o?l=0:t===s?l=(r-n)/i:r===s?l=2+(n-t)/i:n===s&&(l=4+(t-r)/i),l=Math.min(l*60,360),l<0&&(l+=360);let u=(o+s)/2;return s===o?c=0:u<=.5?c=i/(s+o):c=i/(2-s-o),[l,c*100,u*100]};a.rgb.hsv=function(e){let t,r,n,o,s,i=e[0]/255,l=e[1]/255,c=e[2]/255,u=Math.max(i,l,c),f=u-Math.min(i,l,c),m=function(p){return(u-p)/6/f+1/2};return f===0?(o=0,s=0):(s=f/u,t=m(i),r=m(l),n=m(c),i===u?o=n-r:l===u?o=1/3+t-n:c===u&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,s*100,u*100]};a.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],o=a.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,s*100,n*100]};a.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),s=(1-t-o)/(1-o)||0,i=(1-r-o)/(1-o)||0,l=(1-n-o)/(1-o)||0;return[s*100,i*100,l*100,o*100]};function yt(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}a.rgb.keyword=function(e){let t=be[e];if(t)return t;let r=1/0,n;for(let o of Object.keys(R)){let s=R[o],i=yt(e,s);i<r&&(r=i,n=o)}return n};a.keyword.rgb=function(e){return R[e]};a.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let o=t*.4124+r*.3576+n*.1805,s=t*.2126+r*.7152+n*.0722,i=t*.0193+r*.1192+n*.9505;return[o*100,s*100,i*100]};a.rgb.lab=function(e){let t=a.rgb.xyz(e),r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let s=116*n-16,i=500*(r-n),l=200*(n-o);return[s,i,l]};a.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o,s,i;if(r===0)return i=n*255,[i,i,i];n<.5?o=n*(1+r):o=n+r-n*r;let l=2*n-o,c=[0,0,0];for(let u=0;u<3;u++)s=t+1/3*-(u-1),s<0&&s++,s>1&&s--,6*s<1?i=l+(o-l)*6*s:2*s<1?i=o:3*s<2?i=l+(o-l)*(2/3-s)*6:i=l,c[u]=i*255;return c};a.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=s<=1?s:2-s;let i=(n+r)/2,l=n===0?2*o/(s+o):2*r/(n+r);return[t,l*100,i*100]};a.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,s=t-Math.floor(t),i=255*n*(1-r),l=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,o){case 0:return[n,c,i];case 1:return[l,n,i];case 2:return[i,n,c];case 3:return[i,l,n];case 4:return[c,i,n];case 5:return[n,i,l]}};a.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01),s,i;i=(2-r)*n;let l=(2-r)*o;return s=r*o,s/=l<=1?l:2-l,s=s||0,i/=2,[t,s*100,i*100]};a.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o=r+n,s;o>1&&(r/=o,n/=o);let i=Math.floor(6*t),l=1-n;s=6*t-i,(i&1)!==0&&(s=1-s);let c=r+s*(l-r),u,f,m;switch(i){default:case 6:case 0:u=l,f=c,m=r;break;case 1:u=c,f=l,m=r;break;case 2:u=r,f=l,m=c;break;case 3:u=r,f=c,m=l;break;case 4:u=c,f=r,m=l;break;case 5:u=l,f=r,m=c;break}return[u*255,f*255,m*255]};a.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,s=1-Math.min(1,t*(1-o)+o),i=1-Math.min(1,r*(1-o)+o),l=1-Math.min(1,n*(1-o)+o);return[s*255,i*255,l*255]};a.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o,s,i;return o=t*3.2406+r*-1.5372+n*-.4986,s=t*-.9689+r*1.8758+n*.0415,i=t*.0557+r*-.204+n*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),[o*255,s*255,i*255]};a.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let o=116*r-16,s=500*(t-r),i=200*(r-n);return[o,s,i]};a.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],o,s,i;s=(t+16)/116,o=r/500+s,i=s-n/200;let l=s**3,c=o**3,u=i**3;return s=l>.008856?l:(s-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,o*=95.047,s*=100,i*=108.883,[o,s,i]};a.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],o;o=Math.atan2(n,r)*360/2/Math.PI,o<0&&(o+=360);let i=Math.sqrt(r*r+n*n);return[t,i,o]};a.lch.lab=function(e){let t=e[0],r=e[1],o=e[2]/360*2*Math.PI,s=r*Math.cos(o),i=r*Math.sin(o);return[t,s,i]};a.rgb.ansi16=function(e,t=null){let[r,n,o]=e,s=t===null?a.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),s===0)return 30;let i=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(i+=60),i};a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])};a.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};a.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,s=(t>>2&1)*r*255;return[n,o,s]};a.ansi256.rgb=function(e){if(e>=232){let s=(e-232)*10+8;return[s,s,s]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};a.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};a.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(l=>l+l).join(""));let n=parseInt(r,16),o=n>>16&255,s=n>>8&255,i=n&255;return[o,s,i]};a.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),s=Math.min(Math.min(t,r),n),i=o-s,l,c;return i<1?l=s/(1-i):l=0,i<=0?c=0:o===t?c=(r-n)/i%6:o===r?c=2+(n-t)/i:c=4+(t-r)/i,c/=6,c%=1,[c*360,i*100,l*100]};a.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],n*100,o*100]};a.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],n*100,o*100]};a.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let o=[0,0,0],s=t%1*6,i=s%1,l=1-i,c=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return c=(1-r)*n,[(r*o[0]+c)*255,(r*o[1]+c)*255,(r*o[2]+c)*255]};a.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),o=0;return n>0&&(o=t/n),[e[0],o*100,n*100]};a.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,o=0;return n>0&&n<.5?o=t/(2*n):n>=.5&&n<1&&(o=t/(2*(1-n))),[e[0],o*100,n*100]};a.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};a.hwb.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=1-r,o=n-t,s=0;return o<1&&(s=(n-o)/(1-o)),[e[0],o*100,s*100]};a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};a.gray.hsl=function(e){return[0,0,e[0]]};a.gray.hsv=a.gray.hsl;a.gray.hwb=function(e){return[0,100,e[0]]};a.gray.cmyk=function(e){return[0,0,0,e[0]]};a.gray.lab=function(e){return[e[0],0,0]};a.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var we=b((jn,ve)=>{var A=H();function vt(){let e={},t=Object.keys(A);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function wt(e){let t=vt(),r=[e];for(t[e].distance=0;r.length;){let n=r.pop(),o=Object.keys(A[n]);for(let s=o.length,i=0;i<s;i++){let l=o[i],c=t[l];c.distance===-1&&(c.distance=t[n].distance+1,c.parent=n,r.unshift(l))}}return t}function xt(e,t){return function(r){return t(e(r))}}function kt(e,t){let r=[t[e].parent,e],n=A[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),n=xt(A[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}ve.exports=function(e){let t=wt(e),r={},n=Object.keys(t);for(let o=n.length,s=0;s<o;s++){let i=n[s];t[i].parent!==null&&(r[i]=kt(i,t))}return r}});var ke=b((En,xe)=>{var X=H(),Ot=we(),x={},Ct=Object.keys(X);function $t(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function Rt(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let o=e(r);if(typeof o=="object")for(let s=o.length,i=0;i<s;i++)o[i]=Math.round(o[i]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}Ct.forEach(e=>{x[e]={},Object.defineProperty(x[e],"channels",{value:X[e].channels}),Object.defineProperty(x[e],"labels",{value:X[e].labels});let t=Ot(e);Object.keys(t).forEach(n=>{let o=t[n];x[e][n]=Rt(o),x[e][n].raw=$t(o)})});xe.exports=x});var je=b((Pn,Me)=>{"use strict";var Oe=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,Ce=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};5;${n}m`},$e=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},T=e=>e,Re=(e,t,r)=>[e,t,r],k=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},J,O=(e,t,r,n)=>{J===void 0&&(J=ke());let o=n?10:0,s={};for(let[i,l]of Object.entries(J)){let c=i==="ansi16"?"ansi":i;i===t?s[c]=e(r,o):typeof l=="object"&&(s[c]=e(l[t],o))}return s};function Mt(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[o,s]of Object.entries(n))t[o]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[o]=t[o],e.set(s[0],s[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",k(t.color,"ansi",()=>O(Oe,"ansi16",T,!1)),k(t.color,"ansi256",()=>O(Ce,"ansi256",T,!1)),k(t.color,"ansi16m",()=>O($e,"rgb",Re,!1)),k(t.bgColor,"ansi",()=>O(Oe,"ansi16",T,!0)),k(t.bgColor,"ansi256",()=>O(Ce,"ansi256",T,!0)),k(t.bgColor,"ansi16m",()=>O($e,"rgb",Re,!0)),t}Object.defineProperty(Me,"exports",{enumerable:!0,get:Mt})});var Pe=b((In,Ee)=>{"use strict";Ee.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var Be=b((Sn,Se)=>{"use strict";var jt=le("os"),Ie=le("tty"),g=Pe(),{env:d}=process,w;g("no-color")||g("no-colors")||g("color=false")||g("color=never")?w=0:(g("color")||g("colors")||g("color=true")||g("color=always"))&&(w=1);"FORCE_COLOR"in d&&(d.FORCE_COLOR==="true"?w=1:d.FORCE_COLOR==="false"?w=0:w=d.FORCE_COLOR.length===0?1:Math.min(parseInt(d.FORCE_COLOR,10),3));function Q(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Z(e,t){if(w===0)return 0;if(g("color=16m")||g("color=full")||g("color=truecolor"))return 3;if(g("color=256"))return 2;if(e&&!t&&w===void 0)return 0;let r=w||0;if(d.TERM==="dumb")return r;if(process.platform==="win32"){let n=jt.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in d)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in d)||d.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in d)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d.TEAMCITY_VERSION)?1:0;if(d.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in d){let n=parseInt((d.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(d.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(d.TERM)||"COLORTERM"in d?1:r}function Et(e){let t=Z(e,e&&e.isTTY);return Q(t)}Se.exports={supportsColor:Et,stdout:Q(Z(!0,Ie.isatty(1))),stderr:Q(Z(!0,Ie.isatty(2)))}});var Ae=b((Bn,Fe)=>{"use strict";var Pt=(e,t,r)=>{let n=e.indexOf(t);if(n===-1)return e;let o=t.length,s=0,i="";do i+=e.substr(s,n-s)+t+r,s=n+o,n=e.indexOf(t,s);while(n!==-1);return i+=e.substr(s),i},It=(e,t,r,n)=>{let o=0,s="";do{let i=e[n-1]==="\r";s+=e.substr(o,(i?n-1:n)-o)+t+(i?`\r
|
|
2
2
|
`:`
|
|
3
3
|
`)+r,o=n+1,n=e.indexOf(`
|
|
4
|
-
`,o)}while(n!==-1);return s+=e.substr(o),s};Fe.exports={stringReplaceAll:Pt,stringEncaseCRLFWithFirstIndex:It}});var Ne=b((
|
|
5
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function qe(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):At.get(e)||e}function Tt(e,t){let r=[],n=t.trim().split(/\s*,\s*/g),o;for(let s of n){let i=Number(s);if(!Number.isNaN(i))r.push(i);else if(o=s.match(Bt))r.push(o[2].replace(Ft,(l,c,u)=>c?qe(c):u));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${e}')`)}return r}function _t(e){Te.lastIndex=0;let t=[],r;for(;(r=Te.exec(e))!==null;){let n=r[1];if(r[2]){let o=Tt(n,r[2]);t.push([n].concat(o))}else t.push([n])}return t}function _e(e,t){let r={};for(let o of t)for(let s of o.styles)r[s[0]]=o.inverse?null:s.slice(1);let n=e;for(let[o,s]of Object.entries(r))if(!!Array.isArray(s)){if(!(o in n))throw new Error(`Unknown Chalk style: ${o}`);n=s.length>0?n[o](...s):n[o]}return n}Le.exports=(e,t)=>{let r=[],n=[],o=[];if(t.replace(St,(s,i,l,c,u,f)=>{if(i)o.push(qe(i));else if(c){let
|
|
6
|
-
`);return s!==-1&&(t=Lt(t,o,n,s)),n+t+o},ee,ze=(e,...t)=>{let[r]=t;if(!_(r)||!_(r.raw))return t.join(" ");let n=t.slice(1),o=[r.raw[0]];for(let s=1;s<r.length;s++)o.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));return ee===void 0&&(ee=Ne()),ee(e,o.join(""))};Object.defineProperties(q.prototype,C);var N=q();N.supportsColor=te;N.stderr=q({level:ne?ne.level:0});N.stderr.supportsColor=ne;Ue.exports=N});import
|
|
7
|
-
`),n.pipe(n)});r.listen(e,"0.0.0.0"),r.on("error",()=>{t(!1)}),r.on("listening",()=>{r.close(),t(!0)})})}import*as de from"readline";import
|
|
8
|
-
`),console.error(n),process.exit(1)}}function
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
`,o)}while(n!==-1);return s+=e.substr(o),s};Fe.exports={stringReplaceAll:Pt,stringEncaseCRLFWithFirstIndex:It}});var Ne=b((Fn,Le)=>{"use strict";var St=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Te=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Bt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Ft=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,At=new Map([["n",`
|
|
5
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function qe(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):At.get(e)||e}function Tt(e,t){let r=[],n=t.trim().split(/\s*,\s*/g),o;for(let s of n){let i=Number(s);if(!Number.isNaN(i))r.push(i);else if(o=s.match(Bt))r.push(o[2].replace(Ft,(l,c,u)=>c?qe(c):u));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${e}')`)}return r}function _t(e){Te.lastIndex=0;let t=[],r;for(;(r=Te.exec(e))!==null;){let n=r[1];if(r[2]){let o=Tt(n,r[2]);t.push([n].concat(o))}else t.push([n])}return t}function _e(e,t){let r={};for(let o of t)for(let s of o.styles)r[s[0]]=o.inverse?null:s.slice(1);let n=e;for(let[o,s]of Object.entries(r))if(!!Array.isArray(s)){if(!(o in n))throw new Error(`Unknown Chalk style: ${o}`);n=s.length>0?n[o](...s):n[o]}return n}Le.exports=(e,t)=>{let r=[],n=[],o=[];if(t.replace(St,(s,i,l,c,u,f)=>{if(i)o.push(qe(i));else if(c){let m=o.join("");o=[],n.push(r.length===0?m:_e(e,r)(m)),r.push({inverse:l,styles:_t(c)})}else if(u){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(_e(e,r)(o.join(""))),o=[],r.pop()}else o.push(f)}),n.push(o.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var We=b((An,Ue)=>{"use strict";var M=je(),{stdout:te,stderr:ne}=Be(),{stringReplaceAll:qt,stringEncaseCRLFWithFirstIndex:Lt}=Ae(),{isArray:_}=Array,De=["ansi","ansi","ansi256","ansi16m"],C=Object.create(null),Nt=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=te?te.level:0;e.level=t.level===void 0?r:t.level},re=class{constructor(t){return Ye(t)}},Ye=e=>{let t={};return Nt(t,e),t.template=(...r)=>ze(t.template,...r),Object.setPrototypeOf(t,q.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=re,t.template};function q(e){return Ye(e)}for(let[e,t]of Object.entries(M))C[e]={get(){let r=L(this,oe(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};C.visible={get(){let e=L(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Ge=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of Ge)C[e]={get(){let{level:t}=this;return function(...r){let n=oe(M.color[De[t]][e](...r),M.color.close,this._styler);return L(this,n,this._isEmpty)}}};for(let e of Ge){let t="bg"+e[0].toUpperCase()+e.slice(1);C[t]={get(){let{level:r}=this;return function(...n){let o=oe(M.bgColor[De[r]][e](...n),M.bgColor.close,this._styler);return L(this,o,this._isEmpty)}}}}var Vt=Object.defineProperties(()=>{},{...C,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),oe=(e,t,r)=>{let n,o;return r===void 0?(n=e,o=t):(n=r.openAll+e,o=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:o,parent:r}},L=(e,t,r)=>{let n=(...o)=>_(o[0])&&_(o[0].raw)?Ve(n,ze(n,...o)):Ve(n,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(n,Vt),n._generator=e,n._styler=t,n._isEmpty=r,n},Ve=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:n,closeAll:o}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=qt(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
|
|
6
|
+
`);return s!==-1&&(t=Lt(t,o,n,s)),n+t+o},ee,ze=(e,...t)=>{let[r]=t;if(!_(r)||!_(r.raw))return t.join(" ");let n=t.slice(1),o=[r.raw[0]];for(let s=1;s<r.length;s++)o.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));return ee===void 0&&(ee=Ne()),ee(e,o.join(""))};Object.defineProperties(q.prototype,C);var N=q();N.supportsColor=te;N.stderr=q({level:ne?ne.level:0});N.stderr.supportsColor=ne;Ue.exports=N});import cn from"fs";import st from"path";import{exec as un}from"child_process";import fn from"yargs";import dn from"open";import D from"consola";import{yellow as pn}from"kolorist";var I="0.7.8";import dt from"net";async function z(e){return await pt(e)?e:await z(e+1)}function pt(e){return new Promise(t=>{let r=dt.createServer(n=>{n.write(`Echo server\r
|
|
7
|
+
`),n.pipe(n)});r.listen(e,"0.0.0.0"),r.on("error",()=>{t(!1)}),r.on("listening",()=>{r.close(),t(!0)})})}import*as de from"readline";import mt from"path";import ht from"os";import{blue as fe,bold as U,cyan as gt,dim as v,gray as bt,green as pe,underline as W}from"kolorist";import S from"consola";var B;function K(e,t,r){console.log(),console.log(` ${U("\u{1F30C} Valaxy")} ${fe(`v${I}`)}`),console.log(),console.log(`${v(" \u{1FA90} theme ")} > ${e.theme?pe(e.theme):bt("none")}`),console.log(` ${v("\u{1F4C1}")} ${v(mt.resolve(e.userRoot))}`),t&&(console.log(),console.log(`${v(" Preview ")} > ${gt(`http://localhost:${U(t)}/`)}`),r&&Object.values(ht.networkInterfaces()).forEach(n=>(n||[]).filter(o=>o.family==="IPv4"&&!o.address.includes("127.0.0.1")).forEach(({address:o})=>{console.log(`${v(" Network ")} > ${fe(`http://${o}:${U(t)}/`)}`)})),console.log(),console.log(`${v(" shortcuts ")} > ${W("r")}${v("estart | ")}${W("o")}${v("pen | ")}${W("e")}${v("dit")}`)),console.log()}async function F(e,t){var r;B&&await B.close();try{let n=await $(),o=(await ce(e.config)).concat(((r=n.unocss)==null?void 0:r.safelist)||[]);B=await ue(e,t,{onConfigReload(s,i){let l=!1;s.social.some((u,f)=>!o.includes(u.icon)&&u.icon!==i.social[f].icon)&&(S.info("Find new icon, reload server..."),S.info(`If you do not want to reload it, write icon name in ${pe("config.unocss.safelist")}.`),S.info('For example: ["i-ri-cloud-line"]'),console.log(),l=!0),l&&F(e,t)}}),await B.listen()}catch(n){S.error(`failed to start server. error:
|
|
8
|
+
`),console.error(n),process.exit(1)}}function me(e){process.stdin.resume(),process.stdin.setEncoding("utf8"),de.emitKeypressEvents(process.stdin),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.on("keypress",(t,r)=>{if(r.ctrl&&r.name==="c")process.exit();else{let[n]=e.filter(o=>o.name===t);if(n)try{n.action()}catch(o){console.error(`Failed to execute shortcut ${n.fullName}`,o)}}})}var Je=Y(We());import Qt from"consola";import{writeFile as Yt}from"fs/promises";import{join as He,resolve as Gt}from"path";import{render as zt}from"ejs";import Ut from"dayjs";import{ensureSuffix as Wt}from"@antfu/utils";import{access as Dt}from"fs/promises";async function Ke(e){try{return await Dt(e),!0}catch{return!1}}var Kt=process.cwd(),Ht=Gt(Kt,"pages"),Xe=async e=>{let{path:t,title:r}=e,n=t||He("posts",r),o=0;for(;;){let s=He(Ht,n);if(o&&(s=`${s}-${o}`),s=Wt(".md",s),!await Ke(s)){let i=Jt(e);return Yt(s,i,"utf-8"),s}o++}},Xt=`---
|
|
9
|
+
layout: <%=layout%>
|
|
10
|
+
title: <%=title%>
|
|
11
|
+
date: <%=date%>
|
|
11
12
|
---
|
|
12
|
-
|
|
13
|
-
`}var Qe=e=>{e.command("new <title>","Draft a new post",t=>{t.usage("$0 <title> -p [path] -l [layout]").positional("title",{describe:"The title of the new post",required:!0}).option("path",{alias:"p",type:"string",describe:"the path to generate new post. Customize the path of post to generate"}).option("layout",{alias:"l",type:"string",default:"post"}).option("date",{alias:"d",type:"boolean",describe:"Generate post with the current date"}).strict().help()},async({title:t,path:r,date:n,layout:o})=>{let s=await Xe({title:t,date:n,layout:o,path:r});Xt.success(`[valaxy new]: successfully generated file ${(0,Je.magenta)(s)}}`)})};import{mergeConfig as Ze,build as Jt}from"vite";import{build as Qt}from"vite-ssg/node";import Zt from"vite-ssg-sitemap";async function et(e,t={}){let r=Ze(await G(e,await $("build")),t);await Jt(r)}async function tt(e,t={}){let r=await G(e,await $("build"));r.ssgOptions={script:"async",formatting:"minify",onFinished(){Zt({hostname:e.config.url})},dirStyle:"nested"};let n=Ze(r,t);await Qt({},n)}var rt=Y(ut()),V=Y(ct());import{dirname as en}from"path";import{cyan as tn,dim as nt}from"kolorist";import nn from"gray-matter";import rn from"markdown-it";import{Feed as on}from"feed";import j from"consola";var sn=rn({html:!0,breaks:!0,linkify:!0});async function ot(e){let{config:t}=e;if(!t.url||t.url==="/"){j.error('You must set "config.url" to generate rss.');return}let r=t.url,n=t.url.slice(0,-1),o={name:e.config.author.name,email:e.config.author.email,link:e.config.author.link};j.info(`RSS Site Url: ${tn(r)}`);let s=t.license.type==="zero"?"1.0":"4.0",i={title:t.title,description:t.description,id:r||"valaxy",link:r,copyright:`CC ${t.license.type.toUpperCase()} ${s} ${new Date().getFullYear()} \xA9 ${t.author.name}`,feedLinks:{json:`${r}feed.json`,atom:`${r}feed.atom`,rss:`${r}feed.xml`}},l=await(0,rt.default)(`${e.userRoot}/pages/posts/**/*.md`),c=[];l.forEach(p=>{var ie;let y=V.default.readFileSync(p,"utf-8"),{data:m,content:it,excerpt:lt}=nn(y);if(!m.date)return j.warn(`Do you forget to write date for ${nt(p)}`),!1;if(m.draft)return j.warn(`Ignore draft post: ${nt(p)}`),!1;let at=sn.render(lt||it).replace('src="/',`src="${n}/`);(ie=m.image)!=null&&ie.startsWith("/")&&(m.image=n+m.image),c.push({title:"",...m,id:(m.id||"").toString(),date:new Date(m.date),published:new Date(m.updated||m.date),content:at,author:[o],link:n+p.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}),c.sort((p,y)=>+new Date(y.published||y.date)-+new Date(p.published||p.date)),i.author=o,i.image=t.author.avatar.startsWith("http")?t.author.avatar:`${n}${t.author.avatar}`,i.favicon=`${n}${t.feed.favicon||t.favicon}`;let u=new on(i);c.forEach(p=>u.addItem(p)),await V.default.ensureDir(en(`./dist/${t.feed.name}`));let f="./dist";["xml","atom","json"].forEach(p=>{let y="",m=`${f}/${t.feed.name||"feed"}.${p}`;p==="xml"?y=u.rss2():p==="atom"?(t.feed.name||(m=`${f}/atom.xml`),y=u.atom1()):p==="json"&&(y=u.json1()),V.default.writeFileSync(m,y,"utf-8"),j.info(`${p}: ${m}`)})}var E=cn.scriptName("valaxy").usage("$0 [args]").version(I).showHelpOnFail(!1).alias("h","help").alias("v","version");E.command("* [root]","Start a local server for Valaxy",e=>se(e).option("port",{alias:"p",type:"number",describe:"port"}).option("open",{alias:"o",default:!1,type:"boolean",describe:"open in browser"}).option("remote",{default:!0,type:"boolean",describe:"listen public host and enable remote control"}).option("log",{default:"warn",type:"string",choices:["error","warn","info","silent"],describe:"log level"}).strict().help(),async({root:e,port:t,open:r,remote:n,log:o})=>{ln.existsSync(st.resolve(e,"pages"))||process.exit(0);let s=t||await z(4859),i=await P({userRoot:e}),l={server:{watch:{ignored:[`!${i.themeRoot}/**`,`${i.userRoot}/**.md`]},port:s,strictPort:!0,open:r,host:n?"0.0.0.0":"localhost"},logLevel:o};await F(i,l),K(i,s,n),he([{name:"r",fullName:"restart",action(){F(i,l)}},{name:"o",fullName:"open",action(){un(`http://localhost:${s}`)}},{name:"e",fullName:"edit",action(){an(`code "${e}"`)}}])});E.command("build [root]","build your blog to static content",e=>se(e).option("ssg",{alias:"s",type:"boolean",default:!1,describe:"static site generate"}).option("output",{alias:"o",type:"string",default:"dist",describe:"output dir"}).option("base",{type:"string",default:"/",describe:"output base"}).strict().help(),async({ssg:e,root:t,base:r,output:n})=>{let o=await P({userRoot:t},"build");K(o);let s=await ae(o,{base:r,build:{emptyOutDir:!0,outDir:st.resolve(o.userRoot,n)}},{},"build");if(e){D.info(`use ${fn("vite-ssg")} to do ssg build...`);try{await tt(o,s)}catch(i){D.error("[vite-ssg] An internal error occurred."),console.log(i)}}else D.info("use vite do spa build..."),await et(o,s)});E.command("rss [root]","generate rss feed",e=>se(e).strict().help(),async({root:e})=>{D.info("Generate RSS ...");let t=await P({userRoot:e},"build");await ot(t)});function se(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}Qe(E);function vr(){E.help().parse()}export{vr as run};
|
|
13
|
+
`;function Jt({date:e,title:t,layout:r="post"}){return zt(Xt,{title:t,layout:r,date:e?Ut().format("YYYY-MM-DD hh:mm:ss"):""})}var Qe=e=>{e.command("new <title>","Draft a new post",t=>{t.usage("$0 <title> -p [path] -l [layout]").positional("title",{describe:"The title of the new post",required:!0}).option("path",{alias:"p",type:"string",describe:"the path to generate new post. Customize the path of post to generate"}).option("layout",{alias:"l",type:"string",default:"post"}).option("date",{alias:"d",type:"boolean",describe:"Generate post with the current date"}).strict().help()},async({title:t,path:r,date:n,layout:o})=>{let s=await Xe({title:t,date:n,layout:o,path:r});Qt.success(`[valaxy new]: successfully generated file ${(0,Je.magenta)(s)}}`)})};import{mergeConfig as Ze,build as Zt}from"vite";import{build as en}from"vite-ssg/node";import tn from"vite-ssg-sitemap";async function et(e,t={}){let r=Ze(await G(e,await $("build")),t);await Zt(r)}async function tt(e,t={}){let r=await G(e,await $("build"));r.ssgOptions={script:"async",formatting:"minify",onFinished(){tn({hostname:e.config.url})},dirStyle:"nested"};let n=Ze(r,t);await en({},n)}var rt=Y(ut()),V=Y(ct());import{dirname as nn}from"path";import{cyan as rn,dim as nt}from"kolorist";import on from"gray-matter";import sn from"markdown-it";import{Feed as ln}from"feed";import j from"consola";var an=sn({html:!0,breaks:!0,linkify:!0});async function ot(e){let{config:t}=e;if(!t.url||t.url==="/"){j.error('You must set "config.url" to generate rss.');return}let r=t.url,n=t.url.slice(0,-1),o={name:e.config.author.name,email:e.config.author.email,link:e.config.author.link};j.info(`RSS Site Url: ${rn(r)}`);let s=t.license.type==="zero"?"1.0":"4.0",i={title:t.title,description:t.description,id:r||"valaxy",link:r,copyright:`CC ${t.license.type.toUpperCase()} ${s} ${new Date().getFullYear()} \xA9 ${t.author.name}`,feedLinks:{json:`${r}feed.json`,atom:`${r}feed.atom`,rss:`${r}feed.xml`}},l=await(0,rt.default)(`${e.userRoot}/pages/posts/**/*.md`),c=[];l.forEach(p=>{var ie;let y=V.default.readFileSync(p,"utf-8"),{data:h,content:it,excerpt:lt}=on(y);if(!h.date)return j.warn(`Do you forget to write date for ${nt(p)}`),!1;if(h.draft)return j.warn(`Ignore draft post: ${nt(p)}`),!1;let at=an.render(lt||it).replace('src="/',`src="${n}/`);(ie=h.image)!=null&&ie.startsWith("/")&&(h.image=n+h.image),c.push({title:"",...h,id:(h.id||"").toString(),date:new Date(h.date),published:new Date(h.updated||h.date),content:at,author:[o],link:n+p.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}),c.sort((p,y)=>+new Date(y.published||y.date)-+new Date(p.published||p.date)),i.author=o,i.image=t.author.avatar.startsWith("http")?t.author.avatar:`${n}${t.author.avatar}`,i.favicon=`${n}${t.feed.favicon||t.favicon}`;let u=new ln(i);c.forEach(p=>u.addItem(p)),await V.default.ensureDir(nn(`./dist/${t.feed.name}`));let f="./dist";["xml","atom","json"].forEach(p=>{let y="",h=`${f}/${t.feed.name||"feed"}.${p}`;p==="xml"?y=u.rss2():p==="atom"?(t.feed.name||(h=`${f}/atom.xml`),y=u.atom1()):p==="json"&&(y=u.json1()),V.default.writeFileSync(h,y,"utf-8"),j.info(`${p}: ${h}`)})}var E=fn.scriptName("valaxy").usage("$0 [args]").version(I).showHelpOnFail(!1).alias("h","help").alias("v","version");E.command("* [root]","Start a local server for Valaxy",e=>se(e).option("port",{alias:"p",type:"number",describe:"port"}).option("open",{alias:"o",default:!1,type:"boolean",describe:"open in browser"}).option("remote",{default:!0,type:"boolean",describe:"listen public host and enable remote control"}).option("log",{default:"warn",type:"string",choices:["error","warn","info","silent"],describe:"log level"}).strict().help(),async({root:e,port:t,open:r,remote:n,log:o})=>{cn.existsSync(st.resolve(e,"pages"))||process.exit(0);let s=t||await z(4859),i=await P({userRoot:e}),l={server:{watch:{ignored:[`!${i.themeRoot}/**`,`${i.userRoot}/**.md`]},port:s,strictPort:!0,open:r,host:n?"0.0.0.0":"localhost"},logLevel:o};await F(i,l),K(i,s,n),me([{name:"r",fullName:"restart",action(){F(i,l)}},{name:"o",fullName:"open",action(){dn(`http://localhost:${s}`)}},{name:"e",fullName:"edit",action(){un(`code "${e}"`)}}])});E.command("build [root]","build your blog to static content",e=>se(e).option("ssg",{alias:"s",type:"boolean",default:!1,describe:"static site generate"}).option("output",{alias:"o",type:"string",default:"dist",describe:"output dir"}).option("base",{type:"string",default:"/",describe:"output base"}).strict().help(),async({ssg:e,root:t,base:r,output:n})=>{let o=await P({userRoot:t},"build");K(o);let s=await ae(o,{base:r,build:{emptyOutDir:!0,outDir:st.resolve(o.userRoot,n)}},{},"build");if(e){D.info(`use ${pn("vite-ssg")} to do ssg build...`);try{await tt(o,s)}catch(i){D.error("[vite-ssg] An internal error occurred."),console.log(i)}}else D.info("use vite do spa build..."),await et(o,s)});E.command("rss [root]","generate rss feed",e=>se(e).strict().help(),async({root:e})=>{D.info("Generate RSS ...");let t=await P({userRoot:e},"build");await ot(t)});function se(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}Qe(E);function kr(){E.help().parse()}export{kr as run};
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { U as UserConfig, V as ValaxyConfig, a as ValaxyEntryOptions, b as ValaxyThemeConfig, R as ResolvedValaxyOptions, c as ValaxyServerOptions } from '../index-
|
|
2
|
-
export { R as ResolvedValaxyOptions, a as ValaxyEntryOptions, d as ValaxyPluginOptions, c as ValaxyServerOptions, g as getThemeRoot, i as isPath, r as resolveOptions, e as resolvePluginOptions } from '../index-
|
|
3
|
-
import * as type_fest_source_partial_deep from 'type-fest/source/partial-deep';
|
|
1
|
+
import { U as UserConfig, P as PartialDeep, V as ValaxyConfig, a as ValaxyEntryOptions, b as ValaxyThemeConfig, R as ResolvedValaxyOptions, c as ValaxyServerOptions } from '../index-328992a1.js';
|
|
2
|
+
export { R as ResolvedValaxyOptions, a as ValaxyEntryOptions, d as ValaxyPluginOptions, c as ValaxyServerOptions, g as getThemeRoot, i as isPath, r as resolveOptions, e as resolvePluginOptions } from '../index-328992a1.js';
|
|
4
3
|
import * as vite from 'vite';
|
|
5
4
|
import { InlineConfig } from 'vite';
|
|
6
5
|
import 'vite-ssg';
|
|
7
6
|
import '@vitejs/plugin-vue';
|
|
8
7
|
import 'unplugin-vue-components/vite';
|
|
9
8
|
import 'unocss/vite';
|
|
10
|
-
import 'type-fest';
|
|
11
9
|
import 'markdown-it';
|
|
12
10
|
import 'shiki';
|
|
13
11
|
import 'markdown-it-anchor';
|
|
@@ -16,11 +14,11 @@ import 'katex';
|
|
|
16
14
|
/**
|
|
17
15
|
* Type config helper
|
|
18
16
|
*/
|
|
19
|
-
declare function defineConfig<ThemeConfig>(config: UserConfig<ThemeConfig>):
|
|
17
|
+
declare function defineConfig<ThemeConfig>(config: UserConfig<ThemeConfig>): PartialDeep<ValaxyConfig<ThemeConfig>>;
|
|
20
18
|
/**
|
|
21
19
|
* Type config helper for custom theme config
|
|
22
20
|
*/
|
|
23
|
-
declare function defineConfigWithTheme<ThemeConfig>(config: UserConfig<ThemeConfig>):
|
|
21
|
+
declare function defineConfigWithTheme<ThemeConfig>(config: UserConfig<ThemeConfig>): PartialDeep<ValaxyConfig<ThemeConfig>>;
|
|
24
22
|
declare function resolveConfig(options?: ValaxyEntryOptions): Promise<{
|
|
25
23
|
config: ValaxyConfig<ValaxyThemeConfig>;
|
|
26
24
|
configFile: string;
|
package/dist/node/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-KP3MIFG6.js');var _chunkEYC2AAUGjs = require('../chunk-EYC2AAUG.js');exports.createServer = _chunkEYC2AAUGjs.p; exports.defineConfig = _chunkEYC2AAUGjs.e; exports.defineConfigWithTheme = _chunkEYC2AAUGjs.f; exports.getThemeRoot = _chunkEYC2AAUGjs.j; exports.isPath = _chunkEYC2AAUGjs.i; exports.resolveConfig = _chunkEYC2AAUGjs.g; exports.resolveOptions = _chunkEYC2AAUGjs.k; exports.resolvePluginOptions = _chunkEYC2AAUGjs.l;
|
package/dist/node/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as
|
|
1
|
+
import"../chunk-4FKSRP5I.mjs";import{e as a,f as b,g as c,i as d,j as e,k as f,l as g,p as h}from"../chunk-EIYDDCHI.mjs";export{h as createServer,a as defineConfig,b as defineConfigWithTheme,e as getThemeRoot,d as isPath,c as resolveConfig,f as resolveOptions,g as resolvePluginOptions};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import 'vite-ssg';
|
|
2
|
-
export { A as AlgoliaSearchOptions,
|
|
2
|
+
export { A as AlgoliaSearchOptions, k as HeadConfig, H as Header, h as PageData, j as PageDataPayload, P as PartialDeep, f as Post, S as SocialLink, U as UserConfig, V as ValaxyConfig, b as ValaxyThemeConfig } from '../index-328992a1.js';
|
|
3
3
|
import '@vitejs/plugin-vue';
|
|
4
4
|
import 'unplugin-vue-components/vite';
|
|
5
5
|
import 'unocss/vite';
|
|
6
|
-
import 'type-fest';
|
|
7
6
|
import 'markdown-it';
|
|
8
7
|
import 'shiki';
|
|
9
8
|
import 'markdown-it-anchor';
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";require('../chunk-2QVEQP3K.js');
|
package/dist/types/index.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunk-IMWNMHRD.mjs";
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// re-export @vueuse/shared types. with strict installers like pnpm, user won't
|
|
2
|
-
// be able to reference
|
|
2
|
+
// be able to reference @vueuse/shared in project root.
|
|
3
3
|
/// <reference types="@vueuse/shared" />
|
|
4
4
|
|
|
5
5
|
export * from './client/index'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "me@yunyoujun.cn",
|
|
@@ -22,11 +22,13 @@
|
|
|
22
22
|
"import": "./dist/node/index.mjs"
|
|
23
23
|
},
|
|
24
24
|
"./client/*": "./client/*",
|
|
25
|
+
"./client": "./dist/client/index.d.ts",
|
|
25
26
|
"./node": {
|
|
26
27
|
"types": "./dist/node/index.d.ts",
|
|
27
28
|
"require": "./dist/node/index.js",
|
|
28
29
|
"import": "./dist/node/index.mjs"
|
|
29
30
|
},
|
|
31
|
+
"./types": "./dist/types/index.d.ts",
|
|
30
32
|
"./*": "./*"
|
|
31
33
|
},
|
|
32
34
|
"main": "dist/node/index.js",
|
|
@@ -48,8 +50,6 @@
|
|
|
48
50
|
"dependencies": {
|
|
49
51
|
"@antfu/utils": "^0.5.2",
|
|
50
52
|
"@ctrl/tinycolor": "^3.4.1",
|
|
51
|
-
"@docsearch/css": "^3.1.1",
|
|
52
|
-
"@docsearch/js": "^3.1.1",
|
|
53
53
|
"@iconify-json/carbon": "^1.1.6",
|
|
54
54
|
"@iconify-json/ri": "^1.1.3",
|
|
55
55
|
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"critters": "^0.0.16",
|
|
61
61
|
"cross-spawn": "^7.0.3",
|
|
62
62
|
"dayjs": "^1.11.3",
|
|
63
|
+
"ejs": "^3.1.8",
|
|
63
64
|
"escape-html": "^1.0.3",
|
|
64
65
|
"feed": "^4.2.2",
|
|
65
66
|
"global-dirs": "^3.0.0",
|
|
@@ -98,15 +99,15 @@
|
|
|
98
99
|
},
|
|
99
100
|
"devDependencies": {
|
|
100
101
|
"@types/cross-spawn": "^6.0.2",
|
|
102
|
+
"@types/ejs": "^3.1.1",
|
|
101
103
|
"@types/katex": "^0.14.0",
|
|
102
|
-
"@types/
|
|
104
|
+
"@types/markdown-it": "^12.2.3",
|
|
103
105
|
"@types/markdown-it-link-attributes": "^3.0.1",
|
|
104
106
|
"@types/nprogress": "^0.2.0",
|
|
105
107
|
"@types/yargs": "^17.0.10",
|
|
106
108
|
"debug": "^4.3.4",
|
|
107
109
|
"diacritics": "^1.3.0",
|
|
108
|
-
"https-localhost": "^4.7.1"
|
|
109
|
-
"type-fest": "^2.16.0"
|
|
110
|
+
"https-localhost": "^4.7.1"
|
|
110
111
|
},
|
|
111
112
|
"scripts": {
|
|
112
113
|
"build": "rimraf dist && tsup --splitting",
|
package/client/shims.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import 'vue-router'
|
|
2
|
-
|
|
3
|
-
import type { Post } from 'valaxy'
|
|
4
|
-
import type { Header } from '../node/markdown'
|
|
5
|
-
|
|
6
|
-
// markdowns can be treat as Vue components
|
|
7
|
-
declare module '*.md' {
|
|
8
|
-
import type { DefineComponent } from 'vue'
|
|
9
|
-
const component: DefineComponent<{}, {}, any>
|
|
10
|
-
export default component
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare module '*.vue' {
|
|
14
|
-
import type { DefineComponent } from 'vue'
|
|
15
|
-
const component: DefineComponent<{}, {}, any>
|
|
16
|
-
export default component
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// vite hmr data
|
|
20
|
-
declare module '/@valaxyjs/config' {
|
|
21
|
-
// import type { ValaxyConfig } from 'valaxy'
|
|
22
|
-
const config: string
|
|
23
|
-
export default config
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare module '/@valaxyjs/context' {
|
|
27
|
-
const ctx: string
|
|
28
|
-
export default ctx
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare module '/@valaxyjs/locales' {
|
|
32
|
-
const messages: {}
|
|
33
|
-
export default messages
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
declare module 'vue-router' {
|
|
37
|
-
interface RouteMeta {
|
|
38
|
-
headers: Header[]
|
|
39
|
-
frontmatter: Post
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|