12345678910111213141516171819 |
- import{c as createNamespace,b9 as toArray,ba as isFunction,d as defineComponent,n as numericProp,bb as makeRequiredProp,a as createVNode,I as Icon,L as Loading,aC as getSizeStyle,Y as isDef,a1 as callInterceptor,ad as extend,b as makeNumericProp,m as makeStringProp,t as truthProp,ac as makeArrayProp,r as ref,av as onBeforeUnmount,Z as useExpose,a5 as useCustomFieldValue,g as withDirectives,v as vShow,bc as isPromise,af as pick,h as mergeProps,x as reactive,k as withInstall,aJ as openBlock,aK as createElementBlock,bd as createBaseVNode,aL as normalizeStyle,be as createCommentVNode,bf as normalizeClass,bg as toDisplayString,am as commonjsGlobal,aj as getDefaultExportFromCjs,D as request,U as postMessage,N as showToast,aP as closeToast,ar as showLoadingToast,bh as getOssUploadUrl,F as Fragment,P as useRoute,q as useRouter,y as onMounted,V as MHeader,A as createTextVNode,C as Button}from"./index-869d77fb.js";import{M as MSticky}from"./index-3eb77ad0.js";import{s as showImagePreview}from"./index-99b77dee.js";import{I as Image$1}from"./index-e76f2a88.js";import{a as api_userMusicDetail,v as videoBg$1,d as api_userMusicSave}from"./video-bg-baa82a7b.js";import{F as Field}from"./index-0153d173.js";import"./index-155c29c2.js";import"./index-d45dfe1a.js";import"./index-1c6c2ec0.js";const[name,bem,t]=createNamespace("uploader");function readFileContent(e,n){return new Promise(o=>{if(n==="file"){o();return}const i=new FileReader;i.onload=l=>{o(l.target.result)},n==="dataUrl"?i.readAsDataURL(e):n==="text"&&i.readAsText(e)})}function isOversize(e,n){return toArray(e).some(o=>o.file?isFunction(n)?n(o.file):o.file.size>+n:!1)}function filterFiles(e,n){const o=[],i=[];return e.forEach(l=>{isOversize(l,n)?i.push(l):o.push(l)}),{valid:o,invalid:i}}const IMAGE_REGEXP=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/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,reupload:Boolean,previewSize:[Number,String,Array],beforeDelete:Function},emits:["delete","preview","reupload"],setup(e,{emit:n,slots:o}){const i=()=>{const{status:x,message:V}=e.item;if(x==="uploading"||x==="failed"){const X=x==="failed"?createVNode(Icon,{name:"close",class:bem("mask-icon")},null):createVNode(Loading,{class:bem("loading")},null),ue=isDef(V)&&V!=="";return createVNode("div",{class:bem("mask")},[X,ue&&createVNode("div",{class:bem("mask-message")},[V])])}},l=x=>{const{name:V,item:X,index:ue,beforeDelete:G}=e;x.stopPropagation(),callInterceptor(G,{args:[X,{name:V,index:ue}],done:()=>n("delete")})},s=()=>n("preview"),h=()=>n("reupload"),_=()=>{if(e.deletable&&e.item.status!=="uploading"){const x=o["preview-delete"];return createVNode("div",{role:"button",class:bem("preview-delete",{shadow:!x}),tabindex:0,"aria-label":t("delete"),onClick:l},[x?x():createVNode(Icon,{name:"cross",class:bem("preview-delete-icon")},null)])}},j=()=>{if(o["preview-cover"]){const{index:x,item:V}=e;return createVNode("div",{class:bem("preview-cover")},[o["preview-cover"](extend({index:x},V))])}},O=()=>{const{item:x,lazyLoad:V,imageFit:X,previewSize:ue,reupload:G}=e;return isImageFile(x)?createVNode(Image$1,{fit:X,src:x.content||x.url,class:bem("preview-image"),width:Array.isArray(ue)?ue[0]:ue,height:Array.isArray(ue)?ue[1]:ue,lazyLoad:V,onClick:G?h:s},{default:j}):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"]},[x.file?x.file.name:x.url]),j()])};return()=>createVNode("div",{class:bem("preview")},[O(),i(),_()])}});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,reupload:Boolean,afterRead:Function,showUpload:truthProp,modelValue:makeArrayProp(),beforeRead:Function,beforeDelete:Function,previewSize:[Number,String,Array],previewImage:truthProp,previewOptions:Object,previewFullImage:truthProp,maxSize:{type:[Number,String,Function],default:1/0}};var stdin_default=defineComponent({name,props:uploaderProps,emits:["delete","oversize","clickUpload","closePreview","clickPreview","clickReupload","update:modelValue"],setup(e,{emit:n,slots:o}){const i=ref(),l=[],s=ref(-1),h=(Q=e.modelValue.length)=>({name:e.name,index:Q}),_=()=>{i.value&&(i.value.value="")},j=Q=>{if(_(),isOversize(Q,e.maxSize))if(Array.isArray(Q)){const m=filterFiles(Q,e.maxSize);if(Q=m.valid,n("oversize",m.invalid,h()),!Q.length)return}else{n("oversize",Q,h());return}if(Q=reactive(Q),s.value>-1){const m=[...e.modelValue];m.splice(s.value,1,Q),n("update:modelValue",m),s.value=-1}else n("update:modelValue",[...e.modelValue,...toArray(Q)]);e.afterRead&&e.afterRead(Q,h())},O=Q=>{const{maxCount:m,modelValue:oe,resultType:re}=e;if(Array.isArray(Q)){const te=+m-oe.length;Q.length>te&&(Q=Q.slice(0,te)),Promise.all(Q.map(ie=>readFileContent(ie,re))).then(ie=>{const q=Q.map((se,ce)=>{const le={file:se,status:"",message:""};return ie[ce]&&(le.content=ie[ce]),le});j(q)})}else readFileContent(Q,re).then(te=>{const ie={file:Q,status:"",message:""};te&&(ie.content=te),j(ie)})},x=Q=>{const{files:m}=Q.target;if(e.disabled||!m||!m.length)return;const oe=m.length===1?m[0]:[].slice.call(m);if(e.beforeRead){const re=e.beforeRead(oe,h());if(!re){_();return}if(isPromise(re)){re.then(te=>{O(te||oe)}).catch(_);return}}O(oe)};let V;const X=()=>n("closePreview"),ue=Q=>{if(e.previewFullImage){const m=e.modelValue.filter(isImageFile),oe=m.map(re=>(re.file&&!re.url&&re.status!=="failed"&&(re.url=URL.createObjectURL(re.file),l.push(re.url)),re.url)).filter(Boolean);V=showImagePreview(extend({images:oe,startPosition:m.indexOf(Q),onClose:X},e.previewOptions))}},G=()=>{V&&V.close()},Z=(Q,m)=>{const oe=e.modelValue.slice(0);oe.splice(m,1),n("update:modelValue",oe),n("delete",Q,h(m))},de=Q=>{b(),s.value=Q},ae=(Q,m)=>{const oe=["imageFit","deletable","reupload","previewSize","beforeDelete"],re=extend(pick(e,oe),pick(Q,oe,!0));return createVNode(stdin_default$1,mergeProps({item:Q,index:m,onClick:()=>n(e.reupload?"clickReupload":"clickPreview",Q,h(m)),onDelete:()=>Z(Q,m),onPreview:()=>ue(Q),onReupload:()=>de(m)},pick(e,["name","lazyLoad"]),re),pick(o,["preview-cover","preview-delete"]))},De=()=>{if(e.previewImage)return e.modelValue.map(ae)},J=Q=>n("clickUpload",Q),R=()=>{if(e.modelValue.length>=+e.maxCount&&!e.reupload)return;const Q=e.modelValue.length>=+e.maxCount&&e.reupload,m=e.readonly?null:createVNode("input",{ref:i,type:"file",class:bem("input"),accept:e.accept,capture:e.capture,multiple:e.multiple&&s.value===-1,disabled:e.disabled,onChange:x},null);return o.default?withDirectives(createVNode("div",{class:bem("input-wrapper"),onClick:J},[o.default(),m]),[[vShow,!Q]]):withDirectives(createVNode("div",{class:bem("upload",{readonly:e.readonly}),style:getSizeStyle(e.previewSize),onClick:J},[createVNode(Icon,{name:e.uploadIcon,class:bem("upload-icon")},null),e.uploadText&&createVNode("span",{class:bem("upload-text")},[e.uploadText]),m]),[[vShow,e.showUpload&&!Q]])},b=()=>{i.value&&!e.disabled&&i.value.click()};return onBeforeUnmount(()=>{l.forEach(Q=>URL.revokeObjectURL(Q))}),useExpose({chooseFile:b,closeImagePreview:G}),useCustomFieldValue(()=>e.modelValue),()=>createVNode("div",{class:bem()},[createVNode("div",{class:bem("wrapper",{disabled:e.disabled})},[De(),R()])])}});const Uploader=withInstall(stdin_default),sectionVideo="_sectionVideo_10cag_1",videoBg="_videoBg_10cag_7",btnGroup="_btnGroup_10cag_13",btnCropper="_btnCropper_10cag_37",btnImg="_btnImg_10cag_49",section="_section_10cag_1",sectionFile="_sectionFile_10cag_80",muploader="_muploader_10cag_96",uploadImg$1="_uploadImg_10cag_118",tip="_tip_10cag_123",musicDetail="_musicDetail_10cag_149",musicName="_musicName_10cag_154",username="_username_10cag_160",styles$2={sectionVideo,videoBg,btnGroup,btnCropper,btnImg,section,sectionFile,muploader,uploadImg:uploadImg$1,tip,musicDetail,musicName,username},singleImgClose="_singleImgClose_1nczn_25",uploader="_uploader_1nczn_1",previewImg="_previewImg_1nczn_37",uploadImg="_uploadImg_1nczn_43",styles$1={"uploader-section":"_uploader-section_1nczn_1","img-close":"_img-close_1nczn_9",singleImgClose,uploader,default:"_default_1nczn_32",previewImg,uploadImg},iconUploader="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAACYCAMAAAAvHNATAAABOFBMVEUAAADa2tr39/f////a2tr39/fa2trZ2dnV1dX5+fn5+fnp6en29vbZ2dn4+Pjo6OjZ2dk9PT2ZmZmXl5f29vbx8fHk5OTh4eHq6urOzs66urrBwcH19fW1tbXz8/Ps7Oza2trm5uaysrJERETe3t6vr6/g4ODV1dW+vr6cnJzc3Nwly7zv7++np6fQ0NDKyspA0sHJycnFxcU50L8pzL2dnZ3w8PDu7u40z78gyru4uLirq6tKSkovzb5iYmJZWVnGxsY80cCurq6qqqqfn59paWnX19dF1MJBQUHT09Nz3dBp2s/MzMzDw8MbyLqjo6OhoaGSkpJa1spL1MWMjIyHh4dwcHBSUlJMTExi2M3w9vbb8u/U1NR7e3tycnJR1cfn9fON4th839J/f3/M7uvG7um76+eX5Nt5K7d4AAAADnRSTlMA8s8Gx2xszwbyx8cbGz8Ohn8AAAbPSURBVHja7NppU9pQFMbx2M2uT3IwgYzVACUuBWqxOIBWiejgOqgoirtVu3z/b9AT9aqg1vEGhjtTfu/Om8x/kniPCpqmvX71ose4EgOLiykKwBLDMNiwmCwAUTHEwWJiariEDcARgwsWuX2JtBjCYEnD1/Pi1XONfeg1XP0aWFoMFoABMUTBomIa8JvFkAZ7+BKmGOyGSzh+sxjyYLbui7vxZ+/5fvXG0lCMiWfPtZexPBT0UntrQkHpd9obqCjeo0FJuqENKPkoOczQoaBuWDesyf8T5qQVDQPUDUvaUJKiK8nJKRqmG92wJ4eFo1CQsgdsN6wb1m7RiKJhKi9xZcNyDpSk6EqyXUXDVF7iaQdtcrBycrYPGW0+YFcWFzN/VAw7WcxkVjoWZk4d1xMNisO4tJXJlFY7FRbdoTs2rsNK2U6Fmfd0TS+IsFK2Y2FTHLJt6PZtA7iymM0WZMNMJ1BYusxduOPH6dkKK2ULhczqHjuVODUChFnVBBHF0Mzc43OC3y/umpmZmEilJiclbpz8X0lWmXw2mh3c6VpL4ck0yKpxlXd+nkOz/a3mrrUtPJFlS4eFuavPxH1+bXJZKctdjNNSJwdo0sYl/omoaOJfshy1CQnBwj4TVdHAHf94aMEXH+13gcJEKkhY0oaUPn6SuJEPecQSR8tAdJdoKYkCv18Bwgy9FWGzuyTUHJfYLGZSkx0Pm1ry71axXCe248wfH4dMzPDPY4fDlhNEu0MWgEN/edaudiWfE6udDSsTeWFcMKtctgzf79Ra4aCjYeP8rhu3f+E4utqZP/chKae3IqzWsMqXiRIWAgsYJp7kKG7UiUZwqVIbgYRWhXlEC2A3nRVcsBLkQZLUJ7x3w8Zwo0j09XqfTkOSBglNYcdE38GubxMNBw3TjVaErTfs8yEiD2qEhfnc/wIx8HIKtSLMtgKHocoH2bwJX9LjJZCXCGvLyZ8rElF5aCRZ2faX5jeoEoYwlwlLg1AnDLnaEl0qjkGlMCCysePVi9sVE4qFNQgeFpMOCxFV8YgI0S4kSYfNEZXxiH6iIuTIh7kkFtGDInVxVyVoeg5yjrisXO172DYvzUQYkjTIsj163CDk5MMapNlH9Ih6BTKC/5/fnQv1PWx91kGAMLP7VcBu2N927m1HaSgK47jnRI1fycrebem5pBzaCMZJCglzY6AhMcHAA/j+z+HqLq1F0QqKbpXfRaedi85/kk73TBlWyy3sj9M2TIaahun8Yv3tXwHP4klNw3R+sR5a4jBTy/eyaHuDvYVdK0xM3uArYwOl2DVxlt4k/HVhNMSXgmIvwN5QgsbMUYzYadTfUlbMoLyjGF3C0eVhG/qAkk8BGg4V+31OVpamKVHKyEclon4rrNPlYSsyenesKO4qngrj7Yws3pWpw9uAlr85LCEfE2qTx2FbGvN2Qe6FYYvgojCxIhNz27bvaGxXxFHYKF0L8AfaXhgGXBQ2oxUUP/fQaMLkWypM2IY5ILMJc03FobHJwo6L/wfD7s0DG6VFTgMEUspFOpA1UYZFWeaStaa1DWyJyEUTdsz9FYu4oMZSHQ+Jwxw6FqD+lJWMuRIy2oT4HLbst406wuSPXWO7twc9MJdcDvvouu4udRteGZYliUsW3ro1u3WN1a51gw1oIDiMBfkSjfbFP6VcSXm/MqbZ1cPgSlRh7yn5RtgUSp/3673x9cNYFTZMP44Pko6wtzSYNLIrh9n0md8RNqGWN1cOe23VHOpXYdPpdF+GpffKrglbpwt5EF09rNEjX4BtfcXAxK8ZUCStUBt1hnnBT4bJSPVs0vsAihRo88zPt7EPR2FdfjJsQtO+FHe0kqi4uYR03peL6ZIPl7mNyoDM88Ks8GfC5HZH+ZqcABWxX/Em98smeg2YNBQoxbTGeWH4HsOqjGhtNYw6TBHje6I33tGX9AuuydSPwzveMjGg6JwwGX4/zKET/HYYE+8LmiZQlhSqWxbHe+kAvN0Vc7WG+egIO2sRz/onRHVYQ/KlJsCMao2P1Orjk1S/gW84bzidnx12oe0GLaaJkkgMFRqVSXFcxgoTzAvREm7N7rBEy+djf/0fvF1uYX+ctmGvY03DdH7Or21Y4EFLuj61jnQN0/g5fyihIW1vsLewW9gX/p8wnddKbcNi7YYVlrRdxF/HmobpvIhDS9rex25h/1LYwxga4iGiT0bQkPfywbOelmvSUx7tm0A3arTvg1eP8K0hxwswoyb4YH7ukOMQzG5O0T77/KtTLA7DkC0ehsweP33x3Do5FtoEi+ojUVa2x0J7p8dCz3FyLHR9Crs+MMqw+iADM1vjoz8BuFyFexahL+UAAAAASUVORK5CYII=",iconVideoDefault="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcgAAAHICAMAAAD9f4rYAAAAolBMVEUjJyz///8oLDH9/f1AQ0j6+vorLzQ6PkL09PXy8vKztbewsbNydHdpbG8mKi/4+PjAwsOnqatZXGBTVlpKTVJDR0u7vL7l5uaZmp24ubvY2dnKy8yQkpXe3t+trrCeoKLv7/DT09R9gIN3en1bXmJHS08zNzuSlJbV1teJi455e35hZGhfYmU1OT7p6erg4eLQ0dKgoqSDhYjNzs81OD2pq62phkQlAAAHZElEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD27myrbSAGA7Dk3YnjJt4SskEWIBBoC6Xv/2qNxw3lgtPG0dhO5/zfC/hCZzySRh4DAAAAAAAAAAAAAAAAAAAAAAAAAAAAQKf87fr+etQbzna72bA3ur5fb32C/4n3NO+vAv5EsOrPnzyCy2cl85nLf+XO5olFcMG8aPiFT/JlGGFhXqrtMuBP2GFo8yeC5Zbg4viTMX/kLorJJsmcZ08t1WcnSzaTYuHyR+MJ0p/L4ozcj/FZRnlMn4rzaPkx4u7IIbgUt32bj256j84/w/7Yu+Eju39LcAmcq/cwusXAopNYg8J9D+UVVmX3rPl7nvp9fUc13K2/v+ewc5QjHdt/44pdpFRbWthc+bYn6I5/dQxjL6OzZL1jKK+QwHZmEB7zlZzOlh8zpXBA0AXrhSvTlETSKVdesFN2wFmxErzGJBS/BqyskL4KyF6rPZ808Ht4vXbjgZUgIk2igJUHghZdszLNSZt8yso1QVviPisjizSyRqz0Y4JWeMOqHRORZlHVJBripLIV3g8uhQlpl4Rc+oFItiCu1uPXjBqQfa3WJN6uzetzaeFQI5wFl/oEDavy1d0bNeR5h9y1DQ/VenyjxrwtUE82b1Dtjw41yKn2SfR4GuSEKl/NqFFZ9RT0XRtjrVT9mFDDElVPrnAW0pQXLkXUuIhLLwSNGHBpRC0YYZtsjq+2rqlFLbCmapvE9EcT1HxOkFMr8kDN8RBot6+/Qcq3SczWaWepuccetaanpiSRueo2Vy9Wn1rjq5frnEArR5V2r9SiV1W0oi2g15XKWGNqUTxFvqPdrV3OIafUqlQ9FN9q6dQ/5ZDQkKeazFFrI6eW5eqx2CX1GQlKD3EJMiLQxHfLlZFR67JySbpo1Oky4YOCOlDwwYRAjzEfpNSBlA/GBFo8qe/KqRPq63Tcx6PHkg/WVMd+eZ2SDms+WBJo4AVlxnFHNWxsZvvnHcndlXlWgMlzHaL6nbIFl242unqDEYHcsPbUhcW//bjVM18yJBCzvpSLy6odSMWdeNLH35RnIDiWlEvqd3Us/mM80NHdSQik7vng8bxAKoVPEo98cE8gNeMDRxBIDh5iOp/DBzMCIc9VvZWzA6lMU2FfyUUBoqWts5QFUhWVsn7EE4GGoatIFEhhURlhCEvbKX0uCaS0qMwxJ6DDqtyhYkkgpUVlXO7SKwKZstG6IEkgpUWlavgFBCK+qgS1BFIpnDNPlzEmILNVR/SiQIqLygnOJDWdB25EgRQXlZvqPBTEDbpEFEhxUZmgSafpWp1MFEhxUZnh4h1NE62OKJDiotLBdKumEeFnUSDFReVzdZAG4vEAT3cglXFKp/EwJKDnEMsm7YFUbnw6jY2DLLEdM4dNBLLOcXXIzDsCBBLwajUFkh1DoPwwRFMNgRkaAv+GFh2gaW4qHGMZAgfLhtA+6uFj1KMWDF8BxiGNpG9AeYYB5TPgkwHARzxGwmd1psCHroa4iE/PsUXiMgjA9SyGEVyYNMOFSRek2yvMClxhhksFAdd8GmmLi3cNgauwDYHL6Q2B30WYAj9wMQR+qWQK/OTMEPjtoCnwI1BD4Ne8psDPsg2B39ebYs+tHihFXNoTKNrznSCnVuQBMp2m+KHKXC1qgaUy1hDNuV/s3OtyqjAQB/D9k6Dcb4KKihbrqdrT2tr6/s92JmDHfnBObwTozP5egA+ZJJvdZbXw0VrGLIbiE9Pi2NY16UE5EtPDKAEgTEizJASAkiNWbaQNAHZKWqX1VzgVoJEP5SBJI3ngC1K/PZTiRNqcCih7YlqtoOy0reRpBx6r0woXSiFJC1mAi5DtCCIoh5Q0SA9QooCYdoNXKHZCjUtsKK/cWd6KQQQl9KhhXggl4nVsSeCiEhvUICNGxeVztT0rVGYZNSabgePV9u1RsTxqiGeB349d8G1UnCE1YOigYnM+p3WyRMV6CeiHghcLlZLzqx0wjg1M0VFGM9SOXO/owuV4FW5G35a5go/Vrg1z1IST0rekjkAt576OLv19Qk2MR/Rlo7FA7Yn75TpmLEKcPa/v6Avu1s84Cxd8O3ZP5gJnZu4b9CmGn5s4EzkHq/3wxxV4c+PcS/qAvHdu8Ea4/L9Vf8jYxMVk6WUBXRVk3nKCCzPm3dgvw+kE75nFeHqbpPJxUBVMHmWa3E7HhYn3JlMOVXtos7RwhbBtgSusJc/P6auBF4X4lDDyuOrYa0aynZv4L3O+Tfi58RsMHhZuaeEKq3QXD7wVf5fhZr1dxU403+3mkROvtusNhzaMMcYY+8ceHAgAAAAAAPm/NoKqqqqqqqqqqqqqqqqqqgp7cCAAAAAAAOT/2giqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cEgAAAAAIOj/a2dYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF4BjB5ee44lPcgAAAAASUVORK5CYII=",index$1="",Y={};Y.getData=e=>new Promise((n,o)=>{let i={};I(e).then(l=>{i.arrayBuffer=l;try{i.orientation=T(l)}catch(s){i.orientation=-1}n(i)}).catch(l=>{o(l)})});function I(e){let n=null;return new Promise((o,i)=>{if(e.src)if(/^data\:/i.test(e.src))n=L(e.src),o(n);else if(/^blob\:/i.test(e.src)){var l=new FileReader;l.onload=function(h){n=h.target.result,o(n)},E(e.src,function(h){l.readAsArrayBuffer(h)})}else{var s=new XMLHttpRequest;s.onload=function(){if(this.status==200||this.status===0)n=s.response,o(n);else throw"Could not load image";s=null},s.open("GET",e.src,!0),s.responseType="arraybuffer",s.send(null)}else i("img error")})}function E(e,n){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="blob",o.onload=function(i){(this.status==200||this.status===0)&&n(this.response)},o.send()}function L(e,n){n=n||e.match(/^data\:([^\;]+)\;base64,/mi)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gmi,"");for(var o=atob(e),i=o.length%2==0?o.length:o.length+1,l=new ArrayBuffer(i),s=new Uint16Array(l),h=0;h<i;h++)s[h]=o.charCodeAt(h);return l}function k(e,n,o){var i="",l;for(l=n,o+=n;l<o;l++)i+=String.fromCharCode(e.getUint8(l));return i}function T(e){var n=new DataView(e),o=n.byteLength,i,l,s,h,_,j,O,x,V,X;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(V=2;V<o;){if(n.getUint8(V)===255&&n.getUint8(V+1)===225){O=V;break}V++}if(O&&(l=O+4,s=O+10,k(n,l,4)==="Exif"&&(j=n.getUint16(s),_=j===18761,(_||j===19789)&&n.getUint16(s+2,_)===42&&(h=n.getUint32(s+4,_),h>=8&&(x=s+h)))),x){for(o=n.getUint16(x,_),X=0;X<o;X++)if(V=x+X*12+2,n.getUint16(V,_)===274){V+=8,i=n.getUint16(V,_);break}}return i}const N=(e,n)=>{const o=e.__vccOpts||e;for(const[i,l]of n)o[i]=l;return o},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 n=1;this.high&&!this.full&&(n=window.devicePixelRatio),this.enlarge!==1&!this.full&&(n=Math.abs(Number(this.enlarge))),e.width=e.width*n,e.height=e.height*n,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,n){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 n=navigator.userAgent.split(" "),o="";let i=0;const l=new RegExp(e,"i");for(var s=0;s<n.length;s++)l.test(n[s])&&(o=n[s]);return o?i=o.split("/")[1].split("."):i=["0","0","0"],i},checkOrientationImage(e,n,o,i){if(this.getVersion("chrome")[0]>=81)n=-1;else if(this.getVersion("safari")[0]>=605){const h=this.getVersion("version");h[0]>13&&h[1]>1&&(n=-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)&&(n=-1)}}let l=document.createElement("canvas"),s=l.getContext("2d");switch(s.save(),n){case 2:l.width=o,l.height=i,s.translate(o,0),s.scale(-1,1);break;case 3:l.width=o,l.height=i,s.translate(o/2,i/2),s.rotate(180*Math.PI/180),s.translate(-o/2,-i/2);break;case 4:l.width=o,l.height=i,s.translate(0,i),s.scale(1,-1);break;case 5:l.height=o,l.width=i,s.rotate(.5*Math.PI),s.scale(1,-1);break;case 6:l.width=i,l.height=o,s.translate(i/2,o/2),s.rotate(90*Math.PI/180),s.translate(-o/2,-i/2);break;case 7:l.height=o,l.width=i,s.rotate(.5*Math.PI),s.translate(o,-i),s.scale(-1,1);break;case 8:l.height=o,l.width=i,s.translate(i/2,o/2),s.rotate(-90*Math.PI/180),s.translate(-o/2,-i/2);break;default:l.width=o,l.height=i}s.drawImage(e,0,0,o,i),s.restore(),l.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("图片不能为空")),!1;let o=e.width,i=e.height;Y.getData(e).then(l=>{this.orientation=l.orientation||1;let s=Number(this.maxImgSize);if(!this.orientation&&o<s&i<s){this.imgs=this.img;return}o>s&&(i=i/o*s,o=s),i>s&&(o=o/i*s,i=s),this.checkOrientationImage(e,this.orientation,o,i)}).catch(l=>{this.$emit("img-load","error"),this.$emit("img-load-error",l)})},e.onerror=o=>{this.$emit("img-load","error"),this.$emit("img-load-error",o)},this.img.substr(0,4)!=="data"&&(e.crossOrigin=""),this.isIE){var n=new XMLHttpRequest;n.onload=function(){var o=URL.createObjectURL(this.response);e.src=o},n.open("GET",this.img,!0),n.responseType="blob",n.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 n=this.scale;var o={x:this.touches[0].clientX,y:this.touches[0].clientY},i={x:e.touches[0].clientX,y:e.touches[0].clientY},l={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(o.x-l.x,2)+Math.pow(o.y-l.y,2)),_=Math.sqrt(Math.pow(i.x-s.x,2)+Math.pow(i.y-s.y,2)),j=_-h,O=1;O=O/this.trueWidth>O/this.trueHeight?O/this.trueHeight:O/this.trueWidth,O=O>.1?.1:O;var x=O*j;if(!this.touchNow){if(this.touchNow=!0,j>0?n+=Math.abs(x):j<0&&n>Math.abs(x)&&(n-=Math.abs(x)),this.touches=e.touches,setTimeout(()=>{this.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,n))return!1;this.scale=n}},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 n="clientX"in e?e.clientX:e.touches[0].clientX,o="clientY"in e?e.clientY:e.touches[0].clientY,i,l;i=n-this.moveX,l=o-this.moveY,this.$nextTick(()=>{if(this.centerBox){let s=this.getImgAxis(i,l,this.scale),h=this.getCropAxis(),_=this.trueHeight*this.scale,j=this.trueWidth*this.scale,O,x,V,X;switch(this.rotate){case 1:case-1:case 3:case-3:O=this.cropOffsertX-this.trueWidth*(1-this.scale)/2+(_-j)/2,x=this.cropOffsertY-this.trueHeight*(1-this.scale)/2+(j-_)/2,V=O-_+this.cropW,X=x-j+this.cropH;break;default:O=this.cropOffsertX-this.trueWidth*(1-this.scale)/2,x=this.cropOffsertY-this.trueHeight*(1-this.scale)/2,V=O-j+this.cropW,X=x-_+this.cropH;break}s.x1>=h.x1&&(i=O),s.y1>=h.y1&&(l=x),s.x2<=h.x2&&(i=V),s.y2<=h.y2&&(l=X)}this.x=i,this.y=l,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 n=this.scale;var o=e.deltaY||e.wheelDelta,i=navigator.userAgent.indexOf("Firefox");o=i>0?o*30:o,this.isIE&&(o=-o);var l=this.coe;l=l/this.trueWidth>l/this.trueHeight?l/this.trueHeight:l/this.trueWidth;var s=l*o;s<0?n+=Math.abs(s):n>Math.abs(s)&&(n-=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,n))return!1;this.scale=n},changeScale(e){let n=this.scale;e=e||1;var o=20;if(o=o/this.trueWidth>o/this.trueHeight?o/this.trueHeight:o/this.trueWidth,e=e*o,e>0?n+=Math.abs(e):n>Math.abs(e)&&(n-=Math.abs(e)),!this.checkoutImgAxis(this.x,this.y,n))return!1;this.scale=n},createCrop(e){e.preventDefault();var n="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,o="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;this.$nextTick(()=>{var i=n-this.cropX,l=o-this.cropY;if(i>0?(this.cropW=i+this.cropChangeX>this.w?this.w-this.cropChangeX:i,this.cropOffsertX=this.cropChangeX):(this.cropW=this.w-this.cropChangeX+Math.abs(i)>this.w?this.cropChangeX:Math.abs(i),this.cropOffsertX=this.cropChangeX+i>0?this.cropChangeX+i:0),!this.fixed)l>0?(this.cropH=l+this.cropChangeY>this.h?this.h-this.cropChangeY:l,this.cropOffsertY=this.cropChangeY):(this.cropH=this.h-this.cropChangeY+Math.abs(l)>this.h?this.cropChangeY:Math.abs(l),this.cropOffsertY=this.cropChangeY+l>0?this.cropChangeY+l: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],i>0?this.cropOffsertX=this.cropChangeX:this.cropOffsertX=this.cropChangeX-this.cropW):this.cropH=s,this.cropOffsertY=this.cropOffsertY}})},changeCropSize(e,n,o,i,l){e.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=n,this.canChangeY=o,this.changeCropTypeX=i,this.changeCropTypeY=l,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 n="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,o="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;let i=this.w,l=this.h,s=0,h=0;if(this.centerBox){let O=this.getImgAxis(),x=O.x2,V=O.y2;s=O.x1>0?O.x1:0,h=O.y1>0?O.y1:0,i>x&&(i=x),l>V&&(l=V)}const[_,j]=this.checkCropLimitSize();this.$nextTick(()=>{var O=n-this.cropX,x=o-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=i-this.cropChangeX-O<=i-s?this.cropOldW-O:this.cropOldW+this.cropChangeX-s,this.cropOffsertX=i-this.cropChangeX-O<=i-s?this.cropChangeX+O:s):(this.cropW=Math.abs(O)+this.cropChangeX<=i?Math.abs(O)-this.cropOldW:i-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<=i?this.cropOldW+O:i-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=i-this.cropChangeX+Math.abs(O+this.cropOldW)<=i-s?Math.abs(O+this.cropOldW):this.cropChangeX-s,this.cropOffsertX=i-this.cropChangeX+Math.abs(O+this.cropOldW)<=i-s?this.cropChangeX-Math.abs(O+this.cropOldW):s))),this.canChangeY&&(this.changeCropTypeY===1?this.cropOldH-x<j?(this.cropH=j,this.cropOffsertY=this.cropOldH+this.cropChangeY-h-j):this.cropOldH-x>0?(this.cropH=l-this.cropChangeY-x<=l-h?this.cropOldH-x:this.cropOldH+this.cropChangeY-h,this.cropOffsertY=l-this.cropChangeY-x<=l-h?this.cropChangeY+x:h):(this.cropH=Math.abs(x)+this.cropChangeY<=l?Math.abs(x)-this.cropOldH:l-this.cropOldH-this.cropChangeY,this.cropOffsertY=this.cropChangeY+this.cropOldH):this.changeCropTypeY===2&&(this.cropOldH+x<j?this.cropH=j:this.cropOldH+x>0?(this.cropH=this.cropOldH+x+this.cropOffsertY<=l?this.cropOldH+x:l-this.cropOffsertY,this.cropOffsertY=this.cropChangeY):(this.cropH=l-this.cropChangeY+Math.abs(x+this.cropOldH)<=l-h?Math.abs(x+this.cropOldH):this.cropChangeY-h,this.cropOffsertY=l-this.cropChangeY+Math.abs(x+this.cropOldH)<=l-h?this.cropChangeY-Math.abs(x+this.cropOldH):h))),this.canChangeX&&this.fixed){var V=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];V<j?(this.cropH=j,this.cropW=this.fixedNumber[0]*j/this.fixedNumber[1],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):V+this.cropOffsertY>l?(this.cropH=l-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>i?(this.cropW=i-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=X}})},checkCropLimitSize(){let{cropW:e,cropH:n,limitMinSize:o}=this,i=new Array;return Array.isArray(o)?i=o:i=[o,o],e=parseFloat(i[0]),n=parseFloat(i[1]),[e,n]},changeCropEnd(e){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(e,n,o,i,l,s){const h=e/n;let _=l,j=s;return _<o&&(_=o,j=Math.ceil(_/h)),j<i&&(j=i,_=Math.ceil(j*h),_<o&&(_=o,j=Math.ceil(_/h))),_<l&&(_=l,j=Math.ceil(_/h)),j<s&&(j=s,_=Math.ceil(j*h)),{width:_,height:j}},endCrop(){this.cropW===0&&this.cropH===0&&(this.cropping=!1);let[e,n]=this.checkCropLimitSize();const{width:o,height:i}=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],e,n,this.cropW,this.cropH):{width:e,height:n};o>this.cropW&&(this.cropW=o,this.cropOffsertX+o>this.w&&(this.cropOffsertX=this.w-o)),i>this.cropH&&(this.cropH=i,this.cropOffsertY+i>this.h&&(this.cropOffsertY=this.h-i)),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 n="clientX"in e?e.clientX:e.touches[0].clientX,o="clientY"in e?e.clientY:e.touches[0].clientY,i,l;i=n-this.cropOffsertX,l=o-this.cropOffsertY,this.cropX=i,this.cropY=l,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop(e,n){let o=0,i=0;e&&(e.preventDefault(),o="clientX"in e?e.clientX:e.touches[0].clientX,i="clientY"in e?e.clientY:e.touches[0].clientY),this.$nextTick(()=>{let l,s,h=o-this.cropX,_=i-this.cropY;if(n&&(h=this.cropOffsertX,_=this.cropOffsertY),h<=0?l=0:h+this.cropW>this.w?l=this.w-this.cropW:l=h,_<=0?s=0:_+this.cropH>this.h?s=this.h-this.cropH:s=_,this.centerBox){let j=this.getImgAxis();l<=j.x1&&(l=j.x1),l+this.cropW>j.x2&&(l=j.x2-this.cropW),s<=j.y1&&(s=j.y1),s+this.cropH>j.y2&&(s=j.y2-this.cropH)}this.cropOffsertX=l,this.cropOffsertY=s,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})})},getImgAxis(e,n,o){e=e||this.x,n=n||this.y,o=o||this.scale;let i={x1:0,x2:0,y1:0,y2:0},l=this.trueWidth*o,s=this.trueHeight*o;switch(this.rotate){case 0:i.x1=e+this.trueWidth*(1-o)/2,i.x2=i.x1+this.trueWidth*o,i.y1=n+this.trueHeight*(1-o)/2,i.y2=i.y1+this.trueHeight*o;break;case 1:case-1:case 3:case-3:i.x1=e+this.trueWidth*(1-o)/2+(l-s)/2,i.x2=i.x1+this.trueHeight*o,i.y1=n+this.trueHeight*(1-o)/2+(s-l)/2,i.y2=i.y1+this.trueWidth*o;break;default:i.x1=e+this.trueWidth*(1-o)/2,i.x2=i.x1+this.trueWidth*o,i.y1=n+this.trueHeight*(1-o)/2,i.y2=i.y1+this.trueHeight*o;break}return i},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 n=document.createElement("canvas"),o=new Image,i=this.rotate,l=this.trueWidth,s=this.trueHeight,h=this.cropOffsertX,_=this.cropOffsertY;o.onload=()=>{if(this.cropW!==0){let x=n.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,ue=this.cropH*V,G=l*this.scale*V,Z=s*this.scale*V,de=(this.x-h+this.trueWidth*(1-this.scale)/2)*V,ae=(this.y-_+this.trueHeight*(1-this.scale)/2)*V;switch(O(X,ue),x.save(),this.fillColor&&(x.fillStyle=this.fillColor,x.fillRect(0,0,n.width,n.height)),i){case 0:this.full?(O(X/this.scale,ue/this.scale),x.drawImage(o,de/this.scale,ae/this.scale,G/this.scale,Z/this.scale)):x.drawImage(o,de,ae,G,Z);break;case 1:case-3:this.full?(O(X/this.scale,ue/this.scale),de=de/this.scale+(G/this.scale-Z/this.scale)/2,ae=ae/this.scale+(Z/this.scale-G/this.scale)/2,x.rotate(i*90*Math.PI/180),x.drawImage(o,ae,-de-Z/this.scale,G/this.scale,Z/this.scale)):(de=de+(G-Z)/2,ae=ae+(Z-G)/2,x.rotate(i*90*Math.PI/180),x.drawImage(o,ae,-de-Z,G,Z));break;case 2:case-2:this.full?(O(X/this.scale,ue/this.scale),x.rotate(i*90*Math.PI/180),de=de/this.scale,ae=ae/this.scale,x.drawImage(o,-de-G/this.scale,-ae-Z/this.scale,G/this.scale,Z/this.scale)):(x.rotate(i*90*Math.PI/180),x.drawImage(o,-de-G,-ae-Z,G,Z));break;case 3:case-1:this.full?(O(X/this.scale,ue/this.scale),de=de/this.scale+(G/this.scale-Z/this.scale)/2,ae=ae/this.scale+(Z/this.scale-G/this.scale)/2,x.rotate(i*90*Math.PI/180),x.drawImage(o,-ae-G/this.scale,de,G/this.scale,Z/this.scale)):(de=de+(G-Z)/2,ae=ae+(Z-G)/2,x.rotate(i*90*Math.PI/180),x.drawImage(o,-ae-G,de,G,Z));break;default:this.full?(O(X/this.scale,ue/this.scale),x.drawImage(o,de/this.scale,ae/this.scale,G/this.scale,Z/this.scale)):x.drawImage(o,de,ae,G,Z)}x.restore()}else{let x=l*this.scale,V=s*this.scale,X=n.getContext("2d");switch(X.save(),this.fillColor&&(X.fillStyle=this.fillColor,X.fillRect(0,0,n.width,n.height)),i){case 0:O(x,V),X.drawImage(o,0,0,x,V);break;case 1:case-3:O(V,x),X.rotate(i*90*Math.PI/180),X.drawImage(o,0,-V,x,V);break;case 2:case-2:O(x,V),X.rotate(i*90*Math.PI/180),X.drawImage(o,-x,-V,x,V);break;case 3:case-1:O(V,x),X.rotate(i*90*Math.PI/180),X.drawImage(o,-x,0,x,V);break;default:O(x,V),X.drawImage(o,0,0,x,V)}X.restore()}e(n)};var j=this.img.substr(0,4);j!=="data"&&(o.crossOrigin="Anonymous"),o.src=this.imgs;function O(x,V){n.width=Math.round(x),n.height=Math.round(V)}},getCropData(e){this.getCropChecked(n=>{e(n.toDataURL("image/"+this.outputType,this.outputSize))})},getCropBlob(e){this.getCropChecked(n=>{n.toBlob(o=>e(o),"image/"+this.outputType,this.outputSize)})},showPreview(){if(this.isCanShow)this.isCanShow=!1,setTimeout(()=>{this.isCanShow=!0},16);else return!1;let e=this.cropW,n=this.cropH,o=this.scale;var i={};i.div={width:`${e}px`,height:`${n}px`};let l=(this.x-this.cropOffsertX)/o,s=(this.y-this.cropOffsertY)/o,h=0;i.w=e,i.h=n,i.url=this.imgs,i.img={width:`${this.trueWidth}px`,height:`${this.trueHeight}px`,transform:`scale(${o})translate3d(${l}px, ${s}px, ${h}px)rotateZ(${this.rotate*90}deg)`},i.html=`
- <div class="show-preview" style="width: ${i.w}px; height: ${i.h}px,; overflow: hidden">
- <div style="width: ${e}px; height: ${n}px">
- <img src=${i.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:
- scale(${o})translate3d(${l}px, ${s}px, ${h}px)rotateZ(${this.rotate*90}deg)">
- </div>
- </div>`,this.$emit("real-time",i)},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,n=this.trueWidth,o=this.trueHeight;const i=this.mode.split(" ");switch(i[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":n=this.w,e=n/this.trueWidth,o=o*e,o<this.h&&(o=this.h,e=o/this.trueHeight);break;default:try{let l=i[0];if(l.search("px")!==-1){l=l.replace("px",""),n=parseFloat(l);const s=n/this.trueWidth;let h=1,_=i[1];_.search("px")!==-1&&(_=_.replace("px",""),o=parseFloat(_),h=o/this.trueHeight),e=Math.min(s,h)}if(l.search("%")!==-1&&(l=l.replace("%",""),n=parseFloat(l)/100*this.w,e=n/this.trueWidth),i.length===2&&l==="auto"){let s=i[1];s.search("px")!==-1&&(s=s.replace("px",""),o=parseFloat(s),e=o/this.trueHeight),s.search("%")!==-1&&(s=s.replace("%",""),o=parseFloat(s)/100*this.h,e=o/this.trueHeight)}}catch(l){e=1}}return e},goAutoCrop(e,n){if(this.imgs===""||this.imgs===null)return;this.clearCrop(),this.cropping=!0;let o=this.w,i=this.h;if(this.centerBox){const h=Math.abs(this.rotate)%2>0;let _=(h?this.trueHeight:this.trueWidth)*this.scale,j=(h?this.trueWidth:this.trueHeight)*this.scale;o=_<o?_:o,i=j<i?j:i}var l=e||parseFloat(this.autoCropWidth),s=n||parseFloat(this.autoCropHeight);(l===0||s===0)&&(l=o*.8,s=i*.8),l=l>o?o:l,s=s>i?i:s,this.fixed&&(s=l/this.fixedNumber[0]*this.fixedNumber[1]),s>this.h&&(s=this.h,l=s/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(l,s)},changeCrop(e,n){if(this.centerBox){let o=this.getImgAxis();e>o.x2-o.x1&&(e=o.x2-o.x1,n=e/this.fixedNumber[0]*this.fixedNumber[1]),n>o.y2-o.y1&&(n=o.y2-o.y1,e=n/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=e,this.cropH=n,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,n,o){e=e||this.x,n=n||this.y,o=o||this.scale;let i=!0;if(this.centerBox){let l=this.getImgAxis(e,n,o),s=this.getCropAxis();l.x1>=s.x1&&(i=!1),l.x2<=s.x2&&(i=!1),l.y1>=s.y1&&(i=!1),l.y2<=s.y2&&(i=!1)}return i}},mounted(){this.support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";let e=this;var n=navigator.userAgent;this.isIOS=!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(o,i,l){for(var s=atob(this.toDataURL(i,l).split(",")[1]),h=s.length,_=new Uint8Array(h),j=0;j<h;j++)_[j]=s.charCodeAt(j);o(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,n,o,i,l,s){return openBlock(),createElementBlock("div",{class:"vue-cropper",ref:"cropper",onMouseover:n[28]||(n[28]=(...h)=>e.scaleImg&&e.scaleImg(...h)),onMouseout:n[29]||(n[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:n[0]||(n[0]=(...h)=>e.startMove&&e.startMove(...h)),onTouchstart:n[1]||(n[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:n[2]||(n[2]=(...h)=>e.cropMove&&e.cropMove(...h)),onTouchstart:n[3]||(n[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)+" × "+toDisplayString(e.cropInfo.height),5)):createCommentVNode("",!0),e.fixedBox?createCommentVNode("",!0):(openBlock(),createElementBlock("span",D,[createBaseVNode("span",{class:"crop-line line-w",onMousedown:n[4]||(n[4]=h=>e.changeCropSize(h,!1,!0,0,1)),onTouchstart:n[5]||(n[5]=h=>e.changeCropSize(h,!1,!0,0,1))},null,32),createBaseVNode("span",{class:"crop-line line-a",onMousedown:n[6]||(n[6]=h=>e.changeCropSize(h,!0,!1,1,0)),onTouchstart:n[7]||(n[7]=h=>e.changeCropSize(h,!0,!1,1,0))},null,32),createBaseVNode("span",{class:"crop-line line-s",onMousedown:n[8]||(n[8]=h=>e.changeCropSize(h,!1,!0,0,2)),onTouchstart:n[9]||(n[9]=h=>e.changeCropSize(h,!1,!0,0,2))},null,32),createBaseVNode("span",{class:"crop-line line-d",onMousedown:n[10]||(n[10]=h=>e.changeCropSize(h,!0,!1,2,0)),onTouchstart:n[11]||(n[11]=h=>e.changeCropSize(h,!0,!1,2,0))},null,32),createBaseVNode("span",{class:"crop-point point1",onMousedown:n[12]||(n[12]=h=>e.changeCropSize(h,!0,!0,1,1)),onTouchstart:n[13]||(n[13]=h=>e.changeCropSize(h,!0,!0,1,1))},null,32),createBaseVNode("span",{class:"crop-point point2",onMousedown:n[14]||(n[14]=h=>e.changeCropSize(h,!1,!0,0,1)),onTouchstart:n[15]||(n[15]=h=>e.changeCropSize(h,!1,!0,0,1))},null,32),createBaseVNode("span",{class:"crop-point point3",onMousedown:n[16]||(n[16]=h=>e.changeCropSize(h,!0,!0,2,1)),onTouchstart:n[17]||(n[17]=h=>e.changeCropSize(h,!0,!0,2,1))},null,32),createBaseVNode("span",{class:"crop-point point4",onMousedown:n[18]||(n[18]=h=>e.changeCropSize(h,!0,!1,1,0)),onTouchstart:n[19]||(n[19]=h=>e.changeCropSize(h,!0,!1,1,0))},null,32),createBaseVNode("span",{class:"crop-point point5",onMousedown:n[20]||(n[20]=h=>e.changeCropSize(h,!0,!1,2,0)),onTouchstart:n[21]||(n[21]=h=>e.changeCropSize(h,!0,!1,2,0))},null,32),createBaseVNode("span",{class:"crop-point point6",onMousedown:n[22]||(n[22]=h=>e.changeCropSize(h,!0,!0,1,2)),onTouchstart:n[23]||(n[23]=h=>e.changeCropSize(h,!0,!0,1,2))},null,32),createBaseVNode("span",{class:"crop-point point7",onMousedown:n[24]||(n[24]=h=>e.changeCropSize(h,!1,!0,0,2)),onTouchstart:n[25]||(n[25]=h=>e.changeCropSize(h,!1,!0,0,2))},null,32),createBaseVNode("span",{class:"crop-point point8",onMousedown:n[26]||(n[26]=h=>e.changeCropSize(h,!0,!0,2,2)),onTouchstart:n[27]||(n[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_15vje_1",uploadWarper="_uploadWarper_15vje_5",bg="_bg_15vje_12",btn="_btn_15vje_21",btn1="_btn1_15vje_33",img="_img_15vje_44",btndiv="_btndiv_15vje_53",wrapper="_wrapper_15vje_64",styles={upbtn,uploadWarper,bg,btn,btn1,img,btndiv,wrapper},ColCropper=defineComponent({name:"col-cropper",components:{VueCropper:W},props:{hideInput:{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:"取消",confirmButtonText:"确定",cancelButtonBackgroundColor:"#606266",confirmButtonBackgroundColor:"#ed594c",cancelButtonTextColor:"#ffffff",confirmButtonTextColor:"#ffffff"}}},mounted(){this.config=Object.assign(this.config,this.option)},methods:{addSlide(){if(document.getElementById("vertical")==null){let e=document.getElementsByClassName("cropper-crop-box")[0],n=document.createElement("div");n.id="vertical",n.style.width="1px",n.style.height="100%",n.style.top="0px",n.style.left="33%",n.style.position="absolute",n.style.backgroundColor="#fff",n.style.zIndex="522",n.style.opacity="0.5";let o=document.createElement("div");o.style.width="1px",o.style.height="100%",o.style.top="0px",o.style.right="33%",o.style.position="absolute",o.style.backgroundColor="#fff",o.style.zIndex="522",o.style.opacity="0.5";let i=document.createElement("div");i.style.width="100%",i.style.height="1px",i.style.top="33%",i.style.left="0px",i.style.position="absolute",i.style.backgroundColor="#fff",i.style.zIndex="522",i.style.opacity="0.5";let l=document.createElement("div");l.style.width="100%",l.style.height="1px",l.style.bottom="33%",l.style.left="0px",l.style.position="absolute",l.style.backgroundColor="#fff",l.style.zIndex="522",l.style.opacity="0.5";let 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";let 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";let _=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";let j=document.createElement("div");j.style.width="4px",j.style.height="30px",j.style.top="-4px",j.style.right="-4px",j.style.position="absolute",j.style.backgroundColor="#fff",j.style.zIndex="522",j.style.opacity="1";let 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";let x=document.createElement("div");x.style.width="4px",x.style.height="30px",x.style.bottom="-4px",x.style.left="-4px",x.style.position="absolute",x.style.backgroundColor="#fff",x.style.zIndex="522",x.style.opacity="1";let 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";let 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(n),e.appendChild(o),e.appendChild(i),e.appendChild(l),e.appendChild(s),e.appendChild(h),e.appendChild(_),e.appendChild(j),e.appendChild(O),e.appendChild(x),e.appendChild(V),e.appendChild(X)}},onLoadImg(e){return new Promise(function(n,o){let i=new FileReader;i.readAsDataURL(e),i.onload=l=>{n(l.target.result)}})},loadFile(e){if(e instanceof File)this.onLoadImg(e).then(n=>{this.img=n,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 n=e.split(",");if(!/^data:image\/(.*?);base64$/.test(n[0]))throw new Error("Arguments base64 MIME is not image/*");if(!/^[\/]?([\da-zA-Z]+[\/+]+)*[\da-zA-Z]+([+=]{1,2}|[\/])?$/.test(n[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 n={jpeg:"jpg",png:"png",webp:"webp"}[this.config.outputType],o=new Date().getTime(),i=new File([e],`${o}.${n}`,{type:`image/${this.config.outputType}`});this.getFile(i),this.img="",this.config.autoCrop=!1})},async upPhoto(e){let n=e.target.files[0];this.$refs.headInput.value=null,n!=null&&(this.imgOriginF(n),this.img=await this.onLoadImg(n),this.config.autoCrop=!0,setTimeout(()=>{this.addSlide()},20))},onCropMoving(e){},onImgMoving(e){}},render(){return createVNode("div",{class:[styles.upbtn,styles.uploadWarper]},[this.hideInput,this.hideInput?null:createVNode("input",{style:"opacity: 0;",class:styles.upbtn,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])}});var cosJsSdkV5={exports:{}};(function(module,exports){(function(n,o){module.exports=o()})(commonjsGlobal,function(){return function(e){var n={};function o(i){if(n[i])return n[i].exports;var l=n[i]={i,l:!1,exports:{}};return e[i].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=e,o.c=n,o.d=function(i,l,s){o.o(i,l)||Object.defineProperty(i,l,{enumerable:!0,get:s})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,l){if(l&1&&(i=o(i)),l&8||l&4&&typeof i=="object"&&i&&i.__esModule)return i;var s=Object.create(null);if(o.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),l&2&&typeof i!="string")for(var h in i)o.d(s,h,function(_){return i[_]}.bind(null,h));return s},o.n=function(i){var l=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(l,"a",l),l},o.o=function(i,l){return Object.prototype.hasOwnProperty.call(i,l)},o.p="/dist/",o(o.s="./index.js")}({"./index.js":function(e,n,o){var i=o("./src/cos.js");e.exports=i},"./lib/base64.js":function(e,n){var o=function(i){i=i||{};var l=i.Base64,s="2.1.9",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=function(te){for(var ie={},q=0,se=te.length;q<se;q++)ie[te.charAt(q)]=q;return ie}(h),j=String.fromCharCode,O=function(ie){if(ie.length<2){var q=ie.charCodeAt(0);return q<128?ie:q<2048?j(192|q>>>6)+j(128|q&63):j(224|q>>>12&15)+j(128|q>>>6&63)+j(128|q&63)}else{var q=65536+(ie.charCodeAt(0)-55296)*1024+(ie.charCodeAt(1)-56320);return j(240|q>>>18&7)+j(128|q>>>12&63)+j(128|q>>>6&63)+j(128|q&63)}},x=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,V=function(ie){return ie.replace(x,O)},X=function(ie){var q=[0,2,1][ie.length%3],se=ie.charCodeAt(0)<<16|(ie.length>1?ie.charCodeAt(1):0)<<8|(ie.length>2?ie.charCodeAt(2):0),ce=[h.charAt(se>>>18),h.charAt(se>>>12&63),q>=2?"=":h.charAt(se>>>6&63),q>=1?"=":h.charAt(se&63)];return ce.join("")},ue=i.btoa?function(te){return i.btoa(te)}:function(te){return te.replace(/[\s\S]{1,3}/g,X)},G=function(te){return ue(V(te))},Z=function(ie,q){return q?G(String(ie)).replace(/[+\/]/g,function(se){return se=="+"?"-":"_"}).replace(/=/g,""):G(String(ie))},de=function(ie){return Z(ie,!0)},ae=new RegExp(["[À-ß][-¿]","[à-ï][-¿]{2}","[ð-÷][-¿]{3}"].join("|"),"g"),De=function(ie){switch(ie.length){case 4:var q=(7&ie.charCodeAt(0))<<18|(63&ie.charCodeAt(1))<<12|(63&ie.charCodeAt(2))<<6|63&ie.charCodeAt(3),se=q-65536;return j((se>>>10)+55296)+j((se&1023)+56320);case 3:return j((15&ie.charCodeAt(0))<<12|(63&ie.charCodeAt(1))<<6|63&ie.charCodeAt(2));default:return j((31&ie.charCodeAt(0))<<6|63&ie.charCodeAt(1))}},J=function(ie){return ie.replace(ae,De)},R=function(ie){var q=ie.length,se=q%4,ce=(q>0?_[ie.charAt(0)]<<18:0)|(q>1?_[ie.charAt(1)]<<12:0)|(q>2?_[ie.charAt(2)]<<6:0)|(q>3?_[ie.charAt(3)]:0),le=[j(ce>>>16),j(ce>>>8&255),j(ce&255)];return le.length-=[0,0,2,1][se],le.join("")},b=i.atob?function(te){return i.atob(te)}:function(te){return te.replace(/[\s\S]{1,4}/g,R)},Q=function(te){return J(b(te))},m=function(ie){return Q(String(ie).replace(/[-_]/g,function(q){return q=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},oe=function(){var ie=i.Base64;return i.Base64=l,ie},re={VERSION:s,atob:b,btoa:ue,fromBase64:m,toBase64:Z,utob:V,encode:Z,encodeURI:de,btou:J,decode:m,noConflict:oe};return re}();e.exports=o},"./lib/beacon.min.js":function(e,n,o){var i,l,s=o("./node_modules/@babel/runtime/helpers/typeof.js");(function(h,_){s(n)=="object"&&typeof e<"u"?e.exports=_():(i=_,l=typeof i=="function"?i.call(n,o,n,e):i,l!==void 0&&(e.exports=l))})(this,function(){var h=function(c,a){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,C){d.__proto__=C}||function(d,C){for(var H in C)Object.prototype.hasOwnProperty.call(C,H)&&(d[H]=C[H])},h(c,a)},_=function(){return _=Object.assign||function(c){for(var a,d=1,C=arguments.length;d<C;d++)for(var H in a=arguments[d])Object.prototype.hasOwnProperty.call(a,H)&&(c[H]=a[H]);return c},_.apply(this,arguments)};function j(p,c,a,d){return new(a||(a=Promise))(function(C,H){function K(Te){try{Be(d.next(Te))}catch(fe){H(fe)}}function he(Te){try{Be(d.throw(Te))}catch(fe){H(fe)}}function Be(Te){var fe;Te.done?C(Te.value):(fe=Te.value,fe instanceof a?fe:new a(function(Le){Le(fe)})).then(K,he)}Be((d=d.apply(p,c||[])).next())})}function O(p,c){var a,d,C,H,K={label:0,sent:function(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return H={next:he(0),throw:he(1),return:he(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function he(Be){return function(Te){return function(fe){if(a)throw new TypeError("Generator is already executing.");for(;K;)try{if(a=1,d&&(C=2&fe[0]?d.return:fe[0]?d.throw||((C=d.return)&&C.call(d),0):d.next)&&!(C=C.call(d,fe[1])).done)return C;switch(d=0,C&&(fe=[2&fe[0],C.value]),fe[0]){case 0:case 1:C=fe;break;case 4:return K.label++,{value:fe[1],done:!1};case 5:K.label++,d=fe[1],fe=[0];continue;case 7:fe=K.ops.pop(),K.trys.pop();continue;default:if(C=K.trys,!((C=C.length>0&&C[C.length-1])||fe[0]!==6&&fe[0]!==2)){K=0;continue}if(fe[0]===3&&(!C||fe[1]>C[0]&&fe[1]<C[3])){K.label=fe[1];break}if(fe[0]===6&&K.label<C[1]){K.label=C[1],C=fe;break}if(C&&K.label<C[2]){K.label=C[2],K.ops.push(fe);break}C[2]&&K.ops.pop(),K.trys.pop();continue}fe=c.call(p,K)}catch(Le){fe=[6,Le],d=0}finally{a=C=0}if(5&fe[0])throw fe[1];return{value:fe[0]?fe[1]:void 0,done:!0}}([Be,Te])}}}var x="__BEACON_",V="__BEACON_deviceId",X="last_report_time",ue="sending_event_ids",G="beacon_config",Z="beacon_config_request_time",de=function(){function p(){var c=this;this.emit=function(a,d){if(c){var C,H=c.__EventsList[a];if(H!=null&&H.length){H=H.slice();for(var K=0;K<H.length;K++){C=H[K];try{var he=C.callback.apply(c,[d]);if(C.type===1&&c.remove(a,C.callback),he===!1)break}catch(Be){throw Be}}}return c}},this.__EventsList={}}return p.prototype.indexOf=function(c,a){for(var d=0;d<c.length;d++)if(c[d].callback===a)return d;return-1},p.prototype.on=function(c,a,d){if(d===void 0&&(d=0),this){var C=this.__EventsList[c];if(C||(C=this.__EventsList[c]=[]),this.indexOf(C,a)===-1){var H={name:c,type:d||0,callback:a};return C.push(H),this}return this}},p.prototype.one=function(c,a){this.on(c,a,1)},p.prototype.remove=function(c,a){if(this){var d=this.__EventsList[c];if(!d)return null;if(!a){try{delete this.__EventsList[c]}catch(H){}return null}if(d.length){var C=this.indexOf(d,a);d.splice(C,1)}return this}},p}();function ae(p,c){for(var a={},d=0,C=Object.keys(p);d<C.length;d++){var H=C[d],K=p[H];if(typeof K=="string")a[De(H)]=De(K);else{if(c)throw new Error("value mast be string !!!!");a[De(String(H))]=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(c){return""}}function J(p){return String(p.A99)+String(p.A100)}var R=function(){},b=function(){function p(c){var a=this;this.lifeCycle=new de,this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(d){if(!d||!d.reduce||!d.length)throw new TypeError("createPipeline 方法需要传入至少有一个 pipe 的数组");return d.length===1?function(C,H){d[0](C,H||R)}:d.reduce(function(C,H){return function(K,he){return he===void 0&&(he=R),C(K,function(Be){return H==null?void 0:H(Be,he)})}})}([function(d){a.send({url:a.strategy.getUploadUrl(),data:d,method:"post",contentType:"application/json;charset=UTF-8"},function(){var C=a.config.onReportSuccess;typeof C=="function"&&C(JSON.stringify(d.events))},function(){var C=a.config.onReportFail;typeof C=="function"&&C(JSON.stringify(d.events))})}]),function(d,C){if(!d)throw C instanceof Error?C:new Error(C)}(!!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,d){c?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(c)||this.strategy.isSampleEvent(c)||this.onReport(c,a,d)):this.errorReport.reportError("602"," no eventCode")},p.prototype.addAdditionalParams=function(c){for(var a=0,d=Object.keys(c);a<d.length;a++){var C=d[a];this.additionalParams[C]=c[C]}},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(ue)),d=a.indexOf(c);d!=-1&&(a.splice(d,1),this.storage.setItem(ue,JSON.stringify(a)))}catch(C){}},p}(),Q=function(){function p(c,a,d,C){this.requestParams={},this.network=C,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=c.appkey,this.requestParams.platform=d,this.requestParams.uin=a.deviceId,this.requestParams.model="",this.requestParams.os=d,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(d){})},p}(),m=function(){function p(c,a,d,C,H){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=C,this.needQueryConfig=c;try{var K=JSON.parse(this.storage.getItem(G));K&&this.processData(K)}catch(he){}a.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!a.isOversea&&this.needRequestConfig()&&this.requestConfig(a.appVersion,d,H)}return p.prototype.requestConfig=function(c,a,d){var C=this;this.storage.setItem(Z,Date.now().toString()),d.post("https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:typeof wx>"u"?"3":"4",mainAppKey:this.appkey,appVersion:c,sdkVersion:a.sdkVersion,osVersion:a.userAgent,model:"",packageName:"",params:{A3:a.deviceId}}).then(function(H){if(H.data.ret==0)try{var K=JSON.parse(H.data.beaconConfig);K&&(C.processData(K),C.storage.setItem(G,H.data.beaconConfig))}catch(he){}else C.processData(null),C.storage.setItem(G,"")}).catch(function(H){})},p.prototype.processData=function(c){var a,d,C,H,K;this.strategy.isEventUpOnOff=(a=c==null?void 0:c.isEventUpOnOff)!==null&&a!==void 0?a:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=(d=c==null?void 0:c.httpsUploadUrl)!==null&&d!==void 0?d:this.strategy.httpsUploadUrl,this.strategy.requestInterval=(C=c==null?void 0:c.requestInterval)!==null&&C!==void 0?C:this.strategy.requestInterval,this.strategy.blacklist=(H=c==null?void 0:c.blacklist)!==null&&H!==void 0?H: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(Z));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}(),oe="session_storage_key",re=function(){function p(c,a,d){this.getSessionStackDepth=0,this.beacon=d,this.storage=c,this.duration=a,this.appkey=d.config.appkey}return p.prototype.getSession=function(){this.getSessionStackDepth+=1;var c=this.storage.getItem(oe);if(!c)return this.createSession();var a="",d=0;try{var C=JSON.parse(c)||{sessionId:void 0,sessionStart:void 0};if(!C.sessionId||!C.sessionStart)return this.createSession();var H=Number(this.storage.getItem(X));if(Date.now()-H>this.duration)return this.createSession();a=C.sessionId,d=C.sessionStart,this.getSessionStackDepth=0}catch(K){}return{sessionId:a,sessionStart:d}},p.prototype.createSession=function(){var c=Date.now(),a={sessionId:this.appkey+"_"+c.toString(),sessionStart:c};this.storage.setItem(oe,JSON.stringify(a)),this.storage.setItem(X,c.toString());var d="is_new_user",C=this.storage.getItem(d);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:C?"N":"Y"}),this.storage.setItem(d,JSON.stringify(!1)),a},p}();function te(){var p=navigator.userAgent,c=p.indexOf("compatible")>-1&&p.indexOf("MSIE")>-1,a=p.indexOf("Edge")>-1&&!c,d=p.indexOf("Trident")>-1&&p.indexOf("rv:11.0")>-1;if(c){new RegExp("MSIE (\\d+\\.\\d+);").test(p);var C=parseFloat(RegExp.$1);return C==7?7:C==8?8:C==9?9:C==10?10:6}return a?-2:d?11:-1}function ie(p,c){var a,d;return(a="https://tun-cos-1258344701.file.myqcloud.com/fp.js",d===void 0&&(d=Date.now()+"-"+Math.random()),new Promise(function(C,H){if(document.getElementById(d))C(void 0);else{var K=document.getElementsByTagName("head")[0],he=document.createElement("script");he.onload=function(){return function(){he.onload=null,C(void 0)}},he.onerror=function(Be){he.onerror=null,K.removeChild(he),H(Be)},he.src=a,he.id=d,K.appendChild(he)}})).then(function(){new Fingerprint().getQimei36(p,c)}).catch(function(C){}),""}var q=function(){return(q=Object.assign||function(c){for(var a,d=1,C=arguments.length;d<C;d++)for(var H in a=arguments[d])Object.prototype.hasOwnProperty.call(a,H)&&(c[H]=a[H]);return c}).apply(this,arguments)},se,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,d){if(!p.canUseDB())return d({message:"当前不支持 indexeddb"});var C=c.config,H=C.name,K=C.version,he=C.stores,Be=indexedDB.open(H,K);Be.onsuccess=function(){c.db=Be.result,a(),q({result:1,func:"open",params:JSON.stringify(c.config)},c.reportOptions)},Be.onerror=function(Te){var fe,Le;d(Te),q({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){q({result:0,func:"open",params:JSON.stringify(c.config),error_msg:Te.message},c.reportOptions),d(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,d){var C=indexedDB.deleteDatabase(c.config.name);C.onsuccess=function(){return a()},C.onerror=d})},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,d){var C=c.getStore("readonly").count();C.onsuccess=function(){return a(C.result)},C.onerror=d})},p.prototype.clearStore=function(){var c=this;return new Promise(function(a,d){var C=c.getStore("readwrite").clear();C.onsuccess=function(){return a()},C.onerror=d})},p.prototype.add=function(c,a){var d=this;return new Promise(function(C,H){var K=d.getStore("readwrite").add(c,a);K.onsuccess=function(){C(K.result)},K.onerror=H})},p.prototype.put=function(c,a){var d=this;return new Promise(function(C,H){var K=d.getStore("readwrite").put(c,a);K.onsuccess=function(){C(K.result)},K.onerror=H})},p.prototype.getStoreAllData=function(){var c=this;return new Promise(function(a,d){var C=c.getStore("readonly").openCursor(),H=[];C.onsuccess=function(){var K;if(!((K=C.result)===null||K===void 0)&&K.value){var he=C.result.value;H.push(he),C.result.continue()}else a(H)},C.onerror=d})},p.prototype.getDataRangeByIndex=function(c,a,d,C,H){var K=this;return new Promise(function(he,Be){var Te=K.getStore().index(c),fe=IDBKeyRange.bound(a,d,C,H),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,d,C,H){var K=this;return new Promise(function(he,Be){var Te=K.getStore("readwrite").index(c),fe=IDBKeyRange.bound(a,d,C,H),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,d=c.indexes,C=d===void 0?[]:d,H=c.options;if(this.db){this.db.objectStoreNames.contains(a)&&this.db.deleteObjectStore(a);var K=this.db.createObjectStore(a,H);C.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}(),le="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:le,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 d=this;return this.readyExec(function(){return d.db.add({eventId:c,value:a})})},p.prototype.getItem=function(c){return j(this,void 0,void 0,function(){var a=this;return O(this,function(d){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 d=this;return this.readyExec(function(){return d.db.put({eventId:c,value:a})})},p.prototype.iterate=function(c){var a=this;return this.readyExec(function(){return a.db.getStoreAllData().then(function(d){d.forEach(function(C){c(C.value)})})})},p.prototype.open=function(){return j(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(le),[2]}})})},p.prototype.readyExec=function(c){return this.isReady?c():(this.taskQueue=this.taskQueue.then(function(){return c()}),this.taskQueue)},p}(),Ee=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 d=JSON.stringify(a);this.storage.setItem(c,d),this.keyObject[c]=a},p.prototype.iterate=function(c){for(var a=Object.keys(this.keyObject),d=0;d<a.length;d++){var C=this.storage.getItem(a[d]);c(JSON.parse(C))}},p}(),be=function(){function p(c,a){var d=this;this.dbEventCount=0,te()>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?(this.store=new Ee(a),this.dbEventCount=this.store.getCount()):(this.store=new Ce(c),this.getCount().then(function(C){d.dbEventCount=C}).catch(function(C){}))}return p.prototype.getCount=function(){return j(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 j(this,void 0,void 0,function(){var d,C;return O(this,function(H){switch(H.label){case 0:if(this.dbEventCount>=1e4)return[2,Promise.reject()];d=J(c.mapValue),H.label=1;case 1:return H.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(d,c)];case 2:return[2,H.sent()];case 3:return C=H.sent(),a&&a(C,c),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}})})},p.prototype.getEvents=function(){return j(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(d){c.push(d)})];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 j(this,void 0,void 0,function(){var a;return O(this,function(d){switch(d.label){case 0:a=J(c.mapValue),d.label=1;case 1:return d.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(a)];case 2:return[2,d.sent()];case 3:return d.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}})})},p}(),ye=function(){return(ye=Object.assign||function(c){for(var a,d=1,C=arguments.length;d<C;d++)for(var H in a=arguments[d])Object.prototype.hasOwnProperty.call(a,H)&&(c[H]=a[H]);return c}).apply(this,arguments)};function we(p){try{return decodeURIComponent(p.replace(/\+/g," "))}catch(c){return null}}function xe(p,c){var a=[null,void 0,"",NaN].includes(p);if(c.isSkipEmpty&&a)return null;var d=!c.isSkipEmpty&&a?"":p;try{return c.encode?encodeURIComponent(d):d}catch(C){return null}}function Fe(p,c){c===void 0&&(c={encode:!0,isSkipEmpty:!1});var a=p.url,d=p.query,C=d===void 0?{}:d,H=p.hash,K=a.split("#"),he=K[0],Be=K[1],Te=Be===void 0?"":Be,fe=he.split("?")[0],Le=[],$e=xe(H||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=we(ct),Ct=Object.create(null);return mt.split("&").forEach(function(f){var v=f.split("="),M=v[0],ne=v[1],ke=ne===void 0?"":ne,je=we(M),Qe=we(ke);je===null||Qe===null||je===""&&Qe===""||Ct[je]||(Ct[je]=Qe)}),{url:at,query:Ct,hash:vt}}(a).query),C);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,d){if(c&&document.querySelectorAll("script[data-tag="+c+"]").length)return a();var C=document.createElement("script"),H=ye({type:"text/javascript",charset:"utf-8"},p);Object.keys(H).forEach(function(K){return function(he,Be,Te){if(he)return Te===void 0?he.getAttribute(Be):he.setAttribute(Be,Te)}(C,K,H[K])}),c&&(C.dataset.tag=c),C.onload=function(){return a()},C.onreadystatechange=function(){var K=C.readyState;["complete","loaded"].includes(K)&&(C.onreadystatechange=null,a())},C.onerror=d,document.body.appendChild(C)})}(function(p){p[p.equal=0]="equal",p[p.low=-1]="low",p[p.high=1]="high"})(se||(se={}));var me=function(){return(me=Object.assign||function(c){for(var a,d=1,C=arguments.length;d<C;d++)for(var H in a=arguments[d])Object.prototype.hasOwnProperty.call(a,H)&&(c[H]=a[H]);return c}).apply(this,arguments)};function Re(p,c,a,d){return new(a||(a=Promise))(function(C,H){function K(Te){try{Be(d.next(Te))}catch(fe){H(fe)}}function he(Te){try{Be(d.throw(Te))}catch(fe){H(fe)}}function Be(Te){var fe;Te.done?C(Te.value):(fe=Te.value,fe instanceof a?fe:new a(function(Le){Le(fe)})).then(K,he)}Be((d=d.apply(p,c||[])).next())})}function Ne(p,c){var a,d,C,H,K={label:0,sent:function(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return H={next:he(0),throw:he(1),return:he(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function he(Be){return function(Te){return function(fe){if(a)throw new TypeError("Generator is already executing.");for(;K;)try{if(a=1,d&&(C=2&fe[0]?d.return:fe[0]?d.throw||((C=d.return)&&C.call(d),0):d.next)&&!(C=C.call(d,fe[1])).done)return C;switch(d=0,C&&(fe=[2&fe[0],C.value]),fe[0]){case 0:case 1:C=fe;break;case 4:return K.label++,{value:fe[1],done:!1};case 5:K.label++,d=fe[1],fe=[0];continue;case 7:fe=K.ops.pop(),K.trys.pop();continue;default:if(!((C=(C=K.trys).length>0&&C[C.length-1])||fe[0]!==6&&fe[0]!==2)){K=0;continue}if(fe[0]===3&&(!C||fe[1]>C[0]&&fe[1]<C[3])){K.label=fe[1];break}if(fe[0]===6&&K.label<C[1]){K.label=C[1],C=fe;break}if(C&&K.label<C[2]){K.label=C[2],K.ops.push(fe);break}C[2]&&K.ops.pop(),K.trys.pop();continue}fe=c.call(p,K)}catch(Le){fe=[6,Le],d=0}finally{a=C=0}if(5&fe[0])throw fe[1];return{value:fe[0]?fe[1]:void 0,done:!0}}([Be,Te])}}}var Ie=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 d=Promise.resolve(c);return(a?Array.prototype.reduceRight:Array.prototype.reduce).call(this.interceptors,function(C,H){if(H){var K=H.resolved,he=H.rejected;d=d.then(K,he)}return C},""),d},p.prototype.eject=function(c){this.interceptors[c]&&(this.interceptors[c]=null)},p}(),Oe={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 Ie,response:new Ie}},Pe=/^([a-z][a-z\d+\-.]*:)?\/\//i,Me=Object.prototype.toString;function He(p){return Re(this,void 0,void 0,function(){var c;return Ne(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("加载 polyfill "+p+" 失败: "+c.message);case 4:return[2]}})})}function Ve(p){return["Accept","Content-Type"].forEach(function(c){return a=c,void((d=p.headers)&&Object.keys(d).forEach(function(C){C!==a&&C.toUpperCase()===a.toUpperCase()&&(d[a]=d[C],delete d[C])}));var a,d}),function(c){if(Me.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,d,C,H,K,he,Be,Te,fe,Le,$e,Ze,We,et,st,ut;return Ne(this,function(ct){switch(ct.label){case 0:return c=Oe.baseURL,a=Oe.defaults,d=Oe.interceptors,[4,He(Oe.polyfillUrl)];case 1:return ct.sent(),(C=me(me({},a),p)).headers||(C.headers=function(it){it===void 0&&(it="GET");var at=Oe.headers[it]||{};return me(me({},Oe.headers.common),at)}(C.method)),Ve(C),[4,d.request.traverse(C,!0)];case 2:if((H=ct.sent())instanceof Error)throw H;return H.url=function(it,at){return!it||Pe.test(at)?at:it.replace(/\/+$/,"")+"/"+at.replace(/^\/+/,"")}(c,H.url),K=H.url,he=H.timeout,Be=H.params,Te=H.method,fe=["GET","DELETE","OPTIONS","HEAD"].includes(Te===void 0?"GET":Te)&&!!Be,Le=fe?Fe({url:K,query:Be}):K,$e=[],he&&!H.signal&&(et=new Promise(function(it){Ze=setTimeout(function(){it(new Error("timeout"))},he)}),$e.push(et),We=new AbortController,H.signal=We.signal),$e.push(fetch(Le,H).catch(function(it){return it})),[4,Promise.race($e)];case 3:return st=ct.sent(),Ze&&clearTimeout(Ze),[4,d.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){Oe.interceptors.request.use(function(a){var d=a.url,C=a.method,H=a.body,K=H;if(c.onReportBeforeSend){var he=c.onReportBeforeSend({url:d,method:C,data:H?JSON.parse(H):null});K=he!=null&&he.data?JSON.stringify(he.data):null}return C!="GET"&&K?_(_({},a),{body:K}):a})}return p.prototype.get=function(c,a){return j(this,void 0,void 0,function(){var d,C;return O(this,function(H){switch(H.label){case 0:return[4,ze(_({url:c},a))];case 1:return[4,(d=H.sent()).json()];case 2:return C=H.sent(),[2,Promise.resolve({data:C,status:d.status,statusText:d.statusText,headers:d.headers})]}})})},p.prototype.post=function(c,a,d){return j(this,void 0,void 0,function(){var C,H;return O(this,function(K){switch(K.label){case 0:return[4,ze(_({url:c,body:a,method:"POST"},d))];case 1:return[4,(C=K.sent()).json()];case 2:return H=K.sent(),[2,Promise.resolve({data:H,status:C.status,statusText:C.statusText,headers:C.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(a){return""}},p.prototype.removeItem=function(c){try{window.localStorage.removeItem(this.getStoreKey(c))}catch(a){}},p.prototype.setItem=function(c,a){try{window.localStorage.setItem(this.getStoreKey(c),a)}catch(d){}},p.prototype.setSessionItem=function(c,a){try{window.sessionStorage.setItem(this.getStoreKey(c),a)}catch(d){}},p.prototype.getSessionItem=function(c){try{return window.sessionStorage.getItem(this.getStoreKey(c))}catch(a){return""}},p.prototype.getStoreKey=function(c){return x+this.appkey+"_"+c},p.prototype.createDeviceId=function(){try{var c=window.localStorage.getItem(V);return c||(c=function(a){for(var d="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",C="",H=0;H<a;H++)C+=d.charAt(Math.floor(Math.random()*d.length));return C}(32),window.localStorage.setItem(V,c)),c}catch(a){return""}},p.prototype.clear=function(){try{for(var c=window.localStorage.length,a=0;a<c;a++){var d=window.localStorage.key(a);(d==null?void 0:d.substr(0,9))==x&&window.localStorage.removeItem(d)}}catch(C){}},p.prototype.getStoreCount=function(){var c=0;try{c=window.localStorage.length}catch(a){}return c},p}(),Je="logid_start",Ae="4.5.14-web";return function(p){function c(a){var d=p.call(this,a)||this;d.qimei36="",d.uselessCycleTaskNum=0,d.underWeakNet=!1,d.pauseSearching=!1,d.send=function(he,Be,Te){d.storage.setItem(X,Date.now().toString()),d.network.post(d.uploadUrl||d.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?d.delayTime=1e3*fe.data.delayTime:d.delayTime=0,Be&&Be(he.data),he.data.events.forEach(function($e){d.store.removeEvent($e).then(function(){d.removeSendingId(J($e.mapValue))})}),d.doCustomCycleTask()}).catch(function(fe){var Le=he.data.events;d.errorReport.reportError(fe.code?fe.code.toString():"600",fe.message),Te&&Te(he.data);var $e=JSON.parse(d.storage.getItem(ue));Le.forEach(function(Ze){$e&&$e.indexOf(J(Ze))!=-1&&d.store.insertEvent(Ze,function(We,et){We&&d.errorReport.reportError("604","insertEvent fail!")}),d.removeSendingId(J(Ze))}),d.monitorUploadFailed()})};var C,H,K=te();return d.isUnderIE8=K>0&&K<8,d.isUnderIE8||(d.isUnderIE=K>0,a.needInitQimei&&ie(a.appkey,function(he){d.qimei36=he.q36}),d.network=new Ye(a),d.storage=new tt(a.appkey),d.initCommonInfo(a),d.store=new be(a.appkey,d.storage),d.errorReport=new Q(d.config,d.commonInfo,"web",d.network),d.strategy=new m(a.needQueryConfig==null||a.needQueryConfig,d.config,d.commonInfo,d.storage,d.network),d.logidStartTime=d.storage.getItem(Je),d.logidStartTime||(d.logidStartTime=Date.now().toString(),d.storage.setItem(Je,d.logidStartTime)),C=d.logidStartTime,H=Date.now()-Number.parseFloat(C),Math.floor(H/864e5)>=365&&d.storage.clear(),d.initSession(a),d.onDirectUserAction("rqd_js_init",{}),setTimeout(function(){return d.lifeCycle.emit("init")},0),d.initDelayTime=a.delay?a.delay:1e3,d.cycleTask(d.initDelayTime)),d}return function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function C(){this.constructor=a}h(a,d),a.prototype=d===null?Object.create(d):(C.prototype=d.prototype,new C)}(c,p),c.prototype.initSession=function(a){var d=18e5;a.sessionDuration&&a.sessionDuration>3e4&&(d=a.sessionDuration),this.beaconSession=new re(this.storage,d,this)},c.prototype.initCommonInfo=function(a){var d=Number(this.storage.getItem(X));try{var C=JSON.parse(this.storage.getItem(ue));(Date.now()-d>3e4||!C)&&this.storage.setItem(ue,JSON.stringify([]))}catch(K){}a.uploadUrl&&(this.uploadUrl=a.uploadUrl+"?appkey="+a.appkey);var H=[window.screen.width,window.screen.height];window.devicePixelRatio&&H.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:H.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 d=this;this.intervalID=window.setInterval(function(){d.pauseSearching||d.store.getEvents().then(function(C){C.length==0&&(d.pauseSearching=!0);var H=[],K=JSON.parse(d.storage.getItem(ue));K||(K=[]),C&&C.forEach(function(he){var Be=J(he.mapValue);K.indexOf(Be)==-1&&(H.push(he),K.push(Be))}),H.length!=0&&(d.storage.setItem(ue,JSON.stringify(K)),d._normalLogPipeline(d.assembleData(H)))}).catch(function(C){})},a)},c.prototype.onReport=function(a,d,C){var H=this;if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{this.pauseSearching=!1;var K=this.generateData(a,d,C);if(C&&this.delayTime==0&&!this.underWeakNet)this._normalLogPipeline(this.assembleData(K));else{var he=K.shift();he&&this.store.insertEvent(he,function(Be){Be&&H.errorReport.reportError("604","insertEvent fail!")}).catch(function(Be){H._normalLogPipeline(H.assembleData(K))})}}},c.prototype.onSendBeacon=function(a,d){if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{this.pauseSearching=!1;var C=this.assembleData(this.generateData(a,d,!0));typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(C))}},c.prototype.generateData=function(a,d,C){var H=[],K="4.5.14-web_"+(C?"direct_log_id":"normal_log_id"),he=Number(this.storage.getItem(K));return he=he||1,d=_(_({},d),{A99:C?"Y":"N",A100:he.toString(),A72:Ae,A88:this.logidStartTime}),he++,this.storage.setItem(K,he.toString()),H.push({eventCode:a,eventTime:Date.now().toString(),mapValue:ae(d,this.config.strictMode)}),H},c.prototype.assembleData=function(a){var d=this.beaconSession.getSession();return{appVersion:this.config.appVersion?De(this.config.appVersion):"",sdkId:"js",sdkVersion:Ae,mainAppKey:this.config.appkey,platformId:3,common:ae(_(_({},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:d.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,n,o){(function(i){var l=o("./node_modules/@babel/runtime/helpers/typeof.js"),s=s||function(h,_){var j={},O=j.lib={},x=function(){},V=O.Base={extend:function(R){x.prototype=this;var b=new x;return R&&b.mixIn(R),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var R=this.extend();return R.init.apply(R,arguments),R},init:function(){},mixIn:function(R){for(var b in R)R.hasOwnProperty(b)&&(this[b]=R[b]);R.hasOwnProperty("toString")&&(this.toString=R.toString)},clone:function(){return this.init.prototype.extend(this)}},X=O.WordArray=V.extend({init:function(R,b){R=this.words=R||[],this.sigBytes=b!=_?b:4*R.length},toString:function(R){return(R||G).stringify(this)},concat:function(R){var b=this.words,Q=R.words,m=this.sigBytes;if(R=R.sigBytes,this.clamp(),m%4)for(var oe=0;oe<R;oe++)b[m+oe>>>2]|=(Q[oe>>>2]>>>24-8*(oe%4)&255)<<24-8*((m+oe)%4);else if(65535<Q.length)for(oe=0;oe<R;oe+=4)b[m+oe>>>2]=Q[oe>>>2];else b.push.apply(b,Q);return this.sigBytes+=R,this},clamp:function(){var R=this.words,b=this.sigBytes;R[b>>>2]&=4294967295<<32-8*(b%4),R.length=h.ceil(b/4)},clone:function(){var R=V.clone.call(this);return R.words=this.words.slice(0),R},random:function(R){for(var b=[],Q=0;Q<R;Q+=4)b.push(4294967296*h.random()|0);return new X.init(b,R)}}),ue=j.enc={},G=ue.Hex={stringify:function(R){var b=R.words;R=R.sigBytes;for(var Q=[],m=0;m<R;m++){var oe=b[m>>>2]>>>24-8*(m%4)&255;Q.push((oe>>>4).toString(16)),Q.push((oe&15).toString(16))}return Q.join("")},parse:function(R){for(var b=R.length,Q=[],m=0;m<b;m+=2)Q[m>>>3]|=parseInt(R.substr(m,2),16)<<24-4*(m%8);return new X.init(Q,b/2)}},Z=ue.Latin1={stringify:function(R){var b=R.words;R=R.sigBytes;for(var Q=[],m=0;m<R;m++)Q.push(String.fromCharCode(b[m>>>2]>>>24-8*(m%4)&255));return Q.join("")},parse:function(R){for(var b=R.length,Q=[],m=0;m<b;m++)Q[m>>>2]|=(R.charCodeAt(m)&255)<<24-8*(m%4);return new X.init(Q,b)}},de=ue.Utf8={stringify:function(R){try{return decodeURIComponent(escape(Z.stringify(R)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(R){return Z.parse(unescape(encodeURIComponent(R)))}},ae=O.BufferedBlockAlgorithm=V.extend({reset:function(){this._data=new X.init,this._nDataBytes=0},_append:function(R){typeof R=="string"&&(R=de.parse(R)),this._data.concat(R),this._nDataBytes+=R.sigBytes},_process:function(R){var b=this._data,Q=b.words,m=b.sigBytes,oe=this.blockSize,re=m/(4*oe),re=R?h.ceil(re):h.max((re|0)-this._minBufferSize,0);if(R=re*oe,m=h.min(4*R,m),R){for(var te=0;te<R;te+=oe)this._doProcessBlock(Q,te);te=Q.splice(0,R),b.sigBytes-=m}return new X.init(te,m)},clone:function(){var R=V.clone.call(this);return R._data=this._data.clone(),R},_minBufferSize:0});O.Hasher=ae.extend({cfg:V.extend(),init:function(R){this.cfg=this.cfg.extend(R),this.reset()},reset:function(){ae.reset.call(this),this._doReset()},update:function(R){return this._append(R),this._process(),this},finalize:function(R){return R&&this._append(R),this._doFinalize()},blockSize:16,_createHelper:function(R){return function(b,Q){return new R.init(Q).finalize(b)}},_createHmacHelper:function(R){return function(b,Q){return new De.HMAC.init(R,Q).finalize(b)}}});var De=j.algo={};return j}(Math);(function(){var h=s,x=h.lib,_=x.WordArray,j=x.Hasher,O=[],x=h.algo.SHA1=j.extend({_doReset:function(){this._hash=new _.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(X,ue){for(var G=this._hash.words,Z=G[0],de=G[1],ae=G[2],De=G[3],J=G[4],R=0;80>R;R++){if(16>R)O[R]=X[ue+R]|0;else{var b=O[R-3]^O[R-8]^O[R-14]^O[R-16];O[R]=b<<1|b>>>31}b=(Z<<5|Z>>>27)+J+O[R],b=20>R?b+((de&ae|~de&De)+1518500249):40>R?b+((de^ae^De)+1859775393):60>R?b+((de&ae|de&De|ae&De)-1894007588):b+((de^ae^De)-899497514),J=De,De=ae,ae=de<<30|de>>>2,de=Z,Z=b}G[0]=G[0]+Z|0,G[1]=G[1]+de|0,G[2]=G[2]+ae|0,G[3]=G[3]+De|0,G[4]=G[4]+J|0},_doFinalize:function(){var X=this._data,ue=X.words,G=8*this._nDataBytes,Z=8*X.sigBytes;return ue[Z>>>5]|=128<<24-Z%32,ue[(Z+64>>>9<<4)+14]=Math.floor(G/4294967296),ue[(Z+64>>>9<<4)+15]=G,X.sigBytes=4*ue.length,this._process(),this._hash},clone:function(){var X=j.clone.call(this);return X._hash=this._hash.clone(),X}});h.SHA1=j._createHelper(x),h.HmacSHA1=j._createHmacHelper(x)})(),function(){var h=s,_=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(O,x){O=this._hasher=new O.init,typeof x=="string"&&(x=_.parse(x));var V=O.blockSize,X=4*V;x.sigBytes>X&&(x=O.finalize(x)),x.clamp();for(var ue=this._oKey=x.clone(),G=this._iKey=x.clone(),Z=ue.words,de=G.words,ae=0;ae<V;ae++)Z[ae]^=1549556828,de[ae]^=909522486;ue.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 x=this._hasher;return O=x.finalize(O),x.reset(),x.finalize(this._oKey.clone().concat(O))}})}(),function(){var h=s,_=h.lib,j=_.WordArray,O=h.enc;O.Base64={stringify:function(V){var X=V.words,ue=V.sigBytes,G=this._map;V.clamp();for(var Z=[],de=0;de<ue;de+=3)for(var ae=X[de>>>2]>>>24-de%4*8&255,De=X[de+1>>>2]>>>24-(de+1)%4*8&255,J=X[de+2>>>2]>>>24-(de+2)%4*8&255,R=ae<<16|De<<8|J,b=0;b<4&&de+b*.75<ue;b++)Z.push(G.charAt(R>>>6*(3-b)&63));var Q=G.charAt(64);if(Q)for(;Z.length%4;)Z.push(Q);return Z.join("")},parse:function(V){var X=V.length,ue=this._map,G=ue.charAt(64);if(G){var Z=V.indexOf(G);Z!=-1&&(X=Z)}for(var de=[],ae=0,De=0;De<X;De++)if(De%4){var J=ue.indexOf(V.charAt(De-1))<<De%4*2,R=ue.indexOf(V.charAt(De))>>>6-De%4*2;de[ae>>>2]|=(J|R)<<24-ae%4*8,ae++}return j.create(de,ae)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),l(i)==="object"?i.exports=s:window.CryptoJS=s}).call(this,o("./node_modules/webpack/buildin/module.js")(e))},"./lib/json2xml.js":function(e,n,o){var i=o("./node_modules/@babel/runtime/helpers/typeof.js"),l="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�",s="-.0-9·̀-ͯ‿⁀",h=new RegExp("^([^"+l+"])|^((x|X)(m|M)(l|L))|([^"+l+s+"])","g"),_=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,j=function(ue){var G=[];if(ue instanceof Object)for(var Z in ue)ue.hasOwnProperty(Z)&&G.push(Z);return G},O=function(ue,G){var Z=function(ae,De,J,R,b){var Q=G.indent!==void 0?G.indent:" ",m=G.prettyPrint?`
- `+new Array(R).join(Q):"";G.removeIllegalNameCharacters&&(ae=ae.replace(h,"_"));var oe=[m,"<",ae,J||""];return De&&De.length>0?(oe.push(">"),oe.push(De),b&&oe.push(m),oe.push("</"),oe.push(ae),oe.push(">")):oe.push("/>"),oe.join("")};return function de(ae,De,J){var R=i(ae);switch((Array.isArray?Array.isArray(ae):ae instanceof Array)?R="array":ae instanceof Date&&(R="date"),R){case"array":var b=[];return ae.map(function(re){b.push(de(re,1,J+1))}),G.prettyPrint&&b.push(`
- `),b.join("");case"date":return ae.toJSON?ae.toJSON():ae+"";case"object":var Q=[];for(var m in ae)if(ae.hasOwnProperty(m))if(ae[m]instanceof Array)for(var oe=0;oe<ae[m].length;oe++)ae[m].hasOwnProperty(oe)&&Q.push(Z(m,de(ae[m][oe],0,J+1),null,J+1,j(ae[m][oe]).length));else Q.push(Z(m,de(ae[m],0,J+1),null,J+1));return G.prettyPrint&&Q.length>0&&Q.push(`
- `),Q.join("");case"function":return ae();default:return G.escape?V(ae):""+ae}}(ue,0,0)},x=function(ue){var G=['<?xml version="1.0" encoding="UTF-8"'];return ue&&G.push(' standalone="yes"'),G.push("?>"),G.join("")};function V(X){return(""+X).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(_,"")}e.exports=function(X,ue){if(ue||(ue={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),typeof X=="string")try{X=JSON.parse(X.toString())}catch(ae){return!1}var G="",Z="";ue&&(i(ue)=="object"?(ue.xmlHeader&&(G=x(!!ue.xmlHeader.standalone)),typeof ue.docType<"u"&&(Z="<!DOCTYPE "+ue.docType+">")):G=x()),ue=ue||{};var de=[G,ue.prettyPrint&&Z?`
- `:"",Z,O(X,ue)];return de.join("").replace(/\n{2,}/g,`
- `).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>"u"?"undefined":_typeof(window))==="object",root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&(typeof self>"u"?"undefined":_typeof(self))==="object",NODE_JS=!root.JS_MD5_NO_NODE_JS&&(typeof process>"u"?"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<"u",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(n){return function(o,i){return new Md5(!0).update(o,i)[n]()}},createMethod=function(){var n=createOutputMethod("hex");NODE_JS&&(n=nodeWrap(n)),n.getCtx=n.create=function(){return new Md5},n.update=function(l){return n.create().update(l)};for(var o=0;o<OUTPUT_TYPES.length;++o){var i=OUTPUT_TYPES[o];n[i]=createOutputMethod(i)}return n},nodeWrap=function nodeWrap(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function e(n){if(typeof n=="string")return crypto.createHash("md5").update(n,"utf8").digest("hex");if(n==null)throw ERROR;return n.constructor===ArrayBuffer&&(n=new Uint8Array(n)),Array.isArray(n)||ArrayBuffer.isView(n)||n.constructor===Buffer?crypto.createHash("md5").update(new Buffer(n)).digest("hex"):method(n)};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 n=new ArrayBuffer(68);this.buffer8=new Uint8Array(n),this.blocks=new Uint32Array(n)}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,n){if(!this.finalized){for(var o,i=0,l,s=e.length,h=this.blocks,_=this.buffer8;i<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(l=this.start;i<s&&l<64;++i)o=e.charCodeAt(i),n||o<128?_[l++]=o:o<2048?(_[l++]=192|o>>6,_[l++]=128|o&63):o<55296||o>=57344?(_[l++]=224|o>>12,_[l++]=128|o>>6&63,_[l++]=128|o&63):(o=65536+((o&1023)<<10|e.charCodeAt(++i)&1023),_[l++]=240|o>>18,_[l++]=128|o>>12&63,_[l++]=128|o>>6&63,_[l++]=128|o&63);else for(l=this.start;i<s&&l<64;++i)o=e.charCodeAt(i),n||o<128?h[l>>2]|=o<<SHIFT[l++&3]:o<2048?(h[l>>2]|=(192|o>>6)<<SHIFT[l++&3],h[l>>2]|=(128|o&63)<<SHIFT[l++&3]):o<55296||o>=57344?(h[l>>2]|=(224|o>>12)<<SHIFT[l++&3],h[l>>2]|=(128|o>>6&63)<<SHIFT[l++&3],h[l>>2]|=(128|o&63)<<SHIFT[l++&3]):(o=65536+((o&1023)<<10|e.charCodeAt(++i)&1023),h[l>>2]|=(240|o>>18)<<SHIFT[l++&3],h[l>>2]|=(128|o>>12&63)<<SHIFT[l++&3],h[l>>2]|=(128|o>>6&63)<<SHIFT[l++&3],h[l>>2]|=(128|o&63)<<SHIFT[l++&3]);this.lastByteIndex=l,this.bytes+=l-this.start,l>=64?(this.start=l-64,this.hash(),this.hashed=!0):this.start=l}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,n=this.lastByteIndex;e[n>>2]|=EXTRA[n&3],n>=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,n,o,i,l,s,h=this.blocks;this.first?(e=h[0]-680876937,e=(e<<7|e>>>25)-271733879<<0,i=(-1732584194^e&2004318071)+h[1]-117830708,i=(i<<12|i>>>20)+e<<0,o=(-271733879^i&(e^-271733879))+h[2]-1126478375,o=(o<<17|o>>>15)+i<<0,n=(e^o&(i^e))+h[3]-1316259209,n=(n<<22|n>>>10)+o<<0):(e=this.h0,n=this.h1,o=this.h2,i=this.h3,e+=(i^n&(o^i))+h[0]-680876936,e=(e<<7|e>>>25)+n<<0,i+=(o^e&(n^o))+h[1]-389564586,i=(i<<12|i>>>20)+e<<0,o+=(n^i&(e^n))+h[2]+606105819,o=(o<<17|o>>>15)+i<<0,n+=(e^o&(i^e))+h[3]-1044525330,n=(n<<22|n>>>10)+o<<0),e+=(i^n&(o^i))+h[4]-176418897,e=(e<<7|e>>>25)+n<<0,i+=(o^e&(n^o))+h[5]+1200080426,i=(i<<12|i>>>20)+e<<0,o+=(n^i&(e^n))+h[6]-1473231341,o=(o<<17|o>>>15)+i<<0,n+=(e^o&(i^e))+h[7]-45705983,n=(n<<22|n>>>10)+o<<0,e+=(i^n&(o^i))+h[8]+1770035416,e=(e<<7|e>>>25)+n<<0,i+=(o^e&(n^o))+h[9]-1958414417,i=(i<<12|i>>>20)+e<<0,o+=(n^i&(e^n))+h[10]-42063,o=(o<<17|o>>>15)+i<<0,n+=(e^o&(i^e))+h[11]-1990404162,n=(n<<22|n>>>10)+o<<0,e+=(i^n&(o^i))+h[12]+1804603682,e=(e<<7|e>>>25)+n<<0,i+=(o^e&(n^o))+h[13]-40341101,i=(i<<12|i>>>20)+e<<0,o+=(n^i&(e^n))+h[14]-1502002290,o=(o<<17|o>>>15)+i<<0,n+=(e^o&(i^e))+h[15]+1236535329,n=(n<<22|n>>>10)+o<<0,e+=(o^i&(n^o))+h[1]-165796510,e=(e<<5|e>>>27)+n<<0,i+=(n^o&(e^n))+h[6]-1069501632,i=(i<<9|i>>>23)+e<<0,o+=(e^n&(i^e))+h[11]+643717713,o=(o<<14|o>>>18)+i<<0,n+=(i^e&(o^i))+h[0]-373897302,n=(n<<20|n>>>12)+o<<0,e+=(o^i&(n^o))+h[5]-701558691,e=(e<<5|e>>>27)+n<<0,i+=(n^o&(e^n))+h[10]+38016083,i=(i<<9|i>>>23)+e<<0,o+=(e^n&(i^e))+h[15]-660478335,o=(o<<14|o>>>18)+i<<0,n+=(i^e&(o^i))+h[4]-405537848,n=(n<<20|n>>>12)+o<<0,e+=(o^i&(n^o))+h[9]+568446438,e=(e<<5|e>>>27)+n<<0,i+=(n^o&(e^n))+h[14]-1019803690,i=(i<<9|i>>>23)+e<<0,o+=(e^n&(i^e))+h[3]-187363961,o=(o<<14|o>>>18)+i<<0,n+=(i^e&(o^i))+h[8]+1163531501,n=(n<<20|n>>>12)+o<<0,e+=(o^i&(n^o))+h[13]-1444681467,e=(e<<5|e>>>27)+n<<0,i+=(n^o&(e^n))+h[2]-51403784,i=(i<<9|i>>>23)+e<<0,o+=(e^n&(i^e))+h[7]+1735328473,o=(o<<14|o>>>18)+i<<0,n+=(i^e&(o^i))+h[12]-1926607734,n=(n<<20|n>>>12)+o<<0,l=n^o,e+=(l^i)+h[5]-378558,e=(e<<4|e>>>28)+n<<0,i+=(l^e)+h[8]-2022574463,i=(i<<11|i>>>21)+e<<0,s=i^e,o+=(s^n)+h[11]+1839030562,o=(o<<16|o>>>16)+i<<0,n+=(s^o)+h[14]-35309556,n=(n<<23|n>>>9)+o<<0,l=n^o,e+=(l^i)+h[1]-1530992060,e=(e<<4|e>>>28)+n<<0,i+=(l^e)+h[4]+1272893353,i=(i<<11|i>>>21)+e<<0,s=i^e,o+=(s^n)+h[7]-155497632,o=(o<<16|o>>>16)+i<<0,n+=(s^o)+h[10]-1094730640,n=(n<<23|n>>>9)+o<<0,l=n^o,e+=(l^i)+h[13]+681279174,e=(e<<4|e>>>28)+n<<0,i+=(l^e)+h[0]-358537222,i=(i<<11|i>>>21)+e<<0,s=i^e,o+=(s^n)+h[3]-722521979,o=(o<<16|o>>>16)+i<<0,n+=(s^o)+h[6]+76029189,n=(n<<23|n>>>9)+o<<0,l=n^o,e+=(l^i)+h[9]-640364487,e=(e<<4|e>>>28)+n<<0,i+=(l^e)+h[12]-421815835,i=(i<<11|i>>>21)+e<<0,s=i^e,o+=(s^n)+h[15]+530742520,o=(o<<16|o>>>16)+i<<0,n+=(s^o)+h[2]-995338651,n=(n<<23|n>>>9)+o<<0,e+=(o^(n|~i))+h[0]-198630844,e=(e<<6|e>>>26)+n<<0,i+=(n^(e|~o))+h[7]+1126891415,i=(i<<10|i>>>22)+e<<0,o+=(e^(i|~n))+h[14]-1416354905,o=(o<<15|o>>>17)+i<<0,n+=(i^(o|~e))+h[5]-57434055,n=(n<<21|n>>>11)+o<<0,e+=(o^(n|~i))+h[12]+1700485571,e=(e<<6|e>>>26)+n<<0,i+=(n^(e|~o))+h[3]-1894986606,i=(i<<10|i>>>22)+e<<0,o+=(e^(i|~n))+h[10]-1051523,o=(o<<15|o>>>17)+i<<0,n+=(i^(o|~e))+h[1]-2054922799,n=(n<<21|n>>>11)+o<<0,e+=(o^(n|~i))+h[8]+1873313359,e=(e<<6|e>>>26)+n<<0,i+=(n^(e|~o))+h[15]-30611744,i=(i<<10|i>>>22)+e<<0,o+=(e^(i|~n))+h[6]-1560198380,o=(o<<15|o>>>17)+i<<0,n+=(i^(o|~e))+h[13]+1309151649,n=(n<<21|n>>>11)+o<<0,e+=(o^(n|~i))+h[4]-145523070,e=(e<<6|e>>>26)+n<<0,i+=(n^(e|~o))+h[11]-1120210379,i=(i<<10|i>>>22)+e<<0,o+=(e^(i|~n))+h[2]+718787259,o=(o<<15|o>>>17)+i<<0,n+=(i^(o|~e))+h[9]-343485551,n=(n<<21|n>>>11)+o<<0,this.first?(this.h0=e+1732584193<<0,this.h1=n-271733879<<0,this.h2=o-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+n<<0,this.h2=this.h2+o<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,n=this.h1,o=this.h2,i=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[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]+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]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(e){if(e==="hex")return this.hex();this.finalize();var n=this.h0,o=this.h1,i=this.h2,l=this.h3,s=[n&255,n>>8&255,n>>16&255,n>>24&255,o&255,o>>8&255,o>>16&255,o>>24&255,i&255,i>>8&255,i>>16&255,i>>24&255,l&255,l>>8&255,l>>16&255,l>>24&255];return s},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),n=new Uint32Array(e);return n[0]=this.h0,n[1]=this.h1,n[2]=this.h2,n[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,n,o,i="",l=this.array(),s=0;s<15;)e=l[s++],n=l[s++],o=l[s++],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[(e<<4|n>>>4)&63]+BASE64_ENCODE_CHAR[(n<<2|o>>>6)&63]+BASE64_ENCODE_CHAR[o&63];return e=l[s],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"==",i};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,n,o){var i=o("./node_modules/@babel/runtime/helpers/typeof.js"),l=function(x){switch(i(x)){case"string":return x;case"boolean":return x?"true":"false";case"number":return isFinite(x)?x:"";default:return""}},s=function(x,V,X,ue){return V=V||"&",X=X||"=",x===null&&(x=void 0),i(x)==="object"?Object.keys(x).map(function(G){var Z=encodeURIComponent(l(G))+X;return Array.isArray(x[G])?x[G].map(function(de){return Z+encodeURIComponent(l(de))}).join(V):Z+encodeURIComponent(l(x[G]))}).filter(Boolean).join(V):ue?encodeURIComponent(l(ue))+X+encodeURIComponent(l(x)):""},h=function(x,V,X){var ue={};return V.getAllResponseHeaders().trim().split(`
- `).forEach(function(G){if(G){var Z=G.indexOf(":"),de=G.substr(0,Z).trim().toLowerCase(),ae=G.substr(Z+1).trim();ue[de]=ae}}),{error:x,statusCode:V.status,statusMessage:V.statusText,headers:ue,body:X}},_=function(x,V){return!V&&V==="text"?x.responseText:x.response},j=function(x,V){var X=(x.method||"GET").toUpperCase(),ue=x.url;if(x.qs){var G=s(x.qs);G&&(ue+=(ue.indexOf("?")===-1?"?":"&")+G)}var Z=new XMLHttpRequest;if(Z.open(X,ue,!0),Z.responseType=x.dataType||"text",x.xhrFields)for(var de in x.xhrFields)Z[de]=x.xhrFields[de];var ae=x.headers;if(ae)for(var De in ae)ae.hasOwnProperty(De)&&De.toLowerCase()!=="content-length"&&De.toLowerCase()!=="user-agent"&&De.toLowerCase()!=="origin"&&De.toLowerCase()!=="host"&&Z.setRequestHeader(De,ae[De]);return x.onProgress&&Z.upload&&(Z.upload.onprogress=x.onProgress),x.onDownloadProgress&&(Z.onprogress=x.onDownloadProgress),x.timeout&&(Z.timeout=x.timeout),Z.ontimeout=function(J){var R=new Error("timeout");V(h(R,Z))},Z.onload=function(){V(h(null,Z,_(Z,x.dataType)))},Z.onerror=function(J){var R=_(Z,x.dataType);if(R)V(h(null,Z,R));else{var b=Z.statusText;!b&&Z.status===0&&(b=new Error("CORS blocked or network error")),V(h(b,Z,R))}},Z.send(x.body||""),Z};e.exports=j},"./lib/xml2json.js":function(e,n,o){var i=o("./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,l=function(){this.version="1.3.5";var h={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},_=new RegExp(/(?!xmlns)^.*:/);return this.grokType=function(j){return/^\s*$/.test(j)?null:/^(?:true|false)$/i.test(j)?j.toLowerCase()==="true":isFinite(j)?parseFloat(j):j},this.parseString=function(j,O){if(j){var x=this.stringToXML(j);return x.getElementsByTagName("parsererror").length?null:this.parseXML(x,O)}else return null},this.parseXML=function(j,O){for(var x in O)h[x]=O[x];var V={},X=0,ue="",G=j.childNodes.length;if(G)for(var Z,de,ae,De=0;De<j.childNodes.length;De++)Z=j.childNodes.item(De),Z.nodeType===4?h.mergeCDATA&&(ue+=Z.nodeValue):Z.nodeType===3?ue+=Z.nodeValue:Z.nodeType===1&&(X===0&&(V={}),h.stripElemPrefix?de=Z.nodeName.replace(_,""):de=Z.nodeName,ae=l.parseXML(Z),V.hasOwnProperty(de)?(V[de].constructor!==Array&&(V[de]=[V[de]]),V[de].push(ae)):(V[de]=ae,X++));return Object.keys(V).length||(V=ue||""),V},this.xmlToString=function(j){try{var O=j.xml?j.xml:new XMLSerializer().serializeToString(j);return O}catch(x){return null}},this.stringToXML=function(j){try{var O=null;if(window.DOMParser){var x=new i;return O=x.parseFromString(j,"text/xml"),O}else return O=new ActiveXObject("Microsoft.XMLDOM"),O.async=!1,O.loadXML(j),O}catch(V){return null}},this}.call({}),s=function(_){return l.parseString(_)};e.exports=s},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(e,n){function o(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(e,n,o){var i=o("./node_modules/@babel/runtime/helpers/toPropertyKey.js");function l(h,_){for(var j=0;j<_.length;j++){var O=_[j];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(h,i(O.key),O)}}function s(h,_,j){return _&&l(h.prototype,_),j&&l(h,j),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,n,o){var i=o("./node_modules/@babel/runtime/helpers/typeof.js").default;function l(s,h){if(i(s)!=="object"||s===null)return s;var _=s[Symbol.toPrimitive];if(_!==void 0){var j=_.call(s,h||"default");if(i(j)!=="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(s)}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":function(e,n,o){var i=o("./node_modules/@babel/runtime/helpers/typeof.js").default,l=o("./node_modules/@babel/runtime/helpers/toPrimitive.js");function s(h){var _=l(h,"string");return i(_)==="symbol"?_:String(_)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(e,n){function o(i){"@babel/helpers - typeof";return e.exports=o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},e.exports.__esModule=!0,e.exports.default=e.exports,o(i)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@xmldom/xmldom/lib/conventions.js":function(e,n,o){function i(j,O,x){if(x===void 0&&(x=Array.prototype),j&&typeof x.find=="function")return x.find.call(j,O);for(var V=0;V<j.length;V++)if(Object.prototype.hasOwnProperty.call(j,V)){var X=j[V];if(O.call(void 0,X,V,j))return X}}function l(j,O){return O===void 0&&(O=Object),O&&typeof O.freeze=="function"?O.freeze(j):j}function s(j,O){if(j===null||typeof j!="object")throw new TypeError("target is not an object");for(var x in O)Object.prototype.hasOwnProperty.call(O,x)&&(j[x]=O[x]);return j}var h=l({HTML:"text/html",isHTML:function(j){return j===h.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_=l({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(j){return j===_.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});n.assign=s,n.find=i,n.freeze=l,n.MIME_TYPE=h,n.NAMESPACE=_},"./node_modules/@xmldom/xmldom/lib/dom-parser.js":function(e,n,o){var i=o("./node_modules/@xmldom/xmldom/lib/conventions.js"),l=o("./node_modules/@xmldom/xmldom/lib/dom.js"),s=o("./node_modules/@xmldom/xmldom/lib/entities.js"),h=o("./node_modules/@xmldom/xmldom/lib/sax.js"),_=l.DOMImplementation,j=i.NAMESPACE,O=h.ParseError,x=h.XMLReader;function V(J){return J.replace(/\r[\n\u0085]/g,`
- `).replace(/[\r\u0085\u2028]/g,`
- `)}function X(J){this.options=J||{locator:{}}}X.prototype.parseFromString=function(J,R){var b=this.options,Q=new x,m=b.domBuilder||new G,oe=b.errorHandler,re=b.locator,te=b.xmlns||{},ie=/\/x?html?$/.test(R),q=ie?s.HTML_ENTITIES:s.XML_ENTITIES;re&&m.setDocumentLocator(re),Q.errorHandler=ue(oe,m,re),Q.domBuilder=b.domBuilder||m,ie&&(te[""]=j.HTML),te.xml=te.xml||j.XML;var se=b.normalizeLineEndings||V;return J&&typeof J=="string"?Q.parse(se(J),te,q):Q.errorHandler.error("invalid doc source"),m.doc};function ue(J,R,b){if(!J){if(R instanceof G)return R;J=R}var Q={},m=J instanceof Function;b=b||{};function oe(re){var te=J[re];!te&&m&&(te=J.length==2?function(ie){J(re,ie)}:J),Q[re]=te&&function(ie){te("[xmldom "+re+"] "+ie+de(b))}||function(){}}return oe("warning"),oe("error"),oe("fatalError"),Q}function G(){this.cdata=!1}function Z(J,R){R.lineNumber=J.lineNumber,R.columnNumber=J.columnNumber}G.prototype={startDocument:function(){this.doc=new _().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(J,R,b,Q){var m=this.doc,oe=m.createElementNS(J,b||R),re=Q.length;De(this,oe),this.currentElement=oe,this.locator&&Z(this.locator,oe);for(var te=0;te<re;te++){var J=Q.getURI(te),ie=Q.getValue(te),b=Q.getQName(te),q=m.createAttributeNS(J,b);this.locator&&Z(Q.getLocator(te),q),q.value=q.nodeValue=ie,oe.setAttributeNode(q)}},endElement:function(J,R,b){var Q=this.currentElement;Q.tagName,this.currentElement=Q.parentNode},startPrefixMapping:function(J,R){},endPrefixMapping:function(J){},processingInstruction:function(J,R){var b=this.doc.createProcessingInstruction(J,R);this.locator&&Z(this.locator,b),De(this,b)},ignorableWhitespace:function(J,R,b){},characters:function(J,R,b){if(J=ae.apply(this,arguments),J){if(this.cdata)var Q=this.doc.createCDATASection(J);else var Q=this.doc.createTextNode(J);this.currentElement?this.currentElement.appendChild(Q):/^\s*$/.test(J)&&this.doc.appendChild(Q),this.locator&&Z(this.locator,Q)}},skippedEntity:function(J){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(J){(this.locator=J)&&(J.lineNumber=0)},comment:function(J,R,b){J=ae.apply(this,arguments);var Q=this.doc.createComment(J);this.locator&&Z(this.locator,Q),De(this,Q)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(J,R,b){var Q=this.doc.implementation;if(Q&&Q.createDocumentType){var m=Q.createDocumentType(J,R,b);this.locator&&Z(this.locator,m),De(this,m),this.doc.doctype=m}},warning:function(J){console.warn("[xmldom warning] "+J,de(this.locator))},error:function(J){console.error("[xmldom error] "+J,de(this.locator))},fatalError:function(J){throw new O(J,this.locator)}};function de(J){if(J)return`
- @`+(J.systemId||"")+"#[line:"+J.lineNumber+",col:"+J.columnNumber+"]"}function ae(J,R,b){return typeof J=="string"?J.substr(R,b):J.length>=R+b||R?new java.lang.String(J,R,b)+"":J}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(J){G.prototype[J]=function(){return null}});function De(J,R){J.currentElement?J.currentElement.appendChild(R):J.doc.appendChild(R)}n.__DOMHandler=G,n.normalizeLineEndings=V,n.DOMParser=X},"./node_modules/@xmldom/xmldom/lib/dom.js":function(e,n,o){var i=o("./node_modules/@xmldom/xmldom/lib/conventions.js"),l=i.find,s=i.NAMESPACE;function h(f){return f!==""}function _(f){return f?f.split(/[\t\n\f\r ]+/).filter(h):[]}function j(f,v){return f.hasOwnProperty(v)||(f[v]=!0),f}function O(f){if(!f)return[];var v=_(f);return Object.keys(v.reduce(j,{}))}function x(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 ne=function(){};ne.prototype=v.prototype,ne=new ne,V(M,ne),f.prototype=M=ne}M.constructor!=f&&(typeof f!="function"&&console.error("unknown Class:"+f),M.constructor=f)}var ue={},G=ue.ELEMENT_NODE=1,Z=ue.ATTRIBUTE_NODE=2,de=ue.TEXT_NODE=3,ae=ue.CDATA_SECTION_NODE=4,De=ue.ENTITY_REFERENCE_NODE=5,J=ue.ENTITY_NODE=6,R=ue.PROCESSING_INSTRUCTION_NODE=7,b=ue.COMMENT_NODE=8,Q=ue.DOCUMENT_NODE=9,m=ue.DOCUMENT_TYPE_NODE=10,oe=ue.DOCUMENT_FRAGMENT_NODE=11,re=ue.NOTATION_NODE=12,te={},ie={};te.INDEX_SIZE_ERR=(ie[1]="Index size error",1),te.DOMSTRING_SIZE_ERR=(ie[2]="DOMString size error",2);var q=te.HIERARCHY_REQUEST_ERR=(ie[3]="Hierarchy request error",3);te.WRONG_DOCUMENT_ERR=(ie[4]="Wrong document",4),te.INVALID_CHARACTER_ERR=(ie[5]="Invalid character",5),te.NO_DATA_ALLOWED_ERR=(ie[6]="No data allowed",6),te.NO_MODIFICATION_ALLOWED_ERR=(ie[7]="No modification allowed",7);var se=te.NOT_FOUND_ERR=(ie[8]="Not found",8);te.NOT_SUPPORTED_ERR=(ie[9]="Not supported",9);var ce=te.INUSE_ATTRIBUTE_ERR=(ie[10]="Attribute in use",10);te.INVALID_STATE_ERR=(ie[11]="Invalid state",11),te.SYNTAX_ERR=(ie[12]="Syntax error",12),te.INVALID_MODIFICATION_ERR=(ie[13]="Invalid modification",13),te.NAMESPACE_ERR=(ie[14]="Invalid namespace",14),te.INVALID_ACCESS_ERR=(ie[15]="Invalid access",15);function le(f,v){if(v instanceof Error)var M=v;else M=this,Error.call(this,ie[f]),this.message=ie[f],Error.captureStackTrace&&Error.captureStackTrace(this,le);return M.code=f,v&&(this.message=this.message+": "+v),M}le.prototype=Error.prototype,V(te,le);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=[],ne=0;ne<this.length;ne++)lt(this[ne],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,Ee(this)}function Ee(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 ne=M.length;ne in f;ne++)Object.prototype.hasOwnProperty.call(f,ne)&&delete f[ne];V(M,f),f._inc=v}}Ce.prototype.item=function(f){return Ee(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 we(f,v,M,ne){if(ne?v[ye(v,ne)]=M:v[v.length++]=M,f){M.ownerElement=f;var ke=f.ownerDocument;ke&&(ne&&Oe(ke,f,ne),Ie(ke,f,M))}}function xe(f,v,M){var ne=ye(v,M);if(ne>=0){for(var ke=v.length-1;ne<ke;)v[ne]=v[++ne];if(v.length=ke,f){var je=f.ownerDocument;je&&(Oe(je,f,M),M.ownerElement=null)}}else throw new le(se,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 le(ce);var M=this.getNamedItem(f.nodeName);return we(this._ownerElement,this,f,M),M},setNamedItemNS:function(f){var v=f.ownerElement,M;if(v&&v!=this._ownerElement)throw new le(ce);return M=this.getNamedItemNS(f.namespaceURI,f.localName),we(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 ne=this[M];if(ne.localName==v&&ne.namespaceURI==f)return ne}return null}};function Fe(){}Fe.prototype={hasFeature:function(f,v){return!0},createDocument:function(f,v,M){var ne=new Ne;if(ne.implementation=this,ne.childNodes=new pe,ne.doctype=M||null,M&&ne.appendChild(M),v){var ke=ne.createElementNS(f,v);ne.appendChild(ke)}return ne},createDocumentType:function(f,v,M){var ne=new Le;return ne.name=f,ne.nodeName=f,ne.publicId=v||"",ne.systemId=M||"",ne}};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 d(this,f,v)},replaceChild:function(f,v){d(this,f,v,a),v&&this.removeChild(v)},removeChild:function(f){return Me(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==de&&f.nodeType==de?(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 ne in M)if(Object.prototype.hasOwnProperty.call(M,ne)&&M[ne]===f)return ne}v=v.nodeType==Z?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==Z?v.ownerDocument:v.parentNode}return null},isDefaultNamespace:function(f){var v=this.lookupPrefix(f);return v==null}};function me(f){return f=="<"&&"<"||f==">"&&">"||f=="&"&&"&"||f=='"'&&"""||"&#"+f.charCodeAt()+";"}V(ue,ge),V(ue,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 Ne(){this.ownerDocument=this}function Ie(f,v,M){f&&f._inc++;var ne=M.namespaceURI;ne===s.XMLNS&&(v._nsMap[M.prefix?M.localName:""]=M.value)}function Oe(f,v,M,ne){f&&f._inc++;var ke=M.namespaceURI;ke===s.XMLNS&&delete v._nsMap[M.prefix?M.localName:""]}function Pe(f,v,M){if(f&&f._inc){f._inc++;var ne=v.childNodes;if(M)ne[ne.length++]=M;else{for(var ke=v.firstChild,je=0;ke;)ne[je++]=ke,ke=ke.nextSibling;ne.length=je,delete ne[ne.length]}}}function Me(f,v){var M=v.previousSibling,ne=v.nextSibling;return M?M.nextSibling=ne:f.firstChild=ne,ne?ne.previousSibling=M:f.lastChild=M,v.parentNode=null,v.previousSibling=null,v.nextSibling=null,Pe(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 Je(f,v){var M=f.childNodes||[];if(l(M,Ye)||ze(v))return!1;var ne=l(M,ze);return!(v&&ne&&M.indexOf(ne)>M.indexOf(v))}function Ae(f,v){var M=f.childNodes||[];function ne(je){return Ye(je)&&je!==v}if(l(M,ne))return!1;var ke=l(M,ze);return!(v&&ke&&M.indexOf(ke)>M.indexOf(v))}function p(f,v,M){if(!He(f))throw new le(q,"Unexpected parent node type "+f.nodeType);if(M&&M.parentNode!==f)throw new le(se,"child not in parent");if(!Ve(v)||ze(v)&&f.nodeType!==ge.DOCUMENT_NODE)throw new le(q,"Unexpected node type "+v.nodeType+" for parent node type "+f.nodeType)}function c(f,v,M){var ne=f.childNodes||[],ke=v.childNodes||[];if(v.nodeType===ge.DOCUMENT_FRAGMENT_NODE){var je=ke.filter(Ye);if(je.length>1||l(ke,tt))throw new le(q,"More than one element or text in fragment");if(je.length===1&&!Je(f,M))throw new le(q,"Element in fragment can not be inserted before doctype")}if(Ye(v)&&!Je(f,M))throw new le(q,"Only one element can be added and only after doctype");if(ze(v)){if(l(ne,ze))throw new le(q,"Only one doctype is allowed");var Qe=l(ne,Ye);if(M&&ne.indexOf(Qe)<ne.indexOf(M))throw new le(q,"Doctype can only be inserted before an element");if(!M&&Qe)throw new le(q,"Doctype can not be appended since element is present")}}function a(f,v,M){var ne=f.childNodes||[],ke=v.childNodes||[];if(v.nodeType===ge.DOCUMENT_FRAGMENT_NODE){var je=ke.filter(Ye);if(je.length>1||l(ke,tt))throw new le(q,"More than one element or text in fragment");if(je.length===1&&!Ae(f,M))throw new le(q,"Element in fragment can not be inserted before doctype")}if(Ye(v)&&!Ae(f,M))throw new le(q,"Only one element can be added and only after doctype");if(ze(v)){if(l(ne,function(dt){return ze(dt)&&dt!==M}))throw new le(q,"Only one doctype is allowed");var Qe=l(ne,Ye);if(M&&ne.indexOf(Qe)<ne.indexOf(M))throw new le(q,"Doctype can only be inserted before an element")}}function d(f,v,M,ne){p(f,v,M),f.nodeType===ge.DOCUMENT_NODE&&(ne||c)(f,v,M);var ke=v.parentNode;if(ke&&ke.removeChild(v),v.nodeType===oe){var je=v.firstChild;if(je==null)return v;var Qe=v.lastChild}else je=Qe=v;var Se=M?M.previousSibling:f.lastChild;je.previousSibling=Se,Qe.nextSibling=M,Se?Se.nextSibling=je:f.firstChild=je,M==null?f.lastChild=Qe:M.previousSibling=Qe;do je.parentNode=f;while(je!==Qe&&(je=je.nextSibling));return Pe(f.ownerDocument||f,f),v.nodeType==oe&&(v.firstChild=v.lastChild=null),v}function C(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,Pe(f.ownerDocument,f,v),v}Ne.prototype={nodeName:"#document",nodeType:Q,doctype:null,documentElement:null,_inc:1,insertBefore:function(f,v){if(f.nodeType==oe){for(var M=f.firstChild;M;){var ne=M.nextSibling;this.insertBefore(M,v),M=ne}return f}return d(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),Me(this,f)},replaceChild:function(f,v){d(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 ne=[];return v.length>0&&Re(M.documentElement,function(ke){if(ke!==M&&ke.nodeType===G){var je=ke.getAttribute("class");if(je){var Qe=f===je;if(!Qe){var Se=O(je);Qe=v.every(x(Se))}Qe&&ne.push(ke)}}}),ne})},createElement:function(f){var v=new H;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 H,ne=v.split(":"),ke=M.attributes=new be;return M.childNodes=new pe,M.ownerDocument=this,M.nodeName=v,M.tagName=v,M.namespaceURI=f,ne.length==2?(M.prefix=ne[0],M.localName=ne[1]):M.localName=v,ke._ownerElement=M,M},createAttributeNS:function(f,v){var M=new K,ne=v.split(":");return M.ownerDocument=this,M.nodeName=v,M.name=v,M.namespaceURI=f,M.specified=!0,ne.length==2?(M.prefix=ne[0],M.localName=ne[1]):M.localName=v,M}},X(Ne,ge);function H(){this._nsMap={}}H.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===oe?this.insertBefore(f,null):C(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 ne=this.ownerDocument.createAttributeNS(f,v);ne.value=ne.nodeValue=""+M,this.setAttributeNode(ne)},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(ne){ne!==v&&ne.nodeType==G&&(f==="*"||ne.tagName==f)&&M.push(ne)}),M})},getElementsByTagNameNS:function(f,v){return new Ce(this,function(M){var ne=[];return Re(M,function(ke){ke!==M&&ke.nodeType===G&&(f==="*"||ke.namespaceURI===f)&&(v==="*"||ke.localName==v)&&ne.push(ke)}),ne})}},Ne.prototype.getElementsByTagName=H.prototype.getElementsByTagName,Ne.prototype.getElementsByTagNameNS=H.prototype.getElementsByTagNameNS,X(H,ge);function K(){}K.prototype.nodeType=Z,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(ie[q])},deleteData:function(f,v){this.replaceData(f,v,"")},replaceData:function(f,v,M){var ne=this.data.substring(0,f),ke=this.data.substring(f+v);M=ne+M+ke,this.nodeValue=this.data=M,this.length=M.length}},X(he,ge);function Be(){}Be.prototype={nodeName:"#text",nodeType:de,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 ne=this.ownerDocument.createTextNode(M);return this.parentNode&&this.parentNode.insertBefore(ne,this.nextSibling),ne}},X(Be,he);function Te(){}Te.prototype={nodeName:"#comment",nodeType:b},X(Te,he);function fe(){}fe.prototype={nodeName:"#cdata-section",nodeType:ae},X(fe,he);function Le(){}Le.prototype.nodeType=m,X(Le,ge);function $e(){}$e.prototype.nodeType=re,X($e,ge);function Ze(){}Ze.prototype.nodeType=J,X(Ze,ge);function We(){}We.prototype.nodeType=De,X(We,ge);function et(){}et.prototype.nodeName="#document-fragment",et.prototype.nodeType=oe,X(et,ge);function st(){}st.prototype.nodeType=R,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=[],ne=this.nodeType==9&&this.documentElement||this,ke=ne.prefix,je=ne.namespaceURI;if(je&&ke==null){var ke=ne.lookupPrefix(je);if(ke==null)var Qe=[{namespace:je,prefix:null}]}return lt(this,M,f,v,Qe),M.join("")}function it(f,v,M){var ne=f.prefix||"",ke=f.namespaceURI;if(!ke||ne==="xml"&&ke===s.XML||ke===s.XMLNS)return!1;for(var je=M.length;je--;){var Qe=M[je];if(Qe.prefix===ne)return Qe.namespace!==ke}return!0}function at(f,v,M){f.push(" ",v,'="',M.replace(/[<>&"\t\n\r]/g,me),'"')}function lt(f,v,M,ne,ke){if(ke||(ke=[]),ne)if(f=ne(f),f){if(typeof f=="string"){v.push(f);return}}else return;switch(f.nodeType){case G:var je=f.attributes,Qe=je.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<je.length;ft++)if(je.item(ft).name==="xmlns"){ht=je.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<Qe;u++){var g=je.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<Qe;u++){var g=je.item(u);if(it(g,M,ke)){var w=g.prefix||"",S=g.namespaceURI;at(v,w?"xmlns:"+w:"xmlns",S),ke.push({prefix:w,namespace:S})}lt(g,v,M,ne,ke)}if(Se===dt&&it(f,M,ke)){var w=f.prefix||"",S=f.namespaceURI;at(v,w?"xmlns:"+w:"xmlns",S),ke.push({prefix:w,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,ne,ke.slice()),F=F.nextSibling;else for(;F;)lt(F,v,M,ne,ke.slice()),F=F.nextSibling;v.push("</",dt,">")}else v.push("/>");return;case Q:case oe:for(var F=f.firstChild;F;)lt(F,v,M,ne,ke.slice()),F=F.nextSibling;return;case Z:return at(v,f.name,f.value);case de:return v.push(f.data.replace(/[<&>]/g,me));case ae:return v.push("<![CDATA[",f.data,"]]>");case b:return v.push("<!--",f.data,"-->");case m:var ee=f.publicId,ve=f.systemId;if(v.push("<!DOCTYPE ",f.name),ee)v.push(" PUBLIC ",ee),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 R: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 ne;switch(v.nodeType){case G:ne=v.cloneNode(!1),ne.ownerDocument=f;case oe:break;case Z:M=!0;break}if(ne||(ne=v.cloneNode(!1)),ne.ownerDocument=f,ne.parentNode=null,M)for(var ke=v.firstChild;ke;)ne.appendChild(mt(f,ke,M)),ke=ke.nextSibling;return ne}function vt(f,v,M){var ne=new v.constructor;for(var ke in v)if(Object.prototype.hasOwnProperty.call(v,ke)){var je=v[ke];typeof je!="object"&&je!=ne[ke]&&(ne[ke]=je)}switch(v.childNodes&&(ne.childNodes=new pe),ne.ownerDocument=f,ne.nodeType){case G:var Qe=v.attributes,Se=ne.attributes=new be,dt=Qe.length;Se._ownerElement=ne;for(var ht=0;ht<dt;ht++)ne.setAttributeNode(vt(f,Qe.item(ht),!0));break;case Z:M=!0}if(M)for(var ft=v.firstChild;ft;)ne.appendChild(vt(f,ft,M)),ft=ft.nextSibling;return ne}function Ct(f,v,M){f[v]=M}try{if(Object.defineProperty){let f=function(v){switch(v.nodeType){case G:case oe: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 Ee(this),this.$$length}}),Object.defineProperty(ge.prototype,"textContent",{get:function(){return f(this)},set:function(v){switch(this.nodeType){case G:case oe: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,ne){v["$$"+M]=ne}}}catch(f){}n.DocumentType=Le,n.DOMException=le,n.DOMImplementation=Fe,n.Element=H,n.Node=ge,n.NodeList=pe,n.XMLSerializer=ut},"./node_modules/@xmldom/xmldom/lib/entities.js":function(e,n,o){var i=o("./node_modules/@xmldom/xmldom/lib/conventions.js").freeze;n.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=i({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
- `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),n.entityMap=n.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":function(e,n,o){var i=o("./node_modules/@xmldom/xmldom/lib/dom.js");n.DOMImplementation=i.DOMImplementation,n.XMLSerializer=i.XMLSerializer,n.DOMParser=o("./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":function(e,n,o){var i=o("./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,l=/[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"+l.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),h=new RegExp("^"+l.source+s.source+"*(?::"+l.source+s.source+"*)?$"),_=0,j=1,O=2,x=3,V=4,X=5,ue=6,G=7;function Z(q,se){this.message=q,this.locator=se,Error.captureStackTrace&&Error.captureStackTrace(this,Z)}Z.prototype=new Error,Z.prototype.name=Z.name;function de(){}de.prototype={parse:function(q,se,ce){var le=this.domBuilder;le.startDocument(),m(se,se={}),ae(q,se,ce,le,this.errorHandler),le.endDocument()}};function ae(q,se,ce,le,pe){function Ce(H){if(H>65535){H-=65536;var K=55296+(H>>10),he=56320+(H&1023);return String.fromCharCode(K,he)}else return String.fromCharCode(H)}function Ee(H){var K=H.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:"+H),H)}function be(H){if(H>Ne){var K=q.substring(Ne,H).replace(/&#?\w+;/g,Ee);ge&&ye(Ne),le.characters(K,0,H-Ne),Ne=H}}function ye(H,K){for(;H>=xe&&(K=Fe.exec(q));)we=K.index,xe=we+K[0].length,ge.lineNumber++;ge.columnNumber=H-we+1}for(var we=0,xe=0,Fe=/.*(?:\r\n?|\n)|.*$/g,ge=le.locator,me=[{currentNSMap:se}],Re={},Ne=0;;){try{var Ie=q.indexOf("<",Ne);if(Ie<0){if(!q.substr(Ne).match(/^\s*$/)){var Oe=le.doc,Pe=Oe.createTextNode(q.substr(Ne));Oe.appendChild(Pe),le.currentElement=Pe}return}switch(Ie>Ne&&be(Ie),q.charAt(Ie+1)){case"/":var p=q.indexOf(">",Ie+3),Me=q.substring(Ie+2,p).replace(/[ \t\n\r]+$/g,""),He=me.pop();p<0?(Me=q.substring(Ie+2).replace(/[\s<].*/,""),pe.error("end tag name: "+Me+" is not complete:"+He.tagName),p=Ie+1+Me.length):Me.match(/\s</)&&(Me=Me.replace(/[\s<].*/,""),pe.error("end tag name: "+Me+" maybe not complete"),p=Ie+1+Me.length);var Ve=He.localNSMap,ze=He.tagName==Me,Ye=ze||He.tagName&&He.tagName.toLowerCase()==Me.toLowerCase();if(Ye){if(le.endElement(He.uri,He.localName,Me),Ve)for(var tt in Ve)Object.prototype.hasOwnProperty.call(Ve,tt)&&le.endPrefixMapping(tt);ze||pe.fatalError("end tag name: "+Me+" is not match the current start tagName:"+He.tagName)}else me.push(He);p++;break;case"?":ge&&ye(Ie),p=re(q,Ie,le);break;case"!":ge&&ye(Ie),p=oe(q,Ie,le,pe);break;default:ge&&ye(Ie);var Je=new te,Ae=me[me.length-1].currentNSMap,p=J(q,Ie,Je,Ae,Ee,pe),c=Je.length;if(!Je.closed&&Q(q,p,Je.tagName,Re)&&(Je.closed=!0,ce.nbsp||pe.warning("unclosed xml attribute")),ge&&c){for(var a=De(ge,{}),d=0;d<c;d++){var C=Je[d];ye(C.offset),C.locator=De(ge,{})}le.locator=a,R(Je,le,Ae)&&me.push(Je),le.locator=ge}else R(Je,le,Ae)&&me.push(Je);i.isHTML(Je.uri)&&!Je.closed?p=b(q,p,Je.tagName,Ee,le):p++}}catch(H){if(H instanceof Z)throw H;pe.error("element parse error: "+H),p=-1}p>Ne?Ne=p:be(Math.max(Ie,Ne)+1)}}function De(q,se){return se.lineNumber=q.lineNumber,se.columnNumber=q.columnNumber,se}function J(q,se,ce,le,pe,Ce){function Ee(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,we=++se,xe=_;;){var Fe=q.charAt(we);switch(Fe){case"=":if(xe===j)be=q.slice(se,we),xe=x;else if(xe===O)xe=x;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(xe===x||xe===j)if(xe===j&&(Ce.warning('attribute value must after "="'),be=q.slice(se,we)),se=we+1,we=q.indexOf(Fe,se),we>0)ye=q.slice(se,we),Ee(be,ye,se-1),xe=X;else throw new Error("attribute value no end '"+Fe+"' match");else if(xe==V)ye=q.slice(se,we),Ee(be,ye,se),Ce.warning('attribute "'+be+'" missed start quot('+Fe+")!!"),se=we+1,xe=X;else throw new Error('attribute value must after "="');break;case"/":switch(xe){case _:ce.setTagName(q.slice(se,we));case X:case ue:case G:xe=G,ce.closed=!0;case V:case j: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(q.slice(se,we)),we;case">":switch(xe){case _:ce.setTagName(q.slice(se,we));case X:case ue:case G:break;case V:case j:ye=q.slice(se,we),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(")!'),Ee(be,ye,se)):((!i.isHTML(le[""])||!ye.match(/^(?:disabled|checked|selected)$/i))&&Ce.warning('attribute "'+ye+'" missed value!! "'+ye+'" instead!!'),Ee(ye,ye,se));break;case x:throw new Error("attribute value missed!!")}return we;case"":Fe=" ";default:if(Fe<=" ")switch(xe){case _:ce.setTagName(q.slice(se,we)),xe=ue;break;case j:be=q.slice(se,we),xe=O;break;case V:var ye=q.slice(se,we);Ce.warning('attribute "'+ye+'" missed quot(")!!'),Ee(be,ye,se);case X:xe=ue;break}else switch(xe){case O:ce.tagName,(!i.isHTML(le[""])||!be.match(/^(?:disabled|checked|selected)$/i))&&Ce.warning('attribute "'+be+'" missed value!! "'+be+'" instead2!!'),Ee(be,be,se),se=we,xe=j;break;case X:Ce.warning('attribute space is required"'+be+'"!!');case ue:xe=j,se=we;break;case x:xe=V,se=we;break;case G:throw new Error("elements closed character '/' and '>' must be connected to")}}we++}}function R(q,se,ce){for(var le=q.tagName,pe=null,Fe=q.length;Fe--;){var Ce=q[Fe],Ee=Ce.qName,be=Ce.value,ge=Ee.indexOf(":");if(ge>0)var ye=Ce.prefix=Ee.slice(0,ge),we=Ee.slice(ge+1),xe=ye==="xmlns"&&we;else we=Ee,ye=null,xe=Ee==="xmlns"&&"";Ce.localName=we,xe!==!1&&(pe==null&&(pe={},m(ce,ce={})),ce[xe]=pe[xe]=be,Ce.uri=i.XMLNS,se.startPrefixMapping(xe,be))}for(var Fe=q.length;Fe--;){Ce=q[Fe];var ye=Ce.prefix;ye&&(ye==="xml"&&(Ce.uri=i.XML),ye!=="xmlns"&&(Ce.uri=ce[ye||""]))}var ge=le.indexOf(":");ge>0?(ye=q.prefix=le.slice(0,ge),we=q.localName=le.slice(ge+1)):(ye=null,we=q.localName=le);var me=q.uri=ce[ye||""];if(se.startElement(me,we,le,q),q.closed){if(se.endElement(me,we,le),pe)for(ye in pe)Object.prototype.hasOwnProperty.call(pe,ye)&&se.endPrefixMapping(ye)}else return q.currentNSMap=ce,q.localNSMap=pe,!0}function b(q,se,ce,le,pe){if(/^(?:script|textarea)$/i.test(ce)){var Ce=q.indexOf("</"+ce+">",se),Ee=q.substring(se+1,Ce);if(/[&<]/.test(Ee))return/^script$/i.test(ce)?(pe.characters(Ee,0,Ee.length),Ce):(Ee=Ee.replace(/&#?\w+;/g,le),pe.characters(Ee,0,Ee.length),Ce)}return se+1}function Q(q,se,ce,le){var pe=le[ce];return pe==null&&(pe=q.lastIndexOf("</"+ce+">"),pe<se&&(pe=q.lastIndexOf("</"+ce)),le[ce]=pe),pe<se}function m(q,se){for(var ce in q)Object.prototype.hasOwnProperty.call(q,ce)&&(se[ce]=q[ce])}function oe(q,se,ce,le){var pe=q.charAt(se+2);switch(pe){case"-":if(q.charAt(se+3)==="-"){var Ce=q.indexOf("-->",se+4);return Ce>se?(ce.comment(q,se+4,Ce-se-4),Ce+3):(le.error("Unclosed comment"),-1)}else return-1;default:if(q.substr(se+3,6)=="CDATA["){var Ce=q.indexOf("]]>",se+9);return ce.startCDATA(),ce.characters(q,se+9,Ce-se-9),ce.endCDATA(),Ce+3}var Ee=ie(q,se),be=Ee.length;if(be>1&&/!doctype/i.test(Ee[0][0])){var ye=Ee[1][0],we=!1,xe=!1;be>3&&(/^public$/i.test(Ee[2][0])?(we=Ee[3][0],xe=be>4&&Ee[4][0]):/^system$/i.test(Ee[2][0])&&(xe=Ee[3][0]));var Fe=Ee[be-1];return ce.startDTD(ye,we,xe),ce.endDTD(),Fe.index+Fe[0].length}}return-1}function re(q,se,ce){var le=q.indexOf("?>",se);if(le){var pe=q.substring(se,le).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return pe?(pe[0].length,ce.processingInstruction(pe[1],pe[2]),le+2):-1}return-1}function te(){this.attributeNames={}}te.prototype={setTagName:function(q){if(!h.test(q))throw new Error("invalid tagName:"+q);this.tagName=q},addValue:function(q,se,ce){if(!h.test(q))throw new Error("invalid attribute:"+q);this.attributeNames[q]=this.length,this[this.length++]={qName:q,value:se,offset:ce}},length:0,getLocalName:function(q){return this[q].localName},getLocator:function(q){return this[q].locator},getQName:function(q){return this[q].qName},getURI:function(q){return this[q].uri},getValue:function(q){return this[q].value}};function ie(q,se){var ce,le=[],pe=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(pe.lastIndex=se,pe.exec(q);ce=pe.exec(q);)if(le.push(ce),ce[1])return le}n.XMLReader=de,n.ParseError=Z},"./node_modules/process/browser.js":function(e,n){var o=e.exports={},i,l;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"?i=setTimeout:i=s}catch(ae){i=s}try{typeof clearTimeout=="function"?l=clearTimeout:l=h}catch(ae){l=h}})();function _(ae){if(i===setTimeout)return setTimeout(ae,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(ae,0);try{return i(ae,0)}catch(De){try{return i.call(null,ae,0)}catch(J){return i.call(this,ae,0)}}}function j(ae){if(l===clearTimeout)return clearTimeout(ae);if((l===h||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(ae);try{return l(ae)}catch(De){try{return l.call(null,ae)}catch(J){return l.call(this,ae)}}}var O=[],x=!1,V,X=-1;function ue(){!x||!V||(x=!1,V.length?O=V.concat(O):X=-1,O.length&&G())}function G(){if(!x){var ae=_(ue);x=!0;for(var De=O.length;De;){for(V=O,O=[];++X<De;)V&&V[X].run();X=-1,De=O.length}V=null,x=!1,j(ae)}}o.nextTick=function(ae){var De=new Array(arguments.length-1);if(arguments.length>1)for(var J=1;J<arguments.length;J++)De[J-1]=arguments[J];O.push(new Z(ae,De)),O.length===1&&!x&&_(G)};function Z(ae,De){this.fun=ae,this.array=De}Z.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function de(){}o.on=de,o.addListener=de,o.once=de,o.off=de,o.removeListener=de,o.removeAllListeners=de,o.emit=de,o.prependListener=de,o.prependOnceListener=de,o.listeners=function(ae){return[]},o.binding=function(ae){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(ae){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},"./node_modules/webpack/buildin/amd-options.js":function(e,n){(function(o){e.exports=o}).call(this,{})},"./node_modules/webpack/buildin/global.js":function(e,n){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(i){typeof window=="object"&&(o=window)}e.exports=o},"./node_modules/webpack/buildin/module.js":function(e,n){e.exports=function(o){return o.webpackPolyfill||(o.deprecate=function(){},o.paths=[],o.children||(o.children=[]),Object.defineProperty(o,"loaded",{enumerable:!0,get:function(){return o.l}}),Object.defineProperty(o,"id",{enumerable:!0,get:function(){return o.i}}),o.webpackPolyfill=1),o}},"./package.json":function(e){e.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.4.21","description":"JavaScript SDK for [腾讯云对象存储](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,n,o){var i=o("./node_modules/@babel/runtime/helpers/typeof.js"),l=o("./src/session.js"),s=o("./src/async.js"),h=o("./src/event.js").EventProxy,_=o("./src/util.js"),j=o("./src/tracker.js");function O(m,oe){var re=this,te=new h,ie=m.TaskId,q=m.Bucket,se=m.Region,ce=m.Key,le=m.Body,pe=m.ChunkSize||m.SliceSize||re.options.ChunkSize,Ce=m.AsyncLimit,Ee=m.StorageClass,be=m.ServerSideEncryption,ye,we,xe=m.onHashProgress,Fe=m.tracker;Fe&&Fe.setParams({chunkSize:pe}),te.on("error",function(ge){if(re._isRunningTask(ie))return ge.UploadId=m.UploadData.UploadId||"",oe(ge)}),te.on("upload_complete",function(ge){var me=_.extend({UploadId:m.UploadData.UploadId||""},ge);oe(null,me)}),te.on("upload_slice_complete",function(ge){var me={};_.each(m.Headers,function(Re,Ne){var Ie=Ne.toLowerCase();(Ie.indexOf("x-cos-meta-")===0||Ie==="pic-operations")&&(me[Ne]=Re)}),Z.call(re,{Bucket:q,Region:se,Key:ce,UploadId:ge.UploadId,SliceList:ge.SliceList,Headers:me,tracker:Fe},function(Re,Ne){if(re._isRunningTask(ie)){if(l.removeUsing(ge.UploadId),Re)return we(null,!0),te.emit("error",Re);l.removeUploadId.call(re,ge.UploadId),we({loaded:ye,total:ye},!0),te.emit("upload_complete",Ne)}})}),te.on("get_upload_data_finish",function(ge){var me=l.getFileId(le,m.ChunkSize,q,ce);me&&l.saveUploadId.call(re,me,ge.UploadId,re.options.UploadIdCacheLimit),l.setUsing(ge.UploadId),we(null,!0),ue.call(re,{TaskId:ie,Bucket:q,Region:se,Key:ce,Body:le,FileSize:ye,SliceSize:pe,AsyncLimit:Ce,ServerSideEncryption:be,UploadData:ge,Headers:m.Headers,onProgress:we,tracker:Fe},function(Re,Ne){if(re._isRunningTask(ie)){if(Re)return we(null,!0),te.emit("error",Re);te.emit("upload_slice_complete",Ne)}})}),te.on("get_file_size_finish",function(){if(we=_.throttleOnProgress.call(re,ye,m.onProgress),m.UploadData.UploadId)te.emit("get_upload_data_finish",m.UploadData);else{var ge=_.extend({TaskId:ie,Bucket:q,Region:se,Key:ce,Headers:m.Headers,StorageClass:Ee,Body:le,FileSize:ye,SliceSize:pe,onHashProgress:xe,tracker:Fe},m);x.call(re,ge,function(me,Re){if(re._isRunningTask(ie)){if(me)return te.emit("error",me);m.UploadData.UploadId=Re.UploadId,m.UploadData.PartList=Re.PartList,te.emit("get_upload_data_finish",m.UploadData)}})}}),ye=m.ContentLength,delete m.ContentLength,!m.Headers&&(m.Headers={}),_.each(m.Headers,function(ge,me){me.toLowerCase()==="content-length"&&delete m.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<=re.options.MaxPartNumber));Re++);m.ChunkSize=m.SliceSize=pe=Math.max(pe,me)}(),ye===0?(m.Body="",m.ContentLength=0,m.SkipTask=!0,re.putObject(m,oe)):te.emit("get_file_size_finish")}function x(m,oe){var re=m.TaskId,te=m.Bucket,ie=m.Region,q=m.Key,se=m.StorageClass,ce=this,le={},pe=m.FileSize,Ce=m.SliceSize,Ee=Math.ceil(pe/Ce),be=0,ye=_.throttleOnProgress.call(ce,pe,m.onHashProgress),we=function(me,Re){var Ne=Ce*(me-1),Ie=Math.min(Ne+Ce,pe),Oe=Ie-Ne;le[me]?Re(null,{PartNumber:me,ETag:le[me],Size:Oe}):_.fileSlice(m.Body,Ne,Ie,!1,function(Pe){_.getFileMd5(Pe,function(Me,He){if(Me)return Re(_.error(Me));var Ve='"'+He+'"';le[me]=Ve,be+=Oe,ye({loaded:be,total:pe}),Re(null,{PartNumber:me,ETag:Ve,Size:Oe})})})},xe=function(me,Re){var Ne=me.length;if(Ne===0)return Re(null,!0);if(Ne>Ee)return Re(null,!1);if(Ne>1){var Ie=Math.max(me[0].Size,me[1].Size);if(Ie!==Ce)return Re(null,!1)}var Oe=function Pe(Me){if(Me<Ne){var He=me[Me];we(He.PartNumber,function(Ve,ze){ze&&ze.ETag===He.ETag&&ze.Size===He.Size?Pe(Me+1):Re(null,!1)})}else Re(null,!0)};Oe(0)},Fe=new h;Fe.on("error",function(ge){if(ce._isRunningTask(re))return oe(ge)}),Fe.on("upload_id_available",function(ge){var me={},Re=[];_.each(ge.PartList,function(Oe){me[Oe.PartNumber]=Oe});for(var Ne=1;Ne<=Ee;Ne++){var Ie=me[Ne];Ie?(Ie.PartNumber=Ne,Ie.Uploaded=!0):Ie={PartNumber:Ne,ETag:null,Uploaded:!1},Re.push(Ie)}ge.PartList=Re,oe(null,ge)}),Fe.on("no_available_upload_id",function(){if(ce._isRunningTask(re)){var ge=_.extend({Bucket:te,Region:ie,Key:q,Query:_.clone(m.Query),StorageClass:se,Body:m.Body,calledBySdk:"sliceUploadFile",tracker:m.tracker},m),me=_.clone(m.Headers);delete me["x-cos-mime-limit"],ge.Headers=me,ce.multipartInit(ge,function(Re,Ne){if(ce._isRunningTask(re)){if(Re)return Fe.emit("error",Re);var Ie=Ne.UploadId;if(!Ie)return oe(_.error(new Error("no such upload id")));Fe.emit("upload_id_available",{UploadId:Ie,PartList:[]})}})}}),Fe.on("has_and_check_upload_id",function(ge){ge=ge.reverse(),s.eachLimit(ge,1,function(me,Re){if(ce._isRunningTask(re)){if(l.using[me]){Re();return}X.call(ce,{Bucket:te,Region:ie,Key:q,UploadId:me,tracker:m.tracker},function(Ne,Ie){if(ce._isRunningTask(re)){if(Ne)return l.removeUsing(me),Fe.emit("error",Ne);var Oe=Ie.PartList;Oe.forEach(function(Pe){Pe.PartNumber*=1,Pe.Size*=1,Pe.ETag=Pe.ETag||""}),xe(Oe,function(Pe,Me){if(ce._isRunningTask(re)){if(Pe)return Fe.emit("error",Pe);Me?Re({UploadId:me,PartList:Oe}):Re()}})}})}},function(me){ce._isRunningTask(re)&&(ye(null,!0),me&&me.UploadId?Fe.emit("upload_id_available",me):Fe.emit("no_available_upload_id"))})}),Fe.on("seek_local_avail_upload_id",function(ge){var me=l.getFileId(m.Body,m.ChunkSize,te,q),Re=l.getUploadIdList.call(ce,me);if(!me||!Re){Fe.emit("has_and_check_upload_id",ge);return}var Ne=function Ie(Oe){if(Oe>=Re.length){Fe.emit("has_and_check_upload_id",ge);return}var Pe=Re[Oe];if(!_.isInArray(ge,Pe)){l.removeUploadId.call(ce,Pe),Ie(Oe+1);return}if(l.using[Pe]){Ie(Oe+1);return}X.call(ce,{Bucket:te,Region:ie,Key:q,UploadId:Pe,tracker:m.tracker},function(Me,He){ce._isRunningTask(re)&&(Me?(l.removeUploadId.call(ce,Pe),Ie(Oe+1)):Fe.emit("upload_id_available",{UploadId:Pe,PartList:He.PartList}))})};Ne(0)}),Fe.on("get_remote_upload_id_list",function(){V.call(ce,{Bucket:te,Region:ie,Key:q,tracker:m.tracker},function(ge,me){if(ce._isRunningTask(re)){if(ge)return Fe.emit("error",ge);var Re=_.filter(me.UploadList,function(Oe){return Oe.Key===q&&(!se||Oe.StorageClass.toUpperCase()===se.toUpperCase())}).reverse().map(function(Oe){return Oe.UploadId||Oe.UploadID});if(Re.length)Fe.emit("seek_local_avail_upload_id",Re);else{var Ne=l.getFileId(m.Body,m.ChunkSize,te,q),Ie;Ne&&(Ie=l.getUploadIdList.call(ce,Ne))&&_.each(Ie,function(Oe){l.removeUploadId.call(ce,Oe)}),Fe.emit("no_available_upload_id")}}})}),Fe.emit("get_remote_upload_id_list")}function V(m,oe){var re=this,te=[],ie={Bucket:m.Bucket,Region:m.Region,Prefix:m.Key,calledBySdk:m.calledBySdk||"sliceUploadFile",tracker:m.tracker},q=function se(){re.multipartList(ie,function(ce,le){if(ce)return oe(ce);te.push.apply(te,le.Upload||[]),le.IsTruncated==="true"?(ie.KeyMarker=le.NextKeyMarker,ie.UploadIdMarker=le.NextUploadIdMarker,se()):oe(null,{UploadList:te})})};q()}function X(m,oe){var re=this,te=[],ie={Bucket:m.Bucket,Region:m.Region,Key:m.Key,UploadId:m.UploadId,calledBySdk:"sliceUploadFile",tracker:m.tracker},q=function se(){re.multipartListPart(ie,function(ce,le){if(ce)return oe(ce);te.push.apply(te,le.Part||[]),le.IsTruncated==="true"?(ie.PartNumberMarker=le.NextPartNumberMarker,se()):oe(null,{PartList:te})})};q()}function ue(m,oe){var re=this,te=m.TaskId,ie=m.Bucket,q=m.Region,se=m.Key,ce=m.UploadData,le=m.FileSize,pe=m.SliceSize,Ce=Math.min(m.AsyncLimit||re.options.ChunkParallelLimit||1,256),Ee=m.Body,be=Math.ceil(le/pe),ye=0,we=m.ServerSideEncryption,xe=m.Headers,Fe=_.filter(ce.PartList,function(me){return me.Uploaded&&(ye+=me.PartNumber>=be&&le%pe||pe),!me.Uploaded}),ge=m.onProgress;s.eachLimit(Fe,Ce,function(me,Re){if(re._isRunningTask(te)){var Ne=me.PartNumber,Ie=Math.min(le,me.PartNumber*pe)-(me.PartNumber-1)*pe,Oe=0;G.call(re,{TaskId:te,Bucket:ie,Region:q,Key:se,SliceSize:pe,FileSize:le,PartNumber:Ne,ServerSideEncryption:we,Body:Ee,UploadData:ce,Headers:xe,onProgress:function(Me){ye+=Me.loaded-Oe,Oe=Me.loaded,ge({loaded:ye,total:le})},tracker:m.tracker},function(Pe,Me){re._isRunningTask(te)&&(!Pe&&!Me.ETag&&(Pe='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),Pe?ye-=Oe:(ye+=Ie-Oe,me.ETag=Me.ETag),ge({loaded:ye,total:le}),Re(Pe||null,Me))})}},function(me){if(re._isRunningTask(te)){if(me)return oe(me);oe(null,{UploadId:ce.UploadId,SliceList:ce.PartList})}})}function G(m,oe){var re=this,te=m.TaskId,ie=m.Bucket,q=m.Region,se=m.Key,ce=m.FileSize,le=m.Body,pe=m.PartNumber*1,Ce=m.SliceSize,Ee=m.ServerSideEncryption,be=m.UploadData,ye=m.Headers||{},we=re.options.ChunkRetryTimes+1,xe=Ce*(pe-1),Fe=Ce,ge=xe+Ce;ge>ce&&(ge=ce,Fe=ge-xe);var me=["x-cos-traffic-limit","x-cos-mime-limit"],Re={};_.each(ye,function(Ie,Oe){me.indexOf(Oe)>-1&&(Re[Oe]=Ie)});var Ne=be.PartList[pe-1];s.retry(we,function(Ie){re._isRunningTask(te)&&_.fileSlice(le,xe,ge,!0,function(Oe){re.multipartUpload({TaskId:te,Bucket:ie,Region:q,Key:se,ContentLength:Fe,PartNumber:pe,UploadId:be.UploadId,ServerSideEncryption:Ee,Body:Oe,Headers:Re,onProgress:m.onProgress,calledBySdk:"sliceUploadFile",tracker:m.tracker},function(Pe,Me){if(re._isRunningTask(te))return Pe?Ie(Pe):(Ne.Uploaded=!0,Ie(null,Me))})})},function(Ie,Oe){if(re._isRunningTask(te))return oe(Ie,Oe)})}function Z(m,oe){var re=m.Bucket,te=m.Region,ie=m.Key,q=m.UploadId,se=m.SliceList,ce=this,le=this.options.ChunkRetryTimes+1,pe=m.Headers,Ce=se.map(function(Ee){return{PartNumber:Ee.PartNumber,ETag:Ee.ETag}});s.retry(le,function(Ee){ce.multipartComplete({Bucket:re,Region:te,Key:ie,UploadId:q,Parts:Ce,Headers:pe,calledBySdk:"sliceUploadFile",tracker:m.tracker},Ee)},function(Ee,be){oe(Ee,be)})}function de(m,oe){var re=m.Bucket,te=m.Region,ie=m.Key,q=m.UploadId,se=m.Level||"task",ce=m.AsyncLimit,le=this,pe=new h;if(pe.on("error",function(Ce){return oe(Ce)}),pe.on("get_abort_array",function(Ce){ae.call(le,{Bucket:re,Region:te,Key:ie,Headers:m.Headers,AsyncLimit:ce,AbortArray:Ce},oe)}),se==="bucket")V.call(le,{Bucket:re,Region:te,calledBySdk:"abortUploadTask"},function(Ce,Ee){if(Ce)return oe(Ce);pe.emit("get_abort_array",Ee.UploadList||[])});else if(se==="file"){if(!ie)return oe(_.error(new Error("abort_upload_task_no_key")));V.call(le,{Bucket:re,Region:te,Key:ie,calledBySdk:"abortUploadTask"},function(Ce,Ee){if(Ce)return oe(Ce);pe.emit("get_abort_array",Ee.UploadList||[])})}else if(se==="task"){if(!q)return oe(_.error(new Error("abort_upload_task_no_id")));if(!ie)return oe(_.error(new Error("abort_upload_task_no_key")));pe.emit("get_abort_array",[{Key:ie,UploadId:q}])}else return oe(_.error(new Error("abort_unknown_level")))}function ae(m,oe){var re=m.Bucket,te=m.Region,ie=m.Key,q=m.AbortArray,se=m.AsyncLimit||1,ce=this,le=0,pe=new Array(q.length);s.eachLimit(q,se,function(Ce,Ee){var be=le;if(ie&&ie!==Ce.Key){pe[be]={error:{KeyNotMatch:!0}},Ee(null);return}var ye=Ce.UploadId||Ce.UploadID;ce.multipartAbort({Bucket:re,Region:te,Key:Ce.Key,Headers:m.Headers,UploadId:ye},function(we){var xe={Bucket:re,Region:te,Key:Ce.Key,UploadId:ye};pe[be]={error:we,task:xe},Ee(null)}),le++},function(Ce){if(Ce)return oe(Ce);for(var Ee=[],be=[],ye=0,we=pe.length;ye<we;ye++){var xe=pe[ye];xe.task&&(xe.error?be.push(xe.task):Ee.push(xe.task))}return oe(null,{successList:Ee,errorList:be})})}function De(m,oe){var re=this,te=m.SliceSize===void 0?re.options.SliceSize:m.SliceSize,ie=[],q=m.Body,se=q.size||q.length||0,ce={TaskId:""};if(re.options.EnableTracker){var le=re.options.UseAccelerate||typeof re.options.Domain=="string"&&re.options.Domain.includes("accelerate.");m.tracker=new j({bucket:m.Bucket,region:m.Region,apiName:"uploadFile",fileKey:m.Key,fileSize:se,accelerate:le,deepTracker:re.options.DeepTracker,customId:re.options.CustomId,delay:re.options.TrackerDelay})}_.each(m,function(we,xe){i(we)!=="object"&&typeof we!="function"&&(ce[xe]=we)});var pe=m.onTaskReady,Ce=function(xe){ce.TaskId=xe,pe&&pe(xe)};m.onTaskReady=Ce;var Ee=se>te?"sliceUploadFile":"putObject",be=m.onFileFinish,ye=function(xe,Fe){m.tracker&&m.tracker.formatResult(xe,Fe),be&&be(xe,Fe,ce),oe&&oe(xe,Fe)};ie.push({api:Ee,params:m,callback:ye}),re._addTasks(ie)}function J(m,oe){var re=this,te=m.SliceSize===void 0?re.options.SliceSize:m.SliceSize,ie=0,q=0,se=_.throttleOnProgress.call(re,q,m.onProgress),ce=m.files.length,le=m.onFileFinish,pe=Array(ce),Ce=function(ye,we,xe){se(null,!0),le&&le(ye,we,xe),pe[xe.Index]={options:xe,error:ye,data:we},--ce<=0&&oe&&oe(null,{files:pe})},Ee=[];_.each(m.files,function(be,ye){(function(){var we=be.Body,xe=we.size||we.length||0,Fe={Index:ye,TaskId:""};if(!re.options.UseRawKey&&be.Key&&be.Key.substr(0,1)==="/"&&(be.Key=be.Key.substr(1)),ie+=xe,re.options.EnableTracker){var ge=re.options.UseAccelerate||typeof re.options.Domain=="string"&&re.options.Domain.includes("accelerate.");be.tracker=new j({bucket:be.Bucket,region:be.Region,apiName:"uploadFiles",fileKey:be.Key,fileSize:xe,accelerate:ge,deepTracker:re.options.DeepTracker,customId:re.options.CustomId,delay:re.options.TrackerDelay})}_.each(be,function(Ve,ze){i(Ve)!=="object"&&typeof Ve!="function"&&(Fe[ze]=Ve)});var me=be.onTaskReady,Re=function(ze){Fe.TaskId=ze,me&&me(ze)};be.onTaskReady=Re;var Ne=0,Ie=be.onProgress,Oe=function(ze){q=q-Ne+ze.loaded,Ne=ze.loaded,Ie&&Ie(ze),se({loaded:q,total:ie})};be.onProgress=Oe;var Pe=xe>te?"sliceUploadFile":"putObject",Me=be.onFileFinish,He=function(ze,Ye){be.tracker&&be.tracker.formatResult(ze,Ye),Me&&Me(ze,Ye),Ce&&Ce(ze,Ye,Fe)};Ee.push({api:Pe,params:be,callback:He})})()}),re._addTasks(Ee)}function R(m,oe){var re=new h,te=this,ie=m.Bucket,q=m.Region,se=m.Key,ce=m.CopySource,le=_.getSourceParams.call(this,ce);if(!le){oe(_.error(new Error("CopySource format error")));return}var pe=le.Bucket,Ce=le.Region,Ee=decodeURIComponent(le.Key),be=m.CopySliceSize===void 0?te.options.CopySliceSize:m.CopySliceSize;be=Math.max(0,be);var ye=m.CopyChunkSize||this.options.CopyChunkSize,we=this.options.CopyChunkParallelLimit,xe=this.options.ChunkRetryTimes+1,Fe=0,ge=0,me,Re,Ne={},Ie={},Oe={};re.on("copy_slice_complete",function(Pe){_.each(m.Headers,function(He,Ve){Ve.toLowerCase().indexOf("x-cos-meta-")});var Me=_.map(Pe.PartList,function(He){return{PartNumber:He.PartNumber,ETag:He.ETag}});s.retry(xe,function(He){te.multipartComplete({Bucket:ie,Region:q,Key:se,UploadId:Pe.UploadId,Parts:Me,calledBySdk:"sliceCopyFile"},He)},function(He,Ve){if(l.removeUsing(Pe.UploadId),He)return Re(null,!0),oe(He);l.removeUploadId(Pe.UploadId),Re({loaded:me,total:me},!0),oe(null,Ve)})}),re.on("get_copy_data_finish",function(Pe){var Me=l.getCopyFileId(ce,Ne,ye,ie,se);Me&&l.saveUploadId(Me,Pe.UploadId,te.options.UploadIdCacheLimit),l.setUsing(Pe.UploadId);var He=_.filter(Pe.PartList,function(Ve){return Ve.Uploaded&&(ge+=Ve.PartNumber>=Fe&&me%ye||ye),!Ve.Uploaded});s.eachLimit(He,we,function(Ve,ze){var Ye=Ve.PartNumber,tt=Ve.CopySourceRange,Je=Ve.end-Ve.start;s.retry(xe,function(Ae){b.call(te,{Bucket:ie,Region:q,Key:se,CopySource:ce,UploadId:Pe.UploadId,PartNumber:Ye,CopySourceRange:tt},Ae)},function(Ae,p){if(Ae)return ze(Ae);ge+=Je,Re({loaded:ge,total:me}),Ve.ETag=p.ETag,ze(Ae||null,p)})},function(Ve){if(Ve)return l.removeUsing(Pe.UploadId),Re(null,!0),oe(Ve);re.emit("copy_slice_complete",Pe)})}),re.on("get_chunk_size_finish",function(){var Pe=function(){te.multipartInit({Bucket:ie,Region:q,Key:se,Headers:Oe},function(Ye,tt){if(Ye)return oe(Ye);m.UploadId=tt.UploadId,re.emit("get_copy_data_finish",{UploadId:m.UploadId,PartList:m.PartList})})},Me=l.getCopyFileId(ce,Ne,ye,ie,se),He=l.getUploadIdList(Me);if(!Me||!He)return Pe();var Ve=function ze(Ye){if(Ye>=He.length)return Pe();var tt=He[Ye];if(l.using[tt])return ze(Ye+1);X.call(te,{Bucket:ie,Region:q,Key:se,UploadId:tt},function(Je,Ae){if(Je)l.removeUploadId(tt),ze(Ye+1);else{if(l.using[tt])return ze(Ye+1);var p={},c=0;_.each(Ae.PartList,function(a){var d=parseInt(a.Size),C=c+d-1;p[a.PartNumber+"|"+c+"|"+C]=a.ETag,c+=d}),_.each(m.PartList,function(a){var d=p[a.PartNumber+"|"+a.start+"|"+a.end];d&&(a.ETag=d,a.Uploaded=!0)}),re.emit("get_copy_data_finish",{UploadId:tt,PartList:m.PartList})}})};Ve(0)}),re.on("get_file_size_finish",function(){if(function(){for(var Me=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],He=1024*1024,Ve=0;Ve<Me.length&&(He=Me[Ve]*1024*1024,!(me/He<=te.options.MaxPartNumber));Ve++);m.ChunkSize=ye=Math.max(ye,He),Fe=Math.ceil(me/ye);for(var ze=[],Ye=1;Ye<=Fe;Ye++){var tt=(Ye-1)*ye,Je=Ye*ye<me?Ye*ye-1:me-1,Ae={PartNumber:Ye,start:tt,end:Je,CopySourceRange:"bytes="+tt+"-"+Je};ze.push(Ae)}m.PartList=ze}(),m.Headers["x-cos-metadata-directive"]==="Replaced"?Oe=m.Headers:Oe=Ie,Oe["x-cos-storage-class"]=m.Headers["x-cos-storage-class"]||Ie["x-cos-storage-class"],Oe=_.clearKey(Oe),Ie["x-cos-storage-class"]==="ARCHIVE"||Ie["x-cos-storage-class"]==="DEEP_ARCHIVE"){var Pe=Ie["x-cos-restore"];if(!Pe||Pe==='ongoing-request="true"'){oe(_.error(new Error("Unrestored archive object is not allowed to be copied")));return}}delete Oe["x-cos-copy-source"],delete Oe["x-cos-metadata-directive"],delete Oe["x-cos-copy-source-If-Modified-Since"],delete Oe["x-cos-copy-source-If-Unmodified-Since"],delete Oe["x-cos-copy-source-If-Match"],delete Oe["x-cos-copy-source-If-None-Match"],re.emit("get_chunk_size_finish")}),te.headObject({Bucket:pe,Region:Ce,Key:Ee},function(Pe,Me){if(Pe){Pe.statusCode&&Pe.statusCode===404?oe(_.error(Pe,{ErrorStatus:Ee+" Not Exist"})):oe(Pe);return}if(me=m.FileSize=Me.headers["content-length"],me===void 0||!me){oe(_.error(new Error('get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.( 获取Content-Length失败,请在CORS ExposeHeader设置中添加Content-Length,请参考文档:https://cloud.tencent.com/document/product/436/13318 )')));return}if(Re=_.throttleOnProgress.call(te,me,m.onProgress),me<=be)m.Headers["x-cos-metadata-directive"]||(m.Headers["x-cos-metadata-directive"]="Copy"),te.putObjectCopy(m,function(Ve,ze){if(Ve)return Re(null,!0),oe(Ve);Re({loaded:me,total:me},!0),oe(Ve,ze)});else{var He=Me.headers;Ne=He,Ie={"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&&(Ie[ze]=Ve)}),re.emit("get_file_size_finish")}})}function b(m,oe){var re=m.TaskId,te=m.Bucket,ie=m.Region,q=m.Key,se=m.CopySource,ce=m.UploadId,le=m.PartNumber*1,pe=m.CopySourceRange,Ce=this.options.ChunkRetryTimes+1,Ee=this;s.retry(Ce,function(be){Ee.uploadPartCopy({TaskId:re,Bucket:te,Region:ie,Key:q,CopySource:se,UploadId:ce,PartNumber:le,CopySourceRange:pe},function(ye,we){be(ye||null,we)})},function(be,ye){return oe(be,ye)})}var Q={sliceUploadFile:O,abortUploadTask:de,uploadFile:De,uploadFiles:J,sliceCopyFile:R};e.exports.init=function(m,oe){oe.transferToTaskMethod(Q,"sliceUploadFile"),_.each(Q,function(re,te){m.prototype[te]=_.apiWrapper(te,re)})}},"./src/async.js":function(e,n){var o=function(h,_,j,O){if(O=O||function(){},!h.length||_<=0)return O();var x=0,V=0,X=0;(function ue(){if(x>=h.length)return O();for(;X<_&&V<h.length;)V+=1,X+=1,j(h[V-1],function(G){G?(O(G),O=function(){}):(x+=1,X-=1,x>=h.length?O():ue())})})()},i=function(h,_,j){var O=function x(V){_(function(X,ue){X&&V<h?x(V+1):j(X,ue)})};h<1?j():O(1)},l={eachLimit:o,retry:i};e.exports=l},"./src/base.js":function(e,n,o){var i=o("./node_modules/@babel/runtime/helpers/typeof.js"),l=o("./lib/request.js"),s=o("./src/util.js");function h(r,y){typeof r=="function"&&(y=r,r={});var u=this.options.Protocol||(s.isBrowser&&(typeof location>"u"?"undefined":i(location))==="object"&&location.protocol==="http:"?"http:":"https:"),g=this.options.ServiceDomain,w=r.AppId||this.options.appId,S=r.Region;g?(g=g.replace(/\{\{AppId\}\}/gi,w||"").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="",ee=S?"cos."+S+".myqcloud.com":"service.cos.myqcloud.com",ve=g.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");ee===ve&&(F=ee),Se.call(this,{Action:"name/cos:GetService",url:g,method:"GET",headers:r.Headers,SignHost:F},function(Ke,Ue){if(Ke)return y(Ke);var _e=Ue&&Ue.ListAllMyBucketsResult&&Ue.ListAllMyBucketsResult.Buckets&&Ue.ListAllMyBucketsResult.Buckets.Bucket||[];_e=s.isArray(_e)?_e:[_e];var qe=Ue&&Ue.ListAllMyBucketsResult&&Ue.ListAllMyBucketsResult.Owner||{};y(null,{Buckets:_e,Owner:qe,statusCode:Ue.statusCode,headers:Ue.headers})})}function _(r,y){var u=this,g="";if(r.BucketAZConfig){var w={BucketAZConfig:r.BucketAZConfig};g=s.json2xml({CreateBucketConfiguration:w})}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 ee=ne({protocol:u.options.Protocol,domain:u.options.Domain,bucket:r.Bucket,region:r.Region,isLocation:!0});y(null,{Location:ee,statusCode:F.statusCode,headers:F.headers})})}function j(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,w){if(g)return y(g);var S=w.ListBucketResult||{},F=S.Contents||[],ee=S.CommonPrefixes||[];F=s.isArray(F)?F:[F],ee=s.isArray(ee)?ee:[ee];var ve=s.clone(S);s.extend(ve,{Contents:F,CommonPrefixes:ee,statusCode:w.statusCode,headers:w.headers}),y(null,ve)})}function x(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 w=s.clone(r.AccessControlPolicy||{}),S=w.Grants||w.Grant;S=s.isArray(S)?S:[S],delete w.Grant,delete w.Grants,w.AccessControlList={Grant:S},g=s.json2xml({AccessControlPolicy:w}),u["Content-Type"]="application/xml",u["Content-MD5"]=s.b64(s.md5(g))}s.each(u,function(F,ee){ee.indexOf("x-cos-grant-")===0&&(u[ee]=M(u[ee]))}),Se.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:r.Bucket,Region:r.Region,headers:u,action:"acl",body:g},function(F,ee){if(F)return y(F);y(null,{statusCode:ee.statusCode,headers:ee.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 w=g.AccessControlPolicy||{},S=w.Owner||{},F=w.AccessControlList.Grant||[];F=s.isArray(F)?F:[F];var ee=v(w);g.headers&&g.headers["x-cos-acl"]&&(ee.ACL=g.headers["x-cos-acl"]),ee=s.extend(ee,{Owner:S,Grants:F,statusCode:g.statusCode,headers:g.headers}),y(null,ee)})}function ue(r,y){var u=r.CORSConfiguration||{},g=u.CORSRules||r.CORSRules||[];g=s.clone(s.isArray(g)?g:[g]),s.each(g,function(ee){s.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(ve){var Ke=ve+"s",Ue=ee[Ke]||ee[ve]||[];delete ee[Ke],ee[ve]=s.isArray(Ue)?Ue:[Ue]})});var w={CORSRule:g};r.ResponseVary&&(w.ResponseVary=r.ResponseVary);var S=s.json2xml({CORSConfiguration:w}),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(ee,ve){if(ee)return y(ee);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 w={CORSRules:[],statusCode:u.statusCode};u.headers&&(w.headers=u.headers),y(null,w)}else y(u);return}var S=g.CORSConfiguration||{},F=S.CORSRules||S.CORSRule||[];F=s.clone(s.isArray(F)?F:[F]);var ee=S.ResponseVary;s.each(F,function(ve){s.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(Ke){var Ue=Ke+"s",_e=ve[Ue]||ve[Ke]||[];delete ve[Ke],ve[Ue]=s.isArray(_e)?_e:[_e]})}),y(null,{CORSRules:F,ResponseVary:ee,statusCode:g.statusCode,headers:g.headers})})}function Z(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 de(r,y){Se.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:r.Bucket,Region:r.Region,headers:r.Headers,action:"location"},y)}function ae(r,y){var u=r.Policy;try{typeof u=="string"&&(u=JSON.parse(u))}catch(S){}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 w=r.Headers;w["Content-Type"]="application/json",w["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:w},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 w={};try{w=JSON.parse(g.body)}catch(S){}y(null,{Policy:w,statusCode:g.statusCode,headers:g.headers})})}function J(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 R(r,y){var u=r.Tagging||{},g=u.TagSet||u.Tags||r.Tags||[];g=s.clone(s.isArray(g)?g:[g]);var w=s.json2xml({Tagging:{TagSet:{Tag:g}}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(w)),Se.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:w,action:"tagging",headers:S},function(F,ee){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:ee.statusCode,headers:ee.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 w={Tags:[],statusCode:u.statusCode};u.headers&&(w.headers=u.headers),y(null,w)}else y(u);return}var S=[];try{S=g.Tagging.TagSet.Tag||[]}catch(F){}S=s.clone(s.isArray(S)?S:[S]),y(null,{Tags:S,statusCode:g.statusCode,headers:g.headers})})}function Q(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 m(r,y){var u=r.LifecycleConfiguration||{},g=u.Rules||r.Rules||[];g=s.clone(g);var w=s.json2xml({LifecycleConfiguration:{Rule:g}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(w)),Se.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:w,action:"lifecycle",headers:S},function(F,ee){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:ee.statusCode,headers:ee.headers})})}function oe(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 w={Rules:[],statusCode:u.statusCode};u.headers&&(w.headers=u.headers),y(null,w)}else y(u);return}var S=[];try{S=g.LifecycleConfiguration.Rule||[]}catch(F){}S=s.clone(s.isArray(S)?S:[S]),y(null,{Rules:S,statusCode:g.statusCode,headers:g.headers})})}function re(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 te(r,y){if(!r.VersioningConfiguration){y(s.error(new Error("missing param VersioningConfiguration")));return}var u=r.VersioningConfiguration||{},g=s.json2xml({VersioningConfiguration:u}),w=r.Headers;w["Content-Type"]="application/xml",w["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:w},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 ie(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 q(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 w=r.Headers;w["Content-Type"]="application/xml",w["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:w},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: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 w={ReplicationConfiguration:{Rules:[]},statusCode:u.statusCode};u.headers&&(w.headers=u.headers),y(null,w)}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 le(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 w=s.json2xml({WebsiteConfiguration:u}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(w)),Se.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:w,action:"website",headers:S},function(F,ee){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:ee.statusCode,headers:ee.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 w={WebsiteConfiguration:{},statusCode:u.statusCode};u.headers&&(w.headers=u.headers),y(null,w)}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 Ee(r,y){if(!r.RefererConfiguration){y(s.error(new Error("missing param RefererConfiguration")));return}var u=s.clone(r.RefererConfiguration||{}),g=u.DomainList||{},w=g.Domains||g.Domain||[];w=s.isArray(w)?w:[w],w.length&&(u.DomainList={Domain:w});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(ee,ve){if(ee&&ee.statusCode===204)return y(null,{statusCode:ee.statusCode});if(ee)return y(ee);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 w={WebsiteConfiguration:{},statusCode:u.statusCode};u.headers&&(w.headers=u.headers),y(null,w)}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 w=s.json2xml({DomainConfiguration:{DomainRule:g}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(w)),Se.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:w,action:"domain",headers:S},function(F,ee){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:ee.statusCode,headers:ee.headers})})}function we(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 w=[];try{w=g.DomainConfiguration.DomainRule||[]}catch(S){}w=s.clone(s.isArray(w)?w:[w]),y(null,{DomainRule:w,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 Fe(r,y){var u=r.OriginConfiguration||{},g=u.OriginRule||r.OriginRule||[];g=s.clone(g);var w=s.json2xml({OriginConfiguration:{OriginRule:g}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(w)),Se.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:w,action:"origin",headers:S},function(F,ee){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:ee.statusCode,headers:ee.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 w=[];try{w=g.OriginConfiguration.OriginRule||[]}catch(S){}w=s.clone(s.isArray(w)?w:[w]),y(null,{OriginRule:w,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(w,S){if(w&&w.statusCode===204)return y(null,{statusCode:w.statusCode});if(w)return y(w);y(null,{statusCode:S.statusCode,headers:S.headers})})}function Ne(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 Ie(r,y,u){var g=s.clone(y.InventoryConfiguration);if(g.OptionalFields){var w=g.OptionalFields||[];g.OptionalFields={Field:w}}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}),ee=y.Headers;ee["Content-Type"]="application/xml",ee["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:ee},function(Ke,Ue){if(Ke&&Ke.statusCode===204)return u(null,{statusCode:Ke.statusCode});if(Ke)return u(Ke);u(null,{statusCode:Ue.statusCode,headers:Ue.headers})})}function Oe(r,y){return Ie.call(this,"PUT",r,y)}function Pe(r,y){return Ie.call(this,"POST",r,y)}function Me(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 w=g.InventoryConfiguration;if(w&&w.OptionalFields&&w.OptionalFields.Field){var S=w.OptionalFields.Field;s.isArray(S)||(S=[S]),w.OptionalFields=S}if(w.Destination&&w.Destination.COSBucketDestination&&w.Destination.COSBucketDestination.Encryption){var F=w.Destination.COSBucketDestination.Encryption;Object.keys(F).indexOf("SSE-COS")>-1&&(F.SSECOS=F["SSE-COS"],delete F["SSE-COS"])}y(null,{InventoryConfiguration:w,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 w=g.ListInventoryConfigurationResult,S=w.InventoryConfiguration||[];S=s.isArray(S)?S:[S],delete w.InventoryConfiguration,s.each(S,function(F){if(F&&F.OptionalFields&&F.OptionalFields.Field){var ee=F.OptionalFields.Field;s.isArray(ee)||(ee=[ee]),F.OptionalFields=ee}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"])}}),w.InventoryConfigurations=S,s.extend(w,{statusCode:g.statusCode,headers:g.headers}),y(null,w)})}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),w={};w["Content-Type"]="application/xml",w["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:w},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||[],w=s.json2xml({ServerSideEncryptionConfiguration:{Rule:g}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(w)),Se.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:r.Bucket,Region:r.Region,body:w,action:"encryption",headers:S},function(F,ee){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:ee.statusCode,headers:ee.headers})})}function Je(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 w={EncryptionConfiguration:{Rules:[]},statusCode:u.statusCode};u.headers&&(w.headers=u.headers),y(null,w)}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 w=u.statusCode;return r.Headers["If-Modified-Since"]&&w&&w===304?y(null,{NotModified:!0,statusCode:w}):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,w){if(g)return y(g);var S=w.ListVersionsResult||{},F=S.DeleteMarker||[];F=s.isArray(F)?F:[F];var ee=S.Version||[];ee=s.isArray(ee)?ee:[ee];var ve=s.clone(S);delete ve.DeleteMarker,delete ve.Version,s.extend(ve,{DeleteMarkers:F,Versions:ee,statusCode:w.statusCode,headers:w.headers}),y(null,ve)})}function a(r,y){var u=r.Query||{},g=r.QueryString||"",w=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:w,tracker:S},function(F,ee){if(w(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:ee.body,ETag:s.attr(ee.headers,"etag",""),statusCode:ee.statusCode,headers:ee.headers})})}function d(r,y){var u=this,g=r.ContentLength,w=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,ee=r.tracker;F&&ee&&ee.setParams({md5StartTime:new Date().getTime()}),s.getBodyMd5(F,r.Body,function(ve){ve&&(ee&&ee.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),w(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:w,tracker:ee},function(Ke,Ue){if(Ke)return w(null,!0),y(Ke);w({loaded:g,total:g},!0);var _e=ne({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),Ue.Location=_e,Ue.ETag=s.attr(Ue.headers,"etag",""),y(null,Ue)})},r.onHashProgress)}function C(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 w=u.statusCode;return w&&w===404?y(null,{BucketNotFound:!0,statusCode:w}):y(u)}y(null,{statusCode:g.statusCode,headers:g.headers})})}function H(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,w){if(g)return y(g);var S=w.AccessControlPolicy||{},F=S.Owner||{},ee=S.AccessControlList&&S.AccessControlList.Grant||[];ee=s.isArray(ee)?ee:[ee];var ve=v(S);delete ve.GrantWrite,w.headers&&w.headers["x-cos-acl"]&&(ve.ACL=w.headers["x-cos-acl"]),ve=s.extend(ve,{Owner:F,Grants:ee,statusCode:w.statusCode,headers:w.headers}),y(null,ve)})}function K(r,y){var u=r.Headers,g="";if(r.AccessControlPolicy){var w=s.clone(r.AccessControlPolicy||{}),S=w.Grants||w.Grant;S=s.isArray(S)?S:[S],delete w.Grant,delete w.Grants,w.AccessControlList={Grant:S},g=s.json2xml({AccessControlPolicy:w}),u["Content-Type"]="application/xml",u["Content-MD5"]=s.b64(s.md5(g))}s.each(u,function(F,ee){ee.indexOf("x-cos-grant-")===0&&(u[ee]=M(u[ee]))}),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,ee){if(F)return y(F);y(null,{statusCode:ee.statusCode,headers:ee.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,w){if(g)return g.statusCode&&g.statusCode===403?y(null,{OptionsForbidden:!0,statusCode:g.statusCode}):y(g);var S=w.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:w.statusCode,headers:w.headers})})}function Be(r,y){var u=this,g=r.Headers;!g["Cache-Control"]&&!g["cache-control"]&&(g["Cache-Control"]="");var w=r.CopySource||"",S=s.getSourceParams.call(this,w);if(!S){y(s.error(new Error("CopySource format error")));return}var F=S.Bucket,ee=S.Region,ve=decodeURIComponent(S.Key);Se.call(this,{Scope:[{action:"name/cos:GetObject",bucket:F,region:ee,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,Ue){if(Ke)return y(Ke);var _e=s.clone(Ue.CopyObjectResult||{}),qe=ne({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:qe,statusCode:Ue.statusCode,headers:Ue.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 w=g.Bucket,S=g.Region,F=decodeURIComponent(g.Key);Se.call(this,{Scope:[{action:"name/cos:GetObject",bucket:w,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(ee,ve){if(ee)return y(ee);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 w=s.json2xml({Delete:{Object:u,Quiet:g||!1}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(w));var F=s.map(u,function(ee){return{action:"name/cos:DeleteObject",bucket:r.Bucket,region:r.Region,prefix:ee.Key}});Se.call(this,{Scope:F,method:"POST",Bucket:r.Bucket,Region:r.Region,body:w,action:"delete",headers:S},function(ee,ve){if(ee)return y(ee);var Ke=ve.DeleteResult||{},Ue=Ke.Deleted||[],_e=Ke.Error||[];Ue=s.isArray(Ue)?Ue:[Ue],_e=s.isArray(_e)?_e:[_e];var qe=s.clone(Ke);s.extend(qe,{Error:_e,Deleted:Ue,statusCode:ve.statusCode,headers:ve.headers}),y(null,qe)})}function Le(r,y){var u=r.Headers;if(!r.RestoreRequest){y(s.error(new Error("missing param RestoreRequest")));return}var g=r.RestoreRequest||{},w=s.json2xml({RestoreRequest:g});u["Content-Type"]="application/xml",u["Content-MD5"]=s.b64(s.md5(w)),Se.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:r.Bucket,Region:r.Region,Key:r.Key,VersionId:r.VersionId,body:w,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 w=s.json2xml({Tagging:{TagSet:{Tag:g}}}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(w)),Se.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:r.Bucket,Key:r.Key,Region:r.Region,body:w,action:"tagging",headers:S,VersionId:r.VersionId},function(F,ee){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);y(null,{statusCode:ee.statusCode,headers:ee.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 w={Tags:[],statusCode:u.statusCode};u.headers&&(w.headers=u.headers),y(null,w)}else y(u);return}var S=[];try{S=g.Tagging.TagSet.Tag||[]}catch(F){}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||{},w=s.json2xml({SelectRequest:g}),S=r.Headers;S["Content-Type"]="application/xml",S["Content-MD5"]=s.b64(s.md5(w)),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:w,DataType:"arraybuffer",rawBody:!0},function(F,ee){if(F&&F.statusCode===204)return y(null,{statusCode:F.statusCode});if(F)return y(F);var ve=s.parseSelectPayload(ee.body);y(null,{statusCode:ee.statusCode,headers:ee.headers,Body:ve.body,Payload:ve.payload})})}function st(r,y){var u=this,g=r.Headers,w=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&&w&&w.setParams({md5StartTime:new Date().getTime()}),s.getBodyMd5(S,r.Body,function(F){F&&(r.Headers["x-cos-meta-md5"]=F),S&&w&&w.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:w},function(ee,ve){if(ee)return w&&w.parent&&w.parent.setParams({errorNode:"multipartInit"}),y(ee);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,w=u.options.UploadCheckContentMd5;w&&g&&g.setParams({md5StartTime:new Date().getTime()}),s.getBodyMd5(w,r.Body,function(S){S&&(r.Headers["Content-MD5"]=s.b64(S)),w&&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,ee){if(F)return g&&g.parent&&g.parent.setParams({errorNode:"multipartUpload"}),y(F);y(null,{ETag:s.attr(ee.headers,"etag",""),statusCode:ee.statusCode,headers:ee.headers})})})})}function ct(r,y){for(var u=this,g=r.UploadId,w=r.Parts,S=r.tracker,F=0,ee=w.length;F<ee;F++)w[F].ETag&&w[F].ETag.indexOf('"')===0||(w[F].ETag='"'+w[F].ETag+'"');var ve=s.json2xml({CompleteMultipartUpload:{Part:w}});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(Ue,_e){if(Ue)return S&&S.parent&&S.parent.setParams({errorNode:"multipartComplete"}),y(Ue);var qe=ne({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:qe,ETag:rt.ETag,ImageInfo:rt.ImageInfo},ProcessResults:rt.ProcessResults},delete rt.ImageInfo,delete rt.ProcessResults);var pt=s.extend(rt,{Location:qe,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(w,S){if(w)return g&&g.parent&&g.parent.setParams({errorNode:"multipartList"}),y(w);if(S&&S.ListMultipartUploadsResult){var F=S.ListMultipartUploadsResult.Upload||[];F=s.isArray(F)?F:[F],S.ListMultipartUploadsResult.Upload=F}var ee=s.clone(S.ListMultipartUploadsResult||{});s.extend(ee,{statusCode:S.statusCode,headers:S.headers}),y(null,ee)})}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(w,S){if(w)return g&&g.parent&&g.parent.setParams({errorNode:"multipartListPart"}),y(w);var F=S.ListPartsResult||{},ee=F.Part||[];ee=s.isArray(ee)?ee:[ee],F.Part=ee;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,w){if(g)return y(g);y(null,{statusCode:w.statusCode,headers:w.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,w){if(g)return y(g);y(null,w)})}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,w=ne({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=w;if(r.Sign!==void 0&&!r.Sign)return S&&(F+="?"+S),y(null,{Url:F}),F;var ee=ke.call(this,{Bucket:r.Bucket,Region:r.Region,UseAccelerate:r.UseAccelerate,Url:w}),ve=je.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:ee,ForceSignHost:r.ForceSignHost===!1?!1:u.options.ForceSignHost},function(Ke,Ue){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},qe=w;qe+="?"+(Ue.Authorization.indexOf("q-signature")>-1?_e(Ue.Authorization):"sign="+encodeURIComponent(Ue.Authorization)),Ue.SecurityToken&&(qe+="&x-cos-security-token="+Ue.SecurityToken),Ue.ClientIP&&(qe+="&clientIP="+Ue.ClientIP),Ue.ClientUA&&(qe+="&clientUA="+Ue.ClientUA),Ue.Token&&(qe+="&token="+Ue.Token),S&&(qe+="&"+S),setTimeout(function(){y(null,{Url:qe})})}});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||{},w=g.Grant;w&&(w=s.isArray(w)?w:[w]);var S={READ:0,WRITE:0,FULL_CONTROL:0};return w&&w.length&&s.each(w,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,w;for(g=0;g<y.length;)w=y[g].trim(),u[w]?y.splice(g,1):(u[w]=!0,y[g]=w,g++);return y.join(",")}function ne(r){var y=r.region||"",u=r.bucket||"",g=u.substr(0,u.lastIndexOf("-")),w=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 ee=r.protocol||(s.isBrowser&&(typeof location>"u"?"undefined":i(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,w).replace(/\{\{Bucket\}\}/gi,g).replace(/\{\{Region\}\}/gi,y).replace(/\{\{.*?\}\}/gi,""),S=S.replace(/\{AppId\}/gi,w).replace(/\{BucketName\}/gi,g).replace(/\{Bucket\}/gi,u).replace(/\{Region\}/gi,y).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(S)||(S=ee+"//"+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||ne({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:y.Bucket,region:u?"accelerate":y.Region}),w=g.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),S=new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$");return S.test(w)?w:""};function je(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 w=r.ForceSignHost!==!1;!g&&r.SignHost&&w&&(u.Host=r.SignHost);var S=!1,F=function(Xe,ot){S||(S=!0,ot&&ot.XCosSecurityToken&&!ot.SecurityToken&&(ot=s.clone(ot),ot.SecurityToken=ot.XCosSecurityToken,delete ot.XCosSecurityToken),y&&y(Xe,ot))},ee=this,ve=r.Bucket||"",Ke=r.Region||"",Ue=r.Key||"";ee.options.ForcePathStyle&&ve&&(Ue=ve+"/"+Ue);var _e="/"+Ue,qe={},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));ee._StsCache=ee._StsCache||[],function(){var Ge,Xe;for(Ge=ee._StsCache.length-1;Ge>=0;Ge--){Xe=ee._StsCache[Ge];var ot=Math.round(s.getSkewTime(ee.options.SystemClockOffset)/1e3)+30;if(Xe.StartTime&&ot<Xe.StartTime||ot>=Xe.ExpiredTime){ee._StsCache.splice(Ge,1);continue}if(!Xe.ScopeLimit||Xe.ScopeLimit&&Xe.ScopeKey===At){qe=Xe;break}}}();var gt=function(){var Xe="";qe.StartTime&&r.Expires?Xe=qe.StartTime+";"+(qe.StartTime+r.Expires*1):qe.StartTime&&qe.ExpiredTime&&(Xe=qe.StartTime+";"+qe.ExpiredTime);var ot=s.getAuth({SecretId:qe.TmpSecretId,SecretKey:qe.TmpSecretKey,Method:r.Method,Pathname:_e,Query:r.Query,Headers:u,Expires:r.Expires,UseRawKey:ee.options.UseRawKey,SystemClockOffset:ee.options.SystemClockOffset,KeyTime:Xe,ForceSignHost:w}),nt={Authorization:ot,SecurityToken:qe.SecurityToken||qe.XCosSecurityToken||"",Token:qe.Token||"",ClientIP:qe.ClientIP||"",ClientUA:qe.ClientUA||""};F(null,nt)},Dt=function(Xe){if(Xe.Authorization){var ot=!1,nt=Xe.Authorization;if(nt)if(nt.indexOf(" ")>-1)ot=!1;else if(nt.indexOf("q-sign-algorithm=")>-1&&nt.indexOf("q-ak=")>-1&&nt.indexOf("q-sign-time=")>-1&&nt.indexOf("q-key-time=")>-1&&nt.indexOf("q-url-param-list=")>-1)ot=!0;else try{nt=atob(nt),nt.indexOf("a=")>-1&&nt.indexOf("k=")>-1&&nt.indexOf("t=")>-1&&nt.indexOf("r=")>-1&&nt.indexOf("b=")>-1&&(ot=!0)}catch(yt){}if(!ot)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(qe.ExpiredTime&&qe.ExpiredTime-s.getSkewTime(ee.options.SystemClockOffset)/1e3>60)gt();else if(ee.options.getAuthorization)ee.options.getAuthorization.call(ee,{Bucket:ve,Region:Ke,Method:r.Method,Key:Ue,Pathname:_e,Query:r.Query,Headers:u,Scope:rt,SystemClockOffset:ee.options.SystemClockOffset,ForceSignHost:w},function(Ge){typeof Ge=="string"&&(Ge={Authorization:Ge});var Xe=Dt(Ge);if(Xe)return F(Xe);Ge.Authorization?F(null,Ge):(qe=Ge||{},qe.Scope=rt,qe.ScopeKey=At,ee._StsCache.push(qe),gt())});else if(ee.options.getSTS)ee.options.getSTS.call(ee,{Bucket:ve,Region:Ke},function(Ge){qe=Ge||{},qe.Scope=rt,qe.ScopeKey=At,qe.TmpSecretId||(qe.TmpSecretId=qe.SecretId),qe.TmpSecretKey||(qe.TmpSecretKey=qe.SecretKey);var Xe=Dt(qe);if(Xe)return F(Xe);ee._StsCache.push(qe),gt()});else return function(){var Ge=s.getAuth({SecretId:r.SecretId||ee.options.SecretId,SecretKey:r.SecretKey||ee.options.SecretKey,Method:r.Method,Pathname:_e,Query:r.Query,Headers:u,Expires:r.Expires,UseRawKey:ee.options.UseRawKey,SystemClockOffset:ee.options.SystemClockOffset,ForceSignHost:w}),Xe={Authorization:Ge,SecurityToken:ee.options.SecurityToken||ee.options.XCosSecurityToken};return F(null,Xe),Xe}();return""}function Qe(r){var y=!1,u=!1,g=r.headers&&(r.headers.date||r.headers.Date)||r.error&&r.error.ServerTime;try{var w=r.error.Code,S=r.error.Message;(w==="RequestTimeTooSkewed"||w==="AccessDenied"&&S==="Request has expired")&&(u=!0)}catch(ee){}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 w=r.url||r.Url,S=r.SignHost||ke.call(this,{Bucket:r.Bucket,Region:r.Region,Url:w}),F=r.tracker,ee=function ve(Ke){var Ue=u.options.SystemClockOffset;F&&F.setParams({signStartTime:new Date().getTime(),retryTimes:Ke-1}),je.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,qe){if(_e){y(_e);return}F&&F.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),r.AuthData=qe,dt.call(u,r,function(rt,pt){F&&F.setParams({httpEndTime:new Date().getTime()}),rt&&Ke<2&&(Ue!==u.options.SystemClockOffset||Qe.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)})})};ee(1)}function dt(r,y){var u=this,g=r.TaskId;if(!(g&&!u._isRunningTask(g))){var w=r.Bucket,S=r.Region,F=r.Key,ee=r.method||"GET",ve=r.Url||r.url,Ke=r.body,Ue=r.rawBody;u.options.UseAccelerate&&(S="accelerate"),ve=ve||ne({ForcePathStyle:u.options.ForcePathStyle,protocol:u.options.Protocol,domain:u.options.Domain,bucket:w,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:ee,url:ve,headers:r.headers,qs:r.qs,body:Ke},qe="x-cos-security-token";if(s.isCIHost(ve)&&(qe="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[qe]=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||l)(_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 ot=Xe.error,nt=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(ot)return xt(s.error(ot));var Et=yt.statusCode,It=Math.floor(Et/100)===2;if(Ue&&It)return xt(null,{body:nt});var St;try{St=nt&&nt.indexOf("<")>-1&&nt.indexOf(">")>-1&&s.xml2json(nt)||{}}catch(Ot){St={}}var wt=St&&St.Error;It?xt(null,St):wt?xt(s.error(new Error(wt.Message),{code:wt.Code,error:wt})):Et?xt(s.error(new Error(yt.statusMessage),{code:""+Et})):Et&&xt(s.error(new Error("statusCode error")))}}),Dt=function Ge(Xe){Xe.TaskId===g&&(gt&>.abort&>.abort(),u.off("inner-kill-task",Ge))};g&&u.on("inner-kill-task",Dt)}}var ht={getService:h,putBucket:_,headBucket:j,getBucket:O,deleteBucket:x,putBucketAcl:V,getBucketAcl:X,putBucketCors:ue,getBucketCors:G,deleteBucketCors:Z,getBucketLocation:de,getBucketPolicy:De,putBucketPolicy:ae,deleteBucketPolicy:J,putBucketTagging:R,getBucketTagging:b,deleteBucketTagging:Q,putBucketLifecycle:m,getBucketLifecycle:oe,deleteBucketLifecycle:re,putBucketVersioning:te,getBucketVersioning:ie,putBucketReplication:q,getBucketReplication:se,deleteBucketReplication:ce,putBucketWebsite:le,getBucketWebsite:pe,deleteBucketWebsite:Ce,putBucketReferer:Ee,getBucketReferer:be,putBucketDomain:ye,getBucketDomain:we,deleteBucketDomain:xe,putBucketOrigin:Fe,getBucketOrigin:ge,deleteBucketOrigin:me,putBucketLogging:Re,getBucketLogging:Ne,putBucketInventory:Oe,postBucketInventory:Pe,getBucketInventory:Me,listBucketInventory:He,deleteBucketInventory:Ve,putBucketAccelerate:ze,getBucketAccelerate:Ye,putBucketEncryption:tt,getBucketEncryption:Je,deleteBucketEncryption:Ae,getObject:a,headObject:p,listObjectVersions:c,putObject:d,deleteObject:C,getObjectAcl:H,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 w=r.slice(0,-g.length)+g.toUpperCase(),S=s.apiWrapper(r,y),F=!1;u[w]=function(){!F&&console.warn("warning: cos."+w+" 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,n,o){var i=o("./src/util.js"),l=o("./src/event.js"),s=o("./src/task.js"),h=o("./src/base.js"),_=o("./src/advance.js"),j=o("./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:""},x=function(X){this.options=i.extend(i.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格式错误,请检查"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey格式错误,请检查"),console.error("error: SecretKey format is incorrect. Please check")),i.isNode()&&(console.warn("warning: cos-js-sdk-v5 不支持 nodejs 环境使用,请改用 cos-nodejs-sdk-v5,参考文档: 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")),l.init(this),s.init(this)};h.init(x,s),_.init(x,s),x.util={md5:i.md5,xml2json:i.xml2json,json2xml:i.json2xml,encodeBase64:i.encodeBase64},x.getAuthorization=i.getAuth,x.version=j.version,e.exports=x},"./src/event.js":function(e,n){var o=function(s){var h={},_=function(O){return!h[O]&&(h[O]=[]),h[O]};s.on=function(j,O){j==="task-list-update"&&console.warn('warning: Event "'+j+'" has been deprecated. Please use "list-update" instead.'),_(j).push(O)},s.off=function(j,O){for(var x=_(j),V=x.length-1;V>=0;V--)O===x[V]&&x.splice(V,1)},s.emit=function(j,O){for(var x=_(j).map(function(X){return X}),V=0;V<x.length;V++)x[V](O)}},i=function(){o(this)};e.exports.init=o,e.exports.EventProxy=i},"./src/session.js":function(e,n,o){var i=o("./src/util.js"),l="cos_sdk_upload_cache",s=30*24*3600,h,_,j=function(){try{var G=JSON.parse(localStorage.getItem(l))}catch(Z){}G||(G=[]),h=G},O=function(){try{h.length?localStorage.setItem(l,JSON.stringify(h)):localStorage.removeItem(l)}catch(G){}},x=function(){if(!h){j.call(this);for(var G=!1,Z=Math.round(Date.now()/1e3),de=h.length-1;de>=0;de--){var ae=h[de][2];(!ae||ae+s<Z)&&(h.splice(de,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,Z,de,ae){return G.name&&G.size&&G.lastModifiedDate&&Z?i.md5([G.name,G.size,G.lastModifiedDate,Z,de,ae].join("::")):null},getCopyFileId:function(G,Z,de,ae,De){var J=Z["content-length"],R=Z.etag||"",b=Z["last-modified"];return G&&de?i.md5([G,J,R,b,de,ae,De].join("::")):null},getUploadIdList:function(G){if(!G)return null;x.call(this);for(var Z=[],de=0;de<h.length;de++)h[de][0]===G&&Z.push(h[de][1]);return Z.length?Z:null},saveUploadId:function(G,Z,de){if(x.call(this),!!G){for(var ae=h.length-1;ae>=0;ae--){var De=h[ae];De[0]===G&&De[1]===Z&&h.splice(ae,1)}h.unshift([G,Z,Math.round(Date.now()/1e3)]),h.length>de&&h.splice(de),V()}},removeUploadId:function(G){x.call(this),delete X.using[G];for(var Z=h.length-1;Z>=0;Z--)h[Z][1]===G&&h.splice(Z,1);V()}};e.exports=X},"./src/task.js":function(e,n,o){var i=o("./src/session.js"),l=o("./src/util.js"),s={},h=function(O,x){s[x]=O[x],O[x]=function(V,X){V.SkipTask?s[x].call(this,V,X):this._addTask(x,V,X)}},_=function(O){var x=[],V={},X=0,ue=0,G=function(b){var Q={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&&(Q.FilePath=b.FilePath),b._custom&&(Q._custom=b._custom),Q},Z=function(){var R,b=function(){R=0,O.emit("task-list-update",{list:l.map(x,G)}),O.emit("list-update",{list:l.map(x,G)})};return function(){R||(R=setTimeout(b))}}(),de=function(){if(!(x.length<=O.options.UploadQueueSize)){for(var b=0;b<ue&&b<x.length&&x.length>O.options.UploadQueueSize;){var Q=x[b].state==="waiting"||x[b].state==="checking"||x[b].state==="uploading";!x[b]||!Q?(V[x[b].id]&&delete V[x[b].id],x.splice(b,1),ue--):b++}Z()}},ae=function R(){if(!(X>=O.options.FileParallelLimit)){for(;x[ue]&&x[ue].state!=="waiting";)ue++;if(!(ue>=x.length)){var b=x[ue];ue++,X++,b.state="checking",b.params.onTaskStart&&b.params.onTaskStart(G(b)),!b.params.UploadData&&(b.params.UploadData={});var Q=l.formatParams(b.api,b.params);s[b.api].call(O,Q,function(m,oe){O._isRunningTask(b.id)&&((b.state==="checking"||b.state==="uploading")&&(b.state=m?"error":"success",m&&(b.error=m),X--,Z(),R(),b.callback&&b.callback(m,oe),b.state==="success"&&(b.params&&(delete b.params.UploadData,delete b.params.Body,delete b.params),delete b.callback)),de())}),Z(),setTimeout(R)}}},De=function(b,Q){var m=V[b];if(m){var oe=m&&m.state==="waiting",re=m&&(m.state==="checking"||m.state==="uploading");if(Q==="canceled"&&m.state!=="canceled"||Q==="paused"&&oe||Q==="paused"&&re){if(Q==="paused"&&m.params.Body&&typeof m.params.Body.pipe=="function"){console.error("stream not support pause");return}m.state=Q,O.emit("inner-kill-task",{TaskId:b,toState:Q});try{var te=m&&m.params&&m.params.UploadData.UploadId}catch(ie){}Q==="canceled"&&te&&i.removeUsing(te),Z(),re&&(X--,ae()),Q==="canceled"&&(m.params&&(delete m.params.UploadData,delete m.params.Body,delete m.params),delete m.callback)}de()}};O._addTasks=function(R){l.each(R,function(b){O._addTask(b.api,b.params,b.callback,!0)}),Z()};var J=!0;O._addTask=function(R,b,Q,m){b=l.formatParams(R,b);var oe=l.uuid();b.TaskId=oe,b.onTaskReady&&b.onTaskReady(oe),b.TaskReady&&(b.TaskReady(oe),J&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),J=!1);var re={params:b,callback:Q,api:R,index:x.length,id:oe,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},te=b.onHashProgress;b.onHashProgress=function(q){O._isRunningTask(re.id)&&(re.hashPercent=q.percent,te&&te(q),Z())};var ie=b.onProgress;return b.onProgress=function(q){O._isRunningTask(re.id)&&(re.state==="checking"&&(re.state="uploading"),re.loaded=q.loaded,re.speed=q.speed,re.percent=q.percent,ie&&ie(q),Z())},l.getFileSize(R,b,function(q,se){if(q)return Q(l.error(q));V[oe]=re,x.push(re),re.size=se,!m&&Z(),ae(),de()}),oe},O._isRunningTask=function(R){var b=V[R];return!!(b&&(b.state==="checking"||b.state==="uploading"))},O.getTaskList=function(){return l.map(x,G)},O.cancelTask=function(R){De(R,"canceled")},O.pauseTask=function(R){De(R,"paused")},O.restartTask=function(R){var b=V[R];b&&(b.state==="paused"||b.state==="error")&&(b.state="waiting",Z(),ue=Math.min(ue,b.index),ae())},O.isUploadRunning=function(){return X||ue<x.length}};e.exports.transferToTaskMethod=h,e.exports.init=_},"./src/tracker.js":function(e,n,o){var i=o("./node_modules/@babel/runtime/helpers/classCallCheck.js"),l=o("./node_modules/@babel/runtime/helpers/createClass.js"),s=o("./node_modules/@babel/runtime/helpers/typeof.js"),h=o("./package.json"),_=null,j=function(R){if(!_){var b=o("./lib/beacon.min.js");_=new b({appkey:"0AND0VEVB24UBGDU",versionCode:h.version,channelID:"js_sdk",openid:"openid",unionid:"unid",strictMode:!1,delay:R,sessionDuration:60*1e3})}return _},O={getUid:function(){var R=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return R()+R()+"-"+R()+"-"+R()+"-"+R()+"-"+R()+R()+R()},getNetType:function(){if((typeof navigator>"u"?"undefined":s(navigator))==="object"){var R=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(R==null?void 0:R.type)||(R==null?void 0:R.effectiveType)||"unknown"}return"unknown"},getOsType:function(){if((typeof navigator>"u"?"undefined":s(navigator))!=="object")return"unknown os";var R=navigator.userAgent.toLowerCase(),b=/macintosh|mac os x/i.test(navigator.userAgent);return R.indexOf("win32")>=0||R.indexOf("wow32")>=0?"win32":R.indexOf("win64")>=0||R.indexOf("wow64")>=0?"win64":b?"mac":"unknown os"},isMobile:function(){var R=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i;return!!((typeof navigator>"u"?"undefined":s(navigator))==="object"&&navigator.userAgent.match(R))},isAndroid:function(){var R=/(Android|Adr|Linux)/i;return!!((typeof navigator>"u"?"undefined":s(navigator))==="object"&&navigator.userAgent.match(R))},isIOS:function(){var R=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator>"u"?"undefined":s(navigator))==="object"&&navigator.userAgent.match(R))},isOtherMobile:function(){return isMobile&&!isAndroid&&!isIOS},getDeviceName:function(){if((typeof navigator>"u"?"undefined":s(navigator))!=="object")return"unknown device";var R=navigator.userAgent.toLowerCase();if(R.includes("app/tencent_wemeet"))return"tencent_wemeet";if(R.indexOf("maxthon")>=0){var b=R.match(/maxthon\/([\d.]+)/),Q=b&&b[1]||"";return"傲游浏览器 ".concat(Q).trim()}if(R.indexOf("qqbrowser")>=0){var m=R.match(/qqbrowser\/([\d.]+)/),oe=m&&m[1]||"";return"QQ浏览器 ".concat(oe).trim()}if(R.indexOf("se 2.x")>=0)return"搜狗浏览器";if(R.indexOf("wxwork")>=0)return"微信内置浏览器";if(R.indexOf("msie")>=0){var re=R.match(/msie ([\d.]+)/),te=re&&re[1]||"";return"IE ".concat(te).trim()}if(R.indexOf("firefox")>=0){var ie=R.match(/firefox\/([\d.]+)/),q=ie&&ie[1]||"";return"Firefox ".concat(q).trim()}if(R.indexOf("chrome")>=0){var se=R.match(/chrome\/([\d.]+)/),ce=se&&se[1]||"";return"Chrome ".concat(ce).trim()}if(R.indexOf("opera")>=0){var le=R.match(/opera.([\d.]+)/),pe=le&&le[1]||"";return"Opera ".concat(pe).trim()}if(R.indexOf("safari")>=0){var Ce=R.match(/version\/([\d.]+)/),Ee=Ce&&Ce[1]||"";return"Safari ".concat(Ee).trim()}if(R.indexOf("edge")>=0){var be=R.match(/edge\/([\d.]+)/),ye=be&&be[1]||"";return"edge ".concat(ye).trim()}return R.substr(0,200)}},x={isMobile:O.isMobile(),isBrowser:!O.isMobile(),mobileOsType:O.isAndroid()?"android":O.isIOS?"ios":"other_mobile",pcOsType:O.getOsType()},V={deviceType:x.isMobile?"mobile":x.isBrowser?"browser":"unknown",devicePlatform:x.isMobile?x.mobileOsType:x.pcOsType,deviceName:O.getDeviceName()},X=["multipartInit","multipartUpload","multipartComplete","multipartList","multipartListPart","multipartAbort"],ue=["putObject","postObject","appendObject","sliceUploadFile","uploadFile","uploadFiles"].concat(X),G=["getObject"];function Z(J){return ue.includes(J)?"cos_upload":G.includes(J)?"cos_download":"base_service"}function de(J){return J.replace(/([A-Z])/g,"_$1").toLowerCase()}function ae(J){var R={},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"],Q=["tracePlatform","cossdkVersion","region","bucket","appid","networkType","host","accelerate","requestPath","partNumber","size","name","result","tookTime","errorRequestId","retryTimes","reqUrl","customId","deviceType","devicePlatform","deviceName"],m=J.result==="Success"?Q:b;for(var oe in J)if(m.includes(oe)){var re=de(oe);R[re]=J[oe]}return R}var De=function(){function J(R){i(this,J);var b=R.parent,Q=R.traceId,m=R.bucket,oe=R.region,re=R.apiName,te=R.fileKey,ie=R.fileSize,q=R.accelerate,se=R.customId,ce=R.delay,le=R.deepTracker,pe=m&&m.substr(m.lastIndexOf("-")+1)||"";this.parent=b,this.deepTracker=le,this.delay=ce,this.params={cossdkVersion:h.version,region:oe,networkType:"",host:"",accelerate:q?"Y":"N",requestPath:te||"",size:ie||-1,httpMd5:0,httpSign:0,httpFull:0,name:re||"",result:"",tookTime:0,errorNode:"",errorCode:"",errorMessage:"",errorRequestId:"",errorStatusCode:0,errorServiceName:"",tracePlatform:"cos-js-sdk-v5",traceId:Q||O.getUid(),bucket:m,appid:pe,partNumber:0,retryTimes:0,reqUrl:"",customId:se||"",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=j(ce)}return l(J,[{key:"formatResult",value:function(b,Q){var m,oe,re,te,ie,q,se=new Date().getTime(),ce=se-this.params.startTime,le=O.getNetType(),pe=b?(b==null?void 0:b.code)||(b==null||(m=b.error)===null||m===void 0?void 0:m.code)||(b==null||(oe=b.error)===null||oe===void 0?void 0:oe.Code):"",Ce=b?(b==null?void 0:b.message)||(b==null||(re=b.error)===null||re===void 0?void 0:re.message)||(b==null||(te=b.error)===null||te===void 0?void 0:te.Message):"",Ee=b?(b==null?void 0:b.resource)||(b==null||(ie=b.error)===null||ie===void 0?void 0:ie.resource)||(b==null||(q=b.error)===null||q===void 0?void 0:q.Resource):"",be=b?b==null?void 0:b.statusCode:Q.statusCode,ye=b?(b==null?void 0:b.headers)&&(b==null?void 0:b.headers["x-cos-request-id"]):(Q==null?void 0:Q.headers)&&(Q==null?void 0:Q.headers["x-cos-request-id"]),we=b?ye?"Server":"Client":"";if(Object.assign(this.params,{tookTime:ce,networkType:le,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:we,errorCode:pe,errorStatusCode:be,errorMessage:Ce,errorServiceName:Ee,errorRequestId:ye}),b&&(!pe||!Ce)&&(this.params.fullError=b?JSON.stringify(b):""),this.params.name==="getObject"&&(this.params.size=Q?Q.headers&&Q.headers["content-length"]:-1),this.params.reqUrl)try{var xe=/^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl);this.params.host=xe[2]}catch(Fe){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=Z(this.params.name),Q=ae(this.params);this.beacon||(this.beacon=j(this.delay||5e3)),this.delay===0?this.beacon&&this.beacon.onDirectUserAction(b,Q):this.beacon&&this.beacon.onUserAction(b,Q)}}},{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 J(b)}}]),J}();e.exports=De},"./src/util.js":function(e,n,o){(function(i){var l=o("./node_modules/@babel/runtime/helpers/typeof.js"),s=o("./lib/md5.js"),h=o("./lib/crypto.js"),_=o("./lib/xml2json.js"),j=o("./lib/json2xml.js"),O=o("./lib/base64.js"),x=o("./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(d,C){return d=d.toLowerCase(),C=C.toLowerCase(),d===C?0:d>C?1:-1})}var ue=function(p,c){var a,d,C,H=[],K=X(p);for(a=0;a<K.length;a++)d=K[a],C=p[d]===void 0||p[d]===null?"":""+p[d],d=c?V(d).toLowerCase():V(d),C=V(C)||"",H.push(d+"="+C);return H.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"],Z=function(p){var c={};for(var a in p){var d=a.toLowerCase();(d.indexOf("x-cos-")>-1||G.indexOf(d)>-1)&&(c[a]=p[a])}return c},de=function(p){p=p||{};var c=p.SecretId,a=p.SecretKey,d=p.KeyTime,C=(p.method||p.Method||"get").toLowerCase(),H=se(p.Query||p.params||{}),K=Z(se(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(Oe(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=d||fe+";"+Le,st=d||fe+";"+Le,ut=X(K,!0).join(";").toLowerCase(),ct=X(H,!0).join(";").toLowerCase(),it=h.HmacSHA1(st,a).toString(),at=[C,Be,Je.obj2str(H,!0),Je.obj2str(K,!0),""].join(`
- `),lt=["sha1",et,h.SHA1(at).toString(),""].join(`
- `),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},ae=function(p,c,a){var d=c/8,C=p.slice(a,a+d);return new Uint8Array(C).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[c](C)[0]},De=function(p,c,a,d){var C=p.slice(c,a),H="";return new Uint8Array(C).forEach(function(K){H+=String.fromCharCode(K)}),d&&(H=decodeURIComponent(escape(H))),H},J=function(p){for(var c={},a=De(p),d={records:[]};p.byteLength;){var C=ae(p,32,0),H=ae(p,32,4),K=C-H-16,he=0,Be;for(p=p.slice(12);he<H;){var Te=ae(p,8,he),fe=De(p,he+1,he+1+Te),Le=ae(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),d.records.push(Be);else if(c[":event-type"]==="Stats")Be=De(p,he,he+K,!0),d.stats=Je.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,d.error=et}p=p.slice(he+K+4)}return{payload:d.records.join(""),body:a}},R=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(){},Q=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},m=function(p,c){var a,d=new FileReader;FileReader.prototype.readAsBinaryString?(a=FileReader.prototype.readAsBinaryString,d.onload=function(){c(this.result)}):FileReader.prototype.readAsArrayBuffer?a=function(H){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(H)}:console.error("FileReader not support readAsBinaryString"),a.call(d,p)},oe=function(){var Ae=function(a,d){a=a.split("."),d=d.split(".");for(var C=0;C<d.length;C++)if(a[C]!==d[C])return parseInt(a[C])>parseInt(d[C])?1:-1;return 0},p=function(a){if(!a)return!1;var d=(a.match(/Chrome\/([.\d]+)/)||[])[1],C=(a.match(/QBCore\/([.\d]+)/)||[])[1],H=(a.match(/QQBrowser\/([.\d]+)/)||[])[1],K=d&&Ae(d,"53.0.2785.116")<0&&C&&Ae(C,"3.53.991.400")<0&&H&&Ae(H,"9.0.2524.400")<=0||!1;return K};return p(typeof navigator<"u"&&navigator.userAgent)}(),re=function(p,c,a,d,C){var H;if(p.slice?H=p.slice(c,a):p.mozSlice?H=p.mozSlice(c,a):p.webkitSlice&&(H=p.webkitSlice(c,a)),d&&oe){var K=new FileReader;K.onload=function(he){H=null,C(new Blob([K.result]))},K.readAsArrayBuffer(H)}else C(H)},te=function(p,c,a,d){a=a||b,p?typeof c=="string"?a(Je.md5(c,!0)):Blob&&c instanceof Blob?Je.getFileMd5(c,function(C,H){a(H)},d):a():a()},ie=1024*1024,q=function(p,c,a){var d=p.size,C=0,H=s.getCtx(),K=function he(Be){if(Be>=d){var Te=H.digest("hex");c(null,Te);return}var fe=Math.min(d,Be+ie);Je.fileSlice(p,Be,fe,!1,function(Le){m(Le,function($e){Le=null,H=H.update($e,!0),C+=$e.length,$e=null,a&&a({loaded:C,total:d,percent:Math.round(C/d*1e4)/1e4}),he(Be+ie)})})};K(0)};function se(Ae){return ye(Ae,function(p){return l(p)==="object"&&p!==null?se(p):p})}function ce(Ae,p,c){return Ae&&p in Ae?Ae[p]:c}function le(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 Ee(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 we(Ae,p){var c=pe(Ae),a=c?[]:{};for(var d in Ae)Ae.hasOwnProperty(d)&&p(Ae[d],d)&&(c?a.push(Ae[d]):a[d]=Ae[d]);return a}var xe=function(p){var c,a,d,C="";for(c=0,a=p.length/2;c<a;c++)d=parseInt(p[c*2]+p[c*2+1],16),C+=String.fromCharCode(d);return btoa(C)},Fe=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,d=c.Region,C=c.Key,H=this.options.Domain,K=!H||typeof H=="string"&&H.indexOf("{Bucket}")>-1,he=!H||typeof H=="string"&&H.indexOf("{Region}")>-1;if(p.indexOf("Bucket")>-1||p==="deleteMultipleObject"||p==="multipartList"||p==="listObjectVersions"){if(K&&!a)return"Bucket";if(he&&!d)return"Region"}else if(p.indexOf("Object")>-1||p.indexOf("multipart")>-1||p==="sliceUploadFile"||p==="abortUploadTask"){if(K&&!a)return"Bucket";if(he&&!d)return"Region";if(!C)return"Key"}return!1},me=function(p,c){if(c=le({},c),p!=="getAuth"&&p!=="getV4Auth"&&p!=="getObjectUrl"){var a=c.Headers||{};if(c&&l(c)==="object"){(function(){for(var C in c)c.hasOwnProperty(C)&&C.indexOf("x-cos-")>-1&&(a[C]=c[C])})();var d={"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"};Je.each(d,function(C,H){c[C]!==void 0&&(a[H]=c[C])}),c.Headers=Q(a)}}return c},Re=function(p,c){return function(a,d){var C=this;typeof a=="function"&&(d=a,a={}),a=me(p,a);var H;if(C.options.EnableTracker)if(a.calledBySdk==="sliceUploadFile")H=a.tracker&&a.tracker.generateSubTracker({apiName:p});else if(["uploadFile","uploadFiles"].includes(p))H=null;else{var K=-1;a.Body&&(K=typeof a.Body=="string"?a.Body.length:a.Body.size||a.Body.byteLength||-1),H=new x({bucket:a.Bucket,region:a.Region,apiName:p,fileKey:a.Key,fileSize:K,deepTracker:C.options.DeepTracker,customId:C.options.CustomId,delay:C.options.TrackerDelay})}a.tracker=H;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){H&&H.formatResult(We,et),d&&d(he(We),he(et))},Te=function(){if(p!=="getService"&&p!=="abortUploadTask"){var We=ge.call(C,p,a);if(We)return"missing param "+We;if(a.Region){if(C.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."}!C.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(C.options.AppId)a.Bucket=a.Bucket+"-"+C.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)}!C.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&&!d)return new Promise(function(Ze,We){if(d=function(st,ut){st?We(st):Ze(ut)},fe)return Be(Je.error(new Error(fe)));c.call(C,a,Be)});if(fe)return Be(Je.error(new Error(fe)));var $e=c.call(C,a,Be);if(Le)return $e}},Ne=function(p,c){var a=this,d=0,C=0,H=Date.now(),K,he;function Be(){if(he=0,c&&typeof c=="function"){K=Date.now();var Te=Math.max(0,Math.round((C-d)/((K-H)/1e3)*100)/100)||0,fe;C===0&&p===0?fe=1:fe=Math.floor(C/p*100)/100||0,H=K,d=C;try{c({loaded:C,total:p,speed:Te,percent:fe})}catch(Le){}}}return function(Te,fe){if(Te&&(C=Te.loaded,p=Te.total),fe)clearTimeout(he),Be();else{if(he)return;he=setTimeout(Be,a.options.ProgressInterval)}}},Ie=function(p,c,a){var d;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]"))d=c.Body.size;else{a(Je.error(new Error("params body format error, Only allow File|Blob|String.")));return}c.ContentLength=d,a(null,d)},Oe=function(p){return Date.now()+(p||0)},Pe=function(p,c){var a=p;return p.message=p.message||null,typeof c=="string"?(p.error=c,p.message=c):l(c)==="object"&&c!==null&&(le(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=se(a)),p},Me=function(){return(typeof globalThis>"u"?"undefined":l(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},He=function(){return(typeof window>"u"?"undefined":l(window))!=="object"&&(typeof i>"u"?"undefined":l(i))==="object"&&!0&&!Me()},Ve=function(p){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(p)},ze=function(){if((typeof navigator>"u"?"undefined":l(navigator))!=="object")return!1;var Ae=navigator.userAgent,p=!!Ae.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return p}(),Ye=function(){return(typeof navigator>"u"?"undefined":l(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},Je={noop:b,formatParams:me,apiWrapper:Re,xml2json:_,json2xml:j,md5:s,clearKey:Q,fileSlice:re,getBodyMd5:te,getFileMd5:q,b64:xe,extend:le,isArray:pe,isInArray:Ce,makeArray:Ee,each:be,map:ye,filter:we,clone:se,attr:ce,uuid:Fe,camSafeUrlEncode:V,throttleOnProgress:Ne,getFileSize:Ie,getSkewTime:Oe,error:Pe,obj2str:ue,getAuth:de,parseSelectPayload:J,getSourceParams:R,isBrowser:!0,isNode:He,isCIHost:Ve,isIOS_QQ:ze&&Ye,encodeBase64:tt};e.exports=Je}).call(this,o("./node_modules/process/browser.js"))}})})})(cosJsSdkV5);var cosJsSdkV5Exports=cosJsSdkV5.exports;const COS=getDefaultExportFromCjs(cosJsSdkV5Exports),ossSwitch="tencent",tencentBucket="daya-online-1303457149",getUploadSign=async e=>{const{bucketName:n,filename:o,postData:i}=e,l=ossSwitch;let s=n,h=o,_={};return s=tencentBucket,h="ktqy/"+o,_={key:"ktqy/"+i.key},request.post("/edu-app/open/getUploadSign",{data:{postData:_,pluginName:l,bucketName:s,filename:h},params:{pluginName:l}})},onOnlyFileUpload=async(e,n)=>{{let o="",i=null;if(console.log(n,"params"),await new COS({Domain:"https://oss.dayaedu.com",getAuthorization:async(s,h)=>{h({Authorization:n.signature})}}).uploadFile({Bucket:tencentBucket,Region:"ap-nanjing",Key:`ktqy/${n.name}`,Body:n.file,SliceSize:1024*1024*500}).then(s=>{var h;((h=s.Location)==null?void 0:h.indexOf("http"))>=0?o=s.Location:o="https://"+s.Location}).catch(s=>{i=s}),o)return o;throw new Error(i)}},MUploader=defineComponent({name:"col-upload",props:{modelValue:{type:Array,default:()=>[]},deletable:{type:Boolean,default:!0},maxCount:{type:Number,default:1},native:{type:Boolean,default:!1},uploadSize:{type:Number,default:5},uploadType:{type:String,default:"IMAGE"},accept:{type:String,default:"image/*"},cropper:{type:Boolean,default:!1},options:{type:Object,default:{}},bucket:{type:String,default:"gyt"},path:{type:String,default:""},uploadIcon:{type:String,default:iconUploader},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1},position:{type:String,default:"outside"}},emits:["uploadChange","update:modelValue"],methods:{nativeUpload(){if(this.disabled)return;const e=this.uploadType==="VIDEO"?"video":"img";let n=1;this.maxCount>1?n=this.maxCount-this.modelValue.length:n=this.maxCount,postMessage({api:"chooseFile",content:{type:e,max:n,bucket:this.bucket,path:this.path}},o=>{if(console.log(o,"fileUrl"),this.maxCount>1){const i=o.fileUrl;console.log(i,"files"),this.$emit("update:modelValue",[...this.modelValue,...i.split(",")]),this.$emit("uploadChange",[...this.modelValue,...i.split(",")])}else this.$emit("update:modelValue",[o.fileUrl]),this.$emit("uploadChange",[o.fileUrl])})},beforeRead(e){return console.log(e,"beforeRead"),e.size/1024/1024<this.uploadSize?!0:(showToast(`上传文件大小不能超过 ${this.uploadSize}MB`),!1)},beforeDelete(){return!0},async afterRead(e){try{e.status="uploading",e.message="上传中...",await this.uploadFile(e.file)}catch(n){closeToast()}},onClose(e,n){const o=this.modelValue,i=o.findIndex(l=>l==n);i>-1&&(o.splice(i,1),this.$emit("update:modelValue",o),this.$emit("uploadChange")),e.stopPropagation()},async getFile(e){try{await this.uploadFile(e)}catch(n){}},async uploadFile(e){try{const n=e.name||"",o=this.path?this.path+"/"+(n&&n.replace(/ /gi,"_")):n&&n.replace(/ /gi,"_"),i=new Date().getTime()+o;console.log(e);const{data:l}=await getUploadSign({filename:i,bucketName:this.bucket,postData:{filename:i,acl:"public-read",key:i,unknowValueField:[]}});showLoadingToast({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0});const s={policy:l.policy,signature:l.signature,key:i,KSSAccessKeyId:l.kssAccessKeyId,acl:"public-read",name:i,file:e},h=await onOnlyFileUpload(getOssUploadUrl(this.bucket),s);closeToast(),this.maxCount>1?(this.$emit("update:modelValue",[...this.modelValue,h]),this.$emit("uploadChange",[...this.modelValue,h])):(this.$emit("update:modelValue",[h]),this.$emit("uploadChange",[h]))}catch(n){console.log(n,"uploadFile")}}},render(){return useCustomFieldValue(()=>this.modelValue),createVNode("div",{class:styles$1["uploader-section"]},[this.modelValue.length>0&&this.maxCount>1&&this.modelValue.map(e=>createVNode("div",{class:["van-uploader",styles$1.uploader,styles$1[this.size]]},[this.deletable&&!this.disabled&&createVNode(Icon,{name:"cross",onClick:n=>this.onClose(n,e),class:styles$1["img-close"]},null),createVNode("div",{class:["van-uploader__upload"]},[this.uploadType==="IMAGE"?createVNode(Image$1,{src:e,class:styles$1.previewImg,fit:"cover"},null):createVNode("video",{ref:"videoUpload",style:{backgroundColor:"#F8F8F8"},class:styles$1.previewImg,poster:iconVideoDefault,src:e+"#t=1,4"},null)])])),this.native?this.maxCount>1?this.modelValue.length<this.maxCount&&createVNode("div",{class:["van-uploader",styles$1.uploader,styles$1[this.size]],onClick:this.nativeUpload},[createVNode(Icon,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):createVNode("div",{class:["van-uploader",styles$1.uploader,styles$1[this.size]],onClick:this.nativeUpload},[this.modelValue.length>0?createVNode("div",{class:["van-uploader__upload"]},[this.modelValue.map(e=>createVNode(Fragment,null,[this.deletable&&!this.disabled&&createVNode(Icon,{name:"cross",onClick:n=>this.onClose(n,e),class:[styles$1["img-close"],styles$1.singleImgClose]},null),this.uploadType==="IMAGE"?createVNode(Image$1,{fit:"cover",position:"center",class:styles$1.uploadImg,src:e},null):createVNode("video",{ref:"videoUpload",class:styles$1.uploadImg,style:{backgroundColor:"#F8F8F8"},poster:iconVideoDefault,src:e+"#t=1,4"},null)]))]):createVNode(Icon,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):this.maxCount>1?this.modelValue.length<this.maxCount&&createVNode(Uploader,{class:["van-uploader",styles$1.uploader,styles$1[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,maxCount:this.maxCount,disabled:this.disabled,accept:this.accept},null):this.cropper&&this.uploadType==="IMAGE"?createVNode("div",{class:["van-uploader",styles$1.uploader,styles$1[this.size]]},[this.modelValue.length>0?createVNode(Image$1,{fit:"cover",position:"center",class:styles$1.uploadImg,src:this.modelValue[0]},null):createVNode("div",{class:styles$1.uploader},[createVNode(Icon,{name:iconUploader,size:"32"},null)]),createVNode(ColCropper,{option:this.options,getFile:this.getFile},null)]):createVNode(Uploader,{class:["van-uploader",styles$1.uploader,styles$1[this.size]],afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,uploadIcon:this.uploadIcon,accept:this.accept,disabled:this.disabled},{default:()=>[this.modelValue.length>0?createVNode("div",{class:["van-uploader__upload"]},[this.modelValue.map(e=>createVNode(Fragment,null,[this.deletable&&!this.disabled&&createVNode(Icon,{name:"cross",onClick:n=>this.onClose(n,e),class:[styles$1["img-close"],styles$1.singleImgClose]},null),this.uploadType==="IMAGE"?createVNode(Image$1,{fit:"cover",position:"center",class:styles$1.uploadImg,src:e},null):createVNode("video",{ref:"videoUpload",class:styles$1.uploadImg,style:{backgroundColor:"#F8F8F8"},poster:iconVideoDefault,src:e+"#t=1,4"},null)]))]):createVNode(Icon,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]}),this.$slots.default&&this.$slots.default()])}}),index=defineComponent({name:"creation-edit",setup(){const e=useRoute(),n=useRouter(),o=reactive({id:e.query.id,playType:"",musicDetail:{},desc:"",videoImg:"",img:[]}),i=async()=>{try{await api_userMusicSave({id:o.id,img:o.img.join(","),videoImg:o.videoImg,desc:o.desc||"我发布了一首演奏作品,快来听听吧~",musicPracticeRecordId:o.musicDetail.musicPracticeRecordId,type:"FORMAL"}),n.back()}catch(s){}},l=()=>{postMessage({api:"videoCrop",content:{url:o.musicDetail.videoUrl}},s=>{s!=null&&s.content.videoCover&&(o.videoImg=s.content.videoCover)})};return onMounted(async()=>{try{const{data:s}=await api_userMusicDetail(o.id);o.musicDetail=s,o.desc=s.desc,o.videoImg=s.videoImg,o.img=s.img?[s.img]:[],(s==null?void 0:s.videoUrl.lastIndexOf("mp4"))!==-1?o.playType="Video":o.playType="Audio"}catch(s){}}),()=>createVNode("div",null,[createVNode(MSticky,{position:"top"},{default:()=>[createVNode(MHeader,{border:!1},null)]}),o.playType==="Video"&&createVNode("div",{class:[styles$2.section,styles$2.sectionVideo]},[createVNode("img",{src:o.videoImg||videoBg$1,class:styles$2.videoBg},null),createVNode("div",{class:styles$2.btnGroup},[createVNode(MUploader,{class:styles$2.btnImg,cropper:!0,deletable:!1,onUploadChange:s=>{s.length>0&&(o.videoImg=s[0])},options:{fixedNumber:[16,9]}},null),createVNode("div",{class:styles$2.btnCropper,onClick:l},[createTextVNode("视频截取封面")])])]),createVNode("div",{class:styles$2.section},[createVNode(Field,{rows:4,autosize:!0,type:"textarea",maxlength:150,placeholder:"我发布了一首演奏作品,快来听听吧~",showWordLimit:!0,modelValue:o.desc,"onUpdate:modelValue":s=>o.desc=s},null)]),createVNode("div",{class:[styles$2.section,styles$2.sectionFile]},[createVNode("div",{class:styles$2.uploadImg},[createVNode(MUploader,{class:styles$2.muploader,cropper:!0,deletable:!1,modelValue:o.img,"onUpdate:modelValue":s=>o.img=s},null)]),createVNode("div",{class:styles$2.musicDetail},[createVNode("p",{class:styles$2.musicName},[o.musicDetail.musicSheetName]),createVNode("p",{class:styles$2.username},[o.musicDetail.username])])]),createVNode("div",{class:styles$2.btnGroup},[createVNode(Button,{type:"primary",round:!0,block:!0,color:"linear-gradient(73deg, #5BECFF 0%, #259CFE 100%)",onClick:i},{default:()=>[o.musicDetail.type==="FORMAL"?"保存":"发布"]})])])}});export{index as default};
|