diff --git a/demo-album/lib/cos-wx-sdk-v5.js b/demo-album/lib/cos-wx-sdk-v5.js index 9f5b44a..66f5c4c 100644 --- a/demo-album/lib/cos-wx-sdk-v5.js +++ b/demo-album/lib/cos-wx-sdk-v5.js @@ -5509,653 +5509,6 @@ module.exports = Base64; /***/ }), -/***/ "./lib/beacon_mp.min.js": -/*!******************************!*\ - !*** ./lib/beacon_mp.min.js ***! - \******************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -/*! For license information please see beacon_mp.min.js.LICENSE.txt */ -!function (t, e) { - "object" == ( false ? undefined : _typeof(exports)) && "object" == ( false ? undefined : _typeof(module)) ? module.exports = e() : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined; -}(window, function () { - return function (t) { - var e = {}; - function n(r) { - if (e[r]) return e[r].exports; - var o = e[r] = { - i: r, - l: !1, - exports: {} - }; - return t[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports; - } - return n.m = t, n.c = e, n.d = function (t, e, r) { - n.o(t, e) || Object.defineProperty(t, e, { - enumerable: !0, - get: r - }); - }, n.r = function (t) { - "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { - value: "Module" - }), Object.defineProperty(t, "__esModule", { - value: !0 - }); - }, n.t = function (t, e) { - if (1 & e && (t = n(t)), 8 & e) return t; - if (4 & e && "object" == _typeof(t) && t && t.__esModule) return t; - var r = Object.create(null); - if (n.r(r), Object.defineProperty(r, "default", { - enumerable: !0, - value: t - }), 2 & e && "string" != typeof t) for (var o in t) n.d(r, o, function (e) { - return t[e]; - }.bind(null, o)); - return r; - }, n.n = function (t) { - var e = t && t.__esModule ? function () { - return t["default"]; - } : function () { - return t; - }; - return n.d(e, "a", e), e; - }, n.o = function (t, e) { - return Object.prototype.hasOwnProperty.call(t, e); - }, n.p = "", n(n.s = 6); - }([function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }), e.BEACON_ATTA_REQUEST_URL = e.BEACON_ATTA_TOKEN = e.BEACON_ATTA_ID = e.BEACON_CONFIG_HTTPS_URL = e.BEACON_CONFIG_REQUEST_TIME = e.BEACON_CONFIG = e.BEACON_SENDING_IDS_KEY = e.BEACON_NORMAL_LOG_ID_KEY = e.BEACON_DRIECT_LOG_ID_KEY = e.BEACON_LASE_REPORT_TIME_KEY = e.BEACON_DEVICE_ID_KEY = e.BEACON_STORE_PREFIX = e.BEACON_LOG_ID_KEY = e.BEACON_IS_REALTIME_KEY = e.BEACON_DELAY_DEFAULT = e.BEACON_HTTPS_URL = e.BEACON_HTTP_URL = void 0, e.BEACON_HTTP_URL = "http://oth.eve.mdt.qq.com:8080/analytics/v2_upload", e.BEACON_HTTPS_URL = "https://otheve.beacon.qq.com/analytics/v2_upload", e.BEACON_DELAY_DEFAULT = 3e3, e.BEACON_IS_REALTIME_KEY = "A99", e.BEACON_LOG_ID_KEY = "A100", e.BEACON_STORE_PREFIX = "__BEACON_", e.BEACON_DEVICE_ID_KEY = "__BEACON_deviceId", e.BEACON_LASE_REPORT_TIME_KEY = "last_report_time", e.BEACON_DRIECT_LOG_ID_KEY = "direct_log_id", e.BEACON_NORMAL_LOG_ID_KEY = "normal_log_id", e.BEACON_SENDING_IDS_KEY = "sending_event_ids", e.BEACON_CONFIG = "beacon_config", e.BEACON_CONFIG_REQUEST_TIME = "beacon_config_request_time", e.BEACON_CONFIG_HTTPS_URL = "https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig", e.BEACON_ATTA_ID = "00400014144", e.BEACON_ATTA_TOKEN = "6478159937", e.BEACON_ATTA_REQUEST_URL = "https://h.trace.qq.com/kv"; - }, function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }), e.getEventId = e.replaceSymbol = e.replace = e.assert = void 0; - var r = n(0), - o = n(9); - function i(t) { - if ("string" != typeof t) return t; - try { - return t.replace(new RegExp("\\|", "g"), "%7C").replace(new RegExp("\\&", "g"), "%26").replace(new RegExp("\\=", "g"), "%3D").replace(new RegExp("\\+", "g"), "%2B"); - } catch (t) { - return ""; - } - } - Object.defineProperty(e, "EventEmiter", { - enumerable: !0, - get: function get() { - return o.EventEmiter; - } - }), e.assert = function (t, e) { - if (!t) throw e instanceof Error ? e : new Error(e); - }, e.replace = function (t, e) { - for (var n = {}, r = 0, o = Object.keys(t); r < o.length; r++) { - var s = o[r], - a = t[s]; - if ("string" == typeof a) n[i(s)] = i(a);else { - if (e) throw new Error("value mast be string !!!!"); - n[i(String(s))] = i(String(a)); - } - } - return n; - }, e.replaceSymbol = i, e.getEventId = function (t) { - return String(t[r.BEACON_IS_REALTIME_KEY]) + String(t[r.BEACON_LOG_ID_KEY]); - }; - }, function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }), e.createPipeline = void 0; - var r = function r() {}; - e.createPipeline = function (t) { - if (!t || !t.reduce || !t.length) throw new TypeError("createPipeline 方法需要传入至少有一个 pipe 的数组"); - return 1 === t.length ? function (e, n) { - t[0](e, n || r); - } : t.reduce(function (t, e) { - return function (n, o) { - return void 0 === o && (o = r), t(n, function (t) { - return null == e ? void 0 : e(t, o); - }); - }; - }); - }; - }, function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }); - var r = n(0), - o = function () { - function t(t, e, n, o) { - this.requestParams = {}, this.network = o, this.requestParams.attaid = r.BEACON_ATTA_ID, this.requestParams.token = r.BEACON_ATTA_TOKEN, this.requestParams.product_id = t.appkey, this.requestParams.platform = n, this.requestParams.uin = e.deviceId, this.requestParams.model = "", this.requestParams.os = n, this.requestParams.app_version = t.appVersion, this.requestParams.sdk_version = e.sdkVersion, this.requestParams.error_stack = ""; - } - return t.prototype.reportError = function (t, e) { - this.requestParams._dc = Math.random(), this.requestParams.error_msg = e, this.requestParams.error_code = t, this.network.get(r.BEACON_ATTA_REQUEST_URL, { - params: this.requestParams - }); - }, t; - }(); - e["default"] = o; - }, function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }), e.Config = void 0; - var r = function r() {}; - e.Config = r; - }, function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }); - var r = n(0), - o = function () { - function t(t, e, n, o) { - this.strategy = { - isEventUpOnOff: !0, - httpsUploadUrl: r.BEACON_HTTPS_URL, - requestInterval: 30, - blacklist: [], - samplelist: [] - }, this.realSample = {}, this.appkey = "", this.appkey = t.appkey, this.storage = n; - try { - var i = JSON.parse(this.storage.getItem(r.BEACON_CONFIG)); - i && this.processData(i); - } catch (t) {} - this.needRequestConfig() && this.requestConfig(t.appVersion, e, o); - } - return t.prototype.requestConfig = function (t, e, n) { - var o = this; - this.storage.setItem(r.BEACON_CONFIG_REQUEST_TIME, Date.now().toString()), n.post(r.BEACON_CONFIG_HTTPS_URL, { - platformId: "undefined" == typeof wx ? "3" : "4", - mainAppKey: this.appkey, - appVersion: t, - sdkVersion: e.sdkVersion, - osVersion: e.userAgent, - model: "", - packageName: "", - params: { - A3: e.deviceId - } - }).then(function (t) { - if (0 == t.data.ret) try { - var e = JSON.parse(t.data.beaconConfig); - e && (o.processData(e), o.storage.setItem(r.BEACON_CONFIG, t.data.beaconConfig)); - } catch (t) {} else o.processData(null), o.storage.setItem(r.BEACON_CONFIG, ""); - })["catch"](function (t) {}); - }, t.prototype.processData = function (t) { - var e, n, r, o, i; - this.strategy.isEventUpOnOff = null !== (e = null == t ? void 0 : t.isEventUpOnOff) && void 0 !== e ? e : this.strategy.isEventUpOnOff, this.strategy.httpsUploadUrl = null !== (n = null == t ? void 0 : t.httpsUploadUrl) && void 0 !== n ? n : this.strategy.httpsUploadUrl, this.strategy.requestInterval = null !== (r = null == t ? void 0 : t.requestInterval) && void 0 !== r ? r : this.strategy.requestInterval, this.strategy.blacklist = null !== (o = null == t ? void 0 : t.blacklist) && void 0 !== o ? o : this.strategy.blacklist, this.strategy.samplelist = null !== (i = null == t ? void 0 : t.samplelist) && void 0 !== i ? i : this.strategy.samplelist; - for (var s = 0, a = this.strategy.samplelist; s < a.length; s++) { - var c = a[s].split(","); - 2 == c.length && (this.realSample[c[0]] = c[1]); - } - }, t.prototype.needRequestConfig = function () { - var t = Number(this.storage.getItem(r.BEACON_CONFIG_REQUEST_TIME)); - return Date.now() - t > 60 * this.strategy.requestInterval * 1e3; - }, t.prototype.getUploadUrl = function () { - return this.strategy.httpsUploadUrl + "?appkey=" + this.appkey; - }, t.prototype.isBlackEvent = function (t) { - return -1 != this.strategy.blacklist.indexOf(t); - }, t.prototype.isEventUpOnOff = function () { - return this.strategy.isEventUpOnOff; - }, t.prototype.isSampleEvent = function (t) { - return !!Object.prototype.hasOwnProperty.call(this.realSample, t) && this.realSample[t] < Math.floor(Math.random() * Math.floor(1e4)); - }, t; - }(); - e["default"] = o; - }, function (t, e, n) { - "use strict"; - - var _r, - o = this && this.__extends || (_r = function r(t, e) { - return (_r = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (t, e) { - t.__proto__ = e; - } || function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]); - })(t, e); - }, function (t, e) { - function n() { - this.constructor = t; - } - _r(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n()); - }), - i = this && this.__assign || function () { - return (i = Object.assign || function (t) { - for (var e, n = 1, r = arguments.length; n < r; n++) for (var o in e = arguments[n]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]); - return t; - }).apply(this, arguments); - }, - s = this && this.__importDefault || function (t) { - return t && t.__esModule ? t : { - "default": t - }; - }; - Object.defineProperty(e, "__esModule", { - value: !0 - }), e.WeappOpts = void 0; - var a = s(n(7)), - c = s(n(3)), - u = n(0), - p = n(1), - f = n(4), - l = s(n(5)), - d = function (t) { - function e() { - return null !== t && t.apply(this, arguments) || this; - } - return o(e, t), e; - }(f.Config); - e.WeappOpts = d; - var _ = wx || qq, - h = function (t) { - function e(e) { - var n = t.call(this, e) || this; - return n.send = function (t, e, r) { - if (!n.config.appkey) throw new Error("please call init before"); - n.network.post(n.strategy.getUploadUrl(), t.data).then(function (r) { - 100 == r.data.result ? n.delayTime = 1e3 * r.data.delayTime : n.delayTime = 0, e && e(t.data), n.cleanEvents(t.data.events); - })["catch"](function (e) { - var o = t.data.events; - n.errorReport.reportError(e.code ? e.code.toString() : "600", e.message), r && r(t.data), n.concatEvents(o); - }); - }, n.network = new g(), n.storage = new y(e.appkey), n.initCommonInfo(e, n), n.errorReport = new c["default"](n.config, n.commonInfo, "weapp", n.network), n.strategy = new l["default"](n.config, n.commonInfo, n.storage, n.network), n.storage.setItem(u.BEACON_SENDING_IDS_KEY, JSON.stringify([])), n.onDirectUserAction("rqd_weapp_init", {}), setTimeout(function () { - return n.lifeCycle.emit("init"); - }, 0), n.initDelayTime = e.delay ? e.delay : 2e3, n.cycleSend(n.initDelayTime), n; - } - return o(e, t), e.prototype.initCommonInfo = function (t, e) { - _.getNetworkType({ - success: function success(t) { - e.storage.setItem("nt", t.networkType); - } - }), this.commonInfo = { - deviceId: this.storage.createDeviceId(), - language: "", - query: "", - userAgent: "", - pixel: "", - channelID: t.channelID ? String(t.channelID) : "", - openid: t.openid ? String(t.openid) : "", - unid: t.unionid ? String(t.unionid) : "", - sdkVersion: "4.2.6-weapp" - }, this.config.appVersion = t.versionCode ? String(t.versionCode) : "", this.config.strictMode = t.strictMode; - }, e.prototype.cycleSend = function (t) { - var e = this; - setTimeout(function () { - e.realSend(e.getEvents()), e.cycleSend(0 == e.delayTime ? e.initDelayTime : e.delayTime); - }, t); - }, e.prototype.onReport = function (t, e, n) { - var r = [], - o = "4.2.6-weapp_" + (n ? u.BEACON_DRIECT_LOG_ID_KEY : u.BEACON_NORMAL_LOG_ID_KEY), - s = Number(this.storage.getItem(o)); - s = s || 1, e = i(i({}, e), { - A99: n ? "Y" : "N", - A100: String(s), - A72: this.commonInfo.sdkVersion - }), s++, this.storage.setItem(o, String(s)), r.push({ - eventCode: t, - eventTime: Date.now().toString(), - mapValue: p.replace(e, this.config.strictMode) - }), n && 0 == this.delayTime ? this.realSend(r) : this.concatEvents(r); - }, e.prototype.realSend = function (t) { - var e, n; - if (0 != t.length) { - var r = this.getSystemInfo(), - o = { - appVersion: this.config.appVersion ? p.replaceSymbol(this.config.appVersion) : "", - sdkVersion: "4.2.6-weapp", - sdkId: "weapp", - mainAppKey: this.config.appkey, - platformId: 4, - common: p.replace(i(i({}, this.additionalParams), { - env: "undefined" == typeof qq ? "wechat" : "qq", - A2: this.commonInfo.deviceId, - A8: String(this.commonInfo.openid), - A9: this.getSystemInfo().brand, - A10: encodeURIComponent(r.model), - A12: r.language, - A23: this.commonInfo.channelID, - A33: this.getNetworkType(), - A50: String(this.commonInfo.unid), - A95: r.version, - A102: null === (n = null === (e = getCurrentPages()) || void 0 === e ? void 0 : e.pop()) || void 0 === n ? void 0 : n.route, - A114: encodeURIComponent(r.system), - A115: encodeURIComponent(r.platform), - A116: r.windowWidth + "*" + r.windowHeight + "*" + r.pixelRatio, - A117: this.getUserInfo(), - A118: this.getLocation() - }), !1), - events: t - }; - this._normalLogPipeline(o); - } - }, e.prototype.setUserInfo = function (t) { - this.storage.setItem("ui", JSON.stringify(t.userInfo)); - }, e.prototype.setLocation = function (t) { - this.storage.setItem("lt", JSON.stringify(t)); - }, e.prototype.getSystemInfo = function () { - return _.getSystemInfoSync(); - }, e.prototype.getNetworkType = function () { - return this.storage.getItem("nt"); - }, e.prototype.getUserInfo = function () { - return this.storage.getItem("ui"); - }, e.prototype.getLocation = function () { - return this.storage.getItem("lt"); - }, e.prototype.concatEvents = function (t) { - var e = this.getLocalEvents(); - e = e || {}; - for (var n = 0, r = t; n < r.length; n++) { - var o = r[n], - i = p.getEventId(o.mapValue); - this.removeSendingId(i), e[i] = o; - } - this.setLocalEvents(e); - }, e.prototype.getEvents = function () { - var t = [], - e = [], - n = this.getLocalEvents(); - if (!n) return t; - try { - e = JSON.parse(this.storage.getItem(u.BEACON_SENDING_IDS_KEY)); - } catch (t) {} - for (var r = 0, o = Object.getOwnPropertyNames(n); r < o.length; r++) { - var i = o[r], - s = n[i]; - -1 == e.indexOf(i) && (t.push(s), e.push(i)); - } - return this.storage.setItem(u.BEACON_SENDING_IDS_KEY, JSON.stringify(e)), t; - }, e.prototype.cleanEvents = function (t) { - for (var e = this.getLocalEvents(), n = 0, r = t; n < r.length; n++) { - var o = r[n], - i = p.getEventId(o.mapValue); - this.removeSendingId(i), delete e[i]; - } - this.setLocalEvents(e); - }, e.prototype.setLocalEvents = function (t) { - try { - this.storage.setItem("BEACON_EVENT", JSON.stringify(t)); - } catch (t) {} - }, e.prototype.getLocalEvents = function () { - try { - return JSON.parse(this.storage.getItem("BEACON_EVENT")); - } catch (t) { - return {}; - } - }, e; - }(a["default"]); - e["default"] = h; - var g = function () { - function t() {} - return t.prototype.get = function (t, e) { - return new Promise(function (n, r) { - _.request({ - method: "GET", - data: null == e ? void 0 : e.params, - url: t, - success: function success(t) { - n(t); - }, - fail: function fail(t) { - r(t); - } - }); - }); - }, t.prototype.post = function (t, e, n) { - var r = this; - return new Promise(function (o, i) { - _.request({ - method: "POST", - url: t, - data: e, - success: function success(t) { - var e = { - data: t.data, - status: t.statusCode, - statusText: "", - headers: t.header, - config: n, - request: r - }; - o(e); - }, - fail: function fail(t) { - var e = { - message: t.errMsg, - code: "600", - request: r - }; - i(e); - } - }); - }); - }, t; - }(), - y = function () { - function t(t) { - this.appkey = t; - } - return t.prototype.getItem = function (t) { - try { - return _.getStorageSync(this.getStoreKey(t)); - } catch (t) { - return ""; - } - }, t.prototype.removeItem = function (t) { - try { - _.removeStorageSync(this.getStoreKey(t)); - } catch (t) {} - }, t.prototype.setItem = function (t, e) { - try { - _.setStorageSync(this.getStoreKey(t), e); - } catch (t) {} - }, t.prototype.createDeviceId = function () { - var t = _.getStorageSync("beacon_u"); - return t && "" != t || (t = this.getRandom(36), _.setStorageSync("beacon_u", t)), t; - }, t.prototype.getRandom = function (t) { - return (1e6 * Date.now() + Math.floor(1e6 * Math.random())).toString(t) || ""; - }, t.prototype.getStoreKey = function (t) { - return "beaconV2__" + this.appkey + "_" + t; - }, t; - }(); - }, function (t, e, n) { - "use strict"; - - var r = this && this.__createBinding || (Object.create ? function (t, e, n, r) { - void 0 === r && (r = n), Object.defineProperty(t, r, { - enumerable: !0, - get: function get() { - return e[n]; - } - }); - } : function (t, e, n, r) { - void 0 === r && (r = n), t[r] = e[n]; - }), - o = this && this.__exportStar || function (t, e) { - for (var n in t) "default" === n || e.hasOwnProperty(n) || r(e, t, n); - }, - i = this && this.__importDefault || function (t) { - return t && t.__esModule ? t : { - "default": t - }; - }; - Object.defineProperty(e, "__esModule", { - value: !0 - }); - var s = i(n(8)); - e["default"] = s["default"], o(n(10), e), o(n(2), e), o(n(11), e), o(n(1), e); - }, function (t, e, n) { - "use strict"; - - var r = this && this.__assign || function () { - return (r = Object.assign || function (t) { - for (var e, n = 1, r = arguments.length; n < r; n++) for (var o in e = arguments[n]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]); - return t; - }).apply(this, arguments); - }; - Object.defineProperty(e, "__esModule", { - value: !0 - }); - var o = n(1), - i = n(2), - s = n(1), - a = n(0), - c = function () { - function t(t) { - var e = this; - this.lifeCycle = new o.EventEmiter(), this.uploadJobQueue = [], this.additionalParams = {}, this.delayTime = 0, this._normalLogPipeline = i.createPipeline([function (t) { - e.send({ - url: e.strategy.getUploadUrl(), - data: t, - method: "post", - contentType: "application/json;charset=UTF-8" - }, function () { - var n = e.config.onReportSuccess; - "function" == typeof n && n(JSON.stringify(t.events)); - }, function () { - var n = e.config.onReportFail; - "function" == typeof n && n(JSON.stringify(t.events)); - }); - }]), s.assert(Boolean(t.appkey), "appkey must be initial"), this.config = r({}, t); - } - return t.prototype.onUserAction = function (t, e) { - this.preReport(t, e, !1); - }, t.prototype.onDirectUserAction = function (t, e) { - this.preReport(t, e, !0); - }, t.prototype.preReport = function (t, e, n) { - t ? this.strategy.isEventUpOnOff() && (this.strategy.isBlackEvent(t) || this.strategy.isSampleEvent(t) || this.onReport(t, e, n)) : this.errorReport.reportError("602", " no eventCode"); - }, t.prototype.addAdditionalParams = function (t) { - for (var e = 0, n = Object.keys(t); e < n.length; e++) { - var r = n[e]; - this.additionalParams[r] = t[r]; - } - }, t.prototype.setChannelId = function (t) { - this.commonInfo.channelID = String(t); - }, t.prototype.setOpenId = function (t) { - this.commonInfo.openid = String(t); - }, t.prototype.setUnionid = function (t) { - this.commonInfo.unid = String(t); - }, t.prototype.getDeviceId = function () { - return this.commonInfo.deviceId; - }, t.prototype.getCommonInfo = function () { - return this.commonInfo; - }, t.prototype.removeSendingId = function (t) { - var e = JSON.parse(this.storage.getItem(a.BEACON_SENDING_IDS_KEY)), - n = e.indexOf(t); - -1 != n && (e.splice(n, 1), this.storage.setItem(a.BEACON_SENDING_IDS_KEY, JSON.stringify(e))); - }, t; - }(); - e["default"] = c; - }, function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }), e.EventEmiter = void 0; - var r = function () { - function t() { - var t = this; - this.emit = function (e, n) { - if (t) { - var r, - o = t.__EventsList[e]; - if (null == o ? void 0 : o.length) { - o = o.slice(); - for (var i = 0; i < o.length; i++) { - r = o[i]; - try { - var s = r.callback.apply(t, [n]); - if (1 === r.type && t.remove(e, r.callback), !1 === s) break; - } catch (t) { - throw t; - } - } - } - return t; - } - }, this.__EventsList = {}; - } - return t.prototype.indexOf = function (t, e) { - for (var n = 0; n < t.length; n++) if (t[n].callback === e) return n; - return -1; - }, t.prototype.on = function (t, e, n) { - if (void 0 === n && (n = 0), this) { - var r = this.__EventsList[t]; - if (r || (r = this.__EventsList[t] = []), -1 === this.indexOf(r, e)) { - var o = { - name: t, - type: n || 0, - callback: e - }; - return r.push(o), this; - } - return this; - } - }, t.prototype.one = function (t, e) { - this.on(t, e, 1); - }, t.prototype.remove = function (t, e) { - if (this) { - var n = this.__EventsList[t]; - if (!n) return null; - if (!e) { - try { - delete this.__EventsList[t]; - } catch (t) {} - return null; - } - if (n.length) { - var r = this.indexOf(n, e); - n.splice(r, 1); - } - return this; - } - }, t; - }(); - e.EventEmiter = r; - }, function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }); - }, function (t, e, n) { - "use strict"; - - var r = this && this.__createBinding || (Object.create ? function (t, e, n, r) { - void 0 === r && (r = n), Object.defineProperty(t, r, { - enumerable: !0, - get: function get() { - return e[n]; - } - }); - } : function (t, e, n, r) { - void 0 === r && (r = n), t[r] = e[n]; - }), - o = this && this.__exportStar || function (t, e) { - for (var n in t) "default" === n || e.hasOwnProperty(n) || r(e, t, n); - }; - Object.defineProperty(e, "__esModule", { - value: !0 - }), o(n(3), e), o(n(4), e), o(n(5), e); - }])["default"]; -}); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - /***/ "./lib/crypto.js": /*!***********************!*\ !*** ./lib/crypto.js ***! @@ -8097,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.5.0\",\"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.0\",\"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\"}}"); /***/ }), @@ -9003,6 +8356,7 @@ function _uploadFile() { if (self.options.EnableTracker) { accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); params.tracker = new Tracker({ + Beacon: self.options.Beacon, bucket: params.Bucket, region: params.Region, apiName: 'uploadFile', @@ -9115,6 +8469,7 @@ function _uploadFiles() { if (self.options.EnableTracker) { accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); fileParams.tracker = new Tracker({ + Beacon: self.options.Beacon, bucket: fileParams.Bucket, region: fileParams.Region, apiName: 'uploadFiles', @@ -13510,11 +12865,14 @@ var defaultOptions = { // 默认关闭上报 DeepTracker: false, // 上报时是否对每个分块上传做单独上报 + Beacon: null, + // 灯塔上报组件,如有需要请自行传入 TrackerDelay: 5000, // 周期性上报,单位毫秒。0代表实时上报 CustomId: '', // 自定义上报id - AutoSwitchHost: false + AutoSwitchHost: false, + CopySourceParser: null // 自定义拷贝源解析器 }; // 对外暴露的类 @@ -14000,11 +13358,14 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } var pkg = __webpack_require__(/*! ../package.json */ "./package.json"); -var BeaconAction = __webpack_require__(/*! ../lib/beacon_mp.min */ "./lib/beacon_mp.min.js"); var beacon = null; -var getBeacon = function getBeacon(delay) { +var getBeacon = function getBeacon(Beacon, delay) { if (!beacon) { - beacon = new BeaconAction({ + // 生成 beacon + if (!Beacon || typeof Beacon !== 'function') { + throw new Error('Beacon not found'); + } + beacon = new Beacon({ appkey: '0AND0VEVB24UBGDU', versionCode: pkg.version, channelID: 'mp_sdk', @@ -14154,7 +13515,8 @@ var Tracker = /*#__PURE__*/function () { accelerate = opt.accelerate, customId = opt.customId, delay = opt.delay, - deepTracker = opt.deepTracker; + deepTracker = opt.deepTracker, + Beacon = opt.Beacon; var appid = bucket && bucket.substr(bucket.lastIndexOf('-') + 1) || ''; this.parent = parent; this.deepTracker = deepTracker; @@ -14222,7 +13584,7 @@ var Tracker = /*#__PURE__*/function () { endTime: 0 // sdk api调用结束时间,不是纯网络耗时 }; - this.beacon = getBeacon(delay); + this.beacon = getBeacon(Beacon, delay); } // 格式化sdk回调 @@ -14746,6 +14108,7 @@ var apiWrapper = function apiWrapper(apiName, apiFn) { fileSize = typeof params.Body === 'string' ? params.Body.length : params.Body.size || params.Body.byteLength || -1; } tracker = new Tracker({ + Beacon: self.options.Beacon, bucket: params.Bucket, region: params.Region, apiName: apiName, diff --git a/demo-album/lib/cos-wx-sdk-v5.min.js b/demo-album/lib/cos-wx-sdk-v5.min.js index fc87326..b24b88f 100644 --- a/demo-album/lib/cos-wx-sdk-v5.min.js +++ b/demo-album/lib/cos-wx-sdk-v5.min.js @@ -1,2 +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=9)}([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,a=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,o=Object.create(i.prototype),s=new I(r||[]);return a(o,"_invoke",{value:A(e,n,s)}),o}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(B([])));S&&S!==n&&i.call(S,c)&&(w=S);var E=k.prototype=x.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(r,a,s,c){var l=f(e[r],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==o(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;a(this,"_invoke",{value:function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}})}function A(t,n,r){var i=m;return function(o,a){if(i===g)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(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 O(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,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function R(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 I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function B(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,a=function n(){for(;++r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"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),N(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;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function o(e){return o="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},o(e)}var a=n(11),s=n(13),c=n(14),l=n(19),u=n(4),p=u.btoa,d=wx.getFileSystemManager(),f=n(5);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"===o(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"===o(t)){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(n[e]=t[e])}();R.each({"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-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},E=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)||"")}})}))},T=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,E(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,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,c,"next",e)}function c(e){i(a,r,o,s,c,"throw",e)}s(void 0)}))});return function(e,n,r){return t.apply(this,arguments)}}(),_=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.lengtho)return 1;if(i=0;!t&&e.platform;return function(){return!1,t}}(),R={noop:v,formatParams:S,apiWrapper:function(e,t){return function(n,r){var i,o=this;if("function"==typeof n&&(r=n,n={}),n=S(e,n),o.options.EnableTracker)if("sliceUploadFile"===n.calledBySdk)i=n.tracker&&n.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))i=null;else{var a=-1;n.Body&&(a="string"==typeof n.Body?n.Body.length:n.Body.size||n.Body.byteLength||-1),i=new f({bucket:n.Bucket,region:n.Region,apiName:e,fileKey:n.Key,fileSize:a,deepTracker:o.options.DeepTracker,customId:o.options.CustomId,delay:o.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.";!o.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(!o.options.AppId)return'Bucket should format as "test-1250000000".';n.Bucket=n.Bucket+"-"+o.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(o,n,c)}));if(l)return c({error:l});var p=t.call(o,n,c);return u?p:void 0}},xml2json:c,json2xml:l,md5:a,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?R.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=a(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(_(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(a,!0).join(";").toLowerCase(),w=s.HmacSHA1(y,r).toString(),C=[o,t,R.obj2str(a,!0),R.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:O,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"===o(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=R},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"}),o=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===o.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 O(_,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===o.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,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o,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 Y(e){return e&&e.nodeType===U.TEXT_NODE}function W(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 X(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 O(T,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new O(_,"child not in parent");if(!function(e){return e&&(V(e)||Y(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 O(T,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function J(e,t,n){var r=e.childNodes||[],o=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=o.filter(V);if(a.length>1||i(o,Y))throw new O(T,"More than one element or text in fragment");if(1===a.length&&!W(e,n))throw new O(T,"Element in fragment can not be inserted before doctype")}if(V(t)&&!W(e,n))throw new O(T,"Only one element can be added and only after doctype");if(G(t)){if(i(r,G))throw new O(T,"Only one doctype is allowed");var s=i(r,V);if(n&&r.indexOf(s)1||i(o,Y))throw new O(T,"More than one element or text in fragment");if(1===a.length&&!Q(e,n))throw new O(T,"Element in fragment can not be inserted before doctype")}if(V(t)&&!Q(e,n))throw new O(T,"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 O(T,"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 E=0;E"),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 O=e.publicId,R=e.systemId;if(t.push("");else if(R&&"."!=R)t.push(" SYSTEM ",R,">");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,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 o=t[i];"object"!=typeof o&&o!=r[i]&&(r[i]=o)}switch(t.childNodes&&(r.childNodes=new R),r.ownerDocument=e,r.nodeType){case d:var a=t.attributes,s=r.attributes=new B,c=a.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,$),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 N(this,(function(n){var r=[];return t.length>0&&M(n.documentElement,(function(i){if(i!==n&&i.nodeType===d){var o=i.getAttribute("class");if(o){var a=e===o;if(!a){var s=c(o);a=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}a&&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 R,(t.attributes=new B)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new R,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 oe;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 B;return n.childNodes=new R,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 N(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 N(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(E[T])},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),oe.prototype={nodeName:"#cdata-section",nodeType:h},u(oe,ne),ae.prototype.nodeType=k,u(ae,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(N.prototype,"length",{get:function(){return I(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=ae,t.DOMException=O,t.DOMImplementation=j,t.Element=ee,t.Node=U,t.NodeList=R,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)},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(a,o)},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,o=(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),a=[i(o>>>16),i(o>>>8&255),i(255&o)];return a.length-=[0,0,2,1][n],a.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,o=n.hasOwnProperty,a=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,o=Object.create(i.prototype),s=new I(r||[]);return a(o,"_invoke",{value:A(e,n,s)}),o}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(B([])));S&&S!==n&&o.call(S,c)&&(w=S);var E=k.prototype=x.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(i,a,s,c){var l=f(e[i],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==r(p)&&o.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;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function A(t,n,r){var i=m;return function(o,a){if(i===g)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(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 O(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,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function R(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 I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function B(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,a=function n(){for(;++i=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(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;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function o(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function a(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;o--){var a=r[o];(a[0]===e&&a[1]===t||e!==a[0]&&0===a[0].indexOf(i))&&r.splice(o,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(10);e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(21),a=n(22),s=n(28),c=n(6),l={SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,UploadQueueSize:1e4,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,HttpDNSServiceId:"",SimpleUploadMethod:"postObject",EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",AutoSwitchHost:!1},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),o.init(this)};a.init(u,o),s.init(u,o),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",o="object"===("undefined"==typeof window?"undefined":r(window)),a=o?window:{};a.JS_MD5_NO_WINDOW&&(o=!1),!o&&"object"===("undefined"==typeof self?"undefined":r(self))&&(a=self);var s,c=!a.JS_MD5_NO_COMMON_JS&&"object"===r(e)&&e.exports,l=n(12),u=!a.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)}!a.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!a.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 o,a,s=0,c=e.length,l=this.blocks,p=this.buffer8;s>2]|=e[s]<>6,p[a++]=128|63&o):o<55296||o>=57344?(p[a++]=224|o>>12,p[a++]=128|o>>6&63,p[a++]=128|63&o):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),p[a++]=240|o>>18,p[a++]=128|o>>12&63,p[a++]=128|o>>6&63,p[a++]=128|63&o);else for(a=this.start;s>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(l[a>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=64?(this.start=a-64,this.hash(),this.hashed=!0):this.start=a}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,o,a=this.blocks;this.first?t=((t=((e=((e=a[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(r=((r=(-1732584194^2004318071&e)+a[1]-117830708)<<12|r>>>20)+e<<0)&(-271733879^e))+a[2]-1126478375)<<17|n>>>15)+r<<0)&(r^e))+a[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))+a[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[1]-389564586)<<12|r>>>20)+e<<0)&(e^t))+a[2]+606105819)<<17|n>>>15)+r<<0)&(r^e))+a[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(r^t&(n^r))+a[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[5]+1200080426)<<12|r>>>20)+e<<0)&(e^t))+a[6]-1473231341)<<17|n>>>15)+r<<0)&(r^e))+a[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+a[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[9]-1958414417)<<12|r>>>20)+e<<0)&(e^t))+a[10]-42063)<<17|n>>>15)+r<<0)&(r^e))+a[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+a[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[13]-40341101)<<12|r>>>20)+e<<0)&(e^t))+a[14]-1502002290)<<17|n>>>15)+r<<0)&(r^e))+a[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[1]-165796510)<<5|e>>>27)+t<<0)^t))+a[6]-1069501632)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[11]+643717713)<<14|n>>>18)+r<<0)^r))+a[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[5]-701558691)<<5|e>>>27)+t<<0)^t))+a[10]+38016083)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[15]-660478335)<<14|n>>>18)+r<<0)^r))+a[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[9]+568446438)<<5|e>>>27)+t<<0)^t))+a[14]-1019803690)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[3]-187363961)<<14|n>>>18)+r<<0)^r))+a[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[13]-1444681467)<<5|e>>>27)+t<<0)^t))+a[2]-51403784)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[7]+1735328473)<<14|n>>>18)+r<<0)^r))+a[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[5]-378558)<<4|e>>>28)+t<<0))+a[8]-2022574463)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[11]+1839030562)<<16|n>>>16)+r<<0))+a[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[1]-1530992060)<<4|e>>>28)+t<<0))+a[4]+1272893353)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[7]-155497632)<<16|n>>>16)+r<<0))+a[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[13]+681279174)<<4|e>>>28)+t<<0))+a[0]-358537222)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[3]-722521979)<<16|n>>>16)+r<<0))+a[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[9]-640364487)<<4|e>>>28)+t<<0))+a[12]-421815835)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[15]+530742520)<<16|n>>>16)+r<<0))+a[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[0]-198630844)<<6|e>>>26)+t<<0)|~n))+a[7]+1126891415)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[14]-1416354905)<<15|n>>>17)+r<<0)|~e))+a[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+a[3]-1894986606)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[10]-1051523)<<15|n>>>17)+r<<0)|~e))+a[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+a[15]-30611744)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[6]-1560198380)<<15|n>>>17)+r<<0)|~e))+a[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[4]-145523070)<<6|e>>>26)+t<<0)|~n))+a[11]-1120210379)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[2]+718787259)<<15|n>>>17)+r<<0)|~e))+a[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(),o=0;o<15;)e=i[o++],t=i[o++],n=i[o++],r+=h[e>>>2]+h[63&(e<<4|t>>>4)]+h[63&(t<<2|n>>>6)]+h[63&n];return e=i[o],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=o.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 a.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 a.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=o.extend({reset:function(){this._data=new a.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,o=this.blockSize,s=i/(4*o);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,i=e.min(4*t,i),t){for(var c=0;cl;l++){if(16>l)o[l]=0|e[t+l];else{var u=o[l-3]^o[l-8]^o[l-14]^o[l-16];o[l]=u<<1|u>>>31}u=(r<<5|r>>>27)+c+o[l],u=20>l?u+(1518500249+(i&a|~i&s)):40>l?u+(1859775393+(i^a^s)):60>l?u+((i&a|i&s|a&s)-1894007588):u+((i^a^s)-899497514),c=s,s=a,a=i<<30|i>>>2,i=r,r=u}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|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(a),n.HmacSHA1=i._createHmacHelper(a),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 o=this._oKey=n.clone(),a=this._iKey=n.clone(),s=o.words,c=a.words,l=0;l>>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,s=0;s<4&&o+.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 o=[],a=0,s=0;s>>6-s%4*2;o[a>>>2]|=(l|u)<<24-a%4*8,a++}return c.create(o,a)},_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 o(e,t,n,r){for(var i=0;i0&&o(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,a){return!(r==t.ELEMENT_NODE&&e.xmlElementsFilter.length>0)||o(e.xmlElementsFilter,n,i,a)}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 o(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,o){var a="<"+(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||o(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 o=0;o0)for(var r in e)if(!d(e,r)&&(""==t||m(e,r,v(t,r)))){var i=e[r],o=h(i);if(null==i||null==i)n+=u(i,r,o,!0);else if(i instanceof Object)if(i instanceof Array)n+=y(i,r,o,t);else if(i instanceof Date)n+=u(i,r,o,!1),n+=i.toISOString(),n+=p(i,r);else{f(i)>0||null!=i.__text||null!=i.__cdata?(n+=u(i,r,o,!1),n+=x(i,v(t,r)),n+=p(i,r)):n+=u(i,r,o,!0)}else n+=u(i,r,o,!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(3);t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer,t.DOMParser=n(16).DOMParser},function(e,t,n){var r=n(1),i=n(3),o=n(17),a=n(18),s=i.DOMImplementation,c=r.NAMESPACE,l=a.ParseError,u=a.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,a=n.errorHandler,s=n.locator,l=n.xmlns||{},d=/\/x?html?$/.test(t),m=d?o.HTML_ENTITIES:o.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 o(t){var o=e[t];!o&&i&&(o=2==e.length?function(n){e(t,n)}:e),r[t]=o&&function(e){o("[xmldom "+t+"]\t"+e+function(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(n))}||function(){}}return n=n||{},o("warning"),o("error"),o("fatalError"),r}(a,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,o=i.createElementNS(e,n||t),a=r.length;g(this,o),this.currentElement=o,this.locator&&m(this.locator,o);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]/,o=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+i.source+o.source+"*(?::"+i.source+o.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,o,a){function h(e,t,r){n.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,o),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&&(a.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),a.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 a.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?(a.warning('attribute "'+b+'" missed quot(")!'),h(g,b,t)):(r.isHTML(i[""])&&b.match(/^(?:disabled|checked|selected)$/i)||a.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);a.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)||a.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),h(g,g,t),t=v,y=c;break;case d:a.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,o=null,a=e.length;a--;){var s=e[a],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==o&&(o={},w(n,n={})),n[d]=o[d]=l,s.uri=r.XMLNS,t.startPrefixMapping(d,l))}for(a=e.length;a--;){(u=(s=e[a]).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=o,!0;if(t.endElement(m,p,i),o)for(u in o)Object.prototype.hasOwnProperty.call(o,u)&&t.endPrefixMapping(u)}function b(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}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 o=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),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],c=!1,l=!1;a>3&&(/^public$/i.test(o[2][0])?(c=o[3][0],l=a>4&&o[4][0]):/^system$/i.test(o[2][0])&&(l=o[3][0]));var u=o[a-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 E(){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,o){function a(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)?a(parseInt(t.substr(1).replace("x","0x"))):(o.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 T=e.indexOf("<",w);if(T<0){if(!e.substr(w).match(/^\s*$/)){var _=i.doc,A=_.createTextNode(e.substr(w));_.appendChild(A),i.currentElement=A}return}switch(T>w&&c(T),e.charAt(T+1)){case"/":var O=e.indexOf(">",T+3),R=e.substring(T+2,O).replace(/[ \t\n\r]+$/g,""),N=m.pop();O<0?(R=e.substring(T+2).replace(/[\s<].*/,""),o.error("end tag name: "+R+" is not complete:"+N.tagName),O=T+1+R.length):R.match(/\sw?w=O:c(Math.max(T,w)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},E.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!a.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"),o=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,a=function(e){var t=[];if(e instanceof Object)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},s=function(e,t){var r=function(e,n,r,o,a){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(o).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(i,"_"));var l=[c,"<",e,r||""];return n&&n.length>0?(l.push(">"),l.push(n),a&&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,a(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(o,""):""+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){(function(e){var n,r,i,o;function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e) -/*! For license information please see beacon_mp.min.js.LICENSE.txt */}window,o=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"==a(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="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BEACON_ATTA_REQUEST_URL=t.BEACON_ATTA_TOKEN=t.BEACON_ATTA_ID=t.BEACON_CONFIG_HTTPS_URL=t.BEACON_CONFIG_REQUEST_TIME=t.BEACON_CONFIG=t.BEACON_SENDING_IDS_KEY=t.BEACON_NORMAL_LOG_ID_KEY=t.BEACON_DRIECT_LOG_ID_KEY=t.BEACON_LASE_REPORT_TIME_KEY=t.BEACON_DEVICE_ID_KEY=t.BEACON_STORE_PREFIX=t.BEACON_LOG_ID_KEY=t.BEACON_IS_REALTIME_KEY=t.BEACON_DELAY_DEFAULT=t.BEACON_HTTPS_URL=t.BEACON_HTTP_URL=void 0,t.BEACON_HTTP_URL="http://oth.eve.mdt.qq.com:8080/analytics/v2_upload",t.BEACON_HTTPS_URL="https://otheve.beacon.qq.com/analytics/v2_upload",t.BEACON_DELAY_DEFAULT=3e3,t.BEACON_IS_REALTIME_KEY="A99",t.BEACON_LOG_ID_KEY="A100",t.BEACON_STORE_PREFIX="__BEACON_",t.BEACON_DEVICE_ID_KEY="__BEACON_deviceId",t.BEACON_LASE_REPORT_TIME_KEY="last_report_time",t.BEACON_DRIECT_LOG_ID_KEY="direct_log_id",t.BEACON_NORMAL_LOG_ID_KEY="normal_log_id",t.BEACON_SENDING_IDS_KEY="sending_event_ids",t.BEACON_CONFIG="beacon_config",t.BEACON_CONFIG_REQUEST_TIME="beacon_config_request_time",t.BEACON_CONFIG_HTTPS_URL="https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",t.BEACON_ATTA_ID="00400014144",t.BEACON_ATTA_TOKEN="6478159937",t.BEACON_ATTA_REQUEST_URL="https://h.trace.qq.com/kv"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventId=t.replaceSymbol=t.replace=t.assert=void 0;var r=n(0),i=n(9);function o(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(e){return""}}Object.defineProperty(t,"EventEmiter",{enumerable:!0,get:function(){return i.EventEmiter}}),t.assert=function(e,t){if(!e)throw t instanceof Error?t:new Error(t)},t.replace=function(e,t){for(var n={},r=0,i=Object.keys(e);r60*this.strategy.requestInterval*1e3},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e)},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]e.options.UploadQueueSize;){var n="waiting"===a[t].state||"checking"===a[t].state||"uploading"===a[t].state;a[t]&&n?t++:(s[a[t].id]&&delete s[a[t].id],a.splice(t,1),l--)}p()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;a[l]&&"waiting"!==a[l].state;)l++;if(!(l>=a.length)){var n=a[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);o[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 o=i&&"waiting"===i.state,a=i&&("checking"===i.state||"uploading"===i.state);if("canceled"===n&&"canceled"!==i.state||"paused"===n&&o||"paused"===n&&a){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(),a&&(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,o){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:a.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,a.push(u),u.size=t,!o&&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(a,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||(o="{Bucket}."+o)),o=(o=o.replace(/\{\{AppId\}\}/gi,r).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,a).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,r).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,a).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(o)||(o="https://"+o),"/"===o.slice(-1)&&(o=o.slice(0,-1));var c=o;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 o=!1!==e.ForceSignHost;!r&&e.SignHost&&o&&(n.Host=e.SignHost);var a=!1,s=function(e,n){a||(a=!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:o}),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:o},(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:o}),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,o=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var a=e.error.Code,s=e.error.Message;("RequestTimeTooSkewed"===a||"AccessDenied"===a&&"Request has expired"===s)&&(r=!0)}catch(e){}if(e){if(r&&o){var c=Date.parse(o);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 o=e.url||e.Url,a=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:o}),s=e.tracker;!function i(o){var c=n.options.SystemClockOffset;e.SwitchHost&&(a=a.replace(/myqcloud.com/,"tencentcos.cn")),s&&s.setParams({signStartTime:(new Date).getTime(),retryTimes:o-1}),u.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:r,Headers:e.headers,SignHost:a,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(r,a){r?t(r):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=a,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&&o<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==a?void 0:a.SignFrom),networkError:f});e.SwitchHost=h,i(o+1)}else t(r,l)})))}))}(1)}function m(e,t){var n=this,o=e.TaskId;if(!o||n._isRunningTask(o)){var a=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:a,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(!o||n._isRunningTask(o)){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,a){if("abort"!==e){var s,c=function(e,a){if(o&&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)):(a=i.extend(a||{},c),t(null,a)),w=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=a;else try{l=a&&a.indexOf("<")>-1&&a.indexOf(">")>-1&&i.xml2json(a)||{}}catch(e){l=a||{}}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===o&&(w&&w.abort&&w.abort(),n.off("inner-kill-task",e))};o&&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,o=e.Region;r?(r=r.replace(/\{\{Region\}\}/gi,o||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(r)||(r=n+"//"+r),"/"===r.slice(-1)&&(r=r.slice(0,-1))):r=o?n+"//cos."+o+".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 o=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:r,Owner:o,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,r="";if(e.BucketAZConfig){var o={BucketAZConfig:e.BucketAZConfig};r=i.json2xml({CreateBucketConfiguration:o})}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 o=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:o,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||{},o=r.Contents||[],a=r.CommonPrefixes||[];o=i.isArray(o)?o:[o],a=i.isArray(a)?a:[a];var s=i.clone(r);i.extend(s,{Contents:o,CommonPrefixes:a,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 o=i.clone(e.AccessControlPolicy||{}),a=o.Grants||o.Grant;a=i.isArray(a)?a:[a],delete o.Grant,delete o.Grants,o.AccessControlList={Grant:a},r=i.json2xml({AccessControlPolicy:o}),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||{},o=r.Owner||{},s=r.AccessControlList.Grant||[];s=i.isArray(s)?s:[s];var c=a(r);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=i.extend(c,{Owner:o,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 o=i.json2xml({CORSConfiguration:r}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"cors",headers:a},(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 o=n.CORSConfiguration||{},a=o.CORSRules||o.CORSRule||[];a=i.clone(i.isArray(a)?a:[a]);var s=o.ResponseVary;i.each(a,(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:a,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 o=e.Headers;o["Content-Type"]="application/json",o["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:o,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 o=i.json2xml({Tagging:{TagSet:{Tag:r}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"tagging",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})}))},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 o=[];try{o=n.Tagging.TagSet.Tag||[]}catch(e){}o=i.clone(i.isArray(o)?o:[o]),t(null,{Tags:o,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}}),o=e.Headers;o["Content-Type"]="application/xml",o["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: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})}))},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 o=[];try{o=n.LifecycleConfiguration.Rule||[]}catch(e){}o=i.clone(i.isArray(o)?o:[o]),t(null,{Rules:o,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}),o=e.Headers;o["Content-Type"]="application/xml",o["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: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 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 o=e.Headers;o["Content-Type"]="application/xml",o["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: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})}))},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 o=i.json2xml({WebsiteConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"website",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 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 o=n.WebsiteConfiguration||{};if(o.RoutingRules){var a=i.clone(o.RoutingRules.RoutingRule||[]);a=i.makeArray(a),o.RoutingRules=a}t(null,{WebsiteConfiguration:o,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||{},o=r.Domains||r.Domain||[];(o=i.isArray(o)?o:[o]).length&&(n.DomainList={Domain:o});var a=i.json2xml({RefererConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,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 o=n.RefererConfiguration||{};if(o.DomainList){var a=i.makeArray(o.DomainList.Domain||[]);o.DomainList={Domains:a}}t(null,{RefererConfiguration:o,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}}),o=e.Headers;o["Content-Type"]="application/xml",o["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: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})}))},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}}),o=e.Headers;o["Content-Type"]="application/xml",o["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: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})}))},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 o=n.Destination.COSBucketDestination.Encryption;Object.keys(o).indexOf("SSECOS")>-1&&(o["SSE-COS"]=o.SSECOS,delete o.SSECOS)}var a=i.json2xml({InventoryConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,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 o=r.OptionalFields.Field;i.isArray(o)||(o=[o]),r.OptionalFields=o}if(r.Destination&&r.Destination.COSBucketDestination&&r.Destination.COSBucketDestination.Encryption){var a=r.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSE-COS")>-1&&(a.SSECOS=a["SSE-COS"],delete a["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,o=r.InventoryConfiguration||[];o=i.isArray(o)?o:[o],delete r.InventoryConfiguration,i.each(o,(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=o,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),o={"Content-Type":"application/xml"};o["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:o},(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||"",o=e.tracker;o&&o.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:o},(function(n,r){if(n){var o=n.statusCode;return e.Headers["If-Modified-Since"]&&o&&304===o?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 o=n.statusCode;return e.Headers["If-Modified-Since"]&&o&&304===o?t(null,{NotModified:!0,statusCode:o}):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||{},o=r.DeleteMarker||[];o=i.isArray(o)?o:[o];var a=r.Version||[];a=i.isArray(a)?a:[a];var s=i.clone(r);delete s.DeleteMarker,delete s.Version,i.extend(s,{DeleteMarkers:o,Versions:a,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},putObject:function(e,t){var n=this,r=e.ContentLength,a=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"]=o.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(o){o&&(u&&u.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(s["Content-MD5"]=i.binaryBase64(o)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=o)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),a(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:a,tracker:u},(function(o,s){if(o)return a(null,!0),t(o);a({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={},o=e.FilePath;if(o){for(var a 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)a.indexOf("x-cos-meta-")>-1&&(r[a]=e[a]);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:o,TaskId:e.TaskId,onProgress:s},(function(r,i){if(s(null,!0),r)return t(r);if(i&&i.headers){var a=i.headers,l=a.etag||a.Etag||a.ETag||"",u=o.substr(o.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:a,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||{},o=r.Owner||{},s=r.AccessControlList&&r.AccessControlList.Grant||[];s=i.isArray(s)?s:[s];var c=a(r);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=i.extend(c,{Owner:o,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,r="";if(e.AccessControlPolicy){var o=i.clone(e.AccessControlPolicy||{}),a=o.Grants||o.Grant;a=i.isArray(a)?a:[a],delete o.Grant,delete o.Grants,o.AccessControlList={Grant:a},r=i.json2xml({AccessControlPolicy:o}),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||"",o=i.getSourceParams.call(this,r);if(o){var a=o.Bucket,s=o.Region,c=decodeURIComponent(o.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,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 o=i.json2xml({Delete:{Object:n,Quiet:r||!1}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o));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:o,action:"delete",headers:a},(function(e,n){if(e)return t(e);var r=n.DeleteResult||{},o=r.Deleted||[],a=r.Error||[];o=i.isArray(o)?o:[o],a=i.isArray(a)?a:[a];var s=i.clone(r);i.extend(s,{Error:a,Deleted:o,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var r=e.RestoreRequest||{},o=i.json2xml({RestoreRequest:r});n["Content-Type"]="application/xml",n["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:o,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 o=i.json2xml({Tagging:{TagSet:{Tag:r}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:o,action:"tagging",headers:a,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 o=[];try{o=n.Tagging.TagSet.Tag||[]}catch(e){}o=i.clone(i.isArray(o)?o:[o]),t(null,{Tags:o,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 o=r.Bucket,a=r.Region,s=decodeURIComponent(r.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:o,region:a,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"]=o.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,o=n.options.UploadCheckContentMd5;o&&r&&r.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(o,e.Body,(function(a){a&&(e.Headers["Content-MD5"]=i.binaryBase64(a),o&&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,o=e.Parts,a=e.tracker,s=0,l=o.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),a&&(r+="&"+a),setTimeout((function(){t(null,{Url:r})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),a&&(s+="&"+a)):a&&(s+="?"+a),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,o,a=[],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]);o["x-cos-acl"]&&(f.acl=o["x-cos-acl"]),!f["Content-Type"]&&(f["Content-Type"]=""),(n=wx.uploadFile({url:a,method:s,name:"file",header:o,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&&(a+=(a.indexOf("?")>-1?"&":"?")+g),o["Content-Length"]&&delete o["Content-Length"];var v={url:a,method:s,header:o,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(25);e.exports=new r(n(26),n(27))},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 a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(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;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(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 o(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,c,"next",e)}function c(e){o(a,r,i,s,c,"throw",e)}s(void 0)}))}}var s=n(8),c=n(29),l=n(7).EventProxy,u=n(0),p=n(5);function d(e,t){var n=e.TaskId,r=e.Bucket,i=e.Region,o=e.Key,a=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(o){if(o=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 a(l+1);s.using[d]?a(l+1):m.call(p,{Bucket:r,Region:i,Key:o,UploadId:d,tracker:e.tracker},(function(e,t){p._isRunningTask(n)&&(e?(s.removeUploadId(d),a(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:o,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===o&&(!a||e.StorageClass.toUpperCase()===a.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,o);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,o){if(n)return t(n);r.push.apply(r,o.Upload||[]),"true"===o.IsTruncated?(i.KeyMarker=o.NextKeyMarker,i.UploadIdMarker=o.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,o){if(n)return t(n);r.push.apply(r,o.Part||[]),"true"===o.IsTruncated?(i.PartNumberMarker=o.NextPartNumberMarker,e()):t(null,{PartList:r})}))}()}function h(e,t){var n=this,r=e.TaskId,i=e.Bucket,o=e.Region,a=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:o,Key:a,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,o=e.Region,a=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:o,Key:a,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,o=e.UploadId,a=e.SliceList,s=this,l=this.options.ChunkRetryTimes+1,u=a.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));c.retry(l,(function(t){s.multipartComplete({Bucket:n,Region:r,Key:i,UploadId:o,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,o=e.AbortArray,a=e.AsyncLimit||1,s=this,l=0,u=new Array(o.length);c.eachLimit(o,a,(function(t,o){var a=l;if(i&&i!==t.Key)return u[a]={error:{KeyNotMatch:!0}},void o(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[a]={error:e,task:i},o(null)})),l++}),(function(e){if(e)return t(e);for(var n=[],r=[],i=0,o=u.length;ia?"sliceUploadFile":g,s.push({api:v,params:t,callback:h}),o._addTasks(s);case 23:case"end":return e.stop()}}),e,this,[[3,9]])})))).apply(this,arguments)}function b(){return b=a(r().mark((function e(t,n){var o,s,c,l,d,f,m,h,g,v,y;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this,s=void 0===t.SliceSize?o.options.SliceSize:t.SliceSize,c=0,l=0,d=u.throttleOnProgress.call(o,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=a(r().mark((function n(a){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,o.options.EnableTracker&&(h=o.options.UseAccelerate||"string"==typeof o.options.Domain&&o.options.Domain.includes("accelerate."),e.tracker=new p({bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:f,accelerate:h,deepTracker:o.options.DeepTracker,customId:o.options.CustomId,delay:o.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"===o.options.SimpleUploadMethod?"postObject":"putObject",S=f>s?"sliceUploadFile":C,v.push({api:S,params:e,callback:w}),a(!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:o._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,o=e.Key,a=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:o,CopySource:a,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,o=new l,a=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}),o.on("error",(function(r){if(n._isRunningTask(a)){var i={UploadId:e.UploadData.UploadId||"",err:r,error:r};return t(i)}})),o.on("upload_complete",(function(n){var r=u.extend({UploadId:e.UploadData.UploadId||""},n);t(null,r)})),o.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(a)){if(s.removeUsing(e.UploadId),t)return i(null,!0),o.emit("error",t);s.removeUploadId(e.UploadId),i({loaded:r,total:r},!0),o.emit("upload_complete",c)}}))})),o.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:a,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(a))return e?(i(null,!0),o.emit("error",e)):void o.emit("upload_slice_complete",t)}))})),o.on("get_file_size_finish",(function(){if(i=u.throttleOnProgress.call(n,r,e.onProgress),e.UploadData.UploadId)o.emit("get_upload_data_finish",e.UploadData);else{var t=u.extend({TaskId:a,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(a)){if(t)return o.emit("error",t);e.UploadData.UploadId=r.UploadId,e.UploadData.PartList=r.PartList,o.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,o=0;o=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:o,Key:a,CopySource:p,UploadId:e.UploadId,PartNumber:s,CopySourceRange:l,onProgress:function(e){E+=e.loaded-d,d=e.loaded,x({loaded:E,total:y})}},t)}),(function(e,r){if(e)return n(e);x({loaded:E,total:y}),E+=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:o,Key:a,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,T,b,i,a),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:o,Key:a,UploadId:p},(function(r,i){if(r)s.removeUploadId(p),t(l+1);else{if(s.using[p])return t(l+1);var o={},a=0;u.each(i.PartList,(function(e){var t=parseInt(e.Size),n=a+t-1;o[e.PartNumber+"|"+a+"|"+n]=e.ETag,a+=t})),u.each(e.PartList,(function(e){var t=o[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&&(_[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,o=0,a=0;!function s(){if(i>=e.length)return r();for(;a=e.length?r():s())}))}()},retry:function(e,t,n){e<1?n():function r(i){t((function(t,o){t&&i=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 23: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 60 * this.strategy.requestInterval * 1e3; - }, t.prototype.getUploadUrl = function () { - return this.strategy.httpsUploadUrl + "?appkey=" + this.appkey; - }, t.prototype.isBlackEvent = function (t) { - return -1 != this.strategy.blacklist.indexOf(t); - }, t.prototype.isEventUpOnOff = function () { - return this.strategy.isEventUpOnOff; - }, t.prototype.isSampleEvent = function (t) { - return !!Object.prototype.hasOwnProperty.call(this.realSample, t) && this.realSample[t] < Math.floor(Math.random() * Math.floor(1e4)); - }, t; - }(); - e["default"] = o; - }, function (t, e, n) { - "use strict"; - - var _r, - o = this && this.__extends || (_r = function r(t, e) { - return (_r = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (t, e) { - t.__proto__ = e; - } || function (t, e) { - for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]); - })(t, e); - }, function (t, e) { - function n() { - this.constructor = t; - } - _r(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n()); - }), - i = this && this.__assign || function () { - return (i = Object.assign || function (t) { - for (var e, n = 1, r = arguments.length; n < r; n++) for (var o in e = arguments[n]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]); - return t; - }).apply(this, arguments); - }, - s = this && this.__importDefault || function (t) { - return t && t.__esModule ? t : { - "default": t - }; - }; - Object.defineProperty(e, "__esModule", { - value: !0 - }), e.WeappOpts = void 0; - var a = s(n(7)), - c = s(n(3)), - u = n(0), - p = n(1), - f = n(4), - l = s(n(5)), - d = function (t) { - function e() { - return null !== t && t.apply(this, arguments) || this; - } - return o(e, t), e; - }(f.Config); - e.WeappOpts = d; - var _ = wx || qq, - h = function (t) { - function e(e) { - var n = t.call(this, e) || this; - return n.send = function (t, e, r) { - if (!n.config.appkey) throw new Error("please call init before"); - n.network.post(n.strategy.getUploadUrl(), t.data).then(function (r) { - 100 == r.data.result ? n.delayTime = 1e3 * r.data.delayTime : n.delayTime = 0, e && e(t.data), n.cleanEvents(t.data.events); - })["catch"](function (e) { - var o = t.data.events; - n.errorReport.reportError(e.code ? e.code.toString() : "600", e.message), r && r(t.data), n.concatEvents(o); - }); - }, n.network = new g(), n.storage = new y(e.appkey), n.initCommonInfo(e, n), n.errorReport = new c["default"](n.config, n.commonInfo, "weapp", n.network), n.strategy = new l["default"](n.config, n.commonInfo, n.storage, n.network), n.storage.setItem(u.BEACON_SENDING_IDS_KEY, JSON.stringify([])), n.onDirectUserAction("rqd_weapp_init", {}), setTimeout(function () { - return n.lifeCycle.emit("init"); - }, 0), n.initDelayTime = e.delay ? e.delay : 2e3, n.cycleSend(n.initDelayTime), n; - } - return o(e, t), e.prototype.initCommonInfo = function (t, e) { - _.getNetworkType({ - success: function success(t) { - e.storage.setItem("nt", t.networkType); - } - }), this.commonInfo = { - deviceId: this.storage.createDeviceId(), - language: "", - query: "", - userAgent: "", - pixel: "", - channelID: t.channelID ? String(t.channelID) : "", - openid: t.openid ? String(t.openid) : "", - unid: t.unionid ? String(t.unionid) : "", - sdkVersion: "4.2.6-weapp" - }, this.config.appVersion = t.versionCode ? String(t.versionCode) : "", this.config.strictMode = t.strictMode; - }, e.prototype.cycleSend = function (t) { - var e = this; - setTimeout(function () { - e.realSend(e.getEvents()), e.cycleSend(0 == e.delayTime ? e.initDelayTime : e.delayTime); - }, t); - }, e.prototype.onReport = function (t, e, n) { - var r = [], - o = "4.2.6-weapp_" + (n ? u.BEACON_DRIECT_LOG_ID_KEY : u.BEACON_NORMAL_LOG_ID_KEY), - s = Number(this.storage.getItem(o)); - s = s || 1, e = i(i({}, e), { - A99: n ? "Y" : "N", - A100: String(s), - A72: this.commonInfo.sdkVersion - }), s++, this.storage.setItem(o, String(s)), r.push({ - eventCode: t, - eventTime: Date.now().toString(), - mapValue: p.replace(e, this.config.strictMode) - }), n && 0 == this.delayTime ? this.realSend(r) : this.concatEvents(r); - }, e.prototype.realSend = function (t) { - var e, n; - if (0 != t.length) { - var r = this.getSystemInfo(), - o = { - appVersion: this.config.appVersion ? p.replaceSymbol(this.config.appVersion) : "", - sdkVersion: "4.2.6-weapp", - sdkId: "weapp", - mainAppKey: this.config.appkey, - platformId: 4, - common: p.replace(i(i({}, this.additionalParams), { - env: "undefined" == typeof qq ? "wechat" : "qq", - A2: this.commonInfo.deviceId, - A8: String(this.commonInfo.openid), - A9: this.getSystemInfo().brand, - A10: encodeURIComponent(r.model), - A12: r.language, - A23: this.commonInfo.channelID, - A33: this.getNetworkType(), - A50: String(this.commonInfo.unid), - A95: r.version, - A102: null === (n = null === (e = getCurrentPages()) || void 0 === e ? void 0 : e.pop()) || void 0 === n ? void 0 : n.route, - A114: encodeURIComponent(r.system), - A115: encodeURIComponent(r.platform), - A116: r.windowWidth + "*" + r.windowHeight + "*" + r.pixelRatio, - A117: this.getUserInfo(), - A118: this.getLocation() - }), !1), - events: t - }; - this._normalLogPipeline(o); - } - }, e.prototype.setUserInfo = function (t) { - this.storage.setItem("ui", JSON.stringify(t.userInfo)); - }, e.prototype.setLocation = function (t) { - this.storage.setItem("lt", JSON.stringify(t)); - }, e.prototype.getSystemInfo = function () { - return _.getSystemInfoSync(); - }, e.prototype.getNetworkType = function () { - return this.storage.getItem("nt"); - }, e.prototype.getUserInfo = function () { - return this.storage.getItem("ui"); - }, e.prototype.getLocation = function () { - return this.storage.getItem("lt"); - }, e.prototype.concatEvents = function (t) { - var e = this.getLocalEvents(); - e = e || {}; - for (var n = 0, r = t; n < r.length; n++) { - var o = r[n], - i = p.getEventId(o.mapValue); - this.removeSendingId(i), e[i] = o; - } - this.setLocalEvents(e); - }, e.prototype.getEvents = function () { - var t = [], - e = [], - n = this.getLocalEvents(); - if (!n) return t; - try { - e = JSON.parse(this.storage.getItem(u.BEACON_SENDING_IDS_KEY)); - } catch (t) {} - for (var r = 0, o = Object.getOwnPropertyNames(n); r < o.length; r++) { - var i = o[r], - s = n[i]; - -1 == e.indexOf(i) && (t.push(s), e.push(i)); - } - return this.storage.setItem(u.BEACON_SENDING_IDS_KEY, JSON.stringify(e)), t; - }, e.prototype.cleanEvents = function (t) { - for (var e = this.getLocalEvents(), n = 0, r = t; n < r.length; n++) { - var o = r[n], - i = p.getEventId(o.mapValue); - this.removeSendingId(i), delete e[i]; - } - this.setLocalEvents(e); - }, e.prototype.setLocalEvents = function (t) { - try { - this.storage.setItem("BEACON_EVENT", JSON.stringify(t)); - } catch (t) {} - }, e.prototype.getLocalEvents = function () { - try { - return JSON.parse(this.storage.getItem("BEACON_EVENT")); - } catch (t) { - return {}; - } - }, e; - }(a["default"]); - e["default"] = h; - var g = function () { - function t() {} - return t.prototype.get = function (t, e) { - return new Promise(function (n, r) { - _.request({ - method: "GET", - data: null == e ? void 0 : e.params, - url: t, - success: function success(t) { - n(t); - }, - fail: function fail(t) { - r(t); - } - }); - }); - }, t.prototype.post = function (t, e, n) { - var r = this; - return new Promise(function (o, i) { - _.request({ - method: "POST", - url: t, - data: e, - success: function success(t) { - var e = { - data: t.data, - status: t.statusCode, - statusText: "", - headers: t.header, - config: n, - request: r - }; - o(e); - }, - fail: function fail(t) { - var e = { - message: t.errMsg, - code: "600", - request: r - }; - i(e); - } - }); - }); - }, t; - }(), - y = function () { - function t(t) { - this.appkey = t; - } - return t.prototype.getItem = function (t) { - try { - return _.getStorageSync(this.getStoreKey(t)); - } catch (t) { - return ""; - } - }, t.prototype.removeItem = function (t) { - try { - _.removeStorageSync(this.getStoreKey(t)); - } catch (t) {} - }, t.prototype.setItem = function (t, e) { - try { - _.setStorageSync(this.getStoreKey(t), e); - } catch (t) {} - }, t.prototype.createDeviceId = function () { - var t = _.getStorageSync("beacon_u"); - return t && "" != t || (t = this.getRandom(36), _.setStorageSync("beacon_u", t)), t; - }, t.prototype.getRandom = function (t) { - return (1e6 * Date.now() + Math.floor(1e6 * Math.random())).toString(t) || ""; - }, t.prototype.getStoreKey = function (t) { - return "beaconV2__" + this.appkey + "_" + t; - }, t; - }(); - }, function (t, e, n) { - "use strict"; - - var r = this && this.__createBinding || (Object.create ? function (t, e, n, r) { - void 0 === r && (r = n), Object.defineProperty(t, r, { - enumerable: !0, - get: function get() { - return e[n]; - } - }); - } : function (t, e, n, r) { - void 0 === r && (r = n), t[r] = e[n]; - }), - o = this && this.__exportStar || function (t, e) { - for (var n in t) "default" === n || e.hasOwnProperty(n) || r(e, t, n); - }, - i = this && this.__importDefault || function (t) { - return t && t.__esModule ? t : { - "default": t - }; - }; - Object.defineProperty(e, "__esModule", { - value: !0 - }); - var s = i(n(8)); - e["default"] = s["default"], o(n(10), e), o(n(2), e), o(n(11), e), o(n(1), e); - }, function (t, e, n) { - "use strict"; - - var r = this && this.__assign || function () { - return (r = Object.assign || function (t) { - for (var e, n = 1, r = arguments.length; n < r; n++) for (var o in e = arguments[n]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]); - return t; - }).apply(this, arguments); - }; - Object.defineProperty(e, "__esModule", { - value: !0 - }); - var o = n(1), - i = n(2), - s = n(1), - a = n(0), - c = function () { - function t(t) { - var e = this; - this.lifeCycle = new o.EventEmiter(), this.uploadJobQueue = [], this.additionalParams = {}, this.delayTime = 0, this._normalLogPipeline = i.createPipeline([function (t) { - e.send({ - url: e.strategy.getUploadUrl(), - data: t, - method: "post", - contentType: "application/json;charset=UTF-8" - }, function () { - var n = e.config.onReportSuccess; - "function" == typeof n && n(JSON.stringify(t.events)); - }, function () { - var n = e.config.onReportFail; - "function" == typeof n && n(JSON.stringify(t.events)); - }); - }]), s.assert(Boolean(t.appkey), "appkey must be initial"), this.config = r({}, t); - } - return t.prototype.onUserAction = function (t, e) { - this.preReport(t, e, !1); - }, t.prototype.onDirectUserAction = function (t, e) { - this.preReport(t, e, !0); - }, t.prototype.preReport = function (t, e, n) { - t ? this.strategy.isEventUpOnOff() && (this.strategy.isBlackEvent(t) || this.strategy.isSampleEvent(t) || this.onReport(t, e, n)) : this.errorReport.reportError("602", " no eventCode"); - }, t.prototype.addAdditionalParams = function (t) { - for (var e = 0, n = Object.keys(t); e < n.length; e++) { - var r = n[e]; - this.additionalParams[r] = t[r]; - } - }, t.prototype.setChannelId = function (t) { - this.commonInfo.channelID = String(t); - }, t.prototype.setOpenId = function (t) { - this.commonInfo.openid = String(t); - }, t.prototype.setUnionid = function (t) { - this.commonInfo.unid = String(t); - }, t.prototype.getDeviceId = function () { - return this.commonInfo.deviceId; - }, t.prototype.getCommonInfo = function () { - return this.commonInfo; - }, t.prototype.removeSendingId = function (t) { - var e = JSON.parse(this.storage.getItem(a.BEACON_SENDING_IDS_KEY)), - n = e.indexOf(t); - -1 != n && (e.splice(n, 1), this.storage.setItem(a.BEACON_SENDING_IDS_KEY, JSON.stringify(e))); - }, t; - }(); - e["default"] = c; - }, function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }), e.EventEmiter = void 0; - var r = function () { - function t() { - var t = this; - this.emit = function (e, n) { - if (t) { - var r, - o = t.__EventsList[e]; - if (null == o ? void 0 : o.length) { - o = o.slice(); - for (var i = 0; i < o.length; i++) { - r = o[i]; - try { - var s = r.callback.apply(t, [n]); - if (1 === r.type && t.remove(e, r.callback), !1 === s) break; - } catch (t) { - throw t; - } - } - } - return t; - } - }, this.__EventsList = {}; - } - return t.prototype.indexOf = function (t, e) { - for (var n = 0; n < t.length; n++) if (t[n].callback === e) return n; - return -1; - }, t.prototype.on = function (t, e, n) { - if (void 0 === n && (n = 0), this) { - var r = this.__EventsList[t]; - if (r || (r = this.__EventsList[t] = []), -1 === this.indexOf(r, e)) { - var o = { - name: t, - type: n || 0, - callback: e - }; - return r.push(o), this; - } - return this; - } - }, t.prototype.one = function (t, e) { - this.on(t, e, 1); - }, t.prototype.remove = function (t, e) { - if (this) { - var n = this.__EventsList[t]; - if (!n) return null; - if (!e) { - try { - delete this.__EventsList[t]; - } catch (t) {} - return null; - } - if (n.length) { - var r = this.indexOf(n, e); - n.splice(r, 1); - } - return this; - } - }, t; - }(); - e.EventEmiter = r; - }, function (t, e, n) { - "use strict"; - - Object.defineProperty(e, "__esModule", { - value: !0 - }); - }, function (t, e, n) { - "use strict"; - - var r = this && this.__createBinding || (Object.create ? function (t, e, n, r) { - void 0 === r && (r = n), Object.defineProperty(t, r, { - enumerable: !0, - get: function get() { - return e[n]; - } - }); - } : function (t, e, n, r) { - void 0 === r && (r = n), t[r] = e[n]; - }), - o = this && this.__exportStar || function (t, e) { - for (var n in t) "default" === n || e.hasOwnProperty(n) || r(e, t, n); - }; - Object.defineProperty(e, "__esModule", { - value: !0 - }), o(n(3), e), o(n(4), e), o(n(5), e); - }])["default"]; -}); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) - -/***/ }), - /***/ "./lib/crypto.js": /*!***********************!*\ !*** ./lib/crypto.js ***! @@ -8097,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.5.0\",\"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.0\",\"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\"}}"); /***/ }), @@ -9003,6 +8356,7 @@ function _uploadFile() { if (self.options.EnableTracker) { accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); params.tracker = new Tracker({ + Beacon: self.options.Beacon, bucket: params.Bucket, region: params.Region, apiName: 'uploadFile', @@ -9115,6 +8469,7 @@ function _uploadFiles() { if (self.options.EnableTracker) { accelerate = self.options.UseAccelerate || typeof self.options.Domain === 'string' && self.options.Domain.includes('accelerate.'); fileParams.tracker = new Tracker({ + Beacon: self.options.Beacon, bucket: fileParams.Bucket, region: fileParams.Region, apiName: 'uploadFiles', @@ -13510,11 +12865,14 @@ var defaultOptions = { // 默认关闭上报 DeepTracker: false, // 上报时是否对每个分块上传做单独上报 + Beacon: null, + // 灯塔上报组件,如有需要请自行传入 TrackerDelay: 5000, // 周期性上报,单位毫秒。0代表实时上报 CustomId: '', // 自定义上报id - AutoSwitchHost: false + AutoSwitchHost: false, + CopySourceParser: null // 自定义拷贝源解析器 }; // 对外暴露的类 @@ -14000,11 +13358,14 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } var pkg = __webpack_require__(/*! ../package.json */ "./package.json"); -var BeaconAction = __webpack_require__(/*! ../lib/beacon_mp.min */ "./lib/beacon_mp.min.js"); var beacon = null; -var getBeacon = function getBeacon(delay) { +var getBeacon = function getBeacon(Beacon, delay) { if (!beacon) { - beacon = new BeaconAction({ + // 生成 beacon + if (!Beacon || typeof Beacon !== 'function') { + throw new Error('Beacon not found'); + } + beacon = new Beacon({ appkey: '0AND0VEVB24UBGDU', versionCode: pkg.version, channelID: 'mp_sdk', @@ -14154,7 +13515,8 @@ var Tracker = /*#__PURE__*/function () { accelerate = opt.accelerate, customId = opt.customId, delay = opt.delay, - deepTracker = opt.deepTracker; + deepTracker = opt.deepTracker, + Beacon = opt.Beacon; var appid = bucket && bucket.substr(bucket.lastIndexOf('-') + 1) || ''; this.parent = parent; this.deepTracker = deepTracker; @@ -14222,7 +13584,7 @@ var Tracker = /*#__PURE__*/function () { endTime: 0 // sdk api调用结束时间,不是纯网络耗时 }; - this.beacon = getBeacon(delay); + this.beacon = getBeacon(Beacon, delay); } // 格式化sdk回调 @@ -14746,6 +14108,7 @@ var apiWrapper = function apiWrapper(apiName, apiFn) { fileSize = typeof params.Body === 'string' ? params.Body.length : params.Body.size || params.Body.byteLength || -1; } tracker = new Tracker({ + Beacon: self.options.Beacon, bucket: params.Bucket, region: params.Region, apiName: apiName, diff --git a/demo/lib/cos-wx-sdk-v5.min.js b/demo/lib/cos-wx-sdk-v5.min.js index fc87326..b24b88f 100644 --- a/demo/lib/cos-wx-sdk-v5.min.js +++ b/demo/lib/cos-wx-sdk-v5.min.js @@ -1,2 +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=9)}([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,a=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,o=Object.create(i.prototype),s=new I(r||[]);return a(o,"_invoke",{value:A(e,n,s)}),o}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(B([])));S&&S!==n&&i.call(S,c)&&(w=S);var E=k.prototype=x.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(r,a,s,c){var l=f(e[r],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==o(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;a(this,"_invoke",{value:function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}})}function A(t,n,r){var i=m;return function(o,a){if(i===g)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(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 O(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,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function R(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 I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function B(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,a=function n(){for(;++r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"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),N(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;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function o(e){return o="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},o(e)}var a=n(11),s=n(13),c=n(14),l=n(19),u=n(4),p=u.btoa,d=wx.getFileSystemManager(),f=n(5);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"===o(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"===o(t)){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(n[e]=t[e])}();R.each({"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-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},E=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)||"")}})}))},T=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,E(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,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,c,"next",e)}function c(e){i(a,r,o,s,c,"throw",e)}s(void 0)}))});return function(e,n,r){return t.apply(this,arguments)}}(),_=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.lengtho)return 1;if(i=0;!t&&e.platform;return function(){return!1,t}}(),R={noop:v,formatParams:S,apiWrapper:function(e,t){return function(n,r){var i,o=this;if("function"==typeof n&&(r=n,n={}),n=S(e,n),o.options.EnableTracker)if("sliceUploadFile"===n.calledBySdk)i=n.tracker&&n.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))i=null;else{var a=-1;n.Body&&(a="string"==typeof n.Body?n.Body.length:n.Body.size||n.Body.byteLength||-1),i=new f({bucket:n.Bucket,region:n.Region,apiName:e,fileKey:n.Key,fileSize:a,deepTracker:o.options.DeepTracker,customId:o.options.CustomId,delay:o.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.";!o.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(!o.options.AppId)return'Bucket should format as "test-1250000000".';n.Bucket=n.Bucket+"-"+o.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(o,n,c)}));if(l)return c({error:l});var p=t.call(o,n,c);return u?p:void 0}},xml2json:c,json2xml:l,md5:a,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?R.getFileMd5(t,(function(e,t){n(t)})):n()},getFileMd5:function(e,t){var n=a(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(_(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(a,!0).join(";").toLowerCase(),w=s.HmacSHA1(y,r).toString(),C=[o,t,R.obj2str(a,!0),R.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:O,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"===o(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=R},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"}),o=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===o.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 O(_,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===o.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,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o,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 Y(e){return e&&e.nodeType===U.TEXT_NODE}function W(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 X(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 O(T,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new O(_,"child not in parent");if(!function(e){return e&&(V(e)||Y(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 O(T,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function J(e,t,n){var r=e.childNodes||[],o=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=o.filter(V);if(a.length>1||i(o,Y))throw new O(T,"More than one element or text in fragment");if(1===a.length&&!W(e,n))throw new O(T,"Element in fragment can not be inserted before doctype")}if(V(t)&&!W(e,n))throw new O(T,"Only one element can be added and only after doctype");if(G(t)){if(i(r,G))throw new O(T,"Only one doctype is allowed");var s=i(r,V);if(n&&r.indexOf(s)1||i(o,Y))throw new O(T,"More than one element or text in fragment");if(1===a.length&&!Q(e,n))throw new O(T,"Element in fragment can not be inserted before doctype")}if(V(t)&&!Q(e,n))throw new O(T,"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 O(T,"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 E=0;E"),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 O=e.publicId,R=e.systemId;if(t.push("");else if(R&&"."!=R)t.push(" SYSTEM ",R,">");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,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 o=t[i];"object"!=typeof o&&o!=r[i]&&(r[i]=o)}switch(t.childNodes&&(r.childNodes=new R),r.ownerDocument=e,r.nodeType){case d:var a=t.attributes,s=r.attributes=new B,c=a.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,$),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 N(this,(function(n){var r=[];return t.length>0&&M(n.documentElement,(function(i){if(i!==n&&i.nodeType===d){var o=i.getAttribute("class");if(o){var a=e===o;if(!a){var s=c(o);a=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}a&&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 R,(t.attributes=new B)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new R,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 oe;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 B;return n.childNodes=new R,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 N(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 N(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(E[T])},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),oe.prototype={nodeName:"#cdata-section",nodeType:h},u(oe,ne),ae.prototype.nodeType=k,u(ae,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(N.prototype,"length",{get:function(){return I(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=ae,t.DOMException=O,t.DOMImplementation=j,t.Element=ee,t.Node=U,t.NodeList=R,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)},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(a,o)},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,o=(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),a=[i(o>>>16),i(o>>>8&255),i(255&o)];return a.length-=[0,0,2,1][n],a.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,o=n.hasOwnProperty,a=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,o=Object.create(i.prototype),s=new I(r||[]);return a(o,"_invoke",{value:A(e,n,s)}),o}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(B([])));S&&S!==n&&o.call(S,c)&&(w=S);var E=k.prototype=x.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(i,a,s,c){var l=f(e[i],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==r(p)&&o.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;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function A(t,n,r){var i=m;return function(o,a){if(i===g)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(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 O(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,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function R(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 I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function B(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,a=function n(){for(;++i=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(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;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function o(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function a(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;o--){var a=r[o];(a[0]===e&&a[1]===t||e!==a[0]&&0===a[0].indexOf(i))&&r.splice(o,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(10);e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(7),o=n(21),a=n(22),s=n(28),c=n(6),l={SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,UploadQueueSize:1e4,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,HttpDNSServiceId:"",SimpleUploadMethod:"postObject",EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",AutoSwitchHost:!1},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),o.init(this)};a.init(u,o),s.init(u,o),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",o="object"===("undefined"==typeof window?"undefined":r(window)),a=o?window:{};a.JS_MD5_NO_WINDOW&&(o=!1),!o&&"object"===("undefined"==typeof self?"undefined":r(self))&&(a=self);var s,c=!a.JS_MD5_NO_COMMON_JS&&"object"===r(e)&&e.exports,l=n(12),u=!a.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)}!a.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!a.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 o,a,s=0,c=e.length,l=this.blocks,p=this.buffer8;s>2]|=e[s]<>6,p[a++]=128|63&o):o<55296||o>=57344?(p[a++]=224|o>>12,p[a++]=128|o>>6&63,p[a++]=128|63&o):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),p[a++]=240|o>>18,p[a++]=128|o>>12&63,p[a++]=128|o>>6&63,p[a++]=128|63&o);else for(a=this.start;s>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(l[a>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=64?(this.start=a-64,this.hash(),this.hashed=!0):this.start=a}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,o,a=this.blocks;this.first?t=((t=((e=((e=a[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(r=((r=(-1732584194^2004318071&e)+a[1]-117830708)<<12|r>>>20)+e<<0)&(-271733879^e))+a[2]-1126478375)<<17|n>>>15)+r<<0)&(r^e))+a[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))+a[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[1]-389564586)<<12|r>>>20)+e<<0)&(e^t))+a[2]+606105819)<<17|n>>>15)+r<<0)&(r^e))+a[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(r^t&(n^r))+a[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[5]+1200080426)<<12|r>>>20)+e<<0)&(e^t))+a[6]-1473231341)<<17|n>>>15)+r<<0)&(r^e))+a[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+a[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[9]-1958414417)<<12|r>>>20)+e<<0)&(e^t))+a[10]-42063)<<17|n>>>15)+r<<0)&(r^e))+a[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+a[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[13]-40341101)<<12|r>>>20)+e<<0)&(e^t))+a[14]-1502002290)<<17|n>>>15)+r<<0)&(r^e))+a[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[1]-165796510)<<5|e>>>27)+t<<0)^t))+a[6]-1069501632)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[11]+643717713)<<14|n>>>18)+r<<0)^r))+a[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[5]-701558691)<<5|e>>>27)+t<<0)^t))+a[10]+38016083)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[15]-660478335)<<14|n>>>18)+r<<0)^r))+a[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[9]+568446438)<<5|e>>>27)+t<<0)^t))+a[14]-1019803690)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[3]-187363961)<<14|n>>>18)+r<<0)^r))+a[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[13]-1444681467)<<5|e>>>27)+t<<0)^t))+a[2]-51403784)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[7]+1735328473)<<14|n>>>18)+r<<0)^r))+a[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[5]-378558)<<4|e>>>28)+t<<0))+a[8]-2022574463)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[11]+1839030562)<<16|n>>>16)+r<<0))+a[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[1]-1530992060)<<4|e>>>28)+t<<0))+a[4]+1272893353)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[7]-155497632)<<16|n>>>16)+r<<0))+a[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[13]+681279174)<<4|e>>>28)+t<<0))+a[0]-358537222)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[3]-722521979)<<16|n>>>16)+r<<0))+a[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[9]-640364487)<<4|e>>>28)+t<<0))+a[12]-421815835)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[15]+530742520)<<16|n>>>16)+r<<0))+a[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[0]-198630844)<<6|e>>>26)+t<<0)|~n))+a[7]+1126891415)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[14]-1416354905)<<15|n>>>17)+r<<0)|~e))+a[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+a[3]-1894986606)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[10]-1051523)<<15|n>>>17)+r<<0)|~e))+a[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+a[15]-30611744)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[6]-1560198380)<<15|n>>>17)+r<<0)|~e))+a[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[4]-145523070)<<6|e>>>26)+t<<0)|~n))+a[11]-1120210379)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[2]+718787259)<<15|n>>>17)+r<<0)|~e))+a[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(),o=0;o<15;)e=i[o++],t=i[o++],n=i[o++],r+=h[e>>>2]+h[63&(e<<4|t>>>4)]+h[63&(t<<2|n>>>6)]+h[63&n];return e=i[o],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=o.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 a.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 a.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=o.extend({reset:function(){this._data=new a.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,o=this.blockSize,s=i/(4*o);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,i=e.min(4*t,i),t){for(var c=0;cl;l++){if(16>l)o[l]=0|e[t+l];else{var u=o[l-3]^o[l-8]^o[l-14]^o[l-16];o[l]=u<<1|u>>>31}u=(r<<5|r>>>27)+c+o[l],u=20>l?u+(1518500249+(i&a|~i&s)):40>l?u+(1859775393+(i^a^s)):60>l?u+((i&a|i&s|a&s)-1894007588):u+((i^a^s)-899497514),c=s,s=a,a=i<<30|i>>>2,i=r,r=u}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|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(a),n.HmacSHA1=i._createHmacHelper(a),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 o=this._oKey=n.clone(),a=this._iKey=n.clone(),s=o.words,c=a.words,l=0;l>>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,s=0;s<4&&o+.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 o=[],a=0,s=0;s>>6-s%4*2;o[a>>>2]|=(l|u)<<24-a%4*8,a++}return c.create(o,a)},_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 o(e,t,n,r){for(var i=0;i0&&o(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,a){return!(r==t.ELEMENT_NODE&&e.xmlElementsFilter.length>0)||o(e.xmlElementsFilter,n,i,a)}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 o(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,o){var a="<"+(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||o(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 o=0;o0)for(var r in e)if(!d(e,r)&&(""==t||m(e,r,v(t,r)))){var i=e[r],o=h(i);if(null==i||null==i)n+=u(i,r,o,!0);else if(i instanceof Object)if(i instanceof Array)n+=y(i,r,o,t);else if(i instanceof Date)n+=u(i,r,o,!1),n+=i.toISOString(),n+=p(i,r);else{f(i)>0||null!=i.__text||null!=i.__cdata?(n+=u(i,r,o,!1),n+=x(i,v(t,r)),n+=p(i,r)):n+=u(i,r,o,!0)}else n+=u(i,r,o,!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(3);t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer,t.DOMParser=n(16).DOMParser},function(e,t,n){var r=n(1),i=n(3),o=n(17),a=n(18),s=i.DOMImplementation,c=r.NAMESPACE,l=a.ParseError,u=a.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,a=n.errorHandler,s=n.locator,l=n.xmlns||{},d=/\/x?html?$/.test(t),m=d?o.HTML_ENTITIES:o.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 o(t){var o=e[t];!o&&i&&(o=2==e.length?function(n){e(t,n)}:e),r[t]=o&&function(e){o("[xmldom "+t+"]\t"+e+function(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(n))}||function(){}}return n=n||{},o("warning"),o("error"),o("fatalError"),r}(a,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,o=i.createElementNS(e,n||t),a=r.length;g(this,o),this.currentElement=o,this.locator&&m(this.locator,o);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]/,o=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+i.source+o.source+"*(?::"+i.source+o.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,o,a){function h(e,t,r){n.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,o),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&&(a.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),a.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 a.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?(a.warning('attribute "'+b+'" missed quot(")!'),h(g,b,t)):(r.isHTML(i[""])&&b.match(/^(?:disabled|checked|selected)$/i)||a.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);a.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)||a.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),h(g,g,t),t=v,y=c;break;case d:a.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,o=null,a=e.length;a--;){var s=e[a],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==o&&(o={},w(n,n={})),n[d]=o[d]=l,s.uri=r.XMLNS,t.startPrefixMapping(d,l))}for(a=e.length;a--;){(u=(s=e[a]).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=o,!0;if(t.endElement(m,p,i),o)for(u in o)Object.prototype.hasOwnProperty.call(o,u)&&t.endPrefixMapping(u)}function b(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}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 o=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),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],c=!1,l=!1;a>3&&(/^public$/i.test(o[2][0])?(c=o[3][0],l=a>4&&o[4][0]):/^system$/i.test(o[2][0])&&(l=o[3][0]));var u=o[a-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 E(){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,o){function a(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)?a(parseInt(t.substr(1).replace("x","0x"))):(o.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 T=e.indexOf("<",w);if(T<0){if(!e.substr(w).match(/^\s*$/)){var _=i.doc,A=_.createTextNode(e.substr(w));_.appendChild(A),i.currentElement=A}return}switch(T>w&&c(T),e.charAt(T+1)){case"/":var O=e.indexOf(">",T+3),R=e.substring(T+2,O).replace(/[ \t\n\r]+$/g,""),N=m.pop();O<0?(R=e.substring(T+2).replace(/[\s<].*/,""),o.error("end tag name: "+R+" is not complete:"+N.tagName),O=T+1+R.length):R.match(/\sw?w=O:c(Math.max(T,w)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},E.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!a.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"),o=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,a=function(e){var t=[];if(e instanceof Object)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},s=function(e,t){var r=function(e,n,r,o,a){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(o).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(i,"_"));var l=[c,"<",e,r||""];return n&&n.length>0?(l.push(">"),l.push(n),a&&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,a(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(o,""):""+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){(function(e){var n,r,i,o;function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e) -/*! For license information please see beacon_mp.min.js.LICENSE.txt */}window,o=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"==a(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="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BEACON_ATTA_REQUEST_URL=t.BEACON_ATTA_TOKEN=t.BEACON_ATTA_ID=t.BEACON_CONFIG_HTTPS_URL=t.BEACON_CONFIG_REQUEST_TIME=t.BEACON_CONFIG=t.BEACON_SENDING_IDS_KEY=t.BEACON_NORMAL_LOG_ID_KEY=t.BEACON_DRIECT_LOG_ID_KEY=t.BEACON_LASE_REPORT_TIME_KEY=t.BEACON_DEVICE_ID_KEY=t.BEACON_STORE_PREFIX=t.BEACON_LOG_ID_KEY=t.BEACON_IS_REALTIME_KEY=t.BEACON_DELAY_DEFAULT=t.BEACON_HTTPS_URL=t.BEACON_HTTP_URL=void 0,t.BEACON_HTTP_URL="http://oth.eve.mdt.qq.com:8080/analytics/v2_upload",t.BEACON_HTTPS_URL="https://otheve.beacon.qq.com/analytics/v2_upload",t.BEACON_DELAY_DEFAULT=3e3,t.BEACON_IS_REALTIME_KEY="A99",t.BEACON_LOG_ID_KEY="A100",t.BEACON_STORE_PREFIX="__BEACON_",t.BEACON_DEVICE_ID_KEY="__BEACON_deviceId",t.BEACON_LASE_REPORT_TIME_KEY="last_report_time",t.BEACON_DRIECT_LOG_ID_KEY="direct_log_id",t.BEACON_NORMAL_LOG_ID_KEY="normal_log_id",t.BEACON_SENDING_IDS_KEY="sending_event_ids",t.BEACON_CONFIG="beacon_config",t.BEACON_CONFIG_REQUEST_TIME="beacon_config_request_time",t.BEACON_CONFIG_HTTPS_URL="https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",t.BEACON_ATTA_ID="00400014144",t.BEACON_ATTA_TOKEN="6478159937",t.BEACON_ATTA_REQUEST_URL="https://h.trace.qq.com/kv"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventId=t.replaceSymbol=t.replace=t.assert=void 0;var r=n(0),i=n(9);function o(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(e){return""}}Object.defineProperty(t,"EventEmiter",{enumerable:!0,get:function(){return i.EventEmiter}}),t.assert=function(e,t){if(!e)throw t instanceof Error?t:new Error(t)},t.replace=function(e,t){for(var n={},r=0,i=Object.keys(e);r60*this.strategy.requestInterval*1e3},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e)},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]e.options.UploadQueueSize;){var n="waiting"===a[t].state||"checking"===a[t].state||"uploading"===a[t].state;a[t]&&n?t++:(s[a[t].id]&&delete s[a[t].id],a.splice(t,1),l--)}p()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;a[l]&&"waiting"!==a[l].state;)l++;if(!(l>=a.length)){var n=a[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);o[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 o=i&&"waiting"===i.state,a=i&&("checking"===i.state||"uploading"===i.state);if("canceled"===n&&"canceled"!==i.state||"paused"===n&&o||"paused"===n&&a){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(),a&&(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,o){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:a.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,a.push(u),u.size=t,!o&&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(a,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||(o="{Bucket}."+o)),o=(o=o.replace(/\{\{AppId\}\}/gi,r).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,a).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,r).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,a).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(o)||(o="https://"+o),"/"===o.slice(-1)&&(o=o.slice(0,-1));var c=o;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 o=!1!==e.ForceSignHost;!r&&e.SignHost&&o&&(n.Host=e.SignHost);var a=!1,s=function(e,n){a||(a=!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:o}),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:o},(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:o}),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,o=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var a=e.error.Code,s=e.error.Message;("RequestTimeTooSkewed"===a||"AccessDenied"===a&&"Request has expired"===s)&&(r=!0)}catch(e){}if(e){if(r&&o){var c=Date.parse(o);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 o=e.url||e.Url,a=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:o}),s=e.tracker;!function i(o){var c=n.options.SystemClockOffset;e.SwitchHost&&(a=a.replace(/myqcloud.com/,"tencentcos.cn")),s&&s.setParams({signStartTime:(new Date).getTime(),retryTimes:o-1}),u.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:r,Headers:e.headers,SignHost:a,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},(function(r,a){r?t(r):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=a,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&&o<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==a?void 0:a.SignFrom),networkError:f});e.SwitchHost=h,i(o+1)}else t(r,l)})))}))}(1)}function m(e,t){var n=this,o=e.TaskId;if(!o||n._isRunningTask(o)){var a=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:a,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(!o||n._isRunningTask(o)){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,a){if("abort"!==e){var s,c=function(e,a){if(o&&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)):(a=i.extend(a||{},c),t(null,a)),w=null}};if(e)c({error:e});else{var l;if(m)(l={}).body=a;else try{l=a&&a.indexOf("<")>-1&&a.indexOf(">")>-1&&i.xml2json(a)||{}}catch(e){l=a||{}}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===o&&(w&&w.abort&&w.abort(),n.off("inner-kill-task",e))};o&&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,o=e.Region;r?(r=r.replace(/\{\{Region\}\}/gi,o||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(r)||(r=n+"//"+r),"/"===r.slice(-1)&&(r=r.slice(0,-1))):r=o?n+"//cos."+o+".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 o=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:r,Owner:o,statusCode:n.statusCode,headers:n.headers})}))},putBucket:function(e,t){var n=this,r="";if(e.BucketAZConfig){var o={BucketAZConfig:e.BucketAZConfig};r=i.json2xml({CreateBucketConfiguration:o})}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 o=c({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:o,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||{},o=r.Contents||[],a=r.CommonPrefixes||[];o=i.isArray(o)?o:[o],a=i.isArray(a)?a:[a];var s=i.clone(r);i.extend(s,{Contents:o,CommonPrefixes:a,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 o=i.clone(e.AccessControlPolicy||{}),a=o.Grants||o.Grant;a=i.isArray(a)?a:[a],delete o.Grant,delete o.Grants,o.AccessControlList={Grant:a},r=i.json2xml({AccessControlPolicy:o}),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||{},o=r.Owner||{},s=r.AccessControlList.Grant||[];s=i.isArray(s)?s:[s];var c=a(r);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=i.extend(c,{Owner:o,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 o=i.json2xml({CORSConfiguration:r}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"cors",headers:a},(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 o=n.CORSConfiguration||{},a=o.CORSRules||o.CORSRule||[];a=i.clone(i.isArray(a)?a:[a]);var s=o.ResponseVary;i.each(a,(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:a,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 o=e.Headers;o["Content-Type"]="application/json",o["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:o,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 o=i.json2xml({Tagging:{TagSet:{Tag:r}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"tagging",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})}))},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 o=[];try{o=n.Tagging.TagSet.Tag||[]}catch(e){}o=i.clone(i.isArray(o)?o:[o]),t(null,{Tags:o,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}}),o=e.Headers;o["Content-Type"]="application/xml",o["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: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})}))},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 o=[];try{o=n.LifecycleConfiguration.Rule||[]}catch(e){}o=i.clone(i.isArray(o)?o:[o]),t(null,{Rules:o,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}),o=e.Headers;o["Content-Type"]="application/xml",o["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: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 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 o=e.Headers;o["Content-Type"]="application/xml",o["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: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})}))},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 o=i.json2xml({WebsiteConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"website",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 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 o=n.WebsiteConfiguration||{};if(o.RoutingRules){var a=i.clone(o.RoutingRules.RoutingRule||[]);a=i.makeArray(a),o.RoutingRules=a}t(null,{WebsiteConfiguration:o,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||{},o=r.Domains||r.Domain||[];(o=i.isArray(o)?o:[o]).length&&(n.DomainList={Domain:o});var a=i.json2xml({RefererConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,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 o=n.RefererConfiguration||{};if(o.DomainList){var a=i.makeArray(o.DomainList.Domain||[]);o.DomainList={Domains:a}}t(null,{RefererConfiguration:o,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}}),o=e.Headers;o["Content-Type"]="application/xml",o["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: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})}))},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}}),o=e.Headers;o["Content-Type"]="application/xml",o["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: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})}))},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 o=n.Destination.COSBucketDestination.Encryption;Object.keys(o).indexOf("SSECOS")>-1&&(o["SSE-COS"]=o.SSECOS,delete o.SSECOS)}var a=i.json2xml({InventoryConfiguration:n}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.binaryBase64(i.md5(a)),f.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,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 o=r.OptionalFields.Field;i.isArray(o)||(o=[o]),r.OptionalFields=o}if(r.Destination&&r.Destination.COSBucketDestination&&r.Destination.COSBucketDestination.Encryption){var a=r.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSE-COS")>-1&&(a.SSECOS=a["SSE-COS"],delete a["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,o=r.InventoryConfiguration||[];o=i.isArray(o)?o:[o],delete r.InventoryConfiguration,i.each(o,(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=o,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),o={"Content-Type":"application/xml"};o["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:o},(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||"",o=e.tracker;o&&o.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:o},(function(n,r){if(n){var o=n.statusCode;return e.Headers["If-Modified-Since"]&&o&&304===o?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 o=n.statusCode;return e.Headers["If-Modified-Since"]&&o&&304===o?t(null,{NotModified:!0,statusCode:o}):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||{},o=r.DeleteMarker||[];o=i.isArray(o)?o:[o];var a=r.Version||[];a=i.isArray(a)?a:[a];var s=i.clone(r);delete s.DeleteMarker,delete s.Version,i.extend(s,{DeleteMarkers:o,Versions:a,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},putObject:function(e,t){var n=this,r=e.ContentLength,a=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"]=o.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(o){o&&(u&&u.setParams({md5EndTime:(new Date).getTime()}),n.options.UploadCheckContentMd5&&(s["Content-MD5"]=i.binaryBase64(o)),(e.UploadAddMetaMd5||n.options.UploadAddMetaMd5)&&(s["x-cos-meta-md5"]=o)),void 0!==e.ContentLength&&(s["Content-Length"]=e.ContentLength),a(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:a,tracker:u},(function(o,s){if(o)return a(null,!0),t(o);a({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={},o=e.FilePath;if(o){for(var a 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)a.indexOf("x-cos-meta-")>-1&&(r[a]=e[a]);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:o,TaskId:e.TaskId,onProgress:s},(function(r,i){if(s(null,!0),r)return t(r);if(i&&i.headers){var a=i.headers,l=a.etag||a.Etag||a.ETag||"",u=o.substr(o.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:a,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||{},o=r.Owner||{},s=r.AccessControlList&&r.AccessControlList.Grant||[];s=i.isArray(s)?s:[s];var c=a(r);n.headers&&n.headers["x-cos-acl"]&&(c.ACL=n.headers["x-cos-acl"]),c=i.extend(c,{Owner:o,Grants:s,statusCode:n.statusCode,headers:n.headers}),t(null,c)}))},putObjectAcl:function(e,t){var n=e.Headers,r="";if(e.AccessControlPolicy){var o=i.clone(e.AccessControlPolicy||{}),a=o.Grants||o.Grant;a=i.isArray(a)?a:[a],delete o.Grant,delete o.Grants,o.AccessControlList={Grant:a},r=i.json2xml({AccessControlPolicy:o}),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||"",o=i.getSourceParams.call(this,r);if(o){var a=o.Bucket,s=o.Region,c=decodeURIComponent(o.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,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 o=i.json2xml({Delete:{Object:n,Quiet:r||!1}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o));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:o,action:"delete",headers:a},(function(e,n){if(e)return t(e);var r=n.DeleteResult||{},o=r.Deleted||[],a=r.Error||[];o=i.isArray(o)?o:[o],a=i.isArray(a)?a:[a];var s=i.clone(r);i.extend(s,{Error:a,Deleted:o,statusCode:n.statusCode,headers:n.headers}),t(null,s)}))},restoreObject:function(e,t){var n=e.Headers;if(e.RestoreRequest){var r=e.RestoreRequest||{},o=i.json2xml({RestoreRequest:r});n["Content-Type"]="application/xml",n["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:o,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 o=i.json2xml({Tagging:{TagSet:{Tag:r}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.binaryBase64(i.md5(o)),f.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:o,action:"tagging",headers:a,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 o=[];try{o=n.Tagging.TagSet.Tag||[]}catch(e){}o=i.clone(i.isArray(o)?o:[o]),t(null,{Tags:o,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 o=r.Bucket,a=r.Region,s=decodeURIComponent(r.Key);f.call(this,{Scope:[{action:"name/cos:GetObject",bucket:o,region:a,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"]=o.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,o=n.options.UploadCheckContentMd5;o&&r&&r.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(o,e.Body,(function(a){a&&(e.Headers["Content-MD5"]=i.binaryBase64(a),o&&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,o=e.Parts,a=e.tracker,s=0,l=o.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),a&&(r+="&"+a),setTimeout((function(){t(null,{Url:r})}))}}));return d?(s+="?"+d.Authorization+(d.SecurityToken?"&x-cos-security-token="+d.SecurityToken:""),a&&(s+="&"+a)):a&&(s+="?"+a),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,o,a=[],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]);o["x-cos-acl"]&&(f.acl=o["x-cos-acl"]),!f["Content-Type"]&&(f["Content-Type"]=""),(n=wx.uploadFile({url:a,method:s,name:"file",header:o,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&&(a+=(a.indexOf("?")>-1?"&":"?")+g),o["Content-Length"]&&delete o["Content-Length"];var v={url:a,method:s,header:o,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(25);e.exports=new r(n(26),n(27))},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 a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(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;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(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 o(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,c,"next",e)}function c(e){o(a,r,i,s,c,"throw",e)}s(void 0)}))}}var s=n(8),c=n(29),l=n(7).EventProxy,u=n(0),p=n(5);function d(e,t){var n=e.TaskId,r=e.Bucket,i=e.Region,o=e.Key,a=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(o){if(o=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 a(l+1);s.using[d]?a(l+1):m.call(p,{Bucket:r,Region:i,Key:o,UploadId:d,tracker:e.tracker},(function(e,t){p._isRunningTask(n)&&(e?(s.removeUploadId(d),a(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:o,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===o&&(!a||e.StorageClass.toUpperCase()===a.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,o);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,o){if(n)return t(n);r.push.apply(r,o.Upload||[]),"true"===o.IsTruncated?(i.KeyMarker=o.NextKeyMarker,i.UploadIdMarker=o.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,o){if(n)return t(n);r.push.apply(r,o.Part||[]),"true"===o.IsTruncated?(i.PartNumberMarker=o.NextPartNumberMarker,e()):t(null,{PartList:r})}))}()}function h(e,t){var n=this,r=e.TaskId,i=e.Bucket,o=e.Region,a=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:o,Key:a,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,o=e.Region,a=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:o,Key:a,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,o=e.UploadId,a=e.SliceList,s=this,l=this.options.ChunkRetryTimes+1,u=a.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));c.retry(l,(function(t){s.multipartComplete({Bucket:n,Region:r,Key:i,UploadId:o,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,o=e.AbortArray,a=e.AsyncLimit||1,s=this,l=0,u=new Array(o.length);c.eachLimit(o,a,(function(t,o){var a=l;if(i&&i!==t.Key)return u[a]={error:{KeyNotMatch:!0}},void o(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[a]={error:e,task:i},o(null)})),l++}),(function(e){if(e)return t(e);for(var n=[],r=[],i=0,o=u.length;ia?"sliceUploadFile":g,s.push({api:v,params:t,callback:h}),o._addTasks(s);case 23:case"end":return e.stop()}}),e,this,[[3,9]])})))).apply(this,arguments)}function b(){return b=a(r().mark((function e(t,n){var o,s,c,l,d,f,m,h,g,v,y;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this,s=void 0===t.SliceSize?o.options.SliceSize:t.SliceSize,c=0,l=0,d=u.throttleOnProgress.call(o,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=a(r().mark((function n(a){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,o.options.EnableTracker&&(h=o.options.UseAccelerate||"string"==typeof o.options.Domain&&o.options.Domain.includes("accelerate."),e.tracker=new p({bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:f,accelerate:h,deepTracker:o.options.DeepTracker,customId:o.options.CustomId,delay:o.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"===o.options.SimpleUploadMethod?"postObject":"putObject",S=f>s?"sliceUploadFile":C,v.push({api:S,params:e,callback:w}),a(!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:o._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,o=e.Key,a=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:o,CopySource:a,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,o=new l,a=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}),o.on("error",(function(r){if(n._isRunningTask(a)){var i={UploadId:e.UploadData.UploadId||"",err:r,error:r};return t(i)}})),o.on("upload_complete",(function(n){var r=u.extend({UploadId:e.UploadData.UploadId||""},n);t(null,r)})),o.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(a)){if(s.removeUsing(e.UploadId),t)return i(null,!0),o.emit("error",t);s.removeUploadId(e.UploadId),i({loaded:r,total:r},!0),o.emit("upload_complete",c)}}))})),o.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:a,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(a))return e?(i(null,!0),o.emit("error",e)):void o.emit("upload_slice_complete",t)}))})),o.on("get_file_size_finish",(function(){if(i=u.throttleOnProgress.call(n,r,e.onProgress),e.UploadData.UploadId)o.emit("get_upload_data_finish",e.UploadData);else{var t=u.extend({TaskId:a,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(a)){if(t)return o.emit("error",t);e.UploadData.UploadId=r.UploadId,e.UploadData.PartList=r.PartList,o.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,o=0;o=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:o,Key:a,CopySource:p,UploadId:e.UploadId,PartNumber:s,CopySourceRange:l,onProgress:function(e){E+=e.loaded-d,d=e.loaded,x({loaded:E,total:y})}},t)}),(function(e,r){if(e)return n(e);x({loaded:E,total:y}),E+=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:o,Key:a,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,T,b,i,a),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:o,Key:a,UploadId:p},(function(r,i){if(r)s.removeUploadId(p),t(l+1);else{if(s.using[p])return t(l+1);var o={},a=0;u.each(i.PartList,(function(e){var t=parseInt(e.Size),n=a+t-1;o[e.PartNumber+"|"+a+"|"+n]=e.ETag,a+=t})),u.each(e.PartList,(function(e){var t=o[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&&(_[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,o=0,a=0;!function s(){if(i>=e.length)return r();for(;a=e.length?r():s())}))}()},retry:function(e,t,n){e<1?n():function r(i){t((function(t,o){t&&i=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 23: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 { +const getBeacon = (Beacon, delay) => { if (!beacon) { - beacon = new BeaconAction({ + // 生成 beacon + if (!Beacon || typeof Beacon !== 'function') { + throw new Error('Beacon not found'); + } + beacon = new Beacon({ appkey: '0AND0VEVB24UBGDU', versionCode: pkg.version, channelID: 'mp_sdk', //渠道,选填 @@ -202,8 +205,20 @@ function formatParams(params) { // 链路追踪器 class Tracker { constructor(opt) { - const { parent, traceId, bucket, region, apiName, fileKey, fileSize, accelerate, customId, delay, deepTracker } = - opt; + const { + parent, + traceId, + bucket, + region, + apiName, + fileKey, + fileSize, + accelerate, + customId, + delay, + deepTracker, + Beacon, + } = opt; const appid = (bucket && bucket.substr(bucket.lastIndexOf('-') + 1)) || ''; this.parent = parent; this.deepTracker = deepTracker; @@ -254,7 +269,7 @@ class Tracker { startTime: new Date().getTime(), // sdk api调用起始时间,不是纯网络耗时 endTime: 0, // sdk api调用结束时间,不是纯网络耗时 }; - this.beacon = getBeacon(delay); + this.beacon = getBeacon(Beacon, delay); } // 格式化sdk回调 diff --git a/src/util.js b/src/util.js index 98b9f3b..869fcee 100644 --- a/src/util.js +++ b/src/util.js @@ -437,6 +437,7 @@ var apiWrapper = function (apiName, apiFn) { typeof params.Body === 'string' ? params.Body.length : params.Body.size || params.Body.byteLength || -1; } tracker = new Tracker({ + Beacon: self.options.Beacon, bucket: params.Bucket, region: params.Region, apiName: apiName,