diff --git a/dist/Valine.min.js b/dist/Valine.min.js index 962f76c6..7679f082 100644 --- a/dist/Valine.min.js +++ b/dist/Valine.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Valine",[],t):"object"==typeof exports?exports.Valine=t():e.Valine=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=3)}([function(e,t,n){var r;!function(i){"use strict";function o(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t){return e<>>32-t}function s(e,t,n,r,i,s){return o(a(o(o(t,e),o(r,s)),i),n)}function l(e,t,n,r,i,o,a){return s(t&n|~t&r,e,t,i,o,a)}function c(e,t,n,r,i,o,a){return s(t&r|n&~r,e,t,i,o,a)}function u(e,t,n,r,i,o,a){return s(t^n^r,e,t,i,o,a)}function h(e,t,n,r,i,o,a){return s(n^(t|~r),e,t,i,o,a)}function p(e,t){e[t>>5]|=128<>>9<<4)]=t;var n,r,i,a,s,p=1732584193,d=-271733879,f=-1732584194,v=271733878;for(n=0;n>5]>>>t%32&255);return n}function f(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<16&&(i=p(i,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=p(o.concat(f(t)),512+8*t.length),d(p(a.concat(r),640))}function m(e){var t,n,r="0123456789abcdef",i="";for(n=0;n>>4&15)+r.charAt(15&t);return i}function b(e){return unescape(encodeURIComponent(e))}function k(e){return v(b(e))}function y(e){return m(k(e))}function x(e,t){return g(b(e),b(t))}function w(e,t){return m(x(e,t))}function S(e,t,n){return t?n?x(t,e):w(t,e):n?k(e):y(e)}void 0!==(r=function(){return S}.call(t,n,t,e))&&(e.exports=r)}()},function(e,t,n){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||u.defaults,this.rules=h.normal,this.options.gfm&&(this.options.tables?this.rules=h.tables:this.rules=h.gfm)}function n(e,t){if(this.options=t||u.defaults,this.links=e,this.rules=p.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}function r(e){this.options=e||{}}function i(e){this.tokens=[],this.token=null,this.options=e||u.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function o(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function l(){}function c(e){for(var t,n,r=1;rAn error occured:

"+o(e.message+"",!0)+"
";throw e}}var h={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};h.bullet=/(?:[*+-]|\d+\.)/,h.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,h.item=s(h.item,"gm")(/bull/g,h.bullet)(),h.list=s(h.list)(/bull/g,h.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+h.def.source+")")(),h.blockquote=s(h.blockquote)("def",h.def)(),h._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",h.html=s(h.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,h._tag)(),h.paragraph=s(h.paragraph)("hr",h.hr)("heading",h.heading)("lheading",h.lheading)("blockquote",h.blockquote)("tag","<"+h._tag)("def",h.def)(),h.normal=c({},h),h.gfm=c({},h.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),h.gfm.paragraph=s(h.paragraph)("(?!","(?!"+h.gfm.fences.source.replace("\\1","\\2")+"|"+h.list.source.replace("\\1","\\3")+"|")(),h.tables=c({},h.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=h,t.lex=function(e,n){return new t(n).lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,o,a,s,l,c,u,p,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(this.rules.item),r=!1,p=o.length,u=0;u1&&s.length>1||(e=o.slice(u+1).join("\n")+e,u=p-1)),i=r||/\n\n(?!\s*$)/.test(l),u!==p-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:l,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,p.link=s(p.link)("inside",p._inside)("href",p._href)(),p.reflink=s(p.reflink)("inside",p._inside)(),p.normal=c({},p),p.pedantic=c({},p.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),p.gfm=c({},p.normal,{escape:s(p.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(p.text)("]|","~]|")("|","|https?://|")()}),p.breaks=c({},p.gfm,{br:s(p.br)("{2,}","*")(),text:s(p.gfm.text)("{2,}","*")()}),n.rules=p,n.output=function(e,t,r){return new n(t,r).output(e)},n.prototype.output=function(e){for(var t,n,r,i,a="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),a+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=o(i[1]),r=n),a+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):o(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,a+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),a+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),a+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),a+=this.renderer.codespan(o(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),a+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),a+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),a+=this.renderer.text(o(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=o(i[1]),r=n,a+=this.renderer.link(r,null,n);return a},n.prototype.outputLink=function(e,t){var n=o(t.href),r=t.title?o(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,o(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
'+(n?e:o(e,!0))+"\n
\n":"
"+(n?e:o(e,!0))+"\n
"},r.prototype.blockquote=function(e){return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"'+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var i='
    "},r.prototype.image=function(e,t,n){var r=''+n+'":">"},r.prototype.text=function(e){return e},i.parse=function(e,t,n){return new i(t,n).parse(e)},i.prototype.parse=function(e){this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;e
    MarkDown is Support
      ';t.el.innerHTML=i;var o=t.el.querySelector(".vempty");t.nodata={show:function(e){o.innerHTML=e||"还没有评论哦,快来抢沙发吧!",o.setAttribute("style","display:block;")},hide:function(){o.setAttribute("style","display:none;")}};var a=t.el.querySelector(".vloading");a.innerHTML='
      ',t.loading={show:function(){a.setAttribute("style","display:block;"),t.nodata.hide()},hide:function(){a.setAttribute("style","display:none;"),0===t.el.querySelectorAll(".vcard").length&&t.nodata.show()}},t.notify=e.notify||!1,t.verify=e.verify||!1;var s=e.av||AV,c=e.app_id||e.appId,u=e.app_key||e.appKey;if(!c||!u)throw t.loading.hide(),"初始化失败,请检查你的appid或者appkey.";s.init({appId:c,appKey:u}),t.v=s,l.url=(e.path||location.pathname).replace(/index\.(html|htm)/,"")}catch(e){var p="https://github.com/xCss/Valine/issues";return void(t.el?t.nodata.show('
      '+e+"
      Valine:"+t.version+"
      反馈:"+p+"
      "):console&&console.log("%c"+e+"\n%cValine%c"+t.version+" "+p,"color:red;","background:#000;padding:5px;line-height:30px;color:#fff;","background:#456;line-height:30px;padding:5px;color:#fff;"))}var d=t.el.querySelector(".vmark");t.alert={show:function(e){d.innerHTML='
      '+e.text+'
      ';var n=d.querySelector(".vbtns"),r='",i='";if(n.innerHTML=""+r+(e.type&&i),d.querySelector(".vcancel").addEventListener("click",function(e){t.alert.hide()}),d.setAttribute("style","display:block;"),e&&e.type){var o=d.querySelector(".vsure");h.on("click",o,function(n){t.alert.hide(),e.cb&&e.cb()})}},hide:function(){d.setAttribute("style","display:none;")}},t.bind()}},{key:"bind",value:function(){var e=this,t=function(e){e.offsetHeight>180&&(e.classList.add("expand"),h.on("click",e,function(t){e.setAttribute("class","vcontent")}))},n=function(t){var n=new e.v.Query("Comment");return n.equalTo("url",l.url),n.descending("createdAt"),n};!function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];e.loading.show();var t=n();t.limit("1000"),t.find().then(function(t){var n=t.length;if(n){e.el.querySelector(".vlist").innerHTML="";for(var i=0;i'+n+")"}e.loading.hide()}).catch(function(t){e.loading.hide()})}();var r=function(n,r){var i=document.createElement("li");i.setAttribute("class","vcard"),i.setAttribute("id",n.id);var o="https://gravatar.cat.net/avatar/"+s(n.get("mail"))+"?s=40";i.innerHTML='
      '+n.get("comment")+'
      '+g(n.get("createdAt"))+"回复
      ';for(var a=e.el.querySelector(".vlist"),l=a.querySelectorAll("li"),c=i.querySelector(".vat"),u=i.querySelectorAll("a"),h=0,d=u.length;h-1&&""!=m.at){var n='"+m.at+"";l.comment=l.comment.replace(m.at,n)}var r=d.mail(l.mail),i=d.link(l.link);r.k||i.k?r.k?i.k?(l.mail=r.v,l.link=i.v,e.notify||e.verify?S(w):w()):(l.link="",l.mail=r.v,e.alert.show({type:1,text:"您的网址格式不正确, 是否继续提交?",cb:function(){e.notify||e.verify?S(w):w()}})):(l.mail="",l.link=i.v,e.alert.show({type:1,text:"您的邮箱格式不正确, 是否继续提交?",cb:function(){e.notify||e.verify?S(w):w()}})):(l.mail="",l.link="",e.alert.show({type:1,text:"您的网址和邮箱格式不正确, 是否继续提交?",cb:function(){e.notify||e.verify?S(w):w()}}))},x=function(){var t=new e.v.ACL;return t.setPublicReadAccess(!0),t.setPublicWriteAccess(!1),t},w=function(){k.setAttribute("disabled",!0),e.loading.show();var t=e.v.Object.extend("Comment"),n=new t;for(var i in l)if(l.hasOwnProperty(i)){var o=l[i];n.set(i,o)}n.setACL(x()),n.save().then(function(t){"Guest"!=l.nick&&c&&c.setItem("ValineCache",JSON.stringify({nick:l.nick,link:l.link,mail:l.mail}));var n=e.el.querySelector(".num"),i=1;try{n?(i=Number(n.innerText)+1,n.innerText=i):e.el.querySelector(".count").innerHTML='评论(1)',r(t),l.mail&&A({username:l.nick,mail:l.mail}),m.at&&m.rmail&&e.notify&&_({username:m.at.replace("@",""),mail:m.rmail}),k.removeAttribute("disabled"),e.loading.hide(),b()}catch(e){console.log(e)}}).catch(function(t){e.loading.hide()})},S=function t(n){var r=Math.floor(10*Math.random()+1),i=Math.floor(10*Math.random()+1),o=Math.floor(10*Math.random()+1),a=["+","-","x"],s=a[Math.floor(3*Math.random())],l=a[Math.floor(3*Math.random())],c=""+r+s+i+l+o,u=c+" = ";e.alert.show({type:1,text:u,ctxt:"取消",otxt:"确认",cb:function(){var r=+e.el.querySelector(".vcode").value;new Function("return "+c.replace(/x/g,"*"))()===r?n&&n():e.alert.show({type:1,text:"(T_T)这么简单都算错,也是没谁了",ctxt:"伤心了,不回了",otxt:"再试试?",cb:function(){t(n)}})}})},A=function(t){var n=new e.v.User;return n.setUsername(t.username),n.setPassword(t.mail),n.setEmail(t.mail),n.setACL(x()),n.signUp()},_=function t(n){e.v.User.requestPasswordReset(n.mail).then(function(e){}).catch(function(r){1==r.code?e.alert.show({type:0,text:"ヾ(o・ω・)ノ At太频繁啦,提醒功能暂时宕机。
      "+r.error,ctxt:"好的"}):A(n).then(function(e){t(n)}).catch(function(e){})})},L=function(e){h.on("click",e,function(t){var n=e.getAttribute("at"),r=e.getAttribute("rid"),i=e.getAttribute("mail");m.at=n,m.rmail=i,l.rid=r,o.comment.value=n+" ,",o.comment.focus()})};h.off("click",k,y),h.on("click",k,y)}}]),e}(),h={on:function(e,t,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n},off:function(e,t,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null}},p=function(e){return e.link||e.mail&&"mailto:"+e.mail||"javascript:void(0);"},d={mail:function(e){return{k:/[\w-\.]+@([\w-]+\.)+[a-z]{2,3}/.test(e),v:e}},link:function(e){return e=e.length>0&&(/^(http|https)/.test(e)?e:"http://"+e),{k:/(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?/.test(e),v:e}}},f={encode:function(e){return e?e.replace(/&/g,"&").replace(//g,">").replace(/ /g," ").replace(/\'/g,"'").replace(/\"/g,"""):""},decode:function(e){return e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ").replace(/'/g,"'").replace(/"/g,'"'):""}},v=function(e){var t=m(e.getDate(),2),n=m(e.getMonth()+1,2);return m(e.getFullYear(),2)+"-"+n+"-"+t},g=function(e){try{var t=e.getTime(),n=(new Date).getTime(),r=n-t,i=Math.floor(r/864e5);if(0===i){var o=r%864e5,a=Math.floor(o/36e5);if(0===a){var s=o%36e5,l=Math.floor(s/6e4);if(0===l){var c=s%6e4;return Math.round(c/1e3)+" 秒前"}return l+" 分钟前"}return a+" 小时前"}return i<0?"刚刚":i<8?i+" 天前":v(e)}catch(e){console.log(e)}},m=function(e,t){for(var n=e.toString();n.length div {\n background-color: #9c9c9c;\n height: 100%;\n width: .375rem;\n margin-right: 0.19rem;\n display: inline-block;\n -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;\n animation: sk-stretchdelay 1.2s infinite ease-in-out; }\n .valine .spinner .r2 {\n -webkit-animation-delay: -1.1s;\n animation-delay: -1.1s; }\n .valine .spinner .r3 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s; }\n .valine .spinner .r4 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s; }\n .valine .spinner .r5 {\n -webkit-animation-delay: -0.8s;\n animation-delay: -0.8s; }\n\n@-webkit-keyframes sk-stretchdelay {\n 0%,\n 40%,\n 100% {\n -webkit-transform: scaleY(0.4); }\n 20% {\n -webkit-transform: scaleY(1); } }\n\n@keyframes sk-stretchdelay {\n 0%,\n 40%,\n 100% {\n transform: scaleY(0.4);\n -webkit-transform: scaleY(0.4); }\n 20% {\n transform: scaleY(1);\n -webkit-transform: scaleY(1); } }\n",""])},function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([o]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i=0&&k.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),o(e,t),t}function l(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),o(e,t),t}function c(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function u(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var c=b++;n=m||(m=s(t)),r=h.bind(null,n,c,!1),i=h.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=d.bind(null,n,t),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function h(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=y(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var f={},v=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),g=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),m=null,b=0,k=[],y=n(7);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=v()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var o=[],a=0;a>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t){return e<>>32-t}function s(e,t,n,r,i,s){return o(a(o(o(t,e),o(r,s)),i),n)}function l(e,t,n,r,i,o,a){return s(t&n|~t&r,e,t,i,o,a)}function c(e,t,n,r,i,o,a){return s(t&r|n&~r,e,t,i,o,a)}function u(e,t,n,r,i,o,a){return s(t^n^r,e,t,i,o,a)}function h(e,t,n,r,i,o,a){return s(n^(t|~r),e,t,i,o,a)}function p(e,t){e[t>>5]|=128<>>9<<4)]=t;var n,r,i,a,s,p=1732584193,d=-271733879,f=-1732584194,v=271733878;for(n=0;n>5]>>>t%32&255);return n}function f(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<16&&(i=p(i,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=p(o.concat(f(t)),512+8*t.length),d(p(a.concat(r),640))}function m(e){var t,n,r="0123456789abcdef",i="";for(n=0;n>>4&15)+r.charAt(15&t);return i}function b(e){return unescape(encodeURIComponent(e))}function k(e){return v(b(e))}function y(e){return m(k(e))}function x(e,t){return g(b(e),b(t))}function w(e,t){return m(x(e,t))}function S(e,t,n){return t?n?x(t,e):w(t,e):n?k(e):y(e)}void 0!==(r=function(){return S}.call(t,n,t,e))&&(e.exports=r)}()},function(e,t,n){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||u.defaults,this.rules=h.normal,this.options.gfm&&(this.options.tables?this.rules=h.tables:this.rules=h.gfm)}function n(e,t){if(this.options=t||u.defaults,this.links=e,this.rules=p.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}function r(e){this.options=e||{}}function i(e){this.tokens=[],this.token=null,this.options=e||u.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function o(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function l(){}function c(e){for(var t,n,r=1;rAn error occured:

      "+o(e.message+"",!0)+"
      ";throw e}}var h={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};h.bullet=/(?:[*+-]|\d+\.)/,h.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,h.item=s(h.item,"gm")(/bull/g,h.bullet)(),h.list=s(h.list)(/bull/g,h.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+h.def.source+")")(),h.blockquote=s(h.blockquote)("def",h.def)(),h._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",h.html=s(h.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,h._tag)(),h.paragraph=s(h.paragraph)("hr",h.hr)("heading",h.heading)("lheading",h.lheading)("blockquote",h.blockquote)("tag","<"+h._tag)("def",h.def)(),h.normal=c({},h),h.gfm=c({},h.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),h.gfm.paragraph=s(h.paragraph)("(?!","(?!"+h.gfm.fences.source.replace("\\1","\\2")+"|"+h.list.source.replace("\\1","\\3")+"|")(),h.tables=c({},h.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=h,t.lex=function(e,n){return new t(n).lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,o,a,s,l,c,u,p,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(this.rules.item),r=!1,p=o.length,u=0;u1&&s.length>1||(e=o.slice(u+1).join("\n")+e,u=p-1)),i=r||/\n\n(?!\s*$)/.test(l),u!==p-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:l,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,p.link=s(p.link)("inside",p._inside)("href",p._href)(),p.reflink=s(p.reflink)("inside",p._inside)(),p.normal=c({},p),p.pedantic=c({},p.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),p.gfm=c({},p.normal,{escape:s(p.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(p.text)("]|","~]|")("|","|https?://|")()}),p.breaks=c({},p.gfm,{br:s(p.br)("{2,}","*")(),text:s(p.gfm.text)("{2,}","*")()}),n.rules=p,n.output=function(e,t,r){return new n(t,r).output(e)},n.prototype.output=function(e){for(var t,n,r,i,a="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),a+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=o(i[1]),r=n),a+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):o(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,a+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),a+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),a+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),a+=this.renderer.codespan(o(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),a+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),a+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),a+=this.renderer.text(o(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=o(i[1]),r=n,a+=this.renderer.link(r,null,n);return a},n.prototype.outputLink=function(e,t){var n=o(t.href),r=t.title?o(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,o(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
      '+(n?e:o(e,!0))+"\n
      \n":"
      "+(n?e:o(e,!0))+"\n
      "},r.prototype.blockquote=function(e){return"
      \n"+e+"
      \n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"'+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
      \n":"
      \n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
    • "+e+"
    • \n"},r.prototype.paragraph=function(e){return"

      "+e+"

      \n"},r.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
      \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
      ":"
      "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var i='
      "},r.prototype.image=function(e,t,n){var r=''+n+'":">"},r.prototype.text=function(e){return e},i.parse=function(e,t,n){return new i(t,n).parse(e)},i.prototype.parse=function(e){this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;e
      MarkDown is Support
        ';t.el.innerHTML=i;var o=t.el.querySelector(".vempty");t.nodata={show:function(e){o.innerHTML=e||"还没有评论哦,快来抢沙发吧!",o.setAttribute("style","display:block;")},hide:function(){o.setAttribute("style","display:none;")}};var a=t.el.querySelector(".vloading");a.innerHTML='
        ',t.loading={show:function(){a.setAttribute("style","display:block;"),t.nodata.hide()},hide:function(){a.setAttribute("style","display:none;"),0===t.el.querySelectorAll(".vcard").length&&t.nodata.show()}},t.notify=e.notify||!1,t.verify=e.verify||!1;var s=e.av||AV,c=e.app_id||e.appId,u=e.app_key||e.appKey;if(!c||!u)throw t.loading.hide(),"初始化失败,请检查你的appid或者appkey.";s.init({appId:c,appKey:u}),t.v=s,l.url=(e.path||location.pathname).replace(/index\.(html|htm)/,"")}catch(e){var p="https://github.com/xCss/Valine/issues";return void(t.el?t.nodata.show('
        '+e+"
        Valine:"+t.version+"
        反馈:"+p+"
        "):console&&console.log("%c"+e+"\n%cValine%c"+t.version+" "+p,"color:red;","background:#000;padding:5px;line-height:30px;color:#fff;","background:#456;line-height:30px;padding:5px;color:#fff;"))}var d=t.el.querySelector(".vmark");t.alert={show:function(e){d.innerHTML='
        '+e.text+'
        ';var n=d.querySelector(".vbtns"),r='",i='";if(n.innerHTML=""+r+(e.type&&i),d.querySelector(".vcancel").addEventListener("click",function(e){t.alert.hide()}),d.setAttribute("style","display:block;"),e&&e.type){var o=d.querySelector(".vsure");h.on("click",o,function(n){t.alert.hide(),e.cb&&e.cb()})}},hide:function(){d.setAttribute("style","display:none;")}},t.bind()}},{key:"bind",value:function(){var e=this,t=function(e){e.offsetHeight>180&&(e.classList.add("expand"),h.on("click",e,function(t){e.setAttribute("class","vcontent")}))},n=function(t){var n=new e.v.Query("Comment");return n.equalTo("url",l.url),n.descending("createdAt"),n};!function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];e.loading.show();var t=n();t.limit("1000"),t.find().then(function(t){var n=t.length;if(n){e.el.querySelector(".vlist").innerHTML="";for(var i=0;i'+n+")"}e.loading.hide()}).catch(function(t){e.loading.hide()})}();var r=function(n,r){var i=document.createElement("li");i.setAttribute("class","vcard"),i.setAttribute("id",n.id);var o="https://gravatar.cat.net/avatar/"+s(n.get("mail"))+"?s=40";i.innerHTML='
        '+n.get("comment")+'
        '+g(n.get("createdAt"))+"回复
        ';for(var a=e.el.querySelector(".vlist"),l=a.querySelectorAll("li"),c=i.querySelector(".vat"),u=i.querySelectorAll("a"),h=0,d=u.length;h-1&&""!=m.at){var n='"+m.at+"";l.comment=l.comment.replace(m.at,n)}var r=d.mail(l.mail),i=d.link(l.link);r.k||i.k?r.k?i.k?(l.mail=r.v,l.link=i.v,e.notify||e.verify?S(w):w()):(l.link="",l.mail=r.v,e.alert.show({type:1,text:"您的网址格式不正确, 是否继续提交?",cb:function(){e.notify||e.verify?S(w):w()}})):(l.mail="",l.link=i.v,e.alert.show({type:1,text:"您的邮箱格式不正确, 是否继续提交?",cb:function(){e.notify||e.verify?S(w):w()}})):(l.mail="",l.link="",e.alert.show({type:1,text:"您的网址和邮箱格式不正确, 是否继续提交?",cb:function(){e.notify||e.verify?S(w):w()}}))},x=function(){var t=new e.v.ACL;return t.setPublicReadAccess(!0),t.setPublicWriteAccess(!1),t},w=function(){k.setAttribute("disabled",!0),e.loading.show();var t=e.v.Object.extend("Comment"),n=new t;for(var i in l)if(l.hasOwnProperty(i)){var o=l[i];n.set(i,o)}n.setACL(x()),n.save().then(function(t){"Guest"!=l.nick&&c&&c.setItem("ValineCache",JSON.stringify({nick:l.nick,link:l.link,mail:l.mail}));var n=e.el.querySelector(".num"),i=1;try{n?(i=Number(n.innerText)+1,n.innerText=i):e.el.querySelector(".count").innerHTML='评论(1)',r(t),l.mail&&A({username:l.nick,mail:l.mail}),m.at&&m.rmail&&e.notify&&_({username:m.at.replace("@",""),mail:m.rmail}),k.removeAttribute("disabled"),e.loading.hide(),b()}catch(e){console.log(e)}}).catch(function(t){e.loading.hide()})},S=function t(n){var r=Math.floor(10*Math.random()+1),i=Math.floor(10*Math.random()+1),o=Math.floor(10*Math.random()+1),a=["+","-","x"],s=a[Math.floor(3*Math.random())],l=a[Math.floor(3*Math.random())],c=""+r+s+i+l+o,u=c+" = ";e.alert.show({type:1,text:u,ctxt:"取消",otxt:"确认",cb:function(){var r=+e.el.querySelector(".vcode").value;new Function("return "+c.replace(/x/g,"*"))()===r?n&&n():e.alert.show({type:1,text:"(T_T)这么简单都算错,也是没谁了",ctxt:"伤心了,不回了",otxt:"再试试?",cb:function(){t(n)}})}})},A=function(t){var n=new e.v.User;return n.setUsername(t.username),n.setPassword(t.mail),n.setEmail(t.mail),n.setACL(x()),n.signUp()},_=function t(n){e.v.User.requestPasswordReset(n.mail).then(function(e){}).catch(function(r){1==r.code?e.alert.show({type:0,text:"ヾ(o・ω・)ノ At太频繁啦,提醒功能暂时宕机。
        "+r.error,ctxt:"好的"}):A(n).then(function(e){t(n)}).catch(function(e){})})},L=function(e){h.on("click",e,function(t){var n=e.getAttribute("at"),r=e.getAttribute("rid"),i=e.getAttribute("mail");m.at=n,m.rmail=i,l.rid=r,o.comment.value=n+" ,",o.comment.focus()})};h.off("click",k,y),h.on("click",k,y)}}]),e}(),h={on:function(e,t,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n},off:function(e,t,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null}},p=function(e){return e.link||e.mail&&"mailto:"+e.mail||"javascript:void(0);"},d={mail:function(e){return{k:/[\w-\.]+@([\w-]+\.)+[a-z]{2,3}/.test(e),v:e}},link:function(e){return e=e.length>0&&(/^(http|https)/.test(e)?e:"http://"+e),{k:/(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?/.test(e),v:e}}},f={encode:function(e){return e?e.replace(/&/g,"&").replace(//g,">").replace(/ /g," ").replace(/\'/g,"'").replace(/\"/g,"""):""},decode:function(e){return e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ").replace(/'/g,"'").replace(/"/g,'"'):""}},v=function(e){var t=m(e.getDate(),2),n=m(e.getMonth()+1,2);return m(e.getFullYear(),2)+"-"+n+"-"+t},g=function(e){try{var t=e.getTime(),n=(new Date).getTime(),r=n-t,i=Math.floor(r/864e5);if(0===i){var o=r%864e5,a=Math.floor(o/36e5);if(0===a){var s=o%36e5,l=Math.floor(s/6e4);if(0===l){var c=s%6e4;return Math.round(c/1e3)+" 秒前"}return l+" 分钟前"}return a+" 小时前"}return i<0?"刚刚":i<8?i+" 天前":v(e)}catch(e){console.log(e)}},m=function(e,t){for(var n=e.toString();n.length div {\n background-color: #9c9c9c;\n height: 100%;\n width: .375rem;\n margin-right: 0.19rem;\n display: inline-block;\n -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;\n animation: sk-stretchdelay 1.2s infinite ease-in-out; }\n .valine .spinner .r2 {\n -webkit-animation-delay: -1.1s;\n animation-delay: -1.1s; }\n .valine .spinner .r3 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s; }\n .valine .spinner .r4 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s; }\n .valine .spinner .r5 {\n -webkit-animation-delay: -0.8s;\n animation-delay: -0.8s; }\n\n@-webkit-keyframes sk-stretchdelay {\n 0%,\n 40%,\n 100% {\n -webkit-transform: scaleY(0.4); }\n 20% {\n -webkit-transform: scaleY(1); } }\n\n@keyframes sk-stretchdelay {\n 0%,\n 40%,\n 100% {\n transform: scaleY(0.4);\n -webkit-transform: scaleY(0.4); }\n 20% {\n transform: scaleY(1);\n -webkit-transform: scaleY(1); } }\n",""])},function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([o]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i=0&&k.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),o(e,t),t}function l(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),o(e,t),t}function c(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function u(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var c=b++;n=m||(m=s(t)),r=h.bind(null,n,c,!1),i=h.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=d.bind(null,n,t),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function h(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=y(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var f={},v=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),g=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),m=null,b=0,k=[],y=n(7);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=v()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var o=[],a=0;a