🌟构建了简易的blog

This commit is contained in:
Falck
2026-04-10 20:00:25 +08:00
parent 4eaf10e753
commit c38d2f66d1
238 changed files with 30052 additions and 11 deletions

View File

@@ -0,0 +1 @@
function o(){return o=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(s[e]=r[e])}return s},o.apply(this,arguments)}const d=s=>String(s).split(".").map(t=>String(parseInt(t||"0",10))).concat(["0","0"]).slice(0,3).join(".");class y{constructor(){this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}mount(){}unmount(){this.handlersToUnregister.forEach(t=>t()),this.handlersToUnregister=[]}_beforeMount(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}_afterUnmount(){}_checkRequirements(){return typeof this.requires!="object"||Object.entries(this.requires).forEach(([t,r])=>{if(!(function(e,i,u){const g=(function(a,h){var c;if(a==="swup")return(c=h.version)!=null?c:"";{var l;const p=h.findPlugin(a);return(l=p?.version)!=null?l:""}})(e,u);return!!g&&((a,h)=>h.every(c=>{const[,l,p]=c.match(/^([\D]+)?(.*)$/)||[];var m,f;return((w,b)=>{const v={"":n=>n===0,">":n=>n>0,">=":n=>n>=0,"<":n=>n<0,"<=":n=>n<=0};return(v[b]||v[""])(w)})((f=p,m=d(m=a),f=d(f),m.localeCompare(f,void 0,{numeric:!0})),l||">=")}))(g,i)})(t,r=Array.isArray(r)?r:[r],this.swup)){const e=`${t} ${r.join(", ")}`;throw new Error(`Plugin version mismatch: ${this.name} requires ${e}`)}}),!0}on(t,r,e={}){var i;r=!(i=r).name.startsWith("bound ")||i.hasOwnProperty("prototype")?r.bind(this):r;const u=this.swup.hooks.on(t,r,e);return this.handlersToUnregister.push(u),u}once(t,r,e={}){return this.on(t,r,o({},e,{once:!0}))}before(t,r,e={}){return this.on(t,r,o({},e,{before:!0}))}replace(t,r,e={}){return this.on(t,r,o({},e,{replace:!0}))}off(t,r){return this.swup.hooks.off(t,r)}}export{y as e};