From 2dac0118c22d8c3298a51129f1d20dd8f664ae46 Mon Sep 17 00:00:00 2001 From: carsonxu <459452372@qq.com> Date: Thu, 15 Mar 2018 11:42:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=B9=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/cos-js-sdk-v5.js | 57 ++++++++++++++++++++++----------------- dist/cos-js-sdk-v5.min.js | 2 +- package.json | 2 +- src/base.js | 57 ++++++++++++++++++++++----------------- 4 files changed, 66 insertions(+), 52 deletions(-) diff --git a/dist/cos-js-sdk-v5.js b/dist/cos-js-sdk-v5.js index 578e0c6..71e451c 100644 --- a/dist/cos-js-sdk-v5.js +++ b/dist/cos-js-sdk-v5.js @@ -1679,15 +1679,16 @@ function getBucket(params, callback) { if (err) { return callback(err); } - var contents = data.ListBucketResult.Contents || []; - var CommonPrefixes = data.ListBucketResult.CommonPrefixes || []; + var ListBucketResult = data.ListBucketResult || {}; + var Contents = ListBucketResult.Contents || []; + var CommonPrefixes = ListBucketResult.CommonPrefixes || []; - contents = util.isArray(contents) ? contents : [contents]; + Contents = util.isArray(Contents) ? Contents : [Contents]; CommonPrefixes = util.isArray(CommonPrefixes) ? CommonPrefixes : [CommonPrefixes]; - var result = util.clone(data.ListBucketResult); + var result = util.clone(ListBucketResult); util.extend(result, { - Contents: contents, + Contents: Contents, CommonPrefixes: CommonPrefixes, statusCode: data.statusCode, headers: data.headers @@ -1747,10 +1748,11 @@ function getBucketAcl(params, callback) { if (err) { return callback(err); } - var Owner = data.AccessControlPolicy.Owner || {}; - var Grant = data.AccessControlPolicy.AccessControlList.Grant || []; + var AccessControlPolicy = data.AccessControlPolicy || {}; + var Owner = AccessControlPolicy.Owner || {}; + var Grant = AccessControlPolicy.AccessControlList.Grant || []; Grant = util.isArray(Grant) ? Grant : [Grant]; - var result = decodeAcl(data.AccessControlPolicy); + var result = decodeAcl(AccessControlPolicy); if (data.headers && data.headers['x-cos-acl']) { result.ACL = data.headers['x-cos-acl']; } @@ -2423,12 +2425,13 @@ function listObjectVersions(params, callback) { if (err) { return callback(err); } - var DeleteMarkers = data.ListVersionsResult.DeleteMarker || []; + var ListVersionsResult = data.ListVersionsResult || {}; + var DeleteMarkers = ListVersionsResult.DeleteMarker || []; DeleteMarkers = util.isArray(DeleteMarkers) ? DeleteMarkers : [DeleteMarkers]; - var Versions = data.ListVersionsResult.Version || []; + var Versions = ListVersionsResult.Version || []; Versions = util.isArray(Versions) ? Versions : [Versions]; - var result = util.clone(data.ListVersionsResult); + var result = util.clone(ListVersionsResult); delete result.DeleteMarker; delete result.Version; util.extend(result, { @@ -2655,10 +2658,11 @@ function getObjectAcl(params, callback) { if (err) { return callback(err); } - var Owner = data.AccessControlPolicy.Owner || {}; - var Grant = data.AccessControlPolicy.AccessControlList.Grant || []; + var AccessControlPolicy = data.AccessControlPolicy || {}; + var Owner = AccessControlPolicy.Owner || {}; + var Grant = AccessControlPolicy.AccessControlList && AccessControlPolicy.AccessControlList.Grant || []; Grant = util.isArray(Grant) ? Grant : [Grant]; - var result = decodeAcl(data.AccessControlPolicy); + var result = decodeAcl(AccessControlPolicy); if (data.headers && data.headers['x-cos-acl']) { result.ACL = data.headers['x-cos-acl']; } @@ -2743,7 +2747,7 @@ function optionsObject(params, callback) { headers: headers }, function (err, data) { if (err) { - if (err.statusCode && err.statusCode == 403) { + if (err.statusCode && err.statusCode === 403) { return callback(null, { OptionsForbidden: true, statusCode: err.statusCode @@ -2804,7 +2808,7 @@ function putObjectCopy(params, callback) { if (err) { return callback(err); } - var result = util.clone(data.CopyObjectResult); + var result = util.clone(data.CopyObjectResult || {}); util.extend(result, { statusCode: data.statusCode, headers: data.headers @@ -2827,7 +2831,7 @@ function uploadPartCopy(params, callback) { if (err) { return callback(err); } - var result = util.clone(data.CopyObjectResult); + var result = util.clone(data.CopyObjectResult || {}); util.extend(result, { statusCode: data.statusCode, headers: data.headers @@ -2857,13 +2861,14 @@ function deleteMultipleObject(params, callback) { if (err) { return callback(err); } - var Deleted = data.DeleteResult.Deleted || []; - var Errors = data.DeleteResult.Error || []; + var DeleteResult = data.DeleteResult || {}; + var Deleted = DeleteResult.Deleted || []; + var Errors = DeleteResult.Error || []; Deleted = util.isArray(Deleted) ? Deleted : [Deleted]; Errors = util.isArray(Errors) ? Errors : [Errors]; - var result = util.clone(data.DeleteResult); + var result = util.clone(DeleteResult); util.extend(result, { Error: Errors, Deleted: Deleted, @@ -3050,7 +3055,8 @@ function multipartComplete(params, callback) { object: params.Key, isLocation: true }); - var result = util.extend(data.CompleteMultipartUploadResult, { + var CompleteMultipartUploadResult = data.CompleteMultipartUploadResult || {}; + var result = util.extend(CompleteMultipartUploadResult, { Location: url, statusCode: data.statusCode, headers: data.headers @@ -3111,7 +3117,7 @@ function multipartList(params, callback) { data.ListMultipartUploadsResult.Upload = Upload; data.ListMultipartUploadsResult.CommonPrefixes = CommonPrefixes; } - var result = util.clone(data.ListMultipartUploadsResult); + var result = util.clone(data.ListMultipartUploadsResult || {}); util.extend(result, { statusCode: data.statusCode, headers: data.headers @@ -3154,11 +3160,12 @@ function multipartListPart(params, callback) { if (err) { return callback(err); } - var Part = data.ListPartsResult.Part || []; + var ListPartsResult = data.ListPartsResult || {}; + var Part = ListPartsResult.Part || []; Part = util.isArray(Part) ? Part : [Part]; - data.ListPartsResult.Part = Part; - var result = util.clone(data.ListPartsResult); + ListPartsResult.Part = Part; + var result = util.clone(ListPartsResult); util.extend(result, { statusCode: data.statusCode, headers: data.headers diff --git a/dist/cos-js-sdk-v5.min.js b/dist/cos-js-sdk-v5.min.js index f076300..97cb37e 100644 --- a/dist/cos-js-sdk-v5.min.js +++ b/dist/cos-js-sdk-v5.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.COS=t():e.COS=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=4)}([function(e,t,n){"use strict";(function(t){function r(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function o(e){return u(e,function(e){return"object"==typeof e?o(e):e})}function i(e,t){return s(t,function(n,r){e[r]=t[r]}),e}function a(e){return e instanceof Array}function s(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function u(e,t){var n=a(e)?[]:{};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r],r));return n}function c(e,t){var n=a(e),r=n?[]:{};for(var o in e)e.hasOwnProperty(o)&&t(e[o],o)&&(n?r.push(e[o]):r[o]=e[o]);return r}var l=n(6),d=n(7),f=n(8),p=n(9),h=function(e){e=e||{};var t=e.SecretId,n=e.SecretKey,o=(e.method||e.Method||"get").toLowerCase(),i=e.pathname||e.Key||"/",a=e.params||"",s=e.headers||"";if(0!==i.indexOf("/")&&(i="/"+i),!t)return console.error("lack of param SecretId");if(!n)return console.error("lack of param SecretKey");var u=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()},c=function(e){var t,n,o,i=[],a=u(e);for(t=0;t-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e?n&&r:!(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e)||n&&r&&o},x=function(e,t){return function(n,r){"function"==typeof n&&(r=n,n={}),n=i({},n);var o=n.Headers||{};n&&"object"==typeof n&&(!function(){for(var e in n)n.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(o[e]=n[e])}(),o["x-cos-mfa"]=n.MFA,o["Content-MD5"]=n.ContentMD5,o["Content-Length"]=n.ContentLength,o["Content-Type"]=n.ContentType,o.Expect=n.Expect,o.Expires=n.Expires,o["Cache-Control"]=n.CacheControl,o["Content-Disposition"]=n.ContentDisposition,o["Content-Encoding"]=n.ContentEncoding,o.Range=n.Range,o["If-Modified-Since"]=n.IfModifiedSince,o["If-Unmodified-Since"]=n.IfUnmodifiedSince,o["If-Match"]=n.IfMatch,o["If-None-Match"]=n.IfNoneMatch,o["x-cos-copy-source"]=n.CopySource,o["x-cos-copy-source-Range"]=n.CopySourceRange,o["x-cos-metadata-directive"]=n.MetadataDirective,o["x-cos-copy-source-If-Modified-Since"]=n.CopySourceIfModifiedSince,o["x-cos-copy-source-If-Unmodified-Since"]=n.CopySourceIfUnmodifiedSince,o["x-cos-copy-source-If-Match"]=n.CopySourceIfMatch,o["x-cos-copy-source-If-None-Match"]=n.CopySourceIfNoneMatch,o["x-cos-server-side-encryption"]=n.ServerSideEncryption,o["x-cos-acl"]=n.ACL,o["x-cos-grant-read"]=n.GrantRead,o["x-cos-grant-write"]=n.GrantWrite,o["x-cos-grant-full-control"]=n.GrantFullControl,o["x-cos-grant-read-acp"]=n.GrantReadAcp,o["x-cos-grant-write-acp"]=n.GrantWriteAcp,o["x-cos-storage-class"]=n.StorageClass,n.Headers=g(o));var a=function(e){return e&&e.headers&&(e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},s=function(e,t){r&&r(a(e),a(t))};if("getService"!==e&&"abortUploadTask"!==e){if(!k(e,n))return void s({error:"lack of required params"});if(n.Region&&-1===n.Region.indexOf("-"))return void s({error:"Region format error, find help here: https://cloud.tencent.com/document/product/436/6224"});if(n.Region&&n.Region.indexOf("cos.")>-1)return void s({error:'Region should not be start with "cos."'});if(n.Bucket){if(!/^(.+)-(\d+)$/.test(n.Bucket))if(n.AppId)n.Bucket=n.Bucket+"-"+n.AppId;else{if(!this.options.AppId)return void s({error:'Bucket should format as "test-1250000000".'});n.Bucket=n.Bucket+"-"+this.options.AppId}n.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete n.AppId)}n.Key&&"/"===n.Key.substr(0,1)&&(n.Key=n.Key.substr(1))}var u=t.call(this,n,s);if("getAuth"===e||"getObjectUrl"===e)return u}},b=function(e,t){function n(){if(o=0,t&&"function"==typeof t){r=Date.now();var n,i=Math.max(0,Math.round((s-a)/((r-u)/1e3)*100)/100);n=0===s&&0===e?1:Math.round(s/e*100)/100||0,u=r,a=s;try{t({loaded:s,total:e,speed:i,percent:n})}catch(e){}}}var r,o,i=this,a=0,s=0,u=Date.now();return function(t,r){if(t&&(s=t.loaded,e=t.total),r)clearTimeout(o),n();else{if(o)return;o=setTimeout(n,i.options.ProgressInterval)}}},T=function(e,t,n){return e.slice?e.slice(t,n):e.mozSlice?e.mozSlice(t,n):e.webkitSlice?e.webkitSlice(t,n):void 0},R={apiWrapper:x,getAuth:h,xml2json:f,json2xml:p,md5:l,clearKey:g,getFileMd5:v,binaryBase64:m,extend:i,isArray:a,each:s,map:u,filter:c,clone:o,uuid:C,throttleOnProgress:b,isBrowser:!!t.document,fileSlice:T};e.exports=R}).call(t,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=function(e){var t={},n=function(e){return!t[e]&&(t[e]=[]),t[e]};e.on=function(e,t){"task-list-update"===e&&console.warn('warning: Event "'+e+'" has been deprecated. Please use "list-update" instead.'),n(e).push(t)},e.off=function(e,t){for(var r=n(e),o=r.length-1;o>=0;o--)t===r[o]&&r.splice(o,1)},e.emit=function(e,t){for(var r=n(e).map(function(e){return e}),o=0;o>>32-t}function n(e,t){var n,r,o,i,a;return o=2147483648&e,i=2147483648&t,n=1073741824&e,r=1073741824&t,a=(1073741823&e)+(1073741823&t),n&r?2147483648^a^o^i:n|r?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function r(e,t,n){return e&t|~e&n}function o(e,t,n){return e&n|t&~n}function i(e,t,n){return e^t^n}function a(e,t,n){return t^(e|~n)}function s(e,o,i,a,s,u,c){return e=n(e,n(n(r(o,i,a),s),c)),n(t(e,u),o)}function u(e,r,i,a,s,u,c){return e=n(e,n(n(o(r,i,a),s),c)),n(t(e,u),r)}function c(e,r,o,a,s,u,c){return e=n(e,n(n(i(r,o,a),s),c)),n(t(e,u),r)}function l(e,r,o,i,s,u,c){return e=n(e,n(n(a(r,o,i),s),c)),n(t(e,u),r)}function d(e){var t,n,r="",o="";for(n=0;n<=3;n++)t=e>>>8*n&255,o="0"+t.toString(16),r+=o.substr(o.length-2,2);return r}var f,p,h,g,y,v,m,C,k,x=Array();for(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}(e),x=function(e){for(var t,n=e.length,r=n+8,o=(r-r%64)/64,i=16*(o+1),a=Array(i-1),s=0,u=0;u>>29,a}(e),v=1732584193,m=4023233417,C=2562383102,k=271733878,f=0;f>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r>>2]>>>24-r%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=o/(4*i),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*i,o=e.min(4*t,o),t){for(var u=0;uc;c++){if(16>c)i[c]=0|e[t+c];else{var l=i[c-3]^i[c-8]^i[c-14]^i[c-16];i[c]=l<<1|l>>>31}l=(r<<5|r>>>27)+u+i[c],l=20>c?l+(1518500249+(o&a|~o&s)):40>c?l+(1859775393+(o^a^s)):60>c?l+((o&a|o&s|a&s)-1894007588):l+((o^a^s)-899497514),u=s,s=a,a=o<<30|o>>>2,o=r,r=l}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+a|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=o._createHelper(t),e.HmacSHA1=o._createHmacHelper(t)}(),function(){var e=r,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var r=e.blockSize,o=4*r;n.sigBytes>o&&(n=e.finalize(n)),n.clamp();for(var i=this._oKey=n.clone(),a=this._iKey=n.clone(),s=i.words,u=a.words,c=0;c>>2]>>>24-i%4*8&255,s=t[i+1>>>2]>>>24-(i+1)%4*8&255,u=t[i+2>>>2]>>>24-(i+2)%4*8&255,c=a<<16|s<<8|u,l=0;l<4&&i+.75*l>>6*(3-l)&63));var d=r.charAt(64);if(d)for(;o.length%4;)o.push(d);return o.join("")},parse:function(e){var t=e.length,r=this._map,o=r.charAt(64);if(o){var i=e.indexOf(o);-1!=i&&(t=i)}for(var a=[],s=0,u=0;u>>6-u%4*2;a[s>>>2]|=(c|l)<<24-s%4*8,s++}return n.create(a,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.exports=r},function(e,t){var n=function(){this.version="1.3.5";var e={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},t=new RegExp(/(?!xmlns)^.*:/),r=new RegExp(/^\s+|\s+$/g);return this.grokType=function(e){return/^\s*$/.test(e)?null:/^(?:true|false)$/i.test(e)?"true"===e.toLowerCase():isFinite(e)?parseFloat(e):e},this.parseString=function(e,t){if(e){var n=this.stringToXML(e);return n.getElementsByTagName("parsererror").length?null:this.parseXML(n,t)}return null},this.parseXML=function(o,i){for(var a in i)e[a]=i[a];var s={},u=0,c="";if(o.childNodes.length)for(var l,d,f,p=0;p/g,">").replace(/'/g,"'").replace(/"/g,""").replace(o,"")}var r=new RegExp("^([^a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�])|^((x|X)(m|M)(l|L))|([^a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�-.0-9·̀-ͯ‿⁀])","g"),o=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,i=function(e){var t=[];if(e instanceof Object)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},a=function(e,t){var o=function(e,n,o,i,a){var s=void 0!==t.indent?t.indent:"\t",u=t.prettyPrint?"\n"+new Array(i).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(r,"_"));var c=[u,"<",e,o||""];return n&&n.length>0?(c.push(">"),c.push(n),a&&c.push(u),c.push("")):c.push("/>"),c.join("")};return function e(r,a,s){var u=typeof r;switch((Array.isArray?Array.isArray(r):r instanceof Array)?u="array":r instanceof Date&&(u="date"),u){case"array":var c=[];return r.map(function(t){c.push(e(t,1,s+1))}),t.prettyPrint&&c.push("\n"),c.join("");case"date":return r.toJSON?r.toJSON():r+"";case"object":var l=[];for(var d in r)if(r[d]instanceof Array)for(var f in r[d])l.push(o(d,e(r[d][f],0,s+1),null,s+1,i(r[d][f]).length));else l.push(o(d,e(r[d],0,s+1),null,s+1));return t.prettyPrint&&l.length>0&&l.push("\n"),l.join("");case"function":return r();default:return t.escape?n(r):""+r}}(e,0,0)},s=function(e){var t=['"),t.join("")};e.exports=function(e,t){t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" "});var n=this.Buffer||function(){};if("string"==typeof e||e instanceof n)try{e=JSON.parse(e.toString())}catch(e){return!1}var r="",o="";return t&&("object"==typeof t?(t.xmlHeader&&(r=s(!!t.xmlHeader.standalone)),void 0!==t.docType&&(o="")):r=s()),t=t||{},[r,t.prettyPrint&&o?"\n":"",o,a(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t,n){var r=n(0),o=function(e){var t=[],n={},o=0,i=0,a={};r.each(["putObject","sliceUploadFile"],function(t){a[t]=e[t],e[t]=function(n,r){e._addTask(t,n,r)}});var s=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),t},u=function(){e.emit("task-list-update",{list:r.map(t,s)}),e.emit("list-update",{list:r.map(t,s)})},c=function(){if(i-1?"{{Bucket}}-{{AppId}}.{{Region}}.myqcloud.com":"{{Bucket}}-{{AppId}}.cos.{{Region}}.myqcloud.com"),o=o.replace(/\{\{AppId\}\}/gi,r).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,i).replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(o)||(o=u+"//"+o),"/"===o.slice(-1)&&(o=o.slice(0,-1));var c=o;return a&&(c+="/"+encodeURIComponent(a).replace(/%2F/g,"/")),s&&(c+=s),e.isLocation&&(c=c.replace(/^https?:\/\//,"")),c}function V(e,t){var n=this;if(n.options.getAuthorization)n.options.getAuthorization.call(n,{Method:e.Method,Key:e.Key},function(e){"string"==typeof e&&(e={Authorization:e}),t&&t(e)});else{if(!n.options.getSTS){var r=Q.getAuth({SecretId:e.SecretId||n.options.SecretId,SecretKey:e.SecretKey||n.options.SecretKey,Method:e.Method,Key:e.Key});return t&&t({Authorization:r}),r}var o=e.Bucket||"";n._StsMap=n._StsMap||{};var i=n._StsMap[o]||{},a=function(){var n=Q.getAuth({SecretId:i.SecretId,SecretKey:i.SecretKey,Method:e.Method,Key:e.Key}),r={Authorization:n,XCosSecurityToken:i.XCosSecurityToken||"",Token:i.Token||"",ClientIP:i.ClientIP||"",ClientUA:i.ClientUA||""};t&&t(r)};i.ExpiredTime&&i.ExpiredTime-(Date.now()/1e3>60)?a():n.options.getSTS.call(n,{Bucket:o},function(e){i=n._StsMap[o]=e||{},a()})}return""}function X(e,t){var n=this;V.call(n,{Method:e.method,Key:e.Key},function(r){e.AuthData=r,$.call(n,e,t)})}function $(e,t){var n=this,r=e.TaskId;if(!r||n._isRunningTask(r)){var o=e.Bucket,i=e.Region,a=e.Key,s=e.action,u=e.method||"GET",c=e.headers||{},l=e.url,d=e.body,f=e.json,p=e.rawBody,h=e.qs;!h&&(h={}),h.versionId=e.VersionId;var g={url:l||W({protocol:n.options.Protocol,domain:n.options.Domain,bucket:o,region:i,object:a,action:s}),method:u,headers:c||{},qs:h,body:d,json:f};if(g.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(g.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(g.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(g.headers.clientUA=e.AuthData.ClientUA),e.AuthData.XCosSecurityToken&&(g.headers["x-cos-security-token"]=e.AuthData.XCosSecurityToken),g.headers&&(g.headers=Q.clearKey(g.headers)),g.qs&&(g.qs=Q.clearKey(g.qs)),g=Q.clearKey(g),e.onProgress&&"function"==typeof e.onProgress){var y=d&&(d.size||d.length)||0;g.onProgress=function(t){if(!r||n._isRunningTask(r)){var o=t?t.loaded:0;e.onProgress({loaded:o,total:y})}}}var v=Y(g,function(e,o,i){var a,s=function(e,i){if(r&&n.off("inner-kill-task",m),!a){a=!0;var s={};o&&o.statusCode&&(s.statusCode=o.statusCode),o&&o.headers&&(s.headers=o.headers),e?(e=Q.extend(e||{},s),t(e,null)):(i=Q.extend(i||{},s),t(null,i))}};if(e)return void s({error:e});var u;try{u=Q.xml2json(i)||{}}catch(e){u=i||{}}var c=o.statusCode;return 2!==Math.floor(c/100)?void s({error:u.Error||u}):(p&&(u={},u.body=i),u.Error?void s({error:u.Error}):void s(null,u))}),m=function(e){e.TaskId===r&&(v&&v.abort&&v.abort(),n.off("inner-kill-task",m))};r&&n.on("inner-kill-task",m)}}var J=n(3),Y=n(14),Q=n(0),Z={getBucket:o,headBucket:r,deleteBucket:i,getBucketAcl:a,putBucketAcl:s,getBucketCors:u,putBucketCors:c,deleteBucketCors:l,getBucketLocation:f,putBucketTagging:g,getBucketTagging:h,deleteBucketTagging:y,getBucketPolicy:p,putBucketPolicy:d,getBucketLifecycle:m,putBucketLifecycle:v,deleteBucketLifecycle:C,putBucketVersioning:k,getBucketVersioning:x,putBucketReplication:b,getBucketReplication:T,deleteBucketReplication:R,getObject:A,headObject:S,listObjectVersions:w,putObject:B,deleteObject:P,getObjectAcl:E,putObjectAcl:_,optionsObject:j,putObjectCopy:L,deleteMultipleObject:D,restoreObject:O,uploadPartCopy:I,multipartInit:M,multipartUpload:U,multipartComplete:H,multipartList:K,multipartListPart:F,multipartAbort:N,getObjectUrl:q,getAuth:z};Q.each(Z,function(e,n){t[n]=Q.apiWrapper(n,e)})}).call(t,n(1))},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l=0?(d=g.substr(0,y),f=g.substr(y+1)):(d=g,f=""),p=decodeURIComponent(d),h=decodeURIComponent(f),r(a,p)?o(a[p])?a[p].push(h):a[p]=[a[p],h]:a[p]=h}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r0&&t-1 in e))}function t(e){var t=M[e]={};return B.each(e.match(O)||[],function(e,n){t[n]=!0}),t}function n(){I.addEventListener?(I.removeEventListener("DOMContentLoaded",r,!1),window.removeEventListener("load",r,!1)):(I.detachEvent("onreadystatechange",r),window.detachEvent("onload",r))}function r(){(I.addEventListener||"load"===event.type||"complete"===I.readyState)&&(n(),B.ready())}function o(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(F,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:K.test(n)?B.parseJSON(n):n)}catch(e){}B.data(e,t,n)}else n=void 0}return n}function i(e){var t;for(t in e)if(("data"!==t||!B.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function a(e,t,n,r){if(B.acceptData(e)){var o,i,a=B.expando,s=e.nodeType,u=s?B.cache:e,c=s?e[a]:e[a]&&a;if(c&&u[c]&&(r||u[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[a]=m.pop()||B.guid++:a),u[c]||(u[c]=s?{}:{toJSON:B.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[c]=B.extend(u[c],t):u[c].data=B.extend(u[c].data,t)),i=u[c],r||(i.data||(i.data={}),i=i.data),void 0!==n&&(i[B.camelCase(t)]=n),"string"==typeof t?null==(o=i[t])&&(o=i[B.camelCase(t)]):o=i,o}}function s(e,t,n){if(B.acceptData(e)){var r,o,a=e.nodeType,s=a?B.cache:e,u=a?e[B.expando]:B.expando;if(s[u]){if(t&&(r=n?s[u]:s[u].data)){B.isArray(t)?t=t.concat(B.map(t,B.camelCase)):t in r?t=[t]:(t=B.camelCase(t),t=t in r?[t]:t.split(" ")),o=t.length;for(;o--;)delete r[t[o]];if(n?!i(r):!B.isEmptyObject(r))return}(n||(delete s[u].data,i(s[u])))&&(a?B.cleanData([e],!0):w.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}function u(){return!0}function c(){return!1}function l(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(O)||[];if(B.isFunction(n))for(;r=i[o++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function d(e,t,n,r){function o(s){var u;return i[s]=!0,B.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||a||i[c]?a?!(u=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),u}var i={},a=e===ae;return o(t.dataTypes[0])||!i["*"]&&o("*")}function f(e,t){var n,r,o=B.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((o[r]?e:n||(n={}))[r]=t[r]);return n&&B.extend(!0,e,n),e}function p(e,t,n){for(var r,o,i,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(a in s)if(s[a]&&s[a].test(o)){u.unshift(a);break}if(u[0]in n)i=u[0];else{for(a in n){if(!u[0]||e.converters[a+" "+u[0]]){i=a;break}r||(r=a)}i=i||r}if(i)return i!==u[0]&&u.unshift(i),n[i]}function h(e,t,n,r){var o,i,a,s,u,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(i=l.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=l.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(!(a=c[u+" "+i]||c["* "+i]))for(o in c)if(s=o.split(" "),s[1]===i&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[o]:!0!==c[o]&&(i=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+i}}}return{state:"success",data:t}}function g(e,t,n,r){var o;if(B.isArray(t))B.each(t,function(t,o){n||ce.test(e)?r(e,o):g(e+"["+("object"==typeof o?t:"")+"]",o,n,r)});else if(n||"object"!==B.type(t))r(e,t);else for(o in t)g(e+"["+o+"]",t[o],n,r)}function y(){try{return new window.XMLHttpRequest}catch(e){}}function v(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}var m=[],C=m.slice,k=m.concat,x=m.push,b=m.indexOf,T={},R=T.toString,S=T.hasOwnProperty,w={},A="1.11.1 -css,-css/addGetHookIf,-css/curCSS,-css/defaultDisplay,-css/hiddenVisibleSelectors,-css/support,-css/swap,-css/var/cssExpand,-css/var/isHidden,-css/var/rmargin,-css/var/rnumnonpx,-effects,-effects/Tween,-effects/animatedSelector,-effects/support,-dimensions,-offset,-deprecated,-event-alias,-wrap",B=function(e,t){return new B.fn.init(e,t)},P=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,E=/^-ms-/,_=/-([\da-z])/gi,j=function(e,t){return t.toUpperCase()};B.fn=B.prototype={jquery:A,constructor:B,selector:"",length:0,toArray:function(){return C.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:C.call(this)},pushStack:function(e){var t=B.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return B.each(this,e,t)},map:function(e){return this.pushStack(B.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(C.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==B.type(e)||e.nodeType||B.isWindow(e))return!1;try{if(e.constructor&&!S.call(e,"constructor")&&!S.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(w.ownLast)for(t in e)return S.call(e,t);for(t in e);return void 0===t||S.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?T[R.call(e)]||"object":typeof e},globalEval:function(e){e&&B.trim(e)&&(window.execScript||function(e){window.eval.call(window,e)})(e)},camelCase:function(e){return e.replace(E,"ms-").replace(_,j)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(t,n,r){var o=0,i=t.length,a=e(t);if(r){if(a)for(;o)[^>]*|#([\w-]*))$/;(B.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:D.exec(e))||!n[1]&&t)return!t||t.jquery?(t||L).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof B?t[0]:t,B.merge(this,B.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:I,!0)),rsingleTag.test(n[1])&&B.isPlainObject(t))for(n in t)B.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=I.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return L.find(e);this.length=1,this[0]=r}return this.context=I,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):B.isFunction(e)?void 0!==L.ready?L.ready(e):e(B):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),B.makeArray(e,this))}).prototype=B.fn,L=B(I);var O=/\S+/g,M={};B.Callbacks=function(e){e="string"==typeof e?M[e]||t(e):B.extend({},e);var n,r,o,i,a,s,u=[],c=!e.once&&[],l=function(t){for(r=e.memory&&t,o=!0,a=s||0,s=0,i=u.length,n=!0;u&&a-1;)u.splice(r,1),n&&(r<=i&&i--,r<=a&&a--)}),this},has:function(e){return e?B.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],i=0,this},disable:function(){return u=c=r=void 0,this},disabled:function(){return!u},lock:function(){return c=void 0,r||d.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!u||o&&!c||(t=t||[],t=[e,t.slice?t.slice():t],n?c.push(t):l(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!o}};return d},B.extend({Deferred:function(e){var t=[["resolve","done",B.Callbacks("once memory"),"resolved"],["reject","fail",B.Callbacks("once memory"),"rejected"],["notify","progress",B.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return B.Deferred(function(n){B.each(t,function(t,i){var a=B.isFunction(e[t])&&e[t];o[i[1]](function(){var e=a&&a.apply(this,arguments);e&&B.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[i[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?B.extend(e,r):r}},o={};return r.pipe=r.then,B.each(t,function(e,i){var a=i[2],s=i[3];r[i[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),o[i[0]]=function(){return o[i[0]+"With"](this===o?r:this,arguments),this},o[i[0]+"With"]=a.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,r,o=0,i=C.call(arguments),a=i.length,s=1!==a||e&&B.isFunction(e.promise)?a:0,u=1===s?e:B.Deferred(),c=function(e,n,r){return function(o){n[e]=this,r[e]=arguments.length>1?C.call(arguments):o,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);o0||(U.resolveWith(I,[B]),B.fn.triggerHandler&&(B(I).triggerHandler("ready"),B(I).off("ready")))}}}),B.ready.promise=function(e){if(!U)if(U=B.Deferred(),"complete"===I.readyState)setTimeout(B.ready);else if(I.addEventListener)I.addEventListener("DOMContentLoaded",r,!1),window.addEventListener("load",r,!1);else{I.attachEvent("onreadystatechange",r),window.attachEvent("onload",r);var t=!1;try{t=null==window.frameElement&&I.documentElement}catch(e){}t&&t.doScroll&&function e(){if(!B.isReady){try{t.doScroll("left")}catch(t){return setTimeout(e,50)}n(),B.ready()}}()}return U.promise(e)};var H;for(H in B(w))break;w.ownLast="0"!==H,w.inlineBlockNeedsLayout=!1,B(function(){var e,t,n,r;(n=I.getElementsByTagName("body")[0])&&n.style&&(t=I.createElement("div"),r=I.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",w.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=I.createElement("div");if(null==w.deleteExpando){w.deleteExpando=!0;try{delete e.test}catch(e){w.deleteExpando=!1}}e=null}(),B.acceptData=function(e){var t=B.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)};var K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,F=/([A-Z])/g;B.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?B.cache[e[B.expando]]:e[B.expando])&&!i(e)},data:function(e,t,n){return a(e,t,n)},removeData:function(e,t){return s(e,t)},_data:function(e,t,n){return a(e,t,n,!0)},_removeData:function(e,t){return s(e,t,!0)}}),B.fn.extend({data:function(e,t){var n,r,i,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(i=B.data(a),1===a.nodeType&&!B._data(a,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=B.camelCase(r.slice(5)),o(a,r,i[r])));B._data(a,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){B.data(this,e)}):arguments.length>1?this.each(function(){B.data(this,e,t)}):a?o(a,e,B.data(a,e)):void 0},removeData:function(e){return this.each(function(){B.removeData(this,e)})}}),B.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=B._data(e,t),n&&(!r||B.isArray(n)?r=B._data(e,t,B.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=B.queue(e,t),r=n.length,o=n.shift(),i=B._queueHooks(e,t),a=function(){B.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,a,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return B._data(e,n)||B._data(e,n,{empty:B.Callbacks("once memory").add(function(){B._removeData(e,t+"queue"),B._removeData(e,n)})})}}),B.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length=0&&(p=f.split("."),f=p.shift(),p.sort()),i=f.indexOf(":")<0&&"on"+f,e=e[B.expando]?e:new B.Event(f,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:B.makeArray(t,[e]),u=B.event.special[f]||{},r||!u.trigger||!1!==u.trigger.apply(n,t))){if(!r&&!u.noBubble&&!B.isWindow(n)){for(s=u.delegateType||f,G.test(s+f)||(a=a.parentNode);a;a=a.parentNode)d.push(a),c=a;c===(n.ownerDocument||I)&&d.push(c.defaultView||c.parentWindow||window)}for(l=0;(a=d[l++])&&!e.isPropagationStopped();)e.type=l>1?s:u.bindType||f,o=(B._data(a,"events")||{})[e.type]&&B._data(a,"handle"),o&&o.apply(a,t),(o=i&&a[i])&&o.apply&&B.acceptData(a)&&(e.result=o.apply(a,t),!1===e.result&&e.preventDefault());if(e.type=f,!r&&!e.isDefaultPrevented()&&(!u._default||!1===u._default.apply(d.pop(),t))&&B.acceptData(n)&&i&&n[f]&&!B.isWindow(n)){c=n[i],c&&(n[i]=null),B.event.triggered=f;try{n[f]()}catch(e){}B.event.triggered=void 0,c&&(n[i]=c)}return e.result}},dispatch:function(e){e=B.event.fix(e);var t,n,r,o,i,a=[],s=C.call(arguments),u=(B._data(this,"events")||{})[e.type]||[],c=B.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=B.event.handlers.call(this,e,u),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(r.namespace)||(e.handleObj=r,e.data=r.data,void 0!==(n=((B.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,s))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,o,i,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(o=[],i=0;i=0:B.find(n,this,null,[u]).length),o[n]&&o.push(r);o.length&&a.push({elem:u,handlers:o})}return s0?4:0,o=e>=200&&e<300||304===e,n&&(k=p(f,R,n)),k=h(f,k,R,o),o?(f.ifModified&&(x=R.getResponseHeader("Last-Modified"),x&&(B.lastModified[i]=x),(x=R.getResponseHeader("etag"))&&(B.etag[i]=x)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=k.state,l=k.data,d=k.error,o=!d)):(d=T,!e&&T||(T="error",e<0&&(e=0))),R.status=e,R.statusText=(t||T)+"",o?v.resolveWith(g,[l,T,R]):v.rejectWith(g,[R,T,d]),R.statusCode(C),C=void 0,u&&y.trigger(o?"ajaxSuccess":"ajaxError",[R,f,o?l:d]),m.fireWith(g,[R,T]),u&&(y.trigger("ajaxComplete",[R,f]),--B.active||B.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,o,i,a,s,u,c,l,f=B.ajaxSetup({},t),g=f.context||f,y=f.context&&(g.nodeType||g.jquery)?B(g):B.event,v=B.Deferred(),m=B.Callbacks("once memory"),C=f.statusCode||{},k={},x={},b=0,T="canceled",R={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!l)for(l={};t=ee.exec(a);)l[t[1].toLowerCase()]=t[2];t=l[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,k[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)C[t]=[C[t],e[t]];else R.always(e[R.status]);return this},abort:function(e){var t=e||T;return c&&c.abort(t),n(0,t),this}};if(v.promise(R).complete=m.add,R.success=R.done,R.error=R.fail,f.url=((e||f.url||Y)+"").replace(Q,"").replace(re,J[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=B.trim(f.dataType||"*").toLowerCase().match(O)||[""],null==f.crossDomain&&(r=oe.exec(f.url.toLowerCase()),f.crossDomain=!(!r||r[1]===J[1]&&r[2]===J[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(J[3]||("http:"===J[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=B.param(f.data,f.traditional)),d(ie,f,t,R),2===b)return R;u=f.global,u&&0==B.active++&&B.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!ne.test(f.type),i=f.url,f.hasContent||(f.data&&(i=f.url+=(X.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=Z.test(i)?i.replace(Z,"$1_="+V++):i+(X.test(i)?"&":"?")+"_="+V++)),f.ifModified&&(B.lastModified[i]&&R.setRequestHeader("If-Modified-Since",B.lastModified[i]),B.etag[i]&&R.setRequestHeader("If-None-Match",B.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&R.setRequestHeader("Content-Type",f.contentType);for(o in f.headers)R.setRequestHeader(o,f.headers[o]);if(f.beforeSend&&(!1===f.beforeSend.call(g,R,f)||2===b))return R.abort();T="abort";for(o in{success:1,error:1,complete:1})R[o](f[o]);if(c=d(ae,f,t,R)){R.readyState=1,u&&y.trigger("ajaxSend",[R,f]),f.async&&f.timeout>0&&(s=setTimeout(function(){R.abort("timeout")},f.timeout));try{b=1,c.send(k,n)}catch(e){if(!(b<2))throw e;n(-1,e)}}else n(-1,"No Transport");return R},getJSON:function(e,t,n){return B.get(e,t,n,"json")},getScript:function(e,t){return B.get(e,void 0,t,"script")}}),B.each(["get","post"],function(e,t){B[t]=function(e,n,r,o){return B.isFunction(n)&&(o=o||r,r=n,n=void 0),B.ajax({url:e,type:t,dataType:o,data:n,success:r})}}),B.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){B.fn[t]=function(e){return this.on(t,e)}}),B._evalUrl=function(e){return B.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};var ue=/%20/g,ce=/\[\]$/,le=/\r?\n/g,de=/^(?:submit|button|image|reset|file)$/i,fe=/^(?:input|select|textarea|keygen)/i;B.param=function(e,t){var n,r=[],o=function(e,t){t=B.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=B.ajaxSettings&&B.ajaxSettings.traditional),B.isArray(e)||e.jquery&&!B.isPlainObject(e))B.each(e,function(){o(this.name,this.value)});else for(n in e)g(n,e[n],t,o);return r.join("&").replace(ue,"+")},B.fn.extend({serialize:function(){return B.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=B.prop(this,"elements");return e?B.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!B(this).is(":disabled")&&fe.test(this.nodeName)&&!de.test(e)&&(this.checked||!rcheckableType.test(e))}).map(function(e,t){var n=B(this).val();return null==n?null:B.isArray(n)?B.map(n,function(e){return{name:t.name,value:e.replace(le,"\r\n")}}):{name:t.name,value:n.replace(le,"\r\n")}}).get()}}),B.ajaxSettings.xhr=void 0!==window.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&y()||v()}:y;var pe=0,he={},ge=B.ajaxSettings.xhr();window.ActiveXObject&&B(window).on("unload",function(){for(var e in he)he[e](void 0,!0)}),w.cors=!!ge&&"withCredentials"in ge,ge=w.ajax=!!ge,ge&&B.ajaxTransport(function(e){if(!e.crossDomain||w.cors){var t;return{send:function(n,r){var o,i=e.xhr(),a=++pe;if(i.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)i[o]=e.xhrFields[o];e.mimeType&&i.overrideMimeType&&i.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)void 0!==n[o]&&i.setRequestHeader(o,n[o]+"");i.upload&&e.progress&&(i.upload.onprogress=e.progress),i.send(e.hasContent&&(e.body||e.data)||null),t=function(n,o){var s,u,c;if(t&&(o||4===i.readyState))if(delete he[a],t=void 0,i.onreadystatechange=B.noop,o)4!==i.readyState&&i.abort();else{c={},s=i.status,"string"==typeof i.responseText&&(c.text=i.responseText);try{u=i.statusText}catch(e){u=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&r(s,u,c,i.getAllResponseHeaders())},e.async?4===i.readyState?setTimeout(t):i.onreadystatechange=he[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),B.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return B.globalEval(e),e}}}),B.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),B.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=I.head||B("head")[0]||I.documentElement;return{send:function(r,o){t=I.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||o(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ye=[],ve=/(=)\?(?=&|$)|\?\?/;return B.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=ye.pop()||B.expando+"_"+V++;return this[e]=!0,e}}),B.ajaxPrefilter("json jsonp",function(e,t,n){var r,o,i,a=!1!==e.jsonp&&(ve.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ve.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=B.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(ve,"$1"+r):!1!==e.jsonp&&(e.url+=(X.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return i||B.error(r+" was not called"),i[0]},e.dataTypes[0]="json",o=window[r],window[r]=function(){i=arguments},n.always(function(){window[r]=o,e[r]&&(e.jsonpCallback=t.jsonpCallback,ye.push(r)),i&&B.isFunction(o)&&o(i[0]),i=o=void 0}),"script"}),B.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||I;var r=rsingleTag.exec(e),o=!n&&[];return r?[t.createElement(r[1])]:(r=B.buildFragment([e],t,o),o&&o.length&&B(o).remove(),B.merge([],r.childNodes))},B}(),i=function(e,t){if(e=o.extend(!0,{headers:{},qs:{}},e),e.type=e.method,delete e.method,e.onProgress&&(e.progress=e.onProgress,delete e.onProgress),e.qs){var n=r.stringify(e.qs);n&&(e.url+=(-1===e.url.indexOf("?")?"?":"&")+n),delete e.qs}if(e.json&&(e.data=e.body,delete e.json,delete e.body,!e.headers&&(e.headers={}),e.headers["Content-Type"]="application/json"),e.body&&e.body.constructor!==window.File&&e.body.constructor!==window.Blob&&(e.data=e.body,delete e.body),e.headers){var i=e.headers;delete e.headers,e.beforeSend=function(e){for(var t in i)i.hasOwnProperty(t)&&"content-length"!==t.toLowerCase()&&"user-agent"!==t.toLowerCase()&&"origin"!==t.toLowerCase()&&"host"!==t.toLowerCase()&&e.setRequestHeader(t,i[t])}}var a=function(e){var t={};return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){if(e){var n=e.indexOf(":"),r=e.substr(0,n).trim().toLowerCase(),o=e.substr(n+1).trim();t[r]=o}}),{statusCode:e.status,statusMessage:e.statusText,headers:t}};return e.success=function(e,n,r){t(null,a(r),e)},e.error=function(e){e.responseText?t(null,a(e),e.responseText):t(e.statusText,a(e),e.responseText)},e.dataType="text",o.ajax(e)};e.exports=i},function(e,t,n){function r(e,t){var n,r=new h,i=e.TaskId,a=e.Bucket,u=e.Region,l=e.Key,d=e.Body,f=e.ChunkSize||e.SliceSize||this.options.ChunkSize,p=e.AsyncLimit,y=e.StorageClass||"Standard",v=e.ServerSideEncryption,m=this,C=e.onProgress,k=e.onHashProgress;r.on("error",function(e){if(m._isRunningTask(i))return t(e)}),r.on("upload_complete",function(e){t(null,e)}),r.on("upload_slice_complete",function(e){c.call(m,{Bucket:a,Region:u,Key:l,UploadId:e.UploadId,SliceList:e.SliceList},function(e,t){if(m._isRunningTask(i))return e?r.emit("error",e):void r.emit("upload_complete",t)})}),r.on("get_upload_data_finish",function(e){s.call(m,{TaskId:i,Bucket:a,Region:u,Key:l,Body:d,FileSize:n,SliceSize:f,AsyncLimit:p,ServerSideEncryption:v,UploadData:e,onProgress:C},function(e,t){if(m._isRunningTask(i))return e?r.emit("error",e):void r.emit("upload_slice_complete",t)})}),r.on("get_file_size_finish",function(){if(e.UploadData.UploadId)r.emit("get_upload_data_finish",e.UploadData);else{var t=g.extend({},e);t=g.extend(t,{TaskId:i,Bucket:a,Region:u,Key:l,Headers:e.Headers,StorageClass:y,Body:d,FileSize:n,SliceSize:f,onHashProgress:k}),o.call(m,t,function(t,n){if(m._isRunningTask(i)){if(t)return r.emit("error",t);e.UploadData.UploadId=n.UploadId,e.UploadData.PartList=n.PartList,r.emit("get_upload_data_finish",e.UploadData)}})}}),n=d.size||e.ContentLength,function(){for(var e=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],t=1048576,r=0;rv)return t(null,!1);if(n>1){if(Math.max(e[0].Size,e[1].Size)!==y)return t(null,!1)}var r=function(o){if(o=h?c%l||l:l),!e.Uploaded}),C=g.throttleOnProgress.call(n,c,e.onProgress);p.eachLimit(m,d,function(e,t){if(n._isRunningTask(r)){var d=e.PartNumber,p=Math.min(c,e.PartNumber*l)-(e.PartNumber-1)*l,h=0;u.call(n,{TaskId:r,Bucket:o,Region:i,Key:a,SliceSize:l,FileSize:c,PartNumber:d,ServerSideEncryption:v,Body:f,UploadData:s,onProgress:function(e){y+=e.loaded-h,h=e.loaded,C({loaded:y,total:c})}},function(o,i){n._isRunningTask(r)&&(o||i.ETag||(o='get ETag error, please add "ETag" to CORS ExposeHeader setting.'),o?y-=h:(y+=p-h,e.ETag=i.ETag),t(o||null,i))})}},function(e){if(n._isRunningTask(r)){if(C(null,!0),e)return t(e);t(null,{UploadId:s.UploadId,SliceList:s.PartList})}})}function u(e,t){var n=e.TaskId,r=e.Bucket,o=e.Region,i=e.Key,a=e.FileSize,s=e.Body,u=1*e.PartNumber,c=e.SliceSize,l=e.ServerSideEncryption,d=e.UploadData,f=this,h=c*(u-1),y=c,v=h+c;v>a&&(v=a,y=v-h);var m=g.fileSlice(s,h,v),C=d.PartList[u-1],k=C.ETag;p.retry(3,function(t){f._isRunningTask(n)&&f.multipartUpload({TaskId:n,Bucket:r,Region:o,Key:i,ContentLength:y,ContentSha1:k,PartNumber:u,UploadId:d.UploadId,ServerSideEncryption:l,Body:m,onProgress:e.onProgress},function(e,r){if(f._isRunningTask(n))return e?t(e):(C.Uploaded=!0,t(null,r))})},function(e,r){if(f._isRunningTask(n))return t(e,r)})}function c(e,t){var n=e.Bucket,r=e.Region,o=e.Key,i=e.UploadId,a=e.SliceList,s=this,u=a.map(function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}});s.multipartComplete({Bucket:n,Region:r,Key:o,UploadId:i,Parts:u},function(e,n){if(e)return t(e);t(null,n)})}function l(e,t){var n=e.Bucket,r=e.Region,o=e.Key,a=e.UploadId,s=e.Level||"task",u=e.AsyncLimit,c=this,l=new h;if(l.on("error",function(e){return t(e)}),l.on("get_abort_array",function(i){d.call(c,{Bucket:n,Region:r,Key:o,Headers:e.Headers,AsyncLimit:u,AbortArray:i},function(e,n){if(e)return t(e);t(null,n)})}),"bucket"===s)i.call(c,{Bucket:n,Region:r},function(e,n){if(e)return t(e);l.emit("get_abort_array",n.UploadList||[])});else if("file"===s){if(!o)return t({error:"abort_upload_task_no_key"});i.call(c,{Bucket:n,Region:r,Key:o},function(e,n){if(e)return t(e);l.emit("get_abort_array",n.UploadList||[])})}else{if("task"!==s)return t({error:"abort_unknown_level"});if(!a)return t({error:"abort_upload_task_no_id"});if(!o)return t({error:"abort_upload_task_no_key"});l.emit("get_abort_array",[{Key:o,UploadId:a}])}}function d(e,t){var n=e.Bucket,r=e.Region,o=e.Key,i=e.AbortArray,a=e.AsyncLimit||1,s=this,u=0,c=new Array(i.length);p.eachLimit(i,a,function(t,i){var a=u;if(o&&o!=t.Key)return i(null,{KeyNotMatch:!0});var l=t.UploadId||t.UploadID;s.multipartAbort({Bucket:n,Region:r,Key:t.Key,Headers:e.Headers,UploadId:l},function(e,o){var s={Bucket:n,Region:r,Key:t.Key,UploadId:l};c[a]={error:e,task:s},i(null)}),u++},function(e){if(e)return t(e);for(var n=[],r=[],o=0,i=c.length;o=r?"sliceUploadFile":"putObject",params:e,callback:m})}),n._addTasks(d)}var p=n(16),h=n(2).EventProxy,g=n(0),y={sliceUploadFile:r,abortUploadTask:l,uploadFiles:f};g.each(y,function(e,n){t[n]=g.apiWrapper(n,e)})},function(e,t){var n=function(e,t,n,r){if(r=r||function(){},!e.length||t<=0)return r();var o=0,i=0,a=0;!function s(){if(o>=e.length)return r();for(;a=e.length?r():s())})}()},r=function(e,t,n){var r=function(o){t(function(t,i){t&&o-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e?n&&r:!(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e)||n&&r&&o},x=function(e,t){return function(n,r){"function"==typeof n&&(r=n,n={}),n=a({},n);var o=n.Headers||{};n&&"object"==typeof n&&(!function(){for(var e in n)n.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(o[e]=n[e])}(),o["x-cos-mfa"]=n.MFA,o["Content-MD5"]=n.ContentMD5,o["Content-Length"]=n.ContentLength,o["Content-Type"]=n.ContentType,o.Expect=n.Expect,o.Expires=n.Expires,o["Cache-Control"]=n.CacheControl,o["Content-Disposition"]=n.ContentDisposition,o["Content-Encoding"]=n.ContentEncoding,o.Range=n.Range,o["If-Modified-Since"]=n.IfModifiedSince,o["If-Unmodified-Since"]=n.IfUnmodifiedSince,o["If-Match"]=n.IfMatch,o["If-None-Match"]=n.IfNoneMatch,o["x-cos-copy-source"]=n.CopySource,o["x-cos-copy-source-Range"]=n.CopySourceRange,o["x-cos-metadata-directive"]=n.MetadataDirective,o["x-cos-copy-source-If-Modified-Since"]=n.CopySourceIfModifiedSince,o["x-cos-copy-source-If-Unmodified-Since"]=n.CopySourceIfUnmodifiedSince,o["x-cos-copy-source-If-Match"]=n.CopySourceIfMatch,o["x-cos-copy-source-If-None-Match"]=n.CopySourceIfNoneMatch,o["x-cos-server-side-encryption"]=n.ServerSideEncryption,o["x-cos-acl"]=n.ACL,o["x-cos-grant-read"]=n.GrantRead,o["x-cos-grant-write"]=n.GrantWrite,o["x-cos-grant-full-control"]=n.GrantFullControl,o["x-cos-grant-read-acp"]=n.GrantReadAcp,o["x-cos-grant-write-acp"]=n.GrantWriteAcp,o["x-cos-storage-class"]=n.StorageClass,n.Headers=g(o));var i=function(e){return e&&e.headers&&(e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},s=function(e,t){r&&r(i(e),i(t))};if("getService"!==e&&"abortUploadTask"!==e){if(!k(e,n))return void s({error:"lack of required params"});if(n.Region&&-1===n.Region.indexOf("-"))return void s({error:"Region format error, find help here: https://cloud.tencent.com/document/product/436/6224"});if(n.Region&&n.Region.indexOf("cos.")>-1)return void s({error:'Region should not be start with "cos."'});if(n.Bucket){if(!/^(.+)-(\d+)$/.test(n.Bucket))if(n.AppId)n.Bucket=n.Bucket+"-"+n.AppId;else{if(!this.options.AppId)return void s({error:'Bucket should format as "test-1250000000".'});n.Bucket=n.Bucket+"-"+this.options.AppId}n.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete n.AppId)}n.Key&&"/"===n.Key.substr(0,1)&&(n.Key=n.Key.substr(1))}var u=t.call(this,n,s);if("getAuth"===e||"getObjectUrl"===e)return u}},b=function(e,t){function n(){if(o=0,t&&"function"==typeof t){r=Date.now();var n,a=Math.max(0,Math.round((s-i)/((r-u)/1e3)*100)/100);n=0===s&&0===e?1:Math.round(s/e*100)/100||0,u=r,i=s;try{t({loaded:s,total:e,speed:a,percent:n})}catch(e){}}}var r,o,a=this,i=0,s=0,u=Date.now();return function(t,r){if(t&&(s=t.loaded,e=t.total),r)clearTimeout(o),n();else{if(o)return;o=setTimeout(n,a.options.ProgressInterval)}}},T=function(e,t,n){return e.slice?e.slice(t,n):e.mozSlice?e.mozSlice(t,n):e.webkitSlice?e.webkitSlice(t,n):void 0},R={apiWrapper:x,getAuth:h,xml2json:f,json2xml:p,md5:l,clearKey:g,getFileMd5:v,binaryBase64:m,extend:a,isArray:i,each:s,map:u,filter:c,clone:o,uuid:C,throttleOnProgress:b,isBrowser:!!t.document,fileSlice:T};e.exports=R}).call(t,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=function(e){var t={},n=function(e){return!t[e]&&(t[e]=[]),t[e]};e.on=function(e,t){"task-list-update"===e&&console.warn('warning: Event "'+e+'" has been deprecated. Please use "list-update" instead.'),n(e).push(t)},e.off=function(e,t){for(var r=n(e),o=r.length-1;o>=0;o--)t===r[o]&&r.splice(o,1)},e.emit=function(e,t){for(var r=n(e).map(function(e){return e}),o=0;o>>32-t}function n(e,t){var n,r,o,a,i;return o=2147483648&e,a=2147483648&t,n=1073741824&e,r=1073741824&t,i=(1073741823&e)+(1073741823&t),n&r?2147483648^i^o^a:n|r?1073741824&i?3221225472^i^o^a:1073741824^i^o^a:i^o^a}function r(e,t,n){return e&t|~e&n}function o(e,t,n){return e&n|t&~n}function a(e,t,n){return e^t^n}function i(e,t,n){return t^(e|~n)}function s(e,o,a,i,s,u,c){return e=n(e,n(n(r(o,a,i),s),c)),n(t(e,u),o)}function u(e,r,a,i,s,u,c){return e=n(e,n(n(o(r,a,i),s),c)),n(t(e,u),r)}function c(e,r,o,i,s,u,c){return e=n(e,n(n(a(r,o,i),s),c)),n(t(e,u),r)}function l(e,r,o,a,s,u,c){return e=n(e,n(n(i(r,o,a),s),c)),n(t(e,u),r)}function d(e){var t,n,r="",o="";for(n=0;n<=3;n++)t=e>>>8*n&255,o="0"+t.toString(16),r+=o.substr(o.length-2,2);return r}var f,p,h,g,y,v,m,C,k,x=Array();for(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}(e),x=function(e){for(var t,n=e.length,r=n+8,o=(r-r%64)/64,a=16*(o+1),i=Array(a-1),s=0,u=0;u>>29,i}(e),v=1732584193,m=4023233417,C=2562383102,k=271733878,f=0;f>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r>>2]>>>24-r%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new i.init(n,t/2)}},c=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new i.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=r.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*a,o=e.min(4*t,o),t){for(var u=0;uc;c++){if(16>c)a[c]=0|e[t+c];else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}l=(r<<5|r>>>27)+u+a[c],l=20>c?l+(1518500249+(o&i|~o&s)):40>c?l+(1859775393+(o^i^s)):60>c?l+((o&i|o&s|i&s)-1894007588):l+((o^i^s)-899497514),u=s,s=i,i=o<<30|o>>>2,o=r,r=l}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=o._createHelper(t),e.HmacSHA1=o._createHmacHelper(t)}(),function(){var e=r,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var r=e.blockSize,o=4*r;n.sigBytes>o&&(n=e.finalize(n)),n.clamp();for(var a=this._oKey=n.clone(),i=this._iKey=n.clone(),s=a.words,u=i.words,c=0;c>>2]>>>24-a%4*8&255,s=t[a+1>>>2]>>>24-(a+1)%4*8&255,u=t[a+2>>>2]>>>24-(a+2)%4*8&255,c=i<<16|s<<8|u,l=0;l<4&&a+.75*l>>6*(3-l)&63));var d=r.charAt(64);if(d)for(;o.length%4;)o.push(d);return o.join("")},parse:function(e){var t=e.length,r=this._map,o=r.charAt(64);if(o){var a=e.indexOf(o);-1!=a&&(t=a)}for(var i=[],s=0,u=0;u>>6-u%4*2;i[s>>>2]|=(c|l)<<24-s%4*8,s++}return n.create(i,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.exports=r},function(e,t){var n=function(){this.version="1.3.5";var e={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},t=new RegExp(/(?!xmlns)^.*:/),r=new RegExp(/^\s+|\s+$/g);return this.grokType=function(e){return/^\s*$/.test(e)?null:/^(?:true|false)$/i.test(e)?"true"===e.toLowerCase():isFinite(e)?parseFloat(e):e},this.parseString=function(e,t){if(e){var n=this.stringToXML(e);return n.getElementsByTagName("parsererror").length?null:this.parseXML(n,t)}return null},this.parseXML=function(o,a){for(var i in a)e[i]=a[i];var s={},u=0,c="";if(o.childNodes.length)for(var l,d,f,p=0;p/g,">").replace(/'/g,"'").replace(/"/g,""").replace(o,"")}var r=new RegExp("^([^a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�])|^((x|X)(m|M)(l|L))|([^a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�-.0-9·̀-ͯ‿⁀])","g"),o=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,a=function(e){var t=[];if(e instanceof Object)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},i=function(e,t){var o=function(e,n,o,a,i){var s=void 0!==t.indent?t.indent:"\t",u=t.prettyPrint?"\n"+new Array(a).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(r,"_"));var c=[u,"<",e,o||""];return n&&n.length>0?(c.push(">"),c.push(n),i&&c.push(u),c.push("")):c.push("/>"),c.join("")};return function e(r,i,s){var u=typeof r;switch((Array.isArray?Array.isArray(r):r instanceof Array)?u="array":r instanceof Date&&(u="date"),u){case"array":var c=[];return r.map(function(t){c.push(e(t,1,s+1))}),t.prettyPrint&&c.push("\n"),c.join("");case"date":return r.toJSON?r.toJSON():r+"";case"object":var l=[];for(var d in r)if(r[d]instanceof Array)for(var f in r[d])l.push(o(d,e(r[d][f],0,s+1),null,s+1,a(r[d][f]).length));else l.push(o(d,e(r[d],0,s+1),null,s+1));return t.prettyPrint&&l.length>0&&l.push("\n"),l.join("");case"function":return r();default:return t.escape?n(r):""+r}}(e,0,0)},s=function(e){var t=['"),t.join("")};e.exports=function(e,t){t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" "});var n=this.Buffer||function(){};if("string"==typeof e||e instanceof n)try{e=JSON.parse(e.toString())}catch(e){return!1}var r="",o="";return t&&("object"==typeof t?(t.xmlHeader&&(r=s(!!t.xmlHeader.standalone)),void 0!==t.docType&&(o="")):r=s()),t=t||{},[r,t.prettyPrint&&o?"\n":"",o,i(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t,n){var r=n(0),o=function(e){var t=[],n={},o=0,a=0,i={};r.each(["putObject","sliceUploadFile"],function(t){i[t]=e[t],e[t]=function(n,r){e._addTask(t,n,r)}});var s=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),t},u=function(){e.emit("task-list-update",{list:r.map(t,s)}),e.emit("list-update",{list:r.map(t,s)})},c=function(){if(a-1?"{{Bucket}}-{{AppId}}.{{Region}}.myqcloud.com":"{{Bucket}}-{{AppId}}.cos.{{Region}}.myqcloud.com"),o=o.replace(/\{\{AppId\}\}/gi,r).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,a).replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(o)||(o=u+"//"+o),"/"===o.slice(-1)&&(o=o.slice(0,-1));var c=o;return i&&(c+="/"+encodeURIComponent(i).replace(/%2F/g,"/")),s&&(c+=s),e.isLocation&&(c=c.replace(/^https?:\/\//,"")),c}function X(e,t){var n=this;if(n.options.getAuthorization)n.options.getAuthorization.call(n,{Method:e.Method,Key:e.Key},function(e){"string"==typeof e&&(e={Authorization:e}),t&&t(e)});else{if(!n.options.getSTS){var r=Q.getAuth({SecretId:e.SecretId||n.options.SecretId,SecretKey:e.SecretKey||n.options.SecretKey,Method:e.Method,Key:e.Key});return t&&t({Authorization:r}),r}var o=e.Bucket||"";n._StsMap=n._StsMap||{};var a=n._StsMap[o]||{},i=function(){var n=Q.getAuth({SecretId:a.SecretId,SecretKey:a.SecretKey,Method:e.Method,Key:e.Key}),r={Authorization:n,XCosSecurityToken:a.XCosSecurityToken||"",Token:a.Token||"",ClientIP:a.ClientIP||"",ClientUA:a.ClientUA||""};t&&t(r)};a.ExpiredTime&&a.ExpiredTime-(Date.now()/1e3>60)?i():n.options.getSTS.call(n,{Bucket:o},function(e){a=n._StsMap[o]=e||{},i()})}return""}function V(e,t){var n=this;X.call(n,{Method:e.method,Key:e.Key},function(r){e.AuthData=r,$.call(n,e,t)})}function $(e,t){var n=this,r=e.TaskId;if(!r||n._isRunningTask(r)){var o=e.Bucket,a=e.Region,i=e.Key,s=e.action,u=e.method||"GET",c=e.headers||{},l=e.url,d=e.body,f=e.json,p=e.rawBody,h=e.qs;!h&&(h={}),h.versionId=e.VersionId;var g={url:l||W({protocol:n.options.Protocol,domain:n.options.Domain,bucket:o,region:a,object:i,action:s}),method:u,headers:c||{},qs:h,body:d,json:f};if(g.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(g.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(g.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(g.headers.clientUA=e.AuthData.ClientUA),e.AuthData.XCosSecurityToken&&(g.headers["x-cos-security-token"]=e.AuthData.XCosSecurityToken),g.headers&&(g.headers=Q.clearKey(g.headers)),g.qs&&(g.qs=Q.clearKey(g.qs)),g=Q.clearKey(g),e.onProgress&&"function"==typeof e.onProgress){var y=d&&(d.size||d.length)||0;g.onProgress=function(t){if(!r||n._isRunningTask(r)){var o=t?t.loaded:0;e.onProgress({loaded:o,total:y})}}}var v=Y(g,function(e,o,a){var i,s=function(e,a){if(r&&n.off("inner-kill-task",m),!i){i=!0;var s={};o&&o.statusCode&&(s.statusCode=o.statusCode),o&&o.headers&&(s.headers=o.headers),e?(e=Q.extend(e||{},s),t(e,null)):(a=Q.extend(a||{},s),t(null,a))}};if(e)return void s({error:e});var u;try{u=Q.xml2json(a)||{}}catch(e){u=a||{}}var c=o.statusCode;return 2!==Math.floor(c/100)?void s({error:u.Error||u}):(p&&(u={},u.body=a),u.Error?void s({error:u.Error}):void s(null,u))}),m=function(e){e.TaskId===r&&(v&&v.abort&&v.abort(),n.off("inner-kill-task",m))};r&&n.on("inner-kill-task",m)}}var J=n(3),Y=n(14),Q=n(0),Z={getBucket:o,headBucket:r,deleteBucket:a,getBucketAcl:i,putBucketAcl:s,getBucketCors:u,putBucketCors:c,deleteBucketCors:l,getBucketLocation:f,putBucketTagging:g,getBucketTagging:h,deleteBucketTagging:y,getBucketPolicy:p,putBucketPolicy:d,getBucketLifecycle:m,putBucketLifecycle:v,deleteBucketLifecycle:C,putBucketVersioning:k,getBucketVersioning:x,putBucketReplication:b,getBucketReplication:T,deleteBucketReplication:R,getObject:A,headObject:S,listObjectVersions:w,putObject:B,deleteObject:P,getObjectAcl:E,putObjectAcl:_,optionsObject:j,putObjectCopy:L,deleteMultipleObject:D,restoreObject:O,uploadPartCopy:I,multipartInit:M,multipartUpload:U,multipartComplete:H,multipartList:K,multipartListPart:F,multipartAbort:N,getObjectUrl:q,getAuth:z};Q.each(Z,function(e,n){t[n]=Q.apiWrapper(n,e)})}).call(t,n(1))},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(t);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l=0?(d=g.substr(0,y),f=g.substr(y+1)):(d=g,f=""),p=decodeURIComponent(d),h=decodeURIComponent(f),r(i,p)?o(i[p])?i[p].push(h):i[p]=[i[p],h]:i[p]=h}return i};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r0&&t-1 in e))}function t(e){var t=M[e]={};return B.each(e.match(O)||[],function(e,n){t[n]=!0}),t}function n(){I.addEventListener?(I.removeEventListener("DOMContentLoaded",r,!1),window.removeEventListener("load",r,!1)):(I.detachEvent("onreadystatechange",r),window.detachEvent("onload",r))}function r(){(I.addEventListener||"load"===event.type||"complete"===I.readyState)&&(n(),B.ready())}function o(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(F,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:K.test(n)?B.parseJSON(n):n)}catch(e){}B.data(e,t,n)}else n=void 0}return n}function a(e){var t;for(t in e)if(("data"!==t||!B.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function i(e,t,n,r){if(B.acceptData(e)){var o,a,i=B.expando,s=e.nodeType,u=s?B.cache:e,c=s?e[i]:e[i]&&i;if(c&&u[c]&&(r||u[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[i]=m.pop()||B.guid++:i),u[c]||(u[c]=s?{}:{toJSON:B.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[c]=B.extend(u[c],t):u[c].data=B.extend(u[c].data,t)),a=u[c],r||(a.data||(a.data={}),a=a.data),void 0!==n&&(a[B.camelCase(t)]=n),"string"==typeof t?null==(o=a[t])&&(o=a[B.camelCase(t)]):o=a,o}}function s(e,t,n){if(B.acceptData(e)){var r,o,i=e.nodeType,s=i?B.cache:e,u=i?e[B.expando]:B.expando;if(s[u]){if(t&&(r=n?s[u]:s[u].data)){B.isArray(t)?t=t.concat(B.map(t,B.camelCase)):t in r?t=[t]:(t=B.camelCase(t),t=t in r?[t]:t.split(" ")),o=t.length;for(;o--;)delete r[t[o]];if(n?!a(r):!B.isEmptyObject(r))return}(n||(delete s[u].data,a(s[u])))&&(i?B.cleanData([e],!0):w.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}function u(){return!0}function c(){return!1}function l(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,a=t.toLowerCase().match(O)||[];if(B.isFunction(n))for(;r=a[o++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function d(e,t,n,r){function o(s){var u;return a[s]=!0,B.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||i||a[c]?i?!(u=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),u}var a={},i=e===ie;return o(t.dataTypes[0])||!a["*"]&&o("*")}function f(e,t){var n,r,o=B.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((o[r]?e:n||(n={}))[r]=t[r]);return n&&B.extend(!0,e,n),e}function p(e,t,n){for(var r,o,a,i,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(i in s)if(s[i]&&s[i].test(o)){u.unshift(i);break}if(u[0]in n)a=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){a=i;break}r||(r=i)}a=a||r}if(a)return a!==u[0]&&u.unshift(a),n[a]}function h(e,t,n,r){var o,a,i,s,u,c={},l=e.dataTypes.slice();if(l[1])for(i in e.converters)c[i.toLowerCase()]=e.converters[i];for(a=l.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=a,a=l.shift())if("*"===a)a=u;else if("*"!==u&&u!==a){if(!(i=c[u+" "+a]||c["* "+a]))for(o in c)if(s=o.split(" "),s[1]===a&&(i=c[u+" "+s[0]]||c["* "+s[0]])){!0===i?i=c[o]:!0!==c[o]&&(a=s[0],l.unshift(s[1]));break}if(!0!==i)if(i&&e.throws)t=i(t);else try{t=i(t)}catch(e){return{state:"parsererror",error:i?e:"No conversion from "+u+" to "+a}}}return{state:"success",data:t}}function g(e,t,n,r){var o;if(B.isArray(t))B.each(t,function(t,o){n||ce.test(e)?r(e,o):g(e+"["+("object"==typeof o?t:"")+"]",o,n,r)});else if(n||"object"!==B.type(t))r(e,t);else for(o in t)g(e+"["+o+"]",t[o],n,r)}function y(){try{return new window.XMLHttpRequest}catch(e){}}function v(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}var m=[],C=m.slice,k=m.concat,x=m.push,b=m.indexOf,T={},R=T.toString,S=T.hasOwnProperty,w={},A="1.11.1 -css,-css/addGetHookIf,-css/curCSS,-css/defaultDisplay,-css/hiddenVisibleSelectors,-css/support,-css/swap,-css/var/cssExpand,-css/var/isHidden,-css/var/rmargin,-css/var/rnumnonpx,-effects,-effects/Tween,-effects/animatedSelector,-effects/support,-dimensions,-offset,-deprecated,-event-alias,-wrap",B=function(e,t){return new B.fn.init(e,t)},P=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,E=/^-ms-/,_=/-([\da-z])/gi,j=function(e,t){return t.toUpperCase()};B.fn=B.prototype={jquery:A,constructor:B,selector:"",length:0,toArray:function(){return C.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:C.call(this)},pushStack:function(e){var t=B.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return B.each(this,e,t)},map:function(e){return this.pushStack(B.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(C.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==B.type(e)||e.nodeType||B.isWindow(e))return!1;try{if(e.constructor&&!S.call(e,"constructor")&&!S.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(w.ownLast)for(t in e)return S.call(e,t);for(t in e);return void 0===t||S.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?T[R.call(e)]||"object":typeof e},globalEval:function(e){e&&B.trim(e)&&(window.execScript||function(e){window.eval.call(window,e)})(e)},camelCase:function(e){return e.replace(E,"ms-").replace(_,j)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(t,n,r){var o=0,a=t.length,i=e(t);if(r){if(i)for(;o)[^>]*|#([\w-]*))$/;(B.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:D.exec(e))||!n[1]&&t)return!t||t.jquery?(t||L).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof B?t[0]:t,B.merge(this,B.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:I,!0)),rsingleTag.test(n[1])&&B.isPlainObject(t))for(n in t)B.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=I.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return L.find(e);this.length=1,this[0]=r}return this.context=I,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):B.isFunction(e)?void 0!==L.ready?L.ready(e):e(B):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),B.makeArray(e,this))}).prototype=B.fn,L=B(I);var O=/\S+/g,M={};B.Callbacks=function(e){e="string"==typeof e?M[e]||t(e):B.extend({},e);var n,r,o,a,i,s,u=[],c=!e.once&&[],l=function(t){for(r=e.memory&&t,o=!0,i=s||0,s=0,a=u.length,n=!0;u&&i-1;)u.splice(r,1),n&&(r<=a&&a--,r<=i&&i--)}),this},has:function(e){return e?B.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],a=0,this},disable:function(){return u=c=r=void 0,this},disabled:function(){return!u},lock:function(){return c=void 0,r||d.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!u||o&&!c||(t=t||[],t=[e,t.slice?t.slice():t],n?c.push(t):l(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!o}};return d},B.extend({Deferred:function(e){var t=[["resolve","done",B.Callbacks("once memory"),"resolved"],["reject","fail",B.Callbacks("once memory"),"rejected"],["notify","progress",B.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return B.Deferred(function(n){B.each(t,function(t,a){var i=B.isFunction(e[t])&&e[t];o[a[1]](function(){var e=i&&i.apply(this,arguments);e&&B.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a[0]+"With"](this===r?n.promise():this,i?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?B.extend(e,r):r}},o={};return r.pipe=r.then,B.each(t,function(e,a){var i=a[2],s=a[3];r[a[1]]=i.add,s&&i.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),o[a[0]]=function(){return o[a[0]+"With"](this===o?r:this,arguments),this},o[a[0]+"With"]=i.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,r,o=0,a=C.call(arguments),i=a.length,s=1!==i||e&&B.isFunction(e.promise)?i:0,u=1===s?e:B.Deferred(),c=function(e,n,r){return function(o){n[e]=this,r[e]=arguments.length>1?C.call(arguments):o,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(i>1)for(t=new Array(i),n=new Array(i),r=new Array(i);o0||(U.resolveWith(I,[B]),B.fn.triggerHandler&&(B(I).triggerHandler("ready"),B(I).off("ready")))}}}),B.ready.promise=function(e){if(!U)if(U=B.Deferred(),"complete"===I.readyState)setTimeout(B.ready);else if(I.addEventListener)I.addEventListener("DOMContentLoaded",r,!1),window.addEventListener("load",r,!1);else{I.attachEvent("onreadystatechange",r),window.attachEvent("onload",r);var t=!1;try{t=null==window.frameElement&&I.documentElement}catch(e){}t&&t.doScroll&&function e(){if(!B.isReady){try{t.doScroll("left")}catch(t){return setTimeout(e,50)}n(),B.ready()}}()}return U.promise(e)};var H;for(H in B(w))break;w.ownLast="0"!==H,w.inlineBlockNeedsLayout=!1,B(function(){var e,t,n,r;(n=I.getElementsByTagName("body")[0])&&n.style&&(t=I.createElement("div"),r=I.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",w.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=I.createElement("div");if(null==w.deleteExpando){w.deleteExpando=!0;try{delete e.test}catch(e){w.deleteExpando=!1}}e=null}(),B.acceptData=function(e){var t=B.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)};var K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,F=/([A-Z])/g;B.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?B.cache[e[B.expando]]:e[B.expando])&&!a(e)},data:function(e,t,n){return i(e,t,n)},removeData:function(e,t){return s(e,t)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return s(e,t,!0)}}),B.fn.extend({data:function(e,t){var n,r,a,i=this[0],s=i&&i.attributes;if(void 0===e){if(this.length&&(a=B.data(i),1===i.nodeType&&!B._data(i,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=B.camelCase(r.slice(5)),o(i,r,a[r])));B._data(i,"parsedAttrs",!0)}return a}return"object"==typeof e?this.each(function(){B.data(this,e)}):arguments.length>1?this.each(function(){B.data(this,e,t)}):i?o(i,e,B.data(i,e)):void 0},removeData:function(e){return this.each(function(){B.removeData(this,e)})}}),B.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=B._data(e,t),n&&(!r||B.isArray(n)?r=B._data(e,t,B.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=B.queue(e,t),r=n.length,o=n.shift(),a=B._queueHooks(e,t),i=function(){B.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete a.stop,o.call(e,i,a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return B._data(e,n)||B._data(e,n,{empty:B.Callbacks("once memory").add(function(){B._removeData(e,t+"queue"),B._removeData(e,n)})})}}),B.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length=0&&(p=f.split("."),f=p.shift(),p.sort()),a=f.indexOf(":")<0&&"on"+f,e=e[B.expando]?e:new B.Event(f,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:B.makeArray(t,[e]),u=B.event.special[f]||{},r||!u.trigger||!1!==u.trigger.apply(n,t))){if(!r&&!u.noBubble&&!B.isWindow(n)){for(s=u.delegateType||f,G.test(s+f)||(i=i.parentNode);i;i=i.parentNode)d.push(i),c=i;c===(n.ownerDocument||I)&&d.push(c.defaultView||c.parentWindow||window)}for(l=0;(i=d[l++])&&!e.isPropagationStopped();)e.type=l>1?s:u.bindType||f,o=(B._data(i,"events")||{})[e.type]&&B._data(i,"handle"),o&&o.apply(i,t),(o=a&&i[a])&&o.apply&&B.acceptData(i)&&(e.result=o.apply(i,t),!1===e.result&&e.preventDefault());if(e.type=f,!r&&!e.isDefaultPrevented()&&(!u._default||!1===u._default.apply(d.pop(),t))&&B.acceptData(n)&&a&&n[f]&&!B.isWindow(n)){c=n[a],c&&(n[a]=null),B.event.triggered=f;try{n[f]()}catch(e){}B.event.triggered=void 0,c&&(n[a]=c)}return e.result}},dispatch:function(e){e=B.event.fix(e);var t,n,r,o,a,i=[],s=C.call(arguments),u=(B._data(this,"events")||{})[e.type]||[],c=B.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(i=B.event.handlers.call(this,e,u),t=0;(o=i[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,a=0;(r=o.handlers[a++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(r.namespace)||(e.handleObj=r,e.data=r.data,void 0!==(n=((B.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,s))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,o,a,i=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(o=[],a=0;a=0:B.find(n,this,null,[u]).length),o[n]&&o.push(r);o.length&&i.push({elem:u,handlers:o})}return s0?4:0,o=e>=200&&e<300||304===e,n&&(k=p(f,R,n)),k=h(f,k,R,o),o?(f.ifModified&&(x=R.getResponseHeader("Last-Modified"),x&&(B.lastModified[a]=x),(x=R.getResponseHeader("etag"))&&(B.etag[a]=x)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=k.state,l=k.data,d=k.error,o=!d)):(d=T,!e&&T||(T="error",e<0&&(e=0))),R.status=e,R.statusText=(t||T)+"",o?v.resolveWith(g,[l,T,R]):v.rejectWith(g,[R,T,d]),R.statusCode(C),C=void 0,u&&y.trigger(o?"ajaxSuccess":"ajaxError",[R,f,o?l:d]),m.fireWith(g,[R,T]),u&&(y.trigger("ajaxComplete",[R,f]),--B.active||B.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,o,a,i,s,u,c,l,f=B.ajaxSetup({},t),g=f.context||f,y=f.context&&(g.nodeType||g.jquery)?B(g):B.event,v=B.Deferred(),m=B.Callbacks("once memory"),C=f.statusCode||{},k={},x={},b=0,T="canceled",R={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!l)for(l={};t=ee.exec(i);)l[t[1].toLowerCase()]=t[2];t=l[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,k[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)C[t]=[C[t],e[t]];else R.always(e[R.status]);return this},abort:function(e){var t=e||T;return c&&c.abort(t),n(0,t),this}};if(v.promise(R).complete=m.add,R.success=R.done,R.error=R.fail,f.url=((e||f.url||Y)+"").replace(Q,"").replace(re,J[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=B.trim(f.dataType||"*").toLowerCase().match(O)||[""],null==f.crossDomain&&(r=oe.exec(f.url.toLowerCase()),f.crossDomain=!(!r||r[1]===J[1]&&r[2]===J[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(J[3]||("http:"===J[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=B.param(f.data,f.traditional)),d(ae,f,t,R),2===b)return R;u=f.global,u&&0==B.active++&&B.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!ne.test(f.type),a=f.url,f.hasContent||(f.data&&(a=f.url+=(V.test(a)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=Z.test(a)?a.replace(Z,"$1_="+X++):a+(V.test(a)?"&":"?")+"_="+X++)),f.ifModified&&(B.lastModified[a]&&R.setRequestHeader("If-Modified-Since",B.lastModified[a]),B.etag[a]&&R.setRequestHeader("If-None-Match",B.etag[a])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&R.setRequestHeader("Content-Type",f.contentType);for(o in f.headers)R.setRequestHeader(o,f.headers[o]);if(f.beforeSend&&(!1===f.beforeSend.call(g,R,f)||2===b))return R.abort();T="abort";for(o in{success:1,error:1,complete:1})R[o](f[o]);if(c=d(ie,f,t,R)){R.readyState=1,u&&y.trigger("ajaxSend",[R,f]),f.async&&f.timeout>0&&(s=setTimeout(function(){R.abort("timeout")},f.timeout));try{b=1,c.send(k,n)}catch(e){if(!(b<2))throw e;n(-1,e)}}else n(-1,"No Transport");return R},getJSON:function(e,t,n){return B.get(e,t,n,"json")},getScript:function(e,t){return B.get(e,void 0,t,"script")}}),B.each(["get","post"],function(e,t){B[t]=function(e,n,r,o){return B.isFunction(n)&&(o=o||r,r=n,n=void 0),B.ajax({url:e,type:t,dataType:o,data:n,success:r})}}),B.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){B.fn[t]=function(e){return this.on(t,e)}}),B._evalUrl=function(e){return B.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};var ue=/%20/g,ce=/\[\]$/,le=/\r?\n/g,de=/^(?:submit|button|image|reset|file)$/i,fe=/^(?:input|select|textarea|keygen)/i;B.param=function(e,t){var n,r=[],o=function(e,t){t=B.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=B.ajaxSettings&&B.ajaxSettings.traditional),B.isArray(e)||e.jquery&&!B.isPlainObject(e))B.each(e,function(){o(this.name,this.value)});else for(n in e)g(n,e[n],t,o);return r.join("&").replace(ue,"+")},B.fn.extend({serialize:function(){return B.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=B.prop(this,"elements");return e?B.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!B(this).is(":disabled")&&fe.test(this.nodeName)&&!de.test(e)&&(this.checked||!rcheckableType.test(e))}).map(function(e,t){var n=B(this).val();return null==n?null:B.isArray(n)?B.map(n,function(e){return{name:t.name,value:e.replace(le,"\r\n")}}):{name:t.name,value:n.replace(le,"\r\n")}}).get()}}),B.ajaxSettings.xhr=void 0!==window.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&y()||v()}:y;var pe=0,he={},ge=B.ajaxSettings.xhr();window.ActiveXObject&&B(window).on("unload",function(){for(var e in he)he[e](void 0,!0)}),w.cors=!!ge&&"withCredentials"in ge,ge=w.ajax=!!ge,ge&&B.ajaxTransport(function(e){if(!e.crossDomain||w.cors){var t;return{send:function(n,r){var o,a=e.xhr(),i=++pe;if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)void 0!==n[o]&&a.setRequestHeader(o,n[o]+"");a.upload&&e.progress&&(a.upload.onprogress=e.progress),a.send(e.hasContent&&(e.body||e.data)||null),t=function(n,o){var s,u,c;if(t&&(o||4===a.readyState))if(delete he[i],t=void 0,a.onreadystatechange=B.noop,o)4!==a.readyState&&a.abort();else{c={},s=a.status,"string"==typeof a.responseText&&(c.text=a.responseText);try{u=a.statusText}catch(e){u=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&r(s,u,c,a.getAllResponseHeaders())},e.async?4===a.readyState?setTimeout(t):a.onreadystatechange=he[i]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),B.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return B.globalEval(e),e}}}),B.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),B.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=I.head||B("head")[0]||I.documentElement;return{send:function(r,o){t=I.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||o(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ye=[],ve=/(=)\?(?=&|$)|\?\?/;return B.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=ye.pop()||B.expando+"_"+X++;return this[e]=!0,e}}),B.ajaxPrefilter("json jsonp",function(e,t,n){var r,o,a,i=!1!==e.jsonp&&(ve.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ve.test(e.data)&&"data");if(i||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=B.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,i?e[i]=e[i].replace(ve,"$1"+r):!1!==e.jsonp&&(e.url+=(V.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||B.error(r+" was not called"),a[0]},e.dataTypes[0]="json",o=window[r],window[r]=function(){a=arguments},n.always(function(){window[r]=o,e[r]&&(e.jsonpCallback=t.jsonpCallback,ye.push(r)),a&&B.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),B.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||I;var r=rsingleTag.exec(e),o=!n&&[];return r?[t.createElement(r[1])]:(r=B.buildFragment([e],t,o),o&&o.length&&B(o).remove(),B.merge([],r.childNodes))},B}(),a=function(e,t){if(e=o.extend(!0,{headers:{},qs:{}},e),e.type=e.method,delete e.method,e.onProgress&&(e.progress=e.onProgress,delete e.onProgress),e.qs){var n=r.stringify(e.qs);n&&(e.url+=(-1===e.url.indexOf("?")?"?":"&")+n),delete e.qs}if(e.json&&(e.data=e.body,delete e.json,delete e.body,!e.headers&&(e.headers={}),e.headers["Content-Type"]="application/json"),e.body&&e.body.constructor!==window.File&&e.body.constructor!==window.Blob&&(e.data=e.body,delete e.body),e.headers){var a=e.headers;delete e.headers,e.beforeSend=function(e){for(var t in a)a.hasOwnProperty(t)&&"content-length"!==t.toLowerCase()&&"user-agent"!==t.toLowerCase()&&"origin"!==t.toLowerCase()&&"host"!==t.toLowerCase()&&e.setRequestHeader(t,a[t])}}var i=function(e){var t={};return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){if(e){var n=e.indexOf(":"),r=e.substr(0,n).trim().toLowerCase(),o=e.substr(n+1).trim();t[r]=o}}),{statusCode:e.status,statusMessage:e.statusText,headers:t}};return e.success=function(e,n,r){t(null,i(r),e)},e.error=function(e){e.responseText?t(null,i(e),e.responseText):t(e.statusText,i(e),e.responseText)},e.dataType="text",o.ajax(e)};e.exports=a},function(e,t,n){function r(e,t){var n,r=new h,a=e.TaskId,i=e.Bucket,u=e.Region,l=e.Key,d=e.Body,f=e.ChunkSize||e.SliceSize||this.options.ChunkSize,p=e.AsyncLimit,y=e.StorageClass||"Standard",v=e.ServerSideEncryption,m=this,C=e.onProgress,k=e.onHashProgress;r.on("error",function(e){if(m._isRunningTask(a))return t(e)}),r.on("upload_complete",function(e){t(null,e)}),r.on("upload_slice_complete",function(e){c.call(m,{Bucket:i,Region:u,Key:l,UploadId:e.UploadId,SliceList:e.SliceList},function(e,t){if(m._isRunningTask(a))return e?r.emit("error",e):void r.emit("upload_complete",t)})}),r.on("get_upload_data_finish",function(e){s.call(m,{TaskId:a,Bucket:i,Region:u,Key:l,Body:d,FileSize:n,SliceSize:f,AsyncLimit:p,ServerSideEncryption:v,UploadData:e,onProgress:C},function(e,t){if(m._isRunningTask(a))return e?r.emit("error",e):void r.emit("upload_slice_complete",t)})}),r.on("get_file_size_finish",function(){if(e.UploadData.UploadId)r.emit("get_upload_data_finish",e.UploadData);else{var t=g.extend({},e);t=g.extend(t,{TaskId:a,Bucket:i,Region:u,Key:l,Headers:e.Headers,StorageClass:y,Body:d,FileSize:n,SliceSize:f,onHashProgress:k}),o.call(m,t,function(t,n){if(m._isRunningTask(a)){if(t)return r.emit("error",t);e.UploadData.UploadId=n.UploadId,e.UploadData.PartList=n.PartList,r.emit("get_upload_data_finish",e.UploadData)}})}}),n=d.size||e.ContentLength,function(){for(var e=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],t=1048576,r=0;rv)return t(null,!1);if(n>1){if(Math.max(e[0].Size,e[1].Size)!==y)return t(null,!1)}var r=function(o){if(o=h?c%l||l:l),!e.Uploaded}),C=g.throttleOnProgress.call(n,c,e.onProgress);p.eachLimit(m,d,function(e,t){if(n._isRunningTask(r)){var d=e.PartNumber,p=Math.min(c,e.PartNumber*l)-(e.PartNumber-1)*l,h=0;u.call(n,{TaskId:r,Bucket:o,Region:a,Key:i,SliceSize:l,FileSize:c,PartNumber:d,ServerSideEncryption:v,Body:f,UploadData:s,onProgress:function(e){y+=e.loaded-h,h=e.loaded,C({loaded:y,total:c})}},function(o,a){n._isRunningTask(r)&&(o||a.ETag||(o='get ETag error, please add "ETag" to CORS ExposeHeader setting.'),o?y-=h:(y+=p-h,e.ETag=a.ETag),t(o||null,a))})}},function(e){if(n._isRunningTask(r)){if(C(null,!0),e)return t(e);t(null,{UploadId:s.UploadId,SliceList:s.PartList})}})}function u(e,t){var n=e.TaskId,r=e.Bucket,o=e.Region,a=e.Key,i=e.FileSize,s=e.Body,u=1*e.PartNumber,c=e.SliceSize,l=e.ServerSideEncryption,d=e.UploadData,f=this,h=c*(u-1),y=c,v=h+c;v>i&&(v=i,y=v-h);var m=g.fileSlice(s,h,v),C=d.PartList[u-1],k=C.ETag;p.retry(3,function(t){f._isRunningTask(n)&&f.multipartUpload({TaskId:n,Bucket:r,Region:o,Key:a,ContentLength:y,ContentSha1:k,PartNumber:u,UploadId:d.UploadId,ServerSideEncryption:l,Body:m,onProgress:e.onProgress},function(e,r){if(f._isRunningTask(n))return e?t(e):(C.Uploaded=!0,t(null,r))})},function(e,r){if(f._isRunningTask(n))return t(e,r)})}function c(e,t){var n=e.Bucket,r=e.Region,o=e.Key,a=e.UploadId,i=e.SliceList,s=this,u=i.map(function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}});s.multipartComplete({Bucket:n,Region:r,Key:o,UploadId:a,Parts:u},function(e,n){if(e)return t(e);t(null,n)})}function l(e,t){var n=e.Bucket,r=e.Region,o=e.Key,i=e.UploadId,s=e.Level||"task",u=e.AsyncLimit,c=this,l=new h;if(l.on("error",function(e){return t(e)}),l.on("get_abort_array",function(a){d.call(c,{Bucket:n,Region:r,Key:o,Headers:e.Headers,AsyncLimit:u,AbortArray:a},function(e,n){if(e)return t(e);t(null,n)})}),"bucket"===s)a.call(c,{Bucket:n,Region:r},function(e,n){if(e)return t(e);l.emit("get_abort_array",n.UploadList||[])});else if("file"===s){if(!o)return t({error:"abort_upload_task_no_key"});a.call(c,{Bucket:n,Region:r,Key:o},function(e,n){if(e)return t(e);l.emit("get_abort_array",n.UploadList||[])})}else{if("task"!==s)return t({error:"abort_unknown_level"});if(!i)return t({error:"abort_upload_task_no_id"});if(!o)return t({error:"abort_upload_task_no_key"});l.emit("get_abort_array",[{Key:o,UploadId:i}])}}function d(e,t){var n=e.Bucket,r=e.Region,o=e.Key,a=e.AbortArray,i=e.AsyncLimit||1,s=this,u=0,c=new Array(a.length);p.eachLimit(a,i,function(t,a){var i=u;if(o&&o!=t.Key)return a(null,{KeyNotMatch:!0});var l=t.UploadId||t.UploadID;s.multipartAbort({Bucket:n,Region:r,Key:t.Key,Headers:e.Headers,UploadId:l},function(e,o){var s={Bucket:n,Region:r,Key:t.Key,UploadId:l};c[i]={error:e,task:s},a(null)}),u++},function(e){if(e)return t(e);for(var n=[],r=[],o=0,a=c.length;o=r?"sliceUploadFile":"putObject",params:e,callback:m})}),n._addTasks(d)}var p=n(16),h=n(2).EventProxy,g=n(0),y={sliceUploadFile:r,abortUploadTask:l,uploadFiles:f};g.each(y,function(e,n){t[n]=g.apiWrapper(n,e)})},function(e,t){var n=function(e,t,n,r){if(r=r||function(){},!e.length||t<=0)return r();var o=0,a=0,i=0;!function s(){if(o>=e.length)return r();for(;i=e.length?r():s())})}()},r=function(e,t,n){var r=function(o){t(function(t,a){t&&o