diff --git a/dist/cos-js-sdk-v5.js b/dist/cos-js-sdk-v5.js index 13e9abd..a96056b 100644 --- a/dist/cos-js-sdk-v5.js +++ b/dist/cos-js-sdk-v5.js @@ -7,7 +7,7 @@ exports["COS"] = factory(); else root["COS"] = factory(); -})(this, function() { +})(typeof self !== 'undefined' ? self : this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -4474,6 +4474,7 @@ function getObject(params, callback) { * @param {String} params.GrantRead 赋予被授权者读的权限,格式 x-cos-grant-read: uin=" ",uin=" ",非必须 * @param {String} params.GrantWrite 赋予被授权者写的权限,格式 x-cos-grant-write: uin=" ",uin=" ",非必须 * @param {String} params.GrantFullControl 赋予被授权者读写权限,格式 x-cos-grant-full-control: uin=" ",uin=" ",非必须 + * @param {String} params.ServiceSideEncryption 支持按照指定的加密算法进行服务端数据加密,格式 x-cos-server-side-encryption: "AES256",非必须 * @param {Function} params.onProgress 上传进度回调函数 * @param {Function} callback 回调函数,必须 * @return {Object} err 请求失败的错误,如果请求成功,则为空。 @@ -4497,6 +4498,7 @@ function putObject(params, callback) { headers['x-cos-grant-write'] = params['GrantWrite']; headers['x-cos-grant-full-control'] = params['GrantFullControl']; headers['x-cos-storage-class'] = params['StorageClass']; + headers['x-cos-server-side-encryption'] = params['ServiceSideEncryption']; for (var key in params) { if (key.indexOf('x-cos-meta-') > -1) { @@ -4757,6 +4759,7 @@ function optionsObject(params, callback) { * @param {String} Expect 请求的特定的服务器行为 * @param {String} Expires 响应过期的日期和时间 * @param {String} ContentLanguage 指定内容语言 + * @param {String} params.ServiceSideEncryption 支持按照指定的加密算法进行服务端数据加密,格式 x-cos-server-side-encryption: "AES256",非必须 * @param {String} x-cos-meta-* 允许用户自定义的头部信息,将作为 Object 元数据返回。大小限制2K。 */ function putObjectCopy(params, callback) { @@ -4780,6 +4783,7 @@ function putObjectCopy(params, callback) { headers['Content-Type'] = params['ContentType']; headers['Expect'] = params['Expect']; headers['Expires'] = params['Expires']; + headers['x-cos-server-side-encryption'] = params['ServiceSideEncryption']; for (var key in params) { if (key.indexOf('x-cos-meta-') > -1) { @@ -4906,6 +4910,7 @@ function deleteMultipleObject(params, callback) { * @param {String} params.GrantWrite 赋予被授权者写的权限 ,非必须 * @param {String} params.GrantFullControl 赋予被授权者读写权限 ,非必须 * @param {String} params.StorageClass 设置Object的存储级别,枚举值:Standard,Standard_IA,Nearline,非必须 + * @param {String} params.ServiceSideEncryption 支持按照指定的加密算法进行服务端数据加密,格式 x-cos-server-side-encryption: "AES256",非必须 * @param {Function} callback 回调函数,必须 * @return {Object} err 请求失败的错误,如果请求成功,则为空。 * @return {Object} data 返回的数据 @@ -4924,6 +4929,7 @@ function multipartInit(params, callback) { headers['x-cos-grant-write'] = params['GrantWrite']; headers['x-cos-grant-full-control'] = params['GrantFullControl']; headers['x-cos-storage-class'] = params['StorageClass']; + headers['x-cos-server-side-encryption'] = params['ServiceSideEncryption']; for (var key in params) { if (key.indexOf('x-cos-meta-') > -1) { diff --git a/dist/cos-js-sdk-v5.min.js b/dist/cos-js-sdk-v5.min.js index 371ee6a..a49b754 100644 --- a/dist/cos-js-sdk-v5.min.js +++ b/dist/cos-js-sdk-v5.min.js @@ -1,7 +1,7 @@ -!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=5)}([function(e,t,n){"use strict";(function(t,r){function o(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function i(e){return c(e,function(e){return"object"==typeof e?i(e):e})}function a(e,t){return u(t,function(n,r){e[r]=t[r]}),e}function s(e){return e instanceof Array}function u(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function c(e,t){var n=s(e)?[]:{};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r],r));return n}function l(e,t){var n=s(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 f=n(10),d=n(11),h=n(12),p=n(13),g=function(e){e=e||{};var t=e.SecretId,n=e.SecretKey,r=(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,r,i=[],a=u(e);for(t=0;t-1||"deleteMultipleObject"===e||"multipartList"===e?n&&r:!(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e)||n&&r&&o},w=function(e,t){var n={gz:"ap-guangzhou",tj:"ap-beijing-2",sh:"ap-shanghai",cd:"ap-chengdu"};return function(r,o){if(o=o||function(){},"getService"!==e&&"abortUploadTask"!==e){if(!x(e,r))return void o({error:"lack of required params"});if(r.Region&&n[r.Region])return void o({error:"Region should be "+n[r.Region]});if(r.Region&&r.Region.indexOf("cos.")>-1)return void o({error:'Region should not be start with "cos."'});if(r.Bucket){if(!/^(.+)-(\d+)$/.test(r.Bucket))if(r.AppId)r.Bucket=r.Bucket+"-"+r.AppId;else{if(!this.options.AppId)return void o({error:'Bucket should format as "test-1250000000".'});r.Bucket=r.Bucket+"-"+this.options.AppId}r.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete r.AppId)}r.Key&&"/"===r.Key.substr(0,1)&&(r.Key=r.Key.substr(1))}var i=t.call(this,r,o);if("getAuth"===e||"getObjectUrl"===e)return i}},k=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)}}},R=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},T={apiWrapper:w,getAuth:g,xml2json:h,json2xml:p,md5:f,clearKey:y,getFileMd5:m,binaryBase64:C,extend:a,isArray:s,each:u,map:c,filter:l,clone:i,uuid:b,throttleOnProgress:k,isBrowser:!!r.document,fileSlice:R};e.exports=T}).call(t,n(2).Buffer,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,n){"use strict";(function(e){function r(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),i.alloc(+e)}function y(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return B(this,t,n);case"ascii":return _(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function C(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){function i(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(o){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var f=!0,d=0;do&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a239?4:i>223?3:i>191?2:1;if(o+s<=n){var u,c,l,f;switch(s){case 1:i<128&&(a=i);break;case 2:u=e[o+1],128==(192&u)&&(f=(31&i)<<6|63&u)>127&&(a=f);break;case 3:u=e[o+1],c=e[o+2],128==(192&u)&&128==(192&c)&&(f=(15&i)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=e[o+1],c=e[o+2],l=e[o+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(f=(15&i)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return E(r)}function E(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function U(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function O(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,o){return o||M(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,o){return o||M(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,n,r,52,8),n+8}function K(e){if(e=z(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function G(e){for(var t=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function W(e){return V.toByteArray(K(e))}function X(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function $(e){return e!==e}/*! +!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()}("undefined"!=typeof self?self: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=5)}([function(e,t,n){"use strict";(function(t,r){function o(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function i(e){return c(e,function(e){return"object"==typeof e?i(e):e})}function a(e,t){return u(t,function(n,r){e[r]=t[r]}),e}function s(e){return e instanceof Array}function u(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function c(e,t){var n=s(e)?[]:{};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r],r));return n}function l(e,t){var n=s(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 f=n(10),d=n(11),h=n(12),p=n(13),g=function(e){e=e||{};var t=e.SecretId,n=e.SecretKey,r=(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,r,i=[],a=u(e);for(t=0;t-1||"deleteMultipleObject"===e||"multipartList"===e?n&&r:!(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e)||n&&r&&o},w=function(e,t){var n={gz:"ap-guangzhou",tj:"ap-beijing-2",sh:"ap-shanghai",cd:"ap-chengdu"};return function(r,o){if(o=o||function(){},"getService"!==e&&"abortUploadTask"!==e){if(!x(e,r))return void o({error:"lack of required params"});if(r.Region&&n[r.Region])return void o({error:"Region should be "+n[r.Region]});if(r.Region&&r.Region.indexOf("cos.")>-1)return void o({error:'Region should not be start with "cos."'});if(r.Bucket){if(!/^(.+)-(\d+)$/.test(r.Bucket))if(r.AppId)r.Bucket=r.Bucket+"-"+r.AppId;else{if(!this.options.AppId)return void o({error:'Bucket should format as "test-1250000000".'});r.Bucket=r.Bucket+"-"+this.options.AppId}r.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete r.AppId)}r.Key&&"/"===r.Key.substr(0,1)&&(r.Key=r.Key.substr(1))}var i=t.call(this,r,o);if("getAuth"===e||"getObjectUrl"===e)return i}},k=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)}}},R=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},T={apiWrapper:w,getAuth:g,xml2json:h,json2xml:p,md5:f,clearKey:y,getFileMd5:m,binaryBase64:C,extend:a,isArray:s,each:u,map:c,filter:l,clone:i,uuid:b,throttleOnProgress:k,isBrowser:!!r.document,fileSlice:R};e.exports=T}).call(t,n(2).Buffer,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,n){"use strict";(function(e){function r(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),i.alloc(+e)}function y(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return _(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function C(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){function i(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(o){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var f=!0,d=0;do&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a239?4:i>223?3:i>191?2:1;if(o+s<=n){var u,c,l,f;switch(s){case 1:i<128&&(a=i);break;case 2:u=e[o+1],128==(192&u)&&(f=(31&i)<<6|63&u)>127&&(a=f);break;case 3:u=e[o+1],c=e[o+2],128==(192&u)&&128==(192&c)&&(f=(15&i)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=e[o+1],c=e[o+2],l=e[o+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(f=(15&i)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return B(r)}function B(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function U(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function O(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,o){return o||M(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,o){return o||M(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,n,r,52,8),n+8}function K(e){if(e=z(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function G(e){for(var t=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function W(e){return V.toByteArray(K(e))}function X(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function $(e){return e!==e}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var V=n(7),J=n(8),Z=n(9);t.Buffer=i,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),i.poolSize=8192,i._augment=function(e){return e.__proto__=i.prototype,e},i.from=function(e,t,n){return a(null,e,t,n)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(e,t,n){return u(null,e,t,n)},i.allocUnsafe=function(e){return c(null,e)},i.allocUnsafeSlow=function(e){return c(null,e)},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var a=o-r,s=n-t,u=Math.min(a,s),c=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return R(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)r+=this[e+--t]*o;return r},i.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],o=1,i=0;++i=o&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),J.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),J.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),J.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),J.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){D(this,e,t,n,Math.pow(2,8*n)-1,0)}var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a=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;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function o(e){return 3*e.length/4-r(e)}function i(e){var t,n,o,i,a,s=e.length;i=r(e),a=new f(3*s/4-i),n=i>0?s-4:s;var u=0;for(t=0;t>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[u++]=255&o):1===i&&(o=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}function a(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,n){for(var r,o=[],i=t;iu?u:a+16383));return 1===r?(t=e[n-1],o+=c[t>>2],o+=c[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=c[t>>10],o+=c[t>>4&63],o+=c[t<<2&63],o+="="),i.push(o),i.join("")}t.byteLength=o,t.toByteArray=i,t.fromByteArray=u;for(var c=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,p=d.length;h>1,l=-7,f=n?o-1:0,d=n?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?d/u:d*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n=function(e){function t(e,t){return e<>>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 f(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 d,h,p,g,y,v,m,C,b,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,b=271733878,d=0;d>>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)))}},f=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 f=r.charAt(64);if(f)for(;o.length%4;)o.push(f);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,f,d,h=0;h/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 f in r)if(r[f]instanceof Array)for(var d in r[f])l.push(o(f,e(r[f][d],0,s+1),null,s+1,i(r[f][d]).length));else l.push(o(f,e(r[f],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&&(i[a]=t[a]);var s=t.Body;if(J.isBrowser&&s&&(s instanceof e.Blob||s instanceof e.File))i["Content-Length"]=s.size;else if(J.isBrowser&&s&&"string"==typeof s)i["Content-Length"]=s.length;else if(s&&s instanceof r)i["Content-Length"]=s.length;else{if(!s||"function"!=typeof s.pipe)return void n({error:"params body format error, Only allow Buffer, Stream, Blob."});if(s,s=null,void 0===i["Content-Length"])return void n({error:"lack of param ContentLength"})}var u=J.throttleOnProgress.call(o,i["Content-Length"],t.onProgress);W.call(this,{TaskId:t.TaskId,method:"PUT",Bucket:t.Bucket,Region:t.Region,Key:t.Key,headers:i,body:s,onProgress:u},function(e,r){if(u(null,!0),e)return n(e);if(r&&r.headers&&r.headers.etag){var i=G({domain:o.options.Domain,bucket:t.Bucket,region:t.Region,object:t.Key});return n(null,{Location:i,ETag:r.headers.etag,statusCode:r.statusCode,headers:r.headers})}n(null,r)})}function E(e,t){W.call(this,{method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key},function(e,n){if(e){var r=e.statusCode;return r&&204===r?t(null,{statusCode:r}):r&&404===r?t(null,{BucketNotFound:!0,statusCode:r}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})})}function _(e,t){W.call(this,{method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"?acl"},function(e,n){if(e)return t(e);var r=n.AccessControlPolicy.Owner||{},o=n.AccessControlPolicy.AccessControlList.Grant||[];o=J.isArray(o)?o:[o];var i=q(n.AccessControlPolicy);n.headers&&n.headers["x-cos-acl"]&&(i.ACL=n.headers["x-cos-acl"]),i=J.extend(i,{Owner:r,Grants:o,statusCode:n.statusCode,headers:n.headers}),t(null,i)})}function P(e,t){var n={};n["x-cos-acl"]=e.ACL,n["x-cos-grant-read"]=e.GrantRead,n["x-cos-grant-write"]=e.GrantWrite,n["x-cos-grant-full-control"]=e.GrantFullControl;var r="";if(e.AccessControlPolicy){var o=J.clone(e.AccessControlPolicy||{}),i=o.Grants||o.Grant;i=J.isArray(i)?i:[i],delete o.Grant,delete o.Grants,o.AccessControlList={Grant:i},r=J.json2xml({AccessControlPolicy:o}),n["Content-MD5"]=J.binaryBase64(J.md5(r)),n["Content-Type"]="application/xml"}W.call(this,{method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"?acl",headers:n,body:r},function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})})}function L(e,t){var n={};n.Origin=e.Origin,n["Access-Control-Request-Method"]=e.AccessControlRequestMethod,n["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,W.call(this,{method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:n},function(e,n){if(e)return e.statusCode&&403==e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var r=n.headers||{};t(null,{AccessControlAllowOrigin:r["access-control-allow-origin"],AccessControlAllowMethods:r["access-control-allow-methods"],AccessControlAllowHeaders:r["access-control-allow-headers"],AccessControlExposeHeaders:r["access-control-expose-headers"],AccessControlMaxAge:r["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})})}function I(e,t){var n={};n["x-cos-copy-source"]=e.CopySource,n["x-cos-metadata-directive"]=e.MetadataDirective,n["x-cos-copy-source-If-Modified-Since"]=e.CopySourceIfModifiedSince,n["x-cos-copy-source-If-Unmodified-Since"]=e.CopySourceIfUnmodifiedSince,n["x-cos-copy-source-If-Match"]=e.CopySourceIfMatch,n["x-cos-copy-source-If-None-Match"]=e.CopySourceIfNoneMatch,n["x-cos-storage-class"]=e.StorageClass,n["x-cos-acl"]=e.ACL,n["x-cos-grant-read"]=e.GrantRead,n["x-cos-grant-write"]=e.GrantWrite,n["x-cos-grant-full-control"]=e.GrantFullControl,n["Cache-Control"]=e.CacheControl,n["Content-Disposition"]=e.ContentDisposition,n["Content-Encoding"]=e.ContentEncoding,n["Content-Length"]=e.ContentLength,n["Content-Type"]=e.ContentType,n.Expect=e.Expect,n.Expires=e.Expires;for(var r in e)r.indexOf("x-cos-meta-")>-1&&(n[r]=e[r]);W.call(this,{method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:n},function(e,n){if(e)return t(e);var r=J.clone(n.CopyObjectResult);J.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)})}function j(e,t){var n={};n["x-cos-copy-source"]=e.CopySource,n["x-cos-copy-source-Range"]=e.CopySourceRange,n["x-cos-copy-source-If-Modified-Since"]=e.CopySourceIfModifiedSince,n["x-cos-copy-source-If-Unmodified-Since"]=e.CopySourceIfUnmodifiedSince,n["x-cos-copy-source-If-Match"]=e.CopySourceIfMatch,n["x-cos-copy-source-If-None-Match"]=e.CopySourceIfNoneMatch;var r="?partNumber="+e.PartNumber+"&uploadId="+e.UploadId;W.call(this,{method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:r,headers:n},function(e,n){if(e)return t(e);var r=J.clone(n.CopyObjectResult);J.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)})}function D(e,t){var n={};n["Content-Type"]="application/xml";var o=e.Objects||{},i=e.Quiet,a={Delete:{Object:o,Quiet:i||!1}},s=J.json2xml(a);n["Content-MD5"]=J.binaryBase64(J.md5(s)),n["Content-Length"]=r.byteLength(s,"utf8"),W.call(this,{method:"POST",Bucket:e.Bucket,Region:e.Region,body:s,action:"/?delete",headers:n},function(e,n){if(e)return t(e);var r=n.DeleteResult.Deleted||[],o=n.DeleteResult.Error||[];r=J.isArray(r)?r:[r],o=J.isArray(o)?o:[o];var i=J.clone(n.DeleteResult);J.extend(i,{Error:o,Deleted:r,statusCode:n.statusCode,headers:n.headers}),t(null,i)})}function U(e,t){var n={};n["Cache-Control"]=e.CacheControl,n["Content-Disposition"]=e.ContentDisposition,n["Content-Encoding"]=e.ContentEncoding,n["Content-Type"]=e.ContentType,n.Expires=e.Expires,n["x-cos-acl"]=e.ACL,n["x-cos-grant-read"]=e.GrantRead,n["x-cos-grant-write"]=e.GrantWrite,n["x-cos-grant-full-control"]=e.GrantFullControl,n["x-cos-storage-class"]=e.StorageClass;for(var r in e)r.indexOf("x-cos-meta-")>-1&&(n[r]=e[r]);W.call(this,{method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"?uploads",headers:n},function(e,n){return e?t(e):(n=J.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,J.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)})}function O(e,t){var n={};n["Content-Length"]=e.ContentLength,n.Expect=e.Expect;var r=e.PartNumber,o=e.UploadId,i="?partNumber="+r+"&uploadId="+o;W.call(this,{TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:i,headers:n,onProgress:e.onProgress,body:e.Body||null},function(e,n){if(e)return t(e);n.headers=n.headers||{},t(null,{ETag:n.headers.etag||"",statusCode:n.statusCode,headers:n.headers})})}function M(e,t){var n=this,o={};o["Content-Type"]="application/xml";for(var i=e.UploadId,a="?uploadId="+i,s=e.Parts,u=0,c=s.length;u-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 Y(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=J.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=J.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 W(e,t){var n=this;Y.call(n,{Method:e.method,Key:e.Key},function(r){e.AuthData=r,X.call(n,e,t)})}function X(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,f=e.body,d=e.json,h=e.rawBody,p=e.qs,g={url:l||G({domain:n.options.Domain,bucket:o,region:i,object:a,action:s}),method:u,headers:c||{},qs:p,body:f,json:d};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=J.clearKey(g.headers)),g.qs&&(g.qs=J.clearKey(g.qs)),g=J.clearKey(g),e.onProgress&&"function"==typeof e.onProgress){var y=f&&(f.size||f.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=V(g,function(e,o,i){var a=function(e,i){r&&n.off("inner-kill-task",m),r&&!n._isRunningTask(r)||(e?(e=e||{},o&&o.statusCode&&(e.statusCode=o.statusCode),o&&o.headers&&(e.headers=o.headers),t(e,null)):(i=i||{},o&&o.statusCode&&(i.statusCode=o.statusCode),o&&o.headers&&(i.headers=o.headers),t(null,i)))};if(e)return void a({error:e});var s;try{s=J.xml2json(i)||{}}catch(e){s=i||{}}var u=o.statusCode;return 200!==u&&204!==u&&206!==u?void a({error:s.Error||s}):(h&&(s={},s.body=i),s.Error?void a({error:s.Error}):void a(null,s))}),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 $=n(4),V=n(18),J=n(0),Z={getBucket:i,headBucket:o,deleteBucket:a,getBucketAcl:s,putBucketAcl:u,getBucketCors:c,putBucketCors:l,deleteBucketCors:f,getBucketLocation:h,putBucketTagging:y,getBucketTagging:g,deleteBucketTagging:v,getBucketPolicy:p,putBucketPolicy:d,getBucketLifecycle:C,putBucketLifecycle:m,deleteBucketLifecycle:b,putBucketVersioning:x,getBucketVersioning:w,putBucketReplication:k,getBucketReplication:R,deleteBucketReplication:T,getObject:S,headObject:A,putObject:B,deleteObject:E,getObjectAcl:_,putObjectAcl:P,optionsObject:L,putObjectCopy:I,uploadPartCopy:j,multipartInit:U,multipartUpload:O,multipartComplete:M,multipartList:N,multipartListPart:F,multipartAbort:K,deleteMultipleObject:D,getObjectUrl:H,getAuth:z};J.each(Z,function(e,n){t[n]=J.apiWrapper(n,e)})}).call(t,n(1),n(2).Buffer)},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?(f=g.substr(0,y),d=g.substr(y+1)):(f=g,d=""),h=decodeURIComponent(f),p=decodeURIComponent(d),r(a,h)?o(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}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=O[e]={};return B.each(e.match(U)||[],function(e,n){t[n]=!0}),t}function n(){j.addEventListener?(j.removeEventListener("DOMContentLoaded",r,!1),window.removeEventListener("load",r,!1)):(j.detachEvent("onreadystatechange",r),window.detachEvent("onload",r))}function r(){(j.addEventListener||"load"===event.type||"complete"===j.readyState)&&(n(),B.ready())}function o(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(K,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:F.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):A.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(U)||[];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 f(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 d(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 h(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 p(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,b=m.concat,x=m.push,w=m.indexOf,k={},R=k.toString,T=k.hasOwnProperty,A={},S="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)},E=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,_=/^-ms-/,P=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()};B.fn=B.prototype={jquery:S,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&&!T.call(e,"constructor")&&!T.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(A.ownLast)for(t in e)return T.call(e,t);for(t in e);return void 0===t||T.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?k[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(_,"ms-").replace(P,L)},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||I).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:j,!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=j.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return I.find(e);this.length=1,this[0]=r}return this.context=j,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):B.isFunction(e)?void 0!==I.ready?I.ready(e):e(B):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),B.makeArray(e,this))}).prototype=B.fn,I=B(j);var U=/\S+/g,O={};B.Callbacks=function(e){e="string"==typeof e?O[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||f.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 f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},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||(M.resolveWith(j,[B]),B.fn.triggerHandler&&(B(j).triggerHandler("ready"),B(j).off("ready")))}}}),B.ready.promise=function(e){if(!M)if(M=B.Deferred(),"complete"===j.readyState)setTimeout(B.ready);else if(j.addEventListener)j.addEventListener("DOMContentLoaded",r,!1),window.addEventListener("load",r,!1);else{j.attachEvent("onreadystatechange",r),window.attachEvent("onload",r);var t=!1;try{t=null==window.frameElement&&j.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 M.promise(e)};var N;for(N in B(A))break;A.ownLast="0"!==N,A.inlineBlockNeedsLayout=!1,B(function(){var e,t,n,r;(n=j.getElementsByTagName("body")[0])&&n.style&&(t=j.createElement("div"),r=j.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",A.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=j.createElement("div");if(null==A.deleteExpando){A.deleteExpando=!0;try{delete e.test}catch(e){A.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 F=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/([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&&(h=d.split("."),d=h.shift(),h.sort()),i=d.indexOf(":")<0&&"on"+d,e=e[B.expando]?e:new B.Event(d,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=h.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:B.makeArray(t,[e]),u=B.event.special[d]||{},r||!u.trigger||!1!==u.trigger.apply(n,t))){if(!r&&!u.noBubble&&!B.isWindow(n)){for(s=u.delegateType||d,G.test(s+d)||(a=a.parentNode);a;a=a.parentNode)f.push(a),c=a;c===(n.ownerDocument||j)&&f.push(c.defaultView||c.parentWindow||window)}for(l=0;(a=f[l++])&&!e.isPropagationStopped();)e.type=l>1?s:u.bindType||d,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=d,!r&&!e.isDefaultPrevented()&&(!u._default||!1===u._default.apply(f.pop(),t))&&B.acceptData(n)&&i&&n[d]&&!B.isWindow(n)){c=n[i],c&&(n[i]=null),B.event.triggered=d;try{n[d]()}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&&(b=h(d,R,n)),b=p(d,b,R,o),o?(d.ifModified&&(x=R.getResponseHeader("Last-Modified"),x&&(B.lastModified[i]=x),(x=R.getResponseHeader("etag"))&&(B.etag[i]=x)),204===e||"HEAD"===d.type?k="nocontent":304===e?k="notmodified":(k=b.state,l=b.data,f=b.error,o=!f)):(f=k,!e&&k||(k="error",e<0&&(e=0))),R.status=e,R.statusText=(t||k)+"",o?v.resolveWith(g,[l,k,R]):v.rejectWith(g,[R,k,f]),R.statusCode(C),C=void 0,u&&y.trigger(o?"ajaxSuccess":"ajaxError",[R,d,o?l:f]),m.fireWith(g,[R,k]),u&&(y.trigger("ajaxComplete",[R,d]),--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,d=B.ajaxSetup({},t),g=d.context||d,y=d.context&&(g.nodeType||g.jquery)?B(g):B.event,v=B.Deferred(),m=B.Callbacks("once memory"),C=d.statusCode||{},b={},x={},w=0,k="canceled",R={readyState:0,getResponseHeader:function(e){var t;if(2===w){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===w?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=x[n]=x[n]||e,b[e]=t),this},overrideMimeType:function(e){return w||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<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||k;return c&&c.abort(t),n(0,t),this}};if(v.promise(R).complete=m.add,R.success=R.done,R.error=R.fail,d.url=((e||d.url||J)+"").replace(Z,"").replace(re,V[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=B.trim(d.dataType||"*").toLowerCase().match(U)||[""],null==d.crossDomain&&(r=oe.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]===V[1]&&r[2]===V[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(V[3]||("http:"===V[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=B.param(d.data,d.traditional)),f(ie,d,t,R),2===w)return R;u=d.global,u&&0==B.active++&&B.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!ne.test(d.type),i=d.url,d.hasContent||(d.data&&(i=d.url+=(X.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=Q.test(i)?i.replace(Q,"$1_="+W++):i+(X.test(i)?"&":"?")+"_="+W++)),d.ifModified&&(B.lastModified[i]&&R.setRequestHeader("If-Modified-Since",B.lastModified[i]),B.etag[i]&&R.setRequestHeader("If-None-Match",B.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&R.setRequestHeader("Content-Type",d.contentType);for(o in d.headers)R.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(!1===d.beforeSend.call(g,R,d)||2===w))return R.abort();k="abort";for(o in{success:1,error:1,complete:1})R[o](d[o]);if(c=f(ae,d,t,R)){R.readyState=1,u&&y.trigger("ajaxSend",[R,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){R.abort("timeout")},d.timeout));try{w=1,c.send(b,n)}catch(e){if(!(w<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,fe=/^(?:submit|button|image|reset|file)$/i,de=/^(?: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")&&de.test(this.nodeName)&&!fe.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 he=0,pe={},ge=B.ajaxSettings.xhr();window.ActiveXObject&&B(window).on("unload",function(){for(var e in pe)pe[e](void 0,!0)}),A.cors=!!ge&&"withCredentials"in ge,ge=A.ajax=!!ge,ge&&B.ajaxTransport(function(e){if(!e.crossDomain||A.cors){var t;return{send:function(n,r){var o,i=e.xhr(),a=++he;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 pe[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=pe[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=j.head||B("head")[0]||j.documentElement;return{send:function(r,o){t=j.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+"_"+W++;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||j;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 p,i=e.TaskId,a=e.Bucket,u=e.Region,l=e.Key,f=e.Body,d=e.ChunkSize||e.SliceSize||this.options.ChunkSize,h=e.AsyncLimit,y=e.StorageClass||"Standard",v=this,m=e.onProgress,C=e.onHashProgress;r.on("error",function(e){if(v._isRunningTask(i))return t(e)}),r.on("upload_complete",function(e){t(null,e)}),r.on("upload_slice_complete",function(e){c.call(v,{Bucket:a,Region:u,Key:l,UploadId:e.UploadId,SliceList:e.SliceList},function(e,t){if(v._isRunningTask(i))return e?r.emit("error",e):void r.emit("upload_complete",t)})}),r.on("get_upload_data_finish",function(e){s.call(v,{TaskId:i,Bucket:a,Region:u,Key:l,Body:f,FileSize:n,SliceSize:d,AsyncLimit:h,UploadData:e,onProgress:m},function(e,t){if(v._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,StorageClass:y,Body:f,FileSize:n,SliceSize:d,onHashProgress:C}),o.call(v,t,function(t,n){if(v._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=f.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=p?c%l||l:l),!e.Uploaded}),m=g.throttleOnProgress.call(n,c,e.onProgress);h.eachLimit(v,f,function(e,t){if(n._isRunningTask(r)){var f=e.PartNumber,h=Math.min(c,e.PartNumber*l)-(e.PartNumber-1)*l,p=0;u.call(n,{TaskId:r,Bucket:o,Region:i,Key:a,SliceSize:l,FileSize:c,PartNumber:f,Body:d,UploadData:s,onProgress:function(e){y+=e.loaded-p,p=e.loaded,m({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-=p:(y+=h-p,e.ETag=i.ETag),t(o||null,i))})}},function(e){if(n._isRunningTask(r)){if(m(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.UploadData,f=this,d=c*(u-1),p=c,y=d+c;y>a&&(y=a,p=y-d);var v=g.fileSlice(s,d,y),m=l.PartList[u-1],C=m.ETag;h.retry(3,function(t){f._isRunningTask(n)&&f.multipartUpload({TaskId:n,Bucket:r,Region:o,Key:i,ContentLength:p,ContentSha1:C,PartNumber:u,UploadId:l.UploadId,Body:v,onProgress:e.onProgress},function(e,r){if(f._isRunningTask(n))return e?t(e):(m.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 p;if(l.on("error",function(e){return t(e)}),l.on("get_abort_array",function(e){f.call(c,{Bucket:n,Region:r,Key:o,AsyncLimit:u,AbortArray:e},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 f(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);h.eachLimit(i,a,function(e,t){var i=u;if(o&&o!=e.Key)return t(null,{KeyNotMatch:!0});var a=e.UploadId||e.UploadID;s.multipartAbort({Bucket:n,Region:r,Key:e.Key,UploadId:a},function(o,s){var u={Bucket:n,Region:r,Key:e.Key,UploadId:a};c[i]={error:o,task:u},t(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(f)}var h=n(20),p=n(3).EventProxy,g=n(0),y={sliceUploadFile:r,abortUploadTask:l,uploadFiles:d};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&&o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var a=o-r,s=n-t,u=Math.min(a,s),c=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return R(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)r+=this[e+--t]*o;return r},i.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],o=1,i=0;++i=o&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),J.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),J.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),J.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),J.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){D(this,e,t,n,Math.pow(2,8*n)-1,0)}var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a=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;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function o(e){return 3*e.length/4-r(e)}function i(e){var t,n,o,i,a,s=e.length;i=r(e),a=new f(3*s/4-i),n=i>0?s-4:s;var u=0;for(t=0;t>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[u++]=255&o):1===i&&(o=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}function a(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,n){for(var r,o=[],i=t;iu?u:a+16383));return 1===r?(t=e[n-1],o+=c[t>>2],o+=c[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=c[t>>10],o+=c[t>>4&63],o+=c[t<<2&63],o+="="),i.push(o),i.join("")}t.byteLength=o,t.toByteArray=i,t.fromByteArray=u;for(var c=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,p=d.length;h>1,l=-7,f=n?o-1:0,d=n?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?d/u:d*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n=function(e){function t(e,t){return e<>>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 f(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 d,h,p,g,y,v,m,C,b,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,b=271733878,d=0;d>>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)))}},f=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 f=r.charAt(64);if(f)for(;o.length%4;)o.push(f);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,f,d,h=0;h/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 f in r)if(r[f]instanceof Array)for(var d in r[f])l.push(o(f,e(r[f][d],0,s+1),null,s+1,i(r[f][d]).length));else l.push(o(f,e(r[f],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&&(i[a]=t[a]);var s=t.Body;if(J.isBrowser&&s&&(s instanceof e.Blob||s instanceof e.File))i["Content-Length"]=s.size;else if(J.isBrowser&&s&&"string"==typeof s)i["Content-Length"]=s.length;else if(s&&s instanceof r)i["Content-Length"]=s.length;else{if(!s||"function"!=typeof s.pipe)return void n({error:"params body format error, Only allow Buffer, Stream, Blob."});if(s,s=null,void 0===i["Content-Length"])return void n({error:"lack of param ContentLength"})}var u=J.throttleOnProgress.call(o,i["Content-Length"],t.onProgress);W.call(this,{TaskId:t.TaskId,method:"PUT",Bucket:t.Bucket,Region:t.Region,Key:t.Key,headers:i,body:s,onProgress:u},function(e,r){if(u(null,!0),e)return n(e);if(r&&r.headers&&r.headers.etag){var i=G({domain:o.options.Domain,bucket:t.Bucket,region:t.Region,object:t.Key});return n(null,{Location:i,ETag:r.headers.etag,statusCode:r.statusCode,headers:r.headers})}n(null,r)})}function B(e,t){W.call(this,{method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key},function(e,n){if(e){var r=e.statusCode;return r&&204===r?t(null,{statusCode:r}):r&&404===r?t(null,{BucketNotFound:!0,statusCode:r}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})})}function _(e,t){W.call(this,{method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"?acl"},function(e,n){if(e)return t(e);var r=n.AccessControlPolicy.Owner||{},o=n.AccessControlPolicy.AccessControlList.Grant||[];o=J.isArray(o)?o:[o];var i=q(n.AccessControlPolicy);n.headers&&n.headers["x-cos-acl"]&&(i.ACL=n.headers["x-cos-acl"]),i=J.extend(i,{Owner:r,Grants:o,statusCode:n.statusCode,headers:n.headers}),t(null,i)})}function P(e,t){var n={};n["x-cos-acl"]=e.ACL,n["x-cos-grant-read"]=e.GrantRead,n["x-cos-grant-write"]=e.GrantWrite,n["x-cos-grant-full-control"]=e.GrantFullControl;var r="";if(e.AccessControlPolicy){var o=J.clone(e.AccessControlPolicy||{}),i=o.Grants||o.Grant;i=J.isArray(i)?i:[i],delete o.Grant,delete o.Grants,o.AccessControlList={Grant:i},r=J.json2xml({AccessControlPolicy:o}),n["Content-MD5"]=J.binaryBase64(J.md5(r)),n["Content-Type"]="application/xml"}W.call(this,{method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"?acl",headers:n,body:r},function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})})}function L(e,t){var n={};n.Origin=e.Origin,n["Access-Control-Request-Method"]=e.AccessControlRequestMethod,n["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,W.call(this,{method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:n},function(e,n){if(e)return e.statusCode&&403==e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var r=n.headers||{};t(null,{AccessControlAllowOrigin:r["access-control-allow-origin"],AccessControlAllowMethods:r["access-control-allow-methods"],AccessControlAllowHeaders:r["access-control-allow-headers"],AccessControlExposeHeaders:r["access-control-expose-headers"],AccessControlMaxAge:r["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})})}function I(e,t){var n={};n["x-cos-copy-source"]=e.CopySource,n["x-cos-metadata-directive"]=e.MetadataDirective,n["x-cos-copy-source-If-Modified-Since"]=e.CopySourceIfModifiedSince,n["x-cos-copy-source-If-Unmodified-Since"]=e.CopySourceIfUnmodifiedSince,n["x-cos-copy-source-If-Match"]=e.CopySourceIfMatch,n["x-cos-copy-source-If-None-Match"]=e.CopySourceIfNoneMatch,n["x-cos-storage-class"]=e.StorageClass,n["x-cos-acl"]=e.ACL,n["x-cos-grant-read"]=e.GrantRead,n["x-cos-grant-write"]=e.GrantWrite,n["x-cos-grant-full-control"]=e.GrantFullControl,n["Cache-Control"]=e.CacheControl,n["Content-Disposition"]=e.ContentDisposition,n["Content-Encoding"]=e.ContentEncoding,n["Content-Length"]=e.ContentLength,n["Content-Type"]=e.ContentType,n.Expect=e.Expect,n.Expires=e.Expires,n["x-cos-server-side-encryption"]=e.ServiceSideEncryption;for(var r in e)r.indexOf("x-cos-meta-")>-1&&(n[r]=e[r]);W.call(this,{method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:n},function(e,n){if(e)return t(e);var r=J.clone(n.CopyObjectResult);J.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)})}function j(e,t){var n={};n["x-cos-copy-source"]=e.CopySource,n["x-cos-copy-source-Range"]=e.CopySourceRange,n["x-cos-copy-source-If-Modified-Since"]=e.CopySourceIfModifiedSince,n["x-cos-copy-source-If-Unmodified-Since"]=e.CopySourceIfUnmodifiedSince,n["x-cos-copy-source-If-Match"]=e.CopySourceIfMatch,n["x-cos-copy-source-If-None-Match"]=e.CopySourceIfNoneMatch;var r="?partNumber="+e.PartNumber+"&uploadId="+e.UploadId;W.call(this,{method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:r,headers:n},function(e,n){if(e)return t(e);var r=J.clone(n.CopyObjectResult);J.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)})}function D(e,t){var n={};n["Content-Type"]="application/xml";var o=e.Objects||{},i=e.Quiet,a={Delete:{Object:o,Quiet:i||!1}},s=J.json2xml(a);n["Content-MD5"]=J.binaryBase64(J.md5(s)),n["Content-Length"]=r.byteLength(s,"utf8"),W.call(this,{method:"POST",Bucket:e.Bucket,Region:e.Region,body:s,action:"/?delete",headers:n},function(e,n){if(e)return t(e);var r=n.DeleteResult.Deleted||[],o=n.DeleteResult.Error||[];r=J.isArray(r)?r:[r],o=J.isArray(o)?o:[o];var i=J.clone(n.DeleteResult);J.extend(i,{Error:o,Deleted:r,statusCode:n.statusCode,headers:n.headers}),t(null,i)})}function U(e,t){var n={};n["Cache-Control"]=e.CacheControl,n["Content-Disposition"]=e.ContentDisposition,n["Content-Encoding"]=e.ContentEncoding,n["Content-Type"]=e.ContentType,n.Expires=e.Expires,n["x-cos-acl"]=e.ACL,n["x-cos-grant-read"]=e.GrantRead,n["x-cos-grant-write"]=e.GrantWrite,n["x-cos-grant-full-control"]=e.GrantFullControl,n["x-cos-storage-class"]=e.StorageClass,n["x-cos-server-side-encryption"]=e.ServiceSideEncryption;for(var r in e)r.indexOf("x-cos-meta-")>-1&&(n[r]=e[r]);W.call(this,{method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"?uploads",headers:n},function(e,n){return e?t(e):(n=J.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,J.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)})}function O(e,t){var n={};n["Content-Length"]=e.ContentLength,n.Expect=e.Expect;var r=e.PartNumber,o=e.UploadId,i="?partNumber="+r+"&uploadId="+o;W.call(this,{TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:i,headers:n,onProgress:e.onProgress,body:e.Body||null},function(e,n){if(e)return t(e);n.headers=n.headers||{},t(null,{ETag:n.headers.etag||"",statusCode:n.statusCode,headers:n.headers})})}function M(e,t){var n=this,o={};o["Content-Type"]="application/xml";for(var i=e.UploadId,a="?uploadId="+i,s=e.Parts,u=0,c=s.length;u-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 Y(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=J.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=J.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 W(e,t){var n=this;Y.call(n,{Method:e.method,Key:e.Key},function(r){e.AuthData=r,X.call(n,e,t)})}function X(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,f=e.body,d=e.json,h=e.rawBody,p=e.qs,g={url:l||G({domain:n.options.Domain,bucket:o,region:i,object:a,action:s}),method:u,headers:c||{},qs:p,body:f,json:d};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=J.clearKey(g.headers)),g.qs&&(g.qs=J.clearKey(g.qs)),g=J.clearKey(g),e.onProgress&&"function"==typeof e.onProgress){var y=f&&(f.size||f.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=V(g,function(e,o,i){var a=function(e,i){r&&n.off("inner-kill-task",m),r&&!n._isRunningTask(r)||(e?(e=e||{},o&&o.statusCode&&(e.statusCode=o.statusCode),o&&o.headers&&(e.headers=o.headers),t(e,null)):(i=i||{},o&&o.statusCode&&(i.statusCode=o.statusCode),o&&o.headers&&(i.headers=o.headers),t(null,i)))};if(e)return void a({error:e});var s;try{s=J.xml2json(i)||{}}catch(e){s=i||{}}var u=o.statusCode;return 200!==u&&204!==u&&206!==u?void a({error:s.Error||s}):(h&&(s={},s.body=i),s.Error?void a({error:s.Error}):void a(null,s))}),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 $=n(4),V=n(18),J=n(0),Z={getBucket:i,headBucket:o,deleteBucket:a,getBucketAcl:s,putBucketAcl:u,getBucketCors:c,putBucketCors:l,deleteBucketCors:f,getBucketLocation:h,putBucketTagging:y,getBucketTagging:g,deleteBucketTagging:v,getBucketPolicy:p,putBucketPolicy:d,getBucketLifecycle:C,putBucketLifecycle:m,deleteBucketLifecycle:b,putBucketVersioning:x,getBucketVersioning:w,putBucketReplication:k,getBucketReplication:R,deleteBucketReplication:T,getObject:S,headObject:A,putObject:E,deleteObject:B,getObjectAcl:_,putObjectAcl:P,optionsObject:L,putObjectCopy:I,uploadPartCopy:j,multipartInit:U,multipartUpload:O,multipartComplete:M,multipartList:N,multipartListPart:F,multipartAbort:K,deleteMultipleObject:D,getObjectUrl:H,getAuth:z};J.each(Z,function(e,n){t[n]=J.apiWrapper(n,e)})}).call(t,n(1),n(2).Buffer)},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?(f=g.substr(0,y),d=g.substr(y+1)):(f=g,d=""),h=decodeURIComponent(f),p=decodeURIComponent(d),r(a,h)?o(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}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=O[e]={};return E.each(e.match(U)||[],function(e,n){t[n]=!0}),t}function n(){j.addEventListener?(j.removeEventListener("DOMContentLoaded",r,!1),window.removeEventListener("load",r,!1)):(j.detachEvent("onreadystatechange",r),window.detachEvent("onload",r))}function r(){(j.addEventListener||"load"===event.type||"complete"===j.readyState)&&(n(),E.ready())}function o(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(K,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:F.test(n)?E.parseJSON(n):n)}catch(e){}E.data(e,t,n)}else n=void 0}return n}function i(e){var t;for(t in e)if(("data"!==t||!E.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function a(e,t,n,r){if(E.acceptData(e)){var o,i,a=E.expando,s=e.nodeType,u=s?E.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()||E.guid++:a),u[c]||(u[c]=s?{}:{toJSON:E.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[c]=E.extend(u[c],t):u[c].data=E.extend(u[c].data,t)),i=u[c],r||(i.data||(i.data={}),i=i.data),void 0!==n&&(i[E.camelCase(t)]=n),"string"==typeof t?null==(o=i[t])&&(o=i[E.camelCase(t)]):o=i,o}}function s(e,t,n){if(E.acceptData(e)){var r,o,a=e.nodeType,s=a?E.cache:e,u=a?e[E.expando]:E.expando;if(s[u]){if(t&&(r=n?s[u]:s[u].data)){E.isArray(t)?t=t.concat(E.map(t,E.camelCase)):t in r?t=[t]:(t=E.camelCase(t),t=t in r?[t]:t.split(" ")),o=t.length;for(;o--;)delete r[t[o]];if(n?!i(r):!E.isEmptyObject(r))return}(n||(delete s[u].data,i(s[u])))&&(a?E.cleanData([e],!0):A.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(U)||[];if(E.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 f(e,t,n,r){function o(s){var u;return i[s]=!0,E.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 d(e,t){var n,r,o=E.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((o[r]?e:n||(n={}))[r]=t[r]);return n&&E.extend(!0,e,n),e}function h(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 p(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(E.isArray(t))E.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"!==E.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,b=m.concat,x=m.push,w=m.indexOf,k={},R=k.toString,T=k.hasOwnProperty,A={},S="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",E=function(e,t){return new E.fn.init(e,t)},B=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,_=/^-ms-/,P=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()};E.fn=E.prototype={jquery:S,constructor:E,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=E.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return E.each(this,e,t)},map:function(e){return this.pushStack(E.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"!==E.type(e)||e.nodeType||E.isWindow(e))return!1;try{if(e.constructor&&!T.call(e,"constructor")&&!T.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(A.ownLast)for(t in e)return T.call(e,t);for(t in e);return void 0===t||T.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?k[R.call(e)]||"object":typeof e},globalEval:function(e){e&&E.trim(e)&&(window.execScript||function(e){window.eval.call(window,e)})(e)},camelCase:function(e){return e.replace(_,"ms-").replace(P,L)},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-]*))$/;(E.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||I).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:j,!0)),rsingleTag.test(n[1])&&E.isPlainObject(t))for(n in t)E.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=j.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return I.find(e);this.length=1,this[0]=r}return this.context=j,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):E.isFunction(e)?void 0!==I.ready?I.ready(e):e(E):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),E.makeArray(e,this))}).prototype=E.fn,I=E(j);var U=/\S+/g,O={};E.Callbacks=function(e){e="string"==typeof e?O[e]||t(e):E.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?E.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||f.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 f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},E.extend({Deferred:function(e){var t=[["resolve","done",E.Callbacks("once memory"),"resolved"],["reject","fail",E.Callbacks("once memory"),"rejected"],["notify","progress",E.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return E.Deferred(function(n){E.each(t,function(t,i){var a=E.isFunction(e[t])&&e[t];o[i[1]](function(){var e=a&&a.apply(this,arguments);e&&E.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?E.extend(e,r):r}},o={};return r.pipe=r.then,E.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&&E.isFunction(e.promise)?a:0,u=1===s?e:E.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||(M.resolveWith(j,[E]),E.fn.triggerHandler&&(E(j).triggerHandler("ready"),E(j).off("ready")))}}}),E.ready.promise=function(e){if(!M)if(M=E.Deferred(),"complete"===j.readyState)setTimeout(E.ready);else if(j.addEventListener)j.addEventListener("DOMContentLoaded",r,!1),window.addEventListener("load",r,!1);else{j.attachEvent("onreadystatechange",r),window.attachEvent("onload",r);var t=!1;try{t=null==window.frameElement&&j.documentElement}catch(e){}t&&t.doScroll&&function e(){if(!E.isReady){try{t.doScroll("left")}catch(t){return setTimeout(e,50)}n(),E.ready()}}()}return M.promise(e)};var N;for(N in E(A))break;A.ownLast="0"!==N,A.inlineBlockNeedsLayout=!1,E(function(){var e,t,n,r;(n=j.getElementsByTagName("body")[0])&&n.style&&(t=j.createElement("div"),r=j.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",A.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=j.createElement("div");if(null==A.deleteExpando){A.deleteExpando=!0;try{delete e.test}catch(e){A.deleteExpando=!1}}e=null}(),E.acceptData=function(e){var t=E.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)};var F=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/([A-Z])/g;E.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?E.cache[e[E.expando]]:e[E.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)}}),E.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=E.data(a),1===a.nodeType&&!E._data(a,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=E.camelCase(r.slice(5)),o(a,r,i[r])));E._data(a,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){E.data(this,e)}):arguments.length>1?this.each(function(){E.data(this,e,t)}):a?o(a,e,E.data(a,e)):void 0},removeData:function(e){return this.each(function(){E.removeData(this,e)})}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=E._data(e,t),n&&(!r||E.isArray(n)?r=E._data(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,o=n.shift(),i=E._queueHooks(e,t),a=function(){E.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 E._data(e,n)||E._data(e,n,{empty:E.Callbacks("once memory").add(function(){E._removeData(e,t+"queue"),E._removeData(e,n)})})}}),E.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length=0&&(h=d.split("."),d=h.shift(),h.sort()),i=d.indexOf(":")<0&&"on"+d,e=e[E.expando]?e:new E.Event(d,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=h.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),u=E.event.special[d]||{},r||!u.trigger||!1!==u.trigger.apply(n,t))){if(!r&&!u.noBubble&&!E.isWindow(n)){for(s=u.delegateType||d,G.test(s+d)||(a=a.parentNode);a;a=a.parentNode)f.push(a),c=a;c===(n.ownerDocument||j)&&f.push(c.defaultView||c.parentWindow||window)}for(l=0;(a=f[l++])&&!e.isPropagationStopped();)e.type=l>1?s:u.bindType||d,o=(E._data(a,"events")||{})[e.type]&&E._data(a,"handle"),o&&o.apply(a,t),(o=i&&a[i])&&o.apply&&E.acceptData(a)&&(e.result=o.apply(a,t),!1===e.result&&e.preventDefault());if(e.type=d,!r&&!e.isDefaultPrevented()&&(!u._default||!1===u._default.apply(f.pop(),t))&&E.acceptData(n)&&i&&n[d]&&!E.isWindow(n)){c=n[i],c&&(n[i]=null),E.event.triggered=d;try{n[d]()}catch(e){}E.event.triggered=void 0,c&&(n[i]=c)}return e.result}},dispatch:function(e){e=E.event.fix(e);var t,n,r,o,i,a=[],s=C.call(arguments),u=(E._data(this,"events")||{})[e.type]||[],c=E.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=E.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=((E.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:E.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&&(b=h(d,R,n)),b=p(d,b,R,o),o?(d.ifModified&&(x=R.getResponseHeader("Last-Modified"),x&&(E.lastModified[i]=x),(x=R.getResponseHeader("etag"))&&(E.etag[i]=x)),204===e||"HEAD"===d.type?k="nocontent":304===e?k="notmodified":(k=b.state,l=b.data,f=b.error,o=!f)):(f=k,!e&&k||(k="error",e<0&&(e=0))),R.status=e,R.statusText=(t||k)+"",o?v.resolveWith(g,[l,k,R]):v.rejectWith(g,[R,k,f]),R.statusCode(C),C=void 0,u&&y.trigger(o?"ajaxSuccess":"ajaxError",[R,d,o?l:f]),m.fireWith(g,[R,k]),u&&(y.trigger("ajaxComplete",[R,d]),--E.active||E.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,o,i,a,s,u,c,l,d=E.ajaxSetup({},t),g=d.context||d,y=d.context&&(g.nodeType||g.jquery)?E(g):E.event,v=E.Deferred(),m=E.Callbacks("once memory"),C=d.statusCode||{},b={},x={},w=0,k="canceled",R={readyState:0,getResponseHeader:function(e){var t;if(2===w){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===w?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=x[n]=x[n]||e,b[e]=t),this},overrideMimeType:function(e){return w||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<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||k;return c&&c.abort(t),n(0,t),this}};if(v.promise(R).complete=m.add,R.success=R.done,R.error=R.fail,d.url=((e||d.url||J)+"").replace(Z,"").replace(re,V[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=E.trim(d.dataType||"*").toLowerCase().match(U)||[""],null==d.crossDomain&&(r=oe.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]===V[1]&&r[2]===V[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(V[3]||("http:"===V[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=E.param(d.data,d.traditional)),f(ie,d,t,R),2===w)return R;u=d.global,u&&0==E.active++&&E.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!ne.test(d.type),i=d.url,d.hasContent||(d.data&&(i=d.url+=(X.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=Q.test(i)?i.replace(Q,"$1_="+W++):i+(X.test(i)?"&":"?")+"_="+W++)),d.ifModified&&(E.lastModified[i]&&R.setRequestHeader("If-Modified-Since",E.lastModified[i]),E.etag[i]&&R.setRequestHeader("If-None-Match",E.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&R.setRequestHeader("Content-Type",d.contentType);for(o in d.headers)R.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(!1===d.beforeSend.call(g,R,d)||2===w))return R.abort();k="abort";for(o in{success:1,error:1,complete:1})R[o](d[o]);if(c=f(ae,d,t,R)){R.readyState=1,u&&y.trigger("ajaxSend",[R,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){R.abort("timeout")},d.timeout));try{w=1,c.send(b,n)}catch(e){if(!(w<2))throw e;n(-1,e)}}else n(-1,"No Transport");return R},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],function(e,t){E[t]=function(e,n,r,o){return E.isFunction(n)&&(o=o||r,r=n,n=void 0),E.ajax({url:e,type:t,dataType:o,data:n,success:r})}}),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E._evalUrl=function(e){return E.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};var ue=/%20/g,ce=/\[\]$/,le=/\r?\n/g,fe=/^(?:submit|button|image|reset|file)$/i,de=/^(?:input|select|textarea|keygen)/i;E.param=function(e,t){var n,r=[],o=function(e,t){t=E.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=E.ajaxSettings&&E.ajaxSettings.traditional),E.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,function(){o(this.name,this.value)});else for(n in e)g(n,e[n],t,o);return r.join("&").replace(ue,"+")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&de.test(this.nodeName)&&!fe.test(e)&&(this.checked||!rcheckableType.test(e))}).map(function(e,t){var n=E(this).val();return null==n?null:E.isArray(n)?E.map(n,function(e){return{name:t.name,value:e.replace(le,"\r\n")}}):{name:t.name,value:n.replace(le,"\r\n")}}).get()}}),E.ajaxSettings.xhr=void 0!==window.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&y()||v()}:y;var he=0,pe={},ge=E.ajaxSettings.xhr();window.ActiveXObject&&E(window).on("unload",function(){for(var e in pe)pe[e](void 0,!0)}),A.cors=!!ge&&"withCredentials"in ge,ge=A.ajax=!!ge,ge&&E.ajaxTransport(function(e){if(!e.crossDomain||A.cors){var t;return{send:function(n,r){var o,i=e.xhr(),a=++he;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 pe[a],t=void 0,i.onreadystatechange=E.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=pe[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),E.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=j.head||E("head")[0]||j.documentElement;return{send:function(r,o){t=j.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 E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=ye.pop()||E.expando+"_"+W++;return this[e]=!0,e}}),E.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=E.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||E.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&&E.isFunction(o)&&o(i[0]),i=o=void 0}),"script"}),E.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||j;var r=rsingleTag.exec(e),o=!n&&[];return r?[t.createElement(r[1])]:(r=E.buildFragment([e],t,o),o&&o.length&&E(o).remove(),E.merge([],r.childNodes))},E}(),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 p,i=e.TaskId,a=e.Bucket,u=e.Region,l=e.Key,f=e.Body,d=e.ChunkSize||e.SliceSize||this.options.ChunkSize,h=e.AsyncLimit,y=e.StorageClass||"Standard",v=this,m=e.onProgress,C=e.onHashProgress;r.on("error",function(e){if(v._isRunningTask(i))return t(e)}),r.on("upload_complete",function(e){t(null,e)}),r.on("upload_slice_complete",function(e){c.call(v,{Bucket:a,Region:u,Key:l,UploadId:e.UploadId,SliceList:e.SliceList},function(e,t){if(v._isRunningTask(i))return e?r.emit("error",e):void r.emit("upload_complete",t)})}),r.on("get_upload_data_finish",function(e){s.call(v,{TaskId:i,Bucket:a,Region:u,Key:l,Body:f,FileSize:n,SliceSize:d,AsyncLimit:h,UploadData:e,onProgress:m},function(e,t){if(v._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,StorageClass:y,Body:f,FileSize:n,SliceSize:d,onHashProgress:C}),o.call(v,t,function(t,n){if(v._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=f.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=p?c%l||l:l),!e.Uploaded}),m=g.throttleOnProgress.call(n,c,e.onProgress);h.eachLimit(v,f,function(e,t){if(n._isRunningTask(r)){var f=e.PartNumber,h=Math.min(c,e.PartNumber*l)-(e.PartNumber-1)*l,p=0;u.call(n,{TaskId:r,Bucket:o,Region:i,Key:a,SliceSize:l,FileSize:c,PartNumber:f,Body:d,UploadData:s,onProgress:function(e){y+=e.loaded-p,p=e.loaded,m({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-=p:(y+=h-p,e.ETag=i.ETag),t(o||null,i))})}},function(e){if(n._isRunningTask(r)){if(m(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.UploadData,f=this,d=c*(u-1),p=c,y=d+c;y>a&&(y=a,p=y-d);var v=g.fileSlice(s,d,y),m=l.PartList[u-1],C=m.ETag;h.retry(3,function(t){f._isRunningTask(n)&&f.multipartUpload({TaskId:n,Bucket:r,Region:o,Key:i,ContentLength:p,ContentSha1:C,PartNumber:u,UploadId:l.UploadId,Body:v,onProgress:e.onProgress},function(e,r){if(f._isRunningTask(n))return e?t(e):(m.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 p;if(l.on("error",function(e){return t(e)}),l.on("get_abort_array",function(e){f.call(c,{Bucket:n,Region:r,Key:o,AsyncLimit:u,AbortArray:e},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 f(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);h.eachLimit(i,a,function(e,t){var i=u;if(o&&o!=e.Key)return t(null,{KeyNotMatch:!0});var a=e.UploadId||e.UploadID;s.multipartAbort({Bucket:n,Region:r,Key:e.Key,UploadId:a},function(o,s){var u={Bucket:n,Region:r,Key:e.Key,UploadId:a};c[i]={error:o,task:u},t(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(f)}var h=n(20),p=n(3).EventProxy,g=n(0),y={sliceUploadFile:r,abortUploadTask:l,uploadFiles:d};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) { @@ -1180,6 +1182,7 @@ function optionsObject(params, callback) { * @param {String} Expect 请求的特定的服务器行为 * @param {String} Expires 响应过期的日期和时间 * @param {String} ContentLanguage 指定内容语言 + * @param {String} params.ServiceSideEncryption 支持按照指定的加密算法进行服务端数据加密,格式 x-cos-server-side-encryption: "AES256",非必须 * @param {String} x-cos-meta-* 允许用户自定义的头部信息,将作为 Object 元数据返回。大小限制2K。 */ function putObjectCopy(params, callback) { @@ -1203,6 +1206,7 @@ function putObjectCopy(params, callback) { headers['Content-Type'] = params['ContentType']; headers['Expect'] = params['Expect']; headers['Expires'] = params['Expires']; + headers['x-cos-server-side-encryption'] = params['ServiceSideEncryption']; for (var key in params) { if (key.indexOf('x-cos-meta-') > -1) { @@ -1330,6 +1334,7 @@ function deleteMultipleObject(params, callback) { * @param {String} params.GrantWrite 赋予被授权者写的权限 ,非必须 * @param {String} params.GrantFullControl 赋予被授权者读写权限 ,非必须 * @param {String} params.StorageClass 设置Object的存储级别,枚举值:Standard,Standard_IA,Nearline,非必须 + * @param {String} params.ServiceSideEncryption 支持按照指定的加密算法进行服务端数据加密,格式 x-cos-server-side-encryption: "AES256",非必须 * @param {Function} callback 回调函数,必须 * @return {Object} err 请求失败的错误,如果请求成功,则为空。 * @return {Object} data 返回的数据 @@ -1348,6 +1353,7 @@ function multipartInit(params, callback) { headers['x-cos-grant-write'] = params['GrantWrite']; headers['x-cos-grant-full-control'] = params['GrantFullControl']; headers['x-cos-storage-class'] = params['StorageClass']; + headers['x-cos-server-side-encryption'] = params['ServiceSideEncryption']; for (var key in params) { if (key.indexOf('x-cos-meta-') > -1) {