import{bx as of,cn as sf,a5 as Ue,R as fe,X as yS,w as ir,ae as te,al as He,am as mn,af as de,ak as j,P as oe,ag as Ge,at as Nt,aq as ze,aB as mS,co as _S,bG as Ke,bq as Fd,bt as lf,aC as SS,e6 as Ly,e7 as Gi,bB as bS,bv as kt,e8 as wS,e4 as CS,bA as TS,e9 as bn,cp as xS,ea as IS,eb as AS,ec as kS,ed as MS,ee as $d,bE as zd,cw as Hl,s as Te,E as er,bz as cn,cu as RS,aj as dl,au as Se,ai as nt,ad as Gl,ah as Ht,a_ as Pr,aY as Qe,bo as Ey,bH as Xo,bI as Ko,ef as PS,bD as LS,cW as ES,az as Sn,aA as DS,ay as Vi,an as Dy,bw as lr,$ as _h,aZ as Sh,as as Un,eg as ls,a$ as Ud,ac as BS}from"./index-C1DTprc-.js";var tn=(t=>(t.C="C",t.X="X",t.Z="Z",t.Y="Y",t.A="A",t.G="G",t.L="L",t.F="F",t.D="D",t.B="B",t.P="P",t.O="O",t.R="R",t.T="T",t.MINUS="-",t.EQUAL="=",t.DIGIT_0="0",t.DELETE="DELETE",t.UP="ARROWUP",t.DOWN="ARROWDOWN",t.LEFT="ARROWLEFT",t.RIGHT="ARROWRIGHT",t.ENTER="ENTER",t.SPACE=" ",t.TAB="TAB",t.BACKSPACE="BACKSPACE",t.ESC="ESCAPE",t.PAGEUP="PAGEUP",t.PAGEDOWN="PAGEDOWN",t.F5="F5",t))(tn||{});const pO=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + V"},{label:"粘贴为纯文本",value:"Ctrl + Shift + V"},{label:"快速复制粘贴",value:"Ctrl + D"},{label:"全选",value:"Ctrl + A"},{label:"撤销",value:"Ctrl + Z"},{label:"恢复",value:"Ctrl + Y"},{label:"删除",value:"Delete / Backspace"},{label:"多选",value:"按住 Ctrl 或 Shift"},{label:"打开搜索替换",value:"Ctrl + F"},{label:"关闭弹窗",value:"ESC"}]},{type:"幻灯片放映",children:[{label:"从头开始放映幻灯片",value:"F5"},{label:"从当前开始放映幻灯片",value:"Shift + F5"},{label:"切换上一页",value:"↑ / ← / PgUp"},{label:"切换下一页",value:"↓ / → / PgDown"},{label:"切换下一页",value:"Enter / Space"},{label:"退出放映",value:"ESC"}]},{type:"幻灯片编辑",children:[{label:"新建幻灯片",value:"Enter"},{label:"移动画布",value:"Space + 鼠标拖拽"},{label:"缩放画布",value:"Ctrl + 鼠标滚轮"},{label:"放大画布",value:"Ctrl + ="},{label:"缩小画布",value:"Ctrl + -"},{label:"使画布适应当前屏幕",value:"Ctrl + 0"},{label:"上一页(未选中元素)",value:"↑"},{label:"下一页(未选中元素)",value:"↓"},{label:"上一页",value:"鼠标上滚 / PgUp"},{label:"下一页",value:"鼠标下滚 / PgDown"},{label:"快速创建文本",value:"双击空白处 / T"},{label:"快速创建矩形",value:"R"},{label:"快速创建圆形",value:"O"},{label:"快速创建线条",value:"L"},{label:"退出绘制状态",value:"鼠标右键"}]},{type:"元素操作",children:[{label:"移动",value:"↑ / ← / ↓ / →"},{label:"锁定",value:"Ctrl + L"},{label:"组合",value:"Ctrl + G"},{label:"取消组合",value:"Ctrl + Shift + G"},{label:"置顶层",value:"Alt + F"},{label:"置底层",value:"Alt + B"},{label:"锁定宽高比例",value:"按住 Ctrl 或 Shift"},{label:"创建水平 / 垂直线条",value:"按住 Ctrl 或 Shift"},{label:"切换焦点元素",value:"Tab"},{label:"确认图片裁剪",value:"Enter"},{label:"完成自定义形状绘制",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"移动焦点单元格",value:"↑ / ← / ↓ / →"},{label:"在上方插入一行",value:"Ctrl + ↑"},{label:"在下方插入一行",value:"Ctrl + ↓"},{label:"在左侧插入一列",value:"Ctrl + ←"},{label:"在右侧插入一列",value:"Ctrl + →"}]},{type:"图表数据编辑",children:[{label:"聚焦到下一行",value:"Enter"}]},{type:"文本编辑",children:[{label:"加粗",value:"Ctrl + B"},{label:"斜体",value:"Ctrl + I"},{label:"下划线",value:"Ctrl + U"},{label:"行内代码",value:"Ctrl + E"},{label:"上角标",value:"Ctrl + ;"},{label:"下角标",value:"Ctrl + '"},{label:"选中段落",value:"ESC"}]}],uf=t=>{const{left:e,top:r,width:n,height:i,rotate:a=0}=t,o=Math.sqrt(Math.pow(n,2)+Math.pow(i,2))/2,s=Math.atan(i/n)*180/Math.PI,l=(180-a-s)*Math.PI/180,u=(s-a)*Math.PI/180,f=e+n/2,c=r+i/2,h=[f+o*Math.cos(l),f+o*Math.cos(u),f-o*Math.cos(l),f-o*Math.cos(u)],d=[c-o*Math.sin(l),c-o*Math.sin(u),c+o*Math.sin(l),c+o*Math.sin(u)];return{xRange:[Math.min(...h),Math.max(...h)],yRange:[Math.min(...d),Math.max(...d)]}},gO=t=>{const{xRange:e,yRange:r}=uf({left:t.left,top:t.top,width:t.width,height:t.height,rotate:0}),{xRange:n,yRange:i}=uf({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});return{offsetX:n[0]-e[0],offsetY:i[0]-r[0]}},By=t=>{let e,r,n,i;if(t.type==="line")e=t.left,r=t.left+Math.max(t.start[0],t.end[0]),n=t.top,i=t.top+Math.max(t.start[1],t.end[1]);else if("rotate"in t&&t.rotate){const{left:a,top:o,width:s,height:l,rotate:u}=t,{xRange:f,yRange:c}=uf({left:a,top:o,width:s,height:l,rotate:u});e=f[0],r=f[1],n=c[0],i=c[1]}else e=t.left,r=t.left+t.width,n=t.top,i=t.top+t.height;return{minX:e,maxX:r,minY:n,maxY:i}},yO=t=>{const e=[],r=[],n=[],i=[];t.forEach(u=>{const{minX:f,maxX:c,minY:h,maxY:d}=By(u);e.push(f),r.push(h),n.push(c),i.push(d)});const a=Math.min(...e),o=Math.max(...n),s=Math.min(...r),l=Math.max(...i);return{minX:a,maxX:o,minY:s,maxY:l}},mO=t=>{const e=[];return t.forEach(r=>{const n=e.findIndex(i=>i.value===r.value);if(n===-1)e.push(r);else{const i=e[n],a=Math.min(i.range[0],r.range[0]),o=Math.max(i.range[1],r.range[1]),s=[a,o],l={value:r.value,range:s};e[n]=l}}),e},_O=t=>{const e={};for(const r of t)e[r.id]=of(10);return e},SO=t=>{const e={},r={};for(const n of t){const i=n.groupId;i&&!e[i]&&(e[i]=of(10)),r[n.id]=of(10)}return{groupIdMap:e,elIdMap:r}},OS=t=>{const e=sf(t);return[e.setAlpha(.3).toRgbString(),e.setAlpha(.1).toRgbString()]},NS=t=>{const e=t.start.join(","),r=t.end.join(",");if(t.broken){const n=t.broken.join(",");return`M${e} L${n} L${r}`}else if(t.broken2){const{minX:n,maxX:i,minY:a,maxY:o}=By(t);return i-n>=o-a?`M${e} L${t.broken2[0]},${t.start[1]} L${t.broken2[0]},${t.end[1]} ${r}`:`M${e} L${t.start[0]},${t.broken2[1]} L${t.end[0]},${t.broken2[1]} ${r}`}else if(t.curve){const n=t.curve.join(",");return`M${e} Q${n} ${r}`}else if(t.cubic){const[n,i]=t.cubic,a=n.join(","),o=i.join(",");return`M${e} C${a} ${o} ${r}`}return`M${e} L${r}`},bO=(t,e)=>{const r=t.getBoundingClientRect(),n=e.getBoundingClientRect();return r.top>=n.top&&r.bottom<=n.bottom},FS=["id"],$S={class:"icons"},zS={class:"content"},US={key:0,class:"title"},VS={class:"description"},HS={key:0,class:"control"},GS=Ue({__name:"Message",props:{id:{},message:{},type:{default:"success"},title:{default:""},duration:{default:3e3},closable:{type:Boolean,default:!1}},emits:["close","destroy"],setup(t,{expose:e,emit:r}){const{IconAttention:n,IconCheckOne:i,IconCloseOne:a,IconInfo:o,IconCloseSmall:s}=_S,l=t,u=r,f=fe(!0),c=fe(null),h=()=>{l.duration<=0||(c.value=setTimeout(v,l.duration))},d=()=>{c.value&&clearTimeout(c.value)},v=()=>f.value=!1;return yS(()=>{d()}),ir(()=>{h()}),e({close:v}),(p,g)=>(te(),He(mS,{name:"message-fade",appear:"",mode:"in-out",onBeforeLeave:g[3]||(g[3]=y=>u("close")),onAfterLeave:g[4]||(g[4]=y=>u("destroy"))},{default:mn(()=>[f.value?(te(),de("div",{key:0,class:"message",id:p.id},[j("div",{class:"message-container",onMouseenter:g[1]||(g[1]=y=>d()),onMouseleave:g[2]||(g[2]=y=>h())},[j("div",$S,[p.type==="warning"?(te(),He(oe(n),{key:0,theme:"filled",size:"18",fill:"#faad14"})):Ge("",!0),p.type==="success"?(te(),He(oe(i),{key:1,theme:"filled",size:"18",fill:"#52c41a"})):Ge("",!0),p.type==="error"?(te(),He(oe(a),{key:2,theme:"filled",size:"18",fill:"#ff4d4f"})):Ge("",!0),p.type==="info"?(te(),He(oe(o),{key:3,theme:"filled",size:"18",fill:"#1677ff"})):Ge("",!0)]),j("div",zS,[p.title?(te(),de("div",US,Nt(p.title),1)):Ge("",!0),j("div",VS,Nt(p.message),1)]),p.closable?(te(),de("div",HS,[j("span",{class:"close-btn",onClick:g[0]||(g[0]=y=>v())},[ze(oe(s))])])):Ge("",!0)],32)],8,FS)):Ge("",!0)]),_:1}))}}),WS=Ke(GS,[["__scopeId","data-v-bfa2994d"]]),cf=[];let Yr=null,jS=0;const qS={duration:3e3},yr=t=>{const e="message-"+jS++,r={...qS,...t,id:e};Yr||(Yr=document.createElement("div"),Yr.className="message-wrap",Yr.style.cssText=` width: 100%; position: fixed; top: 0; left: 0; z-index: 6000; pointer-events: none; display: flex; flex-direction: column; box-sizing: border-box; padding: 15px; background-color: rgba(255, 255, 255, 0); transition: all 1s ease-in-out; align-items: center; `,document.body.appendChild(Yr));const n=ze(WS,r,null),i=document.createElement("div");n.appContext=t.ctx||yr._context||null,n.props.onClose=t.onClose,n.props.onDestroy=()=>{Yr&&Yr.childNodes.length<=1&&(Yr.remove(),Yr=null),Fd(null,i)},Fd(n,i),Yr.appendChild(i.firstElementChild);const a={id:e,close:()=>{var o,s;return(s=(o=n==null?void 0:n.component)==null?void 0:o.exposed)==null?void 0:s.close()}};return cf.push(a),a};yr.success=(t,e)=>yr({...e,type:"success",message:t});yr.info=(t,e)=>yr({...e,type:"info",message:t});yr.warning=(t,e)=>yr({...e,type:"warning",message:t});yr.error=(t,e)=>yr({...e,type:"error",message:t});yr.closeAll=function(){for(let t=cf.length-1;t>=0;t--)cf[t].close()};const XS=t=>{const r=t.replace(/[\n\r]+/g,"
").split("
");let n="";for(const i of r)i&&(n+=`
${i}
`);return n},us=(t,e)=>lf.padStart(""+t,e,"0"),wO=t=>/^(https?:\/\/)([\w-]+\.)+[\w-]{2,}(\/[\w-./?%&=]*)?$/i.test(t);var KS=(t=>(t.ROUND_RECT="roundRect",t.ROUND_RECT_DIAGONAL="roundRectDiagonal",t.ROUND_RECT_SINGLE="roundRectSingle",t.ROUND_RECT_SAMESIDE="roundRectSameSide",t.CUT_RECT_DIAGONAL="cutRectDiagonal",t.CUT_RECT_SINGLE="cutRectSingle",t.CUT_RECT_SAMESIDE="cutRectSameSide",t.CUT_ROUND_RECT="cutRoundRect",t.MESSAGE="message",t.ROUND_MESSAGE="roundMessage",t.L="L",t.RING_RECT="ringRect",t.PLUS="plus",t.TRIANGLE="triangle",t.PARALLELOGRAM_LEFT="parallelogramLeft",t.PARALLELOGRAM_RIGHT="parallelogramRight",t.TRAPEZOID="trapezoid",t.BULLET="bullet",t.INDICATOR="indicator",t))(KS||{}),Ot=(t=>(t.TEXT="text",t.IMAGE="image",t.SHAPE="shape",t.LINE="line",t.CHART="chart",t.TABLE="table",t.LATEX="latex",t.ELF="elf",t))(Ot||{}),Fi=(t=>(t.VIDEO="elf-video",t.AUDIO="elf-audio",t.SING_PLAY="elf-sing-play",t))(Fi||{});const wn=SS({hideFullScreen:!1,fromType:"TEACHER",lessonCoursewareKnowledgeId:"",instrumentId:""});function YS(){const t=Ly.currentRoute.value.query;wn.hideFullScreen=!!t.hideFullScreen,t.fromType&&(wn.fromType=t.fromType),t.lessonCoursewareKnowledgeId&&(wn.lessonCoursewareKnowledgeId=t.lessonCoursewareKnowledgeId),t.instrumentId&&(wn.instrumentId=t.instrumentId),console.log(wn,"携带参数")}const ZS=(t,e)=>Gi.axioseRquest({method:"post",url:"/edu-app/teacherChapterKnowledgeMaterial/detail",data:{id:t,fromType:e}}),QS=t=>Gi.axioseRquest({method:"post",url:"/edu-app/teacherChapterKnowledgeMaterial/savePptJson",data:t}),JS=t=>Gi.axioseRquest({method:"post",url:"/edu-app/chapterKnowledgeMaterial/update",data:t}),CO=(t,e)=>Gi.axioseRquest({signal:e.signal,method:"post",url:"/edu-app/material/queryPage",data:t}),TO=()=>Gi.axioseRquest({method:"post",url:"/edu-app/subject/list",data:{delFlag:0,page:1,rows:999}}),xO=()=>Gi.axioseRquest({method:"get",url:"/edu-app/musicTag/tree"}),IO=t=>Gi.axioseRquest({method:"post",url:"/edu-app/material/favorite",data:t});function eb(t){return new Promise((e,r)=>{bS.get(t).then(n=>{n.status===200&&typeof n.data=="object"?e({code:200,data:n.data}):e({code:500,data:{}})}).catch(()=>{e({code:500,data:{}})})})}function tb(t){const e=kt(),{width:r,theme:n,slides:i}=t;e.updateSlideIndex(0),e.setViewportSize(r||1920),e.setViewportRatio(n.viewportRatio),e.setTheme(n),e.setSlides(i.length?i:wS)}function rb(){const t=kt(),{slides:e,theme:r,viewportRatio:n,viewportSize:i,title:a}=t,o={width:i,height:i*n,slides:e,theme:Object.assign(r,{viewportRatio:n})};return{blob:new Blob([JSON.stringify(o)]),title:a}}var Oy={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(CS,function(){return function(r){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return r[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(a,o,s){i.o(a,o)||Object.defineProperty(a,o,{enumerable:!0,get:s})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,o){if(o&1&&(a=i(a)),o&8||o&4&&typeof a=="object"&&a&&a.__esModule)return a;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:a}),o&2&&typeof a!="string")for(var l in a)i.d(s,l,(function(u){return a[u]}).bind(null,l));return s},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="/dist/",i(i.s="./index.js")}({"./index.js":function(r,n,i){var a=i("./src/cos.js");r.exports=a},"./lib/base64.js":function(r,n){var i=function(a){a=a||{};var o=a.Base64,s="2.1.9",l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=function(I){for(var A={},P=0,O=I.length;P>>6)+f(128|P&63):f(224|P>>>12&15)+f(128|P>>>6&63)+f(128|P&63)}else{var P=65536+(A.charCodeAt(0)-55296)*1024+(A.charCodeAt(1)-56320);return f(240|P>>>18&7)+f(128|P>>>12&63)+f(128|P>>>6&63)+f(128|P&63)}},h=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(A){return A.replace(h,c)},v=function(A){var P=[0,2,1][A.length%3],O=A.charCodeAt(0)<<16|(A.length>1?A.charCodeAt(1):0)<<8|(A.length>2?A.charCodeAt(2):0),E=[l.charAt(O>>>18),l.charAt(O>>>12&63),P>=2?"=":l.charAt(O>>>6&63),P>=1?"=":l.charAt(O&63)];return E.join("")},p=a.btoa?function(I){return a.btoa(I)}:function(I){return I.replace(/[\s\S]{1,3}/g,v)},g=function(I){return p(d(I))},y=function(A,P){return P?g(String(A)).replace(/[+\/]/g,function(O){return O=="+"?"-":"_"}).replace(/=/g,""):g(String(A))},m=function(A){return y(A,!0)},w=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),k=function(A){switch(A.length){case 4:var P=(7&A.charCodeAt(0))<<18|(63&A.charCodeAt(1))<<12|(63&A.charCodeAt(2))<<6|63&A.charCodeAt(3),O=P-65536;return f((O>>>10)+55296)+f((O&1023)+56320);case 3:return f((15&A.charCodeAt(0))<<12|(63&A.charCodeAt(1))<<6|63&A.charCodeAt(2));default:return f((31&A.charCodeAt(0))<<6|63&A.charCodeAt(1))}},R=function(A){return A.replace(w,k)},C=function(A){var P=A.length,O=P%4,E=(P>0?u[A.charAt(0)]<<18:0)|(P>1?u[A.charAt(1)]<<12:0)|(P>2?u[A.charAt(2)]<<6:0)|(P>3?u[A.charAt(3)]:0),N=[f(E>>>16),f(E>>>8&255),f(E&255)];return N.length-=[0,0,2,1][O],N.join("")},x=a.atob?function(I){return a.atob(I)}:function(I){return I.replace(/[\s\S]{1,4}/g,C)},M=function(I){return R(x(I))},b=function(A){return M(String(A).replace(/[-_]/g,function(P){return P=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},T=function(){var A=a.Base64;return a.Base64=o,A},_={VERSION:s,atob:x,btoa:p,fromBase64:b,toBase64:y,utob:d,encode:y,encodeURI:m,btou:R,decode:b,noConflict:T};return _}();r.exports=i},"./lib/crypto.js":function(r,n,i){(function(a){var o=i("./node_modules/@babel/runtime/helpers/typeof.js"),s=s||function(l,u){var f={},c=f.lib={},h=function(){},d=c.Base={extend:function(C){h.prototype=this;var x=new h;return C&&x.mixIn(C),x.hasOwnProperty("init")||(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var C=this.extend();return C.init.apply(C,arguments),C},init:function(){},mixIn:function(C){for(var x in C)C.hasOwnProperty(x)&&(this[x]=C[x]);C.hasOwnProperty("toString")&&(this.toString=C.toString)},clone:function(){return this.init.prototype.extend(this)}},v=c.WordArray=d.extend({init:function(C,x){C=this.words=C||[],this.sigBytes=x!=u?x:4*C.length},toString:function(C){return(C||g).stringify(this)},concat:function(C){var x=this.words,M=C.words,b=this.sigBytes;if(C=C.sigBytes,this.clamp(),b%4)for(var T=0;T>>2]|=(M[T>>>2]>>>24-8*(T%4)&255)<<24-8*((b+T)%4);else if(65535>>2]=M[T>>>2];else x.push.apply(x,M);return this.sigBytes+=C,this},clamp:function(){var C=this.words,x=this.sigBytes;C[x>>>2]&=4294967295<<32-8*(x%4),C.length=l.ceil(x/4)},clone:function(){var C=d.clone.call(this);return C.words=this.words.slice(0),C},random:function(C){for(var x=[],M=0;M>>2]>>>24-8*(b%4)&255;M.push((T>>>4).toString(16)),M.push((T&15).toString(16))}return M.join("")},parse:function(C){for(var x=C.length,M=[],b=0;b>>3]|=parseInt(C.substr(b,2),16)<<24-4*(b%8);return new v.init(M,x/2)}},y=p.Latin1={stringify:function(C){var x=C.words;C=C.sigBytes;for(var M=[],b=0;b>>2]>>>24-8*(b%4)&255));return M.join("")},parse:function(C){for(var x=C.length,M=[],b=0;b>>2]|=(C.charCodeAt(b)&255)<<24-8*(b%4);return new v.init(M,x)}},m=p.Utf8={stringify:function(C){try{return decodeURIComponent(escape(y.stringify(C)))}catch{throw Error("Malformed UTF-8 data")}},parse:function(C){return y.parse(unescape(encodeURIComponent(C)))}},w=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(C){typeof C=="string"&&(C=m.parse(C)),this._data.concat(C),this._nDataBytes+=C.sigBytes},_process:function(C){var x=this._data,M=x.words,b=x.sigBytes,T=this.blockSize,_=b/(4*T),_=C?l.ceil(_):l.max((_|0)-this._minBufferSize,0);if(C=_*T,b=l.min(4*C,b),C){for(var I=0;IC;C++){if(16>C)c[C]=v[p+C]|0;else{var x=c[C-3]^c[C-8]^c[C-14]^c[C-16];c[C]=x<<1|x>>>31}x=(y<<5|y>>>27)+R+c[C],x=20>C?x+((m&w|~m&k)+1518500249):40>C?x+((m^w^k)+1859775393):60>C?x+((m&w|m&k|w&k)-1894007588):x+((m^w^k)-899497514),R=k,k=w,w=m<<30|m>>>2,m=y,y=x}g[0]=g[0]+y|0,g[1]=g[1]+m|0,g[2]=g[2]+w|0,g[3]=g[3]+k|0,g[4]=g[4]+R|0},_doFinalize:function(){var v=this._data,p=v.words,g=8*this._nDataBytes,y=8*v.sigBytes;return p[y>>>5]|=128<<24-y%32,p[(y+64>>>9<<4)+14]=Math.floor(g/4294967296),p[(y+64>>>9<<4)+15]=g,v.sigBytes=4*p.length,this._process(),this._hash},clone:function(){var v=f.clone.call(this);return v._hash=this._hash.clone(),v}});l.SHA1=f._createHelper(h),l.HmacSHA1=f._createHmacHelper(h)})(),function(){var l=s,u=l.enc.Utf8;l.algo.HMAC=l.lib.Base.extend({init:function(c,h){c=this._hasher=new c.init,typeof h=="string"&&(h=u.parse(h));var d=c.blockSize,v=4*d;h.sigBytes>v&&(h=c.finalize(h)),h.clamp();for(var p=this._oKey=h.clone(),g=this._iKey=h.clone(),y=p.words,m=g.words,w=0;w>>2]>>>24-m%4*8&255,k=v[m+1>>>2]>>>24-(m+1)%4*8&255,R=v[m+2>>>2]>>>24-(m+2)%4*8&255,C=w<<16|k<<8|R,x=0;x<4&&m+x*.75>>6*(3-x)&63));var M=g.charAt(64);if(M)for(;y.length%4;)y.push(M);return y.join("")},parse:function(d){var v=d.length,p=this._map,g=p.charAt(64);if(g){var y=d.indexOf(g);y!=-1&&(v=y)}for(var m=[],w=0,k=0;k>>6-k%4*2;m[w>>>2]|=(R|C)<<24-w%4*8,w++}return f.create(m,w)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),o(a)==="object"?a.exports=s:window.CryptoJS=s}).call(this,i("./node_modules/webpack/buildin/module.js")(r))},"./lib/md5.js":function(r,n,i){(function(a){var o,s=i("./node_modules/@babel/runtime/helpers/typeof.js");(function(){var l=(typeof window>"u"?"undefined":s(window))==="object",u=l?window:{};u.JS_MD5_NO_WINDOW&&(l=!1);var f=!l&&(typeof self>"u"?"undefined":s(self))==="object";f&&(u=self);var c=!u.JS_MD5_NO_COMMON_JS&&s(a)==="object"&&a.exports,h=i("./node_modules/webpack/buildin/amd-options.js"),d=!u.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",v="0123456789abcdef".split(""),p=[128,32768,8388608,-2147483648],g=[0,8,16,24],y=["hex","array","digest","buffer","arrayBuffer","base64"],m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),w=[],k;if(d){var R=new ArrayBuffer(68);k=new Uint8Array(R),w=new Uint32Array(R)}(u.JS_MD5_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(T){return Object.prototype.toString.call(T)==="[object Array]"}),d&&(u.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(T){return s(T)==="object"&&T.buffer&&T.buffer.constructor===ArrayBuffer});var C=function(_){return function(I,A){return new M(!0).update(I,A)[_]()}},x=function(){var _=C("hex");_.getCtx=_.create=function(){return new M},_.update=function(P){return _.create().update(P)};for(var I=0;I>6,N[P++]=128|I&63):I<55296||I>=57344?(N[P++]=224|I>>12,N[P++]=128|I>>6&63,N[P++]=128|I&63):(I=65536+((I&1023)<<10|T.charCodeAt(++A)&1023),N[P++]=240|I>>18,N[P++]=128|I>>12&63,N[P++]=128|I>>6&63,N[P++]=128|I&63);else for(P=this.start;A>2]|=I<>2]|=(192|I>>6)<>2]|=(128|I&63)<=57344?(E[P>>2]|=(224|I>>12)<>2]|=(128|I>>6&63)<>2]|=(128|I&63)<>2]|=(240|I>>18)<>2]|=(128|I>>12&63)<>2]|=(128|I>>6&63)<>2]|=(128|I&63)<=64?(this.start=P-64,this.hash(),this.hashed=!0):this.start=P}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},M.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var T=this.blocks,_=this.lastByteIndex;T[_>>2]|=p[_&3],_>=56&&(this.hashed||this.hash(),T[0]=T[16],T[16]=T[1]=T[2]=T[3]=T[4]=T[5]=T[6]=T[7]=T[8]=T[9]=T[10]=T[11]=T[12]=T[13]=T[14]=T[15]=0),T[14]=this.bytes<<3,T[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},M.prototype.hash=function(){var T,_,I,A,P,O,E=this.blocks;this.first?(T=E[0]-680876937,T=(T<<7|T>>>25)-271733879<<0,A=(-1732584194^T&2004318071)+E[1]-117830708,A=(A<<12|A>>>20)+T<<0,I=(-271733879^A&(T^-271733879))+E[2]-1126478375,I=(I<<17|I>>>15)+A<<0,_=(T^I&(A^T))+E[3]-1316259209,_=(_<<22|_>>>10)+I<<0):(T=this.h0,_=this.h1,I=this.h2,A=this.h3,T+=(A^_&(I^A))+E[0]-680876936,T=(T<<7|T>>>25)+_<<0,A+=(I^T&(_^I))+E[1]-389564586,A=(A<<12|A>>>20)+T<<0,I+=(_^A&(T^_))+E[2]+606105819,I=(I<<17|I>>>15)+A<<0,_+=(T^I&(A^T))+E[3]-1044525330,_=(_<<22|_>>>10)+I<<0),T+=(A^_&(I^A))+E[4]-176418897,T=(T<<7|T>>>25)+_<<0,A+=(I^T&(_^I))+E[5]+1200080426,A=(A<<12|A>>>20)+T<<0,I+=(_^A&(T^_))+E[6]-1473231341,I=(I<<17|I>>>15)+A<<0,_+=(T^I&(A^T))+E[7]-45705983,_=(_<<22|_>>>10)+I<<0,T+=(A^_&(I^A))+E[8]+1770035416,T=(T<<7|T>>>25)+_<<0,A+=(I^T&(_^I))+E[9]-1958414417,A=(A<<12|A>>>20)+T<<0,I+=(_^A&(T^_))+E[10]-42063,I=(I<<17|I>>>15)+A<<0,_+=(T^I&(A^T))+E[11]-1990404162,_=(_<<22|_>>>10)+I<<0,T+=(A^_&(I^A))+E[12]+1804603682,T=(T<<7|T>>>25)+_<<0,A+=(I^T&(_^I))+E[13]-40341101,A=(A<<12|A>>>20)+T<<0,I+=(_^A&(T^_))+E[14]-1502002290,I=(I<<17|I>>>15)+A<<0,_+=(T^I&(A^T))+E[15]+1236535329,_=(_<<22|_>>>10)+I<<0,T+=(I^A&(_^I))+E[1]-165796510,T=(T<<5|T>>>27)+_<<0,A+=(_^I&(T^_))+E[6]-1069501632,A=(A<<9|A>>>23)+T<<0,I+=(T^_&(A^T))+E[11]+643717713,I=(I<<14|I>>>18)+A<<0,_+=(A^T&(I^A))+E[0]-373897302,_=(_<<20|_>>>12)+I<<0,T+=(I^A&(_^I))+E[5]-701558691,T=(T<<5|T>>>27)+_<<0,A+=(_^I&(T^_))+E[10]+38016083,A=(A<<9|A>>>23)+T<<0,I+=(T^_&(A^T))+E[15]-660478335,I=(I<<14|I>>>18)+A<<0,_+=(A^T&(I^A))+E[4]-405537848,_=(_<<20|_>>>12)+I<<0,T+=(I^A&(_^I))+E[9]+568446438,T=(T<<5|T>>>27)+_<<0,A+=(_^I&(T^_))+E[14]-1019803690,A=(A<<9|A>>>23)+T<<0,I+=(T^_&(A^T))+E[3]-187363961,I=(I<<14|I>>>18)+A<<0,_+=(A^T&(I^A))+E[8]+1163531501,_=(_<<20|_>>>12)+I<<0,T+=(I^A&(_^I))+E[13]-1444681467,T=(T<<5|T>>>27)+_<<0,A+=(_^I&(T^_))+E[2]-51403784,A=(A<<9|A>>>23)+T<<0,I+=(T^_&(A^T))+E[7]+1735328473,I=(I<<14|I>>>18)+A<<0,_+=(A^T&(I^A))+E[12]-1926607734,_=(_<<20|_>>>12)+I<<0,P=_^I,T+=(P^A)+E[5]-378558,T=(T<<4|T>>>28)+_<<0,A+=(P^T)+E[8]-2022574463,A=(A<<11|A>>>21)+T<<0,O=A^T,I+=(O^_)+E[11]+1839030562,I=(I<<16|I>>>16)+A<<0,_+=(O^I)+E[14]-35309556,_=(_<<23|_>>>9)+I<<0,P=_^I,T+=(P^A)+E[1]-1530992060,T=(T<<4|T>>>28)+_<<0,A+=(P^T)+E[4]+1272893353,A=(A<<11|A>>>21)+T<<0,O=A^T,I+=(O^_)+E[7]-155497632,I=(I<<16|I>>>16)+A<<0,_+=(O^I)+E[10]-1094730640,_=(_<<23|_>>>9)+I<<0,P=_^I,T+=(P^A)+E[13]+681279174,T=(T<<4|T>>>28)+_<<0,A+=(P^T)+E[0]-358537222,A=(A<<11|A>>>21)+T<<0,O=A^T,I+=(O^_)+E[3]-722521979,I=(I<<16|I>>>16)+A<<0,_+=(O^I)+E[6]+76029189,_=(_<<23|_>>>9)+I<<0,P=_^I,T+=(P^A)+E[9]-640364487,T=(T<<4|T>>>28)+_<<0,A+=(P^T)+E[12]-421815835,A=(A<<11|A>>>21)+T<<0,O=A^T,I+=(O^_)+E[15]+530742520,I=(I<<16|I>>>16)+A<<0,_+=(O^I)+E[2]-995338651,_=(_<<23|_>>>9)+I<<0,T+=(I^(_|~A))+E[0]-198630844,T=(T<<6|T>>>26)+_<<0,A+=(_^(T|~I))+E[7]+1126891415,A=(A<<10|A>>>22)+T<<0,I+=(T^(A|~_))+E[14]-1416354905,I=(I<<15|I>>>17)+A<<0,_+=(A^(I|~T))+E[5]-57434055,_=(_<<21|_>>>11)+I<<0,T+=(I^(_|~A))+E[12]+1700485571,T=(T<<6|T>>>26)+_<<0,A+=(_^(T|~I))+E[3]-1894986606,A=(A<<10|A>>>22)+T<<0,I+=(T^(A|~_))+E[10]-1051523,I=(I<<15|I>>>17)+A<<0,_+=(A^(I|~T))+E[1]-2054922799,_=(_<<21|_>>>11)+I<<0,T+=(I^(_|~A))+E[8]+1873313359,T=(T<<6|T>>>26)+_<<0,A+=(_^(T|~I))+E[15]-30611744,A=(A<<10|A>>>22)+T<<0,I+=(T^(A|~_))+E[6]-1560198380,I=(I<<15|I>>>17)+A<<0,_+=(A^(I|~T))+E[13]+1309151649,_=(_<<21|_>>>11)+I<<0,T+=(I^(_|~A))+E[4]-145523070,T=(T<<6|T>>>26)+_<<0,A+=(_^(T|~I))+E[11]-1120210379,A=(A<<10|A>>>22)+T<<0,I+=(T^(A|~_))+E[2]+718787259,I=(I<<15|I>>>17)+A<<0,_+=(A^(I|~T))+E[9]-343485551,_=(_<<21|_>>>11)+I<<0,this.first?(this.h0=T+1732584193<<0,this.h1=_-271733879<<0,this.h2=I-1732584194<<0,this.h3=A+271733878<<0,this.first=!1):(this.h0=this.h0+T<<0,this.h1=this.h1+_<<0,this.h2=this.h2+I<<0,this.h3=this.h3+A<<0)},M.prototype.hex=function(){this.finalize();var T=this.h0,_=this.h1,I=this.h2,A=this.h3;return v[T>>4&15]+v[T&15]+v[T>>12&15]+v[T>>8&15]+v[T>>20&15]+v[T>>16&15]+v[T>>28&15]+v[T>>24&15]+v[_>>4&15]+v[_&15]+v[_>>12&15]+v[_>>8&15]+v[_>>20&15]+v[_>>16&15]+v[_>>28&15]+v[_>>24&15]+v[I>>4&15]+v[I&15]+v[I>>12&15]+v[I>>8&15]+v[I>>20&15]+v[I>>16&15]+v[I>>28&15]+v[I>>24&15]+v[A>>4&15]+v[A&15]+v[A>>12&15]+v[A>>8&15]+v[A>>20&15]+v[A>>16&15]+v[A>>28&15]+v[A>>24&15]},M.prototype.toString=M.prototype.hex,M.prototype.digest=function(T){if(T==="hex")return this.hex();this.finalize();var _=this.h0,I=this.h1,A=this.h2,P=this.h3,O=[_&255,_>>8&255,_>>16&255,_>>24&255,I&255,I>>8&255,I>>16&255,I>>24&255,A&255,A>>8&255,A>>16&255,A>>24&255,P&255,P>>8&255,P>>16&255,P>>24&255];return O},M.prototype.array=M.prototype.digest,M.prototype.arrayBuffer=function(){this.finalize();var T=new ArrayBuffer(16),_=new Uint32Array(T);return _[0]=this.h0,_[1]=this.h1,_[2]=this.h2,_[3]=this.h3,T},M.prototype.buffer=M.prototype.arrayBuffer,M.prototype.base64=function(){for(var T,_,I,A="",P=this.array(),O=0;O<15;)T=P[O++],_=P[O++],I=P[O++],A+=m[T>>>2]+m[(T<<4|_>>>4)&63]+m[(_<<2|I>>>6)&63]+m[I&63];return T=P[O],A+=m[T>>>2]+m[T<<4&63]+"==",A};var b=x();c?a.exports=b:(u.md5=b,h&&(o=(function(){return b}).call(b,i,b,a),o!==void 0&&(a.exports=o)))})()}).call(this,i("./node_modules/webpack/buildin/module.js")(r))},"./lib/request.js":function(r,n,i){var a=i("./node_modules/@babel/runtime/helpers/typeof.js"),o=function(h){switch(a(h)){case"string":return h;case"boolean":return h?"true":"false";case"number":return isFinite(h)?h:"";default:return""}},s=function(h,d,v,p){return d=d||"&",v=v||"=",h===null&&(h=void 0),a(h)==="object"?Object.keys(h).map(function(g){var y=encodeURIComponent(o(g))+v;return Array.isArray(h[g])?h[g].map(function(m){return y+encodeURIComponent(o(m))}).join(d):y+encodeURIComponent(o(h[g]))}).filter(Boolean).join(d):""},l=function(h,d,v){var p={},g=d.getAllResponseHeaders();return g&&g.length>0&&g.trim().split(` `).forEach(function(y){if(y){var m=y.indexOf(":"),w=y.substr(0,m).trim().toLowerCase(),k=y.substr(m+1).trim();p[w]=k}}),{error:h,statusCode:d.status,statusMessage:d.statusText,headers:p,body:v}},u=function(h,d){return!d&&d==="text"?h.responseText:h.response},f=function(h,d){var v=(h.method||"GET").toUpperCase(),p=h.url;if(h.qs){var g=s(h.qs);g&&(p+=(p.indexOf("?")===-1?"?":"&")+g)}var y=new XMLHttpRequest;if(y.open(v,p,!0),y.responseType=h.dataType||"text",h.xhrFields)for(var m in h.xhrFields)y[m]=h.xhrFields[m];var w=h.headers;if(w)for(var k in w)w.hasOwnProperty(k)&&k.toLowerCase()!=="content-length"&&k.toLowerCase()!=="user-agent"&&k.toLowerCase()!=="origin"&&k.toLowerCase()!=="host"&&y.setRequestHeader(k,w[k]);return h.onProgress&&y.upload&&(y.upload.onprogress=h.onProgress),h.onDownloadProgress&&(y.onprogress=h.onDownloadProgress),h.timeout&&(y.timeout=h.timeout),y.ontimeout=function(R){var C=new Error("timeout");d(l(C,y))},y.onload=function(){d(l(null,y,u(y,h.dataType)))},y.onerror=function(R){var C=u(y,h.dataType);if(C)d(l(null,y,C));else{var x=y.statusText;!x&&y.status===0&&(x=new Error("CORS blocked or network error")),d(l(x,y,C))}},y.send(h.body||""),y};r.exports=f},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(r,n){function i(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(r,n,i){var a=i("./node_modules/@babel/runtime/helpers/toPropertyKey.js");function o(l,u){for(var f=0;f"u")};n.isExist=function(c){return typeof c<"u"},n.isEmptyObject=function(c){return Object.keys(c).length===0},n.merge=function(c,h,d){if(h){const v=Object.keys(h),p=v.length;for(let g=0;g"&&C[_]!==" "&&C[_]!==" "&&C[_]!==` `&&C[_]!=="\r";_++)P+=C[_];if(P=P.trim(),P[P.length-1]==="/"&&(P=P.substring(0,P.length-1),_--),!w(P)){let N;return P.trim().length===0?N="Invalid space after '<'.":N="Tag '"+P+"' is an invalid name.",y("InvalidTag",N,k(C,_))}const O=h(C,_);if(O===!1)return y("InvalidAttr","Attributes for '"+P+"' have open quote.",k(C,_));let E=O.value;if(_=O.index,E[E.length-1]==="/"){const N=_-E.length;E=E.substring(0,E.length-1);const z=v(E,x);if(z===!0)b=!0;else return y(z.err.code,z.err.msg,k(C,N+z.err.line))}else if(A)if(O.tagClosed){if(E.trim().length>0)return y("InvalidTag","Closing tag '"+P+"' can't have attributes or invalid starting.",k(C,I));if(M.length===0)return y("InvalidTag","Closing tag '"+P+"' has not been opened.",k(C,I));{const N=M.pop();if(P!==N.tagName){let z=k(C,N.tagStartPos);return y("InvalidTag","Expected closing tag '"+N.tagName+"' (opened in line "+z.line+", col "+z.col+") instead of closing tag '"+P+"'.",k(C,I))}M.length==0&&(T=!0)}}else return y("InvalidTag","Closing tag '"+P+"' doesn't have proper closing.",k(C,_));else{const N=v(E,x);if(N!==!0)return y(N.err.code,N.err.msg,k(C,_-E.length+N.err.line));if(T===!0)return y("InvalidXml","Multiple possible root nodes found.",k(C,_));x.unpairedTags.indexOf(P)!==-1||M.push({tagName:P,tagStartPos:I}),b=!0}for(_++;_0)return y("InvalidXml","Invalid '"+JSON.stringify(M.map(_=>_.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return y("InvalidXml","Start tag expected.",1);return!0};function s(C){return C===" "||C===" "||C===` `||C==="\r"}function l(C,x){const M=x;for(;x5&&b==="xml")return y("InvalidXml","XML declaration allowed only at the start of the document.",k(C,x));if(C[x]=="?"&&C[x+1]==">"){x++;break}else continue}return x}function u(C,x){if(C.length>x+5&&C[x+1]==="-"&&C[x+2]==="-"){for(x+=3;x"){x+=2;break}}else if(C.length>x+8&&C[x+1]==="D"&&C[x+2]==="O"&&C[x+3]==="C"&&C[x+4]==="T"&&C[x+5]==="Y"&&C[x+6]==="P"&&C[x+7]==="E"){let M=1;for(x+=8;x"&&(M--,M===0))break}else if(C.length>x+9&&C[x+1]==="["&&C[x+2]==="C"&&C[x+3]==="D"&&C[x+4]==="A"&&C[x+5]==="T"&&C[x+6]==="A"&&C[x+7]==="["){for(x+=8;x"){x+=2;break}}return x}const f='"',c="'";function h(C,x){let M="",b="",T=!1;for(;x"&&b===""){T=!0;break}M+=C[x]}return b!==""?!1:{value:M,index:x,tagClosed:T}}const d=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function v(C,x){const M=a.getAllMatches(C,d),b={};for(let T=0;T","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function s(c){this.options=Object.assign({},o,c),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=f),this.processTextOrObjNode=l,this.options.format?(this.indentate=u,this.tagEndChar=`> `,this.newLine=` `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}s.prototype.build=function(c){return this.options.preserveOrder?a(c,this.options):(Array.isArray(c)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(c={[this.options.arrayNodeName]:c}),this.j2x(c,0).val)},s.prototype.j2x=function(c,h){let d="",v="";for(let p in c)if(Object.prototype.hasOwnProperty.call(c,p))if(typeof c[p]>"u")this.isAttribute(p)&&(v+="");else if(c[p]===null)this.isAttribute(p)?v+="":p[0]==="?"?v+=this.indentate(h)+"<"+p+"?"+this.tagEndChar:v+=this.indentate(h)+"<"+p+"/"+this.tagEndChar;else if(c[p]instanceof Date)v+=this.buildTextValNode(c[p],p,"",h);else if(typeof c[p]!="object"){const g=this.isAttribute(p);if(g)d+=this.buildAttrPairStr(g,""+c[p]);else if(p===this.options.textNodeName){let y=this.options.tagValueProcessor(p,""+c[p]);v+=this.replaceEntitiesValue(y)}else v+=this.buildTextValNode(c[p],p,"",h)}else if(Array.isArray(c[p])){const g=c[p].length;let y="";for(let m=0;m"u"||(w===null?p[0]==="?"?v+=this.indentate(h)+"<"+p+"?"+this.tagEndChar:v+=this.indentate(h)+"<"+p+"/"+this.tagEndChar:typeof w=="object"?this.options.oneListGroup?y+=this.j2x(w,h+1).val:y+=this.processTextOrObjNode(w,p,h):y+=this.buildTextValNode(w,p,"",h))}this.options.oneListGroup&&(y=this.buildObjectNode(y,p,"",h)),v+=y}else if(this.options.attributesGroupName&&p===this.options.attributesGroupName){const g=Object.keys(c[p]),y=g.length;for(let m=0;m"+c+p:this.options.commentPropName!==!1&&h===this.options.commentPropName&&g.length===0?this.indentate(v)+``+this.newLine:this.indentate(v)+"<"+h+d+g+this.tagEndChar+c+this.indentate(v)+p}},s.prototype.closeTag=function(c){let h="";return this.options.unpairedTags.indexOf(c)!==-1?this.options.suppressUnpairedNode||(h="/"):this.options.suppressEmptyNode?h="/":h=`>`+this.newLine;if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(v)+``+this.newLine;if(h[0]==="?")return this.indentate(v)+"<"+h+d+"?"+this.tagEndChar;{let p=this.options.tagValueProcessor(h,c);return p=this.replaceEntitiesValue(p),p===""?this.indentate(v)+"<"+h+d+this.closeTag(h)+this.tagEndChar:this.indentate(v)+"<"+h+d+">"+p+"0&&this.options.processEntities)for(let h=0;h0&&(d=i),o(c,h,"",d)}function o(c,h,d,v){let p="",g=!1;for(let y=0;y`,g=!1;continue}else if(w===h.commentPropName){p+=v+``,g=!0;continue}else if(w[0]==="?"){const b=l(m[":@"],h),T=w==="?xml"?"":v;let _=m[w][0][h.textNodeName];_=_.length!==0?" "+_:"",p+=T+`<${w}${_}${b}?>`,g=!0;continue}let R=v;R!==""&&(R+=h.indentBy);const C=l(m[":@"],h),x=v+`<${w}${C}`,M=o(m[w],h,k,R);h.unpairedTags.indexOf(w)!==-1?h.suppressUnpairedNode?p+=x+">":p+=x+"/>":(!M||M.length===0)&&h.suppressEmptyNode?p+=x+"/>":M&&M.endsWith(">")?p+=x+`>${M}${v}`:(p+=x+">",M&&v!==""&&(M.includes("/>")||M.includes("`),g=!0}return p}function s(c){const h=Object.keys(c);for(let d=0;d0&&h.processEntities)for(let d=0;d"){if(w?v[p-1]==="-"&&v[p-2]==="-"&&(w=!1,y--):y--,y===0)break}else v[p]==="["?m=!0:k+=v[p];if(y!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:g,i:p}}function s(v,p){let g="";for(;p!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(o,s,l){return o}},a=function(o){return Object.assign({},i,o)};n.buildOptions=a,n.defaultOptions=i},"./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js":function(r,n,i){const a=i("./node_modules/fast-xml-parser/src/util.js"),o=i("./node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"),s=i("./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"),l=i("./node_modules/strnum/strnum.js");class u{constructor(T){this.options=T,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(_,I)=>String.fromCharCode(Number.parseInt(I,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(_,I)=>String.fromCharCode(Number.parseInt(I,16))}},this.addExternalEntities=f,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=h,this.buildAttributesMap=v,this.isItStopNode=w,this.replaceEntitiesValue=y,this.readStopNodeData=x,this.saveTextToParentTag=m,this.addChild=g}}function f(b){const T=Object.keys(b);for(let _=0;_0)){O||(b=this.replaceEntitiesValue(b));const E=this.options.tagValueProcessor(T,b,_,A,P);return E==null?b:typeof E!=typeof b||E!==b?E:this.options.trimValues?M(b,this.options.parseTagValue,this.options.numberParseOptions):b.trim()===b?M(b,this.options.parseTagValue,this.options.numberParseOptions):b}}function h(b){if(this.options.removeNSPrefix){const T=b.split(":"),_=b.charAt(0)==="/"?"/":"";if(T[0]==="xmlns")return"";T.length===2&&(b=_+T[1])}return b}const d=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function v(b,T,_){if(!this.options.ignoreAttributes&&typeof b=="string"){const I=a.getAllMatches(b,d),A=I.length,P={};for(let O=0;O",P,"Closing Tag is not closed.");let N=b.substring(P+2,E).trim();if(this.options.removeNSPrefix){const q=N.indexOf(":");q!==-1&&(N=N.substr(q+1))}this.options.transformTagName&&(N=this.options.transformTagName(N)),_&&(I=this.saveTextToParentTag(I,_,A));const z=A.substring(A.lastIndexOf(".")+1);if(N&&this.options.unpairedTags.indexOf(N)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let U=0;z&&this.options.unpairedTags.indexOf(z)!==-1?(U=A.lastIndexOf(".",A.lastIndexOf(".")-1),this.tagsNodeStack.pop()):U=A.lastIndexOf("."),A=A.substring(0,U),_=this.tagsNodeStack.pop(),I="",P=E}else if(b[P+1]==="?"){let E=C(b,P,!1,"?>");if(!E)throw new Error("Pi Tag is not closed.");if(I=this.saveTextToParentTag(I,_,A),!(this.options.ignoreDeclaration&&E.tagName==="?xml"||this.options.ignorePiTags)){const N=new o(E.tagName);N.add(this.options.textNodeName,""),E.tagName!==E.tagExp&&E.attrExpPresent&&(N[":@"]=this.buildAttributesMap(E.tagExp,A,E.tagName)),this.addChild(_,N,A)}P=E.closeIndex+1}else if(b.substr(P+1,3)==="!--"){const E=R(b,"-->",P+4,"Comment is not closed.");if(this.options.commentPropName){const N=b.substring(P+4,E-2);I=this.saveTextToParentTag(I,_,A),_.add(this.options.commentPropName,[{[this.options.textNodeName]:N}])}P=E}else if(b.substr(P+1,2)==="!D"){const E=s(b,P);this.docTypeEntities=E.entities,P=E.i}else if(b.substr(P+1,2)==="!["){const E=R(b,"]]>",P,"CDATA is not closed.")-2,N=b.substring(P+9,E);I=this.saveTextToParentTag(I,_,A);let z=this.parseTextData(N,_.tagname,A,!0,!1,!0,!0);z==null&&(z=""),this.options.cdataPropName?_.add(this.options.cdataPropName,[{[this.options.textNodeName]:N}]):_.add(this.options.textNodeName,z),P=E+2}else{let E=C(b,P,this.options.removeNSPrefix),N=E.tagName;const z=E.rawTagName;let U=E.tagExp,q=E.attrExpPresent,Y=E.closeIndex;this.options.transformTagName&&(N=this.options.transformTagName(N)),_&&I&&_.tagname!=="!xml"&&(I=this.saveTextToParentTag(I,_,A,!1));const Z=_;if(Z&&this.options.unpairedTags.indexOf(Z.tagname)!==-1&&(_=this.tagsNodeStack.pop(),A=A.substring(0,A.lastIndexOf("."))),N!==T.tagname&&(A+=A?"."+N:N),this.isItStopNode(this.options.stopNodes,A,N)){let se="";if(U.length>0&&U.lastIndexOf("/")===U.length-1)N[N.length-1]==="/"?(N=N.substr(0,N.length-1),A=A.substr(0,A.length-1),U=N):U=U.substr(0,U.length-1),P=E.closeIndex;else if(this.options.unpairedTags.indexOf(N)!==-1)P=E.closeIndex;else{const J=this.readStopNodeData(b,z,Y+1);if(!J)throw new Error(`Unexpected end of ${z}`);P=J.i,se=J.tagContent}const ce=new o(N);N!==U&&q&&(ce[":@"]=this.buildAttributesMap(U,A,N)),se&&(se=this.parseTextData(se,N,A,!0,q,!0,!0)),A=A.substr(0,A.lastIndexOf(".")),ce.add(this.options.textNodeName,se),this.addChild(_,ce,A)}else{if(U.length>0&&U.lastIndexOf("/")===U.length-1){N[N.length-1]==="/"?(N=N.substr(0,N.length-1),A=A.substr(0,A.length-1),U=N):U=U.substr(0,U.length-1),this.options.transformTagName&&(N=this.options.transformTagName(N));const se=new o(N);N!==U&&q&&(se[":@"]=this.buildAttributesMap(U,A,N)),this.addChild(_,se,A),A=A.substr(0,A.lastIndexOf("."))}else{const se=new o(N);this.tagsNodeStack.push(_),N!==U&&q&&(se[":@"]=this.buildAttributesMap(U,A,N)),this.addChild(_,se,A),_=se}I="",P=Y}}else I+=b[P];return T.child};function g(b,T,_){const I=this.options.updateTag(T.tagname,_,T[":@"]);I===!1||(typeof I=="string"&&(T.tagname=I),b.addChild(T))}const y=function(b){if(this.options.processEntities){for(let T in this.docTypeEntities){const _=this.docTypeEntities[T];b=b.replace(_.regx,_.val)}for(let T in this.lastEntities){const _=this.lastEntities[T];b=b.replace(_.regex,_.val)}if(this.options.htmlEntities)for(let T in this.htmlEntities){const _=this.htmlEntities[T];b=b.replace(_.regex,_.val)}b=b.replace(this.ampEntity.regex,this.ampEntity.val)}return b};function m(b,T,_,I){return b&&(I===void 0&&(I=Object.keys(T.child).length===0),b=this.parseTextData(b,T.tagname,_,!1,T[":@"]?Object.keys(T[":@"]).length!==0:!1,I),b!==void 0&&b!==""&&T.add(this.options.textNodeName,b),b=""),b}function w(b,T,_){const I="*."+_;for(const A in b){const P=b[A];if(I===P||T===P)return!0}return!1}function k(b,T,_=">"){let I,A="";for(let P=T;P",_,`${T} is not closed`);if(b.substring(_+2,P).trim()===T&&(A--,A===0))return{tagContent:b.substring(I,_),i:P};_=P}else if(b[_+1]==="?")_=R(b,"?>",_+1,"StopNode is not closed.");else if(b.substr(_+1,3)==="!--")_=R(b,"-->",_+3,"StopNode is not closed.");else if(b.substr(_+1,2)==="![")_=R(b,"]]>",_,"StopNode is not closed.")-2;else{const P=C(b,_,">");P&&((P&&P.tagName)===T&&P.tagExp[P.tagExp.length-1]!=="/"&&A++,_=P.closeIndex)}}function M(b,T,_){if(T&&typeof b=="string"){const I=b.trim();return I==="true"?!0:I==="false"?!1:l(b,_)}else return a.isExist(b)?b:""}r.exports=u},"./node_modules/fast-xml-parser/src/xmlparser/XMLParser.js":function(r,n,i){const{buildOptions:a}=i("./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"),o=i("./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"),{prettify:s}=i("./node_modules/fast-xml-parser/src/xmlparser/node2json.js"),l=i("./node_modules/fast-xml-parser/src/validator.js");class u{constructor(c){this.externalEntities={},this.options=a(c)}parse(c,h){if(typeof c!="string")if(c.toString)c=c.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(h){h===!0&&(h={});const p=l.validate(c,h);if(p!==!0)throw Error(`${p.err.msg}:${p.err.line}:${p.err.col}`)}const d=new o(this.options);d.addExternalEntities(this.externalEntities);const v=d.parseXml(c);return this.options.preserveOrder||v===void 0?v:s(v,this.options)}addEntity(c,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(c.indexOf("&")!==-1||c.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(h==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[c]=h}}r.exports=u},"./node_modules/fast-xml-parser/src/xmlparser/node2json.js":function(r,n,i){function a(f,c){return o(f,c)}function o(f,c,h){let d;const v={};for(let p=0;p0&&(v[c.textNodeName]=d):d!==void 0&&(v[c.textNodeName]=d),v}function s(f){const c=Object.keys(f);for(let h=0;h0?this.child.push({[s.tagname]:s.child,":@":s[":@"]}):this.child.push({[s.tagname]:s.child})}}r.exports=a},"./node_modules/process/browser.js":function(r,n){var i=r.exports={},a,o;function s(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=s}catch{a=s}try{typeof clearTimeout=="function"?o=clearTimeout:o=l}catch{o=l}})();function u(w){if(a===setTimeout)return setTimeout(w,0);if((a===s||!a)&&setTimeout)return a=setTimeout,setTimeout(w,0);try{return a(w,0)}catch{try{return a.call(null,w,0)}catch{return a.call(this,w,0)}}}function f(w){if(o===clearTimeout)return clearTimeout(w);if((o===l||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(w);try{return o(w)}catch{try{return o.call(null,w)}catch{return o.call(this,w)}}}var c=[],h=!1,d,v=-1;function p(){!h||!d||(h=!1,d.length?c=d.concat(c):v=-1,c.length&&g())}function g(){if(!h){var w=u(p);h=!0;for(var k=c.length;k;){for(d=c,c=[];++v1)for(var R=1;R0&&d&&c[2]!==".")return u;if(!f.leadingZeros&&v.length>0&&!d&&c[1]!==".")return u;{const y=Number(c),m=""+y;return m.search(/[eE]/)!==-1||g?f.eNotation?y:u:c.indexOf(".")!==-1?m==="0"&&p===""||m===p||d&&m==="-"+p?y:u:v?p===m||d+p===m?y:u:c===m||c===d+m?y:u}}else return u}}function l(u){return u&&u.indexOf(".")!==-1&&(u=u.replace(/0+$/,""),u==="."?u="0":u[0]==="."?u="0"+u:u[u.length-1]==="."&&(u=u.substr(0,u.length-1))),u}r.exports=s},"./node_modules/webpack/buildin/amd-options.js":function(r,n){(function(i){r.exports=i}).call(this,{})},"./node_modules/webpack/buildin/module.js":function(r,n){r.exports=function(i){return i.webpackPolyfill||(i.deprecate=function(){},i.paths=[],i.children||(i.children=[]),Object.defineProperty(i,"loaded",{enumerable:!0,get:function(){return i.l}}),Object.defineProperty(i,"id",{enumerable:!0,get:function(){return i.i}}),i.webpackPolyfill=1),i}},"./package.json":function(r){r.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.8.6","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 demo/CIDemos/*.js test/test.js server/sts.js lib/request.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":{"fast-xml-parser":"^4.4.0"},"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(r,n,i){var a=i("./node_modules/@babel/runtime/helpers/typeof.js"),o=i("./src/session.js"),s=i("./src/async.js"),l=i("./src/event.js").EventProxy,u=i("./src/util.js"),f=i("./src/tracker.js");function c(b,T){var _=this,I=new l,A=b.TaskId,P=b.Bucket,O=b.Region,E=b.Key,N=b.Body,z=b.ChunkSize||b.SliceSize||_.options.ChunkSize,U=b.AsyncLimit,q=b.StorageClass,Y=b.ServerSideEncryption,Z,se,ce=b.onHashProgress,J=b.tracker;J&&J.setParams({chunkSize:z}),I.on("error",function(X){if(_._isRunningTask(A))return b.UploadData.UploadId&&o.removeUsing(b.UploadData.UploadId),X.UploadId=b.UploadData.UploadId||"",T(X)}),I.on("upload_complete",function(X){var ee=u.extend({UploadId:b.UploadData.UploadId||""},X);T(null,ee)}),I.on("upload_slice_complete",function(X){var ee={};u.each(b.Headers,function(ue,_e){var ve=_e.toLowerCase();(ve.indexOf("x-cos-meta-")===0||["pic-operations","x-cos-callback","x-cos-callback-var","x-cos-return-body"].includes(ve))&&(ee[_e]=ue)}),y.call(_,{Bucket:P,Region:O,Key:E,UploadId:X.UploadId,SliceList:X.SliceList,Headers:ee,tracker:J},function(ue,_e){if(_._isRunningTask(A)){if(o.removeUsing(X.UploadId),ue)return se(null,!0),I.emit("error",ue);o.removeUploadId.call(_,X.UploadId),se({loaded:Z,total:Z},!0),I.emit("upload_complete",_e)}})}),I.on("get_upload_data_finish",function(X){var ee=o.getFileId(N,b.ChunkSize,P,E);ee&&o.saveUploadId.call(_,ee,X.UploadId,_.options.UploadIdCacheLimit),o.setUsing(X.UploadId),se(null,!0),p.call(_,{TaskId:A,Bucket:P,Region:O,Key:E,Body:N,FileSize:Z,SliceSize:z,AsyncLimit:U,ServerSideEncryption:Y,UploadData:X,Headers:b.Headers,onProgress:se,tracker:J},function(ue,_e){if(_._isRunningTask(A)){if(ue)return se(null,!0),I.emit("error",ue);I.emit("upload_slice_complete",_e)}})}),I.on("get_file_size_finish",function(){if(se=u.throttleOnProgress.call(_,Z,b.onProgress),b.UploadData.UploadId)I.emit("get_upload_data_finish",b.UploadData);else{var X=u.extend({TaskId:A,Bucket:P,Region:O,Key:E,Headers:b.Headers,StorageClass:q,Body:N,FileSize:Z,SliceSize:z,onHashProgress:ce,tracker:J},b);h.call(_,X,function(ee,ue){if(_._isRunningTask(A)){if(ee)return I.emit("error",ee);b.UploadData.UploadId=ue.UploadId,b.UploadData.PartList=ue.PartList,I.emit("get_upload_data_finish",b.UploadData)}})}}),Z=b.ContentLength,delete b.ContentLength,!b.Headers&&(b.Headers={}),u.each(b.Headers,function(X,ee){ee.toLowerCase()==="content-length"&&delete b.Headers[ee]}),function(){for(var X=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],ee=1024*1024,ue=0;ueq)return ue(null,!1);if(_e>1){var ve=Math.max(ee[0].Size,ee[1].Size);if(ve!==U)return ue(null,!1)}var ie=function ne(Ae){if(Ae<_e){var re=ee[Ae];se(re.PartNumber,function(le,we){we&&we.ETag===re.ETag&&we.Size===re.Size?ne(Ae+1):ue(null,!1)})}else ue(null,!0)};ie(0)},J=new l;J.on("error",function(X){if(E._isRunningTask(_))return T(X)}),J.on("upload_id_available",function(X){var ee={},ue=[];u.each(X.PartList,function(ie){ee[ie.PartNumber]=ie});for(var _e=1;_e<=q;_e++){var ve=ee[_e];ve?(ve.PartNumber=_e,ve.Uploaded=!0):ve={PartNumber:_e,ETag:null,Uploaded:!1},ue.push(ve)}X.PartList=ue,T(null,X)}),J.on("no_available_upload_id",function(){if(E._isRunningTask(_)){var X=u.extend({Bucket:I,Region:A,Key:P,Query:u.clone(b.Query),StorageClass:O,Body:b.Body,calledBySdk:"sliceUploadFile",tracker:b.tracker},b),ee=u.clone(b.Headers);delete ee["x-cos-mime-limit"],X.Headers=ee,E.multipartInit(X,function(ue,_e){if(E._isRunningTask(_)){if(ue)return J.emit("error",ue);var ve=_e.UploadId;if(!ve)return T(u.error(new Error("no such upload id")));J.emit("upload_id_available",{UploadId:ve,PartList:[]})}})}}),J.on("has_and_check_upload_id",function(X){X=X.reverse(),s.eachLimit(X,1,function(ee,ue){if(E._isRunningTask(_)){if(o.using[ee]){ue();return}v.call(E,{Bucket:I,Region:A,Key:P,UploadId:ee,tracker:b.tracker},function(_e,ve){if(E._isRunningTask(_)){if(_e)return o.removeUsing(ee),J.emit("error",_e);var ie=ve.PartList;ie.forEach(function(ne){ne.PartNumber*=1,ne.Size*=1,ne.ETag=ne.ETag||""}),ce(ie,function(ne,Ae){if(E._isRunningTask(_)){if(ne)return J.emit("error",ne);Ae?ue({UploadId:ee,PartList:ie}):ue()}})}})}},function(ee){E._isRunningTask(_)&&(Z(null,!0),ee&&ee.UploadId?J.emit("upload_id_available",ee):J.emit("no_available_upload_id"))})}),J.on("seek_local_avail_upload_id",function(X){var ee=o.getFileId(b.Body,b.ChunkSize,I,P),ue=o.getUploadIdList.call(E,ee);if(!ee||!ue){J.emit("has_and_check_upload_id",X);return}var _e=function ve(ie){if(ie>=ue.length){J.emit("has_and_check_upload_id",X);return}var ne=ue[ie];if(!u.isInArray(X,ne)){o.removeUploadId.call(E,ne),ve(ie+1);return}if(o.using[ne]){ve(ie+1);return}v.call(E,{Bucket:I,Region:A,Key:P,UploadId:ne,tracker:b.tracker},function(Ae,re){E._isRunningTask(_)&&(Ae?(o.removeUploadId.call(E,ne),ve(ie+1)):J.emit("upload_id_available",{UploadId:ne,PartList:re.PartList}))})};_e(0)}),J.on("get_remote_upload_id_list",function(){d.call(E,{Bucket:I,Region:A,Key:P,tracker:b.tracker},function(X,ee){if(E._isRunningTask(_)){if(X)return J.emit("error",X);var ue=u.filter(ee.UploadList,function(ie){return ie.Key===P&&(!O||ie.StorageClass.toUpperCase()===O.toUpperCase())}).reverse().map(function(ie){return ie.UploadId||ie.UploadID});if(ue.length)J.emit("seek_local_avail_upload_id",ue);else{var _e=o.getFileId(b.Body,b.ChunkSize,I,P),ve;_e&&(ve=o.getUploadIdList.call(E,_e))&&u.each(ve,function(ie){o.removeUploadId.call(E,ie)}),J.emit("no_available_upload_id")}}})}),J.emit("get_remote_upload_id_list")}function d(b,T){var _=this,I=[],A={Bucket:b.Bucket,Region:b.Region,Prefix:b.Key,calledBySdk:b.calledBySdk||"sliceUploadFile",tracker:b.tracker},P=function O(){_.multipartList(A,function(E,N){if(E)return T(E);I.push.apply(I,N.Upload||[]),N.IsTruncated==="true"?(A.KeyMarker=N.NextKeyMarker,A.UploadIdMarker=N.NextUploadIdMarker,O()):T(null,{UploadList:I})})};P()}function v(b,T){var _=this,I=[],A={Bucket:b.Bucket,Region:b.Region,Key:b.Key,UploadId:b.UploadId,calledBySdk:"sliceUploadFile",tracker:b.tracker},P=function O(){_.multipartListPart(A,function(E,N){if(E)return T(E);I.push.apply(I,N.Part||[]),N.IsTruncated==="true"?(A.PartNumberMarker=N.NextPartNumberMarker,O()):T(null,{PartList:I})})};P()}function p(b,T){var _=this,I=b.TaskId,A=b.Bucket,P=b.Region,O=b.Key,E=b.UploadData,N=b.FileSize,z=b.SliceSize,U=Math.min(b.AsyncLimit||_.options.ChunkParallelLimit||1,256),q=b.Body,Y=Math.ceil(N/z),Z=0,se=b.ServerSideEncryption,ce=b.Headers,J=u.filter(E.PartList,function(ee){return ee.Uploaded&&(Z+=ee.PartNumber>=Y&&N%z||z),!ee.Uploaded}),X=b.onProgress;s.eachLimit(J,U,function(ee,ue){if(_._isRunningTask(I)){var _e=ee.PartNumber,ve=Math.min(N,ee.PartNumber*z)-(ee.PartNumber-1)*z,ie=0;g.call(_,{TaskId:I,Bucket:A,Region:P,Key:O,SliceSize:z,FileSize:N,PartNumber:_e,ServerSideEncryption:se,Body:q,UploadData:E,Headers:ce,onProgress:function(Ae){Z+=Ae.loaded-ie,ie=Ae.loaded,X({loaded:Z,total:N})},tracker:b.tracker},function(ne,Ae){_._isRunningTask(I)&&(!ne&&!Ae.ETag&&(ne='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),ne?Z-=ie:(Z+=ve-ie,ee.ETag=Ae.ETag),X({loaded:Z,total:N}),ue(ne||null,Ae))})}},function(ee){if(_._isRunningTask(I)){if(ee)return T(ee);T(null,{UploadId:E.UploadId,SliceList:E.PartList})}})}function g(b,T){var _=this,I=b.TaskId,A=b.Bucket,P=b.Region,O=b.Key,E=b.FileSize,N=b.Body,z=b.PartNumber*1,U=b.SliceSize,q=b.ServerSideEncryption,Y=b.UploadData,Z=b.Headers||{},se=_.options.ChunkRetryTimes+1,ce=U*(z-1),J=U,X=ce+U;X>E&&(X=E,J=X-ce);var ee=["x-cos-traffic-limit","x-cos-mime-limit"],ue={};u.each(Z,function(ve,ie){ee.indexOf(ie)>-1&&(ue[ie]=ve)});var _e=Y.PartList[z-1];s.retry(se,function(ve){_._isRunningTask(I)&&u.fileSlice(N,ce,X,!0,function(ie){_.multipartUpload({TaskId:I,Bucket:A,Region:P,Key:O,ContentLength:J,PartNumber:z,UploadId:Y.UploadId,ServerSideEncryption:q,Body:ie,Headers:ue,onProgress:b.onProgress,calledBySdk:"sliceUploadFile",tracker:b.tracker},function(ne,Ae){if(_._isRunningTask(I))return ne?ve(ne):(_e.Uploaded=!0,ve(null,Ae))})})},function(ve,ie){if(_._isRunningTask(I))return T(ve,ie)})}function y(b,T){var _=b.Bucket,I=b.Region,A=b.Key,P=b.UploadId,O=b.SliceList,E=this,N=this.options.ChunkRetryTimes+1,z=b.Headers,U=O.map(function(q){return{PartNumber:q.PartNumber,ETag:q.ETag}});s.retry(N,function(q){E.multipartComplete({Bucket:_,Region:I,Key:A,UploadId:P,Parts:U,Headers:z,calledBySdk:"sliceUploadFile",tracker:b.tracker},q)},function(q,Y){T(q,Y)})}function m(b,T){var _=b.Bucket,I=b.Region,A=b.Key,P=b.UploadId,O=b.Level||"task",E=b.AsyncLimit,N=this,z=new l;if(z.on("error",function(U){return T(U)}),z.on("get_abort_array",function(U){w.call(N,{Bucket:_,Region:I,Key:A,Headers:b.Headers,AsyncLimit:E,AbortArray:U},T)}),O==="bucket")d.call(N,{Bucket:_,Region:I,calledBySdk:"abortUploadTask"},function(U,q){if(U)return T(U);z.emit("get_abort_array",q.UploadList||[])});else if(O==="file"){if(!A)return T(u.error(new Error("abort_upload_task_no_key")));d.call(N,{Bucket:_,Region:I,Key:A,calledBySdk:"abortUploadTask"},function(U,q){if(U)return T(U);z.emit("get_abort_array",q.UploadList||[])})}else if(O==="task"){if(!P)return T(u.error(new Error("abort_upload_task_no_id")));if(!A)return T(u.error(new Error("abort_upload_task_no_key")));z.emit("get_abort_array",[{Key:A,UploadId:P}])}else return T(u.error(new Error("abort_unknown_level")))}function w(b,T){var _=b.Bucket,I=b.Region,A=b.Key,P=b.AbortArray,O=b.AsyncLimit||1,E=this,N=0,z=new Array(P.length);s.eachLimit(P,O,function(U,q){var Y=N;if(A&&A!==U.Key){z[Y]={error:{KeyNotMatch:!0}},q(null);return}var Z=U.UploadId||U.UploadID;E.multipartAbort({Bucket:_,Region:I,Key:U.Key,Headers:b.Headers,UploadId:Z},function(se){var ce={Bucket:_,Region:I,Key:U.Key,UploadId:Z};z[Y]={error:se,task:ce},q(null)}),N++},function(U){if(U)return T(U);for(var q=[],Y=[],Z=0,se=z.length;ZI?"sliceUploadFile":"putObject";b.tracker=new f({Beacon:_.options.BeaconReporter,clsReporter:_.options.ClsReporter,bucket:b.Bucket,region:b.Region,apiName:"uploadFile",realApi:z,fileKey:b.Key,fileSize:O,accelerate:N,deepTracker:_.options.DeepTracker,customId:_.options.CustomId,delay:_.options.TrackerDelay})}u.each(b,function(ce,J){a(ce)!=="object"&&typeof ce!="function"&&(E[J]=ce)});var U=b.onTaskReady,q=function(J){E.TaskId=J,U&&U(J)};b.onTaskReady=q;var Y=O>I?"sliceUploadFile":"putObject",Z=b.onFileFinish,se=function(J,X){b.tracker&&b.tracker.report(J,X),Z&&Z(J,X,E),T&&T(J,X)};A.push({api:Y,params:b,callback:se}),_._addTasks(A)}function R(b,T){var _=this,I=b.SliceSize===void 0?_.options.SliceSize:b.SliceSize,A=0,P=0,O=u.throttleOnProgress.call(_,P,b.onProgress),E=b.files.length,N=b.onFileFinish,z=Array(E),U=function(Z,se,ce){O(null,!0),N&&N(Z,se,ce),z[ce.Index]={options:ce,error:Z,data:se},--E<=0&&T&&T(null,{files:z})},q=[];u.each(b.files,function(Y,Z){(function(){var se=Y.Body,ce=se.size||se.length||0,J={Index:Z,TaskId:""};if(!_.options.UseRawKey&&Y.Key&&Y.Key.substr(0,1)==="/"&&(Y.Key=Y.Key.substr(1)),A+=ce,_.options.EnableReporter){var X=_.options.UseAccelerate||typeof _.options.Domain=="string"&&_.options.Domain.includes("accelerate."),ee=ce>I?"sliceUploadFile":"putObject";Y.tracker=new f({Beacon:_.options.BeaconReporter,clsReporter:_.options.ClsReporter,bucket:Y.Bucket,region:Y.Region,apiName:"uploadFiles",realApi:ee,fileKey:Y.Key,fileSize:ce,accelerate:X,deepTracker:_.options.DeepTracker,customId:_.options.CustomId,delay:_.options.TrackerDelay})}u.each(Y,function(we,Ie){a(we)!=="object"&&typeof we!="function"&&(J[Ie]=we)});var ue=Y.onTaskReady,_e=function(Ie){J.TaskId=Ie,ue&&ue(Ie)};Y.onTaskReady=_e;var ve=0,ie=Y.onProgress,ne=function(Ie){P=P-ve+Ie.loaded,ve=Ie.loaded,ie&&ie(Ie),O({loaded:P,total:A})};Y.onProgress=ne;var Ae=ce>I?"sliceUploadFile":"putObject",re=Y.onFileFinish,le=function(Ie,tt){Y.tracker&&Y.tracker.report(Ie,tt),re&&re(Ie,tt),U&&U(Ie,tt,J)};q.push({api:Ae,params:Y,callback:le})})()}),_._addTasks(q)}function C(b,T){var _=new l,I=this,A=b.Bucket,P=b.Region,O=b.Key,E=b.CopySource,N=u.getSourceParams.call(this,E);if(!N){T(u.error(new Error("CopySource format error")));return}var z=N.Bucket,U=N.Region,q=decodeURIComponent(N.Key),Y=b.CopySliceSize===void 0?I.options.CopySliceSize:b.CopySliceSize;Y=Math.max(0,Y);var Z=b.CopyChunkSize||this.options.CopyChunkSize,se=this.options.CopyChunkParallelLimit,ce=this.options.ChunkRetryTimes+1,J=0,X=0,ee,ue,_e={},ve={},ie={};_.on("copy_slice_complete",function(ne){u.each(b.Headers,function(re,le){le.toLowerCase().indexOf("x-cos-meta-")});var Ae=u.map(ne.PartList,function(re){return{PartNumber:re.PartNumber,ETag:re.ETag}});s.retry(ce,function(re){I.multipartComplete({Bucket:A,Region:P,Key:O,UploadId:ne.UploadId,Parts:Ae,tracker:b.tracker,calledBySdk:"sliceCopyFile"},re)},function(re,le){if(o.removeUsing(ne.UploadId),re)return ue(null,!0),T(re);o.removeUploadId(ne.UploadId),ue({loaded:ee,total:ee},!0),T(null,le)})}),_.on("get_copy_data_finish",function(ne){var Ae=o.getCopyFileId(E,_e,Z,A,O);Ae&&o.saveUploadId(Ae,ne.UploadId,I.options.UploadIdCacheLimit),o.setUsing(ne.UploadId);var re=u.filter(ne.PartList,function(le){return le.Uploaded&&(X+=le.PartNumber>=J&&ee%Z||Z),!le.Uploaded});s.eachLimit(re,se,function(le,we){var Ie=le.PartNumber,tt=le.CopySourceRange,st=le.end-le.start;s.retry(ce,function(bt){x.call(I,{Bucket:A,Region:P,Key:O,CopySource:E,UploadId:ne.UploadId,PartNumber:Ie,CopySourceRange:tt,tracker:b.tracker,calledBySdk:"sliceCopyFile"},bt)},function(bt,Ee){if(bt)return we(bt);X+=st,ue({loaded:X,total:ee}),le.ETag=Ee.ETag,we(bt||null,Ee)})},function(le){if(le)return o.removeUsing(ne.UploadId),ue(null,!0),T(le);_.emit("copy_slice_complete",ne)})}),_.on("get_chunk_size_finish",function(){var ne=function(){I.multipartInit({Bucket:A,Region:P,Key:O,Headers:ie,tracker:b.tracker,calledBySdk:"sliceCopyFile"},function(Ie,tt){if(Ie)return T(Ie);b.UploadId=tt.UploadId,_.emit("get_copy_data_finish",{UploadId:b.UploadId,PartList:b.PartList})})},Ae=o.getCopyFileId(E,_e,Z,A,O),re=o.getUploadIdList(Ae);if(!Ae||!re)return ne();var le=function we(Ie){if(Ie>=re.length)return ne();var tt=re[Ie];if(o.using[tt])return we(Ie+1);v.call(I,{Bucket:A,Region:P,Key:O,UploadId:tt,tracker:b.tracker,calledBySdk:"sliceCopyFile"},function(st,bt){if(st)o.removeUploadId(tt),we(Ie+1);else{if(o.using[tt])return we(Ie+1);var Ee={},Br=0;u.each(bt.PartList,function(Lt){var pn=parseInt(Lt.Size),Oa=Br+pn-1;Ee[Lt.PartNumber+"|"+Br+"|"+Oa]=Lt.ETag,Br+=pn}),u.each(b.PartList,function(Lt){var pn=Ee[Lt.PartNumber+"|"+Lt.start+"|"+Lt.end];pn&&(Lt.ETag=pn,Lt.Uploaded=!0)}),_.emit("get_copy_data_finish",{UploadId:tt,PartList:b.PartList})}})};le(0)}),_.on("get_file_size_finish",function(){if(function(){for(var Ae=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],re=1024*1024,le=0;leIe.length&&(ve[we]=le)}),_.emit("get_file_size_finish")}})}function x(b,T){var _=b.TaskId,I=b.Bucket,A=b.Region,P=b.Key,O=b.CopySource,E=b.UploadId,N=b.PartNumber*1,z=b.CopySourceRange,U=this.options.ChunkRetryTimes+1,q=this;s.retry(U,function(Y){q.uploadPartCopy({TaskId:_,Bucket:I,Region:A,Key:P,CopySource:O,UploadId:E,PartNumber:N,CopySourceRange:z,tracker:b.tracker,calledBySdk:b.calledBySdk},function(Z,se){Y(Z||null,se)})},function(Y,Z){return T(Y,Z)})}var M={sliceUploadFile:c,abortUploadTask:m,uploadFile:k,uploadFiles:R,sliceCopyFile:C};r.exports.init=function(b,T){T.transferToTaskMethod(M,"sliceUploadFile"),u.each(M,function(_,I){b.prototype[I]=u.apiWrapper(I,_)})}},"./src/async.js":function(r,n){var i=function(l,u,f,c){if(c=c||function(){},!l.length||u<=0)return c();var h=0,d=0,v=0;(function p(){if(h>=l.length)return c();for(;v=l.length?c():p())})})()},a=function(l,u,f){var c=function h(d){u(function(v,p){v&&d"u"?"undefined":a(location))==="object"&&location.protocol==="http:"?"http:":"https:"),D=this.options.ServiceDomain,$=S.AppId||this.options.appId,F=S.Region;D?(D=D.replace(/\{\{AppId\}\}/gi,$||"").replace(/\{\{Region\}\}/gi,F||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(D)||(D=L+"//"+D),D.slice(-1)==="/"&&(D=D.slice(0,-1))):F?D=L+"//cos."+F+".myqcloud.com":D=L+"//service.cos.myqcloud.com";var V="",W=F?"cos."+F+".myqcloud.com":"service.cos.myqcloud.com",ae=D.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");W===ae&&(V=W),Ce.call(this,{Action:"name/cos:GetService",url:D,method:"GET",headers:S.Headers,SignHost:V,tracker:S.tracker},function(Pe,Me){if(Pe)return B(Pe);var Xe=Me&&Me.ListAllMyBucketsResult&&Me.ListAllMyBucketsResult.Buckets&&Me.ListAllMyBucketsResult.Buckets.Bucket||[];Xe=s.isArray(Xe)?Xe:[Xe];var ye=Me&&Me.ListAllMyBucketsResult&&Me.ListAllMyBucketsResult.Owner||{};B(null,{Buckets:Xe,Owner:ye,statusCode:Me.statusCode,headers:Me.headers})})}function u(S,B){var L=this,D="";if(S.BucketAZConfig){var $={BucketAZConfig:S.BucketAZConfig};D=s.json2xml({CreateBucketConfiguration:$})}Ce.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,body:D,tracker:S.tracker},function(F,V){if(F)return B(F);var W=Sr({protocol:L.options.Protocol,domain:L.options.Domain,bucket:S.Bucket,region:S.Region,isLocation:!0});B(null,{Location:W,statusCode:V.statusCode,headers:V.headers})})}function f(S,B){Ce.call(this,{Action:"name/cos:HeadBucket",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,method:"HEAD",tracker:S.tracker},B)}function c(S,B){var L={};L.prefix=S.Prefix||"",L.delimiter=S.Delimiter,L.marker=S.Marker,L["max-keys"]=S.MaxKeys,L["encoding-type"]=S.EncodingType,Ce.call(this,{Action:"name/cos:GetBucket",ResourceKey:L.prefix,method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,qs:L,tracker:S.tracker},function(D,$){if(D)return B(D);var F=$.ListBucketResult||{},V=F.Contents||[],W=F.CommonPrefixes||[];V=s.isArray(V)?V:[V],W=s.isArray(W)?W:[W];var ae=s.clone(F);s.extend(ae,{Contents:V,CommonPrefixes:W,statusCode:$.statusCode,headers:$.headers}),B(null,ae)})}function h(S,B){Ce.call(this,{Action:"name/cos:DeleteBucket",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,method:"DELETE",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function d(S,B){var L=S.Headers,D="";if(S.AccessControlPolicy){var $=s.clone(S.AccessControlPolicy||{}),F=$.Grants||$.Grant;F=s.isArray(F)?F:[F],delete $.Grant,delete $.Grants,$.AccessControlList={Grant:F},D=s.json2xml({AccessControlPolicy:$}),L["Content-Type"]="application/xml",L["Content-MD5"]=s.b64(s.md5(D))}s.each(L,function(V,W){W.indexOf("x-cos-grant-")===0&&(L[W]=Xr(L[W]))}),Ce.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:S.Bucket,Region:S.Region,headers:L,action:"acl",body:D,tracker:S.tracker},function(V,W){if(V)return B(V);B(null,{statusCode:W.statusCode,headers:W.headers})})}function v(S,B){Ce.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"acl",tracker:S.tracker},function(L,D){if(L)return B(L);var $=D.AccessControlPolicy||{},F=$.Owner||{},V=$.AccessControlList.Grant||[];V=s.isArray(V)?V:[V];var W=Ze($);D.headers&&D.headers["x-cos-acl"]&&(W.ACL=D.headers["x-cos-acl"]),W=s.extend(W,{Owner:F,Grants:V,statusCode:D.statusCode,headers:D.headers}),B(null,W)})}function p(S,B){var L=S.CORSConfiguration||{},D=L.CORSRules||S.CORSRules||[];D=s.clone(s.isArray(D)?D:[D]),s.each(D,function(W){s.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(ae){var Pe=ae+"s",Me=W[Pe]||W[ae]||[];delete W[Pe],W[ae]=s.isArray(Me)?Me:[Me]})});var $={CORSRule:D};S.ResponseVary&&($.ResponseVary=S.ResponseVary);var F=s.json2xml({CORSConfiguration:$}),V=S.Headers;V["Content-Type"]="application/xml",V["Content-MD5"]=s.b64(s.md5(F)),Ce.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:F,action:"cors",headers:V,tracker:S.tracker},function(W,ae){if(W)return B(W);B(null,{statusCode:ae.statusCode,headers:ae.headers})})}function g(S,B){Ce.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"cors",tracker:S.tracker},function(L,D){if(L){if(L.statusCode===404&&L.error&&L.error.Code==="NoSuchCORSConfiguration"){var $={CORSRules:[],statusCode:L.statusCode};L.headers&&($.headers=L.headers),B(null,$)}else B(L);return}var F=D.CORSConfiguration||{},V=F.CORSRules||F.CORSRule||[];V=s.clone(s.isArray(V)?V:[V]);var W=F.ResponseVary;s.each(V,function(ae){s.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(Pe){var Me=Pe+"s",Xe=ae[Me]||ae[Pe]||[];delete ae[Pe],ae[Me]=s.isArray(Xe)?Xe:[Xe]})}),B(null,{CORSRules:V,ResponseVary:W,statusCode:D.statusCode,headers:D.headers})})}function y(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"cors",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode||L.statusCode,headers:D.headers})})}function m(S,B){Ce.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"location",tracker:S.tracker},B)}function w(S,B){var L=S.Policy;try{typeof L=="string"&&(L=JSON.parse(L))}catch{}if(!L||typeof L=="string")return B(s.error(new Error("Policy format error")));var D=JSON.stringify(L);L.version||(L.version="2.0");var $=S.Headers;$["Content-Type"]="application/json",$["Content-MD5"]=s.b64(s.md5(D)),Ce.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:S.Bucket,Region:S.Region,action:"policy",body:D,headers:$,tracker:S.tracker},function(F,V){if(F&&F.statusCode===204)return B(null,{statusCode:F.statusCode});if(F)return B(F);B(null,{statusCode:V.statusCode,headers:V.headers})})}function k(S,B){Ce.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"policy",rawBody:!0,tracker:S.tracker},function(L,D){if(L)return L.statusCode&&L.statusCode===403?B(s.error(L,{ErrorStatus:"Access Denied"})):L.statusCode&&L.statusCode===405?B(s.error(L,{ErrorStatus:"Method Not Allowed"})):L.statusCode&&L.statusCode===404?B(s.error(L,{ErrorStatus:"Policy Not Found"})):B(L);var $={};try{$=JSON.parse(D.body)}catch{}B(null,{Policy:$,statusCode:D.statusCode,headers:D.headers})})}function R(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"policy",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode||L.statusCode,headers:D.headers})})}function C(S,B){var L=S.Tagging||{},D=L.TagSet||L.Tags||S.Tags||[];D=s.clone(s.isArray(D)?D:[D]);var $=s.json2xml({Tagging:{TagSet:{Tag:D}}}),F=S.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5($)),Ce.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:$,action:"tagging",headers:F,tracker:S.tracker},function(V,W){if(V&&V.statusCode===204)return B(null,{statusCode:V.statusCode});if(V)return B(V);B(null,{statusCode:W.statusCode,headers:W.headers})})}function x(S,B){Ce.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"tagging",tracker:S.tracker},function(L,D){if(L){if(L.statusCode===404&&L.error&&(L.error==="Not Found"||L.error.Code==="NoSuchTagSet")){var $={Tags:[],statusCode:L.statusCode};L.headers&&($.headers=L.headers),B(null,$)}else B(L);return}var F=[];try{F=D.Tagging.TagSet.Tag||[]}catch{}F=s.clone(s.isArray(F)?F:[F]),B(null,{Tags:F,statusCode:D.statusCode,headers:D.headers})})}function M(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"tagging",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function b(S,B){var L=S.LifecycleConfiguration||{},D=L.Rules||S.Rules||[];D=s.clone(D);var $=s.json2xml({LifecycleConfiguration:{Rule:D}}),F=S.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5($)),Ce.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:$,action:"lifecycle",headers:F,tracker:S.tracker},function(V,W){if(V&&V.statusCode===204)return B(null,{statusCode:V.statusCode});if(V)return B(V);B(null,{statusCode:W.statusCode,headers:W.headers})})}function T(S,B){Ce.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"lifecycle",tracker:S.tracker},function(L,D){if(L){if(L.statusCode===404&&L.error&&L.error.Code==="NoSuchLifecycleConfiguration"){var $={Rules:[],statusCode:L.statusCode};L.headers&&($.headers=L.headers),B(null,$)}else B(L);return}var F=[];try{F=D.LifecycleConfiguration.Rule||[]}catch{}F=s.clone(s.isArray(F)?F:[F]),B(null,{Rules:F,statusCode:D.statusCode,headers:D.headers})})}function _(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"lifecycle",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function I(S,B){if(!S.VersioningConfiguration){B(s.error(new Error("missing param VersioningConfiguration")));return}var L=S.VersioningConfiguration||{},D=s.json2xml({VersioningConfiguration:L}),$=S.Headers;$["Content-Type"]="application/xml",$["Content-MD5"]=s.b64(s.md5(D)),Ce.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:D,action:"versioning",headers:$,tracker:S.tracker},function(F,V){if(F&&F.statusCode===204)return B(null,{statusCode:F.statusCode});if(F)return B(F);B(null,{statusCode:V.statusCode,headers:V.headers})})}function A(S,B){Ce.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"versioning",tracker:S.tracker},function(L,D){L||!D.VersioningConfiguration&&(D.VersioningConfiguration={}),B(L,D)})}function P(S,B){var L=s.clone(S.ReplicationConfiguration),D=s.json2xml({ReplicationConfiguration:L});D=D.replace(/<(\/?)Rules>/gi,"<$1Rule>"),D=D.replace(/<(\/?)Tags>/gi,"<$1Tag>");var $=S.Headers;$["Content-Type"]="application/xml",$["Content-MD5"]=s.b64(s.md5(D)),Ce.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:D,action:"replication",headers:$,tracker:S.tracker},function(F,V){if(F&&F.statusCode===204)return B(null,{statusCode:F.statusCode});if(F)return B(F);B(null,{statusCode:V.statusCode,headers:V.headers})})}function O(S,B){Ce.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"replication",tracker:S.tracker},function(L,D){if(L){if(L.statusCode===404&&L.error&&(L.error==="Not Found"||L.error.Code==="ReplicationConfigurationnotFoundError")){var $={ReplicationConfiguration:{Rules:[]},statusCode:L.statusCode};L.headers&&($.headers=L.headers),B(null,$)}else B(L);return}!D.ReplicationConfiguration&&(D.ReplicationConfiguration={}),D.ReplicationConfiguration.Rule&&(D.ReplicationConfiguration.Rules=s.makeArray(D.ReplicationConfiguration.Rule),delete D.ReplicationConfiguration.Rule),B(L,D)})}function E(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"replication",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function N(S,B){if(!S.WebsiteConfiguration){B(s.error(new Error("missing param WebsiteConfiguration")));return}var L=s.clone(S.WebsiteConfiguration||{}),D=L.RoutingRules||L.RoutingRule||[];D=s.isArray(D)?D:[D],delete L.RoutingRule,delete L.RoutingRules,D.length&&(L.RoutingRules={RoutingRule:D});var $=s.json2xml({WebsiteConfiguration:L}),F=S.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5($)),Ce.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:$,action:"website",headers:F,tracker:S.tracker},function(V,W){if(V&&V.statusCode===204)return B(null,{statusCode:V.statusCode});if(V)return B(V);B(null,{statusCode:W.statusCode,headers:W.headers})})}function z(S,B){Ce.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:S.Bucket,Region:S.Region,Key:S.Key,headers:S.Headers,action:"website",tracker:S.tracker},function(L,D){if(L){if(L.statusCode===404&&L.error.Code==="NoSuchWebsiteConfiguration"){var $={WebsiteConfiguration:{},statusCode:L.statusCode};L.headers&&($.headers=L.headers),B(null,$)}else B(L);return}var F=D.WebsiteConfiguration||{};if(F.RoutingRules){var V=s.clone(F.RoutingRules.RoutingRule||[]);V=s.makeArray(V),F.RoutingRules=V}B(null,{WebsiteConfiguration:F,statusCode:D.statusCode,headers:D.headers})})}function U(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"website",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function q(S,B){if(!S.RefererConfiguration){B(s.error(new Error("missing param RefererConfiguration")));return}var L=s.clone(S.RefererConfiguration||{}),D=L.DomainList||{},$=D.Domains||D.Domain||[];$=s.isArray($)?$:[$],$.length&&(L.DomainList={Domain:$});var F=s.json2xml({RefererConfiguration:L}),V=S.Headers;V["Content-Type"]="application/xml",V["Content-MD5"]=s.b64(s.md5(F)),Ce.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:F,action:"referer",headers:V,tracker:S.tracker},function(W,ae){if(W&&W.statusCode===204)return B(null,{statusCode:W.statusCode});if(W)return B(W);B(null,{statusCode:ae.statusCode,headers:ae.headers})})}function Y(S,B){Ce.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:S.Bucket,Region:S.Region,Key:S.Key,headers:S.Headers,action:"referer",tracker:S.tracker},function(L,D){if(L){if(L.statusCode===404&&L.error.Code==="NoSuchRefererConfiguration"){var $={WebsiteConfiguration:{},statusCode:L.statusCode};L.headers&&($.headers=L.headers),B(null,$)}else B(L);return}var F=D.RefererConfiguration||{};if(F.DomainList){var V=s.makeArray(F.DomainList.Domain||[]);F.DomainList={Domains:V}}B(null,{RefererConfiguration:F,statusCode:D.statusCode,headers:D.headers})})}function Z(S,B){var L=S.DomainConfiguration||{},D=L.DomainRule||S.DomainRule||[];D=s.clone(D);var $=s.json2xml({DomainConfiguration:{DomainRule:D}}),F=S.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5($)),Ce.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:$,action:"domain",headers:F,tracker:S.tracker},function(V,W){if(V&&V.statusCode===204)return B(null,{statusCode:V.statusCode});if(V)return B(V);B(null,{statusCode:W.statusCode,headers:W.headers})})}function se(S,B){Ce.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"domain",tracker:S.tracker},function(L,D){if(L)return B(L);var $=[];try{$=D.DomainConfiguration.DomainRule||[]}catch{}$=s.clone(s.isArray($)?$:[$]),B(null,{DomainRule:$,statusCode:D.statusCode,headers:D.headers})})}function ce(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"domain",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function J(S,B){var L=S.OriginConfiguration||{},D=L.OriginRule||S.OriginRule||[];D=s.clone(D);var $=s.json2xml({OriginConfiguration:{OriginRule:D}}),F=S.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5($)),Ce.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:$,action:"origin",headers:F,tracker:S.tracker},function(V,W){if(V&&V.statusCode===204)return B(null,{statusCode:V.statusCode});if(V)return B(V);B(null,{statusCode:W.statusCode,headers:W.headers})})}function X(S,B){Ce.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"origin",tracker:S.tracker},function(L,D){if(L)return B(L);var $=[];try{$=D.OriginConfiguration.OriginRule||[]}catch{}$=s.clone(s.isArray($)?$:[$]),B(null,{OriginRule:$,statusCode:D.statusCode,headers:D.headers})})}function ee(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"origin",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function ue(S,B){var L=s.json2xml({BucketLoggingStatus:S.BucketLoggingStatus||""}),D=S.Headers;D["Content-Type"]="application/xml",D["Content-MD5"]=s.b64(s.md5(L)),Ce.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:L,action:"logging",headers:D,tracker:S.tracker},function($,F){if($&&$.statusCode===204)return B(null,{statusCode:$.statusCode});if($)return B($);B(null,{statusCode:F.statusCode,headers:F.headers})})}function _e(S,B){Ce.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"logging",tracker:S.tracker},function(L,D){if(L)return B(L);B(null,{BucketLoggingStatus:D.BucketLoggingStatus,statusCode:D.statusCode,headers:D.headers})})}function ve(S,B,L){var D=s.clone(B.InventoryConfiguration);if(D.OptionalFields){var $=D.OptionalFields||[];D.OptionalFields={Field:$}}if(D.Destination&&D.Destination.COSBucketDestination&&D.Destination.COSBucketDestination.Encryption){var F=D.Destination.COSBucketDestination.Encryption;Object.keys(F).indexOf("SSECOS")>-1&&(F["SSE-COS"]=F.SSECOS,delete F.SSECOS)}var V=s.json2xml({InventoryConfiguration:D}),W=B.Headers;W["Content-Type"]="application/xml",W["Content-MD5"]=s.b64(s.md5(V));var ae=S==="PUT"?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";Ce.call(this,{Action:ae,method:S,Bucket:B.Bucket,Region:B.Region,body:V,action:"inventory",qs:{id:B.Id},headers:W,tracker:B.tracker},function(Pe,Me){if(Pe&&Pe.statusCode===204)return L(null,{statusCode:Pe.statusCode});if(Pe)return L(Pe);L(null,{statusCode:Me.statusCode,headers:Me.headers})})}function ie(S,B){return ve.call(this,"PUT",S,B)}function ne(S,B){return ve.call(this,"POST",S,B)}function Ae(S,B){Ce.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"inventory",qs:{id:S.Id},tracker:S.tracker},function(L,D){if(L)return B(L);var $=D.InventoryConfiguration;if($&&$.OptionalFields&&$.OptionalFields.Field){var F=$.OptionalFields.Field;s.isArray(F)||(F=[F]),$.OptionalFields=F}if($.Destination&&$.Destination.COSBucketDestination&&$.Destination.COSBucketDestination.Encryption){var V=$.Destination.COSBucketDestination.Encryption;Object.keys(V).indexOf("SSE-COS")>-1&&(V.SSECOS=V["SSE-COS"],delete V["SSE-COS"])}B(null,{InventoryConfiguration:$,statusCode:D.statusCode,headers:D.headers})})}function re(S,B){Ce.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"inventory",qs:{"continuation-token":S.ContinuationToken},tracker:S.tracker},function(L,D){if(L)return B(L);var $=D.ListInventoryConfigurationResult,F=$.InventoryConfiguration||[];F=s.isArray(F)?F:[F],delete $.InventoryConfiguration,s.each(F,function(V){if(V&&V.OptionalFields&&V.OptionalFields.Field){var W=V.OptionalFields.Field;s.isArray(W)||(W=[W]),V.OptionalFields=W}if(V.Destination&&V.Destination.COSBucketDestination&&V.Destination.COSBucketDestination.Encryption){var ae=V.Destination.COSBucketDestination.Encryption;Object.keys(ae).indexOf("SSE-COS")>-1&&(ae.SSECOS=ae["SSE-COS"],delete ae["SSE-COS"])}}),$.InventoryConfigurations=F,s.extend($,{statusCode:D.statusCode,headers:D.headers}),B(null,$)})}function le(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"inventory",qs:{id:S.Id},tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function we(S,B){if(!S.AccelerateConfiguration){B(s.error(new Error("missing param AccelerateConfiguration")));return}var L={AccelerateConfiguration:S.AccelerateConfiguration||{}},D=s.json2xml(L),$={};$["Content-Type"]="application/xml",$["Content-MD5"]=s.b64(s.md5(D)),Ce.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:D,action:"accelerate",headers:$,tracker:S.tracker},function(F,V){if(F)return B(F);B(null,{statusCode:V.statusCode,headers:V.headers})})}function Ie(S,B){Ce.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:S.Bucket,Region:S.Region,action:"accelerate",tracker:S.tracker},function(L,D){L||!D.AccelerateConfiguration&&(D.AccelerateConfiguration={}),B(L,D)})}function tt(S,B){var L=S.ServerSideEncryptionConfiguration||{},D=L.Rule||L.Rules||[],$=s.json2xml({ServerSideEncryptionConfiguration:{Rule:D}}),F=S.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5($)),Ce.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:S.Bucket,Region:S.Region,body:$,action:"encryption",headers:F,tracker:S.tracker},function(V,W){if(V&&V.statusCode===204)return B(null,{statusCode:V.statusCode});if(V)return B(V);B(null,{statusCode:W.statusCode,headers:W.headers})})}function st(S,B){Ce.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"encryption",tracker:S.tracker},function(L,D){if(L){if(L.statusCode===404&&L.code==="NoSuchEncryptionConfiguration"){var $={EncryptionConfiguration:{Rules:[]},statusCode:L.statusCode};L.headers&&($.headers=L.headers),B(null,$)}else B(L);return}var F=s.makeArray(D.EncryptionConfiguration&&D.EncryptionConfiguration.Rule||[]);D.EncryptionConfiguration={Rules:F},B(L,D)})}function bt(S,B){Ce.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"encryption",tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function Ee(S,B){Ce.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:S.Bucket,Region:S.Region,Key:S.Key,VersionId:S.VersionId,headers:S.Headers,tracker:S.tracker},function(L,D){if(L){var $=L.statusCode;return S.Headers["If-Modified-Since"]&&$&&$===304?B(null,{NotModified:!0,statusCode:$}):B(L)}D.ETag=s.attr(D.headers,"etag",""),B(null,D)})}function Br(S,B){var L={};L.prefix=S.Prefix||"",L.delimiter=S.Delimiter,L["key-marker"]=S.KeyMarker,L["version-id-marker"]=S.VersionIdMarker,L["max-keys"]=S.MaxKeys,L["encoding-type"]=S.EncodingType,Ce.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:L.prefix,method:"GET",Bucket:S.Bucket,Region:S.Region,headers:S.Headers,qs:L,action:"versions",tracker:S.tracker},function(D,$){if(D)return B(D);var F=$.ListVersionsResult||{},V=F.DeleteMarker||[];V=s.isArray(V)?V:[V];var W=F.Version||[];W=s.isArray(W)?W:[W];var ae=s.clone(F);delete ae.DeleteMarker,delete ae.Version,s.extend(ae,{DeleteMarkers:V,Versions:W,statusCode:$.statusCode,headers:$.headers}),B(null,ae)})}function Lt(S,B){if(this.options.ObjectKeySimplifyCheck){var L=s.simplifyPath(S.Key);if(L==="/"){B(s.error(new Error("The Getobject Key is illegal")));return}}var D=S.Query||{},$=S.QueryString||"",F=s.throttleOnProgress.call(this,0,S.onProgress),V=S.tracker;V&&V.setParams({signStartTime:new Date().getTime()}),D["response-content-type"]=S.ResponseContentType,D["response-content-language"]=S.ResponseContentLanguage,D["response-expires"]=S.ResponseExpires,D["response-cache-control"]=S.ResponseCacheControl,D["response-content-disposition"]=S.ResponseContentDisposition,D["response-content-encoding"]=S.ResponseContentEncoding,Ce.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:S.Bucket,Region:S.Region,Key:S.Key,VersionId:S.VersionId,DataType:S.DataType,headers:S.Headers,qs:D,qsStr:$,rawBody:!0,onDownloadProgress:F,tracker:V},function(W,ae){if(F(null,!0),W){var Pe=W.statusCode;return S.Headers["If-Modified-Since"]&&Pe&&Pe===304?B(null,{NotModified:!0}):B(W)}B(null,{Body:ae.body,ETag:s.attr(ae.headers,"etag",""),statusCode:ae.statusCode,headers:ae.headers})})}function pn(S,B){var L=this,D=S.ContentLength,$=s.throttleOnProgress.call(L,D,S.onProgress),F=S.Headers;!F["Cache-Control"]&&!F["cache-control"]&&(F["Cache-Control"]=""),!F["Content-Type"]&&!F["content-type"]&&(F["Content-Type"]=S.Body&&S.Body.type||"");var V=S.UploadAddMetaMd5||L.options.UploadAddMetaMd5||L.options.UploadCheckContentMd5,W=S.tracker;V&&W&&W.setParams({md5StartTime:new Date().getTime()}),s.getBodyMd5(V,S.Body,function(ae){ae&&(W&&W.setParams({md5EndTime:new Date().getTime()}),L.options.UploadCheckContentMd5&&(F["Content-MD5"]=s.b64(ae)),(S.UploadAddMetaMd5||L.options.UploadAddMetaMd5)&&(F["x-cos-meta-md5"]=ae)),S.ContentLength!==void 0&&(F["Content-Length"]=S.ContentLength),$(null,!0),Ce.call(L,{Action:"name/cos:PutObject",TaskId:S.TaskId,method:"PUT",Bucket:S.Bucket,Region:S.Region,Key:S.Key,headers:S.Headers,qs:S.Query,body:S.Body,onProgress:$,tracker:W},function(Pe,Me){if(Pe)return $(null,!0),B(Pe);$({loaded:D,total:D},!0);var Xe=Sr({ForcePathStyle:L.options.ForcePathStyle,protocol:L.options.Protocol,domain:L.options.Domain,bucket:S.Bucket,region:L.options.UseAccelerate?"accelerate":S.Region,object:S.Key});Xe=Xe.substr(Xe.indexOf("://")+3),Me.Location=Xe,Me.ETag=s.attr(Me.headers,"etag",""),B(null,Me)})},S.onHashProgress)}function Oa(S,B){Ce.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:S.Bucket,Region:S.Region,Key:S.Key,headers:S.Headers,VersionId:S.VersionId,action:S.Recursive?"recursive":"",tracker:S.tracker},function(L,D){if(L){var $=L.statusCode;return $&&$===404?B(null,{BucketNotFound:!0,statusCode:$}):B(L)}B(null,{statusCode:D.statusCode,headers:D.headers})})}function ku(S,B){var L={};S.VersionId&&(L.versionId=S.VersionId),Ce.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:S.Bucket,Region:S.Region,Key:S.Key,headers:S.Headers,qs:L,action:"acl",tracker:S.tracker},function(D,$){if(D)return B(D);var F=$.AccessControlPolicy||{},V=F.Owner||{},W=F.AccessControlList&&F.AccessControlList.Grant||[];W=s.isArray(W)?W:[W];var ae=Ze(F);delete ae.GrantWrite,$.headers&&$.headers["x-cos-acl"]&&(ae.ACL=$.headers["x-cos-acl"]),ae=s.extend(ae,{Owner:V,Grants:W,statusCode:$.statusCode,headers:$.headers}),B(null,ae)})}function Mu(S,B){var L=S.Headers,D="";if(S.AccessControlPolicy){var $=s.clone(S.AccessControlPolicy||{}),F=$.Grants||$.Grant;F=s.isArray(F)?F:[F],delete $.Grant,delete $.Grants,$.AccessControlList={Grant:F},D=s.json2xml({AccessControlPolicy:$}),L["Content-Type"]="application/xml",L["Content-MD5"]=s.b64(s.md5(D))}s.each(L,function(V,W){W.indexOf("x-cos-grant-")===0&&(L[W]=Xr(L[W]))}),Ce.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:S.Bucket,Region:S.Region,Key:S.Key,action:"acl",headers:L,body:D,tracker:S.tracker},function(V,W){if(V)return B(V);B(null,{statusCode:W.statusCode,headers:W.headers})})}function Ru(S,B){var L=S.Headers;L.Origin=S.Origin,L["Access-Control-Request-Method"]=S.AccessControlRequestMethod,L["Access-Control-Request-Headers"]=S.AccessControlRequestHeaders,Ce.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:S.Bucket,Region:S.Region,Key:S.Key,headers:L,tracker:S.tracker},function(D,$){if(D)return D.statusCode&&D.statusCode===403?B(null,{OptionsForbidden:!0,statusCode:D.statusCode}):B(D);var F=$.headers||{};B(null,{AccessControlAllowOrigin:F["access-control-allow-origin"],AccessControlAllowMethods:F["access-control-allow-methods"],AccessControlAllowHeaders:F["access-control-allow-headers"],AccessControlExposeHeaders:F["access-control-expose-headers"],AccessControlMaxAge:F["access-control-max-age"],statusCode:$.statusCode,headers:$.headers})})}function Pu(S,B){var L=this,D=S.Headers;!D["Cache-Control"]&&!D["cache-control"]&&(D["Cache-Control"]="");var $=S.CopySource||"",F=s.getSourceParams.call(this,$);if(!F){B(s.error(new Error("CopySource format error")));return}var V=F.Bucket,W=F.Region,ae=decodeURIComponent(F.Key);Ce.call(this,{Scope:[{action:"name/cos:GetObject",bucket:V,region:W,prefix:ae},{action:"name/cos:PutObject",bucket:S.Bucket,region:S.Region,prefix:S.Key}],method:"PUT",Bucket:S.Bucket,Region:S.Region,Key:S.Key,VersionId:S.VersionId,headers:S.Headers,tracker:S.tracker},function(Pe,Me){if(Pe)return B(Pe);var Xe=s.clone(Me.CopyObjectResult||{}),ye=Sr({ForcePathStyle:L.options.ForcePathStyle,protocol:L.options.Protocol,domain:L.options.Domain,bucket:S.Bucket,region:S.Region,object:S.Key,isLocation:!0});s.extend(Xe,{Location:ye,statusCode:Me.statusCode,headers:Me.headers}),B(null,Xe)})}function Kt(S,B){var L=S.CopySource||"",D=s.getSourceParams.call(this,L);if(!D){B(s.error(new Error("CopySource format error")));return}var $=D.Bucket,F=D.Region,V=decodeURIComponent(D.Key);Ce.call(this,{Scope:[{action:"name/cos:GetObject",bucket:$,region:F,prefix:V},{action:"name/cos:PutObject",bucket:S.Bucket,region:S.Region,prefix:S.Key}],method:"PUT",Bucket:S.Bucket,Region:S.Region,Key:S.Key,VersionId:S.VersionId,qs:{partNumber:S.PartNumber,uploadId:S.UploadId},headers:S.Headers,tracker:S.tracker},function(W,ae){if(W)return B(W);var Pe=s.clone(ae.CopyPartResult||{});s.extend(Pe,{statusCode:ae.statusCode,headers:ae.headers}),B(null,Pe)})}function he(S,B){var L=S.Objects||[],D=S.Quiet;L=s.isArray(L)?L:[L];var $=s.json2xml({Delete:{Object:L,Quiet:D||!1}}),F=S.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5($));var V=s.map(L,function(W){return{action:"name/cos:DeleteObject",bucket:S.Bucket,region:S.Region,prefix:W.Key}});Ce.call(this,{Scope:V,method:"POST",Bucket:S.Bucket,Region:S.Region,body:$,action:"delete",headers:F,tracker:S.tracker},function(W,ae){if(W)return B(W);var Pe=ae.DeleteResult||{},Me=Pe.Deleted||[],Xe=Pe.Error||[];Me=s.isArray(Me)?Me:[Me],Xe=s.isArray(Xe)?Xe:[Xe];var ye=s.clone(Pe);s.extend(ye,{Error:Xe,Deleted:Me,statusCode:ae.statusCode,headers:ae.headers}),B(null,ye)})}function H(S,B){var L=S.Headers;if(!S.RestoreRequest){B(s.error(new Error("missing param RestoreRequest")));return}var D=S.RestoreRequest||{},$=s.json2xml({RestoreRequest:D});L["Content-Type"]="application/xml",L["Content-MD5"]=s.b64(s.md5($)),Ce.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:S.Bucket,Region:S.Region,Key:S.Key,VersionId:S.VersionId,body:$,action:"restore",headers:L,tracker:S.tracker},B)}function K(S,B){var L=S.Tagging||{},D=L.TagSet||L.Tags||S.Tags||[];D=s.clone(s.isArray(D)?D:[D]);var $=s.json2xml({Tagging:{TagSet:{Tag:D}}}),F=S.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5($)),Ce.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:S.Bucket,Key:S.Key,Region:S.Region,body:$,action:"tagging",headers:F,VersionId:S.VersionId,tracker:S.tracker},function(V,W){if(V&&V.statusCode===204)return B(null,{statusCode:V.statusCode});if(V)return B(V);B(null,{statusCode:W.statusCode,headers:W.headers})})}function Q(S,B){Ce.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:S.Key,Bucket:S.Bucket,Region:S.Region,headers:S.Headers,action:"tagging",VersionId:S.VersionId,tracker:S.tracker},function(L,D){if(L){if(L.statusCode===404&&L.error&&(L.error==="Not Found"||L.error.Code==="NoSuchTagSet")){var $={Tags:[],statusCode:L.statusCode};L.headers&&($.headers=L.headers),B(null,$)}else B(L);return}var F=[];try{F=D.Tagging.TagSet.Tag||[]}catch{}F=s.clone(s.isArray(F)?F:[F]),B(null,{Tags:F,statusCode:D.statusCode,headers:D.headers})})}function pe(S,B){Ce.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:S.Bucket,Region:S.Region,Key:S.Key,headers:S.Headers,action:"tagging",VersionId:S.VersionId,tracker:S.tracker},function(L,D){if(L&&L.statusCode===204)return B(null,{statusCode:L.statusCode});if(L)return B(L);B(null,{statusCode:D.statusCode,headers:D.headers})})}function ge(S,B){var L=S.SelectType;if(!L)return B(s.error(new Error("missing param SelectType")));var D=S.SelectRequest||{},$=s.json2xml({SelectRequest:D}),F=S.Headers;F["Content-Type"]="application/xml",F["Content-MD5"]=s.b64(s.md5($)),Ce.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:S.Bucket,Region:S.Region,Key:S.Key,headers:S.Headers,action:"select",qs:{"select-type":S.SelectType},VersionId:S.VersionId,body:$,DataType:"arraybuffer",rawBody:!0,tracker:S.tracker},function(V,W){if(V&&V.statusCode===204)return B(null,{statusCode:V.statusCode});if(V)return B(V);var ae=s.parseSelectPayload(W.body);B(null,{statusCode:W.statusCode,headers:W.headers,Body:ae.body,Payload:ae.payload})})}function ke(S,B){var L=this,D=S.Headers,$=S.tracker;!D["Cache-Control"]&&!D["cache-control"]&&(D["Cache-Control"]=""),!D["Content-Type"]&&!D["content-type"]&&(D["Content-Type"]=S.Body&&S.Body.type||"");var F=S.Body&&(S.UploadAddMetaMd5||L.options.UploadAddMetaMd5);F&&$&&$.setParams({md5StartTime:new Date().getTime()}),s.getBodyMd5(F,S.Body,function(V){V&&(S.Headers["x-cos-meta-md5"]=V),F&&$&&$.setParams({md5EndTime:new Date().getTime()}),Ce.call(L,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:S.Bucket,Region:S.Region,Key:S.Key,action:"uploads",headers:S.Headers,qs:S.Query,tracker:$},function(W,ae){if(W)return $&&$.parent&&$.parent.setParams({errorNode:"multipartInit"}),B(W);if(ae=s.clone(ae||{}),ae&&ae.InitiateMultipartUploadResult)return B(null,s.extend(ae.InitiateMultipartUploadResult,{statusCode:ae.statusCode,headers:ae.headers}));B(null,ae)})},S.onHashProgress)}function Be(S,B){var L=this;s.getFileSize("multipartUpload",S,function(){var D=S.tracker,$=L.options.UploadCheckContentMd5;$&&D&&D.setParams({md5StartTime:new Date().getTime()}),s.getBodyMd5($,S.Body,function(F){F&&(S.Headers["Content-MD5"]=s.b64(F)),$&&D&&D.setParams({md5EndTime:new Date().getTime()}),D&&D.setParams({partNumber:S.PartNumber}),Ce.call(L,{Action:"name/cos:UploadPart",TaskId:S.TaskId,method:"PUT",Bucket:S.Bucket,Region:S.Region,Key:S.Key,qs:{partNumber:S.PartNumber,uploadId:S.UploadId},headers:S.Headers,onProgress:S.onProgress,body:S.Body||null,tracker:D},function(V,W){if(V)return D&&D.parent&&D.parent.setParams({errorNode:"multipartUpload"}),B(V);B(null,{ETag:s.attr(W.headers,"etag",""),statusCode:W.statusCode,headers:W.headers})})})})}function Fe(S,B){for(var L=this,D=S.UploadId,$=S.Parts,F=S.tracker,V=0,W=$.length;V-1?Xe(Me.Authorization):"sign="+encodeURIComponent(Me.Authorization)),Me.SecurityToken&&(ye+="&x-cos-security-token="+Me.SecurityToken),Me.ClientIP&&(ye+="&clientIP="+Me.ClientIP),Me.ClientUA&&(ye+="&clientUA="+Me.ClientUA),Me.Token&&(ye+="&token="+Me.Token),F&&(ye+="&"+F),setTimeout(function(){B(null,{Url:ye})})}});return ae?(V+="?"+ae.Authorization+(ae.SecurityToken?"&x-cos-security-token="+ae.SecurityToken:""),F&&(V+="&"+F)):F&&(V+="?"+F),V}function Ze(S){var B={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},L={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},D=S&&S.AccessControlList||{},$=D.Grant;$&&($=s.isArray($)?$:[$]);var F={READ:0,WRITE:0,FULL_CONTROL:0};return $&&$.length&&s.each($,function(V){var W=V.Grantee.URI&&V.Grantee.URI.endsWith("/groups/global/AllUsers");V.Grantee.ID==="qcs::cam::anyone:anyone"||W?F[V.Permission]=1:V.Grantee.ID!==S.Owner.ID&&B[L[V.Permission]].push('id="'+V.Grantee.ID+'"')}),F.FULL_CONTROL||F.WRITE&&F.READ?B.ACL="public-read-write":F.READ?B.ACL="public-read":B.ACL="private",s.each(L,function(V){B[V]=Xr(B[V].join(","))}),B}function Xr(S){var B=S.split(","),L={},D,$;for(D=0;D"u"?"undefined":a(location))==="object"&&location.protocol==="http:"?"http:":"https:");F||(["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(B)>-1?F="{Region}.myqcloud.com":F="cos.{Region}.myqcloud.com",S.ForcePathStyle||(F="{Bucket}."+F)),F=F.replace(/\{\{AppId\}\}/gi,$).replace(/\{\{Bucket\}\}/gi,D).replace(/\{\{Region\}\}/gi,B).replace(/\{\{.*?\}\}/gi,""),F=F.replace(/\{AppId\}/gi,$).replace(/\{BucketName\}/gi,D).replace(/\{Bucket\}/gi,L).replace(/\{Region\}/gi,B).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(F)||(F=W+"//"+F),F.slice(-1)==="/"&&(F=F.slice(0,-1));var ae=F;return S.ForcePathStyle&&(ae+="/"+L),ae+="/",V&&(ae+=s.camSafeUrlEncode(V).replace(/%2F/g,"/")),S.isLocation&&(ae=ae.replace(/^https?:\/\//,"")),ae}var qi=function(B){if(!B.Bucket||!B.Region)return"";var L=B.UseAccelerate===void 0?this.options.UseAccelerate:B.UseAccelerate,D=B.Url||Sr({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:B.Bucket,region:L?"accelerate":B.Region}),$=D.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return $};function is(S,B){var L=s.clone(S.Headers),D="";s.each(L,function(at,Ve){(at===""||["content-type","cache-control","expires"].indexOf(Ve.toLowerCase())>-1)&&delete L[Ve],Ve.toLowerCase()==="host"&&(D=at)});var $=S.ForceSignHost!==!1;!D&&S.SignHost&&$&&(L.Host=S.SignHost);var F=!1,V=function(Ve,$e){F||(F=!0,$e&&$e.XCosSecurityToken&&!$e.SecurityToken&&($e=s.clone($e),$e.SecurityToken=$e.XCosSecurityToken,delete $e.XCosSecurityToken),B&&B(Ve,$e))},W=this,ae=S.Bucket||"",Pe=S.Region||"",Me=S.Key||"";W.options.ForcePathStyle&&ae&&(Me=ae+"/"+Me);var Xe="/"+Me,ye={},We=S.Scope;if(!We){var cr=S.Action||"",Et=S.ResourceKey||S.Key||"";We=S.Scope||[{action:cr,bucket:ae,region:Pe,prefix:Et}]}var fr=s.md5(JSON.stringify(We));W._StsCache=W._StsCache||[],function(){var at,Ve;for(at=W._StsCache.length-1;at>=0;at--){Ve=W._StsCache[at];var $e=Math.round(s.getSkewTime(W.options.SystemClockOffset)/1e3)+30;if(Ve.StartTime&&$e=Ve.ExpiredTime){W._StsCache.splice(at,1);continue}if(!Ve.ScopeLimit||Ve.ScopeLimit&&Ve.ScopeKey===fr){ye=Ve;break}}}();var br=function(){var Ve="";ye.StartTime&&S.Expires?Ve=ye.StartTime+";"+(ye.StartTime+S.Expires*1):ye.StartTime&&ye.ExpiredTime&&(Ve=ye.StartTime+";"+ye.ExpiredTime);var $e=s.getAuth({SecretId:ye.TmpSecretId,SecretKey:ye.TmpSecretKey,Method:S.Method,Pathname:Xe,Query:S.Query,Headers:L,Expires:S.Expires,UseRawKey:W.options.UseRawKey,SystemClockOffset:W.options.SystemClockOffset,KeyTime:Ve,ForceSignHost:$}),ct={Authorization:$e,SecurityToken:ye.SecurityToken||ye.XCosSecurityToken||"",Token:ye.Token||"",ClientIP:ye.ClientIP||"",ClientUA:ye.ClientUA||"",SignFrom:"client"};V(null,ct)},Kr=function(Ve){if(Ve.Authorization){var $e=!1,ct=Ve.Authorization;if(ct)if(ct.indexOf(" ")>-1)$e=!1;else if(ct.indexOf("q-sign-algorithm=")>-1&&ct.indexOf("q-ak=")>-1&&ct.indexOf("q-sign-time=")>-1&&ct.indexOf("q-key-time=")>-1&&ct.indexOf("q-url-param-list=")>-1)$e=!0;else try{ct=atob(ct),ct.indexOf("a=")>-1&&ct.indexOf("k=")>-1&&ct.indexOf("t=")>-1&&ct.indexOf("r=")>-1&&ct.indexOf("b=")>-1&&($e=!0)}catch{}if(!$e)return s.error(new Error("getAuthorization callback params format error"))}else{if(!Ve.TmpSecretId)return s.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!Ve.TmpSecretKey)return s.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!Ve.SecurityToken&&!Ve.XCosSecurityToken)return s.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!Ve.ExpiredTime)return s.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(Ve.ExpiredTime&&Ve.ExpiredTime.toString().length!==10)return s.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(Ve.StartTime&&Ve.StartTime.toString().length!==10)return s.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(ye.ExpiredTime&&ye.ExpiredTime-s.getSkewTime(W.options.SystemClockOffset)/1e3>60)br();else if(W.options.getAuthorization)W.options.getAuthorization.call(W,{Bucket:ae,Region:Pe,Method:S.Method,Key:Me,Pathname:Xe,Query:S.Query,Headers:L,Scope:We,SystemClockOffset:W.options.SystemClockOffset,ForceSignHost:$},function(at){typeof at=="string"&&(at={Authorization:at});var Ve=Kr(at);if(Ve)return V(Ve);at.Authorization?V(null,at):(ye=at||{},ye.Scope=We,ye.ScopeKey=fr,W._StsCache.push(ye),br())});else if(W.options.getSTS)W.options.getSTS.call(W,{Bucket:ae,Region:Pe},function(at){ye=at||{},ye.Scope=We,ye.ScopeKey=fr,ye.TmpSecretId||(ye.TmpSecretId=ye.SecretId),ye.TmpSecretKey||(ye.TmpSecretKey=ye.SecretKey);var Ve=Kr(ye);if(Ve)return V(Ve);W._StsCache.push(ye),br()});else return function(){var at="";if(W.options.StartTime&&S.Expires){if(W.options.StartTime.toString().length!==10)return V(s.error(new Error('params "StartTime" should be 10 digits')));at=W.options.StartTime+";"+(W.options.StartTime+S.Expires*1)}else if(W.options.StartTime&&W.options.ExpiredTime){if(W.options.StartTime.toString().length!==10)return V(s.error(new Error('params "StartTime" should be 10 digits')));if(W.options.ExpiredTime.toString().length!==10)return V(s.error(new Error('params "ExpiredTime" should be 10 digits')));at=W.options.StartTime+";"+W.options.ExpiredTime*1}var Ve=s.getAuth({SecretId:S.SecretId||W.options.SecretId,SecretKey:S.SecretKey||W.options.SecretKey,Method:S.Method,Pathname:Xe,Query:S.Query,Headers:L,Expires:S.Expires,KeyTime:at,UseRawKey:W.options.UseRawKey,SystemClockOffset:W.options.SystemClockOffset,ForceSignHost:$}),$e={Authorization:Ve,SecurityToken:W.options.SecurityToken||W.options.XCosSecurityToken,SignFrom:"client"};return V(null,$e),$e}();return""}function Lu(S){var B=this,L=!1,D=!1,$=!1,F=S.headers&&(S.headers.date||S.headers.Date)||S.error&&S.error.ServerTime;try{var V=S.error.Code,W=S.error.Message;(V==="RequestTimeTooSkewed"||V==="AccessDenied"&&W==="Request has expired")&&(D=!0)}catch{}if(S)if(D&&F){var ae=Date.parse(F);this.options.CorrectClockSkew&&Math.abs(s.getSkewTime(this.options.SystemClockOffset)-ae)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=ae-Date.now(),L=!0)}else Math.floor(S.statusCode/100)===5?L=!0:S.message==="CORS blocked or network error"&&($=!0,L=B.options.AutoSwitchHost);return{canRetry:L,networkError:$}}function Eu(S){var B=S.requestUrl,L=S.clientCalcSign,D=S.networkError;if(!this.options.AutoSwitchHost||!B||!L||!D)return!1;var $=/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/,F=/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/,V=$.test(B)&&!F.test(B);return V}function Ce(S,B){var L=this;!S.headers&&(S.headers={}),!S.qs&&(S.qs={}),S.VersionId&&(S.qs.versionId=S.VersionId),S.qs=s.clearKey(S.qs),S.headers&&(S.headers=s.clearKey(S.headers)),S.qs&&(S.qs=s.clearKey(S.qs));var D=s.clone(S.qs);S.action&&(D[S.action]="");var $=S.url||S.Url,F=S.SignHost||qi.call(this,{Bucket:S.Bucket,Region:S.Region,Url:$}),V=S.tracker,W=function ae(Pe){var Me=L.options.SystemClockOffset;V&&V.setParams({signStartTime:new Date().getTime(),httpRetryTimes:Pe-1}),S.SwitchHost&&(F=F.replace(/myqcloud.com/,"tencentcos.cn")),is.call(L,{Bucket:S.Bucket||"",Region:S.Region||"",Method:S.method,Key:S.Key,Query:D,Headers:S.headers,SignHost:F,Action:S.Action,ResourceKey:S.ResourceKey,Scope:S.Scope,ForceSignHost:L.options.ForceSignHost,SwitchHost:S.SwitchHost},function(Xe,ye){if(Xe){B(Xe);return}V&&V.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),S.AuthData=ye,Du.call(L,S,function(We,cr){V&&V.setParams({httpEndTime:new Date().getTime()});var Et=!1,fr=!1;if(We){var br=Lu.call(L,We);Et=br.canRetry||Me!==L.options.SystemClockOffset,fr=br.networkError}if(We&&Pe<2&&Et){S.headers&&(delete S.headers.Authorization,delete S.headers.token,delete S.headers.clientIP,delete S.headers.clientUA,S.headers["x-cos-security-token"]&&delete S.headers["x-cos-security-token"],S.headers["x-ci-security-token"]&&delete S.headers["x-ci-security-token"]);var Kr=Eu.call(L,{requestUrl:(We==null?void 0:We.url)||"",clientCalcSign:ye.SignFrom==="client",networkError:fr});S.SwitchHost=Kr,S.retry=!0,ae(Pe+1)}else B(We,cr)})})};W(1)}function Du(S,B){var L=this,D=S.TaskId;if(!(D&&!L._isRunningTask(D))){var $=S.Bucket,F=S.Region,V=S.Key,W=S.method||"GET",ae=S.Url||S.url,Pe=S.body,Me=S.rawBody;L.options.UseAccelerate&&(F="accelerate"),ae=ae||Sr({ForcePathStyle:L.options.ForcePathStyle,protocol:L.options.Protocol,domain:L.options.Domain,bucket:$,region:F,object:V}),S.SwitchHost&&(ae=ae.replace(/myqcloud.com/,"tencentcos.cn"));var Xe=V?ae:"";S.action&&(ae=ae+"?"+(s.isIOS_QQ?"".concat(S.action,"="):S.action)),S.qsStr&&(ae.indexOf("?")>-1?ae=ae+"&"+S.qsStr:ae=ae+"?"+S.qsStr);var ye={method:W,url:ae,headers:S.headers,qs:S.qs,body:Pe},We="x-cos-security-token";if(s.isCIHost(ae)&&(We="x-ci-security-token"),ye.headers.Authorization=S.AuthData.Authorization,S.AuthData.Token&&(ye.headers.token=S.AuthData.Token),S.AuthData.ClientIP&&(ye.headers.clientIP=S.AuthData.ClientIP),S.AuthData.ClientUA&&(ye.headers.clientUA=S.AuthData.ClientUA),S.AuthData.SecurityToken&&(ye.headers[We]=S.AuthData.SecurityToken),ye.headers&&(ye.headers=s.clearKey(ye.headers)),S.retry&&(ye.headers["x-cos-sdk-retry"]=!0),ye=s.clearKey(ye),S.onProgress&&typeof S.onProgress=="function"){var cr=Pe&&(Pe.size||Pe.length)||0;ye.onProgress=function($e){if(!(D&&!L._isRunningTask(D))){var ct=$e?$e.loaded:0;S.onProgress({loaded:ct,total:cr})}}}S.onDownloadProgress&&(ye.onDownloadProgress=S.onDownloadProgress),S.DataType&&(ye.dataType=S.DataType),this.options.Timeout&&(ye.timeout=this.options.Timeout),L.options.ForcePathStyle&&(ye.pathStyle=L.options.ForcePathStyle),L.emit("before-send",ye);var Et=ye.url.includes("accelerate."),fr=ye.qs?Object.keys(ye.qs).map(function($e){return"".concat($e,"=").concat(ye.qs[$e])}).join("&"):"",br=fr?ye.url+"?"+fr:ye.url;if(S.tracker){var Kr;S.tracker.setParams({url:br,httpMethod:ye.method,accelerate:Et,httpSize:((Kr=ye.body)===null||Kr===void 0?void 0:Kr.size)||0}),S.tracker.parent&&!S.tracker.parent.params.url&&S.tracker.parent.setParams({url:Xe,accelerate:Et})}var at=(L.options.Request||o)(ye,function($e){if(!($e&&$e.error==="abort")){var ct={options:ye,error:$e&&$e.error,statusCode:$e&&$e.statusCode||0,statusMessage:$e&&$e.statusMessage||"",headers:$e&&$e.headers||{},body:$e&&$e.body};L.emit("after-receive",ct);var Bu=ct.error,as=ct.body,Rn={statusCode:ct.statusCode,statusMessage:ct.statusMessage,headers:ct.headers},Dd,ui=function(ci,Tt){if(D&&L.off("inner-kill-task",Ve),!Dd){Dd=!0;var Xi={};if(Rn&&Rn.statusCode&&(Xi.statusCode=Rn.statusCode),Rn&&Rn.headers&&(Xi.headers=Rn.headers),ci)ye.url&&(Xi.url=ye.url),ye.method&&(Xi.method=ye.method),ci=s.extend(ci||{},Xi),B(ci,null);else{if(S.Action==="name/cos:PutObject"){var Nu={};for(var Nd in S.headers){var gS=Nd.toLowerCase();Nu[gS]=S.headers[Nd]}Nu["x-cos-callback"]?Tt.Error?(Tt.CallbackError=s.clone(Tt.Error),delete Tt.Error):Tt.CallbackBody=s.clone(Tt):Nu["x-cos-return-body"]&&(Tt.Error?(Tt.ReturnError=s.clone(Tt.Error),delete Tt.Error):Tt.ReturnBody=s.clone(Tt))}Tt=s.extend(Tt||{},Xi),B(null,Tt)}at=null}};if(Bu)return ui(s.error(Bu));var os=Rn.statusCode,Bd=Math.floor(os/100)===2;if(Me){if(Bd)return ui(null,{body:as});if(as instanceof Blob){s.readAsBinaryString(as,function(Od){var ci=s.parseResBody(Od),Tt=ci.Error||ci;return ui(s.error(new Error(Tt.Message||"response body error"),{code:Tt.Code,error:Tt}))});return}}var Ou=s.parseResBody(as),ss=Ou.Error||Ou;Bd?ui(null,Ou):ss?ui(s.error(new Error(ss.Message),{code:ss.Code,error:ss})):os?ui(s.error(new Error(Rn.statusMessage),{code:""+os})):os&&ui(s.error(new Error("statusCode error")))}}),Ve=function $e(ct){ct.TaskId===D&&(at&&at.abort&&at.abort(),L.off("inner-kill-task",$e))};D&&L.on("inner-kill-task",Ve)}}var Ed={getService:l,putBucket:u,headBucket:f,getBucket:c,deleteBucket:h,putBucketAcl:d,getBucketAcl:v,putBucketCors:p,getBucketCors:g,deleteBucketCors:y,getBucketLocation:m,getBucketPolicy:k,putBucketPolicy:w,deleteBucketPolicy:R,putBucketTagging:C,getBucketTagging:x,deleteBucketTagging:M,putBucketLifecycle:b,getBucketLifecycle:T,deleteBucketLifecycle:_,putBucketVersioning:I,getBucketVersioning:A,putBucketReplication:P,getBucketReplication:O,deleteBucketReplication:E,putBucketWebsite:N,getBucketWebsite:z,deleteBucketWebsite:U,putBucketReferer:q,getBucketReferer:Y,putBucketDomain:Z,getBucketDomain:se,deleteBucketDomain:ce,putBucketOrigin:J,getBucketOrigin:X,deleteBucketOrigin:ee,putBucketLogging:ue,getBucketLogging:_e,putBucketInventory:ie,postBucketInventory:ne,getBucketInventory:Ae,listBucketInventory:re,deleteBucketInventory:le,putBucketAccelerate:we,getBucketAccelerate:Ie,putBucketEncryption:tt,getBucketEncryption:st,deleteBucketEncryption:bt,getObject:Lt,headObject:Ee,listObjectVersions:Br,putObject:pn,deleteObject:Oa,getObjectAcl:ku,putObjectAcl:Mu,optionsObject:Ru,putObjectCopy:Pu,deleteMultipleObject:he,restoreObject:H,putObjectTagging:K,getObjectTagging:Q,deleteObjectTagging:pe,selectObjectContent:ge,appendObject:ur,uploadPartCopy:Kt,multipartInit:ke,multipartUpload:Be,multipartComplete:Fe,multipartList:rt,multipartListPart:pt,multipartAbort:Ct,request:mt,getObjectUrl:Or,getAuth:li};function pS(S,B,L){s.each(["Cors","Acl"],function(D){if(S.slice(-D.length)===D){var $=S.slice(0,-D.length)+D.toUpperCase(),F=s.apiWrapper(S,B),V=!1;L[$]=function(){!V&&console.warn("warning: cos."+$+" has been deprecated. Please Use cos."+S+" instead."),V=!0,F.apply(this,arguments)}}})}r.exports.init=function(S,B){B.transferToTaskMethod(Ed,"putObject"),s.each(Ed,function(L,D){S.prototype[D]=s.apiWrapper(D,L),pS(D,L,S.prototype)})}},"./src/cos.js":function(r,n,i){var a=i("./src/util.js"),o=i("./src/event.js"),s=i("./src/task.js"),l=i("./src/base.js"),u=i("./src/advance.js"),f=i("./package.json"),c={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",StartTime:0,ExpiredTime:0,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,AutoSwitchHost:!0,CopySourceParser:null,ObjectKeySimplifyCheck:!0,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},h=function(v){if(this.options=a.extend(a.clone(c),v||{}),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.EnableReporter=this.options.BeaconReporter||this.options.ClsReporter,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")),a.isNode()&&(console.log("Tip: Next.js、Nuxt.js 等服务端渲染技术可正常使用JavaScript SDK,请忽略下方 nodejs 环境警告"),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")),this.options.ForcePathStyle)throw console.warn("cos-js-sdk-v5不再支持使用path-style,仅支持使用virtual-hosted-style,参考文档:https://cloud.tencent.com/document/product/436/96243"),new Error("ForcePathStyle is not supported");o.init(this),s.init(this)};l.init(h,s),u.init(h,s),h.util={md5:a.md5,xml2json:a.xml2json,json2xml:a.json2xml,encodeBase64:a.encodeBase64},h.getAuthorization=a.getAuth,h.version=f.version,r.exports=h},"./src/event.js":function(r,n){var i=function(s){var l={},u=function(c){return!l[c]&&(l[c]=[]),l[c]};s.on=function(f,c){f==="task-list-update"&&console.warn('warning: Event "'+f+'" has been deprecated. Please use "list-update" instead.'),u(f).push(c)},s.off=function(f,c){for(var h=u(f),d=h.length-1;d>=0;d--)c===h[d]&&h.splice(d,1)},s.emit=function(f,c){for(var h=u(f).map(function(v){return v}),d=0;d=0;m--){var w=l[m][2];(!w||w+s=0;w--){var k=l[w];k[0]===g&&k[1]===y&&l.splice(w,1)}l.unshift([g,y,Math.round(Date.now()/1e3)]),l.length>m&&l.splice(m),d()}},removeUploadId:function(g){h.call(this),delete v.using[g];for(var y=l.length-1;y>=0;y--)l[y][1]===g&&l.splice(y,1);d()}};r.exports=v},"./src/task.js":function(r,n,i){var a=i("./src/session.js"),o=i("./src/util.js"),s={},l=function(c,h){s[h]=c[h],c[h]=function(d,v){d.SkipTask?s[h].call(this,d,v):this._addTask(h,d,v)}},u=function(c){var h=[],d={},v=0,p=0,g=function(x){var M={id:x.id,Bucket:x.Bucket,Region:x.Region,Key:x.Key,FilePath:x.FilePath,state:x.state,loaded:x.loaded,size:x.size,speed:x.speed,percent:x.percent,hashPercent:x.hashPercent,error:x.error};return x.FilePath&&(M.FilePath=x.FilePath),x._custom&&(M._custom=x._custom),M},y=function(){var C,x=function(){C=0,c.emit("task-list-update",{list:o.map(h,g)}),c.emit("list-update",{list:o.map(h,g)})};return function(){C||(C=setTimeout(x))}}(),m=function(){if(!(h.length<=c.options.UploadQueueSize)){for(var x=0;xc.options.UploadQueueSize;){var M=h[x].state==="waiting"||h[x].state==="checking"||h[x].state==="uploading";!h[x]||!M?(d[h[x].id]&&delete d[h[x].id],h.splice(x,1),p--):x++}y()}},w=function C(){if(!(v>=c.options.FileParallelLimit)){for(;h[p]&&h[p].state!=="waiting";)p++;if(!(p>=h.length)){var x=h[p];p++,v++,x.state="checking",x.params.onTaskStart&&x.params.onTaskStart(g(x)),!x.params.UploadData&&(x.params.UploadData={});var M=o.formatParams(x.api,x.params);s[x.api].call(c,M,function(b,T){c._isRunningTask(x.id)&&((x.state==="checking"||x.state==="uploading")&&(x.state=b?"error":"success",b&&(x.error=b),v--,y(),C(),x.callback&&x.callback(b,T),x.state==="success"&&(x.params&&(delete x.params.UploadData,delete x.params.Body,delete x.params),delete x.callback)),m())}),y(),setTimeout(C)}}},k=function(x,M){var b=d[x];if(b){var T=b&&b.state==="waiting",_=b&&(b.state==="checking"||b.state==="uploading");if(M==="canceled"&&b.state!=="canceled"||M==="paused"&&T||M==="paused"&&_){b.state=M,c.emit("inner-kill-task",{TaskId:x,toState:M});try{var I=b&&b.params&&b.params.UploadData.UploadId}catch{}M==="canceled"&&I&&a.removeUsing(I),y(),_&&(v--,w()),M==="canceled"&&(b.params&&(delete b.params.UploadData,delete b.params.Body,delete b.params),delete b.callback)}m()}};c._addTasks=function(C){o.each(C,function(x){c._addTask(x.api,x.params,x.callback,!0)}),y()};var R=!0;c._addTask=function(C,x,M,b){x=o.formatParams(C,x);var T=o.uuid();x.TaskId=T,x.onTaskReady&&x.onTaskReady(T),x.TaskReady&&(x.TaskReady(T),R&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),R=!1);var _={params:x,callback:M,api:C,index:h.length,id:T,Bucket:x.Bucket,Region:x.Region,Key:x.Key,FilePath:x.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:x._custom},I=x.onHashProgress;x.onHashProgress=function(P){c._isRunningTask(_.id)&&(_.hashPercent=P.percent,I&&I(P),y())};var A=x.onProgress;return x.onProgress=function(P){c._isRunningTask(_.id)&&(_.state==="checking"&&(_.state="uploading"),_.loaded=P.loaded,_.speed=P.speed,_.percent=P.percent,A&&A(P),y())},o.getFileSize(C,x,function(P,O){if(P)return M(o.error(P));d[T]=_,h.push(_),_.size=O,!b&&y(),w(),m()}),T},c._isRunningTask=function(C){var x=d[C];return!!(x&&(x.state==="checking"||x.state==="uploading"))},c.getTaskList=function(){return o.map(h,g)},c.cancelTask=function(C){k(C,"canceled")},c.pauseTask=function(C){k(C,"paused")},c.restartTask=function(C){var x=d[C];x&&(x.state==="paused"||x.state==="error")&&(x.state="waiting",y(),p=Math.min(p,x.index),w())},c.isUploadRunning=function(){return v||p"u"?"undefined":s(navigator))==="object"){var M=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(M==null?void 0:M.type)||(M==null?void 0:M.effectiveType)||"unknown"}return"unknown"},getProtocol:function(){return(typeof location>"u"?"undefined":s(location))==="object"?location.protocol.replace(/:/,""):"unknown protocol"},getOsType:function(){if((typeof navigator>"u"?"undefined":s(navigator))!=="object")return"unknown os";var M=navigator.userAgent.toLowerCase(),b=/macintosh|mac os x/i.test(navigator.userAgent);return M.indexOf("win32")>=0||M.indexOf("wow32")>=0?"win32":M.indexOf("win64")>=0||M.indexOf("wow64")>=0?"win64":b?"mac":"unknown os"},isMobile:function(){var M=/(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(M))},isAndroid:function(){var M=/(Android|Adr|Linux)/i;return!!((typeof navigator>"u"?"undefined":s(navigator))==="object"&&navigator.userAgent.match(M))},isIOS:function(){var M=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator>"u"?"undefined":s(navigator))==="object"&&navigator.userAgent.match(M))},isOtherMobile:function(){return d&&!isAndroid&&!isIOS},getUA:function(){if((typeof navigator>"u"?"undefined":s(navigator))!=="object")return"unknown device";var M=navigator.userAgent;return M}},d=h.isMobile(),v=h.isAndroid()?"android":h.isIOS?"ios":"other_mobile",p=h.getOsType(),g=d?v:p,y=h.getUA(),m=h.getProtocol(),w=function(M){return["putObject","sliceUploadFile","uploadFile","uploadFiles"].includes(M)?"UploadTask":M==="getObject"?"DownloadTask":["putObjectCopy","sliceCopyFile"].includes(M)?"CopyTask":M};function k(x){return x.replace(/([A-Z])/g,"_$1").toLowerCase()}function R(x){var M={},b=["sdkVersionName","sdkVersionCode","osName","networkType","requestName","requestResult","bucket","region","appid","accelerate","url","host","requestPath","userAgent","networkProtocol","httpMethod","httpSize","httpSpeed","httpTookTime","httpMd5","httpSign","httpFullTime","httpDomain","partNumber","httpRetryTimes","customId","traceId","realApi"],T=[].concat(b,["errorNode","errorCode","errorName","errorMessage","errorRequestId","errorHttpCode","errorServiceName","errorType","fullError"]),_=x.requestResult==="Success"?b:T;for(var I in x)if(_.includes(I)){var A=k(I);M[A]=x[I]}return M.request_name=x.realApi?w(x.realApi):x.requestName,M}var C=function(){function x(M){a(this,x);var b=M.parent,T=M.traceId,_=M.bucket,I=M.region,A=M.apiName,P=M.realApi,O=M.httpMethod,E=M.fileKey,N=M.fileSize,z=M.accelerate,U=M.customId,q=M.delay,Y=M.deepTracker,Z=M.Beacon,se=M.clsReporter,ce=_&&_.substr(_.lastIndexOf("-")+1)||"";this.parent=b,this.deepTracker=Y,this.delay=q,se&&!this.clsReporter&&(this.clsReporter=se),this.params={sdkVersionName:"cos-js-sdk-v5",sdkVersionCode:l.version,osName:g,networkType:"",requestName:A||"",requestResult:"",realApi:P,bucket:_,region:I,accelerate:z,httpMethod:O,url:"",host:"",httpDomain:"",requestPath:E||"",userAgent:y,networkProtocol:m,errorType:"",errorCode:"",errorName:"",errorMessage:"",errorRequestId:"",errorHttpCode:0,errorServiceName:"",errorNode:"",httpTookTime:0,httpSize:N||0,httpMd5:0,httpSign:0,httpFullTime:0,httpSpeed:0,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0,traceId:T||h.getUid(),appid:ce,partNumber:0,httpRetryTimes:0,customId:U||"",partTime:0},Z&&(this.beacon=f(Z,q))}return o(x,[{key:"formatResult",value:function(b,T){var _,I,A,P,O,E,N=new Date().getTime(),z=h.getNetType(),U=b?(b==null?void 0:b.code)||(b==null||(_=b.error)===null||_===void 0?void 0:_.code)||(b==null||(I=b.error)===null||I===void 0?void 0:I.Code):"",q=b?(b==null?void 0:b.message)||(b==null||(A=b.error)===null||A===void 0?void 0:A.message)||(b==null||(P=b.error)===null||P===void 0?void 0:P.Message):"",Y=q,Z=b?(b==null?void 0:b.resource)||(b==null||(O=b.error)===null||O===void 0?void 0:O.resource)||(b==null||(E=b.error)===null||E===void 0?void 0:E.Resource):"",se=b?b==null?void 0:b.statusCode:T.statusCode,ce=b?(b==null?void 0:b.headers)&&(b==null?void 0:b.headers["x-cos-request-id"]):(T==null?void 0:T.headers)&&(T==null?void 0:T.headers["x-cos-request-id"]),J=b?ce?"Server":"Client":"";this.params.requestName==="getObject"&&(this.params.httpSize=T?T.headers&&T.headers["content-length"]:0);var X=this.params.realApi==="sliceUploadFile",ee=this.params.realApi==="sliceCopyFile";if(X||ee){var ue=this.params.httpSize/1024/this.params.partTime;Object.assign(this.params,{httpSpeed:ue<0?0:ue.toFixed(3)})}else{var _e=N-this.params.startTime,ve=this.params.httpEndTime-this.params.httpStartTime,ie=this.params.httpSize/1024/(ve/1e3),ne=this.params.md5EndTime-this.params.md5StartTime,Ae=this.params.signEndTime-this.params.signStartTime;this.parent&&(this.parent.addParamValue("httpTookTime",c(ve)),this.parent.addParamValue("httpFullTime",c(_e)),this.parent.addParamValue("httpMd5",c(ne)),this.parent.addParamValue("httpSign",c(Ae)),["multipartUpload","uploadPartCopy","putObjectCopy"].includes(this.params.requestName)&&this.parent.addParamValue("partTime",c(ve))),Object.assign(this.params,{httpFullTime:c(_e),httpMd5:c(ne),httpSign:c(Ae),httpTookTime:c(ve),httpSpeed:ie<0?0:ie.toFixed(3)})}if(Object.assign(this.params,{networkType:z,requestResult:b?"Failure":"Success",errorType:J,errorCode:U,errorHttpCode:se,errorName:Y,errorMessage:q,errorServiceName:Z,errorRequestId:ce}),b&&(!U||!q)&&(this.params.fullError=b?JSON.stringify(b):""),this.params.url){try{var re=/^http(s)?:\/\/(.*?)\//.exec(this.params.url);this.params.host=re[2]}catch{this.params.host=this.params.url}this.params.httpDomain=this.params.host}}},{key:"report",value:function(b,T){if(!(!this.beacon&&!this.clsReporter)){this.formatResult(b,T);var _=R(this.params);this.beacon&&this.sendEventsToBeacon(_),this.clsReporter&&this.sendEventsToCLS(_)}}},{key:"setParams",value:function(b){Object.assign(this.params,b)}},{key:"addParamValue",value:function(b,T){this.params[b]=(+this.params[b]+ +T).toFixed(3)}},{key:"sendEventsToBeacon",value:function(b){var T=this.params.requestName==="sliceUploadFile"||this.params.realApi==="sliceUploadFile";if(!(T&&!this.deepTracker)){var _="qcloud_track_cos_sdk";this.delay===0?this.beacon&&this.beacon.onDirectUserAction(_,b):this.beacon&&this.beacon.onUserAction(_,b)}}},{key:"sendEventsToCLS",value:function(b){var T=this.delay===0;this.clsReporter.log(b,T)}},{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,accelerate:this.params.accelerate,fileKey:this.params.requestPath,customId:this.params.customId,delay:this.delay,clsReporter:this.clsReporter}),new x(b)}}]),x}();r.exports=C},"./src/util.js":function(r,n,i){(function(a){var o=i("./node_modules/@babel/runtime/helpers/typeof.js");function s(he,H){var K=typeof Symbol<"u"&&he[Symbol.iterator]||he["@@iterator"];if(!K){if(Array.isArray(he)||(K=l(he))||H){K&&(he=K);var Q=0,pe=function(){};return{s:pe,n:function(){return Q>=he.length?{done:!0}:{done:!1,value:he[Q++]}},e:function(rt){throw rt},f:pe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge=!0,ke=!1,Be;return{s:function(){K=K.call(he)},n:function(){var rt=K.next();return ge=rt.done,rt},e:function(rt){ke=!0,Be=rt},f:function(){try{!ge&&K.return!=null&&K.return()}finally{if(ke)throw Be}}}}function l(he,H){if(he){if(typeof he=="string")return u(he,H);var K=Object.prototype.toString.call(he).slice(8,-1);if(K==="Object"&&he.constructor&&(K=he.constructor.name),K==="Map"||K==="Set")return Array.from(he);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return u(he,H)}}function u(he,H){(H==null||H>he.length)&&(H=he.length);for(var K=0,Q=new Array(H);Kge?1:-1})}var x=function(H,K){var Q,pe,ge,ke=[],Be=C(H);for(Q=0;Q-1||M.indexOf(pe)>-1)&&(K[Q]=H[Q])}return K},T=function(H){H=H||{};var K=H.SecretId,Q=H.SecretKey,pe=H.KeyTime,ge=(H.method||H.Method||"get").toLowerCase(),ke=se(H.Query||H.params||{}),Be=b(se(H.Headers||H.headers||{})),Fe=H.Key||"",rt;H.UseRawKey?rt=H.Pathname||H.pathname||"/"+Fe:(rt=H.Pathname||H.pathname||Fe,rt.indexOf("/")!==0&&(rt="/"+rt));var pt=H.ForceSignHost!==!1;if(!Be.Host&&!Be.host&&H.Bucket&&H.Region&&pt&&(Be.Host=H.Bucket+".cos."+H.Region+".myqcloud.com"),!K)throw new Error("missing param SecretId");if(!Q)throw new Error("missing param SecretKey");var Ct=Math.round(st(H.SystemClockOffset)/1e3)-1,mt=Ct,ur=H.Expires||H.expires;ur===void 0?mt+=900:mt+=ur*1||0;var li="sha1",Or=K,Ze=pe||Ct+";"+mt,Xr=pe||Ct+";"+mt,Sr=C(Be,!0).join(";").toLowerCase(),qi=C(ke,!0).join(";").toLowerCase(),is=c.HmacSHA1(Xr,Q).toString(),Lu=[ge,rt,Kt.obj2str(ke,!0),Kt.obj2str(Be,!0),""].join(` `),Eu=["sha1",Ze,c.SHA1(Lu).toString(),""].join(` `),Ce=c.HmacSHA1(Eu,is).toString(),Du=["q-sign-algorithm="+li,"q-ak="+Or,"q-sign-time="+Ze,"q-key-time="+Xr,"q-header-list="+Sr,"q-url-param-list="+qi,"q-signature="+Ce].join("&");return Du},_=function(H,K,Q){var pe=K/8,ge=H.slice(Q,Q+pe);return new Uint8Array(ge).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[K](ge)[0]},I=function(H,K,Q,pe){var ge=H.slice(K,Q),ke="";return new Uint8Array(ge).forEach(function(Be){ke+=String.fromCharCode(Be)}),pe&&(ke=decodeURIComponent(escape(ke))),ke},A=function(H){for(var K={},Q=I(H),pe={records:[]};H.byteLength;){var ge=_(H,32,0),ke=_(H,32,4),Be=ge-ke-16,Fe=0,rt;for(H=H.slice(12);FeparseInt(pe[ge])?1:-1;return 0},H=function(Q){if(!Q)return!1;var pe=(Q.match(/Chrome\/([.\d]+)/)||[])[1],ge=(Q.match(/QBCore\/([.\d]+)/)||[])[1],ke=(Q.match(/QQBrowser\/([.\d]+)/)||[])[1],Be=pe&&he(pe,"53.0.2785.116")<0&&ge&&he(ge,"3.53.991.400")<0&&ke&&he(ke,"9.0.2524.400")<=0||!1;return Be};return H(typeof navigator<"u"&&navigator.userAgent)}(),U=function(H,K,Q,pe,ge){var ke;if(H.slice?ke=H.slice(K,Q):H.mozSlice?ke=H.mozSlice(K,Q):H.webkitSlice&&(ke=H.webkitSlice(K,Q)),pe&&z){var Be=new FileReader;Be.onload=function(Fe){ke=null,ge(new Blob([Be.result]))},Be.readAsArrayBuffer(ke)}else ge(ke)},q=function(H,K,Q,pe){Q=Q||O,H?typeof K=="string"?Q(Kt.md5(K,!0)):Blob&&K instanceof Blob?Kt.getFileMd5(K,function(ge,ke){Q(ke)},pe):Q():Q()},Y=1024*1024,Z=function(H,K,Q){var pe=H.size,ge=0,ke=f.getCtx(),Be=function Fe(rt){if(rt>=pe){var pt=ke.digest("hex");K(null,pt);return}var Ct=Math.min(pe,rt+Y);Kt.fileSlice(H,rt,Ct,!1,function(mt){N(mt,function(ur){mt=null,ke=ke.update(ur,!0),ge+=ur.length,ur=null,Q&&Q({loaded:ge,total:pe,percent:Math.round(ge/pe*1e4)/1e4}),Fe(rt+Y)})})};Be(0)};function se(he){return ve(he,function(H){return o(H)==="object"&&H!==null?se(H):H})}function ce(he,H,K){return he&&H in he?he[H]:K}function J(he,H){return _e(H,function(K,Q){he[Q]=H[Q]}),he}function X(he){return he instanceof Array}function ee(he,H){for(var K=!1,Q=0;Q-1,Fe=!ke||typeof ke=="string"&&ke.indexOf("{Region}")>-1;if(H.indexOf("Bucket")>-1||H==="deleteMultipleObject"||H==="multipartList"||H==="listObjectVersions"){if(Be&&!Q)return"Bucket";if(Fe&&!pe)return"Region"}else if(H.indexOf("Object")>-1||H.indexOf("multipart")>-1||H==="sliceUploadFile"||H==="abortUploadTask"||H==="uploadFile"){if(Be&&!Q)return"Bucket";if(Fe&&!pe)return"Region";if(!ge)return"Key"}return!1},le=function(H,K){if(K=J({},K),H!=="getAuth"&&H!=="getV4Auth"&&H!=="getObjectUrl"){var Q=K.Headers||{};if(K&&o(K)==="object"){(function(){for(var ge in K)K.hasOwnProperty(ge)&&ge.indexOf("x-cos-")>-1&&(Q[ge]=K[ge])})();var pe={"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","x-cos-callback":"Callback","x-cos-callback-var":"CallbackVar","x-cos-return-body":"ReturnBody"};Kt.each(pe,function(ge,ke){K[ge]!==void 0&&(Q[ke]=K[ge])}),K.Headers=E(Q)}}return K},we=function(H,K){return function(Q,pe){var ge=this;typeof Q=="function"&&(pe=Q,Q={}),Q=le(H,Q);var ke;if(ge.options.EnableReporter)if(Q.calledBySdk==="sliceUploadFile"||Q.calledBySdk==="sliceCopyFile")ke=Q.tracker&&Q.tracker.generateSubTracker({apiName:H});else if(["uploadFile","uploadFiles"].includes(H))ke=null;else{var Be=0;Q.Body&&(Be=typeof Q.Body=="string"?Q.Body.length:Q.Body.size||Q.Body.byteLength||0);var Fe=ge.options.UseAccelerate||typeof ge.options.Domain=="string"&&ge.options.Domain.includes("accelerate.");ke=new m({Beacon:ge.options.BeaconReporter,clsReporter:ge.options.ClsReporter,bucket:Q.Bucket,region:Q.Region,apiName:H,realApi:H,accelerate:Fe,fileKey:Q.Key,fileSize:Be,deepTracker:ge.options.DeepTracker,customId:ge.options.CustomId,delay:ge.options.TrackerDelay})}Q.tracker=ke;var rt=function(Ze){return Ze&&Ze.headers&&(Ze.headers["x-cos-request-id"]&&(Ze.RequestId=Ze.headers["x-cos-request-id"]),Ze.headers["x-ci-request-id"]&&(Ze.RequestId=Ze.headers["x-ci-request-id"]),Ze.headers["x-cos-version-id"]&&(Ze.VersionId=Ze.headers["x-cos-version-id"]),Ze.headers["x-cos-delete-marker"]&&(Ze.DeleteMarker=Ze.headers["x-cos-delete-marker"])),Ze},pt=function(Ze,Xr){ke&&ke.report(Ze,Xr),pe&&pe(rt(Ze),rt(Xr))},Ct=function(){if(H!=="getService"&&H!=="abortUploadTask"){var Ze=re.call(ge,H,Q);if(Ze)return"missing param "+Ze;if(Q.Region){if(ge.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(Q.Region))return"Region format error."}else{if(Q.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(Q.Region))return"Region format error."}!ge.options.CompatibilityMode&&Q.Region.indexOf("-")===-1&&Q.Region!=="yfb"&&Q.Region!=="default"&&Q.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(Q.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(Q.Bucket))if(Q.AppId)Q.Bucket=Q.Bucket+"-"+Q.AppId;else if(ge.options.AppId)Q.Bucket=Q.Bucket+"-"+ge.options.AppId;else return'Bucket should format as "test-1250000000".';Q.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete Q.AppId)}!ge.options.UseRawKey&&Q.Key&&Q.Key.substr(0,1)==="/"&&(Q.Key=Q.Key.substr(1))}},mt=Ct(),ur=["getAuth","getObjectUrl"].includes(H);if(typeof Promise=="function"&&!ur&&!pe)return new Promise(function(Or,Ze){if(pe=function(Sr,qi){Sr?Ze(Sr):Or(qi)},mt)return pt(Kt.error(new Error(mt)));K.call(ge,Q,pt)});if(mt)return pt(Kt.error(new Error(mt)));var li=K.call(ge,Q,pt);if(ur)return li}},Ie=function(H,K){var Q=this,pe=0,ge=0,ke=Date.now(),Be,Fe;function rt(){if(Fe=0,K&&typeof K=="function"){Be=Date.now();var pt=Math.max(0,Math.round((ge-pe)/((Be-ke)/1e3)*100)/100)||0,Ct;ge===0&&H===0?Ct=1:Ct=Math.floor(ge/H*100)/100||0,ke=Be,pe=ge;try{K({loaded:ge,total:H,speed:pt,percent:Ct})}catch{}}}return function(pt,Ct){if(pt&&(ge=pt.loaded,H=pt.total),Ct)clearTimeout(Fe),rt();else{if(Fe)return;Fe=setTimeout(rt,Q.options.ProgressInterval)}}},tt=function(H,K,Q){var pe;if(typeof K.Body=="string"?K.Body=new Blob([K.Body],{type:"text/plain"}):K.Body instanceof ArrayBuffer&&(K.Body=new Blob([K.Body])),K.Body&&(K.Body instanceof Blob||K.Body.toString()==="[object File]"||K.Body.toString()==="[object Blob]"))pe=K.Body.size;else{Q(Kt.error(new Error("params body format error, Only allow File|Blob|String.")));return}K.ContentLength=pe,Q(null,pe)},st=function(H){return Date.now()+(H||0)},bt=function(H,K){var Q=H;return H.message=H.message||null,typeof K=="string"?(H.error=K,H.message=K):o(K)==="object"&&K!==null&&(J(H,K),(K.code||K.name)&&(H.code=K.code||K.name),K.message&&(H.message=K.message),K.stack&&(H.stack=K.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(H,"name",{writable:!0,enumerable:!1}),Object.defineProperty(H,"message",{enumerable:!0})),H.name=K&&K.name||H.name||H.code||"Error",H.code||(H.code=H.name),H.error||(H.error=se(Q)),H},Ee=function(){return(typeof globalThis>"u"?"undefined":o(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},Br=function(){return(typeof window>"u"?"undefined":o(window))!=="object"&&(typeof a>"u"?"undefined":o(a))==="object"&&!0&&!Ee()},Lt=function(H){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(H)},pn=function(){if((typeof navigator>"u"?"undefined":o(navigator))!=="object")return!1;var he=navigator.userAgent,H=!!he.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return H}(),Oa=function(){return(typeof navigator>"u"?"undefined":o(navigator))!=="object"?!1:/\sQQ/i.test(navigator.userAgent)}(),ku=function(H,K){var Q=y.encode(H);return K&&(Q=Q.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),Q},Mu=function(H){return H?y.decode(H):""},Ru=function(H){var K=H.split("/"),Q=[],pe=s(K),ge;try{for(pe.s();!(ge=pe.n()).done;){var ke=ge.value;ke===".."?Q.length&&Q.pop():ke.length&&ke!=="."&&Q.push(ke)}}catch(Be){pe.e(Be)}finally{pe.f()}return"/"+Q.join("/")},Pu=function(H){var K;if(H&&typeof H=="string"){var Q=H.trim(),pe=Q.indexOf("<")===0,ge=Q.indexOf("{")===0;if(pe)K=Kt.xml2json(H)||{};else if(ge)try{var ke=H.replace(/\n/g," "),Be=JSON.parse(ke);Object.prototype.toString.call(Be)==="[object Object]"?K=Be:K=H}catch{K=H}else K=H}else K=H||{};return K},Kt={noop:O,formatParams:le,apiWrapper:we,xml2json:w,json2xml:k,md5:f,clearKey:E,fileSlice:U,getBodyMd5:q,getFileMd5:Z,b64:ne,extend:J,isArray:X,isInArray:ee,makeArray:ue,each:_e,map:ve,filter:ie,clone:se,attr:ce,uuid:Ae,camSafeUrlEncode:R,throttleOnProgress:Ie,getFileSize:tt,getSkewTime:st,error:bt,obj2str:x,getAuth:T,parseSelectPayload:A,getSourceParams:P,isBrowser:!0,isNode:Br,isCIHost:Lt,isIOS_QQ:pn&&Oa,encodeBase64:ku,decodeBase64:Mu,simplifyPath:Ru,readAsBinaryString:N,parseResBody:Pu};r.exports=Kt}).call(this,i("./node_modules/process/browser.js"))}})})})(Oy);var nb=Oy.exports;const ib=TS(nb),Ny="daya-online-1303457149",Vd="tencent";async function Hd(t,e,r,n=!0,i){i||(i={isLoading:!0}),i.isLoading&&bn.loading(!0,i.text||"资源上传中"),n&&(t=sb(t));const a=await ab(t,r);if(a.code===200)try{const o=await ob(a.data.signature,{fileName:t,file:e,filePath:r});return i.isLoading&&bn.loading(!1),o.statusCode===200?o.Location.includes("http")?o.Location:`https://${o.Location}`:Promise.reject("")}catch{return i.isLoading&&bn.loading(!1),Promise.reject("")}else return i.isLoading&&bn.loading(!1),Promise.reject("")}const ab=async(t,e)=>{const r=`pptList/${e||"errPath/"}`+t;return xS(IS,{postData:{key:r},pluginName:Vd,bucketName:Ny,filename:r},{pluginName:Vd})},ob=(t,e)=>new ib({Domain:"https://oss.dayaedu.com",Protocol:"https",getAuthorization:async(n,i)=>{i({Authorization:t})}}).uploadFile({Bucket:Ny,Region:"ap-nanjing",Key:`pptList/${e.filePath||"errPath/"}${e.fileName}`,Body:e.file,SliceSize:1024*1024*500,onProgress:function(n){}});function sb(t){const e=t.lastIndexOf("."),r=t.substring(0,e),n=t.substring(e);return`${r}_${Date.now()}${n}`}function lb(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const r=document.implementation.createHTMLDocument(),n=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(i),e&&(n.href=e),i.href=t,i.href}const ub=(()=>{let t=0;const e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${e()}${t}`)})();function xn(t){const e=[];for(let r=0,n=t.length;rhr||t.height>hr)&&(t.width>hr&&t.height>hr?t.width>t.height?(t.height*=hr/t.width,t.width=hr):(t.width*=hr/t.height,t.height=hr):t.width>hr?(t.height*=hr/t.width,t.width=hr):(t.width*=hr/t.height,t.height=hr))}function vb(t,e={}){return t.toBlob?new Promise(r=>{t.toBlob(r,e.type?e.type:"image/png",e.quality?e.quality:1)}):new Promise(r=>{const n=window.atob(t.toDataURL(e.type?e.type:void 0,e.quality?e.quality:void 0).split(",")[1]),i=n.length,a=new Uint8Array(i);for(let o=0;o{const n=new Image;n.decode=()=>e(n),n.onload=()=>e(n),n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=t})}async function pb(t){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function gb(t,e,r){const n="http://www.w3.org/2000/svg",i=document.createElementNS(n,"svg"),a=document.createElementNS(n,"foreignObject");return i.setAttribute("width",`${e}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${e} ${r}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(t),pb(i)}const tr=(t,e)=>{if(t instanceof e)return!0;const r=Object.getPrototypeOf(t);return r===null?!1:r.constructor.name===e.name||tr(r,e)};function yb(t){const e=t.getPropertyValue("content");return`${t.cssText} content: '${e.replace(/'|"/g,"")}';`}function mb(t){return xn(t).map(e=>{const r=t.getPropertyValue(e),n=t.getPropertyPriority(e);return`${e}: ${r}${n?" !important":""};`}).join(" ")}function _b(t,e,r){const n=`.${t}:${e}`,i=r.cssText?yb(r):mb(r);return document.createTextNode(`${n}{${i}}`)}function Gd(t,e,r){const n=window.getComputedStyle(t,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const a=ub();try{e.className=`${e.className} ${a}`}catch{return}const o=document.createElement("style");o.appendChild(_b(a,r,n)),e.appendChild(o)}function Sb(t,e){Gd(t,e,":before"),Gd(t,e,":after")}const Wd="application/font-woff",jd="image/jpeg",bb={woff:Wd,woff2:Wd,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:jd,jpeg:jd,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function wb(t){const e=/\.([^./]*?)$/g.exec(t);return e?e[1]:""}function bh(t){const e=wb(t).toLowerCase();return bb[e]||""}function Cb(t){return t.split(/,/)[1]}function ff(t){return t.search(/^(data:)/)!==-1}function Tb(t,e){return`data:${e};base64,${t}`}async function $y(t,e,r){const n=await fetch(t,e);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);const i=await n.blob();return new Promise((a,o)=>{const s=new FileReader;s.onerror=o,s.onloadend=()=>{try{a(r({res:n,result:s.result}))}catch(l){o(l)}},s.readAsDataURL(i)})}const Fu={};function xb(t,e,r){let n=t.replace(/\?.*/,"");return r&&(n=t),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),e?`[${e}]${n}`:n}async function wh(t,e,r){const n=xb(t,e,r.includeQueryParams);if(Fu[n]!=null)return Fu[n];r.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let i;try{const a=await $y(t,r.fetchRequestInit,({res:o,result:s})=>(e||(e=o.headers.get("Content-Type")||""),Cb(s)));i=Tb(a,e)}catch(a){i=r.imagePlaceholder||"";let o=`Failed to fetch resource: ${t}`;a&&(o=typeof a=="string"?a:a.message),o&&console.warn(o)}return Fu[n]=i,i}async function Ib(t){const e=t.toDataURL();return e==="data:,"?t.cloneNode(!1):pl(e)}async function Ab(t,e){if(t.currentSrc){const a=document.createElement("canvas"),o=a.getContext("2d");a.width=t.clientWidth,a.height=t.clientHeight,o==null||o.drawImage(t,0,0,a.width,a.height);const s=a.toDataURL();return pl(s)}const r=t.poster,n=bh(r),i=await wh(r,n,e);return pl(i)}async function kb(t){var e;try{if(!((e=t==null?void 0:t.contentDocument)===null||e===void 0)&&e.body)return await Wl(t.contentDocument.body,{},!0)}catch{}return t.cloneNode(!1)}async function Mb(t,e){return tr(t,HTMLCanvasElement)?Ib(t):tr(t,HTMLVideoElement)?Ab(t,e):tr(t,HTMLIFrameElement)?kb(t):t.cloneNode(!1)}const Rb=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT";async function Pb(t,e,r){var n,i;let a=[];return Rb(t)&&t.assignedNodes?a=xn(t.assignedNodes()):tr(t,HTMLIFrameElement)&&(!((n=t.contentDocument)===null||n===void 0)&&n.body)?a=xn(t.contentDocument.body.childNodes):a=xn(((i=t.shadowRoot)!==null&&i!==void 0?i:t).childNodes),a.length===0||tr(t,HTMLVideoElement)||await a.reduce((o,s)=>o.then(()=>Wl(s,r)).then(l=>{l&&e.appendChild(l)}),Promise.resolve()),e}function Lb(t,e){const r=e.style;if(!r)return;const n=window.getComputedStyle(t);n.cssText?(r.cssText=n.cssText,r.transformOrigin=n.transformOrigin):xn(n).forEach(i=>{let a=n.getPropertyValue(i);i==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),tr(t,HTMLIFrameElement)&&i==="display"&&a==="inline"&&(a="block"),i==="d"&&e.getAttribute("d")&&(a=`path(${e.getAttribute("d")})`),r.setProperty(i,a,n.getPropertyPriority(i))})}function Eb(t,e){tr(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),tr(t,HTMLInputElement)&&e.setAttribute("value",t.value)}function Db(t,e){if(tr(t,HTMLSelectElement)){const r=e,n=Array.from(r.children).find(i=>t.value===i.getAttribute("value"));n&&n.setAttribute("selected","")}}function Bb(t,e){return tr(e,Element)&&(Lb(t,e),Sb(t,e),Eb(t,e),Db(t,e)),e}async function Ob(t,e){const r=t.querySelectorAll?t.querySelectorAll("use"):[];if(r.length===0)return t;const n={};for(let a=0;aMb(n,e)).then(n=>Pb(t,n,e)).then(n=>Bb(t,n)).then(n=>Ob(n,e))}const zy=/url\((['"]?)([^'"]+?)\1\)/g,Nb=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Fb=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function $b(t){const e=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function zb(t){const e=[];return t.replace(zy,(r,n,i)=>(e.push(i),r)),e.filter(r=>!ff(r))}async function Ub(t,e,r,n,i){try{const a=r?lb(e,r):e,o=bh(e);let s;return i||(s=await wh(a,o,n)),t.replace($b(e),`$1${s}$3`)}catch{}return t}function Vb(t,{preferredFontFormat:e}){return e?t.replace(Fb,r=>{for(;;){const[n,,i]=Nb.exec(r)||[];if(!i)return"";if(i===e)return`src: ${n};`}}):t}function Uy(t){return t.search(zy)!==-1}async function Vy(t,e,r){if(!Uy(t))return t;const n=Vb(t,r);return zb(n).reduce((a,o)=>a.then(s=>Ub(s,o,e,r)),Promise.resolve(n))}async function cs(t,e,r){var n;const i=(n=e.style)===null||n===void 0?void 0:n.getPropertyValue(t);if(i){const a=await Vy(i,null,r);return e.style.setProperty(t,a,e.style.getPropertyPriority(t)),!0}return!1}async function Hb(t,e){await cs("background",t,e)||await cs("background-image",t,e),await cs("mask",t,e)||await cs("mask-image",t,e)}async function Gb(t,e){const r=tr(t,HTMLImageElement);if(!(r&&!ff(t.src))&&!(tr(t,SVGImageElement)&&!ff(t.href.baseVal)))return;const n=r?t.src:t.href.baseVal,i=await wh(n,bh(n),e);await new Promise((a,o)=>{t.onload=a,t.onerror=o;const s=t;s.decode&&(s.decode=a),s.loading==="lazy"&&(s.loading="eager"),r?(t.srcset="",t.src=i):t.href.baseVal=i})}async function Wb(t,e){const n=xn(t.childNodes).map(i=>Hy(i,e));await Promise.all(n).then(()=>t)}async function Hy(t,e){tr(t,Element)&&(await Hb(t,e),await Gb(t,e),await Wb(t,e))}function jb(t,e){const{style:r}=t;e.backgroundColor&&(r.backgroundColor=e.backgroundColor),e.width&&(r.width=`${e.width}px`),e.height&&(r.height=`${e.height}px`);const n=e.style;return n!=null&&Object.keys(n).forEach(i=>{r[i]=n[i]}),t}const qd={};async function Xd(t){let e=qd[t];if(e!=null)return e;const n=await(await fetch(t)).text();return e={url:t,cssText:n},qd[t]=e,e}async function Kd(t,e){let r=t.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,a=(r.match(/url\([^)]+\)/g)||[]).map(async o=>{let s=o.replace(n,"$1");return s.startsWith("https://")||(s=new URL(s,t.url).href),$y(s,e.fetchRequestInit,({result:l})=>(r=r.replace(o,`url(${l})`),[o,l]))});return Promise.all(a).then(()=>r)}function Yd(t){if(t==null)return[];const e=[],r=/(\/\*[\s\S]*?\*\/)/gi;let n=t.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const l=i.exec(n);if(l===null)break;e.push(l[0])}n=n.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(o,"gi");for(;;){let l=a.exec(n);if(l===null){if(l=s.exec(n),l===null)break;a.lastIndex=s.lastIndex}else s.lastIndex=a.lastIndex;e.push(l[0])}return e}async function qb(t,e){const r=[],n=[];return t.forEach(i=>{if("cssRules"in i)try{xn(i.cssRules||[]).forEach((a,o)=>{if(a.type===CSSRule.IMPORT_RULE){let s=o+1;const l=a.href,u=Xd(l).then(f=>Kd(f,e)).then(f=>Yd(f).forEach(c=>{try{i.insertRule(c,c.startsWith("@import")?s+=1:i.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:c,error:h})}})).catch(f=>{console.error("Error loading remote css",f.toString())});n.push(u)}})}catch(a){const o=t.find(s=>s.href==null)||document.styleSheets[0];i.href!=null&&n.push(Xd(i.href).then(s=>Kd(s,e)).then(s=>Yd(s).forEach(l=>{o.insertRule(l,i.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",a)}}),Promise.all(n).then(()=>(t.forEach(i=>{if("cssRules"in i)try{xn(i.cssRules||[]).forEach(a=>{r.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),r))}function Xb(t){return t.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>Uy(e.style.getPropertyValue("src")))}async function Kb(t,e){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=xn(t.ownerDocument.styleSheets),n=await qb(r,e);return Xb(n)}async function Yb(t,e){const r=await Kb(t,e);return(await Promise.all(r.map(i=>{const a=i.parentStyleSheet?i.parentStyleSheet.href:null;return Vy(i.cssText,a,e)}))).join(` `)}async function Zb(t,e){const r=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await Yb(t,e);if(r){const n=document.createElement("style"),i=document.createTextNode(r);n.appendChild(i),t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}}async function Qb(t,e={}){const{width:r,height:n}=Fy(t,e),i=await Wl(t,e,!0);return await Zb(i,e),await Hy(i,e),jb(i,e),await gb(i,r,n)}async function Jb(t,e={}){const{width:r,height:n}=Fy(t,e),i=await Qb(t,e),a=await pl(i),o=document.createElement("canvas"),s=o.getContext("2d"),l=e.pixelRatio||hb(),u=e.canvasWidth||r,f=e.canvasHeight||n;return o.width=u*l,o.height=f*l,e.skipAutoScale||db(o),o.style.width=`${u}`,o.style.height=`${f}`,e.backgroundColor&&(s.fillStyle=e.backgroundColor,s.fillRect(0,0,o.width,o.height)),s.drawImage(a,0,0,o.width,o.height),o}async function ew(t,e={}){const r=await Jb(t,e);return await vb(r)}const tw=AS("pptWork",{state:()=>(YS(),{id:MS().query.id,coverImg:"",jsonUrl:"",isSave:!1}),actions:{async initPPTData(){if(this.id){bn.loading(!0,"资源加载中,请稍等...");const t=await $d(ZS,this.id,wn.fromType);if(t.code===200){const{dataJson:e,chapterLessonCoursewareName:r}=t.data||{},{coverImg:n,jsonUrl:i}=JSON.parse(e);if(this.coverImg=n||"",kt().setTitle(r),i){const o=await eb(i);o.code===200&&tb(o.data)}}else Ly.replace("/err");bn.loading(!1)}},async updatePPT(){bn.loading(!0,"课件保存中,请稍等..."),await this.updateCoverImg();const{blob:t}=rb();Hd(`${this.id}ppt`,t,`${this.id}/`,!1,{isLoading:!1}).then(e=>{const r=Date.now();$d(wn.fromType==="PLATFORM"?JS:QS,{id:this.id,dataJson:JSON.stringify({coverImg:this.coverImg+`?v=_${r}`,jsonUrl:e+`?v=_${r}`})}).then(n=>{n.code===200&&(this.isSave=!0,zd({showClose:!0,message:"保存成功!",type:"success"})),bn.loading(!1)})}).catch(()=>{bn.loading(!1),zd({showClose:!0,message:"保存失败!",type:"error"})})},async updateCoverImg(){try{const t=document.querySelector("#thumbnailSlide_0");if(t){const e=await ew(t);if(e){const r=await Hd(`${this.id}coverImg`,e,`${this.id}/`,!1,{isLoading:!1});r&&(this.coverImg=r)}}}catch(t){console.log(t,"上传coverImg错误")}}}}),AO=()=>tw(kS),Gy=()=>{const t=document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},Wy=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},hf=()=>!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement),jl=()=>{const t=Hl(),e=kt(),r=()=>{Gy(),t.setScreening(!0)};return{enterScreening:r,enterScreeningFromStart:()=>{e.updateSlideIndex(0),r()},exitScreening:()=>{t.setScreening(!1),hf()&&Wy()}}},rw=Ue({__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{default:"click"},placement:{default:"bottom"},appendTo:{},contentStyle:{},center:{type:Boolean,default:!1},offsetOne:{default:0},offset:{default:8}},emits:["update:value"],setup(t,{emit:e}){const r=t,n=e,i=fe(),a=fe(),o=fe(),s=fe(!1),l=Te(()=>r.contentStyle||{});return er(()=>r.value,()=>{i.value&&(r.value?i.value.show():i.value.hide())}),cn(()=>{i.value&&i.value.destroy()}),ir(()=>{i.value=RS(a.value,{content:o.value,allowHTML:!0,trigger:r.trigger,placement:r.placement,interactive:!0,appendTo:r.appendTo||document.body,maxWidth:"none",offset:[r.offsetOne,r.offset],duration:200,animation:"scale",theme:"popover",onShow(){s.value=!0},onShown(){r.value||n("update:value",!0)},onHidden(){r.value&&n("update:value",!1),s.value=!1}})}),(u,f)=>(te(),de("div",{class:nt(["popover",{center:u.center}]),ref_key:"triggerRef",ref:a},[j("div",{class:"popover-content",style:Se(l.value),ref_key:"contentRef",ref:o},[s.value?dl(u.$slots,"content",{key:0},void 0,!0):Ge("",!0)],4),dl(u.$slots,"default",{},void 0,!0)],2))}}),$u=Ke(rw,[["__scopeId","data-v-e147331a"]]),ka=Symbol(),ql=Symbol(),kO=Symbol(),Xl=t=>({shadowStyle:Te(()=>{if(t.value){const{h:r,v:n,blur:i,color:a}=t.value;return`${r}px ${n}px ${i}px ${a}`}return""})}),jy=(t,e)=>({flipStyle:Te(()=>{let n="";return t.value&&e.value?n="rotateX(180deg) rotateY(180deg)":e.value?n="rotateX(180deg)":t.value&&(n="rotateY(180deg)"),n})});var qy=(t=>(t.RECT="rect",t.ELLIPSE="ellipse",t.POLYGON="polygon",t))(qy||{});const Zd={rect:{name:"矩形",type:"rect",radius:"0",style:""},rect2:{name:"矩形2",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(t,e)=>`M 0 0 L ${t*.8} 0 L ${t} ${e*.2} L ${t} ${e} L 0 ${e} Z`},rect3:{name:"矩形3",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(t,e)=>`M 0 0 L ${t*.8} 0 L ${t} ${e*.2} L ${t} ${e} L ${t*.2} ${e} L 0 ${e*.8} Z`},roundRect:{name:"圆角矩形",type:"rect",radius:"10px",style:"inset(0 round 10px)"},ellipse:{name:"圆形",type:"ellipse",style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:"polygon",style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(t,e)=>`M ${t*.5} 0 L 0 ${e} L ${t} ${e} Z`},triangle2:{name:"三角形2",type:"polygon",style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(t,e)=>`M ${t*.5} ${e} L 0 0 L ${t} 0 Z`},triangle3:{name:"三角形3",type:"polygon",style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(t,e)=>`M 0 0 L 0 ${e} L ${t} ${e} Z`},rhombus:{name:"菱形",type:"polygon",style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(t,e)=>`M ${t*.5} 0 L ${t} ${e*.5} L ${t*.5} ${e} L 0 ${e*.5} Z`},pentagon:{name:"五边形",type:"polygon",style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(t,e)=>`M ${t*.5} 0 L ${t} ${.38*e} L ${.82*t} ${e} L ${.18*t} ${e} L 0 ${.38*e} Z`},hexagon:{name:"六边形",type:"polygon",style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(t,e)=>`M ${t*.2} 0 L ${t*.8} 0 L ${t} ${e*.5} L ${t*.8} ${e} L ${t*.2} ${e} L 0 ${e*.5} Z`},heptagon:{name:"七边形",type:"polygon",style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(t,e)=>`M ${t*.5} 0 L ${t*.9} ${e*.2} L ${t} ${e*.6} L ${t*.75} ${e} L ${t*.25} ${e} L 0 ${e*.6} L ${t*.1} ${e*.2} Z`},octagon:{name:"八边形",type:"polygon",style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(t,e)=>`M ${t*.3} 0 L ${t*.7} 0 L ${t} ${e*.3} L ${t} ${e*.7} L ${t*.7} ${e} L ${t*.3} ${e} L 0 ${e*.7} L 0 ${e*.3} Z`},chevron:{name:"V形",type:"polygon",style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(t,e)=>`M ${t*.75} 0 L ${t} ${e*.5} L ${t*.75} ${e} L 0 ${e} L ${t*.25} ${e*.5} L 0 0 Z`},point:{name:"点",type:"polygon",style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(t,e)=>`M 0 0 L ${t*.75} 0 L ${t} ${e*.5} L ${t*.75} ${e} L 0 ${e} Z`},arrow:{name:"箭头",type:"polygon",style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(t,e)=>`M 0 ${e*.2} L ${t*.6} ${e*.2} L ${t*.6} 0 L ${t} ${e*.5} L ${t*.6} ${e} L ${t*.6} ${e*.8} L 0 ${e*.8} Z`},parallelogram:{name:"平行四边形",type:"polygon",style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(t,e)=>`M ${t*.3} 0 L ${t} 0 L ${t*.7} ${e} L 0 ${e} Z`},parallelogram2:{name:"平行四边形2",type:"polygon",style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(t,e)=>`M ${t*.3} ${e} L ${t} ${e} L ${t*.7} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:"polygon",style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(t,e)=>`M ${t*.25} 0 L ${t*.75} 0 L ${t} ${e} L 0 ${e} Z`},trapezoid2:{name:"梯形2",type:"polygon",style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(t,e)=>`M 0 0 L ${t} 0 L ${t*.75} ${e} L ${t*.25} ${e} Z`}},Xy=t=>{const e=Te(()=>{let n=Zd.rect;if(t.value.clip){const i=t.value.clip.shape||qy.RECT;n=Zd[i]}return n.radius!==void 0&&t.value.radius&&(n={...n,radius:`${t.value.radius}px`,style:`inset(0 round ${t.value.radius}px)`}),n}),r=Te(()=>{if(!t.value.clip)return{top:"0",left:"0",width:"100%",height:"100%"};const[n,i]=t.value.clip.range,a=(i[0]-n[0])/100,o=(i[1]-n[1])/100,s=n[0]/a,l=n[1]/o;return{left:-s+"%",top:-l+"%",width:100/a+"%",height:100/o+"%"}});return{clipShape:e,imgPosition:r}},nw=t=>({filter:Te(()=>{if(!t.value)return"";let r="";const n=Object.keys(t.value);for(const i of n)r+=`${i}(${t.value[i]}) `;return r})}),Yo=t=>{const e=Te(()=>{var a;return((a=t.value)==null?void 0:a.width)??0}),r=Te(()=>{var a;return((a=t.value)==null?void 0:a.style)||"solid"}),n=Te(()=>{var a;return((a=t.value)==null?void 0:a.color)||"#5b9bd5"}),i=Te(()=>{const a=e.value;return r.value==="dashed"?a<=6?`${a*4.5} ${a*2}`:`${a*4} ${a*1.5}`:r.value==="dotted"?a<=6?`${a*1.8} ${a*1.6}`:`${a*1.5} ${a*1.2}`:"0 0"});return{outlineWidth:e,outlineStyle:r,outlineColor:n,strokeDashArray:i}},iw=["width","height"],aw=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"],ow=Ue({__name:"ImageRectOutline",props:{width:{},height:{},outline:{},radius:{default:"0"}},setup(t){const e=t,{outlineWidth:r,outlineColor:n,strokeDashArray:i}=Yo(Gl(e,"outline"));return(a,o)=>a.outline?(te(),de("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:a.width,height:a.height},[j("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",rx:a.radius,ry:a.radius,width:a.width,height:a.height,stroke:oe(n),"stroke-width":oe(r),"stroke-dasharray":oe(i)},null,8,aw)],8,iw)):Ge("",!0)}}),sw=Ke(ow,[["__scopeId","data-v-801a8465"]]),lw=["width","height"],uw=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"],cw=Ue({__name:"ImageEllipseOutline",props:{width:{},height:{},outline:{}},setup(t){const e=t,{outlineWidth:r,outlineColor:n,strokeDashArray:i}=Yo(Gl(e,"outline"));return(a,o)=>a.outline?(te(),de("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:a.width,height:a.height},[j("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",cx:a.width/2,cy:a.height/2,rx:a.width/2,ry:a.height/2,stroke:oe(n),"stroke-width":oe(r),"stroke-dasharray":oe(i)},null,8,uw)],8,lw)):Ge("",!0)}}),fw=Ke(cw,[["__scopeId","data-v-2528d7e2"]]),hw=["width","height"],dw=["d","stroke","stroke-width","stroke-dasharray"],vw=Ue({__name:"ImagePolygonOutline",props:{width:{},height:{},createPath:{type:Function},outline:{}},setup(t){const e=t,{outlineWidth:r,outlineColor:n,strokeDashArray:i}=Yo(Gl(e,"outline"));return(a,o)=>a.outline?(te(),de("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:a.width,height:a.height},[j("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:a.createPath(a.width,a.height),stroke:oe(n),"stroke-width":oe(r),"stroke-dasharray":oe(i)},null,8,dw)],8,hw)):Ge("",!0)}}),pw=Ke(vw,[["__scopeId","data-v-04ee0d7b"]]),gw={class:"image-outline"},yw=Ue({__name:"index",props:{elementInfo:{}},setup(t){const e=t,r=Te(()=>e.elementInfo),{clipShape:n}=Xy(r);return(i,a)=>(te(),de("div",gw,[oe(n).type==="rect"?(te(),He(sw,{key:0,width:i.elementInfo.width,height:i.elementInfo.height,radius:oe(n).radius,outline:i.elementInfo.outline},null,8,["width","height","radius","outline"])):oe(n).type==="ellipse"?(te(),He(fw,{key:1,width:i.elementInfo.width,height:i.elementInfo.height,outline:i.elementInfo.outline},null,8,["width","height","outline"])):oe(n).type==="polygon"?(te(),He(pw,{key:2,width:i.elementInfo.width,height:i.elementInfo.height,outline:i.elementInfo.outline,createPath:oe(n).createPath},null,8,["width","height","outline","createPath"])):Ge("",!0)]))}}),mw=["width","height"],_w=["d","stroke","stroke-width","stroke-dasharray"],Sw=Ue({__name:"ElementOutline",props:{width:{},height:{},outline:{}},setup(t){const e=t,{outlineWidth:r,outlineColor:n,strokeDashArray:i}=Yo(Gl(e,"outline"));return(a,o)=>a.outline?(te(),de("svg",{key:0,class:"element-outline",overflow:"visible",width:a.width,height:a.height},[j("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:`M0,0 L${a.width},0 L${a.width},${a.height} L0,${a.height} Z`,stroke:oe(n),"stroke-width":oe(r),"stroke-dasharray":oe(i)},null,8,_w)],8,mw)):Ge("",!0)}}),Ky=Ke(Sw,[["__scopeId","data-v-813f8c74"]]),bw=["id","gradientTransform"],ww=["offset","stop-color"],Cw=["id"],Tw=["offset","stop-color"],xw=Ue({__name:"GradientDefs",props:{id:{},type:{},colors:{},rotate:{default:0}},setup(t){return(e,r)=>e.type==="linear"?(te(),de("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[(te(!0),de(Ht,null,Pr(e.colors,(n,i)=>(te(),de("stop",{key:i,offset:`${n.pos}%`,"stop-color":n.color},null,8,ww))),128))],8,bw)):(te(),de("radialGradient",{key:1,id:e.id},[(te(!0),de(Ht,null,Pr(e.colors,(n,i)=>(te(),de("stop",{key:i,offset:`${n.pos}%`,"stop-color":n.color},null,8,Tw))),128))],8,Cw))}}),Iw=["id","markerWidth","markerHeight","refX","refY"],Aw=["d","fill","transform"],Qd=Ue({__name:"LinePointMarker",props:{id:{},position:{},type:{},baseSize:{},color:{}},setup(t){const e=t,r={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},n={"arrow-start":180,"arrow-end":0},i=Te(()=>r[e.type]),a=Te(()=>n[`${e.type}-${e.position}`]||0),o=Te(()=>e.baseSize<2?2:e.baseSize);return(s,l)=>(te(),de("marker",{id:`${s.id}-${s.type}-${s.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:o.value*3,markerHeight:o.value*3,refX:o.value*1.5,refY:o.value*1.5},[j("path",{d:i.value,fill:s.color,transform:`scale(${o.value*.3}, ${o.value*.3}) rotate(${a.value}, 5, 5)`},null,8,Aw)],8,Iw))}}),kw=({type:t,data:e,themeColors:r,textColor:n,lineSmooth:i,stack:a})=>{if(t==="bar")return{color:r,textStyle:n?{color:n}:{},legend:e.series.length>1?{top:"bottom",textStyle:n?{color:n}:{}}:void 0,xAxis:{type:"category",data:e.labels},yAxis:{type:"value"},series:e.series.map((o,s)=>{const l={data:o,name:e.legends[s],type:"bar",label:{show:!0}};return a&&(l.stack="A"),l})};if(t==="column")return{color:r,textStyle:n?{color:n}:{},legend:e.series.length>1?{top:"bottom",textStyle:n?{color:n}:{}}:void 0,yAxis:{type:"category",data:e.labels},xAxis:{type:"value"},series:e.series.map((o,s)=>{const l={data:o,name:e.legends[s],type:"bar",label:{show:!0}};return a&&(l.stack="A"),l})};if(t==="line")return{color:r,textStyle:n?{color:n}:{},legend:e.series.length>1?{top:"bottom",textStyle:n?{color:n}:{}}:void 0,xAxis:{type:"category",data:e.labels},yAxis:{type:"value"},series:e.series.map((o,s)=>{const l={data:o,name:e.legends[s],type:"line",smooth:i,label:{show:!0}};return a&&(l.stack="A"),l})};if(t==="pie")return{color:r,textStyle:n?{color:n}:{},legend:{top:"bottom",textStyle:n?{color:n}:{}},series:[{data:e.series[0].map((o,s)=>({value:o,name:e.labels[s]})),label:n?{color:n}:{},type:"pie",radius:"70%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(t==="ring")return{color:r,textStyle:n?{color:n}:{},legend:{top:"bottom",textStyle:n?{color:n}:{}},series:[{data:e.series[0].map((o,s)=>({value:o,name:e.labels[s]})),label:n?{color:n}:{},type:"pie",radius:["40%","70%"],padAngle:1,avoidLabelOverlap:!1,itemStyle:{borderRadius:4},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(t==="area")return{color:r,textStyle:n?{color:n}:{},legend:e.series.length>1?{top:"bottom",textStyle:n?{color:n}:{}}:void 0,xAxis:{type:"category",boundaryGap:!1,data:e.labels},yAxis:{type:"value"},series:e.series.map((o,s)=>{const l={data:o,name:e.legends[s],type:"line",areaStyle:{},label:{show:!0}};return a&&(l.stack="A"),l})};if(t==="radar")return{color:r,textStyle:n?{color:n}:{},legend:e.series.length>1?{top:"bottom",textStyle:n?{color:n}:{}}:void 0,radar:{indicator:e.labels.map(o=>({name:o}))},series:[{data:e.series.map((o,s)=>({value:o,name:e.legends[s]})),type:"radar"}]};if(t==="scatter"){const o=[];for(let s=0;s"u"&&typeof self<"u"?lt.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(lt.node=!0,lt.svgSupported=!0):Pw(navigator.userAgent,lt);function Pw(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}var Ch=12,Yy="sans-serif",Qn=Ch+"px "+Yy,Lw=20,Ew=100,Dw="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Bw(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function oC(t,e,r){for(var n="trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=t[u].getBoundingClientRect(),c=2*u,h=f.left,d=f.top;o.push(h,d),l=l&&a&&h===a[c]&&d===a[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=nC(o,s))}function im(t){return t.nodeName.toUpperCase()==="CANVAS"}var sC=/([&<>"'])/g,lC={"&":"&","<":"<",">":">",'"':""","'":"'"};function uC(t){return t==null?"":(t+"").replace(sC,function(e,r){return lC[r]})}var cC=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Vu=[],fC=lt.browser.firefox&&+lt.browser.version.split(".")[0]<39;function _f(t,e,r,n){return r=r||{},n?nv(t,e,r):fC&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):nv(t,e,r),r}function nv(t,e,r){if(lt.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(im(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(iC(Vu,t,n,i)){r.zrX=Vu[0],r.zrY=Vu[1];return}}r.zrX=r.zrY=0}function kh(t){return t||window.event}function zr(t,e,r){if(e=kh(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&_f(t,o,e,r)}else{_f(t,e,e,r);var a=hC(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&cC.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function hC(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function dC(t,e,r,n){t.addEventListener(e,r,n)}function vC(t,e,r,n){t.removeEventListener(e,r,n)}var pC=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},gC=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=iv(n)/iv(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=yC(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function vo(){return[1,0,0,1,0,0]}function Mh(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function mC(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ya(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function av(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function am(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(r),c=Math.cos(r);return t[0]=i*c+s*f,t[1]=-i*f+s*c,t[2]=a*c+l*f,t[3]=-a*f+c*l,t[4]=c*(o-n[0])+f*(u-n[1])+n[0],t[5]=c*(u-n[1])-f*(o-n[0])+n[1],t}function _C(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function Rh(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}var Ne=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),hs=Math.min,ds=Math.max,fi=new Ne,hi=new Ne,di=new Ne,vi=new Ne,Na=new Ne,Fa=new Ne,ht=function(){function t(e,r,n,i){n<0&&(e=e+n,n=-n),i<0&&(r=r+i,i=-i),this.x=e,this.y=r,this.width=n,this.height=i}return t.prototype.union=function(e){var r=hs(e.x,this.x),n=hs(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=ds(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=ds(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=vo();return av(a,a,[-r.x,-r.y]),_C(a,a,[n,i]),av(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r){if(!e)return!1;e instanceof t||(e=t.create(e));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,f=e.y,c=e.y+e.height,h=!(av&&(v=w,pv&&(v=k,y=n.x&&e<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}fi.x=di.x=r.x,fi.y=vi.y=r.y,hi.x=vi.x=r.x+r.width,hi.y=di.y=r.y+r.height,fi.transform(n),vi.transform(n),hi.transform(n),di.transform(n),e.x=hs(fi.x,hi.x,di.x,vi.x),e.y=hs(fi.y,hi.y,di.y,vi.y);var l=ds(fi.x,hi.x,di.x,vi.x),u=ds(fi.y,hi.y,di.y,vi.y);e.width=l-e.x,e.height=u-e.y},t}(),om="silent";function SC(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:bC}}function bC(){pC(this.event)}var wC=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(kn),$a=function(){function t(e,r){this.x=e,this.y=r}return t}(),CC=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Gu=new ht(0,0,0,0),sm=function(t){be(e,t);function e(r,n,i,a,o){var s=t.call(this)||this;return s._hovered=new $a(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new wC,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new tC(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(G(CC,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=lm(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new $a(n,i):this.findHover(n,i),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},e.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},e.prototype.resize=function(){this._hovered=new $a(0,0)},e.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},e.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=SC(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new $a(r,n);if(ov(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new ht(r-u,n-u,l,l),c=a.length-1;c>=0;c--){var h=a[c];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(Gu.copy(h.getBoundingRect()),h.transform&&Gu.applyTransform(h.transform),Gu.intersect(f)&&s.push(h))}if(s.length)for(var d=4,v=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function TC(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?om:!0}return!1}function ov(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=TC(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==om)){e.target=o;break}}}function lm(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var um=32,za=7;function xC(t){for(var e=0;t>=um;)e|=t&1,t>>=1;return t+e}function sv(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function IC(t,e,r){for(r--;e>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function Wu(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(t,e[r+f])>0?o=f+1:l=f}return l}function ju(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(t,e[r+f])<0?l=f:o=f+1}return l}function AC(t,e){var r=za,n,i,a=0,o=[];n=[],i=[];function s(d,v){n[a]=d,i[a]=v,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]i[d+1])break;f(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]=za||x>=za);if(M)break;R<0&&(R=0),R+=2}if(r=R,r<1&&(r=1),v===1){for(y=0;y=0;y--)t[C+y]=t[R+y];t[k]=o[w];return}for(var x=r;;){var M=0,b=0,T=!1;do if(e(o[w],t[m])<0){if(t[k--]=t[m--],M++,b=0,--v===0){T=!0;break}}else if(t[k--]=o[w--],b++,M=0,--g===1){T=!0;break}while((M|b)=0;y--)t[C+y]=t[R+y];if(v===0){T=!0;break}}if(t[k--]=o[w--],--g===1){T=!0;break}if(b=g-Wu(t[m],o,0,g,g-1,e),b!==0){for(k-=b,w-=b,g-=b,C=k+1,R=w+1,y=0;y=za||b>=za);if(T)break;x<0&&(x=0),x+=2}if(r=x,r<1&&(r=1),g===1){for(k-=v,m-=v,C=k+1,R=m+1,y=v-1;y>=0;y--)t[C+y]=t[R+y];t[k]=o[w]}else{if(g===0)throw new Error;for(R=k-(g-1),y=0;ys&&(l=s),lv(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var nn=1,no=2,ua=4,uv=!1;function qu(){uv||(uv=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function cv(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var kC=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=cv}return t.prototype.traverse=function(e,r){for(var n=0;n0&&(f.__clipPaths=[]),isNaN(f.z)&&(qu(),f.z=0),isNaN(f.z2)&&(qu(),f.z2=0),isNaN(f.zlevel)&&(qu(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,r,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,r,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,r,n)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,n=e.length;r=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),Sf;Sf=lt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var po={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-po.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?po.bounceIn(t*2)*.5:po.bounceOut(t*2-1)*.5+.5}},vs=Math.pow,Xn=Math.sqrt,yl=1e-8,cm=1e-4,fv=Xn(3),ps=1/3,an=Ma(),Ar=Ma(),ma=Ma();function Hn(t){return t>-yl&&tyl||t<-yl}function Ft(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function hv(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function ml(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,f=s*s-3*o*l,c=s*l-9*o*u,h=l*l-3*s*u,d=0;if(Hn(f)&&Hn(c))if(Hn(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[d++]=v)}else{var p=c*c-4*f*h;if(Hn(p)){var g=c/f,v=-s/o+g,y=-g/2;v>=0&&v<=1&&(a[d++]=v),y>=0&&y<=1&&(a[d++]=y)}else if(p>0){var m=Xn(p),w=f*s+1.5*o*(-c+m),k=f*s+1.5*o*(-c-m);w<0?w=-vs(-w,ps):w=vs(w,ps),k<0?k=-vs(-k,ps):k=vs(k,ps);var v=(-s-(w+k))/(3*o);v>=0&&v<=1&&(a[d++]=v)}else{var R=(2*f*s-3*o*c)/(2*Xn(f*f*f)),C=Math.acos(R)/3,x=Xn(f),M=Math.cos(C),v=(-s-2*x*M)/(3*o),y=(-s+x*(M+fv*Math.sin(C)))/(3*o),b=(-s+x*(M-fv*Math.sin(C)))/(3*o);v>=0&&v<=1&&(a[d++]=v),y>=0&&y<=1&&(a[d++]=y),b>=0&&b<=1&&(a[d++]=b)}}return d}function hm(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(Hn(o)){if(fm(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var f=a*a-4*o*s;if(Hn(f))i[0]=-a/(2*o);else if(f>0){var c=Xn(f),u=(-a+c)/(2*o),h=(-a-c)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function _l(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,f=(l-s)*i+s,c=(f-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=f,a[6]=l,a[7]=n}function MC(t,e,r,n,i,a,o,s,l,u,f){var c,h=.005,d=1/0,v,p,g,y;an[0]=l,an[1]=u;for(var m=0;m<1;m+=.05)Ar[0]=Ft(t,r,i,o,m),Ar[1]=Ft(e,n,a,s,m),g=ga(an,Ar),g=0&&g=0&&u<=1&&(i[l++]=u)}}else{var f=o*o-4*a*s;if(Hn(f)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(f>0){var c=Xn(f),u=(-o+c)/(2*a),h=(-o-c)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function dm(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Sl(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function LC(t,e,r,n,i,a,o,s,l){var u,f=.005,c=1/0;an[0]=o,an[1]=s;for(var h=0;h<1;h+=.05){Ar[0]=Qt(t,r,i,h),Ar[1]=Qt(e,n,a,h);var d=ga(an,Ar);d=0&&d=1?1:ml(0,n,a,1,l,s)&&Ft(0,i,o,1,s[0])}}}var BC=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||pr,this.ondestroy=e.ondestroy||pr,this.onrestart=e.onrestart||pr,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=je(e)?e:po[e]||Ph(e)},t}(),vm=function(){function t(e){this.value=e}return t}(),OC=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new vm(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Jo=function(){function t(e){this._list=new OC,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new vm(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),vv={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Kn(t){return t=Math.round(t),t<0?0:t>255?255:t}function bf(t){return t<0?0:t>1?1:t}function Xu(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Kn(parseFloat(e)/100*255):Kn(parseInt(e,10))}function go(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?bf(parseFloat(e)/100):bf(parseFloat(e))}function Ku(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function gs(t,e,r){return t+(e-t)*r}function Tr(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function wf(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var pm=new Jo(20),ys=null;function Yi(t,e){ys&&wf(ys,e),ys=pm.put(t,ys||e.slice())}function ln(t,e){if(t){e=e||[];var r=pm.get(t);if(r)return wf(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in vv)return wf(e,vv[n]),Yi(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Tr(e,0,0,0,1);return}return Tr(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Yi(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Tr(e,0,0,0,1);return}return Tr(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Yi(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Tr(e,+u[0],+u[1],+u[2],1):Tr(e,0,0,0,1);f=go(u.pop());case"rgb":if(u.length>=3)return Tr(e,Xu(u[0]),Xu(u[1]),Xu(u[2]),u.length===3?f:go(u[3])),Yi(t,e),e;Tr(e,0,0,0,1);return;case"hsla":if(u.length!==4){Tr(e,0,0,0,1);return}return u[3]=go(u[3]),pv(u,e),Yi(t,e),e;case"hsl":if(u.length!==3){Tr(e,0,0,0,1);return}return pv(u,e),Yi(t,e),e;default:return}}Tr(e,0,0,0,1)}}function pv(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=go(t[1]),i=go(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Tr(e,Kn(Ku(o,a,r+1/3)*255),Kn(Ku(o,a,r)*255),Kn(Ku(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function gv(t,e){var r=ln(t);if(r){for(var n=0;n<3;n++)r[n]=r[n]*(1-e)|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return Zl(r,r.length===4?"rgba":"rgb")}}function NC(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=ln(e[i]),s=ln(e[a]),l=n-i,u=Zl([Kn(gs(o[0],s[0],l)),Kn(gs(o[1],s[1],l)),Kn(gs(o[2],s[2],l)),bf(gs(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function Zl(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function bl(t,e){var r=ln(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var yv=new Jo(100);function Cf(t){if(Le(t)){var e=yv.get(t);return e||(e=gv(t,-.1),yv.put(t,e)),e}else if(Ih(t)){var r=me({},t);return r.colorStops=xe(t.colorStops,function(n){return{offset:n.offset,color:gv(n.color,-.1)}}),r}return t}var wl=Math.round;function Ro(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=ln(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var mv=1e-4;function Gn(t){return t-mv}function ms(t){return wl(t*1e3)/1e3}function Tf(t){return wl(t*1e4)/1e4}function FC(t){return"matrix("+ms(t[0])+","+ms(t[1])+","+ms(t[2])+","+ms(t[3])+","+Tf(t[4])+","+Tf(t[5])+")"}var $C={left:"start",right:"end",center:"middle",middle:"middle"};function zC(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function UC(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function VC(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function gm(t){return t&&!!t.image}function HC(t){return t&&!!t.svgElement}function Lh(t){return gm(t)||HC(t)}function ym(t){return t.type==="linear"}function mm(t){return t.type==="radial"}function _m(t){return t&&(t.type==="linear"||t.type==="radial")}function Ql(t){return"url(#"+t+")"}function Sm(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function bm(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*el,i=Oe(t.scaleX,1),a=Oe(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+wl(o*el)+"deg, "+wl(s*el)+"deg)"),l.join(" ")}var GC=function(){return lt.hasGlobalWindow&&je(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),xf=Array.prototype.slice;function _n(t,e,r){return(e-t)*r+t}function Yu(t,e,r,n){for(var i=e.length,a=0;an?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=Sv,l=r;if(ar(r)){var u=XC(r);s=u,(u===1&&!vt(r[0])||u===2&&!vt(r[0][0]))&&(o=!0)}else if(vt(r)&&!gl(r))s=Ss;else if(Le(r))if(!isNaN(+r))s=Ss;else{var f=ln(r);f&&(l=f,s=io)}else if(Ih(r)){var c=me({},l);c.colorStops=xe(r.colorStops,function(d){return{offset:d.offset,color:ln(d.color)}}),ym(r)?s=If:mm(r)&&(s=Af),l=c}a===0?this.valType=s:(s!==this.valType||s===Sv)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=je(n)?n:po[n]||Ph(n)),i.push(h),h},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=bs(i),u=bv(i),f=0;f=0&&!(o[f].percent<=r);f--);f=h(f,s-2)}else{for(f=c;fr);f++);f=h(f-1,s-2)}v=o[f+1],d=o[f]}if(d&&v){this._lastFr=f,this._lastFrP=r;var g=v.percent-d.percent,y=g===0?1:h((r-d.percent)/g,1);v.easingFunc&&(y=v.easingFunc(y));var m=n?this._additiveValue:u?Ua:e[l];if((bs(a)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?d.rawValue:v.rawValue;else if(bs(a))a===il?Yu(m,d[i],v[i],y):WC(m,d[i],v[i],y);else if(bv(a)){var w=d[i],k=v[i],R=a===If;e[l]={type:R?"linear":"radial",x:_n(w.x,k.x,y),y:_n(w.y,k.y,y),colorStops:xe(w.colorStops,function(x,M){var b=k.colorStops[M];return{offset:_n(x.offset,b.offset,y),color:nl(Yu([],x.color,b.color,y))}}),global:k.global},R?(e[l].x2=_n(w.x2,k.x2,y),e[l].y2=_n(w.y2,k.y2,y)):e[l].r=_n(w.r,k.r,y)}else if(u)Yu(m,d[i],v[i],y),n||(e[l]=nl(m));else{var C=_n(d[i],v[i],y);n?this._additiveValue=C:e[l]=C}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===Ss?e[n]=e[n]+i:r===io?(ln(e[n],Ua),_s(Ua,Ua,i,1),e[n]=nl(Ua)):r===il?_s(e[n],e[n],i,1):r===wm&&_v(e[n],e[n],i,1)},t}(),Eh=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){em("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,et(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,rl(u),i),this._trackKeys.push(s)}l.addKeyframe(e,rl(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function va(){return new Date().getTime()}var YC=function(t){be(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=va()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Sf(n),!r._paused&&r.update())}Sf(n)},e.prototype.start=function(){this._running||(this._time=va(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=va(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=va()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new Eh(r,n.loop);return this.addAnimator(i),i},e}(kn),ZC=300,Zu=lt.domSupported,Qu=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=xe(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),wv={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Cv=!1;function kf(t){var e=t.pointerType;return e==="pen"||e==="touch"}function QC(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Ju(t){t&&(t.zrByTouch=!0)}function JC(t,e){return zr(t.dom,new eT(t,e),!0)}function Cm(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var eT=function(){function t(e,r){this.stopPropagation=pr,this.stopImmediatePropagation=pr,this.preventDefault=pr,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),Ur={mousedown:function(t){t=zr(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=zr(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=zr(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=zr(this.dom,t);var e=t.toElement||t.relatedTarget;Cm(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Cv=!0,t=zr(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Cv||(t=zr(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=zr(this.dom,t),Ju(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Ur.mousemove.call(this,t),Ur.mousedown.call(this,t)},touchmove:function(t){t=zr(this.dom,t),Ju(t),this.handler.processGesture(t,"change"),Ur.mousemove.call(this,t)},touchend:function(t){t=zr(this.dom,t),Ju(t),this.handler.processGesture(t,"end"),Ur.mouseup.call(this,t),+new Date-+this.__lastTouchMomentAv||t<-Av}var gi=[],Zi=[],tc=vo(),rc=Math.abs,Dh=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return pi(this.rotation)||pi(this.x)||pi(this.y)||pi(this.scaleX-1)||pi(this.scaleY-1)||pi(this.skewX)||pi(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(Iv(n),this.invTransform=null);return}n=n||vo(),r?this.getLocalTransform(n):Iv(n),e&&(r?ya(n,e,n):mC(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(gi);var n=gi[0]<0?-1:1,i=gi[1]<0?-1:1,a=((gi[0]-n)*r+n)/gi[0]||0,o=((gi[1]-i)*r+i)/gi[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||vo(),Rh(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||vo(),ya(Zi,e.invTransform,r),r=Zi);var n=this.originX,i=this.originY;(n||i)&&(tc[4]=n,tc[5]=i,ya(Zi,r,tc),Zi[4]-=n,Zi[5]-=i,r=Zi),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&Lr(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&Lr(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&rc(e[0]-1)>1e-10&&rc(e[3]-1)>1e-10?Math.sqrt(rc(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){xm(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,c=e.y,h=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var v=n+s,p=i+l;r[4]=-v*a-h*p*o,r[5]=-p*o-d*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=h*o,u&&am(r,r,u),r[4]+=n+f,r[5]+=i+c,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Po=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function xm(t,e){for(var r=0;r=0?parseFloat(t)/100*e:parseFloat(t):t}function Cl(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,f="left",c="top";if(n instanceof Array)l+=ei(n[0],r.width),u+=ei(n[1],r.height),f=null,c=null;else switch(n){case"left":l-=i,u+=s,f="right",c="middle";break;case"right":l+=i+o,u+=s,c="middle";break;case"top":l+=o/2,u-=i,f="center",c="bottom";break;case"bottom":l+=o/2,u+=a+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=i,u+=s,c="middle";break;case"insideRight":l+=o-i,u+=s,f="right",c="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=a-i,f="center",c="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=a-i,c="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,f="right",c="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=f,t.verticalAlign=c,t}var nc="__zr_normal__",ic=Po.concat(["ignore"]),aT=Jn(Po,function(t,e){return t[e]=!0,t},{ignore:!1}),Qi={},oT=new ht(0,0,0,0),eu=function(){function t(e){this.id=Jy(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(r),n.position!=null){var f=oT;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Qi,n,f):Cl(Qi,n,f),a.x=Qi.x,a.y=Qi.y,o=Qi.align,s=Qi.verticalAlign;var c=n.origin;if(c&&n.rotation!=null){var h=void 0,d=void 0;c==="center"?(h=f.width*.5,d=f.height*.5):(h=ei(c[0],f.width),d=ei(c[1],f.height)),u=!0,a.originX=-a.x+h+(i?0:f.x),a.originY=-a.y+d+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var v=n.offset;v&&(a.x+=v[0],a.y+=v[1],u||(a.originX=-v[0],a.originY=-v[1]));var p=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,w=void 0;p&&this.canBeInsideText()?(y=n.insideFill,m=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),w=!0)):(y=n.outsideFill,m=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),w=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||w!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=w,g.align=o,g.verticalAlign=s,r.setDefaultTextStyle(g)),r.__dirty|=nn,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Lf:Pf},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&ln(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,Zl(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},me(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(De(e))for(var n=e,i=et(n),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(nc,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===nc,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(gt(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){em("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,h=this._textGuide;return c&&c.useState(e,r,n,f),h&&h.useState(e,r,n,f),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~nn),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,v);var p=this._textContent,g=this._textGuide;p&&p.useStates(e,r,h),g&&g.useStates(e,r,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~nn)}},t.prototype.isSilent=function(){for(var e=this.silent,r=this.parent;!e&&r;){if(r.silent){e=!0;break}r=r.parent}return e},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=gt(i,e),o=gt(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(v,p){r.during(p)});for(var h=0;h0||i.force&&!o.length){var M=void 0,b=void 0,T=void 0;if(s){b={},h&&(M={});for(var k=0;k=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=gt(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=gt(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}function dt(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return Le(t)?yT(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function wt(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),Mm),t=(+t).toFixed(e),r?t:+t}function Cn(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return mT(t)}function mT(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function _T(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function ST(t,e){var r=Jn(t,function(d,v){return d+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=xe(t,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=xe(i,function(d){return Math.floor(d)}),s=Jn(o,function(d,v){return d+v},0),l=xe(i,function(d,v){return d-o[v]});su&&(u=l[c],f=c);++o[f],l[f]=0,++s}return xe(o,function(d){return d/n})}function bT(t,e){var r=Math.max(Cn(t),Cn(e)),n=t+e;return r>Mm?n:wt(n,r)}function Rm(t){var e=Math.PI*2;return(t%e+e)%e}function Tl(t){return t>-Pv&&t=10&&e++,e}function Pm(t,e){var r=Bh(t),n=Math.pow(10,r),i=t/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function TT(t){var e=parseFloat(t);return e==t&&(e!==0||!Le(t)||t.indexOf("x")<=0)?e:NaN}function xT(t){return!isNaN(TT(t))}function IT(){return Math.round(Math.random()*9)}function Lm(t,e){return e===0?t:Lm(e,t%e)}function Lv(t,e){return t==null?e:e==null?t:t*e/Lm(t,e)}function dr(t){throw new Error(t)}function Ev(t,e,r){return(e-t)*r+t}var Em="series\0",AT="\0_ec_\0";function Xt(t){return t instanceof Array?t:t==null?[]:[t]}function Bf(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,i=r.length;n=0||a&>(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var KT=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],YT=Eo(KT),ZT=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return YT(this,e,r)},t}(),Of=new Jo(50);function QT(t){if(typeof t=="string"){var e=Of.get(t);return e&&e.image}else return t}function Fh(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=Of.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!nu(e)&&a.pending.push(o)):(e=Zo.loadImage(t,Bv,Bv),e.__zrImageSrc=t,Of.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function Bv(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=gr(r,e);return u>s&&(r="",u=0),s=t-u,i.ellipsis=r,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=t,i}function zm(t,e){var r=e.containerWidth,n=e.font,i=e.contentWidth;if(!r)return"";var a=gr(t,n);if(a<=r)return t;for(var o=0;;o++){if(a<=i||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?ex(t,i,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*i/a):0;t=t.substr(0,s),a=gr(t,n)}return t===""&&(t=e.placeholder),t}function ex(t,e,r,n){for(var i=0,a=0,o=t.length;ad&&u){var v=Math.floor(d/s);c=c.slice(0,v)}if(t&&a&&f!=null)for(var p=$m(f,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g=0;gs&&uc(r,t.substring(s,u),e,o),uc(r,l[2],e,o,l[1]),s=lc.lastIndex}si){R>0?(m.tokens=m.tokens.slice(0,R),g(m,k,w),r.lines=r.lines.slice(0,y+1)):r.lines=r.lines.slice(0,y);break e}var I=x.width,A=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")C.percentWidth=I,f.push(C),C.contentWidth=gr(C.text,T);else{if(A){var P=x.backgroundColor,O=P&&P.image;O&&(O=QT(O),nu(O)&&(C.width=Math.max(C.width,O.width*_/O.height)))}var E=v&&n!=null?n-k:null;E!=null&&E0&&v+n.accumWidth>n.width&&(f=e.split(` `),u=!0),n.accumWidth=v}else{var p=Um(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+d,c=p.linesWidths,f=p.lines}}else f=e.split(` `);for(var g=0;g=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var ox=Jn(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function sx(t){return ax(t)?!!ox[t]:!0}function Um(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,f=0,c=0;cr:i+f+d>r){f?(s||l)&&(v?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=h,u+=d,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=h,f=d)):v?(a.push(l),o.push(u),l=h,u=d):(a.push(h),o.push(d));continue}f+=d,v?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return!a.length&&!s&&(s=t,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var Nf="__zr_style_"+Math.round(Math.random()*10),$i={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},iu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};$i[Nf]=!0;var Nv=["z","z2","invisible"],lx=["invisible"],ux=function(t){be(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=et(r),i=0;i1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(ws[0]=dc(i)*r+t,ws[1]=hc(i)*n+e,Cs[0]=dc(a)*r+t,Cs[1]=hc(a)*n+e,u(s,ws,Cs),f(l,ws,Cs),i=i%mi,i<0&&(i=i+mi),a=a%mi,a<0&&(a=a+mi),i>a&&!o?a+=mi:ii&&(Ts[0]=dc(d)*r+t,Ts[1]=hc(d)*n+e,u(s,Ts,s),f(l,Ts,l))}var ot={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},_i=[],Si=[],Zr=[],Pn=[],Qr=[],Jr=[],vc=Math.min,pc=Math.max,bi=Math.cos,wi=Math.sin,gn=Math.abs,Ff=Math.PI,zn=Ff*2,gc=typeof Float32Array<"u",Va=[];function yc(t){var e=Math.round(t/Ff*1e8)/1e8;return e%2*Ff}function Vm(t,e){var r=yc(t[0]);r<0&&(r+=zn);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=zn?i=r+zn:e&&r-i>=zn?i=r-zn:!e&&r>i?i=r+(zn-yc(r-i)):e&&r0&&(this._ux=gn(n/xv/e)||0,this._uy=gn(n/xv/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(ot.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=gn(e-this._xi),i=gn(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(ot.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(ot.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(ot.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),Va[0]=i,Va[1]=a,Vm(Va,o),i=Va[0],a=Va[1];var s=a-i;return this.addData(ot.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=bi(a)*n+e,this._yi=wi(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(ot.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(ot.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var r=e.length;!(this.data&&this.data.length===r)&&gc&&(this.data=new Float32Array(r));for(var n=0;nf.length&&(this._expandData(),f=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Zr[0]=Zr[1]=Qr[0]=Qr[1]=Number.MAX_VALUE,Pn[0]=Pn[1]=Jr[0]=Jr[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||gn(w)>i||h===r-1)&&(p=Math.sqrt(m*m+w*w),a=g,o=y);break}case ot.C:{var k=e[h++],R=e[h++],g=e[h++],y=e[h++],C=e[h++],x=e[h++];p=RC(a,o,k,R,g,y,C,x,10),a=C,o=x;break}case ot.Q:{var k=e[h++],R=e[h++],g=e[h++],y=e[h++];p=EC(a,o,k,R,g,y,10),a=g,o=y;break}case ot.A:var M=e[h++],b=e[h++],T=e[h++],_=e[h++],I=e[h++],A=e[h++],P=A+I;h+=1,v&&(s=bi(I)*T+M,l=wi(I)*_+b),p=pc(T,_)*vc(zn,Math.abs(A)),a=bi(P)*T+M,o=wi(P)*_+b;break;case ot.R:{s=a=e[h++],l=o=e[h++];var O=e[h++],E=e[h++];p=O*2+E*2;break}case ot.Z:{var m=s-a,w=l-o;p=Math.sqrt(m*m+w*w),a=s,o=l;break}}p>=0&&(u[c++]=p,f+=p)}return this._pathLen=f,f},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,f,c,h,d=r<1,v,p,g=0,y=0,m,w=0,k,R;if(!(d&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,p=this._pathLen,m=r*p,!m)))e:for(var C=0;C0&&(e.lineTo(k,R),w=0),x){case ot.M:s=u=n[C++],l=f=n[C++],e.moveTo(u,f);break;case ot.L:{c=n[C++],h=n[C++];var b=gn(c-u),T=gn(h-f);if(b>i||T>a){if(d){var _=v[y++];if(g+_>m){var I=(m-g)/_;e.lineTo(u*(1-I)+c*I,f*(1-I)+h*I);break e}g+=_}e.lineTo(c,h),u=c,f=h,w=0}else{var A=b*b+T*T;A>w&&(k=c,R=h,w=A)}break}case ot.C:{var P=n[C++],O=n[C++],E=n[C++],N=n[C++],z=n[C++],U=n[C++];if(d){var _=v[y++];if(g+_>m){var I=(m-g)/_;_l(u,P,E,z,I,_i),_l(f,O,N,U,I,Si),e.bezierCurveTo(_i[1],Si[1],_i[2],Si[2],_i[3],Si[3]);break e}g+=_}e.bezierCurveTo(P,O,E,N,z,U),u=z,f=U;break}case ot.Q:{var P=n[C++],O=n[C++],E=n[C++],N=n[C++];if(d){var _=v[y++];if(g+_>m){var I=(m-g)/_;Sl(u,P,E,I,_i),Sl(f,O,N,I,Si),e.quadraticCurveTo(_i[1],Si[1],_i[2],Si[2]);break e}g+=_}e.quadraticCurveTo(P,O,E,N),u=E,f=N;break}case ot.A:var q=n[C++],Y=n[C++],Z=n[C++],se=n[C++],ce=n[C++],J=n[C++],X=n[C++],ee=!n[C++],ue=Z>se?Z:se,_e=gn(Z-se)>.001,ve=ce+J,ie=!1;if(d){var _=v[y++];g+_>m&&(ve=ce+J*(m-g)/_,ie=!0),g+=_}if(_e&&e.ellipse?e.ellipse(q,Y,Z,se,X,ce,ve,ee):e.arc(q,Y,ue,ce,ve,ee),ie)break e;M&&(s=bi(ce)*Z+q,l=wi(ce)*se+Y),u=bi(ve)*Z+q,f=wi(ve)*se+Y;break;case ot.R:s=u=n[C],l=f=n[C+1],c=n[C++],h=n[C++];var ne=n[C++],Ae=n[C++];if(d){var _=v[y++];if(g+_>m){var re=m-g;e.moveTo(c,h),e.lineTo(c+vc(re,ne),h),re-=ne,re>0&&e.lineTo(c+ne,h+vc(re,Ae)),re-=Ae,re>0&&e.lineTo(c+pc(ne-re,0),h+Ae),re-=ne,re>0&&e.lineTo(c,h+pc(Ae-re,0));break e}g+=_}e.rect(c,h,ne,Ae);break;case ot.Z:if(d){var _=v[y++];if(g+_>m){var I=(m-g)/_;e.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break e}g+=_}e.closePath(),u=s,f=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.CMD=ot,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Ji(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+c&&f>n+c&&f>a+c&&f>s+c||ft+c&&u>r+c&&u>i+c&&u>o+c||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||f+ui&&(i+=Ha);var h=Math.atan2(l,s);return h<0&&(h+=Ha),h>=n&&h<=i||h+Ha>=n&&h+Ha<=i}function Ci(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var Ln=ri.CMD,Ti=Math.PI*2,yx=1e-4;function mx(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&_x(),d=Ft(e,n,a,s,Ir[0]),h>1&&(v=Ft(e,n,a,s,Ir[1]))),h===2?ge&&s>n&&s>a||s=0&&u<=1){for(var f=0,c=Qt(e,n,a,u),h=0;hr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);jt[0]=-l,jt[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Ti-1e-4){n=0,i=Ti;var f=a?1:-1;return o>=jt[0]+t&&o<=jt[1]+t?f:0}if(n>i){var c=n;n=i,i=c}n<0&&(n+=Ti,i+=Ti);for(var h=0,d=0;d<2;d++){var v=jt[d];if(v+t>o){var p=Math.atan2(s,v),f=a?1:-1;p<0&&(p=Ti+p),(p>=n&&p<=i||p+Ti>=n&&p+Ti<=i)&&(p>Math.PI/2&&p1&&(r||(s+=Ci(l,u,f,c,n,i))),g&&(l=a[v],u=a[v+1],f=l,c=u),p){case Ln.M:f=a[v++],c=a[v++],l=f,u=c;break;case Ln.L:if(r){if(Ji(l,u,a[v],a[v+1],e,n,i))return!0}else s+=Ci(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ln.C:if(r){if(vx(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=Sx(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ln.Q:if(r){if(px(l,u,a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=bx(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case Ln.A:var y=a[v++],m=a[v++],w=a[v++],k=a[v++],R=a[v++],C=a[v++];v+=1;var x=!!(1-a[v++]);h=Math.cos(R)*w+y,d=Math.sin(R)*k+m,g?(f=h,c=d):s+=Ci(l,u,h,d,n,i);var M=(n-y)*k/w+y;if(r){if(gx(y,m,k,R,R+C,x,e,M,i))return!0}else s+=Cx(y,m,k,R,R+C,x,M,i);l=Math.cos(R+C)*w+y,u=Math.sin(R+C)*k+m;break;case Ln.R:f=l=a[v++],c=u=a[v++];var b=a[v++],T=a[v++];if(h=f+b,d=c+T,r){if(Ji(f,c,h,c,e,n,i)||Ji(h,c,h,d,e,n,i)||Ji(h,d,f,d,e,n,i)||Ji(f,d,f,c,e,n,i))return!0}else s+=Ci(h,c,h,d,n,i),s+=Ci(f,d,f,c,n,i);break;case Ln.Z:if(r){if(Ji(l,u,f,c,e,n,i))return!0}else s+=Ci(l,u,f,c,n,i);l=f,u=c;break}}return!r&&!mx(u,c)&&(s+=Ci(l,u,f,c,n,i)||0),s!==0}function Tx(t,e,r){return Hm(t,0,!1,e,r)}function xx(t,e,r,n){return Hm(t,e,!0,r,n)}var xl=Ye({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},$i),Ix={style:Ye({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},iu.style)},mc=Po.concat(["invisible","culling","z","z2","zlevel","parent"]),it=function(t){be(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Pf:n>.2?iT:Lf}else if(r)return Lf}return Pf},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(Le(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=bl(r,0)0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ua)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),xx(s,l/u,r,n)))return!0}if(this.hasFill())return Tx(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=ua,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:me(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&ua)},e.prototype.createStyle=function(r){return Yl(xl,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=me({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=me({},i.shape),me(u,n.shape)):(u=me({},a?this.shape:i.shape),me(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=me({},this.shape);for(var f={},c=et(u),h=0;h0},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return Yl(Ax,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=Im(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(ts);Do.prototype.type="tspan";var kx=Ye({x:0,y:0},$i),Mx={style:Ye({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},iu.style)};function Rx(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var Wr=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return Yl(kx,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=Rx(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Mx},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new ht(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(ts);Wr.prototype.type="image";function Px(t,e){var r=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,f;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var c;s+l>i&&(c=s+l,s*=i/c,l*=i/c),u+f>i&&(c=u+f,u*=i/c,f*=i/c),l+u>a&&(c=l+u,l*=a/c,u*=a/c),s+f>a&&(c=s+f,s*=a/c,f*=a/c),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+f,n+a),f!==0&&t.arc(r+f,n+a-f,f,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var pa=Math.round;function Gm(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(pa(n*2)===pa(i*2)&&(t.x1=t.x2=Oi(n,s,!0)),pa(a*2)===pa(o*2)&&(t.y1=t.y2=Oi(a,s,!0))),t}}function Wm(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Oi(n,s,!0),t.y=Oi(i,s,!0),t.width=Math.max(Oi(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(Oi(i+o,s,!1)-t.y,o===0?0:1)),t}}function Oi(t,e,r){if(!e)return t;var n=pa(t*2);return(n+pa(e))%2===0?n/2:(n+(r?1:-1))/2}var Lx=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),Ex={},Mt=function(t){be(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Lx},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=Wm(Ex,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Px(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(it);Mt.prototype.type="rect";var Vv={fill:"#000"},Hv=2,Dx={style:Ye({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},iu.style)},mr=function(t){be(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Vv,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,I=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),A=o.calculatedLineHeight,P=0;P=0&&(P=C[A],P.align==="right");)this._placeToken(P,r,M,y,I,"right",w),b-=P.width,I-=P.width,A--;for(_+=(a-(_-g)-(m-I)-b)/2;T<=A;)P=C[T],this._placeToken(P,r,M,y,_+P.width/2,"center",w),_+=P.width,T++;y+=M}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var f=r.verticalAlign,c=a+i/2;f==="top"?c=a+r.height/2:f==="bottom"&&(c=a+i-r.height/2);var h=!r.isLineHolder&&_c(u);h&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,c-r.height/2,r.width,r.height);var d=!!u.backgroundColor,v=r.textPadding;v&&(o=Kv(o,s,v),c-=r.height/2-v[0]-r.innerHeight/2);var p=this._getOrCreateChild(Do),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,w=0,k=Xv("fill"in u?u.fill:"fill"in n?n.fill:(m=!0,y.fill)),R=qv("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||m)?(w=Hv,y.stroke):null),C=u.textShadowBlur>0||n.textShadowBlur>0;g.text=r.text,g.x=o,g.y=c,C&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=r.font||Qn,g.opacity=fo(u.opacity,n.opacity,1),Wv(g,u),R&&(g.lineWidth=fo(u.lineWidth,n.lineWidth,w),g.lineDash=Oe(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=R),k&&(g.fill=k);var x=r.contentWidth,M=r.contentHeight;p.setBoundingRect(new ht(ao(g.x,x,g.textAlign),ca(g.y,M,g.textBaseline),x,M))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,f=r.borderColor,c=l&&l.image,h=l&&!c,d=r.borderRadius,v=this,p,g;if(h||r.lineHeight||u&&f){p=this._getOrCreateChild(Mt),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=d,p.dirtyShape()}if(h){var m=p.style;m.fill=l||null,m.fillOpacity=Oe(r.fillOpacity,1)}else if(c){g=this._getOrCreateChild(Wr),g.onload=function(){v.dirtyStyle()};var w=g.style;w.image=l.image,w.x=i,w.y=a,w.width=o,w.height=s}if(u&&f){var m=p.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=Oe(r.strokeOpacity,1),m.lineDash=r.borderDash,m.lineDashOffset=r.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var k=(p||g).style;k.shadowBlur=r.shadowBlur||0,k.shadowColor=r.shadowColor||"transparent",k.shadowOffsetX=r.shadowOffsetX||0,k.shadowOffsetY=r.shadowOffsetY||0,k.opacity=fo(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return qm(r)&&(n=[r.fontStyle,r.fontWeight,jm(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Vn(n)||r.textFont||r.font},e}(ts),Bx={left:!0,right:1,center:1},Ox={top:1,bottom:1,middle:1},Gv=["fontStyle","fontWeight","fontSize","fontFamily"];function jm(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?Ch+"px":t+"px"}function Wv(t,e){for(var r=0;r=0,a=!1;if(t instanceof it){var o=Xm(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(ea(s)||ea(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=me({},n),u=me({},u),u.fill=s):!ea(u.fill)&&ea(s)?(a=!0,n=me({},n),u=me({},u),u.fill=Cf(s)):!ea(u.stroke)&&ea(l)&&(a||(n=me({},n),u=me({},u)),u.stroke=Cf(l)),n.style=u}}if(n&&n.z2==null){a||(n=me({},n));var f=t.z2EmphasisLift;n.z2=t.z2+(f??$x)}return n}function Wx(t,e,r){if(r&&r.z2==null){r=me({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??zx)}return r}function jx(t,e,r){var n=gt(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:Hx(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=me({},r),o=me({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Sc(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return Gx(this,t,e,r);if(t==="blur")return jx(this,t,r);if(t==="select")return Wx(this,t,r)}return r}function qx(t){t.stateProxy=Sc;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=Sc),r&&(r.stateProxy=Sc)}function tp(t,e){!t0(t,e)&&!t.__highByOuter&&Mn(t,Km)}function rp(t,e){!t0(t,e)&&!t.__highByOuter&&Mn(t,Ym)}function Al(t,e){t.__highByOuter|=1<<(e||0),Mn(t,Km)}function kl(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&Mn(t,Ym)}function Xx(t){Mn(t,Uh)}function Qm(t){Mn(t,Zm)}function Jm(t){Mn(t,Ux)}function e0(t){Mn(t,Vx)}function t0(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function r0(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=$h(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Zm(u)}),s&&r.push(a)),o.isBlured=!1}),G(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function $f(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,f){for(var c=0;c0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function Uf(t,e,r){n0(t,!0),Mn(t,qx),tI(t,e,r)}function eI(t){n0(t,!1)}function Ca(t,e,r,n){n?eI(t):Uf(t,e,r)}function tI(t,e,r){var n=yt(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var ip=["emphasis","blur","select"],rI={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ta(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=bc(v),s*=bc(v));var p=(i===a?-1:1)*bc((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,g=p*o*d/s,y=p*-s*h/o,m=(t+r)/2+As(c)*g-Is(c)*y,w=(e+n)/2+Is(c)*g+As(c)*y,k=lp([1,0],[(h-g)/o,(d-y)/s]),R=[(h-g)/o,(d-y)/s],C=[(-1*h-g)/o,(-1*d-y)/s],x=lp(R,C);if(Gf(R,C)<=-1&&(x=Ga),Gf(R,C)>=1&&(x=0),x<0){var M=Math.round(x/Ga*1e6)/1e6;x=Ga*2+M%2*Ga}f.addData(u,m,w,o,s,k,x,c,a)}var lI=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,uI=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function cI(t){var e=new ri;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=ri.CMD,l=t.match(lI);if(!l)return e;for(var u=0;uP*P+O*O&&(M=T,b=_),{cx:M,cy:b,x0:-f,y0:-c,x1:M*(i/R-1),y1:b*(i/R-1)}}function mI(t){var e;if(Re(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function _I(t,e){var r,n=oo(e.r,0),i=oo(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,c=e.cy,h=!!e.clockwise,d=cp(u-l),v=d>wc&&d%wc;if(v>$r&&(d=v),!(n>$r))t.moveTo(f,c);else if(d>wc-$r)t.moveTo(f+n*ra(l),c+n*xi(l)),t.arc(f,c,n,l,u,!h),i>$r&&(t.moveTo(f+i*ra(u),c+i*xi(u)),t.arc(f,c,i,u,l,h));else{var p=void 0,g=void 0,y=void 0,m=void 0,w=void 0,k=void 0,R=void 0,C=void 0,x=void 0,M=void 0,b=void 0,T=void 0,_=void 0,I=void 0,A=void 0,P=void 0,O=n*ra(l),E=n*xi(l),N=i*ra(u),z=i*xi(u),U=d>$r;if(U){var q=e.cornerRadius;q&&(r=mI(q),p=r[0],g=r[1],y=r[2],m=r[3]);var Y=cp(n-i)/2;if(w=en(Y,y),k=en(Y,m),R=en(Y,p),C=en(Y,g),b=x=oo(w,k),T=M=oo(R,C),(x>$r||M>$r)&&(_=n*ra(u),I=n*xi(u),A=i*ra(l),P=i*xi(l),d$r){var _e=en(y,b),ve=en(m,b),ie=ks(A,P,O,E,n,_e,h),ne=ks(_,I,N,z,n,ve,h);t.moveTo(f+ie.cx+ie.x0,c+ie.cy+ie.y0),b0&&t.arc(f+ie.cx,c+ie.cy,_e,$t(ie.y0,ie.x0),$t(ie.y1,ie.x1),!h),t.arc(f,c,n,$t(ie.cy+ie.y1,ie.cx+ie.x1),$t(ne.cy+ne.y1,ne.cx+ne.x1),!h),ve>0&&t.arc(f+ne.cx,c+ne.cy,ve,$t(ne.y1,ne.x1),$t(ne.y0,ne.x0),!h))}else t.moveTo(f+O,c+E),t.arc(f,c,n,l,u,!h);if(!(i>$r)||!U)t.lineTo(f+N,c+z);else if(T>$r){var _e=en(p,T),ve=en(g,T),ie=ks(N,z,_,I,i,-ve,h),ne=ks(O,E,A,P,i,-_e,h);t.lineTo(f+ie.cx+ie.x0,c+ie.cy+ie.y0),T0&&t.arc(f+ie.cx,c+ie.cy,ve,$t(ie.y0,ie.x0),$t(ie.y1,ie.x1),!h),t.arc(f,c,i,$t(ie.cy+ie.y1,ie.cx+ie.x1),$t(ne.cy+ne.y1,ne.cx+ne.x1),h),_e>0&&t.arc(f+ne.cx,c+ne.cy,_e,$t(ne.y1,ne.x1),$t(ne.y0,ne.x0),!h))}else t.lineTo(f+N,c+z),t.arc(f,c,i,u,l,h)}t.closePath()}}}var SI=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),si=function(t){be(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new SI},e.prototype.buildPath=function(r,n){_I(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(it);si.prototype.type="sector";var bI=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),lu=function(t){be(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new bI},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(it);lu.prototype.type="ring";function wI(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,f,c;if(n){f=[1/0,1/0],c=[-1/0,-1/0];for(var h=0,d=t.length;h=2){if(n){var a=wI(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;sAi[1]){if(s=!1,a)return s;var f=Math.abs(Ai[0]-Ii[1]),c=Math.abs(Ii[0]-Ai[1]);Math.min(f,c)>i.len()&&(f0){var c=f.duration,h=f.delay,d=f.easing,v={duration:c,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,v):e.animateTo(r,v)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Gt(t,e,r,n,i,a){Wh("update",t,e,r,n,i,a)}function rr(t,e,r,n,i,a){Wh("enter",t,e,r,n,i,a)}function bo(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function dp(t){return!t.isGroup}function jI(t){return t.shape!=null}function g0(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){dp(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return jI(o)&&(s.shape=me({},o.shape)),s}var a=n(t);e.traverse(function(o){if(dp(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Gt(o,l,r,yt(o).dataIndex)}}})}function qI(t,e){return xe(t,function(r){var n=r[0];n=Ll(n,e.x),n=El(n,e.x+e.width);var i=r[1];return i=Ll(i,e.y),i=El(i,e.y+e.height),[n,i]})}function XI(t,e){var r=Ll(t.x,e.x),n=El(t.x+t.width,e.x+e.width),i=Ll(t.y,e.y),a=El(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function y0(t,e,r){var n=me({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),Ye(i,r),new Wr(n)):jh(t.replace("path://",""),n,r,"center")}function KI(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Cc(d,v,f,c)/h;return!(g<0||g>1)}function Cc(t,e,r,n){return t*n-r*e}function YI(t){return t<=1e-6&&t>=-1e-6}function qh(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=Le(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&G(et(l),function(f){Mo(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=yt(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Ye({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function vp(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function cu(t,e){if(t)if(Re(t))for(var r=0;r=0&&s.push(l)}),s}}function b0(t,e){return ut(ut({},t,!0),e,!0)}const hA={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},dA={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Dl="ZH",Xh="EN",_a=Xh,ul={},Kh={},w0=lt.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||_a).toUpperCase();return t.indexOf(Dl)>-1?Dl:_a}():_a;function C0(t,e){t=t.toUpperCase(),Kh[t]=new Rt(e),ul[t]=e}function vA(t){if(Le(t)){var e=ul[t.toUpperCase()]||{};return t===Dl||t===Xh?Je(e):ut(Je(e),Je(ul[_a]),!1)}else return ut(Je(t),Je(ul[_a]),!1)}function pA(t){return Kh[t]}function gA(){return Kh[_a]}C0(Xh,hA);C0(Dl,dA);var Yh=1e3,Zh=Yh*60,wo=Zh*60,Rr=wo*24,bp=Rr*365,so={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Ps="{yyyy}-{MM}-{dd}",wp={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ps,hour:Ps+" "+so.hour,minute:Ps+" "+so.minute,second:Ps+" "+so.second,millisecond:so.none},Ic=["year","month","day","hour","minute","second","millisecond"],T0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function En(t,e){return t+="","0000".substr(0,e-t.length)+t}function Sa(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function yA(t){return t===Sa(t)}function mA(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function x0(t,e,r,n){var i=ti(t),a=i[Qh(r)](),o=i[ba(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[vu(r)](),u=i["get"+(r?"UTC":"")+"Day"](),f=i[Fo(r)](),c=(f-1)%12+1,h=i[pu(r)](),d=i[gu(r)](),v=i[yu(r)](),p=f>=12?"pm":"am",g=p.toUpperCase(),y=n instanceof Rt?n:pA(n||w0)||gA(),m=y.getModel("time"),w=m.get("month"),k=m.get("monthAbbr"),R=m.get("dayOfWeek"),C=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,En(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,w[o-1]).replace(/{MMM}/g,k[o-1]).replace(/{MM}/g,En(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,En(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,R[u]).replace(/{ee}/g,C[u]).replace(/{e}/g,u+"").replace(/{HH}/g,En(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,En(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,En(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,En(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,En(v,3)).replace(/{S}/g,v+"")}function _A(t,e,r,n,i){var a=null;if(Le(r))a=r;else if(je(r))a=r(t.value,e,{level:t.level});else{var o=me({},so);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(Re(a)){var c=t.level==null?0:t.level>=0?t.level:a.length+t.level;c=Math.min(c,a.length-1),a=a[c]}}return x0(new Date(t.value),a,i,n)}function I0(t,e){var r=ti(t),n=r[ba(e)]()+1,i=r[vu(e)](),a=r[Fo(e)](),o=r[pu(e)](),s=r[gu(e)](),l=r[yu(e)](),u=l===0,f=u&&s===0,c=f&&o===0,h=c&&a===0,d=h&&i===1,v=d&&n===1;return v?"year":d?"month":h?"day":c?"hour":f?"minute":u?"second":"millisecond"}function Cp(t,e,r){var n=vt(t)?ti(t):t;switch(e=e||I0(t,r),e){case"year":return n[Qh(r)]();case"half-year":return n[ba(r)]()>=6?1:0;case"quarter":return Math.floor((n[ba(r)]()+1)/4);case"month":return n[ba(r)]();case"day":return n[vu(r)]();case"half-day":return n[Fo(r)]()/24;case"hour":return n[Fo(r)]();case"minute":return n[pu(r)]();case"second":return n[gu(r)]();case"millisecond":return n[yu(r)]()}}function Qh(t){return t?"getUTCFullYear":"getFullYear"}function ba(t){return t?"getUTCMonth":"getMonth"}function vu(t){return t?"getUTCDate":"getDate"}function Fo(t){return t?"getUTCHours":"getHours"}function pu(t){return t?"getUTCMinutes":"getMinutes"}function gu(t){return t?"getUTCSeconds":"getSeconds"}function yu(t){return t?"getUTCMilliseconds":"getMilliseconds"}function SA(t){return t?"setUTCFullYear":"setFullYear"}function A0(t){return t?"setUTCMonth":"setMonth"}function k0(t){return t?"setUTCDate":"setDate"}function M0(t){return t?"setUTCHours":"setHours"}function R0(t){return t?"setUTCMinutes":"setMinutes"}function P0(t){return t?"setUTCSeconds":"setSeconds"}function L0(t){return t?"setUTCMilliseconds":"setMilliseconds"}function bA(t){if(!xT(t))return Le(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}var E0=tm,Tp=["a","b","c","d","e","f","g"],Ac=function(t,e){return"{"+t+(e??"")+"}"};function wA(t,e,r){Re(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;an||l.newline?(a=0,d=p,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(h?-h.y+f.y:0);v=o+g,v>i||l.newline?(a+=s+r,o=0,v=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=d+r:o=v+r)})}var Co=Jh;vr(Jh,"vertical");vr(Jh,"horizontal");function Bl(t,e,r){r=E0(r||0);var n=e.width,i=e.height,a=dt(t.left,n),o=dt(t.top,i),s=dt(t.right,n),l=dt(t.bottom,i),u=dt(t.width,n),f=dt(t.height,i),c=r[2]+r[0],h=r[1]+r[3],d=t.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(f)&&(f=i-l-c-o),d!=null&&(isNaN(u)&&isNaN(f)&&(d>n/i?u=n*.8:f=i*.8),isNaN(u)&&(u=d*f),isNaN(f)&&(f=u/d)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-f-c),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-h;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-c;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(f)&&(f=i-c-o-(l||0));var v=new ht(a+r[3],o+r[0],u,f);return v.margin=r,v}function $o(t){var e=t.layoutMode||t.constructor.layoutMode;return De(e)?e:e?{type:e}:null}function xa(t,e,r){var n=r&&r.ignoreSize;!Re(n)&&(n=[n,n]);var i=o(Ls[0],0),a=o(Ls[1],1);u(Ls[0],t,i),u(Ls[1],t,a);function o(f,c){var h={},d=0,v={},p=0,g=2;if(cl(f,function(w){v[w]=t[w]}),cl(f,function(w){s(e,w)&&(h[w]=v[w]=e[w]),l(h,w)&&d++,l(v,w)&&p++}),n[c])return l(e,f[1])?v[f[2]]=null:l(e,f[2])&&(v[f[1]]=null),v;if(p===g||!d)return v;if(d>=g)return h;for(var y=0;y=0;l--)s=ut(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return tu(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(Rt);Fm(ft,Rt);ru(ft);cA(ft);fA(ft,IA);function IA(t){var e=[];return G(ft.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=xe(e,function(r){return sn(r).main}),t!=="dataset"&>(e,"dataset")<=0&&e.unshift("dataset"),e}var D0="";typeof navigator<"u"&&(D0=navigator.platform||"");var na="rgba(0, 0, 0, 0.2)";const AA={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:na,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:na,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:na,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:na,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:na,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:na,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:D0.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var B0=qe(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Dr="original",sr="arrayRows",qr="objectRows",dn="keyedColumns",Yn="typedArray",O0="unknown",In="column",La="row",Dt={Must:1,Might:2,Not:3},N0=Pt();function kA(t){N0(t).datasetMap=qe()}function MA(t,e,r){var n={},i=ed(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=N0(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,f,c;t=t.slice(),G(t,function(p,g){var y=De(p)?p:t[g]={name:p};y.type==="ordinal"&&f==null&&(f=g,c=v(y)),n[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});G(t,function(p,g){var y=p.name,m=v(p);if(f==null){var w=h.valueWayDim;d(n[y],w,m),d(o,w,m),h.valueWayDim+=m}else if(f===g)d(n[y],0,m),d(a,0,m);else{var w=h.categoryWayDim;d(n[y],w,m),d(o,w,m),h.categoryWayDim+=m}});function d(p,g,y){for(var m=0;me)return t[n];return t[r-1]}function BA(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var f=o==null||!n?r:DA(n,o);if(f=f||r,!(!f||!f.length)){var c=f[l];return i&&(u[i]=c),s.paletteIdx=(l+1)%f.length,c}}function OA(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Es,Wa,Ip,Ap="\0_ec_inner",NA=1,rd=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Rt(a),this._locale=new Rt(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=Rp(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,Rp(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?Ip(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&G(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=qe(),u=n&&n.replaceMergeMainTypeMap;kA(this),G(r,function(c,h){c!=null&&(ft.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?Je(c):ut(i[h],c,!0))}),u&&u.each(function(c,h){ft.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),ft.topologicalTravel(s,ft.getAllClassMainTypes(),f,this);function f(c){var h=EA(this,c,Xt(r[c])),d=a.get(c),v=d?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",p=MT(d,h,v);OT(p,c,ft),i[c]=null,a.set(c,null),o.set(c,0);var g=[],y=[],m=0,w;G(p,function(k,R){var C=k.existing,x=k.newOption;if(!x)C&&(C.mergeOption({},this),C.optionUpdated({},!1));else{var M=c==="series",b=ft.getClass(c,k.keyInfo.subType,!M);if(!b)return;if(c==="tooltip"){if(w)return;w=!0}if(C&&C.constructor===b)C.name=k.keyInfo.name,C.mergeOption(x,this),C.optionUpdated(x,!1);else{var T=me({componentIndex:R},k.keyInfo);C=new b(x,this,this,T),me(C,T),k.brandNew&&(C.__requireNewView=!0),C.init(x,this,this),C.optionUpdated(null,!0)}}C?(g.push(C.option),y.push(C),m++):(g.push(void 0),y.push(void 0))},this),i[c]=g,a.set(c,y),o.set(c,m),c==="series"&&Es(this)}this._seriesIndices||Es(this)},e.prototype.getOption=function(){var r=Je(this.option);return G(r,function(n,i){if(ft.hasClass(i)){for(var a=Xt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Lo(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[Ap],r},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function jA(t,e){return t.join(",")===e.join(",")}var Nr=G,zo=De,Pp=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Mc(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=Pp.length;r=0;g--){var y=t[g];if(s||(v=y.data.rawIndexOf(y.stackedByDimension,d)),v>=0){var m=y.data.getByRawIndex(y.stackResultDimension,v);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&h>=0&&m>0||l==="samesign"&&h<=0&&m<0){h=bT(h,m),p=m;break}}}return n[0]=h,n[1]=p,n})})}var _u=function(){function t(e){this.data=e.data||(e.sourceFormat===dn?{}:[]),this.sourceFormat=e.sourceFormat||O0,this.seriesLayoutBy=e.seriesLayoutBy||In,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;np&&(p=w)}d[0]=v,d[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};Fp=(e={},e[sr+"_"+In]={pure:!0,appendData:a},e[sr+"_"+La]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[qr]={pure:!0,appendData:a},e[dn]={pure:!0,appendData:function(o){var s=this._data;G(o,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},e[Dr]={appendData:a},e[Yn]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},t.prototype.getRawValue=function(e,r){return Ia(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function To(t){return new c2(t)}var c2=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(m){return!(m>=1)&&(m=1),m}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,v=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(c||d1&&n>0?s:o}};return a;function o(){return e=t?null:l65535?S2:b2}function ia(){return[1/0,-1/0]}function w2(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Gp(t,e,r,n,i){var a=Q0[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=xe(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&ne)a=o-1;else return o}return-1},t.prototype.indicesOfNearest=function(e,r,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,f=0,c=this.count();f=0&&l<0)&&(s=v,l=d,u=0),d===l&&(o[u++]=f))}return o.length=u,o},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=c&&m<=h||isNaN(m))&&(l[u++]=p),p++}v=!0}else if(a===2){for(var g=d[i[0]],w=d[i[1]],k=e[i[1]][0],R=e[i[1]][1],y=0;y=c&&m<=h||isNaN(m))&&(C>=k&&C<=R||isNaN(C))&&(l[u++]=p),p++}v=!0}}if(!v)if(a===1)for(var y=0;y=c&&m<=h||isNaN(m))&&(l[u++]=x)}else for(var y=0;ye[T][1])&&(M=!1)}M&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),f,c,h,d=new(qa(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var v=1;vf&&(f=c,h=k)}_>0&&_f-v&&(l=f-v,s.length=l);for(var p=0;pc[1]&&(c[1]=y),h[d++]=m}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=c)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return fl(r[a],this._dimensions[a])}Lc={arrayRows:e,objectRows:function(r,n,i,a){return fl(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return fl(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),C2=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Ds(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var f=r[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=or(s)?Yn:Dr,a=[];var c=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=Oe(c.seriesLayoutBy,h.seriesLayoutBy)||null,v=Oe(c.sourceHeader,h.sourceHeader),p=Oe(c.dimensions,h.dimensions),g=d!==h.seriesLayoutBy||!!v!=!!h.sourceHeader||p;i=g?[Xf(s,{seriesLayoutBy:d,sourceHeader:v,dimensions:p},l)]:[]}else{var y=e;if(n){var m=this._applyTransform(r);i=m.sourceList,a=m.upstreamSignList}else{var w=y.get("source",!0);i=[Xf(w,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&Wp(a)}var o,s=[],l=[];return G(e,function(u){u.prepareSource();var f=u.getSource(i||0),c="";i!=null&&!f&&Wp(c),s.push(f),l.push(u._getVersionSign())}),n?o=m2(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[r2(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r1||l&&!o){var v=x2(s,e,r,a,u);f=v.inlineValues,c=v.inlineValueTypes,h=v.blocks,d=v.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);d=f=Ia(i,r,a[0]),c=p.type}else d=f=l?s[0]:s;var g=Oh(e),y=g&&e.name||"",m=i.getName(r),w=n?y:m;return Uo("section",{header:y,noHeader:n||!g,sortParam:d,blocks:[Uo("nameValue",{markerType:"item",markerColor:u,name:w,noName:!Vn(w),value:f,valueType:c,dataIndex:r})].concat(h||[])})}function x2(t,e,r,n,i){var a=e.getData(),o=Jn(t,function(c,h,d){var v=a.getDimensionInfo(d);return c=c||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?G(n,function(c){f(Ia(a,r,c),c)}):G(t,f);function f(c,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(Uo("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:c,valueType:d.type})):(s.push(c),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Dn=Pt();function Bs(t,e){return t.getName(e)||t.getId(e)}var I2="__universalTransitionEnabled",_r=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=To({count:k2,reset:M2}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Dn(this).sourceManager=new C2(this);a.prepareSource();var o=this.getInitialData(r,i);qp(o,this),this.dataTask.context.data=o,Dn(this).dataBeforeProcessed=o,jp(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=$o(this),a=i?mu(r):{},o=this.subType;ft.hasClass(o)&&(o+="Series"),ut(r,n.getTheme().get(this.subType)),ut(r,this.getDefaultOption()),Bf(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&xa(r,a,i)},e.prototype.mergeOption=function(r,n){r=ut(this.option,r,!0),this.fillDataTextStyle(r.data);var i=$o(this);i&&xa(this.option,r,i);var a=Dn(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);qp(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Dn(this).dataBeforeProcessed=o,jp(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!or(r))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=td.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Bs(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[I2])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){De(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(r,n)}},e.registerClass=function(r){return ft.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(ft);Gr(_r,u2);Gr(_r,td);Fm(_r,ft);function jp(t){var e=t.name;Oh(t)||(t.name=A2(t)||e)}function A2(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return G(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function k2(t){return t.model.getRawData().count()}function M2(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),R2}function R2(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function qp(t,e){G(Xw(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,vr(P2,e))})}function P2(t,e){var r=Yf(t);return r&&r.setOutputEnd((e||this).count()),e}function Yf(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var An=function(){function t(){this.group=new At,this.uid=du("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();Nh(An);ru(An);function sd(){var t=Pt();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var e1=Pt(),L2=sd(),nr=function(){function t(){this.group=new At,this.uid=du("viewChart"),this.renderTask=To({plan:E2,reset:D2}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&Kp(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&Kp(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){cu(this.group,e)},t.markUpdateMethod=function(e,r){e1(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function Xp(t,e,r){t&&Vf(t)&&(e==="emphasis"?Al:kl)(t,r)}function Kp(t,e,r){var n=wa(t,e),i=e&&e.highlightKey!=null?nI(e.highlightKey):null;n!=null?G(Xt(n),function(a){Xp(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){Xp(a,r,i)})}Nh(nr);ru(nr);function E2(t){return L2(t.model)}function D2(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&e1(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),B2[l]}var B2={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};function t1(t,e,r){var n,i=0,a=0,o=null,s,l,u,f;e=e||0;function c(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var h=function(){for(var d=[],v=0;v=0?c():o=setTimeout(c,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){f=d},h}var Yp=Pt(),Zp={itemStyle:Eo(S0,!0),lineStyle:Eo(_0,!0)},O2={lineStyle:"stroke",itemStyle:"fill"};function r1(t,e){var r=t.visualStyleMapper||Zp[e];return r||(console.warn("Unknown style type '"+e+"'."),Zp.itemStyle)}function n1(t,e){var r=t.visualDrawType||O2[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var N2={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=r1(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=n1(t,n),u=o[l],f=je(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||je(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||je(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,v){var p=t.getDataParams(v),g=me({},o);g[l]=f(p),d.setItemVisual(v,"style",g)}}}},Xa=new Rt,F2={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=r1(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Xa.option=l[n];var u=i(Xa),f=o.ensureUniqueItemVisual(s,"style");me(f,u),Xa.option.decal&&(o.setItemVisual(s,"decal",Xa.option.decal),Xa.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},$2={performRawSeries:!0,overallReset:function(t){var e=qe();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),Yp(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=Yp(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=n1(r,s);a.each(function(u){var f=a.getRawIndex(u);i[f]=u}),n.each(function(u){var f=i[u],c=a.getItemVisual(f,"colorFromPalette");if(c){var h=a.ensureUniqueItemVisual(f,"style"),d=n.getName(u)||u+"",v=n.count();h[l]=r.getColorFromPalette(d,o,v)}})}})}},Os=Math.PI;function z2(t,e){e=e||{},Ye(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new At,n=new Mt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new mr({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Mt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new uu({shape:{startAngle:-Os/2,endAngle:-Os/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Os*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Os*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var i1=function(){function t(e,r,n,i){this._stageTaskMap=qe(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=qe();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;G(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";fn(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;G(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var d,v=h.agentStubMap;v.each(function(g){s(i,g)&&(g.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,i.block);v.each(function(g){g.perform(p)}),h.perform(p)&&(a=!0)}else c&&c.each(function(g,y){s(i,g)&&g.dirty();var m=o.getPerformArgs(g,i.block);m.skip=!l.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=qe(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,i).each(f);function f(c){var h=c.uid,d=s.set(h,o&&o.get(h)||To({plan:W2,reset:j2,count:X2}));d.context={model:c,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(c,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||To({reset:U2});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=qe(),u=e.seriesType,f=e.getTargetSeries,c=!0,h=!1,d="";fn(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,v):f?f(n,i).each(v):(c=!1,G(n.getSeries(),v));function v(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(h=!0,To({reset:V2,onDirty:G2})));y.context={model:p,overallProgress:c},y.agent=o,y.__block=c,a._pipe(p,y)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return je(e)&&(e={overallReset:e,seriesType:K2(e)}),e.uid=du("stageHandler"),r&&(e.visualType=r),e},t}();function U2(t){t.overallReset(t.ecModel,t.api,t.payload)}function V2(t){return t.overallProgress&&H2}function H2(){this.agent.dirty(),this.getDownstream().dirty()}function G2(){this.agent&&this.agent.dirty()}function W2(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function j2(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Xt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?xe(e,function(r,n){return a1(n)}):q2}var q2=a1(0);function a1(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a0&&d===u.length-h.length){var v=u.slice(0,d);v!=="data"&&(r.mainType=v,r[h.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function f(c,h,d,v){return c[d]==null||h[v||d]===c[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Zf=["symbol","symbolSize","symbolRotate","symbolOffset"],tg=Zf.concat(["symbolKeepAspect"]),Q2={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Ni(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function rg(t,e,r){for(var n=e.type==="radial"?gk(t,e,r):pk(t,e,r),i=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:vt(t)?[t]:Re(t)?t:null}function ld(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&mk(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=xe(r,function(a){return a/i}),n/=i)}return[r,n]}var _k=new ri(!0);function Nl(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function ig(t){return typeof t=="string"&&t!=="none"}function Fl(t){var e=t.fill;return e!=null&&e!=="none"}function ag(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function og(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function sg(t,e,r){var n=Fh(e.image,e.__image,r);if(nu(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*el),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function Sk(t,e,r,n){var i,a=Nl(r),o=Fl(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||_k,c=e.__dirty;if(!n){var h=r.fill,d=r.stroke,v=o&&!!h.colorStops,p=a&&!!d.colorStops,g=o&&!!h.image,y=a&&!!d.image,m=void 0,w=void 0,k=void 0,R=void 0,C=void 0;(v||p)&&(C=e.getBoundingRect()),v&&(m=c?rg(t,h,C):e.__canvasFillGradient,e.__canvasFillGradient=m),p&&(w=c?rg(t,d,C):e.__canvasStrokeGradient,e.__canvasStrokeGradient=w),g&&(k=c||!e.__canvasFillPattern?sg(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=k),y&&(R=c||!e.__canvasStrokePattern?sg(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=k),v?t.fillStyle=m:g&&(k?t.fillStyle=k:o=!1),p?t.strokeStyle=w:y&&(R?t.strokeStyle=R:a=!1)}var x=e.getGlobalScale();f.setScale(x[0],x[1],e.segmentIgnoreThreshold);var M,b;t.setLineDash&&r.lineDash&&(i=ld(e),M=i[0],b=i[1]);var T=!0;(u||c&ua)&&(f.setDPR(t.dpr),l?f.setContext(null):(f.setContext(t),T=!1),f.reset(),e.buildPath(f,e.shape,n),f.toStatic(),e.pathUpdated()),T&&f.rebuildPath(t,l?s:1),M&&(t.setLineDash(M),t.lineDashOffset=b),n||(r.strokeFirst?(a&&og(t,r),o&&ag(t,r)):(o&&ag(t,r),a&&og(t,r))),M&&t.setLineDash([])}function bk(t,e,r){var n=e.__image=Fh(r.image,e.__image,e,e.onload);if(!(!n||!nu(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,f=r.sy||0;t.drawImage(n,u,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,f=r.sy,c=o-u,h=s-f;t.drawImage(n,u,f,c,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function wk(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||Qn,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=ld(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(Nl(r)&&t.strokeText(i,r.x,r.y),Fl(r)&&t.fillText(i,r.x,r.y)):(Fl(r)&&t.fillText(i,r.x,r.y),Nl(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var lg=["shadowBlur","shadowOffsetX","shadowOffsetY"],ug=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function f1(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){Jt(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?$i.opacity:o}(n||e.blend!==r.blend)&&(a||(Jt(t,i),a=!0),t.globalCompositeOperation=e.blend||$i.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[zt]){if(this._disposed){this.id;return}var a,o,s;if(De(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[zt]=!0,!this._model||n){var l=new VA(this._api),u=this._theme,f=this._model=new rd;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},rh);var c={seriesTransition:s,optionChanged:!0};if(i)this[Zt]={silent:a,updateParams:c},this[zt]=!1,this.getZr().wakeUp();else{try{oa(this),Bn.update.call(this,null,c)}catch(h){throw this[Zt]=null,this[zt]=!1,h}this._ssr||this._zr.flush(),this[Zt]=null,this[zt]=!1,Ka.call(this,a),Ya.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||lt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(lt.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return G(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;G(n,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return G(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Tg[i]){var l=s,u=s,f=-s,c=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();G(Io,function(w,k){if(w.group===i){var R=n?w.getZr().painter.getSvgDom().innerHTML:w.renderToCanvas(Je(r)),C=w.getDom().getBoundingClientRect();l=a(C.left,l),u=a(C.top,u),f=o(C.right,f),c=o(C.bottom,c),h.push({dom:R,left:C.left,top:C.top})}}),l*=d,u*=d,f*=d,c*=d;var v=f-l,p=c-u,g=Zo.createCanvas(),y=Rv(g,{renderer:n?"svg":"canvas"});if(y.resize({width:v,height:p}),n){var m="";return G(h,function(w){var k=w.left-l,R=w.top-u;m+=''+w.dom+""}),y.painter.getSvgRoot().innerHTML=m,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new Mt({shape:{x:0,y:0,width:v,height:p},style:{fill:r.connectedBackgroundColor}})),G(h,function(w){var k=new Wr({style:{x:w.left*d-l,y:w.top*d-u,image:w.dom}});y.add(k)}),y.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n){return Nc(this,"convertToPixel",r,n)},e.prototype.convertFromPixel=function(r,n){return Nc(this,"convertFromPixel",r,n)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=sc(i,r);return G(o,function(s,l){l.indexOf("Models")>=0&&G(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(a=a||c.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=sc(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?ek(s,l,n):tk(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;G(Xk,function(n){var i=function(a){var o=r.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Fs(s,function(v){var p=yt(v);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=me({},p.eventData),!0},!0),l){var f=l.componentType,c=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=l.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),d=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=a,l.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:d},r.trigger(n,l)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),G(xo,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),G(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),nk(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&Om(this.getDom(),fd,"");var n=this,i=n._api,a=n._model;G(n._componentsViews,function(o){o.dispose(a,i)}),G(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Io[n.id]},e.prototype.resize=function(r){if(!this[zt]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Zt]&&(a==null&&(a=this[Zt].silent),i=!0,this[Zt]=null),this[zt]=!0;try{i&&oa(this),Bn.update.call(this,{type:"resize",animation:me({duration:0},r&&r.animation)})}catch(o){throw this[zt]=!1,o}this[zt]=!1,Ka.call(this,a),Ya.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(De(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!nh[r]){var i=nh[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=me({},r);return n.type=xo[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(De(n)||(n={silent:!!n}),!!$l[r.type]&&this._model){if(this[zt]){this._pendingActions.push(r);return}var i=n.silent;$c.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&<.browser.weChat&&this._throttledZrFlush(),Ka.call(this,i),Ya.call(this,i)}},e.prototype.updateLabelLayout=function(){Vr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){oa=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),Oc(c,!0),Oc(c,!1),h.plan()},Oc=function(c,h){for(var d=c._model,v=c._scheduler,p=h?c._componentsViews:c._chartsViews,g=h?c._componentsMap:c._chartsMap,y=c._zr,m=c._api,w=0;wh.get("hoverLayerThreshold")&&!lt.node&&!lt.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=c._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(c,h){var d=c.get("blendMode")||null;h.eachRendered(function(v){v.isGroup||(v.style.blend=d)})}function s(c,h){if(!c.preventAutoZ){var d=c.get("z")||0,v=c.get("zlevel")||0;h.eachRendered(function(p){return l(p,d,v,-1/0),!0})}}function l(c,h,d,v){var p=c.getTextContent(),g=c.getTextGuideLine(),y=c.isGroup;if(y)for(var m=c.childrenRef(),w=0;w0?{duration:p,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(bo(y))return;if(y instanceof it&&iI(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(v){y.stateTransition=g;var w=y.getTextContent(),k=y.getTextGuideLine();w&&(w.stateTransition=g),k&&(k.stateTransition=g)}y.__dirty&&i(y)}})}wg=function(c){return new(function(h){be(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(v){for(;v;){var p=v.__ecComponentInfo;if(p!=null)return c._model.getComponent(p.mainType,p.index);v=v.parent}},d.prototype.enterEmphasis=function(v,p){Al(v,p),wr(c)},d.prototype.leaveEmphasis=function(v,p){kl(v,p),wr(c)},d.prototype.enterBlur=function(v){Xx(v),wr(c)},d.prototype.leaveBlur=function(v){Qm(v),wr(c)},d.prototype.enterSelect=function(v){Jm(v),wr(c)},d.prototype.leaveSelect=function(v){e0(v),wr(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(v){return c.getViewOfComponentModel(v)},d.prototype.getViewOfSeriesModel=function(v){return c.getViewOfSeriesModel(v)},d}(z0))(c)},x1=function(c){function h(d,v){for(var p=0;p=0)){xg.push(r);var a=i1.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function P1(t,e){nh[t]=e}function rM(t,e,r){var n=Ek("registerMap");n&&n(t,e,r)}var nM=y2;ji(ud,N2);ji(bu,F2);ji(bu,$2);ji(ud,Q2);ji(bu,J2);ji(_1,Pk);M1(V0);R1(Ok,e2);P1("default",z2);Ea({type:zi,event:zi,update:zi},pr);Ea({type:sl,event:sl,update:sl},pr);Ea({type:mo,event:mo,update:mo},pr);Ea({type:ll,event:ll,update:ll},pr);Ea({type:_o,event:_o,update:_o},pr);k1("light",Y2);k1("dark",l1);function Za(t){return t==null?0:t.length||1}function Ig(t){return t}var iM=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||Ig,this._newKeyGetter=i||Ig,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(c===1&&h===1)this._update&&this._update(f,u),i[l]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(c>1)for(var d=0;d1)for(var s=0;s30}var Qa=De,On=xe,fM=typeof Int32Array>"u"?Array:Int32Array,hM="e\0\0",Ag=-1,dM=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],vM=["_approximateExtent"],kg,Vs,Ja,eo,Vc,Hs,Hc,N1=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;E1(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Dr;if(l&&!i.pure)for(var u=[],f=e;f0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),Re(a)?a=a.slice():Qa(a)&&(a=me({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,Qa(r)?me(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){Qa(e)?me(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?me(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;Fx(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){G(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:On(this.dimensions,this._getDimInfo,this),this.hostModel)),Vc(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];je(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(Ah(arguments)))})},t.internalField=function(){kg=function(e){var r=e._invertedIndicesMap;G(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new fM(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),i[r]=l}}}(),t}();function F1(t,e){id(t)||(t=H0(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=qe(),a=[],o=gM(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&O1(o),l=n===t.dimensionsDefine,u=l?B1(t):D1(n),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(t,o));for(var c=qe(f),h=new Z0(o),d=0;d0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function gM(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return G(e,function(a){var o;De(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function yM(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var mM=function(){function t(e){this.coordSysDims=[],this.axisMap=qe(),this.categoryAxisMap=qe(),this.coordSysName=e}return t}();function _M(t){var e=t.get("coordinateSystem"),r=new mM(e),n=SM[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var SM={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",Hr).models[0],a=t.getReferringComponents("yAxis",Hr).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),sa(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),sa(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",Hr).models[0];e.coordSysDims=["single"],r.set("single",i),sa(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",Hr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),sa(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),sa(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();G(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];r.set(f,u),sa(u)&&(n.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function sa(t){return t.get("type")==="category"}function bM(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;wM(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,f,c,h;if(G(a,function(m,w){Le(m)&&(a[w]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!i||i===m.coordDim)&&(f=m))}),f&&!n&&!u&&(n=!0),f){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var d=f.coordDim,v=f.type,p=0;G(a,function(m){m.coordDim===d&&p++});var g={name:c,coordDim:d,coordDimIndex:p,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:h,coordDim:h,coordDimIndex:p+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,v),y.storeDimIndex=s.ensureCalculationDimension(c,v)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(a.push(g),a.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function wM(t){return!E1(t.schema)}function Aa(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function CM(t,e){return Aa(t,e)?t.getCalculationInfo("stackResultDimension"):e}function TM(t,e){var r=t.get("coordinateSystem"),n=nd.get(r),i;return e&&e.coordSysDims&&(i=xe(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=sM(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function xM(t,e,r){var n,i;return r&&G(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function wu(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===Dr;var o=_M(e),s=TM(e,o),l=r.useEncodeDefaulter,u=je(l)?l:l?vr(MA,s,e):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},c=F1(i,f),h=xM(c.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(c),v=bM(e,{schema:c,store:d}),p=new N1(c,e);p.setCalculationInfo(v);var g=h!=null&&IM(i)?function(y,m,w,k){return k===h?w:this.defaultDimValueGetter(y,m,w,k)}:null;return p.hasItemOption=!1,p.initData(a?i:d,null,g),p}function IM(t){if(t.sourceFormat===Dr){var e=AM(t.data||[]);return!Re(es(e))}}function AM(t){for(var e=0;er[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();ru(vn);var kM=0,ih=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++kM}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&xe(n,MM);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!Le(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=qe(this.categories))},t}();function MM(t){return De(t)&&t.value!=null?t.value:t+""}function ah(t){return t.type==="interval"||t.type==="log"}function RM(t,e,r,n){var i={},a=t[1]-t[0],o=i.interval=Pm(a/e);r!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=$1(o),l=i.niceTickExtent=[wt(Math.ceil(t[0]/o)*o,s),wt(Math.floor(t[1]/o)*o,s)];return PM(l,t),i}function Gc(t){var e=Math.pow(10,Bh(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,wt(r*e)}function $1(t){return Cn(t)+2}function Mg(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function PM(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Mg(t,0,e),Mg(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Cu(t,e){return t>=e[0]&&t<=e[1]}function Tu(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function xu(t,e){return t*(e[1]-e[0])+e[0]}var vd=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new ih({})),Re(i)&&(i=new ih({categories:xe(i,function(a){return De(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:Le(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),Cu(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),Tu(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(xu(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(vn);vn.registerClass(vd);var Pi=wt,ai=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return Cu(r,this._extent)},e.prototype.normalize=function(r){return Tu(r,this._extent)},e.prototype.scale=function(r){return xu(r,this._extent)},e.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(r){var n=this._extent;r[0]n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=$1(r)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(r?s.push({value:Pi(f+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&d0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function V1(t){var e=DM(t),r=[];return G(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],f=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=u?f/h*u:f}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var v=dt(n.get("barWidth"),s),p=dt(n.get("barMaxWidth"),s),g=dt(n.get("barMinWidth")||(G1(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:gd(a),stackId:pd(n)})}),BM(r)}function BM(t){var e={};G(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var h=n.barMinWidth;h&&(l[u].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var r={};return G(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=et(a).length;s=Math.max(35-l*4,15)+"%"}var u=dt(s,o),f=dt(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,d=(c-u)/(h+(h-1)*f);d=Math.max(d,0),G(a,function(y){var m=y.maxWidth,w=y.minWidth;if(y.width){var k=y.width;m&&(k=Math.min(k,m)),w&&(k=Math.max(k,w)),y.width=k,c-=k+f*k,h--}else{var k=d;m&&mk&&(k=w),k!==d&&(y.width=k,c-=k+f*k,h--)}}),d=(c-u)/(h+(h-1)*f),d=Math.max(d,0);var v=0,p;G(a,function(y,m){y.width||(y.width=d),p=y,v+=y.width*(1+f)}),p&&(v-=p.width*f);var g=-v/2;G(a,function(y,m){r[i][m]=r[i][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),r}function OM(t,e,r){if(t&&e){var n=t[gd(e)];return n!=null&&r!=null?n[pd(r)]:n}}function NM(t,e){var r=U1(t,e),n=V1(r);G(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=pd(i),u=n[gd(s)][l],f=u.offset,c=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function FM(t){return{seriesType:t,plan:sd(),reset:function(e){if(H1(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),c=Aa(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=$M(i,a),v=G1(e),p=e.get("barMinHeight")||0,g=f&&r.getDimensionIndex(f),y=r.getLayout("size"),m=r.getLayout("offset");return{progress:function(w,k){for(var R=w.count,C=v&&Tn(R*3),x=v&&l&&Tn(R*3),M=v&&Tn(R),b=n.master.getRect(),T=h?b.width:b.height,_,I=k.getStore(),A=0;(_=w.next())!=null;){var P=I.get(c?g:o,_),O=I.get(s,_),E=d,N=void 0;c&&(N=+P-I.get(o,_));var z=void 0,U=void 0,q=void 0,Y=void 0;if(h){var Z=n.dataToPoint([P,O]);if(c){var se=n.dataToPoint([N,O]);E=se[0]}z=E,U=Z[1]+m,q=Z[0]-E,Y=y,Math.abs(q)0?r:1:r))}var zM=function(t,e,r,n){for(;r>>1;t[i][1]i&&(this._approxInterval=i);var s=Gs.length,l=Math.min(zM(Gs,this._approxInterval,0,s),s-1);this._interval=Gs[l][1],this._minLevelUnit=Gs[Math.max(l-1,0)][0]},e.prototype.parse=function(r){return vt(r)?r:+ti(r)},e.prototype.contain=function(r){return Cu(this.parse(r),this._extent)},e.prototype.normalize=function(r){return Tu(this.parse(r),this._extent)},e.prototype.scale=function(r){return xu(r,this._extent)},e.type="time",e}(ai),Gs=[["second",Yh],["minute",Zh],["hour",wo],["quarter-day",wo*6],["half-day",wo*12],["day",Rr*1.2],["half-week",Rr*3.5],["week",Rr*7],["month",Rr*31],["quarter",Rr*95],["half-year",bp/2],["year",bp]];function UM(t,e,r,n){var i=ti(e),a=ti(r),o=function(v){return Cp(i,v,n)===Cp(a,v,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},d=function(){return h()&&o("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return d()}}function VM(t,e){return t/=Rr,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function HM(t){var e=30*Rr;return t/=e,t>6?6:t>3?3:t>2?2:1}function GM(t){return t/=wo,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function Rg(t,e){return t/=e?Zh:Yh,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function WM(t){return Pm(t)}function jM(t,e,r){var n=new Date(t);switch(Sa(e)){case"year":case"month":n[A0(r)](0);case"day":n[k0(r)](1);case"hour":n[M0(r)](0);case"minute":n[R0(r)](0);case"second":n[P0(r)](0),n[L0(r)](0)}return n.getTime()}function qM(t,e,r,n){var i=1e4,a=T0,o=0;function s(T,_,I,A,P,O,E){for(var N=new Date(_),z=_,U=N[A]();z1&&O===0&&I.unshift({value:I[0].value-z})}}for(var O=0;O=n[0]&&m<=n[1]&&c++)}var w=(n[1]-n[0])/e;if(c>w*1.5&&h>w/1.5||(u.push(g),c>w||t===a[d]))break}f=[]}}}for(var k=Vt(xe(u,function(T){return Vt(T,function(_){return _.value>=n[0]&&_.value<=n[1]&&!_.notAdd})}),function(T){return T.length>0}),R=[],C=k.length-1,d=0;d0;)a*=10;var s=[wt(YM(n[0]/a)*a),wt(KM(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){Ao.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=Fr(r)/Fr(this.base),Cu(r,this._extent)},e.prototype.normalize=function(r){return r=Fr(r)/Fr(this.base),Tu(r,this._extent)},e.prototype.scale=function(r){return r=xu(r,this._extent),Ws(this.base,r)},e.type="log",e}(vn),j1=yd.prototype;j1.getMinorTicks=Ao.getMinorTicks;j1.getLabel=Ao.getLabel;function js(t,e){return XM(t,Cn(e))}vn.registerClass(yd);var ZM=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},t.prototype.modifyDataMinMax=function(e,r){this[JM[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=QM[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),QM={min:"_determinedMin",max:"_determinedMax"},JM={min:"_dataMin",max:"_dataMax"};function eR(t,e,r){var n=t.rawExtentInfo;return n||(n=new ZM(t,e,r),t.rawExtentInfo=n,n)}function qs(t,e){return e==null?null:gl(e)?NaN:t.parse(e)}function q1(t,e){var r=t.type,n=eR(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=U1("bar",o),l=!1;if(G(s,function(c){l=l||c.getBaseAxis()===e.axis}),l){var u=V1(s),f=tR(i,a,e,u);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function tR(t,e,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=OM(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;G(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;G(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-t,c=1-(s+l)/a,h=f/c-f;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}function Lg(t,e){var r=e,n=q1(t,r),i=n.extent,a=r.get("splitNumber");t instanceof yd&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function rR(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new vd({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new W1({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(vn.getClass(e)||ai)}}function nR(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Da(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(n){return function(i,a){return t.scale.getFormattedLabel(i,a,n)}}(e):Le(e)?function(n){return function(i){var a=t.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):je(e)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(iR(t,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return t.scale.getLabel(n)}}function iR(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function aR(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof vd?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Da(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;f=0||(Eg.push(t),je(t)&&(t={install:t}),t.install(lR))}var Go=Pt();function Y1(t,e){var r=xe(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function uR(t){var e=t.getLabelModel().get("customValues");if(e){var r=Da(t);return{labels:Y1(t,e).map(function(n){var i={value:n};return{formattedLabel:r(i),rawLabel:t.scale.getLabel(i),tickValue:n}})}}return t.type==="category"?fR(t):dR(t)}function cR(t,e){var r=t.getTickModel().get("customValues");return r?{ticks:Y1(t,r)}:t.type==="category"?hR(t,e):{ticks:xe(t.scale.getTicks(),function(n){return n.value})}}function fR(t){var e=t.getLabelModel(),r=Z1(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function Z1(t,e){var r=Q1(t,"labels"),n=md(e),i=J1(r,n);if(i)return i;var a,o;return je(n)?a=r_(t,n):(o=n==="auto"?vR(t):n,a=t_(t,o)),e_(r,n,{labels:a,labelCategoryInterval:o})}function hR(t,e){var r=Q1(t,"ticks"),n=md(e),i=J1(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),je(n))a=r_(t,n,!0);else if(n==="auto"){var s=Z1(t,t.getLabelModel());o=s.labelCategoryInterval,a=xe(s.labels,function(l){return l.tickValue})}else o=n,a=t_(t,o,!0);return e_(r,n,{ticks:a,tickCategoryInterval:o})}function dR(t){var e=t.scale.getTicks(),r=Da(t);return{labels:xe(e,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value}})}}function Q1(t,e){return Go(t)[e]||(Go(t)[e]=[])}function J1(t,e){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),f=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),h=0,d=0;l<=a[1];l+=s){var v=0,p=0,g=Im(r({value:l}),e.font,"center","top");v=g.width*1.3,p=g.height*1.3,h=Math.max(h,v,7),d=Math.max(d,p,7)}var y=h/f,m=d/c;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var w=Math.max(0,Math.floor(Math.min(y,m))),k=Go(t.model),R=t.getExtent(),C=k.lastAutoInterval,x=k.lastTickCount;return C!=null&&x!=null&&Math.abs(C-w)<=1&&Math.abs(x-o)<=1&&C>w&&k.axisExtent0===R[0]&&k.axisExtent1===R[1]?w=C:(k.lastTickCount=o,k.lastAutoInterval=w,k.axisExtent0=R[0],k.axisExtent1=R[1]),w}function gR(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function t_(t,e,r){var n=Da(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=X1(t),h=o.get("showMinLabel")||c,d=o.get("showMaxLabel")||c;h&&u!==a[0]&&p(a[0]);for(var v=u;v<=a[1];v+=l)p(v);d&&v-l!==a[1]&&p(a[1]);function p(g){var y={value:g};s.push(r?g:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:g})}return s}function r_(t,e,r){var n=t.scale,i=Da(t),a=[];return G(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var Dg=[0,1],n_=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return _T(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),Bg(n,i.count())),Df(e,Dg,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),Bg(n,i.count()));var a=Df(e,n,Dg,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=cR(this,r),i=n.ticks,a=xe(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return yR(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=xe(n,function(a){return xe(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(){return uR(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return pR(this)},t}();function Bg(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function yR(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;G(e,function(d){d.coord-=u/2});var f=t.scale.getExtent();s=1+f[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var c=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(d,v){return d=wt(d),v=wt(v),c?d>v:d0){e=e/180*Math.PI,Wn.fromArray(t[0]),_t.fromArray(t[1]),Bt.fromArray(t[2]),Ne.sub(jn,Wn,_t),Ne.sub(on,Bt,_t);var r=jn.len(),n=on.len();if(!(r<.001||n<.001)){jn.scale(1/r),on.scale(1/n);var i=jn.dot(on),a=Math.cos(e);if(a1&&Ne.copy(qt,Bt),qt.toArray(t[1])}}}}function _R(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Wn.fromArray(t[0]),_t.fromArray(t[1]),Bt.fromArray(t[2]),Ne.sub(jn,_t,Wn),Ne.sub(on,Bt,_t);var n=jn.len(),i=on.len();if(!(n<.001||i<.001)){jn.scale(1/n),on.scale(1/i);var a=jn.dot(e),o=Math.cos(r);if(a=l)Ne.copy(qt,Bt);else{qt.scaleAndAdd(on,s/Math.tan(Math.PI/2-f));var c=Bt.x!==_t.x?(qt.x-_t.x)/(Bt.x-_t.x):(qt.y-_t.y)/(Bt.y-_t.y);if(isNaN(c))return;c<0?Ne.copy(qt,_t):c>1&&Ne.copy(qt,Bt)}qt.toArray(t[1])}}}}function Wc(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function SR(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=yf(n[0],n[1]),a=yf(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Uu([],n[1],n[0],o/i),l=Uu([],n[1],n[2],o/a),u=Uu([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var f=1;f0&&a&&R(-f/o,0,o);var p=t[0],g=t[o-1],y,m;w(),y<0&&C(-y,.8),m<0&&C(m,.8),w(),k(y,m,1),k(m,y,-1),w(),y<0&&x(-y),m<0&&x(m);function w(){y=p.rect[e]-n,m=i-g.rect[e]-g.rect[r]}function k(M,b,T){if(M<0){var _=Math.min(b,-M);if(_>0){R(_*T,0,o);var I=_+M;I<0&&C(-I*T,1)}else C(-M*T,1)}}function R(M,b,T){M!==0&&(u=!0);for(var _=b;_0)for(var I=0;I0;I--){var E=T[I-1]*O;R(-E,I,o)}}}function x(M){var b=M<0?-1:1;M=Math.abs(M);for(var T=Math.ceil(M/(o-1)),_=0;_0?R(T,0,_+1):R(-T,o-_-1,o),M-=T,M<=0)return}return u}function xR(t,e,r,n){return TR(t,"y","height",e,r,n)}function IR(t){var e=[];t.sort(function(p,g){return g.priority-p.priority});var r=new ht(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(_r);function _d(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Ia(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var Sd=function(t){be(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=ii(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=kR,this._symbolType=r,this.add(s)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Al(this.childAt(0))},e.prototype.downplay=function(){kl(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,c)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(d):Gt(h,d,s,n),Bo(h)}if(this._updateCommon(r,n,l,i,a),u){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,rr(h,d,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,f,c,h,d,v,p,g,y;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,c=a.selectItemStyle,h=a.focus,d=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,y=a.cursorStyle,v=a.emphasisDisabled),!a||r.hasItemOption){var m=a&&a.itemModel?a.itemModel:r.getItemModel(n),w=m.getModel("emphasis");u=w.getModel("itemStyle").getItemStyle(),c=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),h=w.get("focus"),d=w.get("blurScope"),v=w.get("disabled"),p=Pa(m),g=w.getShallow("scale"),y=m.getShallow("cursor")}var k=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(k||0)*Math.PI/180||0);var R=c1(r.getItemVisual(n,"symbolOffset"),i);R&&(s.x=R[0],s.y=R[1]),y&&s.attr("cursor",y);var C=r.getItemVisual(n,"style"),x=C.fill;if(s instanceof Wr){var M=s.style;s.useStyle(me({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},C))}else s.__isEmptyBrush?s.useStyle(me({},C)):s.useStyle(C),s.style.decal=null,s.setColor(x,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var b=r.getItemVisual(n,"liftZ"),T=this._z2;b!=null?T==null&&(this._z2=s.z2,s.z2+=b):T!=null&&(s.z2=T,this._z2=null);var _=o&&o.useNameLabel;Ra(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:x,defaultOpacity:C.opacity});function I(O){return _?r.getName(O):_d(r,O)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var A=s.ensureState("emphasis");A.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;A.scaleX=this._sizeX*P,A.scaleY=this._sizeY*P,this.setSymbolScale(1),Ca(this,h,d,v)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=yt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Rl(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Rl(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return u1(r.getItemVisual(n,"symbolSize"))},e}(At);function kR(t,e){this.parent.drift(t,e)}function jc(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function Og(t){return t!=null&&!De(t)&&(t={isIgnore:t}),t||{}}function Ng(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Pa(e),cursorStyle:e.get("cursor")}}var o_=function(){function t(e){this.group=new At,this._SymbolCtor=e||Sd}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=Og(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=Ng(e),u={disableAnimation:s},f=r.getSymbolPoint||function(c){return e.getItemLayout(c)};a||n.removeAll(),e.diff(a).add(function(c){var h=f(c);if(jc(e,h,c,r)){var d=new o(e,c,l,u);d.setPosition(h),e.setItemGraphicEl(c,d),n.add(d)}}).update(function(c,h){var d=a.getItemGraphicEl(h),v=f(c);if(!jc(e,v,c,r)){n.remove(d);return}var p=e.getItemVisual(c,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==p)n.remove(d),d=new o(e,c,l,u),d.setPosition(v);else{d.updateData(e,c,l,u);var y={x:v[0],y:v[1]};s?d.attr(y):Gt(d,y,i)}n.add(d),e.setItemGraphicEl(c,d)}).remove(function(c){var h=a.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=f,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Ng(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=Og(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function l_(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function RR(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function PR(t,e,r,n,i,a,o,s){for(var l=RR(t,e),u=[],f=[],c=[],h=[],d=[],v=[],p=[],g=s_(i,e,o),y=t.getLayout("points")||[],m=e.getLayout("points")||[],w=0;w=i||p<0)break;if(Ui(y,m)){if(l){p+=a;continue}break}if(p===r)t[a>0?"moveTo":"lineTo"](y,m),c=y,h=m;else{var w=y-u,k=m-f;if(w*w+k*k<.5){p+=a;continue}if(o>0){for(var R=p+a,C=e[R*2],x=e[R*2+1];C===y&&x===m&&g=n||Ui(C,x))d=y,v=m;else{T=C-u,_=x-f;var P=y-u,O=C-y,E=m-f,N=x-m,z=void 0,U=void 0;if(s==="x"){z=Math.abs(P),U=Math.abs(O);var q=T>0?1:-1;d=y-q*z*o,v=m,I=y+q*U*o,A=m}else if(s==="y"){z=Math.abs(E),U=Math.abs(N);var Y=_>0?1:-1;d=y,v=m-Y*z*o,I=y,A=m+Y*U*o}else z=Math.sqrt(P*P+E*E),U=Math.sqrt(O*O+N*N),b=U/(U+z),d=y-T*o*(1-b),v=m-_*o*(1-b),I=y+T*o*b,A=m+_*o*b,I=Nn(I,Fn(C,y)),A=Nn(A,Fn(x,m)),I=Fn(I,Nn(C,y)),A=Fn(A,Nn(x,m)),T=I-y,_=A-m,d=y-T*z/U,v=m-_*z/U,d=Nn(d,Fn(u,y)),v=Nn(v,Fn(f,m)),d=Fn(d,Nn(u,y)),v=Fn(v,Nn(f,m)),T=y-d,_=m-v,I=y+T*U/z,A=m+_*U/z}t.bezierCurveTo(c,h,d,v,y,m),c=I,h=A}else t.lineTo(y,m)}u=y,f=m,p+=a}return g}var u_=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),LR=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new u_},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Ui(i[o*2-2],i[o*2-1]);o--);for(;a=0){var k=u?(v-l)*w+l:(d-s)*w+s;return u?[r,k]:[k,r]}s=d,l=v;break;case o.C:d=a[c++],v=a[c++],p=a[c++],g=a[c++],y=a[c++],m=a[c++];var R=u?ml(s,d,p,y,r,f):ml(l,v,g,m,r,f);if(R>0)for(var C=0;C=0){var k=u?Ft(l,v,g,m,x):Ft(s,d,p,y,x);return u?[r,k]:[k,r]}}s=y,l=m;break}}},e}(it),ER=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(u_),DR=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new ER},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Ui(i[s*2-2],i[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function FR(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=xe(a.stops,function(w){return{coord:l.toGlobalCoord(l.dataToCoord(w.value)),color:w.color}}),f=u.length,c=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var h=NR(u,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var v=10,p=h[0].coord-v,g=h[d-1].coord+v,y=g-p;if(y<.001)return"transparent";G(h,function(w){w.offset=(w.coord-p)/y}),h.push({offset:d?h[d-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:c[0]||"transparent"});var m=new f0(0,0,0,0,h,!0);return m[i]=p,m[i+"2"]=g,m}}}function $R(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&zR(a,e))){var o=e.mapDimension(a.dim),s={};return G(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function zR(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function UR(t,e){return isNaN(t)||isNaN(e)}function VR(t){for(var e=t.length/2;e>0&&UR(t[e*2-2],t[e*2-1]);e--);return e-1}function Vg(t,e){return[t[e*2],t[e*2+1]]}function HR(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function h_(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var q=p.getState("emphasis").style;q.lineWidth=+p.style.lineWidth+1}yt(p).seriesIndex=r.seriesIndex,Ca(p,N,z,U);var Y=Ug(r.get("smooth")),Z=r.get("smoothMonotone");if(p.setShape({smooth:Y,smoothMonotone:Z,connectNulls:M}),g){var se=l.getCalculationInfo("stackedOnSeries"),ce=0;g.useStyle(Ye(f.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),se&&(ce=Ug(se.get("smooth"))),g.setShape({smooth:Y,stackedOnSmooth:ce,smoothMonotone:Z,connectNulls:M}),Ta(g,r,"areaStyle"),yt(g).seriesIndex=r.seriesIndex,Ca(g,N,z,U)}var J=function(X){a._changePolyState(X)};l.eachItemGraphicEl(function(X){X&&(X.onHoverStateChange=J)}),this._polyline.onHoverStateChange=J,this._data=l,this._coordSys=o,this._stackedOnPoints=C,this._points=c,this._step=_,this._valueOrigin=k,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,n){yt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=wa(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=r.get("zlevel")||0,d=r.get("z")||0;u=new Sd(o,s),u.x=f,u.y=c,u.setZ(h,d);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=h,v.z=d,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else nr.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=wa(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else nr.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;ep(this._polyline,r),n&&ep(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new LR({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new DR({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,f=u.get("animationDuration");je(f)&&(f=f(null));var c=u.get("animationDelay")||0,h=je(c)?c(null):c;r.eachItemGraphicEl(function(d,v){var p=d;if(p){var g=[d.x,d.y],y=void 0,m=void 0,w=void 0;if(i)if(o){var k=i,R=n.pointToCoord(g);a?(y=k.startAngle,m=k.endAngle,w=-R[1]/180*Math.PI):(y=k.r0,m=k.r,w=R[0])}else{var C=i;a?(y=C.x,m=C.x+C.width,w=d.x):(y=C.y+C.height,m=C.y,w=d.y)}var x=m===y?0:(w-y)/(m-y);l&&(x=1-x);var M=je(c)?c(v):f*x+h,b=p.getSymbolPath(),T=b.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:M}),T&&T.animateFrom({style:{opacity:0}},{duration:300,delay:M}),b.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(h_(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new mr({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=VR(l);f>=0&&(Ra(s,Pa(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(c,h,d){return d!=null?a_(o,d):_d(o,c)},enableTextSetter:!0},GR(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var c=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),v=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,w=n.shape,k=m?y?w.x:w.y+w.height:y?w.x+w.width:w.y,R=(y?p:0)*(m?-1:1),C=(y?0:-p)*(m?-1:1),x=y?"x":"y",M=HR(c,k,x),b=M.range,T=b[1]-b[0],_=void 0;if(T>=1){if(T>1&&!d){var I=Vg(c,b[0]);u.attr({x:I[0]+R,y:I[1]+C}),o&&(_=h.getRawValue(b[0]))}else{var I=f.getPointOn(k,x);I&&u.attr({x:I[0]+R,y:I[1]+C});var A=h.getRawValue(b[0]),P=h.getRawValue(b[1]);o&&(_=zT(i,v,A,P,M.t))}a.lastFrameIndex=b[0]}else{var O=r===1||a.lastFrameIndex>0?b[0]:0,I=Vg(c,O);o&&(_=h.getRawValue(O)),u.attr({x:I[0]+R,y:I[1]+C})}if(o){var E=hu(u);typeof E.setLabelText=="function"&&E.setLabelText(_)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,f=this._polygon,c=r.hostModel,h=PR(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,v=h.stackedOnCurrent,p=h.next,g=h.stackedOnNext;if(o&&(d=$n(h.current,i,o,l),v=$n(h.stackedOnCurrent,i,o,l),p=$n(h.next,i,o,l),g=$n(h.stackedOnNext,i,o,l)),zg(d,p)>3e3||f&&zg(v,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=d;var y={shape:{points:p}};h.current!==d&&(y.shape.__points=h.next),u.stopAnimation(),Gt(u,y,c),f&&(f.setShape({points:d,stackedOnPoints:v}),f.stopAnimation(),Gt(f,{shape:{stackedOnPoints:g}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],w=h.status,k=0;ke&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;re&&(e=a,r=i)}return isFinite(r)?r:NaN},nearest:function(t){return t[0]}},qR=function(t){return Math.round(t.length/2)};function d_(t){return{seriesType:t,reset:function(e,r,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d));var v=void 0;Le(a)?v=jR[a]:je(a)&&(v=a),v&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,v,qR))}}}}}function XR(t){t.registerChartView(WR),t.registerSeriesModel(AR),t.registerLayout(wd("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,d_("line"))}var sh=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return wu(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)G(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var v=h.getTicksCoords(),p=h.getTickModel().get("alignWithLabel"),g=o[d],y=n[d]==="x1"||n[d]==="y1";if(y&&!p&&(g+=1),v.length<2)return;if(v.length===2){s[d]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var m=void 0,w=void 0,k=1,R=0;Rg){w=(C+m)/2;break}R===1&&(k=x-v[0].tickValue)}w==null&&(m?m&&(w=v[v.length-1].coord):w=v[0].coord),s[d]=h.toGlobalCoord(w)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(_r);_r.registerClass(sh);var KR=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return wu(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=b0(sh.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(sh),YR=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Hg=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new YR},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,c=n.endAngle,h=n.clockwise,d=Math.PI*2,v=h?c-fMath.PI/2&&fs)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Pl(a,r,yt(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(nr),Gg={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=Xc(e.x,t.x),s=Kc(e.x+e.width,i),l=Xc(e.y,t.y),u=Kc(e.y+e.height,a),f=si?s:o,e.y=c&&l>a?u:l,e.width=f?0:s-o,e.height=c?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),f||c},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=Kc(e.r,t.r),a=Xc(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},Wg={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new Mt({shape:me({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var f=u.shape,c=i?"height":"width";f[c]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?Hg:si,f=new u({shape:n,z2:1});f.name="item";var c=v_(i);if(f.calculateTextPosition=ZR(c,{isRoundCap:u===Hg}),a){var h=f.shape,d=i?"r":"endAngle",v={};h[d]=i?n.r0:n.startAngle,v[d]=n[d],(s?Gt:rr)(f,{shape:v},a)}return f}};function tP(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function jg(t,e,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Gt:rr)(r,{shape:l},e,i,null);var f=e?t.baseAxis.model:null;(o?Gt:rr)(r,{shape:u},f,i)}function qg(t,e){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function iP(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function v_(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function Kg(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=t.shape,c=uo(n.getModel("itemStyle"),f,!0);me(f,c),t.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",v=Pa(n);Ra(t,v,{labelFetcher:a,labelDataIndex:r,defaultText:_d(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var p=t.getTextContent();if(s&&p){var g=n.get(["label","position"]);t.textConfig.inside=g==="middle"?!0:null,QR(t,g==="outside"?d:g,v_(o),n.get(["label","rotate"]))}rA(p,v,a.getRawValue(r),function(m){return a_(e,m)});var y=n.getModel(["emphasis"]);Ca(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),Ta(t,n),iP(i)&&(t.style.fill="none",t.style.stroke="none",G(t.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function aP(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var oP=function(){function t(){}return t}(),Yg=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new oP},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?r:null},30,!1);function sP(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,f=0,c=a.length/3;f=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[f]}return-1}function p_(t,e,r){if(bd(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function lP(t,e,r){var n=t.type==="polar"?si:Mt;return new n({shape:p_(e,r,t),silent:!0,z2:0})}function uP(t){t.registerChartView(eP),t.registerSeriesModel(KR),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,vr(NM,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,FM("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,d_("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var Jg=Math.PI*2,Zs=Math.PI/180;function g_(t,e){return Bl(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function y_(t,e){var r=g_(t,e),n=t.get("center"),i=t.get("radius");Re(i)||(i=[0,i]);var a=dt(r.width,e.getWidth()),o=dt(r.height,e.getHeight()),s=Math.min(a,o),l=dt(i[0],s/2),u=dt(i[1],s/2),f,c,h=t.coordinateSystem;if(h){var d=h.dataToPoint(n);f=d[0]||0,c=d[1]||0}else Re(n)||(n=[n,n]),f=dt(n[0],a)+r.x,c=dt(n[1],o)+r.y;return{cx:f,cy:c,r0:l,r:u}}function cP(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=g_(n,r),s=y_(n,r),l=s.cx,u=s.cy,f=s.r,c=s.r0,h=-n.get("startAngle")*Zs,d=n.get("endAngle"),v=n.get("padAngle")*Zs;d=d==="auto"?h-Jg:-d*Zs;var p=n.get("minAngle")*Zs,g=p+v,y=0;i.each(a,function(N){!isNaN(N)&&y++});var m=i.getSum(a),w=Math.PI/(m||y)*2,k=n.get("clockwise"),R=n.get("roseType"),C=n.get("stillShowZeroSum"),x=i.getDataExtent(a);x[0]=0;var M=k?1:-1,b=[h,d],T=M*v/2;Vm(b,!k),h=b[0],d=b[1];var _=m_(n);_.startAngle=h,_.endAngle=d,_.clockwise=k;var I=Math.abs(d-h),A=I,P=0,O=h;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(N,z){var U;if(isNaN(N)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:k,cx:l,cy:u,r0:c,r:R?NaN:f});return}R!=="area"?U=m===0&&C?w:N*w:U=I/y,UU?(Y=O+M*U/2,Z=Y):(Y=O+T,Z=q-T),i.setItemLayout(z,{angle:U,startAngle:Y,endAngle:Z,clockwise:k,cx:l,cy:u,r0:c,r:R?Df(N,x,[c,f]):f}),O=q}),Ar?y:g,R=Math.abs(w.label.y-r);if(R>=k.maxY){var C=w.label.x-e-w.len2*i,x=n+w.len,M=Math.abs(C)t.unconstrainedWidth?null:d:null;n.setStyle("width",v)}var p=n.getBoundingRect();a.width=p.width;var g=(n.style.margin||0)+2.1;a.height=p.height+g,a.y-=(a.height-c)/2}}}function Yc(t){return t.position==="center"}function dP(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*fP,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,c=s.y,h=s.height;function d(C){C.ignore=!0}function v(C){if(!C.ignore)return!0;for(var x in C.states)if(C.states[x].ignore===!1)return!0;return!1}e.each(function(C){var x=e.getItemGraphicEl(C),M=x.shape,b=x.getTextContent(),T=x.getTextGuideLine(),_=e.getItemModel(C),I=_.getModel("label"),A=I.get("position")||_.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),O=I.get("alignTo"),E=dt(I.get("edgeDistance"),u),N=I.get("bleedMargin"),z=_.getModel("labelLine"),U=z.get("length");U=dt(U,u);var q=z.get("length2");if(q=dt(q,u),Math.abs(M.endAngle-M.startAngle)0?"right":"left":Z>0?"left":"right"}var le=Math.PI,we=0,Ie=I.get("rotate");if(vt(Ie))we=Ie*(le/180);else if(A==="center")we=0;else if(Ie==="radial"||Ie===!0){var tt=Z<0?-Y+le:-Y;we=tt}else if(Ie==="tangential"&&A!=="outside"&&A!=="outer"){var st=Math.atan2(Z,se);st<0&&(st=le*2+st);var bt=se>0;bt&&(st=le+st),we=st-le}if(a=!!we,b.x=ce,b.y=J,b.rotation=we,b.setStyle({verticalAlign:"middle"}),ue){b.setStyle({align:ee});var Lt=b.states.select;Lt&&(Lt.x+=b.x,Lt.y+=b.y)}else{var Ee=b.getBoundingRect().clone();Ee.applyTransform(b.getComputedTransform());var Br=(b.style.margin||0)+2.1;Ee.y-=Br/2,Ee.height+=Br,r.push({label:b,labelLine:T,position:A,len:U,len2:q,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new Ne(Z,se),linePoints:X,textAlign:ee,labelDistance:P,labelAlignTo:O,edgeDistance:E,bleedMargin:N,rect:Ee,unconstrainedWidth:Ee.width,labelStyleWidth:b.style.width})}x.setTextConfig({inside:ue})}}),!a&&t.get("avoidLabelOverlap")&&hP(r,n,i,l,u,h,f,c);for(var p=0;p0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c=a.r0}},e.type="pie",e}(nr);function b_(t,e,r){e=Re(e)&&{coordDimensions:e}||me({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=F1(n,e).dimensions,a=new N1(i,t);return a.initData(n,r),a}var w_=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),gP=Pt(),yP=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new w_(xt(this.getData,this),xt(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return b_(this,{coordDimensions:["value"],encodeDefaulter:vr(RA,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=gP(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=ST(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Bf(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(_r);function mP(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(vt(o)&&!isNaN(o)&&o<0)})}}}function _P(t){t.registerChartView(pP),t.registerSeriesModel(yP),rk("pie",t.registerAction),t.registerLayout(vr(cP,"pie")),t.registerProcessor(__("pie")),t.registerProcessor(mP("pie"))}var SP=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return wu(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(_r),C_=4,bP=function(){function t(){}return t}(),wP=function(t){be(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new bP},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var f=u*2,c=a[f]-s/2,h=a[f+1]-l/2;if(r>=c&&n>=h&&r<=c+s&&n<=h+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,f=-1/0,c=-1/0,h=0;h=0&&(u.dataIndex=c+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),TP=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=wd("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new CP:new o_,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(nr),xP=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(ft),lh=function(t){be(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Hr).models[0]},e.type="cartesian2dAxis",e}(ft);Gr(lh,K1);var T_={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},IP=ut({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},T_),Cd=ut({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},T_),AP=ut({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Cd),kP=Ye({logBase:10},Cd);const x_={category:IP,value:Cd,time:AP,log:kP};var MP={value:1,category:1,time:1,log:1};function ty(t,e,r,n){G(MP,function(i,a){var o=ut(ut({},x_[a],!0),n,!0),s=function(l){be(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var h=$o(this),d=h?mu(f):{},v=c.getTheme();ut(f,v.get(a+"Axis")),ut(f,this.getDefaultOption()),f.type=ry(f),h&&xa(f,d,h)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=ih.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",ry)}function ry(t){return t.type||(t.data?"category":"value")}var RP=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return xe(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Vt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),uh=["x","y"];function ny(t){return t.type==="interval"||t.type==="time"}var PP=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=uh,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!ny(r)||!ny(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,h=o[0]-i[0]*f,d=o[1]-a[0]*c,v=this._transform=[f,0,0,c,h,d];this._invTransform=Rh([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new ht(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Lr(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return Lr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new ht(a,o,s,l)},e}(RP),LP=function(t){be(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(n_);function EP(t,e,r){r=r||{};var n=t.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,v=u==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));v[h.onZero]=Math.max(Math.min(p,v[1]),v[0])}a.position=[u==="y"?v[h[l]]:c[0],u==="x"?v[h[l]]:c[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?v[h[s]]-v[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),ko(r.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-y:y,a.z2=1,a}function iy(t){return t.get("coordinateSystem")==="cartesian2d"}function ay(t){var e={xAxisModel:null,yAxisModel:null};return G(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,Hr).models[0];e[n]=a}),e}var Zc=Math.log;function I_(t,e,r){var n=ai.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),l=q1(t,e),u=l.extent,f=l.fixMin,c=l.fixMax;if(t.type==="log"){var h=Zc(t.base);u=[Zc(u[0])/h,Zc(u[1])/h]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var d=n.getExtent.call(t);f&&(u[0]=d[0]),c&&(u[1]=d[1]);var v=n.getInterval.call(t),p=u[0],g=u[1];if(f&&c)v=(g-p)/o;else if(f)for(g=u[0]+v*o;gu[0]&&isFinite(p)&&isFinite(u[0]);)v=Gc(v),p=u[1]-v*o;else{var y=t.getTicks().length-1;y>o&&(v=Gc(v));var m=v*o;g=Math.ceil(u[1]/v)*v,p=wt(g-m),p<0&&u[0]>=0?(p=0,g=wt(m)):g>0&&u[1]<=0&&(g=0,p=-wt(m))}var w=(i[0].value-a[0].value)/s,k=(i[o].value-a[o].value)/s;n.setExtent.call(t,p+v*w,g+v*k),n.setInterval.call(t,v),(w||k)&&n.setNiceExtent.call(t,p+v,g-v)}var DP=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=uh,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=et(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var h=+l[c],d=o[h],v=d.model,p=d.scale;ah(p)&&v.get("alignTicks")&&v.get("interval")==null?f.push(d):(Lg(p,v),ah(p)&&(s=d))}f.length&&(s||(s=f.pop(),Lg(s.scale,s.model)),G(f,function(g){I_(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};G(n.x,function(o){oy(n,"y",o,a)}),G(n.y,function(o){oy(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=Bl(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(G(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=aR(u);if(f){var c=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[c]-=f[c]+h,u.position==="top"?o.y+=f.height+h:u.position==="left"&&(o.x+=f.width+h)}}}),l()),G(this._coordsList,function(u){u.calcAffineTransform()});function l(){G(s,function(u){var f=u.isHorizontal(),c=f?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(c[h],c[1-h]),BP(u,f?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}De(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):Tl(i-qn)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),ly={axisLine:function(t,e,r,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&t.handleAutoShown&&(i=t.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Lr(s,s,o),Lr(l,l,o));var f=me({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new ni({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Oo(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);Le(h)&&(h=[h,h]),(Le(d)||vt(d))&&(d=[d,d]);var v=c1(e.get(["axisLine","symbolOffset"])||0,d),p=d[0],g=d[1];G([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(h[m]!=="none"&&h[m]!=null){var w=ii(h[m],-p/2,-g/2,p,g,f.stroke,!0),k=y.r+y.offset,R=u?l:s;w.attr({rotation:y.rotate,x:R[0]+k*Math.cos(t.rotation),y:R[1]-k*Math.sin(t.rotation),silent:!0,z2:11}),r.add(w)}})}}},axisTickLabel:function(t,e,r,n){var i=FP(r,n,e,t),a=zP(r,n,e,t);if(NP(e,a,i),$P(r,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=CR(xe(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));IR(o)}},axisName:function(t,e,r,n){var i=ko(t.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,c=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,cy(a)?t.labelOffset+o*l:0],h,d=e.get("nameRotate");d!=null&&(d=d*qn/180);var v;cy(a)?h=Zn.innerTextLayout(t.rotation,d??t.rotation,o):(h=OP(t.rotation,a,d||0,u),v=t.axisNameAvailableWidth,v!=null&&(v=Math.abs(v/Math.sin(h.rotation)),!isFinite(v)&&(v=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=ko(t.nameTruncateMaxWidth,g.maxWidth,v),w=new mr({x:c[0],y:c[1],rotation:h.rotation,silent:Zn.isLabelSilent(e),style:No(s,{text:i,font:p,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(qh({el:w,componentModel:e,itemName:i}),w.__fullText=i,w.anid="name",e.get("triggerEvent")){var k=Zn.makeAxisEventDataBase(e);k.targetType="axisName",k.name=i,yt(w).eventData=k}n.add(w),w.updateTransform(),r.add(w),w.decomposeTransform()}}};function OP(t,e,r,n){var i=Rm(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Tl(i-qn/2)?(o=l?"bottom":"top",a="center"):Tl(i-qn*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iqn/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function NP(t,e,r){if(!X1(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),i=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=r[0],f=r[1],c=r[r.length-1],h=r[r.length-2];n===!1?(Cr(a),Cr(u)):uy(a,o)&&(n?(Cr(o),Cr(f)):(Cr(a),Cr(u))),i===!1?(Cr(s),Cr(c)):uy(l,s)&&(i?(Cr(l),Cr(h)):(Cr(s),Cr(c)))}}function Cr(t){t&&(t.ignore=!0)}function uy(t,e){var r=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!r||!n)){var i=Mh([]);return am(i,i,-t.rotation),r.applyTransform(ya([],i,t.getLocalTransform())),n.applyTransform(ya([],i,e.getLocalTransform())),r.intersect(n)}}function cy(t){return t==="middle"||t==="center"}function A_(t,e,r,n,i){for(var a=[],o=[],s=[],l=0;ll[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var p=l;v.color!=null&&(p=Ye({color:v.color},l));var g=ut(Je(v),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:p,triggerEvent:h},!1);if(Le(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else je(f)&&(g.name=f(g.name,g));var m=new Rt(g,null,this.ecModel);return Gr(m,K1.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ut({lineStyle:{color:"#bbb"}},to.axisLine),axisLabel:Qs(to.axisLabel,!1),axisTick:Qs(to.axisTick,!1),splitLine:Qs(to.splitLine,!0),splitArea:Qs(to.splitArea,!0),indicator:[]},e}(ft),oL=["axisLine","axisTickLabel","axisName"],sL=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes(),a=xe(i,function(o){var s=o.model.get("showName")?o.name:"",l=new Zn(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});G(a,function(o){G(oL,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),c=s.get("show"),h=l.get("color"),d=u.get("color"),v=Re(h)?h:[h],p=Re(d)?d:[d],g=[],y=[];function m(O,E,N){var z=N%E.length;return O[z]=O[z]||[],z}if(a==="circle")for(var w=i[0].getTicksCoords(),k=n.cx,R=n.cy,C=0;C=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(ft),la=vr,hh=G,Js=At,P_=function(t){be(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Js),this.group.add(this._selectorGroup=new Js),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var f=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},h=r.get("padding"),d=Bl(f,c,h),v=this.layoutInner(r,o,d,a,l,u),p=Bl(Ye({width:v.width,height:v.height},f),c,h);this.group.x=p.x-v.x,this.group.y=p.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=hL(v,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),f=qe(),c=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),hh(n.getData(),function(d,v){var p=d.get("name");if(!this.newlineDisabled&&(p===""||p===` `)){var g=new Js;g.newline=!0,u.add(g);return}var y=i.getSeriesByName(p)[0];if(!f.get(p))if(y){var m=y.getData(),w=m.getVisual("legendLineStyle")||{},k=m.getVisual("legendIcon"),R=m.getVisual("style"),C=this._createItem(y,p,v,d,n,r,w,R,k,c,a);C.on("click",la(py,p,null,a,h)).on("mouseover",la(dh,y.name,null,a,h)).on("mouseout",la(vh,y.name,null,a,h)),i.ssr&&C.eachChild(function(x){var M=yt(x);M.seriesIndex=y.seriesIndex,M.dataIndex=v,M.ssrType="legend"}),f.set(p,!0)}else i.eachRawSeries(function(x){if(!f.get(p)&&x.legendVisualProvider){var M=x.legendVisualProvider;if(!M.containName(p))return;var b=M.indexOfName(p),T=M.getItemVisual(b,"style"),_=M.getItemVisual(b,"legendIcon"),I=ln(T.fill);I&&I[3]===0&&(I[3]=.2,T=me(me({},T),{fill:Zl(I,"rgba")}));var A=this._createItem(x,p,v,d,n,r,{},T,_,c,a);A.on("click",la(py,null,p,a,h)).on("mouseover",la(dh,null,p,a,h)).on("mouseout",la(vh,null,p,a,h)),i.ssr&&A.eachChild(function(P){var O=yt(P);O.seriesIndex=x.seriesIndex,O.dataIndex=v,O.ssrType="legend"}),f.set(p,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();hh(r,function(u){var f=u.type,c=new mr({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Ra(c,{normal:h,emphasis:d},{defaultText:u.title}),Uf(c)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,f,c,h){var d=r.visualDrawType,v=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),w=a.get("icon");f=w||f||"roundRect";var k=vL(f,a,l,u,d,g,h),R=new Js,C=a.getModel("textStyle");if(je(r.getLegendIcon)&&(!w||w==="inherit"))R.add(r.getLegendIcon({itemWidth:v,itemHeight:p,icon:f,iconRotate:y,itemStyle:k.itemStyle,lineStyle:k.lineStyle,symbolKeepAspect:m}));else{var x=w==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;R.add(pL({itemWidth:v,itemHeight:p,icon:f,iconRotate:x,itemStyle:k.itemStyle,lineStyle:k.lineStyle,symbolKeepAspect:m}))}var M=s==="left"?v+5:-5,b=s,T=o.get("formatter"),_=n;Le(T)&&T?_=T.replace("{name}",n??""):je(T)&&(_=T(n));var I=g?C.getTextColor():a.get("inactiveColor");R.add(new mr({style:No(C,{text:_,x:M,y:p/2,fill:I,align:b,verticalAlign:"middle"},{inheritColor:I})}));var A=new Mt({shape:R.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&qh({el:A,componentModel:o,itemName:n,itemTooltipOption:P.option}),R.add(A),R.eachChild(function(O){O.silent=!0}),A.silent=!c,this.getContentGroup().add(R),Uf(R),R.__legendDataIndex=i,R},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Co(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Co("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],v=r.get("selectorButtonGap",!0),p=r.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?d[p]+=f[g]+v:c[p]+=h[g]+v,d[1-p]+=f[y]/2-h[y]/2,u.x=d[0],u.y=d[1],l.x=c[0],l.y=c[1];var w={x:0,y:0};return w[g]=f[g]+v+h[g],w[y]=Math.max(f[y],h[y]),w[m]=Math.min(0,h[m]+d[1-p]),w}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(An);function vL(t,e,r,n,i,a,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),hh(g,function(m,w){g[w]==="inherit"&&(g[w]=y[w])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=t.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:eh(c,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=e.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var v=e.get("inactiveBorderWidth"),p=u[f];u.lineWidth=v==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function pL(t){var e=t.icon||"roundRect",r=ii(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function py(t,e,r,n){vh(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),dh(t,e,r,n)}function L_(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;ni[o],g=[-d.x,-d.y];n||(g[a]=f[u]);var y=[0,0],m=[-v.x,-v.y],w=Oe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var k=r.get("pageButtonPosition",!0);k==="end"?m[a]+=i[o]-v[o]:y[a]+=v[o]+w}m[1-a]+=d[s]/2-v[s]/2,f.setPosition(g),c.setPosition(y),h.setPosition(m);var R={x:0,y:0};if(R[o]=p?i[o]:d[o],R[s]=Math.max(d[s],v[s]),R[l]=Math.min(0,v[l]+m[1-a]),c.__rectSize=i[o],p){var C={x:0,y:0};C[o]=Math.max(i[o]-v[o]-w,0),C[s]=R[s],c.setClipPath(new Mt({shape:C})),c.__rectSize=C[o]}else h.eachChild(function(M){M.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(r);return x.pageIndex!=null&&Gt(f,{x:x.contentPosition[0],y:x.contentPosition[1]},p?r:null),this._updatePageInfoView(r,x),R},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;G(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,d=i.childOfName(f);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Le(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=Jc[o],l=ef[o],u=this._findTargetItemIndex(n),f=i.children(),c=f[u],h=f.length,d=h?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return v;var p=k(c);v.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,w=null;g<=h;++g)w=k(f[g]),(!w&&m.e>y.s+a||w&&!R(w,y.s))&&(m.i>y.i?y=m:y=w,y&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=y.i),++v.pageCount)),m=w;for(var g=u-1,y=p,m=p,w=null;g>=-1;--g)w=k(f[g]),(!w||!R(m,w.s))&&y.i=x&&C.s<=x+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}(P_);function SL(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function bL(t){Hi(E_),t.registerComponentModel(mL),t.registerComponentView(_L),SL(t)}function wL(t){Hi(E_),Hi(bL)}var tf=Math.sin,rf=Math.cos,D_=Math.PI,Li=Math.PI*2,CL=180/D_,B_=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,f=!l,c=Math.abs(u),h=Gn(c-Li)||(f?u>=Li:-u>=Li),d=u>0?u%Li:u%Li+Li,v=!1;h?v=!0:Gn(c)?v=!1:v=d>=D_==!!f;var p=e+n*rf(o),g=r+i*tf(o);this._start&&this._add("M",p,g);var y=Math.round(a*CL);if(h){var m=1/this._p,w=(f?1:-1)*(Li-m);this._add("A",n,i,y,1,+f,e+n*rf(o+w),r+i*tf(o+w)),m>.01&&this._add("A",n,i,y,0,+f,p,g)}else{var k=e+n*rf(s),R=r+i*tf(s);this._add("A",n,i,y,+v,+f,k,R)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var f=[],c=this._p,h=1;h"}function LL(t){return""}function xd(t,e){e=e||{};var r=e.newline?` `:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return PL(o,s)+(o!=="style"?uC(l):l||"")+(a?""+r+xe(a,function(u){return n(u)}).join(r)+r:"")+LL(o)}return n(t)}function EL(t,e,r){r=r||{};var n=r.newline?` `:"",i=" {"+n,a=n+"}",o=xe(et(t),function(l){return l+i+xe(et(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=xe(et(e),function(l){return"@keyframes "+l+i+xe(et(e[l]),function(u){return u+i+xe(et(e[l][u]),function(f){var c=e[l][u][f];return f==="d"&&(c='path("'+c+'")'),f+":"+c+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function gh(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function _y(t,e,r,n){return It("svg","root",{width:t,height:e,xmlns:O_,"xmlns:xlink":N_,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var DL=0;function $_(){return DL++}var Sy={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Di="transform-origin";function BL(t,e,r){var n=me({},t.shape);me(n,e),t.buildPath(r,n);var i=new B_;return i.reset(Sm(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function OL(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[Di]=r+"px "+n+"px")}var NL={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function z_(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function FL(t,e,r){var n=t.shape.paths,i={},a,o;if(G(n,function(l){var u=gh(r.zrId);u.animation=!0,Iu(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,h=et(f),d=h.length;if(d){o=h[d-1];var v=f[o];for(var p in v){var g=v[p];i[p]=i[p]||{d:""},i[p].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(a=m)}}}),!!a){e.d=!1;var s=z_(i,r);return a.replace(o,s)}}function by(t){return Le(t)?Sy[t]?"cubic-bezier("+Sy[t]+")":Ph(t)?t:"":""}function Iu(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof u0){var s=FL(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var ee=z_(x,r);return ee+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+$_();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function $L(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};wy(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=Cf(l))}var u=i.lineWidth;if(u){var f=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/f}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),wy(n,e,r)}}function wy(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+$_(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var Wo=Math.round;function U_(t){return t&&Le(t.src)}function V_(t){return t&&je(t.toDataURL)}function Id(t,e,r,n){kL(function(i,a){var o=i==="fill"||i==="stroke";o&&_m(a)?G_(e,t,i,n):o&&Lh(a)?W_(r,t,i,n):o&&a==="none"?t[i]="transparent":t[i]=a},e,r,!1),jL(r,t,n)}function Ad(t,e){var r=pT(e);r&&(r.each(function(n,i){n!=null&&(t[(my+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[my+"silent"]="true"))}function Cy(t){return Gn(t[0]-1)&&Gn(t[1])&&Gn(t[2])&&Gn(t[3]-1)}function zL(t){return Gn(t[4])&&Gn(t[5])}function kd(t,e,r){if(e&&!(zL(e)&&Cy(e))){var n=1e4;t.transform=Cy(e)?"translate("+Wo(e[4]*n)/n+" "+Wo(e[5]*n)/n+")":FC(e)}}function Ty(t,e,r){for(var n=t.points,i=[],a=0;a"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";fn(h,g),fn(d,g)}else if(h==null||d==null){var y=function(T,_){if(T){var I=T.elm,A=h||_.width,P=d||_.height;T.tag==="pattern"&&(u?(P=1,A/=a.width):f&&(A=1,P/=a.height)),T.attrs.width=A,T.attrs.height=P,I&&(I.setAttribute("width",A),I.setAttribute("height",P))}},m=Fh(v,null,t,function(T){l||y(C,T),y(c,T)});m&&m.width&&m.height&&(h=h||m.width,d=d||m.height)}c=It("image","img",{href:v,width:h,height:d}),o.width=h,o.height=d}else i.svgElement&&(c=Je(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(c){var w,k;l?w=k=1:u?(k=1,w=o.width/a.width):f?(w=1,k=o.height/a.height):o.patternUnits="userSpaceOnUse",w!=null&&!isNaN(w)&&(o.width=w),k!=null&&!isNaN(k)&&(o.height=k);var R=bm(i);R&&(o.patternTransform=R);var C=It("pattern","",o,[c]),x=xd(C),M=n.patternCache,b=M[x];b||(b=n.zrId+"-p"+n.patternIdx++,M[x]=b,o.id=b,C=n.defs[b]=It("pattern",b,o,[c])),e[r]=Ql(b)}}function qL(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=It("clipPath",a,o,[H_(t,r)])}e["clip-path"]=Ql(a)}function Ay(t){return document.createTextNode(t)}function Bi(t,e,r){t.insertBefore(e,r)}function ky(t,e){t.removeChild(e)}function My(t,e){t.appendChild(e)}function j_(t){return t.parentNode}function q_(t){return t.nextSibling}function nf(t,e){t.textContent=e}var Ry=58,XL=120,KL=It("","");function yh(t){return t===void 0}function rn(t){return t!==void 0}function YL(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function co(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function jo(t){var e,r=t.children,n=t.tag;if(rn(n)){var i=t.elm=F_(n);if(Md(KL,t),Re(r))for(e=0;ea?(v=r[l+1]==null?null:r[l+1].elm,X_(t,v,r,i,l)):Vl(t,e,n,a))}function fa(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(Md(t,e),yh(e.text)?rn(n)&&rn(i)?n!==i&&ZL(r,n,i):rn(i)?(rn(t.text)&&nf(r,""),X_(r,null,i,0,i.length-1)):rn(n)?Vl(r,n,0,n.length-1):rn(t.text)&&nf(r,""):t.text!==e.text&&(rn(n)&&Vl(r,n,0,n.length-1),nf(r,e.text)))}function QL(t,e){if(co(t,e))fa(t,e);else{var r=t.elm,n=j_(r);jo(e),n!==null&&(Bi(n,e.elm,q_(r)),Vl(n,[t],0,0))}return e}var JL=0,eE=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=Py(),this.configLayer=Py(),this.storage=r,this._opts=n=me({},n),this.root=e,this._id="zr"+JL++,this._oldVNode=_y(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=F_("svg");Md(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",QL(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return Iy(e,gh(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=gh(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis;var o=[],s=this._bgVNode=tE(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=It("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=xe(et(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(It("defs","defs",{},u)),e.animation){var f=EL(a.cssNodes,a.cssAnims,{newline:!0});if(f){var c=It("style","stl",{},[],f);o.push(c)}}return _y(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},xd(this.renderToVNode({animation:Oe(e.cssAnimation,!0),emphasis:Oe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Oe(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,f=0;f=0&&!(h&&l&&h[p]===l[p]);p--);for(var g=v-1;g>p;g--)o--,s=a[o-1];for(var y=p+1;y{let o=[];if(e.themeColors.length>=10)o=e.themeColors;else if(e.themeColors.length===1)o=sf(e.themeColors[0]).analogous(10).map(s=>s.toRgbString());else{const s=e.themeColors.length,l=sf(e.themeColors[s-1]).analogous(11-s).map(u=>u.toRgbString());o=[...e.themeColors.slice(0,s-1),...l]}return o}),a=()=>{var s,l;const o=kw({type:e.type,data:e.data,themeColors:i.value,textColor:e.textColor,lineSmooth:((s=e.options)==null?void 0:s.lineSmooth)||!1,stack:((l=e.options)==null?void 0:l.stack)||!1});o&&r.setOption(o,!0)};return ir(()=>{r=Yk(n.value,null,{renderer:"svg"}),a();const o=()=>r.resize();new ResizeObserver(o).observe(n.value)}),er(()=>e.type,a),er(()=>e.data,a),er(()=>e.themeColors,a),er(()=>e.textColor,a),(o,s)=>(te(),de("div",{class:"chart",ref_key:"chartRef",ref:n},null,512))}}),iE=Ke(nE,[["__scopeId","data-v-a77f2c9e"]]),aE=t=>{if(!t)return{};const{bold:e,em:r,underline:n,strikethrough:i,color:a,backcolor:o,fontsize:s,fontname:l,align:u}=t;let f=`${n?"underline":""} ${i?"line-through":""}`;return f===" "&&(f="none"),{fontWeight:e?"bold":"normal",fontStyle:r?"italic":"normal",textDecoration:f,color:a||"#000",backgroundColor:o||"",fontSize:s||"24px",fontFamily:l||"微软雅黑",textAlign:u||"left"}},oE=t=>t.replace(/\n/g,"
").replace(/ /g," "),sE=t=>({hideCells:Te(()=>{const r=[];for(let n=0;n1||o.rowspan>1)for(let s=n;s{const e=fe(["",""]);return er(()=>t.value,()=>{t.value&&(e.value=OS(t.value.color))},{immediate:!0}),{subThemeColor:e}},uE=(t,e)=>{ir(()=>{if(!e.value)return;let r="normal";if(/m3u8(#|\?|$)/i.exec(t)?r="hls":/.flv(#|\?|$)/i.exec(t)&&(r="flv"),e.value&&r==="hls"&&(e.value.canPlayType("application/x-mpegURL")||e.value.canPlayType("application/vnd.apple.mpegURL"))&&(r="normal"),r==="hls"){const n=window.Hls;if(n&&n.isSupported()){const i=new n;i.loadSource(t),i.attachMedia(e.value)}}else if(r==="flv"){const n=window.flvjs;if(n&&n.isSupported()){const i=n.createPlayer({type:"flv",url:t});i.attachMediaElement(e.value),i.load()}}})},Rd=t=>(Xo("data-v-483c2f65"),t=t(),Ko(),t),cE={key:0,class:"load-error"},fE=["src","poster"],hE={class:"bezel"},dE=Rd(()=>j("div",{class:"controller-mask"},null,-1)),vE={class:"controller"},pE={class:"icons icons-left"},gE={class:"icon-content"},yE={class:"volume"},mE={class:"icon-content"},_E=Rd(()=>j("span",{class:"thumb"},null,-1)),SE=[_E],bE={class:"time"},wE={class:"ptime"},CE={class:"dtime"},TE={class:"icons icons-right"},xE={class:"speed"},IE={class:"icon speed-icon"},AE=["onClick"],kE={class:"icon-content"},ME={class:"bar"},RE=Rd(()=>j("span",{class:"thumb"},null,-1)),PE=[RE],LE=Ue({__name:"index",props:{width:{},height:{},src:{},poster:{default:""},autoplay:{type:Boolean,default:!1},scale:{default:1},needWaitAnimation:{type:Boolean}},setup(t){const e=t;er(()=>e.needWaitAnimation,()=>{e.autoplay&&(e.needWaitAnimation?_():T())});const r=(re=0)=>{if(re===0||isNaN(re))return"00:00";const le=st=>st<10?"0"+st:""+st,we=Math.floor(re/3600),Ie=Math.floor((re-we*3600)/60),tt=Math.floor(re-we*3600-Ie*60);return(we>0?[we,Ie,tt]:[Ie,tt]).map(le).join(":")},n=re=>re.getBoundingClientRect().left,i=fe(),a=fe(),o=fe(),s=fe(.5),l=fe(!0),u=fe(0),f=fe(0),c=fe(0),h=fe(!1),d=fe(!1),v=fe(1),p=fe(!1),g=fe("00:00"),y=fe("0"),m=Te(()=>r(u.value)),w=Te(()=>r(f.value)),k=Te(()=>u.value/f.value*100+"%"),R=Te(()=>c.value/f.value*100+"%"),C=Te(()=>s.value*100+"%"),x=fe(!1),M=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],b=re=>{i.value&&(re=Math.max(re,0),re=Math.min(re,f.value),i.value.currentTime=re,u.value=re)},T=()=>{i.value&&(l.value=!1,i.value.play(),d.value=!0)},_=()=>{i.value&&(l.value=!0,i.value.pause(),d.value=!0)},I=()=>{l.value?T():_()},A=re=>{i.value&&(re=Math.max(re,0),re=Math.min(re,1),i.value.volume=re,s.value=re,i.value.muted&&re!==0&&(i.value.muted=!1))},P=re=>{i.value&&(i.value.playbackRate=re),v.value=re},O=()=>{var re;f.value=((re=i.value)==null?void 0:re.duration)||0},E=()=>{var re;u.value=((re=i.value)==null?void 0:re.currentTime)||0},N=()=>{h.value?(b(0),T()):_()},z=()=>{var re;c.value=(re=i.value)!=null&&re.buffered.length?i.value.buffered.end(i.value.buffered.length-1):0},U=fe(!1),q=()=>U.value=!0,Y=re=>{if(!i.value||!a.value)return;let we=(("clientX"in re?re.clientX:re.changedTouches[0].clientX)-n(a.value))/a.value.clientWidth;we=Math.max(we,0),we=Math.min(we,1);const Ie=we*f.value;i.value.currentTime=Ie,u.value=Ie},Z=re=>{if(!i.value||!a.value)return;let we=(("clientX"in re?re.clientX:re.changedTouches[0].clientX)-n(a.value))/a.value.clientWidth;we=Math.max(we,0),we=Math.min(we,1);const Ie=we*f.value;i.value.currentTime=Ie,u.value=Ie,document.removeEventListener("mousemove",Y),document.removeEventListener("touchmove",Y),document.removeEventListener("mouseup",Z),document.removeEventListener("touchend",Z)},se=()=>{document.addEventListener("mousemove",Y),document.addEventListener("touchmove",Y),document.addEventListener("mouseup",Z),document.addEventListener("touchend",Z)},ce=re=>{if(!o.value)return;const we=(("clientX"in re?re.clientX:re.changedTouches[0].clientX)-n(o.value))/45;A(we)},J=()=>{document.removeEventListener("mousemove",ce),document.removeEventListener("touchmove",ce),document.removeEventListener("mouseup",J),document.removeEventListener("touchend",J)},X=()=>{document.addEventListener("mousemove",ce),document.addEventListener("touchmove",ce),document.addEventListener("mouseup",J),document.addEventListener("touchend",J)},ee=re=>{if(!o.value)return;const le=(re.clientX-n(o.value))/45;A(le)},ue=re=>{if(f.value&&a.value){const le=a.value.getBoundingClientRect().left,we=re.clientX-le;if(we<0||we>a.value.offsetWidth)return;const Ie=f.value*(we/a.value.offsetWidth);y.value=`${we-(Ie>=3600?25:20)}px`,g.value=r(Ie),p.value=!0}},_e=()=>{i.value&&(i.value.muted?(i.value.muted=!1,A(.5)):(i.value.muted=!0,A(0)))},ve=()=>{h.value=!h.value},ie=fe(-1),ne=fe(!1),Ae=()=>{ne.value=!1,clearTimeout(ie.value),ie.value=setTimeout(()=>{var re;(re=i.value)!=null&&re.played.length&&(ne.value=!0)},3e3)};return uE(e.src,i),(re,le)=>{const we=Qe("IconPause"),Ie=Qe("IconPlayOne"),tt=Qe("IconVolumeMute"),st=Qe("IconVolumeNotice"),bt=Qe("IconVolumeSmall");return te(),de("div",{class:nt(["video-player",{"hide-controller":ne.value}]),style:Se({width:re.width*re.scale+"px",height:re.height*re.scale+"px",transform:`scale(${1/re.scale})`}),onMousemove:le[22]||(le[22]=Ee=>Ae()),onClick:le[23]||(le[23]=Ee=>Ae())},[j("div",{class:"video-wrap",onClick:le[8]||(le[8]=Ee=>I())},[U.value?(te(),de("div",cE,"视频加载失败")):Ge("",!0),j("video",{class:"video",ref_key:"videoRef",ref:i,src:re.src,poster:re.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:le[0]||(le[0]=Ee=>O()),onTimeupdate:le[1]||(le[1]=Ee=>E()),onEnded:le[2]||(le[2]=Ee=>N()),onProgress:le[3]||(le[3]=Ee=>z()),onPlay:le[4]||(le[4]=()=>{Ae(),l.value=!1}),onPause:le[5]||(le[5]=Ee=>Ae()),onError:le[6]||(le[6]=Ee=>q())},null,40,fE),j("div",hE,[j("span",{class:nt(["bezel-icon",{"bezel-transition":d.value}]),onAnimationend:le[7]||(le[7]=Ee=>d.value=!1)},[l.value?(te(),He(we,{key:0})):(te(),He(Ie,{key:1}))],34)])]),dE,j("div",vE,[j("div",pE,[j("div",{class:"icon play-icon",onClick:le[9]||(le[9]=Ee=>I())},[j("span",gE,[l.value?(te(),He(Ie,{key:0})):(te(),He(we,{key:1}))])]),j("div",yE,[j("div",{class:"icon volume-icon",onClick:le[10]||(le[10]=Ee=>_e())},[j("span",mE,[s.value===0?(te(),He(tt,{key:0})):s.value===1?(te(),He(st,{key:1})):(te(),He(bt,{key:2}))])]),j("div",{class:"volume-bar-wrap",onMousedown:le[11]||(le[11]=Ee=>X()),onTouchstart:le[12]||(le[12]=Ee=>X()),onClick:le[13]||(le[13]=Ee=>ee(Ee))},[j("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:o},[j("div",{class:"volume-bar-inner",style:Se({width:C.value})},SE,4)],512)],32)]),j("span",bE,[j("span",wE,Nt(m.value),1),Ey(" / "),j("span",CE,Nt(w.value),1)])]),j("div",TE,[j("div",xE,[j("div",IE,[j("span",{class:"icon-content",onClick:le[14]||(le[14]=Ee=>x.value=!x.value)},Nt(v.value===1?"倍速":v.value+"x"),1),x.value?(te(),de("div",{key:0,class:"speed-menu",onMouseleave:le[15]||(le[15]=Ee=>x.value=!1)},[(te(),de(Ht,null,Pr(M,Ee=>j("div",{class:nt(["speed-menu-item",{active:Ee.value===v.value}]),key:Ee.label,onClick:Br=>P(Ee.value)},Nt(Ee.label),11,AE)),64))],32)):Ge("",!0)])]),j("div",{class:"loop",onClick:le[16]||(le[16]=Ee=>ve())},[j("div",{class:nt(["icon loop-icon",{active:h.value}])},[j("span",kE,"循环"+Nt(h.value?"开":"关"),1)],2)])]),j("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:a,onMousedown:le[17]||(le[17]=Ee=>se()),onTouchstart:le[18]||(le[18]=Ee=>se()),onMousemove:le[19]||(le[19]=Ee=>ue(Ee)),onMouseenter:le[20]||(le[20]=Ee=>p.value=!0),onMouseleave:le[21]||(le[21]=Ee=>p.value=!1)},[j("div",{class:nt(["bar-time",{hidden:!p.value}]),style:Se({left:y.value})},Nt(g.value),7),j("div",ME,[j("div",{class:"loaded",style:Se({width:R.value})},null,4),j("div",{class:"played",style:Se({width:k.value})},PE,4)])],544)])],38)}}}),EE=Ke(LE,[["__scopeId","data-v-483c2f65"]]),K_=t=>(Xo("data-v-083302c0"),t=t(),Ko(),t),DE=["src"],BE={class:"controller"},OE={class:"icons"},NE={class:"icon-content"},FE={class:"volume"},$E={class:"icon-content"},zE=K_(()=>j("span",{class:"thumb"},null,-1)),UE=[zE],VE={class:"time"},HE={class:"ptime"},GE={class:"dtime"},WE={class:"bar"},jE=K_(()=>j("span",{class:"thumb"},null,-1)),qE=[jE],XE=Ue({__name:"AudioPlayer",props:{src:{},loop:{type:Boolean},autoplay:{type:Boolean,default:!1},scale:{default:1},needWaitAnimation:{type:Boolean}},setup(t,{expose:e}){const r=t;er(()=>r.needWaitAnimation,()=>{r.autoplay&&(r.needWaitAnimation?x():C())});const n=(J=0)=>{if(J===0||isNaN(J))return"00:00";const X=ve=>ve<10?"0"+ve:""+ve,ee=Math.floor(J/3600),ue=Math.floor((J-ee*3600)/60),_e=Math.floor(J-ee*3600-ue*60);return(ee>0?[ee,ue,_e]:[ue,_e]).map(X).join(":")},i=J=>J.getBoundingClientRect().left,a=fe(),o=fe(),s=fe(),l=fe(.5),u=fe(!0),f=fe(0),c=fe(0),h=fe(0),d=fe(!1),v=fe("00:00"),p=fe("0"),g=Te(()=>n(f.value)),y=Te(()=>n(c.value)),m=Te(()=>f.value/c.value*100+"%"),w=Te(()=>h.value/c.value*100+"%"),k=Te(()=>l.value*100+"%"),R=J=>{a.value&&(J=Math.max(J,0),J=Math.min(J,c.value),a.value.currentTime=J,f.value=J)},C=()=>{a.value&&(u.value=!1,a.value.play())},x=()=>{a.value&&(u.value=!0,a.value.pause())},M=()=>{u.value?C():x()},b=J=>{a.value&&(J=Math.max(J,0),J=Math.min(J,1),a.value.volume=J,l.value=J,a.value.muted&&J!==0&&(a.value.muted=!1))},T=()=>{var J;c.value=((J=a.value)==null?void 0:J.duration)||0},_=()=>{var J;f.value=((J=a.value)==null?void 0:J.currentTime)||0},I=()=>{u.value=!1},A=()=>{r.loop?(R(0),C()):x()},P=()=>{var J;h.value=(J=a.value)!=null&&J.buffered.length?a.value.buffered.end(a.value.buffered.length-1):0},O=()=>yr.error("视频加载失败"),E=J=>{if(!a.value||!o.value)return;let ee=(("clientX"in J?J.clientX:J.changedTouches[0].clientX)-i(o.value))/o.value.clientWidth;ee=Math.max(ee,0),ee=Math.min(ee,1);const ue=ee*c.value;a.value.currentTime=ue,f.value=ue},N=J=>{if(!a.value||!o.value)return;let ee=(("clientX"in J?J.clientX:J.changedTouches[0].clientX)-i(o.value))/o.value.clientWidth;ee=Math.max(ee,0),ee=Math.min(ee,1);const ue=ee*c.value;a.value.currentTime=ue,f.value=ue,document.removeEventListener("mousemove",E),document.removeEventListener("touchmove",E),document.removeEventListener("mouseup",N),document.removeEventListener("touchend",N)},z=()=>{document.addEventListener("mousemove",E),document.addEventListener("touchmove",E),document.addEventListener("mouseup",N),document.addEventListener("touchend",N)},U=J=>{if(!s.value)return;const ee=(("clientX"in J?J.clientX:J.changedTouches[0].clientX)-i(s.value))/45;b(ee)},q=()=>{document.removeEventListener("mousemove",U),document.removeEventListener("touchmove",U),document.removeEventListener("mouseup",q),document.removeEventListener("touchend",q)},Y=()=>{document.addEventListener("mousemove",U),document.addEventListener("touchmove",U),document.addEventListener("mouseup",q),document.addEventListener("touchend",q)},Z=J=>{if(!s.value)return;const X=(J.clientX-i(s.value))/45;b(X)},se=J=>{if(c.value&&o.value){const X=o.value.getBoundingClientRect().left,ee=J.clientX-X;if(ee<0||ee>o.value.offsetWidth)return;const ue=c.value*(ee/o.value.offsetWidth);p.value=`${ee-(ue>=3600?25:20)}px`,v.value=n(ue),d.value=!0}},ce=()=>{a.value&&(a.value.muted?(a.value.muted=!1,b(.5)):(a.value.muted=!0,b(0)))};return e({toggle:M}),(J,X)=>{const ee=Qe("IconPlayOne"),ue=Qe("IconPause"),_e=Qe("IconVolumeMute"),ve=Qe("IconVolumeNotice"),ie=Qe("IconVolumeSmall");return te(),de("div",{class:"audio-player",style:Se({transform:`scale(${1/J.scale})`})},[j("audio",{class:"audio",ref_key:"audioRef",ref:a,src:J.src,onDurationchange:X[0]||(X[0]=ne=>T()),onTimeupdate:X[1]||(X[1]=ne=>_()),onPlay:X[2]||(X[2]=ne=>I()),onEnded:X[3]||(X[3]=ne=>A()),onProgress:X[4]||(X[4]=ne=>P()),onError:X[5]||(X[5]=ne=>O())},null,40,DE),j("div",BE,[j("div",OE,[j("div",{class:"icon play-icon",onClick:X[6]||(X[6]=ne=>M())},[j("span",NE,[u.value?(te(),He(ee,{key:0})):(te(),He(ue,{key:1}))])]),j("div",FE,[j("div",{class:"icon volume-icon",onClick:X[7]||(X[7]=ne=>ce())},[j("span",$E,[l.value===0?(te(),He(_e,{key:0})):l.value===1?(te(),He(ve,{key:1})):(te(),He(ie,{key:2}))])]),j("div",{class:"volume-bar-wrap",onMousedown:X[8]||(X[8]=ne=>Y()),onTouchstart:X[9]||(X[9]=ne=>Y()),onClick:X[10]||(X[10]=ne=>Z(ne))},[j("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:s},[j("div",{class:"volume-bar-inner",style:Se({width:k.value})},UE,4)],512)],32)])]),j("span",VE,[j("span",HE,Nt(g.value),1),Ey(" / "),j("span",GE,Nt(y.value),1)]),j("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:o,onMousedown:X[11]||(X[11]=ne=>z()),onTouchstart:X[12]||(X[12]=ne=>z()),onMousemove:X[13]||(X[13]=ne=>se(ne)),onMouseenter:X[14]||(X[14]=ne=>d.value=!0),onMouseleave:X[15]||(X[15]=ne=>d.value=!1)},[j("div",{class:nt(["bar-time",{hidden:!d.value}]),style:Se({left:p.value})},Nt(v.value),7),j("div",WE,[j("div",{class:"loaded",style:Se({width:w.value})},null,4),j("div",{class:"played",style:Se({width:m.value})},qE,4)])],544)])],4)}}}),KE=Ke(XE,[["__scopeId","data-v-083302c0"]]),YE={key:0,class:"loading-overlay"},ZE=ES('
',1),QE=[ZE],JE=["src"],eD=Ue({__name:"cloudCoachPlayer",props:{width:{},height:{},id:{},scale:{default:1}},setup(t){const e=t,r=Te(()=>`${PS}?v=${Date.now()}&showGuide=true&showWebGuide=false&platform=pc&imagePos=right&zoom=0.8&modelType=practise&instrumentId=${wn.instrumentId}&iscurseplay=play&id=${e.id}&Authorization=${LS()}`),n=fe(!0);function i(){n.value=!1}return(a,o)=>(te(),de("div",{class:"cloudCoachPlayer",style:Se({width:a.width*a.scale+"px",height:a.height*a.scale+"px",transform:`scale(${1/a.scale})`})},[n.value?(te(),de("div",YE,QE)):Ge("",!0),j("iframe",{class:"musicIframe",frameborder:"0",src:r.value,onLoad:i},null,40,JE)],4))}}),tD=Ke(eD,[["__scopeId","data-v-3d369106"]]),Y_=t=>({backgroundStyle:Te(()=>{if(!t.value)return{backgroundColor:"#fff"};const{type:r,color:n,image:i,imageSize:a,gradient:o}=t.value;if(r==="solid")return{backgroundColor:n};if(r==="image"&&i)return a==="repeat"?{backgroundImage:`url(${i}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${i}`,backgroundRepeat:"no-repeat",backgroundSize:a||"cover"};if(r==="gradient"&&o){const{type:s,colors:l,rotate:u}=o,f=l.map(c=>`${c.color} ${c.pos}%`);return s==="radial"?{backgroundImage:`radial-gradient(${f.join(",")}`}:{backgroundImage:`linear-gradient(${u}deg, ${f.join(",")}`}}return{backgroundColor:"#fff"}})}),rD=Ue({__name:"Divider",props:{type:{default:"horizontal"},margin:{default:-1}},setup(t){return(e,r)=>(te(),de("div",{class:nt(["divider",e.type]),style:Se({margin:e.type==="horizontal"?`${e.margin>=0?e.margin:24}px 0`:`0 ${e.margin>=0?e.margin:8}px`})},null,6))}}),nD=Ke(rD,[["__scopeId","data-v-def6106d"]]),iD=["src"],aD=Ue({__name:"BaseImageElement",props:{elementInfo:{}},setup(t){const e=t,r=Te(()=>e.elementInfo.shadow),{shadowStyle:n}=Xl(r),i=Te(()=>e.elementInfo.flipH),a=Te(()=>e.elementInfo.flipV),{flipStyle:o}=jy(i,a),s=Te(()=>e.elementInfo),{clipShape:l,imgPosition:u}=Xy(s),f=Te(()=>e.elementInfo.filters),{filter:c}=nw(f);return(h,d)=>(te(),de("div",{class:"base-element-image",style:Se({top:h.elementInfo.top+"px",left:h.elementInfo.left+"px",width:h.elementInfo.width+"px",height:h.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${h.elementInfo.rotate}deg)`})},[j("div",{class:"element-content",style:Se({filter:oe(n)?`drop-shadow(${oe(n)})`:"",transform:oe(o)})},[ze(yw,{elementInfo:h.elementInfo},null,8,["elementInfo"]),j("div",{class:"image-content",style:Se({clipPath:oe(l).style})},[j("img",{src:h.elementInfo.src,draggable:!1,style:Se({top:oe(u).top,left:oe(u).left,width:oe(u).width,height:oe(u).height,filter:oe(c)}),alt:""},null,12,iD),h.elementInfo.colorMask?(te(),de("div",{key:0,class:"color-mask",style:Se({backgroundColor:h.elementInfo.colorMask})},null,4)):Ge("",!0)],4)],4)],4)],4))}}),Z_=Ke(aD,[["__scopeId","data-v-f5bbdf36"]]),oD=["innerHTML"],sD=Ue({__name:"BaseTextElement",props:{elementInfo:{},target:{}},setup(t){const e=t,r=Te(()=>e.elementInfo.shadow),{shadowStyle:n}=Xl(r);return(i,a)=>(te(),de("div",{class:"base-element-text",style:Se({top:i.elementInfo.top+"px",left:i.elementInfo.left+"px",width:i.elementInfo.width+"px",height:i.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${i.elementInfo.rotate}deg)`})},[j("div",{class:"element-content",style:Se({width:i.elementInfo.vertical?"auto":i.elementInfo.width+"px",height:i.elementInfo.vertical?i.elementInfo.height+"px":"auto",backgroundColor:i.elementInfo.fill,opacity:i.elementInfo.opacity,textShadow:oe(n),lineHeight:i.elementInfo.lineHeight,letterSpacing:(i.elementInfo.wordSpace||0)+"px",color:i.elementInfo.defaultColor,fontFamily:i.elementInfo.defaultFontName,writingMode:i.elementInfo.vertical?"vertical-rl":"horizontal-tb"})},[ze(Ky,{width:i.elementInfo.width,height:i.elementInfo.height,outline:i.elementInfo.outline},null,8,["width","height","outline"]),j("div",{class:nt(["text ProseMirror-static",{thumbnail:i.target==="thumbnail"}]),style:Se({"--paragraphSpace":`${i.elementInfo.paragraphSpace===void 0?5:i.elementInfo.paragraphSpace}px`}),innerHTML:i.elementInfo.content},null,14,oD)],4)],4)],4))}}),Q_=Ke(sD,[["__scopeId","data-v-3eca1d55"]]),lD=["width","height"],uD={key:0},cD=["transform"],fD=["d","fill","stroke","stroke-width","stroke-dasharray"],hD=["innerHTML"],dD=Ue({__name:"BaseShapeElement",props:{elementInfo:{}},setup(t){const e=t,r=Te(()=>e.elementInfo.outline),{outlineWidth:n,outlineColor:i,strokeDashArray:a}=Yo(r),o=Te(()=>e.elementInfo.shadow),{shadowStyle:s}=Xl(o),l=Te(()=>e.elementInfo.flipH),u=Te(()=>e.elementInfo.flipV),{flipStyle:f}=jy(l,u),c=Te(()=>{const h={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return e.elementInfo.text?e.elementInfo.text:h});return(h,d)=>(te(),de("div",{class:"base-element-shape",style:Se({top:h.elementInfo.top+"px",left:h.elementInfo.left+"px",width:h.elementInfo.width+"px",height:h.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${h.elementInfo.rotate}deg)`})},[j("div",{class:"element-content",style:Se({opacity:h.elementInfo.opacity,filter:oe(s)?`drop-shadow(${oe(s)})`:"",transform:oe(f),color:c.value.defaultColor,fontFamily:c.value.defaultFontName})},[(te(),de("svg",{overflow:"visible",width:h.elementInfo.width,height:h.elementInfo.height},[h.elementInfo.gradient?(te(),de("defs",uD,[ze(xw,{id:`base-gradient-${h.elementInfo.id}`,type:h.elementInfo.gradient.type,colors:h.elementInfo.gradient.colors,rotate:h.elementInfo.gradient.rotate},null,8,["id","type","colors","rotate"])])):Ge("",!0),j("g",{transform:`scale(${h.elementInfo.width/(h.elementInfo.viewBox[0]||h.elementInfo.viewBox)}, ${h.elementInfo.height/(h.elementInfo.viewBox[1]||h.elementInfo.viewBox)}) translate(0,0) matrix(1,0,0,1,0,0)`},[j("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:h.elementInfo.path,fill:h.elementInfo.gradient?`url(#base-gradient-${h.elementInfo.id})`:h.elementInfo.fill,stroke:oe(i),"stroke-width":oe(n),"stroke-dasharray":oe(a)},null,8,fD)],8,cD)],8,lD)),j("div",{class:nt(["shape-text",c.value.align])},[j("div",{class:"ProseMirror-static",innerHTML:c.value.content},null,8,hD)],2)],4)],4)],4))}}),J_=Ke(dD,[["__scopeId","data-v-b45bc689"]]),vD=["width","height"],pD=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],gD=Ue({__name:"BaseLineElement",props:{elementInfo:{}},setup(t){const e=t,r=Te(()=>e.elementInfo.shadow),{shadowStyle:n}=Xl(r),i=Te(()=>{const l=Math.abs(e.elementInfo.start[0]-e.elementInfo.end[0]);return l<24?24:l}),a=Te(()=>{const l=Math.abs(e.elementInfo.start[1]-e.elementInfo.end[1]);return l<24?24:l}),o=Te(()=>{const l=e.elementInfo.width;return e.elementInfo.style==="dashed"?l<=8?`${l*5} ${l*2.5}`:`${l*5} ${l*1.5}`:e.elementInfo.style==="dotted"?l<=8?`${l*1.8} ${l*1.6}`:`${l*1.5} ${l*1.2}`:"0 0"}),s=Te(()=>NS(e.elementInfo));return(l,u)=>(te(),de("div",{class:"base-element-line",style:Se({top:l.elementInfo.top+"px",left:l.elementInfo.left+"px"})},[j("div",{class:"element-content",style:Se({filter:oe(n)?`drop-shadow(${oe(n)})`:""})},[(te(),de("svg",{overflow:"visible",width:i.value,height:a.value},[j("defs",null,[l.elementInfo.points[0]?(te(),He(Qd,{key:0,id:l.elementInfo.id,position:"start",type:l.elementInfo.points[0],color:l.elementInfo.color,baseSize:l.elementInfo.width},null,8,["id","type","color","baseSize"])):Ge("",!0),l.elementInfo.points[1]?(te(),He(Qd,{key:1,id:l.elementInfo.id,position:"end",type:l.elementInfo.points[1],color:l.elementInfo.color,baseSize:l.elementInfo.width},null,8,["id","type","color","baseSize"])):Ge("",!0)]),j("path",{d:s.value,stroke:l.elementInfo.color,"stroke-width":l.elementInfo.width,"stroke-dasharray":o.value,fill:"none","marker-start":l.elementInfo.points[0]?`url(#${l.elementInfo.id}-${l.elementInfo.points[0]}-start)`:"","marker-end":l.elementInfo.points[1]?`url(#${l.elementInfo.id}-${l.elementInfo.points[1]}-end)`:""},null,8,pD)],8,vD))],4)],4))}}),eS=Ke(gD,[["__scopeId","data-v-f6565627"]]),yD=Ue({__name:"BaseChartElement",props:{elementInfo:{},target:{}},setup(t){return(e,r)=>(te(),de("div",{class:nt(["base-element-chart",{"is-thumbnail":e.target==="thumbnail"}]),style:Se({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${e.elementInfo.rotate}deg)`})},[j("div",{class:"element-content",style:Se({backgroundColor:e.elementInfo.fill})},[ze(Ky,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),ze(iE,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,themeColors:e.elementInfo.themeColors,textColor:e.elementInfo.textColor,options:e.elementInfo.options},null,8,["width","height","type","data","themeColors","textColor","options"])],4)],4)],6))}}),tS=Ke(yD,[["__scopeId","data-v-5a1fd6e3"]]),mD=["width"],_D=["rowspan","colspan"],SD=["innerHTML"],bD=Ue({__name:"StaticTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},setup(t){const e=t,r=fe([]),n=Te(()=>r.value.reduce((l,u)=>l+u));er([()=>e.colWidths,()=>e.width],()=>{r.value=e.colWidths.map(l=>l*e.width)},{immediate:!0});const i=Te(()=>e.data),{hideCells:a}=sE(i),o=Te(()=>e.theme),{subThemeColor:s}=lE(o);return(l,u)=>{var f,c,h,d,v;return te(),de("div",{class:"static-table",style:Se({width:n.value+"px"})},[j("table",{class:nt({theme:o.value,"row-header":(f=o.value)==null?void 0:f.rowHeader,"row-footer":(c=o.value)==null?void 0:c.rowFooter,"col-header":(h=o.value)==null?void 0:h.colHeader,"col-footer":(d=o.value)==null?void 0:d.colFooter}),style:Se(`--themeColor: ${(v=o.value)==null?void 0:v.color}; --subThemeColor1: ${oe(s)[0]}; --subThemeColor2: ${oe(s)[1]}`)},[j("colgroup",null,[(te(!0),de(Ht,null,Pr(r.value,(p,g)=>(te(),de("col",{span:"1",key:g,width:p},null,8,mD))),128))]),j("tbody",null,[(te(!0),de(Ht,null,Pr(l.data,(p,g)=>(te(),de("tr",{key:g,style:Se({height:l.cellMinHeight+"px"})},[(te(!0),de(Ht,null,Pr(p,(y,m)=>Sn((te(),de("td",{class:"cell",style:Se({borderStyle:l.outline.style,borderColor:l.outline.color,borderWidth:l.outline.width+"px",...oe(aE)(y.style)}),key:y.id,rowspan:y.rowspan,colspan:y.colspan},[j("div",{class:"cell-text",style:Se({minHeight:l.cellMinHeight-4+"px"}),innerHTML:oe(oE)(y.text)},null,12,SD)],12,_D)),[[DS,!oe(a).includes(`${g}_${m}`)]])),128))],4))),128))])],6)],4)}}}),wD=Ke(bD,[["__scopeId","data-v-909691d5"]]),CD={class:"element-content"},TD=Ue({__name:"BaseTableElement",props:{elementInfo:{}},setup(t){return(e,r)=>(te(),de("div",{class:"base-element-table",style:Se({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${e.elementInfo.rotate}deg)`})},[j("div",CD,[ze(wD,{data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","cellMinHeight","colWidths","outline","theme"])])],4)],4))}}),rS=Ke(TD,[["__scopeId","data-v-a0ffa95b"]]),xD={class:"element-content"},ID=["width","height","stroke","stroke-width"],AD=["transform"],kD=["d"],MD=Ue({__name:"BaseLatexElement",props:{elementInfo:{}},setup(t){return(e,r)=>(te(),de("div",{class:"base-element-latex",style:Se({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${e.elementInfo.rotate}deg)`})},[j("div",xD,[(te(),de("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[j("g",{transform:`scale(${e.elementInfo.width/(e.elementInfo.viewBox[0]||e.elementInfo.viewBox)}, ${e.elementInfo.height/(e.elementInfo.viewBox[1]||e.elementInfo.viewBox)}) translate(0,0) matrix(1,0,0,1,0,0)`},[j("path",{d:e.elementInfo.path},null,8,kD)],8,AD)],8,ID))])],4)],4))}}),nS=Ke(MD,[["__scopeId","data-v-4904f8d7"]]),RD=Ue({__name:"BaseVideoElement",props:{elementInfo:{}},setup(t){return(e,r)=>{const n=Qe("IconPlayOne");return te(),de("div",{class:"base-element-video",style:Se({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${e.elementInfo.rotate}deg)`})},[j("div",{class:"element-content",style:Se({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[ze(n,{class:"icon"})],4)],4)],4)}}}),PD=Ke(RD,[["__scopeId","data-v-72eec24c"]]),LD={class:"element-content"},ED=Ue({__name:"BaseAudioElement",props:{elementInfo:{}},setup(t){const e=t,r=Te(()=>Math.min(e.elementInfo.width,e.elementInfo.height)+"px");return(n,i)=>{const a=Qe("IconVolumeNotice");return te(),de("div",{class:"base-element-audio",style:Se({top:n.elementInfo.top+"px",left:n.elementInfo.left+"px",width:n.elementInfo.width+"px",height:n.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${n.elementInfo.rotate}deg)`})},[j("div",LD,[ze(a,{class:"audio-icon",style:Se({fontSize:r.value,color:n.elementInfo.color})},null,8,["style"])])],4)],4)}}}),DD=Ke(ED,[["__scopeId","data-v-35ae44f0"]]),BD={class:"element-content"},OD=Ue({__name:"BaseCloudCoachElement",props:{elementInfo:{}},setup(t){const e=Vi(ka)||fe(1);return(r,n)=>(te(),de("div",{class:"base-element-cloudCoach",style:Se({top:r.elementInfo.top+"px",left:r.elementInfo.left+"px",width:r.elementInfo.width+"px",height:r.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${r.elementInfo.rotate}deg)`})},[j("div",BD,[j("div",{class:"title",style:Se({fontSize:14/oe(e)+"px"})},Nt(r.elementInfo.title||"乐谱"),5)])],4)],4))}}),ND=Ke(OD,[["__scopeId","data-v-76ef6257"]]),FD=Ue({__name:"ThumbnailElement",props:{elementInfo:{},elementIndex:{}},setup(t){const e=t,r=Te(()=>{const n={[Ot.IMAGE]:Z_,[Ot.TEXT]:Q_,[Ot.SHAPE]:J_,[Ot.LINE]:eS,[Ot.CHART]:tS,[Ot.TABLE]:rS,[Ot.LATEX]:nS,[Ot.ELF]:null},i={[Fi.AUDIO]:DD,[Fi.VIDEO]:PD,[Fi.SING_PLAY]:ND};return n[e.elementInfo.type]||i[e.elementInfo.subtype]||null});return(n,i)=>(te(),de("div",{class:nt(["base-element",`base-element-${n.elementInfo.id}`]),style:Se({zIndex:n.elementIndex})},[(te(),He(Dy(r.value),{elementInfo:n.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}}),$D={key:1,class:"placeholder"},zD=Ue({__name:"index",props:{slide:{},size:{},visible:{type:Boolean,default:!0}},setup(t){const e=t,{viewportRatio:r,viewportSize:n}=lr(kt()),i=Te(()=>e.slide.background),{backgroundStyle:a}=Y_(i),o=Te(()=>e.size/n.value);return _h(ka,o),(s,l)=>(te(),de("div",{class:"thumbnail-slide",style:Se({width:s.size+"px",height:s.size*oe(r)+"px"})},[s.visible?(te(),de("div",{key:0,class:"elements",style:Se({width:oe(n)+"px",height:oe(n)*oe(r)+"px",transform:`scale(${o.value})`})},[j("div",{class:"background",style:Se(oe(a))},null,4),(te(!0),de(Ht,null,Pr(s.slide.elements,(u,f)=>(te(),He(FD,{key:u.id,elementInfo:u,elementIndex:f+1},null,8,["elementInfo","elementIndex"]))),128))],4)):(te(),de("div",$D,"加载中 ..."))],4))}}),iS=Ke(zD,[["__scopeId","data-v-0345aefe"]]),aS=()=>{const{slides:t}=lr(kt()),e=fe(null),r=fe(50),n=()=>{t.value.length>r.value?e.value=setTimeout(()=>{r.value=r.value+20,n()},600):r.value=9999};return ir(n),cn(()=>{e.value&&clearTimeout(e.value)}),{slidesLoadLimit:r}};function Pd(t,e){return e===void 0&&(e=15),+parseFloat(Number(t).toPrecision(e))}function hn(t){var e=t.toString().split(/[eE]/),r=(e[0].split(".")[1]||"").length-+(e[1]||0);return r>0?r:0}function qo(t){if(t.toString().indexOf("e")===-1)return Number(t.toString().replace(".",""));var e=hn(t);return e>0?Pd(Number(t)*Math.pow(10,e)):Number(t)}function mh(t){sS&&(t>Number.MAX_SAFE_INTEGER||tk.getBoundingClientRect().left,n=t,i=e,a=fe(),o=fe(0),s=fe(0),l=fe(0),u=fe("end"),f=k=>{let R=k/100*(n.max-n.min);if(n.step>=1)R=Math.fround(R);else{const C=n.step.toString(),x=C.match(/^[0.]*([1-9])/);if(x){const M=x[1],b=C.indexOf(M)-1;if(b>0){const T=Math.pow(10,b);R=Math.fround(R*T)/T}}}return WD.plus(R,n.min)},c=Te(()=>f(o.value)),h=Te(()=>f(s.value)),d=Te(()=>f(l.value));er(()=>n.value,()=>{n.max!==n.min&&(typeof n.value=="number"?o.value=(n.value-n.min)/(n.max-n.min)*100:(s.value=(n.value[0]-n.min)/(n.max-n.min)*100,l.value=(n.value[1]-n.min)/(n.max-n.min)*100))},{immediate:!0});const v=k=>{if(!a.value)return 0;let C=(("clientX"in k?k.clientX:k.changedTouches[0].clientX)-r(a.value))/a.value.clientWidth;C=Math.max(C,0),C=Math.min(C,1);let x=C*100;const M=n.step/(n.max-n.min)*100,b=x%M;return b>0&&(b<=M/2?x=x-b:x=x-b+M),x},p=k=>{const R=v(k);u.value==="start"?s.value=R:l.value=R},g=k=>{y(k);const R=f(o.value),C=n.value,x=u.value==="start"?[R,C[1]]:[C[0],R];x[0]>x[1]&&([x[0],x[1]]=[x[1],x[0]]),i("update:value",x),document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)},y=k=>{o.value=v(k)},m=k=>{y(k);const R=f(o.value);i("update:value",R),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y),document.removeEventListener("mouseup",m),document.removeEventListener("touchend",m)},w=k=>{if(!n.disabled)if(n.range){const R=v(k);Math.abs(R-s.value)(te(),de("div",{class:nt(["slider",{disabled:k.disabled}]),ref_key:"sliderRef",ref:a,onMousedown:R[0]||(R[0]=C=>w(C))},[j("div",jD,[k.range?(te(),de(Ht,{key:1},[j("div",{class:"track",style:Se({width:`${l.value-s.value}%`,left:`${s.value}%`})},null,4),j("div",{class:"thumb",style:Se({left:`${s.value}%`}),"data-tooltip":h.value},null,12,XD),j("div",{class:"thumb",style:Se({left:`${l.value}%`}),"data-tooltip":d.value},null,12,KD)],64)):(te(),de(Ht,{key:0},[j("div",{class:"track",style:Se({width:`${o.value}%`})},null,4),j("div",{class:"thumb",style:Se({left:`${o.value}%`}),"data-tooltip":c.value},null,12,qD)],64))])],34))}}),af=Ke(YD,[["__scopeId","data-v-78364373"]]),MO=1e3,RO="click",Ei="animate__",PO=[{type:"bounce",name:"弹跳",children:[{name:"弹入",value:"bounceIn"},{name:"向右弹入",value:"bounceInLeft"},{name:"向左弹入",value:"bounceInRight"},{name:"向上弹入",value:"bounceInUp"},{name:"向下弹入",value:"bounceInDown"}]},{type:"fade",name:"浮现",children:[{name:"浮入",value:"fadeIn"},{name:"向下浮入",value:"fadeInDown"},{name:"向下长距浮入",value:"fadeInDownBig"},{name:"向右浮入",value:"fadeInLeft"},{name:"向右长距浮入",value:"fadeInLeftBig"},{name:"向左浮入",value:"fadeInRight"},{name:"向左长距浮入",value:"fadeInRightBig"},{name:"向上浮入",value:"fadeInUp"},{name:"向上长距浮入",value:"fadeInUpBig"},{name:"从左上浮入",value:"fadeInTopLeft"},{name:"从右上浮入",value:"fadeInTopRight"},{name:"从左下浮入",value:"fadeInBottomLeft"},{name:"从右下浮入",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转进入",value:"rotateIn"},{name:"绕左下进入",value:"rotateInDownLeft"},{name:"绕右下进入",value:"rotateInDownRight"},{name:"绕左上进入",value:"rotateInUpLeft"},{name:"绕右上进入",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"放大进入",value:"zoomIn"},{name:"向下放大进入",value:"zoomInDown"},{name:"从左放大进入",value:"zoomInLeft"},{name:"从右放大进入",value:"zoomInRight"},{name:"向上放大进入",value:"zoomInUp"}]},{type:"slide",name:"滑入",children:[{name:"向下滑入",value:"slideInDown"},{name:"从右滑入",value:"slideInLeft"},{name:"从左滑入",value:"slideInRight"},{name:"向上滑入",value:"slideInUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转进入",value:"flipInX"},{name:"Y轴翻转进入",value:"flipInY"}]},{type:"back",name:"放大滑入",children:[{name:"向下放大滑入",value:"backInDown"},{name:"从左放大滑入",value:"backInLeft"},{name:"从右放大滑入",value:"backInRight"},{name:"向上放大滑入",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",children:[{name:"从右飞入",value:"lightSpeedInRight"},{name:"从左飞入",value:"lightSpeedInLeft"}]}],LO=[{type:"bounce",name:"弹跳",children:[{name:"弹出",value:"bounceOut"},{name:"向左弹出",value:"bounceOutLeft"},{name:"向右弹出",value:"bounceOutRight"},{name:"向上弹出",value:"bounceOutUp"},{name:"向下弹出",value:"bounceOutDown"}]},{type:"fade",name:"浮现",children:[{name:"浮出",value:"fadeOut"},{name:"向下浮出",value:"fadeOutDown"},{name:"向下长距浮出",value:"fadeOutDownBig"},{name:"向左浮出",value:"fadeOutLeft"},{name:"向左长距浮出",value:"fadeOutLeftBig"},{name:"向右浮出",value:"fadeOutRight"},{name:"向右长距浮出",value:"fadeOutRightBig"},{name:"向上浮出",value:"fadeOutUp"},{name:"向上长距浮出",value:"fadeOutUpBig"},{name:"从左上浮出",value:"fadeOutTopLeft"},{name:"从右上浮出",value:"fadeOutTopRight"},{name:"从左下浮出",value:"fadeOutBottomLeft"},{name:"从右下浮出",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转退出",value:"rotateOut"},{name:"绕左下退出",value:"rotateOutDownLeft"},{name:"绕右下退出",value:"rotateOutDownRight"},{name:"绕左上退出",value:"rotateOutUpLeft"},{name:"绕右上退出",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"缩小退出",value:"zoomOut"},{name:"向下缩小退出",value:"zoomOutDown"},{name:"从左缩小退出",value:"zoomOutLeft"},{name:"从右缩小退出",value:"zoomOutRight"},{name:"向上缩小退出",value:"zoomOutUp"}]},{type:"slide",name:"滑出",children:[{name:"向下滑出",value:"slideOutDown"},{name:"从左滑出",value:"slideOutLeft"},{name:"从右滑出",value:"slideOutRight"},{name:"向上滑出",value:"slideOutUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转退出",value:"flipOutX"},{name:"Y轴翻转退出",value:"flipOutY"}]},{type:"back",name:"缩小滑出",children:[{name:"向下缩小滑出",value:"backOutDown"},{name:"从左缩小滑出",value:"backOutLeft"},{name:"从右缩小滑出",value:"backOutRight"},{name:"向上缩小滑出",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",children:[{name:"从右飞出",value:"lightSpeedOutRight"},{name:"从左飞出",value:"lightSpeedOutLeft"}]}],EO=[{type:"shake",name:"晃动",children:[{name:"左右摇晃",value:"shakeX"},{name:"上下摇晃",value:"shakeY"},{name:"摇头",value:"headShake"},{name:"摆动",value:"swing"},{name:"晃动",value:"wobble"},{name:"惊恐",value:"tada"},{name:"果冻",value:"jello"}]},{type:"other",name:"其他",children:[{name:"弹跳",value:"bounce"},{name:"闪烁",value:"flash"},{name:"脉搏",value:"pulse"},{name:"橡皮筋",value:"rubberBand"},{name:"心跳(快)",value:"heartBeat"}]}],ZD=[{label:"无",value:"no"},{label:"随机",value:"random"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"},{label:"左右推移(3D)",value:"slideX3D"},{label:"上下推移(3D)",value:"slideY3D"},{label:"淡入淡出",value:"fade"},{label:"旋转",value:"rotate"},{label:"上下展开",value:"scaleY"},{label:"左右展开",value:"scaleX"},{label:"放大",value:"scale"},{label:"缩小",value:"scaleReverse"}],QD={class:"title"},JD={class:"content"},eB=Ue({__name:"MoveablePanel",props:{width:{},height:{},minWidth:{default:20},minHeight:{default:20},maxWidth:{default:500},maxHeight:{default:500},left:{default:10},top:{default:10},title:{default:""},moveable:{type:Boolean,default:!0},resizeable:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:e}){const r=t,n=e,i=fe(0),a=fe(0),o=fe(0),s=fe(0),l=fe(),u=Te(()=>{var h;return s.value?s.value:((h=l.value)==null?void 0:h.clientHeight)||0});ir(()=>{r.left>=0?i.value=r.left:i.value=document.body.clientWidth+r.left-r.width,r.top>=0?a.value=r.top:a.value=document.body.clientHeight+r.top-u.value,o.value=r.width,s.value=r.height});const f=h=>{if(!r.moveable)return;let d=!0;const v=document.body.clientWidth,p=document.body.clientHeight,g=h.pageX,y=h.pageY,m=i.value,w=a.value;document.onmousemove=k=>{if(!d)return;const R=k.pageX-g,C=k.pageY-y;let x=m+R,M=w+C;x<0&&(x=0),M<0&&(M=0),x+o.value>v&&(x=v-o.value),M+u.value>p&&(M=p-u.value),i.value=x,a.value=M},document.onmouseup=()=>{d=!1,document.onmousemove=null,document.onmouseup=null}},c=h=>{if(!r.resizeable)return;let d=!0;const v=h.pageX,p=h.pageY,g=o.value,y=s.value;document.onmousemove=m=>{if(!d)return;const w=m.pageX-v,k=m.pageY-p;let R=g+w,C=y+k;Rr.maxWidth&&(R=r.maxWidth),C>r.maxHeight&&(C=r.maxHeight),o.value=R,s.value=C},document.onmouseup=()=>{d=!1,document.onmousemove=null,document.onmouseup=null}};return(h,d)=>{const v=Qe("IconClose");return te(),de("div",{class:"moveable-panel",ref_key:"moveablePanelRef",ref:l,style:Se({width:o.value+"px",height:s.value?s.value+"px":"auto",left:i.value+"px",top:a.value+"px"})},[h.title?(te(),de(Ht,{key:0},[j("div",{class:"header",onMousedown:d[1]||(d[1]=p=>f(p))},[j("div",QD,Nt(h.title),1),j("div",{class:"close-btn",onClick:d[0]||(d[0]=p=>n("close"))},[ze(v)])],32),j("div",JD,[dl(h.$slots,"default",{},void 0,!0)])],64)):(te(),de("div",{key:1,class:"content",onMousedown:d[2]||(d[2]=p=>f(p))},[dl(h.$slots,"default",{},void 0,!0)],32)),h.resizeable?(te(),de("div",{key:2,class:"resizer",onMousedown:d[3]||(d[3]=p=>c(p))},null,32)):Ge("",!0)],4)}}}),lS=Ke(eB,[["__scopeId","data-v-4a8c1601"]]),tB=(t,e,r,n)=>{const i=kt();function a(){window.parent.postMessage({type:"initPPT",content:{slidesLen:i.slides.length,isAnimationed:r.value===n.value.length}},"*")}function o(s){const{type:l,content:u}=s.data||{};l==="changePageSlide"&&(u==="prev"?t():u==="next"&&e())}a(),er([()=>i.slideIndex,r],()=>{window.parent.postMessage({type:"changeSlideIndex",content:{slideIndex:i.slideIndex,isAnimationed:r.value===n.value.length}},"*")}),ir(()=>{window.addEventListener("message",o)}),cn(()=>{window.removeEventListener("message",o)})},uS=()=>{const t=kt(),{slides:e,slideIndex:r,formatedAnimations:n}=lr(t),i=fe(0),a=fe(!1),o=fe(r.value),s=()=>{if(a.value)return;const{animations:A,autoNext:P}=n.value[i.value];i.value+=1,a.value=!0;let O=0;for(const E of A){const N=document.querySelector(`#screen-element-${E.elId} [class^=base-element-]`);if(!N){O+=1;continue}const z=`${Ei}${E.effect}`;N.style.removeProperty("--animate-duration");for(const q of N.classList)q.indexOf(Ei)!==-1&&N.classList.remove(q,`${Ei}animated`);N.style.setProperty("--animate-duration",`${E.duration}ms`),N.classList.add(z,`${Ei}animated`);const U=()=>{E.type!=="out"&&(N.style.removeProperty("--animate-duration"),N.classList.remove(z,`${Ei}animated`)),O+=1,O===A.length&&(a.value=!1,P&&s())};N.addEventListener("animationend",U,{once:!0})}};ir(()=>{const A=n.value[0];A&&A.animations.length&&A.animations.every(O=>O.trigger==="auto"||O.trigger==="meantime")&&s()});const l=()=>{i.value-=1;const{animations:A}=n.value[i.value];for(const P of A){const O=document.querySelector(`#screen-element-${P.elId} [class^=base-element-]`);if(O){O.style.removeProperty("--animate-duration");for(const E of O.classList)E.indexOf(Ei)!==-1&&O.classList.remove(E,`${Ei}animated`)}}A.every(P=>P.type==="attention")&&v()},u=fe(0),f=()=>{u.value&&(clearInterval(u.value),u.value=0)};cn(f);const c=fe(!1),h=A=>{c.value=A},d=lf.throttle(function(A){yr.success(A)},1e3,{leading:!0,trailing:!1}),v=()=>{n.value.length&&i.value>0?l():r.value>0?(t.updateSlideIndex(r.value-1),r.value{n.value.length&&i.value{f(),yr.success("开始自动放映"),u.value=setInterval(p,g.value)},m=A=>{f(),g.value=A,y()},w=lf.throttle(function(A){A.deltaY<0?v():A.deltaY>0&&p()},500,{leading:!0,trailing:!1}),k=fe(null),R=A=>{k.value={x:A.changedTouches[0].pageX,y:A.changedTouches[0].pageY}},C=A=>{if(!k.value)return;const P=Math.abs(k.value.x-A.changedTouches[0].pageX),O=A.changedTouches[0].pageY-k.value.y;Math.abs(O)>P&&Math.abs(O)>50&&(k.value=null,O>0?v():p())},x=A=>{const P=A.key.toUpperCase();P===tn.UP||P===tn.LEFT||P===tn.PAGEUP?v():(P===tn.DOWN||P===tn.RIGHT||P===tn.SPACE||P===tn.ENTER||P===tn.PAGEDOWN)&&p()};ir(()=>document.addEventListener("keydown",x)),cn(()=>document.removeEventListener("keydown",x));const M=()=>{t.updateSlideIndex(r.value-1),i.value=0},b=()=>{t.updateSlideIndex(r.value+1),i.value=0},T=A=>{t.updateSlideIndex(A),i.value=0},_=A=>{const P=e.value.findIndex(O=>O.id===A);P!==-1&&(t.updateSlideIndex(P),i.value=0)},I=Hl();return["pptScreen","mobileScreen"].includes(I.mode)&&tB(v,p,i,n),{autoPlayTimer:u,autoPlayInterval:g,setAutoPlayInterval:m,autoPlay:y,closeAutoPlay:f,loopPlay:c,setLoopPlay:h,mousewheelListener:w,touchStartListener:R,touchEndListener:C,turnPrevSlide:M,turnNextSlide:b,turnSlideToIndex:T,turnSlideToId:_,execPrev:v,execNext:p,animationIndex:i}},cS=t=>{const e=kt(),{viewportRatio:r}=lr(e),n=fe(0),i=fe(0),a=()=>{const o=(t==null?void 0:t.value)||document.body,s=o.clientWidth,l=o.clientHeight;let u,f;l/s===r.value?(u=s,f=l):l/s>r.value?(u=s,f=s*r.value):(u=l/r.value,f=l),n.value=u,i.value=f};return ir(()=>{a(),window.addEventListener("resize",a)}),cn(()=>{window.removeEventListener("resize",a)}),{slideWidth:n,slideHeight:i}},fS=()=>{const t=fe(!0),e=fe(!0),{exitScreening:r}=jl(),n=()=>{t.value=hf(),!t.value&&e.value&&r(),e.value=!0};return ir(()=>{t.value=hf(),document.addEventListener("fullscreenchange",n),document.addEventListener("webkitfullscreenchange",n)}),cn(()=>{document.removeEventListener("fullscreenchange",n),document.removeEventListener("webkitfullscreenchange",n)}),{fullscreenState:t,manualExitFullscreen:()=>{t.value&&(e.value=!1,Wy())}}},rB={class:"element-content"},nB=Ue({__name:"ScreenVideoElement",props:{elementInfo:{},needWaitAnimation:{type:Boolean}},setup(t){const{currentSlide:e}=lr(kt()),r=Vi(ka)||fe(1),n=Vi(ql)||fe(""),i=Te(()=>e.value.id===n.value);return(a,o)=>(te(),de("div",{class:"base-element-video screen-element-video",style:Se({top:a.elementInfo.top+"px",left:a.elementInfo.left+"px",width:a.elementInfo.width+"px",height:a.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${a.elementInfo.rotate}deg)`})},[j("div",rB,[i.value?(te(),He(EE,{key:0,width:a.elementInfo.width,height:a.elementInfo.height,src:a.elementInfo.src,poster:a.elementInfo.poster,autoplay:a.elementInfo.autoplay,scale:oe(r),needWaitAnimation:a.needWaitAnimation},null,8,["width","height","src","poster","autoplay","scale","needWaitAnimation"])):Ge("",!0)])],4)],4))}}),iB=Ke(nB,[["__scopeId","data-v-b0aefab8"]]),aB={class:"element-content"},oB=Ue({__name:"ScreenAudioElement",props:{elementInfo:{},needWaitAnimation:{type:Boolean}},setup(t){const e=t,{viewportRatio:r,currentSlide:n,viewportSize:i}=lr(kt()),a=Vi(ka)||fe(1),o=Vi(ql)||fe(""),s=Te(()=>n.value.id===o.value),l=Te(()=>Math.min(e.elementInfo.width,e.elementInfo.height)+"px"),u=Te(()=>{const h=i.value,d=i.value*r.value,v=280/a.value,p=50/a.value,g=e.elementInfo.width,y=e.elementInfo.height,m=e.elementInfo.left,w=e.elementInfo.top;let k=0,R=y;return m+v>=h&&(k=g-v),w+y+p>=d&&(R=-p),{left:k+"px",top:R+"px"}}),f=fe(),c=()=>{f.value&&f.value.toggle()};return(h,d)=>{const v=Qe("IconVolumeNotice");return te(),de("div",{class:"base-element-audio screen-element-audio",style:Se({top:h.elementInfo.top+"px",left:h.elementInfo.left+"px",width:h.elementInfo.width+"px",height:h.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${h.elementInfo.rotate}deg)`})},[j("div",aB,[ze(v,{class:"audio-icon",style:Se({fontSize:l.value,color:h.elementInfo.color}),onClick:d[0]||(d[0]=p=>c())},null,8,["style"]),s.value?(te(),He(KE,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:f,style:Se({...u.value}),src:h.elementInfo.src,loop:h.elementInfo.loop,autoplay:h.elementInfo.autoplay,scale:oe(a),needWaitAnimation:h.needWaitAnimation},null,8,["style","src","loop","autoplay","scale","needWaitAnimation"])):Ge("",!0)])],4)],4)}}}),sB=Ke(oB,[["__scopeId","data-v-e2703dbd"]]),lB={class:"element-content"},uB=Ue({__name:"ScreenCloudCoachElement",props:{elementInfo:{}},setup(t){const{currentSlide:e}=lr(kt()),r=Vi(ka)||fe(1),n=Vi(ql)||fe(""),i=Te(()=>e.value.id===n.value);return(a,o)=>(te(),de("div",{class:"base-element-cloudCoach screen-element-cloudCoach",style:Se({top:a.elementInfo.top+"px",left:a.elementInfo.left+"px",width:a.elementInfo.width+"px",height:a.elementInfo.height+"px"})},[j("div",{class:"rotate-wrapper",style:Se({transform:`rotate(${a.elementInfo.rotate}deg)`})},[j("div",lB,[i.value?(te(),He(oe(tD),{key:0,id:a.elementInfo.sid,width:a.elementInfo.width,height:a.elementInfo.height,scale:oe(r)},null,8,["id","width","height","scale"])):Ge("",!0)])],4)],4))}}),cB=Ke(uB,[["__scopeId","data-v-f31e8dd8"]]),fB=["id","title"],hB=Ue({__name:"ScreenElement",props:{elementInfo:{},elementIndex:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(t){const e=t,r=Te(()=>{const s={[Ot.IMAGE]:Z_,[Ot.TEXT]:Q_,[Ot.SHAPE]:J_,[Ot.LINE]:eS,[Ot.CHART]:tS,[Ot.TABLE]:rS,[Ot.LATEX]:nS,[Ot.ELF]:null},l={[Fi.AUDIO]:sB,[Fi.VIDEO]:iB,[Fi.SING_PLAY]:cB};return s[e.elementInfo.type]||l[e.elementInfo.subtype]||null}),{formatedAnimations:n,theme:i}=lr(kt()),a=Te(()=>{const s=n.value.findIndex(u=>u.animations.map(c=>c.elId).includes(e.elementInfo.id));if(s===-1||su.elId===e.elementInfo.id);return(l==null?void 0:l.type)==="in"}),o=s=>{if(s.target.tagName==="A"){e.manualExitFullscreen();return}const l=e.elementInfo.link;l&&(l.type==="web"?(e.manualExitFullscreen(),window.open(l.target)):l.type==="slide"&&e.turnSlideToId(l.target))};return(s,l)=>{var u;return te(),de("div",{class:nt(["screen-element",{link:s.elementInfo.link}]),id:`screen-element-${s.elementInfo.id}`,style:Se({zIndex:s.elementIndex,color:oe(i).fontColor,fontFamily:oe(i).fontName,fontSize:oe(i).fontSize,visibility:a.value?"hidden":"visible"}),title:((u=s.elementInfo.link)==null?void 0:u.target)||"",onClick:l[0]||(l[0]=f=>o(f))},[(te(),He(Dy(r.value),{needWaitAnimation:a.value,elementInfo:s.elementInfo},null,8,["needWaitAnimation","elementInfo"]))],14,fB)}}}),dB=Ke(hB,[["__scopeId","data-v-11f4c519"]]),vB=Ue({__name:"ScreenSlide",props:{slide:{},scale:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(t){const e=t,{viewportRatio:r,viewportSize:n}=lr(kt()),i=Te(()=>e.slide.background),{backgroundStyle:a}=Y_(i),o=Te(()=>e.slide.id);return _h(ql,o),(s,l)=>(te(),de("div",{class:"screen-slide",style:Se({width:oe(n)+"px",height:oe(n)*oe(r)+"px",transform:`scale(${s.scale})`})},[j("div",{class:"background",style:Se({...oe(a)})},null,4),(te(!0),de(Ht,null,Pr(s.slide.elements,(u,f)=>(te(),He(dB,{key:u.id,elementInfo:u,elementIndex:f+1,animationIndex:s.animationIndex,turnSlideToId:s.turnSlideToId,manualExitFullscreen:s.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"]))),128))],4))}}),pB=Ke(vB,[["__scopeId","data-v-17d2a617"]]),gB={class:"screen-slide-list"},yB=Ue({__name:"ScreenSlideList",props:{slideWidth:{},slideHeight:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(t){const e=t,{slides:r,slideIndex:n,viewportSize:i}=lr(kt()),a=Te(()=>r.value.map(s=>{let l=s.turningMode;if(l||(l="slideY"),l==="random"){const u=ZD.filter(f=>!["random","no"].includes(f.value)).map(f=>f.value);l=u[Math.floor(Math.random()*u.length)]}return{...s,turningMode:l}})),o=Te(()=>e.slideWidth/i.value);return _h(ka,o),(s,l)=>(te(),de("div",gB,[(te(!0),de(Ht,null,Pr(a.value,(u,f)=>{var c;return te(),de("div",{class:nt(["slide-item",`turning-mode-${u.turningMode}`,{current:f===oe(n),before:foe(n),hide:(f===oe(n)-1||f===oe(n)+1)&&u.turningMode!==a.value[oe(n)].turningMode}]),key:u.id},[Math.abs(oe(n)-f)<2||(c=u.animations)!=null&&c.length?(te(),de("div",{key:0,class:"slide-content",style:Se({width:s.slideWidth+"px",height:s.slideHeight+"px"})},[ze(pB,{slide:u,scale:o.value,animationIndex:s.animationIndex,turnSlideToId:s.turnSlideToId,manualExitFullscreen:s.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):Ge("",!0)],2)}),128))]))}}),hS=Ke(yB,[["__scopeId","data-v-9f9072dd"]]),mB={class:"slide-thumbnails"},_B={class:"return-button"},SB={class:"slide-thumbnails-content"},bB=["onClick"],wB=Ue({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function}},emits:["close"],setup(t,{emit:e}){const r=t,n=e,{slides:i,slideIndex:a}=lr(kt()),{slidesLoadLimit:o}=aS(),s=l=>{r.turnSlideToIndex(l),n("close")};return(l,u)=>{const f=Qe("IconArrowCircleLeft");return te(),de("div",mB,[j("div",_B,[ze(f,{class:"icon",onClick:u[0]||(u[0]=c=>n("close"))})]),j("div",SB,[(te(!0),de(Ht,null,Pr(oe(i),(c,h)=>(te(),de("div",{class:nt(["thumbnail",{active:h===oe(a)}]),key:c.id,onClick:d=>s(h)},[ze(iS,{slide:c,size:150,visible:hs.value?v.value/s.value.width:1),y=Te(()=>s.value?p.value/s.value.height:1),m=()=>{o.value&&(v.value=o.value.clientWidth,p.value=o.value.clientHeight)},w=new ResizeObserver(m);ir(()=>{o.value&&w.observe(o.value)}),cn(()=>{o.value&&w.unobserve(o.value)}),ir(()=>{!s.value||!o.value||(a=s.value.getContext("2d"),a&&(s.value.width=o.value.clientWidth,s.value.height=o.value.clientHeight,a.lineCap="round",a.lineJoin="round"))});const R=()=>{a&&(n.model==="mark"?(a.globalCompositeOperation="xor",a.globalAlpha=.5):n.model==="pen"&&(a.globalCompositeOperation="source-over",a.globalAlpha=1))};er(()=>n.model,R);const C=(z,U,q)=>{if(!a)return;const Y=l.x,Z=l.y;a.lineWidth=q,a.strokeStyle=n.color,a.beginPath(),a.moveTo(Y,Z),a.lineTo(z,U),a.stroke(),a.closePath()},x=(z,U)=>{if(!a||!s.value)return;const q=l.x,Y=l.y,Z=n.rubberSize/2,se=Z*Math.sin(Math.atan((U-Y)/(z-q))),ce=Z*Math.cos(Math.atan((U-Y)/(z-q))),J=[q+se,Y-ce],X=[q-se,Y+ce],ee=[z+se,U-ce],ue=[z-se,U+ce];a.save(),a.beginPath(),a.arc(z,U,Z,0,Math.PI*2),a.clip(),a.clearRect(0,0,s.value.width,s.value.height),a.restore(),a.save(),a.beginPath(),a.moveTo(...J),a.lineTo(...ee),a.lineTo(...ue),a.lineTo(...X),a.closePath(),a.clip(),a.clearRect(0,0,s.value.width,s.value.height),a.restore()},M=(z,U)=>{const q=l.x,Y=l.y;return Math.sqrt((z-q)*(z-q)+(U-Y)*(U-Y))},b=(z,U)=>{const Z=n.penSize,se=3,ce=z/U;let J;return ce<=.1?J=Z:ce>=10?J=se:J=Z-ce/10*Z,c===-1?J:J*1/3+c*2/3},T=(z,U)=>{const q=new Date().getTime();if(n.model==="pen"){const Y=M(z,U),Z=q-f,se=b(Y,Z);C(z,U,se),c=se}else n.model==="mark"?C(z,U,n.markSize):x(z,U);l={x:z,y:U},f=new Date().getTime()},_=z=>{if(!s.value)return[0,0];const U=z instanceof MouseEvent?z:z.changedTouches[0],q=s.value.getBoundingClientRect(),Y=U.pageX-q.x,Z=U.pageY-q.y;return[Y,Z]},I=z=>{const[U,q]=_(z),Y=U/g.value,Z=q/y.value;u=!0,l={x:Y,y:Z},f=new Date().getTime(),z instanceof MouseEvent||(h.value={x:U,y:q},d.value=!0)},A=z=>{const[U,q]=_(z),Y=U/g.value,Z=q/y.value;h.value={x:U,y:q},u&&T(Y,Z)},P=()=>{u&&(u=!1,i("end"))};return e({clearCanvas:()=>{!a||!s.value||(a.clearRect(0,0,s.value.width,s.value.height),i("end"))},getImageDataURL:()=>{var z;return(z=s.value)==null?void 0:z.toDataURL()},setImageDataURL:z=>{if(!(!a||!s.value)&&(a.clearRect(0,0,s.value.width,s.value.height),z)){a.globalCompositeOperation="source-over",a.globalAlpha=1;const U=new Image;U.src=z,U.onload=()=>{a.drawImage(U,0,0),R()}}}}),(z,U)=>{const q=Qe("IconWrite"),Y=Qe("IconHighLight");return te(),de("div",{class:"writing-board",ref_key:"writingBoardRef",ref:o},[z.blackboard?(te(),de("div",TB)):Ge("",!0),j("canvas",{class:"canvas",ref_key:"canvasRef",ref:s,style:Se({width:v.value+"px",height:p.value+"px"}),onMousedown:U[0]||(U[0]=Z=>I(Z)),onMousemove:U[1]||(U[1]=Z=>A(Z)),onMouseup:U[2]||(U[2]=Z=>P()),onTouchstart:U[3]||(U[3]=Z=>I(Z)),onTouchmove:U[4]||(U[4]=Z=>A(Z)),onTouchend:U[5]||(U[5]=Z=>{P(),d.value=!1}),onMouseleave:U[6]||(U[6]=Z=>{P(),d.value=!1}),onMouseenter:U[7]||(U[7]=Z=>d.value=!0)},null,36),d.value?(te(),de(Ht,{key:1},[z.model==="eraser"?(te(),de("div",{key:0,class:"eraser",style:Se({left:h.value.x-z.rubberSize/2+"px",top:h.value.y-z.rubberSize/2+"px",width:z.rubberSize+"px",height:z.rubberSize+"px"})},null,4)):Ge("",!0),z.model==="pen"?(te(),de("div",{key:1,class:"pen",style:Se({left:h.value.x-z.penSize/2+"px",top:h.value.y-z.penSize*6+z.penSize/2+"px",color:z.color})},[z.model==="pen"?(te(),He(q,{key:0,class:"icon",size:z.penSize*6},null,8,["size"])):Ge("",!0)],4)):Ge("",!0),z.model==="mark"?(te(),de("div",{key:2,class:"pen",style:Se({left:h.value.x-z.markSize/2+"px",top:h.value.y+"px",color:z.color})},[z.model==="mark"?(te(),He(Y,{key:0,class:"icon",size:z.markSize*1.5},null,8,["size"])):Ge("",!0)],4)):Ge("",!0)],64)):Ge("",!0)],512)}}}),IB=Ke(xB,[["__scopeId","data-v-2e998f6c"]]),Ld=t=>(Xo("data-v-05ee2be6"),t=t(),Ko(),t),AB={class:"writing-board-tool"},kB={class:"tool-content"},MB={class:"size"},RB=Ld(()=>j("div",{class:"label"},"墨迹粗细:",-1)),PB={class:"size"},LB=Ld(()=>j("div",{class:"label"},"墨迹粗细:",-1)),EB={class:"size"},DB=Ld(()=>j("div",{class:"label"},"橡皮大小:",-1)),BB={class:"colors"},OB=["onClick"],NB=Ue({__name:"WritingBoardTool",props:{slideWidth:{},slideHeight:{},left:{default:-5},top:{default:-5}},emits:["close"],setup(t,{emit:e}){const r=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],n=e,{currentSlide:i}=lr(kt()),a=fe(),o=fe("#e2534d"),s=fe("pen"),l=fe(!1),u=fe(""),f=fe(6),c=fe(24),h=fe(80),d=m=>{s.value===m?u.value=u.value===m?"":m:(u.value&&(u.value=""),s.value=m)},v=()=>{a.value.clearCanvas()},p=m=>{s.value==="eraser"&&(s.value="pen"),o.value=m},g=()=>{n("close")};er(i,()=>{ls.writingBoardImgs.where("id").equals(i.value.id).toArray().then(m=>{const w=m[0];a.value.setImageDataURL((w==null?void 0:w.dataURL)||"")})},{immediate:!0});const y=()=>{const m=a.value.getImageDataURL();m&&ls.writingBoardImgs.where("id").equals(i.value.id).toArray().then(w=>{const k=w[0];k?ls.writingBoardImgs.update(k,{dataURL:m}):ls.writingBoardImgs.add({id:i.value.id,dataURL:m})})};return(m,w)=>{const k=Qe("IconWrite"),R=Qe("IconHighLight"),C=Qe("IconErase"),x=Qe("IconClear"),M=Qe("IconFill"),b=Qe("IconClose"),T=Sh("tooltip");return te(),de("div",AB,[j("div",{class:"writing-board-wrap",style:Se({width:m.slideWidth+"px",height:m.slideHeight+"px"})},[ze(IB,{ref_key:"writingBoardRef",ref:a,color:o.value,blackboard:l.value,model:s.value,penSize:f.value,markSize:c.value,rubberSize:h.value,onEnd:w[0]||(w[0]=_=>y())},null,8,["color","blackboard","model","penSize","markSize","rubberSize"])],4),ze(lS,{class:"tools-panel",width:520,height:50,left:m.left,top:m.top,moveable:u.value===""},{default:mn(()=>[j("div",{class:"tools",onMousedown:w[10]||(w[10]=Un(()=>{},["stop"]))},[j("div",kB,[ze($u,{trigger:"manual",value:u.value==="pen"},{content:mn(()=>[j("div",MB,[RB,ze(af,{class:"size-slider",min:4,max:10,step:2,value:f.value,"onUpdate:value":w[1]||(w[1]=_=>f.value=_)},null,8,["value"])])]),default:mn(()=>[Sn((te(),de("div",{class:nt(["btn",{active:s.value==="pen"}]),onClick:w[2]||(w[2]=_=>d("pen"))},[ze(k,{class:"icon"})],2)),[[T,"画笔"]])]),_:1},8,["value"]),ze($u,{trigger:"manual",value:u.value==="mark"},{content:mn(()=>[j("div",PB,[LB,ze(af,{class:"size-slider",min:16,max:40,step:4,value:c.value,"onUpdate:value":w[3]||(w[3]=_=>c.value=_)},null,8,["value"])])]),default:mn(()=>[Sn((te(),de("div",{class:nt(["btn",{active:s.value==="mark"}]),onClick:w[4]||(w[4]=_=>d("mark"))},[ze(R,{class:"icon"})],2)),[[T,"荧光笔"]])]),_:1},8,["value"]),ze($u,{trigger:"manual",value:u.value==="eraser"},{content:mn(()=>[j("div",EB,[DB,ze(af,{class:"size-slider",min:20,max:200,step:20,value:h.value,"onUpdate:value":w[5]||(w[5]=_=>h.value=_)},null,8,["value"])])]),default:mn(()=>[Sn((te(),de("div",{class:nt(["btn",{active:s.value==="eraser"}]),onClick:w[6]||(w[6]=_=>d("eraser"))},[ze(C,{class:"icon"})],2)),[[T,"橡皮擦"]])]),_:1},8,["value"]),Sn((te(),de("div",{class:"btn",onClick:w[7]||(w[7]=_=>v())},[ze(x,{class:"icon"})])),[[T,"清除墨迹"]]),Sn((te(),de("div",{class:nt(["btn",{active:l.value}]),onClick:w[8]||(w[8]=_=>l.value=!l.value)},[ze(M,{class:"icon"})],2)),[[T,"黑板"]]),j("div",BB,[(te(),de(Ht,null,Pr(r,_=>j("div",{class:nt(["color",{active:_===o.value}]),key:_,style:Se({backgroundColor:_}),onClick:I=>p(_)},null,14,OB)),64))])]),Sn((te(),de("div",{class:"btn",onClick:w[9]||(w[9]=_=>g())},[ze(b,{class:"icon"})])),[[T,"关闭画笔"]])],32)]),_:1},8,["left","top","moveable"])])}}}),dS=Ke(NB,[["__scopeId","data-v-05ee2be6"]]),FB=t=>(Xo("data-v-52a17a32"),t=t(),Ko(),t),$B={class:"header"},zB={class:"content"},UB={class:"timer"},VB=["value","disabled"],HB=FB(()=>j("div",{class:"colon"},":",-1)),GB={class:"timer"},WB=["value","disabled"],jB=Ue({__name:"CountdownTimer",props:{left:{default:5},top:{default:5}},emits:["close"],setup(t,{emit:e}){const r=e,n=fe(null),i=fe(!1),a=fe(!1),o=fe(0),s=Te(()=>Math.floor(o.value/60)),l=Te(()=>o.value%60),u=Te(()=>!a.value||i.value),f=()=>{n.value&&clearInterval(n.value)};cn(f);const c=()=>{f(),i.value=!1},h=()=>{f(),i.value=!1,a.value?o.value=600:o.value=0},d=()=>{f(),a.value?n.value=setInterval(()=>{o.value=o.value-1,o.value<=0&&h()},1e3):n.value=setInterval(()=>{o.value=o.value+1,o.value>36e3&&c()},1e3),i.value=!0},v=()=>{i.value?c():d()},p=()=>{a.value=!a.value,h()},g=(y,m)=>{const w=y.target;let k=w.value;/^(\d)+$/.test(k)?(m==="second"&&+k>=60&&(k="59"),o.value=m==="minute"?+k*60+l.value:+k+s.value*60):w.value=us(m==="minute"?s.value:l.value,2)};return(y,m)=>{const w=Qe("IconClose");return te(),He(lS,{class:"countdown-timer",width:180,height:110,left:y.left,top:y.top},{default:mn(()=>[j("div",$B,[j("span",{class:"text-btn",onClick:m[0]||(m[0]=k=>v())},Nt(i.value?"暂停":"开始"),1),j("span",{class:"text-btn",onClick:m[1]||(m[1]=k=>h())},"重置"),j("span",{class:nt(["text-btn",{active:a.value}]),onClick:m[2]||(m[2]=k=>p())},"倒计时",2)]),j("div",zB,[j("div",UB,[j("input",{type:"text",value:oe(us)(s.value,2),maxlength:3,disabled:u.value,onMousedown:m[3]||(m[3]=Un(()=>{},["stop"])),onBlur:m[4]||(m[4]=k=>g(k,"minute")),onKeydown:[m[5]||(m[5]=Un(()=>{},["stop"])),m[6]||(m[6]=Ud(Un(k=>g(k,"minute"),["stop"]),["enter"]))]},null,40,VB)]),HB,j("div",GB,[j("input",{type:"text",value:oe(us)(l.value,2),maxlength:3,disabled:u.value,onMousedown:m[7]||(m[7]=Un(()=>{},["stop"])),onBlur:m[8]||(m[8]=k=>g(k,"second")),onKeydown:[m[9]||(m[9]=Un(()=>{},["stop"])),m[10]||(m[10]=Ud(Un(k=>g(k,"second"),["stop"]),["enter"]))]},null,40,WB)])]),j("div",{class:"close-btn",onClick:m[11]||(m[11]=k=>r("close"))},[ze(w,{class:"icon"})])]),_:1},8,["left","top"])}}}),vS=Ke(jB,[["__scopeId","data-v-52a17a32"]]),qB={key:3,class:"tools-left"},XB=Ue({__name:"BaseView",props:{changeViewMode:{type:Function}},setup(t){const e=t,{slides:r,slideIndex:n}=lr(kt()),i=Hl(),{autoPlayTimer:a,autoPlay:o,closeAutoPlay:s,autoPlayInterval:l,setAutoPlayInterval:u,loopPlay:f,setLoopPlay:c,mousewheelListener:h,touchStartListener:d,touchEndListener:v,turnPrevSlide:p,turnNextSlide:g,turnSlideToIndex:y,turnSlideToId:m,execPrev:w,execNext:k,animationIndex:R}=uS(),{slideWidth:C,slideHeight:x}=cS(),{exitScreening:M}=jl(),{fullscreenState:b,manualExitFullscreen:T}=fS();fe(!1);const _=fe(!1),I=fe(!1),A=fe(!1),P=fe(!1),O=()=>{const E=[{text:"上一页",subText:"↑ ←",disable:n.value<=0,handler:()=>p()},{text:"下一页",subText:"↓ →",disable:n.value>=r.value.length-1,handler:()=>g()},{text:"第一页",disable:n.value===0,handler:()=>y(0)},{text:"最后一页",disable:n.value===r.value.length-1,handler:()=>y(r.value.length-1)},{divider:!0},{text:a.value?"取消自动放映":"自动放映",handler:a.value?s:o,children:[{text:"2.5秒",subText:l.value===2500?"√":"",handler:()=>u(2500)},{text:"5秒",subText:l.value===5e3?"√":"",handler:()=>u(5e3)},{text:"7.5秒",subText:l.value===7500?"√":"",handler:()=>u(7500)},{text:"10秒",subText:l.value===1e4?"√":"",handler:()=>u(1e4)}]},{text:"循环放映",subText:f.value?"√":"",handler:()=>c(!f.value)},{divider:!0},{text:"查看所有幻灯片",handler:()=>A.value=!0},{text:"画笔工具",handler:()=>_.value=!0},{text:"演讲者视图",handler:()=>e.changeViewMode("presenter")},{divider:!0}];return i.mode==="pptEditor"&&E.push({text:"结束放映",subText:"ESC",handler:M}),E};return(E,N)=>{const z=Qe("IconLeftTwo"),U=Qe("IconRightTwo"),q=Sh("contextmenu");return te(),de("div",{class:nt(["base-view",{"laser-pen":P.value}])},[Sn(ze(hS,{slideWidth:oe(C),slideHeight:oe(x),animationIndex:oe(R),turnSlideToId:oe(m),manualExitFullscreen:oe(T),onWheel:N[0]||(N[0]=Y=>oe(h)(Y)),onTouchstart:N[1]||(N[1]=Y=>oe(d)(Y)),onTouchend:N[2]||(N[2]=Y=>oe(v)(Y))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[q,O]]),A.value?(te(),He(CB,{key:0,turnSlideToIndex:oe(y),onClose:N[3]||(N[3]=Y=>A.value=!1)},null,8,["turnSlideToIndex"])):Ge("",!0),_.value?(te(),He(dS,{key:1,slideWidth:oe(C),slideHeight:oe(x),onClose:N[4]||(N[4]=Y=>_.value=!1)},null,8,["slideWidth","slideHeight"])):Ge("",!0),I.value?(te(),He(vS,{key:2,onClose:N[5]||(N[5]=Y=>I.value=!1)})):Ge("",!0),oe(i).mode==="pptEditor"?(te(),de("div",qB,[ze(z,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:N[6]||(N[6]=Y=>oe(w)())}),ze(U,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:N[7]||(N[7]=Y=>oe(k)())})])):Ge("",!0)],2)}}}),KB=Ke(XB,[["__scopeId","data-v-c13d9b74"]]),Ba=t=>(Xo("data-v-1e45d89b"),t=t(),Ko(),t),YB={class:"presenter-view"},ZB={class:"toolbar"},QB=Ba(()=>j("span",null,"普通视图",-1)),JB=Ba(()=>j("span",null,"画笔",-1)),eO=Ba(()=>j("span",null,"激光笔",-1)),tO=Ba(()=>j("span",null,"计时器",-1)),rO=Ba(()=>j("span",null,"结束放映",-1)),nO={class:"content"},iO=["onClick"],aO={class:"remark"},oO={class:"header"},sO=Ba(()=>j("span",null,"演讲者备注",-1)),lO=["innerHTML"],uO={class:"remark-scale"},cO=Ue({__name:"PresenterView",props:{changeViewMode:{type:Function}},setup(t){const e=t,{slides:r,slideIndex:n,viewportRatio:i,currentSlide:a}=lr(kt()),o=fe(),s=fe(),l=fe(!1),u=fe(!1),f=fe(!1),c=Hl(),{mousewheelListener:h,touchStartListener:d,touchEndListener:v,turnPrevSlide:p,turnNextSlide:g,turnSlideToIndex:y,turnSlideToId:m,animationIndex:w}=uS(),{slideWidth:k,slideHeight:R}=cS(o),{exitScreening:C}=jl(),{slidesLoadLimit:x}=aS(),{fullscreenState:M,manualExitFullscreen:b}=fS(),T=fe(16),_=Te(()=>XS(a.value.remark||"无备注")),I=O=>{s.value&&s.value.scrollBy(O.deltaY,0)},A=O=>{O<12||O>40||(T.value=O)};er(n,()=>{BS(()=>{if(!s.value)return;const O=s.value.querySelector(".thumbnail.active");if(!O)return;const E=s.value.offsetWidth,N=O.offsetLeft;s.value.scrollTo({left:N-E/2,behavior:"smooth"})})});const P=()=>{const O=[{text:"上一页",subText:"↑ ←",disable:n.value<=0,handler:()=>p()},{text:"下一页",subText:"↓ →",disable:n.value>=r.value.length-1,handler:()=>g()},{text:"第一页",disable:n.value===0,handler:()=>y(0)},{text:"最后一页",disable:n.value===r.value.length-1,handler:()=>y(r.value.length-1)},{divider:!0},{text:"画笔工具",handler:()=>l.value=!0},{text:"普通视图",handler:()=>e.changeViewMode("base")},{divider:!0}];return c.mode==="pptEditor"&&O.push({text:"结束放映",subText:"ESC",handler:C}),O};return(O,E)=>{const N=Qe("IconListView"),z=Qe("IconWrite"),U=Qe("IconMagic"),q=Qe("IconStopwatchStart"),Y=Qe("IconOffScreenOne"),Z=Qe("IconPower"),se=Qe("IconMinus"),ce=Qe("IconPlus"),J=Sh("contextmenu");return te(),de("div",YB,[j("div",ZB,[j("div",{class:"tool-btn",onClick:E[0]||(E[0]=X=>O.changeViewMode("base"))},[ze(N,{class:"tool-icon"}),QB]),j("div",{class:nt(["tool-btn",{active:l.value}]),onClick:E[1]||(E[1]=X=>l.value=!l.value)},[ze(z,{class:"tool-icon"}),JB],2),j("div",{class:nt(["tool-btn",{active:f.value}]),onClick:E[2]||(E[2]=X=>f.value=!f.value)},[ze(U,{class:"tool-icon"}),eO],2),j("div",{class:nt(["tool-btn",{active:u.value}]),onClick:E[3]||(E[3]=X=>u.value=!u.value)},[ze(q,{class:"tool-icon"}),tO],2),oe(wn).hideFullScreen?Ge("",!0):(te(),de("div",{key:0,class:"tool-btn",onClick:E[4]||(E[4]=()=>oe(M)?oe(b)():oe(Gy)())},[oe(M)?(te(),He(Y,{key:0,class:"tool-icon"})):(te(),He(Y,{key:1,class:"tool-icon"})),j("span",null,Nt(oe(M)?"退出全屏":"全屏"),1)])),ze(nD,{class:"divider"}),oe(c).mode==="pptEditor"?(te(),de("div",{key:1,class:"tool-btn",onClick:E[5]||(E[5]=X=>oe(C)())},[ze(Z,{class:"tool-icon"}),rO])):Ge("",!0)]),j("div",nO,[j("div",{class:nt(["slide-list-wrap",{"laser-pen":f.value}]),ref_key:"slideListWrapRef",ref:o},[Sn(ze(hS,{slideWidth:oe(k),slideHeight:oe(R),animationIndex:oe(w),turnSlideToId:oe(m),manualExitFullscreen:oe(b),onWheel:E[6]||(E[6]=X=>oe(h)(X)),onTouchstart:E[7]||(E[7]=X=>oe(d)(X)),onTouchend:E[8]||(E[8]=X=>oe(v)(X))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[J,P]]),l.value?(te(),He(dS,{key:0,slideWidth:oe(k),slideHeight:oe(R),left:-365,top:-155,onClose:E[9]||(E[9]=X=>l.value=!1)},null,8,["slideWidth","slideHeight"])):Ge("",!0),u.value?(te(),He(vS,{key:1,left:75,onClose:E[10]||(E[10]=X=>u.value=!1)})):Ge("",!0)],2),j("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:s,onWheel:E[11]||(E[11]=Un(X=>I(X),["prevent"]))},[(te(!0),de(Ht,null,Pr(oe(r),(X,ee)=>(te(),de("div",{class:nt(["thumbnail",{active:ee===oe(n)}]),key:X.id,onClick:ue=>oe(y)(ee)},[ze(iS,{slide:X,size:120/oe(i),visible:eeA(T.value-2))},[ze(se)],2),j("div",{class:nt(["scale-btn",{disable:T.value===40}]),onClick:E[13]||(E[13]=X=>A(T.value+2))},[ze(ce)],2)])])])}}}),fO=Ke(cO,[["__scopeId","data-v-1e45d89b"]]),hO={class:"pptist-screen"},dO=Ue({__name:"index",setup(t){const e=fe("base"),r=a=>{e.value=a},{exitScreening:n}=jl(),i=a=>{a.key.toUpperCase()===tn.ESC&&n()};return ir(()=>document.addEventListener("keydown",i)),cn(()=>document.removeEventListener("keydown",i)),(a,o)=>(te(),de("div",hO,[e.value==="base"?(te(),He(KB,{key:0,changeViewMode:r})):e.value==="presenter"?(te(),He(fO,{key:1,changeViewMode:r})):Ge("",!0)]))}}),DO=Ke(dO,[["__scopeId","data-v-3856f8b7"]]);export{Zd as $,KE as A,tD as B,iE as C,Ot as D,Ky as E,Fi as F,Y_ as G,pO as H,nD as I,ka as J,tn as K,wn as L,TO as M,xO as N,CO as O,$u as P,IO as Q,Hd as R,aS as S,iS as T,bO as U,EE as V,us as W,af as X,Jb as Y,kO as Z,yw as _,_O as a,PO as a0,LO as a1,EO as a2,Ei as a3,MO as a4,RO as a5,ZD as a6,gO as a7,lS as a8,DO as a9,KS as aa,jl as b,SO as c,eb as d,rb as e,mO as f,By as g,uf as h,wO as i,tb as j,yO as k,Xl as l,yr as m,jy as n,Xy as o,XS as p,nw as q,Yo as r,xw as s,NS as t,AO as u,Qd as v,lE as w,sE as x,aE as y,oE as z};