diff --git a/demo-album/lib/cos-wx-sdk-v5.js b/demo-album/lib/cos-wx-sdk-v5.js index 5a4a079..ee80185 100644 --- a/demo-album/lib/cos-wx-sdk-v5.js +++ b/demo-album/lib/cos-wx-sdk-v5.js @@ -7450,7 +7450,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.6.1\",\"description\":\"小程序 SDK for [腾讯云对象存储服务](https://cloud.tencent.com/product/cos)\",\"main\":\"demo/lib/cos-wx-sdk-v5.min.js\",\"scripts\":{\"prettier\":\"prettier --write src demo/demo-sdk.js demo/test.js demo/ciDemo\",\"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\":{\"@xmldom/xmldom\":\"^0.8.6\",\"mime\":\"^2.4.6\"},\"devDependencies\":{\"@babel/core\":\"7.17.9\",\"@babel/preset-env\":\"7.16.11\",\"babel-loader\":\"8.2.5\",\"body-parser\":\"^1.18.3\",\"cross-env\":\"^7.0.3\",\"express\":\"^4.17.1\",\"prettier\":\"^3.0.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.6.2\",\"description\":\"小程序 SDK for [腾讯云对象存储服务](https://cloud.tencent.com/product/cos)\",\"main\":\"demo/lib/cos-wx-sdk-v5.min.js\",\"scripts\":{\"prettier\":\"prettier --write src demo/demo-sdk.js demo/test.js demo/ciDemo\",\"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\":{\"@xmldom/xmldom\":\"^0.8.6\",\"mime\":\"^2.4.6\"},\"devDependencies\":{\"@babel/core\":\"7.17.9\",\"@babel/preset-env\":\"7.16.11\",\"babel-loader\":\"8.2.5\",\"body-parser\":\"^1.18.3\",\"cross-env\":\"^7.0.3\",\"express\":\"^4.17.1\",\"prettier\":\"^3.0.1\",\"qcloud-cos-sts\":\"^3.0.2\",\"terser-webpack-plugin\":\"4.2.3\",\"webpack\":\"4.46.0\",\"webpack-cli\":\"4.10.0\"}}"); /***/ }), @@ -8329,7 +8329,7 @@ function uploadFile(_x, _x2) { } // 批量上传文件 function _uploadFile() { _uploadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, callback) { - var self, SliceSize, taskList, FileSize, fileInfo, accelerate, _onTaskReady, _onFileFinish, onFileFinish, simpleUploadMethod, api; + var self, SliceSize, taskList, FileSize, fileInfo, accelerate, realApi, _onTaskReady, _onFileFinish, onFileFinish, simpleUploadMethod, api; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: @@ -8354,13 +8354,16 @@ function _uploadFile() { fileInfo = { TaskId: '' }; // 上传链路 - if (self.options.EnableTracker) { + if (self.options.EnableReporter) { accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); + realApi = FileSize > SliceSize ? 'sliceUploadFile' : 'putObject'; params.tracker = new Tracker({ - Beacon: self.options.Beacon, + Beacon: self.options.BeaconReporter, + clsReporter: self.options.ClsReporter, bucket: params.Bucket, region: params.Region, apiName: 'uploadFile', + realApi: realApi, fileKey: params.Key, fileSize: FileSize, accelerate: accelerate, @@ -8388,7 +8391,7 @@ function _uploadFile() { _onFileFinish = params.onFileFinish; onFileFinish = function onFileFinish(err, data) { // 格式化上报参数并上报 - params.tracker && params.tracker.formatResult(err, data); + params.tracker && params.tracker.report(err, data); _onFileFinish && _onFileFinish(err, data, fileInfo); callback && callback(err, data); }; // 添加上传任务 @@ -8444,7 +8447,7 @@ function _uploadFiles() { return params.files.map(function (fileParams, index) { return new Promise( /*#__PURE__*/function () { var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve) { - var FileSize, fileInfo, accelerate, _onTaskReady, PreAddSize, _onProgress, _onFileFinish, onFileFinish, simpleUploadMethod, api; + var FileSize, fileInfo, accelerate, realApi, _onTaskReady, PreAddSize, _onProgress, _onFileFinish, onFileFinish, simpleUploadMethod, api; return _regeneratorRuntime().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: @@ -8467,13 +8470,16 @@ function _uploadFiles() { TotalSize += FileSize; // 单个文件上传链路 - if (self.options.EnableTracker) { + if (self.options.EnableReporter) { accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); + realApi = FileSize > SliceSize ? 'sliceUploadFile' : 'putObject'; fileParams.tracker = new Tracker({ - Beacon: self.options.Beacon, + Beacon: self.options.BeaconReporter, + clsReporter: self.options.ClsReporter, bucket: fileParams.Bucket, region: fileParams.Region, apiName: 'uploadFiles', + realApi: realApi, fileKey: fileParams.Key, fileSize: FileSize, accelerate: accelerate, @@ -8514,7 +8520,7 @@ function _uploadFiles() { _onFileFinish = fileParams.onFileFinish; onFileFinish = function onFileFinish(err, data) { // 格式化上报参数并上报 - fileParams.tracker && fileParams.tracker.formatResult(err, data); + fileParams.tracker && fileParams.tracker.report(err, data); _onFileFinish && _onFileFinish(err, data); onTotalFileFinish && onTotalFileFinish(err, data, fileInfo); }; // 添加上传任务 @@ -8600,6 +8606,7 @@ function sliceCopyFile(params, callback) { Key: Key, UploadId: UploadData.UploadId, Parts: Parts, + tracker: params.tracker, calledBySdk: 'sliceCopyFile' }, tryCallback); }, function (err, data) { @@ -8642,6 +8649,8 @@ function sliceCopyFile(params, callback) { UploadId: UploadData.UploadId, PartNumber: PartNumber, CopySourceRange: CopySourceRange, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile', onProgress: function onProgress(data) { FinishSize += data.loaded - preAddSize; preAddSize = data.loaded; @@ -8678,7 +8687,9 @@ function sliceCopyFile(params, callback) { Bucket: Bucket, Region: Region, Key: Key, - Headers: TargetHeader + Headers: TargetHeader, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile' }, function (err, data) { if (err) return callback(err); params.UploadId = data.UploadId; @@ -8704,7 +8715,9 @@ function sliceCopyFile(params, callback) { Bucket: Bucket, Region: Region, Key: Key, - UploadId: UploadId + UploadId: UploadId, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile' }, function (err, PartListData) { if (err) { // 如果 UploadId 获取会出错,跳过并删除 @@ -8800,7 +8813,9 @@ function sliceCopyFile(params, callback) { self.headObject({ Bucket: SourceBucket, Region: SourceRegion, - Key: SourceKey + Key: SourceKey, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile' }, function (err, data) { if (err) { if (err.statusCode && err.statusCode === 404) { @@ -8819,6 +8834,9 @@ function sliceCopyFile(params, callback) { }); return; } + params.tracker && params.tracker.setParams({ + httpSize: FileSize + }); _onProgress3 = util.throttleOnProgress.call(self, FileSize, params.onProgress); // 开始上传 @@ -8826,7 +8844,9 @@ function sliceCopyFile(params, callback) { if (!params.Headers['x-cos-metadata-directive']) { params.Headers['x-cos-metadata-directive'] = 'Copy'; } - self.putObjectCopy(params, function (err, data) { + self.putObjectCopy(Object.assign(params, { + calledBySdk: 'sliceCopyFile' + }), function (err, data) { if (err) { _onProgress3(null, true); return callback(err); @@ -8881,7 +8901,9 @@ function copySliceItem(params, callback) { UploadId: UploadId, PartNumber: PartNumber, CopySourceRange: CopySourceRange, - onProgress: params.onProgress + onProgress: params.onProgress, + tracker: params.tracker, + calledBySdk: params.calledBySdk }, function (err, data) { tryCallback(err || null, data); }); @@ -8979,7 +9001,6 @@ module.exports = async; var REQUEST = __webpack_require__(/*! ../lib/request */ "./lib/request.js"); -var base64 = __webpack_require__(/*! ../lib/base64 */ "./lib/base64.js"); var util = __webpack_require__(/*! ./util */ "./src/util.js"); var mime = __webpack_require__(/*! mime */ "./node_modules/mime/index.js"); @@ -9020,7 +9041,8 @@ function getService(params, callback) { Action: 'name/cos:GetService', url: domain, method: 'GET', - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var buckets = data && data.ListAllMyBucketsResult && data.ListAllMyBucketsResult.Buckets && data.ListAllMyBucketsResult.Buckets.Bucket || []; @@ -9066,7 +9088,8 @@ function putBucket(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - body: xml + body: xml, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var url = getUrl({ @@ -9101,7 +9124,8 @@ function headBucket(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - method: 'HEAD' + method: 'HEAD', + tracker: params.tracker }, function (err, data) { callback(err, data); }); @@ -9136,7 +9160,8 @@ function getBucket(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - qs: reqParams + qs: reqParams, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var ListBucketResult = data.ListBucketResult || {}; @@ -9171,7 +9196,8 @@ function deleteBucket(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - method: 'DELETE' + method: 'DELETE', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9232,7 +9258,8 @@ function putBucketAcl(params, callback) { Region: params.Region, headers: headers, action: 'acl', - body: xml + body: xml, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -9259,7 +9286,8 @@ function getBucketAcl(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'acl' + action: 'acl', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var AccessControlPolicy = data.AccessControlPolicy || {}; @@ -9320,7 +9348,8 @@ function putBucketCors(params, callback) { Region: params.Region, body: xml, action: 'cors', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -9347,7 +9376,8 @@ function getBucketCors(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'cors' + action: 'cors', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && err.error.Code === 'NoSuchCORSConfiguration') { @@ -9399,7 +9429,8 @@ function deleteBucketCors(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'cors' + action: 'cors', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9431,7 +9462,8 @@ function getBucketLocation(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'location' + action: 'location', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, data); @@ -9462,7 +9494,8 @@ function putBucketPolicy(params, callback) { action: 'policy', body: PolicyStr, headers: headers, - json: true + json: true, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9495,7 +9528,8 @@ function getBucketPolicy(params, callback) { Region: params.Region, headers: params.Headers, action: 'policy', - rawBody: true + rawBody: true, + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode && err.statusCode === 403) { @@ -9543,7 +9577,8 @@ function deleteBucketPolicy(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'policy' + action: 'policy', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9590,7 +9625,8 @@ function putBucketTagging(params, callback) { Region: params.Region, body: xml, action: 'tagging', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9622,7 +9658,8 @@ function getBucketTagging(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'tagging' + action: 'tagging', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && (err.error === 'Not Found' || err.error.Code === 'NoSuchTagSet')) { @@ -9666,7 +9703,8 @@ function deleteBucketTagging(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'tagging' + action: 'tagging', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9700,7 +9738,8 @@ function putBucketLifecycle(params, callback) { Region: params.Region, body: xml, action: 'lifecycle', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9722,7 +9761,8 @@ function getBucketLifecycle(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'lifecycle' + action: 'lifecycle', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && err.error.Code === 'NoSuchLifecycleConfiguration') { @@ -9756,7 +9796,8 @@ function deleteBucketLifecycle(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'lifecycle' + action: 'lifecycle', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9792,7 +9833,8 @@ function putBucketVersioning(params, callback) { Region: params.Region, body: xml, action: 'versioning', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9814,7 +9856,8 @@ function getBucketVersioning(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'versioning' + action: 'versioning', + tracker: params.tracker }, function (err, data) { if (!err) { !data.VersioningConfiguration && (data.VersioningConfiguration = {}); @@ -9839,7 +9882,8 @@ function putBucketReplication(params, callback) { Region: params.Region, body: xml, action: 'replication', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9861,7 +9905,8 @@ function getBucketReplication(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'replication' + action: 'replication', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && (err.error === 'Not Found' || err.error.Code === 'ReplicationConfigurationnotFoundError')) { @@ -9895,7 +9940,8 @@ function deleteBucketReplication(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'replication' + action: 'replication', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9953,7 +9999,8 @@ function putBucketWebsite(params, callback) { Region: params.Region, body: xml, action: 'website', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9986,7 +10033,8 @@ function getBucketWebsite(params, callback) { Region: params.Region, Key: params.Key, headers: params.Headers, - action: 'website' + action: 'website', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error.Code === 'NoSuchWebsiteConfiguration') { @@ -10031,7 +10079,8 @@ function deleteBucketWebsite(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'website' + action: 'website', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10088,7 +10137,8 @@ function putBucketReferer(params, callback) { Region: params.Region, body: xml, action: 'referer', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10121,7 +10171,8 @@ function getBucketReferer(params, callback) { Region: params.Region, Key: params.Key, headers: params.Headers, - action: 'referer' + action: 'referer', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error.Code === 'NoSuchRefererConfiguration') { @@ -10179,7 +10230,8 @@ function putBucketDomain(params, callback) { Region: params.Region, body: xml, action: 'domain', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10211,7 +10263,8 @@ function getBucketDomain(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'domain' + action: 'domain', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var DomainRule = []; @@ -10243,7 +10296,8 @@ function deleteBucketDomain(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'domain' + action: 'domain', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10287,7 +10341,8 @@ function putBucketOrigin(params, callback) { Region: params.Region, body: xml, action: 'origin', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10319,7 +10374,8 @@ function getBucketOrigin(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'origin' + action: 'origin', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var OriginRule = []; @@ -10351,7 +10407,8 @@ function deleteBucketOrigin(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'origin' + action: 'origin', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10391,7 +10448,8 @@ function putBucketLogging(params, callback) { Region: params.Region, body: xml, action: 'logging', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10423,7 +10481,8 @@ function getBucketLogging(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'logging' + action: 'logging', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); delete data.BucketLoggingStatus._xmlns; @@ -10477,7 +10536,8 @@ function putBucketInventory(params, callback) { qs: { id: params['Id'] }, - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10513,7 +10573,8 @@ function getBucketInventory(params, callback) { action: 'inventory', qs: { id: params['Id'] - } + }, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var InventoryConfiguration = data['InventoryConfiguration']; @@ -10559,7 +10620,8 @@ function listBucketInventory(params, callback) { action: 'inventory', qs: { 'continuation-token': params['ContinuationToken'] - } + }, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var ListInventoryConfigurationResult = data['ListInventoryConfigurationResult']; @@ -10611,7 +10673,8 @@ function deleteBucketInventory(params, callback) { action: 'inventory', qs: { id: params['Id'] - } + }, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10650,7 +10713,8 @@ function putBucketAccelerate(params, callback) { Region: params.Region, body: xml, action: 'accelerate', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -10666,7 +10730,8 @@ function getBucketAccelerate(params, callback) { method: 'GET', Bucket: params.Bucket, Region: params.Region, - action: 'accelerate' + action: 'accelerate', + tracker: params.tracker }, function (err, data) { if (!err) { !data.AccelerateConfiguration && (data.AccelerateConfiguration = {}); @@ -10697,7 +10762,8 @@ function headObject(params, callback) { Region: params.Region, Key: params.Key, VersionId: params.VersionId, - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) { var statusCode = err.statusCode; @@ -10729,7 +10795,8 @@ function listObjectVersions(params, callback) { Region: params.Region, headers: params.Headers, qs: reqParams, - action: 'versions' + action: 'versions', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var ListVersionsResult = data.ListVersionsResult || {}; @@ -10972,7 +11039,8 @@ function postObject(params, callback) { qs: params.Query, filePath: filePath, TaskId: params.TaskId, - onProgress: onProgress + onProgress: onProgress, + tracker: params.tracker }, function (err, data) { onProgress(null, true); if (err) return callback(err); @@ -11018,7 +11086,8 @@ function deleteObject(params, callback) { Region: params.Region, Key: params.Key, headers: params.Headers, - VersionId: params.VersionId + VersionId: params.VersionId, + tracker: params.tracker }, function (err, data) { if (err) { var statusCode = err.statusCode; @@ -11066,7 +11135,8 @@ function getObjectAcl(params, callback) { Key: params.Key, headers: params.Headers, qs: reqParams, - action: 'acl' + action: 'acl', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var AccessControlPolicy = data.AccessControlPolicy || {}; @@ -11130,7 +11200,8 @@ function putObjectAcl(params, callback) { Key: params.Key, action: 'acl', headers: headers, - body: xml + body: xml, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -11161,7 +11232,8 @@ function optionsObject(params, callback) { Bucket: params.Bucket, Region: params.Region, Key: params.Key, - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode && err.statusCode === 403) { @@ -11244,7 +11316,8 @@ function putObjectCopy(params, callback) { Region: params.Region, Key: params.Key, VersionId: params.VersionId, - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var result = util.clone(data.CopyObjectResult || {}); @@ -11288,7 +11361,8 @@ function uploadPartCopy(params, callback) { partNumber: params['PartNumber'], uploadId: params['UploadId'] }, - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var result = util.clone(data.CopyPartResult || {}); @@ -11327,7 +11401,8 @@ function deleteMultipleObject(params, callback) { Region: params.Region, body: xml, action: 'delete', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var DeleteResult = data.DeleteResult || {}; @@ -11368,7 +11443,8 @@ function restoreObject(params, callback) { VersionId: params.VersionId, body: xml, action: 'restore', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { callback(err, data); }); @@ -11408,7 +11484,8 @@ function putObjectTagging(params, callback) { body: xml, action: 'tagging', headers: headers, - VersionId: params.VersionId + VersionId: params.VersionId, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -11443,7 +11520,8 @@ function getObjectTagging(params, callback) { Region: params.Region, headers: params.Headers, action: 'tagging', - VersionId: params.VersionId + VersionId: params.VersionId, + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && (err.error === 'Not Found' || err.error.Code === 'NoSuchTagSet')) { @@ -11490,7 +11568,8 @@ function deleteObjectTagging(params, callback) { Key: params.Key, headers: params.Headers, action: 'tagging', - VersionId: params.VersionId + VersionId: params.VersionId, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -11838,7 +11917,8 @@ function multipartAbort(params, callback) { Region: params.Region, Key: params.Key, headers: params.Headers, - qs: reqParams + qs: reqParams, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -11888,7 +11968,8 @@ function appendObject(params, callback) { qs: { position: params.Position }, - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, data); @@ -11917,7 +11998,8 @@ function request(params, callback) { body: params.Body, Url: params.Url, rawBody: params.RawBody, - dataType: params.DataType + dataType: params.DataType, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); if (data && data.body) { @@ -12475,7 +12557,7 @@ function submitRequest(params, callback) { } tracker && tracker.setParams({ signStartTime: new Date().getTime(), - retryTimes: tryTimes - 1 + httpRetryTimes: tryTimes - 1 }); getAuthorizationAsync.call(self, { Bucket: params.Bucket || '', @@ -12568,6 +12650,7 @@ function _submitRequest(params, callback) { // 更换请求的url url = url.replace(/myqcloud.com/, 'tencentcos.cn'); } + var repoterUrl = object ? url : ''; if (params.action) { url = url + '?' + params.action; } @@ -12628,15 +12711,22 @@ function _submitRequest(params, callback) { return "".concat(key, "=").concat(opt.qs[key]); }).join('&') : ''; var fullUrl = queryString ? opt.url + '?' + queryString : opt.url; - params.tracker && params.tracker.setParams({ - reqUrl: fullUrl, - accelerate: useAccelerate ? 'Y' : 'N' - }); - // 分块上传时给父级tracker设置url信息 - params.tracker && params.tracker.parent && params.tracker.parent.setParams({ - reqUrl: fullUrl, - accelerate: useAccelerate ? 'Y' : 'N' - }); + if (params.tracker) { + var _opt$body; + params.tracker.setParams({ + url: fullUrl, + httpMethod: opt.method, + accelerate: useAccelerate, + httpSize: ((_opt$body = opt.body) === null || _opt$body === void 0 ? void 0 : _opt$body.size) || 0 + }); + // 分块上传时给父级tracker设置url信息 + if (params.tracker.parent && !params.tracker.parent.params.url) { + params.tracker.parent.setParams({ + url: repoterUrl, + accelerate: useAccelerate + }); + } + } var sender = REQUEST(opt, function (err, response, body) { if (err === 'abort') return; @@ -12862,18 +12952,19 @@ var defaultOptions = { // HttpDNS 服务商 Id,填写后代表开启 HttpDNS 服务。HttpDNS 用法详见https://developers.weixin.qq.com/miniprogram/dev/framework/ability/HTTPDNS.html SimpleUploadMethod: 'postObject', // 高级上传内部判断需要走简单上传时,指定的上传方法,可选postObject或putObject - EnableTracker: false, - // 默认关闭上报 + AutoSwitchHost: false, + CopySourceParser: null, + // 自定义拷贝源解析器 + /** 上报相关配置 **/ DeepTracker: false, // 上报时是否对每个分块上传做单独上报 - Beacon: null, - // 灯塔上报组件,如有需要请自行传入 TrackerDelay: 5000, // 周期性上报,单位毫秒。0代表实时上报 CustomId: '', // 自定义上报id - AutoSwitchHost: false, - CopySourceParser: null // 自定义拷贝源解析器 + BeaconReporter: null, + // 灯塔上报组件,如有需要请自行传入,传入即代表开启上报 + ClsReporter: null // cls 上报组件,如有需要请自行传入,传入即代表开启上报 }; // 对外暴露的类 @@ -12888,6 +12979,7 @@ var COS = function COS(options) { this.options.CopySliceSize = Math.max(0, this.options.CopySliceSize); this.options.MaxPartNumber = Math.max(1024, Math.min(10000, this.options.MaxPartNumber)); this.options.Timeout = Math.max(0, this.options.Timeout); + this.options.EnableReporter = this.options.BeaconReporter || this.options.ClsReporter; if (this.options.AppId) { console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'); } @@ -13353,6 +13445,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } @@ -13363,11 +13456,11 @@ var beacon = null; var getBeacon = function getBeacon(Beacon, delay) { if (!beacon) { // 生成 beacon - if (!Beacon || typeof Beacon !== 'function') { + if (typeof Beacon !== 'function') { throw new Error('Beacon not found'); } beacon = new Beacon({ - appkey: '0AND0VEVB24UBGDU', + appkey: '0WEB05PY6MHRGK0U', versionCode: pkg.version, channelID: 'mp_sdk', //渠道,选填 @@ -13385,6 +13478,12 @@ var getBeacon = function getBeacon(Beacon, delay) { return beacon; }; + +// 毫秒转秒 +var ms2s = function ms2s(ms) { + if (!ms || ms < 0) return 0; + return (ms / 1000).toFixed(3); +}; var utils = { // 生成uid 每个链路对应唯一一条uid getUid: function getUid() { @@ -13393,7 +13492,7 @@ var utils = { }; return S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4(); }, - // 获取网络类型 + // 获取网络类型 4g | wifi getNetType: function getNetType() { return new Promise(function (resolve) { if (wx.canIUse('getNetworkType')) { @@ -13469,20 +13568,16 @@ var deviceInfo = { utils.getSystemInfo().then(function (res) { Object.assign(deviceInfo, res); }); - -// 分块上传原子方法 -var sliceUploadMethods = ['multipartInit', 'multipartUpload', 'multipartComplete', 'multipartList', 'multipartListPart', 'multipartAbort']; -var uploadApi = ['putObject', 'postObject', 'appendObject', 'sliceUploadFile', 'uploadFile', 'uploadFiles'].concat(sliceUploadMethods); -var downloadApi = ['getObject']; -function getEventCode(apiName) { - if (uploadApi.includes(apiName)) { - return 'cos_upload'; - } - if (downloadApi.includes(apiName)) { - return 'cos_download'; +var transApiName = function transApiName(api) { + if (['putObject', 'sliceUploadFile', 'uploadFile', 'uploadFiles'].includes(api)) { + return 'UploadTask'; + } else if (api === 'getObject') { + return 'DownloadTask'; + } else if (['putObjectCopy', 'sliceCopyFile'].includes(api)) { + return 'CopyTask'; } - return 'base_service'; -} + return api; +}; // 上报参数驼峰改下划线 function camel2underline(key) { @@ -13490,102 +13585,91 @@ function camel2underline(key) { } function formatParams(params) { var formattedParams = {}; - var allReporterKeys = ['tracePlatform', 'cossdkVersion', 'region', 'networkType', 'host', 'accelerate', 'requestPath', 'size', 'httpMd5', 'httpSign', 'httpFull', 'name', 'result', 'tookTime', 'errorNode', 'errorCode', 'errorMessage', 'errorRequestId', 'errorStatusCode', 'errorServiceName', 'errorType', 'traceId', 'bucket', 'appid', 'partNumber', 'retryTimes', 'reqUrl', 'customId', 'fullError', 'devicePlatform', 'wxVersion', 'wxSystem', 'wxSdkVersion']; - var successKeys = ['tracePlatform', 'cossdkVersion', 'region', 'bucket', 'appid', 'networkType', 'host', 'accelerate', 'requestPath', 'partNumber', 'size', 'name', 'result', 'tookTime', 'errorRequestId', 'retryTimes', 'reqUrl', 'customId', 'devicePlatform', 'wxVersion', 'wxSystem', 'wxSdkVersion']; + var successKeys = ['sdkVersionName', 'sdkVersionCode', 'osName', 'networkType', 'requestName', 'requestResult', 'bucket', 'region', 'appid', 'accelerate', 'url', 'host', 'requestPath', 'userAgent', 'httpMethod', 'httpSize', 'httpSpeed', 'httpTookTime', 'httpMd5', 'httpSign', 'httpFullTime', 'httpDomain', 'partNumber', 'httpRetryTimes', 'customId', 'traceId', 'realApi']; + var failureKeys = [].concat(successKeys, ['errorNode', 'errorCode', 'errorName', 'errorMessage', 'errorRequestId', 'errorHttpCode', 'errorServiceName', 'errorType', 'fullError']); // 需要上报的参数字段 - var reporterKeys = params.result === 'Success' ? successKeys : allReporterKeys; + var reporterKeys = params.requestResult === 'Success' ? successKeys : failureKeys; for (var key in params) { if (!reporterKeys.includes(key)) continue; var formattedKey = camel2underline(key); formattedParams[formattedKey] = params[key]; } + formattedParams['request_name'] = params.realApi ? transApiName(params.realApi) : params.requestName; return formattedParams; } // 链路追踪器 var Tracker = /*#__PURE__*/function () { function Tracker(opt) { + var _this$params; _classCallCheck(this, Tracker); var parent = opt.parent, traceId = opt.traceId, bucket = opt.bucket, region = opt.region, apiName = opt.apiName, + realApi = opt.realApi, + httpMethod = opt.httpMethod, fileKey = opt.fileKey, fileSize = opt.fileSize, accelerate = opt.accelerate, customId = opt.customId, delay = opt.delay, deepTracker = opt.deepTracker, - Beacon = opt.Beacon; + Beacon = opt.Beacon, + clsReporter = opt.clsReporter; var appid = bucket && bucket.substr(bucket.lastIndexOf('-') + 1) || ''; this.parent = parent; this.deepTracker = deepTracker; this.delay = delay; + if (clsReporter && !this.clsReporter) { + this.clsReporter = clsReporter; + } // 上报用到的字段 - this.params = { + this.params = (_this$params = { // 通用字段 - cossdkVersion: pkg.version, - region: region, + sdkVersionName: 'cos-wx-sdk-v5', + sdkVersionCode: pkg.version, + osName: deviceInfo.devicePlatform, networkType: '', + requestName: apiName || '', + requestResult: '', + // sdk api调用结果Success、Failure + realApi: realApi, + bucket: bucket, + region: region, + accelerate: accelerate, + httpMethod: httpMethod, + url: '', host: '', - accelerate: accelerate ? 'Y' : 'N', + httpDomain: '', requestPath: fileKey || '', - size: fileSize || -1, - httpMd5: 0, - // MD5耗时 - httpSign: 0, - // 计算签名耗时 - httpFull: 0, - // http请求耗时 - name: apiName || '', - result: '', - // sdk api调用结果Success、Fail - tookTime: 0, - // 总耗时 - errorNode: '', + errorType: '', errorCode: '', + errorName: '', errorMessage: '', errorRequestId: '', - errorStatusCode: 0, + errorHttpCode: 0, errorServiceName: '', - // 小程序补充字段 - tracePlatform: 'cos-wx-sdk-v5', - // 上报平台=小程序 - traceId: traceId || utils.getUid(), - // 每条上报唯一标识 - bucket: bucket, - appid: appid, - partNumber: 0, - // 分块上传编号 - retryTimes: 0, - // sdk内部发起的请求重试 - reqUrl: '', - // 请求url - customId: customId || '', - // 业务id - devicePlatform: deviceInfo.devicePlatform, - wxVersion: deviceInfo.wxVersion, - wxSystem: deviceInfo.wxSystem, - wxSdkVersion: deviceInfo.wxSdkVersion, - md5StartTime: 0, - // md5计算开始时间 - md5EndTime: 0, - // md5计算结束时间 - signStartTime: 0, - // 计算签名开始时间 - signEndTime: 0, - // 计算签名结束时间 - httpStartTime: 0, - // 发起网络请求开始时间 - httpEndTime: 0, - // 网路请求结束时间 - startTime: new Date().getTime(), - // sdk api调用起始时间,不是纯网络耗时 - endTime: 0 // sdk api调用结束时间,不是纯网络耗时 - }; + errorNode: '', + httpTookTime: 0, + // http整体耗时 + httpSize: fileSize || 0, + // 主要是文件大小,大小 B + httpMd5: 0, + // MD5耗时 + httpSign: 0, + // 计算签名耗时 + httpFullTime: 0, + // 任务整体耗时(包括md5、签名等) + httpSpeed: 0, + // 主要关注上传速度,KB/s - this.beacon = getBeacon(Beacon, delay); + size: fileSize || 0 + }, _defineProperty(_this$params, "httpMd5", 0), _defineProperty(_this$params, "httpSign", 0), _defineProperty(_this$params, "httpFull", 0), _defineProperty(_this$params, "name", apiName || ''), _defineProperty(_this$params, "tookTime", 0), _defineProperty(_this$params, "md5StartTime", 0), _defineProperty(_this$params, "md5EndTime", 0), _defineProperty(_this$params, "signStartTime", 0), _defineProperty(_this$params, "signEndTime", 0), _defineProperty(_this$params, "httpStartTime", 0), _defineProperty(_this$params, "httpEndTime", 0), _defineProperty(_this$params, "startTime", new Date().getTime()), _defineProperty(_this$params, "endTime", 0), _defineProperty(_this$params, "traceId", traceId || utils.getUid()), _defineProperty(_this$params, "appid", appid), _defineProperty(_this$params, "partNumber", 0), _defineProperty(_this$params, "httpRetryTimes", 0), _defineProperty(_this$params, "customId", customId || ''), _defineProperty(_this$params, "partTime", 0), _this$params); + if (Beacon) { + this.beacon = getBeacon(Beacon, delay); + } } // 格式化sdk回调 @@ -13594,7 +13678,7 @@ var Tracker = /*#__PURE__*/function () { value: function () { var _formatResult = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err, data) { var _err$error, _err$error$error, _err$error2, _err$error2$error, _err$error3, _err$error4, _err$error5, _err$error5$error, _err$error6; - var now, tookTime, networkType, errorCode, errorMessage, errorStatusCode, errorServiceName, requestId, errorType, exec; + var now, networkType, errorCode, errorMessage, errorName, errorHttpCode, errorServiceName, requestId, errorType, isSliceUploadFile, isSliceCopyFile, speed, httpFullTime, httpTookTime, _speed, httpMd5, httpSign, exec; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: @@ -13616,27 +13700,60 @@ var Tracker = /*#__PURE__*/function () { * {error: 'message'}或{error: {error: 'message' }} */ now = new Date().getTime(); - tookTime = now - this.params.startTime; - _context.next = 4; + _context.next = 3; return utils.getNetType(); - case 4: + case 3: networkType = _context.sent; errorCode = err ? (err === null || err === void 0 ? void 0 : (_err$error = err.error) === null || _err$error === void 0 ? void 0 : (_err$error$error = _err$error.error) === null || _err$error$error === void 0 ? void 0 : _err$error$error.Code) || 'Error' : ''; errorMessage = err ? (err === null || err === void 0 ? void 0 : (_err$error2 = err.error) === null || _err$error2 === void 0 ? void 0 : (_err$error2$error = _err$error2.error) === null || _err$error2$error === void 0 ? void 0 : _err$error2$error.Message) || (err === null || err === void 0 ? void 0 : (_err$error3 = err.error) === null || _err$error3 === void 0 ? void 0 : _err$error3.error) || (err === null || err === void 0 ? void 0 : err.error) || '' : ''; - errorStatusCode = err ? err === null || err === void 0 ? void 0 : (_err$error4 = err.error) === null || _err$error4 === void 0 ? void 0 : _err$error4.statusCode : data.statusCode; + errorName = errorMessage; + errorHttpCode = err ? err === null || err === void 0 ? void 0 : (_err$error4 = err.error) === null || _err$error4 === void 0 ? void 0 : _err$error4.statusCode : data.statusCode; errorServiceName = err ? err === null || err === void 0 ? void 0 : (_err$error5 = err.error) === null || _err$error5 === void 0 ? void 0 : (_err$error5$error = _err$error5.error) === null || _err$error5$error === void 0 ? void 0 : _err$error5$error.Resource : ''; requestId = err ? (err === null || err === void 0 ? void 0 : (_err$error6 = err.error) === null || _err$error6 === void 0 ? void 0 : _err$error6.RequestId) || '' : (data === null || data === void 0 ? void 0 : data.RequestId) || ''; errorType = err ? requestId ? 'Server' : 'Client' : ''; + if (this.params.requestName === 'getObject') { + this.params.httpSize = data ? data.headers && data.headers['content-length'] : 0; + } + + // 上报 sliceUploadFile || uploadFile || uploadFiles 命中分块上传时 + isSliceUploadFile = this.params.realApi === 'sliceUploadFile'; + isSliceCopyFile = this.params.realApi === 'sliceCopyFile'; + if (isSliceUploadFile || isSliceCopyFile) { + speed = this.params.httpSize / 1024 / this.params.partTime; + Object.assign(this.params, { + httpSpeed: speed < 0 ? 0 : speed.toFixed(3) + }); + } else { + httpFullTime = now - this.params.startTime; + httpTookTime = this.params.httpEndTime - this.params.httpStartTime; + _speed = this.params.httpSize / 1024 / (httpTookTime / 1000); + httpMd5 = this.params.md5EndTime - this.params.md5StartTime; + httpSign = this.params.signEndTime - this.params.signStartTime; + if (this.parent) { + this.parent.addParamValue('httpTookTime', ms2s(httpTookTime)); + this.parent.addParamValue('httpFullTime', ms2s(httpFullTime)); + this.parent.addParamValue('httpMd5', ms2s(httpMd5)); + this.parent.addParamValue('httpSign', ms2s(httpSign)); + if (['multipartUpload', 'uploadPartCopy', 'putObjectCopy'].includes(this.params.requestName)) { + // 只有小分块上传|复制才累计纯请求耗时,计算速度时用到 + this.parent.addParamValue('partTime', ms2s(httpTookTime)); + } + } + Object.assign(this.params, { + httpFullTime: ms2s(httpFullTime), + httpMd5: ms2s(httpMd5), + httpSign: ms2s(httpSign), + httpTookTime: ms2s(httpTookTime), + httpSpeed: _speed < 0 ? 0 : _speed.toFixed(3) + }); + } Object.assign(this.params, { - tookTime: tookTime, networkType: networkType, - httpMd5: this.params.md5EndTime - this.params.md5StartTime, - httpSign: this.params.signEndTime - this.params.signStartTime, - httpFull: this.params.httpEndTime - this.params.httpStartTime, - result: err ? 'Fail' : 'Success', + requestResult: err ? 'Failure' : 'Success', errorType: errorType, errorCode: errorCode, - errorStatusCode: errorStatusCode, + errorHttpCode: errorHttpCode, + errorName: errorName, errorMessage: errorMessage, errorServiceName: errorServiceName, errorRequestId: requestId @@ -13648,16 +13765,16 @@ var Tracker = /*#__PURE__*/function () { if (this.params.name === 'getObject') { this.params.size = data ? data.headers && data.headers['content-length'] : -1; } - if (this.params.reqUrl) { + if (this.params.url) { try { - exec = /^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl); + exec = /^http(s)?:\/\/(.*?)\//.exec(this.params.url); this.params.host = exec[2]; } catch (e) { - this.params.host = this.params.reqUrl; + this.params.host = this.params.url; } + this.params.httpDomain = this.params.host; } - this.sendEvents(); - case 16: + case 19: case "end": return _context.stop(); } @@ -13667,29 +13784,64 @@ var Tracker = /*#__PURE__*/function () { return _formatResult.apply(this, arguments); } return formatResult; + }() // 上报 + }, { + key: "report", + value: function () { + var _report = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, data) { + var formattedParams; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + if (!(!this.beacon && !this.clsReporter)) { + _context2.next = 2; + break; + } + return _context2.abrupt("return"); + case 2: + _context2.next = 4; + return this.formatResult(err, data); + case 4: + formattedParams = formatParams(this.params); + if (this.beacon) { + this.sendEventsToBeacon(formattedParams); + } + if (this.clsReporter) { + this.sendEventsToCLS(formattedParams); + } + case 7: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function report(_x3, _x4) { + return _report.apply(this, arguments); + } + return report; }() // 设置当前链路的参数 }, { key: "setParams", value: function setParams(params) { Object.assign(this.params, params); } + }, { + key: "addParamValue", + value: function addParamValue(key, value) { + this.params[key] = (+this.params[key] + +value).toFixed(3); + } - // 使用灯塔延时上报 + // 上报灯塔 }, { - key: "sendEvents", - value: function sendEvents() { + key: "sendEventsToBeacon", + value: function sendEventsToBeacon(formattedParams) { // DeepTracker模式下才会上报分块上传内部细节 - if (sliceUploadMethods.includes(this.params.name) && !this.deepTracker) { + var isSliceUploadFile = this.params.requestName === 'sliceUploadFile' || this.params.realApi === 'sliceUploadFile'; + if (isSliceUploadFile && !this.deepTracker) { return; } - var eventCode = getEventCode(this.params.name); - var formattedParams = formatParams(this.params); - - // 兜底处理 - if (!this.beacon) { - this.beacon = getBeacon(this.delay || 5000); - } - if (this.params.delay === 0) { + var eventCode = 'qcloud_track_cos_sdk'; + if (this.delay === 0) { // 实时上报 this.beacon && this.beacon.onDirectUserAction(eventCode, formattedParams); } else { @@ -13698,6 +13850,15 @@ var Tracker = /*#__PURE__*/function () { } } + // 上报 cls + }, { + key: "sendEventsToCLS", + value: function sendEventsToCLS(formattedParams) { + // 是否实时上报 + var immediate = !!(this.delay === 0); + this.clsReporter.log(formattedParams, immediate); + } + // 生成子实例,与父所属一个链路,可用于分块上传内部流程上报单个分块操作 }, { key: "generateSubTracker", @@ -13708,9 +13869,11 @@ var Tracker = /*#__PURE__*/function () { traceId: this.params.traceId, bucket: this.params.bucket, region: this.params.region, + accelerate: this.params.accelerate, fileKey: this.params.requestPath, customId: this.params.customId, - delay: this.params.delay + delay: this.params.delay, + clsReporter: this.clsReporter }); return new Tracker(subParams); } @@ -14094,8 +14257,8 @@ var apiWrapper = function apiWrapper(apiName, apiFn) { // tracker传递 var tracker; - if (self.options.EnableTracker) { - if (params.calledBySdk === 'sliceUploadFile') { + if (self.options.EnableReporter) { + if (params.calledBySdk === 'sliceUploadFile' || params.calledBySdk === 'sliceCopyFile') { // 分块上传内部方法使用sliceUploadFile的子链路 tracker = params.tracker && params.tracker.generateSubTracker({ apiName: apiName @@ -14104,15 +14267,19 @@ var apiWrapper = function apiWrapper(apiName, apiFn) { // uploadFile、uploadFiles方法在内部处理,此处不处理 tracker = null; } else { - var fileSize = -1; + var fileSize = 0; if (params.Body) { - fileSize = typeof params.Body === 'string' ? params.Body.length : params.Body.size || params.Body.byteLength || -1; + fileSize = typeof params.Body === 'string' ? params.Body.length : params.Body.size || params.Body.byteLength || 0; } + var accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); tracker = new Tracker({ - Beacon: self.options.Beacon, + Beacon: self.options.BeaconReporter, + clsReporter: self.options.ClsReporter, bucket: params.Bucket, region: params.Region, apiName: apiName, + realApi: apiName, + accelerate: accelerate, fileKey: params.Key, fileSize: fileSize, deepTracker: self.options.DeepTracker, @@ -14135,7 +14302,7 @@ var apiWrapper = function apiWrapper(apiName, apiFn) { }; var _callback = function _callback(err, data) { // 格式化上报参数并上报 - tracker && tracker.formatResult(err, data); + tracker && tracker.report(err, data); callback && callback(formatResult(err), formatResult(data)); }; var checkParams = function checkParams() { diff --git a/demo-album/lib/cos-wx-sdk-v5.min.js b/demo-album/lib/cos-wx-sdk-v5.min.js index f4f3af5..76d5ef8 100644 --- a/demo-album/lib/cos-wx-sdk-v5.min.js +++ b/demo-album/lib/cos-wx-sdk-v5.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.COS=t():e.COS=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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/chrisftian/Documents/projects/cos-sdk/cos-wx-sdk-v5/demo/lib",n(n.s=8)}([function(e,t,n){"use strict";function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof x?t:x,a=Object.create(i.prototype),s=new O(r||[]);return o(a,"_invoke",{value:A(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",h="suspendedYield",g="executing",v="completed",y={};function x(){}function b(){}function k(){}var w={};p(w,c,(function(){return this}));var C=Object.getPrototypeOf,S=C&&C(C(D([])));S&&S!==n&&i.call(S,c)&&(w=S);var T=k.prototype=x.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(r,o,s,c){var l=f(e[r],e,o);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==a(p)&&i.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(p).then((function(e){u.value=e,s(u)}),(function(e){return n("throw",e,s,c)}))}c(l.arg)}var r;o(this,"_invoke",{value:function(e,i){function a(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(a,a):a()}})}function A(t,n,r){var i=m;return function(a,o){if(i===g)throw new Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=_(s,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===m)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function _(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=f(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function N(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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;B(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}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 o=n(10),s=n(13),c=n(14),l=n(19),u=n(3),p=u.btoa,d=wx.getFileSystemManager(),f=n(4);function m(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function h(e,t){var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push(t?m(r).toLowerCase():r);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var g=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],v=function(){},y=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 x(e){return C(e,(function(e){return"object"===a(e)&&null!==e?x(e):e}))}function b(e,t){return w(t,(function(n,r){e[r]=t[r]})),e}function k(e){return e instanceof Array}function w(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function C(e,t){var n=k(e)?[]:{};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r],r));return n}var S=function(e,t){if(t=b({},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])}();N.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-forbid-overwrite":"ForbidOverwrite","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,r){void 0!==t[e]&&(n[r]=t[e])})),t.Headers=y(n)}}return t},T=function(e){return new Promise((function(t,n){d.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){n((null==e?void 0:e.errMsg)||"")}})}))},E=function(){var e,t=(e=r().mark((function e(t,n,i){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}i(),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,T(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,i({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==n.Body?(n.ContentLength=n.Body.byteLength,i(null,n.ContentLength)):i({error:"missing param Body"}),e.next=21;break;case 20:n.FilePath?d.stat({path:n.FilePath,success:function(e){var t=e.stats;n.FileStat=t,n.FileStat.FilePath=n.FilePath;var r=t.isDirectory()?0:t.size;n.ContentLength=r=r||0,i(null,r)},fail:function(e){i(e)}}):i({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(r,a){var o=e.apply(t,n);function s(e){i(o,r,a,s,c,"next",e)}function c(e){i(o,r,a,s,c,"throw",e)}s(void 0)}))});return function(e,n,r){return t.apply(this,arguments)}}(),R=function(e){return Date.now()+(e||0)},A=function(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.lengtha)return 1;if(i=0;!t&&e.platform;return function(){return!1,t}}(),N={noop:v,formatParams:S,apiWrapper:function(e,t){return function(n,r){var i,a=this;if("function"==typeof n&&(r=n,n={}),n=S(e,n),a.options.EnableTracker)if("sliceUploadFile"===n.calledBySdk)i=n.tracker&&n.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))i=null;else{var o=-1;n.Body&&(o="string"==typeof n.Body?n.Body.length:n.Body.size||n.Body.byteLength||-1),i=new f({Beacon:a.options.Beacon,bucket:n.Bucket,region:n.Region,apiName:e,fileKey:n.Key,fileSize:o,deepTracker:a.options.DeepTracker,customId:a.options.CustomId,delay:a.options.TrackerDelay})}n.tracker=i;var s=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},c=function(e,t){i&&i.formatResult(e,t),r&&r(s(e),s(t))},l=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var n=t.Bucket,r=t.Region,i=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!n)return"Bucket";if(!r)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e||"uploadFile"===e){if(!n)return"Bucket";if(!r)return"Region";if(!i)return"Key"}return!1}(e,n);if(t)return"missing param "+t;if(n.Region){if(n.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(n.Region))return"Region format error.";!a.options.CompatibilityMode&&-1===n.Region.indexOf("-")&&"yfb"!==n.Region&&"default"!==n.Region&&n.Region}if(n.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(n.Bucket))if(n.AppId)n.Bucket=n.Bucket+"-"+n.AppId;else{if(!a.options.AppId)return'Bucket should format as "test-1250000000".';n.Bucket=n.Bucket+"-"+a.options.AppId}n.AppId&&delete n.AppId}n.Key&&"/"===n.Key.substr(0,1)&&(n.Key=n.Key.substr(1))}}(),u=["getAuth","getObjectUrl"].includes(e);if(!u&&!r)return new Promise((function(e,i){if(r=function(t,n){t?i(t):e(n)},l)return c({error:l});t.call(a,n,c)}));if(l)return c({error:l});var p=t.call(a,n,c);return u?p:void 0}},xml2json:c,json2xml:l,md5:o,clearKey:y,fileSlice:function(e,t,n,r){e?d.readFile({filePath:e,position:t,length:n-t,success:function(e){r(e.data)},fail:function(){r(null)}}):r(null)},getBodyMd5:function(e,t,n){n=n||v,e&&t&&t instanceof ArrayBuffer?N.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=o(e);return t&&t(n),n},binaryBase64:function(e){var t,n,r,i="";for(t=0,n=e.length/2;t-1||g.indexOf(r)>-1)&&(t[n]=e[n])}return t}(x(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 u=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&u&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),n&&r){var p=Math.round(R(e.SystemClockOffset)/1e3)-1,d=p,f=e.Expires||e.expires;d+=void 0===f?900:1*f||0;var m=n,v=i||p+";"+d,y=i||p+";"+d,b=h(c,!0).join(";").toLowerCase(),k=h(o,!0).join(";").toLowerCase(),w=s.HmacSHA1(y,r).toString(),C=[a,t,N.obj2str(o,!0),N.obj2str(c,!0),""].join("\n"),S=["sha1",v,s.SHA1(C).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+m,"q-sign-time="+v,"q-key-time="+y,"q-header-list="+b,"q-url-param-list="+k,"q-signature="+s.HmacSHA1(S,w).toString()].join("&")}},compareVersion:A,canFileSlice:_,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&&(b(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=x(n)),e},getSourceParams:function(e){var t=this.options.CopySourceParser;if(t)return t(e);var n=e.match(/^([^.]+-\d+)\.cos(v6|-cdc|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return n?{Bucket:n[1],Region:n[3],Key:n[7]}:null},encodeBase64:function(e,t){var n=u.encode(e);return t&&(n=n.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),n}};e.exports=N},function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var i=r({HTML:"text/html",isHTML:function(e){return e===i.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=r({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.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var r=0;r=0))throw new _(R,new Error(e.tagName+"@"+n));for(var i=t.length-1;r"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function M(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(M(e,t))return!0}while(e=e.nextSibling)}function F(){this.ownerDocument=this}function z(e,t,n,r){e&&e._inc++,n.namespaceURI===a.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function H(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function K(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function G(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function V(e){return e&&e.nodeType===U.ELEMENT_NODE}function W(e){return e&&e.nodeType===U.TEXT_NODE}function X(e,t){var n=e.childNodes||[];if(i(n,V)||G(t))return!1;var r=i(n,G);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function Q(e,t){var n=e.childNodes||[];if(i(n,(function(e){return V(e)&&e!==t})))return!1;var r=i(n,G);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function $(e,t,n){if(!function(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}(e))throw new _(E,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new _(R,"child not in parent");if(!function(e){return e&&(V(e)||W(e)||G(e)||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE)}(t)||G(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new _(E,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Y(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var o=a.filter(V);if(o.length>1||i(a,W))throw new _(E,"More than one element or text in fragment");if(1===o.length&&!X(e,n))throw new _(E,"Element in fragment can not be inserted before doctype")}if(V(t)&&!X(e,n))throw new _(E,"Only one element can be added and only after doctype");if(G(t)){if(i(r,G))throw new _(E,"Only one doctype is allowed");var s=i(r,V);if(n&&r.indexOf(s)1||i(a,W))throw new _(E,"More than one element or text in fragment");if(1===o.length&&!Q(e,n))throw new _(E,"Element in fragment can not be inserted before doctype")}if(V(t)&&!Q(e,n))throw new _(E,"Only one element can be added and only after doctype");if(G(t)){if(i(r,(function(e){return G(e)&&e!==n})))throw new _(E,"Only one doctype is allowed");var s=i(r,V);if(n&&r.indexOf(s)=0;C--){if(""===(S=i[C]).prefix&&S.namespace===e.namespaceURI){p=S.namespace;break}}if(p!==e.namespaceURI)for(C=i.length-1;C>=0;C--){var S;if((S=i[C]).namespace===e.namespaceURI){S.prefix&&(u=S.prefix+":"+l);break}}}t.push("<",u);for(var T=0;T"),n&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):ge(c,t,n,r,i.slice()),c=c.nextSibling;else for(;c;)ge(c,t,n,r,i.slice()),c=c.nextSibling;t.push("")}else t.push("/>");return;case b:case w:for(c=e.firstChild;c;)ge(c,t,n,r,i.slice()),c=c.nextSibling;return;case f:return he(t,e.name,e.value);case m:return t.push(e.data.replace(/[<&>]/g,q));case h:return t.push("");case x:return t.push("\x3c!--",e.data,"--\x3e");case k:var _=e.publicId,N=e.systemId;if(t.push("");else if(N&&"."!=N)t.push(" SYSTEM ",N,">");else{var B=e.internalSubset;B&&t.push(" [",B,"]"),t.push(">")}return;case y:return t.push("");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,n){var r;switch(t.nodeType){case d:(r=t.cloneNode(!1)).ownerDocument=e;case w:break;case f:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(ve(e,i,n)),i=i.nextSibling;return r}function ye(e,t,n){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=t[i];"object"!=typeof a&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new N),r.ownerDocument=e,r.nodeType){case d:var o=t.attributes,s=r.attributes=new D,c=o.length;s._ownerElement=r;for(var l=0;l=0&&e0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e)return r;t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(p,U),l(p,U.prototype),F.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==w){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===d&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),K(this,e)},replaceChild:function(e,t){Z(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),V(e)&&(this.documentElement=e)},importNode:function(e,t){return ve(this,e,t)},getElementById:function(e){var t=null;return M(this.documentElement,(function(n){if(n.nodeType==d&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=c(e);return new B(this,(function(n){var r=[];return t.length>0&&M(n.documentElement,(function(i){if(i!==n&&i.nodeType===d){var a=i.getAttribute("class");if(a){var o=e===a;if(!o){var s=c(a);o=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}o&&r.push(i)}}var l})),r}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new N,(t.attributes=new D)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new N,e},createTextNode:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new pe;return n.ownerDocument=this,n.tagName=n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ee,r=t.split(":"),i=n.attributes=new D;return n.childNodes=new N,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new te,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},u(F,U),ee.prototype={nodeType:d,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===w?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 r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new B(this,(function(t){var n=[];return M(t,(function(r){r===t||r.nodeType!=d||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new B(this,(function(n){var r=[];return M(n,(function(i){i===n||i.nodeType!==d||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},F.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,F.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,u(ee,U),te.prototype.nodeType=f,u(te,U),ne.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(T[E])},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}},u(ne,U),re.prototype={nodeName:"#text",nodeType:m,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 r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},u(re,ne),ie.prototype={nodeName:"#comment",nodeType:x},u(ie,ne),ae.prototype={nodeName:"#cdata-section",nodeType:h},u(ae,ne),oe.prototype.nodeType=k,u(oe,U),se.prototype.nodeType=C,u(se,U),ce.prototype.nodeType=v,u(ce,U),le.prototype.nodeType=g,u(le,U),ue.prototype.nodeName="#document-fragment",ue.prototype.nodeType=w,u(ue,U),pe.prototype.nodeType=y,u(pe,U),de.prototype.serializeToString=function(e,t,n){return fe.call(e,t,n)},U.prototype.toString=fe;try{if(Object.defineProperty){function be(e){switch(e.nodeType){case d:case w:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(be(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(B.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return be(this)},set:function(e){switch(this.nodeType){case d:case w: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}}}),xe=function(e,t,n){e["$$"+t]=n}}}catch(ke){}t.DocumentType=oe,t.DOMException=_,t.DOMImplementation=j,t.Element=ee,t.Node=U,t.NodeList=N,t.XMLSerializer=de},function(e,t){var n=function(e){var t=(e=e||{}).Base64,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=function(e){for(var t={},n=0,r=e.length;n>>6)+i(128|63&t):i(224|t>>>12&15)+i(128|t>>>6&63)+i(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return i(240|t>>>18&7)+i(128|t>>>12&63)+i(128|t>>>6&63)+i(128|63&t)},o=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(o,a)},c=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[n.charAt(r>>>18),n.charAt(r>>>12&63),t>=2?"=":n.charAt(r>>>6&63),t>=1?"=":n.charAt(63&r)].join("")},l=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,c)},u=function(e){return l(s(e))},p=function(e,t){return t?u(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):u(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 i(55296+(t>>>10))+i(56320+(1023&t));case 3:return i((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return i((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?r[e.charAt(0)]<<18:0)|(t>1?r[e.charAt(1)]<<12:0)|(t>2?r[e.charAt(2)]<<6:0)|(t>3?r[e.charAt(3)]:0),o=[i(a>>>16),i(a>>>8&255),i(255&a)];return o.length-=[0,0,2,1][n],o.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:p,utob:s,encode:p,encodeURI:function(e){return p(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 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)}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof x?t:x,a=Object.create(i.prototype),s=new O(r||[]);return o(a,"_invoke",{value:A(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",h="suspendedYield",g="executing",v="completed",y={};function x(){}function b(){}function k(){}var w={};p(w,c,(function(){return this}));var C=Object.getPrototypeOf,S=C&&C(C(D([])));S&&S!==n&&a.call(S,c)&&(w=S);var T=k.prototype=x.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(i,o,s,c){var l=f(e[i],e,o);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==r(p)&&a.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(p).then((function(e){u.value=e,s(u)}),(function(e){return n("throw",e,s,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}})}function A(t,n,r){var i=m;return function(a,o){if(i===g)throw new Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=_(s,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===m)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function _(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=f(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function N(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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;B(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function a(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function o(e,t){for(var n=0;n=0;i--)t===r[i]&&r.splice(i,1)},e.emit=function(e,t){for(var r=n(e).map((function(e){return e})),i=0;i=0;n--){var i=r[n][2];(!i||i+2592e3=0;a--){var o=r[a];(o[0]===e&&o[1]===t||e!==o[0]&&0===o[0].indexOf(i))&&r.splice(a,1)}r.unshift([e,t,Math.round(Date.now()/1e3)]),r.length>n&&r.splice(n),l()}},removeUploadId:function(e){c(),delete u.using[e];for(var t=r.length-1;t>=0;t--)r[t][1]===e&&r.splice(t,1);l()}};e.exports=u},function(e,t,n){var r=n(9);e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(6),a=n(20),o=n(21),s=n(27),c=n(5),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,Beacon:null,TrackerDelay:5e3,CustomId:"",AutoSwitchHost:!1,CopySourceParser:null},u=function(e){if(this.options=r.extend(r.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(" "),this.options.ForcePathStyle)throw new Error("ForcePathStyle is not supported");i.init(this),a.init(this)};o.init(u,a),s.init(u,a),u.util={md5:r.md5,xml2json:r.xml2json,json2xml:r.json2xml,encodeBase64:r.encodeBase64},u.getAuthorization=r.getAuth,u.version=c.version,e.exports=u},function(e,t,n){(function(e){var t;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)}!function(){"use strict";var i="input is invalid type",a="object"===("undefined"==typeof window?"undefined":r(window)),o=a?window:{};o.JS_MD5_NO_WINDOW&&(a=!1),!a&&"object"===("undefined"==typeof self?"undefined":r(self))&&(o=self);var s,c=!o.JS_MD5_NO_COMMON_JS&&"object"===r(e)&&e.exports,l=n(12),u=!o.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[128,32768,8388608,-2147483648],f=[0,8,16,24],m=["hex","array","digest","buffer","arrayBuffer","base64"],h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),g=[];if(u){var v=new ArrayBuffer(68);s=new Uint8Array(v),g=new Uint32Array(v)}!o.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!o.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===r(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e){return function(t){return new x(!0).update(t)[e]()}};function x(e){if(e)g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g,this.buffer8=s;else if(u){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}x.prototype.update=function(e){if(!this.finalized){var t,n=r(e);if("string"!==n){if("object"!==n)throw i;if(null===e)throw i;if(!u||e.constructor!==ArrayBuffer&&"ArrayBuffer"!==e.constructor.name){if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw i}else e=new Uint8Array(e);t=!0}for(var a,o,s=0,c=e.length,l=this.blocks,p=this.buffer8;s>2]|=e[s]<>6,p[o++]=128|63&a):a<55296||a>=57344?(p[o++]=224|a>>12,p[o++]=128|a>>6&63,p[o++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++s)),p[o++]=240|a>>18,p[o++]=128|a>>12&63,p[o++]=128|a>>6&63,p[o++]=128|63&a);else for(o=this.start;s>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(l[o>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=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}},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=d[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()}},x.prototype.hash=function(){var e,t,n,r,i,a,o=this.blocks;this.first?t=((t=((e=((e=o[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(r=((r=(-1732584194^2004318071&e)+o[1]-117830708)<<12|r>>>20)+e<<0)&(-271733879^e))+o[2]-1126478375)<<17|n>>>15)+r<<0)&(r^e))+o[3]-1316259209)<<22|t>>>10)+n<<0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((r=this.h3)^t&(n^r))+o[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[1]-389564586)<<12|r>>>20)+e<<0)&(e^t))+o[2]+606105819)<<17|n>>>15)+r<<0)&(r^e))+o[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(r^t&(n^r))+o[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[5]+1200080426)<<12|r>>>20)+e<<0)&(e^t))+o[6]-1473231341)<<17|n>>>15)+r<<0)&(r^e))+o[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+o[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[9]-1958414417)<<12|r>>>20)+e<<0)&(e^t))+o[10]-42063)<<17|n>>>15)+r<<0)&(r^e))+o[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+o[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[13]-40341101)<<12|r>>>20)+e<<0)&(e^t))+o[14]-1502002290)<<17|n>>>15)+r<<0)&(r^e))+o[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[1]-165796510)<<5|e>>>27)+t<<0)^t))+o[6]-1069501632)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+o[11]+643717713)<<14|n>>>18)+r<<0)^r))+o[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[5]-701558691)<<5|e>>>27)+t<<0)^t))+o[10]+38016083)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+o[15]-660478335)<<14|n>>>18)+r<<0)^r))+o[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[9]+568446438)<<5|e>>>27)+t<<0)^t))+o[14]-1019803690)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+o[3]-187363961)<<14|n>>>18)+r<<0)^r))+o[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[13]-1444681467)<<5|e>>>27)+t<<0)^t))+o[2]-51403784)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+o[7]+1735328473)<<14|n>>>18)+r<<0)^r))+o[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((a=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[5]-378558)<<4|e>>>28)+t<<0))+o[8]-2022574463)<<11|r>>>21)+e<<0)^e)^(n=((n+=(a^t)+o[11]+1839030562)<<16|n>>>16)+r<<0))+o[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((a=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[1]-1530992060)<<4|e>>>28)+t<<0))+o[4]+1272893353)<<11|r>>>21)+e<<0)^e)^(n=((n+=(a^t)+o[7]-155497632)<<16|n>>>16)+r<<0))+o[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((a=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[13]+681279174)<<4|e>>>28)+t<<0))+o[0]-358537222)<<11|r>>>21)+e<<0)^e)^(n=((n+=(a^t)+o[3]-722521979)<<16|n>>>16)+r<<0))+o[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((a=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[9]-640364487)<<4|e>>>28)+t<<0))+o[12]-421815835)<<11|r>>>21)+e<<0)^e)^(n=((n+=(a^t)+o[15]+530742520)<<16|n>>>16)+r<<0))+o[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[0]-198630844)<<6|e>>>26)+t<<0)|~n))+o[7]+1126891415)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+o[14]-1416354905)<<15|n>>>17)+r<<0)|~e))+o[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+o[3]-1894986606)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+o[10]-1051523)<<15|n>>>17)+r<<0)|~e))+o[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+o[15]-30611744)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+o[6]-1560198380)<<15|n>>>17)+r<<0)|~e))+o[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[4]-145523070)<<6|e>>>26)+t<<0)|~n))+o[11]-1120210379)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+o[2]+718787259)<<15|n>>>17)+r<<0)|~e))+o[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=r+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+r<<0)},x.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return p[e>>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15]+p[t>>4&15]+p[15&t]+p[t>>12&15]+p[t>>8&15]+p[t>>20&15]+p[t>>16&15]+p[t>>28&15]+p[t>>24&15]+p[n>>4&15]+p[15&n]+p[n>>12&15]+p[n>>8&15]+p[n>>20&15]+p[n>>16&15]+p[n>>28&15]+p[n>>24&15]+p[r>>4&15]+p[15&r]+p[r>>12&15]+p[r>>8&15]+p[r>>20&15]+p[r>>16&15]+p[r>>28&15]+p[r>>24&15]},x.prototype.toString=x.prototype.hex,x.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=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&r,r>>8&255,r>>16&255,r>>24&255]},x.prototype.array=x.prototype.digest,x.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},x.prototype.buffer=x.prototype.arrayBuffer,x.prototype.base64=function(){for(var e,t,n,r="",i=this.array(),a=0;a<15;)e=i[a++],t=i[a++],n=i[a++],r+=h[e>>>2]+h[63&(e<<4|t>>>4)]+h[63&(t<<2|n>>>6)]+h[63&n];return e=i[a],r+=h[e>>>2]+h[e<<4&63]+"=="};var b=function(){var e=y("hex");e.getCtx=e.create=function(){return new x},e.update=function(t){return e.create().update(t)};for(var t=0;t>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},u=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)))}},p=r.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,i=e.min(4*t,i),t){for(var c=0;cl;l++){if(16>l)a[l]=0|e[t+l];else{var u=a[l-3]^a[l-8]^a[l-14]^a[l-16];a[l]=u<<1|u>>>31}u=(r<<5|r>>>27)+c+a[l],u=20>l?u+(1518500249+(i&o|~i&s)):40>l?u+(1859775393+(i^o^s)):60>l?u+((i&o|i&s|o&s)-1894007588):u+((i^o^s)-899497514),c=s,s=o,o=i<<30|i>>>2,i=r,r=u}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|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,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=i._createHelper(o),n.HmacSHA1=i._createHmacHelper(o),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 r=e.blockSize,i=4*r;n.sigBytes>i&&(n=e.finalize(n)),n.clamp();for(var a=this._oKey=n.clone(),o=this._iKey=n.clone(),s=a.words,c=o.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=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=n.charAt(64);if(r){var i=e.indexOf(r);-1!=i&&(t=i)}for(var a=[],o=0,s=0;s>>6-s%4*2;a[o>>>2]|=(l|u)<<24-o%4*8,o++}return c.create(a,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=l},function(e,t,n){var r=n(15).DOMParser,i=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={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function n(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function i(e){return"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):e}function a(e,t,n,r){for(var i=0;i0&&a(e.arrayAccessFormPaths,t,n,r)&&(t[n]=[t[n]])}function s(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),r=t[5].split(".");if(n.setHours(t[3],t[4],r[0]),r.length>1&&n.setMilliseconds(r[1]),t[6]&&t[7]){var i=60*t[6]+Number(t[7]);i=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*i:i),n.setMinutes(n.getMinutes()-i-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 c(n,r,i,o){return!(r==t.ELEMENT_NODE&&e.xmlElementsFilter.length>0)||a(e.xmlElementsFilter,n,i,o)}function l(r,i){if(r.nodeType==t.DOCUMENT_NODE){for(var u=new Object,p=r.childNodes,d=0;d0){var i=r.split(".#")[0];return a(e.datetimeAccessFormPaths,t,n,i)?s(t):t}return t}(u.__text,m,i+"."+m)),null!=u["#cdata-section"]&&(u.__cdata=u["#cdata-section"],delete u["#cdata-section"],"property"==e.arrayAccessForm&&delete u["#cdata-section_asArray"]),0==u.__cnt&&"text"==e.emptyNodeForm?u="":1==u.__cnt&&null!=u.__text?u=u.__text:1!=u.__cnt||null==u.__cdata||e.keepCData?u.__cnt>1&&null!=u.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==u.__text||""==u.__text.trim())&&delete u.__text:u=u.__cdata,delete u.__cnt,!e.enableToStringFunc||null==u.__text&&null==u.__cdata||(u.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),u}if(r.nodeType==t.TEXT_NODE||r.nodeType==t.CDATA_SECTION_NODE)return r.nodeValue}function u(t,n,r,a){var o="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=r)for(var s=0;s":">"}function p(e,t){return""}function d(t,n){return"property"==e.arrayAccessForm&&(r=n.toString(),i="_asArray",-1!==r.indexOf(i,r.length-i.length))||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function;var r,i}function f(e){var t=0;if(e instanceof Object)for(var n in e)d(e,n)||t++;return t}function m(t,n,r){return 0==e.jsonPropertiesFilter.length||""==r||a(e.jsonPropertiesFilter,t,n,r)}function h(t){var n=[];if(t instanceof Object)for(var r in t)-1==r.toString().indexOf("__")&&0==r.toString().indexOf(e.attributePrefix)&&n.push(r);return n}function g(t){var n="";return t instanceof Object?n+=function(t){var n="";return null!=t.__cdata&&(n+=""),null!=t.__text&&(e.escapeMode?n+=i(t.__text):n+=t.__text),n}(t):null!=t&&(e.escapeMode?n+=i(t):n+=t),n}function v(e,t){return""===e?t:e+"."+t}function y(e,t,n,r){var i="";if(0==e.length)i+=u(e,t,n,!0);else for(var a=0;a0)for(var r in e)if(!d(e,r)&&(""==t||m(e,r,v(t,r)))){var i=e[r],a=h(i);if(null==i||null==i)n+=u(i,r,a,!0);else if(i instanceof Object)if(i instanceof Array)n+=y(i,r,a,t);else if(i instanceof Date)n+=u(i,r,a,!1),n+=i.toISOString(),n+=p(i,r);else{f(i)>0||null!=i.__text||null!=i.__cdata?(n+=u(i,r,a,!1),n+=x(i,v(t,r)),n+=p(i,r)):n+=u(i,r,a,!0)}else n+=u(i,r,a,!1),n+=g(i),n+=p(i,r)}return n+=g(e)}this.parseXmlString=function(e){var t;if(void 0===e)return null;if(r){var n=new r,i=null;try{i=n.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){i=null}try{t=n.parseFromString(e,"text/xml"),null!=i&&t.getElementsByTagNameNS(i,"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?s(e):e},this.xml2json=function(e){return l(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return x(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 r).parseFromString(e,"text/xml"),n=(new i).xml2json(t);return n.html&&n.getElementsByTagName("parsererror").length?null:n}},function(e,t,n){var r=n(2);t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer,t.DOMParser=n(16).DOMParser},function(e,t,n){var r=n(1),i=n(2),a=n(17),o=n(18),s=i.DOMImplementation,c=r.NAMESPACE,l=o.ParseError,u=o.XMLReader;function p(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,r=new u,i=n.domBuilder||new f,o=n.errorHandler,s=n.locator,l=n.xmlns||{},d=/\/x?html?$/.test(t),m=d?a.HTML_ENTITIES:a.XML_ENTITIES;s&&i.setDocumentLocator(s),r.errorHandler=function(e,t,n){if(!e){if(t instanceof f)return t;e=t}var r={},i=e instanceof Function;function a(t){var a=e[t];!a&&i&&(a=2==e.length?function(n){e(t,n)}:e),r[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"),r}(o,i,s),r.domBuilder=n.domBuilder||i,d&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var h=n.normalizeLineEndings||p;return e&&"string"==typeof e?r.parse(h(e),l,m):r.errorHandler.error("invalid doc source"),i.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,r){var i=this.doc,a=i.createElementNS(e,n||t),o=r.length;g(this,a),this.currentElement=a,this.locator&&m(this.locator,a);for(var s=0;s",lt:"<",quot:'"'}),t.HTML_ENTITIES=r({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},function(e,t,n){var r=n(1).NAMESPACE,i=/[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"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+i.source+a.source+"*(?::"+i.source+a.source+"*)?$"),s=0,c=1,l=2,u=3,p=4,d=5,f=6,m=7;function h(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,h)}function g(){}function v(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function y(e,t,n,i,a,o){function h(e,t,r){n.attributeNames.hasOwnProperty(e)&&o.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),r)}for(var g,v=++t,y=s;;){var x=e.charAt(v);switch(x){case"=":if(y===c)g=e.slice(t,v),y=u;else{if(y!==l)throw new Error("attribute equal must after attrName");y=u}break;case"'":case'"':if(y===u||y===c){if(y===c&&(o.warning('attribute value must after "="'),g=e.slice(t,v)),t=v+1,!((v=e.indexOf(x,t))>0))throw new Error("attribute value no end '"+x+"' match");h(g,b=e.slice(t,v),t-1),y=d}else{if(y!=p)throw new Error('attribute value must after "="');h(g,b=e.slice(t,v),t),o.warning('attribute "'+g+'" missed start quot('+x+")!!"),t=v+1,y=d}break;case"/":switch(y){case s:n.setTagName(e.slice(t,v));case d:case f:case m:y=m,n.closed=!0;case p:case c:break;case l:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),y==s&&n.setTagName(e.slice(t,v)),v;case">":switch(y){case s:n.setTagName(e.slice(t,v));case d:case f:case m:break;case p:case c:"/"===(b=e.slice(t,v)).slice(-1)&&(n.closed=!0,b=b.slice(0,-1));case l:y===l&&(b=g),y==p?(o.warning('attribute "'+b+'" missed quot(")!'),h(g,b,t)):(r.isHTML(i[""])&&b.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+b+'" missed value!! "'+b+'" instead!!'),h(b,b,t));break;case u:throw new Error("attribute value missed!!")}return v;case"€":x=" ";default:if(x<=" ")switch(y){case s:n.setTagName(e.slice(t,v)),y=f;break;case c:g=e.slice(t,v),y=l;break;case p:var b=e.slice(t,v);o.warning('attribute "'+b+'" missed quot(")!!'),h(g,b,t);case d:y=f}else switch(y){case l:n.tagName;r.isHTML(i[""])&&g.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),h(g,g,t),t=v,y=c;break;case d:o.warning('attribute space is required"'+g+'"!!');case f:y=c,t=v;break;case u:y=p,t=v;break;case m:throw new Error("elements closed character '/' and '>' must be connected to")}}v++}}function x(e,t,n){for(var i=e.tagName,a=null,o=e.length;o--;){var s=e[o],c=s.qName,l=s.value;if((f=c.indexOf(":"))>0)var u=s.prefix=c.slice(0,f),p=c.slice(f+1),d="xmlns"===u&&p;else p=c,u=null,d="xmlns"===c&&"";s.localName=p,!1!==d&&(null==a&&(a={},w(n,n={})),n[d]=a[d]=l,s.uri=r.XMLNS,t.startPrefixMapping(d,l))}for(o=e.length;o--;){(u=(s=e[o]).prefix)&&("xml"===u&&(s.uri=r.XML),"xmlns"!==u&&(s.uri=n[u||""]))}var f;(f=i.indexOf(":"))>0?(u=e.prefix=i.slice(0,f),p=e.localName=i.slice(f+1)):(u=null,p=e.localName=i);var m=e.uri=n[u||""];if(t.startElement(m,p,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(m,p,i),a)for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&t.endPrefixMapping(u)}function b(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function k(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf(""))t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],c=!1,l=!1;o>3&&(/^public$/i.test(a[2][0])?(c=a[3][0],l=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var u=a[o-1];return n.startDTD(s,c,l),n.endDTD(),u.index+u[0].length}return-1}function S(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function T(){this.attributeNames={}}h.prototype=new Error,h.prototype.name=h.name,g.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),w(t,t={}),function(e,t,n,i,a){function o(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?o(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function c(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,s);f&&l(w),i.characters(n,0,t-w),w=t}}function l(t,n){for(;t>=p&&(n=d.exec(e));)u=n.index,p=u+n[0].length,f.lineNumber++;f.columnNumber=t-u+1}var u=0,p=0,d=/.*(?:\r\n?|\n)|.*$/g,f=i.locator,m=[{currentNSMap:t}],g={},w=0;for(;;){try{var E=e.indexOf("<",w);if(E<0){if(!e.substr(w).match(/^\s*$/)){var R=i.doc,A=R.createTextNode(e.substr(w));R.appendChild(A),i.currentElement=A}return}switch(E>w&&c(E),e.charAt(E+1)){case"/":var _=e.indexOf(">",E+3),N=e.substring(E+2,_).replace(/[ \t\n\r]+$/g,""),B=m.pop();_<0?(N=e.substring(E+2).replace(/[\s<].*/,""),a.error("end tag name: "+N+" is not complete:"+B.tagName),_=E+1+N.length):N.match(/\sw?w=_:c(Math.max(E,w)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},T.prototype={setTagName:function(e){if(!o.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!o.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=g,t.ParseError=h},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 r="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",i=new RegExp("^([^"+r+"])|^((x|X)(m|M)(l|L))|([^"+r+"-.0-9·̀-ͯ‿⁀])","g"),a=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,o=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 r=function(e,n,r,a,o){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(a).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(i,"_"));var l=[c,"<",e,r||""];return n&&n.length>0?(l.push(">"),l.push(n),o&&l.push(c),l.push("")):l.push("/>"),l.join("")};return function e(i,s,c){var l=n(i);switch((Array.isArray?Array.isArray(i):i instanceof Array)?l="array":i instanceof Date&&(l="date"),l){case"array":var u=[];return i.map((function(t){u.push(e(t,1,c+1))})),t.prettyPrint&&u.push("\n"),u.join("");case"date":return i.toJSON?i.toJSON():i+"";case"object":var p=[];for(var d in i)if(i.hasOwnProperty(d))if(i[d]instanceof Array)for(var f in i[d])i[d].hasOwnProperty(f)&&p.push(r(d,e(i[d][f],0,c+1),null,c+1,o(i[d][f]).length));else p.push(r(d,e(i[d],0,c+1),null,c+1));return t.prettyPrint&&p.length>0&&p.push("\n"),p.join("");case"function":return i();default:return t.escape?(""+i).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(a,""):""+i}}(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 r="",i="";return t&&("object"==n(t)?(t.xmlHeader&&(r=c(!!t.xmlHeader.standalone)),void 0!==t.docType&&(i="")):r=c()),[r,(t=t||{}).prettyPrint&&i?"\n":"",i,s(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t,n){var r=n(7),i=n(0),a={};e.exports.transferToTaskMethod=function(e,t){a[t]=e[t],e[t]=function(e,n){e.SkipTask?a[t].call(this,e,n):this._addTask(t,e,n)}},e.exports.init=function(e){var t,n,o=[],s={},c=0,l=0,u=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),t},p=(n=function(){t=0,e.emit("task-list-update",{list:i.map(o,u)}),e.emit("list-update",{list:i.map(o,u)})},function(){t||(t=setTimeout(n))}),d=function(){if(!(o.length<=e.options.UploadQueueSize)){for(var t=0;te.options.UploadQueueSize;){var n="waiting"===o[t].state||"checking"===o[t].state||"uploading"===o[t].state;o[t]&&n?t++:(s[o[t].id]&&delete s[o[t].id],o.splice(t,1),l--)}p()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;o[l]&&"waiting"!==o[l].state;)l++;if(!(l>=o.length)){var n=o[l];l++,c++,n.state="checking",n.params.onTaskStart&&n.params.onTaskStart(u(n)),!n.params.UploadData&&(n.params.UploadData={});var r=i.formatParams(n.api,n.params);a[n.api].call(e,r,(function(r,i){e._isRunningTask(n.id)&&("checking"!==n.state&&"uploading"!==n.state||(n.state=r?"error":"success",r&&(n.error=r),c--,p(),t(),n.callback&&n.callback(r,i),"success"===n.state&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)),d())})),p(),setTimeout(t)}}},m=function(t,n){var i=s[t];if(i){var a=i&&"waiting"===i.state,o=i&&("checking"===i.state||"uploading"===i.state);if("canceled"===n&&"canceled"!==i.state||"paused"===n&&a||"paused"===n&&o){if("paused"===n&&i.params.Body&&"function"==typeof i.params.Body.pipe)return;i.state=n,e.emit("inner-kill-task",{TaskId:t,toState:n});try{var l=i&&i.params&&i.params.UploadData.UploadId}catch(e){}"canceled"===n&&l&&r.removeUsing(l),p(),o&&(c--,f()),"canceled"===n&&(i.params&&(delete i.params.UploadData,delete i.params.Body,delete i.params),delete i.callback)}d()}};e._addTasks=function(t){i.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),p()},e._addTask=function(t,n,r,a){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||i.canFileSlice()||(t=c),n=i.formatParams(t,n);var l=i.uuid();n.TaskId=l,n.onTaskReady&&n.onTaskReady(l);var u={params:n,callback:r,api:t,index:o.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(u.id)&&(u.hashPercent=t.percent,m&&m(t),p())};var h=n.onProgress;return n.onProgress=function(t){e._isRunningTask(u.id)&&("checking"===u.state&&(u.state="uploading"),u.loaded=t.loaded,u.size=t.total,u.speed=t.speed,u.percent=t.percent,h&&h(t),p())},i.getFileSize(t,n,(function(e,t){e?r(e):(s[l]=u,o.push(u),u.size=t,!a&&p(),f(),d())})),l},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return i.map(o,u)},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",p(),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,r).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,o).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,r).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,o).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+=i.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;return(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")};function u(e,t){var n=i.clone(e.Headers),r="";i.each(n,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete n[t],"host"===t.toLowerCase()&&(r=e)}));var a=!1!==e.ForceSignHost;!r&&e.SignHost&&a&&(n.Host=e.SignHost);var o=!1,s=function(e,n){o||(o=!0,n&&n.XCosSecurityToken&&!n.SecurityToken&&((n=i.clone(n)).SecurityToken=n.XCosSecurityToken,delete n.XCosSecurityToken),t&&t(e,n))},c=this,l=e.Bucket||"",u=e.Region||"",p="name/cos:PostObject"!==e.Action&&e.Key?e.Key:"";c.options.ForcePathStyle&&l&&(p=l+"/"+p);var d="/"+p,f={},m=e.Scope;if(!m){var h=e.Action||"",g=e.ResourceKey||e.Key||"";m=e.Scope||[{action:h,bucket:l,region:u,prefix:g}]}var v=i.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(i.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 r={Authorization:i.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||"",SignFrom:"client"};s(null,r)},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 i.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return i.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return i.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return i.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return i.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return i.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return i.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(f.ExpiredTime&&f.ExpiredTime-i.getSkewTime(c.options.SystemClockOffset)/1e3>60)x();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:l,Region:u,Method:e.Method,Key:p,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:i.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,SignFrom:"client"},s(null,y),y;c.options.getSTS.call(c,{Bucket:l,Region:u},(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 p(e){var t=!1,n=!1,r=!1,a=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var o=e.error.Code,s=e.error.Message;("RequestTimeTooSkewed"===o||"AccessDenied"===o&&"Request has expired"===s)&&(r=!0)}catch(e){}if(e){if(r&&a){var c=Date.parse(a);this.options.CorrectClockSkew&&Math.abs(i.getSkewTime(this.options.SystemClockOffset)-c)>=3e4&&(this.options.SystemClockOffset=c-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);if(e.statusCode){var l=Math.floor(e.statusCode/100),u=(null==e?void 0:e.headers)&&(null==e?void 0:e.headers["x-cos-request-id"]);[3,4,5].includes(l)&&!u&&(t=this.options.AutoSwitchHost,n=!0)}else t=this.options.AutoSwitchHost,n=!0}return{canRetry:t,networkError:n}}function d(e){var t=e.requestUrl,n=e.clientCalcSign,r=e.networkError;if(!this.options.AutoSwitchHost)return!1;if(!t)return!1;if(!n)return!1;if(!r)return!1;return/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/.test(t)&&!/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/.test(t)}function f(e,t){var n=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=i.clearKey(e.qs),e.headers&&(e.headers=i.clearKey(e.headers)),e.qs&&(e.qs=i.clearKey(e.qs));var r=i.clone(e.qs);e.action&&(r[e.action]="");var a=e.url||e.Url,o=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:a}),s=e.tracker;!function i(a){var c=n.options.SystemClockOffset;e.SwitchHost&&(o=o.replace(/myqcloud.com/,"tencentcos.cn")),s&&s.setParams({signStartTime:(new Date).getTime(),retryTimes:a-1}),u.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:r,Headers:e.headers,SignHost:o,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(r,o){r?t(r):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=o,m.call(n,e,(function(r,l){var u=!1,f=!1;if(r){var m=p.call(n,r);u=m.canRetry||c!==n.options.SystemClockOffset,f=m.networkError}if(s&&s.setParams({httpEndTime:(new Date).getTime()}),r&&a<2&&u){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"]);var h=d.call(n,{requestUrl:(null==r?void 0:r.url)||"",clientCalcSign:"client"===(null==o?void 0:o.SignFrom),networkError:f});e.SwitchHost=h,i(a+1)}else t(r,l)})))}))}(1)}function m(e,t){var n=this,a=e.TaskId;if(!a||n._isRunningTask(a)){var o=e.Bucket,s=e.Region,l=e.Key,u=e.method||"GET",p=e.url||e.Url,d=e.body,f=e.json,m=e.rawBody,h=e.dataType,g=n.options.HttpDNSServiceId;n.options.UseAccelerate&&(s="accelerate"),p=p||c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:o,region:s,object:l}),e.SwitchHost&&(p=p.replace(/myqcloud.com/,"tencentcos.cn")),e.action&&(p=p+"?"+e.action),e.qsStr&&(p=p.indexOf("?")>-1?p+"&"+e.qsStr:p+"?"+e.qsStr);var v={method:u,url:p,headers:e.headers,qs:e.qs,filePath:e.filePath,body:d,json:f,httpDNSServiceId:g,dataType:h},y="x-cos-security-token";i.isCIHost(p)&&(y="x-ci-security-token"),v.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(v.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(v.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(v.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(v.headers[y]=e.AuthData.SecurityToken),v.headers&&(v.headers=i.clearKey(v.headers)),v=i.clearKey(v),e.onProgress&&"function"==typeof e.onProgress&&(v.onProgress=function(t){if(!a||n._isRunningTask(a)){var r=t?t.loaded:0;e.onProgress({loaded:r,total:t.total})}}),this.options.Timeout&&(v.timeout=this.options.Timeout),n.options.ForcePathStyle&&(v.pathStyle=n.options.ForcePathStyle),n.emit("before-send",v);var x=v.url.includes("accelerate."),b=v.qs?Object.keys(v.qs).map((function(e){return"".concat(e,"=").concat(v.qs[e])})).join("&"):"",k=b?v.url+"?"+b:v.url;e.tracker&&e.tracker.setParams({reqUrl:k,accelerate:x?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:k,accelerate:x?"Y":"N"});var w=r(v,(function(e,r,o){if("abort"!==e){var s,c=function(e,o){if(a&&n.off("inner-kill-task",C),!s){s=!0;var c={};r&&r.statusCode&&(c.statusCode=r.statusCode),r&&r.headers&&(c.headers=r.headers),e?(v.url&&(c.url=v.url),v.method&&(c.method=v.method),e=i.extend(e||{},c),t(e,null)):(o=i.extend(o||{},c),t(null,o)),w=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=o;else try{l=o&&o.indexOf("<")>-1&&o.indexOf(">")>-1&&i.xml2json(o)||{}}catch(e){l=o||{}}var u=r.statusCode;2===Math.floor(u/100)?l.Error?c({error:l.Error}):c(null,l):c({error:l.Error||l})}}})),C=function e(t){t.TaskId===a&&(w&&w.abort&&w.abort(),n.off("inner-kill-task",e))};a&&n.on("inner-kill-task",C)}}var h={getService:function(e,t){"function"==typeof e&&(t=e,e={});var n="https:",r=this.options.ServiceDomain,a=e.Region;r?(r=r.replace(/\{\{Region\}\}/gi,a||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(r)||(r=n+"//"+r),"/"===r.slice(-1)&&(r=r.slice(0,-1))):r=a?n+"//cos."+a+".myqcloud.com":n+"//service.cos.myqcloud.com";r.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),f.call(this,{Action:"name/cos:GetService",url:r,method:"GET",headers:e.Headers},(function(e,n){if(e)return t(e);var r=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Buckets&&n.ListAllMyBucketsResult.Buckets.Bucket||[];r=i.isArray(r)?r:[r];var a=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:r,Owner:a,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,r="";if(e.BucketAZConfig){var a={BucketAZConfig:e.BucketAZConfig};r=i.json2xml({CreateBucketConfiguration:a})}f.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:r},(function(r,i){if(r)return t(r);var a=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:a,statusCode:i.statusCode,headers:i.headers})}))},headBucket:function(e,t){f.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,f.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 r=n.ListBucketResult||{},a=r.Contents||[],o=r.CommonPrefixes||[];a=i.isArray(a)?a:[a],o=i.isArray(o)?o:[o];var s=i.clone(r);i.extend(s,{Contents:a,CommonPrefixes:o,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},deleteBucket:function(e,t){f.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,r="";if(e.AccessControlPolicy){var a=i.clone(e.AccessControlPolicy||{}),o=a.Grants||a.Grant;o=i.isArray(o)?o:[o],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:o},r=i.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=i.binaryBase64(i.md5(r))}i.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),f.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:n,action:"acl",body:r},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketAcl:function(e,t){f.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 r=n.AccessControlPolicy||{},a=r.Owner||{},s=r.AccessControlList.Grant||[];s=i.isArray(s)?s:[s];var c=o(r);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=i.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=i.clone(i.isArray(n)?n:[n]),i.each(n,(function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",r=e[n]||e[t]||[];delete e[n],e[t]=i.isArray(r)?r:[r]}))}));var r={CORSRule:n};e.ResponseVary&&(r.ResponseVary=e.ResponseVary);var a=i.json2xml({CORSConfiguration:r}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"cors",headers:o},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketCors:function(e,t){f.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 r={CORSRules:[],statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else t(e);else{var a=n.CORSConfiguration||{},o=a.CORSRules||a.CORSRule||[];o=i.clone(i.isArray(o)?o:[o]);var s=a.ResponseVary;i.each(o,(function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",r=e[n]||e[t]||[];delete e[t],e[n]=i.isArray(r)?r:[r]}))})),t(null,{CORSRules:o,ResponseVary:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketCors:function(e,t){f.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){f.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){f.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 r={};try{r=JSON.parse(n.body)}catch(e){}t(null,{Policy:r,statusCode:n.statusCode,headers:n.headers})}))},putBucketPolicy:function(e,t){var n=e.Policy,r=n;try{"string"==typeof n?n=JSON.parse(r):r=JSON.stringify(n)}catch(e){t({error:"Policy format error"})}var a=e.Headers;a["Content-Type"]="application/json",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:r,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){f.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||{},r=n.TagSet||n.Tags||e.Tags||[];r=i.clone(i.isArray(r)?r:[r]);var a=i.json2xml({Tagging:{TagSet:{Tag:r}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"tagging",headers:o},(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){f.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 r={Tags:[],statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=i.clone(i.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketTagging:function(e,t){f.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=i.clone(n);var r=i.json2xml({LifecycleConfiguration:{Rule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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 r={Rules:[],statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else t(e);else{var a=[];try{a=n.LifecycleConfiguration.Rule||[]}catch(e){}a=i.clone(i.isArray(a)?a:[a]),t(null,{Rules:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketLifecycle:function(e,t){f.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||{},r=i.json2xml({VersioningConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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=i.clone(e.ReplicationConfiguration),r=i.json2xml({ReplicationConfiguration:n});r=(r=r.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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 r={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}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){f.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=i.clone(e.WebsiteConfiguration||{}),r=n.RoutingRules||n.RoutingRule||[];r=i.isArray(r)?r:[r],delete n.RoutingRule,delete n.RoutingRules,r.length&&(n.RoutingRules={RoutingRule:r});var a=i.json2xml({WebsiteConfiguration:n}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"website",headers:o},(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){f.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 r={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else t(e);else{var a=n.WebsiteConfiguration||{};if(a.RoutingRules){var o=i.clone(a.RoutingRules.RoutingRule||[]);o=i.makeArray(o),a.RoutingRules=o}t(null,{WebsiteConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketWebsite:function(e,t){f.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=i.clone(e.RefererConfiguration||{}),r=n.DomainList||{},a=r.Domains||r.Domain||[];(a=i.isArray(a)?a:[a]).length&&(n.DomainList={Domain:a});var o=i.json2xml({RefererConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,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){f.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 r={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else t(e);else{var a=n.RefererConfiguration||{};if(a.DomainList){var o=i.makeArray(a.DomainList.Domain||[]);a.DomainList={Domains:o}}t(null,{RefererConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},putBucketDomain:function(e,t){var n=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];n=i.clone(n);var r=i.json2xml({DomainConfiguration:{DomainRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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 r=[];try{r=n.DomainConfiguration.DomainRule||[]}catch(e){}r=i.clone(i.isArray(r)?r:[r]),t(null,{DomainRule:r,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketDomain:function(e,t){f.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=i.clone(n);var r=i.json2xml({OriginConfiguration:{OriginRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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 r=[];try{r=n.OriginConfiguration.OriginRule||[]}catch(e){}r=i.clone(i.isArray(r)?r:[r]),t(null,{OriginRule:r,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketOrigin:function(e,t){f.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=i.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=i.binaryBase64(i.md5(n)),f.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"logging",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})}))},getBucketLogging:function(e,t){f.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=i.clone(e.InventoryConfiguration);if(n.OptionalFields){var r=n.OptionalFields||[];n.OptionalFields={Field:r}}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 o=i.json2xml({InventoryConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,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){f.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 r=n.InventoryConfiguration;if(r&&r.OptionalFields&&r.OptionalFields.Field){var a=r.OptionalFields.Field;i.isArray(a)||(a=[a]),r.OptionalFields=a}if(r.Destination&&r.Destination.COSBucketDestination&&r.Destination.COSBucketDestination.Encryption){var o=r.Destination.COSBucketDestination.Encryption;Object.keys(o).indexOf("SSE-COS")>-1&&(o.SSECOS=o["SSE-COS"],delete o["SSE-COS"])}t(null,{InventoryConfiguration:r,statusCode:n.statusCode,headers:n.headers})}))},listBucketInventory:function(e,t){f.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 r=n.ListInventoryConfigurationResult,a=r.InventoryConfiguration||[];a=i.isArray(a)?a:[a],delete r.InventoryConfiguration,i.each(a,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;i.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"])}})),r.InventoryConfigurations=a,i.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)}))},deleteBucketInventory:function(e,t){f.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||{}},r=i.json2xml(n),a={"Content-Type":"application/xml"};a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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||{},r=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,f.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:r,rawBody:!0,dataType:e.DataType,tracker:a},(function(n,r){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(n)}t(null,{Body:r.body,ETag:i.attr(r.headers,"etag",""),statusCode:r.statusCode,headers:r.headers})}))},headObject:function(e,t){f.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,r){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0,statusCode:a}):t(n)}r.ETag=i.attr(r.headers,"etag",""),t(null,r)}))},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,f.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 r=n.ListVersionsResult||{},a=r.DeleteMarker||[];a=i.isArray(a)?a:[a];var o=r.Version||[];o=i.isArray(o)?o:[o];var s=i.clone(r);delete s.DeleteMarker,delete s.Version,i.extend(s,{DeleteMarkers:a,Versions:o,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},putObject:function(e,t){var n=this,r=e.ContentLength,o=i.throttleOnProgress.call(n,r,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,u=e.tracker;l&&u&&u.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(l,e.Body,(function(a){a&&(u&&u.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(s["Content-MD5"]=i.binaryBase64(a)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=a)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),o(null,!0),f.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:o,tracker:u},(function(a,s){if(a)return o(null,!0),t(a);o({loaded:r,total:r},!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=i.attr(s.headers,"etag",""),t(null,s)}))}))},postObject:function(e,t){var n=this,r={},a=e.FilePath;if(a){for(var o in r["Cache-Control"]=e.CacheControl,r["Content-Disposition"]=e.ContentDisposition,r["Content-Encoding"]=e.ContentEncoding,r["Content-MD5"]=e.ContentMD5,r["Content-Length"]=e.ContentLength,r["Content-Type"]=e.ContentType,r.Expect=e.Expect,r.Expires=e.Expires,r["x-cos-acl"]=e.ACL,r["x-cos-grant-read"]=e.GrantRead,r["x-cos-grant-write"]=e.GrantWrite,r["x-cos-grant-full-control"]=e.GrantFullControl,r["x-cos-storage-class"]=e.StorageClass,r["x-cos-mime-limit"]=e.MimeLimit,r["x-cos-traffic-limit"]=e.TrafficLimit,r["x-cos-forbid-overwrite"]=e.ForbidOverwrite,r["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,r["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,r["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,r["x-cos-server-side-encryption"]=e.ServerSideEncryption,r["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,r["x-cos-server-side-encryption-context"]=e.SSEContext,delete r["Content-Length"],delete r["content-length"],e)o.indexOf("x-cos-meta-")>-1&&(r[o]=e[o]);var s=i.throttleOnProgress.call(n,r["Content-Length"],e.onProgress);f.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:r,qs:e.Query,filePath:a,TaskId:e.TaskId,onProgress:s},(function(r,i){if(s(null,!0),r)return t(r);if(i&&i.headers){var o=i.headers,l=o.etag||o.Etag||o.ETag||"",u=a.substr(a.lastIndexOf("/")+1),p=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,u),isLocation:!0});return t(null,{Location:p,statusCode:i.statusCode,headers:o,ETag:l})}t(null,i)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){f.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 r=e.statusCode;return r&&204===r?t(null,{statusCode:r}):r&&404===r?t(null,{BucketNotFound:!0,statusCode:r}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectAcl:function(e,t){var n={};e.VersionId&&(n.versionId=e.VersionId),f.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:n,action:"acl"},(function(e,n){if(e)return t(e);var r=n.AccessControlPolicy||{},a=r.Owner||{},s=r.AccessControlList&&r.AccessControlList.Grant||[];s=i.isArray(s)?s:[s];var c=o(r);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=i.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,r="";if(e.AccessControlPolicy){var a=i.clone(e.AccessControlPolicy||{}),o=a.Grants||a.Grant;o=i.isArray(o)?o:[o],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:o},r=i.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=i.binaryBase64(i.md5(r))}i.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),f.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:n,body:r},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},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,f.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 r=n.headers||{};t(null,{AccessControlAllowOrigin:r["access-control-allow-origin"],AccessControlAllowMethods:r["access-control-allow-methods"],AccessControlAllowHeaders:r["access-control-allow-headers"],AccessControlExposeHeaders:r["access-control-expose-headers"],AccessControlMaxAge:r["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})}))},putObjectCopy:function(e,t){var n=e.Headers;!n["Cache-Control"]&&n["cache-control"]&&(n["Cache-Control"]="");var r=e.CopySource||"",a=i.getSourceParams.call(this,r);if(a){var o=a.Bucket,s=a.Region,c=decodeURIComponent(a.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:o,region:s,prefix:c},{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 r=i.clone(n.CopyObjectResult||{});i.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var n=e.Objects||[],r=e.Quiet;n=i.isArray(n)?n:[n];var a=i.json2xml({Delete:{Object:n,Quiet:r||!1}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a));var s=i.map(n,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));f.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:a,action:"delete",headers:o},(function(e,n){if(e)return t(e);var r=n.DeleteResult||{},a=r.Deleted||[],o=r.Error||[];a=i.isArray(a)?a:[a],o=i.isArray(o)?o:[o];var s=i.clone(r);i.extend(s,{Error:o,Deleted:a,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var r=e.RestoreRequest||{},a=i.json2xml({RestoreRequest:r});n["Content-Type"]="application/xml",n["Content-MD5"]=i.binaryBase64(i.md5(a)),f.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||{},r=n.TagSet||n.Tags||e.Tags||[];r=i.clone(i.isArray(r)?r:[r]);var a=i.json2xml({Tagging:{TagSet:{Tag:r}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:a,action:"tagging",headers:o,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){f.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 r={Tags:[],statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=i.clone(i.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteObjectTagging:function(e,t){f.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){f.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||"",r=i.getSourceParams.call(this,n);if(r){var a=r.Bucket,o=r.Region,s=decodeURIComponent(r.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,region:o,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,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},(function(e,n){if(e)return t(e);var r=i.clone(n.CopyPartResult||{});i.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var n=e.Headers,r=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"),f.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:r},(function(e,n){return e?(r&&r.parent&&r.parent.setParams({errorNode:"multipartInit"}),t(e)):(n=i.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,i.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)}))},multipartUpload:function(e,t){var n=this;i.getFileSize("multipartUpload",e,(function(){var r=e.tracker,a=n.options.UploadCheckContentMd5;a&&r&&r.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(a,e.Body,(function(o){o&&(e.Headers["Content-MD5"]=i.binaryBase64(o),a&&r&&r.setParams({md5EndTime:(new Date).getTime()})),r&&r.setParams({partNumber:e.PartNumber}),f.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:r},(function(e,n){if(e)return r&&r.parent&&r.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:i.attr(n.headers,"etag",{}),statusCode:n.statusCode,headers:n.headers})}))}))}))},multipartComplete:function(e,t){for(var n=this,r=e.UploadId,a=e.Parts,o=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(),r=new RegExp(t,"g");return e.replace(r,n)}(n.Authorization):"sign="+encodeURIComponent(n.Authorization)),n.SecurityToken&&(r+="&x-cos-security-token="+n.SecurityToken),n.ClientIP&&(r+="&clientIP="+n.ClientIP),n.ClientUA&&(r+="&clientUA="+n.ClientUA),n.Token&&(r+="&token="+n.Token),o&&(r+="&"+o),setTimeout((function(){t(null,{Url:r})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),o&&(s+="&"+o)):o&&(s+="?"+o),s},getAuth:function(e){return i.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(h,"postObject"),t.transferToTaskMethod(h,"putObject"),i.each(h,(function(t,n){e.prototype[n]=i.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 r=function(e,t){var r,i,a,o=[],s=function(e,t){var r=[];for(var i in e)e.hasOwnProperty(i)&&r.push(t?n(i).toLowerCase():i);return r.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(r=0;r-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:o,method:s,name:"file",header:a,filePath:i,formData:f,timeout:e.timeout,success:function(e){u(null,e)},fail:function(e){u(e.errMsg,e)}})).onProgressUpdate((function(e){c&&c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend,progress:e.progress/100})}))}else{var g=e.qs&&r(e.qs)||"";g&&(o+=(o.indexOf("?")>-1?"&":"?")+g),a["Content-Length"]&&delete a["Content-Length"];var v={url:o,method:s,header:a,dataType:"text",data:e.body,responseType:e.dataType||"text",timeout:e.timeout,redirect:"manual",success:function(e){u(null,e)},fail:function(e){u(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),n=wx.request(v)}return n}},function(e,t,n){"use strict";let r=n(24);e.exports=new r(n(25),n(26))},function(e,t,n){"use strict";function r(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;B(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}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 a(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){a(o,r,i,s,c,"next",e)}function c(e){a(o,r,i,s,c,"throw",e)}s(void 0)}))}}var s=n(7),c=n(28),l=n(6).EventProxy,u=n(0),p=n(4);function d(e,t){var n=e.TaskId,r=e.Bucket,i=e.Region,a=e.Key,o=e.StorageClass,p=this,d={},h=e.FileSize,g=e.SliceSize,v=Math.ceil(h/g),y=0,x=u.throttleOnProgress.call(p,h,e.onHashProgress),b=function(t,n){var r=t.length;if(0===r)return n(null,!0);if(r>v)return n(null,!1);if(r>1&&Math.max(t[0].Size,t[1].Size)!==g)return n(null,!1);!function i(a){if(a=c.length)k.emit("has_and_check_upload_id",t);else{var d=c[l];if(!u.isInArray(t,d))return s.removeUploadId(d),void o(l+1);s.using[d]?o(l+1):m.call(p,{Bucket:r,Region:i,Key:a,UploadId:d,tracker:e.tracker},(function(e,t){p._isRunningTask(n)&&(e?(s.removeUploadId(d),o(l+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(){f.call(p,{Bucket:r,Region:i,Key:a,tracker:e.tracker},(function(t,i){if(p._isRunningTask(n)){if(t)return k.emit("error",t);var c=u.filter(i.UploadList,(function(e){return e.Key===a&&(!o||e.StorageClass.toUpperCase()===o.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(c.length)k.emit("seek_local_avail_upload_id",c);else{var l,d=s.getFileId(e.FileStat,e.ChunkSize,r,a);d&&(l=s.getUploadIdList(d))&&u.each(l,(function(e){s.removeUploadId(e)})),k.emit("no_available_upload_id")}}}))})),k.emit("get_remote_upload_id_list")}function f(e,t){var n=this,r=[],i={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartList(i,(function(n,a){if(n)return t(n);r.push.apply(r,a.Upload||[]),"true"===a.IsTruncated?(i.KeyMarker=a.NextKeyMarker,i.UploadIdMarker=a.NextUploadIdMarker,e()):t(null,{UploadList:r})}))}()}function m(e,t){var n=this,r=[],i={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartListPart(i,(function(n,a){if(n)return t(n);r.push.apply(r,a.Part||[]),"true"===a.IsTruncated?(i.PartNumberMarker=a.NextPartNumberMarker,e()):t(null,{PartList:r})}))}()}function h(e,t){var n=this,r=e.TaskId,i=e.Bucket,a=e.Region,o=e.Key,s=e.UploadData,l=e.FileSize,p=e.SliceSize,d=Math.min(e.AsyncLimit||n.options.ChunkParallelLimit||1,256),f=e.FilePath,m=Math.ceil(l/p),h=0,v=e.ServerSideEncryption,y=u.filter(s.PartList,(function(e){return e.Uploaded&&(h+=e.PartNumber>=m&&l%p||p),!e.Uploaded})),x=e.onProgress;c.eachLimit(y,d,(function(t,c){if(n._isRunningTask(r)){var u=t.PartNumber,d=Math.min(l,t.PartNumber*p)-(t.PartNumber-1)*p,m=0;g.call(n,{TaskId:r,Bucket:i,Region:a,Key:o,SliceSize:p,FileSize:l,PartNumber:u,ServerSideEncryption:v,FilePath:f,UploadData:s,onProgress:function(e){h+=e.loaded-m,m=e.loaded,x({loaded:h,total:l})},tracker:e.tracker},(function(e,i){n._isRunningTask(r)&&(e?h-=m:(h+=d-m,t.ETag=i.ETag),x({loaded:h,total:l}),c(e||null,i))}))}}),(function(e){if(n._isRunningTask(r))return e?t(e):void t(null,{UploadId:s.UploadId,SliceList:s.PartList})}))}function g(e,t){var n=this,r=e.TaskId,i=e.Bucket,a=e.Region,o=e.Key,s=e.FileSize,l=e.FilePath,p=1*e.PartNumber,d=e.SliceSize,f=e.ServerSideEncryption,m=e.UploadData,h=n.options.ChunkRetryTimes+1,g=e.Headers||{},v=d*(p-1),y=d,x=v+d;x>s&&(y=(x=s)-v);var b=["x-cos-traffic-limit","x-cos-mime-limit"],k={};u.each(g,(function(e,t){b.indexOf(t)>-1&&(k[t]=e)})),u.fileSlice(l,v,x,(function(s){var l=u.getFileMd5(s),d=l?u.binaryBase64(l):null,g=m.PartList[p-1];c.retry(h,(function(t){n._isRunningTask(r)&&n.multipartUpload({TaskId:r,Bucket:i,Region:a,Key:o,ContentLength:y,PartNumber:p,UploadId:m.UploadId,ServerSideEncryption:f,Body:s,Headers:k,onProgress:e.onProgress,ContentMD5:d,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,i){if(n._isRunningTask(r))return e?t(e):(g.Uploaded=!0,t(null,i))}))}),(function(e,i){if(n._isRunningTask(r))return t(e,i)}))}))}function v(e,t){var n=e.Bucket,r=e.Region,i=e.Key,a=e.UploadId,o=e.SliceList,s=this,l=this.options.ChunkRetryTimes+1,u=o.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));c.retry(l,(function(t){s.multipartComplete({Bucket:n,Region:r,Key:i,UploadId:a,Parts:u,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,n){t(e,n)}))}function y(e,t){var n=e.Bucket,r=e.Region,i=e.Key,a=e.AbortArray,o=e.AsyncLimit||1,s=this,l=0,u=new Array(a.length);c.eachLimit(a,o,(function(t,a){var o=l;if(i&&i!==t.Key)return u[o]={error:{KeyNotMatch:!0}},void a(null);var c=t.UploadId||t.UploadID;s.multipartAbort({Bucket:n,Region:r,Key:t.Key,Headers:e.Headers,UploadId:c},(function(e){var i={Bucket:n,Region:r,Key:t.Key,UploadId:c};u[o]={error:e,task:i},a(null)})),l++}),(function(e){if(e)return t(e);for(var n=[],r=[],i=0,a=u.length;io?"sliceUploadFile":g,s.push({api:v,params:t,callback:h}),a._addTasks(s);case 24:case"end":return e.stop()}}),e,this,[[3,9]])})))).apply(this,arguments)}function b(){return b=o(r().mark((function e(t,n){var a,s,c,l,d,f,m,h,g,v,y;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,s=void 0===t.SliceSize?a.options.SliceSize:t.SliceSize,c=0,l=0,d=u.throttleOnProgress.call(a,l,t.onProgress),f=t.files.length,m=t.onFileFinish,h=Array(f),g=function(e,t,r){d(null,!0),m&&m(e,t,r),h[r.Index]={options:r,error:e,data:t},--f<=0&&n&&n(null,{files:h})},v=[],y=function(){return t.files.map((function(e,t){return new Promise(function(){var n=o(r().mark((function n(o){var f,m,h,y,x,b,k,w,C,S;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return f=0,n.prev=1,n.next=4,u.getFileSizeByPath(e.FilePath);case 4:f=n.sent,n.next=9;break;case 7:n.prev=7,n.t0=n.catch(1);case 9:m={Index:t,TaskId:""},c+=f,a.options.EnableTracker&&(h=a.options.UseAccelerate||"string"==typeof a.options.Domain&&a.options.Domain.includes("accelerate."),e.tracker=new p({Beacon:a.options.Beacon,bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:f,accelerate:h,deepTracker:a.options.DeepTracker,customId:a.options.CustomId,delay:a.options.TrackerDelay})),u.each(e,(function(e,t){"object"!==i(e)&&"function"!=typeof e&&(m[t]=e)})),y=e.onTaskReady,e.onTaskReady=function(e){m.TaskId=e,y&&y(e)},x=0,b=e.onProgress,e.onProgress=function(e){l=l-x+e.loaded,x=e.loaded,b&&b(e),d({loaded:l,total:c})},k=e.onFileFinish,w=function(t,n){e.tracker&&e.tracker.formatResult(t,n),k&&k(t,n),g&&g(t,n,m)},C="postObject"===a.options.SimpleUploadMethod?"postObject":"putObject",S=f>s?"sliceUploadFile":C,v.push({api:S,params:e,callback:w}),o(!0);case 24:case"end":return n.stop()}}),n,null,[[1,7]])})));return function(e){return n.apply(this,arguments)}}())}))},e.next=13,Promise.all(y());case 13:a._addTasks(v);case 14:case"end":return e.stop()}}),e,this)}))),b.apply(this,arguments)}function k(e,t){var n=e.TaskId,r=e.Bucket,i=e.Region,a=e.Key,o=e.CopySource,s=e.UploadId,l=1*e.PartNumber,u=e.CopySourceRange,p=this.options.ChunkRetryTimes+1,d=this;c.retry(p,(function(t){d.uploadPartCopy({TaskId:n,Bucket:r,Region:i,Key:a,CopySource:o,UploadId:s,PartNumber:l,CopySourceRange:u,onProgress:e.onProgress},(function(e,n){t(e||null,n)}))}),(function(e,n){return t(e,n)}))}var w={sliceUploadFile:function(e,t){var n=this;if(!u.canFileSlice())return e.SkipTask=!0,void("postObject"===n.options.SimpleUploadMethod?n.postObject(e,t):n.putObject(e,t));var r,i,a=new l,o=e.TaskId,c=e.Bucket,p=e.Region,f=e.Key,m=e.FilePath,g=e.ChunkSize||e.SliceSize||n.options.ChunkSize,y=e.AsyncLimit,x=e.StorageClass,b=e.ServerSideEncryption,k=e.onHashProgress,w=e.tracker;w&&w.setParams({chunkSize:g}),a.on("error",(function(r){if(n._isRunningTask(o)){var i={UploadId:e.UploadData.UploadId||"",err:r,error:r};return t(i)}})),a.on("upload_complete",(function(n){var r=u.extend({UploadId:e.UploadData.UploadId||""},n);t(null,r)})),a.on("upload_slice_complete",(function(e){v.call(n,{Bucket:c,Region:p,Key:f,UploadId:e.UploadId,SliceList:e.SliceList,tracker:w},(function(t,c){if(n._isRunningTask(o)){if(s.removeUsing(e.UploadId),t)return i(null,!0),a.emit("error",t);s.removeUploadId(e.UploadId),i({loaded:r,total:r},!0),a.emit("upload_complete",c)}}))})),a.on("get_upload_data_finish",(function(t){var l=s.getFileId(e.FileStat,e.ChunkSize,c,f);l&&s.saveUploadId(l,t.UploadId,n.options.UploadIdCacheLimit),s.setUsing(t.UploadId),i(null,!0),h.call(n,{TaskId:o,Bucket:c,Region:p,Key:f,FilePath:m,FileSize:r,SliceSize:g,AsyncLimit:y,ServerSideEncryption:b,UploadData:t,onProgress:i,tracker:w},(function(e,t){if(n._isRunningTask(o))return e?(i(null,!0),a.emit("error",e)):void a.emit("upload_slice_complete",t)}))})),a.on("get_file_size_finish",(function(){if(i=u.throttleOnProgress.call(n,r,e.onProgress),e.UploadData.UploadId)a.emit("get_upload_data_finish",e.UploadData);else{var t=u.extend({TaskId:o,Bucket:c,Region:p,Key:f,Headers:e.Headers,StorageClass:x,FilePath:m,FileSize:r,SliceSize:g,onHashProgress:k,tracker:w},e);t.FileSize=r,d.call(n,t,(function(t,r){if(n._isRunningTask(o)){if(t)return a.emit("error",t);e.UploadData.UploadId=r.UploadId,e.UploadData.PartList=r.PartList,a.emit("get_upload_data_finish",e.UploadData)}}))}})),r=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),u.each(e.Headers,(function(t,n){"content-length"===n.toLowerCase()&&delete e.Headers[n]})),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],i=1048576,a=0;a=S&&y%b||b),!e.Uploaded}));c.eachLimit(d,w,(function(t,n){var s=t.PartNumber,l=t.CopySourceRange,u=t.end-t.start,d=0;c.retry(C,(function(t){k.call(r,{Bucket:i,Region:a,Key:o,CopySource:p,UploadId:e.UploadId,PartNumber:s,CopySourceRange:l,onProgress:function(e){T+=e.loaded-d,d=e.loaded,x({loaded:T,total:y})}},t)}),(function(e,r){if(e)return n(e);x({loaded:T,total:y}),T+=u-d,t.ETag=r.ETag,n(e||null,r)}))}),(function(r){if(r)return s.removeUsing(e.UploadId),x(null,!0),t(r);n.emit("copy_slice_complete",e)}))})),n.on("get_chunk_size_finish",(function(){var c=function(){r.multipartInit({Bucket:i,Region:a,Key:o,Headers:A},(function(r,i){if(r)return t(r);e.UploadId=i.UploadId,n.emit("get_copy_data_finish",{UploadId:e.UploadId,PartList:e.PartList})}))},l=s.getCopyFileId(p,E,b,i,o),d=s.getUploadIdList(l);if(!l||!d)return c();!function t(l){if(l>=d.length)return c();var p=d[l];if(s.using[p])return t(l+1);m.call(r,{Bucket:i,Region:a,Key:o,UploadId:p},(function(r,i){if(r)s.removeUploadId(p),t(l+1);else{if(s.using[p])return t(l+1);var a={},o=0;u.each(i.PartList,(function(e){var t=parseInt(e.Size),n=o+t-1;a[e.PartNumber+"|"+o+"|"+n]=e.ETag,o+=t})),u.each(e.PartList,(function(e){var t=a[e.PartNumber+"|"+e.start+"|"+e.end];t&&(e.ETag=t,e.Uploaded=!0)})),n.emit("get_copy_data_finish",{UploadId:p,PartList:e.PartList})}}))}(0)})),n.on("get_file_size_finish",(function(){var i;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,i=0;i11&&(R[t]=e)})),n.emit("get_file_size_finish")}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(w,"sliceUploadFile"),u.each(w,(function(t,n){e.prototype[n]=u.apiWrapper(n,t)}))}},function(e,t){var n={eachLimit:function(e,t,n,r){if(r=r||function(){},!e.length||t<=0)return r();var i=0,a=0,o=0;!function s(){if(i>=e.length)return r();for(;o=e.length?r():s())}))}()},retry:function(e,t,n){e<1?n():function r(i){t((function(t,a){t&&i=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function a(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}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)}var o=r(9),s=r(12),c=r(13),l=r(18),p=r(19),u=p.btoa,d=wx.getFileSystemManager(),f=r(3);function m(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function h(e,t){var r=[];for(var n in e)e.hasOwnProperty(n)&&r.push(t?m(n).toLowerCase():n);return r.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var g=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],v=function(){},y=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&null!==e[r]&&(t[r]=e[r]);return t};function x(e){return C(e,(function(e){return"object"===i(e)&&null!==e?x(e):e}))}function b(e,t){return w(t,(function(r,n){e[n]=t[n]})),e}function k(e){return e instanceof Array}function w(e,t){for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)}function C(e,t){var r=k(e)?[]:{};for(var n in e)e.hasOwnProperty(n)&&(r[n]=t(e[n],n));return r}var S=function(e,t){if(t=b({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var r=t.Headers||{};if(t&&"object"===i(t)){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(r[e]=t[e])}();B.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-forbid-overwrite":"ForbidOverwrite","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,n){void 0!==t[e]&&(r[n]=t[e])})),t.Headers=y(r)}}return t},T=function(e){return new Promise((function(t,r){d.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){r((null==e?void 0:e.errMsg)||"")}})}))},E=function(){var e,t=(e=n().mark((function e(t,r,a){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}a(),e.next=21;break;case 4:if("putObject"!==t){e.next=20;break}if(void 0!==r.Body||!r.FilePath){e.next=17;break}return e.prev=6,e.next=9,T(r.FilePath);case 9:r.Body=e.sent,e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(6),r.Body=void 0,a({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==r.Body?(r.ContentLength=r.Body.byteLength,a(null,r.ContentLength)):a({error:"missing param Body"}),e.next=21;break;case 20:r.FilePath?d.stat({path:r.FilePath,success:function(e){var t=e.stats;r.FileStat=t,r.FileStat.FilePath=r.FilePath;var n=t.isDirectory()?0:t.size;r.ContentLength=n=n||0,a(null,n)},fail:function(e){a(e)}}):a({error:"missing param FilePath"});case 21:case"end":return e.stop()}}),e,null,[[6,12]])})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,c,"next",e)}function c(e){a(o,n,i,s,c,"throw",e)}s(void 0)}))});return function(e,r,n){return t.apply(this,arguments)}}(),R=function(e){return Date.now()+(e||0)},A=function(e,t){e=e.split("."),t=t.split(".");for(var r=Math.max(e.length,t.length);e.lengthi)return 1;if(a=0;!t&&e.platform;return function(){return!1,t}}(),B={noop:v,formatParams:S,apiWrapper:function(e,t){return function(r,n){var a,i=this;if("function"==typeof r&&(n=r,r={}),r=S(e,r),i.options.EnableReporter)if("sliceUploadFile"===r.calledBySdk||"sliceCopyFile"===r.calledBySdk)a=r.tracker&&r.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))a=null;else{var o=0;r.Body&&(o="string"==typeof r.Body?r.Body.length:r.Body.size||r.Body.byteLength||0);var s=i.options.UseAccelerate||"string"==typeof i.options.Domain&&i.options.Domain.includes("accelerate.");a=new f({Beacon:i.options.BeaconReporter,clsReporter:i.options.ClsReporter,bucket:r.Bucket,region:r.Region,apiName:e,realApi:e,accelerate:s,fileKey:r.Key,fileSize:o,deepTracker:i.options.DeepTracker,customId:i.options.CustomId,delay:i.options.TrackerDelay})}r.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.report(e,t),n&&n(c(e),c(t))},p=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var r=t.Bucket,n=t.Region,a=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!r)return"Bucket";if(!n)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e||"uploadFile"===e){if(!r)return"Bucket";if(!n)return"Region";if(!a)return"Key"}return!1}(e,r);if(t)return"missing param "+t;if(r.Region){if(r.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(r.Region))return"Region format error.";!i.options.CompatibilityMode&&-1===r.Region.indexOf("-")&&"yfb"!==r.Region&&"default"!==r.Region&&r.Region}if(r.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(r.Bucket))if(r.AppId)r.Bucket=r.Bucket+"-"+r.AppId;else{if(!i.options.AppId)return'Bucket should format as "test-1250000000".';r.Bucket=r.Bucket+"-"+i.options.AppId}r.AppId&&delete r.AppId}r.Key&&"/"===r.Key.substr(0,1)&&(r.Key=r.Key.substr(1))}}(),u=["getAuth","getObjectUrl"].includes(e);if(!u&&!n)return new Promise((function(e,a){if(n=function(t,r){t?a(t):e(r)},p)return l({error:p});t.call(i,r,l)}));if(p)return l({error:p});var d=t.call(i,r,l);return u?d:void 0}},xml2json:c,json2xml:l,md5:o,clearKey:y,fileSlice:function(e,t,r,n){e?d.readFile({filePath:e,position:t,length:r-t,success:function(e){n(e.data)},fail:function(){n(null)}}):n(null)},getBodyMd5:function(e,t,r){r=r||v,e&&t&&t instanceof ArrayBuffer?B.getFileMd5(t,(function(e,t){r(t)})):r()},getFileMd5:function(e,t){var r=o(e);return t&&t(r),r},binaryBase64:function(e){var t,r,n,a="";for(t=0,r=e.length/2;t-1||g.indexOf(n)>-1)&&(t[r]=e[r])}return t}(x(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"),r&&n){var u=Math.round(R(e.SystemClockOffset)/1e3)-1,d=u,f=e.Expires||e.expires;d+=void 0===f?900:1*f||0;var m=r,v=a||u+";"+d,y=a||u+";"+d,b=h(c,!0).join(";").toLowerCase(),k=h(o,!0).join(";").toLowerCase(),w=s.HmacSHA1(y,n).toString(),C=[i,t,B.obj2str(o,!0),B.obj2str(c,!0),""].join("\n"),S=["sha1",v,s.SHA1(C).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+m,"q-sign-time="+v,"q-key-time="+y,"q-header-list="+b,"q-url-param-list="+k,"q-signature="+s.HmacSHA1(S,w).toString()].join("&")}},compareVersion:A,canFileSlice:_,isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},error:function(e,t){var r=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===i(t)&&null!==t&&(b(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=x(r)),e},getSourceParams:function(e){var t=this.options.CopySourceParser;if(t)return t(e);var r=e.match(/^([^.]+-\d+)\.cos(v6|-cdc|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return r?{Bucket:r[1],Region:r[3],Key:r[7]}:null},encodeBase64:function(e,t){var r=p.encode(e);return t&&(r=r.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),r}};e.exports=B},function(e,t,r){"use strict";function n(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var a=n({HTML:"text/html",isHTML:function(e){return e===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===i.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 r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.find=function(e,t,r){if(void 0===r&&(r=Array.prototype),e&&"function"==typeof r.find)return r.find.call(e,t);for(var n=0;n=0))throw new _(R,new Error(e.tagName+"@"+r));for(var a=t.length-1;n"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function M(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(M(e,t))return!0}while(e=e.nextSibling)}function F(){this.ownerDocument=this}function z(e,t,r,n){e&&e._inc++,r.namespaceURI===i.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function H(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var a=t.firstChild,i=0;a;)n[i++]=a,a=a.nextSibling;n.length=i,delete n[n.length]}}}function K(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function G(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function V(e){return e&&e.nodeType===U.ELEMENT_NODE}function W(e){return e&&e.nodeType===U.TEXT_NODE}function X(e,t){var r=e.childNodes||[];if(a(r,V)||G(t))return!1;var n=a(r,G);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function Q(e,t){var r=e.childNodes||[];if(a(r,(function(e){return V(e)&&e!==t})))return!1;var n=a(r,G);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function $(e,t,r){if(!function(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}(e))throw new _(E,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new _(R,"child not in parent");if(!function(e){return e&&(V(e)||W(e)||G(e)||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE)}(t)||G(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new _(E,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function J(e,t,r){var n=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var o=i.filter(V);if(o.length>1||a(i,W))throw new _(E,"More than one element or text in fragment");if(1===o.length&&!X(e,r))throw new _(E,"Element in fragment can not be inserted before doctype")}if(V(t)&&!X(e,r))throw new _(E,"Only one element can be added and only after doctype");if(G(t)){if(a(n,G))throw new _(E,"Only one doctype is allowed");var s=a(n,V);if(r&&n.indexOf(s)1||a(i,W))throw new _(E,"More than one element or text in fragment");if(1===o.length&&!Q(e,r))throw new _(E,"Element in fragment can not be inserted before doctype")}if(V(t)&&!Q(e,r))throw new _(E,"Only one element can be added and only after doctype");if(G(t)){if(a(n,(function(e){return G(e)&&e!==r})))throw new _(E,"Only one doctype is allowed");var s=a(n,V);if(r&&n.indexOf(s)=0;C--){if(""===(S=a[C]).prefix&&S.namespace===e.namespaceURI){u=S.namespace;break}}if(u!==e.namespaceURI)for(C=a.length-1;C>=0;C--){var S;if((S=a[C]).namespace===e.namespaceURI){S.prefix&&(p=S.prefix+":"+l);break}}}t.push("<",p);for(var T=0;T"),r&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):ge(c,t,r,n,a.slice()),c=c.nextSibling;else for(;c;)ge(c,t,r,n,a.slice()),c=c.nextSibling;t.push("")}else t.push("/>");return;case b:case w:for(c=e.firstChild;c;)ge(c,t,r,n,a.slice()),c=c.nextSibling;return;case f:return he(t,e.name,e.value);case m:return t.push(e.data.replace(/[<&>]/g,q));case h:return t.push("");case x:return t.push("\x3c!--",e.data,"--\x3e");case k:var _=e.publicId,B=e.systemId;if(t.push("");else if(B&&"."!=B)t.push(" SYSTEM ",B,">");else{var N=e.internalSubset;N&&t.push(" [",N,"]"),t.push(">")}return;case y:return t.push("");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,r){var n;switch(t.nodeType){case d:(n=t.cloneNode(!1)).ownerDocument=e;case w:break;case f:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var a=t.firstChild;a;)n.appendChild(ve(e,a,r)),a=a.nextSibling;return n}function ye(e,t,r){var n=new t.constructor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var i=t[a];"object"!=typeof i&&i!=n[a]&&(n[a]=i)}switch(t.childNodes&&(n.childNodes=new B),n.ownerDocument=e,n.nodeType){case d:var o=t.attributes,s=n.attributes=new D,c=o.length;s._ownerElement=n;for(var l=0;l=0&&e0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&r[n]===e)return n;t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(u,U),l(u,U.prototype),F.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==w){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===d&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),K(this,e)},replaceChild:function(e,t){Z(this,e,t,Y),e.ownerDocument=this,t&&this.removeChild(t),V(e)&&(this.documentElement=e)},importNode:function(e,t){return ve(this,e,t)},getElementById:function(e){var t=null;return M(this.documentElement,(function(r){if(r.nodeType==d&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=c(e);return new N(this,(function(r){var n=[];return t.length>0&&M(r.documentElement,(function(a){if(a!==r&&a.nodeType===d){var i=a.getAttribute("class");if(i){var o=e===i;if(!o){var s=c(i);o=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}o&&n.push(a)}}var l})),n}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new B,(t.attributes=new D)._ownerElement=t,t},createDocumentFragment:function(){var e=new pe;return e.ownerDocument=this,e.childNodes=new B,e},createTextNode:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new ue;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new ee,n=t.split(":"),a=r.attributes=new D;return r.childNodes=new B,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,a._ownerElement=r,r},createAttributeNS:function(e,t){var r=new te,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},p(F,U),ee.prototype={nodeType:d,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 r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===w?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 r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new N(this,(function(t){var r=[];return M(t,(function(n){n===t||n.nodeType!=d||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new N(this,(function(r){var n=[];return M(r,(function(a){a===r||a.nodeType!==d||"*"!==e&&a.namespaceURI!==e||"*"!==t&&a.localName!=t||n.push(a)})),n}))}},F.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,F.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,p(ee,U),te.prototype.nodeType=f,p(te,U),re.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(T[E])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},p(re,U),ne.prototype={nodeName:"#text",nodeType:m,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},p(ne,re),ae.prototype={nodeName:"#comment",nodeType:x},p(ae,re),ie.prototype={nodeName:"#cdata-section",nodeType:h},p(ie,re),oe.prototype.nodeType=k,p(oe,U),se.prototype.nodeType=C,p(se,U),ce.prototype.nodeType=v,p(ce,U),le.prototype.nodeType=g,p(le,U),pe.prototype.nodeName="#document-fragment",pe.prototype.nodeType=w,p(pe,U),ue.prototype.nodeType=y,p(ue,U),de.prototype.serializeToString=function(e,t,r){return fe.call(e,t,r)},U.prototype.toString=fe;try{if(Object.defineProperty){function be(e){switch(e.nodeType){case d:case w:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(be(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(N.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return be(this)},set:function(e){switch(this.nodeType){case d:case w: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}}}),xe=function(e,t,r){e["$$"+t]=r}}}catch(ke){}t.DocumentType=oe,t.DOMException=_,t.DOMImplementation=j,t.Element=ee,t.Node=U,t.NodeList=B,t.XMLSerializer=de},function(e,t,r){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)}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",p=s.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof x?t:x,i=Object.create(a.prototype),s=new O(n||[]);return o(i,"_invoke",{value:A(e,r,s)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",h="suspendedYield",g="executing",v="completed",y={};function x(){}function b(){}function k(){}var w={};u(w,c,(function(){return this}));var C=Object.getPrototypeOf,S=C&&C(C(D([])));S&&S!==r&&i.call(S,c)&&(w=S);var T=k.prototype=x.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(a,o,s,c){var l=f(e[a],e,o);if("throw"!==l.type){var p=l.arg,u=p.value;return u&&"object"==n(u)&&i.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(u).then((function(e){p.value=e,s(p)}),(function(e){return r("throw",e,s,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(i,i):i()}})}function A(t,r,n){var a=m;return function(i,o){if(a===g)throw new Error("Generator is already running");if(a===v){if("throw"===i)throw o;return{value:e,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var c=_(s,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=g;var l=f(t,r,n);if("normal"===l.type){if(a=n.done?v:h,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(a,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function B(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 N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(B,this),this.reset(!0)}function D(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,c,"next",e)}function c(e){i(o,n,a,s,c,"throw",e)}s(void 0)}))}}function s(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){for(var r=0;r=0;a--)t===n[a]&&n.splice(a,1)},e.emit=function(e,t){for(var n=r(e).map((function(e){return e})),a=0;a=0;r--){var a=n[r][2];(!a||a+2592e3=0;i--){var o=n[i];(o[0]===e&&o[1]===t||e!==o[0]&&0===o[0].indexOf(a))&&n.splice(i,1)}n.unshift([e,t,Math.round(Date.now()/1e3)]),n.length>r&&n.splice(r),l()}},removeUploadId:function(e){c(),delete p.using[e];for(var t=n.length-1;t>=0;t--)n[t][1]===e&&n.splice(t,1);l()}};e.exports=p},function(e,t,r){var n=r(8);e.exports=n},function(e,t,r){"use strict";var n=r(0),a=r(5),i=r(20),o=r(21),s=r(27),c=r(4),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",AutoSwitchHost:!1,CopySourceParser:null,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},p=function(e){if(this.options=n.extend(n.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.EnableReporter=this.options.BeaconReporter||this.options.ClsReporter,this.options.AppId,this.options.SecretId&&this.options.SecretId.indexOf(" "),this.options.SecretKey&&this.options.SecretKey.indexOf(" "),this.options.ForcePathStyle)throw new Error("ForcePathStyle is not supported");a.init(this),i.init(this)};o.init(p,i),s.init(p,i),p.util={md5:n.md5,xml2json:n.xml2json,json2xml:n.json2xml,encodeBase64:n.encodeBase64},p.getAuthorization=n.getAuth,p.version=c.version,e.exports=p},function(e,t,r){(function(e){var 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)}!function(){"use strict";var a="input is invalid type",i="object"===("undefined"==typeof window?"undefined":n(window)),o=i?window:{};o.JS_MD5_NO_WINDOW&&(i=!1),!i&&"object"===("undefined"==typeof self?"undefined":n(self))&&(o=self);var s,c=!o.JS_MD5_NO_COMMON_JS&&"object"===n(e)&&e.exports,l=r(11),p=!o.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,u="0123456789abcdef".split(""),d=[128,32768,8388608,-2147483648],f=[0,8,16,24],m=["hex","array","digest","buffer","arrayBuffer","base64"],h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),g=[];if(p){var v=new ArrayBuffer(68);s=new Uint8Array(v),g=new Uint32Array(v)}!o.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!p||!o.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===n(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e){return function(t){return new x(!0).update(t)[e]()}};function x(e){if(e)g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g,this.buffer8=s;else if(p){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}x.prototype.update=function(e){if(!this.finalized){var t,r=n(e);if("string"!==r){if("object"!==r)throw a;if(null===e)throw a;if(!p||e.constructor!==ArrayBuffer&&"ArrayBuffer"!==e.constructor.name){if(!(Array.isArray(e)||p&&ArrayBuffer.isView(e)))throw a}else e=new Uint8Array(e);t=!0}for(var i,o,s=0,c=e.length,l=this.blocks,u=this.buffer8;s>2]|=e[s]<>6,u[o++]=128|63&i):i<55296||i>=57344?(u[o++]=224|i>>12,u[o++]=128|i>>6&63,u[o++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++s)),u[o++]=240|i>>18,u[o++]=128|i>>12&63,u[o++]=128|i>>6&63,u[o++]=128|63&i);else for(o=this.start;s>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(l[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}},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=d[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()}},x.prototype.hash=function(){var e,t,r,n,a,i,o=this.blocks;this.first?t=((t=((e=((e=o[0]-680876937)<<7|e>>>25)-271733879<<0)^(r=((r=(-271733879^(n=((n=(-1732584194^2004318071&e)+o[1]-117830708)<<12|n>>>20)+e<<0)&(-271733879^e))+o[2]-1126478375)<<17|r>>>15)+n<<0)&(n^e))+o[3]-1316259209)<<22|t>>>10)+r<<0:(e=this.h0,t=this.h1,r=this.h2,t=((t+=((e=((e+=((n=this.h3)^t&(r^n))+o[0]-680876936)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+o[1]-389564586)<<12|n>>>20)+e<<0)&(e^t))+o[2]+606105819)<<17|r>>>15)+n<<0)&(n^e))+o[3]-1044525330)<<22|t>>>10)+r<<0),t=((t+=((e=((e+=(n^t&(r^n))+o[4]-176418897)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+o[5]+1200080426)<<12|n>>>20)+e<<0)&(e^t))+o[6]-1473231341)<<17|r>>>15)+n<<0)&(n^e))+o[7]-45705983)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(n^t&(r^n))+o[8]+1770035416)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+o[9]-1958414417)<<12|n>>>20)+e<<0)&(e^t))+o[10]-42063)<<17|r>>>15)+n<<0)&(n^e))+o[11]-1990404162)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(n^t&(r^n))+o[12]+1804603682)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+o[13]-40341101)<<12|n>>>20)+e<<0)&(e^t))+o[14]-1502002290)<<17|r>>>15)+n<<0)&(n^e))+o[15]+1236535329)<<22|t>>>10)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+o[1]-165796510)<<5|e>>>27)+t<<0)^t))+o[6]-1069501632)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+o[11]+643717713)<<14|r>>>18)+n<<0)^n))+o[0]-373897302)<<20|t>>>12)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+o[5]-701558691)<<5|e>>>27)+t<<0)^t))+o[10]+38016083)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+o[15]-660478335)<<14|r>>>18)+n<<0)^n))+o[4]-405537848)<<20|t>>>12)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+o[9]+568446438)<<5|e>>>27)+t<<0)^t))+o[14]-1019803690)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+o[3]-187363961)<<14|r>>>18)+n<<0)^n))+o[8]+1163531501)<<20|t>>>12)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+o[13]-1444681467)<<5|e>>>27)+t<<0)^t))+o[2]-51403784)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+o[7]+1735328473)<<14|r>>>18)+n<<0)^n))+o[12]-1926607734)<<20|t>>>12)+r<<0,t=((t+=((i=(n=((n+=((a=t^r)^(e=((e+=(a^n)+o[5]-378558)<<4|e>>>28)+t<<0))+o[8]-2022574463)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+o[11]+1839030562)<<16|r>>>16)+n<<0))+o[14]-35309556)<<23|t>>>9)+r<<0,t=((t+=((i=(n=((n+=((a=t^r)^(e=((e+=(a^n)+o[1]-1530992060)<<4|e>>>28)+t<<0))+o[4]+1272893353)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+o[7]-155497632)<<16|r>>>16)+n<<0))+o[10]-1094730640)<<23|t>>>9)+r<<0,t=((t+=((i=(n=((n+=((a=t^r)^(e=((e+=(a^n)+o[13]+681279174)<<4|e>>>28)+t<<0))+o[0]-358537222)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+o[3]-722521979)<<16|r>>>16)+n<<0))+o[6]+76029189)<<23|t>>>9)+r<<0,t=((t+=((i=(n=((n+=((a=t^r)^(e=((e+=(a^n)+o[9]-640364487)<<4|e>>>28)+t<<0))+o[12]-421815835)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+o[15]+530742520)<<16|r>>>16)+n<<0))+o[2]-995338651)<<23|t>>>9)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+o[0]-198630844)<<6|e>>>26)+t<<0)|~r))+o[7]+1126891415)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+o[14]-1416354905)<<15|r>>>17)+n<<0)|~e))+o[5]-57434055)<<21|t>>>11)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+o[12]+1700485571)<<6|e>>>26)+t<<0)|~r))+o[3]-1894986606)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+o[10]-1051523)<<15|r>>>17)+n<<0)|~e))+o[1]-2054922799)<<21|t>>>11)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+o[8]+1873313359)<<6|e>>>26)+t<<0)|~r))+o[15]-30611744)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+o[6]-1560198380)<<15|r>>>17)+n<<0)|~e))+o[13]+1309151649)<<21|t>>>11)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+o[4]-145523070)<<6|e>>>26)+t<<0)|~r))+o[11]-1120210379)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+o[2]+718787259)<<15|r>>>17)+n<<0)|~e))+o[9]-343485551)<<21|t>>>11)+r<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=r-1732584194<<0,this.h3=n+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+n<<0)},x.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3;return u[e>>4&15]+u[15&e]+u[e>>12&15]+u[e>>8&15]+u[e>>20&15]+u[e>>16&15]+u[e>>28&15]+u[e>>24&15]+u[t>>4&15]+u[15&t]+u[t>>12&15]+u[t>>8&15]+u[t>>20&15]+u[t>>16&15]+u[t>>28&15]+u[t>>24&15]+u[r>>4&15]+u[15&r]+u[r>>12&15]+u[r>>8&15]+u[r>>20&15]+u[r>>16&15]+u[r>>28&15]+u[r>>24&15]+u[n>>4&15]+u[15&n]+u[n>>12&15]+u[n>>8&15]+u[n>>20&15]+u[n>>16&15]+u[n>>28&15]+u[n>>24&15]},x.prototype.toString=x.prototype.hex,x.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=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&r,r>>8&255,r>>16&255,r>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255]},x.prototype.array=x.prototype.digest,x.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},x.prototype.buffer=x.prototype.arrayBuffer,x.prototype.base64=function(){for(var e,t,r,n="",a=this.array(),i=0;i<15;)e=a[i++],t=a[i++],r=a[i++],n+=h[e>>>2]+h[63&(e<<4|t>>>4)]+h[63&(t<<2|r>>>6)]+h[63&r];return e=a[i],n+=h[e>>>2]+h[e<<4&63]+"=="};var b=function(){var e=y("hex");e.getCtx=e.create=function(){return new x},e.update=function(t){return e.create().update(t)};for(var t=0;t>>2]|=(r[a>>>2]>>>24-a%4*8&255)<<24-(n+a)%4*8;else if(65535>>2]=r[a>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;n>>2]>>>24-n%4*8&255;r.push((a>>>4).toString(16)),r.push((15&a).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n>>2]>>>24-n%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,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=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.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 r=this._data,n=r.words,a=r.sigBytes,i=this.blockSize,s=a/(4*i);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,a=e.min(4*t,a),t){for(var c=0;cl;l++){if(16>l)i[l]=0|e[t+l];else{var p=i[l-3]^i[l-8]^i[l-14]^i[l-16];i[l]=p<<1|p>>>31}p=(n<<5|n>>>27)+c+i[l],p=20>l?p+(1518500249+(a&o|~a&s)):40>l?p+(1859775393+(a^o^s)):60>l?p+((a&o|a&s|o&s)-1894007588):p+((a^o^s)-899497514),c=s,s=o,o=a<<30|a>>>2,a=n,n=p}r[0]=r[0]+n|0,r[1]=r[1]+a|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(o),r.HmacSHA1=a._createHmacHelper(o),function(){var e=l,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,r){e=this._hasher=new e.init,"string"==typeof r&&(r=t.parse(r));var n=e.blockSize,a=4*n;r.sigBytes>a&&(r=e.finalize(r)),r.clamp();for(var i=this._oKey=r.clone(),o=this._iKey=r.clone(),s=i.words,c=o.words,l=0;l>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;a.length%4;)a.push(c);return a.join("")},parse:function(e){var t=e.length,r=this._map,n=r.charAt(64);if(n){var a=e.indexOf(n);-1!=a&&(t=a)}for(var i=[],o=0,s=0;s>>6-s%4*2;i[o>>>2]|=(l|p)<<24-o%4*8,o++}return c.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=l},function(e,t,r){var n=r(14).DOMParser,a=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={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function r(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function a(e){return"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):e}function i(e,t,r,n){for(var a=0;a0&&i(e.arrayAccessFormPaths,t,r,n)&&(t[r]=[t[r]])}function s(e){var t=e.split(/[-T:+Z]/g),r=new Date(t[0],t[1]-1,t[2]),n=t[5].split(".");if(r.setHours(t[3],t[4],n[0]),n.length>1&&r.setMilliseconds(n[1]),t[6]&&t[7]){var a=60*t[6]+Number(t[7]);a=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*a:a),r.setMinutes(r.getMinutes()-a-r.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function c(r,n,a,o){return!(n==t.ELEMENT_NODE&&e.xmlElementsFilter.length>0)||i(e.xmlElementsFilter,r,a,o)}function l(n,a){if(n.nodeType==t.DOCUMENT_NODE){for(var p=new Object,u=n.childNodes,d=0;d0){var a=n.split(".#")[0];return i(e.datetimeAccessFormPaths,t,r,a)?s(t):t}return t}(p.__text,m,a+"."+m)),null!=p["#cdata-section"]&&(p.__cdata=p["#cdata-section"],delete p["#cdata-section"],"property"==e.arrayAccessForm&&delete p["#cdata-section_asArray"]),0==p.__cnt&&"text"==e.emptyNodeForm?p="":1==p.__cnt&&null!=p.__text?p=p.__text:1!=p.__cnt||null==p.__cdata||e.keepCData?p.__cnt>1&&null!=p.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==p.__text||""==p.__text.trim())&&delete p.__text:p=p.__cdata,delete p.__cnt,!e.enableToStringFunc||null==p.__text&&null==p.__cdata||(p.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),p}if(n.nodeType==t.TEXT_NODE||n.nodeType==t.CDATA_SECTION_NODE)return n.nodeValue}function p(t,r,n,i){var o="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+r;if(null!=n)for(var s=0;s":">"}function u(e,t){return""}function d(t,r){return"property"==e.arrayAccessForm&&(n=r.toString(),a="_asArray",-1!==n.indexOf(a,n.length-a.length))||0==r.toString().indexOf(e.attributePrefix)||0==r.toString().indexOf("__")||t[r]instanceof Function;var n,a}function f(e){var t=0;if(e instanceof Object)for(var r in e)d(e,r)||t++;return t}function m(t,r,n){return 0==e.jsonPropertiesFilter.length||""==n||i(e.jsonPropertiesFilter,t,r,n)}function h(t){var r=[];if(t instanceof Object)for(var n in t)-1==n.toString().indexOf("__")&&0==n.toString().indexOf(e.attributePrefix)&&r.push(n);return r}function g(t){var r="";return t instanceof Object?r+=function(t){var r="";return null!=t.__cdata&&(r+=""),null!=t.__text&&(e.escapeMode?r+=a(t.__text):r+=t.__text),r}(t):null!=t&&(e.escapeMode?r+=a(t):r+=t),r}function v(e,t){return""===e?t:e+"."+t}function y(e,t,r,n){var a="";if(0==e.length)a+=p(e,t,r,!0);else for(var i=0;i0)for(var n in e)if(!d(e,n)&&(""==t||m(e,n,v(t,n)))){var a=e[n],i=h(a);if(null==a||null==a)r+=p(a,n,i,!0);else if(a instanceof Object)if(a instanceof Array)r+=y(a,n,i,t);else if(a instanceof Date)r+=p(a,n,i,!1),r+=a.toISOString(),r+=u(a,n);else{f(a)>0||null!=a.__text||null!=a.__cdata?(r+=p(a,n,i,!1),r+=x(a,v(t,n)),r+=u(a,n)):r+=p(a,n,i,!0)}else r+=p(a,n,i,!1),r+=g(a),r+=u(a,n)}return r+=g(e)}this.parseXmlString=function(e){var t;if(void 0===e)return null;if(n){var r=new n,a=null;try{a=r.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){a=null}try{t=r.parseFromString(e,"text/xml"),null!=a&&t.getElementsByTagNameNS(a,"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?s(e):e},this.xml2json=function(e){return l(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return x(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 n).parseFromString(e,"text/xml"),r=(new a).xml2json(t);return r.html&&r.getElementsByTagName("parsererror").length?null:r}},function(e,t,r){var n=r(2);t.DOMImplementation=n.DOMImplementation,t.XMLSerializer=n.XMLSerializer,t.DOMParser=r(15).DOMParser},function(e,t,r){var n=r(1),a=r(2),i=r(16),o=r(17),s=a.DOMImplementation,c=n.NAMESPACE,l=o.ParseError,p=o.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,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function g(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}d.prototype.parseFromString=function(e,t){var r=this.options,n=new p,a=r.domBuilder||new f,o=r.errorHandler,s=r.locator,l=r.xmlns||{},d=/\/x?html?$/.test(t),m=d?i.HTML_ENTITIES:i.XML_ENTITIES;s&&a.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof f)return t;e=t}var n={},a=e instanceof Function;function i(t){var i=e[t];!i&&a&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+function(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(o,a,s),n.domBuilder=r.domBuilder||a,d&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var h=r.normalizeLineEndings||u;return e&&"string"==typeof e?n.parse(h(e),l,m):n.errorHandler.error("invalid doc source"),a.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,r,n){var a=this.doc,i=a.createElementNS(e,r||t),o=n.length;g(this,i),this.currentElement=i,this.locator&&m(this.locator,i);for(var s=0;s",lt:"<",quot:'"'}),t.HTML_ENTITIES=n({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},function(e,t,r){var n=r(1).NAMESPACE,a=/[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]/,i=new RegExp("[\\-\\.0-9"+a.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+a.source+i.source+"*(?::"+a.source+i.source+"*)?$"),s=0,c=1,l=2,p=3,u=4,d=5,f=6,m=7;function h(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,h)}function g(){}function v(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function y(e,t,r,a,i,o){function h(e,t,n){r.attributeNames.hasOwnProperty(e)&&o.fatalError("Attribute "+e+" redefined"),r.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,i),n)}for(var g,v=++t,y=s;;){var x=e.charAt(v);switch(x){case"=":if(y===c)g=e.slice(t,v),y=p;else{if(y!==l)throw new Error("attribute equal must after attrName");y=p}break;case"'":case'"':if(y===p||y===c){if(y===c&&(o.warning('attribute value must after "="'),g=e.slice(t,v)),t=v+1,!((v=e.indexOf(x,t))>0))throw new Error("attribute value no end '"+x+"' match");h(g,b=e.slice(t,v),t-1),y=d}else{if(y!=u)throw new Error('attribute value must after "="');h(g,b=e.slice(t,v),t),o.warning('attribute "'+g+'" missed start quot('+x+")!!"),t=v+1,y=d}break;case"/":switch(y){case s:r.setTagName(e.slice(t,v));case d:case f:case m:y=m,r.closed=!0;case u:case c:break;case l:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),y==s&&r.setTagName(e.slice(t,v)),v;case">":switch(y){case s:r.setTagName(e.slice(t,v));case d:case f:case m:break;case u:case c:"/"===(b=e.slice(t,v)).slice(-1)&&(r.closed=!0,b=b.slice(0,-1));case l:y===l&&(b=g),y==u?(o.warning('attribute "'+b+'" missed quot(")!'),h(g,b,t)):(n.isHTML(a[""])&&b.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+b+'" missed value!! "'+b+'" instead!!'),h(b,b,t));break;case p:throw new Error("attribute value missed!!")}return v;case"€":x=" ";default:if(x<=" ")switch(y){case s:r.setTagName(e.slice(t,v)),y=f;break;case c:g=e.slice(t,v),y=l;break;case u:var b=e.slice(t,v);o.warning('attribute "'+b+'" missed quot(")!!'),h(g,b,t);case d:y=f}else switch(y){case l:r.tagName;n.isHTML(a[""])&&g.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),h(g,g,t),t=v,y=c;break;case d:o.warning('attribute space is required"'+g+'"!!');case f:y=c,t=v;break;case p:y=u,t=v;break;case m:throw new Error("elements closed character '/' and '>' must be connected to")}}v++}}function x(e,t,r){for(var a=e.tagName,i=null,o=e.length;o--;){var s=e[o],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==i&&(i={},w(r,r={})),r[d]=i[d]=l,s.uri=n.XMLNS,t.startPrefixMapping(d,l))}for(o=e.length;o--;){(p=(s=e[o]).prefix)&&("xml"===p&&(s.uri=n.XML),"xmlns"!==p&&(s.uri=r[p||""]))}var f;(f=a.indexOf(":"))>0?(p=e.prefix=a.slice(0,f),u=e.localName=a.slice(f+1)):(p=null,u=e.localName=a);var m=e.uri=r[p||""];if(t.startElement(m,u,a,e),!e.closed)return e.currentNSMap=r,e.localNSMap=i,!0;if(t.endElement(m,u,a),i)for(p in i)Object.prototype.hasOwnProperty.call(i,p)&&t.endPrefixMapping(p)}function b(e,t,r,n,a){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("",t),o=e.substring(t+1,i);if(/[&<]/.test(o))return/^script$/i.test(r)?(a.characters(o,0,o.length),i):(o=o.replace(/&#?\w+;/g,n),a.characters(o,0,o.length),i)}return t+1}function k(e,t,r,n){var a=n[r];return null==a&&((a=e.lastIndexOf(""))t?(r.comment(e,t+4,a-t-4),a+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,a-t-9),r.endCDATA(),a+3}var i=function(e,t){var r,n=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;a.lastIndex=t,a.exec(e);for(;r=a.exec(e);)if(n.push(r),r[1])return n}(e,t),o=i.length;if(o>1&&/!doctype/i.test(i[0][0])){var s=i[1][0],c=!1,l=!1;o>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],l=o>4&&i[4][0]):/^system$/i.test(i[2][0])&&(l=i[3][0]));var p=i[o-1];return r.startDTD(s,c,l),r.endDTD(),p.index+p[0].length}return-1}function S(e,t,r){var n=e.indexOf("?>",t);if(n){var a=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(a){a[0].length;return r.processingInstruction(a[1],a[2]),n+2}return-1}return-1}function T(){this.attributeNames={}}h.prototype=new Error,h.prototype.name=h.name,g.prototype={parse:function(e,t,r){var a=this.domBuilder;a.startDocument(),w(t,t={}),function(e,t,r,a,i){function o(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(r,t)?r[t]:"#"===t.charAt(0)?o(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function c(t){if(t>w){var r=e.substring(w,t).replace(/&#?\w+;/g,s);f&&l(w),a.characters(r,0,t-w),w=t}}function l(t,r){for(;t>=u&&(r=d.exec(e));)p=r.index,u=p+r[0].length,f.lineNumber++;f.columnNumber=t-p+1}var p=0,u=0,d=/.*(?:\r\n?|\n)|.*$/g,f=a.locator,m=[{currentNSMap:t}],g={},w=0;for(;;){try{var E=e.indexOf("<",w);if(E<0){if(!e.substr(w).match(/^\s*$/)){var R=a.doc,A=R.createTextNode(e.substr(w));R.appendChild(A),a.currentElement=A}return}switch(E>w&&c(E),e.charAt(E+1)){case"/":var _=e.indexOf(">",E+3),B=e.substring(E+2,_).replace(/[ \t\n\r]+$/g,""),N=m.pop();_<0?(B=e.substring(E+2).replace(/[\s<].*/,""),i.error("end tag name: "+B+" is not complete:"+N.tagName),_=E+1+B.length):B.match(/\sw?w=_:c(Math.max(E,w)+1)}}(e,t,r,a,this.errorHandler),a.endDocument()}},T.prototype={setTagName:function(e){if(!o.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!o.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},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=g,t.ParseError=h},function(e,t){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)}var n="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",a=new RegExp("^([^"+n+"])|^((x|X)(m|M)(l|L))|([^"+n+"-.0-9·̀-ͯ‿⁀])","g"),i=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,o=function(e){var t=[];if(e instanceof Object)for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t},s=function(e,t){var n=function(e,r,n,i,o){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(i).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(a,"_"));var l=[c,"<",e,n||""];return r&&r.length>0?(l.push(">"),l.push(r),o&&l.push(c),l.push("")):l.push("/>"),l.join("")};return function e(a,s,c){var l=r(a);switch((Array.isArray?Array.isArray(a):a instanceof Array)?l="array":a instanceof Date&&(l="date"),l){case"array":var p=[];return a.map((function(t){p.push(e(t,1,c+1))})),t.prettyPrint&&p.push("\n"),p.join("");case"date":return a.toJSON?a.toJSON():a+"";case"object":var u=[];for(var d in a)if(a.hasOwnProperty(d))if(a[d]instanceof Array)for(var f in a[d])a[d].hasOwnProperty(f)&&u.push(n(d,e(a[d][f],0,c+1),null,c+1,o(a[d][f]).length));else u.push(n(d,e(a[d],0,c+1),null,c+1));return t.prettyPrint&&u.length>0&&u.push("\n"),u.join("");case"function":return a();default:return t.escape?(""+a).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(i,""):""+a}}(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 n="",a="";return t&&("object"==r(t)?(t.xmlHeader&&(n=c(!!t.xmlHeader.standalone)),void 0!==t.docType&&(a="")):n=c()),[n,(t=t||{}).prettyPrint&&a?"\n":"",a,s(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t){var r=function(e){var t=(e=e||{}).Base64,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=function(e){for(var t={},r=0,n=e.length;r>>6)+a(128|63&t):a(224|t>>>12&15)+a(128|t>>>6&63)+a(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return a(240|t>>>18&7)+a(128|t>>>12&63)+a(128|t>>>6&63)+a(128|63&t)},o=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(o,i)},c=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[r.charAt(n>>>18),r.charAt(n>>>12&63),t>=2?"=":r.charAt(n>>>6&63),t>=1?"=":r.charAt(63&n)].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 a(55296+(t>>>10))+a(56320+(1023&t));case 3:return a((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return a((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},m=function(e){return e.replace(d,f)},h=function(e){var t=e.length,r=t%4,i=(t>0?n[e.charAt(0)]<<18:0)|(t>1?n[e.charAt(1)]<<12:0)|(t>2?n[e.charAt(2)]<<6:0)|(t>3?n[e.charAt(3)]:0),o=[a(i>>>16),a(i>>>8&255),a(255&i)];return o.length-=[0,0,2,1][r],o.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 r=e.Base64;return e.Base64=t,r}}}();e.exports=r},function(e,t,r){var n=r(6),a=r(0),i={};e.exports.transferToTaskMethod=function(e,t){i[t]=e[t],e[t]=function(e,r){e.SkipTask?i[t].call(this,e,r):this._addTask(t,e,r)}},e.exports.init=function(e){var t,r,o=[],s={},c=0,l=0,p=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),t},u=(r=function(){t=0,e.emit("task-list-update",{list:a.map(o,p)}),e.emit("list-update",{list:a.map(o,p)})},function(){t||(t=setTimeout(r))}),d=function(){if(!(o.length<=e.options.UploadQueueSize)){for(var t=0;te.options.UploadQueueSize;){var r="waiting"===o[t].state||"checking"===o[t].state||"uploading"===o[t].state;o[t]&&r?t++:(s[o[t].id]&&delete s[o[t].id],o.splice(t,1),l--)}u()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;o[l]&&"waiting"!==o[l].state;)l++;if(!(l>=o.length)){var r=o[l];l++,c++,r.state="checking",r.params.onTaskStart&&r.params.onTaskStart(p(r)),!r.params.UploadData&&(r.params.UploadData={});var n=a.formatParams(r.api,r.params);i[r.api].call(e,n,(function(n,a){e._isRunningTask(r.id)&&("checking"!==r.state&&"uploading"!==r.state||(r.state=n?"error":"success",n&&(r.error=n),c--,u(),t(),r.callback&&r.callback(n,a),"success"===r.state&&(r.params&&(delete r.params.UploadData,delete r.params.Body,delete r.params),delete r.callback)),d())})),u(),setTimeout(t)}}},m=function(t,r){var a=s[t];if(a){var i=a&&"waiting"===a.state,o=a&&("checking"===a.state||"uploading"===a.state);if("canceled"===r&&"canceled"!==a.state||"paused"===r&&i||"paused"===r&&o){if("paused"===r&&a.params.Body&&"function"==typeof a.params.Body.pipe)return;a.state=r,e.emit("inner-kill-task",{TaskId:t,toState:r});try{var l=a&&a.params&&a.params.UploadData.UploadId}catch(e){}"canceled"===r&&l&&n.removeUsing(l),u(),o&&(c--,f()),"canceled"===r&&(a.params&&(delete a.params.UploadData,delete a.params.Body,delete a.params),delete a.callback)}d()}};e._addTasks=function(t){a.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),u()},e._addTask=function(t,r,n,i){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||a.canFileSlice()||(t=c),r=a.formatParams(t,r);var l=a.uuid();r.TaskId=l,r.onTaskReady&&r.onTaskReady(l);var p={params:r,callback:n,api:t,index:o.length,id:l,Bucket:r.Bucket,Region:r.Region,Key:r.Key,FilePath:r.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null},m=r.onHashProgress;r.onHashProgress=function(t){e._isRunningTask(p.id)&&(p.hashPercent=t.percent,m&&m(t),u())};var h=r.onProgress;return r.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())},a.getFileSize(t,r,(function(e,t){e?n(e):(s[l]=p,o.push(p),p.size=t,!i&&u(),f(),d())})),l},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return a.map(o,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||(i="{Bucket}."+i)),i=(i=i.replace(/\{\{AppId\}\}/gi,n).replace(/\{\{Bucket\}\}/gi,r).replace(/\{\{Region\}\}/gi,o).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,n).replace(/\{BucketName\}/gi,r).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,o).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(i)||(i="https://"+i),"/"===i.slice(-1)&&(i=i.slice(0,-1));var c=i;return e.ForcePathStyle&&(c+="/"+t),c+="/",s&&(c+=a.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;return(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")};function p(e,t){var r=a.clone(e.Headers),n="";a.each(r,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete r[t],"host"===t.toLowerCase()&&(n=e)}));var i=!1!==e.ForceSignHost;!n&&e.SignHost&&i&&(r.Host=e.SignHost);var o=!1,s=function(e,r){o||(o=!0,r&&r.XCosSecurityToken&&!r.SecurityToken&&((r=a.clone(r)).SecurityToken=r.XCosSecurityToken,delete r.XCosSecurityToken),t&&t(e,r))},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=a.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 r=Math.round(a.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&r=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 n={Authorization:a.getAuth({SecretId:f.TmpSecretId,SecretKey:f.TmpSecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:r,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:i}),SecurityToken:f.SecurityToken||f.XCosSecurityToken||"",Token:f.Token||"",ClientIP:f.ClientIP||"",ClientUA:f.ClientUA||"",SignFrom:"client"};s(null,n)},b=function(e){if(e.Authorization){var t=!1,r=e.Authorization;if(r)if(r.indexOf(" ")>-1)t=!1;else if(r.indexOf("q-sign-algorithm=")>-1&&r.indexOf("q-ak=")>-1&&r.indexOf("q-sign-time=")>-1&&r.indexOf("q-key-time=")>-1&&r.indexOf("q-url-param-list=")>-1)t=!0;else try{(r=atob(r)).indexOf("a=")>-1&&r.indexOf("k=")>-1&&r.indexOf("t=")>-1&&r.indexOf("r=")>-1&&r.indexOf("b=")>-1&&(t=!0)}catch(e){}if(!t)return a.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return a.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return a.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return a.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return a.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return a.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return a.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(f.ExpiredTime&&f.ExpiredTime-a.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:r,Scope:m,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:i},(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:a.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:r,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:i}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken,SignFrom:"client"},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,r=!1,n=!1,i=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var o=e.error.Code,s=e.error.Message;("RequestTimeTooSkewed"===o||"AccessDenied"===o&&"Request has expired"===s)&&(n=!0)}catch(e){}if(e){if(n&&i){var c=Date.parse(i);this.options.CorrectClockSkew&&Math.abs(a.getSkewTime(this.options.SystemClockOffset)-c)>=3e4&&(this.options.SystemClockOffset=c-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);if(e.statusCode){var l=Math.floor(e.statusCode/100),p=(null==e?void 0:e.headers)&&(null==e?void 0:e.headers["x-cos-request-id"]);[3,4,5].includes(l)&&!p&&(t=this.options.AutoSwitchHost,r=!0)}else t=this.options.AutoSwitchHost,r=!0}return{canRetry:t,networkError:r}}function d(e){var t=e.requestUrl,r=e.clientCalcSign,n=e.networkError;if(!this.options.AutoSwitchHost)return!1;if(!t)return!1;if(!r)return!1;if(!n)return!1;return/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/.test(t)&&!/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/.test(t)}function f(e,t){var r=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=a.clearKey(e.qs),e.headers&&(e.headers=a.clearKey(e.headers)),e.qs&&(e.qs=a.clearKey(e.qs));var n=a.clone(e.qs);e.action&&(n[e.action]="");var i=e.url||e.Url,o=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:i}),s=e.tracker;!function a(i){var c=r.options.SystemClockOffset;e.SwitchHost&&(o=o.replace(/myqcloud.com/,"tencentcos.cn")),s&&s.setParams({signStartTime:(new Date).getTime(),httpRetryTimes:i-1}),p.call(r,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:n,Headers:e.headers,SignHost:o,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:r.options.ForceSignHost},(function(n,o){n?t(n):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=o,m.call(r,e,(function(n,l){var p=!1,f=!1;if(n){var m=u.call(r,n);p=m.canRetry||c!==r.options.SystemClockOffset,f=m.networkError}if(s&&s.setParams({httpEndTime:(new Date).getTime()}),n&&i<2&&p){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"]);var h=d.call(r,{requestUrl:(null==n?void 0:n.url)||"",clientCalcSign:"client"===(null==o?void 0:o.SignFrom),networkError:f});e.SwitchHost=h,a(i+1)}else t(n,l)})))}))}(1)}function m(e,t){var r=this,i=e.TaskId;if(!i||r._isRunningTask(i)){var o=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=e.dataType,g=r.options.HttpDNSServiceId;r.options.UseAccelerate&&(s="accelerate"),u=u||c({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:o,region:s,object:l}),e.SwitchHost&&(u=u.replace(/myqcloud.com/,"tencentcos.cn"));var v=l?u:"";e.action&&(u=u+"?"+e.action),e.qsStr&&(u=u.indexOf("?")>-1?u+"&"+e.qsStr:u+"?"+e.qsStr);var y={method:p,url:u,headers:e.headers,qs:e.qs,filePath:e.filePath,body:d,json:f,httpDNSServiceId:g,dataType:h},x="x-cos-security-token";a.isCIHost(u)&&(x="x-ci-security-token"),y.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(y.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(y.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(y.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(y.headers[x]=e.AuthData.SecurityToken),y.headers&&(y.headers=a.clearKey(y.headers)),y=a.clearKey(y),e.onProgress&&"function"==typeof e.onProgress&&(y.onProgress=function(t){if(!i||r._isRunningTask(i)){var n=t?t.loaded:0;e.onProgress({loaded:n,total:t.total})}}),this.options.Timeout&&(y.timeout=this.options.Timeout),r.options.ForcePathStyle&&(y.pathStyle=r.options.ForcePathStyle),r.emit("before-send",y);var b,k=y.url.includes("accelerate."),w=y.qs?Object.keys(y.qs).map((function(e){return"".concat(e,"=").concat(y.qs[e])})).join("&"):"",C=w?y.url+"?"+w:y.url;if(e.tracker)e.tracker.setParams({url:C,httpMethod:y.method,accelerate:k,httpSize:(null===(b=y.body)||void 0===b?void 0:b.size)||0}),e.tracker.parent&&!e.tracker.parent.params.url&&e.tracker.parent.setParams({url:v,accelerate:k});var S=n(y,(function(e,n,o){if("abort"!==e){var s,c=function(e,o){if(i&&r.off("inner-kill-task",T),!s){s=!0;var c={};n&&n.statusCode&&(c.statusCode=n.statusCode),n&&n.headers&&(c.headers=n.headers),e?(y.url&&(c.url=y.url),y.method&&(c.method=y.method),e=a.extend(e||{},c),t(e,null)):(o=a.extend(o||{},c),t(null,o)),S=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=o;else try{l=o&&o.indexOf("<")>-1&&o.indexOf(">")>-1&&a.xml2json(o)||{}}catch(e){l=o||{}}var p=n.statusCode;2===Math.floor(p/100)?l.Error?c({error:l.Error}):c(null,l):c({error:l.Error||l})}}})),T=function e(t){t.TaskId===i&&(S&&S.abort&&S.abort(),r.off("inner-kill-task",e))};i&&r.on("inner-kill-task",T)}}var h={getService:function(e,t){"function"==typeof e&&(t=e,e={});var r="https:",n=this.options.ServiceDomain,i=e.Region;n?(n=n.replace(/\{\{Region\}\}/gi,i||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(n)||(n=r+"//"+n),"/"===n.slice(-1)&&(n=n.slice(0,-1))):n=i?r+"//cos."+i+".myqcloud.com":r+"//service.cos.myqcloud.com";n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),f.call(this,{Action:"name/cos:GetService",url:n,method:"GET",headers:e.Headers,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Buckets&&r.ListAllMyBucketsResult.Buckets.Bucket||[];n=a.isArray(n)?n:[n];var i=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:n,Owner:i,statusCode:r.statusCode,headers:r.headers})}))},putBucket:function(e,t){var r=this,n="";if(e.BucketAZConfig){var i={BucketAZConfig:e.BucketAZConfig};n=a.json2xml({CreateBucketConfiguration:i})}f.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:n,tracker:e.tracker},(function(n,a){if(n)return t(n);var i=c({protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:i,statusCode:a.statusCode,headers:a.headers})}))},headBucket:function(e,t){f.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD",tracker:e.tracker},(function(e,r){t(e,r)}))},getBucket:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r.marker=e.Marker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,f.call(this,{Action:"name/cos:GetBucket",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.ListBucketResult||{},i=n.Contents||[],o=n.CommonPrefixes||[];i=a.isArray(i)?i:[i],o=a.isArray(o)?o:[o];var s=a.clone(n);a.extend(s,{Contents:i,CommonPrefixes:o,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},deleteBucket:function(e,t){f.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketAcl:function(e,t){var r=e.Headers,n="";if(e.AccessControlPolicy){var i=a.clone(e.AccessControlPolicy||{}),o=i.Grants||i.Grant;o=a.isArray(o)?o:[o],delete i.Grant,delete i.Grants,i.AccessControlList={Grant:o},n=a.json2xml({AccessControlPolicy:i}),r["Content-Type"]="application/xml",r["Content-MD5"]=a.binaryBase64(a.md5(n))}a.each(r,(function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=s(r[t]))})),f.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:r,action:"acl",body:n,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketAcl:function(e,t){f.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.AccessControlPolicy||{},i=n.Owner||{},s=n.AccessControlList.Grant||[];s=a.isArray(s)?s:[s];var c=o(n);r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=a.extend(c,{Owner:i,Grants:s,statusCode:r.statusCode,headers:r.headers}),t(null,c)}))},putBucketCors:function(e,t){var r=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];r=a.clone(a.isArray(r)?r:[r]),a.each(r,(function(e){a.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var r=t+"s",n=e[r]||e[t]||[];delete e[r],e[t]=a.isArray(n)?n:[n]}))}));var n={CORSRule:r};e.ResponseVary&&(n.ResponseVary=e.ResponseVary);var i=a.json2xml({CORSConfiguration:n}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"cors",headers:o,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketCors:function(e,t){f.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var n={CORSRules:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var i=r.CORSConfiguration||{},o=i.CORSRules||i.CORSRule||[];o=a.clone(a.isArray(o)?o:[o]);var s=i.ResponseVary;a.each(o,(function(e){a.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var r=t+"s",n=e[r]||e[t]||[];delete e[t],e[r]=a.isArray(n)?n:[n]}))})),t(null,{CORSRules:o,ResponseVary:s,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketCors:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})}))},getBucketLocation:function(e,t){f.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location",tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,r)}))},getBucketPolicy:function(e,t){f.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0,tracker:e.tracker},(function(e,r){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 n={};try{n=JSON.parse(r.body)}catch(e){}t(null,{Policy:n,statusCode:r.statusCode,headers:r.headers})}))},putBucketPolicy:function(e,t){var r=e.Policy,n=r;try{"string"==typeof r?r=JSON.parse(n):n=JSON.stringify(r)}catch(e){t({error:"Policy format error"})}var i=e.Headers;i["Content-Type"]="application/json",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:n,headers:i,json:!0,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},deleteBucketPolicy:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})}))},putBucketTagging:function(e,t){var r=e.Tagging||{},n=r.TagSet||r.Tags||e.Tags||[];n=a.clone(a.isArray(n)?n:[n]);var i=a.json2xml({Tagging:{TagSet:{Tag:n}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"tagging",headers:o,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketTagging:function(e,t){f.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var n={Tags:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else{var i=[];try{i=r.Tagging.TagSet.Tag||[]}catch(e){}i=a.clone(a.isArray(i)?i:[i]),t(null,{Tags:i,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketTagging:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketLifecycle:function(e,t){var r=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];r=a.clone(r);var n=a.json2xml({LifecycleConfiguration:{Rule:r}}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"lifecycle",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketLifecycle:function(e,t){f.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var n={Rules:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var i=[];try{i=r.LifecycleConfiguration.Rule||[]}catch(e){}i=a.clone(a.isArray(i)?i:[i]),t(null,{Rules:i,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketLifecycle:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var r=e.VersioningConfiguration||{},n=a.json2xml({VersioningConfiguration:r}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"versioning",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t({error:"missing param VersioningConfiguration"})},getBucketVersioning:function(e,t){f.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning",tracker:e.tracker},(function(e,r){e||!r.VersioningConfiguration&&(r.VersioningConfiguration={}),t(e,r)}))},putBucketReplication:function(e,t){var r=a.clone(e.ReplicationConfiguration),n=a.json2xml({ReplicationConfiguration:r});n=(n=n.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"replication",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketReplication:function(e,t){f.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var n={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else e||!r.ReplicationConfiguration&&(r.ReplicationConfiguration={}),r.ReplicationConfiguration.Rule&&(r.ReplicationConfiguration.Rules=r.ReplicationConfiguration.Rule,delete r.ReplicationConfiguration.Rule),t(e,r)}))},deleteBucketReplication:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var r=a.clone(e.WebsiteConfiguration||{}),n=r.RoutingRules||r.RoutingRule||[];n=a.isArray(n)?n:[n],delete r.RoutingRule,delete r.RoutingRules,n.length&&(r.RoutingRules={RoutingRule:n});var i=a.json2xml({WebsiteConfiguration:r}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"website",headers:o,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t({error:"missing param WebsiteConfiguration"})},getBucketWebsite:function(e,t){f.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var n={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var i=r.WebsiteConfiguration||{};if(i.RoutingRules){var o=a.clone(i.RoutingRules.RoutingRule||[]);o=a.makeArray(o),i.RoutingRules=o}t(null,{WebsiteConfiguration:i,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketWebsite:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var r=a.clone(e.RefererConfiguration||{}),n=r.DomainList||{},i=n.Domains||n.Domain||[];(i=a.isArray(i)?i:[i]).length&&(r.DomainList={Domain:i});var o=a.json2xml({RefererConfiguration:r}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=a.binaryBase64(a.md5(o)),f.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"referer",headers:s,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t({error:"missing param RefererConfiguration"})},getBucketReferer:function(e,t){f.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var n={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var i=r.RefererConfiguration||{};if(i.DomainList){var o=a.makeArray(i.DomainList.Domain||[]);i.DomainList={Domains:o}}t(null,{RefererConfiguration:i,statusCode:r.statusCode,headers:r.headers})}}))},putBucketDomain:function(e,t){var r=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];r=a.clone(r);var n=a.json2xml({DomainConfiguration:{DomainRule:r}}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"domain",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketDomain:function(e,t){f.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=[];try{n=r.DomainConfiguration.DomainRule||[]}catch(e){}n=a.clone(a.isArray(n)?n:[n]),t(null,{DomainRule:n,statusCode:r.statusCode,headers:r.headers})}))},deleteBucketDomain:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketOrigin:function(e,t){var r=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];r=a.clone(r);var n=a.json2xml({OriginConfiguration:{OriginRule:r}}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"origin",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketOrigin:function(e,t){f.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=[];try{n=r.OriginConfiguration.OriginRule||[]}catch(e){}n=a.clone(a.isArray(n)?n:[n]),t(null,{OriginRule:n,statusCode:r.statusCode,headers:r.headers})}))},deleteBucketOrigin:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketLogging:function(e,t){var r=a.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=a.binaryBase64(a.md5(r)),f.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"logging",headers:n,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketLogging:function(e,t){f.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging",tracker:e.tracker},(function(e,r){if(e)return t(e);delete r.BucketLoggingStatus._xmlns,t(null,{BucketLoggingStatus:r.BucketLoggingStatus,statusCode:r.statusCode,headers:r.headers})}))},putBucketInventory:function(e,t){var r=a.clone(e.InventoryConfiguration);if(r.OptionalFields){var n=r.OptionalFields||[];r.OptionalFields={Field:n}}if(r.Destination&&r.Destination.COSBucketDestination&&r.Destination.COSBucketDestination.Encryption){var i=r.Destination.COSBucketDestination.Encryption;Object.keys(i).indexOf("SSECOS")>-1&&(i["SSE-COS"]=i.SSECOS,delete i.SSECOS)}var o=a.json2xml({InventoryConfiguration:r}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=a.binaryBase64(a.md5(o)),f.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"inventory",qs:{id:e.Id},headers:s,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketInventory:function(e,t){f.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.InventoryConfiguration;if(n&&n.OptionalFields&&n.OptionalFields.Field){var i=n.OptionalFields.Field;a.isArray(i)||(i=[i]),n.OptionalFields=i}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var o=n.Destination.COSBucketDestination.Encryption;Object.keys(o).indexOf("SSE-COS")>-1&&(o.SSECOS=o["SSE-COS"],delete o["SSE-COS"])}t(null,{InventoryConfiguration:n,statusCode:r.statusCode,headers:r.headers})}))},listBucketInventory:function(e,t){f.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken},tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.ListInventoryConfigurationResult,i=n.InventoryConfiguration||[];i=a.isArray(i)?i:[i],delete n.InventoryConfiguration,a.each(i,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;a.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var r=e.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}})),n.InventoryConfigurations=i,a.extend(n,{statusCode:r.statusCode,headers:r.headers}),t(null,n)}))},deleteBucketInventory:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var r={AccelerateConfiguration:e.AccelerateConfiguration||{}},n=a.json2xml(r),i={"Content-Type":"application/xml"};i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"accelerate",headers:i,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t({error:"missing param AccelerateConfiguration"})},getBucketAccelerate:function(e,t){f.call(this,{Interface:"getBucketAccelerate",Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate",tracker:e.tracker},(function(e,r){e||!r.AccelerateConfiguration&&(r.AccelerateConfiguration={}),t(e,r)}))},getObject:function(e,t){var r=e.Query||{},n=e.QueryString||"",i=e.tracker;i&&i.setParams({signStartTime:(new Date).getTime()}),r["response-content-type"]=e.ResponseContentType,r["response-content-language"]=e.ResponseContentLanguage,r["response-expires"]=e.ResponseExpires,r["response-cache-control"]=e.ResponseCacheControl,r["response-content-disposition"]=e.ResponseContentDisposition,r["response-content-encoding"]=e.ResponseContentEncoding,f.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,qs:r,qsStr:n,rawBody:!0,dataType:e.DataType,tracker:i},(function(r,n){if(r){var i=r.statusCode;return e.Headers["If-Modified-Since"]&&i&&304===i?t(null,{NotModified:!0}):t(r)}t(null,{Body:n.body,ETag:a.attr(n.headers,"etag",""),statusCode:n.statusCode,headers:n.headers})}))},headObject:function(e,t){f.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,tracker:e.tracker},(function(r,n){if(r){var i=r.statusCode;return e.Headers["If-Modified-Since"]&&i&&304===i?t(null,{NotModified:!0,statusCode:i}):t(r)}n.ETag=a.attr(n.headers,"etag",""),t(null,n)}))},listObjectVersions:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r["key-marker"]=e.KeyMarker,r["version-id-marker"]=e.VersionIdMarker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,f.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,action:"versions",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.ListVersionsResult||{},i=n.DeleteMarker||[];i=a.isArray(i)?i:[i];var o=n.Version||[];o=a.isArray(o)?o:[o];var s=a.clone(n);delete s.DeleteMarker,delete s.Version,a.extend(s,{DeleteMarkers:i,Versions:o,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},putObject:function(e,t){var r=this,n=e.ContentLength,o=a.throttleOnProgress.call(r,n,e.onProgress),s=e.Headers;s["Cache-Control"]||s["cache-control"]||(s["Cache-Control"]=""),s["Content-Type"]||s["content-type"]||(s["Content-Type"]=i.getType(e.Key)||"application/octet-stream");var l=e.UploadAddMetaMd5||r.options.UploadAddMetaMd5||r.options.UploadCheckContentMd5,p=e.tracker;l&&p&&p.setParams({md5StartTime:(new Date).getTime()}),a.getBodyMd5(l,e.Body,(function(i){i&&(p&&p.setParams({md5EndTime:(new Date).getTime()}),r.options.UploadCheckContentMd5&&(s["Content-MD5"]=a.binaryBase64(i)),(e.UploadAddMetaMd5||r.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=i)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),o(null,!0),f.call(r,{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:o,tracker:p},(function(i,s){if(i)return o(null,!0),t(i);o({loaded:n,total:n},!0);var l=c({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:r.options.UseAccelerate?"accelerate":e.Region,object:e.Key});l=l.substr(l.indexOf("://")+3),s.Location=l,s.ETag=a.attr(s.headers,"etag",""),t(null,s)}))}))},postObject:function(e,t){var r=this,n={},i=e.FilePath;if(i){for(var o in n["Cache-Control"]=e.CacheControl,n["Content-Disposition"]=e.ContentDisposition,n["Content-Encoding"]=e.ContentEncoding,n["Content-MD5"]=e.ContentMD5,n["Content-Length"]=e.ContentLength,n["Content-Type"]=e.ContentType,n.Expect=e.Expect,n.Expires=e.Expires,n["x-cos-acl"]=e.ACL,n["x-cos-grant-read"]=e.GrantRead,n["x-cos-grant-write"]=e.GrantWrite,n["x-cos-grant-full-control"]=e.GrantFullControl,n["x-cos-storage-class"]=e.StorageClass,n["x-cos-mime-limit"]=e.MimeLimit,n["x-cos-traffic-limit"]=e.TrafficLimit,n["x-cos-forbid-overwrite"]=e.ForbidOverwrite,n["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,n["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,n["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,n["x-cos-server-side-encryption"]=e.ServerSideEncryption,n["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,n["x-cos-server-side-encryption-context"]=e.SSEContext,delete n["Content-Length"],delete n["content-length"],e)o.indexOf("x-cos-meta-")>-1&&(n[o]=e[o]);var s=a.throttleOnProgress.call(r,n["Content-Length"],e.onProgress);f.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:n,qs:e.Query,filePath:i,TaskId:e.TaskId,onProgress:s,tracker:e.tracker},(function(n,a){if(s(null,!0),n)return t(n);if(a&&a.headers){var o=a.headers,l=o.etag||o.Etag||o.ETag||"",p=i.substr(i.lastIndexOf("/")+1),u=c({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key.replace(/\$\{filename\}/g,p),isLocation:!0});return t(null,{Location:u,statusCode:a.statusCode,headers:o,ETag:l})}t(null,a)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){f.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId,tracker:e.tracker},(function(e,r){if(e){var n=e.statusCode;return n&&204===n?t(null,{statusCode:n}):n&&404===n?t(null,{BucketNotFound:!0,statusCode:n}):t(e)}t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObjectAcl:function(e,t){var r={};e.VersionId&&(r.versionId=e.VersionId),f.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r,action:"acl",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.AccessControlPolicy||{},i=n.Owner||{},s=n.AccessControlList&&n.AccessControlList.Grant||[];s=a.isArray(s)?s:[s];var c=o(n);r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=a.extend(c,{Owner:i,Grants:s,statusCode:r.statusCode,headers:r.headers}),t(null,c)}))},putObjectAcl:function(e,t){var r=e.Headers,n="";if(e.AccessControlPolicy){var i=a.clone(e.AccessControlPolicy||{}),o=i.Grants||i.Grant;o=a.isArray(o)?o:[o],delete i.Grant,delete i.Grants,i.AccessControlList={Grant:o},n=a.json2xml({AccessControlPolicy:i}),r["Content-Type"]="application/xml",r["Content-MD5"]=a.binaryBase64(a.md5(n))}a.each(r,(function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=s(r[t]))})),f.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:r,body:n,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},optionsObject:function(e,t){var r=e.Headers;r.Origin=e.Origin,r["Access-Control-Request-Method"]=e.AccessControlRequestMethod,r["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,f.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:r,tracker:e.tracker},(function(e,r){if(e)return e.statusCode&&403===e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var n=r.headers||{};t(null,{AccessControlAllowOrigin:n["access-control-allow-origin"],AccessControlAllowMethods:n["access-control-allow-methods"],AccessControlAllowHeaders:n["access-control-allow-headers"],AccessControlExposeHeaders:n["access-control-expose-headers"],AccessControlMaxAge:n["access-control-max-age"],statusCode:r.statusCode,headers:r.headers})}))},putObjectCopy:function(e,t){var r=e.Headers;!r["Cache-Control"]&&r["cache-control"]&&(r["Cache-Control"]="");var n=e.CopySource||"",i=a.getSourceParams.call(this,n);if(i){var o=i.Bucket,s=i.Region,c=decodeURIComponent(i.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:o,region:s,prefix:c},{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,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=a.clone(r.CopyObjectResult||{});a.extend(n,{statusCode:r.statusCode,headers:r.headers}),t(null,n)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var r=e.Objects||[],n=e.Quiet;r=a.isArray(r)?r:[r];var i=a.json2xml({Delete:{Object:r,Quiet:n||!1}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i));var s=a.map(r,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));f.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:i,action:"delete",headers:o,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.DeleteResult||{},i=n.Deleted||[],o=n.Error||[];i=a.isArray(i)?i:[i],o=a.isArray(o)?o:[o];var s=a.clone(n);a.extend(s,{Error:o,Deleted:i,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},restoreObject:function(e,t){var r=e.Headers;if(e.RestoreRequest){var n=e.RestoreRequest||{},i=a.json2xml({RestoreRequest:n});r["Content-Type"]="application/xml",r["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:i,action:"restore",headers:r,tracker:e.tracker},(function(e,r){t(e,r)}))}else t({error:"missing param RestoreRequest"})},putObjectTagging:function(e,t){var r=e.Tagging||{},n=r.TagSet||r.Tags||e.Tags||[];n=a.clone(a.isArray(n)?n:[n]);var i=a.json2xml({Tagging:{TagSet:{Tag:n}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:i,action:"tagging",headers:o,VersionId:e.VersionId,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObjectTagging:function(e,t){f.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,tracker:e.tracker},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var n={Tags:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else{var i=[];try{i=r.Tagging.TagSet.Tag||[]}catch(e){}i=a.clone(a.isArray(i)?i:[i]),t(null,{Tags:i,statusCode:r.statusCode,headers:r.headers})}}))},deleteObjectTagging:function(e,t){f.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,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},appendObject:function(e,t){f.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,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,r)}))},uploadPartCopy:function(e,t){var r=e.CopySource||"",n=a.getSourceParams.call(this,r);if(n){var i=n.Bucket,o=n.Region,s=decodeURIComponent(n.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:i,region:o,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,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=a.clone(r.CopyPartResult||{});a.extend(n,{statusCode:r.statusCode,headers:r.headers}),t(null,n)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var r=e.Headers,n=e.tracker;r["Cache-Control"]||r["cache-control"]||(r["Cache-Control"]=""),r["Content-Type"]||r["content-type"]||(r["Content-Type"]=i.getType(e.Key)||"application/octet-stream"),f.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:n},(function(e,r){return e?(n&&n.parent&&n.parent.setParams({errorNode:"multipartInit"}),t(e)):(r=a.clone(r||{}))&&r.InitiateMultipartUploadResult?t(null,a.extend(r.InitiateMultipartUploadResult,{statusCode:r.statusCode,headers:r.headers})):void t(null,r)}))},multipartUpload:function(e,t){var r=this;a.getFileSize("multipartUpload",e,(function(){var n=e.tracker,i=r.options.UploadCheckContentMd5;i&&n&&n.setParams({md5StartTime:(new Date).getTime()}),a.getBodyMd5(i,e.Body,(function(o){o&&(e.Headers["Content-MD5"]=a.binaryBase64(o),i&&n&&n.setParams({md5EndTime:(new Date).getTime()})),n&&n.setParams({partNumber:e.PartNumber}),f.call(r,{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:n},(function(e,r){if(e)return n&&n.parent&&n.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:a.attr(r.headers,"etag",{}),statusCode:r.statusCode,headers:r.headers})}))}))}))},multipartComplete:function(e,t){for(var r=this,n=e.UploadId,i=e.Parts,o=e.tracker,s=0,l=i.length;s-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],r="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),n=new RegExp(t,"g");return e.replace(n,r)}(r.Authorization):"sign="+encodeURIComponent(r.Authorization)),r.SecurityToken&&(n+="&x-cos-security-token="+r.SecurityToken),r.ClientIP&&(n+="&clientIP="+r.ClientIP),r.ClientUA&&(n+="&clientUA="+r.ClientUA),r.Token&&(n+="&token="+r.Token),o&&(n+="&"+o),setTimeout((function(){t(null,{Url:n})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),o&&(s+="&"+o)):o&&(s+="?"+o),s},getAuth:function(e){return a.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(h,"postObject"),t.transferToTaskMethod(h,"putObject"),a.each(h,(function(t,r){e.prototype[r]=a.apiWrapper(r,t)}))}},function(e,t){function r(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}var n=function(e,t){var n,a,i,o=[],s=function(e,t){var n=[];for(var a in e)e.hasOwnProperty(a)&&n.push(t?r(a).toLowerCase():a);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(n=0;n-1||m.indexOf(h)>-1)&&(f[h]=e.headers[h]);i["x-cos-acl"]&&(f.acl=i["x-cos-acl"]),!f["Content-Type"]&&(f["Content-Type"]=""),(r=wx.uploadFile({url:o,method:s,name:"file",header:i,filePath:a,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&&n(e.qs)||"";g&&(o+=(o.indexOf("?")>-1?"&":"?")+g),i["Content-Length"]&&delete i["Content-Length"];var v={url:o,method:s,header:i,dataType:"text",data:e.body,responseType:e.dataType||"text",timeout:e.timeout,redirect:"manual",success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),r=wx.request(v)}return r}},function(e,t,r){"use strict";let n=r(24);e.exports=new n(r(25),r(26))},function(e,t,r){"use strict";function n(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}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)}function i(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,c,"next",e)}function c(e){i(o,n,a,s,c,"throw",e)}s(void 0)}))}}var s=r(6),c=r(28),l=r(5).EventProxy,p=r(0),u=r(3);function d(e,t){var r=e.TaskId,n=e.Bucket,a=e.Region,i=e.Key,o=e.StorageClass,u=this,d={},h=e.FileSize,g=e.SliceSize,v=Math.ceil(h/g),y=0,x=p.throttleOnProgress.call(u,h,e.onHashProgress),b=function(t,r){var n=t.length;if(0===n)return r(null,!0);if(n>v)return r(null,!1);if(n>1&&Math.max(t[0].Size,t[1].Size)!==g)return r(null,!1);!function a(i){if(i=c.length)k.emit("has_and_check_upload_id",t);else{var d=c[l];if(!p.isInArray(t,d))return s.removeUploadId(d),void o(l+1);s.using[d]?o(l+1):m.call(u,{Bucket:n,Region:a,Key:i,UploadId:d,tracker:e.tracker},(function(e,t){u._isRunningTask(r)&&(e?(s.removeUploadId(d),o(l+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(){f.call(u,{Bucket:n,Region:a,Key:i,tracker:e.tracker},(function(t,a){if(u._isRunningTask(r)){if(t)return k.emit("error",t);var c=p.filter(a.UploadList,(function(e){return e.Key===i&&(!o||e.StorageClass.toUpperCase()===o.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(c.length)k.emit("seek_local_avail_upload_id",c);else{var l,d=s.getFileId(e.FileStat,e.ChunkSize,n,i);d&&(l=s.getUploadIdList(d))&&p.each(l,(function(e){s.removeUploadId(e)})),k.emit("no_available_upload_id")}}}))})),k.emit("get_remote_upload_id_list")}function f(e,t){var r=this,n=[],a={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartList(a,(function(r,i){if(r)return t(r);n.push.apply(n,i.Upload||[]),"true"===i.IsTruncated?(a.KeyMarker=i.NextKeyMarker,a.UploadIdMarker=i.NextUploadIdMarker,e()):t(null,{UploadList:n})}))}()}function m(e,t){var r=this,n=[],a={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartListPart(a,(function(r,i){if(r)return t(r);n.push.apply(n,i.Part||[]),"true"===i.IsTruncated?(a.PartNumberMarker=i.NextPartNumberMarker,e()):t(null,{PartList:n})}))}()}function h(e,t){var r=this,n=e.TaskId,a=e.Bucket,i=e.Region,o=e.Key,s=e.UploadData,l=e.FileSize,u=e.SliceSize,d=Math.min(e.AsyncLimit||r.options.ChunkParallelLimit||1,256),f=e.FilePath,m=Math.ceil(l/u),h=0,v=e.ServerSideEncryption,y=p.filter(s.PartList,(function(e){return e.Uploaded&&(h+=e.PartNumber>=m&&l%u||u),!e.Uploaded})),x=e.onProgress;c.eachLimit(y,d,(function(t,c){if(r._isRunningTask(n)){var p=t.PartNumber,d=Math.min(l,t.PartNumber*u)-(t.PartNumber-1)*u,m=0;g.call(r,{TaskId:n,Bucket:a,Region:i,Key:o,SliceSize:u,FileSize:l,PartNumber:p,ServerSideEncryption:v,FilePath:f,UploadData:s,onProgress:function(e){h+=e.loaded-m,m=e.loaded,x({loaded:h,total:l})},tracker:e.tracker},(function(e,a){r._isRunningTask(n)&&(e?h-=m:(h+=d-m,t.ETag=a.ETag),x({loaded:h,total:l}),c(e||null,a))}))}}),(function(e){if(r._isRunningTask(n))return e?t(e):void t(null,{UploadId:s.UploadId,SliceList:s.PartList})}))}function g(e,t){var r=this,n=e.TaskId,a=e.Bucket,i=e.Region,o=e.Key,s=e.FileSize,l=e.FilePath,u=1*e.PartNumber,d=e.SliceSize,f=e.ServerSideEncryption,m=e.UploadData,h=r.options.ChunkRetryTimes+1,g=e.Headers||{},v=d*(u-1),y=d,x=v+d;x>s&&(y=(x=s)-v);var b=["x-cos-traffic-limit","x-cos-mime-limit"],k={};p.each(g,(function(e,t){b.indexOf(t)>-1&&(k[t]=e)})),p.fileSlice(l,v,x,(function(s){var l=p.getFileMd5(s),d=l?p.binaryBase64(l):null,g=m.PartList[u-1];c.retry(h,(function(t){r._isRunningTask(n)&&r.multipartUpload({TaskId:n,Bucket:a,Region:i,Key:o,ContentLength:y,PartNumber:u,UploadId:m.UploadId,ServerSideEncryption:f,Body:s,Headers:k,onProgress:e.onProgress,ContentMD5:d,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,a){if(r._isRunningTask(n))return e?t(e):(g.Uploaded=!0,t(null,a))}))}),(function(e,a){if(r._isRunningTask(n))return t(e,a)}))}))}function v(e,t){var r=e.Bucket,n=e.Region,a=e.Key,i=e.UploadId,o=e.SliceList,s=this,l=this.options.ChunkRetryTimes+1,p=o.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));c.retry(l,(function(t){s.multipartComplete({Bucket:r,Region:n,Key:a,UploadId:i,Parts:p,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,r){t(e,r)}))}function y(e,t){var r=e.Bucket,n=e.Region,a=e.Key,i=e.AbortArray,o=e.AsyncLimit||1,s=this,l=0,p=new Array(i.length);c.eachLimit(i,o,(function(t,i){var o=l;if(a&&a!==t.Key)return p[o]={error:{KeyNotMatch:!0}},void i(null);var c=t.UploadId||t.UploadID;s.multipartAbort({Bucket:r,Region:n,Key:t.Key,Headers:e.Headers,UploadId:c},(function(e){var a={Bucket:r,Region:n,Key:t.Key,UploadId:c};p[o]={error:e,task:a},i(null)})),l++}),(function(e){if(e)return t(e);for(var r=[],n=[],a=0,i=p.length;ao?"sliceUploadFile":"putObject",t.tracker=new u({Beacon:i.options.BeaconReporter,clsReporter:i.options.ClsReporter,bucket:t.Bucket,region:t.Region,apiName:"uploadFile",realApi:f,fileKey:t.Key,fileSize:c,accelerate:d,deepTracker:i.options.DeepTracker,customId:i.options.CustomId,delay:i.options.TrackerDelay})),p.each(t,(function(e,t){"object"!==a(e)&&"function"!=typeof e&&(l[t]=e)})),m=t.onTaskReady,t.onTaskReady=function(e){l.TaskId=e,m&&m(e)},h=t.onFileFinish,g=function(e,n){t.tracker&&t.tracker.report(e,n),h&&h(e,n,l),r&&r(e,n)},v="postObject"===i.options.SimpleUploadMethod?"postObject":"putObject",y=c>o?"sliceUploadFile":v,s.push({api:y,params:t,callback:g}),i._addTasks(s);case 24:case"end":return e.stop()}}),e,this,[[3,9]])})))).apply(this,arguments)}function b(){return b=o(n().mark((function e(t,r){var i,s,c,l,d,f,m,h,g,v,y;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this,s=void 0===t.SliceSize?i.options.SliceSize:t.SliceSize,c=0,l=0,d=p.throttleOnProgress.call(i,l,t.onProgress),f=t.files.length,m=t.onFileFinish,h=Array(f),g=function(e,t,n){d(null,!0),m&&m(e,t,n),h[n.Index]={options:n,error:e,data:t},--f<=0&&r&&r(null,{files:h})},v=[],y=function(){return t.files.map((function(e,t){return new Promise(function(){var r=o(n().mark((function r(o){var f,m,h,y,x,b,k,w,C,S,T;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return f=0,r.prev=1,r.next=4,p.getFileSizeByPath(e.FilePath);case 4:f=r.sent,r.next=9;break;case 7:r.prev=7,r.t0=r.catch(1);case 9:m={Index:t,TaskId:""},c+=f,i.options.EnableReporter&&(h=i.options.UseAccelerate||"string"==typeof i.options.Domain&&i.options.Domain.includes("accelerate."),y=f>s?"sliceUploadFile":"putObject",e.tracker=new u({Beacon:i.options.BeaconReporter,clsReporter:i.options.ClsReporter,bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",realApi:y,fileKey:e.Key,fileSize:f,accelerate:h,deepTracker:i.options.DeepTracker,customId:i.options.CustomId,delay:i.options.TrackerDelay})),p.each(e,(function(e,t){"object"!==a(e)&&"function"!=typeof e&&(m[t]=e)})),x=e.onTaskReady,e.onTaskReady=function(e){m.TaskId=e,x&&x(e)},b=0,k=e.onProgress,e.onProgress=function(e){l=l-b+e.loaded,b=e.loaded,k&&k(e),d({loaded:l,total:c})},w=e.onFileFinish,C=function(t,r){e.tracker&&e.tracker.report(t,r),w&&w(t,r),g&&g(t,r,m)},S="postObject"===i.options.SimpleUploadMethod?"postObject":"putObject",T=f>s?"sliceUploadFile":S,v.push({api:T,params:e,callback:C}),o(!0);case 24:case"end":return r.stop()}}),r,null,[[1,7]])})));return function(e){return r.apply(this,arguments)}}())}))},e.next=13,Promise.all(y());case 13:i._addTasks(v);case 14:case"end":return e.stop()}}),e,this)}))),b.apply(this,arguments)}function k(e,t){var r=e.TaskId,n=e.Bucket,a=e.Region,i=e.Key,o=e.CopySource,s=e.UploadId,l=1*e.PartNumber,p=e.CopySourceRange,u=this.options.ChunkRetryTimes+1,d=this;c.retry(u,(function(t){d.uploadPartCopy({TaskId:r,Bucket:n,Region:a,Key:i,CopySource:o,UploadId:s,PartNumber:l,CopySourceRange:p,onProgress:e.onProgress,tracker:e.tracker,calledBySdk:e.calledBySdk},(function(e,r){t(e||null,r)}))}),(function(e,r){return t(e,r)}))}var w={sliceUploadFile:function(e,t){var r=this;if(!p.canFileSlice())return e.SkipTask=!0,void("postObject"===r.options.SimpleUploadMethod?r.postObject(e,t):r.putObject(e,t));var n,a,i=new l,o=e.TaskId,c=e.Bucket,u=e.Region,f=e.Key,m=e.FilePath,g=e.ChunkSize||e.SliceSize||r.options.ChunkSize,y=e.AsyncLimit,x=e.StorageClass,b=e.ServerSideEncryption,k=e.onHashProgress,w=e.tracker;w&&w.setParams({chunkSize:g}),i.on("error",(function(n){if(r._isRunningTask(o)){var a={UploadId:e.UploadData.UploadId||"",err:n,error:n};return t(a)}})),i.on("upload_complete",(function(r){var n=p.extend({UploadId:e.UploadData.UploadId||""},r);t(null,n)})),i.on("upload_slice_complete",(function(e){v.call(r,{Bucket:c,Region:u,Key:f,UploadId:e.UploadId,SliceList:e.SliceList,tracker:w},(function(t,c){if(r._isRunningTask(o)){if(s.removeUsing(e.UploadId),t)return a(null,!0),i.emit("error",t);s.removeUploadId(e.UploadId),a({loaded:n,total:n},!0),i.emit("upload_complete",c)}}))})),i.on("get_upload_data_finish",(function(t){var l=s.getFileId(e.FileStat,e.ChunkSize,c,f);l&&s.saveUploadId(l,t.UploadId,r.options.UploadIdCacheLimit),s.setUsing(t.UploadId),a(null,!0),h.call(r,{TaskId:o,Bucket:c,Region:u,Key:f,FilePath:m,FileSize:n,SliceSize:g,AsyncLimit:y,ServerSideEncryption:b,UploadData:t,onProgress:a,tracker:w},(function(e,t){if(r._isRunningTask(o))return e?(a(null,!0),i.emit("error",e)):void i.emit("upload_slice_complete",t)}))})),i.on("get_file_size_finish",(function(){if(a=p.throttleOnProgress.call(r,n,e.onProgress),e.UploadData.UploadId)i.emit("get_upload_data_finish",e.UploadData);else{var t=p.extend({TaskId:o,Bucket:c,Region:u,Key:f,Headers:e.Headers,StorageClass:x,FilePath:m,FileSize:n,SliceSize:g,onHashProgress:k,tracker:w},e);t.FileSize=n,d.call(r,t,(function(t,n){if(r._isRunningTask(o)){if(t)return i.emit("error",t);e.UploadData.UploadId=n.UploadId,e.UploadData.PartList=n.PartList,i.emit("get_upload_data_finish",e.UploadData)}}))}})),n=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),p.each(e.Headers,(function(t,r){"content-length"===r.toLowerCase()&&delete e.Headers[r]})),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],a=1048576,i=0;i=S&&y%b||b),!e.Uploaded}));c.eachLimit(f,w,(function(t,r){var s=t.PartNumber,p=t.CopySourceRange,d=t.end-t.start,f=0;c.retry(C,(function(t){k.call(n,{Bucket:a,Region:i,Key:o,CopySource:u,UploadId:l.UploadId,PartNumber:s,CopySourceRange:p,tracker:e.tracker,calledBySdk:"sliceCopyFile",onProgress:function(e){T+=e.loaded-f,f=e.loaded,x({loaded:T,total:y})}},t)}),(function(e,n){if(e)return r(e);x({loaded:T,total:y}),T+=d-f,t.ETag=n.ETag,r(e||null,n)}))}),(function(e){if(e)return s.removeUsing(l.UploadId),x(null,!0),t(e);r.emit("copy_slice_complete",l)}))})),r.on("get_chunk_size_finish",(function(){var c=function(){n.multipartInit({Bucket:a,Region:i,Key:o,Headers:A,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(n,a){if(n)return t(n);e.UploadId=a.UploadId,r.emit("get_copy_data_finish",{UploadId:e.UploadId,PartList:e.PartList})}))},l=s.getCopyFileId(u,E,b,a,o),d=s.getUploadIdList(l);if(!l||!d)return c();!function t(l){if(l>=d.length)return c();var u=d[l];if(s.using[u])return t(l+1);m.call(n,{Bucket:a,Region:i,Key:o,UploadId:u,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(n,a){if(n)s.removeUploadId(u),t(l+1);else{if(s.using[u])return t(l+1);var i={},o=0;p.each(a.PartList,(function(e){var t=parseInt(e.Size),r=o+t-1;i[e.PartNumber+"|"+o+"|"+r]=e.ETag,o+=t})),p.each(e.PartList,(function(e){var t=i[e.PartNumber+"|"+e.start+"|"+e.end];t&&(e.ETag=t,e.Uploaded=!0)})),r.emit("get_copy_data_finish",{UploadId:u,PartList:e.PartList})}}))}(0)})),r.on("get_file_size_finish",(function(){var a;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],r=1048576,a=0;a11&&(R[t]=e)})),r.emit("get_file_size_finish")}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(w,"sliceUploadFile"),p.each(w,(function(t,r){e.prototype[r]=p.apiWrapper(r,t)}))}},function(e,t){var r={eachLimit:function(e,t,r,n){if(n=n||function(){},!e.length||t<=0)return n();var a=0,i=0,o=0;!function s(){if(a>=e.length)return n();for(;o=e.length?n():s())}))}()},retry:function(e,t,r){e<1?r():function n(a){t((function(t,i){t&&a=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var i=r.completion;if("throw"===i.type){var n=i.arg;k(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,i){return this.delegate={iterator:B(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=e),y}},t}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:String(t)}function asyncGeneratorStep(e,t,r,i,n,o,s){try{var a=e[o](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(i,n)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(i,n){var o=e.apply(t,r);function s(e){asyncGeneratorStep(o,i,n,s,a,"next",e)}function a(e){asyncGeneratorStep(o,i,n,s,a,"throw",e)}s(void 0)}))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r{const t=toString$1.call(e);return cache[t]||(cache[t]=t.slice(8,-1).toLowerCase())});var cache;const kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:isArray$1}=Array,isUndefined$1=typeOfTest("undefined");function isBuffer$1(e){return null!==e&&!isUndefined$1(e)&&null!==e.constructor&&!isUndefined$1(e.constructor)&&isFunction$1(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer$1=kindOfTest("ArrayBuffer");function isArrayBufferView$1(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer$1(e.buffer),t}const isString$1=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber$1=typeOfTest("number"),isObject$1=e=>null!==e&&"object"==typeof e,isBoolean=e=>!0===e||!1===e,isPlainObject=e=>{if("object"!==kindOf(e))return!1;const t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},isDate$1=kindOfTest("Date"),isFile$1=kindOfTest("File"),isBlob$1=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream$1=e=>isObject$1(e)&&isFunction$1(e.pipe),isFormData$1=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||isFunction$1(e.append)&&("formdata"===(t=kindOf(e))||"object"===t&&isFunction$1(e.toString)&&"[object FormData]"===e.toString()))},isURLSearchParams$1=kindOfTest("URLSearchParams"),trim$1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach$1(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let i,n;if("object"!=typeof e&&(e=[e]),isArray$1(e))for(i=0,n=e.length;i0;)if(i=r[n],t===i.toLowerCase())return i;return null}const _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!isUndefined$1(e)&&e!==_global;function merge$1(){const{caseless:e}=isContextDefined(this)&&this||{},t={},r=(r,i)=>{const n=e&&findKey(t,i)||i;isPlainObject(t[n])&&isPlainObject(r)?t[n]=merge$1(t[n],r):isPlainObject(r)?t[n]=merge$1({},r):isArray$1(r)?t[n]=r.slice():t[n]=r};for(let e=0,t=arguments.length;e(forEach$1(t,((t,i)=>{r&&isFunction$1(t)?e[i]=bind$2(t,r):e[i]=t}),{allOwnKeys:i}),e),stripBOM=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject=(e,t,r,i)=>{let n,o,s;const a={};if(t=t||{},null==e)return t;do{for(n=Object.getOwnPropertyNames(e),o=n.length;o-- >0;)s=n[o],i&&!i(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return-1!==i&&i===r},toArray=e=>{if(!e)return null;if(isArray$1(e))return e;let t=e.length;if(!isNumber$1(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},isTypedArray=(TypedArray="undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array),e=>TypedArray&&e instanceof TypedArray);var TypedArray;const forEachEntry=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const r=i.value;t.call(e,r[0],r[1])}},matchAll=(e,t)=>{let r;const i=[];for(;null!==(r=e.exec(t));)i.push(r);return i},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),hasOwnProperty=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};forEach$1(r,((r,n)=>{let o;!1!==(o=t(r,n,e))&&(i[n]=o||r)})),Object.defineProperties(e,i)},freezeMethods=e=>{reduceDescriptors(e,((t,r)=>{if(isFunction$1(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const i=e[r];isFunction$1(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet=(e,t)=>{const r={},i=e=>{e.forEach((e=>{r[e]=!0}))};return isArray$1(e)?i(e):i(String(e).split(t)),r},noop$1=()=>{},toFiniteNumber=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(e=16,t=ALPHABET.ALPHA_DIGIT)=>{let r="";const{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function isSpecCompliantForm(e){return!!(e&&isFunction$1(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const toJSONObject=e=>{const t=new Array(10),r=(e,i)=>{if(isObject$1(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[i]=e;const n=isArray$1(e)?[]:{};return forEach$1(e,((e,t)=>{const o=r(e,i+1);!isUndefined$1(o)&&(n[t]=o)})),t[i]=void 0,n}}return e};return r(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject$1(e)||isFunction$1(e))&&isFunction$1(e.then)&&isFunction$1(e.catch);var utils$4={isArray:isArray$1,isArrayBuffer:isArrayBuffer$1,isBuffer:isBuffer$1,isFormData:isFormData$1,isArrayBufferView:isArrayBufferView$1,isString:isString$1,isNumber:isNumber$1,isBoolean:isBoolean,isObject:isObject$1,isPlainObject:isPlainObject,isUndefined:isUndefined$1,isDate:isDate$1,isFile:isFile$1,isBlob:isBlob$1,isRegExp:isRegExp,isFunction:isFunction$1,isStream:isStream$1,isURLSearchParams:isURLSearchParams$1,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach$1,merge:merge$1,extend:extend$1,trim:trim$1,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop$1,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable};function AxiosError(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}utils$4.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$4.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{descriptors[e]={value:e}})),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,i,n,o)=>{const s=Object.create(prototype$1);return utils$4.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError.call(s,e.message,t,r,i,n),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};var httpAdapter=null;function isVisitable(e){return utils$4.isPlainObject(e)||utils$4.isArray(e)}function removeBrackets(e){return utils$4.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map((function(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}function isFlatArray(e){return utils$4.isArray(e)&&!e.some(isVisitable)}const predicates=utils$4.toFlatObject(utils$4,{},null,(function(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,r){if(!utils$4.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(r=utils$4.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!utils$4.isUndefined(t[e])}))).metaTokens,n=r.visitor||c,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&utils$4.isSpecCompliantForm(t);if(!utils$4.isFunction(n))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(utils$4.isDate(e))return e.toISOString();if(!a&&utils$4.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$4.isArrayBuffer(e)||utils$4.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,n){let a=e;if(e&&!n&&"object"==typeof e)if(utils$4.endsWith(r,"{}"))r=i?r:r.slice(0,-2),e=JSON.stringify(e);else if(utils$4.isArray(e)&&isFlatArray(e)||(utils$4.isFileList(e)||utils$4.endsWith(r,"[]"))&&(a=utils$4.toArray(e)))return r=removeBrackets(r),a.forEach((function(e,i){!utils$4.isUndefined(e)&&null!==e&&t.append(!0===s?renderKey([r],i,o):null===s?r:r+"[]",u(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(n,r,o),u(e)),!1)}const l=[],f=Object.assign(predicates,{defaultVisitor:c,convertValue:u,isVisitable:isVisitable});if(!utils$4.isObject(e))throw new TypeError("data must be an object");return function e(r,i){if(!utils$4.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+i.join("."));l.push(r),utils$4.forEach(r,(function(r,o){!0===(!(utils$4.isUndefined(r)||null===r)&&n.call(t,r,utils$4.isString(o)?o.trim():o,i,f))&&e(r,i?i.concat(o):[o])})),l.pop()}}(e),t}function encode$2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const prototype=AxiosURLSearchParams.prototype;function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL$2(e,t,r){if(!t)return e;const i=r&&r.encode||encode$1,n=r&&r.serialize;let o;if(o=n?n(t,r):utils$4.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(i),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){const t=e?function(t){return e.call(this,t,encode$2)}:encode$2;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils$4.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData$1="undefined"!=typeof FormData?FormData:null,Blob$1="undefined"!=typeof Blob?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]};const hasBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof document,hasStandardBrowserEnv=(product="undefined"!=typeof navigator&&navigator.product,hasBrowserEnv&&["ReactNative","NativeScript","NS"].indexOf(product)<0);var product;const hasStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var utils$3=Object.freeze({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserEnv:hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv}),platform={...utils$3,...platform$1};function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,i){return platform.isNode&&utils$4.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$4.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function arrayToObject(e){const t={},r=Object.keys(e);let i;const n=r.length;let o;for(i=0;i=e.length;if(o=!o&&utils$4.isArray(i)?i.length:o,a)return utils$4.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s;i[o]&&utils$4.isObject(i[o])||(i[o]=[]);return t(e,r,i[o],n)&&utils$4.isArray(i[o])&&(i[o]=arrayToObject(i[o])),!s}if(utils$4.isFormData(e)&&utils$4.isFunction(e.entries)){const r={};return utils$4.forEachEntry(e,((e,i)=>{t(parsePropPath(e),i,r,0)})),r}return null}function stringifySafely(e,t,r){if(utils$4.isString(e))try{return(t||JSON.parse)(e),utils$4.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",i=r.indexOf("application/json")>-1,n=utils$4.isObject(e);n&&utils$4.isHTMLForm(e)&&(e=new FormData(e));if(utils$4.isFormData(e))return i?JSON.stringify(formDataToJSON(e)):e;if(utils$4.isArrayBuffer(e)||utils$4.isBuffer(e)||utils$4.isStream(e)||utils$4.isFile(e)||utils$4.isBlob(e))return e;if(utils$4.isArrayBufferView(e))return e.buffer;if(utils$4.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(n){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((o=utils$4.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return n||i?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(e){const t=this.transitional||defaults.transitional,r=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&utils$4.isString(e)&&(r&&!this.responseType||i)){const r=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$4.forEach(["delete","get","head","post","put","patch"],(e=>{defaults.headers[e]={}}));var defaults$1=defaults;const ignoreDuplicateOf=utils$4.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var parseHeaders=e=>{const t={};let r,i,n;return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),r=e.substring(0,n).trim().toLowerCase(),i=e.substring(n+1).trim(),!r||t[r]&&ignoreDuplicateOf[r]||("set-cookie"===r?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)})),t};const $internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils$4.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,r,i,n){return utils$4.isFunction(i)?i.call(this,t,r):(n&&(t=r),utils$4.isString(t)?utils$4.isString(i)?-1!==t.indexOf(i):utils$4.isRegExp(i)?i.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}function buildAccessors(e,t){const r=utils$4.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+r,{value:function(e,r,n){return this[i].call(this,t,e,r,n)},configurable:!0})}))}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function n(e,t,r){const n=normalizeHeader(t);if(!n)throw new Error("header name must be a non-empty string");const o=utils$4.findKey(i,n);(!o||void 0===i[o]||!0===r||void 0===r&&!1!==i[o])&&(i[o||t]=normalizeValue(e))}const o=(e,t)=>utils$4.forEach(e,((e,r)=>n(e,r,t)));return utils$4.isPlainObject(e)||e instanceof this.constructor?o(e,t):utils$4.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)?o(parseHeaders(e),t):null!=e&&n(t,e,r),this}get(e,t){if(e=normalizeHeader(e)){const r=utils$4.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return parseTokens(e);if(utils$4.isFunction(t))return t.call(this,e,r);if(utils$4.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=utils$4.findKey(this,e);return!(!r||void 0===this[r]||t&&!matchHeaderValue(this,this[r],r,t))}return!1}delete(e,t){const r=this;let i=!1;function n(e){if(e=normalizeHeader(e)){const n=utils$4.findKey(r,e);!n||t&&!matchHeaderValue(r,r[n],n,t)||(delete r[n],i=!0)}}return utils$4.isArray(e)?e.forEach(n):n(e),i}clear(e){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const n=t[r];e&&!matchHeaderValue(this,this[n],n,e,!0)||(delete this[n],i=!0)}return i}normalize(e){const t=this,r={};return utils$4.forEach(this,((i,n)=>{const o=utils$4.findKey(r,n);if(o)return t[o]=normalizeValue(i),void delete t[n];const s=e?formatHeader(n):String(n).trim();s!==n&&delete t[n],t[s]=normalizeValue(i),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils$4.forEach(this,((r,i)=>{null!=r&&!1!==r&&(t[i]=e&&utils$4.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[$internals]=this[$internals]={accessors:{}}).accessors,r=this.prototype;function i(e){const i=normalizeHeader(e);t[i]||(buildAccessors(r,e),t[i]=!0)}return utils$4.isArray(e)?e.forEach(i):i(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$4.reduceDescriptors(AxiosHeaders.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),utils$4.freezeMethods(AxiosHeaders);var AxiosHeaders$1=AxiosHeaders;function transformData(e,t){const r=this||defaults$1,i=t||r,n=AxiosHeaders$1.from(i.headers);let o=i.data;return utils$4.forEach(e,(function(e){o=e.call(r,o,n.normalize(),t?t.status:void 0)})),n.normalize(),o}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,null==e?"canceled":e,AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}function settle$2(e,t,r){const i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}utils$4.inherits(CanceledError,AxiosError,{__CANCEL__:!0});var cookies=platform.hasStandardBrowserEnv?{write(e,t,r,i,n,o){const s=[e+"="+encodeURIComponent(t)];utils$4.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),utils$4.isString(i)&&s.push("path="+i),utils$4.isString(n)&&s.push("domain="+n),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function isAbsoluteURL$2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs$2(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath$2(e,t){return e&&!isAbsoluteURL$2(t)?combineURLs$2(e,t):t}var isURLSameOrigin=platform.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function i(r){let i=r;return e&&(t.setAttribute("href",i),i=t.href),t.setAttribute("href",i),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=i(window.location.href),function(e){const t=utils$4.isString(e)?i(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const r=new Array(e),i=new Array(e);let n,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const u=Date.now(),c=i[s];n||(n=u),r[o]=a,i[o]=u;let l=s,f=0;for(;l!==o;)f+=r[l++],l%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-n{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-r,u=i(a);r=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&o<=s?(s-o)/u:void 0,event:n};c[t?"download":"upload"]=!0,e(c)}}const isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest;var xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function(t,r){let i=e.data;const n=AxiosHeaders$1.from(e.headers).normalize();let o,s,{responseType:a,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(utils$4.isFormData(i))if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)n.setContentType(!1);else if(!1!==(s=n.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];n.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";n.set("Authorization","Basic "+btoa(t+":"+r))}const f=buildFullPath$2(e.baseURL,e.url);function h(){if(!l)return;const i=AxiosHeaders$1.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());settle$2((function(e){t(e),c()}),(function(e){r(e),c()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:i,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),buildURL$2(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const i=e.transitional||transitionalDefaults;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new AxiosError(t,i.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,l)),l=null},platform.hasStandardBrowserEnv&&(u&&utils$4.isFunction(u)&&(u=u(e)),u||!1!==u&&isURLSameOrigin(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);t&&n.set(e.xsrfHeaderName,t)}void 0===i&&n.setContentType(null),"setRequestHeader"in l&&utils$4.forEach(n.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),utils$4.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{l&&(r(!t||t.type?new CanceledError(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const p=parseProtocol(f);p&&-1===platform.protocols.indexOf(p)?r(new AxiosError("Unsupported protocol "+p+":",AxiosError.ERR_BAD_REQUEST,e)):l.send(i||null)}))};const knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils$4.forEach(knownAdapters,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$4.isFunction(e)||null===e||!1===e;var adapters={getAdapter:e=>{e=utils$4.isArray(e)?e:[e];const{length:t}=e;let r,i;const n={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new AxiosError("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters.getAdapter(e.adapter||defaults$1.adapter)(e).then((function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=AxiosHeaders$1.from(t.headers),t}),(function(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=AxiosHeaders$1.from(t.response.headers))),Promise.reject(t)}))}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig(e,t){t=t||{};const r={};function i(e,t,r){return utils$4.isPlainObject(e)&&utils$4.isPlainObject(t)?utils$4.merge.call({caseless:r},e,t):utils$4.isPlainObject(t)?utils$4.merge({},t):utils$4.isArray(t)?t.slice():t}function n(e,t,r){return utils$4.isUndefined(t)?utils$4.isUndefined(e)?void 0:i(void 0,e,r):i(e,t,r)}function o(e,t){if(!utils$4.isUndefined(t))return i(void 0,t)}function s(e,t){return utils$4.isUndefined(t)?utils$4.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function a(r,n,o){return o in t?i(r,n):o in e?i(void 0,r):void 0}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>n(headersToObject(e),headersToObject(t),!0)};return utils$4.forEach(Object.keys(Object.assign({},e,t)),(function(i){const o=u[i]||n,s=o(e[i],t[i],i);utils$4.isUndefined(s)&&o!==a||(r[i]=s)})),r}const VERSION="1.6.8",validators$1={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{validators$1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const deprecatedWarnings={};function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let n=i.length;for(;n-- >0;){const o=i[n],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new AxiosError("option "+o+" must be "+r,AxiosError.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError("Unknown option "+o,AxiosError.ERR_BAD_OPTION)}}validators$1.transitional=function(e,t,r){function i(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,o)=>{if(!1===e)throw new AxiosError(i(n," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!deprecatedWarnings[n]&&(deprecatedWarnings[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}};var validator={assertOptions:assertOptions,validators:validators$1};const validators=validator.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:n}=t;void 0!==r&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),null!=i&&(utils$4.isFunction(i)?t.paramsSerializer={serialize:i}:validator.assertOptions(i,{encode:validators.function,serialize:validators.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=n&&utils$4.merge(n.common,n[t.method]);n&&utils$4.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete n[e]})),t.headers=AxiosHeaders$1.concat(o,n);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[dispatchRequest.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);f{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{r.subscribe(e),t=e})).then(e);return i.cancel=function(){r.unsubscribe(t)},i},e((function(e,i,n){r.reason||(r.reason=new CanceledError(e,i,n),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new CancelToken((function(t){e=t})),cancel:e}}}var CancelToken$1=CancelToken;function spread(e){return function(t){return e.apply(null,t)}}function isAxiosError(e){return utils$4.isObject(e)&&!0===e.isAxiosError}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach((([e,t])=>{HttpStatusCode[t]=e}));var HttpStatusCode$1=HttpStatusCode;function createInstance(e){const t=new Axios$1(e),r=bind$2(Axios$1.prototype.request,t);return utils$4.extend(r,Axios$1.prototype,t,{allOwnKeys:!0}),utils$4.extend(r,t,null,{allOwnKeys:!0}),r.create=function(t){return createInstance(mergeConfig(e,t))},r}const axios=createInstance(defaults$1);axios.Axios=Axios$1,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$4.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),r}var bind$1=function(e,t){return function(){for(var r=new Array(arguments.length),i=0;i>8-n%1*8)){if((r=i.charCodeAt(n+=3/4))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|r}return s}var platFormName="wechat";function getRequest(){switch(!0){case"object"==typeof wx:return platFormName="wechat",wx.request.bind(wx);case"object"==typeof swan:return platFormName="baidu",swan.request.bind(swan);case"object"==typeof dd:return platFormName="dd",dd.httpRequest.bind(dd);case"object"==typeof my:return platFormName="alipay",(my.request||my.httpRequest).bind(my);default:return wx.request.bind(wx)}}function transformResponse(e,t,r){var i=e.header||e.headers,n=e.statusCode||e.status,o="";return 200===n?o="OK":400===n&&(o="Bad Request"),{data:e.data,status:n,statusText:o,headers:i,config:t,request:r}}function transformError(e,t,r){switch(platFormName){case"wechat":-1!==e.errMsg.indexOf("request:fail abort")?t(createError("Request aborted",r,"ECONNABORTED","")):-1!==e.errMsg.indexOf("timeout")?t(createError("timeout of "+r.timeout+"ms exceeded",r,"ECONNABORTED","")):t(createError("Network Error",r,null,""));break;case"dd":case"alipay":[14,19].includes(e.error)?t(createError("Request aborted",r,"ECONNABORTED","",e)):[13].includes(e.error)?t(createError("timeout of "+r.timeout+"ms exceeded",r,"ECONNABORTED","",e)):t(createError("Network Error",r,null,"",e));break;case"baidu":t(createError("Network Error",r,null,""))}}function transformConfig(e){var t;return["alipay","dd"].includes(platFormName)&&(e.headers=e.header,delete e.header,"dd"===platFormName&&"GET"!==e.method&&"application/json"===(null===(t=e.headers)||void 0===t?void 0:t["Content-Type"])&&"[object Object]"===Object.prototype.toString.call(e.data)&&(e.data=JSON.stringify(e.data))),e}var isJSONstr=function(e){try{return"string"==typeof e&&e.length&&(e=JSON.parse(e))&&"[object Object]"===Object.prototype.toString.call(e)}catch(e){return!1}};function mpAdapter(e,t){var r=(void 0===t?{}:t).transformRequestOption,i=void 0===r?function(e){return e}:r,n=getRequest();return new Promise((function(t,r){var o,s=e.data,a=e.headers,u={method:e.method&&e.method.toUpperCase()||"GET",url:buildURL(buildFullPath(e.baseURL,e.url),e.params,e.paramsSerializer),timeout:e.timeout,success:function(i){var n=transformResponse(i,e,u);settle(t,r,n)},fail:function(t){transformError(t,r,e)},complete:function(){o=void 0}};if(e.auth){var c=[e.auth.username||"",e.auth.password||""],l=c[0],f=c[1];a.Authorization="Basic "+encoder(l+":"+f)}utils.forEach(a,(function(e,t){var r=t.toLowerCase();(void 0===s&&"content-type"===r||"referer"===r)&&delete a[t]})),u.header=a,e.responseType&&(u.responseType=e.responseType),e.cancelToken&&e.cancelToken.promise.then((function(e){o&&(o.abort(),r(e),o=void 0)})),isJSONstr(s)&&(s=JSON.parse(s)),void 0!==s&&(u.data=s),o=n(i(transformConfig(u)))}))}var dist=mpAdapter,mpAdapter$1=getDefaultExportFromCjs(dist),SystemClock=function(){function e(){_classCallCheck(this,e),_defineProperty(this,"offset",0)}return _createClass(e,[{key:"systemClockOffset",get:function(){return this.offset}},{key:"now",value:function(){return Date.now()+(this.offset||0)}},{key:"handleOffset",value:function(e){var t=Date.parse(e);Math.abs(this.now()-t)>=3e4&&(this.offset=t-Date.now())}}]),e}(),systemClock=new SystemClock,cryptoJs={exports:{}};function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core={exports:{}},_nodeResolve_empty={},_nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty}),require$$0=getAugmentedNamespace(_nodeResolve_empty$1),hasRequiredCore;function requireCore(){return hasRequiredCore||(hasRequiredCore=1,function(e,t){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==commonjsGlobal&&commonjsGlobal.crypto&&(r=commonjsGlobal.crypto),!r&&"function"==typeof commonjsRequire)try{r=require$$0}catch(e){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,i=this.sigBytes,n=e.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new u.init(r,t/2)}},f=c.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new u.init(r,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var f=0;f>>2]|=e[n]<<24-n%4*8;t.call(this,i,r)}else t.apply(this,arguments)};i.prototype=e}}(),r.lib.WordArray)}(libTypedarrays)),libTypedarrays.exports}var encUtf16={exports:{}},hasRequiredEncUtf16;function requireEncUtf16(){return hasRequiredEncUtf16||(hasRequiredEncUtf16=1,function(e,t){var r;e.exports=(r=requireCore(),function(){var e=r,t=e.lib.WordArray,i=e.enc;function n(e){return e<<8&4278255360|e>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var r=e.length,i=[],n=0;n>>1]|=e.charCodeAt(n)<<16-n%2*16;return t.create(i,2*r)}},i.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],o=0;o>>2]>>>16-o%4*8&65535);i.push(String.fromCharCode(s))}return i.join("")},parse:function(e){for(var r=e.length,i=[],o=0;o>>1]|=n(e.charCodeAt(o)<<16-o%2*16);return t.create(i,2*r)}}}(),r.enc.Utf16)}(encUtf16)),encUtf16.exports}var encBase64={exports:{}},hasRequiredEncBase64;function requireEncBase64(){return hasRequiredEncBase64||(hasRequiredEncBase64=1,function(e,t){var r;e.exports=(r=requireCore(),function(){var e=r,t=e.lib.WordArray;function i(e,r,i){for(var n=[],o=0,s=0;s>>6-s%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return t.create(n,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,i=this._map;e.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a>>6*(3-a)&63));var u=i.charAt(64);if(u)for(;n.length%4;)n.push(u);return n.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-s%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return t.create(n,o)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,i=e.sigBytes,n=t?this._safe_map:this._map;e.clamp();for(var o=[],s=0;s>>2]>>>24-s%4*8&255)<<16|(r[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|r[s+2>>>2]>>>24-(s+2)%4*8&255,u=0;u<4&&s+.75*u>>6*(3-u)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var r=e.length,n=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var s=0;s>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],p=e[t+2],d=e[t+3],g=e[t+4],y=e[t+5],m=e[t+6],v=e[t+7],b=e[t+8],w=e[t+9],_=e[t+10],x=e[t+11],S=e[t+12],$=e[t+13],R=e[t+14],E=e[t+15],O=o[0],A=o[1],k=o[2],C=o[3];O=c(O,A,k,C,s,7,a[0]),C=c(C,O,A,k,u,12,a[1]),k=c(k,C,O,A,p,17,a[2]),A=c(A,k,C,O,d,22,a[3]),O=c(O,A,k,C,g,7,a[4]),C=c(C,O,A,k,y,12,a[5]),k=c(k,C,O,A,m,17,a[6]),A=c(A,k,C,O,v,22,a[7]),O=c(O,A,k,C,b,7,a[8]),C=c(C,O,A,k,w,12,a[9]),k=c(k,C,O,A,_,17,a[10]),A=c(A,k,C,O,x,22,a[11]),O=c(O,A,k,C,S,7,a[12]),C=c(C,O,A,k,$,12,a[13]),k=c(k,C,O,A,R,17,a[14]),O=l(O,A=c(A,k,C,O,E,22,a[15]),k,C,u,5,a[16]),C=l(C,O,A,k,m,9,a[17]),k=l(k,C,O,A,x,14,a[18]),A=l(A,k,C,O,s,20,a[19]),O=l(O,A,k,C,y,5,a[20]),C=l(C,O,A,k,_,9,a[21]),k=l(k,C,O,A,E,14,a[22]),A=l(A,k,C,O,g,20,a[23]),O=l(O,A,k,C,w,5,a[24]),C=l(C,O,A,k,R,9,a[25]),k=l(k,C,O,A,d,14,a[26]),A=l(A,k,C,O,b,20,a[27]),O=l(O,A,k,C,$,5,a[28]),C=l(C,O,A,k,p,9,a[29]),k=l(k,C,O,A,v,14,a[30]),O=f(O,A=l(A,k,C,O,S,20,a[31]),k,C,y,4,a[32]),C=f(C,O,A,k,b,11,a[33]),k=f(k,C,O,A,x,16,a[34]),A=f(A,k,C,O,R,23,a[35]),O=f(O,A,k,C,u,4,a[36]),C=f(C,O,A,k,g,11,a[37]),k=f(k,C,O,A,v,16,a[38]),A=f(A,k,C,O,_,23,a[39]),O=f(O,A,k,C,$,4,a[40]),C=f(C,O,A,k,s,11,a[41]),k=f(k,C,O,A,d,16,a[42]),A=f(A,k,C,O,m,23,a[43]),O=f(O,A,k,C,w,4,a[44]),C=f(C,O,A,k,S,11,a[45]),k=f(k,C,O,A,E,16,a[46]),O=h(O,A=f(A,k,C,O,p,23,a[47]),k,C,s,6,a[48]),C=h(C,O,A,k,v,10,a[49]),k=h(k,C,O,A,R,15,a[50]),A=h(A,k,C,O,y,21,a[51]),O=h(O,A,k,C,S,6,a[52]),C=h(C,O,A,k,d,10,a[53]),k=h(k,C,O,A,_,15,a[54]),A=h(A,k,C,O,u,21,a[55]),O=h(O,A,k,C,b,6,a[56]),C=h(C,O,A,k,E,10,a[57]),k=h(k,C,O,A,m,15,a[58]),A=h(A,k,C,O,$,21,a[59]),O=h(O,A,k,C,g,6,a[60]),C=h(C,O,A,k,x,10,a[61]),k=h(k,C,O,A,p,15,a[62]),A=h(A,k,C,O,w,21,a[63]),o[0]=o[0]+O|0,o[1]=o[1]+A|0,o[2]=o[2]+k|0,o[3]=o[3]+C|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;var o=e.floor(i/4294967296),s=i;r[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,i,n,o,s){var a=e+(t&r|~t&i)+n+s;return(a<>>32-o)+t}function l(e,t,r,i,n,o,s){var a=e+(t&i|r&~i)+n+s;return(a<>>32-o)+t}function f(e,t,r,i,n,o,s){var a=e+(t^r^i)+n+s;return(a<>>32-o)+t}function h(e,t,r,i,n,o,s){var a=e+(r^(t|~i))+n+s;return(a<>>32-o)+t}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),r.MD5)}(md5)),md5.exports}var sha1={exports:{}},hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,function(e,t){var r,i,n,o,s,a,u,c;e.exports=(c=requireCore(),i=(r=c).lib,n=i.WordArray,o=i.Hasher,s=r.algo,a=[],u=s.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],u=r[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}var f=(i<<5|i>>>27)+u+a[c];f+=c<20?1518500249+(n&o|~n&s):c<40?1859775393+(n^o^s):c<60?(n&o|n&s|o&s)-1894007588:(n^o^s)-899497514,u=s,s=o,o=n<<30|n>>>2,n=i,i=f}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(i+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=o._createHelper(u),r.HmacSHA1=o._createHmacHelper(u),c.SHA1)}(sha1)),sha1.exports}var sha256={exports:{}},hasRequiredSha256;function requireSha256(){return hasRequiredSha256||(hasRequiredSha256=1,function(e,t){var r;e.exports=(r=requireCore(),function(e){var t=r,i=t.lib,n=i.WordArray,o=i.Hasher,s=t.algo,a=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),i=2;i<=r;i++)if(!(t%i))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var i=2,n=0;n<64;)t(i)&&(n<8&&(a[n]=r(e.pow(i,.5))),u[n]=r(e.pow(i,1/3)),n++),i++}();var c=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],l=r[5],f=r[6],h=r[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var d=c[p-15],g=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=c[p-2],m=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;c[p]=g+c[p-7]+m+c[p-16]}var v=i&n^i&o^n&o,b=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&f)+u[p]+c[p];h=f,f=l,l=a,a=s+w|0,s=o,o=n,n=i,i=w+(b+v)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+h|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=e.floor(i/4294967296),r[15+(n+64>>>9<<4)]=i,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)}(sha256)),sha256.exports}var sha224={exports:{}},hasRequiredSha224;function requireSha224(){return hasRequiredSha224||(hasRequiredSha224=1,function(e,t){var r,i,n,o,s,a;e.exports=(a=requireCore(),requireSha256(),i=(r=a).lib.WordArray,n=r.algo,o=n.SHA256,s=n.SHA224=o.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=o._createHelper(s),r.HmacSHA224=o._createHmacHelper(s),a.SHA224)}(sha224)),sha224.exports}var sha512={exports:{}},hasRequiredSha512;function requireSha512(){return hasRequiredSha512||(hasRequiredSha512=1,function(e,t){var r;e.exports=(r=requireCore(),requireX64Core(),function(){var e=r,t=e.lib.Hasher,i=e.x64,n=i.Word,o=i.WordArray,s=e.algo;function a(){return n.create.apply(n,arguments)}var u=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=a()}();var l=s.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],l=r[5],f=r[6],h=r[7],p=i.high,d=i.low,g=n.high,y=n.low,m=o.high,v=o.low,b=s.high,w=s.low,_=a.high,x=a.low,S=l.high,$=l.low,R=f.high,E=f.low,O=h.high,A=h.low,k=p,C=d,B=g,q=y,L=m,T=v,P=b,j=w,F=_,D=x,N=S,H=$,U=R,z=E,M=O,I=A,W=0;W<80;W++){var G,K,V=c[W];if(W<16)K=V.high=0|e[t+2*W],G=V.low=0|e[t+2*W+1];else{var J=c[W-15],X=J.high,Z=J.low,Q=(X>>>1|Z<<31)^(X>>>8|Z<<24)^X>>>7,Y=(Z>>>1|X<<31)^(Z>>>8|X<<24)^(Z>>>7|X<<25),ee=c[W-2],te=ee.high,re=ee.low,ie=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ne=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[W-7],se=oe.high,ae=oe.low,ue=c[W-16],ce=ue.high,le=ue.low;K=(K=(K=Q+se+((G=Y+ae)>>>0>>0?1:0))+ie+((G+=ne)>>>0>>0?1:0))+ce+((G+=le)>>>0>>0?1:0),V.high=K,V.low=G}var fe,he=F&N^~F&U,pe=D&H^~D&z,de=k&B^k&L^B&L,ge=C&q^C&T^q&T,ye=(k>>>28|C<<4)^(k<<30|C>>>2)^(k<<25|C>>>7),me=(C>>>28|k<<4)^(C<<30|k>>>2)^(C<<25|k>>>7),ve=(F>>>14|D<<18)^(F>>>18|D<<14)^(F<<23|D>>>9),be=(D>>>14|F<<18)^(D>>>18|F<<14)^(D<<23|F>>>9),we=u[W],_e=we.high,xe=we.low,Se=M+ve+((fe=I+be)>>>0>>0?1:0),$e=me+ge;M=U,I=z,U=N,z=H,N=F,H=D,F=P+(Se=(Se=(Se=Se+he+((fe+=pe)>>>0>>0?1:0))+_e+((fe+=xe)>>>0>>0?1:0))+K+((fe+=G)>>>0>>0?1:0))+((D=j+fe|0)>>>0>>0?1:0)|0,P=L,j=T,L=B,T=q,B=k,q=C,k=Se+(ye+de+($e>>>0>>0?1:0))+((C=fe+$e|0)>>>0>>0?1:0)|0}d=i.low=d+C,i.high=p+k+(d>>>0>>0?1:0),y=n.low=y+q,n.high=g+B+(y>>>0>>0?1:0),v=o.low=v+T,o.high=m+L+(v>>>0>>0?1:0),w=s.low=w+j,s.high=b+P+(w>>>0>>0?1:0),x=a.low=x+D,a.high=_+F+(x>>>0>>0?1:0),$=l.low=$+H,l.high=S+N+($>>>0>>0?1:0),E=f.low=E+z,f.high=R+U+(E>>>0>>0?1:0),A=h.low=A+I,h.high=O+M+(A>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(i+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),r.SHA512)}(sha512)),sha512.exports}var sha384={exports:{}},hasRequiredSha384;function requireSha384(){return hasRequiredSha384||(hasRequiredSha384=1,function(e,t){var r,i,n,o,s,a,u,c;e.exports=(c=requireCore(),requireX64Core(),requireSha512(),i=(r=c).x64,n=i.Word,o=i.WordArray,s=r.algo,a=s.SHA512,u=s.SHA384=a.extend({_doReset:function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=a._createHelper(u),r.HmacSHA384=a._createHmacHelper(u),c.SHA384)}(sha384)),sha384.exports}var sha3={exports:{}},hasRequiredSha3;function requireSha3(){return hasRequiredSha3||(hasRequiredSha3=1,function(e,t){var r;e.exports=(r=requireCore(),requireX64Core(),function(e){var t=r,i=t.lib,n=i.WordArray,o=i.Hasher,s=t.x64.Word,a=t.algo,u=[],c=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var i=(2*e+3*t)%5;e=t%5,t=i}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var n=1,o=0;o<24;o++){for(var a=0,f=0,h=0;h<7;h++){if(1&n){var p=(1<>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(A=r[n]).high^=s,A.low^=o}for(var a=0;a<24;a++){for(var h=0;h<5;h++){for(var p=0,d=0,g=0;g<5;g++)p^=(A=r[h+5*g]).high,d^=A.low;var y=f[h];y.high=p,y.low=d}for(h=0;h<5;h++){var m=f[(h+4)%5],v=f[(h+1)%5],b=v.high,w=v.low;for(p=m.high^(b<<1|w>>>31),d=m.low^(w<<1|b>>>31),g=0;g<5;g++)(A=r[h+5*g]).high^=p,A.low^=d}for(var _=1;_<25;_++){var x=(A=r[_]).high,S=A.low,$=u[_];$<32?(p=x<<$|S>>>32-$,d=S<<$|x>>>32-$):(p=S<<$-32|x>>>64-$,d=x<<$-32|S>>>64-$);var R=f[c[_]];R.high=p,R.low=d}var E=f[0],O=r[0];for(E.high=O.high,E.low=O.low,h=0;h<5;h++)for(g=0;g<5;g++){var A=r[_=h+5*g],k=f[_],C=f[(h+1)%5+5*g],B=f[(h+2)%5+5*g];A.high=k.high^~C.high&B.high,A.low=k.low^~C.low&B.low}A=r[0];var q=l[a];A.high^=q.high,A.low^=q.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var i=8*t.sigBytes,o=32*this.blockSize;r[i>>>5]|=1<<24-i%32,r[(e.ceil((i+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,u=a/8,c=[],l=0;l>>24)|4278255360&(h<<24|h>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(h)}return new n.init(c,a)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)}(sha3)),sha3.exports}var ripemd160={exports:{}},hasRequiredRipemd160;function requireRipemd160(){return hasRequiredRipemd160||(hasRequiredRipemd160=1,function(e,t){var r;e.exports=(r=requireCore(), +/** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +function(e){var t=r,i=t.lib,n=i.WordArray,o=i.Hasher,s=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=n.create([0,1518500249,1859775393,2400959708,2840853838]),h=n.create([1352829926,1548603684,1836072691,2053994217,0]),p=s.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var i=t+r,n=e[i];e[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,s,p,w,_,x,S,$,R,E,O,A=this._hash.words,k=f.words,C=h.words,B=a.words,q=u.words,L=c.words,T=l.words;for(x=o=A[0],S=s=A[1],$=p=A[2],R=w=A[3],E=_=A[4],r=0;r<80;r+=1)O=o+e[t+B[r]]|0,O+=r<16?d(s,p,w)+k[0]:r<32?g(s,p,w)+k[1]:r<48?y(s,p,w)+k[2]:r<64?m(s,p,w)+k[3]:v(s,p,w)+k[4],O=(O=b(O|=0,L[r]))+_|0,o=_,_=w,w=b(p,10),p=s,s=O,O=x+e[t+q[r]]|0,O+=r<16?v(S,$,R)+C[0]:r<32?m(S,$,R)+C[1]:r<48?y(S,$,R)+C[2]:r<64?g(S,$,R)+C[3]:d(S,$,R)+C[4],O=(O=b(O|=0,T[r]))+E|0,x=E,E=R,R=b($,10),$=S,S=O;O=A[1]+p+R|0,A[1]=A[2]+w+E|0,A[2]=A[3]+_+x|0,A[3]=A[4]+o+S|0,A[4]=A[0]+s+$|0,A[0]=O},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return n},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,r){return e^t^r}function g(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function v(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}t.RIPEMD160=o._createHelper(p),t.HmacRIPEMD160=o._createHmacHelper(p)}(),r.RIPEMD160)}(ripemd160)),ripemd160.exports}var hmac={exports:{}},hasRequiredHmac;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,function(e,t){var r,i,n,o;e.exports=(r=requireCore(),n=(i=r).lib.Base,o=i.enc.Utf8,void(i.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var n=this._oKey=t.clone(),s=this._iKey=t.clone(),a=n.words,u=s.words,c=0;c>>2];e.sigBytes-=t}};i.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:d}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,i=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=i.createEncryptor:(e=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(i,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var g=i.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(u)},parse:function(e){var t,r=u.parse(e),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(t=o.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),g.create({ciphertext:r,salt:t})}},m=i.SerializableCipher=n.extend({cfg:n.extend({format:y}),encrypt:function(e,t,r,i){i=this.cfg.extend(i);var n=e.createEncryptor(r,i),o=n.finalize(t),s=n.cfg;return g.create({ciphertext:o,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,r,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(r,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(t.kdf={}).OpenSSL={execute:function(e,t,r,i,n){if(i||(i=o.random(8)),n)s=c.create({keySize:t+r,hasher:n}).compute(e,i);else var s=c.create({keySize:t+r}).compute(e,i);var a=o.create(s.words.slice(t),4*r);return s.sigBytes=4*t,g.create({key:s,iv:a,salt:i})}},b=i.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:v}),encrypt:function(e,t,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,e.keySize,e.ivSize,i.salt,i.hasher);i.iv=n.iv;var o=m.encrypt.call(this,e,t,n.key,i);return o.mixIn(n),o},decrypt:function(e,t,r,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var n=i.kdf.execute(r,e.keySize,e.ivSize,t.salt,i.hasher);return i.iv=n.iv,m.decrypt.call(this,e,t,n.key,i)}})}()))}(cipherCore)),cipherCore.exports}var modeCfb={exports:{}},hasRequiredModeCfb;function requireModeCfb(){return hasRequiredModeCfb||(hasRequiredModeCfb=1,function(e,t){var r;e.exports=(r=requireCore(),requireCipherCore(),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,r,i){var n,o=this._iv;o?(n=o.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var s=0;s>24))e+=1<<24;else{var t=e>>16&255,r=e>>8&255,i=255&e;255===t?(t=0,255===r?(r=0,255===i?i=0:++i):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=i}return e}function i(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var n=e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),i(s);var a=s.slice(0);r.encryptBlock(a,0);for(var u=0;u>>2]|=n<<24-o%4*8,e.sigBytes+=n},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)}(padAnsix923)),padAnsix923.exports}var padIso10126={exports:{}},hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,function(e,t){var r;e.exports=(r=requireCore(),requireCipherCore(),r.pad.Iso10126={pad:function(e,t){var i=4*t,n=i-e.sigBytes%i;e.concat(r.lib.WordArray.random(n-1)).concat(r.lib.WordArray.create([n<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)}(padIso10126)),padIso10126.exports}var padIso97971={exports:{}},hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,function(e,t){var r;e.exports=(r=requireCore(),requireCipherCore(),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)}(padIso97971)),padIso97971.exports}var padZeropadding={exports:{}},hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,function(e,t){var r;e.exports=(r=requireCore(),requireCipherCore(),r.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},r.pad.ZeroPadding)}(padZeropadding)),padZeropadding.exports}var padNopadding={exports:{}},hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,function(e,t){var r;e.exports=(r=requireCore(),requireCipherCore(),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)}(padNopadding)),padNopadding.exports}var formatHex={exports:{}},hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,function(e,t){var r,i,n,o;e.exports=(o=requireCore(),requireCipherCore(),i=(r=o).lib.CipherParams,n=r.enc.Hex,r.format.Hex={stringify:function(e){return e.ciphertext.toString(n)},parse:function(e){var t=n.parse(e);return i.create({ciphertext:t})}},o.format.Hex)}(formatHex)),formatHex.exports}var aes={exports:{}},hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,function(e,t){var r;e.exports=(r=requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore(),function(){var e=r,t=e.lib.BlockCipher,i=e.algo,n=[],o=[],s=[],a=[],u=[],c=[],l=[],f=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,i=0;for(t=0;t<256;t++){var d=i^i<<1^i<<2^i<<3^i<<4;d=d>>>8^255&d^99,n[r]=d,o[d]=r;var g=e[r],y=e[g],m=e[y],v=257*e[d]^16843008*d;s[r]=v<<24|v>>>8,a[r]=v<<16|v>>>16,u[r]=v<<8|v>>>24,c[r]=v,v=16843009*m^65537*y^257*g^16843008*r,l[d]=v<<24|v>>>8,f[d]=v<<16|v>>>16,h[d]=v<<8|v>>>24,p[d]=v,r?(r=g^e[e[e[m^g]]],i^=e[e[i]]):r=i=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],g=i.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,i=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],s=0;s6&&s%r==4&&(c=n[c>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c]):(c=n[(c=c<<8|c>>>24)>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c],c^=d[s/r|0]<<24),o[s]=o[s-r]^c);for(var a=this._invKeySchedule=[],u=0;u>>24]]^f[n[c>>>16&255]]^h[n[c>>>8&255]]^p[n[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,n)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,p,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,i,n,o,s,a){for(var u=this._nRounds,c=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],h=e[t+3]^r[3],p=4,d=1;d>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&h]^r[p++],y=i[l>>>24]^n[f>>>16&255]^o[h>>>8&255]^s[255&c]^r[p++],m=i[f>>>24]^n[h>>>16&255]^o[c>>>8&255]^s[255&l]^r[p++],v=i[h>>>24]^n[c>>>16&255]^o[l>>>8&255]^s[255&f]^r[p++];c=g,l=y,f=m,h=v}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^r[p++],y=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^r[p++],m=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^r[p++],v=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^r[p++],e[t]=g,e[t+1]=y,e[t+2]=m,e[t+3]=v},keySize:8});e.AES=t._createHelper(g)}(),r.AES)}(aes)),aes.exports}var tripledes={exports:{}},hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,function(e,t){var r;e.exports=(r=requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore(),function(){var e=r,t=e.lib,i=t.WordArray,n=t.BlockCipher,o=e.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=n.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var i=s[r]-1;t[r]=e[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],o=0;o<16;o++){var c=n[o]=[],l=u[o];for(r=0;r<24;r++)c[r/6|0]|=t[(a[r]-1+l)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(a[r+24]-1+l)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=n[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],o=this._lBlock,s=this._rBlock,a=0,u=0;u<8;u++)a|=c[u][((s^n[u])&l[u])>>>0];this._lBlock=s,this._rBlock=o^a}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),n=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(i.create(t)),this._des2=f.createEncryptor(i.create(r)),this._des3=f.createEncryptor(i.create(n))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=n._createHelper(d)}(),r.TripleDES)}(tripledes)),tripledes.exports}var rc4={exports:{}},hasRequiredRc4;function requireRc4(){return hasRequiredRc4||(hasRequiredRc4=1,function(e,t){var r;e.exports=(r=requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore(),function(){var e=r,t=e.lib.StreamCipher,i=e.algo,n=i.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var o=0;n<256;n++){var s=n%r,a=t[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+a)%256;var u=i[n];i[n]=i[o],i[o]=u}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,i|=e[(e[t]+e[r])%256]<<24-8*n}return this._i=t,this._j=r,i}e.RC4=t._createHelper(n);var s=i.RC4Drop=n.extend({cfg:n.cfg.extend({drop:192}),_doReset:function(){n._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(s)}(),r.RC4)}(rc4)),rc4.exports}var rabbit={exports:{}},hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,function(e,t){var r;e.exports=(r=requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore(),function(){var e=r,t=e.lib.StreamCipher,i=e.algo,n=[],o=[],s=[],a=i.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)u.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(t){var o=t.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=c>>>16|4294901760&l,h=l<<16|65535&c;for(n[0]^=c,n[1]^=f,n[2]^=l,n[3]^=h,n[4]^=c,n[5]^=f,n[6]^=l,n[7]^=h,r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),e[t+i]^=n[i]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var i=e[r]+t[r],n=65535&i,a=i>>>16,u=((n*n>>>17)+n*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|0);s[r]=u^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=t._createHelper(a)}(),r.Rabbit)}(rabbit)),rabbit.exports}var rabbitLegacy={exports:{}},hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,function(e,t){var r;e.exports=(r=requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore(),function(){var e=r,t=e.lib.StreamCipher,i=e.algo,n=[],o=[],s=[],a=i.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var n=0;n<4;n++)u.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=c>>>16|4294901760&l,h=l<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=l,i[3]^=h,i[4]^=c,i[5]^=f,i[6]^=l,i[7]^=h,n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),e[t+i]^=n[i]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var i=e[r]+t[r],n=65535&i,a=i>>>16,u=((n*n>>>17)+n*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|0);s[r]=u^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=t._createHelper(a)}(),r.RabbitLegacy)}(rabbitLegacy)),rabbitLegacy.exports}var blowfish={exports:{}},hasRequiredBlowfish;function requireBlowfish(){return hasRequiredBlowfish||(hasRequiredBlowfish=1,function(e,t){var r;e.exports=(r=requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore(),function(){var e=r,t=e.lib.BlockCipher,i=e.algo;const n=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var a={pbox:[],sbox:[]};function u(e,t){let r=t>>24&255,i=t>>16&255,n=t>>8&255,o=255&t,s=e.sbox[0][r]+e.sbox[1][i];return s^=e.sbox[2][n],s+=e.sbox[3][o],s}function c(e,t,r){let i,o=t,s=r;for(let t=0;t1;--t)o^=e.pbox[t],s=u(e,o)^s,i=o,o=s,s=i;return i=o,o=s,s=i,s^=e.pbox[1],o^=e.pbox[0],{left:o,right:s}}function f(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=s[t][r]}let i=0;for(let s=0;s=r&&(i=0);let a=0,u=0,l=0;for(let t=0;tt?1:-1}))},getHeaderKeylist:function(e){for(var t=[],r=0,i=Object.keys(e);rt?1:-1}))},camSafeUrlEncode:function(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")},obj2str:function(e,t){var r,i,n,o=[],s=t(e);for(r=0;r1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var r=new Array(64),i=new Array(123),n=0;n<64;)i[r[n]=n<26?n+65:n<52?n+71:n<62?n-4:n-59|43]=n++;t.encode=function(e,t,i){for(var n,o=null,s=[],a=0,u=0;t>2],n=(3&c)<<4,u=1;break;case 1:s[a++]=r[n|c>>4],n=(15&c)<<2,u=2;break;case 2:s[a++]=r[n|c>>6],s[a++]=r[63&c],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=r[n],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var o="invalid encoding";t.decode=function(e,t,r){for(var n,s=r,a=0,u=0;u1)break;if(void 0===(c=i[c]))throw Error(o);switch(a){case 0:n=c,a=1;break;case 1:t[r++]=n<<2|(48&c)>>4,n=c,a=2;break;case 2:t[r++]=(15&n)<<4|(60&c)>>2,n=c,a=3;break;case 3:t[r++]=(3&n)<<6|c,a=0}}if(1===a)throw Error(o);return r-s},t.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}(base64$1)),base64$1}function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;function e(){this._listeners={}}return hasRequiredEventemitter=1,eventemitter=e,e.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},e.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],i=0;i0?0:2147483648,r,i);else if(isNaN(t))e(2143289344,r,i);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,r,i);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,r,i);else{var o=Math.floor(Math.log(t)/Math.LN2);e((n<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,i)}}function s(e,t,r){var i=e(t,r),n=2*(i>>31)+1,o=i>>>23&255,s=8388607&i;return 255===o?s?NaN:n*(1/0):0===o?1401298464324817e-60*n*s:n*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=o.bind(null,t),e.writeFloatBE=o.bind(null,r),e.readFloatLE=s.bind(null,i),e.readFloatBE=s.bind(null,n)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),i=128===r[7];function n(e,i,n){t[0]=e,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3],i[n+4]=r[4],i[n+5]=r[5],i[n+6]=r[6],i[n+7]=r[7]}function o(e,i,n){t[0]=e,i[n]=r[7],i[n+1]=r[6],i[n+2]=r[5],i[n+3]=r[4],i[n+4]=r[3],i[n+5]=r[2],i[n+6]=r[1],i[n+7]=r[0]}function s(e,i){return r[0]=e[i],r[1]=e[i+1],r[2]=e[i+2],r[3]=e[i+3],r[4]=e[i+4],r[5]=e[i+5],r[6]=e[i+6],r[7]=e[i+7],t[0]}function a(e,i){return r[7]=e[i],r[6]=e[i+1],r[5]=e[i+2],r[4]=e[i+3],r[3]=e[i+4],r[2]=e[i+5],r[1]=e[i+6],r[0]=e[i+7],t[0]}e.writeDoubleLE=i?n:o,e.writeDoubleBE=i?o:n,e.readDoubleLE=i?s:a,e.readDoubleBE=i?a:s}():function(){function o(e,t,r,i,n,o){var s=i<0?1:0;if(s&&(i=-i),0===i)e(0,n,o+t),e(1/i>0?0:2147483648,n,o+r);else if(isNaN(i))e(0,n,o+t),e(2146959360,n,o+r);else if(i>17976931348623157e292)e(0,n,o+t),e((s<<31|2146435072)>>>0,n,o+r);else{var a;if(i<22250738585072014e-324)e((a=i/5e-324)>>>0,n,o+t),e((s<<31|a/4294967296)>>>0,n,o+r);else{var u=Math.floor(Math.log(i)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=i*Math.pow(2,-u))>>>0,n,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,n,o+r)}}}function s(e,t,r,i,n){var o=e(i,n+t),s=e(i,n+r),a=2*(s>>31)+1,u=s>>>20&2047,c=4294967296*(1048575&s)+o;return 2047===u?c?NaN:a*(1/0):0===u?5e-324*a*c:a*Math.pow(2,u-1075)*(c+4503599627370496)}e.writeDoubleLE=o.bind(null,t,0,4),e.writeDoubleBE=o.bind(null,r,4,0),e.readDoubleLE=s.bind(null,i,0,4),e.readDoubleBE=s.bind(null,n,4,0)}(),e}function t(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function r(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function n(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}return hasRequiredFloat=1,float=e(e)}function requireInquire(){if(hasRequiredInquire)return inquire_1;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}return hasRequiredInquire=1,inquire_1=inquire,inquire_1}var utf8$2={},hasRequiredUtf8,pool_1,hasRequiredPool,longbits,hasRequiredLongbits,hasRequiredMinimal;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(e){var t=e;t.length=function(e){for(var t=0,r=0,i=0;i191&&i<224?o[s++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[s++]=55296+(i>>10),o[s++]=56320+(1023&i)):o[s++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,o)),s=0);return n?(s&&n.push(String.fromCharCode.apply(String,o.slice(0,s))),n.join("")):String.fromCharCode.apply(String,o.slice(0,s))},t.write=function(e,t,r){for(var i,n,o=r,s=0;s>6|192,t[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=e.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&n),++s,t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128);return r-o}}(utf8$2)),utf8$2}function requirePool(){if(hasRequiredPool)return pool_1;return hasRequiredPool=1,pool_1=function(e,t,r){var i=r||8192,n=i>>>1,o=null,s=i;return function(r){if(r<1||r>n)return e(r);s+r>i&&(o=e(i),s=0);var a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}}function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=t;var e=requireMinimal();function t(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=t.zero=new t(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(0===e)return r;var i=e<0;i&&(e=-e);var n=e>>>0,o=(e-n)/4294967296>>>0;return i&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new t(n,o)},t.from=function(i){if("number"==typeof i)return t.fromNumber(i);if(e.isString(i)){if(!e.Long)return t.fromNumber(parseInt(i,10));i=e.Long.fromString(i)}return i.low||i.high?new t(i.low>>>0,i.high>>>0):r},t.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},t.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var n=String.prototype.charCodeAt;return t.fromHash=function(e){return e===i?r:new t((n.call(e,0)|n.call(e,1)<<8|n.call(e,2)<<16|n.call(e,3)<<24)>>>0,(n.call(e,4)|n.call(e,5)<<8|n.call(e,6)<<16|n.call(e,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},t.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},t.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10},longbits}function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,function(e){var t=e;function r(e,t,r){for(var i=Object.keys(t),n=0;n0)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var i=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(i.lo,i.hi,r):i.toNumber(Boolean(r))},t.merge=r,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=i,t.ProtocolError=i("ProtocolError"),t.oneOfGetter=function(e){for(var t={},r=0;r-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},t.oneOfSetter=function(e){return function(t){for(var r=0;r127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function VarintOp(e,t){this.len=e,this.next=void 0,this.val=t}function writeVarint64(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function writeFixed32(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}Writer$1.create=create$1(),Writer$1.alloc=function(e){return new util$4.Array(e)},util$4.Array!==Array&&(Writer$1.alloc=util$4.pool(Writer$1.alloc,util$4.Array.prototype.subarray)),Writer$1.prototype._push=function(e,t,r){return this.tail=this.tail.next=new Op(e,t,r),this.len+=t,this},VarintOp.prototype=Object.create(Op.prototype),VarintOp.prototype.fn=writeVarint32,Writer$1.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new VarintOp((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},Writer$1.prototype.int32=function(e){return e<0?this._push(writeVarint64,10,LongBits$1.fromNumber(e)):this.uint32(e)},Writer$1.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},Writer$1.prototype.uint64=function(e){var t=LongBits$1.from(e);return this._push(writeVarint64,t.length(),t)},Writer$1.prototype.int64=Writer$1.prototype.uint64,Writer$1.prototype.sint64=function(e){var t=LongBits$1.from(e).zzEncode();return this._push(writeVarint64,t.length(),t)},Writer$1.prototype.bool=function(e){return this._push(writeByte,1,e?1:0)},Writer$1.prototype.fixed32=function(e){return this._push(writeFixed32,4,e>>>0)},Writer$1.prototype.sfixed32=Writer$1.prototype.fixed32,Writer$1.prototype.fixed64=function(e){var t=LongBits$1.from(e);return this._push(writeFixed32,4,t.lo)._push(writeFixed32,4,t.hi)},Writer$1.prototype.sfixed64=Writer$1.prototype.fixed64,Writer$1.prototype.float=function(e){return this._push(util$4.float.writeFloatLE,4,e)},Writer$1.prototype.double=function(e){return this._push(util$4.float.writeDoubleLE,8,e)};var writeBytes=util$4.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var i=0;i>>0;if(!t)return this._push(writeByte,1,0);if(util$4.isString(e)){var r=Writer$1.alloc(t=base64.length(e));base64.decode(e,r,0),e=r}return this.uint32(t)._push(writeBytes,t,e)},Writer$1.prototype.string=function(e){var t=utf8$1.length(e);return t?this.uint32(t)._push(utf8$1.write,t,e):this._push(writeByte,1,0)},Writer$1.prototype.fork=function(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this},Writer$1.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this},Writer$1.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},Writer$1.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},Writer$1._configure=function(e){BufferWriter$1=e,Writer$1.create=create$1(),BufferWriter$1._configure()};var writer_buffer=BufferWriter,Writer=writer;(BufferWriter.prototype=Object.create(Writer.prototype)).constructor=BufferWriter;var util$3=requireMinimal();function BufferWriter(){Writer.call(this)}function writeStringBuffer(e,t,r){e.length<40?util$3.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}BufferWriter._configure=function(){BufferWriter.alloc=util$3._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=util$3.Buffer&&util$3.Buffer.prototype instanceof Uint8Array&&"set"===util$3.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var i=0;i>>0;return this.uint32(t),t&&this._push(BufferWriter.writeBytesBuffer,t,e),this},BufferWriter.prototype.string=function(e){var t=util$3.Buffer.byteLength(e);return this.uint32(t),t&&this._push(writeStringBuffer,t,e),this},BufferWriter._configure();var reader=Reader$1,util$2=requireMinimal(),BufferReader$1,LongBits=util$2.LongBits,utf8=util$2.utf8;function indexOutOfRange(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function Reader$1(e){this.buf=e,this.pos=0,this.len=e.length}var create_array="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new Reader$1(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new Reader$1(e);throw Error("illegal buffer")},create=function(){return util$2.Buffer?function(e){return(Reader$1.create=function(e){return util$2.Buffer.isBuffer(e)?new BufferReader$1(e):create_array(e)})(e)}:create_array},value;function readLongVarint(){var e=new LongBits(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw indexOutOfRange(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw indexOutOfRange(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function readFixed32_end(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new LongBits(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader$1.create=create(),Reader$1.prototype._slice=util$2.Array.prototype.subarray||util$2.Array.prototype.slice,Reader$1.prototype.uint32=(value=4294967295,function(){if(value=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return value;if(value=(value|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return value;if(value=(value|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return value;if(value=(value|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return value;if(value=(value|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return value;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return value}),Reader$1.prototype.int32=function(){return 0|this.uint32()},Reader$1.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},Reader$1.prototype.bool=function(){return 0!==this.uint32()},Reader$1.prototype.fixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)},Reader$1.prototype.sfixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return 0|readFixed32_end(this.buf,this.pos+=4)},Reader$1.prototype.float=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var e=util$2.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},Reader$1.prototype.double=function(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var e=util$2.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},Reader$1.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw indexOutOfRange(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},Reader$1.prototype.string=function(){var e=this.bytes();return utf8.read(e,0,e.length)},Reader$1.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw indexOutOfRange(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw indexOutOfRange(this)}while(128&this.buf[this.pos++]);return this},Reader$1.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},Reader$1._configure=function(e){BufferReader$1=e,Reader$1.create=create(),BufferReader$1._configure();var t=util$2.Long?"toLong":"toNumber";util$2.merge(Reader$1.prototype,{int64:function(){return readLongVarint.call(this)[t](!1)},uint64:function(){return readLongVarint.call(this)[t](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[t](!1)},fixed64:function(){return readFixed64.call(this)[t](!0)},sfixed64:function(){return readFixed64.call(this)[t](!1)}})};var reader_buffer=BufferReader,Reader=reader;(BufferReader.prototype=Object.create(Reader.prototype)).constructor=BufferReader;var util$1=requireMinimal();function BufferReader(e){Reader.call(this,e)}BufferReader._configure=function(){util$1.Buffer&&(BufferReader.prototype._slice=util$1.Buffer.prototype.slice)},BufferReader.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},BufferReader._configure();var rpc={},service=Service,util=requireMinimal();function Service(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");util.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(Service.prototype=Object.create(util.EventEmitter.prototype)).constructor=Service,Service.prototype.rpcCall=function e(t,r,i,n,o){if(!n)throw TypeError("request must be specified");var s=this;if(!o)return util.asPromise(e,s,t,r,i,n);if(s.rpcImpl)try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](n).finish(),(function(e,r){if(e)return s.emit("error",e,t),o(e);if(null!==r){if(!(r instanceof i))try{r=i[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),o(e)}return s.emit("data",r,t),o(null,r)}s.end(!0)}))}catch(e){return s.emit("error",e,t),void setTimeout((function(){o(e)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},Service.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},function(e){e.Service=service}(rpc);var roots={};!function(e){var t=e;function r(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=writer,t.BufferWriter=writer_buffer,t.Reader=reader,t.BufferReader=reader_buffer,t.util=requireMinimal(),t.rpc=rpc,t.roots=roots,t.configure=r,r()}(indexMinimal);var minimal=indexMinimal,$protobuf=minimal,$Reader=$protobuf.Reader,$Writer=$protobuf.Writer,$util=$protobuf.util,$root=$protobuf.roots.default||($protobuf.roots.default={});$root.cls=function(){var e={};return e.Log=function(){function e(e){if(this.contents=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:i.time=e.int64();break;case 2:i.contents&&i.contents.length||(i.contents=[]),i.contents.push($root.cls.Log.Content.decode(e,e.uint32()));break;default:e.skipType(7&n)}}if(!i.hasOwnProperty("time"))throw $util.ProtocolError("missing required 'time'",{instance:i});return i},e.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(!($util.isInteger(e.time)||e.time&&$util.isInteger(e.time.low)&&$util.isInteger(e.time.high)))return"time: integer|Long expected";if(null!=e.contents&&e.hasOwnProperty("contents")){if(!Array.isArray(e.contents))return"contents: array expected";for(var t=0;t>>0,e.time.high>>>0).toNumber())),e.contents){if(!Array.isArray(e.contents))throw TypeError(".cls.Log.contents: array expected");t.contents=[];for(var r=0;r>>0,e.time.high>>>0).toNumber():e.time),e.contents&&e.contents.length){r.contents=[];for(var n=0;n>>3){case 1:i.key=e.string();break;case 2:i.value=e.string();break;default:e.skipType(7&n)}}if(!i.hasOwnProperty("key"))throw $util.ProtocolError("missing required 'key'",{instance:i});if(!i.hasOwnProperty("value"))throw $util.ProtocolError("missing required 'value'",{instance:i});return i},e.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":$util.isString(e.key)?$util.isString(e.value)?null:"value: string expected":"key: string expected"},e.fromObject=function(e){if(e instanceof $root.cls.Log.Content)return e;var t=new $root.cls.Log.Content;return null!=e.key&&(t.key=String(e.key)),null!=e.value&&(t.value=String(e.value)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.key="",r.value=""),null!=e.key&&e.hasOwnProperty("key")&&(r.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(r.value=e.value),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/cls.Log.Content"},e}(),e}(),e.LogTag=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r>>3){case 1:i.key=e.string();break;case 2:i.value=e.string();break;default:e.skipType(7&n)}}if(!i.hasOwnProperty("key"))throw $util.ProtocolError("missing required 'key'",{instance:i});if(!i.hasOwnProperty("value"))throw $util.ProtocolError("missing required 'value'",{instance:i});return i},e.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":$util.isString(e.key)?$util.isString(e.value)?null:"value: string expected":"key: string expected"},e.fromObject=function(e){if(e instanceof $root.cls.LogTag)return e;var t=new $root.cls.LogTag;return null!=e.key&&(t.key=String(e.key)),null!=e.value&&(t.value=String(e.value)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.key="",r.value=""),null!=e.key&&e.hasOwnProperty("key")&&(r.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(r.value=e.value),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/cls.LogTag"},e}(),e.LogGroup=function(){function e(e){if(this.logs=[],this.logTags=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:i.logs&&i.logs.length||(i.logs=[]),i.logs.push($root.cls.Log.decode(e,e.uint32()));break;case 2:i.contextFlow=e.string();break;case 3:i.filename=e.string();break;case 4:i.source=e.string();break;case 5:i.logTags&&i.logTags.length||(i.logTags=[]),i.logTags.push($root.cls.LogTag.decode(e,e.uint32()));break;default:e.skipType(7&n)}}return i},e.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.logs&&e.hasOwnProperty("logs")){if(!Array.isArray(e.logs))return"logs: array expected";for(var t=0;t>>3==1)i.logGroupList&&i.logGroupList.length||(i.logGroupList=[]),i.logGroupList.push($root.cls.LogGroup.decode(e,e.uint32()));else e.skipType(7&n)}return i},e.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.logGroupList&&e.hasOwnProperty("logGroupList")){if(!Array.isArray(e.logGroupList))return"logGroupList: array expected";for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:{},r=new cls.cls.LogGroup;t.filename&&(r.filename=t.filename),t.source&&(r.source=t.source),e.forEach((function(e){var t=new cls.cls.Log;t.time=e.time,Object.keys(e.contents).forEach((function(r){var i=e.contents[r],n=isString$2(i)?i:JSON.stringify(i);t.contents.push(new cls.cls.Log.Content({key:r,value:n}))})),r.logs.push(t)}));var i=cls.cls.LogGroup.verify(r);if(i)throw new ClsSDKError("log format is incorrect: ".concat(i));return r},log2Buffer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new cls.cls.LogGroupList,i=handleLogs.formatLogGroup(e,t);return r.logGroupList.push(i),cls.cls.LogGroupList.encode(r).finish()},log2JSON:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.source,i=t.filename,n=_objectSpread2(_objectSpread2(_objectSpread2({},i&&{filename:i}),r&&{source:r}),{},{logs:e.map((function(e){var t=e.contents;return Object.keys(e.contents).forEach((function(e){try{void 0!==t[e]?t[e]=t[e].toString():t[e]=""}catch(e){throw new ClsSDKError("log format is incorrect: ".concat(e.message))}})),{contents:e.contents,time:e.time}}))});return JSON.stringify(n)},log2ZhiyanJSON:function(e,t){var r={topic:t,data:e.map((function(e){var t=e.contents;return Object.keys(e.contents).forEach((function(e){try{void 0!==t[e]?t[e]=t[e].toString():t[e]=""}catch(e){throw new ClsSDKError("log format is incorrect: ".concat(e.message))}})),{fields:e.contents,timestamp:e.time}}))};return JSON.stringify(r)}},HttpConnection=function(){function e(t){var r,i;_classCallCheck(this,e),_defineProperty(this,"stsCache",[]),_defineProperty(this,"CLS_HOST","cls.tencentcs.com"),_defineProperty(this,"cancelRequestSource",axios.CancelToken.source()),_defineProperty(this,"retryTimes",3),_defineProperty(this,"topicId",""),_defineProperty(this,"autoFillSourceIp",!1),_defineProperty(this,"api",{anony:"/tracklog",auth:"/structuredlog"}),_defineProperty(this,"credential",void 0),_defineProperty(this,"getAuthorization",void 0),_defineProperty(this,"ins",void 0),this.topicId=t.topicId,this.credential=t.credential,this.getAuthorization=t.getAuthorization,this.autoFillSourceIp=null===(r=t.autoFillSourceIp)||void 0===r||r,this.api=null!==(i=t.api)&&void 0!==i?i:{anony:"/tracklog",auth:"/structuredlog"},this.ins=this.getIns(t)}var t;return _createClass(e,[{key:"needAuth",get:function(){return isNotEmpty(this.credential)||isNotEmpty(this.getAuthorization)}},{key:"getIns",value:function(e){var t,r;this.retryTimes=null!==(t=e.retry)&&void 0!==t?t:3;var i=null!==(r=e.protocol)&&void 0!==r?r:"https";if(!isNotEmpty(e.region)&&!isNotEmpty(e.endpoint))throw new ClsSDKError("region or endpoint are required");var n="".concat(e.region,".").concat(this.CLS_HOST);e.region?n="".concat(e.region,".").concat(this.CLS_HOST):e.endpoint&&(n=e.endpoint);var o=this.getCommonHeaders(n),s={baseURL:"".concat(i,"://").concat(n),headers:o,timeout:5e3,cancelToken:this.cancelRequestSource.token,params:{topic_id:this.topicId}};if(e.agent){var a=e.agent,u=a.httpAgent,c=a.httpsAgent,l=a.proxy;i=e.agent.protocol||i,u&&(s.httpAgent=u),c&&(s.httpsAgent=c),l&&(s.proxy=l),e.proxy&&(s.proxy=l)}var f=axios.create(s);return this.generateCancelToken(f),this.initMethods(f),this.setReqInterceptors(f),this.setResInterceptors(f),f.defaults.adapter=mpAdapter$1,f}},{key:"getCommonHeaders",value:function(e){var t=_objectSpread2({},this.autoFillSourceIp&&{"x-cls-add-source":"1"});return this.needAuth?(t["Content-Type"]="application/x-protobuf",t.Host=e):t["Content-Type"]="application/json",t}},{key:"initMethods",value:function(e){var t=this;["PUT","POST","GET","DELETE","HEAD"].forEach((function(r){t[r.toLowerCase()]=function(t){if(!t.url)throw new Error("url 不能为空");return e(_objectSpread2({method:r},t))}}))}},{key:"changeAdapter",value:function(e){if(!this.ins)throw new ClsSDKError("HttpConnection is not initialized");this.ins.defaults.adapter=e}},{key:"cancelRequest",value:function(){if(!this.ins)throw new ClsSDKError("HttpConnection is not initialized");this.cancelRequestSource.cancel("cancel"),this.generateCancelToken(this.ins)}},{key:"setReqInterceptors",value:function(e){var t=this;e.interceptors.request.use(function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(r){var i,n,o,s,a;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.headers,n=r.params,o=r.url,s=r.method,e.next=3,t._getAuthorization({method:s,headers:i,query:n,api:(null==o?void 0:o.replace(/^\//g,""))||""});case 3:return(a=e.sent)&&(r.headers.Authorization=a.Authorization,a.SecurityToken&&(r.headers["x-cls-token"]=a.SecurityToken)),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){return Promise.resolve(e)}))}},{key:"setResInterceptors",value:function(e){var t=this;e.interceptors.response.use((function(e){return systemClock.handleOffset(e.headers.date),e}),function(){var r=_asyncToGenerator(_regeneratorRuntime().mark((function r(i){var n,o,s,a,u;return _regeneratorRuntime().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!axios.isCancel(i)){r.next=3;break}throw new ClsSDKError({code:"canceled",message:"Operation canceled by the user."});case 3:if(i.config.retryTimes||(i.config.retryTimes=0),!i.response){r.next=15;break}if(systemClock.handleOffset(i.response.headers.date),n=i.response,o=n.status,s=n.headers,a=n.config,u=n.data,!(413!==o&&a.retryTimes=0;e--){t=a.stsCache[e];var r=Math.round(systemClock.now()/1e3)+30;if(!(t.StartTime&&r=t.ExpiredTime)){o=t;break}a.stsCache.splice(e,1)}}(),!(null!==(i=o)&&void 0!==i&&i.ExpiredTime&&o.ExpiredTime-systemClock.now()/1e3>60)){t.next=9;break}return t.abrupt("return",e.calcAuth(_objectSpread2(_objectSpread2(_objectSpread2({},r),{},{headers:n},o),{},{SecretId:o.TmpSecretId,SecretKey:o.TmpSecretKey})));case 9:if(!this.getAuthorization){t.next=24;break}return t.next=12,this.getAuthorization({method:r.method,query:r.query,headers:n});case 12:if("string"!=typeof(s=t.sent)){t.next=17;break}return t.abrupt("return",{Authorization:s});case 17:if(!(s.StartTime&&s.TmpSecretId&&s.TmpSecretKey&&s.Token&&s.ExpiredTime)){t.next=23;break}return o=s,this.stsCache.push(o),t.abrupt("return",e.calcAuth(_objectSpread2(_objectSpread2(_objectSpread2({},r),{},{headers:n},o),{},{SecretId:o.TmpSecretId,SecretKey:o.TmpSecretKey})));case 23:throw new ClsSDKError("getAuthorization return value is not standardized.");case 24:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})}],[{key:"formatHeader",value:function(e){var t={},r=new Set(["Content-Type","Host","Content-Length"]);return Object.keys(e).forEach((function(i){r.has(i)&&(t[i]=e[i])})),t}},{key:"calcAuth",value:function(e){return{Authorization:sign(e),SecurityToken:e.SecurityToken||""}}}]),e}(),UploadState;!function(e){e[e.start=0]="start",e[e.waiting=1]="waiting",e[e.running=2]="running",e[e.stop=3]="stop"}(UploadState||(UploadState={}));var Uploader=function(){function e(t){var r,i,n,o=t.config;_classCallCheck(this,e),_defineProperty(this,"queue",[]),_defineProperty(this,"state",UploadState.stop),this.config=o,this.http=new HttpConnection({region:this.config.region,api:this.config.api,endpoint:this.config.endpoint,topicId:this.config.topicId,agent:null===(r=(i=this.config).getAgent)||void 0===r?void 0:r.call(i),proxy:this.config.proxy,credential:this.config.credential,getAuthorization:this.config.getAuthorization,autoFillSourceIp:null!==(n=this.config.autoFillSourceIp)&&void 0!==n?n:!isNotEmpty(this.config.sourceIp)})}var t;return _createClass(e,[{key:"start",value:function(){this.state=UploadState.start,this.startNextBatch()}},{key:"add",value:function(e){var t={index:this.queue.length,logs:e};this.queue.push(t),this.startNextBatch()}},{key:"startNextBatch",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.state!==UploadState.running){e.next=2;break}return e.abrupt("return");case 2:this.state=UploadState.running;case 3:if(!(this.queue.length>0&&this.isStart())){e.next=21;break}if(!(t=this.queue.shift())){e.next=19;break}if(e.prev=6,!this.config.endpoint||!this.config.endpoint.includes("zhiyan")){e.next=12;break}return e.next=10,this.http.putZhiyanLogs(t.logs);case 10:e.next=14;break;case 12:return e.next=14,this.http.putLogs(t.logs);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(6),this.config.onError(e.t0);case 19:e.next=3;break;case 21:this.state=UploadState.waiting;case 22:case"end":return e.stop()}}),e,this,[[6,16]])}))),function(){return t.apply(this,arguments)})},{key:"isStart",value:function(){return this.state!==UploadState.stop}},{key:"stop",value:function(){this.http.cancelRequest(),this.state=UploadState.stop}}]),e}(),ClsClient=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,"logTimer",void 0),_defineProperty(this,"checkCacheLocked",!1),_defineProperty(this,"logList",[]),_defineProperty(this,"initTag",!1),t&&this.init(t)}var t;return _createClass(e,[{key:"init",value:function(e){this.config=new ClientConfig(e),this.uploader=new Uploader({config:this.config}),this.initTag=!0}},{key:"checkLogCaches",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,i,n,o,s;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkCacheLocked){e.next=2;break}return e.abrupt("return");case 2:if(0!==(t=this.logList.length)){e.next=5;break}return e.abrupt("return");case 5:if(clearTimeout(this.logTimer),this.checkCacheLocked=!0,this.logList.some((function(e){return e.immediate}))||!(t SliceSize ? 'sliceUploadFile' : 'putObject'; params.tracker = new Tracker({ - Beacon: self.options.Beacon, + Beacon: self.options.BeaconReporter, + clsReporter: self.options.ClsReporter, bucket: params.Bucket, region: params.Region, apiName: 'uploadFile', + realApi: realApi, fileKey: params.Key, fileSize: FileSize, accelerate: accelerate, @@ -8388,7 +8391,7 @@ function _uploadFile() { _onFileFinish = params.onFileFinish; onFileFinish = function onFileFinish(err, data) { // 格式化上报参数并上报 - params.tracker && params.tracker.formatResult(err, data); + params.tracker && params.tracker.report(err, data); _onFileFinish && _onFileFinish(err, data, fileInfo); callback && callback(err, data); }; // 添加上传任务 @@ -8444,7 +8447,7 @@ function _uploadFiles() { return params.files.map(function (fileParams, index) { return new Promise( /*#__PURE__*/function () { var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve) { - var FileSize, fileInfo, accelerate, _onTaskReady, PreAddSize, _onProgress, _onFileFinish, onFileFinish, simpleUploadMethod, api; + var FileSize, fileInfo, accelerate, realApi, _onTaskReady, PreAddSize, _onProgress, _onFileFinish, onFileFinish, simpleUploadMethod, api; return _regeneratorRuntime().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: @@ -8467,13 +8470,16 @@ function _uploadFiles() { TotalSize += FileSize; // 单个文件上传链路 - if (self.options.EnableTracker) { + if (self.options.EnableReporter) { accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); + realApi = FileSize > SliceSize ? 'sliceUploadFile' : 'putObject'; fileParams.tracker = new Tracker({ - Beacon: self.options.Beacon, + Beacon: self.options.BeaconReporter, + clsReporter: self.options.ClsReporter, bucket: fileParams.Bucket, region: fileParams.Region, apiName: 'uploadFiles', + realApi: realApi, fileKey: fileParams.Key, fileSize: FileSize, accelerate: accelerate, @@ -8514,7 +8520,7 @@ function _uploadFiles() { _onFileFinish = fileParams.onFileFinish; onFileFinish = function onFileFinish(err, data) { // 格式化上报参数并上报 - fileParams.tracker && fileParams.tracker.formatResult(err, data); + fileParams.tracker && fileParams.tracker.report(err, data); _onFileFinish && _onFileFinish(err, data); onTotalFileFinish && onTotalFileFinish(err, data, fileInfo); }; // 添加上传任务 @@ -8600,6 +8606,7 @@ function sliceCopyFile(params, callback) { Key: Key, UploadId: UploadData.UploadId, Parts: Parts, + tracker: params.tracker, calledBySdk: 'sliceCopyFile' }, tryCallback); }, function (err, data) { @@ -8642,6 +8649,8 @@ function sliceCopyFile(params, callback) { UploadId: UploadData.UploadId, PartNumber: PartNumber, CopySourceRange: CopySourceRange, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile', onProgress: function onProgress(data) { FinishSize += data.loaded - preAddSize; preAddSize = data.loaded; @@ -8678,7 +8687,9 @@ function sliceCopyFile(params, callback) { Bucket: Bucket, Region: Region, Key: Key, - Headers: TargetHeader + Headers: TargetHeader, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile' }, function (err, data) { if (err) return callback(err); params.UploadId = data.UploadId; @@ -8704,7 +8715,9 @@ function sliceCopyFile(params, callback) { Bucket: Bucket, Region: Region, Key: Key, - UploadId: UploadId + UploadId: UploadId, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile' }, function (err, PartListData) { if (err) { // 如果 UploadId 获取会出错,跳过并删除 @@ -8800,7 +8813,9 @@ function sliceCopyFile(params, callback) { self.headObject({ Bucket: SourceBucket, Region: SourceRegion, - Key: SourceKey + Key: SourceKey, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile' }, function (err, data) { if (err) { if (err.statusCode && err.statusCode === 404) { @@ -8819,6 +8834,9 @@ function sliceCopyFile(params, callback) { }); return; } + params.tracker && params.tracker.setParams({ + httpSize: FileSize + }); _onProgress3 = util.throttleOnProgress.call(self, FileSize, params.onProgress); // 开始上传 @@ -8826,7 +8844,9 @@ function sliceCopyFile(params, callback) { if (!params.Headers['x-cos-metadata-directive']) { params.Headers['x-cos-metadata-directive'] = 'Copy'; } - self.putObjectCopy(params, function (err, data) { + self.putObjectCopy(Object.assign(params, { + calledBySdk: 'sliceCopyFile' + }), function (err, data) { if (err) { _onProgress3(null, true); return callback(err); @@ -8881,7 +8901,9 @@ function copySliceItem(params, callback) { UploadId: UploadId, PartNumber: PartNumber, CopySourceRange: CopySourceRange, - onProgress: params.onProgress + onProgress: params.onProgress, + tracker: params.tracker, + calledBySdk: params.calledBySdk }, function (err, data) { tryCallback(err || null, data); }); @@ -8979,7 +9001,6 @@ module.exports = async; var REQUEST = __webpack_require__(/*! ../lib/request */ "./lib/request.js"); -var base64 = __webpack_require__(/*! ../lib/base64 */ "./lib/base64.js"); var util = __webpack_require__(/*! ./util */ "./src/util.js"); var mime = __webpack_require__(/*! mime */ "./node_modules/mime/index.js"); @@ -9020,7 +9041,8 @@ function getService(params, callback) { Action: 'name/cos:GetService', url: domain, method: 'GET', - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var buckets = data && data.ListAllMyBucketsResult && data.ListAllMyBucketsResult.Buckets && data.ListAllMyBucketsResult.Buckets.Bucket || []; @@ -9066,7 +9088,8 @@ function putBucket(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - body: xml + body: xml, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var url = getUrl({ @@ -9101,7 +9124,8 @@ function headBucket(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - method: 'HEAD' + method: 'HEAD', + tracker: params.tracker }, function (err, data) { callback(err, data); }); @@ -9136,7 +9160,8 @@ function getBucket(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - qs: reqParams + qs: reqParams, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var ListBucketResult = data.ListBucketResult || {}; @@ -9171,7 +9196,8 @@ function deleteBucket(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - method: 'DELETE' + method: 'DELETE', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9232,7 +9258,8 @@ function putBucketAcl(params, callback) { Region: params.Region, headers: headers, action: 'acl', - body: xml + body: xml, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -9259,7 +9286,8 @@ function getBucketAcl(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'acl' + action: 'acl', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var AccessControlPolicy = data.AccessControlPolicy || {}; @@ -9320,7 +9348,8 @@ function putBucketCors(params, callback) { Region: params.Region, body: xml, action: 'cors', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -9347,7 +9376,8 @@ function getBucketCors(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'cors' + action: 'cors', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && err.error.Code === 'NoSuchCORSConfiguration') { @@ -9399,7 +9429,8 @@ function deleteBucketCors(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'cors' + action: 'cors', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9431,7 +9462,8 @@ function getBucketLocation(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'location' + action: 'location', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, data); @@ -9462,7 +9494,8 @@ function putBucketPolicy(params, callback) { action: 'policy', body: PolicyStr, headers: headers, - json: true + json: true, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9495,7 +9528,8 @@ function getBucketPolicy(params, callback) { Region: params.Region, headers: params.Headers, action: 'policy', - rawBody: true + rawBody: true, + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode && err.statusCode === 403) { @@ -9543,7 +9577,8 @@ function deleteBucketPolicy(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'policy' + action: 'policy', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9590,7 +9625,8 @@ function putBucketTagging(params, callback) { Region: params.Region, body: xml, action: 'tagging', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9622,7 +9658,8 @@ function getBucketTagging(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'tagging' + action: 'tagging', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && (err.error === 'Not Found' || err.error.Code === 'NoSuchTagSet')) { @@ -9666,7 +9703,8 @@ function deleteBucketTagging(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'tagging' + action: 'tagging', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9700,7 +9738,8 @@ function putBucketLifecycle(params, callback) { Region: params.Region, body: xml, action: 'lifecycle', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9722,7 +9761,8 @@ function getBucketLifecycle(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'lifecycle' + action: 'lifecycle', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && err.error.Code === 'NoSuchLifecycleConfiguration') { @@ -9756,7 +9796,8 @@ function deleteBucketLifecycle(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'lifecycle' + action: 'lifecycle', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9792,7 +9833,8 @@ function putBucketVersioning(params, callback) { Region: params.Region, body: xml, action: 'versioning', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9814,7 +9856,8 @@ function getBucketVersioning(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'versioning' + action: 'versioning', + tracker: params.tracker }, function (err, data) { if (!err) { !data.VersioningConfiguration && (data.VersioningConfiguration = {}); @@ -9839,7 +9882,8 @@ function putBucketReplication(params, callback) { Region: params.Region, body: xml, action: 'replication', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9861,7 +9905,8 @@ function getBucketReplication(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'replication' + action: 'replication', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && (err.error === 'Not Found' || err.error.Code === 'ReplicationConfigurationnotFoundError')) { @@ -9895,7 +9940,8 @@ function deleteBucketReplication(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'replication' + action: 'replication', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9953,7 +9999,8 @@ function putBucketWebsite(params, callback) { Region: params.Region, body: xml, action: 'website', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -9986,7 +10033,8 @@ function getBucketWebsite(params, callback) { Region: params.Region, Key: params.Key, headers: params.Headers, - action: 'website' + action: 'website', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error.Code === 'NoSuchWebsiteConfiguration') { @@ -10031,7 +10079,8 @@ function deleteBucketWebsite(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'website' + action: 'website', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10088,7 +10137,8 @@ function putBucketReferer(params, callback) { Region: params.Region, body: xml, action: 'referer', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10121,7 +10171,8 @@ function getBucketReferer(params, callback) { Region: params.Region, Key: params.Key, headers: params.Headers, - action: 'referer' + action: 'referer', + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error.Code === 'NoSuchRefererConfiguration') { @@ -10179,7 +10230,8 @@ function putBucketDomain(params, callback) { Region: params.Region, body: xml, action: 'domain', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10211,7 +10263,8 @@ function getBucketDomain(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'domain' + action: 'domain', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var DomainRule = []; @@ -10243,7 +10296,8 @@ function deleteBucketDomain(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'domain' + action: 'domain', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10287,7 +10341,8 @@ function putBucketOrigin(params, callback) { Region: params.Region, body: xml, action: 'origin', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10319,7 +10374,8 @@ function getBucketOrigin(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'origin' + action: 'origin', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var OriginRule = []; @@ -10351,7 +10407,8 @@ function deleteBucketOrigin(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'origin' + action: 'origin', + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10391,7 +10448,8 @@ function putBucketLogging(params, callback) { Region: params.Region, body: xml, action: 'logging', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10423,7 +10481,8 @@ function getBucketLogging(params, callback) { Bucket: params.Bucket, Region: params.Region, headers: params.Headers, - action: 'logging' + action: 'logging', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); delete data.BucketLoggingStatus._xmlns; @@ -10477,7 +10536,8 @@ function putBucketInventory(params, callback) { qs: { id: params['Id'] }, - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10513,7 +10573,8 @@ function getBucketInventory(params, callback) { action: 'inventory', qs: { id: params['Id'] - } + }, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var InventoryConfiguration = data['InventoryConfiguration']; @@ -10559,7 +10620,8 @@ function listBucketInventory(params, callback) { action: 'inventory', qs: { 'continuation-token': params['ContinuationToken'] - } + }, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var ListInventoryConfigurationResult = data['ListInventoryConfigurationResult']; @@ -10611,7 +10673,8 @@ function deleteBucketInventory(params, callback) { action: 'inventory', qs: { id: params['Id'] - } + }, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -10650,7 +10713,8 @@ function putBucketAccelerate(params, callback) { Region: params.Region, body: xml, action: 'accelerate', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -10666,7 +10730,8 @@ function getBucketAccelerate(params, callback) { method: 'GET', Bucket: params.Bucket, Region: params.Region, - action: 'accelerate' + action: 'accelerate', + tracker: params.tracker }, function (err, data) { if (!err) { !data.AccelerateConfiguration && (data.AccelerateConfiguration = {}); @@ -10697,7 +10762,8 @@ function headObject(params, callback) { Region: params.Region, Key: params.Key, VersionId: params.VersionId, - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) { var statusCode = err.statusCode; @@ -10729,7 +10795,8 @@ function listObjectVersions(params, callback) { Region: params.Region, headers: params.Headers, qs: reqParams, - action: 'versions' + action: 'versions', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var ListVersionsResult = data.ListVersionsResult || {}; @@ -10972,7 +11039,8 @@ function postObject(params, callback) { qs: params.Query, filePath: filePath, TaskId: params.TaskId, - onProgress: onProgress + onProgress: onProgress, + tracker: params.tracker }, function (err, data) { onProgress(null, true); if (err) return callback(err); @@ -11018,7 +11086,8 @@ function deleteObject(params, callback) { Region: params.Region, Key: params.Key, headers: params.Headers, - VersionId: params.VersionId + VersionId: params.VersionId, + tracker: params.tracker }, function (err, data) { if (err) { var statusCode = err.statusCode; @@ -11066,7 +11135,8 @@ function getObjectAcl(params, callback) { Key: params.Key, headers: params.Headers, qs: reqParams, - action: 'acl' + action: 'acl', + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var AccessControlPolicy = data.AccessControlPolicy || {}; @@ -11130,7 +11200,8 @@ function putObjectAcl(params, callback) { Key: params.Key, action: 'acl', headers: headers, - body: xml + body: xml, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -11161,7 +11232,8 @@ function optionsObject(params, callback) { Bucket: params.Bucket, Region: params.Region, Key: params.Key, - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode && err.statusCode === 403) { @@ -11244,7 +11316,8 @@ function putObjectCopy(params, callback) { Region: params.Region, Key: params.Key, VersionId: params.VersionId, - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var result = util.clone(data.CopyObjectResult || {}); @@ -11288,7 +11361,8 @@ function uploadPartCopy(params, callback) { partNumber: params['PartNumber'], uploadId: params['UploadId'] }, - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var result = util.clone(data.CopyPartResult || {}); @@ -11327,7 +11401,8 @@ function deleteMultipleObject(params, callback) { Region: params.Region, body: xml, action: 'delete', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); var DeleteResult = data.DeleteResult || {}; @@ -11368,7 +11443,8 @@ function restoreObject(params, callback) { VersionId: params.VersionId, body: xml, action: 'restore', - headers: headers + headers: headers, + tracker: params.tracker }, function (err, data) { callback(err, data); }); @@ -11408,7 +11484,8 @@ function putObjectTagging(params, callback) { body: xml, action: 'tagging', headers: headers, - VersionId: params.VersionId + VersionId: params.VersionId, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -11443,7 +11520,8 @@ function getObjectTagging(params, callback) { Region: params.Region, headers: params.Headers, action: 'tagging', - VersionId: params.VersionId + VersionId: params.VersionId, + tracker: params.tracker }, function (err, data) { if (err) { if (err.statusCode === 404 && err.error && (err.error === 'Not Found' || err.error.Code === 'NoSuchTagSet')) { @@ -11490,7 +11568,8 @@ function deleteObjectTagging(params, callback) { Key: params.Key, headers: params.Headers, action: 'tagging', - VersionId: params.VersionId + VersionId: params.VersionId, + tracker: params.tracker }, function (err, data) { if (err && err.statusCode === 204) { return callback(null, { @@ -11838,7 +11917,8 @@ function multipartAbort(params, callback) { Region: params.Region, Key: params.Key, headers: params.Headers, - qs: reqParams + qs: reqParams, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, { @@ -11888,7 +11968,8 @@ function appendObject(params, callback) { qs: { position: params.Position }, - headers: params.Headers + headers: params.Headers, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); callback(null, data); @@ -11917,7 +11998,8 @@ function request(params, callback) { body: params.Body, Url: params.Url, rawBody: params.RawBody, - dataType: params.DataType + dataType: params.DataType, + tracker: params.tracker }, function (err, data) { if (err) return callback(err); if (data && data.body) { @@ -12475,7 +12557,7 @@ function submitRequest(params, callback) { } tracker && tracker.setParams({ signStartTime: new Date().getTime(), - retryTimes: tryTimes - 1 + httpRetryTimes: tryTimes - 1 }); getAuthorizationAsync.call(self, { Bucket: params.Bucket || '', @@ -12568,6 +12650,7 @@ function _submitRequest(params, callback) { // 更换请求的url url = url.replace(/myqcloud.com/, 'tencentcos.cn'); } + var repoterUrl = object ? url : ''; if (params.action) { url = url + '?' + params.action; } @@ -12628,15 +12711,22 @@ function _submitRequest(params, callback) { return "".concat(key, "=").concat(opt.qs[key]); }).join('&') : ''; var fullUrl = queryString ? opt.url + '?' + queryString : opt.url; - params.tracker && params.tracker.setParams({ - reqUrl: fullUrl, - accelerate: useAccelerate ? 'Y' : 'N' - }); - // 分块上传时给父级tracker设置url信息 - params.tracker && params.tracker.parent && params.tracker.parent.setParams({ - reqUrl: fullUrl, - accelerate: useAccelerate ? 'Y' : 'N' - }); + if (params.tracker) { + var _opt$body; + params.tracker.setParams({ + url: fullUrl, + httpMethod: opt.method, + accelerate: useAccelerate, + httpSize: ((_opt$body = opt.body) === null || _opt$body === void 0 ? void 0 : _opt$body.size) || 0 + }); + // 分块上传时给父级tracker设置url信息 + if (params.tracker.parent && !params.tracker.parent.params.url) { + params.tracker.parent.setParams({ + url: repoterUrl, + accelerate: useAccelerate + }); + } + } var sender = REQUEST(opt, function (err, response, body) { if (err === 'abort') return; @@ -12862,18 +12952,19 @@ var defaultOptions = { // HttpDNS 服务商 Id,填写后代表开启 HttpDNS 服务。HttpDNS 用法详见https://developers.weixin.qq.com/miniprogram/dev/framework/ability/HTTPDNS.html SimpleUploadMethod: 'postObject', // 高级上传内部判断需要走简单上传时,指定的上传方法,可选postObject或putObject - EnableTracker: false, - // 默认关闭上报 + AutoSwitchHost: false, + CopySourceParser: null, + // 自定义拷贝源解析器 + /** 上报相关配置 **/ DeepTracker: false, // 上报时是否对每个分块上传做单独上报 - Beacon: null, - // 灯塔上报组件,如有需要请自行传入 TrackerDelay: 5000, // 周期性上报,单位毫秒。0代表实时上报 CustomId: '', // 自定义上报id - AutoSwitchHost: false, - CopySourceParser: null // 自定义拷贝源解析器 + BeaconReporter: null, + // 灯塔上报组件,如有需要请自行传入,传入即代表开启上报 + ClsReporter: null // cls 上报组件,如有需要请自行传入,传入即代表开启上报 }; // 对外暴露的类 @@ -12888,6 +12979,7 @@ var COS = function COS(options) { this.options.CopySliceSize = Math.max(0, this.options.CopySliceSize); this.options.MaxPartNumber = Math.max(1024, Math.min(10000, this.options.MaxPartNumber)); this.options.Timeout = Math.max(0, this.options.Timeout); + this.options.EnableReporter = this.options.BeaconReporter || this.options.ClsReporter; if (this.options.AppId) { console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'); } @@ -13353,6 +13445,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } @@ -13363,11 +13456,11 @@ var beacon = null; var getBeacon = function getBeacon(Beacon, delay) { if (!beacon) { // 生成 beacon - if (!Beacon || typeof Beacon !== 'function') { + if (typeof Beacon !== 'function') { throw new Error('Beacon not found'); } beacon = new Beacon({ - appkey: '0AND0VEVB24UBGDU', + appkey: '0WEB05PY6MHRGK0U', versionCode: pkg.version, channelID: 'mp_sdk', //渠道,选填 @@ -13385,6 +13478,12 @@ var getBeacon = function getBeacon(Beacon, delay) { return beacon; }; + +// 毫秒转秒 +var ms2s = function ms2s(ms) { + if (!ms || ms < 0) return 0; + return (ms / 1000).toFixed(3); +}; var utils = { // 生成uid 每个链路对应唯一一条uid getUid: function getUid() { @@ -13393,7 +13492,7 @@ var utils = { }; return S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4(); }, - // 获取网络类型 + // 获取网络类型 4g | wifi getNetType: function getNetType() { return new Promise(function (resolve) { if (wx.canIUse('getNetworkType')) { @@ -13469,20 +13568,16 @@ var deviceInfo = { utils.getSystemInfo().then(function (res) { Object.assign(deviceInfo, res); }); - -// 分块上传原子方法 -var sliceUploadMethods = ['multipartInit', 'multipartUpload', 'multipartComplete', 'multipartList', 'multipartListPart', 'multipartAbort']; -var uploadApi = ['putObject', 'postObject', 'appendObject', 'sliceUploadFile', 'uploadFile', 'uploadFiles'].concat(sliceUploadMethods); -var downloadApi = ['getObject']; -function getEventCode(apiName) { - if (uploadApi.includes(apiName)) { - return 'cos_upload'; - } - if (downloadApi.includes(apiName)) { - return 'cos_download'; +var transApiName = function transApiName(api) { + if (['putObject', 'sliceUploadFile', 'uploadFile', 'uploadFiles'].includes(api)) { + return 'UploadTask'; + } else if (api === 'getObject') { + return 'DownloadTask'; + } else if (['putObjectCopy', 'sliceCopyFile'].includes(api)) { + return 'CopyTask'; } - return 'base_service'; -} + return api; +}; // 上报参数驼峰改下划线 function camel2underline(key) { @@ -13490,102 +13585,91 @@ function camel2underline(key) { } function formatParams(params) { var formattedParams = {}; - var allReporterKeys = ['tracePlatform', 'cossdkVersion', 'region', 'networkType', 'host', 'accelerate', 'requestPath', 'size', 'httpMd5', 'httpSign', 'httpFull', 'name', 'result', 'tookTime', 'errorNode', 'errorCode', 'errorMessage', 'errorRequestId', 'errorStatusCode', 'errorServiceName', 'errorType', 'traceId', 'bucket', 'appid', 'partNumber', 'retryTimes', 'reqUrl', 'customId', 'fullError', 'devicePlatform', 'wxVersion', 'wxSystem', 'wxSdkVersion']; - var successKeys = ['tracePlatform', 'cossdkVersion', 'region', 'bucket', 'appid', 'networkType', 'host', 'accelerate', 'requestPath', 'partNumber', 'size', 'name', 'result', 'tookTime', 'errorRequestId', 'retryTimes', 'reqUrl', 'customId', 'devicePlatform', 'wxVersion', 'wxSystem', 'wxSdkVersion']; + var successKeys = ['sdkVersionName', 'sdkVersionCode', 'osName', 'networkType', 'requestName', 'requestResult', 'bucket', 'region', 'appid', 'accelerate', 'url', 'host', 'requestPath', 'userAgent', 'httpMethod', 'httpSize', 'httpSpeed', 'httpTookTime', 'httpMd5', 'httpSign', 'httpFullTime', 'httpDomain', 'partNumber', 'httpRetryTimes', 'customId', 'traceId', 'realApi']; + var failureKeys = [].concat(successKeys, ['errorNode', 'errorCode', 'errorName', 'errorMessage', 'errorRequestId', 'errorHttpCode', 'errorServiceName', 'errorType', 'fullError']); // 需要上报的参数字段 - var reporterKeys = params.result === 'Success' ? successKeys : allReporterKeys; + var reporterKeys = params.requestResult === 'Success' ? successKeys : failureKeys; for (var key in params) { if (!reporterKeys.includes(key)) continue; var formattedKey = camel2underline(key); formattedParams[formattedKey] = params[key]; } + formattedParams['request_name'] = params.realApi ? transApiName(params.realApi) : params.requestName; return formattedParams; } // 链路追踪器 var Tracker = /*#__PURE__*/function () { function Tracker(opt) { + var _this$params; _classCallCheck(this, Tracker); var parent = opt.parent, traceId = opt.traceId, bucket = opt.bucket, region = opt.region, apiName = opt.apiName, + realApi = opt.realApi, + httpMethod = opt.httpMethod, fileKey = opt.fileKey, fileSize = opt.fileSize, accelerate = opt.accelerate, customId = opt.customId, delay = opt.delay, deepTracker = opt.deepTracker, - Beacon = opt.Beacon; + Beacon = opt.Beacon, + clsReporter = opt.clsReporter; var appid = bucket && bucket.substr(bucket.lastIndexOf('-') + 1) || ''; this.parent = parent; this.deepTracker = deepTracker; this.delay = delay; + if (clsReporter && !this.clsReporter) { + this.clsReporter = clsReporter; + } // 上报用到的字段 - this.params = { + this.params = (_this$params = { // 通用字段 - cossdkVersion: pkg.version, - region: region, + sdkVersionName: 'cos-wx-sdk-v5', + sdkVersionCode: pkg.version, + osName: deviceInfo.devicePlatform, networkType: '', + requestName: apiName || '', + requestResult: '', + // sdk api调用结果Success、Failure + realApi: realApi, + bucket: bucket, + region: region, + accelerate: accelerate, + httpMethod: httpMethod, + url: '', host: '', - accelerate: accelerate ? 'Y' : 'N', + httpDomain: '', requestPath: fileKey || '', - size: fileSize || -1, - httpMd5: 0, - // MD5耗时 - httpSign: 0, - // 计算签名耗时 - httpFull: 0, - // http请求耗时 - name: apiName || '', - result: '', - // sdk api调用结果Success、Fail - tookTime: 0, - // 总耗时 - errorNode: '', + errorType: '', errorCode: '', + errorName: '', errorMessage: '', errorRequestId: '', - errorStatusCode: 0, + errorHttpCode: 0, errorServiceName: '', - // 小程序补充字段 - tracePlatform: 'cos-wx-sdk-v5', - // 上报平台=小程序 - traceId: traceId || utils.getUid(), - // 每条上报唯一标识 - bucket: bucket, - appid: appid, - partNumber: 0, - // 分块上传编号 - retryTimes: 0, - // sdk内部发起的请求重试 - reqUrl: '', - // 请求url - customId: customId || '', - // 业务id - devicePlatform: deviceInfo.devicePlatform, - wxVersion: deviceInfo.wxVersion, - wxSystem: deviceInfo.wxSystem, - wxSdkVersion: deviceInfo.wxSdkVersion, - md5StartTime: 0, - // md5计算开始时间 - md5EndTime: 0, - // md5计算结束时间 - signStartTime: 0, - // 计算签名开始时间 - signEndTime: 0, - // 计算签名结束时间 - httpStartTime: 0, - // 发起网络请求开始时间 - httpEndTime: 0, - // 网路请求结束时间 - startTime: new Date().getTime(), - // sdk api调用起始时间,不是纯网络耗时 - endTime: 0 // sdk api调用结束时间,不是纯网络耗时 - }; + errorNode: '', + httpTookTime: 0, + // http整体耗时 + httpSize: fileSize || 0, + // 主要是文件大小,大小 B + httpMd5: 0, + // MD5耗时 + httpSign: 0, + // 计算签名耗时 + httpFullTime: 0, + // 任务整体耗时(包括md5、签名等) + httpSpeed: 0, + // 主要关注上传速度,KB/s - this.beacon = getBeacon(Beacon, delay); + size: fileSize || 0 + }, _defineProperty(_this$params, "httpMd5", 0), _defineProperty(_this$params, "httpSign", 0), _defineProperty(_this$params, "httpFull", 0), _defineProperty(_this$params, "name", apiName || ''), _defineProperty(_this$params, "tookTime", 0), _defineProperty(_this$params, "md5StartTime", 0), _defineProperty(_this$params, "md5EndTime", 0), _defineProperty(_this$params, "signStartTime", 0), _defineProperty(_this$params, "signEndTime", 0), _defineProperty(_this$params, "httpStartTime", 0), _defineProperty(_this$params, "httpEndTime", 0), _defineProperty(_this$params, "startTime", new Date().getTime()), _defineProperty(_this$params, "endTime", 0), _defineProperty(_this$params, "traceId", traceId || utils.getUid()), _defineProperty(_this$params, "appid", appid), _defineProperty(_this$params, "partNumber", 0), _defineProperty(_this$params, "httpRetryTimes", 0), _defineProperty(_this$params, "customId", customId || ''), _defineProperty(_this$params, "partTime", 0), _this$params); + if (Beacon) { + this.beacon = getBeacon(Beacon, delay); + } } // 格式化sdk回调 @@ -13594,7 +13678,7 @@ var Tracker = /*#__PURE__*/function () { value: function () { var _formatResult = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err, data) { var _err$error, _err$error$error, _err$error2, _err$error2$error, _err$error3, _err$error4, _err$error5, _err$error5$error, _err$error6; - var now, tookTime, networkType, errorCode, errorMessage, errorStatusCode, errorServiceName, requestId, errorType, exec; + var now, networkType, errorCode, errorMessage, errorName, errorHttpCode, errorServiceName, requestId, errorType, isSliceUploadFile, isSliceCopyFile, speed, httpFullTime, httpTookTime, _speed, httpMd5, httpSign, exec; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: @@ -13616,27 +13700,60 @@ var Tracker = /*#__PURE__*/function () { * {error: 'message'}或{error: {error: 'message' }} */ now = new Date().getTime(); - tookTime = now - this.params.startTime; - _context.next = 4; + _context.next = 3; return utils.getNetType(); - case 4: + case 3: networkType = _context.sent; errorCode = err ? (err === null || err === void 0 ? void 0 : (_err$error = err.error) === null || _err$error === void 0 ? void 0 : (_err$error$error = _err$error.error) === null || _err$error$error === void 0 ? void 0 : _err$error$error.Code) || 'Error' : ''; errorMessage = err ? (err === null || err === void 0 ? void 0 : (_err$error2 = err.error) === null || _err$error2 === void 0 ? void 0 : (_err$error2$error = _err$error2.error) === null || _err$error2$error === void 0 ? void 0 : _err$error2$error.Message) || (err === null || err === void 0 ? void 0 : (_err$error3 = err.error) === null || _err$error3 === void 0 ? void 0 : _err$error3.error) || (err === null || err === void 0 ? void 0 : err.error) || '' : ''; - errorStatusCode = err ? err === null || err === void 0 ? void 0 : (_err$error4 = err.error) === null || _err$error4 === void 0 ? void 0 : _err$error4.statusCode : data.statusCode; + errorName = errorMessage; + errorHttpCode = err ? err === null || err === void 0 ? void 0 : (_err$error4 = err.error) === null || _err$error4 === void 0 ? void 0 : _err$error4.statusCode : data.statusCode; errorServiceName = err ? err === null || err === void 0 ? void 0 : (_err$error5 = err.error) === null || _err$error5 === void 0 ? void 0 : (_err$error5$error = _err$error5.error) === null || _err$error5$error === void 0 ? void 0 : _err$error5$error.Resource : ''; requestId = err ? (err === null || err === void 0 ? void 0 : (_err$error6 = err.error) === null || _err$error6 === void 0 ? void 0 : _err$error6.RequestId) || '' : (data === null || data === void 0 ? void 0 : data.RequestId) || ''; errorType = err ? requestId ? 'Server' : 'Client' : ''; + if (this.params.requestName === 'getObject') { + this.params.httpSize = data ? data.headers && data.headers['content-length'] : 0; + } + + // 上报 sliceUploadFile || uploadFile || uploadFiles 命中分块上传时 + isSliceUploadFile = this.params.realApi === 'sliceUploadFile'; + isSliceCopyFile = this.params.realApi === 'sliceCopyFile'; + if (isSliceUploadFile || isSliceCopyFile) { + speed = this.params.httpSize / 1024 / this.params.partTime; + Object.assign(this.params, { + httpSpeed: speed < 0 ? 0 : speed.toFixed(3) + }); + } else { + httpFullTime = now - this.params.startTime; + httpTookTime = this.params.httpEndTime - this.params.httpStartTime; + _speed = this.params.httpSize / 1024 / (httpTookTime / 1000); + httpMd5 = this.params.md5EndTime - this.params.md5StartTime; + httpSign = this.params.signEndTime - this.params.signStartTime; + if (this.parent) { + this.parent.addParamValue('httpTookTime', ms2s(httpTookTime)); + this.parent.addParamValue('httpFullTime', ms2s(httpFullTime)); + this.parent.addParamValue('httpMd5', ms2s(httpMd5)); + this.parent.addParamValue('httpSign', ms2s(httpSign)); + if (['multipartUpload', 'uploadPartCopy', 'putObjectCopy'].includes(this.params.requestName)) { + // 只有小分块上传|复制才累计纯请求耗时,计算速度时用到 + this.parent.addParamValue('partTime', ms2s(httpTookTime)); + } + } + Object.assign(this.params, { + httpFullTime: ms2s(httpFullTime), + httpMd5: ms2s(httpMd5), + httpSign: ms2s(httpSign), + httpTookTime: ms2s(httpTookTime), + httpSpeed: _speed < 0 ? 0 : _speed.toFixed(3) + }); + } Object.assign(this.params, { - tookTime: tookTime, networkType: networkType, - httpMd5: this.params.md5EndTime - this.params.md5StartTime, - httpSign: this.params.signEndTime - this.params.signStartTime, - httpFull: this.params.httpEndTime - this.params.httpStartTime, - result: err ? 'Fail' : 'Success', + requestResult: err ? 'Failure' : 'Success', errorType: errorType, errorCode: errorCode, - errorStatusCode: errorStatusCode, + errorHttpCode: errorHttpCode, + errorName: errorName, errorMessage: errorMessage, errorServiceName: errorServiceName, errorRequestId: requestId @@ -13648,16 +13765,16 @@ var Tracker = /*#__PURE__*/function () { if (this.params.name === 'getObject') { this.params.size = data ? data.headers && data.headers['content-length'] : -1; } - if (this.params.reqUrl) { + if (this.params.url) { try { - exec = /^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl); + exec = /^http(s)?:\/\/(.*?)\//.exec(this.params.url); this.params.host = exec[2]; } catch (e) { - this.params.host = this.params.reqUrl; + this.params.host = this.params.url; } + this.params.httpDomain = this.params.host; } - this.sendEvents(); - case 16: + case 19: case "end": return _context.stop(); } @@ -13667,29 +13784,64 @@ var Tracker = /*#__PURE__*/function () { return _formatResult.apply(this, arguments); } return formatResult; + }() // 上报 + }, { + key: "report", + value: function () { + var _report = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, data) { + var formattedParams; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + if (!(!this.beacon && !this.clsReporter)) { + _context2.next = 2; + break; + } + return _context2.abrupt("return"); + case 2: + _context2.next = 4; + return this.formatResult(err, data); + case 4: + formattedParams = formatParams(this.params); + if (this.beacon) { + this.sendEventsToBeacon(formattedParams); + } + if (this.clsReporter) { + this.sendEventsToCLS(formattedParams); + } + case 7: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function report(_x3, _x4) { + return _report.apply(this, arguments); + } + return report; }() // 设置当前链路的参数 }, { key: "setParams", value: function setParams(params) { Object.assign(this.params, params); } + }, { + key: "addParamValue", + value: function addParamValue(key, value) { + this.params[key] = (+this.params[key] + +value).toFixed(3); + } - // 使用灯塔延时上报 + // 上报灯塔 }, { - key: "sendEvents", - value: function sendEvents() { + key: "sendEventsToBeacon", + value: function sendEventsToBeacon(formattedParams) { // DeepTracker模式下才会上报分块上传内部细节 - if (sliceUploadMethods.includes(this.params.name) && !this.deepTracker) { + var isSliceUploadFile = this.params.requestName === 'sliceUploadFile' || this.params.realApi === 'sliceUploadFile'; + if (isSliceUploadFile && !this.deepTracker) { return; } - var eventCode = getEventCode(this.params.name); - var formattedParams = formatParams(this.params); - - // 兜底处理 - if (!this.beacon) { - this.beacon = getBeacon(this.delay || 5000); - } - if (this.params.delay === 0) { + var eventCode = 'qcloud_track_cos_sdk'; + if (this.delay === 0) { // 实时上报 this.beacon && this.beacon.onDirectUserAction(eventCode, formattedParams); } else { @@ -13698,6 +13850,15 @@ var Tracker = /*#__PURE__*/function () { } } + // 上报 cls + }, { + key: "sendEventsToCLS", + value: function sendEventsToCLS(formattedParams) { + // 是否实时上报 + var immediate = !!(this.delay === 0); + this.clsReporter.log(formattedParams, immediate); + } + // 生成子实例,与父所属一个链路,可用于分块上传内部流程上报单个分块操作 }, { key: "generateSubTracker", @@ -13708,9 +13869,11 @@ var Tracker = /*#__PURE__*/function () { traceId: this.params.traceId, bucket: this.params.bucket, region: this.params.region, + accelerate: this.params.accelerate, fileKey: this.params.requestPath, customId: this.params.customId, - delay: this.params.delay + delay: this.params.delay, + clsReporter: this.clsReporter }); return new Tracker(subParams); } @@ -14094,8 +14257,8 @@ var apiWrapper = function apiWrapper(apiName, apiFn) { // tracker传递 var tracker; - if (self.options.EnableTracker) { - if (params.calledBySdk === 'sliceUploadFile') { + if (self.options.EnableReporter) { + if (params.calledBySdk === 'sliceUploadFile' || params.calledBySdk === 'sliceCopyFile') { // 分块上传内部方法使用sliceUploadFile的子链路 tracker = params.tracker && params.tracker.generateSubTracker({ apiName: apiName @@ -14104,15 +14267,19 @@ var apiWrapper = function apiWrapper(apiName, apiFn) { // uploadFile、uploadFiles方法在内部处理,此处不处理 tracker = null; } else { - var fileSize = -1; + var fileSize = 0; if (params.Body) { - fileSize = typeof params.Body === 'string' ? params.Body.length : params.Body.size || params.Body.byteLength || -1; + fileSize = typeof params.Body === 'string' ? params.Body.length : params.Body.size || params.Body.byteLength || 0; } + var accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); tracker = new Tracker({ - Beacon: self.options.Beacon, + Beacon: self.options.BeaconReporter, + clsReporter: self.options.ClsReporter, bucket: params.Bucket, region: params.Region, apiName: apiName, + realApi: apiName, + accelerate: accelerate, fileKey: params.Key, fileSize: fileSize, deepTracker: self.options.DeepTracker, @@ -14135,7 +14302,7 @@ var apiWrapper = function apiWrapper(apiName, apiFn) { }; var _callback = function _callback(err, data) { // 格式化上报参数并上报 - tracker && tracker.formatResult(err, data); + tracker && tracker.report(err, data); callback && callback(formatResult(err), formatResult(data)); }; var checkParams = function checkParams() { diff --git a/demo/lib/cos-wx-sdk-v5.min.js b/demo/lib/cos-wx-sdk-v5.min.js index f4f3af5..76d5ef8 100644 --- a/demo/lib/cos-wx-sdk-v5.min.js +++ b/demo/lib/cos-wx-sdk-v5.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.COS=t():e.COS=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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/chrisftian/Documents/projects/cos-sdk/cos-wx-sdk-v5/demo/lib",n(n.s=8)}([function(e,t,n){"use strict";function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof x?t:x,a=Object.create(i.prototype),s=new O(r||[]);return o(a,"_invoke",{value:A(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",h="suspendedYield",g="executing",v="completed",y={};function x(){}function b(){}function k(){}var w={};p(w,c,(function(){return this}));var C=Object.getPrototypeOf,S=C&&C(C(D([])));S&&S!==n&&i.call(S,c)&&(w=S);var T=k.prototype=x.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(r,o,s,c){var l=f(e[r],e,o);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==a(p)&&i.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(p).then((function(e){u.value=e,s(u)}),(function(e){return n("throw",e,s,c)}))}c(l.arg)}var r;o(this,"_invoke",{value:function(e,i){function a(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(a,a):a()}})}function A(t,n,r){var i=m;return function(a,o){if(i===g)throw new Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=_(s,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===m)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function _(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=f(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function N(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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;B(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}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 o=n(10),s=n(13),c=n(14),l=n(19),u=n(3),p=u.btoa,d=wx.getFileSystemManager(),f=n(4);function m(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function h(e,t){var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push(t?m(r).toLowerCase():r);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var g=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],v=function(){},y=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 x(e){return C(e,(function(e){return"object"===a(e)&&null!==e?x(e):e}))}function b(e,t){return w(t,(function(n,r){e[r]=t[r]})),e}function k(e){return e instanceof Array}function w(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function C(e,t){var n=k(e)?[]:{};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r],r));return n}var S=function(e,t){if(t=b({},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])}();N.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-forbid-overwrite":"ForbidOverwrite","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,r){void 0!==t[e]&&(n[r]=t[e])})),t.Headers=y(n)}}return t},T=function(e){return new Promise((function(t,n){d.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){n((null==e?void 0:e.errMsg)||"")}})}))},E=function(){var e,t=(e=r().mark((function e(t,n,i){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}i(),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,T(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,i({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==n.Body?(n.ContentLength=n.Body.byteLength,i(null,n.ContentLength)):i({error:"missing param Body"}),e.next=21;break;case 20:n.FilePath?d.stat({path:n.FilePath,success:function(e){var t=e.stats;n.FileStat=t,n.FileStat.FilePath=n.FilePath;var r=t.isDirectory()?0:t.size;n.ContentLength=r=r||0,i(null,r)},fail:function(e){i(e)}}):i({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(r,a){var o=e.apply(t,n);function s(e){i(o,r,a,s,c,"next",e)}function c(e){i(o,r,a,s,c,"throw",e)}s(void 0)}))});return function(e,n,r){return t.apply(this,arguments)}}(),R=function(e){return Date.now()+(e||0)},A=function(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.lengtha)return 1;if(i=0;!t&&e.platform;return function(){return!1,t}}(),N={noop:v,formatParams:S,apiWrapper:function(e,t){return function(n,r){var i,a=this;if("function"==typeof n&&(r=n,n={}),n=S(e,n),a.options.EnableTracker)if("sliceUploadFile"===n.calledBySdk)i=n.tracker&&n.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))i=null;else{var o=-1;n.Body&&(o="string"==typeof n.Body?n.Body.length:n.Body.size||n.Body.byteLength||-1),i=new f({Beacon:a.options.Beacon,bucket:n.Bucket,region:n.Region,apiName:e,fileKey:n.Key,fileSize:o,deepTracker:a.options.DeepTracker,customId:a.options.CustomId,delay:a.options.TrackerDelay})}n.tracker=i;var s=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},c=function(e,t){i&&i.formatResult(e,t),r&&r(s(e),s(t))},l=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var n=t.Bucket,r=t.Region,i=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!n)return"Bucket";if(!r)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e||"uploadFile"===e){if(!n)return"Bucket";if(!r)return"Region";if(!i)return"Key"}return!1}(e,n);if(t)return"missing param "+t;if(n.Region){if(n.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(n.Region))return"Region format error.";!a.options.CompatibilityMode&&-1===n.Region.indexOf("-")&&"yfb"!==n.Region&&"default"!==n.Region&&n.Region}if(n.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(n.Bucket))if(n.AppId)n.Bucket=n.Bucket+"-"+n.AppId;else{if(!a.options.AppId)return'Bucket should format as "test-1250000000".';n.Bucket=n.Bucket+"-"+a.options.AppId}n.AppId&&delete n.AppId}n.Key&&"/"===n.Key.substr(0,1)&&(n.Key=n.Key.substr(1))}}(),u=["getAuth","getObjectUrl"].includes(e);if(!u&&!r)return new Promise((function(e,i){if(r=function(t,n){t?i(t):e(n)},l)return c({error:l});t.call(a,n,c)}));if(l)return c({error:l});var p=t.call(a,n,c);return u?p:void 0}},xml2json:c,json2xml:l,md5:o,clearKey:y,fileSlice:function(e,t,n,r){e?d.readFile({filePath:e,position:t,length:n-t,success:function(e){r(e.data)},fail:function(){r(null)}}):r(null)},getBodyMd5:function(e,t,n){n=n||v,e&&t&&t instanceof ArrayBuffer?N.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=o(e);return t&&t(n),n},binaryBase64:function(e){var t,n,r,i="";for(t=0,n=e.length/2;t-1||g.indexOf(r)>-1)&&(t[n]=e[n])}return t}(x(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 u=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&u&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),n&&r){var p=Math.round(R(e.SystemClockOffset)/1e3)-1,d=p,f=e.Expires||e.expires;d+=void 0===f?900:1*f||0;var m=n,v=i||p+";"+d,y=i||p+";"+d,b=h(c,!0).join(";").toLowerCase(),k=h(o,!0).join(";").toLowerCase(),w=s.HmacSHA1(y,r).toString(),C=[a,t,N.obj2str(o,!0),N.obj2str(c,!0),""].join("\n"),S=["sha1",v,s.SHA1(C).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+m,"q-sign-time="+v,"q-key-time="+y,"q-header-list="+b,"q-url-param-list="+k,"q-signature="+s.HmacSHA1(S,w).toString()].join("&")}},compareVersion:A,canFileSlice:_,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&&(b(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=x(n)),e},getSourceParams:function(e){var t=this.options.CopySourceParser;if(t)return t(e);var n=e.match(/^([^.]+-\d+)\.cos(v6|-cdc|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return n?{Bucket:n[1],Region:n[3],Key:n[7]}:null},encodeBase64:function(e,t){var n=u.encode(e);return t&&(n=n.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),n}};e.exports=N},function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var i=r({HTML:"text/html",isHTML:function(e){return e===i.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=r({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.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var r=0;r=0))throw new _(R,new Error(e.tagName+"@"+n));for(var i=t.length-1;r"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function M(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(M(e,t))return!0}while(e=e.nextSibling)}function F(){this.ownerDocument=this}function z(e,t,n,r){e&&e._inc++,n.namespaceURI===a.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function H(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function K(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function G(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function V(e){return e&&e.nodeType===U.ELEMENT_NODE}function W(e){return e&&e.nodeType===U.TEXT_NODE}function X(e,t){var n=e.childNodes||[];if(i(n,V)||G(t))return!1;var r=i(n,G);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function Q(e,t){var n=e.childNodes||[];if(i(n,(function(e){return V(e)&&e!==t})))return!1;var r=i(n,G);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function $(e,t,n){if(!function(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}(e))throw new _(E,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new _(R,"child not in parent");if(!function(e){return e&&(V(e)||W(e)||G(e)||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE)}(t)||G(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new _(E,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Y(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var o=a.filter(V);if(o.length>1||i(a,W))throw new _(E,"More than one element or text in fragment");if(1===o.length&&!X(e,n))throw new _(E,"Element in fragment can not be inserted before doctype")}if(V(t)&&!X(e,n))throw new _(E,"Only one element can be added and only after doctype");if(G(t)){if(i(r,G))throw new _(E,"Only one doctype is allowed");var s=i(r,V);if(n&&r.indexOf(s)1||i(a,W))throw new _(E,"More than one element or text in fragment");if(1===o.length&&!Q(e,n))throw new _(E,"Element in fragment can not be inserted before doctype")}if(V(t)&&!Q(e,n))throw new _(E,"Only one element can be added and only after doctype");if(G(t)){if(i(r,(function(e){return G(e)&&e!==n})))throw new _(E,"Only one doctype is allowed");var s=i(r,V);if(n&&r.indexOf(s)=0;C--){if(""===(S=i[C]).prefix&&S.namespace===e.namespaceURI){p=S.namespace;break}}if(p!==e.namespaceURI)for(C=i.length-1;C>=0;C--){var S;if((S=i[C]).namespace===e.namespaceURI){S.prefix&&(u=S.prefix+":"+l);break}}}t.push("<",u);for(var T=0;T"),n&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):ge(c,t,n,r,i.slice()),c=c.nextSibling;else for(;c;)ge(c,t,n,r,i.slice()),c=c.nextSibling;t.push("")}else t.push("/>");return;case b:case w:for(c=e.firstChild;c;)ge(c,t,n,r,i.slice()),c=c.nextSibling;return;case f:return he(t,e.name,e.value);case m:return t.push(e.data.replace(/[<&>]/g,q));case h:return t.push("");case x:return t.push("\x3c!--",e.data,"--\x3e");case k:var _=e.publicId,N=e.systemId;if(t.push("");else if(N&&"."!=N)t.push(" SYSTEM ",N,">");else{var B=e.internalSubset;B&&t.push(" [",B,"]"),t.push(">")}return;case y:return t.push("");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,n){var r;switch(t.nodeType){case d:(r=t.cloneNode(!1)).ownerDocument=e;case w:break;case f:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(ve(e,i,n)),i=i.nextSibling;return r}function ye(e,t,n){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=t[i];"object"!=typeof a&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new N),r.ownerDocument=e,r.nodeType){case d:var o=t.attributes,s=r.attributes=new D,c=o.length;s._ownerElement=r;for(var l=0;l=0&&e0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e)return r;t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(p,U),l(p,U.prototype),F.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==w){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===d&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),K(this,e)},replaceChild:function(e,t){Z(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),V(e)&&(this.documentElement=e)},importNode:function(e,t){return ve(this,e,t)},getElementById:function(e){var t=null;return M(this.documentElement,(function(n){if(n.nodeType==d&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=c(e);return new B(this,(function(n){var r=[];return t.length>0&&M(n.documentElement,(function(i){if(i!==n&&i.nodeType===d){var a=i.getAttribute("class");if(a){var o=e===a;if(!o){var s=c(a);o=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}o&&r.push(i)}}var l})),r}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new N,(t.attributes=new D)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new N,e},createTextNode:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new pe;return n.ownerDocument=this,n.tagName=n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ee,r=t.split(":"),i=n.attributes=new D;return n.childNodes=new N,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new te,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},u(F,U),ee.prototype={nodeType:d,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===w?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 r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new B(this,(function(t){var n=[];return M(t,(function(r){r===t||r.nodeType!=d||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new B(this,(function(n){var r=[];return M(n,(function(i){i===n||i.nodeType!==d||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},F.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,F.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,u(ee,U),te.prototype.nodeType=f,u(te,U),ne.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(T[E])},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}},u(ne,U),re.prototype={nodeName:"#text",nodeType:m,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 r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},u(re,ne),ie.prototype={nodeName:"#comment",nodeType:x},u(ie,ne),ae.prototype={nodeName:"#cdata-section",nodeType:h},u(ae,ne),oe.prototype.nodeType=k,u(oe,U),se.prototype.nodeType=C,u(se,U),ce.prototype.nodeType=v,u(ce,U),le.prototype.nodeType=g,u(le,U),ue.prototype.nodeName="#document-fragment",ue.prototype.nodeType=w,u(ue,U),pe.prototype.nodeType=y,u(pe,U),de.prototype.serializeToString=function(e,t,n){return fe.call(e,t,n)},U.prototype.toString=fe;try{if(Object.defineProperty){function be(e){switch(e.nodeType){case d:case w:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(be(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(B.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return be(this)},set:function(e){switch(this.nodeType){case d:case w: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}}}),xe=function(e,t,n){e["$$"+t]=n}}}catch(ke){}t.DocumentType=oe,t.DOMException=_,t.DOMImplementation=j,t.Element=ee,t.Node=U,t.NodeList=N,t.XMLSerializer=de},function(e,t){var n=function(e){var t=(e=e||{}).Base64,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=function(e){for(var t={},n=0,r=e.length;n>>6)+i(128|63&t):i(224|t>>>12&15)+i(128|t>>>6&63)+i(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return i(240|t>>>18&7)+i(128|t>>>12&63)+i(128|t>>>6&63)+i(128|63&t)},o=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(o,a)},c=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[n.charAt(r>>>18),n.charAt(r>>>12&63),t>=2?"=":n.charAt(r>>>6&63),t>=1?"=":n.charAt(63&r)].join("")},l=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,c)},u=function(e){return l(s(e))},p=function(e,t){return t?u(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):u(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 i(55296+(t>>>10))+i(56320+(1023&t));case 3:return i((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return i((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?r[e.charAt(0)]<<18:0)|(t>1?r[e.charAt(1)]<<12:0)|(t>2?r[e.charAt(2)]<<6:0)|(t>3?r[e.charAt(3)]:0),o=[i(a>>>16),i(a>>>8&255),i(255&a)];return o.length-=[0,0,2,1][n],o.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:p,utob:s,encode:p,encodeURI:function(e){return p(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 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)}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof x?t:x,a=Object.create(i.prototype),s=new O(r||[]);return o(a,"_invoke",{value:A(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",h="suspendedYield",g="executing",v="completed",y={};function x(){}function b(){}function k(){}var w={};p(w,c,(function(){return this}));var C=Object.getPrototypeOf,S=C&&C(C(D([])));S&&S!==n&&a.call(S,c)&&(w=S);var T=k.prototype=x.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(i,o,s,c){var l=f(e[i],e,o);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==r(p)&&a.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):t.resolve(p).then((function(e){u.value=e,s(u)}),(function(e){return n("throw",e,s,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}})}function A(t,n,r){var i=m;return function(a,o){if(i===g)throw new Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=_(s,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===m)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?v:h,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function _(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=f(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function N(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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;B(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function a(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function o(e,t){for(var n=0;n=0;i--)t===r[i]&&r.splice(i,1)},e.emit=function(e,t){for(var r=n(e).map((function(e){return e})),i=0;i=0;n--){var i=r[n][2];(!i||i+2592e3=0;a--){var o=r[a];(o[0]===e&&o[1]===t||e!==o[0]&&0===o[0].indexOf(i))&&r.splice(a,1)}r.unshift([e,t,Math.round(Date.now()/1e3)]),r.length>n&&r.splice(n),l()}},removeUploadId:function(e){c(),delete u.using[e];for(var t=r.length-1;t>=0;t--)r[t][1]===e&&r.splice(t,1);l()}};e.exports=u},function(e,t,n){var r=n(9);e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(6),a=n(20),o=n(21),s=n(27),c=n(5),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,Beacon:null,TrackerDelay:5e3,CustomId:"",AutoSwitchHost:!1,CopySourceParser:null},u=function(e){if(this.options=r.extend(r.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(" "),this.options.ForcePathStyle)throw new Error("ForcePathStyle is not supported");i.init(this),a.init(this)};o.init(u,a),s.init(u,a),u.util={md5:r.md5,xml2json:r.xml2json,json2xml:r.json2xml,encodeBase64:r.encodeBase64},u.getAuthorization=r.getAuth,u.version=c.version,e.exports=u},function(e,t,n){(function(e){var t;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)}!function(){"use strict";var i="input is invalid type",a="object"===("undefined"==typeof window?"undefined":r(window)),o=a?window:{};o.JS_MD5_NO_WINDOW&&(a=!1),!a&&"object"===("undefined"==typeof self?"undefined":r(self))&&(o=self);var s,c=!o.JS_MD5_NO_COMMON_JS&&"object"===r(e)&&e.exports,l=n(12),u=!o.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),d=[128,32768,8388608,-2147483648],f=[0,8,16,24],m=["hex","array","digest","buffer","arrayBuffer","base64"],h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),g=[];if(u){var v=new ArrayBuffer(68);s=new Uint8Array(v),g=new Uint32Array(v)}!o.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!o.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===r(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e){return function(t){return new x(!0).update(t)[e]()}};function x(e){if(e)g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g,this.buffer8=s;else if(u){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}x.prototype.update=function(e){if(!this.finalized){var t,n=r(e);if("string"!==n){if("object"!==n)throw i;if(null===e)throw i;if(!u||e.constructor!==ArrayBuffer&&"ArrayBuffer"!==e.constructor.name){if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw i}else e=new Uint8Array(e);t=!0}for(var a,o,s=0,c=e.length,l=this.blocks,p=this.buffer8;s>2]|=e[s]<>6,p[o++]=128|63&a):a<55296||a>=57344?(p[o++]=224|a>>12,p[o++]=128|a>>6&63,p[o++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++s)),p[o++]=240|a>>18,p[o++]=128|a>>12&63,p[o++]=128|a>>6&63,p[o++]=128|63&a);else for(o=this.start;s>2]|=a<>2]|=(192|a>>6)<>2]|=(128|63&a)<=57344?(l[o>>2]|=(224|a>>12)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<=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}},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=d[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()}},x.prototype.hash=function(){var e,t,n,r,i,a,o=this.blocks;this.first?t=((t=((e=((e=o[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(r=((r=(-1732584194^2004318071&e)+o[1]-117830708)<<12|r>>>20)+e<<0)&(-271733879^e))+o[2]-1126478375)<<17|n>>>15)+r<<0)&(r^e))+o[3]-1316259209)<<22|t>>>10)+n<<0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((r=this.h3)^t&(n^r))+o[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[1]-389564586)<<12|r>>>20)+e<<0)&(e^t))+o[2]+606105819)<<17|n>>>15)+r<<0)&(r^e))+o[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(r^t&(n^r))+o[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[5]+1200080426)<<12|r>>>20)+e<<0)&(e^t))+o[6]-1473231341)<<17|n>>>15)+r<<0)&(r^e))+o[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+o[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[9]-1958414417)<<12|r>>>20)+e<<0)&(e^t))+o[10]-42063)<<17|n>>>15)+r<<0)&(r^e))+o[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+o[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+o[13]-40341101)<<12|r>>>20)+e<<0)&(e^t))+o[14]-1502002290)<<17|n>>>15)+r<<0)&(r^e))+o[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[1]-165796510)<<5|e>>>27)+t<<0)^t))+o[6]-1069501632)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+o[11]+643717713)<<14|n>>>18)+r<<0)^r))+o[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[5]-701558691)<<5|e>>>27)+t<<0)^t))+o[10]+38016083)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+o[15]-660478335)<<14|n>>>18)+r<<0)^r))+o[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[9]+568446438)<<5|e>>>27)+t<<0)^t))+o[14]-1019803690)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+o[3]-187363961)<<14|n>>>18)+r<<0)^r))+o[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+o[13]-1444681467)<<5|e>>>27)+t<<0)^t))+o[2]-51403784)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+o[7]+1735328473)<<14|n>>>18)+r<<0)^r))+o[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((a=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[5]-378558)<<4|e>>>28)+t<<0))+o[8]-2022574463)<<11|r>>>21)+e<<0)^e)^(n=((n+=(a^t)+o[11]+1839030562)<<16|n>>>16)+r<<0))+o[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((a=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[1]-1530992060)<<4|e>>>28)+t<<0))+o[4]+1272893353)<<11|r>>>21)+e<<0)^e)^(n=((n+=(a^t)+o[7]-155497632)<<16|n>>>16)+r<<0))+o[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((a=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[13]+681279174)<<4|e>>>28)+t<<0))+o[0]-358537222)<<11|r>>>21)+e<<0)^e)^(n=((n+=(a^t)+o[3]-722521979)<<16|n>>>16)+r<<0))+o[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((a=(r=((r+=((i=t^n)^(e=((e+=(i^r)+o[9]-640364487)<<4|e>>>28)+t<<0))+o[12]-421815835)<<11|r>>>21)+e<<0)^e)^(n=((n+=(a^t)+o[15]+530742520)<<16|n>>>16)+r<<0))+o[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[0]-198630844)<<6|e>>>26)+t<<0)|~n))+o[7]+1126891415)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+o[14]-1416354905)<<15|n>>>17)+r<<0)|~e))+o[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+o[3]-1894986606)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+o[10]-1051523)<<15|n>>>17)+r<<0)|~e))+o[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+o[15]-30611744)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+o[6]-1560198380)<<15|n>>>17)+r<<0)|~e))+o[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+o[4]-145523070)<<6|e>>>26)+t<<0)|~n))+o[11]-1120210379)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+o[2]+718787259)<<15|n>>>17)+r<<0)|~e))+o[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=r+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+r<<0)},x.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return p[e>>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15]+p[t>>4&15]+p[15&t]+p[t>>12&15]+p[t>>8&15]+p[t>>20&15]+p[t>>16&15]+p[t>>28&15]+p[t>>24&15]+p[n>>4&15]+p[15&n]+p[n>>12&15]+p[n>>8&15]+p[n>>20&15]+p[n>>16&15]+p[n>>28&15]+p[n>>24&15]+p[r>>4&15]+p[15&r]+p[r>>12&15]+p[r>>8&15]+p[r>>20&15]+p[r>>16&15]+p[r>>28&15]+p[r>>24&15]},x.prototype.toString=x.prototype.hex,x.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=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&r,r>>8&255,r>>16&255,r>>24&255]},x.prototype.array=x.prototype.digest,x.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},x.prototype.buffer=x.prototype.arrayBuffer,x.prototype.base64=function(){for(var e,t,n,r="",i=this.array(),a=0;a<15;)e=i[a++],t=i[a++],n=i[a++],r+=h[e>>>2]+h[63&(e<<4|t>>>4)]+h[63&(t<<2|n>>>6)]+h[63&n];return e=i[a],r+=h[e>>>2]+h[e<<4&63]+"=="};var b=function(){var e=y("hex");e.getCtx=e.create=function(){return new x},e.update=function(t){return e.create().update(t)};for(var t=0;t>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},u=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)))}},p=r.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,i=e.min(4*t,i),t){for(var c=0;cl;l++){if(16>l)a[l]=0|e[t+l];else{var u=a[l-3]^a[l-8]^a[l-14]^a[l-16];a[l]=u<<1|u>>>31}u=(r<<5|r>>>27)+c+a[l],u=20>l?u+(1518500249+(i&o|~i&s)):40>l?u+(1859775393+(i^o^s)):60>l?u+((i&o|i&s|o&s)-1894007588):u+((i^o^s)-899497514),c=s,s=o,o=i<<30|i>>>2,i=r,r=u}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|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,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=i._createHelper(o),n.HmacSHA1=i._createHmacHelper(o),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 r=e.blockSize,i=4*r;n.sigBytes>i&&(n=e.finalize(n)),n.clamp();for(var a=this._oKey=n.clone(),o=this._iKey=n.clone(),s=a.words,c=o.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=r.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=n.charAt(64);if(r){var i=e.indexOf(r);-1!=i&&(t=i)}for(var a=[],o=0,s=0;s>>6-s%4*2;a[o>>>2]|=(l|u)<<24-o%4*8,o++}return c.create(a,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=l},function(e,t,n){var r=n(15).DOMParser,i=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={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function n(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function i(e){return"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):e}function a(e,t,n,r){for(var i=0;i0&&a(e.arrayAccessFormPaths,t,n,r)&&(t[n]=[t[n]])}function s(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),r=t[5].split(".");if(n.setHours(t[3],t[4],r[0]),r.length>1&&n.setMilliseconds(r[1]),t[6]&&t[7]){var i=60*t[6]+Number(t[7]);i=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*i:i),n.setMinutes(n.getMinutes()-i-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 c(n,r,i,o){return!(r==t.ELEMENT_NODE&&e.xmlElementsFilter.length>0)||a(e.xmlElementsFilter,n,i,o)}function l(r,i){if(r.nodeType==t.DOCUMENT_NODE){for(var u=new Object,p=r.childNodes,d=0;d0){var i=r.split(".#")[0];return a(e.datetimeAccessFormPaths,t,n,i)?s(t):t}return t}(u.__text,m,i+"."+m)),null!=u["#cdata-section"]&&(u.__cdata=u["#cdata-section"],delete u["#cdata-section"],"property"==e.arrayAccessForm&&delete u["#cdata-section_asArray"]),0==u.__cnt&&"text"==e.emptyNodeForm?u="":1==u.__cnt&&null!=u.__text?u=u.__text:1!=u.__cnt||null==u.__cdata||e.keepCData?u.__cnt>1&&null!=u.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==u.__text||""==u.__text.trim())&&delete u.__text:u=u.__cdata,delete u.__cnt,!e.enableToStringFunc||null==u.__text&&null==u.__cdata||(u.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),u}if(r.nodeType==t.TEXT_NODE||r.nodeType==t.CDATA_SECTION_NODE)return r.nodeValue}function u(t,n,r,a){var o="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=r)for(var s=0;s":">"}function p(e,t){return""}function d(t,n){return"property"==e.arrayAccessForm&&(r=n.toString(),i="_asArray",-1!==r.indexOf(i,r.length-i.length))||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function;var r,i}function f(e){var t=0;if(e instanceof Object)for(var n in e)d(e,n)||t++;return t}function m(t,n,r){return 0==e.jsonPropertiesFilter.length||""==r||a(e.jsonPropertiesFilter,t,n,r)}function h(t){var n=[];if(t instanceof Object)for(var r in t)-1==r.toString().indexOf("__")&&0==r.toString().indexOf(e.attributePrefix)&&n.push(r);return n}function g(t){var n="";return t instanceof Object?n+=function(t){var n="";return null!=t.__cdata&&(n+=""),null!=t.__text&&(e.escapeMode?n+=i(t.__text):n+=t.__text),n}(t):null!=t&&(e.escapeMode?n+=i(t):n+=t),n}function v(e,t){return""===e?t:e+"."+t}function y(e,t,n,r){var i="";if(0==e.length)i+=u(e,t,n,!0);else for(var a=0;a0)for(var r in e)if(!d(e,r)&&(""==t||m(e,r,v(t,r)))){var i=e[r],a=h(i);if(null==i||null==i)n+=u(i,r,a,!0);else if(i instanceof Object)if(i instanceof Array)n+=y(i,r,a,t);else if(i instanceof Date)n+=u(i,r,a,!1),n+=i.toISOString(),n+=p(i,r);else{f(i)>0||null!=i.__text||null!=i.__cdata?(n+=u(i,r,a,!1),n+=x(i,v(t,r)),n+=p(i,r)):n+=u(i,r,a,!0)}else n+=u(i,r,a,!1),n+=g(i),n+=p(i,r)}return n+=g(e)}this.parseXmlString=function(e){var t;if(void 0===e)return null;if(r){var n=new r,i=null;try{i=n.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){i=null}try{t=n.parseFromString(e,"text/xml"),null!=i&&t.getElementsByTagNameNS(i,"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?s(e):e},this.xml2json=function(e){return l(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return x(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 r).parseFromString(e,"text/xml"),n=(new i).xml2json(t);return n.html&&n.getElementsByTagName("parsererror").length?null:n}},function(e,t,n){var r=n(2);t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer,t.DOMParser=n(16).DOMParser},function(e,t,n){var r=n(1),i=n(2),a=n(17),o=n(18),s=i.DOMImplementation,c=r.NAMESPACE,l=o.ParseError,u=o.XMLReader;function p(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,r=new u,i=n.domBuilder||new f,o=n.errorHandler,s=n.locator,l=n.xmlns||{},d=/\/x?html?$/.test(t),m=d?a.HTML_ENTITIES:a.XML_ENTITIES;s&&i.setDocumentLocator(s),r.errorHandler=function(e,t,n){if(!e){if(t instanceof f)return t;e=t}var r={},i=e instanceof Function;function a(t){var a=e[t];!a&&i&&(a=2==e.length?function(n){e(t,n)}:e),r[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"),r}(o,i,s),r.domBuilder=n.domBuilder||i,d&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var h=n.normalizeLineEndings||p;return e&&"string"==typeof e?r.parse(h(e),l,m):r.errorHandler.error("invalid doc source"),i.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,r){var i=this.doc,a=i.createElementNS(e,n||t),o=r.length;g(this,a),this.currentElement=a,this.locator&&m(this.locator,a);for(var s=0;s",lt:"<",quot:'"'}),t.HTML_ENTITIES=r({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},function(e,t,n){var r=n(1).NAMESPACE,i=/[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"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+i.source+a.source+"*(?::"+i.source+a.source+"*)?$"),s=0,c=1,l=2,u=3,p=4,d=5,f=6,m=7;function h(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,h)}function g(){}function v(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function y(e,t,n,i,a,o){function h(e,t,r){n.attributeNames.hasOwnProperty(e)&&o.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),r)}for(var g,v=++t,y=s;;){var x=e.charAt(v);switch(x){case"=":if(y===c)g=e.slice(t,v),y=u;else{if(y!==l)throw new Error("attribute equal must after attrName");y=u}break;case"'":case'"':if(y===u||y===c){if(y===c&&(o.warning('attribute value must after "="'),g=e.slice(t,v)),t=v+1,!((v=e.indexOf(x,t))>0))throw new Error("attribute value no end '"+x+"' match");h(g,b=e.slice(t,v),t-1),y=d}else{if(y!=p)throw new Error('attribute value must after "="');h(g,b=e.slice(t,v),t),o.warning('attribute "'+g+'" missed start quot('+x+")!!"),t=v+1,y=d}break;case"/":switch(y){case s:n.setTagName(e.slice(t,v));case d:case f:case m:y=m,n.closed=!0;case p:case c:break;case l:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),y==s&&n.setTagName(e.slice(t,v)),v;case">":switch(y){case s:n.setTagName(e.slice(t,v));case d:case f:case m:break;case p:case c:"/"===(b=e.slice(t,v)).slice(-1)&&(n.closed=!0,b=b.slice(0,-1));case l:y===l&&(b=g),y==p?(o.warning('attribute "'+b+'" missed quot(")!'),h(g,b,t)):(r.isHTML(i[""])&&b.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+b+'" missed value!! "'+b+'" instead!!'),h(b,b,t));break;case u:throw new Error("attribute value missed!!")}return v;case"€":x=" ";default:if(x<=" ")switch(y){case s:n.setTagName(e.slice(t,v)),y=f;break;case c:g=e.slice(t,v),y=l;break;case p:var b=e.slice(t,v);o.warning('attribute "'+b+'" missed quot(")!!'),h(g,b,t);case d:y=f}else switch(y){case l:n.tagName;r.isHTML(i[""])&&g.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),h(g,g,t),t=v,y=c;break;case d:o.warning('attribute space is required"'+g+'"!!');case f:y=c,t=v;break;case u:y=p,t=v;break;case m:throw new Error("elements closed character '/' and '>' must be connected to")}}v++}}function x(e,t,n){for(var i=e.tagName,a=null,o=e.length;o--;){var s=e[o],c=s.qName,l=s.value;if((f=c.indexOf(":"))>0)var u=s.prefix=c.slice(0,f),p=c.slice(f+1),d="xmlns"===u&&p;else p=c,u=null,d="xmlns"===c&&"";s.localName=p,!1!==d&&(null==a&&(a={},w(n,n={})),n[d]=a[d]=l,s.uri=r.XMLNS,t.startPrefixMapping(d,l))}for(o=e.length;o--;){(u=(s=e[o]).prefix)&&("xml"===u&&(s.uri=r.XML),"xmlns"!==u&&(s.uri=n[u||""]))}var f;(f=i.indexOf(":"))>0?(u=e.prefix=i.slice(0,f),p=e.localName=i.slice(f+1)):(u=null,p=e.localName=i);var m=e.uri=n[u||""];if(t.startElement(m,p,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(m,p,i),a)for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&t.endPrefixMapping(u)}function b(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function k(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf(""))t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],c=!1,l=!1;o>3&&(/^public$/i.test(a[2][0])?(c=a[3][0],l=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var u=a[o-1];return n.startDTD(s,c,l),n.endDTD(),u.index+u[0].length}return-1}function S(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function T(){this.attributeNames={}}h.prototype=new Error,h.prototype.name=h.name,g.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),w(t,t={}),function(e,t,n,i,a){function o(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?o(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function c(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,s);f&&l(w),i.characters(n,0,t-w),w=t}}function l(t,n){for(;t>=p&&(n=d.exec(e));)u=n.index,p=u+n[0].length,f.lineNumber++;f.columnNumber=t-u+1}var u=0,p=0,d=/.*(?:\r\n?|\n)|.*$/g,f=i.locator,m=[{currentNSMap:t}],g={},w=0;for(;;){try{var E=e.indexOf("<",w);if(E<0){if(!e.substr(w).match(/^\s*$/)){var R=i.doc,A=R.createTextNode(e.substr(w));R.appendChild(A),i.currentElement=A}return}switch(E>w&&c(E),e.charAt(E+1)){case"/":var _=e.indexOf(">",E+3),N=e.substring(E+2,_).replace(/[ \t\n\r]+$/g,""),B=m.pop();_<0?(N=e.substring(E+2).replace(/[\s<].*/,""),a.error("end tag name: "+N+" is not complete:"+B.tagName),_=E+1+N.length):N.match(/\sw?w=_:c(Math.max(E,w)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},T.prototype={setTagName:function(e){if(!o.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!o.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=g,t.ParseError=h},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 r="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",i=new RegExp("^([^"+r+"])|^((x|X)(m|M)(l|L))|([^"+r+"-.0-9·̀-ͯ‿⁀])","g"),a=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,o=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 r=function(e,n,r,a,o){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(a).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(i,"_"));var l=[c,"<",e,r||""];return n&&n.length>0?(l.push(">"),l.push(n),o&&l.push(c),l.push("")):l.push("/>"),l.join("")};return function e(i,s,c){var l=n(i);switch((Array.isArray?Array.isArray(i):i instanceof Array)?l="array":i instanceof Date&&(l="date"),l){case"array":var u=[];return i.map((function(t){u.push(e(t,1,c+1))})),t.prettyPrint&&u.push("\n"),u.join("");case"date":return i.toJSON?i.toJSON():i+"";case"object":var p=[];for(var d in i)if(i.hasOwnProperty(d))if(i[d]instanceof Array)for(var f in i[d])i[d].hasOwnProperty(f)&&p.push(r(d,e(i[d][f],0,c+1),null,c+1,o(i[d][f]).length));else p.push(r(d,e(i[d],0,c+1),null,c+1));return t.prettyPrint&&p.length>0&&p.push("\n"),p.join("");case"function":return i();default:return t.escape?(""+i).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(a,""):""+i}}(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 r="",i="";return t&&("object"==n(t)?(t.xmlHeader&&(r=c(!!t.xmlHeader.standalone)),void 0!==t.docType&&(i="")):r=c()),[r,(t=t||{}).prettyPrint&&i?"\n":"",i,s(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t,n){var r=n(7),i=n(0),a={};e.exports.transferToTaskMethod=function(e,t){a[t]=e[t],e[t]=function(e,n){e.SkipTask?a[t].call(this,e,n):this._addTask(t,e,n)}},e.exports.init=function(e){var t,n,o=[],s={},c=0,l=0,u=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),t},p=(n=function(){t=0,e.emit("task-list-update",{list:i.map(o,u)}),e.emit("list-update",{list:i.map(o,u)})},function(){t||(t=setTimeout(n))}),d=function(){if(!(o.length<=e.options.UploadQueueSize)){for(var t=0;te.options.UploadQueueSize;){var n="waiting"===o[t].state||"checking"===o[t].state||"uploading"===o[t].state;o[t]&&n?t++:(s[o[t].id]&&delete s[o[t].id],o.splice(t,1),l--)}p()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;o[l]&&"waiting"!==o[l].state;)l++;if(!(l>=o.length)){var n=o[l];l++,c++,n.state="checking",n.params.onTaskStart&&n.params.onTaskStart(u(n)),!n.params.UploadData&&(n.params.UploadData={});var r=i.formatParams(n.api,n.params);a[n.api].call(e,r,(function(r,i){e._isRunningTask(n.id)&&("checking"!==n.state&&"uploading"!==n.state||(n.state=r?"error":"success",r&&(n.error=r),c--,p(),t(),n.callback&&n.callback(r,i),"success"===n.state&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)),d())})),p(),setTimeout(t)}}},m=function(t,n){var i=s[t];if(i){var a=i&&"waiting"===i.state,o=i&&("checking"===i.state||"uploading"===i.state);if("canceled"===n&&"canceled"!==i.state||"paused"===n&&a||"paused"===n&&o){if("paused"===n&&i.params.Body&&"function"==typeof i.params.Body.pipe)return;i.state=n,e.emit("inner-kill-task",{TaskId:t,toState:n});try{var l=i&&i.params&&i.params.UploadData.UploadId}catch(e){}"canceled"===n&&l&&r.removeUsing(l),p(),o&&(c--,f()),"canceled"===n&&(i.params&&(delete i.params.UploadData,delete i.params.Body,delete i.params),delete i.callback)}d()}};e._addTasks=function(t){i.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),p()},e._addTask=function(t,n,r,a){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||i.canFileSlice()||(t=c),n=i.formatParams(t,n);var l=i.uuid();n.TaskId=l,n.onTaskReady&&n.onTaskReady(l);var u={params:n,callback:r,api:t,index:o.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(u.id)&&(u.hashPercent=t.percent,m&&m(t),p())};var h=n.onProgress;return n.onProgress=function(t){e._isRunningTask(u.id)&&("checking"===u.state&&(u.state="uploading"),u.loaded=t.loaded,u.size=t.total,u.speed=t.speed,u.percent=t.percent,h&&h(t),p())},i.getFileSize(t,n,(function(e,t){e?r(e):(s[l]=u,o.push(u),u.size=t,!a&&p(),f(),d())})),l},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return i.map(o,u)},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",p(),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,r).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,o).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,r).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,o).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+=i.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;return(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")};function u(e,t){var n=i.clone(e.Headers),r="";i.each(n,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete n[t],"host"===t.toLowerCase()&&(r=e)}));var a=!1!==e.ForceSignHost;!r&&e.SignHost&&a&&(n.Host=e.SignHost);var o=!1,s=function(e,n){o||(o=!0,n&&n.XCosSecurityToken&&!n.SecurityToken&&((n=i.clone(n)).SecurityToken=n.XCosSecurityToken,delete n.XCosSecurityToken),t&&t(e,n))},c=this,l=e.Bucket||"",u=e.Region||"",p="name/cos:PostObject"!==e.Action&&e.Key?e.Key:"";c.options.ForcePathStyle&&l&&(p=l+"/"+p);var d="/"+p,f={},m=e.Scope;if(!m){var h=e.Action||"",g=e.ResourceKey||e.Key||"";m=e.Scope||[{action:h,bucket:l,region:u,prefix:g}]}var v=i.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(i.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 r={Authorization:i.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||"",SignFrom:"client"};s(null,r)},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 i.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return i.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return i.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return i.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return i.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return i.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return i.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(f.ExpiredTime&&f.ExpiredTime-i.getSkewTime(c.options.SystemClockOffset)/1e3>60)x();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:l,Region:u,Method:e.Method,Key:p,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:i.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,SignFrom:"client"},s(null,y),y;c.options.getSTS.call(c,{Bucket:l,Region:u},(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 p(e){var t=!1,n=!1,r=!1,a=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var o=e.error.Code,s=e.error.Message;("RequestTimeTooSkewed"===o||"AccessDenied"===o&&"Request has expired"===s)&&(r=!0)}catch(e){}if(e){if(r&&a){var c=Date.parse(a);this.options.CorrectClockSkew&&Math.abs(i.getSkewTime(this.options.SystemClockOffset)-c)>=3e4&&(this.options.SystemClockOffset=c-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);if(e.statusCode){var l=Math.floor(e.statusCode/100),u=(null==e?void 0:e.headers)&&(null==e?void 0:e.headers["x-cos-request-id"]);[3,4,5].includes(l)&&!u&&(t=this.options.AutoSwitchHost,n=!0)}else t=this.options.AutoSwitchHost,n=!0}return{canRetry:t,networkError:n}}function d(e){var t=e.requestUrl,n=e.clientCalcSign,r=e.networkError;if(!this.options.AutoSwitchHost)return!1;if(!t)return!1;if(!n)return!1;if(!r)return!1;return/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/.test(t)&&!/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/.test(t)}function f(e,t){var n=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=i.clearKey(e.qs),e.headers&&(e.headers=i.clearKey(e.headers)),e.qs&&(e.qs=i.clearKey(e.qs));var r=i.clone(e.qs);e.action&&(r[e.action]="");var a=e.url||e.Url,o=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:a}),s=e.tracker;!function i(a){var c=n.options.SystemClockOffset;e.SwitchHost&&(o=o.replace(/myqcloud.com/,"tencentcos.cn")),s&&s.setParams({signStartTime:(new Date).getTime(),retryTimes:a-1}),u.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:r,Headers:e.headers,SignHost:o,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(r,o){r?t(r):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=o,m.call(n,e,(function(r,l){var u=!1,f=!1;if(r){var m=p.call(n,r);u=m.canRetry||c!==n.options.SystemClockOffset,f=m.networkError}if(s&&s.setParams({httpEndTime:(new Date).getTime()}),r&&a<2&&u){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"]);var h=d.call(n,{requestUrl:(null==r?void 0:r.url)||"",clientCalcSign:"client"===(null==o?void 0:o.SignFrom),networkError:f});e.SwitchHost=h,i(a+1)}else t(r,l)})))}))}(1)}function m(e,t){var n=this,a=e.TaskId;if(!a||n._isRunningTask(a)){var o=e.Bucket,s=e.Region,l=e.Key,u=e.method||"GET",p=e.url||e.Url,d=e.body,f=e.json,m=e.rawBody,h=e.dataType,g=n.options.HttpDNSServiceId;n.options.UseAccelerate&&(s="accelerate"),p=p||c({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:o,region:s,object:l}),e.SwitchHost&&(p=p.replace(/myqcloud.com/,"tencentcos.cn")),e.action&&(p=p+"?"+e.action),e.qsStr&&(p=p.indexOf("?")>-1?p+"&"+e.qsStr:p+"?"+e.qsStr);var v={method:u,url:p,headers:e.headers,qs:e.qs,filePath:e.filePath,body:d,json:f,httpDNSServiceId:g,dataType:h},y="x-cos-security-token";i.isCIHost(p)&&(y="x-ci-security-token"),v.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(v.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(v.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(v.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(v.headers[y]=e.AuthData.SecurityToken),v.headers&&(v.headers=i.clearKey(v.headers)),v=i.clearKey(v),e.onProgress&&"function"==typeof e.onProgress&&(v.onProgress=function(t){if(!a||n._isRunningTask(a)){var r=t?t.loaded:0;e.onProgress({loaded:r,total:t.total})}}),this.options.Timeout&&(v.timeout=this.options.Timeout),n.options.ForcePathStyle&&(v.pathStyle=n.options.ForcePathStyle),n.emit("before-send",v);var x=v.url.includes("accelerate."),b=v.qs?Object.keys(v.qs).map((function(e){return"".concat(e,"=").concat(v.qs[e])})).join("&"):"",k=b?v.url+"?"+b:v.url;e.tracker&&e.tracker.setParams({reqUrl:k,accelerate:x?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:k,accelerate:x?"Y":"N"});var w=r(v,(function(e,r,o){if("abort"!==e){var s,c=function(e,o){if(a&&n.off("inner-kill-task",C),!s){s=!0;var c={};r&&r.statusCode&&(c.statusCode=r.statusCode),r&&r.headers&&(c.headers=r.headers),e?(v.url&&(c.url=v.url),v.method&&(c.method=v.method),e=i.extend(e||{},c),t(e,null)):(o=i.extend(o||{},c),t(null,o)),w=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=o;else try{l=o&&o.indexOf("<")>-1&&o.indexOf(">")>-1&&i.xml2json(o)||{}}catch(e){l=o||{}}var u=r.statusCode;2===Math.floor(u/100)?l.Error?c({error:l.Error}):c(null,l):c({error:l.Error||l})}}})),C=function e(t){t.TaskId===a&&(w&&w.abort&&w.abort(),n.off("inner-kill-task",e))};a&&n.on("inner-kill-task",C)}}var h={getService:function(e,t){"function"==typeof e&&(t=e,e={});var n="https:",r=this.options.ServiceDomain,a=e.Region;r?(r=r.replace(/\{\{Region\}\}/gi,a||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(r)||(r=n+"//"+r),"/"===r.slice(-1)&&(r=r.slice(0,-1))):r=a?n+"//cos."+a+".myqcloud.com":n+"//service.cos.myqcloud.com";r.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),f.call(this,{Action:"name/cos:GetService",url:r,method:"GET",headers:e.Headers},(function(e,n){if(e)return t(e);var r=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Buckets&&n.ListAllMyBucketsResult.Buckets.Bucket||[];r=i.isArray(r)?r:[r];var a=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:r,Owner:a,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,r="";if(e.BucketAZConfig){var a={BucketAZConfig:e.BucketAZConfig};r=i.json2xml({CreateBucketConfiguration:a})}f.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:r},(function(r,i){if(r)return t(r);var a=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:a,statusCode:i.statusCode,headers:i.headers})}))},headBucket:function(e,t){f.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,f.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 r=n.ListBucketResult||{},a=r.Contents||[],o=r.CommonPrefixes||[];a=i.isArray(a)?a:[a],o=i.isArray(o)?o:[o];var s=i.clone(r);i.extend(s,{Contents:a,CommonPrefixes:o,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},deleteBucket:function(e,t){f.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,r="";if(e.AccessControlPolicy){var a=i.clone(e.AccessControlPolicy||{}),o=a.Grants||a.Grant;o=i.isArray(o)?o:[o],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:o},r=i.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=i.binaryBase64(i.md5(r))}i.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),f.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:n,action:"acl",body:r},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketAcl:function(e,t){f.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 r=n.AccessControlPolicy||{},a=r.Owner||{},s=r.AccessControlList.Grant||[];s=i.isArray(s)?s:[s];var c=o(r);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=i.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=i.clone(i.isArray(n)?n:[n]),i.each(n,(function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",r=e[n]||e[t]||[];delete e[n],e[t]=i.isArray(r)?r:[r]}))}));var r={CORSRule:n};e.ResponseVary&&(r.ResponseVary=e.ResponseVary);var a=i.json2xml({CORSConfiguration:r}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"cors",headers:o},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},getBucketCors:function(e,t){f.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 r={CORSRules:[],statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else t(e);else{var a=n.CORSConfiguration||{},o=a.CORSRules||a.CORSRule||[];o=i.clone(i.isArray(o)?o:[o]);var s=a.ResponseVary;i.each(o,(function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var n=t+"s",r=e[n]||e[t]||[];delete e[t],e[n]=i.isArray(r)?r:[r]}))})),t(null,{CORSRules:o,ResponseVary:s,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketCors:function(e,t){f.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){f.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){f.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 r={};try{r=JSON.parse(n.body)}catch(e){}t(null,{Policy:r,statusCode:n.statusCode,headers:n.headers})}))},putBucketPolicy:function(e,t){var n=e.Policy,r=n;try{"string"==typeof n?n=JSON.parse(r):r=JSON.stringify(n)}catch(e){t({error:"Policy format error"})}var a=e.Headers;a["Content-Type"]="application/json",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:r,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){f.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||{},r=n.TagSet||n.Tags||e.Tags||[];r=i.clone(i.isArray(r)?r:[r]);var a=i.json2xml({Tagging:{TagSet:{Tag:r}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"tagging",headers:o},(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){f.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 r={Tags:[],statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=i.clone(i.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketTagging:function(e,t){f.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=i.clone(n);var r=i.json2xml({LifecycleConfiguration:{Rule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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 r={Rules:[],statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else t(e);else{var a=[];try{a=n.LifecycleConfiguration.Rule||[]}catch(e){}a=i.clone(i.isArray(a)?a:[a]),t(null,{Rules:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketLifecycle:function(e,t){f.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||{},r=i.json2xml({VersioningConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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=i.clone(e.ReplicationConfiguration),r=i.json2xml({ReplicationConfiguration:n});r=(r=r.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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 r={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}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){f.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=i.clone(e.WebsiteConfiguration||{}),r=n.RoutingRules||n.RoutingRule||[];r=i.isArray(r)?r:[r],delete n.RoutingRule,delete n.RoutingRules,r.length&&(n.RoutingRules={RoutingRule:r});var a=i.json2xml({WebsiteConfiguration:n}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"website",headers:o},(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){f.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 r={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else t(e);else{var a=n.WebsiteConfiguration||{};if(a.RoutingRules){var o=i.clone(a.RoutingRules.RoutingRule||[]);o=i.makeArray(o),a.RoutingRules=o}t(null,{WebsiteConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteBucketWebsite:function(e,t){f.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=i.clone(e.RefererConfiguration||{}),r=n.DomainList||{},a=r.Domains||r.Domain||[];(a=i.isArray(a)?a:[a]).length&&(n.DomainList={Domain:a});var o=i.json2xml({RefererConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,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){f.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 r={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else t(e);else{var a=n.RefererConfiguration||{};if(a.DomainList){var o=i.makeArray(a.DomainList.Domain||[]);a.DomainList={Domains:o}}t(null,{RefererConfiguration:a,statusCode:n.statusCode,headers:n.headers})}}))},putBucketDomain:function(e,t){var n=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];n=i.clone(n);var r=i.json2xml({DomainConfiguration:{DomainRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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 r=[];try{r=n.DomainConfiguration.DomainRule||[]}catch(e){}r=i.clone(i.isArray(r)?r:[r]),t(null,{DomainRule:r,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketDomain:function(e,t){f.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=i.clone(n);var r=i.json2xml({OriginConfiguration:{OriginRule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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 r=[];try{r=n.OriginConfiguration.OriginRule||[]}catch(e){}r=i.clone(i.isArray(r)?r:[r]),t(null,{OriginRule:r,statusCode:n.statusCode,headers:n.headers})}))},deleteBucketOrigin:function(e,t){f.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=i.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=i.binaryBase64(i.md5(n)),f.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"logging",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})}))},getBucketLogging:function(e,t){f.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=i.clone(e.InventoryConfiguration);if(n.OptionalFields){var r=n.OptionalFields||[];n.OptionalFields={Field:r}}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 o=i.json2xml({InventoryConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,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){f.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 r=n.InventoryConfiguration;if(r&&r.OptionalFields&&r.OptionalFields.Field){var a=r.OptionalFields.Field;i.isArray(a)||(a=[a]),r.OptionalFields=a}if(r.Destination&&r.Destination.COSBucketDestination&&r.Destination.COSBucketDestination.Encryption){var o=r.Destination.COSBucketDestination.Encryption;Object.keys(o).indexOf("SSE-COS")>-1&&(o.SSECOS=o["SSE-COS"],delete o["SSE-COS"])}t(null,{InventoryConfiguration:r,statusCode:n.statusCode,headers:n.headers})}))},listBucketInventory:function(e,t){f.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 r=n.ListInventoryConfigurationResult,a=r.InventoryConfiguration||[];a=i.isArray(a)?a:[a],delete r.InventoryConfiguration,i.each(a,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;i.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"])}})),r.InventoryConfigurations=a,i.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)}))},deleteBucketInventory:function(e,t){f.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||{}},r=i.json2xml(n),a={"Content-Type":"application/xml"};a["Content-MD5"]=i.binaryBase64(i.md5(r)),f.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,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){f.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||{},r=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,f.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:r,rawBody:!0,dataType:e.DataType,tracker:a},(function(n,r){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(n)}t(null,{Body:r.body,ETag:i.attr(r.headers,"etag",""),statusCode:r.statusCode,headers:r.headers})}))},headObject:function(e,t){f.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,r){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0,statusCode:a}):t(n)}r.ETag=i.attr(r.headers,"etag",""),t(null,r)}))},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,f.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 r=n.ListVersionsResult||{},a=r.DeleteMarker||[];a=i.isArray(a)?a:[a];var o=r.Version||[];o=i.isArray(o)?o:[o];var s=i.clone(r);delete s.DeleteMarker,delete s.Version,i.extend(s,{DeleteMarkers:a,Versions:o,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},putObject:function(e,t){var n=this,r=e.ContentLength,o=i.throttleOnProgress.call(n,r,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,u=e.tracker;l&&u&&u.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(l,e.Body,(function(a){a&&(u&&u.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(s["Content-MD5"]=i.binaryBase64(a)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=a)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),o(null,!0),f.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:o,tracker:u},(function(a,s){if(a)return o(null,!0),t(a);o({loaded:r,total:r},!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=i.attr(s.headers,"etag",""),t(null,s)}))}))},postObject:function(e,t){var n=this,r={},a=e.FilePath;if(a){for(var o in r["Cache-Control"]=e.CacheControl,r["Content-Disposition"]=e.ContentDisposition,r["Content-Encoding"]=e.ContentEncoding,r["Content-MD5"]=e.ContentMD5,r["Content-Length"]=e.ContentLength,r["Content-Type"]=e.ContentType,r.Expect=e.Expect,r.Expires=e.Expires,r["x-cos-acl"]=e.ACL,r["x-cos-grant-read"]=e.GrantRead,r["x-cos-grant-write"]=e.GrantWrite,r["x-cos-grant-full-control"]=e.GrantFullControl,r["x-cos-storage-class"]=e.StorageClass,r["x-cos-mime-limit"]=e.MimeLimit,r["x-cos-traffic-limit"]=e.TrafficLimit,r["x-cos-forbid-overwrite"]=e.ForbidOverwrite,r["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,r["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,r["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,r["x-cos-server-side-encryption"]=e.ServerSideEncryption,r["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,r["x-cos-server-side-encryption-context"]=e.SSEContext,delete r["Content-Length"],delete r["content-length"],e)o.indexOf("x-cos-meta-")>-1&&(r[o]=e[o]);var s=i.throttleOnProgress.call(n,r["Content-Length"],e.onProgress);f.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:r,qs:e.Query,filePath:a,TaskId:e.TaskId,onProgress:s},(function(r,i){if(s(null,!0),r)return t(r);if(i&&i.headers){var o=i.headers,l=o.etag||o.Etag||o.ETag||"",u=a.substr(a.lastIndexOf("/")+1),p=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,u),isLocation:!0});return t(null,{Location:p,statusCode:i.statusCode,headers:o,ETag:l})}t(null,i)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){f.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 r=e.statusCode;return r&&204===r?t(null,{statusCode:r}):r&&404===r?t(null,{BucketNotFound:!0,statusCode:r}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})}))},getObjectAcl:function(e,t){var n={};e.VersionId&&(n.versionId=e.VersionId),f.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:n,action:"acl"},(function(e,n){if(e)return t(e);var r=n.AccessControlPolicy||{},a=r.Owner||{},s=r.AccessControlList&&r.AccessControlList.Grant||[];s=i.isArray(s)?s:[s];var c=o(r);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=i.extend(c,{Owner:a,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,r="";if(e.AccessControlPolicy){var a=i.clone(e.AccessControlPolicy||{}),o=a.Grants||a.Grant;o=i.isArray(o)?o:[o],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:o},r=i.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=i.binaryBase64(i.md5(r))}i.each(n,(function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=s(n[t]))})),f.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:n,body:r},(function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})}))},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,f.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 r=n.headers||{};t(null,{AccessControlAllowOrigin:r["access-control-allow-origin"],AccessControlAllowMethods:r["access-control-allow-methods"],AccessControlAllowHeaders:r["access-control-allow-headers"],AccessControlExposeHeaders:r["access-control-expose-headers"],AccessControlMaxAge:r["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})}))},putObjectCopy:function(e,t){var n=e.Headers;!n["Cache-Control"]&&n["cache-control"]&&(n["Cache-Control"]="");var r=e.CopySource||"",a=i.getSourceParams.call(this,r);if(a){var o=a.Bucket,s=a.Region,c=decodeURIComponent(a.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:o,region:s,prefix:c},{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 r=i.clone(n.CopyObjectResult||{});i.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var n=e.Objects||[],r=e.Quiet;n=i.isArray(n)?n:[n];var a=i.json2xml({Delete:{Object:n,Quiet:r||!1}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a));var s=i.map(n,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));f.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:a,action:"delete",headers:o},(function(e,n){if(e)return t(e);var r=n.DeleteResult||{},a=r.Deleted||[],o=r.Error||[];a=i.isArray(a)?a:[a],o=i.isArray(o)?o:[o];var s=i.clone(r);i.extend(s,{Error:o,Deleted:a,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var r=e.RestoreRequest||{},a=i.json2xml({RestoreRequest:r});n["Content-Type"]="application/xml",n["Content-MD5"]=i.binaryBase64(i.md5(a)),f.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||{},r=n.TagSet||n.Tags||e.Tags||[];r=i.clone(i.isArray(r)?r:[r]);var a=i.json2xml({Tagging:{TagSet:{Tag:r}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:a,action:"tagging",headers:o,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){f.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 r={Tags:[],statusCode:e.statusCode};e.headers&&(r.headers=e.headers),t(null,r)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=i.clone(i.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}}))},deleteObjectTagging:function(e,t){f.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){f.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||"",r=i.getSourceParams.call(this,n);if(r){var a=r.Bucket,o=r.Region,s=decodeURIComponent(r.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,region:o,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,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},(function(e,n){if(e)return t(e);var r=i.clone(n.CopyPartResult||{});i.extend(r,{statusCode:n.statusCode,headers:n.headers}),t(null,r)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var n=e.Headers,r=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"),f.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:r},(function(e,n){return e?(r&&r.parent&&r.parent.setParams({errorNode:"multipartInit"}),t(e)):(n=i.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,i.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)}))},multipartUpload:function(e,t){var n=this;i.getFileSize("multipartUpload",e,(function(){var r=e.tracker,a=n.options.UploadCheckContentMd5;a&&r&&r.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(a,e.Body,(function(o){o&&(e.Headers["Content-MD5"]=i.binaryBase64(o),a&&r&&r.setParams({md5EndTime:(new Date).getTime()})),r&&r.setParams({partNumber:e.PartNumber}),f.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:r},(function(e,n){if(e)return r&&r.parent&&r.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:i.attr(n.headers,"etag",{}),statusCode:n.statusCode,headers:n.headers})}))}))}))},multipartComplete:function(e,t){for(var n=this,r=e.UploadId,a=e.Parts,o=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(),r=new RegExp(t,"g");return e.replace(r,n)}(n.Authorization):"sign="+encodeURIComponent(n.Authorization)),n.SecurityToken&&(r+="&x-cos-security-token="+n.SecurityToken),n.ClientIP&&(r+="&clientIP="+n.ClientIP),n.ClientUA&&(r+="&clientUA="+n.ClientUA),n.Token&&(r+="&token="+n.Token),o&&(r+="&"+o),setTimeout((function(){t(null,{Url:r})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),o&&(s+="&"+o)):o&&(s+="?"+o),s},getAuth:function(e){return i.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(h,"postObject"),t.transferToTaskMethod(h,"putObject"),i.each(h,(function(t,n){e.prototype[n]=i.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 r=function(e,t){var r,i,a,o=[],s=function(e,t){var r=[];for(var i in e)e.hasOwnProperty(i)&&r.push(t?n(i).toLowerCase():i);return r.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(r=0;r-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:o,method:s,name:"file",header:a,filePath:i,formData:f,timeout:e.timeout,success:function(e){u(null,e)},fail:function(e){u(e.errMsg,e)}})).onProgressUpdate((function(e){c&&c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend,progress:e.progress/100})}))}else{var g=e.qs&&r(e.qs)||"";g&&(o+=(o.indexOf("?")>-1?"&":"?")+g),a["Content-Length"]&&delete a["Content-Length"];var v={url:o,method:s,header:a,dataType:"text",data:e.body,responseType:e.dataType||"text",timeout:e.timeout,redirect:"manual",success:function(e){u(null,e)},fail:function(e){u(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),n=wx.request(v)}return n}},function(e,t,n){"use strict";let r=n(24);e.exports=new r(n(25),n(26))},function(e,t,n){"use strict";function r(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),B(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;B(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}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 a(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){a(o,r,i,s,c,"next",e)}function c(e){a(o,r,i,s,c,"throw",e)}s(void 0)}))}}var s=n(7),c=n(28),l=n(6).EventProxy,u=n(0),p=n(4);function d(e,t){var n=e.TaskId,r=e.Bucket,i=e.Region,a=e.Key,o=e.StorageClass,p=this,d={},h=e.FileSize,g=e.SliceSize,v=Math.ceil(h/g),y=0,x=u.throttleOnProgress.call(p,h,e.onHashProgress),b=function(t,n){var r=t.length;if(0===r)return n(null,!0);if(r>v)return n(null,!1);if(r>1&&Math.max(t[0].Size,t[1].Size)!==g)return n(null,!1);!function i(a){if(a=c.length)k.emit("has_and_check_upload_id",t);else{var d=c[l];if(!u.isInArray(t,d))return s.removeUploadId(d),void o(l+1);s.using[d]?o(l+1):m.call(p,{Bucket:r,Region:i,Key:a,UploadId:d,tracker:e.tracker},(function(e,t){p._isRunningTask(n)&&(e?(s.removeUploadId(d),o(l+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(){f.call(p,{Bucket:r,Region:i,Key:a,tracker:e.tracker},(function(t,i){if(p._isRunningTask(n)){if(t)return k.emit("error",t);var c=u.filter(i.UploadList,(function(e){return e.Key===a&&(!o||e.StorageClass.toUpperCase()===o.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(c.length)k.emit("seek_local_avail_upload_id",c);else{var l,d=s.getFileId(e.FileStat,e.ChunkSize,r,a);d&&(l=s.getUploadIdList(d))&&u.each(l,(function(e){s.removeUploadId(e)})),k.emit("no_available_upload_id")}}}))})),k.emit("get_remote_upload_id_list")}function f(e,t){var n=this,r=[],i={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartList(i,(function(n,a){if(n)return t(n);r.push.apply(r,a.Upload||[]),"true"===a.IsTruncated?(i.KeyMarker=a.NextKeyMarker,i.UploadIdMarker=a.NextUploadIdMarker,e()):t(null,{UploadList:r})}))}()}function m(e,t){var n=this,r=[],i={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){n.multipartListPart(i,(function(n,a){if(n)return t(n);r.push.apply(r,a.Part||[]),"true"===a.IsTruncated?(i.PartNumberMarker=a.NextPartNumberMarker,e()):t(null,{PartList:r})}))}()}function h(e,t){var n=this,r=e.TaskId,i=e.Bucket,a=e.Region,o=e.Key,s=e.UploadData,l=e.FileSize,p=e.SliceSize,d=Math.min(e.AsyncLimit||n.options.ChunkParallelLimit||1,256),f=e.FilePath,m=Math.ceil(l/p),h=0,v=e.ServerSideEncryption,y=u.filter(s.PartList,(function(e){return e.Uploaded&&(h+=e.PartNumber>=m&&l%p||p),!e.Uploaded})),x=e.onProgress;c.eachLimit(y,d,(function(t,c){if(n._isRunningTask(r)){var u=t.PartNumber,d=Math.min(l,t.PartNumber*p)-(t.PartNumber-1)*p,m=0;g.call(n,{TaskId:r,Bucket:i,Region:a,Key:o,SliceSize:p,FileSize:l,PartNumber:u,ServerSideEncryption:v,FilePath:f,UploadData:s,onProgress:function(e){h+=e.loaded-m,m=e.loaded,x({loaded:h,total:l})},tracker:e.tracker},(function(e,i){n._isRunningTask(r)&&(e?h-=m:(h+=d-m,t.ETag=i.ETag),x({loaded:h,total:l}),c(e||null,i))}))}}),(function(e){if(n._isRunningTask(r))return e?t(e):void t(null,{UploadId:s.UploadId,SliceList:s.PartList})}))}function g(e,t){var n=this,r=e.TaskId,i=e.Bucket,a=e.Region,o=e.Key,s=e.FileSize,l=e.FilePath,p=1*e.PartNumber,d=e.SliceSize,f=e.ServerSideEncryption,m=e.UploadData,h=n.options.ChunkRetryTimes+1,g=e.Headers||{},v=d*(p-1),y=d,x=v+d;x>s&&(y=(x=s)-v);var b=["x-cos-traffic-limit","x-cos-mime-limit"],k={};u.each(g,(function(e,t){b.indexOf(t)>-1&&(k[t]=e)})),u.fileSlice(l,v,x,(function(s){var l=u.getFileMd5(s),d=l?u.binaryBase64(l):null,g=m.PartList[p-1];c.retry(h,(function(t){n._isRunningTask(r)&&n.multipartUpload({TaskId:r,Bucket:i,Region:a,Key:o,ContentLength:y,PartNumber:p,UploadId:m.UploadId,ServerSideEncryption:f,Body:s,Headers:k,onProgress:e.onProgress,ContentMD5:d,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,i){if(n._isRunningTask(r))return e?t(e):(g.Uploaded=!0,t(null,i))}))}),(function(e,i){if(n._isRunningTask(r))return t(e,i)}))}))}function v(e,t){var n=e.Bucket,r=e.Region,i=e.Key,a=e.UploadId,o=e.SliceList,s=this,l=this.options.ChunkRetryTimes+1,u=o.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));c.retry(l,(function(t){s.multipartComplete({Bucket:n,Region:r,Key:i,UploadId:a,Parts:u,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,n){t(e,n)}))}function y(e,t){var n=e.Bucket,r=e.Region,i=e.Key,a=e.AbortArray,o=e.AsyncLimit||1,s=this,l=0,u=new Array(a.length);c.eachLimit(a,o,(function(t,a){var o=l;if(i&&i!==t.Key)return u[o]={error:{KeyNotMatch:!0}},void a(null);var c=t.UploadId||t.UploadID;s.multipartAbort({Bucket:n,Region:r,Key:t.Key,Headers:e.Headers,UploadId:c},(function(e){var i={Bucket:n,Region:r,Key:t.Key,UploadId:c};u[o]={error:e,task:i},a(null)})),l++}),(function(e){if(e)return t(e);for(var n=[],r=[],i=0,a=u.length;io?"sliceUploadFile":g,s.push({api:v,params:t,callback:h}),a._addTasks(s);case 24:case"end":return e.stop()}}),e,this,[[3,9]])})))).apply(this,arguments)}function b(){return b=o(r().mark((function e(t,n){var a,s,c,l,d,f,m,h,g,v,y;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,s=void 0===t.SliceSize?a.options.SliceSize:t.SliceSize,c=0,l=0,d=u.throttleOnProgress.call(a,l,t.onProgress),f=t.files.length,m=t.onFileFinish,h=Array(f),g=function(e,t,r){d(null,!0),m&&m(e,t,r),h[r.Index]={options:r,error:e,data:t},--f<=0&&n&&n(null,{files:h})},v=[],y=function(){return t.files.map((function(e,t){return new Promise(function(){var n=o(r().mark((function n(o){var f,m,h,y,x,b,k,w,C,S;return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return f=0,n.prev=1,n.next=4,u.getFileSizeByPath(e.FilePath);case 4:f=n.sent,n.next=9;break;case 7:n.prev=7,n.t0=n.catch(1);case 9:m={Index:t,TaskId:""},c+=f,a.options.EnableTracker&&(h=a.options.UseAccelerate||"string"==typeof a.options.Domain&&a.options.Domain.includes("accelerate."),e.tracker=new p({Beacon:a.options.Beacon,bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:f,accelerate:h,deepTracker:a.options.DeepTracker,customId:a.options.CustomId,delay:a.options.TrackerDelay})),u.each(e,(function(e,t){"object"!==i(e)&&"function"!=typeof e&&(m[t]=e)})),y=e.onTaskReady,e.onTaskReady=function(e){m.TaskId=e,y&&y(e)},x=0,b=e.onProgress,e.onProgress=function(e){l=l-x+e.loaded,x=e.loaded,b&&b(e),d({loaded:l,total:c})},k=e.onFileFinish,w=function(t,n){e.tracker&&e.tracker.formatResult(t,n),k&&k(t,n),g&&g(t,n,m)},C="postObject"===a.options.SimpleUploadMethod?"postObject":"putObject",S=f>s?"sliceUploadFile":C,v.push({api:S,params:e,callback:w}),o(!0);case 24:case"end":return n.stop()}}),n,null,[[1,7]])})));return function(e){return n.apply(this,arguments)}}())}))},e.next=13,Promise.all(y());case 13:a._addTasks(v);case 14:case"end":return e.stop()}}),e,this)}))),b.apply(this,arguments)}function k(e,t){var n=e.TaskId,r=e.Bucket,i=e.Region,a=e.Key,o=e.CopySource,s=e.UploadId,l=1*e.PartNumber,u=e.CopySourceRange,p=this.options.ChunkRetryTimes+1,d=this;c.retry(p,(function(t){d.uploadPartCopy({TaskId:n,Bucket:r,Region:i,Key:a,CopySource:o,UploadId:s,PartNumber:l,CopySourceRange:u,onProgress:e.onProgress},(function(e,n){t(e||null,n)}))}),(function(e,n){return t(e,n)}))}var w={sliceUploadFile:function(e,t){var n=this;if(!u.canFileSlice())return e.SkipTask=!0,void("postObject"===n.options.SimpleUploadMethod?n.postObject(e,t):n.putObject(e,t));var r,i,a=new l,o=e.TaskId,c=e.Bucket,p=e.Region,f=e.Key,m=e.FilePath,g=e.ChunkSize||e.SliceSize||n.options.ChunkSize,y=e.AsyncLimit,x=e.StorageClass,b=e.ServerSideEncryption,k=e.onHashProgress,w=e.tracker;w&&w.setParams({chunkSize:g}),a.on("error",(function(r){if(n._isRunningTask(o)){var i={UploadId:e.UploadData.UploadId||"",err:r,error:r};return t(i)}})),a.on("upload_complete",(function(n){var r=u.extend({UploadId:e.UploadData.UploadId||""},n);t(null,r)})),a.on("upload_slice_complete",(function(e){v.call(n,{Bucket:c,Region:p,Key:f,UploadId:e.UploadId,SliceList:e.SliceList,tracker:w},(function(t,c){if(n._isRunningTask(o)){if(s.removeUsing(e.UploadId),t)return i(null,!0),a.emit("error",t);s.removeUploadId(e.UploadId),i({loaded:r,total:r},!0),a.emit("upload_complete",c)}}))})),a.on("get_upload_data_finish",(function(t){var l=s.getFileId(e.FileStat,e.ChunkSize,c,f);l&&s.saveUploadId(l,t.UploadId,n.options.UploadIdCacheLimit),s.setUsing(t.UploadId),i(null,!0),h.call(n,{TaskId:o,Bucket:c,Region:p,Key:f,FilePath:m,FileSize:r,SliceSize:g,AsyncLimit:y,ServerSideEncryption:b,UploadData:t,onProgress:i,tracker:w},(function(e,t){if(n._isRunningTask(o))return e?(i(null,!0),a.emit("error",e)):void a.emit("upload_slice_complete",t)}))})),a.on("get_file_size_finish",(function(){if(i=u.throttleOnProgress.call(n,r,e.onProgress),e.UploadData.UploadId)a.emit("get_upload_data_finish",e.UploadData);else{var t=u.extend({TaskId:o,Bucket:c,Region:p,Key:f,Headers:e.Headers,StorageClass:x,FilePath:m,FileSize:r,SliceSize:g,onHashProgress:k,tracker:w},e);t.FileSize=r,d.call(n,t,(function(t,r){if(n._isRunningTask(o)){if(t)return a.emit("error",t);e.UploadData.UploadId=r.UploadId,e.UploadData.PartList=r.PartList,a.emit("get_upload_data_finish",e.UploadData)}}))}})),r=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),u.each(e.Headers,(function(t,n){"content-length"===n.toLowerCase()&&delete e.Headers[n]})),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],i=1048576,a=0;a=S&&y%b||b),!e.Uploaded}));c.eachLimit(d,w,(function(t,n){var s=t.PartNumber,l=t.CopySourceRange,u=t.end-t.start,d=0;c.retry(C,(function(t){k.call(r,{Bucket:i,Region:a,Key:o,CopySource:p,UploadId:e.UploadId,PartNumber:s,CopySourceRange:l,onProgress:function(e){T+=e.loaded-d,d=e.loaded,x({loaded:T,total:y})}},t)}),(function(e,r){if(e)return n(e);x({loaded:T,total:y}),T+=u-d,t.ETag=r.ETag,n(e||null,r)}))}),(function(r){if(r)return s.removeUsing(e.UploadId),x(null,!0),t(r);n.emit("copy_slice_complete",e)}))})),n.on("get_chunk_size_finish",(function(){var c=function(){r.multipartInit({Bucket:i,Region:a,Key:o,Headers:A},(function(r,i){if(r)return t(r);e.UploadId=i.UploadId,n.emit("get_copy_data_finish",{UploadId:e.UploadId,PartList:e.PartList})}))},l=s.getCopyFileId(p,E,b,i,o),d=s.getUploadIdList(l);if(!l||!d)return c();!function t(l){if(l>=d.length)return c();var p=d[l];if(s.using[p])return t(l+1);m.call(r,{Bucket:i,Region:a,Key:o,UploadId:p},(function(r,i){if(r)s.removeUploadId(p),t(l+1);else{if(s.using[p])return t(l+1);var a={},o=0;u.each(i.PartList,(function(e){var t=parseInt(e.Size),n=o+t-1;a[e.PartNumber+"|"+o+"|"+n]=e.ETag,o+=t})),u.each(e.PartList,(function(e){var t=a[e.PartNumber+"|"+e.start+"|"+e.end];t&&(e.ETag=t,e.Uploaded=!0)})),n.emit("get_copy_data_finish",{UploadId:p,PartList:e.PartList})}}))}(0)})),n.on("get_file_size_finish",(function(){var i;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,i=0;i11&&(R[t]=e)})),n.emit("get_file_size_finish")}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(w,"sliceUploadFile"),u.each(w,(function(t,n){e.prototype[n]=u.apiWrapper(n,t)}))}},function(e,t){var n={eachLimit:function(e,t,n,r){if(r=r||function(){},!e.length||t<=0)return r();var i=0,a=0,o=0;!function s(){if(i>=e.length)return r();for(;o=e.length?r():s())}))}()},retry:function(e,t,n){e<1?n():function r(i){t((function(t,a){t&&i=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function a(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}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)}var o=r(9),s=r(12),c=r(13),l=r(18),p=r(19),u=p.btoa,d=wx.getFileSystemManager(),f=r(3);function m(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function h(e,t){var r=[];for(var n in e)e.hasOwnProperty(n)&&r.push(t?m(n).toLowerCase():n);return r.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var g=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],v=function(){},y=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&null!==e[r]&&(t[r]=e[r]);return t};function x(e){return C(e,(function(e){return"object"===i(e)&&null!==e?x(e):e}))}function b(e,t){return w(t,(function(r,n){e[n]=t[n]})),e}function k(e){return e instanceof Array}function w(e,t){for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)}function C(e,t){var r=k(e)?[]:{};for(var n in e)e.hasOwnProperty(n)&&(r[n]=t(e[n],n));return r}var S=function(e,t){if(t=b({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var r=t.Headers||{};if(t&&"object"===i(t)){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(r[e]=t[e])}();B.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-forbid-overwrite":"ForbidOverwrite","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,n){void 0!==t[e]&&(r[n]=t[e])})),t.Headers=y(r)}}return t},T=function(e){return new Promise((function(t,r){d.readFile({filePath:e,success:function(e){t(e.data)},fail:function(e){r((null==e?void 0:e.errMsg)||"")}})}))},E=function(){var e,t=(e=n().mark((function e(t,r,a){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("postObject"!==t){e.next=4;break}a(),e.next=21;break;case 4:if("putObject"!==t){e.next=20;break}if(void 0!==r.Body||!r.FilePath){e.next=17;break}return e.prev=6,e.next=9,T(r.FilePath);case 9:r.Body=e.sent,e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(6),r.Body=void 0,a({error:"readFile error, ".concat(e.t0)}),e.abrupt("return");case 17:void 0!==r.Body?(r.ContentLength=r.Body.byteLength,a(null,r.ContentLength)):a({error:"missing param Body"}),e.next=21;break;case 20:r.FilePath?d.stat({path:r.FilePath,success:function(e){var t=e.stats;r.FileStat=t,r.FileStat.FilePath=r.FilePath;var n=t.isDirectory()?0:t.size;r.ContentLength=n=n||0,a(null,n)},fail:function(e){a(e)}}):a({error:"missing param FilePath"});case 21:case"end":return e.stop()}}),e,null,[[6,12]])})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,c,"next",e)}function c(e){a(o,n,i,s,c,"throw",e)}s(void 0)}))});return function(e,r,n){return t.apply(this,arguments)}}(),R=function(e){return Date.now()+(e||0)},A=function(e,t){e=e.split("."),t=t.split(".");for(var r=Math.max(e.length,t.length);e.lengthi)return 1;if(a=0;!t&&e.platform;return function(){return!1,t}}(),B={noop:v,formatParams:S,apiWrapper:function(e,t){return function(r,n){var a,i=this;if("function"==typeof r&&(n=r,r={}),r=S(e,r),i.options.EnableReporter)if("sliceUploadFile"===r.calledBySdk||"sliceCopyFile"===r.calledBySdk)a=r.tracker&&r.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))a=null;else{var o=0;r.Body&&(o="string"==typeof r.Body?r.Body.length:r.Body.size||r.Body.byteLength||0);var s=i.options.UseAccelerate||"string"==typeof i.options.Domain&&i.options.Domain.includes("accelerate.");a=new f({Beacon:i.options.BeaconReporter,clsReporter:i.options.ClsReporter,bucket:r.Bucket,region:r.Region,apiName:e,realApi:e,accelerate:s,fileKey:r.Key,fileSize:o,deepTracker:i.options.DeepTracker,customId:i.options.CustomId,delay:i.options.TrackerDelay})}r.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.report(e,t),n&&n(c(e),c(t))},p=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var r=t.Bucket,n=t.Region,a=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!r)return"Bucket";if(!n)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e||"uploadFile"===e){if(!r)return"Bucket";if(!n)return"Region";if(!a)return"Key"}return!1}(e,r);if(t)return"missing param "+t;if(r.Region){if(r.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(r.Region))return"Region format error.";!i.options.CompatibilityMode&&-1===r.Region.indexOf("-")&&"yfb"!==r.Region&&"default"!==r.Region&&r.Region}if(r.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(r.Bucket))if(r.AppId)r.Bucket=r.Bucket+"-"+r.AppId;else{if(!i.options.AppId)return'Bucket should format as "test-1250000000".';r.Bucket=r.Bucket+"-"+i.options.AppId}r.AppId&&delete r.AppId}r.Key&&"/"===r.Key.substr(0,1)&&(r.Key=r.Key.substr(1))}}(),u=["getAuth","getObjectUrl"].includes(e);if(!u&&!n)return new Promise((function(e,a){if(n=function(t,r){t?a(t):e(r)},p)return l({error:p});t.call(i,r,l)}));if(p)return l({error:p});var d=t.call(i,r,l);return u?d:void 0}},xml2json:c,json2xml:l,md5:o,clearKey:y,fileSlice:function(e,t,r,n){e?d.readFile({filePath:e,position:t,length:r-t,success:function(e){n(e.data)},fail:function(){n(null)}}):n(null)},getBodyMd5:function(e,t,r){r=r||v,e&&t&&t instanceof ArrayBuffer?B.getFileMd5(t,(function(e,t){r(t)})):r()},getFileMd5:function(e,t){var r=o(e);return t&&t(r),r},binaryBase64:function(e){var t,r,n,a="";for(t=0,r=e.length/2;t-1||g.indexOf(n)>-1)&&(t[r]=e[r])}return t}(x(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"),r&&n){var u=Math.round(R(e.SystemClockOffset)/1e3)-1,d=u,f=e.Expires||e.expires;d+=void 0===f?900:1*f||0;var m=r,v=a||u+";"+d,y=a||u+";"+d,b=h(c,!0).join(";").toLowerCase(),k=h(o,!0).join(";").toLowerCase(),w=s.HmacSHA1(y,n).toString(),C=[i,t,B.obj2str(o,!0),B.obj2str(c,!0),""].join("\n"),S=["sha1",v,s.SHA1(C).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+m,"q-sign-time="+v,"q-key-time="+y,"q-header-list="+b,"q-url-param-list="+k,"q-signature="+s.HmacSHA1(S,w).toString()].join("&")}},compareVersion:A,canFileSlice:_,isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},error:function(e,t){var r=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===i(t)&&null!==t&&(b(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=x(r)),e},getSourceParams:function(e){var t=this.options.CopySourceParser;if(t)return t(e);var r=e.match(/^([^.]+-\d+)\.cos(v6|-cdc|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return r?{Bucket:r[1],Region:r[3],Key:r[7]}:null},encodeBase64:function(e,t){var r=p.encode(e);return t&&(r=r.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),r}};e.exports=B},function(e,t,r){"use strict";function n(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var a=n({HTML:"text/html",isHTML:function(e){return e===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===i.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 r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.find=function(e,t,r){if(void 0===r&&(r=Array.prototype),e&&"function"==typeof r.find)return r.find.call(e,t);for(var n=0;n=0))throw new _(R,new Error(e.tagName+"@"+r));for(var a=t.length-1;n"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function M(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(M(e,t))return!0}while(e=e.nextSibling)}function F(){this.ownerDocument=this}function z(e,t,r,n){e&&e._inc++,r.namespaceURI===i.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function H(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var a=t.firstChild,i=0;a;)n[i++]=a,a=a.nextSibling;n.length=i,delete n[n.length]}}}function K(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,H(e.ownerDocument,e),t}function G(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function V(e){return e&&e.nodeType===U.ELEMENT_NODE}function W(e){return e&&e.nodeType===U.TEXT_NODE}function X(e,t){var r=e.childNodes||[];if(a(r,V)||G(t))return!1;var n=a(r,G);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function Q(e,t){var r=e.childNodes||[];if(a(r,(function(e){return V(e)&&e!==t})))return!1;var n=a(r,G);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function $(e,t,r){if(!function(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}(e))throw new _(E,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new _(R,"child not in parent");if(!function(e){return e&&(V(e)||W(e)||G(e)||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE)}(t)||G(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new _(E,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function J(e,t,r){var n=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var o=i.filter(V);if(o.length>1||a(i,W))throw new _(E,"More than one element or text in fragment");if(1===o.length&&!X(e,r))throw new _(E,"Element in fragment can not be inserted before doctype")}if(V(t)&&!X(e,r))throw new _(E,"Only one element can be added and only after doctype");if(G(t)){if(a(n,G))throw new _(E,"Only one doctype is allowed");var s=a(n,V);if(r&&n.indexOf(s)1||a(i,W))throw new _(E,"More than one element or text in fragment");if(1===o.length&&!Q(e,r))throw new _(E,"Element in fragment can not be inserted before doctype")}if(V(t)&&!Q(e,r))throw new _(E,"Only one element can be added and only after doctype");if(G(t)){if(a(n,(function(e){return G(e)&&e!==r})))throw new _(E,"Only one doctype is allowed");var s=a(n,V);if(r&&n.indexOf(s)=0;C--){if(""===(S=a[C]).prefix&&S.namespace===e.namespaceURI){u=S.namespace;break}}if(u!==e.namespaceURI)for(C=a.length-1;C>=0;C--){var S;if((S=a[C]).namespace===e.namespaceURI){S.prefix&&(p=S.prefix+":"+l);break}}}t.push("<",p);for(var T=0;T"),r&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):ge(c,t,r,n,a.slice()),c=c.nextSibling;else for(;c;)ge(c,t,r,n,a.slice()),c=c.nextSibling;t.push("")}else t.push("/>");return;case b:case w:for(c=e.firstChild;c;)ge(c,t,r,n,a.slice()),c=c.nextSibling;return;case f:return he(t,e.name,e.value);case m:return t.push(e.data.replace(/[<&>]/g,q));case h:return t.push("");case x:return t.push("\x3c!--",e.data,"--\x3e");case k:var _=e.publicId,B=e.systemId;if(t.push("");else if(B&&"."!=B)t.push(" SYSTEM ",B,">");else{var N=e.internalSubset;N&&t.push(" [",N,"]"),t.push(">")}return;case y:return t.push("");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,r){var n;switch(t.nodeType){case d:(n=t.cloneNode(!1)).ownerDocument=e;case w:break;case f:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var a=t.firstChild;a;)n.appendChild(ve(e,a,r)),a=a.nextSibling;return n}function ye(e,t,r){var n=new t.constructor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var i=t[a];"object"!=typeof i&&i!=n[a]&&(n[a]=i)}switch(t.childNodes&&(n.childNodes=new B),n.ownerDocument=e,n.nodeType){case d:var o=t.attributes,s=n.attributes=new D,c=o.length;s._ownerElement=n;for(var l=0;l=0&&e0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&r[n]===e)return n;t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(u,U),l(u,U.prototype),F.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==w){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===d&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),K(this,e)},replaceChild:function(e,t){Z(this,e,t,Y),e.ownerDocument=this,t&&this.removeChild(t),V(e)&&(this.documentElement=e)},importNode:function(e,t){return ve(this,e,t)},getElementById:function(e){var t=null;return M(this.documentElement,(function(r){if(r.nodeType==d&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=c(e);return new N(this,(function(r){var n=[];return t.length>0&&M(r.documentElement,(function(a){if(a!==r&&a.nodeType===d){var i=a.getAttribute("class");if(i){var o=e===i;if(!o){var s=c(i);o=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}o&&n.push(a)}}var l})),n}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new B,(t.attributes=new D)._ownerElement=t,t},createDocumentFragment:function(){var e=new pe;return e.ownerDocument=this,e.childNodes=new B,e},createTextNode:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new ue;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new ee,n=t.split(":"),a=r.attributes=new D;return r.childNodes=new B,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,a._ownerElement=r,r},createAttributeNS:function(e,t){var r=new te,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},p(F,U),ee.prototype={nodeType:d,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 r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===w?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 r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new N(this,(function(t){var r=[];return M(t,(function(n){n===t||n.nodeType!=d||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new N(this,(function(r){var n=[];return M(r,(function(a){a===r||a.nodeType!==d||"*"!==e&&a.namespaceURI!==e||"*"!==t&&a.localName!=t||n.push(a)})),n}))}},F.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,F.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,p(ee,U),te.prototype.nodeType=f,p(te,U),re.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(T[E])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},p(re,U),ne.prototype={nodeName:"#text",nodeType:m,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},p(ne,re),ae.prototype={nodeName:"#comment",nodeType:x},p(ae,re),ie.prototype={nodeName:"#cdata-section",nodeType:h},p(ie,re),oe.prototype.nodeType=k,p(oe,U),se.prototype.nodeType=C,p(se,U),ce.prototype.nodeType=v,p(ce,U),le.prototype.nodeType=g,p(le,U),pe.prototype.nodeName="#document-fragment",pe.prototype.nodeType=w,p(pe,U),ue.prototype.nodeType=y,p(ue,U),de.prototype.serializeToString=function(e,t,r){return fe.call(e,t,r)},U.prototype.toString=fe;try{if(Object.defineProperty){function be(e){switch(e.nodeType){case d:case w:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(be(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(N.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return be(this)},set:function(e){switch(this.nodeType){case d:case w: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}}}),xe=function(e,t,r){e["$$"+t]=r}}}catch(ke){}t.DocumentType=oe,t.DOMException=_,t.DOMImplementation=j,t.Element=ee,t.Node=U,t.NodeList=B,t.XMLSerializer=de},function(e,t,r){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)}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",p=s.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof x?t:x,i=Object.create(a.prototype),s=new O(n||[]);return o(i,"_invoke",{value:A(e,r,s)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",h="suspendedYield",g="executing",v="completed",y={};function x(){}function b(){}function k(){}var w={};u(w,c,(function(){return this}));var C=Object.getPrototypeOf,S=C&&C(C(D([])));S&&S!==r&&i.call(S,c)&&(w=S);var T=k.prototype=x.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(a,o,s,c){var l=f(e[a],e,o);if("throw"!==l.type){var p=l.arg,u=p.value;return u&&"object"==n(u)&&i.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(u).then((function(e){p.value=e,s(p)}),(function(e){return r("throw",e,s,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(i,i):i()}})}function A(t,r,n){var a=m;return function(i,o){if(a===g)throw new Error("Generator is already running");if(a===v){if("throw"===i)throw o;return{value:e,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var c=_(s,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=g;var l=f(t,r,n);if("normal"===l.type){if(a=n.done?v:h,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(a=v,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(a,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function B(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 N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(B,this),this.reset(!0)}function D(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,c,"next",e)}function c(e){i(o,n,a,s,c,"throw",e)}s(void 0)}))}}function s(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){for(var r=0;r=0;a--)t===n[a]&&n.splice(a,1)},e.emit=function(e,t){for(var n=r(e).map((function(e){return e})),a=0;a=0;r--){var a=n[r][2];(!a||a+2592e3=0;i--){var o=n[i];(o[0]===e&&o[1]===t||e!==o[0]&&0===o[0].indexOf(a))&&n.splice(i,1)}n.unshift([e,t,Math.round(Date.now()/1e3)]),n.length>r&&n.splice(r),l()}},removeUploadId:function(e){c(),delete p.using[e];for(var t=n.length-1;t>=0;t--)n[t][1]===e&&n.splice(t,1);l()}};e.exports=p},function(e,t,r){var n=r(8);e.exports=n},function(e,t,r){"use strict";var n=r(0),a=r(5),i=r(20),o=r(21),s=r(27),c=r(4),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",AutoSwitchHost:!1,CopySourceParser:null,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},p=function(e){if(this.options=n.extend(n.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.EnableReporter=this.options.BeaconReporter||this.options.ClsReporter,this.options.AppId,this.options.SecretId&&this.options.SecretId.indexOf(" "),this.options.SecretKey&&this.options.SecretKey.indexOf(" "),this.options.ForcePathStyle)throw new Error("ForcePathStyle is not supported");a.init(this),i.init(this)};o.init(p,i),s.init(p,i),p.util={md5:n.md5,xml2json:n.xml2json,json2xml:n.json2xml,encodeBase64:n.encodeBase64},p.getAuthorization=n.getAuth,p.version=c.version,e.exports=p},function(e,t,r){(function(e){var 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)}!function(){"use strict";var a="input is invalid type",i="object"===("undefined"==typeof window?"undefined":n(window)),o=i?window:{};o.JS_MD5_NO_WINDOW&&(i=!1),!i&&"object"===("undefined"==typeof self?"undefined":n(self))&&(o=self);var s,c=!o.JS_MD5_NO_COMMON_JS&&"object"===n(e)&&e.exports,l=r(11),p=!o.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,u="0123456789abcdef".split(""),d=[128,32768,8388608,-2147483648],f=[0,8,16,24],m=["hex","array","digest","buffer","arrayBuffer","base64"],h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),g=[];if(p){var v=new ArrayBuffer(68);s=new Uint8Array(v),g=new Uint32Array(v)}!o.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!p||!o.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===n(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e){return function(t){return new x(!0).update(t)[e]()}};function x(e){if(e)g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g,this.buffer8=s;else if(p){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}x.prototype.update=function(e){if(!this.finalized){var t,r=n(e);if("string"!==r){if("object"!==r)throw a;if(null===e)throw a;if(!p||e.constructor!==ArrayBuffer&&"ArrayBuffer"!==e.constructor.name){if(!(Array.isArray(e)||p&&ArrayBuffer.isView(e)))throw a}else e=new Uint8Array(e);t=!0}for(var i,o,s=0,c=e.length,l=this.blocks,u=this.buffer8;s>2]|=e[s]<>6,u[o++]=128|63&i):i<55296||i>=57344?(u[o++]=224|i>>12,u[o++]=128|i>>6&63,u[o++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++s)),u[o++]=240|i>>18,u[o++]=128|i>>12&63,u[o++]=128|i>>6&63,u[o++]=128|63&i);else for(o=this.start;s>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(l[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}},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=d[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()}},x.prototype.hash=function(){var e,t,r,n,a,i,o=this.blocks;this.first?t=((t=((e=((e=o[0]-680876937)<<7|e>>>25)-271733879<<0)^(r=((r=(-271733879^(n=((n=(-1732584194^2004318071&e)+o[1]-117830708)<<12|n>>>20)+e<<0)&(-271733879^e))+o[2]-1126478375)<<17|r>>>15)+n<<0)&(n^e))+o[3]-1316259209)<<22|t>>>10)+r<<0:(e=this.h0,t=this.h1,r=this.h2,t=((t+=((e=((e+=((n=this.h3)^t&(r^n))+o[0]-680876936)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+o[1]-389564586)<<12|n>>>20)+e<<0)&(e^t))+o[2]+606105819)<<17|r>>>15)+n<<0)&(n^e))+o[3]-1044525330)<<22|t>>>10)+r<<0),t=((t+=((e=((e+=(n^t&(r^n))+o[4]-176418897)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+o[5]+1200080426)<<12|n>>>20)+e<<0)&(e^t))+o[6]-1473231341)<<17|r>>>15)+n<<0)&(n^e))+o[7]-45705983)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(n^t&(r^n))+o[8]+1770035416)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+o[9]-1958414417)<<12|n>>>20)+e<<0)&(e^t))+o[10]-42063)<<17|r>>>15)+n<<0)&(n^e))+o[11]-1990404162)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(n^t&(r^n))+o[12]+1804603682)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+o[13]-40341101)<<12|n>>>20)+e<<0)&(e^t))+o[14]-1502002290)<<17|r>>>15)+n<<0)&(n^e))+o[15]+1236535329)<<22|t>>>10)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+o[1]-165796510)<<5|e>>>27)+t<<0)^t))+o[6]-1069501632)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+o[11]+643717713)<<14|r>>>18)+n<<0)^n))+o[0]-373897302)<<20|t>>>12)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+o[5]-701558691)<<5|e>>>27)+t<<0)^t))+o[10]+38016083)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+o[15]-660478335)<<14|r>>>18)+n<<0)^n))+o[4]-405537848)<<20|t>>>12)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+o[9]+568446438)<<5|e>>>27)+t<<0)^t))+o[14]-1019803690)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+o[3]-187363961)<<14|r>>>18)+n<<0)^n))+o[8]+1163531501)<<20|t>>>12)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+o[13]-1444681467)<<5|e>>>27)+t<<0)^t))+o[2]-51403784)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+o[7]+1735328473)<<14|r>>>18)+n<<0)^n))+o[12]-1926607734)<<20|t>>>12)+r<<0,t=((t+=((i=(n=((n+=((a=t^r)^(e=((e+=(a^n)+o[5]-378558)<<4|e>>>28)+t<<0))+o[8]-2022574463)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+o[11]+1839030562)<<16|r>>>16)+n<<0))+o[14]-35309556)<<23|t>>>9)+r<<0,t=((t+=((i=(n=((n+=((a=t^r)^(e=((e+=(a^n)+o[1]-1530992060)<<4|e>>>28)+t<<0))+o[4]+1272893353)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+o[7]-155497632)<<16|r>>>16)+n<<0))+o[10]-1094730640)<<23|t>>>9)+r<<0,t=((t+=((i=(n=((n+=((a=t^r)^(e=((e+=(a^n)+o[13]+681279174)<<4|e>>>28)+t<<0))+o[0]-358537222)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+o[3]-722521979)<<16|r>>>16)+n<<0))+o[6]+76029189)<<23|t>>>9)+r<<0,t=((t+=((i=(n=((n+=((a=t^r)^(e=((e+=(a^n)+o[9]-640364487)<<4|e>>>28)+t<<0))+o[12]-421815835)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+o[15]+530742520)<<16|r>>>16)+n<<0))+o[2]-995338651)<<23|t>>>9)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+o[0]-198630844)<<6|e>>>26)+t<<0)|~r))+o[7]+1126891415)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+o[14]-1416354905)<<15|r>>>17)+n<<0)|~e))+o[5]-57434055)<<21|t>>>11)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+o[12]+1700485571)<<6|e>>>26)+t<<0)|~r))+o[3]-1894986606)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+o[10]-1051523)<<15|r>>>17)+n<<0)|~e))+o[1]-2054922799)<<21|t>>>11)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+o[8]+1873313359)<<6|e>>>26)+t<<0)|~r))+o[15]-30611744)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+o[6]-1560198380)<<15|r>>>17)+n<<0)|~e))+o[13]+1309151649)<<21|t>>>11)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+o[4]-145523070)<<6|e>>>26)+t<<0)|~r))+o[11]-1120210379)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+o[2]+718787259)<<15|r>>>17)+n<<0)|~e))+o[9]-343485551)<<21|t>>>11)+r<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=r-1732584194<<0,this.h3=n+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+n<<0)},x.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3;return u[e>>4&15]+u[15&e]+u[e>>12&15]+u[e>>8&15]+u[e>>20&15]+u[e>>16&15]+u[e>>28&15]+u[e>>24&15]+u[t>>4&15]+u[15&t]+u[t>>12&15]+u[t>>8&15]+u[t>>20&15]+u[t>>16&15]+u[t>>28&15]+u[t>>24&15]+u[r>>4&15]+u[15&r]+u[r>>12&15]+u[r>>8&15]+u[r>>20&15]+u[r>>16&15]+u[r>>28&15]+u[r>>24&15]+u[n>>4&15]+u[15&n]+u[n>>12&15]+u[n>>8&15]+u[n>>20&15]+u[n>>16&15]+u[n>>28&15]+u[n>>24&15]},x.prototype.toString=x.prototype.hex,x.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=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&r,r>>8&255,r>>16&255,r>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255]},x.prototype.array=x.prototype.digest,x.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},x.prototype.buffer=x.prototype.arrayBuffer,x.prototype.base64=function(){for(var e,t,r,n="",a=this.array(),i=0;i<15;)e=a[i++],t=a[i++],r=a[i++],n+=h[e>>>2]+h[63&(e<<4|t>>>4)]+h[63&(t<<2|r>>>6)]+h[63&r];return e=a[i],n+=h[e>>>2]+h[e<<4&63]+"=="};var b=function(){var e=y("hex");e.getCtx=e.create=function(){return new x},e.update=function(t){return e.create().update(t)};for(var t=0;t>>2]|=(r[a>>>2]>>>24-a%4*8&255)<<24-(n+a)%4*8;else if(65535>>2]=r[a>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;n>>2]>>>24-n%4*8&255;r.push((a>>>4).toString(16)),r.push((15&a).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n>>2]>>>24-n%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,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=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.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 r=this._data,n=r.words,a=r.sigBytes,i=this.blockSize,s=a/(4*i);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,a=e.min(4*t,a),t){for(var c=0;cl;l++){if(16>l)i[l]=0|e[t+l];else{var p=i[l-3]^i[l-8]^i[l-14]^i[l-16];i[l]=p<<1|p>>>31}p=(n<<5|n>>>27)+c+i[l],p=20>l?p+(1518500249+(a&o|~a&s)):40>l?p+(1859775393+(a^o^s)):60>l?p+((a&o|a&s|o&s)-1894007588):p+((a^o^s)-899497514),c=s,s=o,o=a<<30|a>>>2,a=n,n=p}r[0]=r[0]+n|0,r[1]=r[1]+a|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(o),r.HmacSHA1=a._createHmacHelper(o),function(){var e=l,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,r){e=this._hasher=new e.init,"string"==typeof r&&(r=t.parse(r));var n=e.blockSize,a=4*n;r.sigBytes>a&&(r=e.finalize(r)),r.clamp();for(var i=this._oKey=r.clone(),o=this._iKey=r.clone(),s=i.words,c=o.words,l=0;l>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;a.length%4;)a.push(c);return a.join("")},parse:function(e){var t=e.length,r=this._map,n=r.charAt(64);if(n){var a=e.indexOf(n);-1!=a&&(t=a)}for(var i=[],o=0,s=0;s>>6-s%4*2;i[o>>>2]|=(l|p)<<24-o%4*8,o++}return c.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.exports=l},function(e,t,r){var n=r(14).DOMParser,a=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={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function r(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function a(e){return"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):e}function i(e,t,r,n){for(var a=0;a0&&i(e.arrayAccessFormPaths,t,r,n)&&(t[r]=[t[r]])}function s(e){var t=e.split(/[-T:+Z]/g),r=new Date(t[0],t[1]-1,t[2]),n=t[5].split(".");if(r.setHours(t[3],t[4],n[0]),n.length>1&&r.setMilliseconds(n[1]),t[6]&&t[7]){var a=60*t[6]+Number(t[7]);a=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*a:a),r.setMinutes(r.getMinutes()-a-r.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function c(r,n,a,o){return!(n==t.ELEMENT_NODE&&e.xmlElementsFilter.length>0)||i(e.xmlElementsFilter,r,a,o)}function l(n,a){if(n.nodeType==t.DOCUMENT_NODE){for(var p=new Object,u=n.childNodes,d=0;d0){var a=n.split(".#")[0];return i(e.datetimeAccessFormPaths,t,r,a)?s(t):t}return t}(p.__text,m,a+"."+m)),null!=p["#cdata-section"]&&(p.__cdata=p["#cdata-section"],delete p["#cdata-section"],"property"==e.arrayAccessForm&&delete p["#cdata-section_asArray"]),0==p.__cnt&&"text"==e.emptyNodeForm?p="":1==p.__cnt&&null!=p.__text?p=p.__text:1!=p.__cnt||null==p.__cdata||e.keepCData?p.__cnt>1&&null!=p.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==p.__text||""==p.__text.trim())&&delete p.__text:p=p.__cdata,delete p.__cnt,!e.enableToStringFunc||null==p.__text&&null==p.__cdata||(p.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),p}if(n.nodeType==t.TEXT_NODE||n.nodeType==t.CDATA_SECTION_NODE)return n.nodeValue}function p(t,r,n,i){var o="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+r;if(null!=n)for(var s=0;s":">"}function u(e,t){return""}function d(t,r){return"property"==e.arrayAccessForm&&(n=r.toString(),a="_asArray",-1!==n.indexOf(a,n.length-a.length))||0==r.toString().indexOf(e.attributePrefix)||0==r.toString().indexOf("__")||t[r]instanceof Function;var n,a}function f(e){var t=0;if(e instanceof Object)for(var r in e)d(e,r)||t++;return t}function m(t,r,n){return 0==e.jsonPropertiesFilter.length||""==n||i(e.jsonPropertiesFilter,t,r,n)}function h(t){var r=[];if(t instanceof Object)for(var n in t)-1==n.toString().indexOf("__")&&0==n.toString().indexOf(e.attributePrefix)&&r.push(n);return r}function g(t){var r="";return t instanceof Object?r+=function(t){var r="";return null!=t.__cdata&&(r+=""),null!=t.__text&&(e.escapeMode?r+=a(t.__text):r+=t.__text),r}(t):null!=t&&(e.escapeMode?r+=a(t):r+=t),r}function v(e,t){return""===e?t:e+"."+t}function y(e,t,r,n){var a="";if(0==e.length)a+=p(e,t,r,!0);else for(var i=0;i0)for(var n in e)if(!d(e,n)&&(""==t||m(e,n,v(t,n)))){var a=e[n],i=h(a);if(null==a||null==a)r+=p(a,n,i,!0);else if(a instanceof Object)if(a instanceof Array)r+=y(a,n,i,t);else if(a instanceof Date)r+=p(a,n,i,!1),r+=a.toISOString(),r+=u(a,n);else{f(a)>0||null!=a.__text||null!=a.__cdata?(r+=p(a,n,i,!1),r+=x(a,v(t,n)),r+=u(a,n)):r+=p(a,n,i,!0)}else r+=p(a,n,i,!1),r+=g(a),r+=u(a,n)}return r+=g(e)}this.parseXmlString=function(e){var t;if(void 0===e)return null;if(n){var r=new n,a=null;try{a=r.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){a=null}try{t=r.parseFromString(e,"text/xml"),null!=a&&t.getElementsByTagNameNS(a,"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?s(e):e},this.xml2json=function(e){return l(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return x(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 n).parseFromString(e,"text/xml"),r=(new a).xml2json(t);return r.html&&r.getElementsByTagName("parsererror").length?null:r}},function(e,t,r){var n=r(2);t.DOMImplementation=n.DOMImplementation,t.XMLSerializer=n.XMLSerializer,t.DOMParser=r(15).DOMParser},function(e,t,r){var n=r(1),a=r(2),i=r(16),o=r(17),s=a.DOMImplementation,c=n.NAMESPACE,l=o.ParseError,p=o.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,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function g(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}d.prototype.parseFromString=function(e,t){var r=this.options,n=new p,a=r.domBuilder||new f,o=r.errorHandler,s=r.locator,l=r.xmlns||{},d=/\/x?html?$/.test(t),m=d?i.HTML_ENTITIES:i.XML_ENTITIES;s&&a.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof f)return t;e=t}var n={},a=e instanceof Function;function i(t){var i=e[t];!i&&a&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+function(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(o,a,s),n.domBuilder=r.domBuilder||a,d&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var h=r.normalizeLineEndings||u;return e&&"string"==typeof e?n.parse(h(e),l,m):n.errorHandler.error("invalid doc source"),a.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,r,n){var a=this.doc,i=a.createElementNS(e,r||t),o=n.length;g(this,i),this.currentElement=i,this.locator&&m(this.locator,i);for(var s=0;s",lt:"<",quot:'"'}),t.HTML_ENTITIES=n({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},function(e,t,r){var n=r(1).NAMESPACE,a=/[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]/,i=new RegExp("[\\-\\.0-9"+a.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+a.source+i.source+"*(?::"+a.source+i.source+"*)?$"),s=0,c=1,l=2,p=3,u=4,d=5,f=6,m=7;function h(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,h)}function g(){}function v(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function y(e,t,r,a,i,o){function h(e,t,n){r.attributeNames.hasOwnProperty(e)&&o.fatalError("Attribute "+e+" redefined"),r.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,i),n)}for(var g,v=++t,y=s;;){var x=e.charAt(v);switch(x){case"=":if(y===c)g=e.slice(t,v),y=p;else{if(y!==l)throw new Error("attribute equal must after attrName");y=p}break;case"'":case'"':if(y===p||y===c){if(y===c&&(o.warning('attribute value must after "="'),g=e.slice(t,v)),t=v+1,!((v=e.indexOf(x,t))>0))throw new Error("attribute value no end '"+x+"' match");h(g,b=e.slice(t,v),t-1),y=d}else{if(y!=u)throw new Error('attribute value must after "="');h(g,b=e.slice(t,v),t),o.warning('attribute "'+g+'" missed start quot('+x+")!!"),t=v+1,y=d}break;case"/":switch(y){case s:r.setTagName(e.slice(t,v));case d:case f:case m:y=m,r.closed=!0;case u:case c:break;case l:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),y==s&&r.setTagName(e.slice(t,v)),v;case">":switch(y){case s:r.setTagName(e.slice(t,v));case d:case f:case m:break;case u:case c:"/"===(b=e.slice(t,v)).slice(-1)&&(r.closed=!0,b=b.slice(0,-1));case l:y===l&&(b=g),y==u?(o.warning('attribute "'+b+'" missed quot(")!'),h(g,b,t)):(n.isHTML(a[""])&&b.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+b+'" missed value!! "'+b+'" instead!!'),h(b,b,t));break;case p:throw new Error("attribute value missed!!")}return v;case"€":x=" ";default:if(x<=" ")switch(y){case s:r.setTagName(e.slice(t,v)),y=f;break;case c:g=e.slice(t,v),y=l;break;case u:var b=e.slice(t,v);o.warning('attribute "'+b+'" missed quot(")!!'),h(g,b,t);case d:y=f}else switch(y){case l:r.tagName;n.isHTML(a[""])&&g.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),h(g,g,t),t=v,y=c;break;case d:o.warning('attribute space is required"'+g+'"!!');case f:y=c,t=v;break;case p:y=u,t=v;break;case m:throw new Error("elements closed character '/' and '>' must be connected to")}}v++}}function x(e,t,r){for(var a=e.tagName,i=null,o=e.length;o--;){var s=e[o],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==i&&(i={},w(r,r={})),r[d]=i[d]=l,s.uri=n.XMLNS,t.startPrefixMapping(d,l))}for(o=e.length;o--;){(p=(s=e[o]).prefix)&&("xml"===p&&(s.uri=n.XML),"xmlns"!==p&&(s.uri=r[p||""]))}var f;(f=a.indexOf(":"))>0?(p=e.prefix=a.slice(0,f),u=e.localName=a.slice(f+1)):(p=null,u=e.localName=a);var m=e.uri=r[p||""];if(t.startElement(m,u,a,e),!e.closed)return e.currentNSMap=r,e.localNSMap=i,!0;if(t.endElement(m,u,a),i)for(p in i)Object.prototype.hasOwnProperty.call(i,p)&&t.endPrefixMapping(p)}function b(e,t,r,n,a){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("",t),o=e.substring(t+1,i);if(/[&<]/.test(o))return/^script$/i.test(r)?(a.characters(o,0,o.length),i):(o=o.replace(/&#?\w+;/g,n),a.characters(o,0,o.length),i)}return t+1}function k(e,t,r,n){var a=n[r];return null==a&&((a=e.lastIndexOf(""))t?(r.comment(e,t+4,a-t-4),a+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,a-t-9),r.endCDATA(),a+3}var i=function(e,t){var r,n=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;a.lastIndex=t,a.exec(e);for(;r=a.exec(e);)if(n.push(r),r[1])return n}(e,t),o=i.length;if(o>1&&/!doctype/i.test(i[0][0])){var s=i[1][0],c=!1,l=!1;o>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],l=o>4&&i[4][0]):/^system$/i.test(i[2][0])&&(l=i[3][0]));var p=i[o-1];return r.startDTD(s,c,l),r.endDTD(),p.index+p[0].length}return-1}function S(e,t,r){var n=e.indexOf("?>",t);if(n){var a=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(a){a[0].length;return r.processingInstruction(a[1],a[2]),n+2}return-1}return-1}function T(){this.attributeNames={}}h.prototype=new Error,h.prototype.name=h.name,g.prototype={parse:function(e,t,r){var a=this.domBuilder;a.startDocument(),w(t,t={}),function(e,t,r,a,i){function o(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(r,t)?r[t]:"#"===t.charAt(0)?o(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function c(t){if(t>w){var r=e.substring(w,t).replace(/&#?\w+;/g,s);f&&l(w),a.characters(r,0,t-w),w=t}}function l(t,r){for(;t>=u&&(r=d.exec(e));)p=r.index,u=p+r[0].length,f.lineNumber++;f.columnNumber=t-p+1}var p=0,u=0,d=/.*(?:\r\n?|\n)|.*$/g,f=a.locator,m=[{currentNSMap:t}],g={},w=0;for(;;){try{var E=e.indexOf("<",w);if(E<0){if(!e.substr(w).match(/^\s*$/)){var R=a.doc,A=R.createTextNode(e.substr(w));R.appendChild(A),a.currentElement=A}return}switch(E>w&&c(E),e.charAt(E+1)){case"/":var _=e.indexOf(">",E+3),B=e.substring(E+2,_).replace(/[ \t\n\r]+$/g,""),N=m.pop();_<0?(B=e.substring(E+2).replace(/[\s<].*/,""),i.error("end tag name: "+B+" is not complete:"+N.tagName),_=E+1+B.length):B.match(/\sw?w=_:c(Math.max(E,w)+1)}}(e,t,r,a,this.errorHandler),a.endDocument()}},T.prototype={setTagName:function(e){if(!o.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!o.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},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=g,t.ParseError=h},function(e,t){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)}var n="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�",a=new RegExp("^([^"+n+"])|^((x|X)(m|M)(l|L))|([^"+n+"-.0-9·̀-ͯ‿⁀])","g"),i=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,o=function(e){var t=[];if(e instanceof Object)for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t},s=function(e,t){var n=function(e,r,n,i,o){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(i).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(a,"_"));var l=[c,"<",e,n||""];return r&&r.length>0?(l.push(">"),l.push(r),o&&l.push(c),l.push("")):l.push("/>"),l.join("")};return function e(a,s,c){var l=r(a);switch((Array.isArray?Array.isArray(a):a instanceof Array)?l="array":a instanceof Date&&(l="date"),l){case"array":var p=[];return a.map((function(t){p.push(e(t,1,c+1))})),t.prettyPrint&&p.push("\n"),p.join("");case"date":return a.toJSON?a.toJSON():a+"";case"object":var u=[];for(var d in a)if(a.hasOwnProperty(d))if(a[d]instanceof Array)for(var f in a[d])a[d].hasOwnProperty(f)&&u.push(n(d,e(a[d][f],0,c+1),null,c+1,o(a[d][f]).length));else u.push(n(d,e(a[d],0,c+1),null,c+1));return t.prettyPrint&&u.length>0&&u.push("\n"),u.join("");case"function":return a();default:return t.escape?(""+a).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(i,""):""+a}}(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 n="",a="";return t&&("object"==r(t)?(t.xmlHeader&&(n=c(!!t.xmlHeader.standalone)),void 0!==t.docType&&(a="")):n=c()),[n,(t=t||{}).prettyPrint&&a?"\n":"",a,s(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},function(e,t){var r=function(e){var t=(e=e||{}).Base64,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=function(e){for(var t={},r=0,n=e.length;r>>6)+a(128|63&t):a(224|t>>>12&15)+a(128|t>>>6&63)+a(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return a(240|t>>>18&7)+a(128|t>>>12&63)+a(128|t>>>6&63)+a(128|63&t)},o=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(o,i)},c=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[r.charAt(n>>>18),r.charAt(n>>>12&63),t>=2?"=":r.charAt(n>>>6&63),t>=1?"=":r.charAt(63&n)].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 a(55296+(t>>>10))+a(56320+(1023&t));case 3:return a((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return a((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},m=function(e){return e.replace(d,f)},h=function(e){var t=e.length,r=t%4,i=(t>0?n[e.charAt(0)]<<18:0)|(t>1?n[e.charAt(1)]<<12:0)|(t>2?n[e.charAt(2)]<<6:0)|(t>3?n[e.charAt(3)]:0),o=[a(i>>>16),a(i>>>8&255),a(255&i)];return o.length-=[0,0,2,1][r],o.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 r=e.Base64;return e.Base64=t,r}}}();e.exports=r},function(e,t,r){var n=r(6),a=r(0),i={};e.exports.transferToTaskMethod=function(e,t){i[t]=e[t],e[t]=function(e,r){e.SkipTask?i[t].call(this,e,r):this._addTask(t,e,r)}},e.exports.init=function(e){var t,r,o=[],s={},c=0,l=0,p=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),t},u=(r=function(){t=0,e.emit("task-list-update",{list:a.map(o,p)}),e.emit("list-update",{list:a.map(o,p)})},function(){t||(t=setTimeout(r))}),d=function(){if(!(o.length<=e.options.UploadQueueSize)){for(var t=0;te.options.UploadQueueSize;){var r="waiting"===o[t].state||"checking"===o[t].state||"uploading"===o[t].state;o[t]&&r?t++:(s[o[t].id]&&delete s[o[t].id],o.splice(t,1),l--)}u()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;o[l]&&"waiting"!==o[l].state;)l++;if(!(l>=o.length)){var r=o[l];l++,c++,r.state="checking",r.params.onTaskStart&&r.params.onTaskStart(p(r)),!r.params.UploadData&&(r.params.UploadData={});var n=a.formatParams(r.api,r.params);i[r.api].call(e,n,(function(n,a){e._isRunningTask(r.id)&&("checking"!==r.state&&"uploading"!==r.state||(r.state=n?"error":"success",n&&(r.error=n),c--,u(),t(),r.callback&&r.callback(n,a),"success"===r.state&&(r.params&&(delete r.params.UploadData,delete r.params.Body,delete r.params),delete r.callback)),d())})),u(),setTimeout(t)}}},m=function(t,r){var a=s[t];if(a){var i=a&&"waiting"===a.state,o=a&&("checking"===a.state||"uploading"===a.state);if("canceled"===r&&"canceled"!==a.state||"paused"===r&&i||"paused"===r&&o){if("paused"===r&&a.params.Body&&"function"==typeof a.params.Body.pipe)return;a.state=r,e.emit("inner-kill-task",{TaskId:t,toState:r});try{var l=a&&a.params&&a.params.UploadData.UploadId}catch(e){}"canceled"===r&&l&&n.removeUsing(l),u(),o&&(c--,f()),"canceled"===r&&(a.params&&(delete a.params.UploadData,delete a.params.Body,delete a.params),delete a.callback)}d()}};e._addTasks=function(t){a.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),u()},e._addTask=function(t,r,n,i){var c="postObject"===e.options.SimpleUploadMethod?"postObject":"putObject";"sliceUploadFile"!==t||a.canFileSlice()||(t=c),r=a.formatParams(t,r);var l=a.uuid();r.TaskId=l,r.onTaskReady&&r.onTaskReady(l);var p={params:r,callback:n,api:t,index:o.length,id:l,Bucket:r.Bucket,Region:r.Region,Key:r.Key,FilePath:r.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null},m=r.onHashProgress;r.onHashProgress=function(t){e._isRunningTask(p.id)&&(p.hashPercent=t.percent,m&&m(t),u())};var h=r.onProgress;return r.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())},a.getFileSize(t,r,(function(e,t){e?n(e):(s[l]=p,o.push(p),p.size=t,!i&&u(),f(),d())})),l},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return a.map(o,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||(i="{Bucket}."+i)),i=(i=i.replace(/\{\{AppId\}\}/gi,n).replace(/\{\{Bucket\}\}/gi,r).replace(/\{\{Region\}\}/gi,o).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,n).replace(/\{BucketName\}/gi,r).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,o).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(i)||(i="https://"+i),"/"===i.slice(-1)&&(i=i.slice(0,-1));var c=i;return e.ForcePathStyle&&(c+="/"+t),c+="/",s&&(c+=a.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;return(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")};function p(e,t){var r=a.clone(e.Headers),n="";a.each(r,(function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete r[t],"host"===t.toLowerCase()&&(n=e)}));var i=!1!==e.ForceSignHost;!n&&e.SignHost&&i&&(r.Host=e.SignHost);var o=!1,s=function(e,r){o||(o=!0,r&&r.XCosSecurityToken&&!r.SecurityToken&&((r=a.clone(r)).SecurityToken=r.XCosSecurityToken,delete r.XCosSecurityToken),t&&t(e,r))},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=a.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 r=Math.round(a.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&r=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 n={Authorization:a.getAuth({SecretId:f.TmpSecretId,SecretKey:f.TmpSecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:r,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:i}),SecurityToken:f.SecurityToken||f.XCosSecurityToken||"",Token:f.Token||"",ClientIP:f.ClientIP||"",ClientUA:f.ClientUA||"",SignFrom:"client"};s(null,n)},b=function(e){if(e.Authorization){var t=!1,r=e.Authorization;if(r)if(r.indexOf(" ")>-1)t=!1;else if(r.indexOf("q-sign-algorithm=")>-1&&r.indexOf("q-ak=")>-1&&r.indexOf("q-sign-time=")>-1&&r.indexOf("q-key-time=")>-1&&r.indexOf("q-url-param-list=")>-1)t=!0;else try{(r=atob(r)).indexOf("a=")>-1&&r.indexOf("k=")>-1&&r.indexOf("t=")>-1&&r.indexOf("r=")>-1&&r.indexOf("b=")>-1&&(t=!0)}catch(e){}if(!t)return a.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return a.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return a.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return a.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return a.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return a.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return a.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(f.ExpiredTime&&f.ExpiredTime-a.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:r,Scope:m,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:i},(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:a.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:d,Query:e.Query,Headers:r,Expires:e.Expires,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:i}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken,SignFrom:"client"},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,r=!1,n=!1,i=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var o=e.error.Code,s=e.error.Message;("RequestTimeTooSkewed"===o||"AccessDenied"===o&&"Request has expired"===s)&&(n=!0)}catch(e){}if(e){if(n&&i){var c=Date.parse(i);this.options.CorrectClockSkew&&Math.abs(a.getSkewTime(this.options.SystemClockOffset)-c)>=3e4&&(this.options.SystemClockOffset=c-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);if(e.statusCode){var l=Math.floor(e.statusCode/100),p=(null==e?void 0:e.headers)&&(null==e?void 0:e.headers["x-cos-request-id"]);[3,4,5].includes(l)&&!p&&(t=this.options.AutoSwitchHost,r=!0)}else t=this.options.AutoSwitchHost,r=!0}return{canRetry:t,networkError:r}}function d(e){var t=e.requestUrl,r=e.clientCalcSign,n=e.networkError;if(!this.options.AutoSwitchHost)return!1;if(!t)return!1;if(!r)return!1;if(!n)return!1;return/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/.test(t)&&!/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/.test(t)}function f(e,t){var r=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=a.clearKey(e.qs),e.headers&&(e.headers=a.clearKey(e.headers)),e.qs&&(e.qs=a.clearKey(e.qs));var n=a.clone(e.qs);e.action&&(n[e.action]="");var i=e.url||e.Url,o=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:i}),s=e.tracker;!function a(i){var c=r.options.SystemClockOffset;e.SwitchHost&&(o=o.replace(/myqcloud.com/,"tencentcos.cn")),s&&s.setParams({signStartTime:(new Date).getTime(),httpRetryTimes:i-1}),p.call(r,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:n,Headers:e.headers,SignHost:o,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:r.options.ForceSignHost},(function(n,o){n?t(n):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=o,m.call(r,e,(function(n,l){var p=!1,f=!1;if(n){var m=u.call(r,n);p=m.canRetry||c!==r.options.SystemClockOffset,f=m.networkError}if(s&&s.setParams({httpEndTime:(new Date).getTime()}),n&&i<2&&p){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"]);var h=d.call(r,{requestUrl:(null==n?void 0:n.url)||"",clientCalcSign:"client"===(null==o?void 0:o.SignFrom),networkError:f});e.SwitchHost=h,a(i+1)}else t(n,l)})))}))}(1)}function m(e,t){var r=this,i=e.TaskId;if(!i||r._isRunningTask(i)){var o=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=e.dataType,g=r.options.HttpDNSServiceId;r.options.UseAccelerate&&(s="accelerate"),u=u||c({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:o,region:s,object:l}),e.SwitchHost&&(u=u.replace(/myqcloud.com/,"tencentcos.cn"));var v=l?u:"";e.action&&(u=u+"?"+e.action),e.qsStr&&(u=u.indexOf("?")>-1?u+"&"+e.qsStr:u+"?"+e.qsStr);var y={method:p,url:u,headers:e.headers,qs:e.qs,filePath:e.filePath,body:d,json:f,httpDNSServiceId:g,dataType:h},x="x-cos-security-token";a.isCIHost(u)&&(x="x-ci-security-token"),y.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(y.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(y.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(y.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(y.headers[x]=e.AuthData.SecurityToken),y.headers&&(y.headers=a.clearKey(y.headers)),y=a.clearKey(y),e.onProgress&&"function"==typeof e.onProgress&&(y.onProgress=function(t){if(!i||r._isRunningTask(i)){var n=t?t.loaded:0;e.onProgress({loaded:n,total:t.total})}}),this.options.Timeout&&(y.timeout=this.options.Timeout),r.options.ForcePathStyle&&(y.pathStyle=r.options.ForcePathStyle),r.emit("before-send",y);var b,k=y.url.includes("accelerate."),w=y.qs?Object.keys(y.qs).map((function(e){return"".concat(e,"=").concat(y.qs[e])})).join("&"):"",C=w?y.url+"?"+w:y.url;if(e.tracker)e.tracker.setParams({url:C,httpMethod:y.method,accelerate:k,httpSize:(null===(b=y.body)||void 0===b?void 0:b.size)||0}),e.tracker.parent&&!e.tracker.parent.params.url&&e.tracker.parent.setParams({url:v,accelerate:k});var S=n(y,(function(e,n,o){if("abort"!==e){var s,c=function(e,o){if(i&&r.off("inner-kill-task",T),!s){s=!0;var c={};n&&n.statusCode&&(c.statusCode=n.statusCode),n&&n.headers&&(c.headers=n.headers),e?(y.url&&(c.url=y.url),y.method&&(c.method=y.method),e=a.extend(e||{},c),t(e,null)):(o=a.extend(o||{},c),t(null,o)),S=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=o;else try{l=o&&o.indexOf("<")>-1&&o.indexOf(">")>-1&&a.xml2json(o)||{}}catch(e){l=o||{}}var p=n.statusCode;2===Math.floor(p/100)?l.Error?c({error:l.Error}):c(null,l):c({error:l.Error||l})}}})),T=function e(t){t.TaskId===i&&(S&&S.abort&&S.abort(),r.off("inner-kill-task",e))};i&&r.on("inner-kill-task",T)}}var h={getService:function(e,t){"function"==typeof e&&(t=e,e={});var r="https:",n=this.options.ServiceDomain,i=e.Region;n?(n=n.replace(/\{\{Region\}\}/gi,i||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(n)||(n=r+"//"+n),"/"===n.slice(-1)&&(n=n.slice(0,-1))):n=i?r+"//cos."+i+".myqcloud.com":r+"//service.cos.myqcloud.com";n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),f.call(this,{Action:"name/cos:GetService",url:n,method:"GET",headers:e.Headers,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Buckets&&r.ListAllMyBucketsResult.Buckets.Bucket||[];n=a.isArray(n)?n:[n];var i=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:n,Owner:i,statusCode:r.statusCode,headers:r.headers})}))},putBucket:function(e,t){var r=this,n="";if(e.BucketAZConfig){var i={BucketAZConfig:e.BucketAZConfig};n=a.json2xml({CreateBucketConfiguration:i})}f.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:n,tracker:e.tracker},(function(n,a){if(n)return t(n);var i=c({protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:i,statusCode:a.statusCode,headers:a.headers})}))},headBucket:function(e,t){f.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD",tracker:e.tracker},(function(e,r){t(e,r)}))},getBucket:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r.marker=e.Marker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,f.call(this,{Action:"name/cos:GetBucket",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.ListBucketResult||{},i=n.Contents||[],o=n.CommonPrefixes||[];i=a.isArray(i)?i:[i],o=a.isArray(o)?o:[o];var s=a.clone(n);a.extend(s,{Contents:i,CommonPrefixes:o,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},deleteBucket:function(e,t){f.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketAcl:function(e,t){var r=e.Headers,n="";if(e.AccessControlPolicy){var i=a.clone(e.AccessControlPolicy||{}),o=i.Grants||i.Grant;o=a.isArray(o)?o:[o],delete i.Grant,delete i.Grants,i.AccessControlList={Grant:o},n=a.json2xml({AccessControlPolicy:i}),r["Content-Type"]="application/xml",r["Content-MD5"]=a.binaryBase64(a.md5(n))}a.each(r,(function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=s(r[t]))})),f.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:r,action:"acl",body:n,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketAcl:function(e,t){f.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.AccessControlPolicy||{},i=n.Owner||{},s=n.AccessControlList.Grant||[];s=a.isArray(s)?s:[s];var c=o(n);r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=a.extend(c,{Owner:i,Grants:s,statusCode:r.statusCode,headers:r.headers}),t(null,c)}))},putBucketCors:function(e,t){var r=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];r=a.clone(a.isArray(r)?r:[r]),a.each(r,(function(e){a.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var r=t+"s",n=e[r]||e[t]||[];delete e[r],e[t]=a.isArray(n)?n:[n]}))}));var n={CORSRule:r};e.ResponseVary&&(n.ResponseVary=e.ResponseVary);var i=a.json2xml({CORSConfiguration:n}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"cors",headers:o,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketCors:function(e,t){f.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var n={CORSRules:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var i=r.CORSConfiguration||{},o=i.CORSRules||i.CORSRule||[];o=a.clone(a.isArray(o)?o:[o]);var s=i.ResponseVary;a.each(o,(function(e){a.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var r=t+"s",n=e[r]||e[t]||[];delete e[t],e[r]=a.isArray(n)?n:[n]}))})),t(null,{CORSRules:o,ResponseVary:s,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketCors:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})}))},getBucketLocation:function(e,t){f.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location",tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,r)}))},getBucketPolicy:function(e,t){f.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0,tracker:e.tracker},(function(e,r){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 n={};try{n=JSON.parse(r.body)}catch(e){}t(null,{Policy:n,statusCode:r.statusCode,headers:r.headers})}))},putBucketPolicy:function(e,t){var r=e.Policy,n=r;try{"string"==typeof r?r=JSON.parse(n):n=JSON.stringify(r)}catch(e){t({error:"Policy format error"})}var i=e.Headers;i["Content-Type"]="application/json",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:n,headers:i,json:!0,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},deleteBucketPolicy:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})}))},putBucketTagging:function(e,t){var r=e.Tagging||{},n=r.TagSet||r.Tags||e.Tags||[];n=a.clone(a.isArray(n)?n:[n]);var i=a.json2xml({Tagging:{TagSet:{Tag:n}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"tagging",headers:o,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketTagging:function(e,t){f.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var n={Tags:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else{var i=[];try{i=r.Tagging.TagSet.Tag||[]}catch(e){}i=a.clone(a.isArray(i)?i:[i]),t(null,{Tags:i,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketTagging:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketLifecycle:function(e,t){var r=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];r=a.clone(r);var n=a.json2xml({LifecycleConfiguration:{Rule:r}}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"lifecycle",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketLifecycle:function(e,t){f.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var n={Rules:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var i=[];try{i=r.LifecycleConfiguration.Rule||[]}catch(e){}i=a.clone(a.isArray(i)?i:[i]),t(null,{Rules:i,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketLifecycle:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var r=e.VersioningConfiguration||{},n=a.json2xml({VersioningConfiguration:r}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"versioning",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t({error:"missing param VersioningConfiguration"})},getBucketVersioning:function(e,t){f.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning",tracker:e.tracker},(function(e,r){e||!r.VersioningConfiguration&&(r.VersioningConfiguration={}),t(e,r)}))},putBucketReplication:function(e,t){var r=a.clone(e.ReplicationConfiguration),n=a.json2xml({ReplicationConfiguration:r});n=(n=n.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"replication",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketReplication:function(e,t){f.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var n={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else e||!r.ReplicationConfiguration&&(r.ReplicationConfiguration={}),r.ReplicationConfiguration.Rule&&(r.ReplicationConfiguration.Rules=r.ReplicationConfiguration.Rule,delete r.ReplicationConfiguration.Rule),t(e,r)}))},deleteBucketReplication:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var r=a.clone(e.WebsiteConfiguration||{}),n=r.RoutingRules||r.RoutingRule||[];n=a.isArray(n)?n:[n],delete r.RoutingRule,delete r.RoutingRules,n.length&&(r.RoutingRules={RoutingRule:n});var i=a.json2xml({WebsiteConfiguration:r}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"website",headers:o,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t({error:"missing param WebsiteConfiguration"})},getBucketWebsite:function(e,t){f.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var n={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var i=r.WebsiteConfiguration||{};if(i.RoutingRules){var o=a.clone(i.RoutingRules.RoutingRule||[]);o=a.makeArray(o),i.RoutingRules=o}t(null,{WebsiteConfiguration:i,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketWebsite:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var r=a.clone(e.RefererConfiguration||{}),n=r.DomainList||{},i=n.Domains||n.Domain||[];(i=a.isArray(i)?i:[i]).length&&(r.DomainList={Domain:i});var o=a.json2xml({RefererConfiguration:r}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=a.binaryBase64(a.md5(o)),f.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"referer",headers:s,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t({error:"missing param RefererConfiguration"})},getBucketReferer:function(e,t){f.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer",tracker:e.tracker},(function(e,r){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var n={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var i=r.RefererConfiguration||{};if(i.DomainList){var o=a.makeArray(i.DomainList.Domain||[]);i.DomainList={Domains:o}}t(null,{RefererConfiguration:i,statusCode:r.statusCode,headers:r.headers})}}))},putBucketDomain:function(e,t){var r=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];r=a.clone(r);var n=a.json2xml({DomainConfiguration:{DomainRule:r}}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"domain",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketDomain:function(e,t){f.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=[];try{n=r.DomainConfiguration.DomainRule||[]}catch(e){}n=a.clone(a.isArray(n)?n:[n]),t(null,{DomainRule:n,statusCode:r.statusCode,headers:r.headers})}))},deleteBucketDomain:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketOrigin:function(e,t){var r=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];r=a.clone(r);var n=a.json2xml({OriginConfiguration:{OriginRule:r}}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"origin",headers:i,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketOrigin:function(e,t){f.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=[];try{n=r.OriginConfiguration.OriginRule||[]}catch(e){}n=a.clone(a.isArray(n)?n:[n]),t(null,{OriginRule:n,statusCode:r.statusCode,headers:r.headers})}))},deleteBucketOrigin:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin",tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketLogging:function(e,t){var r=a.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=a.binaryBase64(a.md5(r)),f.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"logging",headers:n,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketLogging:function(e,t){f.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging",tracker:e.tracker},(function(e,r){if(e)return t(e);delete r.BucketLoggingStatus._xmlns,t(null,{BucketLoggingStatus:r.BucketLoggingStatus,statusCode:r.statusCode,headers:r.headers})}))},putBucketInventory:function(e,t){var r=a.clone(e.InventoryConfiguration);if(r.OptionalFields){var n=r.OptionalFields||[];r.OptionalFields={Field:n}}if(r.Destination&&r.Destination.COSBucketDestination&&r.Destination.COSBucketDestination.Encryption){var i=r.Destination.COSBucketDestination.Encryption;Object.keys(i).indexOf("SSECOS")>-1&&(i["SSE-COS"]=i.SSECOS,delete i.SSECOS)}var o=a.json2xml({InventoryConfiguration:r}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=a.binaryBase64(a.md5(o)),f.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"inventory",qs:{id:e.Id},headers:s,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketInventory:function(e,t){f.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.InventoryConfiguration;if(n&&n.OptionalFields&&n.OptionalFields.Field){var i=n.OptionalFields.Field;a.isArray(i)||(i=[i]),n.OptionalFields=i}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var o=n.Destination.COSBucketDestination.Encryption;Object.keys(o).indexOf("SSE-COS")>-1&&(o.SSECOS=o["SSE-COS"],delete o["SSE-COS"])}t(null,{InventoryConfiguration:n,statusCode:r.statusCode,headers:r.headers})}))},listBucketInventory:function(e,t){f.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken},tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.ListInventoryConfigurationResult,i=n.InventoryConfiguration||[];i=a.isArray(i)?i:[i],delete n.InventoryConfiguration,a.each(i,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;a.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var r=e.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}})),n.InventoryConfigurations=i,a.extend(n,{statusCode:r.statusCode,headers:r.headers}),t(null,n)}))},deleteBucketInventory:function(e,t){f.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id},tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var r={AccelerateConfiguration:e.AccelerateConfiguration||{}},n=a.json2xml(r),i={"Content-Type":"application/xml"};i["Content-MD5"]=a.binaryBase64(a.md5(n)),f.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"accelerate",headers:i,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t({error:"missing param AccelerateConfiguration"})},getBucketAccelerate:function(e,t){f.call(this,{Interface:"getBucketAccelerate",Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate",tracker:e.tracker},(function(e,r){e||!r.AccelerateConfiguration&&(r.AccelerateConfiguration={}),t(e,r)}))},getObject:function(e,t){var r=e.Query||{},n=e.QueryString||"",i=e.tracker;i&&i.setParams({signStartTime:(new Date).getTime()}),r["response-content-type"]=e.ResponseContentType,r["response-content-language"]=e.ResponseContentLanguage,r["response-expires"]=e.ResponseExpires,r["response-cache-control"]=e.ResponseCacheControl,r["response-content-disposition"]=e.ResponseContentDisposition,r["response-content-encoding"]=e.ResponseContentEncoding,f.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,qs:r,qsStr:n,rawBody:!0,dataType:e.DataType,tracker:i},(function(r,n){if(r){var i=r.statusCode;return e.Headers["If-Modified-Since"]&&i&&304===i?t(null,{NotModified:!0}):t(r)}t(null,{Body:n.body,ETag:a.attr(n.headers,"etag",""),statusCode:n.statusCode,headers:n.headers})}))},headObject:function(e,t){f.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,tracker:e.tracker},(function(r,n){if(r){var i=r.statusCode;return e.Headers["If-Modified-Since"]&&i&&304===i?t(null,{NotModified:!0,statusCode:i}):t(r)}n.ETag=a.attr(n.headers,"etag",""),t(null,n)}))},listObjectVersions:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r["key-marker"]=e.KeyMarker,r["version-id-marker"]=e.VersionIdMarker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,f.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,action:"versions",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.ListVersionsResult||{},i=n.DeleteMarker||[];i=a.isArray(i)?i:[i];var o=n.Version||[];o=a.isArray(o)?o:[o];var s=a.clone(n);delete s.DeleteMarker,delete s.Version,a.extend(s,{DeleteMarkers:i,Versions:o,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},putObject:function(e,t){var r=this,n=e.ContentLength,o=a.throttleOnProgress.call(r,n,e.onProgress),s=e.Headers;s["Cache-Control"]||s["cache-control"]||(s["Cache-Control"]=""),s["Content-Type"]||s["content-type"]||(s["Content-Type"]=i.getType(e.Key)||"application/octet-stream");var l=e.UploadAddMetaMd5||r.options.UploadAddMetaMd5||r.options.UploadCheckContentMd5,p=e.tracker;l&&p&&p.setParams({md5StartTime:(new Date).getTime()}),a.getBodyMd5(l,e.Body,(function(i){i&&(p&&p.setParams({md5EndTime:(new Date).getTime()}),r.options.UploadCheckContentMd5&&(s["Content-MD5"]=a.binaryBase64(i)),(e.UploadAddMetaMd5||r.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=i)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),o(null,!0),f.call(r,{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:o,tracker:p},(function(i,s){if(i)return o(null,!0),t(i);o({loaded:n,total:n},!0);var l=c({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:r.options.UseAccelerate?"accelerate":e.Region,object:e.Key});l=l.substr(l.indexOf("://")+3),s.Location=l,s.ETag=a.attr(s.headers,"etag",""),t(null,s)}))}))},postObject:function(e,t){var r=this,n={},i=e.FilePath;if(i){for(var o in n["Cache-Control"]=e.CacheControl,n["Content-Disposition"]=e.ContentDisposition,n["Content-Encoding"]=e.ContentEncoding,n["Content-MD5"]=e.ContentMD5,n["Content-Length"]=e.ContentLength,n["Content-Type"]=e.ContentType,n.Expect=e.Expect,n.Expires=e.Expires,n["x-cos-acl"]=e.ACL,n["x-cos-grant-read"]=e.GrantRead,n["x-cos-grant-write"]=e.GrantWrite,n["x-cos-grant-full-control"]=e.GrantFullControl,n["x-cos-storage-class"]=e.StorageClass,n["x-cos-mime-limit"]=e.MimeLimit,n["x-cos-traffic-limit"]=e.TrafficLimit,n["x-cos-forbid-overwrite"]=e.ForbidOverwrite,n["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,n["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,n["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,n["x-cos-server-side-encryption"]=e.ServerSideEncryption,n["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,n["x-cos-server-side-encryption-context"]=e.SSEContext,delete n["Content-Length"],delete n["content-length"],e)o.indexOf("x-cos-meta-")>-1&&(n[o]=e[o]);var s=a.throttleOnProgress.call(r,n["Content-Length"],e.onProgress);f.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:n,qs:e.Query,filePath:i,TaskId:e.TaskId,onProgress:s,tracker:e.tracker},(function(n,a){if(s(null,!0),n)return t(n);if(a&&a.headers){var o=a.headers,l=o.etag||o.Etag||o.ETag||"",p=i.substr(i.lastIndexOf("/")+1),u=c({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key.replace(/\$\{filename\}/g,p),isLocation:!0});return t(null,{Location:u,statusCode:a.statusCode,headers:o,ETag:l})}t(null,a)}))}else t({error:"missing param FilePath"})},deleteObject:function(e,t){f.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId,tracker:e.tracker},(function(e,r){if(e){var n=e.statusCode;return n&&204===n?t(null,{statusCode:n}):n&&404===n?t(null,{BucketNotFound:!0,statusCode:n}):t(e)}t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObjectAcl:function(e,t){var r={};e.VersionId&&(r.versionId=e.VersionId),f.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r,action:"acl",tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.AccessControlPolicy||{},i=n.Owner||{},s=n.AccessControlList&&n.AccessControlList.Grant||[];s=a.isArray(s)?s:[s];var c=o(n);r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=a.extend(c,{Owner:i,Grants:s,statusCode:r.statusCode,headers:r.headers}),t(null,c)}))},putObjectAcl:function(e,t){var r=e.Headers,n="";if(e.AccessControlPolicy){var i=a.clone(e.AccessControlPolicy||{}),o=i.Grants||i.Grant;o=a.isArray(o)?o:[o],delete i.Grant,delete i.Grants,i.AccessControlList={Grant:o},n=a.json2xml({AccessControlPolicy:i}),r["Content-Type"]="application/xml",r["Content-MD5"]=a.binaryBase64(a.md5(n))}a.each(r,(function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=s(r[t]))})),f.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:r,body:n,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},optionsObject:function(e,t){var r=e.Headers;r.Origin=e.Origin,r["Access-Control-Request-Method"]=e.AccessControlRequestMethod,r["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,f.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:r,tracker:e.tracker},(function(e,r){if(e)return e.statusCode&&403===e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var n=r.headers||{};t(null,{AccessControlAllowOrigin:n["access-control-allow-origin"],AccessControlAllowMethods:n["access-control-allow-methods"],AccessControlAllowHeaders:n["access-control-allow-headers"],AccessControlExposeHeaders:n["access-control-expose-headers"],AccessControlMaxAge:n["access-control-max-age"],statusCode:r.statusCode,headers:r.headers})}))},putObjectCopy:function(e,t){var r=e.Headers;!r["Cache-Control"]&&r["cache-control"]&&(r["Cache-Control"]="");var n=e.CopySource||"",i=a.getSourceParams.call(this,n);if(i){var o=i.Bucket,s=i.Region,c=decodeURIComponent(i.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:o,region:s,prefix:c},{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,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=a.clone(r.CopyObjectResult||{});a.extend(n,{statusCode:r.statusCode,headers:r.headers}),t(null,n)}))}else t({error:"CopySource format error"})},deleteMultipleObject:function(e,t){var r=e.Objects||[],n=e.Quiet;r=a.isArray(r)?r:[r];var i=a.json2xml({Delete:{Object:r,Quiet:n||!1}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i));var s=a.map(r,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));f.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:i,action:"delete",headers:o,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=r.DeleteResult||{},i=n.Deleted||[],o=n.Error||[];i=a.isArray(i)?i:[i],o=a.isArray(o)?o:[o];var s=a.clone(n);a.extend(s,{Error:o,Deleted:i,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},restoreObject:function(e,t){var r=e.Headers;if(e.RestoreRequest){var n=e.RestoreRequest||{},i=a.json2xml({RestoreRequest:n});r["Content-Type"]="application/xml",r["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:i,action:"restore",headers:r,tracker:e.tracker},(function(e,r){t(e,r)}))}else t({error:"missing param RestoreRequest"})},putObjectTagging:function(e,t){var r=e.Tagging||{},n=r.TagSet||r.Tags||e.Tags||[];n=a.clone(a.isArray(n)?n:[n]);var i=a.json2xml({Tagging:{TagSet:{Tag:n}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=a.binaryBase64(a.md5(i)),f.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:i,action:"tagging",headers:o,VersionId:e.VersionId,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObjectTagging:function(e,t){f.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,tracker:e.tracker},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var n={Tags:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else{var i=[];try{i=r.Tagging.TagSet.Tag||[]}catch(e){}i=a.clone(a.isArray(i)?i:[i]),t(null,{Tags:i,statusCode:r.statusCode,headers:r.headers})}}))},deleteObjectTagging:function(e,t){f.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,tracker:e.tracker},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},appendObject:function(e,t){f.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,tracker:e.tracker},(function(e,r){if(e)return t(e);t(null,r)}))},uploadPartCopy:function(e,t){var r=e.CopySource||"",n=a.getSourceParams.call(this,r);if(n){var i=n.Bucket,o=n.Region,s=decodeURIComponent(n.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:i,region:o,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,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,tracker:e.tracker},(function(e,r){if(e)return t(e);var n=a.clone(r.CopyPartResult||{});a.extend(n,{statusCode:r.statusCode,headers:r.headers}),t(null,n)}))}else t({error:"CopySource format error"})},multipartInit:function(e,t){var r=e.Headers,n=e.tracker;r["Cache-Control"]||r["cache-control"]||(r["Cache-Control"]=""),r["Content-Type"]||r["content-type"]||(r["Content-Type"]=i.getType(e.Key)||"application/octet-stream"),f.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:n},(function(e,r){return e?(n&&n.parent&&n.parent.setParams({errorNode:"multipartInit"}),t(e)):(r=a.clone(r||{}))&&r.InitiateMultipartUploadResult?t(null,a.extend(r.InitiateMultipartUploadResult,{statusCode:r.statusCode,headers:r.headers})):void t(null,r)}))},multipartUpload:function(e,t){var r=this;a.getFileSize("multipartUpload",e,(function(){var n=e.tracker,i=r.options.UploadCheckContentMd5;i&&n&&n.setParams({md5StartTime:(new Date).getTime()}),a.getBodyMd5(i,e.Body,(function(o){o&&(e.Headers["Content-MD5"]=a.binaryBase64(o),i&&n&&n.setParams({md5EndTime:(new Date).getTime()})),n&&n.setParams({partNumber:e.PartNumber}),f.call(r,{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:n},(function(e,r){if(e)return n&&n.parent&&n.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:a.attr(r.headers,"etag",{}),statusCode:r.statusCode,headers:r.headers})}))}))}))},multipartComplete:function(e,t){for(var r=this,n=e.UploadId,i=e.Parts,o=e.tracker,s=0,l=i.length;s-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],r="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),n=new RegExp(t,"g");return e.replace(n,r)}(r.Authorization):"sign="+encodeURIComponent(r.Authorization)),r.SecurityToken&&(n+="&x-cos-security-token="+r.SecurityToken),r.ClientIP&&(n+="&clientIP="+r.ClientIP),r.ClientUA&&(n+="&clientUA="+r.ClientUA),r.Token&&(n+="&token="+r.Token),o&&(n+="&"+o),setTimeout((function(){t(null,{Url:n})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),o&&(s+="&"+o)):o&&(s+="?"+o),s},getAuth:function(e){return a.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(h,"postObject"),t.transferToTaskMethod(h,"putObject"),a.each(h,(function(t,r){e.prototype[r]=a.apiWrapper(r,t)}))}},function(e,t){function r(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}var n=function(e,t){var n,a,i,o=[],s=function(e,t){var n=[];for(var a in e)e.hasOwnProperty(a)&&n.push(t?r(a).toLowerCase():a);return n.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}(e);for(n=0;n-1||m.indexOf(h)>-1)&&(f[h]=e.headers[h]);i["x-cos-acl"]&&(f.acl=i["x-cos-acl"]),!f["Content-Type"]&&(f["Content-Type"]=""),(r=wx.uploadFile({url:o,method:s,name:"file",header:i,filePath:a,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&&n(e.qs)||"";g&&(o+=(o.indexOf("?")>-1?"&":"?")+g),i["Content-Length"]&&delete i["Content-Length"];var v={url:o,method:s,header:i,dataType:"text",data:e.body,responseType:e.dataType||"text",timeout:e.timeout,redirect:"manual",success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),r=wx.request(v)}return r}},function(e,t,r){"use strict";let n=r(24);e.exports=new n(r(25),r(26))},function(e,t,r){"use strict";function n(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}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)}function i(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,c,"next",e)}function c(e){i(o,n,a,s,c,"throw",e)}s(void 0)}))}}var s=r(6),c=r(28),l=r(5).EventProxy,p=r(0),u=r(3);function d(e,t){var r=e.TaskId,n=e.Bucket,a=e.Region,i=e.Key,o=e.StorageClass,u=this,d={},h=e.FileSize,g=e.SliceSize,v=Math.ceil(h/g),y=0,x=p.throttleOnProgress.call(u,h,e.onHashProgress),b=function(t,r){var n=t.length;if(0===n)return r(null,!0);if(n>v)return r(null,!1);if(n>1&&Math.max(t[0].Size,t[1].Size)!==g)return r(null,!1);!function a(i){if(i=c.length)k.emit("has_and_check_upload_id",t);else{var d=c[l];if(!p.isInArray(t,d))return s.removeUploadId(d),void o(l+1);s.using[d]?o(l+1):m.call(u,{Bucket:n,Region:a,Key:i,UploadId:d,tracker:e.tracker},(function(e,t){u._isRunningTask(r)&&(e?(s.removeUploadId(d),o(l+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(){f.call(u,{Bucket:n,Region:a,Key:i,tracker:e.tracker},(function(t,a){if(u._isRunningTask(r)){if(t)return k.emit("error",t);var c=p.filter(a.UploadList,(function(e){return e.Key===i&&(!o||e.StorageClass.toUpperCase()===o.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(c.length)k.emit("seek_local_avail_upload_id",c);else{var l,d=s.getFileId(e.FileStat,e.ChunkSize,n,i);d&&(l=s.getUploadIdList(d))&&p.each(l,(function(e){s.removeUploadId(e)})),k.emit("no_available_upload_id")}}}))})),k.emit("get_remote_upload_id_list")}function f(e,t){var r=this,n=[],a={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartList(a,(function(r,i){if(r)return t(r);n.push.apply(n,i.Upload||[]),"true"===i.IsTruncated?(a.KeyMarker=i.NextKeyMarker,a.UploadIdMarker=i.NextUploadIdMarker,e()):t(null,{UploadList:n})}))}()}function m(e,t){var r=this,n=[],a={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartListPart(a,(function(r,i){if(r)return t(r);n.push.apply(n,i.Part||[]),"true"===i.IsTruncated?(a.PartNumberMarker=i.NextPartNumberMarker,e()):t(null,{PartList:n})}))}()}function h(e,t){var r=this,n=e.TaskId,a=e.Bucket,i=e.Region,o=e.Key,s=e.UploadData,l=e.FileSize,u=e.SliceSize,d=Math.min(e.AsyncLimit||r.options.ChunkParallelLimit||1,256),f=e.FilePath,m=Math.ceil(l/u),h=0,v=e.ServerSideEncryption,y=p.filter(s.PartList,(function(e){return e.Uploaded&&(h+=e.PartNumber>=m&&l%u||u),!e.Uploaded})),x=e.onProgress;c.eachLimit(y,d,(function(t,c){if(r._isRunningTask(n)){var p=t.PartNumber,d=Math.min(l,t.PartNumber*u)-(t.PartNumber-1)*u,m=0;g.call(r,{TaskId:n,Bucket:a,Region:i,Key:o,SliceSize:u,FileSize:l,PartNumber:p,ServerSideEncryption:v,FilePath:f,UploadData:s,onProgress:function(e){h+=e.loaded-m,m=e.loaded,x({loaded:h,total:l})},tracker:e.tracker},(function(e,a){r._isRunningTask(n)&&(e?h-=m:(h+=d-m,t.ETag=a.ETag),x({loaded:h,total:l}),c(e||null,a))}))}}),(function(e){if(r._isRunningTask(n))return e?t(e):void t(null,{UploadId:s.UploadId,SliceList:s.PartList})}))}function g(e,t){var r=this,n=e.TaskId,a=e.Bucket,i=e.Region,o=e.Key,s=e.FileSize,l=e.FilePath,u=1*e.PartNumber,d=e.SliceSize,f=e.ServerSideEncryption,m=e.UploadData,h=r.options.ChunkRetryTimes+1,g=e.Headers||{},v=d*(u-1),y=d,x=v+d;x>s&&(y=(x=s)-v);var b=["x-cos-traffic-limit","x-cos-mime-limit"],k={};p.each(g,(function(e,t){b.indexOf(t)>-1&&(k[t]=e)})),p.fileSlice(l,v,x,(function(s){var l=p.getFileMd5(s),d=l?p.binaryBase64(l):null,g=m.PartList[u-1];c.retry(h,(function(t){r._isRunningTask(n)&&r.multipartUpload({TaskId:n,Bucket:a,Region:i,Key:o,ContentLength:y,PartNumber:u,UploadId:m.UploadId,ServerSideEncryption:f,Body:s,Headers:k,onProgress:e.onProgress,ContentMD5:d,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,a){if(r._isRunningTask(n))return e?t(e):(g.Uploaded=!0,t(null,a))}))}),(function(e,a){if(r._isRunningTask(n))return t(e,a)}))}))}function v(e,t){var r=e.Bucket,n=e.Region,a=e.Key,i=e.UploadId,o=e.SliceList,s=this,l=this.options.ChunkRetryTimes+1,p=o.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));c.retry(l,(function(t){s.multipartComplete({Bucket:r,Region:n,Key:a,UploadId:i,Parts:p,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,r){t(e,r)}))}function y(e,t){var r=e.Bucket,n=e.Region,a=e.Key,i=e.AbortArray,o=e.AsyncLimit||1,s=this,l=0,p=new Array(i.length);c.eachLimit(i,o,(function(t,i){var o=l;if(a&&a!==t.Key)return p[o]={error:{KeyNotMatch:!0}},void i(null);var c=t.UploadId||t.UploadID;s.multipartAbort({Bucket:r,Region:n,Key:t.Key,Headers:e.Headers,UploadId:c},(function(e){var a={Bucket:r,Region:n,Key:t.Key,UploadId:c};p[o]={error:e,task:a},i(null)})),l++}),(function(e){if(e)return t(e);for(var r=[],n=[],a=0,i=p.length;ao?"sliceUploadFile":"putObject",t.tracker=new u({Beacon:i.options.BeaconReporter,clsReporter:i.options.ClsReporter,bucket:t.Bucket,region:t.Region,apiName:"uploadFile",realApi:f,fileKey:t.Key,fileSize:c,accelerate:d,deepTracker:i.options.DeepTracker,customId:i.options.CustomId,delay:i.options.TrackerDelay})),p.each(t,(function(e,t){"object"!==a(e)&&"function"!=typeof e&&(l[t]=e)})),m=t.onTaskReady,t.onTaskReady=function(e){l.TaskId=e,m&&m(e)},h=t.onFileFinish,g=function(e,n){t.tracker&&t.tracker.report(e,n),h&&h(e,n,l),r&&r(e,n)},v="postObject"===i.options.SimpleUploadMethod?"postObject":"putObject",y=c>o?"sliceUploadFile":v,s.push({api:y,params:t,callback:g}),i._addTasks(s);case 24:case"end":return e.stop()}}),e,this,[[3,9]])})))).apply(this,arguments)}function b(){return b=o(n().mark((function e(t,r){var i,s,c,l,d,f,m,h,g,v,y;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this,s=void 0===t.SliceSize?i.options.SliceSize:t.SliceSize,c=0,l=0,d=p.throttleOnProgress.call(i,l,t.onProgress),f=t.files.length,m=t.onFileFinish,h=Array(f),g=function(e,t,n){d(null,!0),m&&m(e,t,n),h[n.Index]={options:n,error:e,data:t},--f<=0&&r&&r(null,{files:h})},v=[],y=function(){return t.files.map((function(e,t){return new Promise(function(){var r=o(n().mark((function r(o){var f,m,h,y,x,b,k,w,C,S,T;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return f=0,r.prev=1,r.next=4,p.getFileSizeByPath(e.FilePath);case 4:f=r.sent,r.next=9;break;case 7:r.prev=7,r.t0=r.catch(1);case 9:m={Index:t,TaskId:""},c+=f,i.options.EnableReporter&&(h=i.options.UseAccelerate||"string"==typeof i.options.Domain&&i.options.Domain.includes("accelerate."),y=f>s?"sliceUploadFile":"putObject",e.tracker=new u({Beacon:i.options.BeaconReporter,clsReporter:i.options.ClsReporter,bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",realApi:y,fileKey:e.Key,fileSize:f,accelerate:h,deepTracker:i.options.DeepTracker,customId:i.options.CustomId,delay:i.options.TrackerDelay})),p.each(e,(function(e,t){"object"!==a(e)&&"function"!=typeof e&&(m[t]=e)})),x=e.onTaskReady,e.onTaskReady=function(e){m.TaskId=e,x&&x(e)},b=0,k=e.onProgress,e.onProgress=function(e){l=l-b+e.loaded,b=e.loaded,k&&k(e),d({loaded:l,total:c})},w=e.onFileFinish,C=function(t,r){e.tracker&&e.tracker.report(t,r),w&&w(t,r),g&&g(t,r,m)},S="postObject"===i.options.SimpleUploadMethod?"postObject":"putObject",T=f>s?"sliceUploadFile":S,v.push({api:T,params:e,callback:C}),o(!0);case 24:case"end":return r.stop()}}),r,null,[[1,7]])})));return function(e){return r.apply(this,arguments)}}())}))},e.next=13,Promise.all(y());case 13:i._addTasks(v);case 14:case"end":return e.stop()}}),e,this)}))),b.apply(this,arguments)}function k(e,t){var r=e.TaskId,n=e.Bucket,a=e.Region,i=e.Key,o=e.CopySource,s=e.UploadId,l=1*e.PartNumber,p=e.CopySourceRange,u=this.options.ChunkRetryTimes+1,d=this;c.retry(u,(function(t){d.uploadPartCopy({TaskId:r,Bucket:n,Region:a,Key:i,CopySource:o,UploadId:s,PartNumber:l,CopySourceRange:p,onProgress:e.onProgress,tracker:e.tracker,calledBySdk:e.calledBySdk},(function(e,r){t(e||null,r)}))}),(function(e,r){return t(e,r)}))}var w={sliceUploadFile:function(e,t){var r=this;if(!p.canFileSlice())return e.SkipTask=!0,void("postObject"===r.options.SimpleUploadMethod?r.postObject(e,t):r.putObject(e,t));var n,a,i=new l,o=e.TaskId,c=e.Bucket,u=e.Region,f=e.Key,m=e.FilePath,g=e.ChunkSize||e.SliceSize||r.options.ChunkSize,y=e.AsyncLimit,x=e.StorageClass,b=e.ServerSideEncryption,k=e.onHashProgress,w=e.tracker;w&&w.setParams({chunkSize:g}),i.on("error",(function(n){if(r._isRunningTask(o)){var a={UploadId:e.UploadData.UploadId||"",err:n,error:n};return t(a)}})),i.on("upload_complete",(function(r){var n=p.extend({UploadId:e.UploadData.UploadId||""},r);t(null,n)})),i.on("upload_slice_complete",(function(e){v.call(r,{Bucket:c,Region:u,Key:f,UploadId:e.UploadId,SliceList:e.SliceList,tracker:w},(function(t,c){if(r._isRunningTask(o)){if(s.removeUsing(e.UploadId),t)return a(null,!0),i.emit("error",t);s.removeUploadId(e.UploadId),a({loaded:n,total:n},!0),i.emit("upload_complete",c)}}))})),i.on("get_upload_data_finish",(function(t){var l=s.getFileId(e.FileStat,e.ChunkSize,c,f);l&&s.saveUploadId(l,t.UploadId,r.options.UploadIdCacheLimit),s.setUsing(t.UploadId),a(null,!0),h.call(r,{TaskId:o,Bucket:c,Region:u,Key:f,FilePath:m,FileSize:n,SliceSize:g,AsyncLimit:y,ServerSideEncryption:b,UploadData:t,onProgress:a,tracker:w},(function(e,t){if(r._isRunningTask(o))return e?(a(null,!0),i.emit("error",e)):void i.emit("upload_slice_complete",t)}))})),i.on("get_file_size_finish",(function(){if(a=p.throttleOnProgress.call(r,n,e.onProgress),e.UploadData.UploadId)i.emit("get_upload_data_finish",e.UploadData);else{var t=p.extend({TaskId:o,Bucket:c,Region:u,Key:f,Headers:e.Headers,StorageClass:x,FilePath:m,FileSize:n,SliceSize:g,onHashProgress:k,tracker:w},e);t.FileSize=n,d.call(r,t,(function(t,n){if(r._isRunningTask(o)){if(t)return i.emit("error",t);e.UploadData.UploadId=n.UploadId,e.UploadData.PartList=n.PartList,i.emit("get_upload_data_finish",e.UploadData)}}))}})),n=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),p.each(e.Headers,(function(t,r){"content-length"===r.toLowerCase()&&delete e.Headers[r]})),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],a=1048576,i=0;i=S&&y%b||b),!e.Uploaded}));c.eachLimit(f,w,(function(t,r){var s=t.PartNumber,p=t.CopySourceRange,d=t.end-t.start,f=0;c.retry(C,(function(t){k.call(n,{Bucket:a,Region:i,Key:o,CopySource:u,UploadId:l.UploadId,PartNumber:s,CopySourceRange:p,tracker:e.tracker,calledBySdk:"sliceCopyFile",onProgress:function(e){T+=e.loaded-f,f=e.loaded,x({loaded:T,total:y})}},t)}),(function(e,n){if(e)return r(e);x({loaded:T,total:y}),T+=d-f,t.ETag=n.ETag,r(e||null,n)}))}),(function(e){if(e)return s.removeUsing(l.UploadId),x(null,!0),t(e);r.emit("copy_slice_complete",l)}))})),r.on("get_chunk_size_finish",(function(){var c=function(){n.multipartInit({Bucket:a,Region:i,Key:o,Headers:A,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(n,a){if(n)return t(n);e.UploadId=a.UploadId,r.emit("get_copy_data_finish",{UploadId:e.UploadId,PartList:e.PartList})}))},l=s.getCopyFileId(u,E,b,a,o),d=s.getUploadIdList(l);if(!l||!d)return c();!function t(l){if(l>=d.length)return c();var u=d[l];if(s.using[u])return t(l+1);m.call(n,{Bucket:a,Region:i,Key:o,UploadId:u,tracker:e.tracker,calledBySdk:"sliceCopyFile"},(function(n,a){if(n)s.removeUploadId(u),t(l+1);else{if(s.using[u])return t(l+1);var i={},o=0;p.each(a.PartList,(function(e){var t=parseInt(e.Size),r=o+t-1;i[e.PartNumber+"|"+o+"|"+r]=e.ETag,o+=t})),p.each(e.PartList,(function(e){var t=i[e.PartNumber+"|"+e.start+"|"+e.end];t&&(e.ETag=t,e.Uploaded=!0)})),r.emit("get_copy_data_finish",{UploadId:u,PartList:e.PartList})}}))}(0)})),r.on("get_file_size_finish",(function(){var a;if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],r=1048576,a=0;a11&&(R[t]=e)})),r.emit("get_file_size_finish")}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(w,"sliceUploadFile"),p.each(w,(function(t,r){e.prototype[r]=p.apiWrapper(r,t)}))}},function(e,t){var r={eachLimit:function(e,t,r,n){if(n=n||function(){},!e.length||t<=0)return n();var a=0,i=0,o=0;!function s(){if(a>=e.length)return n();for(;o=e.length?n():s())}))}()},retry:function(e,t,r){e<1?r():function n(a){t((function(t,i){t&&a SliceSize ? 'sliceUploadFile' : 'putObject'; params.tracker = new Tracker({ - Beacon: self.options.Beacon, + Beacon: self.options.BeaconReporter, + clsReporter: self.options.ClsReporter, bucket: params.Bucket, region: params.Region, apiName: 'uploadFile', + realApi, fileKey: params.Key, fileSize: FileSize, accelerate, @@ -979,7 +982,7 @@ async function uploadFile(params, callback) { var _onFileFinish = params.onFileFinish; var onFileFinish = function (err, data) { // 格式化上报参数并上报 - params.tracker && params.tracker.formatResult(err, data); + params.tracker && params.tracker.report(err, data); _onFileFinish && _onFileFinish(err, data, fileInfo); callback && callback(err, data); }; @@ -1043,15 +1046,18 @@ async function uploadFiles(params, callback) { TotalSize += FileSize; // 单个文件上传链路 - if (self.options.EnableTracker) { + if (self.options.EnableReporter) { const accelerate = self.options.UseAccelerate || (typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.')); + const realApi = FileSize > SliceSize ? 'sliceUploadFile' : 'putObject'; fileParams.tracker = new Tracker({ - Beacon: self.options.Beacon, + Beacon: self.options.BeaconReporter, + clsReporter: self.options.ClsReporter, bucket: fileParams.Bucket, region: fileParams.Region, apiName: 'uploadFiles', + realApi, fileKey: fileParams.Key, fileSize: FileSize, accelerate, @@ -1089,7 +1095,7 @@ async function uploadFiles(params, callback) { var _onFileFinish = fileParams.onFileFinish; var onFileFinish = function (err, data) { // 格式化上报参数并上报 - fileParams.tracker && fileParams.tracker.formatResult(err, data); + fileParams.tracker && fileParams.tracker.report(err, data); _onFileFinish && _onFileFinish(err, data); onTotalFileFinish && onTotalFileFinish(err, data, fileInfo); }; @@ -1166,6 +1172,7 @@ function sliceCopyFile(params, callback) { Key: Key, UploadId: UploadData.UploadId, Parts: Parts, + tracker: params.tracker, calledBySdk: 'sliceCopyFile', }, tryCallback @@ -1217,6 +1224,8 @@ function sliceCopyFile(params, callback) { UploadId: UploadData.UploadId, PartNumber: PartNumber, CopySourceRange: CopySourceRange, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile', onProgress: function (data) { FinishSize += data.loaded - preAddSize; preAddSize = data.loaded; @@ -1257,6 +1266,8 @@ function sliceCopyFile(params, callback) { Region: Region, Key: Key, Headers: TargetHeader, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile', }, function (err, data) { if (err) return callback(err); @@ -1285,6 +1296,8 @@ function sliceCopyFile(params, callback) { Region: Region, Key: Key, UploadId: UploadId, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile', }, function (err, PartListData) { if (err) { @@ -1383,6 +1396,8 @@ function sliceCopyFile(params, callback) { Bucket: SourceBucket, Region: SourceRegion, Key: SourceKey, + tracker: params.tracker, + calledBySdk: 'sliceCopyFile', }, function (err, data) { if (err) { @@ -1400,6 +1415,7 @@ function sliceCopyFile(params, callback) { return; } + params.tracker && params.tracker.setParams({ httpSize: FileSize }); onProgress = util.throttleOnProgress.call(self, FileSize, params.onProgress); // 开始上传 @@ -1407,7 +1423,7 @@ function sliceCopyFile(params, callback) { if (!params.Headers['x-cos-metadata-directive']) { params.Headers['x-cos-metadata-directive'] = 'Copy'; } - self.putObjectCopy(params, function (err, data) { + self.putObjectCopy(Object.assign(params, { calledBySdk: 'sliceCopyFile' }), function (err, data) { if (err) { onProgress(null, true); return callback(err); @@ -1466,6 +1482,8 @@ function copySliceItem(params, callback) { PartNumber: PartNumber, CopySourceRange: CopySourceRange, onProgress: params.onProgress, + tracker: params.tracker, + calledBySdk: params.calledBySdk, }, function (err, data) { tryCallback(err || null, data); diff --git a/src/base.js b/src/base.js index ecbfe14..07bcef3 100644 --- a/src/base.js +++ b/src/base.js @@ -1,6 +1,5 @@ 'use strict'; var REQUEST = require('../lib/request'); -var base64 = require('../lib/base64'); var util = require('./util'); var mime = require('mime'); @@ -46,6 +45,7 @@ function getService(params, callback) { url: domain, method: 'GET', headers: params.Headers, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -101,6 +101,7 @@ function putBucket(params, callback) { Region: params.Region, headers: params.Headers, body: xml, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -140,6 +141,7 @@ function headBucket(params, callback) { Region: params.Region, headers: params.Headers, method: 'HEAD', + tracker: params.tracker, }, function (err, data) { callback(err, data); @@ -180,6 +182,7 @@ function getBucket(params, callback) { Region: params.Region, headers: params.Headers, qs: reqParams, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -222,6 +225,7 @@ function deleteBucket(params, callback) { Region: params.Region, headers: params.Headers, method: 'DELETE', + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -284,6 +288,7 @@ function putBucketAcl(params, callback) { headers: headers, action: 'acl', body: xml, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -315,6 +320,7 @@ function getBucketAcl(params, callback) { Region: params.Region, headers: params.Headers, action: 'acl', + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -380,6 +386,7 @@ function putBucketCors(params, callback) { body: xml, action: 'cors', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -411,6 +418,7 @@ function getBucketCors(params, callback) { Region: params.Region, headers: params.Headers, action: 'cors', + tracker: params.tracker, }, function (err, data) { if (err) { @@ -469,6 +477,7 @@ function deleteBucketCors(params, callback) { Region: params.Region, headers: params.Headers, action: 'cors', + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -503,6 +512,7 @@ function getBucketLocation(params, callback) { Region: params.Region, headers: params.Headers, action: 'location', + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -539,6 +549,7 @@ function putBucketPolicy(params, callback) { body: PolicyStr, headers: headers, json: true, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -574,6 +585,7 @@ function getBucketPolicy(params, callback) { headers: params.Headers, action: 'policy', rawBody: true, + tracker: params.tracker, }, function (err, data) { if (err) { @@ -620,6 +632,7 @@ function deleteBucketPolicy(params, callback) { Region: params.Region, headers: params.Headers, action: 'policy', + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -665,6 +678,7 @@ function putBucketTagging(params, callback) { body: xml, action: 'tagging', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -699,6 +713,7 @@ function getBucketTagging(params, callback) { Region: params.Region, headers: params.Headers, action: 'tagging', + tracker: params.tracker, }, function (err, data) { if (err) { @@ -747,6 +762,7 @@ function deleteBucketTagging(params, callback) { Region: params.Region, headers: params.Headers, action: 'tagging', + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -782,6 +798,7 @@ function putBucketLifecycle(params, callback) { body: xml, action: 'lifecycle', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -807,6 +824,7 @@ function getBucketLifecycle(params, callback) { Region: params.Region, headers: params.Headers, action: 'lifecycle', + tracker: params.tracker, }, function (err, data) { if (err) { @@ -846,6 +864,7 @@ function deleteBucketLifecycle(params, callback) { Region: params.Region, headers: params.Headers, action: 'lifecycle', + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -883,6 +902,7 @@ function putBucketVersioning(params, callback) { body: xml, action: 'versioning', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -908,6 +928,7 @@ function getBucketVersioning(params, callback) { Region: params.Region, headers: params.Headers, action: 'versioning', + tracker: params.tracker, }, function (err, data) { if (!err) { @@ -938,6 +959,7 @@ function putBucketReplication(params, callback) { body: xml, action: 'replication', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -963,6 +985,7 @@ function getBucketReplication(params, callback) { Region: params.Region, headers: params.Headers, action: 'replication', + tracker: params.tracker, }, function (err, data) { if (err) { @@ -1004,6 +1027,7 @@ function deleteBucketReplication(params, callback) { Region: params.Region, headers: params.Headers, action: 'replication', + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1061,6 +1085,7 @@ function putBucketWebsite(params, callback) { body: xml, action: 'website', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1096,6 +1121,7 @@ function getBucketWebsite(params, callback) { Key: params.Key, headers: params.Headers, action: 'website', + tracker: params.tracker, }, function (err, data) { if (err) { @@ -1147,6 +1173,7 @@ function deleteBucketWebsite(params, callback) { Region: params.Region, headers: params.Headers, action: 'website', + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1203,6 +1230,7 @@ function putBucketReferer(params, callback) { body: xml, action: 'referer', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1238,6 +1266,7 @@ function getBucketReferer(params, callback) { Key: params.Key, headers: params.Headers, action: 'referer', + tracker: params.tracker, }, function (err, data) { if (err) { @@ -1298,6 +1327,7 @@ function putBucketDomain(params, callback) { body: xml, action: 'domain', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1332,6 +1362,7 @@ function getBucketDomain(params, callback) { Region: params.Region, headers: params.Headers, action: 'domain', + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -1369,6 +1400,7 @@ function deleteBucketDomain(params, callback) { Region: params.Region, headers: params.Headers, action: 'domain', + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1413,6 +1445,7 @@ function putBucketOrigin(params, callback) { body: xml, action: 'origin', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1447,6 +1480,7 @@ function getBucketOrigin(params, callback) { Region: params.Region, headers: params.Headers, action: 'origin', + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -1484,6 +1518,7 @@ function deleteBucketOrigin(params, callback) { Region: params.Region, headers: params.Headers, action: 'origin', + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1528,6 +1563,7 @@ function putBucketLogging(params, callback) { body: xml, action: 'logging', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1562,6 +1598,7 @@ function getBucketLogging(params, callback) { Region: params.Region, headers: params.Headers, action: 'logging', + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -1629,6 +1666,7 @@ function putBucketInventory(params, callback) { id: params['Id'], }, headers: headers, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1667,6 +1705,7 @@ function getBucketInventory(params, callback) { qs: { id: params['Id'], }, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -1727,6 +1766,7 @@ function listBucketInventory(params, callback) { qs: { 'continuation-token': params['ContinuationToken'], }, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -1794,6 +1834,7 @@ function deleteBucketInventory(params, callback) { qs: { id: params['Id'], }, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -1835,6 +1876,7 @@ function putBucketAccelerate(params, callback) { body: xml, action: 'accelerate', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -1856,6 +1898,7 @@ function getBucketAccelerate(params, callback) { Bucket: params.Bucket, Region: params.Region, action: 'accelerate', + tracker: params.tracker, }, function (err, data) { if (!err) { @@ -1891,6 +1934,7 @@ function headObject(params, callback) { Key: params.Key, VersionId: params.VersionId, headers: params.Headers, + tracker: params.tracker, }, function (err, data) { if (err) { @@ -1929,6 +1973,7 @@ function listObjectVersions(params, callback) { headers: params.Headers, qs: reqParams, action: 'versions', + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -2183,6 +2228,7 @@ function postObject(params, callback) { filePath: filePath, TaskId: params.TaskId, onProgress: onProgress, + tracker: params.tracker, }, function (err, data) { onProgress(null, true); @@ -2234,6 +2280,7 @@ function deleteObject(params, callback) { Key: params.Key, headers: params.Headers, VersionId: params.VersionId, + tracker: params.tracker, }, function (err, data) { if (err) { @@ -2282,6 +2329,7 @@ function getObjectAcl(params, callback) { headers: params.Headers, qs: reqParams, action: 'acl', + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -2349,6 +2397,7 @@ function putObjectAcl(params, callback) { action: 'acl', headers: headers, body: xml, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -2385,6 +2434,7 @@ function optionsObject(params, callback) { Region: params.Region, Key: params.Key, headers: headers, + tracker: params.tracker, }, function (err, data) { if (err) { @@ -2477,6 +2527,7 @@ function putObjectCopy(params, callback) { Key: params.Key, VersionId: params.VersionId, headers: params.Headers, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -2529,6 +2580,7 @@ function uploadPartCopy(params, callback) { uploadId: params['UploadId'], }, headers: params.Headers, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -2572,6 +2624,7 @@ function deleteMultipleObject(params, callback) { body: xml, action: 'delete', headers: headers, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -2619,6 +2672,7 @@ function restoreObject(params, callback) { body: xml, action: 'restore', headers: headers, + tracker: params.tracker, }, function (err, data) { callback(err, data); @@ -2659,6 +2713,7 @@ function putObjectTagging(params, callback) { action: 'tagging', headers: headers, VersionId: params.VersionId, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -2696,6 +2751,7 @@ function getObjectTagging(params, callback) { headers: params.Headers, action: 'tagging', VersionId: params.VersionId, + tracker: params.tracker, }, function (err, data) { if (err) { @@ -2747,6 +2803,7 @@ function deleteObjectTagging(params, callback) { headers: params.Headers, action: 'tagging', VersionId: params.VersionId, + tracker: params.tracker, }, function (err, data) { if (err && err.statusCode === 204) { @@ -3121,6 +3178,7 @@ function multipartAbort(params, callback) { Key: params.Key, headers: params.Headers, qs: reqParams, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -3175,6 +3233,7 @@ function appendObject(params, callback) { position: params.Position, }, headers: params.Headers, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -3208,6 +3267,7 @@ function request(params, callback) { Url: params.Url, rawBody: params.RawBody, dataType: params.DataType, + tracker: params.tracker, }, function (err, data) { if (err) return callback(err); @@ -3816,7 +3876,7 @@ function submitRequest(params, callback) { // 更换要签的host SignHost = SignHost.replace(/myqcloud.com/, 'tencentcos.cn'); } - tracker && tracker.setParams({ signStartTime: new Date().getTime(), retryTimes: tryTimes - 1 }); + tracker && tracker.setParams({ signStartTime: new Date().getTime(), httpRetryTimes: tryTimes - 1 }); getAuthorizationAsync.call( self, { @@ -3911,6 +3971,9 @@ function _submitRequest(params, callback) { // 更换请求的url url = url.replace(/myqcloud.com/, 'tencentcos.cn'); } + + const repoterUrl = object ? url : ''; + if (params.action) { url = url + '?' + params.action; } @@ -3972,11 +4035,18 @@ function _submitRequest(params, callback) { .join('&') : ''; var fullUrl = queryString ? opt.url + '?' + queryString : opt.url; - params.tracker && params.tracker.setParams({ reqUrl: fullUrl, accelerate: useAccelerate ? 'Y' : 'N' }); - // 分块上传时给父级tracker设置url信息 - params.tracker && - params.tracker.parent && - params.tracker.parent.setParams({ reqUrl: fullUrl, accelerate: useAccelerate ? 'Y' : 'N' }); + if (params.tracker) { + params.tracker.setParams({ + url: fullUrl, + httpMethod: opt.method, + accelerate: useAccelerate, + httpSize: opt.body?.size || 0, + }); + // 分块上传时给父级tracker设置url信息 + if (params.tracker.parent && !params.tracker.parent.params.url) { + params.tracker.parent.setParams({ url: repoterUrl, accelerate: useAccelerate }); + } + } var sender = REQUEST(opt, function (err, response, body) { if (err === 'abort') return; diff --git a/src/cos.js b/src/cos.js index d25b6b3..4773675 100644 --- a/src/cos.js +++ b/src/cos.js @@ -37,13 +37,14 @@ var defaultOptions = { ForceSignHost: true, // 默认将host加入签名计算,关闭后可能导致越权风险,建议保持为true HttpDNSServiceId: '', // HttpDNS 服务商 Id,填写后代表开启 HttpDNS 服务。HttpDNS 用法详见https://developers.weixin.qq.com/miniprogram/dev/framework/ability/HTTPDNS.html SimpleUploadMethod: 'postObject', // 高级上传内部判断需要走简单上传时,指定的上传方法,可选postObject或putObject - EnableTracker: false, // 默认关闭上报 + AutoSwitchHost: false, + CopySourceParser: null, // 自定义拷贝源解析器 + /** 上报相关配置 **/ DeepTracker: false, // 上报时是否对每个分块上传做单独上报 - Beacon: null, // 灯塔上报组件,如有需要请自行传入 TrackerDelay: 5000, // 周期性上报,单位毫秒。0代表实时上报 CustomId: '', // 自定义上报id - AutoSwitchHost: false, - CopySourceParser: null, // 自定义拷贝源解析器 + BeaconReporter: null, // 灯塔上报组件,如有需要请自行传入,传入即代表开启上报 + ClsReporter: null, // cls 上报组件,如有需要请自行传入,传入即代表开启上报 }; // 对外暴露的类 @@ -58,6 +59,7 @@ var COS = function (options) { this.options.CopySliceSize = Math.max(0, this.options.CopySliceSize); this.options.MaxPartNumber = Math.max(1024, Math.min(10000, this.options.MaxPartNumber)); this.options.Timeout = Math.max(0, this.options.Timeout); + this.options.EnableReporter = this.options.BeaconReporter || this.options.ClsReporter; if (this.options.AppId) { console.warn( 'warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").' diff --git a/src/tracker.js b/src/tracker.js index a325d44..341b964 100644 --- a/src/tracker.js +++ b/src/tracker.js @@ -4,11 +4,11 @@ let beacon = null; const getBeacon = (Beacon, delay) => { if (!beacon) { // 生成 beacon - if (!Beacon || typeof Beacon !== 'function') { + if (typeof Beacon !== 'function') { throw new Error('Beacon not found'); } beacon = new Beacon({ - appkey: '0AND0VEVB24UBGDU', + appkey: '0WEB05PY6MHRGK0U', versionCode: pkg.version, channelID: 'mp_sdk', //渠道,选填 openid: 'openid', // 用户id, 选填 @@ -21,6 +21,12 @@ const getBeacon = (Beacon, delay) => { return beacon; }; +// 毫秒转秒 +const ms2s = function (ms) { + if (!ms || ms < 0) return 0; + return (ms / 1000).toFixed(3); +}; + const utils = { // 生成uid 每个链路对应唯一一条uid getUid() { @@ -29,7 +35,7 @@ const utils = { }; return S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4(); }, - // 获取网络类型 + // 获取网络类型 4g | wifi getNetType() { return new Promise((resolve) => { if (wx.canIUse('getNetworkType')) { @@ -102,30 +108,16 @@ utils.getSystemInfo().then((res) => { Object.assign(deviceInfo, res); }); -// 分块上传原子方法 -const sliceUploadMethods = [ - 'multipartInit', - 'multipartUpload', - 'multipartComplete', - 'multipartList', - 'multipartListPart', - 'multipartAbort', -]; - -const uploadApi = ['putObject', 'postObject', 'appendObject', 'sliceUploadFile', 'uploadFile', 'uploadFiles'].concat( - sliceUploadMethods -); -const downloadApi = ['getObject']; - -function getEventCode(apiName) { - if (uploadApi.includes(apiName)) { - return 'cos_upload'; - } - if (downloadApi.includes(apiName)) { - return 'cos_download'; +const transApiName = (api) => { + if (['putObject', 'sliceUploadFile', 'uploadFile', 'uploadFiles'].includes(api)) { + return 'UploadTask'; + } else if (api === 'getObject') { + return 'DownloadTask'; + } else if (['putObjectCopy', 'sliceCopyFile'].includes(api)) { + return 'CopyTask'; } - return 'base_service'; -} + return api; +}; // 上报参数驼峰改下划线 function camel2underline(key) { @@ -133,72 +125,55 @@ function camel2underline(key) { } function formatParams(params) { const formattedParams = {}; - const allReporterKeys = [ - 'tracePlatform', - 'cossdkVersion', - 'region', + const successKeys = [ + 'sdkVersionName', + 'sdkVersionCode', + 'osName', 'networkType', - 'host', + 'requestName', + 'requestResult', + 'bucket', + 'region', + 'appid', 'accelerate', + 'url', + 'host', 'requestPath', - 'size', + 'userAgent', + 'httpMethod', + 'httpSize', + 'httpSpeed', + 'httpTookTime', 'httpMd5', 'httpSign', - 'httpFull', - 'name', - 'result', - 'tookTime', + 'httpFullTime', + 'httpDomain', + 'partNumber', + 'httpRetryTimes', + 'customId', + 'traceId', + 'realApi', + ]; + const failureKeys = [ + ...successKeys, 'errorNode', 'errorCode', + 'errorName', 'errorMessage', 'errorRequestId', - 'errorStatusCode', + 'errorHttpCode', 'errorServiceName', 'errorType', - 'traceId', - 'bucket', - 'appid', - 'partNumber', - 'retryTimes', - 'reqUrl', - 'customId', 'fullError', - 'devicePlatform', - 'wxVersion', - 'wxSystem', - 'wxSdkVersion', - ]; - const successKeys = [ - 'tracePlatform', - 'cossdkVersion', - 'region', - 'bucket', - 'appid', - 'networkType', - 'host', - 'accelerate', - 'requestPath', - 'partNumber', - 'size', - 'name', - 'result', - 'tookTime', - 'errorRequestId', - 'retryTimes', - 'reqUrl', - 'customId', - 'devicePlatform', - 'wxVersion', - 'wxSystem', - 'wxSdkVersion', ]; // 需要上报的参数字段 - const reporterKeys = params.result === 'Success' ? successKeys : allReporterKeys; + const reporterKeys = params.requestResult === 'Success' ? successKeys : failureKeys; for (let key in params) { if (!reporterKeys.includes(key)) continue; const formattedKey = camel2underline(key); formattedParams[formattedKey] = params[key]; } + formattedParams['request_name'] = params.realApi ? transApiName(params.realApi) : params.requestName; return formattedParams; } @@ -211,6 +186,8 @@ class Tracker { bucket, region, apiName, + realApi, + httpMethod, fileKey, fileSize, accelerate, @@ -218,48 +195,58 @@ class Tracker { delay, deepTracker, Beacon, + clsReporter, } = opt; const appid = (bucket && bucket.substr(bucket.lastIndexOf('-') + 1)) || ''; this.parent = parent; this.deepTracker = deepTracker; this.delay = delay; + if (clsReporter && !this.clsReporter) { + this.clsReporter = clsReporter; + } // 上报用到的字段 this.params = { // 通用字段 - cossdkVersion: pkg.version, - region, + sdkVersionName: 'cos-wx-sdk-v5', + sdkVersionCode: pkg.version, + osName: deviceInfo.devicePlatform, networkType: '', + + requestName: apiName || '', + requestResult: '', // sdk api调用结果Success、Failure + realApi, + + bucket, + region, + accelerate, + httpMethod, + url: '', host: '', - accelerate: accelerate ? 'Y' : 'N', + httpDomain: '', requestPath: fileKey || '', - size: fileSize || -1, - httpMd5: 0, // MD5耗时 - httpSign: 0, // 计算签名耗时 - httpFull: 0, // http请求耗时 - name: apiName || '', - result: '', // sdk api调用结果Success、Fail - tookTime: 0, // 总耗时 - errorNode: '', + + errorType: '', errorCode: '', + errorName: '', errorMessage: '', errorRequestId: '', - errorStatusCode: 0, + errorHttpCode: 0, errorServiceName: '', + errorNode: '', - // 小程序补充字段 - tracePlatform: 'cos-wx-sdk-v5', // 上报平台=小程序 - traceId: traceId || utils.getUid(), // 每条上报唯一标识 - bucket, - appid, - partNumber: 0, // 分块上传编号 - retryTimes: 0, // sdk内部发起的请求重试 - reqUrl: '', // 请求url - customId: customId || '', // 业务id - devicePlatform: deviceInfo.devicePlatform, - wxVersion: deviceInfo.wxVersion, - wxSystem: deviceInfo.wxSystem, - wxSdkVersion: deviceInfo.wxSdkVersion, + httpTookTime: 0, // http整体耗时 + httpSize: fileSize || 0, // 主要是文件大小,大小 B + httpMd5: 0, // MD5耗时 + httpSign: 0, // 计算签名耗时 + httpFullTime: 0, // 任务整体耗时(包括md5、签名等) + httpSpeed: 0, // 主要关注上传速度,KB/s + size: fileSize || 0, + httpMd5: 0, // MD5耗时 + httpSign: 0, // 计算签名耗时 + httpFull: 0, // http请求耗时 + name: apiName || '', + tookTime: 0, // 总耗时 md5StartTime: 0, // md5计算开始时间 md5EndTime: 0, // md5计算结束时间 signStartTime: 0, // 计算签名开始时间 @@ -268,8 +255,18 @@ class Tracker { httpEndTime: 0, // 网路请求结束时间 startTime: new Date().getTime(), // sdk api调用起始时间,不是纯网络耗时 endTime: 0, // sdk api调用结束时间,不是纯网络耗时 + + // 小程序补充字段 + traceId: traceId || utils.getUid(), // 每条上报唯一标识 + appid, + partNumber: 0, // 分块上传编号 + httpRetryTimes: 0, // sdk内部发起的请求重试 + customId: customId || '', // 业务id + partTime: 0, }; - this.beacon = getBeacon(Beacon, delay); + if (Beacon) { + this.beacon = getBeacon(Beacon, delay); + } } // 格式化sdk回调 @@ -292,24 +289,59 @@ class Tracker { * {error: 'message'}或{error: {error: 'message' }} */ const now = new Date().getTime(); - const tookTime = now - this.params.startTime; const networkType = await utils.getNetType(); const errorCode = err ? err?.error?.error?.Code || 'Error' : ''; const errorMessage = err ? err?.error?.error?.Message || err?.error?.error || err?.error || '' : ''; - const errorStatusCode = err ? err?.error?.statusCode : data.statusCode; + const errorName = errorMessage; + const errorHttpCode = err ? err?.error?.statusCode : data.statusCode; const errorServiceName = err ? err?.error?.error?.Resource : ''; const requestId = err ? err?.error?.RequestId || '' : data?.RequestId || ''; const errorType = err ? (requestId ? 'Server' : 'Client') : ''; + + if (this.params.requestName === 'getObject') { + this.params.httpSize = data ? data.headers && data.headers['content-length'] : 0; + } + + // 上报 sliceUploadFile || uploadFile || uploadFiles 命中分块上传时 + const isSliceUploadFile = this.params.realApi === 'sliceUploadFile'; + const isSliceCopyFile = this.params.realApi === 'sliceCopyFile'; + + if (isSliceUploadFile || isSliceCopyFile) { + const speed = this.params.httpSize / 1024 / this.params.partTime; + Object.assign(this.params, { httpSpeed: speed < 0 ? 0 : speed.toFixed(3) }); + } else { + const httpFullTime = now - this.params.startTime; + const httpTookTime = this.params.httpEndTime - this.params.httpStartTime; + const speed = this.params.httpSize / 1024 / (httpTookTime / 1000); + const httpMd5 = this.params.md5EndTime - this.params.md5StartTime; + const httpSign = this.params.signEndTime - this.params.signStartTime; + + if (this.parent) { + this.parent.addParamValue('httpTookTime', ms2s(httpTookTime)); + this.parent.addParamValue('httpFullTime', ms2s(httpFullTime)); + this.parent.addParamValue('httpMd5', ms2s(httpMd5)); + this.parent.addParamValue('httpSign', ms2s(httpSign)); + if (['multipartUpload', 'uploadPartCopy', 'putObjectCopy'].includes(this.params.requestName)) { + // 只有小分块上传|复制才累计纯请求耗时,计算速度时用到 + this.parent.addParamValue('partTime', ms2s(httpTookTime)); + } + } + Object.assign(this.params, { + httpFullTime: ms2s(httpFullTime), + httpMd5: ms2s(httpMd5), + httpSign: ms2s(httpSign), + httpTookTime: ms2s(httpTookTime), + httpSpeed: speed < 0 ? 0 : speed.toFixed(3), + }); + } + Object.assign(this.params, { - tookTime, networkType, - httpMd5: this.params.md5EndTime - this.params.md5StartTime, - httpSign: this.params.signEndTime - this.params.signStartTime, - httpFull: this.params.httpEndTime - this.params.httpStartTime, - result: err ? 'Fail' : 'Success', + requestResult: err ? 'Failure' : 'Success', errorType, errorCode, - errorStatusCode, + errorHttpCode, + errorName, errorMessage, errorServiceName, errorRequestId: requestId, @@ -321,15 +353,28 @@ class Tracker { if (this.params.name === 'getObject') { this.params.size = data ? data.headers && data.headers['content-length'] : -1; } - if (this.params.reqUrl) { + if (this.params.url) { try { - const exec = /^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl); + const exec = /^http(s)?:\/\/(.*?)\//.exec(this.params.url); this.params.host = exec[2]; } catch (e) { - this.params.host = this.params.reqUrl; + this.params.host = this.params.url; } + this.params.httpDomain = this.params.host; + } + } + + // 上报 + async report(err, data) { + if (!this.beacon && !this.clsReporter) return; + await this.formatResult(err, data); + const formattedParams = formatParams(this.params); + if (this.beacon) { + this.sendEventsToBeacon(formattedParams); + } + if (this.clsReporter) { + this.sendEventsToCLS(formattedParams); } - this.sendEvents(); } // 设置当前链路的参数 @@ -337,21 +382,21 @@ class Tracker { Object.assign(this.params, params); } - // 使用灯塔延时上报 - sendEvents() { + addParamValue(key, value) { + this.params[key] = (+this.params[key] + +value).toFixed(3); + } + + // 上报灯塔 + sendEventsToBeacon(formattedParams) { // DeepTracker模式下才会上报分块上传内部细节 - if (sliceUploadMethods.includes(this.params.name) && !this.deepTracker) { + const isSliceUploadFile = + this.params.requestName === 'sliceUploadFile' || this.params.realApi === 'sliceUploadFile'; + if (isSliceUploadFile && !this.deepTracker) { return; } - const eventCode = getEventCode(this.params.name); - const formattedParams = formatParams(this.params); + const eventCode = 'qcloud_track_cos_sdk'; - // 兜底处理 - if (!this.beacon) { - this.beacon = getBeacon(this.delay || 5000); - } - - if (this.params.delay === 0) { + if (this.delay === 0) { // 实时上报 this.beacon && this.beacon.onDirectUserAction(eventCode, formattedParams); } else { @@ -360,6 +405,14 @@ class Tracker { } } + // 上报 cls + sendEventsToCLS(formattedParams) { + // 是否实时上报 + const immediate = !!(this.delay === 0); + + this.clsReporter.log(formattedParams, immediate); + } + // 生成子实例,与父所属一个链路,可用于分块上传内部流程上报单个分块操作 generateSubTracker(subParams) { Object.assign(subParams, { @@ -368,9 +421,11 @@ class Tracker { traceId: this.params.traceId, bucket: this.params.bucket, region: this.params.region, + accelerate: this.params.accelerate, fileKey: this.params.requestPath, customId: this.params.customId, delay: this.params.delay, + clsReporter: this.clsReporter, }); return new Tracker(subParams); } diff --git a/src/util.js b/src/util.js index 869fcee..f6d28bc 100644 --- a/src/util.js +++ b/src/util.js @@ -423,24 +423,30 @@ var apiWrapper = function (apiName, apiFn) { // tracker传递 var tracker; - if (self.options.EnableTracker) { - if (params.calledBySdk === 'sliceUploadFile') { + if (self.options.EnableReporter) { + if (params.calledBySdk === 'sliceUploadFile' || params.calledBySdk === 'sliceCopyFile') { // 分块上传内部方法使用sliceUploadFile的子链路 tracker = params.tracker && params.tracker.generateSubTracker({ apiName }); } else if (['uploadFile', 'uploadFiles'].includes(apiName)) { // uploadFile、uploadFiles方法在内部处理,此处不处理 tracker = null; } else { - var fileSize = -1; + var fileSize = 0; if (params.Body) { fileSize = - typeof params.Body === 'string' ? params.Body.length : params.Body.size || params.Body.byteLength || -1; + typeof params.Body === 'string' ? params.Body.length : params.Body.size || params.Body.byteLength || 0; } + const accelerate = + self.options.UseAccelerate || + (typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.')); tracker = new Tracker({ - Beacon: self.options.Beacon, + Beacon: self.options.BeaconReporter, + clsReporter: self.options.ClsReporter, bucket: params.Bucket, region: params.Region, apiName: apiName, + realApi: apiName, + accelerate, fileKey: params.Key, fileSize: fileSize, deepTracker: self.options.DeepTracker, @@ -463,7 +469,7 @@ var apiWrapper = function (apiName, apiFn) { }; var _callback = function (err, data) { // 格式化上报参数并上报 - tracker && tracker.formatResult(err, data); + tracker && tracker.report(err, data); callback && callback(formatResult(err), formatResult(data)); };