index.52126c22.js 278 KB

12345678910111213141516171819
  1. import{E as createNamespace,aL as isFunction,d as defineComponent,G as numericProp,ax as makeRequiredProp,j as createVNode,N as Icon,aT as Loading,be as getSizeStyle,M as isDef,aC as callInterceptor,J as extend,ab as makeNumericProp,a0 as makeStringProp,H as truthProp,aY as makeArrayProp,U as ref,a5 as onBeforeUnmount,ak as useExpose,bf as useCustomFieldValue,aK as isPromise,aB as pick,a8 as mergeProps,S as reactive,O as withInstall,o as openBlock,bl as createElementBlock,a6 as withDirectives,aF as vShow,bm as createBaseVNode,bn as normalizeStyle,bo as createCommentVNode,bp as normalizeClass,bq as toDisplayString,b4 as commonjsGlobal,b5 as getDefaultExportFromCjs,y as request,g as state,n as postMessage,T as Toast,br as getOssUploadUrl}from"./ResizeObserver.es.b7226882.js";import{I as Image$1}from"./index.20c0f4c5.js";import"./index.cf00521e.js";import{I as ImagePreview}from"./index.e4fc81ba.js";const[name,bem,t]=createNamespace("uploader"),toArray=e=>Array.isArray(e)?e:[e];function readFileContent(e,i){return new Promise(n=>{if(i==="file"){n();return}const o=new FileReader;o.onload=d=>{n(d.target.result)},i==="dataUrl"?o.readAsDataURL(e):i==="text"&&o.readAsText(e)})}function isOversize(e,i){return toArray(e).some(n=>n.file?isFunction(i)?i(n.file):n.file.size>i:!1)}function filterFiles(e,i){const n=[],o=[];return e.forEach(d=>{isOversize(d,i)?o.push(d):n.push(d)}),{valid:n,invalid:o}}const IMAGE_REGEXP=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i,isImageUrl=e=>IMAGE_REGEXP.test(e);function isImageFile(e){return e.isImage?!0:e.file&&e.file.type?e.file.type.indexOf("image")===0:e.url?isImageUrl(e.url):typeof e.content=="string"?e.content.indexOf("data:image")===0:!1}var stdin_default$1=defineComponent({props:{name:numericProp,item:makeRequiredProp(Object),index:Number,imageFit:String,lazyLoad:Boolean,deletable:Boolean,previewSize:numericProp,beforeDelete:Function},emits:["delete","preview"],setup(e,{emit:i,slots:n}){const o=()=>{const{status:O,message:w}=e.item;if(O==="uploading"||O==="failed"){const V=O==="failed"?createVNode(Icon,{name:"close",class:bem("mask-icon")},null):createVNode(Loading,{class:bem("loading")},null),X=isDef(w)&&w!=="";return createVNode("div",{class:bem("mask")},[V,X&&createVNode("div",{class:bem("mask-message")},[w])])}},d=O=>{const{name:w,item:V,index:X,beforeDelete:ae}=e;O.stopPropagation(),callInterceptor(ae,{args:[V,{name:w,index:X}],done:()=>i("delete")})},s=()=>i("preview"),h=()=>{if(e.deletable&&e.item.status!=="uploading")return createVNode("div",{role:"button",class:bem("preview-delete"),tabindex:0,"aria-label":t("delete"),onClick:d},[createVNode(Icon,{name:"cross",class:bem("preview-delete-icon")},null)])},_=()=>{if(n["preview-cover"]){const{index:O,item:w}=e;return createVNode("div",{class:bem("preview-cover")},[n["preview-cover"](extend({index:O},w))])}},q=()=>{const{item:O}=e;return isImageFile(O)?createVNode(Image$1,{fit:e.imageFit,src:O.content||O.url,class:bem("preview-image"),width:e.previewSize,height:e.previewSize,lazyLoad:e.lazyLoad,onClick:s},{default:_}):createVNode("div",{class:bem("file"),style:getSizeStyle(e.previewSize)},[createVNode(Icon,{class:bem("file-icon"),name:"description"},null),createVNode("div",{class:[bem("file-name"),"van-ellipsis"]},[O.file?O.file.name:O.url]),_()])};return()=>createVNode("div",{class:bem("preview")},[q(),o(),h()])}});const uploaderProps={name:makeNumericProp(""),accept:makeStringProp("image/*"),capture:String,multiple:Boolean,disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,maxCount:makeNumericProp(1/0),imageFit:makeStringProp("cover"),resultType:makeStringProp("dataUrl"),uploadIcon:makeStringProp("photograph"),uploadText:String,deletable:truthProp,afterRead:Function,showUpload:truthProp,modelValue:makeArrayProp(),beforeRead:Function,beforeDelete:Function,previewSize:numericProp,previewImage:truthProp,previewOptions:Object,previewFullImage:truthProp,maxSize:{type:[Number,String,Function],default:1/0}};var stdin_default=defineComponent({name,props:uploaderProps,emits:["delete","oversize","click-upload","close-preview","click-preview","update:modelValue"],setup(e,{emit:i,slots:n}){const o=ref(),d=[],s=(x=e.modelValue.length)=>({name:e.name,index:x}),h=()=>{o.value&&(o.value.value="")},_=x=>{if(h(),isOversize(x,e.maxSize))if(Array.isArray(x)){const b=filterFiles(x,e.maxSize);if(x=b.valid,i("oversize",b.invalid,s()),!x.length)return}else{i("oversize",x,s());return}x=reactive(x),i("update:modelValue",[...e.modelValue,...toArray(x)]),e.afterRead&&e.afterRead(x,s())},q=x=>{const{maxCount:b,modelValue:ue,resultType:C}=e;if(Array.isArray(x)){const re=+b-ue.length;x.length>re&&(x=x.slice(0,re)),Promise.all(x.map(oe=>readFileContent(oe,C))).then(oe=>{const ee=x.map((se,H)=>{const ne={file:se,status:"",message:""};return oe[H]&&(ne.content=oe[H]),ne});_(ee)})}else readFileContent(x,C).then(re=>{const oe={file:x,status:"",message:""};re&&(oe.content=re),_(oe)})},O=x=>{const{files:b}=x.target;if(e.disabled||!b||!b.length)return;const ue=b.length===1?b[0]:[].slice.call(b);if(e.beforeRead){const C=e.beforeRead(ue,s());if(!C){h();return}if(isPromise(C)){C.then(re=>{q(re||ue)}).catch(h);return}}q(ue)};let w;const V=()=>i("close-preview"),X=x=>{if(e.previewFullImage){const b=e.modelValue.filter(isImageFile),ue=b.map(C=>(C.file&&!C.url&&(C.url=URL.createObjectURL(C.file),d.push(C.url)),C.url)).filter(Boolean);w=ImagePreview(extend({images:ue,startPosition:b.indexOf(x),onClose:V},e.previewOptions))}},ae=()=>{w&&w.close()},G=(x,b)=>{const ue=e.modelValue.slice(0);ue.splice(b,1),i("update:modelValue",ue),i("delete",x,s(b))},J=(x,b)=>{const ue=["imageFit","deletable","previewSize","beforeDelete"],C=extend(pick(e,ue),pick(x,ue,!0));return createVNode(stdin_default$1,mergeProps({item:x,index:b,onClick:()=>i("click-preview",x,s(b)),onDelete:()=>G(x,b),onPreview:()=>X(x)},pick(e,["name","lazyLoad"]),C),{"preview-cover":n["preview-cover"]})},le=()=>{if(e.previewImage)return e.modelValue.map(J)},ie=x=>i("click-upload",x),De=()=>{if(e.modelValue.length>=e.maxCount||!e.showUpload)return;const x=e.readonly?null:createVNode("input",{ref:o,type:"file",class:bem("input"),accept:e.accept,capture:e.capture,multiple:e.multiple,disabled:e.disabled,onChange:O},null);return n.default?createVNode("div",{class:bem("input-wrapper"),onClick:ie},[n.default(),x]):createVNode("div",{class:bem("upload",{readonly:e.readonly}),style:getSizeStyle(e.previewSize),onClick:ie},[createVNode(Icon,{name:e.uploadIcon,class:bem("upload-icon")},null),e.uploadText&&createVNode("span",{class:bem("upload-text")},[e.uploadText]),x])},Q=()=>{o.value&&!e.disabled&&o.value.click()};return onBeforeUnmount(()=>{d.forEach(x=>URL.revokeObjectURL(x))}),useExpose({chooseFile:Q,closeImagePreview:ae}),useCustomFieldValue(()=>e.modelValue),()=>createVNode("div",{class:bem()},[createVNode("div",{class:bem("wrapper",{disabled:e.disabled})},[le(),De()])])}});const Uploader=withInstall(stdin_default);var index$1="";const uploader="_uploader_1lib0_1",uploaderText="_uploaderText_1lib0_51",uploadImg="_uploadImg_1lib0_56";var styles$1={"uploader-section":"_uploader-section_1lib0_1","img-close":"_img-close_1lib0_9","col-uploader":"_col-uploader_1lib0_23",uploader,uploaderText,uploadImg},index="";const Y={};Y.getData=e=>new Promise((i,n)=>{let o={};I(e).then(d=>{o.arrayBuffer=d;try{o.orientation=T(d)}catch{o.orientation=-1}i(o)}).catch(d=>{n(d)})});function I(e){let i=null;return new Promise((n,o)=>{if(e.src)if(/^data\:/i.test(e.src))i=L(e.src),n(i);else if(/^blob\:/i.test(e.src)){var d=new FileReader;d.onload=function(h){i=h.target.result,n(i)},E(e.src,function(h){d.readAsArrayBuffer(h)})}else{var s=new XMLHttpRequest;s.onload=function(){if(this.status==200||this.status===0)i=s.response,n(i);else throw"Could not load image";s=null},s.open("GET",e.src,!0),s.responseType="arraybuffer",s.send(null)}else o("img error")})}function E(e,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(o){(this.status==200||this.status===0)&&i(this.response)},n.send()}function L(e,i){i=i||e.match(/^data\:([^\;]+)\;base64,/mi)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gmi,"");for(var n=atob(e),o=n.length%2==0?n.length:n.length+1,d=new ArrayBuffer(o),s=new Uint16Array(d),h=0;h<o;h++)s[h]=n.charCodeAt(h);return d}function k(e,i,n){var o="",d;for(d=i,n+=i;d<n;d++)o+=String.fromCharCode(e.getUint8(d));return o}function T(e){var i=new DataView(e),n=i.byteLength,o,d,s,h,_,q,O,w,V,X;if(i.getUint8(0)===255&&i.getUint8(1)===216)for(V=2;V<n;){if(i.getUint8(V)===255&&i.getUint8(V+1)===225){O=V;break}V++}if(O&&(d=O+4,s=O+10,k(i,d,4)==="Exif"&&(q=i.getUint16(s),_=q===18761,(_||q===19789)&&i.getUint16(s+2,_)===42&&(h=i.getUint32(s+4,_),h>=8&&(w=s+h)))),w){for(n=i.getUint16(w,_),X=0;X<n;X++)if(V=w+X*12+2,i.getUint16(V,_)===274){V+=8,o=i.getUint16(V,_);break}}return o}const N=(e,i)=>{const n=e.__vccOpts||e;for(const[o,d]of i)n[o]=d;return n},A=defineComponent({data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:()=>[1,1]},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:()=>10,validator:function(e){return Array.isArray(e)?Number(e[0])>=0&&Number(e[1])>=0:Number(e)>=0}},fillColor:{type:String,default:""}},computed:{cropInfo(){let e={};if(e.top=this.cropOffsertY>21?"-21px":"0px",e.width=this.cropW>0?this.cropW:0,e.height=this.cropH>0?this.cropH:0,this.infoTrue){let i=1;this.high&&!this.full&&(i=window.devicePixelRatio),this.enlarge!==1&!this.full&&(i=Math.abs(Number(this.enlarge))),e.width=e.width*i,e.height=e.height*i,this.full&&(e.width=e.width/this.scale,e.height=e.height/this.scale)}return e.width=e.width.toFixed(0),e.height=e.height.toFixed(0),e},isIE(){return!!window.ActiveXObject||"ActiveXObject"in window},passive(){return this.isIE?null:{passive:!1}}},watch:{img(){this.checkedImg()},imgs(e){e!==""&&this.reload()},cropW(){this.showPreview()},cropH(){this.showPreview()},cropOffsertX(){this.showPreview()},cropOffsertY(){this.showPreview()},scale(e,i){this.showPreview()},x(){this.showPreview()},y(){this.showPreview()},autoCrop(e){e&&this.goAutoCrop()},autoCropWidth(){this.autoCrop&&this.goAutoCrop()},autoCropHeight(){this.autoCrop&&this.goAutoCrop()},mode(){this.checkedImg()},rotate(){this.showPreview(),this.autoCrop?this.goAutoCrop(this.cropW,this.cropH):(this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion(e){var i=navigator.userAgent.split(" "),n="";let o=0;const d=new RegExp(e,"i");for(var s=0;s<i.length;s++)d.test(i[s])&&(n=i[s]);return n?o=n.split("/")[1].split("."):o=["0","0","0"],o},checkOrientationImage(e,i,n,o){if(this.getVersion("chrome")[0]>=81)i=-1;else if(this.getVersion("safari")[0]>=605){const h=this.getVersion("version");h[0]>13&&h[1]>1&&(i=-1)}else{const h=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(h){let _=h[1];_=_.split("_"),(_[0]>13||_[0]>=13&&_[1]>=4)&&(i=-1)}}let d=document.createElement("canvas"),s=d.getContext("2d");switch(s.save(),i){case 2:d.width=n,d.height=o,s.translate(n,0),s.scale(-1,1);break;case 3:d.width=n,d.height=o,s.translate(n/2,o/2),s.rotate(180*Math.PI/180),s.translate(-n/2,-o/2);break;case 4:d.width=n,d.height=o,s.translate(0,o),s.scale(1,-1);break;case 5:d.height=n,d.width=o,s.rotate(.5*Math.PI),s.scale(1,-1);break;case 6:d.width=o,d.height=n,s.translate(o/2,n/2),s.rotate(90*Math.PI/180),s.translate(-n/2,-o/2);break;case 7:d.height=n,d.width=o,s.rotate(.5*Math.PI),s.translate(n,-o),s.scale(-1,1);break;case 8:d.height=n,d.width=o,s.translate(o/2,n/2),s.rotate(-90*Math.PI/180),s.translate(-n/2,-o/2);break;default:d.width=n,d.height=o}s.drawImage(e,0,0,n,o),s.restore(),d.toBlob(h=>{let _=URL.createObjectURL(h);URL.revokeObjectURL(this.imgs),this.imgs=_},"image/"+this.outputType,1)},checkedImg(){if(this.img===null||this.img===""){this.imgs="",this.clearCrop();return}this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();let e=new Image;if(e.onload=()=>{if(this.img==="")return this.$emit("img-load",new Error("\u56FE\u7247\u4E0D\u80FD\u4E3A\u7A7A")),!1;let n=e.width,o=e.height;Y.getData(e).then(d=>{this.orientation=d.orientation||1;let s=Number(this.maxImgSize);if(!this.orientation&&n<s&o<s){this.imgs=this.img;return}n>s&&(o=o/n*s,n=s),o>s&&(n=n/o*s,o=s),this.checkOrientationImage(e,this.orientation,n,o)}).catch(d=>{this.$emit("img-load","error"),this.$emit("img-load-error",d)})},e.onerror=n=>{this.$emit("img-load","error"),this.$emit("img-load-error",n)},this.img.substr(0,4)!=="data"&&(e.crossOrigin=""),this.isIE){var i=new XMLHttpRequest;i.onload=function(){var n=URL.createObjectURL(this.response);e.src=n},i.open("GET",this.img,!0),i.responseType="blob",i.send()}else e.src=this.img},startMove(e){if(e.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in e?e.clientX:e.touches[0].clientX)-this.x,this.moveY=("clientY"in e?e.clientY:e.touches[0].clientY)-this.y,e.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),e.touches.length==2&&(this.touches=e.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=e.offsetX?e.offsetX:e.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=e.offsetY?e.offsetY:e.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in e?e.clientX:e.touches[0].clientX,this.cropY="clientY"in e?e.clientY:e.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale(e){e.preventDefault();let i=this.scale;var n={x:this.touches[0].clientX,y:this.touches[0].clientY},o={x:e.touches[0].clientX,y:e.touches[0].clientY},d={x:this.touches[1].clientX,y:this.touches[1].clientY},s={x:e.touches[1].clientX,y:e.touches[1].clientY},h=Math.sqrt(Math.pow(n.x-d.x,2)+Math.pow(n.y-d.y,2)),_=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),q=_-h,O=1;O=O/this.trueWidth>O/this.trueHeight?O/this.trueHeight:O/this.trueWidth,O=O>.1?.1:O;var w=O*q;if(!this.touchNow){if(this.touchNow=!0,q>0?i+=Math.abs(w):q<0&&i>Math.abs(w)&&(i-=Math.abs(w)),this.touches=e.touches,setTimeout(()=>{this.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,i))return!1;this.scale=i}},cancelTouchScale(e){window.removeEventListener("touchmove",this.touchScale)},moveImg(e){if(e.preventDefault(),e.touches&&e.touches.length===2)return this.touches=e.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;let i="clientX"in e?e.clientX:e.touches[0].clientX,n="clientY"in e?e.clientY:e.touches[0].clientY,o,d;o=i-this.moveX,d=n-this.moveY,this.$nextTick(()=>{if(this.centerBox){let s=this.getImgAxis(o,d,this.scale),h=this.getCropAxis(),_=this.trueHeight*this.scale,q=this.trueWidth*this.scale,O,w,V,X;switch(this.rotate){case 1:case-1:case 3:case-3:O=this.cropOffsertX-this.trueWidth*(1-this.scale)/2+(_-q)/2,w=this.cropOffsertY-this.trueHeight*(1-this.scale)/2+(q-_)/2,V=O-_+this.cropW,X=w-q+this.cropH;break;default:O=this.cropOffsertX-this.trueWidth*(1-this.scale)/2,w=this.cropOffsertY-this.trueHeight*(1-this.scale)/2,V=O-q+this.cropW,X=w-_+this.cropH;break}s.x1>=h.x1&&(o=O),s.y1>=h.y1&&(d=w),s.x2<=h.x2&&(o=V),s.y2<=h.y2&&(d=X)}this.x=o,this.y=d,this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})})},leaveImg(e){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize(e){e.preventDefault();let i=this.scale;var n=e.deltaY||e.wheelDelta,o=navigator.userAgent.indexOf("Firefox");n=o>0?n*30:n,this.isIE&&(n=-n);var d=this.coe;d=d/this.trueWidth>d/this.trueHeight?d/this.trueHeight:d/this.trueWidth;var s=d*n;s<0?i+=Math.abs(s):i>Math.abs(s)&&(i-=Math.abs(s));let h=s<0?"add":"reduce";if(h!==this.coeStatus&&(this.coeStatus=h,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(()=>{this.scaling=!1,this.coe=this.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,i))return!1;this.scale=i},changeScale(e){let i=this.scale;e=e||1;var n=20;if(n=n/this.trueWidth>n/this.trueHeight?n/this.trueHeight:n/this.trueWidth,e=e*n,e>0?i+=Math.abs(e):i>Math.abs(e)&&(i-=Math.abs(e)),!this.checkoutImgAxis(this.x,this.y,i))return!1;this.scale=i},createCrop(e){e.preventDefault();var i="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,n="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;this.$nextTick(()=>{var o=i-this.cropX,d=n-this.cropY;if(o>0?(this.cropW=o+this.cropChangeX>this.w?this.w-this.cropChangeX:o,this.cropOffsertX=this.cropChangeX):(this.cropW=this.w-this.cropChangeX+Math.abs(o)>this.w?this.cropChangeX:Math.abs(o),this.cropOffsertX=this.cropChangeX+o>0?this.cropChangeX+o:0),!this.fixed)d>0?(this.cropH=d+this.cropChangeY>this.h?this.h-this.cropChangeY:d,this.cropOffsertY=this.cropChangeY):(this.cropH=this.h-this.cropChangeY+Math.abs(d)>this.h?this.cropChangeY:Math.abs(d),this.cropOffsertY=this.cropChangeY+d>0?this.cropChangeY+d:0);else{var s=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];s+this.cropOffsertY>this.h?(this.cropH=this.h-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],o>0?this.cropOffsertX=this.cropChangeX:this.cropOffsertX=this.cropChangeX-this.cropW):this.cropH=s,this.cropOffsertY=this.cropOffsertY}})},changeCropSize(e,i,n,o,d){e.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=i,this.canChangeY=n,this.changeCropTypeX=o,this.changeCropTypeY=d,this.cropX="clientX"in e?e.clientX:e.touches[0].clientX,this.cropY="clientY"in e?e.clientY:e.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow(e){e.preventDefault();var i="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,n="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;let o=this.w,d=this.h,s=0,h=0;if(this.centerBox){let O=this.getImgAxis(),w=O.x2,V=O.y2;s=O.x1>0?O.x1:0,h=O.y1>0?O.y1:0,o>w&&(o=w),d>V&&(d=V)}const[_,q]=this.checkCropLimitSize();this.$nextTick(()=>{var O=i-this.cropX,w=n-this.cropY;if(this.canChangeX&&(this.changeCropTypeX===1?this.cropOldW-O<_?(this.cropW=_,this.cropOffsertX=this.cropOldW+this.cropChangeX-s-_):this.cropOldW-O>0?(this.cropW=o-this.cropChangeX-O<=o-s?this.cropOldW-O:this.cropOldW+this.cropChangeX-s,this.cropOffsertX=o-this.cropChangeX-O<=o-s?this.cropChangeX+O:s):(this.cropW=Math.abs(O)+this.cropChangeX<=o?Math.abs(O)-this.cropOldW:o-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):this.changeCropTypeX===2&&(this.cropOldW+O<_?this.cropW=_:this.cropOldW+O>0?(this.cropW=this.cropOldW+O+this.cropOffsertX<=o?this.cropOldW+O:o-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=o-this.cropChangeX+Math.abs(O+this.cropOldW)<=o-s?Math.abs(O+this.cropOldW):this.cropChangeX-s,this.cropOffsertX=o-this.cropChangeX+Math.abs(O+this.cropOldW)<=o-s?this.cropChangeX-Math.abs(O+this.cropOldW):s))),this.canChangeY&&(this.changeCropTypeY===1?this.cropOldH-w<q?(this.cropH=q,this.cropOffsertY=this.cropOldH+this.cropChangeY-h-q):this.cropOldH-w>0?(this.cropH=d-this.cropChangeY-w<=d-h?this.cropOldH-w:this.cropOldH+this.cropChangeY-h,this.cropOffsertY=d-this.cropChangeY-w<=d-h?this.cropChangeY+w:h):(this.cropH=Math.abs(w)+this.cropChangeY<=d?Math.abs(w)-this.cropOldH:d-this.cropOldH-this.cropChangeY,this.cropOffsertY=this.cropChangeY+this.cropOldH):this.changeCropTypeY===2&&(this.cropOldH+w<q?this.cropH=q:this.cropOldH+w>0?(this.cropH=this.cropOldH+w+this.cropOffsertY<=d?this.cropOldH+w:d-this.cropOffsertY,this.cropOffsertY=this.cropChangeY):(this.cropH=d-this.cropChangeY+Math.abs(w+this.cropOldH)<=d-h?Math.abs(w+this.cropOldH):this.cropChangeY-h,this.cropOffsertY=d-this.cropChangeY+Math.abs(w+this.cropOldH)<=d-h?this.cropChangeY-Math.abs(w+this.cropOldH):h))),this.canChangeX&&this.fixed){var V=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];V<q?(this.cropH=q,this.cropW=this.fixedNumber[0]*q/this.fixedNumber[1],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):V+this.cropOffsertY>d?(this.cropH=d-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):this.cropH=V}if(this.canChangeY&&this.fixed){var X=this.cropH/this.fixedNumber[1]*this.fixedNumber[0];X<_?(this.cropW=_,this.cropH=this.fixedNumber[1]*_/this.fixedNumber[0],this.cropOffsertY=this.cropOldH+this.cropChangeY-this.cropH):X+this.cropOffsertX>o?(this.cropW=o-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=X}})},checkCropLimitSize(){let{cropW:e,cropH:i,limitMinSize:n}=this,o=new Array;return Array.isArray(n)?o=n:o=[n,n],e=parseFloat(o[0]),i=parseFloat(o[1]),[e,i]},changeCropEnd(e){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(e,i,n,o,d,s){const h=e/i;let _=d,q=s;return _<n&&(_=n,q=Math.ceil(_/h)),q<o&&(q=o,_=Math.ceil(q*h),_<n&&(_=n,q=Math.ceil(_/h))),_<d&&(_=d,q=Math.ceil(_/h)),q<s&&(q=s,_=Math.ceil(q*h)),{width:_,height:q}},endCrop(){this.cropW===0&&this.cropH===0&&(this.cropping=!1);let[e,i]=this.checkCropLimitSize();const{width:n,height:o}=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],e,i,this.cropW,this.cropH):{width:e,height:i};n>this.cropW&&(this.cropW=n,this.cropOffsertX+n>this.w&&(this.cropOffsertX=this.w-n)),o>this.cropH&&(this.cropH=o,this.cropOffsertY+o>this.h&&(this.cropOffsertY=this.h-o)),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop(){this.crop=!0},stopCrop(){this.crop=!1},clearCrop(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove(e){if(e.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(e),!1;if(e.touches&&e.touches.length===2)return this.crop=!1,this.startMove(e),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);let i="clientX"in e?e.clientX:e.touches[0].clientX,n="clientY"in e?e.clientY:e.touches[0].clientY,o,d;o=i-this.cropOffsertX,d=n-this.cropOffsertY,this.cropX=o,this.cropY=d,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop(e,i){let n=0,o=0;e&&(e.preventDefault(),n="clientX"in e?e.clientX:e.touches[0].clientX,o="clientY"in e?e.clientY:e.touches[0].clientY),this.$nextTick(()=>{let d,s,h=n-this.cropX,_=o-this.cropY;if(i&&(h=this.cropOffsertX,_=this.cropOffsertY),h<=0?d=0:h+this.cropW>this.w?d=this.w-this.cropW:d=h,_<=0?s=0:_+this.cropH>this.h?s=this.h-this.cropH:s=_,this.centerBox){let q=this.getImgAxis();d<=q.x1&&(d=q.x1),d+this.cropW>q.x2&&(d=q.x2-this.cropW),s<=q.y1&&(s=q.y1),s+this.cropH>q.y2&&(s=q.y2-this.cropH)}this.cropOffsertX=d,this.cropOffsertY=s,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})})},getImgAxis(e,i,n){e=e||this.x,i=i||this.y,n=n||this.scale;let o={x1:0,x2:0,y1:0,y2:0},d=this.trueWidth*n,s=this.trueHeight*n;switch(this.rotate){case 0:o.x1=e+this.trueWidth*(1-n)/2,o.x2=o.x1+this.trueWidth*n,o.y1=i+this.trueHeight*(1-n)/2,o.y2=o.y1+this.trueHeight*n;break;case 1:case-1:case 3:case-3:o.x1=e+this.trueWidth*(1-n)/2+(d-s)/2,o.x2=o.x1+this.trueHeight*n,o.y1=i+this.trueHeight*(1-n)/2+(s-d)/2,o.y2=o.y1+this.trueWidth*n;break;default:o.x1=e+this.trueWidth*(1-n)/2,o.x2=o.x1+this.trueWidth*n,o.y1=i+this.trueHeight*(1-n)/2,o.y2=o.y1+this.trueHeight*n;break}return o},getCropAxis(){let e={x1:0,x2:0,y1:0,y2:0};return e.x1=this.cropOffsertX,e.x2=e.x1+this.cropW,e.y1=this.cropOffsertY,e.y2=e.y1+this.cropH,e},leaveCrop(e){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked(e){let i=document.createElement("canvas"),n=new Image,o=this.rotate,d=this.trueWidth,s=this.trueHeight,h=this.cropOffsertX,_=this.cropOffsertY;n.onload=()=>{if(this.cropW!==0){let w=i.getContext("2d"),V=1;this.high&!this.full&&(V=window.devicePixelRatio),this.enlarge!==1&!this.full&&(V=Math.abs(Number(this.enlarge)));let X=this.cropW*V,ae=this.cropH*V,G=d*this.scale*V,J=s*this.scale*V,le=(this.x-h+this.trueWidth*(1-this.scale)/2)*V,ie=(this.y-_+this.trueHeight*(1-this.scale)/2)*V;switch(O(X,ae),w.save(),this.fillColor&&(w.fillStyle=this.fillColor,w.fillRect(0,0,i.width,i.height)),o){case 0:this.full?(O(X/this.scale,ae/this.scale),w.drawImage(n,le/this.scale,ie/this.scale,G/this.scale,J/this.scale)):w.drawImage(n,le,ie,G,J);break;case 1:case-3:this.full?(O(X/this.scale,ae/this.scale),le=le/this.scale+(G/this.scale-J/this.scale)/2,ie=ie/this.scale+(J/this.scale-G/this.scale)/2,w.rotate(o*90*Math.PI/180),w.drawImage(n,ie,-le-J/this.scale,G/this.scale,J/this.scale)):(le=le+(G-J)/2,ie=ie+(J-G)/2,w.rotate(o*90*Math.PI/180),w.drawImage(n,ie,-le-J,G,J));break;case 2:case-2:this.full?(O(X/this.scale,ae/this.scale),w.rotate(o*90*Math.PI/180),le=le/this.scale,ie=ie/this.scale,w.drawImage(n,-le-G/this.scale,-ie-J/this.scale,G/this.scale,J/this.scale)):(w.rotate(o*90*Math.PI/180),w.drawImage(n,-le-G,-ie-J,G,J));break;case 3:case-1:this.full?(O(X/this.scale,ae/this.scale),le=le/this.scale+(G/this.scale-J/this.scale)/2,ie=ie/this.scale+(J/this.scale-G/this.scale)/2,w.rotate(o*90*Math.PI/180),w.drawImage(n,-ie-G/this.scale,le,G/this.scale,J/this.scale)):(le=le+(G-J)/2,ie=ie+(J-G)/2,w.rotate(o*90*Math.PI/180),w.drawImage(n,-ie-G,le,G,J));break;default:this.full?(O(X/this.scale,ae/this.scale),w.drawImage(n,le/this.scale,ie/this.scale,G/this.scale,J/this.scale)):w.drawImage(n,le,ie,G,J)}w.restore()}else{let w=d*this.scale,V=s*this.scale,X=i.getContext("2d");switch(X.save(),this.fillColor&&(X.fillStyle=this.fillColor,X.fillRect(0,0,i.width,i.height)),o){case 0:O(w,V),X.drawImage(n,0,0,w,V);break;case 1:case-3:O(V,w),X.rotate(o*90*Math.PI/180),X.drawImage(n,0,-V,w,V);break;case 2:case-2:O(w,V),X.rotate(o*90*Math.PI/180),X.drawImage(n,-w,-V,w,V);break;case 3:case-1:O(V,w),X.rotate(o*90*Math.PI/180),X.drawImage(n,-w,0,w,V);break;default:O(w,V),X.drawImage(n,0,0,w,V)}X.restore()}e(i)};var q=this.img.substr(0,4);q!=="data"&&(n.crossOrigin="Anonymous"),n.src=this.imgs;function O(w,V){i.width=Math.round(w),i.height=Math.round(V)}},getCropData(e){this.getCropChecked(i=>{e(i.toDataURL("image/"+this.outputType,this.outputSize))})},getCropBlob(e){this.getCropChecked(i=>{i.toBlob(n=>e(n),"image/"+this.outputType,this.outputSize)})},showPreview(){if(this.isCanShow)this.isCanShow=!1,setTimeout(()=>{this.isCanShow=!0},16);else return!1;let e=this.cropW,i=this.cropH,n=this.scale;var o={};o.div={width:`${e}px`,height:`${i}px`};let d=(this.x-this.cropOffsertX)/n,s=(this.y-this.cropOffsertY)/n,h=0;o.w=e,o.h=i,o.url=this.imgs,o.img={width:`${this.trueWidth}px`,height:`${this.trueHeight}px`,transform:`scale(${n})translate3d(${d}px, ${s}px, ${h}px)rotateZ(${this.rotate*90}deg)`},o.html=`
  2. <div class="show-preview" style="width: ${o.w}px; height: ${o.h}px,; overflow: hidden">
  3. <div style="width: ${e}px; height: ${i}px">
  4. <img src=${o.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:
  5. scale(${n})translate3d(${d}px, ${s}px, ${h}px)rotateZ(${this.rotate*90}deg)">
  6. </div>
  7. </div>`,this.$emit("real-time",o)},reload(){let e=new Image;e.onload=()=>{this.w=parseFloat(window.getComputedStyle(this.$refs.cropper).width),this.h=parseFloat(window.getComputedStyle(this.$refs.cropper).height),this.trueWidth=e.width,this.trueHeight=e.height,this.original?this.scale=1:this.scale=this.checkedMode(),this.$nextTick(()=>{this.x=-(this.trueWidth-this.trueWidth*this.scale)/2+(this.w-this.trueWidth*this.scale)/2,this.y=-(this.trueHeight-this.trueHeight*this.scale)/2+(this.h-this.trueHeight*this.scale)/2,this.loading=!1,this.autoCrop&&this.goAutoCrop(),this.$emit("img-load","success"),setTimeout(()=>{this.showPreview()},20)})},e.onerror=()=>{this.$emit("img-load","error")},e.src=this.imgs},checkedMode(){let e=1,i=this.trueWidth,n=this.trueHeight;const o=this.mode.split(" ");switch(o[0]){case"contain":this.trueWidth>this.w&&(e=this.w/this.trueWidth),this.trueHeight*e>this.h&&(e=this.h/this.trueHeight);break;case"cover":i=this.w,e=i/this.trueWidth,n=n*e,n<this.h&&(n=this.h,e=n/this.trueHeight);break;default:try{let d=o[0];if(d.search("px")!==-1){d=d.replace("px",""),i=parseFloat(d);const s=i/this.trueWidth;let h=1,_=o[1];_.search("px")!==-1&&(_=_.replace("px",""),n=parseFloat(_),h=n/this.trueHeight),e=Math.min(s,h)}if(d.search("%")!==-1&&(d=d.replace("%",""),i=parseFloat(d)/100*this.w,e=i/this.trueWidth),o.length===2&&d==="auto"){let s=o[1];s.search("px")!==-1&&(s=s.replace("px",""),n=parseFloat(s),e=n/this.trueHeight),s.search("%")!==-1&&(s=s.replace("%",""),n=parseFloat(s)/100*this.h,e=n/this.trueHeight)}}catch{e=1}}return e},goAutoCrop(e,i){if(this.imgs===""||this.imgs===null)return;this.clearCrop(),this.cropping=!0;let n=this.w,o=this.h;if(this.centerBox){const h=Math.abs(this.rotate)%2>0;let _=(h?this.trueHeight:this.trueWidth)*this.scale,q=(h?this.trueWidth:this.trueHeight)*this.scale;n=_<n?_:n,o=q<o?q:o}var d=e||parseFloat(this.autoCropWidth),s=i||parseFloat(this.autoCropHeight);(d===0||s===0)&&(d=n*.8,s=o*.8),d=d>n?n:d,s=s>o?o:s,this.fixed&&(s=d/this.fixedNumber[0]*this.fixedNumber[1]),s>this.h&&(s=this.h,d=s/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(d,s)},changeCrop(e,i){if(this.centerBox){let n=this.getImgAxis();e>n.x2-n.x1&&(e=n.x2-n.x1,i=e/this.fixedNumber[0]*this.fixedNumber[1]),i>n.y2-n.y1&&(i=n.y2-n.y1,e=i/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=e,this.cropH=i,this.checkCropLimitSize(),this.$nextTick(()=>{this.cropOffsertX=(this.w-this.cropW)/2,this.cropOffsertY=(this.h-this.cropH)/2,this.centerBox&&this.moveCrop(null,!0)})},refresh(){this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick(()=>{this.checkedImg()})},rotateLeft(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear(){this.rotate=0},checkoutImgAxis(e,i,n){e=e||this.x,i=i||this.y,n=n||this.scale;let o=!0;if(this.centerBox){let d=this.getImgAxis(e,i,n),s=this.getCropAxis();d.x1>=s.x1&&(o=!1),d.x2<=s.x2&&(o=!1),d.y1>=s.y1&&(o=!1),d.y2<=s.y2&&(o=!1)}return o}},mounted(){this.support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";let e=this;var i=navigator.userAgent;this.isIOS=!!i.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(n,o,d){for(var s=atob(this.toDataURL(o,d).split(",")[1]),h=s.length,_=new Uint8Array(h),q=0;q<h;q++)_[q]=s.charCodeAt(q);n(new Blob([_],{type:e.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},unmounted(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.cancelScale()}}),$={key:0,class:"cropper-box"},z=["src"],B={class:"cropper-view-box"},P=["src"],D={key:1};function U(e,i,n,o,d,s){return openBlock(),createElementBlock("div",{class:"vue-cropper",ref:"cropper",onMouseover:i[28]||(i[28]=(...h)=>e.scaleImg&&e.scaleImg(...h)),onMouseout:i[29]||(i[29]=(...h)=>e.cancelScale&&e.cancelScale(...h))},[e.imgs?(openBlock(),createElementBlock("div",$,[withDirectives(createBaseVNode("div",{class:"cropper-box-canvas",style:normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+e.x/e.scale+"px,"+e.y/e.scale+"px,0)rotateZ("+e.rotate*90+"deg)"})},[createBaseVNode("img",{src:e.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,z)],4),[[vShow,!e.loading]])])):createCommentVNode("",!0),createBaseVNode("div",{class:normalizeClass(["cropper-drag-box",{"cropper-move":e.move&&!e.crop,"cropper-crop":e.crop,"cropper-modal":e.cropping}]),onMousedown:i[0]||(i[0]=(...h)=>e.startMove&&e.startMove(...h)),onTouchstart:i[1]||(i[1]=(...h)=>e.startMove&&e.startMove(...h))},null,34),withDirectives(createBaseVNode("div",{class:"cropper-crop-box",style:normalizeStyle({width:e.cropW+"px",height:e.cropH+"px",transform:"translate3d("+e.cropOffsertX+"px,"+e.cropOffsertY+"px,0)"})},[createBaseVNode("span",B,[createBaseVNode("img",{style:normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+(e.x-e.cropOffsertX)/e.scale+"px,"+(e.y-e.cropOffsertY)/e.scale+"px,0)rotateZ("+e.rotate*90+"deg)"}),src:e.imgs,alt:"cropper-img"},null,12,P)]),createBaseVNode("span",{class:"cropper-face cropper-move",onMousedown:i[2]||(i[2]=(...h)=>e.cropMove&&e.cropMove(...h)),onTouchstart:i[3]||(i[3]=(...h)=>e.cropMove&&e.cropMove(...h))},null,32),e.info?(openBlock(),createElementBlock("span",{key:0,class:"crop-info",style:normalizeStyle({top:e.cropInfo.top})},toDisplayString(e.cropInfo.width)+" \xD7 "+toDisplayString(e.cropInfo.height),5)):createCommentVNode("",!0),e.fixedBox?createCommentVNode("",!0):(openBlock(),createElementBlock("span",D,[createBaseVNode("span",{class:"crop-line line-w",onMousedown:i[4]||(i[4]=h=>e.changeCropSize(h,!1,!0,0,1)),onTouchstart:i[5]||(i[5]=h=>e.changeCropSize(h,!1,!0,0,1))},null,32),createBaseVNode("span",{class:"crop-line line-a",onMousedown:i[6]||(i[6]=h=>e.changeCropSize(h,!0,!1,1,0)),onTouchstart:i[7]||(i[7]=h=>e.changeCropSize(h,!0,!1,1,0))},null,32),createBaseVNode("span",{class:"crop-line line-s",onMousedown:i[8]||(i[8]=h=>e.changeCropSize(h,!1,!0,0,2)),onTouchstart:i[9]||(i[9]=h=>e.changeCropSize(h,!1,!0,0,2))},null,32),createBaseVNode("span",{class:"crop-line line-d",onMousedown:i[10]||(i[10]=h=>e.changeCropSize(h,!0,!1,2,0)),onTouchstart:i[11]||(i[11]=h=>e.changeCropSize(h,!0,!1,2,0))},null,32),createBaseVNode("span",{class:"crop-point point1",onMousedown:i[12]||(i[12]=h=>e.changeCropSize(h,!0,!0,1,1)),onTouchstart:i[13]||(i[13]=h=>e.changeCropSize(h,!0,!0,1,1))},null,32),createBaseVNode("span",{class:"crop-point point2",onMousedown:i[14]||(i[14]=h=>e.changeCropSize(h,!1,!0,0,1)),onTouchstart:i[15]||(i[15]=h=>e.changeCropSize(h,!1,!0,0,1))},null,32),createBaseVNode("span",{class:"crop-point point3",onMousedown:i[16]||(i[16]=h=>e.changeCropSize(h,!0,!0,2,1)),onTouchstart:i[17]||(i[17]=h=>e.changeCropSize(h,!0,!0,2,1))},null,32),createBaseVNode("span",{class:"crop-point point4",onMousedown:i[18]||(i[18]=h=>e.changeCropSize(h,!0,!1,1,0)),onTouchstart:i[19]||(i[19]=h=>e.changeCropSize(h,!0,!1,1,0))},null,32),createBaseVNode("span",{class:"crop-point point5",onMousedown:i[20]||(i[20]=h=>e.changeCropSize(h,!0,!1,2,0)),onTouchstart:i[21]||(i[21]=h=>e.changeCropSize(h,!0,!1,2,0))},null,32),createBaseVNode("span",{class:"crop-point point6",onMousedown:i[22]||(i[22]=h=>e.changeCropSize(h,!0,!0,1,2)),onTouchstart:i[23]||(i[23]=h=>e.changeCropSize(h,!0,!0,1,2))},null,32),createBaseVNode("span",{class:"crop-point point7",onMousedown:i[24]||(i[24]=h=>e.changeCropSize(h,!1,!0,0,2)),onTouchstart:i[25]||(i[25]=h=>e.changeCropSize(h,!1,!0,0,2))},null,32),createBaseVNode("span",{class:"crop-point point8",onMousedown:i[26]||(i[26]=h=>e.changeCropSize(h,!0,!0,2,2)),onTouchstart:i[27]||(i[27]=h=>e.changeCropSize(h,!0,!0,2,2))},null,32)]))],4),[[vShow,e.cropping]])],544)}const W=N(A,[["render",U],["__scopeId","data-v-69939069"]]),upbtn="_upbtn_m9882_1",uploadWarper="_uploadWarper_m9882_5",bg="_bg_m9882_12",btn="_btn_m9882_21",btn1="_btn1_m9882_33",img="_img_m9882_44",btndiv="_btndiv_m9882_53",wrapper="_wrapper_m9882_64";var styles={upbtn,uploadWarper,bg,btn,btn1,img,btndiv,wrapper},ColCropper=defineComponent({name:"col-cropper",components:{VueCropper:W},props:{hideInput:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},option:{type:Object},onCancelTailor:{type:Function,default:()=>{}},getBase64Data:{type:Function,default:()=>{}},getBlob:{type:Function,default:()=>{}},getFile:{type:Function,default:()=>{}},imgOriginF:{type:Function,default:()=>{}}},data(){return{img:"",config:{ceilbutton:!1,outputSize:1,outputType:"png",info:!1,canScale:!0,autoCrop:!1,autoCropWidth:0,autoCropHeight:0,fixed:!0,fixedNumber:[1,1],full:!1,fixedBox:!0,canMove:!0,canMoveBox:!1,original:!1,centerBox:!0,high:!0,infoTrue:!1,maxImgSize:2e3,enlarge:1,mode:"100%",cancelButtonText:"\u53D6\u6D88",confirmButtonText:"\u786E\u5B9A",cancelButtonBackgroundColor:"#606266",confirmButtonBackgroundColor:"#ed594c",cancelButtonTextColor:"#ffffff",confirmButtonTextColor:"#ffffff"}}},mounted(){this.config=Object.assign(this.config,this.option)},methods:{addSlide(){if(document.getElementById("vertical")==null){const e=document.getElementsByClassName("cropper-crop-box")[0],i=document.createElement("div");i.id="vertical",i.style.width="1px",i.style.height="100%",i.style.top="0px",i.style.left="33%",i.style.position="absolute",i.style.backgroundColor="#fff",i.style.zIndex="522",i.style.opacity="0.5";const n=document.createElement("div");n.style.width="1px",n.style.height="100%",n.style.top="0px",n.style.right="33%",n.style.position="absolute",n.style.backgroundColor="#fff",n.style.zIndex="522",n.style.opacity="0.5";const o=document.createElement("div");o.style.width="100%",o.style.height="1px",o.style.top="33%",o.style.left="0px",o.style.position="absolute",o.style.backgroundColor="#fff",o.style.zIndex="522",o.style.opacity="0.5";const d=document.createElement("div");d.style.width="100%",d.style.height="1px",d.style.bottom="33%",d.style.left="0px",d.style.position="absolute",d.style.backgroundColor="#fff",d.style.zIndex="522",d.style.opacity="0.5";const s=document.createElement("div");s.style.width="30px",s.style.height="4px",s.style.top="-4px",s.style.left="-4px",s.style.position="absolute",s.style.backgroundColor="#fff",s.style.zIndex="522",s.style.opacity="1";const h=document.createElement("div");h.style.width="4px",h.style.height="30px",h.style.top="-4px",h.style.left="-4px",h.style.position="absolute",h.style.backgroundColor="#fff",h.style.zIndex="522",h.style.opacity="1";const _=document.createElement("div");_.style.width="30px",_.style.height="4px",_.style.top="-4px",_.style.right="-4px",_.style.position="absolute",_.style.backgroundColor="#fff",_.style.zIndex="522",_.style.opacity="1";const q=document.createElement("div");q.style.width="4px",q.style.height="30px",q.style.top="-4px",q.style.right="-4px",q.style.position="absolute",q.style.backgroundColor="#fff",q.style.zIndex="522",q.style.opacity="1";const O=document.createElement("div");O.style.width="30px",O.style.height="4px",O.style.bottom="-4px",O.style.left="-4px",O.style.position="absolute",O.style.backgroundColor="#fff",O.style.zIndex="522",O.style.opacity="1";const w=document.createElement("div");w.style.width="4px",w.style.height="30px",w.style.bottom="-4px",w.style.left="-4px",w.style.position="absolute",w.style.backgroundColor="#fff",w.style.zIndex="522",w.style.opacity="1";const V=document.createElement("div");V.style.width="30px",V.style.height="4px",V.style.bottom="-4px",V.style.right="-4px",V.style.position="absolute",V.style.backgroundColor="#fff",V.style.zIndex="522",V.style.opacity="1";const X=document.createElement("div");X.style.width="4px",X.style.height="30px",X.style.bottom="-4px",X.style.right="-4px",X.style.position="absolute",X.style.backgroundColor="#fff",X.style.zIndex="522",X.style.opacity="1",e.appendChild(i),e.appendChild(n),e.appendChild(o),e.appendChild(d),e.appendChild(s),e.appendChild(h),e.appendChild(_),e.appendChild(q),e.appendChild(O),e.appendChild(w),e.appendChild(V),e.appendChild(X)}},onLoadImg(e){return new Promise(function(i,n){const o=new FileReader;o.readAsDataURL(e),o.onload=d=>{i(d.target.result)}})},loadFile(e){if(e instanceof File)this.onLoadImg(e).then(i=>{this.img=i,setTimeout(()=>{this.config.autoCrop=!0,this.addSlide()},10)});else throw new Error("Arguments file is not File")},loadBase64(e){if(typeof e!="string")throw new Error("Arguments base64 is not string");const i=e.split(",");if(!/^data:image\/(.*?);base64$/.test(i[0]))throw new Error("Arguments base64 MIME is not image/*");if(!/^[\/]?([\da-zA-Z]+[\/+]+)*[\da-zA-Z]+([+=]{1,2}|[\/])?$/.test(i[1]))throw new Error("Not standard base64");this.img=e,setTimeout(()=>{this.config.autoCrop=!0,this.addSlide()},10)},rotating(e){this.$refs.cropper.rotateRight()},canceltailor(){this.img="",this.onCancelTailor()},tailoring(){this.$refs.cropper.getCropData(e=>{this.getBase64Data(e),this.getBlob(e),this.img="",this.config.autoCrop=!1}),this.$refs.cropper.getCropBlob(e=>{this.getBase64Data(e),this.getBlob(e);const i={jpeg:"jpg",png:"png",webp:"webp"}[this.config.outputType],n=new Date().getTime(),o=new File([e],`${n}.${i}`,{type:`image/${this.config.outputType}`});this.getFile(o),this.img="",this.config.autoCrop=!1})},async upPhoto(e){console.log(e,"upload");const i=e.target.files[0];this.$refs.headInput.value=null,i!=null&&(this.imgOriginF(i),this.img=await this.onLoadImg(i),this.config.autoCrop=!0,setTimeout(()=>{this.addSlide()},20))},onCropMoving(e){},onImgMoving(e){}},render(){return createVNode("div",{class:[styles.upbtn,styles.uploadWarper]},[this.hideInput?null:createVNode("input",{style:"opacity: 0;",class:styles.upbtn,disabled:this.disabled,type:"file",accept:"image/*",onChange:this.upPhoto,ref:"headInput"},null),this.img!=""?createVNode("div",{class:styles.bg},[this.config.ceilbutton?createVNode("div",{class:styles.btndiv},[createVNode("div",{class:styles.btn,onClick:this.canceltailor,style:{backgroundColor:this.config.cancelButtonBackgroundColor,color:this.config.cancelButtonTextColor}},[this.config.cancelButtonText]),createVNode("div",{class:styles.img,onClick:this.rotating},null),createVNode("div",{class:styles.btn,onClick:this.tailoring,style:{backgroundColor:this.config.confirmButtonBackgroundColor,color:this.config.confirmButtonTextColor}},[this.config.confirmButtonText])]):null,createVNode("div",{class:styles.wrapper},[createVNode(W,{ref:"cropper",img:this.img,outputSize:this.config.outputSize,outputType:this.config.outputType,info:this.config.info,canScale:this.config.canScale,autoCrop:this.config.autoCrop,autoCropWidth:this.config.autoCropWidth,autoCropHeight:this.config.autoCropHeight,fixedBox:this.config.fixedBox,fixed:this.config.fixed,fixedNumber:this.config.fixedNumber,full:this.config.full,canMove:this.config.canMove,canMoveBox:this.config.canMoveBox,original:this.config.original,centerBox:this.config.centerBox,high:this.config.high,infoTrue:this.config.infoTrue,maxImgSize:this.config.maxImgSize,enlarge:this.config.enlarge,mode:this.config.mode,onCropMoving:this.onCropMoving,onImgMoving:this.onImgMoving},null)]),this.config.ceilbutton?null:createVNode("div",{class:styles.btndiv},[createVNode("div",{class:styles.btn,onClick:this.canceltailor,style:{backgroundColor:this.config.cancelButtonBackgroundColor,color:this.config.cancelButtonTextColor}},[this.config.cancelButtonText]),createVNode("div",{class:styles.img,onClick:this.rotating},null),createVNode("div",{class:styles.btn,onClick:this.tailoring,style:{backgroundColor:this.config.confirmButtonBackgroundColor,color:this.config.confirmButtonTextColor}},[this.config.confirmButtonText])])]):null])}}),iconUploader="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA4CAMAAABpEU60AAAAkFBMVEUAAAA8PDwtyKotx6s+Pj49PT09PT09PT08PDw9PT08PDw9PT0+Pj49PT09PT09PT0+Pj48PDw9PT1AQEA7OzsqKiotx6osyKo6Ojo9PT08PDwtyKs9PT0tyKs7Ozs+Pj47OzsryKs9PT0tx6oux6wsxqg8PDwsyKo9PT0tx6otxqoryagsyLEsyLE9PT0tx6ptyL6dAAAALnRSTlMA+b9rawzU8irY5OK2mpSPb1FOHBoG9dws8723bWBKQjUjD6VTTcepiW8/LxcLZAuKNgAAAchJREFUSMfdl9tygjAQhknlpHIGQUVUPLbWwvu/XZM4utKQMWEv2ul/t/Dnm9lsdgnGv9GhyMvawOvSUhVfeNC+ZTriQW8cNHplc0PbaQQt3jVBs4A0/dpqgWZLWIkCBbAQlZrL8hrHFnqzQ8bZyd7W1Yir4KDzLTj0nKd5yMoVyzhV3vapqCX1kuV1BU5XpaRehkTHVqJcUi8Z6FMGKrr787peewnooFgv0Ef5xnXbrOIWnC9dkw31wjWtA/XCgXq3OTW9CSETz0x5uJ42zXStD8r8xyAgfkYfUA4laYOSzlRykqGgVfNDq2GpJXyxHbmW5UY2D5L7u5KDKiVQxvIi5j00Ccsuu58n3hi1EshnnA3EG0byn854XhkqoJStM5/fm4ycPvrueDVegGCZLRz9DloN5NEo6hoi+sjTBk1o5HYNLn00gXB7Om0VQETsPIttEoRjOiyQIPAjUwM/crPBjyw/+JEHEvzIFgE/smnBjxwj4B862AT/wFEr+gcOf9E/7HOEAoF+AbRQ/WTDLHAg1L1EgGJoRo1rqKjdmNpDiLUuWiArZhziyq7qmgrkPw9aWs40fmfkIgFwRM1De6FCcexwbvxxfQMaWrG3jYxQqwAAAABJRU5ErkJggg==",iconDelete="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAjVJREFUWEfNmL+LE1EQxz8bCVh4YHGCIFZec7YL6/mrsRPBQrhCUBEtsiHkrwkhm0YEBQu7A7Gz8e68C6TVRisRBK840OIgXCLfsE+WZXffRi8y02yx89583sy8mfdewOKyAlwEzgNngTNAM51mAvwCDoHvwFfg5yImgprK0rsEXE5Bag6bqwnsI/AFmPkG1gG6AFxPveGbr+q/vLYDfKtSqgI6BVwD1v+FomDsJ2AXOC6atwzoNHAbOHfCMG66H8Bb4Cg/fxGQYO6eQIh8a1EIt/JQeSCFSTDL8kweUp4S1J/w5YFuLiFnfJ5STr13Slkg7aY7vtFL+v/G7T4HpO/mf8ibsvUon16rTjmgNeBW1eqbzWbQ6/U2ZrPZtNPpjKbTaWWRazQaQb/fj4IgaHS73b3JZOIriu+Azw5IiaxWUCpJklxttVqPpTAej7ejKHpZBiWY0Wj0IAzDG9IfDofP4zj+4Am3KvqWgNSb7vtyYzAYXInj+InTK4PKw0g/SZJn7XZ732cDeCUg9af5SqqkyFAeqo6Ox8y2gJQ7yiGvVBnU4GyY6oS2wOA8h+4Bq16aVKEESk2TMAzVhOfiy7MSewcCegSoXdSWIqjs4L+E0RRHAnoKqGUsJCnUw6xXUs/sRFH0wlcWSowdmwQyFzJzSW1u25srjOZah3agqeYqIHPHD3MHNHnJ1BHWVXJTh3xBmbsGCcrURdGFztRV2kGZemzIHlfMPMdkoUw9WOUPd0t90vsNI5h3TDi/zEYAAAAASUVORK5CYII=",cosJsSdkV5={exports:{}};(function(module,exports){(function(i,n){module.exports=n()})(commonjsGlobal,function(){return function(e){var i={};function n(o){if(i[o])return i[o].exports;var d=i[o]={i:o,l:!1,exports:{}};return e[o].call(d.exports,d,d.exports,n),d.l=!0,d.exports}return n.m=e,n.c=i,n.d=function(o,d,s){n.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:s})},n.r=function(o){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,d){if(d&1&&(o=n(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var h in o)n.d(s,h,function(_){return o[_]}.bind(null,h));return s},n.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(d,"a",d),d},n.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},n.p="/dist/",n(n.s="./index.js")}({"./index.js":function(e,i,n){var o=n("./src/cos.js");e.exports=o},"./lib/base64.js":function(e,i){var n=function(o){o=o||{};var d=o.Base64,s="2.1.9",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=function(ee){for(var se={},H=0,ne=ee.length;H<ne;H++)se[ee.charAt(H)]=H;return se}(h),q=String.fromCharCode,O=function(se){if(se.length<2){var H=se.charCodeAt(0);return H<128?se:H<2048?q(192|H>>>6)+q(128|H&63):q(224|H>>>12&15)+q(128|H>>>6&63)+q(128|H&63)}else{var H=65536+(se.charCodeAt(0)-55296)*1024+(se.charCodeAt(1)-56320);return q(240|H>>>18&7)+q(128|H>>>12&63)+q(128|H>>>6&63)+q(128|H&63)}},w=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,V=function(se){return se.replace(w,O)},X=function(se){var H=[0,2,1][se.length%3],ne=se.charCodeAt(0)<<16|(se.length>1?se.charCodeAt(1):0)<<8|(se.length>2?se.charCodeAt(2):0),ce=[h.charAt(ne>>>18),h.charAt(ne>>>12&63),H>=2?"=":h.charAt(ne>>>6&63),H>=1?"=":h.charAt(ne&63)];return ce.join("")},ae=o.btoa?function(ee){return o.btoa(ee)}:function(ee){return ee.replace(/[\s\S]{1,3}/g,X)},G=function(ee){return ae(V(ee))},J=function(se,H){return H?G(String(se)).replace(/[+\/]/g,function(ne){return ne=="+"?"-":"_"}).replace(/=/g,""):G(String(se))},le=function(se){return J(se,!0)},ie=new RegExp(["[\xC0-\xDF][\x80-\xBF]","[\xE0-\xEF][\x80-\xBF]{2}","[\xF0-\xF7][\x80-\xBF]{3}"].join("|"),"g"),De=function(se){switch(se.length){case 4:var H=(7&se.charCodeAt(0))<<18|(63&se.charCodeAt(1))<<12|(63&se.charCodeAt(2))<<6|63&se.charCodeAt(3),ne=H-65536;return q((ne>>>10)+55296)+q((ne&1023)+56320);case 3:return q((15&se.charCodeAt(0))<<12|(63&se.charCodeAt(1))<<6|63&se.charCodeAt(2));default:return q((31&se.charCodeAt(0))<<6|63&se.charCodeAt(1))}},Q=function(se){return se.replace(ie,De)},x=function(se){var H=se.length,ne=H%4,ce=(H>0?_[se.charAt(0)]<<18:0)|(H>1?_[se.charAt(1)]<<12:0)|(H>2?_[se.charAt(2)]<<6:0)|(H>3?_[se.charAt(3)]:0),de=[q(ce>>>16),q(ce>>>8&255),q(ce&255)];return de.length-=[0,0,2,1][ne],de.join("")},b=o.atob?function(ee){return o.atob(ee)}:function(ee){return ee.replace(/[\s\S]{1,4}/g,x)},ue=function(ee){return Q(b(ee))},C=function(se){return ue(String(se).replace(/[-_]/g,function(H){return H=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},re=function(){var se=o.Base64;return o.Base64=d,se},oe={VERSION:s,atob:b,btoa:ae,fromBase64:C,toBase64:J,utob:V,encode:J,encodeURI:le,btou:Q,decode:C,noConflict:re};return oe}();e.exports=n},"./lib/beacon.min.js":function(e,i,n){var o,d,s=n("./node_modules/@babel/runtime/helpers/typeof.js");(function(h,_){s(i)=="object"&&typeof e!="undefined"?e.exports=_():(o=_,d=typeof o=="function"?o.call(i,n,i,e):o,d!==void 0&&(e.exports=d))})(this,function(){var h=function(c,a){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,m){l.__proto__=m}||function(l,m){for(var j in m)Object.prototype.hasOwnProperty.call(m,j)&&(l[j]=m[j])},h(c,a)},_=function(){return _=Object.assign||function(c){for(var a,l=1,m=arguments.length;l<m;l++)for(var j in a=arguments[l])Object.prototype.hasOwnProperty.call(a,j)&&(c[j]=a[j]);return c},_.apply(this,arguments)};function q(p,c,a,l){return new(a||(a=Promise))(function(m,j){function K(Te){try{Be(l.next(Te))}catch(fe){j(fe)}}function he(Te){try{Be(l.throw(Te))}catch(fe){j(fe)}}function Be(Te){var fe;Te.done?m(Te.value):(fe=Te.value,fe instanceof a?fe:new a(function(Le){Le(fe)})).then(K,he)}Be((l=l.apply(p,c||[])).next())})}function O(p,c){var a,l,m,j,K={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return j={next:he(0),throw:he(1),return:he(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function he(Be){return function(Te){return function(fe){if(a)throw new TypeError("Generator is already executing.");for(;K;)try{if(a=1,l&&(m=2&fe[0]?l.return:fe[0]?l.throw||((m=l.return)&&m.call(l),0):l.next)&&!(m=m.call(l,fe[1])).done)return m;switch(l=0,m&&(fe=[2&fe[0],m.value]),fe[0]){case 0:case 1:m=fe;break;case 4:return K.label++,{value:fe[1],done:!1};case 5:K.label++,l=fe[1],fe=[0];continue;case 7:fe=K.ops.pop(),K.trys.pop();continue;default:if(m=K.trys,!((m=m.length>0&&m[m.length-1])||fe[0]!==6&&fe[0]!==2)){K=0;continue}if(fe[0]===3&&(!m||fe[1]>m[0]&&fe[1]<m[3])){K.label=fe[1];break}if(fe[0]===6&&K.label<m[1]){K.label=m[1],m=fe;break}if(m&&K.label<m[2]){K.label=m[2],K.ops.push(fe);break}m[2]&&K.ops.pop(),K.trys.pop();continue}fe=c.call(p,K)}catch(Le){fe=[6,Le],l=0}finally{a=m=0}if(5&fe[0])throw fe[1];return{value:fe[0]?fe[1]:void 0,done:!0}}([Be,Te])}}}var w="__BEACON_",V="__BEACON_deviceId",X="last_report_time",ae="sending_event_ids",G="beacon_config",J="beacon_config_request_time",le=function(){function p(){var c=this;this.emit=function(a,l){if(c){var m,j=c.__EventsList[a];if(j!=null&&j.length){j=j.slice();for(var K=0;K<j.length;K++){m=j[K];try{var he=m.callback.apply(c,[l]);if(m.type===1&&c.remove(a,m.callback),he===!1)break}catch(Be){throw Be}}}return c}},this.__EventsList={}}return p.prototype.indexOf=function(c,a){for(var l=0;l<c.length;l++)if(c[l].callback===a)return l;return-1},p.prototype.on=function(c,a,l){if(l===void 0&&(l=0),this){var m=this.__EventsList[c];if(m||(m=this.__EventsList[c]=[]),this.indexOf(m,a)===-1){var j={name:c,type:l||0,callback:a};return m.push(j),this}return this}},p.prototype.one=function(c,a){this.on(c,a,1)},p.prototype.remove=function(c,a){if(this){var l=this.__EventsList[c];if(!l)return null;if(!a){try{delete this.__EventsList[c]}catch{}return null}if(l.length){var m=this.indexOf(l,a);l.splice(m,1)}return this}},p}();function ie(p,c){for(var a={},l=0,m=Object.keys(p);l<m.length;l++){var j=m[l],K=p[j];if(typeof K=="string")a[De(j)]=De(K);else{if(c)throw new Error("value mast be string !!!!");a[De(String(j))]=De(String(K))}}return a}function De(p){if(typeof p!="string")return p;try{return p.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch{return""}}function Q(p){return String(p.A99)+String(p.A100)}var x=function(){},b=function(){function p(c){var a=this;this.lifeCycle=new le,this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(l){if(!l||!l.reduce||!l.length)throw new TypeError("createPipeline \u65B9\u6CD5\u9700\u8981\u4F20\u5165\u81F3\u5C11\u6709\u4E00\u4E2A pipe \u7684\u6570\u7EC4");return l.length===1?function(m,j){l[0](m,j||x)}:l.reduce(function(m,j){return function(K,he){return he===void 0&&(he=x),m(K,function(Be){return j==null?void 0:j(Be,he)})}})}([function(l){a.send({url:a.strategy.getUploadUrl(),data:l,method:"post",contentType:"application/json;charset=UTF-8"},function(){var m=a.config.onReportSuccess;typeof m=="function"&&m(JSON.stringify(l.events))},function(){var m=a.config.onReportFail;typeof m=="function"&&m(JSON.stringify(l.events))})}]),function(l,m){if(!l)throw m instanceof Error?m:new Error(m)}(Boolean(c.appkey),"appkey must be initial"),this.config=_({},c)}return p.prototype.onUserAction=function(c,a){this.preReport(c,a,!1)},p.prototype.onDirectUserAction=function(c,a){this.preReport(c,a,!0)},p.prototype.preReport=function(c,a,l){c?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(c)||this.strategy.isSampleEvent(c)||this.onReport(c,a,l)):this.errorReport.reportError("602"," no eventCode")},p.prototype.addAdditionalParams=function(c){for(var a=0,l=Object.keys(c);a<l.length;a++){var m=l[a];this.additionalParams[m]=c[m]}},p.prototype.setChannelId=function(c){this.commonInfo.channelID=String(c)},p.prototype.setOpenId=function(c){this.commonInfo.openid=String(c)},p.prototype.setUnionid=function(c){this.commonInfo.unid=String(c)},p.prototype.getDeviceId=function(){return this.commonInfo.deviceId},p.prototype.getCommonInfo=function(){return this.commonInfo},p.prototype.removeSendingId=function(c){try{var a=JSON.parse(this.storage.getItem(ae)),l=a.indexOf(c);l!=-1&&(a.splice(l,1),this.storage.setItem(ae,JSON.stringify(a)))}catch{}},p}(),ue=function(){function p(c,a,l,m){this.requestParams={},this.network=m,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=c.appkey,this.requestParams.platform=l,this.requestParams.uin=a.deviceId,this.requestParams.model="",this.requestParams.os=l,this.requestParams.app_version=c.appVersion,this.requestParams.sdk_version=a.sdkVersion,this.requestParams.error_stack="",this.uploadUrl=c.isOversea?"https://htrace.wetvinfo.com/kv":"https://h.trace.qq.com/kv"}return p.prototype.reportError=function(c,a){this.requestParams._dc=Math.random(),this.requestParams.error_msg=a,this.requestParams.error_code=c,this.network.get(this.uploadUrl,{params:this.requestParams}).catch(function(l){})},p}(),C=function(){function p(c,a,l,m,j){this.strategy={isEventUpOnOff:!0,httpsUploadUrl:"https://otheve.beacon.qq.com/analytics/v2_upload",requestInterval:30,blacklist:[],samplelist:[]},this.realSample={},this.appkey="",this.needQueryConfig=!0,this.appkey=a.appkey,this.storage=m,this.needQueryConfig=c;try{var K=JSON.parse(this.storage.getItem(G));K&&this.processData(K)}catch{}a.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!a.isOversea&&this.needRequestConfig()&&this.requestConfig(a.appVersion,l,j)}return p.prototype.requestConfig=function(c,a,l){var m=this;this.storage.setItem(J,Date.now().toString()),l.post("https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:typeof wx=="undefined"?"3":"4",mainAppKey:this.appkey,appVersion:c,sdkVersion:a.sdkVersion,osVersion:a.userAgent,model:"",packageName:"",params:{A3:a.deviceId}}).then(function(j){if(j.data.ret==0)try{var K=JSON.parse(j.data.beaconConfig);K&&(m.processData(K),m.storage.setItem(G,j.data.beaconConfig))}catch{}else m.processData(null),m.storage.setItem(G,"")}).catch(function(j){})},p.prototype.processData=function(c){var a,l,m,j,K;this.strategy.isEventUpOnOff=(a=c==null?void 0:c.isEventUpOnOff)!==null&&a!==void 0?a:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=(l=c==null?void 0:c.httpsUploadUrl)!==null&&l!==void 0?l:this.strategy.httpsUploadUrl,this.strategy.requestInterval=(m=c==null?void 0:c.requestInterval)!==null&&m!==void 0?m:this.strategy.requestInterval,this.strategy.blacklist=(j=c==null?void 0:c.blacklist)!==null&&j!==void 0?j:this.strategy.blacklist,this.strategy.samplelist=(K=c==null?void 0:c.samplelist)!==null&&K!==void 0?K:this.strategy.samplelist;for(var he=0,Be=this.strategy.samplelist;he<Be.length;he++){var Te=Be[he].split(",");Te.length==2&&(this.realSample[Te[0]]=Te[1])}},p.prototype.needRequestConfig=function(){if(!this.needQueryConfig)return!1;var c=Number(this.storage.getItem(J));return Date.now()-c>60*this.strategy.requestInterval*1e3},p.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},p.prototype.isBlackEvent=function(c){return this.strategy.blacklist.indexOf(c)!=-1},p.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},p.prototype.isSampleEvent=function(c){return!!Object.prototype.hasOwnProperty.call(this.realSample,c)&&this.realSample[c]<Math.floor(Math.random()*Math.floor(1e4))},p}(),re="session_storage_key",oe=function(){function p(c,a,l){this.getSessionStackDepth=0,this.beacon=l,this.storage=c,this.duration=a,this.appkey=l.config.appkey}return p.prototype.getSession=function(){this.getSessionStackDepth+=1;var c=this.storage.getItem(re);if(!c)return this.createSession();var a="",l=0;try{var m=JSON.parse(c)||{sessionId:void 0,sessionStart:void 0};if(!m.sessionId||!m.sessionStart)return this.createSession();var j=Number(this.storage.getItem(X));if(Date.now()-j>this.duration)return this.createSession();a=m.sessionId,l=m.sessionStart,this.getSessionStackDepth=0}catch{}return{sessionId:a,sessionStart:l}},p.prototype.createSession=function(){var c=Date.now(),a={sessionId:this.appkey+"_"+c.toString(),sessionStart:c};this.storage.setItem(re,JSON.stringify(a)),this.storage.setItem(X,c.toString());var l="is_new_user",m=this.storage.getItem(l);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:m?"N":"Y"}),this.storage.setItem(l,JSON.stringify(!1)),a},p}();function ee(){var p=navigator.userAgent,c=p.indexOf("compatible")>-1&&p.indexOf("MSIE")>-1,a=p.indexOf("Edge")>-1&&!c,l=p.indexOf("Trident")>-1&&p.indexOf("rv:11.0")>-1;if(c){new RegExp("MSIE (\\d+\\.\\d+);").test(p);var m=parseFloat(RegExp.$1);return m==7?7:m==8?8:m==9?9:m==10?10:6}return a?-2:l?11:-1}function se(p,c){var a,l;return(a="https://tun-cos-1258344701.file.myqcloud.com/fp.js",l===void 0&&(l=Date.now()+"-"+Math.random()),new Promise(function(m,j){if(document.getElementById(l))m(void 0);else{var K=document.getElementsByTagName("head")[0],he=document.createElement("script");he.onload=function(){return function(){he.onload=null,m(void 0)}},he.onerror=function(Be){he.onerror=null,K.removeChild(he),j(Be)},he.src=a,he.id=l,K.appendChild(he)}})).then(function(){new Fingerprint().getQimei36(p,c)}).catch(function(m){}),""}var H=function(){return(H=Object.assign||function(c){for(var a,l=1,m=arguments.length;l<m;l++)for(var j in a=arguments[l])Object.prototype.hasOwnProperty.call(a,j)&&(c[j]=a[j]);return c}).apply(this,arguments)},ne,ce=function(){function p(c,a){a===void 0&&(a={}),this.reportOptions={},this.config=c,this.reportOptions=a}return p.canUseDB=function(){return!!(window!=null&&window.indexedDB)},p.prototype.openDB=function(){var c=this;return new Promise(function(a,l){if(!p.canUseDB())return l({message:"\u5F53\u524D\u4E0D\u652F\u6301 indexeddb"});var m=c.config,j=m.name,K=m.version,he=m.stores,Be=indexedDB.open(j,K);Be.onsuccess=function(){c.db=Be.result,a(),H({result:1,func:"open",params:JSON.stringify(c.config)},c.reportOptions)},Be.onerror=function(Te){var fe,Le;l(Te),H({result:0,func:"open",params:JSON.stringify(c.config),error_msg:(Le=(fe=Te.target)===null||fe===void 0?void 0:fe.error)===null||Le===void 0?void 0:Le.message},c.reportOptions)},Be.onupgradeneeded=function(){c.db=Be.result;try{he==null||he.forEach(function(Te){c.createStore(Te)})}catch(Te){H({result:0,func:"open",params:JSON.stringify(c.config),error_msg:Te.message},c.reportOptions),l(Te)}}})},p.prototype.useStore=function(c){return this.storeName=c,this},p.prototype.deleteDB=function(){var c=this;return this.closeDB(),new Promise(function(a,l){var m=indexedDB.deleteDatabase(c.config.name);m.onsuccess=function(){return a()},m.onerror=l})},p.prototype.closeDB=function(){var c;(c=this.db)===null||c===void 0||c.close(),this.db=null},p.prototype.getStoreCount=function(){var c=this;return new Promise(function(a,l){var m=c.getStore("readonly").count();m.onsuccess=function(){return a(m.result)},m.onerror=l})},p.prototype.clearStore=function(){var c=this;return new Promise(function(a,l){var m=c.getStore("readwrite").clear();m.onsuccess=function(){return a()},m.onerror=l})},p.prototype.add=function(c,a){var l=this;return new Promise(function(m,j){var K=l.getStore("readwrite").add(c,a);K.onsuccess=function(){m(K.result)},K.onerror=j})},p.prototype.put=function(c,a){var l=this;return new Promise(function(m,j){var K=l.getStore("readwrite").put(c,a);K.onsuccess=function(){m(K.result)},K.onerror=j})},p.prototype.getStoreAllData=function(){var c=this;return new Promise(function(a,l){var m=c.getStore("readonly").openCursor(),j=[];m.onsuccess=function(){var K;if(!((K=m.result)===null||K===void 0)&&K.value){var he=m.result.value;j.push(he),m.result.continue()}else a(j)},m.onerror=l})},p.prototype.getDataRangeByIndex=function(c,a,l,m,j){var K=this;return new Promise(function(he,Be){var Te=K.getStore().index(c),fe=IDBKeyRange.bound(a,l,m,j),Le=[],$e=Te.openCursor(fe);$e.onsuccess=function(){var Ze;!((Ze=$e==null?void 0:$e.result)===null||Ze===void 0)&&Ze.value?(Le.push($e==null?void 0:$e.result.value),$e==null||$e.result.continue()):he(Le)},$e.onerror=Be})},p.prototype.removeDataByIndex=function(c,a,l,m,j){var K=this;return new Promise(function(he,Be){var Te=K.getStore("readwrite").index(c),fe=IDBKeyRange.bound(a,l,m,j),Le=Te.openCursor(fe),$e=0;Le.onsuccess=function(Ze){var We=Ze.target.result;We?($e+=1,We.delete(),We.continue()):he($e)},Le.onerror=Be})},p.prototype.createStore=function(c){var a=c.name,l=c.indexes,m=l===void 0?[]:l,j=c.options;if(this.db){this.db.objectStoreNames.contains(a)&&this.db.deleteObjectStore(a);var K=this.db.createObjectStore(a,j);m.forEach(function(he){K.createIndex(he.indexName,he.keyPath,he.options)})}},p.prototype.getStore=function(c){var a;return c===void 0&&(c="readonly"),(a=this.db)===null||a===void 0?void 0:a.transaction(this.storeName,c).objectStore(this.storeName)},p}(),de="event_table_v3",pe="eventId",Ce=function(){function p(c){this.isReady=!1,this.taskQueue=Promise.resolve(),this.db=new ce({name:"Beacon_"+c+"_V3",version:1,stores:[{name:de,options:{keyPath:pe},indexes:[{indexName:pe,keyPath:pe,options:{unique:!0}}]}]}),this.open()}return p.prototype.getCount=function(){var c=this;return this.readyExec(function(){return c.db.getStoreCount()})},p.prototype.setItem=function(c,a){var l=this;return this.readyExec(function(){return l.db.add({eventId:c,value:a})})},p.prototype.getItem=function(c){return q(this,void 0,void 0,function(){var a=this;return O(this,function(l){return[2,this.readyExec(function(){return a.db.getDataRangeByIndex(pe,c,c)})]})})},p.prototype.removeItem=function(c){var a=this;return this.readyExec(function(){return a.db.removeDataByIndex(pe,c,c)})},p.prototype.updateItem=function(c,a){var l=this;return this.readyExec(function(){return l.db.put({eventId:c,value:a})})},p.prototype.iterate=function(c){var a=this;return this.readyExec(function(){return a.db.getStoreAllData().then(function(l){l.forEach(function(m){c(m.value)})})})},p.prototype.open=function(){return q(this,void 0,void 0,function(){var c=this;return O(this,function(a){switch(a.label){case 0:return this.taskQueue=this.taskQueue.then(function(){return c.db.openDB()}),[4,this.taskQueue];case 1:return a.sent(),this.isReady=!0,this.db.useStore(de),[2]}})})},p.prototype.readyExec=function(c){return this.isReady?c():(this.taskQueue=this.taskQueue.then(function(){return c()}),this.taskQueue)},p}(),we=function(){function p(c){this.keyObject={},this.storage=c}return p.prototype.getCount=function(){return this.storage.getStoreCount()},p.prototype.removeItem=function(c){this.storage.removeItem(c),delete this.keyObject[c]},p.prototype.setItem=function(c,a){var l=JSON.stringify(a);this.storage.setItem(c,l),this.keyObject[c]=a},p.prototype.iterate=function(c){for(var a=Object.keys(this.keyObject),l=0;l<a.length;l++){var m=this.storage.getItem(a[l]);c(JSON.parse(m))}},p}(),be=function(){function p(c,a){var l=this;this.dbEventCount=0,ee()>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?(this.store=new we(a),this.dbEventCount=this.store.getCount()):(this.store=new Ce(c),this.getCount().then(function(m){l.dbEventCount=m}).catch(function(m){}))}return p.prototype.getCount=function(){return q(this,void 0,void 0,function(){return O(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,c.sent()];case 2:return c.sent(),[2,Promise.reject()];case 3:return[2]}})})},p.prototype.insertEvent=function(c,a){return q(this,void 0,void 0,function(){var l,m;return O(this,function(j){switch(j.label){case 0:if(this.dbEventCount>=1e4)return[2,Promise.reject()];l=Q(c.mapValue),j.label=1;case 1:return j.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(l,c)];case 2:return[2,j.sent()];case 3:return m=j.sent(),a&&a(m,c),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}})})},p.prototype.getEvents=function(){return q(this,void 0,void 0,function(){var c;return O(this,function(a){switch(a.label){case 0:c=[],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.store.iterate(function(l){c.push(l)})];case 2:return a.sent(),[2,Promise.all(c)];case 3:return a.sent(),[2,Promise.all(c)];case 4:return[2]}})})},p.prototype.removeEvent=function(c){return q(this,void 0,void 0,function(){var a;return O(this,function(l){switch(l.label){case 0:a=Q(c.mapValue),l.label=1;case 1:return l.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(a)];case 2:return[2,l.sent()];case 3:return l.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}})})},p}(),ye=function(){return(ye=Object.assign||function(c){for(var a,l=1,m=arguments.length;l<m;l++)for(var j in a=arguments[l])Object.prototype.hasOwnProperty.call(a,j)&&(c[j]=a[j]);return c}).apply(this,arguments)};function Ee(p){try{return decodeURIComponent(p.replace(/\+/g," "))}catch{return null}}function xe(p,c){var a=[null,void 0,"",NaN].includes(p);if(c.isSkipEmpty&&a)return null;var l=!c.isSkipEmpty&&a?"":p;try{return c.encode?encodeURIComponent(l):l}catch{return null}}function Pe(p,c){c===void 0&&(c={encode:!0,isSkipEmpty:!1});var a=p.url,l=p.query,m=l===void 0?{}:l,j=p.hash,K=a.split("#"),he=K[0],Be=K[1],Te=Be===void 0?"":Be,fe=he.split("?")[0],Le=[],$e=xe(j||Te,c),Ze=ye(ye({},function(We){var et=We.split("#"),st=et[0],ut=et[1],ct=ut===void 0?"":ut,it=st.split("?"),at=it[0],lt=it[1],mt=lt===void 0?"":lt,vt=Ee(ct),Ct=Object.create(null);return mt.split("&").forEach(function(f){var v=f.split("="),M=v[0],te=v[1],ke=te===void 0?"":te,qe=Ee(M),Je=Ee(ke);qe===null||Je===null||qe===""&&Je===""||Ct[qe]||(Ct[qe]=Je)}),{url:at,query:Ct,hash:vt}}(a).query),m);return Object.keys(Ze).forEach(function(We){var et=xe(We,c),st=xe(Ze[We],c);et!==null&&st!==null&&Le.push(et+"="+st)}),fe+(Le.length?"?"+Le.join("&"):"")+($e?"#"+$e:"")}function ge(p,c){return new Promise(function(a,l){if(c&&document.querySelectorAll("script[data-tag="+c+"]").length)return a();var m=document.createElement("script"),j=ye({type:"text/javascript",charset:"utf-8"},p);Object.keys(j).forEach(function(K){return function(he,Be,Te){if(he)return Te===void 0?he.getAttribute(Be):he.setAttribute(Be,Te)}(m,K,j[K])}),c&&(m.dataset.tag=c),m.onload=function(){return a()},m.onreadystatechange=function(){var K=m.readyState;["complete","loaded"].includes(K)&&(m.onreadystatechange=null,a())},m.onerror=l,document.body.appendChild(m)})}(function(p){p[p.equal=0]="equal",p[p.low=-1]="low",p[p.high=1]="high"})(ne||(ne={}));var me=function(){return(me=Object.assign||function(c){for(var a,l=1,m=arguments.length;l<m;l++)for(var j in a=arguments[l])Object.prototype.hasOwnProperty.call(a,j)&&(c[j]=a[j]);return c}).apply(this,arguments)};function Re(p,c,a,l){return new(a||(a=Promise))(function(m,j){function K(Te){try{Be(l.next(Te))}catch(fe){j(fe)}}function he(Te){try{Be(l.throw(Te))}catch(fe){j(fe)}}function Be(Te){var fe;Te.done?m(Te.value):(fe=Te.value,fe instanceof a?fe:new a(function(Le){Le(fe)})).then(K,he)}Be((l=l.apply(p,c||[])).next())})}function Fe(p,c){var a,l,m,j,K={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return j={next:he(0),throw:he(1),return:he(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function he(Be){return function(Te){return function(fe){if(a)throw new TypeError("Generator is already executing.");for(;K;)try{if(a=1,l&&(m=2&fe[0]?l.return:fe[0]?l.throw||((m=l.return)&&m.call(l),0):l.next)&&!(m=m.call(l,fe[1])).done)return m;switch(l=0,m&&(fe=[2&fe[0],m.value]),fe[0]){case 0:case 1:m=fe;break;case 4:return K.label++,{value:fe[1],done:!1};case 5:K.label++,l=fe[1],fe=[0];continue;case 7:fe=K.ops.pop(),K.trys.pop();continue;default:if(!((m=(m=K.trys).length>0&&m[m.length-1])||fe[0]!==6&&fe[0]!==2)){K=0;continue}if(fe[0]===3&&(!m||fe[1]>m[0]&&fe[1]<m[3])){K.label=fe[1];break}if(fe[0]===6&&K.label<m[1]){K.label=m[1],m=fe;break}if(m&&K.label<m[2]){K.label=m[2],K.ops.push(fe);break}m[2]&&K.ops.pop(),K.trys.pop();continue}fe=c.call(p,K)}catch(Le){fe=[6,Le],l=0}finally{a=m=0}if(5&fe[0])throw fe[1];return{value:fe[0]?fe[1]:void 0,done:!0}}([Be,Te])}}}var Oe=function(){function p(){this.interceptors=[]}return p.prototype.use=function(c,a){return this.interceptors.push({resolved:c,rejected:a}),this.interceptors.length-1},p.prototype.traverse=function(c,a){a===void 0&&(a=!1);var l=Promise.resolve(c);return(a?Array.prototype.reduceRight:Array.prototype.reduce).call(this.interceptors,function(m,j){if(j){var K=j.resolved,he=j.rejected;l=l.then(K,he)}return m},""),l},p.prototype.eject=function(c){this.interceptors[c]&&(this.interceptors[c]=null)},p}(),Ie={defaults:{timeout:0,method:"GET",mode:"cors",redirect:"follow",credentials:"same-origin"},headers:{common:{Accept:"application/json, text/plain, */*"},POST:{"Content-Type":"application/x-www-form-urlencoded"},PUT:{"Content-Type":"application/x-www-form-urlencoded"},PATCH:{"Content-Type":"application/x-www-form-urlencoded"}},baseURL:"",polyfillUrl:"https://vm.gtimg.cn/comps/script/fetch.min.js",interceptors:{request:new Oe,response:new Oe}},Ne=/^([a-z][a-z\d+\-.]*:)?\/\//i,Ue=Object.prototype.toString;function He(p){return Re(this,void 0,void 0,function(){var c;return Fe(this,function(a){switch(a.label){case 0:if(window.fetch)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,ge({src:p})];case 2:return a.sent(),[3,4];case 3:throw c=a.sent(),new Error("\u52A0\u8F7D polyfill "+p+" \u5931\u8D25: "+c.message);case 4:return[2]}})})}function Ve(p){return["Accept","Content-Type"].forEach(function(c){return a=c,void((l=p.headers)&&Object.keys(l).forEach(function(m){m!==a&&m.toUpperCase()===a.toUpperCase()&&(l[a]=l[m],delete l[m])}));var a,l}),function(c){if(Ue.call(c)!=="[object Object]")return!1;var a=Object.getPrototypeOf(c);return a===null||a===Object.prototype}(p.body)&&(p.body=JSON.stringify(p.body),p.headers&&(p.headers["Content-Type"]="application/json;charset=utf-8")),p}function ze(p){return Re(this,void 0,void 0,function(){var c,a,l,m,j,K,he,Be,Te,fe,Le,$e,Ze,We,et,st,ut;return Fe(this,function(ct){switch(ct.label){case 0:return c=Ie.baseURL,a=Ie.defaults,l=Ie.interceptors,[4,He(Ie.polyfillUrl)];case 1:return ct.sent(),(m=me(me({},a),p)).headers||(m.headers=function(it){it===void 0&&(it="GET");var at=Ie.headers[it]||{};return me(me({},Ie.headers.common),at)}(m.method)),Ve(m),[4,l.request.traverse(m,!0)];case 2:if((j=ct.sent())instanceof Error)throw j;return j.url=function(it,at){return!it||Ne.test(at)?at:it.replace(/\/+$/,"")+"/"+at.replace(/^\/+/,"")}(c,j.url),K=j.url,he=j.timeout,Be=j.params,Te=j.method,fe=["GET","DELETE","OPTIONS","HEAD"].includes(Te===void 0?"GET":Te)&&!!Be,Le=fe?Pe({url:K,query:Be}):K,$e=[],he&&!j.signal&&(et=new Promise(function(it){Ze=setTimeout(function(){it(new Error("timeout"))},he)}),$e.push(et),We=new AbortController,j.signal=We.signal),$e.push(fetch(Le,j).catch(function(it){return it})),[4,Promise.race($e)];case 3:return st=ct.sent(),Ze&&clearTimeout(Ze),[4,l.response.traverse(st)];case 4:if((ut=ct.sent())instanceof Error)throw We==null||We.abort(),ut;return[2,ut]}})})}var Ye=function(){function p(c){Ie.interceptors.request.use(function(a){var l=a.url,m=a.method,j=a.body,K=j;if(c.onReportBeforeSend){var he=c.onReportBeforeSend({url:l,method:m,data:j?JSON.parse(j):null});K=he!=null&&he.data?JSON.stringify(he.data):null}return m!="GET"&&K?_(_({},a),{body:K}):a})}return p.prototype.get=function(c,a){return q(this,void 0,void 0,function(){var l,m;return O(this,function(j){switch(j.label){case 0:return[4,ze(_({url:c},a))];case 1:return[4,(l=j.sent()).json()];case 2:return m=j.sent(),[2,Promise.resolve({data:m,status:l.status,statusText:l.statusText,headers:l.headers})]}})})},p.prototype.post=function(c,a,l){return q(this,void 0,void 0,function(){var m,j;return O(this,function(K){switch(K.label){case 0:return[4,ze(_({url:c,body:a,method:"POST"},l))];case 1:return[4,(m=K.sent()).json()];case 2:return j=K.sent(),[2,Promise.resolve({data:j,status:m.status,statusText:m.statusText,headers:m.headers})]}})})},p}(),tt=function(){function p(c){this.appkey=c}return p.prototype.getItem=function(c){try{return window.localStorage.getItem(this.getStoreKey(c))}catch{return""}},p.prototype.removeItem=function(c){try{window.localStorage.removeItem(this.getStoreKey(c))}catch{}},p.prototype.setItem=function(c,a){try{window.localStorage.setItem(this.getStoreKey(c),a)}catch{}},p.prototype.setSessionItem=function(c,a){try{window.sessionStorage.setItem(this.getStoreKey(c),a)}catch{}},p.prototype.getSessionItem=function(c){try{return window.sessionStorage.getItem(this.getStoreKey(c))}catch{return""}},p.prototype.getStoreKey=function(c){return w+this.appkey+"_"+c},p.prototype.createDeviceId=function(){try{var c=window.localStorage.getItem(V);return c||(c=function(a){for(var l="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",m="",j=0;j<a;j++)m+=l.charAt(Math.floor(Math.random()*l.length));return m}(32),window.localStorage.setItem(V,c)),c}catch{return""}},p.prototype.clear=function(){try{for(var c=window.localStorage.length,a=0;a<c;a++){var l=window.localStorage.key(a);(l==null?void 0:l.substr(0,9))==w&&window.localStorage.removeItem(l)}}catch{}},p.prototype.getStoreCount=function(){var c=0;try{c=window.localStorage.length}catch{}return c},p}(),Qe="logid_start",Ae="4.5.14-web";return function(p){function c(a){var l=p.call(this,a)||this;l.qimei36="",l.uselessCycleTaskNum=0,l.underWeakNet=!1,l.pauseSearching=!1,l.send=function(he,Be,Te){l.storage.setItem(X,Date.now().toString()),l.network.post(l.uploadUrl||l.strategy.getUploadUrl(),he.data).then(function(fe){var Le;((Le=fe==null?void 0:fe.data)===null||Le===void 0?void 0:Le.result)==100?l.delayTime=1e3*fe.data.delayTime:l.delayTime=0,Be&&Be(he.data),he.data.events.forEach(function($e){l.store.removeEvent($e).then(function(){l.removeSendingId(Q($e.mapValue))})}),l.doCustomCycleTask()}).catch(function(fe){var Le=he.data.events;l.errorReport.reportError(fe.code?fe.code.toString():"600",fe.message),Te&&Te(he.data);var $e=JSON.parse(l.storage.getItem(ae));Le.forEach(function(Ze){$e&&$e.indexOf(Q(Ze))!=-1&&l.store.insertEvent(Ze,function(We,et){We&&l.errorReport.reportError("604","insertEvent fail!")}),l.removeSendingId(Q(Ze))}),l.monitorUploadFailed()})};var m,j,K=ee();return l.isUnderIE8=K>0&&K<8,l.isUnderIE8||(l.isUnderIE=K>0,a.needInitQimei&&se(a.appkey,function(he){l.qimei36=he.q36}),l.network=new Ye(a),l.storage=new tt(a.appkey),l.initCommonInfo(a),l.store=new be(a.appkey,l.storage),l.errorReport=new ue(l.config,l.commonInfo,"web",l.network),l.strategy=new C(a.needQueryConfig==null||a.needQueryConfig,l.config,l.commonInfo,l.storage,l.network),l.logidStartTime=l.storage.getItem(Qe),l.logidStartTime||(l.logidStartTime=Date.now().toString(),l.storage.setItem(Qe,l.logidStartTime)),m=l.logidStartTime,j=Date.now()-Number.parseFloat(m),Math.floor(j/864e5)>=365&&l.storage.clear(),l.initSession(a),l.onDirectUserAction("rqd_js_init",{}),setTimeout(function(){return l.lifeCycle.emit("init")},0),l.initDelayTime=a.delay?a.delay:1e3,l.cycleTask(l.initDelayTime)),l}return function(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function m(){this.constructor=a}h(a,l),a.prototype=l===null?Object.create(l):(m.prototype=l.prototype,new m)}(c,p),c.prototype.initSession=function(a){var l=18e5;a.sessionDuration&&a.sessionDuration>3e4&&(l=a.sessionDuration),this.beaconSession=new oe(this.storage,l,this)},c.prototype.initCommonInfo=function(a){var l=Number(this.storage.getItem(X));try{var m=JSON.parse(this.storage.getItem(ae));(Date.now()-l>3e4||!m)&&this.storage.setItem(ae,JSON.stringify([]))}catch{}a.uploadUrl&&(this.uploadUrl=a.uploadUrl+"?appkey="+a.appkey);var j=[window.screen.width,window.screen.height];window.devicePixelRatio&&j.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:j.join("*"),channelID:a.channelID?String(a.channelID):"",openid:a.openid?String(a.openid):"",unid:a.unionid?String(a.unionid):"",sdkVersion:Ae},this.config.appVersion=a.versionCode?String(a.versionCode):"",this.config.strictMode=a.strictMode},c.prototype.cycleTask=function(a){var l=this;this.intervalID=window.setInterval(function(){l.pauseSearching||l.store.getEvents().then(function(m){m.length==0&&(l.pauseSearching=!0);var j=[],K=JSON.parse(l.storage.getItem(ae));K||(K=[]),m&&m.forEach(function(he){var Be=Q(he.mapValue);K.indexOf(Be)==-1&&(j.push(he),K.push(Be))}),j.length!=0&&(l.storage.setItem(ae,JSON.stringify(K)),l._normalLogPipeline(l.assembleData(j)))}).catch(function(m){})},a)},c.prototype.onReport=function(a,l,m){var j=this;if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{this.pauseSearching=!1;var K=this.generateData(a,l,m);if(m&&this.delayTime==0&&!this.underWeakNet)this._normalLogPipeline(this.assembleData(K));else{var he=K.shift();he&&this.store.insertEvent(he,function(Be){Be&&j.errorReport.reportError("604","insertEvent fail!")}).catch(function(Be){j._normalLogPipeline(j.assembleData(K))})}}},c.prototype.onSendBeacon=function(a,l){if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{this.pauseSearching=!1;var m=this.assembleData(this.generateData(a,l,!0));typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(m))}},c.prototype.generateData=function(a,l,m){var j=[],K="4.5.14-web_"+(m?"direct_log_id":"normal_log_id"),he=Number(this.storage.getItem(K));return he=he||1,l=_(_({},l),{A99:m?"Y":"N",A100:he.toString(),A72:Ae,A88:this.logidStartTime}),he++,this.storage.setItem(K,he.toString()),j.push({eventCode:a,eventTime:Date.now().toString(),mapValue:ie(l,this.config.strictMode)}),j},c.prototype.assembleData=function(a){var l=this.beaconSession.getSession();return{appVersion:this.config.appVersion?De(this.config.appVersion):"",sdkId:"js",sdkVersion:Ae,mainAppKey:this.config.appkey,platformId:3,common:ie(_(_({},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:l.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:a}},c.prototype.monitorUploadFailed=function(){this.uselessCycleTaskNum++,this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.underWeakNet=!0)},c.prototype.doCustomCycleTask=function(){this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime)),this.uselessCycleTaskNum=0,this.underWeakNet=!1},c}(b)})},"./lib/crypto.js":function(e,i,n){(function(o){var d=n("./node_modules/@babel/runtime/helpers/typeof.js"),s=s||function(h,_){var q={},O=q.lib={},w=function(){},V=O.Base={extend:function(x){w.prototype=this;var b=new w;return x&&b.mixIn(x),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var x=this.extend();return x.init.apply(x,arguments),x},init:function(){},mixIn:function(x){for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);x.hasOwnProperty("toString")&&(this.toString=x.toString)},clone:function(){return this.init.prototype.extend(this)}},X=O.WordArray=V.extend({init:function(x,b){x=this.words=x||[],this.sigBytes=b!=_?b:4*x.length},toString:function(x){return(x||G).stringify(this)},concat:function(x){var b=this.words,ue=x.words,C=this.sigBytes;if(x=x.sigBytes,this.clamp(),C%4)for(var re=0;re<x;re++)b[C+re>>>2]|=(ue[re>>>2]>>>24-8*(re%4)&255)<<24-8*((C+re)%4);else if(65535<ue.length)for(re=0;re<x;re+=4)b[C+re>>>2]=ue[re>>>2];else b.push.apply(b,ue);return this.sigBytes+=x,this},clamp:function(){var x=this.words,b=this.sigBytes;x[b>>>2]&=4294967295<<32-8*(b%4),x.length=h.ceil(b/4)},clone:function(){var x=V.clone.call(this);return x.words=this.words.slice(0),x},random:function(x){for(var b=[],ue=0;ue<x;ue+=4)b.push(4294967296*h.random()|0);return new X.init(b,x)}}),ae=q.enc={},G=ae.Hex={stringify:function(x){var b=x.words;x=x.sigBytes;for(var ue=[],C=0;C<x;C++){var re=b[C>>>2]>>>24-8*(C%4)&255;ue.push((re>>>4).toString(16)),ue.push((re&15).toString(16))}return ue.join("")},parse:function(x){for(var b=x.length,ue=[],C=0;C<b;C+=2)ue[C>>>3]|=parseInt(x.substr(C,2),16)<<24-4*(C%8);return new X.init(ue,b/2)}},J=ae.Latin1={stringify:function(x){var b=x.words;x=x.sigBytes;for(var ue=[],C=0;C<x;C++)ue.push(String.fromCharCode(b[C>>>2]>>>24-8*(C%4)&255));return ue.join("")},parse:function(x){for(var b=x.length,ue=[],C=0;C<b;C++)ue[C>>>2]|=(x.charCodeAt(C)&255)<<24-8*(C%4);return new X.init(ue,b)}},le=ae.Utf8={stringify:function(x){try{return decodeURIComponent(escape(J.stringify(x)))}catch{throw Error("Malformed UTF-8 data")}},parse:function(x){return J.parse(unescape(encodeURIComponent(x)))}},ie=O.BufferedBlockAlgorithm=V.extend({reset:function(){this._data=new X.init,this._nDataBytes=0},_append:function(x){typeof x=="string"&&(x=le.parse(x)),this._data.concat(x),this._nDataBytes+=x.sigBytes},_process:function(x){var b=this._data,ue=b.words,C=b.sigBytes,re=this.blockSize,oe=C/(4*re),oe=x?h.ceil(oe):h.max((oe|0)-this._minBufferSize,0);if(x=oe*re,C=h.min(4*x,C),x){for(var ee=0;ee<x;ee+=re)this._doProcessBlock(ue,ee);ee=ue.splice(0,x),b.sigBytes-=C}return new X.init(ee,C)},clone:function(){var x=V.clone.call(this);return x._data=this._data.clone(),x},_minBufferSize:0});O.Hasher=ie.extend({cfg:V.extend(),init:function(x){this.cfg=this.cfg.extend(x),this.reset()},reset:function(){ie.reset.call(this),this._doReset()},update:function(x){return this._append(x),this._process(),this},finalize:function(x){return x&&this._append(x),this._doFinalize()},blockSize:16,_createHelper:function(x){return function(b,ue){return new x.init(ue).finalize(b)}},_createHmacHelper:function(x){return function(b,ue){return new De.HMAC.init(x,ue).finalize(b)}}});var De=q.algo={};return q}(Math);(function(){var h=s,w=h.lib,_=w.WordArray,q=w.Hasher,O=[],w=h.algo.SHA1=q.extend({_doReset:function(){this._hash=new _.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(X,ae){for(var G=this._hash.words,J=G[0],le=G[1],ie=G[2],De=G[3],Q=G[4],x=0;80>x;x++){if(16>x)O[x]=X[ae+x]|0;else{var b=O[x-3]^O[x-8]^O[x-14]^O[x-16];O[x]=b<<1|b>>>31}b=(J<<5|J>>>27)+Q+O[x],b=20>x?b+((le&ie|~le&De)+1518500249):40>x?b+((le^ie^De)+1859775393):60>x?b+((le&ie|le&De|ie&De)-1894007588):b+((le^ie^De)-899497514),Q=De,De=ie,ie=le<<30|le>>>2,le=J,J=b}G[0]=G[0]+J|0,G[1]=G[1]+le|0,G[2]=G[2]+ie|0,G[3]=G[3]+De|0,G[4]=G[4]+Q|0},_doFinalize:function(){var X=this._data,ae=X.words,G=8*this._nDataBytes,J=8*X.sigBytes;return ae[J>>>5]|=128<<24-J%32,ae[(J+64>>>9<<4)+14]=Math.floor(G/4294967296),ae[(J+64>>>9<<4)+15]=G,X.sigBytes=4*ae.length,this._process(),this._hash},clone:function(){var X=q.clone.call(this);return X._hash=this._hash.clone(),X}});h.SHA1=q._createHelper(w),h.HmacSHA1=q._createHmacHelper(w)})(),function(){var h=s,_=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(O,w){O=this._hasher=new O.init,typeof w=="string"&&(w=_.parse(w));var V=O.blockSize,X=4*V;w.sigBytes>X&&(w=O.finalize(w)),w.clamp();for(var ae=this._oKey=w.clone(),G=this._iKey=w.clone(),J=ae.words,le=G.words,ie=0;ie<V;ie++)J[ie]^=1549556828,le[ie]^=909522486;ae.sigBytes=G.sigBytes=X,this.reset()},reset:function(){var O=this._hasher;O.reset(),O.update(this._iKey)},update:function(O){return this._hasher.update(O),this},finalize:function(O){var w=this._hasher;return O=w.finalize(O),w.reset(),w.finalize(this._oKey.clone().concat(O))}})}(),function(){var h=s,_=h.lib,q=_.WordArray,O=h.enc;O.Base64={stringify:function(V){var X=V.words,ae=V.sigBytes,G=this._map;V.clamp();for(var J=[],le=0;le<ae;le+=3)for(var ie=X[le>>>2]>>>24-le%4*8&255,De=X[le+1>>>2]>>>24-(le+1)%4*8&255,Q=X[le+2>>>2]>>>24-(le+2)%4*8&255,x=ie<<16|De<<8|Q,b=0;b<4&&le+b*.75<ae;b++)J.push(G.charAt(x>>>6*(3-b)&63));var ue=G.charAt(64);if(ue)for(;J.length%4;)J.push(ue);return J.join("")},parse:function(V){var X=V.length,ae=this._map,G=ae.charAt(64);if(G){var J=V.indexOf(G);J!=-1&&(X=J)}for(var le=[],ie=0,De=0;De<X;De++)if(De%4){var Q=ae.indexOf(V.charAt(De-1))<<De%4*2,x=ae.indexOf(V.charAt(De))>>>6-De%4*2;le[ie>>>2]|=(Q|x)<<24-ie%4*8,ie++}return q.create(le,ie)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),d(o)==="object"?o.exports=s:window.CryptoJS=s}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./lib/json2xml.js":function(e,i,n){var o=n("./node_modules/@babel/runtime/helpers/typeof.js"),d="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",s="-.0-9\xB7\u0300-\u036F\u203F\u2040",h=new RegExp("^([^"+d+"])|^((x|X)(m|M)(l|L))|([^"+d+s+"])","g"),_=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,q=function(ae){var G=[];if(ae instanceof Object)for(var J in ae)ae.hasOwnProperty(J)&&G.push(J);return G},O=function(ae,G){var J=function(ie,De,Q,x,b){var ue=G.indent!==void 0?G.indent:" ",C=G.prettyPrint?`
  8. `+new Array(x).join(ue):"";G.removeIllegalNameCharacters&&(ie=ie.replace(h,"_"));var re=[C,"<",ie,Q||""];return De&&De.length>0?(re.push(">"),re.push(De),b&&re.push(C),re.push("</"),re.push(ie),re.push(">")):re.push("/>"),re.join("")};return function le(ie,De,Q){var x=o(ie);switch((Array.isArray?Array.isArray(ie):ie instanceof Array)?x="array":ie instanceof Date&&(x="date"),x){case"array":var b=[];return ie.map(function(oe){b.push(le(oe,1,Q+1))}),G.prettyPrint&&b.push(`
  9. `),b.join("");case"date":return ie.toJSON?ie.toJSON():ie+"";case"object":var ue=[];for(var C in ie)if(ie.hasOwnProperty(C))if(ie[C]instanceof Array)for(var re=0;re<ie[C].length;re++)ie[C].hasOwnProperty(re)&&ue.push(J(C,le(ie[C][re],0,Q+1),null,Q+1,q(ie[C][re]).length));else ue.push(J(C,le(ie[C],0,Q+1),null,Q+1));return G.prettyPrint&&ue.length>0&&ue.push(`
  10. `),ue.join("");case"function":return ie();default:return G.escape?V(ie):""+ie}}(ae,0,0)},w=function(ae){var G=['<?xml version="1.0" encoding="UTF-8"'];return ae&&G.push(' standalone="yes"'),G.push("?>"),G.join("")};function V(X){return(""+X).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(_,"")}e.exports=function(X,ae){if(ae||(ae={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),typeof X=="string")try{X=JSON.parse(X.toString())}catch{return!1}var G="",J="";ae&&(o(ae)=="object"?(ae.xmlHeader&&(G=w(!!ae.xmlHeader.standalone)),typeof ae.docType!="undefined"&&(J="<!DOCTYPE "+ae.docType+">")):G=w()),ae=ae||{};var le=[G,ae.prettyPrint&&J?`
  11. `:"",J,O(X,ae)];return le.join("").replace(/\n{2,}/g,`
  12. `).replace(/\s+$/g,"")}},"./lib/md5.js":function(module,exports,__webpack_require__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__("./node_modules/@babel/runtime/helpers/typeof.js");(function(){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=__webpack_require__("./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(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return _typeof(e)==="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(i){return function(n,o){return new Md5(!0).update(n,o)[i]()}},createMethod=function(){var i=createOutputMethod("hex");NODE_JS&&(i=nodeWrap(i)),i.getCtx=i.create=function(){return new Md5},i.update=function(d){return i.create().update(d)};for(var n=0;n<OUTPUT_TYPES.length;++n){var o=OUTPUT_TYPES[n];i[o]=createOutputMethod(o)}return i},nodeWrap=function nodeWrap(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function e(i){if(typeof i=="string")return crypto.createHash("md5").update(i,"utf8").digest("hex");if(i==null)throw ERROR;return i.constructor===ArrayBuffer&&(i=new Uint8Array(i)),Array.isArray(i)||ArrayBuffer.isView(i)||i.constructor===Buffer?crypto.createHash("md5").update(new Buffer(i)).digest("hex"):method(i)};return nodeMethod};function Md5(e){if(e)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var i=new ArrayBuffer(68);this.buffer8=new Uint8Array(i),this.blocks=new Uint32Array(i)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(e,i){if(!this.finalized){for(var n,o=0,d,s=e.length,h=this.blocks,_=this.buffer8;o<s;){if(this.hashed&&(this.hashed=!1,h[0]=h[16],h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0),ARRAY_BUFFER)for(d=this.start;o<s&&d<64;++o)n=e.charCodeAt(o),i||n<128?_[d++]=n:n<2048?(_[d++]=192|n>>6,_[d++]=128|n&63):n<55296||n>=57344?(_[d++]=224|n>>12,_[d++]=128|n>>6&63,_[d++]=128|n&63):(n=65536+((n&1023)<<10|e.charCodeAt(++o)&1023),_[d++]=240|n>>18,_[d++]=128|n>>12&63,_[d++]=128|n>>6&63,_[d++]=128|n&63);else for(d=this.start;o<s&&d<64;++o)n=e.charCodeAt(o),i||n<128?h[d>>2]|=n<<SHIFT[d++&3]:n<2048?(h[d>>2]|=(192|n>>6)<<SHIFT[d++&3],h[d>>2]|=(128|n&63)<<SHIFT[d++&3]):n<55296||n>=57344?(h[d>>2]|=(224|n>>12)<<SHIFT[d++&3],h[d>>2]|=(128|n>>6&63)<<SHIFT[d++&3],h[d>>2]|=(128|n&63)<<SHIFT[d++&3]):(n=65536+((n&1023)<<10|e.charCodeAt(++o)&1023),h[d>>2]|=(240|n>>18)<<SHIFT[d++&3],h[d>>2]|=(128|n>>12&63)<<SHIFT[d++&3],h[d>>2]|=(128|n>>6&63)<<SHIFT[d++&3],h[d>>2]|=(128|n&63)<<SHIFT[d++&3]);this.lastByteIndex=d,this.bytes+=d-this.start,d>=64?(this.start=d-64,this.hash(),this.hashed=!0):this.start=d}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,i=this.lastByteIndex;e[i>>2]|=EXTRA[i&3],i>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,i,n,o,d,s,h=this.blocks;this.first?(e=h[0]-680876937,e=(e<<7|e>>>25)-271733879<<0,o=(-1732584194^e&2004318071)+h[1]-117830708,o=(o<<12|o>>>20)+e<<0,n=(-271733879^o&(e^-271733879))+h[2]-1126478375,n=(n<<17|n>>>15)+o<<0,i=(e^n&(o^e))+h[3]-1316259209,i=(i<<22|i>>>10)+n<<0):(e=this.h0,i=this.h1,n=this.h2,o=this.h3,e+=(o^i&(n^o))+h[0]-680876936,e=(e<<7|e>>>25)+i<<0,o+=(n^e&(i^n))+h[1]-389564586,o=(o<<12|o>>>20)+e<<0,n+=(i^o&(e^i))+h[2]+606105819,n=(n<<17|n>>>15)+o<<0,i+=(e^n&(o^e))+h[3]-1044525330,i=(i<<22|i>>>10)+n<<0),e+=(o^i&(n^o))+h[4]-176418897,e=(e<<7|e>>>25)+i<<0,o+=(n^e&(i^n))+h[5]+1200080426,o=(o<<12|o>>>20)+e<<0,n+=(i^o&(e^i))+h[6]-1473231341,n=(n<<17|n>>>15)+o<<0,i+=(e^n&(o^e))+h[7]-45705983,i=(i<<22|i>>>10)+n<<0,e+=(o^i&(n^o))+h[8]+1770035416,e=(e<<7|e>>>25)+i<<0,o+=(n^e&(i^n))+h[9]-1958414417,o=(o<<12|o>>>20)+e<<0,n+=(i^o&(e^i))+h[10]-42063,n=(n<<17|n>>>15)+o<<0,i+=(e^n&(o^e))+h[11]-1990404162,i=(i<<22|i>>>10)+n<<0,e+=(o^i&(n^o))+h[12]+1804603682,e=(e<<7|e>>>25)+i<<0,o+=(n^e&(i^n))+h[13]-40341101,o=(o<<12|o>>>20)+e<<0,n+=(i^o&(e^i))+h[14]-1502002290,n=(n<<17|n>>>15)+o<<0,i+=(e^n&(o^e))+h[15]+1236535329,i=(i<<22|i>>>10)+n<<0,e+=(n^o&(i^n))+h[1]-165796510,e=(e<<5|e>>>27)+i<<0,o+=(i^n&(e^i))+h[6]-1069501632,o=(o<<9|o>>>23)+e<<0,n+=(e^i&(o^e))+h[11]+643717713,n=(n<<14|n>>>18)+o<<0,i+=(o^e&(n^o))+h[0]-373897302,i=(i<<20|i>>>12)+n<<0,e+=(n^o&(i^n))+h[5]-701558691,e=(e<<5|e>>>27)+i<<0,o+=(i^n&(e^i))+h[10]+38016083,o=(o<<9|o>>>23)+e<<0,n+=(e^i&(o^e))+h[15]-660478335,n=(n<<14|n>>>18)+o<<0,i+=(o^e&(n^o))+h[4]-405537848,i=(i<<20|i>>>12)+n<<0,e+=(n^o&(i^n))+h[9]+568446438,e=(e<<5|e>>>27)+i<<0,o+=(i^n&(e^i))+h[14]-1019803690,o=(o<<9|o>>>23)+e<<0,n+=(e^i&(o^e))+h[3]-187363961,n=(n<<14|n>>>18)+o<<0,i+=(o^e&(n^o))+h[8]+1163531501,i=(i<<20|i>>>12)+n<<0,e+=(n^o&(i^n))+h[13]-1444681467,e=(e<<5|e>>>27)+i<<0,o+=(i^n&(e^i))+h[2]-51403784,o=(o<<9|o>>>23)+e<<0,n+=(e^i&(o^e))+h[7]+1735328473,n=(n<<14|n>>>18)+o<<0,i+=(o^e&(n^o))+h[12]-1926607734,i=(i<<20|i>>>12)+n<<0,d=i^n,e+=(d^o)+h[5]-378558,e=(e<<4|e>>>28)+i<<0,o+=(d^e)+h[8]-2022574463,o=(o<<11|o>>>21)+e<<0,s=o^e,n+=(s^i)+h[11]+1839030562,n=(n<<16|n>>>16)+o<<0,i+=(s^n)+h[14]-35309556,i=(i<<23|i>>>9)+n<<0,d=i^n,e+=(d^o)+h[1]-1530992060,e=(e<<4|e>>>28)+i<<0,o+=(d^e)+h[4]+1272893353,o=(o<<11|o>>>21)+e<<0,s=o^e,n+=(s^i)+h[7]-155497632,n=(n<<16|n>>>16)+o<<0,i+=(s^n)+h[10]-1094730640,i=(i<<23|i>>>9)+n<<0,d=i^n,e+=(d^o)+h[13]+681279174,e=(e<<4|e>>>28)+i<<0,o+=(d^e)+h[0]-358537222,o=(o<<11|o>>>21)+e<<0,s=o^e,n+=(s^i)+h[3]-722521979,n=(n<<16|n>>>16)+o<<0,i+=(s^n)+h[6]+76029189,i=(i<<23|i>>>9)+n<<0,d=i^n,e+=(d^o)+h[9]-640364487,e=(e<<4|e>>>28)+i<<0,o+=(d^e)+h[12]-421815835,o=(o<<11|o>>>21)+e<<0,s=o^e,n+=(s^i)+h[15]+530742520,n=(n<<16|n>>>16)+o<<0,i+=(s^n)+h[2]-995338651,i=(i<<23|i>>>9)+n<<0,e+=(n^(i|~o))+h[0]-198630844,e=(e<<6|e>>>26)+i<<0,o+=(i^(e|~n))+h[7]+1126891415,o=(o<<10|o>>>22)+e<<0,n+=(e^(o|~i))+h[14]-1416354905,n=(n<<15|n>>>17)+o<<0,i+=(o^(n|~e))+h[5]-57434055,i=(i<<21|i>>>11)+n<<0,e+=(n^(i|~o))+h[12]+1700485571,e=(e<<6|e>>>26)+i<<0,o+=(i^(e|~n))+h[3]-1894986606,o=(o<<10|o>>>22)+e<<0,n+=(e^(o|~i))+h[10]-1051523,n=(n<<15|n>>>17)+o<<0,i+=(o^(n|~e))+h[1]-2054922799,i=(i<<21|i>>>11)+n<<0,e+=(n^(i|~o))+h[8]+1873313359,e=(e<<6|e>>>26)+i<<0,o+=(i^(e|~n))+h[15]-30611744,o=(o<<10|o>>>22)+e<<0,n+=(e^(o|~i))+h[6]-1560198380,n=(n<<15|n>>>17)+o<<0,i+=(o^(n|~e))+h[13]+1309151649,i=(i<<21|i>>>11)+n<<0,e+=(n^(i|~o))+h[4]-145523070,e=(e<<6|e>>>26)+i<<0,o+=(i^(e|~n))+h[11]-1120210379,o=(o<<10|o>>>22)+e<<0,n+=(e^(o|~i))+h[2]+718787259,n=(n<<15|n>>>17)+o<<0,i+=(o^(n|~e))+h[9]-343485551,i=(i<<21|i>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=i-271733879<<0,this.h2=n-1732584194<<0,this.h3=o+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+i<<0,this.h2=this.h2+n<<0,this.h3=this.h3+o<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,i=this.h1,n=this.h2,o=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[o&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(e){if(e==="hex")return this.hex();this.finalize();var i=this.h0,n=this.h1,o=this.h2,d=this.h3,s=[i&255,i>>8&255,i>>16&255,i>>24&255,n&255,n>>8&255,n>>16&255,n>>24&255,o&255,o>>8&255,o>>16&255,o>>24&255,d&255,d>>8&255,d>>16&255,d>>24&255];return s},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),i=new Uint32Array(e);return i[0]=this.h0,i[1]=this.h1,i[2]=this.h2,i[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,i,n,o="",d=this.array(),s=0;s<15;)e=d[s++],i=d[s++],n=d[s++],o+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[(e<<4|i>>>4)&63]+BASE64_ENCODE_CHAR[(i<<2|n>>>6)&63]+BASE64_ENCODE_CHAR[n&63];return e=d[s],o+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"==",o};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__("./node_modules/process/browser.js"),__webpack_require__("./node_modules/webpack/buildin/global.js"),__webpack_require__("./node_modules/webpack/buildin/module.js")(module))},"./lib/request.js":function(e,i,n){var o=n("./node_modules/@babel/runtime/helpers/typeof.js"),d=function(w){switch(o(w)){case"string":return w;case"boolean":return w?"true":"false";case"number":return isFinite(w)?w:"";default:return""}},s=function(w,V,X,ae){return V=V||"&",X=X||"=",w===null&&(w=void 0),o(w)==="object"?Object.keys(w).map(function(G){var J=encodeURIComponent(d(G))+X;return Array.isArray(w[G])?w[G].map(function(le){return J+encodeURIComponent(d(le))}).join(V):J+encodeURIComponent(d(w[G]))}).filter(Boolean).join(V):ae?encodeURIComponent(d(ae))+X+encodeURIComponent(d(w)):""},h=function(w,V,X){var ae={};return V.getAllResponseHeaders().trim().split(`
  13. `).forEach(function(G){if(G){var J=G.indexOf(":"),le=G.substr(0,J).trim().toLowerCase(),ie=G.substr(J+1).trim();ae[le]=ie}}),{error:w,statusCode:V.status,statusMessage:V.statusText,headers:ae,body:X}},_=function(w,V){return!V&&V==="text"?w.responseText:w.response},q=function(w,V){var X=(w.method||"GET").toUpperCase(),ae=w.url;if(w.qs){var G=s(w.qs);G&&(ae+=(ae.indexOf("?")===-1?"?":"&")+G)}var J=new XMLHttpRequest;if(J.open(X,ae,!0),J.responseType=w.dataType||"text",w.xhrFields)for(var le in w.xhrFields)J[le]=w.xhrFields[le];var ie=w.headers;if(ie)for(var De in ie)ie.hasOwnProperty(De)&&De.toLowerCase()!=="content-length"&&De.toLowerCase()!=="user-agent"&&De.toLowerCase()!=="origin"&&De.toLowerCase()!=="host"&&J.setRequestHeader(De,ie[De]);return w.onProgress&&J.upload&&(J.upload.onprogress=w.onProgress),w.onDownloadProgress&&(J.onprogress=w.onDownloadProgress),w.timeout&&(J.timeout=w.timeout),J.ontimeout=function(Q){var x=new Error("timeout");V(h(x,J))},J.onload=function(){V(h(null,J,_(J,w.dataType)))},J.onerror=function(Q){var x=_(J,w.dataType);if(x)V(h(null,J,x));else{var b=J.statusText;!b&&J.status===0&&(b=new Error("CORS blocked or network error")),V(h(b,J,x))}},J.send(w.body||""),J};e.exports=q},"./lib/xml2json.js":function(e,i,n){var o=n("./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,d=function(){this.version="1.3.5";var h={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},_=new RegExp(/(?!xmlns)^.*:/);return this.grokType=function(q){return/^\s*$/.test(q)?null:/^(?:true|false)$/i.test(q)?q.toLowerCase()==="true":isFinite(q)?parseFloat(q):q},this.parseString=function(q,O){if(q){var w=this.stringToXML(q);return w.getElementsByTagName("parsererror").length?null:this.parseXML(w,O)}else return null},this.parseXML=function(q,O){for(var w in O)h[w]=O[w];var V={},X=0,ae="",G=q.childNodes.length;if(G)for(var J,le,ie,De=0;De<q.childNodes.length;De++)J=q.childNodes.item(De),J.nodeType===4?h.mergeCDATA&&(ae+=J.nodeValue):J.nodeType===3?ae+=J.nodeValue:J.nodeType===1&&(X===0&&(V={}),h.stripElemPrefix?le=J.nodeName.replace(_,""):le=J.nodeName,ie=d.parseXML(J),V.hasOwnProperty(le)?(V[le].constructor!==Array&&(V[le]=[V[le]]),V[le].push(ie)):(V[le]=ie,X++));return Object.keys(V).length||(V=ae||""),V},this.xmlToString=function(q){try{var O=q.xml?q.xml:new XMLSerializer().serializeToString(q);return O}catch{return null}},this.stringToXML=function(q){try{var O=null;if(window.DOMParser){var w=new o;return O=w.parseFromString(q,"text/xml"),O}else return O=new ActiveXObject("Microsoft.XMLDOM"),O.async=!1,O.loadXML(q),O}catch{return null}},this}.call({}),s=function(_){return d.parseString(_)};e.exports=s},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(e,i){function n(o,d){if(!(o instanceof d))throw new TypeError("Cannot call a class as a function")}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(e,i,n){var o=n("./node_modules/@babel/runtime/helpers/toPropertyKey.js");function d(h,_){for(var q=0;q<_.length;q++){var O=_[q];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(h,o(O.key),O)}}function s(h,_,q){return _&&d(h.prototype,_),q&&d(h,q),Object.defineProperty(h,"prototype",{writable:!1}),h}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPrimitive.js":function(e,i,n){var o=n("./node_modules/@babel/runtime/helpers/typeof.js").default;function d(s,h){if(o(s)!=="object"||s===null)return s;var _=s[Symbol.toPrimitive];if(_!==void 0){var q=_.call(s,h||"default");if(o(q)!=="object")return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(s)}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":function(e,i,n){var o=n("./node_modules/@babel/runtime/helpers/typeof.js").default,d=n("./node_modules/@babel/runtime/helpers/toPrimitive.js");function s(h){var _=d(h,"string");return o(_)==="symbol"?_:String(_)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(e,i){function n(o){return e.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},e.exports.__esModule=!0,e.exports.default=e.exports,n(o)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@xmldom/xmldom/lib/conventions.js":function(e,i,n){function o(q,O,w){if(w===void 0&&(w=Array.prototype),q&&typeof w.find=="function")return w.find.call(q,O);for(var V=0;V<q.length;V++)if(Object.prototype.hasOwnProperty.call(q,V)){var X=q[V];if(O.call(void 0,X,V,q))return X}}function d(q,O){return O===void 0&&(O=Object),O&&typeof O.freeze=="function"?O.freeze(q):q}function s(q,O){if(q===null||typeof q!="object")throw new TypeError("target is not an object");for(var w in O)Object.prototype.hasOwnProperty.call(O,w)&&(q[w]=O[w]);return q}var h=d({HTML:"text/html",isHTML:function(q){return q===h.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_=d({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(q){return q===_.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});i.assign=s,i.find=o,i.freeze=d,i.MIME_TYPE=h,i.NAMESPACE=_},"./node_modules/@xmldom/xmldom/lib/dom-parser.js":function(e,i,n){var o=n("./node_modules/@xmldom/xmldom/lib/conventions.js"),d=n("./node_modules/@xmldom/xmldom/lib/dom.js"),s=n("./node_modules/@xmldom/xmldom/lib/entities.js"),h=n("./node_modules/@xmldom/xmldom/lib/sax.js"),_=d.DOMImplementation,q=o.NAMESPACE,O=h.ParseError,w=h.XMLReader;function V(Q){return Q.replace(/\r[\n\u0085]/g,`
  14. `).replace(/[\r\u0085\u2028]/g,`
  15. `)}function X(Q){this.options=Q||{locator:{}}}X.prototype.parseFromString=function(Q,x){var b=this.options,ue=new w,C=b.domBuilder||new G,re=b.errorHandler,oe=b.locator,ee=b.xmlns||{},se=/\/x?html?$/.test(x),H=se?s.HTML_ENTITIES:s.XML_ENTITIES;oe&&C.setDocumentLocator(oe),ue.errorHandler=ae(re,C,oe),ue.domBuilder=b.domBuilder||C,se&&(ee[""]=q.HTML),ee.xml=ee.xml||q.XML;var ne=b.normalizeLineEndings||V;return Q&&typeof Q=="string"?ue.parse(ne(Q),ee,H):ue.errorHandler.error("invalid doc source"),C.doc};function ae(Q,x,b){if(!Q){if(x instanceof G)return x;Q=x}var ue={},C=Q instanceof Function;b=b||{};function re(oe){var ee=Q[oe];!ee&&C&&(ee=Q.length==2?function(se){Q(oe,se)}:Q),ue[oe]=ee&&function(se){ee("[xmldom "+oe+"] "+se+le(b))}||function(){}}return re("warning"),re("error"),re("fatalError"),ue}function G(){this.cdata=!1}function J(Q,x){x.lineNumber=Q.lineNumber,x.columnNumber=Q.columnNumber}G.prototype={startDocument:function(){this.doc=new _().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(Q,x,b,ue){var C=this.doc,re=C.createElementNS(Q,b||x),oe=ue.length;De(this,re),this.currentElement=re,this.locator&&J(this.locator,re);for(var ee=0;ee<oe;ee++){var Q=ue.getURI(ee),se=ue.getValue(ee),b=ue.getQName(ee),H=C.createAttributeNS(Q,b);this.locator&&J(ue.getLocator(ee),H),H.value=H.nodeValue=se,re.setAttributeNode(H)}},endElement:function(Q,x,b){var ue=this.currentElement;ue.tagName,this.currentElement=ue.parentNode},startPrefixMapping:function(Q,x){},endPrefixMapping:function(Q){},processingInstruction:function(Q,x){var b=this.doc.createProcessingInstruction(Q,x);this.locator&&J(this.locator,b),De(this,b)},ignorableWhitespace:function(Q,x,b){},characters:function(Q,x,b){if(Q=ie.apply(this,arguments),Q){if(this.cdata)var ue=this.doc.createCDATASection(Q);else var ue=this.doc.createTextNode(Q);this.currentElement?this.currentElement.appendChild(ue):/^\s*$/.test(Q)&&this.doc.appendChild(ue),this.locator&&J(this.locator,ue)}},skippedEntity:function(Q){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(Q){(this.locator=Q)&&(Q.lineNumber=0)},comment:function(Q,x,b){Q=ie.apply(this,arguments);var ue=this.doc.createComment(Q);this.locator&&J(this.locator,ue),De(this,ue)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(Q,x,b){var ue=this.doc.implementation;if(ue&&ue.createDocumentType){var C=ue.createDocumentType(Q,x,b);this.locator&&J(this.locator,C),De(this,C),this.doc.doctype=C}},warning:function(Q){console.warn("[xmldom warning] "+Q,le(this.locator))},error:function(Q){console.error("[xmldom error] "+Q,le(this.locator))},fatalError:function(Q){throw new O(Q,this.locator)}};function le(Q){if(Q)return`
  16. @`+(Q.systemId||"")+"#[line:"+Q.lineNumber+",col:"+Q.columnNumber+"]"}function ie(Q,x,b){return typeof Q=="string"?Q.substr(x,b):Q.length>=x+b||x?new java.lang.String(Q,x,b)+"":Q}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(Q){G.prototype[Q]=function(){return null}});function De(Q,x){Q.currentElement?Q.currentElement.appendChild(x):Q.doc.appendChild(x)}i.__DOMHandler=G,i.normalizeLineEndings=V,i.DOMParser=X},"./node_modules/@xmldom/xmldom/lib/dom.js":function(e,i,n){var o=n("./node_modules/@xmldom/xmldom/lib/conventions.js"),d=o.find,s=o.NAMESPACE;function h(f){return f!==""}function _(f){return f?f.split(/[\t\n\f\r ]+/).filter(h):[]}function q(f,v){return f.hasOwnProperty(v)||(f[v]=!0),f}function O(f){if(!f)return[];var v=_(f);return Object.keys(v.reduce(q,{}))}function w(f){return function(v){return f&&f.indexOf(v)!==-1}}function V(f,v){for(var M in f)Object.prototype.hasOwnProperty.call(f,M)&&(v[M]=f[M])}function X(f,v){var M=f.prototype;if(!(M instanceof v)){let te=function(){};te.prototype=v.prototype,te=new te,V(M,te),f.prototype=M=te}M.constructor!=f&&(typeof f!="function"&&console.error("unknown Class:"+f),M.constructor=f)}var ae={},G=ae.ELEMENT_NODE=1,J=ae.ATTRIBUTE_NODE=2,le=ae.TEXT_NODE=3,ie=ae.CDATA_SECTION_NODE=4,De=ae.ENTITY_REFERENCE_NODE=5,Q=ae.ENTITY_NODE=6,x=ae.PROCESSING_INSTRUCTION_NODE=7,b=ae.COMMENT_NODE=8,ue=ae.DOCUMENT_NODE=9,C=ae.DOCUMENT_TYPE_NODE=10,re=ae.DOCUMENT_FRAGMENT_NODE=11,oe=ae.NOTATION_NODE=12,ee={},se={};ee.INDEX_SIZE_ERR=(se[1]="Index size error",1),ee.DOMSTRING_SIZE_ERR=(se[2]="DOMString size error",2);var H=ee.HIERARCHY_REQUEST_ERR=(se[3]="Hierarchy request error",3);ee.WRONG_DOCUMENT_ERR=(se[4]="Wrong document",4),ee.INVALID_CHARACTER_ERR=(se[5]="Invalid character",5),ee.NO_DATA_ALLOWED_ERR=(se[6]="No data allowed",6),ee.NO_MODIFICATION_ALLOWED_ERR=(se[7]="No modification allowed",7);var ne=ee.NOT_FOUND_ERR=(se[8]="Not found",8);ee.NOT_SUPPORTED_ERR=(se[9]="Not supported",9);var ce=ee.INUSE_ATTRIBUTE_ERR=(se[10]="Attribute in use",10);ee.INVALID_STATE_ERR=(se[11]="Invalid state",11),ee.SYNTAX_ERR=(se[12]="Syntax error",12),ee.INVALID_MODIFICATION_ERR=(se[13]="Invalid modification",13),ee.NAMESPACE_ERR=(se[14]="Invalid namespace",14),ee.INVALID_ACCESS_ERR=(se[15]="Invalid access",15);function de(f,v){if(v instanceof Error)var M=v;else M=this,Error.call(this,se[f]),this.message=se[f],Error.captureStackTrace&&Error.captureStackTrace(this,de);return M.code=f,v&&(this.message=this.message+": "+v),M}de.prototype=Error.prototype,V(ee,de);function pe(){}pe.prototype={length:0,item:function(f){return f>=0&&f<this.length?this[f]:null},toString:function(f,v){for(var M=[],te=0;te<this.length;te++)lt(this[te],M,f,v);return M.join("")},filter:function(f){return Array.prototype.filter.call(this,f)},indexOf:function(f){return Array.prototype.indexOf.call(this,f)}};function Ce(f,v){this._node=f,this._refresh=v,we(this)}function we(f){var v=f._node._inc||f._node.ownerDocument._inc;if(f._inc!==v){var M=f._refresh(f._node);if(Ct(f,"length",M.length),!f.$$length||M.length<f.$$length)for(var te=M.length;te in f;te++)Object.prototype.hasOwnProperty.call(f,te)&&delete f[te];V(M,f),f._inc=v}}Ce.prototype.item=function(f){return we(this),this[f]||null},X(Ce,pe);function be(){}function ye(f,v){for(var M=f.length;M--;)if(f[M]===v)return M}function Ee(f,v,M,te){if(te?v[ye(v,te)]=M:v[v.length++]=M,f){M.ownerElement=f;var ke=f.ownerDocument;ke&&(te&&Ie(ke,f,te),Oe(ke,f,M))}}function xe(f,v,M){var te=ye(v,M);if(te>=0){for(var ke=v.length-1;te<ke;)v[te]=v[++te];if(v.length=ke,f){var qe=f.ownerDocument;qe&&(Ie(qe,f,M),M.ownerElement=null)}}else throw new de(ne,new Error(f.tagName+"@"+M))}be.prototype={length:0,item:pe.prototype.item,getNamedItem:function(f){for(var v=this.length;v--;){var M=this[v];if(M.nodeName==f)return M}},setNamedItem:function(f){var v=f.ownerElement;if(v&&v!=this._ownerElement)throw new de(ce);var M=this.getNamedItem(f.nodeName);return Ee(this._ownerElement,this,f,M),M},setNamedItemNS:function(f){var v=f.ownerElement,M;if(v&&v!=this._ownerElement)throw new de(ce);return M=this.getNamedItemNS(f.namespaceURI,f.localName),Ee(this._ownerElement,this,f,M),M},removeNamedItem:function(f){var v=this.getNamedItem(f);return xe(this._ownerElement,this,v),v},removeNamedItemNS:function(f,v){var M=this.getNamedItemNS(f,v);return xe(this._ownerElement,this,M),M},getNamedItemNS:function(f,v){for(var M=this.length;M--;){var te=this[M];if(te.localName==v&&te.namespaceURI==f)return te}return null}};function Pe(){}Pe.prototype={hasFeature:function(f,v){return!0},createDocument:function(f,v,M){var te=new Fe;if(te.implementation=this,te.childNodes=new pe,te.doctype=M||null,M&&te.appendChild(M),v){var ke=te.createElementNS(f,v);te.appendChild(ke)}return te},createDocumentType:function(f,v,M){var te=new Le;return te.name=f,te.nodeName=f,te.publicId=v||"",te.systemId=M||"",te}};function ge(){}ge.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(f,v){return l(this,f,v)},replaceChild:function(f,v){l(this,f,v,a),v&&this.removeChild(v)},removeChild:function(f){return Ue(this,f)},appendChild:function(f){return this.insertBefore(f,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(f){return vt(this.ownerDocument||this,this,f)},normalize:function(){for(var f=this.firstChild;f;){var v=f.nextSibling;v&&v.nodeType==le&&f.nodeType==le?(this.removeChild(v),f.appendData(v.data)):(f.normalize(),f=v)}},isSupported:function(f,v){return this.ownerDocument.implementation.hasFeature(f,v)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(f){for(var v=this;v;){var M=v._nsMap;if(M){for(var te in M)if(Object.prototype.hasOwnProperty.call(M,te)&&M[te]===f)return te}v=v.nodeType==J?v.ownerDocument:v.parentNode}return null},lookupNamespaceURI:function(f){for(var v=this;v;){var M=v._nsMap;if(M&&Object.prototype.hasOwnProperty.call(M,f))return M[f];v=v.nodeType==J?v.ownerDocument:v.parentNode}return null},isDefaultNamespace:function(f){var v=this.lookupPrefix(f);return v==null}};function me(f){return f=="<"&&"&lt;"||f==">"&&"&gt;"||f=="&"&&"&amp;"||f=='"'&&"&quot;"||"&#"+f.charCodeAt()+";"}V(ae,ge),V(ae,ge.prototype);function Re(f,v){if(v(f))return!0;if(f=f.firstChild)do if(Re(f,v))return!0;while(f=f.nextSibling)}function Fe(){this.ownerDocument=this}function Oe(f,v,M){f&&f._inc++;var te=M.namespaceURI;te===s.XMLNS&&(v._nsMap[M.prefix?M.localName:""]=M.value)}function Ie(f,v,M,te){f&&f._inc++;var ke=M.namespaceURI;ke===s.XMLNS&&delete v._nsMap[M.prefix?M.localName:""]}function Ne(f,v,M){if(f&&f._inc){f._inc++;var te=v.childNodes;if(M)te[te.length++]=M;else{for(var ke=v.firstChild,qe=0;ke;)te[qe++]=ke,ke=ke.nextSibling;te.length=qe,delete te[te.length]}}}function Ue(f,v){var M=v.previousSibling,te=v.nextSibling;return M?M.nextSibling=te:f.firstChild=te,te?te.previousSibling=M:f.lastChild=M,v.parentNode=null,v.previousSibling=null,v.nextSibling=null,Ne(f.ownerDocument,f),v}function He(f){return f&&(f.nodeType===ge.DOCUMENT_NODE||f.nodeType===ge.DOCUMENT_FRAGMENT_NODE||f.nodeType===ge.ELEMENT_NODE)}function Ve(f){return f&&(Ye(f)||tt(f)||ze(f)||f.nodeType===ge.DOCUMENT_FRAGMENT_NODE||f.nodeType===ge.COMMENT_NODE||f.nodeType===ge.PROCESSING_INSTRUCTION_NODE)}function ze(f){return f&&f.nodeType===ge.DOCUMENT_TYPE_NODE}function Ye(f){return f&&f.nodeType===ge.ELEMENT_NODE}function tt(f){return f&&f.nodeType===ge.TEXT_NODE}function Qe(f,v){var M=f.childNodes||[];if(d(M,Ye)||ze(v))return!1;var te=d(M,ze);return!(v&&te&&M.indexOf(te)>M.indexOf(v))}function Ae(f,v){var M=f.childNodes||[];function te(qe){return Ye(qe)&&qe!==v}if(d(M,te))return!1;var ke=d(M,ze);return!(v&&ke&&M.indexOf(ke)>M.indexOf(v))}function p(f,v,M){if(!He(f))throw new de(H,"Unexpected parent node type "+f.nodeType);if(M&&M.parentNode!==f)throw new de(ne,"child not in parent");if(!Ve(v)||ze(v)&&f.nodeType!==ge.DOCUMENT_NODE)throw new de(H,"Unexpected node type "+v.nodeType+" for parent node type "+f.nodeType)}function c(f,v,M){var te=f.childNodes||[],ke=v.childNodes||[];if(v.nodeType===ge.DOCUMENT_FRAGMENT_NODE){var qe=ke.filter(Ye);if(qe.length>1||d(ke,tt))throw new de(H,"More than one element or text in fragment");if(qe.length===1&&!Qe(f,M))throw new de(H,"Element in fragment can not be inserted before doctype")}if(Ye(v)&&!Qe(f,M))throw new de(H,"Only one element can be added and only after doctype");if(ze(v)){if(d(te,ze))throw new de(H,"Only one doctype is allowed");var Je=d(te,Ye);if(M&&te.indexOf(Je)<te.indexOf(M))throw new de(H,"Doctype can only be inserted before an element");if(!M&&Je)throw new de(H,"Doctype can not be appended since element is present")}}function a(f,v,M){var te=f.childNodes||[],ke=v.childNodes||[];if(v.nodeType===ge.DOCUMENT_FRAGMENT_NODE){var qe=ke.filter(Ye);if(qe.length>1||d(ke,tt))throw new de(H,"More than one element or text in fragment");if(qe.length===1&&!Ae(f,M))throw new de(H,"Element in fragment can not be inserted before doctype")}if(Ye(v)&&!Ae(f,M))throw new de(H,"Only one element can be added and only after doctype");if(ze(v)){if(d(te,function(dt){return ze(dt)&&dt!==M}))throw new de(H,"Only one doctype is allowed");var Je=d(te,Ye);if(M&&te.indexOf(Je)<te.indexOf(M))throw new de(H,"Doctype can only be inserted before an element")}}function l(f,v,M,te){p(f,v,M),f.nodeType===ge.DOCUMENT_NODE&&(te||c)(f,v,M);var ke=v.parentNode;if(ke&&ke.removeChild(v),v.nodeType===re){var qe=v.firstChild;if(qe==null)return v;var Je=v.lastChild}else qe=Je=v;var Se=M?M.previousSibling:f.lastChild;qe.previousSibling=Se,Je.nextSibling=M,Se?Se.nextSibling=qe:f.firstChild=qe,M==null?f.lastChild=Je:M.previousSibling=Je;do qe.parentNode=f;while(qe!==Je&&(qe=qe.nextSibling));return Ne(f.ownerDocument||f,f),v.nodeType==re&&(v.firstChild=v.lastChild=null),v}function m(f,v){return v.parentNode&&v.parentNode.removeChild(v),v.parentNode=f,v.previousSibling=f.lastChild,v.nextSibling=null,v.previousSibling?v.previousSibling.nextSibling=v:f.firstChild=v,f.lastChild=v,Ne(f.ownerDocument,f,v),v}Fe.prototype={nodeName:"#document",nodeType:ue,doctype:null,documentElement:null,_inc:1,insertBefore:function(f,v){if(f.nodeType==re){for(var M=f.firstChild;M;){var te=M.nextSibling;this.insertBefore(M,v),M=te}return f}return l(this,f,v),f.ownerDocument=this,this.documentElement===null&&f.nodeType===G&&(this.documentElement=f),f},removeChild:function(f){return this.documentElement==f&&(this.documentElement=null),Ue(this,f)},replaceChild:function(f,v){l(this,f,v,a),f.ownerDocument=this,v&&this.removeChild(v),Ye(f)&&(this.documentElement=f)},importNode:function(f,v){return mt(this,f,v)},getElementById:function(f){var v=null;return Re(this.documentElement,function(M){if(M.nodeType==G&&M.getAttribute("id")==f)return v=M,!0}),v},getElementsByClassName:function(f){var v=O(f);return new Ce(this,function(M){var te=[];return v.length>0&&Re(M.documentElement,function(ke){if(ke!==M&&ke.nodeType===G){var qe=ke.getAttribute("class");if(qe){var Je=f===qe;if(!Je){var Se=O(qe);Je=v.every(w(Se))}Je&&te.push(ke)}}}),te})},createElement:function(f){var v=new j;v.ownerDocument=this,v.nodeName=f,v.tagName=f,v.localName=f,v.childNodes=new pe;var M=v.attributes=new be;return M._ownerElement=v,v},createDocumentFragment:function(){var f=new et;return f.ownerDocument=this,f.childNodes=new pe,f},createTextNode:function(f){var v=new Be;return v.ownerDocument=this,v.appendData(f),v},createComment:function(f){var v=new Te;return v.ownerDocument=this,v.appendData(f),v},createCDATASection:function(f){var v=new fe;return v.ownerDocument=this,v.appendData(f),v},createProcessingInstruction:function(f,v){var M=new st;return M.ownerDocument=this,M.tagName=M.nodeName=M.target=f,M.nodeValue=M.data=v,M},createAttribute:function(f){var v=new K;return v.ownerDocument=this,v.name=f,v.nodeName=f,v.localName=f,v.specified=!0,v},createEntityReference:function(f){var v=new We;return v.ownerDocument=this,v.nodeName=f,v},createElementNS:function(f,v){var M=new j,te=v.split(":"),ke=M.attributes=new be;return M.childNodes=new pe,M.ownerDocument=this,M.nodeName=v,M.tagName=v,M.namespaceURI=f,te.length==2?(M.prefix=te[0],M.localName=te[1]):M.localName=v,ke._ownerElement=M,M},createAttributeNS:function(f,v){var M=new K,te=v.split(":");return M.ownerDocument=this,M.nodeName=v,M.name=v,M.namespaceURI=f,M.specified=!0,te.length==2?(M.prefix=te[0],M.localName=te[1]):M.localName=v,M}},X(Fe,ge);function j(){this._nsMap={}}j.prototype={nodeType:G,hasAttribute:function(f){return this.getAttributeNode(f)!=null},getAttribute:function(f){var v=this.getAttributeNode(f);return v&&v.value||""},getAttributeNode:function(f){return this.attributes.getNamedItem(f)},setAttribute:function(f,v){var M=this.ownerDocument.createAttribute(f);M.value=M.nodeValue=""+v,this.setAttributeNode(M)},removeAttribute:function(f){var v=this.getAttributeNode(f);v&&this.removeAttributeNode(v)},appendChild:function(f){return f.nodeType===re?this.insertBefore(f,null):m(this,f)},setAttributeNode:function(f){return this.attributes.setNamedItem(f)},setAttributeNodeNS:function(f){return this.attributes.setNamedItemNS(f)},removeAttributeNode:function(f){return this.attributes.removeNamedItem(f.nodeName)},removeAttributeNS:function(f,v){var M=this.getAttributeNodeNS(f,v);M&&this.removeAttributeNode(M)},hasAttributeNS:function(f,v){return this.getAttributeNodeNS(f,v)!=null},getAttributeNS:function(f,v){var M=this.getAttributeNodeNS(f,v);return M&&M.value||""},setAttributeNS:function(f,v,M){var te=this.ownerDocument.createAttributeNS(f,v);te.value=te.nodeValue=""+M,this.setAttributeNode(te)},getAttributeNodeNS:function(f,v){return this.attributes.getNamedItemNS(f,v)},getElementsByTagName:function(f){return new Ce(this,function(v){var M=[];return Re(v,function(te){te!==v&&te.nodeType==G&&(f==="*"||te.tagName==f)&&M.push(te)}),M})},getElementsByTagNameNS:function(f,v){return new Ce(this,function(M){var te=[];return Re(M,function(ke){ke!==M&&ke.nodeType===G&&(f==="*"||ke.namespaceURI===f)&&(v==="*"||ke.localName==v)&&te.push(ke)}),te})}},Fe.prototype.getElementsByTagName=j.prototype.getElementsByTagName,Fe.prototype.getElementsByTagNameNS=j.prototype.getElementsByTagNameNS,X(j,ge);function K(){}K.prototype.nodeType=J,X(K,ge);function he(){}he.prototype={data:"",substringData:function(f,v){return this.data.substring(f,f+v)},appendData:function(f){f=this.data+f,this.nodeValue=this.data=f,this.length=f.length},insertData:function(f,v){this.replaceData(f,0,v)},appendChild:function(f){throw new Error(se[H])},deleteData:function(f,v){this.replaceData(f,v,"")},replaceData:function(f,v,M){var te=this.data.substring(0,f),ke=this.data.substring(f+v);M=te+M+ke,this.nodeValue=this.data=M,this.length=M.length}},X(he,ge);function Be(){}Be.prototype={nodeName:"#text",nodeType:le,splitText:function(f){var v=this.data,M=v.substring(f);v=v.substring(0,f),this.data=this.nodeValue=v,this.length=v.length;var te=this.ownerDocument.createTextNode(M);return this.parentNode&&this.parentNode.insertBefore(te,this.nextSibling),te}},X(Be,he);function Te(){}Te.prototype={nodeName:"#comment",nodeType:b},X(Te,he);function fe(){}fe.prototype={nodeName:"#cdata-section",nodeType:ie},X(fe,he);function Le(){}Le.prototype.nodeType=C,X(Le,ge);function $e(){}$e.prototype.nodeType=oe,X($e,ge);function Ze(){}Ze.prototype.nodeType=Q,X(Ze,ge);function We(){}We.prototype.nodeType=De,X(We,ge);function et(){}et.prototype.nodeName="#document-fragment",et.prototype.nodeType=re,X(et,ge);function st(){}st.prototype.nodeType=x,X(st,ge);function ut(){}ut.prototype.serializeToString=function(f,v,M){return ct.call(f,v,M)},ge.prototype.toString=ct;function ct(f,v){var M=[],te=this.nodeType==9&&this.documentElement||this,ke=te.prefix,qe=te.namespaceURI;if(qe&&ke==null){var ke=te.lookupPrefix(qe);if(ke==null)var Je=[{namespace:qe,prefix:null}]}return lt(this,M,f,v,Je),M.join("")}function it(f,v,M){var te=f.prefix||"",ke=f.namespaceURI;if(!ke||te==="xml"&&ke===s.XML||ke===s.XMLNS)return!1;for(var qe=M.length;qe--;){var Je=M[qe];if(Je.prefix===te)return Je.namespace!==ke}return!0}function at(f,v,M){f.push(" ",v,'="',M.replace(/[<>&"\t\n\r]/g,me),'"')}function lt(f,v,M,te,ke){if(ke||(ke=[]),te)if(f=te(f),f){if(typeof f=="string"){v.push(f);return}}else return;switch(f.nodeType){case G:var qe=f.attributes,Je=qe.length,F=f.firstChild,Se=f.tagName;M=s.isHTML(f.namespaceURI)||M;var dt=Se;if(!M&&!f.prefix&&f.namespaceURI){for(var ht,ft=0;ft<qe.length;ft++)if(qe.item(ft).name==="xmlns"){ht=qe.item(ft).value;break}if(!ht)for(var r=ke.length-1;r>=0;r--){var y=ke[r];if(y.prefix===""&&y.namespace===f.namespaceURI){ht=y.namespace;break}}if(ht!==f.namespaceURI)for(var r=ke.length-1;r>=0;r--){var y=ke[r];if(y.namespace===f.namespaceURI){y.prefix&&(dt=y.prefix+":"+Se);break}}}v.push("<",dt);for(var u=0;u<Je;u++){var g=qe.item(u);g.prefix=="xmlns"?ke.push({prefix:g.localName,namespace:g.value}):g.nodeName=="xmlns"&&ke.push({prefix:"",namespace:g.value})}for(var u=0;u<Je;u++){var g=qe.item(u);if(it(g,M,ke)){var R=g.prefix||"",S=g.namespaceURI;at(v,R?"xmlns:"+R:"xmlns",S),ke.push({prefix:R,namespace:S})}lt(g,v,M,te,ke)}if(Se===dt&&it(f,M,ke)){var R=f.prefix||"",S=f.namespaceURI;at(v,R?"xmlns:"+R:"xmlns",S),ke.push({prefix:R,namespace:S})}if(F||M&&!/^(?:meta|link|img|br|hr|input)$/i.test(Se)){if(v.push(">"),M&&/^script$/i.test(Se))for(;F;)F.data?v.push(F.data):lt(F,v,M,te,ke.slice()),F=F.nextSibling;else for(;F;)lt(F,v,M,te,ke.slice()),F=F.nextSibling;v.push("</",dt,">")}else v.push("/>");return;case ue:case re:for(var F=f.firstChild;F;)lt(F,v,M,te,ke.slice()),F=F.nextSibling;return;case J:return at(v,f.name,f.value);case le:return v.push(f.data.replace(/[<&>]/g,me));case ie:return v.push("<![CDATA[",f.data,"]]>");case b:return v.push("<!--",f.data,"-->");case C:var Z=f.publicId,ve=f.systemId;if(v.push("<!DOCTYPE ",f.name),Z)v.push(" PUBLIC ",Z),ve&&ve!="."&&v.push(" ",ve),v.push(">");else if(ve&&ve!=".")v.push(" SYSTEM ",ve,">");else{var Ke=f.internalSubset;Ke&&v.push(" [",Ke,"]"),v.push(">")}return;case x:return v.push("<?",f.target," ",f.data,"?>");case De:return v.push("&",f.nodeName,";");default:v.push("??",f.nodeName)}}function mt(f,v,M){var te;switch(v.nodeType){case G:te=v.cloneNode(!1),te.ownerDocument=f;case re:break;case J:M=!0;break}if(te||(te=v.cloneNode(!1)),te.ownerDocument=f,te.parentNode=null,M)for(var ke=v.firstChild;ke;)te.appendChild(mt(f,ke,M)),ke=ke.nextSibling;return te}function vt(f,v,M){var te=new v.constructor;for(var ke in v)if(Object.prototype.hasOwnProperty.call(v,ke)){var qe=v[ke];typeof qe!="object"&&qe!=te[ke]&&(te[ke]=qe)}switch(v.childNodes&&(te.childNodes=new pe),te.ownerDocument=f,te.nodeType){case G:var Je=v.attributes,Se=te.attributes=new be,dt=Je.length;Se._ownerElement=te;for(var ht=0;ht<dt;ht++)te.setAttributeNode(vt(f,Je.item(ht),!0));break;case J:M=!0}if(M)for(var ft=v.firstChild;ft;)te.appendChild(vt(f,ft,M)),ft=ft.nextSibling;return te}function Ct(f,v,M){f[v]=M}try{if(Object.defineProperty){let f=function(v){switch(v.nodeType){case G:case re:var M=[];for(v=v.firstChild;v;)v.nodeType!==7&&v.nodeType!==8&&M.push(f(v)),v=v.nextSibling;return M.join("");default:return v.nodeValue}};Object.defineProperty(Ce.prototype,"length",{get:function(){return we(this),this.$$length}}),Object.defineProperty(ge.prototype,"textContent",{get:function(){return f(this)},set:function(v){switch(this.nodeType){case G:case re:for(;this.firstChild;)this.removeChild(this.firstChild);(v||String(v))&&this.appendChild(this.ownerDocument.createTextNode(v));break;default:this.data=v,this.value=v,this.nodeValue=v}}}),Ct=function(v,M,te){v["$$"+M]=te}}}catch{}i.DocumentType=Le,i.DOMException=de,i.DOMImplementation=Pe,i.Element=j,i.Node=ge,i.NodeList=pe,i.XMLSerializer=ut},"./node_modules/@xmldom/xmldom/lib/entities.js":function(e,i,n){var o=n("./node_modules/@xmldom/xmldom/lib/conventions.js").freeze;i.XML_ENTITIES=o({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),i.HTML_ENTITIES=o({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
  17. `,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}),i.entityMap=i.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":function(e,i,n){var o=n("./node_modules/@xmldom/xmldom/lib/dom.js");i.DOMImplementation=o.DOMImplementation,i.XMLSerializer=o.XMLSerializer,i.DOMParser=n("./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":function(e,i,n){var o=n("./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,d=/[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]/,s=new RegExp("[\\-\\.0-9"+d.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),h=new RegExp("^"+d.source+s.source+"*(?::"+d.source+s.source+"*)?$"),_=0,q=1,O=2,w=3,V=4,X=5,ae=6,G=7;function J(H,ne){this.message=H,this.locator=ne,Error.captureStackTrace&&Error.captureStackTrace(this,J)}J.prototype=new Error,J.prototype.name=J.name;function le(){}le.prototype={parse:function(H,ne,ce){var de=this.domBuilder;de.startDocument(),C(ne,ne={}),ie(H,ne,ce,de,this.errorHandler),de.endDocument()}};function ie(H,ne,ce,de,pe){function Ce(j){if(j>65535){j-=65536;var K=55296+(j>>10),he=56320+(j&1023);return String.fromCharCode(K,he)}else return String.fromCharCode(j)}function we(j){var K=j.slice(1,-1);return Object.hasOwnProperty.call(ce,K)?ce[K]:K.charAt(0)==="#"?Ce(parseInt(K.substr(1).replace("x","0x"))):(pe.error("entity not found:"+j),j)}function be(j){if(j>Fe){var K=H.substring(Fe,j).replace(/&#?\w+;/g,we);ge&&ye(Fe),de.characters(K,0,j-Fe),Fe=j}}function ye(j,K){for(;j>=xe&&(K=Pe.exec(H));)Ee=K.index,xe=Ee+K[0].length,ge.lineNumber++;ge.columnNumber=j-Ee+1}for(var Ee=0,xe=0,Pe=/.*(?:\r\n?|\n)|.*$/g,ge=de.locator,me=[{currentNSMap:ne}],Re={},Fe=0;;){try{var Oe=H.indexOf("<",Fe);if(Oe<0){if(!H.substr(Fe).match(/^\s*$/)){var Ie=de.doc,Ne=Ie.createTextNode(H.substr(Fe));Ie.appendChild(Ne),de.currentElement=Ne}return}switch(Oe>Fe&&be(Oe),H.charAt(Oe+1)){case"/":var p=H.indexOf(">",Oe+3),Ue=H.substring(Oe+2,p).replace(/[ \t\n\r]+$/g,""),He=me.pop();p<0?(Ue=H.substring(Oe+2).replace(/[\s<].*/,""),pe.error("end tag name: "+Ue+" is not complete:"+He.tagName),p=Oe+1+Ue.length):Ue.match(/\s</)&&(Ue=Ue.replace(/[\s<].*/,""),pe.error("end tag name: "+Ue+" maybe not complete"),p=Oe+1+Ue.length);var Ve=He.localNSMap,ze=He.tagName==Ue,Ye=ze||He.tagName&&He.tagName.toLowerCase()==Ue.toLowerCase();if(Ye){if(de.endElement(He.uri,He.localName,Ue),Ve)for(var tt in Ve)Object.prototype.hasOwnProperty.call(Ve,tt)&&de.endPrefixMapping(tt);ze||pe.fatalError("end tag name: "+Ue+" is not match the current start tagName:"+He.tagName)}else me.push(He);p++;break;case"?":ge&&ye(Oe),p=oe(H,Oe,de);break;case"!":ge&&ye(Oe),p=re(H,Oe,de,pe);break;default:ge&&ye(Oe);var Qe=new ee,Ae=me[me.length-1].currentNSMap,p=Q(H,Oe,Qe,Ae,we,pe),c=Qe.length;if(!Qe.closed&&ue(H,p,Qe.tagName,Re)&&(Qe.closed=!0,ce.nbsp||pe.warning("unclosed xml attribute")),ge&&c){for(var a=De(ge,{}),l=0;l<c;l++){var m=Qe[l];ye(m.offset),m.locator=De(ge,{})}de.locator=a,x(Qe,de,Ae)&&me.push(Qe),de.locator=ge}else x(Qe,de,Ae)&&me.push(Qe);o.isHTML(Qe.uri)&&!Qe.closed?p=b(H,p,Qe.tagName,we,de):p++}}catch(j){if(j instanceof J)throw j;pe.error("element parse error: "+j),p=-1}p>Fe?Fe=p:be(Math.max(Oe,Fe)+1)}}function De(H,ne){return ne.lineNumber=H.lineNumber,ne.columnNumber=H.columnNumber,ne}function Q(H,ne,ce,de,pe,Ce){function we(ge,me,Re){ce.attributeNames.hasOwnProperty(ge)&&Ce.fatalError("Attribute "+ge+" redefined"),ce.addValue(ge,me.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,pe),Re)}for(var be,ye,Ee=++ne,xe=_;;){var Pe=H.charAt(Ee);switch(Pe){case"=":if(xe===q)be=H.slice(ne,Ee),xe=w;else if(xe===O)xe=w;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(xe===w||xe===q)if(xe===q&&(Ce.warning('attribute value must after "="'),be=H.slice(ne,Ee)),ne=Ee+1,Ee=H.indexOf(Pe,ne),Ee>0)ye=H.slice(ne,Ee),we(be,ye,ne-1),xe=X;else throw new Error("attribute value no end '"+Pe+"' match");else if(xe==V)ye=H.slice(ne,Ee),we(be,ye,ne),Ce.warning('attribute "'+be+'" missed start quot('+Pe+")!!"),ne=Ee+1,xe=X;else throw new Error('attribute value must after "="');break;case"/":switch(xe){case _:ce.setTagName(H.slice(ne,Ee));case X:case ae:case G:xe=G,ce.closed=!0;case V:case q:break;case O:ce.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return Ce.error("unexpected end of input"),xe==_&&ce.setTagName(H.slice(ne,Ee)),Ee;case">":switch(xe){case _:ce.setTagName(H.slice(ne,Ee));case X:case ae:case G:break;case V:case q:ye=H.slice(ne,Ee),ye.slice(-1)==="/"&&(ce.closed=!0,ye=ye.slice(0,-1));case O:xe===O&&(ye=be),xe==V?(Ce.warning('attribute "'+ye+'" missed quot(")!'),we(be,ye,ne)):((!o.isHTML(de[""])||!ye.match(/^(?:disabled|checked|selected)$/i))&&Ce.warning('attribute "'+ye+'" missed value!! "'+ye+'" instead!!'),we(ye,ye,ne));break;case w:throw new Error("attribute value missed!!")}return Ee;case"\x80":Pe=" ";default:if(Pe<=" ")switch(xe){case _:ce.setTagName(H.slice(ne,Ee)),xe=ae;break;case q:be=H.slice(ne,Ee),xe=O;break;case V:var ye=H.slice(ne,Ee);Ce.warning('attribute "'+ye+'" missed quot(")!!'),we(be,ye,ne);case X:xe=ae;break}else switch(xe){case O:ce.tagName,(!o.isHTML(de[""])||!be.match(/^(?:disabled|checked|selected)$/i))&&Ce.warning('attribute "'+be+'" missed value!! "'+be+'" instead2!!'),we(be,be,ne),ne=Ee,xe=q;break;case X:Ce.warning('attribute space is required"'+be+'"!!');case ae:xe=q,ne=Ee;break;case w:xe=V,ne=Ee;break;case G:throw new Error("elements closed character '/' and '>' must be connected to")}}Ee++}}function x(H,ne,ce){for(var de=H.tagName,pe=null,Pe=H.length;Pe--;){var Ce=H[Pe],we=Ce.qName,be=Ce.value,ge=we.indexOf(":");if(ge>0)var ye=Ce.prefix=we.slice(0,ge),Ee=we.slice(ge+1),xe=ye==="xmlns"&&Ee;else Ee=we,ye=null,xe=we==="xmlns"&&"";Ce.localName=Ee,xe!==!1&&(pe==null&&(pe={},C(ce,ce={})),ce[xe]=pe[xe]=be,Ce.uri=o.XMLNS,ne.startPrefixMapping(xe,be))}for(var Pe=H.length;Pe--;){Ce=H[Pe];var ye=Ce.prefix;ye&&(ye==="xml"&&(Ce.uri=o.XML),ye!=="xmlns"&&(Ce.uri=ce[ye||""]))}var ge=de.indexOf(":");ge>0?(ye=H.prefix=de.slice(0,ge),Ee=H.localName=de.slice(ge+1)):(ye=null,Ee=H.localName=de);var me=H.uri=ce[ye||""];if(ne.startElement(me,Ee,de,H),H.closed){if(ne.endElement(me,Ee,de),pe)for(ye in pe)Object.prototype.hasOwnProperty.call(pe,ye)&&ne.endPrefixMapping(ye)}else return H.currentNSMap=ce,H.localNSMap=pe,!0}function b(H,ne,ce,de,pe){if(/^(?:script|textarea)$/i.test(ce)){var Ce=H.indexOf("</"+ce+">",ne),we=H.substring(ne+1,Ce);if(/[&<]/.test(we))return/^script$/i.test(ce)?(pe.characters(we,0,we.length),Ce):(we=we.replace(/&#?\w+;/g,de),pe.characters(we,0,we.length),Ce)}return ne+1}function ue(H,ne,ce,de){var pe=de[ce];return pe==null&&(pe=H.lastIndexOf("</"+ce+">"),pe<ne&&(pe=H.lastIndexOf("</"+ce)),de[ce]=pe),pe<ne}function C(H,ne){for(var ce in H)Object.prototype.hasOwnProperty.call(H,ce)&&(ne[ce]=H[ce])}function re(H,ne,ce,de){var pe=H.charAt(ne+2);switch(pe){case"-":if(H.charAt(ne+3)==="-"){var Ce=H.indexOf("-->",ne+4);return Ce>ne?(ce.comment(H,ne+4,Ce-ne-4),Ce+3):(de.error("Unclosed comment"),-1)}else return-1;default:if(H.substr(ne+3,6)=="CDATA["){var Ce=H.indexOf("]]>",ne+9);return ce.startCDATA(),ce.characters(H,ne+9,Ce-ne-9),ce.endCDATA(),Ce+3}var we=se(H,ne),be=we.length;if(be>1&&/!doctype/i.test(we[0][0])){var ye=we[1][0],Ee=!1,xe=!1;be>3&&(/^public$/i.test(we[2][0])?(Ee=we[3][0],xe=be>4&&we[4][0]):/^system$/i.test(we[2][0])&&(xe=we[3][0]));var Pe=we[be-1];return ce.startDTD(ye,Ee,xe),ce.endDTD(),Pe.index+Pe[0].length}}return-1}function oe(H,ne,ce){var de=H.indexOf("?>",ne);if(de){var pe=H.substring(ne,de).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return pe?(pe[0].length,ce.processingInstruction(pe[1],pe[2]),de+2):-1}return-1}function ee(){this.attributeNames={}}ee.prototype={setTagName:function(H){if(!h.test(H))throw new Error("invalid tagName:"+H);this.tagName=H},addValue:function(H,ne,ce){if(!h.test(H))throw new Error("invalid attribute:"+H);this.attributeNames[H]=this.length,this[this.length++]={qName:H,value:ne,offset:ce}},length:0,getLocalName:function(H){return this[H].localName},getLocator:function(H){return this[H].locator},getQName:function(H){return this[H].qName},getURI:function(H){return this[H].uri},getValue:function(H){return this[H].value}};function se(H,ne){var ce,de=[],pe=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(pe.lastIndex=ne,pe.exec(H);ce=pe.exec(H);)if(de.push(ce),ce[1])return de}i.XMLReader=le,i.ParseError=J},"./node_modules/process/browser.js":function(e,i){var n=e.exports={},o,d;function s(){throw new Error("setTimeout has not been defined")}function h(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?o=setTimeout:o=s}catch{o=s}try{typeof clearTimeout=="function"?d=clearTimeout:d=h}catch{d=h}})();function _(ie){if(o===setTimeout)return setTimeout(ie,0);if((o===s||!o)&&setTimeout)return o=setTimeout,setTimeout(ie,0);try{return o(ie,0)}catch{try{return o.call(null,ie,0)}catch{return o.call(this,ie,0)}}}function q(ie){if(d===clearTimeout)return clearTimeout(ie);if((d===h||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(ie);try{return d(ie)}catch{try{return d.call(null,ie)}catch{return d.call(this,ie)}}}var O=[],w=!1,V,X=-1;function ae(){!w||!V||(w=!1,V.length?O=V.concat(O):X=-1,O.length&&G())}function G(){if(!w){var ie=_(ae);w=!0;for(var De=O.length;De;){for(V=O,O=[];++X<De;)V&&V[X].run();X=-1,De=O.length}V=null,w=!1,q(ie)}}n.nextTick=function(ie){var De=new Array(arguments.length-1);if(arguments.length>1)for(var Q=1;Q<arguments.length;Q++)De[Q-1]=arguments[Q];O.push(new J(ie,De)),O.length===1&&!w&&_(G)};function J(ie,De){this.fun=ie,this.array=De}J.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={};function le(){}n.on=le,n.addListener=le,n.once=le,n.off=le,n.removeListener=le,n.removeAllListeners=le,n.emit=le,n.prependListener=le,n.prependOnceListener=le,n.listeners=function(ie){return[]},n.binding=function(ie){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(ie){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},"./node_modules/webpack/buildin/amd-options.js":function(e,i){(function(n){e.exports=n}).call(this,{})},"./node_modules/webpack/buildin/global.js":function(e,i){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch{typeof window=="object"&&(n=window)}e.exports=n},"./node_modules/webpack/buildin/module.js":function(e,i){e.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},"./package.json":function(e){e.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.4.21","description":"JavaScript SDK for [\u817E\u8BAF\u4E91\u5BF9\u8C61\u5B58\u50A8](https://cloud.tencent.com/product/cos)","main":"dist/cos-js-sdk-v5.js","types":"index.d.ts","scripts":{"prettier":"prettier --write src demo/demo.js test/test.js server/sts.js index.d.ts","server":"node server/sts.js","dev":"cross-env NODE_ENV=development webpack -w --mode=development","build":"cross-env NODE_ENV=production webpack --mode=production","cos-auth.min.js":"uglifyjs ./demo/common/cos-auth.js -o ./demo/common/cos-auth.min.js -c -m","test":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/tencentyun/cos-js-sdk-v5.git"},"keywords":[],"author":"carsonxu","license":"ISC","bugs":{"url":"https://github.com/tencentyun/cos-js-sdk-v5/issues"},"homepage":"https://github.com/tencentyun/cos-js-sdk-v5#readme","dependencies":{"@xmldom/xmldom":"^0.8.6"},"devDependencies":{"@babel/core":"7.17.9","@babel/plugin-transform-runtime":"7.18.10","@babel/preset-env":"7.16.11","babel-loader":"8.2.5","body-parser":"^1.18.3","cross-env":"^5.2.0","express":"^4.16.4","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","prettier":"^3.0.1","qcloud-cos-sts":"^3.0.2","request":"^2.87.0","terser-webpack-plugin":"4.2.3","uglifyjs":"^2.4.11","webpack":"4.46.0","webpack-cli":"4.10.0"}}')},"./src/advance.js":function(e,i,n){var o=n("./node_modules/@babel/runtime/helpers/typeof.js"),d=n("./src/session.js"),s=n("./src/async.js"),h=n("./src/event.js").EventProxy,_=n("./src/util.js"),q=n("./src/tracker.js");function O(C,re){var oe=this,ee=new h,se=C.TaskId,H=C.Bucket,ne=C.Region,ce=C.Key,de=C.Body,pe=C.ChunkSize||C.SliceSize||oe.options.ChunkSize,Ce=C.AsyncLimit,we=C.StorageClass,be=C.ServerSideEncryption,ye,Ee,xe=C.onHashProgress,Pe=C.tracker;Pe&&Pe.setParams({chunkSize:pe}),ee.on("error",function(ge){if(!!oe._isRunningTask(se))return ge.UploadId=C.UploadData.UploadId||"",re(ge)}),ee.on("upload_complete",function(ge){var me=_.extend({UploadId:C.UploadData.UploadId||""},ge);re(null,me)}),ee.on("upload_slice_complete",function(ge){var me={};_.each(C.Headers,function(Re,Fe){var Oe=Fe.toLowerCase();(Oe.indexOf("x-cos-meta-")===0||Oe==="pic-operations")&&(me[Fe]=Re)}),J.call(oe,{Bucket:H,Region:ne,Key:ce,UploadId:ge.UploadId,SliceList:ge.SliceList,Headers:me,tracker:Pe},function(Re,Fe){if(!!oe._isRunningTask(se)){if(d.removeUsing(ge.UploadId),Re)return Ee(null,!0),ee.emit("error",Re);d.removeUploadId.call(oe,ge.UploadId),Ee({loaded:ye,total:ye},!0),ee.emit("upload_complete",Fe)}})}),ee.on("get_upload_data_finish",function(ge){var me=d.getFileId(de,C.ChunkSize,H,ce);me&&d.saveUploadId.call(oe,me,ge.UploadId,oe.options.UploadIdCacheLimit),d.setUsing(ge.UploadId),Ee(null,!0),ae.call(oe,{TaskId:se,Bucket:H,Region:ne,Key:ce,Body:de,FileSize:ye,SliceSize:pe,AsyncLimit:Ce,ServerSideEncryption:be,UploadData:ge,Headers:C.Headers,onProgress:Ee,tracker:Pe},function(Re,Fe){if(!!oe._isRunningTask(se)){if(Re)return Ee(null,!0),ee.emit("error",Re);ee.emit("upload_slice_complete",Fe)}})}),ee.on("get_file_size_finish",function(){if(Ee=_.throttleOnProgress.call(oe,ye,C.onProgress),C.UploadData.UploadId)ee.emit("get_upload_data_finish",C.UploadData);else{var ge=_.extend({TaskId:se,Bucket:H,Region:ne,Key:ce,Headers:C.Headers,StorageClass:we,Body:de,FileSize:ye,SliceSize:pe,onHashProgress:xe,tracker:Pe},C);w.call(oe,ge,function(me,Re){if(!!oe._isRunningTask(se)){if(me)return ee.emit("error",me);C.UploadData.UploadId=Re.UploadId,C.UploadData.PartList=Re.PartList,ee.emit("get_upload_data_finish",C.UploadData)}})}}),ye=C.ContentLength,delete C.ContentLength,!C.Headers&&(C.Headers={}),_.each(C.Headers,function(ge,me){me.toLowerCase()==="content-length"&&delete C.Headers[me]}),function(){for(var ge=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],me=1024*1024,Re=0;Re<ge.length&&(me=ge[Re]*1024*1024,!(ye/me<=oe.options.MaxPartNumber));Re++);C.ChunkSize=C.SliceSize=pe=Math.max(pe,me)}(),ye===0?(C.Body="",C.ContentLength=0,C.SkipTask=!0,oe.putObject(C,re)):ee.emit("get_file_size_finish")}function w(C,re){var oe=C.TaskId,ee=C.Bucket,se=C.Region,H=C.Key,ne=C.StorageClass,ce=this,de={},pe=C.FileSize,Ce=C.SliceSize,we=Math.ceil(pe/Ce),be=0,ye=_.throttleOnProgress.call(ce,pe,C.onHashProgress),Ee=function(me,Re){var Fe=Ce*(me-1),Oe=Math.min(Fe+Ce,pe),Ie=Oe-Fe;de[me]?Re(null,{PartNumber:me,ETag:de[me],Size:Ie}):_.fileSlice(C.Body,Fe,Oe,!1,function(Ne){_.getFileMd5(Ne,function(Ue,He){if(Ue)return Re(_.error(Ue));var Ve='"'+He+'"';de[me]=Ve,be+=Ie,ye({loaded:be,total:pe}),Re(null,{PartNumber:me,ETag:Ve,Size:Ie})})})},xe=function(me,Re){var Fe=me.length;if(Fe===0)return Re(null,!0);if(Fe>we)return Re(null,!1);if(Fe>1){var Oe=Math.max(me[0].Size,me[1].Size);if(Oe!==Ce)return Re(null,!1)}var Ie=function Ne(Ue){if(Ue<Fe){var He=me[Ue];Ee(He.PartNumber,function(Ve,ze){ze&&ze.ETag===He.ETag&&ze.Size===He.Size?Ne(Ue+1):Re(null,!1)})}else Re(null,!0)};Ie(0)},Pe=new h;Pe.on("error",function(ge){if(!!ce._isRunningTask(oe))return re(ge)}),Pe.on("upload_id_available",function(ge){var me={},Re=[];_.each(ge.PartList,function(Ie){me[Ie.PartNumber]=Ie});for(var Fe=1;Fe<=we;Fe++){var Oe=me[Fe];Oe?(Oe.PartNumber=Fe,Oe.Uploaded=!0):Oe={PartNumber:Fe,ETag:null,Uploaded:!1},Re.push(Oe)}ge.PartList=Re,re(null,ge)}),Pe.on("no_available_upload_id",function(){if(!!ce._isRunningTask(oe)){var ge=_.extend({Bucket:ee,Region:se,Key:H,Query:_.clone(C.Query),StorageClass:ne,Body:C.Body,calledBySdk:"sliceUploadFile",tracker:C.tracker},C),me=_.clone(C.Headers);delete me["x-cos-mime-limit"],ge.Headers=me,ce.multipartInit(ge,function(Re,Fe){if(!!ce._isRunningTask(oe)){if(Re)return Pe.emit("error",Re);var Oe=Fe.UploadId;if(!Oe)return re(_.error(new Error("no such upload id")));Pe.emit("upload_id_available",{UploadId:Oe,PartList:[]})}})}}),Pe.on("has_and_check_upload_id",function(ge){ge=ge.reverse(),s.eachLimit(ge,1,function(me,Re){if(!!ce._isRunningTask(oe)){if(d.using[me]){Re();return}X.call(ce,{Bucket:ee,Region:se,Key:H,UploadId:me,tracker:C.tracker},function(Fe,Oe){if(!!ce._isRunningTask(oe)){if(Fe)return d.removeUsing(me),Pe.emit("error",Fe);var Ie=Oe.PartList;Ie.forEach(function(Ne){Ne.PartNumber*=1,Ne.Size*=1,Ne.ETag=Ne.ETag||""}),xe(Ie,function(Ne,Ue){if(!!ce._isRunningTask(oe)){if(Ne)return Pe.emit("error",Ne);Ue?Re({UploadId:me,PartList:Ie}):Re()}})}})}},function(me){!ce._isRunningTask(oe)||(ye(null,!0),me&&me.UploadId?Pe.emit("upload_id_available",me):Pe.emit("no_available_upload_id"))})}),Pe.on("seek_local_avail_upload_id",function(ge){var me=d.getFileId(C.Body,C.ChunkSize,ee,H),Re=d.getUploadIdList.call(ce,me);if(!me||!Re){Pe.emit("has_and_check_upload_id",ge);return}var Fe=function Oe(Ie){if(Ie>=Re.length){Pe.emit("has_and_check_upload_id",ge);return}var Ne=Re[Ie];if(!_.isInArray(ge,Ne)){d.removeUploadId.call(ce,Ne),Oe(Ie+1);return}if(d.using[Ne]){Oe(Ie+1);return}X.call(ce,{Bucket:ee,Region:se,Key:H,UploadId:Ne,tracker:C.tracker},function(Ue,He){!ce._isRunningTask(oe)||(Ue?(d.removeUploadId.call(ce,Ne),Oe(Ie+1)):Pe.emit("upload_id_available",{UploadId:Ne,PartList:He.PartList}))})};Fe(0)}),Pe.on("get_remote_upload_id_list",function(){V.call(ce,{Bucket:ee,Region:se,Key:H,tracker:C.tracker},function(ge,me){if(!!ce._isRunningTask(oe)){if(ge)return Pe.emit("error",ge);var Re=_.filter(me.UploadList,function(Ie){return Ie.Key===H&&(!ne||Ie.StorageClass.toUpperCase()===ne.toUpperCase())}).reverse().map(function(Ie){return Ie.UploadId||Ie.UploadID});if(Re.length)Pe.emit("seek_local_avail_upload_id",Re);else{var Fe=d.getFileId(C.Body,C.ChunkSize,ee,H),Oe;Fe&&(Oe=d.getUploadIdList.call(ce,Fe))&&_.each(Oe,function(Ie){d.removeUploadId.call(ce,Ie)}),Pe.emit("no_available_upload_id")}}})}),Pe.emit("get_remote_upload_id_list")}function V(C,re){var oe=this,ee=[],se={Bucket:C.Bucket,Region:C.Region,Prefix:C.Key,calledBySdk:C.calledBySdk||"sliceUploadFile",tracker:C.tracker},H=function ne(){oe.multipartList(se,function(ce,de){if(ce)return re(ce);ee.push.apply(ee,de.Upload||[]),de.IsTruncated==="true"?(se.KeyMarker=de.NextKeyMarker,se.UploadIdMarker=de.NextUploadIdMarker,ne()):re(null,{UploadList:ee})})};H()}function X(C,re){var oe=this,ee=[],se={Bucket:C.Bucket,Region:C.Region,Key:C.Key,UploadId:C.UploadId,calledBySdk:"sliceUploadFile",tracker:C.tracker},H=function ne(){oe.multipartListPart(se,function(ce,de){if(ce)return re(ce);ee.push.apply(ee,de.Part||[]),de.IsTruncated==="true"?(se.PartNumberMarker=de.NextPartNumberMarker,ne()):re(null,{PartList:ee})})};H()}function ae(C,re){var oe=this,ee=C.TaskId,se=C.Bucket,H=C.Region,ne=C.Key,ce=C.UploadData,de=C.FileSize,pe=C.SliceSize,Ce=Math.min(C.AsyncLimit||oe.options.ChunkParallelLimit||1,256),we=C.Body,be=Math.ceil(de/pe),ye=0,Ee=C.ServerSideEncryption,xe=C.Headers,Pe=_.filter(ce.PartList,function(me){return me.Uploaded&&(ye+=me.PartNumber>=be&&de%pe||pe),!me.Uploaded}),ge=C.onProgress;s.eachLimit(Pe,Ce,function(me,Re){if(!!oe._isRunningTask(ee)){var Fe=me.PartNumber,Oe=Math.min(de,me.PartNumber*pe)-(me.PartNumber-1)*pe,Ie=0;G.call(oe,{TaskId:ee,Bucket:se,Region:H,Key:ne,SliceSize:pe,FileSize:de,PartNumber:Fe,ServerSideEncryption:Ee,Body:we,UploadData:ce,Headers:xe,onProgress:function(Ue){ye+=Ue.loaded-Ie,Ie=Ue.loaded,ge({loaded:ye,total:de})},tracker:C.tracker},function(Ne,Ue){!oe._isRunningTask(ee)||(!Ne&&!Ue.ETag&&(Ne='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 )'),Ne?ye-=Ie:(ye+=Oe-Ie,me.ETag=Ue.ETag),ge({loaded:ye,total:de}),Re(Ne||null,Ue))})}},function(me){if(!!oe._isRunningTask(ee)){if(me)return re(me);re(null,{UploadId:ce.UploadId,SliceList:ce.PartList})}})}function G(C,re){var oe=this,ee=C.TaskId,se=C.Bucket,H=C.Region,ne=C.Key,ce=C.FileSize,de=C.Body,pe=C.PartNumber*1,Ce=C.SliceSize,we=C.ServerSideEncryption,be=C.UploadData,ye=C.Headers||{},Ee=oe.options.ChunkRetryTimes+1,xe=Ce*(pe-1),Pe=Ce,ge=xe+Ce;ge>ce&&(ge=ce,Pe=ge-xe);var me=["x-cos-traffic-limit","x-cos-mime-limit"],Re={};_.each(ye,function(Oe,Ie){me.indexOf(Ie)>-1&&(Re[Ie]=Oe)});var Fe=be.PartList[pe-1];s.retry(Ee,function(Oe){!oe._isRunningTask(ee)||_.fileSlice(de,xe,ge,!0,function(Ie){oe.multipartUpload({TaskId:ee,Bucket:se,Region:H,Key:ne,ContentLength:Pe,PartNumber:pe,UploadId:be.UploadId,ServerSideEncryption:we,Body:Ie,Headers:Re,onProgress:C.onProgress,calledBySdk:"sliceUploadFile",tracker:C.tracker},function(Ne,Ue){if(!!oe._isRunningTask(ee))return Ne?Oe(Ne):(Fe.Uploaded=!0,Oe(null,Ue))})})},function(Oe,Ie){if(!!oe._isRunningTask(ee))return re(Oe,Ie)})}function J(C,re){var oe=C.Bucket,ee=C.Region,se=C.Key,H=C.UploadId,ne=C.SliceList,ce=this,de=this.options.ChunkRetryTimes+1,pe=C.Headers,Ce=ne.map(function(we){return{PartNumber:we.PartNumber,ETag:we.ETag}});s.retry(de,function(we){ce.multipartComplete({Bucket:oe,Region:ee,Key:se,UploadId:H,Parts:Ce,Headers:pe,calledBySdk:"sliceUploadFile",tracker:C.tracker},we)},function(we,be){re(we,be)})}function le(C,re){var oe=C.Bucket,ee=C.Region,se=C.Key,H=C.UploadId,ne=C.Level||"task",ce=C.AsyncLimit,de=this,pe=new h;if(pe.on("error",function(Ce){return re(Ce)}),pe.on("get_abort_array",function(Ce){ie.call(de,{Bucket:oe,Region:ee,Key:se,Headers:C.Headers,AsyncLimit:ce,AbortArray:Ce},re)}),ne==="bucket")V.call(de,{Bucket:oe,Region:ee,calledBySdk:"abortUploadTask"},function(Ce,we){if(Ce)return re(Ce);pe.emit("get_abort_array",we.UploadList||[])});else if(ne==="file"){if(!se)return re(_.error(new Error("abort_upload_task_no_key")));V.call(de,{Bucket:oe,Region:ee,Key:se,calledBySdk:"abortUploadTask"},function(Ce,we){if(Ce)return re(Ce);pe.emit("get_abort_array",we.UploadList||[])})}else if(ne==="task"){if(!H)return re(_.error(new Error("abort_upload_task_no_id")));if(!se)return re(_.error(new Error("abort_upload_task_no_key")));pe.emit("get_abort_array",[{Key:se,UploadId:H}])}else return re(_.error(new Error("abort_unknown_level")))}function ie(C,re){var oe=C.Bucket,ee=C.Region,se=C.Key,H=C.AbortArray,ne=C.AsyncLimit||1,ce=this,de=0,pe=new Array(H.length);s.eachLimit(H,ne,function(Ce,we){var be=de;if(se&&se!==Ce.Key){pe[be]={error:{KeyNotMatch:!0}},we(null);return}var ye=Ce.UploadId||Ce.UploadID;ce.multipartAbort({Bucket:oe,Region:ee,Key:Ce.Key,Headers:C.Headers,UploadId:ye},function(Ee){var xe={Bucket:oe,Region:ee,Key:Ce.Key,UploadId:ye};pe[be]={error:Ee,task:xe},we(null)}),de++},function(Ce){if(Ce)return re(Ce);for(var we=[],be=[],ye=0,Ee=pe.length;ye<Ee;ye++){var xe=pe[ye];xe.task&&(xe.error?be.push(xe.task):we.push(xe.task))}return re(null,{successList:we,errorList:be})})}function De(C,re){var oe=this,ee=C.SliceSize===void 0?oe.options.SliceSize:C.SliceSize,se=[],H=C.Body,ne=H.size||H.length||0,ce={TaskId:""};if(oe.options.EnableTracker){var de=oe.options.UseAccelerate||typeof oe.options.Domain=="string"&&oe.options.Domain.includes("accelerate.");C.tracker=new q({bucket:C.Bucket,region:C.Region,apiName:"uploadFile",fileKey:C.Key,fileSize:ne,accelerate:de,deepTracker:oe.options.DeepTracker,customId:oe.options.CustomId,delay:oe.options.TrackerDelay})}_.each(C,function(Ee,xe){o(Ee)!=="object"&&typeof Ee!="function"&&(ce[xe]=Ee)});var pe=C.onTaskReady,Ce=function(xe){ce.TaskId=xe,pe&&pe(xe)};C.onTaskReady=Ce;var we=ne>ee?"sliceUploadFile":"putObject",be=C.onFileFinish,ye=function(xe,Pe){C.tracker&&C.tracker.formatResult(xe,Pe),be&&be(xe,Pe,ce),re&&re(xe,Pe)};se.push({api:we,params:C,callback:ye}),oe._addTasks(se)}function Q(C,re){var oe=this,ee=C.SliceSize===void 0?oe.options.SliceSize:C.SliceSize,se=0,H=0,ne=_.throttleOnProgress.call(oe,H,C.onProgress),ce=C.files.length,de=C.onFileFinish,pe=Array(ce),Ce=function(ye,Ee,xe){ne(null,!0),de&&de(ye,Ee,xe),pe[xe.Index]={options:xe,error:ye,data:Ee},--ce<=0&&re&&re(null,{files:pe})},we=[];_.each(C.files,function(be,ye){(function(){var Ee=be.Body,xe=Ee.size||Ee.length||0,Pe={Index:ye,TaskId:""};if(!oe.options.UseRawKey&&be.Key&&be.Key.substr(0,1)==="/"&&(be.Key=be.Key.substr(1)),se+=xe,oe.options.EnableTracker){var ge=oe.options.UseAccelerate||typeof oe.options.Domain=="string"&&oe.options.Domain.includes("accelerate.");be.tracker=new q({bucket:be.Bucket,region:be.Region,apiName:"uploadFiles",fileKey:be.Key,fileSize:xe,accelerate:ge,deepTracker:oe.options.DeepTracker,customId:oe.options.CustomId,delay:oe.options.TrackerDelay})}_.each(be,function(Ve,ze){o(Ve)!=="object"&&typeof Ve!="function"&&(Pe[ze]=Ve)});var me=be.onTaskReady,Re=function(ze){Pe.TaskId=ze,me&&me(ze)};be.onTaskReady=Re;var Fe=0,Oe=be.onProgress,Ie=function(ze){H=H-Fe+ze.loaded,Fe=ze.loaded,Oe&&Oe(ze),ne({loaded:H,total:se})};be.onProgress=Ie;var Ne=xe>ee?"sliceUploadFile":"putObject",Ue=be.onFileFinish,He=function(ze,Ye){be.tracker&&be.tracker.formatResult(ze,Ye),Ue&&Ue(ze,Ye),Ce&&Ce(ze,Ye,Pe)};we.push({api:Ne,params:be,callback:He})})()}),oe._addTasks(we)}function x(C,re){var oe=new h,ee=this,se=C.Bucket,H=C.Region,ne=C.Key,ce=C.CopySource,de=_.getSourceParams.call(this,ce);if(!de){re(_.error(new Error("CopySource format error")));return}var pe=de.Bucket,Ce=de.Region,we=decodeURIComponent(de.Key),be=C.CopySliceSize===void 0?ee.options.CopySliceSize:C.CopySliceSize;be=Math.max(0,be);var ye=C.CopyChunkSize||this.options.CopyChunkSize,Ee=this.options.CopyChunkParallelLimit,xe=this.options.ChunkRetryTimes+1,Pe=0,ge=0,me,Re,Fe={},Oe={},Ie={};oe.on("copy_slice_complete",function(Ne){_.each(C.Headers,function(He,Ve){Ve.toLowerCase().indexOf("x-cos-meta-")});var Ue=_.map(Ne.PartList,function(He){return{PartNumber:He.PartNumber,ETag:He.ETag}});s.retry(xe,function(He){ee.multipartComplete({Bucket:se,Region:H,Key:ne,UploadId:Ne.UploadId,Parts:Ue,calledBySdk:"sliceCopyFile"},He)},function(He,Ve){if(d.removeUsing(Ne.UploadId),He)return Re(null,!0),re(He);d.removeUploadId(Ne.UploadId),Re({loaded:me,total:me},!0),re(null,Ve)})}),oe.on("get_copy_data_finish",function(Ne){var Ue=d.getCopyFileId(ce,Fe,ye,se,ne);Ue&&d.saveUploadId(Ue,Ne.UploadId,ee.options.UploadIdCacheLimit),d.setUsing(Ne.UploadId);var He=_.filter(Ne.PartList,function(Ve){return Ve.Uploaded&&(ge+=Ve.PartNumber>=Pe&&me%ye||ye),!Ve.Uploaded});s.eachLimit(He,Ee,function(Ve,ze){var Ye=Ve.PartNumber,tt=Ve.CopySourceRange,Qe=Ve.end-Ve.start;s.retry(xe,function(Ae){b.call(ee,{Bucket:se,Region:H,Key:ne,CopySource:ce,UploadId:Ne.UploadId,PartNumber:Ye,CopySourceRange:tt},Ae)},function(Ae,p){if(Ae)return ze(Ae);ge+=Qe,Re({loaded:ge,total:me}),Ve.ETag=p.ETag,ze(Ae||null,p)})},function(Ve){if(Ve)return d.removeUsing(Ne.UploadId),Re(null,!0),re(Ve);oe.emit("copy_slice_complete",Ne)})}),oe.on("get_chunk_size_finish",function(){var Ne=function(){ee.multipartInit({Bucket:se,Region:H,Key:ne,Headers:Ie},function(Ye,tt){if(Ye)return re(Ye);C.UploadId=tt.UploadId,oe.emit("get_copy_data_finish",{UploadId:C.UploadId,PartList:C.PartList})})},Ue=d.getCopyFileId(ce,Fe,ye,se,ne),He=d.getUploadIdList(Ue);if(!Ue||!He)return Ne();var Ve=function ze(Ye){if(Ye>=He.length)return Ne();var tt=He[Ye];if(d.using[tt])return ze(Ye+1);X.call(ee,{Bucket:se,Region:H,Key:ne,UploadId:tt},function(Qe,Ae){if(Qe)d.removeUploadId(tt),ze(Ye+1);else{if(d.using[tt])return ze(Ye+1);var p={},c=0;_.each(Ae.PartList,function(a){var l=parseInt(a.Size),m=c+l-1;p[a.PartNumber+"|"+c+"|"+m]=a.ETag,c+=l}),_.each(C.PartList,function(a){var l=p[a.PartNumber+"|"+a.start+"|"+a.end];l&&(a.ETag=l,a.Uploaded=!0)}),oe.emit("get_copy_data_finish",{UploadId:tt,PartList:C.PartList})}})};Ve(0)}),oe.on("get_file_size_finish",function(){if(function(){for(var Ue=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],He=1024*1024,Ve=0;Ve<Ue.length&&(He=Ue[Ve]*1024*1024,!(me/He<=ee.options.MaxPartNumber));Ve++);C.ChunkSize=ye=Math.max(ye,He),Pe=Math.ceil(me/ye);for(var ze=[],Ye=1;Ye<=Pe;Ye++){var tt=(Ye-1)*ye,Qe=Ye*ye<me?Ye*ye-1:me-1,Ae={PartNumber:Ye,start:tt,end:Qe,CopySourceRange:"bytes="+tt+"-"+Qe};ze.push(Ae)}C.PartList=ze}(),C.Headers["x-cos-metadata-directive"]==="Replaced"?Ie=C.Headers:Ie=Oe,Ie["x-cos-storage-class"]=C.Headers["x-cos-storage-class"]||Oe["x-cos-storage-class"],Ie=_.clearKey(Ie),Oe["x-cos-storage-class"]==="ARCHIVE"||Oe["x-cos-storage-class"]==="DEEP_ARCHIVE"){var Ne=Oe["x-cos-restore"];if(!Ne||Ne==='ongoing-request="true"'){re(_.error(new Error("Unrestored archive object is not allowed to be copied")));return}}delete Ie["x-cos-copy-source"],delete Ie["x-cos-metadata-directive"],delete Ie["x-cos-copy-source-If-Modified-Since"],delete Ie["x-cos-copy-source-If-Unmodified-Since"],delete Ie["x-cos-copy-source-If-Match"],delete Ie["x-cos-copy-source-If-None-Match"],oe.emit("get_chunk_size_finish")}),ee.headObject({Bucket:pe,Region:Ce,Key:we},function(Ne,Ue){if(Ne){Ne.statusCode&&Ne.statusCode===404?re(_.error(Ne,{ErrorStatus:we+" Not Exist"})):re(Ne);return}if(me=C.FileSize=Ue.headers["content-length"],me===void 0||!me){re(_.error(new Error('get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.\uFF08 \u83B7\u53D6Content-Length\u5931\u8D25\uFF0C\u8BF7\u5728CORS ExposeHeader\u8BBE\u7F6E\u4E2D\u6DFB\u52A0Content-Length\uFF0C\u8BF7\u53C2\u8003\u6587\u6863\uFF1Ahttps://cloud.tencent.com/document/product/436/13318 \uFF09')));return}if(Re=_.throttleOnProgress.call(ee,me,C.onProgress),me<=be)C.Headers["x-cos-metadata-directive"]||(C.Headers["x-cos-metadata-directive"]="Copy"),ee.putObjectCopy(C,function(Ve,ze){if(Ve)return Re(null,!0),re(Ve);Re({loaded:me,total:me},!0),re(Ve,ze)});else{var He=Ue.headers;Fe=He,Oe={"Cache-Control":He["cache-control"],"Content-Disposition":He["content-disposition"],"Content-Encoding":He["content-encoding"],"Content-Type":He["content-type"],Expires:He.expires,"x-cos-storage-class":He["x-cos-storage-class"]},_.each(He,function(Ve,ze){var Ye="x-cos-meta-";ze.indexOf(Ye)===0&&ze.length>Ye.length&&(Oe[ze]=Ve)}),oe.emit("get_file_size_finish")}})}function b(C,re){var oe=C.TaskId,ee=C.Bucket,se=C.Region,H=C.Key,ne=C.CopySource,ce=C.UploadId,de=C.PartNumber*1,pe=C.CopySourceRange,Ce=this.options.ChunkRetryTimes+1,we=this;s.retry(Ce,function(be){we.uploadPartCopy({TaskId:oe,Bucket:ee,Region:se,Key:H,CopySource:ne,UploadId:ce,PartNumber:de,CopySourceRange:pe},function(ye,Ee){be(ye||null,Ee)})},function(be,ye){return re(be,ye)})}var ue={sliceUploadFile:O,abortUploadTask:le,uploadFile:De,uploadFiles:Q,sliceCopyFile:x};e.exports.init=function(C,re){re.transferToTaskMethod(ue,"sliceUploadFile"),_.each(ue,function(oe,ee){C.prototype[ee]=_.apiWrapper(ee,oe)})}},"./src/async.js":function(e,i){var n=function(h,_,q,O){if(O=O||function(){},!h.length||_<=0)return O();var w=0,V=0,X=0;(function ae(){if(w>=h.length)return O();for(;X<_&&V<h.length;)V+=1,X+=1,q(h[V-1],function(G){G?(O(G),O=function(){}):(w+=1,X-=1,w>=h.length?O():ae())})})()},o=function(h,_,q){var O=function w(V){_(function(X,ae){X&&V<h?w(V+1):q(X,ae)})};h<1?q():O(1)},d={eachLimit:n,retry:o};e.exports=d},"./src/base.js":function(e,i,n){var o=n("./node_modules/@babel/runtime/helpers/typeof.js"),d=n("./lib/request.js"),s=n("./src/util.js");function h(r,y){typeof r=="function"&&(y=r,r={});var u=this.options.Protocol||(s.isBrowser&&(typeof location=="undefined"?"undefined":o(location))==="object"&&location.protocol==="http:"?"http:":"https:"),g=this.options.ServiceDomain,R=r.AppId||this.options.appId,S=r.Region;g?(g=g.replace(/\{\{AppId\}\}/gi,R||"").replace(/\{\{Region\}\}/gi,S||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(g)||(g=u+"//"+g),g.slice(-1)==="/"&&(g=g.slice(0,-1))):S?g=u+"//cos."+S+".myqcloud.com":g=u+"//service.cos.myqcloud.com";var F="",Z=S?"cos."+S+".myqcloud.com":"service.cos.myqcloud.com",ve=g.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");Z===ve&&(F=Z),Se.call(this,{Action:"name/cos:GetService",url:g,method:"GET",headers:r.Headers,SignHost:F},function(Ke,Me){if(Ke)return y(Ke);var _e=Me&&Me.ListAllMyBucketsResult&&Me.ListAllMyBucketsResult.Buckets&&Me.ListAllMyBucketsResult.Buckets.Bucket||[];_e=s.isArray(_e)?_e:[_e];var je=Me&&Me.ListAllMyBucketsResult&&Me.ListAllMyBucketsResult.Owner||{};y(null,{Buckets:_e,Owner:je,statusCode:Me.statusCode,headers:Me.headers})})}function _(r,y){var u=this,g="";if(r.BucketAZConfig){var R={BucketAZConfig:r.BucketAZConfig};g=s.json2xml({CreateBucketConfiguration:R})}Se.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,body:g},function(S,F){if(S)return y(S);var Z=te({protocol:u.options.Protocol,domain:u.options.Domain,bucket:r.Bucket,region:r.Region,isLocation:!0});y(null,{Location:Z,statusCode:F.statusCode,headers:F.headers})})}function q(r,y){Se.call(this,{Action:"name/cos:HeadBucket",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,method:"HEAD"},y)}function O(r,y){var u={};u.prefix=r.Prefix||"",u.delimiter=r.Delimiter,u.marker=r.Marker,u["max-keys"]=r.MaxKeys,u["encoding-type"]=r.EncodingType,Se.call(this,{Action:"name/cos:GetBucket",ResourceKey:u.prefix,method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,qs:u},function(g,R){if(g)return y(g);var S=R.ListBucketResult||{},F=S.Contents||[],Z=S.CommonPrefixes||[];F=s.isArray(F)?F:[F],Z=s.isArray(Z)?Z:[Z];var ve=s.clone(S);s.extend(ve,{Contents:F,CommonPrefixes:Z,statusCode:R.statusCode,headers:R.headers}),y(null,ve)})}function w(r,y){Se.call(this,{Action:"name/cos:DeleteBucket",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,method:"DELETE"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function V(r,y){var u=r.Headers,g="";if(r.AccessControlPolicy){var R=s.clone(r.AccessControlPolicy||{}),S=R.Grants||R.Grant;S=s.isArray(S)?S:[S],delete R.Grant,delete R.Grants,R.AccessControlList={Grant:S},g=s.json2xml({AccessControlPolicy:R}),u["Content-Type"]="application/xml",u["Content-MD5"]=s.b64(s.md5(g))}s.each(u,function(F,Z){Z.indexOf("x-cos-grant-")===0&&(u[Z]=M(u[Z]))}),Se.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:r.Bucket,Region:r.Region,headers:u,action:"acl",body:g},function(F,Z){if(F)return y(F);y(null,{statusCode:Z.statusCode,headers:Z.headers})})}function X(r,y){Se.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"acl"},function(u,g){if(u)return y(u);var R=g.AccessControlPolicy||{},S=R.Owner||{},F=R.AccessControlList.Grant||[];F=s.isArray(F)?F:[F];var Z=v(R);g.headers&&g.headers["x-cos-acl"]&&(Z.ACL=g.headers["x-cos-acl"]),Z=s.extend(Z,{Owner:S,Grants:F,statusCode:g.statusCode,headers:g.headers}),y(null,Z)})}function ae(r,y){var u=r.CORSConfiguration||{},g=u.CORSRules||r.CORSRules||[];g=s.clone(s.isArray(g)?g:[g]),s.each(g,function(Z){s.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(ve){var Ke=ve+"s",Me=Z[Ke]||Z[ve]||[];delete Z[Ke],Z[ve]=s.isArray(Me)?Me:[Me]})});var R={CORSRule:g};r.ResponseVary&&(R.ResponseVary=r.ResponseVary);var S=s.json2xml({CORSConfiguration:R}),F=r.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5(S)),Se.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:S,action:"cors",headers:F},function(Z,ve){if(Z)return y(Z);y(null,{statusCode:ve.statusCode,headers:ve.headers})})}function G(r,y){Se.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"cors"},function(u,g){if(u){if(u.statusCode===404&&u.error&&u.error.Code==="NoSuchCORSConfiguration"){var R={CORSRules:[],statusCode:u.statusCode};u.headers&&(R.headers=u.headers),y(null,R)}else y(u);return}var S=g.CORSConfiguration||{},F=S.CORSRules||S.CORSRule||[];F=s.clone(s.isArray(F)?F:[F]);var Z=S.ResponseVary;s.each(F,function(ve){s.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(Ke){var Me=Ke+"s",_e=ve[Me]||ve[Ke]||[];delete ve[Ke],ve[Me]=s.isArray(_e)?_e:[_e]})}),y(null,{CORSRules:F,ResponseVary:Z,statusCode:g.statusCode,headers:g.headers})})}function J(r,y){Se.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"cors"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode||u.statusCode,headers:g.headers})})}function le(r,y){Se.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"location"},y)}function ie(r,y){var u=r.Policy;try{typeof u=="string"&&(u=JSON.parse(u))}catch{}if(!u||typeof u=="string")return y(s.error(new Error("Policy format error")));var g=JSON.stringify(u);u.version||(u.version="2.0");var R=r.Headers;R["Content-Type"]="application/json",R["Content-MD5"]=s.b64(s.md5(g)),Se.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:r.Bucket,Region:r.Region,action:"policy",body:g,headers:R},function(S,F){if(S&&S.statusCode===204)return y(null,{statusCode:S.statusCode});if(S)return y(S);y(null,{statusCode:F.statusCode,headers:F.headers})})}function De(r,y){Se.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"policy",rawBody:!0},function(u,g){if(u)return u.statusCode&&u.statusCode===403?y(s.error(u,{ErrorStatus:"Access Denied"})):u.statusCode&&u.statusCode===405?y(s.error(u,{ErrorStatus:"Method Not Allowed"})):u.statusCode&&u.statusCode===404?y(s.error(u,{ErrorStatus:"Policy Not Found"})):y(u);var R={};try{R=JSON.parse(g.body)}catch{}y(null,{Policy:R,statusCode:g.statusCode,headers:g.headers})})}function Q(r,y){Se.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"policy"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode||u.statusCode,headers:g.headers})})}function x(r,y){var u=r.Tagging||{},g=u.TagSet||u.Tags||r.Tags||[];g=s.clone(s.isArray(g)?g:[g]);var R=s.json2xml({Tagging:{TagSet:{Tag:g}}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(R)),Se.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:R,action:"tagging",headers:S},function(F,Z){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:Z.statusCode,headers:Z.headers})})}function b(r,y){Se.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"tagging"},function(u,g){if(u){if(u.statusCode===404&&u.error&&(u.error==="Not Found"||u.error.Code==="NoSuchTagSet")){var R={Tags:[],statusCode:u.statusCode};u.headers&&(R.headers=u.headers),y(null,R)}else y(u);return}var S=[];try{S=g.Tagging.TagSet.Tag||[]}catch{}S=s.clone(s.isArray(S)?S:[S]),y(null,{Tags:S,statusCode:g.statusCode,headers:g.headers})})}function ue(r,y){Se.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"tagging"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function C(r,y){var u=r.LifecycleConfiguration||{},g=u.Rules||r.Rules||[];g=s.clone(g);var R=s.json2xml({LifecycleConfiguration:{Rule:g}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(R)),Se.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:R,action:"lifecycle",headers:S},function(F,Z){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:Z.statusCode,headers:Z.headers})})}function re(r,y){Se.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"lifecycle"},function(u,g){if(u){if(u.statusCode===404&&u.error&&u.error.Code==="NoSuchLifecycleConfiguration"){var R={Rules:[],statusCode:u.statusCode};u.headers&&(R.headers=u.headers),y(null,R)}else y(u);return}var S=[];try{S=g.LifecycleConfiguration.Rule||[]}catch{}S=s.clone(s.isArray(S)?S:[S]),y(null,{Rules:S,statusCode:g.statusCode,headers:g.headers})})}function oe(r,y){Se.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"lifecycle"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function ee(r,y){if(!r.VersioningConfiguration){y(s.error(new Error("missing param VersioningConfiguration")));return}var u=r.VersioningConfiguration||{},g=s.json2xml({VersioningConfiguration:u}),R=r.Headers;R["Content-Type"]="application/xml",R["Content-MD5"]=s.b64(s.md5(g)),Se.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:g,action:"versioning",headers:R},function(S,F){if(S&&S.statusCode===204)return y(null,{statusCode:S.statusCode});if(S)return y(S);y(null,{statusCode:F.statusCode,headers:F.headers})})}function se(r,y){Se.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"versioning"},function(u,g){u||!g.VersioningConfiguration&&(g.VersioningConfiguration={}),y(u,g)})}function H(r,y){var u=s.clone(r.ReplicationConfiguration),g=s.json2xml({ReplicationConfiguration:u});g=g.replace(/<(\/?)Rules>/gi,"<$1Rule>"),g=g.replace(/<(\/?)Tags>/gi,"<$1Tag>");var R=r.Headers;R["Content-Type"]="application/xml",R["Content-MD5"]=s.b64(s.md5(g)),Se.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:g,action:"replication",headers:R},function(S,F){if(S&&S.statusCode===204)return y(null,{statusCode:S.statusCode});if(S)return y(S);y(null,{statusCode:F.statusCode,headers:F.headers})})}function ne(r,y){Se.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"replication"},function(u,g){if(u){if(u.statusCode===404&&u.error&&(u.error==="Not Found"||u.error.Code==="ReplicationConfigurationnotFoundError")){var R={ReplicationConfiguration:{Rules:[]},statusCode:u.statusCode};u.headers&&(R.headers=u.headers),y(null,R)}else y(u);return}!g.ReplicationConfiguration&&(g.ReplicationConfiguration={}),g.ReplicationConfiguration.Rule&&(g.ReplicationConfiguration.Rules=s.makeArray(g.ReplicationConfiguration.Rule),delete g.ReplicationConfiguration.Rule),y(u,g)})}function ce(r,y){Se.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"replication"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function de(r,y){if(!r.WebsiteConfiguration){y(s.error(new Error("missing param WebsiteConfiguration")));return}var u=s.clone(r.WebsiteConfiguration||{}),g=u.RoutingRules||u.RoutingRule||[];g=s.isArray(g)?g:[g],delete u.RoutingRule,delete u.RoutingRules,g.length&&(u.RoutingRules={RoutingRule:g});var R=s.json2xml({WebsiteConfiguration:u}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(R)),Se.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:R,action:"website",headers:S},function(F,Z){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:Z.statusCode,headers:Z.headers})})}function pe(r,y){Se.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:r.Headers,action:"website"},function(u,g){if(u){if(u.statusCode===404&&u.error.Code==="NoSuchWebsiteConfiguration"){var R={WebsiteConfiguration:{},statusCode:u.statusCode};u.headers&&(R.headers=u.headers),y(null,R)}else y(u);return}var S=g.WebsiteConfiguration||{};if(S.RoutingRules){var F=s.clone(S.RoutingRules.RoutingRule||[]);F=s.makeArray(F),S.RoutingRules=F}y(null,{WebsiteConfiguration:S,statusCode:g.statusCode,headers:g.headers})})}function Ce(r,y){Se.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"website"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function we(r,y){if(!r.RefererConfiguration){y(s.error(new Error("missing param RefererConfiguration")));return}var u=s.clone(r.RefererConfiguration||{}),g=u.DomainList||{},R=g.Domains||g.Domain||[];R=s.isArray(R)?R:[R],R.length&&(u.DomainList={Domain:R});var S=s.json2xml({RefererConfiguration:u}),F=r.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5(S)),Se.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:S,action:"referer",headers:F},function(Z,ve){if(Z&&Z.statusCode===204)return y(null,{statusCode:Z.statusCode});if(Z)return y(Z);y(null,{statusCode:ve.statusCode,headers:ve.headers})})}function be(r,y){Se.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:r.Headers,action:"referer"},function(u,g){if(u){if(u.statusCode===404&&u.error.Code==="NoSuchRefererConfiguration"){var R={WebsiteConfiguration:{},statusCode:u.statusCode};u.headers&&(R.headers=u.headers),y(null,R)}else y(u);return}var S=g.RefererConfiguration||{};if(S.DomainList){var F=s.makeArray(S.DomainList.Domain||[]);S.DomainList={Domains:F}}y(null,{RefererConfiguration:S,statusCode:g.statusCode,headers:g.headers})})}function ye(r,y){var u=r.DomainConfiguration||{},g=u.DomainRule||r.DomainRule||[];g=s.clone(g);var R=s.json2xml({DomainConfiguration:{DomainRule:g}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(R)),Se.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:R,action:"domain",headers:S},function(F,Z){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:Z.statusCode,headers:Z.headers})})}function Ee(r,y){Se.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"domain"},function(u,g){if(u)return y(u);var R=[];try{R=g.DomainConfiguration.DomainRule||[]}catch{}R=s.clone(s.isArray(R)?R:[R]),y(null,{DomainRule:R,statusCode:g.statusCode,headers:g.headers})})}function xe(r,y){Se.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"domain"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function Pe(r,y){var u=r.OriginConfiguration||{},g=u.OriginRule||r.OriginRule||[];g=s.clone(g);var R=s.json2xml({OriginConfiguration:{OriginRule:g}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(R)),Se.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:R,action:"origin",headers:S},function(F,Z){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:Z.statusCode,headers:Z.headers})})}function ge(r,y){Se.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"origin"},function(u,g){if(u)return y(u);var R=[];try{R=g.OriginConfiguration.OriginRule||[]}catch{}R=s.clone(s.isArray(R)?R:[R]),y(null,{OriginRule:R,statusCode:g.statusCode,headers:g.headers})})}function me(r,y){Se.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"origin"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function Re(r,y){var u=s.json2xml({BucketLoggingStatus:r.BucketLoggingStatus||""}),g=r.Headers;g["Content-Type"]="application/xml",g["Content-MD5"]=s.b64(s.md5(u)),Se.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:u,action:"logging",headers:g},function(R,S){if(R&&R.statusCode===204)return y(null,{statusCode:R.statusCode});if(R)return y(R);y(null,{statusCode:S.statusCode,headers:S.headers})})}function Fe(r,y){Se.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"logging"},function(u,g){if(u)return y(u);y(null,{BucketLoggingStatus:g.BucketLoggingStatus,statusCode:g.statusCode,headers:g.headers})})}function Oe(r,y,u){var g=s.clone(y.InventoryConfiguration);if(g.OptionalFields){var R=g.OptionalFields||[];g.OptionalFields={Field:R}}if(g.Destination&&g.Destination.COSBucketDestination&&g.Destination.COSBucketDestination.Encryption){var S=g.Destination.COSBucketDestination.Encryption;Object.keys(S).indexOf("SSECOS")>-1&&(S["SSE-COS"]=S.SSECOS,delete S.SSECOS)}var F=s.json2xml({InventoryConfiguration:g}),Z=y.Headers;Z["Content-Type"]="application/xml",Z["Content-MD5"]=s.b64(s.md5(F));var ve=r==="PUT"?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";Se.call(this,{Action:ve,method:r,Bucket:y.Bucket,Region:y.Region,body:F,action:"inventory",qs:{id:y.Id},headers:Z},function(Ke,Me){if(Ke&&Ke.statusCode===204)return u(null,{statusCode:Ke.statusCode});if(Ke)return u(Ke);u(null,{statusCode:Me.statusCode,headers:Me.headers})})}function Ie(r,y){return Oe.call(this,"PUT",r,y)}function Ne(r,y){return Oe.call(this,"POST",r,y)}function Ue(r,y){Se.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"inventory",qs:{id:r.Id}},function(u,g){if(u)return y(u);var R=g.InventoryConfiguration;if(R&&R.OptionalFields&&R.OptionalFields.Field){var S=R.OptionalFields.Field;s.isArray(S)||(S=[S]),R.OptionalFields=S}if(R.Destination&&R.Destination.COSBucketDestination&&R.Destination.COSBucketDestination.Encryption){var F=R.Destination.COSBucketDestination.Encryption;Object.keys(F).indexOf("SSE-COS")>-1&&(F.SSECOS=F["SSE-COS"],delete F["SSE-COS"])}y(null,{InventoryConfiguration:R,statusCode:g.statusCode,headers:g.headers})})}function He(r,y){Se.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"inventory",qs:{"continuation-token":r.ContinuationToken}},function(u,g){if(u)return y(u);var R=g.ListInventoryConfigurationResult,S=R.InventoryConfiguration||[];S=s.isArray(S)?S:[S],delete R.InventoryConfiguration,s.each(S,function(F){if(F&&F.OptionalFields&&F.OptionalFields.Field){var Z=F.OptionalFields.Field;s.isArray(Z)||(Z=[Z]),F.OptionalFields=Z}if(F.Destination&&F.Destination.COSBucketDestination&&F.Destination.COSBucketDestination.Encryption){var ve=F.Destination.COSBucketDestination.Encryption;Object.keys(ve).indexOf("SSE-COS")>-1&&(ve.SSECOS=ve["SSE-COS"],delete ve["SSE-COS"])}}),R.InventoryConfigurations=S,s.extend(R,{statusCode:g.statusCode,headers:g.headers}),y(null,R)})}function Ve(r,y){Se.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"inventory",qs:{id:r.Id}},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function ze(r,y){if(!r.AccelerateConfiguration){y(s.error(new Error("missing param AccelerateConfiguration")));return}var u={AccelerateConfiguration:r.AccelerateConfiguration||{}},g=s.json2xml(u),R={};R["Content-Type"]="application/xml",R["Content-MD5"]=s.b64(s.md5(g)),Se.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:g,action:"accelerate",headers:R},function(S,F){if(S)return y(S);y(null,{statusCode:F.statusCode,headers:F.headers})})}function Ye(r,y){Se.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:r.Bucket,Region:r.Region,action:"accelerate"},function(u,g){u||!g.AccelerateConfiguration&&(g.AccelerateConfiguration={}),y(u,g)})}function tt(r,y){var u=r.ServerSideEncryptionConfiguration||{},g=u.Rule||u.Rules||[],R=s.json2xml({ServerSideEncryptionConfiguration:{Rule:g}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(R)),Se.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:R,action:"encryption",headers:S},function(F,Z){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:Z.statusCode,headers:Z.headers})})}function Qe(r,y){Se.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"encryption"},function(u,g){if(u){if(u.statusCode===404&&u.code==="NoSuchEncryptionConfiguration"){var R={EncryptionConfiguration:{Rules:[]},statusCode:u.statusCode};u.headers&&(R.headers=u.headers),y(null,R)}else y(u);return}var S=s.makeArray(g.EncryptionConfiguration&&g.EncryptionConfiguration.Rule||[]);g.EncryptionConfiguration={Rules:S},y(u,g)})}function Ae(r,y){Se.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"encryption"},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function p(r,y){Se.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:r.Bucket,Region:r.Region,Key:r.Key,VersionId:r.VersionId,headers:r.Headers},function(u,g){if(u){var R=u.statusCode;return r.Headers["If-Modified-Since"]&&R&&R===304?y(null,{NotModified:!0,statusCode:R}):y(u)}g.ETag=s.attr(g.headers,"etag",""),y(null,g)})}function c(r,y){var u={};u.prefix=r.Prefix||"",u.delimiter=r.Delimiter,u["key-marker"]=r.KeyMarker,u["version-id-marker"]=r.VersionIdMarker,u["max-keys"]=r.MaxKeys,u["encoding-type"]=r.EncodingType,Se.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:u.prefix,method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,qs:u,action:"versions"},function(g,R){if(g)return y(g);var S=R.ListVersionsResult||{},F=S.DeleteMarker||[];F=s.isArray(F)?F:[F];var Z=S.Version||[];Z=s.isArray(Z)?Z:[Z];var ve=s.clone(S);delete ve.DeleteMarker,delete ve.Version,s.extend(ve,{DeleteMarkers:F,Versions:Z,statusCode:R.statusCode,headers:R.headers}),y(null,ve)})}function a(r,y){var u=r.Query||{},g=r.QueryString||"",R=s.throttleOnProgress.call(this,0,r.onProgress),S=r.tracker;S&&S.setParams({signStartTime:new Date().getTime()}),u["response-content-type"]=r.ResponseContentType,u["response-content-language"]=r.ResponseContentLanguage,u["response-expires"]=r.ResponseExpires,u["response-cache-control"]=r.ResponseCacheControl,u["response-content-disposition"]=r.ResponseContentDisposition,u["response-content-encoding"]=r.ResponseContentEncoding,Se.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:r.Bucket,Region:r.Region,Key:r.Key,VersionId:r.VersionId,DataType:r.DataType,headers:r.Headers,qs:u,qsStr:g,rawBody:!0,onDownloadProgress:R,tracker:S},function(F,Z){if(R(null,!0),F){var ve=F.statusCode;return r.Headers["If-Modified-Since"]&&ve&&ve===304?y(null,{NotModified:!0}):y(F)}y(null,{Body:Z.body,ETag:s.attr(Z.headers,"etag",""),statusCode:Z.statusCode,headers:Z.headers})})}function l(r,y){var u=this,g=r.ContentLength,R=s.throttleOnProgress.call(u,g,r.onProgress),S=r.Headers;!S["Cache-Control"]&&!S["cache-control"]&&(S["Cache-Control"]=""),!S["Content-Type"]&&!S["content-type"]&&(S["Content-Type"]=r.Body&&r.Body.type||"");var F=r.UploadAddMetaMd5||u.options.UploadAddMetaMd5||u.options.UploadCheckContentMd5,Z=r.tracker;F&&Z&&Z.setParams({md5StartTime:new Date().getTime()}),s.getBodyMd5(F,r.Body,function(ve){ve&&(Z&&Z.setParams({md5EndTime:new Date().getTime()}),u.options.UploadCheckContentMd5&&(S["Content-MD5"]=s.b64(ve)),(r.UploadAddMetaMd5||u.options.UploadAddMetaMd5)&&(S["x-cos-meta-md5"]=ve)),r.ContentLength!==void 0&&(S["Content-Length"]=r.ContentLength),R(null,!0),Se.call(u,{Action:"name/cos:PutObject",TaskId:r.TaskId,method:"PUT",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:r.Headers,qs:r.Query,body:r.Body,onProgress:R,tracker:Z},function(Ke,Me){if(Ke)return R(null,!0),y(Ke);R({loaded:g,total:g},!0);var _e=te({ForcePathStyle:u.options.ForcePathStyle,protocol:u.options.Protocol,domain:u.options.Domain,bucket:r.Bucket,region:u.options.UseAccelerate?"accelerate":r.Region,object:r.Key});_e=_e.substr(_e.indexOf("://")+3),Me.Location=_e,Me.ETag=s.attr(Me.headers,"etag",""),y(null,Me)})},r.onHashProgress)}function m(r,y){Se.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:r.Headers,VersionId:r.VersionId,action:r.Recursive?"recursive":""},function(u,g){if(u){var R=u.statusCode;return R&&R===404?y(null,{BucketNotFound:!0,statusCode:R}):y(u)}y(null,{statusCode:g.statusCode,headers:g.headers})})}function j(r,y){var u={};r.VersionId&&(u.versionId=r.VersionId),Se.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:r.Headers,qs:u,action:"acl"},function(g,R){if(g)return y(g);var S=R.AccessControlPolicy||{},F=S.Owner||{},Z=S.AccessControlList&&S.AccessControlList.Grant||[];Z=s.isArray(Z)?Z:[Z];var ve=v(S);delete ve.GrantWrite,R.headers&&R.headers["x-cos-acl"]&&(ve.ACL=R.headers["x-cos-acl"]),ve=s.extend(ve,{Owner:F,Grants:Z,statusCode:R.statusCode,headers:R.headers}),y(null,ve)})}function K(r,y){var u=r.Headers,g="";if(r.AccessControlPolicy){var R=s.clone(r.AccessControlPolicy||{}),S=R.Grants||R.Grant;S=s.isArray(S)?S:[S],delete R.Grant,delete R.Grants,R.AccessControlList={Grant:S},g=s.json2xml({AccessControlPolicy:R}),u["Content-Type"]="application/xml",u["Content-MD5"]=s.b64(s.md5(g))}s.each(u,function(F,Z){Z.indexOf("x-cos-grant-")===0&&(u[Z]=M(u[Z]))}),Se.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:r.Bucket,Region:r.Region,Key:r.Key,action:"acl",headers:u,body:g},function(F,Z){if(F)return y(F);y(null,{statusCode:Z.statusCode,headers:Z.headers})})}function he(r,y){var u=r.Headers;u.Origin=r.Origin,u["Access-Control-Request-Method"]=r.AccessControlRequestMethod,u["Access-Control-Request-Headers"]=r.AccessControlRequestHeaders,Se.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:u},function(g,R){if(g)return g.statusCode&&g.statusCode===403?y(null,{OptionsForbidden:!0,statusCode:g.statusCode}):y(g);var S=R.headers||{};y(null,{AccessControlAllowOrigin:S["access-control-allow-origin"],AccessControlAllowMethods:S["access-control-allow-methods"],AccessControlAllowHeaders:S["access-control-allow-headers"],AccessControlExposeHeaders:S["access-control-expose-headers"],AccessControlMaxAge:S["access-control-max-age"],statusCode:R.statusCode,headers:R.headers})})}function Be(r,y){var u=this,g=r.Headers;!g["Cache-Control"]&&!g["cache-control"]&&(g["Cache-Control"]="");var R=r.CopySource||"",S=s.getSourceParams.call(this,R);if(!S){y(s.error(new Error("CopySource format error")));return}var F=S.Bucket,Z=S.Region,ve=decodeURIComponent(S.Key);Se.call(this,{Scope:[{action:"name/cos:GetObject",bucket:F,region:Z,prefix:ve},{action:"name/cos:PutObject",bucket:r.Bucket,region:r.Region,prefix:r.Key}],method:"PUT",Bucket:r.Bucket,Region:r.Region,Key:r.Key,VersionId:r.VersionId,headers:r.Headers},function(Ke,Me){if(Ke)return y(Ke);var _e=s.clone(Me.CopyObjectResult||{}),je=te({ForcePathStyle:u.options.ForcePathStyle,protocol:u.options.Protocol,domain:u.options.Domain,bucket:r.Bucket,region:r.Region,object:r.Key,isLocation:!0});s.extend(_e,{Location:je,statusCode:Me.statusCode,headers:Me.headers}),y(null,_e)})}function Te(r,y){var u=r.CopySource||"",g=s.getSourceParams.call(this,u);if(!g){y(s.error(new Error("CopySource format error")));return}var R=g.Bucket,S=g.Region,F=decodeURIComponent(g.Key);Se.call(this,{Scope:[{action:"name/cos:GetObject",bucket:R,region:S,prefix:F},{action:"name/cos:PutObject",bucket:r.Bucket,region:r.Region,prefix:r.Key}],method:"PUT",Bucket:r.Bucket,Region:r.Region,Key:r.Key,VersionId:r.VersionId,qs:{partNumber:r.PartNumber,uploadId:r.UploadId},headers:r.Headers},function(Z,ve){if(Z)return y(Z);var Ke=s.clone(ve.CopyPartResult||{});s.extend(Ke,{statusCode:ve.statusCode,headers:ve.headers}),y(null,Ke)})}function fe(r,y){var u=r.Objects||[],g=r.Quiet;u=s.isArray(u)?u:[u];var R=s.json2xml({Delete:{Object:u,Quiet:g||!1}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(R));var F=s.map(u,function(Z){return{action:"name/cos:DeleteObject",bucket:r.Bucket,region:r.Region,prefix:Z.Key}});Se.call(this,{Scope:F,method:"POST",Bucket:r.Bucket,Region:r.Region,body:R,action:"delete",headers:S},function(Z,ve){if(Z)return y(Z);var Ke=ve.DeleteResult||{},Me=Ke.Deleted||[],_e=Ke.Error||[];Me=s.isArray(Me)?Me:[Me],_e=s.isArray(_e)?_e:[_e];var je=s.clone(Ke);s.extend(je,{Error:_e,Deleted:Me,statusCode:ve.statusCode,headers:ve.headers}),y(null,je)})}function Le(r,y){var u=r.Headers;if(!r.RestoreRequest){y(s.error(new Error("missing param RestoreRequest")));return}var g=r.RestoreRequest||{},R=s.json2xml({RestoreRequest:g});u["Content-Type"]="application/xml",u["Content-MD5"]=s.b64(s.md5(R)),Se.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:r.Bucket,Region:r.Region,Key:r.Key,VersionId:r.VersionId,body:R,action:"restore",headers:u},y)}function $e(r,y){var u=r.Tagging||{},g=u.TagSet||u.Tags||r.Tags||[];g=s.clone(s.isArray(g)?g:[g]);var R=s.json2xml({Tagging:{TagSet:{Tag:g}}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(R)),Se.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:r.Bucket,Key:r.Key,Region:r.Region,body:R,action:"tagging",headers:S,VersionId:r.VersionId},function(F,Z){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:Z.statusCode,headers:Z.headers})})}function Ze(r,y){Se.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:r.Key,Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"tagging",VersionId:r.VersionId},function(u,g){if(u){if(u.statusCode===404&&u.error&&(u.error==="Not Found"||u.error.Code==="NoSuchTagSet")){var R={Tags:[],statusCode:u.statusCode};u.headers&&(R.headers=u.headers),y(null,R)}else y(u);return}var S=[];try{S=g.Tagging.TagSet.Tag||[]}catch{}S=s.clone(s.isArray(S)?S:[S]),y(null,{Tags:S,statusCode:g.statusCode,headers:g.headers})})}function We(r,y){Se.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:r.Headers,action:"tagging",VersionId:r.VersionId},function(u,g){if(u&&u.statusCode===204)return y(null,{statusCode:u.statusCode});if(u)return y(u);y(null,{statusCode:g.statusCode,headers:g.headers})})}function et(r,y){var u=r.SelectType;if(!u)return y(s.error(new Error("missing param SelectType")));var g=r.SelectRequest||{},R=s.json2xml({SelectRequest:g}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(R)),Se.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:r.Headers,action:"select",qs:{"select-type":r.SelectType},VersionId:r.VersionId,body:R,DataType:"arraybuffer",rawBody:!0},function(F,Z){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);var ve=s.parseSelectPayload(Z.body);y(null,{statusCode:Z.statusCode,headers:Z.headers,Body:ve.body,Payload:ve.payload})})}function st(r,y){var u=this,g=r.Headers,R=r.tracker;!g["Cache-Control"]&&!g["cache-control"]&&(g["Cache-Control"]=""),!g["Content-Type"]&&!g["content-type"]&&(g["Content-Type"]=r.Body&&r.Body.type||"");var S=r.Body&&(r.UploadAddMetaMd5||u.options.UploadAddMetaMd5);S&&R&&R.setParams({md5StartTime:new Date().getTime()}),s.getBodyMd5(S,r.Body,function(F){F&&(r.Headers["x-cos-meta-md5"]=F),S&&R&&R.setParams({md5EndTime:new Date().getTime()}),Se.call(u,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:r.Bucket,Region:r.Region,Key:r.Key,action:"uploads",headers:r.Headers,qs:r.Query,tracker:R},function(Z,ve){if(Z)return R&&R.parent&&R.parent.setParams({errorNode:"multipartInit"}),y(Z);if(ve=s.clone(ve||{}),ve&&ve.InitiateMultipartUploadResult)return y(null,s.extend(ve.InitiateMultipartUploadResult,{statusCode:ve.statusCode,headers:ve.headers}));y(null,ve)})},r.onHashProgress)}function ut(r,y){var u=this;s.getFileSize("multipartUpload",r,function(){var g=r.tracker,R=u.options.UploadCheckContentMd5;R&&g&&g.setParams({md5StartTime:new Date().getTime()}),s.getBodyMd5(R,r.Body,function(S){S&&(r.Headers["Content-MD5"]=s.b64(S)),R&&g&&g.setParams({md5EndTime:new Date().getTime()}),g&&g.setParams({partNumber:r.PartNumber}),Se.call(u,{Action:"name/cos:UploadPart",TaskId:r.TaskId,method:"PUT",Bucket:r.Bucket,Region:r.Region,Key:r.Key,qs:{partNumber:r.PartNumber,uploadId:r.UploadId},headers:r.Headers,onProgress:r.onProgress,body:r.Body||null,tracker:g},function(F,Z){if(F)return g&&g.parent&&g.parent.setParams({errorNode:"multipartUpload"}),y(F);y(null,{ETag:s.attr(Z.headers,"etag",""),statusCode:Z.statusCode,headers:Z.headers})})})})}function ct(r,y){for(var u=this,g=r.UploadId,R=r.Parts,S=r.tracker,F=0,Z=R.length;F<Z;F++)R[F].ETag&&R[F].ETag.indexOf('"')===0||(R[F].ETag='"'+R[F].ETag+'"');var ve=s.json2xml({CompleteMultipartUpload:{Part:R}});ve=ve.replace(/\n\s*/g,"");var Ke=r.Headers;Ke["Content-Type"]="application/xml",Ke["Content-MD5"]=s.b64(s.md5(ve)),Se.call(this,{Action:"name/cos:CompleteMultipartUpload",method:"POST",Bucket:r.Bucket,Region:r.Region,Key:r.Key,qs:{uploadId:g},body:ve,headers:Ke,tracker:S},function(Me,_e){if(Me)return S&&S.parent&&S.parent.setParams({errorNode:"multipartComplete"}),y(Me);var je=te({ForcePathStyle:u.options.ForcePathStyle,protocol:u.options.Protocol,domain:u.options.Domain,bucket:r.Bucket,region:r.Region,object:r.Key,isLocation:!0}),rt=_e.CompleteMultipartUploadResult||{};rt.ProcessResults&&rt&&rt.ProcessResults&&(rt.UploadResult={OriginalInfo:{Key:rt.Key,Location:je,ETag:rt.ETag,ImageInfo:rt.ImageInfo},ProcessResults:rt.ProcessResults},delete rt.ImageInfo,delete rt.ProcessResults);var pt=s.extend(rt,{Location:je,statusCode:_e.statusCode,headers:_e.headers});y(null,pt)})}function it(r,y){var u={};u.delimiter=r.Delimiter,u["encoding-type"]=r.EncodingType,u.prefix=r.Prefix||"",u["max-uploads"]=r.MaxUploads,u["key-marker"]=r.KeyMarker,u["upload-id-marker"]=r.UploadIdMarker,u=s.clearKey(u);var g=r.tracker;g&&g.setParams({signStartTime:new Date().getTime()}),Se.call(this,{Action:"name/cos:ListMultipartUploads",ResourceKey:u.prefix,method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,qs:u,action:"uploads",tracker:g},function(R,S){if(R)return g&&g.parent&&g.parent.setParams({errorNode:"multipartList"}),y(R);if(S&&S.ListMultipartUploadsResult){var F=S.ListMultipartUploadsResult.Upload||[];F=s.isArray(F)?F:[F],S.ListMultipartUploadsResult.Upload=F}var Z=s.clone(S.ListMultipartUploadsResult||{});s.extend(Z,{statusCode:S.statusCode,headers:S.headers}),y(null,Z)})}function at(r,y){var u={},g=r.tracker;u.uploadId=r.UploadId,u["encoding-type"]=r.EncodingType,u["max-parts"]=r.MaxParts,u["part-number-marker"]=r.PartNumberMarker,Se.call(this,{Action:"name/cos:ListParts",method:"GET",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:r.Headers,qs:u},function(R,S){if(R)return g&&g.parent&&g.parent.setParams({errorNode:"multipartListPart"}),y(R);var F=S.ListPartsResult||{},Z=F.Part||[];Z=s.isArray(Z)?Z:[Z],F.Part=Z;var ve=s.clone(F);s.extend(ve,{statusCode:S.statusCode,headers:S.headers}),y(null,ve)})}function lt(r,y){var u={};u.uploadId=r.UploadId,Se.call(this,{Action:"name/cos:AbortMultipartUpload",method:"DELETE",Bucket:r.Bucket,Region:r.Region,Key:r.Key,headers:r.Headers,qs:u},function(g,R){if(g)return y(g);y(null,{statusCode:R.statusCode,headers:R.headers})})}function mt(r,y){Se.call(this,{method:r.Method,Bucket:r.Bucket,Region:r.Region,Key:r.Key,action:r.Action,headers:r.Headers,qs:r.Query,body:r.Body,Url:r.Url,rawBody:r.RawBody,DataType:r.DataType},function(u,g){if(u)return y(u);g&&g.body&&(g.Body=g.body,delete g.body),y(u,g)})}function vt(r,y){var u=r.Headers;!u["Cache-Control"]&&!u["cache-control"]&&(u["Cache-Control"]=""),!u["Content-Type"]&&!u["content-type"]&&(u["Content-Type"]=r.Body&&r.Body.type||""),Se.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:r.Bucket,Region:r.Region,action:"append",Key:r.Key,body:r.Body,qs:{position:r.Position},headers:r.Headers},function(g,R){if(g)return y(g);y(null,R)})}function Ct(r){var y=this;return s.getAuth({SecretId:r.SecretId||this.options.SecretId||"",SecretKey:r.SecretKey||this.options.SecretKey||"",Bucket:r.Bucket,Region:r.Region,Method:r.Method,Key:r.Key,Query:r.Query,Headers:r.Headers,Expires:r.Expires,UseRawKey:y.options.UseRawKey,SystemClockOffset:y.options.SystemClockOffset})}function f(r,y){var u=this,g=r.UseAccelerate===void 0?u.options.UseAccelerate:r.UseAccelerate,R=te({ForcePathStyle:u.options.ForcePathStyle,protocol:r.Protocol||u.options.Protocol,domain:r.Domain||u.options.Domain,bucket:r.Bucket,region:g?"accelerate":r.Region,object:r.Key}),S="";r.Query&&(S+=s.obj2str(r.Query)),r.QueryString&&(S+=(S?"&":"")+r.QueryString);var F=R;if(r.Sign!==void 0&&!r.Sign)return S&&(F+="?"+S),y(null,{Url:F}),F;var Z=ke.call(this,{Bucket:r.Bucket,Region:r.Region,UseAccelerate:r.UseAccelerate,Url:R}),ve=qe.call(this,{Action:(r.Method||"").toUpperCase()==="PUT"?"name/cos:PutObject":"name/cos:GetObject",Bucket:r.Bucket||"",Region:r.Region||"",Method:r.Method||"get",Key:r.Key,Expires:r.Expires,Headers:r.Headers,Query:r.Query,SignHost:Z,ForceSignHost:r.ForceSignHost===!1?!1:u.options.ForceSignHost},function(Ke,Me){if(!!y){if(Ke){y(Ke);return}var _e=function(pt){var bt=pt.match(/q-url-param-list.*?(?=&)/g)[0],At="q-url-param-list="+encodeURIComponent(bt.replace(/q-url-param-list=/,"")).toLowerCase(),gt=new RegExp(bt,"g"),Dt=pt.replace(gt,At);return Dt},je=R;je+="?"+(Me.Authorization.indexOf("q-signature")>-1?_e(Me.Authorization):"sign="+encodeURIComponent(Me.Authorization)),Me.SecurityToken&&(je+="&x-cos-security-token="+Me.SecurityToken),Me.ClientIP&&(je+="&clientIP="+Me.ClientIP),Me.ClientUA&&(je+="&clientUA="+Me.ClientUA),Me.Token&&(je+="&token="+Me.Token),S&&(je+="&"+S),setTimeout(function(){y(null,{Url:je})})}});return ve?(F+="?"+ve.Authorization+(ve.SecurityToken?"&x-cos-security-token="+ve.SecurityToken:""),S&&(F+="&"+S)):S&&(F+="?"+S),F}function v(r){var y={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},u={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},g=r&&r.AccessControlList||{},R=g.Grant;R&&(R=s.isArray(R)?R:[R]);var S={READ:0,WRITE:0,FULL_CONTROL:0};return R&&R.length&&s.each(R,function(F){F.Grantee.ID==="qcs::cam::anyone:anyone"||F.Grantee.URI==="http://cam.qcloud.com/groups/global/AllUsers"?S[F.Permission]=1:F.Grantee.ID!==r.Owner.ID&&y[u[F.Permission]].push('id="'+F.Grantee.ID+'"')}),S.FULL_CONTROL||S.WRITE&&S.READ?y.ACL="public-read-write":S.READ?y.ACL="public-read":y.ACL="private",s.each(u,function(F){y[F]=M(y[F].join(","))}),y}function M(r){var y=r.split(","),u={},g,R;for(g=0;g<y.length;)R=y[g].trim(),u[R]?y.splice(g,1):(u[R]=!0,y[g]=R,g++);return y.join(",")}function te(r){var y=r.region||"",u=r.bucket||"",g=u.substr(0,u.lastIndexOf("-")),R=u.substr(u.lastIndexOf("-")+1),S=r.domain,F=r.object;typeof S=="function"&&(S=S({Bucket:u,Region:y})),["http","https"].includes(r.protocol)&&(r.protocol=r.protocol+":");var Z=r.protocol||(s.isBrowser&&(typeof location=="undefined"?"undefined":o(location))==="object"&&location.protocol==="http:"?"http:":"https:");S||(["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(y)>-1?S="{Region}.myqcloud.com":S="cos.{Region}.myqcloud.com",r.ForcePathStyle||(S="{Bucket}."+S)),S=S.replace(/\{\{AppId\}\}/gi,R).replace(/\{\{Bucket\}\}/gi,g).replace(/\{\{Region\}\}/gi,y).replace(/\{\{.*?\}\}/gi,""),S=S.replace(/\{AppId\}/gi,R).replace(/\{BucketName\}/gi,g).replace(/\{Bucket\}/gi,u).replace(/\{Region\}/gi,y).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(S)||(S=Z+"//"+S),S.slice(-1)==="/"&&(S=S.slice(0,-1));var ve=S;return r.ForcePathStyle&&(ve+="/"+u),ve+="/",F&&(ve+=s.camSafeUrlEncode(F).replace(/%2F/g,"/")),r.isLocation&&(ve=ve.replace(/^https?:\/\//,"")),ve}var ke=function(y){if(!y.Bucket||!y.Region)return"";var u=y.UseAccelerate===void 0?this.options.UseAccelerate:y.UseAccelerate,g=y.Url||te({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:y.Bucket,region:u?"accelerate":y.Region}),R=g.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),S=new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$");return S.test(R)?R:""};function qe(r,y){var u=s.clone(r.Headers),g="";s.each(u,function(Ge,Xe){(Ge===""||["content-type","cache-control","expires"].indexOf(Xe.toLowerCase())>-1)&&delete u[Xe],Xe.toLowerCase()==="host"&&(g=Ge)});var R=r.ForceSignHost!==!1;!g&&r.SignHost&&R&&(u.Host=r.SignHost);var S=!1,F=function(Xe,nt){S||(S=!0,nt&&nt.XCosSecurityToken&&!nt.SecurityToken&&(nt=s.clone(nt),nt.SecurityToken=nt.XCosSecurityToken,delete nt.XCosSecurityToken),y&&y(Xe,nt))},Z=this,ve=r.Bucket||"",Ke=r.Region||"",Me=r.Key||"";Z.options.ForcePathStyle&&ve&&(Me=ve+"/"+Me);var _e="/"+Me,je={},rt=r.Scope;if(!rt){var pt=r.Action||"",bt=r.ResourceKey||r.Key||"";rt=r.Scope||[{action:pt,bucket:ve,region:Ke,prefix:bt}]}var At=s.md5(JSON.stringify(rt));Z._StsCache=Z._StsCache||[],function(){var Ge,Xe;for(Ge=Z._StsCache.length-1;Ge>=0;Ge--){Xe=Z._StsCache[Ge];var nt=Math.round(s.getSkewTime(Z.options.SystemClockOffset)/1e3)+30;if(Xe.StartTime&&nt<Xe.StartTime||nt>=Xe.ExpiredTime){Z._StsCache.splice(Ge,1);continue}if(!Xe.ScopeLimit||Xe.ScopeLimit&&Xe.ScopeKey===At){je=Xe;break}}}();var gt=function(){var Xe="";je.StartTime&&r.Expires?Xe=je.StartTime+";"+(je.StartTime+r.Expires*1):je.StartTime&&je.ExpiredTime&&(Xe=je.StartTime+";"+je.ExpiredTime);var nt=s.getAuth({SecretId:je.TmpSecretId,SecretKey:je.TmpSecretKey,Method:r.Method,Pathname:_e,Query:r.Query,Headers:u,Expires:r.Expires,UseRawKey:Z.options.UseRawKey,SystemClockOffset:Z.options.SystemClockOffset,KeyTime:Xe,ForceSignHost:R}),ot={Authorization:nt,SecurityToken:je.SecurityToken||je.XCosSecurityToken||"",Token:je.Token||"",ClientIP:je.ClientIP||"",ClientUA:je.ClientUA||""};F(null,ot)},Dt=function(Xe){if(Xe.Authorization){var nt=!1,ot=Xe.Authorization;if(ot)if(ot.indexOf(" ")>-1)nt=!1;else if(ot.indexOf("q-sign-algorithm=")>-1&&ot.indexOf("q-ak=")>-1&&ot.indexOf("q-sign-time=")>-1&&ot.indexOf("q-key-time=")>-1&&ot.indexOf("q-url-param-list=")>-1)nt=!0;else try{ot=atob(ot),ot.indexOf("a=")>-1&&ot.indexOf("k=")>-1&&ot.indexOf("t=")>-1&&ot.indexOf("r=")>-1&&ot.indexOf("b=")>-1&&(nt=!0)}catch{}if(!nt)return s.error(new Error("getAuthorization callback params format error"))}else{if(!Xe.TmpSecretId)return s.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!Xe.TmpSecretKey)return s.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!Xe.SecurityToken&&!Xe.XCosSecurityToken)return s.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!Xe.ExpiredTime)return s.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(Xe.ExpiredTime&&Xe.ExpiredTime.toString().length!==10)return s.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(Xe.StartTime&&Xe.StartTime.toString().length!==10)return s.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(je.ExpiredTime&&je.ExpiredTime-s.getSkewTime(Z.options.SystemClockOffset)/1e3>60)gt();else if(Z.options.getAuthorization)Z.options.getAuthorization.call(Z,{Bucket:ve,Region:Ke,Method:r.Method,Key:Me,Pathname:_e,Query:r.Query,Headers:u,Scope:rt,SystemClockOffset:Z.options.SystemClockOffset,ForceSignHost:R},function(Ge){typeof Ge=="string"&&(Ge={Authorization:Ge});var Xe=Dt(Ge);if(Xe)return F(Xe);Ge.Authorization?F(null,Ge):(je=Ge||{},je.Scope=rt,je.ScopeKey=At,Z._StsCache.push(je),gt())});else if(Z.options.getSTS)Z.options.getSTS.call(Z,{Bucket:ve,Region:Ke},function(Ge){je=Ge||{},je.Scope=rt,je.ScopeKey=At,je.TmpSecretId||(je.TmpSecretId=je.SecretId),je.TmpSecretKey||(je.TmpSecretKey=je.SecretKey);var Xe=Dt(je);if(Xe)return F(Xe);Z._StsCache.push(je),gt()});else return function(){var Ge=s.getAuth({SecretId:r.SecretId||Z.options.SecretId,SecretKey:r.SecretKey||Z.options.SecretKey,Method:r.Method,Pathname:_e,Query:r.Query,Headers:u,Expires:r.Expires,UseRawKey:Z.options.UseRawKey,SystemClockOffset:Z.options.SystemClockOffset,ForceSignHost:R}),Xe={Authorization:Ge,SecurityToken:Z.options.SecurityToken||Z.options.XCosSecurityToken};return F(null,Xe),Xe}();return""}function Je(r){var y=!1,u=!1,g=r.headers&&(r.headers.date||r.headers.Date)||r.error&&r.error.ServerTime;try{var R=r.error.Code,S=r.error.Message;(R==="RequestTimeTooSkewed"||R==="AccessDenied"&&S==="Request has expired")&&(u=!0)}catch{}if(r)if(u&&g){var F=Date.parse(g);this.options.CorrectClockSkew&&Math.abs(s.getSkewTime(this.options.SystemClockOffset)-F)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=F-Date.now(),y=!0)}else Math.floor(r.statusCode/100)===5&&(y=!0);return y}function Se(r,y){var u=this;!r.headers&&(r.headers={}),!r.qs&&(r.qs={}),r.VersionId&&(r.qs.versionId=r.VersionId),r.qs=s.clearKey(r.qs),r.headers&&(r.headers=s.clearKey(r.headers)),r.qs&&(r.qs=s.clearKey(r.qs));var g=s.clone(r.qs);r.action&&(g[r.action]="");var R=r.url||r.Url,S=r.SignHost||ke.call(this,{Bucket:r.Bucket,Region:r.Region,Url:R}),F=r.tracker,Z=function ve(Ke){var Me=u.options.SystemClockOffset;F&&F.setParams({signStartTime:new Date().getTime(),retryTimes:Ke-1}),qe.call(u,{Bucket:r.Bucket||"",Region:r.Region||"",Method:r.method,Key:r.Key,Query:g,Headers:r.headers,SignHost:S,Action:r.Action,ResourceKey:r.ResourceKey,Scope:r.Scope,ForceSignHost:u.options.ForceSignHost},function(_e,je){if(_e){y(_e);return}F&&F.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),r.AuthData=je,dt.call(u,r,function(rt,pt){F&&F.setParams({httpEndTime:new Date().getTime()}),rt&&Ke<2&&(Me!==u.options.SystemClockOffset||Je.call(u,rt))?(r.headers&&(delete r.headers.Authorization,delete r.headers.token,delete r.headers.clientIP,delete r.headers.clientUA,r.headers["x-cos-security-token"]&&delete r.headers["x-cos-security-token"],r.headers["x-ci-security-token"]&&delete r.headers["x-ci-security-token"]),ve(Ke+1)):y(rt,pt)})})};Z(1)}function dt(r,y){var u=this,g=r.TaskId;if(!(g&&!u._isRunningTask(g))){var R=r.Bucket,S=r.Region,F=r.Key,Z=r.method||"GET",ve=r.Url||r.url,Ke=r.body,Me=r.rawBody;u.options.UseAccelerate&&(S="accelerate"),ve=ve||te({ForcePathStyle:u.options.ForcePathStyle,protocol:u.options.Protocol,domain:u.options.Domain,bucket:R,region:S,object:F}),r.action&&(ve=ve+"?"+(s.isIOS_QQ?"".concat(r.action,"="):r.action)),r.qsStr&&(ve.indexOf("?")>-1?ve=ve+"&"+r.qsStr:ve=ve+"?"+r.qsStr);var _e={method:Z,url:ve,headers:r.headers,qs:r.qs,body:Ke},je="x-cos-security-token";if(s.isCIHost(ve)&&(je="x-ci-security-token"),_e.headers.Authorization=r.AuthData.Authorization,r.AuthData.Token&&(_e.headers.token=r.AuthData.Token),r.AuthData.ClientIP&&(_e.headers.clientIP=r.AuthData.ClientIP),r.AuthData.ClientUA&&(_e.headers.clientUA=r.AuthData.ClientUA),r.AuthData.SecurityToken&&(_e.headers[je]=r.AuthData.SecurityToken),_e.headers&&(_e.headers=s.clearKey(_e.headers)),_e=s.clearKey(_e),r.onProgress&&typeof r.onProgress=="function"){var rt=Ke&&(Ke.size||Ke.length)||0;_e.onProgress=function(Ge){if(!(g&&!u._isRunningTask(g))){var Xe=Ge?Ge.loaded:0;r.onProgress({loaded:Xe,total:rt})}}}r.onDownloadProgress&&(_e.onDownloadProgress=r.onDownloadProgress),r.DataType&&(_e.dataType=r.DataType),this.options.Timeout&&(_e.timeout=this.options.Timeout),u.options.ForcePathStyle&&(_e.pathStyle=u.options.ForcePathStyle),u.emit("before-send",_e);var pt=_e.url.includes("accelerate."),bt=_e.qs?Object.keys(_e.qs).map(function(Ge){return"".concat(Ge,"=").concat(_e.qs[Ge])}).join("&"):"",At=bt?_e.url+"?"+bt:_e.url;r.tracker&&r.tracker.setParams({reqUrl:At,accelerate:pt?"Y":"N"}),r.tracker&&r.tracker.parent&&r.tracker.parent.setParams({reqUrl:At,accelerate:pt?"Y":"N"});var gt=(u.options.Request||d)(_e,function(Ge){if(!(Ge&&Ge.error==="abort")){var Xe={options:_e,error:Ge&&Ge.error,statusCode:Ge&&Ge.statusCode||0,statusMessage:Ge&&Ge.statusMessage||"",headers:Ge&&Ge.headers||{},body:Ge&&Ge.body};u.emit("after-receive",Xe);var nt=Xe.error,ot=Xe.body,yt={statusCode:Xe.statusCode,statusMessage:Xe.statusMessage,headers:Xe.headers},Rt,xt=function(Bt,Tt){if(g&&u.off("inner-kill-task",Dt),!Rt){Rt=!0;var kt={};yt&&yt.statusCode&&(kt.statusCode=yt.statusCode),yt&&yt.headers&&(kt.headers=yt.headers),Bt?(Bt=s.extend(Bt||{},kt),y(Bt,null)):(Tt=s.extend(Tt||{},kt),y(null,Tt)),gt=null}};if(nt)return xt(s.error(nt));var wt=yt.statusCode,Ot=Math.floor(wt/100)===2;if(Me&&Ot)return xt(null,{body:ot});var St;try{St=ot&&ot.indexOf("<")>-1&&ot.indexOf(">")>-1&&s.xml2json(ot)||{}}catch{St={}}var Et=St&&St.Error;Ot?xt(null,St):Et?xt(s.error(new Error(Et.Message),{code:Et.Code,error:Et})):wt?xt(s.error(new Error(yt.statusMessage),{code:""+wt})):wt&&xt(s.error(new Error("statusCode error")))}}),Dt=function Ge(Xe){Xe.TaskId===g&&(gt&&gt.abort&&gt.abort(),u.off("inner-kill-task",Ge))};g&&u.on("inner-kill-task",Dt)}}var ht={getService:h,putBucket:_,headBucket:q,getBucket:O,deleteBucket:w,putBucketAcl:V,getBucketAcl:X,putBucketCors:ae,getBucketCors:G,deleteBucketCors:J,getBucketLocation:le,getBucketPolicy:De,putBucketPolicy:ie,deleteBucketPolicy:Q,putBucketTagging:x,getBucketTagging:b,deleteBucketTagging:ue,putBucketLifecycle:C,getBucketLifecycle:re,deleteBucketLifecycle:oe,putBucketVersioning:ee,getBucketVersioning:se,putBucketReplication:H,getBucketReplication:ne,deleteBucketReplication:ce,putBucketWebsite:de,getBucketWebsite:pe,deleteBucketWebsite:Ce,putBucketReferer:we,getBucketReferer:be,putBucketDomain:ye,getBucketDomain:Ee,deleteBucketDomain:xe,putBucketOrigin:Pe,getBucketOrigin:ge,deleteBucketOrigin:me,putBucketLogging:Re,getBucketLogging:Fe,putBucketInventory:Ie,postBucketInventory:Ne,getBucketInventory:Ue,listBucketInventory:He,deleteBucketInventory:Ve,putBucketAccelerate:ze,getBucketAccelerate:Ye,putBucketEncryption:tt,getBucketEncryption:Qe,deleteBucketEncryption:Ae,getObject:a,headObject:p,listObjectVersions:c,putObject:l,deleteObject:m,getObjectAcl:j,putObjectAcl:K,optionsObject:he,putObjectCopy:Be,deleteMultipleObject:fe,restoreObject:Le,putObjectTagging:$e,getObjectTagging:Ze,deleteObjectTagging:We,selectObjectContent:et,appendObject:vt,uploadPartCopy:Te,multipartInit:st,multipartUpload:ut,multipartComplete:ct,multipartList:it,multipartListPart:at,multipartAbort:lt,request:mt,getObjectUrl:f,getAuth:Ct};function ft(r,y,u){s.each(["Cors","Acl"],function(g){if(r.slice(-g.length)===g){var R=r.slice(0,-g.length)+g.toUpperCase(),S=s.apiWrapper(r,y),F=!1;u[R]=function(){!F&&console.warn("warning: cos."+R+" has been deprecated. Please Use cos."+r+" instead."),F=!0,S.apply(this,arguments)}}})}e.exports.init=function(r,y){y.transferToTaskMethod(ht,"putObject"),s.each(ht,function(u,g){r.prototype[g]=s.apiWrapper(g,u),ft(g,u,r.prototype)})}},"./src/cos.js":function(e,i,n){var o=n("./src/util.js"),d=n("./src/event.js"),s=n("./src/task.js"),h=n("./src/base.js"),_=n("./src/advance.js"),q=n("./package.json"),O={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:""},w=function(X){this.options=o.extend(o.clone(O),X||{}),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")),o.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")),d.init(this),s.init(this)};h.init(w,s),_.init(w,s),w.util={md5:o.md5,xml2json:o.xml2json,json2xml:o.json2xml,encodeBase64:o.encodeBase64},w.getAuthorization=o.getAuth,w.version=q.version,e.exports=w},"./src/event.js":function(e,i){var n=function(s){var h={},_=function(O){return!h[O]&&(h[O]=[]),h[O]};s.on=function(q,O){q==="task-list-update"&&console.warn('warning: Event "'+q+'" has been deprecated. Please use "list-update" instead.'),_(q).push(O)},s.off=function(q,O){for(var w=_(q),V=w.length-1;V>=0;V--)O===w[V]&&w.splice(V,1)},s.emit=function(q,O){for(var w=_(q).map(function(X){return X}),V=0;V<w.length;V++)w[V](O)}},o=function(){n(this)};e.exports.init=n,e.exports.EventProxy=o},"./src/session.js":function(e,i,n){var o=n("./src/util.js"),d="cos_sdk_upload_cache",s=30*24*3600,h,_,q=function(){try{var G=JSON.parse(localStorage.getItem(d))}catch{}G||(G=[]),h=G},O=function(){try{h.length?localStorage.setItem(d,JSON.stringify(h)):localStorage.removeItem(d)}catch{}},w=function(){if(!h){q.call(this);for(var G=!1,J=Math.round(Date.now()/1e3),le=h.length-1;le>=0;le--){var ie=h[le][2];(!ie||ie+s<J)&&(h.splice(le,1),G=!0)}G&&O()}},V=function(){_||(_=setTimeout(function(){O(),_=null},400))},X={using:{},setUsing:function(G){X.using[G]=!0},removeUsing:function(G){delete X.using[G]},getFileId:function(G,J,le,ie){return G.name&&G.size&&G.lastModifiedDate&&J?o.md5([G.name,G.size,G.lastModifiedDate,J,le,ie].join("::")):null},getCopyFileId:function(G,J,le,ie,De){var Q=J["content-length"],x=J.etag||"",b=J["last-modified"];return G&&le?o.md5([G,Q,x,b,le,ie,De].join("::")):null},getUploadIdList:function(G){if(!G)return null;w.call(this);for(var J=[],le=0;le<h.length;le++)h[le][0]===G&&J.push(h[le][1]);return J.length?J:null},saveUploadId:function(G,J,le){if(w.call(this),!!G){for(var ie=h.length-1;ie>=0;ie--){var De=h[ie];De[0]===G&&De[1]===J&&h.splice(ie,1)}h.unshift([G,J,Math.round(Date.now()/1e3)]),h.length>le&&h.splice(le),V()}},removeUploadId:function(G){w.call(this),delete X.using[G];for(var J=h.length-1;J>=0;J--)h[J][1]===G&&h.splice(J,1);V()}};e.exports=X},"./src/task.js":function(e,i,n){var o=n("./src/session.js"),d=n("./src/util.js"),s={},h=function(O,w){s[w]=O[w],O[w]=function(V,X){V.SkipTask?s[w].call(this,V,X):this._addTask(w,V,X)}},_=function(O){var w=[],V={},X=0,ae=0,G=function(b){var ue={id:b.id,Bucket:b.Bucket,Region:b.Region,Key:b.Key,FilePath:b.FilePath,state:b.state,loaded:b.loaded,size:b.size,speed:b.speed,percent:b.percent,hashPercent:b.hashPercent,error:b.error};return b.FilePath&&(ue.FilePath=b.FilePath),b._custom&&(ue._custom=b._custom),ue},J=function(){var x,b=function(){x=0,O.emit("task-list-update",{list:d.map(w,G)}),O.emit("list-update",{list:d.map(w,G)})};return function(){x||(x=setTimeout(b))}}(),le=function(){if(!(w.length<=O.options.UploadQueueSize)){for(var b=0;b<ae&&b<w.length&&w.length>O.options.UploadQueueSize;){var ue=w[b].state==="waiting"||w[b].state==="checking"||w[b].state==="uploading";!w[b]||!ue?(V[w[b].id]&&delete V[w[b].id],w.splice(b,1),ae--):b++}J()}},ie=function x(){if(!(X>=O.options.FileParallelLimit)){for(;w[ae]&&w[ae].state!=="waiting";)ae++;if(!(ae>=w.length)){var b=w[ae];ae++,X++,b.state="checking",b.params.onTaskStart&&b.params.onTaskStart(G(b)),!b.params.UploadData&&(b.params.UploadData={});var ue=d.formatParams(b.api,b.params);s[b.api].call(O,ue,function(C,re){!O._isRunningTask(b.id)||((b.state==="checking"||b.state==="uploading")&&(b.state=C?"error":"success",C&&(b.error=C),X--,J(),x(),b.callback&&b.callback(C,re),b.state==="success"&&(b.params&&(delete b.params.UploadData,delete b.params.Body,delete b.params),delete b.callback)),le())}),J(),setTimeout(x)}}},De=function(b,ue){var C=V[b];if(!!C){var re=C&&C.state==="waiting",oe=C&&(C.state==="checking"||C.state==="uploading");if(ue==="canceled"&&C.state!=="canceled"||ue==="paused"&&re||ue==="paused"&&oe){if(ue==="paused"&&C.params.Body&&typeof C.params.Body.pipe=="function"){console.error("stream not support pause");return}C.state=ue,O.emit("inner-kill-task",{TaskId:b,toState:ue});try{var ee=C&&C.params&&C.params.UploadData.UploadId}catch{}ue==="canceled"&&ee&&o.removeUsing(ee),J(),oe&&(X--,ie()),ue==="canceled"&&(C.params&&(delete C.params.UploadData,delete C.params.Body,delete C.params),delete C.callback)}le()}};O._addTasks=function(x){d.each(x,function(b){O._addTask(b.api,b.params,b.callback,!0)}),J()};var Q=!0;O._addTask=function(x,b,ue,C){b=d.formatParams(x,b);var re=d.uuid();b.TaskId=re,b.onTaskReady&&b.onTaskReady(re),b.TaskReady&&(b.TaskReady(re),Q&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),Q=!1);var oe={params:b,callback:ue,api:x,index:w.length,id:re,Bucket:b.Bucket,Region:b.Region,Key:b.Key,FilePath:b.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:b._custom},ee=b.onHashProgress;b.onHashProgress=function(H){!O._isRunningTask(oe.id)||(oe.hashPercent=H.percent,ee&&ee(H),J())};var se=b.onProgress;return b.onProgress=function(H){!O._isRunningTask(oe.id)||(oe.state==="checking"&&(oe.state="uploading"),oe.loaded=H.loaded,oe.speed=H.speed,oe.percent=H.percent,se&&se(H),J())},d.getFileSize(x,b,function(H,ne){if(H)return ue(d.error(H));V[re]=oe,w.push(oe),oe.size=ne,!C&&J(),ie(),le()}),re},O._isRunningTask=function(x){var b=V[x];return!!(b&&(b.state==="checking"||b.state==="uploading"))},O.getTaskList=function(){return d.map(w,G)},O.cancelTask=function(x){De(x,"canceled")},O.pauseTask=function(x){De(x,"paused")},O.restartTask=function(x){var b=V[x];b&&(b.state==="paused"||b.state==="error")&&(b.state="waiting",J(),ae=Math.min(ae,b.index),ie())},O.isUploadRunning=function(){return X||ae<w.length}};e.exports.transferToTaskMethod=h,e.exports.init=_},"./src/tracker.js":function(e,i,n){var o=n("./node_modules/@babel/runtime/helpers/classCallCheck.js"),d=n("./node_modules/@babel/runtime/helpers/createClass.js"),s=n("./node_modules/@babel/runtime/helpers/typeof.js"),h=n("./package.json"),_=null,q=function(x){if(!_){var b=n("./lib/beacon.min.js");_=new b({appkey:"0AND0VEVB24UBGDU",versionCode:h.version,channelID:"js_sdk",openid:"openid",unionid:"unid",strictMode:!1,delay:x,sessionDuration:60*1e3})}return _},O={getUid:function(){var x=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return x()+x()+"-"+x()+"-"+x()+"-"+x()+"-"+x()+x()+x()},getNetType:function(){if((typeof navigator=="undefined"?"undefined":s(navigator))==="object"){var x=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(x==null?void 0:x.type)||(x==null?void 0:x.effectiveType)||"unknown"}return"unknown"},getOsType:function(){if((typeof navigator=="undefined"?"undefined":s(navigator))!=="object")return"unknown os";var x=navigator.userAgent.toLowerCase(),b=/macintosh|mac os x/i.test(navigator.userAgent);return x.indexOf("win32")>=0||x.indexOf("wow32")>=0?"win32":x.indexOf("win64")>=0||x.indexOf("wow64")>=0?"win64":b?"mac":"unknown os"},isMobile:function(){var x=/(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":s(navigator))==="object"&&navigator.userAgent.match(x))},isAndroid:function(){var x=/(Android|Adr|Linux)/i;return!!((typeof navigator=="undefined"?"undefined":s(navigator))==="object"&&navigator.userAgent.match(x))},isIOS:function(){var x=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator=="undefined"?"undefined":s(navigator))==="object"&&navigator.userAgent.match(x))},isOtherMobile:function(){return isMobile&&!isAndroid&&!isIOS},getDeviceName:function(){if((typeof navigator=="undefined"?"undefined":s(navigator))!=="object")return"unknown device";var x=navigator.userAgent.toLowerCase();if(x.includes("app/tencent_wemeet"))return"tencent_wemeet";if(x.indexOf("maxthon")>=0){var b=x.match(/maxthon\/([\d.]+)/),ue=b&&b[1]||"";return"\u50B2\u6E38\u6D4F\u89C8\u5668 ".concat(ue).trim()}if(x.indexOf("qqbrowser")>=0){var C=x.match(/qqbrowser\/([\d.]+)/),re=C&&C[1]||"";return"QQ\u6D4F\u89C8\u5668 ".concat(re).trim()}if(x.indexOf("se 2.x")>=0)return"\u641C\u72D7\u6D4F\u89C8\u5668";if(x.indexOf("wxwork")>=0)return"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668";if(x.indexOf("msie")>=0){var oe=x.match(/msie ([\d.]+)/),ee=oe&&oe[1]||"";return"IE ".concat(ee).trim()}if(x.indexOf("firefox")>=0){var se=x.match(/firefox\/([\d.]+)/),H=se&&se[1]||"";return"Firefox ".concat(H).trim()}if(x.indexOf("chrome")>=0){var ne=x.match(/chrome\/([\d.]+)/),ce=ne&&ne[1]||"";return"Chrome ".concat(ce).trim()}if(x.indexOf("opera")>=0){var de=x.match(/opera.([\d.]+)/),pe=de&&de[1]||"";return"Opera ".concat(pe).trim()}if(x.indexOf("safari")>=0){var Ce=x.match(/version\/([\d.]+)/),we=Ce&&Ce[1]||"";return"Safari ".concat(we).trim()}if(x.indexOf("edge")>=0){var be=x.match(/edge\/([\d.]+)/),ye=be&&be[1]||"";return"edge ".concat(ye).trim()}return x.substr(0,200)}},w={isMobile:O.isMobile(),isBrowser:!O.isMobile(),mobileOsType:O.isAndroid()?"android":O.isIOS?"ios":"other_mobile",pcOsType:O.getOsType()},V={deviceType:w.isMobile?"mobile":w.isBrowser?"browser":"unknown",devicePlatform:w.isMobile?w.mobileOsType:w.pcOsType,deviceName:O.getDeviceName()},X=["multipartInit","multipartUpload","multipartComplete","multipartList","multipartListPart","multipartAbort"],ae=["putObject","postObject","appendObject","sliceUploadFile","uploadFile","uploadFiles"].concat(X),G=["getObject"];function J(Q){return ae.includes(Q)?"cos_upload":G.includes(Q)?"cos_download":"base_service"}function le(Q){return Q.replace(/([A-Z])/g,"_$1").toLowerCase()}function ie(Q){var x={},b=["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"],ue=["tracePlatform","cossdkVersion","region","bucket","appid","networkType","host","accelerate","requestPath","partNumber","size","name","result","tookTime","errorRequestId","retryTimes","reqUrl","customId","deviceType","devicePlatform","deviceName"],C=Q.result==="Success"?ue:b;for(var re in Q)if(!!C.includes(re)){var oe=le(re);x[oe]=Q[re]}return x}var De=function(){function Q(x){o(this,Q);var b=x.parent,ue=x.traceId,C=x.bucket,re=x.region,oe=x.apiName,ee=x.fileKey,se=x.fileSize,H=x.accelerate,ne=x.customId,ce=x.delay,de=x.deepTracker,pe=C&&C.substr(C.lastIndexOf("-")+1)||"";this.parent=b,this.deepTracker=de,this.delay=ce,this.params={cossdkVersion:h.version,region:re,networkType:"",host:"",accelerate:H?"Y":"N",requestPath:ee||"",size:se||-1,httpMd5:0,httpSign:0,httpFull:0,name:oe||"",result:"",tookTime:0,errorNode:"",errorCode:"",errorMessage:"",errorRequestId:"",errorStatusCode:0,errorServiceName:"",tracePlatform:"cos-js-sdk-v5",traceId:ue||O.getUid(),bucket:C,appid:pe,partNumber:0,retryTimes:0,reqUrl:"",customId:ne||"",deviceType:V.deviceType,devicePlatform:V.devicePlatform,deviceName:V.deviceName,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0},this.beacon=q(ce)}return d(Q,[{key:"formatResult",value:function(b,ue){var C,re,oe,ee,se,H,ne=new Date().getTime(),ce=ne-this.params.startTime,de=O.getNetType(),pe=b?(b==null?void 0:b.code)||(b==null||(C=b.error)===null||C===void 0?void 0:C.code)||(b==null||(re=b.error)===null||re===void 0?void 0:re.Code):"",Ce=b?(b==null?void 0:b.message)||(b==null||(oe=b.error)===null||oe===void 0?void 0:oe.message)||(b==null||(ee=b.error)===null||ee===void 0?void 0:ee.Message):"",we=b?(b==null?void 0:b.resource)||(b==null||(se=b.error)===null||se===void 0?void 0:se.resource)||(b==null||(H=b.error)===null||H===void 0?void 0:H.Resource):"",be=b?b==null?void 0:b.statusCode:ue.statusCode,ye=b?(b==null?void 0:b.headers)&&(b==null?void 0:b.headers["x-cos-request-id"]):(ue==null?void 0:ue.headers)&&(ue==null?void 0:ue.headers["x-cos-request-id"]),Ee=b?ye?"Server":"Client":"";if(Object.assign(this.params,{tookTime:ce,networkType:de,httpMd5:this.params.md5EndTime-this.params.md5StartTime,httpSign:this.params.signEndTime-this.params.signStartTime,httpFull:this.params.httpEndTime-this.params.httpStartTime,result:b?"Fail":"Success",errorType:Ee,errorCode:pe,errorStatusCode:be,errorMessage:Ce,errorServiceName:we,errorRequestId:ye}),b&&(!pe||!Ce)&&(this.params.fullError=b?JSON.stringify(b):""),this.params.name==="getObject"&&(this.params.size=ue?ue.headers&&ue.headers["content-length"]:-1),this.params.reqUrl)try{var xe=/^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl);this.params.host=xe[2]}catch{this.params.host=this.params.reqUrl}this.sendEvents()}},{key:"setParams",value:function(b){Object.assign(this.params,b)}},{key:"sendEvents",value:function(){if(!(X.includes(this.params.name)&&!this.deepTracker)){var b=J(this.params.name),ue=ie(this.params);this.beacon||(this.beacon=q(this.delay||5e3)),this.delay===0?this.beacon&&this.beacon.onDirectUserAction(b,ue):this.beacon&&this.beacon.onUserAction(b,ue)}}},{key:"generateSubTracker",value:function(b){return Object.assign(b,{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 Q(b)}}]),Q}();e.exports=De},"./src/util.js":function(e,i,n){(function(o){var d=n("./node_modules/@babel/runtime/helpers/typeof.js"),s=n("./lib/md5.js"),h=n("./lib/crypto.js"),_=n("./lib/xml2json.js"),q=n("./lib/json2xml.js"),O=n("./lib/base64.js"),w=n("./src/tracker.js");function V(Ae){return encodeURIComponent(Ae).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function X(Ae,p){var c=[];for(var a in Ae)Ae.hasOwnProperty(a)&&c.push(p?V(a).toLowerCase():a);return c.sort(function(l,m){return l=l.toLowerCase(),m=m.toLowerCase(),l===m?0:l>m?1:-1})}var ae=function(p,c){var a,l,m,j=[],K=X(p);for(a=0;a<K.length;a++)l=K[a],m=p[l]===void 0||p[l]===null?"":""+p[l],l=c?V(l).toLowerCase():V(l),m=V(m)||"",j.push(l+"="+m);return j.join("&")},G=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding"],J=function(p){var c={};for(var a in p){var l=a.toLowerCase();(l.indexOf("x-cos-")>-1||G.indexOf(l)>-1)&&(c[a]=p[a])}return c},le=function(p){p=p||{};var c=p.SecretId,a=p.SecretKey,l=p.KeyTime,m=(p.method||p.Method||"get").toLowerCase(),j=ne(p.Query||p.params||{}),K=J(ne(p.Headers||p.headers||{})),he=p.Key||"",Be;p.UseRawKey?Be=p.Pathname||p.pathname||"/"+he:(Be=p.Pathname||p.pathname||he,Be.indexOf("/")!==0&&(Be="/"+Be));var Te=p.ForceSignHost!==!1;if(!K.Host&&!K.host&&p.Bucket&&p.Region&&Te&&(K.Host=p.Bucket+".cos."+p.Region+".myqcloud.com"),!c)throw new Error("missing param SecretId");if(!a)throw new Error("missing param SecretKey");var fe=Math.round(Ie(p.SystemClockOffset)/1e3)-1,Le=fe,$e=p.Expires||p.expires;$e===void 0?Le+=900:Le+=$e*1||0;var Ze="sha1",We=c,et=l||fe+";"+Le,st=l||fe+";"+Le,ut=X(K,!0).join(";").toLowerCase(),ct=X(j,!0).join(";").toLowerCase(),it=h.HmacSHA1(st,a).toString(),at=[m,Be,Qe.obj2str(j,!0),Qe.obj2str(K,!0),""].join(`
  18. `),lt=["sha1",et,h.SHA1(at).toString(),""].join(`
  19. `),mt=h.HmacSHA1(lt,it).toString(),vt=["q-sign-algorithm="+Ze,"q-ak="+We,"q-sign-time="+et,"q-key-time="+st,"q-header-list="+ut,"q-url-param-list="+ct,"q-signature="+mt].join("&");return vt},ie=function(p,c,a){var l=c/8,m=p.slice(a,a+l);return new Uint8Array(m).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[c](m)[0]},De=function(p,c,a,l){var m=p.slice(c,a),j="";return new Uint8Array(m).forEach(function(K){j+=String.fromCharCode(K)}),l&&(j=decodeURIComponent(escape(j))),j},Q=function(p){for(var c={},a=De(p),l={records:[]};p.byteLength;){var m=ie(p,32,0),j=ie(p,32,4),K=m-j-16,he=0,Be;for(p=p.slice(12);he<j;){var Te=ie(p,8,he),fe=De(p,he+1,he+1+Te),Le=ie(p,16,he+Te+2),$e=De(p,he+Te+4,he+Te+4+Le);c[fe]=$e,he+=Te+4+Le}if(c[":event-type"]==="Records")Be=De(p,he,he+K,!0),l.records.push(Be);else if(c[":event-type"]==="Stats")Be=De(p,he,he+K,!0),l.stats=Qe.xml2json(Be).Stats;else if(c[":event-type"]==="error"){var Ze=c[":error-code"],We=c[":error-message"],et=new Error(We);et.message=We,et.name=et.code=Ze,l.error=et}p=p.slice(he+K+4)}return{payload:l.records.join(""),body:a}},x=function(p){var c=this.options.CopySourceParser;if(c)return c(p);var a=p.match(/^([^.]+-\d+)\.cos(v6|-cdc|-cdz|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return a?{Bucket:a[1],Region:a[3],Key:a[7]}:null},b=function(){},ue=function(p){var c={};for(var a in p)p.hasOwnProperty(a)&&p[a]!==void 0&&p[a]!==null&&(c[a]=p[a]);return c},C=function(p,c){var a,l=new FileReader;FileReader.prototype.readAsBinaryString?(a=FileReader.prototype.readAsBinaryString,l.onload=function(){c(this.result)}):FileReader.prototype.readAsArrayBuffer?a=function(j){var K="",he=new FileReader;he.onload=function(Be){for(var Te=new Uint8Array(he.result),fe=Te.byteLength,Le=0;Le<fe;Le++)K+=String.fromCharCode(Te[Le]);c(K)},he.readAsArrayBuffer(j)}:console.error("FileReader not support readAsBinaryString"),a.call(l,p)},re=function(){var Ae=function(a,l){a=a.split("."),l=l.split(".");for(var m=0;m<l.length;m++)if(a[m]!==l[m])return parseInt(a[m])>parseInt(l[m])?1:-1;return 0},p=function(a){if(!a)return!1;var l=(a.match(/Chrome\/([.\d]+)/)||[])[1],m=(a.match(/QBCore\/([.\d]+)/)||[])[1],j=(a.match(/QQBrowser\/([.\d]+)/)||[])[1],K=l&&Ae(l,"53.0.2785.116")<0&&m&&Ae(m,"3.53.991.400")<0&&j&&Ae(j,"9.0.2524.400")<=0||!1;return K};return p(typeof navigator!="undefined"&&navigator.userAgent)}(),oe=function(p,c,a,l,m){var j;if(p.slice?j=p.slice(c,a):p.mozSlice?j=p.mozSlice(c,a):p.webkitSlice&&(j=p.webkitSlice(c,a)),l&&re){var K=new FileReader;K.onload=function(he){j=null,m(new Blob([K.result]))},K.readAsArrayBuffer(j)}else m(j)},ee=function(p,c,a,l){a=a||b,p?typeof c=="string"?a(Qe.md5(c,!0)):Blob&&c instanceof Blob?Qe.getFileMd5(c,function(m,j){a(j)},l):a():a()},se=1024*1024,H=function(p,c,a){var l=p.size,m=0,j=s.getCtx(),K=function he(Be){if(Be>=l){var Te=j.digest("hex");c(null,Te);return}var fe=Math.min(l,Be+se);Qe.fileSlice(p,Be,fe,!1,function(Le){C(Le,function($e){Le=null,j=j.update($e,!0),m+=$e.length,$e=null,a&&a({loaded:m,total:l,percent:Math.round(m/l*1e4)/1e4}),he(Be+se)})})};K(0)};function ne(Ae){return ye(Ae,function(p){return d(p)==="object"&&p!==null?ne(p):p})}function ce(Ae,p,c){return Ae&&p in Ae?Ae[p]:c}function de(Ae,p){return be(p,function(c,a){Ae[a]=p[a]}),Ae}function pe(Ae){return Ae instanceof Array}function Ce(Ae,p){for(var c=!1,a=0;a<Ae.length;a++)if(p===Ae[a]){c=!0;break}return c}function we(Ae){return pe(Ae)?Ae:[Ae]}function be(Ae,p){for(var c in Ae)Ae.hasOwnProperty(c)&&p(Ae[c],c)}function ye(Ae,p){var c=pe(Ae)?[]:{};for(var a in Ae)Ae.hasOwnProperty(a)&&(c[a]=p(Ae[a],a));return c}function Ee(Ae,p){var c=pe(Ae),a=c?[]:{};for(var l in Ae)Ae.hasOwnProperty(l)&&p(Ae[l],l)&&(c?a.push(Ae[l]):a[l]=Ae[l]);return a}var xe=function(p){var c,a,l,m="";for(c=0,a=p.length/2;c<a;c++)l=parseInt(p[c*2]+p[c*2+1],16),m+=String.fromCharCode(l);return btoa(m)},Pe=function(){var p=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return p()+p()+"-"+p()+"-"+p()+"-"+p()+"-"+p()+p()+p()},ge=function(p,c){var a=c.Bucket,l=c.Region,m=c.Key,j=this.options.Domain,K=!j||typeof j=="string"&&j.indexOf("{Bucket}")>-1,he=!j||typeof j=="string"&&j.indexOf("{Region}")>-1;if(p.indexOf("Bucket")>-1||p==="deleteMultipleObject"||p==="multipartList"||p==="listObjectVersions"){if(K&&!a)return"Bucket";if(he&&!l)return"Region"}else if(p.indexOf("Object")>-1||p.indexOf("multipart")>-1||p==="sliceUploadFile"||p==="abortUploadTask"){if(K&&!a)return"Bucket";if(he&&!l)return"Region";if(!m)return"Key"}return!1},me=function(p,c){if(c=de({},c),p!=="getAuth"&&p!=="getV4Auth"&&p!=="getObjectUrl"){var a=c.Headers||{};if(c&&d(c)==="object"){(function(){for(var m in c)c.hasOwnProperty(m)&&m.indexOf("x-cos-")>-1&&(a[m]=c[m])})();var l={"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"};Qe.each(l,function(m,j){c[m]!==void 0&&(a[j]=c[m])}),c.Headers=ue(a)}}return c},Re=function(p,c){return function(a,l){var m=this;typeof a=="function"&&(l=a,a={}),a=me(p,a);var j;if(m.options.EnableTracker)if(a.calledBySdk==="sliceUploadFile")j=a.tracker&&a.tracker.generateSubTracker({apiName:p});else if(["uploadFile","uploadFiles"].includes(p))j=null;else{var K=-1;a.Body&&(K=typeof a.Body=="string"?a.Body.length:a.Body.size||a.Body.byteLength||-1),j=new w({bucket:a.Bucket,region:a.Region,apiName:p,fileKey:a.Key,fileSize:K,deepTracker:m.options.DeepTracker,customId:m.options.CustomId,delay:m.options.TrackerDelay})}a.tracker=j;var he=function(We){return We&&We.headers&&(We.headers["x-cos-request-id"]&&(We.RequestId=We.headers["x-cos-request-id"]),We.headers["x-ci-request-id"]&&(We.RequestId=We.headers["x-ci-request-id"]),We.headers["x-cos-version-id"]&&(We.VersionId=We.headers["x-cos-version-id"]),We.headers["x-cos-delete-marker"]&&(We.DeleteMarker=We.headers["x-cos-delete-marker"])),We},Be=function(We,et){j&&j.formatResult(We,et),l&&l(he(We),he(et))},Te=function(){if(p!=="getService"&&p!=="abortUploadTask"){var We=ge.call(m,p,a);if(We)return"missing param "+We;if(a.Region){if(m.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(a.Region))return"Region format error."}else{if(a.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(a.Region))return"Region format error."}!m.options.CompatibilityMode&&a.Region.indexOf("-")===-1&&a.Region!=="yfb"&&a.Region!=="default"&&a.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(a.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(a.Bucket))if(a.AppId)a.Bucket=a.Bucket+"-"+a.AppId;else if(m.options.AppId)a.Bucket=a.Bucket+"-"+m.options.AppId;else return'Bucket should format as "test-1250000000".';a.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete a.AppId)}!m.options.UseRawKey&&a.Key&&a.Key.substr(0,1)==="/"&&(a.Key=a.Key.substr(1))}},fe=Te(),Le=["getAuth","getObjectUrl"].includes(p);if(typeof Promise=="function"&&!Le&&!l)return new Promise(function(Ze,We){if(l=function(st,ut){st?We(st):Ze(ut)},fe)return Be(Qe.error(new Error(fe)));c.call(m,a,Be)});if(fe)return Be(Qe.error(new Error(fe)));var $e=c.call(m,a,Be);if(Le)return $e}},Fe=function(p,c){var a=this,l=0,m=0,j=Date.now(),K,he;function Be(){if(he=0,c&&typeof c=="function"){K=Date.now();var Te=Math.max(0,Math.round((m-l)/((K-j)/1e3)*100)/100)||0,fe;m===0&&p===0?fe=1:fe=Math.floor(m/p*100)/100||0,j=K,l=m;try{c({loaded:m,total:p,speed:Te,percent:fe})}catch{}}}return function(Te,fe){if(Te&&(m=Te.loaded,p=Te.total),fe)clearTimeout(he),Be();else{if(he)return;he=setTimeout(Be,a.options.ProgressInterval)}}},Oe=function(p,c,a){var l;if(typeof c.Body=="string"?c.Body=new Blob([c.Body],{type:"text/plain"}):c.Body instanceof ArrayBuffer&&(c.Body=new Blob([c.Body])),c.Body&&(c.Body instanceof Blob||c.Body.toString()==="[object File]"||c.Body.toString()==="[object Blob]"))l=c.Body.size;else{a(Qe.error(new Error("params body format error, Only allow File|Blob|String.")));return}c.ContentLength=l,a(null,l)},Ie=function(p){return Date.now()+(p||0)},Ne=function(p,c){var a=p;return p.message=p.message||null,typeof c=="string"?(p.error=c,p.message=c):d(c)==="object"&&c!==null&&(de(p,c),(c.code||c.name)&&(p.code=c.code||c.name),c.message&&(p.message=c.message),c.stack&&(p.stack=c.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(p,"name",{writable:!0,enumerable:!1}),Object.defineProperty(p,"message",{enumerable:!0})),p.name=c&&c.name||p.name||p.code||"Error",p.code||(p.code=p.name),p.error||(p.error=ne(a)),p},Ue=function(){return(typeof globalThis=="undefined"?"undefined":d(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},He=function(){return(typeof window=="undefined"?"undefined":d(window))!=="object"&&(typeof o=="undefined"?"undefined":d(o))==="object"&&!0&&!Ue()},Ve=function(p){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(p)},ze=function(){if((typeof navigator=="undefined"?"undefined":d(navigator))!=="object")return!1;var Ae=navigator.userAgent,p=!!Ae.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return p}(),Ye=function(){return(typeof navigator=="undefined"?"undefined":d(navigator))!=="object"?!1:/\sQQ/i.test(navigator.userAgent)}(),tt=function(p,c){var a=O.encode(p);return c&&(a=a.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),a},Qe={noop:b,formatParams:me,apiWrapper:Re,xml2json:_,json2xml:q,md5:s,clearKey:ue,fileSlice:oe,getBodyMd5:ee,getFileMd5:H,b64:xe,extend:de,isArray:pe,isInArray:Ce,makeArray:we,each:be,map:ye,filter:Ee,clone:ne,attr:ce,uuid:Pe,camSafeUrlEncode:V,throttleOnProgress:Fe,getFileSize:Oe,getSkewTime:Ie,error:Ne,obj2str:ae,getAuth:le,parseSelectPayload:Q,getSourceParams:x,isBrowser:!0,isNode:He,isCIHost:Ve,isIOS_QQ:ze&&Ye,encodeBase64:tt};e.exports=Qe}).call(this,n("./node_modules/process/browser.js"))}})})})(cosJsSdkV5);var COS=getDefaultExportFromCjs(cosJsSdkV5.exports);const ossSwitch="tencent",tencentBucket="daya-online-1303457149",getUploadSign=async(e,i=!1)=>{const{bucketName:n,filename:o,postData:d}=e,s=ossSwitch;let h=n,_=o,q={};return h=tencentBucket,_="klx/"+o,q={key:"klx/"+d.key},request.post(state.platformApi+"/open/getUploadSign",{hideLoading:i,data:{postData:q,pluginName:s,bucketName:h,filename:_},params:{pluginName:s}})},onOnlyFileUpload=async(e,i)=>{{let n="",o=null;if(await new COS({Domain:"https://oss.dayaedu.com",getAuthorization:async(s,h)=>{h({Authorization:i.signature})}}).uploadFile({Bucket:tencentBucket,Region:"ap-nanjing",Key:`klx/${i.name}`,Body:i.file,SliceSize:1024*1024*500}).then(s=>{var h;((h=s.Location)==null?void 0:h.indexOf("http"))>=0?n=s.Location:n="https://"+s.Location}).catch(s=>{o=s}),n)return n;throw new Error(o)}};var ColUpload=defineComponent({name:"col-upload",props:{modelValue:String,tips:{type:String,default:"\u70B9\u51FB\u4E0A\u4F20"},deletable:{type:Boolean,default:!0},native:{type:Boolean,default:!1},cropper:{type:Boolean,default:!1},options:{type:Object,default:{}},uploadSize:{type:Number,default:5},onUploadChange:{type:Function,default:e=>{}},bucket:{type:String,default:"daya"},disabled:{type:Boolean,default:!1},hasDeviceAuth:{type:Boolean,default:!0}},methods:{nativeUpload(){this.disabled||postMessage({api:"chooseFile",content:{type:"img",max:1,bucket:this.bucket}},e=>{console.log(e,"fileUrl"),this.$emit("update:modelValue",e.fileUrl)})},beforeRead(e){return console.log(e,"beforeRead"),e.size/1024/1024<this.uploadSize?!0:(Toast(`\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7 ${this.uploadSize}MB`),!1)},beforeDelete(e,i){return!0},async afterRead(e,i){try{e.status="uploading",e.message="\u4E0A\u4F20\u4E2D...",await this.uploadFile(e.file)}catch(n){console.log(n,"2323"),Toast.clear()}},onClose(e){this.$emit("update:modelValue",null),this.onUploadChange(),e.stopPropagation()},async getFile(e){try{await this.uploadFile(e)}catch{}},async uploadFile(e){try{const i=e.name||"",n=i&&i.replace(/ /gi,"_"),o=new Date().getTime()+n;console.log(e);const{data:d}=await getUploadSign({filename:o,bucketName:this.bucket,postData:{filename:o,acl:"public-read",key:o}});Toast.loading({message:"\u52A0\u8F7D\u4E2D...",forbidClick:!0,loadingType:"spinner",duration:0});const s={policy:d.policy,signature:d.signature,key:o,KSSAccessKeyId:d.kssAccessKeyId,acl:"public-read",name:o,file:e},h=await onOnlyFileUpload(getOssUploadUrl(this.bucket),s);Toast.clear(),this.$emit("update:modelValue",h),this.onUploadChange(h)}catch(i){console.log(i,"uploadFile")}}},render(){return useCustomFieldValue(()=>this.modelValue),createVNode("div",{class:styles$1["uploader-section"]},[this.modelValue&&!this.disabled&&this.deletable?createVNode(Icon,{name:iconDelete,onClick:this.onClose,class:styles$1["img-close"]},null):null,this.cropper&&!this.native?createVNode("div",{class:styles$1["col-uploader"]},[this.modelValue?createVNode(Image$1,{fit:"cover",position:"center",class:styles$1.uploadImg,src:this.modelValue},null):createVNode("div",{class:styles$1.uploader},[createVNode(Icon,{name:iconUploader,size:"32"},null),this.tips&&createVNode("p",{class:styles$1.uploaderText},[this.tips])]),this.hasDeviceAuth&&createVNode(ColCropper,{disabled:this.disabled,option:this.options,getFile:this.getFile},null)]):this.native?createVNode("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},onClick:this.nativeUpload},[this.modelValue?createVNode(Image$1,{fit:"cover",position:"center",class:styles$1.uploadImg,src:this.modelValue},null):createVNode("div",{class:styles$1.uploader},[createVNode(Icon,{name:iconUploader,size:"32"},null),this.tips&&createVNode("p",{class:styles$1.uploaderText},[this.tips])])]):createVNode(Uploader,{afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,disabled:this.disabled},{default:()=>this.modelValue?createVNode(Image$1,{fit:"cover",position:"center",class:styles$1.uploadImg,src:this.modelValue},null):createVNode("div",{class:styles$1.uploader},[createVNode(Icon,{name:iconUploader,size:"32"},null),this.tips&&createVNode("p",{class:styles$1.uploaderText},[this.tips])])})])}});export{ColUpload as C,Uploader as U,getUploadSign as g,onOnlyFileUpload as o};