From b8ab6cf0fdebddd2678eaf275d6d69948613aeb8 Mon Sep 17 00:00:00 2001 From: tokune Date: Mon, 6 May 2019 14:27:56 +0800 Subject: [PATCH] 3.3.8 --- dist/upyun.common.js | 29 ++++++++++++++++++++--------- dist/upyun.esm.js | 29 ++++++++++++++++++++--------- dist/upyun.js | 29 ++++++++++++++++++++--------- dist/upyun.min.js | 4 ++-- package.json | 2 +- 5 files changed, 63 insertions(+), 30 deletions(-) diff --git a/dist/upyun.common.js b/dist/upyun.common.js index 853b2a9..0366bb1 100644 --- a/dist/upyun.common.js +++ b/dist/upyun.common.js @@ -1,5 +1,5 @@ /** - * UPYUN js-sdk 3.3.6 + * UPYUN js-sdk 3.3.8 * (c) 2019 * @license MIT */ @@ -168,11 +168,11 @@ function formUpload(remoteUrl, localFile, _ref) { } var name = "upyun"; -var version = "3.3.6"; +var version = "3.3.8"; var description = "UPYUN js sdk"; var main = "dist/upyun.common.js"; var module$1 = "dist/upyun.esm.js"; -var scripts = { "build": "node build/build.js", "test": "npm run test:server && npm run test:client", "test:client": "karma start tests/karma.conf.js", "test:server": "mocha --compilers js:babel-register tests/server/*" }; +var scripts = { "build": "node build/build.js", "lint": "eslint .", "test": "npm run test:server && npm run test:client", "test:client": "karma start tests/karma.conf.js", "test:server": "mocha --compilers js:babel-register tests/server/*", "preversion": "npm run lint && npm run test", "version": "npm run build && git add -A dist", "postversion": "git push && git push --tags" }; var repository = { "type": "git", "url": "git@github.com:upyun/node-sdk.git" }; var engines = { "node": ">=8.0.0" }; var keywords = ["upyun", "js", "nodejs", "sdk", "cdn", "cloud", "storage"]; @@ -181,7 +181,7 @@ var license = "MIT"; var bugs = { "url": "https://github.com/upyun/node-sdk/issues" }; var homepage = "https://github.com/upyun/node-sdk"; var contributors = [{ "name": "yejingx", "email": "yejingx@gmail.com" }, { "name": "Leigh", "email": "i@zhuli.me" }, { "name": "kaidiren", "email": "kaidiren@gmail.com" }, { "name": "Gaara", "email": "sabakugaara@users.noreply.github.com" }]; -var devDependencies = { "babel-cli": "^6.24.1", "babel-loader": "^7.0.0", "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.4.0", "babel-register": "^6.24.1", "chai": "^3.5.0", "istanbul": "^0.4.3", "karma": "^1.7.0", "karma-chrome-launcher": "^2.1.1", "karma-mocha": "^1.3.0", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^2.0.3", "mocha": "^3.4.1", "rollup": "^0.41.6", "rollup-plugin-alias": "^1.3.1", "rollup-plugin-babel": "^2.7.1", "rollup-plugin-commonjs": "^8.0.2", "rollup-plugin-json": "^2.1.1", "rollup-plugin-node-resolve": "^3.0.0", "should": "^9.0.2", "uglify-js": "^3.0.11", "webpack": "^2.5.1" }; +var devDependencies = { "babel-cli": "^6.24.1", "babel-loader": "^7.0.0", "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.4.0", "babel-register": "^6.24.1", "chai": "^3.5.0", "eslint": "^5.16.0", "istanbul": "^0.4.3", "karma": "^1.7.0", "karma-chrome-launcher": "^2.1.1", "karma-mocha": "^1.3.0", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^2.0.3", "mocha": "^3.4.1", "rollup": "^0.41.6", "rollup-plugin-alias": "^1.3.1", "rollup-plugin-babel": "^2.7.1", "rollup-plugin-commonjs": "^8.0.2", "rollup-plugin-json": "^2.1.1", "rollup-plugin-node-resolve": "^3.0.0", "should": "^9.0.2", "uglify-js": "^3.0.11", "webpack": "^2.5.1" }; var dependencies = { "axios": "^0.16.1", "base-64": "^0.1.0", "form-data": "^2.1.4", "hmacsha1": "^1.0.0", "md5": "^2.2.1", "mime-types": "^2.1.15" }; var browser = { "./upyun/utils.js": "./upyun/browser-utils.js", "./upyun/form-upload.js": "./upyun/browser-form-upload.js" }; var pkg = { @@ -386,6 +386,10 @@ var slicedToArray = function () { }; }(); +/** + * @class + */ + var Upyun = function () { /** * @param {object} service - a instance of Service class @@ -686,14 +690,14 @@ var Upyun = function () { var start = partId * PARTSIZE; var fileSizePromise = void 0; - var contentType = void 0; + // let contentType if (isBrowser) { fileSizePromise = Promise.resolve(fileOrPath.size); - contentType = fileOrPath.type; + // contentType = fileOrPath.type } else { fileSizePromise = utils.getFileSizeAsync(fileOrPath); - contentType = utils.getContentType(fileOrPath); + // contentType = utils.getContentType(fileOrPath) } var blockPromise = fileSizePromise.then(function (fileSize) { @@ -751,8 +755,11 @@ var Upyun = function () { return Promise.resolve(false); } - var params = ['x-upyun-file-type', 'x-upyun-file-size', 'x-upyun-file-date', 'Content-Md5']; - var result = {}; + var params = ['x-upyun-file-type', 'x-upyun-file-size', 'x-upyun-file-date']; + var result = { + 'Content-Md5': headers['content-md5'] || '' + }; + params.forEach(function (item) { var key = item.split('x-upyun-file-')[1]; if (headers[item]) { @@ -1035,6 +1042,10 @@ function key2LowerCase(obj) { return objLower; } +/** + * @class + */ + var Service = function Service(serviceName) { var operatorName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var password = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; diff --git a/dist/upyun.esm.js b/dist/upyun.esm.js index 6fb2845..7069405 100644 --- a/dist/upyun.esm.js +++ b/dist/upyun.esm.js @@ -1,5 +1,5 @@ /** - * UPYUN js-sdk 3.3.6 + * UPYUN js-sdk 3.3.8 * (c) 2019 * @license MIT */ @@ -328,11 +328,11 @@ var base64 = createCommonjsModule(function (module, exports) { }); var name = "upyun"; -var version = "3.3.6"; +var version = "3.3.8"; var description = "UPYUN js sdk"; var main = "dist/upyun.common.js"; var module$1 = "dist/upyun.esm.js"; -var scripts = { "build": "node build/build.js", "test": "npm run test:server && npm run test:client", "test:client": "karma start tests/karma.conf.js", "test:server": "mocha --compilers js:babel-register tests/server/*" }; +var scripts = { "build": "node build/build.js", "lint": "eslint .", "test": "npm run test:server && npm run test:client", "test:client": "karma start tests/karma.conf.js", "test:server": "mocha --compilers js:babel-register tests/server/*", "preversion": "npm run lint && npm run test", "version": "npm run build && git add -A dist", "postversion": "git push && git push --tags" }; var repository = { "type": "git", "url": "git@github.com:upyun/node-sdk.git" }; var engines = { "node": ">=8.0.0" }; var keywords = ["upyun", "js", "nodejs", "sdk", "cdn", "cloud", "storage"]; @@ -341,7 +341,7 @@ var license = "MIT"; var bugs = { "url": "https://github.com/upyun/node-sdk/issues" }; var homepage = "https://github.com/upyun/node-sdk"; var contributors = [{ "name": "yejingx", "email": "yejingx@gmail.com" }, { "name": "Leigh", "email": "i@zhuli.me" }, { "name": "kaidiren", "email": "kaidiren@gmail.com" }, { "name": "Gaara", "email": "sabakugaara@users.noreply.github.com" }]; -var devDependencies = { "babel-cli": "^6.24.1", "babel-loader": "^7.0.0", "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.4.0", "babel-register": "^6.24.1", "chai": "^3.5.0", "istanbul": "^0.4.3", "karma": "^1.7.0", "karma-chrome-launcher": "^2.1.1", "karma-mocha": "^1.3.0", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^2.0.3", "mocha": "^3.4.1", "rollup": "^0.41.6", "rollup-plugin-alias": "^1.3.1", "rollup-plugin-babel": "^2.7.1", "rollup-plugin-commonjs": "^8.0.2", "rollup-plugin-json": "^2.1.1", "rollup-plugin-node-resolve": "^3.0.0", "should": "^9.0.2", "uglify-js": "^3.0.11", "webpack": "^2.5.1" }; +var devDependencies = { "babel-cli": "^6.24.1", "babel-loader": "^7.0.0", "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.4.0", "babel-register": "^6.24.1", "chai": "^3.5.0", "eslint": "^5.16.0", "istanbul": "^0.4.3", "karma": "^1.7.0", "karma-chrome-launcher": "^2.1.1", "karma-mocha": "^1.3.0", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^2.0.3", "mocha": "^3.4.1", "rollup": "^0.41.6", "rollup-plugin-alias": "^1.3.1", "rollup-plugin-babel": "^2.7.1", "rollup-plugin-commonjs": "^8.0.2", "rollup-plugin-json": "^2.1.1", "rollup-plugin-node-resolve": "^3.0.0", "should": "^9.0.2", "uglify-js": "^3.0.11", "webpack": "^2.5.1" }; var dependencies = { "axios": "^0.16.1", "base-64": "^0.1.0", "form-data": "^2.1.4", "hmacsha1": "^1.0.0", "md5": "^2.2.1", "mime-types": "^2.1.15" }; var browser = { "./upyun/utils.js": "./upyun/browser-utils.js", "./upyun/form-upload.js": "./upyun/browser-form-upload.js" }; var pkg = { @@ -864,6 +864,10 @@ var slicedToArray = function () { }; }(); +/** + * @class + */ + var Upyun = function () { /** * @param {object} service - a instance of Service class @@ -1164,14 +1168,14 @@ var Upyun = function () { var start = partId * PARTSIZE; var fileSizePromise = void 0; - var contentType = void 0; + // let contentType if (isBrowser) { fileSizePromise = Promise.resolve(fileOrPath.size); - contentType = fileOrPath.type; + // contentType = fileOrPath.type } else { fileSizePromise = utils.getFileSizeAsync(fileOrPath); - contentType = utils.getContentType(fileOrPath); + // contentType = utils.getContentType(fileOrPath) } var blockPromise = fileSizePromise.then(function (fileSize) { @@ -1229,8 +1233,11 @@ var Upyun = function () { return Promise.resolve(false); } - var params = ['x-upyun-file-type', 'x-upyun-file-size', 'x-upyun-file-date', 'Content-Md5']; - var result = {}; + var params = ['x-upyun-file-type', 'x-upyun-file-size', 'x-upyun-file-date']; + var result = { + 'Content-Md5': headers['content-md5'] || '' + }; + params.forEach(function (item) { var key = item.split('x-upyun-file-')[1]; if (headers[item]) { @@ -1513,6 +1520,10 @@ function key2LowerCase(obj) { return objLower; } +/** + * @class + */ + var Service = function Service(serviceName) { var operatorName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var password = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; diff --git a/dist/upyun.js b/dist/upyun.js index 6731991..f554aba 100644 --- a/dist/upyun.js +++ b/dist/upyun.js @@ -1,5 +1,5 @@ /** - * UPYUN js-sdk 3.3.6 + * UPYUN js-sdk 3.3.8 * (c) 2019 * @license MIT */ @@ -334,11 +334,11 @@ var base64 = createCommonjsModule(function (module, exports) { }); var name = "upyun"; -var version = "3.3.6"; +var version = "3.3.8"; var description = "UPYUN js sdk"; var main = "dist/upyun.common.js"; var module$1 = "dist/upyun.esm.js"; -var scripts = { "build": "node build/build.js", "test": "npm run test:server && npm run test:client", "test:client": "karma start tests/karma.conf.js", "test:server": "mocha --compilers js:babel-register tests/server/*" }; +var scripts = { "build": "node build/build.js", "lint": "eslint .", "test": "npm run test:server && npm run test:client", "test:client": "karma start tests/karma.conf.js", "test:server": "mocha --compilers js:babel-register tests/server/*", "preversion": "npm run lint && npm run test", "version": "npm run build && git add -A dist", "postversion": "git push && git push --tags" }; var repository = { "type": "git", "url": "git@github.com:upyun/node-sdk.git" }; var engines = { "node": ">=8.0.0" }; var keywords = ["upyun", "js", "nodejs", "sdk", "cdn", "cloud", "storage"]; @@ -347,7 +347,7 @@ var license = "MIT"; var bugs = { "url": "https://github.com/upyun/node-sdk/issues" }; var homepage = "https://github.com/upyun/node-sdk"; var contributors = [{ "name": "yejingx", "email": "yejingx@gmail.com" }, { "name": "Leigh", "email": "i@zhuli.me" }, { "name": "kaidiren", "email": "kaidiren@gmail.com" }, { "name": "Gaara", "email": "sabakugaara@users.noreply.github.com" }]; -var devDependencies = { "babel-cli": "^6.24.1", "babel-loader": "^7.0.0", "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.4.0", "babel-register": "^6.24.1", "chai": "^3.5.0", "istanbul": "^0.4.3", "karma": "^1.7.0", "karma-chrome-launcher": "^2.1.1", "karma-mocha": "^1.3.0", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^2.0.3", "mocha": "^3.4.1", "rollup": "^0.41.6", "rollup-plugin-alias": "^1.3.1", "rollup-plugin-babel": "^2.7.1", "rollup-plugin-commonjs": "^8.0.2", "rollup-plugin-json": "^2.1.1", "rollup-plugin-node-resolve": "^3.0.0", "should": "^9.0.2", "uglify-js": "^3.0.11", "webpack": "^2.5.1" }; +var devDependencies = { "babel-cli": "^6.24.1", "babel-loader": "^7.0.0", "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.4.0", "babel-register": "^6.24.1", "chai": "^3.5.0", "eslint": "^5.16.0", "istanbul": "^0.4.3", "karma": "^1.7.0", "karma-chrome-launcher": "^2.1.1", "karma-mocha": "^1.3.0", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^2.0.3", "mocha": "^3.4.1", "rollup": "^0.41.6", "rollup-plugin-alias": "^1.3.1", "rollup-plugin-babel": "^2.7.1", "rollup-plugin-commonjs": "^8.0.2", "rollup-plugin-json": "^2.1.1", "rollup-plugin-node-resolve": "^3.0.0", "should": "^9.0.2", "uglify-js": "^3.0.11", "webpack": "^2.5.1" }; var dependencies = { "axios": "^0.16.1", "base-64": "^0.1.0", "form-data": "^2.1.4", "hmacsha1": "^1.0.0", "md5": "^2.2.1", "mime-types": "^2.1.15" }; var browser = { "./upyun/utils.js": "./upyun/browser-utils.js", "./upyun/form-upload.js": "./upyun/browser-form-upload.js" }; var pkg = { @@ -870,6 +870,10 @@ var slicedToArray = function () { }; }(); +/** + * @class + */ + var Upyun = function () { /** * @param {object} service - a instance of Service class @@ -1170,14 +1174,14 @@ var Upyun = function () { var start = partId * PARTSIZE; var fileSizePromise = void 0; - var contentType = void 0; + // let contentType if (isBrowser) { fileSizePromise = Promise.resolve(fileOrPath.size); - contentType = fileOrPath.type; + // contentType = fileOrPath.type } else { fileSizePromise = utils.getFileSizeAsync(fileOrPath); - contentType = utils.getContentType(fileOrPath); + // contentType = utils.getContentType(fileOrPath) } var blockPromise = fileSizePromise.then(function (fileSize) { @@ -1235,8 +1239,11 @@ var Upyun = function () { return Promise.resolve(false); } - var params = ['x-upyun-file-type', 'x-upyun-file-size', 'x-upyun-file-date', 'Content-Md5']; - var result = {}; + var params = ['x-upyun-file-type', 'x-upyun-file-size', 'x-upyun-file-date']; + var result = { + 'Content-Md5': headers['content-md5'] || '' + }; + params.forEach(function (item) { var key = item.split('x-upyun-file-')[1]; if (headers[item]) { @@ -1519,6 +1526,10 @@ function key2LowerCase(obj) { return objLower; } +/** + * @class + */ + var Service = function Service(serviceName) { var operatorName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var password = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; diff --git a/dist/upyun.min.js b/dist/upyun.min.js index 0cb5d7d..380da6c 100644 --- a/dist/upyun.min.js +++ b/dist/upyun.min.js @@ -1,6 +1,6 @@ /** - * UPYUN js-sdk 3.3.6 + * UPYUN js-sdk 3.3.8 * (c) 2019 * @license MIT */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("axios")):"function"==typeof define&&define.amd?define(["axios"],t):e.upyun=t(e.axios)}(this,function(c){"use strict";c="default"in c?c.default:c;var h="undefined"!=typeof window&&("undefined"==typeof process||"browser"===process.title),a=1048576,e=c.defaults.adapter;c.defaults.adapter=h?e:require("axios/lib/adapters/http");var v={readBlockAsync:function(n,o,i){return new Promise(function(e,t){var r=n.slice||n.mozSlice||n.webkitSlice;return r?e(r.call(n,o,i)):t(new Error("not support File type!"))})}};var u=function(e,t,i,a){function w(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function k(e,t){return e<>>32-t}function s(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r,n,o,i,u,a=[80],s=1732584193,l=-271733879,c=-1732584194,f=271733878,h=-1009589776,v=0;v>5]|=(e.charCodeAt(n/8)&r)<<32-a-n%32;return t}return i||(i="="),a||(a=8),function(e){for(var t="",r=0;r<4*e.length;r+=3)for(var n=(e[r>>2]>>8*(3-r%4)&255)<<16|(e[r+1>>2]>>8*(3-(r+1)%4)&255)<<8|e[r+2>>2]>>8*(3-(r+2)%4)&255,o=0;o<4;o++)8*r+6*o>32*e.length?t+=i:t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6*(3-o)&63);return t}(function(e,t){var r=l(e);16>18&63)+c.charAt(o>>12&63)+c.charAt(o>>6&63)+c.charAt(63&o);return 2==i?(t=e.charCodeAt(a)<<8,r=e.charCodeAt(++a),u+=c.charAt((o=t+r)>>10)+c.charAt(o>>4&63)+c.charAt(o<<2&63)+"="):1==i&&(o=e.charCodeAt(a),u+=c.charAt(o>>2)+c.charAt(o<<4&63)+"=="),u},decode:function(e){var t=(e=String(e).replace(a,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&l("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,o=0,i="",u=-1;++u>(-2*o&6)));return i},version:"0.1.0"};if(t&&!t.nodeType)if(r)r.exports=i;else for(var u in i)i.hasOwnProperty(u)&&(t[u]=i[u]);else e.base64=i}(d)}),i="3.3.6",r=t(function(e){var i,r;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,n=0;r>>6-2*n);return t}},e.exports=r}),o={utf8:{stringToBytes:function(e){return o.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(o.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r>>24)|4278255360&(r[s]<<24|r[s]>>>8);r[n>>>5]|=128<>>9<<4)]=n;var l=w._ff,c=w._gg,f=w._hh,h=w._ii;for(s=0;s>>0,i=i+d>>>0,u=u+p>>>0,a=a+y>>>0}return g.endian([o,i,u,a])})._ff=function(e,t,r,n,o,i,u){var a=e+(t&r|~t&n)+(o>>>0)+u;return(a<>>32-i)+t},w._gg=function(e,t,r,n,o,i,u){var a=e+(t&n|r&~n)+(o>>>0)+u;return(a<>>32-i)+t},w._hh=function(e,t,r,n,o,i,u){var a=e+(t^r^n)+(o>>>0)+u;return(a<>>32-i)+t},w._ii=function(e,t,r,n,o,i,u){var a=e+(r^(t|~n))+(o>>>0)+u;return(a<>>32-i)+t},w._blocksize=16,w._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=g.wordsToBytes(w(e,t));return t&&t.asBytes?r:t&&t.asString?x.bytesToString(r):g.bytesToHex(r)}});function y(e,t){var r=t.method,n=t.path,o=[r,encodeURI(n)];["date","policy","contentMd5"].forEach(function(e){t[e]&&o.push(t[e])});var i=u(e.password,o.join("&"));return"UPYUN "+e.operatorName+":"+i}var g={genSign:y,getHeaderSign:function(e,t,r){var n=3>16)+(t>>16)+(r>>16)<<16|65535&r}function k(e,t){return e<>>32-t}function s(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r,n,o,i,u,a=[80],s=1732584193,l=-271733879,c=-1732584194,f=271733878,h=-1009589776,d=0;d>5]|=(e.charCodeAt(n/8)&r)<<32-a-n%32;return t}return i||(i="="),a||(a=8),function(e){for(var t="",r=0;r<4*e.length;r+=3)for(var n=(e[r>>2]>>8*(3-r%4)&255)<<16|(e[r+1>>2]>>8*(3-(r+1)%4)&255)<<8|e[r+2>>2]>>8*(3-(r+2)%4)&255,o=0;o<4;o++)8*r+6*o>32*e.length?t+=i:t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6*(3-o)&63);return t}(function(e,t){var r=l(e);16>18&63)+c.charAt(o>>12&63)+c.charAt(o>>6&63)+c.charAt(63&o);return 2==i?(t=e.charCodeAt(a)<<8,r=e.charCodeAt(++a),u+=c.charAt((o=t+r)>>10)+c.charAt(o>>4&63)+c.charAt(o<<2&63)+"="):1==i&&(o=e.charCodeAt(a),u+=c.charAt(o>>2)+c.charAt(o<<4&63)+"=="),u},decode:function(e){var t=(e=String(e).replace(a,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),t%4!=1&&!/[^+a-zA-Z0-9/]/.test(e)||l("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,o=0,i="",u=-1;++u>(-2*o&6)));return i},version:"0.1.0"};if(t&&!t.nodeType)if(r)r.exports=i;else for(var u in i)i.hasOwnProperty(u)&&(t[u]=i[u]);else e.base64=i}(d)}),i="3.3.8",o=t(function(e){var i,r;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,n=0;r>>6-2*n);return t}},e.exports=r}),c={utf8:{stringToBytes:function(e){return c.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(c.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r>>24)|4278255360&(r[s]<<24|r[s]>>>8);r[n>>>5]|=128<>>9<<4)]=n;var l=w._ff,c=w._gg,f=w._hh,h=w._ii;for(s=0;s>>0,i=i+v>>>0,u=u+p>>>0,a=a+y>>>0}return g.endian([o,i,u,a])})._ff=function(e,t,r,n,o,i,u){var a=e+(t&r|~t&n)+(o>>>0)+u;return(a<>>32-i)+t},w._gg=function(e,t,r,n,o,i,u){var a=e+(t&n|r&~n)+(o>>>0)+u;return(a<>>32-i)+t},w._hh=function(e,t,r,n,o,i,u){var a=e+(t^r^n)+(o>>>0)+u;return(a<>>32-i)+t},w._ii=function(e,t,r,n,o,i,u){var a=e+(r^(t|~n))+(o>>>0)+u;return(a<>>32-i)+t},w._blocksize=16,w._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=g.wordsToBytes(w(e,t));return t&&t.asBytes?r:t&&t.asString?x.bytesToString(r):g.bytesToHex(r)}});function y(e,t){var r=t.method,n=t.path,o=[r,encodeURI(n)];["date","policy","contentMd5"].forEach(function(e){t[e]&&o.push(t[e])});var i=l(e.password,o.join("&"));return"UPYUN "+e.operatorName+":"+i}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var m={genSign:y,getHeaderSign:function(e,t,r){var n=3