diff --git a/safari2aria.safariextension/Info.plist b/safari2aria.safariextension/Info.plist index e7f8104..72d5f1c 100644 --- a/safari2aria.safariextension/Info.plist +++ b/safari2aria.safariextension/Info.plist @@ -13,9 +13,9 @@ CFBundleInfoDictionaryVersion 1.0 CFBundleShortVersionString - 2.1 + 2.3.1 CFBundleVersion - 2.1 + 2.3.1 Chrome Database Quota @@ -87,7 +87,7 @@ Update From Gallery Update Manifest URL - https://miniers.github.io/safari2aria/update.plist?t=2.1 + https://miniers.github.io/safari2aria/update.plist?t=2.3.1 Website https://github.com/miniers/safari2aria diff --git a/safari2aria.safariextension/popover.html b/safari2aria.safariextension/popover.html index c2d5e3e..73cd64b 100644 --- a/safari2aria.safariextension/popover.html +++ b/safari2aria.safariextension/popover.html @@ -8,5 +8,5 @@
- + diff --git a/safari2aria.safariextension/static/js/manifest.js b/safari2aria.safariextension/static/js/manifest.js index 5f27dfc..93d99df 100644 --- a/safari2aria.safariextension/static/js/manifest.js +++ b/safari2aria.safariextension/static/js/manifest.js @@ -1 +1 @@ -!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,a){for(var i,u,f,d=0,s=[];d0&&(a.params=t.params);var s="http"+(this.secure?"s":"")+"://"+this.host+":"+this.port+this.path;fetch(s,{method:"POST",body:i()(a),headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(t){return t.json()}).then(function(t){n._onmessage(t)}).catch(e)},a.prototype.send=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof e[e.length-1]?e.pop():null;return this.exec(t,e,n)},a.prototype.exec=function(t,e,n){if("string"!=typeof t)throw new TypeError(t+" is not a string");0!==t.indexOf("system.")&&0!==t.indexOf("aria2.")&&(t="aria2."+t);var a={method:t,"json-rpc":"2.0",id:this.lastId++},s=this.secret?["token:"+this.secret]:[];Array.isArray(e)&&("system.multicall"===t?(Array.isArray(e[0])&&e[0].forEach(function(t){t.params||(t.params=[]),t.params=s.concat(t.params)}),s=e):s=s.concat(e)),s.length>0&&(a.params=s),this.onsend(a);var o=this;return this.socket&&1===this.socket.readyState?this.socket.send(i()(a)):this.http(a,function(t){o.callbacks[a.id](t),delete o.callbacks[a.id]}),c()(function(t){o.callbacks[a.id]=t},n)},a.prototype._onmessage=function(t){if(this.onmessage(t),void 0!==t.id){var e=this.callbacks[t.id];e&&(t.error?e(t.error):e(null,t.result),delete this.callbacks[t.id])}else if(t.method){var n=t.method.split("aria2.")[1];0===n.indexOf("on")&&"function"==typeof this[n]&&a.notifications.indexOf(n)>-1&&this[n].apply(this,t.params)}},a.prototype.open=function(t){var e="ws"+(this.secure?"s":"")+"://"+this.host+":"+this.port+this.path,n=this.socket=new WebSocket(e),i=this,a=!1;return n.onmessage=function(t){i._onmessage(JSON.parse(t.data))},c()(function(t){n.onopen=function(){a||(t(),a=!0),i.onopen()},n.onclose=function(e){i.onclose(),1006==e.code&&(a||(t(e),a=!0))},n.onerror=function(e){a||(t(e),a=!0)}},t)},a.prototype.close=function(t){var e=this.socket;return c()(function(t){e?(e.addEventListener("close",function(){t()}),e.close()):t()},t)},a.methods=["addUri","addTorrent","addMetalink","remove","forceRemove","pause","pauseAll","forcePause","forcePauseAll","unpause","unpauseAll","tellStatus","getUris","getFiles","getPeers","getServers","tellActive","tellWaiting","tellStopped","changePosition","changeUri","getOption","changeOption","getGlobalOption","changeGlobalOption","getGlobalStat","purgeDownloadResult","removeDownloadResult","getVersion","getSessionInfo","shutdown","forceShutdown","saveSession","system.multicall","system.listMethods","system.listNotifications"],a.notifications=["onDownloadStart","onDownloadPause","onDownloadStop","onDownloadComplete","onDownloadError","onBtDownloadComplete"],a.events=["onopen","onclose","onsend","onmessage"],a.options={secure:!1,host:"localhost",port:6800,secret:"",path:"/jsonrpc"},a.methods.forEach(function(t){var e=t.indexOf(".")>-1?t.split(".")[1]:t;a.prototype[e]=function(){return this.send.apply(this,[t].concat(Array.prototype.slice.call(arguments)))}}),a.notifications.forEach(function(t){a.prototype[t]=function(){}}),a.events.forEach(function(t){a.prototype[t]=function(){}}),n?t.exports=a:e.Aria2=a}(this)}).call(e,n(189)(t))},,function(t,e,n){"use strict";function i(t){var e="";return e=t.bittorrent?t.bittorrent.info.name:t.files[0].path.replace(/^.*[\\\/]/,""),e||(e=d()(t,"files[0].uris[0].uri")),e||"..."}function a(t,e){t=Number(t);var n=["Bytes","KB","MB","GB","TB"];if(0===t)return"0 KB";var i=parseInt(Math.floor(Math.log(t)/Math.log(1e3)),10);if(0===i)return t+" "+n[i];var a=[1,1,10,100,100][i];return c()(e)&&(a=Math.pow(10,e)),""+Math.floor(100*t/Math.pow(1024,i)*a)/(100*a)+n[i]}function s(t,e){function n(t,e){return(new Array(e+1).join("0")+t).slice(-e)}var i=/((?:[^ydhms']+)|(?:'(?:[^']|'')*')|(?:y+|d+|h+|m+|s+))(.*)/,a={y:{value:31536e6},yy:{value:"y",pad:2},d:{value:864e5},dd:{value:"d",pad:2},h:{value:36e5},hh:{value:"h",pad:2},m:{value:6e4},mm:{value:"m",pad:2},s:{value:1e3},ss:{value:"s",pad:2},sss:{value:1},ssss:{value:"sss",pad:4}},s=parseFloat(t,10),o=function(t){for(var e=[],n=t?t.toString():"";n;){var a=i.exec(n);a?(e=e.concat(a.slice(1)),n=e.pop()):(e.push(n),n=null)}return e}(e);return isNaN(s)||0===o.length?t:function(t,e){var i="",s={};e.filter(function(t){return a.hasOwnProperty(t)}).map(function(t){var e=a[t];return e.hasOwnProperty("pad")?e.value:t}).filter(function(t,e,n){return n.indexOf(t)===e}).map(function(t){return r()({name:t},a[t])}).sort(function(t,e){return e.value-t.value}).forEach(function(e){var n=s[e.name]=Math.floor(t/e.value);t-=n*e.value});for(var o=0;o=2&&t.length<=6},msg:"中文姓名"}};e.default={created:function(){var t=this;this.currentValue=this.value||"",this.title||this.placeholder||this.currentValue||console.warn("no title and no placeholder?"),this.required&&!this.currentValue&&(this.valid=!1),this.handleChangeEvent=!0,this.debounce&&(this._debounce=n.i(f.a)(function(){t.$emit("on-change",t.currentValue)},this.debounce))},mounted:function(){this.$slots&&this.$slots["restricted-label"]&&(this.hasRestrictedLabel=!0)},beforeDestroy:function(){this._debounce&&this._debounce.cancel()},mixins:[s.a],components:{Icon:r.a,InlineDesc:c.a},props:{title:{type:String,default:""},type:{type:String,default:"text"},placeholder:String,value:[String,Number],name:String,readonly:Boolean,disabled:Boolean,keyboard:String,inlineDesc:String,isType:[String,Function],min:Number,max:Number,showClear:{type:Boolean,default:!0},equalWith:String,textAlign:String,autocomplete:{type:String,default:"off"},autocapitalize:{type:String,default:"off"},autocorrect:{type:String,default:"off"},spellcheck:{type:String,default:"false"},novalidate:{type:Boolean,default:!1},iconType:String,debounce:Number,placeholderAlign:String,labelWidth:String},computed:{labelStyles:function(){return{width:this.labelWidthComputed||this.$parent.labelWidth||this.labelWidthComputed,textAlign:this.$parent.labelAlign,marginRight:this.$parent.labelMarginRight}},pattern:function(){if("number"===this.keyboard||"china-mobile"===this.isType)return"[0-9]*"},labelWidthComputed:function(){var t=this.title.replace(/[^x00-xff]/g,"00").length/2+1;if(t<10)return t+"em"},hasErrors:function(){return a()(this.errors).length>0},inputStyle:function(){if(this.textAlign)return{textAlign:this.textAlign}},showWarn:function(){return!this.novalidate&&!this.equalWith&&!this.valid&&this.firstError&&(this.touched||this.forceShowError)}},methods:{reset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dirty=!1,this.currentValue=t,this.firstError="",this.valid=!0},clear:function(){this.currentValue="",this.focus()},focus:function(){this.$refs.input.focus()},blur:function(){this.$refs.input.blur()},focusHandler:function(){this.$emit("on-focus",this.currentValue)},onBlur:function(){this.setTouched(),this.validate(),this.$emit("on-blur",this.currentValue)},onKeyUp:function(t){"Enter"===t.key&&(t.target.blur(),this.$emit("on-enter",this.currentValue))},getError:function(){var t=a()(this.errors)[0];this.firstError=this.errors[t]},validate:function(){if(void 0!==this.equalWith)return void this.validateEqual();if(this.errors={},!this.currentValue&&!this.required)return void(this.valid=!0);if(!this.currentValue&&this.required)return this.valid=!1,this.errors.required="必填哦",void this.getError();if("string"==typeof this.isType){var t=v[this.isType];if(t){if(this.valid=t.fn(this.currentValue),!this.valid)return void(this.errors.format=t.msg+"格式不对哦~");delete this.errors.format}}if("function"==typeof this.isType){var e=this.isType(this.currentValue);if(this.valid=e.valid,!this.valid)return this.errors.format=e.msg,this.forceShowError=!0,void(this.firstError||this.getError());delete this.errors.format}if(this.min){if(this.currentValue.lengththis.max)return this.errors.max="最多可以输入"+this.max+"个字符哦",this.valid=!1,void(this.forceShowError=!0);this.forceShowError=!1,delete this.errors.max}this.valid=!0},validateEqual:function(){return!this.equalWith&&this.currentValue?(this.valid=!1,void(this.errors.equal="输入不一致")):(this.dirty||this.currentValue.length>=this.equalWith.length)&&this.currentValue!==this.equalWith?(this.valid=!1,void(this.errors.equal="输入不一致")):void(!this.currentValue&&this.required?this.valid=!1:(this.valid=!0,delete this.errors.equal))}},data:function(){return{hasRestrictedLabel:!1,firstError:"",forceShowError:!1,hasLengthEqual:!1,valid:!0,currentValue:""}},watch:{valid:function(){this.getError()},value:function(t){this.currentValue=t},equalWith:function(t){t&&this.equalWith?(t.length===this.equalWith.length&&(this.hasLengthEqual=!0),this.validateEqual()):this.validate()},currentValue:function(t){!this.equalWith&&t&&this.validateEqual(),t&&this.equalWith?(t.length===this.equalWith.length&&(this.hasLengthEqual=!0),this.validateEqual()):this.validate(),this.$emit("input",t),this._debounce?this._debounce():this.$emit("on-change",t)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),a=n.n(i);e.default={components:{InlineDesc:a.a},computed:{labelStyle:function(){var t=/<\/?[^>]*>/.test(this.title);return{display:"block",width:Math.min(t?5:this.title.length+1,14)+"em"}}},props:{title:{type:String,required:!0},disabled:Boolean,value:{type:Boolean,default:!1},inlineDesc:[String,Boolean,Number]},data:function(){return{currentValue:this.value}},watch:{currentValue:function(t){this.$emit("input",t),this.$emit("on-change",t)},value:function(t){this.currentValue=t}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(55),a=n(12),s=n.n(a),o=n(146),r=n.n(o);e.default={minxins:[i.a],mounted:function(){var t=this;this.$slots&&this.$slots["restricted-label"]&&(this.hasRestrictedLabel=!0),this.$nextTick(function(){t.autosize&&t.bindAutosize()})},components:{InlineDesc:s.a},props:{title:String,inlineDesc:String,showCounter:{type:Boolean,default:!0},max:Number,value:String,name:String,placeholder:String,readonly:Boolean,rows:{type:Number,default:3},cols:{type:Number,default:30},height:Number,autocomplete:{type:String,default:"off"},autocapitalize:{type:String,default:"off"},autocorrect:{type:String,default:"off"},spellcheck:{type:String,default:"false"},autosize:Boolean},created:function(){this.currentValue=this.value},watch:{autosize:function(t){this.unbindAutosize(),t&&this.bindAutosize()},value:function(t){this.currentValue=t},currentValue:function(t){this.max&&t&&t.length>this.max&&(this.currentValue=t.slice(0,this.max)),this.$emit("input",this.currentValue),this.$emit("on-change",this.currentValue)}},data:function(){return{hasRestrictedLabel:!1,currentValue:""}},computed:{count:function(){var t=0;return this.currentValue&&(t=this.currentValue.replace(/\n/g,"aa").length),t>this.max?this.max:t},textareaStyle:function(){if(this.height)return{height:this.height+"px"}},labelStyles:function(){return{width:this.$parent.labelWidth||this.labelWidth+"em",textAlign:this.$parent.labelAlign,marginRight:this.$parent.labelMarginRight}},labelWidth:function(){return this.title.replace(/[^x00-xff]/g,"00").length/2+1}},methods:{bindAutosize:function(){r()(this.$refs.textarea)},unbindAutosize:function(){r.a.destroy(this.$refs.textarea)},focus:function(){this.$refs.textarea.focus()}},beforeDestroy:function(){this.unbindAutosize()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(26),a=n.n(i);e.default={components:{Icon:a.a},methods:{updateValue:function(){this.$emit("update:value",this.val)}},props:{value:[String,Number],val:[String,Number],type:{type:String,default:"default"}}}},,,,,,,,,,,,,,,,,,,function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},,,function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"weui-btn",class:t.classes,attrs:{disabled:t.disabled,type:t.actionType},on:{click:t.onClick}},[t.showLoading?n("i",{staticClass:"weui-loading"}):t._e(),t._v(" "),t._t("default",[t._v(t._s(t.text))])],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"vux-flexbox",class:{"vux-flex-col":"vertical"===t.orient,"vux-flex-row":"horizontal"===t.orient},style:t.styles},[t._t("default")],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-header"},[n("div",{staticClass:"vux-header-left"},[t._t("overwrite-left",[n("transition",{attrs:{name:t.transition}},[n("a",{directives:[{name:"show",rawName:"v-show",value:t._leftOptions.showBack,expression:"_leftOptions.showBack"}],staticClass:"vux-header-back",on:{click:[function(e){if(!("button"in e)&&t._k(e.keyCode,"preventDefault"))return null},t.onClickBack]}},[t._v(t._s(void 0===t._leftOptions.backText?"返回":t._leftOptions.backText))])]),t._v(" "),n("transition",{attrs:{name:t.transition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t._leftOptions.showBack,expression:"_leftOptions.showBack"}],staticClass:"left-arrow",on:{click:t.onClickBack}})])]),t._v(" "),t._t("left")],2),t._v(" "),n("h1",{staticClass:"vux-header-title",on:{click:function(e){t.$emit("on-click-title")}}},[t._t("default",[n("transition",{attrs:{name:t.transition}},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.title,expression:"title"}]},[t._v(t._s(t.title))])])])],2),t._v(" "),n("div",{staticClass:"vux-header-right"},[t.rightOptions.showMore?n("a",{staticClass:"vux-header-more",on:{click:[function(e){if(!("button"in e)&&t._k(e.keyCode,"preventDefault"))return null},function(e){t.$emit("on-click-more")}]}}):t._e(),t._v(" "),t._t("right")],2)])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"weui-cell",class:{"vux-tap-active":t.isLink||!!t.link,"weui-cell_access":t.isLink||!!t.link,"vux-cell-no-border-intent":!t.borderIntent,"vux-cell-disabled":t.disabled},on:{click:t.onClick}},[n("div",{staticClass:"weui-cell__hd"},[t._t("icon")],2),t._v(" "),n("div",{staticClass:"vux-cell-bd",class:{"vux-cell-primary":"title"===t.primary&&"left"!==t.valueAlign}},[n("p",[t.title||t.hasTitleSlot?n("label",{staticClass:"vux-label",style:t.getLabelStyles()},[t._t("title",[t._v(t._s(t.title))])],2):t._e(),t._v(" "),t._t("after-title")],2),t._v(" "),n("inline-desc",[t._t("inline-desc",[t._v(t._s(t.inlineDesc))])],2)],1),t._v(" "),n("div",{staticClass:"weui-cell__ft",class:t.valueClass},[t._t("value"),t._v(" "),t._t("default",[t._v(t._s(t.value))]),t._v(" "),t.isLoading?n("i",{staticClass:"weui-loading"}):t._e()],2),t._v(" "),t._t("child")],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-check-icon",on:{click:t.updateValue}},[n("icon",{directives:[{name:"show",rawName:"v-show",value:"default"===t.type&&t.value===t.val,expression:"type === 'default' && value === val"}],attrs:{type:"success"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:"plain"===t.type&&t.value===t.val,expression:"type === 'plain' && value === val"}],attrs:{type:"success_circle"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:t.value!==t.val,expression:"value !== val"}],attrs:{type:"circle"}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.value,expression:"value"}],staticClass:"radio",attrs:{type:"radio"},domProps:{value:t.val,checked:t._q(t.value,t.val)},on:{__c:function(e){t.value=t.val}}}),t._v(" "),n("span",[t._t("default")],2)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-x-switch weui-cell weui-cell_switch"},[n("div",{staticClass:"weui-cell__bd"},[n("label",{staticClass:"weui-label",style:t.labelStyle,domProps:{innerHTML:t._s(t.title)}}),t._v(" "),t.inlineDesc?n("inline-desc",[t._v(t._s(t.inlineDesc))]):t._e()],1),t._v(" "),n("div",{staticClass:"weui-cell__ft"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],staticClass:"weui-switch",attrs:{type:"checkbox",disabled:t.disabled},domProps:{checked:Array.isArray(t.currentValue)?t._i(t.currentValue,null)>-1:t.currentValue},on:{__c:function(e){var n=t.currentValue,i=e.target,a=!!i.checked;if(Array.isArray(n)){var s=t._i(n,null);a?s<0&&(t.currentValue=n.concat(null)):s>-1&&(t.currentValue=n.slice(0,s).concat(n.slice(s+1)))}else t.currentValue=a}}})])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"vux-flexbox-item",style:t.style},[t._t("default")],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-check-icon",on:{click:t.updateValue}},[n("icon",{directives:[{name:"show",rawName:"v-show",value:"default"===t.type&&t.value,expression:"type === 'default' && value"}],attrs:{type:"success"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:"plain"===t.type&&t.value,expression:"type === 'plain' && value"}],attrs:{type:"success_circle"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:!t.value,expression:"!value"}],attrs:{type:"circle"}}),t._v(" "),n("span",[t._t("default")],2)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-x-input weui-cell",class:{"weui-cell_warn":t.showWarn}},[n("div",{staticClass:"weui-cell__hd"},[t.hasRestrictedLabel?n("div",{style:t.labelStyles},[t._t("restricted-label")],2):t._e(),t._v(" "),t._t("label",[t.title?n("label",{staticClass:"weui-label",style:{width:t.labelWidth||t.$parent.labelWidth||t.labelWidthComputed,textAlign:t.$parent.labelAlign,marginRight:t.$parent.labelMarginRight},domProps:{innerHTML:t._s(t.title)}}):t._e(),t._v(" "),t.inlineDesc?n("inline-desc",[t._v(t._s(t.inlineDesc))]):t._e()])],2),t._v(" "),n("div",{staticClass:"weui-cell__bd weui-cell__primary",class:t.placeholderAlign?"vux-x-input-placeholder-"+t.placeholderAlign:""},[t.type&&"text"!==t.type?t._e():n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"text",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:t.onBlur,keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}),t._v(" "),"number"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"number",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:[t.onBlur,function(e){t.$forceUpdate()}],keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}):t._e(),t._v(" "),"email"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"email",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:t.onBlur,keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}):t._e(),t._v(" "),"password"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"password",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:t.onBlur,keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}):t._e(),t._v(" "),"tel"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"tel",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:t.onBlur,keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}):t._e()]),t._v(" "),n("div",{staticClass:"weui-cell__ft"},[n("icon",{directives:[{name:"show",rawName:"v-show",value:!t.equalWith&&t.showClear&&t.currentValue&&!t.readonly&&!t.disabled,expression:"!equalWith && showClear && currentValue && !readonly && !disabled"}],attrs:{type:"clear"},nativeOn:{click:function(e){t.clear(e)}}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:t.showWarn,expression:"showWarn"}],staticClass:"vux-input-icon",attrs:{type:"warn",title:t.valid?"":t.firstError}}),t._v(" "),!t.novalidate&&t.hasLengthEqual&&t.dirty&&t.equalWith&&!t.valid?n("icon",{staticClass:"vux-input-icon",attrs:{type:"warn"}}):t._e(),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:!t.novalidate&&t.equalWith&&t.equalWith===t.currentValue&&t.valid,expression:"!novalidate && equalWith && equalWith === currentValue && valid"}],attrs:{type:"success"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:t.novalidate&&"success"===t.iconType,expression:"novalidate && iconType === 'success'"}],staticClass:"vux-input-icon",attrs:{type:"success"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:t.novalidate&&"error"===t.iconType,expression:"novalidate && iconType === 'error'"}],staticClass:"vux-input-icon",attrs:{type:"warn"}}),t._v(" "),t._t("right")],2)])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"vux-label-desc"},[t._t("default")],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",{class:[t.className,t.isMsg?"weui-icon_msg":""]})},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.title?n("div",{staticClass:"weui-cells__title",style:{color:t.titleColor},domProps:{innerHTML:t._s(t.title)}}):t._e(),t._v(" "),n("div",{staticClass:"weui-cells",class:{"vux-no-group-title":!t.title},style:{marginTop:"number"==typeof t.gutter?t.gutter+"px":t.gutter}},[t._t("after-title"),t._v(" "),t._t("default")],2)])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"weui-cell vux-x-textarea"},[n("div",{staticClass:"weui-cell__hd"},[t.hasRestrictedLabel?n("div",{style:t.labelStyles},[t._t("restricted-label")],2):t._e(),t._v(" "),t._t("label",[t.title?n("label",{staticClass:"weui-label",style:{width:t.$parent.labelWidth||t.labelWidth+"em",textAlign:t.$parent.labelAlign,marginRight:t.$parent.labelMarginRight},domProps:{innerHTML:t._s(t.title)}}):t._e(),t._v(" "),t.inlineDesc?n("inline-desc",[t._v(t._s(t.inlineDesc))]):t._e()])],2),t._v(" "),n("div",{staticClass:"weui-cell__bd"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"textarea",staticClass:"weui-textarea",style:t.textareaStyle,attrs:{autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,placeholder:t.placeholder,readonly:t.readonly,name:t.name,rows:t.rows,cols:t.cols,maxlength:t.max},domProps:{value:t.currentValue},on:{focus:function(e){t.$emit("on-focus")},blur:function(e){t.$emit("on-blur")},input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showCounter&&t.max,expression:"showCounter && max"}],staticClass:"weui-textarea-counter",on:{click:t.focus}},[n("span",[t._v(t._s(t.count))]),t._v("/"+t._s(t.max)+"\n ")])])])},staticRenderFns:[]}},function(t,e,n){n(118);var i=n(1)(n(95),n(132),null,null);t.exports=i.exports},,,,,,function(t,e,n){"use strict";var i=n(82),a=(n.n(i),n(54)),s=n.n(a);n(81);e.a={getConfig:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],s()(safari,"extension.globalPage.contentWindow.s2a",{}));if(t.getConfig){var e=t.getConfig();e.aria2Connects}return t}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var i=n(19),a=n(188),s=n(426),o=n.n(s);i.a.use(a.a),e.a=new a.a({routes:[{path:"/",name:"Index",component:o.a}]})},function(t,e,n){"use strict";var i=n(32),a=n.n(i),s=n(56),o=n.n(s),r=n(239),l=n.n(r),c=n(57),u=n.n(c),d=n(236),p=n.n(d),h=n(151),f=n.n(h),v=n(397),m=n.n(v),g=n(54),w=n.n(g),_=n(82),b=n.n(_),x=n(19),y=n(76),S=n(83),k=n(147);x.a.use(y.a);var C=void 0,O={get_s2a:function(){if(!C||!C.getConfig){for(var t=arguments.length,e=Array(t),n=0;n1?i-1:0),s=1;s1?e-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{}),s=w()(a,"gids",n.selectedGids),o=i.taskLists.filter(function(t){return~s.indexOf(t.gid)}),r={active:[],paused:[]};o.map(function(t){r[t.status]=r[t.status]||[],r[t.status].push(t.gid)});var l=r.active.length>=r.paused.length?"active":"paused",c=r.active.length>=r.paused.length?"pause":"unpause";return r.active.length||r.paused.length?O.mutilCall(n.currentServerUrl,r[l].map(function(t){return{methodName:"aria2."+c,params:[t]}})).then(function(){return e("getTaskList")}):p.a.resolve("no change")},saveOptions:function(t){var e=t.dispatch,n=t.state,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return O.sendCall(n.currentServerUrl,"aria2.changeGlobalOption",u()({},i.options)).then(function(){return e("getTaskList",{loadOptions:!0})}).catch(function(t){console.log(t)})},startSelectedDownloads:function(t){var e=t.dispatch,n=t.state,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=w()(i,"gids",n.selectedGids);return O.mutilCall(n.currentServerUrl,a.map(function(t){return{methodName:"aria2.unpause",params:[t]}})).then(function(){return e("getTaskList")})},pauseSelectedDownloads:function(t){var e=t.dispatch,n=t.state,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=w()(i,"gids",n.selectedGids);return O.mutilCall(n.currentServerUrl,a.map(function(t){return{methodName:"aria2.pause",params:[t]}})).then(function(){return e("getTaskList")})},removeSelectedDownloads:function(t){var e=t.dispatch,n=t.state,i=t.getters,a=t.commit,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=w()(s,"gids",n.selectedGids),r=i.taskLists.filter(function(t){return~o.indexOf(t.gid)});return O.mutilCall(n.currentServerUrl,r.map(function(t){return{methodName:"aria2."+(~["active","paused"].indexOf(t.status)?"remove":"removeDownloadResult"),params:[t.gid]}})).then(function(){return a("setSelected",{selected:[]}),e("getTaskList")})},getTaskList:function(t){var e=t.commit,n=t.state,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!O.get_s2a())return p.a.reject("获取global变量错误");n.currentServerUrl||e("refreshServerList");var a=[{methodName:"aria2.tellActive",params:[]},{methodName:"aria2.tellWaiting",params:[0,1e3]},{methodName:"aria2.tellStopped",params:[0,1e3]},{methodName:"aria2.getGlobalStat",params:null}];return i.loadOptions&&a.push({methodName:"aria2.getGlobalOption",params:null}),n.currentServerUrl?O.sendCall(n.currentServerUrl,"system.multicall",a).then(function(t){if(e("setTaskList",{list:m()(t[0][0]||[],t[1][0]||[],t[2][0]||[]),url:n.currentServerUrl}),e("setGlobalStat",{globalStat:t[3][0]}),w()(window.safari||{},"extension.toolbarItems")&&(t[3][0]&&t[3][0].numActive?safari.extension.toolbarItems[0].badge=t[3][0].numActive:safari.extension.toolbarItems[0].badge=0),i.loadOptions&&e("setGlobalOption",{globalOption:t[4][0]}),t[3]&&t[3].code)return p.a.reject(t[3])}).catch(function(t){e("setGlobalStat",{globalStat:!1}),console.log("获取列表失败",t)}):p.a.reject("no server url")}},V={isDebug:function(t){return!!O.get_s2a()&&C.isDebug},serverList:function(t){return t.serverList},getAllTaskGid:function(t,e){return e.taskLists.map(function(t){return t.gid})},getGlobalStat:function(t){var e=a()({},t.globalStat);return e.downloadSpeedText=S.a(e.downloadSpeed||0)+"/s",e.uploadSpeedText=S.a(e.uploadSpeed||0)+"/s",e},taskLists:function(t){var e=["complete","error","paused","waiting","active"],n=[],i=t.currentServerUrl;return t.taskList[i]&&(n=t.taskList[i].slice(0).sort(function(t,n){return t.status===n.status?S.b(n)>S.b(t)?1:-1:e.indexOf(n.status)>e.indexOf(t.status)?1:-1})),n},selectedTasks:function(t,e){return e.taskLists.filter(function(e){return~t.selectedGids.indexOf(e.gid)})}};e.a=new y.a.Store({state:L,getters:V,actions:T,mutations:$})},function(t,e,n){"use strict";var i=n(233),a=n.n(i),s=n(56),o=n.n(s),r=n(216),l=function(t){return o()(t).map(function(e){var i={};return e.split("+").forEach(function(t){switch(t.toLowerCase()){case"ctrl":case"alt":case"shift":case"meta":i[t]=!0;break;default:i.keyCode=n.i(r.a)(t)}}),i.callback=t[e],i})};e.a={install:function(t){t.directive("hotkey",{bind:function(t,e,n,i){t._keymap=l(e.value),t._keyHandler=function(e){var n=!0,i=!1,s=void 0;try{for(var o,r=a()(t._keymap);!(n=(o=r.next()).done);n=!0){var l=o.value;l.keyCode===e.keyCode&&!!l.ctrl===e.ctrlKey&&!!l.alt===e.altKey&&!!l.shift===e.shiftKey&&!!l.meta===e.metaKey&&l.callback(e)}}catch(t){i=!0,s=t}finally{try{!n&&r.return&&r.return()}finally{if(i)throw s}}},document.addEventListener("keydown",t._keyHandler)},unbind:function(t,e,n,i){document.removeEventListener("keydown",t._keyHandler)}})}}},,,,function(t,e,n){n(330);var i=n(1)(n(224),n(408),null,null);t.exports=i.exports},,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),a=n(210),s=n.n(a),o=n(204),r=n(205),l=n(206),c=n(207);i.a.use(c.a),i.a.use(l.a),new i.a({router:o.a,store:r.a,render:function(t){return t(s.a)}}).$mount("#app-box"),window.tlwin={refreshServerList:function(){r.a.commit("refreshServerList")},refreshTaskList:function(){r.a.dispatch("getTaskList",{loadOptions:!0})}}},function(t,e,n){"use strict";var i=n(34),a=n.n(i);e.a=function(t){if(t&&"object"===(void 0===t?"undefined":a()(t))){var e=t.which||t.keyCode||t.charCode;e&&(t=e)}if("number"==typeof t)return names[t];var n=String(t),i=s[n.toLowerCase()];if(i)return i;var i=o[n.toLowerCase()];return i||(1===n.length?n.charCodeAt(0):void 0)};var s={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(r=97;r<123;r++)s[String.fromCharCode(r)]=r-32;for(var r=48;r<58;r++)s[r-48]=r;for(r=1;r<13;r++)s["f"+r]=r+111;for(r=0;r<10;r++)s["numpad "+r]=r+96},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(151),a=n.n(i),s=n(39),o=n.n(s),r=n(175),l=n.n(r),c=n(19),u=["legendselectchanged","legendselected","legendunselected","datazoom","datarangeselected","timelinechanged","timelineplaychanged","restore","dataviewchanged","magictypechanged","geoselectchanged","geoselected","geounselected","pieselectchanged","pieselected","pieunselected","mapselectchanged","mapselected","mapunselected","axisareaselected","brush","brushselected"],d=["click","dblclick","mouseover","mouseout","mousedown","mouseup","globalout"];e.default={props:{options:Object,theme:String,initOptions:Object,group:String,autoResize:Boolean},data:function(){return{chart:null}},computed:{width:{cache:!1,get:function(){return this._delegateGet("width","getWidth")}},height:{cache:!1,get:function(){return this._delegateGet("height","getHeight")}},isDisposed:{cache:!1,get:function(){return!!this._delegateGet("isDisposed","isDisposed")}},computedOptions:{cache:!1,get:function(){return this._delegateGet("computedOptions","getOption")}}},watch:{options:{handler:function(t){!this.chart&&t?this._init():this.chart.setOption(this.options,!0)},deep:!0},group:{handler:function(t){this.chart.group=t}}},methods:{mergeOptions:function(t){this._delegateMethod("setOption",t)},resize:function(t){this._delegateMethod("resize",t)},dispatchAction:function(t){this._delegateMethod("dispatchAction",t)},convertToPixel:function(t,e){return this._delegateMethod("convertToPixel",t,e)},convertFromPixel:function(t,e){return this._delegateMethod("convertFromPixel",t,e)},containPixel:function(t,e){return this._delegateMethod("containPixel",t,e)},showLoading:function(t,e){this._delegateMethod("showLoading",t,e)},hideLoading:function(){this._delegateMethod("hideLoading")},getDataURL:function(t){return this._delegateMethod("getDataURL",t)},getConnectedDataURL:function(t){return this._delegateMethod("getConnectedDataURL",t)},clear:function(){this._delegateMethod("clear")},dispose:function(){this._delegateMethod("dispose")},_delegateMethod:function(t){var e;if(!this.chart)return void c.a.util.warn("Cannot call ["+t+"] before the chart is initialized. Set prop [options] first.",this);for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s50){for(var i=[],a=0,s=parseInt(n.length/50)+1;a=n.length&&(s=n.length-a-1);for(var l=a;l<=a+s;l++)o+=n[l];o=parseInt(o*(r/s)),i.push(o),a+=s}e=16*(parseInt(n.length/50)+1),n=i,t.length=n.length}return{grid:{left:"0%",right:"0%",containLabel:!1},xAxis:{show:!1,data:t},yAxis:{show:!1,max:e},series:[{type:"bar",barGap:"0%",silent:!0,barCategoryGap:"0",itemStyle:{normal:{color:"#eeeeee"}},data:n}]}},getStatus:function(){return{active:"下载中",waiting:"等待中",paused:"已暂停",error:"错误",complete:"已完成",removed:"已删除"}[this.download.status]||""},name:function(){return O.b(this.download)},progress:function(){var t="0"===this.download.totalLength?0:this.download.completedLength/this.download.totalLength;return[parseInt(100*t),"%"].join("")},completedSize:function(){return O.a(this.download.completedLength,-1)},size:function(){return O.a(this.download.totalLength,-1)},isDownloading:function(){return"active"===this.download.status&&"0"!==this.download.downloadSpeed},isUploading:function(){return"active"===this.download.status&&"0"!==this.download.uploadSpeed},downloadSpeed:function(){return[O.a(this.download.downloadSpeed||0,-1),"/s"].join("")},downloadConnections:function(){return this.download.connections},uploadSpeed:function(){return O.a(this.download.uploadSpeed||0)+"/s"}},n.i(L.c)({globalConfig:"config"})),methods:a()({showAction:function(){this.showAction=!0},hideAction:function(){this.showAction=!0}},n.i(L.e)(["startSelectedDownloads","pauseSelectedDownloads","removeSelectedDownloads"]))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(57),a=n.n(i),s=n(46),o=n.n(s),r=n(44),l=n.n(r),c=n(47),u=n.n(c),d=n(49),p=n.n(d),h=n(41),f=n.n(h),v=n(43),m=n.n(v),g=n(42),w=n.n(g),_=n(45),b=n.n(_),x=n(48),y=n.n(x),S=n(40),k=n.n(S),C=n(427),O=n.n(C),L=n(76);e.default={components:{XHeader:o.a,Group:l.a,XInput:u.a,XTextarea:p.a,CheckIcon:f.a,Flexbox:m.a,FlexboxItem:w.a,XButton:b.a,XSwitch:y.a,Cell:k.a,TaskLine:O.a},props:{list:Array,selected:Array},computed:a()({gids:function(){return this.list.map(function(t){return t?t.gid:""})}},n.i(L.c)(["selectedGids"])),methods:a()({select:function(t,e){var n=this.selectedGids;if(e.ctrlKey||e.metaKey||e.shiftKey?n.push(t):n=[t],e.shiftKey&&n.length){var i=n[0],a=n[n.length-1],s=[this.gids.indexOf(i),this.gids.indexOf(a)];s[0]>s[1]&&s.reverse(),n=this.gids.slice(s[0],s[1]+1)}this.setSelected({selected:n})},startOrPause:function(t){"paused"===t.status?this.$store.dispatch("startSelectedDownloads"):"active"===t.status&&this.$store.dispatch("pauseSelectedDownloads")}},n.i(L.d)(["setSelected"]))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){},function(t,e){},,function(t,e){},function(t,e){},function(t,e){},,function(t,e){},function(t,e){},function(t,e){},function(t,e){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.keymap,expression:"keymap"}],staticClass:"pop_wrapper"},[n("x-header",{staticClass:"pop_header",attrs:{"left-options":{showBack:!1},"right-options":{showMore:!0}},on:{"on-click-more":t.openOptionsPanel}},[n("popmenu",{ref:"popmenu",attrs:{placement:"bottom"},on:{"on-show":t.popmenuShow,"on-hide":t.popmenuHide}},[n("div",{staticClass:"selectRpcServer",slot:"content"},[n("group",t._l(t.serverList,function(e){return n("cell",{key:e.url,class:{acitve:e.url===t.currentServerUrl},attrs:{title:e.name},nativeOn:{click:function(n){t.changeList({url:e.url})}}})}))],1),t._v(" "),n("div",{staticClass:"rpcServer"},[n("button",[t._v(t._s(t.currenServerName)+t._s(t.globalStat?"":"(未连接)"))]),t._v(" "),n("i",{staticClass:"material-icons"},[t._v(t._s(t.popmenuIsShow?"keyboard_arrow_up":"keyboard_arrow_down"))])])])],1),t._v(" "),n("div",{staticClass:"globalStatus"},[n("div",{staticClass:"control"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.selectedGids.length>0,expression:"selectedGids.length>0"}],staticClass:"inner"},[n("x-button",{attrs:{mini:"",plain:""},nativeOn:{click:function(e){e.stopPropagation(),t.startSelectedDownloads()}}},[t._v("开始")]),t._v(" "),n("x-button",{attrs:{mini:"",plain:""},nativeOn:{click:function(e){e.stopPropagation(),t.pauseSelectedDownloads()}}},[t._v("暂停")]),t._v(" "),n("x-button",{attrs:{mini:"",plain:""},nativeOn:{click:function(e){e.stopPropagation(),t.removeSelectedDownloads()}}},[t._v("删除")])],1)]),t._v(" "),n("div",{staticClass:"speed",attrs:{title:"点击设置全局限速"},on:{click:function(e){if(!("button"in e)&&t._k(e.keyCode,"nativ"))return null;e.stopPropagation(),t.openAria2Options()}}},[t.getGlobalStat.uploadSpeed>0?n("div",{staticClass:"up"},[n("i",{staticClass:"material-icons"},[t._v("arrow_upward")]),t._v("\n "+t._s(t.getGlobalStat.uploadSpeedText)+"\n ")]):t._e(),t._v(" "),n("div",{staticClass:"down"},[n("i",{staticClass:"material-icons"},[t._v("arrow_downward")]),t._v("\n "+t._s(t.getGlobalStat.downloadSpeedText)+"\n ")])])]),t._v(" "),n("task-list",{staticClass:"pop_list",attrs:{list:t.taskLists},nativeOn:{click:function(e){e.stopPropagation(),t.setSelected({selected:[]})}}}),t._v(" "),n("x-dialog",{staticClass:"dialog-options",attrs:{"hide-on-blur":"",scroll:!1},model:{value:t.showOptions,callback:function(e){t.showOptions=e},expression:"showOptions"}},[n("group",[n("x-input",{attrs:{title:"全局最大下载速度",type:"number","show-clear":!1,min:0},model:{value:t.change2GlobalOptions["max-overall-download-limit"],callback:function(e){var n=t.change2GlobalOptions;Array.isArray(n)?n.splice("max-overall-download-limit",1,e):t.change2GlobalOptions["max-overall-download-limit"]=e},expression:"change2GlobalOptions['max-overall-download-limit']"}},[n("span",{slot:"right"},[t._v("KB")])]),t._v(" "),n("x-input",{attrs:{title:"全局最大上传速度",type:"number","show-clear":!1,min:0},model:{value:t.change2GlobalOptions["max-overall-upload-limit"],callback:function(e){var n=t.change2GlobalOptions;Array.isArray(n)?n.splice("max-overall-upload-limit",1,e):t.change2GlobalOptions["max-overall-upload-limit"]=e},expression:"change2GlobalOptions['max-overall-upload-limit']"}},[n("span",{slot:"right"},[t._v("KB")])]),t._v(" "),n("x-input",{attrs:{title:"同时任务数量",type:"number","show-clear":!1,min:1},model:{value:t.change2GlobalOptions["max-concurrent-downloads"],callback:function(e){var n=t.change2GlobalOptions;Array.isArray(n)?n.splice("max-concurrent-downloads",1,e):t.change2GlobalOptions["max-concurrent-downloads"]=e},expression:"change2GlobalOptions['max-concurrent-downloads']"}},[n("span",{slot:"right"},[t._v("个")])])],1),t._v(" "),n("group",{staticClass:"buttonGroup"},[n("x-button",{nativeOn:{click:function(e){t.saveAria2Options()}}},[t._v("保存")]),t._v(" "),n("x-button",{nativeOn:{click:function(e){t.showOptions=!1}}},[t._v("取消")])],1)],1)],1)},staticRenderFns:[]}},,function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"echarts"})},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-x-dialog",on:{touchmove:t.onTouchMove}},[n("transition",{attrs:{name:t.maskTransition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.currentValue,expression:"currentValue"}],staticClass:"weui-mask",on:{click:function(e){t.hideOnBlur&&(t.currentValue=!1)}}})]),t._v(" "),n("transition",{attrs:{name:t.dialogTransition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.currentValue,expression:"currentValue"}],class:t.dialogClass,style:t.dialogStyle},[t._t("default")],2)])],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onClickedOutside,expression:"onClickedOutside"}]},[n("span",{ref:"trigger",on:{click:t.toggle}},[t._t("default")],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],ref:"popover",staticClass:"vux-popover",style:t.popoverStyle},[n("div",{class:t.arrowClass}),t._v(" "),n("div",{on:{click:function(e){t.$emit("on-click-content")}}},[t._t("content",[n("div",{domProps:{innerHTML:t._s(t.content)}})])],2)])])},staticRenderFns:[]}},,function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("group",[n("div",{staticClass:"download-list"},[t._l(t.list,function(e){return n("task-line",{key:e.gid,attrs:{download:e,selected:~t.selectedGids.indexOf(e.gid)},nativeOn:{click:function(n){n.stopPropagation(),t.select(e.gid,n)},dblclick:function(n){n.stopPropagation(),t.startOrPause(e)}}})}),t._v(" "),t.list.length<1?n("cell",{staticClass:"empty",attrs:{title:"暂无下载任务"}}):t._e()],2)])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("cell-box",{staticClass:"download",class:{selected:t.selected},nativeOn:{mouseenter:function(e){t.showAction=!0},mouseleave:function(e){t.showAction=!1}}},[t.globalConfig.enableChart?n("chart",{staticClass:"chart",attrs:{autoResize:!0,options:t.char}}):t._e(),t._v(" "),n("div",{staticClass:"progress",style:{width:t.progress}},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.showPercent,expression:"showPercent"}]},[t._v(t._s(parseInt(t.progress)))])]),t._v(" "),n("div",{staticClass:"info"},[n("div",{staticClass:"left"},[n("div",{staticClass:"name",attrs:{title:t.name}},[t._v("\n "+t._s(t.name)+"\n ")]),t._v(" "),n("div",{staticClass:"status"},[t.download.errorMessage?n("div",[t._v(t._s(t.download.errorMessage))]):t._e(),t._v(" "),t.download.errorMessage?t._e():n("div",["active"!=t.download.status?n("span",[t._v(t._s(t.getStatus))]):t._e(),t._v(" "),"0"!==t.download.totalLength?n("span",{staticClass:"size",on:{mouseenter:function(e){t.showPercent=!0},mouseleave:function(e){t.showPercent=!1}}},[t._v(t._s(t.isDownloading?t.completedSize+"/":"")+t._s(t.size))]):t._e(),t._v(" "),t.isDownloading?n("span",{staticClass:"speed"},[t._v(t._s(t.downloadSpeed))]):t._e(),t._v(" "),t.isDownloading?n("span",{staticClass:"connections",attrs:{title:"连接数"}},[t._v(t._s(t.downloadConnections))]):t._e(),t._v(" "),t.isUploading?n("span",{staticClass:"speed upload"},[t._v(t._s(t.uploadSpeed))]):t._e(),t._v(" "),t.isDownloading?n("span",{staticClass:"eta"},[t._v("剩余:"+t._s(t.eta))]):t._e()])])]),t._v(" "),n("div",{staticClass:"right"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.showAction&&!t.showPercent,expression:"showAction&&!showPercent"}],staticClass:"action"},[n("i",{directives:[{name:"show",rawName:"v-show",value:"active"===t.download.status,expression:"download.status === 'active'"}],staticClass:"material-icons",attrs:{title:"暂停"},on:{click:function(e){e.stopPropagation(),t.pauseSelectedDownloads({gids:[t.download.gid]})}}},[t._v("pause_circle_outline")]),t._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:"paused"===t.download.status,expression:"download.status === 'paused'"}],staticClass:"material-icons",attrs:{title:"开始"},on:{click:function(e){e.stopPropagation(),t.startSelectedDownloads({gids:[t.download.gid]})}}},[t._v("play_circle_outline")]),t._v(" "),n("i",{staticClass:"material-icons",attrs:{title:"删除"},on:{click:function(e){e.stopPropagation(),t.removeSelectedDownloads({gids:[t.download.gid]})}}},[t._v("delete_forever")])])])])],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-toast"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowMask&&t.show,expression:"isShowMask && show"}],staticClass:"weui-mask_transparent"}),t._v(" "),n("transition",{attrs:{name:t.currentTransition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],staticClass:"weui-toast",class:t.toastClass,style:{width:t.width}},[n("i",{directives:[{name:"show",rawName:"v-show",value:"text"!==t.type,expression:"type !== 'text'"}],staticClass:"weui-icon-success-no-circle weui-icon_toast"}),t._v(" "),t.text?n("p",{staticClass:"weui-toast__content",style:t.style,domProps:{innerHTML:t._s(t.text)}}):n("p",{staticClass:"weui-toast__content"},[t._t("default")],2)])])],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-cell-box weui-cell",class:{"vux-tap-active":t.isLink||!!t.link,"weui-cell_access":t.isLink||!!t.link,"vux-cell-no-border-intent":!t.borderIntent},on:{click:t.onClick}},[n("div",[t._t("default")],2)])},staticRenderFns:[]}},,function(t,e,n){n(333);var i=n(1)(n(217),n(411),null,null);t.exports=i.exports},function(t,e,n){n(340);var i=n(1)(n(218),n(418),null,null);t.exports=i.exports},function(t,e,n){n(339);var i=n(1)(n(219),n(417),null,null);t.exports=i.exports},function(t,e,n){n(334);var i=n(1)(n(220),n(412),null,null);t.exports=i.exports},function(t,e,n){n(335);var i=n(1)(n(221),n(413),null,null);t.exports=i.exports},,function(t,e,n){n(331);var i=n(1)(n(225),n(409),null,null);t.exports=i.exports},function(t,e,n){n(338);var i=n(1)(n(226),n(416),null,null);t.exports=i.exports},function(t,e,n){n(337);var i=n(1)(n(227),n(415),null,null);t.exports=i.exports}],[215]); \ No newline at end of file +webpackJsonp([1],[,,,,,,,,,,,,function(t,e,n){n(122);var i=n(1)(null,n(137),null,null);t.exports=i.exports},,,,,,,,,,,,,,function(t,e,n){n(123);var i=n(1)(n(89),n(138),null,null);t.exports=i.exports},,,,,,,,,,,,,,function(t,e,n){n(117);var i=n(1)(n(84),n(131),null,null);t.exports=i.exports},function(t,e,n){n(120);var i=n(1)(n(85),n(135),null,null);t.exports=i.exports},function(t,e,n){var i=n(1)(n(86),n(134),null,null);t.exports=i.exports},function(t,e,n){n(115);var i=n(1)(n(87),n(129),null,null);t.exports=i.exports},function(t,e,n){n(124);var i=n(1)(n(88),n(139),null,null);t.exports=i.exports},function(t,e,n){n(114);var i=n(1)(n(90),n(128),null,null);t.exports=i.exports},function(t,e,n){n(116);var i=n(1)(n(91),n(130),null,null);t.exports=i.exports},function(t,e,n){n(121);var i=n(1)(n(92),n(136),null,null);t.exports=i.exports},function(t,e,n){n(119);var i=n(1)(n(93),n(133),null,null);t.exports=i.exports},function(t,e,n){n(125);var i=n(1)(n(94),n(140),null,null);t.exports=i.exports},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";(function(t){var e=n(53),i=n.n(e),a=n(34),s=n.n(a),o=n(150),r=n.n(o),l=n(184),c=n.n(l);!function(e){var n=void 0!==t&&t.exports,a=function t(e){this.callbacks=r()(null),this.lastId=0;for(var n in t.options)this[n]="object"===(void 0===e?"undefined":s()(e))&&n in e?e[n]:t.options[n]};a.prototype.http=function(t,e){var n=this,a={method:t.method,id:t.id};Array.isArray(t.params)&&t.params.length>0&&(a.params=t.params);var s="http"+(this.secure?"s":"")+"://"+this.host+":"+this.port+this.path;fetch(s,{method:"POST",body:i()(a),headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(t){return t.json()}).then(function(t){n._onmessage(t)}).catch(e)},a.prototype.send=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof e[e.length-1]?e.pop():null;return this.exec(t,e,n)},a.prototype.exec=function(t,e,n){if("string"!=typeof t)throw new TypeError(t+" is not a string");0!==t.indexOf("system.")&&0!==t.indexOf("aria2.")&&(t="aria2."+t);var a={method:t,"json-rpc":"2.0",id:this.lastId++},s=this.secret?["token:"+this.secret]:[];Array.isArray(e)&&("system.multicall"===t?(Array.isArray(e[0])&&e[0].forEach(function(t){t.params||(t.params=[]),t.params=s.concat(t.params)}),s=e):s=s.concat(e)),s.length>0&&(a.params=s),this.onsend(a);var o=this;return this.socket&&1===this.socket.readyState?this.socket.send(i()(a)):this.http(a,function(t){o.callbacks[a.id](t),delete o.callbacks[a.id]}),c()(function(t){o.callbacks[a.id]=t},n)},a.prototype._onmessage=function(t){if(this.onmessage(t),void 0!==t.id){var e=this.callbacks[t.id];e&&(t.error?e(t.error):e(null,t.result),delete this.callbacks[t.id])}else if(t.method){var n=t.method.split("aria2.")[1];0===n.indexOf("on")&&"function"==typeof this[n]&&a.notifications.indexOf(n)>-1&&this[n].apply(this,t.params)}},a.prototype.open=function(t){var e="ws"+(this.secure?"s":"")+"://"+this.host+":"+this.port+this.path,n=this.socket=new WebSocket(e),i=this,a=!1;return n.onmessage=function(t){i._onmessage(JSON.parse(t.data))},c()(function(t){n.onopen=function(){a||(t(),a=!0),i.onopen()},n.onclose=function(e){i.onclose(),1006==e.code&&(a||(t(e),a=!0))},n.onerror=function(e){a||(t(e),a=!0)}},t)},a.prototype.close=function(t){var e=this.socket;return c()(function(t){e?(e.addEventListener("close",function(){t()}),e.close()):t()},t)},a.methods=["addUri","addTorrent","addMetalink","remove","forceRemove","pause","pauseAll","forcePause","forcePauseAll","unpause","unpauseAll","tellStatus","getUris","getFiles","getPeers","getServers","tellActive","tellWaiting","tellStopped","changePosition","changeUri","getOption","changeOption","getGlobalOption","changeGlobalOption","getGlobalStat","purgeDownloadResult","removeDownloadResult","getVersion","getSessionInfo","shutdown","forceShutdown","saveSession","system.multicall","system.listMethods","system.listNotifications"],a.notifications=["onDownloadStart","onDownloadPause","onDownloadStop","onDownloadComplete","onDownloadError","onBtDownloadComplete"],a.events=["onopen","onclose","onsend","onmessage"],a.options={secure:!1,host:"localhost",port:6800,secret:"",path:"/jsonrpc"},a.methods.forEach(function(t){var e=t.indexOf(".")>-1?t.split(".")[1]:t;a.prototype[e]=function(){return this.send.apply(this,[t].concat(Array.prototype.slice.call(arguments)))}}),a.notifications.forEach(function(t){a.prototype[t]=function(){}}),a.events.forEach(function(t){a.prototype[t]=function(){}}),n?t.exports=a:e.Aria2=a}(this)}).call(e,n(189)(t))},,function(t,e,n){"use strict";function i(t){var e="";return e=t.bittorrent?t.bittorrent.info.name:t.files[0].path.replace(/^.*[\\\/]/,""),e||(e=d()(t,"files[0].uris[0].uri")),e||"..."}function a(t,e){t=Number(t);var n=["Bytes","KB","MB","GB","TB"];if(0===t)return"0 KB";var i=parseInt(Math.floor(Math.log(t)/Math.log(1e3)),10);if(0===i)return t+" "+n[i];var a=[1,1,10,100,100][i];return c()(e)&&(a=Math.pow(10,e)),""+Math.floor(100*t/Math.pow(1024,i)*a)/(100*a)+n[i]}function s(t,e){function n(t,e){return(new Array(e+1).join("0")+t).slice(-e)}var i=/((?:[^ydhms']+)|(?:'(?:[^']|'')*')|(?:y+|d+|h+|m+|s+))(.*)/,a={y:{value:31536e6},yy:{value:"y",pad:2},d:{value:864e5},dd:{value:"d",pad:2},h:{value:36e5},hh:{value:"h",pad:2},m:{value:6e4},mm:{value:"m",pad:2},s:{value:1e3},ss:{value:"s",pad:2},sss:{value:1},ssss:{value:"sss",pad:4}},s=parseFloat(t,10),o=function(t){for(var e=[],n=t?t.toString():"";n;){var a=i.exec(n);a?(e=e.concat(a.slice(1)),n=e.pop()):(e.push(n),n=null)}return e}(e);return isNaN(s)||0===o.length?t:function(t,e){var i="",s={};e.filter(function(t){return a.hasOwnProperty(t)}).map(function(t){var e=a[t];return e.hasOwnProperty("pad")?e.value:t}).filter(function(t,e,n){return n.indexOf(t)===e}).map(function(t){return r()({name:t},a[t])}).sort(function(t,e){return e.value-t.value}).forEach(function(e){var n=s[e.name]=Math.floor(t/e.value);t-=n*e.value});for(var o=0;o=2&&t.length<=6},msg:"中文姓名"}};e.default={created:function(){var t=this;this.currentValue=this.value||"",this.title||this.placeholder||this.currentValue||console.warn("no title and no placeholder?"),this.required&&!this.currentValue&&(this.valid=!1),this.handleChangeEvent=!0,this.debounce&&(this._debounce=n.i(f.a)(function(){t.$emit("on-change",t.currentValue)},this.debounce))},mounted:function(){this.$slots&&this.$slots["restricted-label"]&&(this.hasRestrictedLabel=!0)},beforeDestroy:function(){this._debounce&&this._debounce.cancel()},mixins:[s.a],components:{Icon:r.a,InlineDesc:c.a},props:{title:{type:String,default:""},type:{type:String,default:"text"},placeholder:String,value:[String,Number],name:String,readonly:Boolean,disabled:Boolean,keyboard:String,inlineDesc:String,isType:[String,Function],min:Number,max:Number,showClear:{type:Boolean,default:!0},equalWith:String,textAlign:String,autocomplete:{type:String,default:"off"},autocapitalize:{type:String,default:"off"},autocorrect:{type:String,default:"off"},spellcheck:{type:String,default:"false"},novalidate:{type:Boolean,default:!1},iconType:String,debounce:Number,placeholderAlign:String,labelWidth:String},computed:{labelStyles:function(){return{width:this.labelWidthComputed||this.$parent.labelWidth||this.labelWidthComputed,textAlign:this.$parent.labelAlign,marginRight:this.$parent.labelMarginRight}},pattern:function(){if("number"===this.keyboard||"china-mobile"===this.isType)return"[0-9]*"},labelWidthComputed:function(){var t=this.title.replace(/[^x00-xff]/g,"00").length/2+1;if(t<10)return t+"em"},hasErrors:function(){return a()(this.errors).length>0},inputStyle:function(){if(this.textAlign)return{textAlign:this.textAlign}},showWarn:function(){return!this.novalidate&&!this.equalWith&&!this.valid&&this.firstError&&(this.touched||this.forceShowError)}},methods:{reset:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dirty=!1,this.currentValue=t,this.firstError="",this.valid=!0},clear:function(){this.currentValue="",this.focus()},focus:function(){this.$refs.input.focus()},blur:function(){this.$refs.input.blur()},focusHandler:function(){this.$emit("on-focus",this.currentValue)},onBlur:function(){this.setTouched(),this.validate(),this.$emit("on-blur",this.currentValue)},onKeyUp:function(t){"Enter"===t.key&&(t.target.blur(),this.$emit("on-enter",this.currentValue))},getError:function(){var t=a()(this.errors)[0];this.firstError=this.errors[t]},validate:function(){if(void 0!==this.equalWith)return void this.validateEqual();if(this.errors={},!this.currentValue&&!this.required)return void(this.valid=!0);if(!this.currentValue&&this.required)return this.valid=!1,this.errors.required="必填哦",void this.getError();if("string"==typeof this.isType){var t=v[this.isType];if(t){if(this.valid=t.fn(this.currentValue),!this.valid)return void(this.errors.format=t.msg+"格式不对哦~");delete this.errors.format}}if("function"==typeof this.isType){var e=this.isType(this.currentValue);if(this.valid=e.valid,!this.valid)return this.errors.format=e.msg,this.forceShowError=!0,void(this.firstError||this.getError());delete this.errors.format}if(this.min){if(this.currentValue.lengththis.max)return this.errors.max="最多可以输入"+this.max+"个字符哦",this.valid=!1,void(this.forceShowError=!0);this.forceShowError=!1,delete this.errors.max}this.valid=!0},validateEqual:function(){return!this.equalWith&&this.currentValue?(this.valid=!1,void(this.errors.equal="输入不一致")):(this.dirty||this.currentValue.length>=this.equalWith.length)&&this.currentValue!==this.equalWith?(this.valid=!1,void(this.errors.equal="输入不一致")):void(!this.currentValue&&this.required?this.valid=!1:(this.valid=!0,delete this.errors.equal))}},data:function(){return{hasRestrictedLabel:!1,firstError:"",forceShowError:!1,hasLengthEqual:!1,valid:!0,currentValue:""}},watch:{valid:function(){this.getError()},value:function(t){this.currentValue=t},equalWith:function(t){t&&this.equalWith?(t.length===this.equalWith.length&&(this.hasLengthEqual=!0),this.validateEqual()):this.validate()},currentValue:function(t){!this.equalWith&&t&&this.validateEqual(),t&&this.equalWith?(t.length===this.equalWith.length&&(this.hasLengthEqual=!0),this.validateEqual()):this.validate(),this.$emit("input",t),this._debounce?this._debounce():this.$emit("on-change",t)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),a=n.n(i);e.default={components:{InlineDesc:a.a},computed:{labelStyle:function(){var t=/<\/?[^>]*>/.test(this.title);return{display:"block",width:Math.min(t?5:this.title.length+1,14)+"em"}}},props:{title:{type:String,required:!0},disabled:Boolean,value:{type:Boolean,default:!1},inlineDesc:[String,Boolean,Number]},data:function(){return{currentValue:this.value}},watch:{currentValue:function(t){this.$emit("input",t),this.$emit("on-change",t)},value:function(t){this.currentValue=t}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(55),a=n(12),s=n.n(a),o=n(146),r=n.n(o);e.default={minxins:[i.a],mounted:function(){var t=this;this.$slots&&this.$slots["restricted-label"]&&(this.hasRestrictedLabel=!0),this.$nextTick(function(){t.autosize&&t.bindAutosize()})},components:{InlineDesc:s.a},props:{title:String,inlineDesc:String,showCounter:{type:Boolean,default:!0},max:Number,value:String,name:String,placeholder:String,readonly:Boolean,rows:{type:Number,default:3},cols:{type:Number,default:30},height:Number,autocomplete:{type:String,default:"off"},autocapitalize:{type:String,default:"off"},autocorrect:{type:String,default:"off"},spellcheck:{type:String,default:"false"},autosize:Boolean},created:function(){this.currentValue=this.value},watch:{autosize:function(t){this.unbindAutosize(),t&&this.bindAutosize()},value:function(t){this.currentValue=t},currentValue:function(t){this.max&&t&&t.length>this.max&&(this.currentValue=t.slice(0,this.max)),this.$emit("input",this.currentValue),this.$emit("on-change",this.currentValue)}},data:function(){return{hasRestrictedLabel:!1,currentValue:""}},computed:{count:function(){var t=0;return this.currentValue&&(t=this.currentValue.replace(/\n/g,"aa").length),t>this.max?this.max:t},textareaStyle:function(){if(this.height)return{height:this.height+"px"}},labelStyles:function(){return{width:this.$parent.labelWidth||this.labelWidth+"em",textAlign:this.$parent.labelAlign,marginRight:this.$parent.labelMarginRight}},labelWidth:function(){return this.title.replace(/[^x00-xff]/g,"00").length/2+1}},methods:{bindAutosize:function(){r()(this.$refs.textarea)},unbindAutosize:function(){r.a.destroy(this.$refs.textarea)},focus:function(){this.$refs.textarea.focus()}},beforeDestroy:function(){this.unbindAutosize()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(26),a=n.n(i);e.default={components:{Icon:a.a},methods:{updateValue:function(){this.$emit("update:value",this.val)}},props:{value:[String,Number],val:[String,Number],type:{type:String,default:"default"}}}},,,,,,,,,,,,,,,,,,,function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},,,function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"weui-btn",class:t.classes,attrs:{disabled:t.disabled,type:t.actionType},on:{click:t.onClick}},[t.showLoading?n("i",{staticClass:"weui-loading"}):t._e(),t._v(" "),t._t("default",[t._v(t._s(t.text))])],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"vux-flexbox",class:{"vux-flex-col":"vertical"===t.orient,"vux-flex-row":"horizontal"===t.orient},style:t.styles},[t._t("default")],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-header"},[n("div",{staticClass:"vux-header-left"},[t._t("overwrite-left",[n("transition",{attrs:{name:t.transition}},[n("a",{directives:[{name:"show",rawName:"v-show",value:t._leftOptions.showBack,expression:"_leftOptions.showBack"}],staticClass:"vux-header-back",on:{click:[function(e){if(!("button"in e)&&t._k(e.keyCode,"preventDefault"))return null},t.onClickBack]}},[t._v(t._s(void 0===t._leftOptions.backText?"返回":t._leftOptions.backText))])]),t._v(" "),n("transition",{attrs:{name:t.transition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t._leftOptions.showBack,expression:"_leftOptions.showBack"}],staticClass:"left-arrow",on:{click:t.onClickBack}})])]),t._v(" "),t._t("left")],2),t._v(" "),n("h1",{staticClass:"vux-header-title",on:{click:function(e){t.$emit("on-click-title")}}},[t._t("default",[n("transition",{attrs:{name:t.transition}},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.title,expression:"title"}]},[t._v(t._s(t.title))])])])],2),t._v(" "),n("div",{staticClass:"vux-header-right"},[t.rightOptions.showMore?n("a",{staticClass:"vux-header-more",on:{click:[function(e){if(!("button"in e)&&t._k(e.keyCode,"preventDefault"))return null},function(e){t.$emit("on-click-more")}]}}):t._e(),t._v(" "),t._t("right")],2)])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"weui-cell",class:{"vux-tap-active":t.isLink||!!t.link,"weui-cell_access":t.isLink||!!t.link,"vux-cell-no-border-intent":!t.borderIntent,"vux-cell-disabled":t.disabled},on:{click:t.onClick}},[n("div",{staticClass:"weui-cell__hd"},[t._t("icon")],2),t._v(" "),n("div",{staticClass:"vux-cell-bd",class:{"vux-cell-primary":"title"===t.primary&&"left"!==t.valueAlign}},[n("p",[t.title||t.hasTitleSlot?n("label",{staticClass:"vux-label",style:t.getLabelStyles()},[t._t("title",[t._v(t._s(t.title))])],2):t._e(),t._v(" "),t._t("after-title")],2),t._v(" "),n("inline-desc",[t._t("inline-desc",[t._v(t._s(t.inlineDesc))])],2)],1),t._v(" "),n("div",{staticClass:"weui-cell__ft",class:t.valueClass},[t._t("value"),t._v(" "),t._t("default",[t._v(t._s(t.value))]),t._v(" "),t.isLoading?n("i",{staticClass:"weui-loading"}):t._e()],2),t._v(" "),t._t("child")],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-check-icon",on:{click:t.updateValue}},[n("icon",{directives:[{name:"show",rawName:"v-show",value:"default"===t.type&&t.value===t.val,expression:"type === 'default' && value === val"}],attrs:{type:"success"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:"plain"===t.type&&t.value===t.val,expression:"type === 'plain' && value === val"}],attrs:{type:"success_circle"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:t.value!==t.val,expression:"value !== val"}],attrs:{type:"circle"}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.value,expression:"value"}],staticClass:"radio",attrs:{type:"radio"},domProps:{value:t.val,checked:t._q(t.value,t.val)},on:{__c:function(e){t.value=t.val}}}),t._v(" "),n("span",[t._t("default")],2)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-x-switch weui-cell weui-cell_switch"},[n("div",{staticClass:"weui-cell__bd"},[n("label",{staticClass:"weui-label",style:t.labelStyle,domProps:{innerHTML:t._s(t.title)}}),t._v(" "),t.inlineDesc?n("inline-desc",[t._v(t._s(t.inlineDesc))]):t._e()],1),t._v(" "),n("div",{staticClass:"weui-cell__ft"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],staticClass:"weui-switch",attrs:{type:"checkbox",disabled:t.disabled},domProps:{checked:Array.isArray(t.currentValue)?t._i(t.currentValue,null)>-1:t.currentValue},on:{__c:function(e){var n=t.currentValue,i=e.target,a=!!i.checked;if(Array.isArray(n)){var s=t._i(n,null);a?s<0&&(t.currentValue=n.concat(null)):s>-1&&(t.currentValue=n.slice(0,s).concat(n.slice(s+1)))}else t.currentValue=a}}})])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"vux-flexbox-item",style:t.style},[t._t("default")],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-check-icon",on:{click:t.updateValue}},[n("icon",{directives:[{name:"show",rawName:"v-show",value:"default"===t.type&&t.value,expression:"type === 'default' && value"}],attrs:{type:"success"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:"plain"===t.type&&t.value,expression:"type === 'plain' && value"}],attrs:{type:"success_circle"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:!t.value,expression:"!value"}],attrs:{type:"circle"}}),t._v(" "),n("span",[t._t("default")],2)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-x-input weui-cell",class:{"weui-cell_warn":t.showWarn}},[n("div",{staticClass:"weui-cell__hd"},[t.hasRestrictedLabel?n("div",{style:t.labelStyles},[t._t("restricted-label")],2):t._e(),t._v(" "),t._t("label",[t.title?n("label",{staticClass:"weui-label",style:{width:t.labelWidth||t.$parent.labelWidth||t.labelWidthComputed,textAlign:t.$parent.labelAlign,marginRight:t.$parent.labelMarginRight},domProps:{innerHTML:t._s(t.title)}}):t._e(),t._v(" "),t.inlineDesc?n("inline-desc",[t._v(t._s(t.inlineDesc))]):t._e()])],2),t._v(" "),n("div",{staticClass:"weui-cell__bd weui-cell__primary",class:t.placeholderAlign?"vux-x-input-placeholder-"+t.placeholderAlign:""},[t.type&&"text"!==t.type?t._e():n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"text",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:t.onBlur,keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}),t._v(" "),"number"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"number",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:[t.onBlur,function(e){t.$forceUpdate()}],keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}):t._e(),t._v(" "),"email"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"email",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:t.onBlur,keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}):t._e(),t._v(" "),"password"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"password",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:t.onBlur,keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}):t._e(),t._v(" "),"tel"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"input",staticClass:"weui-input",style:t.inputStyle,attrs:{maxlength:t.max,autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,type:"tel",name:t.name,pattern:t.pattern,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled},domProps:{value:t.currentValue},on:{focus:t.focusHandler,blur:t.onBlur,keyup:t.onKeyUp,input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}):t._e()]),t._v(" "),n("div",{staticClass:"weui-cell__ft"},[n("icon",{directives:[{name:"show",rawName:"v-show",value:!t.equalWith&&t.showClear&&t.currentValue&&!t.readonly&&!t.disabled,expression:"!equalWith && showClear && currentValue && !readonly && !disabled"}],attrs:{type:"clear"},nativeOn:{click:function(e){t.clear(e)}}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:t.showWarn,expression:"showWarn"}],staticClass:"vux-input-icon",attrs:{type:"warn",title:t.valid?"":t.firstError}}),t._v(" "),!t.novalidate&&t.hasLengthEqual&&t.dirty&&t.equalWith&&!t.valid?n("icon",{staticClass:"vux-input-icon",attrs:{type:"warn"}}):t._e(),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:!t.novalidate&&t.equalWith&&t.equalWith===t.currentValue&&t.valid,expression:"!novalidate && equalWith && equalWith === currentValue && valid"}],attrs:{type:"success"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:t.novalidate&&"success"===t.iconType,expression:"novalidate && iconType === 'success'"}],staticClass:"vux-input-icon",attrs:{type:"success"}}),t._v(" "),n("icon",{directives:[{name:"show",rawName:"v-show",value:t.novalidate&&"error"===t.iconType,expression:"novalidate && iconType === 'error'"}],staticClass:"vux-input-icon",attrs:{type:"warn"}}),t._v(" "),t._t("right")],2)])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"vux-label-desc"},[t._t("default")],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("i",{class:[t.className,t.isMsg?"weui-icon_msg":""]})},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.title?n("div",{staticClass:"weui-cells__title",style:{color:t.titleColor},domProps:{innerHTML:t._s(t.title)}}):t._e(),t._v(" "),n("div",{staticClass:"weui-cells",class:{"vux-no-group-title":!t.title},style:{marginTop:"number"==typeof t.gutter?t.gutter+"px":t.gutter}},[t._t("after-title"),t._v(" "),t._t("default")],2)])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"weui-cell vux-x-textarea"},[n("div",{staticClass:"weui-cell__hd"},[t.hasRestrictedLabel?n("div",{style:t.labelStyles},[t._t("restricted-label")],2):t._e(),t._v(" "),t._t("label",[t.title?n("label",{staticClass:"weui-label",style:{width:t.$parent.labelWidth||t.labelWidth+"em",textAlign:t.$parent.labelAlign,marginRight:t.$parent.labelMarginRight},domProps:{innerHTML:t._s(t.title)}}):t._e(),t._v(" "),t.inlineDesc?n("inline-desc",[t._v(t._s(t.inlineDesc))]):t._e()])],2),t._v(" "),n("div",{staticClass:"weui-cell__bd"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.currentValue,expression:"currentValue"}],ref:"textarea",staticClass:"weui-textarea",style:t.textareaStyle,attrs:{autocomplete:t.autocomplete,autocapitalize:t.autocapitalize,autocorrect:t.autocorrect,spellcheck:t.spellcheck,placeholder:t.placeholder,readonly:t.readonly,name:t.name,rows:t.rows,cols:t.cols,maxlength:t.max},domProps:{value:t.currentValue},on:{focus:function(e){t.$emit("on-focus")},blur:function(e){t.$emit("on-blur")},input:function(e){e.target.composing||(t.currentValue=e.target.value)}}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showCounter&&t.max,expression:"showCounter && max"}],staticClass:"weui-textarea-counter",on:{click:t.focus}},[n("span",[t._v(t._s(t.count))]),t._v("/"+t._s(t.max)+"\n ")])])])},staticRenderFns:[]}},function(t,e,n){n(118);var i=n(1)(n(95),n(132),null,null);t.exports=i.exports},,,,,,function(t,e,n){"use strict";var i=n(82),a=(n.n(i),n(54)),s=n.n(a);n(81);e.a={getConfig:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],s()(safari,"extension.globalPage.contentWindow.s2a",{}));if(t.getConfig){var e=t.getConfig();e.aria2Connects}return t}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var i=n(19),a=n(188),s=n(426),o=n.n(s);i.a.use(a.a),e.a=new a.a({routes:[{path:"/",name:"Index",component:o.a}]})},function(t,e,n){"use strict";var i=n(32),a=n.n(i),s=n(56),o=n.n(s),r=n(239),l=n.n(r),c=n(57),u=n.n(c),d=n(236),h=n.n(d),p=n(151),f=n.n(p),v=n(397),m=n.n(v),g=n(54),w=n.n(g),_=n(82),b=n.n(_),x=n(19),y=n(76),S=n(83),k=n(147);x.a.use(y.a);var C=void 0,O={get_s2a:function(){if(!C||!C.getConfig){for(var t=arguments.length,e=Array(t),n=0;n1?i-1:0),s=1;s1?e-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:{}),s=w()(a,"gids",n.selectedGids),o=i.taskLists.filter(function(t){return~s.indexOf(t.gid)}),r={active:[],paused:[]};o.map(function(t){r[t.status]=r[t.status]||[],r[t.status].push(t.gid)});var l=r.active.length>=r.paused.length?"active":"paused",c=r.active.length>=r.paused.length?"pause":"unpause";return r.active.length||r.paused.length?O.mutilCall(n.currentServerUrl,r[l].map(function(t){return{methodName:"aria2."+c,params:[t]}})).then(function(){return e("getTaskList")}):h.a.resolve("no change")},saveOptions:function(t){var e=t.dispatch,n=t.state,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return O.sendCall(n.currentServerUrl,"aria2.changeGlobalOption",u()({},i.options)).then(function(){return e("getTaskList",{loadOptions:!0})}).catch(function(t){console.log(t)})},startSelectedDownloads:function(t){var e=t.dispatch,n=t.state,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=w()(i,"gids",n.selectedGids);return O.mutilCall(n.currentServerUrl,a.map(function(t){return{methodName:"aria2.unpause",params:[t]}})).then(function(){return e("getTaskList")})},pauseSelectedDownloads:function(t){var e=t.dispatch,n=t.state,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=w()(i,"gids",n.selectedGids);return O.mutilCall(n.currentServerUrl,a.map(function(t){return{methodName:"aria2.pause",params:[t]}})).then(function(){return e("getTaskList")})},removeSelectedDownloads:function(t){var e=t.dispatch,n=t.state,i=t.getters,a=t.commit,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=w()(s,"gids",n.selectedGids),r=i.taskLists.filter(function(t){return~o.indexOf(t.gid)});return O.mutilCall(n.currentServerUrl,r.map(function(t){return{methodName:"aria2."+(~["active","paused"].indexOf(t.status)?"remove":"removeDownloadResult"),params:[t.gid]}})).then(function(){return a("setSelected",{selected:[]}),e("getTaskList")})},getTaskList:function(t){var e=t.commit,n=t.state,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!O.get_s2a())return h.a.reject("获取global变量错误");n.currentServerUrl||e("refreshServerList");var a=[{methodName:"aria2.tellActive",params:[]},{methodName:"aria2.tellWaiting",params:[0,1e3]},{methodName:"aria2.tellStopped",params:[0,1e3]},{methodName:"aria2.getGlobalStat",params:null}];return i.loadOptions&&a.push({methodName:"aria2.getGlobalOption",params:null}),n.currentServerUrl?O.sendCall(n.currentServerUrl,"system.multicall",a).then(function(t){if(e("setTaskList",{list:m()(t[0][0]||[],t[1][0]||[],t[2][0]||[]),url:n.currentServerUrl}),e("setGlobalStat",{globalStat:t[3][0]}),w()(window.safari||{},"extension.toolbarItems")&&(t[3][0]&&t[3][0].numActive?safari.extension.toolbarItems[0].badge=t[3][0].numActive:safari.extension.toolbarItems[0].badge=0),i.loadOptions&&e("setGlobalOption",{globalOption:t[4][0]}),t[3]&&t[3].code)return h.a.reject(t[3])}).catch(function(t){e("setGlobalStat",{globalStat:!1}),console.log("获取列表失败",t)}):h.a.reject("no server url")}},V={isDebug:function(t){return!!O.get_s2a()&&C.isDebug},serverList:function(t){return t.serverList},getAllTaskGid:function(t,e){return e.taskLists.map(function(t){return t.gid})},getGlobalStat:function(t){var e=a()({},t.globalStat);return e.downloadSpeedText=S.a(e.downloadSpeed||0)+"/s",e.uploadSpeedText=S.a(e.uploadSpeed||0)+"/s",e},taskLists:function(t){var e=["complete","error","paused","waiting","active"],n=[],i=t.currentServerUrl;return t.taskList[i]&&(n=t.taskList[i].slice(0).sort(function(t,n){return t.status===n.status?S.b(n)>S.b(t)?1:-1:e.indexOf(n.status)>e.indexOf(t.status)?1:-1})),n},selectedTasks:function(t,e){return e.taskLists.filter(function(e){return~t.selectedGids.indexOf(e.gid)})}};e.a=new y.a.Store({state:L,getters:V,actions:T,mutations:$})},function(t,e,n){"use strict";var i=n(233),a=n.n(i),s=n(56),o=n.n(s),r=n(216),l=function(t){return o()(t).map(function(e){var i={};return e.split("+").forEach(function(t){switch(t.toLowerCase()){case"ctrl":case"alt":case"shift":case"meta":i[t]=!0;break;default:i.keyCode=n.i(r.a)(t)}}),i.callback=t[e],i})};e.a={install:function(t){t.directive("hotkey",{bind:function(t,e,n,i){t._keymap=l(e.value),t._keyHandler=function(e){var n=!0,i=!1,s=void 0;try{for(var o,r=a()(t._keymap);!(n=(o=r.next()).done);n=!0){var l=o.value;l.keyCode===e.keyCode&&!!l.ctrl===e.ctrlKey&&!!l.alt===e.altKey&&!!l.shift===e.shiftKey&&!!l.meta===e.metaKey&&l.callback(e)}}catch(t){i=!0,s=t}finally{try{!n&&r.return&&r.return()}finally{if(i)throw s}}},document.addEventListener("keydown",t._keyHandler)},unbind:function(t,e,n,i){document.removeEventListener("keydown",t._keyHandler)}})}}},,,,function(t,e,n){n(330);var i=n(1)(n(224),n(408),null,null);t.exports=i.exports},,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),a=n(210),s=n.n(a),o=n(204),r=n(205),l=n(206),c=n(207);i.a.use(c.a),i.a.use(l.a),new i.a({router:o.a,store:r.a,render:function(t){return t(s.a)}}).$mount("#app-box"),window.tlwin={refreshServerList:function(){r.a.commit("refreshServerList")},refreshTaskList:function(){r.a.dispatch("getTaskList",{loadOptions:!0})}}},function(t,e,n){"use strict";var i=n(34),a=n.n(i);e.a=function(t){if(t&&"object"===(void 0===t?"undefined":a()(t))){var e=t.which||t.keyCode||t.charCode;e&&(t=e)}if("number"==typeof t)return names[t];var n=String(t),i=s[n.toLowerCase()];if(i)return i;var i=o[n.toLowerCase()];return i||(1===n.length?n.charCodeAt(0):void 0)};var s={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(r=97;r<123;r++)s[String.fromCharCode(r)]=r-32;for(var r=48;r<58;r++)s[r-48]=r;for(r=1;r<13;r++)s["f"+r]=r+111;for(r=0;r<10;r++)s["numpad "+r]=r+96},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(151),a=n.n(i),s=n(39),o=n.n(s),r=n(175),l=n.n(r),c=n(19),u=["legendselectchanged","legendselected","legendunselected","datazoom","datarangeselected","timelinechanged","timelineplaychanged","restore","dataviewchanged","magictypechanged","geoselectchanged","geoselected","geounselected","pieselectchanged","pieselected","pieunselected","mapselectchanged","mapselected","mapunselected","axisareaselected","brush","brushselected"],d=["click","dblclick","mouseover","mouseout","mousedown","mouseup","globalout"];e.default={props:{options:Object,theme:String,initOptions:Object,group:String,autoResize:Boolean},data:function(){return{chart:null}},computed:{width:{cache:!1,get:function(){return this._delegateGet("width","getWidth")}},height:{cache:!1,get:function(){return this._delegateGet("height","getHeight")}},isDisposed:{cache:!1,get:function(){return!!this._delegateGet("isDisposed","isDisposed")}},computedOptions:{cache:!1,get:function(){return this._delegateGet("computedOptions","getOption")}}},watch:{options:{handler:function(t){!this.chart&&t?this._init():this.chart.setOption(this.options,!0)},deep:!0},group:{handler:function(t){this.chart.group=t}}},methods:{mergeOptions:function(t){this._delegateMethod("setOption",t)},resize:function(t){this._delegateMethod("resize",t)},dispatchAction:function(t){this._delegateMethod("dispatchAction",t)},convertToPixel:function(t,e){return this._delegateMethod("convertToPixel",t,e)},convertFromPixel:function(t,e){return this._delegateMethod("convertFromPixel",t,e)},containPixel:function(t,e){return this._delegateMethod("containPixel",t,e)},showLoading:function(t,e){this._delegateMethod("showLoading",t,e)},hideLoading:function(){this._delegateMethod("hideLoading")},getDataURL:function(t){return this._delegateMethod("getDataURL",t)},getConnectedDataURL:function(t){return this._delegateMethod("getConnectedDataURL",t)},clear:function(){this._delegateMethod("clear")},dispose:function(){this._delegateMethod("dispose")},_delegateMethod:function(t){var e;if(!this.chart)return void c.a.util.warn("Cannot call ["+t+"] before the chart is initialized. Set prop [options] first.",this);for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s50){for(var i=[],a=0,s=parseInt(n.length/50)+1;a=n.length&&(s=n.length-a-1);for(var l=a;l<=a+s;l++)o+=n[l];o=parseInt(o*(r/s)),i.push(o),a+=s}e=16*(parseInt(n.length/50)+1),n=i,t.length=n.length}return{grid:{left:"0%",right:"0%",containLabel:!1},xAxis:{show:!1,data:t},yAxis:{show:!1,max:e},series:[{type:"bar",barGap:"0%",silent:!0,barCategoryGap:"0",itemStyle:{normal:{color:"#eeeeee"}},data:n}]}},getStatus:function(){return{active:"下载中",waiting:"等待中",paused:"已暂停",error:"错误",complete:"已完成",removed:"已删除"}[this.download.status]||""},name:function(){return O.b(this.download)},path:function(){return["file://",this.download.dir].join("")},progress:function(){var t="0"===this.download.totalLength?0:this.download.completedLength/this.download.totalLength;return[parseInt(100*t),"%"].join("")},completedSize:function(){return O.a(this.download.completedLength,-1)},size:function(){return O.a(this.download.totalLength,-1)},isDownloading:function(){return"active"===this.download.status&&"0"!==this.download.downloadSpeed},isUploading:function(){return"active"===this.download.status&&"0"!==this.download.uploadSpeed},downloadSpeed:function(){return[O.a(this.download.downloadSpeed||0,-1),"/s"].join("")},downloadConnections:function(){return this.download.connections},uploadSpeed:function(){return O.a(this.download.uploadSpeed||0)+"/s"}},n.i(L.c)({globalConfig:"config"})),methods:a()({showAction:function(){this.showAction=!0},hideAction:function(){this.showAction=!0}},n.i(L.e)(["startSelectedDownloads","pauseSelectedDownloads","removeSelectedDownloads"]))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(57),a=n.n(i),s=n(46),o=n.n(s),r=n(44),l=n.n(r),c=n(47),u=n.n(c),d=n(49),h=n.n(d),p=n(41),f=n.n(p),v=n(43),m=n.n(v),g=n(42),w=n.n(g),_=n(45),b=n.n(_),x=n(48),y=n.n(x),S=n(40),k=n.n(S),C=n(427),O=n.n(C),L=n(76);e.default={components:{XHeader:o.a,Group:l.a,XInput:u.a,XTextarea:h.a,CheckIcon:f.a,Flexbox:m.a,FlexboxItem:w.a,XButton:b.a,XSwitch:y.a,Cell:k.a,TaskLine:O.a},props:{list:Array,selected:Array},computed:a()({gids:function(){return this.list.map(function(t){return t?t.gid:""})}},n.i(L.c)(["selectedGids"])),methods:a()({select:function(t,e){var n=this.selectedGids;if(e.ctrlKey||e.metaKey||e.shiftKey?n.push(t):n=[t],e.shiftKey&&n.length){var i=n[0],a=n[n.length-1],s=[this.gids.indexOf(i),this.gids.indexOf(a)];s[0]>s[1]&&s.reverse(),n=this.gids.slice(s[0],s[1]+1)}this.setSelected({selected:n})},startOrPause:function(t){"paused"===t.status?this.$store.dispatch("startSelectedDownloads"):"active"===t.status&&this.$store.dispatch("pauseSelectedDownloads")}},n.i(L.d)(["setSelected"]))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){},function(t,e){},,function(t,e){},function(t,e){},function(t,e){},,function(t,e){},function(t,e){},function(t,e){},function(t,e){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.keymap,expression:"keymap"}],staticClass:"pop_wrapper"},[n("x-header",{staticClass:"pop_header",attrs:{"left-options":{showBack:!1},"right-options":{showMore:!0}},on:{"on-click-more":t.openOptionsPanel}},[n("popmenu",{ref:"popmenu",attrs:{placement:"bottom"},on:{"on-show":t.popmenuShow,"on-hide":t.popmenuHide}},[n("div",{staticClass:"selectRpcServer",slot:"content"},[n("group",t._l(t.serverList,function(e){return n("cell",{key:e.url,class:{acitve:e.url===t.currentServerUrl},attrs:{title:e.name},nativeOn:{click:function(n){t.changeList({url:e.url})}}})}))],1),t._v(" "),n("div",{staticClass:"rpcServer"},[n("button",[t._v(t._s(t.currenServerName)+t._s(t.globalStat?"":"(未连接)"))]),t._v(" "),n("i",{staticClass:"material-icons"},[t._v(t._s(t.popmenuIsShow?"keyboard_arrow_up":"keyboard_arrow_down"))])])])],1),t._v(" "),n("div",{staticClass:"globalStatus"},[n("div",{staticClass:"control"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.selectedGids.length>0,expression:"selectedGids.length>0"}],staticClass:"inner"},[n("x-button",{attrs:{mini:"",plain:""},nativeOn:{click:function(e){e.stopPropagation(),t.startSelectedDownloads()}}},[t._v("开始")]),t._v(" "),n("x-button",{attrs:{mini:"",plain:""},nativeOn:{click:function(e){e.stopPropagation(),t.pauseSelectedDownloads()}}},[t._v("暂停")]),t._v(" "),n("x-button",{attrs:{mini:"",plain:""},nativeOn:{click:function(e){e.stopPropagation(),t.removeSelectedDownloads()}}},[t._v("删除")])],1)]),t._v(" "),n("div",{staticClass:"speed",attrs:{title:"点击设置全局限速"},on:{click:function(e){if(!("button"in e)&&t._k(e.keyCode,"nativ"))return null;e.stopPropagation(),t.openAria2Options()}}},[t.getGlobalStat.uploadSpeed>0?n("div",{staticClass:"up"},[n("i",{staticClass:"material-icons"},[t._v("arrow_upward")]),t._v("\n "+t._s(t.getGlobalStat.uploadSpeedText)+"\n ")]):t._e(),t._v(" "),n("div",{staticClass:"down"},[n("i",{staticClass:"material-icons"},[t._v("arrow_downward")]),t._v("\n "+t._s(t.getGlobalStat.downloadSpeedText)+"\n ")])])]),t._v(" "),n("task-list",{staticClass:"pop_list",attrs:{list:t.taskLists},nativeOn:{click:function(e){e.stopPropagation(),t.setSelected({selected:[]})}}}),t._v(" "),n("x-dialog",{staticClass:"dialog-options",attrs:{"hide-on-blur":"",scroll:!1},model:{value:t.showOptions,callback:function(e){t.showOptions=e},expression:"showOptions"}},[n("group",[n("x-input",{attrs:{title:"全局最大下载速度",type:"number","show-clear":!1,min:0},model:{value:t.change2GlobalOptions["max-overall-download-limit"],callback:function(e){var n=t.change2GlobalOptions;Array.isArray(n)?n.splice("max-overall-download-limit",1,e):t.change2GlobalOptions["max-overall-download-limit"]=e},expression:"change2GlobalOptions['max-overall-download-limit']"}},[n("span",{slot:"right"},[t._v("KB")])]),t._v(" "),n("x-input",{attrs:{title:"全局最大上传速度",type:"number","show-clear":!1,min:0},model:{value:t.change2GlobalOptions["max-overall-upload-limit"],callback:function(e){var n=t.change2GlobalOptions;Array.isArray(n)?n.splice("max-overall-upload-limit",1,e):t.change2GlobalOptions["max-overall-upload-limit"]=e},expression:"change2GlobalOptions['max-overall-upload-limit']"}},[n("span",{slot:"right"},[t._v("KB")])]),t._v(" "),n("x-input",{attrs:{title:"同时任务数量",type:"number","show-clear":!1,min:1},model:{value:t.change2GlobalOptions["max-concurrent-downloads"],callback:function(e){var n=t.change2GlobalOptions;Array.isArray(n)?n.splice("max-concurrent-downloads",1,e):t.change2GlobalOptions["max-concurrent-downloads"]=e},expression:"change2GlobalOptions['max-concurrent-downloads']"}},[n("span",{slot:"right"},[t._v("个")])])],1),t._v(" "),n("group",{staticClass:"buttonGroup"},[n("x-button",{nativeOn:{click:function(e){t.saveAria2Options()}}},[t._v("保存")]),t._v(" "),n("x-button",{nativeOn:{click:function(e){t.showOptions=!1}}},[t._v("取消")])],1)],1)],1)},staticRenderFns:[]}},,function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"echarts"})},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-x-dialog",on:{touchmove:t.onTouchMove}},[n("transition",{attrs:{name:t.maskTransition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.currentValue,expression:"currentValue"}],staticClass:"weui-mask",on:{click:function(e){t.hideOnBlur&&(t.currentValue=!1)}}})]),t._v(" "),n("transition",{attrs:{name:t.dialogTransition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.currentValue,expression:"currentValue"}],class:t.dialogClass,style:t.dialogStyle},[t._t("default")],2)])],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onClickedOutside,expression:"onClickedOutside"}]},[n("span",{ref:"trigger",on:{click:t.toggle}},[t._t("default")],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],ref:"popover",staticClass:"vux-popover",style:t.popoverStyle},[n("div",{class:t.arrowClass}),t._v(" "),n("div",{on:{click:function(e){t.$emit("on-click-content")}}},[t._t("content",[n("div",{domProps:{innerHTML:t._s(t.content)}})])],2)])])},staticRenderFns:[]}},,function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("group",[n("div",{staticClass:"download-list"},[t._l(t.list,function(e){return n("task-line",{key:e.gid,attrs:{download:e,selected:~t.selectedGids.indexOf(e.gid)},nativeOn:{click:function(n){n.stopPropagation(),t.select(e.gid,n)},dblclick:function(n){n.stopPropagation(),t.startOrPause(e)}}})}),t._v(" "),t.list.length<1?n("cell",{staticClass:"empty",attrs:{title:"暂无下载任务"}}):t._e()],2)])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("cell-box",{staticClass:"download",class:{selected:t.selected},nativeOn:{mouseenter:function(e){t.showAction=!0},mouseleave:function(e){t.showAction=!1}}},[t.globalConfig.enableChart?n("chart",{staticClass:"chart",attrs:{autoResize:!0,options:t.char}}):t._e(),t._v(" "),n("div",{staticClass:"progress",style:{width:t.progress}},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.showPercent,expression:"showPercent"}]},[t._v(t._s(parseInt(t.progress)))])]),t._v(" "),n("div",{staticClass:"info"},[n("div",{staticClass:"left"},[n("div",{staticClass:"name",attrs:{title:t.name}},[t._v("\n "+t._s(t.name)+"\n ")]),t._v(" "),n("div",{staticClass:"status"},[t.download.errorMessage?n("div",[t._v(t._s(t.download.errorMessage))]):t._e(),t._v(" "),t.download.errorMessage?t._e():n("div",["active"!=t.download.status?n("span",[t._v(t._s(t.getStatus))]):t._e(),t._v(" "),"0"!==t.download.totalLength?n("span",{staticClass:"size",on:{mouseenter:function(e){t.showPercent=!0},mouseleave:function(e){t.showPercent=!1}}},[t._v(t._s(t.isDownloading?t.completedSize+"/":"")+t._s(t.size))]):t._e(),t._v(" "),t.isDownloading?n("span",{staticClass:"speed"},[t._v(t._s(t.downloadSpeed))]):t._e(),t._v(" "),t.isDownloading?n("span",{staticClass:"connections",attrs:{title:"连接数"}},[t._v(t._s(t.downloadConnections))]):t._e(),t._v(" "),t.isUploading?n("span",{staticClass:"speed upload"},[t._v(t._s(t.uploadSpeed))]):t._e(),t._v(" "),t.isDownloading?n("span",{staticClass:"eta"},[t._v("剩余:"+t._s(t.eta))]):t._e()])])]),t._v(" "),n("div",{staticClass:"right"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.showAction&&!t.showPercent,expression:"showAction&&!showPercent"}],staticClass:"action"},[n("i",{directives:[{name:"show",rawName:"v-show",value:"active"===t.download.status,expression:"download.status === 'active'"}],staticClass:"material-icons",attrs:{title:"暂停"},on:{click:function(e){e.stopPropagation(),t.pauseSelectedDownloads({gids:[t.download.gid]})}}},[t._v("pause_circle_outline")]),t._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:"paused"===t.download.status,expression:"download.status === 'paused'"}],staticClass:"material-icons",attrs:{title:"开始"},on:{click:function(e){e.stopPropagation(),t.startSelectedDownloads({gids:[t.download.gid]})}}},[t._v("play_circle_outline")]),t._v(" "),n("i",{staticClass:"material-icons",attrs:{title:"删除"},on:{click:function(e){e.stopPropagation(),t.removeSelectedDownloads({gids:[t.download.gid]})}}},[t._v("delete_forever")])])])])],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-toast"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowMask&&t.show,expression:"isShowMask && show"}],staticClass:"weui-mask_transparent"}),t._v(" "),n("transition",{attrs:{name:t.currentTransition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],staticClass:"weui-toast",class:t.toastClass,style:{width:t.width}},[n("i",{directives:[{name:"show",rawName:"v-show",value:"text"!==t.type,expression:"type !== 'text'"}],staticClass:"weui-icon-success-no-circle weui-icon_toast"}),t._v(" "),t.text?n("p",{staticClass:"weui-toast__content",style:t.style,domProps:{innerHTML:t._s(t.text)}}):n("p",{staticClass:"weui-toast__content"},[t._t("default")],2)])])],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vux-cell-box weui-cell",class:{"vux-tap-active":t.isLink||!!t.link,"weui-cell_access":t.isLink||!!t.link,"vux-cell-no-border-intent":!t.borderIntent},on:{click:t.onClick}},[n("div",[t._t("default")],2)])},staticRenderFns:[]}},,function(t,e,n){n(333);var i=n(1)(n(217),n(411),null,null);t.exports=i.exports},function(t,e,n){n(340);var i=n(1)(n(218),n(418),null,null);t.exports=i.exports},function(t,e,n){n(339);var i=n(1)(n(219),n(417),null,null);t.exports=i.exports},function(t,e,n){n(334);var i=n(1)(n(220),n(412),null,null);t.exports=i.exports},function(t,e,n){n(335);var i=n(1)(n(221),n(413),null,null);t.exports=i.exports},,function(t,e,n){n(331);var i=n(1)(n(225),n(409),null,null);t.exports=i.exports},function(t,e,n){n(338);var i=n(1)(n(226),n(416),null,null);t.exports=i.exports},function(t,e,n){n(337);var i=n(1)(n(227),n(415),null,null);t.exports=i.exports}],[215]); \ No newline at end of file diff --git a/safari2aria.safariextz b/safari2aria.safariextz index 945e0be..9fc9fff 100644 Binary files a/safari2aria.safariextz and b/safari2aria.safariextz differ diff --git a/src/pages/popover/components/taskLine.vue b/src/pages/popover/components/taskLine.vue index 36f18e9..c9e2ac5 100644 --- a/src/pages/popover/components/taskLine.vue +++ b/src/pages/popover/components/taskLine.vue @@ -151,6 +151,9 @@ name: function () { return util.getEntryFileName(this.download) }, + path:function () { + return ['file://',this.download.dir].join(''); + }, progress: function () { let progress = this.download.totalLength === '0' ? 0 : this.download.completedLength / this.download.totalLength; return [parseInt(progress * 100), '%'].join('')