diff --git a/assets/index.6f503a8c.js b/assets/index.a832551e.js similarity index 99% rename from assets/index.6f503a8c.js rename to assets/index.a832551e.js index 6167ee9f..acb1999d 100644 --- a/assets/index.6f503a8c.js +++ b/assets/index.a832551e.js @@ -43,4 +43,4 @@ Error generating stack: `+i.message+` * @author Feross Aboukhadijeh * @license MIT */var ih=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)},oh=df,uh=ih,yn=Object.prototype.toString;function pf(e){return yn.call(e)==="[object Array]"}function sh(e){return yn.call(e)==="[object ArrayBuffer]"}function ah(e){return typeof FormData<"u"&&e instanceof FormData}function ch(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function fh(e){return typeof e=="string"}function dh(e){return typeof e=="number"}function ph(e){return typeof e>"u"}function hf(e){return e!==null&&typeof e=="object"}function hh(e){return yn.call(e)==="[object Date]"}function mh(e){return yn.call(e)==="[object File]"}function vh(e){return yn.call(e)==="[object Blob]"}function mf(e){return yn.call(e)==="[object Function]"}function yh(e){return hf(e)&&mf(e.pipe)}function gh(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function wh(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function Eh(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Dl(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),pf(e))for(var n=0,r=e.length;n"u"||($t.isArray(s)?c=c+"[]":s=[s],$t.forEach(s,function(h){$t.isDate(h)?h=h.toISOString():$t.isObject(h)&&(h=JSON.stringify(h)),i.push(Fs(c)+"="+Fs(h))}))}),l=i.join("&")}if(l){var o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t},kh=ke;function Ol(){this.handlers=[]}Ol.prototype.use=function(t,n){return this.handlers.push({fulfilled:t,rejected:n}),this.handlers.length-1};Ol.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};Ol.prototype.forEach=function(t){kh.forEach(this.handlers,function(r){r!==null&&t(r)})};var Ch=Ol,xh=ke,Nh=function(t,n,r){return xh.forEach(r,function(i){t=i(t,n)}),t},pi,Ds;function gf(){return Ds||(Ds=1,pi=function(t){return!!(t&&t.__CANCEL__)}),pi}var _h=ke,Ph=function(t,n){_h.forEach(t,function(l,i){i!==n&&i.toUpperCase()===n.toUpperCase()&&(t[n]=l,delete t[i])})},hi,Os;function Th(){return Os||(Os=1,hi=function(t,n,r,l,i){return t.config=n,r&&(t.code=r),t.request=l,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}),hi}var mi,As;function wf(){if(As)return mi;As=1;var e=Th();return mi=function(n,r,l,i,o){var u=new Error(n);return e(u,r,l,i,o)},mi}var vi,Ms;function Lh(){if(Ms)return vi;Ms=1;var e=wf();return vi=function(n,r,l){var i=l.config.validateStatus;!i||i(l.status)?n(l):r(e("Request failed with status code "+l.status,l.config,null,l.request,l))},vi}var yi,Is;function Rh(){if(Is)return yi;Is=1;var e=ke,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return yi=function(r){var l={},i,o,u;return r&&e.forEach(r.split(` -`),function(c){if(u=c.indexOf(":"),i=e.trim(c.substr(0,u)).toLowerCase(),o=e.trim(c.substr(u+1)),i){if(l[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?l[i]=(l[i]?l[i]:[]).concat([o]):l[i]=l[i]?l[i]+", "+o:o}}),l},yi}var gi,Us;function zh(){if(Us)return gi;Us=1;var e=ke;return gi=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),l;function i(o){var u=o;return n&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return l=i(window.location.href),function(u){var s=e.isString(u)?i(u):u;return s.protocol===l.protocol&&s.host===l.host}}():function(){return function(){return!0}}(),gi}var wi,js;function Fh(){if(js)return wi;js=1;var e=ke;return wi=e.isStandardBrowserEnv()?function(){return{write:function(r,l,i,o,u,s){var c=[];c.push(r+"="+encodeURIComponent(l)),e.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),e.isString(o)&&c.push("path="+o),e.isString(u)&&c.push("domain="+u),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var l=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return l?decodeURIComponent(l[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),wi}var Ei,Bs;function $s(){if(Bs)return Ei;Bs=1;var e=ke,t=Lh(),n=yf,r=Rh(),l=zh(),i=wf();return Ei=function(u){return new Promise(function(c,m){var h=u.data,p=u.headers;e.isFormData(h)&&delete p["Content-Type"];var v=new XMLHttpRequest;if(u.auth){var w=u.auth.username||"",E=u.auth.password||"";p.Authorization="Basic "+btoa(w+":"+E)}if(v.open(u.method.toUpperCase(),n(u.url,u.params,u.paramsSerializer),!0),v.timeout=u.timeout,v.onreadystatechange=function(){if(!(!v||v.readyState!==4)&&!(v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0))){var d="getAllResponseHeaders"in v?r(v.getAllResponseHeaders()):null,y=!u.responseType||u.responseType==="text"?v.responseText:v.response,S={data:y,status:v.status,statusText:v.statusText,headers:d,config:u,request:v};t(c,m,S),v=null}},v.onabort=function(){!v||(m(i("Request aborted",u,"ECONNABORTED",v)),v=null)},v.onerror=function(){m(i("Network Error",u,null,v)),v=null},v.ontimeout=function(){m(i("timeout of "+u.timeout+"ms exceeded",u,"ECONNABORTED",v)),v=null},e.isStandardBrowserEnv()){var O=Fh(),f=(u.withCredentials||l(u.url))&&u.xsrfCookieName?O.read(u.xsrfCookieName):void 0;f&&(p[u.xsrfHeaderName]=f)}if("setRequestHeader"in v&&e.forEach(p,function(d,y){typeof h>"u"&&y.toLowerCase()==="content-type"?delete p[y]:v.setRequestHeader(y,d)}),u.withCredentials&&(v.withCredentials=!0),u.responseType)try{v.responseType=u.responseType}catch(a){if(u.responseType!=="json")throw a}typeof u.onDownloadProgress=="function"&&v.addEventListener("progress",u.onDownloadProgress),typeof u.onUploadProgress=="function"&&v.upload&&v.upload.addEventListener("progress",u.onUploadProgress),u.cancelToken&&u.cancelToken.promise.then(function(d){!v||(v.abort(),m(d),v=null)}),h===void 0&&(h=null),v.send(h)})},Ei}var ae=ke,Hs=Ph,Dh={"Content-Type":"application/x-www-form-urlencoded"};function Vs(e,t){!ae.isUndefined(e)&&ae.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function Oh(){var e;return(typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"||typeof XMLHttpRequest<"u")&&(e=$s()),e}var Al={adapter:Oh(),transformRequest:[function(t,n){return Hs(n,"Accept"),Hs(n,"Content-Type"),ae.isFormData(t)||ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t)?t:ae.isArrayBufferView(t)?t.buffer:ae.isURLSearchParams(t)?(Vs(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):ae.isObject(t)?(Vs(n,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if(typeof t=="string")try{t=JSON.parse(t)}catch{}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};Al.headers={common:{Accept:"application/json, text/plain, */*"}};ae.forEach(["delete","get","head"],function(t){Al.headers[t]={}});ae.forEach(["post","put","patch"],function(t){Al.headers[t]=ae.merge(Dh)});var Ef=Al,Ah=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)},Mh=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t},Ws=ke,Si=Nh,Ih=gf(),Uh=Ef,jh=Ah,Bh=Mh;function ki(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var $h=function(t){ki(t),t.baseURL&&!jh(t.url)&&(t.url=Bh(t.baseURL,t.url)),t.headers=t.headers||{},t.data=Si(t.data,t.headers,t.transformRequest),t.headers=Ws.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),Ws.forEach(["delete","get","head","post","put","patch","common"],function(l){delete t.headers[l]});var n=t.adapter||Uh.adapter;return n(t).then(function(l){return ki(t),l.data=Si(l.data,l.headers,t.transformResponse),l},function(l){return Ih(l)||(ki(t),l&&l.response&&(l.response.data=Si(l.response.data,l.response.headers,t.transformResponse))),Promise.reject(l)})},kt=ke,Sf=function(t,n){n=n||{};var r={};return kt.forEach(["url","method","params","data"],function(i){typeof n[i]<"u"&&(r[i]=n[i])}),kt.forEach(["headers","auth","proxy"],function(i){kt.isObject(n[i])?r[i]=kt.deepMerge(t[i],n[i]):typeof n[i]<"u"?r[i]=n[i]:kt.isObject(t[i])?r[i]=kt.deepMerge(t[i]):typeof t[i]<"u"&&(r[i]=t[i])}),kt.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(i){typeof n[i]<"u"?r[i]=n[i]:typeof t[i]<"u"&&(r[i]=t[i])}),r},vl=ke,Hh=yf,Qs=Ch,Vh=$h,kf=Sf;function dr(e){this.defaults=e,this.interceptors={request:new Qs,response:new Qs}}dr.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=kf(this.defaults,t),t.method=t.method?t.method.toLowerCase():"get";var n=[Vh,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach(function(i){n.unshift(i.fulfilled,i.rejected)}),this.interceptors.response.forEach(function(i){n.push(i.fulfilled,i.rejected)});n.length;)r=r.then(n.shift(),n.shift());return r};dr.prototype.getUri=function(t){return t=kf(this.defaults,t),Hh(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};vl.forEach(["delete","get","head","options"],function(t){dr.prototype[t]=function(n,r){return this.request(vl.merge(r||{},{method:t,url:n}))}});vl.forEach(["post","put","patch"],function(t){dr.prototype[t]=function(n,r,l){return this.request(vl.merge(l||{},{method:t,url:n,data:r}))}});var Wh=dr,Ci,Ks;function Cf(){if(Ks)return Ci;Ks=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,Ci=e,Ci}var xi,Xs;function Qh(){if(Xs)return xi;Xs=1;var e=Cf();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(o){r=o});var l=this;n(function(o){l.reason||(l.reason=new e(o),r(l.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var r,l=new t(function(o){r=o});return{token:l,cancel:r}},xi=t,xi}var Ni,Ys;function Kh(){return Ys||(Ys=1,Ni=function(t){return function(r){return t.apply(null,r)}}),Ni}var qs=ke,Xh=df,Qr=Wh,Yh=Sf,qh=Ef;function xf(e){var t=new Qr(e),n=Xh(Qr.prototype.request,t);return qs.extend(n,Qr.prototype,t),qs.extend(n,t),n}var He=xf(qh);He.Axios=Qr;He.create=function(t){return xf(Yh(He.defaults,t))};He.Cancel=Cf();He.CancelToken=Qh();He.isCancel=gf();He.all=function(t){return Promise.all(t)};He.spread=Kh();wu.exports=He;wu.exports.default=He;(function(e){e.exports=wu.exports})(ff);const Gs=ko(ff.exports);class Gh extends or.exports.Component{constructor(){super(...arguments);jl(this,"state",{showThankList:!1,config:{downloadUrl:"https://github.com/YaoZeyuan/stablog#%E8%BD%AF%E4%BB%B6%E4%B8%8B%E8%BD%BD",releaseAt:"2019\u5E7410\u670822\u65E5",releaseNote:"\u7A33\u90E8\u843D1.1.0, \u95EA\u4EAE\u53D1\u5E03.",version:1.1,detail:{windows:{version:1.1,url:"http://stablog.bookflaneur.cn/%E7%A8%B3%E9%83%A8%E8%90%BD%20Setup%201.1.0.exe"},mac:{version:1.1,url:"http://stablog.bookflaneur.cn/%E7%A8%B3%E9%83%A8%E8%90%BD-1.1.0.dmg"}}},thankList:[{reason:"*\u660E\u660E\u6350\u52A9\u4E8625\u5143",time:"2019-10-14 21:34"}]});jl(this,"toggleThankList",()=>{this.setState({showThankList:!this.state.showThankList})})}async componentDidMount(){let n=await Gs.get("https://api.yaozeyuan.online/stablog/version"),r=await Gs.get("https://api.yaozeyuan.online/stablog/thank_you/list"),l=n.data,i=r.data;this.setState({config:l,thankList:i})}render(){var u,s,c;const{config:n,thankList:r,showThankList:l}=this.state;let i=[],o=0;for(let m of r){let h=o,p=me("div",{className:"thank-list-item",children:[F("div",{className:"thank-list-item-time",children:m.time}),F("div",{className:"thank-list-item-reason",children:m.reason})]},h);i.push(p),o++}return console.log("showThankList =>",l),me("div",{className:"Home",children:[F("div",{className:"body",children:me("div",{className:"container",children:[F("div",{className:"title",children:"\u7A33\u90E8\u843D"}),F("div",{className:"slogan",children:"\u4E13\u4E1A\u5907\u4EFD\u5BFC\u51FA\u5FAE\u535A\u8BB0\u5F55"}),F("div",{className:"version",children:"---\u9879\u76EE\u539F\u7406---"}),F("div",{className:"desc",children:"\u8F6F\u4EF6\u672C\u8EAB\u5C31\u662F\u4E00\u4E2A\u5185\u7F6E\u4E86\u5FAE\u535A\u7684\u79FB\u52A8\u7248\u9875\u9762\u7684\u6D4F\u89C8\u5668"}),me("div",{className:"desc",children:["\u5728\u8F6F\u4EF6\u5185\u767B\u5F55\xA0",F("a",{href:"https://m.weibo.cn",target:"_blank",children:"m.weibo.cn"}),"\xA0\u540E"]}),F("div",{className:"desc",children:"\u8F6F\u4EF6\u6A21\u62DF\u6D4F\u89C8\u5668, \u81EA\u52A8\u6D4F\u89C8\u767B\u5F55\u7528\u6237\u53D1\u5E03\u7684\u6240\u6709\u5FAE\u535A, \u5E76\u8BB0\u5F55\u5230\u6570\u636E\u5E93\u91CC"}),F("div",{className:"desc",children:"\u8BBF\u95EE\u5B8C\u6BD5\u540E\u5C06\u6BCF\u6761\u5FAE\u535A\u622A\u5C4F\u6210\u56FE\u7247, \u7801\u5728pdf\u4E2D, \u5373\u4E3A\u5907\u4EFD."}),F("div",{className:"desc",children:"(\u4E3A\u65B9\u4FBF\u67E5\u627E, \u5728\u6BCF\u4E2A\u56FE\u7247\u524D\u52A0\u4E0A\u4E86\u5FAE\u535A\u7684\u6587\u5B57\u7248, \u8FD9\u6837pdf\u91CC\u4E00\u641C\u5C31\u80FD\u641C\u5230\u5BF9\u5E94\u5FAE\u535A\u6240\u5728\u4F4D\u7F6E)"}),me("div",{className:"desc",children:["\u6240\u4EE5, \u5373\u4F7F\u70B8\u53F7, \u53EA\u8981\u767B\u5F55\xA0",F("a",{href:"https://m.weibo.cn",target:"_blank",children:"m.weibo.cn"}),"\xA0 \u540E\u8FD8\u80FD\u770B\u89C1\u81EA\u5DF1\u7684\u5FAE\u535A,\u5C31\u53EF\u4EE5\u5907\u4EFD"]}),me("div",{className:"desc",children:["(\u53CD\u8FC7\u6765, \u5982\u679C",F("a",{href:"https://m.weibo.cn",target:"_blank",children:"m.weibo.cn"}),"\u90FD\u767B\u5F55\u4E0D\u4E86, \u5C31\u6CA1\u529E\u6CD5\u4E86)"]}),F("div",{className:"desc"}),me("div",{className:"version",children:["---\u6700\u65B0\u7248\u672C\uFF1Av",`${n.version}`.padEnd(3,".0"),"---"]}),F("div",{className:"logo",children:F("img",{src:"https://mirror-4-web.bookflaneur.cn/https://tva1.sinaimg.cn/large/007Yq4pTly1h4rkzfkfx5j3074074ab5.jpg",alt:"logo"})}),me("div",{className:"download-container",children:[F("div",{className:"download-tip",children:"\u4E0B\u8F7D"}),me("div",{className:"action-line",children:[me("a",{className:"download-button",target:"_blank",href:n.detail.windows.url,children:[F("img",{className:"download-button-icon",src:Qp}),"Windows\u7248(",n.detail.windows.version,")"]}),me("a",{className:"download-button",target:"_blank",href:(s=(u=n.detail)==null?void 0:u.mac)==null?void 0:s.url,children:[F("img",{className:"download-button-icon",src:Kp}),"Mac\u7248(",(c=n.detail)==null?void 0:c.mac.version,")"]})]})]})]})}),me("div",{className:"footer",children:[me("div",{className:"comment",children:[F("a",{className:"tip",href:"https://github.com/YaoZeyuan/stablog",target:"_blank",children:"\u4F7F\u7528\u6307\u5357"}),F("p",{className:"tip",onClick:this.toggleThankList,children:"\u81F4\u8C22\u5217\u8868"}),F("a",{className:"tip",href:"https://github.com/YaoZeyuan/stablog/issues",target:"_blank",children:"\u529F\u80FD\u5EFA\u8BAE"})]}),F(lh,{in:this.state.showThankList,timeout:300,classNames:"fade",unmountOnExit:!0,children:F("div",{className:"thank-list",children:i})})]}),F("a",{href:"https://github.com/YaoZeyuan/stablog",className:"fork-me-on-github",target:"_blank",children:F("img",{width:"149px",height:"149px",src:"https://cdn.jsdelivr.net/gh/YaoZeyuan/blog@master/source/static/img/fork_me_on_github_right_green.png",alt:"Fork me on GitHub"})})]})}}Boolean(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Zh(){"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(e=>{e.unregister()})}uf.render(F(Gh,{}),document.getElementById("root"));Zh(); +`),function(c){if(u=c.indexOf(":"),i=e.trim(c.substr(0,u)).toLowerCase(),o=e.trim(c.substr(u+1)),i){if(l[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?l[i]=(l[i]?l[i]:[]).concat([o]):l[i]=l[i]?l[i]+", "+o:o}}),l},yi}var gi,Us;function zh(){if(Us)return gi;Us=1;var e=ke;return gi=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),l;function i(o){var u=o;return n&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return l=i(window.location.href),function(u){var s=e.isString(u)?i(u):u;return s.protocol===l.protocol&&s.host===l.host}}():function(){return function(){return!0}}(),gi}var wi,js;function Fh(){if(js)return wi;js=1;var e=ke;return wi=e.isStandardBrowserEnv()?function(){return{write:function(r,l,i,o,u,s){var c=[];c.push(r+"="+encodeURIComponent(l)),e.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),e.isString(o)&&c.push("path="+o),e.isString(u)&&c.push("domain="+u),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var l=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return l?decodeURIComponent(l[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),wi}var Ei,Bs;function $s(){if(Bs)return Ei;Bs=1;var e=ke,t=Lh(),n=yf,r=Rh(),l=zh(),i=wf();return Ei=function(u){return new Promise(function(c,m){var h=u.data,p=u.headers;e.isFormData(h)&&delete p["Content-Type"];var v=new XMLHttpRequest;if(u.auth){var w=u.auth.username||"",E=u.auth.password||"";p.Authorization="Basic "+btoa(w+":"+E)}if(v.open(u.method.toUpperCase(),n(u.url,u.params,u.paramsSerializer),!0),v.timeout=u.timeout,v.onreadystatechange=function(){if(!(!v||v.readyState!==4)&&!(v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0))){var d="getAllResponseHeaders"in v?r(v.getAllResponseHeaders()):null,y=!u.responseType||u.responseType==="text"?v.responseText:v.response,S={data:y,status:v.status,statusText:v.statusText,headers:d,config:u,request:v};t(c,m,S),v=null}},v.onabort=function(){!v||(m(i("Request aborted",u,"ECONNABORTED",v)),v=null)},v.onerror=function(){m(i("Network Error",u,null,v)),v=null},v.ontimeout=function(){m(i("timeout of "+u.timeout+"ms exceeded",u,"ECONNABORTED",v)),v=null},e.isStandardBrowserEnv()){var O=Fh(),f=(u.withCredentials||l(u.url))&&u.xsrfCookieName?O.read(u.xsrfCookieName):void 0;f&&(p[u.xsrfHeaderName]=f)}if("setRequestHeader"in v&&e.forEach(p,function(d,y){typeof h>"u"&&y.toLowerCase()==="content-type"?delete p[y]:v.setRequestHeader(y,d)}),u.withCredentials&&(v.withCredentials=!0),u.responseType)try{v.responseType=u.responseType}catch(a){if(u.responseType!=="json")throw a}typeof u.onDownloadProgress=="function"&&v.addEventListener("progress",u.onDownloadProgress),typeof u.onUploadProgress=="function"&&v.upload&&v.upload.addEventListener("progress",u.onUploadProgress),u.cancelToken&&u.cancelToken.promise.then(function(d){!v||(v.abort(),m(d),v=null)}),h===void 0&&(h=null),v.send(h)})},Ei}var ae=ke,Hs=Ph,Dh={"Content-Type":"application/x-www-form-urlencoded"};function Vs(e,t){!ae.isUndefined(e)&&ae.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function Oh(){var e;return(typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"||typeof XMLHttpRequest<"u")&&(e=$s()),e}var Al={adapter:Oh(),transformRequest:[function(t,n){return Hs(n,"Accept"),Hs(n,"Content-Type"),ae.isFormData(t)||ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t)?t:ae.isArrayBufferView(t)?t.buffer:ae.isURLSearchParams(t)?(Vs(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):ae.isObject(t)?(Vs(n,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if(typeof t=="string")try{t=JSON.parse(t)}catch{}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};Al.headers={common:{Accept:"application/json, text/plain, */*"}};ae.forEach(["delete","get","head"],function(t){Al.headers[t]={}});ae.forEach(["post","put","patch"],function(t){Al.headers[t]=ae.merge(Dh)});var Ef=Al,Ah=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)},Mh=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t},Ws=ke,Si=Nh,Ih=gf(),Uh=Ef,jh=Ah,Bh=Mh;function ki(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var $h=function(t){ki(t),t.baseURL&&!jh(t.url)&&(t.url=Bh(t.baseURL,t.url)),t.headers=t.headers||{},t.data=Si(t.data,t.headers,t.transformRequest),t.headers=Ws.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),Ws.forEach(["delete","get","head","post","put","patch","common"],function(l){delete t.headers[l]});var n=t.adapter||Uh.adapter;return n(t).then(function(l){return ki(t),l.data=Si(l.data,l.headers,t.transformResponse),l},function(l){return Ih(l)||(ki(t),l&&l.response&&(l.response.data=Si(l.response.data,l.response.headers,t.transformResponse))),Promise.reject(l)})},kt=ke,Sf=function(t,n){n=n||{};var r={};return kt.forEach(["url","method","params","data"],function(i){typeof n[i]<"u"&&(r[i]=n[i])}),kt.forEach(["headers","auth","proxy"],function(i){kt.isObject(n[i])?r[i]=kt.deepMerge(t[i],n[i]):typeof n[i]<"u"?r[i]=n[i]:kt.isObject(t[i])?r[i]=kt.deepMerge(t[i]):typeof t[i]<"u"&&(r[i]=t[i])}),kt.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(i){typeof n[i]<"u"?r[i]=n[i]:typeof t[i]<"u"&&(r[i]=t[i])}),r},vl=ke,Hh=yf,Qs=Ch,Vh=$h,kf=Sf;function dr(e){this.defaults=e,this.interceptors={request:new Qs,response:new Qs}}dr.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=kf(this.defaults,t),t.method=t.method?t.method.toLowerCase():"get";var n=[Vh,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach(function(i){n.unshift(i.fulfilled,i.rejected)}),this.interceptors.response.forEach(function(i){n.push(i.fulfilled,i.rejected)});n.length;)r=r.then(n.shift(),n.shift());return r};dr.prototype.getUri=function(t){return t=kf(this.defaults,t),Hh(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};vl.forEach(["delete","get","head","options"],function(t){dr.prototype[t]=function(n,r){return this.request(vl.merge(r||{},{method:t,url:n}))}});vl.forEach(["post","put","patch"],function(t){dr.prototype[t]=function(n,r,l){return this.request(vl.merge(l||{},{method:t,url:n,data:r}))}});var Wh=dr,Ci,Ks;function Cf(){if(Ks)return Ci;Ks=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,Ci=e,Ci}var xi,Xs;function Qh(){if(Xs)return xi;Xs=1;var e=Cf();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(o){r=o});var l=this;n(function(o){l.reason||(l.reason=new e(o),r(l.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var r,l=new t(function(o){r=o});return{token:l,cancel:r}},xi=t,xi}var Ni,Ys;function Kh(){return Ys||(Ys=1,Ni=function(t){return function(r){return t.apply(null,r)}}),Ni}var qs=ke,Xh=df,Qr=Wh,Yh=Sf,qh=Ef;function xf(e){var t=new Qr(e),n=Xh(Qr.prototype.request,t);return qs.extend(n,Qr.prototype,t),qs.extend(n,t),n}var He=xf(qh);He.Axios=Qr;He.create=function(t){return xf(Yh(He.defaults,t))};He.Cancel=Cf();He.CancelToken=Qh();He.isCancel=gf();He.all=function(t){return Promise.all(t)};He.spread=Kh();wu.exports=He;wu.exports.default=He;(function(e){e.exports=wu.exports})(ff);const Gs=ko(ff.exports);class Gh extends or.exports.Component{constructor(){super(...arguments);jl(this,"state",{showThankList:!1,config:{downloadUrl:"https://github.com/YaoZeyuan/stablog#%E8%BD%AF%E4%BB%B6%E4%B8%8B%E8%BD%BD",releaseAt:"2019\u5E7410\u670822\u65E5",releaseNote:"\u7A33\u90E8\u843D1.1.0, \u95EA\u4EAE\u53D1\u5E03.",version:1.1,detail:{windows:{version:1.1,url:"http://stablog.bookflaneur.cn/%E7%A8%B3%E9%83%A8%E8%90%BD%20Setup%201.1.0.exe"},mac:{version:1.1,url:"http://stablog.bookflaneur.cn/%E7%A8%B3%E9%83%A8%E8%90%BD-1.1.0.dmg"}}},thankList:[{reason:"*\u660E\u660E\u6350\u52A9\u4E8625\u5143",time:"2019-10-14 21:34"}]});jl(this,"toggleThankList",()=>{this.setState({showThankList:!this.state.showThankList})})}async componentDidMount(){let n=await Gs.get("https://api.yaozeyuan.online/stablog/version"),r=await Gs.get("https://api.yaozeyuan.online/stablog/thank_you/list"),l=n.data,i=r.data;this.setState({config:l,thankList:i})}render(){var u,s,c;const{config:n,thankList:r,showThankList:l}=this.state;let i=[],o=0;for(let m of r){let h=o,p=me("div",{className:"thank-list-item",children:[F("div",{className:"thank-list-item-time",children:m.time}),F("div",{className:"thank-list-item-reason",children:m.reason})]},h);i.push(p),o++}return console.log("showThankList =>",l),me("div",{className:"Home",children:[F("div",{className:"body",children:me("div",{className:"container",children:[F("div",{className:"title",children:"\u7A33\u90E8\u843D"}),F("div",{className:"slogan",children:"\u4E13\u4E1A\u5907\u4EFD\u5BFC\u51FA\u5FAE\u535A\u8BB0\u5F55"}),F("div",{className:"version",children:"---\u9879\u76EE\u539F\u7406---"}),F("div",{className:"desc",children:"\u8F6F\u4EF6\u672C\u8EAB\u5C31\u662F\u4E00\u4E2A\u5185\u7F6E\u4E86\u5FAE\u535A\u7684\u79FB\u52A8\u7248\u9875\u9762\u7684\u6D4F\u89C8\u5668"}),me("div",{className:"desc",children:["\u5728\u8F6F\u4EF6\u5185\u767B\u5F55\xA0",F("a",{href:"https://m.weibo.cn",target:"_blank",children:"m.weibo.cn"}),"\xA0\u540E"]}),F("div",{className:"desc",children:"\u8F6F\u4EF6\u6A21\u62DF\u6D4F\u89C8\u5668, \u81EA\u52A8\u6D4F\u89C8\u767B\u5F55\u7528\u6237\u53D1\u5E03\u7684\u6240\u6709\u5FAE\u535A, \u5E76\u8BB0\u5F55\u5230\u6570\u636E\u5E93\u91CC"}),F("div",{className:"desc",children:"\u8BBF\u95EE\u5B8C\u6BD5\u540E\u5C06\u6BCF\u6761\u5FAE\u535A\u622A\u5C4F\u6210\u56FE\u7247, \u7801\u5728pdf\u4E2D, \u5373\u4E3A\u5907\u4EFD."}),F("div",{className:"desc",children:"(\u4E3A\u65B9\u4FBF\u67E5\u627E, \u5728\u6BCF\u4E2A\u56FE\u7247\u524D\u52A0\u4E0A\u4E86\u5FAE\u535A\u7684\u6587\u5B57\u7248, \u8FD9\u6837pdf\u91CC\u4E00\u641C\u5C31\u80FD\u641C\u5230\u5BF9\u5E94\u5FAE\u535A\u6240\u5728\u4F4D\u7F6E)"}),me("div",{className:"desc",children:["\u6240\u4EE5, \u5373\u4F7F\u70B8\u53F7, \u53EA\u8981\u767B\u5F55\xA0",F("a",{href:"https://m.weibo.cn",target:"_blank",children:"m.weibo.cn"}),"\xA0 \u540E\u8FD8\u80FD\u770B\u89C1\u81EA\u5DF1\u7684\u5FAE\u535A,\u5C31\u53EF\u4EE5\u5907\u4EFD"]}),me("div",{className:"desc",children:["(\u53CD\u8FC7\u6765, \u5982\u679C",F("a",{href:"https://m.weibo.cn",target:"_blank",children:"m.weibo.cn"}),"\u90FD\u767B\u5F55\u4E0D\u4E86, \u5C31\u6CA1\u529E\u6CD5\u4E86)"]}),F("div",{className:"desc"}),me("div",{className:"version",children:["---\u6700\u65B0\u7248\u672C\uFF1Av",`${n.version}`.padEnd(3,".0"),"---"]}),F("div",{className:"logo",children:F("img",{src:"https://mirror-4-web.bookflaneur.cn/https://tva1.sinaimg.cn/large/007Yq4pTly1h4rkzfkfx5j3074074ab5.jpg",alt:"logo"})}),me("div",{className:"download-container",children:[F("div",{className:"download-tip",children:"\u4E0B\u8F7D"}),me("div",{className:"action-line",children:[me("a",{className:"download-button",target:"_blank",href:n.detail.windows.url,children:[F("img",{className:"download-button-icon",src:Qp}),"Windows\u7248(",n.detail.windows.version,")"]}),me("a",{className:"download-button",target:"_blank",href:(s=(u=n.detail)==null?void 0:u.mac)==null?void 0:s.url,children:[F("img",{className:"download-button-icon",src:Kp}),"Mac\u7248(",(c=n.detail)==null?void 0:c.mac.version,")"]})]})]})]})}),me("div",{className:"footer",children:[me("div",{className:"comment",children:[F("a",{className:"tip",href:"https://github.com/YaoZeyuan/stablog",target:"_blank",children:"\u4F7F\u7528\u6307\u5357"}),F("a",{className:"tip",href:"https://github.com/YaoZeyuan/stablog/issues",target:"_blank",children:"\u529F\u80FD\u5EFA\u8BAE"})]}),F(lh,{in:this.state.showThankList,timeout:300,classNames:"fade",unmountOnExit:!0,children:F("div",{className:"thank-list",children:i})})]}),F("a",{href:"https://github.com/YaoZeyuan/stablog",className:"fork-me-on-github",target:"_blank",children:F("img",{width:"149px",height:"149px",src:"https://cdn.jsdelivr.net/gh/YaoZeyuan/blog@master/source/static/img/fork_me_on_github_right_green.png",alt:"Fork me on GitHub"})})]})}}Boolean(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Zh(){"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(e=>{e.unregister()})}uf.render(F(Gh,{}),document.getElementById("root"));Zh(); diff --git a/index.html b/index.html index cfb1f0ed..f3925749 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,7 @@ s.parentNode.insertBefore(hm, s) })() - +