(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8633,5977,8328],{65754:function(module){(function(C,u){module.exports=u()})(this,function(){return function(y){var C={};function u(v){if(C[v])return C[v].exports;var T=C[v]={i:v,l:!1,exports:{}};return y[v].call(T.exports,T,T.exports,u),T.l=!0,T.exports}return u.m=y,u.c=C,u.d=function(v,T,l){u.o(v,T)||Object.defineProperty(v,T,{enumerable:!0,get:l})},u.r=function(v){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})},u.t=function(v,T){if(T&1&&(v=u(v)),T&8||T&4&&typeof v=="object"&&v&&v.__esModule)return v;var l=Object.create(null);if(u.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:v}),T&2&&typeof v!="string")for(var k in v)u.d(l,k,function(P){return v[P]}.bind(null,k));return l},u.n=function(v){var T=v&&v.__esModule?function(){return v.default}:function(){return v};return u.d(T,"a",T),T},u.o=function(v,T){return Object.prototype.hasOwnProperty.call(v,T)},u.p="/dist/",u(u.s="./index.js")}({"./index.js":function(y,C,u){var v=u("./src/cos.js");y.exports=v},"./lib/beacon.min.js":function(y,C,u){var v,T,l=u("./node_modules/@babel/runtime/helpers/typeof.js");(function(k,P){l(C)=="object"&&typeof y!="undefined"?y.exports=P():(v=P,T=typeof v=="function"?v.call(C,u,C,y):v,T!==void 0&&(y.exports=T))})(this,function(){"use strict";var k=function(i,a){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,p){s.__proto__=p}||function(s,p){for(var R in p)Object.prototype.hasOwnProperty.call(p,R)&&(s[R]=p[R])},k(i,a)},P=function(){return P=Object.assign||function(i){for(var a,s=1,p=arguments.length;s0&&p[p.length-1])||W[0]!==6&&W[0]!==2)){O=0;continue}if(W[0]===3&&(!p||W[1]>p[0]&&W[1]60*this.strategy.requestInterval*1e3},d.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},d.prototype.isBlackEvent=function(i){return this.strategy.blacklist.indexOf(i)!=-1},d.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},d.prototype.isSampleEvent=function(i){return!!Object.prototype.hasOwnProperty.call(this.realSample,i)&&this.realSample[i]this.duration)return this.createSession();a=p.sessionId,s=p.sessionStart,this.getSessionStackDepth=0}catch(O){}return{sessionId:a,sessionStart:s}},d.prototype.createSession=function(){var i=Date.now(),a={sessionId:this.appkey+"_"+i.toString(),sessionStart:i};this.storage.setItem(D,JSON.stringify(a)),this.storage.setItem(L,i.toString());var s="is_new_user",p=this.storage.getItem(s);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:p?"N":"Y"}),this.storage.setItem(s,JSON.stringify(!1)),a},d}();function F(){var d=navigator.userAgent,i=d.indexOf("compatible")>-1&&d.indexOf("MSIE")>-1,a=d.indexOf("Edge")>-1&&!i,s=d.indexOf("Trident")>-1&&d.indexOf("rv:11.0")>-1;if(i){new RegExp("MSIE (\\d+\\.\\d+);").test(d);var p=parseFloat(RegExp.$1);return p==7?7:p==8?8:p==9?9:p==10?10:6}return a?-2:s?11:-1}function $(d,i){var a,s;return(a="https://tun-cos-1258344701.file.myqcloud.com/fp.js",s===void 0&&(s=Date.now()+"-"+Math.random()),new Promise(function(p,R){if(document.getElementById(s))p(void 0);else{var O=document.getElementsByTagName("head")[0],G=document.createElement("script");G.onload=function(){return function(){G.onload=null,p(void 0)}},G.onerror=function(ae){G.onerror=null,O.removeChild(G),R(ae)},G.src=a,G.id=s,O.appendChild(G)}})).then(function(){new Fingerprint().getQimei36(d,i)}).catch(function(p){}),""}var w=function(){return(w=Object.assign||function(i){for(var a,s=1,p=arguments.length;s0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?(this.store=new se(a),this.dbEventCount=this.store.getCount()):(this.store=new ce(i),this.getCount().then(function(p){s.dbEventCount=p}).catch(function(p){}))}return d.prototype.getCount=function(){return ee(this,void 0,void 0,function(){return B(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,i.sent()];case 2:return i.sent(),[2,Promise.reject()];case 3:return[2]}})})},d.prototype.insertEvent=function(i,a){return ee(this,void 0,void 0,function(){var s,p;return B(this,function(R){switch(R.label){case 0:if(this.dbEventCount>=1e4)return[2,Promise.reject()];s=A(i.mapValue),R.label=1;case 1:return R.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(s,i)];case 2:return[2,R.sent()];case 3:return p=R.sent(),a&&a(p,i),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}})})},d.prototype.getEvents=function(){return ee(this,void 0,void 0,function(){var i;return B(this,function(a){switch(a.label){case 0:i=[],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.store.iterate(function(s){i.push(s)})];case 2:return a.sent(),[2,Promise.all(i)];case 3:return a.sent(),[2,Promise.all(i)];case 4:return[2]}})})},d.prototype.removeEvent=function(i){return ee(this,void 0,void 0,function(){var a;return B(this,function(s){switch(s.label){case 0:a=A(i.mapValue),s.label=1;case 1:return s.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(a)];case 2:return[2,s.sent()];case 3:return s.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}})})},d}(),Z=function(){return(Z=Object.assign||function(i){for(var a,s=1,p=arguments.length;s0&&p[p.length-1])||W[0]!==6&&W[0]!==2)){O=0;continue}if(W[0]===3&&(!p||W[1]>p[0]&&W[1]0&&O<8,s.isUnderIE8||(s.isUnderIE=O>0,a.needInitQimei&&$(a.appkey,function(G){s.qimei36=G.q36}),s.network=new Ae(a),s.storage=new V(a.appkey),s.initCommonInfo(a),s.store=new re(a.appkey,s.storage),s.errorReport=new K(s.config,s.commonInfo,"web",s.network),s.strategy=new g(a.needQueryConfig==null||a.needQueryConfig,s.config,s.commonInfo,s.storage,s.network),s.logidStartTime=s.storage.getItem(x),s.logidStartTime||(s.logidStartTime=Date.now().toString(),s.storage.setItem(x,s.logidStartTime)),p=s.logidStartTime,R=Date.now()-Number.parseFloat(p),Math.floor(R/864e5)>=365&&s.storage.clear(),s.initSession(a),s.onDirectUserAction("rqd_js_init",{}),setTimeout(function(){return s.lifeCycle.emit("init")},0),s.initDelayTime=a.delay?a.delay:1e3,s.cycleTask(s.initDelayTime)),s}return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function p(){this.constructor=a}k(a,s),a.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}(i,d),i.prototype.initSession=function(a){var s=18e5;a.sessionDuration&&a.sessionDuration>3e4&&(s=a.sessionDuration),this.beaconSession=new U(this.storage,s,this)},i.prototype.initCommonInfo=function(a){var s=Number(this.storage.getItem(L));try{var p=JSON.parse(this.storage.getItem(z));(Date.now()-s>3e4||!p)&&this.storage.setItem(z,JSON.stringify([]))}catch(O){}a.uploadUrl&&(this.uploadUrl=a.uploadUrl+"?appkey="+a.appkey);var R=[window.screen.width,window.screen.height];window.devicePixelRatio&&R.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:R.join("*"),channelID:a.channelID?String(a.channelID):"",openid:a.openid?String(a.openid):"",unid:a.unionid?String(a.unionid):"",sdkVersion:I},this.config.appVersion=a.versionCode?String(a.versionCode):"",this.config.strictMode=a.strictMode},i.prototype.cycleTask=function(a){var s=this;this.intervalID=window.setInterval(function(){s.pauseSearching||s.store.getEvents().then(function(p){p.length==0&&(s.pauseSearching=!0);var R=[],O=JSON.parse(s.storage.getItem(z));O||(O=[]),p&&p.forEach(function(G){var ae=A(G.mapValue);O.indexOf(ae)==-1&&(R.push(G),O.push(ae))}),R.length!=0&&(s.storage.setItem(z,JSON.stringify(O)),s._normalLogPipeline(s.assembleData(R)))}).catch(function(p){})},a)},i.prototype.onReport=function(a,s,p){var R=this;if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{this.pauseSearching=!1;var O=this.generateData(a,s,p);if(p&&this.delayTime==0&&!this.underWeakNet)this._normalLogPipeline(this.assembleData(O));else{var G=O.shift();G&&this.store.insertEvent(G,function(ae){ae&&R.errorReport.reportError("604","insertEvent fail!")}).catch(function(ae){R._normalLogPipeline(R.assembleData(O))})}}},i.prototype.onSendBeacon=function(a,s){if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{this.pauseSearching=!1;var p=this.assembleData(this.generateData(a,s,!0));typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(p))}},i.prototype.generateData=function(a,s,p){var R=[],O="4.5.14-web_"+(p?"direct_log_id":"normal_log_id"),G=Number(this.storage.getItem(O));return G=G||1,s=P(P({},s),{A99:p?"Y":"N",A100:G.toString(),A72:I,A88:this.logidStartTime}),G++,this.storage.setItem(O,G.toString()),R.push({eventCode:a,eventTime:Date.now().toString(),mapValue:M(s,this.config.strictMode)}),R},i.prototype.assembleData=function(a){var s=this.beaconSession.getSession();return{appVersion:this.config.appVersion?ge(this.config.appVersion):"",sdkId:"js",sdkVersion:I,mainAppKey:this.config.appkey,platformId:3,common:M(P(P({},this.additionalParams),{A2:this.commonInfo.deviceId,A8:this.commonInfo.openid,A12:this.commonInfo.language,A17:this.commonInfo.pixel,A23:this.commonInfo.channelID,A50:this.commonInfo.unid,A76:s.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:a}},i.prototype.monitorUploadFailed=function(){this.uselessCycleTaskNum++,this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.underWeakNet=!0)},i.prototype.doCustomCycleTask=function(){this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime)),this.uselessCycleTaskNum=0,this.underWeakNet=!1},i}(m)})},"./lib/crypto.js":function(y,C,u){(function(v){var T=u("./node_modules/@babel/runtime/helpers/typeof.js"),l=l||function(k,P){var ee={},B=ee.lib={},b=function(){},q=B.Base={extend:function(S){b.prototype=this;var m=new b;return S&&m.mixIn(S),m.hasOwnProperty("init")||(m.init=function(){m.$super.init.apply(this,arguments)}),m.init.prototype=m,m.$super=this,m},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var m in S)S.hasOwnProperty(m)&&(this[m]=S[m]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}},L=B.WordArray=q.extend({init:function(S,m){S=this.words=S||[],this.sigBytes=m!=P?m:4*S.length},toString:function(S){return(S||_).stringify(this)},concat:function(S){var m=this.words,K=S.words,g=this.sigBytes;if(S=S.sigBytes,this.clamp(),g%4)for(var D=0;D>>2]|=(K[D>>>2]>>>24-8*(D%4)&255)<<24-8*((g+D)%4);else if(65535>>2]=K[D>>>2];else m.push.apply(m,K);return this.sigBytes+=S,this},clamp:function(){var S=this.words,m=this.sigBytes;S[m>>>2]&=4294967295<<32-8*(m%4),S.length=k.ceil(m/4)},clone:function(){var S=q.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var m=[],K=0;K>>2]>>>24-8*(g%4)&255;K.push((D>>>4).toString(16)),K.push((D&15).toString(16))}return K.join("")},parse:function(S){for(var m=S.length,K=[],g=0;g>>3]|=parseInt(S.substr(g,2),16)<<24-4*(g%8);return new L.init(K,m/2)}},j=z.Latin1={stringify:function(S){var m=S.words;S=S.sigBytes;for(var K=[],g=0;g>>2]>>>24-8*(g%4)&255));return K.join("")},parse:function(S){for(var m=S.length,K=[],g=0;g>>2]|=(S.charCodeAt(g)&255)<<24-8*(g%4);return new L.init(K,m)}},Q=z.Utf8={stringify:function(S){try{return decodeURIComponent(escape(j.stringify(S)))}catch(m){throw Error("Malformed UTF-8 data")}},parse:function(S){return j.parse(unescape(encodeURIComponent(S)))}},M=B.BufferedBlockAlgorithm=q.extend({reset:function(){this._data=new L.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=Q.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var m=this._data,K=m.words,g=m.sigBytes,D=this.blockSize,U=g/(4*D),U=S?k.ceil(U):k.max((U|0)-this._minBufferSize,0);if(S=U*D,g=k.min(4*S,g),S){for(var F=0;FS;S++){if(16>S)b[S]=L[z+S]|0;else{var m=b[S-3]^b[S-8]^b[S-14]^b[S-16];b[S]=m<<1|m>>>31}m=(j<<5|j>>>27)+A+b[S],m=20>S?m+((Q&M|~Q&ge)+1518500249):40>S?m+((Q^M^ge)+1859775393):60>S?m+((Q&M|Q&ge|M&ge)-1894007588):m+((Q^M^ge)-899497514),A=ge,ge=M,M=Q<<30|Q>>>2,Q=j,j=m}_[0]=_[0]+j|0,_[1]=_[1]+Q|0,_[2]=_[2]+M|0,_[3]=_[3]+ge|0,_[4]=_[4]+A|0},_doFinalize:function(){var L=this._data,z=L.words,_=8*this._nDataBytes,j=8*L.sigBytes;return z[j>>>5]|=128<<24-j%32,z[(j+64>>>9<<4)+14]=Math.floor(_/4294967296),z[(j+64>>>9<<4)+15]=_,L.sigBytes=4*z.length,this._process(),this._hash},clone:function(){var L=B.clone.call(this);return L._hash=this._hash.clone(),L}});k.SHA1=B._createHelper(P),k.HmacSHA1=B._createHmacHelper(P)})(),function(){var k=l,P=k.enc.Utf8;k.algo.HMAC=k.lib.Base.extend({init:function(B,b){B=this._hasher=new B.init,typeof b=="string"&&(b=P.parse(b));var q=B.blockSize,L=4*q;b.sigBytes>L&&(b=B.finalize(b)),b.clamp();for(var z=this._oKey=b.clone(),_=this._iKey=b.clone(),j=z.words,Q=_.words,M=0;M>>2]>>>24-M%4*8&255,A=z[M+1>>>2]>>>24-(M+1)%4*8&255,S=z[M+2>>>2]>>>24-(M+2)%4*8&255,m=ge<<16|A<<8|S,K=0;K<4&&M+K*.75<_;K++)Q.push(j.charAt(m>>>6*(3-K)&63));var g=j.charAt(64);if(g)for(;Q.length%4;)Q.push(g);return Q.join("")},parse:function(L){var z=L.length,_=this._map,j=_.charAt(64);if(j){var Q=L.indexOf(j);Q!=-1&&(z=Q)}for(var M=[],ge=0,A=0;A>>6-A%4*2;M[ge>>>2]|=(S|m)<<24-ge%4*8,ge++}return ee.create(M,ge)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),T(v)==="object"?v.exports=l:window.CryptoJS=l}).call(this,u("./node_modules/webpack/buildin/module.js")(y))},"./lib/json2xml.js":function(y,C,u){var v=u("./node_modules/@babel/runtime/helpers/typeof.js"),T="a-zA-Z_\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FFF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",l="-.0-9\xB7\u0300-\u036F\u203F\u2040",k=new RegExp("^([^"+T+"])|^((x|X)(m|M)(l|L))|([^"+T+l+"])","g"),P=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,ee=function(z){var _=[];if(z instanceof Object)for(var j in z)z.hasOwnProperty(j)&&_.push(j);return _},B=function(z,_){var j=function(M,ge,A,S,m){var K=_.indent!==void 0?_.indent:" ",g=_.prettyPrint?` `+new Array(S).join(K):"";_.removeIllegalNameCharacters&&(M=M.replace(k,"_"));var D=[g,"<",M,A||""];return ge&&ge.length>0?(D.push(">"),D.push(ge),m&&D.push(g),D.push("")):D.push("/>"),D.join("")};return function Q(M,ge,A){var S=v(M);switch((Array.isArray?Array.isArray(M):M instanceof Array)?S="array":M instanceof Date&&(S="date"),S){case"array":var m=[];return M.map(function(U){m.push(Q(U,1,A+1))}),_.prettyPrint&&m.push(` `),m.join("");break;case"date":return M.toJSON?M.toJSON():M+"";case"object":var K=[];for(var g in M)if(M.hasOwnProperty(g))if(M[g]instanceof Array)for(var D=0;D0&&K.push(` `),K.join("");break;case"function":return M();default:return _.escape?q(M):""+M}}(z,0,0)},b=function(z){var _=['"),_.join("")};function q(L){return(""+L).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(P,"")}y.exports=function(L,z){if(z||(z={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),typeof L=="string")try{L=JSON.parse(L.toString())}catch(M){return!1}var _="",j="";z&&(v(z)=="object"?(z.xmlHeader&&(_=b(!!z.xmlHeader.standalone)),typeof z.docType!="undefined"&&(j="")):_=b()),z=z||{};var Q=[_,z.prettyPrint&&j?` `:"",j,B(L,z)];return Q.join("").replace(/\n{2,}/g,` `).replace(/\s+$/g,"")}},"./lib/md5.js":function(module,exports,__nested_webpack_require_69768__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__,_typeof=__nested_webpack_require_69768__("./node_modules/@babel/runtime/helpers/typeof.js");(function(){"use strict";var ERROR="input is invalid type",WINDOW=(typeof window=="undefined"?"undefined":_typeof(window))==="object",root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&(typeof self=="undefined"?"undefined":_typeof(self))==="object",NODE_JS=!root.JS_MD5_NO_NODE_JS&&(typeof process=="undefined"?"undefined":_typeof(process))==="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&_typeof(module)==="object"&&module.exports,AMD=__nested_webpack_require_69768__("./node_modules/webpack/buildin/amd-options.js"),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}(root.JS_MD5_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(y){return Object.prototype.toString.call(y)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(y){return _typeof(y)==="object"&&y.buffer&&y.buffer.constructor===ArrayBuffer});var createOutputMethod=function(C){return function(u,v){return new Md5(!0).update(u,v)[C]()}},createMethod=function(){var C=createOutputMethod("hex");NODE_JS&&(C=nodeWrap(C)),C.getCtx=C.create=function(){return new Md5},C.update=function(T){return C.create().update(T)};for(var u=0;u>6,P[T++]=128|u&63):u<55296||u>=57344?(P[T++]=224|u>>12,P[T++]=128|u>>6&63,P[T++]=128|u&63):(u=65536+((u&1023)<<10|y.charCodeAt(++v)&1023),P[T++]=240|u>>18,P[T++]=128|u>>12&63,P[T++]=128|u>>6&63,P[T++]=128|u&63);else for(T=this.start;v>2]|=u<>2]|=(192|u>>6)<>2]|=(128|u&63)<=57344?(k[T>>2]|=(224|u>>12)<>2]|=(128|u>>6&63)<>2]|=(128|u&63)<>2]|=(240|u>>18)<>2]|=(128|u>>12&63)<>2]|=(128|u>>6&63)<>2]|=(128|u&63)<=64?(this.start=T-64,this.hash(),this.hashed=!0):this.start=T}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var y=this.blocks,C=this.lastByteIndex;y[C>>2]|=EXTRA[C&3],C>=56&&(this.hashed||this.hash(),y[0]=y[16],y[16]=y[1]=y[2]=y[3]=y[4]=y[5]=y[6]=y[7]=y[8]=y[9]=y[10]=y[11]=y[12]=y[13]=y[14]=y[15]=0),y[14]=this.bytes<<3,y[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var y,C,u,v,T,l,k=this.blocks;this.first?(y=k[0]-680876937,y=(y<<7|y>>>25)-271733879<<0,v=(-1732584194^y&2004318071)+k[1]-117830708,v=(v<<12|v>>>20)+y<<0,u=(-271733879^v&(y^-271733879))+k[2]-1126478375,u=(u<<17|u>>>15)+v<<0,C=(y^u&(v^y))+k[3]-1316259209,C=(C<<22|C>>>10)+u<<0):(y=this.h0,C=this.h1,u=this.h2,v=this.h3,y+=(v^C&(u^v))+k[0]-680876936,y=(y<<7|y>>>25)+C<<0,v+=(u^y&(C^u))+k[1]-389564586,v=(v<<12|v>>>20)+y<<0,u+=(C^v&(y^C))+k[2]+606105819,u=(u<<17|u>>>15)+v<<0,C+=(y^u&(v^y))+k[3]-1044525330,C=(C<<22|C>>>10)+u<<0),y+=(v^C&(u^v))+k[4]-176418897,y=(y<<7|y>>>25)+C<<0,v+=(u^y&(C^u))+k[5]+1200080426,v=(v<<12|v>>>20)+y<<0,u+=(C^v&(y^C))+k[6]-1473231341,u=(u<<17|u>>>15)+v<<0,C+=(y^u&(v^y))+k[7]-45705983,C=(C<<22|C>>>10)+u<<0,y+=(v^C&(u^v))+k[8]+1770035416,y=(y<<7|y>>>25)+C<<0,v+=(u^y&(C^u))+k[9]-1958414417,v=(v<<12|v>>>20)+y<<0,u+=(C^v&(y^C))+k[10]-42063,u=(u<<17|u>>>15)+v<<0,C+=(y^u&(v^y))+k[11]-1990404162,C=(C<<22|C>>>10)+u<<0,y+=(v^C&(u^v))+k[12]+1804603682,y=(y<<7|y>>>25)+C<<0,v+=(u^y&(C^u))+k[13]-40341101,v=(v<<12|v>>>20)+y<<0,u+=(C^v&(y^C))+k[14]-1502002290,u=(u<<17|u>>>15)+v<<0,C+=(y^u&(v^y))+k[15]+1236535329,C=(C<<22|C>>>10)+u<<0,y+=(u^v&(C^u))+k[1]-165796510,y=(y<<5|y>>>27)+C<<0,v+=(C^u&(y^C))+k[6]-1069501632,v=(v<<9|v>>>23)+y<<0,u+=(y^C&(v^y))+k[11]+643717713,u=(u<<14|u>>>18)+v<<0,C+=(v^y&(u^v))+k[0]-373897302,C=(C<<20|C>>>12)+u<<0,y+=(u^v&(C^u))+k[5]-701558691,y=(y<<5|y>>>27)+C<<0,v+=(C^u&(y^C))+k[10]+38016083,v=(v<<9|v>>>23)+y<<0,u+=(y^C&(v^y))+k[15]-660478335,u=(u<<14|u>>>18)+v<<0,C+=(v^y&(u^v))+k[4]-405537848,C=(C<<20|C>>>12)+u<<0,y+=(u^v&(C^u))+k[9]+568446438,y=(y<<5|y>>>27)+C<<0,v+=(C^u&(y^C))+k[14]-1019803690,v=(v<<9|v>>>23)+y<<0,u+=(y^C&(v^y))+k[3]-187363961,u=(u<<14|u>>>18)+v<<0,C+=(v^y&(u^v))+k[8]+1163531501,C=(C<<20|C>>>12)+u<<0,y+=(u^v&(C^u))+k[13]-1444681467,y=(y<<5|y>>>27)+C<<0,v+=(C^u&(y^C))+k[2]-51403784,v=(v<<9|v>>>23)+y<<0,u+=(y^C&(v^y))+k[7]+1735328473,u=(u<<14|u>>>18)+v<<0,C+=(v^y&(u^v))+k[12]-1926607734,C=(C<<20|C>>>12)+u<<0,T=C^u,y+=(T^v)+k[5]-378558,y=(y<<4|y>>>28)+C<<0,v+=(T^y)+k[8]-2022574463,v=(v<<11|v>>>21)+y<<0,l=v^y,u+=(l^C)+k[11]+1839030562,u=(u<<16|u>>>16)+v<<0,C+=(l^u)+k[14]-35309556,C=(C<<23|C>>>9)+u<<0,T=C^u,y+=(T^v)+k[1]-1530992060,y=(y<<4|y>>>28)+C<<0,v+=(T^y)+k[4]+1272893353,v=(v<<11|v>>>21)+y<<0,l=v^y,u+=(l^C)+k[7]-155497632,u=(u<<16|u>>>16)+v<<0,C+=(l^u)+k[10]-1094730640,C=(C<<23|C>>>9)+u<<0,T=C^u,y+=(T^v)+k[13]+681279174,y=(y<<4|y>>>28)+C<<0,v+=(T^y)+k[0]-358537222,v=(v<<11|v>>>21)+y<<0,l=v^y,u+=(l^C)+k[3]-722521979,u=(u<<16|u>>>16)+v<<0,C+=(l^u)+k[6]+76029189,C=(C<<23|C>>>9)+u<<0,T=C^u,y+=(T^v)+k[9]-640364487,y=(y<<4|y>>>28)+C<<0,v+=(T^y)+k[12]-421815835,v=(v<<11|v>>>21)+y<<0,l=v^y,u+=(l^C)+k[15]+530742520,u=(u<<16|u>>>16)+v<<0,C+=(l^u)+k[2]-995338651,C=(C<<23|C>>>9)+u<<0,y+=(u^(C|~v))+k[0]-198630844,y=(y<<6|y>>>26)+C<<0,v+=(C^(y|~u))+k[7]+1126891415,v=(v<<10|v>>>22)+y<<0,u+=(y^(v|~C))+k[14]-1416354905,u=(u<<15|u>>>17)+v<<0,C+=(v^(u|~y))+k[5]-57434055,C=(C<<21|C>>>11)+u<<0,y+=(u^(C|~v))+k[12]+1700485571,y=(y<<6|y>>>26)+C<<0,v+=(C^(y|~u))+k[3]-1894986606,v=(v<<10|v>>>22)+y<<0,u+=(y^(v|~C))+k[10]-1051523,u=(u<<15|u>>>17)+v<<0,C+=(v^(u|~y))+k[1]-2054922799,C=(C<<21|C>>>11)+u<<0,y+=(u^(C|~v))+k[8]+1873313359,y=(y<<6|y>>>26)+C<<0,v+=(C^(y|~u))+k[15]-30611744,v=(v<<10|v>>>22)+y<<0,u+=(y^(v|~C))+k[6]-1560198380,u=(u<<15|u>>>17)+v<<0,C+=(v^(u|~y))+k[13]+1309151649,C=(C<<21|C>>>11)+u<<0,y+=(u^(C|~v))+k[4]-145523070,y=(y<<6|y>>>26)+C<<0,v+=(C^(y|~u))+k[11]-1120210379,v=(v<<10|v>>>22)+y<<0,u+=(y^(v|~C))+k[2]+718787259,u=(u<<15|u>>>17)+v<<0,C+=(v^(u|~y))+k[9]-343485551,C=(C<<21|C>>>11)+u<<0,this.first?(this.h0=y+1732584193<<0,this.h1=C-271733879<<0,this.h2=u-1732584194<<0,this.h3=v+271733878<<0,this.first=!1):(this.h0=this.h0+y<<0,this.h1=this.h1+C<<0,this.h2=this.h2+u<<0,this.h3=this.h3+v<<0)},Md5.prototype.hex=function(){this.finalize();var y=this.h0,C=this.h1,u=this.h2,v=this.h3;return HEX_CHARS[y>>4&15]+HEX_CHARS[y&15]+HEX_CHARS[y>>12&15]+HEX_CHARS[y>>8&15]+HEX_CHARS[y>>20&15]+HEX_CHARS[y>>16&15]+HEX_CHARS[y>>28&15]+HEX_CHARS[y>>24&15]+HEX_CHARS[C>>4&15]+HEX_CHARS[C&15]+HEX_CHARS[C>>12&15]+HEX_CHARS[C>>8&15]+HEX_CHARS[C>>20&15]+HEX_CHARS[C>>16&15]+HEX_CHARS[C>>28&15]+HEX_CHARS[C>>24&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[u&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[v>>4&15]+HEX_CHARS[v&15]+HEX_CHARS[v>>12&15]+HEX_CHARS[v>>8&15]+HEX_CHARS[v>>20&15]+HEX_CHARS[v>>16&15]+HEX_CHARS[v>>28&15]+HEX_CHARS[v>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(y){if(y==="hex")return this.hex();this.finalize();var C=this.h0,u=this.h1,v=this.h2,T=this.h3,l=[C&255,C>>8&255,C>>16&255,C>>24&255,u&255,u>>8&255,u>>16&255,u>>24&255,v&255,v>>8&255,v>>16&255,v>>24&255,T&255,T>>8&255,T>>16&255,T>>24&255];return l},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var y=new ArrayBuffer(16),C=new Uint32Array(y);return C[0]=this.h0,C[1]=this.h1,C[2]=this.h2,C[3]=this.h3,y},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var y,C,u,v="",T=this.array(),l=0;l<15;)y=T[l++],C=T[l++],u=T[l++],v+=BASE64_ENCODE_CHAR[y>>>2]+BASE64_ENCODE_CHAR[(y<<4|C>>>4)&63]+BASE64_ENCODE_CHAR[(C<<2|u>>>6)&63]+BASE64_ENCODE_CHAR[u&63];return y=T[l],v+=BASE64_ENCODE_CHAR[y>>>2]+BASE64_ENCODE_CHAR[y<<4&63]+"==",v};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__nested_webpack_require_69768__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__nested_webpack_require_69768__("./node_modules/process/browser.js"),__nested_webpack_require_69768__("./node_modules/webpack/buildin/global.js"),__nested_webpack_require_69768__("./node_modules/webpack/buildin/module.js")(module))},"./lib/request.js":function(y,C,u){var v=u("./node_modules/@babel/runtime/helpers/typeof.js"),T=function(b){switch(v(b)){case"string":return b;case"boolean":return b?"true":"false";case"number":return isFinite(b)?b:"";default:return""}},l=function(b,q,L,z){return q=q||"&",L=L||"=",b===null&&(b=void 0),v(b)==="object"?Object.keys(b).map(function(_){var j=encodeURIComponent(T(_))+L;return Array.isArray(b[_])?b[_].map(function(Q){return j+encodeURIComponent(T(Q))}).join(q):j+encodeURIComponent(T(b[_]))}).filter(Boolean).join(q):z?encodeURIComponent(T(z))+L+encodeURIComponent(T(b)):""},k=function(b,q,L){var z={};return q.getAllResponseHeaders().trim().split(` `).forEach(function(_){if(_){var j=_.indexOf(":"),Q=_.substr(0,j).trim().toLowerCase(),M=_.substr(j+1).trim();z[Q]=M}}),{error:b,statusCode:q.status,statusMessage:q.statusText,headers:z,body:L}},P=function(b,q){return!q&&q==="text"?b.responseText:b.response},ee=function(b,q){var L=(b.method||"GET").toUpperCase(),z=b.url;if(b.qs){var _=l(b.qs);_&&(z+=(z.indexOf("?")===-1?"?":"&")+_)}var j=new XMLHttpRequest;if(j.open(L,z,!0),j.responseType=b.dataType||"text",b.xhrFields)for(var Q in b.xhrFields)j[Q]=b.xhrFields[Q];var M=b.headers;if(M)for(var ge in M)M.hasOwnProperty(ge)&&ge.toLowerCase()!=="content-length"&&ge.toLowerCase()!=="user-agent"&&ge.toLowerCase()!=="origin"&&ge.toLowerCase()!=="host"&&j.setRequestHeader(ge,M[ge]);return b.onProgress&&j.upload&&(j.upload.onprogress=b.onProgress),b.onDownloadProgress&&(j.onprogress=b.onDownloadProgress),b.timeout&&(j.timeout=b.timeout),j.ontimeout=function(A){var S=new Error("timeout");q(k(S,j))},j.onload=function(){q(k(null,j,P(j,b.dataType)))},j.onerror=function(A){var S=P(j,b.dataType);if(S)q(k(null,j,S));else{var m=j.statusText;!m&&j.status===0&&(m=new Error("CORS blocked or network error")),q(k(m,j,S))}},j.send(b.body||""),j};y.exports=ee},"./lib/xml2json.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,T=function(){this.version="1.3.5";var k={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},P=new RegExp(/(?!xmlns)^.*:/),ee=new RegExp(/^\s+|\s+$/g);return this.grokType=function(B){return/^\s*$/.test(B)?null:/^(?:true|false)$/i.test(B)?B.toLowerCase()==="true":isFinite(B)?parseFloat(B):B},this.parseString=function(B,b){if(B){var q=this.stringToXML(B);return q.getElementsByTagName("parsererror").length?null:this.parseXML(q,b)}else return null},this.parseXML=function(B,b){for(var q in b)k[q]=b[q];var L={},z=0,_="",j=B.childNodes.length;if(j)for(var Q,M,ge,A=0;A=S+m||S?new java.lang.String(A,S,m)+"":A}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(A){_.prototype[A]=function(){return null}});function ge(A,S){A.currentElement?A.currentElement.appendChild(S):A.doc.appendChild(S)}C.__DOMHandler=_,C.normalizeLineEndings=q,C.DOMParser=L},"./node_modules/@xmldom/xmldom/lib/dom.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/conventions.js"),T=v.find,l=v.NAMESPACE;function k(t){return t!==""}function P(t){return t?t.split(/[\t\n\f\r ]+/).filter(k):[]}function ee(t,n){return t.hasOwnProperty(n)||(t[n]=!0),t}function B(t){if(!t)return[];var n=P(t);return Object.keys(n.reduce(ee,{}))}function b(t){return function(n){return t&&t.indexOf(n)!==-1}}function q(t,n){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}function L(t,n){var r=t.prototype;if(!(r instanceof n)){let E=function(){};var h=E;E.prototype=n.prototype,E=new E,q(r,E),t.prototype=r=E}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var z={},_=z.ELEMENT_NODE=1,j=z.ATTRIBUTE_NODE=2,Q=z.TEXT_NODE=3,M=z.CDATA_SECTION_NODE=4,ge=z.ENTITY_REFERENCE_NODE=5,A=z.ENTITY_NODE=6,S=z.PROCESSING_INSTRUCTION_NODE=7,m=z.COMMENT_NODE=8,K=z.DOCUMENT_NODE=9,g=z.DOCUMENT_TYPE_NODE=10,D=z.DOCUMENT_FRAGMENT_NODE=11,U=z.NOTATION_NODE=12,F={},$={},w=F.INDEX_SIZE_ERR=($[1]="Index size error",1),H=F.DOMSTRING_SIZE_ERR=($[2]="DOMString size error",2),N=F.HIERARCHY_REQUEST_ERR=($[3]="Hierarchy request error",3),X=F.WRONG_DOCUMENT_ERR=($[4]="Wrong document",4),J=F.INVALID_CHARACTER_ERR=($[5]="Invalid character",5),ce=F.NO_DATA_ALLOWED_ERR=($[6]="No data allowed",6),se=F.NO_MODIFICATION_ALLOWED_ERR=($[7]="No modification allowed",7),re=F.NOT_FOUND_ERR=($[8]="Not found",8),Z=F.NOT_SUPPORTED_ERR=($[9]="Not supported",9),te=F.INUSE_ATTRIBUTE_ERR=($[10]="Attribute in use",10),ie=F.INVALID_STATE_ERR=($[11]="Invalid state",11),we=F.SYNTAX_ERR=($[12]="Syntax error",12),de=F.INVALID_MODIFICATION_ERR=($[13]="Invalid modification",13),Y=F.NAMESPACE_ERR=($[14]="Invalid namespace",14),pe=F.INVALID_ACCESS_ERR=($[15]="Invalid access",15);function oe(t,n){if(n instanceof Error)var r=n;else r=this,Error.call(this,$[t]),this.message=$[t],Error.captureStackTrace&&Error.captureStackTrace(this,oe);return r.code=t,n&&(this.message=this.message+": "+n),r}oe.prototype=Error.prototype,q(F,oe);function le(){}le.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,n){for(var r=[],h=0;h=0){for(var E=n.length-1;h0},lookupPrefix:function(t){for(var n=this;n;){var r=n._nsMap;if(r){for(var h in r)if(Object.prototype.hasOwnProperty.call(r,h)&&r[h]===t)return h}n=n.nodeType==j?n.ownerDocument:n.parentNode}return null},lookupNamespaceURI:function(t){for(var n=this;n;){var r=n._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,t))return r[t];n=n.nodeType==j?n.ownerDocument:n.parentNode}return null},isDefaultNamespace:function(t){var n=this.lookupPrefix(t);return n==null}};function x(t){return t=="<"&&"<"||t==">"&&">"||t=="&"&&"&"||t=='"'&&"""||"&#"+t.charCodeAt()+";"}q(z,V),q(z,V.prototype);function I(t,n){if(n(t))return!0;if(t=t.firstChild)do if(I(t,n))return!0;while(t=t.nextSibling)}function d(){this.ownerDocument=this}function i(t,n,r){t&&t._inc++;var h=r.namespaceURI;h===l.XMLNS&&(n._nsMap[r.prefix?r.localName:""]=r.value)}function a(t,n,r,h){t&&t._inc++;var E=r.namespaceURI;E===l.XMLNS&&delete n._nsMap[r.prefix?r.localName:""]}function s(t,n,r){if(t&&t._inc){t._inc++;var h=n.childNodes;if(r)h[h.length++]=r;else{for(var E=n.firstChild,ne=0;E;)h[ne++]=E,E=E.nextSibling;h.length=ne,delete h[h.length]}}}function p(t,n){var r=n.previousSibling,h=n.nextSibling;return r?r.nextSibling=h:t.firstChild=h,h?h.previousSibling=r:t.lastChild=r,n.parentNode=null,n.previousSibling=null,n.nextSibling=null,s(t.ownerDocument,t),n}function R(t){return t&&(t.nodeType===V.DOCUMENT_NODE||t.nodeType===V.DOCUMENT_FRAGMENT_NODE||t.nodeType===V.ELEMENT_NODE)}function O(t){return t&&(ae(t)||Ce(t)||G(t)||t.nodeType===V.DOCUMENT_FRAGMENT_NODE||t.nodeType===V.COMMENT_NODE||t.nodeType===V.PROCESSING_INSTRUCTION_NODE)}function G(t){return t&&t.nodeType===V.DOCUMENT_TYPE_NODE}function ae(t){return t&&t.nodeType===V.ELEMENT_NODE}function Ce(t){return t&&t.nodeType===V.TEXT_NODE}function W(t,n){var r=t.childNodes||[];if(T(r,ae)||G(n))return!1;var h=T(r,G);return!(n&&h&&r.indexOf(h)>r.indexOf(n))}function Oe(t,n){var r=t.childNodes||[];function h(ne){return ae(ne)&&ne!==n}if(T(r,h))return!1;var E=T(r,G);return!(n&&E&&r.indexOf(E)>r.indexOf(n))}function ke(t,n,r){if(!R(t))throw new oe(N,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new oe(re,"child not in parent");if(!O(n)||G(n)&&t.nodeType!==V.DOCUMENT_NODE)throw new oe(N,"Unexpected node type "+n.nodeType+" for parent node type "+t.nodeType)}function Ie(t,n,r){var h=t.childNodes||[],E=n.childNodes||[];if(n.nodeType===V.DOCUMENT_FRAGMENT_NODE){var ne=E.filter(ae);if(ne.length>1||T(E,Ce))throw new oe(N,"More than one element or text in fragment");if(ne.length===1&&!W(t,r))throw new oe(N,"Element in fragment can not be inserted before doctype")}if(ae(n)&&!W(t,r))throw new oe(N,"Only one element can be added and only after doctype");if(G(n)){if(T(h,G))throw new oe(N,"Only one doctype is allowed");var fe=T(h,ae);if(r&&h.indexOf(fe)1||T(E,Ce))throw new oe(N,"More than one element or text in fragment");if(ne.length===1&&!Oe(t,r))throw new oe(N,"Element in fragment can not be inserted before doctype")}if(ae(n)&&!Oe(t,r))throw new oe(N,"Only one element can be added and only after doctype");if(G(n)){let Te=function(Be){return G(Be)&&Be!==r};var ue=Te;if(T(h,Te))throw new oe(N,"Only one doctype is allowed");var fe=T(h,ae);if(r&&h.indexOf(fe)0&&I(r.documentElement,function(E){if(E!==r&&E.nodeType===_){var ne=E.getAttribute("class");if(ne){var fe=t===ne;if(!fe){var ue=B(ne);fe=n.every(b(ue))}fe&&h.push(E)}}}),h})},createElement:function(t){var n=new Fe;n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.localName=t,n.childNodes=new le;var r=n.attributes=new me;return r._ownerElement=n,n},createDocumentFragment:function(){var t=new Je;return t.ownerDocument=this,t.childNodes=new le,t},createTextNode:function(t){var n=new ze;return n.ownerDocument=this,n.appendData(t),n},createComment:function(t){var n=new Xe;return n.ownerDocument=this,n.appendData(t),n},createCDATASection:function(t){var n=new nt;return n.ownerDocument=this,n.appendData(t),n},createProcessingInstruction:function(t,n){var r=new $e;return r.ownerDocument=this,r.tagName=r.target=t,r.nodeValue=r.data=n,r},createAttribute:function(t){var n=new je;return n.ownerDocument=this,n.name=t,n.nodeName=t,n.localName=t,n.specified=!0,n},createEntityReference:function(t){var n=new Ve;return n.ownerDocument=this,n.nodeName=t,n},createElementNS:function(t,n){var r=new Fe,h=n.split(":"),E=r.attributes=new me;return r.childNodes=new le,r.ownerDocument=this,r.nodeName=n,r.tagName=n,r.namespaceURI=t,h.length==2?(r.prefix=h[0],r.localName=h[1]):r.localName=n,E._ownerElement=r,r},createAttributeNS:function(t,n){var r=new je,h=n.split(":");return r.ownerDocument=this,r.nodeName=n,r.name=n,r.namespaceURI=t,r.specified=!0,h.length==2?(r.prefix=h[0],r.localName=h[1]):r.localName=n,r}},L(d,V);function Fe(){this._nsMap={}}Fe.prototype={nodeType:_,hasAttribute:function(t){return this.getAttributeNode(t)!=null},getAttribute:function(t){var n=this.getAttributeNode(t);return n&&n.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,n){var r=this.ownerDocument.createAttribute(t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},removeAttribute:function(t){var n=this.getAttributeNode(t);n&&this.removeAttributeNode(n)},appendChild:function(t){return t.nodeType===D?this.insertBefore(t,null):Ge(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,n){var r=this.getAttributeNodeNS(t,n);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,n){return this.getAttributeNodeNS(t,n)!=null},getAttributeNS:function(t,n){var r=this.getAttributeNodeNS(t,n);return r&&r.value||""},setAttributeNS:function(t,n,r){var h=this.ownerDocument.createAttributeNS(t,n);h.value=h.nodeValue=""+r,this.setAttributeNode(h)},getAttributeNodeNS:function(t,n){return this.attributes.getNamedItemNS(t,n)},getElementsByTagName:function(t){return new ye(this,function(n){var r=[];return I(n,function(h){h!==n&&h.nodeType==_&&(t==="*"||h.tagName==t)&&r.push(h)}),r})},getElementsByTagNameNS:function(t,n){return new ye(this,function(r){var h=[];return I(r,function(E){E!==r&&E.nodeType===_&&(t==="*"||E.namespaceURI===t)&&(n==="*"||E.localName==n)&&h.push(E)}),h})}},d.prototype.getElementsByTagName=Fe.prototype.getElementsByTagName,d.prototype.getElementsByTagNameNS=Fe.prototype.getElementsByTagNameNS,L(Fe,V);function je(){}je.prototype.nodeType=j,L(je,V);function Ne(){}Ne.prototype={data:"",substringData:function(t,n){return this.data.substring(t,t+n)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,n){this.replaceData(t,0,n)},appendChild:function(t){throw new Error($[N])},deleteData:function(t,n){this.replaceData(t,n,"")},replaceData:function(t,n,r){var h=this.data.substring(0,t),E=this.data.substring(t+n);r=h+r+E,this.nodeValue=this.data=r,this.length=r.length}},L(Ne,V);function ze(){}ze.prototype={nodeName:"#text",nodeType:Q,splitText:function(t){var n=this.data,r=n.substring(t);n=n.substring(0,t),this.data=this.nodeValue=n,this.length=n.length;var h=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(h,this.nextSibling),h}},L(ze,Ne);function Xe(){}Xe.prototype={nodeName:"#comment",nodeType:m},L(Xe,Ne);function nt(){}nt.prototype={nodeName:"#cdata-section",nodeType:M},L(nt,Ne);function Ye(){}Ye.prototype.nodeType=g,L(Ye,V);function Qe(){}Qe.prototype.nodeType=U,L(Qe,V);function Ze(){}Ze.prototype.nodeType=A,L(Ze,V);function Ve(){}Ve.prototype.nodeType=ge,L(Ve,V);function Je(){}Je.prototype.nodeName="#document-fragment",Je.prototype.nodeType=D,L(Je,V);function $e(){}$e.prototype.nodeType=S,L($e,V);function rt(){}rt.prototype.serializeToString=function(t,n,r){return he.call(t,n,r)},V.prototype.toString=he;function he(t,n){var r=[],h=this.nodeType==9&&this.documentElement||this,E=h.prefix,ne=h.namespaceURI;if(ne&&E==null){var E=h.lookupPrefix(ne);if(E==null)var fe=[{namespace:ne,prefix:null}]}return tt(this,r,t,n,fe),r.join("")}function et(t,n,r){var h=t.prefix||"",E=t.namespaceURI;if(!E||h==="xml"&&E===l.XML||E===l.XMLNS)return!1;for(var ne=r.length;ne--;){var fe=r[ne];if(fe.prefix===h)return fe.namespace!==E}return!0}function ot(t,n,r){t.push(" ",n,'="',r.replace(/[<>&"\t\n\r]/g,x),'"')}function tt(t,n,r,h,E){if(E||(E=[]),h)if(t=h(t),t){if(typeof t=="string"){n.push(t);return}}else return;switch(t.nodeType){case _:var ne=t.attributes,fe=ne.length,ue=t.firstChild,Te=t.tagName;r=l.isHTML(t.namespaceURI)||r;var Be=Te;if(!r&&!t.prefix&&t.namespaceURI){for(var Ue,We=0;We=0;He--){var Le=E[He];if(Le.prefix===""&&Le.namespace===t.namespaceURI){Ue=Le.namespace;break}}if(Ue!==t.namespaceURI)for(var He=E.length-1;He>=0;He--){var Le=E[He];if(Le.namespace===t.namespaceURI){Le.prefix&&(Be=Le.prefix+":"+Te);break}}}n.push("<",Be);for(var qe=0;qe"),r&&/^script$/i.test(Te))for(;ue;)ue.data?n.push(ue.data):tt(ue,n,r,h,E.slice()),ue=ue.nextSibling;else for(;ue;)tt(ue,n,r,h,E.slice()),ue=ue.nextSibling;n.push("")}else n.push("/>");return;case K:case D:for(var ue=t.firstChild;ue;)tt(ue,n,r,h,E.slice()),ue=ue.nextSibling;return;case j:return ot(n,t.name,t.value);case Q:return n.push(t.data.replace(/[<&>]/g,x));case M:return n.push("");case m:return n.push("");case g:var De=t.publicId,Ke=t.systemId;if(n.push("");else if(Ke&&Ke!=".")n.push(" SYSTEM ",Ke,">");else{var st=t.internalSubset;st&&n.push(" [",st,"]"),n.push(">")}return;case S:return n.push("");case ge:return n.push("&",t.nodeName,";");default:n.push("??",t.nodeName)}}function e(t,n,r){var h;switch(n.nodeType){case _:h=n.cloneNode(!1),h.ownerDocument=t;case D:break;case j:r=!0;break}if(h||(h=n.cloneNode(!1)),h.ownerDocument=t,h.parentNode=null,r)for(var E=n.firstChild;E;)h.appendChild(e(t,E,r)),E=E.nextSibling;return h}function f(t,n,r){var h=new n.constructor;for(var E in n)if(Object.prototype.hasOwnProperty.call(n,E)){var ne=n[E];typeof ne!="object"&&ne!=h[E]&&(h[E]=ne)}switch(n.childNodes&&(h.childNodes=new le),h.ownerDocument=t,h.nodeType){case _:var fe=n.attributes,ue=h.attributes=new me,Te=fe.length;ue._ownerElement=h;for(var Be=0;Be",lt:"<",quot:'"'}),C.HTML_ENTITIES=v({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",divide:"\xF7",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",euro:"\u20AC",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"}),C.entityMap=C.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/dom.js");C.DOMImplementation=v.DOMImplementation,C.XMLSerializer=v.XMLSerializer,C.DOMParser=u("./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":function(y,C,u){var v=u("./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,T=/[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]/,l=new RegExp("[\\-\\.0-9"+T.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),k=new RegExp("^"+T.source+l.source+"*(?::"+T.source+l.source+"*)?$"),P=0,ee=1,B=2,b=3,q=4,L=5,z=6,_=7;function j(w,H){this.message=w,this.locator=H,Error.captureStackTrace&&Error.captureStackTrace(this,j)}j.prototype=new Error,j.prototype.name=j.name;function Q(){}Q.prototype={parse:function(w,H,N){var X=this.domBuilder;X.startDocument(),g(H,H={}),M(w,H,N,X,this.errorHandler),X.endDocument()}};function M(w,H,N,X,J){function ce(R){if(R>65535){R-=65536;var O=55296+(R>>10),G=56320+(R&1023);return String.fromCharCode(O,G)}else return String.fromCharCode(R)}function se(R){var O=R.slice(1,-1);return Object.hasOwnProperty.call(N,O)?N[O]:O.charAt(0)==="#"?ce(parseInt(O.substr(1).replace("x","0x"))):(J.error("entity not found:"+R),R)}function re(R){if(R>oe){var O=w.substring(oe,R).replace(/&#?\w+;/g,se);de&&Z(oe),X.characters(O,0,R-oe),oe=R}}function Z(R,O){for(;R>=ie&&(O=we.exec(w));)te=O.index,ie=te+O[0].length,de.lineNumber++;de.columnNumber=R-te+1}for(var te=0,ie=0,we=/.*(?:\r\n?|\n)|.*$/g,de=X.locator,Y=[{currentNSMap:H}],pe={},oe=0;;){try{var le=w.indexOf("<",oe);if(le<0){if(!w.substr(oe).match(/^\s*$/)){var ye=X.doc,ve=ye.createTextNode(w.substr(oe));ye.appendChild(ve),X.currentElement=ve}return}switch(le>oe&&re(le),w.charAt(le+1)){case"/":var me=w.indexOf(">",le+3),Ee=w.substring(le+2,me).replace(/[ \t\n\r]+$/g,""),Se=Y.pop();me<0?(Ee=w.substring(le+2).replace(/[\s<].*/,""),J.error("end tag name: "+Ee+" is not complete:"+Se.tagName),me=le+1+Ee.length):Ee.match(/\soe?oe=me:re(Math.max(le,oe)+1)}}function ge(w,H){return H.lineNumber=w.lineNumber,H.columnNumber=w.columnNumber,H}function A(w,H,N,X,J,ce){function se(Y,pe,oe){N.attributeNames.hasOwnProperty(Y)&&ce.fatalError("Attribute "+Y+" redefined"),N.addValue(Y,pe.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,J),oe)}for(var re,Z,te=++H,ie=P;;){var we=w.charAt(te);switch(we){case"=":if(ie===ee)re=w.slice(H,te),ie=b;else if(ie===B)ie=b;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(ie===b||ie===ee)if(ie===ee&&(ce.warning('attribute value must after "="'),re=w.slice(H,te)),H=te+1,te=w.indexOf(we,H),te>0)Z=w.slice(H,te),se(re,Z,H-1),ie=L;else throw new Error("attribute value no end '"+we+"' match");else if(ie==q)Z=w.slice(H,te),se(re,Z,H),ce.warning('attribute "'+re+'" missed start quot('+we+")!!"),H=te+1,ie=L;else throw new Error('attribute value must after "="');break;case"/":switch(ie){case P:N.setTagName(w.slice(H,te));case L:case z:case _:ie=_,N.closed=!0;case q:case ee:case B:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return ce.error("unexpected end of input"),ie==P&&N.setTagName(w.slice(H,te)),te;case">":switch(ie){case P:N.setTagName(w.slice(H,te));case L:case z:case _:break;case q:case ee:Z=w.slice(H,te),Z.slice(-1)==="/"&&(N.closed=!0,Z=Z.slice(0,-1));case B:ie===B&&(Z=re),ie==q?(ce.warning('attribute "'+Z+'" missed quot(")!'),se(re,Z,H)):((!v.isHTML(X[""])||!Z.match(/^(?:disabled|checked|selected)$/i))&&ce.warning('attribute "'+Z+'" missed value!! "'+Z+'" instead!!'),se(Z,Z,H));break;case b:throw new Error("attribute value missed!!")}return te;case"\x80":we=" ";default:if(we<=" ")switch(ie){case P:N.setTagName(w.slice(H,te)),ie=z;break;case ee:re=w.slice(H,te),ie=B;break;case q:var Z=w.slice(H,te);ce.warning('attribute "'+Z+'" missed quot(")!!'),se(re,Z,H);case L:ie=z;break}else switch(ie){case B:var de=N.tagName;(!v.isHTML(X[""])||!re.match(/^(?:disabled|checked|selected)$/i))&&ce.warning('attribute "'+re+'" missed value!! "'+re+'" instead2!!'),se(re,re,H),H=te,ie=ee;break;case L:ce.warning('attribute space is required"'+re+'"!!');case z:ie=ee,H=te;break;case b:ie=q,H=te;break;case _:throw new Error("elements closed character '/' and '>' must be connected to")}}te++}}function S(w,H,N){for(var X=w.tagName,J=null,ce=w.length;ce--;){var se=w[ce],re=se.qName,Z=se.value,de=re.indexOf(":");if(de>0)var te=se.prefix=re.slice(0,de),ie=re.slice(de+1),we=te==="xmlns"&&ie;else ie=re,te=null,we=re==="xmlns"&&"";se.localName=ie,we!==!1&&(J==null&&(J={},g(N,N={})),N[we]=J[we]=Z,se.uri=v.XMLNS,H.startPrefixMapping(we,Z))}for(var ce=w.length;ce--;){se=w[ce];var te=se.prefix;te&&(te==="xml"&&(se.uri=v.XML),te!=="xmlns"&&(se.uri=N[te||""]))}var de=X.indexOf(":");de>0?(te=w.prefix=X.slice(0,de),ie=w.localName=X.slice(de+1)):(te=null,ie=w.localName=X);var Y=w.uri=N[te||""];if(H.startElement(Y,ie,X,w),w.closed){if(H.endElement(Y,ie,X),J)for(te in J)Object.prototype.hasOwnProperty.call(J,te)&&H.endPrefixMapping(te)}else return w.currentNSMap=N,w.localNSMap=J,!0}function m(w,H,N,X,J){if(/^(?:script|textarea)$/i.test(N)){var ce=w.indexOf("",H),se=w.substring(H+1,ce);if(/[&<]/.test(se))return/^script$/i.test(N)?(J.characters(se,0,se.length),ce):(se=se.replace(/&#?\w+;/g,X),J.characters(se,0,se.length),ce)}return H+1}function K(w,H,N,X){var J=X[N];return J==null&&(J=w.lastIndexOf(""),J",H+4);return ce>H?(N.comment(w,H+4,ce-H-4),ce+3):(X.error("Unclosed comment"),-1)}else return-1;default:if(w.substr(H+3,6)=="CDATA["){var ce=w.indexOf("]]>",H+9);return N.startCDATA(),N.characters(w,H+9,ce-H-9),N.endCDATA(),ce+3}var se=$(w,H),re=se.length;if(re>1&&/!doctype/i.test(se[0][0])){var Z=se[1][0],te=!1,ie=!1;re>3&&(/^public$/i.test(se[2][0])?(te=se[3][0],ie=re>4&&se[4][0]):/^system$/i.test(se[2][0])&&(ie=se[3][0]));var we=se[re-1];return N.startDTD(Z,te,ie),N.endDTD(),we.index+we[0].length}}return-1}function U(w,H,N){var X=w.indexOf("?>",H);if(X){var J=w.substring(H,X).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(J){var ce=J[0].length;return N.processingInstruction(J[1],J[2]),X+2}else return-1}return-1}function F(){this.attributeNames={}}F.prototype={setTagName:function(w){if(!k.test(w))throw new Error("invalid tagName:"+w);this.tagName=w},addValue:function(w,H,N){if(!k.test(w))throw new Error("invalid attribute:"+w);this.attributeNames[w]=this.length,this[this.length++]={qName:w,value:H,offset:N}},length:0,getLocalName:function(w){return this[w].localName},getLocator:function(w){return this[w].locator},getQName:function(w){return this[w].qName},getURI:function(w){return this[w].uri},getValue:function(w){return this[w].value}};function $(w,H){var N,X=[],J=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(J.lastIndex=H,J.exec(w);N=J.exec(w);)if(X.push(N),N[1])return X}C.XMLReader=Q,C.ParseError=j},"./node_modules/process/browser.js":function(y,C){var u=y.exports={},v,T;function l(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?v=setTimeout:v=l}catch(M){v=l}try{typeof clearTimeout=="function"?T=clearTimeout:T=k}catch(M){T=k}})();function P(M){if(v===setTimeout)return setTimeout(M,0);if((v===l||!v)&&setTimeout)return v=setTimeout,setTimeout(M,0);try{return v(M,0)}catch(ge){try{return v.call(null,M,0)}catch(A){return v.call(this,M,0)}}}function ee(M){if(T===clearTimeout)return clearTimeout(M);if((T===k||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(M);try{return T(M)}catch(ge){try{return T.call(null,M)}catch(A){return T.call(this,M)}}}var B=[],b=!1,q,L=-1;function z(){!b||!q||(b=!1,q.length?B=q.concat(B):L=-1,B.length&&_())}function _(){if(!b){var M=P(z);b=!0;for(var ge=B.length;ge;){for(q=B,B=[];++L1)for(var A=1;Ase)return oe(null,!1);if(le>1){var ye=Math.max(pe[0].Size,pe[1].Size);if(ye!==ce)return oe(null,!1)}var ve=function me(Ee){if(Ee=oe.length){de.emit("has_and_check_upload_id",Y);return}var me=oe[ve];if(!P.isInArray(Y,me)){T.removeUploadId.call(N,me),ye(ve+1);return}if(T.using[me]){ye(ve+1);return}L.call(N,{Bucket:F,Region:$,Key:w,UploadId:me,tracker:g.tracker},function(Ee,Se){!N._isRunningTask(U)||(Ee?(T.removeUploadId.call(N,me),ye(ve+1)):de.emit("upload_id_available",{UploadId:me,PartList:Se.PartList}))})};le(0)}),de.on("get_remote_upload_id_list",function(){q.call(N,{Bucket:F,Region:$,Key:w,tracker:g.tracker},function(Y,pe){if(!!N._isRunningTask(U)){if(Y)return de.emit("error",Y);var oe=P.filter(pe.UploadList,function(ve){return ve.Key===w&&(!H||ve.StorageClass.toUpperCase()===H.toUpperCase())}).reverse().map(function(ve){return ve.UploadId||ve.UploadID});if(oe.length)de.emit("seek_local_avail_upload_id",oe);else{var le=T.getFileId(g.Body,g.ChunkSize,F,w),ye;le&&(ye=T.getUploadIdList.call(N,le))&&P.each(ye,function(ve){T.removeUploadId.call(N,ve)}),de.emit("no_available_upload_id")}}})}),de.emit("get_remote_upload_id_list")}function q(g,D){var U=this,F=[],$={Bucket:g.Bucket,Region:g.Region,Prefix:g.Key,calledBySdk:g.calledBySdk||"sliceUploadFile",tracker:g.tracker},w=function H(){U.multipartList($,function(N,X){if(N)return D(N);F.push.apply(F,X.Upload||[]),X.IsTruncated==="true"?($.KeyMarker=X.NextKeyMarker,$.UploadIdMarker=X.NextUploadIdMarker,H()):D(null,{UploadList:F})})};w()}function L(g,D){var U=this,F=[],$={Bucket:g.Bucket,Region:g.Region,Key:g.Key,UploadId:g.UploadId,calledBySdk:"sliceUploadFile",tracker:g.tracker},w=function H(){U.multipartListPart($,function(N,X){if(N)return D(N);F.push.apply(F,X.Part||[]),X.IsTruncated==="true"?($.PartNumberMarker=X.NextPartNumberMarker,H()):D(null,{PartList:F})})};w()}function z(g,D){var U=this,F=g.TaskId,$=g.Bucket,w=g.Region,H=g.Key,N=g.UploadData,X=g.FileSize,J=g.SliceSize,ce=Math.min(g.AsyncLimit||U.options.ChunkParallelLimit||1,256),se=g.Body,re=Math.ceil(X/J),Z=0,te=g.ServerSideEncryption,ie=g.Headers,we=P.filter(N.PartList,function(Y){return Y.Uploaded&&(Z+=Y.PartNumber>=re&&X%J||J),!Y.Uploaded}),de=g.onProgress;l.eachLimit(we,ce,function(Y,pe){if(!!U._isRunningTask(F)){var oe=Y.PartNumber,le=Math.min(X,Y.PartNumber*J)-(Y.PartNumber-1)*J,ye=0;_.call(U,{TaskId:F,Bucket:$,Region:w,Key:H,SliceSize:J,FileSize:X,PartNumber:oe,ServerSideEncryption:te,Body:se,UploadData:N,Headers:ie,onProgress:function(me){Z+=me.loaded-ye,ye=me.loaded,de({loaded:Z,total:X})},tracker:g.tracker},function(ve,me){!U._isRunningTask(F)||(!ve&&!me.ETag&&(ve='get ETag error, please add "ETag" to CORS ExposeHeader setting.( \u83B7\u53D6ETag\u5931\u8D25\uFF0C\u8BF7\u5728CORS ExposeHeader\u8BBE\u7F6E\u4E2D\u6DFB\u52A0ETag\uFF0C\u8BF7\u53C2\u8003\u6587\u6863\uFF1Ahttps://cloud.tencent.com/document/product/436/13318 )'),ve?Z-=ye:(Z+=le-ye,Y.ETag=me.ETag),de({loaded:Z,total:X}),pe(ve||null,me))})}},function(Y){if(!!U._isRunningTask(F)){if(Y)return D(Y);D(null,{UploadId:N.UploadId,SliceList:N.PartList})}})}function _(g,D){var U=this,F=g.TaskId,$=g.Bucket,w=g.Region,H=g.Key,N=g.FileSize,X=g.Body,J=g.PartNumber*1,ce=g.SliceSize,se=g.ServerSideEncryption,re=g.UploadData,Z=g.Headers||{},te=U.options.ChunkRetryTimes+1,ie=ce*(J-1),we=ce,de=ie+ce;de>N&&(de=N,we=de-ie);var Y=["x-cos-traffic-limit","x-cos-mime-limit"],pe={};P.each(Z,function(le,ye){Y.indexOf(ye)>-1&&(pe[ye]=le)});var oe=re.PartList[J-1];l.retry(te,function(le){!U._isRunningTask(F)||P.fileSlice(X,ie,de,!0,function(ye){U.multipartUpload({TaskId:F,Bucket:$,Region:w,Key:H,ContentLength:we,PartNumber:J,UploadId:re.UploadId,ServerSideEncryption:se,Body:ye,Headers:pe,onProgress:g.onProgress,calledBySdk:"sliceUploadFile",tracker:g.tracker},function(ve,me){if(!!U._isRunningTask(F))return ve?le(ve):(oe.Uploaded=!0,le(null,me))})})},function(le,ye){if(!!U._isRunningTask(F))return D(le,ye)})}function j(g,D){var U=g.Bucket,F=g.Region,$=g.Key,w=g.UploadId,H=g.SliceList,N=this,X=this.options.ChunkRetryTimes+1,J=g.Headers,ce=H.map(function(se){return{PartNumber:se.PartNumber,ETag:se.ETag}});l.retry(X,function(se){N.multipartComplete({Bucket:U,Region:F,Key:$,UploadId:w,Parts:ce,Headers:J,calledBySdk:"sliceUploadFile",tracker:g.tracker},se)},function(se,re){D(se,re)})}function Q(g,D){var U=g.Bucket,F=g.Region,$=g.Key,w=g.UploadId,H=g.Level||"task",N=g.AsyncLimit,X=this,J=new k;if(J.on("error",function(ce){return D(ce)}),J.on("get_abort_array",function(ce){M.call(X,{Bucket:U,Region:F,Key:$,Headers:g.Headers,AsyncLimit:N,AbortArray:ce},D)}),H==="bucket")q.call(X,{Bucket:U,Region:F,calledBySdk:"abortUploadTask"},function(ce,se){if(ce)return D(ce);J.emit("get_abort_array",se.UploadList||[])});else if(H==="file"){if(!$)return D(P.error(new Error("abort_upload_task_no_key")));q.call(X,{Bucket:U,Region:F,Key:$,calledBySdk:"abortUploadTask"},function(ce,se){if(ce)return D(ce);J.emit("get_abort_array",se.UploadList||[])})}else if(H==="task"){if(!w)return D(P.error(new Error("abort_upload_task_no_id")));if(!$)return D(P.error(new Error("abort_upload_task_no_key")));J.emit("get_abort_array",[{Key:$,UploadId:w}])}else return D(P.error(new Error("abort_unknown_level")))}function M(g,D){var U=g.Bucket,F=g.Region,$=g.Key,w=g.AbortArray,H=g.AsyncLimit||1,N=this,X=0,J=new Array(w.length);l.eachLimit(w,H,function(ce,se){var re=X;if($&&$!==ce.Key){J[re]={error:{KeyNotMatch:!0}},se(null);return}var Z=ce.UploadId||ce.UploadID;N.multipartAbort({Bucket:U,Region:F,Key:ce.Key,Headers:g.Headers,UploadId:Z},function(te){var ie={Bucket:U,Region:F,Key:ce.Key,UploadId:Z};J[re]={error:te,task:ie},se(null)}),X++},function(ce){if(ce)return D(ce);for(var se=[],re=[],Z=0,te=J.length;ZF?"sliceUploadFile":"putObject",re=g.onFileFinish,Z=function(ie,we){g.tracker&&g.tracker.formatResult(ie,we),re&&re(ie,we,N),D&&D(ie,we)};$.push({api:se,params:g,callback:Z}),U._addTasks($)}function A(g,D){var U=this,F=g.SliceSize===void 0?U.options.SliceSize:g.SliceSize,$=0,w=0,H=P.throttleOnProgress.call(U,w,g.onProgress),N=g.files.length,X=g.onFileFinish,J=Array(N),ce=function(Z,te,ie){H(null,!0),X&&X(Z,te,ie),J[ie.Index]={options:ie,error:Z,data:te},--N<=0&&D&&D(null,{files:J})},se=[];P.each(g.files,function(re,Z){(function(){var te=re.Body,ie=te.size||te.length||0,we={Index:Z,TaskId:""};if($+=ie,U.options.EnableTracker){var de=U.options.UseAccelerate||typeof U.options.Domain=="string"&&U.options.Domain.includes("accelerate.");re.tracker=new ee({bucket:re.Bucket,region:re.Region,apiName:"uploadFiles",fileKey:re.Key,fileSize:ie,accelerate:de,deepTracker:U.options.DeepTracker,customId:U.options.CustomId,delay:U.options.TrackerDelay})}P.each(re,function(Se,be){v(Se)!=="object"&&typeof Se!="function"&&(we[be]=Se)});var Y=re.onTaskReady,pe=function(be){we.TaskId=be,Y&&Y(be)};re.onTaskReady=pe;var oe=0,le=re.onProgress,ye=function(be){w=w-oe+be.loaded,oe=be.loaded,le&&le(be),H({loaded:w,total:$})};re.onProgress=ye;var ve=ie>F?"sliceUploadFile":"putObject",me=re.onFileFinish,Ee=function(be,Ae){re.tracker&&re.tracker.formatResult(be,Ae),me&&me(be,Ae),ce&&ce(be,Ae,we)};se.push({api:ve,params:re,callback:Ee})})()}),U._addTasks(se)}function S(g,D){var U=new k,F=this,$=g.Bucket,w=g.Region,H=g.Key,N=g.CopySource,X=P.getSourceParams.call(this,N);if(!X){D(P.error(new Error("CopySource format error")));return}var J=X.Bucket,ce=X.Region,se=decodeURIComponent(X.Key),re=g.CopySliceSize===void 0?F.options.CopySliceSize:g.CopySliceSize;re=Math.max(0,re);var Z=g.CopyChunkSize||this.options.CopyChunkSize,te=this.options.CopyChunkParallelLimit,ie=this.options.ChunkRetryTimes+1,we=0,de=0,Y,pe,oe={},le={},ye={};U.on("copy_slice_complete",function(ve){var me={};P.each(g.Headers,function(Se,be){be.toLowerCase().indexOf("x-cos-meta-")===0&&(me[be]=Se)});var Ee=P.map(ve.PartList,function(Se){return{PartNumber:Se.PartNumber,ETag:Se.ETag}});l.retry(ie,function(Se){F.multipartComplete({Bucket:$,Region:w,Key:H,UploadId:ve.UploadId,Parts:Ee,calledBySdk:"sliceCopyFile"},Se)},function(Se,be){if(T.removeUsing(ve.UploadId),Se)return pe(null,!0),D(Se);T.removeUploadId(ve.UploadId),pe({loaded:Y,total:Y},!0),D(null,be)})}),U.on("get_copy_data_finish",function(ve){var me=T.getCopyFileId(N,oe,Z,$,H);me&&T.saveUploadId(me,ve.UploadId,F.options.UploadIdCacheLimit),T.setUsing(ve.UploadId);var Ee=P.filter(ve.PartList,function(Se){return Se.Uploaded&&(de+=Se.PartNumber>=we&&Y%Z||Z),!Se.Uploaded});l.eachLimit(Ee,te,function(Se,be){var Ae=Se.PartNumber,V=Se.CopySourceRange,x=Se.end-Se.start;l.retry(ie,function(I){m.call(F,{Bucket:$,Region:w,Key:H,CopySource:N,UploadId:ve.UploadId,PartNumber:Ae,CopySourceRange:V},I)},function(I,d){if(I)return be(I);de+=x,pe({loaded:de,total:Y}),Se.ETag=d.ETag,be(I||null,d)})},function(Se){if(Se)return T.removeUsing(ve.UploadId),pe(null,!0),D(Se);U.emit("copy_slice_complete",ve)})}),U.on("get_chunk_size_finish",function(){var ve=function(){F.multipartInit({Bucket:$,Region:w,Key:H,Headers:ye},function(Ae,V){if(Ae)return D(Ae);g.UploadId=V.UploadId,U.emit("get_copy_data_finish",{UploadId:g.UploadId,PartList:g.PartList})})},me=T.getCopyFileId(N,oe,Z,$,H),Ee=T.getUploadIdList(me);if(!me||!Ee)return ve();var Se=function be(Ae){if(Ae>=Ee.length)return ve();var V=Ee[Ae];if(T.using[V])return be(Ae+1);L.call(F,{Bucket:$,Region:w,Key:H,UploadId:V},function(x,I){if(x)T.removeUploadId(V),be(Ae+1);else{if(T.using[V])return be(Ae+1);var d={},i=0;P.each(I.PartList,function(a){var s=parseInt(a.Size),p=i+s-1;d[a.PartNumber+"|"+i+"|"+p]=a.ETag,i+=s}),P.each(g.PartList,function(a){var s=d[a.PartNumber+"|"+a.start+"|"+a.end];s&&(a.ETag=s,a.Uploaded=!0)}),U.emit("get_copy_data_finish",{UploadId:V,PartList:g.PartList})}})};Se(0)}),U.on("get_file_size_finish",function(){if(function(){for(var me=[1,2,4,8,16,32,64,128,256,512,1024,1024*2,1024*4,1024*5],Ee=1024*1024,Se=0;SeAe.length&&(le[be]=Se)}),U.emit("get_file_size_finish")}})}function m(g,D){var U=g.TaskId,F=g.Bucket,$=g.Region,w=g.Key,H=g.CopySource,N=g.UploadId,X=g.PartNumber*1,J=g.CopySourceRange,ce=this.options.ChunkRetryTimes+1,se=this;l.retry(ce,function(re){se.uploadPartCopy({TaskId:U,Bucket:F,Region:$,Key:w,CopySource:H,UploadId:N,PartNumber:X,CopySourceRange:J},function(Z,te){re(Z||null,te)})},function(re,Z){return D(re,Z)})}var K={sliceUploadFile:B,abortUploadTask:Q,uploadFile:ge,uploadFiles:A,sliceCopyFile:S};y.exports.init=function(g,D){D.transferToTaskMethod(K,"sliceUploadFile"),P.each(K,function(U,F){g.prototype[F]=P.apiWrapper(F,U)})}},"./src/async.js":function(y,C){var u=function(k,P,ee,B){if(B=B||function(){},!k.length||P<=0)return B();var b=0,q=0,L=0;(function z(){if(b>=k.length)return B();for(;L=k.length?B():z())})})()},v=function(k,P,ee){var B=function b(q){P(function(L,z){L&&q/ig,"<$1Rule>"),c=c.replace(/<(\/?)Tags>/ig,"<$1Tag>");var t=e.Headers;t["Content-Type"]="application/xml",t["Content-MD5"]=l.binaryBase64(l.md5(c)),he.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:c,action:"replication",headers:t},function(n,r){if(n&&n.statusCode===204)return f(null,{statusCode:n.statusCode});if(n)return f(n);f(null,{statusCode:r.statusCode,headers:r.headers})})}function H(e,f){he.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(o,c){if(o){if(o.statusCode===404&&o.error&&(o.error==="Not Found"||o.error.Code==="ReplicationConfigurationnotFoundError")){var t={ReplicationConfiguration:{Rules:[]},statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}!c.ReplicationConfiguration&&(c.ReplicationConfiguration={}),c.ReplicationConfiguration.Rule&&(c.ReplicationConfiguration.Rules=l.makeArray(c.ReplicationConfiguration.Rule),delete c.ReplicationConfiguration.Rule),f(o,c)})}function N(e,f){he.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function X(e,f){if(!e.WebsiteConfiguration){f(l.error(new Error("missing param WebsiteConfiguration")));return}var o=l.clone(e.WebsiteConfiguration||{}),c=o.RoutingRules||o.RoutingRule||[];c=l.isArray(c)?c:[c],delete o.RoutingRule,delete o.RoutingRules,c.length&&(o.RoutingRules={RoutingRule:c});var t=l.json2xml({WebsiteConfiguration:o}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"website",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function J(e,f){he.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},function(o,c){if(o){if(o.statusCode===404&&o.error.Code==="NoSuchWebsiteConfiguration"){var t={WebsiteConfiguration:{},statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=c.WebsiteConfiguration||{};if(n.RoutingRules){var r=l.clone(n.RoutingRules.RoutingRule||[]);r=l.makeArray(r),n.RoutingRules=r}f(null,{WebsiteConfiguration:n,statusCode:c.statusCode,headers:c.headers})})}function ce(e,f){he.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function se(e,f){if(!e.RefererConfiguration){f(l.error(new Error("missing param RefererConfiguration")));return}var o=l.clone(e.RefererConfiguration||{}),c=o.DomainList||{},t=c.Domains||c.Domain||[];t=l.isArray(t)?t:[t],t.length&&(o.DomainList={Domain:t});var n=l.json2xml({RefererConfiguration:o}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=l.binaryBase64(l.md5(n)),he.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"referer",headers:r},function(h,E){if(h&&h.statusCode===204)return f(null,{statusCode:h.statusCode});if(h)return f(h);f(null,{statusCode:E.statusCode,headers:E.headers})})}function re(e,f){he.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},function(o,c){if(o){if(o.statusCode===404&&o.error.Code==="NoSuchRefererConfiguration"){var t={WebsiteConfiguration:{},statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=c.RefererConfiguration||{};if(n.DomainList){var r=l.makeArray(n.DomainList.Domain||[]);n.DomainList={Domains:r}}f(null,{RefererConfiguration:n,statusCode:c.statusCode,headers:c.headers})})}function Z(e,f){var o=e.DomainConfiguration||{},c=o.DomainRule||e.DomainRule||[];c=l.clone(c);var t=l.json2xml({DomainConfiguration:{DomainRule:c}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"domain",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function te(e,f){he.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(o,c){if(o)return f(o);var t=[];try{t=c.DomainConfiguration.DomainRule||[]}catch(n){}t=l.clone(l.isArray(t)?t:[t]),f(null,{DomainRule:t,statusCode:c.statusCode,headers:c.headers})})}function ie(e,f){he.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function we(e,f){var o=e.OriginConfiguration||{},c=o.OriginRule||e.OriginRule||[];c=l.clone(c);var t=l.json2xml({OriginConfiguration:{OriginRule:c}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"origin",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function de(e,f){he.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(o,c){if(o)return f(o);var t=[];try{t=c.OriginConfiguration.OriginRule||[]}catch(n){}t=l.clone(l.isArray(t)?t:[t]),f(null,{OriginRule:t,statusCode:c.statusCode,headers:c.headers})})}function Y(e,f){he.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function pe(e,f){var o=l.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=l.binaryBase64(l.md5(o)),he.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"logging",headers:c},function(t,n){if(t&&t.statusCode===204)return f(null,{statusCode:t.statusCode});if(t)return f(t);f(null,{statusCode:n.statusCode,headers:n.headers})})}function oe(e,f){he.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},function(o,c){if(o)return f(o);f(null,{BucketLoggingStatus:c.BucketLoggingStatus,statusCode:c.statusCode,headers:c.headers})})}function le(e,f){var o=l.clone(e.InventoryConfiguration);if(o.OptionalFields){var c=o.OptionalFields||[];o.OptionalFields={Field:c}}if(o.Destination&&o.Destination.COSBucketDestination&&o.Destination.COSBucketDestination.Encryption){var t=o.Destination.COSBucketDestination.Encryption;Object.keys(t).indexOf("SSECOS")>-1&&(t["SSE-COS"]=t.SSECOS,delete t.SSECOS)}var n=l.json2xml({InventoryConfiguration:o}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=l.binaryBase64(l.md5(n)),he.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"inventory",qs:{id:e.Id},headers:r},function(h,E){if(h&&h.statusCode===204)return f(null,{statusCode:h.statusCode});if(h)return f(h);f(null,{statusCode:E.statusCode,headers:E.headers})})}function ye(e,f){he.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(o,c){if(o)return f(o);var t=c.InventoryConfiguration;if(t&&t.OptionalFields&&t.OptionalFields.Field){var n=t.OptionalFields.Field;l.isArray(n)||(n=[n]),t.OptionalFields=n}if(t.Destination&&t.Destination.COSBucketDestination&&t.Destination.COSBucketDestination.Encryption){var r=t.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}f(null,{InventoryConfiguration:t,statusCode:c.statusCode,headers:c.headers})})}function ve(e,f){he.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(o,c){if(o)return f(o);var t=c.ListInventoryConfigurationResult,n=t.InventoryConfiguration||[];n=l.isArray(n)?n:[n],delete t.InventoryConfiguration,l.each(n,function(r){if(r&&r.OptionalFields&&r.OptionalFields.Field){var h=r.OptionalFields.Field;l.isArray(h)||(h=[h]),r.OptionalFields=h}if(r.Destination&&r.Destination.COSBucketDestination&&r.Destination.COSBucketDestination.Encryption){var E=r.Destination.COSBucketDestination.Encryption;Object.keys(E).indexOf("SSE-COS")>-1&&(E.SSECOS=E["SSE-COS"],delete E["SSE-COS"])}}),t.InventoryConfigurations=n,l.extend(t,{statusCode:c.statusCode,headers:c.headers}),f(null,t)})}function me(e,f){he.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function Ee(e,f){if(!e.AccelerateConfiguration){f(l.error(new Error("missing param AccelerateConfiguration")));return}var o={AccelerateConfiguration:e.AccelerateConfiguration||{}},c=l.json2xml(o),t={};t["Content-Type"]="application/xml",t["Content-MD5"]=l.binaryBase64(l.md5(c)),he.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:c,action:"accelerate",headers:t},function(n,r){if(n)return f(n);f(null,{statusCode:r.statusCode,headers:r.headers})})}function Se(e,f){he.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},function(o,c){o||!c.AccelerateConfiguration&&(c.AccelerateConfiguration={}),f(o,c)})}function be(e,f){var o=e.ServerSideEncryptionConfiguration||{},c=o.Rule||o.Rules||[],t=l.json2xml({ServerSideEncryptionConfiguration:{Rule:c}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:t,action:"encryption",headers:n},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function Ae(e,f){he.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},function(o,c){if(o){if(o.statusCode===404&&o.code==="NoSuchEncryptionConfiguration"){var t={EncryptionConfiguration:{Rules:[]},statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=l.makeArray(c.EncryptionConfiguration&&c.EncryptionConfiguration.Rule||[]);c.EncryptionConfiguration={Rules:n},f(o,c)})}function V(e,f){he.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function x(e,f){he.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},function(o,c){if(o){var t=o.statusCode;return e.Headers["If-Modified-Since"]&&t&&t===304?f(null,{NotModified:!0,statusCode:t}):f(o)}c.ETag=l.attr(c.headers,"etag",""),f(null,c)})}function I(e,f){var o={};o.prefix=e.Prefix||"",o.delimiter=e.Delimiter,o["key-marker"]=e.KeyMarker,o["version-id-marker"]=e.VersionIdMarker,o["max-keys"]=e.MaxKeys,o["encoding-type"]=e.EncodingType,he.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:o.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:o,action:"versions"},function(c,t){if(c)return f(c);var n=t.ListVersionsResult||{},r=n.DeleteMarker||[];r=l.isArray(r)?r:[r];var h=n.Version||[];h=l.isArray(h)?h:[h];var E=l.clone(n);delete E.DeleteMarker,delete E.Version,l.extend(E,{DeleteMarkers:r,Versions:h,statusCode:t.statusCode,headers:t.headers}),f(null,E)})}function d(e,f){var o=e.Query||{},c=e.QueryString||"",t=l.throttleOnProgress.call(this,0,e.onProgress),n=e.tracker;n&&n.setParams({signStartTime:new Date().getTime()}),o["response-content-type"]=e.ResponseContentType,o["response-content-language"]=e.ResponseContentLanguage,o["response-expires"]=e.ResponseExpires,o["response-cache-control"]=e.ResponseCacheControl,o["response-content-disposition"]=e.ResponseContentDisposition,o["response-content-encoding"]=e.ResponseContentEncoding,he.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,DataType:e.DataType,headers:e.Headers,qs:o,qsStr:c,rawBody:!0,onDownloadProgress:t,tracker:n},function(r,h){if(t(null,!0),r){var E=r.statusCode;return e.Headers["If-Modified-Since"]&&E&&E===304?f(null,{NotModified:!0}):f(r)}f(null,{Body:h.body,ETag:l.attr(h.headers,"etag",""),statusCode:h.statusCode,headers:h.headers})})}function i(e,f){var o=this,c=e.ContentLength,t=l.throttleOnProgress.call(o,c,e.onProgress),n=e.Headers;!n["Cache-Control"]&&!n["cache-control"]&&(n["Cache-Control"]=""),!n["Content-Type"]&&!n["content-type"]&&(n["Content-Type"]=e.Body&&e.Body.type||"");var r=e.UploadAddMetaMd5||o.options.UploadAddMetaMd5||o.options.UploadCheckContentMd5,h=e.tracker;r&&h&&h.setParams({md5StartTime:new Date().getTime()}),l.getBodyMd5(r,e.Body,function(E){E&&(h&&h.setParams({md5EndTime:new Date().getTime()}),o.options.UploadCheckContentMd5&&(n["Content-MD5"]=l.binaryBase64(E)),(e.UploadAddMetaMd5||o.options.UploadAddMetaMd5)&&(n["x-cos-meta-md5"]=E)),e.ContentLength!==void 0&&(n["Content-Length"]=e.ContentLength),t(null,!0),he.call(o,{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:t,tracker:h},function(ne,fe){if(ne)return t(null,!0),f(ne);t({loaded:c,total:c},!0);var ue=Ve({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:o.options.UseAccelerate?"accelerate":e.Region,object:e.Key});ue=ue.substr(ue.indexOf("://")+3),fe.Location=ue,fe.ETag=l.attr(fe.headers,"etag",""),f(null,fe)})},e.onHashProgress)}function a(e,f){he.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId,action:e.Recursive?"recursive":""},function(o,c){if(o){var t=o.statusCode;return t&&t===404?f(null,{BucketNotFound:!0,statusCode:t}):f(o)}f(null,{statusCode:c.statusCode,headers:c.headers})})}function s(e,f){var o={};e.VersionId&&(o.versionId=e.VersionId),he.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:o,action:"acl"},function(c,t){if(c)return f(c);var n=t.AccessControlPolicy||{},r=n.Owner||{},h=n.AccessControlList&&n.AccessControlList.Grant||[];h=l.isArray(h)?h:[h];var E=Qe(n);delete E.GrantWrite,t.headers&&t.headers["x-cos-acl"]&&(E.ACL=t.headers["x-cos-acl"]),E=l.extend(E,{Owner:r,Grants:h,statusCode:t.statusCode,headers:t.headers}),f(null,E)})}function p(e,f){var o=e.Headers,c="";if(e.AccessControlPolicy){var t=l.clone(e.AccessControlPolicy||{}),n=t.Grants||t.Grant;n=l.isArray(n)?n:[n],delete t.Grant,delete t.Grants,t.AccessControlList={Grant:n},c=l.json2xml({AccessControlPolicy:t}),o["Content-Type"]="application/xml",o["Content-MD5"]=l.binaryBase64(l.md5(c))}l.each(o,function(r,h){h.indexOf("x-cos-grant-")===0&&(o[h]=Ze(o[h]))}),he.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:o,body:c},function(r,h){if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function R(e,f){var o=e.Headers;o.Origin=e.Origin,o["Access-Control-Request-Method"]=e.AccessControlRequestMethod,o["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,he.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:o},function(c,t){if(c)return c.statusCode&&c.statusCode===403?f(null,{OptionsForbidden:!0,statusCode:c.statusCode}):f(c);var n=t.headers||{};f(null,{AccessControlAllowOrigin:n["access-control-allow-origin"],AccessControlAllowMethods:n["access-control-allow-methods"],AccessControlAllowHeaders:n["access-control-allow-headers"],AccessControlExposeHeaders:n["access-control-expose-headers"],AccessControlMaxAge:n["access-control-max-age"],statusCode:t.statusCode,headers:t.headers})})}function O(e,f){var o=this,c=e.Headers;!c["Cache-Control"]&&!c["cache-control"]&&(c["Cache-Control"]="");var t=e.CopySource||"",n=l.getSourceParams.call(this,t);if(!n){f(l.error(new Error("CopySource format error")));return}var r=n.Bucket,h=n.Region,E=decodeURIComponent(n.Key);he.call(this,{Scope:[{action:"name/cos:GetObject",bucket:r,region:h,prefix:E},{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(ne,fe){if(ne)return f(ne);var ue=l.clone(fe.CopyObjectResult||{}),Te=Ve({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0});l.extend(ue,{Location:Te,statusCode:fe.statusCode,headers:fe.headers}),f(null,ue)})}function G(e,f){var o=e.CopySource||"",c=l.getSourceParams.call(this,o);if(!c){f(l.error(new Error("CopySource format error")));return}var t=c.Bucket,n=c.Region,r=decodeURIComponent(c.Key);he.call(this,{Scope:[{action:"name/cos:GetObject",bucket:t,region:n,prefix:r},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},function(h,E){if(h)return f(h);var ne=l.clone(E.CopyPartResult||{});l.extend(ne,{statusCode:E.statusCode,headers:E.headers}),f(null,ne)})}function ae(e,f){var o=e.Objects||[],c=e.Quiet;o=l.isArray(o)?o:[o];var t=l.json2xml({Delete:{Object:o,Quiet:c||!1}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t));var r=l.map(o,function(h){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:h.Key}});he.call(this,{Scope:r,method:"POST",Bucket:e.Bucket,Region:e.Region,body:t,action:"delete",headers:n},function(h,E){if(h)return f(h);var ne=E.DeleteResult||{},fe=ne.Deleted||[],ue=ne.Error||[];fe=l.isArray(fe)?fe:[fe],ue=l.isArray(ue)?ue:[ue];var Te=l.clone(ne);l.extend(Te,{Error:ue,Deleted:fe,statusCode:E.statusCode,headers:E.headers}),f(null,Te)})}function Ce(e,f){var o=e.Headers;if(!e.RestoreRequest){f(l.error(new Error("missing param RestoreRequest")));return}var c=e.RestoreRequest||{},t=l.json2xml({RestoreRequest:c});o["Content-Type"]="application/xml",o["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:t,action:"restore",headers:o},f)}function W(e,f){var o=e.Tagging||{},c=o.TagSet||o.Tags||e.Tags||[];c=l.clone(l.isArray(c)?c:[c]);var t=l.json2xml({Tagging:{TagSet:{Tag:c}}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:t,action:"tagging",headers:n,VersionId:e.VersionId},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);f(null,{statusCode:h.statusCode,headers:h.headers})})}function Oe(e,f){he.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId},function(o,c){if(o){if(o.statusCode===404&&o.error&&(o.error==="Not Found"||o.error.Code==="NoSuchTagSet")){var t={Tags:[],statusCode:o.statusCode};o.headers&&(t.headers=o.headers),f(null,t)}else f(o);return}var n=[];try{n=c.Tagging.TagSet.Tag||[]}catch(r){}n=l.clone(l.isArray(n)?n:[n]),f(null,{Tags:n,statusCode:c.statusCode,headers:c.headers})})}function ke(e,f){he.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId},function(o,c){if(o&&o.statusCode===204)return f(null,{statusCode:o.statusCode});if(o)return f(o);f(null,{statusCode:c.statusCode,headers:c.headers})})}function Ie(e,f){var o=e.SelectType;if(!o)return f(l.error(new Error("missing param SelectType")));var c=e.SelectRequest||{},t=l.json2xml({SelectRequest:c}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=l.binaryBase64(l.md5(t)),he.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"select",qs:{"select-type":e.SelectType},VersionId:e.VersionId,body:t,DataType:"arraybuffer",rawBody:!0},function(r,h){if(r&&r.statusCode===204)return f(null,{statusCode:r.statusCode});if(r)return f(r);var E=l.parseSelectPayload(h.body);f(null,{statusCode:h.statusCode,headers:h.headers,Body:E.body,Payload:E.payload})})}function Pe(e,f){var o=this,c=e.Headers,t=e.tracker;!c["Cache-Control"]&&!c["cache-control"]&&(c["Cache-Control"]=""),!c["Content-Type"]&&!c["content-type"]&&(c["Content-Type"]=e.Body&&e.Body.type||"");var n=e.Body&&(e.UploadAddMetaMd5||o.options.UploadAddMetaMd5);n&&t&&t.setParams({md5StartTime:new Date().getTime()}),l.getBodyMd5(n,e.Body,function(r){r&&(e.Headers["x-cos-meta-md5"]=r),n&&t&&t.setParams({md5EndTime:new Date().getTime()}),he.call(o,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:t},function(h,E){if(h)return t&&t.parent&&t.parent.setParams({errorNode:"multipartInit"}),f(h);if(E=l.clone(E||{}),E&&E.InitiateMultipartUploadResult)return f(null,l.extend(E.InitiateMultipartUploadResult,{statusCode:E.statusCode,headers:E.headers}));f(null,E)})},e.onHashProgress)}function Me(e,f){var o=this;l.getFileSize("multipartUpload",e,function(){var c=e.tracker,t=o.options.UploadCheckContentMd5;t&&c&&c.setParams({md5StartTime:new Date().getTime()}),l.getBodyMd5(t,e.Body,function(n){n&&(e.Headers["Content-MD5"]=l.binaryBase64(n)),t&&c&&c.setParams({md5EndTime:new Date().getTime()}),c&&c.setParams({partNumber:e.PartNumber}),he.call(o,{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:c},function(r,h){if(r)return c&&c.parent&&c.parent.setParams({errorNode:"multipartUpload"}),f(r);f(null,{ETag:l.attr(h.headers,"etag",""),statusCode:h.statusCode,headers:h.headers})})})})}function Ge(e,f){for(var o=this,c=e.UploadId,t=e.Parts,n=e.tracker,r=0,h=t.length;r-1?ue(fe.Authorization):"sign="+encodeURIComponent(fe.Authorization)),fe.SecurityToken&&(Te+="&x-cos-security-token="+fe.SecurityToken),fe.ClientIP&&(Te+="&clientIP="+fe.ClientIP),fe.ClientUA&&(Te+="&clientUA="+fe.ClientUA),fe.Token&&(Te+="&token="+fe.Token),n&&(Te+="&"+n),setTimeout(function(){f(null,{Url:Te})})}});return E?(r+="?"+E.Authorization+(E.SecurityToken?"&x-cos-security-token="+E.SecurityToken:""),n&&(r+="&"+n)):n&&(r+="?"+n),r}function Qe(e){var f={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},o={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},c=e&&e.AccessControlList||{},t=c.Grant;t&&(t=l.isArray(t)?t:[t]);var n={READ:0,WRITE:0,FULL_CONTROL:0};return t&&t.length&&l.each(t,function(r){r.Grantee.ID==="qcs::cam::anyone:anyone"||r.Grantee.URI==="http://cam.qcloud.com/groups/global/AllUsers"?n[r.Permission]=1:r.Grantee.ID!==e.Owner.ID&&f[o[r.Permission]].push('id="'+r.Grantee.ID+'"')}),n.FULL_CONTROL||n.WRITE&&n.READ?f.ACL="public-read-write":n.READ?f.ACL="public-read":f.ACL="private",l.each(o,function(r){f[r]=Ze(f[r].join(","))}),f}function Ze(e){var f=e.split(","),o={},c,t;for(c=0;c-1?n="{Region}.myqcloud.com":n="cos.{Region}.myqcloud.com",e.ForcePathStyle||(n="{Bucket}."+n)),n=n.replace(/\{\{AppId\}\}/ig,t).replace(/\{\{Bucket\}\}/ig,c).replace(/\{\{Region\}\}/ig,f).replace(/\{\{.*?\}\}/ig,""),n=n.replace(/\{AppId\}/ig,t).replace(/\{BucketName\}/ig,c).replace(/\{Bucket\}/ig,o).replace(/\{Region\}/ig,f).replace(/\{.*?\}/ig,""),/^[a-zA-Z]+:\/\//.test(n)||(n=h+"//"+n),n.slice(-1)==="/"&&(n=n.slice(0,-1));var E=n;return e.ForcePathStyle&&(E+="/"+o),E+="/",r&&(E+=l.camSafeUrlEncode(r).replace(/%2F/g,"/")),e.isLocation&&(E=E.replace(/^https?:\/\//,"")),E}var Je=function(f){if(!f.Bucket||!f.Region)return"";var o=f.UseAccelerate===void 0?this.options.UseAccelerate:f.UseAccelerate,c=f.Url||Ve({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:f.Bucket,region:o?"accelerate":f.Region}),t=c.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),n=new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$");return n.test(t)?t:""};function $e(e,f){var o=l.clone(e.Headers),c="";l.each(o,function(xe,Re){(xe===""||["content-type","cache-control","expires"].indexOf(Re.toLowerCase())>-1)&&delete o[Re],Re.toLowerCase()==="host"&&(c=xe)});var t=e.ForceSignHost!==!1;!c&&e.SignHost&&t&&(o.Host=e.SignHost);var n=!1,r=function(Re,_e){n||(n=!0,_e&&_e.XCosSecurityToken&&!_e.SecurityToken&&(_e=l.clone(_e),_e.SecurityToken=_e.XCosSecurityToken,delete _e.XCosSecurityToken),f&&f(Re,_e))},h=this,E=e.Bucket||"",ne=e.Region||"",fe=e.Key||"";h.options.ForcePathStyle&&E&&(fe=E+"/"+fe);var ue="/"+fe,Te={},Be=e.Scope;if(!Be){var Ue=e.Action||"",We=e.ResourceKey||e.Key||"";Be=e.Scope||[{action:Ue,bucket:E,region:ne,prefix:We}]}var He=l.md5(JSON.stringify(Be));h._StsCache=h._StsCache||[],function(){var xe,Re;for(xe=h._StsCache.length-1;xe>=0;xe--){Re=h._StsCache[xe];var _e=Math.round(l.getSkewTime(h.options.SystemClockOffset)/1e3)+30;if(Re.StartTime&&_e=Re.ExpiredTime){h._StsCache.splice(xe,1);continue}if(!Re.ScopeLimit||Re.ScopeLimit&&Re.ScopeKey===He){Te=Re;break}}}();var Le=function(){var Re="";Te.StartTime&&e.Expires?Re=Te.StartTime+";"+(Te.StartTime+e.Expires*1):Te.StartTime&&Te.ExpiredTime&&(Re=Te.StartTime+";"+Te.ExpiredTime);var _e=l.getAuth({SecretId:Te.TmpSecretId,SecretKey:Te.TmpSecretKey,Method:e.Method,Pathname:ue,Query:e.Query,Headers:o,Expires:e.Expires,UseRawKey:h.options.UseRawKey,SystemClockOffset:h.options.SystemClockOffset,KeyTime:Re,ForceSignHost:t}),De={Authorization:_e,SecurityToken:Te.SecurityToken||Te.XCosSecurityToken||"",Token:Te.Token||"",ClientIP:Te.ClientIP||"",ClientUA:Te.ClientUA||""};r(null,De)},qe=function(Re){if(Re.Authorization){var _e=!1,De=Re.Authorization;if(De)if(De.indexOf(" ")>-1)_e=!1;else if(De.indexOf("q-sign-algorithm=")>-1&&De.indexOf("q-ak=")>-1&&De.indexOf("q-sign-time=")>-1&&De.indexOf("q-key-time=")>-1&&De.indexOf("q-url-param-list=")>-1)_e=!0;else try{De=atob(De),De.indexOf("a=")>-1&&De.indexOf("k=")>-1&&De.indexOf("t=")>-1&&De.indexOf("r=")>-1&&De.indexOf("b=")>-1&&(_e=!0)}catch(Ke){}if(!_e)return l.error(new Error("getAuthorization callback params format error"))}else{if(!Re.TmpSecretId)return l.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!Re.TmpSecretKey)return l.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!Re.SecurityToken&&!Re.XCosSecurityToken)return l.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!Re.ExpiredTime)return l.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(Re.ExpiredTime&&Re.ExpiredTime.toString().length!==10)return l.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(Re.StartTime&&Re.StartTime.toString().length!==10)return l.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(Te.ExpiredTime&&Te.ExpiredTime-l.getSkewTime(h.options.SystemClockOffset)/1e3>60)Le();else if(h.options.getAuthorization)h.options.getAuthorization.call(h,{Bucket:E,Region:ne,Method:e.Method,Key:fe,Pathname:ue,Query:e.Query,Headers:o,Scope:Be,SystemClockOffset:h.options.SystemClockOffset,ForceSignHost:t},function(xe){typeof xe=="string"&&(xe={Authorization:xe});var Re=qe(xe);if(Re)return r(Re);xe.Authorization?r(null,xe):(Te=xe||{},Te.Scope=Be,Te.ScopeKey=He,h._StsCache.push(Te),Le())});else if(h.options.getSTS)h.options.getSTS.call(h,{Bucket:E,Region:ne},function(xe){Te=xe||{},Te.Scope=Be,Te.ScopeKey=He,Te.TmpSecretId||(Te.TmpSecretId=Te.SecretId),Te.TmpSecretKey||(Te.TmpSecretKey=Te.SecretKey);var Re=qe(Te);if(Re)return r(Re);h._StsCache.push(Te),Le()});else return function(){var xe=l.getAuth({SecretId:e.SecretId||h.options.SecretId,SecretKey:e.SecretKey||h.options.SecretKey,Method:e.Method,Pathname:ue,Query:e.Query,Headers:o,Expires:e.Expires,UseRawKey:h.options.UseRawKey,SystemClockOffset:h.options.SystemClockOffset,ForceSignHost:t}),Re={Authorization:xe,SecurityToken:h.options.SecurityToken||h.options.XCosSecurityToken};return r(null,Re),Re}();return""}function rt(e){var f=!1,o=!1,c=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var t=e.error.Code,n=e.error.Message;(t==="RequestTimeTooSkewed"||t==="AccessDenied"&&n==="Request has expired")&&(o=!0)}catch(h){}if(e)if(o&&c){var r=Date.parse(c);this.options.CorrectClockSkew&&Math.abs(l.getSkewTime(this.options.SystemClockOffset)-r)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=r-Date.now(),f=!0)}else Math.floor(e.statusCode/100)===5&&(f=!0);return f}function he(e,f){var o=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=l.clearKey(e.qs),e.headers&&(e.headers=l.clearKey(e.headers)),e.qs&&(e.qs=l.clearKey(e.qs));var c=l.clone(e.qs);e.action&&(c[e.action]="");var t=e.url||e.Url,n=e.SignHost||Je.call(this,{Bucket:e.Bucket,Region:e.Region,Url:t}),r=e.tracker,h=function E(ne){var fe=o.options.SystemClockOffset;r&&r.setParams({signStartTime:new Date().getTime(),retryTimes:ne-1}),$e.call(o,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:c,Headers:e.headers,SignHost:n,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:o.options.ForceSignHost},function(ue,Te){if(ue){f(ue);return}r&&r.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),e.AuthData=Te,et.call(o,e,function(Be,Ue){r&&r.setParams({httpEndTime:new Date().getTime()}),Be&&ne<2&&(fe!==o.options.SystemClockOffset||rt.call(o,Be))?(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"]),E(ne+1)):f(Be,Ue)})})};h(1)}function et(e,f){var o=this,c=e.TaskId;if(!(c&&!o._isRunningTask(c))){var t=e.Bucket,n=e.Region,r=e.Key,h=e.method||"GET",E=e.Url||e.url,ne=e.body,fe=e.rawBody;o.options.UseAccelerate&&(n="accelerate"),E=E||Ve({ForcePathStyle:o.options.ForcePathStyle,protocol:o.options.Protocol,domain:o.options.Domain,bucket:t,region:n,object:r}),e.action&&(E=E+"?"+(l.isIOS_QQ?"".concat(e.action,"="):e.action)),e.qsStr&&(E.indexOf("?")>-1?E=E+"&"+e.qsStr:E=E+"?"+e.qsStr);var ue={method:h,url:E,headers:e.headers,qs:e.qs,body:ne},Te="x-cos-security-token";if(l.isCIHost(E)&&(Te="x-ci-security-token"),ue.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(ue.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(ue.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(ue.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(ue.headers[Te]=e.AuthData.SecurityToken),ue.headers&&(ue.headers=l.clearKey(ue.headers)),ue=l.clearKey(ue),e.onProgress&&typeof e.onProgress=="function"){var Be=ne&&(ne.size||ne.length)||0;ue.onProgress=function(xe){if(!(c&&!o._isRunningTask(c))){var Re=xe?xe.loaded:0;e.onProgress({loaded:Re,total:Be})}}}e.onDownloadProgress&&(ue.onDownloadProgress=e.onDownloadProgress),e.DataType&&(ue.dataType=e.DataType),this.options.Timeout&&(ue.timeout=this.options.Timeout),o.options.ForcePathStyle&&(ue.pathStyle=o.options.ForcePathStyle),o.emit("before-send",ue);var Ue=ue.url.includes("accelerate."),We=ue.qs?Object.keys(ue.qs).map(function(xe){return"".concat(xe,"=").concat(ue.qs[xe])}).join("&"):"",He=We?ue.url+"?"+We:ue.url;e.tracker&&e.tracker.setParams({reqUrl:He,accelerate:Ue?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:He,accelerate:Ue?"Y":"N"});var Le=(o.options.Request||T)(ue,function(xe){if(!(xe&&xe.error==="abort")){var Re={options:ue,error:xe&&xe.error,statusCode:xe&&xe.statusCode||0,statusMessage:xe&&xe.statusMessage||"",headers:xe&&xe.headers||{},body:xe&&xe.body};o.emit("after-receive",Re);var _e=Re.error,De=Re.body,Ke={statusCode:Re.statusCode,statusMessage:Re.statusMessage,headers:Re.headers},st,it=function(lt,ft){if(c&&o.off("inner-kill-task",qe),!st){st=!0;var dt={};Ke&&Ke.statusCode&&(dt.statusCode=Ke.statusCode),Ke&&Ke.headers&&(dt.headers=Ke.headers),lt?(lt=l.extend(lt||{},dt),f(lt,null)):(ft=l.extend(ft||{},dt),f(null,ft)),Le=null}};if(_e)return it(l.error(_e));var ut=Ke.statusCode,ht=Math.floor(ut/100)===2;if(fe&&ht)return it(null,{body:De});var at;try{at=De&&De.indexOf("<")>-1&&De.indexOf(">")>-1&&l.xml2json(De)||{}}catch(gt){at={}}var ct=at&&at.Error;ht?it(null,at):ct?it(l.error(new Error(ct.Message),{code:ct.Code,error:ct})):ut?it(l.error(new Error(Ke.statusMessage),{code:""+ut})):ut&&it(l.error(new Error("statusCode error")))}}),qe=function xe(Re){Re.TaskId===c&&(Le&&Le.abort&&Le.abort(),o.off("inner-kill-task",xe))};c&&o.on("inner-kill-task",qe)}}var ot={getService:k,putBucket:P,headBucket:ee,getBucket:B,deleteBucket:b,putBucketAcl:q,getBucketAcl:L,putBucketCors:z,getBucketCors:_,deleteBucketCors:j,getBucketLocation:Q,getBucketPolicy:ge,putBucketPolicy:M,deleteBucketPolicy:A,putBucketTagging:S,getBucketTagging:m,deleteBucketTagging:K,putBucketLifecycle:g,getBucketLifecycle:D,deleteBucketLifecycle:U,putBucketVersioning:F,getBucketVersioning:$,putBucketReplication:w,getBucketReplication:H,deleteBucketReplication:N,putBucketWebsite:X,getBucketWebsite:J,deleteBucketWebsite:ce,putBucketReferer:se,getBucketReferer:re,putBucketDomain:Z,getBucketDomain:te,deleteBucketDomain:ie,putBucketOrigin:we,getBucketOrigin:de,deleteBucketOrigin:Y,putBucketLogging:pe,getBucketLogging:oe,putBucketInventory:le,getBucketInventory:ye,listBucketInventory:ve,deleteBucketInventory:me,putBucketAccelerate:Ee,getBucketAccelerate:Se,putBucketEncryption:be,getBucketEncryption:Ae,deleteBucketEncryption:V,getObject:d,headObject:x,listObjectVersions:I,putObject:i,deleteObject:a,getObjectAcl:s,putObjectAcl:p,optionsObject:R,putObjectCopy:O,deleteMultipleObject:ae,restoreObject:Ce,putObjectTagging:W,getObjectTagging:Oe,deleteObjectTagging:ke,selectObjectContent:Ie,appendObject:Xe,uploadPartCopy:G,multipartInit:Pe,multipartUpload:Me,multipartComplete:Ge,multipartList:Fe,multipartListPart:je,multipartAbort:Ne,request:ze,getObjectUrl:Ye,getAuth:nt};function tt(e,f,o){l.each(["Cors","Acl"],function(c){if(e.slice(-c.length)===c){var t=e.slice(0,-c.length)+c.toUpperCase(),n=l.apiWrapper(e,f),r=!1;o[t]=function(){!r&&console.warn("warning: cos."+t+" has been deprecated. Please Use cos."+e+" instead."),r=!0,n.apply(this,arguments)}}})}y.exports.init=function(e,f){f.transferToTaskMethod(ot,"putObject"),l.each(ot,function(o,c){e.prototype[c]=l.apiWrapper(c,o),tt(c,o,e.prototype)})}},"./src/cos.js":function(y,C,u){"use strict";var v=u("./src/util.js"),T=u("./src/event.js"),l=u("./src/task.js"),k=u("./src/base.js"),P=u("./src/advance.js"),ee=u("./package.json"),B={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1024*1024,SliceSize:1024*1024,CopyChunkParallelLimit:20,CopyChunkSize:1024*1024*10,CopySliceSize:1024*1024*10,MaxPartNumber:1e4,ProgressInterval:1e3,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,UseRawKey:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadQueueSize:1e4,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:""},b=function(L){this.options=v.extend(v.clone(B),L||{}),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(1024*1024,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1024*1024,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&&console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'),this.options.SecretId&&this.options.SecretId.indexOf(" ")>-1&&(console.error("error: SecretId\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5"),console.error("error: SecretKey format is incorrect. Please check")),v.isNode()&&(console.warn("warning: cos-js-sdk-v5 \u4E0D\u652F\u6301 nodejs \u73AF\u5883\u4F7F\u7528\uFF0C\u8BF7\u6539\u7528 cos-nodejs-sdk-v5\uFF0C\u53C2\u8003\u6587\u6863\uFF1A https://cloud.tencent.com/document/product/436/8629"),console.warn("warning: cos-js-sdk-v5 does not support nodejs environment. Please use cos-nodejs-sdk-v5 instead. See: https://cloud.tencent.com/document/product/436/8629")),T.init(this),l.init(this)};k.init(b,l),P.init(b,l),b.util={md5:v.md5,xml2json:v.xml2json,json2xml:v.json2xml},b.getAuthorization=v.getAuth,b.version=ee.version,y.exports=b},"./src/event.js":function(y,C){var u=function(l){var k={},P=function(B){return!k[B]&&(k[B]=[]),k[B]};l.on=function(ee,B){ee==="task-list-update"&&console.warn('warning: Event "'+ee+'" has been deprecated. Please use "list-update" instead.'),P(ee).push(B)},l.off=function(ee,B){for(var b=P(ee),q=b.length-1;q>=0;q--)B===b[q]&&b.splice(q,1)},l.emit=function(ee,B){for(var b=P(ee).map(function(L){return L}),q=0;q=0;Q--){var M=k[Q][2];(!M||M+l=0;M--){var ge=k[M];ge[0]===_&&ge[1]===j&&k.splice(M,1)}k.unshift([_,j,Math.round(Date.now()/1e3)]),k.length>Q&&k.splice(Q),q()}},removeUploadId:function(_){b.call(this),delete L.using[_];for(var j=k.length-1;j>=0;j--)k[j][1]===_&&k.splice(j,1);q()}};y.exports=L},"./src/task.js":function(y,C,u){var v=u("./src/session.js"),T=u("./src/util.js"),l={},k=function(B,b){l[b]=B[b],B[b]=function(q,L){q.SkipTask?l[b].call(this,q,L):this._addTask(b,q,L)}},P=function(B){var b=[],q={},L=0,z=0,_=function(m){var K={id:m.id,Bucket:m.Bucket,Region:m.Region,Key:m.Key,FilePath:m.FilePath,state:m.state,loaded:m.loaded,size:m.size,speed:m.speed,percent:m.percent,hashPercent:m.hashPercent,error:m.error};return m.FilePath&&(K.FilePath=m.FilePath),m._custom&&(K._custom=m._custom),K},j=function(){var S,m=function(){S=0,B.emit("task-list-update",{list:T.map(b,_)}),B.emit("list-update",{list:T.map(b,_)})};return function(){S||(S=setTimeout(m))}}(),Q=function(){if(!(b.length<=B.options.UploadQueueSize)){for(var m=0;mB.options.UploadQueueSize;){var K=b[m].state==="waiting"||b[m].state==="checking"||b[m].state==="uploading";!b[m]||!K?(q[b[m].id]&&delete q[b[m].id],b.splice(m,1),z--):m++}j()}},M=function S(){if(!(L>=B.options.FileParallelLimit)){for(;b[z]&&b[z].state!=="waiting";)z++;if(!(z>=b.length)){var m=b[z];z++,L++,m.state="checking",m.params.onTaskStart&&m.params.onTaskStart(_(m)),!m.params.UploadData&&(m.params.UploadData={});var K=T.formatParams(m.api,m.params);l[m.api].call(B,K,function(g,D){!B._isRunningTask(m.id)||((m.state==="checking"||m.state==="uploading")&&(m.state=g?"error":"success",g&&(m.error=g),L--,j(),S(),m.callback&&m.callback(g,D),m.state==="success"&&(m.params&&(delete m.params.UploadData,delete m.params.Body,delete m.params),delete m.callback)),Q())}),j(),setTimeout(S)}}},ge=function(m,K){var g=q[m];if(!!g){var D=g&&g.state==="waiting",U=g&&(g.state==="checking"||g.state==="uploading");if(K==="canceled"&&g.state!=="canceled"||K==="paused"&&D||K==="paused"&&U){if(K==="paused"&&g.params.Body&&typeof g.params.Body.pipe=="function"){console.error("stream not support pause");return}g.state=K,B.emit("inner-kill-task",{TaskId:m,toState:K});try{var F=g&&g.params&&g.params.UploadData.UploadId}catch($){}K==="canceled"&&F&&v.removeUsing(F),j(),U&&(L--,M()),K==="canceled"&&(g.params&&(delete g.params.UploadData,delete g.params.Body,delete g.params),delete g.callback)}Q()}};B._addTasks=function(S){T.each(S,function(m){B._addTask(m.api,m.params,m.callback,!0)}),j()};var A=!0;B._addTask=function(S,m,K,g){m=T.formatParams(S,m);var D=T.uuid();m.TaskId=D,m.onTaskReady&&m.onTaskReady(D),m.TaskReady&&(m.TaskReady(D),A&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),A=!1);var U={params:m,callback:K,api:S,index:b.length,id:D,Bucket:m.Bucket,Region:m.Region,Key:m.Key,FilePath:m.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:m._custom},F=m.onHashProgress;m.onHashProgress=function(w){!B._isRunningTask(U.id)||(U.hashPercent=w.percent,F&&F(w),j())};var $=m.onProgress;return m.onProgress=function(w){!B._isRunningTask(U.id)||(U.state==="checking"&&(U.state="uploading"),U.loaded=w.loaded,U.speed=w.speed,U.percent=w.percent,$&&$(w),j())},T.getFileSize(S,m,function(w,H){if(w)return K(T.error(w));q[D]=U,b.push(U),U.size=H,!g&&j(),M(),Q()}),D},B._isRunningTask=function(S){var m=q[S];return!!(m&&(m.state==="checking"||m.state==="uploading"))},B.getTaskList=function(){return T.map(b,_)},B.cancelTask=function(S){ge(S,"canceled")},B.pauseTask=function(S){ge(S,"paused")},B.restartTask=function(S){var m=q[S];m&&(m.state==="paused"||m.state==="error")&&(m.state="waiting",j(),z=Math.min(z,m.index),M())},B.isUploadRunning=function(){return L||z=0||S.indexOf("wow32")>=0?"win32":S.indexOf("win64")>=0||S.indexOf("wow64")>=0?"win64":m?"mac":"unknown os"},isMobile:function(){var S=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i;return!!((typeof navigator=="undefined"?"undefined":l(navigator))==="object"&&navigator.userAgent.match(S))},isAndroid:function(){var S=/(Android|Adr|Linux)/i;return!!((typeof navigator=="undefined"?"undefined":l(navigator))==="object"&&navigator.userAgent.match(S))},isIOS:function(){var S=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator=="undefined"?"undefined":l(navigator))==="object"&&navigator.userAgent.match(S))},isOtherMobile:function(){return isMobile&&!isAndroid&&!isIOS},getDeviceName:function(){if((typeof navigator=="undefined"?"undefined":l(navigator))!=="object")return"unknown device";var S=navigator.userAgent.toLowerCase();if(S.includes("app/tencent_wemeet"))return"tencent_wemeet";if(S.indexOf("maxthon")>=0){var m=S.match(/maxthon\/([\d.]+)/),K=m&&m[1]||"";return"\u50B2\u6E38\u6D4F\u89C8\u5668 ".concat(K).trim()}if(S.indexOf("qqbrowser")>=0){var g=S.match(/qqbrowser\/([\d.]+)/),D=g&&g[1]||"";return"QQ\u6D4F\u89C8\u5668 ".concat(D).trim()}if(S.indexOf("se 2.x")>=0)return"\u641C\u72D7\u6D4F\u89C8\u5668";if(S.indexOf("wxwork")>=0)return"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668";if(S.indexOf("msie")>=0){var U=S.match(/msie ([\d.]+)/),F=U&&U[1]||"";return"IE ".concat(F).trim()}if(S.indexOf("firefox")>=0){var $=S.match(/firefox\/([\d.]+)/),w=$&&$[1]||"";return"Firefox ".concat(w).trim()}if(S.indexOf("chrome")>=0){var H=S.match(/chrome\/([\d.]+)/),N=H&&H[1]||"";return"Chrome ".concat(N).trim()}if(S.indexOf("opera")>=0){var X=S.match(/opera.([\d.]+)/),J=X&&X[1]||"";return"Opera ".concat(J).trim()}if(S.indexOf("safari")>=0){var ce=S.match(/version\/([\d.]+)/),se=ce&&ce[1]||"";return"Safari ".concat(se).trim()}if(S.indexOf("edge")>=0){var re=S.match(/edge\/([\d.]+)/),Z=re&&re[1]||"";return"edge ".concat(Z).trim()}return S.substr(0,200)}},b={isMobile:B.isMobile(),isBrowser:!B.isMobile(),mobileOsType:B.isAndroid()?"android":B.isIOS?"ios":"other_mobile",pcOsType:B.getOsType()},q={deviceType:b.isMobile?"mobile":b.isBrowser?"browser":"unknown",devicePlatform:b.isMobile?b.mobileOsType:b.pcOsType,deviceName:B.getDeviceName()},L=["multipartInit","multipartUpload","multipartComplete","multipartList","multipartListPart","multipartAbort"],z=["putObject","postObject","appendObject","sliceUploadFile","uploadFile","uploadFiles"].concat(L),_=["getObject"];function j(A){return z.includes(A)?"cos_upload":_.includes(A)?"cos_download":"base_service"}function Q(A){return A.replace(/([A-Z])/g,"_$1").toLowerCase()}function M(A){var S={},m=["tracePlatform","cossdkVersion","region","networkType","host","accelerate","requestPath","size","httpMd5","httpSign","httpFull","name","result","tookTime","errorNode","errorCode","errorMessage","errorRequestId","errorStatusCode","errorServiceName","errorType","traceId","bucket","appid","partNumber","retryTimes","reqUrl","customId","fullError","deviceType","devicePlatform","deviceName"],K=["tracePlatform","cossdkVersion","region","bucket","appid","networkType","host","accelerate","requestPath","partNumber","size","name","result","tookTime","errorRequestId","retryTimes","reqUrl","customId","deviceType","devicePlatform","deviceName"],g=A.result==="Success"?K:m;for(var D in A)if(!!g.includes(D)){var U=Q(D);S[U]=A[D]}return S}var ge=function(){"use strict";function A(S){v(this,A);var m=S.parent,K=S.traceId,g=S.bucket,D=S.region,U=S.apiName,F=S.fileKey,$=S.fileSize,w=S.accelerate,H=S.customId,N=S.delay,X=S.deepTracker,J=g&&g.substr(g.lastIndexOf("-")+1)||"";this.parent=m,this.deepTracker=X,this.delay=N,this.params={cossdkVersion:k.version,region:D,networkType:"",host:"",accelerate:w?"Y":"N",requestPath:F||"",size:$||-1,httpMd5:0,httpSign:0,httpFull:0,name:U||"",result:"",tookTime:0,errorNode:"",errorCode:"",errorMessage:"",errorRequestId:"",errorStatusCode:0,errorServiceName:"",tracePlatform:"cos-js-sdk-v5",traceId:K||B.getUid(),bucket:g,appid:J,partNumber:0,retryTimes:0,reqUrl:"",customId:H||"",deviceType:q.deviceType,devicePlatform:q.devicePlatform,deviceName:q.deviceName,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0},this.beacon=ee(N)}return T(A,[{key:"formatResult",value:function(m,K){var g,D,U,F,$,w,H=new Date().getTime(),N=H-this.params.startTime,X=B.getNetType(),J=m?(m==null?void 0:m.code)||(m==null||(g=m.error)===null||g===void 0?void 0:g.code)||(m==null||(D=m.error)===null||D===void 0?void 0:D.Code):"",ce=m?(m==null?void 0:m.message)||(m==null||(U=m.error)===null||U===void 0?void 0:U.message)||(m==null||(F=m.error)===null||F===void 0?void 0:F.Message):"",se=m?(m==null?void 0:m.resource)||(m==null||($=m.error)===null||$===void 0?void 0:$.resource)||(m==null||(w=m.error)===null||w===void 0?void 0:w.Resource):"",re=m?m==null?void 0:m.statusCode:K.statusCode,Z=m?(m==null?void 0:m.headers)&&(m==null?void 0:m.headers["x-cos-request-id"]):(K==null?void 0:K.headers)&&(K==null?void 0:K.headers["x-cos-request-id"]),te=m?Z?"Server":"Client":"";if(Object.assign(this.params,{tookTime:N,networkType:X,httpMd5:this.params.md5EndTime-this.params.md5StartTime,httpSign:this.params.signEndTime-this.params.signStartTime,httpFull:this.params.httpEndTime-this.params.httpStartTime,result:m?"Fail":"Success",errorType:te,errorCode:J,errorStatusCode:re,errorMessage:ce,errorServiceName:se,errorRequestId:Z}),m&&(!J||!ce)&&(this.params.fullError=m?JSON.stringify(m):""),this.params.name==="getObject"&&(this.params.size=K?K.headers&&K.headers["content-length"]:-1),this.params.reqUrl)try{var ie=/^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl);this.params.host=ie[2]}catch(we){this.params.host=this.params.reqUrl}this.sendEvents()}},{key:"setParams",value:function(m){Object.assign(this.params,m)}},{key:"sendEvents",value:function(){if(!(L.includes(this.params.name)&&!this.deepTracker)){var m=j(this.params.name),K=M(this.params);this.beacon||(this.beacon=ee(this.delay||5e3)),this.delay===0?this.beacon&&this.beacon.onDirectUserAction(m,K):this.beacon&&this.beacon.onUserAction(m,K)}}},{key:"generateSubTracker",value:function(m){return Object.assign(m,{parent:this,deepTracker:this.deepTracker,traceId:this.params.traceId,bucket:this.params.bucket,region:this.params.region,fileKey:this.params.requestPath,customId:this.params.customId,delay:this.delay}),new A(m)}}]),A}();y.exports=ge},"./src/util.js":function(y,C,u){"use strict";(function(v){var T=u("./node_modules/@babel/runtime/helpers/typeof.js"),l=u("./lib/md5.js"),k=u("./lib/crypto.js"),P=u("./lib/xml2json.js"),ee=u("./lib/json2xml.js"),B=u("./src/tracker.js");function b(V){return encodeURIComponent(V).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function q(V,x){var I=[];for(var d in V)V.hasOwnProperty(d)&&I.push(x?b(d).toLowerCase():d);return I.sort(function(i,a){return i=i.toLowerCase(),a=a.toLowerCase(),i===a?0:i>a?1:-1})}var L=function(x,I){var d,i,a,s=[],p=q(x);for(d=0;d-1||z.indexOf(i)>-1)&&(I[d]=x[d])}return I},j=function(x){x=x||{};var I=x.SecretId,d=x.SecretKey,i=x.KeyTime,a=(x.method||x.Method||"get").toLowerCase(),s=w(x.Query||x.params||{}),p=_(w(x.Headers||x.headers||{})),R=x.Key||"",O;x.UseRawKey?O=x.Pathname||x.pathname||"/"+R:(O=x.Pathname||x.pathname||R,O.indexOf("/")!==0&&(O="/"+O));var G=x.ForceSignHost!==!1;if(!p.Host&&!p.host&&x.Bucket&&x.Region&&G&&(p.Host=x.Bucket+".cos."+x.Region+".myqcloud.com"),!I)throw new Error("missing param SecretId");if(!d)throw new Error("missing param SecretKey");var ae=Math.round(le(x.SystemClockOffset)/1e3)-1,Ce=ae,W=x.Expires||x.expires;W===void 0?Ce+=900:Ce+=W*1||0;var Oe="sha1",ke=I,Ie=i||ae+";"+Ce,Pe=i||ae+";"+Ce,Me=q(p,!0).join(";").toLowerCase(),Ge=q(s,!0).join(";").toLowerCase(),Fe=k.HmacSHA1(Pe,d).toString(),je=[a,O,Ae.obj2str(s,!0),Ae.obj2str(p,!0),""].join(` `),Ne=["sha1",Ie,k.SHA1(je).toString(),""].join(` `),ze=k.HmacSHA1(Ne,Fe).toString(),Xe=["q-sign-algorithm="+Oe,"q-ak="+ke,"q-sign-time="+Ie,"q-key-time="+Pe,"q-header-list="+Me,"q-url-param-list="+Ge,"q-signature="+ze].join("&");return Xe},Q=function(x,I,d){var i=I/8,a=x.slice(d,d+i);return new Uint8Array(a).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[I](a)[0]},M=function(x,I,d,i){var a=x.slice(I,d),s="";return new Uint8Array(a).forEach(function(p){s+=String.fromCharCode(p)}),i&&(s=decodeURIComponent(escape(s))),s},ge=function(x){for(var I={},d=M(x),i={records:[]};x.byteLength;){var a=Q(x,32,0),s=Q(x,32,4),p=a-s-16,R=0,O;for(x=x.slice(12);RparseInt(i[a])?1:-1;return 0},x=function(d){if(!d)return!1;var i=(d.match(/Chrome\/([.\d]+)/)||[])[1],a=(d.match(/QBCore\/([.\d]+)/)||[])[1],s=(d.match(/QQBrowser\/([.\d]+)/)||[])[1],p=i&&V(i,"53.0.2785.116")<0&&a&&V(a,"3.53.991.400")<0&&s&&V(s,"9.0.2524.400")<=0||!1;return p};return x(typeof navigator!="undefined"&&navigator.userAgent)}(),D=function(x,I,d,i,a){var s;if(x.slice?s=x.slice(I,d):x.mozSlice?s=x.mozSlice(I,d):x.webkitSlice&&(s=x.webkitSlice(I,d)),i&&g){var p=new FileReader;p.onload=function(R){s=null,a(new Blob([p.result]))},p.readAsArrayBuffer(s)}else a(s)},U=function(x,I,d,i){d=d||S,x?typeof I=="string"?d(Ae.md5(I,!0)):Blob&&I instanceof Blob?Ae.getFileMd5(I,function(a,s){d(s)},i):d():d()},F=1024*1024,$=function(x,I,d){var i=x.size,a=0,s=l.getCtx(),p=function R(O){if(O>=i){var G=s.digest("hex");I(null,G);return}var ae=Math.min(i,O+F);Ae.fileSlice(x,O,ae,!1,function(Ce){K(Ce,function(W){Ce=null,s=s.update(W,!0),a+=W.length,W=null,d&&d({loaded:a,total:i,percent:Math.round(a/i*1e4)/1e4}),R(O+F)})})};p(0)};function w(V){return re(V,function(x){return T(x)==="object"&&x!==null?w(x):x})}function H(V,x,I){return V&&x in V?V[x]:I}function N(V,x){return se(x,function(I,d){V[d]=x[d]}),V}function X(V){return V instanceof Array}function J(V,x){for(var I=!1,d=0;d-1,R=!s||typeof s=="string"&&s.indexOf("{Region}")>-1;if(x.indexOf("Bucket")>-1||x==="deleteMultipleObject"||x==="multipartList"||x==="listObjectVersions"){if(p&&!d)return"Bucket";if(R&&!i)return"Region"}else if(x.indexOf("Object")>-1||x.indexOf("multipart")>-1||x==="sliceUploadFile"||x==="abortUploadTask"){if(p&&!d)return"Bucket";if(R&&!i)return"Region";if(!a)return"Key"}return!1},de=function(x,I){if(I=N({},I),x!=="getAuth"&&x!=="getV4Auth"&&x!=="getObjectUrl"){var d=I.Headers||{};if(I&&T(I)==="object"){(function(){for(var a in I)I.hasOwnProperty(a)&&a.indexOf("x-cos-")>-1&&(d[a]=I[a])})();var i={"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext","Pic-Operations":"PicOperations"};Ae.each(i,function(a,s){I[a]!==void 0&&(d[s]=I[a])}),I.Headers=m(d)}}return I},Y=function(x,I){return function(d,i){var a=this;typeof d=="function"&&(i=d,d={}),d=de(x,d);var s;if(a.options.EnableTracker)if(d.calledBySdk==="sliceUploadFile")s=d.tracker&&d.tracker.generateSubTracker({apiName:x});else if(["uploadFile","uploadFiles"].includes(x))s=null;else{var p=-1;d.Body&&(p=typeof d.Body=="string"?d.Body.length:d.Body.size||d.Body.byteLength||-1),s=new B({bucket:d.Bucket,region:d.Region,apiName:x,fileKey:d.Key,fileSize:p,deepTracker:a.options.DeepTracker,customId:a.options.CustomId,delay:a.options.TrackerDelay})}d.tracker=s;var R=function(ke){return ke&&ke.headers&&(ke.headers["x-cos-request-id"]&&(ke.RequestId=ke.headers["x-cos-request-id"]),ke.headers["x-ci-request-id"]&&(ke.RequestId=ke.headers["x-ci-request-id"]),ke.headers["x-cos-version-id"]&&(ke.VersionId=ke.headers["x-cos-version-id"]),ke.headers["x-cos-delete-marker"]&&(ke.DeleteMarker=ke.headers["x-cos-delete-marker"])),ke},O=function(ke,Ie){s&&s.formatResult(ke,Ie),i&&i(R(ke),R(Ie))},G=function(){if(x!=="getService"&&x!=="abortUploadTask"){var ke=we.call(a,x,d);if(ke)return"missing param "+ke;if(d.Region){if(a.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(d.Region))return"Region format error."}else{if(d.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(d.Region))return"Region format error."}!a.options.CompatibilityMode&&d.Region.indexOf("-")===-1&&d.Region!=="yfb"&&d.Region!=="default"&&d.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(d.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(d.Bucket))if(d.AppId)d.Bucket=d.Bucket+"-"+d.AppId;else if(a.options.AppId)d.Bucket=d.Bucket+"-"+a.options.AppId;else return'Bucket should format as "test-1250000000".';d.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete d.AppId)}!a.options.UseRawKey&&d.Key&&d.Key.substr(0,1)==="/"&&(d.Key=d.Key.substr(1))}},ae=G(),Ce=["getAuth","getObjectUrl"].includes(x);if(typeof Promise=="function"&&!Ce&&!i)return new Promise(function(Oe,ke){if(i=function(Pe,Me){Pe?ke(Pe):Oe(Me)},ae)return O(Ae.error(new Error(ae)));I.call(a,d,O)});if(ae)return O(Ae.error(new Error(ae)));var W=I.call(a,d,O);if(Ce)return W}},pe=function(x,I){var d=this,i=0,a=0,s=Date.now(),p,R;function O(){if(R=0,I&&typeof I=="function"){p=Date.now();var G=Math.max(0,Math.round((a-i)/((p-s)/1e3)*100)/100)||0,ae;a===0&&x===0?ae=1:ae=Math.floor(a/x*100)/100||0,s=p,i=a;try{I({loaded:a,total:x,speed:G,percent:ae})}catch(Ce){}}}return function(G,ae){if(G&&(a=G.loaded,x=G.total),ae)clearTimeout(R),O();else{if(R)return;R=setTimeout(O,d.options.ProgressInterval)}}},oe=function(x,I,d){var i;if(typeof I.Body=="string"?I.Body=new Blob([I.Body],{type:"text/plain"}):I.Body instanceof ArrayBuffer&&(I.Body=new Blob([I.Body])),I.Body&&(I.Body instanceof Blob||I.Body.toString()==="[object File]"||I.Body.toString()==="[object Blob]"))i=I.Body.size;else{d(Ae.error(new Error("params body format error, Only allow File|Blob|String.")));return}I.ContentLength=i,d(null,i)},le=function(x){return Date.now()+(x||0)},ye=function(x,I){var d=x;return x.message=x.message||null,typeof I=="string"?(x.error=I,x.message=I):T(I)==="object"&&I!==null&&(N(x,I),(I.code||I.name)&&(x.code=I.code||I.name),I.message&&(x.message=I.message),I.stack&&(x.stack=I.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(x,"name",{writable:!0,enumerable:!1}),Object.defineProperty(x,"message",{enumerable:!0})),x.name=I&&I.name||x.name||x.code||"Error",x.code||(x.code=x.name),x.error||(x.error=w(d)),x},ve=function(){return(typeof globalThis=="undefined"?"undefined":T(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},me=function(){return(typeof window=="undefined"?"undefined":T(window))!=="object"&&(typeof v=="undefined"?"undefined":T(v))==="object"&&!0&&!ve()},Ee=function(x){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(x)},Se=function(){if((typeof navigator=="undefined"?"undefined":T(navigator))!=="object")return!1;var V=navigator.userAgent,x=!!V.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return x}(),be=function(){return(typeof navigator=="undefined"?"undefined":T(navigator))!=="object"?!1:/\sQQ/i.test(navigator.userAgent)}(),Ae={noop:S,formatParams:de,apiWrapper:Y,xml2json:P,json2xml:ee,md5:l,clearKey:m,fileSlice:D,getBodyMd5:U,getFileMd5:$,binaryBase64:te,extend:N,isArray:X,isInArray:J,makeArray:ce,each:se,map:re,filter:Z,clone:w,attr:H,uuid:ie,camSafeUrlEncode:b,throttleOnProgress:pe,getFileSize:oe,getSkewTime:le,error:ye,obj2str:L,getAuth:j,parseSelectPayload:ge,getSourceParams:A,isBrowser:!0,isNode:me,isCIHost:Ee,isIOS_QQ:Se&&be};y.exports=Ae}).call(this,u("./node_modules/process/browser.js"))}})})}}]);