diff --git a/demo-album/lib/cos-wx-sdk-v5.js b/demo-album/lib/cos-wx-sdk-v5.js index 5e5eda6..04b895d 100644 --- a/demo-album/lib/cos-wx-sdk-v5.js +++ b/demo-album/lib/cos-wx-sdk-v5.js @@ -6450,7 +6450,7 @@ module.exports = function(module) { /*! exports provided: name, version, description, main, scripts, repository, author, license, dependencies, devDependencies, default */ /***/ (function(module) { -module.exports = JSON.parse("{\"name\":\"cos-wx-sdk-v5\",\"version\":\"1.4.1\",\"description\":\"小程序 SDK for [腾讯云对象存储服务](https://cloud.tencent.com/product/cos)\",\"main\":\"demo/lib/cos-wx-sdk-v5.min.js\",\"scripts\":{\"dev\":\"cross-env NODE_ENV=development node build.js --mode=development\",\"build\":\"cross-env NODE_ENV=production node build.js --mode=production\",\"sts.js\":\"node server/sts.js\"},\"repository\":{\"type\":\"git\",\"url\":\"http://github.com/tencentyun/cos-wx-sdk-v5.git\"},\"author\":\"carsonxu\",\"license\":\"ISC\",\"dependencies\":{\"mime\":\"^2.4.6\",\"@xmldom/xmldom\":\"^0.8.2\"},\"devDependencies\":{\"babel-core\":\"6.26.3\",\"babel-loader\":\"8.2.5\",\"@babel/preset-env\":\"7.16.11\",\"body-parser\":\"^1.18.3\",\"cross-env\":\"^7.0.3\",\"express\":\"^4.17.1\",\"qcloud-cos-sts\":\"^3.0.2\",\"terser-webpack-plugin\":\"4.2.3\",\"webpack\":\"4.46.0\",\"webpack-cli\":\"4.10.0\"}}"); +module.exports = JSON.parse("{\"name\":\"cos-wx-sdk-v5\",\"version\":\"1.4.2\",\"description\":\"小程序 SDK for [腾讯云对象存储服务](https://cloud.tencent.com/product/cos)\",\"main\":\"demo/lib/cos-wx-sdk-v5.min.js\",\"scripts\":{\"dev\":\"cross-env NODE_ENV=development node build.js --mode=development\",\"build\":\"cross-env NODE_ENV=production node build.js --mode=production\",\"sts.js\":\"node server/sts.js\"},\"repository\":{\"type\":\"git\",\"url\":\"http://github.com/tencentyun/cos-wx-sdk-v5.git\"},\"author\":\"carsonxu\",\"license\":\"ISC\",\"dependencies\":{\"mime\":\"^2.4.6\",\"@xmldom/xmldom\":\"^0.8.2\"},\"devDependencies\":{\"babel-core\":\"6.26.3\",\"babel-loader\":\"8.2.5\",\"@babel/preset-env\":\"7.16.11\",\"body-parser\":\"^1.18.3\",\"cross-env\":\"^7.0.3\",\"express\":\"^4.17.1\",\"qcloud-cos-sts\":\"^3.0.2\",\"terser-webpack-plugin\":\"4.2.3\",\"webpack\":\"4.46.0\",\"webpack-cli\":\"4.10.0\"}}"); /***/ }), @@ -7395,7 +7395,7 @@ function uploadFile(params, callback) { }; // 上传链路 if (self.options.EnableTracker) { - var accelerate = self.options.UseAccelerate || self.options.Domain.includes('accelerate.'); + var accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); params.tracker = new Tracker({ bucket: params.Bucket, region: params.Region, @@ -7487,7 +7487,7 @@ function uploadFiles(params, callback) { TotalSize += FileSize; // 单个文件上传链路 if (self.options.EnableTracker) { - var accelerate = self.options.UseAccelerate || self.options.Domain.includes('accelerate.'); + var accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); fileParams.tracker = new Tracker({ bucket: fileParams.Bucket, region: fileParams.Region, @@ -12731,7 +12731,8 @@ var Tracker = /*#__PURE__*/function () { deepTracker = opt.deepTracker; var appid = bucket && bucket.substr(bucket.lastIndexOf('-') + 1) || ''; this.parent = parent; - this.deepTracker = deepTracker; // 上报用到的字段 + this.deepTracker = deepTracker; + this.delay = delay; // 上报用到的字段 this.params = { // 通用字段 @@ -12888,19 +12889,19 @@ var Tracker = /*#__PURE__*/function () { } var eventCode = getEventCode(this.params.name); - var formattedParams = formatParams(this.params); - console.log(eventCode, formattedParams); + var formattedParams = formatParams(this.params); // 兜底处理 + + if (!this.beacon) { + this.beacon = getBeacon(this.delay || 5000); + } if (this.params.delay === 0) { // 实时上报 - this.beacon.onDirectUserAction(eventCode, formattedParams); + this.beacon && this.beacon.onDirectUserAction(eventCode, formattedParams); } else { // 周期性上报 - this.beacon.onUserAction(eventCode, formattedParams); - } // 上报结束即销毁 - - - this.destroy(); + this.beacon && this.beacon.onUserAction(eventCode, formattedParams); + } } // 生成子实例,与父所属一个链路,可用于分块上传内部流程上报单个分块操作 }, { @@ -12917,13 +12918,6 @@ var Tracker = /*#__PURE__*/function () { delay: this.params.delay }); return new Tracker(subParams); - } // 链路结束后销毁实例 - - }, { - key: "destroy", - value: function destroy() { - this.beacon = null; - this.params = {}; } }]); diff --git a/demo-album/lib/cos-wx-sdk-v5.min.js b/demo-album/lib/cos-wx-sdk-v5.min.js index 616f6f0..fca3567 100644 --- a/demo-album/lib/cos-wx-sdk-v5.min.js +++ b/demo-album/lib/cos-wx-sdk-v5.min.js @@ -1,2 +1,2 @@ -!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()}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/Users/tianfeng/Documents/项目/sdk/cos-wx-sdk-v5/demo/lib",n(n.s=10)}([function(e,t,n){"use strict";(function(t){function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function p(e,t,n,i){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),r=new w(i||[]);return a._invoke=function(e,t,n){var i="suspendedStart";return function(o,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw a;return T()}for(n.method=o,n.arg=a;;){var r=n.delegate;if(r){var s=C(r,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}(e,n,r),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=p;var d={};function f(){}function m(){}function h(){}var g={};l(g,r,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(E([])));y&&y!==t&&n.call(y,r)&&(g=y);var x=h.prototype=f.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function i(o,r,s,c){var l=u(e[o],e,r);if("throw"!==l.type){var p=l.arg,d=p.value;return d&&"object"==a(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,s,c)}),(function(e){i("throw",e,s,c)})):t.resolve(d).then((function(e){p.value=e,s(p)}),(function(e){return i("throw",e,s,c)}))}c(l.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,o){i(e,n,t,o)}))}return o=o?o.then(a,a):a()}}function C(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function t(){for(;++i=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function o(e,t,n,i,o,a,r){try{var s=e[a](r),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var r=n(12),s=n(15),c=n(16),l=n(21),p=n(5).btoa,u=wx.getFileSystemManager(),d=n(6);function f(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function m(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(t?f(i).toLowerCase():i);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var h=["content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","response-cache-control","response-content-disposition","response-content-encoding","response-content-language","response-content-type","response-expires","transfer-encoding","versionid"],g=function(){},v=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]);return t};function y(e){return C(e,(function(e){return"object"===a(e)&&null!==e?y(e):e}))}function x(e,t){return k(t,(function(n,i){e[i]=t[i]})),e}function b(e){return e instanceof Array}function k(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function C(e,t){var n=b(e)?[]:{};for(var i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i));return n}var S=function(e,t){if(t=x({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var n=t.Headers||{};if(t&&"object"===a(t)){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(n[e]=t[e])}();R.each({"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext"},(function(e,i){void 0!==t[e]&&(n[i]=t[e])})),t.Headers=v(n)}}return t},_=function(e){return new Promise((function(t,n){u.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){n((null==e?void 0:e.errMsg)||"")}})}))},w=function(){var e,t=(e=i().mark((function e(t,n,o){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}o(),e.next=21;break;case 4:if("putObject"!==t){e.next=20;break}if(void 0!==n.Body||!n.FilePath){e.next=17;break}return e.prev=6,e.next=9,_(n.FilePath);case 9:n.Body=e.sent,e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(6),n.Body=void 0,o({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==n.Body?(n.ContentLength=n.Body.byteLength,o(null,n.ContentLength)):o({error:"missing param Body"}),e.next=21;break;case 20:n.FilePath?u.stat({path:n.FilePath,success:function(e){var t=e.stats;n.FileStat=t,n.FileStat.FilePath=n.FilePath;var i=t.isDirectory()?0:t.size;n.ContentLength=i=i||0,o(null,i)},fail:function(e){o(e)}}):o({error:"missing param FilePath"});case 21:case"end":return e.stop()}}),e,null,[[6,12]])})),function(){var t=this,n=arguments;return new Promise((function(i,a){var r=e.apply(t,n);function s(e){o(r,i,a,s,c,"next",e)}function c(e){o(r,i,a,s,c,"throw",e)}s(void 0)}))});return function(e,n,i){return t.apply(this,arguments)}}(),E=function(e){return Date.now()+(e||0)},T=function(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.lengtha)return 1;if(o=0;!t&&e.platform;return function(){return!1,t}}(),R={noop:g,formatParams:S,apiWrapper:function(e,n){return function(i,o){var a,r=this;if("function"==typeof i&&(o=i,i={}),i=S(e,i),r.options.EnableTracker)if("sliceUploadFile"===i.calledBySdk)a=i.tracker&&i.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))a=null;else{var s=-1;i.Body&&(s="string"==typeof i.Body?i.Body.length:i.Body.size||i.Body.byteLength||-1),a=new d({bucket:i.Bucket,region:i.Region,apiName:e,fileKey:i.Key,fileSize:s,deepTracker:r.options.DeepTracker,customId:r.options.CustomId,delay:r.options.TrackerDelay})}i.tracker=a;var c=function(e){return e&&e.headers&&(e.headers["x-cos-request-id"]&&(e.RequestId=e.headers["x-cos-request-id"]),e.headers["x-ci-request-id"]&&(e.RequestId=e.headers["x-ci-request-id"]),e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},l=function(e,t){a&&a.formatResult(e,t),o&&o(c(e),c(t))},p=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var n=t.Bucket,i=t.Region,o=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!n)return"Bucket";if(!i)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e){if(!n)return"Bucket";if(!i)return"Region";if(!o)return"Key"}return!1}(e,i);if(t)return"missing param "+t;if(i.Region){if(i.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(i.Region))return"Region format error.";!r.options.CompatibilityMode&&-1===i.Region.indexOf("-")&&"yfb"!==i.Region&&"default"!==i.Region&&i.Region}if(i.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(i.Bucket))if(i.AppId)i.Bucket=i.Bucket+"-"+i.AppId;else{if(!r.options.AppId)return'Bucket should format as "test-1250000000".';i.Bucket=i.Bucket+"-"+r.options.AppId}i.AppId&&delete i.AppId}i.Key&&"/"===i.Key.substr(0,1)&&(i.Key=i.Key.substr(1))}}(),u="getAuth"===e||"getObjectUrl"===e,f=t.Promise;if(!u&&f&&!o)return new f((function(e,t){if(o=function(n,i){n?t(n):e(i)},p)return l({error:p});n.call(r,i,l)}));if(p)return l({error:p});var m=n.call(r,i,l);return u?m:void 0}},xml2json:c,json2xml:l,md5:r,clearKey:v,fileSlice:function(e,t,n,i){e?u.readFile({filePath:e,position:t,length:n-t,success:function(e){i(e.data)},fail:function(){i(null)}}):i(null)},getBodyMd5:function(e,t,n){n=n||g,e&&t&&t instanceof ArrayBuffer?R.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=r(e);return t&&t(n),n},binaryBase64:function(e){var t,n,i,o="";for(t=0,n=e.length/2;t-1||h.indexOf(i)>-1)&&(t[n]=e[n])}return t}(y(e.Headers||e.headers||{})),l=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+l:0!==(t=e.Pathname||e.pathname||l).indexOf("/")&&(t="/"+t);var p=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&p&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),n&&i){var u=Math.round(E(e.SystemClockOffset)/1e3)-1,d=u,f=e.Expires||e.expires;d+=void 0===f?900:1*f||0;var g=n,v=o||u+";"+d,x=o||u+";"+d,b=m(c,!0).join(";").toLowerCase(),k=m(r,!0).join(";").toLowerCase(),C=s.HmacSHA1(x,i).toString(),S=[a,t,R.obj2str(r,!0),R.obj2str(c,!0),""].join("\n"),_=["sha1",v,s.SHA1(S).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+g,"q-sign-time="+v,"q-key-time="+x,"q-header-list="+b,"q-url-param-list="+k,"q-signature="+s.HmacSHA1(_,C).toString()].join("&")}},compareVersion:T,canFileSlice:A,isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},error:function(e,t){var n=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===a(t)&&null!==t&&(x(e,t),(t.code||t.name)&&(e.code=t.code||t.name),t.message&&(e.message=t.message),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.code||(e.code=e.name),e.error||(e.error=y(n)),e}};e.exports=R}).call(this,n(2))},function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var o=i({HTML:"text/html",isHTML:function(e){return e===o.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.freeze=i,t.MIME_TYPE=o,t.NAMESPACE=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var i=n(1).NAMESPACE;function o(e){return""!==e}function a(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function r(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(o):[]}(e);return Object.keys(t.reduce(a,{}))}function s(e,t){for(var n in e)t[n]=e[n]}function c(e,t){var n=e.prototype;if(!(n instanceof t)){function i(){}i.prototype=t.prototype,s(n,i=new i),e.prototype=n=i}n.constructor!=e&&(n.constructor=e)}var l={},p=l.ELEMENT_NODE=1,u=l.ATTRIBUTE_NODE=2,d=l.TEXT_NODE=3,f=l.CDATA_SECTION_NODE=4,m=l.ENTITY_REFERENCE_NODE=5,h=l.ENTITY_NODE=6,g=l.PROCESSING_INSTRUCTION_NODE=7,v=l.COMMENT_NODE=8,y=l.DOCUMENT_NODE=9,x=l.DOCUMENT_TYPE_NODE=10,b=l.DOCUMENT_FRAGMENT_NODE=11,k=l.NOTATION_NODE=12,C={},S={},_=(C.INDEX_SIZE_ERR=(S[1]="Index size error",1),C.DOMSTRING_SIZE_ERR=(S[2]="DOMString size error",2),C.HIERARCHY_REQUEST_ERR=(S[3]="Hierarchy request error",3)),w=(C.WRONG_DOCUMENT_ERR=(S[4]="Wrong document",4),C.INVALID_CHARACTER_ERR=(S[5]="Invalid character",5),C.NO_DATA_ALLOWED_ERR=(S[6]="No data allowed",6),C.NO_MODIFICATION_ALLOWED_ERR=(S[7]="No modification allowed",7),C.NOT_FOUND_ERR=(S[8]="Not found",8)),E=(C.NOT_SUPPORTED_ERR=(S[9]="Not supported",9),C.INUSE_ATTRIBUTE_ERR=(S[10]="Attribute in use",10));C.INVALID_STATE_ERR=(S[11]="Invalid state",11),C.SYNTAX_ERR=(S[12]="Syntax error",12),C.INVALID_MODIFICATION_ERR=(S[13]="Invalid modification",13),C.NAMESPACE_ERR=(S[14]="Invalid namespace",14),C.INVALID_ACCESS_ERR=(S[15]="Invalid access",15);function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,S[e]),this.message=S[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function A(){}function R(e,t){this._node=e,this._refresh=t,O(this)}function O(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);le(e,"length",n.length),s(n,e),e._inc=t}}function I(){}function B(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function N(e,t,n,o){if(o?t[B(t,o)]=n:t[t.length++]=n,e){n.ownerElement=e;var a=e.ownerDocument;a&&(o&&F(a,e,o),function(e,t,n){e&&e._inc++,n.namespaceURI===i.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(a,e,n))}}function P(e,t,n){var i=B(t,n);if(!(i>=0))throw T(w,new Error(e.tagName+"@"+n));for(var o=t.length-1;i"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0}while(e=e.nextSibling)}function U(){}function F(e,t,n,o){e&&e._inc++,n.namespaceURI===i.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function H(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var o=t.firstChild,a=0;o;)i[a++]=o,o=o.nextSibling;i.length=a,delete i[i.length]}}}function z(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function q(e,t,n){var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===b){var o=t.firstChild;if(null==o)return t;var a=t.lastChild}else o=a=t;var r=n?n.previousSibling:e.lastChild;o.previousSibling=r,a.nextSibling=n,r?r.nextSibling=o:e.firstChild=o,null==n?e.lastChild=a:n.previousSibling=a;do{o.parentNode=e}while(o!==a&&(o=o.nextSibling));return H(e.ownerDocument||e,e),t.nodeType==b&&(t.firstChild=t.lastChild=null),t}function K(){this._nsMap={}}function G(){}function V(){}function X(){}function W(){}function Y(){}function Q(){}function J(){}function $(){}function Z(){}function ee(){}function te(){}function ne(){}function ie(e,t){var n=[],i=9==this.nodeType&&this.documentElement||this,o=i.prefix,a=i.namespaceURI;if(a&&null==o&&null==(o=i.lookupPrefix(a)))var r=[{namespace:a,prefix:null}];return re(this,n,e,t,r),n.join("")}function oe(e,t,n){var o=e.prefix||"",a=e.namespaceURI;if(!a)return!1;if("xml"===o&&a===i.XML||a===i.XMLNS)return!1;for(var r=n.length;r--;){var s=n[r];if(s.prefix===o)return s.namespace!==a}return!0}function ae(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,M),'"')}function re(e,t,n,o,a){if(a||(a=[]),o){if(!(e=o(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var r=e.attributes,s=r.length,c=e.firstChild,l=e.tagName,h=l;if(!(n=i.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var k,C=0;C=0;S--){if(""===(_=a[S]).prefix&&_.namespace===e.namespaceURI){k=_.namespace;break}}if(k!==e.namespaceURI)for(S=a.length-1;S>=0;S--){var _;if((_=a[S]).namespace===e.namespaceURI){_.prefix&&(h=_.prefix+":"+l);break}}}t.push("<",h);for(var w=0;w"),n&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):re(c,t,n,o,a.slice()),c=c.nextSibling;else for(;c;)re(c,t,n,o,a.slice()),c=c.nextSibling;t.push("")}else t.push("/>");return;case y:case b:for(c=e.firstChild;c;)re(c,t,n,o,a.slice()),c=c.nextSibling;return;case u:return ae(t,e.name,e.value);case d:return t.push(e.data.replace(/[<&>]/g,M));case f:return t.push("");case v:return t.push("\x3c!--",e.data,"--\x3e");case x:var R=e.publicId,O=e.systemId;if(t.push("");else if(O&&"."!=O)t.push(" SYSTEM ",O,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case g:return t.push("");case m:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function se(e,t,n){var i;switch(t.nodeType){case p:(i=t.cloneNode(!1)).ownerDocument=e;case b:break;case u:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var o=t.firstChild;o;)i.appendChild(se(e,o,n)),o=o.nextSibling;return i}function ce(e,t,n){var i=new t.constructor;for(var o in t){var a=t[o];"object"!=typeof a&&a!=i[o]&&(i[o]=a)}switch(t.childNodes&&(i.childNodes=new A),i.ownerDocument=e,i.nodeType){case p:var r=t.attributes,s=i.attributes=new I,c=r.length;s._ownerElement=i;for(var l=0;l0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(n[i]==e)return i;t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},s(l,j),s(l,j.prototype),U.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==b){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return null==this.documentElement&&e.nodeType==p&&(this.documentElement=e),q(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),z(this,e)},importNode:function(e,t){return se(this,e,t)},getElementById:function(e){var t=null;return L(this.documentElement,(function(n){if(n.nodeType==p&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=r(e);return new R(this,(function(n){var i=[];return t.length>0&&L(n.documentElement,(function(o){if(o!==n&&o.nodeType===p){var a=o.getAttribute("class");if(a){var s=e===a;if(!s){var c=r(a);s=t.every((l=c,function(e){return l&&-1!==l.indexOf(e)}))}s&&i.push(o)}}var l})),i}))},createElement:function(e){var t=new K;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new A,(t.attributes=new I)._ownerElement=t,t},createDocumentFragment:function(){var e=new ee;return e.ownerDocument=this,e.childNodes=new A,e},createTextNode:function(e){var t=new X;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new W;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Y;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new te;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new G;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Z;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new K,i=t.split(":"),o=n.attributes=new I;return n.childNodes=new A,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,o._ownerElement=n,n},createAttributeNS:function(e,t){var n=new G,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},c(U,j),K.prototype={nodeType:p,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===b?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,H(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new R(this,(function(t){var n=[];return L(t,(function(i){i===t||i.nodeType!=p||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new R(this,(function(n){var i=[];return L(n,(function(o){o===n||o.nodeType!==p||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||i.push(o)})),i}))}},U.prototype.getElementsByTagName=K.prototype.getElementsByTagName,U.prototype.getElementsByTagNameNS=K.prototype.getElementsByTagNameNS,c(K,j),G.prototype.nodeType=u,c(G,j),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(S[_])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},c(V,j),X.prototype={nodeName:"#text",nodeType:d,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},c(X,V),W.prototype={nodeName:"#comment",nodeType:v},c(W,V),Y.prototype={nodeName:"#cdata-section",nodeType:f},c(Y,V),Q.prototype.nodeType=x,c(Q,j),J.prototype.nodeType=k,c(J,j),$.prototype.nodeType=h,c($,j),Z.prototype.nodeType=m,c(Z,j),ee.prototype.nodeName="#document-fragment",ee.prototype.nodeType=b,c(ee,j),te.prototype.nodeType=g,c(te,j),ne.prototype.serializeToString=function(e,t,n){return ie.call(e,t,n)},j.prototype.toString=ie;try{if(Object.defineProperty){function pe(e){switch(e.nodeType){case p:case b:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(pe(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(R.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(j.prototype,"textContent",{get:function(){return pe(this)},set:function(e){switch(this.nodeType){case p:case b:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),le=function(e,t,n){e["$$"+t]=n}}}catch(ue){}t.DocumentType=Q,t.DOMException=T,t.DOMImplementation=D,t.Element=K,t.Node=j,t.NodeList=A,t.XMLSerializer=ne},function(e,t){var n=function(e){var t=(e=e||{}).Base64,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=function(e){for(var t={},n=0,i=e.length;n>>6)+o(128|63&t):o(224|t>>>12&15)+o(128|t>>>6&63)+o(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return o(240|t>>>18&7)+o(128|t>>>12&63)+o(128|t>>>6&63)+o(128|63&t)},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(r,a)},c=function(e){var t=[0,2,1][e.length%3],i=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[n.charAt(i>>>18),n.charAt(i>>>12&63),t>=2?"=":n.charAt(i>>>6&63),t>=1?"=":n.charAt(63&i)].join("")},l=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,c)},p=function(e){return l(s(e))},u=function(e,t){return t?p(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):p(String(e))},d=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),f=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return o(55296+(t>>>10))+o(56320+(1023&t));case 3:return o((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return o((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},m=function(e){return e.replace(d,f)},h=function(e){var t=e.length,n=t%4,a=(t>0?i[e.charAt(0)]<<18:0)|(t>1?i[e.charAt(1)]<<12:0)|(t>2?i[e.charAt(2)]<<6:0)|(t>3?i[e.charAt(3)]:0),r=[o(a>>>16),o(a>>>8&255),o(255&a)];return r.length-=[0,0,2,1][n],r.join("")},g=e.atob?function(t){return e.atob(t)}:function(e){return e.replace(/[\s\S]{1,4}/g,h)},v=function(e){return m(g(e))},y=function(e){return v(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))};return{VERSION:"2.1.9",atob:g,btoa:l,fromBase64:y,toBase64:u,utob:s,encode:u,encodeURI:function(e){return u(e,!0)},btou:m,decode:y,noConflict:function(){var n=e.Base64;return e.Base64=t,n}}}();e.exports=n},function(e,t,n){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},r=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function p(e,t,n,i){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),r=new w(i||[]);return a._invoke=function(e,t,n){var i="suspendedStart";return function(o,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw a;return T()}for(n.method=o,n.arg=a;;){var r=n.delegate;if(r){var s=C(r,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}(e,n,r),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=p;var d={};function f(){}function m(){}function h(){}var g={};l(g,r,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(E([])));y&&y!==t&&n.call(y,r)&&(g=y);var x=h.prototype=f.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function o(a,r,s,c){var l=u(e[a],e,r);if("throw"!==l.type){var p=l.arg,d=p.value;return d&&"object"==i(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,s,c)}),(function(e){o("throw",e,s,c)})):t.resolve(d).then((function(e){p.value=e,s(p)}),(function(e){return o("throw",e,s,c)}))}c(l.arg)}var a;this._invoke=function(e,n){function i(){return new t((function(t,i){o(e,n,t,i)}))}return a=a?a.then(i,i):i()}}function C(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function t(){for(;++i=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function a(e,t,n,i,o,a,r){try{var s=e[a](r),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function r(e,t){for(var n=0;n=0;o--)t===i[o]&&i.splice(o,1)},e.emit=function(e,t){for(var i=n(e).map((function(e){return e})),o=0;o=0;n--){var o=i[n][2];(!o||o+2592e3=0;a--){var r=i[a];(r[0]===e&&r[1]===t||e!==r[0]&&0===r[0].indexOf(o))&&i.splice(a,1)}i.unshift([e,t,Math.round(Date.now()/1e3)]),i.length>n&&i.splice(n),l()}},removeUploadId:function(e){c(),delete p.using[e];for(var t=i.length-1;t>=0;t--)i[t][1]===e&&i.splice(t,1);l()}};e.exports=p},function(e,t,n){var i=n(11);e.exports=i},function(e,t,n){"use strict";var i=n(0),o=n(8),a=n(23),r=n(24),s=n(30),c=n(7),l={SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,UploadQueueSize:1e4,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,HttpDNSServiceId:"",SimpleUploadMethod:"postObject",EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:""},p=function(e){this.options=i.extend(i.clone(l),e||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1048576,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1048576,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.AppId,this.options.SecretId&&this.options.SecretId.indexOf(" "),this.options.SecretKey&&this.options.SecretKey.indexOf(" "),o.init(this),a.init(this)};r.init(p,a),s.init(p,a),p.util={md5:i.md5,xml2json:i.xml2json,json2xml:i.json2xml},p.getAuthorization=i.getAuth,p.version=c.version,e.exports=p},function(module,exports,__webpack_require__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===("undefined"==typeof window?"undefined":_typeof(window)),root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===("undefined"==typeof self?"undefined":_typeof(self)),NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"===(void 0===process?"undefined":_typeof(process))&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"===_typeof(module)&&module.exports,AMD=__webpack_require__(14),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===_typeof(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t){return new Md5(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.getCtx=e.create=function(){return new Md5},e.update=function(t){return e.create().update(t)};for(var t=0;t>2]|=e[a]<>6,c[o++]=128|63&i):i<55296||i>=57344?(c[o++]=224|i>>12,c[o++]=128|i>>6&63,c[o++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++a)),c[o++]=240|i>>18,c[o++]=128|i>>12&63,c[o++]=128|i>>6&63,c[o++]=128|63&i);else for(o=this.start;a>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[o>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=EXTRA[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,t,n,i,o,a,r=this.blocks;this.first?t=((t=((e=((e=r[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(i=((i=(-1732584194^2004318071&e)+r[1]-117830708)<<12|i>>>20)+e<<0)&(-271733879^e))+r[2]-1126478375)<<17|n>>>15)+i<<0)&(i^e))+r[3]-1316259209)<<22|t>>>10)+n<<0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((i=this.h3)^t&(n^i))+r[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[1]-389564586)<<12|i>>>20)+e<<0)&(e^t))+r[2]+606105819)<<17|n>>>15)+i<<0)&(i^e))+r[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(i^t&(n^i))+r[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[5]+1200080426)<<12|i>>>20)+e<<0)&(e^t))+r[6]-1473231341)<<17|n>>>15)+i<<0)&(i^e))+r[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(i^t&(n^i))+r[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[9]-1958414417)<<12|i>>>20)+e<<0)&(e^t))+r[10]-42063)<<17|n>>>15)+i<<0)&(i^e))+r[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(i^t&(n^i))+r[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[13]-40341101)<<12|i>>>20)+e<<0)&(e^t))+r[14]-1502002290)<<17|n>>>15)+i<<0)&(i^e))+r[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[1]-165796510)<<5|e>>>27)+t<<0)^t))+r[6]-1069501632)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[11]+643717713)<<14|n>>>18)+i<<0)^i))+r[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[5]-701558691)<<5|e>>>27)+t<<0)^t))+r[10]+38016083)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[15]-660478335)<<14|n>>>18)+i<<0)^i))+r[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[9]+568446438)<<5|e>>>27)+t<<0)^t))+r[14]-1019803690)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[3]-187363961)<<14|n>>>18)+i<<0)^i))+r[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[13]-1444681467)<<5|e>>>27)+t<<0)^t))+r[2]-51403784)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[7]+1735328473)<<14|n>>>18)+i<<0)^i))+r[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[5]-378558)<<4|e>>>28)+t<<0))+r[8]-2022574463)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[11]+1839030562)<<16|n>>>16)+i<<0))+r[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[1]-1530992060)<<4|e>>>28)+t<<0))+r[4]+1272893353)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[7]-155497632)<<16|n>>>16)+i<<0))+r[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[13]+681279174)<<4|e>>>28)+t<<0))+r[0]-358537222)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[3]-722521979)<<16|n>>>16)+i<<0))+r[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[9]-640364487)<<4|e>>>28)+t<<0))+r[12]-421815835)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[15]+530742520)<<16|n>>>16)+i<<0))+r[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[0]-198630844)<<6|e>>>26)+t<<0)|~n))+r[7]+1126891415)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[14]-1416354905)<<15|n>>>17)+i<<0)|~e))+r[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+r[3]-1894986606)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[10]-1051523)<<15|n>>>17)+i<<0)|~e))+r[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+r[15]-30611744)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[6]-1560198380)<<15|n>>>17)+i<<0)|~e))+r[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[4]-145523070)<<6|e>>>26)+t<<0)|~n))+r[11]-1120210379)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[2]+718787259)<<15|n>>>17)+i<<0)|~e))+r[9]-343485551)<<21|t>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=n-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,t,n,i="",o=this.array(),a=0;a<15;)e=o[a++],t=o[a++],n=o[a++],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|n>>>6)]+BASE64_ENCODE_CHAR[63&n];return e=o[a],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(13),__webpack_require__(2),__webpack_require__(3)(module))},function(e,t){var n,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:r}catch(e){i=r}}();var c,l=[],p=!1,u=-1;function d(){p&&c&&(p=!1,c.length?l=c.concat(l):u=-1,l.length&&f())}function f(){if(!p){var e=s(d);p=!0;for(var t=l.length;t;){for(c=l,l=[];++u1)for(var n=1;n>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i>>2]>>>24-i%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=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new r.init(n,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new r.init(n,t)}},p=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},u=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,o=e.min(4*t,o),t){for(var c=0;cl;l++){if(16>l)a[l]=0|e[t+l];else{var p=a[l-3]^a[l-8]^a[l-14]^a[l-16];a[l]=p<<1|p>>>31}p=(i<<5|i>>>27)+c+a[l],p=20>l?p+(1518500249+(o&r|~o&s)):40>l?p+(1859775393+(o^r^s)):60>l?p+((o&r|o&s|r&s)-1894007588):p+((o^r^s)-899497514),c=s,s=r,r=o<<30|o>>>2,o=i,i=p}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+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}}),n.SHA1=o._createHelper(r),n.HmacSHA1=o._createHmacHelper(r),function(){var e=l,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 i=e.blockSize,o=4*i;n.sigBytes>o&&(n=e.finalize(n)),n.clamp();for(var a=this._oKey=n.clone(),r=this._iKey=n.clone(),s=a.words,c=r.words,l=0;l>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,i=n.charAt(64);if(i){var o=e.indexOf(i);-1!=o&&(t=o)}for(var a=[],r=0,s=0;s>>6-s%4*2;a[r>>>2]|=(l|p)<<24-r%4*8,r++}return c.create(a,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=l},function(e,t,n){var i=n(17).DOMParser,o=function(e){"use strict";e=e||{},function(){void 0===e.escapeMode&&(e.escapeMode=!0);e.attributePrefix=e.attributePrefix||"_",e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0);e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0);void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0);e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1);e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1)}();var t=1,n=3,o=4,a=8,r=9;function s(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function c(e){return"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):e}function l(e,t,n,i){for(var o=0;o0&&l(e.arrayAccessFormPaths,t,n,i)&&(t[n]=[t[n]])}function u(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),i=t[5].split(".");if(n.setHours(t[3],t[4],i[0]),i.length>1&&n.setMilliseconds(i[1]),t[6]&&t[7]){var o=60*t[6]+Number(t[7]);o=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),n.setMinutes(n.getMinutes()-o-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function d(n,i,o,a){return!(i==t&&e.xmlElementsFilter.length>0)||l(e.xmlElementsFilter,n,o,a)}function f(i,c){if(i.nodeType==r){for(var m=new Object,h=i.childNodes,g=0;g0){var o=i.split(".#")[0];return l(e.datetimeAccessFormPaths,t,n,o)?u(t):t}return t}(m.__text,y,c+"."+y)),null!=m["#cdata-section"]&&(m.__cdata=m["#cdata-section"],delete m["#cdata-section"],"property"==e.arrayAccessForm&&delete m["#cdata-section_asArray"]),0==m.__cnt&&"text"==e.emptyNodeForm?m="":1==m.__cnt&&null!=m.__text?m=m.__text:1!=m.__cnt||null==m.__cdata||e.keepCData?m.__cnt>1&&null!=m.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==m.__text||""==m.__text.trim())&&delete m.__text:m=m.__cdata,delete m.__cnt,!e.enableToStringFunc||null==m.__text&&null==m.__cdata||(m.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),m}if(i.nodeType==n||i.nodeType==o)return i.nodeValue}function m(t,n,i,o){var a="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=i)for(var r=0;r":">"}function h(e,t){return""}function g(t,n){return"property"==e.arrayAccessForm&&(i=n.toString(),o="_asArray",-1!==i.indexOf(o,i.length-o.length))||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function;var i,o}function v(e){var t=0;if(e instanceof Object)for(var n in e)g(e,n)||t++;return t}function y(t,n,i){return 0==e.jsonPropertiesFilter.length||""==i||l(e.jsonPropertiesFilter,t,n,i)}function x(t){var n=[];if(t instanceof Object)for(var i in t)-1==i.toString().indexOf("__")&&0==i.toString().indexOf(e.attributePrefix)&&n.push(i);return n}function b(t){var n="";return t instanceof Object?n+=function(t){var n="";return null!=t.__cdata&&(n+=""),null!=t.__text&&(e.escapeMode?n+=c(t.__text):n+=t.__text),n}(t):null!=t&&(e.escapeMode?n+=c(t):n+=t),n}function k(e,t){return""===e?t:e+"."+t}function C(e,t,n,i){var o="";if(0==e.length)o+=m(e,t,n,!0);else for(var a=0;a0)for(var i in e)if(!g(e,i)&&(""==t||y(e,i,k(t,i)))){var o=e[i],a=x(o);if(null==o||null==o)n+=m(o,i,a,!0);else if(o instanceof Object)if(o instanceof Array)n+=C(o,i,a,t);else if(o instanceof Date)n+=m(o,i,a,!1),n+=o.toISOString(),n+=h(o,i);else{v(o)>0||null!=o.__text||null!=o.__cdata?(n+=m(o,i,a,!1),n+=S(o,k(t,i)),n+=h(o,i)):n+=m(o,i,a,!0)}else n+=m(o,i,a,!1),n+=b(o),n+=h(o,i)}return n+=b(e)}this.parseXmlString=function(e){var t;if(void 0===e)return null;if(i){var n=new i,o=null;try{o=n.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){o=null}try{t=n.parseFromString(e,"text/xml"),null!=o&&t.getElementsByTagNameNS(o,"parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?u(e):e},this.xml2json=function(e){return f(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return S(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}};e.exports=function(e){if(!e)return null;var t=(new i).parseFromString(e,"text/xml"),n=(new o).xml2json(t);return n.html&&n.getElementsByTagName("parsererror").length?null:n}},function(e,t,n){var i=n(4);t.DOMImplementation=i.DOMImplementation,t.XMLSerializer=i.XMLSerializer,t.DOMParser=n(18).DOMParser},function(e,t,n){var i=n(1),o=n(4),a=n(19),r=n(20),s=o.DOMImplementation,c=i.NAMESPACE,l=r.ParseError,p=r.XMLReader;function u(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function d(e){this.options=e||{locator:{}}}function f(){this.cdata=!1}function m(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function h(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function g(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}d.prototype.parseFromString=function(e,t){var n=this.options,i=new p,o=n.domBuilder||new f,r=n.errorHandler,s=n.locator,l=n.xmlns||{},d=/\/x?html?$/.test(t),m=d?a.HTML_ENTITIES:a.XML_ENTITIES;s&&o.setDocumentLocator(s),i.errorHandler=function(e,t,n){if(!e){if(t instanceof f)return t;e=t}var i={},o=e instanceof Function;function a(t){var a=e[t];!a&&o&&(a=2==e.length?function(n){e(t,n)}:e),i[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+function(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),i}(r,o,s),i.domBuilder=n.domBuilder||o,d&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var h=n.normalizeLineEndings||u;return e&&"string"==typeof e?i.parse(h(e),l,m):i.errorHandler.error("invalid doc source"),o.doc},f.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var o=this.doc,a=o.createElementNS(e,n||t),r=i.length;g(this,a),this.currentElement=a,this.locator&&m(this.locator,a);for(var s=0;s",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),t.entityMap=t.HTML_ENTITIES},function(e,t,n){var i=n(1).NAMESPACE,o=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,a=new RegExp("[\\-\\.0-9"+o.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),r=new RegExp("^"+o.source+a.source+"*(?::"+o.source+a.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function c(){}function l(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function p(e,t,n,o,a,r){function s(e,t,i){n.attributeNames.hasOwnProperty(e)&&r.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),i)}for(var c,l=++t,p=0;;){var u=e.charAt(l);switch(u){case"=":if(1===p)c=e.slice(t,l),p=3;else{if(2!==p)throw new Error("attribute equal must after attrName");p=3}break;case"'":case'"':if(3===p||1===p){if(1===p&&(r.warning('attribute value must after "="'),c=e.slice(t,l)),t=l+1,!((l=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");s(c,d=e.slice(t,l),t-1),p=5}else{if(4!=p)throw new Error('attribute value must after "="');s(c,d=e.slice(t,l),t),r.warning('attribute "'+c+'" missed start quot('+u+")!!"),t=l+1,p=5}break;case"/":switch(p){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:p=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return r.error("unexpected end of input"),0==p&&n.setTagName(e.slice(t,l)),l;case">":switch(p){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,l)).slice(-1)&&(n.closed=!0,d=d.slice(0,-1));case 2:2===p&&(d=c),4==p?(r.warning('attribute "'+d+'" missed quot(")!'),s(c,d,t)):(i.isHTML(o[""])&&d.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),s(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return l;case"€":u=" ";default:if(u<=" ")switch(p){case 0:n.setTagName(e.slice(t,l)),p=6;break;case 1:c=e.slice(t,l),p=2;break;case 4:var d=e.slice(t,l);r.warning('attribute "'+d+'" missed quot(")!!'),s(c,d,t);case 5:p=6}else switch(p){case 2:n.tagName;i.isHTML(o[""])&&c.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),s(c,c,t),t=l,p=1;break;case 5:r.warning('attribute space is required"'+c+'"!!');case 6:p=1,t=l;break;case 3:p=4,t=l;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function u(e,t,n){for(var o=e.tagName,a=null,r=e.length;r--;){var s=e[r],c=s.qName,l=s.value;if((f=c.indexOf(":"))>0)var p=s.prefix=c.slice(0,f),u=c.slice(f+1),d="xmlns"===p&&u;else u=c,p=null,d="xmlns"===c&&"";s.localName=u,!1!==d&&(null==a&&(a={},m(n,n={})),n[d]=a[d]=l,s.uri=i.XMLNS,t.startPrefixMapping(d,l))}for(r=e.length;r--;){(p=(s=e[r]).prefix)&&("xml"===p&&(s.uri=i.XML),"xmlns"!==p&&(s.uri=n[p||""]))}var f;(f=o.indexOf(":"))>0?(p=e.prefix=o.slice(0,f),u=e.localName=o.slice(f+1)):(p=null,u=e.localName=o);var h=e.uri=n[p||""];if(t.startElement(h,u,o,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(h,u,o),a)for(p in a)t.endPrefixMapping(p)}function d(e,t,n,i,o){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),r=e.substring(t+1,a);if(/[&<]/.test(r))return/^script$/i.test(n)?(o.characters(r,0,r.length),a):(r=r.replace(/&#?\w+;/g,i),o.characters(r,0,r.length),a)}return t+1}function f(e,t,n,i){var o=i[n];return null==o&&((o=e.lastIndexOf(""))t?(n.comment(e,t+4,o-t-4),o+3):(i.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,o-t-9),n.endCDATA(),o+3}var a=function(e,t){var n,i=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;n=o.exec(e);)if(i.push(n),n[1])return i}(e,t),r=a.length;if(r>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],c=!1,l=!1;r>3&&(/^public$/i.test(a[2][0])?(c=a[3][0],l=r>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var p=a[r-1];return n.startDTD(s,c,l),n.endDTD(),p.index+p[0].length}return-1}function g(e,t,n){var i=e.indexOf("?>",t);if(i){var o=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(o){o[0].length;return n.processingInstruction(o[1],o[2]),i+2}return-1}return-1}function v(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,c.prototype={parse:function(e,t,n){var o=this.domBuilder;o.startDocument(),m(t,t={}),function(e,t,n,o,a){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function c(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?r(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function m(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,c);C&&y(w),o.characters(n,0,t-w),w=t}}function y(t,n){for(;t>=b&&(n=k.exec(e));)x=n.index,b=x+n[0].length,C.lineNumber++;C.columnNumber=t-x+1}var x=0,b=0,k=/.*(?:\r\n?|\n)|.*$/g,C=o.locator,S=[{currentNSMap:t}],_={},w=0;for(;;){try{var E=e.indexOf("<",w);if(E<0){if(!e.substr(w).match(/^\s*$/)){var T=o.doc,A=T.createTextNode(e.substr(w));T.appendChild(A),o.currentElement=A}return}switch(E>w&&m(E),e.charAt(E+1)){case"/":var R=e.indexOf(">",E+3),O=e.substring(E+2,R).replace(/[ \t\n\r]+$/g,""),I=S.pop();R<0?(O=e.substring(E+2).replace(/[\s<].*/,""),a.error("end tag name: "+O+" is not complete:"+I.tagName),R=E+1+O.length):O.match(/\sw?w=R:m(Math.max(E,w)+1)}}(e,t,n,o,this.errorHandler),o.endDocument()}},v.prototype={setTagName:function(e){if(!r.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!r.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=c,t.ParseError=s},function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",o=new RegExp("^([^"+i+"])|^((x|X)(m|M)(l|L))|([^"+i+"-.0-9·̀-ͯ‿⁀])","g"),a=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,r=function(e){var t=[];if(e instanceof Object)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},s=function(e,t){var i=function(e,n,i,a,r){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(a).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(o,"_"));var l=[c,"<",e,i||""];return n&&n.length>0?(l.push(">"),l.push(n),r&&l.push(c),l.push("")):l.push("/>"),l.join("")};return function e(o,s,c){var l=n(o);switch((Array.isArray?Array.isArray(o):o instanceof Array)?l="array":o instanceof Date&&(l="date"),l){case"array":var p=[];return o.map((function(t){p.push(e(t,1,c+1))})),t.prettyPrint&&p.push("\n"),p.join("");case"date":return o.toJSON?o.toJSON():o+"";case"object":var u=[];for(var d in o)if(o.hasOwnProperty(d))if(o[d]instanceof Array)for(var f in o[d])o[d].hasOwnProperty(f)&&u.push(i(d,e(o[d][f],0,c+1),null,c+1,r(o[d][f]).length));else u.push(i(d,e(o[d],0,c+1),null,c+1));return t.prettyPrint&&u.length>0&&u.push("\n"),u.join("");case"function":return o();default:return t.escape?(""+o).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(a,""):""+o}}(e,0,0)},c=function(e){var t=['"),t.join("")};e.exports=function(e,t){if(t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" "}),"string"==typeof e)try{e=JSON.parse(e.toString())}catch(e){return!1}var i="",o="";return t&&("object"==n(t)?(t.xmlHeader&&(i=c(!!t.xmlHeader.standalone)),void 0!==t.docType&&(o="")):i=c()),[i,(t=t||{}).prettyPrint&&o?"\n":"",o,s(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t,n){(function(e){var n,i,o,a;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e) -/*! For license information please see beacon_mp.min.js.LICENSE.txt */}window,a=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BEACON_ATTA_REQUEST_URL=t.BEACON_ATTA_TOKEN=t.BEACON_ATTA_ID=t.BEACON_CONFIG_HTTPS_URL=t.BEACON_CONFIG_REQUEST_TIME=t.BEACON_CONFIG=t.BEACON_SENDING_IDS_KEY=t.BEACON_NORMAL_LOG_ID_KEY=t.BEACON_DRIECT_LOG_ID_KEY=t.BEACON_LASE_REPORT_TIME_KEY=t.BEACON_DEVICE_ID_KEY=t.BEACON_STORE_PREFIX=t.BEACON_LOG_ID_KEY=t.BEACON_IS_REALTIME_KEY=t.BEACON_DELAY_DEFAULT=t.BEACON_HTTPS_URL=t.BEACON_HTTP_URL=void 0,t.BEACON_HTTP_URL="http://oth.eve.mdt.qq.com:8080/analytics/v2_upload",t.BEACON_HTTPS_URL="https://otheve.beacon.qq.com/analytics/v2_upload",t.BEACON_DELAY_DEFAULT=3e3,t.BEACON_IS_REALTIME_KEY="A99",t.BEACON_LOG_ID_KEY="A100",t.BEACON_STORE_PREFIX="__BEACON_",t.BEACON_DEVICE_ID_KEY="__BEACON_deviceId",t.BEACON_LASE_REPORT_TIME_KEY="last_report_time",t.BEACON_DRIECT_LOG_ID_KEY="direct_log_id",t.BEACON_NORMAL_LOG_ID_KEY="normal_log_id",t.BEACON_SENDING_IDS_KEY="sending_event_ids",t.BEACON_CONFIG="beacon_config",t.BEACON_CONFIG_REQUEST_TIME="beacon_config_request_time",t.BEACON_CONFIG_HTTPS_URL="https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",t.BEACON_ATTA_ID="00400014144",t.BEACON_ATTA_TOKEN="6478159937",t.BEACON_ATTA_REQUEST_URL="https://h.trace.qq.com/kv"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventId=t.replaceSymbol=t.replace=t.assert=void 0;var i=n(0),o=n(9);function a(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(e){return""}}Object.defineProperty(t,"EventEmiter",{enumerable:!0,get:function(){return o.EventEmiter}}),t.assert=function(e,t){if(!e)throw t instanceof Error?t:new Error(t)},t.replace=function(e,t){for(var n={},i=0,o=Object.keys(e);i60*this.strategy.requestInterval*1e3},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e)},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]e.options.UploadQueueSize;){var n="waiting"===r[t].state||"checking"===r[t].state||"uploading"===r[t].state;r[t]&&n?t++:(s[r[t].id]&&delete s[r[t].id],r.splice(t,1),l--)}u()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;r[l]&&"waiting"!==r[l].state;)l++;if(!(l>=r.length)){var n=r[l];l++,c++,n.state="checking",n.params.onTaskStart&&n.params.onTaskStart(p(n)),!n.params.UploadData&&(n.params.UploadData={});var i=o.formatParams(n.api,n.params);a[n.api].call(e,i,(function(i,o){e._isRunningTask(n.id)&&("checking"!==n.state&&"uploading"!==n.state||(n.state=i?"error":"success",i&&(n.error=i),c--,u(),t(),n.callback&&n.callback(i,o),"success"===n.state&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)),d())})),u(),setTimeout(t)}}},m=function(t,n){var o=s[t];if(o){var a=o&&"waiting"===o.state,r=o&&("checking"===o.state||"uploading"===o.state);if("canceled"===n&&"canceled"!==o.state||"paused"===n&&a||"paused"===n&&r){if("paused"===n&&o.params.Body&&"function"==typeof o.params.Body.pipe)return;o.state=n,e.emit("inner-kill-task",{TaskId:t,toState:n});try{var l=o&&o.params&&o.params.UploadData.UploadId}catch(e){}"canceled"===n&&l&&i.removeUsing(l),u(),r&&(c--,f()),"canceled"===n&&(o.params&&(delete o.params.UploadData,delete o.params.Body,delete o.params),delete o.callback)}d()}};e._addTasks=function(t){o.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),u()},e._addTask=function(t,n,i,a){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||o.canFileSlice()||(t=c),n=o.formatParams(t,n);var l=o.uuid();n.TaskId=l,n.onTaskReady&&n.onTaskReady(l);var p={params:n,callback:i,api:t,index:r.length,id:l,Bucket:n.Bucket,Region:n.Region,Key:n.Key,FilePath:n.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null},m=n.onHashProgress;n.onHashProgress=function(t){e._isRunningTask(p.id)&&(p.hashPercent=t.percent,m&&m(t),u())};var h=n.onProgress;return n.onProgress=function(t){e._isRunningTask(p.id)&&("checking"===p.state&&(p.state="uploading"),p.loaded=t.loaded,p.size=t.total,p.speed=t.speed,p.percent=t.percent,h&&h(t),u())},o.getFileSize(t,n,(function(e,t){e?i(e):(s[l]=p,r.push(p),p.size=t,!a&&u(),f(),d())})),l},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return o.map(r,p)},e.cancelTask=function(e){m(e,"canceled")},e.pauseTask=function(e){m(e,"paused")},e.restartTask=function(e){var t=s[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",u(),l=Math.min(l,t.index),f())},e.isUploadRunning=function(){return c||l-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(a="{Bucket}."+a)),a=(a=a.replace(/\{\{AppId\}\}/gi,i).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,r).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,i).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,r).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(a)||(a="https://"+a),"/"===a.slice(-1)&&(a=a.slice(0,-1));var c=a;return e.ForcePathStyle&&(c+="/"+t),c+="/",s&&(c+=o.camSafeUrlEncode(s).replace(/%2F/g,"/")),e.isLocation&&(c=c.replace(/^https?:\/\//,"")),c}var l=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate,n=(e.Url||c({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region})).replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$").test(n)?n:""};function p(e,t){var n=o.clone(e.Headers),i="";o.each(n,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete n[t],"host"===t.toLowerCase()&&(i=e)}));var a=!1!==e.ForceSignHost;!i&&e.SignHost&&a&&(n.Host=e.SignHost);var r=!1,s=function(e,n){r||(r=!0,n&&n.XCosSecurityToken&&!n.SecurityToken&&((n=o.clone(n)).SecurityToken=n.XCosSecurityToken,delete n.XCosSecurityToken),t&&t(e,n))},c=this,l=e.Bucket||"",p=e.Region||"",u="name/cos:PostObject"!==e.Action&&e.Key?e.Key:"";c.options.ForcePathStyle&&l&&(u=l+"/"+u);var d="/"+u,f={},m=e.Scope;if(!m){var h=e.Action||"",g=e.ResourceKey||e.Key||"";m=e.Scope||[{action:h,bucket:l,region:p,prefix:g}]}var v=o.md5(JSON.stringify(m));c._StsCache=c._StsCache||[],function(){var e,t;for(e=c._StsCache.length-1;e>=0;e--){t=c._StsCache[e];var n=Math.round(o.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&n=t.ExpiredTime)c._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===v){f=t;break}}}();var y,x=function(){var t="";f.StartTime&&e.Expires?t=f.StartTime+";"+(f.StartTime+1*e.Expires):f.StartTime&&f.ExpiredTime&&(t=f.StartTime+";"+f.ExpiredTime);var i={Authorization:o.getAuth({SecretId:f.TmpSecretId,SecretKey:f.TmpSecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:a}),SecurityToken:f.SecurityToken||f.XCosSecurityToken||"",Token:f.Token||"",ClientIP:f.ClientIP||"",ClientUA:f.ClientUA||""};s(null,i)},b=function(e){if(e.Authorization){var t=!1,n=e.Authorization;if(n)if(n.indexOf(" ")>-1)t=!1;else if(n.indexOf("q-sign-algorithm=")>-1&&n.indexOf("q-ak=")>-1&&n.indexOf("q-sign-time=")>-1&&n.indexOf("q-key-time=")>-1&&n.indexOf("q-url-param-list=")>-1)t=!0;else try{(n=atob(n)).indexOf("a=")>-1&&n.indexOf("k=")>-1&&n.indexOf("t=")>-1&&n.indexOf("r=")>-1&&n.indexOf("b=")>-1&&(t=!0)}catch(e){}if(!t)return o.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return o.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return o.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return o.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return o.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return o.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return o.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(f.ExpiredTime&&f.ExpiredTime-o.getSkewTime(c.options.SystemClockOffset)/1e3>60)x();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:l,Region:p,Method:e.Method,Key:u,Pathname:d,Query:e.Query,Headers:n,Scope:m,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:a},(function(e){"string"==typeof e&&(e={Authorization:e});var t=b(e);if(t)return s(t);e.Authorization?s(null,e):((f=e||{}).Scope=m,f.ScopeKey=v,c._StsCache.push(f),x())}));else{if(!c.options.getSTS)return y={Authorization:o.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:a}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken},s(null,y),y;c.options.getSTS.call(c,{Bucket:l,Region:p},(function(e){(f=e||{}).Scope=m,f.ScopeKey=v,f.TmpSecretId||(f.TmpSecretId=f.SecretId),f.TmpSecretKey||(f.TmpSecretKey=f.SecretKey);var t=b(f);if(t)return s(t);c._StsCache.push(f),x()}))}return""}function u(e){var t=!1,n=!1,i=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var a=e.error.Code,r=e.error.Message;("RequestTimeTooSkewed"===a||"AccessDenied"===a&&"Request has expired"===r)&&(n=!0)}catch(e){}if(e)if(n&&i){var s=Date.parse(i);this.options.CorrectClockSkew&&Math.abs(o.getSkewTime(this.options.SystemClockOffset)-s)>=3e4&&(this.options.SystemClockOffset=s-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);return t}function d(e,t){var n=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=o.clearKey(e.qs),e.headers&&(e.headers=o.clearKey(e.headers)),e.qs&&(e.qs=o.clearKey(e.qs));var i=o.clone(e.qs);e.action&&(i[e.action]="");var a=e.url||e.Url,r=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:a}),s=e.tracker;!function o(a){var c=n.options.SystemClockOffset;s&&s.setParams({signStartTime:(new Date).getTime(),retryTimes:a-1}),p.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:i,Headers:e.headers,SignHost:r,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(i,r){i?t(i):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=r,f.call(n,e,(function(i,r){s&&s.setParams({httpEndTime:(new Date).getTime()}),i&&a<2&&(c!==n.options.SystemClockOffset||u.call(n,i))?(e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]),o(a+1)):t(i,r)})))}))}(1)}function f(e,t){var n=this,a=e.TaskId;if(!a||n._isRunningTask(a)){var r=e.Bucket,s=e.Region,l=e.Key,p=e.method||"GET",u=e.url||e.Url,d=e.body,f=e.json,m=e.rawBody,h=n.options.HttpDNSServiceId;n.options.UseAccelerate&&(s="accelerate"),u=u||c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:r,region:s,object:l}),e.action&&(u=u+"?"+e.action),e.qsStr&&(u=u.indexOf("?")>-1?u+"&"+e.qsStr:u+"?"+e.qsStr);var g={method:p,url:u,headers:e.headers,qs:e.qs,filePath:e.filePath,body:d,json:f,httpDNSServiceId:h},v="x-cos-security-token";o.isCIHost(u)&&(v="x-ci-security-token"),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.SecurityToken&&(g.headers[v]=e.AuthData.SecurityToken),g.headers&&(g.headers=o.clearKey(g.headers)),g=o.clearKey(g),e.onProgress&&"function"==typeof e.onProgress&&(g.onProgress=function(t){if(!a||n._isRunningTask(a)){var i=t?t.loaded:0;e.onProgress({loaded:i,total:t.total})}}),this.options.Timeout&&(g.timeout=this.options.Timeout),n.options.ForcePathStyle&&(g.pathStyle=n.options.ForcePathStyle),n.emit("before-send",g);var y=g.url.includes("accelerate."),x=g.qs?Object.keys(g.qs).map((function(e){return"".concat(e,"=").concat(g.qs[e])})).join("&"):"",b=x?g.url+"?"+x:g.url;e.tracker&&e.tracker.setParams({reqUrl:b,accelerate:y?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:b,accelerate:y?"Y":"N"});var k=i(g,(function(e,i,r){if("abort"!==e){var s,c=function(e,r){if(a&&n.off("inner-kill-task",C),!s){s=!0;var c={};i&&i.statusCode&&(c.statusCode=i.statusCode),i&&i.headers&&(c.headers=i.headers),e?(e=o.extend(e||{},c),t(e,null)):(r=o.extend(r||{},c),t(null,r)),k=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=r;else try{l=r&&r.indexOf("<")>-1&&r.indexOf(">")>-1&&o.xml2json(r)||{}}catch(e){l=r||{}}var p=i.statusCode;2===Math.floor(p/100)?l.Error?c({error:l.Error}):c(null,l):c({error:l.Error||l})}}})),C=function e(t){t.TaskId===a&&(k&&k.abort&&k.abort(),n.off("inner-kill-task",e))};a&&n.on("inner-kill-task",C)}}var m={getService:function(e,t){"function"==typeof e&&(t=e,e={});var n=this.options.ServiceDomain,i=e.Region;n?(n=n.replace(/\{\{Region\}\}/gi,i||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(n)||(n="https://"+n),"/"===n.slice(-1)&&(n=n.slice(0,-1))):n=i?"https://cos."+i+".myqcloud.com":"https://service.cos.myqcloud.com";n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),d.call(this,{Action:"name/cos:GetService",url:n,method:"GET",headers:e.Headers},(function(e,n){if(e)return t(e);var i=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Buckets&&n.ListAllMyBucketsResult.Buckets.Bucket||[];i=o.isArray(i)?i:[i];var a=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:i,Owner:a,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,i="";if(e.BucketAZConfig){var a={BucketAZConfig:e.BucketAZConfig};i=o.json2xml({CreateBucketConfiguration:a})}d.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:i},(function(i,o){if(i)return t(i);var a=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:a,statusCode:o.statusCode,headers:o.headers})}))},headBucket:function(e,t){d.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD"},(function(e,n){t(e,n)}))},getBucket:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n.marker=e.Marker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,d.call(this,{Action:"name/cos:GetBucket",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n},(function(e,n){if(e)return t(e);var i=n.ListBucketResult||{},a=i.Contents||[],r=i.CommonPrefixes||[];a=o.isArray(a)?a:[a],r=o.isArray(r)?r:[r];var s=o.clone(i);o.extend(s,{Contents:a,CommonPrefixes:r,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},deleteBucket:function(e,t){d.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=o.clone(e.AccessControlPolicy||{}),r=a.Grants||a.Grant;r=o.isArray(r)?r:[r],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),d.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:n,action:"acl",body:i},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketAcl:function(e,t){d.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl"},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},s=i.AccessControlList.Grant||[];s=o.isArray(s)?s:[s];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putBucketCors:function(e,t){var n=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];n=o.clone(o.isArray(n)?n:[n]),o.each(n,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[n],e[t]=o.isArray(i)?i:[i]}))}));var i={CORSRule:n};e.ResponseVary&&(i.ResponseVary=e.ResponseVary);var a=o.json2xml({CORSConfiguration:i}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"cors",headers:r},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketCors:function(e,t){d.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var i={CORSRules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.CORSConfiguration||{},r=a.CORSRules||a.CORSRule||[];r=o.clone(o.isArray(r)?r:[r]);var s=a.ResponseVary;o.each(r,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[t],e[n]=o.isArray(i)?i:[i]}))})),t(null,{CORSRules:r,ResponseVary:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketCors:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},getBucketLocation:function(e,t){d.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location"},(function(e,n){if(e)return t(e);t(null,n)}))},getBucketPolicy:function(e,t){d.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0},(function(e,n){if(e)return e.statusCode&&403===e.statusCode?t({ErrorStatus:"Access Denied"}):e.statusCode&&405===e.statusCode?t({ErrorStatus:"Method Not Allowed"}):e.statusCode&&404===e.statusCode?t({ErrorStatus:"Policy Not Found"}):t(e);var i={};try{i=JSON.parse(n.body)}catch(e){}t(null,{Policy:i,statusCode:n.statusCode,headers:n.headers})}))},putBucketPolicy:function(e,t){var n=e.Policy,i=n;try{"string"==typeof n?n=JSON.parse(i):i=JSON.stringify(n)}catch(e){t({error:"Policy format error"})}var a=e.Headers;a["Content-Type"]="application/json",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:i,headers:a,json:!0},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},deleteBucketPolicy:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},putBucketTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var a=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"tagging",headers:r},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketTagging:function(e,t){d.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketTagging:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLifecycle:function(e,t){var n=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];n=o.clone(n);var i=o.json2xml({LifecycleConfiguration:{Rule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"lifecycle",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLifecycle:function(e,t){d.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var i={Rules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=[];try{a=n.LifecycleConfiguration.Rule||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Rules:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketLifecycle:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var n=e.VersioningConfiguration||{},i=o.json2xml({VersioningConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"versioning",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param VersioningConfiguration"})},getBucketVersioning:function(e,t){d.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning"},(function(e,n){e||!n.VersioningConfiguration&&(n.VersioningConfiguration={}),t(e,n)}))},putBucketReplication:function(e,t){var n=o.clone(e.ReplicationConfiguration),i=o.json2xml({ReplicationConfiguration:n});i=(i=i.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"replication",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketReplication:function(e,t){d.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var i={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else e||!n.ReplicationConfiguration&&(n.ReplicationConfiguration={}),n.ReplicationConfiguration.Rule&&(n.ReplicationConfiguration.Rules=n.ReplicationConfiguration.Rule,delete n.ReplicationConfiguration.Rule),t(e,n)}))},deleteBucketReplication:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var n=o.clone(e.WebsiteConfiguration||{}),i=n.RoutingRules||n.RoutingRule||[];i=o.isArray(i)?i:[i],delete n.RoutingRule,delete n.RoutingRules,i.length&&(n.RoutingRules={RoutingRule:i});var a=o.json2xml({WebsiteConfiguration:n}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"website",headers:r},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param WebsiteConfiguration"})},getBucketWebsite:function(e,t){d.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.WebsiteConfiguration||{};if(a.RoutingRules){var r=o.clone(a.RoutingRules.RoutingRule||[]);r=o.makeArray(r),a.RoutingRules=r}t(null,{WebsiteConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketWebsite:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var n=o.clone(e.RefererConfiguration||{}),i=n.DomainList||{},a=i.Domains||i.Domain||[];(a=o.isArray(a)?a:[a]).length&&(n.DomainList={Domain:a});var r=o.json2xml({RefererConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(r)),d.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"referer",headers:s},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param RefererConfiguration"})},getBucketReferer:function(e,t){d.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.RefererConfiguration||{};if(a.DomainList){var r=o.makeArray(a.DomainList.Domain||[]);a.DomainList={Domains:r}}t(null,{RefererConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},putBucketDomain:function(e,t){var n=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];n=o.clone(n);var i=o.json2xml({DomainConfiguration:{DomainRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"domain",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketDomain:function(e,t){d.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,n){if(e)return t(e);var i=[];try{i=n.DomainConfiguration.DomainRule||[]}catch(e){}i=o.clone(o.isArray(i)?i:[i]),t(null,{DomainRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketDomain:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketOrigin:function(e,t){var n=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];n=o.clone(n);var i=o.json2xml({OriginConfiguration:{OriginRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"origin",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketOrigin:function(e,t){d.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,n){if(e)return t(e);var i=[];try{i=n.OriginConfiguration.OriginRule||[]}catch(e){}i=o.clone(o.isArray(i)?i:[i]),t(null,{OriginRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketOrigin:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLogging:function(e,t){var n=o.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=o.binaryBase64(o.md5(n)),d.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"logging",headers:i},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLogging:function(e,t){d.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},(function(e,n){if(e)return t(e);delete n.BucketLoggingStatus._xmlns,t(null,{BucketLoggingStatus:n.BucketLoggingStatus,statusCode:n.statusCode,headers:n.headers})}))},putBucketInventory:function(e,t){var n=o.clone(e.InventoryConfiguration);if(n.OptionalFields){var i=n.OptionalFields||[];n.OptionalFields={Field:i}}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var a=n.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSECOS")>-1&&(a["SSE-COS"]=a.SSECOS,delete a.SSECOS)}var r=o.json2xml({InventoryConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(r)),d.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"inventory",qs:{id:e.Id},headers:s},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketInventory:function(e,t){d.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},(function(e,n){if(e)return t(e);var i=n.InventoryConfiguration;if(i&&i.OptionalFields&&i.OptionalFields.Field){var a=i.OptionalFields.Field;o.isArray(a)||(a=[a]),i.OptionalFields=a}if(i.Destination&&i.Destination.COSBucketDestination&&i.Destination.COSBucketDestination.Encryption){var r=i.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}t(null,{InventoryConfiguration:i,statusCode:n.statusCode,headers:n.headers})}))},listBucketInventory:function(e,t){d.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken}},(function(e,n){if(e)return t(e);var i=n.ListInventoryConfigurationResult,a=i.InventoryConfiguration||[];a=o.isArray(a)?a:[a],delete i.InventoryConfiguration,o.each(a,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;o.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var n=e.Destination.COSBucketDestination.Encryption;Object.keys(n).indexOf("SSE-COS")>-1&&(n.SSECOS=n["SSE-COS"],delete n["SSE-COS"])}})),i.InventoryConfigurations=a,o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))},deleteBucketInventory:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var n={AccelerateConfiguration:e.AccelerateConfiguration||{}},i=o.json2xml(n),a={"Content-Type":"application/xml"};a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"accelerate",headers:a},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param AccelerateConfiguration"})},getBucketAccelerate:function(e,t){d.call(this,{Interface:"getBucketAccelerate",Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},(function(e,n){e||!n.AccelerateConfiguration&&(n.AccelerateConfiguration={}),t(e,n)}))},getObject:function(e,t){var n=e.Query||{},i=e.QueryString||"",a=e.tracker;a&&a.setParams({signStartTime:(new Date).getTime()}),n["response-content-type"]=e.ResponseContentType,n["response-content-language"]=e.ResponseContentLanguage,n["response-expires"]=e.ResponseExpires,n["response-cache-control"]=e.ResponseCacheControl,n["response-content-disposition"]=e.ResponseContentDisposition,n["response-content-encoding"]=e.ResponseContentEncoding,d.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,qs:n,qsStr:i,rawBody:!0,tracker:a},(function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(n)}t(null,{Body:i.body,ETag:o.attr(i.headers,"etag",""),statusCode:i.statusCode,headers:i.headers})}))},headObject:function(e,t){d.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},(function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0,statusCode:a}):t(n)}i.ETag=o.attr(i.headers,"etag",""),t(null,i)}))},listObjectVersions:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n["key-marker"]=e.KeyMarker,n["version-id-marker"]=e.VersionIdMarker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,d.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,action:"versions"},(function(e,n){if(e)return t(e);var i=n.ListVersionsResult||{},a=i.DeleteMarker||[];a=o.isArray(a)?a:[a];var r=i.Version||[];r=o.isArray(r)?r:[r];var s=o.clone(i);delete s.DeleteMarker,delete s.Version,o.extend(s,{DeleteMarkers:a,Versions:r,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},putObject:function(e,t){var n=this,i=e.ContentLength,r=o.throttleOnProgress.call(n,i,e.onProgress),s=e.Headers;s["Cache-Control"]||s["cache-control"]||(s["Cache-Control"]=""),s["Content-Type"]||s["content-type"]||(s["Content-Type"]=a.getType(e.Key)||"application/octet-stream");var l=e.UploadAddMetaMd5||n.options.UploadAddMetaMd5||n.options.UploadCheckContentMd5,p=e.tracker;l&&p&&p.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(l,e.Body,(function(a){a&&(p&&p.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(s["Content-MD5"]=o.binaryBase64(a)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=a)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),r(null,!0),d.call(n,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:r,tracker:p},(function(a,s){if(a)return r(null,!0),t(a);r({loaded:i,total:i},!0);var l=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:n.options.UseAccelerate?"accelerate":e.Region,object:e.Key});l=l.substr(l.indexOf("://")+3),s.Location=l,s.ETag=o.attr(s.headers,"etag",""),t(null,s)}))}))},postObject:function(e,t){var n=this,i={},a=e.FilePath;if(a){for(var r in i["Cache-Control"]=e.CacheControl,i["Content-Disposition"]=e.ContentDisposition,i["Content-Encoding"]=e.ContentEncoding,i["Content-MD5"]=e.ContentMD5,i["Content-Length"]=e.ContentLength,i["Content-Type"]=e.ContentType,i.Expect=e.Expect,i.Expires=e.Expires,i["x-cos-acl"]=e.ACL,i["x-cos-grant-read"]=e.GrantRead,i["x-cos-grant-write"]=e.GrantWrite,i["x-cos-grant-full-control"]=e.GrantFullControl,i["x-cos-storage-class"]=e.StorageClass,i["x-cos-mime-limit"]=e.MimeLimit,i["x-cos-traffic-limit"]=e.TrafficLimit,i["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,i["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,i["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,i["x-cos-server-side-encryption"]=e.ServerSideEncryption,i["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,i["x-cos-server-side-encryption-context"]=e.SSEContext,delete i["Content-Length"],delete i["content-length"],e)r.indexOf("x-cos-meta-")>-1&&(i[r]=e[r]);var s=o.throttleOnProgress.call(n,i["Content-Length"],e.onProgress);d.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:i,qs:e.Query,filePath:a,TaskId:e.TaskId,onProgress:s},(function(i,o){if(s(null,!0),i)return t(i);if(o&&o.headers){var r=o.headers,l=r.etag||r.Etag||r.ETag||"",p=a.substr(a.lastIndexOf("/")+1),u=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key.replace(/\$\{filename\}/g,p),isLocation:!0});return t(null,{Location:u,statusCode:o.statusCode,headers:r,ETag:l})}t(null,o)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){d.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId},(function(e,n){if(e){var i=e.statusCode;return i&&204===i?t(null,{statusCode:i}):i&&404===i?t(null,{BucketNotFound:!0,statusCode:i}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectAcl:function(e,t){d.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"acl"},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},s=i.AccessControlList&&i.AccessControlList.Grant||[];s=o.isArray(s)?s:[s];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=o.clone(e.AccessControlPolicy||{}),r=a.Grants||a.Grant;r=o.isArray(r)?r:[r],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),d.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:n,body:i},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},optionsObject:function(e,t){var n=e.Headers;n.Origin=e.Origin,n["Access-Control-Request-Method"]=e.AccessControlRequestMethod,n["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,d.call(this,{Action:"name/cos:OptionsObject",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 i=n.headers||{};t(null,{AccessControlAllowOrigin:i["access-control-allow-origin"],AccessControlAllowMethods:i["access-control-allow-methods"],AccessControlAllowHeaders:i["access-control-allow-headers"],AccessControlExposeHeaders:i["access-control-expose-headers"],AccessControlMaxAge:i["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})}))},putObjectCopy:function(e,t){var n=e.Headers;!n["Cache-Control"]&&n["cache-control"]&&(n["Cache-Control"]="");var i=(e.CopySource||"").match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(i){var a=i[1],r=i[3],s=decodeURIComponent(i[4]);d.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,region:r,prefix:s},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyObjectResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var n=e.Objects||[],i=e.Quiet;n=o.isArray(n)?n:[n];var a=o.json2xml({Delete:{Object:n,Quiet:i||!1}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a));var s=o.map(n,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));d.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:a,action:"delete",headers:r},(function(e,n){if(e)return t(e);var i=n.DeleteResult||{},a=i.Deleted||[],r=i.Error||[];a=o.isArray(a)?a:[a],r=o.isArray(r)?r:[r];var s=o.clone(i);o.extend(s,{Error:r,Deleted:a,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var i=e.RestoreRequest||{},a=o.json2xml({RestoreRequest:i});n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:a,action:"restore",headers:n},(function(e,n){t(e,n)}))}else t({error:"missing param RestoreRequest"})},putObjectTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var a=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:a,action:"tagging",headers:r,VersionId:e.VersionId},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectTagging:function(e,t){d.call(this,{Interface:"getObjectTagging",Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteObjectTagging:function(e,t){d.call(this,{Interface:"deleteObjectTagging",Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},appendObject:function(e,t){d.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers},(function(e,n){if(e)return t(e);t(null,n)}))},uploadPartCopy:function(e,t){var n=(e.CopySource||"").match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(n){var i=n[1],a=n[3],r=decodeURIComponent(n[4]);d.call(this,{Scope:[{action:"name/cos:GetObject",bucket:i,region:a,prefix:r},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyPartResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var n=e.Headers,i=e.tracker;n["Cache-Control"]||n["cache-control"]||(n["Cache-Control"]=""),n["Content-Type"]||n["content-type"]||(n["Content-Type"]=a.getType(e.Key)||"application/octet-stream"),d.call(this,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:i},(function(e,n){return e?(i&&i.parent&&i.parent.setParams({errorNode:"multipartInit"}),t(e)):(n=o.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,o.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)}))},multipartUpload:function(e,t){var n=this;o.getFileSize("multipartUpload",e,(function(){var i=e.tracker,a=n.options.UploadCheckContentMd5;a&&i&&i.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(a,e.Body,(function(r){r&&(e.Headers["Content-MD5"]=o.binaryBase64(r),a&&i&&i.setParams({md5EndTime:(new Date).getTime()})),i&&i.setParams({partNumber:e.PartNumber}),d.call(n,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null,tracker:i},(function(e,n){if(e)return i&&i.parent&&i.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:o.attr(n.headers,"etag",{}),statusCode:n.statusCode,headers:n.headers})}))}))}))},multipartComplete:function(e,t){for(var n=this,i=e.UploadId,a=e.Parts,r=e.tracker,s=0,l=a.length;s-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],n="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),i=new RegExp(t,"g");return e.replace(i,n)}(n.Authorization):"sign="+encodeURIComponent(n.Authorization)),n.SecurityToken&&(i+="&x-cos-security-token="+n.SecurityToken),n.ClientIP&&(i+="&clientIP="+n.ClientIP),n.ClientUA&&(i+="&clientUA="+n.ClientUA),n.Token&&(i+="&token="+n.Token),r&&(i+="&"+r),setTimeout((function(){t(null,{Url:i})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),r&&(s+="&"+r)):r&&(s+="?"+r),s},getAuth:function(e){return o.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,SystemClockOffset:this.options.SystemClockOffset})}};e.exports.init=function(e,t){t.transferToTaskMethod(m,"postObject"),t.transferToTaskMethod(m,"putObject"),o.each(m,(function(t,n){e.prototype[n]=o.apiWrapper(n,t)}))}},function(e,t){function n(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}var i=function(e,t){var i,o,a,r=[],s=function(e,t){var i=[];for(var o in e)e.hasOwnProperty(o)&&i.push(t?n(o).toLowerCase():o);return i.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(i=0;i-1||m.indexOf(h)>-1)&&(f[h]=e.headers[h]);a["x-cos-acl"]&&(f.acl=a["x-cos-acl"]),!f["Content-Type"]&&(f["Content-Type"]=""),(n=wx.uploadFile({url:r,method:s,name:"file",header:a,filePath:o,formData:f,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}})).onProgressUpdate((function(e){c&&c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend,progress:e.progress/100})}))}else{var g=e.qs&&i(e.qs)||"";g&&(r+=(r.indexOf("?")>-1?"&":"?")+g),a["Content-Length"]&&delete a["Content-Length"];var v={url:r,method:s,header:a,dataType:"text",data:e.body,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),n=wx.request(v)}return n}},function(e,t,n){"use strict";let i=n(27);e.exports=new i(n(28),n(29))},function(e,t,n){"use strict";function i(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;ev)return n(null,!1);if(i>1&&Math.max(t[0].Size,t[1].Size)!==g)return n(null,!1);!function o(a){if(a=r.length)k.emit("has_and_check_upload_id",t);else{var d=r[p];if(!s.isInArray(t,d))return o.removeUploadId(d),void a(p+1);o.using[d]?a(p+1):u.call(f,{Bucket:i,Region:c,Key:l,UploadId:d,tracker:e.tracker},(function(e,t){f._isRunningTask(n)&&(e?(o.removeUploadId(d),a(p+1)):k.emit("upload_id_available",{UploadId:d,PartList:t.PartList}))}))}}(0)}else k.emit("has_and_check_upload_id",t)})),k.on("get_remote_upload_id_list",(function(){p.call(f,{Bucket:i,Region:c,Key:l,tracker:e.tracker},(function(t,a){if(f._isRunningTask(n)){if(t)return k.emit("error",t);var r=s.filter(a.UploadList,(function(e){return e.Key===l&&(!d||e.StorageClass.toUpperCase()===d.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(r.length)k.emit("seek_local_avail_upload_id",r);else{var c,p=o.getFileId(e.FileStat,e.ChunkSize,i,l);p&&(c=o.getUploadIdList(p))&&s.each(c,(function(e){o.removeUploadId(e)})),k.emit("no_available_upload_id")}}}))})),k.emit("get_remote_upload_id_list")}function p(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartList(o,(function(n,a){if(n)return t(n);i.push.apply(i,a.Upload||[]),"true"===a.IsTruncated?(o.KeyMarker=a.NextKeyMarker,o.UploadIdMarker=a.NextUploadIdMarker,e()):t(null,{UploadList:i})}))}()}function u(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartListPart(o,(function(n,a){if(n)return t(n);i.push.apply(i,a.Part||[]),"true"===a.IsTruncated?(o.PartNumberMarker=a.NextPartNumberMarker,e()):t(null,{PartList:i})}))}()}function d(e,t){var n=this,i=e.TaskId,o=e.Bucket,r=e.Region,c=e.Key,l=e.UploadData,p=e.FileSize,u=e.SliceSize,d=Math.min(e.AsyncLimit||n.options.ChunkParallelLimit||1,256),m=e.FilePath,h=Math.ceil(p/u),g=0,v=e.ServerSideEncryption,y=s.filter(l.PartList,(function(e){return e.Uploaded&&(g+=e.PartNumber>=h&&p%u||u),!e.Uploaded})),x=e.onProgress;a.eachLimit(y,d,(function(t,a){if(n._isRunningTask(i)){var s=t.PartNumber,d=Math.min(p,t.PartNumber*u)-(t.PartNumber-1)*u,h=0;f.call(n,{TaskId:i,Bucket:o,Region:r,Key:c,SliceSize:u,FileSize:p,PartNumber:s,ServerSideEncryption:v,FilePath:m,UploadData:l,onProgress:function(e){g+=e.loaded-h,h=e.loaded,x({loaded:g,total:p})},tracker:e.tracker},(function(e,o){n._isRunningTask(i)&&(e?g-=h:(g+=d-h,t.ETag=o.ETag),x({loaded:g,total:p}),a(e||null,o))}))}}),(function(e){if(n._isRunningTask(i))return e?t(e):void t(null,{UploadId:l.UploadId,SliceList:l.PartList})}))}function f(e,t){var n=this,i=e.TaskId,o=e.Bucket,r=e.Region,c=e.Key,l=e.FileSize,p=e.FilePath,u=1*e.PartNumber,d=e.SliceSize,f=e.ServerSideEncryption,m=e.UploadData,h=n.options.ChunkRetryTimes+1,g=e.Headers||{},v=d*(u-1),y=d,x=v+d;x>l&&(y=(x=l)-v);var b=["x-cos-traffic-limit","x-cos-mime-limit"],k={};s.each(g,(function(e,t){b.indexOf(t)>-1&&(k[t]=e)})),s.fileSlice(p,v,x,(function(l){var p=s.getFileMd5(l),d=p?s.binaryBase64(p):null,g=m.PartList[u-1];a.retry(h,(function(t){n._isRunningTask(i)&&n.multipartUpload({TaskId:i,Bucket:o,Region:r,Key:c,ContentLength:y,PartNumber:u,UploadId:m.UploadId,ServerSideEncryption:f,Body:l,Headers:k,onProgress:e.onProgress,ContentMD5:d,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,o){if(n._isRunningTask(i))return e?t(e):(g.Uploaded=!0,t(null,o))}))}),(function(e,o){if(n._isRunningTask(i))return t(e,o)}))}))}function m(e,t){var n=e.Bucket,i=e.Region,o=e.Key,r=e.UploadId,s=e.SliceList,c=this,l=this.options.ChunkRetryTimes+1,p=s.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));a.retry(l,(function(t){c.multipartComplete({Bucket:n,Region:i,Key:o,UploadId:r,Parts:p,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,n){t(e,n)}))}function h(e,t){var n=e.Bucket,i=e.Region,o=e.Key,r=e.AbortArray,s=e.AsyncLimit||1,c=this,l=0,p=new Array(r.length);a.eachLimit(r,s,(function(t,a){var r=l;if(o&&o!==t.Key)return p[r]={error:{KeyNotMatch:!0}},void a(null);var s=t.UploadId||t.UploadID;c.multipartAbort({Bucket:n,Region:i,Key:t.Key,Headers:e.Headers,UploadId:s},(function(e){var o={Bucket:n,Region:i,Key:t.Key,UploadId:s};p[r]={error:e,task:o},a(null)})),l++}),(function(e){if(e)return t(e);for(var n=[],i=[],o=0,a=p.length;oo?"sliceUploadFile":f;a.push({api:m,params:e,callback:function(n,i){e.tracker&&e.tracker.formatResult(n,i),d&&d(n,i,l),t&&t(n,i)}}),n._addTasks(a)},uploadFiles:function(e,t){var n=this,o=void 0===e.SliceSize?n.options.SliceSize:e.SliceSize,a=0,r=0,l=s.throttleOnProgress.call(n,r,e.onProgress),p=e.files.length,u=e.onFileFinish,d=Array(p),f=function(e,n,i){l(null,!0),u&&u(e,n,i),d[i.Index]={options:i,error:e,data:n},--p<=0&&t&&t(null,{files:d})},m=[];s.each(e.files,(function(e,t){var p=e.FileSize,u={Index:t,TaskId:""};if(a+=p,n.options.EnableTracker){var d=n.options.UseAccelerate||n.options.Domain.includes("accelerate.");e.tracker=new c({bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:p,accelerate:d,deepTracker:n.options.DeepTracker,customId:n.options.CustomId,delay:n.options.TrackerDelay})}s.each(e,(function(e,t){"object"!==i(e)&&"function"!=typeof e&&(u[t]=e)}));var h=e.onTaskReady;e.onTaskReady=function(e){u.TaskId=e,h&&h(e)};var g=0,v=e.onProgress;e.onProgress=function(e){r=r-g+e.loaded,g=e.loaded,v&&v(e),l({loaded:r,total:a})};var y=e.onFileFinish,x="postObject"===n.options.SimpleUploadMethod?"postObject":"putObject",b=p>o?"sliceUploadFile":x;m.push({api:b,params:e,callback:function(t,n){e.tracker&&e.tracker.formatResult(t,n),y&&y(t,n),f&&f(t,n,u)}})})),n._addTasks(m)},sliceCopyFile:function(e,t){var n=new r,i=this,o=e.Bucket,c=e.Region,l=e.Key,p=e.CopySource,u=p.match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(u){var d=u[1],f=u[3],m=decodeURIComponent(u[4]),h=void 0===e.CopySliceSize?i.options.CopySliceSize:e.CopySliceSize;h=Math.max(0,h);var v,y,x=e.CopyChunkSize||this.options.CopyChunkSize,b=this.options.CopyChunkParallelLimit,k=0;n.on("copy_slice_complete",(function(e){i.multipartComplete({Bucket:o,Region:c,Key:l,UploadId:e.UploadId,Parts:e.PartList,calledBySdk:"sliceCopyFile"},(function(e,n){if(e)return y(null,!0),t(e);y({loaded:v,total:v},!0),t(null,n)}))})),n.on("get_copy_data_finish",(function(e){a.eachLimit(e.PartList,b,(function(t,n){var a=t.PartNumber,r=t.CopySourceRange,s=t.end-t.start,u=0;g.call(i,{Bucket:o,Region:c,Key:l,CopySource:p,UploadId:e.UploadId,PartNumber:a,CopySourceRange:r,onProgress:function(e){k+=e.loaded-u,u=e.loaded,y({loaded:k,total:v})}},(function(e,i){if(e)return n(e);y({loaded:k,total:v}),k+=s-u,t.ETag=i.ETag,n(e||null,i)}))}),(function(i){if(i)return y(null,!0),t(i);n.emit("copy_slice_complete",e)}))})),n.on("get_file_size_finish",(function(a){var r;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,o=0;on.length&&(c[t]=e)})),n.emit("get_file_size_finish",c)}else t({error:'get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.'})}))}else t({error:"CopySource format error"})}};e.exports.init=function(e,t){t.transferToTaskMethod(v,"sliceUploadFile"),s.each(v,(function(t,n){e.prototype[n]=s.apiWrapper(n,t)}))}},function(e,t){var n={eachLimit:function(e,t,n,i){if(i=i||function(){},!e.length||t<=0)return i();var o=0,a=0,r=0;!function s(){if(o>=e.length)return i();for(;r=e.length?i():s())}))}()},retry:function(e,t,n){e<1?n():function i(o){t((function(t,a){t&&o=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function o(e,t,n,i,o,a,r){try{var s=e[a](r),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var r=n(12),s=n(15),c=n(16),l=n(21),p=n(5).btoa,u=wx.getFileSystemManager(),d=n(6);function f(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function m(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(t?f(i).toLowerCase():i);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var h=["content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","response-cache-control","response-content-disposition","response-content-encoding","response-content-language","response-content-type","response-expires","transfer-encoding","versionid"],g=function(){},v=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]);return t};function y(e){return C(e,(function(e){return"object"===a(e)&&null!==e?y(e):e}))}function x(e,t){return k(t,(function(n,i){e[i]=t[i]})),e}function b(e){return e instanceof Array}function k(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function C(e,t){var n=b(e)?[]:{};for(var i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i));return n}var S=function(e,t){if(t=x({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var n=t.Headers||{};if(t&&"object"===a(t)){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(n[e]=t[e])}();R.each({"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext"},(function(e,i){void 0!==t[e]&&(n[i]=t[e])})),t.Headers=v(n)}}return t},_=function(e){return new Promise((function(t,n){u.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){n((null==e?void 0:e.errMsg)||"")}})}))},w=function(){var e,t=(e=i().mark((function e(t,n,o){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}o(),e.next=21;break;case 4:if("putObject"!==t){e.next=20;break}if(void 0!==n.Body||!n.FilePath){e.next=17;break}return e.prev=6,e.next=9,_(n.FilePath);case 9:n.Body=e.sent,e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(6),n.Body=void 0,o({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==n.Body?(n.ContentLength=n.Body.byteLength,o(null,n.ContentLength)):o({error:"missing param Body"}),e.next=21;break;case 20:n.FilePath?u.stat({path:n.FilePath,success:function(e){var t=e.stats;n.FileStat=t,n.FileStat.FilePath=n.FilePath;var i=t.isDirectory()?0:t.size;n.ContentLength=i=i||0,o(null,i)},fail:function(e){o(e)}}):o({error:"missing param FilePath"});case 21:case"end":return e.stop()}}),e,null,[[6,12]])})),function(){var t=this,n=arguments;return new Promise((function(i,a){var r=e.apply(t,n);function s(e){o(r,i,a,s,c,"next",e)}function c(e){o(r,i,a,s,c,"throw",e)}s(void 0)}))});return function(e,n,i){return t.apply(this,arguments)}}(),E=function(e){return Date.now()+(e||0)},T=function(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.lengtha)return 1;if(o=0;!t&&e.platform;return function(){return!1,t}}(),R={noop:g,formatParams:S,apiWrapper:function(e,n){return function(i,o){var a,r=this;if("function"==typeof i&&(o=i,i={}),i=S(e,i),r.options.EnableTracker)if("sliceUploadFile"===i.calledBySdk)a=i.tracker&&i.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))a=null;else{var s=-1;i.Body&&(s="string"==typeof i.Body?i.Body.length:i.Body.size||i.Body.byteLength||-1),a=new d({bucket:i.Bucket,region:i.Region,apiName:e,fileKey:i.Key,fileSize:s,deepTracker:r.options.DeepTracker,customId:r.options.CustomId,delay:r.options.TrackerDelay})}i.tracker=a;var c=function(e){return e&&e.headers&&(e.headers["x-cos-request-id"]&&(e.RequestId=e.headers["x-cos-request-id"]),e.headers["x-ci-request-id"]&&(e.RequestId=e.headers["x-ci-request-id"]),e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},l=function(e,t){a&&a.formatResult(e,t),o&&o(c(e),c(t))},p=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var n=t.Bucket,i=t.Region,o=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!n)return"Bucket";if(!i)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e){if(!n)return"Bucket";if(!i)return"Region";if(!o)return"Key"}return!1}(e,i);if(t)return"missing param "+t;if(i.Region){if(i.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(i.Region))return"Region format error.";!r.options.CompatibilityMode&&-1===i.Region.indexOf("-")&&"yfb"!==i.Region&&"default"!==i.Region&&i.Region}if(i.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(i.Bucket))if(i.AppId)i.Bucket=i.Bucket+"-"+i.AppId;else{if(!r.options.AppId)return'Bucket should format as "test-1250000000".';i.Bucket=i.Bucket+"-"+r.options.AppId}i.AppId&&delete i.AppId}i.Key&&"/"===i.Key.substr(0,1)&&(i.Key=i.Key.substr(1))}}(),u="getAuth"===e||"getObjectUrl"===e,f=t.Promise;if(!u&&f&&!o)return new f((function(e,t){if(o=function(n,i){n?t(n):e(i)},p)return l({error:p});n.call(r,i,l)}));if(p)return l({error:p});var m=n.call(r,i,l);return u?m:void 0}},xml2json:c,json2xml:l,md5:r,clearKey:v,fileSlice:function(e,t,n,i){e?u.readFile({filePath:e,position:t,length:n-t,success:function(e){i(e.data)},fail:function(){i(null)}}):i(null)},getBodyMd5:function(e,t,n){n=n||g,e&&t&&t instanceof ArrayBuffer?R.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=r(e);return t&&t(n),n},binaryBase64:function(e){var t,n,i,o="";for(t=0,n=e.length/2;t-1||h.indexOf(i)>-1)&&(t[n]=e[n])}return t}(y(e.Headers||e.headers||{})),l=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+l:0!==(t=e.Pathname||e.pathname||l).indexOf("/")&&(t="/"+t);var p=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&p&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),n&&i){var u=Math.round(E(e.SystemClockOffset)/1e3)-1,d=u,f=e.Expires||e.expires;d+=void 0===f?900:1*f||0;var g=n,v=o||u+";"+d,x=o||u+";"+d,b=m(c,!0).join(";").toLowerCase(),k=m(r,!0).join(";").toLowerCase(),C=s.HmacSHA1(x,i).toString(),S=[a,t,R.obj2str(r,!0),R.obj2str(c,!0),""].join("\n"),_=["sha1",v,s.SHA1(S).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+g,"q-sign-time="+v,"q-key-time="+x,"q-header-list="+b,"q-url-param-list="+k,"q-signature="+s.HmacSHA1(_,C).toString()].join("&")}},compareVersion:T,canFileSlice:A,isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},error:function(e,t){var n=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===a(t)&&null!==t&&(x(e,t),(t.code||t.name)&&(e.code=t.code||t.name),t.message&&(e.message=t.message),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.code||(e.code=e.name),e.error||(e.error=y(n)),e}};e.exports=R}).call(this,n(2))},function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var o=i({HTML:"text/html",isHTML:function(e){return e===o.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.freeze=i,t.MIME_TYPE=o,t.NAMESPACE=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var i=n(1).NAMESPACE;function o(e){return""!==e}function a(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function r(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(o):[]}(e);return Object.keys(t.reduce(a,{}))}function s(e,t){for(var n in e)t[n]=e[n]}function c(e,t){var n=e.prototype;if(!(n instanceof t)){function i(){}i.prototype=t.prototype,s(n,i=new i),e.prototype=n=i}n.constructor!=e&&(n.constructor=e)}var l={},p=l.ELEMENT_NODE=1,u=l.ATTRIBUTE_NODE=2,d=l.TEXT_NODE=3,f=l.CDATA_SECTION_NODE=4,m=l.ENTITY_REFERENCE_NODE=5,h=l.ENTITY_NODE=6,g=l.PROCESSING_INSTRUCTION_NODE=7,v=l.COMMENT_NODE=8,y=l.DOCUMENT_NODE=9,x=l.DOCUMENT_TYPE_NODE=10,b=l.DOCUMENT_FRAGMENT_NODE=11,k=l.NOTATION_NODE=12,C={},S={},_=(C.INDEX_SIZE_ERR=(S[1]="Index size error",1),C.DOMSTRING_SIZE_ERR=(S[2]="DOMString size error",2),C.HIERARCHY_REQUEST_ERR=(S[3]="Hierarchy request error",3)),w=(C.WRONG_DOCUMENT_ERR=(S[4]="Wrong document",4),C.INVALID_CHARACTER_ERR=(S[5]="Invalid character",5),C.NO_DATA_ALLOWED_ERR=(S[6]="No data allowed",6),C.NO_MODIFICATION_ALLOWED_ERR=(S[7]="No modification allowed",7),C.NOT_FOUND_ERR=(S[8]="Not found",8)),E=(C.NOT_SUPPORTED_ERR=(S[9]="Not supported",9),C.INUSE_ATTRIBUTE_ERR=(S[10]="Attribute in use",10));C.INVALID_STATE_ERR=(S[11]="Invalid state",11),C.SYNTAX_ERR=(S[12]="Syntax error",12),C.INVALID_MODIFICATION_ERR=(S[13]="Invalid modification",13),C.NAMESPACE_ERR=(S[14]="Invalid namespace",14),C.INVALID_ACCESS_ERR=(S[15]="Invalid access",15);function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,S[e]),this.message=S[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function A(){}function R(e,t){this._node=e,this._refresh=t,O(this)}function O(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);le(e,"length",n.length),s(n,e),e._inc=t}}function I(){}function B(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function N(e,t,n,o){if(o?t[B(t,o)]=n:t[t.length++]=n,e){n.ownerElement=e;var a=e.ownerDocument;a&&(o&&F(a,e,o),function(e,t,n){e&&e._inc++,n.namespaceURI===i.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(a,e,n))}}function P(e,t,n){var i=B(t,n);if(!(i>=0))throw T(w,new Error(e.tagName+"@"+n));for(var o=t.length-1;i"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0}while(e=e.nextSibling)}function U(){}function F(e,t,n,o){e&&e._inc++,n.namespaceURI===i.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function H(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var o=t.firstChild,a=0;o;)i[a++]=o,o=o.nextSibling;i.length=a,delete i[i.length]}}}function z(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function q(e,t,n){var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===b){var o=t.firstChild;if(null==o)return t;var a=t.lastChild}else o=a=t;var r=n?n.previousSibling:e.lastChild;o.previousSibling=r,a.nextSibling=n,r?r.nextSibling=o:e.firstChild=o,null==n?e.lastChild=a:n.previousSibling=a;do{o.parentNode=e}while(o!==a&&(o=o.nextSibling));return H(e.ownerDocument||e,e),t.nodeType==b&&(t.firstChild=t.lastChild=null),t}function K(){this._nsMap={}}function G(){}function V(){}function X(){}function W(){}function Y(){}function Q(){}function J(){}function $(){}function Z(){}function ee(){}function te(){}function ne(){}function ie(e,t){var n=[],i=9==this.nodeType&&this.documentElement||this,o=i.prefix,a=i.namespaceURI;if(a&&null==o&&null==(o=i.lookupPrefix(a)))var r=[{namespace:a,prefix:null}];return re(this,n,e,t,r),n.join("")}function oe(e,t,n){var o=e.prefix||"",a=e.namespaceURI;if(!a)return!1;if("xml"===o&&a===i.XML||a===i.XMLNS)return!1;for(var r=n.length;r--;){var s=n[r];if(s.prefix===o)return s.namespace!==a}return!0}function ae(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,M),'"')}function re(e,t,n,o,a){if(a||(a=[]),o){if(!(e=o(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var r=e.attributes,s=r.length,c=e.firstChild,l=e.tagName,h=l;if(!(n=i.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var k,C=0;C=0;S--){if(""===(_=a[S]).prefix&&_.namespace===e.namespaceURI){k=_.namespace;break}}if(k!==e.namespaceURI)for(S=a.length-1;S>=0;S--){var _;if((_=a[S]).namespace===e.namespaceURI){_.prefix&&(h=_.prefix+":"+l);break}}}t.push("<",h);for(var w=0;w"),n&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):re(c,t,n,o,a.slice()),c=c.nextSibling;else for(;c;)re(c,t,n,o,a.slice()),c=c.nextSibling;t.push("")}else t.push("/>");return;case y:case b:for(c=e.firstChild;c;)re(c,t,n,o,a.slice()),c=c.nextSibling;return;case u:return ae(t,e.name,e.value);case d:return t.push(e.data.replace(/[<&>]/g,M));case f:return t.push("");case v:return t.push("\x3c!--",e.data,"--\x3e");case x:var R=e.publicId,O=e.systemId;if(t.push("");else if(O&&"."!=O)t.push(" SYSTEM ",O,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case g:return t.push("");case m:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function se(e,t,n){var i;switch(t.nodeType){case p:(i=t.cloneNode(!1)).ownerDocument=e;case b:break;case u:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var o=t.firstChild;o;)i.appendChild(se(e,o,n)),o=o.nextSibling;return i}function ce(e,t,n){var i=new t.constructor;for(var o in t){var a=t[o];"object"!=typeof a&&a!=i[o]&&(i[o]=a)}switch(t.childNodes&&(i.childNodes=new A),i.ownerDocument=e,i.nodeType){case p:var r=t.attributes,s=i.attributes=new I,c=r.length;s._ownerElement=i;for(var l=0;l0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(n[i]==e)return i;t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},s(l,j),s(l,j.prototype),U.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==b){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return null==this.documentElement&&e.nodeType==p&&(this.documentElement=e),q(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),z(this,e)},importNode:function(e,t){return se(this,e,t)},getElementById:function(e){var t=null;return L(this.documentElement,(function(n){if(n.nodeType==p&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=r(e);return new R(this,(function(n){var i=[];return t.length>0&&L(n.documentElement,(function(o){if(o!==n&&o.nodeType===p){var a=o.getAttribute("class");if(a){var s=e===a;if(!s){var c=r(a);s=t.every((l=c,function(e){return l&&-1!==l.indexOf(e)}))}s&&i.push(o)}}var l})),i}))},createElement:function(e){var t=new K;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new A,(t.attributes=new I)._ownerElement=t,t},createDocumentFragment:function(){var e=new ee;return e.ownerDocument=this,e.childNodes=new A,e},createTextNode:function(e){var t=new X;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new W;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Y;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new te;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new G;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Z;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new K,i=t.split(":"),o=n.attributes=new I;return n.childNodes=new A,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,o._ownerElement=n,n},createAttributeNS:function(e,t){var n=new G,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},c(U,j),K.prototype={nodeType:p,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===b?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,H(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new R(this,(function(t){var n=[];return L(t,(function(i){i===t||i.nodeType!=p||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new R(this,(function(n){var i=[];return L(n,(function(o){o===n||o.nodeType!==p||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||i.push(o)})),i}))}},U.prototype.getElementsByTagName=K.prototype.getElementsByTagName,U.prototype.getElementsByTagNameNS=K.prototype.getElementsByTagNameNS,c(K,j),G.prototype.nodeType=u,c(G,j),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(S[_])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},c(V,j),X.prototype={nodeName:"#text",nodeType:d,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},c(X,V),W.prototype={nodeName:"#comment",nodeType:v},c(W,V),Y.prototype={nodeName:"#cdata-section",nodeType:f},c(Y,V),Q.prototype.nodeType=x,c(Q,j),J.prototype.nodeType=k,c(J,j),$.prototype.nodeType=h,c($,j),Z.prototype.nodeType=m,c(Z,j),ee.prototype.nodeName="#document-fragment",ee.prototype.nodeType=b,c(ee,j),te.prototype.nodeType=g,c(te,j),ne.prototype.serializeToString=function(e,t,n){return ie.call(e,t,n)},j.prototype.toString=ie;try{if(Object.defineProperty){function pe(e){switch(e.nodeType){case p:case b:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(pe(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(R.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(j.prototype,"textContent",{get:function(){return pe(this)},set:function(e){switch(this.nodeType){case p:case b:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),le=function(e,t,n){e["$$"+t]=n}}}catch(ue){}t.DocumentType=Q,t.DOMException=T,t.DOMImplementation=D,t.Element=K,t.Node=j,t.NodeList=A,t.XMLSerializer=ne},function(e,t){var n=function(e){var t=(e=e||{}).Base64,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=function(e){for(var t={},n=0,i=e.length;n>>6)+o(128|63&t):o(224|t>>>12&15)+o(128|t>>>6&63)+o(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return o(240|t>>>18&7)+o(128|t>>>12&63)+o(128|t>>>6&63)+o(128|63&t)},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(r,a)},c=function(e){var t=[0,2,1][e.length%3],i=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[n.charAt(i>>>18),n.charAt(i>>>12&63),t>=2?"=":n.charAt(i>>>6&63),t>=1?"=":n.charAt(63&i)].join("")},l=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,c)},p=function(e){return l(s(e))},u=function(e,t){return t?p(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):p(String(e))},d=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),f=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return o(55296+(t>>>10))+o(56320+(1023&t));case 3:return o((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return o((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},m=function(e){return e.replace(d,f)},h=function(e){var t=e.length,n=t%4,a=(t>0?i[e.charAt(0)]<<18:0)|(t>1?i[e.charAt(1)]<<12:0)|(t>2?i[e.charAt(2)]<<6:0)|(t>3?i[e.charAt(3)]:0),r=[o(a>>>16),o(a>>>8&255),o(255&a)];return r.length-=[0,0,2,1][n],r.join("")},g=e.atob?function(t){return e.atob(t)}:function(e){return e.replace(/[\s\S]{1,4}/g,h)},v=function(e){return m(g(e))},y=function(e){return v(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))};return{VERSION:"2.1.9",atob:g,btoa:l,fromBase64:y,toBase64:u,utob:s,encode:u,encodeURI:function(e){return u(e,!0)},btou:m,decode:y,noConflict:function(){var n=e.Base64;return e.Base64=t,n}}}();e.exports=n},function(e,t,n){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},r=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function p(e,t,n,i){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),r=new w(i||[]);return a._invoke=function(e,t,n){var i="suspendedStart";return function(o,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw a;return T()}for(n.method=o,n.arg=a;;){var r=n.delegate;if(r){var s=C(r,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}(e,n,r),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=p;var d={};function f(){}function m(){}function h(){}var g={};l(g,r,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(E([])));y&&y!==t&&n.call(y,r)&&(g=y);var x=h.prototype=f.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function o(a,r,s,c){var l=u(e[a],e,r);if("throw"!==l.type){var p=l.arg,d=p.value;return d&&"object"==i(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,s,c)}),(function(e){o("throw",e,s,c)})):t.resolve(d).then((function(e){p.value=e,s(p)}),(function(e){return o("throw",e,s,c)}))}c(l.arg)}var a;this._invoke=function(e,n){function i(){return new t((function(t,i){o(e,n,t,i)}))}return a=a?a.then(i,i):i()}}function C(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function t(){for(;++i=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function a(e,t,n,i,o,a,r){try{var s=e[a](r),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function r(e,t){for(var n=0;n=0;o--)t===i[o]&&i.splice(o,1)},e.emit=function(e,t){for(var i=n(e).map((function(e){return e})),o=0;o=0;n--){var o=i[n][2];(!o||o+2592e3=0;a--){var r=i[a];(r[0]===e&&r[1]===t||e!==r[0]&&0===r[0].indexOf(o))&&i.splice(a,1)}i.unshift([e,t,Math.round(Date.now()/1e3)]),i.length>n&&i.splice(n),l()}},removeUploadId:function(e){c(),delete p.using[e];for(var t=i.length-1;t>=0;t--)i[t][1]===e&&i.splice(t,1);l()}};e.exports=p},function(e,t,n){var i=n(11);e.exports=i},function(e,t,n){"use strict";var i=n(0),o=n(8),a=n(23),r=n(24),s=n(30),c=n(7),l={SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,UploadQueueSize:1e4,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,HttpDNSServiceId:"",SimpleUploadMethod:"postObject",EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:""},p=function(e){this.options=i.extend(i.clone(l),e||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1048576,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1048576,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.AppId,this.options.SecretId&&this.options.SecretId.indexOf(" "),this.options.SecretKey&&this.options.SecretKey.indexOf(" "),o.init(this),a.init(this)};r.init(p,a),s.init(p,a),p.util={md5:i.md5,xml2json:i.xml2json,json2xml:i.json2xml},p.getAuthorization=i.getAuth,p.version=c.version,e.exports=p},function(module,exports,__webpack_require__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===("undefined"==typeof window?"undefined":_typeof(window)),root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===("undefined"==typeof self?"undefined":_typeof(self)),NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"===(void 0===process?"undefined":_typeof(process))&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"===_typeof(module)&&module.exports,AMD=__webpack_require__(14),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===_typeof(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t){return new Md5(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.getCtx=e.create=function(){return new Md5},e.update=function(t){return e.create().update(t)};for(var t=0;t>2]|=e[a]<>6,c[o++]=128|63&i):i<55296||i>=57344?(c[o++]=224|i>>12,c[o++]=128|i>>6&63,c[o++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++a)),c[o++]=240|i>>18,c[o++]=128|i>>12&63,c[o++]=128|i>>6&63,c[o++]=128|63&i);else for(o=this.start;a>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[o>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=EXTRA[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,t,n,i,o,a,r=this.blocks;this.first?t=((t=((e=((e=r[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(i=((i=(-1732584194^2004318071&e)+r[1]-117830708)<<12|i>>>20)+e<<0)&(-271733879^e))+r[2]-1126478375)<<17|n>>>15)+i<<0)&(i^e))+r[3]-1316259209)<<22|t>>>10)+n<<0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((i=this.h3)^t&(n^i))+r[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[1]-389564586)<<12|i>>>20)+e<<0)&(e^t))+r[2]+606105819)<<17|n>>>15)+i<<0)&(i^e))+r[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(i^t&(n^i))+r[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[5]+1200080426)<<12|i>>>20)+e<<0)&(e^t))+r[6]-1473231341)<<17|n>>>15)+i<<0)&(i^e))+r[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(i^t&(n^i))+r[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[9]-1958414417)<<12|i>>>20)+e<<0)&(e^t))+r[10]-42063)<<17|n>>>15)+i<<0)&(i^e))+r[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(i^t&(n^i))+r[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[13]-40341101)<<12|i>>>20)+e<<0)&(e^t))+r[14]-1502002290)<<17|n>>>15)+i<<0)&(i^e))+r[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[1]-165796510)<<5|e>>>27)+t<<0)^t))+r[6]-1069501632)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[11]+643717713)<<14|n>>>18)+i<<0)^i))+r[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[5]-701558691)<<5|e>>>27)+t<<0)^t))+r[10]+38016083)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[15]-660478335)<<14|n>>>18)+i<<0)^i))+r[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[9]+568446438)<<5|e>>>27)+t<<0)^t))+r[14]-1019803690)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[3]-187363961)<<14|n>>>18)+i<<0)^i))+r[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[13]-1444681467)<<5|e>>>27)+t<<0)^t))+r[2]-51403784)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[7]+1735328473)<<14|n>>>18)+i<<0)^i))+r[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[5]-378558)<<4|e>>>28)+t<<0))+r[8]-2022574463)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[11]+1839030562)<<16|n>>>16)+i<<0))+r[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[1]-1530992060)<<4|e>>>28)+t<<0))+r[4]+1272893353)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[7]-155497632)<<16|n>>>16)+i<<0))+r[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[13]+681279174)<<4|e>>>28)+t<<0))+r[0]-358537222)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[3]-722521979)<<16|n>>>16)+i<<0))+r[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[9]-640364487)<<4|e>>>28)+t<<0))+r[12]-421815835)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[15]+530742520)<<16|n>>>16)+i<<0))+r[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[0]-198630844)<<6|e>>>26)+t<<0)|~n))+r[7]+1126891415)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[14]-1416354905)<<15|n>>>17)+i<<0)|~e))+r[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+r[3]-1894986606)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[10]-1051523)<<15|n>>>17)+i<<0)|~e))+r[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+r[15]-30611744)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[6]-1560198380)<<15|n>>>17)+i<<0)|~e))+r[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[4]-145523070)<<6|e>>>26)+t<<0)|~n))+r[11]-1120210379)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[2]+718787259)<<15|n>>>17)+i<<0)|~e))+r[9]-343485551)<<21|t>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=n-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,t,n,i="",o=this.array(),a=0;a<15;)e=o[a++],t=o[a++],n=o[a++],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|n>>>6)]+BASE64_ENCODE_CHAR[63&n];return e=o[a],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(13),__webpack_require__(2),__webpack_require__(3)(module))},function(e,t){var n,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:r}catch(e){i=r}}();var c,l=[],p=!1,u=-1;function d(){p&&c&&(p=!1,c.length?l=c.concat(l):u=-1,l.length&&f())}function f(){if(!p){var e=s(d);p=!0;for(var t=l.length;t;){for(c=l,l=[];++u1)for(var n=1;n>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i>>2]>>>24-i%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=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new r.init(n,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new r.init(n,t)}},p=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},u=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,o=e.min(4*t,o),t){for(var c=0;cl;l++){if(16>l)a[l]=0|e[t+l];else{var p=a[l-3]^a[l-8]^a[l-14]^a[l-16];a[l]=p<<1|p>>>31}p=(i<<5|i>>>27)+c+a[l],p=20>l?p+(1518500249+(o&r|~o&s)):40>l?p+(1859775393+(o^r^s)):60>l?p+((o&r|o&s|r&s)-1894007588):p+((o^r^s)-899497514),c=s,s=r,r=o<<30|o>>>2,o=i,i=p}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+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}}),n.SHA1=o._createHelper(r),n.HmacSHA1=o._createHmacHelper(r),function(){var e=l,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 i=e.blockSize,o=4*i;n.sigBytes>o&&(n=e.finalize(n)),n.clamp();for(var a=this._oKey=n.clone(),r=this._iKey=n.clone(),s=a.words,c=r.words,l=0;l>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,i=n.charAt(64);if(i){var o=e.indexOf(i);-1!=o&&(t=o)}for(var a=[],r=0,s=0;s>>6-s%4*2;a[r>>>2]|=(l|p)<<24-r%4*8,r++}return c.create(a,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=l},function(e,t,n){var i=n(17).DOMParser,o=function(e){"use strict";e=e||{},function(){void 0===e.escapeMode&&(e.escapeMode=!0);e.attributePrefix=e.attributePrefix||"_",e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0);e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0);void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0);e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1);e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1)}();var t=1,n=3,o=4,a=8,r=9;function s(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function c(e){return"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):e}function l(e,t,n,i){for(var o=0;o0&&l(e.arrayAccessFormPaths,t,n,i)&&(t[n]=[t[n]])}function u(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),i=t[5].split(".");if(n.setHours(t[3],t[4],i[0]),i.length>1&&n.setMilliseconds(i[1]),t[6]&&t[7]){var o=60*t[6]+Number(t[7]);o=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),n.setMinutes(n.getMinutes()-o-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function d(n,i,o,a){return!(i==t&&e.xmlElementsFilter.length>0)||l(e.xmlElementsFilter,n,o,a)}function f(i,c){if(i.nodeType==r){for(var m=new Object,h=i.childNodes,g=0;g0){var o=i.split(".#")[0];return l(e.datetimeAccessFormPaths,t,n,o)?u(t):t}return t}(m.__text,y,c+"."+y)),null!=m["#cdata-section"]&&(m.__cdata=m["#cdata-section"],delete m["#cdata-section"],"property"==e.arrayAccessForm&&delete m["#cdata-section_asArray"]),0==m.__cnt&&"text"==e.emptyNodeForm?m="":1==m.__cnt&&null!=m.__text?m=m.__text:1!=m.__cnt||null==m.__cdata||e.keepCData?m.__cnt>1&&null!=m.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==m.__text||""==m.__text.trim())&&delete m.__text:m=m.__cdata,delete m.__cnt,!e.enableToStringFunc||null==m.__text&&null==m.__cdata||(m.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),m}if(i.nodeType==n||i.nodeType==o)return i.nodeValue}function m(t,n,i,o){var a="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=i)for(var r=0;r":">"}function h(e,t){return""}function g(t,n){return"property"==e.arrayAccessForm&&(i=n.toString(),o="_asArray",-1!==i.indexOf(o,i.length-o.length))||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function;var i,o}function v(e){var t=0;if(e instanceof Object)for(var n in e)g(e,n)||t++;return t}function y(t,n,i){return 0==e.jsonPropertiesFilter.length||""==i||l(e.jsonPropertiesFilter,t,n,i)}function x(t){var n=[];if(t instanceof Object)for(var i in t)-1==i.toString().indexOf("__")&&0==i.toString().indexOf(e.attributePrefix)&&n.push(i);return n}function b(t){var n="";return t instanceof Object?n+=function(t){var n="";return null!=t.__cdata&&(n+=""),null!=t.__text&&(e.escapeMode?n+=c(t.__text):n+=t.__text),n}(t):null!=t&&(e.escapeMode?n+=c(t):n+=t),n}function k(e,t){return""===e?t:e+"."+t}function C(e,t,n,i){var o="";if(0==e.length)o+=m(e,t,n,!0);else for(var a=0;a0)for(var i in e)if(!g(e,i)&&(""==t||y(e,i,k(t,i)))){var o=e[i],a=x(o);if(null==o||null==o)n+=m(o,i,a,!0);else if(o instanceof Object)if(o instanceof Array)n+=C(o,i,a,t);else if(o instanceof Date)n+=m(o,i,a,!1),n+=o.toISOString(),n+=h(o,i);else{v(o)>0||null!=o.__text||null!=o.__cdata?(n+=m(o,i,a,!1),n+=S(o,k(t,i)),n+=h(o,i)):n+=m(o,i,a,!0)}else n+=m(o,i,a,!1),n+=b(o),n+=h(o,i)}return n+=b(e)}this.parseXmlString=function(e){var t;if(void 0===e)return null;if(i){var n=new i,o=null;try{o=n.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){o=null}try{t=n.parseFromString(e,"text/xml"),null!=o&&t.getElementsByTagNameNS(o,"parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?u(e):e},this.xml2json=function(e){return f(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return S(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}};e.exports=function(e){if(!e)return null;var t=(new i).parseFromString(e,"text/xml"),n=(new o).xml2json(t);return n.html&&n.getElementsByTagName("parsererror").length?null:n}},function(e,t,n){var i=n(4);t.DOMImplementation=i.DOMImplementation,t.XMLSerializer=i.XMLSerializer,t.DOMParser=n(18).DOMParser},function(e,t,n){var i=n(1),o=n(4),a=n(19),r=n(20),s=o.DOMImplementation,c=i.NAMESPACE,l=r.ParseError,p=r.XMLReader;function u(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function d(e){this.options=e||{locator:{}}}function f(){this.cdata=!1}function m(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function h(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function g(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}d.prototype.parseFromString=function(e,t){var n=this.options,i=new p,o=n.domBuilder||new f,r=n.errorHandler,s=n.locator,l=n.xmlns||{},d=/\/x?html?$/.test(t),m=d?a.HTML_ENTITIES:a.XML_ENTITIES;s&&o.setDocumentLocator(s),i.errorHandler=function(e,t,n){if(!e){if(t instanceof f)return t;e=t}var i={},o=e instanceof Function;function a(t){var a=e[t];!a&&o&&(a=2==e.length?function(n){e(t,n)}:e),i[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+function(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),i}(r,o,s),i.domBuilder=n.domBuilder||o,d&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var h=n.normalizeLineEndings||u;return e&&"string"==typeof e?i.parse(h(e),l,m):i.errorHandler.error("invalid doc source"),o.doc},f.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var o=this.doc,a=o.createElementNS(e,n||t),r=i.length;g(this,a),this.currentElement=a,this.locator&&m(this.locator,a);for(var s=0;s",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),t.entityMap=t.HTML_ENTITIES},function(e,t,n){var i=n(1).NAMESPACE,o=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,a=new RegExp("[\\-\\.0-9"+o.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),r=new RegExp("^"+o.source+a.source+"*(?::"+o.source+a.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function c(){}function l(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function p(e,t,n,o,a,r){function s(e,t,i){n.attributeNames.hasOwnProperty(e)&&r.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),i)}for(var c,l=++t,p=0;;){var u=e.charAt(l);switch(u){case"=":if(1===p)c=e.slice(t,l),p=3;else{if(2!==p)throw new Error("attribute equal must after attrName");p=3}break;case"'":case'"':if(3===p||1===p){if(1===p&&(r.warning('attribute value must after "="'),c=e.slice(t,l)),t=l+1,!((l=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");s(c,d=e.slice(t,l),t-1),p=5}else{if(4!=p)throw new Error('attribute value must after "="');s(c,d=e.slice(t,l),t),r.warning('attribute "'+c+'" missed start quot('+u+")!!"),t=l+1,p=5}break;case"/":switch(p){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:p=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return r.error("unexpected end of input"),0==p&&n.setTagName(e.slice(t,l)),l;case">":switch(p){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,l)).slice(-1)&&(n.closed=!0,d=d.slice(0,-1));case 2:2===p&&(d=c),4==p?(r.warning('attribute "'+d+'" missed quot(")!'),s(c,d,t)):(i.isHTML(o[""])&&d.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),s(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return l;case"€":u=" ";default:if(u<=" ")switch(p){case 0:n.setTagName(e.slice(t,l)),p=6;break;case 1:c=e.slice(t,l),p=2;break;case 4:var d=e.slice(t,l);r.warning('attribute "'+d+'" missed quot(")!!'),s(c,d,t);case 5:p=6}else switch(p){case 2:n.tagName;i.isHTML(o[""])&&c.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),s(c,c,t),t=l,p=1;break;case 5:r.warning('attribute space is required"'+c+'"!!');case 6:p=1,t=l;break;case 3:p=4,t=l;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function u(e,t,n){for(var o=e.tagName,a=null,r=e.length;r--;){var s=e[r],c=s.qName,l=s.value;if((f=c.indexOf(":"))>0)var p=s.prefix=c.slice(0,f),u=c.slice(f+1),d="xmlns"===p&&u;else u=c,p=null,d="xmlns"===c&&"";s.localName=u,!1!==d&&(null==a&&(a={},m(n,n={})),n[d]=a[d]=l,s.uri=i.XMLNS,t.startPrefixMapping(d,l))}for(r=e.length;r--;){(p=(s=e[r]).prefix)&&("xml"===p&&(s.uri=i.XML),"xmlns"!==p&&(s.uri=n[p||""]))}var f;(f=o.indexOf(":"))>0?(p=e.prefix=o.slice(0,f),u=e.localName=o.slice(f+1)):(p=null,u=e.localName=o);var h=e.uri=n[p||""];if(t.startElement(h,u,o,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(h,u,o),a)for(p in a)t.endPrefixMapping(p)}function d(e,t,n,i,o){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),r=e.substring(t+1,a);if(/[&<]/.test(r))return/^script$/i.test(n)?(o.characters(r,0,r.length),a):(r=r.replace(/&#?\w+;/g,i),o.characters(r,0,r.length),a)}return t+1}function f(e,t,n,i){var o=i[n];return null==o&&((o=e.lastIndexOf(""))t?(n.comment(e,t+4,o-t-4),o+3):(i.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,o-t-9),n.endCDATA(),o+3}var a=function(e,t){var n,i=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;n=o.exec(e);)if(i.push(n),n[1])return i}(e,t),r=a.length;if(r>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],c=!1,l=!1;r>3&&(/^public$/i.test(a[2][0])?(c=a[3][0],l=r>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var p=a[r-1];return n.startDTD(s,c,l),n.endDTD(),p.index+p[0].length}return-1}function g(e,t,n){var i=e.indexOf("?>",t);if(i){var o=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(o){o[0].length;return n.processingInstruction(o[1],o[2]),i+2}return-1}return-1}function v(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,c.prototype={parse:function(e,t,n){var o=this.domBuilder;o.startDocument(),m(t,t={}),function(e,t,n,o,a){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function c(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?r(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function m(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,c);C&&y(w),o.characters(n,0,t-w),w=t}}function y(t,n){for(;t>=b&&(n=k.exec(e));)x=n.index,b=x+n[0].length,C.lineNumber++;C.columnNumber=t-x+1}var x=0,b=0,k=/.*(?:\r\n?|\n)|.*$/g,C=o.locator,S=[{currentNSMap:t}],_={},w=0;for(;;){try{var E=e.indexOf("<",w);if(E<0){if(!e.substr(w).match(/^\s*$/)){var T=o.doc,A=T.createTextNode(e.substr(w));T.appendChild(A),o.currentElement=A}return}switch(E>w&&m(E),e.charAt(E+1)){case"/":var R=e.indexOf(">",E+3),O=e.substring(E+2,R).replace(/[ \t\n\r]+$/g,""),I=S.pop();R<0?(O=e.substring(E+2).replace(/[\s<].*/,""),a.error("end tag name: "+O+" is not complete:"+I.tagName),R=E+1+O.length):O.match(/\sw?w=R:m(Math.max(E,w)+1)}}(e,t,n,o,this.errorHandler),o.endDocument()}},v.prototype={setTagName:function(e){if(!r.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!r.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=c,t.ParseError=s},function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",o=new RegExp("^([^"+i+"])|^((x|X)(m|M)(l|L))|([^"+i+"-.0-9·̀-ͯ‿⁀])","g"),a=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,r=function(e){var t=[];if(e instanceof Object)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},s=function(e,t){var i=function(e,n,i,a,r){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(a).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(o,"_"));var l=[c,"<",e,i||""];return n&&n.length>0?(l.push(">"),l.push(n),r&&l.push(c),l.push("")):l.push("/>"),l.join("")};return function e(o,s,c){var l=n(o);switch((Array.isArray?Array.isArray(o):o instanceof Array)?l="array":o instanceof Date&&(l="date"),l){case"array":var p=[];return o.map((function(t){p.push(e(t,1,c+1))})),t.prettyPrint&&p.push("\n"),p.join("");case"date":return o.toJSON?o.toJSON():o+"";case"object":var u=[];for(var d in o)if(o.hasOwnProperty(d))if(o[d]instanceof Array)for(var f in o[d])o[d].hasOwnProperty(f)&&u.push(i(d,e(o[d][f],0,c+1),null,c+1,r(o[d][f]).length));else u.push(i(d,e(o[d],0,c+1),null,c+1));return t.prettyPrint&&u.length>0&&u.push("\n"),u.join("");case"function":return o();default:return t.escape?(""+o).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(a,""):""+o}}(e,0,0)},c=function(e){var t=['"),t.join("")};e.exports=function(e,t){if(t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" "}),"string"==typeof e)try{e=JSON.parse(e.toString())}catch(e){return!1}var i="",o="";return t&&("object"==n(t)?(t.xmlHeader&&(i=c(!!t.xmlHeader.standalone)),void 0!==t.docType&&(o="")):i=c()),[i,(t=t||{}).prettyPrint&&o?"\n":"",o,s(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t,n){(function(e){var n,i,o,a;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e) +/*! For license information please see beacon_mp.min.js.LICENSE.txt */}window,a=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BEACON_ATTA_REQUEST_URL=t.BEACON_ATTA_TOKEN=t.BEACON_ATTA_ID=t.BEACON_CONFIG_HTTPS_URL=t.BEACON_CONFIG_REQUEST_TIME=t.BEACON_CONFIG=t.BEACON_SENDING_IDS_KEY=t.BEACON_NORMAL_LOG_ID_KEY=t.BEACON_DRIECT_LOG_ID_KEY=t.BEACON_LASE_REPORT_TIME_KEY=t.BEACON_DEVICE_ID_KEY=t.BEACON_STORE_PREFIX=t.BEACON_LOG_ID_KEY=t.BEACON_IS_REALTIME_KEY=t.BEACON_DELAY_DEFAULT=t.BEACON_HTTPS_URL=t.BEACON_HTTP_URL=void 0,t.BEACON_HTTP_URL="http://oth.eve.mdt.qq.com:8080/analytics/v2_upload",t.BEACON_HTTPS_URL="https://otheve.beacon.qq.com/analytics/v2_upload",t.BEACON_DELAY_DEFAULT=3e3,t.BEACON_IS_REALTIME_KEY="A99",t.BEACON_LOG_ID_KEY="A100",t.BEACON_STORE_PREFIX="__BEACON_",t.BEACON_DEVICE_ID_KEY="__BEACON_deviceId",t.BEACON_LASE_REPORT_TIME_KEY="last_report_time",t.BEACON_DRIECT_LOG_ID_KEY="direct_log_id",t.BEACON_NORMAL_LOG_ID_KEY="normal_log_id",t.BEACON_SENDING_IDS_KEY="sending_event_ids",t.BEACON_CONFIG="beacon_config",t.BEACON_CONFIG_REQUEST_TIME="beacon_config_request_time",t.BEACON_CONFIG_HTTPS_URL="https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",t.BEACON_ATTA_ID="00400014144",t.BEACON_ATTA_TOKEN="6478159937",t.BEACON_ATTA_REQUEST_URL="https://h.trace.qq.com/kv"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventId=t.replaceSymbol=t.replace=t.assert=void 0;var i=n(0),o=n(9);function a(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(e){return""}}Object.defineProperty(t,"EventEmiter",{enumerable:!0,get:function(){return o.EventEmiter}}),t.assert=function(e,t){if(!e)throw t instanceof Error?t:new Error(t)},t.replace=function(e,t){for(var n={},i=0,o=Object.keys(e);i60*this.strategy.requestInterval*1e3},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e)},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]e.options.UploadQueueSize;){var n="waiting"===r[t].state||"checking"===r[t].state||"uploading"===r[t].state;r[t]&&n?t++:(s[r[t].id]&&delete s[r[t].id],r.splice(t,1),l--)}u()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;r[l]&&"waiting"!==r[l].state;)l++;if(!(l>=r.length)){var n=r[l];l++,c++,n.state="checking",n.params.onTaskStart&&n.params.onTaskStart(p(n)),!n.params.UploadData&&(n.params.UploadData={});var i=o.formatParams(n.api,n.params);a[n.api].call(e,i,(function(i,o){e._isRunningTask(n.id)&&("checking"!==n.state&&"uploading"!==n.state||(n.state=i?"error":"success",i&&(n.error=i),c--,u(),t(),n.callback&&n.callback(i,o),"success"===n.state&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)),d())})),u(),setTimeout(t)}}},m=function(t,n){var o=s[t];if(o){var a=o&&"waiting"===o.state,r=o&&("checking"===o.state||"uploading"===o.state);if("canceled"===n&&"canceled"!==o.state||"paused"===n&&a||"paused"===n&&r){if("paused"===n&&o.params.Body&&"function"==typeof o.params.Body.pipe)return;o.state=n,e.emit("inner-kill-task",{TaskId:t,toState:n});try{var l=o&&o.params&&o.params.UploadData.UploadId}catch(e){}"canceled"===n&&l&&i.removeUsing(l),u(),r&&(c--,f()),"canceled"===n&&(o.params&&(delete o.params.UploadData,delete o.params.Body,delete o.params),delete o.callback)}d()}};e._addTasks=function(t){o.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),u()},e._addTask=function(t,n,i,a){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||o.canFileSlice()||(t=c),n=o.formatParams(t,n);var l=o.uuid();n.TaskId=l,n.onTaskReady&&n.onTaskReady(l);var p={params:n,callback:i,api:t,index:r.length,id:l,Bucket:n.Bucket,Region:n.Region,Key:n.Key,FilePath:n.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null},m=n.onHashProgress;n.onHashProgress=function(t){e._isRunningTask(p.id)&&(p.hashPercent=t.percent,m&&m(t),u())};var h=n.onProgress;return n.onProgress=function(t){e._isRunningTask(p.id)&&("checking"===p.state&&(p.state="uploading"),p.loaded=t.loaded,p.size=t.total,p.speed=t.speed,p.percent=t.percent,h&&h(t),u())},o.getFileSize(t,n,(function(e,t){e?i(e):(s[l]=p,r.push(p),p.size=t,!a&&u(),f(),d())})),l},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return o.map(r,p)},e.cancelTask=function(e){m(e,"canceled")},e.pauseTask=function(e){m(e,"paused")},e.restartTask=function(e){var t=s[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",u(),l=Math.min(l,t.index),f())},e.isUploadRunning=function(){return c||l-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(a="{Bucket}."+a)),a=(a=a.replace(/\{\{AppId\}\}/gi,i).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,r).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,i).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,r).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(a)||(a="https://"+a),"/"===a.slice(-1)&&(a=a.slice(0,-1));var c=a;return e.ForcePathStyle&&(c+="/"+t),c+="/",s&&(c+=o.camSafeUrlEncode(s).replace(/%2F/g,"/")),e.isLocation&&(c=c.replace(/^https?:\/\//,"")),c}var l=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate,n=(e.Url||c({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region})).replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$").test(n)?n:""};function p(e,t){var n=o.clone(e.Headers),i="";o.each(n,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete n[t],"host"===t.toLowerCase()&&(i=e)}));var a=!1!==e.ForceSignHost;!i&&e.SignHost&&a&&(n.Host=e.SignHost);var r=!1,s=function(e,n){r||(r=!0,n&&n.XCosSecurityToken&&!n.SecurityToken&&((n=o.clone(n)).SecurityToken=n.XCosSecurityToken,delete n.XCosSecurityToken),t&&t(e,n))},c=this,l=e.Bucket||"",p=e.Region||"",u="name/cos:PostObject"!==e.Action&&e.Key?e.Key:"";c.options.ForcePathStyle&&l&&(u=l+"/"+u);var d="/"+u,f={},m=e.Scope;if(!m){var h=e.Action||"",g=e.ResourceKey||e.Key||"";m=e.Scope||[{action:h,bucket:l,region:p,prefix:g}]}var v=o.md5(JSON.stringify(m));c._StsCache=c._StsCache||[],function(){var e,t;for(e=c._StsCache.length-1;e>=0;e--){t=c._StsCache[e];var n=Math.round(o.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&n=t.ExpiredTime)c._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===v){f=t;break}}}();var y,x=function(){var t="";f.StartTime&&e.Expires?t=f.StartTime+";"+(f.StartTime+1*e.Expires):f.StartTime&&f.ExpiredTime&&(t=f.StartTime+";"+f.ExpiredTime);var i={Authorization:o.getAuth({SecretId:f.TmpSecretId,SecretKey:f.TmpSecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:a}),SecurityToken:f.SecurityToken||f.XCosSecurityToken||"",Token:f.Token||"",ClientIP:f.ClientIP||"",ClientUA:f.ClientUA||""};s(null,i)},b=function(e){if(e.Authorization){var t=!1,n=e.Authorization;if(n)if(n.indexOf(" ")>-1)t=!1;else if(n.indexOf("q-sign-algorithm=")>-1&&n.indexOf("q-ak=")>-1&&n.indexOf("q-sign-time=")>-1&&n.indexOf("q-key-time=")>-1&&n.indexOf("q-url-param-list=")>-1)t=!0;else try{(n=atob(n)).indexOf("a=")>-1&&n.indexOf("k=")>-1&&n.indexOf("t=")>-1&&n.indexOf("r=")>-1&&n.indexOf("b=")>-1&&(t=!0)}catch(e){}if(!t)return o.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return o.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return o.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return o.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return o.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return o.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return o.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(f.ExpiredTime&&f.ExpiredTime-o.getSkewTime(c.options.SystemClockOffset)/1e3>60)x();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:l,Region:p,Method:e.Method,Key:u,Pathname:d,Query:e.Query,Headers:n,Scope:m,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:a},(function(e){"string"==typeof e&&(e={Authorization:e});var t=b(e);if(t)return s(t);e.Authorization?s(null,e):((f=e||{}).Scope=m,f.ScopeKey=v,c._StsCache.push(f),x())}));else{if(!c.options.getSTS)return y={Authorization:o.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:a}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken},s(null,y),y;c.options.getSTS.call(c,{Bucket:l,Region:p},(function(e){(f=e||{}).Scope=m,f.ScopeKey=v,f.TmpSecretId||(f.TmpSecretId=f.SecretId),f.TmpSecretKey||(f.TmpSecretKey=f.SecretKey);var t=b(f);if(t)return s(t);c._StsCache.push(f),x()}))}return""}function u(e){var t=!1,n=!1,i=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var a=e.error.Code,r=e.error.Message;("RequestTimeTooSkewed"===a||"AccessDenied"===a&&"Request has expired"===r)&&(n=!0)}catch(e){}if(e)if(n&&i){var s=Date.parse(i);this.options.CorrectClockSkew&&Math.abs(o.getSkewTime(this.options.SystemClockOffset)-s)>=3e4&&(this.options.SystemClockOffset=s-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);return t}function d(e,t){var n=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=o.clearKey(e.qs),e.headers&&(e.headers=o.clearKey(e.headers)),e.qs&&(e.qs=o.clearKey(e.qs));var i=o.clone(e.qs);e.action&&(i[e.action]="");var a=e.url||e.Url,r=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:a}),s=e.tracker;!function o(a){var c=n.options.SystemClockOffset;s&&s.setParams({signStartTime:(new Date).getTime(),retryTimes:a-1}),p.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:i,Headers:e.headers,SignHost:r,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(i,r){i?t(i):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=r,f.call(n,e,(function(i,r){s&&s.setParams({httpEndTime:(new Date).getTime()}),i&&a<2&&(c!==n.options.SystemClockOffset||u.call(n,i))?(e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]),o(a+1)):t(i,r)})))}))}(1)}function f(e,t){var n=this,a=e.TaskId;if(!a||n._isRunningTask(a)){var r=e.Bucket,s=e.Region,l=e.Key,p=e.method||"GET",u=e.url||e.Url,d=e.body,f=e.json,m=e.rawBody,h=n.options.HttpDNSServiceId;n.options.UseAccelerate&&(s="accelerate"),u=u||c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:r,region:s,object:l}),e.action&&(u=u+"?"+e.action),e.qsStr&&(u=u.indexOf("?")>-1?u+"&"+e.qsStr:u+"?"+e.qsStr);var g={method:p,url:u,headers:e.headers,qs:e.qs,filePath:e.filePath,body:d,json:f,httpDNSServiceId:h},v="x-cos-security-token";o.isCIHost(u)&&(v="x-ci-security-token"),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.SecurityToken&&(g.headers[v]=e.AuthData.SecurityToken),g.headers&&(g.headers=o.clearKey(g.headers)),g=o.clearKey(g),e.onProgress&&"function"==typeof e.onProgress&&(g.onProgress=function(t){if(!a||n._isRunningTask(a)){var i=t?t.loaded:0;e.onProgress({loaded:i,total:t.total})}}),this.options.Timeout&&(g.timeout=this.options.Timeout),n.options.ForcePathStyle&&(g.pathStyle=n.options.ForcePathStyle),n.emit("before-send",g);var y=g.url.includes("accelerate."),x=g.qs?Object.keys(g.qs).map((function(e){return"".concat(e,"=").concat(g.qs[e])})).join("&"):"",b=x?g.url+"?"+x:g.url;e.tracker&&e.tracker.setParams({reqUrl:b,accelerate:y?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:b,accelerate:y?"Y":"N"});var k=i(g,(function(e,i,r){if("abort"!==e){var s,c=function(e,r){if(a&&n.off("inner-kill-task",C),!s){s=!0;var c={};i&&i.statusCode&&(c.statusCode=i.statusCode),i&&i.headers&&(c.headers=i.headers),e?(e=o.extend(e||{},c),t(e,null)):(r=o.extend(r||{},c),t(null,r)),k=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=r;else try{l=r&&r.indexOf("<")>-1&&r.indexOf(">")>-1&&o.xml2json(r)||{}}catch(e){l=r||{}}var p=i.statusCode;2===Math.floor(p/100)?l.Error?c({error:l.Error}):c(null,l):c({error:l.Error||l})}}})),C=function e(t){t.TaskId===a&&(k&&k.abort&&k.abort(),n.off("inner-kill-task",e))};a&&n.on("inner-kill-task",C)}}var m={getService:function(e,t){"function"==typeof e&&(t=e,e={});var n=this.options.ServiceDomain,i=e.Region;n?(n=n.replace(/\{\{Region\}\}/gi,i||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(n)||(n="https://"+n),"/"===n.slice(-1)&&(n=n.slice(0,-1))):n=i?"https://cos."+i+".myqcloud.com":"https://service.cos.myqcloud.com";n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),d.call(this,{Action:"name/cos:GetService",url:n,method:"GET",headers:e.Headers},(function(e,n){if(e)return t(e);var i=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Buckets&&n.ListAllMyBucketsResult.Buckets.Bucket||[];i=o.isArray(i)?i:[i];var a=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:i,Owner:a,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,i="";if(e.BucketAZConfig){var a={BucketAZConfig:e.BucketAZConfig};i=o.json2xml({CreateBucketConfiguration:a})}d.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:i},(function(i,o){if(i)return t(i);var a=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:a,statusCode:o.statusCode,headers:o.headers})}))},headBucket:function(e,t){d.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD"},(function(e,n){t(e,n)}))},getBucket:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n.marker=e.Marker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,d.call(this,{Action:"name/cos:GetBucket",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n},(function(e,n){if(e)return t(e);var i=n.ListBucketResult||{},a=i.Contents||[],r=i.CommonPrefixes||[];a=o.isArray(a)?a:[a],r=o.isArray(r)?r:[r];var s=o.clone(i);o.extend(s,{Contents:a,CommonPrefixes:r,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},deleteBucket:function(e,t){d.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=o.clone(e.AccessControlPolicy||{}),r=a.Grants||a.Grant;r=o.isArray(r)?r:[r],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),d.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:n,action:"acl",body:i},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketAcl:function(e,t){d.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl"},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},s=i.AccessControlList.Grant||[];s=o.isArray(s)?s:[s];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putBucketCors:function(e,t){var n=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];n=o.clone(o.isArray(n)?n:[n]),o.each(n,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[n],e[t]=o.isArray(i)?i:[i]}))}));var i={CORSRule:n};e.ResponseVary&&(i.ResponseVary=e.ResponseVary);var a=o.json2xml({CORSConfiguration:i}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"cors",headers:r},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketCors:function(e,t){d.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var i={CORSRules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.CORSConfiguration||{},r=a.CORSRules||a.CORSRule||[];r=o.clone(o.isArray(r)?r:[r]);var s=a.ResponseVary;o.each(r,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[t],e[n]=o.isArray(i)?i:[i]}))})),t(null,{CORSRules:r,ResponseVary:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketCors:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},getBucketLocation:function(e,t){d.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location"},(function(e,n){if(e)return t(e);t(null,n)}))},getBucketPolicy:function(e,t){d.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0},(function(e,n){if(e)return e.statusCode&&403===e.statusCode?t({ErrorStatus:"Access Denied"}):e.statusCode&&405===e.statusCode?t({ErrorStatus:"Method Not Allowed"}):e.statusCode&&404===e.statusCode?t({ErrorStatus:"Policy Not Found"}):t(e);var i={};try{i=JSON.parse(n.body)}catch(e){}t(null,{Policy:i,statusCode:n.statusCode,headers:n.headers})}))},putBucketPolicy:function(e,t){var n=e.Policy,i=n;try{"string"==typeof n?n=JSON.parse(i):i=JSON.stringify(n)}catch(e){t({error:"Policy format error"})}var a=e.Headers;a["Content-Type"]="application/json",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:i,headers:a,json:!0},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},deleteBucketPolicy:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},putBucketTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var a=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"tagging",headers:r},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketTagging:function(e,t){d.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketTagging:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLifecycle:function(e,t){var n=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];n=o.clone(n);var i=o.json2xml({LifecycleConfiguration:{Rule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"lifecycle",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLifecycle:function(e,t){d.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var i={Rules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=[];try{a=n.LifecycleConfiguration.Rule||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Rules:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketLifecycle:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var n=e.VersioningConfiguration||{},i=o.json2xml({VersioningConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"versioning",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param VersioningConfiguration"})},getBucketVersioning:function(e,t){d.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning"},(function(e,n){e||!n.VersioningConfiguration&&(n.VersioningConfiguration={}),t(e,n)}))},putBucketReplication:function(e,t){var n=o.clone(e.ReplicationConfiguration),i=o.json2xml({ReplicationConfiguration:n});i=(i=i.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"replication",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketReplication:function(e,t){d.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var i={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else e||!n.ReplicationConfiguration&&(n.ReplicationConfiguration={}),n.ReplicationConfiguration.Rule&&(n.ReplicationConfiguration.Rules=n.ReplicationConfiguration.Rule,delete n.ReplicationConfiguration.Rule),t(e,n)}))},deleteBucketReplication:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var n=o.clone(e.WebsiteConfiguration||{}),i=n.RoutingRules||n.RoutingRule||[];i=o.isArray(i)?i:[i],delete n.RoutingRule,delete n.RoutingRules,i.length&&(n.RoutingRules={RoutingRule:i});var a=o.json2xml({WebsiteConfiguration:n}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"website",headers:r},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param WebsiteConfiguration"})},getBucketWebsite:function(e,t){d.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.WebsiteConfiguration||{};if(a.RoutingRules){var r=o.clone(a.RoutingRules.RoutingRule||[]);r=o.makeArray(r),a.RoutingRules=r}t(null,{WebsiteConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketWebsite:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var n=o.clone(e.RefererConfiguration||{}),i=n.DomainList||{},a=i.Domains||i.Domain||[];(a=o.isArray(a)?a:[a]).length&&(n.DomainList={Domain:a});var r=o.json2xml({RefererConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(r)),d.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"referer",headers:s},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param RefererConfiguration"})},getBucketReferer:function(e,t){d.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.RefererConfiguration||{};if(a.DomainList){var r=o.makeArray(a.DomainList.Domain||[]);a.DomainList={Domains:r}}t(null,{RefererConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},putBucketDomain:function(e,t){var n=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];n=o.clone(n);var i=o.json2xml({DomainConfiguration:{DomainRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"domain",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketDomain:function(e,t){d.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,n){if(e)return t(e);var i=[];try{i=n.DomainConfiguration.DomainRule||[]}catch(e){}i=o.clone(o.isArray(i)?i:[i]),t(null,{DomainRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketDomain:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketOrigin:function(e,t){var n=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];n=o.clone(n);var i=o.json2xml({OriginConfiguration:{OriginRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"origin",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketOrigin:function(e,t){d.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,n){if(e)return t(e);var i=[];try{i=n.OriginConfiguration.OriginRule||[]}catch(e){}i=o.clone(o.isArray(i)?i:[i]),t(null,{OriginRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketOrigin:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLogging:function(e,t){var n=o.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=o.binaryBase64(o.md5(n)),d.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"logging",headers:i},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLogging:function(e,t){d.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},(function(e,n){if(e)return t(e);delete n.BucketLoggingStatus._xmlns,t(null,{BucketLoggingStatus:n.BucketLoggingStatus,statusCode:n.statusCode,headers:n.headers})}))},putBucketInventory:function(e,t){var n=o.clone(e.InventoryConfiguration);if(n.OptionalFields){var i=n.OptionalFields||[];n.OptionalFields={Field:i}}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var a=n.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSECOS")>-1&&(a["SSE-COS"]=a.SSECOS,delete a.SSECOS)}var r=o.json2xml({InventoryConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(r)),d.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"inventory",qs:{id:e.Id},headers:s},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketInventory:function(e,t){d.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},(function(e,n){if(e)return t(e);var i=n.InventoryConfiguration;if(i&&i.OptionalFields&&i.OptionalFields.Field){var a=i.OptionalFields.Field;o.isArray(a)||(a=[a]),i.OptionalFields=a}if(i.Destination&&i.Destination.COSBucketDestination&&i.Destination.COSBucketDestination.Encryption){var r=i.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}t(null,{InventoryConfiguration:i,statusCode:n.statusCode,headers:n.headers})}))},listBucketInventory:function(e,t){d.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken}},(function(e,n){if(e)return t(e);var i=n.ListInventoryConfigurationResult,a=i.InventoryConfiguration||[];a=o.isArray(a)?a:[a],delete i.InventoryConfiguration,o.each(a,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;o.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var n=e.Destination.COSBucketDestination.Encryption;Object.keys(n).indexOf("SSE-COS")>-1&&(n.SSECOS=n["SSE-COS"],delete n["SSE-COS"])}})),i.InventoryConfigurations=a,o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))},deleteBucketInventory:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var n={AccelerateConfiguration:e.AccelerateConfiguration||{}},i=o.json2xml(n),a={"Content-Type":"application/xml"};a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"accelerate",headers:a},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param AccelerateConfiguration"})},getBucketAccelerate:function(e,t){d.call(this,{Interface:"getBucketAccelerate",Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},(function(e,n){e||!n.AccelerateConfiguration&&(n.AccelerateConfiguration={}),t(e,n)}))},getObject:function(e,t){var n=e.Query||{},i=e.QueryString||"",a=e.tracker;a&&a.setParams({signStartTime:(new Date).getTime()}),n["response-content-type"]=e.ResponseContentType,n["response-content-language"]=e.ResponseContentLanguage,n["response-expires"]=e.ResponseExpires,n["response-cache-control"]=e.ResponseCacheControl,n["response-content-disposition"]=e.ResponseContentDisposition,n["response-content-encoding"]=e.ResponseContentEncoding,d.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,qs:n,qsStr:i,rawBody:!0,tracker:a},(function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(n)}t(null,{Body:i.body,ETag:o.attr(i.headers,"etag",""),statusCode:i.statusCode,headers:i.headers})}))},headObject:function(e,t){d.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},(function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0,statusCode:a}):t(n)}i.ETag=o.attr(i.headers,"etag",""),t(null,i)}))},listObjectVersions:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n["key-marker"]=e.KeyMarker,n["version-id-marker"]=e.VersionIdMarker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,d.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,action:"versions"},(function(e,n){if(e)return t(e);var i=n.ListVersionsResult||{},a=i.DeleteMarker||[];a=o.isArray(a)?a:[a];var r=i.Version||[];r=o.isArray(r)?r:[r];var s=o.clone(i);delete s.DeleteMarker,delete s.Version,o.extend(s,{DeleteMarkers:a,Versions:r,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},putObject:function(e,t){var n=this,i=e.ContentLength,r=o.throttleOnProgress.call(n,i,e.onProgress),s=e.Headers;s["Cache-Control"]||s["cache-control"]||(s["Cache-Control"]=""),s["Content-Type"]||s["content-type"]||(s["Content-Type"]=a.getType(e.Key)||"application/octet-stream");var l=e.UploadAddMetaMd5||n.options.UploadAddMetaMd5||n.options.UploadCheckContentMd5,p=e.tracker;l&&p&&p.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(l,e.Body,(function(a){a&&(p&&p.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(s["Content-MD5"]=o.binaryBase64(a)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=a)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),r(null,!0),d.call(n,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:r,tracker:p},(function(a,s){if(a)return r(null,!0),t(a);r({loaded:i,total:i},!0);var l=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:n.options.UseAccelerate?"accelerate":e.Region,object:e.Key});l=l.substr(l.indexOf("://")+3),s.Location=l,s.ETag=o.attr(s.headers,"etag",""),t(null,s)}))}))},postObject:function(e,t){var n=this,i={},a=e.FilePath;if(a){for(var r in i["Cache-Control"]=e.CacheControl,i["Content-Disposition"]=e.ContentDisposition,i["Content-Encoding"]=e.ContentEncoding,i["Content-MD5"]=e.ContentMD5,i["Content-Length"]=e.ContentLength,i["Content-Type"]=e.ContentType,i.Expect=e.Expect,i.Expires=e.Expires,i["x-cos-acl"]=e.ACL,i["x-cos-grant-read"]=e.GrantRead,i["x-cos-grant-write"]=e.GrantWrite,i["x-cos-grant-full-control"]=e.GrantFullControl,i["x-cos-storage-class"]=e.StorageClass,i["x-cos-mime-limit"]=e.MimeLimit,i["x-cos-traffic-limit"]=e.TrafficLimit,i["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,i["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,i["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,i["x-cos-server-side-encryption"]=e.ServerSideEncryption,i["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,i["x-cos-server-side-encryption-context"]=e.SSEContext,delete i["Content-Length"],delete i["content-length"],e)r.indexOf("x-cos-meta-")>-1&&(i[r]=e[r]);var s=o.throttleOnProgress.call(n,i["Content-Length"],e.onProgress);d.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:i,qs:e.Query,filePath:a,TaskId:e.TaskId,onProgress:s},(function(i,o){if(s(null,!0),i)return t(i);if(o&&o.headers){var r=o.headers,l=r.etag||r.Etag||r.ETag||"",p=a.substr(a.lastIndexOf("/")+1),u=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key.replace(/\$\{filename\}/g,p),isLocation:!0});return t(null,{Location:u,statusCode:o.statusCode,headers:r,ETag:l})}t(null,o)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){d.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId},(function(e,n){if(e){var i=e.statusCode;return i&&204===i?t(null,{statusCode:i}):i&&404===i?t(null,{BucketNotFound:!0,statusCode:i}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectAcl:function(e,t){d.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"acl"},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},s=i.AccessControlList&&i.AccessControlList.Grant||[];s=o.isArray(s)?s:[s];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=o.clone(e.AccessControlPolicy||{}),r=a.Grants||a.Grant;r=o.isArray(r)?r:[r],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),d.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:n,body:i},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},optionsObject:function(e,t){var n=e.Headers;n.Origin=e.Origin,n["Access-Control-Request-Method"]=e.AccessControlRequestMethod,n["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,d.call(this,{Action:"name/cos:OptionsObject",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 i=n.headers||{};t(null,{AccessControlAllowOrigin:i["access-control-allow-origin"],AccessControlAllowMethods:i["access-control-allow-methods"],AccessControlAllowHeaders:i["access-control-allow-headers"],AccessControlExposeHeaders:i["access-control-expose-headers"],AccessControlMaxAge:i["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})}))},putObjectCopy:function(e,t){var n=e.Headers;!n["Cache-Control"]&&n["cache-control"]&&(n["Cache-Control"]="");var i=(e.CopySource||"").match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(i){var a=i[1],r=i[3],s=decodeURIComponent(i[4]);d.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,region:r,prefix:s},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyObjectResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var n=e.Objects||[],i=e.Quiet;n=o.isArray(n)?n:[n];var a=o.json2xml({Delete:{Object:n,Quiet:i||!1}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a));var s=o.map(n,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));d.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:a,action:"delete",headers:r},(function(e,n){if(e)return t(e);var i=n.DeleteResult||{},a=i.Deleted||[],r=i.Error||[];a=o.isArray(a)?a:[a],r=o.isArray(r)?r:[r];var s=o.clone(i);o.extend(s,{Error:r,Deleted:a,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var i=e.RestoreRequest||{},a=o.json2xml({RestoreRequest:i});n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:a,action:"restore",headers:n},(function(e,n){t(e,n)}))}else t({error:"missing param RestoreRequest"})},putObjectTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var a=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:a,action:"tagging",headers:r,VersionId:e.VersionId},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectTagging:function(e,t){d.call(this,{Interface:"getObjectTagging",Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteObjectTagging:function(e,t){d.call(this,{Interface:"deleteObjectTagging",Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},appendObject:function(e,t){d.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers},(function(e,n){if(e)return t(e);t(null,n)}))},uploadPartCopy:function(e,t){var n=(e.CopySource||"").match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(n){var i=n[1],a=n[3],r=decodeURIComponent(n[4]);d.call(this,{Scope:[{action:"name/cos:GetObject",bucket:i,region:a,prefix:r},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyPartResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var n=e.Headers,i=e.tracker;n["Cache-Control"]||n["cache-control"]||(n["Cache-Control"]=""),n["Content-Type"]||n["content-type"]||(n["Content-Type"]=a.getType(e.Key)||"application/octet-stream"),d.call(this,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:i},(function(e,n){return e?(i&&i.parent&&i.parent.setParams({errorNode:"multipartInit"}),t(e)):(n=o.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,o.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)}))},multipartUpload:function(e,t){var n=this;o.getFileSize("multipartUpload",e,(function(){var i=e.tracker,a=n.options.UploadCheckContentMd5;a&&i&&i.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(a,e.Body,(function(r){r&&(e.Headers["Content-MD5"]=o.binaryBase64(r),a&&i&&i.setParams({md5EndTime:(new Date).getTime()})),i&&i.setParams({partNumber:e.PartNumber}),d.call(n,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null,tracker:i},(function(e,n){if(e)return i&&i.parent&&i.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:o.attr(n.headers,"etag",{}),statusCode:n.statusCode,headers:n.headers})}))}))}))},multipartComplete:function(e,t){for(var n=this,i=e.UploadId,a=e.Parts,r=e.tracker,s=0,l=a.length;s-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],n="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),i=new RegExp(t,"g");return e.replace(i,n)}(n.Authorization):"sign="+encodeURIComponent(n.Authorization)),n.SecurityToken&&(i+="&x-cos-security-token="+n.SecurityToken),n.ClientIP&&(i+="&clientIP="+n.ClientIP),n.ClientUA&&(i+="&clientUA="+n.ClientUA),n.Token&&(i+="&token="+n.Token),r&&(i+="&"+r),setTimeout((function(){t(null,{Url:i})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),r&&(s+="&"+r)):r&&(s+="?"+r),s},getAuth:function(e){return o.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,SystemClockOffset:this.options.SystemClockOffset})}};e.exports.init=function(e,t){t.transferToTaskMethod(m,"postObject"),t.transferToTaskMethod(m,"putObject"),o.each(m,(function(t,n){e.prototype[n]=o.apiWrapper(n,t)}))}},function(e,t){function n(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}var i=function(e,t){var i,o,a,r=[],s=function(e,t){var i=[];for(var o in e)e.hasOwnProperty(o)&&i.push(t?n(o).toLowerCase():o);return i.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(i=0;i-1||m.indexOf(h)>-1)&&(f[h]=e.headers[h]);a["x-cos-acl"]&&(f.acl=a["x-cos-acl"]),!f["Content-Type"]&&(f["Content-Type"]=""),(n=wx.uploadFile({url:r,method:s,name:"file",header:a,filePath:o,formData:f,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}})).onProgressUpdate((function(e){c&&c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend,progress:e.progress/100})}))}else{var g=e.qs&&i(e.qs)||"";g&&(r+=(r.indexOf("?")>-1?"&":"?")+g),a["Content-Length"]&&delete a["Content-Length"];var v={url:r,method:s,header:a,dataType:"text",data:e.body,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),n=wx.request(v)}return n}},function(e,t,n){"use strict";let i=n(27);e.exports=new i(n(28),n(29))},function(e,t,n){"use strict";function i(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;ev)return n(null,!1);if(i>1&&Math.max(t[0].Size,t[1].Size)!==g)return n(null,!1);!function o(a){if(a=r.length)k.emit("has_and_check_upload_id",t);else{var d=r[p];if(!s.isInArray(t,d))return o.removeUploadId(d),void a(p+1);o.using[d]?a(p+1):u.call(f,{Bucket:i,Region:c,Key:l,UploadId:d,tracker:e.tracker},(function(e,t){f._isRunningTask(n)&&(e?(o.removeUploadId(d),a(p+1)):k.emit("upload_id_available",{UploadId:d,PartList:t.PartList}))}))}}(0)}else k.emit("has_and_check_upload_id",t)})),k.on("get_remote_upload_id_list",(function(){p.call(f,{Bucket:i,Region:c,Key:l,tracker:e.tracker},(function(t,a){if(f._isRunningTask(n)){if(t)return k.emit("error",t);var r=s.filter(a.UploadList,(function(e){return e.Key===l&&(!d||e.StorageClass.toUpperCase()===d.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(r.length)k.emit("seek_local_avail_upload_id",r);else{var c,p=o.getFileId(e.FileStat,e.ChunkSize,i,l);p&&(c=o.getUploadIdList(p))&&s.each(c,(function(e){o.removeUploadId(e)})),k.emit("no_available_upload_id")}}}))})),k.emit("get_remote_upload_id_list")}function p(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartList(o,(function(n,a){if(n)return t(n);i.push.apply(i,a.Upload||[]),"true"===a.IsTruncated?(o.KeyMarker=a.NextKeyMarker,o.UploadIdMarker=a.NextUploadIdMarker,e()):t(null,{UploadList:i})}))}()}function u(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartListPart(o,(function(n,a){if(n)return t(n);i.push.apply(i,a.Part||[]),"true"===a.IsTruncated?(o.PartNumberMarker=a.NextPartNumberMarker,e()):t(null,{PartList:i})}))}()}function d(e,t){var n=this,i=e.TaskId,o=e.Bucket,r=e.Region,c=e.Key,l=e.UploadData,p=e.FileSize,u=e.SliceSize,d=Math.min(e.AsyncLimit||n.options.ChunkParallelLimit||1,256),m=e.FilePath,h=Math.ceil(p/u),g=0,v=e.ServerSideEncryption,y=s.filter(l.PartList,(function(e){return e.Uploaded&&(g+=e.PartNumber>=h&&p%u||u),!e.Uploaded})),x=e.onProgress;a.eachLimit(y,d,(function(t,a){if(n._isRunningTask(i)){var s=t.PartNumber,d=Math.min(p,t.PartNumber*u)-(t.PartNumber-1)*u,h=0;f.call(n,{TaskId:i,Bucket:o,Region:r,Key:c,SliceSize:u,FileSize:p,PartNumber:s,ServerSideEncryption:v,FilePath:m,UploadData:l,onProgress:function(e){g+=e.loaded-h,h=e.loaded,x({loaded:g,total:p})},tracker:e.tracker},(function(e,o){n._isRunningTask(i)&&(e?g-=h:(g+=d-h,t.ETag=o.ETag),x({loaded:g,total:p}),a(e||null,o))}))}}),(function(e){if(n._isRunningTask(i))return e?t(e):void t(null,{UploadId:l.UploadId,SliceList:l.PartList})}))}function f(e,t){var n=this,i=e.TaskId,o=e.Bucket,r=e.Region,c=e.Key,l=e.FileSize,p=e.FilePath,u=1*e.PartNumber,d=e.SliceSize,f=e.ServerSideEncryption,m=e.UploadData,h=n.options.ChunkRetryTimes+1,g=e.Headers||{},v=d*(u-1),y=d,x=v+d;x>l&&(y=(x=l)-v);var b=["x-cos-traffic-limit","x-cos-mime-limit"],k={};s.each(g,(function(e,t){b.indexOf(t)>-1&&(k[t]=e)})),s.fileSlice(p,v,x,(function(l){var p=s.getFileMd5(l),d=p?s.binaryBase64(p):null,g=m.PartList[u-1];a.retry(h,(function(t){n._isRunningTask(i)&&n.multipartUpload({TaskId:i,Bucket:o,Region:r,Key:c,ContentLength:y,PartNumber:u,UploadId:m.UploadId,ServerSideEncryption:f,Body:l,Headers:k,onProgress:e.onProgress,ContentMD5:d,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,o){if(n._isRunningTask(i))return e?t(e):(g.Uploaded=!0,t(null,o))}))}),(function(e,o){if(n._isRunningTask(i))return t(e,o)}))}))}function m(e,t){var n=e.Bucket,i=e.Region,o=e.Key,r=e.UploadId,s=e.SliceList,c=this,l=this.options.ChunkRetryTimes+1,p=s.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));a.retry(l,(function(t){c.multipartComplete({Bucket:n,Region:i,Key:o,UploadId:r,Parts:p,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,n){t(e,n)}))}function h(e,t){var n=e.Bucket,i=e.Region,o=e.Key,r=e.AbortArray,s=e.AsyncLimit||1,c=this,l=0,p=new Array(r.length);a.eachLimit(r,s,(function(t,a){var r=l;if(o&&o!==t.Key)return p[r]={error:{KeyNotMatch:!0}},void a(null);var s=t.UploadId||t.UploadID;c.multipartAbort({Bucket:n,Region:i,Key:t.Key,Headers:e.Headers,UploadId:s},(function(e){var o={Bucket:n,Region:i,Key:t.Key,UploadId:s};p[r]={error:e,task:o},a(null)})),l++}),(function(e){if(e)return t(e);for(var n=[],i=[],o=0,a=p.length;oo?"sliceUploadFile":f;a.push({api:m,params:e,callback:function(n,i){e.tracker&&e.tracker.formatResult(n,i),d&&d(n,i,l),t&&t(n,i)}}),n._addTasks(a)},uploadFiles:function(e,t){var n=this,o=void 0===e.SliceSize?n.options.SliceSize:e.SliceSize,a=0,r=0,l=s.throttleOnProgress.call(n,r,e.onProgress),p=e.files.length,u=e.onFileFinish,d=Array(p),f=function(e,n,i){l(null,!0),u&&u(e,n,i),d[i.Index]={options:i,error:e,data:n},--p<=0&&t&&t(null,{files:d})},m=[];s.each(e.files,(function(e,t){var p=e.FileSize,u={Index:t,TaskId:""};if(a+=p,n.options.EnableTracker){var d=n.options.UseAccelerate||"string"==typeof n.options.Domain&&n.options.Domain.includes("accelerate.");e.tracker=new c({bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:p,accelerate:d,deepTracker:n.options.DeepTracker,customId:n.options.CustomId,delay:n.options.TrackerDelay})}s.each(e,(function(e,t){"object"!==i(e)&&"function"!=typeof e&&(u[t]=e)}));var h=e.onTaskReady;e.onTaskReady=function(e){u.TaskId=e,h&&h(e)};var g=0,v=e.onProgress;e.onProgress=function(e){r=r-g+e.loaded,g=e.loaded,v&&v(e),l({loaded:r,total:a})};var y=e.onFileFinish,x="postObject"===n.options.SimpleUploadMethod?"postObject":"putObject",b=p>o?"sliceUploadFile":x;m.push({api:b,params:e,callback:function(t,n){e.tracker&&e.tracker.formatResult(t,n),y&&y(t,n),f&&f(t,n,u)}})})),n._addTasks(m)},sliceCopyFile:function(e,t){var n=new r,i=this,o=e.Bucket,c=e.Region,l=e.Key,p=e.CopySource,u=p.match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(u){var d=u[1],f=u[3],m=decodeURIComponent(u[4]),h=void 0===e.CopySliceSize?i.options.CopySliceSize:e.CopySliceSize;h=Math.max(0,h);var v,y,x=e.CopyChunkSize||this.options.CopyChunkSize,b=this.options.CopyChunkParallelLimit,k=0;n.on("copy_slice_complete",(function(e){i.multipartComplete({Bucket:o,Region:c,Key:l,UploadId:e.UploadId,Parts:e.PartList,calledBySdk:"sliceCopyFile"},(function(e,n){if(e)return y(null,!0),t(e);y({loaded:v,total:v},!0),t(null,n)}))})),n.on("get_copy_data_finish",(function(e){a.eachLimit(e.PartList,b,(function(t,n){var a=t.PartNumber,r=t.CopySourceRange,s=t.end-t.start,u=0;g.call(i,{Bucket:o,Region:c,Key:l,CopySource:p,UploadId:e.UploadId,PartNumber:a,CopySourceRange:r,onProgress:function(e){k+=e.loaded-u,u=e.loaded,y({loaded:k,total:v})}},(function(e,i){if(e)return n(e);y({loaded:k,total:v}),k+=s-u,t.ETag=i.ETag,n(e||null,i)}))}),(function(i){if(i)return y(null,!0),t(i);n.emit("copy_slice_complete",e)}))})),n.on("get_file_size_finish",(function(a){var r;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,o=0;on.length&&(c[t]=e)})),n.emit("get_file_size_finish",c)}else t({error:'get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.'})}))}else t({error:"CopySource format error"})}};e.exports.init=function(e,t){t.transferToTaskMethod(v,"sliceUploadFile"),s.each(v,(function(t,n){e.prototype[n]=s.apiWrapper(n,t)}))}},function(e,t){var n={eachLimit:function(e,t,n,i){if(i=i||function(){},!e.length||t<=0)return i();var o=0,a=0,r=0;!function s(){if(o>=e.length)return i();for(;r=e.length?i():s())}))}()},retry:function(e,t,n){e<1?n():function i(o){t((function(t,a){t&&o=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function o(e,t,n,i,o,a,r){try{var s=e[a](r),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var r=n(12),s=n(15),c=n(16),l=n(21),p=n(5).btoa,u=wx.getFileSystemManager(),d=n(6);function f(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function m(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(t?f(i).toLowerCase():i);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var h=["content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","response-cache-control","response-content-disposition","response-content-encoding","response-content-language","response-content-type","response-expires","transfer-encoding","versionid"],g=function(){},v=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]);return t};function y(e){return C(e,(function(e){return"object"===a(e)&&null!==e?y(e):e}))}function x(e,t){return k(t,(function(n,i){e[i]=t[i]})),e}function b(e){return e instanceof Array}function k(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function C(e,t){var n=b(e)?[]:{};for(var i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i));return n}var S=function(e,t){if(t=x({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var n=t.Headers||{};if(t&&"object"===a(t)){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(n[e]=t[e])}();R.each({"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext"},(function(e,i){void 0!==t[e]&&(n[i]=t[e])})),t.Headers=v(n)}}return t},_=function(e){return new Promise((function(t,n){u.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){n((null==e?void 0:e.errMsg)||"")}})}))},w=function(){var e,t=(e=i().mark((function e(t,n,o){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}o(),e.next=21;break;case 4:if("putObject"!==t){e.next=20;break}if(void 0!==n.Body||!n.FilePath){e.next=17;break}return e.prev=6,e.next=9,_(n.FilePath);case 9:n.Body=e.sent,e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(6),n.Body=void 0,o({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==n.Body?(n.ContentLength=n.Body.byteLength,o(null,n.ContentLength)):o({error:"missing param Body"}),e.next=21;break;case 20:n.FilePath?u.stat({path:n.FilePath,success:function(e){var t=e.stats;n.FileStat=t,n.FileStat.FilePath=n.FilePath;var i=t.isDirectory()?0:t.size;n.ContentLength=i=i||0,o(null,i)},fail:function(e){o(e)}}):o({error:"missing param FilePath"});case 21:case"end":return e.stop()}}),e,null,[[6,12]])})),function(){var t=this,n=arguments;return new Promise((function(i,a){var r=e.apply(t,n);function s(e){o(r,i,a,s,c,"next",e)}function c(e){o(r,i,a,s,c,"throw",e)}s(void 0)}))});return function(e,n,i){return t.apply(this,arguments)}}(),E=function(e){return Date.now()+(e||0)},T=function(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.lengtha)return 1;if(o=0;!t&&e.platform;return function(){return!1,t}}(),R={noop:g,formatParams:S,apiWrapper:function(e,n){return function(i,o){var a,r=this;if("function"==typeof i&&(o=i,i={}),i=S(e,i),r.options.EnableTracker)if("sliceUploadFile"===i.calledBySdk)a=i.tracker&&i.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))a=null;else{var s=-1;i.Body&&(s="string"==typeof i.Body?i.Body.length:i.Body.size||i.Body.byteLength||-1),a=new d({bucket:i.Bucket,region:i.Region,apiName:e,fileKey:i.Key,fileSize:s,deepTracker:r.options.DeepTracker,customId:r.options.CustomId,delay:r.options.TrackerDelay})}i.tracker=a;var c=function(e){return e&&e.headers&&(e.headers["x-cos-request-id"]&&(e.RequestId=e.headers["x-cos-request-id"]),e.headers["x-ci-request-id"]&&(e.RequestId=e.headers["x-ci-request-id"]),e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},l=function(e,t){a&&a.formatResult(e,t),o&&o(c(e),c(t))},p=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var n=t.Bucket,i=t.Region,o=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!n)return"Bucket";if(!i)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e){if(!n)return"Bucket";if(!i)return"Region";if(!o)return"Key"}return!1}(e,i);if(t)return"missing param "+t;if(i.Region){if(i.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(i.Region))return"Region format error.";!r.options.CompatibilityMode&&-1===i.Region.indexOf("-")&&"yfb"!==i.Region&&"default"!==i.Region&&i.Region}if(i.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(i.Bucket))if(i.AppId)i.Bucket=i.Bucket+"-"+i.AppId;else{if(!r.options.AppId)return'Bucket should format as "test-1250000000".';i.Bucket=i.Bucket+"-"+r.options.AppId}i.AppId&&delete i.AppId}i.Key&&"/"===i.Key.substr(0,1)&&(i.Key=i.Key.substr(1))}}(),u="getAuth"===e||"getObjectUrl"===e,f=t.Promise;if(!u&&f&&!o)return new f((function(e,t){if(o=function(n,i){n?t(n):e(i)},p)return l({error:p});n.call(r,i,l)}));if(p)return l({error:p});var m=n.call(r,i,l);return u?m:void 0}},xml2json:c,json2xml:l,md5:r,clearKey:v,fileSlice:function(e,t,n,i){e?u.readFile({filePath:e,position:t,length:n-t,success:function(e){i(e.data)},fail:function(){i(null)}}):i(null)},getBodyMd5:function(e,t,n){n=n||g,e&&t&&t instanceof ArrayBuffer?R.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=r(e);return t&&t(n),n},binaryBase64:function(e){var t,n,i,o="";for(t=0,n=e.length/2;t-1||h.indexOf(i)>-1)&&(t[n]=e[n])}return t}(y(e.Headers||e.headers||{})),l=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+l:0!==(t=e.Pathname||e.pathname||l).indexOf("/")&&(t="/"+t);var p=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&p&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),n&&i){var u=Math.round(E(e.SystemClockOffset)/1e3)-1,d=u,f=e.Expires||e.expires;d+=void 0===f?900:1*f||0;var g=n,v=o||u+";"+d,x=o||u+";"+d,b=m(c,!0).join(";").toLowerCase(),k=m(r,!0).join(";").toLowerCase(),C=s.HmacSHA1(x,i).toString(),S=[a,t,R.obj2str(r,!0),R.obj2str(c,!0),""].join("\n"),_=["sha1",v,s.SHA1(S).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+g,"q-sign-time="+v,"q-key-time="+x,"q-header-list="+b,"q-url-param-list="+k,"q-signature="+s.HmacSHA1(_,C).toString()].join("&")}},compareVersion:T,canFileSlice:A,isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},error:function(e,t){var n=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===a(t)&&null!==t&&(x(e,t),(t.code||t.name)&&(e.code=t.code||t.name),t.message&&(e.message=t.message),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.code||(e.code=e.name),e.error||(e.error=y(n)),e}};e.exports=R}).call(this,n(2))},function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var o=i({HTML:"text/html",isHTML:function(e){return e===o.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.freeze=i,t.MIME_TYPE=o,t.NAMESPACE=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var i=n(1).NAMESPACE;function o(e){return""!==e}function a(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function r(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(o):[]}(e);return Object.keys(t.reduce(a,{}))}function s(e,t){for(var n in e)t[n]=e[n]}function c(e,t){var n=e.prototype;if(!(n instanceof t)){function i(){}i.prototype=t.prototype,s(n,i=new i),e.prototype=n=i}n.constructor!=e&&(n.constructor=e)}var l={},p=l.ELEMENT_NODE=1,u=l.ATTRIBUTE_NODE=2,d=l.TEXT_NODE=3,f=l.CDATA_SECTION_NODE=4,m=l.ENTITY_REFERENCE_NODE=5,h=l.ENTITY_NODE=6,g=l.PROCESSING_INSTRUCTION_NODE=7,v=l.COMMENT_NODE=8,y=l.DOCUMENT_NODE=9,x=l.DOCUMENT_TYPE_NODE=10,b=l.DOCUMENT_FRAGMENT_NODE=11,k=l.NOTATION_NODE=12,C={},S={},_=(C.INDEX_SIZE_ERR=(S[1]="Index size error",1),C.DOMSTRING_SIZE_ERR=(S[2]="DOMString size error",2),C.HIERARCHY_REQUEST_ERR=(S[3]="Hierarchy request error",3)),w=(C.WRONG_DOCUMENT_ERR=(S[4]="Wrong document",4),C.INVALID_CHARACTER_ERR=(S[5]="Invalid character",5),C.NO_DATA_ALLOWED_ERR=(S[6]="No data allowed",6),C.NO_MODIFICATION_ALLOWED_ERR=(S[7]="No modification allowed",7),C.NOT_FOUND_ERR=(S[8]="Not found",8)),E=(C.NOT_SUPPORTED_ERR=(S[9]="Not supported",9),C.INUSE_ATTRIBUTE_ERR=(S[10]="Attribute in use",10));C.INVALID_STATE_ERR=(S[11]="Invalid state",11),C.SYNTAX_ERR=(S[12]="Syntax error",12),C.INVALID_MODIFICATION_ERR=(S[13]="Invalid modification",13),C.NAMESPACE_ERR=(S[14]="Invalid namespace",14),C.INVALID_ACCESS_ERR=(S[15]="Invalid access",15);function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,S[e]),this.message=S[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function A(){}function R(e,t){this._node=e,this._refresh=t,O(this)}function O(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);le(e,"length",n.length),s(n,e),e._inc=t}}function I(){}function B(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function N(e,t,n,o){if(o?t[B(t,o)]=n:t[t.length++]=n,e){n.ownerElement=e;var a=e.ownerDocument;a&&(o&&F(a,e,o),function(e,t,n){e&&e._inc++,n.namespaceURI===i.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(a,e,n))}}function P(e,t,n){var i=B(t,n);if(!(i>=0))throw T(w,new Error(e.tagName+"@"+n));for(var o=t.length-1;i"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0}while(e=e.nextSibling)}function U(){}function F(e,t,n,o){e&&e._inc++,n.namespaceURI===i.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function H(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var o=t.firstChild,a=0;o;)i[a++]=o,o=o.nextSibling;i.length=a,delete i[i.length]}}}function z(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function q(e,t,n){var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===b){var o=t.firstChild;if(null==o)return t;var a=t.lastChild}else o=a=t;var r=n?n.previousSibling:e.lastChild;o.previousSibling=r,a.nextSibling=n,r?r.nextSibling=o:e.firstChild=o,null==n?e.lastChild=a:n.previousSibling=a;do{o.parentNode=e}while(o!==a&&(o=o.nextSibling));return H(e.ownerDocument||e,e),t.nodeType==b&&(t.firstChild=t.lastChild=null),t}function K(){this._nsMap={}}function G(){}function V(){}function X(){}function W(){}function Y(){}function Q(){}function J(){}function $(){}function Z(){}function ee(){}function te(){}function ne(){}function ie(e,t){var n=[],i=9==this.nodeType&&this.documentElement||this,o=i.prefix,a=i.namespaceURI;if(a&&null==o&&null==(o=i.lookupPrefix(a)))var r=[{namespace:a,prefix:null}];return re(this,n,e,t,r),n.join("")}function oe(e,t,n){var o=e.prefix||"",a=e.namespaceURI;if(!a)return!1;if("xml"===o&&a===i.XML||a===i.XMLNS)return!1;for(var r=n.length;r--;){var s=n[r];if(s.prefix===o)return s.namespace!==a}return!0}function ae(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,M),'"')}function re(e,t,n,o,a){if(a||(a=[]),o){if(!(e=o(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var r=e.attributes,s=r.length,c=e.firstChild,l=e.tagName,h=l;if(!(n=i.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var k,C=0;C=0;S--){if(""===(_=a[S]).prefix&&_.namespace===e.namespaceURI){k=_.namespace;break}}if(k!==e.namespaceURI)for(S=a.length-1;S>=0;S--){var _;if((_=a[S]).namespace===e.namespaceURI){_.prefix&&(h=_.prefix+":"+l);break}}}t.push("<",h);for(var w=0;w"),n&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):re(c,t,n,o,a.slice()),c=c.nextSibling;else for(;c;)re(c,t,n,o,a.slice()),c=c.nextSibling;t.push("")}else t.push("/>");return;case y:case b:for(c=e.firstChild;c;)re(c,t,n,o,a.slice()),c=c.nextSibling;return;case u:return ae(t,e.name,e.value);case d:return t.push(e.data.replace(/[<&>]/g,M));case f:return t.push("");case v:return t.push("\x3c!--",e.data,"--\x3e");case x:var R=e.publicId,O=e.systemId;if(t.push("");else if(O&&"."!=O)t.push(" SYSTEM ",O,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case g:return t.push("");case m:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function se(e,t,n){var i;switch(t.nodeType){case p:(i=t.cloneNode(!1)).ownerDocument=e;case b:break;case u:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var o=t.firstChild;o;)i.appendChild(se(e,o,n)),o=o.nextSibling;return i}function ce(e,t,n){var i=new t.constructor;for(var o in t){var a=t[o];"object"!=typeof a&&a!=i[o]&&(i[o]=a)}switch(t.childNodes&&(i.childNodes=new A),i.ownerDocument=e,i.nodeType){case p:var r=t.attributes,s=i.attributes=new I,c=r.length;s._ownerElement=i;for(var l=0;l0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(n[i]==e)return i;t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},s(l,j),s(l,j.prototype),U.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==b){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return null==this.documentElement&&e.nodeType==p&&(this.documentElement=e),q(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),z(this,e)},importNode:function(e,t){return se(this,e,t)},getElementById:function(e){var t=null;return L(this.documentElement,(function(n){if(n.nodeType==p&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=r(e);return new R(this,(function(n){var i=[];return t.length>0&&L(n.documentElement,(function(o){if(o!==n&&o.nodeType===p){var a=o.getAttribute("class");if(a){var s=e===a;if(!s){var c=r(a);s=t.every((l=c,function(e){return l&&-1!==l.indexOf(e)}))}s&&i.push(o)}}var l})),i}))},createElement:function(e){var t=new K;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new A,(t.attributes=new I)._ownerElement=t,t},createDocumentFragment:function(){var e=new ee;return e.ownerDocument=this,e.childNodes=new A,e},createTextNode:function(e){var t=new X;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new W;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Y;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new te;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new G;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Z;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new K,i=t.split(":"),o=n.attributes=new I;return n.childNodes=new A,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,o._ownerElement=n,n},createAttributeNS:function(e,t){var n=new G,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},c(U,j),K.prototype={nodeType:p,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===b?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,H(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new R(this,(function(t){var n=[];return L(t,(function(i){i===t||i.nodeType!=p||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new R(this,(function(n){var i=[];return L(n,(function(o){o===n||o.nodeType!==p||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||i.push(o)})),i}))}},U.prototype.getElementsByTagName=K.prototype.getElementsByTagName,U.prototype.getElementsByTagNameNS=K.prototype.getElementsByTagNameNS,c(K,j),G.prototype.nodeType=u,c(G,j),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(S[_])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},c(V,j),X.prototype={nodeName:"#text",nodeType:d,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},c(X,V),W.prototype={nodeName:"#comment",nodeType:v},c(W,V),Y.prototype={nodeName:"#cdata-section",nodeType:f},c(Y,V),Q.prototype.nodeType=x,c(Q,j),J.prototype.nodeType=k,c(J,j),$.prototype.nodeType=h,c($,j),Z.prototype.nodeType=m,c(Z,j),ee.prototype.nodeName="#document-fragment",ee.prototype.nodeType=b,c(ee,j),te.prototype.nodeType=g,c(te,j),ne.prototype.serializeToString=function(e,t,n){return ie.call(e,t,n)},j.prototype.toString=ie;try{if(Object.defineProperty){function pe(e){switch(e.nodeType){case p:case b:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(pe(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(R.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(j.prototype,"textContent",{get:function(){return pe(this)},set:function(e){switch(this.nodeType){case p:case b:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),le=function(e,t,n){e["$$"+t]=n}}}catch(ue){}t.DocumentType=Q,t.DOMException=T,t.DOMImplementation=D,t.Element=K,t.Node=j,t.NodeList=A,t.XMLSerializer=ne},function(e,t){var n=function(e){var t=(e=e||{}).Base64,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=function(e){for(var t={},n=0,i=e.length;n>>6)+o(128|63&t):o(224|t>>>12&15)+o(128|t>>>6&63)+o(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return o(240|t>>>18&7)+o(128|t>>>12&63)+o(128|t>>>6&63)+o(128|63&t)},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(r,a)},c=function(e){var t=[0,2,1][e.length%3],i=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[n.charAt(i>>>18),n.charAt(i>>>12&63),t>=2?"=":n.charAt(i>>>6&63),t>=1?"=":n.charAt(63&i)].join("")},l=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,c)},p=function(e){return l(s(e))},u=function(e,t){return t?p(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):p(String(e))},d=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),f=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return o(55296+(t>>>10))+o(56320+(1023&t));case 3:return o((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return o((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},m=function(e){return e.replace(d,f)},h=function(e){var t=e.length,n=t%4,a=(t>0?i[e.charAt(0)]<<18:0)|(t>1?i[e.charAt(1)]<<12:0)|(t>2?i[e.charAt(2)]<<6:0)|(t>3?i[e.charAt(3)]:0),r=[o(a>>>16),o(a>>>8&255),o(255&a)];return r.length-=[0,0,2,1][n],r.join("")},g=e.atob?function(t){return e.atob(t)}:function(e){return e.replace(/[\s\S]{1,4}/g,h)},v=function(e){return m(g(e))},y=function(e){return v(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))};return{VERSION:"2.1.9",atob:g,btoa:l,fromBase64:y,toBase64:u,utob:s,encode:u,encodeURI:function(e){return u(e,!0)},btou:m,decode:y,noConflict:function(){var n=e.Base64;return e.Base64=t,n}}}();e.exports=n},function(e,t,n){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},r=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function p(e,t,n,i){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),r=new w(i||[]);return a._invoke=function(e,t,n){var i="suspendedStart";return function(o,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw a;return T()}for(n.method=o,n.arg=a;;){var r=n.delegate;if(r){var s=C(r,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}(e,n,r),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=p;var d={};function f(){}function m(){}function h(){}var g={};l(g,r,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(E([])));y&&y!==t&&n.call(y,r)&&(g=y);var x=h.prototype=f.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function o(a,r,s,c){var l=u(e[a],e,r);if("throw"!==l.type){var p=l.arg,d=p.value;return d&&"object"==i(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,s,c)}),(function(e){o("throw",e,s,c)})):t.resolve(d).then((function(e){p.value=e,s(p)}),(function(e){return o("throw",e,s,c)}))}c(l.arg)}var a;this._invoke=function(e,n){function i(){return new t((function(t,i){o(e,n,t,i)}))}return a=a?a.then(i,i):i()}}function C(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function t(){for(;++i=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function a(e,t,n,i,o,a,r){try{var s=e[a](r),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function r(e,t){for(var n=0;n=0;o--)t===i[o]&&i.splice(o,1)},e.emit=function(e,t){for(var i=n(e).map((function(e){return e})),o=0;o=0;n--){var o=i[n][2];(!o||o+2592e3=0;a--){var r=i[a];(r[0]===e&&r[1]===t||e!==r[0]&&0===r[0].indexOf(o))&&i.splice(a,1)}i.unshift([e,t,Math.round(Date.now()/1e3)]),i.length>n&&i.splice(n),l()}},removeUploadId:function(e){c(),delete p.using[e];for(var t=i.length-1;t>=0;t--)i[t][1]===e&&i.splice(t,1);l()}};e.exports=p},function(e,t,n){var i=n(11);e.exports=i},function(e,t,n){"use strict";var i=n(0),o=n(8),a=n(23),r=n(24),s=n(30),c=n(7),l={SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,UploadQueueSize:1e4,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,HttpDNSServiceId:"",SimpleUploadMethod:"postObject",EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:""},p=function(e){this.options=i.extend(i.clone(l),e||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1048576,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1048576,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.AppId,this.options.SecretId&&this.options.SecretId.indexOf(" "),this.options.SecretKey&&this.options.SecretKey.indexOf(" "),o.init(this),a.init(this)};r.init(p,a),s.init(p,a),p.util={md5:i.md5,xml2json:i.xml2json,json2xml:i.json2xml},p.getAuthorization=i.getAuth,p.version=c.version,e.exports=p},function(module,exports,__webpack_require__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===("undefined"==typeof window?"undefined":_typeof(window)),root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===("undefined"==typeof self?"undefined":_typeof(self)),NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"===(void 0===process?"undefined":_typeof(process))&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"===_typeof(module)&&module.exports,AMD=__webpack_require__(14),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===_typeof(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t){return new Md5(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.getCtx=e.create=function(){return new Md5},e.update=function(t){return e.create().update(t)};for(var t=0;t>2]|=e[a]<>6,c[o++]=128|63&i):i<55296||i>=57344?(c[o++]=224|i>>12,c[o++]=128|i>>6&63,c[o++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++a)),c[o++]=240|i>>18,c[o++]=128|i>>12&63,c[o++]=128|i>>6&63,c[o++]=128|63&i);else for(o=this.start;a>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[o>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=EXTRA[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,t,n,i,o,a,r=this.blocks;this.first?t=((t=((e=((e=r[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(i=((i=(-1732584194^2004318071&e)+r[1]-117830708)<<12|i>>>20)+e<<0)&(-271733879^e))+r[2]-1126478375)<<17|n>>>15)+i<<0)&(i^e))+r[3]-1316259209)<<22|t>>>10)+n<<0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((i=this.h3)^t&(n^i))+r[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[1]-389564586)<<12|i>>>20)+e<<0)&(e^t))+r[2]+606105819)<<17|n>>>15)+i<<0)&(i^e))+r[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(i^t&(n^i))+r[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[5]+1200080426)<<12|i>>>20)+e<<0)&(e^t))+r[6]-1473231341)<<17|n>>>15)+i<<0)&(i^e))+r[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(i^t&(n^i))+r[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[9]-1958414417)<<12|i>>>20)+e<<0)&(e^t))+r[10]-42063)<<17|n>>>15)+i<<0)&(i^e))+r[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(i^t&(n^i))+r[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[13]-40341101)<<12|i>>>20)+e<<0)&(e^t))+r[14]-1502002290)<<17|n>>>15)+i<<0)&(i^e))+r[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[1]-165796510)<<5|e>>>27)+t<<0)^t))+r[6]-1069501632)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[11]+643717713)<<14|n>>>18)+i<<0)^i))+r[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[5]-701558691)<<5|e>>>27)+t<<0)^t))+r[10]+38016083)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[15]-660478335)<<14|n>>>18)+i<<0)^i))+r[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[9]+568446438)<<5|e>>>27)+t<<0)^t))+r[14]-1019803690)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[3]-187363961)<<14|n>>>18)+i<<0)^i))+r[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[13]-1444681467)<<5|e>>>27)+t<<0)^t))+r[2]-51403784)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[7]+1735328473)<<14|n>>>18)+i<<0)^i))+r[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[5]-378558)<<4|e>>>28)+t<<0))+r[8]-2022574463)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[11]+1839030562)<<16|n>>>16)+i<<0))+r[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[1]-1530992060)<<4|e>>>28)+t<<0))+r[4]+1272893353)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[7]-155497632)<<16|n>>>16)+i<<0))+r[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[13]+681279174)<<4|e>>>28)+t<<0))+r[0]-358537222)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[3]-722521979)<<16|n>>>16)+i<<0))+r[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[9]-640364487)<<4|e>>>28)+t<<0))+r[12]-421815835)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[15]+530742520)<<16|n>>>16)+i<<0))+r[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[0]-198630844)<<6|e>>>26)+t<<0)|~n))+r[7]+1126891415)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[14]-1416354905)<<15|n>>>17)+i<<0)|~e))+r[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+r[3]-1894986606)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[10]-1051523)<<15|n>>>17)+i<<0)|~e))+r[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+r[15]-30611744)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[6]-1560198380)<<15|n>>>17)+i<<0)|~e))+r[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[4]-145523070)<<6|e>>>26)+t<<0)|~n))+r[11]-1120210379)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[2]+718787259)<<15|n>>>17)+i<<0)|~e))+r[9]-343485551)<<21|t>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=n-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,t,n,i="",o=this.array(),a=0;a<15;)e=o[a++],t=o[a++],n=o[a++],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|n>>>6)]+BASE64_ENCODE_CHAR[63&n];return e=o[a],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(13),__webpack_require__(2),__webpack_require__(3)(module))},function(e,t){var n,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:r}catch(e){i=r}}();var c,l=[],p=!1,u=-1;function d(){p&&c&&(p=!1,c.length?l=c.concat(l):u=-1,l.length&&f())}function f(){if(!p){var e=s(d);p=!0;for(var t=l.length;t;){for(c=l,l=[];++u1)for(var n=1;n>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i>>2]>>>24-i%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=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new r.init(n,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new r.init(n,t)}},p=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},u=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,o=e.min(4*t,o),t){for(var c=0;cl;l++){if(16>l)a[l]=0|e[t+l];else{var p=a[l-3]^a[l-8]^a[l-14]^a[l-16];a[l]=p<<1|p>>>31}p=(i<<5|i>>>27)+c+a[l],p=20>l?p+(1518500249+(o&r|~o&s)):40>l?p+(1859775393+(o^r^s)):60>l?p+((o&r|o&s|r&s)-1894007588):p+((o^r^s)-899497514),c=s,s=r,r=o<<30|o>>>2,o=i,i=p}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+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}}),n.SHA1=o._createHelper(r),n.HmacSHA1=o._createHmacHelper(r),function(){var e=l,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 i=e.blockSize,o=4*i;n.sigBytes>o&&(n=e.finalize(n)),n.clamp();for(var a=this._oKey=n.clone(),r=this._iKey=n.clone(),s=a.words,c=r.words,l=0;l>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,i=n.charAt(64);if(i){var o=e.indexOf(i);-1!=o&&(t=o)}for(var a=[],r=0,s=0;s>>6-s%4*2;a[r>>>2]|=(l|p)<<24-r%4*8,r++}return c.create(a,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=l},function(e,t,n){var i=n(17).DOMParser,o=function(e){"use strict";e=e||{},function(){void 0===e.escapeMode&&(e.escapeMode=!0);e.attributePrefix=e.attributePrefix||"_",e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0);e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0);void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0);e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1);e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1)}();var t=1,n=3,o=4,a=8,r=9;function s(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function c(e){return"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):e}function l(e,t,n,i){for(var o=0;o0&&l(e.arrayAccessFormPaths,t,n,i)&&(t[n]=[t[n]])}function u(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),i=t[5].split(".");if(n.setHours(t[3],t[4],i[0]),i.length>1&&n.setMilliseconds(i[1]),t[6]&&t[7]){var o=60*t[6]+Number(t[7]);o=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),n.setMinutes(n.getMinutes()-o-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function d(n,i,o,a){return!(i==t&&e.xmlElementsFilter.length>0)||l(e.xmlElementsFilter,n,o,a)}function f(i,c){if(i.nodeType==r){for(var m=new Object,h=i.childNodes,g=0;g0){var o=i.split(".#")[0];return l(e.datetimeAccessFormPaths,t,n,o)?u(t):t}return t}(m.__text,y,c+"."+y)),null!=m["#cdata-section"]&&(m.__cdata=m["#cdata-section"],delete m["#cdata-section"],"property"==e.arrayAccessForm&&delete m["#cdata-section_asArray"]),0==m.__cnt&&"text"==e.emptyNodeForm?m="":1==m.__cnt&&null!=m.__text?m=m.__text:1!=m.__cnt||null==m.__cdata||e.keepCData?m.__cnt>1&&null!=m.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==m.__text||""==m.__text.trim())&&delete m.__text:m=m.__cdata,delete m.__cnt,!e.enableToStringFunc||null==m.__text&&null==m.__cdata||(m.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),m}if(i.nodeType==n||i.nodeType==o)return i.nodeValue}function m(t,n,i,o){var a="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=i)for(var r=0;r":">"}function h(e,t){return""}function g(t,n){return"property"==e.arrayAccessForm&&(i=n.toString(),o="_asArray",-1!==i.indexOf(o,i.length-o.length))||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function;var i,o}function v(e){var t=0;if(e instanceof Object)for(var n in e)g(e,n)||t++;return t}function y(t,n,i){return 0==e.jsonPropertiesFilter.length||""==i||l(e.jsonPropertiesFilter,t,n,i)}function x(t){var n=[];if(t instanceof Object)for(var i in t)-1==i.toString().indexOf("__")&&0==i.toString().indexOf(e.attributePrefix)&&n.push(i);return n}function b(t){var n="";return t instanceof Object?n+=function(t){var n="";return null!=t.__cdata&&(n+=""),null!=t.__text&&(e.escapeMode?n+=c(t.__text):n+=t.__text),n}(t):null!=t&&(e.escapeMode?n+=c(t):n+=t),n}function k(e,t){return""===e?t:e+"."+t}function C(e,t,n,i){var o="";if(0==e.length)o+=m(e,t,n,!0);else for(var a=0;a0)for(var i in e)if(!g(e,i)&&(""==t||y(e,i,k(t,i)))){var o=e[i],a=x(o);if(null==o||null==o)n+=m(o,i,a,!0);else if(o instanceof Object)if(o instanceof Array)n+=C(o,i,a,t);else if(o instanceof Date)n+=m(o,i,a,!1),n+=o.toISOString(),n+=h(o,i);else{v(o)>0||null!=o.__text||null!=o.__cdata?(n+=m(o,i,a,!1),n+=S(o,k(t,i)),n+=h(o,i)):n+=m(o,i,a,!0)}else n+=m(o,i,a,!1),n+=b(o),n+=h(o,i)}return n+=b(e)}this.parseXmlString=function(e){var t;if(void 0===e)return null;if(i){var n=new i,o=null;try{o=n.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){o=null}try{t=n.parseFromString(e,"text/xml"),null!=o&&t.getElementsByTagNameNS(o,"parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?u(e):e},this.xml2json=function(e){return f(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return S(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}};e.exports=function(e){if(!e)return null;var t=(new i).parseFromString(e,"text/xml"),n=(new o).xml2json(t);return n.html&&n.getElementsByTagName("parsererror").length?null:n}},function(e,t,n){var i=n(4);t.DOMImplementation=i.DOMImplementation,t.XMLSerializer=i.XMLSerializer,t.DOMParser=n(18).DOMParser},function(e,t,n){var i=n(1),o=n(4),a=n(19),r=n(20),s=o.DOMImplementation,c=i.NAMESPACE,l=r.ParseError,p=r.XMLReader;function u(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function d(e){this.options=e||{locator:{}}}function f(){this.cdata=!1}function m(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function h(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function g(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}d.prototype.parseFromString=function(e,t){var n=this.options,i=new p,o=n.domBuilder||new f,r=n.errorHandler,s=n.locator,l=n.xmlns||{},d=/\/x?html?$/.test(t),m=d?a.HTML_ENTITIES:a.XML_ENTITIES;s&&o.setDocumentLocator(s),i.errorHandler=function(e,t,n){if(!e){if(t instanceof f)return t;e=t}var i={},o=e instanceof Function;function a(t){var a=e[t];!a&&o&&(a=2==e.length?function(n){e(t,n)}:e),i[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+function(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),i}(r,o,s),i.domBuilder=n.domBuilder||o,d&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var h=n.normalizeLineEndings||u;return e&&"string"==typeof e?i.parse(h(e),l,m):i.errorHandler.error("invalid doc source"),o.doc},f.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var o=this.doc,a=o.createElementNS(e,n||t),r=i.length;g(this,a),this.currentElement=a,this.locator&&m(this.locator,a);for(var s=0;s",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),t.entityMap=t.HTML_ENTITIES},function(e,t,n){var i=n(1).NAMESPACE,o=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,a=new RegExp("[\\-\\.0-9"+o.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),r=new RegExp("^"+o.source+a.source+"*(?::"+o.source+a.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function c(){}function l(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function p(e,t,n,o,a,r){function s(e,t,i){n.attributeNames.hasOwnProperty(e)&&r.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),i)}for(var c,l=++t,p=0;;){var u=e.charAt(l);switch(u){case"=":if(1===p)c=e.slice(t,l),p=3;else{if(2!==p)throw new Error("attribute equal must after attrName");p=3}break;case"'":case'"':if(3===p||1===p){if(1===p&&(r.warning('attribute value must after "="'),c=e.slice(t,l)),t=l+1,!((l=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");s(c,d=e.slice(t,l),t-1),p=5}else{if(4!=p)throw new Error('attribute value must after "="');s(c,d=e.slice(t,l),t),r.warning('attribute "'+c+'" missed start quot('+u+")!!"),t=l+1,p=5}break;case"/":switch(p){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:p=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return r.error("unexpected end of input"),0==p&&n.setTagName(e.slice(t,l)),l;case">":switch(p){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,l)).slice(-1)&&(n.closed=!0,d=d.slice(0,-1));case 2:2===p&&(d=c),4==p?(r.warning('attribute "'+d+'" missed quot(")!'),s(c,d,t)):(i.isHTML(o[""])&&d.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),s(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return l;case"€":u=" ";default:if(u<=" ")switch(p){case 0:n.setTagName(e.slice(t,l)),p=6;break;case 1:c=e.slice(t,l),p=2;break;case 4:var d=e.slice(t,l);r.warning('attribute "'+d+'" missed quot(")!!'),s(c,d,t);case 5:p=6}else switch(p){case 2:n.tagName;i.isHTML(o[""])&&c.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),s(c,c,t),t=l,p=1;break;case 5:r.warning('attribute space is required"'+c+'"!!');case 6:p=1,t=l;break;case 3:p=4,t=l;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function u(e,t,n){for(var o=e.tagName,a=null,r=e.length;r--;){var s=e[r],c=s.qName,l=s.value;if((f=c.indexOf(":"))>0)var p=s.prefix=c.slice(0,f),u=c.slice(f+1),d="xmlns"===p&&u;else u=c,p=null,d="xmlns"===c&&"";s.localName=u,!1!==d&&(null==a&&(a={},m(n,n={})),n[d]=a[d]=l,s.uri=i.XMLNS,t.startPrefixMapping(d,l))}for(r=e.length;r--;){(p=(s=e[r]).prefix)&&("xml"===p&&(s.uri=i.XML),"xmlns"!==p&&(s.uri=n[p||""]))}var f;(f=o.indexOf(":"))>0?(p=e.prefix=o.slice(0,f),u=e.localName=o.slice(f+1)):(p=null,u=e.localName=o);var h=e.uri=n[p||""];if(t.startElement(h,u,o,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(h,u,o),a)for(p in a)t.endPrefixMapping(p)}function d(e,t,n,i,o){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),r=e.substring(t+1,a);if(/[&<]/.test(r))return/^script$/i.test(n)?(o.characters(r,0,r.length),a):(r=r.replace(/&#?\w+;/g,i),o.characters(r,0,r.length),a)}return t+1}function f(e,t,n,i){var o=i[n];return null==o&&((o=e.lastIndexOf(""))t?(n.comment(e,t+4,o-t-4),o+3):(i.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,o-t-9),n.endCDATA(),o+3}var a=function(e,t){var n,i=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;n=o.exec(e);)if(i.push(n),n[1])return i}(e,t),r=a.length;if(r>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],c=!1,l=!1;r>3&&(/^public$/i.test(a[2][0])?(c=a[3][0],l=r>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var p=a[r-1];return n.startDTD(s,c,l),n.endDTD(),p.index+p[0].length}return-1}function g(e,t,n){var i=e.indexOf("?>",t);if(i){var o=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(o){o[0].length;return n.processingInstruction(o[1],o[2]),i+2}return-1}return-1}function v(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,c.prototype={parse:function(e,t,n){var o=this.domBuilder;o.startDocument(),m(t,t={}),function(e,t,n,o,a){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function c(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?r(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function m(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,c);C&&y(w),o.characters(n,0,t-w),w=t}}function y(t,n){for(;t>=b&&(n=k.exec(e));)x=n.index,b=x+n[0].length,C.lineNumber++;C.columnNumber=t-x+1}var x=0,b=0,k=/.*(?:\r\n?|\n)|.*$/g,C=o.locator,S=[{currentNSMap:t}],_={},w=0;for(;;){try{var E=e.indexOf("<",w);if(E<0){if(!e.substr(w).match(/^\s*$/)){var T=o.doc,A=T.createTextNode(e.substr(w));T.appendChild(A),o.currentElement=A}return}switch(E>w&&m(E),e.charAt(E+1)){case"/":var R=e.indexOf(">",E+3),O=e.substring(E+2,R).replace(/[ \t\n\r]+$/g,""),I=S.pop();R<0?(O=e.substring(E+2).replace(/[\s<].*/,""),a.error("end tag name: "+O+" is not complete:"+I.tagName),R=E+1+O.length):O.match(/\sw?w=R:m(Math.max(E,w)+1)}}(e,t,n,o,this.errorHandler),o.endDocument()}},v.prototype={setTagName:function(e){if(!r.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!r.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=c,t.ParseError=s},function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",o=new RegExp("^([^"+i+"])|^((x|X)(m|M)(l|L))|([^"+i+"-.0-9·̀-ͯ‿⁀])","g"),a=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,r=function(e){var t=[];if(e instanceof Object)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},s=function(e,t){var i=function(e,n,i,a,r){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(a).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(o,"_"));var l=[c,"<",e,i||""];return n&&n.length>0?(l.push(">"),l.push(n),r&&l.push(c),l.push("")):l.push("/>"),l.join("")};return function e(o,s,c){var l=n(o);switch((Array.isArray?Array.isArray(o):o instanceof Array)?l="array":o instanceof Date&&(l="date"),l){case"array":var p=[];return o.map((function(t){p.push(e(t,1,c+1))})),t.prettyPrint&&p.push("\n"),p.join("");case"date":return o.toJSON?o.toJSON():o+"";case"object":var u=[];for(var d in o)if(o.hasOwnProperty(d))if(o[d]instanceof Array)for(var f in o[d])o[d].hasOwnProperty(f)&&u.push(i(d,e(o[d][f],0,c+1),null,c+1,r(o[d][f]).length));else u.push(i(d,e(o[d],0,c+1),null,c+1));return t.prettyPrint&&u.length>0&&u.push("\n"),u.join("");case"function":return o();default:return t.escape?(""+o).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(a,""):""+o}}(e,0,0)},c=function(e){var t=['"),t.join("")};e.exports=function(e,t){if(t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" "}),"string"==typeof e)try{e=JSON.parse(e.toString())}catch(e){return!1}var i="",o="";return t&&("object"==n(t)?(t.xmlHeader&&(i=c(!!t.xmlHeader.standalone)),void 0!==t.docType&&(o="")):i=c()),[i,(t=t||{}).prettyPrint&&o?"\n":"",o,s(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t,n){(function(e){var n,i,o,a;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e) -/*! For license information please see beacon_mp.min.js.LICENSE.txt */}window,a=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BEACON_ATTA_REQUEST_URL=t.BEACON_ATTA_TOKEN=t.BEACON_ATTA_ID=t.BEACON_CONFIG_HTTPS_URL=t.BEACON_CONFIG_REQUEST_TIME=t.BEACON_CONFIG=t.BEACON_SENDING_IDS_KEY=t.BEACON_NORMAL_LOG_ID_KEY=t.BEACON_DRIECT_LOG_ID_KEY=t.BEACON_LASE_REPORT_TIME_KEY=t.BEACON_DEVICE_ID_KEY=t.BEACON_STORE_PREFIX=t.BEACON_LOG_ID_KEY=t.BEACON_IS_REALTIME_KEY=t.BEACON_DELAY_DEFAULT=t.BEACON_HTTPS_URL=t.BEACON_HTTP_URL=void 0,t.BEACON_HTTP_URL="http://oth.eve.mdt.qq.com:8080/analytics/v2_upload",t.BEACON_HTTPS_URL="https://otheve.beacon.qq.com/analytics/v2_upload",t.BEACON_DELAY_DEFAULT=3e3,t.BEACON_IS_REALTIME_KEY="A99",t.BEACON_LOG_ID_KEY="A100",t.BEACON_STORE_PREFIX="__BEACON_",t.BEACON_DEVICE_ID_KEY="__BEACON_deviceId",t.BEACON_LASE_REPORT_TIME_KEY="last_report_time",t.BEACON_DRIECT_LOG_ID_KEY="direct_log_id",t.BEACON_NORMAL_LOG_ID_KEY="normal_log_id",t.BEACON_SENDING_IDS_KEY="sending_event_ids",t.BEACON_CONFIG="beacon_config",t.BEACON_CONFIG_REQUEST_TIME="beacon_config_request_time",t.BEACON_CONFIG_HTTPS_URL="https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",t.BEACON_ATTA_ID="00400014144",t.BEACON_ATTA_TOKEN="6478159937",t.BEACON_ATTA_REQUEST_URL="https://h.trace.qq.com/kv"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventId=t.replaceSymbol=t.replace=t.assert=void 0;var i=n(0),o=n(9);function a(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(e){return""}}Object.defineProperty(t,"EventEmiter",{enumerable:!0,get:function(){return o.EventEmiter}}),t.assert=function(e,t){if(!e)throw t instanceof Error?t:new Error(t)},t.replace=function(e,t){for(var n={},i=0,o=Object.keys(e);i60*this.strategy.requestInterval*1e3},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e)},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]e.options.UploadQueueSize;){var n="waiting"===r[t].state||"checking"===r[t].state||"uploading"===r[t].state;r[t]&&n?t++:(s[r[t].id]&&delete s[r[t].id],r.splice(t,1),l--)}u()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;r[l]&&"waiting"!==r[l].state;)l++;if(!(l>=r.length)){var n=r[l];l++,c++,n.state="checking",n.params.onTaskStart&&n.params.onTaskStart(p(n)),!n.params.UploadData&&(n.params.UploadData={});var i=o.formatParams(n.api,n.params);a[n.api].call(e,i,(function(i,o){e._isRunningTask(n.id)&&("checking"!==n.state&&"uploading"!==n.state||(n.state=i?"error":"success",i&&(n.error=i),c--,u(),t(),n.callback&&n.callback(i,o),"success"===n.state&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)),d())})),u(),setTimeout(t)}}},m=function(t,n){var o=s[t];if(o){var a=o&&"waiting"===o.state,r=o&&("checking"===o.state||"uploading"===o.state);if("canceled"===n&&"canceled"!==o.state||"paused"===n&&a||"paused"===n&&r){if("paused"===n&&o.params.Body&&"function"==typeof o.params.Body.pipe)return;o.state=n,e.emit("inner-kill-task",{TaskId:t,toState:n});try{var l=o&&o.params&&o.params.UploadData.UploadId}catch(e){}"canceled"===n&&l&&i.removeUsing(l),u(),r&&(c--,f()),"canceled"===n&&(o.params&&(delete o.params.UploadData,delete o.params.Body,delete o.params),delete o.callback)}d()}};e._addTasks=function(t){o.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),u()},e._addTask=function(t,n,i,a){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||o.canFileSlice()||(t=c),n=o.formatParams(t,n);var l=o.uuid();n.TaskId=l,n.onTaskReady&&n.onTaskReady(l);var p={params:n,callback:i,api:t,index:r.length,id:l,Bucket:n.Bucket,Region:n.Region,Key:n.Key,FilePath:n.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null},m=n.onHashProgress;n.onHashProgress=function(t){e._isRunningTask(p.id)&&(p.hashPercent=t.percent,m&&m(t),u())};var h=n.onProgress;return n.onProgress=function(t){e._isRunningTask(p.id)&&("checking"===p.state&&(p.state="uploading"),p.loaded=t.loaded,p.size=t.total,p.speed=t.speed,p.percent=t.percent,h&&h(t),u())},o.getFileSize(t,n,(function(e,t){e?i(e):(s[l]=p,r.push(p),p.size=t,!a&&u(),f(),d())})),l},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return o.map(r,p)},e.cancelTask=function(e){m(e,"canceled")},e.pauseTask=function(e){m(e,"paused")},e.restartTask=function(e){var t=s[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",u(),l=Math.min(l,t.index),f())},e.isUploadRunning=function(){return c||l-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(a="{Bucket}."+a)),a=(a=a.replace(/\{\{AppId\}\}/gi,i).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,r).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,i).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,r).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(a)||(a="https://"+a),"/"===a.slice(-1)&&(a=a.slice(0,-1));var c=a;return e.ForcePathStyle&&(c+="/"+t),c+="/",s&&(c+=o.camSafeUrlEncode(s).replace(/%2F/g,"/")),e.isLocation&&(c=c.replace(/^https?:\/\//,"")),c}var l=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate,n=(e.Url||c({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region})).replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$").test(n)?n:""};function p(e,t){var n=o.clone(e.Headers),i="";o.each(n,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete n[t],"host"===t.toLowerCase()&&(i=e)}));var a=!1!==e.ForceSignHost;!i&&e.SignHost&&a&&(n.Host=e.SignHost);var r=!1,s=function(e,n){r||(r=!0,n&&n.XCosSecurityToken&&!n.SecurityToken&&((n=o.clone(n)).SecurityToken=n.XCosSecurityToken,delete n.XCosSecurityToken),t&&t(e,n))},c=this,l=e.Bucket||"",p=e.Region||"",u="name/cos:PostObject"!==e.Action&&e.Key?e.Key:"";c.options.ForcePathStyle&&l&&(u=l+"/"+u);var d="/"+u,f={},m=e.Scope;if(!m){var h=e.Action||"",g=e.ResourceKey||e.Key||"";m=e.Scope||[{action:h,bucket:l,region:p,prefix:g}]}var v=o.md5(JSON.stringify(m));c._StsCache=c._StsCache||[],function(){var e,t;for(e=c._StsCache.length-1;e>=0;e--){t=c._StsCache[e];var n=Math.round(o.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&n=t.ExpiredTime)c._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===v){f=t;break}}}();var y,x=function(){var t="";f.StartTime&&e.Expires?t=f.StartTime+";"+(f.StartTime+1*e.Expires):f.StartTime&&f.ExpiredTime&&(t=f.StartTime+";"+f.ExpiredTime);var i={Authorization:o.getAuth({SecretId:f.TmpSecretId,SecretKey:f.TmpSecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:a}),SecurityToken:f.SecurityToken||f.XCosSecurityToken||"",Token:f.Token||"",ClientIP:f.ClientIP||"",ClientUA:f.ClientUA||""};s(null,i)},b=function(e){if(e.Authorization){var t=!1,n=e.Authorization;if(n)if(n.indexOf(" ")>-1)t=!1;else if(n.indexOf("q-sign-algorithm=")>-1&&n.indexOf("q-ak=")>-1&&n.indexOf("q-sign-time=")>-1&&n.indexOf("q-key-time=")>-1&&n.indexOf("q-url-param-list=")>-1)t=!0;else try{(n=atob(n)).indexOf("a=")>-1&&n.indexOf("k=")>-1&&n.indexOf("t=")>-1&&n.indexOf("r=")>-1&&n.indexOf("b=")>-1&&(t=!0)}catch(e){}if(!t)return o.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return o.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return o.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return o.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return o.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return o.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return o.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(f.ExpiredTime&&f.ExpiredTime-o.getSkewTime(c.options.SystemClockOffset)/1e3>60)x();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:l,Region:p,Method:e.Method,Key:u,Pathname:d,Query:e.Query,Headers:n,Scope:m,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:a},(function(e){"string"==typeof e&&(e={Authorization:e});var t=b(e);if(t)return s(t);e.Authorization?s(null,e):((f=e||{}).Scope=m,f.ScopeKey=v,c._StsCache.push(f),x())}));else{if(!c.options.getSTS)return y={Authorization:o.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:a}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken},s(null,y),y;c.options.getSTS.call(c,{Bucket:l,Region:p},(function(e){(f=e||{}).Scope=m,f.ScopeKey=v,f.TmpSecretId||(f.TmpSecretId=f.SecretId),f.TmpSecretKey||(f.TmpSecretKey=f.SecretKey);var t=b(f);if(t)return s(t);c._StsCache.push(f),x()}))}return""}function u(e){var t=!1,n=!1,i=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var a=e.error.Code,r=e.error.Message;("RequestTimeTooSkewed"===a||"AccessDenied"===a&&"Request has expired"===r)&&(n=!0)}catch(e){}if(e)if(n&&i){var s=Date.parse(i);this.options.CorrectClockSkew&&Math.abs(o.getSkewTime(this.options.SystemClockOffset)-s)>=3e4&&(this.options.SystemClockOffset=s-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);return t}function d(e,t){var n=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=o.clearKey(e.qs),e.headers&&(e.headers=o.clearKey(e.headers)),e.qs&&(e.qs=o.clearKey(e.qs));var i=o.clone(e.qs);e.action&&(i[e.action]="");var a=e.url||e.Url,r=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:a}),s=e.tracker;!function o(a){var c=n.options.SystemClockOffset;s&&s.setParams({signStartTime:(new Date).getTime(),retryTimes:a-1}),p.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:i,Headers:e.headers,SignHost:r,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(i,r){i?t(i):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=r,f.call(n,e,(function(i,r){s&&s.setParams({httpEndTime:(new Date).getTime()}),i&&a<2&&(c!==n.options.SystemClockOffset||u.call(n,i))?(e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]),o(a+1)):t(i,r)})))}))}(1)}function f(e,t){var n=this,a=e.TaskId;if(!a||n._isRunningTask(a)){var r=e.Bucket,s=e.Region,l=e.Key,p=e.method||"GET",u=e.url||e.Url,d=e.body,f=e.json,m=e.rawBody,h=n.options.HttpDNSServiceId;n.options.UseAccelerate&&(s="accelerate"),u=u||c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:r,region:s,object:l}),e.action&&(u=u+"?"+e.action),e.qsStr&&(u=u.indexOf("?")>-1?u+"&"+e.qsStr:u+"?"+e.qsStr);var g={method:p,url:u,headers:e.headers,qs:e.qs,filePath:e.filePath,body:d,json:f,httpDNSServiceId:h},v="x-cos-security-token";o.isCIHost(u)&&(v="x-ci-security-token"),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.SecurityToken&&(g.headers[v]=e.AuthData.SecurityToken),g.headers&&(g.headers=o.clearKey(g.headers)),g=o.clearKey(g),e.onProgress&&"function"==typeof e.onProgress&&(g.onProgress=function(t){if(!a||n._isRunningTask(a)){var i=t?t.loaded:0;e.onProgress({loaded:i,total:t.total})}}),this.options.Timeout&&(g.timeout=this.options.Timeout),n.options.ForcePathStyle&&(g.pathStyle=n.options.ForcePathStyle),n.emit("before-send",g);var y=g.url.includes("accelerate."),x=g.qs?Object.keys(g.qs).map((function(e){return"".concat(e,"=").concat(g.qs[e])})).join("&"):"",b=x?g.url+"?"+x:g.url;e.tracker&&e.tracker.setParams({reqUrl:b,accelerate:y?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:b,accelerate:y?"Y":"N"});var k=i(g,(function(e,i,r){if("abort"!==e){var s,c=function(e,r){if(a&&n.off("inner-kill-task",C),!s){s=!0;var c={};i&&i.statusCode&&(c.statusCode=i.statusCode),i&&i.headers&&(c.headers=i.headers),e?(e=o.extend(e||{},c),t(e,null)):(r=o.extend(r||{},c),t(null,r)),k=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=r;else try{l=r&&r.indexOf("<")>-1&&r.indexOf(">")>-1&&o.xml2json(r)||{}}catch(e){l=r||{}}var p=i.statusCode;2===Math.floor(p/100)?l.Error?c({error:l.Error}):c(null,l):c({error:l.Error||l})}}})),C=function e(t){t.TaskId===a&&(k&&k.abort&&k.abort(),n.off("inner-kill-task",e))};a&&n.on("inner-kill-task",C)}}var m={getService:function(e,t){"function"==typeof e&&(t=e,e={});var n=this.options.ServiceDomain,i=e.Region;n?(n=n.replace(/\{\{Region\}\}/gi,i||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(n)||(n="https://"+n),"/"===n.slice(-1)&&(n=n.slice(0,-1))):n=i?"https://cos."+i+".myqcloud.com":"https://service.cos.myqcloud.com";n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),d.call(this,{Action:"name/cos:GetService",url:n,method:"GET",headers:e.Headers},(function(e,n){if(e)return t(e);var i=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Buckets&&n.ListAllMyBucketsResult.Buckets.Bucket||[];i=o.isArray(i)?i:[i];var a=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:i,Owner:a,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,i="";if(e.BucketAZConfig){var a={BucketAZConfig:e.BucketAZConfig};i=o.json2xml({CreateBucketConfiguration:a})}d.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:i},(function(i,o){if(i)return t(i);var a=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:a,statusCode:o.statusCode,headers:o.headers})}))},headBucket:function(e,t){d.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD"},(function(e,n){t(e,n)}))},getBucket:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n.marker=e.Marker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,d.call(this,{Action:"name/cos:GetBucket",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n},(function(e,n){if(e)return t(e);var i=n.ListBucketResult||{},a=i.Contents||[],r=i.CommonPrefixes||[];a=o.isArray(a)?a:[a],r=o.isArray(r)?r:[r];var s=o.clone(i);o.extend(s,{Contents:a,CommonPrefixes:r,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},deleteBucket:function(e,t){d.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=o.clone(e.AccessControlPolicy||{}),r=a.Grants||a.Grant;r=o.isArray(r)?r:[r],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),d.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:n,action:"acl",body:i},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketAcl:function(e,t){d.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl"},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},s=i.AccessControlList.Grant||[];s=o.isArray(s)?s:[s];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putBucketCors:function(e,t){var n=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];n=o.clone(o.isArray(n)?n:[n]),o.each(n,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[n],e[t]=o.isArray(i)?i:[i]}))}));var i={CORSRule:n};e.ResponseVary&&(i.ResponseVary=e.ResponseVary);var a=o.json2xml({CORSConfiguration:i}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"cors",headers:r},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketCors:function(e,t){d.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var i={CORSRules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.CORSConfiguration||{},r=a.CORSRules||a.CORSRule||[];r=o.clone(o.isArray(r)?r:[r]);var s=a.ResponseVary;o.each(r,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[t],e[n]=o.isArray(i)?i:[i]}))})),t(null,{CORSRules:r,ResponseVary:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketCors:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},getBucketLocation:function(e,t){d.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location"},(function(e,n){if(e)return t(e);t(null,n)}))},getBucketPolicy:function(e,t){d.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0},(function(e,n){if(e)return e.statusCode&&403===e.statusCode?t({ErrorStatus:"Access Denied"}):e.statusCode&&405===e.statusCode?t({ErrorStatus:"Method Not Allowed"}):e.statusCode&&404===e.statusCode?t({ErrorStatus:"Policy Not Found"}):t(e);var i={};try{i=JSON.parse(n.body)}catch(e){}t(null,{Policy:i,statusCode:n.statusCode,headers:n.headers})}))},putBucketPolicy:function(e,t){var n=e.Policy,i=n;try{"string"==typeof n?n=JSON.parse(i):i=JSON.stringify(n)}catch(e){t({error:"Policy format error"})}var a=e.Headers;a["Content-Type"]="application/json",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:i,headers:a,json:!0},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},deleteBucketPolicy:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},putBucketTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var a=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"tagging",headers:r},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketTagging:function(e,t){d.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketTagging:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLifecycle:function(e,t){var n=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];n=o.clone(n);var i=o.json2xml({LifecycleConfiguration:{Rule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"lifecycle",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLifecycle:function(e,t){d.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var i={Rules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=[];try{a=n.LifecycleConfiguration.Rule||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Rules:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketLifecycle:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var n=e.VersioningConfiguration||{},i=o.json2xml({VersioningConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"versioning",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param VersioningConfiguration"})},getBucketVersioning:function(e,t){d.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning"},(function(e,n){e||!n.VersioningConfiguration&&(n.VersioningConfiguration={}),t(e,n)}))},putBucketReplication:function(e,t){var n=o.clone(e.ReplicationConfiguration),i=o.json2xml({ReplicationConfiguration:n});i=(i=i.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"replication",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketReplication:function(e,t){d.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var i={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else e||!n.ReplicationConfiguration&&(n.ReplicationConfiguration={}),n.ReplicationConfiguration.Rule&&(n.ReplicationConfiguration.Rules=n.ReplicationConfiguration.Rule,delete n.ReplicationConfiguration.Rule),t(e,n)}))},deleteBucketReplication:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var n=o.clone(e.WebsiteConfiguration||{}),i=n.RoutingRules||n.RoutingRule||[];i=o.isArray(i)?i:[i],delete n.RoutingRule,delete n.RoutingRules,i.length&&(n.RoutingRules={RoutingRule:i});var a=o.json2xml({WebsiteConfiguration:n}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"website",headers:r},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param WebsiteConfiguration"})},getBucketWebsite:function(e,t){d.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.WebsiteConfiguration||{};if(a.RoutingRules){var r=o.clone(a.RoutingRules.RoutingRule||[]);r=o.makeArray(r),a.RoutingRules=r}t(null,{WebsiteConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketWebsite:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var n=o.clone(e.RefererConfiguration||{}),i=n.DomainList||{},a=i.Domains||i.Domain||[];(a=o.isArray(a)?a:[a]).length&&(n.DomainList={Domain:a});var r=o.json2xml({RefererConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(r)),d.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"referer",headers:s},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param RefererConfiguration"})},getBucketReferer:function(e,t){d.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.RefererConfiguration||{};if(a.DomainList){var r=o.makeArray(a.DomainList.Domain||[]);a.DomainList={Domains:r}}t(null,{RefererConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},putBucketDomain:function(e,t){var n=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];n=o.clone(n);var i=o.json2xml({DomainConfiguration:{DomainRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"domain",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketDomain:function(e,t){d.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,n){if(e)return t(e);var i=[];try{i=n.DomainConfiguration.DomainRule||[]}catch(e){}i=o.clone(o.isArray(i)?i:[i]),t(null,{DomainRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketDomain:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketOrigin:function(e,t){var n=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];n=o.clone(n);var i=o.json2xml({OriginConfiguration:{OriginRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"origin",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketOrigin:function(e,t){d.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,n){if(e)return t(e);var i=[];try{i=n.OriginConfiguration.OriginRule||[]}catch(e){}i=o.clone(o.isArray(i)?i:[i]),t(null,{OriginRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketOrigin:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLogging:function(e,t){var n=o.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=o.binaryBase64(o.md5(n)),d.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"logging",headers:i},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLogging:function(e,t){d.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},(function(e,n){if(e)return t(e);delete n.BucketLoggingStatus._xmlns,t(null,{BucketLoggingStatus:n.BucketLoggingStatus,statusCode:n.statusCode,headers:n.headers})}))},putBucketInventory:function(e,t){var n=o.clone(e.InventoryConfiguration);if(n.OptionalFields){var i=n.OptionalFields||[];n.OptionalFields={Field:i}}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var a=n.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSECOS")>-1&&(a["SSE-COS"]=a.SSECOS,delete a.SSECOS)}var r=o.json2xml({InventoryConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(r)),d.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"inventory",qs:{id:e.Id},headers:s},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketInventory:function(e,t){d.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},(function(e,n){if(e)return t(e);var i=n.InventoryConfiguration;if(i&&i.OptionalFields&&i.OptionalFields.Field){var a=i.OptionalFields.Field;o.isArray(a)||(a=[a]),i.OptionalFields=a}if(i.Destination&&i.Destination.COSBucketDestination&&i.Destination.COSBucketDestination.Encryption){var r=i.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}t(null,{InventoryConfiguration:i,statusCode:n.statusCode,headers:n.headers})}))},listBucketInventory:function(e,t){d.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken}},(function(e,n){if(e)return t(e);var i=n.ListInventoryConfigurationResult,a=i.InventoryConfiguration||[];a=o.isArray(a)?a:[a],delete i.InventoryConfiguration,o.each(a,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;o.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var n=e.Destination.COSBucketDestination.Encryption;Object.keys(n).indexOf("SSE-COS")>-1&&(n.SSECOS=n["SSE-COS"],delete n["SSE-COS"])}})),i.InventoryConfigurations=a,o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))},deleteBucketInventory:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var n={AccelerateConfiguration:e.AccelerateConfiguration||{}},i=o.json2xml(n),a={"Content-Type":"application/xml"};a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"accelerate",headers:a},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param AccelerateConfiguration"})},getBucketAccelerate:function(e,t){d.call(this,{Interface:"getBucketAccelerate",Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},(function(e,n){e||!n.AccelerateConfiguration&&(n.AccelerateConfiguration={}),t(e,n)}))},getObject:function(e,t){var n=e.Query||{},i=e.QueryString||"",a=e.tracker;a&&a.setParams({signStartTime:(new Date).getTime()}),n["response-content-type"]=e.ResponseContentType,n["response-content-language"]=e.ResponseContentLanguage,n["response-expires"]=e.ResponseExpires,n["response-cache-control"]=e.ResponseCacheControl,n["response-content-disposition"]=e.ResponseContentDisposition,n["response-content-encoding"]=e.ResponseContentEncoding,d.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,qs:n,qsStr:i,rawBody:!0,tracker:a},(function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(n)}t(null,{Body:i.body,ETag:o.attr(i.headers,"etag",""),statusCode:i.statusCode,headers:i.headers})}))},headObject:function(e,t){d.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},(function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0,statusCode:a}):t(n)}i.ETag=o.attr(i.headers,"etag",""),t(null,i)}))},listObjectVersions:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n["key-marker"]=e.KeyMarker,n["version-id-marker"]=e.VersionIdMarker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,d.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,action:"versions"},(function(e,n){if(e)return t(e);var i=n.ListVersionsResult||{},a=i.DeleteMarker||[];a=o.isArray(a)?a:[a];var r=i.Version||[];r=o.isArray(r)?r:[r];var s=o.clone(i);delete s.DeleteMarker,delete s.Version,o.extend(s,{DeleteMarkers:a,Versions:r,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},putObject:function(e,t){var n=this,i=e.ContentLength,r=o.throttleOnProgress.call(n,i,e.onProgress),s=e.Headers;s["Cache-Control"]||s["cache-control"]||(s["Cache-Control"]=""),s["Content-Type"]||s["content-type"]||(s["Content-Type"]=a.getType(e.Key)||"application/octet-stream");var l=e.UploadAddMetaMd5||n.options.UploadAddMetaMd5||n.options.UploadCheckContentMd5,p=e.tracker;l&&p&&p.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(l,e.Body,(function(a){a&&(p&&p.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(s["Content-MD5"]=o.binaryBase64(a)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=a)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),r(null,!0),d.call(n,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:r,tracker:p},(function(a,s){if(a)return r(null,!0),t(a);r({loaded:i,total:i},!0);var l=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:n.options.UseAccelerate?"accelerate":e.Region,object:e.Key});l=l.substr(l.indexOf("://")+3),s.Location=l,s.ETag=o.attr(s.headers,"etag",""),t(null,s)}))}))},postObject:function(e,t){var n=this,i={},a=e.FilePath;if(a){for(var r in i["Cache-Control"]=e.CacheControl,i["Content-Disposition"]=e.ContentDisposition,i["Content-Encoding"]=e.ContentEncoding,i["Content-MD5"]=e.ContentMD5,i["Content-Length"]=e.ContentLength,i["Content-Type"]=e.ContentType,i.Expect=e.Expect,i.Expires=e.Expires,i["x-cos-acl"]=e.ACL,i["x-cos-grant-read"]=e.GrantRead,i["x-cos-grant-write"]=e.GrantWrite,i["x-cos-grant-full-control"]=e.GrantFullControl,i["x-cos-storage-class"]=e.StorageClass,i["x-cos-mime-limit"]=e.MimeLimit,i["x-cos-traffic-limit"]=e.TrafficLimit,i["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,i["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,i["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,i["x-cos-server-side-encryption"]=e.ServerSideEncryption,i["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,i["x-cos-server-side-encryption-context"]=e.SSEContext,delete i["Content-Length"],delete i["content-length"],e)r.indexOf("x-cos-meta-")>-1&&(i[r]=e[r]);var s=o.throttleOnProgress.call(n,i["Content-Length"],e.onProgress);d.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:i,qs:e.Query,filePath:a,TaskId:e.TaskId,onProgress:s},(function(i,o){if(s(null,!0),i)return t(i);if(o&&o.headers){var r=o.headers,l=r.etag||r.Etag||r.ETag||"",p=a.substr(a.lastIndexOf("/")+1),u=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key.replace(/\$\{filename\}/g,p),isLocation:!0});return t(null,{Location:u,statusCode:o.statusCode,headers:r,ETag:l})}t(null,o)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){d.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId},(function(e,n){if(e){var i=e.statusCode;return i&&204===i?t(null,{statusCode:i}):i&&404===i?t(null,{BucketNotFound:!0,statusCode:i}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectAcl:function(e,t){d.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"acl"},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},s=i.AccessControlList&&i.AccessControlList.Grant||[];s=o.isArray(s)?s:[s];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=o.clone(e.AccessControlPolicy||{}),r=a.Grants||a.Grant;r=o.isArray(r)?r:[r],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),d.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:n,body:i},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},optionsObject:function(e,t){var n=e.Headers;n.Origin=e.Origin,n["Access-Control-Request-Method"]=e.AccessControlRequestMethod,n["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,d.call(this,{Action:"name/cos:OptionsObject",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 i=n.headers||{};t(null,{AccessControlAllowOrigin:i["access-control-allow-origin"],AccessControlAllowMethods:i["access-control-allow-methods"],AccessControlAllowHeaders:i["access-control-allow-headers"],AccessControlExposeHeaders:i["access-control-expose-headers"],AccessControlMaxAge:i["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})}))},putObjectCopy:function(e,t){var n=e.Headers;!n["Cache-Control"]&&n["cache-control"]&&(n["Cache-Control"]="");var i=(e.CopySource||"").match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(i){var a=i[1],r=i[3],s=decodeURIComponent(i[4]);d.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,region:r,prefix:s},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyObjectResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var n=e.Objects||[],i=e.Quiet;n=o.isArray(n)?n:[n];var a=o.json2xml({Delete:{Object:n,Quiet:i||!1}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a));var s=o.map(n,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));d.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:a,action:"delete",headers:r},(function(e,n){if(e)return t(e);var i=n.DeleteResult||{},a=i.Deleted||[],r=i.Error||[];a=o.isArray(a)?a:[a],r=o.isArray(r)?r:[r];var s=o.clone(i);o.extend(s,{Error:r,Deleted:a,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var i=e.RestoreRequest||{},a=o.json2xml({RestoreRequest:i});n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:a,action:"restore",headers:n},(function(e,n){t(e,n)}))}else t({error:"missing param RestoreRequest"})},putObjectTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var a=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:a,action:"tagging",headers:r,VersionId:e.VersionId},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectTagging:function(e,t){d.call(this,{Interface:"getObjectTagging",Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteObjectTagging:function(e,t){d.call(this,{Interface:"deleteObjectTagging",Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},appendObject:function(e,t){d.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers},(function(e,n){if(e)return t(e);t(null,n)}))},uploadPartCopy:function(e,t){var n=(e.CopySource||"").match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(n){var i=n[1],a=n[3],r=decodeURIComponent(n[4]);d.call(this,{Scope:[{action:"name/cos:GetObject",bucket:i,region:a,prefix:r},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyPartResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var n=e.Headers,i=e.tracker;n["Cache-Control"]||n["cache-control"]||(n["Cache-Control"]=""),n["Content-Type"]||n["content-type"]||(n["Content-Type"]=a.getType(e.Key)||"application/octet-stream"),d.call(this,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:i},(function(e,n){return e?(i&&i.parent&&i.parent.setParams({errorNode:"multipartInit"}),t(e)):(n=o.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,o.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)}))},multipartUpload:function(e,t){var n=this;o.getFileSize("multipartUpload",e,(function(){var i=e.tracker,a=n.options.UploadCheckContentMd5;a&&i&&i.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(a,e.Body,(function(r){r&&(e.Headers["Content-MD5"]=o.binaryBase64(r),a&&i&&i.setParams({md5EndTime:(new Date).getTime()})),i&&i.setParams({partNumber:e.PartNumber}),d.call(n,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null,tracker:i},(function(e,n){if(e)return i&&i.parent&&i.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:o.attr(n.headers,"etag",{}),statusCode:n.statusCode,headers:n.headers})}))}))}))},multipartComplete:function(e,t){for(var n=this,i=e.UploadId,a=e.Parts,r=e.tracker,s=0,l=a.length;s-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],n="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),i=new RegExp(t,"g");return e.replace(i,n)}(n.Authorization):"sign="+encodeURIComponent(n.Authorization)),n.SecurityToken&&(i+="&x-cos-security-token="+n.SecurityToken),n.ClientIP&&(i+="&clientIP="+n.ClientIP),n.ClientUA&&(i+="&clientUA="+n.ClientUA),n.Token&&(i+="&token="+n.Token),r&&(i+="&"+r),setTimeout((function(){t(null,{Url:i})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),r&&(s+="&"+r)):r&&(s+="?"+r),s},getAuth:function(e){return o.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,SystemClockOffset:this.options.SystemClockOffset})}};e.exports.init=function(e,t){t.transferToTaskMethod(m,"postObject"),t.transferToTaskMethod(m,"putObject"),o.each(m,(function(t,n){e.prototype[n]=o.apiWrapper(n,t)}))}},function(e,t){function n(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}var i=function(e,t){var i,o,a,r=[],s=function(e,t){var i=[];for(var o in e)e.hasOwnProperty(o)&&i.push(t?n(o).toLowerCase():o);return i.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(i=0;i-1||m.indexOf(h)>-1)&&(f[h]=e.headers[h]);a["x-cos-acl"]&&(f.acl=a["x-cos-acl"]),!f["Content-Type"]&&(f["Content-Type"]=""),(n=wx.uploadFile({url:r,method:s,name:"file",header:a,filePath:o,formData:f,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}})).onProgressUpdate((function(e){c&&c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend,progress:e.progress/100})}))}else{var g=e.qs&&i(e.qs)||"";g&&(r+=(r.indexOf("?")>-1?"&":"?")+g),a["Content-Length"]&&delete a["Content-Length"];var v={url:r,method:s,header:a,dataType:"text",data:e.body,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),n=wx.request(v)}return n}},function(e,t,n){"use strict";let i=n(27);e.exports=new i(n(28),n(29))},function(e,t,n){"use strict";function i(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;ev)return n(null,!1);if(i>1&&Math.max(t[0].Size,t[1].Size)!==g)return n(null,!1);!function o(a){if(a=r.length)k.emit("has_and_check_upload_id",t);else{var d=r[p];if(!s.isInArray(t,d))return o.removeUploadId(d),void a(p+1);o.using[d]?a(p+1):u.call(f,{Bucket:i,Region:c,Key:l,UploadId:d,tracker:e.tracker},(function(e,t){f._isRunningTask(n)&&(e?(o.removeUploadId(d),a(p+1)):k.emit("upload_id_available",{UploadId:d,PartList:t.PartList}))}))}}(0)}else k.emit("has_and_check_upload_id",t)})),k.on("get_remote_upload_id_list",(function(){p.call(f,{Bucket:i,Region:c,Key:l,tracker:e.tracker},(function(t,a){if(f._isRunningTask(n)){if(t)return k.emit("error",t);var r=s.filter(a.UploadList,(function(e){return e.Key===l&&(!d||e.StorageClass.toUpperCase()===d.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(r.length)k.emit("seek_local_avail_upload_id",r);else{var c,p=o.getFileId(e.FileStat,e.ChunkSize,i,l);p&&(c=o.getUploadIdList(p))&&s.each(c,(function(e){o.removeUploadId(e)})),k.emit("no_available_upload_id")}}}))})),k.emit("get_remote_upload_id_list")}function p(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartList(o,(function(n,a){if(n)return t(n);i.push.apply(i,a.Upload||[]),"true"===a.IsTruncated?(o.KeyMarker=a.NextKeyMarker,o.UploadIdMarker=a.NextUploadIdMarker,e()):t(null,{UploadList:i})}))}()}function u(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartListPart(o,(function(n,a){if(n)return t(n);i.push.apply(i,a.Part||[]),"true"===a.IsTruncated?(o.PartNumberMarker=a.NextPartNumberMarker,e()):t(null,{PartList:i})}))}()}function d(e,t){var n=this,i=e.TaskId,o=e.Bucket,r=e.Region,c=e.Key,l=e.UploadData,p=e.FileSize,u=e.SliceSize,d=Math.min(e.AsyncLimit||n.options.ChunkParallelLimit||1,256),m=e.FilePath,h=Math.ceil(p/u),g=0,v=e.ServerSideEncryption,y=s.filter(l.PartList,(function(e){return e.Uploaded&&(g+=e.PartNumber>=h&&p%u||u),!e.Uploaded})),x=e.onProgress;a.eachLimit(y,d,(function(t,a){if(n._isRunningTask(i)){var s=t.PartNumber,d=Math.min(p,t.PartNumber*u)-(t.PartNumber-1)*u,h=0;f.call(n,{TaskId:i,Bucket:o,Region:r,Key:c,SliceSize:u,FileSize:p,PartNumber:s,ServerSideEncryption:v,FilePath:m,UploadData:l,onProgress:function(e){g+=e.loaded-h,h=e.loaded,x({loaded:g,total:p})},tracker:e.tracker},(function(e,o){n._isRunningTask(i)&&(e?g-=h:(g+=d-h,t.ETag=o.ETag),x({loaded:g,total:p}),a(e||null,o))}))}}),(function(e){if(n._isRunningTask(i))return e?t(e):void t(null,{UploadId:l.UploadId,SliceList:l.PartList})}))}function f(e,t){var n=this,i=e.TaskId,o=e.Bucket,r=e.Region,c=e.Key,l=e.FileSize,p=e.FilePath,u=1*e.PartNumber,d=e.SliceSize,f=e.ServerSideEncryption,m=e.UploadData,h=n.options.ChunkRetryTimes+1,g=e.Headers||{},v=d*(u-1),y=d,x=v+d;x>l&&(y=(x=l)-v);var b=["x-cos-traffic-limit","x-cos-mime-limit"],k={};s.each(g,(function(e,t){b.indexOf(t)>-1&&(k[t]=e)})),s.fileSlice(p,v,x,(function(l){var p=s.getFileMd5(l),d=p?s.binaryBase64(p):null,g=m.PartList[u-1];a.retry(h,(function(t){n._isRunningTask(i)&&n.multipartUpload({TaskId:i,Bucket:o,Region:r,Key:c,ContentLength:y,PartNumber:u,UploadId:m.UploadId,ServerSideEncryption:f,Body:l,Headers:k,onProgress:e.onProgress,ContentMD5:d,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,o){if(n._isRunningTask(i))return e?t(e):(g.Uploaded=!0,t(null,o))}))}),(function(e,o){if(n._isRunningTask(i))return t(e,o)}))}))}function m(e,t){var n=e.Bucket,i=e.Region,o=e.Key,r=e.UploadId,s=e.SliceList,c=this,l=this.options.ChunkRetryTimes+1,p=s.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));a.retry(l,(function(t){c.multipartComplete({Bucket:n,Region:i,Key:o,UploadId:r,Parts:p,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,n){t(e,n)}))}function h(e,t){var n=e.Bucket,i=e.Region,o=e.Key,r=e.AbortArray,s=e.AsyncLimit||1,c=this,l=0,p=new Array(r.length);a.eachLimit(r,s,(function(t,a){var r=l;if(o&&o!==t.Key)return p[r]={error:{KeyNotMatch:!0}},void a(null);var s=t.UploadId||t.UploadID;c.multipartAbort({Bucket:n,Region:i,Key:t.Key,Headers:e.Headers,UploadId:s},(function(e){var o={Bucket:n,Region:i,Key:t.Key,UploadId:s};p[r]={error:e,task:o},a(null)})),l++}),(function(e){if(e)return t(e);for(var n=[],i=[],o=0,a=p.length;oo?"sliceUploadFile":f;a.push({api:m,params:e,callback:function(n,i){e.tracker&&e.tracker.formatResult(n,i),d&&d(n,i,l),t&&t(n,i)}}),n._addTasks(a)},uploadFiles:function(e,t){var n=this,o=void 0===e.SliceSize?n.options.SliceSize:e.SliceSize,a=0,r=0,l=s.throttleOnProgress.call(n,r,e.onProgress),p=e.files.length,u=e.onFileFinish,d=Array(p),f=function(e,n,i){l(null,!0),u&&u(e,n,i),d[i.Index]={options:i,error:e,data:n},--p<=0&&t&&t(null,{files:d})},m=[];s.each(e.files,(function(e,t){var p=e.FileSize,u={Index:t,TaskId:""};if(a+=p,n.options.EnableTracker){var d=n.options.UseAccelerate||n.options.Domain.includes("accelerate.");e.tracker=new c({bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:p,accelerate:d,deepTracker:n.options.DeepTracker,customId:n.options.CustomId,delay:n.options.TrackerDelay})}s.each(e,(function(e,t){"object"!==i(e)&&"function"!=typeof e&&(u[t]=e)}));var h=e.onTaskReady;e.onTaskReady=function(e){u.TaskId=e,h&&h(e)};var g=0,v=e.onProgress;e.onProgress=function(e){r=r-g+e.loaded,g=e.loaded,v&&v(e),l({loaded:r,total:a})};var y=e.onFileFinish,x="postObject"===n.options.SimpleUploadMethod?"postObject":"putObject",b=p>o?"sliceUploadFile":x;m.push({api:b,params:e,callback:function(t,n){e.tracker&&e.tracker.formatResult(t,n),y&&y(t,n),f&&f(t,n,u)}})})),n._addTasks(m)},sliceCopyFile:function(e,t){var n=new r,i=this,o=e.Bucket,c=e.Region,l=e.Key,p=e.CopySource,u=p.match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(u){var d=u[1],f=u[3],m=decodeURIComponent(u[4]),h=void 0===e.CopySliceSize?i.options.CopySliceSize:e.CopySliceSize;h=Math.max(0,h);var v,y,x=e.CopyChunkSize||this.options.CopyChunkSize,b=this.options.CopyChunkParallelLimit,k=0;n.on("copy_slice_complete",(function(e){i.multipartComplete({Bucket:o,Region:c,Key:l,UploadId:e.UploadId,Parts:e.PartList,calledBySdk:"sliceCopyFile"},(function(e,n){if(e)return y(null,!0),t(e);y({loaded:v,total:v},!0),t(null,n)}))})),n.on("get_copy_data_finish",(function(e){a.eachLimit(e.PartList,b,(function(t,n){var a=t.PartNumber,r=t.CopySourceRange,s=t.end-t.start,u=0;g.call(i,{Bucket:o,Region:c,Key:l,CopySource:p,UploadId:e.UploadId,PartNumber:a,CopySourceRange:r,onProgress:function(e){k+=e.loaded-u,u=e.loaded,y({loaded:k,total:v})}},(function(e,i){if(e)return n(e);y({loaded:k,total:v}),k+=s-u,t.ETag=i.ETag,n(e||null,i)}))}),(function(i){if(i)return y(null,!0),t(i);n.emit("copy_slice_complete",e)}))})),n.on("get_file_size_finish",(function(a){var r;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,o=0;on.length&&(c[t]=e)})),n.emit("get_file_size_finish",c)}else t({error:'get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.'})}))}else t({error:"CopySource format error"})}};e.exports.init=function(e,t){t.transferToTaskMethod(v,"sliceUploadFile"),s.each(v,(function(t,n){e.prototype[n]=s.apiWrapper(n,t)}))}},function(e,t){var n={eachLimit:function(e,t,n,i){if(i=i||function(){},!e.length||t<=0)return i();var o=0,a=0,r=0;!function s(){if(o>=e.length)return i();for(;r=e.length?i():s())}))}()},retry:function(e,t,n){e<1?n():function i(o){t((function(t,a){t&&o=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function o(e,t,n,i,o,a,r){try{var s=e[a](r),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var r=n(12),s=n(15),c=n(16),l=n(21),p=n(5).btoa,u=wx.getFileSystemManager(),d=n(6);function f(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function m(e,t){var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push(t?f(i).toLowerCase():i);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var h=["content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","response-cache-control","response-content-disposition","response-content-encoding","response-content-language","response-content-type","response-expires","transfer-encoding","versionid"],g=function(){},v=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]);return t};function y(e){return C(e,(function(e){return"object"===a(e)&&null!==e?y(e):e}))}function x(e,t){return k(t,(function(n,i){e[i]=t[i]})),e}function b(e){return e instanceof Array}function k(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function C(e,t){var n=b(e)?[]:{};for(var i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i));return n}var S=function(e,t){if(t=x({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var n=t.Headers||{};if(t&&"object"===a(t)){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(n[e]=t[e])}();R.each({"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext"},(function(e,i){void 0!==t[e]&&(n[i]=t[e])})),t.Headers=v(n)}}return t},_=function(e){return new Promise((function(t,n){u.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){n((null==e?void 0:e.errMsg)||"")}})}))},w=function(){var e,t=(e=i().mark((function e(t,n,o){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}o(),e.next=21;break;case 4:if("putObject"!==t){e.next=20;break}if(void 0!==n.Body||!n.FilePath){e.next=17;break}return e.prev=6,e.next=9,_(n.FilePath);case 9:n.Body=e.sent,e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(6),n.Body=void 0,o({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==n.Body?(n.ContentLength=n.Body.byteLength,o(null,n.ContentLength)):o({error:"missing param Body"}),e.next=21;break;case 20:n.FilePath?u.stat({path:n.FilePath,success:function(e){var t=e.stats;n.FileStat=t,n.FileStat.FilePath=n.FilePath;var i=t.isDirectory()?0:t.size;n.ContentLength=i=i||0,o(null,i)},fail:function(e){o(e)}}):o({error:"missing param FilePath"});case 21:case"end":return e.stop()}}),e,null,[[6,12]])})),function(){var t=this,n=arguments;return new Promise((function(i,a){var r=e.apply(t,n);function s(e){o(r,i,a,s,c,"next",e)}function c(e){o(r,i,a,s,c,"throw",e)}s(void 0)}))});return function(e,n,i){return t.apply(this,arguments)}}(),E=function(e){return Date.now()+(e||0)},T=function(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.lengtha)return 1;if(o=0;!t&&e.platform;return function(){return!1,t}}(),R={noop:g,formatParams:S,apiWrapper:function(e,n){return function(i,o){var a,r=this;if("function"==typeof i&&(o=i,i={}),i=S(e,i),r.options.EnableTracker)if("sliceUploadFile"===i.calledBySdk)a=i.tracker&&i.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))a=null;else{var s=-1;i.Body&&(s="string"==typeof i.Body?i.Body.length:i.Body.size||i.Body.byteLength||-1),a=new d({bucket:i.Bucket,region:i.Region,apiName:e,fileKey:i.Key,fileSize:s,deepTracker:r.options.DeepTracker,customId:r.options.CustomId,delay:r.options.TrackerDelay})}i.tracker=a;var c=function(e){return e&&e.headers&&(e.headers["x-cos-request-id"]&&(e.RequestId=e.headers["x-cos-request-id"]),e.headers["x-ci-request-id"]&&(e.RequestId=e.headers["x-ci-request-id"]),e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},l=function(e,t){a&&a.formatResult(e,t),o&&o(c(e),c(t))},p=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var n=t.Bucket,i=t.Region,o=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!n)return"Bucket";if(!i)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e){if(!n)return"Bucket";if(!i)return"Region";if(!o)return"Key"}return!1}(e,i);if(t)return"missing param "+t;if(i.Region){if(i.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(i.Region))return"Region format error.";!r.options.CompatibilityMode&&-1===i.Region.indexOf("-")&&"yfb"!==i.Region&&"default"!==i.Region&&i.Region}if(i.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(i.Bucket))if(i.AppId)i.Bucket=i.Bucket+"-"+i.AppId;else{if(!r.options.AppId)return'Bucket should format as "test-1250000000".';i.Bucket=i.Bucket+"-"+r.options.AppId}i.AppId&&delete i.AppId}i.Key&&"/"===i.Key.substr(0,1)&&(i.Key=i.Key.substr(1))}}(),u="getAuth"===e||"getObjectUrl"===e,f=t.Promise;if(!u&&f&&!o)return new f((function(e,t){if(o=function(n,i){n?t(n):e(i)},p)return l({error:p});n.call(r,i,l)}));if(p)return l({error:p});var m=n.call(r,i,l);return u?m:void 0}},xml2json:c,json2xml:l,md5:r,clearKey:v,fileSlice:function(e,t,n,i){e?u.readFile({filePath:e,position:t,length:n-t,success:function(e){i(e.data)},fail:function(){i(null)}}):i(null)},getBodyMd5:function(e,t,n){n=n||g,e&&t&&t instanceof ArrayBuffer?R.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=r(e);return t&&t(n),n},binaryBase64:function(e){var t,n,i,o="";for(t=0,n=e.length/2;t-1||h.indexOf(i)>-1)&&(t[n]=e[n])}return t}(y(e.Headers||e.headers||{})),l=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+l:0!==(t=e.Pathname||e.pathname||l).indexOf("/")&&(t="/"+t);var p=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&p&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),n&&i){var u=Math.round(E(e.SystemClockOffset)/1e3)-1,d=u,f=e.Expires||e.expires;d+=void 0===f?900:1*f||0;var g=n,v=o||u+";"+d,x=o||u+";"+d,b=m(c,!0).join(";").toLowerCase(),k=m(r,!0).join(";").toLowerCase(),C=s.HmacSHA1(x,i).toString(),S=[a,t,R.obj2str(r,!0),R.obj2str(c,!0),""].join("\n"),_=["sha1",v,s.SHA1(S).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+g,"q-sign-time="+v,"q-key-time="+x,"q-header-list="+b,"q-url-param-list="+k,"q-signature="+s.HmacSHA1(_,C).toString()].join("&")}},compareVersion:T,canFileSlice:A,isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},error:function(e,t){var n=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===a(t)&&null!==t&&(x(e,t),(t.code||t.name)&&(e.code=t.code||t.name),t.message&&(e.message=t.message),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.code||(e.code=e.name),e.error||(e.error=y(n)),e}};e.exports=R}).call(this,n(2))},function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var o=i({HTML:"text/html",isHTML:function(e){return e===o.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.freeze=i,t.MIME_TYPE=o,t.NAMESPACE=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var i=n(1).NAMESPACE;function o(e){return""!==e}function a(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function r(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(o):[]}(e);return Object.keys(t.reduce(a,{}))}function s(e,t){for(var n in e)t[n]=e[n]}function c(e,t){var n=e.prototype;if(!(n instanceof t)){function i(){}i.prototype=t.prototype,s(n,i=new i),e.prototype=n=i}n.constructor!=e&&(n.constructor=e)}var l={},p=l.ELEMENT_NODE=1,u=l.ATTRIBUTE_NODE=2,d=l.TEXT_NODE=3,f=l.CDATA_SECTION_NODE=4,m=l.ENTITY_REFERENCE_NODE=5,h=l.ENTITY_NODE=6,g=l.PROCESSING_INSTRUCTION_NODE=7,v=l.COMMENT_NODE=8,y=l.DOCUMENT_NODE=9,x=l.DOCUMENT_TYPE_NODE=10,b=l.DOCUMENT_FRAGMENT_NODE=11,k=l.NOTATION_NODE=12,C={},S={},_=(C.INDEX_SIZE_ERR=(S[1]="Index size error",1),C.DOMSTRING_SIZE_ERR=(S[2]="DOMString size error",2),C.HIERARCHY_REQUEST_ERR=(S[3]="Hierarchy request error",3)),w=(C.WRONG_DOCUMENT_ERR=(S[4]="Wrong document",4),C.INVALID_CHARACTER_ERR=(S[5]="Invalid character",5),C.NO_DATA_ALLOWED_ERR=(S[6]="No data allowed",6),C.NO_MODIFICATION_ALLOWED_ERR=(S[7]="No modification allowed",7),C.NOT_FOUND_ERR=(S[8]="Not found",8)),E=(C.NOT_SUPPORTED_ERR=(S[9]="Not supported",9),C.INUSE_ATTRIBUTE_ERR=(S[10]="Attribute in use",10));C.INVALID_STATE_ERR=(S[11]="Invalid state",11),C.SYNTAX_ERR=(S[12]="Syntax error",12),C.INVALID_MODIFICATION_ERR=(S[13]="Invalid modification",13),C.NAMESPACE_ERR=(S[14]="Invalid namespace",14),C.INVALID_ACCESS_ERR=(S[15]="Invalid access",15);function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,S[e]),this.message=S[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function A(){}function R(e,t){this._node=e,this._refresh=t,O(this)}function O(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);le(e,"length",n.length),s(n,e),e._inc=t}}function I(){}function B(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function N(e,t,n,o){if(o?t[B(t,o)]=n:t[t.length++]=n,e){n.ownerElement=e;var a=e.ownerDocument;a&&(o&&F(a,e,o),function(e,t,n){e&&e._inc++,n.namespaceURI===i.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(a,e,n))}}function P(e,t,n){var i=B(t,n);if(!(i>=0))throw T(w,new Error(e.tagName+"@"+n));for(var o=t.length-1;i"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0}while(e=e.nextSibling)}function U(){}function F(e,t,n,o){e&&e._inc++,n.namespaceURI===i.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function H(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var o=t.firstChild,a=0;o;)i[a++]=o,o=o.nextSibling;i.length=a,delete i[i.length]}}}function z(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function q(e,t,n){var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===b){var o=t.firstChild;if(null==o)return t;var a=t.lastChild}else o=a=t;var r=n?n.previousSibling:e.lastChild;o.previousSibling=r,a.nextSibling=n,r?r.nextSibling=o:e.firstChild=o,null==n?e.lastChild=a:n.previousSibling=a;do{o.parentNode=e}while(o!==a&&(o=o.nextSibling));return H(e.ownerDocument||e,e),t.nodeType==b&&(t.firstChild=t.lastChild=null),t}function K(){this._nsMap={}}function G(){}function V(){}function X(){}function W(){}function Y(){}function Q(){}function J(){}function $(){}function Z(){}function ee(){}function te(){}function ne(){}function ie(e,t){var n=[],i=9==this.nodeType&&this.documentElement||this,o=i.prefix,a=i.namespaceURI;if(a&&null==o&&null==(o=i.lookupPrefix(a)))var r=[{namespace:a,prefix:null}];return re(this,n,e,t,r),n.join("")}function oe(e,t,n){var o=e.prefix||"",a=e.namespaceURI;if(!a)return!1;if("xml"===o&&a===i.XML||a===i.XMLNS)return!1;for(var r=n.length;r--;){var s=n[r];if(s.prefix===o)return s.namespace!==a}return!0}function ae(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,M),'"')}function re(e,t,n,o,a){if(a||(a=[]),o){if(!(e=o(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var r=e.attributes,s=r.length,c=e.firstChild,l=e.tagName,h=l;if(!(n=i.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var k,C=0;C=0;S--){if(""===(_=a[S]).prefix&&_.namespace===e.namespaceURI){k=_.namespace;break}}if(k!==e.namespaceURI)for(S=a.length-1;S>=0;S--){var _;if((_=a[S]).namespace===e.namespaceURI){_.prefix&&(h=_.prefix+":"+l);break}}}t.push("<",h);for(var w=0;w"),n&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):re(c,t,n,o,a.slice()),c=c.nextSibling;else for(;c;)re(c,t,n,o,a.slice()),c=c.nextSibling;t.push("")}else t.push("/>");return;case y:case b:for(c=e.firstChild;c;)re(c,t,n,o,a.slice()),c=c.nextSibling;return;case u:return ae(t,e.name,e.value);case d:return t.push(e.data.replace(/[<&>]/g,M));case f:return t.push("");case v:return t.push("\x3c!--",e.data,"--\x3e");case x:var R=e.publicId,O=e.systemId;if(t.push("");else if(O&&"."!=O)t.push(" SYSTEM ",O,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case g:return t.push("");case m:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function se(e,t,n){var i;switch(t.nodeType){case p:(i=t.cloneNode(!1)).ownerDocument=e;case b:break;case u:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var o=t.firstChild;o;)i.appendChild(se(e,o,n)),o=o.nextSibling;return i}function ce(e,t,n){var i=new t.constructor;for(var o in t){var a=t[o];"object"!=typeof a&&a!=i[o]&&(i[o]=a)}switch(t.childNodes&&(i.childNodes=new A),i.ownerDocument=e,i.nodeType){case p:var r=t.attributes,s=i.attributes=new I,c=r.length;s._ownerElement=i;for(var l=0;l0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(n[i]==e)return i;t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==u?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},s(l,j),s(l,j.prototype),U.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==b){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return null==this.documentElement&&e.nodeType==p&&(this.documentElement=e),q(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),z(this,e)},importNode:function(e,t){return se(this,e,t)},getElementById:function(e){var t=null;return L(this.documentElement,(function(n){if(n.nodeType==p&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=r(e);return new R(this,(function(n){var i=[];return t.length>0&&L(n.documentElement,(function(o){if(o!==n&&o.nodeType===p){var a=o.getAttribute("class");if(a){var s=e===a;if(!s){var c=r(a);s=t.every((l=c,function(e){return l&&-1!==l.indexOf(e)}))}s&&i.push(o)}}var l})),i}))},createElement:function(e){var t=new K;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new A,(t.attributes=new I)._ownerElement=t,t},createDocumentFragment:function(){var e=new ee;return e.ownerDocument=this,e.childNodes=new A,e},createTextNode:function(e){var t=new X;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new W;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Y;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new te;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new G;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Z;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new K,i=t.split(":"),o=n.attributes=new I;return n.childNodes=new A,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,o._ownerElement=n,n},createAttributeNS:function(e,t){var n=new G,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},c(U,j),K.prototype={nodeType:p,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===b?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,H(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new R(this,(function(t){var n=[];return L(t,(function(i){i===t||i.nodeType!=p||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new R(this,(function(n){var i=[];return L(n,(function(o){o===n||o.nodeType!==p||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||i.push(o)})),i}))}},U.prototype.getElementsByTagName=K.prototype.getElementsByTagName,U.prototype.getElementsByTagNameNS=K.prototype.getElementsByTagNameNS,c(K,j),G.prototype.nodeType=u,c(G,j),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(S[_])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},c(V,j),X.prototype={nodeName:"#text",nodeType:d,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},c(X,V),W.prototype={nodeName:"#comment",nodeType:v},c(W,V),Y.prototype={nodeName:"#cdata-section",nodeType:f},c(Y,V),Q.prototype.nodeType=x,c(Q,j),J.prototype.nodeType=k,c(J,j),$.prototype.nodeType=h,c($,j),Z.prototype.nodeType=m,c(Z,j),ee.prototype.nodeName="#document-fragment",ee.prototype.nodeType=b,c(ee,j),te.prototype.nodeType=g,c(te,j),ne.prototype.serializeToString=function(e,t,n){return ie.call(e,t,n)},j.prototype.toString=ie;try{if(Object.defineProperty){function pe(e){switch(e.nodeType){case p:case b:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(pe(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(R.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(j.prototype,"textContent",{get:function(){return pe(this)},set:function(e){switch(this.nodeType){case p:case b:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),le=function(e,t,n){e["$$"+t]=n}}}catch(ue){}t.DocumentType=Q,t.DOMException=T,t.DOMImplementation=D,t.Element=K,t.Node=j,t.NodeList=A,t.XMLSerializer=ne},function(e,t){var n=function(e){var t=(e=e||{}).Base64,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=function(e){for(var t={},n=0,i=e.length;n>>6)+o(128|63&t):o(224|t>>>12&15)+o(128|t>>>6&63)+o(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return o(240|t>>>18&7)+o(128|t>>>12&63)+o(128|t>>>6&63)+o(128|63&t)},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(r,a)},c=function(e){var t=[0,2,1][e.length%3],i=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[n.charAt(i>>>18),n.charAt(i>>>12&63),t>=2?"=":n.charAt(i>>>6&63),t>=1?"=":n.charAt(63&i)].join("")},l=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,c)},p=function(e){return l(s(e))},u=function(e,t){return t?p(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):p(String(e))},d=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),f=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return o(55296+(t>>>10))+o(56320+(1023&t));case 3:return o((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return o((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},m=function(e){return e.replace(d,f)},h=function(e){var t=e.length,n=t%4,a=(t>0?i[e.charAt(0)]<<18:0)|(t>1?i[e.charAt(1)]<<12:0)|(t>2?i[e.charAt(2)]<<6:0)|(t>3?i[e.charAt(3)]:0),r=[o(a>>>16),o(a>>>8&255),o(255&a)];return r.length-=[0,0,2,1][n],r.join("")},g=e.atob?function(t){return e.atob(t)}:function(e){return e.replace(/[\s\S]{1,4}/g,h)},v=function(e){return m(g(e))},y=function(e){return v(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))};return{VERSION:"2.1.9",atob:g,btoa:l,fromBase64:y,toBase64:u,utob:s,encode:u,encodeURI:function(e){return u(e,!0)},btou:m,decode:y,noConflict:function(){var n=e.Base64;return e.Base64=t,n}}}();e.exports=n},function(e,t,n){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},r=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function p(e,t,n,i){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),r=new w(i||[]);return a._invoke=function(e,t,n){var i="suspendedStart";return function(o,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw a;return T()}for(n.method=o,n.arg=a;;){var r=n.delegate;if(r){var s=C(r,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}(e,n,r),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=p;var d={};function f(){}function m(){}function h(){}var g={};l(g,r,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(E([])));y&&y!==t&&n.call(y,r)&&(g=y);var x=h.prototype=f.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function o(a,r,s,c){var l=u(e[a],e,r);if("throw"!==l.type){var p=l.arg,d=p.value;return d&&"object"==i(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,s,c)}),(function(e){o("throw",e,s,c)})):t.resolve(d).then((function(e){p.value=e,s(p)}),(function(e){return o("throw",e,s,c)}))}c(l.arg)}var a;this._invoke=function(e,n){function i(){return new t((function(t,i){o(e,n,t,i)}))}return a=a?a.then(i,i):i()}}function C(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function t(){for(;++i=0;--o){var a=this.tryEntries[o],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function a(e,t,n,i,o,a,r){try{var s=e[a](r),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function r(e,t){for(var n=0;n=0;o--)t===i[o]&&i.splice(o,1)},e.emit=function(e,t){for(var i=n(e).map((function(e){return e})),o=0;o=0;n--){var o=i[n][2];(!o||o+2592e3=0;a--){var r=i[a];(r[0]===e&&r[1]===t||e!==r[0]&&0===r[0].indexOf(o))&&i.splice(a,1)}i.unshift([e,t,Math.round(Date.now()/1e3)]),i.length>n&&i.splice(n),l()}},removeUploadId:function(e){c(),delete p.using[e];for(var t=i.length-1;t>=0;t--)i[t][1]===e&&i.splice(t,1);l()}};e.exports=p},function(e,t,n){var i=n(11);e.exports=i},function(e,t,n){"use strict";var i=n(0),o=n(8),a=n(23),r=n(24),s=n(30),c=n(7),l={SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,UploadQueueSize:1e4,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,HttpDNSServiceId:"",SimpleUploadMethod:"postObject",EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:""},p=function(e){this.options=i.extend(i.clone(l),e||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1048576,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1048576,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.AppId,this.options.SecretId&&this.options.SecretId.indexOf(" "),this.options.SecretKey&&this.options.SecretKey.indexOf(" "),o.init(this),a.init(this)};r.init(p,a),s.init(p,a),p.util={md5:i.md5,xml2json:i.xml2json,json2xml:i.json2xml},p.getAuthorization=i.getAuth,p.version=c.version,e.exports=p},function(module,exports,__webpack_require__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===("undefined"==typeof window?"undefined":_typeof(window)),root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===("undefined"==typeof self?"undefined":_typeof(self)),NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"===(void 0===process?"undefined":_typeof(process))&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"===_typeof(module)&&module.exports,AMD=__webpack_require__(14),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===_typeof(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t){return new Md5(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.getCtx=e.create=function(){return new Md5},e.update=function(t){return e.create().update(t)};for(var t=0;t>2]|=e[a]<>6,c[o++]=128|63&i):i<55296||i>=57344?(c[o++]=224|i>>12,c[o++]=128|i>>6&63,c[o++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++a)),c[o++]=240|i>>18,c[o++]=128|i>>12&63,c[o++]=128|i>>6&63,c[o++]=128|63&i);else for(o=this.start;a>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[o>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=EXTRA[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,t,n,i,o,a,r=this.blocks;this.first?t=((t=((e=((e=r[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(i=((i=(-1732584194^2004318071&e)+r[1]-117830708)<<12|i>>>20)+e<<0)&(-271733879^e))+r[2]-1126478375)<<17|n>>>15)+i<<0)&(i^e))+r[3]-1316259209)<<22|t>>>10)+n<<0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((i=this.h3)^t&(n^i))+r[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[1]-389564586)<<12|i>>>20)+e<<0)&(e^t))+r[2]+606105819)<<17|n>>>15)+i<<0)&(i^e))+r[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(i^t&(n^i))+r[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[5]+1200080426)<<12|i>>>20)+e<<0)&(e^t))+r[6]-1473231341)<<17|n>>>15)+i<<0)&(i^e))+r[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(i^t&(n^i))+r[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[9]-1958414417)<<12|i>>>20)+e<<0)&(e^t))+r[10]-42063)<<17|n>>>15)+i<<0)&(i^e))+r[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(i^t&(n^i))+r[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(i=((i+=(n^e&(t^n))+r[13]-40341101)<<12|i>>>20)+e<<0)&(e^t))+r[14]-1502002290)<<17|n>>>15)+i<<0)&(i^e))+r[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[1]-165796510)<<5|e>>>27)+t<<0)^t))+r[6]-1069501632)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[11]+643717713)<<14|n>>>18)+i<<0)^i))+r[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[5]-701558691)<<5|e>>>27)+t<<0)^t))+r[10]+38016083)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[15]-660478335)<<14|n>>>18)+i<<0)^i))+r[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[9]+568446438)<<5|e>>>27)+t<<0)^t))+r[14]-1019803690)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[3]-187363961)<<14|n>>>18)+i<<0)^i))+r[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((i=((i+=(t^n&((e=((e+=(n^i&(t^n))+r[13]-1444681467)<<5|e>>>27)+t<<0)^t))+r[2]-51403784)<<9|i>>>23)+e<<0)^e&((n=((n+=(e^t&(i^e))+r[7]+1735328473)<<14|n>>>18)+i<<0)^i))+r[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[5]-378558)<<4|e>>>28)+t<<0))+r[8]-2022574463)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[11]+1839030562)<<16|n>>>16)+i<<0))+r[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[1]-1530992060)<<4|e>>>28)+t<<0))+r[4]+1272893353)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[7]-155497632)<<16|n>>>16)+i<<0))+r[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[13]+681279174)<<4|e>>>28)+t<<0))+r[0]-358537222)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[3]-722521979)<<16|n>>>16)+i<<0))+r[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((a=(i=((i+=((o=t^n)^(e=((e+=(o^i)+r[9]-640364487)<<4|e>>>28)+t<<0))+r[12]-421815835)<<11|i>>>21)+e<<0)^e)^(n=((n+=(a^t)+r[15]+530742520)<<16|n>>>16)+i<<0))+r[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[0]-198630844)<<6|e>>>26)+t<<0)|~n))+r[7]+1126891415)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[14]-1416354905)<<15|n>>>17)+i<<0)|~e))+r[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+r[3]-1894986606)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[10]-1051523)<<15|n>>>17)+i<<0)|~e))+r[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+r[15]-30611744)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[6]-1560198380)<<15|n>>>17)+i<<0)|~e))+r[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((i=((i+=(t^((e=((e+=(n^(t|~i))+r[4]-145523070)<<6|e>>>26)+t<<0)|~n))+r[11]-1120210379)<<10|i>>>22)+e<<0)^((n=((n+=(e^(i|~t))+r[2]+718787259)<<15|n>>>17)+i<<0)|~e))+r[9]-343485551)<<21|t>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=n-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,t,n,i="",o=this.array(),a=0;a<15;)e=o[a++],t=o[a++],n=o[a++],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|n>>>6)]+BASE64_ENCODE_CHAR[63&n];return e=o[a],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(13),__webpack_require__(2),__webpack_require__(3)(module))},function(e,t){var n,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:r}catch(e){i=r}}();var c,l=[],p=!1,u=-1;function d(){p&&c&&(p=!1,c.length?l=c.concat(l):u=-1,l.length&&f())}function f(){if(!p){var e=s(d);p=!0;for(var t=l.length;t;){for(c=l,l=[];++u1)for(var n=1;n>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i>>2]>>>24-i%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=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new r.init(n,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new r.init(n,t)}},p=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},u=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,o=e.min(4*t,o),t){for(var c=0;cl;l++){if(16>l)a[l]=0|e[t+l];else{var p=a[l-3]^a[l-8]^a[l-14]^a[l-16];a[l]=p<<1|p>>>31}p=(i<<5|i>>>27)+c+a[l],p=20>l?p+(1518500249+(o&r|~o&s)):40>l?p+(1859775393+(o^r^s)):60>l?p+((o&r|o&s|r&s)-1894007588):p+((o^r^s)-899497514),c=s,s=r,r=o<<30|o>>>2,o=i,i=p}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+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}}),n.SHA1=o._createHelper(r),n.HmacSHA1=o._createHmacHelper(r),function(){var e=l,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 i=e.blockSize,o=4*i;n.sigBytes>o&&(n=e.finalize(n)),n.clamp();for(var a=this._oKey=n.clone(),r=this._iKey=n.clone(),s=a.words,c=r.words,l=0;l>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,i=n.charAt(64);if(i){var o=e.indexOf(i);-1!=o&&(t=o)}for(var a=[],r=0,s=0;s>>6-s%4*2;a[r>>>2]|=(l|p)<<24-r%4*8,r++}return c.create(a,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=l},function(e,t,n){var i=n(17).DOMParser,o=function(e){"use strict";e=e||{},function(){void 0===e.escapeMode&&(e.escapeMode=!0);e.attributePrefix=e.attributePrefix||"_",e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0);e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0);void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0);e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1);e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1)}();var t=1,n=3,o=4,a=8,r=9;function s(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function c(e){return"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):e}function l(e,t,n,i){for(var o=0;o0&&l(e.arrayAccessFormPaths,t,n,i)&&(t[n]=[t[n]])}function u(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),i=t[5].split(".");if(n.setHours(t[3],t[4],i[0]),i.length>1&&n.setMilliseconds(i[1]),t[6]&&t[7]){var o=60*t[6]+Number(t[7]);o=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),n.setMinutes(n.getMinutes()-o-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function d(n,i,o,a){return!(i==t&&e.xmlElementsFilter.length>0)||l(e.xmlElementsFilter,n,o,a)}function f(i,c){if(i.nodeType==r){for(var m=new Object,h=i.childNodes,g=0;g0){var o=i.split(".#")[0];return l(e.datetimeAccessFormPaths,t,n,o)?u(t):t}return t}(m.__text,y,c+"."+y)),null!=m["#cdata-section"]&&(m.__cdata=m["#cdata-section"],delete m["#cdata-section"],"property"==e.arrayAccessForm&&delete m["#cdata-section_asArray"]),0==m.__cnt&&"text"==e.emptyNodeForm?m="":1==m.__cnt&&null!=m.__text?m=m.__text:1!=m.__cnt||null==m.__cdata||e.keepCData?m.__cnt>1&&null!=m.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==m.__text||""==m.__text.trim())&&delete m.__text:m=m.__cdata,delete m.__cnt,!e.enableToStringFunc||null==m.__text&&null==m.__cdata||(m.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),m}if(i.nodeType==n||i.nodeType==o)return i.nodeValue}function m(t,n,i,o){var a="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=i)for(var r=0;r":">"}function h(e,t){return""}function g(t,n){return"property"==e.arrayAccessForm&&(i=n.toString(),o="_asArray",-1!==i.indexOf(o,i.length-o.length))||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function;var i,o}function v(e){var t=0;if(e instanceof Object)for(var n in e)g(e,n)||t++;return t}function y(t,n,i){return 0==e.jsonPropertiesFilter.length||""==i||l(e.jsonPropertiesFilter,t,n,i)}function x(t){var n=[];if(t instanceof Object)for(var i in t)-1==i.toString().indexOf("__")&&0==i.toString().indexOf(e.attributePrefix)&&n.push(i);return n}function b(t){var n="";return t instanceof Object?n+=function(t){var n="";return null!=t.__cdata&&(n+=""),null!=t.__text&&(e.escapeMode?n+=c(t.__text):n+=t.__text),n}(t):null!=t&&(e.escapeMode?n+=c(t):n+=t),n}function k(e,t){return""===e?t:e+"."+t}function C(e,t,n,i){var o="";if(0==e.length)o+=m(e,t,n,!0);else for(var a=0;a0)for(var i in e)if(!g(e,i)&&(""==t||y(e,i,k(t,i)))){var o=e[i],a=x(o);if(null==o||null==o)n+=m(o,i,a,!0);else if(o instanceof Object)if(o instanceof Array)n+=C(o,i,a,t);else if(o instanceof Date)n+=m(o,i,a,!1),n+=o.toISOString(),n+=h(o,i);else{v(o)>0||null!=o.__text||null!=o.__cdata?(n+=m(o,i,a,!1),n+=S(o,k(t,i)),n+=h(o,i)):n+=m(o,i,a,!0)}else n+=m(o,i,a,!1),n+=b(o),n+=h(o,i)}return n+=b(e)}this.parseXmlString=function(e){var t;if(void 0===e)return null;if(i){var n=new i,o=null;try{o=n.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){o=null}try{t=n.parseFromString(e,"text/xml"),null!=o&&t.getElementsByTagNameNS(o,"parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?u(e):e},this.xml2json=function(e){return f(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return S(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}};e.exports=function(e){if(!e)return null;var t=(new i).parseFromString(e,"text/xml"),n=(new o).xml2json(t);return n.html&&n.getElementsByTagName("parsererror").length?null:n}},function(e,t,n){var i=n(4);t.DOMImplementation=i.DOMImplementation,t.XMLSerializer=i.XMLSerializer,t.DOMParser=n(18).DOMParser},function(e,t,n){var i=n(1),o=n(4),a=n(19),r=n(20),s=o.DOMImplementation,c=i.NAMESPACE,l=r.ParseError,p=r.XMLReader;function u(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function d(e){this.options=e||{locator:{}}}function f(){this.cdata=!1}function m(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function h(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function g(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}d.prototype.parseFromString=function(e,t){var n=this.options,i=new p,o=n.domBuilder||new f,r=n.errorHandler,s=n.locator,l=n.xmlns||{},d=/\/x?html?$/.test(t),m=d?a.HTML_ENTITIES:a.XML_ENTITIES;s&&o.setDocumentLocator(s),i.errorHandler=function(e,t,n){if(!e){if(t instanceof f)return t;e=t}var i={},o=e instanceof Function;function a(t){var a=e[t];!a&&o&&(a=2==e.length?function(n){e(t,n)}:e),i[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+function(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),i}(r,o,s),i.domBuilder=n.domBuilder||o,d&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var h=n.normalizeLineEndings||u;return e&&"string"==typeof e?i.parse(h(e),l,m):i.errorHandler.error("invalid doc source"),o.doc},f.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var o=this.doc,a=o.createElementNS(e,n||t),r=i.length;g(this,a),this.currentElement=a,this.locator&&m(this.locator,a);for(var s=0;s",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),t.entityMap=t.HTML_ENTITIES},function(e,t,n){var i=n(1).NAMESPACE,o=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,a=new RegExp("[\\-\\.0-9"+o.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),r=new RegExp("^"+o.source+a.source+"*(?::"+o.source+a.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function c(){}function l(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function p(e,t,n,o,a,r){function s(e,t,i){n.attributeNames.hasOwnProperty(e)&&r.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),i)}for(var c,l=++t,p=0;;){var u=e.charAt(l);switch(u){case"=":if(1===p)c=e.slice(t,l),p=3;else{if(2!==p)throw new Error("attribute equal must after attrName");p=3}break;case"'":case'"':if(3===p||1===p){if(1===p&&(r.warning('attribute value must after "="'),c=e.slice(t,l)),t=l+1,!((l=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");s(c,d=e.slice(t,l),t-1),p=5}else{if(4!=p)throw new Error('attribute value must after "="');s(c,d=e.slice(t,l),t),r.warning('attribute "'+c+'" missed start quot('+u+")!!"),t=l+1,p=5}break;case"/":switch(p){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:p=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return r.error("unexpected end of input"),0==p&&n.setTagName(e.slice(t,l)),l;case">":switch(p){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,l)).slice(-1)&&(n.closed=!0,d=d.slice(0,-1));case 2:2===p&&(d=c),4==p?(r.warning('attribute "'+d+'" missed quot(")!'),s(c,d,t)):(i.isHTML(o[""])&&d.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),s(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return l;case"€":u=" ";default:if(u<=" ")switch(p){case 0:n.setTagName(e.slice(t,l)),p=6;break;case 1:c=e.slice(t,l),p=2;break;case 4:var d=e.slice(t,l);r.warning('attribute "'+d+'" missed quot(")!!'),s(c,d,t);case 5:p=6}else switch(p){case 2:n.tagName;i.isHTML(o[""])&&c.match(/^(?:disabled|checked|selected)$/i)||r.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),s(c,c,t),t=l,p=1;break;case 5:r.warning('attribute space is required"'+c+'"!!');case 6:p=1,t=l;break;case 3:p=4,t=l;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function u(e,t,n){for(var o=e.tagName,a=null,r=e.length;r--;){var s=e[r],c=s.qName,l=s.value;if((f=c.indexOf(":"))>0)var p=s.prefix=c.slice(0,f),u=c.slice(f+1),d="xmlns"===p&&u;else u=c,p=null,d="xmlns"===c&&"";s.localName=u,!1!==d&&(null==a&&(a={},m(n,n={})),n[d]=a[d]=l,s.uri=i.XMLNS,t.startPrefixMapping(d,l))}for(r=e.length;r--;){(p=(s=e[r]).prefix)&&("xml"===p&&(s.uri=i.XML),"xmlns"!==p&&(s.uri=n[p||""]))}var f;(f=o.indexOf(":"))>0?(p=e.prefix=o.slice(0,f),u=e.localName=o.slice(f+1)):(p=null,u=e.localName=o);var h=e.uri=n[p||""];if(t.startElement(h,u,o,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(h,u,o),a)for(p in a)t.endPrefixMapping(p)}function d(e,t,n,i,o){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),r=e.substring(t+1,a);if(/[&<]/.test(r))return/^script$/i.test(n)?(o.characters(r,0,r.length),a):(r=r.replace(/&#?\w+;/g,i),o.characters(r,0,r.length),a)}return t+1}function f(e,t,n,i){var o=i[n];return null==o&&((o=e.lastIndexOf(""))t?(n.comment(e,t+4,o-t-4),o+3):(i.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,o-t-9),n.endCDATA(),o+3}var a=function(e,t){var n,i=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;n=o.exec(e);)if(i.push(n),n[1])return i}(e,t),r=a.length;if(r>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],c=!1,l=!1;r>3&&(/^public$/i.test(a[2][0])?(c=a[3][0],l=r>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var p=a[r-1];return n.startDTD(s,c,l),n.endDTD(),p.index+p[0].length}return-1}function g(e,t,n){var i=e.indexOf("?>",t);if(i){var o=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(o){o[0].length;return n.processingInstruction(o[1],o[2]),i+2}return-1}return-1}function v(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,c.prototype={parse:function(e,t,n){var o=this.domBuilder;o.startDocument(),m(t,t={}),function(e,t,n,o,a){function r(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function c(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?r(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function m(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,c);C&&y(w),o.characters(n,0,t-w),w=t}}function y(t,n){for(;t>=b&&(n=k.exec(e));)x=n.index,b=x+n[0].length,C.lineNumber++;C.columnNumber=t-x+1}var x=0,b=0,k=/.*(?:\r\n?|\n)|.*$/g,C=o.locator,S=[{currentNSMap:t}],_={},w=0;for(;;){try{var E=e.indexOf("<",w);if(E<0){if(!e.substr(w).match(/^\s*$/)){var T=o.doc,A=T.createTextNode(e.substr(w));T.appendChild(A),o.currentElement=A}return}switch(E>w&&m(E),e.charAt(E+1)){case"/":var R=e.indexOf(">",E+3),O=e.substring(E+2,R).replace(/[ \t\n\r]+$/g,""),I=S.pop();R<0?(O=e.substring(E+2).replace(/[\s<].*/,""),a.error("end tag name: "+O+" is not complete:"+I.tagName),R=E+1+O.length):O.match(/\sw?w=R:m(Math.max(E,w)+1)}}(e,t,n,o,this.errorHandler),o.endDocument()}},v.prototype={setTagName:function(e){if(!r.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!r.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=c,t.ParseError=s},function(e,t){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",o=new RegExp("^([^"+i+"])|^((x|X)(m|M)(l|L))|([^"+i+"-.0-9·̀-ͯ‿⁀])","g"),a=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,r=function(e){var t=[];if(e instanceof Object)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},s=function(e,t){var i=function(e,n,i,a,r){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(a).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(o,"_"));var l=[c,"<",e,i||""];return n&&n.length>0?(l.push(">"),l.push(n),r&&l.push(c),l.push("")):l.push("/>"),l.join("")};return function e(o,s,c){var l=n(o);switch((Array.isArray?Array.isArray(o):o instanceof Array)?l="array":o instanceof Date&&(l="date"),l){case"array":var p=[];return o.map((function(t){p.push(e(t,1,c+1))})),t.prettyPrint&&p.push("\n"),p.join("");case"date":return o.toJSON?o.toJSON():o+"";case"object":var u=[];for(var d in o)if(o.hasOwnProperty(d))if(o[d]instanceof Array)for(var f in o[d])o[d].hasOwnProperty(f)&&u.push(i(d,e(o[d][f],0,c+1),null,c+1,r(o[d][f]).length));else u.push(i(d,e(o[d],0,c+1),null,c+1));return t.prettyPrint&&u.length>0&&u.push("\n"),u.join("");case"function":return o();default:return t.escape?(""+o).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(a,""):""+o}}(e,0,0)},c=function(e){var t=['"),t.join("")};e.exports=function(e,t){if(t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" "}),"string"==typeof e)try{e=JSON.parse(e.toString())}catch(e){return!1}var i="",o="";return t&&("object"==n(t)?(t.xmlHeader&&(i=c(!!t.xmlHeader.standalone)),void 0!==t.docType&&(o="")):i=c()),[i,(t=t||{}).prettyPrint&&o?"\n":"",o,s(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t,n){(function(e){var n,i,o,a;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e) +/*! For license information please see beacon_mp.min.js.LICENSE.txt */}window,a=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BEACON_ATTA_REQUEST_URL=t.BEACON_ATTA_TOKEN=t.BEACON_ATTA_ID=t.BEACON_CONFIG_HTTPS_URL=t.BEACON_CONFIG_REQUEST_TIME=t.BEACON_CONFIG=t.BEACON_SENDING_IDS_KEY=t.BEACON_NORMAL_LOG_ID_KEY=t.BEACON_DRIECT_LOG_ID_KEY=t.BEACON_LASE_REPORT_TIME_KEY=t.BEACON_DEVICE_ID_KEY=t.BEACON_STORE_PREFIX=t.BEACON_LOG_ID_KEY=t.BEACON_IS_REALTIME_KEY=t.BEACON_DELAY_DEFAULT=t.BEACON_HTTPS_URL=t.BEACON_HTTP_URL=void 0,t.BEACON_HTTP_URL="http://oth.eve.mdt.qq.com:8080/analytics/v2_upload",t.BEACON_HTTPS_URL="https://otheve.beacon.qq.com/analytics/v2_upload",t.BEACON_DELAY_DEFAULT=3e3,t.BEACON_IS_REALTIME_KEY="A99",t.BEACON_LOG_ID_KEY="A100",t.BEACON_STORE_PREFIX="__BEACON_",t.BEACON_DEVICE_ID_KEY="__BEACON_deviceId",t.BEACON_LASE_REPORT_TIME_KEY="last_report_time",t.BEACON_DRIECT_LOG_ID_KEY="direct_log_id",t.BEACON_NORMAL_LOG_ID_KEY="normal_log_id",t.BEACON_SENDING_IDS_KEY="sending_event_ids",t.BEACON_CONFIG="beacon_config",t.BEACON_CONFIG_REQUEST_TIME="beacon_config_request_time",t.BEACON_CONFIG_HTTPS_URL="https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",t.BEACON_ATTA_ID="00400014144",t.BEACON_ATTA_TOKEN="6478159937",t.BEACON_ATTA_REQUEST_URL="https://h.trace.qq.com/kv"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventId=t.replaceSymbol=t.replace=t.assert=void 0;var i=n(0),o=n(9);function a(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(e){return""}}Object.defineProperty(t,"EventEmiter",{enumerable:!0,get:function(){return o.EventEmiter}}),t.assert=function(e,t){if(!e)throw t instanceof Error?t:new Error(t)},t.replace=function(e,t){for(var n={},i=0,o=Object.keys(e);i60*this.strategy.requestInterval*1e3},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e)},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]e.options.UploadQueueSize;){var n="waiting"===r[t].state||"checking"===r[t].state||"uploading"===r[t].state;r[t]&&n?t++:(s[r[t].id]&&delete s[r[t].id],r.splice(t,1),l--)}u()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;r[l]&&"waiting"!==r[l].state;)l++;if(!(l>=r.length)){var n=r[l];l++,c++,n.state="checking",n.params.onTaskStart&&n.params.onTaskStart(p(n)),!n.params.UploadData&&(n.params.UploadData={});var i=o.formatParams(n.api,n.params);a[n.api].call(e,i,(function(i,o){e._isRunningTask(n.id)&&("checking"!==n.state&&"uploading"!==n.state||(n.state=i?"error":"success",i&&(n.error=i),c--,u(),t(),n.callback&&n.callback(i,o),"success"===n.state&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)),d())})),u(),setTimeout(t)}}},m=function(t,n){var o=s[t];if(o){var a=o&&"waiting"===o.state,r=o&&("checking"===o.state||"uploading"===o.state);if("canceled"===n&&"canceled"!==o.state||"paused"===n&&a||"paused"===n&&r){if("paused"===n&&o.params.Body&&"function"==typeof o.params.Body.pipe)return;o.state=n,e.emit("inner-kill-task",{TaskId:t,toState:n});try{var l=o&&o.params&&o.params.UploadData.UploadId}catch(e){}"canceled"===n&&l&&i.removeUsing(l),u(),r&&(c--,f()),"canceled"===n&&(o.params&&(delete o.params.UploadData,delete o.params.Body,delete o.params),delete o.callback)}d()}};e._addTasks=function(t){o.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),u()},e._addTask=function(t,n,i,a){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||o.canFileSlice()||(t=c),n=o.formatParams(t,n);var l=o.uuid();n.TaskId=l,n.onTaskReady&&n.onTaskReady(l);var p={params:n,callback:i,api:t,index:r.length,id:l,Bucket:n.Bucket,Region:n.Region,Key:n.Key,FilePath:n.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null},m=n.onHashProgress;n.onHashProgress=function(t){e._isRunningTask(p.id)&&(p.hashPercent=t.percent,m&&m(t),u())};var h=n.onProgress;return n.onProgress=function(t){e._isRunningTask(p.id)&&("checking"===p.state&&(p.state="uploading"),p.loaded=t.loaded,p.size=t.total,p.speed=t.speed,p.percent=t.percent,h&&h(t),u())},o.getFileSize(t,n,(function(e,t){e?i(e):(s[l]=p,r.push(p),p.size=t,!a&&u(),f(),d())})),l},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return o.map(r,p)},e.cancelTask=function(e){m(e,"canceled")},e.pauseTask=function(e){m(e,"paused")},e.restartTask=function(e){var t=s[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",u(),l=Math.min(l,t.index),f())},e.isUploadRunning=function(){return c||l-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(a="{Bucket}."+a)),a=(a=a.replace(/\{\{AppId\}\}/gi,i).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,r).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,i).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,r).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(a)||(a="https://"+a),"/"===a.slice(-1)&&(a=a.slice(0,-1));var c=a;return e.ForcePathStyle&&(c+="/"+t),c+="/",s&&(c+=o.camSafeUrlEncode(s).replace(/%2F/g,"/")),e.isLocation&&(c=c.replace(/^https?:\/\//,"")),c}var l=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate,n=(e.Url||c({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region})).replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$").test(n)?n:""};function p(e,t){var n=o.clone(e.Headers),i="";o.each(n,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete n[t],"host"===t.toLowerCase()&&(i=e)}));var a=!1!==e.ForceSignHost;!i&&e.SignHost&&a&&(n.Host=e.SignHost);var r=!1,s=function(e,n){r||(r=!0,n&&n.XCosSecurityToken&&!n.SecurityToken&&((n=o.clone(n)).SecurityToken=n.XCosSecurityToken,delete n.XCosSecurityToken),t&&t(e,n))},c=this,l=e.Bucket||"",p=e.Region||"",u="name/cos:PostObject"!==e.Action&&e.Key?e.Key:"";c.options.ForcePathStyle&&l&&(u=l+"/"+u);var d="/"+u,f={},m=e.Scope;if(!m){var h=e.Action||"",g=e.ResourceKey||e.Key||"";m=e.Scope||[{action:h,bucket:l,region:p,prefix:g}]}var v=o.md5(JSON.stringify(m));c._StsCache=c._StsCache||[],function(){var e,t;for(e=c._StsCache.length-1;e>=0;e--){t=c._StsCache[e];var n=Math.round(o.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&n=t.ExpiredTime)c._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===v){f=t;break}}}();var y,x=function(){var t="";f.StartTime&&e.Expires?t=f.StartTime+";"+(f.StartTime+1*e.Expires):f.StartTime&&f.ExpiredTime&&(t=f.StartTime+";"+f.ExpiredTime);var i={Authorization:o.getAuth({SecretId:f.TmpSecretId,SecretKey:f.TmpSecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:a}),SecurityToken:f.SecurityToken||f.XCosSecurityToken||"",Token:f.Token||"",ClientIP:f.ClientIP||"",ClientUA:f.ClientUA||""};s(null,i)},b=function(e){if(e.Authorization){var t=!1,n=e.Authorization;if(n)if(n.indexOf(" ")>-1)t=!1;else if(n.indexOf("q-sign-algorithm=")>-1&&n.indexOf("q-ak=")>-1&&n.indexOf("q-sign-time=")>-1&&n.indexOf("q-key-time=")>-1&&n.indexOf("q-url-param-list=")>-1)t=!0;else try{(n=atob(n)).indexOf("a=")>-1&&n.indexOf("k=")>-1&&n.indexOf("t=")>-1&&n.indexOf("r=")>-1&&n.indexOf("b=")>-1&&(t=!0)}catch(e){}if(!t)return o.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return o.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return o.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return o.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return o.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return o.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return o.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(f.ExpiredTime&&f.ExpiredTime-o.getSkewTime(c.options.SystemClockOffset)/1e3>60)x();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:l,Region:p,Method:e.Method,Key:u,Pathname:d,Query:e.Query,Headers:n,Scope:m,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:a},(function(e){"string"==typeof e&&(e={Authorization:e});var t=b(e);if(t)return s(t);e.Authorization?s(null,e):((f=e||{}).Scope=m,f.ScopeKey=v,c._StsCache.push(f),x())}));else{if(!c.options.getSTS)return y={Authorization:o.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:a}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken},s(null,y),y;c.options.getSTS.call(c,{Bucket:l,Region:p},(function(e){(f=e||{}).Scope=m,f.ScopeKey=v,f.TmpSecretId||(f.TmpSecretId=f.SecretId),f.TmpSecretKey||(f.TmpSecretKey=f.SecretKey);var t=b(f);if(t)return s(t);c._StsCache.push(f),x()}))}return""}function u(e){var t=!1,n=!1,i=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var a=e.error.Code,r=e.error.Message;("RequestTimeTooSkewed"===a||"AccessDenied"===a&&"Request has expired"===r)&&(n=!0)}catch(e){}if(e)if(n&&i){var s=Date.parse(i);this.options.CorrectClockSkew&&Math.abs(o.getSkewTime(this.options.SystemClockOffset)-s)>=3e4&&(this.options.SystemClockOffset=s-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);return t}function d(e,t){var n=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=o.clearKey(e.qs),e.headers&&(e.headers=o.clearKey(e.headers)),e.qs&&(e.qs=o.clearKey(e.qs));var i=o.clone(e.qs);e.action&&(i[e.action]="");var a=e.url||e.Url,r=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:a}),s=e.tracker;!function o(a){var c=n.options.SystemClockOffset;s&&s.setParams({signStartTime:(new Date).getTime(),retryTimes:a-1}),p.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:i,Headers:e.headers,SignHost:r,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(i,r){i?t(i):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=r,f.call(n,e,(function(i,r){s&&s.setParams({httpEndTime:(new Date).getTime()}),i&&a<2&&(c!==n.options.SystemClockOffset||u.call(n,i))?(e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]),o(a+1)):t(i,r)})))}))}(1)}function f(e,t){var n=this,a=e.TaskId;if(!a||n._isRunningTask(a)){var r=e.Bucket,s=e.Region,l=e.Key,p=e.method||"GET",u=e.url||e.Url,d=e.body,f=e.json,m=e.rawBody,h=n.options.HttpDNSServiceId;n.options.UseAccelerate&&(s="accelerate"),u=u||c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:r,region:s,object:l}),e.action&&(u=u+"?"+e.action),e.qsStr&&(u=u.indexOf("?")>-1?u+"&"+e.qsStr:u+"?"+e.qsStr);var g={method:p,url:u,headers:e.headers,qs:e.qs,filePath:e.filePath,body:d,json:f,httpDNSServiceId:h},v="x-cos-security-token";o.isCIHost(u)&&(v="x-ci-security-token"),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.SecurityToken&&(g.headers[v]=e.AuthData.SecurityToken),g.headers&&(g.headers=o.clearKey(g.headers)),g=o.clearKey(g),e.onProgress&&"function"==typeof e.onProgress&&(g.onProgress=function(t){if(!a||n._isRunningTask(a)){var i=t?t.loaded:0;e.onProgress({loaded:i,total:t.total})}}),this.options.Timeout&&(g.timeout=this.options.Timeout),n.options.ForcePathStyle&&(g.pathStyle=n.options.ForcePathStyle),n.emit("before-send",g);var y=g.url.includes("accelerate."),x=g.qs?Object.keys(g.qs).map((function(e){return"".concat(e,"=").concat(g.qs[e])})).join("&"):"",b=x?g.url+"?"+x:g.url;e.tracker&&e.tracker.setParams({reqUrl:b,accelerate:y?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:b,accelerate:y?"Y":"N"});var k=i(g,(function(e,i,r){if("abort"!==e){var s,c=function(e,r){if(a&&n.off("inner-kill-task",C),!s){s=!0;var c={};i&&i.statusCode&&(c.statusCode=i.statusCode),i&&i.headers&&(c.headers=i.headers),e?(e=o.extend(e||{},c),t(e,null)):(r=o.extend(r||{},c),t(null,r)),k=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=r;else try{l=r&&r.indexOf("<")>-1&&r.indexOf(">")>-1&&o.xml2json(r)||{}}catch(e){l=r||{}}var p=i.statusCode;2===Math.floor(p/100)?l.Error?c({error:l.Error}):c(null,l):c({error:l.Error||l})}}})),C=function e(t){t.TaskId===a&&(k&&k.abort&&k.abort(),n.off("inner-kill-task",e))};a&&n.on("inner-kill-task",C)}}var m={getService:function(e,t){"function"==typeof e&&(t=e,e={});var n=this.options.ServiceDomain,i=e.Region;n?(n=n.replace(/\{\{Region\}\}/gi,i||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(n)||(n="https://"+n),"/"===n.slice(-1)&&(n=n.slice(0,-1))):n=i?"https://cos."+i+".myqcloud.com":"https://service.cos.myqcloud.com";n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),d.call(this,{Action:"name/cos:GetService",url:n,method:"GET",headers:e.Headers},(function(e,n){if(e)return t(e);var i=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Buckets&&n.ListAllMyBucketsResult.Buckets.Bucket||[];i=o.isArray(i)?i:[i];var a=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:i,Owner:a,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,i="";if(e.BucketAZConfig){var a={BucketAZConfig:e.BucketAZConfig};i=o.json2xml({CreateBucketConfiguration:a})}d.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:i},(function(i,o){if(i)return t(i);var a=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:a,statusCode:o.statusCode,headers:o.headers})}))},headBucket:function(e,t){d.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD"},(function(e,n){t(e,n)}))},getBucket:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n.marker=e.Marker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,d.call(this,{Action:"name/cos:GetBucket",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n},(function(e,n){if(e)return t(e);var i=n.ListBucketResult||{},a=i.Contents||[],r=i.CommonPrefixes||[];a=o.isArray(a)?a:[a],r=o.isArray(r)?r:[r];var s=o.clone(i);o.extend(s,{Contents:a,CommonPrefixes:r,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},deleteBucket:function(e,t){d.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=o.clone(e.AccessControlPolicy||{}),r=a.Grants||a.Grant;r=o.isArray(r)?r:[r],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),d.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:n,action:"acl",body:i},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketAcl:function(e,t){d.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl"},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},s=i.AccessControlList.Grant||[];s=o.isArray(s)?s:[s];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putBucketCors:function(e,t){var n=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];n=o.clone(o.isArray(n)?n:[n]),o.each(n,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[n],e[t]=o.isArray(i)?i:[i]}))}));var i={CORSRule:n};e.ResponseVary&&(i.ResponseVary=e.ResponseVary);var a=o.json2xml({CORSConfiguration:i}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"cors",headers:r},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketCors:function(e,t){d.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var i={CORSRules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.CORSConfiguration||{},r=a.CORSRules||a.CORSRule||[];r=o.clone(o.isArray(r)?r:[r]);var s=a.ResponseVary;o.each(r,(function(e){o.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[t],e[n]=o.isArray(i)?i:[i]}))})),t(null,{CORSRules:r,ResponseVary:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketCors:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},getBucketLocation:function(e,t){d.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location"},(function(e,n){if(e)return t(e);t(null,n)}))},getBucketPolicy:function(e,t){d.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0},(function(e,n){if(e)return e.statusCode&&403===e.statusCode?t({ErrorStatus:"Access Denied"}):e.statusCode&&405===e.statusCode?t({ErrorStatus:"Method Not Allowed"}):e.statusCode&&404===e.statusCode?t({ErrorStatus:"Policy Not Found"}):t(e);var i={};try{i=JSON.parse(n.body)}catch(e){}t(null,{Policy:i,statusCode:n.statusCode,headers:n.headers})}))},putBucketPolicy:function(e,t){var n=e.Policy,i=n;try{"string"==typeof n?n=JSON.parse(i):i=JSON.stringify(n)}catch(e){t({error:"Policy format error"})}var a=e.Headers;a["Content-Type"]="application/json",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:i,headers:a,json:!0},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},deleteBucketPolicy:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})}))},putBucketTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var a=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"tagging",headers:r},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketTagging:function(e,t){d.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketTagging:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLifecycle:function(e,t){var n=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];n=o.clone(n);var i=o.json2xml({LifecycleConfiguration:{Rule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"lifecycle",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLifecycle:function(e,t){d.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var i={Rules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=[];try{a=n.LifecycleConfiguration.Rule||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Rules:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketLifecycle:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var n=e.VersioningConfiguration||{},i=o.json2xml({VersioningConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"versioning",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param VersioningConfiguration"})},getBucketVersioning:function(e,t){d.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning"},(function(e,n){e||!n.VersioningConfiguration&&(n.VersioningConfiguration={}),t(e,n)}))},putBucketReplication:function(e,t){var n=o.clone(e.ReplicationConfiguration),i=o.json2xml({ReplicationConfiguration:n});i=(i=i.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"replication",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketReplication:function(e,t){d.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var i={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else e||!n.ReplicationConfiguration&&(n.ReplicationConfiguration={}),n.ReplicationConfiguration.Rule&&(n.ReplicationConfiguration.Rules=n.ReplicationConfiguration.Rule,delete n.ReplicationConfiguration.Rule),t(e,n)}))},deleteBucketReplication:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var n=o.clone(e.WebsiteConfiguration||{}),i=n.RoutingRules||n.RoutingRule||[];i=o.isArray(i)?i:[i],delete n.RoutingRule,delete n.RoutingRules,i.length&&(n.RoutingRules={RoutingRule:i});var a=o.json2xml({WebsiteConfiguration:n}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"website",headers:r},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param WebsiteConfiguration"})},getBucketWebsite:function(e,t){d.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.WebsiteConfiguration||{};if(a.RoutingRules){var r=o.clone(a.RoutingRules.RoutingRule||[]);r=o.makeArray(r),a.RoutingRules=r}t(null,{WebsiteConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketWebsite:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var n=o.clone(e.RefererConfiguration||{}),i=n.DomainList||{},a=i.Domains||i.Domain||[];(a=o.isArray(a)?a:[a]).length&&(n.DomainList={Domain:a});var r=o.json2xml({RefererConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(r)),d.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"referer",headers:s},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param RefererConfiguration"})},getBucketReferer:function(e,t){d.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},(function(e,n){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.RefererConfiguration||{};if(a.DomainList){var r=o.makeArray(a.DomainList.Domain||[]);a.DomainList={Domains:r}}t(null,{RefererConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},putBucketDomain:function(e,t){var n=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];n=o.clone(n);var i=o.json2xml({DomainConfiguration:{DomainRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"domain",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketDomain:function(e,t){d.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,n){if(e)return t(e);var i=[];try{i=n.DomainConfiguration.DomainRule||[]}catch(e){}i=o.clone(o.isArray(i)?i:[i]),t(null,{DomainRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketDomain:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketOrigin:function(e,t){var n=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];n=o.clone(n);var i=o.json2xml({OriginConfiguration:{OriginRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"origin",headers:a},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketOrigin:function(e,t){d.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,n){if(e)return t(e);var i=[];try{i=n.OriginConfiguration.OriginRule||[]}catch(e){}i=o.clone(o.isArray(i)?i:[i]),t(null,{OriginRule:i,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketOrigin:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketLogging:function(e,t){var n=o.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=o.binaryBase64(o.md5(n)),d.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"logging",headers:i},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketLogging:function(e,t){d.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},(function(e,n){if(e)return t(e);delete n.BucketLoggingStatus._xmlns,t(null,{BucketLoggingStatus:n.BucketLoggingStatus,statusCode:n.statusCode,headers:n.headers})}))},putBucketInventory:function(e,t){var n=o.clone(e.InventoryConfiguration);if(n.OptionalFields){var i=n.OptionalFields||[];n.OptionalFields={Field:i}}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var a=n.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSECOS")>-1&&(a["SSE-COS"]=a.SSECOS,delete a.SSECOS)}var r=o.json2xml({InventoryConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=o.binaryBase64(o.md5(r)),d.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"inventory",qs:{id:e.Id},headers:s},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketInventory:function(e,t){d.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},(function(e,n){if(e)return t(e);var i=n.InventoryConfiguration;if(i&&i.OptionalFields&&i.OptionalFields.Field){var a=i.OptionalFields.Field;o.isArray(a)||(a=[a]),i.OptionalFields=a}if(i.Destination&&i.Destination.COSBucketDestination&&i.Destination.COSBucketDestination.Encryption){var r=i.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}t(null,{InventoryConfiguration:i,statusCode:n.statusCode,headers:n.headers})}))},listBucketInventory:function(e,t){d.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken}},(function(e,n){if(e)return t(e);var i=n.ListInventoryConfigurationResult,a=i.InventoryConfiguration||[];a=o.isArray(a)?a:[a],delete i.InventoryConfiguration,o.each(a,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;o.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var n=e.Destination.COSBucketDestination.Encryption;Object.keys(n).indexOf("SSE-COS")>-1&&(n.SSECOS=n["SSE-COS"],delete n["SSE-COS"])}})),i.InventoryConfigurations=a,o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))},deleteBucketInventory:function(e,t){d.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var n={AccelerateConfiguration:e.AccelerateConfiguration||{}},i=o.json2xml(n),a={"Content-Type":"application/xml"};a["Content-MD5"]=o.binaryBase64(o.md5(i)),d.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"accelerate",headers:a},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))}else t({error:"missing param AccelerateConfiguration"})},getBucketAccelerate:function(e,t){d.call(this,{Interface:"getBucketAccelerate",Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},(function(e,n){e||!n.AccelerateConfiguration&&(n.AccelerateConfiguration={}),t(e,n)}))},getObject:function(e,t){var n=e.Query||{},i=e.QueryString||"",a=e.tracker;a&&a.setParams({signStartTime:(new Date).getTime()}),n["response-content-type"]=e.ResponseContentType,n["response-content-language"]=e.ResponseContentLanguage,n["response-expires"]=e.ResponseExpires,n["response-cache-control"]=e.ResponseCacheControl,n["response-content-disposition"]=e.ResponseContentDisposition,n["response-content-encoding"]=e.ResponseContentEncoding,d.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,qs:n,qsStr:i,rawBody:!0,tracker:a},(function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(n)}t(null,{Body:i.body,ETag:o.attr(i.headers,"etag",""),statusCode:i.statusCode,headers:i.headers})}))},headObject:function(e,t){d.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},(function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0,statusCode:a}):t(n)}i.ETag=o.attr(i.headers,"etag",""),t(null,i)}))},listObjectVersions:function(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n["key-marker"]=e.KeyMarker,n["version-id-marker"]=e.VersionIdMarker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,d.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,action:"versions"},(function(e,n){if(e)return t(e);var i=n.ListVersionsResult||{},a=i.DeleteMarker||[];a=o.isArray(a)?a:[a];var r=i.Version||[];r=o.isArray(r)?r:[r];var s=o.clone(i);delete s.DeleteMarker,delete s.Version,o.extend(s,{DeleteMarkers:a,Versions:r,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},putObject:function(e,t){var n=this,i=e.ContentLength,r=o.throttleOnProgress.call(n,i,e.onProgress),s=e.Headers;s["Cache-Control"]||s["cache-control"]||(s["Cache-Control"]=""),s["Content-Type"]||s["content-type"]||(s["Content-Type"]=a.getType(e.Key)||"application/octet-stream");var l=e.UploadAddMetaMd5||n.options.UploadAddMetaMd5||n.options.UploadCheckContentMd5,p=e.tracker;l&&p&&p.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(l,e.Body,(function(a){a&&(p&&p.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(s["Content-MD5"]=o.binaryBase64(a)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=a)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),r(null,!0),d.call(n,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:r,tracker:p},(function(a,s){if(a)return r(null,!0),t(a);r({loaded:i,total:i},!0);var l=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:n.options.UseAccelerate?"accelerate":e.Region,object:e.Key});l=l.substr(l.indexOf("://")+3),s.Location=l,s.ETag=o.attr(s.headers,"etag",""),t(null,s)}))}))},postObject:function(e,t){var n=this,i={},a=e.FilePath;if(a){for(var r in i["Cache-Control"]=e.CacheControl,i["Content-Disposition"]=e.ContentDisposition,i["Content-Encoding"]=e.ContentEncoding,i["Content-MD5"]=e.ContentMD5,i["Content-Length"]=e.ContentLength,i["Content-Type"]=e.ContentType,i.Expect=e.Expect,i.Expires=e.Expires,i["x-cos-acl"]=e.ACL,i["x-cos-grant-read"]=e.GrantRead,i["x-cos-grant-write"]=e.GrantWrite,i["x-cos-grant-full-control"]=e.GrantFullControl,i["x-cos-storage-class"]=e.StorageClass,i["x-cos-mime-limit"]=e.MimeLimit,i["x-cos-traffic-limit"]=e.TrafficLimit,i["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,i["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,i["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,i["x-cos-server-side-encryption"]=e.ServerSideEncryption,i["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,i["x-cos-server-side-encryption-context"]=e.SSEContext,delete i["Content-Length"],delete i["content-length"],e)r.indexOf("x-cos-meta-")>-1&&(i[r]=e[r]);var s=o.throttleOnProgress.call(n,i["Content-Length"],e.onProgress);d.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:i,qs:e.Query,filePath:a,TaskId:e.TaskId,onProgress:s},(function(i,o){if(s(null,!0),i)return t(i);if(o&&o.headers){var r=o.headers,l=r.etag||r.Etag||r.ETag||"",p=a.substr(a.lastIndexOf("/")+1),u=c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key.replace(/\$\{filename\}/g,p),isLocation:!0});return t(null,{Location:u,statusCode:o.statusCode,headers:r,ETag:l})}t(null,o)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){d.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId},(function(e,n){if(e){var i=e.statusCode;return i&&204===i?t(null,{statusCode:i}):i&&404===i?t(null,{BucketNotFound:!0,statusCode:i}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectAcl:function(e,t){d.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"acl"},(function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},s=i.AccessControlList&&i.AccessControlList.Grant||[];s=o.isArray(s)?s:[s];var c=r(i);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=o.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=o.clone(e.AccessControlPolicy||{}),r=a.Grants||a.Grant;r=o.isArray(r)?r:[r],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:r},i=o.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(i))}o.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),d.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:n,body:i},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},optionsObject:function(e,t){var n=e.Headers;n.Origin=e.Origin,n["Access-Control-Request-Method"]=e.AccessControlRequestMethod,n["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,d.call(this,{Action:"name/cos:OptionsObject",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 i=n.headers||{};t(null,{AccessControlAllowOrigin:i["access-control-allow-origin"],AccessControlAllowMethods:i["access-control-allow-methods"],AccessControlAllowHeaders:i["access-control-allow-headers"],AccessControlExposeHeaders:i["access-control-expose-headers"],AccessControlMaxAge:i["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})}))},putObjectCopy:function(e,t){var n=e.Headers;!n["Cache-Control"]&&n["cache-control"]&&(n["Cache-Control"]="");var i=(e.CopySource||"").match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(i){var a=i[1],r=i[3],s=decodeURIComponent(i[4]);d.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,region:r,prefix:s},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyObjectResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var n=e.Objects||[],i=e.Quiet;n=o.isArray(n)?n:[n];var a=o.json2xml({Delete:{Object:n,Quiet:i||!1}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a));var s=o.map(n,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));d.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:a,action:"delete",headers:r},(function(e,n){if(e)return t(e);var i=n.DeleteResult||{},a=i.Deleted||[],r=i.Error||[];a=o.isArray(a)?a:[a],r=o.isArray(r)?r:[r];var s=o.clone(i);o.extend(s,{Error:r,Deleted:a,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var i=e.RestoreRequest||{},a=o.json2xml({RestoreRequest:i});n["Content-Type"]="application/xml",n["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:a,action:"restore",headers:n},(function(e,n){t(e,n)}))}else t({error:"missing param RestoreRequest"})},putObjectTagging:function(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=o.clone(o.isArray(i)?i:[i]);var a=o.json2xml({Tagging:{TagSet:{Tag:i}}}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=o.binaryBase64(o.md5(a)),d.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:a,action:"tagging",headers:r,VersionId:e.VersionId},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectTagging:function(e,t){d.call(this,{Interface:"getObjectTagging",Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId},(function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=o.clone(o.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteObjectTagging:function(e,t){d.call(this,{Interface:"deleteObjectTagging",Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId},(function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})}))},appendObject:function(e,t){d.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers},(function(e,n){if(e)return t(e);t(null,n)}))},uploadPartCopy:function(e,t){var n=(e.CopySource||"").match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(n){var i=n[1],a=n[3],r=decodeURIComponent(n[4]);d.call(this,{Scope:[{action:"name/cos:GetObject",bucket:i,region:a,prefix:r},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},(function(e,n){if(e)return t(e);var i=o.clone(n.CopyPartResult||{});o.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var n=e.Headers,i=e.tracker;n["Cache-Control"]||n["cache-control"]||(n["Cache-Control"]=""),n["Content-Type"]||n["content-type"]||(n["Content-Type"]=a.getType(e.Key)||"application/octet-stream"),d.call(this,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:i},(function(e,n){return e?(i&&i.parent&&i.parent.setParams({errorNode:"multipartInit"}),t(e)):(n=o.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,o.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)}))},multipartUpload:function(e,t){var n=this;o.getFileSize("multipartUpload",e,(function(){var i=e.tracker,a=n.options.UploadCheckContentMd5;a&&i&&i.setParams({md5StartTime:(new Date).getTime()}),o.getBodyMd5(a,e.Body,(function(r){r&&(e.Headers["Content-MD5"]=o.binaryBase64(r),a&&i&&i.setParams({md5EndTime:(new Date).getTime()})),i&&i.setParams({partNumber:e.PartNumber}),d.call(n,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null,tracker:i},(function(e,n){if(e)return i&&i.parent&&i.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:o.attr(n.headers,"etag",{}),statusCode:n.statusCode,headers:n.headers})}))}))}))},multipartComplete:function(e,t){for(var n=this,i=e.UploadId,a=e.Parts,r=e.tracker,s=0,l=a.length;s-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],n="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),i=new RegExp(t,"g");return e.replace(i,n)}(n.Authorization):"sign="+encodeURIComponent(n.Authorization)),n.SecurityToken&&(i+="&x-cos-security-token="+n.SecurityToken),n.ClientIP&&(i+="&clientIP="+n.ClientIP),n.ClientUA&&(i+="&clientUA="+n.ClientUA),n.Token&&(i+="&token="+n.Token),r&&(i+="&"+r),setTimeout((function(){t(null,{Url:i})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),r&&(s+="&"+r)):r&&(s+="?"+r),s},getAuth:function(e){return o.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,SystemClockOffset:this.options.SystemClockOffset})}};e.exports.init=function(e,t){t.transferToTaskMethod(m,"postObject"),t.transferToTaskMethod(m,"putObject"),o.each(m,(function(t,n){e.prototype[n]=o.apiWrapper(n,t)}))}},function(e,t){function n(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}var i=function(e,t){var i,o,a,r=[],s=function(e,t){var i=[];for(var o in e)e.hasOwnProperty(o)&&i.push(t?n(o).toLowerCase():o);return i.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(i=0;i-1||m.indexOf(h)>-1)&&(f[h]=e.headers[h]);a["x-cos-acl"]&&(f.acl=a["x-cos-acl"]),!f["Content-Type"]&&(f["Content-Type"]=""),(n=wx.uploadFile({url:r,method:s,name:"file",header:a,filePath:o,formData:f,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}})).onProgressUpdate((function(e){c&&c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend,progress:e.progress/100})}))}else{var g=e.qs&&i(e.qs)||"";g&&(r+=(r.indexOf("?")>-1?"&":"?")+g),a["Content-Length"]&&delete a["Content-Length"];var v={url:r,method:s,header:a,dataType:"text",data:e.body,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),n=wx.request(v)}return n}},function(e,t,n){"use strict";let i=n(27);e.exports=new i(n(28),n(29))},function(e,t,n){"use strict";function i(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;ev)return n(null,!1);if(i>1&&Math.max(t[0].Size,t[1].Size)!==g)return n(null,!1);!function o(a){if(a=r.length)k.emit("has_and_check_upload_id",t);else{var d=r[p];if(!s.isInArray(t,d))return o.removeUploadId(d),void a(p+1);o.using[d]?a(p+1):u.call(f,{Bucket:i,Region:c,Key:l,UploadId:d,tracker:e.tracker},(function(e,t){f._isRunningTask(n)&&(e?(o.removeUploadId(d),a(p+1)):k.emit("upload_id_available",{UploadId:d,PartList:t.PartList}))}))}}(0)}else k.emit("has_and_check_upload_id",t)})),k.on("get_remote_upload_id_list",(function(){p.call(f,{Bucket:i,Region:c,Key:l,tracker:e.tracker},(function(t,a){if(f._isRunningTask(n)){if(t)return k.emit("error",t);var r=s.filter(a.UploadList,(function(e){return e.Key===l&&(!d||e.StorageClass.toUpperCase()===d.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(r.length)k.emit("seek_local_avail_upload_id",r);else{var c,p=o.getFileId(e.FileStat,e.ChunkSize,i,l);p&&(c=o.getUploadIdList(p))&&s.each(c,(function(e){o.removeUploadId(e)})),k.emit("no_available_upload_id")}}}))})),k.emit("get_remote_upload_id_list")}function p(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartList(o,(function(n,a){if(n)return t(n);i.push.apply(i,a.Upload||[]),"true"===a.IsTruncated?(o.KeyMarker=a.NextKeyMarker,o.UploadIdMarker=a.NextUploadIdMarker,e()):t(null,{UploadList:i})}))}()}function u(e,t){var n=this,i=[],o={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartListPart(o,(function(n,a){if(n)return t(n);i.push.apply(i,a.Part||[]),"true"===a.IsTruncated?(o.PartNumberMarker=a.NextPartNumberMarker,e()):t(null,{PartList:i})}))}()}function d(e,t){var n=this,i=e.TaskId,o=e.Bucket,r=e.Region,c=e.Key,l=e.UploadData,p=e.FileSize,u=e.SliceSize,d=Math.min(e.AsyncLimit||n.options.ChunkParallelLimit||1,256),m=e.FilePath,h=Math.ceil(p/u),g=0,v=e.ServerSideEncryption,y=s.filter(l.PartList,(function(e){return e.Uploaded&&(g+=e.PartNumber>=h&&p%u||u),!e.Uploaded})),x=e.onProgress;a.eachLimit(y,d,(function(t,a){if(n._isRunningTask(i)){var s=t.PartNumber,d=Math.min(p,t.PartNumber*u)-(t.PartNumber-1)*u,h=0;f.call(n,{TaskId:i,Bucket:o,Region:r,Key:c,SliceSize:u,FileSize:p,PartNumber:s,ServerSideEncryption:v,FilePath:m,UploadData:l,onProgress:function(e){g+=e.loaded-h,h=e.loaded,x({loaded:g,total:p})},tracker:e.tracker},(function(e,o){n._isRunningTask(i)&&(e?g-=h:(g+=d-h,t.ETag=o.ETag),x({loaded:g,total:p}),a(e||null,o))}))}}),(function(e){if(n._isRunningTask(i))return e?t(e):void t(null,{UploadId:l.UploadId,SliceList:l.PartList})}))}function f(e,t){var n=this,i=e.TaskId,o=e.Bucket,r=e.Region,c=e.Key,l=e.FileSize,p=e.FilePath,u=1*e.PartNumber,d=e.SliceSize,f=e.ServerSideEncryption,m=e.UploadData,h=n.options.ChunkRetryTimes+1,g=e.Headers||{},v=d*(u-1),y=d,x=v+d;x>l&&(y=(x=l)-v);var b=["x-cos-traffic-limit","x-cos-mime-limit"],k={};s.each(g,(function(e,t){b.indexOf(t)>-1&&(k[t]=e)})),s.fileSlice(p,v,x,(function(l){var p=s.getFileMd5(l),d=p?s.binaryBase64(p):null,g=m.PartList[u-1];a.retry(h,(function(t){n._isRunningTask(i)&&n.multipartUpload({TaskId:i,Bucket:o,Region:r,Key:c,ContentLength:y,PartNumber:u,UploadId:m.UploadId,ServerSideEncryption:f,Body:l,Headers:k,onProgress:e.onProgress,ContentMD5:d,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,o){if(n._isRunningTask(i))return e?t(e):(g.Uploaded=!0,t(null,o))}))}),(function(e,o){if(n._isRunningTask(i))return t(e,o)}))}))}function m(e,t){var n=e.Bucket,i=e.Region,o=e.Key,r=e.UploadId,s=e.SliceList,c=this,l=this.options.ChunkRetryTimes+1,p=s.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));a.retry(l,(function(t){c.multipartComplete({Bucket:n,Region:i,Key:o,UploadId:r,Parts:p,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,n){t(e,n)}))}function h(e,t){var n=e.Bucket,i=e.Region,o=e.Key,r=e.AbortArray,s=e.AsyncLimit||1,c=this,l=0,p=new Array(r.length);a.eachLimit(r,s,(function(t,a){var r=l;if(o&&o!==t.Key)return p[r]={error:{KeyNotMatch:!0}},void a(null);var s=t.UploadId||t.UploadID;c.multipartAbort({Bucket:n,Region:i,Key:t.Key,Headers:e.Headers,UploadId:s},(function(e){var o={Bucket:n,Region:i,Key:t.Key,UploadId:s};p[r]={error:e,task:o},a(null)})),l++}),(function(e){if(e)return t(e);for(var n=[],i=[],o=0,a=p.length;oo?"sliceUploadFile":f;a.push({api:m,params:e,callback:function(n,i){e.tracker&&e.tracker.formatResult(n,i),d&&d(n,i,l),t&&t(n,i)}}),n._addTasks(a)},uploadFiles:function(e,t){var n=this,o=void 0===e.SliceSize?n.options.SliceSize:e.SliceSize,a=0,r=0,l=s.throttleOnProgress.call(n,r,e.onProgress),p=e.files.length,u=e.onFileFinish,d=Array(p),f=function(e,n,i){l(null,!0),u&&u(e,n,i),d[i.Index]={options:i,error:e,data:n},--p<=0&&t&&t(null,{files:d})},m=[];s.each(e.files,(function(e,t){var p=e.FileSize,u={Index:t,TaskId:""};if(a+=p,n.options.EnableTracker){var d=n.options.UseAccelerate||"string"==typeof n.options.Domain&&n.options.Domain.includes("accelerate.");e.tracker=new c({bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:p,accelerate:d,deepTracker:n.options.DeepTracker,customId:n.options.CustomId,delay:n.options.TrackerDelay})}s.each(e,(function(e,t){"object"!==i(e)&&"function"!=typeof e&&(u[t]=e)}));var h=e.onTaskReady;e.onTaskReady=function(e){u.TaskId=e,h&&h(e)};var g=0,v=e.onProgress;e.onProgress=function(e){r=r-g+e.loaded,g=e.loaded,v&&v(e),l({loaded:r,total:a})};var y=e.onFileFinish,x="postObject"===n.options.SimpleUploadMethod?"postObject":"putObject",b=p>o?"sliceUploadFile":x;m.push({api:b,params:e,callback:function(t,n){e.tracker&&e.tracker.formatResult(t,n),y&&y(t,n),f&&f(t,n,u)}})})),n._addTasks(m)},sliceCopyFile:function(e,t){var n=new r,i=this,o=e.Bucket,c=e.Region,l=e.Key,p=e.CopySource,u=p.match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(u){var d=u[1],f=u[3],m=decodeURIComponent(u[4]),h=void 0===e.CopySliceSize?i.options.CopySliceSize:e.CopySliceSize;h=Math.max(0,h);var v,y,x=e.CopyChunkSize||this.options.CopyChunkSize,b=this.options.CopyChunkParallelLimit,k=0;n.on("copy_slice_complete",(function(e){i.multipartComplete({Bucket:o,Region:c,Key:l,UploadId:e.UploadId,Parts:e.PartList,calledBySdk:"sliceCopyFile"},(function(e,n){if(e)return y(null,!0),t(e);y({loaded:v,total:v},!0),t(null,n)}))})),n.on("get_copy_data_finish",(function(e){a.eachLimit(e.PartList,b,(function(t,n){var a=t.PartNumber,r=t.CopySourceRange,s=t.end-t.start,u=0;g.call(i,{Bucket:o,Region:c,Key:l,CopySource:p,UploadId:e.UploadId,PartNumber:a,CopySourceRange:r,onProgress:function(e){k+=e.loaded-u,u=e.loaded,y({loaded:k,total:v})}},(function(e,i){if(e)return n(e);y({loaded:k,total:v}),k+=s-u,t.ETag=i.ETag,n(e||null,i)}))}),(function(i){if(i)return y(null,!0),t(i);n.emit("copy_slice_complete",e)}))})),n.on("get_file_size_finish",(function(a){var r;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,o=0;on.length&&(c[t]=e)})),n.emit("get_file_size_finish",c)}else t({error:'get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.'})}))}else t({error:"CopySource format error"})}};e.exports.init=function(e,t){t.transferToTaskMethod(v,"sliceUploadFile"),s.each(v,(function(t,n){e.prototype[n]=s.apiWrapper(n,t)}))}},function(e,t){var n={eachLimit:function(e,t,n,i){if(i=i||function(){},!e.length||t<=0)return i();var o=0,a=0,r=0;!function s(){if(o>=e.length)return i();for(;r=e.length?i():s())}))}()},retry:function(e,t,n){e<1?n():function i(o){t((function(t,a){t&&o