From 515f71aaa4fd6860d72f7f8a8bf9161f309b06e3 Mon Sep 17 00:00:00 2001 From: cetr <2058930674@qq.com> Date: Fri, 19 Nov 2021 22:10:56 +0800 Subject: [PATCH] update --- dist/halo-comment.js | 2 +- dist/halo-comment.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/halo-comment.js b/dist/halo-comment.js index ec07288..8de77bb 100644 --- a/dist/halo-comment.js +++ b/dist/halo-comment.js @@ -9775,7 +9775,7 @@ module.exports = CancelToken; /***/ "9224": /***/ (function(module) { -module.exports = JSON.parse("{\"name\":\"halo-comment-yu\",\"version\":\"v1.4.0\",\"private\":false,\"scripts\":{\"serve\":\"vue-cli-service serve\",\"build\":\"vue-cli-service build\",\"build-comment\":\"cross-env vue-cli-service build --target wc --name halo-comment 'src/components/Comment.vue'\",\"lint\":\"vue-cli-service lint\"},\"dependencies\":{\"autosize\":\"^4.0.2\",\"axios\":\"^0.21.2\",\"cross-env\":\"^7.0.3\",\"highlight\":\"^0.2.4\",\"highlight.js\":\"^10.7.2\",\"highlightjs\":\"^9.16.2\",\"marked\":\"^2.0.1\",\"md5\":\"^2.3.0\",\"promise.prototype.finally\":\"^3.1.2\",\"ua-parser-js\":\"^0.7.28\",\"viewerjs\":\"^1.6.2\",\"vue\":\"^2.6.12\"},\"devDependencies\":{\"@vue/cli-plugin-babel\":\"^4.5.12\",\"@vue/cli-plugin-eslint\":\"^4.5.12\",\"@vue/cli-service\":\"^4.5.12\",\"babel-eslint\":\"^10.1.0\",\"eslint\":\"^5.16.0\",\"eslint-plugin-vue\":\"^5.2.3\",\"node-sass\":\"^4.14.1\",\"sass-loader\":\"^8.0.2\",\"vue-template-compiler\":\"^2.6.12\"},\"eslintConfig\":{\"root\":true,\"env\":{\"node\":true},\"extends\":[\"plugin:vue/essential\",\"eslint:recommended\"],\"rules\":{\"no-console\":\"off\"},\"parserOptions\":{\"parser\":\"babel-eslint\"}},\"browserslist\":[\"> 1%\",\"last 2 versions\"],\"description\":\"适用于 Halo 的评论组件\",\"main\":\"babel.config.js\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/cetr/halo-comment-yu.git\"},\"author\":\"知雨\",\"license\":\"ISC\",\"bugs\":{\"url\":\"https://github.com/cetr/halo-comment-yu/issues\"},\"homepage\":\"https://github.com/cetr/halo-comment-yu#readme\"}"); +module.exports = JSON.parse("{\"name\":\"halo-comment-yu\",\"version\":\"v1.4.2\",\"private\":false,\"scripts\":{\"serve\":\"vue-cli-service serve\",\"build\":\"vue-cli-service build\",\"build-comment\":\"cross-env vue-cli-service build --target wc --name halo-comment 'src/components/Comment.vue'\",\"lint\":\"vue-cli-service lint\"},\"dependencies\":{\"autosize\":\"^4.0.2\",\"axios\":\"^0.21.2\",\"cross-env\":\"^7.0.3\",\"highlight\":\"^0.2.4\",\"highlight.js\":\"^10.7.2\",\"highlightjs\":\"^9.16.2\",\"marked\":\"^2.0.1\",\"md5\":\"^2.3.0\",\"promise.prototype.finally\":\"^3.1.2\",\"ua-parser-js\":\"^0.7.28\",\"viewerjs\":\"^1.6.2\",\"vue\":\"^2.6.12\"},\"devDependencies\":{\"@vue/cli-plugin-babel\":\"^4.5.12\",\"@vue/cli-plugin-eslint\":\"^4.5.12\",\"@vue/cli-service\":\"^4.5.12\",\"babel-eslint\":\"^10.1.0\",\"eslint\":\"^5.16.0\",\"eslint-plugin-vue\":\"^5.2.3\",\"node-sass\":\"^4.14.1\",\"sass-loader\":\"^8.0.2\",\"vue-template-compiler\":\"^2.6.12\"},\"eslintConfig\":{\"root\":true,\"env\":{\"node\":true},\"extends\":[\"plugin:vue/essential\",\"eslint:recommended\"],\"rules\":{\"no-console\":\"off\"},\"parserOptions\":{\"parser\":\"babel-eslint\"}},\"browserslist\":[\"> 1%\",\"last 2 versions\"],\"description\":\"适用于 Halo 的评论组件\",\"main\":\"babel.config.js\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/cetr/halo-comment-yu.git\"},\"author\":\"知雨\",\"license\":\"ISC\",\"bugs\":{\"url\":\"https://github.com/cetr/halo-comment-yu/issues\"},\"homepage\":\"https://github.com/cetr/halo-comment-yu#readme\"}"); /***/ }), diff --git a/dist/halo-comment.min.js b/dist/halo-comment.min.js index a2e54ea..1abf319 100644 --- a/dist/halo-comment.min.js +++ b/dist/halo-comment.min.js @@ -18,7 +18,7 @@ e.exports=function(e){return null!=e&&(n(e)||i(e)||!!e._isBuffer)}},"0808":funct * * Copyright © 2012-2021 Faisal Salman * Licensed under MIT License - */(function(r,o){"use strict";var a="0.7.28",s="",l="?",c="function",u="undefined",m="object",h="string",p="major",d="model",f="name",g="type",b="vendor",w="version",v="architecture",y="console",x="mobile",A="tablet",D="smarttv",k="wearable",C="embedded",E=255,F={extend:function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2===0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n},has:function(e,t){return typeof e===h&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===h?e.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(e,t){return e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof t===u?e:e.substring(0,E)}},j={rgx:function(e,t){var n,i,r,a,s,l,u=0;while(u0?2==a.length?typeof a[1]==c?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3==a.length?typeof a[1]!==c||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4==a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;u+=2}},str:function(e,t){for(var n in t)if(typeof t[n]===m&&t[n].length>0){for(var i=0;iE?F.trim(e,E):e,this},this.setUA(n),this};z.VERSION=a,z.BROWSER={NAME:f,MAJOR:p,VERSION:w},z.CPU={ARCHITECTURE:v},z.DEVICE={MODEL:d,VENDOR:b,TYPE:g,CONSOLE:y,MOBILE:x,SMARTTV:D,TABLET:A,WEARABLE:k,EMBEDDED:C},z.ENGINE={NAME:f,VERSION:w},z.OS={NAME:f,VERSION:w},typeof t!==u?(typeof e!==u&&e.exports&&(t=e.exports=z),t.UAParser=z):(i=function(){return z}.call(t,n,t,e),i===o||(e.exports=i));var B="undefined"!==typeof r&&(r.jQuery||r.Zepto);if(B&&!B.ua){var T=new z;B.ua=T.getResult(),B.ua.get=function(){return T.getUA()},B.ua.set=function(e){T.setUA(e);var t=T.getResult();for(var n in t)B.ua[n]=t[n]}}})("object"===typeof window?window:this)},"2c44":function(e,t,n){"use strict";n.r(t);class i{constructor(e,t,n,i){this.emoji=e,this.description=t,this.aliases=n,this.tags=i}}const r="https://cdn.jsdelivr.net/gh/cetr/halo-comment-yu@master/cdn/img/emoji";t["default"]=[new i(`smile`,""," :smile: ",[]),new i(`lovely`,""," :lovely: ",[]),new i(`happy`,""," :happy: ",[]),new i(`clap`,""," :clap: ",[]),new i(`whee`,""," :whee: ",[]),new i(`haha`,""," :haha: ",[]),new i(`laugh and cry`,""," :laugh and cry: ",[]),new i(`wink`,""," :wink: ",[]),new i(`greddy`,""," :greddy: ",[]),new i(`awkward`,""," :awkward: ",[]),new i(`sweat`,""," :sweat: ",[]),new i(`pick nose`,""," :pick nose: ",[]),new i(`hum`,""," :hum: ",[]),new i(`angry`,""," :angry: ",[]),new i(`grievance`,""," :grievance: ",[]),new i(`poor`,""," :poor: ",[]),new i(`disappoint`,""," :disappoint: ",[]),new i(`sad`,""," :sad: ",[]),new i(`tear`,""," :tear: ",[]),new i(`no way`,""," :no way: ",[]),new i(`shy`,""," :shy: ",[]),new i(`dirt`,""," :dirt: ",[]),new i(`love you`,""," :love you: ",[]),new i(`kiss`,""," :kiss: ",[]),new i(`amorousness`,""," :amorousness: ",[]),new i(`longing`,""," :longing: ",[]),new i(`desire`,""," :desire: ",[]),new i(`bad laugh`,""," :bad laugh: ",[]),new i(`blackness`,""," :blackness: ",[]),new i(`laugh without word`,""," :laugh without word: ",[]),new i(`titter`,""," :titter: ",[]),new i(`cool`,""," :cool: ",[]),new i(`not easy`,""," :not easy: ",[]),new i(`think`,""," :think: ",[]),new i(`question`,""," :question: ",[]),new i(`no idea`,""," :no idea: ",[]),new i(`dizzy`,""," :dizzy: ",[]),new i(`bomb`,""," :bomb: ",[]),new i(`bone`,""," :bone: ",[]),new i(`be quiet`,""," :be quiet: ",[]),new i(`shut up`,""," :shut up: ",[]),new i(`stupid`,""," :stupid: ",[]),new i(`surprise `,""," :surprise : ",[]),new i(`vomit`,""," :vomit: ",[]),new i(`cold`,""," :cold: ",[]),new i(`sick`,""," :sick: ",[]),new i(`bye`,""," :bye: ",[]),new i(`look down on`,""," :look down on: ",[]),new i(`white eye`,""," :white eye: ",[]),new i(`left hum`,""," :left hum: ",[]),new i(`right hum`,""," :right hum: ",[]),new i(`crazy`,""," :crazy: ",[]),new i(`scold `,""," :scold : ",[]),new i(`hit on face`,""," :hit on face: ",[]),new i(`wow`,""," :wow: ",[]),new i(`fan`,""," :fan: ",[]),new i(`money`,""," :money: ",[]),new i(`yawn`,""," :yawn: ",[]),new i(`sleepy`,""," :sleepy: ",[]),new i(`sleep`,""," :sleep: ",[]),new i(`watermelon `,""," :watermelon : ",[]),new i(`doge`,""," :doge: ",[]),new i(`dog`,""," :dog: ",[]),new i(`cat`,""," :cat: ",[]),new i(`thumb`,""," :thumb: ",[]),new i(`good`,""," :good: ",[]),new i(`ok`,""," :ok: ",[]),new i(`yeah`,""," :yeah: ",[]),new i(`shack hand`,""," :shack hand: ",[]),new i(`bow`,""," :bow: ",[]),new i(`come`,""," :come: ",[]),new i(`punch`,""," :punch: ",[])]},"2c92":function(e,t,n){"use strict";var i=n("e9ac"),r=i("%Reflect.construct%",!0),o=n("4906");try{o({},"",{"[[Get]]":function(){}})}catch(l){o=null}if(o&&r){var a={},s={};o(s,"length",{"[[Get]]":function(){throw a},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,s)}catch(t){return t===a}}}else e.exports=function(e){return"function"===typeof e&&!!e.prototype}},"2d83":function(e,t,n){"use strict";var i=n("387f");e.exports=function(e,t,n,r,o){var a=new Error(e);return i(a,t,n,r,o)}},"2e67":function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"30b5":function(e,t,n){"use strict";var i=n("c532");function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(i.isURLSearchParams(t))o=t.toString();else{var a=[];i.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),a.push(r(t)+"="+r(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},"35d6":function(e,t,n){"use strict";function i(e,t){for(var n=[],i={},r=0;rimg{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:rgba(0,0,0,.5);overflow:hidden}.viewer-list{-webkit-box-sizing:content-box;box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;-webkit-transition:opacity .15s;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;right:0;z-index:1}.viewer-player,.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;-webkit-transition:background-color .15s;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:rgba(0,0,0,.8)}.viewer-toolbar>ul>li:focus{-webkit-box-shadow:0 0 3px #fff;box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:rgba(0,0,0,.8);border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1;margin:0 5% 5px;max-width:90%;opacity:.8;overflow:hidden;text-overflow:ellipsis;-webkit-transition:opacity .15s;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;-webkit-transition:background-color .15s;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:rgba(0,0,0,.8)}.viewer-button:focus{-webkit-box-shadow:0 0 3px #fff;box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:rgba(0,0,0,.5)}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:-webkit-grab;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{-webkit-transition:all .3s;transition:all .3s}@-webkit-keyframes viewer-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes viewer-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.viewer-loading:after{-webkit-animation:viewer-spinner 1s linear infinite;animation:viewer-spinner 1s linear infinite;border:4px solid hsla(0,0%,100%,.1);border-left-color:hsla(0,0%,100%,.5);border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width:767px){.viewer-hide-xs-down{display:none}}@media (max-width:991px){.viewer-hide-sm-down{display:none}}@media (max-width:1199px){.viewer-hide-md-down{display:none}}',""]),e.exports=t},4362:function(e,t,n){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,i="/";t.cwd=function(){return i},t.chdir=function(t){e||(e=n("df7c")),i=e.resolve(t,i)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"467f":function(e,t,n){"use strict";var i=n("2d83");e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},4906:function(e,t,n){"use strict";var i=n("00ce"),r=i("%TypeError%"),o=n("fffd"),a=n("2a6d"),s=n("9dc9"),l=n("9c74"),c=n("3e4b"),u=n("63d2"),m=n("dbbe"),h=n("ee7e"),p=n("3d27");e.exports=function(e,t,n){if("Object"!==p(e))throw new r("Assertion failed: Type(O) is not Object");if(!u(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var i=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:l},n)?n:h(n);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:l},i))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return a(c,m,s,e,t,i)}},"4a0c":function(e){e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},"4a7b":function(e,t,n){"use strict";var i=n("c532");e.exports=function(e,t){t=t||{};var n={},r=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function c(r){i.isUndefined(t[r])?i.isUndefined(e[r])||(n[r]=l(void 0,e[r])):n[r]=l(e[r],t[r])}i.forEach(r,(function(e){i.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),i.forEach(o,c),i.forEach(a,(function(r){i.isUndefined(t[r])?i.isUndefined(e[r])||(n[r]=l(void 0,e[r])):n[r]=l(void 0,t[r])})),i.forEach(s,(function(i){i in t?n[i]=l(e[i],t[i]):i in e&&(n[i]=l(void 0,e[i]))}));var u=r.concat(o).concat(a).concat(s),m=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return i.forEach(m,c),n}},5156:function(e,t,n){"use strict";var i="undefined"!==typeof Symbol&&Symbol,r=n("1696");e.exports=function(){return"function"===typeof i&&("function"===typeof Symbol&&("symbol"===typeof i("foo")&&("symbol"===typeof Symbol("bar")&&r())))}},5183:function(e,t,n){"use strict";e.exports=function(e){return null===e?"Null":"undefined"===typeof e?"Undefined":"function"===typeof e||"object"===typeof e?"Object":"number"===typeof e?"Number":"boolean"===typeof e?"Boolean":"string"===typeof e?"String":void 0}},"522d":function(e,t,n){"use strict";var i=n("be77"),r=n("8926"),o=n("f367");e.exports=function(){i();var e=r();return o(Promise.prototype,{finally:e},{finally:function(){return Promise.prototype["finally"]!==e}}),e}},5270:function(e,t,n){"use strict";var i=n("c532"),r=n("c401"),o=n("2e67"),a=n("2444");function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){s(e),e.headers=e.headers||{},e.data=r.call(e,e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||a.adapter;return t(e).then((function(t){return s(e),t.data=r.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=r.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"545e":function(e,t,n){"use strict";var i=n("00ce"),r=n("3eb1"),o=r(i("String.prototype.indexOf"));e.exports=function(e,t){var n=i(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?r(n):n}},"5a74":function(e,t,n){"use strict";if(n.r(t),"undefined"!==typeof window){var i=window.document.currentScript;if(Object({NODE_ENV:"production",BASE_URL:"/"}).NEED_CURRENTSCRIPT_POLYFILL){var r=n("8875");i=r(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:r})}var o=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var a=n("8bbf"),s=n.n(a);const l=/-(\w)/g,c=e=>e.replace(l,(e,t)=>t?t.toUpperCase():""),u=/\B([A-Z])/g,m=e=>e.replace(u,"-$1").toLowerCase();function h(e){const t={};return e.forEach(e=>{t[e]=void 0}),t}function p(e,t,n){e[t]=[].concat(e[t]||[]),e[t].unshift(n)}function d(e,t){if(e){const n=e.$options[t]||[];n.forEach(t=>{t.call(e)})}}function f(e,t){return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t})}const g=e=>/function Boolean/.test(String(e)),b=e=>/function Number/.test(String(e));function w(e,t,{type:n}={}){if(g(n))return"true"===e||"false"===e?"true"===e:""===e||e===t||null!=e||e;if(b(n)){const t=parseFloat(e,10);return isNaN(t)?e:t}return e}function v(e,t){const n=[];for(let i=0,r=t.length;i(e[t]=s[n[i]],e),{}),p(t,"beforeCreate",(function(){const e=this.$emit;this.$emit=(t,...n)=>(this.$root.$options.customElement.dispatchEvent(f(t,n)),e.call(this,t,...n))})),p(t,"created",(function(){r.forEach(e=>{this.$root.props[e]=this[e]})})),r.forEach(e=>{Object.defineProperty(u.prototype,e,{get(){return this._wrapper.props[e]},set(t){this._wrapper.props[e]=t},enumerable:!1,configurable:!0})}),a=!0}function l(e,t){const n=c(t),i=e.hasAttribute(t)?e.getAttribute(t):void 0;e._wrapper.props[n]=w(i,t,o[n])}class u extends HTMLElement{constructor(){const n=super();n.attachShadow({mode:"open"});const i=n._wrapper=new e({name:"shadow-root",customElement:n,shadowRoot:n.shadowRoot,data(){return{props:{},slotChildren:[]}},render(e){return e(t,{ref:"inner",props:this.props},this.slotChildren)}}),r=new MutationObserver(e=>{let t=!1;for(let i=0;i{e.props=h(r),i.forEach(e=>{l(this,e)})};a?n():t().then(e=>{(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),s(e),n()}),e.slotChildren=Object.freeze(v(e.$createElement,this.childNodes)),e.$mount(),this.shadowRoot.appendChild(e.$el)}}disconnectedCallback(){d(this.vueComponent,"deactivated")}}return n||s(t),u}var D=A;n("24fb"),n("35d6");function k(e,t,n,i,r,o,a,s){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):r&&(l=s?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var m=c.beforeCreate;c.beforeCreate=m?[].concat(m,l):[l]}return{exports:e,options:c}}var C=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"halo-comment",attrs:{id:"halo-comment"}},[n("div",{staticClass:"comment-count"},[n("span",{staticClass:"vnum",domProps:{innerHTML:e._s(e.commentCount)}}),e._v(" 条评论 ")]),e.mergedConfigs.autoLoad||e.loaded?e._e():n("div",{staticClass:"comment-load-button"},[n("a",{staticClass:"button-load",attrs:{href:"javascript:void(0)",rel:"nofollow noopener"},on:{click:e.loadComments}},[e._v("加载评论")])]),n("comment-loading",{directives:[{name:"show",rawName:"v-show",value:e.commentLoading,expression:"commentLoading"}],attrs:{configs:"string"===typeof e.configs?JSON.parse(e.configs):e.configs}}),e.comments.length>=1?n("ol",{ref:"gallery",staticClass:"comment-nodes",attrs:{id:"comment-nodes"}},[e._l(e.comments,(function(t,i){return[n("CommentNode",{key:i,attrs:{targetId:e.id,target:e.target,comment:t,options:e.options,configs:e.mergedConfigs}})]}))],2):e._e(),e.loaded&&!e.commentLoading&&e.comments.length<=0?n("div",{staticClass:"comment-empty"},[e._v("暂无评论")]):e._e(),e.pagination.pages>1?n("div",{staticClass:"comment-page"},[n("pagination",{attrs:{page:e.pagination.page,size:e.pagination.size,total:e.pagination.total},on:{change:e.handlePaginationChange}})],1):e._e(),n("comment-editor",{attrs:{targetId:e.id,target:e.target,options:e.options,configs:e.mergedConfigs}}),n("div",{staticClass:"edition"},[n("a",{attrs:{href:"https://github.com/cetr/halo-comment-yu#readme",target:"_blank"}},[e._v("Yu")]),e._v(" "+e._s(e.alexVersion)+" ")])],1)},E=[],F=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"comment-editor",attrs:{role:"form"}},[n("div",{staticClass:"inner"},[n("h4",{staticClass:"comment-reply-title"},[e._v("发表评论")]),n("form",{staticClass:"comment-form"},[n("div",{staticClass:"comment-textarea"},[e._m(0),e.previewMode?n("div",{staticClass:"markdown-body comment-preview isPreview",domProps:{innerHTML:e._s(e.renderedContent)}}):n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.comment.content,expression:"comment.content"}],ref:"commentTextarea",staticClass:"comment-preview",staticStyle:{display:"block",margin:"0"},style:{height:e.textareaHeight},attrs:{id:"comment",required:"required","aria-required":"true",tabindex:"4",placeholder:e.options.comment_content_placeholder||"撰写评论..."},domProps:{value:e.comment.content},on:{input:function(t){t.target.composing||e.$set(e.comment,"content",t.target.value)}}})]),n("ul",{staticClass:"comment-buttons"},[n("li",{staticClass:"middle",staticStyle:{"margin-right":"5px"}},[n("div",{staticClass:"preview-btn",class:{actived:e.previewMode},attrs:{href:"javascript:void(0)",rel:"nofollow noopener"},on:{click:e.handlePreviewContent}},[n("span",{staticClass:"comment-icon"},[n("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"17688",width:"16",height:"16"}},[n("path",{attrs:{d:"M502.390154 935.384615a29.538462 29.538462 0 1 1 0 59.076923H141.430154C79.911385 994.461538 29.538462 946.254769 29.538462 886.153846V137.846154C29.538462 77.745231 79.950769 29.538462 141.390769 29.538462h741.218462c61.44 0 111.852308 48.206769 111.852307 108.307692v300.268308a29.538462 29.538462 0 1 1-59.076923 0V137.846154c0-26.899692-23.355077-49.230769-52.775384-49.230769H141.390769c-29.420308 0-52.775385 22.331077-52.775384 49.230769v748.307692c0 26.899692 23.355077 49.230769 52.775384 49.230769h360.999385z","p-id":"17689"}}),n("path",{attrs:{d:"M196.923077 216.615385m29.538461 0l374.153847 0q29.538462 0 29.538461 29.538461l0 0q0 29.538462-29.538461 29.538462l-374.153847 0q-29.538462 0-29.538461-29.538462l0 0q0-29.538462 29.538461-29.538461Z","p-id":"17690"}}),n("path",{attrs:{d:"M649.846154 846.769231a216.615385 216.615385 0 1 0 0-433.230769 216.615385 216.615385 0 0 0 0 433.230769z m0 59.076923a275.692308 275.692308 0 1 1 0-551.384616 275.692308 275.692308 0 0 1 0 551.384616z","p-id":"17691"}}),n("path",{attrs:{d:"M807.398383 829.479768m20.886847-20.886846l0 0q20.886846-20.886846 41.773692 0l125.321079 125.321079q20.886846 20.886846 0 41.773693l0 0q-20.886846 20.886846-41.773693 0l-125.321078-125.321079q-20.886846-20.886846 0-41.773693Z","p-id":"17692"}})])]),n("span",{staticClass:"comment-text"},[e._v("预览")])]),n("div",{staticClass:"emoji-btn",class:{actived:e.showEmoji},attrs:{href:"javascript:void(0)",rel:"nofollow noopener"},on:{click:e.handleToogleDialogEmoji}},[n("span",{staticClass:"comment-icon"},[n("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"16172",width:"16",height:"16"}},[n("path",{attrs:{d:"M512 1024a512 512 0 1 1 512-512 512 512 0 0 1-512 512zM512 56.888889a455.111111 455.111111 0 1 0 455.111111 455.111111 455.111111 455.111111 0 0 0-455.111111-455.111111zM312.888889 512A85.333333 85.333333 0 1 1 398.222222 426.666667 85.333333 85.333333 0 0 1 312.888889 512z","p-id":"16173"}}),n("path",{attrs:{d:"M512 768A142.222222 142.222222 0 0 1 369.777778 625.777778a28.444444 28.444444 0 0 1 56.888889 0 85.333333 85.333333 0 0 0 170.666666 0 28.444444 28.444444 0 0 1 56.888889 0A142.222222 142.222222 0 0 1 512 768z","p-id":"16174"}}),n("path",{attrs:{d:"M782.222222 391.964444l-113.777778 59.733334a29.013333 29.013333 0 0 1-38.684444-10.808889 28.444444 28.444444 0 0 1 10.24-38.684445l113.777778-56.888888a28.444444 28.444444 0 0 1 38.684444 10.24 28.444444 28.444444 0 0 1-10.24 36.408888z","p-id":"16175"}}),n("path",{attrs:{d:"M640.568889 451.697778l113.777778 56.888889a27.875556 27.875556 0 0 0 38.684444-10.24 27.875556 27.875556 0 0 0-10.24-38.684445l-113.777778-56.888889a28.444444 28.444444 0 0 0-38.684444 10.808889 28.444444 28.444444 0 0 0 10.24 38.115556z","p-id":"16176"}})])]),n("span",{staticClass:"comment-text"},[e._v("表情")])])]),n("li",{staticClass:"middle"})]),n("div",{staticClass:"comment-emoji-wrap"},[n("VEmojiPicker",{directives:[{name:"show",rawName:"v-show",value:e.emojiDialogVisible,expression:"emojiDialogVisible"}],attrs:{pack:e.emojiPack},on:{select:e.handleSelectEmoji}})],1),n("div",{staticClass:"author-info"},[n("div",{staticClass:"commentator commentator-author"},[e._m(1),n("span",{staticClass:"input-avatar"},[n("img",{staticClass:"avatar-img",attrs:{src:e.avatar}})]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.comment.author,expression:"comment.author"}],staticClass:"comment-input author ",attrs:{type:"text",id:"author",tabindex:"1",required:"required","aria-required":"true",placeholder:"填写QQ号自动获取昵称和邮箱"},domProps:{value:e.comment.author},on:{blur:e.pullInfo,input:function(t){t.target.composing||e.$set(e.comment,"author",t.target.value)}}})]),n("div",{staticClass:"commentator commentator-email"},[e._m(2),n("input",{directives:[{name:"model",rawName:"v-model",value:e.comment.email,expression:"comment.email"}],staticClass:"comment-input email",attrs:{type:"text",id:"email",tabindex:"2",required:"required","aria-required":"true",placeholder:"用于获取头像和接收回复通知"},domProps:{value:e.comment.email},on:{blur:e.pullInfo,input:function(t){t.target.composing||e.$set(e.comment,"email",t.target.value)}}})]),n("div",{staticClass:"commentator commentator-authorUrl"},[n("label",{attrs:{for:"authorUrl"}},[e._v("地址")]),n("input",{directives:[{name:"model",rawName:"v-model",value:e.comment.authorUrl,expression:"comment.authorUrl"}],staticClass:"comment-input link",attrs:{type:"text",id:"authorUrl",tabindex:"3",placeholder:"网站或博客地址"},domProps:{value:e.comment.authorUrl},on:{input:function(t){t.target.composing||e.$set(e.comment,"authorUrl",t.target.value)}}})])]),n("div",{staticClass:"comment-buttons SubmitBtn"},[n("button",{staticClass:"button-submit",attrs:{href:"javascript:void(0)",tabindex:"5",rel:"nofollow noopener",type:"button"},on:{click:e.handleSubmitClick}},[e._v("发表评论 ")])]),n("div",{staticClass:"comment-alert"},[e.infoAlertVisiable?e._l(e.infoes,(function(t,i){return n("div",{key:i,staticClass:"alert info"},[n("span",{staticClass:"closebtn",on:{click:e.clearAlertClose}},[e._v("×")]),n("strong",[e._v(e._s(t))])])})):e._e(),e.successAlertVisiable?e._l(e.successes,(function(t,i){return n("div",{key:i,staticClass:"alert success"},[n("span",{staticClass:"closebtn",on:{click:e.clearAlertClose}},[e._v("×")]),n("strong",[e._v(e._s(t))])])})):e._e(),e.warningAlertVisiable?e._l(e.warnings,(function(t,i){return n("div",{key:i,staticClass:"alert warning"},[n("span",{staticClass:"closebtn",on:{click:e.clearAlertClose}},[e._v("×")]),n("strong",[e._v(e._s(t))])])})):e._e()],2)])])])},j=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",[e._v("评论 "),n("span",[e._v("*")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{attrs:{for:"author"}},[e._v(" 名称 "),n("span",[e._v("*")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{attrs:{for:"email"}},[e._v(" 邮箱 "),n("span",[e._v("*")])])}],_=n("0e54"),S=n.n(_),z=n("6821"),B=n.n(z),T=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"EmojiPicker"}},[e.showCategory?n("Categories",{on:{select:function(t){return e.onChangeCategory(t)}}}):e._e(),n("EmojiList",{attrs:{data:e.emojis,category:e.category,filter:e.filterEmoji,emojisByRow:e.emojisByRow,continuousList:e.continuousList},on:{select:function(t){return e.onSelectEmoji(t)}}})],1)},O=[],P=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"Categories"}},e._l(e.categories,(function(t,i){return n("div",{key:i,class:["category",{active:i===e.active}],on:{click:function(t){return e.onSelect(i)}}},[n("VSvg",{attrs:{name:t.icon}})],1)})),0)},I=[],M=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{style:e.styleSVG,attrs:{id:"VSvg"},domProps:{innerHTML:e._s(e.icon)}})},$=[];const R={activity:'\n \n \n \n \n ',flags:'\n \n \n \n ',foods:'\n \n \n \n \n ',frequenty:'\n \n \n \n \n ',nature:'\n \n \n \n ',objects:'\n \n \n \n ',peoples:'\n \n \n \n ',places:'\n \n \n \n ',symbols:'\n \n \n \n '};var N={name:"VSvg",props:{name:{type:String,required:!0},styles:{type:Object}},computed:{icon(){return R[this.name]},styleSVG(){return{...this.styles}}}},L=N;function q(e){}var U=k(L,M,$,!1,q,null,null,!0),Y=U.exports,H={name:"Categories",components:{VSvg:Y},data:()=>({categories:[{name:"Frequenty",icon:"frequenty"},{name:"Peoples",icon:"peoples"},{name:"Nature",icon:"nature"},{name:"Foods",icon:"foods"},{name:"Activity",icon:"activity"},{name:"Objects",icon:"objects"},{name:"Places",icon:"places"},{name:"Symbols",icon:"symbols"},{name:"Flags",icon:"flags"}],active:1}),methods:{onSelect(e){this.active=e;const t=this.categories[e];this.$emit("select",t)}}},V=H;function W(e){}var X=k(V,P,I,!1,W,null,null,!0),G=X.exports,Z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"Emojis"}},[n("div",{ref:"container-emoji",staticClass:"container-emoji"},[e.continuousList?e._l(e.dataFilteredByCategory,(function(t,i){return n("div",{key:i,staticClass:"category-line"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.length,expression:"category.length"}],ref:""+("undefined"==i?"":i),refInFor:!0,staticClass:"category-title",class:""+("undefined"==i?"":i)},[e._v(" "+e._s("undefined"==i?"":i)+" ")]),t.length?n("div",{staticClass:"grid-emojis"},e._l(t,(function(t,r){return n("Emoji",{key:i+"-"+r,attrs:{data:t},nativeOn:{click:function(n){return e.onSelect(t)}}})})),1):e._e()])})):n("div",{staticClass:"grid-emojis"},e._l(e.dataFiltered,(function(t,i){return n("Emoji",{key:i,attrs:{data:t},nativeOn:{click:function(n){return e.onSelect(t)}}})})),1)],2)])},J=[],Q=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"emoji",class:e.data["category"],domProps:{innerHTML:e._s(e.data["emoji"])}})},K=[],ee={name:"Emoji",props:{data:{type:String}}},te=ee;function ne(e){}var ie=k(te,Q,K,!1,ne,null,null,!0),re=ie.exports,oe={name:"EmojiList",components:{Emoji:re},props:{data:{type:Object,required:!0},emojisByRow:{type:Number,required:!0},filter:{type:String},continuousList:{type:Boolean},category:{type:String}},methods:{onSelect(e){this.$emit("select",e)}},computed:{dataFiltered(){let e=this.data[this.category];const t=this.filter.trim();return t&&(e=e.filter(e=>e.aliases.some(e=>e.includes(t.toLowerCase())))),e},dataFilteredByCategory(){let e=Object.assign({},this.data);const t=this.filter.trim();return t&&this.categories.forEach(n=>{e[n]=this.data[n].filter(e=>e.aliases.some(e=>e.includes(t.toLowerCase())))}),e},categories(){return Object.keys(this.data)}},watch:{data(){this.$refs["container-emoji"].scrollTop=0},category(e){if(this.continuousList){const t=this.$refs[e][0],n=t.offsetTop-80;this.$refs["container-emoji"].scrollTop=n}}}},ae=oe;function se(e){}var le=k(ae,Z,J,!1,se,null,null,!0),ce=le.exports,ue={name:"VEmojiPicker",props:{pack:{type:Array,required:!1},labelSearch:{type:String},showCategory:{type:Boolean,default:!1},emojisByRow:{type:Number,default:10},showSearch:{type:Boolean,default:()=>!1},continuousList:{type:Boolean,default:()=>!0}},components:{Categories:G,EmojiList:ce},data:()=>({mapEmojis:{},category:"Peoples",filterEmoji:""}),created(){this.mapperData(this.pack)},methods:{onChangeCategory(e){this.category=e.name,this.$emit("changeCategory",this.category)},onSelectEmoji(e){this.$emit("select",e)},updateFrequenty(e){this.mapEmojis["Frequenty"]=[...new Set([...this.mapEmojis["Frequenty"],e])]},mapperData(e){this.$set(this.mapEmojis,"Frequenty",[]),e.forEach(e=>{const t=e["category"];this.mapEmojis[t]?this.mapEmojis[t].push(e):this.$set(this.mapEmojis,t,[e])})}},beforeDestroy(){delete this.mapEmojis},computed:{emojis(){return this.mapEmojis}}},me=ue;function he(e){}var pe=k(me,T,O,!1,he,null,null,!0),de=pe.exports,fe=n("2c44");function ge(e){var t=(new Date).getTime(),n=t-e,i=Math.floor(n/864e5);if(0===i){var r=n%864e5,o=Math.floor(r/36e5);if(0===o){var a=r%36e5,s=Math.floor(a/6e4);if(0===s){var l=a%6e4,c=Math.round(l/1e3);return c+" 秒前"}return s+" 分钟前"}return o+" 小时前"}return i<0?"刚刚":i<1?i+" 天前":be(e,"yyyy/MM/dd hh:mm")}function be(e,t){e=new Date(e),/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));let n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(let i in n)if(new RegExp(`(${i})`).test(t)){let e=n[i]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?e:we(e))}return t}function we(e){return("00"+e).substr(e.length)}function ve(e){return null===e||void 0===e||""===e}function ye(e){return e&&"object"===typeof e&&e.constructor===Object}function xe(e){var t=/^[A-Za-z1-9]+([-_.][A-Za-z1-9]+)*@([A-Za-z1-9]+[-.])+[A-Za-z]{2,8}$/;return t.test(e)}function Ae(e){var t,n=document.createElement("div");return n.innerHTML=e,t=n.innerText||n.textContent,n=null,t}function De(e){const t=n("2c44");for(let n=0;n","g"),">"),e}var Ce=n("bc3a"),Ee=n.n(Ce);n("09bd").shim();const Fe=Ee.a.create({baseURL:"",timeout:5e3,withCredentials:!0});Fe.interceptors.request.use(e=>e,e=>Promise.reject(e)),Fe.interceptors.response.use(e=>e,e=>{if(Ee.a.isCancel(e))return Promise.reject(e);const t=e.response,n=t?t.data:null;return n&&(400===n.status||401===n.status||403===n.status||404===n.status||n.status),Promise.reject(e)});var je=Fe;const _e="/api/content",Se={createComment:(e,t)=>je({url:`${_e}/${e}/comments`,method:"post",data:t}),listComments:(e,t,n="tree_view",i)=>je({url:`${_e}/${e}/${t}/comments/${n}`,params:i,method:"get"})};var ze=Se,Be=n("19e9"),Te=n.n(Be),Oe={name:"CommentEditor",components:{VEmojiPicker:de},props:{targetId:{type:Number,required:!1,default:0},target:{type:String,required:!1,default:"posts",validator:function(e){return-1!==["posts","sheets","journals"].indexOf(e)}},replyComment:{type:Object,required:!1,default:()=>{}},options:{required:!1,default:[]},configs:{type:Object,required:!0}},data(){return{emojiPack:fe["default"],emojiDialogVisible:!1,comment:{author:null,authorUrl:null,email:null,content:""},previewMode:!1,showEmoji:!1,infoes:[],warnings:[],successes:[]}},computed:{renderedContent(){let e=this.comment.content?S()(ke(this.comment.content)):"";return De(e)},avatar(){let e=this.options.comment_gravatar_default;const t=this.options.gravatar_source||"//cn.gravatar.com/avatar/";if(!this.comment.email||!xe(this.comment.email))return`${t}?s=256&d=${e}`;const n=B()(this.comment.email);return`${t}${n}?s=256&d=${e}`},commentValid(){return!ve(this.comment.author)&&!ve(this.comment.email)&&!ve(this.comment.content)},infoAlertVisiable(){return null!==this.infoes&&this.infoes.length>0},warningAlertVisiable(){return null!==this.warnings&&this.warnings.length>0},successAlertVisiable(){return null!==this.successes&&this.successes.length>0}},created(){var e=localStorage.getItem("comment-author"),t=localStorage.getItem("comment-authorUrl"),n=localStorage.getItem("comment-email");this.comment.author=e||"",this.comment.authorUrl=t||"",this.comment.email=n||""},mounted(){Te()(document.querySelector("textarea"))},methods:{handleSubmitClick(){if(ve(this.comment.author))return void this.warnings.push("评论者昵称不能为空");if(ve(this.comment.email))return void this.warnings.push("邮箱不能为空");if(ve(this.comment.content))return void this.warnings.push("评论内容不能为空");const e=ke(this.comment.content);this.comment.postId=this.targetId,this.replyComment&&(this.comment.parentId=this.replyComment.id),ze.createComment(this.target,{...this.comment,content:e}).then(e=>{localStorage.setItem("comment-author",this.comment.author),localStorage.setItem("comment-email",this.comment.email),localStorage.setItem("comment-authorUrl",this.comment.authorUrl),this.comment.content="",this.handleCommentCreated(e.data.data)}).catch(e=>{this.handleFailedToCreateComment(e.response)})},handlePreviewContent(){this.previewMode=!this.previewMode,this.showEmoji=!1,this.emojiDialogVisible=!1},handleCommentCreated(e){this.clearAlertClose(),"PUBLISHED"===e.status?this.successes.push("评论成功,刷新即可显示最新评论!"):this.infoes.push("您的评论已经投递至博主,等待博主审核!")},handleFailedToCreateComment(e){if(this.clearAlertClose(),400===e.status&&(this.warnings.push(e.data.message),e.data)){const t=e.data.data;ye(t)&&Object.keys(t).forEach(e=>{this.warnings.push(t[e])})}},handleToogleDialogEmoji(){this.previewMode=!1,this.showEmoji=!this.showEmoji,this.emojiDialogVisible=!this.emojiDialogVisible},handleSelectEmoji(e){null!=e.aliases&&""!=e.aliases?this.comment.content+=e.aliases:this.comment.content+=e.emoji},pullInfo(){let e=this.comment.author;0!=e.length&&/^[1-9][0-9]{4,9}$/gim.test(e)&&this.pullQQInfo(()=>{this.warnings.push("拉取QQ信息失败!")})},pullQQInfo(e){let t=this;Ee.a.get("https://api.coor.top/qqinfo",{params:{qq:t.comment.author}}).then((function(n){let i=n.data;i.code&&500==i.code&&e(),t.comment.author=i.nickname,t.comment.email=i.email})).catch(()=>{e()})},clearAlertClose(){this.infoes=[],this.warnings=[],this.successes=[]}}},Pe=Oe,Ie=k(Pe,F,j,!1,null,null,null,!0),Me=Ie.exports,$e=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{staticClass:"comment",class:e.isChild?"":"index-1",attrs:{id:"li-comment-"+e.comment.id,itemtype:"http://schema.org/Comment",itemprop:"comment"}},[n("div",{staticClass:"comment-body",attrs:{id:"comment-"+e.comment.id}},[n("div",{staticClass:"comment-avatar"},[n("img",{staticClass:"avatar",attrs:{alt:e.comment.author+"'s avatar",src:e.avatar}})]),n("div",{staticClass:"contain-main"},[n("div",{staticClass:"comment-meta"},[n("div",{staticClass:"comment-author",attrs:{itemprop:"author"}},[null!=e.comment.authorUrl&&""!=e.comment.authorUrl?n("a",{staticClass:"author-name",attrs:{href:e.comment.authorUrl,rel:"nofollow",target:"_blank"}},[e._v(e._s(e.comment.author))]):n("a",{staticClass:"author-name"},[e._v(e._s(e.comment.author))]),e.comment.isAdmin?n("span",{staticClass:"is-admin"},[e._v("博主")]):e._e(),e.configs.showUserAgent?n("span",{staticClass:"useragent-info"},[e._v(e._s(e.compileUserAgent)+" ")]):e._e()]),n("div",{staticClass:"comment-info"},[n("time",{staticClass:"comment-time",attrs:{itemprop:"datePublished",datetime:e.comment.createTime}},[e._v(e._s(this.timeAgo(e.comment.createTime))+" ")])])]),n("div",{staticClass:"comment-content markdown-body",attrs:{itemprop:"description"},domProps:{innerHTML:e._s(e.compileContent)}}),n("div",{staticClass:"comment-info"},[n("span",{staticClass:"comment-reply",on:{click:e.handleReplyClick}},[e._v(e._s(e.editing?"取消回复":"回复"))])])])]),e.editing?n("comment-editor",{attrs:{targetId:e.targetId,target:e.target,replyComment:e.comment,options:e.options,configs:e.configs}}):e._e(),e.comment.children?n("ol",{staticClass:"children"},[e._l(e.comment.children,(function(t,i){return[n("CommentNode",{key:i,attrs:{isChild:!0,targetId:e.targetId,target:e.target,comment:t,options:e.options,configs:e.configs}})]}))],2):e._e()],1)},Re=[],Ne=n("2b80"),Le=n.n(Ne),qe={name:"CommentNode",props:{isChild:{type:Boolean,required:!1,default:!1},targetId:{type:Number,required:!1,default:0},target:{type:String,required:!1,default:"posts",validator:function(e){return-1!==["posts","sheets","journals"].indexOf(e)}},comment:{type:Object,required:!1,default:()=>{}},options:{type:Object,required:!1,default:()=>{}},configs:{type:Object,required:!0}},data(){return{editing:!1}},computed:{avatar(){let e=this.options.comment_gravatar_default;const t=this.options.gravatar_source||"//cn.gravatar.com/avatar/";return`${t}${this.comment.gravatarMd5}?s=256&d=${e}`},compileContent(){var e="";null!==this.comment.parentId&&this.comment.parentId>0&&(e="@"+this.comment.parentAuthor+"");let t=e+S()(Ae(this.comment.content));return De(t)},createTimeAgo(){return ge(this.comment.createTime)},compileUserAgent(){var e=new Le.a;e.setUA(this.comment.userAgent);var t=e.getResult();return t.browser.name+" "+t.browser.version+" in "+t.os.name+" "+t.os.version}},methods:{handleReplyClick(){this.editing=!this.editing},timeAgo(e){const t=6e4,n=60*t,i=24*n,r=7*i,o=30*i,a=(new Date).getTime(),s=a-e;if(s<0)return;const l=s/t,c=s/n,u=s/i,m=s/r,h=s/o;let p;if(h>=1&&h<=3)p=" "+parseInt(h)+"月前";else if(m>=1&&m<=4)p=m>4?" "+Math.floor(m)+"周前":" "+parseInt(m)+"周前";else if(u>=1&&u<=6)p=" "+parseInt(u)+"天前";else if(c>=1&&c<=23)p=" "+parseInt(c)+"小时前";else if(l>=1&&l<=59)p=" "+parseInt(l)+"分钟前";else if(s>=0&&s<=t)p="刚刚";else{var d=new Date;d.setTime(e);var f=d.getFullYear(),g=d.getMonth()+1<10?"0"+(d.getMonth()+1):d.getMonth()+1,b=d.getDate()<10?"0"+d.getDate():d.getDate(),w=d.getHours()<10?"0"+d.getHours():d.getHours(),v=d.getMinutes()<10?"0"+d.getMinutes():d.getMinutes(),y=d.getSeconds()<10?"0"+d.getSeconds():d.getSeconds();p=f+"/"+g+"/"+b+" "+w+":"+v+":"+y}return p}}},Ue=qe,Ye=k(Ue,$e,Re,!1,null,null,null,!0),He=Ye.exports,Ve=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"comment-loader-container"},["default"===e.configs.loadingStyle?n("div",{staticClass:"comment-loader-default"},[n("span"),n("span"),n("span"),n("span")]):"circle"===e.configs.loadingStyle?n("div",{staticClass:"comment-loader-circle"}):"balls"===e.configs.loadingStyle?n("div",{staticClass:"comment-loader-balls"},[n("div"),n("div"),n("div")]):e._e()])},We=[],Xe={name:"CommentLoading",props:{configs:{type:Object,required:!0}}},Ge=Xe,Ze=k(Ge,Ve,We,!1,null,null,null,!0),Je=Ze.exports,Qe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",{staticClass:"page"},[n("li",{staticClass:"page-item",class:{disabled:!e.hasPrev}},[n("a",{staticClass:"prev-button",attrs:{tabindex:"-1"},on:{click:e.handlePrevClick}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M9.78 12.78a.75.75 0 01-1.06 0L4.47 8.53a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L6.06 8l3.72 3.72a.75.75 0 010 1.06z"}})])])]),null!=e.firstPage?n("li",{staticClass:"page-item",class:{active:e.page===e.firstPage}},[n("a",{class:{active:e.page===e.firstPage},on:{click:function(t){return e.handlePageItemClick(e.firstPage)}}},[e._v(e._s(e.firstPage+1)+" ")])]):e._e(),n("li",{directives:[{name:"show",rawName:"v-show",value:e.hasMorePrev,expression:"hasMorePrev"}],staticClass:"page-item"},[n("a",[e._v(" ... ")])]),e._l(e.middlePages,(function(t){return n("li",{key:t,staticClass:"page-item",class:{active:t===e.page}},[n("a",{class:{active:t===e.page},on:{click:function(n){return e.handlePageItemClick(t)}}},[e._v(" "+e._s(t+1)+" ")])])})),n("li",{directives:[{name:"show",rawName:"v-show",value:e.hasMoreNext,expression:"hasMoreNext"}],staticClass:"page-item"},[n("a",[e._v(" ... ")])]),e.lastPage?n("li",{staticClass:"page-item",class:{active:e.page===e.lastPage}},[n("a",{class:{active:e.page===e.lastPage},on:{click:function(t){return e.handlePageItemClick(e.lastPage)}}},[e._v(" "+e._s(e.lastPage+1)+" ")])]):e._e(),n("li",{staticClass:"page-item",class:{disabled:!e.hasNext}},[n("a",{staticClass:"next-button",on:{click:e.handleNextClick}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"}})])])])],2)},Ke=[],et={name:"Pagination",model:{prop:"page",event:"change"},props:{page:{type:Number,required:!1,default:0},size:{type:Number,required:!1,default:10},total:{type:Number,required:!1,default:0}},data(){return{middleSize:3}},computed:{pages(){return Math.ceil(this.total/this.size)},hasNext(){return this.page0},firstPage(){return 0===this.pages?null:0},hasMorePrev(){return!(null===this.firstPage||this.pages<=this.middleSize+2)&&this.page>=2+this.middleSize/2},hasMoreNext(){return!(null===this.lastPage||this.pages<=this.middleSize+2)&&this.page=this.lastPage-e-1&&(n=this.lastPage-1,t=n-this.middleSize+1),this.range(t,n+1)},lastPage(){return 0===this.pages||1===this.pages?0:this.pages-1}},methods:{handleNextClick(){this.hasNext&&this.$emit("change",this.page+1)},handlePrevClick(){this.hasPrev&&this.$emit("change",this.page-1)},handlePageItemClick(e){this.$emit("change",e)},range(e,t){if(e>=t)return[];const n=[];for(let i=e;i{ot[e]=s.a.component(e,rt[e])});const at="/api/content/options",st={list:()=>je({url:at+"/comment",method:"get"})};var lt=st,ct=n("9224"),ut=n("c82c"),mt=n.n(ut),ht=(n("0808"),{name:"Comment",props:{id:{type:Number,required:!1,default:0},type:{type:String,required:!1,default:"post",validator:function(e){return-1!==["post","sheet","journal"].indexOf(e)}},configs:{type:Object,required:!1,default:()=>({autoLoad:!0,showUserAgent:!0,loadingStyle:"default"})}},data(){return{comments:[],commentAuthor:new Map,pagination:{pages:0,page:0,sort:"",size:5,total:0},commentCount:0,commentLoading:!1,loaded:!1,repliedSuccess:null,replyingComment:null,alexVersion:ct.version,options:{comment_gravatar_default:"mm"}}},computed:{target(){return this.type+"s"},mergedConfigs(){let e=this.configs;return"string"===typeof this.configs&&(e=JSON.parse(this.configs)),Object.assign({autoLoad:!0,showUserAgent:!0,loadingStyle:"default"},e)}},created(){this.mergedConfigs.autoLoad&&this.loadComments(),this.loadOptions()},updated(){const e=this.$refs.gallery;e&&new mt.a(e,{inline:!1,filter(e){const t=e.className+"";return t.indexOf("avatar")<0}})},methods:{loadComments(){this.comments=[],this.commentLoading=!0,ze.listComments(this.target,this.id,"tree_view",this.pagination).then(e=>{this.commentCount=e.data.data.commentCount,this.comments=e.data.data.content,this.pagination.size=e.data.data.rpp,this.pagination.total=e.data.data.total,this.pagination.pages=e.data.data.pages,this.comments&&this.comments.forEach(e=>{this.setCommentAuthor(e)})}).finally(()=>{this.commentLoading=!1,this.loaded=!0})},setCommentAuthor(e){e.children&&(this.commentAuthor.set(e.id,e.author),this.setCommentAuthor(e.children)),e instanceof Array&&(e.forEach(e=>{e.parentId>0&&(e.parentAuthor=this.commentAuthor.get(e.parentId),this.setCommentAuthor(e))}),e.sort(this.sortComment))},sortComment(e,t){return e.id-t.id},loadOptions(){lt.list().then(e=>{this.options=e.data.data})},handlePaginationChange(e){this.pagination.page=e,this.loadComments()}}}),pt=ht;function dt(e){var t=n("a85a");t.__inject__&&t.__inject__(e)}var ft=k(pt,C,E,!1,dt,null,null,!0),gt=ft.exports;window.customElements.define("halo-comment",D(s.a,gt))},"5f02":function(e,t,n){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},"63d2":function(e,t,n){"use strict";e.exports=function(e){return"string"===typeof e||"symbol"===typeof e}},6821:function(e,t,n){(function(){var t=n("00d8"),i=n("9a63").utf8,r=n("044b"),o=n("9a63").bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?o.stringToBytes(e):i.stringToBytes(e):r(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),l=8*e.length,c=1732584193,u=-271733879,m=-1732584194,h=271733878,p=0;p>>24)|4278255360&(s[p]<<24|s[p]>>>8);s[l>>>5]|=128<>>9<<4)]=l;var d=a._ff,f=a._gg,g=a._hh,b=a._ii;for(p=0;p>>0,u=u+v>>>0,m=m+y>>>0,h=h+x>>>0}return t.endian([c,u,m,h])};a._ff=function(e,t,n,i,r,o,a){var s=e+(t&n|~t&i)+(r>>>0)+a;return(s<>>32-o)+t},a._gg=function(e,t,n,i,r,o,a){var s=e+(t&i|n&~i)+(r>>>0)+a;return(s<>>32-o)+t},a._hh=function(e,t,n,i,r,o,a){var s=e+(t^n^i)+(r>>>0)+a;return(s<>>32-o)+t},a._ii=function(e,t,n,i,r,o,a){var s=e+(n^(t|~i))+(r>>>0)+a;return(s<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var i=t.wordsToBytes(a(e,n));return n&&n.asBytes?i:n&&n.asString?o.bytesToString(i):t.bytesToHex(i)}})()},"688e":function(e,t,n){"use strict";var i="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString,a="[object Function]";e.exports=function(e){var t=this;if("function"!==typeof t||o.call(t)!==a)throw new TypeError(i+t);for(var n,s=r.call(arguments,1),l=function(){if(this instanceof n){var i=t.apply(this,s.concat(r.call(arguments)));return Object(i)===i?i:this}return t.apply(e,s.concat(r.call(arguments)))},c=Math.max(0,t.length-s.length),u=[],m=0;mi[r])return!0;if(n[r]0){var o=i[r],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}}r.transitional=function(e,t,n){var r=t&&s(t);function a(e,t){return"[Axios v"+i.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,s){if(!1===e)throw new Error(a(i," has been removed in "+t));return r&&!o[i]&&(o[i]=!0,console.warn(a(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,s)}},e.exports={isOlderVersion:s,assertOptions:l,validators:r}},8875:function(e,t,n){var i,r,o;(function(n,a){r=[],i=a,o="function"===typeof i?i.apply(t,r):i,void 0===o||(e.exports=o)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,i,r,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,s=o.exec(p.stack)||a.exec(p.stack),l=s&&s[1]||!1,c=s&&s[2]||!1,u=document.location.href.replace(document.location.hash,""),m=document.getElementsByTagName("script");l===u&&(n=document.documentElement.outerHTML,i=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]*