/*!
 * vssue - A vue-powered issue-based comment plugin
 *
 * @version v1.1.0
 * @link https://vssue.js.org
 * @license MIT
 * @copyright 2018-2019 meteorlxy
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):t((e=e||self).Vue)}(this,function(e){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0

    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.

    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */
function t(e,t,n,s){var r,i=arguments.length,o=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(i<3?r(o):i>3?r(t,n,o):r(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}e=e&&e.hasOwnProperty("default")?e.default:e;var n="undefined"!=typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys;function s(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach(function(s){var r=n?Reflect.getOwnMetadata(s,t,n):Reflect.getOwnMetadata(s,t);n?Reflect.defineMetadata(s,r,e,n):Reflect.defineMetadata(s,r,e)})}var r={__proto__:[]}instanceof Array;function i(e){return function(t,n,s){var r="function"==typeof t?t:t.constructor;r.__decorators__||(r.__decorators__=[]),"number"!=typeof s&&(s=void 0),r.__decorators__.push(function(t){return e(t,n,s)})}}var o=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function a(t,i){void 0===i&&(i={}),i.name=i.name||t._componentTag||t.name;var a=t.prototype;Object.getOwnPropertyNames(a).forEach(function(e){if("constructor"!==e)if(o.indexOf(e)>-1)i[e]=a[e];else{var t=Object.getOwnPropertyDescriptor(a,e);void 0!==t.value?"function"==typeof t.value?(i.methods||(i.methods={}))[e]=t.value:(i.mixins||(i.mixins=[])).push({data:function(){var n;return(n={})[e]=t.value,n}}):(t.get||t.set)&&((i.computed||(i.computed={}))[e]={get:t.get,set:t.set})}}),(i.mixins||(i.mixins=[])).push({data:function(){return function(e,t){var n=t.prototype._init;t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var s in e.$options.props)e.hasOwnProperty(s)||n.push(s);n.forEach(function(n){"_"!==n.charAt(0)&&Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t},configurable:!0})})};var s=new t;t.prototype._init=n;var r={};return Object.keys(s).forEach(function(e){void 0!==s[e]&&(r[e]=s[e])}),r}(this,t)}});var c=t.__decorators__;c&&(c.forEach(function(e){return e(i)}),delete t.__decorators__);var l,p,h=Object.getPrototypeOf(t.prototype),d=h instanceof e?h.constructor:e,m=d.extend(i);return function(e,t,n){Object.getOwnPropertyNames(t).forEach(function(s){if(!u[s]){var i=Object.getOwnPropertyDescriptor(e,s);if(!i||i.configurable){var o,a,c=Object.getOwnPropertyDescriptor(t,s);if(!r){if("cid"===s)return;var l=Object.getOwnPropertyDescriptor(n,s);if(o=c.value,a=typeof o,null!=o&&("object"===a||"function"===a)&&l&&l.value===c.value)return}Object.defineProperty(e,s,c)}}})}(m,t,d),n&&(s(l=m,p=t),Object.getOwnPropertyNames(p.prototype).forEach(function(e){s(l.prototype,p.prototype,e)}),Object.getOwnPropertyNames(p).forEach(function(e){s(l,p,e)})),m}var u={prototype:!0,arguments:!0,callee:!0,caller:!0};function c(e){return"function"==typeof e?a(e):function(t){return a(t,e)}}function l(e){return i(function(t,n){void 0===t.inject&&(t.inject={}),Array.isArray(t.inject)||(t.inject[n]=e||n)})}c.registerHooks=function(e){o.push.apply(o,e)};var p="undefined"!=typeof Reflect&&void 0!==Reflect.getMetadata;function h(e){return void 0===e&&(e={}),function(t,n){!function(e,t,n){p&&(Array.isArray(e)||"function"==typeof e||void 0!==e.type||(e.type=Reflect.getMetadata("design:type",t,n)))}(e,t,n),i(function(t,n){(t.props||(t.props={}))[n]=e})(t,n)}}function d(e,t){void 0===t&&(t={});var n=t.deep,s=void 0!==n&&n,r=t.immediate,o=void 0!==r&&r;return i(function(t,n){"object"!=typeof t.watch&&(t.watch=Object.create(null));var r=t.watch;"object"!=typeof r[e]||Array.isArray(r[e])?void 0===r[e]&&(r[e]=[]):r[e]=[r[e]],r[e].push({handler:n,deep:s,immediate:o})})}var m=function(e,t,n,s,r,i,o,a,u,c){"boolean"!=typeof o&&(u=a,a=o,o=!1);var l,p="function"==typeof n?n.options:n;if(e&&e.render&&(p.render=e.render,p.staticRenderFns=e.staticRenderFns,p._compiled=!0,r&&(p.functional=!0)),s&&(p._scopeId=s),i?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,u(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},p._ssrRegister=l):t&&(l=o?function(){t.call(this,c(this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),l)if(p.functional){var h=p.render;p.render=function(e,t){return l.call(t),h(e,t)}}else{var d=p.beforeCreate;p.beforeCreate=d?[].concat(d,l):[l]}return n};var f=m({render:function(e,t){var n=t._c;return n("svg",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[n("symbol",{attrs:{id:"vssue-icon-bitbucket",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M579.5522464 489.45249493q4.8371808 38.38537173-30.81752427 61.55702827t-67.95459093 3.66689493q-23.79580907-10.37653333-32.6119616-35.34262826t-0.31207573-50.01020907 31.67573333-35.34262827q21.92335253-11.00068587 44.1587808-7.33379093t39.00952427 21.61127573 16.77409493 41.1160384zM647.19476053 476.65737173q-8.50407573-65.22392427-68.8908192-99.9424t-120.07131413-7.9579424q-38.38537173 17.08617173-61.24495253 53.9111616t-21.0651424 78.95527574q2.41859093 55.4715424 47.20152426 94.48106666t100.87862827 34.1723424q55.4715424-4.8371808 92.60860907-51.18049493t30.50544746-102.43900907zM792.93434133 146.32472427q-12.17097173-16.4620192-34.1723424-27.15062827t-35.34262826-13.41927573-43.30057174-7.64586667q-177.33729493-28.63299093-345.00022826 1.24830507-26.2144 4.29104747-40.25782827 7.33379093t-33.54819093 13.41927573-30.50544747 26.2144q18.2564576 17.08617173 46.34331413 27.6967616t44.78293334 13.41927574 53.36502826 7.02171413q138.95192427 17.71032427 273.06666667 0.62415253 38.38537173-4.8371808 54.53531413-7.33379093t44.1587808-13.1072 45.7191616-28.32091413zM827.65281813 777.10872427q-4.8371808 15.83786667-9.44030506 46.65539093t-8.50407574 51.18049493-17.39824746 42.6764192-35.34262827 34.4064q-52.4288 29.2571424-115.46819093 43.61264747t-123.1140576 13.41927573-122.8019808-11.3127616q-28.0088384-4.8371808-49.69813334-11.00068586t-46.65539093-16.4620192-44.4708576-26.52647574-31.67573333-37.4491424q-15.21371413-58.51428587-34.71847574-177.96144746l3.66689494-9.7523808 11.00068586-5.46133334q135.9091808 90.1900192 308.72137174 90.1900192t309.34552426-90.1900192q12.79512427 3.66689493 14.5895616 14.04342827t-3.0427424 27.46270507-4.8371808 22.54750506zM937.97175147 191.41973333q-15.83786667 101.8148576-67.64251414 399.22346667-3.0427424 18.2564576-16.4620192 34.1723424t-26.52647573 24.3419424-33.23611413 18.88060907q-153.61950507 76.7707424-371.8387808 53.67710506-151.12289493-16.4620192-240.14262827-84.72868586-9.12822827-7.33379093-15.52579093-16.1499424t-10.37653334-21.2992-5.46133333-20.75306667-3.66689493-24.10788587-3.3548192-21.2992q-5.46133333-30.50544747-16.1499424-91.43832426t-17.08617174-98.4600384-14.35550506-89.8779424-13.41927574-96.27550507q1.7944384-15.83786667 10.68860907-29.5692192t19.19268587-22.8595808 27.46270506-18.2564576 28.0088384-13.73135253 29.2571424-11.3127616q76.22460907-28.0088384 190.75657174-39.00952427 231.0144-22.54750507 412.01859093 30.50544747 94.48106667 28.0088384 131.072 74.35215253 9.7523808 12.17097173 10.0644576 31.0515808t-3.3548192 32.9240384z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-gitee",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M978.404275 409.561604H455.061338c-25.117645 0-45.499734 20.382089-45.499734 45.499734l-0.031997 113.781333c0 25.117645 20.350092 45.499734 45.499734 45.531731h318.594132c25.117645 0 45.499734 20.382089 45.499734 45.499735v22.749867a136.5312 136.5312 0 0 1-136.5312 136.5312H250.248539a45.499734 45.499734 0 0 1-45.499734-45.499734V341.343999a136.5312 136.5312 0 0 1 136.5312-136.5312L978.308284 204.780802c25.117645 0 45.499734-20.350092 45.499734-45.467738L1023.904009 45.531731h0.031997A45.499734 45.499734 0 0 0 978.468269 0h-0.031997L341.343999 0.031997C152.84967 0.031997 0.031997 152.84967 0.031997 341.343999v637.092273c0 25.117645 20.382089 45.499734 45.499734 45.499734h671.233072a307.171203 307.171203 0 0 0 307.171203-307.171203v-261.671468c0-25.117645-20.382089-45.499734-45.499734-45.499734z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-github",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M512 20.4425c-278.334 0-504 225.6345-504 504 0 222.6735 144.4275 411.6105 344.673 478.233 25.2 4.662 34.461-10.9305 34.461-24.255 0-12.0015-0.4725-51.723-0.693-93.8385-140.238 30.492-169.8165-59.472-169.8165-59.472-22.932-58.2435-55.944-73.7415-55.944-73.7415-45.738-31.2795 3.465-30.6495 3.465-30.6495 50.589 3.5595 77.238 51.9435 77.238 51.9435 44.9505 77.049 117.9045 54.7785 146.664 41.895 4.5045-32.571 17.577-54.81 32.004-67.41-111.951-12.726-229.635-55.9755-229.635-249.0705 0-55.0305 19.6875-99.981 51.9435-135.2925-5.229-12.6945-22.491-63.945 4.8825-133.371 0 0 42.336-13.545 138.6315 51.66 40.194-11.1825 83.3175-16.758 126.1575-16.9785 42.8085 0.189 85.9635 5.796 126.252 16.9785 96.201-65.205 138.4425-51.66 138.4425-51.66 27.4365 69.426 10.1745 120.6765 4.9455 133.371 32.319 35.28 51.8805 80.262 51.8805 135.2925 0 193.5675-117.9045 236.187-230.139 248.6925 18.081 15.6555 34.1775 46.305 34.1775 93.3345 0 67.4415-0.5985 121.716-0.5985 138.3165 0 13.419 9.072 29.1375 34.6185 24.192 200.151-66.717 344.3895-255.5595 344.3895-478.17 0-278.3655-225.666-504-504-504z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-gitlab",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M66.61375986 405.11600042L512.11376028 976.03999972 23.84576 621.65599958a39.312 39.312 0 0 1-14.07600042-43.30799944l56.8080007-173.26800028z m259.88400014 0h371.26800014L512.14975986 976.03999972zM215.11376 60.88400042l111.384 344.232H66.61375986l111.384-344.232a19.72800014 19.72800014 0 0 1 37.11600014 0z m742.49999972 344.232l56.8080007 173.2679993a39.23999986 39.23999986 0 0 1-14.07600042 43.30800042l-488.26800028 354.38400014 445.50000042-570.92400028z m0 0h-259.88400014l111.384-344.232a19.72800014 19.72800014 0 0 1 37.11600014 0z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-loading",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M843.307 742.24c0 3.217 2.607 5.824 5.824 5.824s5.824-2.607 5.824-5.824a5.823 5.823 0 0 0-5.824-5.824 5.823 5.823 0 0 0-5.824 5.824zM714.731 874.912c0 6.398 5.186 11.584 11.584 11.584s11.584-5.186 11.584-11.584-5.186-11.584-11.584-11.584-11.584 5.186-11.584 11.584zM541.419 943.2c0 9.614 7.794 17.408 17.408 17.408s17.408-7.794 17.408-17.408-7.794-17.408-17.408-17.408-17.408 7.794-17.408 17.408z m-186.56-9.152c0 12.795 10.373 23.168 23.168 23.168s23.168-10.373 23.168-23.168-10.373-23.168-23.168-23.168-23.168 10.373-23.168 23.168zM189.355 849.12c0 16.012 12.98 28.992 28.992 28.992s28.992-12.98 28.992-28.992-12.98-28.992-28.992-28.992-28.992 12.98-28.992 28.992zM74.731 704.736c0 19.228 15.588 34.816 34.816 34.816s34.816-15.588 34.816-34.816-15.588-34.816-34.816-34.816-34.816 15.588-34.816 34.816z m-43.008-177.28c0 22.41 18.166 40.576 40.576 40.576s40.576-18.166 40.576-40.576-18.166-40.576-40.576-40.576-40.576 18.166-40.576 40.576z m35.392-176.128c0 25.626 20.774 46.4 46.4 46.4s46.4-20.774 46.4-46.4c0-25.626-20.774-46.4-46.4-46.4-25.626 0-46.4 20.774-46.4 46.4z m106.176-142.016c0 28.843 23.381 52.224 52.224 52.224s52.224-23.381 52.224-52.224c0-28.843-23.381-52.224-52.224-52.224-28.843 0-52.224 23.381-52.224 52.224z m155.904-81.344c0 32.024 25.96 57.984 57.984 57.984s57.984-25.96 57.984-57.984-25.96-57.984-57.984-57.984-57.984 25.96-57.984 57.984z m175.104-5.056c0 35.24 28.568 63.808 63.808 63.808s63.808-28.568 63.808-63.808c0-35.24-28.568-63.808-63.808-63.808-35.24 0-63.808 28.568-63.808 63.808z m160.32 72.128c0 38.421 31.147 69.568 69.568 69.568s69.568-31.147 69.568-69.568-31.147-69.568-69.568-69.568-69.568 31.147-69.568 69.568z m113.92 135.488c0 41.638 33.754 75.392 75.392 75.392s75.392-33.754 75.392-75.392-33.754-75.392-75.392-75.392-75.392 33.754-75.392 75.392z m45.312 175.488c0 44.854 36.362 81.216 81.216 81.216s81.216-36.362 81.216-81.216c0-44.854-36.362-81.216-81.216-81.216-44.854 0-81.216 36.362-81.216 81.216z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-like",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 0 0-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4-20.5-21.5-48.1-33.4-77.9-33.4-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-0.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81z m636.4-353l-21.9 19 13.9 25.4c4.6 8.4 6.9 17.6 6.9 27.3 0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4c4.6 8.4 6.9 17.6 6.9 27.3 0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4c4.6 8.4 6.9 17.6 6.9 27.3 0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5c5.2-18.9 22.5-32.2 42.2-32.3 7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-unlike",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M885.9 490.3c3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-51.6-30.7-98.1-78.3-118.4-8.3-3.6-17.2-5.4-26.5-5.4H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h129.3l85.8 310.8C372.9 889 418.9 924 470.9 924c29.7 0 57.4-11.8 77.9-33.4 20.5-21.5 31-49.7 29.5-79.4l-6-122.9h239.9c12.1 0 23.9-3.2 34.3-9.3 40.4-23.5 65.5-66.1 65.5-111 0-28.3-9.3-55.5-26.1-77.7zM184 456V172h81v284h-81z m627.2 160.4H496.8l9.6 198.4c0.6 11.9-4.7 23.1-14.6 30.5-6.1 4.5-13.6 6.8-21.1 6.7-19.6-0.1-36.9-13.4-42.2-32.3L329 459.2V172h415.4c20.4 9.2 33.6 29.4 33.6 51.8 0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19c12.5 10.8 19.6 26.5 19.6 43 0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19c12.5 10.8 19.6 26.5 19.6 43 0 9.7-2.3 18.9-6.9 27.3l-14 25.5 21.9 19c12.5 10.8 19.6 26.5 19.6 43 0 19.1-11 37.5-28.8 48.4z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-heart",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M923 283.6c-13.4-31.1-32.6-58.9-56.9-82.8-24.3-23.8-52.5-42.4-84-55.5-32.5-13.5-66.9-20.3-102.4-20.3-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5-24.4 23.9-43.5 51.7-56.9 82.8-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3 0.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-edit",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M723.2 917.76H286.72c-65.28 0-118.4-51.2-118.4-113.92V261.76C168.32 198.4 221.44 147.2 286.72 147.2h375.04c17.92 0 32 14.08 32 32s-14.08 32-32 32H286.72c-30.08 0-54.4 22.4-54.4 49.92v542.08c0 27.52 24.32 49.92 54.4 49.92H723.2c30.08 0 54.4-22.4 54.4-49.92V440.32c0-17.92 14.08-32 32-32s32 14.08 32 32v363.52c0 62.72-53.12 113.92-118.4 113.92z"}}),t._v(" "),n("path",{attrs:{d:"M499.84 602.24c-7.68 0-14.72-2.56-21.12-7.68-13.44-11.52-14.72-32-3.2-45.44L780.16 198.4c11.52-13.44 32-14.72 45.44-3.2s14.72 32 3.2 45.44L524.16 591.36c-6.4 7.04-15.36 10.88-24.32 10.88z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-delete",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M677.647059 256l0-90.352941c0-37.436235-23.461647-60.235294-61.771294-60.235294L408.094118 105.411765c-38.249412 0-61.741176 22.799059-61.741176 60.235294l0 90.352941-180.705882 0 0 60.235294 60.235294 0 0 512c0 54.272 33.972706 90.352941 90.352941 90.352941l391.529412 0c55.085176 0 90.352941-33.490824 90.352941-90.352941l0-512 60.235294 0 0-60.235294L677.647059 256zM406.588235 165.647059l210.823529 0-1.264941 90.352941L406.588235 256 406.588235 165.647059zM737.882353 858.352941l-451.764706 0 0-542.117647 451.764706 0L737.882353 858.352941zM466.823529 376.470588l-58.729412 0-1.505882 391.529412 60.235294 0L466.823529 376.470588zM617.411765 376.470588l-60.235294 0 0 391.529412 60.235294 0L617.411765 376.470588z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-reply",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M426.666667 384 426.666667 213.333333 128 512 426.666667 810.666667 426.666667 635.733333C640 635.733333 789.333333 704 896 853.333333 853.333333 640 725.333333 426.666667 426.666667 384Z"}})]),t._v(" "),n("symbol",{attrs:{id:"vssue-icon-error",viewBox:"0 0 1024 1024"}},[n("path",{attrs:{d:"M512 720m-48 0a48 48 0 1 0 96 0 48 48 0 1 0-96 0Z"}}),t._v(" "),n("path",{attrs:{d:"M480 416v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8z"}}),t._v(" "),n("path",{attrs:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48z m-783.5-27.9L512 239.9l339.8 588.2H172.2z"}})])])},staticRenderFns:[]},void 0,e.extend({name:"Iconfont"}),void 0,!0,void 0,void 0,void 0);var v=m({},void 0,e.extend({name:"TransitionFade",functional:!0,props:{group:{type:Boolean,required:!1,default:!1}},render:(e,{props:t,children:n})=>e(t.group?"TransitionGroup":"Transition",{props:{name:"fade",mode:"out-in",appear:!0}},n)}),void 0,void 0,void 0,void 0,void 0);var g=m({},void 0,e.extend({name:"VssueIcon",functional:!0,props:{name:{type:String,required:!0},title:{type:String,required:!1,default:null}},render:(e,{props:t,data:n})=>e("svg",Object.assign({},n,{class:["vssue-icon",`vssue-icon-${t.name}`],attrs:{"aria-hidden":"true"}}),[e("title",t.title),e("use",{attrs:{"xlink:href":`#vssue-icon-${t.name}`}})])}),void 0,void 0,void 0,void 0,void 0),y=function(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();return t.setSeconds(0,0),6e4*n+t.getTime()%6e4};var _=function(e){return e instanceof Date},w=36e5,b=6e4,C=2,k=/[T ]/,$=/:/,I=/^(\d{2})$/,x=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],T=/^(\d{4})/,M=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],P=/^-(\d{2})$/,A=/^-?(\d{3})$/,D=/^-?(\d{2})-?(\d{2})$/,O=/^-?W(\d{2})$/,F=/^-?W(\d{2})-?(\d{1})$/,R=/^(\d{2}([.,]\d*)?)$/,S=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,j=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,L=/([Z+-].*)$/,E=/^(Z)$/,N=/^([+-])(\d{2})$/,z=/^([+-])(\d{2}):?(\d{2})$/;function q(e,t,n){t=t||0,n=n||0;var s=new Date(0);s.setUTCFullYear(e,0,4);var r=7*t+n+1-(s.getUTCDay()||7);return s.setUTCDate(s.getUTCDate()+r),s}var H=function(e,t){if(_(e))return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var n=(t||{}).additionalDigits;n=null==n?C:Number(n);var s=function(e){var t,n={},s=e.split(k);if($.test(s[0])?(n.date=null,t=s[0]):(n.date=s[0],t=s[1]),t){var r=L.exec(t);r?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t}return n}(e),r=function(e,t){var n,s=x[t],r=M[t];if(n=T.exec(e)||r.exec(e)){var i=n[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(n=I.exec(e)||s.exec(e)){var o=n[1];return{year:100*parseInt(o,10),restDateString:e.slice(o.length)}}return{year:null}}(s.date,n),i=r.year,o=function(e,t){if(null===t)return null;var n,s,r,i;if(0===e.length)return(s=new Date(0)).setUTCFullYear(t),s;if(n=P.exec(e))return s=new Date(0),r=parseInt(n[1],10)-1,s.setUTCFullYear(t,r),s;if(n=A.exec(e)){s=new Date(0);var o=parseInt(n[1],10);return s.setUTCFullYear(t,0,o),s}if(n=D.exec(e)){s=new Date(0),r=parseInt(n[1],10)-1;var a=parseInt(n[2],10);return s.setUTCFullYear(t,r,a),s}if(n=O.exec(e))return i=parseInt(n[1],10)-1,q(t,i);if(n=F.exec(e)){i=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return q(t,i,u)}return null}(r.restDateString,i);if(o){var a,u=o.getTime(),c=0;if(s.time&&(c=function(e){var t,n,s;if(t=R.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*w;if(t=S.exec(e))return n=parseInt(t[1],10),s=parseFloat(t[2].replace(",",".")),n%24*w+s*b;if(t=j.exec(e)){n=parseInt(t[1],10),s=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return n%24*w+s*b+1e3*r}return null}(s.time)),s.timezone)m=s.timezone,a=((f=E.exec(m))?0:(f=N.exec(m))?(v=60*parseInt(f[2],10),"+"===f[1]?-v:v):(f=z.exec(m))?(v=60*parseInt(f[2],10)+parseInt(f[3],10),"+"===f[1]?-v:v):0)*b;else{var l=u+c,p=new Date(l);a=y(p);var h=new Date(l);h.setDate(p.getDate()+1);var d=y(h)-y(p);d>0&&(a+=d)}return new Date(u+c+a)}var m,f,v;return new Date(e)};var V=function(e){var t=H(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n};var U=function(e){var t=H(e);return t.setHours(0,0,0,0),t},B=6e4,W=864e5;var Y=function(e,t){var n=U(e),s=U(t),r=n.getTime()-n.getTimezoneOffset()*B,i=s.getTime()-s.getTimezoneOffset()*B;return Math.round((r-i)/W)};var G=function(e){var t=H(e);return Y(t,V(t))+1};var X=function(e,t){var n=t&&Number(t.weekStartsOn)||0,s=H(e),r=s.getDay(),i=(r<n?7:0)+r-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s};var J=function(e){return X(e,{weekStartsOn:1})};var Q=function(e){var t=H(e),n=t.getFullYear(),s=new Date(0);s.setFullYear(n+1,0,4),s.setHours(0,0,0,0);var r=J(s),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var o=J(i);return t.getTime()>=r.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1};var K=function(e){var t=Q(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),J(n)},Z=6048e5;var ee=function(e){var t=H(e),n=J(t).getTime()-K(t).getTime();return Math.round(n/Z)+1};var te=function(e){if(_(e))return!isNaN(e);throw new TypeError(toString.call(e)+" is not an instance of Date")};var ne=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];var se=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);var s=ne.concat(t).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+s.join("|")+"|.)","g")};var re=function(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["AM","PM"],o=["am","pm"],a=["a.m.","p.m."],u={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return s[e.getDay()]},dddd:function(e){return r[e.getDay()]},A:function(e){return e.getHours()/12>=1?i[1]:i[0]},a:function(e){return e.getHours()/12>=1?o[1]:o[0]},aa:function(e){return e.getHours()/12>=1?a[1]:a[0]}};return["M","D","DDD","d","Q","W"].forEach(function(e){u[e+"o"]=function(t,n){return function(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}(n[e](t))}}),{formatters:u,formattingTokensRegExp:se(u)}},ie={distanceInWords:function(){var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return{localize:function(t,n,s){var r;return s=s||{},r="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),s.addSuffix?s.comparison>0?"in "+r:r+" ago":r}}}(),format:re()};var oe={M:function(e){return e.getMonth()+1},MM:function(e){return ue(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return ue(e.getDate(),2)},DDD:function(e){return G(e)},DDDD:function(e){return ue(G(e),3)},d:function(e){return e.getDay()},E:function(e){return e.getDay()||7},W:function(e){return ee(e)},WW:function(e){return ue(ee(e),2)},YY:function(e){return ue(e.getFullYear(),4).substr(2)},YYYY:function(e){return ue(e.getFullYear(),4)},GG:function(e){return String(Q(e)).substr(2)},GGGG:function(e){return Q(e)},H:function(e){return e.getHours()},HH:function(e){return ue(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(e){return ue(oe.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return ue(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return ue(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return ue(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return ue(e.getMilliseconds(),3)},Z:function(e){return ae(e.getTimezoneOffset(),":")},ZZ:function(e){return ae(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function ae(e,t){t=t||"";var n=e>0?"-":"+",s=Math.abs(e),r=s%60;return n+ue(Math.floor(s/60),2)+t+ue(r,2)}function ue(e,t){for(var n=Math.abs(e).toString();n.length<t;)n="0"+n;return n}var ce=function(e,t,n){var s=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",r=(n||{}).locale,i=ie.format.formatters,o=ie.format.formattingTokensRegExp;r&&r.format&&r.format.formatters&&(i=r.format.formatters,r.format.formattingTokensRegExp&&(o=r.format.formattingTokensRegExp));var a=H(e);return te(a)?function(e,t,n){var s,r,i,o=e.match(n),a=o.length;for(s=0;s<a;s++)r=t[o[s]]||oe[o[s]],o[s]=r||((i=o[s]).match(/\[[\s\S]/)?i.replace(/^\[|]$/g,""):i.replace(/\\/g,""));return function(e){for(var t="",n=0;n<a;n++)o[n]instanceof Function?t+=o[n](e,oe):t+=o[n];return t}}(s,i,o)(a):"Invalid Date"},le=Object.prototype.hasOwnProperty,pe=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),he=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},s=0;s<e.length;++s)void 0!==e[s]&&(n[s]=e[s]);return n},de={arrayToObject:he,assign:function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],s=0;s<t.length;++s)for(var r=t[s],i=r.obj[r.prop],o=Object.keys(i),a=0;a<o.length;++a){var u=o[a],c=i[u];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:i,prop:u}),n.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Array.isArray(n)){for(var s=[],r=0;r<n.length;++r)void 0!==n[r]&&s.push(n[r]);t.obj[t.prop]=s}}}(t),e},decode:function(e,t,n){var s=e.replace(/\+/g," ");if("iso-8859-1"===n)return s.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(s)}catch(e){return s}},encode:function(e,t,n){if(0===e.length)return e;var s="string"==typeof e?e:String(e);if("iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var r="",i=0;i<s.length;++i){var o=s.charCodeAt(i);45===o||46===o||95===o||126===o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?r+=s.charAt(i):o<128?r+=pe[o]:o<2048?r+=pe[192|o>>6]+pe[128|63&o]:o<55296||o>=57344?r+=pe[224|o>>12]+pe[128|o>>6&63]+pe[128|63&o]:(i+=1,o=65536+((1023&o)<<10|1023&s.charCodeAt(i)),r+=pe[240|o>>18]+pe[128|o>>12&63]+pe[128|o>>6&63]+pe[128|63&o])}return r},isBuffer:function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,n,s){if(!n)return t;if("object"!=typeof n){if(Array.isArray(t))t.push(n);else{if("object"!=typeof t)return[t,n];(s&&(s.plainObjects||s.allowPrototypes)||!le.call(Object.prototype,n))&&(t[n]=!0)}return t}if("object"!=typeof t)return[t].concat(n);var r=t;return Array.isArray(t)&&!Array.isArray(n)&&(r=he(t,s)),Array.isArray(t)&&Array.isArray(n)?(n.forEach(function(n,r){le.call(t,r)?t[r]&&"object"==typeof t[r]?t[r]=e(t[r],n,s):t.push(n):t[r]=n}),t):Object.keys(n).reduce(function(t,r){var i=n[r];return le.call(t,r)?t[r]=e(t[r],i,s):t[r]=i,t},r)}},me=String.prototype.replace,fe=/%20/g,ve={default:"RFC3986",formatters:{RFC1738:function(e){return me.call(e,fe,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"},ge={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ye=Array.isArray,_e=Array.prototype.push,we=function(e,t){_e.apply(e,ye(t)?t:[t])},be=Date.prototype.toISOString,Ce={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:de.encode,encodeValuesOnly:!1,indices:!1,serializeDate:function(e){return be.call(e)},skipNulls:!1,strictNullHandling:!1},ke=function e(t,n,s,r,i,o,a,u,c,l,p,h,d){var m=t;if("function"==typeof a?m=a(n,m):m instanceof Date&&(m=l(m)),null===m){if(r)return o&&!h?o(n,Ce.encoder,d):n;m=""}if("string"==typeof m||"number"==typeof m||"boolean"==typeof m||de.isBuffer(m))return o?[p(h?n:o(n,Ce.encoder,d))+"="+p(o(m,Ce.encoder,d))]:[p(n)+"="+p(String(m))];var f,v=[];if(void 0===m)return v;if(Array.isArray(a))f=a;else{var g=Object.keys(m);f=u?g.sort(u):g}for(var y=0;y<f.length;++y){var _=f[y];i&&null===m[_]||(Array.isArray(m)?we(v,e(m[_],s(n,_),s,r,i,o,a,u,c,l,p,h,d)):we(v,e(m[_],n+(c?"."+_:"["+_+"]"),s,r,i,o,a,u,c,l,p,h,d)))}return v},$e=Object.prototype.hasOwnProperty,Ie={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,decoder:de.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},xe=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Te=function(e,t,n){if(e){var s=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,r=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(s),o=i?s.slice(0,i.index):s,a=[];if(o){if(!n.plainObjects&&$e.call(Object.prototype,o)&&!n.allowPrototypes)return;a.push(o)}for(var u=0;null!==(i=r.exec(s))&&u<n.depth;){if(u+=1,!n.plainObjects&&$e.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;a.push(i[1])}return i&&a.push("["+s.slice(i.index)+"]"),function(e,t,n){for(var s=t,r=e.length-1;r>=0;--r){var i,o=e[r];if("[]"===o&&n.parseArrays)i=[].concat(s);else{i=n.plainObjects?Object.create(null):{};var a="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,u=parseInt(a,10);n.parseArrays||""!==a?!isNaN(u)&&o!==a&&String(u)===a&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[])[u]=s:i[a]=s:i={0:s}}s=i}return s}(a,t,n)}},Me=function(e,t){var n=t?de.assign({},t):{};if(null!==n.decoder&&void 0!==n.decoder&&"function"!=typeof n.decoder)throw new TypeError("Decoder has to be a function.");if(n.ignoreQueryPrefix=!0===n.ignoreQueryPrefix,n.delimiter="string"==typeof n.delimiter||de.isRegExp(n.delimiter)?n.delimiter:Ie.delimiter,n.depth="number"==typeof n.depth?n.depth:Ie.depth,n.arrayLimit="number"==typeof n.arrayLimit?n.arrayLimit:Ie.arrayLimit,n.parseArrays=!1!==n.parseArrays,n.decoder="function"==typeof n.decoder?n.decoder:Ie.decoder,n.allowDots=void 0===n.allowDots?Ie.allowDots:!!n.allowDots,n.plainObjects="boolean"==typeof n.plainObjects?n.plainObjects:Ie.plainObjects,n.allowPrototypes="boolean"==typeof n.allowPrototypes?n.allowPrototypes:Ie.allowPrototypes,n.parameterLimit="number"==typeof n.parameterLimit?n.parameterLimit:Ie.parameterLimit,n.strictNullHandling="boolean"==typeof n.strictNullHandling?n.strictNullHandling:Ie.strictNullHandling,void 0!==n.charset&&"utf-8"!==n.charset&&"iso-8859-1"!==n.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===n.charset&&(n.charset=Ie.charset),""===e||null==e)return n.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var n,s={},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,o=r.split(t.delimiter,i),a=-1,u=t.charset;if(t.charsetSentinel)for(n=0;n<o.length;++n)0===o[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===o[n]?u="utf-8":"utf8=%26%2310003%3B"===o[n]&&(u="iso-8859-1"),a=n,n=o.length);for(n=0;n<o.length;++n)if(n!==a){var c,l,p=o[n],h=p.indexOf("]="),d=-1===h?p.indexOf("="):h+1;-1===d?(c=t.decoder(p,Ie.decoder,u),l=t.strictNullHandling?null:""):(c=t.decoder(p.slice(0,d),Ie.decoder,u),l=t.decoder(p.slice(d+1),Ie.decoder,u)),l&&t.interpretNumericEntities&&"iso-8859-1"===u&&(l=xe(l)),$e.call(s,c)?s[c]=de.combine(s[c],l):s[c]=l}return s}(e,n):e,r=n.plainObjects?Object.create(null):{},i=Object.keys(s),o=0;o<i.length;++o){var a=i[o],u=Te(a,s[a],n);r=de.merge(r,u,n)}return de.compact(r)},Pe=function(e,t){var n=e,s=t?de.assign({},t):{};if(null!==s.encoder&&void 0!==s.encoder&&"function"!=typeof s.encoder)throw new TypeError("Encoder has to be a function.");var r=void 0===s.delimiter?Ce.delimiter:s.delimiter,i="boolean"==typeof s.strictNullHandling?s.strictNullHandling:Ce.strictNullHandling,o="boolean"==typeof s.skipNulls?s.skipNulls:Ce.skipNulls,a="boolean"==typeof s.encode?s.encode:Ce.encode,u="function"==typeof s.encoder?s.encoder:Ce.encoder,c="function"==typeof s.sort?s.sort:null,l=void 0===s.allowDots?Ce.allowDots:!!s.allowDots,p="function"==typeof s.serializeDate?s.serializeDate:Ce.serializeDate,h="boolean"==typeof s.encodeValuesOnly?s.encodeValuesOnly:Ce.encodeValuesOnly,d=s.charset||Ce.charset;if(void 0!==s.charset&&"utf-8"!==s.charset&&"iso-8859-1"!==s.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0===s.format)s.format=ve.default;else if(!Object.prototype.hasOwnProperty.call(ve.formatters,s.format))throw new TypeError("Unknown format option provided.");var m,f,v=ve.formatters[s.format];"function"==typeof s.filter?n=(f=s.filter)("",n):Array.isArray(s.filter)&&(m=f=s.filter);var g,y=[];if("object"!=typeof n||null===n)return"";g=s.arrayFormat in ge?s.arrayFormat:"indices"in s?s.indices?"indices":"repeat":"indices";var _=ge[g];m||(m=Object.keys(n)),c&&m.sort(c);for(var w=0;w<m.length;++w){var b=m[w];o&&null===n[b]||we(y,ke(n[b],b,_,i,o,a?u:null,f,c,l,p,v,h,d))}var C=y.join(r),k=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&(k+="iso-8859-1"===d?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),C.length>0?k+C:""};const Ae=(e,t)=>{return`${e}${Pe(t,{addQueryPrefix:!0})}`},De=(e,t)=>{return`${e.replace(/\/$/,"")}/${t.replace(/^\//,"")}`},Oe=e=>{return(e.split("#")[0]||"").split("?")[0]||""},Fe=e=>Me(e,{ignoreQueryPrefix:!0}),Re=e=>Pe(e),Se=e=>{return ce(e,"YYYY-MM-DD HH:mm:ss")};let je=class extends e{constructor(){super(...arguments),this.editMode=!1,this.editContent=this.comment.contentRaw,this.creatingReactions=[],this.isPutingComment=!1,this.isDeletingComment=!1}get currentUser(){return this.vssue.user?this.vssue.user.username:null}get content(){return this.comment.content}get author(){return this.comment.author}get createdAt(){return Se(this.comment.createdAt)}get updatedAt(){return Se(this.comment.updatedAt)}get showReactions(){return Boolean(this.vssue.API&&this.vssue.API.platform.meta.reactable&&this.comment.reactions&&!this.editMode)}get reactionKeys(){return["heart","like","unlike"]}get editContentRows(){return this.editContent.split("\n").length-1}get editInputRows(){return this.editContentRows<3?5:this.editContentRows+2}async postReaction({reaction:e}){try{if(this.creatingReactions.includes(e))return;this.creatingReactions.push(e),await this.vssue.postCommentReaction({commentId:this.comment.id,reaction:e})||this.vssue.$emit("error",new Error(this.vssue.$t("reactionGiven",{reaction:this.vssue.$t(e)})));const t=await this.vssue.getCommentReactions({commentId:this.comment.id});t&&(this.comment.reactions=t)}finally{this.creatingReactions.splice(this.creatingReactions.findIndex(t=>t===e),1)}}enterEdit(){this.editMode=!0,this.$nextTick(()=>{this.$refs.input.focus()})}resetEdit(){this.editMode=!1,this.editContent=this.comment.contentRaw}async putComment(){try{if(this.vssue.isPending)return;if(this.editContent!==this.comment.contentRaw){this.isPutingComment=!0,this.vssue.isUpdatingComment=!0;const e=await this.vssue.putComment({commentId:this.comment.id,content:this.editContent});e&&this.vssue.comments.data.splice(this.vssue.comments.data.findIndex(e=>e.id===this.comment.id),1,e)}this.editMode=!1}finally{this.isPutingComment=!1,this.vssue.isUpdatingComment=!1}}async deleteComment(){try{if(this.vssue.isPending)return;if(!window.confirm(this.vssue.$t("deleteConfirm")))return;this.isDeletingComment=!0,this.vssue.isUpdatingComment=!0,await this.vssue.deleteComment({commentId:this.comment.id})?(this.vssue.comments.count-=1,this.vssue.comments.data.length>1&&this.vssue.comments.data.splice(this.vssue.comments.data.findIndex(e=>e.id===this.comment.id),1),this.vssue.query.page>1&&this.vssue.query.page>Math.ceil(this.vssue.comments.count/this.vssue.query.perPage)?this.vssue.query.page-=1:await this.vssue.getComments()):this.vssue.$emit("error",new Error(this.vssue.$t("deleteFailed")))}finally{this.isDeletingComment=!1,this.vssue.isUpdatingComment=!1}}};t([h({type:Object,required:!0})],je.prototype,"comment",void 0),t([l()],je.prototype,"vssue",void 0);var Le=m({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vssue-comment",class:{"vssue-comment-edit-mode":e.editMode,"vssue-comment-disabled":e.isDeletingComment||e.isPutingComment}},[n("div",{staticClass:"vssue-comment-avatar"},[n("a",{attrs:{href:e.author.homepage,title:e.author.username,target:"_blank"}},[n("img",{attrs:{src:e.author.avatar}})])]),e._v(" "),n("div",{staticClass:"vssue-comment-body"},[e._t("body",[n("div",{staticClass:"vssue-comment-header"},[n("span",{staticClass:"vssue-comment-author"},[n("a",{attrs:{href:e.author.homepage,title:e.author.username,target:"_blank"}},[e._v("\n            "+e._s(e.author.username)+"\n          ")])]),e._v(" "),n("span",{staticClass:"vssue-comment-created-at"},[e._v("\n          "+e._s(e.createdAt)+"\n        ")])]),e._v(" "),n("div",{staticClass:"vssue-comment-main"},[e.editMode?n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.editContent,expression:"editContent"}],ref:"input",staticClass:"vssue-edit-comment-input",attrs:{rows:e.editInputRows},domProps:{value:e.editContent},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.putComment():null},input:function(t){t.target.composing||(e.editContent=t.target.value)}}}):n("article",{staticClass:"markdown-body",domProps:{innerHTML:e._s(e.content)}})]),e._v(" "),n("div",{staticClass:"vssue-comment-footer"},[e.editMode?n("span",{staticClass:"vssue-comment-hint"},[e._v("\n          "+e._s(e.vssue.$t("editMode"))+"\n        ")]):e._e(),e._v(" "),e.showReactions?n("span",{staticClass:"vssue-comment-reactions"},e._l(e.reactionKeys,function(t){return n("span",{key:t,staticClass:"vssue-comment-reaction",attrs:{title:e.vssue.$t(e.creatingReactions.includes(t)?"loading":t)},on:{click:function(n){return e.postReaction({reaction:t})}}},[n("VssueIcon",{attrs:{name:e.creatingReactions.includes(t)?"loading":t,title:e.vssue.$t(e.creatingReactions.includes(t)?"loading":t)}}),e._v(" "),n("span",{staticClass:"vssue-comment-reaction-number"},[e._v("\n              "+e._s(e.comment.reactions[t])+"\n            ")])],1)}),0):e._e(),e._v(" "),n("span",{staticClass:"vssue-comment-operations"},[e.comment.author.username===e.currentUser&&e.editMode?n("span",{staticClass:"vssue-comment-operation",class:{"vssue-comment-operation-muted":e.isPutingComment},attrs:{title:e.vssue.$t(e.isPutingComment?"loading":"submit")},on:{click:function(t){return e.putComment()}}},[n("VssueIcon",{directives:[{name:"show",rawName:"v-show",value:e.isPutingComment,expression:"isPutingComment"}],attrs:{name:"loading",title:e.vssue.$t("loading")}}),e._v("\n\n            "+e._s(e.vssue.$t("submit"))+"\n          ")],1):e._e(),e._v(" "),e.comment.author.username===e.currentUser&&e.editMode?n("span",{staticClass:"vssue-comment-operation vssue-comment-operation-muted",attrs:{title:e.vssue.$t("cancel")},on:{click:function(t){return e.resetEdit()}}},[e._v("\n            "+e._s(e.vssue.$t("cancel"))+"\n          ")]):e._e(),e._v(" "),e.comment.author.username===e.currentUser?n("span",{directives:[{name:"show",rawName:"v-show",value:!e.editMode,expression:"!editMode"}],staticClass:"vssue-comment-operation",on:{click:function(t){return e.enterEdit()}}},[n("VssueIcon",{attrs:{name:"edit",title:e.vssue.$t("edit")}})],1):e._e(),e._v(" "),e.comment.author.username===e.currentUser||e.vssue.isAdmin?n("span",{directives:[{name:"show",rawName:"v-show",value:!e.editMode,expression:"!editMode"}],staticClass:"vssue-comment-operation",on:{click:function(t){return e.deleteComment()}}},[n("VssueIcon",{attrs:{name:e.isDeletingComment?"loading":"delete",title:e.vssue.$t(e.isDeletingComment?"loading":"delete")}})],1):e._e(),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.editMode,expression:"!editMode"}],staticClass:"vssue-comment-operation",on:{click:function(t){return e.vssue.$emit("reply-comment",e.comment)}}},[n("VssueIcon",{attrs:{name:"reply",title:e.vssue.$t("reply")}})],1)])])])],2)])},staticRenderFns:[]},void 0,je=t([c({components:{VssueIcon:g}})],je),void 0,!1,void 0,void 0,void 0);let Ee=class extends e{get disabled(){return this.vssue.isPending}get pageCount(){const e=Math.ceil(this.vssue.comments.count/this.vssue.comments.perPage);return e>1?e:1}get perPageOptions(){const e=[5,10,20,50];return!e.includes(this.vssue.options.perPage)&&this.vssue.options.perPage<100&&e.push(this.vssue.options.perPage),e.sort((e,t)=>e-t)}get page(){return this.vssue.query.page>this.pageCount?this.pageCount:this.vssue.query.page}set page(e){e>0&&e<=this.pageCount&&(this.vssue.query.page=e)}get perPage(){return this.vssue.query.perPage}set perPage(e){this.perPageOptions.includes(e)&&(this.vssue.query.perPage=e)}};t([l()],Ee.prototype,"vssue",void 0);var Ne=m({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vssue-pagination"},[n("div",{staticClass:"vssue-pagination-per-page"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.perPage,expression:"perPage"}],staticClass:"vssue-pagination-select",attrs:{disabled:e.disabled},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.perPage=t.target.multiple?n:n[0]}}},e._l(e.perPageOptions,function(t){return n("option",{key:t,domProps:{value:t}},[e._v("\n        "+e._s(t)+"\n      ")])}),0),e._v(" "),n("span",[e._v("\n      "+e._s(e.vssue.$t("perPage"))+"\n    ")]),e._v(" "),e.vssue.API.platform.meta.sortable?n("span",{class:{"vssue-pagination-link":!0,disabled:e.disabled},attrs:{title:e.vssue.$t("sort")},on:{click:function(t){e.vssue.query.sort="asc"===e.vssue.query.sort?"desc":"asc"}}},[e._v("\n      "+e._s("asc"===e.vssue.query.sort?"↑":"↓")+"\n    ")]):e._e()]),e._v(" "),n("div",{staticClass:"vssue-pagination-page"},[n("span",{class:{"vssue-pagination-link":!0,disabled:1===e.page||e.disabled},attrs:{title:e.vssue.$t("prev")},domProps:{textContent:e._s("<")},on:{click:function(t){e.page-=1}}}),e._v(" "),n("span",[e._v("\n      "+e._s(e.vssue.$t("page"))+"\n    ")]),e._v(" "),n("select",{directives:[{name:"show",rawName:"v-show",value:e.pageCount>1,expression:"pageCount > 1"},{name:"model",rawName:"v-model",value:e.page,expression:"page"}],staticClass:"vssue-pagination-select",attrs:{disabled:e.disabled},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.page=t.target.multiple?n:n[0]}}},e._l(e.pageCount,function(t){return n("option",{key:t,domProps:{value:t}},[e._v("\n        "+e._s(t)+"\n      ")])}),0),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.pageCount<2,expression:"pageCount < 2"}],domProps:{textContent:e._s(e.page)}}),e._v(" "),n("span",{domProps:{textContent:e._s(" / "+e.pageCount+" ")}}),e._v(" "),n("span",{class:{"vssue-pagination-link":!0,disabled:e.page===e.pageCount||e.disabled},attrs:{title:e.vssue.$t("next")},domProps:{textContent:e._s(">")},on:{click:function(t){e.page+=1}}})])])},staticRenderFns:[]},void 0,Ee=t([c({components:{VssueIcon:g}})],Ee),void 0,!1,void 0,void 0,void 0);let ze=class extends e{};t([l()],ze.prototype,"vssue",void 0);var qe=m({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"vssue-comments"},[t("VssuePagination"),this._v(" "),t("TransitionFade",{attrs:{group:""}},this._l(this.vssue.comments.data,function(e){return t("VssueComment",{key:e.id,attrs:{comment:e}})}),1),this._v(" "),t("VssuePagination",{directives:[{name:"show",rawName:"v-show",value:this.vssue.comments.data.length>5,expression:"vssue.comments.data.length > 5"}]})],1)},staticRenderFns:[]},void 0,ze=t([c({components:{TransitionFade:v,VssueComment:Le,VssuePagination:Ne}})],ze),void 0,!1,void 0,void 0,void 0);var He=m({},void 0,e.extend({name:"VssueIcon",functional:!0,props:{type:{type:String,required:!1,default:"default"}},render:(e,{props:t,data:n,children:s})=>e("button",Object.assign({},n,{class:["vssue-button",`vssue-button-${t.type}`]}),s)}),void 0,void 0,void 0,void 0,void 0);let Ve=class extends e{constructor(){super(...arguments),this.content=""}get user(){return this.vssue.user}get platform(){return this.vssue.API&&this.vssue.API.platform.name}get isInputDisabled(){return this.loading||null===this.user||null===this.vssue.issue}get isSubmitDisabled(){return""===this.content||this.vssue.isPending||null===this.vssue.issue}get loading(){return this.vssue.isCreatingComment}get contentRows(){return this.content.split("\n").length-1}get inputRows(){return this.contentRows<3?5:this.contentRows+2}created(){this.vssue.$on("reply-comment",e=>{const t=e.contentRaw.replace(/\n/g,"\n> "),n=`@${e.author.username}\n\n> ${t}\n\n`;this.content=this.content.concat(n),this.focus()})}beforeDestroy(){this.vssue.$off("reply-comment")}focus(){this.$refs.input.focus()}async submit(){this.isSubmitDisabled||(await this.vssue.postComment({content:this.content}),this.content="",await this.vssue.getComments())}};t([l()],Ve.prototype,"vssue",void 0);var Ue=m({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vssue-new-comment"},[n("div",{staticClass:"vssue-comment-avatar"},[e.user?n("a",{attrs:{href:e.user.homepage,title:e.user.username,target:"_blank"}},[n("img",{attrs:{src:e.user.avatar}})]):n("VssueIcon",{attrs:{name:e.platform.toLowerCase(),title:e.vssue.$t("loginToComment",{platform:e.platform})},on:{click:function(t){return e.vssue.login()}}})],1),e._v(" "),n("div",{staticClass:"vssue-new-comment-body"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.content,expression:"content"}],ref:"input",staticClass:"vssue-new-comment-input",attrs:{rows:e.inputRows,disabled:e.isInputDisabled,placeholder:e.vssue.$t(e.user?"placeholder":"noLoginPlaceHolder"),spellcheck:!1},domProps:{value:e.content},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.submit():null},input:function(t){t.target.composing||(e.content=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"vssue-new-comment-footer"},[e.user?n("span",{staticClass:"vssue-current-user"},[n("span",[e._v(e._s(e.vssue.$t("currentUser"))+" - "+e._s(e.user.username)+" - ")]),e._v(" "),n("a",{staticClass:"vssue-logout",on:{click:function(t){return e.vssue.logout()}}},[e._v("\n        "+e._s(e.vssue.$t("logout"))+"\n      ")])]):n("span",{staticClass:"vssue-current-user"},[e._v("\n      "+e._s(e.vssue.$t("loginToComment",{platform:e.platform}))+"\n    ")]),e._v(" "),n("div",{staticClass:"vssue-new-comment-operations"},[e.user?n("VssueButton",{staticClass:"vssue-button-submit-comment",attrs:{type:"primary",disabled:e.isSubmitDisabled},on:{click:function(t){return e.submit()}}},[n("VssueIcon",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],attrs:{name:"loading"}}),e._v("\n\n        "+e._s(e.vssue.$t(e.loading?"submitting":"submitComment"))+"\n      ")],1):n("VssueButton",{staticClass:"vssue-button-login",attrs:{type:"primary",title:e.vssue.$t("loginToComment",{platform:e.platform})},on:{click:function(t){return e.vssue.login()}}},[e._v("\n        "+e._s(e.vssue.$t("login",{platform:e.platform}))+"\n      ")])],1)])])},staticRenderFns:[]},void 0,Ve=t([c({components:{VssueButton:He,VssueIcon:g}})],Ve),void 0,!1,void 0,void 0,void 0);let Be=class extends e{constructor(){super(...arguments),this.progress={show:!1,percent:0,timer:null,speed:200},this.alert={show:!1,message:null,timer:null}}onLoadingCommentsChange(e){this.vssue.comments&&(e?this.progressStart():this.progressDone())}created(){this.vssue.$on("error",e=>this.alertShow(e.message))}beforeDestroy(){this.vssue.$off("error"),null!==this.progress.timer&&window.clearTimeout(this.progress.timer),null!==this.alert.timer&&window.clearTimeout(this.alert.timer)}progressStart(){this.progress.show=!0,this.progress.percent=0,this.progress.timer=window.setInterval(()=>{this.progress.percent+=5,this.progress.percent>94&&null!==this.progress.timer&&window.clearInterval(this.progress.timer)},this.progress.speed)}progressDone(){this.progress.percent=100,null!==this.progress.timer&&window.clearTimeout(this.progress.timer),this.progress.timer=null,window.setTimeout(()=>{this.progress.show=!1},this.progress.speed)}alertShow(e){this.alert.show=!0,this.alert.message=e,null!==this.alert.timer&&window.clearTimeout(this.alert.timer),this.alert.timer=window.setTimeout(()=>{this.alertHide()},3e3)}alertHide(){this.alert.show=!1,null!==this.alert.timer&&window.clearTimeout(this.alert.timer),this.alert.timer=null}};t([l()],Be.prototype,"vssue",void 0),t([d("vssue.isLoadingComments")],Be.prototype,"onLoadingCommentsChange",null);var We=m({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vssue-notice"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.progress.show,expression:"progress.show"}],staticClass:"vssue-progress",style:{width:e.progress.percent+"%",transition:"all "+e.progress.speed+"ms linear"}}),e._v(" "),n("TransitionFade",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.alert.show,expression:"alert.show"}],staticClass:"vssue-alert",domProps:{textContent:e._s(e.alert.message)},on:{click:function(t){return e.alertHide()}}})])],1)},staticRenderFns:[]},void 0,Be=t([c({components:{TransitionFade:v}})],Be),void 0,!1,void 0,void 0,void 0);let Ye=class extends e{get status(){return this.vssue.isFailed?"failed":this.vssue.isInitializing?"initializing":this.vssue.isIssueNotCreated&&!this.vssue.isCreatingIssue?this.vssue.isAdmin||!this.vssue.isLogined?"issueNotCreated":"failed":this.vssue.isLoginRequired?"loginRequired":!this.vssue.comments||this.vssue.isCreatingIssue?"loadingComments":0===this.vssue.comments.data.length?"noComments":null}handleClick(){"issueNotCreated"===this.status?this.vssue.postIssue():"loginRequired"===this.status&&this.vssue.login()}};t([l()],Ye.prototype,"vssue",void 0);var Ge=m({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("TransitionFade",[e.status?n("div",{key:e.status,staticClass:"vssue-status"},[["failed","loadingComments","initializing"].includes(e.status)?n("VssueIcon",{attrs:{name:"failed"===e.status?"error":"loading"}}):e._e(),e._v(" "),n("p",{staticClass:"vssue-status-info"},[n(["issueNotCreated","loginRequired"].includes(e.status)?"a":"span",{tag:"Component",on:{click:e.handleClick}},[e._v("\n        "+e._s(e.vssue.$t(e.status))+"\n      ")])],1)],1):e._e()])},staticRenderFns:[]},void 0,Ye=t([c({components:{TransitionFade:v,VssueIcon:g}})],Ye),void 0,!1,void 0,void 0,void 0);let Xe=class extends e{};t([l()],Xe.prototype,"vssue",void 0);var Je=m({render:function(){var e=this.$createElement,t=this._self._c||e;return t("TransitionFade",[this.vssue.isInitializing?t("VssueStatus"):t("div",{staticClass:"vssue-body"},[this.vssue.API?t("VssueNewComment"):this._e(),this._v(" "),t("VssueNotice"),this._v(" "),t("TransitionFade",[this.vssue.comments&&this.vssue.comments.data.length>0?t("VssueComments"):t("VssueStatus")],1)],1)],1)},staticRenderFns:[]},void 0,Xe=t([c({components:{TransitionFade:v,VssueIcon:g,VssueComments:qe,VssueNewComment:Ue,VssueNotice:We,VssueStatus:Ge}})],Xe),void 0,!1,void 0,void 0,void 0);let Qe=class extends e{};t([l()],Qe.prototype,"vssue",void 0);var Ke=m({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vssue-header"},[n("a",{staticClass:"vssue-header-comments-count",attrs:{href:e.vssue.issue?e.vssue.issue.link:null,target:"_blank"}},[n("span",[e._v("\n      "+e._s(e.vssue.comments?e.vssue.$tc("comments",e.vssue.comments.count,{count:e.vssue.comments.count}):e.vssue.$tc("comments",0))+"\n    ")])]),e._v(" "),n("span",{staticClass:"vssue-header-powered-by"},[n("span",[e._v("Powered by")]),e._v(" "),e.vssue.API?n("span",[n("a",{attrs:{href:e.vssue.API.platform.link,target:"_blank",title:e.vssue.API.platform.name+" API "+e.vssue.API.platform.version}},[e._v("\n        "+e._s(e.vssue.API.platform.name)+"\n      ")]),e._v(" "),n("span",[e._v("&")])]):n("span"),e._v(" "),n("a",{attrs:{href:"https://github.com/meteorlxy/vssue",target:"_blank",title:"Vssue v"+e.vssue.version}},[e._v("\n      Vssue\n    ")])])])},staticRenderFns:[]},void 0,Qe=t([c],Qe),void 0,!1,void 0,void 0,void 0),Ze=["style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","localeMatcher","formatMatcher"];
/*!
     * vue-i18n v8.11.2 
     * (c) 2019 kazuya kawaguchi
     * Released under the MIT License.
     */function et(e,t){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+e),t&&console.warn(t.stack))}function tt(e){return null!==e&&"object"==typeof e}var nt=Object.prototype.toString,st="[object Object]";function rt(e){return nt.call(e)===st}function it(e){return null==e}function ot(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=null,s=null;return 1===e.length?tt(e[0])||Array.isArray(e[0])?s=e[0]:"string"==typeof e[0]&&(n=e[0]):2===e.length&&("string"==typeof e[0]&&(n=e[0]),(tt(e[1])||Array.isArray(e[1]))&&(s=e[1])),{locale:n,params:s}}function at(e){return JSON.parse(JSON.stringify(e))}var ut=Object.prototype.hasOwnProperty;function ct(e,t){return ut.call(e,t)}function lt(e){for(var t=arguments,n=Object(e),s=1;s<arguments.length;s++){var r=t[s];if(null!=r){var i=void 0;for(i in r)ct(r,i)&&(tt(r[i])?n[i]=lt(n[i],r[i]):n[i]=r[i])}}return n}function pt(e,t){if(e===t)return!0;var n=tt(e),s=tt(t);if(!n||!s)return!n&&!s&&String(e)===String(t);try{var r=Array.isArray(e),i=Array.isArray(t);if(r&&i)return e.length===t.length&&e.every(function(e,n){return pt(e,t[n])});if(r||i)return!1;var o=Object.keys(e),a=Object.keys(t);return o.length===a.length&&o.every(function(n){return pt(e[n],t[n])})}catch(e){return!1}}var ht,dt={beforeCreate:function(){var e=this.$options;if(e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n){if(e.i18n instanceof Gt){if(e.__i18n)try{var t={};e.__i18n.forEach(function(e){t=lt(t,JSON.parse(e))}),Object.keys(t).forEach(function(n){e.i18n.mergeLocaleMessage(n,t[n])})}catch(e){}this._i18n=e.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(rt(e.i18n)){if(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof Gt&&(e.i18n.root=this.$root,e.i18n.formatter=this.$root.$i18n.formatter,e.i18n.fallbackLocale=this.$root.$i18n.fallbackLocale,e.i18n.silentTranslationWarn=this.$root.$i18n.silentTranslationWarn,e.i18n.silentFallbackWarn=this.$root.$i18n.silentFallbackWarn,e.i18n.pluralizationRules=this.$root.$i18n.pluralizationRules,e.i18n.preserveDirectiveContent=this.$root.$i18n.preserveDirectiveContent),e.__i18n)try{var n={};e.__i18n.forEach(function(e){n=lt(n,JSON.parse(e))}),e.i18n.messages=n}catch(e){}this._i18n=new Gt(e.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===e.i18n.sync||e.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale())}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof Gt?this._i18n=this.$root.$i18n:e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof Gt&&(this._i18n=e.parent.$i18n)},beforeMount:function(){var e=this.$options;e.i18n=e.i18n||(e.__i18n?{}:null),e.i18n?e.i18n instanceof Gt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):rt(e.i18n)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof Gt?(this._i18n.subscribeDataChanging(this),this._subscribing=!0):e.parent&&e.parent.$i18n&&e.parent.$i18n instanceof Gt&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},beforeDestroy:function(){if(this._i18n){var e=this;this.$nextTick(function(){e._subscribing&&(e._i18n.unsubscribeDataChanging(e),delete e._subscribing),e._i18nWatcher&&(e._i18nWatcher(),e._i18n.destroyVM(),delete e._i18nWatcher),e._localeWatcher&&(e._localeWatcher(),delete e._localeWatcher),e._i18n=null})}}},mt={name:"i18n",functional:!0,props:{tag:{type:String,default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(e,t){var n=t.props,s=t.data,r=t.children,i=t.parent.$i18n;if(r=(r||[]).filter(function(e){return e.tag||(e.text=e.text.trim())}),!i)return r;var o=n.path,a=n.locale,u={},c=n.places||{},l=(Array.isArray(c)?c.length:Object.keys(c).length,r.every(function(e){if(e.data&&e.data.attrs){var t=e.data.attrs.place;return void 0!==t&&""!==t}}));return Array.isArray(c)?c.forEach(function(e,t){u[t]=e}):Object.keys(c).forEach(function(e){u[e]=c[e]}),r.forEach(function(e,t){var n=l?""+e.data.attrs.place:""+t;u[n]=e}),e(n.tag,s,i.i(o,a,u))}},ft={name:"i18n-n",functional:!0,props:{tag:{type:String,default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render:function(e,t){var n=t.props,s=t.parent,r=t.data,i=s.$i18n;if(!i)return null;var o=null,a=null;"string"==typeof n.format?o=n.format:tt(n.format)&&(n.format.key&&(o=n.format.key),a=Object.keys(n.format).reduce(function(e,t){var s;return Ze.includes(t)?Object.assign({},e,((s={})[t]=n.format[t],s)):e},null));var u=n.locale||i.locale,c=i._ntp(n.value,u,o,a),l=c.map(function(e,t){var n,s=r.scopedSlots&&r.scopedSlots[e.type];return s?s(((n={})[e.type]=e.value,n.index=t,n.parts=c,n)):e.value});return e(n.tag,{attrs:r.attrs,class:r.class,staticClass:r.staticClass},l)}};function vt(e,t,n){_t(e,n)&&wt(e,t,n)}function gt(e,t,n,s){if(_t(e,n)){var r=n.context.$i18n;(function(e,t){var n=t.context;return e._locale===n.$i18n.locale})(e,n)&&pt(t.value,t.oldValue)&&pt(e._localeMessage,r.getLocaleMessage(r.locale))||wt(e,t,n)}}function yt(e,t,n,s){if(n.context){var r=n.context.$i18n||{};t.modifiers.preserve||r.preserveDirectiveContent||(e.textContent=""),e._vt=void 0,delete e._vt,e._locale=void 0,delete e._locale,e._localeMessage=void 0,delete e._localeMessage}else et("Vue instance does not exists in VNode context")}function _t(e,t){var n=t.context;return n?!!n.$i18n||(et("VueI18n instance does not exists in Vue instance"),!1):(et("Vue instance does not exists in VNode context"),!1)}function wt(e,t,n){var s,r,i=function(e){var t,n,s,r;"string"==typeof e?t=e:rt(e)&&(t=e.path,n=e.locale,s=e.args,r=e.choice);return{path:t,locale:n,args:s,choice:r}}(t.value),o=i.path,a=i.locale,u=i.args,c=i.choice;if(o||a||u)if(o){var l=n.context;e._vt=e.textContent=c?(s=l.$i18n).tc.apply(s,[o,c].concat(bt(a,u))):(r=l.$i18n).t.apply(r,[o].concat(bt(a,u))),e._locale=l.$i18n.locale,e._localeMessage=l.$i18n.getLocaleMessage(l.$i18n.locale)}else et("`path` is required in v-t directive");else et("value type not supported")}function bt(e,t){var n=[];return e&&n.push(e),t&&(Array.isArray(t)||rt(t))&&n.push(t),n}function Ct(e){Ct.installed=!0;(ht=e).version&&Number(ht.version.split(".")[0]);!function(e){e.prototype.hasOwnProperty("$i18n")||Object.defineProperty(e.prototype,"$i18n",{get:function(){return this._i18n}}),e.prototype.$t=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var s=this.$i18n;return s._t.apply(s,[e,s.locale,s._getMessages(),this].concat(t))},e.prototype.$tc=function(e,t){for(var n=[],s=arguments.length-2;s-- >0;)n[s]=arguments[s+2];var r=this.$i18n;return r._tc.apply(r,[e,r.locale,r._getMessages(),this,t].concat(n))},e.prototype.$te=function(e,t){var n=this.$i18n;return n._te(e,n.locale,n._getMessages(),t)},e.prototype.$d=function(e){for(var t,n=[],s=arguments.length-1;s-- >0;)n[s]=arguments[s+1];return(t=this.$i18n).d.apply(t,[e].concat(n))},e.prototype.$n=function(e){for(var t,n=[],s=arguments.length-1;s-- >0;)n[s]=arguments[s+1];return(t=this.$i18n).n.apply(t,[e].concat(n))}}(ht),ht.mixin(dt),ht.directive("t",{bind:vt,update:gt,unbind:yt}),ht.component(mt.name,mt),ht.component(ft.name,ft),ht.config.optionMergeStrategies.i18n=function(e,t){return void 0===t?e:t}}var kt=function(){this._caches=Object.create(null)};kt.prototype.interpolate=function(e,t){if(!t)return[e];var n=this._caches[e];return n||(n=function(e){var t=[],n=0,s="";for(;n<e.length;){var r=e[n++];if("{"===r){s&&t.push({type:"text",value:s}),s="";var i="";for(r=e[n++];void 0!==r&&"}"!==r;)i+=r,r=e[n++];var o="}"===r,a=$t.test(i)?"list":o&&It.test(i)?"named":"unknown";t.push({value:i,type:a})}else"%"===r?"{"!==e[n]&&(s+=r):s+=r}return s&&t.push({type:"text",value:s}),t}(e),this._caches[e]=n),function(e,t){var n=[],s=0,r=Array.isArray(t)?"list":tt(t)?"named":"unknown";if("unknown"===r)return n;for(;s<e.length;){var i=e[s];switch(i.type){case"text":n.push(i.value);break;case"list":n.push(t[parseInt(i.value,10)]);break;case"named":"named"===r&&n.push(t[i.value])}s++}return n}(n,t)};var $t=/^(?:\d)+/,It=/^(?:\w)+/;var xt=0,Tt=1,Mt=2,Pt=3,At=0,Dt=4,Ot=5,Ft=6,Rt=7,St=8,jt=[];jt[At]={ws:[At],ident:[3,xt],"[":[Dt],eof:[Rt]},jt[1]={ws:[1],".":[2],"[":[Dt],eof:[Rt]},jt[2]={ws:[2],ident:[3,xt],0:[3,xt],number:[3,xt]},jt[3]={ident:[3,xt],0:[3,xt],number:[3,xt],ws:[1,Tt],".":[2,Tt],"[":[Dt,Tt],eof:[Rt,Tt]},jt[Dt]={"'":[Ot,xt],'"':[Ft,xt],"[":[Dt,Mt],"]":[1,Pt],eof:St,else:[Dt,xt]},jt[Ot]={"'":[Dt,xt],eof:St,else:[Ot,xt]},jt[Ft]={'"':[Dt,xt],eof:St,else:[Ft,xt]};var Lt=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Et(e){if(null==e)return"eof";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"ident";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return"ident"}function Nt(e){var t,n,s,r=e.trim();return("0"!==e.charAt(0)||!isNaN(e))&&(s=r,Lt.test(s)?(n=(t=r).charCodeAt(0))!==t.charCodeAt(t.length-1)||34!==n&&39!==n?t:t.slice(1,-1):"*"+r)}var zt=function(){this._cache=Object.create(null)};zt.prototype.parsePath=function(e){var t=this._cache[e];return t||(t=function(e){var t,n,s,r,i,o,a,u=[],c=-1,l=At,p=0,h=[];function d(){var t=e[c+1];if(l===Ot&&"'"===t||l===Ft&&'"'===t)return c++,s="\\"+t,h[xt](),!0}for(h[Tt]=function(){void 0!==n&&(u.push(n),n=void 0)},h[xt]=function(){void 0===n?n=s:n+=s},h[Mt]=function(){h[xt](),p++},h[Pt]=function(){if(p>0)p--,l=Dt,h[xt]();else{if(p=0,!1===(n=Nt(n)))return!1;h[Tt]()}};null!==l;)if("\\"!==(t=e[++c])||!d()){if(r=Et(t),(i=(a=jt[l])[r]||a.else||St)===St)return;if(l=i[0],(o=h[i[1]])&&(s=void 0===(s=i[2])?t:s,!1===o()))return;if(l===Rt)return u}}(e))&&(this._cache[e]=t),t||[]},zt.prototype.getPathValue=function(e,t){if(!tt(e))return null;var n=this.parsePath(t);if(0===n.length)return null;for(var s=n.length,r=e,i=0;i<s;){var o=r[n[i]];if(void 0===o)return null;r=o,i++}return r};var qt,Ht=/<\/?[\w\s="\/.':;#-\/]+>/,Vt=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,Ut=/^@(?:\.([a-z]+))?:/,Bt=/[()]/g,Wt={upper:function(e){return e.toLocaleUpperCase()},lower:function(e){return e.toLocaleLowerCase()}},Yt=new kt,Gt=function(e){var t=this;void 0===e&&(e={}),!ht&&"undefined"!=typeof window&&window.Vue&&Ct(window.Vue);var n=e.locale||"en-US",s=e.fallbackLocale||"en-US",r=e.messages||{},i=e.dateTimeFormats||{},o=e.numberFormats||{};this._vm=null,this._formatter=e.formatter||Yt,this._missing=e.missing||null,this._root=e.root||null,this._sync=void 0===e.sync||!!e.sync,this._fallbackRoot=void 0===e.fallbackRoot||!!e.fallbackRoot,this._silentTranslationWarn=void 0!==e.silentTranslationWarn&&!!e.silentTranslationWarn,this._silentFallbackWarn=void 0!==e.silentFallbackWarn&&!!e.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new zt,this._dataListeners=[],this._preserveDirectiveContent=void 0!==e.preserveDirectiveContent&&!!e.preserveDirectiveContent,this.pluralizationRules=e.pluralizationRules||{},this._warnHtmlInMessage=e.warnHtmlInMessage||"off",this._exist=function(e,n){return!(!e||!n)&&(!it(t._path.getPathValue(e,n))||!!e[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(r).forEach(function(e){t._checkLocaleMessage(e,t._warnHtmlInMessage,r[e])}),this._initVM({locale:n,fallbackLocale:s,messages:r,dateTimeFormats:i,numberFormats:o})},Xt={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0}};Gt.prototype._checkLocaleMessage=function(e,t,n){var s=function(e,t,n,r){if(rt(n))Object.keys(n).forEach(function(i){var o=n[i];rt(o)?(r.push(i),r.push("."),s(e,t,o,r),r.pop(),r.pop()):(r.push(i),s(e,t,o,r),r.pop())});else if(Array.isArray(n))n.forEach(function(n,i){rt(n)?(r.push("["+i+"]"),r.push("."),s(e,t,n,r),r.pop(),r.pop()):(r.push("["+i+"]"),s(e,t,n,r),r.pop())});else if("string"==typeof n){if(Ht.test(n)){var i="Detected HTML in message '"+n+"' of keypath '"+r.join("")+"' at '"+t+"'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===e?et(i):"error"===e&&function(e,t){"undefined"!=typeof console&&(console.error("[vue-i18n] "+e),t&&console.error(t.stack))}(i)}}};s(t,e,n,[])},Gt.prototype._initVM=function(e){var t=ht.config.silent;ht.config.silent=!0,this._vm=new ht({data:e}),ht.config.silent=t},Gt.prototype.destroyVM=function(){this._vm.$destroy()},Gt.prototype.subscribeDataChanging=function(e){this._dataListeners.push(e)},Gt.prototype.unsubscribeDataChanging=function(e){!function(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)e.splice(n,1)}}(this._dataListeners,e)},Gt.prototype.watchI18nData=function(){var e=this;return this._vm.$watch("$data",function(){for(var t=e._dataListeners.length;t--;)ht.nextTick(function(){e._dataListeners[t]&&e._dataListeners[t].$forceUpdate()})},{deep:!0})},Gt.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var e=this._vm;return this._root.$i18n.vm.$watch("locale",function(t){e.$set(e,"locale",t),e.$forceUpdate()},{immediate:!0})},Xt.vm.get=function(){return this._vm},Xt.messages.get=function(){return at(this._getMessages())},Xt.dateTimeFormats.get=function(){return at(this._getDateTimeFormats())},Xt.numberFormats.get=function(){return at(this._getNumberFormats())},Xt.availableLocales.get=function(){return Object.keys(this.messages).sort()},Xt.locale.get=function(){return this._vm.locale},Xt.locale.set=function(e){this._vm.$set(this._vm,"locale",e)},Xt.fallbackLocale.get=function(){return this._vm.fallbackLocale},Xt.fallbackLocale.set=function(e){this._vm.$set(this._vm,"fallbackLocale",e)},Xt.missing.get=function(){return this._missing},Xt.missing.set=function(e){this._missing=e},Xt.formatter.get=function(){return this._formatter},Xt.formatter.set=function(e){this._formatter=e},Xt.silentTranslationWarn.get=function(){return this._silentTranslationWarn},Xt.silentTranslationWarn.set=function(e){this._silentTranslationWarn=e},Xt.silentFallbackWarn.get=function(){return this._silentFallbackWarn},Xt.silentFallbackWarn.set=function(e){this._silentFallbackWarn=e},Xt.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},Xt.preserveDirectiveContent.set=function(e){this._preserveDirectiveContent=e},Xt.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},Xt.warnHtmlInMessage.set=function(e){var t=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=e,n!==e&&("warn"===e||"error"===e)){var s=this._getMessages();Object.keys(s).forEach(function(e){t._checkLocaleMessage(e,t._warnHtmlInMessage,s[e])})}},Gt.prototype._getMessages=function(){return this._vm.messages},Gt.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},Gt.prototype._getNumberFormats=function(){return this._vm.numberFormats},Gt.prototype._warnDefault=function(e,t,n,s,r){if(!it(n))return n;if(this._missing){var i=this._missing.apply(null,[e,t,s,r]);if("string"==typeof i)return i}return t},Gt.prototype._isFallbackRoot=function(e){return!e&&!it(this._root)&&this._fallbackRoot},Gt.prototype._isSilentFallback=function(e){return this._silentFallbackWarn&&(this._isFallbackRoot()||e!==this.fallbackLocale)},Gt.prototype._interpolate=function(e,t,n,s,r,i,o){if(!t)return null;var a,u=this._path.getPathValue(t,n);if(Array.isArray(u)||rt(u))return u;if(it(u)){if(!rt(t))return null;if("string"!=typeof(a=t[n]))return null}else{if("string"!=typeof u)return null;a=u}return(a.indexOf("@:")>=0||a.indexOf("@.")>=0)&&(a=this._link(e,t,a,s,"raw",i,o)),this._render(a,r,i,n)},Gt.prototype._link=function(e,t,n,s,r,i,o){var a=n,u=a.match(Vt);for(var c in u)if(u.hasOwnProperty(c)){var l=u[c],p=l.match(Ut),h=p[0],d=p[1],m=l.replace(h,"").replace(Bt,"");if(o.includes(m))return a;o.push(m);var f=this._interpolate(e,t,m,s,"raw"===r?"string":r,"raw"===r?void 0:i,o);if(this._isFallbackRoot(f)){if(!this._root)throw Error("unexpected error");var v=this._root.$i18n;f=v._translate(v._getMessages(),v.locale,v.fallbackLocale,m,s,r,i)}f=this._warnDefault(e,m,f,s,Array.isArray(i)?i:[i]),Wt.hasOwnProperty(d)&&(f=Wt[d](f)),o.pop(),a=f?a.replace(l,f):a}return a},Gt.prototype._render=function(e,t,n,s){var r=this._formatter.interpolate(e,n,s);return r||(r=Yt.interpolate(e,n,s)),"string"===t?r.join(""):r},Gt.prototype._translate=function(e,t,n,s,r,i,o){var a=this._interpolate(t,e[t],s,r,i,o,[s]);return it(a)&&it(a=this._interpolate(n,e[n],s,r,i,o,[s]))?null:a},Gt.prototype._t=function(e,t,n,s){for(var r,i=[],o=arguments.length-4;o-- >0;)i[o]=arguments[o+4];if(!e)return"";var a=ot.apply(void 0,i),u=a.locale||t,c=this._translate(n,u,this.fallbackLocale,e,s,"string",a.params);if(this._isFallbackRoot(c)){if(!this._root)throw Error("unexpected error");return(r=this._root).$t.apply(r,[e].concat(i))}return this._warnDefault(u,e,c,s,i)},Gt.prototype.t=function(e){for(var t,n=[],s=arguments.length-1;s-- >0;)n[s]=arguments[s+1];return(t=this)._t.apply(t,[e,this.locale,this._getMessages(),null].concat(n))},Gt.prototype._i=function(e,t,n,s,r){var i=this._translate(n,t,this.fallbackLocale,e,s,"raw",r);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(e,t,r)}return this._warnDefault(t,e,i,s,[r])},Gt.prototype.i=function(e,t,n){return e?("string"!=typeof t&&(t=this.locale),this._i(e,t,this._getMessages(),null,n)):""},Gt.prototype._tc=function(e,t,n,s,r){for(var i,o=[],a=arguments.length-5;a-- >0;)o[a]=arguments[a+5];if(!e)return"";void 0===r&&(r=1);var u={count:r,n:r},c=ot.apply(void 0,o);return c.params=Object.assign(u,c.params),o=null===c.locale?[c.params]:[c.locale,c.params],this.fetchChoice((i=this)._t.apply(i,[e,t,n,s].concat(o)),r)},Gt.prototype.fetchChoice=function(e,t){if(!e&&"string"!=typeof e)return null;var n=e.split("|");return n[t=this.getChoiceIndex(t,n.length)]?n[t].trim():e},Gt.prototype.getChoiceIndex=function(e,t){var n,s;return this.locale in this.pluralizationRules?this.pluralizationRules[this.locale].apply(this,[e,t]):(n=e,s=t,n=Math.abs(n),2===s?n?n>1?1:0:1:n?Math.min(n,2):0)},Gt.prototype.tc=function(e,t){for(var n,s=[],r=arguments.length-2;r-- >0;)s[r]=arguments[r+2];return(n=this)._tc.apply(n,[e,this.locale,this._getMessages(),null,t].concat(s))},Gt.prototype._te=function(e,t,n){for(var s=[],r=arguments.length-3;r-- >0;)s[r]=arguments[r+3];var i=ot.apply(void 0,s).locale||t;return this._exist(n[i],e)},Gt.prototype.te=function(e,t){return this._te(e,this.locale,this._getMessages(),t)},Gt.prototype.getLocaleMessage=function(e){return at(this._vm.messages[e]||{})},Gt.prototype.setLocaleMessage=function(e,t){("warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||(this._checkLocaleMessage(e,this._warnHtmlInMessage,t),"error"!==this._warnHtmlInMessage))&&this._vm.$set(this._vm.messages,e,t)},Gt.prototype.mergeLocaleMessage=function(e,t){("warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||(this._checkLocaleMessage(e,this._warnHtmlInMessage,t),"error"!==this._warnHtmlInMessage))&&this._vm.$set(this._vm.messages,e,lt(this._vm.messages[e]||{},t))},Gt.prototype.getDateTimeFormat=function(e){return at(this._vm.dateTimeFormats[e]||{})},Gt.prototype.setDateTimeFormat=function(e,t){this._vm.$set(this._vm.dateTimeFormats,e,t)},Gt.prototype.mergeDateTimeFormat=function(e,t){this._vm.$set(this._vm.dateTimeFormats,e,lt(this._vm.dateTimeFormats[e]||{},t))},Gt.prototype._localizeDateTime=function(e,t,n,s,r){var i=t,o=s[i];if((it(o)||it(o[r]))&&(o=s[i=n]),it(o)||it(o[r]))return null;var a=o[r],u=i+"__"+r,c=this._dateTimeFormatters[u];return c||(c=this._dateTimeFormatters[u]=new Intl.DateTimeFormat(i,a)),c.format(e)},Gt.prototype._d=function(e,t,n){if(!n)return new Intl.DateTimeFormat(t).format(e);var s=this._localizeDateTime(e,t,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(s)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(e,n,t)}return s||""},Gt.prototype.d=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var s=this.locale,r=null;return 1===t.length?"string"==typeof t[0]?r=t[0]:tt(t[0])&&(t[0].locale&&(s=t[0].locale),t[0].key&&(r=t[0].key)):2===t.length&&("string"==typeof t[0]&&(r=t[0]),"string"==typeof t[1]&&(s=t[1])),this._d(e,s,r)},Gt.prototype.getNumberFormat=function(e){return at(this._vm.numberFormats[e]||{})},Gt.prototype.setNumberFormat=function(e,t){this._vm.$set(this._vm.numberFormats,e,t)},Gt.prototype.mergeNumberFormat=function(e,t){this._vm.$set(this._vm.numberFormats,e,lt(this._vm.numberFormats[e]||{},t))},Gt.prototype._getNumberFormatter=function(e,t,n,s,r,i){var o=t,a=s[o];if((it(a)||it(a[r]))&&(a=s[o=n]),it(a)||it(a[r]))return null;var u,c=a[r];if(i)u=new Intl.NumberFormat(o,Object.assign({},c,i));else{var l=o+"__"+r;(u=this._numberFormatters[l])||(u=this._numberFormatters[l]=new Intl.NumberFormat(o,c))}return u},Gt.prototype._n=function(e,t,n,s){if(!Gt.availabilities.numberFormat)return"";if(!n)return(s?new Intl.NumberFormat(t,s):new Intl.NumberFormat(t)).format(e);var r=this._getNumberFormatter(e,t,this.fallbackLocale,this._getNumberFormats(),n,s),i=r&&r.format(e);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(e,Object.assign({},{key:n,locale:t},s))}return i||""},Gt.prototype.n=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var s=this.locale,r=null,i=null;return 1===t.length?"string"==typeof t[0]?r=t[0]:tt(t[0])&&(t[0].locale&&(s=t[0].locale),t[0].key&&(r=t[0].key),i=Object.keys(t[0]).reduce(function(e,n){var s;return Ze.includes(n)?Object.assign({},e,((s={})[n]=t[0][n],s)):e},null)):2===t.length&&("string"==typeof t[0]&&(r=t[0]),"string"==typeof t[1]&&(s=t[1])),this._n(e,s,r,i)},Gt.prototype._ntp=function(e,t,n,s){if(!Gt.availabilities.numberFormat)return[];if(!n)return(s?new Intl.NumberFormat(t,s):new Intl.NumberFormat(t)).formatToParts(e);var r=this._getNumberFormatter(e,t,this.fallbackLocale,this._getNumberFormats(),n,s),i=r&&r.formatToParts(e);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(e,t,n,s)}return i||[]},Object.defineProperties(Gt.prototype,Xt),Object.defineProperty(Gt,"availabilities",{get:function(){if(!qt){var e="undefined"!=typeof Intl;qt={dateTimeFormat:e&&void 0!==Intl.DateTimeFormat,numberFormat:e&&void 0!==Intl.NumberFormat}}return qt}}),Gt.install=Ct,Gt.version="8.11.2";const Jt={login:"Login with {platform}",logout:"Logout",currentUser:"Current User",loading:"Loading",submit:"Submit",submitting:"Submitting",submitComment:"Submit Comment",cancel:"Cancel",edit:"Edit",editMode:"Edit Mode",delete:"Delete",reply:"Reply",heart:"Heart",like:"Like",unlike:"Unlike",perPage:"Comments per page",sort:"Click to change the sort direction",page:"Page",prev:"Previous Page",next:"Next Page",comments:"Comments | {count} Comment | {count} Comments",loginToComment:"Login with {platform} account to leave a comment",placeholder:"Leave a comment. Styling with Markdown is supported. Ctrl + Enter to submit.",noLoginPlaceHolder:"Login to leave a comment. Styling with Markdown is supported. ",failed:"Failed to load comments",initializing:"Initializing...",issueNotCreated:"Click to create issue",loadingComments:"Loading comments...",loginRequired:"Login to view comments",noComments:"No comments yet. Leave the first comment !",reactionGiven:"Already given '{reaction}' reaction",deleteConfirm:"Confirm to delete this comment ?",deleteFailed:"Failed to delete comment"},Qt={login:"使用 {platform} 登录",logout:"退出登录",currentUser:"当前用户",loading:"加载中",submit:"提交",submitting:"发表中",submitComment:"发表评论",cancel:"取消",edit:"编辑",editMode:"编辑模式",delete:"删除",reply:"回复",heart:"喜欢",like:"赞",unlike:"踩",perPage:"每页评论数",sort:"点击改变排序方式",page:"页数",prev:"上一页",next:"下一页",comments:"评论 | {count} 条评论 | {count} 条评论",loginToComment:"使用 {platform} 帐号登录后发表评论",placeholder:"留下你的评论丨支持 Markdown 语法丨Ctrl + Enter 发表评论",noLoginPlaceHolder:"登录后才能发表评论丨支持 Markdown 语法",failed:"评论加载失败",initializing:"正在初始化...",issueNotCreated:"点击创建 Issue",loadingComments:"正在加载评论...",loginRequired:"登录后查看评论",noComments:"还没有评论，来发表第一条评论吧！",reactionGiven:"已经添加过 '{reaction}' 了",deleteConfirm:"确认要删除该评论吗？",deleteFailed:"评论删除失败"},Kt={login:"Entrar com {platform}",logout:"Sair",currentUser:"Usuário Atual",loading:"Carregando",submit:"Enviar",submitting:"Enviando",submitComment:"Enviar Comentário",cancel:"Cancelar",edit:"Editar",editMode:"Modo de Edição",delete:"Apagar",reply:"Responder",heart:"Heart",like:"Like",unlike:"Unlike",perPage:"Comentários por página",sort:"Clique para alterar a ordenação",page:"Página",prev:"Página Anterior",next:"Próxima Página",comments:"Comentários | {count} Comentário | {count} Comentários",loginToComment:"Entre com uma conta {platform} para deixar um comentário",placeholder:"Deixe um comentário. Estilos com Markdown suportados. Ctrl + Enter para enviar.",noLoginPlaceHolder:"Entre para deixar um comentário. Estilos com Markdown suportados. ",failed:"Falha ao carregar comentários",initializing:"Inicializando...",issueNotCreated:"Click to create issue",loadingComments:"Carregando comentários...",loginRequired:"Entrar para visualizar comentários",noComments:"Nenhum comentário. Deixe o primeiro comentário!",reactionGiven:"Já reagiu com '{reaction}'",deleteConfirm:"Apagar este comentário?",deleteFailed:"Falha ao apagar comentário"},Zt={login:"{platform} でログイン",logout:"ログアウト",currentUser:"現在のユーザー",loading:"読み込み中",submit:"送信",submitting:"送信中",submitComment:"コメントを送信",cancel:"キャンセル",edit:"編集",editMode:"編集モード",delete:"削除",reply:"返信",heart:"ハート",like:"高評価",unlike:"低評価",perPage:"コメント/ページ",sort:"並び順を変更するにはクリックしてください",page:"ページ",prev:"前のページ",next:"次のページ",comments:"コメント | {count} コメント | {count} コメント",loginToComment:"コメントを残すには {platform} アカウントでログインしてください。",placeholder:"コメントを残してください。Markdown 記法をサポートしています。 Ctrl + Enter で送信できます。",noLoginPlaceHolder:"コメントを残すにはログインしてください。マークダウン記法をサポートしています。",failed:"コメントの読み込みに失敗しました",initializing:"初期化中...",issueNotCreated:"Click to create issue",loadingComments:"コメントの読み込み中...",loginRequired:"コメントを見るにはログインしてください",noComments:"まだコメントがありません。最初のコメントを残しましょう！",reactionGiven:"既に '{reaction}' のリアクションをしています",deleteConfirm:"本当にコメントを削除してもいいですか？",deleteFailed:"コメントの削除に失敗しました"};e.prototype.hasOwnProperty("$i18n")||e.use(Gt);const en=new Gt({locale:"en",fallbackLocale:"en",messages:{en:Jt,"en-US":Jt,zh:Qt,"zh-CN":Qt,pt:Kt,"pt-BR":Kt,ja:Zt,"ja-JP":Zt}});let tn=class extends e{constructor(){super(...arguments),this.title=e=>`${e.prefix}${document.title}`,this.issueId=null,this.options=null,this.API=null,this.accessToken=null,this.user=null,this.issue=null,this.comments=null,this.query={page:1,perPage:10,sort:"desc"},this.isInitializing=!0,this.isIssueNotCreated=!1,this.isLoginRequired=!1,this.isFailed=!1,this.isCreatingIssue=!1,this.isLoadingComments=!1,this.isCreatingComment=!1,this.isUpdatingComment=!1}get version(){return"1.1.0"}get issueTitle(){return null===this.options?"":"function"==typeof this.title?this.title(this.options):`${this.options.prefix}${this.title}`}get isPending(){return this.isLoadingComments||this.isCreatingComment||this.isUpdatingComment}get isLogined(){return null!==this.accessToken&&null!==this.user}get isAdmin(){return null!==this.options&&null!==this.accessToken&&null!==this.user&&(this.user.username===this.options.owner||this.options.admins.includes(this.user.username))}get accessTokenKey(){return this.API?`Vssue.${this.API.platform.name.toLowerCase()}.access_token`:""}onQueryPerPageChange(){this.query.page=1,this.getComments()}onQueryChange(){this.getComments()}setOptions(e){this.options=Object.assign({labels:["Vssue"],state:"Vssue",prefix:"[Vssue]",admins:[],perPage:10,proxy:e=>`https://cors-anywhere.herokuapp.com/${e}`,issueContent:({url:e})=>e,autoCreateIssue:!1},e);const t=["api","owner","repo","clientId"];for(const e of t)this.options[e]||console.warn(`[Vssue] the option '${e}' is required`);if(this.options.locale)this.$i18n.locale=this.options.locale;else{const e=Object.keys(this.$i18n.messages),t=window.navigator.languages;this.$i18n.locale=t.filter(t=>e.includes(t)).shift()||"en"}}async init(){try{await this.initStore(),await this.initComments()}catch(e){e.response&&[401,403].includes(e.response.status)?this.isLoginRequired=!0:this.isFailed=!0,console.error(e)}}async initStore(){try{if(!this.options)throw new Error("Options are required to initialize Vssue");this.API=null,this.accessToken=null,this.user=null,this.issue=null,this.comments=null,this.query={page:1,perPage:this.options.perPage,sort:"desc"},this.isInitializing=!0,this.isIssueNotCreated=!1,this.isLoginRequired=!1,this.isFailed=!1,this.isCreatingIssue=!1,this.isLoadingComments=!1,this.isCreatingComment=!1,this.isUpdatingComment=!1;const e=this.options.api;this.API=new e({baseURL:this.options.baseURL,labels:this.options.labels,state:this.options.state,owner:this.options.owner,repo:this.options.repo,clientId:this.options.clientId,clientSecret:this.options.clientSecret,proxy:this.options.proxy}),await this.handleAuth()}finally{this.isInitializing=!1}}async initComments(){if(this.API&&this.options)if(this.issueId){const[e,t]=await Promise.all([this.API.getIssue({accessToken:this.accessToken,issueId:this.issueId}),this.API.getComments({accessToken:this.accessToken,issueId:this.issueId,query:this.query})]);this.issue=e,this.comments=t}else this.issue=await this.API.getIssue({accessToken:this.accessToken,issueTitle:this.issueTitle}),null===this.issue?(this.isIssueNotCreated=!0,this.options.autoCreateIssue&&await this.postIssue()):await this.getComments()}async postIssue(){if(this.API&&this.options&&!this.issue&&!this.issueId&&(this.isLogined||this.login(),this.isAdmin))try{this.isCreatingIssue=!0;const e=await this.API.postIssue({title:this.issueTitle,content:await this.options.issueContent({options:this.options,url:Oe(window.location.href)}),accessToken:this.accessToken});this.issue=e,this.isIssueNotCreated=!1,await this.getComments()}catch(e){this.isFailed=!0}finally{this.isCreatingIssue=!1}}async getComments(){try{if(!this.API||!this.issue||this.isLoadingComments)return;this.isLoadingComments=!0;const e=await this.API.getComments({accessToken:this.accessToken,issueId:this.issue.id,query:this.query});return this.comments=e,this.query.page!==e.page&&(this.query.page=e.page),this.query.perPage!==e.perPage&&(this.query.perPage=e.perPage),e}catch(e){if(!e.response||![401,403].includes(e.response.status)||this.isLogined)throw this.$emit("error",e),e;this.isLoginRequired=!0}finally{this.isLoadingComments=!1}}async postComment({content:e}){try{if(!this.API||!this.issue||this.isCreatingComment)return;return this.isCreatingComment=!0,await this.API.postComment({accessToken:this.accessToken,content:e,issueId:this.issue.id})}catch(e){throw this.$emit("error",e),e}finally{this.isCreatingComment=!1}}async putComment({commentId:e,content:t}){try{if(!this.API||!this.issue)return;return await this.API.putComment({accessToken:this.accessToken,issueId:this.issue.id,commentId:e,content:t})}catch(e){throw this.$emit("error",e),e}}async deleteComment({commentId:e}){try{if(!this.API||!this.issue)return;return await this.API.deleteComment({accessToken:this.accessToken,issueId:this.issue.id,commentId:e})}catch(e){throw this.$emit("error",e),e}}async getCommentReactions({commentId:e}){try{if(!this.API||!this.issue)return;return await this.API.getCommentReactions({accessToken:this.accessToken,issueId:this.issue.id,commentId:e})}catch(e){throw this.$emit("error",e),e}}async postCommentReaction({commentId:e,reaction:t}){try{if(!this.API||!this.issue)return!1;return await this.API.postCommentReaction({accessToken:this.accessToken,issueId:this.issue.id,commentId:e,reaction:t})}catch(e){throw this.$emit("error",e),e}}login(){this.API&&this.API.redirectAuth()}logout(){this.setAccessToken(null),this.user=null}async handleAuth(){if(!this.API)return;const e=await this.API.handleAuth();e?(this.setAccessToken(e),this.user=await this.API.getUser({accessToken:e})):this.getAccessToken()?this.user=await this.API.getUser({accessToken:this.accessToken}):(this.setAccessToken(null),this.user=null)}getAccessToken(){return this.accessToken=window.localStorage.getItem(this.accessTokenKey),this.accessToken}setAccessToken(e){null===e?window.localStorage.removeItem(this.accessTokenKey):window.localStorage.setItem(this.accessTokenKey,e),this.accessToken=e}};t([d("query.perPage")],tn.prototype,"onQueryPerPageChange",null),t([d("query.page"),d("query.sort")],tn.prototype,"onQueryChange",null);var nn=tn=t([c({i18n:en})],tn);let sn=class extends e{constructor(){super(...arguments),this.vssue=new nn}onOptionsChange(e){this.vssue.setOptions(e)}beforeMount(){null!==this.title&&(this.vssue.title=this.title),null!==this.issueId&&(this.vssue.issueId=this.issueId),this.vssue.setOptions(this.options),this.vssue.init()}};var rn;t([h({type:[String,Function],required:!1,default:null})],sn.prototype,"title",void 0),t([h({type:[String,Number],required:!1,default:null})],sn.prototype,"issueId",void 0),t([h({type:Object,required:!1,default:()=>({})})],sn.prototype,"options",void 0),t([(rn="vssue",i(function(e,t){var n=e.provide;if("function"!=typeof n||!n.managed){var s=e.provide;(n=e.provide=function(){var e=Object.create(("function"==typeof s?s.call(this):s)||null);for(var t in n.managed)e[n.managed[t]]=this[t];return e}).managed={}}n.managed[t]=rn||t}))],sn.prototype,"vssue",void 0),t([d("options",{deep:!0})],sn.prototype,"onOptionsChange",null);var on=m({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"vssue"},[t("Iconfont"),this._v(" "),t("VssueHeader"),this._v(" "),t("VssueBody")],1)},staticRenderFns:[]},void 0,sn=t([c({components:{Iconfont:f,VssueBody:Je,VssueHeader:Ke}})],sn),void 0,!1,void 0,void 0,void 0);const an={get version(){return"1.1.0"},installed:!1,install(e,t){if(this.installed)return!1;this.installed=!0,e.component("Vssue",{functional:!0,props:{title:{type:String,required:!1,default:void 0},issueId:{type:[Number,String],required:!1,default:void 0},options:{type:Object,required:!1,default:void 0}},render:(e,{data:n,props:s})=>e(on,Object.assign({},n,{props:{title:s.title,issueId:s.issueId,options:Object.assign({},t,s.options)}}))})},VssueComponent:on};var un=function(e,t){return function(){for(var n=new Array(arguments.length),s=0;s<n.length;s++)n[s]=arguments[s];return e.apply(t,n)}},cn=Object.prototype.toString;
/*!
     * Determine if an object is a Buffer
     *
     * @author   Feross Aboukhadijeh <https://feross.org>
     * @license  MIT
     */function ln(e){return"[object Array]"===cn.call(e)}function pn(e){return null!==e&&"object"==typeof e}function hn(e){return"[object Function]"===cn.call(e)}function dn(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),ln(e))for(var n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var mn={isArray:ln,isArrayBuffer:function(e){return"[object ArrayBuffer]"===cn.call(e)},isBuffer:function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:pn,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===cn.call(e)},isFile:function(e){return"[object File]"===cn.call(e)},isBlob:function(e){return"[object Blob]"===cn.call(e)},isFunction:hn,isStream:function(e){return pn(e)&&hn(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:dn,merge:function e(){var t={};function n(n,s){"object"==typeof t[s]&&"object"==typeof n?t[s]=e(t[s],n):t[s]=n}for(var s=0,r=arguments.length;s<r;s++)dn(arguments[s],n);return t},extend:function(e,t,n){return dn(t,function(t,s){e[s]=n&&"function"==typeof t?un(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},fn=function(e,t,n,s,r){return function(e,t,n,s,r){return e.config=t,n&&(e.code=n),e.request=s,e.response=r,e}(new Error(e),t,n,s,r)};function vn(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var gn=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],yn=mn.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function s(e){var s=e;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=s(window.location.href),function(t){var n=mn.isString(t)?s(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},_n=mn.isStandardBrowserEnv()?{write:function(e,t,n,s,r,i){var o=[];o.push(e+"="+encodeURIComponent(t)),mn.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),mn.isString(s)&&o.push("path="+s),mn.isString(r)&&o.push("domain="+r),!0===i&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},wn=function(e){return new Promise(function(t,n){var s=e.data,r=e.headers;mn.isFormData(s)&&delete r["Content-Type"];var i=new XMLHttpRequest;if(e.auth){var o=e.auth.username||"",a=e.auth.password||"";r.Authorization="Basic "+btoa(o+":"+a)}if(i.open(e.method.toUpperCase(),function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(mn.isURLSearchParams(t))s=t.toString();else{var r=[];mn.forEach(t,function(e,t){null!=e&&(mn.isArray(e)?t+="[]":e=[e],mn.forEach(e,function(e){mn.isDate(e)?e=e.toISOString():mn.isObject(e)&&(e=JSON.stringify(e)),r.push(vn(t)+"="+vn(e))}))}),s=r.join("&")}return s&&(e+=(-1===e.indexOf("?")?"?":"&")+s),e}(e.url,e.params,e.paramsSerializer),!0),i.timeout=e.timeout,i.onreadystatechange=function(){if(i&&4===i.readyState&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var s="getAllResponseHeaders"in i?function(e){var t,n,s,r={};return e?(mn.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=mn.trim(e.substr(0,s)).toLowerCase(),n=mn.trim(e.substr(s+1)),t){if(r[t]&&gn.indexOf(t)>=0)return;r[t]="set-cookie"===t?(r[t]?r[t]:[]).concat([n]):r[t]?r[t]+", "+n:n}}),r):r}(i.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?i.response:i.responseText,status:i.status,statusText:i.statusText,headers:s,config:e,request:i};!function(e,t,n){var s=n.config.validateStatus;n.status&&s&&!s(n.status)?t(fn("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}(t,n,r),i=null}},i.onerror=function(){n(fn("Network Error",e,null,i)),i=null},i.ontimeout=function(){n(fn("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",i)),i=null},mn.isStandardBrowserEnv()){var u=_n,c=(e.withCredentials||yn(e.url))&&e.xsrfCookieName?u.read(e.xsrfCookieName):void 0;c&&(r[e.xsrfHeaderName]=c)}if("setRequestHeader"in i&&mn.forEach(r,function(e,t){void 0===s&&"content-type"===t.toLowerCase()?delete r[t]:i.setRequestHeader(t,e)}),e.withCredentials&&(i.withCredentials=!0),e.responseType)try{i.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&i.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){i&&(i.abort(),n(e),i=null)}),void 0===s&&(s=null),i.send(s)})},bn={"Content-Type":"application/x-www-form-urlencoded"};function Cn(e,t){!mn.isUndefined(e)&&mn.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var kn,$n={adapter:("undefined"!=typeof XMLHttpRequest?kn=wn:"undefined"!=typeof process&&(kn=wn),kn),transformRequest:[function(e,t){return function(e,t){mn.forEach(e,function(n,s){s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[s])})}(t,"Content-Type"),mn.isFormData(e)||mn.isArrayBuffer(e)||mn.isBuffer(e)||mn.isStream(e)||mn.isFile(e)||mn.isBlob(e)?e:mn.isArrayBufferView(e)?e.buffer:mn.isURLSearchParams(e)?(Cn(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):mn.isObject(e)?(Cn(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};$n.headers={common:{Accept:"application/json, text/plain, */*"}},mn.forEach(["delete","get","head"],function(e){$n.headers[e]={}}),mn.forEach(["post","put","patch"],function(e){$n.headers[e]=mn.merge(bn)});var In=$n;function xn(){this.handlers=[]}xn.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},xn.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},xn.prototype.forEach=function(e){mn.forEach(this.handlers,function(t){null!==t&&e(t)})};var Tn=xn,Mn=function(e,t,n){return mn.forEach(n,function(n){e=n(e,t)}),e},Pn=function(e){return!(!e||!e.__CANCEL__)};function An(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Dn=function(e){var t,n,s;return An(e),e.baseURL&&(s=e.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(s))&&(e.url=(t=e.baseURL,(n=e.url)?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t)),e.headers=e.headers||{},e.data=Mn(e.data,e.headers,e.transformRequest),e.headers=mn.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),mn.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||In.adapter)(e).then(function(t){return An(e),t.data=Mn(t.data,t.headers,e.transformResponse),t},function(t){return Pn(t)||(An(e),t&&t.response&&(t.response.data=Mn(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})};function On(e){this.defaults=e,this.interceptors={request:new Tn,response:new Tn}}On.prototype.request=function(e){"string"==typeof e&&(e=mn.merge({url:arguments[0]},arguments[1])),(e=mn.merge(In,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[Dn,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},mn.forEach(["delete","get","head","options"],function(e){On.prototype[e]=function(t,n){return this.request(mn.merge(n||{},{method:e,url:t}))}}),mn.forEach(["post","put","patch"],function(e){On.prototype[e]=function(t,n,s){return this.request(mn.merge(s||{},{method:e,url:t,data:n}))}});var Fn=On;function Rn(e){this.message=e}Rn.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Rn.prototype.__CANCEL__=!0;var Sn=Rn;function jn(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new Sn(e),t(n.reason))})}jn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},jn.source=function(){var e;return{token:new jn(function(t){e=t}),cancel:e}};var Ln=jn;function En(e){var t=new Fn(e),n=un(Fn.prototype.request,t);return mn.extend(n,Fn.prototype,t),mn.extend(n,t),n}var Nn=En(In);Nn.Axios=Fn,Nn.create=function(e){return En(mn.merge(In,e))},Nn.Cancel=Sn,Nn.CancelToken=Ln,Nn.isCancel=Pn,Nn.all=function(e){return Promise.all(e)},Nn.spread=function(e){return function(t){return e.apply(null,t)}};var zn=Nn,qn=Nn;zn.default=qn;var Hn=zn;function Vn(e){return{username:e.nickname,avatar:e.links.avatar.href,homepage:e.links.html.href}}function Un(e){return{id:e.id,title:e.title,content:e.content.raw,link:e.links.html.href}}function Bn(e){return{id:e.id,content:e.content.html,contentRaw:e.content.raw,author:Vn(e.user),createdAt:e.created_on,updatedAt:e.updated_on,reactions:null}}class Wn{constructor({baseURL:e="https://bitbucket.org",owner:t,repo:n,clientId:s,state:r}){this.baseURL=e,this.owner=t,this.repo=n,this.clientId=s,this.state=r,this.$http=Hn.create({baseURL:"https://api.bitbucket.org/2.0",headers:{Accept:"application/json"}})}get platform(){return{name:"Bitbucket",link:this.baseURL,version:"v2",meta:{reactable:!1,sortable:!0}}}redirectAuth(){window.location.href=Ae(De(this.baseURL,"site/oauth2/authorize"),{client_id:this.clientId,redirect_uri:window.location.href,response_type:"token",state:this.state})}async handleAuth(){const e=Fe(window.location.hash.slice(1));if(!e.access_token||e.state!==this.state)return null;const t=e.access_token;delete e.access_token,delete e.token_type,delete e.expires_in,delete e.state,delete e.scopes;const n=Re(e),s=n?`#${n}`:"",r=`${Oe(window.location.href)}${window.location.search}${s}`;return window.history.replaceState(null,"",r),t}async getUser({accessToken:e}){const{data:t}=await this.$http.get("user",{headers:{Authorization:`Bearer ${e}`}});return Vn(t)}async getIssue({accessToken:e,issueId:t,issueTitle:n}){const s={};if(e&&(s.headers={Authorization:`Bearer ${e}`}),!t){s.params={sort:"created_on",q:`title="${n}"`,timestamp:Date.now()};const{data:e}=await this.$http.get(`repositories/${this.owner}/${this.repo}/issues`,s);return e.size>0?Un(e.values[0]):null}try{s.params={timestamp:Date.now()};const{data:e}=await this.$http.get(`repositories/${this.owner}/${this.repo}/issues/${t}`,s);return Un(e)}catch(e){if(e.response&&404===e.response.status)return null;throw e}}async postIssue({accessToken:e,title:t,content:n}){const{data:s}=await this.$http.post(`repositories/${this.owner}/${this.repo}/issues`,{title:t,content:{raw:n},priority:"trivial",kind:"task"},{headers:{Authorization:`Bearer ${e}`}});return s.links.html={href:De(this.baseURL,`${this.owner}/${this.repo}/issues/${s.id}`)},Un(s)}async getComments({accessToken:e,issueId:t,query:{page:n=1,perPage:s=10,sort:r="desc"}={}}){const i={params:{page:n,pagelen:s,sort:"desc"===r?"-created_on":"created_on",timestamp:Date.now()}};e&&(i.headers={Authorization:`Bearer ${e}`});const{data:o}=await this.$http.get(`repositories/${this.owner}/${this.repo}/issues/${t}/comments`,i);return{count:o.size,page:o.page,perPage:o.pagelen,data:o.values.filter(e=>null!==e.content.raw).map(Bn)}}async postComment({accessToken:e,issueId:t,content:n}){const{data:s}=await this.$http.post(`repositories/${this.owner}/${this.repo}/issues/${t}/comments`,{content:{raw:n}},{headers:{Authorization:`Bearer ${e}`}});return Bn(s)}async putComment({accessToken:e,issueId:t,commentId:n,content:s}){const{data:r}=await this.$http.put(`repositories/${this.owner}/${this.repo}/issues/${t}/comments/${n}`,{content:{raw:s}},{headers:{Authorization:`Bearer ${e}`}});return Bn(r)}async deleteComment({accessToken:e,issueId:t,commentId:n}){const{status:s}=await this.$http.delete(`repositories/${this.owner}/${this.repo}/issues/${t}/comments/${n}`,{headers:{Authorization:`Bearer ${e}`}});return 204===s}async getCommentReactions(e){throw new Error("501 Not Implemented")}async postCommentReaction(e){throw new Error("501 Not Implemented")}}"undefined"!=typeof window&&window.Vue&&window.Vue.use(an,{api:Wn})});
