var t0e=Object.defineProperty,n0e=Object.defineProperties;var i0e=Object.getOwnPropertyDescriptors;var Dy=Object.getOwnPropertySymbols;var wD=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable;var BS=(n,e)=>{if(e=Symbol[n])return e;throw Error("Symbol."+n+" is not defined")},xd=Math.pow,zS=(n,e,t)=>e in n?t0e(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,wt=(n,e)=>{for(var t in e||(e={}))wD.call(e,t)&&zS(n,t,e[t]);if(Dy)for(var t of Dy(e))TD.call(e,t)&&zS(n,t,e[t]);return n},tn=(n,e)=>n0e(n,i0e(e));var AD=(n,e)=>{var t={};for(var i in n)wD.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&Dy)for(var i of Dy(n))e.indexOf(i)<0&&TD.call(n,i)&&(t[i]=n[i]);return t};var Ni=(n,e,t)=>(zS(n,typeof e!="symbol"?e+"":e,t),t);var rn=(n,e,t)=>new Promise((i,r)=>{var a=l=>{try{s(t.next(l))}catch(u){r(u)}},o=l=>{try{s(t.throw(l))}catch(u){r(u)}},s=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,o);s((t=t.apply(n,e)).next())}),r0e=function(n,e){this[0]=n,this[1]=e};var CD=n=>{var e=n[BS("asyncIterator")],t=!1,i,r={};return e==null?(e=n[BS("iterator")](),i=a=>r[a]=o=>e[a](o)):(e=e.call(n),i=a=>r[a]=o=>{if(t){if(t=!1,a==="throw")throw o;return o}return t=!0,{done:!1,value:new r0e(new Promise(s=>{var l=e[a](o);if(!(l instanceof Object))throw TypeError("Object expected");s(l)}),1)}}),r[BS("iterator")]=()=>r,i("next"),"throw"in e?i("throw"):r.throw=a=>{throw a},"return"in e&&i("return"),r};import{_ as c_,o as Te,c as Pe,a as O,t as De,r as av,b as gn,d as Wt,w as qa,p as MD,i as M2,n as Xn,u as Tr,e as Ye,f as Bl,g as Dn,h as a0e,j as sj,k as ED,l as dl,m as PD,s as vg,q as o0e,v as Qs,x as s0e,y as pp,z as Ji,A as RD,F as bn,B as Bn,C as Uo,D as kr,E as mi,G as to,H as Kf,I as V2,J as Ws,K as wm,L as l0e,M as u0e,N as wd,O as c0e}from"./index-1782919616283.js";const M5=""+new URL("bottom-menu-arrow-big-180b7071-balabala-1782919616283.svg",import.meta.url).href,E5=""+new URL("bottom-menu-arrow-small-19304179-balabala-1782919616283.svg",import.meta.url).href;/** * @name: autofit.js * @author: Larry Zhu * @version: 3.2.8 * @description: autofit.js 是迄今为止最易用的自适应工具 * @license: MIT */let GS=null,f9="",PT="",RT="",US=null,LD=null,Oo=1,H2=!1;const d_={isAutofitRunning:!1,init(n={},e=!0){e&&console.log("autofit.js is running");const{dw:t=1920,dh:i=1080,el:r=typeof n=="string"?n:"body",resize:a=!0,ignore:o=[],transition:s="none",delay:l=0,limit:u=.1,cssMode:c="scale",allowScroll:d=!1}=n;GS=r;const h=document.querySelector(r);if(!h){console.error(`autofit: '${r}' is not exist`);return}const f=document.createElement("style"),p=document.createElement("style");f.lang="text/css",p.lang="text/css",f.id="autofit-style",p.id="ignoreStyle",!d&&(f.innerHTML="body {overflow: hidden;}");const m=document.querySelector("body");m.appendChild(f),m.appendChild(p),h.style.height=`${i}px`,h.style.width=`${t}px`,h.style.transformOrigin="0 0",!d&&(h.style.overflow="hidden"),VS(t,i,h,o,u,c),US=()=>{clearTimeout(LD),l!=0?LD=setTimeout(()=>{VS(t,i,h,o,u,c),H2&<(f9,RT,PT)},l):(VS(t,i,h,o,u,c),H2&<(f9,RT,PT))},a&&window.addEventListener("resize",US),this.isAutofitRunning=!0,setTimeout(()=>{h.style.transition=`${s}s`})},off(n="body"){try{window.removeEventListener("resize",US);const e=document.querySelector("#autofit-style");e&&e.remove();const t=document.querySelector("#ignoreStyle");t&&t.remove();const i=document.querySelector(GS||n);i&&(i.style.cssText=""),H2&&lj()}catch(e){console.error("autofit: Failed to remove normally",e)}this.isAutofitRunning=!1,console.log("autofit.js is off")},elRectification:null,scale:Oo};function LT(n,e=!0,t=1){if(!d_.isAutofitRunning){console.error("autofit.js:(elRectification): autofit has not been initialized yet");return}lj(),!n&&console.error(`autofit.js:elRectification bad selector: ${n}`),f9=n,PT=t,RT=e;const i=Array.from(document.querySelectorAll(n));if(i.length==0){console.error(`autofit.js:elRectification found no element by selector: "${n}"`);return}for(const r of i){const a=Oo==1?1:Number(Oo)*Number(t);H2||(r.originalWidth=r.clientWidth,r.originalHeight=r.clientHeight),e?(r.style.width=`${r.originalWidth*a}px`,r.style.height=`${r.originalHeight*a}px`):(r.style.width=`${100*a}%`,r.style.height=`${100*a}%`),r.style.transform=`translateZ(0) scale(${1/Number(Oo)})`,r.style.transformOrigin="0 0"}H2=!0}function lj(){if(f9){H2=!1;for(const n of Array.from(document.querySelectorAll(f9)))n.style.width="",n.style.height="",n.style.transform=""}}function VS(n,e,t,i,r,a="scale"){const o=document.documentElement.clientHeight,s=document.documentElement.clientWidth;Oo=s/or?Oo:1,d_.scale=+Oo;const l=Math.round(o/Number(Oo)),u=Math.round(s/Number(Oo));t.style.height=`${l}px`,t.style.width=`${u}px`,a==="zoom"?t.style.zoom=`${Oo}`:t.style.transform=`translateZ(0) scale(${Oo})`;const c=document.querySelector("#ignoreStyle");c.innerHTML="";for(const d of i){const h=d;let f=h.el||h.dom;if(typeof h=="string"&&(f=h),!f||typeof f=="object"&&!Object.keys(f).length){console.error(`autofit: found invalid or empty selector/object: ${f}`);continue}const p=h.scale?h.scale:1/Number(Oo),m=p!=Oo&&h.fontSize,v=p!=Oo&&h.width,g=p!=Oo&&h.height;c.innerHTML+=` ${f} { transform: scale(${p})!important; transform-origin: 0 0; ${v?`width: ${v}!important;`:""} ${g?`height: ${g}!important;`:""} }`,m&&(c.innerHTML+=` ${f} div ,${f} span,${f} a,${f} * { font-size: ${m}px; }`)}}d_.elRectification=LT;function Mc(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function uj(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}/*! * GSAP 3.14.2 * https://gsap.com * * @license Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var Il={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},ov={duration:.5,overwrite:!1,delay:0},CM,Vo,ba,S0=1e8,oa=1/S0,IT=Math.PI*2,d0e=IT/4,h0e=0,cj=Math.sqrt,f0e=Math.cos,p0e=Math.sin,Io=function(e){return typeof e=="string"},Fa=function(e){return typeof e=="function"},Vc=function(e){return typeof e=="number"},MM=function(e){return typeof e=="undefined"},Xu=function(e){return typeof e=="object"},el=function(e){return e!==!1},EM=function(){return typeof window!="undefined"},Ny=function(e){return Fa(e)||Io(e)},dj=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},cs=Array.isArray,v0e=/random\([^)]+\)/g,m0e=/,\s*/g,ID=/(?:-?\.?\d|\.)+/gi,hj=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,E2=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,HS=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,fj=/[+-]=-?[.\d]+/,g0e=/[^,'"\[\]\s]+/gi,y0e=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ma,Cu,DT,PM,Fl={},P5={},pj,vj=function(e){return(P5=sv(e,Fl))&&ol},RM=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},p9=function(e,t){return!t&&console.warn(e)},mj=function(e,t){return e&&(Fl[e]=t)&&P5&&(P5[e]=t)||Fl},v9=function(){return 0},_0e={suppressEvents:!0,isStart:!0,kill:!1},W4={suppressEvents:!0,kill:!1},S0e={suppressEvents:!0},LM={},fh=[],NT={},gj,Tl={},WS={},DD=30,j4=[],IM="",DM=function(e){var t=e[0],i,r;if(Xu(t)||Fa(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(r=j4.length;r--&&!j4[r].targetTest(t););i=j4[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new Uj(e[r],i)))||e.splice(r,1);return e},vp=function(e){return e._gsap||DM(b0(e))[0]._gsap},yj=function(e,t,i){return(i=e[t])&&Fa(i)?e[t]():MM(i)&&e.getAttribute&&e.getAttribute(t)||i},tl=function(e,t){return(e=e.split(",")).forEach(t)||e},Ha=function(e){return Math.round(e*1e5)/1e5||0},Aa=function(e){return Math.round(e*1e7)/1e7||0},W2=function(e,t){var i=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+r:i==="-"?e-r:i==="*"?e*r:e/r},b0e=function(e,t){for(var i=t.length,r=0;e.indexOf(t[r])<0&&++rs;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},h_=function(e,t,i,r){i===void 0&&(i="_first"),r===void 0&&(r="_last");var a=t._prev,o=t._next;a?a._next=o:e[i]===t&&(e[i]=o),o?o._prev=a:e[r]===t&&(e[r]=a),t._next=t._prev=t.parent=null},wh=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},mp=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},T0e=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},kT=function(e,t,i,r){return e._startAt&&(Vo?e._startAt.revert(W4):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},A0e=function n(e){return!e||e._ts&&n(e.parent)},kD=function(e){return e._repeat?lv(e._tTime,e=e.duration()+e._rDelay)*e:0},lv=function(e,t){var i=Math.floor(e=Aa(e/t));return e&&i===e?i-1:i},I5=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},f_=function(e){return e._end=Aa(e._start+(e._tDur/Math.abs(e._ts||e._rts||oa)||0))},p_=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Aa(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),f_(e),i._dirty||mp(i,e)),e},wj=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._startoa)&&t.render(i,!0)),mp(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-oa}},Lu=function(e,t,i,r){return t.parent&&wh(t),t._start=Aa((Vc(i)?i:i||e!==Ma?t0(e,i,t):e._time)+t._delay),t._end=Aa(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),xj(e,t,"_first","_last",e._sort?"_start":0),FT(t)||(e._recent=t),r||wj(e,t),e._ts<0&&p_(e,e._tTime),e},Tj=function(e,t){return(Fl.ScrollTrigger||RM("scrollTrigger",t))&&Fl.ScrollTrigger.create(t,e)},Aj=function(e,t,i,r,a){if(FM(e,t,a),!e._initted)return 1;if(!i&&e._pt&&!Vo&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&gj!==Ml.frame)return fh.push(e),e._lazy=[a,r],1},C0e=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},FT=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},M0e=function(e,t,i,r){var a=e.ratio,o=t<0||!t&&(!e._start&&C0e(e)&&!(!e._initted&&FT(e))||(e._ts<0||e._dp._ts<0)&&!FT(e))?0:1,s=e._rDelay,l=0,u,c,d;if(s&&e._repeat&&(l=v3(0,e._tDur,t),c=lv(l,s),e._yoyo&&c&1&&(o=1-o),c!==lv(e._tTime,s)&&(a=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==a||Vo||r||e._zTime===oa||!t&&e._zTime){if(!e._initted&&Aj(e,t,r,i,l))return;for(d=e._zTime,e._zTime=t||(i?oa:0),i||(i=t&&!d),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,u=e._pt;u;)u.r(o,u.d),u=u._next;t<0&&kT(e,t,i,!0),e._onUpdate&&!i&&Pl(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&Pl(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&wh(e,1),!i&&!Vo&&(Pl(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},E0e=function(e,t,i){var r;if(i>t)for(r=e._first;r&&r._start<=i;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=i;){if(r.data==="isPause"&&r._start0&&!r&&p_(e,e._tTime=e._tDur*s),e.parent&&f_(e),i||mp(e.parent,e),e},FD=function(e){return e instanceof Es?mp(e):uv(e,e._dur)},P0e={_start:0,endTime:v9,totalDuration:v9},t0=function n(e,t,i){var r=e.labels,a=e._recent||P0e,o=e.duration()>=S0?a.endTime(!1):e._dur,s,l,u;return Io(t)&&(isNaN(t)||t in r)?(l=t.charAt(0),u=t.substr(-1)==="%",s=t.indexOf("="),l==="<"||l===">"?(s>=0&&(t=t.replace(/=/,"")),(l==="<"?a._start:a.endTime(a._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(s<0?a:i).totalDuration()/100:1)):s<0?(t in r||(r[t]=o),r[t]):(l=parseFloat(t.charAt(s-1)+t.substr(s+1)),u&&i&&(l=l/100*(cs(i)?i[0]:i).totalDuration()),s>1?n(e,t.substr(0,s-1),i)+l:o+l)):t==null?o:+t},Og=function(e,t,i){var r=Vc(t[1]),a=(r?2:1)+(e<2?0:1),o=t[a],s,l;if(r&&(o.duration=t[1]),o.parent=i,e){for(s=o,l=i;l&&!("immediateRender"in s);)s=l.vars.defaults||{},l=el(l.vars.inherit)&&l.parent;o.immediateRender=el(s.immediateRender),e<2?o.runBackwards=1:o.startAt=t[a-1]}return new ro(t[0],o,t[a+1])},Bh=function(e,t){return e||e===0?t(e):t},v3=function(e,t,i){return it?t:i},ls=function(e,t){return!Io(e)||!(t=y0e.exec(e))?"":t[1]},R0e=function(e,t,i){return Bh(i,function(r){return v3(e,t,r)})},OT=[].slice,Cj=function(e,t){return e&&Xu(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Xu(e[0]))&&!e.nodeType&&e!==Cu},L0e=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(r){var a;return Io(r)&&!t||Cj(r,1)?(a=i).push.apply(a,b0(r)):i.push(r)})||i},b0=function(e,t,i){return ba&&!t&&ba.selector?ba.selector(e):Io(e)&&!i&&(DT||!cv())?OT.call((t||PM).querySelectorAll(e),0):cs(e)?L0e(e,i):Cj(e)?OT.call(e,0):e?[e]:[]},BT=function(e){return e=b0(e)[0]||p9("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return b0(t,i.querySelectorAll?i:i===e?p9("Invalid scope")||PM.createElement("div"):e)}},Mj=function(e){return e.sort(function(){return .5-Math.random()})},Ej=function(e){if(Fa(e))return e;var t=Xu(e)?e:{each:e},i=gp(t.ease),r=t.from||0,a=parseFloat(t.base)||0,o={},s=r>0&&r<1,l=isNaN(r)||s,u=t.axis,c=r,d=r;return Io(r)?c=d={center:.5,edges:.5,end:1}[r]||0:!s&&l&&(c=r[0],d=r[1]),function(h,f,p){var m=(p||t).length,v=o[m],g,_,S,x,A,C,M,I,D;if(!v){if(D=t.grid==="auto"?0:(t.grid||[1,S0])[1],!D){for(M=-S0;M<(M=p[D++].getBoundingClientRect().left)&&DM&&(M=A),Am?m-1:u?u==="y"?m/D:D:Math.max(D,m/D))||0)*(r==="edges"?-1:1),v.b=m<0?a-m:a,v.u=ls(t.amount||t.each)||0,i=i&&m<0?Bj(i):i}return m=(v[h]-v.min)/v.max||0,Aa(v.b+(i?i(m):m)*v.v)+v.u}},zT=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var r=Aa(Math.round(parseFloat(i)/e)*e*t);return(r-r%1)/t+(Vc(i)?0:ls(i))}},Pj=function(e,t){var i=cs(e),r,a;return!i&&Xu(e)&&(r=i=e.radius||S0,e.values?(e=b0(e.values),(a=!Vc(e[0]))&&(r*=r)):e=zT(e.increment)),Bh(t,i?Fa(e)?function(o){return a=e(o),Math.abs(a-o)<=r?a:o}:function(o){for(var s=parseFloat(a?o.x:o),l=parseFloat(a?o.y:0),u=S0,c=0,d=e.length,h,f;d--;)a?(h=e[d].x-s,f=e[d].y-l,h=h*h+f*f):h=Math.abs(e[d]-s),hr?a-o:o)})},m9=function(e){return e.replace(v0e,function(t){var i=t.indexOf("[")+1,r=t.substring(i||7,i?t.indexOf("]"):t.length-1).split(m0e);return Rj(i?r:+r[0],i?0:+r[1],+r[2]||1e-5)})},Ij=function(e,t,i,r,a){var o=t-e,s=r-i;return Bh(a,function(l){return i+((l-e)/o*s||0)})},O0e=function n(e,t,i,r){var a=isNaN(e+t)?0:function(f){return(1-f)*e+f*t};if(!a){var o=Io(e),s={},l,u,c,d,h;if(i===!0&&(r=1)&&(i=null),o)e={p:e},t={p:t};else if(cs(e)&&!cs(t)){for(c=[],d=e.length,h=d-2,u=1;u(s=Math.abs(s))&&(l=o,a=s);return l},Pl=function(e,t,i){var r=e.vars,a=r[t],o=ba,s=e._ctx,l,u,c;if(a)return l=r[t+"Params"],u=r.callbackScope||e,i&&fh.length&&R5(),s&&(ba=s),c=l?a.apply(u,l):a.call(u),ba=o,c},mg=function(e){return wh(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Vo),e.progress()<1&&Pl(e,"onInterrupt"),e},P2,Dj=[],Nj=function(e){if(e)if(e=!e.name&&e.default||e,EM()||e.headless){var t=e.name,i=Fa(e),r=t&&!i&&e.init?function(){this._props=[]}:e,a={init:v9,render:zM,add:kM,kill:Q0e,modifier:J0e,rawVars:0},o={targetTest:0,get:0,getSetter:BM,aliases:{},register:0};if(cv(),e!==r){if(Tl[t])return;Ol(r,Ol(L5(e,a),o)),sv(r.prototype,sv(a,L5(e,o))),Tl[r.prop=t]=r,e.targetTest&&(j4.push(r),LM[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}mj(t,r),e.register&&e.register(ol,r,nl)}else Dj.push(e)},ia=255,gg={aqua:[0,ia,ia],lime:[0,ia,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ia],navy:[0,0,128],white:[ia,ia,ia],olive:[128,128,0],yellow:[ia,ia,0],orange:[ia,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ia,0,0],pink:[ia,192,203],cyan:[0,ia,ia],transparent:[ia,ia,ia,0]},jS=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*ia+.5|0},kj=function(e,t,i){var r=e?Vc(e)?[e>>16,e>>8&ia,e&ia]:0:gg.black,a,o,s,l,u,c,d,h,f,p;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),gg[e])r=gg[e];else if(e.charAt(0)==="#"){if(e.length<6&&(a=e.charAt(1),o=e.charAt(2),s=e.charAt(3),e="#"+a+a+o+o+s+s+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&ia,r&ia,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&ia,e&ia]}else if(e.substr(0,3)==="hsl"){if(r=p=e.match(ID),!t)l=+r[0]%360/360,u=+r[1]/100,c=+r[2]/100,o=c<=.5?c*(u+1):c+u-c*u,a=c*2-o,r.length>3&&(r[3]*=1),r[0]=jS(l+1/3,a,o),r[1]=jS(l,a,o),r[2]=jS(l-1/3,a,o);else if(~e.indexOf("="))return r=e.match(hj),i&&r.length<4&&(r[3]=1),r}else r=e.match(ID)||gg.transparent;r=r.map(Number)}return t&&!p&&(a=r[0]/ia,o=r[1]/ia,s=r[2]/ia,d=Math.max(a,o,s),h=Math.min(a,o,s),c=(d+h)/2,d===h?l=u=0:(f=d-h,u=c>.5?f/(2-d-h):f/(d+h),l=d===a?(o-s)/f+(oe||g<0)&&(i+=g-t),r+=g,A=r-i,S=A-o,(S>0||_)&&(C=++d.frame,h=A-d.time*1e3,d.time=A=A/1e3,o+=S+(S>=a?4:a-S),x=1),_||(l=u(m)),x)for(f=0;f=g&&f--},_listeners:s},d}(),cv=function(){return!g9&&Ml.wake()},vr={},z0e=/^[\d.\-M][\d.\-,\s]/,G0e=/["']/g,U0e=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),r=i[0],a=1,o=i.length,s,l,u;a1&&i.config?i.config.apply(null,~e.indexOf("{")?[U0e(t[1])]:V0e(e).split(",").map(Sj)):vr._CE&&z0e.test(e)?vr._CE("",e):i},Bj=function(e){return function(t){return 1-e(1-t)}},zj=function n(e,t){for(var i=e._first,r;i;)i instanceof Es?n(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?n(i.timeline,t):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=t)),i=i._next},gp=function(e,t){return e&&(Fa(e)?e:vr[e]||H0e(e))||t},Kp=function(e,t,i,r){i===void 0&&(i=function(l){return 1-t(1-l)}),r===void 0&&(r=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var a={easeIn:t,easeOut:i,easeInOut:r},o;return tl(e,function(s){vr[s]=Fl[s]=a,vr[o=s.toLowerCase()]=i;for(var l in a)vr[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=vr[s+"."+l]=a[l]}),a},Gj=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},$S=function n(e,t,i){var r=t>=1?t:1,a=(i||(e?.3:.45))/(t<1?t:1),o=a/IT*(Math.asin(1/r)||0),s=function(c){return c===1?1:r*Math.pow(2,-10*c)*p0e((c-o)*a)+1},l=e==="out"?s:e==="in"?function(u){return 1-s(1-u)}:Gj(s);return a=IT/a,l.config=function(u,c){return n(e,u,c)},l},qS=function n(e,t){t===void 0&&(t=1.70158);var i=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?i:e==="in"?function(a){return 1-i(1-a)}:Gj(i);return r.config=function(a){return n(e,a)},r};tl("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;Kp(n+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})});vr.Linear.easeNone=vr.none=vr.Linear.easeIn;Kp("Elastic",$S("in"),$S("out"),$S());(function(n,e){var t=1/e,i=2*t,r=2.5*t,a=function(s){return s0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,uv(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,r){if(cv(),!arguments.length)return this._tTime;var a=this._dp;if(a&&a.smoothChildTiming&&this._ts){for(p_(this,i),!a._dp||a.parent||wj(a,this);a&&a.parent;)a.parent._time!==a._start+(a._ts>=0?a._tTime/a._ts:(a.totalDuration()-a._tTime)/-a._ts)&&a.totalTime(a._tTime,!0),a=a.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i0||!this._tDur&&!i)&&Lu(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===oa||!this._initted&&this._dur&&i||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),_j(this,i,r)),this},e.time=function(i,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+kD(this))%(this._dur+this._rDelay)||(i?this._dur:0),r):this._time},e.totalProgress=function(i,r){return arguments.length?this.totalTime(this.totalDuration()*i,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(i,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+kD(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,r){var a=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*a,r):this._repeat?lv(this._tTime,a)+1:1},e.timeScale=function(i,r){if(!arguments.length)return this._rts===-oa?0:this._rts;if(this._rts===i)return this;var a=this.parent&&this._ts?I5(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-oa?0:this._rts,this.totalTime(v3(-Math.abs(this._delay),this.totalDuration(),a),r!==!1),f_(this),T0e(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(cv(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==oa&&(this._tTime-=oa)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=Aa(i);var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&Lu(r,this,this._start-this._delay),this}return this._start},e.endTime=function(i){return this._start+(el(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var r=this.parent||this._dp;return r?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?I5(r.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=S0e);var r=Vo;return Vo=i,NM(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),Vo=r,this},e.globalTime=function(i){for(var r=this,a=arguments.length?i:r.rawTime();r;)a=r._start+a/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(i):a},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,FD(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var r=this._time;return this._rDelay=i,FD(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,r){return this.totalTime(t0(this,i),el(r))},e.restart=function(i,r){return this.play().totalTime(i?-this._delay:0,el(r)),this._dur||(this._zTime=-oa),this},e.play=function(i,r){return i!=null&&this.seek(i,r),this.reversed(!1).paused(!1)},e.reverse=function(i,r){return i!=null&&this.seek(i||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(i,r){return i!=null&&this.seek(i,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-oa:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-oa,this},e.isActive=function(){var i=this.parent||this._dp,r=this._start,a;return!!(!i||this._ts&&this._initted&&i.isActive()&&(a=i.rawTime(!0))>=r&&a1?(r?(o[i]=r,a&&(o[i+"Params"]=a),i==="onUpdate"&&(this._onUpdate=r)):delete o[i],this):o[i]},e.then=function(i){var r=this,a=r._prom;return new Promise(function(o){var s=Fa(i)?i:bj,l=function(){var c=r.then;r.then=null,a&&a(),Fa(s)&&(s=s(r))&&(s.then||s===r)&&(r.then=c),o(s),r.then=c};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?l():r._prom=l})},e.kill=function(){mg(this)},n}();Ol(y9.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-oa,_prom:0,_ps:!1,_rts:1});var Es=function(n){uj(e,n);function e(i,r){var a;return i===void 0&&(i={}),a=n.call(this,i)||this,a.labels={},a.smoothChildTiming=!!i.smoothChildTiming,a.autoRemoveChildren=!!i.autoRemoveChildren,a._sort=el(i.sortChildren),Ma&&Lu(i.parent||Ma,Mc(a),r),i.reversed&&a.reverse(),i.paused&&a.paused(!0),i.scrollTrigger&&Tj(Mc(a),i.scrollTrigger),a}var t=e.prototype;return t.to=function(r,a,o){return Og(0,arguments,this),this},t.from=function(r,a,o){return Og(1,arguments,this),this},t.fromTo=function(r,a,o,s){return Og(2,arguments,this),this},t.set=function(r,a,o){return a.duration=0,a.parent=this,Fg(a).repeatDelay||(a.repeat=0),a.immediateRender=!!a.immediateRender,new ro(r,a,t0(this,o),1),this},t.call=function(r,a,o){return Lu(this,ro.delayedCall(0,r,a),o)},t.staggerTo=function(r,a,o,s,l,u,c){return o.duration=a,o.stagger=o.stagger||s,o.onComplete=u,o.onCompleteParams=c,o.parent=this,new ro(r,o,t0(this,l)),this},t.staggerFrom=function(r,a,o,s,l,u,c){return o.runBackwards=1,Fg(o).immediateRender=el(o.immediateRender),this.staggerTo(r,a,o,s,l,u,c)},t.staggerFromTo=function(r,a,o,s,l,u,c,d){return s.startAt=o,Fg(s).immediateRender=el(s.immediateRender),this.staggerTo(r,a,s,l,u,c,d)},t.render=function(r,a,o){var s=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=r<=0?0:Aa(r),d=this._zTime<0!=r<0&&(this._initted||!u),h,f,p,m,v,g,_,S,x,A,C,M;if(this!==Ma&&c>l&&r>=0&&(c=l),c!==this._tTime||o||d){if(s!==this._time&&u&&(c+=this._time-s,r+=this._time-s),h=c,x=this._start,S=this._ts,g=!S,d&&(u||(s=this._zTime),(r||!a)&&(this._zTime=r)),this._repeat){if(C=this._yoyo,v=u+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(v*100+r,a,o);if(h=Aa(c%v),c===l?(m=this._repeat,h=u):(A=Aa(c/v),m=~~A,m&&m===A&&(h=u,m--),h>u&&(h=u)),A=lv(this._tTime,v),!s&&this._tTime&&A!==m&&this._tTime-A*v-this._dur<=0&&(A=m),C&&m&1&&(h=u-h,M=1),m!==A&&!this._lock){var I=C&&A&1,D=I===(C&&m&1);if(m=s&&r>=0)for(f=this._first;f;){if(p=f._next,(f._act||h>=f._start)&&f._ts&&_!==f){if(f.parent!==this)return this.render(r,a,o);if(f.render(f._ts>0?(h-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(h-f._start)*f._ts,a,o),h!==this._time||!this._ts&&!g){_=0,p&&(c+=this._zTime=-oa);break}}f=p}else{f=this._last;for(var E=r<0?r:h;f;){if(p=f._prev,(f._act||E<=f._end)&&f._ts&&_!==f){if(f.parent!==this)return this.render(r,a,o);if(f.render(f._ts>0?(E-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(E-f._start)*f._ts,a,o||Vo&&NM(f)),h!==this._time||!this._ts&&!g){_=0,p&&(c+=this._zTime=E?-oa:oa);break}}f=p}}if(_&&!a&&(this.pause(),_.render(h>=s?0:-oa)._zTime=h>=s?1:-1,this._ts))return this._start=x,f_(this),this.render(r,a,o);this._onUpdate&&!a&&Pl(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&s)&&(x===this._start||Math.abs(S)!==Math.abs(this._ts))&&(this._lock||((r||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&wh(this,1),!a&&!(r<0&&!s)&&(c||s||!l)&&(Pl(this,c===l&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c0)&&this._prom())))}return this},t.add=function(r,a){var o=this;if(Vc(a)||(a=t0(this,a,r)),!(r instanceof y9)){if(cs(r))return r.forEach(function(s){return o.add(s,a)}),this;if(Io(r))return this.addLabel(r,a);if(Fa(r))r=ro.delayedCall(0,r);else return this}return this!==r?Lu(this,r,a):this},t.getChildren=function(r,a,o,s){r===void 0&&(r=!0),a===void 0&&(a=!0),o===void 0&&(o=!0),s===void 0&&(s=-S0);for(var l=[],u=this._first;u;)u._start>=s&&(u instanceof ro?a&&l.push(u):(o&&l.push(u),r&&l.push.apply(l,u.getChildren(!0,a,o)))),u=u._next;return l},t.getById=function(r){for(var a=this.getChildren(1,1,1),o=a.length;o--;)if(a[o].vars.id===r)return a[o]},t.remove=function(r){return Io(r)?this.removeLabel(r):Fa(r)?this.killTweensOf(r):(r.parent===this&&h_(this,r),r===this._recent&&(this._recent=this._last),mp(this))},t.totalTime=function(r,a){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Aa(Ml.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),n.prototype.totalTime.call(this,r,a),this._forcing=0,this):this._tTime},t.addLabel=function(r,a){return this.labels[r]=t0(this,a),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,a,o){var s=ro.delayedCall(0,a||v9,o);return s.data="isPause",this._hasPause=1,Lu(this,s,t0(this,r))},t.removePause=function(r){var a=this._first;for(r=t0(this,r);a;)a._start===r&&a.data==="isPause"&&wh(a),a=a._next},t.killTweensOf=function(r,a,o){for(var s=this.getTweensOf(r,o),l=s.length;l--;)Zd!==s[l]&&s[l].kill(r,a);return this},t.getTweensOf=function(r,a){for(var o=[],s=b0(r),l=this._first,u=Vc(a),c;l;)l instanceof ro?b0e(l._targets,s)&&(u?(!Zd||l._initted&&l._ts)&&l.globalTime(0)<=a&&l.globalTime(l.totalDuration())>a:!a||l.isActive())&&o.push(l):(c=l.getTweensOf(s,a)).length&&o.push.apply(o,c),l=l._next;return o},t.tweenTo=function(r,a){a=a||{};var o=this,s=t0(o,r),l=a,u=l.startAt,c=l.onStart,d=l.onStartParams,h=l.immediateRender,f,p=ro.to(o,Ol({ease:a.ease||"none",lazy:!1,immediateRender:!1,time:s,overwrite:"auto",duration:a.duration||Math.abs((s-(u&&"time"in u?u.time:o._time))/o.timeScale())||oa,onStart:function(){if(o.pause(),!f){var v=a.duration||Math.abs((s-(u&&"time"in u?u.time:o._time))/o.timeScale());p._dur!==v&&uv(p,v,0,1).render(p._time,!0,!0),f=1}c&&c.apply(p,d||[])}},a));return h?p.render(0):p},t.tweenFromTo=function(r,a,o){return this.tweenTo(a,Ol({startAt:{time:t0(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),OD(this,t0(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),OD(this,t0(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+oa)},t.shiftChildren=function(r,a,o){o===void 0&&(o=0);var s=this._first,l=this.labels,u;for(r=Aa(r);s;)s._start>=o&&(s._start+=r,s._end+=r),s=s._next;if(a)for(u in l)l[u]>=o&&(l[u]+=r);return mp(this)},t.invalidate=function(r){var a=this._first;for(this._lock=0;a;)a.invalidate(r),a=a._next;return n.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var a=this._first,o;a;)o=a._next,this.remove(a),a=o;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),mp(this)},t.totalDuration=function(r){var a=0,o=this,s=o._last,l=S0,u,c,d;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(d=o.parent;s;)u=s._prev,s._dirty&&s.totalDuration(),c=s._start,c>l&&o._sort&&s._ts&&!o._lock?(o._lock=1,Lu(o,s,c-s._delay,1)._lock=0):l=c,c<0&&s._ts&&(a-=c,(!d&&!o._dp||d&&d.smoothChildTiming)&&(o._start+=Aa(c/o._ts),o._time-=c,o._tTime-=c),o.shiftChildren(-c,!1,-1/0),l=0),s._end>a&&s._ts&&(a=s._end),s=u;uv(o,o===Ma&&o._time>a?o._time:a,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(Ma._ts&&(_j(Ma,I5(r,Ma)),gj=Ml.frame),Ml.frame>=DD){DD+=Il.autoSleep||120;var a=Ma._first;if((!a||!a._ts)&&Il.autoSleep&&Ml._listeners.length<2){for(;a&&!a._ts;)a=a._next;a||Ml.sleep()}}},e}(y9);Ol(Es.prototype,{_lock:0,_hasPause:0,_forcing:0});var W0e=function(e,t,i,r,a,o,s){var l=new nl(this._pt,e,t,0,1,qj,null,a),u=0,c=0,d,h,f,p,m,v,g,_;for(l.b=i,l.e=r,i+="",r+="",(g=~r.indexOf("random("))&&(r=m9(r)),o&&(_=[i,r],o(_,e,t),i=_[0],r=_[1]),h=i.match(HS)||[];d=HS.exec(r);)p=d[0],m=r.substring(u,d.index),f?f=(f+1)%5:m.substr(-5)==="rgba("&&(f=1),p!==h[c++]&&(v=parseFloat(h[c-1])||0,l._pt={_next:l._pt,p:m||c===1?m:",",s:v,c:p.charAt(1)==="="?W2(v,p)-v:parseFloat(p)-v,m:f&&f<4?Math.round:0},u=HS.lastIndex);return l.c=u")}),x.duration();else{C={};for(I in p)I==="ease"||I==="easeEach"||X0e(I,p[I],C,p.easeEach);for(I in C)for(V=C[I].sort(function(Y,Q){return Y.t-Q.t}),F=0,A=0;Al-oa&&!c?l:ru&&(h=u)),g=this._yoyo&&p&1,g&&(x=this._yEase,h=u-h),v=lv(this._tTime,m),h===s&&!o&&this._initted&&p===v)return this._tTime=d,this;p!==v&&(S&&this._yEase&&zj(S,g),this.vars.repeatRefresh&&!g&&!this._lock&&h!==m&&this._initted&&(this._lock=o=1,this.render(Aa(m*p),!0).invalidate()._lock=0))}if(!this._initted){if(Aj(this,c?r:h,o,a,d))return this._tTime=0,this;if(s!==this._time&&!(o&&this.vars.repeatRefresh&&p!==v))return this;if(u!==this._dur)return this.render(r,a,o)}if(this._tTime=d,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=_=(x||this._ease)(h/u),this._from&&(this.ratio=_=1-_),!s&&d&&!a&&!v&&(Pl(this,"onStart"),this._tTime!==d))return this;for(f=this._pt;f;)f.r(_,f.d),f=f._next;S&&S.render(r<0?r:S._dur*S._ease(h/this._dur),a,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!a&&(c&&kT(this,r,a,o),Pl(this,"onUpdate")),this._repeat&&p!==v&&this.vars.onRepeat&&!a&&this.parent&&Pl(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(c&&!this._onUpdate&&kT(this,r,!0,!0),(r||!u)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&wh(this,1),!a&&!(c&&!s)&&(d||s||g)&&(Pl(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),n.prototype.invalidate.call(this,r)},t.resetTo=function(r,a,o,s,l){g9||Ml.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||FM(this,u),c=this._ease(u/this._dur),$0e(this,r,a,o,s,c,u,l)?this.resetTo(r,a,o,s,1):(p_(this,0),this.parent||xj(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,a){if(a===void 0&&(a="all"),!r&&(!a||a==="all"))return this._lazy=this._pt=0,this.parent?mg(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Vo),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,a,Zd&&Zd.vars.overwrite!==!0)._first||mg(this),this.parent&&o!==this.timeline.totalDuration()&&uv(this,this._dur*this.timeline._tDur/o,0,1),this}var s=this._targets,l=r?b0(r):s,u=this._ptLookup,c=this._pt,d,h,f,p,m,v,g;if((!a||a==="all")&&w0e(s,l))return a==="all"&&(this._pt=0),mg(this);for(d=this._op=this._op||[],a!=="all"&&(Io(a)&&(m={},tl(a,function(_){return m[_]=1}),a=m),a=q0e(s,a)),g=s.length;g--;)if(~l.indexOf(s[g])){h=u[g],a==="all"?(d[g]=a,p=h,f={}):(f=d[g]=d[g]||{},p=a);for(m in p)v=h&&h[m],v&&((!("kill"in v.d)||v.d.kill(m)===!0)&&h_(this,v,"_pt"),delete h[m]),f!=="all"&&(f[m]=1)}return this._initted&&!this._pt&&c&&mg(this),this},e.to=function(r,a){return new e(r,a,arguments[2])},e.from=function(r,a){return Og(1,arguments)},e.delayedCall=function(r,a,o,s){return new e(a,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:a,onReverseComplete:a,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:s})},e.fromTo=function(r,a,o){return Og(2,arguments)},e.set=function(r,a){return a.duration=0,a.repeatDelay||(a.repeat=0),new e(r,a)},e.killTweensOf=function(r,a,o){return Ma.killTweensOf(r,a,o)},e}(y9);Ol(ro.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});tl("staggerTo,staggerFrom,staggerFromTo",function(n){ro[n]=function(){var e=new Es,t=OT.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var OM=function(e,t,i){return e[t]=i},jj=function(e,t,i){return e[t](i)},Y0e=function(e,t,i,r){return e[t](r.fp,i)},K0e=function(e,t,i){return e.setAttribute(t,i)},BM=function(e,t){return Fa(e[t])?jj:MM(e[t])&&e.setAttribute?K0e:OM},$j=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},Z0e=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},qj=function(e,t){var i=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;i;)r=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+r,i=i._next;r+=t.c}t.set(t.t,t.p,r,t)},zM=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},J0e=function(e,t,i,r){for(var a=this._pt,o;a;)o=a._next,a.p===r&&a.modifier(e,t,i),a=o},Q0e=function(e){for(var t=this._pt,i,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?h_(this,t,"_pt"):t.dep||(i=1),t=r;return!i},eue=function(e,t,i,r){r.mSet(e,t,r.m.call(r.tween,i,r.mt),r)},Xj=function(e){for(var t=e._pt,i,r,a,o;t;){for(i=t._next,r=a;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:a=t,(t._next=r)?r._prev=t:o=t,t=i}e._pt=a},nl=function(){function n(t,i,r,a,o,s,l,u,c){this.t=i,this.s=a,this.c=o,this.p=r,this.r=s||$j,this.d=l||this,this.set=u||OM,this.pr=c||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(i,r,a){this.mSet=this.mSet||this.set,this.set=eue,this.m=i,this.mt=a,this.tween=r},n}();tl(IM+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(n){return LM[n]=1});Fl.TweenMax=Fl.TweenLite=ro;Fl.TimelineLite=Fl.TimelineMax=Es;Ma=new Es({sortChildren:!1,defaults:ov,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Il.stringFilter=Oj;var yp=[],$4={},tue=[],zD=0,nue=0,XS=function(e){return($4[e]||tue).map(function(t){return t()})},UT=function(){var e=Date.now(),t=[];e-zD>2&&(XS("matchMediaInit"),yp.forEach(function(i){var r=i.queries,a=i.conditions,o,s,l,u;for(s in r)o=Cu.matchMedia(r[s]).matches,o&&(l=1),o!==a[s]&&(a[s]=o,u=1);u&&(i.revert(),l&&t.push(i))}),XS("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(r){return i.add(null,r)})}),zD=e,XS("matchMedia"))},Yj=function(){function n(t,i){this.selector=i&&BT(i),this.data=[],this._r=[],this.isReverted=!1,this.id=nue++,t&&this.add(t)}var e=n.prototype;return e.add=function(i,r,a){Fa(i)&&(a=r,r=i,i=Fa);var o=this,s=function(){var u=ba,c=o.selector,d;return u&&u!==o&&u.data.push(o),a&&(o.selector=BT(a)),ba=o,d=r.apply(o,arguments),Fa(d)&&o._r.push(d),ba=u,o.selector=c,o.isReverted=!1,d};return o.last=s,i===Fa?s(o,function(l){return o.add(null,l)}):i?o[i]=s:s},e.ignore=function(i){var r=ba;ba=null,i(this),ba=r},e.getTweens=function(){var i=[];return this.data.forEach(function(r){return r instanceof n?i.push.apply(i,r.getTweens()):r instanceof ro&&!(r.parent&&r.parent.data==="nested")&&i.push(r)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,r){var a=this;if(i?function(){for(var s=a.getTweens(),l=a.data.length,u;l--;)u=a.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return s.splice(s.indexOf(c),1)}));for(s.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,d){return d.g-c.g||-1/0}).forEach(function(c){return c.t.revert(i)}),l=a.data.length;l--;)u=a.data[l],u instanceof Es?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof ro)&&u.revert&&u.revert(i);a._r.forEach(function(c){return c(i,a)}),a.isReverted=!0}():this.data.forEach(function(s){return s.kill&&s.kill()}),this.clear(),r)for(var o=yp.length;o--;)yp[o].id===this.id&&yp.splice(o,1)},e.revert=function(i){this.kill(i||{})},n}(),iue=function(){function n(t){this.contexts=[],this.scope=t,ba&&ba.data.push(this)}var e=n.prototype;return e.add=function(i,r,a){Xu(i)||(i={matches:i});var o=new Yj(0,a||this.scope),s=o.conditions={},l,u,c;ba&&!o.selector&&(o.selector=ba.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=i;for(u in i)u==="all"?c=1:(l=Cu.matchMedia(i[u]),l&&(yp.indexOf(o)<0&&yp.push(o),(s[u]=l.matches)&&(c=1),l.addListener?l.addListener(UT):l.addEventListener("change",UT)));return c&&r(o,function(d){return o.add(null,d)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(r){return r.kill(i,!0)})},n}(),D5={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i1){var r=e.map(function(c){return ol.quickSetter(c,t,i)}),a=r.length;return function(c){for(var d=a;d--;)r[d](c)}}e=e[0]||{};var o=Tl[t],s=vp(e),l=s.harness&&(s.harness.aliases||{})[t]||t,u=o?function(c){var d=new o;P2._pt=0,d.init(e,i?c+i:c,P2,0,[e]),d.render(1,d),P2._pt&&zM(1,P2)}:s.set(e,l);return o?u:function(c){return u(e,l,i?c+i:c,s,1)}},quickTo:function(e,t,i){var r,a=ol.to(e,Ol((r={},r[t]="+=0.1",r.paused=!0,r.stagger=0,r),i||{})),o=function(l,u,c){return a.resetTo(t,l,u,c)};return o.tween=a,o},isTweening:function(e){return Ma.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=gp(e.ease,ov.ease)),ND(ov,e||{})},config:function(e){return ND(Il,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,r=e.plugins,a=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(s){return s&&!Tl[s]&&!Fl[s]&&p9(t+" effect requires "+s+" plugin.")}),WS[t]=function(s,l,u){return i(b0(s),Ol(l||{},a),u)},o&&(Es.prototype[t]=function(s,l,u){return this.add(WS[t](s,Xu(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){vr[e]=gp(t)},parseEase:function(e,t){return arguments.length?gp(e,t):vr},getById:function(e){return Ma.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new Es(e),r,a;for(i.smoothChildTiming=el(e.smoothChildTiming),Ma.remove(i),i._dp=0,i._time=i._tTime=Ma._time,r=Ma._first;r;)a=r._next,(t||!(!r._dur&&r instanceof ro&&r.vars.onComplete===r._targets[0]))&&Lu(i,r,r._start-r._delay),r=a;return Lu(Ma,i,0),i},context:function(e,t){return e?new Yj(e,t):ba},matchMedia:function(e){return new iue(e)},matchMediaRefresh:function(){return yp.forEach(function(e){var t=e.conditions,i,r;for(r in t)t[r]&&(t[r]=!1,i=1);i&&e.revert()})||UT()},addEventListener:function(e,t){var i=$4[e]||($4[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=$4[e],r=i&&i.indexOf(t);r>=0&&i.splice(r,1)},utils:{wrap:k0e,wrapYoyo:F0e,distribute:Ej,random:Rj,snap:Pj,normalize:N0e,getUnit:ls,clamp:R0e,splitColor:kj,toArray:b0,selector:BT,mapRange:Ij,pipe:I0e,unitize:D0e,interpolate:O0e,shuffle:Mj},install:vj,effects:WS,ticker:Ml,updateRoot:Es.updateRoot,plugins:Tl,globalTimeline:Ma,core:{PropTween:nl,globals:mj,Tween:ro,Timeline:Es,Animation:y9,getCache:vp,_removeLinkedListItem:h_,reverting:function(){return Vo},context:function(e){return e&&ba&&(ba.data.push(e),e._ctx=ba),ba},suppressOverwrites:function(e){return CM=e}}};tl("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return D5[n]=ro[n]});Ml.add(Es.updateRoot);P2=D5.to({},{duration:0});var rue=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},aue=function(e,t){var i=e._targets,r,a,o;for(r in t)for(a=i.length;a--;)o=e._ptLookup[a][r],o&&(o=o.d)&&(o._pt&&(o=rue(o,r)),o&&o.modifier&&o.modifier(t[r],e,i[a],r))},YS=function(e,t){return{name:e,headless:1,rawVars:1,init:function(r,a,o){o._onInit=function(s){var l,u;if(Io(a)&&(l={},tl(a,function(c){return l[c]=1}),a=l),t){l={};for(u in a)l[u]=t(a[u]);a=l}aue(s,a)}}}},ol=D5.registerPlugin({name:"attr",init:function(e,t,i,r,a){var o,s,l;this.tween=i;for(o in t)l=e.getAttribute(o)||"",s=this.add(e,"setAttribute",(l||0)+"",t[o],r,a,0,0,o),s.op=o,s.b=l,this._props.push(o)},render:function(e,t){for(var i=t._pt;i;)Vo?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},YS("roundProps",zT),YS("modifiers"),YS("snap",Pj))||D5;ro.version=Es.version=ol.version="3.14.2";pj=1;EM()&&cv();vr.Power0;vr.Power1;vr.Power2;vr.Power3;vr.Power4;vr.Linear;vr.Quad;vr.Cubic;vr.Quart;vr.Quint;vr.Strong;vr.Elastic;vr.Back;vr.SteppedEase;vr.Bounce;vr.Sine;vr.Expo;vr.Circ;/*! * CSSPlugin 3.14.2 * https://gsap.com * * Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var GD,Jd,j2,GM,np,UD,UM,oue=function(){return typeof window!="undefined"},Hc={},Gf=180/Math.PI,$2=Math.PI/180,A1=Math.atan2,VD=1e8,VM=/([A-Z])/g,sue=/(left|right|width|margin|padding|x)/i,lue=/[\s,\(]\S/,Ou={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},VT=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},uue=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},cue=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},due=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},hue=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},Kj=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Zj=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},fue=function(e,t,i){return e.style[t]=i},pue=function(e,t,i){return e.style.setProperty(t,i)},vue=function(e,t,i){return e._gsap[t]=i},mue=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},gue=function(e,t,i,r,a){var o=e._gsap;o.scaleX=o.scaleY=i,o.renderTransform(a,o)},yue=function(e,t,i,r,a){var o=e._gsap;o[t]=i,o.renderTransform(a,o)},Ea="transform",il=Ea+"Origin",_ue=function n(e,t){var i=this,r=this.target,a=r.style,o=r._gsap;if(e in Hc&&a){if(this.tfm=this.tfm||{},e!=="transform")e=Ou[e]||e,~e.indexOf(",")?e.split(",").forEach(function(s){return i.tfm[s]=Rc(r,s)}):this.tfm[e]=o.x?o[e]:Rc(r,e),e===il&&(this.tfm.zOrigin=o.zOrigin);else return Ou.transform.split(",").forEach(function(s){return n.call(i,s,t)});if(this.props.indexOf(Ea)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(il,t,"")),e=Ea}(a||t)&&this.props.push(e,t,a[e])},Jj=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Sue=function(){var e=this.props,t=this.target,i=t.style,r=t._gsap,a,o;for(a=0;a=0?HD[o]:"")+e},WT=function(){oue()&&window.document&&(GD=window,Jd=GD.document,j2=Jd.documentElement,np=HT("div")||{style:{}},HT("div"),Ea=dv(Ea),il=Ea+"Origin",np.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",e$=!!dv("perspective"),UM=ol.core.reverting,GM=1)},WD=function(e){var t=e.ownerSVGElement,i=HT("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=e.cloneNode(!0),a;r.style.display="block",i.appendChild(r),j2.appendChild(i);try{a=r.getBBox()}catch(o){}return i.removeChild(r),j2.removeChild(i),a},jD=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},t$=function(e){var t,i;try{t=e.getBBox()}catch(r){t=WD(e),i=1}return t&&(t.width||t.height)||i||(t=WD(e)),t&&!t.width&&!t.x&&!t.y?{x:+jD(e,["x","cx","x1"])||0,y:+jD(e,["y","cy","y1"])||0,width:0,height:0}:t},n$=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&t$(e))},Th=function(e,t){if(t){var i=e.style,r;t in Hc&&t!==il&&(t=Ea),i.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(r==="--"?t:t.replace(VM,"-$1").toLowerCase())):i.removeAttribute(t)}},Qd=function(e,t,i,r,a,o){var s=new nl(e._pt,t,i,0,1,o?Zj:Kj);return e._pt=s,s.b=r,s.e=a,e._props.push(i),s},$D={deg:1,rad:1,turn:1},bue={grid:1,flex:1},Ah=function n(e,t,i,r){var a=parseFloat(i)||0,o=(i+"").trim().substr((a+"").length)||"px",s=np.style,l=sue.test(t),u=e.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),d=100,h=r==="px",f=r==="%",p,m,v,g;if(r===o||!a||$D[r]||$D[o])return a;if(o!=="px"&&!h&&(a=n(e,t,i,"px")),g=e.getCTM&&n$(e),(f||o==="%")&&(Hc[t]||~t.indexOf("adius")))return p=g?e.getBBox()[l?"width":"height"]:e[c],Ha(f?a/p*d:a/100*p);if(s[l?"width":"height"]=d+(h?o:r),m=r!=="rem"&&~t.indexOf("adius")||r==="em"&&e.appendChild&&!u?e:e.parentNode,g&&(m=(e.ownerSVGElement||{}).parentNode),(!m||m===Jd||!m.appendChild)&&(m=Jd.body),v=m._gsap,v&&f&&v.width&&l&&v.time===Ml.time&&!v.uncache)return Ha(a/v.width*d);if(f&&(t==="height"||t==="width")){var _=e.style[t];e.style[t]=d+r,p=e[c],_?e.style[t]=_:Th(e,t)}else(f||o==="%")&&!bue[Rl(m,"display")]&&(s.position=Rl(e,"position")),m===e&&(s.position="static"),m.appendChild(np),p=np[c],m.removeChild(np),s.position="absolute";return l&&f&&(v=vp(m),v.time=Ml.time,v.width=m[c]),Ha(h?p*a/d:p&&a?d/p*a:0)},Rc=function(e,t,i,r){var a;return GM||WT(),t in Ou&&t!=="transform"&&(t=Ou[t],~t.indexOf(",")&&(t=t.split(",")[0])),Hc[t]&&t!=="transform"?(a=S9(e,r),a=t!=="transformOrigin"?a[t]:a.svg?a.origin:k5(Rl(e,il))+" "+a.zOrigin+"px"):(a=e.style[t],(!a||a==="auto"||r||~(a+"").indexOf("calc("))&&(a=N5[t]&&N5[t](e,t,i)||Rl(e,t)||yj(e,t)||(t==="opacity"?1:0))),i&&!~(a+"").trim().indexOf(" ")?Ah(e,t,a,i)+i:a},xue=function(e,t,i,r){if(!i||i==="none"){var a=dv(t,e,1),o=a&&Rl(e,a,1);o&&o!==i?(t=a,i=o):t==="borderColor"&&(i=Rl(e,"borderTopColor"))}var s=new nl(this._pt,e.style,t,0,1,qj),l=0,u=0,c,d,h,f,p,m,v,g,_,S,x,A;if(s.b=i,s.e=r,i+="",r+="",r.substring(0,6)==="var(--"&&(r=Rl(e,r.substring(4,r.indexOf(")")))),r==="auto"&&(m=e.style[t],e.style[t]=r,r=Rl(e,t)||r,m?e.style[t]=m:Th(e,t)),c=[i,r],Oj(c),i=c[0],r=c[1],h=i.match(E2)||[],A=r.match(E2)||[],A.length){for(;d=E2.exec(r);)v=d[0],_=r.substring(l,d.index),p?p=(p+1)%5:(_.substr(-5)==="rgba("||_.substr(-5)==="hsla(")&&(p=1),v!==(m=h[u++]||"")&&(f=parseFloat(m)||0,x=m.substr((f+"").length),v.charAt(1)==="="&&(v=W2(f,v)+x),g=parseFloat(v),S=v.substr((g+"").length),l=E2.lastIndex-S.length,S||(S=S||Il.units[t]||x,l===r.length&&(r+=S,s.e+=S)),x!==S&&(f=Ah(e,t,m,S)||0),s._pt={_next:s._pt,p:_||u===1?_:",",s:f,c:g-f,m:p&&p<4||t==="zIndex"?Math.round:0});s.c=l-1;)s=a[u],Hc[s]&&(l=1,s=s==="transformOrigin"?il:Ea),Th(i,s);l&&(Th(i,Ea),o&&(o.svg&&i.removeAttribute("transform"),r.scale=r.rotate=r.translate="none",S9(i,1),o.uncache=1,Jj(r)))}},N5={clearProps:function(e,t,i,r,a){if(a.data!=="isFromStart"){var o=e._pt=new nl(e._pt,t,i,0,0,Tue);return o.u=r,o.pr=-10,o.tween=a,e._props.push(i),1}}},_9=[1,0,0,1,0,0],i$={},r$=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},XD=function(e){var t=Rl(e,Ea);return r$(t)?_9:t.substr(7).match(hj).map(Ha)},HM=function(e,t){var i=e._gsap||vp(e),r=e.style,a=XD(e),o,s,l,u;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,a=[l.a,l.b,l.c,l.d,l.e,l.f],a.join(",")==="1,0,0,1,0,0"?_9:a):(a===_9&&!e.offsetParent&&e!==j2&&!i.svg&&(l=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,s=e.nextElementSibling,j2.appendChild(e)),a=XD(e),l?r.display=l:Th(e,"display"),u&&(s?o.insertBefore(e,s):o?o.appendChild(e):j2.removeChild(e))),t&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},jT=function(e,t,i,r,a,o){var s=e._gsap,l=a||HM(e,!0),u=s.xOrigin||0,c=s.yOrigin||0,d=s.xOffset||0,h=s.yOffset||0,f=l[0],p=l[1],m=l[2],v=l[3],g=l[4],_=l[5],S=t.split(" "),x=parseFloat(S[0])||0,A=parseFloat(S[1])||0,C,M,I,D;i?l!==_9&&(M=f*v-p*m)&&(I=x*(v/M)+A*(-m/M)+(m*_-v*g)/M,D=x*(-p/M)+A*(f/M)-(f*_-p*g)/M,x=I,A=D):(C=t$(e),x=C.x+(~S[0].indexOf("%")?x/100*C.width:x),A=C.y+(~(S[1]||S[0]).indexOf("%")?A/100*C.height:A)),r||r!==!1&&s.smooth?(g=x-u,_=A-c,s.xOffset=d+(g*f+_*m)-g,s.yOffset=h+(g*p+_*v)-_):s.xOffset=s.yOffset=0,s.xOrigin=x,s.yOrigin=A,s.smooth=!!r,s.origin=t,s.originIsAbsolute=!!i,e.style[il]="0px 0px",o&&(Qd(o,s,"xOrigin",u,x),Qd(o,s,"yOrigin",c,A),Qd(o,s,"xOffset",d,s.xOffset),Qd(o,s,"yOffset",h,s.yOffset)),e.setAttribute("data-svg-origin",x+" "+A)},S9=function(e,t){var i=e._gsap||new Uj(e);if("x"in i&&!t&&!i.uncache)return i;var r=e.style,a=i.scaleX<0,o="px",s="deg",l=getComputedStyle(e),u=Rl(e,il)||"0",c,d,h,f,p,m,v,g,_,S,x,A,C,M,I,D,E,P,F,V,G,W,Y,Q,K,ae,ie,he,Ee,He,xe,Fe;return c=d=h=m=v=g=_=S=x=0,f=p=1,i.svg=!!(e.getCTM&&n$(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(r[Ea]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Ea]!=="none"?l[Ea]:"")),r.scale=r.rotate=r.translate="none"),M=HM(e,i.svg),i.svg&&(i.uncache?(K=e.getBBox(),u=i.xOrigin-K.x+"px "+(i.yOrigin-K.y)+"px",Q=""):Q=!t&&e.getAttribute("data-svg-origin"),jT(e,Q||u,!!Q||i.originIsAbsolute,i.smooth!==!1,M)),A=i.xOrigin||0,C=i.yOrigin||0,M!==_9&&(P=M[0],F=M[1],V=M[2],G=M[3],c=W=M[4],d=Y=M[5],M.length===6?(f=Math.sqrt(P*P+F*F),p=Math.sqrt(G*G+V*V),m=P||F?A1(F,P)*Gf:0,_=V||G?A1(V,G)*Gf+m:0,_&&(p*=Math.abs(Math.cos(_*$2))),i.svg&&(c-=A-(A*P+C*V),d-=C-(A*F+C*G))):(Fe=M[6],He=M[7],ie=M[8],he=M[9],Ee=M[10],xe=M[11],c=M[12],d=M[13],h=M[14],I=A1(Fe,Ee),v=I*Gf,I&&(D=Math.cos(-I),E=Math.sin(-I),Q=W*D+ie*E,K=Y*D+he*E,ae=Fe*D+Ee*E,ie=W*-E+ie*D,he=Y*-E+he*D,Ee=Fe*-E+Ee*D,xe=He*-E+xe*D,W=Q,Y=K,Fe=ae),I=A1(-V,Ee),g=I*Gf,I&&(D=Math.cos(-I),E=Math.sin(-I),Q=P*D-ie*E,K=F*D-he*E,ae=V*D-Ee*E,xe=G*E+xe*D,P=Q,F=K,V=ae),I=A1(F,P),m=I*Gf,I&&(D=Math.cos(I),E=Math.sin(I),Q=P*D+F*E,K=W*D+Y*E,F=F*D-P*E,Y=Y*D-W*E,P=Q,W=K),v&&Math.abs(v)+Math.abs(m)>359.9&&(v=m=0,g=180-g),f=Ha(Math.sqrt(P*P+F*F+V*V)),p=Ha(Math.sqrt(Y*Y+Fe*Fe)),I=A1(W,Y),_=Math.abs(I)>2e-4?I*Gf:0,x=xe?1/(xe<0?-xe:xe):0),i.svg&&(Q=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!r$(Rl(e,Ea)),Q&&e.setAttribute("transform",Q))),Math.abs(_)>90&&Math.abs(_)<270&&(a?(f*=-1,_+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,_+=_<=0?180:-180)),t=t||i.uncache,i.x=c-((i.xPercent=c&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-c)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+o,i.y=d-((i.yPercent=d&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-d)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+o,i.z=h+o,i.scaleX=Ha(f),i.scaleY=Ha(p),i.rotation=Ha(m)+s,i.rotationX=Ha(v)+s,i.rotationY=Ha(g)+s,i.skewX=_+s,i.skewY=S+s,i.transformPerspective=x+o,(i.zOrigin=parseFloat(u.split(" ")[2])||!t&&i.zOrigin||0)&&(r[il]=k5(u)),i.xOffset=i.yOffset=0,i.force3D=Il.force3D,i.renderTransform=i.svg?Cue:e$?a$:Aue,i.uncache=0,i},k5=function(e){return(e=e.split(" "))[0]+" "+e[1]},KS=function(e,t,i){var r=ls(t);return Ha(parseFloat(t)+parseFloat(Ah(e,"x",i+"px",r)))+r},Aue=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,a$(e,t)},sf="0deg",Tm="0px",lf=") ",a$=function(e,t){var i=t||this,r=i.xPercent,a=i.yPercent,o=i.x,s=i.y,l=i.z,u=i.rotation,c=i.rotationY,d=i.rotationX,h=i.skewX,f=i.skewY,p=i.scaleX,m=i.scaleY,v=i.transformPerspective,g=i.force3D,_=i.target,S=i.zOrigin,x="",A=g==="auto"&&e&&e!==1||g===!0;if(S&&(d!==sf||c!==sf)){var C=parseFloat(c)*$2,M=Math.sin(C),I=Math.cos(C),D;C=parseFloat(d)*$2,D=Math.cos(C),o=KS(_,o,M*D*-S),s=KS(_,s,-Math.sin(C)*-S),l=KS(_,l,I*D*-S+S)}v!==Tm&&(x+="perspective("+v+lf),(r||a)&&(x+="translate("+r+"%, "+a+"%) "),(A||o!==Tm||s!==Tm||l!==Tm)&&(x+=l!==Tm||A?"translate3d("+o+", "+s+", "+l+") ":"translate("+o+", "+s+lf),u!==sf&&(x+="rotate("+u+lf),c!==sf&&(x+="rotateY("+c+lf),d!==sf&&(x+="rotateX("+d+lf),(h!==sf||f!==sf)&&(x+="skew("+h+", "+f+lf),(p!==1||m!==1)&&(x+="scale("+p+", "+m+lf),_.style[Ea]=x||"translate(0, 0)"},Cue=function(e,t){var i=t||this,r=i.xPercent,a=i.yPercent,o=i.x,s=i.y,l=i.rotation,u=i.skewX,c=i.skewY,d=i.scaleX,h=i.scaleY,f=i.target,p=i.xOrigin,m=i.yOrigin,v=i.xOffset,g=i.yOffset,_=i.forceCSS,S=parseFloat(o),x=parseFloat(s),A,C,M,I,D;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=$2,u*=$2,A=Math.cos(l)*d,C=Math.sin(l)*d,M=Math.sin(l-u)*-h,I=Math.cos(l-u)*h,u&&(c*=$2,D=Math.tan(u-c),D=Math.sqrt(1+D*D),M*=D,I*=D,c&&(D=Math.tan(c),D=Math.sqrt(1+D*D),A*=D,C*=D)),A=Ha(A),C=Ha(C),M=Ha(M),I=Ha(I)):(A=d,I=h,C=M=0),(S&&!~(o+"").indexOf("px")||x&&!~(s+"").indexOf("px"))&&(S=Ah(f,"x",o,"px"),x=Ah(f,"y",s,"px")),(p||m||v||g)&&(S=Ha(S+p-(p*A+m*M)+v),x=Ha(x+m-(p*C+m*I)+g)),(r||a)&&(D=f.getBBox(),S=Ha(S+r/100*D.width),x=Ha(x+a/100*D.height)),D="matrix("+A+","+C+","+M+","+I+","+S+","+x+")",f.setAttribute("transform",D),_&&(f.style[Ea]=D)},Mue=function(e,t,i,r,a){var o=360,s=Io(a),l=parseFloat(a)*(s&&~a.indexOf("rad")?Gf:1),u=l-r,c=r+u+"deg",d,h;return s&&(d=a.split("_")[1],d==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-o)),d==="cw"&&u<0?u=(u+o*VD)%o-~~(u/o)*o:d==="ccw"&&u>0&&(u=(u-o*VD)%o-~~(u/o)*o)),e._pt=h=new nl(e._pt,t,i,r,u,uue),h.e=c,h.u="deg",e._props.push(i),h},YD=function(e,t){for(var i in t)e[i]=t[i];return e},Eue=function(e,t,i){var r=YD({},i._gsap),a="perspective,force3D,transformOrigin,svgOrigin",o=i.style,s,l,u,c,d,h,f,p;r.svg?(u=i.getAttribute("transform"),i.setAttribute("transform",""),o[Ea]=t,s=S9(i,1),Th(i,Ea),i.setAttribute("transform",u)):(u=getComputedStyle(i)[Ea],o[Ea]=t,s=S9(i,1),o[Ea]=u);for(l in Hc)u=r[l],c=s[l],u!==c&&a.indexOf(l)<0&&(f=ls(u),p=ls(c),d=f!==p?Ah(i,l,u,p):parseFloat(u),h=parseFloat(c),e._pt=new nl(e._pt,s,l,d,h-d,VT),e._pt.u=p||0,e._props.push(l));YD(s,r)};tl("padding,margin,Width,Radius",function(n,e){var t="Top",i="Right",r="Bottom",a="Left",o=(e<3?[t,i,r,a]:[t+a,t+i,r+i,r+a]).map(function(s){return e<2?n+s:"border"+s+n});N5[e>1?"border"+n:n]=function(s,l,u,c,d){var h,f;if(arguments.length<4)return h=o.map(function(p){return Rc(s,p,u)}),f=h.join(" "),f.split(h[0]).length===5?h[0]:f;h=(c+"").split(" "),f={},o.forEach(function(p,m){return f[p]=h[m]=h[m]||h[(m-1)/2|0]}),s.init(l,f,d)}});var o$={name:"css",register:WT,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,r,a){var o=this._props,s=e.style,l=i.vars.startAt,u,c,d,h,f,p,m,v,g,_,S,x,A,C,M,I,D;GM||WT(),this.styles=this.styles||Qj(e),I=this.styles.props,this.tween=i;for(m in t)if(m!=="autoRound"&&(c=t[m],!(Tl[m]&&Vj(m,t,i,r,e,a)))){if(f=typeof c,p=N5[m],f==="function"&&(c=c.call(i,r,e,a),f=typeof c),f==="string"&&~c.indexOf("random(")&&(c=m9(c)),p)p(this,e,m,c,i)&&(M=1);else if(m.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(m)+"").trim(),c+="",ph.lastIndex=0,ph.test(u)||(v=ls(u),g=ls(c),g?v!==g&&(u=Ah(e,m,u,g)+g):v&&(c+=v)),this.add(s,"setProperty",u,c,r,a,0,0,m),o.push(m),I.push(m,0,s[m]);else if(f!=="undefined"){if(l&&m in l?(u=typeof l[m]=="function"?l[m].call(i,r,e,a):l[m],Io(u)&&~u.indexOf("random(")&&(u=m9(u)),ls(u+"")||u==="auto"||(u+=Il.units[m]||ls(Rc(e,m))||""),(u+"").charAt(1)==="="&&(u=Rc(e,m))):u=Rc(e,m),h=parseFloat(u),_=f==="string"&&c.charAt(1)==="="&&c.substr(0,2),_&&(c=c.substr(2)),d=parseFloat(c),m in Ou&&(m==="autoAlpha"&&(h===1&&Rc(e,"visibility")==="hidden"&&d&&(h=0),I.push("visibility",0,s.visibility),Qd(this,s,"visibility",h?"inherit":"hidden",d?"inherit":"hidden",!d)),m!=="scale"&&m!=="transform"&&(m=Ou[m],~m.indexOf(",")&&(m=m.split(",")[0]))),S=m in Hc,S){if(this.styles.save(m),D=c,f==="string"&&c.substring(0,6)==="var(--"){if(c=Rl(e,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var E=e.style.perspective;e.style.perspective=c,c=Rl(e,"perspective"),E?e.style.perspective=E:Th(e,"perspective")}d=parseFloat(c)}if(x||(A=e._gsap,A.renderTransform&&!t.parseTransform||S9(e,t.parseTransform),C=t.smoothOrigin!==!1&&A.smooth,x=this._pt=new nl(this._pt,s,Ea,0,1,A.renderTransform,A,0,-1),x.dep=1),m==="scale")this._pt=new nl(this._pt,A,"scaleY",A.scaleY,(_?W2(A.scaleY,_+d):d)-A.scaleY||0,VT),this._pt.u=0,o.push("scaleY",m),m+="X";else if(m==="transformOrigin"){I.push(il,0,s[il]),c=wue(c),A.svg?jT(e,c,0,C,0,this):(g=parseFloat(c.split(" ")[2])||0,g!==A.zOrigin&&Qd(this,A,"zOrigin",A.zOrigin,g),Qd(this,s,m,k5(u),k5(c)));continue}else if(m==="svgOrigin"){jT(e,c,1,C,0,this);continue}else if(m in i$){Mue(this,A,m,h,_?W2(h,_+c):c);continue}else if(m==="smoothOrigin"){Qd(this,A,"smooth",A.smooth,c);continue}else if(m==="force3D"){A[m]=c;continue}else if(m==="transform"){Eue(this,c,e);continue}}else m in s||(m=dv(m)||m);if(S||(d||d===0)&&(h||h===0)&&!lue.test(c)&&m in s)v=(u+"").substr((h+"").length),d||(d=0),g=ls(c)||(m in Il.units?Il.units[m]:v),v!==g&&(h=Ah(e,m,u,g)),this._pt=new nl(this._pt,S?A:s,m,h,(_?W2(h,_+d):d)-h,!S&&(g==="px"||m==="zIndex")&&t.autoRound!==!1?hue:VT),this._pt.u=g||0,S&&D!==c?(this._pt.b=u,this._pt.e=D,this._pt.r=due):v!==g&&g!=="%"&&(this._pt.b=u,this._pt.r=cue);else if(m in s)xue.call(this,e,m,u,_?_+c:c);else if(m in e)this.add(e,m,u||e[m],_?_+c:c,r,a);else if(m!=="parseTransform"){RM(m,c);continue}S||(m in s?I.push(m,0,s[m]):typeof e[m]=="function"?I.push(m,2,e[m]()):I.push(m,1,u||e[m])),o.push(m)}}M&&Xj(this)},render:function(e,t){if(t.tween._time||!UM())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:Rc,aliases:Ou,getSetter:function(e,t,i){var r=Ou[t];return r&&r.indexOf(",")<0&&(t=r),t in Hc&&t!==il&&(e._gsap.x||Rc(e,"x"))?i&&UD===i?t==="scale"?mue:vue:(UD=i||{})&&(t==="scale"?gue:yue):e.style&&!MM(e.style[t])?fue:~t.indexOf("-")?pue:BM(e,t)},core:{_removeProperty:Th,_getMatrix:HM}};ol.utils.checkPrefix=dv;ol.core.getStyleSaver=Qj;(function(n,e,t,i){var r=tl(n+","+e+","+t,function(a){Hc[a]=1});tl(e,function(a){Il.units[a]="deg",i$[a]=1}),Ou[r[13]]=n+","+e,tl(i,function(a){var o=a.split(":");Ou[o[1]]=r[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");tl("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){Il.units[n]="px"});ol.registerPlugin(o$);var ka=ol.registerPlugin(o$)||ol;ka.core.Tween;const Pue={name:"SvglineAnimation",props:{width:{type:Number,default:135},height:{type:Number,default:150},path:{type:String,default:"M0 72.5H682L732 0.5H3082"},color:{type:String,default:"#0091FF"},duration:{type:Number,default:3},length:{type:Number,default:100},begin:{type:Number,default:0},dir:{type:Array,default:()=>[0,1]},strokeWidth:{type:Number,default:4}},data(){let n=1;return{maskId:"svgline-"+n,radialGradientId:"radialGradient-"+n}},mounted(){let n=this._.uid;this.maskId="svgline-"+n,this.radialGradientId="radialGradient-"+n}},Rue={class:"svg-line-animation"},Lue=["viewBox"],Iue=["id"],Due=["stop-opacity"],Nue=["stop-opacity"],kue=["id"],Fue=["r","fill"],Oue=["begin","dur","path","keyPoints"],Bue=["d","stroke","stroke-width","mask"];function zue(n,e,t,i,r,a){return Te(),Pe("div",Rue,[(Te(),Pe("svg",{width:"100%",height:"100%",viewBox:`0 0 ${t.width} ${t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[O("defs",null,[O("radialGradient",{id:r.radialGradientId,cx:"50%",cy:"50%",fx:"100%",fy:"50%",r:"50%"},[O("stop",{offset:"0%","stop-color":"#fff","stop-opacity":t.dir[1]},null,8,Due),O("stop",{offset:"100%","stop-color":"#fff","stop-opacity":t.dir[0]},null,8,Nue)],8,Iue),O("mask",{id:r.maskId},[O("circle",{r:t.length,cx:"0",cy:"0",fill:`url(#${r.radialGradientId})`},[O("animateMotion",{begin:`${t.begin}s`,dur:`${t.duration}s`,path:t.path,rotate:"auto",keyPoints:`${t.dir[0]};${t.dir[1]}`,keyTimes:"0;1",repeatCount:"indefinite"},null,8,Oue)],8,Fue)],8,kue)]),O("path",{class:"path-line",d:t.path,stroke:t.color,"stroke-width":t.strokeWidth,mask:`url(#${r.maskId})`},null,8,Bue)],8,Lue))])}const F5=c_(Pue,[["render",zue]]);const Gue={class:"m-header"},Uue={class:"m-header-wrap"},Vue={class:"m-header-title"},Hue={class:"m-header-subtext"},Wue={class:"m-header-left",style:{color:"#fff"}},jue={class:"m-header-right"},$ue={class:"m-header-line"},que={__name:"index",props:{title:{type:String,default:"红原县数字畜牧业监管平台"},subText:{type:String,default:"Hongyuan Digital Animal Husbandry Supervision Platform"}},setup(n){return(e,t)=>(Te(),Pe("div",Gue,[O("div",Uue,[O("div",Vue,De(n.title),1),O("div",Hue,De(n.subText),1)]),O("div",Wue,[av(e.$slots,"left")]),O("div",jue,[av(e.$slots,"right")]),O("div",$ue,[gn(F5,{class:"m-header-line-left",width:961,height:79,color:"#30DCFF",strokeWidth:2,dir:[0,1],length:100,path:"M1 1.52783L535 25.6808C552.73 26.5835 571.454 31.3851 588.834 39.2194C593.758 41.4385 598.692 43.7289 603.643 46.0273C633.567 59.9182 664.121 74.1016 696.754 74.6262C696.765 74.6264 696.775 74.6265 696.786 74.6267C821.602 76.5993 879.336 78 961 78"}),gn(F5,{class:"m-header-line-right",width:961,height:79,color:"#30DCFF",strokeWidth:2,dir:[0,1],length:100,path:"M1 1.52783L535 25.6808C552.73 26.5835 571.454 31.3851 588.834 39.2194C593.758 41.4385 598.692 43.7289 603.643 46.0273C633.567 59.9182 664.121 74.1016 696.754 74.6262C696.765 74.6264 696.775 74.6265 696.786 74.6267C821.602 76.5993 879.336 78 961 78"})])]))}};const Xue={class:"m-menu"},Yue={__name:"index",props:{defaultActive:{type:[String,Number],default:""}},emits:["select"],setup(n,{emit:e}){const t=e,i=n,r=Wt(i.defaultActive);return MD("updateActive",o=>{r.value=o,t("select",o)}),MD("activeIndex",r),qa(()=>i.defaultActive,o=>{o!==r.value&&(r.value=o)}),(o,s)=>(Te(),Pe("div",Xue,[av(o.$slots,"default")]))}},Kue={__name:"index",props:{index:{type:[String,Number],required:!0}},setup(n){const e=n,t=M2("updateActive"),i=M2("activeIndex"),r=()=>{t(e.index)};return(a,o)=>(Te(),Pe("div",{class:Xn(["m-menu-item",{"is-active":n.index===Tr(i)}]),onClick:r},[av(a.$slots,"default")],2))}};let KD=0;const ZD="webkit moz ms o".split(" ");let Mu,Eu;const Zue=typeof window=="undefined";if(Zue)Mu=function(){},Eu=function(){};else{Mu=window.requestAnimationFrame,Eu=window.cancelAnimationFrame;let n;for(let e=0;e{e(t+i)},i);return KD=t+i,r},Eu=function(e){window.clearTimeout(e)})}const Jue={props:{startVal:{type:Number,required:!1,default:0},endVal:{type:Number,required:!1,default:2017},duration:{type:Number,required:!1,default:3e3},autoplay:{type:Boolean,required:!1,default:!0},decimals:{type:Number,required:!1,default:0,validator(n){return n>=0}},decimal:{type:String,required:!1,default:"."},separator:{type:String,required:!1,default:","},prefix:{type:String,required:!1,default:""},suffix:{type:String,required:!1,default:""},useEasing:{type:Boolean,required:!1,default:!0},easingFn:{type:Function,default(n,e,t,i){return t*(-Math.pow(2,-10*n/i)+1)*1024/1023+e}}},data(){return{localStartVal:this.startVal,displayValue:this.formatNumber(this.startVal),printVal:null,paused:!1,localDuration:this.duration,startTime:null,timestamp:null,remaining:null,rAF:null}},computed:{countDown(){return this.startVal>this.endVal}},watch:{startVal(){this.autoplay&&this.start()},endVal(){this.autoplay&&this.start()}},mounted(){this.autoplay&&this.start(),this.$emit("mountedCallback")},methods:{start(){this.localStartVal=this.startVal,this.startTime=null,this.localDuration=this.duration,this.paused=!1,this.rAF=Mu(this.count)},pauseResume(){this.paused?(this.resume(),this.paused=!1):(this.pause(),this.paused=!0)},pause(){Eu(this.rAF)},resume(){this.startTime=null,this.localDuration=+this.remaining,this.localStartVal=+this.printVal,Mu(this.count)},reset(){this.startTime=null,Eu(this.rAF),this.displayValue=this.formatNumber(this.startVal)},count(n){this.startTime||(this.startTime=n),this.timestamp=n;const e=n-this.startTime;this.remaining=this.localDuration-e,this.useEasing?this.countDown?this.printVal=this.localStartVal-this.easingFn(e,0,this.localStartVal-this.endVal,this.localDuration):this.printVal=this.easingFn(e,this.localStartVal,this.endVal-this.localStartVal,this.localDuration):this.countDown?this.printVal=this.localStartVal-(this.localStartVal-this.endVal)*(e/this.localDuration):this.printVal=this.localStartVal+(this.endVal-this.localStartVal)*(e/this.localDuration),this.countDown?this.printVal=this.printValthis.endVal?this.endVal:this.printVal,this.displayValue=this.formatNumber(this.printVal),e1?this.decimal+e[1]:"",r=/(\d+)(\d{3})/;if(this.separator&&!this.isNumber(this.separator))for(;r.test(t);)t=t.replace(r,"$1"+this.separator+"$2");return this.prefix+t+i+this.suffix}},destroyed(){Eu(this.rAF)}};function Que(n,e,t,i,r,a){return Te(),Pe("span",null,De(r.displayValue),1)}const s$=c_(Jue,[["render",Que]]);typeof window!="undefined"&&window.Vue&&window.Vue.component("count-to",s$);const ece={class:"count-card-left"},tce={class:"count-card-title"},nce={class:"title-zh"},ice={key:0,class:"title-en"},rce={class:"count-card-right"},ace={class:"unit"},oce={__name:"index",props:{info:{type:Object,default:()=>({icon:"xiaoshoujine",zh:"2023年销售金额",en:"Sales amount in 2023",value:9500,unit:"万元",decimals:0})}},setup(n){const e=n,t=Wt(!0),i=Wt(!1),r=Wt(0);let a=null;const o=Ye(()=>e.info.duration||1800);qa(()=>[e.info.value,e.info.zh],()=>{a&&window.clearTimeout(a),t.value=!0,i.value=!1,r.value+=1},{immediate:!0});function s(c){return c.toUpperCase()}function l(){t.value=!0,i.value=!1}function u(){t.value=!1,i.value=!0,a&&window.clearTimeout(a),a=window.setTimeout(()=>{i.value=!1},900)}return Bl(()=>{a&&window.clearTimeout(a)}),(c,d)=>(Te(),Pe("div",{class:Xn(["count-card",{"is-counting":t.value,"is-settled":i.value}])},[O("div",ece,[O("div",{class:Xn(["count-card-icon","icon-"+n.info.icon])},null,2),O("div",tce,[O("div",nce,De(n.info.zh),1),n.info.en?(Te(),Pe("div",ice,De(s(n.info.en)),1)):Dn("",!0)])]),O("div",rce,[(Te(),Pe("div",{class:"value",key:r.value},[gn(Tr(s$),{startVal:0,endVal:n.info.value,decimals:n.info.decimals,duration:o.value,separator:"",autoplay:!0,onMountedCallback:l,onCallback:u},null,8,["endVal","decimals","duration"])])),O("div",ace,De(n.info.unit),1)])],2))}};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var $T=function(n,e){return $T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},$T(n,e)};function ot(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");$T(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var sce=function(){function n(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return n}(),lce=function(){function n(){this.browser=new sce,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window!="undefined"}return n}(),Gd=new lce;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Gd.wxa=!0,Gd.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?Gd.worker=!0:!Gd.hasGlobalWindow||"Deno"in window?(Gd.node=!0,Gd.svgSupported=!0):uce(navigator.userAgent,Gd);function uce(n,e){var t=e.browser,i=n.match(/Firefox\/([\d.]+)/),r=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/.+?rv:(([\d.]+))/),a=n.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(n);i&&(t.firefox=!0,t.version=i[1]),r&&(t.ie=!0,t.version=r[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect!="undefined",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document!="undefined";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}const qi=Gd;var WM=12,l$="sans-serif",Ch=WM+"px "+l$,cce=20,dce=100,hce="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function fce(n){var e={};if(typeof JSON=="undefined")return e;for(var t=0;t=0)s=o*t.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",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),n.appendChild(o),t.push(o)}return t}function Fce(n,e,t){for(var i=t?"invTrans":"trans",r=e[i],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=n[u].getBoundingClientRect(),d=2*u,h=c.left,f=c.top;o.push(h,f),l=l&&a&&h===a[d]&&f===a[d+1],s.push(n[u].offsetLeft,n[u].offsetTop)}return l&&r?r:(e.srcCoords=o,e[i]=t?tN(s,o):tN(o,s))}function v$(n){return n.nodeName.toUpperCase()==="CANVAS"}var Oce=/([&<>"'])/g,Bce={"&":"&","<":"<",">":">",'"':""","'":"'"};function os(n){return n==null?"":(n+"").replace(Oce,function(e,t){return Bce[t]})}var zce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,JS=[],Gce=qi.browser.firefox&&+qi.browser.version.split(".")[0]<39;function QT(n,e,t,i){return t=t||{},i?iN(n,e,t):Gce&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):iN(n,e,t),t}function iN(n,e,t){if(qi.domSupported&&n.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(v$(n)){var a=n.getBoundingClientRect();t.zrX=i-a.left,t.zrY=r-a.top;return}else if(JT(JS,n,i,r)){t.zrX=JS[0],t.zrY=JS[1];return}}t.zrX=t.zrY=0}function ZM(n){return n||window.event}function o0(n,e,t){if(e=ZM(e),e.zrX!=null)return e;var i=e.type,r=i&&i.indexOf("touch")>=0;if(r){var o=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&QT(n,o,e,t)}else{QT(n,e,e,t);var a=Uce(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&zce.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Uce(n){var e=n.wheelDelta;if(e)return e;var t=n.deltaX,i=n.deltaY;if(t==null||i==null)return e;var r=Math.abs(i!==0?i:t),a=i>0?-1:i<0?1:t>0?-1:1;return 3*r*a}function eA(n,e,t,i){n.addEventListener(e,t,i)}function Vce(n,e,t,i){n.removeEventListener(e,t,i)}var Wc=function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0};function rN(n){return n.which===2||n.which===3}var Hce=function(){function n(){this._track=[]}return n.prototype.recognize=function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},n.prototype.clear=function(){return this._track.length=0,this},n.prototype._doTrack=function(e,t,i){var r=e.touches;if(r){for(var a={points:[],touches:[],target:t,event:e},o=0,s=r.length;o1&&i&&i.length>1){var a=aN(i)/aN(r);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Wce(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:n[0].target,event:e}}}}};function Dl(){return[1,0,0,1,0,0]}function y_(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,n}function JM(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n}function Bc(n,e,t){var i=e[0]*t[0]+e[2]*t[1],r=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return n[0]=i,n[1]=r,n[2]=a,n[3]=o,n[4]=s,n[5]=l,n}function Ku(n,e,t){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4]+t[0],n[5]=e[5]+t[1],n}function Jp(n,e,t,i){i===void 0&&(i=[0,0]);var r=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),d=Math.cos(t);return n[0]=r*d+s*c,n[1]=-r*c+s*d,n[2]=a*d+l*c,n[3]=-a*c+d*l,n[4]=d*(o-i[0])+c*(u-i[1])+i[0],n[5]=d*(u-i[1])-c*(o-i[0])+i[1],n}function QM(n,e,t){var i=t[0],r=t[1];return n[0]=e[0]*i,n[1]=e[1]*r,n[2]=e[2]*i,n[3]=e[3]*r,n[4]=e[4]*i,n[5]=e[5]*r,n}function Bv(n,e){var t=e[0],i=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*i;return l?(l=1/l,n[0]=o*l,n[1]=-a*l,n[2]=-i*l,n[3]=t*l,n[4]=(i*s-o*r)*l,n[5]=(a*r-t*s)*l,n):null}function jce(n){var e=Dl();return JM(e,n),e}var $ce=function(){function n(e,t){this.x=e||0,this.y=t||0}return n.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.set=function(e,t){return this.x=e,this.y=t,this},n.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},n.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},n.prototype.scale=function(e){this.x*=e,this.y*=e},n.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},n.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},n.prototype.dot=function(e){return this.x*e.x+this.y*e.y},n.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},n.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},n.prototype.distance=function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},n.prototype.distanceSquare=function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},n.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},n.prototype.transform=function(e){if(e){var t=this.x,i=this.y;return this.x=e[0]*t+e[2]*i+e[4],this.y=e[1]*t+e[3]*i+e[5],this}},n.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},n.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},n.set=function(e,t,i){e.x=t,e.y=i},n.copy=function(e,t){e.x=t.x,e.y=t.y},n.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},n.lenSquare=function(e){return e.x*e.x+e.y*e.y},n.dot=function(e,t){return e.x*t.x+e.y*t.y},n.add=function(e,t,i){e.x=t.x+i.x,e.y=t.y+i.y},n.sub=function(e,t,i){e.x=t.x-i.x,e.y=t.y-i.y},n.scale=function(e,t,i){e.x=t.x*i,e.y=t.y*i},n.scaleAndAdd=function(e,t,i,r){e.x=t.x+i.x*r,e.y=t.y+i.y*r},n.lerp=function(e,t,i,r){var a=1-r;e.x=a*t.x+r*i.x,e.y=a*t.y+r*i.y},n}();const fi=$ce;var Fy=Math.min,Oy=Math.max,uf=new fi,cf=new fi,df=new fi,hf=new fi,Am=new fi,Cm=new fi,qce=function(){function n(e,t,i,r){i<0&&(e=e+i,i=-i),r<0&&(t=t+r,r=-r),this.x=e,this.y=t,this.width=i,this.height=r}return n.prototype.union=function(e){var t=Fy(e.x,this.x),i=Fy(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Oy(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Oy(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=t,this.y=i},n.prototype.applyTransform=function(e){n.applyTransform(this,this,e)},n.prototype.calculateTransform=function(e){var t=this,i=e.width/t.width,r=e.height/t.height,a=Dl();return Ku(a,a,[-t.x,-t.y]),QM(a,a,[i,r]),Ku(a,a,[e.x,e.y]),a},n.prototype.intersect=function(e,t){if(!e)return!1;e instanceof n||(e=n.create(e));var i=this,r=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,c=e.y,d=e.y+e.height,h=!(ap&&(p=S,mp&&(p=x,g<_?fi.set(Cm,0,-g):fi.set(Cm,0,_)):S=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n.prototype.copy=function(e){n.copy(this,e)},n.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},n.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},n.prototype.isZero=function(){return this.width===0||this.height===0},n.create=function(e){return new n(e.x,e.y,e.width,e.height)},n.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},n.applyTransform=function(e,t,i){if(!i){e!==t&&n.copy(e,t);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],a=i[3],o=i[4],s=i[5];e.x=t.x*r+o,e.y=t.y*a+s,e.width=t.width*r,e.height=t.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}uf.x=df.x=t.x,uf.y=hf.y=t.y,cf.x=hf.x=t.x+t.width,cf.y=df.y=t.y+t.height,uf.transform(i),hf.transform(i),cf.transform(i),df.transform(i),e.x=Fy(uf.x,cf.x,df.x,hf.x),e.y=Fy(uf.y,cf.y,df.y,hf.y);var l=Oy(uf.x,cf.x,df.x,hf.x),u=Oy(uf.y,cf.y,df.y,hf.y);e.width=l-e.x,e.height=u-e.y},n}();const gi=qce;var m$="silent";function Xce(n,e,t){return{type:n,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:Yce}}function Yce(){Wc(this.event)}var Kce=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(P0),Mm=function(){function n(e,t){this.x=e,this.y=t}return n}(),Zce=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],eb=new gi(0,0,0,0),g$=function(n){ot(e,n);function e(t,i,r,a,o){var s=n.call(this)||this;return s._hovered=new Mm(0,0),s.storage=t,s.painter=i,s.painterRoot=a,s._pointerSize=o,r=r||new Kce,s.proxy=null,s.setHandlerProxy(r),s._draggingMgr=new Lce(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(ne(Zce,function(i){t.on&&t.on(i,this[i],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var i=t.zrX,r=t.zrY,a=y$(this,i,r),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 Mm(i,r):this.findHover(i,r),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var i=t.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Mm(0,0)},e.prototype.dispatch=function(t,i){var r=this[t];r&&r.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var i=this.proxy;i.setCursor&&i.setCursor(t)},e.prototype.dispatchToElement=function(t,i,r){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+i,s=Xce(i,t,r);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},e.prototype.findHover=function(t,i,r){var a=this.storage.getDisplayList(),o=new Mm(t,i);if(oN(a,o,t,i,r),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new gi(t-u,i-u,l,l),d=a.length-1;d>=0;d--){var h=a[d];h!==r&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(eb.copy(h.getBoundingRect()),h.transform&&eb.applyTransform(h.transform),eb.intersect(c)&&s.push(h))}if(s.length)for(var f=4,p=Math.PI/12,m=Math.PI*2,v=0;v4)return;this._downPoint=null}this.dispatchToElement(a,n,e)}});function Jce(n,e,t){if(n[n.rectHover?"rectContain":"contain"](e,t)){for(var i=n,r=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(e,t))return!1}i.silent&&(r=!0);var s=i.__hostTarget;i=s||i.parent}return r?m$:!0}return!1}function oN(n,e,t,i,r){for(var a=n.length-1;a>=0;a--){var o=n[a],s=void 0;if(o!==r&&!o.ignore&&(s=Jce(o,t,i))&&(!e.topTarget&&(e.topTarget=o),s!==m$)){e.target=o;break}}}function y$(n,e,t){var i=n.painter;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}const Qce=g$;var _$=32,Em=7;function ede(n){for(var e=0;n>=_$;)e|=n&1,n>>=1;return n+e}function sN(n,e,t,i){var r=e+1;if(r===t)return 1;if(i(n[r++],n[e])<0){for(;r=0;)r++;return r-e}function tde(n,e,t){for(t--;e>>1,r(a,n[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:n[o+3]=n[o+2];case 2:n[o+2]=n[o+1];case 1:n[o+1]=n[o];break;default:for(;u>0;)n[o+u]=n[o+u-1],u--}n[o]=a}}function tb(n,e,t,i,r,a){var o=0,s=0,l=1;if(a(n,e[t+r])>0){for(s=i-r;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o>>1);a(n,e[t+c])>0?o=c+1:l=c}return l}function nb(n,e,t,i,r,a){var o=0,s=0,l=1;if(a(n,e[t+r])<0){for(s=r+1;ls&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=i-r;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o>>1);a(n,e[t+c])<0?l=c:o=c+1}return l}function nde(n,e){var t=Em,i,r,a=0,o=[];i=[],r=[];function s(f,p){i[a]=f,r[a]=p,a+=1}function l(){for(;a>1;){var f=a-2;if(f>=1&&r[f-1]<=r[f]+r[f+1]||f>=2&&r[f-2]<=r[f]+r[f-1])r[f-1]r[f+1])break;c(f)}}function u(){for(;a>1;){var f=a-2;f>0&&r[f-1]=Em||M>=Em);if(I)break;A<0&&(A=0),A+=2}if(t=A,t<1&&(t=1),p===1){for(g=0;g=0;g--)n[C+g]=n[A+g];n[x]=o[S];return}for(var M=t;;){var I=0,D=0,E=!1;do if(e(o[S],n[_])<0){if(n[x--]=n[_--],I++,D=0,--p===0){E=!0;break}}else if(n[x--]=o[S--],D++,I=0,--v===1){E=!0;break}while((I|D)=0;g--)n[C+g]=n[A+g];if(p===0){E=!0;break}}if(n[x--]=o[S--],--v===1){E=!0;break}if(D=v-tb(n[_],o,0,v,v-1,e),D!==0){for(x-=D,S-=D,v-=D,C=x+1,A=S+1,g=0;g=Em||D>=Em);if(E)break;M<0&&(M=0),M+=2}if(t=M,t<1&&(t=1),v===1){for(x-=p,_-=p,C=x+1,A=_+1,g=p-1;g>=0;g--)n[C+g]=n[A+g];n[x]=o[S]}else{if(v===0)throw new Error;for(A=x-(v-1),g=0;gs&&(l=s),lN(n,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),r-=a,t+=a}while(r!==0);o.forceMergeRuns()}}var El=1,yg=2,y2=4,uN=!1;function ib(){uN||(uN=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function cN(n,e){return n.zlevel===e.zlevel?n.z===e.z?n.z2-e.z2:n.z-e.z:n.zlevel-e.zlevel}var ide=function(){function n(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=cN}return n.prototype.traverse=function(e,t){for(var i=0;i0&&(c.__clipPaths=[]),isNaN(c.z)&&(ib(),c.z=0),isNaN(c.z2)&&(ib(),c.z2=0),isNaN(c.zlevel)&&(ib(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var d=e.getDecalElement&&e.getDecalElement();d&&this._updateAndAddDisplayable(d,t,i);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,t,i);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,i)}},n.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},n.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,i=e.length;t=0&&this._roots.splice(r,1)},n.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},n.prototype.getRoots=function(){return this._roots},n.prototype.dispose=function(){this._displayList=null,this._roots=null},n}();const rde=ide;var S$;S$=qi.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(n){return setTimeout(n,16)};const tA=S$;var Z4={linear:function(n){return n},quadraticIn:function(n){return n*n},quadraticOut:function(n){return n*(2-n)},quadraticInOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},cubicIn:function(n){return n*n*n},cubicOut:function(n){return--n*n*n+1},cubicInOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)},quarticIn:function(n){return n*n*n*n},quarticOut:function(n){return 1- --n*n*n*n},quarticInOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)},quinticIn:function(n){return n*n*n*n*n},quinticOut:function(n){return--n*n*n*n*n+1},quinticInOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)},sinusoidalIn:function(n){return 1-Math.cos(n*Math.PI/2)},sinusoidalOut:function(n){return Math.sin(n*Math.PI/2)},sinusoidalInOut:function(n){return .5*(1-Math.cos(Math.PI*n))},exponentialIn:function(n){return n===0?0:Math.pow(1024,n-1)},exponentialOut:function(n){return n===1?1:1-Math.pow(2,-10*n)},exponentialInOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)},circularIn:function(n){return 1-Math.sqrt(1-n*n)},circularOut:function(n){return Math.sqrt(1- --n*n)},circularInOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},elasticIn:function(n){var e,t=.1,i=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/i)))},elasticOut:function(n){var e,t=.1,i=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*n)*Math.sin((n-e)*(2*Math.PI)/i)+1)},elasticInOut:function(n){var e,t=.1,i=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),(n*=2)<1?-.5*(t*Math.pow(2,10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/i)):t*Math.pow(2,-10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/i)*.5+1)},backIn:function(n){var e=1.70158;return n*n*((e+1)*n-e)},backOut:function(n){var e=1.70158;return--n*n*((e+1)*n+e)+1},backInOut:function(n){var e=2.5949095;return(n*=2)<1?.5*(n*n*((e+1)*n-e)):.5*((n-=2)*n*((e+1)*n+e)+2)},bounceIn:function(n){return 1-Z4.bounceOut(1-n)},bounceOut:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},bounceInOut:function(n){return n<.5?Z4.bounceIn(n*2)*.5:Z4.bounceOut(n*2-1)*.5+.5}};const b$=Z4;var By=Math.pow,vh=Math.sqrt,B5=1e-8,x$=1e-4,dN=vh(3),zy=1/3,Iu=Zp(),h0=Zp(),q2=Zp();function ih(n){return n>-B5&&nB5||n<-B5}function vo(n,e,t,i,r){var a=1-r;return a*a*(a*n+3*r*e)+r*r*(r*i+3*a*t)}function hN(n,e,t,i,r){var a=1-r;return 3*(((e-n)*a+2*(t-e)*r)*a+(i-t)*r*r)}function z5(n,e,t,i,r,a){var o=i+3*(e-t)-n,s=3*(t-e*2+n),l=3*(e-n),u=n-r,c=s*s-3*o*l,d=s*l-9*o*u,h=l*l-3*s*u,f=0;if(ih(c)&&ih(d))if(ih(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[f++]=p)}else{var m=d*d-4*c*h;if(ih(m)){var v=d/c,p=-s/o+v,g=-v/2;p>=0&&p<=1&&(a[f++]=p),g>=0&&g<=1&&(a[f++]=g)}else if(m>0){var _=vh(m),S=c*s+1.5*o*(-d+_),x=c*s+1.5*o*(-d-_);S<0?S=-By(-S,zy):S=By(S,zy),x<0?x=-By(-x,zy):x=By(x,zy);var p=(-s-(S+x))/(3*o);p>=0&&p<=1&&(a[f++]=p)}else{var A=(2*c*s-3*o*d)/(2*vh(c*c*c)),C=Math.acos(A)/3,M=vh(c),I=Math.cos(C),p=(-s-2*M*I)/(3*o),g=(-s+M*(I+dN*Math.sin(C)))/(3*o),D=(-s+M*(I-dN*Math.sin(C)))/(3*o);p>=0&&p<=1&&(a[f++]=p),g>=0&&g<=1&&(a[f++]=g),D>=0&&D<=1&&(a[f++]=D)}}return f}function T$(n,e,t,i,r){var a=6*t-12*e+6*n,o=9*e+3*i-3*n-9*t,s=3*e-3*n,l=0;if(ih(o)){if(w$(a)){var u=-s/a;u>=0&&u<=1&&(r[l++]=u)}}else{var c=a*a-4*o*s;if(ih(c))r[0]=-a/(2*o);else if(c>0){var d=vh(c),u=(-a+d)/(2*o),h=(-a-d)/(2*o);u>=0&&u<=1&&(r[l++]=u),h>=0&&h<=1&&(r[l++]=h)}}return l}function Eh(n,e,t,i,r,a){var o=(e-n)*r+n,s=(t-e)*r+e,l=(i-t)*r+t,u=(s-o)*r+o,c=(l-s)*r+s,d=(c-u)*r+u;a[0]=n,a[1]=o,a[2]=u,a[3]=d,a[4]=d,a[5]=c,a[6]=l,a[7]=i}function A$(n,e,t,i,r,a,o,s,l,u,c){var d,h=.005,f=1/0,p,m,v,g;Iu[0]=l,Iu[1]=u;for(var _=0;_<1;_+=.05)h0[0]=vo(n,t,r,o,_),h0[1]=vo(e,i,a,s,_),v=_p(Iu,h0),v=0&&v=0&&u<=1&&(r[l++]=u)}}else{var c=o*o-4*a*s;if(ih(c)){var u=-o/(2*a);u>=0&&u<=1&&(r[l++]=u)}else if(c>0){var d=vh(c),u=(-o+d)/(2*a),h=(-o-d)/(2*a);u>=0&&u<=1&&(r[l++]=u),h>=0&&h<=1&&(r[l++]=h)}}return l}function C$(n,e,t){var i=n+t-2*e;return i===0?.5:(n-e)/i}function w9(n,e,t,i,r){var a=(e-n)*i+n,o=(t-e)*i+e,s=(o-a)*i+a;r[0]=n,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=t}function M$(n,e,t,i,r,a,o,s,l){var u,c=.005,d=1/0;Iu[0]=o,Iu[1]=s;for(var h=0;h<1;h+=.05){h0[0]=Po(n,t,r,h),h0[1]=Po(e,i,a,h);var f=_p(Iu,h0);f=0&&f=1?1:z5(0,i,a,1,l,s)&&vo(0,r,o,1,s[0])}}}var ude=function(){function n(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||Ba,this.ondestroy=e.ondestroy||Ba,this.onrestart=e.onrestart||Ba,e.easing&&this.setEasing(e.easing)}return n.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var i=this._life,r=e-this._startTime-this._pausedTime,a=r/i;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=r%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){this._paused=!1},n.prototype.setEasing=function(e){this.easing=e,this.easingFunc=$n(e)?e:b$[e]||eE(e)},n}();const cde=ude;var E$=function(){function n(e){this.value=e}return n}(),dde=function(){function n(){this._len=0}return n.prototype.insert=function(e){var t=new E$(e);return this.insertEntry(t),t},n.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++},n.prototype.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},n.prototype.len=function(){return this._len},n.prototype.clear=function(){this.head=this.tail=null,this._len=0},n}(),hde=function(){function n(e){this._list=new dde,this._maxSize=10,this._map={},this._maxSize=e}return n.prototype.put=function(e,t){var i=this._list,r=this._map,a=null;if(r[e]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete r[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new E$(t),s.key=e,i.insertEntry(s),r[e]=s}return a},n.prototype.get=function(e){var t=this._map[e],i=this._list;if(t!=null)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},n.prototype.clear=function(){this._list.clear(),this._map={}},n.prototype.len=function(){return this._list.len()},n}();const m3=hde;var fN={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 Q0(n){return n=Math.round(n),n<0?0:n>255?255:n}function fde(n){return n=Math.round(n),n<0?0:n>360?360:n}function T9(n){return n<0?0:n>1?1:n}function rb(n){var e=n;return e.length&&e.charAt(e.length-1)==="%"?Q0(parseFloat(e)/100*255):Q0(parseInt(e,10))}function Sp(n){var e=n;return e.length&&e.charAt(e.length-1)==="%"?T9(parseFloat(e)/100):T9(parseFloat(e))}function ab(n,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?n+(e-n)*t*6:t*2<1?e:t*3<2?n+(e-n)*(2/3-t)*6:n}function rh(n,e,t){return n+(e-n)*t}function e0(n,e,t,i,r){return n[0]=e,n[1]=t,n[2]=i,n[3]=r,n}function iA(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n}var P$=new m3(20),Gy=null;function M1(n,e){Gy&&iA(Gy,e),Gy=P$.put(n,Gy||e.slice())}function Nl(n,e){if(n){e=e||[];var t=P$.get(n);if(t)return iA(e,t);n=n+"";var i=n.replace(/ /g,"").toLowerCase();if(i in fN)return iA(e,fN[i]),M1(n,e),e;var r=i.length;if(i.charAt(0)==="#"){if(r===4||r===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){e0(e,0,0,0,1);return}return e0(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,r===5?parseInt(i.slice(4),16)/15:1),M1(n,e),e}else if(r===7||r===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){e0(e,0,0,0,1);return}return e0(e,(a&16711680)>>16,(a&65280)>>8,a&255,r===9?parseInt(i.slice(7),16)/255:1),M1(n,e),e}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===r){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?e0(e,+u[0],+u[1],+u[2],1):e0(e,0,0,0,1);c=Sp(u.pop());case"rgb":if(u.length>=3)return e0(e,rb(u[0]),rb(u[1]),rb(u[2]),u.length===3?c:Sp(u[3])),M1(n,e),e;e0(e,0,0,0,1);return;case"hsla":if(u.length!==4){e0(e,0,0,0,1);return}return u[3]=Sp(u[3]),rA(u,e),M1(n,e),e;case"hsl":if(u.length!==3){e0(e,0,0,0,1);return}return rA(u,e),M1(n,e),e;default:return}}e0(e,0,0,0,1)}}function rA(n,e){var t=(parseFloat(n[0])%360+360)%360/360,i=Sp(n[1]),r=Sp(n[2]),a=r<=.5?r*(i+1):r+i-r*i,o=r*2-a;return e=e||[],e0(e,Q0(ab(o,a,t+1/3)*255),Q0(ab(o,a,t)*255),Q0(ab(o,a,t-1/3)*255),1),n.length===4&&(e[3]=n[3]),e}function pde(n){if(n){var e=n[0]/255,t=n[1]/255,i=n[2]/255,r=Math.min(e,t,i),a=Math.max(e,t,i),o=a-r,s=(a+r)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+r):u=o/(2-a-r);var c=((a-e)/6+o/2)/o,d=((a-t)/6+o/2)/o,h=((a-i)/6+o/2)/o;e===a?l=h-d:t===a?l=1/3+c-h:i===a&&(l=2/3+d-c),l<0&&(l+=1),l>1&&(l-=1)}var f=[l*360,u,s];return n[3]!=null&&f.push(n[3]),f}}function aA(n,e){var t=Nl(n);if(t){for(var i=0;i<3;i++)e<0?t[i]=t[i]*(1-e)|0:t[i]=(255-t[i])*e+t[i]|0,t[i]>255?t[i]=255:t[i]<0&&(t[i]=0);return zc(t,t.length===4?"rgba":"rgb")}}function ob(n,e,t){if(!(!(e&&e.length)||!(n>=0&&n<=1))){t=t||[];var i=n*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=e[r],s=e[a],l=i-r;return t[0]=Q0(rh(o[0],s[0],l)),t[1]=Q0(rh(o[1],s[1],l)),t[2]=Q0(rh(o[2],s[2],l)),t[3]=T9(rh(o[3],s[3],l)),t}}function vde(n,e,t){if(!(!(e&&e.length)||!(n>=0&&n<=1))){var i=n*(e.length-1),r=Math.floor(i),a=Math.ceil(i),o=Nl(e[r]),s=Nl(e[a]),l=i-r,u=zc([Q0(rh(o[0],s[0],l)),Q0(rh(o[1],s[1],l)),Q0(rh(o[2],s[2],l)),T9(rh(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:r,rightIndex:a,value:i}:u}}function Gg(n,e,t,i){var r=Nl(n);if(n)return r=pde(r),e!=null&&(r[0]=fde(e)),t!=null&&(r[1]=Sp(t)),i!=null&&(r[2]=Sp(i)),zc(rA(r),"rgba")}function G5(n,e){var t=Nl(n);if(t&&e!=null)return t[3]=T9(e),zc(t,"rgba")}function zc(n,e){if(!(!n||!n.length)){var t=n[0]+","+n[1]+","+n[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+n[3]),e+"("+t+")"}}function U5(n,e){var t=Nl(n);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var pN=new m3(100);function oA(n){if(xn(n)){var e=pN.get(n);return e||(e=aA(n,-.1),pN.put(n,e)),e}else if(m_(n)){var t=It({},n);return t.colorStops=Xt(n.colorStops,function(i){return{offset:i.offset,color:aA(i.color,-.1)}}),t}return n}var V5=Math.round;function A9(n){var e;if(!n||n==="transparent")n="none";else if(typeof n=="string"&&n.indexOf("rgba")>-1){var t=Nl(n);t&&(n="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:n,opacity:e==null?1:e}}var vN=1e-4;function ah(n){return n-vN}function Uy(n){return V5(n*1e3)/1e3}function sA(n){return V5(n*1e4)/1e4}function mde(n){return"matrix("+Uy(n[0])+","+Uy(n[1])+","+Uy(n[2])+","+Uy(n[3])+","+sA(n[4])+","+sA(n[5])+")"}var gde={left:"start",right:"end",center:"middle",middle:"middle"};function yde(n,e,t){return t==="top"?n+=e/2:t==="bottom"&&(n-=e/2),n}function _de(n){return n&&(n.shadowBlur||n.shadowOffsetX||n.shadowOffsetY)}function Sde(n){var e=n.style,t=n.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function R$(n){return n&&!!n.image}function bde(n){return n&&!!n.svgElement}function tE(n){return R$(n)||bde(n)}function L$(n){return n.type==="linear"}function I$(n){return n.type==="radial"}function D$(n){return n&&(n.type==="linear"||n.type==="radial")}function __(n){return"url(#"+n+")"}function N$(n){var e=n.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function k$(n){var e=n.x||0,t=n.y||0,i=(n.rotation||0)*q4,r=ai(n.scaleX,1),a=ai(n.scaleY,1),o=n.skewX||0,s=n.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),i&&l.push("rotate("+i+")"),(r!==1||a!==1)&&l.push("scale("+r+","+a+")"),(o||s)&&l.push("skew("+V5(o*q4)+"deg, "+V5(s*q4)+"deg)"),l.join(" ")}var xde=function(){return qi.hasGlobalWindow&&$n(window.btoa)?function(n){return window.btoa(unescape(encodeURIComponent(n)))}:typeof Buffer!="undefined"?function(n){return Buffer.from(n).toString("base64")}:function(n){return null}}(),lA=Array.prototype.slice;function Ec(n,e,t){return(e-n)*t+n}function sb(n,e,t,i){for(var r=e.length,a=0;ai?e:n,a=Math.min(t,i),o=r[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)i.length=o;else for(var l=a;l=1},n.prototype.getAdditiveTrack=function(){return this._additiveTrack},n.prototype.addKeyframe=function(e,t,i){this._needsSort=!0;var r=this.keyframes,a=r.length,o=!1,s=gN,l=t;if(ds(t)){var u=Cde(t);s=u,(u===1&&!Yi(t[0])||u===2&&!Yi(t[0][0]))&&(o=!0)}else if(Yi(t)&&!b9(t))s=Hy;else if(xn(t))if(!isNaN(+t))s=Hy;else{var c=Nl(t);c&&(l=c,s=_g)}else if(m_(t)){var d=It({},l);d.colorStops=Xt(t.colorStops,function(f){return{offset:f.offset,color:Nl(f.color)}}),L$(t)?s=uA:I$(t)&&(s=cA),l=d}a===0?this.valType=s:(s!==this.valType||s===gN)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:t,percent:0};return i&&(h.easing=i,h.easingFunc=$n(i)?i:b$[i]||eE(i)),r.push(h),h},n.prototype.prepare=function(e,t){var i=this.keyframes;this._needsSort&&i.sort(function(m,v){return m.time-v.time});for(var r=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=Wy(r),u=yN(r),c=0;c=0&&!(o[c].percent<=t);c--);c=h(c,s-2)}else{for(c=d;ct);c++);c=h(c-1,s-2)}p=o[c+1],f=o[c]}if(f&&p){this._lastFr=c,this._lastFrP=t;var v=p.percent-f.percent,g=v===0?1:h((t-f.percent)/v,1);p.easingFunc&&(g=p.easingFunc(g));var _=i?this._additiveValue:u?Pm:e[l];if((Wy(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=g<1?f.rawValue:p.rawValue;else if(Wy(a))a===Q4?sb(_,f[r],p[r],g):wde(_,f[r],p[r],g);else if(yN(a)){var S=f[r],x=p[r],A=a===uA;e[l]={type:A?"linear":"radial",x:Ec(S.x,x.x,g),y:Ec(S.y,x.y,g),colorStops:Xt(S.colorStops,function(M,I){var D=x.colorStops[I];return{offset:Ec(M.offset,D.offset,g),color:J4(sb([],M.color,D.color,g))}}),global:x.global},A?(e[l].x2=Ec(S.x2,x.x2,g),e[l].y2=Ec(S.y2,x.y2,g)):e[l].r=Ec(S.r,x.r,g)}else if(u)sb(_,f[r],p[r],g),i||(e[l]=J4(_));else{var C=Ec(f[r],p[r],g);i?this._additiveValue=C:e[l]=C}i&&this._addToTarget(e)}}},n.prototype._addToTarget=function(e){var t=this.valType,i=this.propName,r=this._additiveValue;t===Hy?e[i]=e[i]+r:t===_g?(Nl(e[i],Pm),Vy(Pm,Pm,r,1),e[i]=J4(Pm)):t===Q4?Vy(e[i],e[i],r,1):t===F$&&mN(e[i],e[i],r,1)},n}(),nE=function(){function n(e,t,i,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){qM("Can' use additive animation on looped animation.");return}this._additiveAnimators=r,this._allowDiscrete=i}return n.prototype.getMaxTime=function(){return this._maxTime},n.prototype.getDelay=function(){return this._delay},n.prototype.getLoop=function(){return this._loop},n.prototype.getTarget=function(){return this._target},n.prototype.changeTarget=function(e){this._target=e},n.prototype.when=function(e,t,i){return this.whenWithKeys(e,t,Li(t),i)},n.prototype.whenWithKeys=function(e,t,i,r){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,Ug(u),r),this._trackKeys.push(s)}l.addKeyframe(e,Ug(t[s]),r)}return this._maxTime=Math.max(this._maxTime,e),this},n.prototype.pause=function(){this._clip.pause(),this._paused=!0},n.prototype.resume=function(){this._clip.resume(),this._paused=!1},n.prototype.isPaused=function(){return!!this._paused},n.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},n.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,i=0;i0)){this._started=1;for(var t=this,i=[],r=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[r]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},n}();function R2(){return new Date().getTime()}var Ede=function(n){ot(e,n);function e(t){var i=n.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,t=t||{},i.stage=t.stage||{},i}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var i=t.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(t){if(t.animation){var i=t.prev,r=t.next;i?i.next=r:this._head=r,r?r.prev=i:this._tail=i,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var i=t.getClip();i&&this.removeClip(i),t.animation=null},e.prototype.update=function(t){for(var i=R2()-this._pausedTime,r=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,r);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,t||(this.trigger("frame",r),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function i(){t._running&&(tA(i),!t._paused&&t.update())}tA(i)},e.prototype.start=function(){this._running||(this._time=R2(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=R2(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=R2()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var i=t.next;t.prev=t.next=t.animation=null,t=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,i){i=i||{},this.start();var r=new nE(t,i.loop);return this.addAnimator(r),r},e}(P0);const Pde=Ede;var Rde=300,lb=qi.domSupported,ub=function(){var n=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=Xt(n,function(r){var a=r.replace("mouse","pointer");return t.hasOwnProperty(a)?a:r});return{mouse:n,touch:e,pointer:i}}(),_N={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},SN=!1;function dA(n){var e=n.pointerType;return e==="pen"||e==="touch"}function Lde(n){n.touching=!0,n.touchTimer!=null&&(clearTimeout(n.touchTimer),n.touchTimer=null),n.touchTimer=setTimeout(function(){n.touching=!1,n.touchTimer=null},700)}function cb(n){n&&(n.zrByTouch=!0)}function Ide(n,e){return o0(n.dom,new Dde(n,e),!0)}function O$(n,e){for(var t=e,i=!1;t&&t.nodeType!==9&&!(i=t.domBelongToZr||t!==e&&t===n.painterRoot);)t=t.parentNode;return i}var Dde=function(){function n(e,t){this.stopPropagation=Ba,this.stopImmediatePropagation=Ba,this.preventDefault=Ba,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return n}(),W0={mousedown:function(n){n=o0(this.dom,n),this.__mayPointerCapture=[n.zrX,n.zrY],this.trigger("mousedown",n)},mousemove:function(n){n=o0(this.dom,n);var e=this.__mayPointerCapture;e&&(n.zrX!==e[0]||n.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",n)},mouseup:function(n){n=o0(this.dom,n),this.__togglePointerCapture(!1),this.trigger("mouseup",n)},mouseout:function(n){n=o0(this.dom,n);var e=n.toElement||n.relatedTarget;O$(this,e)||(this.__pointerCapturing&&(n.zrEventControl="no_globalout"),this.trigger("mouseout",n))},wheel:function(n){SN=!0,n=o0(this.dom,n),this.trigger("mousewheel",n)},mousewheel:function(n){SN||(n=o0(this.dom,n),this.trigger("mousewheel",n))},touchstart:function(n){n=o0(this.dom,n),cb(n),this.__lastTouchMoment=new Date,this.handler.processGesture(n,"start"),W0.mousemove.call(this,n),W0.mousedown.call(this,n)},touchmove:function(n){n=o0(this.dom,n),cb(n),this.handler.processGesture(n,"change"),W0.mousemove.call(this,n)},touchend:function(n){n=o0(this.dom,n),cb(n),this.handler.processGesture(n,"end"),W0.mouseup.call(this,n),+new Date-+this.__lastTouchMomentwN||n<-wN}var pf=[],E1=[],hb=Dl(),fb=Math.abs,zde=function(){function n(){}return n.prototype.getLocalTransform=function(e){return n.getLocalTransform(this,e)},n.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},n.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},n.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},n.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},n.prototype.needLocalTransform=function(){return ff(this.rotation)||ff(this.x)||ff(this.y)||ff(this.scaleX-1)||ff(this.scaleY-1)||ff(this.skewX)||ff(this.skewY)},n.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),i=this.transform;if(!(t||e)){i&&(xN(i),this.invTransform=null);return}i=i||Dl(),t?this.getLocalTransform(i):xN(i),e&&(t?Bc(i,e,i):JM(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},n.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(pf);var i=pf[0]<0?-1:1,r=pf[1]<0?-1:1,a=((pf[0]-i)*t+i)/pf[0]||0,o=((pf[1]-r)*t+r)/pf[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Dl(),Bv(this.invTransform,e)},n.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},n.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),a=Math.PI/2+r-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=i,this.originX=0,this.originY=0}},n.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Dl(),Bc(E1,e.invTransform,t),t=E1);var i=this.originX,r=this.originY;(i||r)&&(hb[4]=i,hb[5]=r,Bc(E1,t,hb),E1[4]-=i,E1[5]-=r,t=E1),this.setLocalTransform(t)}},n.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},n.prototype.transformCoordToLocal=function(e,t){var i=[e,t],r=this.invTransform;return r&&Ho(i,i,r),i},n.prototype.transformCoordToGlobal=function(e,t){var i=[e,t],r=this.transform;return r&&Ho(i,i,r),i},n.prototype.getLineScale=function(){var e=this.transform;return e&&fb(e[0]-1)>1e-10&&fb(e[3]-1)>1e-10?Math.sqrt(fb(e[0]*e[3]-e[2]*e[1])):1},n.prototype.copyTransform=function(e){z$(this,e)},n.getLocalTransform=function(e,t){t=t||[];var i=e.originX||0,r=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,d=e.y,h=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(i||r||s||l){var p=i+s,m=r+l;t[4]=-p*a-h*m*o,t[5]=-m*o-f*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=f*a,t[2]=h*o,u&&Jp(t,t,u),t[4]+=i+c,t[5]+=r+d,t},n.initDefaultProps=function(){var e=n.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}(),n}(),Zu=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function z$(n,e){for(var t=0;t=0?parseFloat(n)/100*e:parseFloat(n):n}function W5(n,e,t){var i=e.position||"inside",r=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,c="left",d="top";if(i instanceof Array)l+=nu(i[0],t.width),u+=nu(i[1],t.height),c=null,d=null;else switch(i){case"left":l-=r,u+=s,c="right",d="middle";break;case"right":l+=r+o,u+=s,d="middle";break;case"top":l+=o/2,u-=r,c="center",d="bottom";break;case"bottom":l+=o/2,u+=a+r,c="center";break;case"inside":l+=o/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=r,u+=s,d="middle";break;case"insideRight":l+=o-r,u+=s,c="right",d="middle";break;case"insideTop":l+=o/2,u+=r,c="center";break;case"insideBottom":l+=o/2,u+=a-r,c="center",d="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=o-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=a-r,d="bottom";break;case"insideBottomRight":l+=o-r,u+=a-r,c="right",d="bottom";break}return n=n||{},n.x=l,n.y=u,n.align=c,n.verticalAlign=d,n}var pb="__zr_normal__",vb=Zu.concat(["ignore"]),Gde=Yu(Zu,function(n,e){return n[e]=!0,n},{ignore:!1}),P1={},Ude=new gi(0,0,0,0),iE=function(){function n(e){this.id=d$(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return n.prototype._init=function(e){this.attr(e)},n.prototype.drift=function(e,t,i){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},n.prototype.beforeUpdate=function(){},n.prototype.afterUpdate=function(){},n.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},n.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,r=i.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=r?this:null;var u=!1;if(a.copyTransform(t),i.position!=null){var c=Ude;i.layoutRect?c.copy(i.layoutRect):c.copy(this.getBoundingRect()),r||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(P1,i,c):W5(P1,i,c),a.x=P1.x,a.y=P1.y,o=P1.align,s=P1.verticalAlign;var d=i.origin;if(d&&i.rotation!=null){var h=void 0,f=void 0;d==="center"?(h=c.width*.5,f=c.height*.5):(h=nu(d[0],c.width),f=nu(d[1],c.height)),u=!0,a.originX=-a.x+h+(r?0:c.x),a.originY=-a.y+f+(r?0:c.y)}}i.rotation!=null&&(a.rotation=i.rotation);var p=i.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var m=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,_=void 0,S=void 0;m&&this.canBeInsideText()?(g=i.insideFill,_=i.insideStroke,(g==null||g==="auto")&&(g=this.getInsideTextFill()),(_==null||_==="auto")&&(_=this.getInsideTextStroke(g),S=!0)):(g=i.outsideFill,_=i.outsideStroke,(g==null||g==="auto")&&(g=this.getOutsideFill()),(_==null||_==="auto")&&(_=this.getOutsideStroke(g),S=!0)),g=g||"#000",(g!==v.fill||_!==v.stroke||S!==v.autoStroke||o!==v.align||s!==v.verticalAlign)&&(l=!0,v.fill=g,v.stroke=_,v.autoStroke=S,v.align=o,v.verticalAlign=s,t.setDefaultTextStyle(v)),t.__dirty|=El,l&&t.dirtyStyle(!0)}},n.prototype.canBeInsideText=function(){return!0},n.prototype.getInsideTextFill=function(){return"#fff"},n.prototype.getInsideTextStroke=function(e){return"#000"},n.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?vA:pA},n.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),i=typeof t=="string"&&Nl(t);i||(i=[255,255,255,1]);for(var r=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*r+(a?0:255)*(1-r);return i[3]=1,zc(i,"rgba")},n.prototype.traverse=function(e,t){},n.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},It(this.extra,t)):this[e]=t},n.prototype.hide=function(){this.ignore=!0,this.markRedraw()},n.prototype.show=function(){this.ignore=!1,this.markRedraw()},n.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Kn(e))for(var i=e,r=Li(i),a=0;a0},n.prototype.getState=function(e){return this.states[e]},n.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},n.prototype.clearStates=function(e){this.useState(pb,!1,e)},n.prototype.useState=function(e,t,i,r){var a=e===pb,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(xi(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){qM("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!i&&!this.__inHover&&l&&l.duration>0,l);var d=this._textContent,h=this._textGuide;return d&&d.useState(e,t,i,c),h&&h.useState(e,t,i,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~El),u}}},n.prototype.useStates=function(e,t,i){if(!e.length)this.clearStates();else{var r=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,p);var m=this._textContent,v=this._textGuide;m&&m.useStates(e,t,h),v&&v.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~El)}},n.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},n.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var i=this.currentStates.slice();i.splice(t,1),this.useStates(i)}},n.prototype.replaceState=function(e,t,i){var r=this.currentStates.slice(),a=xi(r,e),o=xi(r,t)>=0;a>=0?o?r.splice(a,1):r[a]=t:i&&!o&&r.push(t),this.useStates(r)},n.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},n.prototype._mergeStates=function(e){for(var t={},i,r=0;r=0&&a.splice(o,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},n.prototype.updateDuringAnimation=function(e){this.markRedraw()},n.prototype.stopAnimation=function(e,t){for(var i=this.animators,r=i.length,a=[],o=0;o0&&t.during&&a[0].during(function(p,m){t.during(m)});for(var h=0;h0||r.force&&!o.length){var I=void 0,D=void 0,E=void 0;if(s){D={},h&&(I={});for(var x=0;x=0&&(r.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,i){var r=xi(this._children,t);return r>=0&&this.replaceAt(i,r),this},e.prototype.replaceAt=function(t,i){var r=this._children,a=r[i];if(t&&t!==this&&t.parent!==this&&t!==a){r[i]=t,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var i=this.__zr;i&&i!==t.__zr&&t.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(t){var i=this.__zr,r=this._children,a=xi(r,t);return a<0?this:(r.splice(a,1),t.parent=null,i&&t.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,i=this.__zr,r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},n.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},n.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},n.prototype.refreshHover=function(){this._needsRefreshHover=!0},n.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},n.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},n.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},n.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},n.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},n.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},n.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},n.prototype.on=function(e,t,i){return this._disposed||this.handler.on(e,t,i),this},n.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},n.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},n.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(n<=r)return o;if(n>=a)return s}else{if(n>=r)return o;if(n<=a)return s}else{if(n===r)return o;if(n===a)return s}return(n-r)/l*u+o}function _n(n,e){switch(n){case"center":case"middle":n="50%";break;case"left":case"top":n="0%";break;case"right":case"bottom":n="100%";break}return xn(n)?Jde(n).match(/%$/)?parseFloat(n)/100*e:parseFloat(n):n==null?NaN:+n}function Ra(n,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),W$),n=(+n).toFixed(e),t?n:+n}function x0(n){return n.sort(function(e,t){return e-t}),n}function Bu(n){if(n=+n,isNaN(n))return 0;if(n>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(n*e)/e===n)return t}return Qde(n)}function Qde(n){var e=n.toString().toLowerCase(),t=e.indexOf("e"),i=t>0?+e.slice(t+1):0,r=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:r-1-a;return Math.max(0,o-i)}function j$(n,e){var t=Math.log,i=Math.LN10,r=Math.floor(t(n[1]-n[0])/i),a=Math.round(t(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function ehe(n,e){var t=Yu(n,function(f,p){return f+(isNaN(p)?0:p)},0);if(t===0)return[];for(var i=Math.pow(10,e),r=Xt(n,function(f){return(isNaN(f)?0:f)/t*i*100}),a=i*100,o=Xt(r,function(f){return Math.floor(f)}),s=Yu(o,function(f,p){return f+p},0),l=Xt(r,function(f,p){return f-o[p]});su&&(u=l[d],c=d);++o[c],l[c]=0,++s}return Xt(o,function(f){return f/i})}function the(n,e){var t=Math.max(Bu(n),Bu(e)),i=n+e;return t>W$?i:Ra(i,t)}var EN=9007199254740991;function $$(n){var e=Math.PI*2;return(n%e+e)%e}function C9(n){return n>-MN&&n=10&&e++,e}function q$(n,e){var t=rE(n),i=Math.pow(10,t),r=n/i,a;return e?r<1.5?a=1:r<2.5?a=2:r<4?a=3:r<7?a=5:a=10:r<1?a=1:r<2?a=2:r<3?a=3:r<5?a=5:a=10,n=a*i,t>=-20?+n.toFixed(t<0?-t:0):n}function yb(n,e){var t=(n.length-1)*e+1,i=Math.floor(t),r=+n[i-1],a=t-i;return a?r+a*(n[i]-r):r}function PN(n){n.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,i=0;i=0||a&&xi(a,l)<0)){var u=i.getShallow(l,e);u!=null&&(o[n[s][0]]=u)}}return o}}var Mhe=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Ehe=Bp(Mhe),Phe=function(){function n(){}return n.prototype.getAreaStyle=function(e,t){return Ehe(this,e,t)},n}(),yA=new m3(50);function Rhe(n){if(typeof n=="string"){var e=yA.get(n);return e&&e.image}else return n}function lE(n,e,t,i,r){if(n)if(typeof n=="string"){if(e&&e.__zrImageSrc===n||!t)return e;var a=yA.get(n),o={hostEl:t,cb:i,cbPayload:r};return a?(e=a.image,!x_(e)&&a.pending.push(o)):(e=Mh.loadImage(n,DN,DN),e.__zrImageSrc=n,yA.put(n,e.__cachedImgObj={image:e,pending:[o]})),e}else return n;else return e}function DN(){var n=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=kl(t,e);return u>s&&(t="",u=0),s=n-u,r.ellipsis=t,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=n,r}function oq(n,e,t){var i=t.containerWidth,r=t.font,a=t.contentWidth;if(!i){n.textLine="",n.isTruncated=!1;return}var o=kl(e,r);if(o<=i){n.textLine=e,n.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?Ihe(e,a,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,l),o=kl(e,r)}e===""&&(e=t.placeholder),n.textLine=e,n.isTruncated=!0}function Ihe(n,e,t,i){for(var r=0,a=0,o=n.length;ap&&u){var m=Math.floor(p/s);c=c||h.length>m,h=h.slice(0,m)}if(n&&a&&d!=null)for(var v=aq(d,r,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g={},_=0;_s&&Sb(t,n.substring(s,u),e,o),Sb(t,l[2],e,o,l[1]),s=_b.lastIndex}sr){var V=t.lines.length;C>0?(S.tokens=S.tokens.slice(0,C),g(S,A,x),t.lines=t.lines.slice(0,_+1)):t.lines=t.lines.slice(0,_),t.isTruncated=t.isTruncated||t.lines.length0&&p+i.accumWidth>i.width&&(c=e.split(` `),u=!0),i.accumWidth=p}else{var m=sq(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=m.accumWidth+f,d=m.linesWidths,c=m.lines}}else c=e.split(` `);for(var v=0;v=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Bhe=Yu(",&?/;] ".split(""),function(n,e){return n[e]=!0,n},{});function zhe(n){return Ohe(n)?!!Bhe[n]:!0}function sq(n,e,t,i,r){for(var a=[],o=[],s="",l="",u=0,c=0,d=0;dt:r+c+f>t){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=f,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=f)):p?(a.push(l),o.push(u),l=h,u=f):(a.push(h),o.push(f));continue}c+=f,p?(l+=h,u+=f):(l&&(s+=l,l="",u=0),s+=h)}return!a.length&&!s&&(s=n,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=r),{accumWidth:c,lines:a,linesWidths:o}}var _A="__zr_style_"+Math.round(Math.random()*10),bp={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},w_={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};bp[_A]=!0;var kN=["z","z2","invisible"],Ghe=["invisible"],Uhe=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype._init=function(t){for(var i=Li(t),r=0;r1e-4){s[0]=n-t,s[1]=e-i,l[0]=n+t,l[1]=e+i;return}if(jy[0]=Tb(r)*t+n,jy[1]=wb(r)*i+e,$y[0]=Tb(a)*t+n,$y[1]=wb(a)*i+e,u(s,jy,$y),c(l,jy,$y),r=r%mf,r<0&&(r=r+mf),a=a%mf,a<0&&(a=a+mf),r>a&&!o?a+=mf:rr&&(qy[0]=Tb(f)*t+n,qy[1]=wb(f)*i+e,u(s,qy,s),c(l,qy,l))}var Rr={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},gf=[],yf=[],pu=[],Td=[],vu=[],mu=[],Ab=Math.min,Cb=Math.max,_f=Math.cos,Sf=Math.sin,gc=Math.abs,SA=Math.PI,Ud=SA*2,Mb=typeof Float32Array!="undefined",Rm=[];function Eb(n){var e=Math.round(n/SA*1e8)/1e8;return e%2*SA}function uE(n,e){var t=Eb(n[0]);t<0&&(t+=Ud);var i=t-n[0],r=n[1];r+=i,!e&&r-t>=Ud?r=t+Ud:e&&t-r>=Ud?r=t-Ud:!e&&t>r?r=t+(Ud-Eb(t-r)):e&&t0&&(this._ux=gc(i/H5/e)||0,this._uy=gc(i/H5/t)||0)},n.prototype.setDPR=function(e){this.dpr=e},n.prototype.setContext=function(e){this._ctx=e},n.prototype.getContext=function(){return this._ctx},n.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},n.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},n.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Rr.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},n.prototype.lineTo=function(e,t){var i=gc(e-this._xi),r=gc(t-this._yi),a=i>this._ux||r>this._uy;if(this.addData(Rr.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=i*i+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},n.prototype.bezierCurveTo=function(e,t,i,r,a,o){return this._drawPendingPt(),this.addData(Rr.C,e,t,i,r,a,o),this._ctx&&this._ctx.bezierCurveTo(e,t,i,r,a,o),this._xi=a,this._yi=o,this},n.prototype.quadraticCurveTo=function(e,t,i,r){return this._drawPendingPt(),this.addData(Rr.Q,e,t,i,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,i,r),this._xi=i,this._yi=r,this},n.prototype.arc=function(e,t,i,r,a,o){this._drawPendingPt(),Rm[0]=r,Rm[1]=a,uE(Rm,o),r=Rm[0],a=Rm[1];var s=a-r;return this.addData(Rr.A,e,t,i,i,r,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,i,r,a,o),this._xi=_f(a)*i+e,this._yi=Sf(a)*i+t,this},n.prototype.arcTo=function(e,t,i,r,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,i,r,a),this},n.prototype.rect=function(e,t,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,i,r),this.addData(Rr.R,e,t,i,r),this},n.prototype.closePath=function(){this._drawPendingPt(),this.addData(Rr.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&e.closePath(),this._xi=t,this._yi=i,this},n.prototype.fill=function(e){e&&e.fill(),this.toStatic()},n.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},n.prototype.len=function(){return this._len},n.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&Mb&&(this.data=new Float32Array(t));for(var i=0;ic.length&&(this._expandData(),c=this.data);for(var d=0;d0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},n.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},n.prototype.getBoundingRect=function(){pu[0]=pu[1]=vu[0]=vu[1]=Number.MAX_VALUE,Td[0]=Td[1]=mu[0]=mu[1]=-Number.MAX_VALUE;var e=this.data,t=0,i=0,r=0,a=0,o;for(o=0;oi||gc(S)>r||h===t-1)&&(m=Math.sqrt(_*_+S*S),a=v,o=g);break}case Rr.C:{var x=e[h++],A=e[h++],v=e[h++],g=e[h++],C=e[h++],M=e[h++];m=ade(a,o,x,A,v,g,C,M,10),a=C,o=M;break}case Rr.Q:{var x=e[h++],A=e[h++],v=e[h++],g=e[h++];m=sde(a,o,x,A,v,g,10),a=v,o=g;break}case Rr.A:var I=e[h++],D=e[h++],E=e[h++],P=e[h++],F=e[h++],V=e[h++],G=V+F;h+=1,p&&(s=_f(F)*E+I,l=Sf(F)*P+D),m=Cb(E,P)*Ab(Ud,Math.abs(V)),a=_f(G)*E+I,o=Sf(G)*P+D;break;case Rr.R:{s=a=e[h++],l=o=e[h++];var W=e[h++],Y=e[h++];m=W*2+Y*2;break}case Rr.Z:{var _=s-a,S=l-o;m=Math.sqrt(_*_+S*S),a=s,o=l;break}}m>=0&&(u[d++]=m,c+=m)}return this._pathLen=c,c},n.prototype.rebuildPath=function(e,t){var i=this.data,r=this._ux,a=this._uy,o=this._len,s,l,u,c,d,h,f=t<1,p,m,v=0,g=0,_,S=0,x,A;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))e:for(var C=0;C0&&(e.lineTo(x,A),S=0),M){case Rr.M:s=u=i[C++],l=c=i[C++],e.moveTo(u,c);break;case Rr.L:{d=i[C++],h=i[C++];var D=gc(d-u),E=gc(h-c);if(D>r||E>a){if(f){var P=p[g++];if(v+P>_){var F=(_-v)/P;e.lineTo(u*(1-F)+d*F,c*(1-F)+h*F);break e}v+=P}e.lineTo(d,h),u=d,c=h,S=0}else{var V=D*D+E*E;V>S&&(x=d,A=h,S=V)}break}case Rr.C:{var G=i[C++],W=i[C++],Y=i[C++],Q=i[C++],K=i[C++],ae=i[C++];if(f){var P=p[g++];if(v+P>_){var F=(_-v)/P;Eh(u,G,Y,K,F,gf),Eh(c,W,Q,ae,F,yf),e.bezierCurveTo(gf[1],yf[1],gf[2],yf[2],gf[3],yf[3]);break e}v+=P}e.bezierCurveTo(G,W,Y,Q,K,ae),u=K,c=ae;break}case Rr.Q:{var G=i[C++],W=i[C++],Y=i[C++],Q=i[C++];if(f){var P=p[g++];if(v+P>_){var F=(_-v)/P;w9(u,G,Y,F,gf),w9(c,W,Q,F,yf),e.quadraticCurveTo(gf[1],yf[1],gf[2],yf[2]);break e}v+=P}e.quadraticCurveTo(G,W,Y,Q),u=Y,c=Q;break}case Rr.A:var ie=i[C++],he=i[C++],Ee=i[C++],He=i[C++],xe=i[C++],Fe=i[C++],pt=i[C++],Ot=!i[C++],bt=Ee>He?Ee:He,ht=gc(Ee-He)>.001,Kt=xe+Fe,Tt=!1;if(f){var P=p[g++];v+P>_&&(Kt=xe+Fe*(_-v)/P,Tt=!0),v+=P}if(ht&&e.ellipse?e.ellipse(ie,he,Ee,He,pt,xe,Kt,Ot):e.arc(ie,he,bt,xe,Kt,Ot),Tt)break e;I&&(s=_f(xe)*Ee+ie,l=Sf(xe)*He+he),u=_f(Kt)*Ee+ie,c=Sf(Kt)*He+he;break;case Rr.R:s=u=i[C],l=c=i[C+1],d=i[C++],h=i[C++];var Ae=i[C++],Lt=i[C++];if(f){var P=p[g++];if(v+P>_){var vt=_-v;e.moveTo(d,h),e.lineTo(d+Ab(vt,Ae),h),vt-=Ae,vt>0&&e.lineTo(d+Ae,h+Ab(vt,Lt)),vt-=Lt,vt>0&&e.lineTo(d+Cb(Ae-vt,0),h+Lt),vt-=Ae,vt>0&&e.lineTo(d,h+Cb(Lt-vt,0));break e}v+=P}e.rect(d,h,Ae,Lt);break;case Rr.Z:if(f){var P=p[g++];if(v+P>_){var F=(_-v)/P;e.lineTo(u*(1-F)+s*F,c*(1-F)+l*F);break e}v+=P}e.closePath(),u=s,c=l}}},n.prototype.clone=function(){var e=new n,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},n.CMD=Rr,n.initDefaultProps=function(){var e=n.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),n}();function Hd(n,e,t,i,r,a,o){if(r===0)return!1;var s=r,l=0,u=n;if(o>e+s&&o>i+s||on+s&&a>t+s||ae+d&&c>i+d&&c>a+d&&c>s+d||cn+d&&u>t+d&&u>r+d&&u>o+d||ue+u&&l>i+u&&l>a+u||ln+u&&s>t+u&&s>r+u||st||c+ur&&(r+=Lm);var h=Math.atan2(l,s);return h<0&&(h+=Lm),h>=i&&h<=r||h+Lm>=i&&h+Lm<=r}function Pc(n,e,t,i,r,a){if(a>e&&a>i||ar?s:0}var Ad=Qu.CMD,bf=Math.PI*2,Xhe=1e-4;function Yhe(n,e){return Math.abs(n-e)e&&u>i&&u>a&&u>s||u1&&Khe(),f=vo(e,i,a,s,u0[0]),h>1&&(p=vo(e,i,a,s,u0[1]))),h===2?ve&&s>i&&s>a||s=0&&u<=1){for(var c=0,d=Po(e,i,a,u),h=0;ht||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Cs[0]=-l,Cs[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=bf-1e-4){i=0,r=bf;var c=a?1:-1;return o>=Cs[0]+n&&o<=Cs[1]+n?c:0}if(i>r){var d=i;i=r,r=d}i<0&&(i+=bf,r+=bf);for(var h=0,f=0;f<2;f++){var p=Cs[f];if(p+n>o){var m=Math.atan2(s,p),c=a?1:-1;m<0&&(m=bf+m),(m>=i&&m<=r||m+bf>=i&&m+bf<=r)&&(m>Math.PI/2&&m1&&(t||(s+=Pc(l,u,c,d,i,r))),v&&(l=a[p],u=a[p+1],c=l,d=u),m){case Ad.M:c=a[p++],d=a[p++],l=c,u=d;break;case Ad.L:if(t){if(Hd(l,u,a[p],a[p+1],e,i,r))return!0}else s+=Pc(l,u,a[p],a[p+1],i,r)||0;l=a[p++],u=a[p++];break;case Ad.C:if(t){if($he(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,i,r))return!0}else s+=Zhe(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],i,r)||0;l=a[p++],u=a[p++];break;case Ad.Q:if(t){if(lq(l,u,a[p++],a[p++],a[p],a[p+1],e,i,r))return!0}else s+=Jhe(l,u,a[p++],a[p++],a[p],a[p+1],i,r)||0;l=a[p++],u=a[p++];break;case Ad.A:var g=a[p++],_=a[p++],S=a[p++],x=a[p++],A=a[p++],C=a[p++];p+=1;var M=!!(1-a[p++]);h=Math.cos(A)*S+g,f=Math.sin(A)*x+_,v?(c=h,d=f):s+=Pc(l,u,h,f,i,r);var I=(i-g)*x/S+g;if(t){if(qhe(g,_,x,A,A+C,M,e,I,r))return!0}else s+=Qhe(g,_,x,A,A+C,M,I,r);l=Math.cos(A+C)*S+g,u=Math.sin(A+C)*x+_;break;case Ad.R:c=l=a[p++],d=u=a[p++];var D=a[p++],E=a[p++];if(h=c+D,f=d+E,t){if(Hd(c,d,h,d,e,i,r)||Hd(h,d,h,f,e,i,r)||Hd(h,f,c,f,e,i,r)||Hd(c,f,c,d,e,i,r))return!0}else s+=Pc(h,d,h,f,i,r),s+=Pc(c,f,c,d,i,r);break;case Ad.Z:if(t){if(Hd(l,u,c,d,e,i,r))return!0}else s+=Pc(l,u,c,d,i,r);l=c,u=d;break}}return!t&&!Yhe(u,d)&&(s+=Pc(l,u,c,d,i,r)||0),s!==0}function efe(n,e,t){return uq(n,0,!1,e,t)}function tfe(n,e,t,i){return uq(n,e,!0,t,i)}var j5=qn({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},bp),nfe={style:qn({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},w_.style)},Pb=Zu.concat(["invisible","culling","z","z2","zlevel","parent"]),ife=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.update=function(){var t=this;n.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(l){t.buildPath(l,t.shape)}),r.silent=!0;var a=r.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s.5?pA:i>.2?Bde:vA}else if(t)return vA}return pA},e.prototype.getInsideTextStroke=function(t){var i=this.style.fill;if(xn(i)){var r=this.__zr,a=!!(r&&r.isDarkMode()),o=U5(t,0)0))},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,i=this.style,r=!t;if(r){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&y2)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||r){s.copy(t);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c==null?4:c)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,i){var r=this.transformCoordToLocal(t,i),a=this.getBoundingRect(),o=this.style;if(t=r[0],i=r[1],a.contain(t,i)){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)),tfe(s,l/u,t,i)))return!0}if(this.hasFill())return efe(s,t,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=y2,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,i){t==="shape"?this.setShape(i):n.prototype.attrKV.call(this,t,i)},e.prototype.setShape=function(t,i){var r=this.shape;return r||(r=this.shape={}),typeof t=="string"?r[t]=i:It(r,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&y2)},e.prototype.createStyle=function(t){return g_(j5,t)},e.prototype._innerSaveToNormal=function(t){n.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.shape&&!i.shape&&(i.shape=It({},this.shape))},e.prototype._applyStateObj=function(t,i,r,a,o,s){n.prototype._applyStateObj.call(this,t,i,r,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=It({},r.shape),It(u,i.shape)):(u=It({},a?this.shape:r.shape),It(u,i.shape)):l&&(u=r.shape),u)if(o){this.shape=It({},this.shape);for(var c={},d=Li(u),h=0;h0},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(t){return g_(rfe,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var i=t.text;i!=null?i+="":i="";var r=g3(i,t.font,t.textAlign,t.textBaseline);if(r.x+=t.x||0,r.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;r.x-=a/2,r.y-=a/2,r.width+=a,r.height+=a}this._rect=r}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(M0);cq.prototype.type="tspan";const E9=cq;var afe=qn({x:0,y:0},bp),ofe={style:qn({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},w_.style)};function sfe(n){return!!(n&&typeof n!="string"&&n.width&&n.height)}var dq=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return g_(afe,t)},e.prototype._getSize=function(t){var i=this.style,r=i[t];if(r!=null)return r;var a=sfe(i.image)?i.image:this.__image;if(!a)return 0;var o=t==="width"?"height":"width",s=i[o];return s==null?a[t]:a[t]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return ofe},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new gi(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(M0);dq.prototype.type="image";const qo=dq;function lfe(n,e){var t=e.x,i=e.y,r=e.width,a=e.height,o=e.r,s,l,u,c;r<0&&(t=t+r,r=-r),a<0&&(i=i+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var d;s+l>r&&(d=s+l,s*=r/d,l*=r/d),u+c>r&&(d=u+c,u*=r/d,c*=r/d),l+u>a&&(d=l+u,l*=a/d,u*=a/d),s+c>a&&(d=s+c,s*=a/d,c*=a/d),n.moveTo(t+s,i),n.lineTo(t+r-l,i),l!==0&&n.arc(t+r-l,i+l,l,-Math.PI/2,0),n.lineTo(t+r,i+a-u),u!==0&&n.arc(t+r-u,i+a-u,u,0,Math.PI/2),n.lineTo(t+c,i+a),c!==0&&n.arc(t+c,i+a-c,c,Math.PI/2,Math.PI),n.lineTo(t,i+s),s!==0&&n.arc(t+s,i+s,s,Math.PI,Math.PI*1.5)}var L2=Math.round;function hq(n,e,t){if(e){var i=e.x1,r=e.x2,a=e.y1,o=e.y2;n.x1=i,n.x2=r,n.y1=a,n.y2=o;var s=t&&t.lineWidth;return s&&(L2(i*2)===L2(r*2)&&(n.x1=n.x2=rp(i,s,!0)),L2(a*2)===L2(o*2)&&(n.y1=n.y2=rp(a,s,!0))),n}}function fq(n,e,t){if(e){var i=e.x,r=e.y,a=e.width,o=e.height;n.x=i,n.y=r,n.width=a,n.height=o;var s=t&&t.lineWidth;return s&&(n.x=rp(i,s,!0),n.y=rp(r,s,!0),n.width=Math.max(rp(i+a,s,!1)-n.x,a===0?0:1),n.height=Math.max(rp(r+o,s,!1)-n.y,o===0?0:1)),n}}function rp(n,e,t){if(!e)return n;var i=L2(n*2);return(i+L2(e))%2===0?i/2:(i+(t?1:-1))/2}var ufe=function(){function n(){this.x=0,this.y=0,this.width=0,this.height=0}return n}(),cfe={},pq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new ufe},e.prototype.buildPath=function(t,i){var r,a,o,s;if(this.subPixelOptimize){var l=fq(cfe,i,this.style);r=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else r=i.x,a=i.y,o=i.width,s=i.height;i.r?lfe(t,i):t.rect(r,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ei);pq.prototype.type="rect";const Hi=pq;var GN={fill:"#000"},UN=2,dfe={style:qn({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},w_.style)},vq=function(n){ot(e,n);function e(t){var i=n.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=GN,i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){n.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,F=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),V=o.calculatedLineHeight,G=0;G=0&&(G=C[V],G.align==="right");)this._placeToken(G,t,I,g,F,"right",S),D-=G.width,F-=G.width,V--;for(P+=(a-(P-v)-(_-F)-D)/2;E<=V;)G=C[E],this._placeToken(G,t,I,g,P+G.width/2,"center",S),P+=G.width,E++;g+=I}},e.prototype._placeToken=function(t,i,r,a,o,s,l){var u=i.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,d=a+r/2;c==="top"?d=a+t.height/2:c==="bottom"&&(d=a+r-t.height/2);var h=!t.isLineHolder&&Rb(u);h&&this._renderBackground(u,i,s==="right"?o-t.width:s==="center"?o-t.width/2:o,d-t.height/2,t.width,t.height);var f=!!u.backgroundColor,p=t.textPadding;p&&(o=qN(o,s,p),d-=t.height/2-p[0]-t.innerHeight/2);var m=this._getOrCreateChild(E9),v=m.createStyle();m.useStyle(v);var g=this._defaultStyle,_=!1,S=0,x=$N("fill"in u?u.fill:"fill"in i?i.fill:(_=!0,g.fill)),A=jN("stroke"in u?u.stroke:"stroke"in i?i.stroke:!f&&!l&&(!g.autoStroke||_)?(S=UN,g.stroke):null),C=u.textShadowBlur>0||i.textShadowBlur>0;v.text=t.text,v.x=o,v.y=d,C&&(v.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,v.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",v.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,v.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=t.font||Ch,v.opacity=Hu(u.opacity,i.opacity,1),HN(v,u),A&&(v.lineWidth=Hu(u.lineWidth,i.lineWidth,S),v.lineDash=ai(u.lineDash,i.lineDash),v.lineDashOffset=i.lineDashOffset||0,v.stroke=A),x&&(v.fill=x);var M=t.contentWidth,I=t.contentHeight;m.setBoundingRect(new gi(Sg(v.x,M,v.textAlign),_2(v.y,I,v.textBaseline),M,I))},e.prototype._renderBackground=function(t,i,r,a,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,d=l&&l.image,h=l&&!d,f=t.borderRadius,p=this,m,v;if(h||t.lineHeight||u&&c){m=this._getOrCreateChild(Hi),m.useStyle(m.createStyle()),m.style.fill=null;var g=m.shape;g.x=r,g.y=a,g.width=o,g.height=s,g.r=f,m.dirtyShape()}if(h){var _=m.style;_.fill=l||null,_.fillOpacity=ai(t.fillOpacity,1)}else if(d){v=this._getOrCreateChild(qo),v.onload=function(){p.dirtyStyle()};var S=v.style;S.image=l.image,S.x=r,S.y=a,S.width=o,S.height=s}if(u&&c){var _=m.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=ai(t.strokeOpacity,1),_.lineDash=t.borderDash,_.lineDashOffset=t.borderDashOffset||0,m.strokeContainThreshold=0,m.hasFill()&&m.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var x=(m||v).style;x.shadowBlur=t.shadowBlur||0,x.shadowColor=t.shadowColor||"transparent",x.shadowOffsetX=t.shadowOffsetX||0,x.shadowOffsetY=t.shadowOffsetY||0,x.opacity=Hu(t.opacity,i.opacity,1)},e.makeFont=function(t){var i="";return gq(t)&&(i=[t.fontStyle,t.fontWeight,mq(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),i&&K0(i)||t.textFont||t.font},e}(M0),hfe={left:!0,right:1,center:1},ffe={top:1,bottom:1,middle:1},VN=["fontStyle","fontWeight","fontSize","fontFamily"];function mq(n){return typeof n=="string"&&(n.indexOf("px")!==-1||n.indexOf("rem")!==-1||n.indexOf("em")!==-1)?n:isNaN(+n)?WM+"px":n+"px"}function HN(n,e){for(var t=0;t=0,a=!1;if(n instanceof Ei){var o=yq(n),s=r&&o.selectFill||o.normalFill,l=r&&o.selectStroke||o.normalStroke;if(R1(s)||R1(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=It({},i),u=It({},u),u.fill=s):!R1(u.fill)&&R1(s)?(a=!0,i=It({},i),u=It({},u),u.fill=oA(s)):!R1(u.stroke)&&R1(l)&&(a||(i=It({},i),u=It({},u)),u.stroke=oA(l)),i.style=u}}if(i&&i.z2==null){a||(i=It({},i));var c=n.z2EmphasisLift;i.z2=n.z2+(c!=null?c:Gv)}return i}function Sfe(n,e,t){if(t&&t.z2==null){t=It({},t);var i=n.z2SelectLift;t.z2=n.z2+(i!=null?i:vfe)}return t}function bfe(n,e,t){var i=xi(n.currentStates,e)>=0,r=n.style.opacity,a=i?null:yfe(n,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=It({},t),o=It({opacity:i?r:a.opacity*.1},o),t.style=o),t}function Lb(n,e){var t=this.states[n];if(this.style){if(n==="emphasis")return _fe(this,n,e,t);if(n==="blur")return bfe(this,n,t);if(n==="select")return Sfe(this,n,t)}return t}function zp(n){n.stateProxy=Lb;var e=n.getTextContent(),t=n.getTextGuideLine();e&&(e.stateProxy=Lb),t&&(t.stateProxy=Lb)}function JN(n,e){!Aq(n,e)&&!n.__highByOuter&&td(n,_q)}function QN(n,e){!Aq(n,e)&&!n.__highByOuter&&td(n,Sq)}function $c(n,e){n.__highByOuter|=1<<(e||0),td(n,_q)}function qc(n,e){!(n.__highByOuter&=~(1<<(e||0)))&&td(n,Sq)}function xq(n){td(n,hE)}function fE(n){td(n,bq)}function wq(n){td(n,mfe)}function Tq(n){td(n,gfe)}function Aq(n,e){return n.__highDownSilentOnTouch&&e.zrByTouch}function Cq(n){var e=n.getModel(),t=[],i=[];e.eachComponent(function(r,a){var o=cE(a),s=r==="series",l=s?n.getViewOfSeriesModel(a):n.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){bq(u)}),s&&t.push(a)),o.isBlured=!1}),ne(i,function(r){r&&r.toggleBlurSeries&&r.toggleBlurSeries(t,!1,e)})}function xA(n,e,t,i){var r=i.getModel();t=t||"coordinateSystem";function a(u,c){for(var d=0;d0){var s={dataIndex:o,seriesIndex:t.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function wp(n,e,t){ap(n,!0),td(n,zp),TA(n,e,t)}function Mfe(n){ap(n,!1)}function ya(n,e,t,i){i?Mfe(n):wp(n,e,t)}function TA(n,e,t){var i=ni(n);e!=null?(i.focus=e,i.blurScope=t):i.focus&&(i.focus=null)}var tk=["emphasis","blur","select"],Efe={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function jo(n,e,t,i){t=t||"itemStyle";for(var r=0;r1&&(o*=Ib(p),s*=Ib(p));var m=(r===a?-1:1)*Ib((o*o*(s*s)-o*o*(f*f)-s*s*(h*h))/(o*o*(f*f)+s*s*(h*h)))||0,v=m*o*f/s,g=m*-s*h/o,_=(n+t)/2+Yy(d)*v-Xy(d)*g,S=(e+i)/2+Xy(d)*v+Yy(d)*g,x=ak([1,0],[(h-v)/o,(f-g)/s]),A=[(h-v)/o,(f-g)/s],C=[(-1*h-v)/o,(-1*f-g)/s],M=ak(A,C);if(CA(A,C)<=-1&&(M=Im),CA(A,C)>=1&&(M=0),M<0){var I=Math.round(M/Im*1e6)/1e6;M=Im*2+I%2*Im}c.addData(u,_,S,o,s,x,M,d,a)}var Nfe=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,kfe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ffe(n){var e=new Qu;if(!n)return e;var t=0,i=0,r=t,a=i,o,s=Qu.CMD,l=n.match(Nfe);if(!l)return e;for(var u=0;uG*G+W*W&&(I=E,D=P),{cx:I,cy:D,x0:-c,y0:-d,x1:I*(r/A-1),y1:D*(r/A-1)}}function Hfe(n){var e;if($t(n)){var t=n.length;if(!t)return n;t===1?e=[n[0],n[0],0,0]:t===2?e=[n[0],n[0],n[1],n[1]]:t===3?e=n.concat(n[2]):e=n}else e=[n,n,n,n];return e}function Wfe(n,e){var t,i=bg(e.r,0),r=bg(e.r0||0,0),a=i>0,o=r>0;if(!(!a&&!o)){if(a||(i=r,r=0),r>i){var s=i;i=r,r=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,d=e.cy,h=!!e.clockwise,f=sk(u-l),p=f>Db&&f%Db;if(p>H0&&(f=p),!(i>H0))n.moveTo(c,d);else if(f>Db-H0)n.moveTo(c+i*I1(l),d+i*xf(l)),n.arc(c,d,i,l,u,!h),r>H0&&(n.moveTo(c+r*I1(u),d+r*xf(u)),n.arc(c,d,r,u,l,h));else{var m=void 0,v=void 0,g=void 0,_=void 0,S=void 0,x=void 0,A=void 0,C=void 0,M=void 0,I=void 0,D=void 0,E=void 0,P=void 0,F=void 0,V=void 0,G=void 0,W=i*I1(l),Y=i*xf(l),Q=r*I1(u),K=r*xf(u),ae=f>H0;if(ae){var ie=e.cornerRadius;ie&&(t=Hfe(ie),m=t[0],v=t[1],g=t[2],_=t[3]);var he=sk(i-r)/2;if(S=gu(he,g),x=gu(he,_),A=gu(he,m),C=gu(he,v),D=M=bg(S,x),E=I=bg(A,C),(M>H0||I>H0)&&(P=i*I1(u),F=i*xf(u),V=r*I1(l),G=r*xf(l),fH0){var ht=gu(g,D),Kt=gu(_,D),Tt=Ky(V,G,W,Y,i,ht,h),Ae=Ky(P,F,Q,K,i,Kt,h);n.moveTo(c+Tt.cx+Tt.x0,d+Tt.cy+Tt.y0),D0&&n.arc(c+Tt.cx,d+Tt.cy,ht,Jo(Tt.y0,Tt.x0),Jo(Tt.y1,Tt.x1),!h),n.arc(c,d,i,Jo(Tt.cy+Tt.y1,Tt.cx+Tt.x1),Jo(Ae.cy+Ae.y1,Ae.cx+Ae.x1),!h),Kt>0&&n.arc(c+Ae.cx,d+Ae.cy,Kt,Jo(Ae.y1,Ae.x1),Jo(Ae.y0,Ae.x0),!h))}else n.moveTo(c+W,d+Y),n.arc(c,d,i,l,u,!h);if(!(r>H0)||!ae)n.lineTo(c+Q,d+K);else if(E>H0){var ht=gu(m,E),Kt=gu(v,E),Tt=Ky(Q,K,P,F,r,-Kt,h),Ae=Ky(W,Y,V,G,r,-ht,h);n.lineTo(c+Tt.cx+Tt.x0,d+Tt.cy+Tt.y0),E0&&n.arc(c+Tt.cx,d+Tt.cy,Kt,Jo(Tt.y0,Tt.x0),Jo(Tt.y1,Tt.x1),!h),n.arc(c,d,r,Jo(Tt.cy+Tt.y1,Tt.cx+Tt.x1),Jo(Ae.cy+Ae.y1,Ae.cx+Ae.x1),h),ht>0&&n.arc(c+Ae.cx,d+Ae.cy,ht,Jo(Ae.y1,Ae.x1),Jo(Ae.y0,Ae.x0),!h))}else n.lineTo(c+Q,d+K),n.arc(c,d,r,u,l,h)}n.closePath()}}}var jfe=function(){function n(){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 n}(),kq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new jfe},e.prototype.buildPath=function(t,i){Wfe(t,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ei);kq.prototype.type="sector";const ll=kq;var $fe=function(){function n(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return n}(),Fq=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new $fe},e.prototype.buildPath=function(t,i){var r=i.cx,a=i.cy,o=Math.PI*2;t.moveTo(r+i.r,a),t.arc(r,a,i.r,0,o,!1),t.moveTo(r+i.r0,a),t.arc(r,a,i.r0,0,o,!0)},e}(Ei);Fq.prototype.type="ring";const M_=Fq;function qfe(n,e,t,i){var r=[],a=[],o=[],s=[],l,u,c,d;if(i){c=[1/0,1/0],d=[-1/0,-1/0];for(var h=0,f=n.length;h=2){if(i){var a=qfe(r,i,t,e.smoothConstraint);n.moveTo(r[0][0],r[0][1]);for(var o=r.length,s=0;s<(t?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=r[(s+1)%o];n.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{n.moveTo(r[0][0],r[0][1]);for(var s=1,d=r.length;sTf[1]){if(s=!1,a)return s;var c=Math.abs(Tf[0]-wf[1]),d=Math.abs(wf[0]-Tf[1]);Math.min(c,d)>r.len()&&(c0){var d=c.duration,h=c.delay,f=c.easing,p={duration:d,delay:h||0,easing:f,done:a,force:!!a||!!o,setToFinal:!u,scope:n,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),a&&a()}function Qi(n,e,t,i,r,a){_E("update",n,e,t,i,r,a)}function sa(n,e,t,i,r,a){_E("enter",n,e,t,i,r,a)}function X2(n){if(!n.__zr)return!0;for(var e=0;eMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function ck(n){return!n.isGroup}function fpe(n){return n.shape!=null}function S3(n,e,t){if(!n||!e)return;function i(o){var s={};return o.traverse(function(l){ck(l)&&l.anid&&(s[l.anid]=l)}),s}function r(o){var s={x:o.x,y:o.y,rotation:o.rotation};return fpe(o)&&(s.shape=It({},o.shape)),s}var a=i(n);e.traverse(function(o){if(ck(o)&&o.anid){var s=a[o.anid];if(s){var l=r(o);o.attr(r(s)),Qi(o,l,t,ni(o).dataIndex)}}})}function Yq(n,e){return Xt(n,function(t){var i=t[0];i=X5(i,e.x),i=Y5(i,e.x+e.width);var r=t[1];return r=X5(r,e.y),r=Y5(r,e.y+e.height),[i,r]})}function ppe(n,e){var t=X5(n.x,e.x),i=Y5(n.x+n.width,e.x+e.width),r=X5(n.y,e.y),a=Y5(n.y+n.height,e.y+e.height);if(i>=t&&a>=r)return{x:t,y:r,width:i-t,height:a-r}}function b3(n,e,t){var i=It({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},n)return n.indexOf("image://")===0?(r.image=n.slice(8),qn(r,t),new qo(i)):P_(n.replace("path://",""),i,t,"center")}function xg(n,e,t,i,r){for(var a=0,o=r[r.length-1];a1)return!1;var v=Nb(f,p,c,d)/h;return!(v<0||v>1)}function Nb(n,e,t,i){return n*i-t*e}function vpe(n){return n<=1e-6&&n>=-1e-6}function Qp(n){var e=n.itemTooltipOption,t=n.componentModel,i=n.itemName,r=xn(e)?{formatter:e}:e,a=t.mainType,o=t.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=n.formatterParamsExtra;l&&ne(Li(l),function(c){Mn(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ni(n.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:qn({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function dk(n,e){var t;n.isGroup&&(t=e(n)),t||n.traverse(e)}function Gh(n,e){if(n)if($t(n))for(var t=0;t=0&&s.push(l)}),s}}function Uh(n,e){return ui(ui({},n,!0),e,!0)}const Epe={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:". "}}}},Ppe={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 Z5="ZH",xE="EN",Y2=xE,a5={},wE={},nX=qi.domSupported?function(){var n=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Y2).toUpperCase();return n.indexOf(Z5)>-1?Z5:Y2}():Y2;function iX(n,e){n=n.toUpperCase(),wE[n]=new Xr(e),a5[n]=e}function Rpe(n){if(xn(n)){var e=a5[n.toUpperCase()]||{};return n===Z5||n===xE?Zn(e):ui(Zn(e),Zn(a5[Y2]),!1)}else return ui(Zn(n),Zn(a5[Y2]),!1)}function PA(n){return wE[n]}function Lpe(){return wE[Y2]}iX(xE,Epe);iX(Z5,Ppe);var TE=1e3,AE=TE*60,qg=AE*60,g0=qg*24,mk=g0*365,wg={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}"},Qy="{yyyy}-{MM}-{dd}",gk={year:"{yyyy}",month:"{yyyy}-{MM}",day:Qy,hour:Qy+" "+wg.hour,minute:Qy+" "+wg.minute,second:Qy+" "+wg.second,millisecond:wg.none},Ob=["year","month","day","hour","minute","second","millisecond"],rX=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Cd(n,e){return n+="","0000".substr(0,e-n.length)+n}function K2(n){switch(n){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return n}}function Ipe(n){return n===K2(n)}function Dpe(n){switch(n){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function I_(n,e,t,i){var r=Ju(n),a=r[CE(t)](),o=r[Z2(t)]()+1,s=Math.floor((o-1)/3)+1,l=r[D_(t)](),u=r["get"+(t?"UTC":"")+"Day"](),c=r[I9(t)](),d=(c-1)%12+1,h=r[N_(t)](),f=r[k_(t)](),p=r[F_(t)](),m=c>=12?"pm":"am",v=m.toUpperCase(),g=i instanceof Xr?i:PA(i||nX)||Lpe(),_=g.getModel("time"),S=_.get("month"),x=_.get("monthAbbr"),A=_.get("dayOfWeek"),C=_.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,m+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Cd(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,Cd(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Cd(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,A[u]).replace(/{ee}/g,C[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Cd(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Cd(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Cd(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Cd(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,Cd(p,3)).replace(/{S}/g,p+"")}function Npe(n,e,t,i,r){var a=null;if(xn(t))a=t;else if($n(t))a=t(n.value,e,{level:n.level});else{var o=It({},wg);if(n.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if($t(a)){var d=n.level==null?0:n.level>=0?n.level:a.length+n.level;d=Math.min(d,a.length-1),a=a[d]}}return I_(new Date(n.value),a,r,i)}function aX(n,e){var t=Ju(n),i=t[Z2(e)]()+1,r=t[D_(e)](),a=t[I9(e)](),o=t[N_(e)](),s=t[k_(e)](),l=t[F_(e)](),u=l===0,c=u&&s===0,d=c&&o===0,h=d&&a===0,f=h&&r===1,p=f&&i===1;return p?"year":f?"month":h?"day":d?"hour":c?"minute":u?"second":"millisecond"}function yk(n,e,t){var i=Yi(n)?Ju(n):n;switch(e=e||aX(n,t),e){case"year":return i[CE(t)]();case"half-year":return i[Z2(t)]()>=6?1:0;case"quarter":return Math.floor((i[Z2(t)]()+1)/4);case"month":return i[Z2(t)]();case"day":return i[D_(t)]();case"half-day":return i[I9(t)]()/24;case"hour":return i[I9(t)]();case"minute":return i[N_(t)]();case"second":return i[k_(t)]();case"millisecond":return i[F_(t)]()}}function CE(n){return n?"getUTCFullYear":"getFullYear"}function Z2(n){return n?"getUTCMonth":"getMonth"}function D_(n){return n?"getUTCDate":"getDate"}function I9(n){return n?"getUTCHours":"getHours"}function N_(n){return n?"getUTCMinutes":"getMinutes"}function k_(n){return n?"getUTCSeconds":"getSeconds"}function F_(n){return n?"getUTCMilliseconds":"getMilliseconds"}function kpe(n){return n?"setUTCFullYear":"setFullYear"}function oX(n){return n?"setUTCMonth":"setMonth"}function sX(n){return n?"setUTCDate":"setDate"}function lX(n){return n?"setUTCHours":"setHours"}function uX(n){return n?"setUTCMinutes":"setMinutes"}function cX(n){return n?"setUTCSeconds":"setSeconds"}function dX(n){return n?"setUTCMilliseconds":"setMilliseconds"}function hX(n){if(!X$(n))return xn(n)?n:"-";var e=(n+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function fX(n,e){return n=(n||"").toLowerCase().replace(/-(.)/g,function(t,i){return i.toUpperCase()}),e&&n&&(n=n.charAt(0).toUpperCase()+n.slice(1)),n}var Wv=KM;function RA(n,e,t){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function r(c){return c&&K0(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=n instanceof Date;if(o||s){var l=o?Ju(n):n;if(isNaN(+l)){if(s)return"-"}else return I_(l,i,t)}if(e==="ordinal")return qT(n)?r(n):Yi(n)&&a(n)?n+"":"-";var u=jc(n);return a(u)?hX(u):qT(n)?r(n):typeof n=="boolean"?n+"":"-"}var _k=["a","b","c","d","e","f","g"],Bb=function(n,e){return"{"+n+(e==null?"":e)+"}"};function pX(n,e,t){$t(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;a':'';var o=t.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:r==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function Gp(n,e){return e=e||"transparent",xn(n)?n:Kn(n)&&n.colorStops&&(n.colorStops[0]||{}).color||e}function J5(n,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=n}else window.open(n,e)}var o5=ne,vX=["left","right","top","bottom","width","height"],op=[["width","left","right"],["height","top","bottom"]];function ME(n,e,t,i,r){var a=0,o=0;i==null&&(i=1/0),r==null&&(r=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),d=e.childAt(u+1),h=d&&d.getBoundingRect(),f,p;if(n==="horizontal"){var m=c.width+(h?-h.x+c.x:0);f=a+m,f>i||l.newline?(a=0,f=m,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var v=c.height+(h?-h.y+c.y:0);p=o+v,p>r||l.newline?(a+=s+t,o=0,p=v,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),n==="horizontal"?a=f+t:o=p+t)})}var Ap=ME;si(ME,"vertical");si(ME,"horizontal");function Bpe(n,e,t){var i=e.width,r=e.height,a=_n(n.left,i),o=_n(n.top,r),s=_n(n.right,i),l=_n(n.bottom,r);return(isNaN(a)||isNaN(parseFloat(n.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(n.right)))&&(s=i),(isNaN(o)||isNaN(parseFloat(n.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(n.bottom)))&&(l=r),t=Wv(t||0),{width:Math.max(s-a-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function uo(n,e,t){t=Wv(t||0);var i=e.width,r=e.height,a=_n(n.left,i),o=_n(n.top,r),s=_n(n.right,i),l=_n(n.bottom,r),u=_n(n.width,i),c=_n(n.height,r),d=t[2]+t[0],h=t[1]+t[3],f=n.aspect;switch(isNaN(u)&&(u=i-s-h-a),isNaN(c)&&(c=r-l-d-o),f!=null&&(isNaN(u)&&isNaN(c)&&(f>i/r?u=i*.8:c=r*.8),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(a)&&(a=i-s-u-h),isNaN(o)&&(o=r-l-c-d),n.left||n.right){case"center":a=i/2-u/2-t[3];break;case"right":a=i-u-h;break}switch(n.top||n.bottom){case"middle":case"center":o=r/2-c/2-t[0];break;case"bottom":o=r-c-d;break}a=a||0,o=o||0,isNaN(u)&&(u=i-h-a-(s||0)),isNaN(c)&&(c=r-d-o-(l||0));var p=new gi(a+t[3],o+t[0],u,c);return p.margin=t,p}function O_(n,e,t,i,r,a){var o=!r||!r.hv||r.hv[0],s=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(a=a||n,a.x=n.x,a.y=n.y,!o&&!s)return!1;var u;if(l==="raw")u=n.type==="group"?new gi(0,0,+e.width||0,+e.height||0):n.getBoundingRect();else if(u=n.getBoundingRect(),n.needLocalTransform()){var c=n.getLocalTransform();u=u.clone(),u.applyTransform(c)}var d=uo(qn({width:u.width,height:u.height},e),t,i),h=o?d.x-u.x:0,f=s?d.y-u.y:0;return l==="raw"?(a.x=h,a.y=f):(a.x+=h,a.y+=f),a===n&&n.markRedraw(),!0}function zpe(n,e){return n[op[e][0]]!=null||n[op[e][1]]!=null&&n[op[e][2]]!=null}function D9(n){var e=n.layoutMode||n.constructor.layoutMode;return Kn(e)?e:e?{type:e}:null}function Rh(n,e,t){var i=t&&t.ignoreSize;!$t(i)&&(i=[i,i]);var r=o(op[0],0),a=o(op[1],1);u(op[0],n,r),u(op[1],n,a);function o(c,d){var h={},f=0,p={},m=0,v=2;if(o5(c,function(S){p[S]=n[S]}),o5(c,function(S){s(e,S)&&(h[S]=p[S]=e[S]),l(h,S)&&f++,l(p,S)&&m++}),i[d])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(m===v||!f)return p;if(f>=v)return h;for(var g=0;g=0;l--)s=ui(s,r[l],!0);i.defaultOption=s}return i.defaultOption},e.prototype.getReferringComponents=function(t,i){var r=t+"Index",a=t+"Id";return y3(this.ecModel,t,{index:this.get(r,!0),id:this.get(a,!0)},i)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Xr);rq($v,Xr);b_($v);Cpe($v);Mpe($v,Upe);function Upe(n){var e=[];return ne($v.getClassesByMainType(n),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=Xt(e,function(t){return zu(t).main}),n!=="dataset"&&xi(e,"dataset")<=0&&e.unshift("dataset"),e}const $i=$v;var gX="";typeof navigator!="undefined"&&(gX=navigator.platform||"");var D1="rgba(0, 0, 0, 0.2)";const Vpe={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:D1,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:D1,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:D1,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:D1,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:D1,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:D1,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:gX.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 yX=In(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),R0="original",hs="arrayRows",L0="objectRows",tc="keyedColumns",mh="typedArray",_X="unknown",Wu="column",qv="row",Go={Must:1,Might:2,Not:3},SX=Gi();function Hpe(n){SX(n).datasetMap=In()}function bX(n,e,t){var i={},r=PE(e);if(!r||!n)return i;var a=[],o=[],s=e.ecModel,l=SX(s).datasetMap,u=r.uid+"_"+t.seriesLayoutBy,c,d;n=n.slice(),ne(n,function(m,v){var g=Kn(m)?m:n[v]={name:m};g.type==="ordinal"&&c==null&&(c=v,d=p(g)),i[g.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:d,valueWayDim:0});ne(n,function(m,v){var g=m.name,_=p(m);if(c==null){var S=h.valueWayDim;f(i[g],S,_),f(o,S,_),h.valueWayDim+=_}else if(c===v)f(i[g],0,_),f(a,0,_);else{var S=h.categoryWayDim;f(i[g],S,_),f(o,S,_),h.categoryWayDim+=_}});function f(m,v,g){for(var _=0;_e)return n[i];return n[t-1]}function TX(n,e,t,i,r,a,o){a=a||n;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var c=o==null||!i?t:Xpe(i,o);if(c=c||t,!(!c||!c.length)){var d=c[l];return r&&(u[r]=d),s.paletteIdx=(l+1)%c.length,d}}function Ype(n,e){e(n).paletteIdx=0,e(n).paletteNameMap={}}var e6,Dm,bk,xk="\0_ec_inner",Kpe=1,AX=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.init=function(t,i,r,a,o,s){a=a||{},this.option=null,this._theme=new Xr(a),this._locale=new Xr(o),this._optionManager=s},e.prototype.setOption=function(t,i,r){var a=Ak(i);this._optionManager.setOption(t,r,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,i){return this._resetOption(t,Ak(i))},e.prototype._resetOption=function(t,i){var r=!1,a=this._optionManager;if(!t||t==="recreate"){var o=a.mountOption(t==="recreate");!this.option||t==="recreate"?bk(this,o):(this.restoreData(),this._mergeOption(o,i)),r=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=a.getTimelineOption(this);s&&(r=!0,this._mergeOption(s,i))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&ne(l,function(u){r=!0,this._mergeOption(u,i)},this)}return r},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,i){var r=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=In(),u=i&&i.replaceMergeMainTypeMap;Hpe(this),ne(t,function(d,h){d!=null&&($i.hasClass(h)?h&&(s.push(h),l.set(h,!0)):r[h]=r[h]==null?Zn(d):ui(r[h],d,!0))}),u&&u.each(function(d,h){$i.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),$i.topologicalTravel(s,$i.getAllClassMainTypes(),c,this);function c(d){var h=$pe(this,d,Ar(t[d])),f=a.get(d),p=f?u&&u.get(d)?"replaceMerge":"normalMerge":"replaceAll",m=Q$(f,h,p);hhe(m,d,$i),r[d]=null,a.set(d,null),o.set(d,0);var v=[],g=[],_=0,S;ne(m,function(x,A){var C=x.existing,M=x.newOption;if(!M)C&&(C.mergeOption({},this),C.optionUpdated({},!1));else{var I=d==="series",D=$i.getClass(d,x.keyInfo.subType,!I);if(!D)return;if(d==="tooltip"){if(S)return;S=!0}if(C&&C.constructor===D)C.name=x.keyInfo.name,C.mergeOption(M,this),C.optionUpdated(M,!1);else{var E=It({componentIndex:A},x.keyInfo);C=new D(M,this,this,E),It(C,E),x.brandNew&&(C.__requireNewView=!0),C.init(M,this,this),C.optionUpdated(null,!0)}}C?(v.push(C.option),g.push(C),_++):(v.push(void 0),g.push(void 0))},this),r[d]=v,a.set(d,g),o.set(d,_),d==="series"&&e6(this)}this._seriesIndices||e6(this)},e.prototype.getOption=function(){var t=Zn(this.option);return ne(t,function(i,r){if($i.hasClass(r)){for(var a=Ar(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!M9(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,t[r]=a}}),delete t[xk],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,i){var r=this._componentsMap.get(t);if(r){var a=r[i||0];if(a)return a;if(i==null){for(var o=0;o=e:t==="max"?n<=e:n===e}function s1e(n,e){return n.join(",")===e.join(",")}const l1e=i1e;var B0=ne,N9=Kn,Ck=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Gb(n){var e=n&&n.itemStyle;if(e)for(var t=0,i=Ck.length;t=0;v--){var g=n[v];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=the(h,_),m=_;break}}}return i[0]=h,i[1]=m,i})})}var B_=function(){function n(e){this.data=e.data||(e.sourceFormat===tc?{}:[]),this.sourceFormat=e.sourceFormat||_X,this.seriesLayoutBy=e.seriesLayoutBy||Wu,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var i=0;im&&(m=S)}f[0]=p,f[1]=m}},r=function(){return this._data?this._data.length/this._dimSize:0};Dk=(e={},e[hs+"_"+Wu]={pure:!0,appendData:a},e[hs+"_"+qv]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[L0]={pure:!0,appendData:a},e[tc]={pure:!0,appendData:function(o){var s=this._data;ne(o,function(l,u){for(var c=s[u]||(s[u]=[]),d=0;d<(l||[]).length;d++)c.push(l[d])})}},e[R0]={appendData:a},e[mh]={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&&(m=o.interpolatedValue[v])}return m!=null?m+"":""})}},n.prototype.getRawValue=function(e,t){return pv(this.getData(t),e)},n.prototype.formatTooltip=function(e,t,i){},n}();function Ok(n){var e,t;return Kn(n)?n.type&&(t=n):e=n,{text:e,frag:t}}function Xg(n){return new A1e(n)}var A1e=function(){function n(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return n.prototype.perform=function(e){var t=this._upstream,i=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var d;(this._dirty||a==="reset")&&(this._dirty=!1,d=this._doReset(i)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(d||f1&&i>0?s:o}};return a;function o(){return e=n?null:le},gte:function(n,e){return n>=e}},M1e=function(){function n(e,t){if(!Yi(t)){var i="";ur(i)}this._opFn=OX[e],this._rvalFloat=jc(t)}return n.prototype.evaluate=function(e){return Yi(e)?this._opFn(e,this._rvalFloat):this._opFn(jc(e),this._rvalFloat)},n}(),BX=function(){function n(e,t){var i=e==="desc";this._resultLT=i?1:-1,t==null&&(t=i?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return n.prototype.evaluate=function(e,t){var i=Yi(e)?e:jc(e),r=Yi(t)?t:jc(t),a=isNaN(i),o=isNaN(r);if(a&&(i=this._incomparable),o&&(r=this._incomparable),a&&o){var s=xn(e),l=xn(t);s&&(i=l?e:0),l&&(r=s?t:0)}return ir?-this._resultLT:0},n}(),E1e=function(){function n(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=jc(t)}return n.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var i=typeof e;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(t=jc(e)===this._rvalFloat)}return this._isEQ?t:!t},n}();function P1e(n,e){return n==="eq"||n==="ne"?new E1e(n==="eq",e):Mn(OX,n)?new M1e(n,e):null}var R1e=function(){function n(){}return n.prototype.getRawData=function(){throw new Error("not supported")},n.prototype.getRawDataItem=function(e){throw new Error("not supported")},n.prototype.cloneRawData=function(){},n.prototype.getDimensionInfo=function(e){},n.prototype.cloneAllDimensionInfo=function(){},n.prototype.count=function(){},n.prototype.retrieveValue=function(e,t){},n.prototype.retrieveValueFromItem=function(e,t){},n.prototype.convertValue=function(e,t){return gh(e,t)},n}();function L1e(n,e){var t=new R1e,i=n.data,r=t.sourceFormat=n.sourceFormat,a=n.startIndex,o="";n.seriesLayoutBy!==Wu&&ur(o);var s=[],l={},u=n.dimensionsDefine;if(u)ne(u,function(m,v){var g=m.name,_={index:v,name:g,displayName:m.displayName};if(s.push(_),g!=null){var S="";Mn(l,g)&&ur(S),l[g]=_}});else for(var c=0;c65535?z1e:G1e}function k1(){return[1/0,-1/0]}function U1e(n){var e=n.constructor;return e===Array?n.slice():new e(n)}function Gk(n,e,t,i,r){var a=UX[t||"float"];if(r){var o=n[e],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;uv[1]&&(v[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},n.prototype._initDataFromProvider=function(e,t,i){for(var r=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Xt(o,function(_){return _.property}),c=0;cg[1]&&(g[1]=v)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},n.prototype.count=function(){return this._count},n.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(i!=null&&ie)a=o-1;else return o}return-1},n.prototype.indicesOfNearest=function(e,t,i){var r=this._chunks,a=r[e],o=[];if(!a)return o;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,c=0,d=this.count();c=0&&l<0)&&(s=p,l=f,u=0),f===l&&(o[u++]=c))}return o.length=u,o},n.prototype.getIndices=function(){var e,t=this._indices;if(t){var i=t.constructor,r=this._count;if(i===Array){e=new i(r);for(var a=0;a=d&&_<=h||isNaN(_))&&(l[u++]=m),m++}p=!0}else if(a===2){for(var v=f[r[0]],S=f[r[1]],x=e[r[1]][0],A=e[r[1]][1],g=0;g=d&&_<=h||isNaN(_))&&(C>=x&&C<=A||isNaN(C))&&(l[u++]=m),m++}p=!0}}if(!p)if(a===1)for(var g=0;g=d&&_<=h||isNaN(_))&&(l[u++]=M)}else for(var g=0;ge[E][1])&&(I=!1)}I&&(l[u++]=t.getRawIndex(g))}return ug[1]&&(g[1]=v)}}}},n.prototype.lttbDownSample=function(e,t){var i=this.clone([e],!0),r=i._chunks,a=r[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,d,h,f=new(N1(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));f[s++]=u;for(var p=1;pc&&(c=d,h=x)}P>0&&Ps&&(m=s-c);for(var v=0;vp&&(p=_,f=c+v)}var S=this.getRawIndex(d),x=this.getRawIndex(f);dc-p&&(l=c-p,s.length=l);for(var m=0;md[1]&&(d[1]=g),h[f++]=_}return a._count=f,a._indices=h,a._updateGetRawIdx(),a},n.prototype.each=function(e,t){if(this._count)for(var i=e.length,r=this._chunks,a=0,o=this.count();al&&(l=d)}return o=[s,l],this._extent[e]=o,o},n.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var i=[],r=this._chunks,a=0;a=0?this._indices[e]:-1},n.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},n.internalField=function(){function e(t,i,r,a){return gh(t[a],this._dimensions[a])}Hb={arrayRows:e,objectRows:function(t,i,r,a){return gh(t[i],this._dimensions[a])},keyedColumns:e,original:function(t,i,r,a){var o=t&&(t.value==null?t:t.value);return gh(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(t,i,r,a){return t[a]}}}(),n}(),VX=function(){function n(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return n.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},n.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},n.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},n.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},n.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),i=!!t.length,r,a;if(t6(e)){var o=e,s=void 0,l=void 0,u=void 0;if(i){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=sl(s)?mh:R0,a=[];var d=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},f=ai(d.seriesLayoutBy,h.seriesLayoutBy)||null,p=ai(d.sourceHeader,h.sourceHeader),m=ai(d.dimensions,h.dimensions),v=f!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||m;r=v?[DA(s,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},l)]:[]}else{var g=e;if(i){var _=this._applyTransform(t);r=_.sourceList,a=_.upstreamSignList}else{var S=g.get("source",!0);r=[DA(S,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(r,a)},n.prototype._applyTransform=function(e){var t=this._sourceHost,i=t.get("transform",!0),r=t.get("fromTransformResult",!0);if(r!=null){var a="";e.length!==1&&Vk(a)}var o,s=[],l=[];return ne(e,function(u){u.prepareSource();var c=u.getSource(r||0),d="";r!=null&&!c&&Vk(d),s.push(c),l.push(u._getVersionSign())}),i?o=O1e(i,s,{datasetIndex:t.componentIndex}):r!=null&&(o=[y1e(s[0])]),{sourceList:o,upstreamSignList:l}},n.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!n.noHeader;return ne(n.blocks,function(r){var a=$X(r);a>=e&&(e=a+ +(i&&(!a||kA(r)&&!r.noHeader)))}),e}return 0}function j1e(n,e,t,i){var r=e.noHeader,a=q1e($X(e)),o=[],s=e.blocks||[];Ls(!s||$t(s)),s=s||[];var l=n.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Mn(u,l)){var c=new BX(u[l],null);s.sort(function(m,v){return c.evaluate(m.sortParam,v.sortParam)})}else l==="seriesDesc"&&s.reverse()}ne(s,function(m,v){var g=e.valueFormatter,_=jX(m)(g?It(It({},n),{valueFormatter:g}):n,m,v>0?a.html:0,i);_!=null&&o.push(_)});var d=n.renderMode==="richText"?o.join(a.richText):FA(i,o.join(""),r?t:a.html);if(r)return d;var h=RA(e.header,"ordinal",n.useUTC),f=WX(i,n.renderMode).nameStyle,p=HX(i);return n.renderMode==="richText"?qX(n,h,f)+a.richText+d:FA(i,'
'+os(h)+"
"+d,t)}function $1e(n,e,t,i){var r=n.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=n.useUTC,c=e.valueFormatter||n.valueFormatter||function(x){return x=$t(x)?x:[x],Xt(x,function(A,C){return RA(A,$t(f)?f[C]:f,u)})};if(!(a&&o)){var d=s?"":n.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),h=a?"":RA(l,"ordinal",u),f=e.valueType,p=o?[]:c(e.value,e.dataIndex),m=!s||!a,v=!s&&a,g=WX(i,r),_=g.nameStyle,S=g.valueStyle;return r==="richText"?(s?"":d)+(a?"":qX(n,h,_))+(o?"":K1e(n,p,m,v,S)):FA(i,(s?"":d)+(a?"":X1e(h,!s,_))+(o?"":Y1e(p,m,v,S)),t)}}function Hk(n,e,t,i,r,a){if(n){var o=jX(n),s={useUTC:r,renderMode:t,orderMode:i,markupStyleCreator:e,valueFormatter:n.valueFormatter};return o(s,n,0,a)}}function q1e(n){return{html:H1e[n],richText:W1e[n]}}function FA(n,e,t){var i='
',r="margin: "+t+"px 0 0",a=HX(n);return'
'+e+i+"
"}function X1e(n,e,t){var i=e?"margin-left:2px":"";return''+os(n)+""}function Y1e(n,e,t,i){var r=t?"10px":"20px",a=e?"float:right;margin-left:"+r:"";return n=$t(n)?n:[n],''+Xt(n,function(o){return os(o)}).join("  ")+""}function qX(n,e,t){return n.markupStyleCreator.wrapRichTextStyle(e,t)}function K1e(n,e,t,i,r){var a=[r],o=i?10:20;return t&&a.push({padding:[0,0,0,o],align:"right"}),n.markupStyleCreator.wrapRichTextStyle($t(e)?e.join(" "):e,a)}function XX(n,e){var t=n.getData().getItemVisual(e,"style"),i=t[n.visualDrawType];return Gp(i)}function YX(n,e){var t=n.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var Wb=function(){function n(){this.richTextStyles={},this._nextStyleNameId=Y$()}return n.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},n.prototype.makeTooltipMarker=function(e,t,i){var r=i==="richText"?this._generateStyleName():null,a=Ope({color:t,type:e,renderMode:i,markerId:r});return xn(a)?a:(this.richTextStyles[r]=a.style,a.content)},n.prototype.wrapRichTextStyle=function(e,t){var i={};$t(t)?ne(t,function(a){return It(i,a)}):It(i,t);var r=this._generateStyleName();return this.richTextStyles[r]=i,"{"+r+"|"+e+"}"},n}();function KX(n){var e=n.series,t=n.dataIndex,i=n.multipleSeries,r=e.getData(),a=r.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(t),l=$t(s),u=XX(e,t),c,d,h,f;if(o>1||l&&!o){var p=Z1e(s,e,t,a,u);c=p.inlineValues,d=p.inlineValueTypes,h=p.blocks,f=p.inlineValues[0]}else if(o){var m=r.getDimensionInfo(a[0]);f=c=pv(r,t,a[0]),d=m.type}else f=c=l?s[0]:s;var v=aE(e),g=v&&e.name||"",_=r.getName(t),S=i?g:_;return So("section",{header:g,noHeader:i||!v,sortParam:f,blocks:[So("nameValue",{markerType:"item",markerColor:u,name:S,noName:!K0(S),value:c,valueType:d,dataIndex:t})].concat(h||[])})}function Z1e(n,e,t,i,r){var a=e.getData(),o=Yu(n,function(d,h,f){var p=a.getDimensionInfo(f);return d=d||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];i.length?ne(i,function(d){c(pv(a,t,d),d)}):ne(n,c);function c(d,h){var f=a.getDimensionInfo(h);!f||f.otherDims.tooltip===!1||(o?u.push(So("nameValue",{markerType:"subItem",markerColor:r,name:f.displayName,value:d,valueType:f.type})):(s.push(d),l.push(f.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Md=Gi();function n6(n,e){return n.getName(e)||n.getId(e)}var s5="__universalTransitionEnabled",U_=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,i,r){this.seriesIndex=this.componentIndex,this.dataTask=Xg({count:Q1e,reset:e2e}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,r);var a=Md(this).sourceManager=new VX(this);a.prepareSource();var o=this.getInitialData(t,r);jk(o,this),this.dataTask.context.data=o,Md(this).dataBeforeProcessed=o,Wk(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,i){var r=D9(this),a=r?jv(t):{},o=this.subType;$i.hasClass(o)&&(o+="Series"),ui(t,i.getTheme().get(this.subType)),ui(t,this.getDefaultOption()),Fp(t,"label",["show"]),this.fillDataTextStyle(t.data),r&&Rh(t,a,r)},e.prototype.mergeOption=function(t,i){t=ui(this.option,t,!0),this.fillDataTextStyle(t.data);var r=D9(this);r&&Rh(this.option,t,r);var a=Md(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(t,i);jk(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Md(this).dataBeforeProcessed=o,Wk(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!sl(t))for(var i=["show"],r=0;rthis.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,i,r){var a=this.ecModel,o=RE.prototype.getColorFromPalette.call(this,t,i,r);return o||(o=a.getColorFromPalette(t,i,r)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,i){this._innerSelect(this.getData(i),t)},e.prototype.unselect=function(t,i){var r=this.option.selectedMap;if(r){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||r==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&r.push(o)}return r},e.prototype.isSelected=function(t,i){var r=this.option.selectedMap;if(!r)return!1;var a=this.getData(i);return(r==="all"||r[n6(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[s5])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,i){var r,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Kn(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(t,i)}},e.registerClass=function(t){return $i.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}($i);Za(U_,z_);Za(U_,RE);rq(U_,$i);function Wk(n){var e=n.name;aE(n)||(n.name=J1e(n)||e)}function J1e(n){var e=n.getRawData(),t=e.mapDimensionsAll("seriesName"),i=[];return ne(t,function(r){var a=e.getDimensionInfo(r);a.displayName&&i.push(a.displayName)}),i.join(" ")}function Q1e(n){return n.model.getRawData().count()}function e2e(n){var e=n.model;return e.setData(e.getRawData().cloneShallow()),t2e}function t2e(n,e){e.outputData&&n.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function jk(n,e){ne(x9(n.CHANGABLE_METHODS,n.DOWNSAMPLE_METHODS),function(t){n.wrapMethod(t,si(n2e,e))})}function n2e(n,e){var t=OA(n);return t&&t.setOutputEnd((e||this).count()),e}function OA(n){var e=(n.ecModel||{}).scheduler,t=e&&e.getPipeline(n.uid);if(t){var i=t.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(n.uid))}return i}}const pa=U_;var kE=function(){function n(){this.group=new ei,this.uid=Hv("viewComponent")}return n.prototype.init=function(e,t){},n.prototype.render=function(e,t,i,r){},n.prototype.dispose=function(e,t){},n.prototype.updateView=function(e,t,i,r){},n.prototype.updateLayout=function(e,t,i,r){},n.prototype.updateVisual=function(e,t,i,r){},n.prototype.toggleBlurSeries=function(e,t,i){},n.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},n}();sE(kE);b_(kE);const xa=kE;function Xv(){var n=Gi();return function(e){var t=n(e),i=e.pipelineContext,r=!!t.large,a=!!t.progressiveRender,o=t.large=!!(i&&i.large),s=t.progressiveRender=!!(i&&i.progressiveRender);return(r!==o||a!==s)&&"reset"}}var ZX=Gi(),i2e=Xv(),FE=function(){function n(){this.group=new ei,this.uid=Hv("viewChart"),this.renderTask=Xg({plan:r2e,reset:a2e}),this.renderTask.context={view:this}}return n.prototype.init=function(e,t){},n.prototype.render=function(e,t,i,r){},n.prototype.highlight=function(e,t,i,r){var a=e.getData(r&&r.dataType);a&&qk(a,r,"emphasis")},n.prototype.downplay=function(e,t,i,r){var a=e.getData(r&&r.dataType);a&&qk(a,r,"normal")},n.prototype.remove=function(e,t){this.group.removeAll()},n.prototype.dispose=function(e,t){},n.prototype.updateView=function(e,t,i,r){this.render(e,t,i,r)},n.prototype.updateLayout=function(e,t,i,r){this.render(e,t,i,r)},n.prototype.updateVisual=function(e,t,i,r){this.render(e,t,i,r)},n.prototype.eachRendered=function(e){Gh(this.group,e)},n.markUpdateMethod=function(e,t){ZX(e).updateMethod=t},n.protoInitialize=function(){var e=n.prototype;e.type="chart"}(),n}();function $k(n,e,t){n&&R9(n)&&(e==="emphasis"?$c:qc)(n,t)}function qk(n,e,t){var i=Op(n,e),r=e&&e.highlightKey!=null?Rfe(e.highlightKey):null;i!=null?ne(Ar(i),function(a){$k(n.getItemGraphicEl(a),t,r)}):n.eachItemGraphicEl(function(a){$k(a,t,r)})}sE(FE);b_(FE);function r2e(n){return i2e(n.model)}function a2e(n){var e=n.model,t=n.ecModel,i=n.api,r=n.payload,a=e.pipelineContext.progressiveRender,o=n.view,s=r&&ZX(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,i,r),o2e[l]}var o2e={incrementalPrepareRender:{progress:function(n,e){e.view.incrementalRender(n,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(n,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const Yr=FE;var Q5="\0__throttleOriginMethod",Xk="\0__throttleRate",Yk="\0__throttleType";function V_(n,e,t){var i,r=0,a=0,o=null,s,l,u,c;e=e||0;function d(){a=new Date().getTime(),o=null,n.apply(l,u||[])}var h=function(){for(var f=[],p=0;p=0?d():o=setTimeout(d,-s),r=i};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(f){c=f},h}function Yv(n,e,t,i){var r=n[e];if(r){var a=r[Q5]||r,o=r[Yk],s=r[Xk];if(s!==t||o!==i){if(t==null||!i)return n[e]=a;r=n[e]=V_(a,t,i==="debounce"),r[Q5]=a,r[Yk]=i,r[Xk]=t}return r}}function k9(n,e){var t=n[e];t&&t[Q5]&&(t.clear&&t.clear(),n[e]=t[Q5])}var Kk=Gi(),Zk={itemStyle:Bp(tX,!0),lineStyle:Bp(eX,!0)},s2e={lineStyle:"stroke",itemStyle:"fill"};function JX(n,e){var t=n.visualStyleMapper||Zk[e];return t||(console.warn("Unknown style type '"+e+"'."),Zk.itemStyle)}function QX(n,e){var t=n.visualDrawType||s2e[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var l2e={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,e){var t=n.getData(),i=n.visualStyleAccessPath||"itemStyle",r=n.getModel(i),a=JX(n,i),o=a(r),s=r.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=QX(n,i),u=o[l],c=$n(u)?u:null,d=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||d){var h=n.getColorFromPalette(n.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$n(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||$n(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(n)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(f,p){var m=n.getDataParams(p),v=It({},o);v[l]=c(m),f.setItemVisual(p,"style",v)}}}},km=new Xr,u2e={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,e){if(!(n.ignoreStyleOnData||e.isSeriesFiltered(n))){var t=n.getData(),i=n.visualStyleAccessPath||"itemStyle",r=JX(n,i),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){km.option=l[i];var u=r(km),c=o.ensureUniqueItemVisual(s,"style");It(c,u),km.option.decal&&(o.setItemVisual(s,"decal",km.option.decal),km.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},c2e={performRawSeries:!0,overallReset:function(n){var e=In();n.eachSeries(function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var r=t.type+"-"+i,a=e.get(r);a||(a={},e.set(r,a)),Kk(t).scope=a}}),n.eachSeries(function(t){if(!(t.isColorBySeries()||n.isSeriesFiltered(t))){var i=t.getRawData(),r={},a=t.getData(),o=Kk(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=QX(t,s);a.each(function(u){var c=a.getRawIndex(u);r[c]=u}),i.each(function(u){var c=r[u],d=a.getItemVisual(c,"colorFromPalette");if(d){var h=a.ensureUniqueItemVisual(c,"style"),f=i.getName(u)||u+"",p=i.count();h[l]=t.getColorFromPalette(f,o,p)}})}})}},i6=Math.PI;function d2e(n,e){e=e||{},qn(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 t=new ei,i=new Hi({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(i);var r=new Xi({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 Hi({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var o;return e.showSpinner&&(o=new gE({shape:{startAngle:-i6/2,endAngle:-i6/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:i6*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:i6*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=r.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(n.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),c=n.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:n.getWidth(),height:n.getHeight()})},t.resize(),t}var h2e=function(){function n(e,t,i,r){this._stageTaskMap=In(),this.ecInstance=e,this.api=t,i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=i.concat(r)}return n.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(i){var r=i.overallTask;r&&r.dirty()})},n.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),r=i.context,a=!t&&i.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=r&&r.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},n.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},n.prototype.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),r=e.getData(),a=r.count(),o=i.progressiveEnabled&&t.incrementalPrepareRender&&a>=i.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},n.prototype.restorePipelines=function(e){var t=this,i=t._pipelineMap=In();e.eachSeries(function(r){var a=r.getProgressive(),o=r.uid;i.set(o,{id:o,head:null,tail:null,threshold:r.getProgressiveThreshold(),progressiveEnabled:a&&!(r.preventIncremental&&r.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(r,r.dataTask)})},n.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),i=this.api;ne(this._allHandlers,function(r){var a=e.get(r.uid)||e.set(r.uid,{}),o="";Ls(!(r.reset&&r.overallReset),o),r.reset&&this._createSeriesStageTask(r,a,t,i),r.overallReset&&this._createOverallStageTask(r,a,t,i)},this)},n.prototype.prepareView=function(e,t,i,r){var a=e.renderTask,o=a.context;o.model=t,o.ecModel=i,o.api=r,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},n.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},n.prototype.performVisualTasks=function(e,t,i){this._performStageTasks(this._visualHandlers,e,t,i)},n.prototype._performStageTasks=function(e,t,i,r){r=r||{};var a=!1,o=this;ne(e,function(l,u){if(!(r.visualType&&r.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),d=c.seriesTaskMap,h=c.overallTask;if(h){var f,p=h.agentStubMap;p.each(function(v){s(r,v)&&(v.dirty(),f=!0)}),f&&h.dirty(),o.updatePayload(h,i);var m=o.getPerformArgs(h,r.block);p.each(function(v){v.perform(m)}),h.perform(m)&&(a=!0)}else d&&d.each(function(v,g){s(r,v)&&v.dirty();var _=o.getPerformArgs(v,r.block);_.skip=!l.performRawSeries&&t.isSeriesFiltered(v.context.model),o.updatePayload(v,i),v.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},n.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(i){t=i.dataTask.perform()||t}),this.unfinished=t||this.unfinished},n.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},n.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},n.prototype._createSeriesStageTask=function(e,t,i,r){var a=this,o=t.seriesTaskMap,s=t.seriesTaskMap=In(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,r).each(c);function c(d){var h=d.uid,f=s.set(h,o&&o.get(h)||Xg({plan:g2e,reset:y2e,count:S2e}));f.context={model:d,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(d,f)}},n.prototype._createOverallStageTask=function(e,t,i,r){var a=this,o=t.overallTask=t.overallTask||Xg({reset:f2e});o.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=In(),u=e.seriesType,c=e.getTargetSeries,d=!0,h=!1,f="";Ls(!e.createOnAllSeries,f),u?i.eachRawSeriesByType(u,p):c?c(i,r).each(p):(d=!1,ne(i.getSeries(),p));function p(m){var v=m.uid,g=l.set(v,s&&s.get(v)||(h=!0,Xg({reset:p2e,onDirty:m2e})));g.context={model:m,overallProgress:d},g.agent=o,g.__block=d,a._pipe(m,g)}h&&o.dirty()},n.prototype._pipe=function(e,t){var i=e.uid,r=this._pipelineMap.get(i);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},n.wrapStageHandler=function(e,t){return $n(e)&&(e={overallReset:e,seriesType:b2e(e)}),e.uid=Hv("stageHandler"),t&&(e.visualType=t),e},n}();function f2e(n){n.overallReset(n.ecModel,n.api,n.payload)}function p2e(n){return n.overallProgress&&v2e}function v2e(){this.agent.dirty(),this.getDownstream().dirty()}function m2e(){this.agent&&this.agent.dirty()}function g2e(n){return n.plan?n.plan(n.model,n.ecModel,n.api,n.payload):null}function y2e(n){n.useClearVisual&&n.data.clearAllVisual();var e=n.resetDefines=Ar(n.reset(n.model,n.ecModel,n.api,n.payload));return e.length>1?Xt(e,function(t,i){return eY(i)}):_2e}var _2e=eY(0);function eY(n){return function(e,t){var i=t.data,r=t.resetDefines[n];if(r&&r.dataEach)for(var a=e.start;a0&&f===u.length-h.length){var p=u.slice(0,f);p!=="data"&&(t.mainType=p,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(r[u]=l)})}return{cptQuery:t,dataQuery:i,otherQuery:r}},n.prototype.filter=function(e,t){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,r,a));function c(d,h,f,p){return d[f]==null||h[p||f]===d[f]}},n.prototype.afterTrigger=function(){this.eventInfo=null},n}(),BA=["symbol","symbolSize","symbolRotate","symbolOffset"],tF=BA.concat(["symbolKeepAspect"]),A2e={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,e){var t=n.getData();if(n.legendIcon&&t.setVisual("legendIcon",n.legendIcon),!n.hasSymbolVisual)return;for(var i={},r={},a=!1,o=0;o=0&&lp(l)?l:.5;var u=n.createRadialGradient(o,s,0,o,s,l);return u}function zA(n,e,t){for(var i=e.type==="radial"?U2e(n,e,t):G2e(n,e,t),r=e.colorStops,a=0;a0)?null:n==="dashed"?[4*e,2*e]:n==="dotted"?[e]:Yi(n)?[n]:$t(n)?n:null}function BE(n){var e=n.style,t=e.lineDash&&e.lineWidth>0&&H2e(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(t){var r=e.strokeNoScale&&n.getLineScale?n.getLineScale():1;r&&r!==1&&(t=Xt(t,function(a){return a/r}),i/=r)}return[t,i]}var W2e=new Qu(!0);function n8(n){var e=n.stroke;return!(e==null||e==="none"||!(n.lineWidth>0))}function nF(n){return typeof n=="string"&&n!=="none"}function i8(n){var e=n.fill;return e!=null&&e!=="none"}function iF(n,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=n.globalAlpha;n.globalAlpha=e.fillOpacity*e.opacity,n.fill(),n.globalAlpha=t}else n.fill()}function rF(n,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=n.globalAlpha;n.globalAlpha=e.strokeOpacity*e.opacity,n.stroke(),n.globalAlpha=t}else n.stroke()}function GA(n,e,t){var i=lE(e.image,e.__image,t);if(x_(i)){var r=n.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&r&&r.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*q4),a.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(a)}return r}}function j2e(n,e,t,i){var r,a=n8(t),o=i8(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||W2e,d=e.__dirty;if(!i){var h=t.fill,f=t.stroke,p=o&&!!h.colorStops,m=a&&!!f.colorStops,v=o&&!!h.image,g=a&&!!f.image,_=void 0,S=void 0,x=void 0,A=void 0,C=void 0;(p||m)&&(C=e.getBoundingRect()),p&&(_=d?zA(n,h,C):e.__canvasFillGradient,e.__canvasFillGradient=_),m&&(S=d?zA(n,f,C):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),v&&(x=d||!e.__canvasFillPattern?GA(n,h,e):e.__canvasFillPattern,e.__canvasFillPattern=x),g&&(A=d||!e.__canvasStrokePattern?GA(n,f,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),p?n.fillStyle=_:v&&(x?n.fillStyle=x:o=!1),m?n.strokeStyle=S:g&&(A?n.strokeStyle=A:a=!1)}var M=e.getGlobalScale();c.setScale(M[0],M[1],e.segmentIgnoreThreshold);var I,D;n.setLineDash&&t.lineDash&&(r=BE(e),I=r[0],D=r[1]);var E=!0;(u||d&y2)&&(c.setDPR(n.dpr),l?c.setContext(null):(c.setContext(n),E=!1),c.reset(),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),E&&c.rebuildPath(n,l?s:1),I&&(n.setLineDash(I),n.lineDashOffset=D),i||(t.strokeFirst?(a&&rF(n,t),o&&iF(n,t)):(o&&iF(n,t),a&&rF(n,t))),I&&n.setLineDash([])}function $2e(n,e,t){var i=e.__image=lE(t.image,e.__image,e,e.onload);if(!(!i||!x_(i))){var r=t.x||0,a=t.y||0,o=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;n.drawImage(i,u,c,t.sWidth,t.sHeight,r,a,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,d=o-u,h=s-c;n.drawImage(i,u,c,d,h,r,a,o,s)}else n.drawImage(i,r,a,o,s)}}function q2e(n,e,t){var i,r=t.text;if(r!=null&&(r+=""),r){n.font=t.font||Ch,n.textAlign=t.textAlign,n.textBaseline=t.textBaseline;var a=void 0,o=void 0;n.setLineDash&&t.lineDash&&(i=BE(e),a=i[0],o=i[1]),a&&(n.setLineDash(a),n.lineDashOffset=o),t.strokeFirst?(n8(t)&&n.strokeText(r,t.x,t.y),i8(t)&&n.fillText(r,t.x,t.y)):(i8(t)&&n.fillText(r,t.x,t.y),n8(t)&&n.strokeText(r,t.x,t.y)),a&&n.setLineDash([])}}var aF=["shadowBlur","shadowOffsetX","shadowOffsetY"],oF=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function sY(n,e,t,i,r){var a=!1;if(!i&&(t=t||{},e===t))return!1;if(i||e.opacity!==t.opacity){Xs(n,r),a=!0;var o=Math.max(Math.min(e.opacity,1),0);n.globalAlpha=isNaN(o)?bp.opacity:o}(i||e.blend!==t.blend)&&(a||(Xs(n,r),a=!0),n.globalCompositeOperation=e.blend||bp.blend);for(var s=0;s0&&t.unfinished);t.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(t,i,r){if(!this[Qo]){if(this._disposed){this.id;return}var a,o,s;if(Kn(i)&&(r=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Qo]=!0,!this._model||i){var l=new l1e(this._api),u=this._theme,c=this._model=new CX;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},VA);var d={seriesTransition:s,optionChanged:!0};if(r)this[zs]={silent:a,updateParams:d},this[Qo]=!1,this.getZr().wakeUp();else{try{O1(this),Ed.update.call(this,null,d)}catch(h){throw this[zs]=null,this[Qo]=!1,h}this._ssr||this._zr.flush(),this[zs]=null,this[Qo]=!1,Fm.call(this,a),Om.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||qi.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var i=this._zr.painter;return i.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(qi.svgSupported){var t=this._zr,i=t.storage.getDisplayList();return ne(i,function(r){r.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var i=t.excludeComponents,r=this._model,a=[],o=this;ne(i,function(l){r.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return ne(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var i=t.type==="svg",r=this.group,a=Math.min,o=Math.max,s=1/0;if(bF[r]){var l=s,u=s,c=-s,d=-s,h=[],f=t&&t.pixelRatio||this.getDevicePixelRatio();ne(Kg,function(S,x){if(S.group===r){var A=i?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(Zn(t)),C=S.getDom().getBoundingClientRect();l=a(C.left,l),u=a(C.top,u),c=o(C.right,c),d=o(C.bottom,d),h.push({dom:A,left:C.left,top:C.top})}}),l*=f,u*=f,c*=f,d*=f;var p=c-l,m=d-u,v=Mh.createCanvas(),g=CN(v,{renderer:i?"svg":"canvas"});if(g.resize({width:p,height:m}),i){var _="";return ne(h,function(S){var x=S.left-l,A=S.top-u;_+=''+S.dom+""}),g.painter.getSvgRoot().innerHTML=_,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new Hi({shape:{x:0,y:0,width:p,height:m},style:{fill:t.connectedBackgroundColor}})),ne(h,function(S){var x=new qo({style:{x:S.left*f-l,y:S.top*f-u,image:S.dom}});g.add(x)}),g.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,i){return Yb(this,"convertToPixel",t,i)},e.prototype.convertFromPixel=function(t,i){return Yb(this,"convertFromPixel",t,i)},e.prototype.containPixel=function(t,i){if(this._disposed){this.id;return}var r=this._model,a,o=Hg(r,t);return ne(o,function(s,l){l.indexOf("Models")>=0&&ne(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(i);else if(l==="seriesModels"){var d=this._chartsMap[u.__viewId];d&&d.containPoint&&(a=a||d.containPoint(i,u))}},this)},this),!!a},e.prototype.getVisual=function(t,i){var r=this._model,a=Hg(r,t,{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?OE(s,l,i):w3(s,i)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;ne(_ve,function(i){var r=function(a){var o=t.getModel(),s=a.target,l,u=i==="globalout";if(u?l={}:s&&sp(s,function(p){var m=ni(p);if(m&&m.dataIndex!=null){var v=m.dataModel||o.getSeriesByIndex(m.seriesIndex);return l=v&&v.getDataParams(m.dataIndex,m.dataType,s)||{},!0}else if(m.eventData)return l=It({},m.eventData),!0},!0),l){var c=l.componentType,d=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",d=l.seriesIndex);var h=c&&d!=null&&o.getComponent(c,d),f=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=a,l.type=i,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:f},t.trigger(i,l)}};r.zrEventfulCallAtLast=!0,t._zr.on(i,r,t)}),ne(Yg,function(i,r){t._messageCenter.on(r,function(a){this.trigger(r,a)},t)}),ne(["selectchanged"],function(i){t._messageCenter.on(i,function(r){this.trigger(i,r)},t)}),M2e(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 t=this.getDom();t&&tq(this.getDom(),UE,"");var i=this,r=i._api,a=i._model;ne(i._componentsViews,function(o){o.dispose(a,r)}),ne(i._chartsViews,function(o){o.dispose(a,r)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete Kg[i.id]},e.prototype.resize=function(t){if(!this[Qo]){if(this._disposed){this.id;return}this._zr.resize(t);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var r=i.resetOption("media"),a=t&&t.silent;this[zs]&&(a==null&&(a=this[zs].silent),r=!0,this[zs]=null),this[Qo]=!0;try{r&&O1(this),Ed.update.call(this,{type:"resize",animation:It({duration:0},t&&t.animation)})}catch(o){throw this[Qo]=!1,o}this[Qo]=!1,Fm.call(this,a),Om.call(this,a)}}},e.prototype.showLoading=function(t,i){if(this._disposed){this.id;return}if(Kn(t)&&(i=t,t=""),t=t||"default",this.hideLoading(),!!HA[t]){var r=HA[t](this._api,i),a=this._zr;this._loadingFX=r,a.add(r)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var i=It({},t);return i.type=Yg[t.type],i},e.prototype.dispatchAction=function(t,i){if(this._disposed){this.id;return}if(Kn(i)||(i={silent:!!i}),!!r8[t.type]&&this._model){if(this[Qo]){this._pendingActions.push(t);return}var r=i.silent;Zb.call(this,t,r);var a=i.flush;a?this._zr.flush():a!==!1&&qi.browser.weChat&&this._throttledZrFlush(),Fm.call(this,r),Om.call(this,r)}},e.prototype.updateLabelLayout=function(){j0.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var i=t.seriesIndex,r=this.getModel(),a=r.getSeriesByIndex(i);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){O1=function(d){var h=d._scheduler;h.restorePipelines(d._model),h.prepareStageTasks(),Xb(d,!0),Xb(d,!1),h.plan()},Xb=function(d,h){for(var f=d._model,p=d._scheduler,m=h?d._componentsViews:d._chartsViews,v=h?d._componentsMap:d._chartsMap,g=d._zr,_=d._api,S=0;Sh.get("hoverLayerThreshold")&&!qi.node&&!qi.worker&&h.eachSeries(function(v){if(!v.preventUsingHoverLayer){var g=d._chartsMap[v.__viewId];g.__alive&&g.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function o(d,h){var f=d.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=f)})}function s(d,h){if(!d.preventAutoZ){var f=d.get("z")||0,p=d.get("zlevel")||0;h.eachRendered(function(m){return l(m,f,p,-1/0),!0})}}function l(d,h,f,p){var m=d.getTextContent(),v=d.getTextGuideLine(),g=d.isGroup;if(g)for(var _=d.childrenRef(),S=0;S<_.length;S++)p=Math.max(l(_[S],h,f,p),p);else d.z=h,d.zlevel=f,p=Math.max(d.z2,p);if(m&&(m.z=h,m.zlevel=f,isFinite(p)&&(m.z2=p+2)),v){var x=d.textGuideLineConfig;v.z=h,v.zlevel=f,isFinite(p)&&(v.z2=p+(x&&x.showAbove?1:-1))}return p}function u(d,h){h.eachRendered(function(f){if(!X2(f)){var p=f.getTextContent(),m=f.getTextGuideLine();f.stateTransition&&(f.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),f.hasState()?(f.prevStates=f.currentStates,f.clearStates()):f.prevStates&&(f.prevStates=null)}})}function c(d,h){var f=d.getModel("stateAnimation"),p=d.isAnimationEnabled(),m=f.get("duration"),v=m>0?{duration:m,delay:f.get("delay"),easing:f.get("easing")}:null;h.eachRendered(function(g){if(g.states&&g.states.emphasis){if(X2(g))return;if(g instanceof Ei&&Lfe(g),g.__dirty){var _=g.prevStates;_&&g.useStates(_)}if(p){g.stateTransition=v;var S=g.getTextContent(),x=g.getTextGuideLine();S&&(S.stateTransition=v),x&&(x.stateTransition=v)}g.__dirty&&r(g)}})}_F=function(d){return new(function(h){ot(f,h);function f(){return h!==null&&h.apply(this,arguments)||this}return f.prototype.getCoordinateSystems=function(){return d._coordSysMgr.getCoordinateSystems()},f.prototype.getComponentByElement=function(p){for(;p;){var m=p.__ecComponentInfo;if(m!=null)return d._model.getComponent(m.mainType,m.index);p=p.parent}},f.prototype.enterEmphasis=function(p,m){$c(p,m),Yl(d)},f.prototype.leaveEmphasis=function(p,m){qc(p,m),Yl(d)},f.prototype.enterBlur=function(p){xq(p),Yl(d)},f.prototype.leaveBlur=function(p){fE(p),Yl(d)},f.prototype.enterSelect=function(p){wq(p),Yl(d)},f.prototype.leaveSelect=function(p){Tq(p),Yl(d)},f.prototype.getModel=function(){return d.getModel()},f.prototype.getViewOfComponentModel=function(p){return d.getViewOfComponentModel(p)},f.prototype.getViewOfSeriesModel=function(p){return d.getViewOfSeriesModel(p)},f}(MX))(d)},xY=function(d){function h(f,p){for(var m=0;m=0)){xF.push(t);var a=iY.wrapStageHandler(t,r);a.__prio=e,a.__raw=t,n.push(a)}}function EY(n,e){HA[n]=e}function Mve(n,e,t){var i=rve("registerMap");i&&i(n,e,t)}var Eve=F1e;i1(zE,l2e);i1(H_,u2e);i1(H_,c2e);i1(zE,A2e);i1(H_,C2e);i1(mY,tve);CY(PX);MY(sve,m1e);EY("default",d2e);nc({type:xp,event:xp,update:xp},Ba);nc({type:n5,event:n5,update:n5},Ba);nc({type:Wg,event:Wg,update:Wg},Ba);nc({type:i5,event:i5,update:i5},Ba);nc({type:jg,event:jg,update:jg},Ba);AY("light",x2e);AY("dark",w2e);var wF=[],Pve={registerPreprocessor:CY,registerProcessor:MY,registerPostInit:wve,registerPostUpdate:Tve,registerUpdateLifecycle:VE,registerAction:nc,registerCoordinateSystem:Ave,registerLayout:Cve,registerVisual:i1,registerTransform:Eve,registerLoading:EY,registerMap:Mve,registerImpl:ive,PRIORITY:mve,ComponentModel:$i,ComponentView:xa,SeriesModel:pa,ChartView:Yr,registerComponentModel:function(n){$i.registerClass(n)},registerComponentView:function(n){xa.registerClass(n)},registerSeriesModel:function(n){pa.registerClass(n)},registerChartView:function(n){Yr.registerClass(n)},registerSubTypeDefaulter:function(n,e){$i.registerSubTypeDefaulter(n,e)},registerPainter:function(n,e){Yde(n,e)}};function Ci(n){if($t(n)){ne(n,function(e){Ci(e)});return}xi(wF,n)>=0||(wF.push(n),$n(n)&&(n={install:n}),n.install(Pve))}function Bm(n){return n==null?0:n.length||1}function TF(n){return n}var Rve=function(){function n(e,t,i,r,a,o){this._old=e,this._new=t,this._oldKeyGetter=i||TF,this._newKeyGetter=r||TF,this.context=a,this._diffModeMultiple=o==="multiple"}return n.prototype.add=function(e){return this._add=e,this},n.prototype.update=function(e){return this._update=e,this},n.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},n.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},n.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},n.prototype.remove=function(e){return this._remove=e,this},n.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},n.prototype._executeOneToOne=function(){var e=this._old,t=this._new,i={},r=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,i,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(c,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},n.prototype._executeMultiple=function(){var e=this._old,t=this._new,i={},r={},a=[],o=[];this._initIndexMap(e,i,a,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),r[l]=null;else if(d===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),r[l]=null;else if(d===1&&h===1)this._update&&this._update(c,u),r[l]=null;else if(d>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),r[l]=null;else if(d>1)for(var f=0;f1)for(var s=0;s30}var zm=Kn,Pd=Xt,Ove=typeof Int32Array=="undefined"?Array:Int32Array,Bve="e\0\0",AF=-1,zve=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Gve=["_approximateExtent"],CF,l6,Gm,Um,ex,Vm,tx,Uve=function(){function n(e,t){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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var i,r=!1;RY(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,i=e),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=t)){var i=this._store,r=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=r.getSource().sourceFormat,l=s===R0;if(l&&!r.pure)for(var u=[],c=e;c0},n.prototype.ensureUniqueItemVisual=function(e,t){var i=this._itemVisuals,r=i[e];r||(r=i[e]={});var a=r[t];return a==null&&(a=this.getVisual(t),$t(a)?a=a.slice():zm(a)&&(a=It({},a)),r[t]=a),a},n.prototype.setItemVisual=function(e,t,i){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,zm(t)?It(r,t):r[t]=i},n.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},n.prototype.setLayout=function(e,t){zm(e)?It(this._layout,e):this._layout[e]=t},n.prototype.getLayout=function(e){return this._layout[e]},n.prototype.getItemLayout=function(e){return this._itemLayouts[e]},n.prototype.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?It(this._itemLayouts[e]||{},t):t},n.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},n.prototype.setItemGraphicEl=function(e,t){var i=this.hostModel&&this.hostModel.seriesIndex;bA(i,this.dataType,e,t),this._graphicEls[e]=t},n.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},n.prototype.eachItemGraphicEl=function(e,t){ne(this._graphicEls,function(i,r){i&&e&&e.call(t,i,r)})},n.prototype.cloneShallow=function(e){return e||(e=new n(this._schema?this._schema:Pd(this.dimensions,this._getDimInfo,this),this.hostModel)),ex(e,this),e._store=this._store,e},n.prototype.wrapMethod=function(e,t){var i=this[e];$n(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var r=i.apply(this,arguments);return t.apply(this,[r].concat(YM(arguments)))})},n.internalField=function(){CF=function(e){var t=e._invertedIndicesMap;ne(t,function(i,r){var a=e._dimInfos[r],o=a.ordinalMeta,s=e._store;if(o){i=t[r]=new Ove(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),r[t]=l}}}(),n}();const Rs=Uve;function T3(n,e){LE(n)||(n=IE(n)),e=e||{};var t=e.coordDimensions||[],i=e.dimensionsDefine||n.dimensionsDefine||[],r=In(),a=[],o=Hve(n,t,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&DY(o),l=i===n.dimensionsDefine,u=l?IY(n):LY(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(n,o));for(var d=In(c),h=new GX(o),f=0;f0&&(i.name=r+(a-1)),a++,e.set(r,a)}}function Hve(n,e,t,i){var r=Math.max(n.dimensionsDetectedCount||1,e.length,t.length,i||0);return ne(e,function(a){var o;Kn(a)&&(o=a.dimsDef)&&(r=Math.max(r,o.length))}),r}function Wve(n,e,t){if(t||e.hasKey(n)){for(var i=0;e.hasKey(n+i);)i++;n+=i}return e.set(n,!0),n}var jve=function(){function n(e){this.coordSysDims=[],this.axisMap=In(),this.categoryAxisMap=In(),this.coordSysName=e}return n}();function $ve(n){var e=n.get("coordinateSystem"),t=new jve(e),i=qve[e];if(i)return i(n,t,t.axisMap,t.categoryAxisMap),t}var qve={cartesian2d:function(n,e,t,i){var r=n.getReferringComponents("xAxis",Xa).models[0],a=n.getReferringComponents("yAxis",Xa).models[0];e.coordSysDims=["x","y"],t.set("x",r),t.set("y",a),B1(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),B1(a)&&(i.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(n,e,t,i){var r=n.getReferringComponents("singleAxis",Xa).models[0];e.coordSysDims=["single"],t.set("single",r),B1(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(n,e,t,i){var r=n.getReferringComponents("polar",Xa).models[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",o),B1(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),B1(o)&&(i.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(n,e,t,i){e.coordSysDims=["lng","lat"]},parallel:function(n,e,t,i){var r=n.ecModel,a=r.getComponent("parallel",n.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();ne(a.parallelAxisIndex,function(s,l){var u=r.getComponent("parallelAxis",s),c=o[l];t.set(c,u),B1(u)&&(i.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function B1(n){return n.get("type")==="category"}function Xve(n,e,t){t=t||{};var i=t.byIndex,r=t.stackedCoordDimension,a,o,s;Yve(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(n&&n.get("stack")),u,c,d,h;if(ne(a,function(_,S){xn(_)&&(a[S]=_={name:_}),l&&!_.isExtraCoord&&(!i&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!r||r===_.coordDim)&&(c=_))}),c&&!i&&!u&&(i=!0),c){d="__\0ecstackresult_"+n.id,h="__\0ecstackedover_"+n.id,u&&(u.createInvertedIndices=!0);var f=c.coordDim,p=c.type,m=0;ne(a,function(_){_.coordDim===f&&m++});var v={name:d,coordDim:f,coordDimIndex:m,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},g={name:h,coordDim:h,coordDimIndex:m+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(h,p),g.storeDimIndex=s.ensureCalculationDimension(d,p)),o.appendCalculationDimension(v),o.appendCalculationDimension(g)):(a.push(v),a.push(g))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:h,stackResultDimension:d}}function Yve(n){return!RY(n.schema)}function Lh(n,e){return!!e&&e===n.getCalculationInfo("stackedDimension")}function NY(n,e){return Lh(n,e)?n.getCalculationInfo("stackResultDimension"):e}function Kve(n,e){var t=n.get("coordinateSystem"),i=x3.get(t),r;return e&&e.coordSysDims&&(r=Xt(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=o8(l)}return o})),r||(r=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),r}function Zve(n,e,t){var i,r;return t&&ne(n,function(a,o){var s=a.coordDim,l=t.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(r=!0)}),!r&&i!=null&&(n[i].otherDims.itemName=0),i}function nd(n,e,t){t=t||{};var i=e.getSourceManager(),r,a=!1;n?(a=!0,r=IE(n)):(r=i.getSource(),a=r.sourceFormat===R0);var o=$ve(e),s=Kve(e,o),l=t.useEncodeDefaulter,u=$n(l)?l:l?si(bX,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},d=T3(r,c),h=Zve(d.dimensions,t.createInvertedIndices,o),f=a?null:i.getSharedDataStore(d),p=Xve(e,{schema:d,store:f}),m=new Rs(d,e);m.setCalculationInfo(p);var v=h!=null&&Jve(r)?function(g,_,S,x){return x===h?S:this.defaultDimValueGetter(g,_,S,x)}:null;return m.hasItemOption=!1,m.initData(a?r:f,null,v),m}function Jve(n){if(n.sourceFormat===R0){var e=Qve(n.data||[]);return!$t(zv(e))}}function Qve(n){for(var e=0;et[1]&&(t[1]=e[1])},n.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},n.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},n.prototype.isBlank=function(){return this._isBlank},n.prototype.setBlank=function(e){this._isBlank=e},n}();b_(kY);const id=kY;var eme=0,tme=function(){function n(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++eme}return n.createByAxisModel=function(e){var t=e.option,i=t.data,r=i&&Xt(i,nme);return new n({categories:r,needCollect:!r,deduplication:t.dedplication!==!1})},n.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},n.prototype.parseAndCollect=function(e){var t,i=this._needCollect;if(!xn(e)&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return t=r.get(e),t==null&&(i?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},n.prototype._getOrCreateMap=function(){return this._map||(this._map=In(this.categories))},n}();function nme(n){return Kn(n)&&n.value!=null?n.value:n+""}const WA=tme;function jA(n){return n.type==="interval"||n.type==="log"}function ime(n,e,t,i){var r={},a=n[1]-n[0],o=r.interval=q$(a/e,!0);t!=null&&oi&&(o=r.interval=i);var s=r.intervalPrecision=FY(o),l=r.niceTickExtent=[Ra(Math.ceil(n[0]/o)*o,s),Ra(Math.floor(n[1]/o)*o,s)];return rme(l,n),r}function nx(n){var e=Math.pow(10,rE(n)),t=n/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Ra(t*e)}function FY(n){return Bu(n)+2}function MF(n,e,t){n[e]=Math.max(Math.min(n[e],t[1]),t[0])}function rme(n,e){!isFinite(n[0])&&(n[0]=e[0]),!isFinite(n[1])&&(n[1]=e[1]),MF(n,0,e),MF(n,1,e),n[0]>n[1]&&(n[0]=n[1])}function W_(n,e){return n>=e[0]&&n<=e[1]}function j_(n,e){return e[1]===e[0]?.5:(n-e[0])/(e[1]-e[0])}function $_(n,e){return n*(e[1]-e[0])+e[0]}var OY=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;i.type="ordinal";var r=i.getSetting("ordinalMeta");return r||(r=new WA({})),$t(r)&&(r=new WA({categories:Xt(r,function(a){return Kn(a)?a.value:a})})),i._ordinalMeta=r,i._extent=i.getSetting("extent")||[0,r.categories.length-1],i}return e.prototype.parse=function(t){return t==null?NaN:xn(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),W_(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),j_(t,this._extent)},e.prototype.scale=function(t){return t=Math.round($_(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],i=this._extent,r=i[0];r<=i[1];)t.push({value:r}),r++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=t.ordinalNumbers,r=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(id);id.registerClass(OY);const WE=OY;var Ef=Ra,BY=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return W_(t,this._extent)},e.prototype.normalize=function(t){return j_(t,this._extent)},e.prototype.scale=function(t){return $_(t,this._extent)},e.prototype.setExtent=function(t,i){var r=this._extent;isNaN(t)||(r[0]=parseFloat(t)),isNaN(i)||(r[1]=parseFloat(i))},e.prototype.unionExtent=function(t){var i=this._extent;t[0]i[1]&&(i[1]=t[1]),this.setExtent(i[0],i[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=FY(t)},e.prototype.getTicks=function(t){var i=this._interval,r=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;r[0]l)return[];var c=s.length?s[s.length-1].value:a[1];return r[1]>c&&(t?s.push({value:Ef(c+i,o)}):s.push({value:r[1]})),s},e.prototype.getMinorTicks=function(t){for(var i=this.getTicks(!0),r=[],a=this.getExtent(),o=1;oa[0]&&f0&&(a=a===null?s:Math.min(a,s))}t[i]=a}}return t}function UY(n){var e=sme(n),t=[];return ne(n,function(i){var r=i.coordinateSystem,a=r.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],c=Math.abs(o[1]-o[0]),d=a.scale.getExtent(),h=Math.abs(d[1]-d[0]);s=u?c/h*u:c}else{var f=i.getData();s=Math.abs(o[1]-o[0])/f.count()}var p=_n(i.get("barWidth"),s),m=_n(i.get("barMaxWidth"),s),v=_n(i.get("barMinWidth")||($Y(i)?.5:1),s),g=i.get("barGap"),_=i.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:m,barMinWidth:v,barGap:g,barCategoryGap:_,axisKey:$E(a),stackId:jE(i)})}),VY(t)}function VY(n){var e={};ne(n,function(i,r){var a=i.axisKey,o=i.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=i.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var d=i.barMaxWidth;d&&(l[u].maxWidth=d);var h=i.barMinWidth;h&&(l[u].minWidth=h);var f=i.barGap;f!=null&&(s.gap=f);var p=i.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return ne(e,function(i,r){t[r]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=Li(a).length;s=Math.max(35-l*4,15)+"%"}var u=_n(s,o),c=_n(i.gap,1),d=i.remainedWidth,h=i.autoWidthCount,f=(d-u)/(h+(h-1)*c);f=Math.max(f,0),ne(a,function(g){var _=g.maxWidth,S=g.minWidth;if(g.width){var x=g.width;_&&(x=Math.min(x,_)),S&&(x=Math.max(x,S)),g.width=x,d-=x+c*x,h--}else{var x=f;_&&_x&&(x=S),x!==f&&(g.width=x,d-=x+c*x,h--)}}),f=(d-u)/(h+(h-1)*c),f=Math.max(f,0);var p=0,m;ne(a,function(g,_){g.width||(g.width=f),m=g,p+=g.width*(1+c)}),m&&(p-=m.width*c);var v=-p/2;ne(a,function(g,_){t[r][_]=t[r][_]||{bandWidth:o,offset:v,width:g.width},v+=g.width*(1+c)})}),t}function lme(n,e,t){if(n&&e){var i=n[$E(e)];return i!=null&&t!=null?i[jE(t)]:i}}function HY(n,e){var t=GY(n,e),i=UY(t);ne(t,function(r){var a=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=jE(r),u=i[$E(s)][l],c=u.offset,d=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:d})})}function WY(n){return{seriesType:n,plan:Xv(),reset:function(e){if(jY(e)){var t=e.getData(),i=e.coordinateSystem,r=i.getBaseAxis(),a=i.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=t.getDimensionIndex(t.mapDimension(r.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),d=Lh(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),f=ume(r,a),p=$Y(e),m=e.get("barMinHeight")||0,v=c&&t.getDimensionIndex(c),g=t.getLayout("size"),_=t.getLayout("offset");return{progress:function(S,x){for(var A=S.count,C=p&&Gu(A*3),M=p&&l&&Gu(A*3),I=p&&Gu(A),D=i.master.getRect(),E=h?D.width:D.height,P,F=x.getStore(),V=0;(P=S.next())!=null;){var G=F.get(d?v:o,P),W=F.get(s,P),Y=f,Q=void 0;d&&(Q=+G-F.get(o,P));var K=void 0,ae=void 0,ie=void 0,he=void 0;if(h){var Ee=i.dataToPoint([G,W]);if(d){var He=i.dataToPoint([Q,W]);Y=He[0]}K=Y,ae=Ee[1]+_,ie=Ee[0]-Y,he=g,Math.abs(ie)0?t:1:t))}var cme=function(n,e,t,i){for(;t>>1;n[r][1]r&&(this._approxInterval=r);var s=u6.length,l=Math.min(cme(u6,this._approxInterval,0,s),s-1);this._interval=u6[l][1],this._minLevelUnit=u6[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Yi(t)?t:+Ju(t)},e.prototype.contain=function(t){return W_(this.parse(t),this._extent)},e.prototype.normalize=function(t){return j_(this.parse(t),this._extent)},e.prototype.scale=function(t){return $_(t,this._extent)},e.type="time",e}(Ih),u6=[["second",TE],["minute",AE],["hour",qg],["quarter-day",qg*6],["half-day",qg*12],["day",g0*1.2],["half-week",g0*3.5],["week",g0*7],["month",g0*31],["quarter",g0*95],["half-year",mk/2],["year",mk]];function dme(n,e,t,i){var r=Ju(e),a=Ju(t),o=function(p){return yk(r,p,i)===yk(a,p,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},d=function(){return c()&&o("minute")},h=function(){return d()&&o("second")},f=function(){return h()&&o("millisecond")};switch(n){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return h();case"millisecond":return f()}}function hme(n,e){return n/=g0,n>16?16:n>7.5?7:n>3.5?4:n>1.5?2:1}function fme(n){var e=30*g0;return n/=e,n>6?6:n>3?3:n>2?2:1}function pme(n){return n/=qg,n>12?12:n>6?6:n>3.5?4:n>2?2:1}function EF(n,e){return n/=e?AE:TE,n>30?30:n>20?20:n>15?15:n>10?10:n>5?5:n>2?2:1}function vme(n){return q$(n,!0)}function mme(n,e,t){var i=new Date(n);switch(K2(e)){case"year":case"month":i[oX(t)](0);case"day":i[sX(t)](1);case"hour":i[lX(t)](0);case"minute":i[uX(t)](0);case"second":i[cX(t)](0),i[dX(t)](0)}return i.getTime()}function gme(n,e,t,i){var r=1e4,a=rX,o=0;function s(E,P,F,V,G,W,Y){for(var Q=new Date(P),K=P,ae=Q[V]();K1&&W===0&&F.unshift({value:F[0].value-K})}}for(var W=0;W=i[0]&&_<=i[1]&&d++)}var S=(i[1]-i[0])/e;if(d>S*1.5&&h>S/1.5||(u.push(v),d>S||n===a[f]))break}c=[]}}}for(var x=dr(Xt(u,function(E){return dr(E,function(P){return P.value>=i[0]&&P.value<=i[1]&&!P.notAdd})}),function(E){return E.length>0}),A=[],C=x.length-1,f=0;f0;)a*=10;var s=[Ra(Sme(i[0]/a)*a),Ra(_me(i[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Zg.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=z0(t)/z0(this.base),W_(t,this._extent)},e.prototype.normalize=function(t){return t=z0(t)/z0(this.base),j_(t,this._extent)},e.prototype.scale=function(t){return t=$_(t,this._extent),c6(this.base,t)},e.type="log",e}(id),YY=qE.prototype;YY.getMinorTicks=Zg.getMinorTicks;YY.getLabel=Zg.getLabel;function d6(n,e){return yme(n,Bu(e))}id.registerClass(qE);const bme=qE;var xme=function(){function n(e,t,i){this._prepareParams(e,t,i)}return n.prototype._prepareParams=function(e,t,i){i[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,f=this._determinedMax;return h!=null&&(s=h,u=!0),f!=null&&(l=f,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:d}},n.prototype.modifyDataMinMax=function(e,t){this[Tme[e]]=t},n.prototype.setDeterminedMinMax=function(e,t){var i=wme[e];this[i]=t},n.prototype.freeze=function(){this.frozen=!0},n}(),wme={min:"_determinedMin",max:"_determinedMax"},Tme={min:"_dataMin",max:"_dataMax"};function KY(n,e,t){var i=n.rawExtentInfo;return i||(i=new xme(n,e,t),n.rawExtentInfo=i,i)}function h6(n,e){return e==null?null:b9(e)?NaN:n.parse(e)}function ZY(n,e){var t=n.type,i=KY(n,e,n.getExtent()).calculate();n.setBlank(i.isBlank);var r=i.min,a=i.max,o=e.ecModel;if(o&&t==="time"){var s=GY("bar",o),l=!1;if(ne(s,function(d){l=l||d.getBaseAxis()===e.axis}),l){var u=UY(s),c=Ame(r,a,e,u);r=c.min,a=c.max}}return{extent:[r,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function Ame(n,e,t,i){var r=t.axis.getExtent(),a=Math.abs(r[1]-r[0]),o=lme(i,t.axis);if(o===void 0)return{min:n,max:e};var s=1/0;ne(o,function(f){s=Math.min(f.offset,s)});var l=-1/0;ne(o,function(f){l=Math.max(f.offset+f.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-n,d=1-(s+l)/a,h=c/d-c;return e+=h*(l/u),n-=h*(s/u),{min:n,max:e}}function mv(n,e){var t=e,i=ZY(n,t),r=i.extent,a=t.get("splitNumber");n instanceof bme&&(n.base=t.get("logBase"));var o=n.type,s=t.get("interval"),l=o==="interval"||o==="time";n.setExtent(r[0],r[1]),n.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&n.setInterval&&n.setInterval(s)}function q_(n,e){if(e=e||n.get("type"),e)switch(e){case"category":return new WE({ordinalMeta:n.getOrdinalMeta?n.getOrdinalMeta():n.getCategories(),extent:[1/0,-1/0]});case"time":return new XY({locale:n.ecModel.getLocaleModel(),useUTC:n.ecModel.get("useUTC")});default:return new(id.getClass(e)||Ih)}}function Cme(n){var e=n.scale.getExtent(),t=e[0],i=e[1];return!(t>0&&i>0||t<0&&i<0)}function Zv(n){var e=n.getLabelModel().get("formatter"),t=n.type==="category"?n.scale.getExtent()[0]:null;return n.scale.type==="time"?function(i){return function(r,a){return n.scale.getFormattedLabel(r,a,i)}}(e):xn(e)?function(i){return function(r){var a=n.scale.getLabel(r),o=i.replace("{value}",a!=null?a:"");return o}}(e):$n(e)?function(i){return function(r,a){return t!=null&&(a=r.value-t),i(XE(n,r),a,r.level!=null?{level:r.level}:null)}}(e):function(i){return n.scale.getLabel(i)}}function XE(n,e){return n.type==="category"?n.scale.getLabel(e):e.value}function Mme(n){var e=n.model,t=n.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var i,r,a=t.getExtent();t instanceof WE?r=t.count():(i=t.getTicks(),r=i.length);var o=n.getLabelModel(),s=Zv(n),l,u=1;r>40&&(u=Math.ceil(r/40));for(var c=0;cn[1]&&(n[1]=r[1])})}var A3=function(){function n(){}return n.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},n.prototype.getCoordSysModel=function(){},n}(),Rme=1e-8;function RF(n,e){return Math.abs(n-e)r&&(i=o,r=l)}if(i)return Ime(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var i=this._rect;if(i&&!t)return i;var r=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return ne(o,function(s){s.type==="polygon"?LF(s.exterior,r,a,t):ne(s.points,function(l){LF(l,r,a,t)})}),isFinite(r[0])&&isFinite(r[1])&&isFinite(a[0])&&isFinite(a[1])||(r[0]=r[1]=a[0]=a[1]=0),i=new gi(r[0],r[1],a[0]-r[0],a[1]-r[1]),t||(this._rect=i),i},e.prototype.contain=function(t){var i=this.getBoundingRect(),r=this.geometries;if(!i.contain(t[0],t[1]))return!1;e:for(var a=0,o=r.length;a>1^-(s&1),l=l>>1^-(l&1),s+=r,l+=a,r=s,a=l,i.push([s/t,l/t])}return i}function kme(n,e){return n=Nme(n),Xt(dr(n.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var i=t.properties,r=t.geometry,a=[];switch(r.type){case"Polygon":var o=r.coordinates;a.push(new IF(o[0],o.slice(1)));break;case"MultiPolygon":ne(r.coordinates,function(l){l[0]&&a.push(new IF(l[0],l.slice(1)))});break;case"LineString":a.push(new DF([r.coordinates]));break;case"MultiLineString":a.push(new DF(r.coordinates))}var s=new eK(i[e||"name"],a,i.cp);return s.properties=i,s})}var B9=Gi();function nK(n,e){var t=Xt(e,function(i){return n.scale.parse(i)});return n.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function Fme(n){var e=n.getLabelModel().get("customValues");if(e){var t=Zv(n),i=n.scale.getExtent(),r=nK(n,e),a=dr(r,function(o){return o>=i[0]&&o<=i[1]});return{labels:Xt(a,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:n.scale.getLabel(s),tickValue:o}})}}return n.type==="category"?Bme(n):Gme(n)}function Ome(n,e){var t=n.getTickModel().get("customValues");if(t){var i=n.scale.getExtent(),r=nK(n,t);return{ticks:dr(r,function(a){return a>=i[0]&&a<=i[1]})}}return n.type==="category"?zme(n,e):{ticks:Xt(n.scale.getTicks(),function(a){return a.value})}}function Bme(n){var e=n.getLabelModel(),t=iK(n,e);return!e.get("show")||n.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function iK(n,e){var t=rK(n,"labels"),i=YE(e),r=aK(t,i);if(r)return r;var a,o;return $n(i)?a=lK(n,i):(o=i==="auto"?Ume(n):i,a=sK(n,o)),oK(t,i,{labels:a,labelCategoryInterval:o})}function zme(n,e){var t=rK(n,"ticks"),i=YE(e),r=aK(t,i);if(r)return r;var a,o;if((!e.get("show")||n.scale.isBlank())&&(a=[]),$n(i))a=lK(n,i,!0);else if(i==="auto"){var s=iK(n,n.getLabelModel());o=s.labelCategoryInterval,a=Xt(s.labels,function(l){return l.tickValue})}else o=i,a=sK(n,o,!0);return oK(t,i,{ticks:a,tickCategoryInterval:o})}function Gme(n){var e=n.scale.getTicks(),t=Zv(n);return{labels:Xt(e,function(i,r){return{level:i.level,formattedLabel:t(i,r),rawLabel:n.scale.getLabel(i),tickValue:i.value}})}}function rK(n,e){return B9(n)[e]||(B9(n)[e]=[])}function aK(n,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=n.dataToCoord(l+1)-n.dataToCoord(l),c=Math.abs(u*Math.cos(i)),d=Math.abs(u*Math.sin(i)),h=0,f=0;l<=a[1];l+=s){var p=0,m=0,v=g3(t({value:l}),e.font,"center","top");p=v.width*1.3,m=v.height*1.3,h=Math.max(h,p,7),f=Math.max(f,m,7)}var g=h/c,_=f/d;isNaN(g)&&(g=1/0),isNaN(_)&&(_=1/0);var S=Math.max(0,Math.floor(Math.min(g,_))),x=B9(n.model),A=n.getExtent(),C=x.lastAutoInterval,M=x.lastTickCount;return C!=null&&M!=null&&Math.abs(C-S)<=1&&Math.abs(M-o)<=1&&C>S&&x.axisExtent0===A[0]&&x.axisExtent1===A[1]?S=C:(x.lastTickCount=o,x.lastAutoInterval=S,x.axisExtent0=A[0],x.axisExtent1=A[1]),S}function Hme(n){var e=n.getLabelModel();return{axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function sK(n,e,t){var i=Zv(n),r=n.scale,a=r.getExtent(),o=n.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=r.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=JY(n),h=o.get("showMinLabel")||d,f=o.get("showMaxLabel")||d;h&&u!==a[0]&&m(a[0]);for(var p=u;p<=a[1];p+=l)m(p);f&&p-l!==a[1]&&m(a[1]);function m(v){var g={value:v};s.push(t?v:{formattedLabel:i(g),rawLabel:r.getLabel(g),tickValue:v})}return s}function lK(n,e,t){var i=n.scale,r=Zv(n),a=[];return ne(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;e(o.value,s)&&a.push(t?l:{formattedLabel:r(o),rawLabel:s,tickValue:l})}),a}var NF=[0,1],Wme=function(){function n(e,t,i){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=i||[0,0]}return n.prototype.contain=function(e){var t=this._extent,i=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=i&&e<=r},n.prototype.containData=function(e){return this.scale.contain(e)},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.getPixelPrecision=function(e){return j$(e||this.scale.getExtent(),this._extent)},n.prototype.setExtent=function(e,t){var i=this._extent;i[0]=e,i[1]=t},n.prototype.dataToCoord=function(e,t){var i=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&r.type==="ordinal"&&(i=i.slice(),kF(i,r.count())),pr(e,NF,i,t)},n.prototype.coordToData=function(e,t){var i=this._extent,r=this.scale;this.onBand&&r.type==="ordinal"&&(i=i.slice(),kF(i,r.count()));var a=pr(e,i,NF,t);return this.scale.scale(a)},n.prototype.pointToData=function(e,t){},n.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),i=Ome(this,t),r=i.ticks,a=Xt(r,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return jme(this,a,o,e.clamp),a},n.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var i=this.scale.getMinorTicks(t),r=Xt(i,function(a){return Xt(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return r},n.prototype.getViewLabels=function(){return Fme(this).labels},n.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},n.prototype.getTickModel=function(){return this.model.getModel("axisTick")},n.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);i===0&&(i=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/i},n.prototype.calculateCategoryInterval=function(){return Vme(this)},n}();function kF(n,e){var t=n[1]-n[0],i=e,r=t/i/2;n[0]+=r,n[1]-=r}function jme(n,e,t,i){var r=e.length;if(!n.onBand||t||!r)return;var a=n.getExtent(),o,s;if(r===1)e[0].coord=a[0],o=e[1]={coord:a[1],tickValue:e[0].tickValue};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;ne(e,function(f){f.coord-=u/2});var c=n.scale.getExtent();s=1+c[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*s,tickValue:c[1]+1},e.push(o)}var d=a[0]>a[1];h(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift()),i&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(i?o.coord=a[1]:e.pop()),i&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(f,p){return f=Ra(f),p=Ra(p),d?f>p:fr&&(r+=Hm);var f=Math.atan2(s,o);if(f<0&&(f+=Hm),f>=i&&f<=r||f+Hm>=i&&f+Hm<=r)return l[0]=c,l[1]=d,u-t;var p=t*Math.cos(i)+n,m=t*Math.sin(i)+e,v=t*Math.cos(r)+n,g=t*Math.sin(r)+e,_=(p-o)*(p-o)+(m-s)*(m-s),S=(v-o)*(v-o)+(g-s)*(g-s);return _0){e=e/180*Math.PI,Z0.fromArray(n[0]),Wr.fromArray(n[1]),Na.fromArray(n[2]),fi.sub(Uu,Z0,Wr),fi.sub(Du,Na,Wr);var t=Uu.len(),i=Du.len();if(!(t<.001||i<.001)){Uu.scale(1/t),Du.scale(1/i);var r=Uu.dot(Du),a=Math.cos(e);if(a1&&fi.copy(Ms,Na),Ms.toArray(n[1])}}}}function Zme(n,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Z0.fromArray(n[0]),Wr.fromArray(n[1]),Na.fromArray(n[2]),fi.sub(Uu,Wr,Z0),fi.sub(Du,Na,Wr);var i=Uu.len(),r=Du.len();if(!(i<.001||r<.001)){Uu.scale(1/i),Du.scale(1/r);var a=Uu.dot(e),o=Math.cos(t);if(a=l)fi.copy(Ms,Na);else{Ms.scaleAndAdd(Du,s/Math.tan(Math.PI/2-c));var d=Na.x!==Wr.x?(Ms.x-Wr.x)/(Na.x-Wr.x):(Ms.y-Wr.y)/(Na.y-Wr.y);if(isNaN(d))return;d<0?fi.copy(Ms,Wr):d>1&&fi.copy(Ms,Na)}Ms.toArray(n[1])}}}}function ax(n,e,t,i){var r=t==="normal",a=r?n:n.ensureState(t);a.ignore=e;var o=i.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();r?n.useStyle(s):a.style=s}function Jme(n,e){var t=e.smooth,i=e.points;if(i)if(n.moveTo(i[0][0],i[0][1]),t>0&&i.length>=3){var r=eh(i[0],i[1]),a=eh(i[1],i[2]);if(!r||!a){n.lineTo(i[1][0],i[1][1]),n.lineTo(i[2][0],i[2][1]);return}var o=Math.min(r,a)*t,s=Y4([],i[1],i[0],o/r),l=Y4([],i[1],i[2],o/a),u=Y4([],s,l,.5);n.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),n.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0&&a&&A(-c/o,0,o);var m=n[0],v=n[o-1],g,_;S(),g<0&&C(-g,.8),_<0&&C(_,.8),S(),x(g,_,1),x(_,g,-1),S(),g<0&&M(-g),_<0&&M(_);function S(){g=m.rect[e]-i,_=r-v.rect[e]-v.rect[t]}function x(I,D,E){if(I<0){var P=Math.min(D,-I);if(P>0){A(P*E,0,o);var F=P+I;F<0&&C(-F*E,1)}else C(-I*E,1)}}function A(I,D,E){I!==0&&(u=!0);for(var P=D;P0)for(var F=0;F0;F--){var Y=E[F-1]*W;A(-Y,F,o)}}}function M(I){var D=I<0?-1:1;I=Math.abs(I);for(var E=Math.ceil(I/(o-1)),P=0;P0?A(E,0,P+1):A(-E,o-P-1,o),I-=E,I<=0)return}return u}function Qme(n,e,t,i){return hK(n,"x","width",e,t,i)}function fK(n,e,t,i){return hK(n,"y","height",e,t,i)}function pK(n){var e=[];n.sort(function(m,v){return v.priority-m.priority});var t=new gi(0,0,0,0);function i(m){if(!m.ignore){var v=m.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}m.ignore=!0}for(var r=0;r=0&&i.attr(a.oldLayoutSelect),xi(h,"emphasis")>=0&&i.attr(a.oldLayoutEmphasis)),Qi(i,u,t,l)}else if(i.attr(u),!Vv(i).valueAnimation){var d=ai(i.style.opacity,1);i.style.opacity=0,sa(i,{style:{opacity:d}},t,l)}if(a.oldLayout=u,i.states.select){var f=a.oldLayoutSelect={};f6(f,u,p6),f6(f,i.states.select,p6)}if(i.states.emphasis){var p=a.oldLayoutEmphasis={};f6(p,u,p6),f6(p,i.states.emphasis,p6)}Qq(i,l,c,t,t)}if(r&&!r.ignore&&!r.invisible){var a=nge(r),o=a.oldLayout,m={points:r.shape.points};o?(r.attr({shape:o}),Qi(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,sa(r,{style:{strokePercent:1}},t)),a.oldLayout=m}},n}();const rge=ige;var sx=Gi();function age(n){n.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){var r=sx(t).labelManager;r||(r=sx(t).labelManager=new rge),r.clearLabels()}),n.registerUpdateLifecycle("series:layoutlabels",function(e,t,i){var r=sx(t).labelManager;i.updatedSeries.forEach(function(a){r.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var lx=Math.sin,ux=Math.cos,vK=Math.PI,Rf=Math.PI*2,oge=180/vK,sge=function(){function n(){}return n.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},n.prototype.moveTo=function(e,t){this._add("M",e,t)},n.prototype.lineTo=function(e,t){this._add("L",e,t)},n.prototype.bezierCurveTo=function(e,t,i,r,a,o){this._add("C",e,t,i,r,a,o)},n.prototype.quadraticCurveTo=function(e,t,i,r){this._add("Q",e,t,i,r)},n.prototype.arc=function(e,t,i,r,a,o){this.ellipse(e,t,i,i,0,r,a,o)},n.prototype.ellipse=function(e,t,i,r,a,o,s,l){var u=s-o,c=!l,d=Math.abs(u),h=ah(d-Rf)||(c?u>=Rf:-u>=Rf),f=u>0?u%Rf:u%Rf+Rf,p=!1;h?p=!0:ah(d)?p=!1:p=f>=vK==!!c;var m=e+i*ux(o),v=t+r*lx(o);this._start&&this._add("M",m,v);var g=Math.round(a*oge);if(h){var _=1/this._p,S=(c?1:-1)*(Rf-_);this._add("A",i,r,g,1,+c,e+i*ux(o+S),t+r*lx(o+S)),_>.01&&this._add("A",i,r,g,0,+c,m,v)}else{var x=e+i*ux(s),A=t+r*lx(s);this._add("A",i,r,g,+p,+c,x,A)}},n.prototype.rect=function(e,t,i,r){this._add("M",e,t),this._add("l",i,0),this._add("l",0,r),this._add("l",-i,0),this._add("Z")},n.prototype.closePath=function(){this._d.length>0&&this._add("Z")},n.prototype._add=function(e,t,i,r,a,o,s,l,u){for(var c=[],d=this._p,h=1;h"}function mge(n){return""}function JE(n,e){e=e||{};var t=e.newline?` `:"";function i(r){var a=r.children,o=r.tag,s=r.attrs,l=r.text;return vge(o,s)+(o!=="style"?os(l):l||"")+(a?""+t+Xt(a,function(u){return i(u)}).join(t)+t:"")+mge(o)}return i(n)}function gge(n,e,t){t=t||{};var i=t.newline?` `:"",r=" {"+i,a=i+"}",o=Xt(Li(n),function(l){return l+r+Xt(Li(n[l]),function(u){return u+":"+n[l][u]+";"}).join(i)+a}).join(i),s=Xt(Li(e),function(l){return"@keyframes "+l+r+Xt(Li(e[l]),function(u){return u+r+Xt(Li(e[l][u]),function(c){var d=e[l][u][c];return c==="d"&&(d='path("'+d+'")'),c+":"+d+";"}).join(i)+a}).join(i)+a}).join(i);return!o&&!s?"":[""].join(i)}function XA(n){return{zrId:n,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function zF(n,e,t,i){return go("svg","root",{width:n,height:e,xmlns:gK,"xmlns:xlink":yK,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+n+" "+e:!1},t)}var yge=0;function SK(){return yge++}var GF={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"},Uf="transform-origin";function _ge(n,e,t){var i=It({},n.shape);It(i,e),n.buildPath(t,i);var r=new mK;return r.reset(N$(n)),t.rebuildPath(r,1),r.generateStr(),r.getStr()}function Sge(n,e){var t=e.originX,i=e.originY;(t||i)&&(n[Uf]=t+"px "+i+"px")}var bge={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function bK(n,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=n,t}function xge(n,e,t){var i=n.shape.paths,r={},a,o;if(ne(i,function(l){var u=XA(t.zrId);u.animation=!0,X_(l,{},u,!0);var c=u.cssAnims,d=u.cssNodes,h=Li(c),f=h.length;if(f){o=h[f-1];var p=c[o];for(var m in p){var v=p[m];r[m]=r[m]||{d:""},r[m].d+=v.d||""}for(var g in d){var _=d[g].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){e.d=!1;var s=bK(r,t);return a.replace(o,s)}}function UF(n){return xn(n)?GF[n]?"cubic-bezier("+GF[n]+")":eE(n)?n:"":""}function X_(n,e,t,i){var r=n.animators,a=r.length,o=[];if(n instanceof yE){var s=xge(n,e,t);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Ot=bK(M,t);return Ot+" "+_[0]+" both"}}for(var v in l){var s=m(l[v]);s&&o.push(s)}if(o.length){var g=t.zrId+"-cls-"+SK();t.cssNodes["."+g]={animation:o.join(",")},e.class=g}}function wge(n,e,t){if(!n.ignore)if(n.isSilent()){var i={"pointer-events":"none"};VF(i,e,t,!0)}else{var r=n.states.emphasis&&n.states.emphasis.style?n.states.emphasis.style:{},a=r.fill;if(!a){var o=n.style&&n.style.fill,s=n.states.select&&n.states.select.style&&n.states.select.style.fill,l=n.currentStates.indexOf("select")>=0&&s||o;l&&(a=oA(l))}var u=r.lineWidth;if(u){var c=!r.strokeNoScale&&n.transform?n.transform[0]:1;u=u/c}var i={cursor:"pointer"};a&&(i.fill=a),r.stroke&&(i.stroke=r.stroke),u&&(i["stroke-width"]=u),VF(i,e,t,!0)}}function VF(n,e,t,i){var r=JSON.stringify(n),a=t.cssStyleCache[r];a||(a=t.zrId+"-cls-"+SK(),t.cssStyleCache[r]=a,t.cssNodes["."+a+(i?":hover":"")]=n),e.class=e.class?e.class+" "+a:a}var z9=Math.round;function xK(n){return n&&xn(n.src)}function wK(n){return n&&$n(n.toDataURL)}function QE(n,e,t,i){hge(function(r,a){var o=r==="fill"||r==="stroke";o&&D$(a)?AK(e,n,r,i):o&&tE(a)?CK(t,n,r,i):n[r]=a,o&&i.ssr&&a==="none"&&(n["pointer-events"]="visible")},e,t,!1),Rge(t,n,i)}function eP(n,e){var t=Kde(e);t&&(t.each(function(i,r){i!=null&&(n[(BF+r).toLowerCase()]=i+"")}),e.isSilent()&&(n[BF+"silent"]="true"))}function HF(n){return ah(n[0]-1)&&ah(n[1])&&ah(n[2])&&ah(n[3]-1)}function Tge(n){return ah(n[4])&&ah(n[5])}function tP(n,e,t){if(e&&!(Tge(e)&&HF(e))){var i=t?10:1e4;n.transform=HF(e)?"translate("+z9(e[4]*i)/i+" "+z9(e[5]*i)/i+")":mde(e)}}function WF(n,e,t){for(var i=n.points,r=[],a=0;aa?(p=t[l+1]==null?null:t[l+1].elm,PK(n,p,t,r,l)):c8(n,e,i,a))}function S2(n,e){var t=e.elm=n.elm,i=n.children,r=e.children;n!==e&&(nP(n,e),YA(e.text)?Pu(i)&&Pu(r)?i!==r&&kge(t,i,r):Pu(r)?(Pu(n.text)&&cx(t,""),PK(t,null,r,0,r.length-1)):Pu(i)?c8(t,i,0,i.length-1):Pu(n.text)&&cx(t,""):n.text!==e.text&&(Pu(i)&&c8(t,i,0,i.length-1),cx(t,e.text)))}function Fge(n,e){if(Ag(n,e))S2(n,e);else{var t=n.elm,i=MK(t);G9(e),i!==null&&(Jf(i,e.elm,EK(t)),c8(i,[n],0,0))}return e}var Oge=0,Bge=function(){function n(e,t,i){if(this.type="svg",this.refreshHover=ZF(),this.configLayer=ZF(),this.storage=t,this._opts=i=It({},i),this.root=e,this._id="zr"+Oge++,this._oldVNode=zF(i.width,i.height),e&&!i.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=_K("svg");nP(null,this._oldVNode),r.appendChild(a),e.appendChild(r)}this.resize(i.width,i.height)}return n.prototype.getType=function(){return this.type},n.prototype.getViewportRoot=function(){return this._viewport},n.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},n.prototype.getSvgDom=function(){return this._svgDom},n.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Fge(this._oldVNode,e),this._oldVNode=e}},n.prototype.renderOneToVNode=function(e){return $F(e,XA(this._id))},n.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),i=this._width,r=this._height,a=XA(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=zge(i,r,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=go("g","main",{},[]);this._paintList(t,a,l?l.children:o),l&&o.push(l);var u=Xt(Li(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(go("defs","defs",{},u)),e.animation){var c=gge(a.cssNodes,a.cssAnims,{newline:!0});if(c){var d=go("style","stl",{},[],c);o.push(d)}}return zF(i,r,o,e.useViewBox)},n.prototype.renderToString=function(e){return e=e||{},JE(this.renderToVNode({animation:ai(e.cssAnimation,!0),emphasis:ai(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:ai(e.useViewBox,!0)}),{newline:!0})},n.prototype.setBackgroundColor=function(e){this._backgroundColor=e},n.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},n.prototype._paintList=function(e,t,i){for(var r=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[m]===l[m]);m--);for(var v=p-1;v>m;v--)o--,s=a[o-1];for(var g=m+1;g=s)}}for(var d=this.__startIndex;d15)break}}G.prevElClipPaths&&g.restore()};if(_)if(_.length===0)I=v.__endIndex;else for(var E=f.dpr,P=0;P<_.length;++P){var F=_[P];g.save(),g.beginPath(),g.rect(F.x*E,F.y*E,F.width*E,F.height*E),g.clip(),D(F),g.restore()}else g.save(),D(),g.restore();v.__drawIndex=I,v.__drawIndex0&&e>r[0]){for(l=0;le);l++);s=i[r[l]]}if(r.splice(l+1,0,e),i[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},n.prototype.eachLayer=function(e,t){for(var i=this._zlevelList,r=0;r0?v6:0),this._needsManuallyCompositing),c.__builtin__||qM("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),a=c),r.__dirty&El&&!r.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(d,h){!d.__used&&d.getElementCount()>0&&(d.__dirty=!0,d.__startIndex=d.__endIndex=d.__drawIndex=0),d.__dirty&&d.__drawIndex<0&&(d.__drawIndex=d.__startIndex)})},n.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},n.prototype._clearLayer=function(e){e.clear()},n.prototype.setBackgroundColor=function(e){this._backgroundColor=e,ne(this._layers,function(t){t.setUnpainted()})},n.prototype.configLayer=function(e,t){if(t){var i=this._layerConfig;i[e]?ui(i[e],t,!0):i[e]=t;for(var r=0;r-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},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}(pa);const Kge=Yge;function gv(n,e){var t=n.mapDimensionsAll("defaultedLabel"),i=t.length;if(i===1){var r=pv(n,e,t[0]);return r!=null?r+"":null}else if(i){for(var a=[],o=0;o=0&&i.push(e[a])}return i.join(" ")}var Zge=function(n){ot(e,n);function e(t,i,r,a){var o=n.call(this)||this;return o.updateData(t,i,r,a),o}return e.prototype._createSymbol=function(t,i,r,a,o){this.removeAll();var s=Ya(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=Jge,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){$c(this.childAt(0))},e.prototype.downplay=function(){qc(this.childAt(0))},e.prototype.setZ=function(t,i){var r=this.childAt(0);r.zlevel=t,r.z=i},e.prototype.setDraggable=function(t,i){var r=this.childAt(0);r.draggable=t,r.cursor=!i&&t?"move":r.cursor},e.prototype.updateData=function(t,i,r,a){this.silent=!1;var o=t.getItemVisual(i,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,i),u=o!==this._symbolType,c=a&&a.disableAnimation;if(u){var d=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,t,i,l,d)}else{var h=this.childAt(0);h.silent=!1;var f={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(f):Qi(h,f,s,i),iu(h)}if(this._updateCommon(t,i,l,r,a),u){var h=this.childAt(0);if(!c){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,sa(h,f,s,i)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,i,r,a,o){var s=this.childAt(0),l=t.hostModel,u,c,d,h,f,p,m,v,g;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,d=a.selectItemStyle,h=a.focus,f=a.blurScope,m=a.labelStatesModels,v=a.hoverScale,g=a.cursorStyle,p=a.emphasisDisabled),!a||t.hasItemOption){var _=a&&a.itemModel?a.itemModel:t.getItemModel(i),S=_.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),d=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=S.get("focus"),f=S.get("blurScope"),p=S.get("disabled"),m=_o(_),v=S.getShallow("scale"),g=_.getShallow("cursor")}var x=t.getItemVisual(i,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var A=n1(t.getItemVisual(i,"symbolOffset"),r);A&&(s.x=A[0],s.y=A[1]),g&&s.attr("cursor",g);var C=t.getItemVisual(i,"style"),M=C.fill;if(s instanceof qo){var I=s.style;s.useStyle(It({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},C))}else s.__isEmptyBrush?s.useStyle(It({},C)):s.useStyle(C),s.style.decal=null,s.setColor(M,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=t.getItemVisual(i,"liftZ"),E=this._z2;D!=null?E==null&&(this._z2=s.z2,s.z2+=D):E!=null&&(s.z2=E,this._z2=null);var P=o&&o.useNameLabel;$o(s,m,{labelFetcher:l,labelDataIndex:i,defaultText:F,inheritColor:M,defaultOpacity:C.opacity});function F(W){return P?t.getName(W):gv(t,W)}this._sizeX=r[0]/2,this._sizeY=r[1]/2;var V=s.ensureState("emphasis");V.style=u,s.ensureState("select").style=d,s.ensureState("blur").style=c;var G=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;V.scaleX=this._sizeX*G,V.scaleY=this._sizeY*G,this.setSymbolScale(1),ya(this,h,f,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,i,r){var a=this.childAt(0),o=ni(this).dataIndex,s=r&&r.animation;if(this.silent=a.silent=!0,r&&r.fadeLabel){var l=a.getTextContent();l&&Ph(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Ph(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,i){return Kv(t.getItemVisual(i,"symbolSize"))},e}(ei);function Jge(n,e){this.parent.drift(n,e)}const C3=Zge;function hx(n,e,t,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(t))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&n.getItemVisual(t,"symbol")!=="none"}function eO(n){return n!=null&&!Kn(n)&&(n={isIgnore:n}),n||{}}function tO(n){var e=n.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:_o(e),cursorStyle:e.get("cursor")}}var Qge=function(){function n(e){this.group=new ei,this._SymbolCtor=e||C3}return n.prototype.updateData=function(e,t){this._progressiveEls=null,t=eO(t);var i=this.group,r=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=tO(e),u={disableAnimation:s},c=t.getSymbolPoint||function(d){return e.getItemLayout(d)};a||i.removeAll(),e.diff(a).add(function(d){var h=c(d);if(hx(e,h,d,t)){var f=new o(e,d,l,u);f.setPosition(h),e.setItemGraphicEl(d,f),i.add(f)}}).update(function(d,h){var f=a.getItemGraphicEl(h),p=c(d);if(!hx(e,p,d,t)){i.remove(f);return}var m=e.getItemVisual(d,"symbol")||"circle",v=f&&f.getSymbolType&&f.getSymbolType();if(!f||v&&v!==m)i.remove(f),f=new o(e,d,l,u),f.setPosition(p);else{f.updateData(e,d,l,u);var g={x:p[0],y:p[1]};s?f.attr(g):Qi(f,g,r)}i.add(f),e.setItemGraphicEl(d,f)}).remove(function(d){var h=a.getItemGraphicEl(d);h&&h.fadeOut(function(){i.remove(h)},r)}).execute(),this._getSymbolPoint=c,this._data=e},n.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(i,r){var a=e._getSymbolPoint(r);i.setPosition(a),i.markRedraw()})},n.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=tO(e),this._data=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(e,t,i){this._progressiveEls=[],i=eO(i);function r(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?t=i[0]:i[1]<0&&(t=i[1]),t}function IK(n,e,t,i){var r=NaN;n.stacked&&(r=t.get(t.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=n.valueStart);var a=n.baseDataOffset,o=[];return o[a]=t.get(n.baseDim,i),o[1-a]=r,e.dataToPoint(o)}function t9e(n,e){var t=[];return e.diff(n).add(function(i){t.push({cmd:"+",idx:i})}).update(function(i,r){t.push({cmd:"=",idx:r,idx1:i})}).remove(function(i){t.push({cmd:"-",idx:i})}).execute(),t}function n9e(n,e,t,i,r,a,o,s){for(var l=t9e(n,e),u=[],c=[],d=[],h=[],f=[],p=[],m=[],v=LK(r,e,o),g=n.getLayout("points")||[],_=e.getLayout("points")||[],S=0;S=r||m<0)break;if(Cp(g,_)){if(l){m+=a;continue}break}if(m===t)n[a>0?"moveTo":"lineTo"](g,_),d=g,h=_;else{var S=g-u,x=_-c;if(S*S+x*x<.5){m+=a;continue}if(o>0){for(var A=m+a,C=e[A*2],M=e[A*2+1];C===g&&M===_&&v=i||Cp(C,M))f=g,p=_;else{E=C-u,P=M-c;var G=g-u,W=C-g,Y=_-c,Q=M-_,K=void 0,ae=void 0;if(s==="x"){K=Math.abs(G),ae=Math.abs(W);var ie=E>0?1:-1;f=g-ie*K*o,p=_,F=g+ie*ae*o,V=_}else if(s==="y"){K=Math.abs(Y),ae=Math.abs(Q);var he=P>0?1:-1;f=g,p=_-he*K*o,F=g,V=_+he*ae*o}else K=Math.sqrt(G*G+Y*Y),ae=Math.sqrt(W*W+Q*Q),D=ae/(ae+K),f=g-E*o*(1-D),p=_-P*o*(1-D),F=g+E*o*D,V=_+P*o*D,F=Rd(F,Ld(C,g)),V=Rd(V,Ld(M,_)),F=Ld(F,Rd(C,g)),V=Ld(V,Rd(M,_)),E=F-g,P=V-_,f=g-E*K/ae,p=_-P*K/ae,f=Rd(f,Ld(u,g)),p=Rd(p,Ld(c,_)),f=Ld(f,Rd(u,g)),p=Ld(p,Rd(c,_)),E=g-f,P=_-p,F=g+E*ae/K,V=_+P*ae/K}n.bezierCurveTo(d,h,f,p,g,_),d=F,h=V}else n.lineTo(g,_)}u=g,c=_,m+=a}return v}var DK=function(){function n(){this.smooth=0,this.smoothConstraint=!0}return n}(),i9e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="ec-polyline",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new DK},e.prototype.buildPath=function(t,i){var r=i.points,a=0,o=r.length/2;if(i.connectNulls){for(;o>0&&Cp(r[o*2-2],r[o*2-1]);o--);for(;a=0){var x=u?(p-l)*S+l:(f-s)*S+s;return u?[t,x]:[x,t]}s=f,l=p;break;case o.C:f=a[d++],p=a[d++],m=a[d++],v=a[d++],g=a[d++],_=a[d++];var A=u?z5(s,f,m,g,t,c):z5(l,p,v,_,t,c);if(A>0)for(var C=0;C=0){var x=u?vo(l,p,v,_,M):vo(s,f,m,g,M);return u?[t,x]:[x,t]}}s=g,l=_;break}}},e}(Ei),r9e=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e}(DK),NK=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="ec-polygon",i}return e.prototype.getDefaultShape=function(){return new r9e},e.prototype.buildPath=function(t,i){var r=i.points,a=i.stackedOnPoints,o=0,s=r.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&Cp(r[s*2-2],r[s*2-1]);s--);for(;oe){a?t.push(o(a,l,e)):r&&t.push(o(r,l,0),o(r,l,e));break}else r&&(t.push(o(r,l,0)),r=null),t.push(l),a=l}return t}function s9e(n,e,t){var i=n.getVisual("visualMeta");if(!(!i||!i.length||!n.count())&&e.type==="cartesian2d"){for(var r,a,o=i.length-1;o>=0;o--){var s=n.getDimensionInfo(i[o].dimension);if(r=s&&s.coordDim,r==="x"||r==="y"){a=i[o];break}}if(a){var l=e.getAxis(r),u=Xt(a.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,d=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=o9e(u,r==="x"?t.getWidth():t.getHeight()),f=h.length;if(!f&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var p=10,m=h[0].coord-p,v=h[f-1].coord+p,g=v-m;if(g<.001)return"transparent";ne(h,function(S){S.offset=(S.coord-m)/g}),h.push({offset:f?h[f-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:d[0]||"transparent"});var _=new po(0,0,0,0,h,!0);return _[r]=m,_[r+"2"]=v,_}}}function l9e(n,e,t){var i=n.get("showAllSymbol"),r=i==="auto";if(!(i&&!r)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(r&&u9e(a,e))){var o=e.mapDimension(a.dim),s={};return ne(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function u9e(n,e){var t=n.getExtent(),i=Math.abs(t[1]-t[0])/n.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),a=Math.max(1,Math.round(r/5)),o=0;oi)return!1;return!0}function c9e(n,e){return isNaN(n)||isNaN(e)}function d9e(n){for(var e=n.length/2;e>0&&c9e(n[e*2-2],n[e*2-1]);e--);return e-1}function oO(n,e){return[n[e*2],n[e*2+1]]}function h9e(n,e,t){for(var i=n.length/2,r=t==="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 OK(n){if(n.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var ae=p.getState("emphasis").style;ae.lineWidth=+p.style.lineWidth+1}ni(p).seriesIndex=t.seriesIndex,ya(p,Y,Q,K);var ie=aO(t.get("smooth")),he=t.get("smoothMonotone");if(p.setShape({smooth:ie,smoothMonotone:he,connectNulls:M}),m){var Ee=s.getCalculationInfo("stackedOnSeries"),He=0;m.useStyle(qn(u.getAreaStyle(),{fill:F,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Ee&&(He=aO(Ee.get("smooth"))),m.setShape({smooth:ie,stackedOnSmooth:He,smoothMonotone:he,connectNulls:M}),jo(m,t,"areaStyle"),ni(m).seriesIndex=t.seriesIndex,ya(m,Y,Q,K)}var xe=this._changePolyState;s.eachItemGraphicEl(function(Fe){Fe&&(Fe.onHoverStateChange=xe)}),this._polyline.onHoverStateChange=xe,this._data=s,this._coordSys=a,this._stackedOnPoints=A,this._points=c,this._step=E,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,p),m&&this.packEventData(t,m))},e.prototype.packEventData=function(t,i){ni(i).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,i,r,a){var o=t.getData(),s=Op(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 c=l[s*2],d=l[s*2+1];if(isNaN(c)||isNaN(d)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,d))return;var h=t.get("zlevel")||0,f=t.get("z")||0;u=new C3(o,s),u.x=c,u.y=d,u.setZ(h,f);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=f,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Yr.prototype.highlight.call(this,t,i,r,a)},e.prototype.downplay=function(t,i,r,a){var o=t.getData(),s=Op(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 Yr.prototype.downplay.call(this,t,i,r,a)},e.prototype._changePolyState=function(t){var i=this._polygon;$5(this._polyline,t),i&&$5(i,t)},e.prototype._newPolyline=function(t){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new i9e({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},e.prototype._newPolygon=function(t,i){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new NK({shape:{points:t,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(r),this._polygon=r,r},e.prototype._initSymbolLabelAnimation=function(t,i,r){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");$n(c)&&(c=c(null));var d=u.get("animationDelay")||0,h=$n(d)?d(null):d;t.eachItemGraphicEl(function(f,p){var m=f;if(m){var v=[f.x,f.y],g=void 0,_=void 0,S=void 0;if(r)if(o){var x=r,A=i.pointToCoord(v);a?(g=x.startAngle,_=x.endAngle,S=-A[1]/180*Math.PI):(g=x.r0,_=x.r,S=A[0])}else{var C=r;a?(g=C.x,_=C.x+C.width,S=f.x):(g=C.y+C.height,_=C.y,S=f.y)}var M=_===g?0:(S-g)/(_-g);l&&(M=1-M);var I=$n(d)?d(p):c*M+h,D=m.getSymbolPath(),E=D.getTextContent();m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:I}),E&&E.animateFrom({style:{opacity:0}},{duration:300,delay:I}),D.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,i,r){var a=t.getModel("endLabel");if(OK(t)){var o=t.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 Xi({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=d9e(l);c>=0&&($o(s,_o(t,"endLabel"),{inheritColor:r,labelFetcher:t,labelDataIndex:c,defaultText:function(d,h,f){return f!=null?RK(o,f):gv(o,d)},enableTextSetter:!0},f9e(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,i,r,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var d=r.getLayout("points"),h=r.hostModel,f=h.get("connectNulls"),p=s.get("precision"),m=s.get("distance")||0,v=l.getBaseAxis(),g=v.isHorizontal(),_=v.inverse,S=i.shape,x=_?g?S.x:S.y+S.height:g?S.x+S.width:S.y,A=(g?m:0)*(_?-1:1),C=(g?0:-m)*(_?-1:1),M=g?"x":"y",I=h9e(d,x,M),D=I.range,E=D[1]-D[0],P=void 0;if(E>=1){if(E>1&&!f){var F=oO(d,D[0]);u.attr({x:F[0]+A,y:F[1]+C}),o&&(P=h.getRawValue(D[0]))}else{var F=c.getPointOn(x,M);F&&u.attr({x:F[0]+A,y:F[1]+C});var V=h.getRawValue(D[0]),G=h.getRawValue(D[1]);o&&(P=nq(r,p,V,G,I.t))}a.lastFrameIndex=D[0]}else{var W=t===1||a.lastFrameIndex>0?D[0]:0,F=oO(d,W);o&&(P=h.getRawValue(W)),u.attr({x:F[0]+A,y:F[1]+C})}if(o){var Y=Vv(u);typeof Y.setLabelText=="function"&&Y.setLabelText(P)}}},e.prototype._doUpdateAnimation=function(t,i,r,a,o,s,l){var u=this._polyline,c=this._polygon,d=t.hostModel,h=n9e(this._data,t,this._stackedOnPoints,i,this._coordSys,r,this._valueOrigin),f=h.current,p=h.stackedOnCurrent,m=h.next,v=h.stackedOnNext;if(o&&(p=Id(h.stackedOnCurrent,h.current,r,o,l),f=Id(h.current,null,r,o,l),v=Id(h.stackedOnNext,h.next,r,o,l),m=Id(h.next,null,r,o,l)),rO(f,m)>3e3||c&&rO(p,v)>3e3){u.stopAnimation(),u.setShape({points:m}),c&&(c.stopAnimation(),c.setShape({points:m,stackedOnPoints:v}));return}u.shape.__points=h.current,u.shape.points=f;var g={shape:{points:m}};h.current!==f&&(g.shape.__points=h.next),u.stopAnimation(),Qi(u,g,d),c&&(c.setShape({points:f,stackedOnPoints:p}),c.stopAnimation(),Qi(c,{shape:{stackedOnPoints:v}},d),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],S=h.status,x=0;xe&&(e=n[t]);return isFinite(e)?e:NaN},min:function(n){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),d=i.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(d||1),f=Math.round(s/h);if(isFinite(f)&&f>1){a==="lttb"?e.setData(r.lttbDownSample(r.mapDimension(u.dim),1/f)):a==="minmax"&&e.setData(r.minmaxDownSample(r.mapDimension(u.dim),1/f));var p=void 0;xn(a)?p=m9e[a]:$n(a)&&(p=a),p&&e.setData(r.downSample(r.mapDimension(u.dim),1/f,p,g9e))}}}}}function y9e(n){n.registerChartView(v9e),n.registerSeriesModel(Kge),n.registerLayout(P3("line",!0)),n.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),i=e.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",i)}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,BK("line"))}var zK=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return nd(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,i,r){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(t),s=a.dataToPoint(o);if(r)ne(a.getAxes(),function(h,f){if(h.type==="category"&&i!=null){var p=h.getTicksCoords(),m=h.getTickModel().get("alignWithLabel"),v=o[f],g=i[f]==="x1"||i[f]==="y1";if(g&&!m&&(v+=1),p.length<2)return;if(p.length===2){s[f]=h.toGlobalCoord(h.getExtent()[g?1:0]);return}for(var _=void 0,S=void 0,x=1,A=0;Av){S=(C+_)/2;break}A===1&&(x=M-p[0].tickValue)}S==null&&(_?_&&(S=p[p.length-1].coord):S=p[0].coord),s[f]=h.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),d=a.getBaseAxis().isHorizontal()?0:1;s[d]+=u+c/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}(pa);pa.registerClass(zK);const d8=zK;var _9e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return nd(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 t=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>t&&(t=i),t},e.prototype.brushSelector=function(t,i,r){return r.rect(i.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Uh(d8.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}(d8);const S9e=_9e;var b9e=function(){function n(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return n}(),x9e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="sausage",i}return e.prototype.getDefaultShape=function(){return new b9e},e.prototype.buildPath=function(t,i){var r=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,c=i.startAngle,d=i.endAngle,h=i.clockwise,f=Math.PI*2,p=h?d-cMath.PI/2&&cs)return!0;s=d}return!1},e.prototype._isOrderDifferentInView=function(t,i){for(var r=i.scale,a=r.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],r.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==r.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,i,r,a){if(this._isOrderChangedWithinSameData(t,i,r)){var o=this._dataSort(t,r,i);this._isOrderDifferentInView(o,r)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",axisId:r.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,i,r){var a=i.baseAxis,o=this._dataSort(t,a,function(s){return t.get(t.mapDimension(i.otherAxis.dim),s)});r.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(t,i){this._clear(this._model),this._removeOnRenderedListener(i)},e.prototype.dispose=function(t,i){this._removeOnRenderedListener(i)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var i=this.group,r=this._data;t&&t.isAnimationEnabled()&&r&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],r.eachItemGraphicEl(function(a){L9(a,t,ni(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Yr),sO={cartesian2d:function(n,e){var t=e.width<0?-1:1,i=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=n.x+n.width,a=n.y+n.height,o=px(e.x,n.x),s=vx(e.x+e.width,r),l=px(e.y,n.y),u=vx(e.y+e.height,a),c=sr?s:o,e.y=d&&l>a?u:l,e.width=c?0:s-o,e.height=d?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||d},polar:function(n,e){var t=e.r0<=e.r?1:-1;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}var r=vx(e.r,n.r),a=px(e.r0,n.r0);e.r=r,e.r0=a;var o=r-a<0;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}return o}},lO={cartesian2d:function(n,e,t,i,r,a,o,s,l){var u=new Hi({shape:It({},i),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,d=r?"height":"width";c[d]=0}return u},polar:function(n,e,t,i,r,a,o,s,l){var u=!r&&l?h8:ll,c=new u({shape:i,z2:1});c.name="item";var d=GK(r);if(c.calculateTextPosition=w9e(d,{isRoundCap:u===h8}),a){var h=c.shape,f=r?"r":"endAngle",p={};h[f]=r?i.r0:i.startAngle,p[f]=i[f],(s?Qi:sa)(c,{shape:p},a)}return c}};function M9e(n,e){var t=n.get("realtimeSort",!0),i=e.getBaseAxis();if(t&&i.type==="category"&&e.type==="cartesian2d")return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}function uO(n,e,t,i,r,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?Qi:sa)(t,{shape:l},e,r,null);var c=e?n.baseAxis.model:null;(o?Qi:sa)(t,{shape:u},c,r)}function cO(n,e){for(var t=0;t0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*r/2,y:i.y+o*r/2,width:i.width-a*r,height:i.height-o*r}},polar:function(n,e,t){var i=n.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function R9e(n){return n.startAngle!=null&&n.endAngle!=null&&n.startAngle===n.endAngle}function GK(n){return function(e){var t=e?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+t;default:return i}}}(n)}function hO(n,e,t,i,r,a,o,s){var l=e.getItemVisual(t,"style");if(s){if(!a.get("roundCap")){var c=n.shape,d=cp(i.getModel("itemStyle"),c,!0);It(c,d),n.setShape(c)}}else{var u=i.get(["itemStyle","borderRadius"])||0;n.setShape("r",u)}n.useStyle(l);var h=i.getShallow("cursor");h&&n.attr("cursor",h);var f=s?o?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":o?r.height>=0?"bottom":"top":r.width>=0?"right":"left",p=_o(i);$o(n,p,{labelFetcher:a,labelDataIndex:t,defaultText:gv(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var m=n.getTextContent();if(s&&m){var v=i.get(["label","position"]);n.textConfig.inside=v==="middle"?!0:null,T9e(n,v==="outside"?f:v,GK(o),i.get(["label","rotate"]))}Jq(m,p,a.getRawValue(t),function(_){return RK(e,_)});var g=i.getModel(["emphasis"]);ya(n,g.get("focus"),g.get("blurScope"),g.get("disabled")),jo(n,i),R9e(r)&&(n.style.fill="none",n.style.stroke="none",ne(n.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function L9e(n,e){var t=n.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var i=n.get(["itemStyle","borderWidth"])||0,r=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,r,a)}var I9e=function(){function n(){}return n}(),fO=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="largeBar",i}return e.prototype.getDefaultShape=function(){return new I9e},e.prototype.buildPath=function(t,i){for(var r=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?t:null},30,!1);function D9e(n,e,t){for(var i=n.baseDimIdx,r=1-i,a=n.shape.points,o=n.largeDataIndices,s=[],l=[],u=n.barWidth,c=0,d=a.length/3;c=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function UK(n,e,t){if(r1(t,"cartesian2d")){var i=e,r=t.getArea();return{x:n?i.x:r.x,y:n?r.y:i.y,width:n?i.width:r.width,height:n?r.height:i.height}}else{var r=t.getArea(),a=e;return{cx:r.cx,cy:r.cy,r0:n?r.r0:a.r0,r:n?r.r:a.r,startAngle:n?a.startAngle:0,endAngle:n?a.endAngle:Math.PI*2}}}function N9e(n,e,t){var i=n.type==="polar"?ll:Hi;return new i({shape:UK(e,t,n),silent:!0,z2:0})}const k9e=C9e;function F9e(n){n.registerChartView(k9e),n.registerSeriesModel(S9e),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,si(HY,"bar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,WY("bar")),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,BK("bar")),n.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},function(r){e.sortInfo&&r.axis.setCategorySortInfo(e.sortInfo)})})}var mO=Math.PI*2,_6=Math.PI/180;function VK(n,e){return uo(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function HK(n,e){var t=VK(n,e),i=n.get("center"),r=n.get("radius");$t(r)||(r=[0,r]);var a=_n(t.width,e.getWidth()),o=_n(t.height,e.getHeight()),s=Math.min(a,o),l=_n(r[0],s/2),u=_n(r[1],s/2),c,d,h=n.coordinateSystem;if(h){var f=h.dataToPoint(i);c=f[0]||0,d=f[1]||0}else $t(i)||(i=[i,i]),c=_n(i[0],a)+t.x,d=_n(i[1],o)+t.y;return{cx:c,cy:d,r0:l,r:u}}function O9e(n,e,t){e.eachSeriesByType(n,function(i){var r=i.getData(),a=r.mapDimension("value"),o=VK(i,t),s=HK(i,t),l=s.cx,u=s.cy,c=s.r,d=s.r0,h=-i.get("startAngle")*_6,f=i.get("endAngle"),p=i.get("padAngle")*_6;f=f==="auto"?h-mO:-f*_6;var m=i.get("minAngle")*_6,v=m+p,g=0;r.each(a,function(Q){!isNaN(Q)&&g++});var _=r.getSum(a),S=Math.PI/(_||g)*2,x=i.get("clockwise"),A=i.get("roseType"),C=i.get("stillShowZeroSum"),M=r.getDataExtent(a);M[0]=0;var I=x?1:-1,D=[h,f],E=I*p/2;uE(D,!x),h=D[0],f=D[1];var P=WK(i);P.startAngle=h,P.endAngle=f,P.clockwise=x;var F=Math.abs(f-h),V=F,G=0,W=h;if(r.setLayout({viewRect:o,r:c}),r.each(a,function(Q,K){var ae;if(isNaN(Q)){r.setItemLayout(K,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:l,cy:u,r0:d,r:A?NaN:c});return}A!=="area"?ae=_===0&&C?S:Q*S:ae=F/g,aeae?(he=W+I*ae/2,Ee=he):(he=W+E,Ee=ie-E),r.setItemLayout(K,{angle:ae,startAngle:he,endAngle:Ee,clockwise:x,cx:l,cy:u,r0:d,r:A?pr(Q,M,[d,c]):c}),W=ie}),Vt?g:v,A=Math.abs(S.label.y-t);if(A>=x.maxY){var C=S.label.x-e-S.len2*r,M=i+S.len,I=Math.abs(C)n.unconstrainedWidth?null:f:null;i.setStyle("width",p)}var m=i.getBoundingRect();a.width=m.width;var v=(i.style.margin||0)+2.1;a.height=m.height+v,a.y-=(a.height-d)/2}}}function mx(n){return n.position==="center"}function G9e(n){var e=n.getData(),t=[],i,r,a=!1,o=(n.get("minShowLabelAngle")||0)*B9e,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,d=s.y,h=s.height;function f(C){C.ignore=!0}function p(C){if(!C.ignore)return!0;for(var M in C.states)if(C.states[M].ignore===!1)return!0;return!1}e.each(function(C){var M=e.getItemGraphicEl(C),I=M.shape,D=M.getTextContent(),E=M.getTextGuideLine(),P=e.getItemModel(C),F=P.getModel("label"),V=F.get("position")||P.get(["emphasis","label","position"]),G=F.get("distanceToLabelLine"),W=F.get("alignTo"),Y=_n(F.get("edgeDistance"),u),Q=F.get("bleedMargin"),K=P.getModel("labelLine"),ae=K.get("length");ae=_n(ae,u);var ie=K.get("length2");if(ie=_n(ie,u),Math.abs(I.endAngle-I.startAngle)0?"right":"left":Ee>0?"left":"right"}var Ft=Math.PI,k=0,_t=F.get("rotate");if(Yi(_t))k=_t*(Ft/180);else if(V==="center")k=0;else if(_t==="radial"||_t===!0){var Ct=Ee<0?-he+Ft:-he;k=Ct}else if(_t==="tangential"&&V!=="outside"&&V!=="outer"){var J=Math.atan2(Ee,He);J<0&&(J=Ft*2+J);var ee=He>0;ee&&(J=Ft+J),k=J-Ft}if(a=!!k,D.x=xe,D.y=Fe,D.rotation=k,D.setStyle({verticalAlign:"middle"}),bt){D.setStyle({align:Ot});var Bt=D.states.select;Bt&&(Bt.x+=D.x,Bt.y+=D.y)}else{var Ue=D.getBoundingRect().clone();Ue.applyTransform(D.getComputedTransform());var xt=(D.style.margin||0)+2.1;Ue.y-=xt/2,Ue.height+=xt,t.push({label:D,labelLine:E,position:V,len:ae,len2:ie,minTurnAngle:K.get("minTurnAngle"),maxSurfaceAngle:K.get("maxSurfaceAngle"),surfaceNormal:new fi(Ee,He),linePoints:pt,textAlign:Ot,labelDistance:G,labelAlignTo:W,edgeDistance:Y,bleedMargin:Q,rect:Ue,unconstrainedWidth:Ue.width,labelStyleWidth:D.style.width})}M.setTextConfig({inside:bt})}}),!a&&n.get("avoidLabelOverlap")&&z9e(t,i,r,l,u,h,c,d);for(var m=0;m0){for(var c=o.getItemLayout(0),d=1;isNaN(c&&c.startAngle)&&d=a.r0}},e.type="pie",e}(Yr);const H9e=V9e;function Jv(n,e,t){e=$t(e)&&{coordDimensions:e}||It({encodeDefine:n.getEncode()},e);var i=n.getSource(),r=T3(i,e).dimensions,a=new Rs(r,n);return a.initData(i,t),a}var W9e=function(){function n(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return n.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},n.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},n.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},n.prototype.getItemVisual=function(e,t){var i=this._getDataWithEncodedVisual();return i.getItemVisual(e,t)},n}();const L3=W9e;var j9e=Gi(),$9e=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.init=function(t){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new L3(An(this.getData,this),An(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){n.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Jv(this,{coordDimensions:["value"],encodeDefaulter:si(EE,this)})},e.prototype.getDataParams=function(t){var i=this.getData(),r=j9e(i),a=r.seats;if(!a){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),a=r.seats=ehe(o,i.hostModel.get("percentPrecision"))}var s=n.prototype.getDataParams.call(this,t);return s.percent=a[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){Fp(t,"labelLine",["show"]);var i=t.labelLine,r=t.emphasis.labelLine;i.show=i.show&&t.label.show,r.show=r.show&&t.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}(pa);const q9e=$9e;function X9e(n){return{seriesType:n,reset:function(e,t){var i=e.getData();i.filterSelf(function(r){var a=i.mapDimension("value"),o=i.get(a,r);return!(Yi(o)&&!isNaN(o)&&o<0)})}}}function Y9e(n){n.registerChartView(H9e),n.registerSeriesModel(q9e),oY("pie",n.registerAction),n.registerLayout(si(O9e,"pie")),n.registerProcessor(R3("pie")),n.registerProcessor(X9e("pie"))}var K9e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return nd(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,i,r){return r.point(i.getItemLayout(t))},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}(pa);const Z9e=K9e;var $K=4,J9e=function(){function n(){}return n}(),Q9e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.getDefaultShape=function(){return new J9e},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,i){var r=i.points,a=i.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&a[0]<$K,c=this.softClipShape,d;if(u){this._ctx=l;return}for(this._ctx=null,d=this._off;d=0;u--){var c=u*2,d=a[c]-s/2,h=a[c+1]-l/2;if(t>=d&&i>=h&&t<=d+s&&i<=h+l)return u}return-1},e.prototype.contain=function(t,i){var r=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=r[0],i=r[1],a.contain(t,i)){var o=this.hoverDataIdx=this.findDataIndex(t,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,r=i.points,a=i.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,d=-1/0,h=0;h=0&&(u.dataIndex=d+(e.startIndex||0))})},n.prototype.remove=function(){this._clear()},n.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},n}();const t3e=e3e;var n3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,r){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,i,r){this._symbolDraw.incrementalUpdate(t,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=t.end===i.getData().count()},e.prototype.updateTransform=function(t,i,r){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=P3("").reset(t,i,r);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var i=t.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,i){var r=this._symbolDraw,a=i.pipelineContext,o=a.large;return(!r||o!==this._isLargeDraw)&&(r&&r.remove(),r=this._symbolDraw=o?new t3e:new M3,this._isLargeDraw=o,this.group.removeAll()),this.group.add(r.group),r},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Yr);const i3e=n3e;var r3e=function(n){ot(e,n);function e(){return n!==null&&n.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}($i);const a3e=r3e;var ZA=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Xa).models[0]},e.type="cartesian2dAxis",e}($i);Za(ZA,A3);var qK={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,showMinLine:!0,showMaxLine:!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)"]}}},o3e=ui({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qK),iP=ui({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}}},qK),s3e=ui({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},iP),l3e=qn({logBase:10},iP);const XK={category:o3e,value:iP,time:s3e,log:l3e};var u3e={value:1,category:1,time:1,log:1};function yv(n,e,t,i){ne(u3e,function(r,a){var o=ui(ui({},XK[a],!0),i,!0),s=function(l){ot(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,d){var h=D9(this),f=h?jv(c):{},p=d.getTheme();ui(c,p.get(a+"Axis")),ui(c,this.getDefaultOption()),c.type=yO(c),h&&Rh(c,f,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=WA.createByAxisModel(this))},u.prototype.getCategories=function(c){var d=this.option;if(d.type==="category")return c?d.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(t);n.registerComponentModel(s)}),n.registerSubTypeDefaulter(e+"Axis",yO)}function yO(n){return n.type||(n.data?"category":"value")}var c3e=function(){function n(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return n.prototype.getAxis=function(e){return this._axes[e]},n.prototype.getAxes=function(){return Xt(this._dimList,function(e){return this._axes[e]},this)},n.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),dr(this.getAxes(),function(t){return t.scale.type===e})},n.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},n}();const d3e=c3e;var JA=["x","y"];function _O(n){return n.type==="interval"||n.type==="time"}var h3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=JA,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!_O(t)||!_O(i))){var r=t.getExtent(),a=i.getExtent(),o=this.dataToPoint([r[0],a[0]]),s=this.dataToPoint([r[1],a[1]]),l=r[1]-r[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,d=(s[1]-o[1])/u,h=o[0]-r[0]*c,f=o[1]-a[0]*d,p=this._transform=[c,0,0,d,h,f];this._invTransform=Bv([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var i=this.getAxis("x"),r=this.getAxis("y");return i.contain(i.toLocalCoord(t[0]))&&r.contain(r.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,i){var r=this.dataToPoint(t),a=this.dataToPoint(i),o=this.getArea(),s=new gi(r[0],r[1],a[0]-r[0],a[1]-r[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,i,r){r=r||[];var a=t[0],o=t[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ho(r,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return r[0]=s.toGlobalCoord(s.dataToCoord(a,i)),r[1]=l.toGlobalCoord(l.dataToCoord(o,i)),r},e.prototype.clampData=function(t,i){var r=this.getAxis("x").scale,a=this.getAxis("y").scale,o=r.getExtent(),s=a.getExtent(),l=r.parse(t[0]),u=a.parse(t[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},e.prototype.pointToData=function(t,i){var r=[];if(this._invTransform)return Ho(r,t,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return r[0]=a.coordToData(a.toLocalCoord(t[0]),i),r[1]=o.coordToData(o.toLocalCoord(t[1]),i),r},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var i=this.getAxis("x").getGlobalExtent(),r=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-t,o=Math.min(r[0],r[1])-t,s=Math.max(i[0],i[1])-a+t,l=Math.max(r[0],r[1])-o+t;return new gi(a,o,s,l)},e}(d3e),f3e=function(n){ot(e,n);function e(t,i,r,a,o){var s=n.call(this,t,i,r)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),t&&i[0]>i[1]&&i.reverse(),i},e.prototype.pointToData=function(t,i){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),i)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(ou);const p3e=f3e;function QA(n,e,t){t=t||{};var i=n.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p=u==="x"?[d[2]-f,d[3]+f]:[d[0]-f,d[1]+f];if(o){var m=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(m,p[1]),p[0])}a.position=[u==="y"?p[h[l]]:d[0],u==="x"?p[h[l]]:d[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Ro(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var g=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-g:g,a.z2=1,a}function SO(n){return n.get("coordinateSystem")==="cartesian2d"}function bO(n){var e={xAxisModel:null,yAxisModel:null};return ne(e,function(t,i){var r=i.replace(/Model$/,""),a=n.getReferringComponents(r,Xa).models[0];e[i]=a}),e}var gx=Math.log;function YK(n,e,t){var i=Ih.prototype,r=i.getTicks.call(t),a=i.getTicks.call(t,!0),o=r.length-1,s=i.getInterval.call(t),l=ZY(n,e),u=l.extent,c=l.fixMin,d=l.fixMax;if(n.type==="log"){var h=gx(n.base);u=[gx(u[0])/h,gx(u[1])/h]}n.setExtent(u[0],u[1]),n.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:d});var f=i.getExtent.call(n);c&&(u[0]=f[0]),d&&(u[1]=f[1]);var p=i.getInterval.call(n),m=u[0],v=u[1];if(c&&d)p=(v-m)/o;else if(c)for(v=u[0]+p*o;vu[0]&&isFinite(m)&&isFinite(u[0]);)p=nx(p),m=u[1]-p*o;else{var g=n.getTicks().length-1;g>o&&(p=nx(p));var _=p*o;v=Math.ceil(u[1]/p)*p,m=Ra(v-_),m<0&&u[0]>=0?(m=0,v=Ra(_)):v>0&&u[1]<=0&&(v=0,m=-Ra(_))}var S=(r[0].value-a[0].value)/s,x=(r[o].value-a[o].value)/s;i.setExtent.call(n,m+p*S,v+p*x),i.setInterval.call(n,p),(S||x)&&i.setNiceExtent.call(n,m+p,v-p)}var v3e=function(){function n(e,t,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=JA,this._initCartesian(e,t,i),this.model=e}return n.prototype.getRect=function(){return this._rect},n.prototype.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model);function r(o){var s,l=Li(o),u=l.length;if(u){for(var c=[],d=u-1;d>=0;d--){var h=+l[d],f=o[h],p=f.model,m=f.scale;jA(m)&&p.get("alignTicks")&&p.get("interval")==null?c.push(f):(mv(m,p),jA(m)&&(s=f))}c.length&&(s||(s=c.pop(),mv(s.scale,s.model)),ne(c,function(v){YK(v.scale,v.model,s.scale)}))}}r(i.x),r(i.y);var a={};ne(i.x,function(o){xO(i,"y",o,a)}),ne(i.y,function(o){xO(i,"x",o,a)}),this.resize(this.model,t)},n.prototype.resize=function(e,t,i){var r=e.getBoxLayoutParams(),a=!i&&e.get("containLabel"),o=uo(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(ne(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=Mme(u);if(c){var d=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[d]-=c[d]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),ne(this._coordsList,function(u){u.calcAffineTransform()});function l(){ne(s,function(u){var c=u.isHorizontal(),d=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(d[h],d[1-h]),m3e(u,c?o.x:o.y)})}},n.prototype.getAxis=function(e,t){var i=this._axesMap[e];if(i!=null)return i[t||0]},n.prototype.getAxes=function(){return this._axesList.slice()},n.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var i="x"+e+"y"+t;return this._coordsMap[i]}Kn(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,a=this._coordsList;r0?"top":"bottom",a="center"):C9(r-oh)?(o=i>0?"bottom":"top",a="center"):(o="middle",r>0&&r0?"right":"left":a=i>0?"left":"right"),{rotation:r,textAlign:a,textVerticalAlign:o}},n.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},n.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},n}(),TO={axisLine:function(n,e,t,i){var r=e.get(["axisLine","show"]);if(r==="auto"&&n.handleAutoShown&&(r=n.handleAutoShown("axisLine")),!!r){var a=e.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Ho(s,s,o),Ho(l,l,o));var c=It({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new Lo({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:n.strokeContainThreshold||5,silent:!0,z2:1});fv(d.shape,d.style.lineWidth),d.anid="line",t.add(d);var h=e.get(["axisLine","symbol"]);if(h!=null){var f=e.get(["axisLine","symbolSize"]);xn(h)&&(h=[h,h]),(xn(f)||Yi(f))&&(f=[f,f]);var p=n1(e.get(["axisLine","symbolOffset"])||0,f),m=f[0],v=f[1];ne([{rotate:n.rotation+Math.PI/2,offset:p[0],r:0},{rotate:n.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(g,_){if(h[_]!=="none"&&h[_]!=null){var S=Ya(h[_],-m/2,-v/2,m,v,c.stroke,!0),x=g.r+g.offset,A=u?l:s;S.attr({rotation:g.rotate,x:A[0]+x*Math.cos(n.rotation),y:A[1]-x*Math.sin(n.rotation),silent:!0,z2:11}),t.add(S)}})}}},axisTickLabel:function(n,e,t,i){var r=S3e(t,i,e,n),a=x3e(t,i,e,n);if(_3e(e,a,r),b3e(t,i,e,n.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=dK(Xt(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));pK(o)}},axisName:function(n,e,t,i){var r=Ro(n.axisName,e.get("name"));if(r){var a=e.get("nameLocation"),o=n.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,d=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,CO(a)?n.labelOffset+o*l:0],h,f=e.get("nameRotate");f!=null&&(f=f*oh/180);var p;CO(a)?h=Mp.innerTextLayout(n.rotation,f!=null?f:n.rotation,o):(h=y3e(n.rotation,a,f||0,u),p=n.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var m=s.getFont(),v=e.get("nameTruncate",!0)||{},g=v.ellipsis,_=Ro(n.nameTruncateMaxWidth,v.maxWidth,p),S=new Xi({x:d[0],y:d[1],rotation:h.rotation,silent:Mp.isLabelSilent(e),style:qr(s,{text:r,font:m,overflow:"truncate",width:_,ellipsis:g,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Qp({el:S,componentModel:e,itemName:r}),S.__fullText=r,S.anid="name",e.get("triggerEvent")){var x=Mp.makeAxisEventDataBase(e);x.targetType="axisName",x.name=r,ni(S).eventData=x}i.add(S),S.updateTransform(),t.add(S),S.decomposeTransform()}}};function y3e(n,e,t,i){var r=$$(t-n),a,o,s=i[0]>i[1],l=e==="start"&&!s||e!=="start"&&s;return C9(r-oh/2)?(o=l?"bottom":"top",a="center"):C9(r-oh*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",roh/2?a=l?"left":"right":a=l?"right":"left"),{rotation:r,textAlign:a,textVerticalAlign:o}}function _3e(n,e,t){if(!JY(n.axis)){var i=n.get(["axisLabel","showMinLabel"]),r=n.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],d=t[t.length-1],h=t[t.length-2];i===!1?(Kl(a),Kl(u)):AO(a,o)&&(i?(Kl(o),Kl(c)):(Kl(a),Kl(u))),r===!1?(Kl(s),Kl(d)):AO(l,s)&&(r?(Kl(l),Kl(h)):(Kl(s),Kl(d)))}}function Kl(n){n&&(n.ignore=!0)}function AO(n,e){var t=n&&n.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!t||!i)){var r=y_([]);return Jp(r,r,-n.rotation),t.applyTransform(Bc([],r,n.getLocalTransform())),i.applyTransform(Bc([],r,e.getLocalTransform())),t.intersect(i)}}function CO(n){return n==="middle"||n==="center"}function KK(n,e,t,i,r){for(var a=[],o=[],s=[],l=0;l=0||n===e}function E3e(n){var e=rP(n);if(e){var t=e.axisPointerModel,i=e.axis.scale,r=t.option,a=t.get("status"),o=t.get("value");o!=null&&(o=i.parse(o));var s=eC(t);a==null&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var m=l;p.color!=null&&(m=qn({color:p.color},l));var v=ui(Zn(p),{boundaryGap:t,splitNumber:i,scale:r,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:d,nameTextStyle:m,triggerEvent:h},!1);if(xn(c)){var g=v.name;v.name=c.replace("{value}",g!=null?g:"")}else $n(c)&&(v.name=c(v.name,v));var _=new Xr(v,null,this.ecModel);return Za(_,A3.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=f},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:ui({lineStyle:{color:"#bbb"}},Wm.axisLine),axisLabel:S6(Wm.axisLabel,!1),axisTick:S6(Wm.axisTick,!1),splitLine:S6(Wm.splitLine,!0),splitArea:S6(Wm.splitArea,!0),indicator:[]},e}($i);const W3e=H3e;var j3e=["axisLine","axisTickLabel","axisName"],$3e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var i=t.coordinateSystem,r=i.getIndicatorAxes(),a=Xt(r,function(o){var s=o.model.get("showName")?o.name:"",l=new Yc(o.model,{axisName:s,position:[i.cx,i.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});ne(a,function(o){ne(j3e,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var i=t.coordinateSystem,r=i.getIndicatorAxes();if(!r.length)return;var a=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),d=s.get("show"),h=l.get("color"),f=u.get("color"),p=$t(h)?h:[h],m=$t(f)?f:[f],v=[],g=[];function _(W,Y,Q){var K=Q%Y.length;return W[K]=W[K]||[],K}if(a==="circle")for(var S=r[0].getTicksCoords(),x=i.cx,A=i.cy,C=0;C3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;Sx(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(r){var d=Math.abs(a),h=(a>0?1:-1)*(d>3?.4:d>1?.15:.05);Sx(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!IO(this._zr,"globalPan")){var i=t.pinchScale>1?1.1:1/1.1;Sx(this,"zoom",null,t,{scale:i,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(P0);function Sx(n,e,t,i,r){n.pointerChecker&&n.pointerChecker(i,r.originX,r.originY)&&(Wc(i.event),nZ(n,e,t,i,r))}function nZ(n,e,t,i,r){r.isAvailableBehavior=An(u5,null,t,i),n.trigger(e,r)}function u5(n,e,t){var i=t[n];return!n||i&&(!xn(i)||e.event[i+"Key"])}const I3=nye;function oP(n,e,t){var i=n.target;i.x+=e,i.y+=t,i.dirty()}function sP(n,e,t,i){var r=n.target,a=n.zoomLimit,o=n.zoom=n.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/n.zoom;n.zoom=o,r.x-=(t-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var iye={axisPointer:1,tooltip:1,brush:1};function Y_(n,e,t){var i=e.getComponentByElement(n.topTarget),r=i&&i.coordinateSystem;return i&&i!==t&&!iye.hasOwnProperty(i.mainType)&&r&&r.model!==t}function iZ(n){if(xn(n)){var e=new DOMParser;n=e.parseFromString(n,"text/xml")}var t=n;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var bx,f8={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},DO=Li(f8),p8={"alignment-baseline":"textBaseline","stop-color":"stopColor"},NO=Li(p8),rye=function(){function n(){this._defs={},this._root=null}return n.prototype.parse=function(e,t){t=t||{};var i=iZ(e);this._defsUsePending=[];var r=new ei;this._root=r;var a=[],o=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||t.width),l=parseFloat(i.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Sl(i,r,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,r,a,null,!1,!1),u=u.nextSibling;sye(this._defs,this._defsUsePending),this._defsUsePending=[];var c,d;if(o){var h=K_(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(d=aZ(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var f=r;r=new ei,r.add(f),f.scaleX=f.scaleY=d.scale,f.x=d.x,f.y=d.y}return!t.ignoreRootClip&&s!=null&&l!=null&&r.setClipPath(new Hi({shape:{x:0,y:0,width:s,height:l}})),{root:r,width:s,height:l,viewBoxRect:c,viewBoxTransform:d,named:a}},n.prototype._parseNode=function(e,t,i,r,a,o){var s=e.nodeName.toLowerCase(),l,u=r;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!a){var c=bx[s];if(c&&Mn(bx,s)){l=c.call(this,e,t);var d=e.getAttribute("name");if(d){var h={name:d,namedFrom:null,svgNodeTagLower:s,el:l};i.push(h),s==="g"&&(u=h)}else r&&i.push({name:r.name,namedFrom:r,svgNodeTagLower:s,el:l});t.add(l)}}var f=kO[s];if(f&&Mn(kO,s)){var p=f.call(this,e),m=e.getAttribute("id");m&&(this._defs[m]=p)}}if(l&&l.isGroup)for(var v=e.firstChild;v;)v.nodeType===1?this._parseNode(v,l,i,u,a,o):v.nodeType===3&&o&&this._parseText(v,l),v=v.nextSibling},n.prototype._parseText=function(e,t){var i=new E9({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),aye(i,t);var r=i.style,a=r.fontSize;a&&a<9&&(r.fontSize=9,i.scaleX*=a/9,i.scaleY*=a/9);var o=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=o;var s=i.getBoundingRect();return this._textX+=s.width,t.add(i),i},n.internalField=function(){bx={g:function(e,t){var i=new ei;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i},rect:function(e,t){var i=new Hi;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(e,t){var i=new zh;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),i.silent=!0,i},line:function(e,t){var i=new Lo;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(e,t){var i=new mE;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(e,t){var i=e.getAttribute("points"),r;i&&(r=BO(i));var a=new ul({shape:{points:r||[]},silent:!0});return Zl(t,a),Sl(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var i=e.getAttribute("points"),r;i&&(r=BO(i));var a=new hl({shape:{points:r||[]},silent:!0});return Zl(t,a),Sl(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var i=new qo;return Zl(t,i),Sl(e,i,this._defsUsePending,!1,!1),i.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),i.silent=!0,i},text:function(e,t){var i=e.getAttribute("x")||"0",r=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(r)+parseFloat(o);var s=new ei;return Zl(t,s),Sl(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var i=e.getAttribute("x"),r=e.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),r!=null&&(this._textY=parseFloat(r));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new ei;return Zl(t,s),Sl(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,t){var i=e.getAttribute("d")||"",r=Lq(i);return Zl(t,r),Sl(e,r,this._defsUsePending,!1,!1),r.silent=!0,r}}}(),n}(),kO={lineargradient:function(n){var e=parseInt(n.getAttribute("x1")||"0",10),t=parseInt(n.getAttribute("y1")||"0",10),i=parseInt(n.getAttribute("x2")||"10",10),r=parseInt(n.getAttribute("y2")||"0",10),a=new po(e,t,i,r);return FO(n,a),OO(n,a),a},radialgradient:function(n){var e=parseInt(n.getAttribute("cx")||"0",10),t=parseInt(n.getAttribute("cy")||"0",10),i=parseInt(n.getAttribute("r")||"0",10),r=new Wq(e,t,i);return FO(n,r),OO(n,r),r}};function FO(n,e){var t=n.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function OO(n,e){for(var t=n.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var i=t.getAttribute("offset"),r=void 0;i&&i.indexOf("%")>0?r=parseInt(i,10)/100:i?r=parseFloat(i):r=0;var a={};rZ(t,a,a);var o=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:o})}t=t.nextSibling}}function Zl(n,e){n&&n.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),qn(e.__inheritedStyle,n.__inheritedStyle))}function BO(n){for(var e=K_(n),t=[],i=0;i0;a-=2){var o=i[a],s=i[a-1],l=K_(o);switch(r=r||Dl(),s){case"translate":Ku(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":QM(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Jp(r,r,-parseFloat(l[0])*xx,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*xx);Bc(r,[1,0,u,1,0,0],r);break;case"skewY":var c=Math.tan(parseFloat(l[0])*xx);Bc(r,[1,c,0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5]);break}}e.setLocalTransform(r)}}var GO=/([^\s:;]+)\s*:\s*([^:;]+)/g;function rZ(n,e,t){var i=n.getAttribute("style");if(i){GO.lastIndex=0;for(var r;(r=GO.exec(i))!=null;){var a=r[1],o=Mn(f8,a)?f8[a]:null;o&&(e[o]=r[2]);var s=Mn(p8,a)?p8[a]:null;s&&(t[s]=r[2])}}}function dye(n,e,t){for(var i=0;i0,v={api:i,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:m,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(v):l.resourceType==="geoSVG"&&this._buildSVG(v),this._updateController(e,t,i),this._updateMapSelectHandler(e,u,i,r)},n.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=In(),i=In(),r=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(f,p){return p&&(f=p(f)),f&&[f[0]*a.scaleX+a.x,f[1]*a.scaleY+a.y]}function d(f){for(var p=[],m=!u&&l&&l.project,v=0;v=0)&&(h=r);var f=o?{normal:{align:"center",verticalAlign:"middle"}}:null;$o(e,_o(i),{labelFetcher:h,labelDataIndex:d,defaultText:t},f);var p=e.getTextContent();if(p&&(oZ(p).ignore=p.ignore,e.textConfig&&o)){var m=e.getBoundingRect().clone();e.textConfig.layoutRect=m,e.textConfig.position=[(o[0]-m.x)/m.width*100+"%",(o[1]-m.y)/m.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function jO(n,e,t,i,r,a){n.data?n.data.setItemGraphicEl(a,e):ni(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:t,region:i&&i.option||{}}}function $O(n,e,t,i,r){n.data||Qp({el:e,componentModel:r,itemName:t,itemTooltipOption:i.get("tooltip")})}function qO(n,e,t,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var a=i.getModel("emphasis"),o=a.get("focus");return ya(e,o,a.get("blurScope"),a.get("disabled")),n.isGeo&&Pfe(e,r,t),o}function XO(n,e,t){var i=[],r;function a(){r=[]}function o(){r.length&&(i.push(r),r=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&r.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),ne(n,function(l){s.lineStart();for(var u=0;u-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(pa);const Dye=Iye;function Nye(n,e){var t={};return ne(n,function(i){i.each(i.mapDimension("value"),function(r,a){var o="ec-"+i.getName(a);t[o]=t[o]||[],isNaN(r)||t[o].push(r)})}),n[0].map(n[0].mapDimension("value"),function(i,r){for(var a="ec-"+n[0].getName(r),o=0,s=1/0,l=-1/0,u=t[a].length,c=0;c1?(x.width=S,x.height=S/v):(x.height=S,x.width=S*v),x.y=_[1]-x.height/2,x.x=_[0]-x.width/2;else{var A=n.getBoxLayoutParams();A.aspect=v,x=uo(A,{width:p,height:m})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(n.get("center"),e),this.setZoom(n.get("zoom"))}function zye(n,e){ne(e.get("geoCoord"),function(t,i){n.addGeoCoord(i,t)})}var Gye=function(){function n(){this.dimensions=lZ}return n.prototype.create=function(e,t){var i=[];function r(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new JO(l+s,l,It({nameMap:o.get("nameMap")},r(o)));u.zoomLimit=o.get("scaleLimit"),i.push(u),o.coordinateSystem=u,u.model=o,u.resize=QO,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=i[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),ne(a,function(o,s){var l=Xt(o,function(c){return c.get("nameMap")}),u=new JO(s,s,It({nameMap:XM(l)},r(o[0])));u.zoomLimit=Ro.apply(null,Xt(o,function(c){return c.get("scaleLimit")})),i.push(u),u.resize=QO,u.resize(o[0],t),ne(o,function(c){c.coordinateSystem=u,zye(u,c)})}),i},n.prototype.getFilledRegions=function(e,t,i,r){for(var a=(e||[]).slice(),o=In(),s=0;s=0;o--){var s=r[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function Yye(n,e){var t=n.isExpand?n.children:[],i=n.parentNode.children,r=n.hierNode.i?i[n.hierNode.i-1]:null;if(t.length){Jye(n);var a=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;r?(n.hierNode.prelim=r.hierNode.prelim+e(n,r),n.hierNode.modifier=n.hierNode.prelim-a):n.hierNode.prelim=a}else r&&(n.hierNode.prelim=r.hierNode.prelim+e(n,r));n.parentNode.hierNode.defaultAncestor=Qye(n,r,n.parentNode.hierNode.defaultAncestor||i[0],e)}function Kye(n){var e=n.hierNode.prelim+n.parentNode.hierNode.modifier;n.setLayout({x:e},!0),n.hierNode.modifier+=n.parentNode.hierNode.modifier}function tB(n){return arguments.length?n:n6e}function Cg(n,e){return n-=Math.PI/2,{x:e*Math.cos(n),y:e*Math.sin(n)}}function Zye(n,e){return uo(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Jye(n){for(var e=n.children,t=e.length,i=0,r=0;--t>=0;){var a=e[t];a.hierNode.prelim+=i,a.hierNode.modifier+=i,r+=a.hierNode.change,i+=a.hierNode.shift+r}}function Qye(n,e,t,i){if(e){for(var r=n,a=n,o=a.parentNode.children[0],s=e,l=r.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,d=s.hierNode.modifier;s=Tx(s),a=Ax(a),s&&a;){r=Tx(r),o=Ax(o),r.hierNode.ancestor=n;var h=s.hierNode.prelim+d-a.hierNode.prelim-u+i(s,a);h>0&&(t6e(e6e(s,n,t),n,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=r.hierNode.modifier,c+=o.hierNode.modifier}s&&!Tx(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=d-l),a&&!Ax(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,t=n)}return t}function Tx(n){var e=n.children;return e.length&&n.isExpand?e[e.length-1]:n.hierNode.thread}function Ax(n){var e=n.children;return e.length&&n.isExpand?e[0]:n.hierNode.thread}function e6e(n,e,t){return n.hierNode.ancestor.parentNode===e.parentNode?n.hierNode.ancestor:t}function t6e(n,e,t){var i=t/(e.hierNode.i-n.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,n.hierNode.change+=i}function n6e(n,e){return n.parentNode===e.parentNode?1:2}var i6e=function(){function n(){this.parentPoint=[],this.childPoints=[]}return n}(),r6e=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new i6e},e.prototype.buildPath=function(t,i){var r=i.childPoints,a=r.length,o=i.parentPoint,s=r[0],l=r[a-1];if(a===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=i.orient,c=u==="TB"||u==="BT"?0:1,d=1-c,h=_n(i.forkPosition,1),f=[];f[c]=o[c],f[d]=o[d]+(l[d]-o[d])*h,t.moveTo(o[0],o[1]),t.lineTo(f[0],f[1]),t.moveTo(s[0],s[1]),f[c]=s[c],t.lineTo(f[0],f[1]),f[c]=l[c],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var p=1;p_.x,A||(x=x-Math.PI));var M=A?"left":"right",I=s.getModel("label"),D=I.get("rotate"),E=D*(Math.PI/180),P=v.getTextContent();P&&(v.setTextConfig({position:I.get("position")||M,rotation:D==null?-x:E,origin:"center"}),P.setStyle("verticalAlign","middle"))}var F=s.get(["emphasis","focus"]),V=F==="relative"?x9(o.getAncestorsIndices(),o.getDescendantIndices()):F==="ancestor"?o.getAncestorsIndices():F==="descendant"?o.getDescendantIndices():null;V&&(ni(t).focus=V),o6e(r,o,c,t,p,f,m,i),t.__edge&&(t.onHoverStateChange=function(G){if(G!=="blur"){var W=o.parentNode&&n.getItemGraphicEl(o.parentNode.dataIndex);W&&W.hoverState===_3||$5(t.__edge,G)}})}function o6e(n,e,t,i,r,a,o,s){var l=e.getModel(),u=n.get("edgeShape"),c=n.get("layout"),d=n.getOrient(),h=n.get(["lineStyle","curveness"]),f=n.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),m=i.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(m||(m=i.__edge=new E_({shape:iC(c,d,h,r,r)})),Qi(m,{shape:iC(c,d,h,a,o)},n));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var v=e.children,g=[],_=0;_t&&(t=r.height)}this.height=t+1},n.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,r=i.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},n.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},n.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,i=t.data.getItemModel(this.dataIndex);return i.getModel(e)}},n.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},n.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},n.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},n.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},n.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},n.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var i=t.getData().tree.root,r=n.targetNode;if(xn(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var a=n.targetNodeId;if(a!=null&&(r=i.getNodeById(a)))return{node:r}}}function vZ(n){for(var e=[];n;)n=n.parentNode,n&&e.push(n);return e.reverse()}function hP(n,e){var t=vZ(n);return xi(t,e)>=0}function Z_(n,e){for(var t=[];n;){var i=n.dataIndex;t.push({name:n.name,dataIndex:i,value:e.getRawValue(i)}),n=n.parentNode}return t.reverse(),t}var g6e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var i={name:t.name,children:t.data},r=t.leaves||{},a=new Xr(r,this,this.ecModel),o=dP.createTree(i,this,s);function s(d){d.wrapMethod("getItemModel",function(h,f){var p=o.getNodeByDataIndex(f);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(d){d.depth>l&&(l=d.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(d){var h=d.hostTree.data.getRawDataItem(d.dataIndex);d.isExpand=h&&h.collapsed!=null?!h.collapsed:d.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,i,r){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return So("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var i=n.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=Z_(r,this),i.collapsed=!r.isExpand,i},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(pa);const y6e=g6e;function _6e(n,e,t){for(var i=[n],r=[],a;a=i.pop();)if(r.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)t.push(r[a])}}function S6e(n,e){n.eachSeriesByType("tree",function(t){b6e(t,e)})}function b6e(n,e){var t=Zye(n,e);n.layoutInfo=t;var i=n.get("layout"),r=0,a=0,o=null;i==="radial"?(r=2*Math.PI,a=Math.min(t.height,t.width)/2,o=tB(function(S,x){return(S.parentNode===x.parentNode?1:2)/S.depth})):(r=t.width,a=t.height,o=tB());var s=n.getData().tree.root,l=s.children[0];if(l){Xye(s),_6e(l,Yye,o),s.hierNode.modifier=-l.hierNode.prelim,$m(l,Kye);var u=l,c=l,d=l;$m(l,function(S){var x=S.getLayout().x;xc.getLayout().x&&(c=S),S.depth>d.depth&&(d=S)});var h=u===c?1:o(u,c)/2,f=h-u.getLayout().x,p=0,m=0,v=0,g=0;if(i==="radial")p=r/(c.getLayout().x+h+f),m=a/(d.depth-1||1),$m(l,function(S){v=(S.getLayout().x+f)*p,g=(S.depth-1)*m;var x=Cg(v,g);S.setLayout({x:x.x,y:x.y,rawX:v,rawY:g},!0)});else{var _=n.getOrient();_==="RL"||_==="LR"?(m=a/(c.getLayout().x+h+f),p=r/(d.depth-1||1),$m(l,function(S){g=(S.getLayout().x+f)*m,v=_==="LR"?(S.depth-1)*p:r-(S.depth-1)*p,S.setLayout({x:v,y:g},!0)})):(_==="TB"||_==="BT")&&(p=r/(c.getLayout().x+h+f),m=a/(d.depth-1||1),$m(l,function(S){v=(S.getLayout().x+f)*p,g=_==="TB"?(S.depth-1)*m:a-(S.depth-1)*m,S.setLayout({x:v,y:g},!0)}))}}}function x6e(n){n.eachSeriesByType("tree",function(e){var t=e.getData(),i=t.tree;i.eachNode(function(r){var a=r.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(r.dataIndex,"style");It(s,o)})})}function w6e(n){n.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var r=e.dataIndex,a=i.getData().tree,o=a.getNodeByDataIndex(r);o.isExpand=!o.isExpand})}),n.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,i){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var a=r.coordinateSystem,o=uP(a,e,void 0,i);r.setCenter&&r.setCenter(o.center),r.setZoom&&r.setZoom(o.zoom)})})}function T6e(n){n.registerChartView(s6e),n.registerSeriesModel(y6e),n.registerLayout(S6e),n.registerVisual(x6e),w6e(n)}var oB=["treemapZoomToNode","treemapRender","treemapMove"];function A6e(n){for(var e=0;e1;)a=a.parentNode;var o=IA(n.ecModel,a.name||a.dataIndex+"",i);r.setVisual("decal",o)})}var C6e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,i){var r={name:t.name,children:t.data};gZ(r);var a=t.levels||[],o=this.designatedVisualItemStyle={},s=new Xr({itemStyle:o},this,i);a=t.levels=M6e(a,i);var l=Xt(a||[],function(d){return new Xr(d,s,i)},this),u=dP.createTree(r,this,c);function c(d){d.wrapMethod("getItemModel",function(h,f){var p=u.getNodeByDataIndex(f),m=p?l[p.depth]:null;return h.parentModel=m||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,i,r){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return So("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var i=n.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=Z_(r,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},It(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var i=this._idIndexMap;i||(i=this._idIndexMap=In(),this._idIndexMapCount=0);var r=i.get(t);return r==null&&i.set(t,r=this._idIndexMapCount++),r},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){mZ(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(pa);function gZ(n){var e=0;ne(n.children,function(i){gZ(i);var r=i.value;$t(r)&&(r=r[0]),e+=r});var t=n.value;$t(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),$t(n.value)?n.value[0]=t:n.value=t}function M6e(n,e){var t=Ar(e.get("color")),i=Ar(e.get(["aria","decal","decals"]));if(t){n=n||[];var r,a;ne(n,function(s){var l=new Xr(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(r=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=n[0]||(n[0]={});return r||(o.color=t.slice()),!a&&i&&(o.decal=i.slice()),n}}const E6e=C6e;var P6e=8,sB=8,Cx=5,R6e=function(){function n(e){this.group=new ei,e.add(this.group)}return n.prototype.render=function(e,t,i,r){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!i)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),d={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,d,u),this._renderContent(e,d,s,l,u,c,r),O_(o,d.pos,d.box)}},n.prototype._prepare=function(e,t,i){for(var r=e;r;r=r.parentNode){var a=lo(r.getModel().get("name"),""),o=i.getTextRect(a),s=Math.max(o.width+P6e*2,t.emptyItemWidth);t.totalWidth+=s+sB,t.renderList.push({node:r,text:a,width:s})}},n.prototype._renderContent=function(e,t,i,r,a,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),d=Bpe(t.pos,t.box),h=t.totalWidth,f=t.renderList,p=r.getModel("itemStyle").getItemStyle(),m=f.length-1;m>=0;m--){var v=f[m],g=v.node,_=v.width,S=v.text;h>d.width&&(h-=_-u,_=u,S=null);var x=new ul({shape:{points:L6e(l,0,_,c,m===f.length-1,m===0)},style:qn(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xi({style:qr(a,{text:S})}),textConfig:{position:"inside"},z2:Gv*1e4,onclick:si(s,g)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=qr(o,{text:S}),x.ensureState("emphasis").style=p,ya(x,r.get("focus"),r.get("blurScope"),r.get("disabled")),this.group.add(x),I6e(x,e,g),l+=_+sB}},n.prototype.remove=function(){this.group.removeAll()},n}();function L6e(n,e,t,i,r,a){var o=[[r?n:n-Cx,e],[n+t,e],[n+t,e+i],[r?n:n-Cx,e+i]];return!a&&o.splice(2,0,[n+t+Cx,e+i/2]),!r&&o.push([n,e+i/2]),o}function I6e(n,e,t){ni(n).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Z_(t,e)}}const D6e=R6e;var N6e=function(){function n(){this._storage=[],this._elExistsMap={}}return n.prototype.add=function(e,t,i,r,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:i,delay:r,easing:a}),!0)},n.prototype.finished=function(e){return this._finishedCallback=e,this},n.prototype.start=function(){for(var e=this,t=this._storage.length,i=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,a=this._storage.length;ruB||Math.abs(t.dy)>uB)){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x+t.dx,y:r.y+t.dy,width:r.width,height:r.height}})}},e.prototype._onZoom=function(t){var i=t.originX,r=t.originY,a=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new gi(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var d=c.zoom=c.zoom||1;if(d*=a,u){var h=u.min||0,f=u.max||1/0;d=Math.max(Math.min(f,d),h)}var p=d/c.zoom;c.zoom=d;var m=this.seriesModel.layoutInfo;i-=m.x,r-=m.y;var v=Dl();Ku(v,v,[-i,-r]),QM(v,v,[p,p]),Ku(v,v,[i,r]),l.applyTransform(v),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var i=this;t.on("click",function(r){if(i._state==="ready"){var a=i.seriesModel.get("nodeClick",!0);if(a){var o=i.findTarget(r.offsetX,r.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)i._rootToNode(o);else if(a==="zoomToNode")i._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&J5(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,i,r){var a=this;r||(r=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(i.getWidth()/2,i.getHeight()/2),r||(r={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new D6e(this.group))).render(t,i,r.node,function(o){a._state!=="animating"&&(hP(t.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=qm(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,i){var r,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,i),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)r={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),r},e.type="treemap",e}(Yr);function qm(){return{nodeGroup:[],background:[],content:[]}}function G6e(n,e,t,i,r,a,o,s,l,u){if(!o)return;var c=o.getLayout(),d=n.getData(),h=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var f=c.width,p=c.height,m=c.borderWidth,v=c.invisible,g=o.getRawIndex(),_=s&&s.getRawIndex(),S=o.viewChildren,x=c.upperHeight,A=S&&S.length,C=h.getModel("itemStyle"),M=h.getModel(["emphasis","itemStyle"]),I=h.getModel(["blur","itemStyle"]),D=h.getModel(["select","itemStyle"]),E=C.get("borderRadius")||0,P=Fe("nodeGroup",rC);if(!P)return;if(l.add(P),P.x=c.x||0,P.y=c.y||0,P.markRedraw(),v8(P).nodeWidth=f,v8(P).nodeHeight=p,c.isAboveViewRoot)return P;var F=Fe("background",lB,u,O6e);F&&ie(P,F,A&&c.upperLabelHeight);var V=h.getModel("emphasis"),G=V.get("focus"),W=V.get("blurScope"),Y=V.get("disabled"),Q=G==="ancestor"?o.getAncestorsIndices():G==="descendant"?o.getDescendantIndices():G;if(A)R9(P)&&ap(P,!1),F&&(ap(F,!Y),d.setItemGraphicEl(o.dataIndex,F),TA(F,Q,W));else{var K=Fe("content",lB,u,B6e);K&&he(P,K),F.disableMorphing=!0,F&&R9(F)&&ap(F,!1),ap(P,!Y),d.setItemGraphicEl(o.dataIndex,P);var ae=h.getShallow("cursor");ae&&K.attr("cursor",ae),TA(P,Q,W)}return P;function ie(bt,ht,Kt){var Tt=ni(ht);if(Tt.dataIndex=o.dataIndex,Tt.seriesIndex=n.seriesIndex,ht.setShape({x:0,y:0,width:f,height:p,r:E}),v)Ee(ht);else{ht.invisible=!1;var Ae=o.getVisual("style"),Lt=Ae.stroke,vt=hB(C);vt.fill=Lt;var Ft=Hf(M);Ft.fill=M.get("borderColor");var k=Hf(I);k.fill=I.get("borderColor");var _t=Hf(D);if(_t.fill=D.get("borderColor"),Kt){var Ct=f-2*m;He(ht,Lt,Ae.opacity,{x:m,y:0,width:Ct,height:x})}else ht.removeTextContent();ht.setStyle(vt),ht.ensureState("emphasis").style=Ft,ht.ensureState("blur").style=k,ht.ensureState("select").style=_t,zp(ht)}bt.add(ht)}function he(bt,ht){var Kt=ni(ht);Kt.dataIndex=o.dataIndex,Kt.seriesIndex=n.seriesIndex;var Tt=Math.max(f-2*m,0),Ae=Math.max(p-2*m,0);if(ht.culling=!0,ht.setShape({x:m,y:m,width:Tt,height:Ae,r:E}),v)Ee(ht);else{ht.invisible=!1;var Lt=o.getVisual("style"),vt=Lt.fill,Ft=hB(C);Ft.fill=vt,Ft.decal=Lt.decal;var k=Hf(M),_t=Hf(I),Ct=Hf(D);He(ht,vt,Lt.opacity,null),ht.setStyle(Ft),ht.ensureState("emphasis").style=k,ht.ensureState("blur").style=_t,ht.ensureState("select").style=Ct,zp(ht)}bt.add(ht)}function Ee(bt){!bt.invisible&&a.push(bt)}function He(bt,ht,Kt,Tt){var Ae=h.getModel(Tt?dB:cB),Lt=lo(h.get("name"),null),vt=Ae.getShallow("show");$o(bt,_o(h,Tt?dB:cB),{defaultText:vt?Lt:null,inheritColor:ht,defaultOpacity:Kt,labelFetcher:n,labelDataIndex:o.dataIndex});var Ft=bt.getTextContent();if(Ft){var k=Ft.style,_t=KM(k.padding||0);Tt&&(bt.setTextConfig({layoutRect:Tt}),Ft.disableLabelLayout=!0),Ft.beforeUpdate=function(){var J=Math.max((Tt?Tt.width:bt.shape.width)-_t[1]-_t[3],0),ee=Math.max((Tt?Tt.height:bt.shape.height)-_t[0]-_t[2],0);(k.width!==J||k.height!==ee)&&Ft.setStyle({width:J,height:ee})},k.truncateMinChar=2,k.lineOverflow="truncate",xe(k,Tt,c);var Ct=Ft.getState("emphasis");xe(Ct?Ct.style:null,Tt,c)}}function xe(bt,ht,Kt){var Tt=bt?bt.text:null;if(!ht&&Kt.isLeafRoot&&Tt!=null){var Ae=n.get("drillDownIcon",!0);bt.text=Ae?Ae+" "+Tt:Tt}}function Fe(bt,ht,Kt,Tt){var Ae=_!=null&&t[bt][_],Lt=r[bt];return Ae?(t[bt][_]=null,pt(Lt,Ae)):v||(Ae=new ht,Ae instanceof M0&&(Ae.z2=U6e(Kt,Tt)),Ot(Lt,Ae)),e[bt][g]=Ae}function pt(bt,ht){var Kt=bt[g]={};ht instanceof rC?(Kt.oldX=ht.x,Kt.oldY=ht.y):Kt.oldShape=It({},ht.shape)}function Ot(bt,ht){var Kt=bt[g]={},Tt=o.parentNode,Ae=ht instanceof ei;if(Tt&&(!i||i.direction==="drillDown")){var Lt=0,vt=0,Ft=r.background[Tt.getRawIndex()];!i&&Ft&&Ft.oldShape&&(Lt=Ft.oldShape.width,vt=Ft.oldShape.height),Ae?(Kt.oldX=0,Kt.oldY=vt):Kt.oldShape={x:Lt,y:vt,width:0,height:0}}Kt.fadein=!Ae}}function U6e(n,e){return n*F6e+e}const V6e=z6e;var H9=ne,H6e=Kn,m8=-1,fP=function(){function n(e){var t=e.mappingMethod,i=e.type,r=this.option=Zn(e);this.type=i,this.mappingMethod=t,this._normalizeData=$6e[t];var a=n.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?(Mx(r),W6e(r)):t==="category"?r.categories?j6e(r):Mx(r,!0):(Ls(t!=="linear"||r.dataExtent),Mx(r))}return n.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},n.prototype.getNormalizer=function(){return An(this._normalizeData,this)},n.listVisualTypes=function(){return Li(n.visualHandlers)},n.isValidType=function(e){return n.visualHandlers.hasOwnProperty(e)},n.eachVisual=function(e,t,i){Kn(e)?ne(e,t,i):t.call(i,e)},n.mapVisual=function(e,t,i){var r,a=$t(e)?[]:Kn(e)?{}:(r=!0,null);return n.eachVisual(e,function(o,s){var l=t.call(i,o,s);r?a=l:a[s]=l}),a},n.retrieveVisuals=function(e){var t={},i;return e&&H9(n.visualHandlers,function(r,a){e.hasOwnProperty(a)&&(t[a]=e[a],i=!0)}),i?t:null},n.prepareVisualTypes=function(e){if($t(e))e=e.slice();else if(H6e(e)){var t=[];H9(e,function(i,r){t.push(r)}),e=t}else return[];return e.sort(function(i,r){return r==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),e},n.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},n.findPieceIndex=function(e,t,i){for(var r,a=1/0,o=0,s=t.length;o=0;a--)i[a]==null&&(delete t[e[a]],e.pop())}function Mx(n,e){var t=n.visual,i=[];Kn(t)?H9(t,function(a){i.push(a)}):t!=null&&i.push(t);var r={color:1,symbol:1};!e&&i.length===1&&!r.hasOwnProperty(n.type)&&(i[1]=i[0]),yZ(n,i)}function x6(n){return{applyVisual:function(e,t,i){var r=this.mapValueToVisual(e);i("color",n(t("color"),r))},_normalizedToVisual:aC([0,1])}}function fB(n){var e=this.option.visual;return e[Math.round(pr(n,[0,1],[0,e.length-1],!0))]||{}}function Xm(n){return function(e,t,i){i(n,this.mapValueToVisual(e))}}function Mg(n){var e=this.option.visual;return e[this.option.loop&&n!==m8?n%e.length:n]}function Wf(){return this.option.visual[0]}function aC(n){return{linear:function(e){return pr(e,n,this.option.visual,!0)},category:Mg,piecewise:function(e,t){var i=oC.call(this,t);return i==null&&(i=pr(e,n,this.option.visual,!0)),i},fixed:Wf}}function oC(n){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var i=fP.findPieceIndex(n,t),r=t[i];if(r&&r.visual)return r.visual[this.type]}}function yZ(n,e){return n.visual=e,n.type==="color"&&(n.parsedVisual=Xt(e,function(t){var i=Nl(t);return i||[0,0,0,1]})),e}var $6e={linear:function(n){return pr(n,this.option.dataExtent,[0,1],!0)},piecewise:function(n){var e=this.option.pieceList,t=fP.findPieceIndex(n,e,!0);if(t!=null)return pr(t,[0,e.length-1],[0,1],!0)},category:function(n){var e=this.option.categories?this.option.categoryMap[n]:n;return e==null?m8:e},fixed:Ba};function w6(n,e,t){return n?e<=t:e=t.length||m===t[m.depth]){var g=J6e(r,l,m,v,p,i);SZ(m,g,t,i)}})}}}function Y6e(n,e,t){var i=It({},e),r=t.designatedVisualItemStyle;return ne(["color","colorAlpha","colorSaturation"],function(a){r[a]=e[a];var o=n.get(a);r[a]=null,o!=null&&(i[a]=o)}),i}function pB(n){var e=Ex(n,"color");if(e){var t=Ex(n,"colorAlpha"),i=Ex(n,"colorSaturation");return i&&(e=Gg(e,null,null,i)),t&&(e=G5(e,t)),e}}function K6e(n,e){return e!=null?Gg(e,null,null,n):null}function Ex(n,e){var t=n[e];if(t!=null&&t!=="none")return t}function Z6e(n,e,t,i,r,a){if(!(!a||!a.length)){var o=Px(e,"color")||r.color!=null&&r.color!=="none"&&(Px(e,"colorAlpha")||Px(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),d={type:o.name,dataExtent:u,visual:o.range};d.type==="color"&&(c==="index"||c==="id")?(d.mappingMethod="category",d.loop=!0):d.mappingMethod="linear";var h=new Wo(d);return _Z(h).drColorMappingBy=c,h}}}function Px(n,e){var t=n.get(e);return $t(t)&&t.length?{name:e,range:t}:null}function J6e(n,e,t,i,r,a){var o=It({},e);if(r){var s=r.type,l=s==="color"&&_Z(r).drColorMappingBy,u=l==="index"?i:l==="id"?a.mapIdToIndex(t.getId()):t.getValue(n.get("visualDimension"));o[s]=r.mapValueToVisual(u)}return o}var W9=Math.max,g8=Math.min,vB=Ro,pP=ne,bZ=["itemStyle","borderWidth"],Q6e=["itemStyle","gapWidth"],e4e=["upperLabel","show"],t4e=["upperLabel","height"];const n4e={seriesType:"treemap",reset:function(n,e,t,i){var r=t.getWidth(),a=t.getHeight(),o=n.option,s=uo(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=_n(vB(s.width,l[0]),r),c=_n(vB(s.height,l[1]),a),d=i&&i.type,h=["treemapZoomToNode","treemapRootToNode"],f=V9(i,h,n),p=d==="treemapRender"||d==="treemapMove"?i.rootRect:null,m=n.getViewRoot(),v=vZ(m);if(d!=="treemapMove"){var g=d==="treemapZoomToNode"?l4e(n,f,m,u,c):p?[p.width,p.height]:[u,c],_=o.sort;_&&_!=="asc"&&_!=="desc"&&(_="desc");var S={squareRatio:o.squareRatio,sort:_,leafDepth:o.leafDepth};m.hostTree.clearLayouts();var x={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};m.setLayout(x),xZ(m,S,!1,0),x=m.getLayout(),pP(v,function(C,M){var I=(v[M+1]||m).getValue();C.setLayout(It({dataExtent:[I,I],borderWidth:0,upperHeight:0},x))})}var A=n.getData().tree.root;A.setLayout(u4e(s,p,f),!0),n.setLayoutInfo(s),wZ(A,new gi(-s.x,-s.y,r,a),v,m,0)}};function xZ(n,e,t,i){var r,a;if(!n.isRemoved()){var o=n.getLayout();r=o.width,a=o.height;var s=n.getModel(),l=s.get(bZ),u=s.get(Q6e)/2,c=TZ(s),d=Math.max(l,c),h=l-u,f=d-u;n.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0),r=W9(r-2*h,0),a=W9(a-h-f,0);var p=r*a,m=i4e(n,s,p,e,t,i);if(m.length){var v={x:h,y:f,width:r,height:a},g=g8(r,a),_=1/0,S=[];S.area=0;for(var x=0,A=m.length;x=0;l--){var u=r[i==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:i,dataExtent:s}}function s4e(n,e,t){for(var i=0,r=1/0,a=0,o=void 0,s=n.length;ai&&(i=o));var l=n.area*n.area,u=e*e*t;return l?W9(u*i/l,l/(u*r)):1/0}function mB(n,e,t,i,r){var a=e===t.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=t[s[a]],c=e?n.area/e:0;(r||c>t[l[o]])&&(c=t[l[o]]);for(var d=0,h=n.length;dEN&&(u=EN),a=s}ui&&(i=e);var a=i%2?i+2:i+3;r=[];for(var o=0;o0&&(A[0]=-A[0],A[1]=-A[1]);var M=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var I=-Math.atan2(x[1],x[0]);d[0].8?"left":h[0]<-.8?"right":"center",m=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*g+c[0],a.y=-h[1]*_+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",m=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=g*M+c[0],a.y=c[1]+D,p=x[0]<0?"right":"left",a.originX=-g*M,a.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=C[0],a.y=C[1]+D,p="center",a.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-g*M+d[0],a.y=d[1]+D,p=x[0]>=0?"right":"left",a.originX=g*M,a.originY=-D;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||m,align:a.__align||p})}},e}(ei);const yP=E4e;var P4e=function(){function n(e){this.group=new ei,this._LineCtor=e||yP}return n.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var i=this,r=i.group,a=i._lineData;i._lineData=e,a||r.removeAll();var o=xB(e);e.diff(a).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(a,e,l,s,o)}).remove(function(s){r.remove(a.getItemGraphicEl(s))}).execute()},n.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,i){t.updateLayout(e,i)},this)},n.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=xB(e),this._lineData=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function i(s){!s.isGroup&&!R4e(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var r=e.start;r0}function xB(n){var e=n.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:_o(e)}}function wB(n){return isNaN(n[0])||isNaN(n[1])}function Nx(n){return n&&!wB(n[0])&&!wB(n[1])}const _P=P4e;var kx=[],Fx=[],Ox=[],U1=Po,Bx=_p,TB=Math.abs;function AB(n,e,t){for(var i=n[0],r=n[1],a=n[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){kx[0]=U1(i[0],r[0],a[0],c),kx[1]=U1(i[1],r[1],a[1],c);var d=TB(Bx(kx,e)-l);d=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function zx(n,e){var t=[],i=w9,r=[[],[],[]],a=[[],[]],o=[];e/=2,n.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),d=s.getVisual("toSymbol");u.__original||(u.__original=[Oc(u[0]),Oc(u[1])],u[2]&&u.__original.push(Oc(u[2])));var h=u.__original;if(u[2]!=null){if(Ts(r[0],h[0]),Ts(r[1],h[2]),Ts(r[2],h[1]),c&&c!=="none"){var f=Pg(s.node1),p=AB(r,h[0],f*e);i(r[0][0],r[1][0],r[2][0],p,t),r[0][0]=t[3],r[1][0]=t[4],i(r[0][1],r[1][1],r[2][1],p,t),r[0][1]=t[3],r[1][1]=t[4]}if(d&&d!=="none"){var f=Pg(s.node2),p=AB(r,h[1],f*e);i(r[0][0],r[1][0],r[2][0],p,t),r[1][0]=t[1],r[2][0]=t[2],i(r[0][1],r[1][1],r[2][1],p,t),r[1][1]=t[1],r[2][1]=t[2]}Ts(u[0],r[0]),Ts(u[1],r[2]),Ts(u[2],r[1])}else{if(Ts(a[0],h[0]),Ts(a[1],h[1]),ip(o,a[1],a[0]),Ov(o,o),c&&c!=="none"){var f=Pg(s.node1);XT(a[0],a[0],o,f*e)}if(d&&d!=="none"){var f=Pg(s.node2);XT(a[1],a[1],o,-f*e)}Ts(u[0],a[0]),Ts(u[1],a[1])}})}function CB(n){return n.type==="view"}var L4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){var r=new M3,a=new _P,o=this.group;this._controller=new I3(i.getZr()),this._controllerHost={target:o},o.add(r.group),o.add(a.group),this._symbolDraw=r,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(t,i,r){var a=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(CB(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):Qi(u,c,t)}zx(t.getGraph(),Eg(t));var d=t.getData();s.updateData(d);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,i,r),clearTimeout(this._layoutTimeout);var f=t.forceLayout,p=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,p);var m=t.get("layout");d.graph.eachNode(function(S){var x=S.dataIndex,A=S.getGraphicEl(),C=S.getModel();if(A){A.off("drag").off("dragend");var M=C.get("draggable");M&&A.on("drag",function(D){switch(m){case"force":f.warmUp(),!a._layouting&&a._startForceLayoutIteration(f,p),f.setFixed(x),d.setItemLayout(x,[A.x,A.y]);break;case"circular":d.setItemLayout(x,[A.x,A.y]),S.setLayout({fixed:!0},!0),gP(t,"symbolSize",S,[D.offsetX,D.offsetY]),a.updateLayout(t);break;case"none":default:d.setItemLayout(x,[A.x,A.y]),mP(t.getGraph(),t),a.updateLayout(t);break}}).on("dragend",function(){f&&f.setUnfixed(x)}),A.setDraggable(M,!!C.get("cursor"));var I=C.get(["emphasis","focus"]);I==="adjacency"&&(ni(A).focus=S.getAdjacentDataIndices())}}),d.graph.eachEdge(function(S){var x=S.getGraphicEl(),A=S.getModel().get(["emphasis","focus"]);x&&A==="adjacency"&&(ni(x).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var v=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),g=d.getLayout("cx"),_=d.getLayout("cy");d.graph.eachNode(function(S){EZ(S,v,g,_)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,i){var r=this;(function a(){t.step(function(o){r.updateLayout(r._model),(r._layouting=!o)&&(i?r._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(t,i,r){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,d){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,d)&&!Y_(u,r,t)}),!CB(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){oP(s,u.dx,u.dy),r.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){sP(s,u.scale,u.originX,u.originY),r.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),zx(t.getGraph(),Eg(t)),a._lineDraw.updateLayout(),r.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,i=t.getData(),r=Eg(t);i.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(r)})},e.prototype.updateLayout=function(t){zx(t.getGraph(),Eg(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Yr);const I4e=L4e;function V1(n){return"_EC_"+n}var D4e=function(){function n(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return n.prototype.isDirected=function(){return this._directed},n.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var i=this._nodesMap;if(!i[V1(e)]){var r=new jf(e,t);return r.hostGraph=this,this.nodes.push(r),i[V1(e)]=r,r}},n.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},n.prototype.getNodeById=function(e){return this._nodesMap[V1(e)]},n.prototype.addEdge=function(e,t,i){var r=this._nodesMap,a=this._edgesMap;if(Yi(e)&&(e=this.nodes[e]),Yi(t)&&(t=this.nodes[t]),e instanceof jf||(e=r[V1(e)]),t instanceof jf||(t=r[V1(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new RZ(e,t,i);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),a[o]=s,s}},n.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},n.prototype.getEdge=function(e,t){e instanceof jf&&(e=e.id),t instanceof jf&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},n.prototype.eachNode=function(e,t){for(var i=this.nodes,r=i.length,a=0;a=0&&e.call(t,i[a],a)},n.prototype.eachEdge=function(e,t){for(var i=this.edges,r=i.length,a=0;a=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&e.call(t,i[a],a)},n.prototype.breadthFirstTraverse=function(e,t,i,r){if(t instanceof jf||(t=this._nodesMap[V1(t)]),!!t){for(var a=i==="out"?"outEdges":i==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=r.length;a=0&&this[n][e].setItemVisual(this.dataIndex,t,i)},getVisual:function(t){return this[n][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,i){this.dataIndex>=0&&this[n][e].setItemLayout(this.dataIndex,t,i)},getLayout:function(){return this[n][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][e].getRawIndex(this.dataIndex)}}}Za(jf,LZ("hostGraph","data"));Za(RZ,LZ("hostGraph","edgeData"));const N4e=D4e;function IZ(n,e,t,i,r){for(var a=new N4e(i),o=0;o "+h)),u++)}var f=t.get("coordinateSystem"),p;if(f==="cartesian2d"||f==="polar")p=nd(n,t);else{var m=x3.get(f),v=m?m.dimensions||[]:[];xi(v,"value")<0&&v.concat(["value"]);var g=T3(n,{coordDimensions:v,encodeDefine:t.getEncode()}).dimensions;p=new Rs(g,t),p.initData(n)}var _=new Rs(["value"],t);return _.initData(l,s),r&&r(p,_),fZ({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var k4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){n.prototype.init.apply(this,arguments);var i=this;function r(){return i._categoriesData}this.legendVisualProvider=new L3(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){n.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){n.prototype.mergeDefaultAndTheme.apply(this,arguments),Fp(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,i){var r=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;if(a&&r){m4e(this);var s=IZ(a,r,this,!0,l);return ne(s.edges,function(u){g4e(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var m=o._categoriesModels,v=p.getShallow("category"),g=m[v];return g&&(g.parentModel=p.parentModel,p.parentModel=g),p});var d=Xr.prototype.getModel;function h(p,m){var v=d.call(this,p,m);return v.resolveParentPath=f,v}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=f,p.getModel=h,p});function f(p){if(p&&(p[0]==="label"||p[1]==="label")){var m=p.slice();return p[0]==="label"?m[0]="edgeLabel":p[1]==="label"&&(m[1]="edgeLabel"),m}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,i,r){if(r==="edge"){var a=this.getData(),o=this.getDataParams(t,r),s=a.graph.getEdgeByIndex(t),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),So("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var d=KX({series:this,dataIndex:t,multipleSeries:i});return d},e.prototype._updateCategoriesData=function(){var t=Xt(this.option.categories||[],function(r){return r.value!=null?r:It({value:0},r)}),i=new Rs(["value"],this);i.initData(t),this._categoriesData=i,this._categoriesModels=i.mapArray(function(r){return i.getItemModel(r)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return n.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(pa);const F4e=k4e;var O4e={type:"graphRoam",event:"graphRoam",update:"none"};function B4e(n){n.registerChartView(I4e),n.registerSeriesModel(F4e),n.registerProcessor(d4e),n.registerVisual(h4e),n.registerVisual(f4e),n.registerLayout(y4e),n.registerLayout(n.PRIORITY.VISUAL.POST_CHART_LAYOUT,S4e),n.registerLayout(x4e),n.registerCoordinateSystem("graphView",{dimensions:D3.dimensions,create:T4e}),n.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ba),n.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ba),n.registerAction(O4e,function(e,t,i){t.eachComponent({mainType:"series",query:e},function(r){var a=r.coordinateSystem,o=uP(a,e,void 0,i);r.setCenter&&r.setCenter(o.center),r.setZoom&&r.setZoom(o.zoom)})})}var z4e=function(){function n(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return n}(),G4e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="pointer",i}return e.prototype.getDefaultShape=function(){return new z4e},e.prototype.buildPath=function(t,i){var r=Math.cos,a=Math.sin,o=i.r,s=i.width,l=i.angle,u=i.x-r(l)*s*(s>=o/3?1:2),c=i.y-a(l)*s*(s>=o/3?1:2);l=i.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(i.x+r(l)*s,i.y+a(l)*s),t.lineTo(i.x+r(i.angle)*o,i.y+a(i.angle)*o),t.lineTo(i.x-r(l)*s,i.y-a(l)*s),t.lineTo(u,c)},e}(Ei);const U4e=G4e;function V4e(n,e){var t=n.get("center"),i=e.getWidth(),r=e.getHeight(),a=Math.min(i,r),o=_n(t[0],e.getWidth()),s=_n(t[1],e.getHeight()),l=_n(n.get("radius"),a/2);return{cx:o,cy:s,r:l}}function A6(n,e){var t=n==null?"":n+"";return e&&(xn(e)?t=e.replace("{value}",t):$n(e)&&(t=e(n))),t}var H4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),o=V4e(t,r);this._renderMain(t,i,r,a,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,i,r,a,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,d=t.getModel("axisLine"),h=d.get("roundCap"),f=h?h8:ll,p=d.get("show"),m=d.getModel("lineStyle"),v=m.get("width"),g=[u,c];uE(g,!l),u=g[0],c=g[1];for(var _=c-u,S=u,x=[],A=0;p&&A=D&&(E===0?0:a[E-1][0])Math.PI/2&&(xe+=Math.PI)):He==="tangential"?xe=-I-Math.PI/2:Yi(He)&&(xe=He*Math.PI/180),xe===0?d.add(new Xi({style:qr(S,{text:ae,x:he,y:Ee,verticalAlign:W<-.8?"top":W>.8?"bottom":"middle",align:G<-.4?"left":G>.4?"right":"center"},{inheritColor:ie}),silent:!0})):d.add(new Xi({style:qr(S,{text:ae,x:he,y:Ee,verticalAlign:"middle",align:"center"},{inheritColor:ie}),silent:!0,originX:he,originY:Ee,rotation:xe}))}if(_.get("show")&&Y!==x){var Q=_.get("distance");Q=Q?Q+c:c;for(var Fe=0;Fe<=A;Fe++){G=Math.cos(I),W=Math.sin(I);var pt=new Lo({shape:{x1:G*(p-Q)+h,y1:W*(p-Q)+f,x2:G*(p-M-Q)+h,y2:W*(p-M-Q)+f},silent:!0,style:F});F.stroke==="auto"&&pt.setStyle({stroke:a((Y+Fe/A)/x)}),d.add(pt),I+=E}I-=E}else I+=D}},e.prototype._renderPointer=function(t,i,r,a,o,s,l,u,c){var d=this.group,h=this._data,f=this._progressEls,p=[],m=t.get(["pointer","show"]),v=t.getModel("progress"),g=v.get("show"),_=t.getData(),S=_.mapDimension("value"),x=+t.get("min"),A=+t.get("max"),C=[x,A],M=[s,l];function I(E,P){var F=_.getItemModel(E),V=F.getModel("pointer"),G=_n(V.get("width"),o.r),W=_n(V.get("length"),o.r),Y=t.get(["pointer","icon"]),Q=V.get("offsetCenter"),K=_n(Q[0],o.r),ae=_n(Q[1],o.r),ie=V.get("keepAspect"),he;return Y?he=Ya(Y,K-G/2,ae-W,G,W,null,ie):he=new U4e({shape:{angle:-Math.PI/2,width:G,r:W,x:K,y:ae}}),he.rotation=-(P+Math.PI/2),he.x=o.cx,he.y=o.cy,he}function D(E,P){var F=v.get("roundCap"),V=F?h8:ll,G=v.get("overlap"),W=G?v.get("width"):c/_.count(),Y=G?o.r-W:o.r-(E+1)*W,Q=G?o.r:o.r-E*W,K=new V({shape:{startAngle:s,endAngle:P,cx:o.cx,cy:o.cy,clockwise:u,r0:Y,r:Q}});return G&&(K.z2=pr(_.get(S,E),[x,A],[100,0],!0)),K}(g||m)&&(_.diff(h).add(function(E){var P=_.get(S,E);if(m){var F=I(E,s);sa(F,{rotation:-((isNaN(+P)?M[0]:pr(P,C,M,!0))+Math.PI/2)},t),d.add(F),_.setItemGraphicEl(E,F)}if(g){var V=D(E,s),G=v.get("clip");sa(V,{shape:{endAngle:pr(P,C,M,G)}},t),d.add(V),bA(t.seriesIndex,_.dataType,E,V),p[E]=V}}).update(function(E,P){var F=_.get(S,E);if(m){var V=h.getItemGraphicEl(P),G=V?V.rotation:s,W=I(E,G);W.rotation=G,Qi(W,{rotation:-((isNaN(+F)?M[0]:pr(F,C,M,!0))+Math.PI/2)},t),d.add(W),_.setItemGraphicEl(E,W)}if(g){var Y=f[P],Q=Y?Y.shape.endAngle:s,K=D(E,Q),ae=v.get("clip");Qi(K,{shape:{endAngle:pr(F,C,M,ae)}},t),d.add(K),bA(t.seriesIndex,_.dataType,E,K),p[E]=K}}).execute(),_.each(function(E){var P=_.getItemModel(E),F=P.getModel("emphasis"),V=F.get("focus"),G=F.get("blurScope"),W=F.get("disabled");if(m){var Y=_.getItemGraphicEl(E),Q=_.getItemVisual(E,"style"),K=Q.fill;if(Y instanceof qo){var ae=Y.style;Y.useStyle(It({image:ae.image,x:ae.x,y:ae.y,width:ae.width,height:ae.height},Q))}else Y.useStyle(Q),Y.type!=="pointer"&&Y.setColor(K);Y.setStyle(P.getModel(["pointer","itemStyle"]).getItemStyle()),Y.style.fill==="auto"&&Y.setStyle("fill",a(pr(_.get(S,E),C,[0,1],!0))),Y.z2EmphasisLift=0,jo(Y,P),ya(Y,V,G,W)}if(g){var ie=p[E];ie.useStyle(_.getItemVisual(E,"style")),ie.setStyle(P.getModel(["progress","itemStyle"]).getItemStyle()),ie.z2EmphasisLift=0,jo(ie,P),ya(ie,V,G,W)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,i){var r=t.getModel("anchor"),a=r.get("show");if(a){var o=r.get("size"),s=r.get("icon"),l=r.get("offsetCenter"),u=r.get("keepAspect"),c=Ya(s,i.cx-o/2+_n(l[0],i.r),i.cy-o/2+_n(l[1],i.r),o,o,null,u);c.z2=r.get("showAbove")?1:0,c.setStyle(r.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,i,r,a,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),d=+t.get("max"),h=new ei,f=[],p=[],m=t.isAnimationEnabled(),v=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(g){f[g]=new Xi({silent:!0}),p[g]=new Xi({silent:!0})}).update(function(g,_){f[g]=s._titleEls[_],p[g]=s._detailEls[_]}).execute(),l.each(function(g){var _=l.getItemModel(g),S=l.get(u,g),x=new ei,A=a(pr(S,[c,d],[0,1],!0)),C=_.getModel("title");if(C.get("show")){var M=C.get("offsetCenter"),I=o.cx+_n(M[0],o.r),D=o.cy+_n(M[1],o.r),E=f[g];E.attr({z2:v?0:2,style:qr(C,{x:I,y:D,text:l.getName(g),align:"center",verticalAlign:"middle"},{inheritColor:A})}),x.add(E)}var P=_.getModel("detail");if(P.get("show")){var F=P.get("offsetCenter"),V=o.cx+_n(F[0],o.r),G=o.cy+_n(F[1],o.r),W=_n(P.get("width"),o.r),Y=_n(P.get("height"),o.r),Q=t.get(["progress","show"])?l.getItemVisual(g,"style").fill:A,E=p[g],K=P.get("formatter");E.attr({z2:v?0:2,style:qr(P,{x:V,y:G,text:A6(S,K),width:isNaN(W)?null:W,height:isNaN(Y)?null:Y,align:"center",verticalAlign:"middle"},{inheritColor:Q})}),Jq(E,{normal:P},S,function(ie){return A6(ie,K)}),m&&Qq(E,g,l,t,{getFormattedLabel:function(ie,he,Ee,He,xe,Fe){return A6(Fe?Fe.interpolatedValue:S,K)}}),x.add(E)}h.add(x)}),this.group.add(h),this._titleEls=f,this._detailEls=p},e.type="gauge",e}(Yr);const W4e=H4e;var j4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,i){return Jv(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(pa);const $4e=j4e;function q4e(n){n.registerChartView(W4e),n.registerSeriesModel($4e)}var X4e=["itemStyle","opacity"],Y4e=function(n){ot(e,n);function e(t,i){var r=n.call(this)||this,a=r,o=new hl,s=new Xi;return a.setTextContent(s),r.setTextGuideLine(o),r.updateData(t,i,!0),r}return e.prototype.updateData=function(t,i,r){var a=this,o=t.hostModel,s=t.getItemModel(i),l=t.getItemLayout(i),u=s.getModel("emphasis"),c=s.get(X4e);c=c==null?1:c,r||iu(a),a.useStyle(t.getItemVisual(i,"style")),a.style.lineJoin="round",r?(a.setShape({points:l.points}),a.style.opacity=0,sa(a,{style:{opacity:c}},o,i)):Qi(a,{style:{opacity:c},shape:{points:l.points}},o,i),jo(a,s),this._updateLabel(t,i),ya(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,i){var r=this,a=this.getTextGuideLine(),o=r.getTextContent(),s=t.hostModel,l=t.getItemModel(i),u=t.getItemLayout(i),c=u.label,d=t.getItemVisual(i,"style"),h=d.fill;$o(o,_o(l),{labelFetcher:t.hostModel,labelDataIndex:i,defaultOpacity:d.opacity,defaultText:t.getName(i)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),r.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var f=c.linePoints;a.setShape({points:f}),r.textGuideLineConfig={anchor:f?new fi(f[0][0],f[0][1]):null},Qi(o,{style:{x:c.x,y:c.y}},s,i),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),KE(r,ZE(l),{stroke:h})},e}(ul),K4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,i,r){var a=t.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new Y4e(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);L9(u,t,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Yr);const Z4e=K4e;var J4e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new L3(An(this.getData,this),An(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,i){return Jv(this,{coordDimensions:["value"],encodeDefaulter:si(EE,this)})},e.prototype._defaultLabelLine=function(t){Fp(t,"labelLine",["show"]);var i=t.labelLine,r=t.emphasis.labelLine;i.show=i.show&&t.label.show,r.show=r.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var i=this.getData(),r=n.prototype.getDataParams.call(this,t),a=i.mapDimension("value"),o=i.getSum(a);return r.percent=o?+(i.get(a,t)/o*100).toFixed(2):0,r.$vars.push("percent"),r},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(pa);const Q4e=J4e;function e5e(n,e){return uo(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function t5e(n,e){for(var t=n.mapDimension("value"),i=n.mapArray(t,function(l){return l}),r=[],a=e==="ascending",o=0,s=n.count();oS5e)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]);r.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(n){if(!(this._mouseDownPoint||!Ux(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]),i=t.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function Ux(n,e){var t=n._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const w5e=b5e;var T5e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){n.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var i=this.option;t&&ui(i,t,!0),this._initDimensions()},e.prototype.contains=function(t,i){var r=t.get("parallelIndex");return r!=null&&i.getComponent("parallel",r)===this},e.prototype.setAxisExpand=function(t){ne(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){t.hasOwnProperty(i)&&(this.option[i]=t[i])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],i=this.parallelAxisIndex=[],r=dr(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);ne(r,function(a){t.push("dim"+a.get("dim")),i.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}($i);const A5e=T5e;var C5e=function(n){ot(e,n);function e(t,i,r,a,o){var s=n.call(this,t,i,r)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(ou);const M5e=C5e;function o1(n,e,t,i,r,a){n=n||0;var o=t[1]-t[0];if(r!=null&&(r=H1(r,[0,o])),a!=null&&(a=Math.max(a,r!=null?r:0)),i==="all"){var s=Math.abs(e[1]-e[0]);s=H1(s,[0,o]),r=a=H1(s,[r,a]),i=0}e[0]=H1(e[0],t),e[1]=H1(e[1],t);var l=Vx(e,i);e[i]+=n;var u=r||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[i]=H1(e[i],c);var d;return d=Vx(e,i),r!=null&&(d.sign!==l.sign||d.spana&&(e[1-i]=e[i]+d.sign*a),e}function Vx(n,e){var t=n[e]-n[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function H1(n,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,n))}var Hx=ne,NZ=Math.min,kZ=Math.max,PB=Math.floor,E5e=Math.ceil,RB=Ra,P5e=Math.PI,R5e=function(){function n(e,t,i){this.type="parallel",this._axesMap=In(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,i)}return n.prototype._init=function(e,t,i){var r=e.dimensions,a=e.parallelAxisIndex;Hx(r,function(o,s){var l=a[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new M5e(o,q_(u),[0,0],u.get("type"),l)),d=c.type==="category";c.onBand=d&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},n.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},n.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),i=t.axisBase,r=t.layoutBase,a=t.pixelDimIndex,o=e[1-a],s=e[a];return o>=i&&o<=i+t.axisLength&&s>=r&&s<=r+t.layoutLength},n.prototype.getModel=function(){return this._model},n.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(i){if(e.contains(i,t)){var r=i.getData();Hx(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(r,r.mapDimension(a)),mv(o.scale,o.model)},this)}},this)},n.prototype.resize=function(e,t){this._rect=uo(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},n.prototype.getRect=function(){return this._rect},n.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,i=["x","y"],r=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=t[r[o]],l=[0,s],u=this.dimensions.length,c=C6(e.get("axisExpandWidth"),l),d=C6(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,f=e.get("axisExpandWindow"),p;if(f)p=C6(f[1]-f[0],l),f[1]=f[0]+p;else{p=C6(c*(d-1),l);var m=e.get("axisExpandCenter")||PB(u/2);f=[c*m-p/2],f[1]=f[0]+p}var v=(s-p)/(u-d);v<3&&(v=0);var g=[PB(RB(f[0]/c,1))+1,E5e(RB(f[1]/c,1))-1],_=v/c*f[0];return{layout:a,pixelDimIndex:o,layoutBase:t[i[o]],layoutLength:s,axisBase:t[i[1-o]],axisLength:t[r[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:v,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:_}},n.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,i=this.dimensions,r=this._makeLayoutInfo(),a=r.layout;t.each(function(o){var s=[0,r.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Hx(i,function(o,s){var l=(r.axisExpandable?I5e:L5e)(s,r),u={horizontal:{x:l.position,y:r.axisLength},vertical:{x:0,y:l.position}},c={horizontal:P5e/2,vertical:0},d=[u[a].x+e.x,u[a].y+e.y],h=c[a],f=Dl();Jp(f,f,h),Ku(f,f,d),this._axesLayout[o]={position:d,rotation:h,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},n.prototype.getAxis=function(e){return this._axesMap.get(e)},n.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},n.prototype.eachActiveState=function(e,t,i,r){i==null&&(i=0),r==null&&(r=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];ne(o,function(v){s.push(e.mapDimension(v)),l.push(a.get(v).model)});for(var u=this.hasAxisBrushed(),c=i;ca*(1-d[0])?(u="jump",l=s-a*(1-d[2])):(l=s-a*d[1])>=0&&(l=s-a*(1-d[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?o1(l,r,o,"all"):u="none";else{var f=r[1]-r[0],p=o[1]*s/f;r=[kZ(0,p-f/2)],r[1]=NZ(o[1],r[0]+f),r[0]=r[1]-f}return{axisExpandWindow:r,behavior:u}},n}();function C6(n,e){return NZ(kZ(n,e[0]),e[1])}function L5e(n,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*n,axisNameAvailableWidth:t,axisLabelShow:!0}}function I5e(n,e){var t=e.layoutLength,i=e.axisExpandWidth,r=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return n=0;r--)x0(i[r])},e.prototype.getActiveState=function(t){var i=this.activeIntervals;if(!i.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(i.length===1){var r=i[0];if(r[0]<=t&&t<=r[1])return"active"}else for(var a=0,o=i.length;az5e}function VZ(n){var e=n.length-1;return e<0&&(e=0),[n[0],n[e]]}function HZ(n,e,t,i){var r=new ei;return r.add(new Hi({name:"main",style:wP(t),silent:!0,draggable:!0,cursor:"move",drift:si(NB,n,e,r,["n","s","w","e"]),ondragend:si(Vp,e,{isEnd:!0})})),ne(i,function(a){r.add(new Hi({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:si(NB,n,e,r,a),ondragend:si(Vp,e,{isEnd:!0})}))}),r}function WZ(n,e,t,i){var r=i.brushStyle.lineWidth||0,a=_v(r,G5e),o=t[0][0],s=t[1][0],l=o-r/2,u=s-r/2,c=t[0][1],d=t[1][1],h=c-a+r/2,f=d-a+r/2,p=c-o,m=d-s,v=p+r,g=m+r;_c(n,e,"main",o,s,p,m),i.transformable&&(_c(n,e,"w",l,u,a,g),_c(n,e,"e",h,u,a,g),_c(n,e,"n",l,u,v,a),_c(n,e,"s",l,f,v,a),_c(n,e,"nw",l,u,a,a),_c(n,e,"ne",h,u,a,a),_c(n,e,"sw",l,f,a,a),_c(n,e,"se",h,f,a,a))}function dC(n,e){var t=e.__brushOption,i=t.transformable,r=e.childAt(0);r.useStyle(wP(t)),r.attr({silent:!i,cursor:i?"move":"default"}),ne([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?hC(n,a[0]):q5e(n,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?V5e[s]+"-resize":null})})}function _c(n,e,t,i,r,a,o){var s=e.childOfName(t);s&&s.setShape(Y5e(TP(n,e,[[i,r],[i+a,r+o]])))}function wP(n){return qn({strokeNoScale:!0},n.brushStyle)}function jZ(n,e,t,i){var r=[$9(n,t),$9(e,i)],a=[_v(n,t),_v(e,i)];return[[r[0],a[0]],[r[1],a[1]]]}function $5e(n){return Tp(n.group)}function hC(n,e){var t={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},r=R_(t[e],$5e(n));return i[r]}function q5e(n,e){var t=[hC(n,e[0]),hC(n,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function NB(n,e,t,i,r,a){var o=t.__brushOption,s=n.toRectRange(o.range),l=$Z(e,r,a);ne(i,function(u){var c=U5e[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=n.fromRectRange(jZ(s[0][0],s[1][0],s[0][1],s[1][1])),SP(e,t),Vp(e,{isEnd:!1})}function X5e(n,e,t,i){var r=e.__brushOption.range,a=$Z(n,t,i);ne(r,function(o){o[0]+=a[0],o[1]+=a[1]}),SP(n,e),Vp(n,{isEnd:!1})}function $Z(n,e,t){var i=n.group,r=i.transformCoordToLocal(e,t),a=i.transformCoordToLocal(0,0);return[r[0]-a[0],r[1]-a[1]]}function TP(n,e,t){var i=UZ(n,e);return i&&i!==Up?i.clipPath(t,n._transform):Zn(t)}function Y5e(n){var e=$9(n[0][0],n[1][0]),t=$9(n[0][1],n[1][1]),i=_v(n[0][0],n[1][0]),r=_v(n[0][1],n[1][1]);return{x:e,y:t,width:i-e,height:r-t}}function K5e(n,e,t){if(!(!n._brushType||J5e(n,e.offsetX,e.offsetY))){var i=n._zr,r=n._covers,a=xP(n,e,t);if(!n._dragging)for(var o=0;oi.getWidth()||t<0||t>i.getHeight()}var Q_={lineX:OB(0),lineY:OB(1),rect:{createCover:function(n,e){function t(i){return i}return HZ({toRectRange:t,fromRectRange:t},n,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(n){var e=VZ(n);return jZ(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(n,e,t,i){WZ(n,e,t,i)},updateCommon:dC,contain:pC},polygon:{createCover:function(n,e){var t=new ei;return t.add(new hl({name:"main",style:wP(e),silent:!0})),t},getCreatingRange:function(n){return n},endCreating:function(n,e){e.remove(e.childAt(0)),e.add(new ul({name:"main",draggable:!0,drift:si(X5e,n,e),ondragend:si(Vp,n,{isEnd:!0})}))},updateCoverShape:function(n,e,t,i){e.childAt(0).setShape({points:TP(n,e,t)})},updateCommon:dC,contain:pC}};function OB(n){return{createCover:function(e,t){return HZ({toRectRange:function(i){var r=[i,[0,100]];return n&&r.reverse(),r},fromRectRange:function(i){return i[n]}},e,t,[[["w"],["e"]],[["n"],["s"]]][n])},getCreatingRange:function(e){var t=VZ(e),i=$9(t[0][n],t[1][n]),r=_v(t[0][n],t[1][n]);return[i,r]},updateCoverShape:function(e,t,i,r){var a,o=UZ(e,t);if(o!==Up&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(n);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-n]]}var l=[i,a];n&&l.reverse(),WZ(e,t,l,r)},updateCommon:dC,contain:pC}}const AP=W5e;function XZ(n){return n=CP(n),function(e){return Yq(e,n)}}function YZ(n,e){return n=CP(n),function(t){var i=e!=null?e:t,r=i?n.width:n.height,a=i?n.x:n.y;return[a,a+(r||0)]}}function KZ(n,e,t){var i=CP(n);return function(r,a){return i.contain(a[0],a[1])&&!Y_(r,e,t)}}function CP(n){return gi.create(n)}var Q5e=["axisLine","axisTickLabel","axisName"],e8e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){n.prototype.init.apply(this,arguments),(this._brushController=new AP(i.getZr())).on("brush",An(this._onBrush,this))},e.prototype.render=function(t,i,r,a){if(!t8e(t,i,a)){this.axisModel=t,this.api=r,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ei,this.group.add(this._axisGroup),!!t.get("show")){var s=i8e(t,i),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,d=t.axis.dim,h=l.getAxisLayout(d),f=It({strokeContainThreshold:c},h),p=new Yc(t,f);ne(Q5e,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(f,u,t,s,c,r),S3(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,i,r,a,o,s){var l=r.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),d=gi.create({x:l[0],y:-o/2,width:u,height:o});d.x-=c,d.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:XZ(d),isTargetByCursor:KZ(d,s,a),getLinearBrushOtherExtent:YZ(d,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(n8e(r))},e.prototype._onBrush=function(t){var i=t.areas,r=this.axisModel,a=r.axis,o=Xt(i,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!r.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:r.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(xa);function t8e(n,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===n}function n8e(n){var e=n.axis;return Xt(n.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function i8e(n,e){return e.getComponent("parallel",n.get("parallelIndex"))}const r8e=e8e;var a8e={type:"axisAreaSelect",event:"axisAreaSelected"};function o8e(n){n.registerAction(a8e,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(i){i.axis.model.setActiveIntervals(e.intervals)})}),n.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(i){i.setAxisExpand(e)})})}var s8e={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function ZZ(n){n.registerComponentView(w5e),n.registerComponentModel(A5e),n.registerCoordinateSystem("parallel",F5e),n.registerPreprocessor(g5e),n.registerComponentModel(LB),n.registerComponentView(r8e),yv(n,"parallel",LB,s8e),o8e(n)}function l8e(n){Ci(ZZ),n.registerChartView(u5e),n.registerSeriesModel(f5e),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,m5e)}var u8e=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return n}(),c8e=function(n){ot(e,n);function e(t){return n.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new u8e},e.prototype.buildPath=function(t,i){var r=i.extent;t.moveTo(i.x1,i.y1),t.bezierCurveTo(i.cpx1,i.cpy1,i.cpx2,i.cpy2,i.x2,i.y2),i.orient==="vertical"?(t.lineTo(i.x2+r,i.y2),t.bezierCurveTo(i.cpx2+r,i.cpy2,i.cpx1+r,i.cpy1,i.x1+r,i.y1)):(t.lineTo(i.x2,i.y2+r),t.bezierCurveTo(i.cpx2,i.cpy2+r,i.cpx1,i.cpy1+r,i.x1,i.y1+r)),t.closePath()},e.prototype.highlight=function(){$c(this)},e.prototype.downplay=function(){qc(this)},e}(Ei),d8e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,i,r){var a=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,d=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var m=new c8e,v=ni(m);v.dataIndex=p.dataIndex,v.seriesIndex=t.seriesIndex,v.dataType="edge";var g=p.getModel(),_=g.getModel("lineStyle"),S=_.get("curveness"),x=p.node1.getLayout(),A=p.node1.getModel(),C=A.get("localX"),M=A.get("localY"),I=p.node2.getLayout(),D=p.node2.getModel(),E=D.get("localX"),P=D.get("localY"),F=p.getLayout(),V,G,W,Y,Q,K,ae,ie;m.shape.extent=Math.max(1,F.dy),m.shape.orient=f,f==="vertical"?(V=(C!=null?C*u:x.x)+F.sy,G=(M!=null?M*c:x.y)+x.dy,W=(E!=null?E*u:I.x)+F.ty,Y=P!=null?P*c:I.y,Q=V,K=G*(1-S)+Y*S,ae=W,ie=G*S+Y*(1-S)):(V=(C!=null?C*u:x.x)+x.dx,G=(M!=null?M*c:x.y)+F.sy,W=E!=null?E*u:I.x,Y=(P!=null?P*c:I.y)+F.ty,Q=V*(1-S)+W*S,K=G,ae=V*S+W*(1-S),ie=Y),m.setShape({x1:V,y1:G,x2:W,y2:Y,cpx1:Q,cpy1:K,cpx2:ae,cpy2:ie}),m.useStyle(_.getItemStyle()),BB(m.style,f,p);var he=""+g.get("value"),Ee=_o(g,"edgeLabel");$o(m,Ee,{labelFetcher:{getFormattedLabel:function(Fe,pt,Ot,bt,ht,Kt){return t.getFormattedLabel(Fe,pt,"edge",bt,Hu(ht,Ee.normal&&Ee.normal.get("formatter"),he),Kt)}},labelDataIndex:p.dataIndex,defaultText:he}),m.setTextConfig({position:"inside"});var He=g.getModel("emphasis");jo(m,g,"lineStyle",function(Fe){var pt=Fe.getItemStyle();return BB(pt,f,p),pt}),s.add(m),h.setItemGraphicEl(p.dataIndex,m);var xe=He.get("focus");ya(m,xe==="adjacency"?p.getAdjacentDataIndices():xe==="trajectory"?p.getTrajectoryDataIndices():xe,He.get("blurScope"),He.get("disabled"))}),o.eachNode(function(p){var m=p.getLayout(),v=p.getModel(),g=v.get("localX"),_=v.get("localY"),S=v.getModel("emphasis"),x=v.get(["itemStyle","borderRadius"])||0,A=new Hi({shape:{x:g!=null?g*u:m.x,y:_!=null?_*c:m.y,width:m.dx,height:m.dy,r:x},style:v.getModel("itemStyle").getItemStyle(),z2:10});$o(A,_o(v),{labelFetcher:{getFormattedLabel:function(M,I){return t.getFormattedLabel(M,I,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),A.disableLabelAnimation=!0,A.setStyle("fill",p.getVisual("color")),A.setStyle("decal",p.getVisual("style").decal),jo(A,v),s.add(A),d.setItemGraphicEl(p.dataIndex,A),ni(A).dataType="node";var C=S.get("focus");ya(A,C==="adjacency"?p.getAdjacentDataIndices():C==="trajectory"?p.getTrajectoryDataIndices():C,S.get("blurScope"),S.get("disabled"))}),d.eachItemGraphicEl(function(p,m){var v=d.getItemModel(m);v.get("draggable")&&(p.drift=function(g,_){a._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=_,this.dirty(),r.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:d.getRawIndex(m),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(h8e(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Yr);function BB(n,e,t){switch(n.fill){case"source":n.fill=t.node1.getVisual("color"),n.decal=t.node1.getVisual("style").decal;break;case"target":n.fill=t.node2.getVisual("color"),n.decal=t.node2.getVisual("style").decal;break;case"gradient":var i=t.node1.getVisual("color"),r=t.node2.getVisual("color");xn(i)&&xn(r)&&(n.fill=new po(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:i,offset:0},{color:r,offset:1}]))}}function h8e(n,e,t){var i=new Hi({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}});return sa(i,{shape:{width:n.width+20}},e,t),i}const f8e=d8e;var p8e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){var r=t.edges||t.links||[],a=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Xr(o[l],this,i));var u=IZ(a,r,this,!0,c);return u.data;function c(d,h){d.wrapMethod("getItemModel",function(f,p){var m=f.parentModel,v=m.getData().getItemLayout(p);if(v){var g=v.depth,_=m.levelModels[g];_&&(f.parentModel=_)}return f}),h.wrapMethod("getItemModel",function(f,p){var m=f.parentModel,v=m.getGraph().getEdgeByIndex(p),g=v.node1.getLayout();if(g){var _=g.depth,S=m.levelModels[_];S&&(f.parentModel=S)}return f})}},e.prototype.setNodePosition=function(t,i){var r=this.option.data||this.option.nodes,a=r[t];a.localX=i[0],a.localY=i[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,i,r){function a(f){return isNaN(f)||f==null}if(r==="edge"){var o=this.getDataParams(t,r),s=o.data,l=o.value,u=s.source+" -- "+s.target;return So("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(t),d=c.getLayout().value,h=this.getDataParams(t,r).data.name;return So("nameValue",{name:h!=null?h+"":null,value:d,noValue:a(d)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,i){var r=n.prototype.getDataParams.call(this,t,i);if(r.value==null&&i==="node"){var a=this.getGraph().getNodeByIndex(t),o=a.getLayout().value;r.value=o}return r},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(pa);const v8e=p8e;function m8e(n,e){n.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),r=t.get("nodeGap"),a=g8e(t,e);t.layoutInfo=a;var o=a.width,s=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;_8e(u);var d=dr(u,function(m){return m.getLayout().value===0}),h=d.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),p=t.get("nodeAlign");y8e(u,c,i,r,o,s,h,f,p)})}function g8e(n,e){return uo(n.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function y8e(n,e,t,i,r,a,o,s,l){S8e(n,e,t,r,a,s,l),T8e(n,e,a,r,i,o,s),D8e(n,s)}function _8e(n){ne(n,function(e){var t=yh(e.outEdges,y8),i=yh(e.inEdges,y8),r=e.getValue()||0,a=Math.max(t,i,r);e.setLayout({value:a},!0)})}function S8e(n,e,t,i,r,a,o){for(var s=[],l=[],u=[],c=[],d=0,h=0;h=0;g&&v.depth>f&&(f=v.depth),m.setLayout({depth:g?v.depth:d},!0),a==="vertical"?m.setLayout({dy:t},!0):m.setLayout({dx:t},!0);for(var _=0;_d-1?f:d-1;o&&o!=="left"&&b8e(n,o,a,M);var I=a==="vertical"?(r-t)/M:(i-t)/M;w8e(n,I,a)}function JZ(n){var e=n.hostGraph.data.getRawDataItem(n.dataIndex);return e.depth!=null&&e.depth>=0}function b8e(n,e,t,i){if(e==="right"){for(var r=[],a=n,o=0;a.length;){for(var s=0;s0;a--)l*=.99,M8e(s,l,o),Wx(s,r,t,i,o),I8e(s,l,o),Wx(s,r,t,i,o)}function A8e(n,e){var t=[],i=e==="vertical"?"y":"x",r=gA(n,function(a){return a.getLayout()[i]});return r.keys.sort(function(a,o){return a-o}),ne(r.keys,function(a){t.push(r.buckets.get(a))}),t}function C8e(n,e,t,i,r,a){var o=1/0;ne(n,function(s){var l=s.length,u=0;ne(s,function(d){u+=d.getLayout().value});var c=a==="vertical"?(i-(l-1)*r)/u:(t-(l-1)*r)/u;c0&&(s=l.getLayout()[a]+u,r==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var p=r==="vertical"?i:t;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,r==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var f=d-2;f>=0;--f)l=o[f],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,r==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function M8e(n,e,t){ne(n.slice().reverse(),function(i){ne(i,function(r){if(r.outEdges.length){var a=yh(r.outEdges,E8e,t)/yh(r.outEdges,y8);if(isNaN(a)){var o=r.outEdges.length;a=o?yh(r.outEdges,P8e,t)/o:0}if(t==="vertical"){var s=r.getLayout().x+(a-Dh(r,t))*e;r.setLayout({x:s},!0)}else{var l=r.getLayout().y+(a-Dh(r,t))*e;r.setLayout({y:l},!0)}}})})}function E8e(n,e){return Dh(n.node2,e)*n.getValue()}function P8e(n,e){return Dh(n.node2,e)}function R8e(n,e){return Dh(n.node1,e)*n.getValue()}function L8e(n,e){return Dh(n.node1,e)}function Dh(n,e){return e==="vertical"?n.getLayout().x+n.getLayout().dx/2:n.getLayout().y+n.getLayout().dy/2}function y8(n){return n.getValue()}function yh(n,e,t){for(var i=0,r=n.length,a=-1;++ao&&(o=l)}),ne(i,function(s){var l=new Wo({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}r.length&&ne(r,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function k8e(n){n.registerChartView(f8e),n.registerSeriesModel(v8e),n.registerLayout(m8e),n.registerVisual(N8e),n.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){i.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var QZ=function(){function n(){}return n.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},n.prototype.getInitialData=function(e,t){var i,r=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),o=r.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",i=r.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",i=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,d=this._baseAxisDim=u[c],h=u[1-c],f=[r,a],p=f[c].get("type"),m=f[1-c].get("type"),v=e.data;if(v&&l){var g=[];ne(v,function(x,A){var C;$t(x)?(C=x.slice(),x.unshift(A)):$t(x.value)?(C=It({},x),C.value=C.value.slice(),x.value.unshift(A)):C=x,g.push(C)}),e.data=g}var _=this.defaultValueDimensions,S=[{name:d,type:o8(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:o8(m),dimsDef:_.slice()}];return Jv(this,{coordDimensions:S,dimensionsCount:_.length+1,encodeDefaulter:si(bX,S,this)})},n.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},n}(),eJ=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(pa);Za(eJ,QZ,!0);const F8e=eJ;var O8e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),d=zB(c,a,u,l,!0);a.setItemGraphicEl(u,d),o.add(d)}}).update(function(u,c){var d=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(d);return}var h=a.getItemLayout(u);d?(iu(d),tJ(h,d,a,u)):d=zB(h,a,u,l),o.add(d),a.setItemGraphicEl(u,d)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(t){var i=this.group,r=this._data;this._data=null,r&&r.eachItemGraphicEl(function(a){a&&i.remove(a)})},e.type="boxplot",e}(Yr),B8e=function(){function n(){}return n}(),z8e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="boxplotBoxPath",i}return e.prototype.getDefaultShape=function(){return new B8e},e.prototype.buildPath=function(t,i){var r=i.points,a=0;for(t.moveTo(r[a][0],r[a][1]),a++;a<4;a++)t.lineTo(r[a][0],r[a][1]);for(t.closePath();am){var x=[g,S];i.push(x)}}}return{boxData:t,outliers:i}}var q8e={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==hs){var i="";ur(i)}var r=$8e(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:r.boxData},{data:r.outliers}]}};function X8e(n){n.registerSeriesModel(F8e),n.registerChartView(U8e),n.registerLayout(V8e),n.registerTransform(q8e)}var Y8e=["itemStyle","borderColor"],K8e=["itemStyle","borderColor0"],Z8e=["itemStyle","borderColorDoji"],J8e=["itemStyle","color"],Q8e=["itemStyle","color0"];function MP(n,e){return e.get(n>0?J8e:Q8e)}function EP(n,e){return e.get(n===0?Z8e:n>0?Y8e:K8e)}var e_e={seriesType:"candlestick",plan:Xv(),performRawSeries:!0,reset:function(n,e){if(!e.isSeriesFiltered(n)){var t=n.pipelineContext.large;return!t&&{progress:function(i,r){for(var a;(a=i.next())!=null;){var o=r.getItemModel(a),s=r.getItemLayout(a).sign,l=o.getItemStyle();l.fill=MP(s,o),l.stroke=EP(s,o)||l.fill;var u=r.ensureUniqueItemVisual(a,"style");It(u,l)}}}}}};const t_e=e_e;var n_e=["color","borderColor"],i_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,i,r){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,i,r,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,i):this._incrementalRenderNormal(t,i)},e.prototype.eachRendered=function(t){Gh(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var i=t.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(t){var i=t.getData(),r=this._data,a=this.group,o=i.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),i.diff(r).add(function(c){if(i.hasValue(c)){var d=i.getItemLayout(c);if(s&&GB(u,d))return;var h=jx(d,c,!0);sa(h,{shape:{points:d.ends}},t,c),$x(h,i,c,o),a.add(h),i.setItemGraphicEl(c,h)}}).update(function(c,d){var h=r.getItemGraphicEl(d);if(!i.hasValue(c)){a.remove(h);return}var f=i.getItemLayout(c);if(s&&GB(u,f)){a.remove(h);return}h?(Qi(h,{shape:{points:f.ends}},t,c),iu(h)):h=jx(f),$x(h,i,c,o),a.add(h),i.setItemGraphicEl(c,h)}).remove(function(c){var d=r.getItemGraphicEl(c);d&&a.remove(d)}).execute(),this._data=i},e.prototype._renderLarge=function(t){this._clear(),UB(t,this.group);var i=t.get("clip",!0)?E3(t.coordinateSystem,!1,t):null;i?this.group.setClipPath(i):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,i){for(var r=i.getData(),a=r.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=r.getItemLayout(o),l=jx(s);$x(l,r,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,i){UB(i,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Yr),r_e=function(){function n(){}return n}(),a_e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i.type="normalCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new r_e},e.prototype.buildPath=function(t,i){var r=i.points;this.__simpleBox?(t.moveTo(r[4][0],r[4][1]),t.lineTo(r[6][0],r[6][1])):(t.moveTo(r[0][0],r[0][1]),t.lineTo(r[1][0],r[1][1]),t.lineTo(r[2][0],r[2][1]),t.lineTo(r[3][0],r[3][1]),t.closePath(),t.moveTo(r[4][0],r[4][1]),t.lineTo(r[5][0],r[5][1]),t.moveTo(r[6][0],r[6][1]),t.lineTo(r[7][0],r[7][1]))},e}(Ei);function jx(n,e,t){var i=n.ends;return new a_e({shape:{points:t?o_e(i,n):i},z2:100})}function GB(n,e){for(var t=!0,i=0;iA?P[a]:E[a],ends:G,brushRect:ae(C,M,S)})}function Q(he,Ee){var He=[];return He[r]=Ee,He[a]=he,isNaN(Ee)||isNaN(he)?[NaN,NaN]:e.dataToPoint(He)}function K(he,Ee,He){var xe=Ee.slice(),Fe=Ee.slice();xe[r]=r5(xe[r]+i/2,1,!1),Fe[r]=r5(Fe[r]-i/2,1,!0),He?he.push(xe,Fe):he.push(Fe,xe)}function ae(he,Ee,He){var xe=Q(he,He),Fe=Q(Ee,He);return xe[r]-=i/2,Fe[r]-=i/2,{x:xe[0],y:xe[1],width:i,height:Fe[1]-xe[1]}}function ie(he){return he[r]=r5(he[r],1),he}}function p(m,v){for(var g=Gu(m.count*4),_=0,S,x=[],A=[],C,M=v.getStore(),I=!!n.get(["itemStyle","borderColorDoji"]);(C=m.next())!=null;){var D=M.get(s,C),E=M.get(u,C),P=M.get(c,C),F=M.get(d,C),V=M.get(h,C);if(isNaN(D)||isNaN(F)||isNaN(V)){g[_++]=NaN,_+=3;continue}g[_++]=VB(M,C,E,P,c,I),x[r]=D,x[a]=F,S=e.dataToPoint(x,null,A),g[_++]=S?S[0]:NaN,g[_++]=S?S[1]:NaN,x[a]=V,S=e.dataToPoint(x,null,A),g[_++]=S?S[1]:NaN}v.setLayout("largePoints",g)}}};function VB(n,e,t,i,r,a){var o;return t>i?o=-1:t0?n.get(r,e-1)<=i?1:-1:1,o}function h_e(n,e){var t=n.getBaseAxis(),i,r=t.type==="category"?t.getBandWidth():(i=t.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=_n(ai(n.get("barMaxWidth"),r),r),o=_n(ai(n.get("barMinWidth"),1),r),s=n.get("barWidth");return s!=null?_n(s,r):Math.max(Math.min(r/2,a),o)}const f_e=d_e;function p_e(n){n.registerChartView(l_e),n.registerSeriesModel(u_e),n.registerPreprocessor(c_e),n.registerVisual(t_e),n.registerLayout(f_e)}function HB(n,e){var t=e.rippleEffectColor||e.color;n.eachChild(function(i){i.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var v_e=function(n){ot(e,n);function e(t,i){var r=n.call(this)||this,a=new C3(t,i),o=new ei;return r.add(a),r.add(o),r.updateData(t,i),r}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var i=t.symbolType,r=t.color,a=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;$n(d)?h=d(r):h=d,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,i,r,a,o){if(i>0){t.__t=0;var s=this,l=t.animate("",a).when(o?i*2:i,{__t:o?2:1}).delay(r).during(function(){s._updateSymbolPosition(t)});a||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return eh(t.__p1,t.__cp1)+eh(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,i){t.__p1=i[0],t.__p2=i[1],t.__cp1=i[2]||[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]},e.prototype.updateData=function(t,i,r){this.childAt(0).updateData(t,i,r),this._updateEffectSymbol(t,i)},e.prototype._updateSymbolPosition=function(t){var i=t.__p1,r=t.__p2,a=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Po,c=nA;s[0]=u(i[0],a[0],r[0],o),s[1]=u(i[1],a[1],r[1],o);var d=t.__t<1?c(i[0],a[0],r[0],o):c(r[0],a[0],i[0],1-o),h=t.__t<1?c(i[1],a[1],r[1],o):c(r[1],a[1],i[1],1-o);t.rotation=-Math.atan2(h,d)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(a[l]<=i);l--);l=Math.min(l,o-2)}else{for(l=s;li);l++);l=Math.min(l-1,o-2)}var c=(i-a[l])/(a[l+1]-a[l]),d=r[l],h=r[l+1];t.x=d[0]*(1-c)+c*h[0],t.y=d[1]*(1-c)+c*h[1];var f=t.__t<1?h[0]-d[0]:d[0]-h[0],p=t.__t<1?h[1]-d[1]:d[1]-h[1];t.rotation=-Math.atan2(p,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=i,t.ignore=!1}},e}(iJ);const A_e=T_e;var C_e=function(){function n(){this.polyline=!1,this.curveness=0,this.segs=[]}return n}(),M_e=function(n){ot(e,n);function e(t){var i=n.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new C_e},e.prototype.buildPath=function(t,i){var r=i.segs,a=i.curveness,o;if(i.polyline)for(o=this._off;o0){t.moveTo(r[o++],r[o++]);for(var l=1;l0){var f=(u+d)/2-(c-h)*a,p=(c+h)/2-(d-u)*a;t.quadraticCurveTo(f,p,d,h)}else t.lineTo(d,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,i){var r=this.shape,a=r.segs,o=r.curveness,s=this.style.lineWidth;if(r.polyline)for(var l=0,u=0;u0)for(var d=a[u++],h=a[u++],f=1;f0){var v=(d+p)/2-(h-m)*o,g=(h+m)/2-(p-d)*o;if(lq(d,h,v,g,p,m,s,t,i))return l}else if(Hd(d,h,p,m,s,t,i))return l;l++}return-1},e.prototype.contain=function(t,i){var r=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=r[0],i=r[1],a.contain(t,i)){var o=this.hoverDataIdx=this.findDataIndex(t,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,r=i.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},n.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},n}();const P_e=E_e;var R_e={seriesType:"lines",plan:Xv(),reset:function(n){var e=n.coordinateSystem;if(e){var t=n.get("polyline"),i=n.pipelineContext.large;return{progress:function(r,a){var o=[];if(i){var s=void 0,l=r.end-r.start;if(t){for(var u=0,c=r.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var d=t.get("clip",!0)&&E3(t.coordinateSystem,!1,t);d?this.group.setClipPath(d):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,r){var a=t.getData(),o=this._updateLineDraw(a,t);o.incrementalPrepareUpdate(a),this._clearLayer(r),this._finished=!1},e.prototype.incrementalRender=function(t,i,r){this._lineDraw.incrementalUpdate(t,i.getData()),this._finished=t.end===i.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,i,r){var a=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=aJ.reset(t,i,r);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(r)},e.prototype._updateLineDraw=function(t,i){var r=this._lineDraw,a=this._showEffect(i),o=!!i.get("polyline"),s=i.pipelineContext,l=s.large;return(!r||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(r&&r.remove(),r=this._lineDraw=l?new P_e:new _P(o?a?A_e:rJ:a?iJ:yP),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(r.group),r},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var i=t.getZr(),r=i.painter.getType()==="svg";!r&&this._lastZlevel!=null&&i.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,i){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(i)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.type="lines",e}(Yr);const I_e=L_e;var D_e=typeof Uint32Array=="undefined"?Array:Uint32Array,N_e=typeof Float64Array=="undefined"?Array:Float64Array;function WB(n){var e=n.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(n.data=Xt(e,function(t){var i=[t[0].coord,t[1].coord],r={coords:i};return t[0].name&&(r.fromName=t[0].name),t[1].name&&(r.toName=t[1].name),XM([r,t[0],t[1]])}))}var k_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],WB(t);var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count)),n.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(WB(t),t.data){var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count))}n.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var i=this._processFlatCoordsArray(t.data);i.flatCoords&&(this._flatCoords?(this._flatCoords=x9(this._flatCoords,i.flatCoords),this._flatCoordsOffset=x9(this._flatCoordsOffset,i.flatCoordsOffset)):(this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset),t.data=new Float32Array(i.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var i=this.getData().getItemModel(t),r=i.option instanceof Array?i.option:i.getShallow("coords");return r},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,i){if(this._flatCoordsOffset){for(var r=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),i=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&i>0?i+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(pa);const F_e=k_e;function M6(n){return n instanceof Array||(n=[n,n]),n}var O_e={seriesType:"lines",reset:function(n){var e=M6(n.get("symbol")),t=M6(n.get("symbolSize")),i=n.getData();i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",t&&t[0]),i.setVisual("toSymbolSize",t&&t[1]);function r(a,o){var s=a.getItemModel(o),l=M6(s.getShallow("symbol",!0)),u=M6(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:i.hasItemOption?r:null}}};const B_e=O_e;function z_e(n){n.registerChartView(I_e),n.registerSeriesModel(F_e),n.registerLayout(aJ),n.registerVisual(B_e)}var G_e=256,U_e=function(){function n(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Mh.createCanvas();this.canvas=e}return n.prototype.update=function(e,t,i,r,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,d=this.canvas,h=d.getContext("2d"),f=e.length;d.width=t,d.height=i;for(var p=0;p0){var F=o(S)?l:u;S>0&&(S=S*E+I),A[C++]=F[P],A[C++]=F[P+1],A[C++]=F[P+2],A[C++]=F[P+3]*S*256}else C+=4}return h.putImageData(x,0,0),d},n.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Mh.createCanvas()),t=this.pointSize+this.blurSize,i=t*2;e.width=i,e.height=i;var r=e.getContext("2d");return r.clearRect(0,0,i,i),r.shadowOffsetX=i,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},n.prototype._getGradient=function(e,t){for(var i=this._gradientPixels,r=i[t]||(i[t]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,a),r[o++]=a[0],r[o++]=a[1],r[o++]=a[2],r[o++]=a[3];return r},n}();const V_e=U_e;function H_e(n,e,t){var i=n[1]-n[0];e=Xt(e,function(o){return{interval:[(o.interval[0]-n[0])/i,(o.interval[1]-n[0])/i]}});var r=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&i<=e[1]}}function jB(n){var e=n.dimensions;return e[0]==="lng"&&e[1]==="lat"}var j_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a;i.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,r,0,t.getData().count()):jB(o)&&this._renderOnGeo(o,t,a,r)},e.prototype.incrementalPrepareRender=function(t,i,r){this.group.removeAll()},e.prototype.incrementalRender=function(t,i,r,a){var o=i.coordinateSystem;o&&(jB(o)?this.render(i,r,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(i,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Gh(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,i,r,a,o){var s=t.coordinateSystem,l=r1(s,"cartesian2d"),u,c,d,h;if(l){var f=s.getAxis("x"),p=s.getAxis("y");u=f.getBandWidth()+.5,c=p.getBandWidth()+.5,d=f.scale.getExtent(),h=p.scale.getExtent()}for(var m=this.group,v=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),_=t.getModel(["blur","itemStyle"]).getItemStyle(),S=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),A=_o(t),C=t.getModel("emphasis"),M=C.get("focus"),I=C.get("blurScope"),D=C.get("disabled"),E=l?[v.mapDimension("x"),v.mapDimension("y"),v.mapDimension("value")]:[v.mapDimension("time"),v.mapDimension("value")],P=r;Pd[1]||Wh[1])continue;var Y=s.dataToPoint([G,W]);F=new Hi({shape:{x:Y[0]-u/2,y:Y[1]-c/2,width:u,height:c},style:V})}else{if(isNaN(v.get(E[1],P)))continue;F=new Hi({z2:1,shape:s.dataToRect([v.get(E[0],P)]).contentShape,style:V})}if(v.hasItemOption){var Q=v.getItemModel(P),K=Q.getModel("emphasis");g=K.getModel("itemStyle").getItemStyle(),_=Q.getModel(["blur","itemStyle"]).getItemStyle(),S=Q.getModel(["select","itemStyle"]).getItemStyle(),x=Q.get(["itemStyle","borderRadius"]),M=K.get("focus"),I=K.get("blurScope"),D=K.get("disabled"),A=_o(Q)}F.shape.r=x;var ae=t.getRawValue(P),ie="-";ae&&ae[2]!=null&&(ie=ae[2]+""),$o(F,A,{labelFetcher:t,labelDataIndex:P,defaultOpacity:V.opacity,defaultText:ie}),F.ensureState("emphasis").style=g,F.ensureState("blur").style=_,F.ensureState("select").style=S,ya(F,M,I,D),F.incremental=o,o&&(F.states.emphasis.hoverLayer=!0),m.add(F),v.setItemGraphicEl(P,F),this._progressiveEls&&this._progressiveEls.push(F)}},e.prototype._renderOnGeo=function(t,i,r,a){var o=r.targetVisuals.inRange,s=r.targetVisuals.outOfRange,l=i.getData(),u=this._hmLayer||this._hmLayer||new V_e;u.blurSize=i.get("blurSize"),u.pointSize=i.get("pointSize"),u.minOpacity=i.get("minOpacity"),u.maxOpacity=i.get("maxOpacity");var c=t.getViewRect().clone(),d=t.getRoamTransform();c.applyTransform(d);var h=Math.max(c.x,0),f=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),m=Math.min(c.height+c.y,a.getHeight()),v=p-h,g=m-f,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(_,function(M,I,D){var E=t.dataToPoint([M,I]);return E[0]-=h,E[1]-=f,E.push(D),E}),x=r.getExtent(),A=r.type==="visualMap.continuous"?W_e(x,r.option.range):H_e(x,r.getPieceList(),r.option.selected);u.update(S,v,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},A);var C=new qo({style:{width:v,height:g,x:h,y:f,image:u.canvas},silent:!0});this.group.add(C)},e.type="heatmap",e}(Yr);const $_e=j_e;var q_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return nd(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=x3.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(pa);const X_e=q_e;function Y_e(n){n.registerChartView($_e),n.registerSeriesModel(X_e)}var K_e=["itemStyle","borderWidth"],$B=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Yx=new zh,Z_e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),d=l.master.getRect(),h={ecSize:{width:r.getWidth(),height:r.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[d.x,d.x+d.width],[d.y,d.y+d.height]],isHorizontal:c,valueDim:$B[+c],categoryDim:$B[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var m=XB(o,p),v=qB(o,p,m,h),g=YB(o,h,v);o.setItemGraphicEl(p,g),a.add(g),ZB(g,h,v)}}).update(function(p,m){var v=s.getItemGraphicEl(m);if(!o.hasValue(p)){a.remove(v);return}var g=XB(o,p),_=qB(o,p,g,h),S=dJ(o,_);v&&S!==v.__pictorialShapeStr&&(a.remove(v),o.setItemGraphicEl(p,null),v=null),v?r7e(v,h,_):v=YB(o,h,_,!0),o.setItemGraphicEl(p,v),v.__pictorialSymbolMeta=_,a.add(v),ZB(v,h,_)}).remove(function(p){var m=s.getItemGraphicEl(p);m&&KB(s,p,m.__pictorialSymbolMeta.animationModel,m)}).execute();var f=t.get("clip",!0)?E3(t.coordinateSystem,!1,t):null;return f?a.setClipPath(f):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,i){var r=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(o){KB(a,ni(o).dataIndex,t,o)}):r.removeAll()},e.type="pictorialBar",e}(Yr);function qB(n,e,t,i){var r=n.getItemLayout(e),a=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,d=t.isAnimationEnabled(),h={dataIndex:e,layout:r,itemModel:t,symbolType:n.getItemVisual(e,"symbol")||"circle",style:n.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:d?t:null,hoverScale:d&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};J_e(t,a,r,i,h),Q_e(n,e,r,a,o,h.boundingLength,h.pxSign,c,i,h),e7e(t,h.symbolScale,u,i,h);var f=h.symbolSize,p=n1(t.get("symbolOffset"),f);return t7e(t,f,r,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function J_e(n,e,t,i,r){var a=i.valueDim,o=n.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[a.wh]<=0),c;if($t(o)){var d=[Kx(s,o[0])-l,Kx(s,o[1])-l];d[1]=0?1:-1:c>0?1:-1}function Kx(n,e){return n.toGlobalCoord(n.dataToCoord(n.scale.parse(e)))}function Q_e(n,e,t,i,r,a,o,s,l,u){var c=l.valueDim,d=l.categoryDim,h=Math.abs(t[d.wh]),f=n.getItemVisual(e,"symbolSize"),p;$t(f)?p=f.slice():f==null?p=["100%","100%"]:p=[f,f],p[d.index]=_n(p[d.index],h),p[c.index]=_n(p[c.index],i?h:Math.abs(a)),u.symbolSize=p;var m=u.symbolScale=[p[0]/s,p[1]/s];m[c.index]*=(l.isHorizontal?-1:1)*o}function e7e(n,e,t,i,r){var a=n.get(K_e)||0;a&&(Yx.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Yx.updateTransform(),a/=Yx.getLineScale(),a*=e[i.valueDim.index]),r.valueLineWidth=a||0}function t7e(n,e,t,i,r,a,o,s,l,u,c,d){var h=c.categoryDim,f=c.valueDim,p=d.pxSign,m=Math.max(e[f.index]+s,0),v=m;if(i){var g=Math.abs(l),_=Ro(n.get("symbolMargin"),"15%")+"",S=!1;_.lastIndexOf("!")===_.length-1&&(S=!0,_=_.slice(0,_.length-1));var x=_n(_,e[f.index]),A=Math.max(m+x*2,0),C=S?0:x*2,M=X$(i),I=M?i:JB((g+C)/A),D=g-I*m;x=D/2/(S?I:Math.max(I-1,1)),A=m+x*2,C=S?0:x*2,!M&&i!=="fixed"&&(I=u?JB((Math.abs(u)+C)/A):0),v=I*A-C,d.repeatTimes=I,d.symbolMargin=x}var E=p*(v/2),P=d.pathPosition=[];P[h.index]=t[h.wh]/2,P[f.index]=o==="start"?E:o==="end"?l-E:l/2,a&&(P[0]+=a[0],P[1]+=a[1]);var F=d.bundlePosition=[];F[h.index]=t[h.xy],F[f.index]=t[f.xy];var V=d.barRectShape=It({},t);V[f.wh]=p*Math.max(Math.abs(t[f.wh]),Math.abs(P[f.index]+E)),V[h.wh]=t[h.wh];var G=d.clipShape={};G[h.xy]=-t[h.xy],G[h.wh]=c.ecSize[h.wh],G[f.xy]=0,G[f.wh]=t[f.wh]}function oJ(n){var e=n.symbolPatternSize,t=Ya(n.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function sJ(n,e,t,i){var r=n.__pictorialBundle,a=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,d=a[e.valueDim.index]+o+t.symbolMargin*2;for(PP(n,function(m){m.__pictorialAnimationIndex=c,m.__pictorialRepeatTimes=u,c0:g<0)&&(_=u-1-m),v[l.index]=d*(_-u/2+.5)+s[l.index],{x:v[0],y:v[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function lJ(n,e,t,i){var r=n.__pictorialBundle,a=n.__pictorialMainPath;a?J2(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,i):(a=n.__pictorialMainPath=oJ(t),r.add(a),J2(a,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,i))}function uJ(n,e,t){var i=It({},e.barRectShape),r=n.__pictorialBarRect;r?J2(r,null,{shape:i},e,t):(r=n.__pictorialBarRect=new Hi({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),r.disableMorphing=!0,n.add(r))}function cJ(n,e,t,i){if(t.symbolClip){var r=n.__pictorialClipPath,a=It({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(r)Qi(r,{shape:a},s,l);else{a[o.wh]=0,r=new Hi({shape:a}),n.__pictorialBundle.setClipPath(r),n.__pictorialClipPath=r;var u={};u[o.wh]=t.clipShape[o.wh],e1[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function XB(n,e){var t=n.getItemModel(e);return t.getAnimationDelayParams=n7e,t.isAnimationEnabled=i7e,t}function n7e(n){return{index:n.__pictorialAnimationIndex,count:n.__pictorialRepeatTimes}}function i7e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function YB(n,e,t,i){var r=new ei,a=new ei;return r.add(a),r.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?sJ(r,e,t):lJ(r,e,t),uJ(r,t,i),cJ(r,e,t,i),r.__pictorialShapeStr=dJ(n,t),r.__pictorialSymbolMeta=t,r}function r7e(n,e,t){var i=t.animationModel,r=t.dataIndex,a=n.__pictorialBundle;Qi(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},i,r),t.symbolRepeat?sJ(n,e,t,!0):lJ(n,e,t,!0),uJ(n,t,!0),cJ(n,e,t,!0)}function KB(n,e,t,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var a=[];PP(i,function(o){a.push(o)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(t=null),ne(a,function(o){Ph(o,{scaleX:0,scaleY:0},t,e,function(){i.parent&&i.parent.remove(i)})}),n.setItemGraphicEl(e,null)}function dJ(n,e){return[n.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function PP(n,e,t){ne(n.__pictorialBundle.children(),function(i){i!==n.__pictorialBarRect&&e.call(t,i)})}function J2(n,e,t,i,r,a){e&&n.attr(e),i.symbolClip&&!r?t&&n.attr(t):t&&e1[r?"updateProps":"initProps"](n,t,i.animationModel,i.dataIndex,a)}function ZB(n,e,t){var i=t.dataIndex,r=t.itemModel,a=r.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),c=a.get("focus"),d=a.get("blurScope"),h=a.get("scale");PP(n,function(m){if(m instanceof qo){var v=m.style;m.useStyle(It({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},t.style))}else m.useStyle(t.style);var g=m.ensureState("emphasis");g.style=o,h&&(g.scaleX=m.scaleX*1.1,g.scaleY=m.scaleY*1.1),m.ensureState("blur").style=s,m.ensureState("select").style=l,u&&(m.cursor=u),m.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],p=n.__pictorialBarRect;p.ignoreClip=!0,$o(p,_o(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:gv(e.seriesModel.getData(),i),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),ya(n,c,d,a.get("disabled"))}function JB(n){var e=Math.round(n);return Math.abs(n-e)<1e-4?e:Math.ceil(n)}const a7e=Z_e;var o7e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,n.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Uh(d8.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(d8);const s7e=o7e;function l7e(n){n.registerChartView(a7e),n.registerSeriesModel(s7e),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,si(HY,"pictorialBar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,WY("pictorialBar"))}var u7e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,i,r){var a=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,d=u.boundaryGap;s.x=0,s.y=c.y+d[0];function h(v){return v.name}var f=new Xc(this._layersSeries||[],l,h,h),p=[];f.add(An(m,this,"add")).update(An(m,this,"update")).remove(An(m,this,"remove")).execute();function m(v,g,_){var S=o._layers;if(v==="remove"){s.remove(S[g]);return}for(var x=[],A=[],C,M=l[g].indices,I=0;Ia&&(a=s),i.push(s)}for(var u=0;ua&&(a=d)}return{y0:r,max:a}}function m7e(n){n.registerChartView(d7e),n.registerSeriesModel(f7e),n.registerLayout(p7e),n.registerProcessor(R3("themeRiver"))}var g7e=2,y7e=4,_7e=function(n){ot(e,n);function e(t,i,r,a){var o=n.call(this)||this;o.z2=g7e,o.textConfig={inside:!0},ni(o).seriesIndex=i.seriesIndex;var s=new Xi({z2:y7e,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,i,r,a),o}return e.prototype.updateData=function(t,i,r,a,o){this.node=i,i.piece=this,r=r||this._seriesModel,a=a||this._ecModel;var s=this;ni(s).dataIndex=i.dataIndex;var l=i.getModel(),u=l.getModel("emphasis"),c=i.getLayout(),d=It({},c);d.label=null;var h=i.getVisual("style");h.lineJoin="bevel";var f=i.getVisual("decal");f&&(h.decal=vv(f,o));var p=cp(l.getModel("itemStyle"),d,!0);It(d,p),ne(Is,function(_){var S=s.ensureState(_),x=l.getModel([_,"itemStyle"]);S.style=x.getItemStyle();var A=cp(x,d);A&&(S.shape=A)}),t?(s.setShape(d),s.shape.r=c.r0,sa(s,{shape:{r:c.r}},r,i.dataIndex)):(Qi(s,{shape:d},r),iu(s)),s.useStyle(h),this._updateLabel(r);var m=l.getShallow("cursor");m&&s.attr("cursor",m),this._seriesModel=r||this._seriesModel,this._ecModel=a||this._ecModel;var v=u.get("focus"),g=v==="relative"?x9(i.getAncestorsIndices(),i.getDescendantIndices()):v==="ancestor"?i.getAncestorsIndices():v==="descendant"?i.getDescendantIndices():v;ya(this,g,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var i=this,r=this.node.getModel(),a=r.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),d=this,h=d.getTextContent(),f=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,m=a.get("show")&&!(p!=null&&Math.abs(s)G&&!C9(Y-G)&&Y0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,t,i,r):(o.virtualPiece=new ez(_,t,i,r),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(i){var r=!1,a=t.seriesModel.getViewRoot();a.eachNode(function(o){if(!r&&o.piece&&o.piece===i.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";J5(u,c)}}r=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:vC,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,i){var r=i.getData(),a=r.getItemLayout(0);if(a){var o=t[0]-a.cx,s=t[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(Yr);const w7e=x7e;var T7e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,i){var r={name:t.name,children:t.data};hJ(r);var a=this._levelModels=Xt(t.levels||[],function(l){return new Xr(l,this,i)},this),o=dP.createTree(r,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var d=o.getNodeByDataIndex(c),h=a[d.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var i=n.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return i.treePathInfo=Z_(r,this),i},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){mZ(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(pa);function hJ(n){var e=0;ne(n.children,function(i){hJ(i);var r=i.value;$t(r)&&(r=r[0]),e+=r});var t=n.value;$t(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),$t(n.value)?n.value[0]=t:n.value=t}const A7e=T7e;var nz=Math.PI/180;function C7e(n,e,t){e.eachSeriesByType(n,function(i){var r=i.get("center"),a=i.get("radius");$t(a)||(a=[0,a]),$t(r)||(r=[r,r]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=_n(r[0],o),c=_n(r[1],s),d=_n(a[0],l/2),h=_n(a[1],l/2),f=-i.get("startAngle")*nz,p=i.get("minAngle")*nz,m=i.getData().tree.root,v=i.getViewRoot(),g=v.depth,_=i.get("sort");_!=null&&fJ(v,_);var S=0;ne(v.children,function(Y){!isNaN(Y.getValue())&&S++});var x=v.getValue(),A=Math.PI/(x||S)*2,C=v.depth>0,M=v.height-(C?-1:1),I=(h-d)/(M||1),D=i.get("clockwise"),E=i.get("stillShowZeroSum"),P=D?1:-1,F=function(Y,Q){if(Y){var K=Q;if(Y!==m){var ae=Y.getValue(),ie=x===0&&E?A:ae*A;ie1;)o=o.parentNode;var s=r.getColorFromPalette(o.name||o.dataIndex+"",e);return i.depth>1&&xn(s)&&(s=aA(s,(i.depth-1)/(a-1)*.5)),s}n.eachSeriesByType("sunburst",function(i){var r=i.getData(),a=r.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,i,a.root.height));var u=r.ensureUniqueItemVisual(o.dataIndex,"style");It(u,l)})})}function P7e(n){n.registerChartView(w7e),n.registerSeriesModel(A7e),n.registerLayout(si(C7e,"sunburst")),n.registerProcessor(si(R3,"sunburst")),n.registerVisual(E7e),b7e(n)}var iz={color:"fill",borderColor:"stroke"},R7e={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Gc=Gi(),L7e=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,i){return nd(null,this)},e.prototype.getDataParams=function(t,i,r){var a=n.prototype.getDataParams.call(this,t,i);return r&&(a.info=Gc(r).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(pa);const I7e=L7e;function D7e(n,e){return e=e||[0,0],Xt(["x","y"],function(t,i){var r=this.getAxis(t),a=e[i],o=n[i]/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(a-o)-r.dataToCoord(a+o))},this)}function N7e(n){var e=n.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return n.dataToPoint(t)},size:An(D7e,n)}}}function k7e(n,e){return e=e||[0,0],Xt([0,1],function(t){var i=e[t],r=n[t]/2,a=[],o=[];return a[t]=i-r,o[t]=i+r,a[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(a)[t]-this.dataToPoint(o)[t])},this)}function F7e(n){var e=n.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:n.getZoom()},api:{coord:function(t){return n.dataToPoint(t)},size:An(k7e,n)}}}function O7e(n,e){var t=this.getAxis(),i=e instanceof Array?e[0]:e,r=(n instanceof Array?n[0]:n)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(i-r)-t.dataToCoord(i+r))}function B7e(n){var e=n.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return n.dataToPoint(t)},size:An(O7e,n)}}}function z7e(n,e){return e=e||[0,0],Xt(["Radius","Angle"],function(t,i){var r="get"+t+"Axis",a=this[r](),o=e[i],s=n[i]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function G7e(n){var e=n.getRadiusAxis(),t=n.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:n.cx,cy:n.cy,r:i[1],r0:i[0]},api:{coord:function(r){var a=e.dataToRadius(r[0]),o=t.dataToAngle(r[1]),s=n.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:An(z7e,n)}}}function U7e(n){var e=n.getRect(),t=n.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(i,r){return n.dataToPoint(i,r)}}}}function pJ(n,e,t,i){return n&&(n.legacy||n.legacy!==!1&&!t&&!i&&e!=="tspan"&&(e==="text"||Mn(n,"text")))}function vJ(n,e,t){var i=n,r,a,o;if(e==="text")o=i;else{o={},Mn(i,"text")&&(o.text=i.text),Mn(i,"rich")&&(o.rich=i.rich),Mn(i,"textFill")&&(o.fill=i.textFill),Mn(i,"textStroke")&&(o.stroke=i.textStroke),Mn(i,"fontFamily")&&(o.fontFamily=i.fontFamily),Mn(i,"fontSize")&&(o.fontSize=i.fontSize),Mn(i,"fontStyle")&&(o.fontStyle=i.fontStyle),Mn(i,"fontWeight")&&(o.fontWeight=i.fontWeight),a={type:"text",style:o,silent:!0},r={};var s=Mn(i,"textPosition");t?r.position=s?i.textPosition:"inside":s&&(r.position=i.textPosition),Mn(i,"textPosition")&&(r.position=i.textPosition),Mn(i,"textOffset")&&(r.offset=i.textOffset),Mn(i,"textRotation")&&(r.rotation=i.textRotation),Mn(i,"textDistance")&&(r.distance=i.textDistance)}return rz(o,n),ne(o.rich,function(l){rz(l,l)}),{textConfig:r,textContent:a}}function rz(n,e){e&&(e.font=e.textFont||e.font,Mn(e,"textStrokeWidth")&&(n.lineWidth=e.textStrokeWidth),Mn(e,"textAlign")&&(n.align=e.textAlign),Mn(e,"textVerticalAlign")&&(n.verticalAlign=e.textVerticalAlign),Mn(e,"textLineHeight")&&(n.lineHeight=e.textLineHeight),Mn(e,"textWidth")&&(n.width=e.textWidth),Mn(e,"textHeight")&&(n.height=e.textHeight),Mn(e,"textBackgroundColor")&&(n.backgroundColor=e.textBackgroundColor),Mn(e,"textPadding")&&(n.padding=e.textPadding),Mn(e,"textBorderColor")&&(n.borderColor=e.textBorderColor),Mn(e,"textBorderWidth")&&(n.borderWidth=e.textBorderWidth),Mn(e,"textBorderRadius")&&(n.borderRadius=e.textBorderRadius),Mn(e,"textBoxShadowColor")&&(n.shadowColor=e.textBoxShadowColor),Mn(e,"textBoxShadowBlur")&&(n.shadowBlur=e.textBoxShadowBlur),Mn(e,"textBoxShadowOffsetX")&&(n.shadowOffsetX=e.textBoxShadowOffsetX),Mn(e,"textBoxShadowOffsetY")&&(n.shadowOffsetY=e.textBoxShadowOffsetY))}function az(n,e,t){var i=n;i.textPosition=i.textPosition||t.position||"inside",t.offset!=null&&(i.textOffset=t.offset),t.rotation!=null&&(i.textRotation=t.rotation),t.distance!=null&&(i.textDistance=t.distance);var r=i.textPosition.indexOf("inside")>=0,a=n.fill||"#000";oz(i,e);var o=i.textFill==null;return r?o&&(i.textFill=t.insideFill||"#fff",!i.textStroke&&t.insideStroke&&(i.textStroke=t.insideStroke),!i.textStroke&&(i.textStroke=a),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(o&&(i.textFill=n.fill||t.outsideFill||"#000"),!i.textStroke&&t.outsideStroke&&(i.textStroke=t.outsideStroke)),i.text=e.text,i.rich=e.rich,ne(e.rich,function(s){oz(s,s)}),i}function oz(n,e){e&&(Mn(e,"fill")&&(n.textFill=e.fill),Mn(e,"stroke")&&(n.textStroke=e.fill),Mn(e,"lineWidth")&&(n.textStrokeWidth=e.lineWidth),Mn(e,"font")&&(n.font=e.font),Mn(e,"fontStyle")&&(n.fontStyle=e.fontStyle),Mn(e,"fontWeight")&&(n.fontWeight=e.fontWeight),Mn(e,"fontSize")&&(n.fontSize=e.fontSize),Mn(e,"fontFamily")&&(n.fontFamily=e.fontFamily),Mn(e,"align")&&(n.textAlign=e.align),Mn(e,"verticalAlign")&&(n.textVerticalAlign=e.verticalAlign),Mn(e,"lineHeight")&&(n.textLineHeight=e.lineHeight),Mn(e,"width")&&(n.textWidth=e.width),Mn(e,"height")&&(n.textHeight=e.height),Mn(e,"backgroundColor")&&(n.textBackgroundColor=e.backgroundColor),Mn(e,"padding")&&(n.textPadding=e.padding),Mn(e,"borderColor")&&(n.textBorderColor=e.borderColor),Mn(e,"borderWidth")&&(n.textBorderWidth=e.borderWidth),Mn(e,"borderRadius")&&(n.textBorderRadius=e.borderRadius),Mn(e,"shadowColor")&&(n.textBoxShadowColor=e.shadowColor),Mn(e,"shadowBlur")&&(n.textBoxShadowBlur=e.shadowBlur),Mn(e,"shadowOffsetX")&&(n.textBoxShadowOffsetX=e.shadowOffsetX),Mn(e,"shadowOffsetY")&&(n.textBoxShadowOffsetY=e.shadowOffsetY),Mn(e,"textShadowColor")&&(n.textShadowColor=e.textShadowColor),Mn(e,"textShadowBlur")&&(n.textShadowBlur=e.textShadowBlur),Mn(e,"textShadowOffsetX")&&(n.textShadowOffsetX=e.textShadowOffsetX),Mn(e,"textShadowOffsetY")&&(n.textShadowOffsetY=e.textShadowOffsetY))}var mJ={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},sz=Li(mJ);Yu(Zu,function(n,e){return n[e]=1,n},{});Zu.join(", ");var _8=["","style","shape","extra"],Sv=Gi();function RP(n,e,t,i,r){var a=n+"Animation",o=Uv(n,i,r)||{},s=Sv(e).userDuring;return o.duration>0&&(o.during=s?An($7e,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=n),It(o,t[a]),o}function c5(n,e,t,i){i=i||{};var r=i.dataIndex,a=i.isInit,o=i.clearStyle,s=t.isAnimationEnabled(),l=Sv(n),u=e.style;l.userDuring=e.during;var c={},d={};if(X7e(n,e,d),uz("shape",e,d),uz("extra",e,d),!a&&s&&(q7e(n,e,c),lz("shape",n,e,c),lz("extra",n,e,c),Y7e(n,e,u,c)),d.style=u,V7e(n,d,o),W7e(n,e),s)if(a){var h={};ne(_8,function(p){var m=p?e[p]:e;m&&m.enterFrom&&(p&&(h[p]=h[p]||{}),It(p?h[p]:h,m.enterFrom))});var f=RP("enter",n,e,t,r);f.duration>0&&n.animateFrom(h,f)}else H7e(n,e,r||0,t,c);gJ(n,e),u?n.dirty():n.markRedraw()}function gJ(n,e){for(var t=Sv(n).leaveToProps,i=0;i<_8.length;i++){var r=_8[i],a=r?e[r]:e;a&&a.leaveTo&&(t||(t=Sv(n).leaveToProps={}),r&&(t[r]=t[r]||{}),It(r?t[r]:t,a.leaveTo))}}function e7(n,e,t,i){if(n){var r=n.parent,a=Sv(n).leaveToProps;if(a){var o=RP("update",n,e,t,0);o.done=function(){r.remove(n),i&&i()},n.animateTo(a,o)}else r.remove(n),i&&i()}}function Ep(n){return n==="all"}function V7e(n,e,t){var i=e.style;if(!n.isGroup&&i){if(t){n.useStyle({});for(var r=n.animators,a=0;a0&&n.animateFrom(r,a)}}function W7e(n,e){Mn(e,"silent")&&(n.silent=e.silent),Mn(e,"ignore")&&(n.ignore=e.ignore),n instanceof M0&&Mn(e,"invisible")&&(n.invisible=e.invisible),n instanceof Ei&&Mn(e,"autoBatch")&&(n.autoBatch=e.autoBatch)}var wu={},j7e={setTransform:function(n,e){return wu.el[n]=e,this},getTransform:function(n){return wu.el[n]},setShape:function(n,e){var t=wu.el,i=t.shape||(t.shape={});return i[n]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(n){var e=wu.el.shape;if(e)return e[n]},setStyle:function(n,e){var t=wu.el,i=t.style;return i&&(i[n]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(n){var e=wu.el.style;if(e)return e[n]},setExtra:function(n,e){var t=wu.el.extra||(wu.el.extra={});return t[n]=e,this},getExtra:function(n){var e=wu.el.extra;if(e)return e[n]}};function $7e(){var n=this,e=n.el;if(e){var t=Sv(e).userDuring,i=n.userDuring;if(t!==i){n.el=n.userDuring=null;return}wu.el=e,i(j7e)}}function lz(n,e,t,i){var r=t[n];if(r){var a=e[n],o;if(a){var s=t.transition,l=r.transition;if(l)if(!o&&(o=i[n]={}),Ep(l))It(o,a);else for(var u=Ar(l),c=0;c=0){!o&&(o=i[n]={});for(var f=Li(a),c=0;c=0)){var h=n.getAnimationStyleProps(),f=h?h.style:null;if(f){!a&&(a=i.style={});for(var p=Li(t),u=0;u=0?e.getStore().get(Q,W):void 0}var K=e.get(Y.name,W),ae=Y&&Y.ordinalMeta;return ae?ae.categories[K]:K}function C(G,W){W==null&&(W=u);var Y=e.getItemVisual(W,"style"),Q=Y&&Y.fill,K=Y&&Y.opacity,ae=_(W,sh).getItemStyle();Q!=null&&(ae.fill=Q),K!=null&&(ae.opacity=K);var ie={inheritColor:xn(Q)?Q:"#000"},he=S(W,sh),Ee=qr(he,null,ie,!1,!0);Ee.text=he.getShallow("show")?ai(n.getFormattedLabel(W,sh),gv(e,W)):null;var He=K5(he,ie,!1);return D(G,ae),ae=az(ae,Ee,He),G&&I(ae,G),ae.legacy=!0,ae}function M(G,W){W==null&&(W=u);var Y=_(W,Uc).getItemStyle(),Q=S(W,Uc),K=qr(Q,null,null,!0,!0);K.text=Q.getShallow("show")?Hu(n.getFormattedLabel(W,Uc),n.getFormattedLabel(W,sh),gv(e,W)):null;var ae=K5(Q,null,!0);return D(G,Y),Y=az(Y,K,ae),G&&I(Y,G),Y.legacy=!0,Y}function I(G,W){for(var Y in W)Mn(W,Y)&&(G[Y]=W[Y])}function D(G,W){G&&(G.textFill&&(W.textFill=G.textFill),G.textPosition&&(W.textPosition=G.textPosition))}function E(G,W){if(W==null&&(W=u),Mn(iz,G)){var Y=e.getItemVisual(W,"style");return Y?Y[iz[G]]:null}if(Mn(R7e,G))return e.getItemVisual(W,G)}function P(G){if(a.type==="cartesian2d"){var W=a.getBaseAxis();return ome(qn({axis:W},G))}}function F(){return t.getCurrentSeriesIndices()}function V(G){return bE(G,t)}}function oSe(n){var e={};return ne(n.dimensions,function(t){var i=n.getDimensionInfo(t);if(!i.isExtraCoord){var r=i.coordDim,a=e[r]=e[r]||[];a[i.coordDimIndex]=n.getDimensionIndex(t)}}),e}function ew(n,e,t,i,r,a,o){if(!i){a.remove(e);return}var s=kP(n,e,t,i,r,a);return s&&o.setItemGraphicEl(t,s),s&&ya(s,i.focus,i.blurScope,i.emphasisDisabled),s}function kP(n,e,t,i,r,a){var o=-1,s=e;e&&bJ(e,i,r)&&(o=xi(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=DP(i),s&&tSe(s,u)),i.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Jl.normal.cfg=Jl.normal.conOpt=Jl.emphasis.cfg=Jl.emphasis.conOpt=Jl.blur.cfg=Jl.blur.conOpt=Jl.select.cfg=Jl.select.conOpt=null,Jl.isLegacy=!1,lSe(u,t,i,r,l,Jl),sSe(u,t,i,r,l),NP(n,u,t,i,Jl,r,l),Mn(i,"info")&&(Gc(u).info=i.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function bJ(n,e,t){var i=Gc(n),r=e.type,a=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||r!=null&&r!==i.customGraphicType||r==="path"&&fSe(a)&&xJ(a)!==i.customPathData||r==="image"&&Mn(o,"image")&&o.image!==i.customImagePath}function sSe(n,e,t,i,r){var a=t.clipPath;if(a===!1)n&&n.getClipPath()&&n.removeClipPath();else if(a){var o=n.getClipPath();o&&bJ(o,a,i)&&(o=null),o||(o=DP(a),n.setClipPath(o)),NP(null,o,e,a,null,i,r)}}function lSe(n,e,t,i,r,a){if(!n.isGroup){dz(t,null,a),dz(t,Uc,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=n.getTextContent();if(o===!1)c&&n.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=DP(o),n.setTextContent(c)),NP(null,c,e,o,null,i,r);for(var d=o&&o.style,h=0;h=c;f--){var p=e.childAt(f);cSe(e,p,r)}}}function cSe(n,e,t){e&&e7(e,Gc(n).option,t)}function dSe(n){new Xc(n.oldChildren,n.newChildren,hz,hz,n).add(fz).update(fz).remove(hSe).execute()}function hz(n,e){var t=n&&n.name;return t!=null?t:Q7e+e}function fz(n,e){var t=this.context,i=n!=null?t.newChildren[n]:null,r=e!=null?t.oldChildren[e]:null;kP(t.api,r,t.dataIndex,i,t.seriesModel,t.group)}function hSe(n){var e=this.context,t=e.oldChildren[n];t&&e7(t,Gc(t).option,e.seriesModel)}function xJ(n){return n&&(n.pathData||n.d)}function fSe(n){return n&&(Mn(n,"pathData")||Mn(n,"d"))}function pSe(n){n.registerChartView(iSe),n.registerSeriesModel(I7e)}var Qf=Gi(),pz=Zn,tw=An,vSe=function(){function n(){this._dragging=!1,this.animationThreshold=15}return n.prototype.render=function(e,t,i,r){var a=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,!(!r&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,t,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new ei,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),i.getZr().add(s);else{var h=si(vz,t,d);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}gz(s,t,!0),this._renderHandle(a)}},n.prototype.remove=function(e){this.clear(e)},n.prototype.dispose=function(e){this.clear(e)},n.prototype.determineAnimation=function(e,t){var i=t.get("animation"),r=e.axis,a=r.type==="category",o=t.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&r.getBandWidth()>s)return!0;if(o){var l=rP(e).seriesDataCount,u=r.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},n.prototype.makeElOption=function(e,t,i,r,a){},n.prototype.createPointerEl=function(e,t,i,r){var a=t.pointer;if(a){var o=Qf(e).pointerEl=new e1[a.type](pz(t.pointer));e.add(o)}},n.prototype.createLabelEl=function(e,t,i,r){if(t.label){var a=Qf(e).labelEl=new Xi(pz(t.label));e.add(a),mz(a,r)}},n.prototype.updatePointerEl=function(e,t,i){var r=Qf(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),i(r,{shape:t.pointer.shape}))},n.prototype.updateLabelEl=function(e,t,i,r){var a=Qf(e).labelEl;a&&(a.setStyle(t.label.style),i(a,{x:t.label.x,y:t.label.y}),mz(a,r))},n.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,i=this._api.getZr(),r=this._handle,a=t.getModel("handle"),o=t.get("status");if(!a.get("show")||!o||o==="hide"){r&&i.remove(r),this._handle=null;return}var s;this._handle||(s=!0,r=this._handle=b3(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Wc(u.event)},onmousedown:tw(this._onHandleDragMove,this,0,0),drift:tw(this._onHandleDragMove,this),ondragend:tw(this._onHandleDragEnd,this)}),i.add(r)),gz(r,t,!1),r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");$t(l)||(l=[l,l]),r.scaleX=l[0]/2,r.scaleY=l[1]/2,Yv(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},n.prototype._moveHandleToValue=function(e,t){vz(this._axisPointerModel,!t&&this._moveAnimation,this._handle,nw(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},n.prototype._onHandleDragMove=function(e,t){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform(nw(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr(nw(r)),Qf(i).lastProp=null,this._doDispatchAxisPointer()}},n.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},n.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},n.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,r=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),k9(this,"_doDispatchAxisPointer")},n.prototype.doClear=function(){},n.prototype.buildLabel=function(e,t,i){return i=i||0,{x:e[i],y:e[1-i],width:t[i],height:t[1-i]}},n}();function vz(n,e,t,i){wJ(Qf(t).lastProp,i)||(Qf(t).lastProp=i,e?Qi(t,i,n):(t.stopAnimation(),t.attr(i)))}function wJ(n,e){if(Kn(n)&&Kn(e)){var t=!0;return ne(e,function(i,r){t=t&&wJ(n[r],i)}),!!t}else return n===e}function mz(n,e){n[e.get(["label","show"])?"show":"hide"]()}function nw(n){return{x:n.x||0,y:n.y||0,rotation:n.rotation||0}}function gz(n,e,t){var i=e.get("z"),r=e.get("zlevel");n&&n.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),r!=null&&(a.zlevel=r),a.silent=t)})}const OP=vSe;function BP(n){var e=n.get("type"),t=n.getModel(e+"Style"),i;return e==="line"?(i=t.getLineStyle(),i.fill=null):e==="shadow"&&(i=t.getAreaStyle(),i.stroke=null),i}function TJ(n,e,t,i,r){var a=t.get("value"),o=AJ(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Wv(s.get("padding")||0),u=s.getFont(),c=g3(o,u),d=r.position,h=c.width+l[1]+l[3],f=c.height+l[0]+l[2],p=r.align;p==="right"&&(d[0]-=h),p==="center"&&(d[0]-=h/2);var m=r.verticalAlign;m==="bottom"&&(d[1]-=f),m==="middle"&&(d[1]-=f/2),mSe(d,h,f,i);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),n.label={x:d[0],y:d[1],style:qr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:v}),z2:10}}function mSe(n,e,t,i){var r=i.getWidth(),a=i.getHeight();n[0]=Math.min(n[0]+e,r)-e,n[1]=Math.min(n[1]+t,a)-t,n[0]=Math.max(n[0],0),n[1]=Math.max(n[1],0)}function AJ(n,e,t,i,r){n=e.scale.parse(n);var a=e.scale.getLabel({value:n},{precision:r.precision}),o=r.formatter;if(o){var s={value:XE(e,{value:n}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};ne(i,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,d=u&&u.getDataParams(c);d&&s.seriesData.push(d)}),xn(o)?a=o.replace("{value}",a):$n(o)&&(a=o(s))}return a}function zP(n,e,t){var i=Dl();return Jp(i,i,t.rotation),Ku(i,i,t.position),eu([n.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],i)}function CJ(n,e,t,i,r,a){var o=Yc.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=r.get(["label","margin"]),TJ(e,i,r,a,{position:zP(i.axis,n,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function GP(n,e,t){return t=t||0,{x1:n[t],y1:n[1-t],x2:e[t],y2:e[1-t]}}function MJ(n,e,t){return t=t||0,{x:n[t],y:n[1-t],width:e[t],height:e[1-t]}}function yz(n,e,t,i,r,a){return{cx:n,cy:e,r0:t,r:i,startAngle:r,endAngle:a,clockwise:!0}}var gSe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,r,a,o){var s=r.axis,l=s.grid,u=a.get("type"),c=_z(l,s).getOtherAxis(s).getGlobalExtent(),d=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var h=BP(a),f=ySe[u](s,d,c);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=QA(l.model,r);CJ(i,t,p,r,a,o)},e.prototype.getHandleTransform=function(t,i,r){var a=QA(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=r.get(["handle","margin"]);var o=zP(i.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,r,a){var o=r.axis,s=o.grid,l=o.getGlobalExtent(!0),u=_z(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,d=[t.x,t.y];d[c]+=i[c],d[c]=Math.min(l[1],d[c]),d[c]=Math.max(l[0],d[c]);var h=(u[1]+u[0])/2,f=[h,h];f[c]=d[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:d[0],y:d[1],rotation:t.rotation,cursorPoint:f,tooltipOption:p[c]}},e}(OP);function _z(n,e){var t={};return t[e.dim+"AxisIndex"]=e.index,n.getCartesian(t)}var ySe={line:function(n,e,t){var i=GP([e,t[0]],[e,t[1]],Sz(n));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(n,e,t){var i=Math.max(1,n.getBandWidth()),r=t[1]-t[0];return{type:"Rect",shape:MJ([e-i/2,t[0]],[i,r],Sz(n))}}};function Sz(n){return n.dim==="x"?0:1}const _Se=gSe;var SSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}($i);const bSe=SSe;var Nc=Gi(),xSe=ne;function EJ(n,e,t){if(!qi.node){var i=e.getZr();Nc(i).records||(Nc(i).records={}),wSe(i,e);var r=Nc(i).records[n]||(Nc(i).records[n]={});r.handler=t}}function wSe(n,e){if(Nc(n).initialized)return;Nc(n).initialized=!0,t("click",si(bz,"click")),t("mousemove",si(bz,"mousemove")),t("globalout",ASe);function t(i,r){n.on(i,function(a){var o=CSe(e);xSe(Nc(n).records,function(s){s&&r(s,a,o.dispatchAction)}),TSe(o.pendings,e)})}}function TSe(n,e){var t=n.showTip.length,i=n.hideTip.length,r;t?r=n.showTip[t-1]:i&&(r=n.hideTip[i-1]),r&&(r.dispatchAction=null,e.dispatchAction(r))}function ASe(n,e,t){n.handler("leave",null,t)}function bz(n,e,t,i){e.handler(n,t,i)}function CSe(n){var e={showTip:[],hideTip:[]},t=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=t,n.dispatchAction(i))};return{dispatchAction:t,pendings:e}}function yC(n,e){if(!qi.node){var t=e.getZr(),i=(Nc(t).records||{})[n];i&&(Nc(t).records[n]=null)}}var MSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=i.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";EJ("axisPointer",r,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,i){yC("axisPointer",i)},e.prototype.dispose=function(t,i){yC("axisPointer",i)},e.type="axisPointer",e}(xa);const ESe=MSe;function PJ(n,e){var t=[],i=n.seriesIndex,r;if(i==null||!(r=e.getSeriesByIndex(i)))return{point:[]};var a=r.getData(),o=Op(a,n);if(o==null||o<0||$t(o))return{point:[]};var s=a.getItemGraphicEl(o),l=r.coordinateSystem;if(r.getTooltipPosition)t=r.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(n.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),d=c.dim,h=u.dim,f=d==="x"||d==="radius"?1:0,p=a.mapDimension(h),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(m)||[]}else t=l.dataToPoint(a.getValues(Xt(l.dimensions,function(g){return a.mapDimension(g)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),t=[v.x+v.width/2,v.y+v.height/2]}return{point:t,el:s}}var xz=Gi();function PSe(n,e,t){var i=n.currTrigger,r=[n.x,n.y],a=n,o=n.dispatchAction||An(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){d5(r)&&(r=PJ({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=d5(r),u=a.axesInfo,c=s.axesInfo,d=i==="leave"||d5(r),h={},f={},p={list:[],map:{}},m={showPointer:si(LSe,f),showTooltip:si(ISe,p)};ne(s.coordSysMap,function(g,_){var S=l||g.containPoint(r);ne(s.coordSysAxesInfo[_],function(x,A){var C=x.axis,M=FSe(u,x);if(!d&&S&&(!u||M)){var I=M&&M.value;I==null&&!l&&(I=C.pointToData(r)),I!=null&&wz(x,I,m,!1,h)}})});var v={};return ne(c,function(g,_){var S=g.linkGroup;S&&!f[_]&&ne(S.axesInfo,function(x,A){var C=f[A];if(x!==g&&C){var M=C.value;S.mapper&&(M=g.axis.scale.parse(S.mapper(M,Tz(x),Tz(g)))),v[g.key]=M}})}),ne(v,function(g,_){wz(c[_],g,m,!0,h)}),DSe(f,c,h),NSe(p,r,n,o),kSe(c,o,t),h}}function wz(n,e,t,i,r){var a=n.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!n.involveSeries){t.showPointer(n,e);return}var o=RSe(e,n),s=o.payloadBatch,l=o.snapToValue;s[0]&&r.seriesIndex==null&&It(r,s[0]),!i&&n.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(n,e,s),t.showTooltip(n,o,l)}}function RSe(n,e){var t=e.axis,i=t.dim,r=n,a=[],o=Number.MAX_VALUE,s=-1;return ne(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(i),d,h;if(l.getAxisTooltipData){var f=l.getAxisTooltipData(c,n,t);h=f.dataIndices,d=f.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],n,t.type==="category"?.5:null),!h.length)return;d=l.getData().get(c[0],h[0])}if(!(d==null||!isFinite(d))){var p=n-d,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,r=d,a.length=0),ne(h,function(v){a.push({seriesIndex:l.seriesIndex,dataIndexInside:v,dataIndex:l.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:r}}function LSe(n,e,t,i){n[e.key]={value:t,payloadBatch:i}}function ISe(n,e,t,i){var r=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!r.length)){var l=e.coordSys.model,u=U9(l),c=n.map[u];c||(c=n.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},n.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function DSe(n,e,t){var i=t.axesInfo=[];ne(e,function(r,a){var o=r.axisPointerModel.option,s=n[a];s?(!r.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!r.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:r.axis.dim,axisIndex:r.axis.model.componentIndex,value:o.value})})}function NSe(n,e,t,i){if(d5(e)||!n.list.length){i({type:"hideTip"});return}var r=((n.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:n.list})}function kSe(n,e,t){var i=t.getZr(),r="axisPointerLastHighlights",a=xz(i)[r]||{},o=xz(i)[r]={};ne(n,function(u,c){var d=u.axisPointerModel.option;d.status==="show"&&u.triggerEmphasis&&ne(d.seriesDataIndices,function(h){var f=h.seriesIndex+" | "+h.dataIndex;o[f]=h})});var s=[],l=[];ne(a,function(u,c){!o[c]&&l.push(u)}),ne(o,function(u,c){!a[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function FSe(n,e){for(var t=0;t<(n||[]).length;t++){var i=n[t];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function Tz(n){var e=n.axis.model,t={},i=t.axisDim=n.axis.dim;return t.axisIndex=t[i+"AxisIndex"]=e.componentIndex,t.axisName=t[i+"AxisName"]=e.name,t.axisId=t[i+"AxisId"]=e.id,t}function d5(n){return!n||n[0]==null||isNaN(n[0])||n[1]==null||isNaN(n[1])}function N3(n){a1.registerAxisPointerClass("CartesianAxisPointer",_Se),n.registerComponentModel(bSe),n.registerComponentView(ESe),n.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!$t(t)&&(e.axisPointer.link=[t])}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=w3e(e,t)}),n.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},PSe)}function OSe(n){Ci(tZ),Ci(N3)}var BSe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,r,a,o){var s=r.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),d=s.dataToCoord(i),h=a.get("type");if(h&&h!=="none"){var f=BP(a),p=GSe[h](s,l,d,c);p.style=f,t.graphicKey=p.type,t.pointer=p}var m=a.get(["label","margin"]),v=zSe(i,r,a,l,m);TJ(t,r,a,o,v)},e}(OP);function zSe(n,e,t,i,r){var a=e.axis,o=a.dataToCoord(n),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,c,d;if(a.dim==="radius"){var h=Dl();Jp(h,h,s),Ku(h,h,[i.cx,i.cy]),u=eu([o,-r],h);var f=e.getModel("axisLabel").get("rotate")||0,p=Yc.innerTextLayout(s,f*Math.PI/180,-1);c=p.textAlign,d=p.textVerticalAlign}else{var m=l[1];u=i.coordToPoint([m+r,o]);var v=i.cx,g=i.cy;c=Math.abs(u[0]-v)/m<.3?"center":u[0]>v?"left":"right",d=Math.abs(u[1]-g)/m<.3?"middle":u[1]>g?"top":"bottom"}return{position:u,align:c,verticalAlign:d}}var GSe={line:function(n,e,t,i){return n.dim==="angle"?{type:"Line",shape:GP(e.coordToPoint([i[0],t]),e.coordToPoint([i[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(n,e,t,i){var r=Math.max(1,n.getBandWidth()),a=Math.PI/180;return n.dim==="angle"?{type:"Sector",shape:yz(e.cx,e.cy,i[0],i[1],(-t-r/2)*a,(-t+r/2)*a)}:{type:"Sector",shape:yz(e.cx,e.cy,t-r/2,t+r/2,0,Math.PI*2)}}};const USe=BSe;var VSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var i,r=this.ecModel;return r.eachComponent(t,function(a){a.getCoordSysModel()===this&&(i=a)},this),i},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}($i);const HSe=VSe;var UP=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Xa).models[0]},e.type="polarAxis",e}($i);Za(UP,A3);var WSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(UP),jSe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(UP),VP=function(n){ot(e,n);function e(t,i){return n.call(this,"radius",t,i)||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e}(ou);VP.prototype.dataToRadius=ou.prototype.dataToCoord;VP.prototype.radiusToData=ou.prototype.coordToData;const $Se=VP;var qSe=Gi(),HP=function(n){ot(e,n);function e(t,i){return n.call(this,"angle",t,i||[0,360])||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,i=t.getLabelModel(),r=t.scale,a=r.getExtent(),o=r.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=g3(s==null?"":s+"",i.getFont(),"center","top"),d=Math.max(c.height,7),h=d/u;isNaN(h)&&(h=1/0);var f=Math.max(0,Math.floor(h)),p=qSe(t.model),m=p.lastAutoInterval,v=p.lastTickCount;return m!=null&&v!=null&&Math.abs(m-f)<=1&&Math.abs(v-o)<=1&&m>f?f=m:(p.lastTickCount=o,p.lastAutoInterval=f),f},e}(ou);HP.prototype.dataToAngle=ou.prototype.dataToCoord;HP.prototype.angleToData=ou.prototype.coordToData;const XSe=HP;var RJ=["radius","angle"],YSe=function(){function n(e){this.dimensions=RJ,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new $Se,this._angleAxis=new XSe,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return n.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},n.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},n.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},n.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},n.prototype.getAxesByScale=function(e){var t=[],i=this._angleAxis,r=this._radiusAxis;return i.scale.type===e&&t.push(i),r.scale.type===e&&t.push(r),t},n.prototype.getAngleAxis=function(){return this._angleAxis},n.prototype.getRadiusAxis=function(){return this._radiusAxis},n.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},n.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},n.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},n.prototype.pointToData=function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},n.prototype.pointToCoord=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,r=this.getAngleAxis(),a=r.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);r.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+i*i);t/=l,i/=l;for(var u=Math.atan2(-i,t)/Math.PI*180,c=us;)u+=c*360;return[l,u]},n.prototype.coordToPoint=function(e){var t=e[0],i=e[1]/180*Math.PI,r=Math.cos(i)*t+this.cx,a=-Math.sin(i)*t+this.cy;return[r,a]},n.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),i=t.getExtent().slice();i[0]>i[1]&&i.reverse();var r=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-r[0]*a,endAngle:-r[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,d=u*u+c*c,h=this.r,f=this.r0;return h!==f&&d-o<=h*h&&d+o>=f*f}}},n.prototype.convertToPixel=function(e,t,i){var r=Az(t);return r===this?this.dataToPoint(i):null},n.prototype.convertFromPixel=function(e,t,i){var r=Az(t);return r===this?this.pointToData(i):null},n}();function Az(n){var e=n.seriesModel,t=n.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const KSe=YSe;function ZSe(n,e,t){var i=e.get("center"),r=t.getWidth(),a=t.getHeight();n.cx=_n(i[0],r),n.cy=_n(i[1],a);var o=n.getRadiusAxis(),s=Math.min(r,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:$t(l)||(l=[0,l]);var u=[_n(l[0],s),_n(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function JSe(n,e){var t=this,i=t.getAngleAxis(),r=t.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),n.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();ne(s8(l,"radius"),function(u){r.scale.unionExtentFromData(l,u)}),ne(s8(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),mv(i.scale,i.model),mv(r.scale,r.model),i.type==="category"&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function QSe(n){return n.mainType==="angleAxis"}function Cz(n,e){var t;if(n.type=e.get("type"),n.scale=q_(e),n.onBand=e.get("boundaryGap")&&n.type==="category",n.inverse=e.get("inverse"),QSe(e)){n.inverse=n.inverse!==e.get("clockwise");var i=e.get("startAngle"),r=(t=e.get("endAngle"))!==null&&t!==void 0?t:i+(n.inverse?-360:360);n.setExtent(i,r)}e.axis=n,n.model=e}var ebe={dimensions:RJ,create:function(n,e){var t=[];return n.eachComponent("polar",function(i,r){var a=new KSe(r+"");a.update=JSe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");Cz(o,l),Cz(s,u),ZSe(a,i,e),t.push(a),i.coordinateSystem=a,a.model=i}),n.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var r=i.getReferringComponents("polar",Xa).models[0];i.coordinateSystem=r.coordinateSystem}}),t}};const tbe=ebe;var nbe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function E6(n,e,t){e[1]>e[0]&&(e=e.slice().reverse());var i=n.coordToPoint([e[0],t]),r=n.coordToPoint([e[1],t]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function P6(n){var e=n.getRadiusAxis();return e.inverse?0:1}function Mz(n){var e=n[0],t=n[n.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&n.pop()}var ibe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var r=t.axis,a=r.polar,o=a.getRadiusAxis().getExtent(),s=r.getTicksCoords(),l=r.getMinorTicksCoords(),u=Xt(r.getViewLabels(),function(c){c=Zn(c);var d=r.scale,h=d.type==="ordinal"?d.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=r.dataToCoord(h),c});Mz(u),Mz(s),ne(nbe,function(c){t.get([c,"show"])&&(!r.scale.isBlank()||c==="axisLine")&&rbe[c](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e}(a1),rbe={axisLine:function(n,e,t,i,r,a){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=P6(t),d=c?0:1,h,f=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[d]===0?h=new e1[f]({shape:{cx:t.cx,cy:t.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new M_({shape:{cx:t.cx,cy:t.cy,r:a[c],r0:a[d]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,n.add(h)},axisTick:function(n,e,t,i,r,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[P6(t)],u=Xt(i,function(c){return new Lo({shape:E6(t,[l,l+s],c.coord)})});n.add(m0(u,{style:qn(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(n,e,t,i,r,a){if(r.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[P6(t)],c=[],d=0;dg?"left":"right",x=Math.abs(v[1]-_)/m<.3?"middle":v[1]>_?"top":"bottom";if(s&&s[p]){var A=s[p];Kn(A)&&A.textStyle&&(f=new Xr(A.textStyle,l,l.ecModel))}var C=new Xi({silent:Yc.isLabelSilent(e),style:qr(f,{x:v[0],y:v[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:d.formattedLabel,align:S,verticalAlign:x})});if(n.add(C),c){var M=Yc.makeAxisEventDataBase(e);M.targetType="axisLabel",M.value=d.rawLabel,ni(C).eventData=M}},this)},splitLine:function(n,e,t,i,r,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],d=0;d=0?"p":"n",W=D;A&&(i[c][V]||(i[c][V]={p:D,n:D}),W=i[c][V][G]);var Y=void 0,Q=void 0,K=void 0,ae=void 0;if(p.dim==="radius"){var ie=p.dataToCoord(F)-D,he=l.dataToCoord(V);Math.abs(ie)=ae})}}})}function fbe(n){var e={};ne(n,function(i,r){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=IJ(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),d=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=d.stacks;e[l]=d;var f=LJ(i);h[f]||d.autoWidthCount++,h[f]=h[f]||{width:0,maxWidth:0};var p=_n(i.get("barWidth"),c),m=_n(i.get("barMaxWidth"),c),v=i.get("barGap"),g=i.get("barCategoryGap");p&&!h[f].width&&(p=Math.min(d.remainedWidth,p),h[f].width=p,d.remainedWidth-=p),m&&(h[f].maxWidth=m),v!=null&&(d.gap=v),g!=null&&(d.categoryGap=g)});var t={};return ne(e,function(i,r){t[r]={};var a=i.stacks,o=i.bandWidth,s=_n(i.categoryGap,o),l=_n(i.gap,1),u=i.remainedWidth,c=i.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),ne(a,function(m,v){var g=m.maxWidth;g&&g=t.y&&e[1]<=t.y+t.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},n.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},n.prototype.dataToPoint=function(e){var t=this.getAxis(),i=this.getRect(),r=[],a=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),r[a]=t.toGlobalCoord(t.dataToCoord(+e)),r[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,r},n.prototype.convertToPixel=function(e,t,i){var r=Ez(t);return r===this?this.dataToPoint(i):null},n.prototype.convertFromPixel=function(e,t,i){var r=Ez(t);return r===this?this.pointToData(i):null},n}();function Ez(n){var e=n.seriesModel,t=n.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Cbe(n,e){var t=[];return n.eachComponent("singleAxis",function(i,r){var a=new Abe(i,n,e);a.name="single_"+r,a.resize(i,e),i.coordinateSystem=a,t.push(a)}),n.eachSeries(function(i){if(i.get("coordinateSystem")==="singleAxis"){var r=i.getReferringComponents("singleAxis",Xa).models[0];i.coordinateSystem=r&&r.coordinateSystem}}),t}var Mbe={create:Cbe,dimensions:NJ};const Ebe=Mbe;var Pz=["x","y"],Pbe=["width","height"],Rbe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,r,a,o){var s=r.axis,l=s.coordinateSystem,u=rw(l,1-x8(s)),c=l.dataToPoint(i)[0],d=a.get("type");if(d&&d!=="none"){var h=BP(a),f=Lbe[d](s,c,u);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=_C(r);CJ(i,t,p,r,a,o)},e.prototype.getHandleTransform=function(t,i,r){var a=_C(i,{labelInside:!1});a.labelMargin=r.get(["handle","margin"]);var o=zP(i.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,r,a){var o=r.axis,s=o.coordinateSystem,l=x8(o),u=rw(s,l),c=[t.x,t.y];c[l]+=i[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var d=rw(s,1-l),h=(d[1]+d[0])/2,f=[h,h];return f[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(OP),Lbe={line:function(n,e,t){var i=GP([e,t[0]],[e,t[1]],x8(n));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(n,e,t){var i=n.getBandWidth(),r=t[1]-t[0];return{type:"Rect",shape:MJ([e-i/2,t[0]],[i,r],x8(n))}}};function x8(n){return n.isHorizontal()?0:1}function rw(n,e){var t=n.getRect();return[t[Pz[e]],t[Pz[e]]+t[Pbe[e]]]}const Ibe=Rbe;var Dbe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(xa);function Nbe(n){Ci(N3),a1.registerAxisPointerClass("SingleAxisPointer",Ibe),n.registerComponentView(Dbe),n.registerComponentView(xbe),n.registerComponentModel(iw),yv(n,"single",iw,iw.defaultOption),n.registerCoordinateSystem("single",Ebe)}var kbe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i,r){var a=jv(t);n.prototype.init.apply(this,arguments),Rz(t,a)},e.prototype.mergeOption=function(t){n.prototype.mergeOption.apply(this,arguments),Rz(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}($i);function Rz(n,e){var t=n.cellSize,i;$t(t)?i=t:i=n.cellSize=[t,t],i.length===1&&(i[1]=i[0]);var r=Xt([0,1],function(a){return zpe(e,a)&&(i[a]="auto"),i[a]!=null&&i[a]!=="auto"});Rh(n,e,{type:"box",ignoreSize:r})}const Fbe=kbe;var Obe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){var a=this.group;a.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=i.getLocaleModel();this._renderDayRect(t,s,a),this._renderLines(t,s,l,a),this._renderYearText(t,s,l,a),this._renderMonthText(t,u,l,a),this._renderWeekText(t,u,s,l,a)},e.prototype._renderDayRect=function(t,i,r){for(var a=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=i.start.time;u<=i.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,d=new Hi({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});r.add(d)}},e.prototype._renderLines=function(t,i,r,a){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var d=i.start,h=0;d.time<=i.end.time;h++){p(d.formatedDate),h===0&&(d=s.getDateInfo(i.start.y+"-"+i.start.m));var f=d.date;f.setMonth(f.getMonth()+1),d=s.getDateInfo(f)}p(s.getNextNDay(i.end.time,1).formatedDate);function p(m){o._firstDayOfMonth.push(s.getDateInfo(m)),o._firstDayPoints.push(s.dataToRect([m],!1).tl);var v=o._getLinePointsOfOneWeek(t,m,r);o._tlpoints.push(v[0]),o._blpoints.push(v[v.length-1]),u&&o._drawSplitline(v,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,r),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,r),l,a)},e.prototype._getEdgesPoints=function(t,i,r){var a=[t[0].slice(),t[t.length-1].slice()],o=r==="horizontal"?0:1;return a[0][o]=a[0][o]-i/2,a[1][o]=a[1][o]+i/2,a},e.prototype._drawSplitline=function(t,i,r){var a=new hl({z2:20,shape:{points:t},style:i});r.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,i,r){for(var a=t.coordinateSystem,o=a.getDateInfo(i),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[r==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,i){return xn(t)&&t?Fpe(t,i):$n(t)?t(i):i.nameMap},e.prototype._yearTextPositionControl=function(t,i,r,a,o){var s=i[0],l=i[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,i,r,a){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=r!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,d=(u[0][1]+u[1][1])/2,h=r==="horizontal"?0:1,f={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],d],right:[u[h][0],d]},p=i.start.y;+i.end.y>+i.start.y&&(p=p+"-"+i.end.y);var m=o.get("formatter"),v={start:i.start.y,end:i.end.y,nameMap:p},g=this._formatterLabel(m,v),_=new Xi({z2:30,style:qr(o,{text:g}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,f[l],r,l,s)),a.add(_)}},e.prototype._monthTextPositionControl=function(t,i,r,a,o){var s="left",l="top",u=t[0],c=t[1];return r==="horizontal"?(c=c+o,i&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,i&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,i,r,a){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),d=[this._tlpoints,this._blpoints];(!s||xn(s))&&(s&&(i=PA(s)||i),s=i.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,f=r==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",m=o.get("silent"),v=0;v=r.start.time&&i.times.end.time&&t.reverse(),t},n.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],i;t[0].time>t[1].time&&(i=!0,t.reverse());var r=Math.floor(t[1].time/aw)-Math.floor(t[0].time/aw)+1,a=new Date(t[0].time),o=a.getDate(),s=t[1].date.getDate();a.setDate(o+r-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-t[1].time)*u>0;)r-=u,a.setDate(l-u);var c=Math.floor((r+t[0].day+6)/7),d=i?-c+1:c-1;return i&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:c,nthWeek:d,fweek:t[0].day,lweek:t[1].day}},n.prototype._getDateByWeeksAndDay=function(e,t,i){var r=this._getRangeInfo(i);if(e>r.weeks||e===0&&tr.lweek)return null;var a=(e-1)*7-r.fweek+t,o=new Date(r.start.time);return o.setDate(+r.start.d+a),this.getDateInfo(o)},n.create=function(e,t){var i=[];return e.eachComponent("calendar",function(r){var a=new n(r);i.push(a),r.coordinateSystem=a}),e.eachSeries(function(r){r.get("coordinateSystem")==="calendar"&&(r.coordinateSystem=i[r.get("calendarIndex")||0])}),i},n.dimensions=["time","value"],n}();function Lz(n){var e=n.calendarModel,t=n.seriesModel,i=e?e.coordinateSystem:t?t.coordinateSystem:null;return i}const Gbe=zbe;function Ube(n){n.registerComponentModel(Fbe),n.registerComponentView(Bbe),n.registerCoordinateSystem("calendar",Gbe)}function Vbe(n,e){var t=n.existing;if(e.id=n.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var i=e.parentOption;i?e.parentId=i.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function Iz(n,e){var t;return ne(e,function(i){n[i]!=null&&n[i]!=="auto"&&(t=!0)}),t}function Hbe(n,e,t){var i=It({},t),r=n[e],a=t.$action||"merge";a==="merge"?r?(ui(r,i,!0),Rh(r,i,{ignoreSize:!0}),mX(t,r),R6(t,r),R6(t,r,"shape"),R6(t,r,"style"),R6(t,r,"extra"),t.clipPath=r.clipPath):n[e]=i:a==="replace"?n[e]=i:a==="remove"&&r&&(n[e]=null)}var kJ=["transition","enterFrom","leaveTo"],Wbe=kJ.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function R6(n,e,t){if(t&&(!n[t]&&e[t]&&(n[t]={}),n=n[t],e=e[t]),!(!n||!e))for(var i=t?kJ:Wbe,r=0;r=0;c--){var d=r[c],h=lo(d.id,null),f=h!=null?o.get(h):null;if(f){var p=f.parent,g=c0(p),_=p===a?{width:s,height:l}:{width:g.width,height:g.height},S={},x=O_(f,d,_,null,{hv:d.hv,boundingMode:d.bounding},S);if(!c0(f).isNew&&x){for(var A=d.transition,C={},M=0;M=0)?C[I]=D:f[I]=D}Qi(f,C,t,0)}else f.attr(S)}}},e.prototype._clear=function(){var t=this,i=this._elMap;i.each(function(r){h5(r,c0(r).option,i,t._lastGraphicModel)}),this._elMap=In()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(xa);function SC(n){var e=Mn(Dz,n)?Dz[n]:SE(n),t=new e({});return c0(t).type=n,t}function Nz(n,e,t,i){var r=SC(t);return e.add(r),i.set(n,r),c0(r).id=n,c0(r).isNew=!0,r}function h5(n,e,t,i){var r=n&&n.parent;r&&(n.type==="group"&&n.traverse(function(a){h5(a,e,t,i)}),e7(n,e,i),t.removeKey(c0(n).id))}function kz(n,e,t,i){n.isGroup||ne([["cursor",M0.prototype.cursor],["zlevel",i||0],["z",t||0],["z2",0]],function(r){var a=r[0];Mn(e,a)?n[a]=ai(e[a],r[1]):n[a]==null&&(n[a]=r[1])}),ne(Li(e),function(r){if(r.indexOf("on")===0){var a=e[r];n[r]=$n(a)?a:null}}),Mn(e,"draggable")&&(n.draggable=e.draggable),e.name!=null&&(n.name=e.name),e.id!=null&&(n.id=e.id)}function Xbe(n){return n=It({},n),ne(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(vX),function(e){delete n[e]}),n}function Ybe(n,e,t){var i=ni(n).eventData;!n.silent&&!n.ignore&&!i&&(i=ni(n).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:n.name}),i&&(i.info=t.info)}function Kbe(n){n.registerComponentModel($be),n.registerComponentView(qbe),n.registerPreprocessor(function(e){var t=e.graphic;$t(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Fz=["x","y","radius","angle","single"],Zbe=["cartesian2d","polar","singleAxis"];function Jbe(n){var e=n.get("coordinateSystem");return xi(Zbe,e)>=0}function lh(n){return n+"Axis"}function Qbe(n,e){var t=In(),i=[],r=In();n.eachComponent({mainType:"dataZoom",query:e},function(c){r.get(c.uid)||s(c)});var a;do a=!1,n.eachComponent("dataZoom",o);while(a);function o(c){!r.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){r.set(c.uid,!0),i.push(c),u(c)}function l(c){var d=!1;return c.eachTargetAxis(function(h,f){var p=t.get(h);p&&p[f]&&(d=!0)}),d}function u(c){c.eachTargetAxis(function(d,h){(t.get(d)||t.set(d,[]))[h]=!0})}return i}function FJ(n){var e=n.ecModel,t={infoList:[],infoMap:In()};return n.eachTargetAxis(function(i,r){var a=e.getComponent(lh(i),r);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(a)}}}),t}var ow=function(){function n(){this.indexList=[],this.indexMap=[]}return n.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},n}(),exe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,i,r){var a=Oz(t);this.settledOption=a,this.mergeDefaultAndTheme(t,r),this._doInit(a)},e.prototype.mergeOption=function(t){var i=Oz(t);ui(this.option,t,!0),ui(this.settledOption,i,!0),this._doInit(i)},e.prototype._doInit=function(t){var i=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var r=this.settledOption;ne([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=r[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),i=this._targetAxisInfoMap=In(),r=this._fillSpecifiedTargetAxis(i);r?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var i=!1;return ne(Fz,function(r){var a=this.getReferringComponents(lh(r),mhe);if(a.specified){i=!0;var o=new ow;ne(a.models,function(s){o.add(s.componentIndex)}),t.set(r,o)}},this),i},e.prototype._fillAutoTargetAxisByOrient=function(t,i){var r=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=r.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=r.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===i}});l(s,"single")}function l(u,c){var d=u[0];if(d){var h=new ow;if(h.add(d.componentIndex),t.set(c,h),a=!1,c==="x"||c==="y"){var f=d.getReferringComponents("grid",Xa).models[0];f&&ne(u,function(p){d.componentIndex!==p.componentIndex&&f===p.getReferringComponents("grid",Xa).models[0]&&h.add(p.componentIndex)})}}}a&&ne(Fz,function(u){if(a){var c=r.findComponents({mainType:lh(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var d=new ow;d.add(c[0].componentIndex),t.set(u,d),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(i){!t&&(t=i)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var i=this._rangePropMode,r=this.get("rangeMode");ne([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":r?i[o]=r[o]:s&&(i[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(i,r){t==null&&(t=this.ecModel.getComponent(lh(i),r))},this),t},e.prototype.eachTargetAxis=function(t,i){this._targetAxisInfoMap.each(function(r,a){ne(r.indexList,function(o){t.call(i,a,o)})})},e.prototype.getAxisProxy=function(t,i){var r=this.getAxisModel(t,i);if(r)return r.__dzAxisProxy},e.prototype.getAxisModel=function(t,i){var r=this._targetAxisInfoMap.get(t);if(r&&r.indexMap[i])return this.ecModel.getComponent(lh(t),i)},e.prototype.setRawRange=function(t){var i=this.option,r=this.settledOption;ne([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(i[a[0]]=r[a[0]]=t[a[0]],i[a[1]]=r[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var i=this.option;ne(["start","startValue","end","endValue"],function(r){i[r]=t[r]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,i){if(t==null&&i==null){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataValueWindow()}else return this.getAxisProxy(t,i).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var i,r=this._targetAxisInfoMap.keys(),a=0;ao[1];if(S&&!x&&!A)return!0;S&&(v=!0),x&&(p=!0),A&&(m=!0)}return v&&p&&m})}else b2(c,function(f){if(a==="empty")l.setData(u=u.map(f,function(m){return s(m)?m:NaN}));else{var p={};p[f]=o,u.selectRange(p)}});b2(c,function(f){u.setApproximateExtent(o,f)})}});function s(l){return l>=o[0]&&l<=o[1]}},n.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,i=this._dataExtent;b2(["min","max"],function(r){var a=t.get(r+"Span"),o=t.get(r+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=pr(i[0]+o,i,[0,100],!0):a!=null&&(o=pr(a,[0,100],i,!0)-i[0]),e[r+"Span"]=a,e[r+"ValueSpan"]=o},this)},n.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,i=this._valueWindow;if(t){var r=j$(i,[0,500]);r=Math.min(r,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(r)),t[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(r)),a.freeze()}},n}();function sxe(n,e,t){var i=[1/0,-1/0];b2(t,function(o){Pme(i,o.getData(),e)});var r=n.getAxisModel(),a=KY(r.axis.scale,r,i).calculate();return[a.min,a.max]}const lxe=oxe;var uxe={getTargetSeries:function(n){function e(r){n.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=n.getComponent(lh(o),s);r(o,s,l,a)})})}e(function(r,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(r,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new lxe(r,a,s,n),t.push(o.__dzAxisProxy))});var i=In();return ne(t,function(r){ne(r.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(n,e){n.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(i,r){t.getAxisProxy(i,r).reset(t)}),t.eachTargetAxis(function(i,r){t.getAxisProxy(i,r).filterData(t,e)})}),n.eachComponent("dataZoom",function(t){var i=t.findRepresentativeAxisProxy();if(i){var r=i.getDataPercentWindow(),a=i.getDataValueWindow();t.setCalculatedRange({start:r[0],end:r[1],startValue:a[0],endValue:a[1]})}})}};const cxe=uxe;function dxe(n){n.registerAction("dataZoom",function(e,t){var i=Qbe(t,e);ne(i,function(r){r.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var zz=!1;function jP(n){zz||(zz=!0,n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,cxe),dxe(n),n.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function hxe(n){n.registerComponentModel(nxe),n.registerComponentView(axe),jP(n)}var f0=function(){function n(){}return n}(),OJ={};function x2(n,e){OJ[n]=e}function BJ(n){return OJ[n]}var fxe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){n.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;ne(this.option.feature,function(i,r){var a=BJ(r);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),ui(i,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}($i);const pxe=fxe;function vxe(n,e,t){var i=e.getBoxLayoutParams(),r=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},o=uo(i,a,r);Ap(e.get("orient"),n,e.get("itemGap"),o.width,o.height),O_(n,i,a,r)}function zJ(n,e){var t=Wv(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),n=new Hi({shape:{x:n.x-t[3],y:n.y-t[0],width:n.width+t[1]+t[3],height:n.height+t[0]+t[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1}),n}var mxe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,i,r,a){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),d=[];ne(u,function(p,m){d.push(m)}),new Xc(this._featureNames||[],d).add(h).update(h).remove(si(h,null)).execute(),this._featureNames=d;function h(p,m){var v=d[p],g=d[m],_=u[v],S=new Xr(_,t,t.ecModel),x;if(a&&a.newTitle!=null&&a.featureName===v&&(_.title=a.newTitle),v&&!g){if(gxe(v))x={onclick:S.option.onclick,featureName:v};else{var A=BJ(v);if(!A)return;x=new A}c[v]=x}else if(x=c[g],!x)return;x.uid=Hv("toolbox-feature"),x.model=S,x.ecModel=i,x.api=r;var C=x instanceof f0;if(!v&&g){C&&x.dispose&&x.dispose(i,r);return}if(!S.get("show")||C&&x.unusable){C&&x.remove&&x.remove(i,r);return}f(S,x,v),S.setIconStatus=function(M,I){var D=this.option,E=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[M]=I,E[M]&&(I==="emphasis"?$c:qc)(E[M])},x instanceof f0&&x.render&&x.render(S,i,r,a)}function f(p,m,v){var g=p.getModel("iconStyle"),_=p.getModel(["emphasis","iconStyle"]),S=m instanceof f0&&m.getIcons?m.getIcons():p.get("icon"),x=p.get("title")||{},A,C;xn(S)?(A={},A[v]=S):A=S,xn(x)?(C={},C[v]=x):C=x;var M=p.iconPaths={};ne(A,function(I,D){var E=b3(I,{},{x:-s/2,y:-s/2,width:s,height:s});E.setStyle(g.getItemStyle());var P=E.ensureState("emphasis");P.style=_.getItemStyle();var F=new Xi({style:{text:C[D],align:_.get("textAlign"),borderRadius:_.get("textBorderRadius"),padding:_.get("textPadding"),fill:null,font:bE({fontStyle:_.get("textFontStyle"),fontFamily:_.get("textFontFamily"),fontSize:_.get("textFontSize"),fontWeight:_.get("textFontWeight")},i)},ignore:!0});E.setTextContent(F),Qp({el:E,componentModel:t,itemName:D,formatterParamsExtra:{title:C[D]}}),E.__title=C[D],E.on("mouseover",function(){var V=_.getItemStyle(),G=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";F.setStyle({fill:_.get("textFill")||V.fill||V.stroke||"#000",backgroundColor:_.get("textBackgroundColor")}),E.setTextConfig({position:_.get("textPosition")||G}),F.ignore=!t.get("showTitle"),r.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",D])!=="emphasis"&&r.leaveEmphasis(this),F.hide()}),(p.get(["iconStatus",D])==="emphasis"?$c:qc)(E),o.add(E),E.on("click",An(m.onclick,m,i,r,D)),M[D]=E})}vxe(o,t,r),o.add(zJ(o.getBoundingRect(),t)),l||o.eachChild(function(p){var m=p.__title,v=p.ensureState("emphasis"),g=v.textConfig||(v.textConfig={}),_=p.getTextContent(),S=_&&_.ensureState("emphasis");if(S&&!$n(S)&&m){var x=S.style||(S.style={}),A=g3(m,Xi.makeFont(x)),C=p.x+o.x,M=p.y+o.y+s,I=!1;M+A.height>r.getHeight()&&(g.position="top",I=!0);var D=I?-5-A.height:s+10;C+A.width/2>r.getWidth()?(g.position=["100%",D],x.align="right"):C-A.width/2<0&&(g.position=[0,D],x.align="left")}})},e.prototype.updateView=function(t,i,r,a){ne(this._features,function(o){o instanceof f0&&o.updateView&&o.updateView(o.model,i,r,a)})},e.prototype.remove=function(t,i){ne(this._features,function(r){r instanceof f0&&r.remove&&r.remove(t,i)}),this.group.removeAll()},e.prototype.dispose=function(t,i){ne(this._features,function(r){r instanceof f0&&r.dispose&&r.dispose(t,i)})},e.type="toolbox",e}(xa);function gxe(n){return n.indexOf("my")===0}const yxe=mxe;var _xe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){var r=this.model,a=r.get("name")||t.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":r.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:r.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:r.get("connectedBackgroundColor"),excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")}),u=qi.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var d=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(d)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),f=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];f&&(p=window.atob(p));var m=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var v=p.length,g=new Uint8Array(v);v--;)g[v]=p.charCodeAt(v);var _=new Blob([g]);window.navigator.msSaveOrOpenBlob(_,m)}else{var S=document.createElement("iframe");document.body.appendChild(S);var x=S.contentWindow,A=x.document;A.open("image/svg+xml","replace"),A.write(p),A.close(),x.focus(),A.execCommand("SaveAs",!0,m),document.body.removeChild(S)}}else{var C=r.get("lang"),M='',I=window.open();I.document.write(M),I.document.title=a}},e.getDefaultOption=function(t){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},e}(f0);const Sxe=_xe;var Gz="__ec_magicType_stack__",bxe=[["line","bar"],["stack"]],xxe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,i=t.get("icon"),r={};return ne(t.get("type"),function(a){i[a]&&(r[a]=i[a])}),r},e.getDefaultOption=function(t){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},e.prototype.onclick=function(t,i,r){var a=this.model,o=a.get(["seriesIndex",r]);if(Uz[r]){var s={series:[]},l=function(d){var h=d.subType,f=d.id,p=Uz[r](h,f,d,a);p&&(qn(p,d.option),s.series.push(p));var m=d.coordinateSystem;if(m&&m.type==="cartesian2d"&&(r==="line"||r==="bar")){var v=m.getAxesByScale("ordinal")[0];if(v){var g=v.dim,_=g+"Axis",S=d.getReferringComponents(_,Xa).models[0],x=S.componentIndex;s[_]=s[_]||[];for(var A=0;A<=x;A++)s[_][x]=s[_][x]||{};s[_][x].boundaryGap=r==="bar"}}};ne(bxe,function(d){xi(d,r)>=0&&ne(d,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(r,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=r;r==="stack"&&(u=ui({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",r])!=="emphasis"&&(c="tiled")),i.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(f0),Uz={line:function(n,e,t,i){if(n==="bar")return ui({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(n,e,t,i){if(n==="line")return ui({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(n,e,t,i){var r=t.get("stack")===Gz;if(n==="line"||n==="bar")return i.setIconStatus("stack",r?"normal":"emphasis"),ui({id:e,stack:r?"":Gz},i.get(["option","stack"])||{},!0)}};nc({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(n,e){e.mergeOption(n.newOption)});const wxe=xxe;var t7=new Array(60).join("-"),bv=" ";function Txe(n){var e={},t=[],i=[];return n.eachRawSeries(function(r){var a=r.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(r)}else t.push(r)}else t.push(r)}),{seriesGroupByCategoryAxis:e,other:t,meta:i}}function Axe(n){var e=[];return ne(n,function(t,i){var r=t.categoryAxis,a=t.valueAxis,o=a.dim,s=[" "].concat(Xt(t.series,function(f){return f.name})),l=[r.model.getCategories()];ne(t.series,function(f){var p=f.getRawData();l.push(f.getRawData().mapArray(p.mapDimension(o),function(m){return m}))});for(var u=[s.join(bv)],c=0;c=0)return!0}var bC=new RegExp("["+bv+"]+","g");function Pxe(n){for(var e=n.split(/\n+/g),t=w8(e.shift()).split(bC),i=[],r=Xt(t,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=t[a];if(o[r])break}if(a<0){var s=n.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(s){var l=s.getPercentRange();t[0][r]={dataZoomId:r,start:l[0],end:l[1]}}}}),t.push(e)}function Fxe(n){var e=$P(n),t=e[e.length-1];e.length>1&&e.pop();var i={};return GJ(t,function(r,a){for(var o=e.length-1;o>=0;o--)if(r=e[o][a],r){i[a]=r;break}}),i}function Oxe(n){UJ(n).snapshots=null}function Bxe(n){return $P(n).length}function $P(n){var e=UJ(n);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var zxe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){Oxe(t),i.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return i},e}(f0);nc({type:"restore",event:"restore",update:"prepareAndUpdate"},function(n,e){e.resetOption("recreate")});const Gxe=zxe;var Uxe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Vxe=function(){function n(e,t,i){var r=this;this._targetInfoList=[];var a=Vz(t,e);ne(Hxe,function(o,s){(!i||!i.include||xi(i.include,s)>=0)&&o(a,r._targetInfoList)})}return n.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(i,r,a){if((i.coordRanges||(i.coordRanges=[])).push(r),!i.coordRange){i.coordRange=r;var o=sw[i.brushType](0,a,r);i.__rangeOffset={offset:$z[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},n.prototype.matchOutputRanges=function(e,t,i){ne(e,function(r){var a=this.findTargetInfo(r,t);a&&a!==!0&&ne(a.coordSyses,function(o){var s=sw[r.brushType](1,o,r.range,!0);i(r,s.values,o,t)})},this)},n.prototype.setInputRanges=function(e,t){ne(e,function(i){var r=this.findTargetInfo(i,t);if(i.range=i.range||[],r&&r!==!0){i.panelId=r.panelId;var a=sw[i.brushType](0,r.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?$z[i.brushType](a.values,o.offset,Wxe(a.xyMinMax,o.xyMinMax)):a.values}},this)},n.prototype.makePanelOpts=function(e,t){return Xt(this._targetInfoList,function(i){var r=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t?t(i):null,clipPath:XZ(r),isTargetByCursor:KZ(r,e,i.coordSysModel),getLinearBrushOtherExtent:YZ(r)}})},n.prototype.controlSeries=function(e,t,i){var r=this.findTargetInfo(e,i);return r===!0||r&&xi(r.coordSyses,t.coordinateSystem)>=0},n.prototype.findTargetInfo=function(e,t){for(var i=this._targetInfoList,r=Vz(t,e),a=0;an[1]&&n.reverse(),n}function Vz(n,e){return Hg(n,e,{includeMainTypes:Uxe})}var Hxe={grid:function(n,e){var t=n.xAxisModels,i=n.yAxisModels,r=n.gridModels,a=In(),o={},s={};!t&&!i&&!r||(ne(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),ne(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),ne(r,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];ne(u.getCartesians(),function(d,h){(xi(t,d.getAxis("x").model)>=0||xi(i,d.getAxis("y").model)>=0)&&c.push(d)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:Wz.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(n,e){ne(n.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:Wz.geo})})}},Hz=[function(n,e){var t=n.xAxisModel,i=n.yAxisModel,r=n.gridModel;return!r&&t&&(r=t.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(n,e){var t=n.geoModel;return t&&t===e.geoModel}],Wz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var n=this.coordSys,e=n.getBoundingRect().clone();return e.applyTransform(Tp(n)),e}},sw={lineX:si(jz,0),lineY:si(jz,1),rect:function(n,e,t,i){var r=n?e.pointToData([t[0][0],t[1][0]],i):e.dataToPoint([t[0][0],t[1][0]],i),a=n?e.pointToData([t[0][1],t[1][1]],i):e.dataToPoint([t[0][1],t[1][1]],i),o=[xC([r[0],a[0]]),xC([r[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(n,e,t,i){var r=[[1/0,-1/0],[1/0,-1/0]],a=Xt(t,function(o){var s=n?e.pointToData(o,i):e.dataToPoint(o,i);return r[0][0]=Math.min(r[0][0],s[0]),r[1][0]=Math.min(r[1][0],s[1]),r[0][1]=Math.max(r[0][1],s[0]),r[1][1]=Math.max(r[1][1],s[1]),s});return{values:a,xyMinMax:r}}};function jz(n,e,t,i){var r=t.getAxis(["x","y"][n]),a=xC(Xt([0,1],function(s){return e?r.coordToData(r.toLocalCoord(i[s]),!0):r.toGlobalCoord(r.dataToCoord(i[s]))})),o=[];return o[n]=a,o[1-n]=[NaN,NaN],{values:a,xyMinMax:o}}var $z={lineX:si(qz,0),lineY:si(qz,1),rect:function(n,e,t){return[[n[0][0]-t[0]*e[0][0],n[0][1]-t[0]*e[0][1]],[n[1][0]-t[1]*e[1][0],n[1][1]-t[1]*e[1][1]]]},polygon:function(n,e,t){return Xt(n,function(i,r){return[i[0]-t[0]*e[r][0],i[1]-t[1]*e[r][1]]})}};function qz(n,e,t,i){return[e[0]-i[n]*t[0],e[1]-i[n]*t[1]]}function Wxe(n,e){var t=Xz(n),i=Xz(e),r=[t[0]/i[0],t[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function Xz(n){return n?[n[0][1]-n[0][0],n[1][1]-n[1][0]]:[NaN,NaN]}const qP=Vxe;var wC=ne,jxe=dhe("toolbox-dataZoom_"),$xe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,i,r,a){this._brushController||(this._brushController=new AP(r.getZr()),this._brushController.on("brush",An(this._onBrush,this)).mount()),Yxe(t,i,this,a,r),Xxe(t,i)},e.prototype.onclick=function(t,i,r){qxe[r].call(this)},e.prototype.remove=function(t,i){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,i){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var i=t.areas;if(!t.isEnd||!i.length)return;var r={},a=this.ecModel;this._brushController.updateCovers([]);var o=new qP(XP(this.model),a,{include:["grid"]});o.matchOutputRanges(i,a,function(u,c,d){if(d.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",d,c[0]),s("y",d,c[1])):s({lineX:"x",lineY:"y"}[h],d,c)}}),kxe(a,r),this._dispatchZoomAction(r);function s(u,c,d){var h=c.getAxis(u),f=h.model,p=l(u,f,a),m=p.findRepresentativeAxisProxy(f).getMinMaxSpan();(m.minValueSpan!=null||m.maxValueSpan!=null)&&(d=o1(0,d.slice(),h.scale.getExtent(),0,m.minValueSpan,m.maxValueSpan)),p&&(r[p.id]={dataZoomId:p.id,startValue:d[0],endValue:d[1]})}function l(u,c,d){var h;return d.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var p=f.getAxisModel(u,c.componentIndex);p&&(h=f)}),h}},e.prototype._dispatchZoomAction=function(t){var i=[];wC(t,function(r,a){i.push(Zn(r))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},e.getDefaultOption=function(t){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},e}(f0),qxe={zoom:function(){var n=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:n})},back:function(){this._dispatchZoomAction(Fxe(this.ecModel))}};function XP(n){var e={xAxisIndex:n.get("xAxisIndex",!0),yAxisIndex:n.get("yAxisIndex",!0),xAxisId:n.get("xAxisId",!0),yAxisId:n.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Xxe(n,e){n.setIconStatus("back",Bxe(e)>1?"emphasis":"normal")}function Yxe(n,e,t,i,r){var a=t._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),t._isZoomActive=a,n.setIconStatus("zoom",a?"emphasis":"normal");var o=new qP(XP(n),e,{include:["grid"]}),s=o.makePanelOpts(r,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:n.getModel("brushStyle").getItemStyle()}:!1)}jpe("dataZoom",function(n){var e=n.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var i=e.getModel(t),r=[],a=XP(i),o=Hg(n,a);wC(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),wC(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var d=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:jxe+u+d};h[c]=d,r.push(h)}return r});const Kxe=$xe;function Zxe(n){n.registerComponentModel(pxe),n.registerComponentView(yxe),x2("saveAsImage",Sxe),x2("magicType",wxe),x2("dataView",Nxe),x2("dataZoom",Kxe),x2("restore",Gxe),Ci(hxe)}var Jxe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}($i);const Qxe=Jxe;function VJ(n){var e=n.get("confine");return e!=null?!!e:n.get("renderMode")==="richText"}function HJ(n){if(qi.domSupported){for(var e=document.documentElement.style,t=0,i=n.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,d=o+r,h=d*Math.abs(Math.cos(c))+d*Math.abs(Math.sin(c)),f=Math.round(((h-Math.SQRT2*r)/2+Math.SQRT2*r-(h-d)/2)*100)/100;s+=";"+a+":-"+f+"px";var p=e+" solid "+r+"px;",m=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+i+";"];return'
'}function owe(n,e){var t="cubic-bezier(0.23,1,0.32,1)",i=" "+n/2+"s "+t,r="opacity"+i+",visibility"+i;return e||(i=" "+n+"s "+t,r+=qi.transformSupported?","+YP+i:",left"+i+",top"+i),nwe+":"+r}function Yz(n,e,t){var i=n.toFixed(0)+"px",r=e.toFixed(0)+"px";if(!qi.transformSupported)return t?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var a=qi.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+r+(a?",0":"")+")";return t?"top:0;left:0;"+YP+":"+o+";":[["top",0],["left",0],[WJ,o]]}function swe(n){var e=[],t=n.get("fontSize"),i=n.getTextColor();i&&e.push("color:"+i),e.push("font:"+n.getFont());var r=ai(n.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+r+"px");var a=n.get("textShadowColor"),o=n.get("textShadowBlur")||0,s=n.get("textShadowOffsetX")||0,l=n.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),ne(["decoration","align"],function(u){var c=n.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function lwe(n,e,t){var i=[],r=n.get("transitionDuration"),a=n.get("backgroundColor"),o=n.get("shadowBlur"),s=n.get("shadowColor"),l=n.get("shadowOffsetX"),u=n.get("shadowOffsetY"),c=n.getModel("textStyle"),d=YX(n,"html"),h=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+h),e&&r&&i.push(owe(r,t)),a&&i.push("background-color:"+a),ne(["width","color","radius"],function(f){var p="border-"+f,m=fX(p),v=n.get(m);v!=null&&i.push(p+":"+v+(f==="color"?"":"px"))}),i.push(swe(c)),d!=null&&i.push("padding:"+Wv(d).join("px ")+"px"),i.join(";")+";"}function Kz(n,e,t,i,r){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&Nce(n,o,t,i,r)}else{n[0]=i,n[1]=r;var s=a&&a.getViewportRootOffset();s&&(n[0]+=s.offsetLeft,n[1]+=s.offsetTop)}n[2]=n[0]/e.getWidth(),n[3]=n[1]/e.getHeight()}var uwe=function(){function n(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,qi.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),a=t.appendTo,o=a&&(xn(a)?document.querySelector(a):hv(a)?a:$n(a)&&a(e.getDom()));Kz(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(i),this._api=e,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=r.handler,c=r.painter.getViewportRoot();o0(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return n.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),i=twe(t,"position"),r=t.style;r.position!=="absolute"&&i!=="absolute"&&(r.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},n.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,r=i.style,a=this._styleCoord;i.innerHTML?r.cssText=iwe+lwe(e,!this._firstShow,this._longHide)+Yz(a[0],a[1],!0)+("border-color:"+Gp(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},n.prototype.setContent=function(e,t,i,r,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(xn(a)&&i.get("trigger")==="item"&&!VJ(i)&&(s=awe(i,r,a)),xn(e))o.innerHTML=e+s;else if(e){o.innerHTML="",$t(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):r==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,i=this._ecModel,r=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!r.isDisposed()&&o.manuallyShowTip(t,i,r,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,i,r,a){if(!(a.from===this.uid||qi.node||!r.getDom())){var o=Qz(a,r);this._ticket="";var s=a.dataByCoordSys,l=ywe(a,i,r);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=fwe;c.x=a.x,c.y=a.y,c.update(),ni(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,i,r,a))return;var d=PJ(a,i),h=d.point[0],f=d.point[1];h!=null&&f!=null&&this._tryShow({offsetX:h,offsetY:f,target:d.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(r.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:r.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(t,i,r,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Qz(a,r))},e.prototype._manuallyAxisShowTip=function(t,i,r,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var c=u.getData(),d=Ym([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(d.get("trigger")==="axis")return r.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,i){var r=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(r){var s=ni(r);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;sp(r,function(c){if(ni(c).dataIndex!=null)return l=c,!0;if(ni(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(t,l,i):u?this._showComponentItemTooltip(t,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(t,i){var r=t.get("showDelay");i=An(i,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(i,r):i()},e.prototype._showAxisTooltip=function(t,i){var r=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Ym([i.tooltipOption],a),l=this._renderMode,u=[],c=So("section",{blocks:[],noHeader:!0}),d=[],h=new Wb;ne(t,function(_){ne(_.dataByAxis,function(S){var x=r.getComponent(S.axisDim+"Axis",S.axisIndex),A=S.value;if(!(!x||A==null)){var C=AJ(A,x.axis,r,S.seriesDataIndices,S.valueLabelOpt),M=So("section",{header:C,noHeader:!K0(C),sortBlocks:!0,blocks:[]});c.blocks.push(M),ne(S.seriesDataIndices,function(I){var D=r.getSeriesByIndex(I.seriesIndex),E=I.dataIndexInside,P=D.getDataParams(E);if(!(P.dataIndex<0)){P.axisDim=S.axisDim,P.axisIndex=S.axisIndex,P.axisType=S.axisType,P.axisId=S.axisId,P.axisValue=XE(x.axis,{value:A}),P.axisValueLabel=C,P.marker=h.makeTooltipMarker("item",Gp(P.color),l);var F=Ok(D.formatTooltip(E,!0,null)),V=F.frag;if(V){var G=Ym([D],a).get("valueFormatter");M.blocks.push(G?It({valueFormatter:G},V):V)}F.text&&d.push(F.text),u.push(P)}})}})}),c.blocks.reverse(),d.reverse();var f=i.position,p=s.get("order"),m=Hk(c,h,l,p,r.get("useUTC"),s.get("textStyle"));m&&d.unshift(m);var v=l==="richText"?` `:"
",g=d.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,f,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],f,null,h)})},e.prototype._showSeriesItemTooltip=function(t,i,r){var a=this._ecModel,o=ni(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,d=o.dataType,h=u.getData(d),f=this._renderMode,p=t.positionDefault,m=Ym([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),v=m.get("trigger");if(!(v!=null&&v!=="item")){var g=u.getDataParams(c,d),_=new Wb;g.marker=_.makeTooltipMarker("item",Gp(g.color),f);var S=Ok(u.formatTooltip(c,!1,d)),x=m.get("order"),A=m.get("valueFormatter"),C=S.frag,M=C?Hk(A?It({valueFormatter:A},C):C,_,f,x,a.get("useUTC"),m.get("textStyle")):S.text,I="item_"+u.name+"_"+c;this._showOrMove(m,function(){this._showTooltipContent(m,M,g,I,t.offsetX,t.offsetY,t.position,t.target,_)}),r({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,i,r){var a=this._renderMode==="html",o=ni(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(xn(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=Zn(l),l.content=os(l.content));var d=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&d.push(h),d.push({formatter:l.content});var f=t.positionDefault,p=Ym(d,this._tooltipModel,f?{position:f}:null),m=p.get("content"),v=Math.random()+"",g=new Wb;this._showOrMove(p,function(){var _=Zn(p.get("formatterParams")||{});this._showTooltipContent(p,m,_,v,t.offsetX,t.offsetY,t.position,i,g)}),r({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,i,r,a,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var d=this._tooltipContent;d.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var f=i,p=this._getNearestPoint([o,s],r,t.get("trigger"),t.get("borderColor")),m=p.color;if(h)if(xn(h)){var v=t.ecModel.get("useUTC"),g=$t(r)?r[0]:r,_=g&&g.axisType&&g.axisType.indexOf("time")>=0;f=h,_&&(f=I_(g.axisValue,f,v)),f=pX(f,r,!0)}else if($n(h)){var S=An(function(x,A){x===this._ticket&&(d.setContent(A,c,t,m,l),this._updatePosition(t,l,o,s,d,r,u))},this);this._ticket=a,f=h(r,a,S)}else f=h;d.setContent(f,c,t,m,l),d.show(t,m),this._updatePosition(t,l,o,s,d,r,u)}},e.prototype._getNearestPoint=function(t,i,r,a){if(r==="axis"||$t(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!$t(i))return{color:a||i.color||i.borderColor}},e.prototype._updatePosition=function(t,i,r,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||t.get("position");var d=o.getSize(),h=t.get("align"),f=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),$n(i)&&(i=i([r,a],s,o.el,p,{viewSize:[u,c],contentSize:d.slice()})),$t(i))r=_n(i[0],u),a=_n(i[1],c);else if(Kn(i)){var m=i;m.width=d[0],m.height=d[1];var v=uo(m,{width:u,height:c});r=v.x,a=v.y,h=null,f=null}else if(xn(i)&&l){var g=gwe(i,p,d,t.get("borderWidth"));r=g[0],a=g[1]}else{var g=vwe(r,a,o,u,c,h?null:20,f?null:20);r=g[0],a=g[1]}if(h&&(r-=eG(h)?d[0]/2:h==="right"?d[0]:0),f&&(a-=eG(f)?d[1]/2:f==="bottom"?d[1]:0),VJ(t)){var g=mwe(r,a,o,u,c);r=g[0],a=g[1]}o.moveTo(r,a)},e.prototype._updateContentNotChangedOnAxis=function(t,i){var r=this._lastDataByCoordSys,a=this._cbParamsList,o=!!r&&r.length===t.length;return o&&ne(r,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},d=c.dataByAxis||[];o=o&&u.length===d.length,o&&ne(u,function(h,f){var p=d[f]||{},m=h.seriesDataIndices||[],v=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&m.length===v.length,o&&ne(m,function(g,_){var S=v[_];o=o&&g.seriesIndex===S.seriesIndex&&g.dataIndex===S.dataIndex}),a&&ne(h.seriesDataIndices,function(g){var _=g.seriesIndex,S=i[_],x=a[_];S&&x&&x.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=i,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,i){qi.node||!i.getDom()||(k9(this,"_updatePosition"),this._tooltipContent.dispose(),yC("itemTooltip",i))},e.type="tooltip",e}(xa);function Ym(n,e,t){var i=e.ecModel,r;t?(r=new Xr(t,i,i),r=new Xr(e.option,r,i)):r=e;for(var a=n.length-1;a>=0;a--){var o=n[a];o&&(o instanceof Xr&&(o=o.get("tooltip",!0)),xn(o)&&(o={formatter:o}),o&&(r=new Xr(o,r,i)))}return r}function Qz(n,e){return n.dispatchAction||An(e.dispatchAction,e)}function vwe(n,e,t,i,r,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(n+l+a+2>i?n-=l+a:n+=a),o!=null&&(e+u+o>r?e-=u+o:e+=o),[n,e]}function mwe(n,e,t,i,r){var a=t.getSize(),o=a[0],s=a[1];return n=Math.min(n+o,i)-o,e=Math.min(e+s,r)-s,n=Math.max(n,0),e=Math.max(e,0),[n,e]}function gwe(n,e,t,i){var r=t[0],a=t[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,c=e.height;switch(n){case"inside":s=e.x+u/2-r/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-r/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-r/2,l=e.y+c+o;break;case"left":s=e.x-r-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function eG(n){return n==="center"||n==="middle"}function ywe(n,e,t){var i=oE(n).queryOptionMap,r=i.keys()[0];if(!(!r||r==="series")){var a=y3(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=ni(u).tooltipConfig;if(c&&c.name===n.name)return l=u,!0}),l)return{componentMainType:r,componentIndex:o.componentIndex,el:l}}}}const _we=pwe;function Swe(n){Ci(N3),n.registerComponentModel(Qxe),n.registerComponentView(_we),n.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ba),n.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ba)}var bwe=["rect","polygon","keep","clear"];function xwe(n,e){var t=Ar(n?n.brush:[]);if(t.length){var i=[];ne(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(i=i.concat(u))});var r=n&&n.toolbox;$t(r)&&(r=r[0]),r||(r={feature:{}},n.toolbox=[r]);var a=r.feature||(r.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),wwe(s),e&&!s.length&&s.push.apply(s,bwe)}}function wwe(n){var e={};ne(n,function(t){e[t]=1}),n.length=0,ne(e,function(t,i){n.push(i)})}var tG=ne;function nG(n){if(n){for(var e in n)if(n.hasOwnProperty(e))return!0}}function TC(n,e,t){var i={};return tG(e,function(a){var o=i[a]=r();tG(n[a],function(s,l){if(Wo.isValidType(l)){var u={type:l,visual:s};t&&t(u,a),o[l]=new Wo(u),l==="opacity"&&(u=Zn(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Wo(u))}})}),i;function r(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function $J(n,e,t){var i;ne(t,function(r){e.hasOwnProperty(r)&&nG(e[r])&&(i=!0)}),i&&ne(t,function(r){e.hasOwnProperty(r)&&nG(e[r])?n[r]=Zn(e[r]):delete n[r]})}function Twe(n,e,t,i,r,a){var o={};ne(n,function(d){var h=Wo.prepareVisualTypes(e[d]);o[d]=h});var s;function l(d){return OE(t,s,d)}function u(d,h){aY(t,s,d,h)}a==null?t.each(c):t.each([a],c);function c(d,h){s=a==null?d:h;var f=t.getRawDataItem(s);if(!(f&&f.visualMap===!1))for(var p=i.call(r,d),m=e[p],v=o[p],g=0,_=v.length;g<_;g++){var S=v[g];m[S]&&m[S].applyVisual(d,l,u)}}}function Awe(n,e,t,i){var r={};return ne(n,function(a){var o=Wo.prepareVisualTypes(e[a]);r[a]=o}),{progress:function(o,s){var l;i!=null&&(l=s.getDimensionIndex(i));function u(A){return OE(s,d,A)}function c(A,C){aY(s,d,A,C)}for(var d,h=s.getStore();(d=o.next())!=null;){var f=s.getRawDataItem(d);if(!(f&&f.visualMap===!1))for(var p=i!=null?h.get(l,d):d,m=t(p),v=e[m],g=r[m],_=0,S=g.length;_e[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&sG(e)}};function sG(n){return new gi(n[0][0],n[1][0],n[0][1]-n[0][0],n[1][1]-n[1][0])}var Iwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.ecModel=t,this.api=i,this.model,(this._brushController=new AP(i.getZr())).on("brush",An(this._onBrush,this)).mount()},e.prototype.render=function(t,i,r,a){this.model=t,this._updateController(t,i,r,a)},e.prototype.updateTransform=function(t,i,r,a){qJ(i),this._updateController(t,i,r,a)},e.prototype.updateVisual=function(t,i,r,a){this.updateTransform(t,i,r,a)},e.prototype.updateView=function(t,i,r,a){this._updateController(t,i,r,a)},e.prototype._updateController=function(t,i,r,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(r)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var i=this.model.id,r=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:Zn(r),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:Zn(r),$from:i})},e.type="brush",e}(xa);const Dwe=Iwe;var Nwe="#ddd",kwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,i){var r=this.option;!i&&$J(r,t,["inBrush","outOfBrush"]);var a=r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:Nwe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=Xt(t,function(i){return lG(this.option,i)},this))},e.prototype.setBrushOption=function(t){this.brushOption=lG(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}($i);function lG(n,e){return ui({brushType:n.brushType,brushMode:n.brushMode,transformable:n.transformable,brushStyle:new Xr(n.brushStyle).getItemStyle(),removeOnClick:n.removeOnClick,z:n.z},e,!0)}const Fwe=kwe;var Owe=["rect","polygon","lineX","lineY","keep","clear"],Bwe=function(n){ot(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,i,r){var a,o,s;i.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,ne(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(t,i,r){this.render(t,i,r)},e.prototype.getIcons=function(){var t=this.model,i=t.get("icon",!0),r={};return ne(t.get("type",!0),function(a){i[a]&&(r[a]=i[a])}),r},e.prototype.onclick=function(t,i,r){var a=this._brushType,o=this._brushMode;r==="clear"?(i.dispatchAction({type:"axisAreaSelect",intervals:[]}),i.dispatchAction({type:"brush",command:"clear",areas:[]})):i.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:r==="keep"?a:a===r?!1:r,brushMode:r==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var i={show:!0,type:Owe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return i},e}(f0);const zwe=Bwe;function Gwe(n){n.registerComponentView(Dwe),n.registerComponentModel(Fwe),n.registerPreprocessor(xwe),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,Mwe),n.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(i){i.setAreas(e.areas)})}),n.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ba),n.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ba),x2("brush",zwe)}var Uwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}($i),Vwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,r){if(this.group.removeAll(),!!t.get("show")){var a=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=ai(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Xi({style:qr(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),d=c.getBoundingRect(),h=t.get("subtext"),f=new Xi({style:qr(s,{text:h,fill:s.getTextColor(),y:d.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),m=t.get("sublink"),v=t.get("triggerEvent",!0);c.silent=!p&&!v,f.silent=!m&&!v,p&&c.on("click",function(){J5(p,"_"+t.get("target"))}),m&&f.on("click",function(){J5(m,"_"+t.get("subtarget"))}),ni(c).eventData=ni(f).eventData=v?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(c),h&&a.add(f);var g=a.getBoundingRect(),_=t.getBoxLayoutParams();_.width=g.width,_.height=g.height;var S=uo(_,{width:r.getWidth(),height:r.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),a.x=S.x,a.y=S.y,a.markRedraw();var x={align:l,verticalAlign:u};c.setStyle(x),f.setStyle(x),g=a.getBoundingRect();var A=S.margin,C=t.getItemStyle(["color","opacity"]);C.fill=t.get("backgroundColor");var M=new Hi({shape:{x:g.x-A[3],y:g.y-A[0],width:g.width+A[1]+A[3],height:g.height+A[0]+A[2],r:t.get("borderRadius")},style:C,subPixelOptimize:!0,silent:!0});a.add(M)}},e.type="title",e}(xa);function Hwe(n){n.registerComponentModel(Uwe),n.registerComponentView(Vwe)}var Wwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,i,r){this.mergeDefaultAndTheme(t,r),this._initData()},e.prototype.mergeOption=function(t){n.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var i=this._data.count();this.option.loop?t=(t%i+i)%i:(t>=i&&(t=i-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,i=t.data||[],r=t.axisType,a=this._names=[],o;r==="category"?(o=[],ne(i,function(u,c){var d=lo(zv(u),""),h;Kn(u)?(h=Zn(u),h.value=c):h=c,o.push(h),a.push(d)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[r]||"number",l=this._data=new Rs([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}($i);const uG=Wwe;var XJ=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Uh(uG.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(uG);Za(XJ,z_.prototype);const jwe=XJ;var $we=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(xa);const qwe=$we;var Xwe=function(n){ot(e,n);function e(t,i,r,a){var o=n.call(this,t,i,r)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(ou);const Ywe=Xwe;var uw=Math.PI,cG=Gi(),Kwe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.api=i},e.prototype.render=function(t,i,r){if(this.model=t,this.api=r,this.ecModel=i,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,r),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return So("nameValue",{noName:!0,value:c})},ne(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,t)},this),this._renderAxisLabel(a,s,l,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,i){var r=t.get(["label","position"]),a=t.get("orient"),o=Jwe(t,i),s;r==null||r==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:uw/2},d=a==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),f=h.get("show",!0),p=f?h.get("itemSize"):0,m=f?h.get("itemGap"):0,v=p+m,g=t.get(["label","rotate"])||0;g=g*uw/180;var _,S,x,A=h.get("position",!0),C=f&&h.get("showPlayBtn",!0),M=f&&h.get("showPrevBtn",!0),I=f&&h.get("showNextBtn",!0),D=0,E=d;A==="left"||A==="bottom"?(C&&(_=[0,0],D+=v),M&&(S=[D,0],D+=v),I&&(x=[E-p,0],E-=v)):(C&&(_=[E-p,0],E-=v),M&&(S=[0,0],D+=v),I&&(x=[E-p,0],E-=v));var P=[D,E];return t.get("inverse")&&P.reverse(),{viewRect:o,mainLength:d,orient:a,rotation:c[a],labelRotation:g,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:S,nextBtnPosition:x,axisExtent:P,controlSize:p,controlGap:m}},e.prototype._position=function(t,i){var r=this._mainGroup,a=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Dl(),l=o.x,u=o.y+o.height;Ku(s,s,[-l,-u]),Jp(s,s,-uw/2),Ku(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),d=_(r.getBoundingRect()),h=_(a.getBoundingRect()),f=[r.x,r.y],p=[a.x,a.y];p[0]=f[0]=c[0][0];var m=t.labelPosOpt;if(m==null||xn(m)){var v=m==="+"?0:1;S(f,d,c,1,v),S(p,h,c,1,1-v)}else{var v=m>=0?0:1;S(f,d,c,1,v),p[1]=f[1]+m}r.setPosition(f),a.setPosition(p),r.rotation=a.rotation=t.rotation,g(r),g(a);function g(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function _(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function S(x,A,C,M,I){x[M]+=C[M][I]-A[M][I]}},e.prototype._createAxis=function(t,i){var r=i.getData(),a=i.get("axisType"),o=Zwe(i,a);o.getTicks=function(){return r.mapArray(["value"],function(u){return{value:u}})};var s=r.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Ywe("value",o,t.axisExtent,a);return l.model=i,l},e.prototype._createGroup=function(t){var i=this[t]=new ei;return this.group.add(i),i},e.prototype._renderAxisLine=function(t,i,r,a){var o=r.getExtent();if(a.get(["lineStyle","show"])){var s=new Lo({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:It({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new Lo({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:qn({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},e.prototype._renderAxisTick=function(t,i,r,a){var o=this,s=a.getData(),l=r.scale.getTicks();this._tickSymbols=[],ne(l,function(u){var c=r.dataToCoord(u.value),d=s.getItemModel(u.value),h=d.getModel("itemStyle"),f=d.getModel(["emphasis","itemStyle"]),p=d.getModel(["progress","itemStyle"]),m={x:c,y:0,onclick:An(o._changeTimeline,o,u.value)},v=dG(d,h,i,m);v.ensureState("emphasis").style=f.getItemStyle(),v.ensureState("progress").style=p.getItemStyle(),wp(v);var g=ni(v);d.get("tooltip")?(g.dataIndex=u.value,g.dataModel=a):g.dataIndex=g.dataModel=null,o._tickSymbols.push(v)})},e.prototype._renderAxisLabel=function(t,i,r,a){var o=this,s=r.getLabelModel();if(s.get("show")){var l=a.getData(),u=r.getViewLabels();this._tickLabels=[],ne(u,function(c){var d=c.tickValue,h=l.getItemModel(d),f=h.getModel("label"),p=h.getModel(["emphasis","label"]),m=h.getModel(["progress","label"]),v=r.dataToCoord(c.tickValue),g=new Xi({x:v,y:0,rotation:t.labelRotation-t.rotation,onclick:An(o._changeTimeline,o,d),silent:!1,style:qr(f,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});g.ensureState("emphasis").style=qr(p),g.ensureState("progress").style=qr(m),i.add(g),wp(g),cG(g).dataIndex=d,o._tickLabels.push(g)})}},e.prototype._renderControl=function(t,i,r,a){var o=t.controlSize,s=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),d=a.get("inverse",!0);h(t.nextBtnPosition,"next",An(this._changeTimeline,this,d?"-":"+")),h(t.prevBtnPosition,"prev",An(this._changeTimeline,this,d?"+":"-")),h(t.playPosition,c?"stop":"play",An(this._handlePlayClick,this,!c),!0);function h(f,p,m,v){if(f){var g=nu(ai(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-g/2,g,g],S=Qwe(a,p+"Icon",_,{x:f[0],y:f[1],originX:o/2,originY:0,rotation:v?-s:0,rectHover:!0,style:l,onclick:m});S.ensureState("emphasis").style=u,i.add(S),wp(S)}}},e.prototype._renderCurrentPointer=function(t,i,r,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(d){d.draggable=!0,d.drift=An(u._handlePointerDrag,u),d.ondragend=An(u._handlePointerDragend,u),hG(d,u._progressLine,s,r,a,!0)},onUpdate:function(d){hG(d,u._progressLine,s,r,a)}};this._currentPointer=dG(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,i,r){this._clearTimer(),this._pointerChangeTimeline([r.offsetX,r.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,i){var r=this._toAxisCoord(t)[0],a=this._axis,o=x0(a.getExtent().slice());r>o[1]&&(r=o[1]),r=0&&(o[a]=+o[a].toFixed(h)),[o,d]}var cw={min:si(D6,"min"),max:si(D6,"max"),average:si(D6,"average"),median:si(D6,"median")};function X9(n,e){if(e){var t=n.getData(),i=n.coordinateSystem,r=i&&i.dimensions;if(!sTe(e)&&!$t(e.coord)&&$t(r)){var a=KJ(e,t,i,n);if(e=Zn(e),e.type&&cw[e.type]&&a.baseAxis&&a.valueAxis){var o=xi(r,a.baseAxis.dim),s=xi(r,a.valueAxis.dim),l=cw[e.type](t,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!$t(r))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)cw[u[c]]&&(u[c]=ZP(t,t.mapDimension(r[c]),u[c]));return e}}function KJ(n,e,t,i){var r={};return n.valueIndex!=null||n.valueDim!=null?(r.valueDataDim=n.valueIndex!=null?e.getDimension(n.valueIndex):n.valueDim,r.valueAxis=t.getAxis(lTe(i,r.valueDataDim)),r.baseAxis=t.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=t.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function lTe(n,e){var t=n.getData().getDimensionInfo(e);return t&&t.coordDim}function Y9(n,e){return n&&n.containData&&e.coord&&!CC(e)?n.containData(e.coord):!0}function uTe(n,e,t){return n&&n.containZone&&e.coord&&t.coord&&!CC(e)&&!CC(t)?n.containZone(e.coord,t.coord):!0}function ZJ(n,e){return n?function(t,i,r,a){var o=a<2?t.coord&&t.coord[a]:t.value;return gh(o,e[a])}:function(t,i,r,a){return gh(t.value,e[a])}}function ZP(n,e,t){if(t==="average"){var i=0,r=0;return n.each(e,function(a,o){isNaN(a)||(i+=a,r++)}),i/r}else return t==="median"?n.getMedian(e):n.getDataExtent(e)[t==="max"?1:0]}var dw=Gi(),cTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=In()},e.prototype.render=function(t,i,r){var a=this,o=this.markerGroupMap;o.each(function(s){dw(s).keep=!1}),i.eachSeries(function(s){var l=kh.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,r)}),o.each(function(s){!dw(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(t){dw(t).keep=!0},e.prototype.toggleBlurSeries=function(t,i){var r=this;ne(t,function(a){var o=kh.getMarkerModelFromSeries(a,r.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?xq(l):fE(l))})}})},e.type="marker",e}(xa);const JP=cTe;function pG(n,e,t){var i=e.coordinateSystem;n.each(function(r){var a=n.getItemModel(r),o,s=_n(a.get("x"),t.getWidth()),l=_n(a.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(n.getValues(n.dimensions,r));else if(i){var u=n.get(i.dimensions[0],r),c=n.get(i.dimensions[1],r);o=i.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),n.setItemLayout(r,o)})}var dTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,r){i.eachSeries(function(a){var o=kh.getMarkerModelFromSeries(a,"markPoint");o&&(pG(o.getData(),a,r),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,i,r,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new M3),d=hTe(o,t,i);i.setData(d),pG(i.getData(),t,a),d.each(function(h){var f=d.getItemModel(h),p=f.getShallow("symbol"),m=f.getShallow("symbolSize"),v=f.getShallow("symbolRotate"),g=f.getShallow("symbolOffset"),_=f.getShallow("symbolKeepAspect");if($n(p)||$n(m)||$n(v)||$n(g)){var S=i.getRawValue(h),x=i.getDataParams(h);$n(p)&&(p=p(S,x)),$n(m)&&(m=m(S,x)),$n(v)&&(v=v(S,x)),$n(g)&&(g=g(S,x))}var A=f.getModel("itemStyle").getItemStyle(),C=w3(l,"color");A.fill||(A.fill=C),d.setItemVisual(h,{symbol:p,symbolSize:m,symbolRotate:v,symbolOffset:g,symbolKeepAspect:_,style:A})}),c.updateData(d),this.group.add(c.group),d.eachItemGraphicEl(function(h){h.traverse(function(f){ni(f).dataModel=i})}),this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markPoint",e}(JP);function hTe(n,e,t){var i;n?i=Xt(n&&n.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return It(It({},l),{name:s,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var r=new Rs(i,t),a=Xt(t.get("data"),si(X9,e));n&&(a=dr(a,si(Y9,n)));var o=ZJ(!!n,i);return r.initData(a,null,o),r}const fTe=dTe;function pTe(n){n.registerComponentModel(oTe),n.registerComponentView(fTe),n.registerPreprocessor(function(e){KP(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var vTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,r){return new e(t,i,r)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(kh);const mTe=vTe;var N6=Gi(),gTe=function(n,e,t,i){var r=n.getData(),a;if($t(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=e.getAxis(i.yAxis!=null?"y":"x"),l=Ro(i.yAxis,i.xAxis);else{var u=KJ(i,r,e,n);s=u.valueAxis;var c=NY(r,u.valueDataDim);l=ZP(r,c,o)}var d=s.dim==="x"?0:1,h=1-d,f=Zn(i),p={coord:[]};f.type=null,f.coord=[],f.coord[h]=-1/0,p.coord[h]=1/0;var m=t.get("precision");m>=0&&Yi(l)&&(l=+l.toFixed(Math.min(m,20))),f.coord[d]=p.coord[d]=l,a=[f,p,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var v=[X9(n,a[0]),X9(n,a[1]),It({},a[2])];return v[2].type=v[2].type||null,ui(v[2],v[0]),ui(v[2],v[1]),v};function T8(n){return!isNaN(n)&&!isFinite(n)}function vG(n,e,t,i){var r=1-n,a=i.dimensions[n];return T8(e[r])&&T8(t[r])&&e[n]===t[n]&&i.getAxis(a).containData(e[n])}function yTe(n,e){if(n.type==="cartesian2d"){var t=e[0].coord,i=e[1].coord;if(t&&i&&(vG(1,t,i,n)||vG(0,t,i,n)))return!0}return Y9(n,e[0])&&Y9(n,e[1])}function hw(n,e,t,i,r){var a=i.coordinateSystem,o=n.getItemModel(e),s,l=_n(o.get("x"),r.getWidth()),u=_n(o.get("y"),r.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(n.getValues(n.dimensions,e));else{var c=a.dimensions,d=n.get(c[0],e),h=n.get(c[1],e);s=a.dataToPoint([d,h])}if(r1(a,"cartesian2d")){var f=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;T8(n.get(c[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):T8(n.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}n.setItemLayout(e,s)}var _Te=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,r){i.eachSeries(function(a){var o=kh.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=N6(o).from,u=N6(o).to;l.each(function(c){hw(l,c,!0,a,r),hw(u,c,!1,a,r)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,i,r,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new _P);this.group.add(c.group);var d=STe(o,t,i),h=d.from,f=d.to,p=d.line;N6(i).from=h,N6(i).to=f,i.setData(p);var m=i.get("symbol"),v=i.get("symbolSize"),g=i.get("symbolRotate"),_=i.get("symbolOffset");$t(m)||(m=[m,m]),$t(v)||(v=[v,v]),$t(g)||(g=[g,g]),$t(_)||(_=[_,_]),d.from.each(function(x){S(h,x,!0),S(f,x,!1)}),p.each(function(x){var A=p.getItemModel(x).getModel("lineStyle").getLineStyle();p.setItemLayout(x,[h.getItemLayout(x),f.getItemLayout(x)]),A.stroke==null&&(A.stroke=h.getItemVisual(x,"style").fill),p.setItemVisual(x,{fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:f.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(x,"symbolOffset"),toSymbolRotate:f.getItemVisual(x,"symbolRotate"),toSymbolSize:f.getItemVisual(x,"symbolSize"),toSymbol:f.getItemVisual(x,"symbol"),style:A})}),c.updateData(p),d.line.eachItemGraphicEl(function(x){ni(x).dataModel=i,x.traverse(function(A){ni(A).dataModel=i})});function S(x,A,C){var M=x.getItemModel(A);hw(x,A,C,t,a);var I=M.getModel("itemStyle").getItemStyle();I.fill==null&&(I.fill=w3(l,"color")),x.setItemVisual(A,{symbolKeepAspect:M.get("symbolKeepAspect"),symbolOffset:ai(M.get("symbolOffset",!0),_[C?0:1]),symbolRotate:ai(M.get("symbolRotate",!0),g[C?0:1]),symbolSize:ai(M.get("symbolSize"),v[C?0:1]),symbol:ai(M.get("symbol",!0),m[C?0:1]),style:I})}this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markLine",e}(JP);function STe(n,e,t){var i;n?i=Xt(n&&n.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return It(It({},c),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var r=new Rs(i,t),a=new Rs(i,t),o=new Rs([],t),s=Xt(t.get("data"),si(gTe,e,n,t));n&&(s=dr(s,si(yTe,n)));var l=ZJ(!!n,i);return r.initData(Xt(s,function(u){return u[0]}),null,l),a.initData(Xt(s,function(u){return u[1]}),null,l),o.initData(Xt(s,function(u){return u[2]})),o.hasItemOption=!0,{from:r,to:a,line:o}}const bTe=_Te;function xTe(n){n.registerComponentModel(mTe),n.registerComponentView(bTe),n.registerPreprocessor(function(e){KP(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var wTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,r){return new e(t,i,r)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(kh);const TTe=wTe;var k6=Gi(),ATe=function(n,e,t,i){var r=i[0],a=i[1];if(!(!r||!a)){var o=X9(n,r),s=X9(n,a),l=o.coord,u=s.coord;l[0]=Ro(l[0],-1/0),l[1]=Ro(l[1],-1/0),u[0]=Ro(u[0],1/0),u[1]=Ro(u[1],1/0);var c=XM([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function A8(n){return!isNaN(n)&&!isFinite(n)}function mG(n,e,t,i){var r=1-n;return A8(e[r])&&A8(t[r])}function CTe(n,e){var t=e.coord[0],i=e.coord[1],r={coord:t,x:e.x0,y:e.y0},a={coord:i,x:e.x1,y:e.y1};return r1(n,"cartesian2d")?t&&i&&(mG(1,t,i)||mG(0,t,i))?!0:uTe(n,r,a):Y9(n,r)||Y9(n,a)}function gG(n,e,t,i,r){var a=i.coordinateSystem,o=n.getItemModel(e),s,l=_n(o.get(t[0]),r.getWidth()),u=_n(o.get(t[1]),r.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var c=n.getValues(["x0","y0"],e),d=n.getValues(["x1","y1"],e),h=a.clampData(c),f=a.clampData(d),p=[];t[0]==="x0"?p[0]=h[0]>f[0]?d[0]:c[0]:p[0]=h[0]>f[0]?c[0]:d[0],t[1]==="y0"?p[1]=h[1]>f[1]?d[1]:c[1]:p[1]=h[1]>f[1]?c[1]:d[1],s=i.getMarkerPosition(p,t,!0)}else{var m=n.get(t[0],e),v=n.get(t[1],e),g=[m,v];a.clampData&&a.clampData(g,g),s=a.dataToPoint(g,!0)}if(r1(a,"cartesian2d")){var _=a.getAxis("x"),S=a.getAxis("y"),m=n.get(t[0],e),v=n.get(t[1],e);A8(m)?s[0]=_.toGlobalCoord(_.getExtent()[t[0]==="x0"?0:1]):A8(v)&&(s[1]=S.toGlobalCoord(S.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var yG=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],MTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,r){i.eachSeries(function(a){var o=kh.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Xt(yG,function(d){return gG(s,l,d,a,r)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,i,r,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new ei});this.group.add(c.group),this.markKeep(c);var d=ETe(o,t,i);i.setData(d),d.each(function(h){var f=Xt(yG,function(I){return gG(d,h,I,t,a)}),p=o.getAxis("x").scale,m=o.getAxis("y").scale,v=p.getExtent(),g=m.getExtent(),_=[p.parse(d.get("x0",h)),p.parse(d.get("x1",h))],S=[m.parse(d.get("y0",h)),m.parse(d.get("y1",h))];x0(_),x0(S);var x=!(v[0]>_[1]||v[1]<_[0]||g[0]>S[1]||g[1]=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}($i);const MC=ITe;var W1=si,EC=ne,F6=ei,DTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new F6),this.group.add(this._selectorGroup=new F6),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,i,r){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,i,r,l,s,u);var c=t.getBoxLayoutParams(),d={width:r.getWidth(),height:r.getHeight()},h=t.get("padding"),f=uo(c,d,h),p=this.layoutInner(t,o,f,a,l,u),m=uo(qn({width:p.width,height:p.height},c),d,h);this.group.x=m.x-p.x,this.group.y=m.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=zJ(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,i,r,a,o,s,l){var u=this.getContentGroup(),c=In(),d=i.get("selectedMode"),h=[];r.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),EC(i.getData(),function(f,p){var m=f.get("name");if(!this.newlineDisabled&&(m===""||m===` `)){var v=new F6;v.newline=!0,u.add(v);return}var g=r.getSeriesByName(m)[0];if(!c.get(m))if(g){var _=g.getData(),S=_.getVisual("legendLineStyle")||{},x=_.getVisual("legendIcon"),A=_.getVisual("style"),C=this._createItem(g,m,p,f,i,t,S,A,x,d,a);C.on("click",W1(_G,m,null,a,h)).on("mouseover",W1(PC,g.name,null,a,h)).on("mouseout",W1(RC,g.name,null,a,h)),r.ssr&&C.eachChild(function(M){var I=ni(M);I.seriesIndex=g.seriesIndex,I.dataIndex=p,I.ssrType="legend"}),c.set(m,!0)}else r.eachRawSeries(function(M){if(!c.get(m)&&M.legendVisualProvider){var I=M.legendVisualProvider;if(!I.containName(m))return;var D=I.indexOfName(m),E=I.getItemVisual(D,"style"),P=I.getItemVisual(D,"legendIcon"),F=Nl(E.fill);F&&F[3]===0&&(F[3]=.2,E=It(It({},E),{fill:zc(F,"rgba")}));var V=this._createItem(M,m,p,f,i,t,{},E,P,d,a);V.on("click",W1(_G,null,m,a,h)).on("mouseover",W1(PC,null,m,a,h)).on("mouseout",W1(RC,null,m,a,h)),r.ssr&&V.eachChild(function(G){var W=ni(G);W.seriesIndex=M.seriesIndex,W.dataIndex=p,W.ssrType="legend"}),c.set(m,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},e.prototype._createSelector=function(t,i,r,a,o){var s=this.getSelectorGroup();EC(t,function(u){var c=u.type,d=new Xi({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});s.add(d);var h=i.getModel("selectorLabel"),f=i.getModel(["emphasis","selectorLabel"]);$o(d,{normal:h,emphasis:f},{defaultText:u.title}),wp(d)})},e.prototype._createItem=function(t,i,r,a,o,s,l,u,c,d,h){var f=t.visualDrawType,p=o.get("itemWidth"),m=o.get("itemHeight"),v=o.isSelected(i),g=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),S=a.get("icon");c=S||c||"roundRect";var x=NTe(c,a,l,u,f,v,h),A=new F6,C=a.getModel("textStyle");if($n(t.getLegendIcon)&&(!S||S==="inherit"))A.add(t.getLegendIcon({itemWidth:p,itemHeight:m,icon:c,iconRotate:g,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:_}));else{var M=S==="inherit"&&t.getData().getVisual("symbol")?g==="inherit"?t.getData().getVisual("symbolRotate"):g:0;A.add(kTe({itemWidth:p,itemHeight:m,icon:c,iconRotate:M,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:_}))}var I=s==="left"?p+5:-5,D=s,E=o.get("formatter"),P=i;xn(E)&&E?P=E.replace("{name}",i!=null?i:""):$n(E)&&(P=E(i));var F=v?C.getTextColor():a.get("inactiveColor");A.add(new Xi({style:qr(C,{text:P,x:I,y:m/2,fill:F,align:D,verticalAlign:"middle"},{inheritColor:F})}));var V=new Hi({shape:A.getBoundingRect(),style:{fill:"transparent"}}),G=a.getModel("tooltip");return G.get("show")&&Qp({el:V,componentModel:o,itemName:i,itemTooltipOption:G.option}),A.add(V),A.eachChild(function(W){W.silent=!0}),V.silent=!d,this.getContentGroup().add(A),wp(A),A.__legendDataIndex=r,A},e.prototype.layoutInner=function(t,i,r,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ap(t.get("orient"),l,t.get("itemGap"),r.width,r.height);var c=l.getBoundingRect(),d=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Ap("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),f=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),m=t.getOrient().index,v=m===0?"width":"height",g=m===0?"height":"width",_=m===0?"y":"x";s==="end"?f[m]+=c[v]+p:d[m]+=h[v]+p,f[1-m]+=c[g]/2-h[g]/2,u.x=f[0],u.y=f[1],l.x=d[0],l.y=d[1];var S={x:0,y:0};return S[v]=c[v]+p+h[v],S[g]=Math.max(c[g],h[g]),S[_]=Math.min(0,h[_]+f[1-m]),S}else return l.x=d[0],l.y=d[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(xa);function NTe(n,e,t,i,r,a,o){function s(v,g){v.lineWidth==="auto"&&(v.lineWidth=g.lineWidth>0?2:0),EC(v,function(_,S){v[S]==="inherit"&&(v[S]=g[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=n.lastIndexOf("empty",0)===0?"fill":"stroke",d=l.getShallow("decal");u.decal=!d||d==="inherit"?i.decal:vv(d,o),u.fill==="inherit"&&(u.fill=i[r]),u.stroke==="inherit"&&(u.stroke=i[c]),u.opacity==="inherit"&&(u.opacity=(r==="fill"?i:t).opacity),s(u,i);var h=e.getModel("lineStyle"),f=h.getLineStyle();if(s(f,t),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),f.stroke==="auto"&&(f.stroke=i.fill),!a){var p=e.get("inactiveBorderWidth"),m=u[c];u.lineWidth=p==="auto"?i.lineWidth>0&&m?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),f.stroke=h.get("inactiveColor"),f.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:f}}function kTe(n){var e=n.icon||"roundRect",t=Ya(e,0,0,n.itemWidth,n.itemHeight,n.itemStyle.fill,n.symbolKeepAspect);return t.setStyle(n.itemStyle),t.rotation=(n.iconRotate||0)*Math.PI/180,t.setOrigin([n.itemWidth/2,n.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function _G(n,e,t,i){RC(n,e,t,i),t.dispatchAction({type:"legendToggleSelect",name:n!=null?n:e}),PC(n,e,t,i)}function JJ(n){for(var e=n.getZr().storage.getDisplayList(),t,i=0,r=e.length;ir[o],v=[-f.x,-f.y];i||(v[a]=c[u]);var g=[0,0],_=[-p.x,-p.y],S=ai(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(m){var x=t.get("pageButtonPosition",!0);x==="end"?_[a]+=r[o]-p[o]:g[a]+=p[o]+S}_[1-a]+=f[s]/2-p[s]/2,c.setPosition(v),d.setPosition(g),h.setPosition(_);var A={x:0,y:0};if(A[o]=m?r[o]:f[o],A[s]=Math.max(f[s],p[s]),A[l]=Math.min(0,p[l]+_[1-a]),d.__rectSize=r[o],m){var C={x:0,y:0};C[o]=Math.max(r[o]-p[o]-S,0),C[s]=A[s],d.setClipPath(new Hi({shape:C})),d.__rectSize=C[o]}else h.eachChild(function(I){I.attr({invisible:!0,silent:!0})});var M=this._getPageInfo(t);return M.pageIndex!=null&&Qi(c,{x:M.contentPosition[0],y:M.contentPosition[1]},m?t:null),this._updatePageInfoView(t,M),A},e.prototype._pageGo=function(t,i,r){var a=this._getPageInfo(i)[t];a!=null&&r.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},e.prototype._updatePageInfoView=function(t,i){var r=this._controllerGroup;ne(["pagePrev","pageNext"],function(c){var d=c+"DataIndex",h=i[d]!=null,f=r.childOfName(c);f&&(f.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),f.cursor=h?"pointer":"default")});var a=r.childOfName("pageText"),o=t.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",xn(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var i=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=fw[o],l=pw[o],u=this._findTargetItemIndex(i),c=r.children(),d=c[u],h=c.length,f=h?1:0,p={contentPosition:[r.x,r.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!d)return p;var m=x(d);p.contentPosition[o]=-m.s;for(var v=u+1,g=m,_=m,S=null;v<=h;++v)S=x(c[v]),(!S&&_.e>g.s+a||S&&!A(S,g.s))&&(_.i>g.i?g=_:g=S,g&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=g.i),++p.pageCount)),_=S;for(var v=u-1,g=m,_=m,S=null;v>=-1;--v)S=x(c[v]),(!S||!A(_,S.s))&&g.i<_.i&&(_=g,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=S;return p;function x(C){if(C){var M=C.getBoundingRect(),I=M[l]+C[l];return{s:I,e:I+M[s],i:C.__legendDataIndex}}}function A(C,M){return C.e>=M&&C.s<=M+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var i,r=this.getContentGroup(),a;return r.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===t&&(i=s)}),i!=null?i:a},e.type="legend.scroll",e}(QJ);const UTe=GTe;function VTe(n){n.registerAction("legendScroll","legendscroll",function(e,t){var i=e.scrollDataIndex;i!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(r){r.setScrollDataIndex(i)})})}function HTe(n){Ci(eQ),n.registerComponentModel(zTe),n.registerComponentView(UTe),VTe(n)}function WTe(n){Ci(eQ),Ci(HTe)}var jTe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Uh(q9.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(q9);const $Te=jTe;var QP=Gi();function qTe(n,e,t){QP(n).coordSysRecordMap.each(function(i){var r=i.dataZoomInfoMap.get(e.uid);r&&(r.getRange=t)})}function XTe(n,e){for(var t=QP(n).coordSysRecordMap,i=t.keys(),r=0;ri[t+e]&&(e=s),r=r&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}function QTe(n){n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,function(e,t){var i=QP(t),r=i.coordSysRecordMap||(i.coordSysRecordMap=In());r.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=FJ(a);ne(o.infoList,function(s){var l=s.model.uid,u=r.get(l)||r.set(l,YTe(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=In());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),r.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){tQ(r,a);return}var c=JTe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),Yv(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var eAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,i,r){if(n.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),qTe(r,t,{pan:An(vw.pan,this),zoom:An(vw.zoom,this),scrollMove:An(vw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),n.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){XTe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(WP),vw={zoom:function(n,e,t,i){var r=this.range,a=r.slice(),o=n.axisModels[0];if(o){var s=mw[e](null,[i.originX,i.originY],o,t,n),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(o1(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,r[0]!==a[0]||r[1]!==a[1])return a}},pan:wG(function(n,e,t,i,r,a){var o=mw[i]([a.oldX,a.oldY],[a.newX,a.newY],e,r,t);return o.signal*(n[1]-n[0])*o.pixel/o.pixelLength}),scrollMove:wG(function(n,e,t,i,r,a){var o=mw[i]([0,0],[a.scrollDelta,a.scrollDelta],e,r,t);return o.signal*(n[1]-n[0])*a.scrollDelta})};function wG(n){return function(e,t,i,r){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=n(o,s,e,t,i,r);if(o1(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var mw={grid:function(n,e,t,i,r){var a=t.axis,o={},s=r.model.coordinateSystem.getRect();return n=n||[0,0],a.dim==="x"?(o.pixel=e[0]-n[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-n[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(n,e,t,i,r){var a=t.axis,o={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return n=n?s.pointToCoord(n):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-n[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-n[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(n,e,t,i,r){var a=t.axis,o=r.model.coordinateSystem.getRect(),s={};return n=n||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-n[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-n[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};const tAe=eAe;function nQ(n){jP(n),n.registerComponentModel($Te),n.registerComponentView(tAe),QTe(n)}var nAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Uh(q9.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(q9);const iAe=nAe;var Jm=Hi,TG=7,rAe=1,gw=30,aAe=7,Qm="horizontal",AG="vertical",oAe=5,sAe=["line","bar","candlestick","scatter"],lAe={easing:"cubicOut",duration:100,delay:0},uAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,i){this.api=i,this._onBrush=An(this._onBrush,this),this._onBrushEnd=An(this._onBrushEnd,this)},e.prototype.render=function(t,i,r,a){if(n.prototype.render.apply(this,arguments),Yv(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),n.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){k9(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new ei;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(i),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,i=this.api,r=t.get("brushSelect"),a=r?aAe:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===Qm?{right:s.width-o.x-o.width,top:s.height-gw-TG-a,width:o.width,height:gw}:{right:TG,top:o.y,width:gw,height:o.height},u=jv(t.option);ne(["right","top","width","height"],function(d){u[d]==="ph"&&(u[d]=l[d])});var c=uo(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===AG&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,i=this._location,r=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(r===Qm&&!o?{scaleY:l?1:-1,scaleX:1}:r===Qm&&o?{scaleY:l?1:-1,scaleX:-1}:r===AG&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=i.x-u.x,t.y=i.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,i=this._size,r=this._displayables.sliderGroup,a=t.get("brushSelect");r.add(new Jm({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Jm({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:An(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),r.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var i=this._size,r=this._shadowSize||[],a=t.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==r[0]||i[1]!==r[1]){var d=o.getDataExtent(l),h=(d[1]-d[0])*.3;d=[d[0]-h,d[1]+h];var f=[0,i[1]],p=[0,i[0]],m=[[i[0],0],[0,0]],v=[],g=p[1]/(o.count()-1),_=0,S=Math.round(o.count()/i[0]),x;o.each([l],function(D,E){if(S>0&&E%S){_+=g;return}var P=D==null||isNaN(D)||D==="",F=P?0:pr(D,d,f,!0);P&&!x&&E?(m.push([m[m.length-1][0],0]),v.push([v[v.length-1][0],0])):!P&&x&&(m.push([_,0]),v.push([_,0])),m.push([_,F]),v.push([_,F]),_+=g,x=P}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=v}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var A=this.dataZoomModel;function C(D){var E=A.getModel(D?"selectedDataBackground":"dataBackground"),P=new ei,F=new ul({shape:{points:u},segmentIgnoreThreshold:1,style:E.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),V=new hl({shape:{points:c},segmentIgnoreThreshold:1,style:E.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(F),P.add(V),P}for(var M=0;M<3;M++){var I=C(M===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,i=t.get("showDataShadow");if(i!==!1){var r,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();ne(l,function(u){if(!r&&!(i!==!0&&xi(sAe,u.get("type"))<0)){var c=a.getComponent(lh(o),s).axis,d=cAe(o),h,f=u.coordinateSystem;d!=null&&f.getOtherAxis&&(h=f.getOtherAxis(c).inverse),d=u.getData().mapDimension(d),r={thisAxis:c,series:u,thisDim:o,otherDim:d,otherAxisInverse:h}}},this)},this),r}},e.prototype._renderHandle=function(){var t=this.group,i=this._displayables,r=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,d=l.get("brushSelect"),h=i.filler=new Jm({silent:d,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Jm({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:rAe,fill:"rgba(0,0,0,0)"}})),ne([0,1],function(S){var x=l.get("handleIcon");!t8[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var A=Ya(x,-1,0,2,2,null,!0);A.attr({cursor:CG(this._orient),draggable:!0,drift:An(this._onDragMove,this,S),ondragend:An(this._onDragEnd,this),onmouseover:An(this._showDataInfo,this,!0),onmouseout:An(this._showDataInfo,this,!1),z2:5});var C=A.getBoundingRect(),M=l.get("handleSize");this._handleHeight=_n(M,this._size[1]),this._handleWidth=C.width/C.height*this._handleHeight,A.setStyle(l.getModel("handleStyle").getItemStyle()),A.style.strokeNoScale=!0,A.rectHover=!0,A.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),wp(A);var I=l.get("handleColor");I!=null&&(A.style.fill=I),o.add(r[S]=A);var D=l.getModel("textStyle"),E=l.get("handleLabel")||{},P=E.show||!1;t.add(a[S]=new Xi({silent:!0,invisible:!P,style:qr(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var f=h;if(d){var p=_n(l.get("moveHandleSize"),s[1]),m=i.moveHandle=new Hi({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),v=p*.8,g=i.moveHandleIcon=Ya(l.get("moveHandleIcon"),-v/2,-v/2,v,v,"#fff",!0);g.silent=!0,g.y=s[1]+p/2-.5,m.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(p,10));f=i.moveZone=new Hi({invisible:!0,shape:{y:s[1]-_,height:p+_}}),f.on("mouseover",function(){u.enterEmphasis(m)}).on("mouseout",function(){u.leaveEmphasis(m)}),o.add(m),o.add(g),o.add(f)}f.attr({draggable:!0,cursor:CG(this._orient),drift:An(this._onDragMove,this,"all"),ondragstart:An(this._showDataInfo,this,!0),ondragend:An(this._onDragEnd,this),onmouseover:An(this._showDataInfo,this,!0),onmouseout:An(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[pr(t[0],[0,100],i,!0),pr(t[1],[0,100],i,!0)]},e.prototype._updateInterval=function(t,i){var r=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=r.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];o1(i,a,o,r.get("zoomLock")?"all":t,s.minSpan!=null?pr(s.minSpan,l,o,!0):null,s.maxSpan!=null?pr(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=x0([pr(a[0],o,l,!0),pr(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var i=this._displayables,r=this._handleEnds,a=x0(r.slice()),o=this._size;ne([0,1],function(f){var p=i.handles[f],m=this._handleHeight;p.attr({scaleX:m/2,scaleY:m/2,x:r[f]+(f?-1:1),y:o[1]/2-m/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;ci[0]||r[1]<0||r[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",r[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var i=t.offsetX,r=t.offsetY;this._brushStart=new fi(i,r),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var r=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(r.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=x0([pr(r.x,o,s,!0),pr(r.x+r.width,o,s,!0)]),this._handleEnds=[r.x,r.x+r.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Wc(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,i){var r=this._displayables,a=this.dataZoomModel,o=r.brushRect;o||(o=r.brushRect=new Jm({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),r.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,i),c=l.transformCoordToLocal(s.x,s.y),d=this._size;u[0]=Math.max(Math.min(d[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:d[1]})},e.prototype._dispatchZoomAction=function(t){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?lAe:null,start:i[0],end:i[1]})},e.prototype._findCoordRect=function(){var t,i=FJ(this.dataZoomModel).infoList;if(!t&&i.length){var r=i[0].model.coordinateSystem;t=r.getRect&&r.getRect()}if(!t){var a=this.api.getWidth(),o=this.api.getHeight();t={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(WP);function cAe(n){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[n]}function CG(n){return n==="vertical"?"ns-resize":"ew-resize"}const dAe=uAe;function iQ(n){n.registerComponentModel(iAe),n.registerComponentView(dAe),jP(n)}function hAe(n){Ci(nQ),Ci(iQ)}var fAe={get:function(n,e,t){var i=Zn((pAe[n]||{})[e]);return t&&$t(i)?i[i.length-1]:i}},pAe={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const rQ=fAe;var MG=Wo.mapVisual,vAe=Wo.eachVisual,mAe=$t,EG=ne,gAe=x0,yAe=pr,_Ae=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,i,r){this.mergeDefaultAndTheme(t,r)},e.prototype.optionUpdated=function(t,i){var r=this.option;!i&&$J(r,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var i=this.stateList;t=An(t,this),this.controllerVisuals=TC(this.option.controller,i,t),this.targetVisuals=TC(this.option.target,i,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,i=[];return t==null||t==="all"?this.ecModel.eachSeries(function(r,a){i.push(a)}):i=Ar(t),i},e.prototype.eachTargetSeries=function(t,i){ne(this.getTargetSeriesIndices(),function(r){var a=this.ecModel.getSeriesByIndex(r);a&&t.call(i,a)},this)},e.prototype.isTargetSeries=function(t){var i=!1;return this.eachTargetSeries(function(r){r===t&&(i=!0)}),i},e.prototype.formatValueText=function(t,i,r){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;r=r||["<",">"],$t(t)&&(t=t.slice(),u=!0);var c=i?t:u?[d(t[0]),d(t[1])]:d(t);if(xn(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if($n(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?r[0]+" "+c[1]:t[1]===s[1]?r[1]+" "+c[0]:c[0]+" - "+c[1];return c;function d(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,i=gAe([t.min,t.max]);this._dataExtent=i},e.prototype.getDataDimensionIndex=function(t){var i=this.option.dimension;if(i!=null)return t.getDimensionIndex(i);for(var r=t.dimensions,a=r.length-1;a>=0;a--){var o=r[a],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,i=this.option,r={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),o=i.controller||(i.controller={});ui(a,r),ui(o,r);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(d){mAe(i.color)&&!d.inRange&&(d.inRange={color:i.color.slice().reverse()}),d.inRange=d.inRange||{color:t.get("gradientColor")}}function u(d,h,f){var p=d[h],m=d[f];p&&!m&&(m=d[f]={},EG(p,function(v,g){if(Wo.isValidType(g)){var _=rQ.get(g,"inactive",s);_!=null&&(m[g]=_,g==="color"&&!m.hasOwnProperty("opacity")&&!m.hasOwnProperty("colorAlpha")&&(m.opacity=[0,0]))}}))}function c(d){var h=(d.inRange||{}).symbol||(d.outOfRange||{}).symbol,f=(d.inRange||{}).symbolSize||(d.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),m=this.getItemSymbol(),v=m||"roundRect";EG(this.stateList,function(g){var _=this.itemSize,S=d[g];S||(S=d[g]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&&Zn(h)||(s?v:[v])),S.symbolSize==null&&(S.symbolSize=f&&Zn(f)||(s?_[0]:[_[0],_[0]])),S.symbol=MG(S.symbol,function(C){return C==="none"?v:C});var x=S.symbolSize;if(x!=null){var A=-1/0;vAe(x,function(C){C>A&&(A=C)}),S.symbolSize=MG(x,function(C){return yAe(C,[0,A],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}($i);const C8=_Ae;var PG=[20,140],SAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,i){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){n.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=PG[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=PG[1])},e.prototype._resetRange=function(){var t=this.getExtent(),i=this.option.range;!i||i.auto?(t.auto=1,this.option.range=t):$t(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],t[0]),i[1]=Math.min(i[1],t[1]))},e.prototype.completeVisualOption=function(){n.prototype.completeVisualOption.apply(this,arguments),ne(this.stateList,function(t){var i=this.option.controller[t].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),i=x0((this.get("range")||[]).slice());return i[0]>t[1]&&(i[0]=t[1]),i[1]>t[1]&&(i[1]=t[1]),i[0]=r[1]||t<=i[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[];return this.eachTargetSeries(function(r){var a=[],o=r.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&a.push(l)},this),i.push({seriesId:r.id,dataIndex:a})},this),i},e.prototype.getVisualMeta=function(t){var i=RG(this,"outOfRange",this.getExtent()),r=RG(this,"inRange",this.option.range.slice()),a=[];function o(f,p){a.push({value:f,color:t(f,p)})}for(var s=0,l=0,u=r.length,c=i.length;lt[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:s/r})}return a.push({color:this.getControllerVisual(t[1],"color",i),offset:1}),a},e.prototype._createBarPoints=function(t,i){var r=this.visualMapModel.itemSize;return[[r[0]-i[0],t[0]],[r[0],t[0]],[r[0],t[1]],[r[0]-i[1],t[1]]]},e.prototype._createBarGroup=function(t){var i=this._orient,r=this.visualMapModel.get("inverse");return new ei(i==="horizontal"&&!r?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&r?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!r?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,i){if(this._useHandle){var r=this._shapes,a=this.visualMapModel,o=r.handleThumbs,s=r.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",r.mainGroup);wAe([0,1],function(d){var h=o[d];h.setStyle("fill",i.handlesColor[d]),h.y=t[d];var f=Tu(t[d],[0,l[1]],u,!0),p=this.getControllerVisual(f,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var m=eu(r.handleLabelPoints[d],Tp(h,this.group));if(this._orient==="horizontal"){var v=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;m[1]+=v}s[d].setStyle({x:m[0],y:m[1],text:a.formatValueText(this._dataInterval[d]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",r.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,i,r,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,d=c.indicator;if(d){d.attr("invisible",!1);var h={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),m=Tu(t,s,u,!0),v=l[0]-p/2,g={x:d.x,y:d.y};d.y=m,d.x=v;var _=eu(c.indicatorLabelPoint,Tp(d,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),A=this._orient,C=A==="horizontal";S.setStyle({text:(r||"")+o.formatValueText(i),verticalAlign:C?x:"middle",align:C?"center":x});var M={x:v,y:m,style:{fill:f}},I={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};d.x=g.x,d.y=g.y,d.animateTo(M,D),S.animateTo(I,D)}else d.attr(M),S.attr(I);this._firstShowIndicator=!1;var E=this._shapes.handleLabels;if(E)for(var P=0;Po[1]&&(d[1]=1/0),i&&(d[0]===-1/0?this._showIndicator(c,d[1],"< ",l):d[1]===1/0?this._showIndicator(c,d[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,f=[];(i||NG(r))&&(f=this._hoverLinkDataIndices=r.findTargetDataIndices(d));var p=phe(h,f);this._dispatchHighDown("downplay",f5(p[0],r)),this._dispatchHighDown("highlight",f5(p[1],r))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var i;if(sp(t.target,function(l){var u=ni(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var r=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(r)){var o=r.getData(i.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),i.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var r=0;r=0&&(a.dimension=o,i.push(a))}}),n.getData().setVisual("visualMeta",i)}}];function IAe(n,e,t,i){for(var r=e.targetVisuals[i],a=Wo.prepareVisualTypes(r),o={color:w3(n.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),n.registerAction(PAe,RAe),ne(LAe,function(e){n.registerVisual(n.PRIORITY.VISUAL.COMPONENT,e)}),n.registerPreprocessor(DAe))}function lQ(n){n.registerComponentModel(bAe),n.registerComponentView(EAe),sQ(n)}var NAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,i){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],kAe[this._mode].call(this,this._pieceList),this._resetSelected(t,i);var a=this.option.categories;this.resetVisual(function(o,s){r==="categories"?(o.mappingMethod="category",o.categories=Zn(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Xt(this._pieceList,function(l){return l=Zn(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,i={},r=Wo.listVisualTypes(),a=this.isCategory();ne(t.pieces,function(s){ne(r,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),ne(i,function(s,l){var u=!1;ne(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&ne(this.stateList,function(c){(t[c]||(t[c]={}))[l]=rQ.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}n.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,i){var r=this.option,a=this._pieceList,o=(i?r:t).selected||{};if(r.selected=o,ne(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),r.selectedMode==="single"){var s=!1;ne(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Zn(t)},e.prototype.getValueState=function(t){var i=Wo.findPieceIndex(t,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[],r=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Wo.findPieceIndex(l,r);c===t&&o.push(u)},this),i.push({seriesId:a.id,dataIndex:o})},this),i},e.prototype.getRepresentValue=function(t){var i;if(this.isCategory())i=t.value;else if(t.value!=null)i=t.value;else{var r=t.interval||[];i=r[0]===-1/0&&r[1]===1/0?0:(r[0]+r[1])/2}return i},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var i=[],r=["",""],a=this;function o(c,d){var h=a.getRepresentValue({interval:c});d||(d=a.getValueState(h));var f=t(h,d);c[0]===-1/0?r[0]=f:c[1]===1/0?r[1]=f:i.push({value:c[0],color:f},{value:c[1],color:f})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return ne(s,function(c){var d=c.interval;d&&(d[0]>u&&o([u,d[0]],"outOfRange"),o(d.slice()),u=d[1])},this),{stops:i,outerColors:r}},e.type="visualMap.piecewise",e.defaultOption=Uh(C8.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(C8),kAe={splitNumber:function(n){var e=this.option,t=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var a=(i[1]-i[0])/r;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&n.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o","≥"][i[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,r)},this)}};function BG(n,e){var t=n.inverse;(n.orient==="vertical"?!t:t)&&e.reverse()}const FAe=NAe;var OAe=function(n){ot(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var i=this.visualMapModel,r=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,c=this._getViewData(),d=c.endsText,h=Ro(i.get("showLabel",!0),!d),f=!i.get("selectedMode");d&&this._renderEndsText(t,d[0],u,h,l),ne(c.viewPieceList,function(p){var m=p.piece,v=new ei;v.onclick=An(this._onItemClick,this,m),this._enableHoverLink(v,p.indexInModelPieceList);var g=i.getRepresentValue(m);if(this._createItemSymbol(v,g,[0,0,u[0],u[1]],f),h){var _=this.visualMapModel.getValueState(g);v.add(new Xi({style:{x:l==="right"?-r:u[0]+r,y:u[1]/2,text:m.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:_==="outOfRange"?.5:1},silent:f}))}t.add(v)},this),d&&this._renderEndsText(t,d[1],u,h,l),Ap(i.get("orient"),t,i.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,i){var r=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=r.visualMapModel;s.option.hoverLink&&r.api.dispatchAction({type:o,batch:f5(s.findTargetDataIndices(i),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,i=t.option;if(i.orient==="vertical")return oQ(t,this.api,t.itemSize);var r=i.align;return(!r||r==="auto")&&(r="left"),r},e.prototype._renderEndsText=function(t,i,r,a,o){if(i){var s=new ei,l=this.visualMapModel.textStyleModel;s.add(new Xi({style:qr(l,{x:a?o==="right"?r[0]:0:r[0]/2,y:r[1]/2,verticalAlign:"middle",align:a?o:"center",text:i})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,i=Xt(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),r=t.get("text"),a=t.get("orient"),o=t.get("inverse");return(a==="horizontal"?o:!o)?i.reverse():r&&(r=r.slice().reverse()),{viewPieceList:i,endsText:r}},e.prototype._createItemSymbol=function(t,i,r,a){var o=Ya(this.getControllerVisual(i,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(i,"color"));o.silent=a,t.add(o)},e.prototype._onItemClick=function(t){var i=this.visualMapModel,r=i.option,a=r.selectedMode;if(a){var o=Zn(r.selected),s=i.getSelectedMapKey(t);a==="single"||a===!0?(o[s]=!0,ne(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(aQ);const BAe=OAe;function uQ(n){n.registerComponentModel(FAe),n.registerComponentView(BAe),sQ(n)}function zAe(n){Ci(lQ),Ci(uQ)}var GAe={label:{enabled:!0},decal:{show:!1}},zG=Gi(),UAe={};function VAe(n,e){var t=n.getModel("aria");if(!t.get("enabled"))return;var i=Zn(GAe);ui(i.label,n.getLocaleModel().get("aria"),!1),ui(t.option,i,!1),r(),a();function r(){var u=t.getModel("decal"),c=u.get("show");if(c){var d=In();n.eachSeries(function(h){if(!h.isColorBySeries()){var f=d.get(h.type);f||(f={},d.set(h.type,f)),zG(h).scope=f}}),n.eachRawSeries(function(h){if(n.isSeriesFiltered(h))return;if($n(h.enableAriaDecal)){h.enableAriaDecal();return}var f=h.getData();if(h.isColorBySeries()){var _=IA(h.ecModel,h.name,UAe,n.getSeriesCount()),S=f.getVisual("decal");f.setVisual("decal",x(S,_))}else{var p=h.getRawData(),m={},v=zG(h).scope;f.each(function(A){var C=f.getRawIndex(A);m[C]=A});var g=p.count();p.each(function(A){var C=m[A],M=p.getName(A)||A+"",I=IA(h.ecModel,M,v,g),D=f.getItemVisual(C,"decal");f.setItemVisual(C,"decal",x(D,I))})}function x(A,C){var M=A?It(It({},C),A):C;return M.dirty=!0,M}})}}function a(){var u=e.getZr().dom;if(u){var c=n.getLocaleModel().get("aria"),d=t.getModel("label");if(d.option=qn(d.option,c),!!d.get("enabled")){if(u.setAttribute("role","img"),d.get("description")){u.setAttribute("aria-label",d.get("description"));return}var h=n.getSeriesCount(),f=d.get(["data","maxCount"])||10,p=d.get(["series","maxCount"])||10,m=Math.min(h,p),v;if(!(h<1)){var g=s();if(g){var _=d.get(["general","withTitle"]);v=o(_,{title:g})}else v=d.get(["general","withoutTitle"]);var S=[],x=h>1?d.get(["series","multiple","prefix"]):d.get(["series","single","prefix"]);v+=o(x,{seriesCount:h}),n.eachSeries(function(I,D){if(D1?d.get(["series","multiple",F]):d.get(["series","single",F]),E=o(E,{seriesId:I.seriesIndex,seriesName:I.get("name"),seriesType:l(I.subType)});var V=I.getData();if(V.count()>f){var G=d.get(["data","partialData"]);E+=o(G,{displayCnt:f})}else E+=d.get(["data","allData"]);for(var W=d.get(["data","separator","middle"]),Y=d.get(["data","separator","end"]),Q=d.get(["data","excludeDimensionId"]),K=[],ae=0;ae":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},jAe=function(){function n(e){var t=this._condVal=xn(e)?new RegExp(e):wce(e)?e:null;if(t==null){var i="";ur(i)}}return n.prototype.evaluate=function(e){var t=typeof e;return xn(t)?this._condVal.test(e):Yi(t)?this._condVal.test(e+""):!1},n}(),$Ae=function(){function n(){}return n.prototype.evaluate=function(){return this.value},n}(),qAe=function(){function n(){}return n.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&i.push(r),r=[V,G]}function c(V,G,W,Y){D2(V,W)&&D2(G,Y)||r.push(V,G,W,Y,W,Y)}function d(V,G,W,Y,Q,K){var ae=Math.abs(G-V),ie=Math.tan(ae/4)*4/3,he=GI:P2&&i.push(r),i}function IC(n,e,t,i,r,a,o,s,l,u){if(D2(n,t)&&D2(e,i)&&D2(r,o)&&D2(a,s)){l.push(o,s);return}var c=2/u,d=c*c,h=o-n,f=s-e,p=Math.sqrt(h*h+f*f);h/=p,f/=p;var m=t-n,v=i-e,g=r-o,_=a-s,S=m*m+v*v,x=g*g+_*_;if(S=0&&I=0){l.push(o,s);return}var D=[],E=[];Eh(n,t,r,o,.5,D),Eh(e,i,a,s,.5,E),IC(D[0],E[0],D[1],E[1],D[2],E[2],D[3],E[3],l,u),IC(D[4],E[4],D[5],E[5],D[6],E[6],D[7],E[7],l,u)}function sCe(n,e){var t=LC(n),i=[];e=e||1;for(var r=0;r0)for(var u=0;uMath.abs(u),d=dQ([l,u],c?0:1,e),h=(c?s:u)/d.length,f=0;fr,o=dQ([i,r],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",d=n[s]/o.length,h=0;h1?null:new fi(m*l+n,m*u+e)}function cCe(n,e,t){var i=new fi;fi.sub(i,t,e),i.normalize();var r=new fi;fi.sub(r,n,e);var a=r.dot(i);return a}function $1(n,e){var t=n[n.length-1];t&&t[0]===e[0]&&t[1]===e[1]||n.push(e)}function dCe(n,e,t){for(var i=n.length,r=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),dCe(e,u,c)}function M8(n,e,t,i){if(t===1)i.push(e);else{var r=Math.floor(t/2),a=n(e);M8(n,a[0],r,i),M8(n,a[1],t-r,i)}return i}function hCe(n,e){for(var t=[],i=0;i0)for(var A=i/t,C=-i/2;C<=i/2;C+=A){for(var M=Math.sin(C),I=Math.cos(C),D=0,S=0;S0;u/=2){var c=0,d=0;(n&u)>0&&(c=1),(e&u)>0&&(d=1),s+=u*u*(3*c^d),d===0&&(c===1&&(n=u-1-n,e=u-1-e),l=n,n=e,e=l)}return s}function R8(n){var e=1/0,t=1/0,i=-1/0,r=-1/0,a=Xt(n,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),d=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(d,t),i=Math.max(c,i),r=Math.max(d,r),[c,d]}),o=Xt(a,function(s,l){return{cp:s,z:bCe(s[0],s[1],e,t,i,r),path:n[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function pQ(n){return vCe(n.path,n.count)}function DC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function xCe(n,e,t){var i=[];function r(A){for(var C=0;C=0;r--)if(!t[r].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var a=l.length,u=Math.ceil(a/2);t[r].many=l.slice(u,a),t[s].many=l.slice(0,u),s++}return t}var TCe={clone:function(n){for(var e=[],t=1-Math.pow(1-n.path.style.opacity,1/n.count),i=0;i0))return;var s=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;XG(n)&&(u=n,c=e),XG(e)&&(u=e,c=n);function d(g,_,S,x,A){var C=g.many,M=g.one;if(C.length===1&&!A){var I=_?C[0]:M,D=_?M:C[0];if(E8(I))d({many:[I],one:D},!0,S,x,!0);else{var E=s?qn({delay:s(S,x)},l):l;tR(I,D,E),a(I,D,I,D,E)}}else for(var P=qn({dividePath:TCe[t],individualDelay:s&&function(Q,K,ae,ie){return s(Q+S,x)}},l),F=_?xCe(C,M,P):wCe(M,C,P),V=F.fromIndividuals,G=F.toIndividuals,W=V.length,Y=0;Ye.length,f=u?YG(c,u):YG(h?e:n,[h?n:e]),p=0,m=0;mvQ))for(var a=i.getIndices(),o=0;o0&&C.group.traverse(function(I){I instanceof Ei&&!I.animators.length&&I.animateFrom({style:{opacity:0}},M)})})}function eU(n){var e=n.getModel("universalTransition").get("seriesKey");return e||n.id}function tU(n){return $t(n)?n.sort().join(","):n}function Wd(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function LCe(n,e){var t=In(),i=In(),r=In();return ne(n.oldSeries,function(a,o){var s=n.oldDataGroupIds[o],l=n.oldData[o],u=eU(a),c=tU(u);i.set(c,{dataGroupId:s,data:l}),$t(u)&&ne(u,function(d){r.set(d,{key:c,dataGroupId:s,data:l})})}),ne(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=eU(a),u=tU(l),c=i.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Wd(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Wd(s),data:s}]});else if($t(l)){var d=[];ne(l,function(p){var m=i.get(p);m.data&&d.push({dataGroupId:m.dataGroupId,divide:Wd(m.data),data:m.data})}),d.length&&t.set(u,{oldSeries:d,newSeries:[{dataGroupId:o,data:s,divide:Wd(s)}]})}else{var h=r.get(l);if(h){var f=t.get(h.key);f||(f={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Wd(h.data)}],newSeries:[]},t.set(h.key,f)),f.newSeries.push({dataGroupId:o,data:s,divide:Wd(s)})}}}}),t}function nU(n,e){for(var t=0;t=0&&r.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Wd(e.oldData[s]),groupIdDim:o.dimension})}),ne(Ar(n.to),function(o){var s=nU(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Wd(l),groupIdDim:o.dimension})}}),r.length>0&&a.length>0&&mQ(r,a,i)}function DCe(n){n.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){ne(Ar(i.seriesTransition),function(r){ne(Ar(r.to),function(a){for(var o=i.updatedSeries,s=0;s>>1,Sn=[["ary",Ge],["bind",ge],["bindKey",Ze],["curry",B],["curryRight",te],["flip",at],["partial",oe],["partialRight",Ie],["rearg",nt]],Hn="[object Arguments]",pi="[object Array]",hi="[object AsyncFunction]",yi="[object Boolean]",nr="[object Date]",zl="[object DOMException]",fs="[object Error]",zr="[object Function]",Xo="[object GeneratorFunction]",ir="[object Map]",wa="[object Number]",co="[object Null]",Ui="[object Object]",xr="[object Promise]",_i="[object Proxy]",jn="[object RegExp]",wi="[object Set]",mr="[object String]",ye="[object Symbol]",Ne="[object Undefined]",qe="[object WeakMap]",tt="[object WeakSet]",ve="[object ArrayBuffer]",ct="[object DataView]",et="[object Float32Array]",gt="[object Float64Array]",Dt="[object Int8Array]",fn="[object Int16Array]",Gt="[object Int32Array]",vn="[object Uint8Array]",gr="[object Uint8ClampedArray]",ea="[object Uint16Array]",vi="[object Uint32Array]",Kr=/\b__p \+= '';/g,Ii=/\b(__p \+=) '' \+/g,yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ps=/&(?:amp|lt|gt|quot|#39);/g,vs=/[&<>"']/g,zi=RegExp(ps.source),Gr=RegExp(vs.source),lu=/<%-([\s\S]+?)%>/g,od=/<%([\s\S]+?)%>/g,uu=/<%=([\s\S]+?)%>/g,jh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$h=/^\w*$/,_a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zr=/[\\^$.*+?()[\]{}|]/g,Yo=RegExp(Zr.source),Ds=/^\s+/,Gl=/\s/,oc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sc=/\{\n\/\* \[wrapped with (.+)\] \*/,qh=/,? & /,l1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,sd=/[()=,{}\[\]\/\s]/,ms=/\\(\\)?/g,C7=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,u1=/\w*$/,M7=/^[-+]0x[0-9a-f]+$/i,E7=/^0b[01]+$/i,Ja=/^\[object .+?Constructor\]$/,P7=/^0o[0-7]+$/i,Si=/^(?:0|[1-9]\d*)$/,ua=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xh=/($^)/,Yh=/['\n\r\u2028\u2029\\]/g,ld="\\ud800-\\udfff",X="\\u0300-\\u036f",q="\\ufe20-\\ufe2f",ce="\\u20d0-\\u20ff",Je=X+q+ce,Nt="\\u2700-\\u27bf",Cn="a-z\\xdf-\\xf6\\xf8-\\xff",Fi="\\xac\\xb1\\xd7\\xf7",Ki="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wr="\\u2000-\\u206f",br=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_r="A-Z\\xc0-\\xd6\\xd8-\\xde",gs="\\ufe0e\\ufe0f",To=Fi+Ki+wr+br,ca="['’]",Qa="["+ld+"]",ud="["+To+"]",cu="["+Je+"]",cd="\\d+",Kh="["+Nt+"]",dd="["+Cn+"]",hd="[^"+ld+To+cd+Nt+Cn+_r+"]",c1="\\ud83c[\\udffb-\\udfff]",q3="(?:"+cu+"|"+c1+")",lL="[^"+ld+"]",R7="(?:\\ud83c[\\udde6-\\uddff]){2}",L7="[\\ud800-\\udbff][\\udc00-\\udfff]",d1="["+_r+"]",uL="\\u200d",cL="(?:"+dd+"|"+hd+")",rne="(?:"+d1+"|"+hd+")",dL="(?:"+ca+"(?:d|ll|m|re|s|t|ve))?",hL="(?:"+ca+"(?:D|LL|M|RE|S|T|VE))?",fL=q3+"?",pL="["+gs+"]?",ane="(?:"+uL+"(?:"+[lL,R7,L7].join("|")+")"+pL+fL+")*",one="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sne="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vL=pL+fL+ane,lne="(?:"+[Kh,R7,L7].join("|")+")"+vL,une="(?:"+[lL+cu+"?",cu,R7,L7,Qa].join("|")+")",cne=RegExp(ca,"g"),dne=RegExp(cu,"g"),I7=RegExp(c1+"(?="+c1+")|"+une+vL,"g"),hne=RegExp([d1+"?"+dd+"+"+dL+"(?="+[ud,d1,"$"].join("|")+")",rne+"+"+hL+"(?="+[ud,d1+cL,"$"].join("|")+")",d1+"?"+cL+"+"+dL,d1+"+"+hL,sne,one,cd,lne].join("|"),"g"),fne=RegExp("["+uL+ld+Je+gs+"]"),pne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mne=-1,va={};va[et]=va[gt]=va[Dt]=va[fn]=va[Gt]=va[vn]=va[gr]=va[ea]=va[vi]=!0,va[Hn]=va[pi]=va[ve]=va[yi]=va[ct]=va[nr]=va[fs]=va[zr]=va[ir]=va[wa]=va[Ui]=va[jn]=va[wi]=va[mr]=va[qe]=!1;var da={};da[Hn]=da[pi]=da[ve]=da[ct]=da[yi]=da[nr]=da[et]=da[gt]=da[Dt]=da[fn]=da[Gt]=da[ir]=da[wa]=da[Ui]=da[jn]=da[wi]=da[mr]=da[ye]=da[vn]=da[gr]=da[ea]=da[vi]=!0,da[fs]=da[zr]=da[qe]=!1;var gne={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},yne={"&":"&","<":"<",">":">",'"':""","'":"'"},_ne={"&":"&","<":"<",">":">",""":'"',"'":"'"},Sne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},bne=parseFloat,xne=parseInt,mL=typeof I=="object"&&I&&I.Object===Object&&I,wne=typeof self=="object"&&self&&self.Object===Object&&self,Do=mL||wne||Function("return this")(),D7=H&&!H.nodeType&&H,Zh=D7&&!0&&Z&&!Z.nodeType&&Z,gL=Zh&&Zh.exports===D7,N7=gL&&mL.process,Ul=function(){try{var dt=Zh&&Zh.require&&Zh.require("util").types;return dt||N7&&N7.binding&&N7.binding("util")}catch(Qt){}}(),yL=Ul&&Ul.isArrayBuffer,_L=Ul&&Ul.isDate,SL=Ul&&Ul.isMap,bL=Ul&&Ul.isRegExp,xL=Ul&&Ul.isSet,wL=Ul&&Ul.isTypedArray;function pl(dt,Qt,Ut){switch(Ut.length){case 0:return dt.call(Qt);case 1:return dt.call(Qt,Ut[0]);case 2:return dt.call(Qt,Ut[0],Ut[1]);case 3:return dt.call(Qt,Ut[0],Ut[1],Ut[2])}return dt.apply(Qt,Ut)}function Tne(dt,Qt,Ut,Yn){for(var Di=-1,Cr=dt==null?0:dt.length;++Di-1}function k7(dt,Qt,Ut){for(var Yn=-1,Di=dt==null?0:dt.length;++Yn-1;);return Ut}function LL(dt,Qt){for(var Ut=dt.length;Ut--&&h1(Qt,dt[Ut],0)>-1;);return Ut}function Dne(dt,Qt){for(var Ut=dt.length,Yn=0;Ut--;)dt[Ut]===Qt&&++Yn;return Yn}var Nne=z7(gne),kne=z7(yne);function Fne(dt){return"\\"+Sne[dt]}function One(dt,Qt){return dt==null?w:dt[Qt]}function f1(dt){return fne.test(dt)}function Bne(dt){return pne.test(dt)}function zne(dt){for(var Qt,Ut=[];!(Qt=dt.next()).done;)Ut.push(Qt.value);return Ut}function H7(dt){var Qt=-1,Ut=Array(dt.size);return dt.forEach(function(Yn,Di){Ut[++Qt]=[Di,Yn]}),Ut}function IL(dt,Qt){return function(Ut){return dt(Qt(Ut))}}function vd(dt,Qt){for(var Ut=-1,Yn=dt.length,Di=0,Cr=[];++Ut-1}function Cie(y,b){var L=this.__data__,j=dy(L,y);return j<0?(++this.size,L.push([y,b])):L[j][1]=b,this}lc.prototype.clear=xie,lc.prototype.delete=wie,lc.prototype.get=Tie,lc.prototype.has=Aie,lc.prototype.set=Cie;function uc(y){var b=-1,L=y==null?0:y.length;for(this.clear();++b=b?y:b)),y}function jl(y,b,L,j,le,Me){var Ke,rt=b&se,yt=b&re,ln=b&Oe;if(L&&(Ke=le?L(y,j,le,Me):L(y)),Ke!==w)return Ke;if(!Ta(y))return y;var un=Oi(y);if(un){if(Ke=Rre(y),!rt)return Ns(y,Ke)}else{var mn=Zo(y),Gn=mn==zr||mn==Xo;if(bd(y))return pI(y,rt);if(mn==Ui||mn==Hn||Gn&&!le){if(Ke=yt||Gn?{}:DI(y),!rt)return yt?_re(y,Vie(Ke,y)):yre(y,WL(Ke,y))}else{if(!da[mn])return le?y:{};Ke=Lre(y,mn,rt)}}Me||(Me=new k0);var ri=Me.get(y);if(ri)return ri;Me.set(y,Ke),lD(y)?y.forEach(function(Ai){Ke.add(jl(Ai,b,L,Ai,y,Me))}):oD(y)&&y.forEach(function(Ai,or){Ke.set(or,jl(Ai,b,L,or,y,Me))});var Ti=ln?yt?vS:pS:yt?Fs:Ao,Wi=un?w:Ti(y);return Vl(Wi||y,function(Ai,or){Wi&&(or=Ai,Ai=y[or]),pm(Ke,or,jl(Ai,b,L,or,y,Me))}),Ke}function Hie(y){var b=Ao(y);return function(L){return jL(L,y,b)}}function jL(y,b,L){var j=L.length;if(y==null)return!j;for(y=ta(y);j--;){var le=L[j],Me=b[le],Ke=y[le];if(Ke===w&&!(le in y)||!Me(Ke))return!1}return!0}function $L(y,b,L){if(typeof y!="function")throw new Hl(z);return bm(function(){y.apply(w,L)},b)}function vm(y,b,L,j){var le=-1,Me=X3,Ke=!0,rt=y.length,yt=[],ln=b.length;if(!rt)return yt;L&&(b=Sa(b,vl(L))),j?(Me=k7,Ke=!1):b.length>=R&&(Me=lm,Ke=!1,b=new ef(b));e:for(;++lele?0:le+L),j=j===w||j>le?le:Vi(j),j<0&&(j+=le),j=L>j?0:cD(j);L0&&L(rt)?b>1?No(rt,b-1,L,j,le):pd(le,rt):j||(le[le.length]=rt)}return le}var K7=SI(),YL=SI(!0);function du(y,b){return y&&K7(y,b,Ao)}function Z7(y,b){return y&&YL(y,b,Ao)}function fy(y,b){return fd(b,function(L){return pc(y[L])})}function nf(y,b){b=_d(b,y);for(var L=0,j=b.length;y!=null&&Lb}function $ie(y,b){return y!=null&&Ur.call(y,b)}function qie(y,b){return y!=null&&b in ta(y)}function Xie(y,b,L){return y>=Ko(b,L)&&y=120&&un.length>=120)?new ef(Ke&&un):w}un=y[0];var mn=-1,Gn=rt[0];e:for(;++mn-1;)rt!==y&&ry.call(rt,yt,1),ry.call(y,yt,1);return y}function oI(y,b){for(var L=y?b.length:0,j=L-1;L--;){var le=b[L];if(L==j||le!==Me){var Me=le;fc(le)?ry.call(y,le,1):sS(y,le)}}return y}function rS(y,b){return y+sy(GL()*(b-y+1))}function sre(y,b,L,j){for(var le=-1,Me=fo(oy((b-y)/(L||1)),0),Ke=Ut(Me);Me--;)Ke[j?Me:++le]=y,y+=L;return Ke}function aS(y,b){var L="";if(!y||b<1||b>ti)return L;do b%2&&(L+=y),b=sy(b/2),b&&(y+=y);while(b);return L}function Zi(y,b){return xS(FI(y,b,Os),y+"")}function lre(y){return HL(T1(y))}function ure(y,b){var L=T1(y);return Ty(L,tf(b,0,L.length))}function ym(y,b,L,j){if(!Ta(y))return y;b=_d(b,y);for(var le=-1,Me=b.length,Ke=Me-1,rt=y;rt!=null&&++lele?0:le+b),L=L>le?le:L,L<0&&(L+=le),le=b>L?0:L-b>>>0,b>>>=0;for(var Me=Ut(le);++j>>1,Ke=y[Me];Ke!==null&&!gl(Ke)&&(L?Ke<=b:Ke=R){var ln=b?null:wre(y);if(ln)return K3(ln);Ke=!1,le=lm,yt=new ef}else yt=b?[]:rt;e:for(;++j=j?y:$l(y,b,L)}var fI=eie||function(y){return Do.clearTimeout(y)};function pI(y,b){if(b)return y.slice();var L=y.length,j=kL?kL(L):new y.constructor(L);return y.copy(j),j}function dS(y){var b=new y.constructor(y.byteLength);return new ny(b).set(new ny(y)),b}function pre(y,b){var L=b?dS(y.buffer):y.buffer;return new y.constructor(L,y.byteOffset,y.byteLength)}function vre(y){var b=new y.constructor(y.source,u1.exec(y));return b.lastIndex=y.lastIndex,b}function mre(y){return fm?ta(fm.call(y)):{}}function vI(y,b){var L=b?dS(y.buffer):y.buffer;return new y.constructor(L,y.byteOffset,y.length)}function mI(y,b){if(y!==b){var L=y!==w,j=y===null,le=y===y,Me=gl(y),Ke=b!==w,rt=b===null,yt=b===b,ln=gl(b);if(!rt&&!ln&&!Me&&y>b||Me&&Ke&&yt&&!rt&&!ln||j&&Ke&&yt||!L&&yt||!le)return 1;if(!j&&!Me&&!ln&&y=rt)return yt;var ln=L[j];return yt*(ln=="desc"?-1:1)}}return y.index-b.index}function gI(y,b,L,j){for(var le=-1,Me=y.length,Ke=L.length,rt=-1,yt=b.length,ln=fo(Me-Ke,0),un=Ut(yt+ln),mn=!j;++rt1?L[le-1]:w,Ke=le>2?L[2]:w;for(Me=y.length>3&&typeof Me=="function"?(le--,Me):w,Ke&&_s(L[0],L[1],Ke)&&(Me=le<3?w:Me,le=1),b=ta(b);++j-1?le[Me?b[Ke]:Ke]:w}}function wI(y){return hc(function(b){var L=b.length,j=L,le=Wl.prototype.thru;for(y&&b.reverse();j--;){var Me=b[j];if(typeof Me!="function")throw new Hl(z);if(le&&!Ke&&xy(Me)=="wrapper")var Ke=new Wl([],!0)}for(j=Ke?j:L;++j1&&hr.reverse(),un&&ytrt))return!1;var ln=Me.get(y),un=Me.get(b);if(ln&&un)return ln==b&&un==y;var mn=-1,Gn=!0,ri=L&me?new ef:w;for(Me.set(y,b),Me.set(b,y);++mn1?"& ":"")+b[j],b=b.join(L>2?", ":" "),y.replace(oc,`{ /* [wrapped with `+b+`] */ `)}function Dre(y){return Oi(y)||of(y)||!!(BL&&y&&y[BL])}function fc(y,b){var L=typeof y;return b=b==null?ti:b,!!b&&(L=="number"||L!="symbol"&&Si.test(y))&&y>-1&&y%1==0&&y0){if(++b>=qt)return arguments[0]}else b=0;return y.apply(w,arguments)}}function Ty(y,b){var L=-1,j=y.length,le=j-1;for(b=b===w?j:b;++L1?y[b-1]:w;return L=typeof L=="function"?(y.pop(),L):w,XI(y,L)});function YI(y){var b=Se(y);return b.__chain__=!0,b}function Wae(y,b){return b(y),y}function Ay(y,b){return b(y)}var jae=hc(function(y){var b=y.length,L=b?y[0]:0,j=this.__wrapped__,le=function(Me){return Y7(Me,y)};return b>1||this.__actions__.length||!(j instanceof sr)||!fc(L)?this.thru(le):(j=j.slice(L,+L+(b?1:0)),j.__actions__.push({func:Ay,args:[le],thisArg:w}),new Wl(j,this.__chain__).thru(function(Me){return b&&!Me.length&&Me.push(w),Me}))});function $ae(){return YI(this)}function qae(){return new Wl(this.value(),this.__chain__)}function Xae(){this.__values__===w&&(this.__values__=uD(this.value()));var y=this.__index__>=this.__values__.length,b=y?w:this.__values__[this.__index__++];return{done:y,value:b}}function Yae(){return this}function Kae(y){for(var b,L=this;L instanceof cy;){var j=VI(L);j.__index__=0,j.__values__=w,b?le.__wrapped__=j:b=j;var le=j;L=L.__wrapped__}return le.__wrapped__=y,b}function Zae(){var y=this.__wrapped__;if(y instanceof sr){var b=y;return this.__actions__.length&&(b=new sr(this)),b=b.reverse(),b.__actions__.push({func:Ay,args:[wS],thisArg:w}),new Wl(b,this.__chain__)}return this.thru(wS)}function Jae(){return dI(this.__wrapped__,this.__actions__)}var Qae=gy(function(y,b,L){Ur.call(y,L)?++y[L]:cc(y,L,1)});function eoe(y,b,L){var j=Oi(y)?TL:Wie;return L&&_s(y,b,L)&&(b=w),j(y,bi(b,3))}function toe(y,b){var L=Oi(y)?fd:XL;return L(y,bi(b,3))}var noe=xI(HI),ioe=xI(WI);function roe(y,b){return No(Cy(y,b),1)}function aoe(y,b){return No(Cy(y,b),ii)}function ooe(y,b,L){return L=L===w?1:Vi(L),No(Cy(y,b),L)}function KI(y,b){var L=Oi(y)?Vl:gd;return L(y,bi(b,3))}function ZI(y,b){var L=Oi(y)?Ane:qL;return L(y,bi(b,3))}var soe=gy(function(y,b,L){Ur.call(y,L)?y[L].push(b):cc(y,L,[b])});function loe(y,b,L,j){y=ks(y)?y:T1(y),L=L&&!j?Vi(L):0;var le=y.length;return L<0&&(L=fo(le+L,0)),Ly(y)?L<=le&&y.indexOf(b,L)>-1:!!le&&h1(y,b,L)>-1}var uoe=Zi(function(y,b,L){var j=-1,le=typeof b=="function",Me=ks(y)?Ut(y.length):[];return gd(y,function(Ke){Me[++j]=le?pl(b,Ke,L):mm(Ke,b,L)}),Me}),coe=gy(function(y,b,L){cc(y,L,b)});function Cy(y,b){var L=Oi(y)?Sa:eI;return L(y,bi(b,3))}function doe(y,b,L,j){return y==null?[]:(Oi(b)||(b=b==null?[]:[b]),L=j?w:L,Oi(L)||(L=L==null?[]:[L]),rI(y,b,L))}var hoe=gy(function(y,b,L){y[L?0:1].push(b)},function(){return[[],[]]});function foe(y,b,L){var j=Oi(y)?F7:EL,le=arguments.length<3;return j(y,bi(b,4),L,le,gd)}function poe(y,b,L){var j=Oi(y)?Cne:EL,le=arguments.length<3;return j(y,bi(b,4),L,le,qL)}function voe(y,b){var L=Oi(y)?fd:XL;return L(y,Py(bi(b,3)))}function moe(y){var b=Oi(y)?HL:lre;return b(y)}function goe(y,b,L){(L?_s(y,b,L):b===w)?b=1:b=Vi(b);var j=Oi(y)?zie:ure;return j(y,b)}function yoe(y){var b=Oi(y)?Gie:dre;return b(y)}function _oe(y){if(y==null)return 0;if(ks(y))return Ly(y)?p1(y):y.length;var b=Zo(y);return b==ir||b==wi?y.size:tS(y).length}function Soe(y,b,L){var j=Oi(y)?O7:hre;return L&&_s(y,b,L)&&(b=w),j(y,bi(b,3))}var boe=Zi(function(y,b){if(y==null)return[];var L=b.length;return L>1&&_s(y,b[0],b[1])?b=[]:L>2&&_s(b[0],b[1],b[2])&&(b=[b[0]]),rI(y,No(b,1),[])}),My=tie||function(){return Do.Date.now()};function xoe(y,b){if(typeof b!="function")throw new Hl(z);return y=Vi(y),function(){if(--y<1)return b.apply(this,arguments)}}function JI(y,b,L){return b=L?w:b,b=y&&b==null?y.length:b,dc(y,Ge,w,w,w,w,b)}function QI(y,b){var L;if(typeof b!="function")throw new Hl(z);return y=Vi(y),function(){return--y>0&&(L=b.apply(this,arguments)),y<=1&&(b=w),L}}var AS=Zi(function(y,b,L){var j=ge;if(L.length){var le=vd(L,x1(AS));j|=oe}return dc(y,j,b,L,le)}),eD=Zi(function(y,b,L){var j=ge|Ze;if(L.length){var le=vd(L,x1(eD));j|=oe}return dc(b,j,y,L,le)});function tD(y,b,L){b=L?w:b;var j=dc(y,B,w,w,w,w,w,b);return j.placeholder=tD.placeholder,j}function nD(y,b,L){b=L?w:b;var j=dc(y,te,w,w,w,w,w,b);return j.placeholder=nD.placeholder,j}function iD(y,b,L){var j,le,Me,Ke,rt,yt,ln=0,un=!1,mn=!1,Gn=!0;if(typeof y!="function")throw new Hl(z);b=Xl(b)||0,Ta(L)&&(un=!!L.leading,mn="maxWait"in L,Me=mn?fo(Xl(L.maxWait)||0,b):Me,Gn="trailing"in L?!!L.trailing:Gn);function ri(Ga){var O0=j,mc=le;return j=le=w,ln=Ga,Ke=y.apply(mc,O0),Ke}function Ti(Ga){return ln=Ga,rt=bm(or,b),un?ri(Ga):Ke}function Wi(Ga){var O0=Ga-yt,mc=Ga-ln,xD=b-O0;return mn?Ko(xD,Me-mc):xD}function Ai(Ga){var O0=Ga-yt,mc=Ga-ln;return yt===w||O0>=b||O0<0||mn&&mc>=Me}function or(){var Ga=My();if(Ai(Ga))return hr(Ga);rt=bm(or,Wi(Ga))}function hr(Ga){return rt=w,Gn&&j?ri(Ga):(j=le=w,Ke)}function yl(){rt!==w&&fI(rt),ln=0,j=yt=le=rt=w}function Ss(){return rt===w?Ke:hr(My())}function _l(){var Ga=My(),O0=Ai(Ga);if(j=arguments,le=this,yt=Ga,O0){if(rt===w)return Ti(yt);if(mn)return fI(rt),rt=bm(or,b),ri(yt)}return rt===w&&(rt=bm(or,b)),Ke}return _l.cancel=yl,_l.flush=Ss,_l}var woe=Zi(function(y,b){return $L(y,1,b)}),Toe=Zi(function(y,b,L){return $L(y,Xl(b)||0,L)});function Aoe(y){return dc(y,at)}function Ey(y,b){if(typeof y!="function"||b!=null&&typeof b!="function")throw new Hl(z);var L=function(){var j=arguments,le=b?b.apply(this,j):j[0],Me=L.cache;if(Me.has(le))return Me.get(le);var Ke=y.apply(this,j);return L.cache=Me.set(le,Ke)||Me,Ke};return L.cache=new(Ey.Cache||uc),L}Ey.Cache=uc;function Py(y){if(typeof y!="function")throw new Hl(z);return function(){var b=arguments;switch(b.length){case 0:return!y.call(this);case 1:return!y.call(this,b[0]);case 2:return!y.call(this,b[0],b[1]);case 3:return!y.call(this,b[0],b[1],b[2])}return!y.apply(this,b)}}function Coe(y){return QI(2,y)}var Moe=fre(function(y,b){b=b.length==1&&Oi(b[0])?Sa(b[0],vl(bi())):Sa(No(b,1),vl(bi()));var L=b.length;return Zi(function(j){for(var le=-1,Me=Ko(j.length,L);++le=b}),of=ZL(function(){return arguments}())?ZL:function(y){return Ia(y)&&Ur.call(y,"callee")&&!OL.call(y,"callee")},Oi=Ut.isArray,Voe=yL?vl(yL):Kie;function ks(y){return y!=null&&Ry(y.length)&&!pc(y)}function za(y){return Ia(y)&&ks(y)}function Hoe(y){return y===!0||y===!1||Ia(y)&&ys(y)==yi}var bd=iie||OS,Woe=_L?vl(_L):Zie;function joe(y){return Ia(y)&&y.nodeType===1&&!xm(y)}function $oe(y){if(y==null)return!0;if(ks(y)&&(Oi(y)||typeof y=="string"||typeof y.splice=="function"||bd(y)||w1(y)||of(y)))return!y.length;var b=Zo(y);if(b==ir||b==wi)return!y.size;if(Sm(y))return!tS(y).length;for(var L in y)if(Ur.call(y,L))return!1;return!0}function qoe(y,b){return gm(y,b)}function Xoe(y,b,L){L=typeof L=="function"?L:w;var j=L?L(y,b):w;return j===w?gm(y,b,w,L):!!j}function MS(y){if(!Ia(y))return!1;var b=ys(y);return b==fs||b==zl||typeof y.message=="string"&&typeof y.name=="string"&&!xm(y)}function Yoe(y){return typeof y=="number"&&zL(y)}function pc(y){if(!Ta(y))return!1;var b=ys(y);return b==zr||b==Xo||b==hi||b==_i}function aD(y){return typeof y=="number"&&y==Vi(y)}function Ry(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=ti}function Ta(y){var b=typeof y;return y!=null&&(b=="object"||b=="function")}function Ia(y){return y!=null&&typeof y=="object"}var oD=SL?vl(SL):Qie;function Koe(y,b){return y===b||eS(y,b,gS(b))}function Zoe(y,b,L){return L=typeof L=="function"?L:w,eS(y,b,gS(b),L)}function Joe(y){return sD(y)&&y!=+y}function Qoe(y){if(Fre(y))throw new Di(N);return JL(y)}function ese(y){return y===null}function tse(y){return y==null}function sD(y){return typeof y=="number"||Ia(y)&&ys(y)==wa}function xm(y){if(!Ia(y)||ys(y)!=Ui)return!1;var b=iy(y);if(b===null)return!0;var L=Ur.call(b,"constructor")&&b.constructor;return typeof L=="function"&&L instanceof L&&Q3.call(L)==Zne}var ES=bL?vl(bL):ere;function nse(y){return aD(y)&&y>=-ti&&y<=ti}var lD=xL?vl(xL):tre;function Ly(y){return typeof y=="string"||!Oi(y)&&Ia(y)&&ys(y)==mr}function gl(y){return typeof y=="symbol"||Ia(y)&&ys(y)==ye}var w1=wL?vl(wL):nre;function ise(y){return y===w}function rse(y){return Ia(y)&&Zo(y)==qe}function ase(y){return Ia(y)&&ys(y)==tt}var ose=by(nS),sse=by(function(y,b){return y<=b});function uD(y){if(!y)return[];if(ks(y))return Ly(y)?N0(y):Ns(y);if(um&&y[um])return zne(y[um]());var b=Zo(y),L=b==ir?H7:b==wi?K3:T1;return L(y)}function vc(y){if(!y)return y===0?y:0;if(y=Xl(y),y===ii||y===-ii){var b=y<0?-1:1;return b*di}return y===y?y:0}function Vi(y){var b=vc(y),L=b%1;return b===b?L?b-L:b:0}function cD(y){return y?tf(Vi(y),0,Ve):0}function Xl(y){if(typeof y=="number")return y;if(gl(y))return tr;if(Ta(y)){var b=typeof y.valueOf=="function"?y.valueOf():y;y=Ta(b)?b+"":b}if(typeof y!="string")return y===0?y:+y;y=PL(y);var L=E7.test(y);return L||P7.test(y)?xne(y.slice(2),L?2:8):M7.test(y)?tr:+y}function dD(y){return hu(y,Fs(y))}function lse(y){return y?tf(Vi(y),-ti,ti):y===0?y:0}function Pr(y){return y==null?"":ml(y)}var use=S1(function(y,b){if(Sm(b)||ks(b)){hu(b,Ao(b),y);return}for(var L in b)Ur.call(b,L)&&pm(y,L,b[L])}),hD=S1(function(y,b){hu(b,Fs(b),y)}),Iy=S1(function(y,b,L,j){hu(b,Fs(b),y,j)}),cse=S1(function(y,b,L,j){hu(b,Ao(b),y,j)}),dse=hc(Y7);function hse(y,b){var L=_1(y);return b==null?L:WL(L,b)}var fse=Zi(function(y,b){y=ta(y);var L=-1,j=b.length,le=j>2?b[2]:w;for(le&&_s(b[0],b[1],le)&&(j=1);++L1),Me}),hu(y,vS(y),L),j&&(L=jl(L,se|re|Oe,Tre));for(var le=b.length;le--;)sS(L,b[le]);return L});function Lse(y,b){return pD(y,Py(bi(b)))}var Ise=hc(function(y,b){return y==null?{}:are(y,b)});function pD(y,b){if(y==null)return{};var L=Sa(vS(y),function(j){return[j]});return b=bi(b),aI(y,L,function(j,le){return b(j,le[0])})}function Dse(y,b,L){b=_d(b,y);var j=-1,le=b.length;for(le||(le=1,y=w);++jb){var j=y;y=b,b=j}if(L||y%1||b%1){var le=GL();return Ko(y+le*(b-y+bne("1e-"+((le+"").length-1))),b)}return rS(y,b)}var Wse=b1(function(y,b,L){return b=b.toLowerCase(),y+(L?gD(b):b)});function gD(y){return LS(Pr(y).toLowerCase())}function yD(y){return y=Pr(y),y&&y.replace(ua,Nne).replace(dne,"")}function jse(y,b,L){y=Pr(y),b=ml(b);var j=y.length;L=L===w?j:tf(Vi(L),0,j);var le=L;return L-=b.length,L>=0&&y.slice(L,le)==b}function $se(y){return y=Pr(y),y&&Gr.test(y)?y.replace(vs,kne):y}function qse(y){return y=Pr(y),y&&Yo.test(y)?y.replace(Zr,"\\$&"):y}var Xse=b1(function(y,b,L){return y+(L?"-":"")+b.toLowerCase()}),Yse=b1(function(y,b,L){return y+(L?" ":"")+b.toLowerCase()}),Kse=bI("toLowerCase");function Zse(y,b,L){y=Pr(y),b=Vi(b);var j=b?p1(y):0;if(!b||j>=b)return y;var le=(b-j)/2;return Sy(sy(le),L)+y+Sy(oy(le),L)}function Jse(y,b,L){y=Pr(y),b=Vi(b);var j=b?p1(y):0;return b&&j>>0,L?(y=Pr(y),y&&(typeof b=="string"||b!=null&&!ES(b))&&(b=ml(b),!b&&f1(y))?Sd(N0(y),0,L):y.split(b,L)):[]}var ale=b1(function(y,b,L){return y+(L?" ":"")+LS(b)});function ole(y,b,L){return y=Pr(y),L=L==null?0:tf(Vi(L),0,y.length),b=ml(b),y.slice(L,L+b.length)==b}function sle(y,b,L){var j=Se.templateSettings;L&&_s(y,b,L)&&(b=w),y=Pr(y),b=Iy({},b,j,EI);var le=Iy({},b.imports,j.imports,EI),Me=Ao(le),Ke=V7(le,Me),rt,yt,ln=0,un=b.interpolate||Xh,mn="__p += '",Gn=W7((b.escape||Xh).source+"|"+un.source+"|"+(un===uu?C7:Xh).source+"|"+(b.evaluate||Xh).source+"|$","g"),ri="//# sourceURL="+(Ur.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mne+"]")+` `;y.replace(Gn,function(Ai,or,hr,yl,Ss,_l){return hr||(hr=yl),mn+=y.slice(ln,_l).replace(Yh,Fne),or&&(rt=!0,mn+=`' + __e(`+or+`) + '`),Ss&&(yt=!0,mn+=`'; `+Ss+`; __p += '`),hr&&(mn+=`' + ((__t = (`+hr+`)) == null ? '' : __t) + '`),ln=_l+Ai.length,Ai}),mn+=`'; `;var Ti=Ur.call(b,"variable")&&b.variable;if(!Ti)mn=`with (obj) { `+mn+` } `;else if(sd.test(Ti))throw new Di(U);mn=(yt?mn.replace(Kr,""):mn).replace(Ii,"$1").replace(yr,"$1;"),mn="function("+(Ti||"obj")+`) { `+(Ti?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(rt?", __e = _.escape":"")+(yt?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+mn+`return __p }`;var Wi=SD(function(){return Cr(Me,ri+"return "+mn).apply(w,Ke)});if(Wi.source=mn,MS(Wi))throw Wi;return Wi}function lle(y){return Pr(y).toLowerCase()}function ule(y){return Pr(y).toUpperCase()}function cle(y,b,L){if(y=Pr(y),y&&(L||b===w))return PL(y);if(!y||!(b=ml(b)))return y;var j=N0(y),le=N0(b),Me=RL(j,le),Ke=LL(j,le)+1;return Sd(j,Me,Ke).join("")}function dle(y,b,L){if(y=Pr(y),y&&(L||b===w))return y.slice(0,DL(y)+1);if(!y||!(b=ml(b)))return y;var j=N0(y),le=LL(j,N0(b))+1;return Sd(j,0,le).join("")}function hle(y,b,L){if(y=Pr(y),y&&(L||b===w))return y.replace(Ds,"");if(!y||!(b=ml(b)))return y;var j=N0(y),le=RL(j,N0(b));return Sd(j,le).join("")}function fle(y,b){var L=St,j=zt;if(Ta(b)){var le="separator"in b?b.separator:le;L="length"in b?Vi(b.length):L,j="omission"in b?ml(b.omission):j}y=Pr(y);var Me=y.length;if(f1(y)){var Ke=N0(y);Me=Ke.length}if(L>=Me)return y;var rt=L-p1(j);if(rt<1)return j;var yt=Ke?Sd(Ke,0,rt).join(""):y.slice(0,rt);if(le===w)return yt+j;if(Ke&&(rt+=yt.length-rt),ES(le)){if(y.slice(rt).search(le)){var ln,un=yt;for(le.global||(le=W7(le.source,Pr(u1.exec(le))+"g")),le.lastIndex=0;ln=le.exec(un);)var mn=ln.index;yt=yt.slice(0,mn===w?rt:mn)}}else if(y.indexOf(ml(le),rt)!=rt){var Gn=yt.lastIndexOf(le);Gn>-1&&(yt=yt.slice(0,Gn))}return yt+j}function ple(y){return y=Pr(y),y&&zi.test(y)?y.replace(ps,Hne):y}var vle=b1(function(y,b,L){return y+(L?" ":"")+b.toUpperCase()}),LS=bI("toUpperCase");function _D(y,b,L){return y=Pr(y),b=L?w:b,b===w?Bne(y)?$ne(y):Pne(y):y.match(b)||[]}var SD=Zi(function(y,b){try{return pl(y,w,b)}catch(L){return MS(L)?L:new Di(L)}}),mle=hc(function(y,b){return Vl(b,function(L){L=fu(L),cc(y,L,AS(y[L],y))}),y});function gle(y){var b=y==null?0:y.length,L=bi();return y=b?Sa(y,function(j){if(typeof j[1]!="function")throw new Hl(z);return[L(j[0]),j[1]]}):[],Zi(function(j){for(var le=-1;++leti)return[];var L=Ve,j=Ko(y,Ve);b=bi(b),y-=Ve;for(var le=U7(j,b);++L0||b<0)?new sr(L):(y<0?L=L.takeRight(-y):y&&(L=L.drop(y)),b!==w&&(b=Vi(b),L=b<0?L.dropRight(-b):L.take(b-y)),L)},sr.prototype.takeRightWhile=function(y){return this.reverse().takeWhile(y).reverse()},sr.prototype.toArray=function(){return this.take(Ve)},du(sr.prototype,function(y,b){var L=/^(?:filter|find|map|reject)|While$/.test(b),j=/^(?:head|last)$/.test(b),le=Se[j?"take"+(b=="last"?"Right":""):b],Me=j||/^find/.test(b);le&&(Se.prototype[b]=function(){var Ke=this.__wrapped__,rt=j?[1]:arguments,yt=Ke instanceof sr,ln=rt[0],un=yt||Oi(Ke),mn=function(or){var hr=le.apply(Se,pd([or],rt));return j&&Gn?hr[0]:hr};un&&L&&typeof ln=="function"&&ln.length!=1&&(yt=un=!1);var Gn=this.__chain__,ri=!!this.__actions__.length,Ti=Me&&!Gn,Wi=yt&&!ri;if(!Me&&un){Ke=Wi?Ke:new sr(this);var Ai=y.apply(Ke,rt);return Ai.__actions__.push({func:Ay,args:[mn],thisArg:w}),new Wl(Ai,Gn)}return Ti&&Wi?y.apply(this,rt):(Ai=this.thru(mn),Ti?j?Ai.value()[0]:Ai.value():Ai)})}),Vl(["pop","push","shift","sort","splice","unshift"],function(y){var b=Z3[y],L=/^(?:push|sort|unshift)$/.test(y)?"tap":"thru",j=/^(?:pop|shift)$/.test(y);Se.prototype[y]=function(){var le=arguments;if(j&&!this.__chain__){var Me=this.value();return b.apply(Oi(Me)?Me:[],le)}return this[L](function(Ke){return b.apply(Oi(Ke)?Ke:[],le)})}}),du(sr.prototype,function(y,b){var L=Se[b];if(L){var j=L.name+"";Ur.call(y1,j)||(y1[j]=[]),y1[j].push({name:b,func:L})}}),y1[yy(w,Ze).name]=[{name:"wrapper",func:w}],sr.prototype.clone=pie,sr.prototype.reverse=vie,sr.prototype.value=mie,Se.prototype.at=jae,Se.prototype.chain=$ae,Se.prototype.commit=qae,Se.prototype.next=Xae,Se.prototype.plant=Kae,Se.prototype.reverse=Zae,Se.prototype.toJSON=Se.prototype.valueOf=Se.prototype.value=Jae,Se.prototype.first=Se.prototype.head,um&&(Se.prototype[um]=Yae),Se},v1=qne();Zh?((Zh.exports=v1)._=v1,D7._=v1):Do._=v1}).call(I)});function P(Z,H){var w=H.parentNode;w.lastChild==H?w.appendChild(Z):w.insertBefore(Z,H.nextSibling)}var F=function(){function Z(H,w){i(this,Z),this.id=w,this.jSPlugin=H,this.state={play:!1,loading:!1,text:""},this.loadingSetText=this.loadingSetText}return a(Z,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"setPlayStatus",value:function(w){this.state=Object.assign(this.state,w)}},{key:"loadingStart",value:function(w){var T=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(T),T.innerHTML="@keyframes antRotate {to {transform: rotate(400deg);transform-origin:50% 50%;}} .loading {display: inline-block;z-index: 1000;-webkit-animation: antRotate 1s infinite linear;animation: antRotate 1s infinite linear;}";var R=w,N=document.getElementById(R),z=N.offsetWidth,U=N.offsetHeight,ue=0,pe=N.offsetLeft;document.getElementById("".concat(w,"-loading-id-0"))&&document.getElementById("".concat(w,"-loading-id-0")).parentNode.removeChild(document.getElementById("".concat(w,"-loading-id-0")));var de=document.createElement("div");de.setAttribute("id","".concat(w,"-loading-id-0"));var be="position:absolute;outline:none;pointer-events:none;";console.log("this.jSPlugin",this.jSPlugin),be+="width: 100%;background-size: cover; background-repeat:no-repeat;",be+="height: 100%;",be+="top:"+ue+";",be+="left:"+pe+"px;",de.setAttribute("style",be),de.style.height=U,de.setAttribute("class","loading-container"),P(de,N);var se=1,re=document.createElement("div"),Oe=document.createElement("div");re.setAttribute("class","loading-item"),re.setAttribute("id","".concat(w,"-loading-item-0"));var be="display:inline-flex;pointer-events:none;flex-direction:column;justify-content:center;align-items: center;width:100%;height:"+U+"px;outline:none;vertical-align: top;position:absolute;";be+="left:"+me(U,z,se,0).left+"px;",be+="top:"+me(U,z,se,0).top+"px;",re.setAttribute("style",be);function me(fe,B,te,oe){var Ie=parseInt(oe/te,10)*(fe/te),Ge=oe%te*(B/te);return{top:Ie,left:Ge}}var ge=document.createElement("div");Oe.innerHTML="",Oe.style.color="#fff",ge.setAttribute("class","loading"),ge.setAttribute("id","loading-icon");var Ze='';ge.innerHTML=Ze,re.appendChild(ge),re.appendChild(Oe),de.appendChild(re)}},{key:"loadingStop",value:function(w){var T=document.getElementById("".concat(w,"-loading-item-0"));T&&T.removeChild(document.getElementById("loading-icon"))}},{key:"loadingSetText",value:function(w){var T=this;if(this.loadingClearText(),document.getElementById("".concat(this.id,"-loading-item-0"))){var R=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes[1];if(!R){var N=document.getElementById("".concat(this.id,"-loading-item-0"));N.style.height="100%",R=document.createElement("div"),R.innerHTML=w.text,N.appendChild(R)}R.innerHTML=w.text,R.style.fontSize="14px",R.style.color=w.color||"#FFFFFF",this.state.text=w.text,w.delayClear&&setTimeout(function(){T.loadingClearText()},parseInt(w.delayClear))}}},{key:"loadingClearText",value:function(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){var w=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes;w.length>1?w[1].parentNode.removeChild(w[1]):w[0]&&w[0].parentNode.removeChild(w[0])}}},{key:"loadingClear",value:function(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){for(var w=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes,T=w.length-1;T>=0;T--)w[T].parentNode.removeChild(w[T]);document.getElementById("".concat(this.id,"-loading-id-0"))&&(document.getElementById("".concat(this.id,"-loading-id-0")).style.background="none"),document.getElementById("loading-icon")&&document.getElementById("loading-icon").parentNode.removeChild(document.getElementById("loading-icon"))}}},{key:"loadingEnd",value:function(){var w=document.getElementById("".concat(this.id,"-loading-item-0"));if(w){w.parentNode.removeChild(w);var T=document.getElementById("".concat(this.id,"-loading-id-0"));T&&T.children.length===0&&T.parentNode.removeChild(T)}document.getElementById("".concat(this.id,"-loading-item-0")).style.background="none"}}]),Z}(),V=function(){function Z(H,w){i(this,Z),this.id=w,this.jSPlugin=H,this.timer=null,this.state={play:!1,loading:!1}}return a(Z,[{key:"default",value:function(w){var T=this,R="msgId";document.getElementById("".concat(this.id,"-").concat(R))&&document.getElementById("".concat(this.id,"-wrap")).removeChild(document.getElementById("".concat(this.id,"-").concat(R)));var N=document.createElement("div");N.id="".concat(this.id,"-").concat(R),N.style="position: absolute;top: 50%;left:calc(50% - ".concat(w.length*14/2,"px);padding: 4px 16px;background: #00000080;color: #FFFFFF;font-size: 14px"),N.innerHTML=w,document.getElementById("".concat(this.id,"-wrap")).appendChild(N),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){document.getElementById("".concat(T.id,"-wrap")).removeChild(document.getElementById("".concat(T.id,"-").concat(R)))},2e3)}}]),Z}(),G=[{moduleCode:"",detailCode:"405984",description:"",solution:"",updateTime:1559564188e3},{moduleCode:"",detailCode:"10035",description:"获取子账户AccessToken异常,子账户不存在或子账户不属于该开发者",solution:"",updateTime:1559551958e3},{moduleCode:"",detailCode:"1052674",description:"获取本地录像失败",solution:"",updateTime:1558579653e3},{moduleCode:"",detailCode:"395547",description:"",solution:"",updateTime:1557367296e3},{moduleCode:"",detailCode:"12",description:"",solution:"",updateTime:1557229476e3},{moduleCode:"",detailCode:"10052",description:"余额不足",solution:"",updateTime:1557121463e3},{moduleCode:"",detailCode:"20108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:1556541725e3},{moduleCode:"",detailCode:"10009",description:"",solution:"",updateTime:1556422452e3},{moduleCode:"",detailCode:"320001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:1556419044e3},{moduleCode:"",detailCode:"120001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:155641903e4},{moduleCode:"",detailCode:"320049",description:"",solution:"",updateTime:1556272984e3},{moduleCode:"",detailCode:"380227",description:"",solution:"",updateTime:1556264379e3},{moduleCode:"",detailCode:"10033",description:"policy参数信息异常",solution:"",updateTime:1555922124e3},{moduleCode:"",detailCode:"10065",description:"weakAppKey 不属于accessToken对应的用户",solution:"",updateTime:1555497522e3},{moduleCode:"",detailCode:"100001",description:"",solution:"",updateTime:1555141776e3},{moduleCode:"",detailCode:"395558",description:"",solution:"",updateTime:1554987121e3},{moduleCode:"",detailCode:"70001",description:"智能家居买断用户设备受到限制,建议合理选择pagestart和pageSize",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"170001",description:"",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"1012",description:"重置失败",solution:"",updateTime:1554645841e3},{moduleCode:"",detailCode:"1043",description:"重置失败",solution:"",updateTime:1554645834e3},{moduleCode:"",detailCode:"60060",description:"直播功能未开通",solution:"通道未开通直播功能,请先开通直播",updateTime:1554346018e3},{moduleCode:"",detailCode:"380203",description:"",solution:"",updateTime:1554093666e3},{moduleCode:"",detailCode:"399048",description:"免费版并发数达到上限,请升级企业版使用多并发能力",solution:"升级成为企业版套餐即可取消并发数限制",updateTime:1553839878e3},{moduleCode:"",detailCode:"60007",description:"预置点个数超过最大值",solution:"",updateTime:1553671316e3},{moduleCode:"",detailCode:"1005",description:"",solution:"",updateTime:1553513701e3},{moduleCode:"",detailCode:"20605",description:"其他用户正在认证中",solution:"",updateTime:1552976317e3},{moduleCode:"",detailCode:"90004",description:"当前型号设备暂时不支持AI任务:CS-C3W-3B1WFR-YGL",solution:"",updateTime:1552898525e3},{moduleCode:"",detailCode:"60046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:1552872372e3},{moduleCode:"",detailCode:"3",description:"修改视频清晰度失败!",solution:"",updateTime:1552440229e3},{moduleCode:"",detailCode:"1013",description:"",solution:"",updateTime:1552035069e3},{moduleCode:"",detailCode:"370007",description:"",solution:"",updateTime:1551852327e3},{moduleCode:"",detailCode:"-1",description:"",solution:"",updateTime:1551752889e3},{moduleCode:"",detailCode:"30005",description:"弱账户不存在",solution:"",updateTime:1551422358e3},{moduleCode:"",detailCode:"90006",description:"用户操作AI任务受限",solution:"",updateTime:155107332e4},{moduleCode:"",detailCode:"60203",description:"未开通相关服务",solution:"",updateTime:155062307e4},{moduleCode:"",detailCode:"10002",description:"accessToken过期或异常",solution:"",updateTime:1550300346e3},{moduleCode:"",detailCode:"380339",description:"",solution:"",updateTime:1549889458e3},{moduleCode:"",detailCode:"90002",description:"AI任务设备配置数达到上限:3",solution:"",updateTime:1549071664e3},{moduleCode:"",detailCode:"380008",description:"",solution:"",updateTime:1549005979e3},{moduleCode:"",detailCode:"320227",description:"",solution:"",updateTime:1548739731e3},{moduleCode:"",detailCode:"60059",description:"ezopen地址均不可用",solution:"",updateTime:154839535e4},{moduleCode:"",detailCode:"10005",description:"appKey异常",solution:"",updateTime:1548317858e3},{moduleCode:"",detailCode:"60045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:1548155085e3},{moduleCode:"",detailCode:"60047",description:"码流类型不支持",solution:"",updateTime:1547962108e3},{moduleCode:"",detailCode:"60041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:154796098e4},{moduleCode:"",detailCode:"110029",description:"个人用户接口调用频率超限",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1547606859e3},{moduleCode:"",detailCode:"380355",description:"设备直连推流异常结束",solution:"",updateTime:1547106294e3},{moduleCode:"",detailCode:"320081",description:"",solution:"",updateTime:1547106279e3},{moduleCode:"",detailCode:"60035",description:"购买云存储服务失败",solution:"",updateTime:1547026959e3},{moduleCode:"",detailCode:"90005",description:"设备已存在:C75714141",solution:"",updateTime:1546940622e3},{moduleCode:"",detailCode:"1053445",description:"该时间段没有录像片段",solution:"",updateTime:1546935727e3},{moduleCode:"",detailCode:"90007",description:"设备未加入到AI任务",solution:"",updateTime:1546932948e3},{moduleCode:"",detailCode:"326000",description:"",solution:"",updateTime:1546823143e3},{moduleCode:"",detailCode:"1021",description:"重置失败",solution:"",updateTime:1546781152e3},{moduleCode:"",detailCode:"2001",description:"删除设备失败!",solution:"",updateTime:1546422886e3},{moduleCode:"",detailCode:"380425",description:"",solution:"",updateTime:1546407694e3},{moduleCode:"",detailCode:"120097",description:"",solution:"",updateTime:1546085995e3},{moduleCode:"",detailCode:"10059",description:"requestId已存在",solution:"",updateTime:1545824509e3},{moduleCode:"",detailCode:"1154723",description:"",solution:"",updateTime:1545795209e3},{moduleCode:"",detailCode:"60043",description:"添加的设备超出最大数量",solution:"",updateTime:1545493607e3},{moduleCode:"",detailCode:"1152677",description:"",solution:"",updateTime:1545313404e3},{moduleCode:"",detailCode:"20097",description:"设备添加异常,设备验证码为ABCDEF或设备被N1,R1关联",solution:"",updateTime:1545310795e3},{moduleCode:"",detailCode:"10060",description:"设备不支持该云存储类型",solution:"",updateTime:1545309064e3},{moduleCode:"",detailCode:"20102",description:"无相应邀请信息,无法接受邀请",solution:"",updateTime:1545204966e3},{moduleCode:"",detailCode:"10053",description:"云存储开通中",solution:"",updateTime:1545100293e3},{moduleCode:"",detailCode:"20401",description:"用户云空间信息不存在",solution:"",updateTime:154501788e4},{moduleCode:"",detailCode:"20600",description:"临时密码数已达上限",solution:"",updateTime:1544873457e3},{moduleCode:"",detailCode:"901",description:"",solution:"",updateTime:1544693519e3},{moduleCode:"",detailCode:"60210",description:"图片数据错误",solution:"",updateTime:1544604457e3},{moduleCode:"",detailCode:"10013",description:"您的应用没有权限调用",solution:"",updateTime:1544416237e3},{moduleCode:"",detailCode:"70007",description:"授权码不存在",solution:"",updateTime:1544179533e3},{moduleCode:"",detailCode:"10015",description:"授权地址不存在",solution:"",updateTime:154416324e4},{moduleCode:"",detailCode:"320423",description:"",solution:"",updateTime:1544100685e3},{moduleCode:"",detailCode:"370009",description:"",solution:"",updateTime:1544077151e3},{moduleCode:"",detailCode:"10031",description:"子账户或萤石用户没有权限",solution:"",updateTime:1543990462e3},{moduleCode:"",detailCode:"10055",description:"设备不支持试用云存储服务",solution:"",updateTime:1543986292e3},{moduleCode:"",detailCode:"60042",description:"添加的设备密码错误",solution:"",updateTime:1543710913e3},{moduleCode:"",detailCode:"60082",description:"设备正在响应本次声源定位",solution:"",updateTime:1543647426e3},{moduleCode:"",detailCode:"10056",description:"设备不支持云存储服务转出",solution:"",updateTime:1543558342e3},{moduleCode:"",detailCode:"20104",description:"好友不存在",solution:"",updateTime:1543492403e3},{moduleCode:"",detailCode:"20111",description:"好友不是等待验证状态,无法接受邀请",solution:"",updateTime:1543492365e3},{moduleCode:"",detailCode:"20107",description:"不能添加自己为好友",solution:"",updateTime:1543480986e3},{moduleCode:"",detailCode:"1",description:"设备返回其他错误",solution:"",updateTime:1543459921e3},{moduleCode:"",detailCode:"60084",description:"当前正在关闭隐私遮蔽",solution:"",updateTime:1543456515e3},{moduleCode:"",detailCode:"380255",description:"",solution:"",updateTime:1543411652e3},{moduleCode:"",detailCode:"20015",description:"设备不支持",solution:"",updateTime:1543390936e3},{moduleCode:"",detailCode:"30003",description:"手机验证码错误",solution:"",updateTime:1543389137e3},{moduleCode:"",detailCode:"20615",description:"锁用户已存在",solution:"",updateTime:1543388325e3},{moduleCode:"",detailCode:"60061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:1543372581e3},{moduleCode:"",detailCode:"60020",description:"设备不支持该信令",solution:"",updateTime:1543321636e3},{moduleCode:"",detailCode:"320146",description:"",solution:"",updateTime:1543318472e3},{moduleCode:"",detailCode:"60018",description:"设备升级失败",solution:"",updateTime:1543304928e3},{moduleCode:"",detailCode:"60044",description:"添加的设备网络不可达超时",solution:"",updateTime:1543304102e3},{moduleCode:"",detailCode:"20619",description:"主用户无法删除",solution:"",updateTime:1543290219e3},{moduleCode:"",detailCode:"20608",description:"锁用户不存在",solution:"",updateTime:154328195e4},{moduleCode:"",detailCode:"20609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:1543281601e3},{moduleCode:"",detailCode:"1049954",description:"升级设备失败",solution:"",updateTime:1543279264e3},{moduleCode:"",detailCode:"60009",description:"正在调用预置点",solution:"",updateTime:1543238114e3},{moduleCode:"",detailCode:"1052677",description:"获取本地录像失败",solution:"",updateTime:1543207604e3},{moduleCode:"",detailCode:"327000",description:"",solution:"",updateTime:1543196609e3},{moduleCode:"",detailCode:"20021",description:"设备在线,未被用户添加",solution:"",updateTime:1543193436e3},{moduleCode:"",detailCode:"20202",description:"操作留言信息失败",solution:"",updateTime:1543191562e3},{moduleCode:"",detailCode:"1052678",description:"获取本地录像失败",solution:"",updateTime:1543132218e3},{moduleCode:"",detailCode:"1054723",description:"格式化设备失败",solution:"",updateTime:1543129833e3},{moduleCode:"",detailCode:"20109",description:"对应分享不存在",solution:"",updateTime:1543129111e3},{moduleCode:"",detailCode:"60026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:1543110403e3},{moduleCode:"",detailCode:"60083",description:"当前正在开启隐私遮蔽",solution:"",updateTime:1543071148e3},{moduleCode:"",detailCode:"60001",description:"用户无云台控制权限",solution:"",updateTime:1543059167e3},{moduleCode:"",detailCode:"2003",description:"设备不在线",solution:"",updateTime:1543051046e3},{moduleCode:"",detailCode:"-24",description:"设置设备enable错误",solution:"",updateTime:1543042701e3},{moduleCode:"",detailCode:"10018",description:"",solution:"",updateTime:1543041564e3},{moduleCode:"",detailCode:"20103",description:"好友已存在",solution:"",updateTime:154303843e4},{moduleCode:"",detailCode:"70010",description:"授权异常请重试",solution:"",updateTime:154303559e4},{moduleCode:"",detailCode:"60056",description:"删除设备失败",solution:"",updateTime:1543031275e3},{moduleCode:"",detailCode:"60040",description:"添加的设备不在同一局域网",solution:"",updateTime:154303121e4},{moduleCode:"",detailCode:"60019",description:"加密已开启",solution:"",updateTime:1543029931e3},{moduleCode:"",detailCode:"1054722",description:"格式化设备失败",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"20016",description:"当前设备正在格式化",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"10024",description:"透明通道权限校验不通过",solution:"",updateTime:154302554e4},{moduleCode:"",detailCode:"6002",description:"删除设备失败!",solution:"",updateTime:1543025026e3},{moduleCode:"",detailCode:"1011",description:"验证码错误!",solution:"",updateTime:1543016865e3},{moduleCode:"",detailCode:"60032",description:"卡密已使用",solution:"",updateTime:1543006668e3},{moduleCode:"",detailCode:"10034",description:"子账号已存在",solution:"",updateTime:1542989194e3},{moduleCode:"",detailCode:"20301",description:"根据uuid查询联动信息不存在",solution:"",updateTime:1542988651e3},{moduleCode:"",detailCode:"1041",description:"获取验证码过于频繁",solution:"",updateTime:1542980953e3},{moduleCode:"",detailCode:"10012",description:"该appkey下已绑定重复的phone!",solution:"",updateTime:15429808e5},{moduleCode:"",detailCode:"1008",description:"phone不合法!",solution:"",updateTime:1542979812e3},{moduleCode:"",detailCode:"60023",description:"订阅操作失败",solution:"",updateTime:1542979006e3},{moduleCode:"",detailCode:"5",description:"设备返回其他错误",solution:"",updateTime:1542977828e3},{moduleCode:"",detailCode:"60006",description:"云台当前操作失败",solution:"",updateTime:1542977598e3},{moduleCode:"",detailCode:"131",description:"修改视频清晰度失败!",solution:"",updateTime:1542977246e3},{moduleCode:"",detailCode:"10019",description:"密码错误",solution:"",updateTime:1542976628e3},{moduleCode:"",detailCode:"10004",description:"用户不存在",solution:"",updateTime:1542976268e3},{moduleCode:"",detailCode:"20201",description:"操作报警信息失败",solution:"",updateTime:1542975906e3},{moduleCode:"",detailCode:"20024",description:"设备不在线,已经被别的用户添加",solution:"",updateTime:1542975858e3},{moduleCode:"",detailCode:"60004",description:"设备云台旋转达到左限位",solution:"",updateTime:1542975207e3},{moduleCode:"",detailCode:"1052679",description:"修改视频清晰度失败!",solution:"",updateTime:1542974886e3},{moduleCode:"",detailCode:"20031",description:"请在萤石客户端关闭终端绑定",solution:"",updateTime:1542974756e3},{moduleCode:"",detailCode:"1053825",description:"获取本地录像失败",solution:"",updateTime:1542974692e3},{moduleCode:"",detailCode:"60011",description:"预置点不存在",solution:"",updateTime:1542974414e3},{moduleCode:"",detailCode:"1052936",description:"修改视频清晰度失败!",solution:"",updateTime:154297439e4},{moduleCode:"",detailCode:"1016",description:"",solution:"",updateTime:1542974273e3},{moduleCode:"",detailCode:"10032",description:"子账号不存在",solution:"",updateTime:1542973906e3},{moduleCode:"",detailCode:"20013",description:"设备已被别人添加",solution:"",updateTime:1542973817e3},{moduleCode:"",detailCode:"50000",description:"服务器错误!",solution:"",updateTime:1542973801e3},{moduleCode:"",detailCode:"60010",description:"该预置点已经是当前位置",solution:"",updateTime:15429738e5},{moduleCode:"",detailCode:"60003",description:"设备云台旋转达到下限位",solution:"",updateTime:154297377e4},{moduleCode:"",detailCode:"4",description:"设备返回其他错误",solution:"",updateTime:1542973755e3},{moduleCode:"",detailCode:"60016",description:"加密未开启,无需关闭",solution:"",updateTime:1542973753e3},{moduleCode:"",detailCode:"60002",description:"设备云台旋转达到上限位",solution:"",updateTime:1542973742e3},{moduleCode:"",detailCode:"20023",description:"设备不在线,未被用户添加",solution:"",updateTime:1542973685e3},{moduleCode:"",detailCode:"10008",description:"",solution:"",updateTime:1542973676e3},{moduleCode:"",detailCode:"20010",description:"设备验证码错误",solution:"",updateTime:1542973658e3},{moduleCode:"",detailCode:"60005",description:"设备云台旋转达到右限位",solution:"",updateTime:1542973657e3},{moduleCode:"",detailCode:"20017",description:"设备已经被自己添加",solution:"",updateTime:1542973648e3},{moduleCode:"",detailCode:"20020",description:"设备在线,已经被自己添加",solution:"",updateTime:1542973533e3},{moduleCode:"",detailCode:"20029",description:"设备不在线,已经被自己添加",solution:"",updateTime:154297353e4},{moduleCode:"",detailCode:"10014",description:"APPKEY下对应的第三方userId和phone未绑定!",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"20002",description:"设备不存在",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"10030",description:"appkey和appsecret不匹配",solution:"",updateTime:154297349e4},{moduleCode:"",detailCode:"20022",description:"设备在线,已经被别的用户添加",solution:"",updateTime:1542973486e3},{moduleCode:"",detailCode:"20008",description:"设备响应超时",solution:"",updateTime:1542973484e3},{moduleCode:"",detailCode:"20032",description:"该用户下通道不存在",solution:"",updateTime:1542973481e3},{moduleCode:"",detailCode:"20006",description:"网络异常",solution:"",updateTime:1542973475e3},{moduleCode:"",detailCode:"20014",description:"deviceSerial不合法!",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20007",description:"设备不在线",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20018",description:"该用户不拥有该设备",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10010",description:"",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10011",description:"未绑定!",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"20001",description:"通道不存在!",solution:"",updateTime:1542973452e3},{moduleCode:"",detailCode:"10017",description:"appKey不存在",solution:"",updateTime:1542973451e3},{moduleCode:"",detailCode:"400259",description:"",solution:"",updateTime:1542875643e3},{moduleCode:"",detailCode:"400004",description:"",solution:"",updateTime:1542873364e3},{moduleCode:"",detailCode:"3840",description:"",solution:"",updateTime:154186e7},{moduleCode:"",detailCode:"-1017",description:"",solution:"",updateTime:1541733663e3},{moduleCode:"",detailCode:"320025",description:"",solution:"",updateTime:1541078281e3},{moduleCode:"",detailCode:"320024",description:"",solution:"",updateTime:1540801374e3},{moduleCode:"",detailCode:"321002",description:"",solution:"",updateTime:1540631734e3},{moduleCode:"",detailCode:"321000",description:"",solution:"",updateTime:1540609178e3},{moduleCode:"",detailCode:"321022",description:"",solution:"",updateTime:1540548345e3},{moduleCode:"",detailCode:"321016",description:"",solution:"",updateTime:1540287187e3},{moduleCode:"",detailCode:"320023",description:"",solution:"",updateTime:1539825993e3},{moduleCode:"",detailCode:"-1016",description:"",solution:"",updateTime:1539584931e3},{moduleCode:"",detailCode:"8",description:"",solution:"",updateTime:1539391812e3},{moduleCode:"",detailCode:"1075127593",description:"",solution:"",updateTime:1538959251e3},{moduleCode:"",detailCode:"380421",description:"",solution:"",updateTime:1537288465e3},{moduleCode:"",detailCode:"322000",description:"麦克风权限未开启",solution:"",updateTime:1536820136e3},{moduleCode:"",detailCode:"1152678",description:"",solution:"",updateTime:1536738348e3},{moduleCode:"",detailCode:"320047",description:"",solution:"",updateTime:1536664472e3},{moduleCode:"",detailCode:"327006",description:"",solution:"",updateTime:153613612e4},{moduleCode:"",detailCode:"1074807593",description:"",solution:"",updateTime:1536135035e3},{moduleCode:"",detailCode:"320291",description:"",solution:"",updateTime:1536110836e3},{moduleCode:"",detailCode:"320045",description:"",solution:"",updateTime:1535963775e3},{moduleCode:"",detailCode:"370004",description:"",solution:"",updateTime:1535883699e3},{moduleCode:"",detailCode:"1149954",description:"",solution:"",updateTime:1535700674e3},{moduleCode:"",detailCode:"320053",description:"",solution:"",updateTime:1535681079e3},{moduleCode:"",detailCode:"400000",description:"",solution:"",updateTime:1535532332e3},{moduleCode:"",detailCode:"110028",description:"个人版抓图接口日调用次数超出限制",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348756e3},{moduleCode:"",detailCode:"110027",description:"个人版帐号数量超出安全限制,无法调用",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348734e3},{moduleCode:"",detailCode:"110026",description:"设备数量超出个人版限制,当前设备无法操作",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348588e3},{moduleCode:"",detailCode:"100000",description:"",solution:"",updateTime:1534980008e3},{moduleCode:"",detailCode:"324004",description:"",solution:"",updateTime:1534927762e3},{moduleCode:"",detailCode:"360104",description:"",solution:"",updateTime:1534761006e3},{moduleCode:"",detailCode:"320204",description:"",solution:"",updateTime:1534584221e3},{moduleCode:"",detailCode:"380001",description:"",solution:"",updateTime:1534404715e3},{moduleCode:"",detailCode:"380204",description:"",solution:"",updateTime:1534401682e3},{moduleCode:"",detailCode:"328006",description:"",solution:"",updateTime:1534144407e3},{moduleCode:"",detailCode:"321703",description:"",solution:"",updateTime:1534127274e3},{moduleCode:"",detailCode:"321510",description:"",solution:"",updateTime:1533428892e3},{moduleCode:"",detailCode:"321006",description:"",solution:"",updateTime:1533036916e3},{moduleCode:"",detailCode:"50009",description:"",solution:"",updateTime:1532078548e3},{moduleCode:"",detailCode:"50007",description:"",solution:"",updateTime:153199172e4},{moduleCode:"",detailCode:"50018",description:"",solution:"",updateTime:1531912829e3},{moduleCode:"",detailCode:"380451",description:"",solution:"",updateTime:15316157e5},{moduleCode:"",detailCode:"380336",description:"",solution:"",updateTime:1531231721e3},{moduleCode:"",detailCode:"360020",description:"",solution:"",updateTime:1531117554e3},{moduleCode:"",detailCode:"380418",description:"",solution:"",updateTime:153110707e4},{moduleCode:"",detailCode:"1153445",description:"设备在该时间段内没有录像",solution:"",updateTime:1530944007e3},{moduleCode:"",detailCode:"110007",description:"调用接口总次数达到上限",solution:"请升级企业版,获取更高能力",updateTime:1530935584e3},{moduleCode:"",detailCode:"360019",description:"",solution:"",updateTime:1530869771e3},{moduleCode:"",detailCode:"360100",description:"",solution:"",updateTime:1530786188e3},{moduleCode:"",detailCode:"380042",description:"",solution:"",updateTime:1530775199e3},{moduleCode:"",detailCode:"320355",description:"",solution:"",updateTime:1530716074e3},{moduleCode:"",detailCode:"100003",description:"",solution:"",updateTime:1530232541e3},{moduleCode:"",detailCode:"371026",description:"",solution:"",updateTime:15301926e5},{moduleCode:"",detailCode:"102",description:"",solution:"",updateTime:1529895641e3},{moduleCode:"",detailCode:"380201",description:"",solution:"",updateTime:1529740929e3},{moduleCode:"",detailCode:"320054",description:"",solution:"",updateTime:1529544875e3},{moduleCode:"",detailCode:"500101",description:"",solution:"",updateTime:1529485953e3},{moduleCode:"",detailCode:"321001",description:"",solution:"",updateTime:1529411048e3},{moduleCode:"",detailCode:"321508",description:"",solution:"",updateTime:1529393279e3},{moduleCode:"",detailCode:"405991",description:"",solution:"",updateTime:1529380238e3},{moduleCode:"",detailCode:"380461",description:"",solution:"",updateTime:1529130941e3},{moduleCode:"",detailCode:"-1019",description:"",solution:"",updateTime:1529057245e3},{moduleCode:"",detailCode:"322009",description:"",solution:"",updateTime:1528965717e3},{moduleCode:"",detailCode:"324005",description:"",solution:"",updateTime:1528950153e3},{moduleCode:"",detailCode:"325000",description:"",solution:"",updateTime:1528947143e3},{moduleCode:"",detailCode:"326032",description:"",solution:"",updateTime:1528872971e3},{moduleCode:"",detailCode:"325032",description:"",solution:"",updateTime:1528863189e3},{moduleCode:"",detailCode:"328000",description:"",solution:"",updateTime:1528794505e3},{moduleCode:"",detailCode:"53",description:"",solution:"",updateTime:1528693249e3},{moduleCode:"",detailCode:"-1020",description:"",solution:"",updateTime:152849944e4},{moduleCode:"",detailCode:"329032",description:"",solution:"",updateTime:1528446301e3},{moduleCode:"",detailCode:"-1202",description:"",solution:"",updateTime:152843982e4},{moduleCode:"",detailCode:"2",description:"",solution:"",updateTime:1528434175e3},{moduleCode:"",detailCode:"1152936",description:"",solution:"",updateTime:1528345986e3},{moduleCode:"",detailCode:"328011",description:"",solution:"",updateTime:15283386e5},{moduleCode:"",detailCode:"28",description:"",solution:"",updateTime:152833753e4},{moduleCode:"",detailCode:"320356",description:"",solution:"",updateTime:1528188693e3},{moduleCode:"",detailCode:"320357",description:"",solution:"",updateTime:1528188517e3},{moduleCode:"",detailCode:"405800",description:"",solution:"",updateTime:1528168732e3},{moduleCode:"",detailCode:"405996",description:"",solution:"",updateTime:1528168686e3},{moduleCode:"",detailCode:"380357",description:"",solution:"",updateTime:1528011565e3},{moduleCode:"",detailCode:"328022",description:"",solution:"",updateTime:1527929065e3},{moduleCode:"",detailCode:"380003",description:"",solution:"",updateTime:1527927819e3},{moduleCode:"",detailCode:"50004",description:"",solution:"",updateTime:1527770643e3},{moduleCode:"",detailCode:"50011",description:"",solution:"",updateTime:1527770635e3},{moduleCode:"",detailCode:"370017",description:"",solution:"",updateTime:1527739514e3},{moduleCode:"",detailCode:"327032",description:"",solution:"",updateTime:1527726704e3},{moduleCode:"",detailCode:"324001",description:"",solution:"",updateTime:1527681892e3},{moduleCode:"",detailCode:"405997",description:"",solution:"",updateTime:1527653408e3},{moduleCode:"",detailCode:"405995",description:"",solution:"",updateTime:1527647283e3},{moduleCode:"",detailCode:"1153825",description:"",solution:"",updateTime:1527601747e3},{moduleCode:"",detailCode:"328002",description:"",solution:"",updateTime:1527495292e3},{moduleCode:"",detailCode:"1152679",description:"",solution:"",updateTime:1527486665e3},{moduleCode:"",detailCode:"380356",description:"",solution:"",updateTime:1527125669e3},{moduleCode:"",detailCode:"328032",description:"",solution:"",updateTime:1527069382e3},{moduleCode:"",detailCode:"22",description:"",solution:"",updateTime:1527049826e3},{moduleCode:"",detailCode:"9",description:"",solution:"",updateTime:1527006778e3},{moduleCode:"",detailCode:"89",description:"",solution:"",updateTime:1526622784e3},{moduleCode:"",detailCode:"328016",description:"",solution:"",updateTime:1526452365e3},{moduleCode:"",detailCode:"368005",description:"",solution:"",updateTime:1525921264e3},{moduleCode:"",detailCode:"0",description:"",solution:"",updateTime:1525920242e3},{moduleCode:"",detailCode:"380006",description:"",solution:"",updateTime:1525918868e3},{moduleCode:"",detailCode:"310",description:"",solution:"",updateTime:1525834436e3},{moduleCode:"",detailCode:"360011",description:"",solution:"",updateTime:1525681552e3},{moduleCode:"",detailCode:"170005",description:"",solution:"",updateTime:15254339e5},{moduleCode:"",detailCode:"50023",description:"",solution:"",updateTime:1525403338e3},{moduleCode:"",detailCode:"100131",description:"",solution:"",updateTime:1525229691e3},{moduleCode:"",detailCode:"-1018",description:"",solution:"",updateTime:1525142341e3},{moduleCode:"",detailCode:"362026",description:"",solution:"",updateTime:1524882677e3},{moduleCode:"",detailCode:"368007",description:"",solution:"",updateTime:1524832269e3},{moduleCode:"",detailCode:"54",description:"",solution:"",updateTime:1524793646e3},{moduleCode:"",detailCode:"1154722",description:"",solution:"",updateTime:1524620807e3},{moduleCode:"",detailCode:"320229",description:"",solution:"",updateTime:1524551682e3},{moduleCode:"",detailCode:"360012",description:"",solution:"",updateTime:1524472094e3},{moduleCode:"",detailCode:"380229",description:"",solution:"",updateTime:1524110755e3},{moduleCode:"",detailCode:"360016",description:"",solution:"",updateTime:1523933518e3},{moduleCode:"",detailCode:"-1003",description:"",solution:"",updateTime:1523584804e3},{moduleCode:"",detailCode:"410026",description:"",solution:"",updateTime:152351743e4},{moduleCode:"",detailCode:"360102",description:"TTS初始化失败",solution:"",updateTime:1523503528e3},{moduleCode:"",detailCode:"360013",description:"设备开启了隐私保护",solution:"",updateTime:1523503507e3},{moduleCode:"",detailCode:"360010",description:"设备正在对讲中",solution:"",updateTime:1523503491e3},{moduleCode:"",detailCode:"360007",description:"TTS关闭了与客户端的连接",solution:"",updateTime:1523503475e3},{moduleCode:"",detailCode:"360006",description:"客户端接收发生错误",solution:"",updateTime:1523503457e3},{moduleCode:"",detailCode:"360005",description:"客户端发送的消息错误",solution:"",updateTime:1523503437e3},{moduleCode:"",detailCode:"360004",description:"TTS内部发生错误",solution:"",updateTime:1523503421e3},{moduleCode:"",detailCode:"360003",description:"TTS的设备端发生错误",solution:"",updateTime:1523503397e3},{moduleCode:"",detailCode:"360002",description:"对讲发起超时",solution:"",updateTime:1523503376e3},{moduleCode:"",detailCode:"360001",description:"客户端请求超时",solution:"",updateTime:1523503357e3},{moduleCode:"",detailCode:"320077",description:"",solution:"",updateTime:1523444274e3},{moduleCode:"",detailCode:"370047",description:"",solution:"",updateTime:152344048e4},{moduleCode:"",detailCode:"100002",description:"",solution:"",updateTime:1523413964e3},{moduleCode:"",detailCode:"-1004",description:"",solution:"",updateTime:1523336653e3},{moduleCode:"",detailCode:"380000",description:"",solution:"",updateTime:1523180856e3},{moduleCode:"",detailCode:"380213",description:"",solution:"",updateTime:1523180623e3},{moduleCode:"",detailCode:"380101",description:"",solution:"",updateTime:1522834231e3},{moduleCode:"",detailCode:"50047",description:"",solution:"",updateTime:1522833243e3},{moduleCode:"",detailCode:"-999",description:"",solution:"",updateTime:1522831034e3},{moduleCode:"",detailCode:"320418",description:"",solution:"",updateTime:1522829072e3},{moduleCode:"",detailCode:"-1009",description:"",solution:"",updateTime:1522746247e3},{moduleCode:"",detailCode:"320209",description:"",solution:"",updateTime:1522744395e3},{moduleCode:"",detailCode:"368006",description:"",solution:"",updateTime:15227443e5},{moduleCode:"",detailCode:"369003",description:"",solution:"",updateTime:1522736355e3},{moduleCode:"",detailCode:"405989",description:"",solution:"",updateTime:1522726571e3},{moduleCode:"",detailCode:"-1012",description:"",solution:"",updateTime:1522726203e3},{moduleCode:"",detailCode:"322016",description:"",solution:"",updateTime:1522722918e3},{moduleCode:"",detailCode:"500103",description:"",solution:"",updateTime:1522655556e3},{moduleCode:"",detailCode:"405999",description:"",solution:"",updateTime:1522654716e3},{moduleCode:"",detailCode:"321032",description:"",solution:"",updateTime:1522647732e3},{moduleCode:"",detailCode:"381101",description:"",solution:"",updateTime:1522392414e3},{moduleCode:"",detailCode:"399999",description:"",solution:"",updateTime:1522379834e3},{moduleCode:"",detailCode:"380103",description:"",solution:"",updateTime:1522312724e3},{moduleCode:"",detailCode:"360014",description:"",solution:"",updateTime:1522304341e3},{moduleCode:"",detailCode:"-1005",description:"",solution:"",updateTime:1522288195e3},{moduleCode:"",detailCode:"100005",description:"",solution:"",updateTime:1522218849e3},{moduleCode:"",detailCode:"100004",description:"",solution:"",updateTime:1522209053e3},{moduleCode:"",detailCode:"106002",description:"",solution:"",updateTime:15222062e5},{moduleCode:"",detailCode:"410030",description:"",solution:"",updateTime:1522162252e3},{moduleCode:"",detailCode:"-1002",description:"",solution:"",updateTime:152215069e4},{moduleCode:"",detailCode:"-1200",description:"",solution:"",updateTime:1522139025e3},{moduleCode:"",detailCode:"-1001",description:"",solution:"",updateTime:1522046436e3},{moduleCode:"",detailCode:"-1011",description:"",solution:"",updateTime:1522045931e3},{moduleCode:"",detailCode:"381102",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"381103",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"391205",description:"vtdu解析服务器ip失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391206",description:"vtdu描述符select失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391207",description:"vtdu文件描述符不在可读中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391208",description:"vtdu网络发生错误getsockopt",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391209",description:"vtdu描述符select超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395000",description:"cas回复信令,发现内存已经释放(和设备之间异常断开)",msg:"播放失败请重试",solution:"检查设备网络;刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395400",description:"私有化协议vtm检测私有化协议中码流类型小于0或者设备序列号为空等非法参数场景返回(app不重试取流)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395402",description:"回放找不到录像文件",msg:"回放找不到录像文件,本地存储请检查存储卡是否接触良好",solution:"检查是否有存储卡并且接触良好",updateTime:1522034841e3},{moduleCode:"",detailCode:"395403",description:"操作码或信令密钥与设备不匹配",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395404",description:"设备不在线",solution:"检查设备网络;重启设备接入萤石云",msg:"设备不在线,请检查设备网络或重启设备接入萤石云",updateTime:1522034841e3},{moduleCode:"",detailCode:"395405",description:"流媒体向设备发送或接受信令超时/cas响应超时",msg:"播放失败,请检查设备网络或重启设备",solution:"检查设备网络;重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395406",description:"token失效",msg:"播放失败请重试或重启设备",solution:"刷新重试或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395407",description:"客户端的URL格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395409",description:"预览开启隐私保护",msg:"播放失败请关闭隐私遮蔽",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395410",description:"设备达到最大连接数",solution:"请升级设备固件版本",updateTime:1522034841e3},{moduleCode:"",detailCode:"395411",description:"token无权限",msg:"播放失败",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395412",description:"session不存在",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395413",description:"验证token的他异常(不具体) ",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395415",description:"设备通道错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395416",description:"设备资源受限",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395451",description:"设备不支持的码流类型",msg:"播放失败请重试或切换设备码流",solution:"刷新重试或者切换到高清模式",updateTime:1522034841e3},{moduleCode:"",detailCode:"395452",description:"设备链接流媒体服务器失败",msg:"播放失败,请检查设备网络或重启设备或重新加载",solution:"检查设备网络,重启设备,刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395454",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395455",description:"设备通道未关联",msg:"播放失败,请检查设备通道是否关联",solution:"检查设备通道是否关联",updateTime:152222018e4},{moduleCode:"",detailCode:"395456",description:"设备通道关联设备不在线",msg:"播放失败,请检查设备通道是否上线",solution:"检查设备通道是否上线",updateTime:152222018e4},{moduleCode:"",detailCode:"395457",description:"客户端不支持端到端加密",msg:"播放失败",solution:"客户端不支持端到端加密",updateTime:152222018e4},{moduleCode:"",detailCode:"395458",description:"设备不支持当前并发ECDH密",msg:"客户端不支持端到端加密",solution:"设备不支持当前并发ECDH密",updateTime:152222018e4},{moduleCode:"",detailCode:"395459",description:"VTDU 处理ECDH 加密失败",msg:"播放失败",solution:"VTDU 处理ECDH 加密失败",updateTime:152222018e4},{moduleCode:"",detailCode:"395460",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395492",description:"设备不支持的命令",msg:"操作失败,设备不支持",solution:"",updateTime:152222018e4},{moduleCode:"",detailCode:"395500",description:"服务器处理失败",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395501",description:"流媒体vtdu达到最大负载,请扩容",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395503",description:"vtm返回分配vtdu失败",msg:"播放失败请重试",solution:"vtdu服务异常,请请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395504",description:"流媒体vtdu达到最大负载",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395505",description:"vtm ecdh解密失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395506",description:"vtm 返回IPC不支持取流(需要IPC添加NVR后支持)",msg:"播放失败,请绑定NVR使用",solution:"IPC绑定NVR使用",updateTime:1522034841e3},{moduleCode:"",detailCode:"395544",description:"设备返回无视频源",msg:"播放失败,请检查设备接触情况",solution:"设备是否接触良好; 如果一直无法解决,请联系技术支持",updateTime:1522034841e3},{moduleCode:"",detailCode:"395545",description:"视频分享时间已经结束",msg:"视频分享时间已结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395546",description:"vtdu返回达到取流并发路数限制",msg:"并发上限,请升级为企业版",solution:"请升级为企业版,放开并发限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395547",description:"vtdu返回开放平台用户并发限制",msg:"并发上限,请升级为企业版",solution:"请确定开放平台用户预览是否超过用户并发数量限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395556",description:"ticket校验失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395557",description:"回放服务器等待流头超时",msg:"播放失败请重试",solution:"刷新重试,检测设备网络,重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395558",description:"查找录像开始时间错误",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395560",description:"群组分享取流二次验证失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395561",description:"分享群组用户被锁住",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395562",description:"群组分享用户权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395563",description:"认证服务连接失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395564",description:"认证超时",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395566",description:"不在分享时间内预览",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395567",description:"分享通道被锁定",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395568",description:"未找到认证类型",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395569",description:"认证返回的参数异常",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395600",description:"分享设备不在分享时间内",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395601",description:"群组分享用户没权限",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395602",description:"群组分享权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395610",description:"接收流头失败",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395620",description:"心跳超时",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395530",description:"机房故障不可用",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395701",description:"cas信令返回格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395702",description:"SPGW请求Cas、Status透传超时",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395703",description:"SPGW请求http不通",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396001",description:"客户端参数出错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396099",description:"客户端默认错误",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396101",description:"不支持的命令",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396102",description:"设备流头发送失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396103",description:"cas/设备返回错误1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396104",description:"cas/设备返回错误-1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396105",description:"设备返回错误码3",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396106",description:"设备返回错误码4",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396107",description:"设备返回错误码5",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396108",description:"cas信令回应重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396109",description:"视频广场取消分享",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396110",description:"设备信令默认错误",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396501",description:"设备数据链路和实际链路不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396502",description:"设备数据链路重复建立连接",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396503",description:"设备数据链路端口不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396504",description:"缓存设备数据链路失败(内存块不足)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396505",description:"设备发送确认头消息重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396506",description:"设备数据先于确定头部到达",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396508",description:"设备数据头部长度非法",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396509",description:"索引找不到设备数据管理块",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396510",description:"设备数据链路vtdu内存块协议状态不匹配",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396511",description:"设备数据头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396512",description:"设备数据头部非法(较笼统)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396513",description:"设备数据长度过小",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396514",description:"设备老协议推流头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396515",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396516",description:"设备老协议索引找不到内存管理块",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396517",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396518",description:"设备数据包过大",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396519",description:"设备推流链路网络不稳定",msg:"播放失败,请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396520",description:"设备推流链路网络不稳定(默认)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396700",description:"异常数据包",msg:"播放失败,设备重启",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396701",description:"回放结束数据包",msg:"回放结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397001",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397002",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397003",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397004",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397005",description:"VTDU连接失败,或VTDU侧断开连接",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397006",description:"vtm断开连接(无需 关注)",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397007",description:"客户端发送缓冲区满(上行带宽太小)",msg:"播放失败,上行带宽过小请检查设备网络情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399000",description:"无效包,包过大",msg:" 检查设备重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399001",description:"地址不合法",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399002",description:"缺少端口",msg:" 播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"170003",description:"refreshToken不存在",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"170004",description:"refreshToken已过期",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"380011",description:"设备隐私保护中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380045",description:"设备直连取流连接数量过大",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380047",description:"设备不支持该命令",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380077",description:"设备正在对讲中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380102",description:"数据接收异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380205",description:"设备检测入参异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380209",description:"网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380212",description:"设备端网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"101007",description:"手机号未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120503",description:"正在响铃",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390016",description:"vtdu成功响应未携带流头",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101008",description:"手机号码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120504",description:"室内机正在通话",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390017",description:"无数据流,尚未使用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101009",description:"用户名与手机不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120505",description:"设备操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390018",description:"信令消息体PB解析失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101010",description:"获取验证码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120506",description:"非法命令",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390019",description:"信令消息体PB封装失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101011",description:"验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120507",description:"智能锁密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390020",description:"申请系统内存资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101012",description:"验证码失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120508",description:"开关锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390021",description:"vtdu地址尚未获取到",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101013",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120509",description:"开关锁超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390022",description:"客户端尚未支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101014",description:"密码不正确或者appKey不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120510",description:"智能锁设备繁忙",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390023",description:"获取系统socket资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101015",description:"用户被锁住",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120511",description:"远程开锁功能未打开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390024",description:"上层填充的StreamSsnId不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101021",description:"验证参数异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120600",description:"临时密码数已达上限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390025",description:"链接服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101026",description:"邮箱已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120601",description:"添加临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390026",description:"客户端请求未收到服务端应答",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101031",description:"邮箱未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120602",description:"删除临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390027",description:"链路断开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101032",description:"邮箱不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120603",description:"该临时密码不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390028",description:"没有取流链接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101041",description:"获取验证码过于频繁",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120604",description:"指纹锁射频通信失败,请稍后再试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390029",description:"流成功停止",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101043",description:"手机验证码输入错误超过规定次数",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120605",description:"其他用户正在认证中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390030",description:"客户端防串流校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102000",description:"设备不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120606",description:"验证已启动,请在120s内进行本地验证和调用添加设备接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390031",description:"应用层tcp粘包处理缓冲区满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102001",description:"摄像机不存在",solution:"摄像机未注册到萤石云平台,请仔细检查摄像机的网络配置,确保连接到网络",updateTime:152203484e4},{moduleCode:"",detailCode:"120607",description:"删除用户失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390032",description:"无效状态迁移",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102003",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"120608",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390033",description:"无效客户端状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102004",description:"设备异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390034",description:"向vtm取流流媒体信息请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102007",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120610",description:"获取临时密码列表失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390035",description:"向代理取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102009",description:"设备请求响应超时异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130001",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390036",description:"向代理保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105000",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130002",description:"手机号码已经注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390037",description:"向vtdu取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105001",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130003",description:"手机验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390038",description:"向vtdu保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105002",description:"设备验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130004",description:"终端绑定操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391001",description:"vtm地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107001",description:"邀请不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"149999",description:"数据异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391002",description:"vtm生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107002",description:"邀请验证失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"150000",description:"服务器异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391003",description:"vtm设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107003",description:"邀请用户不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160000",description:"设备不支持云台控制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391004",description:"vtm设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107004",description:"云存储连接失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160001",description:"用户无云台控制权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391005",description:"vtm解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"7005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160002",description:"设备云台旋转达到上限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391006",description:"vtm描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107006",description:"不能邀请自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160003",description:"设备云台旋转达到下限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391007",description:"vtm文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107007",description:"重复邀请",solution:"分享和删除分享必须全部由接口形式操作,如果与萤石客户端混用会造成这个问题,解决办法:在萤石客户端清空所有相关分享数据并重新添加设备,再通过接口操作即可",updateTime:152203484e4},{moduleCode:"",detailCode:"160004",description:"设备云台旋转达到左限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391008",description:"vtm网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110001",description:"参数错误",solution:"参数为空或者格式不对",updateTime:152203484e4},{moduleCode:"",detailCode:"160005",description:"设备云台旋转达到右限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391009",description:"vtm描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110002",description:"accessToken异常或过期",solution:"accessToken有效期为七天,建议在accessToken即将过期或者出现10002错误码的时候重新获取accessToken",updateTime:152203484e4},{moduleCode:"",detailCode:"160006",description:"云台当前操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391101",description:"proxy地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110004",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160007",description:"预置点个数超过最大值",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391102",description:"proxy生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110005",description:"appKey异常",solution:"确认appKey状态,不通过或者冻结状态会返回该错误码",updateTime:152203484e4},{moduleCode:"",detailCode:"160009",description:"正在调用预置点",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391103",description:"proxy设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110006",description:"ip受限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160010",description:"该预置点已经是当前位置",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391104",description:"proxy设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160011",description:"预置点不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391105",description:"proxy解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110008",description:"签名错误",solution:"①获取签名方式详见apidemo及[旧]API文档 ②注意编码格式为UTF-8",updateTime:152203484e4},{moduleCode:"",detailCode:"160013",description:"设备版本已是最新",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391106",description:"proxy描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110009",description:"签名参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160014",description:"设备正在升级",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391107",description:"proxy文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110010",description:"签名超时",solution:"请调用同步服务器时间接口进行校时",updateTime:152203484e4},{moduleCode:"",detailCode:"160015",description:"设备正在重启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391108",description:"proxy网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110011",description:"未开通萤石云服务",solution:"参照绑定流程",updateTime:152203484e4},{moduleCode:"",detailCode:"160016",description:"加密未开启,无须关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391109",description:"proxy描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110012",description:"第三方账户与萤石账号已经绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160017",description:"设备抓图失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391201",description:"vtdu地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110013",description:"应用没有权限调用此接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160018",description:"设备升级失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391202",description:"vtdu生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110014",description:"APPKEY下对应的第三方userId和phone未绑定",solution:"获取AccessToken时所用appKey与SDK所用appKey不一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160019",description:"加密已开启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391203",description:"vtdu设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110017",description:"appKey不存在",solution:"请填写在官网申请的应用秘钥",updateTime:152203484e4},{moduleCode:"",detailCode:"160020",description:"不支持该命令",solution:"请确认设备是否支持该命令",updateTime:152203484e4},{moduleCode:"",detailCode:"391204",description:"vtdu设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110018",description:"AccessToken与Appkey不匹配",solution:"请检查获取accessToken对应的appKey和SDK中设置的appKey是否一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160023",description:"订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110019",description:"密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160024",description:"取消订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110020",description:"请求方法为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160025",description:"客流统计配置失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110021",description:"ticket校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110022",description:"透传目的地非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160027",description:"设备正在镜像操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110024",description:"无透传权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160028",description:"设备正在键控动作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110025",description:"appKey被禁止使用通明通道",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160029",description:"设备处于语音对讲状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160030",description:"卡密输入错误次数过多,24小时后再输入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160031",description:"卡密信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160032",description:"卡密状态不对或已过期",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160033",description:"卡密非卖品,只能开通对应的绑定设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110030",description:"appKey和appSecret不匹配",solution:"请检查appKey和appSecret是否对应",updateTime:152203484e4},{moduleCode:"",detailCode:"160035",description:"购买云存储服务失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110031",description:"子账户或萤石用户没有权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160040",description:"添加的设备不在同一局域网",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110032",description:"子账户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110033",description:"子账户未设置授权策略",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160042",description:"添加的设备密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110034",description:"子账户已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160043",description:"添加的设备超出最大数量",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110035",description:"获取子账户AccessToken异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160044",description:"添加的设备网络不可达超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110036",description:"子账户被禁用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110051",description:"无权限进行抓图",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160047",description:"码流类型不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120002",description:"设备不存在",solution:"①设备没有注册到萤石云平台,请检查下设备网络参数,确保能正常连接网络②设备序列号不存在",updateTime:152203484e4},{moduleCode:"",detailCode:"160048",description:"带宽超出系统接入带宽",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120003",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160049",description:"IP或者端口不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120004",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160050",description:"添加的设备版本不支持需要升级才能接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120005",description:"安全认证失败,需进行SDK安全认证",solution:"已去掉安全验证",updateTime:152203484e4},{moduleCode:"",detailCode:"160051",description:"添加的设备不支持接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120006",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160052",description:"添加的设备通道号出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120007",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"160053",description:"添加的设备分辨率不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120008",description:"设备响应超时",solution:"设备响应超时,请检测设备网络或重试",updateTime:152203484e4},{moduleCode:"",detailCode:"160054",description:"添加的设备账号被锁定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120009",description:"子账号不能添加设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160055",description:"添加的设备取码流出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120010",description:"设备验证码错误",solution:"验证码在设备标签上,六位大写字母,注意大小写",updateTime:152203484e4},{moduleCode:"",detailCode:"160056",description:"删除设备失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120012",description:"设备添加失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160057",description:"删除的设备未关联",solution:"检查IPC与NVR是否有关联关系",updateTime:152203484e4},{moduleCode:"",detailCode:"120013",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160060",description:"地址未绑定",solution:"请前往官网设置直播",updateTime:152203484e4},{moduleCode:"",detailCode:"120014",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120015",description:"设备不支持该功能",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160062",description:"该通道直播已开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120016",description:"当前设备正在格式化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160063",description:"直播未使用或直播已关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120017",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160070",description:"设备不能转移给自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120018",description:"该用户不拥有该设备",solution:"确认设备是否属于用户",updateTime:152203484e4},{moduleCode:"",detailCode:"160071",description:"设备不能转移,设备与其他设备存在关联关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400001",description:"参数为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120019",description:"设备不支持云存储服务",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160072",description:"设备不能转移,通道被分享给其他用户或者分享到视频广场",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400002",description:"参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120020",description:"设备在线,被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160073",description:"云存储转移失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400025",description:"设备不支持对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120021",description:"设备在线,但是未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160080",description:"当前正在声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400029",description:"没有初始化或资源被释放",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120022",description:"设备在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160081",description:"当前正在轨迹巡航",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400030",description:"json解析异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120023",description:"设备不在线,未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160082",description:"设备正在响应本次声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400031",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120024",description:"设备不在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160083",description:"当前正在开启隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400032",description:"设备信息异常为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120025",description:"重复申请分享",solution:"确认设备是否由添加过该设备且申请过分享的账户下是否还存在分享记录",updateTime:152203484e4},{moduleCode:"",detailCode:"160084",description:"当前正在关闭隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400034",description:"取流超时",solution:"一般是由于网络状况不好导致,可以尝试下让用户重新播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120026",description:"视频广场不存在该视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"380290",description:" 连接CAS服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400035",description:"设备已加密,需要输入验证码",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120027",description:"视频转码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361001",description:"对讲服务端排队超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400036",description:"播放验证码错误",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120028",description:"设备固件升级包不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361002",description:"对讲服务端处理超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400037",description:"surfacehold错误",solution:"请检查是否是播放之前销毁了surface,收到此错误也可以重新建立surface后播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120029",description:"设备不在线,但是已经被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361003",description:"设备链接对讲服务器超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400100",description:"未知错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120030",description:"该用户不拥有该视频广场视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361004",description:"服务器内部错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400200",description:"player sdk出错,这种错误一般开发者也是无法解决,不具体分类传出,传一个统一的inner错误码出去",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120031",description:"开启终端绑定,硬件特征码验证失败",solution:"请在萤石客户端关闭终端绑定,参考此步骤",updateTime:152203484e4},{moduleCode:"",detailCode:"361005",description:"解析消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400300",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120032",description:"该用户下通道不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361006",description:"请求重定向--需要向其他服务申请对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400901",description:"设备不在线,可以提示用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120033",description:"无法收藏自己分享的视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361007",description:"请求url非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400902",description:"accesstoken异常或失效,需要重新获取accesstoken,并传入到sdk",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120034",description:"该用户下无设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361008",description:"token失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400903",description:"当前账号开启了终端绑定,只允许指定设备登录操作,提示用户登录i.ys7.com解除终端绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120090",description:"用户反馈失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361009",description:"设备验证码或者通信秘钥不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400904",description:"设备正在对讲中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120095",description:"APP包下载失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361010",description:"设备已经在对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400905",description:"设备开启了隐私保护,不允许预览、对讲等",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120096",description:"APP包信息删除失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361011",description:"设备10s响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120101",description:"视频不支持分享给本人",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361012",description:"设备不在线",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320002",description:"参数无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120102",description:"无相应邀请信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361013",description:"设备开启隐私保护拒绝对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320003",description:"暂不支持此操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120103",description:"好友已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361014",description:"token无权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320004",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120104",description:"好友不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361015",description:"设备返回session不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320005",description:"创建CAS session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120105",description:"好友状态错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361016",description:"验证token其他异常错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320006",description:"创建cloud session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120106",description:"对应群组不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361017",description:"服务端监听设备建立端口超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320007",description:"token失效",solution:"重新设置token后再重试",updateTime:152203484e4},{moduleCode:"",detailCode:"120107",description:"不能添加自己为好友",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361018",description:"设备链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320008",description:"token池里面没有token,请传入token",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361019",description:"对讲服务端不支持的信令消息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320009",description:"传入新的INIT_PARAM并reset(保留,目前未用)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120109",description:"对应分享不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361020",description:"对讲服务端解析对讲请求未携带会话描述能力集",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320010",description:"请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120110",description:"好友群组不属于当前用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361021",description:"对讲服务端优先能力集结果为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320011",description:"500毫秒后请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120111",description:"好友不是等待验证状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361022",description:"cas链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320012",description:"token池已满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120112",description:"添加应用下的用户为好友失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361023",description:"对讲服务端分配对讲会话资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320013",description:"P2P client超过限制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120201",description:"操作报警信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361024",description:"对讲服务端解析信令消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320014",description:"sdk未初始化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120202",description:"操作留言信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390001",description:"通用错误返回",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320015",description:"超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120301",description:"根据UUID查询报警消息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390002",description:"入参为空指针",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320016",description:"正在打洞中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120302",description:"根据UUID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390003",description:"入参值无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320017",description:"没有视频文件头(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120303",description:"根据FID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390004",description:"信令消息解析非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320018",description:"解码错误/超时(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120305",description:"设备ip解析错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390005",description:"内存资源不足",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320019",description:"取消(保留,用户不用处理)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120401",description:"用户云空间信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390006",description:"协议格式不对或者消息体长度超过STREAM_MAX_MSGBODY_LEN",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320020",description:"播放过程中预连接被用户清除预操作信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120402",description:"云空间操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390007",description:"设备序列号长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320021",description:"流加密码不对",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120403",description:"用户目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390008",description:"取流url长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320022",description:"未传入播放窗口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120404",description:"要操作的目标目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390009",description:"解析vtm返回vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"100200",description:"操作成功",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120405",description:"要删除的文件信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390010",description:"解析vtm返回级联vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101001",description:"用户名不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120406",description:"已开通云存储",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390011",description:"解析vtm返回会话标识长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101002",description:"用户名已被占用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120407",description:"开通记录失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390012",description:"vtdu返回流头长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101003",description:"密码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120500",description:"获取数据错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390013",description:"vtdu会话长度非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101004",description:"密码为同一字符",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120501",description:"开锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390014",description:"回调函数未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101006",description:"手机号码已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120502",description:"室内机未收到呼叫",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390015",description:"vtdu成功响应未携带会话标识",solution:"",updateTime:152203484e4}],W="200",Y="操作成功!",Q={data:G,code:W,msg:Y},K=function(){function Z(H,w){i(this,Z),this.coreX=H,this.coreY=w,console.log("ErrorCode",Q)}return a(Z,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchErrorInfo",value:function(w){return Q.data.find(function(T){return T.detailCode.substr(-4)==w})}}]),Z}(),ae={color:"red",backgroundColor:"red",activeColor:"red",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-0",iconId:"deviceID",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"},{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-1",iconId:"deviceName",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},ie={color:"blue",backgroundColor:"blue",activeColor:"blue",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-footer-0",iconId:"play",part:"left",defaultActive:0,isrender:0,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},he={header:ae,footer:ie},Ee=function Z(H){this.jsPlugin=H;var w={isMouseDown:!1,isOver:!1,mousePosition:null,oldTime:null,nowTime:null,moved:null,hoverTime:"2018-12-07 12:00:00",hoverLeft:0,timeTipShow:!1,randomNum:123,timeWidthTbls:[60,1800,3600,86400],timeUnits:["范围: 1分钟; 单位: 秒","范围: 30分钟; 单位: 分钟","范围: 1小时; 单位: 分钟","范围: 1天; 单位: 小时","范围: 3天; 单位: 小时"],drawPen:null,timeSection:[],canvasWidth:null,canvasHeight:null,timeTips:null},T=this;Object.keys(w).forEach(function(R){T[R]=w[R]}),this.options={width:this.canvasWidth,height:48,time:new Date().getTime(),timeSection:[],timeWidth:0},Z.prototype.subTime=function(R){return R<10?"0"+R:R},Z.prototype.tranTime=function(R){var N=R;if(R){var z=new Date(R);N=z.getFullYear()+"/"+(z.getMonth()+1)+"/"+z.getDate()+" "+this.subTime(z.getHours())+":"+this.subTime(z.getMinutes())+":"+this.subTime(z.getSeconds())}return N},Z.prototype.init=function(R){R.width&&document.getElementById(R.id).setAttribute("width",parseInt(R.width,10)+"px");var N=this,z=this.options;N.randomNum=(Math.random()+"").split(".").join(""),N.timeWidthTblIndex=z.timeWidth;var U=document.querySelector("#".concat(this.jsPlugin.id,"-canvas"));N.drawPen=U.getContext("2d"),N.nowTime=z.time||Date.now(),N.timeSection=z.timeSection||[],N.canvasWidth=U.offsetWidth,N.canvasHeight=U.offsetHeight,N.updata(),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mousemove",function(ue){N.options.readOnly||N.mousemove(ue)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseover",function(ue){N.options.readOnly||N.mouseover(ue)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseleave",function(ue){N.options.readOnly||N.mouseleave(ue)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mousedown",function(ue){N.options.readOnly||N.mousedown(ue)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseup",function(ue){if(!N.options.readOnly){var pe=R.onChange;N.mouseUpFn(ue,pe)}})},Z.prototype.setWidth=function(R){var N=this,z=this;R.width&&(document.getElementById(this.jsPlugin.id).style.width=R.width,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=R.width,document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=R.width,z.canvasWidth=R.width,setTimeout(function(){N.updata({time:new Date})},500))},Z.prototype.mousemove=function(R){if(this.isMouseDown&&this.isOver){var N=this.mousePosition-R.pageX;if(N===0)return;var z=0;switch(this.timeWidth){case 60:z=1/10;break;case 1800:z=1/20*60;break;case 3600:z=1/20*60;break;case 86400:z=1/30*60*60;break}var U=new Date(this.oldTime).getTime()+N*z*1e3;this.updata({time:U}),this.moved=!0}else{var ue=parseInt(document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).offsetLeft,10);this.mousePosition=R.pageX-ue,this.updata()}},Z.prototype.mousedown=function(R){this.isMouseDown=!0,this.mousePosition=R.pageX,this.oldTime=this.nowTime},Z.prototype.mouseover=function(R){this.isOver=!0},Z.prototype.mouseleave=function(R){this.isOver=!1,this.isMouseDown=!1,this.updata()},Z.prototype.changeSize=function(R){console.log("changeSize",R),this.options.timeWidth=R,this.updata({timeWidth:R})},Z.prototype.mouseUpFn=function(R,N){if(this.isMouseDown&&(this.isMouseDown=!1,this.moved)){this.moved=!1;var z=this.subTime(new Date(this.nowTime).getHours())+":"+this.subTime(new Date(this.nowTime).getMinutes())+":"+this.subTime(new Date(this.nowTime).getSeconds()),U=new Date(this.oldTime).getFullYear()+"/"+(new Date(this.oldTime).getMonth()+1)+"/"+new Date(this.oldTime).getDate();this.nowTime=new Date("".concat(U," ").concat(z)),this.updata({time:this.nowTime}),this.oldTime=this.nowTime,console.log("nowTime",new Date(this.nowTime),"".concat(U," ").concat(z)),N(this.nowTime)}},Z.prototype.readOnly=function(R){console.log("更改为只读"),this.options.readOnly=!0,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="not-allowed"},Z.prototype.unReadOnly=function(R){console.log("更改为只读"),this.options.readOnly=!1,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="pointer"},Z.prototype.run=function(R){this.isMouseDown||this.updata(R)},Z.prototype.getTime=function(R){console.log("this",this),console.log("当前时间",new Date(this.nowTime))},Z.prototype.updata=function(R){var N=this;R=R||{},N.nowTime=R.time||N.nowTime,N.timeSection=R.timeSection||N.timeSection,N.timeWidthTblIndex=R.timeWidth||N.timeWidthTblIndex,N.timeWidth=N.timeWidthTbls[R.timeWidth||N.timeWidthTblIndex],N.timeUnit=N.timeUnits[R.timeWidth||N.timeWidthTblIndex],R.timeWidth===0&&(N.timeWidthTblIndex=0,N.timeWidth=N.timeWidthTbls[0],N.timeUnit=N.timeUnits[0]),N.drawPen.fillStyle="#000000",N.drawPen.fillRect(0,0,N.canvasWidth,N.canvasHeight),N.drawScale(),N.drawRecord(),N.drawOtherMsg(),document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=N.options.width+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=N.options.width+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.height=N.options.height+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.height=N.options.height+"px"},Z.prototype.drawSolidLine=function(R,N,z,U,ue,pe){this.drawPen.save(),this.drawPen.strokeStyle=pe,this.drawPen.lineWidth=ue,this.drawPen.beginPath(),this.drawPen.moveTo(R,N),this.drawPen.lineTo(z,U),this.drawPen.stroke(),this.drawPen.restore()},Z.prototype.drawString=function(R,N,z,U,ue){this.drawPen.font="12px serif",this.drawPen.fillStyle="#ffffff",this.drawPen.textAlign=U||"left",this.drawPen.fillText(R,N,z+10)},Z.prototype.drawScale=function(){var R=this,N="rgba(255,255,255)",z=new Date(R.nowTime),U=z.getFullYear(),ue=z.getSeconds(),pe=z.getMinutes(),de=z.getHours(),se=z.getDate(),re=0;switch(R.timeWidth){case 60:{var Oe=parseInt(R.canvasWidth/10);z.setSeconds(z.getSeconds()-parseInt(Oe/2,10)),se=z.getDate(),de=z.getHours(),pe=z.getMinutes(),ue=z.getSeconds();for(var be=0;beN.canvasWidth&&(be=N.canvasWidth),be<=0&&(be=0),be}},Z.prototype.drawOtherMsg=function(){this.drawSolidLine(this.canvasWidth/2,0,this.canvasWidth/2,this.canvasHeight,2,"#1890FF"),this.drawPen.shadowBlur=0,this.isOver&&!this.isMouseDown?(this.mouseTime=this.mousePosition/this.canvasWidth*this.timeWidth*1e3+this.nowTime-this.timeWidth/2*1e3,this.mouseString=this.tranTime(this.mouseTime),this.hoverTime=this.mouseString,this.hoverLeft=this.mousePosition-60,this.timeTipShow=!0):this.timeTipShow=!1}},He=function(){function Z(H){if(i(this,Z),this.jSPlugin=H,!document.getElementById("".concat(this.jSPlugin.id,"-audioControls")))return!1;this.currentTimeWidth=0,this.date=new Date,this.datepickerVisible=!1,this.seekTimer=null,this.disabled=!1,this.seekFrequency=2e3,this.jSPlugin.params&&this.jSPlugin.params.seekFrequency&&(this.seekFrequency=this.jSPlugin.params.seekFrequency),this.recInit()}return a(Z,[{key:"recInit",value:function(){var w=this;this.currentTimeWidth=0;var T=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100,R=document.createElement("div");R.style="display:inline-block;height:48px;",R.id=this.jSPlugin.id+"-canvas-container";var N=document.createElement("canvas");N.id=this.jSPlugin.id+"-canvas",N.className="time-line-body",N.height="48",N.width=T,N.style="display:inline-block;",N.innerHTML="该浏览器不支持canvas",R.appendChild(N),h(R,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")));var z=document.createElement("div");z.className="timeline-controls",z.style="display:flex;width:100px;height:48px;text-align:center;line-height: 48px;vertical-align: top;background: #000000;";var U=`
add reduce
`);z.innerHTML=U,h(z,R),this.timeLine=new Ee(this.jSPlugin),this.timeLine.init({id:this.jSPlugin.id+"-canvas",width:T,onChange:function(re){console.log("time",re,new Date(re).Format("yyyyMMddhhmmss"));var Oe=new Date(re).Format("yyyyMMddhhmmss");if(console.log("----------------this.jSPlugin.url",w.jSPlugin.url),S(w.jSPlugin.url).type==="cloud.rec"||w.jSPlugin.capacity&&w.jSPlugin.capacity.support_seek_playback=="1"){var be=function(){w.jSPlugin.seek(Oe.substr(8,6),"235959"),w.unSyncTimeLine(),setTimeout(function(){w.syncTimeLine()},6e3)};w.seekTimer?clearTimeout(w.seekTimer):be(),w.seekTimer=setTimeout(function(){be(),clearTimeout(w.seekTimer),w.seekTimer=null},w.seekFrequency)}else{var me=function(){setTimeout(function(){w.disabled=!1},w.seekFrequency)},ge=function(fe){w.disabled=!0,w.jSPlugin.pause().then(function(){console.log("暂停成功"),w.jSPlugin.resume(Oe).then(function(B){console.log("恢复成功:",B),w.jSPlugin.Theme&&w.jSPlugin.Theme.setDecoderState({play:!0}),w.jSPlugin.Theme&&w.jSPlugin.Theme.decoderState.state.sound&&w.jSPlugin.openSound(),fe&&fe()}).catch(function(B){console.log("恢复失败",B)})}).catch(function(){console.log("暂停失败"),w.jSPlugin.resume(Oe).then(function(B){console.log("恢复成功"),w.jSPlugin.Theme&&w.jSPlugin.Theme.setDecoderState({play:!0}),fe&&fe()}).catch(function(B){console.log("恢复失败",B)})})};w.disabled?(console.log("操作频繁,等待2秒后执行"),w.seekTimer&&clearTimeout(w.seekTimer),w.seekTimer=setTimeout(function(){ge(me)},w.seekFrequency)):ge(me)}}}),this.syncTimeLine(),u("".concat(this.jSPlugin.staticPath,"/rec/datepicker.min.css")),l("".concat(this.jSPlugin.staticPath,"/rec/jquery.min.js"),function(){l("".concat(w.jSPlugin.staticPath,"/rec/datepicker.js"),function(){l("".concat(w.jSPlugin.staticPath,"/rec/datepicker.zh-CN.js"),function(){!document.getElementsByClassName("datepicker-container")[0]&&$("#".concat(w.jSPlugin.id,"-datepicker")).datepicker&&$("#".concat(w.jSPlugin.id,"-datepicker")).datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:"zh-CN",date:new Date(d("begin",w.jSPlugin.params.url).replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"))||new Date,format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:document.getElementById("".concat(w.jSPlugin.id,"-wrap"))}),document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),w.datepickerVisible=!1,$("#".concat(w.jSPlugin.id,"-datepicker")).on("pick.datepicker",function(se){console.log("重新选择日期",se.date,new Date(se.date).Format("yyyyMMdd"),new Date(document.getElementById("".concat(w.jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd")),se.date>new Date||new Date(se.date).Format("yyyyMMdd")===new Date(document.getElementById("".concat(w.jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd")?se.preventDefault():(document.getElementById("".concat(w.jSPlugin.id,"-datepicker")).value=new Date(se.date).Format("yyyy-MM-dd"),w.renderRec(se.date),w.jSPlugin.decoderState&&w.jSPlugin.decoderState.state?w.jSPlugin.decoderState.state.cloudRec?w.jSPlugin.changePlayUrl({begin:new Date(se.date).Format("yyyyMMdd"),type:"cloud.rec"}):w.jSPlugin.decoderState.state.rec?w.jSPlugin.changePlayUrl({begin:new Date(se.date).Format("yyyyMMdd"),type:"rec"}):w.jSPlugin.changePlayUrl({begin:new Date(se.date).Format("yyyyMMdd")}):w.jSPlugin.changePlayUrl({begin:new Date(se.date).Format("yyyyMMdd")})),document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),w.datepickerVisible=!1,w.jSPlugin.decoderState&&w.jSPlugin.decoderState&&w.jSPlugin.decoderState.state&&w.jSPlugin.decoderState.state.zoom&&(w.jSPlugin.setDecoderState({zoom:!1}),w.jSPlugin.Zoom.stopZoom())}),$("#".concat(w.jSPlugin.id,"-datepicker")).off("click").on("click",function(se){console.log("点击日期"),w.datepickerVisible?document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"):document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="inline"),w.datepickerVisible=!w.datepickerVisible})})})}),document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-add")).onclick=function(){var se=w.currentTimeWidth;se<3&&w.timeLine.changeSize(++w.currentTimeWidth)},document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-sub")).onclick=function(){var se=w.currentTimeWidth;se>0&&w.timeLine.changeSize(--w.currentTimeWidth)};var ue=d("begin",this.jSPlugin.url)||new Date().Format("yyyyMMdd");this.renderRec("".concat(ue.slice(0,4),"-").concat(ue.slice(4,6),"-").concat(ue.slice(6,8))),this.observer=new MutationObserver(function(se,re){w.recAutoSize()});var pe={attributes:!0,attributeOldValue:!0,attributeFilter:["style"]},de=document.getElementById("".concat(this.jSPlugin.id));this.observer.observe(de,pe)}},{key:"setDatepickerDate",value:function(w){if(document.getElementsByClassName("datepicker-container")[0]){var T=document.getElementsByClassName("datepicker-container")[0],R=T.parentNode;R.removeChild(T),document.getElementById("".concat(this.jSPlugin.id,"-datepicker")).value=w.replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"),$("#".concat(this.jSPlugin.id,"-datepicker")).datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:"zh-CN",defaultDate:w,format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:document.getElementById("".concat(this.jSPlugin.id,"-wrap"))})}}},{key:"datepickerHide",value:function(){document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),this.datepickerVisible=!1}},{key:"datepickerShow",value:function(){document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="inline"),this.datepickerVisible=!0}},{key:"recAutoSize",value:function(){var w=this;if(document.getElementById("".concat(this.jSPlugin.id,"-canvas"))){var T=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100;T!==parseInt(document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width)&&(document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width=T,this.timeLine.init({id:"".concat(this.jSPlugin.id,"-canvas"),width:T,onChange:function(N){console.log("time",N,new Date(N).Format("yyyyMMddhhmmss")),console.log("jSPlugin",w.jSPlugin);var z=new Date(N).Format("yyyyMMddhhmmss");w.jSPlugin.changePlayUrl({begin:z})}}),this.renderRec(this.date),this.syncTimeLine())}}},{key:"syncTimeLine",value:function(){var w=this;this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer),this.jSPlugin.recTimer=setInterval(function(){var T=w.jSPlugin.getOSDTime();T.then(function(R){var N=R.data;N===-1?console.log("获取播放时间错误"):N>0&&w.timeLine.run({time:new Date(N>1e12?N:N*1e3)})}).catch(function(R){})},1e3)}},{key:"unSyncTimeLine",value:function(){this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer)}},{key:"renderRec",value:function(w){var T=this;this.date=w;var R=this,N=new Date(new Date(w).Format("yyyy-MM-dd 00:00:00").replace(/-/g,"/")).getTime(),z=new Date(new Date(w).Format("yyyy-MM-dd 23:59:59").replace(/-/g,"/")).getTime();this.timeLine.getRecord([],N,z),console.log("-----------233---------this.jSPlugin.url",this.jSPlugin.url);var U={accessToken:this.jSPlugin.accessToken,recType:S(this.jSPlugin.url).type==="cloud.rec"?1:2,deviceSerial:S(this.jSPlugin.url).deviceSerial,channelNo:S(this.jSPlugin.url).channelNo,startTime:N,endTime:z,version:"2.0"},ue=function(se){if(se.data&&se.data.files&&se.data.files.length>0){var re=se.data.files,Oe=new Date().getTime(),be=se.data.isAll;if(be)T.timeLine.getRecord(re,N,z);else{var me=function ge(){function Ze(fe){fe.data&&fe.data.files&&fe.data.files.length>0?fe.data.isAll==!1?(fe.data.files&&(re=re.concat(fe.data.files)),Oe=fe.data.nextFileTime>0?fe.data.nextFileTime:new Date().getTime(),ge()):(console.log("云存储执行渲染片段"),R.timeLine.getRecord(re,N,z)):R.timeLine.getRecord(re,N,z)}U.startTime=Oe,A(this.jSPlugin.env.domain+"/api/lapp/video/by/time","POST",U,"",Ze)};me()}T.timeLine.run({time:new Date(N)})}else se.data&&se.data.length>0&&(console.log("获取本地录像片段成功",se),R.timeLine.getRecord(se.data,N,z),R.timeLine.run({time:new Date(N)}))},pe=this.jSPlugin.env.domain+"/api/lapp/video/by/time";A(pe,"POST",U,"",ue)}}]),Z}(),xe=function(H){console.log("执行TimeLine - params",H),this.state={id:H.id,start:"00:00:00",end:"24:00:00",current:0,timelag:30,timeArr:[],availTimeLine:[],scrollTop:0,index:0,date:"",noTimeLineTxt:"",disabled:!1};var w=this;this.setState=function(T){Object.keys(T).forEach(function(R){w.state[R]=T[R],R==="scrollTop"&&document.getElementById("time-line-item").parentNode.scrollTo(0,T[R]),R==="current"&&(document.getElementById("time-line-current").innerHTML=T[R])})},this.setDisabled=function(T){this.setState({disabled:T}),document.getElementById("time-line-item").parentNode.style.overflowY=T?"hidden":"scroll"},this.timeToSecond=function(T){var R=T.split(":"),N=Number(R[0]),z=Number(R[1]),U=Number(R[2]);return N*60*60+z*60+(U||0)},this.minuteToTime=function(T){var R=Math.floor(T/60),N=T%60;return(R>9?R:"0"+R)+":"+(N>9?N:"0"+N)},this.timeToMinute=function(T){var R=T.split(":"),N=Number(R[0]),z=Number(R[1]);return N*60+z},this.getPalyParam=H.getPalyParam,document.getElementById("time-line-item").parentNode.ontouchstart=function(){if(w.state.disabled)return!1;H.ontouchstart()},document.getElementById("time-line-item").parentNode.ontouchmove=function(){if(w.state.disabled)return!1;H.ontouchmove()},document.getElementById("time-line-item").parentNode.ontouchend=function(){if(w.state.disabled)return!1;var T,R=new Promise(function(N,z){var U=-1;T=setInterval(function(){var ue=document.getElementById("time-line-item").parentNode.scrollTop;ue!==U?(console.log("scolling",ue,U),U=ue):(console.log("scoll stop",ue,U),clearInterval(T),N(ue))},100)});R.then(function(N){console.log("scollPromise: then",N,w),w.rectTopTotime(N),console.log("页面滚动实际高度",N,w.state),w.getPalyParam({current:w.state.current})}),H.ontouchend()},this.matchTimeDot()};xe.prototype.changeScale=function(Z){this.setState({timelag:Z}),this.matchTimeDot()},xe.prototype.setDateLine=function(Z,H){Z.length>0?(typeof H=="undefined"&&(H=Z.length-1),this.setState({availTimeLine:Z,start:Z[H].st,end:Z[H].et,current:Z[H].st}),console.log("this.state",this.state),this.matchRecTimeDot(),this.primaryOffsetH()):(this.setState({availTimeLine:[]}),console.log("this.state",this.state),this.matchRecTimeDot())},xe.prototype.matchTimeDot=function(){var Z=this.state,H=Z.start,w=Z.end,T=Z.timelag;Z.availTimeLine,console.log("start",H,"end",w);var R=[],N=this.timeToMinute(w);N=Math.floor(N/T)*T;for(var z=N;z>=0;){var U=0,ue=0,pe=[];z==N&&(U=70),z==0&&(ue=230);var de=this.minuteToTime(z);R.push({id:z,current:de,label:"a"+z,marginTop:U,marginBottom:ue,recArr:pe}),z=z-T}this.setState({timeArr:R}),this.renderDateLine()},xe.prototype.matchRecTimeDot=function(){var Z=this.state,H=Z.start,w=Z.end,T=Z.timelag,R=Z.availTimeLine,N=Z.timeArr;console.log("start",H,"end",w);var z=[],U=R.length;if(U===0)for(var ue=0;uebe&&N[ue].id')}),ue+="
').concat(R.current,"
"),z.innerHTML=ue,T.appendChild(z)})},xe.prototype.primaryOffsetH=function(){var Z=this.state,H=Z.start,w=Z.timelag,T=Z.timeArr,R=T[0].current,N=this.timeToSecond(R),z=this.timeToSecond(H),U=N-z,ue=Math.ceil(U/w)+60;this.setState({scrollTop:ue}),console.log("起始偏移量",ue)},xe.prototype.currentOffsetH=function(){var Z=this.state,H=Z.current,w=Z.timelag,T=Z.timeArr,R=T[0].current,N=this.timeToSecond(R),z=this.timeToSecond(H),U=N-z,ue=Math.ceil(U/w)+60;this.setState({scrollTop:ue})},xe.prototype.rectTopTotime=function(Z){var H=this.state.timelag,w=Math.floor(Z/60),T=Z-w*60,R,N;if(console.log("index:",w,"offsetH:",T),T==0)R=this.state.timeArr[w-1].current,N=0;else{var z=this.state.timeArr[w].current,U=this.timeToMinute(z),ue=60-T,pe=ue*H,de=Math.floor(pe/60)+U,se=Math.floor(pe/60)*60;N=Math.ceil(pe-se),R=this.minuteToTime(de)}this.setState({current:R+":"+(N>9?N:"0"+N),scrollTop:Z})},xe.prototype.stepScrollTimeLine=function(Z){this.setState({current:Z}),this.currentOffsetH()},xe.prototype.secondCountDown=function(Z){var H=this.state.current,w=H.split(":"),T=Number(w[0]),R=Number(w[1]),N=Number(w[2]),z=T*60*60+R*60+N+1,U=Math.floor(z/3600),ue=Math.floor((z-U*3600)/60),pe=z-U*3600-ue*60;this.setState({current:(U>9?U:"0"+U)+":"+(ue>9?ue:"0"+ue)+":"+(pe>9?pe:"0"+pe)})};var Fe=xe;Date.prototype.Format=function(Z){var H={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(Z)&&(Z=Z.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var w in H)new RegExp("("+w+")").test(Z)&&(Z=Z.replace(RegExp.$1,RegExp.$1.length==1?H[w]:("00"+H[w]).substr((""+H[w]).length)));return Z};function pt(Z){var H=new Date(Z),w=H.getHours(),T=H.getMinutes(),R=H.getSeconds();return(w>9?w:"0"+w)+":"+(T>9?T:"0"+T)+":"+(R>9?R:"0"+R)}var Ot=function(){function Z(H,w,T){var R=this;i(this,Z),this.changeRecSpeed=w,this.resetMobileZoomStatus=T,this.isMobile=!0,this.jSPlugin=H,this.timer=null,this.date=new Date().Format("yyyy-MM-dd"),this.begin=(new Date().Format("yyyy-MM-dd")+" 00:00:00").replace(/-/g,"/"),this.end=(new Date().Format("yyyy-MM-dd")+" 23:59:59").replace(/-/g,"/"),this.initBegin=null,this.initEnd=null,this.type=S(this.jSPlugin.url).type,this.operating=!1,this.seekTimer=null,this.disabled=!1,this.seekFrequency=2e3,this.jSPlugin.params&&this.jSPlugin.params.seekFrequency&&(this.seekFrequency=this.jSPlugin.params.seekFrequency);var N=document.createElement("style");if(N.innerHTML=` body{ padding: 0; margin: 0; } .time-line-container { text-align: left; height: 300px; /* outline: 1px solid red; */ /* background: gray; */ position: relative; /* padding-top: 60px; */ margin-top: 20px; } .time-line-container .time-line-item-container { display: inline-block; /* height: 400px; */ width: 30%; /* background: indianred; */ overflow-y: scroll; overflow-x: hidden; /* padding-top: 60px; */ height: 300px; box-sizing: border-box; white-space: nowrap; position: relative; } .time-line-container .time-line-item-container::-webkit-scrollbar { width: 0px; /*滚动条宽度*/ height: 0px; /*滚动条高度*/ } .time-line-item .time-item { position: relative; box-sizing: border-box; height: 60px; font-size: 12px; color: rgb(150, 150, 150); border-right: 6px solid; border-right-color: #ddd; } .time-line-item .time-item .scale { width: 6px; height: 9px; border-bottom: 1px solid #ccc; float: right; clear: both; } .time-line-item .time-item .item-unavail { width: 6px; position: absolute; left: 100%; background-color: #ddd; } .time-line-container .current-time { position: absolute; left: 0; top: 40px; height: 29px; /* line-height: 58px; */ border-bottom: 1px solid #648FFC; width: 60%; margin-left: 26%; } .time-line-container .current-time .current-time-bg { position: relative; top: 15px; width: 100px; height: 29px; line-height: 29px; left: -70px; font-size: 12px; color: #2C2C2C; } .time-line-container .current-time .current-time-bg::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 100%; background: #648FFC; top: 11px; position: absolute; right: 30px; } .date-switch-container { height: 40px; position: relative; text-align: center; margin: 20px 10px; } .date-switch-container .current-date { line-height: 40px; height: 22px; font-size: 16px; color: #2C2C2C; text-align: center; font-weight: bold; } .date-container { width: 40px; height: 40px; position: absolute; right: 0; top: 0; } .rec-type-container { display: flex; justify-content: space-between; } .rec-type-container .rec-type-text { padding: 0 15px; font-size: 12px; color: #2C2C2C; } .rec-type-container .rec-type-switch { padding: 0 20px; } .date-container input { position: absolute; opacity: 0; display: inline-block; width: 40px; height: 40px; z-index: 10; left: 0; } .date-container label { position: absolute; left: 0; top: 0; /* display: none; */ z-index: 0; } .date-icon { display: inline-block; width: 40px; height: 40px; background: url('https://resource.eziot.com/group2/M00/00/6A/CtwQF2F6VieAQrU9AAABP-_Nsqo949.png') no-repeat 100% 100%; } .select-container { padding: 10px; display: flex; justify-content: space-between; } .advice { height: 24px; width: 70px; display: flex; justify-content: space-between; line-height: 24px; background: #F8F8F8; border-radius: 8px; } .advice span { width: 40px; display: inline-block; } input[type="checkbox"]:not(:checked)+.advice span:first-child { box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%); border-radius: 8px; text-align: center; } input[type="checkbox"]:checked+.advice span:last-child { box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%); border-radius: 8px; text-align: center; } input[type="checkbox"]:not(:checked)+.advice span:first-child svg { fill: #648FFC !important; } input[type="checkbox"]:checked+.advice span:last-child svg { fill: #648FFC !important; }`,document.getElementsByTagName("head")[0].appendChild(N),d("begin",this.jSPlugin.url)){var z=d("begin",this.jSPlugin.url);this.date=z.slice(0,4)+"/"+z.slice(4,6)+"/"+z.slice(6,8),this.begin=this.date+" ".concat(z.slice(8,10)||"00",":").concat(z.slice(10,12)||"00",":").concat(z.slice(12,14)||"00"),this.end=this.date+" 23:59:59",this.initBegin=this.begin}if(d("end",this.jSPlugin.url)){var U=d("end",this.jSPlugin.url);this.end=this.date+" ".concat(U.slice(8,10)||"23",":").concat(U.slice(10,12)||"59",":").concat(U.slice(12,14)||"59"),this.initEnd=this.end}var ue=document.createElement("div");ue.id="date-switch-container-wrap",ue.className="date-switch-container-wrap",ue.style="",ue.innerHTML=`
今日录像
`,h(ue,document.getElementById("".concat(this.jSPlugin.id,"-wrap")));var pe=document.createElement("div");pe.id="rec-type-container-wrap",pe.className="rec-type-container-wrap",pe.style="",pe.innerHTML=`
0个录像
`,h(pe,ue);var de=document.createElement("div");de.id="mobile-rec-wrap",de.className="mobileRec-wrap",de.style="",de.innerHTML=`
2020-01-01 00:00:00
`,h(de,pe);var se=function(ge){console.log("子组件传值到父组件",ge,ge.current);var Ze=ge.current,fe=new Date(R.date).Format("yyyyMMdd").substr(0,8)+(ge.current?Ze.replace(/:/g,""):ge.current.replace(/:/g,""));if(R.initBegin&&new Date("".concat(R.date," ").concat(ge.current)).getTime()new Date(R.initEnd).getTime()&&(console.log("超过限制最高值"),fe=new Date(R.initBegin).Format("yyyyMMddhhmmss")),R.type==="cloud.rec"){var B=function(){R.jSPlugin.seek(fe.substr(8,6),"235959"),setTimeout(function(){R.syncTimeLine()},6e3)};R.seekTimer?clearTimeout(R.seekTimer):B(),console.log("this.jsPlug",R.jSPlugin.params),R.seekTimer=setTimeout(function(){B(),clearTimeout(R.seekTimer),R.seekTimer=null},R.seekFrequency)}else{var te=function(){setTimeout(function(){R.disabled=!1},R.seekFrequency)},oe=function(Ge){R.disabled=!0,R.jSPlugin.pause().then(function(){console.log("暂停成功"),R.jSPlugin.resume(fe).then(function(nt){console.log("恢复成功"),R.jSPlugin.Theme&&R.jSPlugin.Theme.setDecoderState({play:!0}),R.jSPlugin.Theme&&R.jSPlugin.Theme.decoderState.state.sound&&R.jSPlugin.openSound(),R.syncTimeLine(),Ge&&Ge()})}).catch(function(){console.log("暂停失败"),R.jSPlugin.resume(fe).then(function(nt){console.log("恢复成功"),R.jSPlugin.Theme&&R.jSPlugin.Theme.setDecoderState({play:!0}),R.syncTimeLine(),Ge&&Ge()})})};R.disabled?(console.log("操作频繁,等待2秒后执行"),R.seekTimer&&clearTimeout(R.seekTimer),R.seekTimer=setTimeout(function(){oe(te)},R.seekFrequency)):oe(te)}},re=function(){R.operating=!0,R.unSyncTimeLine()},Oe=function(){},be=function(){R.operating=!1,console.log("ontouchend")};this.TimeLineOBJ=new Fe({id:"time-line-item",getPalyParam:se,ontouchstart:re,ontouchmove:Oe,ontouchend:be}),this.fetchDeviceRec(),document.getElementById("date").addEventListener("change",function(me){if(console.log("日期变化",me.target.value),R.initBegin||R.initEnd)return console.log("您开启了时间限制,无法切换日期"),!1;R.date=new Date(me.target.value).Format("yyyy/MM/dd"),R.begin=R.date+" 00:00:00",R.end=R.date+" 23:59:59",R.fetchDeviceRec(),R.jSPlugin.changePlayUrl({type:R.type,begin:"".concat(new Date(R.date).Format("yyyyMMdd"),"000000")}),R.changeRecSpeed(1),R.resetMobileZoomStatus()}),document.getElementById("cloudType").checked=this.type==="rec",document.getElementById("cloudType").addEventListener("change",function(me){var ge=me.target.checked?2:1;R.type=me.target.checked?"rec":"cloud.rec",console.log("recType",ge),R.fetchDeviceRec(),R.jSPlugin.changePlayUrl({type:R.type,begin:"".concat(new Date(R.date).Format("yyyyMMdd"),"000000")}).then(function(){console.log("切换类型成功"),R.syncTimeLine(),R.changeRecSpeed(1),R.resetMobileZoomStatus()},function(Ze){console.log("err",Ze)}).catch(function(Ze){console.log(Ze)})}),this.syncTimeLine()}return a(Z,[{key:"fetchDeviceRec",value:function(){var w=this,T=function(z){var U=z.length;document.getElementById("recCount").innerHTML=U;for(var ue=[],pe=U-1;pe>=0;pe--){var de=z[pe],se=pt(de.endTime),re=pt(de.startTime);ue.push({st:re,et:se})}w.TimeLineOBJ.setDateLine(ue)},R=new FormData;R.append("deviceSerial",S(this.jSPlugin.url).deviceSerial),R.append("channelNo",S(this.jSPlugin.url).channelNo),R.append("accessToken",this.jSPlugin.accessToken),R.append("recType",this.type==="cloud.rec"?1:2),R.append("startTime",new Date(this.begin).getTime()),R.append("endTime",new Date(this.end).getTime()),fetch(this.jSPlugin.env.domain+"/api/lapp/video/by/time",{method:"POST",body:R}).then(function(N){return N.json()}).then(function(N){if(N.code==200&&N.data){var z=[];z=N.data,T(z)}else T([])})}},{key:"syncTimeLine",value:function(){var w=this,T=function(N){var z=new Date(N),U=z.getHours(),ue=z.getMinutes(),pe=z.getSeconds();return(U>9?U:"0"+U)+":"+(ue>9?ue:"0"+ue)+":"+(pe>9?pe:"0"+pe)};this.timer&&clearInterval(this.timer),this.timer=setInterval(function(){if(w.operating)return console.log("操作中"),!1;w.jSPlugin.getOSDTime().then(function(R){R.data>0?w.TimeLineOBJ.stepScrollTimeLine(T(R.data*1e3)):(console.log("未找到当前获取播放时间,等待中..."),console.log("res:-----------------",R))}).catch(function(R){console.log("err:-----",R),console.log("未找到当前获取播放时间,等待中...")})},1e3)}},{key:"unSyncTimeLine",value:function(){this.timer&&clearInterval(this.timer)}}]),Z}(),bt=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStart"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStart"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStart"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStart"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStart"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStart"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStart"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStart"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStart"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStart"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStart"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStart"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStart"},{code:60002,msg:"设备已旋转到上限位",desc:"",text:"设备云台旋转达到上限位",type:"ptzStart"},{code:60003,msg:"设备已旋转到下限位",desc:"",text:"设备云台旋转达到下限位",type:"ptzStart"},{code:60004,msg:"设备已旋转到左限位",desc:"",text:"设备云台旋转达到左限位",type:"ptzStart"},{code:60005,msg:"设备已旋转到右限位",desc:"",text:"设备云台旋转达到右限位",type:"ptzStart"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStart"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStart"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStart"}],ht=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStop"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStop"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStop"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStop"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStop"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStop"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStop"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStop"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStop"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStop"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStop"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStop"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStop"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStop"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStop"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStop"}],Kt=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"talk"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"talk"},{code:10002,msg:"账号异常,操作失败",desc:"",text:"accessToken异常或过期",type:"talk"},{code:10031,msg:"账号异常,操作失败",desc:"",text:"子账户或萤石用户没有权限",type:"talk"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"talk"},{code:60059,msg:"播放失败",desc:"",text:"ezopen地址均不可用",type:"talk"}],Tt=[{code:200,msg:"",desc:"",text:"操作成功",type:"time"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"time"},{code:10002,msg:"账号异常,播放失败",desc:"",text:"accessToken异常或过期",type:"time"},{code:10004,msg:"账号异常,播放失败",desc:"",text:"用户不存在",type:"time"},{code:10005,msg:"账号异常,播放失败",desc:"",text:"appKey异常",type:"time"},{code:10011,msg:"播放失败",desc:"设备对应用户未注册至应用下",text:"未开通萤石服务",type:"time"},{code:10013,msg:"账号异常,播放失败",desc:"",text:"非开发者账号无权限调用",type:"time"},{code:10030,msg:"播放失败",desc:"",text:"appkey和appsecret不匹配",type:"time"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"time"},{code:20014,msg:"播放失败",desc:"",text:"deviceSerial不合法",type:"time"},{code:20032,msg:"设备不存在请检查设备连接情况",desc:"",text:"该用户下通道不存在",type:"time"},{code:60024,msg:"播放失败请重试",desc:"",text:"取消订阅操作失败",type:"time"},{code:49999,msg:"播放失败请重试",desc:"",text:"操作异常",type:"time"}],Ae={ptzStart:bt,ptzStop:ht,talk:Kt,time:Tt},Lt=function(){function Z(H,w){i(this,Z),this.coreX=H,this.coreY=w,console.log("uikitCode",Ae)}return a(Z,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchInfo",value:function(w,T){if(Ae[T]){var R={};return Ae[T].map(function(N){N.code==w&&(R=N)}),R}else return{code:500,msg:"未知错误",desc:"未知的错误码,或错误码类型有误",text:"",type:T}}}]),Z}(),vt=function(){function Z(H){var w=this;if(i(this,Z),this.jSPlugin=H,this.codeHandler=new Lt,this.pluginStatus=new F(this,this.jSPlugin.id),console.log("云台初始化"),document.getElementById(this.jSPlugin.id+"-ez-ptz-item"))return!1;var T=document.createElement("div");T.id=this.jSPlugin.id+"-ez-ptz-item",T.className="ez-ptz-wrap",T.style="display:none";var R=document.createElement("style");R.innerHTML=` .ez-ptz-container { position: relative; width: 80px; height: 80px; background: rgba(255, 255, 255, 0.80); box-shadow: 0px 0px 33px 4px rgb(0 0 0 / 15%); border: 1px solid rgba(255, 255, 255, 0.80); border-radius: 100%; cursor: pointer; overflow: hidden; user-select: none; } .ez-ptz-container .ez-ptz-icon.top { width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; border-bottom: 6px solid #333333; position: absolute; display: inline-block; left: calc(50% - 3px); top: 2px; } .ez-ptz-container .ez-ptz-icon.top.active { border-bottom-color: #1890FF; } .ez-ptz-container .ez-ptz-icon.bottom { width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 6px solid #333333; position: absolute; display: inline-block; left: calc(50% - 3px); bottom: 2px; } .ez-ptz-container .ez-ptz-icon.bottom.active { border-top-color: #1890FF; } .ez-ptz-container .ez-ptz-icon.right { width: 0; height: 0; border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-left: 6px solid #333333; position: absolute; display: inline-block; top: calc(50% - 3px); right: 2px; } .ez-ptz-container .ez-ptz-icon.right.active { border-left-color: #1890FF; } .ez-ptz-container .ez-ptz-icon.left { width: 0; height: 0; border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-right: 6px solid #333333; position: absolute; display: inline-block; top: calc(50% - 3px); left: 2px; } .ez-ptz-container .ez-ptz-icon.left.active { border-right-color: #1890FF; } .ez-ptz-container .ez-ptz-main.center { width: 23px; height: 23px; background: #1890FF; border-radius: 100%; top: calc(50% - 12.3px); left: calc(50% - 12.3px); position: absolute; } .ez-ptz-wrap { position: absolute; right: 20px; top: calc(50% - 50px); width: 100px; height: 100px; z-index: 999; } .ez-ptz-close { position: absolute; color: #FFFFFF; top: 0; right: 0px; }`,document.getElementsByTagName("head")[0].appendChild(R),T.innerHTML=`
`),document.getElementById("".concat(H.id,"-wrap")).appendChild(T),document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmousedown=function(N){N.preventDefault(),console.log("触摸开始"),w._handlePtzTouch(N,"start")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmouseup=function(N){N.preventDefault(),console.log("触摸结束"),w._handlePtzTouch(N,"stop")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchstart=function(N){N.preventDefault(),console.log("触摸开始"),w._handlePtzTouch(N,"start")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchend=function(N){N.preventDefault(),console.log("触摸结束",N),w._handlePtzTouch(N,"stop")}}return a(Z,[{key:"show",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: none"}},{key:"_handlePtzTouch",value:function(w,T){var R=this,N=document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).getBoundingClientRect(),z=N.left+41,U=N.top+41,ue=w.x||w.changedTouches[0].clientX,pe=w.y||w.changedTouches[0].clientY,de=ue-z,se=pe-U,re=0,Oe=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";if(Math.abs(de)>Math.abs(se)?de>0?re=3:re=2:se>0?re=1:re=0,/^rotate\(90/.test(document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.transform))switch(re){case 0:re=2;break;case 1:re=3;break;case 2:re=1;break;case 3:re=0;break}document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(re===0?180:re===1?0:re===2?90:270,"deg, #1d8dd8 0%, rgba(100,143,252,0.00) 30%)"),T==="stop"&&(Oe=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style="");var be=new FormData;be.append("deviceSerial",S(this.jSPlugin.url).deviceSerial),be.append("channelNo",S(this.jSPlugin.url).channelNo),be.append("speed",1),be.append("direction",re),be.append("accessToken",this.jSPlugin.accessToken),fetch(Oe,{method:"POST",body:be}).then(function(me){return me.json()}).then(function(me){me.code==200||(console.log(me.code,R.codeHandler.matchInfo(me.code,T==="start"?"ptzStart":"ptzStop")),R.pluginStatus.loadingSetText({text:R.codeHandler.matchInfo(me.code,T==="start"?"ptzStart":"ptzStop").msg,color:"red",delayClear:2e3}),(me.code==60005||me.code==60002||me.code==60003||me.code==60004)&&(document.getElementById("".concat(R.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(re===0?180:re===1?0:re===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)")))}).catch(function(me){console.log("云台调用异常",me)})}}]),Z}();(function(Z){if(t(e)==="object")n.exports=Z();else{var H;typeof window!="undefined"?H=window:typeof O6!="undefined"?H=O6:typeof self!="undefined"?H=self:H=this,H.adapter=Z()}})(function(){return function(){function Z(H,w,T){function R(U,ue){if(!w[U]){if(!H[U]){var pe=typeof B6=="function"&&B6;if(!ue&&pe)return pe(U,!0);if(N)return N(U,!0);var de=new Error("Cannot find module '"+U+"'");throw de.code="MODULE_NOT_FOUND",de}var se=w[U]={exports:{}};H[U][0].call(se.exports,function(re){var Oe=H[U][1][re];return R(Oe||re)},se,se.exports,Z,H,w,T)}return w[U].exports}for(var N=typeof B6=="function"&&B6,z=0;z0&&arguments[0]!==void 0?arguments[0]:{},fe=Ze.window,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},te=R.log,oe=R.detectBrowser(fe),Ie={browserDetails:oe,commonShim:be,extractVersion:R.extractVersion,disableLog:R.disableLog,disableWarnings:R.disableWarnings};switch(oe.browser){case"chrome":if(!z||!z.shimPeerConnection||!B.shimChrome)return te("Chrome shim is not included in this adapter release."),Ie;te("adapter.js shimming chrome."),Ie.browserShim=z,z.shimGetUserMedia(fe),z.shimMediaStream(fe),z.shimPeerConnection(fe),z.shimOnTrack(fe),z.shimAddTrackRemoveTrack(fe),z.shimGetSendersWithDtmf(fe),z.shimGetStats(fe),z.shimSenderReceiverGetStats(fe),z.fixNegotiationNeeded(fe),be.shimRTCIceCandidate(fe),be.shimConnectionState(fe),be.shimMaxMessageSize(fe),be.shimSendThrowTypeError(fe),be.removeAllowExtmapMixed(fe);break;case"firefox":if(!de||!de.shimPeerConnection||!B.shimFirefox)return te("Firefox shim is not included in this adapter release."),Ie;te("adapter.js shimming firefox."),Ie.browserShim=de,de.shimGetUserMedia(fe),de.shimPeerConnection(fe),de.shimOnTrack(fe),de.shimRemoveStream(fe),de.shimSenderGetStats(fe),de.shimReceiverGetStats(fe),de.shimRTCDataChannel(fe),de.shimAddTransceiver(fe),de.shimCreateOffer(fe),de.shimCreateAnswer(fe),be.shimRTCIceCandidate(fe),be.shimConnectionState(fe),be.shimMaxMessageSize(fe),be.shimSendThrowTypeError(fe);break;case"edge":if(!ue||!ue.shimPeerConnection||!B.shimEdge)return te("MS edge shim is not included in this adapter release."),Ie;te("adapter.js shimming edge."),Ie.browserShim=ue,ue.shimGetUserMedia(fe),ue.shimGetDisplayMedia(fe),ue.shimPeerConnection(fe),ue.shimReplaceTrack(fe),be.shimMaxMessageSize(fe),be.shimSendThrowTypeError(fe);break;case"safari":if(!re||!B.shimSafari)return te("Safari shim is not included in this adapter release."),Ie;te("adapter.js shimming safari."),Ie.browserShim=re,re.shimRTCIceServerUrls(fe),re.shimCreateOfferLegacy(fe),re.shimCallbacksAPI(fe),re.shimLocalStreamsAPI(fe),re.shimRemoteStreamsAPI(fe),re.shimTrackEventTransceiver(fe),re.shimGetUserMedia(fe),be.shimRTCIceCandidate(fe),be.shimMaxMessageSize(fe),be.shimSendThrowTypeError(fe),be.removeAllowExtmapMixed(fe);break;default:te("Unsupported browser!");break}return Ie}},{"./chrome/chrome_shim":3,"./common_shim":6,"./edge/edge_shim":7,"./firefox/firefox_shim":11,"./safari/safari_shim":14,"./utils":15}],3:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=w.shimGetUserMedia=void 0;var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(B){return t(B)}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":t(B)},R=Z("./getusermedia");Object.defineProperty(w,"shimGetUserMedia",{enumerable:!0,get:function(){return R.shimGetUserMedia}});var N=Z("./getdisplaymedia");Object.defineProperty(w,"shimGetDisplayMedia",{enumerable:!0,get:function(){return N.shimGetDisplayMedia}}),w.shimMediaStream=de,w.shimOnTrack=se,w.shimGetSendersWithDtmf=re,w.shimGetStats=Oe,w.shimSenderReceiverGetStats=be,w.shimAddTrackRemoveTrackWithNative=me,w.shimAddTrackRemoveTrack=ge,w.shimPeerConnection=Ze,w.fixNegotiationNeeded=fe;var z=Z("../utils.js"),U=ue(z);function ue(B){if(B&&B.__esModule)return B;var te={};if(B!=null)for(var oe in B)Object.prototype.hasOwnProperty.call(B,oe)&&(te[oe]=B[oe]);return te.default=B,te}function pe(B,te,oe){return te in B?Object.defineProperty(B,te,{value:oe,enumerable:!0,configurable:!0,writable:!0}):B[te]=oe,B}function de(B){B.MediaStream=B.MediaStream||B.webkitMediaStream}function se(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&!("ontrack"in B.RTCPeerConnection.prototype)){Object.defineProperty(B.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(Ie){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=Ie)},enumerable:!0,configurable:!0});var te=B.RTCPeerConnection.prototype.setRemoteDescription;B.RTCPeerConnection.prototype.setRemoteDescription=function(){var Ie=this;return this._ontrackpoly||(this._ontrackpoly=function(Ge){Ge.stream.addEventListener("addtrack",function(nt){var at=void 0;B.RTCPeerConnection.prototype.getReceivers?at=Ie.getReceivers().find(function(zt){return zt.track&&zt.track.id===nt.track.id}):at={track:nt.track};var St=new Event("track");St.track=nt.track,St.receiver=at,St.transceiver={receiver:at},St.streams=[Ge.stream],Ie.dispatchEvent(St)}),Ge.stream.getTracks().forEach(function(nt){var at=void 0;B.RTCPeerConnection.prototype.getReceivers?at=Ie.getReceivers().find(function(zt){return zt.track&&zt.track.id===nt.id}):at={track:nt};var St=new Event("track");St.track=nt,St.receiver=at,St.transceiver={receiver:at},St.streams=[Ge.stream],Ie.dispatchEvent(St)})},this.addEventListener("addstream",this._ontrackpoly)),te.apply(this,arguments)}}else U.wrapPeerConnectionEvent(B,"track",function(oe){return oe.transceiver||Object.defineProperty(oe,"transceiver",{value:{receiver:oe.receiver}}),oe})}function re(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&!("getSenders"in B.RTCPeerConnection.prototype)&&"createDTMFSender"in B.RTCPeerConnection.prototype){var te=function(zt,qt){return{track:qt,get dtmf(){return this._dtmf===void 0&&(qt.kind==="audio"?this._dtmf=zt.createDTMFSender(qt):this._dtmf=null),this._dtmf},_pc:zt}};if(!B.RTCPeerConnection.prototype.getSenders){B.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var oe=B.RTCPeerConnection.prototype.addTrack;B.RTCPeerConnection.prototype.addTrack=function(zt,qt){var kt=oe.apply(this,arguments);return kt||(kt=te(this,zt),this._senders.push(kt)),kt};var Ie=B.RTCPeerConnection.prototype.removeTrack;B.RTCPeerConnection.prototype.removeTrack=function(zt){Ie.apply(this,arguments);var qt=this._senders.indexOf(zt);qt!==-1&&this._senders.splice(qt,1)}}var Ge=B.RTCPeerConnection.prototype.addStream;B.RTCPeerConnection.prototype.addStream=function(zt){var qt=this;this._senders=this._senders||[],Ge.apply(this,[zt]),zt.getTracks().forEach(function(kt){qt._senders.push(te(qt,kt))})};var nt=B.RTCPeerConnection.prototype.removeStream;B.RTCPeerConnection.prototype.removeStream=function(zt){var qt=this;this._senders=this._senders||[],nt.apply(this,[zt]),zt.getTracks().forEach(function(kt){var On=qt._senders.find(function(Wn){return Wn.track===kt});On&&qt._senders.splice(qt._senders.indexOf(On),1)})}}else if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&"getSenders"in B.RTCPeerConnection.prototype&&"createDTMFSender"in B.RTCPeerConnection.prototype&&B.RTCRtpSender&&!("dtmf"in B.RTCRtpSender.prototype)){var at=B.RTCPeerConnection.prototype.getSenders;B.RTCPeerConnection.prototype.getSenders=function(){var zt=this,qt=at.apply(this,[]);return qt.forEach(function(kt){return kt._pc=zt}),qt},Object.defineProperty(B.RTCRtpSender.prototype,"dtmf",{get:function(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function Oe(B){if(B.RTCPeerConnection){var te=B.RTCPeerConnection.prototype.getStats;B.RTCPeerConnection.prototype.getStats=function(){var Ie=this,Ge=Array.prototype.slice.call(arguments),nt=Ge[0],at=Ge[1],St=Ge[2];if(arguments.length>0&&typeof nt=="function")return te.apply(this,arguments);if(te.length===0&&(arguments.length===0||typeof nt!="function"))return te.apply(this,[]);var zt=function(Wn){var Vn={},ii=Wn.result();return ii.forEach(function(ti){var di={id:ti.id,timestamp:ti.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[ti.type]||ti.type};ti.names().forEach(function(tr){di[tr]=ti.stat(tr)}),Vn[di.id]=di}),Vn},qt=function(Wn){return new Map(Object.keys(Wn).map(function(Vn){return[Vn,Wn[Vn]]}))};if(arguments.length>=2){var kt=function(Wn){at(qt(zt(Wn)))};return te.apply(this,[kt,nt])}return new Promise(function(On,Wn){te.apply(Ie,[function(Vn){On(qt(zt(Vn)))},Wn])}).then(at,St)}}}function be(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&B.RTCRtpSender&&B.RTCRtpReceiver){if(!("getStats"in B.RTCRtpSender.prototype)){var te=B.RTCPeerConnection.prototype.getSenders;te&&(B.RTCPeerConnection.prototype.getSenders=function(){var at=this,St=te.apply(this,[]);return St.forEach(function(zt){return zt._pc=at}),St});var oe=B.RTCPeerConnection.prototype.addTrack;oe&&(B.RTCPeerConnection.prototype.addTrack=function(){var at=oe.apply(this,arguments);return at._pc=this,at}),B.RTCRtpSender.prototype.getStats=function(){var at=this;return this._pc.getStats().then(function(St){return U.filterStats(St,at.track,!0)})}}if(!("getStats"in B.RTCRtpReceiver.prototype)){var Ie=B.RTCPeerConnection.prototype.getReceivers;Ie&&(B.RTCPeerConnection.prototype.getReceivers=function(){var at=this,St=Ie.apply(this,[]);return St.forEach(function(zt){return zt._pc=at}),St}),U.wrapPeerConnectionEvent(B,"track",function(nt){return nt.receiver._pc=nt.srcElement,nt}),B.RTCRtpReceiver.prototype.getStats=function(){var at=this;return this._pc.getStats().then(function(St){return U.filterStats(St,at.track,!1)})}}if("getStats"in B.RTCRtpSender.prototype&&"getStats"in B.RTCRtpReceiver.prototype){var Ge=B.RTCPeerConnection.prototype.getStats;B.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof B.MediaStreamTrack){var at=arguments[0],St=void 0,zt=void 0,qt=void 0;return this.getSenders().forEach(function(kt){kt.track===at&&(St?qt=!0:St=kt)}),this.getReceivers().forEach(function(kt){return kt.track===at&&(zt?qt=!0:zt=kt),kt.track===at}),qt||St&&zt?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):St?St.getStats():zt?zt.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return Ge.apply(this,arguments)}}}}function me(B){B.RTCPeerConnection.prototype.getLocalStreams=function(){var at=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(St){return at._shimmedLocalStreams[St][0]})};var te=B.RTCPeerConnection.prototype.addTrack;B.RTCPeerConnection.prototype.addTrack=function(at,St){if(!St)return te.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var zt=te.apply(this,arguments);return this._shimmedLocalStreams[St.id]?this._shimmedLocalStreams[St.id].indexOf(zt)===-1&&this._shimmedLocalStreams[St.id].push(zt):this._shimmedLocalStreams[St.id]=[St,zt],zt};var oe=B.RTCPeerConnection.prototype.addStream;B.RTCPeerConnection.prototype.addStream=function(at){var St=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},at.getTracks().forEach(function(kt){var On=St.getSenders().find(function(Wn){return Wn.track===kt});if(On)throw new DOMException("Track already exists.","InvalidAccessError")});var zt=this.getSenders();oe.apply(this,arguments);var qt=this.getSenders().filter(function(kt){return zt.indexOf(kt)===-1});this._shimmedLocalStreams[at.id]=[at].concat(qt)};var Ie=B.RTCPeerConnection.prototype.removeStream;B.RTCPeerConnection.prototype.removeStream=function(at){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[at.id],Ie.apply(this,arguments)};var Ge=B.RTCPeerConnection.prototype.removeTrack;B.RTCPeerConnection.prototype.removeTrack=function(at){var St=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},at&&Object.keys(this._shimmedLocalStreams).forEach(function(zt){var qt=St._shimmedLocalStreams[zt].indexOf(at);qt!==-1&&St._shimmedLocalStreams[zt].splice(qt,1),St._shimmedLocalStreams[zt].length===1&&delete St._shimmedLocalStreams[zt]}),Ge.apply(this,arguments)}}function ge(B){if(!B.RTCPeerConnection)return;var te=U.detectBrowser(B);if(B.RTCPeerConnection.prototype.addTrack&&te.version>=65)return me(B);var oe=B.RTCPeerConnection.prototype.getLocalStreams;B.RTCPeerConnection.prototype.getLocalStreams=function(){var kt=this,On=oe.apply(this);return this._reverseStreams=this._reverseStreams||{},On.map(function(Wn){return kt._reverseStreams[Wn.id]})};var Ie=B.RTCPeerConnection.prototype.addStream;B.RTCPeerConnection.prototype.addStream=function(kt){var On=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},kt.getTracks().forEach(function(Vn){var ii=On.getSenders().find(function(ti){return ti.track===Vn});if(ii)throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[kt.id]){var Wn=new B.MediaStream(kt.getTracks());this._streams[kt.id]=Wn,this._reverseStreams[Wn.id]=kt,kt=Wn}Ie.apply(this,[kt])};var Ge=B.RTCPeerConnection.prototype.removeStream;B.RTCPeerConnection.prototype.removeStream=function(kt){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},Ge.apply(this,[this._streams[kt.id]||kt]),delete this._reverseStreams[this._streams[kt.id]?this._streams[kt.id].id:kt.id],delete this._streams[kt.id]},B.RTCPeerConnection.prototype.addTrack=function(kt,On){var Wn=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var Vn=[].slice.call(arguments,1);if(Vn.length!==1||!Vn[0].getTracks().find(function(tr){return tr===kt}))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var ii=this.getSenders().find(function(tr){return tr.track===kt});if(ii)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var ti=this._streams[On.id];if(ti)ti.addTrack(kt),Promise.resolve().then(function(){Wn.dispatchEvent(new Event("negotiationneeded"))});else{var di=new B.MediaStream([kt]);this._streams[On.id]=di,this._reverseStreams[di.id]=On,this.addStream(di)}return this.getSenders().find(function(tr){return tr.track===kt})};function nt(qt,kt){var On=kt.sdp;return Object.keys(qt._reverseStreams||[]).forEach(function(Wn){var Vn=qt._reverseStreams[Wn],ii=qt._streams[Vn.id];On=On.replace(new RegExp(ii.id,"g"),Vn.id)}),new RTCSessionDescription({type:kt.type,sdp:On})}function at(qt,kt){var On=kt.sdp;return Object.keys(qt._reverseStreams||[]).forEach(function(Wn){var Vn=qt._reverseStreams[Wn],ii=qt._streams[Vn.id];On=On.replace(new RegExp(Vn.id,"g"),ii.id)}),new RTCSessionDescription({type:kt.type,sdp:On})}["createOffer","createAnswer"].forEach(function(qt){var kt=B.RTCPeerConnection.prototype[qt],On=pe({},qt,function(){var Wn=this,Vn=arguments,ii=arguments.length&&typeof arguments[0]=="function";return ii?kt.apply(this,[function(ti){var di=nt(Wn,ti);Vn[0].apply(null,[di])},function(ti){Vn[1]&&Vn[1].apply(null,ti)},arguments[2]]):kt.apply(this,arguments).then(function(ti){return nt(Wn,ti)})});B.RTCPeerConnection.prototype[qt]=On[qt]});var St=B.RTCPeerConnection.prototype.setLocalDescription;B.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?St.apply(this,arguments):(arguments[0]=at(this,arguments[0]),St.apply(this,arguments))};var zt=Object.getOwnPropertyDescriptor(B.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(B.RTCPeerConnection.prototype,"localDescription",{get:function(){var kt=zt.get.apply(this);return kt.type===""?kt:nt(this,kt)}}),B.RTCPeerConnection.prototype.removeTrack=function(kt){var On=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!kt._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");var Wn=kt._pc===this;if(!Wn)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};var Vn=void 0;Object.keys(this._streams).forEach(function(ii){var ti=On._streams[ii].getTracks().find(function(di){return kt.track===di});ti&&(Vn=On._streams[ii])}),Vn&&(Vn.getTracks().length===1?this.removeStream(this._reverseStreams[Vn.id]):Vn.removeTrack(kt.track),this.dispatchEvent(new Event("negotiationneeded")))}}function Ze(B){var te=U.detectBrowser(B);if(!B.RTCPeerConnection&&B.webkitRTCPeerConnection&&(B.RTCPeerConnection=B.webkitRTCPeerConnection),!!B.RTCPeerConnection){te.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(Ie){var Ge=B.RTCPeerConnection.prototype[Ie],nt=pe({},Ie,function(){return arguments[0]=new(Ie==="addIceCandidate"?B.RTCIceCandidate:B.RTCSessionDescription)(arguments[0]),Ge.apply(this,arguments)});B.RTCPeerConnection.prototype[Ie]=nt[Ie]});var oe=B.RTCPeerConnection.prototype.addIceCandidate;B.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?te.version<78&&arguments[0]&&arguments[0].candidate===""?Promise.resolve():oe.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}}function fe(B){U.wrapPeerConnectionEvent(B,"negotiationneeded",function(te){var oe=te.target;if(oe.signalingState==="stable")return te})}},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=T;function T(R,N){if(!(R.navigator.mediaDevices&&"getDisplayMedia"in R.navigator.mediaDevices)&&R.navigator.mediaDevices){if(typeof N!="function"){console.error("shimGetDisplayMedia: getSourceId argument is not a function");return}R.navigator.mediaDevices.getDisplayMedia=function(U){return N(U).then(function(ue){var pe=U.video&&U.video.width,de=U.video&&U.video.height,se=U.video&&U.video.frameRate;return U.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:ue,maxFrameRate:se||3}},pe&&(U.video.mandatory.maxWidth=pe),de&&(U.video.mandatory.maxHeight=de),R.navigator.mediaDevices.getUserMedia(U)})}}}},{}],5:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0});var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(pe){return t(pe)}:function(pe){return pe&&typeof Symbol=="function"&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":t(pe)};w.shimGetUserMedia=ue;var R=Z("../utils.js"),N=z(R);function z(pe){if(pe&&pe.__esModule)return pe;var de={};if(pe!=null)for(var se in pe)Object.prototype.hasOwnProperty.call(pe,se)&&(de[se]=pe[se]);return de.default=pe,de}var U=N.log;function ue(pe){var de=pe&&pe.navigator;if(de.mediaDevices){var se=N.detectBrowser(pe),re=function(fe){if((typeof fe=="undefined"?"undefined":T(fe))!=="object"||fe.mandatory||fe.optional)return fe;var B={};return Object.keys(fe).forEach(function(te){if(!(te==="require"||te==="advanced"||te==="mediaSource")){var oe=T(fe[te])==="object"?fe[te]:{ideal:fe[te]};oe.exact!==void 0&&typeof oe.exact=="number"&&(oe.min=oe.max=oe.exact);var Ie=function(at,St){return at?at+St.charAt(0).toUpperCase()+St.slice(1):St==="deviceId"?"sourceId":St};if(oe.ideal!==void 0){B.optional=B.optional||[];var Ge={};typeof oe.ideal=="number"?(Ge[Ie("min",te)]=oe.ideal,B.optional.push(Ge),Ge={},Ge[Ie("max",te)]=oe.ideal,B.optional.push(Ge)):(Ge[Ie("",te)]=oe.ideal,B.optional.push(Ge))}oe.exact!==void 0&&typeof oe.exact!="number"?(B.mandatory=B.mandatory||{},B.mandatory[Ie("",te)]=oe.exact):["min","max"].forEach(function(nt){oe[nt]!==void 0&&(B.mandatory=B.mandatory||{},B.mandatory[Ie(nt,te)]=oe[nt])})}}),fe.advanced&&(B.optional=(B.optional||[]).concat(fe.advanced)),B},Oe=function(fe,B){if(se.version>=61)return B(fe);if(fe=JSON.parse(JSON.stringify(fe)),fe&&T(fe.audio)==="object"){var te=function(at,St,zt){St in at&&!(zt in at)&&(at[zt]=at[St],delete at[St])};fe=JSON.parse(JSON.stringify(fe)),te(fe.audio,"autoGainControl","googAutoGainControl"),te(fe.audio,"noiseSuppression","googNoiseSuppression"),fe.audio=re(fe.audio)}if(fe&&T(fe.video)==="object"){var oe=fe.video.facingMode;oe=oe&&((typeof oe=="undefined"?"undefined":T(oe))==="object"?oe:{ideal:oe});var Ie=se.version<66;if(oe&&(oe.exact==="user"||oe.exact==="environment"||oe.ideal==="user"||oe.ideal==="environment")&&!(de.mediaDevices.getSupportedConstraints&&de.mediaDevices.getSupportedConstraints().facingMode&&!Ie)){delete fe.video.facingMode;var Ge=void 0;if(oe.exact==="environment"||oe.ideal==="environment"?Ge=["back","rear"]:(oe.exact==="user"||oe.ideal==="user")&&(Ge=["front"]),Ge)return de.mediaDevices.enumerateDevices().then(function(nt){nt=nt.filter(function(St){return St.kind==="videoinput"});var at=nt.find(function(St){return Ge.some(function(zt){return St.label.toLowerCase().includes(zt)})});return!at&&nt.length&&Ge.includes("back")&&(at=nt[nt.length-1]),at&&(fe.video.deviceId=oe.exact?{exact:at.deviceId}:{ideal:at.deviceId}),fe.video=re(fe.video),U("chrome: "+JSON.stringify(fe)),B(fe)})}fe.video=re(fe.video)}return U("chrome: "+JSON.stringify(fe)),B(fe)},be=function(fe){return se.version>=64?fe:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[fe.name]||fe.name,message:fe.message,constraint:fe.constraint||fe.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},me=function(fe,B,te){Oe(fe,function(oe){de.webkitGetUserMedia(oe,B,function(Ie){te&&te(be(Ie))})})};if(de.getUserMedia=me.bind(de),de.mediaDevices.getUserMedia){var ge=de.mediaDevices.getUserMedia.bind(de.mediaDevices);de.mediaDevices.getUserMedia=function(Ze){return Oe(Ze,function(fe){return ge(fe).then(function(B){if(fe.audio&&!B.getAudioTracks().length||fe.video&&!B.getVideoTracks().length)throw B.getTracks().forEach(function(te){te.stop()}),new DOMException("","NotFoundError");return B},function(B){return Promise.reject(be(B))})})}}}}},{"../utils.js":15}],6:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0});var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(me){return t(me)}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":t(me)};w.shimRTCIceCandidate=de,w.shimMaxMessageSize=se,w.shimSendThrowTypeError=re,w.shimConnectionState=Oe,w.removeAllowExtmapMixed=be;var R=Z("sdp"),N=pe(R),z=Z("./utils"),U=ue(z);function ue(me){if(me&&me.__esModule)return me;var ge={};if(me!=null)for(var Ze in me)Object.prototype.hasOwnProperty.call(me,Ze)&&(ge[Ze]=me[Ze]);return ge.default=me,ge}function pe(me){return me&&me.__esModule?me:{default:me}}function de(me){if(!(!me.RTCIceCandidate||me.RTCIceCandidate&&"foundation"in me.RTCIceCandidate.prototype)){var ge=me.RTCIceCandidate;me.RTCIceCandidate=function(fe){if((typeof fe=="undefined"?"undefined":T(fe))==="object"&&fe.candidate&&fe.candidate.indexOf("a=")===0&&(fe=JSON.parse(JSON.stringify(fe)),fe.candidate=fe.candidate.substr(2)),fe.candidate&&fe.candidate.length){var B=new ge(fe),te=N.default.parseCandidate(fe.candidate),oe=Object.assign(B,te);return oe.toJSON=function(){return{candidate:oe.candidate,sdpMid:oe.sdpMid,sdpMLineIndex:oe.sdpMLineIndex,usernameFragment:oe.usernameFragment}},oe}return new ge(fe)},me.RTCIceCandidate.prototype=ge.prototype,U.wrapPeerConnectionEvent(me,"icecandidate",function(Ze){return Ze.candidate&&Object.defineProperty(Ze,"candidate",{value:new me.RTCIceCandidate(Ze.candidate),writable:"false"}),Ze})}}function se(me){if(me.RTCPeerConnection){var ge=U.detectBrowser(me);"sctp"in me.RTCPeerConnection.prototype||Object.defineProperty(me.RTCPeerConnection.prototype,"sctp",{get:function(){return typeof this._sctp=="undefined"?null:this._sctp}});var Ze=function(Ge){if(!Ge||!Ge.sdp)return!1;var nt=N.default.splitSections(Ge.sdp);return nt.shift(),nt.some(function(at){var St=N.default.parseMLine(at);return St&&St.kind==="application"&&St.protocol.indexOf("SCTP")!==-1})},fe=function(Ge){var nt=Ge.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(nt===null||nt.length<2)return-1;var at=parseInt(nt[1],10);return at!==at?-1:at},B=function(Ge){var nt=65536;return ge.browser==="firefox"&&(ge.version<57?Ge===-1?nt=16384:nt=2147483637:ge.version<60?nt=ge.version===57?65535:65536:nt=2147483637),nt},te=function(Ge,nt){var at=65536;ge.browser==="firefox"&&ge.version===57&&(at=65535);var St=N.default.matchPrefix(Ge.sdp,"a=max-message-size:");return St.length>0?at=parseInt(St[0].substr(19),10):ge.browser==="firefox"&&nt!==-1&&(at=2147483637),at},oe=me.RTCPeerConnection.prototype.setRemoteDescription;me.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,ge.browser==="chrome"&&ge.version>=76){var Ge=this.getConfiguration(),nt=Ge.sdpSemantics;nt==="plan-b"&&Object.defineProperty(this,"sctp",{get:function(){return typeof this._sctp=="undefined"?null:this._sctp},enumerable:!0,configurable:!0})}if(Ze(arguments[0])){var at=fe(arguments[0]),St=B(at),zt=te(arguments[0],at),qt=void 0;St===0&&zt===0?qt=Number.POSITIVE_INFINITY:St===0||zt===0?qt=Math.max(St,zt):qt=Math.min(St,zt);var kt={};Object.defineProperty(kt,"maxMessageSize",{get:function(){return qt}}),this._sctp=kt}return oe.apply(this,arguments)}}}function re(me){if(!(me.RTCPeerConnection&&"createDataChannel"in me.RTCPeerConnection.prototype))return;function ge(fe,B){var te=fe.send;fe.send=function(){var Ie=arguments[0],Ge=Ie.length||Ie.size||Ie.byteLength;if(fe.readyState==="open"&&B.sctp&&Ge>B.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+B.sctp.maxMessageSize+" bytes)");return te.apply(fe,arguments)}}var Ze=me.RTCPeerConnection.prototype.createDataChannel;me.RTCPeerConnection.prototype.createDataChannel=function(){var B=Ze.apply(this,arguments);return ge(B,this),B},U.wrapPeerConnectionEvent(me,"datachannel",function(fe){return ge(fe.channel,fe.target),fe})}function Oe(me){if(!(!me.RTCPeerConnection||"connectionState"in me.RTCPeerConnection.prototype)){var ge=me.RTCPeerConnection.prototype;Object.defineProperty(ge,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(ge,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(fe){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),fe&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=fe)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(function(Ze){var fe=ge[Ze];ge[Ze]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(B){var te=B.target;if(te._lastConnectionState!==te.connectionState){te._lastConnectionState=te.connectionState;var oe=new Event("connectionstatechange",B);te.dispatchEvent(oe)}return B},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),fe.apply(this,arguments)}})}}function be(me){if(me.RTCPeerConnection){var ge=U.detectBrowser(me);if(!(ge.browser==="chrome"&&ge.version>=71)){var Ze=me.RTCPeerConnection.prototype.setRemoteDescription;me.RTCPeerConnection.prototype.setRemoteDescription=function(B){return B&&B.sdp&&B.sdp.indexOf(` a=extmap-allow-mixed`)!==-1&&(B.sdp=B.sdp.split(` `).filter(function(te){return te.trim()!=="a=extmap-allow-mixed"}).join(` `)),Ze.apply(this,arguments)}}}}},{"./utils":15,sdp:17}],7:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=w.shimGetUserMedia=void 0;var T=Z("./getusermedia");Object.defineProperty(w,"shimGetUserMedia",{enumerable:!0,get:function(){return T.shimGetUserMedia}});var R=Z("./getdisplaymedia");Object.defineProperty(w,"shimGetDisplayMedia",{enumerable:!0,get:function(){return R.shimGetDisplayMedia}}),w.shimPeerConnection=re,w.shimReplaceTrack=Oe;var N=Z("../utils"),z=se(N),U=Z("./filtericeservers"),ue=Z("rtcpeerconnection-shim"),pe=de(ue);function de(be){return be&&be.__esModule?be:{default:be}}function se(be){if(be&&be.__esModule)return be;var me={};if(be!=null)for(var ge in be)Object.prototype.hasOwnProperty.call(be,ge)&&(me[ge]=be[ge]);return me.default=be,me}function re(be){var me=z.detectBrowser(be);if(be.RTCIceGatherer&&(be.RTCIceCandidate||(be.RTCIceCandidate=function(B){return B}),be.RTCSessionDescription||(be.RTCSessionDescription=function(B){return B}),me.version<15025)){var ge=Object.getOwnPropertyDescriptor(be.MediaStreamTrack.prototype,"enabled");Object.defineProperty(be.MediaStreamTrack.prototype,"enabled",{set:function(B){ge.set.call(this,B);var te=new Event("enabled");te.enabled=B,this.dispatchEvent(te)}})}be.RTCRtpSender&&!("dtmf"in be.RTCRtpSender.prototype)&&Object.defineProperty(be.RTCRtpSender.prototype,"dtmf",{get:function(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=new be.RTCDtmfSender(this):this.track.kind==="video"&&(this._dtmf=null)),this._dtmf}}),be.RTCDtmfSender&&!be.RTCDTMFSender&&(be.RTCDTMFSender=be.RTCDtmfSender);var Ze=(0,pe.default)(be,me.version);be.RTCPeerConnection=function(B){return B&&B.iceServers&&(B.iceServers=(0,U.filterIceServers)(B.iceServers,me.version),z.log("ICE servers after filtering:",B.iceServers)),new Ze(B)},be.RTCPeerConnection.prototype=Ze.prototype}function Oe(be){be.RTCRtpSender&&!("replaceTrack"in be.RTCRtpSender.prototype)&&(be.RTCRtpSender.prototype.replaceTrack=be.RTCRtpSender.prototype.setTrack)}},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}],8:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.filterIceServers=z;var T=Z("../utils"),R=N(T);function N(U){if(U&&U.__esModule)return U;var ue={};if(U!=null)for(var pe in U)Object.prototype.hasOwnProperty.call(U,pe)&&(ue[pe]=U[pe]);return ue.default=U,ue}function z(U,ue){var pe=!1;return U=JSON.parse(JSON.stringify(U)),U.filter(function(de){if(de&&(de.urls||de.url)){var se=de.urls||de.url;de.url&&!de.urls&&R.deprecated("RTCIceServer.url","RTCIceServer.urls");var re=typeof se=="string";return re&&(se=[se]),se=se.filter(function(Oe){if(Oe.indexOf("stun:")===0)return!1;var be=Oe.startsWith("turn")&&!Oe.startsWith("turn:[")&&Oe.includes("transport=udp");return be&&!pe?(pe=!0,!0):be&&!pe}),delete de.url,de.urls=re?se[0]:se,!!se.length}})}},{"../utils":15}],9:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=T;function T(R){"getDisplayMedia"in R.navigator&&R.navigator.mediaDevices&&(R.navigator.mediaDevices&&"getDisplayMedia"in R.navigator.mediaDevices||(R.navigator.mediaDevices.getDisplayMedia=R.navigator.getDisplayMedia.bind(R.navigator)))}},{}],10:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetUserMedia=T;function T(R){var N=R&&R.navigator,z=function(pe){return{name:{PermissionDeniedError:"NotAllowedError"}[pe.name]||pe.name,message:pe.message,constraint:pe.constraint,toString:function(){return this.name}}},U=N.mediaDevices.getUserMedia.bind(N.mediaDevices);N.mediaDevices.getUserMedia=function(ue){return U(ue).catch(function(pe){return Promise.reject(z(pe))})}}},{}],11:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=w.shimGetUserMedia=void 0;var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(B){return t(B)}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":t(B)},R=Z("./getusermedia");Object.defineProperty(w,"shimGetUserMedia",{enumerable:!0,get:function(){return R.shimGetUserMedia}});var N=Z("./getdisplaymedia");Object.defineProperty(w,"shimGetDisplayMedia",{enumerable:!0,get:function(){return N.shimGetDisplayMedia}}),w.shimOnTrack=de,w.shimPeerConnection=se,w.shimSenderGetStats=re,w.shimReceiverGetStats=Oe,w.shimRemoveStream=be,w.shimRTCDataChannel=me,w.shimAddTransceiver=ge,w.shimCreateOffer=Ze,w.shimCreateAnswer=fe;var z=Z("../utils"),U=ue(z);function ue(B){if(B&&B.__esModule)return B;var te={};if(B!=null)for(var oe in B)Object.prototype.hasOwnProperty.call(B,oe)&&(te[oe]=B[oe]);return te.default=B,te}function pe(B,te,oe){return te in B?Object.defineProperty(B,te,{value:oe,enumerable:!0,configurable:!0,writable:!0}):B[te]=oe,B}function de(B){(typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCTrackEvent&&"receiver"in B.RTCTrackEvent.prototype&&!("transceiver"in B.RTCTrackEvent.prototype)&&Object.defineProperty(B.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function se(B){var te=U.detectBrowser(B);if(!((typeof B=="undefined"?"undefined":T(B))!=="object"||!(B.RTCPeerConnection||B.mozRTCPeerConnection))){if(!B.RTCPeerConnection&&B.mozRTCPeerConnection&&(B.RTCPeerConnection=B.mozRTCPeerConnection),te.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(nt){var at=B.RTCPeerConnection.prototype[nt],St=pe({},nt,function(){return arguments[0]=new(nt==="addIceCandidate"?B.RTCIceCandidate:B.RTCSessionDescription)(arguments[0]),at.apply(this,arguments)});B.RTCPeerConnection.prototype[nt]=St[nt]}),te.version<68){var oe=B.RTCPeerConnection.prototype.addIceCandidate;B.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&arguments[0].candidate===""?Promise.resolve():oe.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var Ie={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},Ge=B.RTCPeerConnection.prototype.getStats;B.RTCPeerConnection.prototype.getStats=function(){var at=Array.prototype.slice.call(arguments),St=at[0],zt=at[1],qt=at[2];return Ge.apply(this,[St||null]).then(function(kt){if(te.version<53&&!zt)try{kt.forEach(function(On){On.type=Ie[On.type]||On.type})}catch(On){if(On.name!=="TypeError")throw On;kt.forEach(function(Wn,Vn){kt.set(Vn,Object.assign({},Wn,{type:Ie[Wn.type]||Wn.type}))})}return kt}).then(zt,qt)}}}function re(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&B.RTCRtpSender&&!(B.RTCRtpSender&&"getStats"in B.RTCRtpSender.prototype)){var te=B.RTCPeerConnection.prototype.getSenders;te&&(B.RTCPeerConnection.prototype.getSenders=function(){var Ge=this,nt=te.apply(this,[]);return nt.forEach(function(at){return at._pc=Ge}),nt});var oe=B.RTCPeerConnection.prototype.addTrack;oe&&(B.RTCPeerConnection.prototype.addTrack=function(){var Ge=oe.apply(this,arguments);return Ge._pc=this,Ge}),B.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}}function Oe(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection&&B.RTCRtpSender&&!(B.RTCRtpSender&&"getStats"in B.RTCRtpReceiver.prototype)){var te=B.RTCPeerConnection.prototype.getReceivers;te&&(B.RTCPeerConnection.prototype.getReceivers=function(){var Ie=this,Ge=te.apply(this,[]);return Ge.forEach(function(nt){return nt._pc=Ie}),Ge}),U.wrapPeerConnectionEvent(B,"track",function(oe){return oe.receiver._pc=oe.srcElement,oe}),B.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function be(B){!B.RTCPeerConnection||"removeStream"in B.RTCPeerConnection.prototype||(B.RTCPeerConnection.prototype.removeStream=function(oe){var Ie=this;U.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(Ge){Ge.track&&oe.getTracks().includes(Ge.track)&&Ie.removeTrack(Ge)})})}function me(B){B.DataChannel&&!B.RTCDataChannel&&(B.RTCDataChannel=B.DataChannel)}function ge(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection){var te=B.RTCPeerConnection.prototype.addTransceiver;te&&(B.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var Ie=arguments[1],Ge=Ie&&"sendEncodings"in Ie;Ge&&Ie.sendEncodings.forEach(function(zt){if("rid"in zt){var qt=/^[a-z0-9]{0,16}$/i;if(!qt.test(zt.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in zt&&!(parseFloat(zt.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in zt&&!(parseFloat(zt.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});var nt=te.apply(this,arguments);if(Ge){var at=nt.sender,St=at.getParameters();"encodings"in St||(St.encodings=Ie.sendEncodings,this.setParametersPromises.push(at.setParameters(St).catch(function(){})))}return nt})}}function Ze(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection){var te=B.RTCPeerConnection.prototype.createOffer;B.RTCPeerConnection.prototype.createOffer=function(){var Ie=this,Ge=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return te.apply(Ie,Ge)}).finally(function(){Ie.setParametersPromises=[]}):te.apply(this,arguments)}}}function fe(B){if((typeof B=="undefined"?"undefined":T(B))==="object"&&B.RTCPeerConnection){var te=B.RTCPeerConnection.prototype.createAnswer;B.RTCPeerConnection.prototype.createAnswer=function(){var Ie=this,Ge=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return te.apply(Ie,Ge)}).finally(function(){Ie.setParametersPromises=[]}):te.apply(this,arguments)}}}},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0}),w.shimGetDisplayMedia=T;function T(R,N){R.navigator.mediaDevices&&"getDisplayMedia"in R.navigator.mediaDevices||R.navigator.mediaDevices&&(R.navigator.mediaDevices.getDisplayMedia=function(U){if(!(U&&U.video)){var ue=new DOMException("getDisplayMedia without video constraints is undefined");return ue.name="NotFoundError",ue.code=8,Promise.reject(ue)}return U.video===!0?U.video={mediaSource:N}:U.video.mediaSource=N,R.navigator.mediaDevices.getUserMedia(U)})}},{}],13:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0});var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(ue){return t(ue)}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":t(ue)};w.shimGetUserMedia=U;var R=Z("../utils"),N=z(R);function z(ue){if(ue&&ue.__esModule)return ue;var pe={};if(ue!=null)for(var de in ue)Object.prototype.hasOwnProperty.call(ue,de)&&(pe[de]=ue[de]);return pe.default=ue,pe}function U(ue){var pe=N.detectBrowser(ue),de=ue&&ue.navigator,se=ue&&ue.MediaStreamTrack;if(de.getUserMedia=function(ge,Ze,fe){N.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),de.mediaDevices.getUserMedia(ge).then(Ze,fe)},!(pe.version>55&&"autoGainControl"in de.mediaDevices.getSupportedConstraints())){var re=function(Ze,fe,B){fe in Ze&&!(B in Ze)&&(Ze[B]=Ze[fe],delete Ze[fe])},Oe=de.mediaDevices.getUserMedia.bind(de.mediaDevices);if(de.mediaDevices.getUserMedia=function(ge){return(typeof ge=="undefined"?"undefined":T(ge))==="object"&&T(ge.audio)==="object"&&(ge=JSON.parse(JSON.stringify(ge)),re(ge.audio,"autoGainControl","mozAutoGainControl"),re(ge.audio,"noiseSuppression","mozNoiseSuppression")),Oe(ge)},se&&se.prototype.getSettings){var be=se.prototype.getSettings;se.prototype.getSettings=function(){var ge=be.apply(this,arguments);return re(ge,"mozAutoGainControl","autoGainControl"),re(ge,"mozNoiseSuppression","noiseSuppression"),ge}}if(se&&se.prototype.applyConstraints){var me=se.prototype.applyConstraints;se.prototype.applyConstraints=function(ge){return this.kind==="audio"&&(typeof ge=="undefined"?"undefined":T(ge))==="object"&&(ge=JSON.parse(JSON.stringify(ge)),re(ge,"autoGainControl","mozAutoGainControl"),re(ge,"noiseSuppression","mozNoiseSuppression")),me.apply(this,[ge])}}}}},{"../utils":15}],14:[function(Z,H,w){Object.defineProperty(w,"__esModule",{value:!0});var T=typeof Symbol=="function"&&t(Symbol.iterator)==="symbol"?function(me){return t(me)}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":t(me)};w.shimLocalStreamsAPI=U,w.shimRemoteStreamsAPI=ue,w.shimCallbacksAPI=pe,w.shimGetUserMedia=de,w.shimConstraints=se,w.shimRTCIceServerUrls=re,w.shimTrackEventTransceiver=Oe,w.shimCreateOfferLegacy=be;var R=Z("../utils"),N=z(R);function z(me){if(me&&me.__esModule)return me;var ge={};if(me!=null)for(var Ze in me)Object.prototype.hasOwnProperty.call(me,Ze)&&(ge[Ze]=me[Ze]);return ge.default=me,ge}function U(me){if(!((typeof me=="undefined"?"undefined":T(me))!=="object"||!me.RTCPeerConnection)){if("getLocalStreams"in me.RTCPeerConnection.prototype||(me.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in me.RTCPeerConnection.prototype)){var ge=me.RTCPeerConnection.prototype.addTrack;me.RTCPeerConnection.prototype.addStream=function(fe){var B=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(fe)||this._localStreams.push(fe),fe.getAudioTracks().forEach(function(te){return ge.call(B,te,fe)}),fe.getVideoTracks().forEach(function(te){return ge.call(B,te,fe)})},me.RTCPeerConnection.prototype.addTrack=function(fe){var B=arguments[1];return B&&(this._localStreams?this._localStreams.includes(B)||this._localStreams.push(B):this._localStreams=[B]),ge.apply(this,arguments)}}"removeStream"in me.RTCPeerConnection.prototype||(me.RTCPeerConnection.prototype.removeStream=function(fe){var B=this;this._localStreams||(this._localStreams=[]);var te=this._localStreams.indexOf(fe);if(te!==-1){this._localStreams.splice(te,1);var oe=fe.getTracks();this.getSenders().forEach(function(Ie){oe.includes(Ie.track)&&B.removeTrack(Ie)})}})}}function ue(me){if(!((typeof me=="undefined"?"undefined":T(me))!=="object"||!me.RTCPeerConnection)&&("getRemoteStreams"in me.RTCPeerConnection.prototype||(me.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in me.RTCPeerConnection.prototype))){Object.defineProperty(me.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(fe){var B=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=fe),this.addEventListener("track",this._onaddstreampoly=function(te){te.streams.forEach(function(oe){if(B._remoteStreams||(B._remoteStreams=[]),!B._remoteStreams.includes(oe)){B._remoteStreams.push(oe);var Ie=new Event("addstream");Ie.stream=oe,B.dispatchEvent(Ie)}})})}});var ge=me.RTCPeerConnection.prototype.setRemoteDescription;me.RTCPeerConnection.prototype.setRemoteDescription=function(){var fe=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(B){B.streams.forEach(function(te){if(fe._remoteStreams||(fe._remoteStreams=[]),!(fe._remoteStreams.indexOf(te)>=0)){fe._remoteStreams.push(te);var oe=new Event("addstream");oe.stream=te,fe.dispatchEvent(oe)}})}),ge.apply(fe,arguments)}}}function pe(me){if(!((typeof me=="undefined"?"undefined":T(me))!=="object"||!me.RTCPeerConnection)){var ge=me.RTCPeerConnection.prototype,Ze=ge.createOffer,fe=ge.createAnswer,B=ge.setLocalDescription,te=ge.setRemoteDescription,oe=ge.addIceCandidate;ge.createOffer=function(nt,at){var St=arguments.length>=2?arguments[2]:arguments[0],zt=Ze.apply(this,[St]);return at?(zt.then(nt,at),Promise.resolve()):zt},ge.createAnswer=function(nt,at){var St=arguments.length>=2?arguments[2]:arguments[0],zt=fe.apply(this,[St]);return at?(zt.then(nt,at),Promise.resolve()):zt};var Ie=function(nt,at,St){var zt=B.apply(this,[nt]);return St?(zt.then(at,St),Promise.resolve()):zt};ge.setLocalDescription=Ie,Ie=function(nt,at,St){var zt=te.apply(this,[nt]);return St?(zt.then(at,St),Promise.resolve()):zt},ge.setRemoteDescription=Ie,Ie=function(nt,at,St){var zt=oe.apply(this,[nt]);return St?(zt.then(at,St),Promise.resolve()):zt},ge.addIceCandidate=Ie}}function de(me){var ge=me&&me.navigator;if(ge.mediaDevices&&ge.mediaDevices.getUserMedia){var Ze=ge.mediaDevices,fe=Ze.getUserMedia.bind(Ze);ge.mediaDevices.getUserMedia=function(B){return fe(se(B))}}!ge.getUserMedia&&ge.mediaDevices&&ge.mediaDevices.getUserMedia&&(ge.getUserMedia=function(te,oe,Ie){ge.mediaDevices.getUserMedia(te).then(oe,Ie)}.bind(ge))}function se(me){return me&&me.video!==void 0?Object.assign({},me,{video:N.compactObject(me.video)}):me}function re(me){var ge=me.RTCPeerConnection;me.RTCPeerConnection=function(fe,B){if(fe&&fe.iceServers){for(var te=[],oe=0;oe=te&&parseInt(oe[te],10)}function ue(fe,B,te){if(fe.RTCPeerConnection){var oe=fe.RTCPeerConnection.prototype,Ie=oe.addEventListener;oe.addEventListener=function(nt,at){if(nt!==B)return Ie.apply(this,arguments);var St=function(qt){var kt=te(qt);kt&&at(kt)};return this._eventMap=this._eventMap||{},this._eventMap[at]=St,Ie.apply(this,[nt,St])};var Ge=oe.removeEventListener;oe.removeEventListener=function(nt,at){if(nt!==B||!this._eventMap||!this._eventMap[at])return Ge.apply(this,arguments);var St=this._eventMap[at];return delete this._eventMap[at],Ge.apply(this,[nt,St])},Object.defineProperty(oe,"on"+B,{get:function(){return this["_on"+B]},set:function(at){this["_on"+B]&&(this.removeEventListener(B,this["_on"+B]),delete this["_on"+B]),at&&this.addEventListener(B,this["_on"+B]=at)},enumerable:!0,configurable:!0})}}function pe(fe){return typeof fe!="boolean"?new Error("Argument type: "+(typeof fe=="undefined"?"undefined":T(fe))+". Please use a boolean."):(N=fe,fe?"adapter.js logging disabled":"adapter.js logging enabled")}function de(fe){return typeof fe!="boolean"?new Error("Argument type: "+(typeof fe=="undefined"?"undefined":T(fe))+". Please use a boolean."):(z=!fe,"adapter.js deprecation warnings "+(fe?"disabled":"enabled"))}function se(){if((typeof window=="undefined"?"undefined":T(window))==="object"){if(N)return;typeof console!="undefined"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function re(fe,B){z&&console.warn(fe+" is deprecated, please use "+B+" instead.")}function Oe(fe){var B=fe.navigator,te={browser:null,version:null};if(typeof fe=="undefined"||!fe.navigator)return te.browser="Not a browser.",te;if(B.mozGetUserMedia)te.browser="firefox",te.version=U(B.userAgent,/Firefox\/(\d+)\./,1);else if(B.webkitGetUserMedia||fe.isSecureContext===!1&&fe.webkitRTCPeerConnection&&!fe.RTCIceGatherer)te.browser="chrome",te.version=U(B.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(B.mediaDevices&&B.userAgent.match(/Edge\/(\d+).(\d+)$/))te.browser="edge",te.version=U(B.userAgent,/Edge\/(\d+).(\d+)$/,2);else if(fe.RTCPeerConnection&&B.userAgent.match(/AppleWebKit\/(\d+)\./))te.browser="safari",te.version=U(B.userAgent,/AppleWebKit\/(\d+)\./,1),te.supportsUnifiedPlan=fe.RTCRtpTransceiver&&"currentDirection"in fe.RTCRtpTransceiver.prototype;else return te.browser="Not a supported browser.",te;return te}function be(fe){return Object.prototype.toString.call(fe)==="[object Object]"}function me(fe){return be(fe)?Object.keys(fe).reduce(function(B,te){var oe=be(fe[te]),Ie=oe?me(fe[te]):fe[te],Ge=oe&&!Object.keys(Ie).length;return Ie===void 0||Ge?B:Object.assign(B,R({},te,Ie))},{}):fe}function ge(fe,B,te){!B||te.has(B.id)||(te.set(B.id,B),Object.keys(B).forEach(function(oe){oe.endsWith("Id")?ge(fe,fe.get(B[oe]),te):oe.endsWith("Ids")&&B[oe].forEach(function(Ie){ge(fe,fe.get(Ie),te)})}))}function Ze(fe,B,te){var oe=te?"outbound-rtp":"inbound-rtp",Ie=new Map;if(B===null)return Ie;var Ge=[];return fe.forEach(function(nt){nt.type==="track"&&nt.trackIdentifier===B.id&&Ge.push(nt)}),Ge.forEach(function(nt){fe.forEach(function(at){at.type===oe&&at.trackId===nt.id&&ge(fe,at,Ie)})}),Ie}},{}],16:[function(Z,H,w){var T=Z("sdp");function R(se){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[se.type]||se.type}function N(se,re,Oe,be,me){var ge=T.writeRtpDescription(se.kind,re);if(ge+=T.writeIceParameters(se.iceGatherer.getLocalParameters()),ge+=T.writeDtlsParameters(se.dtlsTransport.getLocalParameters(),Oe==="offer"?"actpass":me||"active"),ge+="a=mid:"+se.mid+`\r `,se.rtpSender&&se.rtpReceiver?ge+=`a=sendrecv\r `:se.rtpSender?ge+=`a=sendonly\r `:se.rtpReceiver?ge+=`a=recvonly\r `:ge+=`a=inactive\r `,se.rtpSender){var Ze=se.rtpSender._initialTrackId||se.rtpSender.track.id;se.rtpSender._initialTrackId=Ze;var fe="msid:"+(be?be.id:"-")+" "+Ze+`\r `;ge+="a="+fe,ge+="a=ssrc:"+se.sendEncodingParameters[0].ssrc+" "+fe,se.sendEncodingParameters[0].rtx&&(ge+="a=ssrc:"+se.sendEncodingParameters[0].rtx.ssrc+" "+fe,ge+="a=ssrc-group:FID "+se.sendEncodingParameters[0].ssrc+" "+se.sendEncodingParameters[0].rtx.ssrc+`\r `)}return ge+="a=ssrc:"+se.sendEncodingParameters[0].ssrc+" cname:"+T.localCName+`\r `,se.rtpSender&&se.sendEncodingParameters[0].rtx&&(ge+="a=ssrc:"+se.sendEncodingParameters[0].rtx.ssrc+" cname:"+T.localCName+`\r `),ge}function z(se,re){var Oe=!1;return se=JSON.parse(JSON.stringify(se)),se.filter(function(be){if(be&&(be.urls||be.url)){var me=be.urls||be.url;be.url&&!be.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var ge=typeof me=="string";return ge&&(me=[me]),me=me.filter(function(Ze){var fe=Ze.indexOf("turn:")===0&&Ze.indexOf("transport=udp")!==-1&&Ze.indexOf("turn:[")===-1&&!Oe;return fe?(Oe=!0,!0):Ze.indexOf("stun:")===0&&re>=14393&&Ze.indexOf("?transport=udp")===-1}),delete be.url,be.urls=ge?me[0]:me,!!me.length}})}function U(se,re){var Oe={codecs:[],headerExtensions:[],fecMechanisms:[]},be=function(Ze,fe){Ze=parseInt(Ze,10);for(var B=0;B0;Ge--)this._iceGatherers.push(new se.RTCIceGatherer({iceServers:te.iceServers,gatherPolicy:te.iceTransportPolicy}));else te.iceCandidatePoolSize=0;this._config=te,this.transceivers=[],this._sdpSessionId=T.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(ge.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(ge.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),ge.prototype.onicecandidate=null,ge.prototype.onaddstream=null,ge.prototype.ontrack=null,ge.prototype.onremovestream=null,ge.prototype.onsignalingstatechange=null,ge.prototype.oniceconnectionstatechange=null,ge.prototype.onconnectionstatechange=null,ge.prototype.onicegatheringstatechange=null,ge.prototype.onnegotiationneeded=null,ge.prototype.ondatachannel=null,ge.prototype._dispatchEvent=function(B,te){this._isClosed||(this.dispatchEvent(te),typeof this["on"+B]=="function"&&this["on"+B](te))},ge.prototype._emitGatheringStateChange=function(){var B=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",B)},ge.prototype.getConfiguration=function(){return this._config},ge.prototype.getLocalStreams=function(){return this.localStreams},ge.prototype.getRemoteStreams=function(){return this.remoteStreams},ge.prototype._createTransceiver=function(B,te){var oe=this.transceivers.length>0,Ie={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:B,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&oe)Ie.iceTransport=this.transceivers[0].iceTransport,Ie.dtlsTransport=this.transceivers[0].dtlsTransport;else{var Ge=this._createIceAndDtlsTransports();Ie.iceTransport=Ge.iceTransport,Ie.dtlsTransport=Ge.dtlsTransport}return te||this.transceivers.push(Ie),Ie},ge.prototype.addTrack=function(B,te){if(this._isClosed)throw de("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var oe=this.transceivers.find(function(nt){return nt.track===B});if(oe)throw de("InvalidAccessError","Track already exists.");for(var Ie,Ge=0;Ge=15025)B.getTracks().forEach(function(Ie){te.addTrack(Ie,B)});else{var oe=B.clone();B.getTracks().forEach(function(Ie,Ge){var nt=oe.getTracks()[Ge];Ie.addEventListener("enabled",function(at){nt.enabled=at.enabled})}),oe.getTracks().forEach(function(Ie){te.addTrack(Ie,oe)})}},ge.prototype.removeTrack=function(B){if(this._isClosed)throw de("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(B instanceof se.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var te=this.transceivers.find(function(Ge){return Ge.rtpSender===B});if(!te)throw de("InvalidAccessError","Sender was not created by this connection.");var oe=te.stream;te.rtpSender.stop(),te.rtpSender=null,te.track=null,te.stream=null;var Ie=this.transceivers.map(function(Ge){return Ge.stream});Ie.indexOf(oe)===-1&&this.localStreams.indexOf(oe)>-1&&this.localStreams.splice(this.localStreams.indexOf(oe),1),this._maybeFireNegotiationNeeded()},ge.prototype.removeStream=function(B){var te=this;B.getTracks().forEach(function(oe){var Ie=te.getSenders().find(function(Ge){return Ge.track===oe});Ie&&te.removeTrack(Ie)})},ge.prototype.getSenders=function(){return this.transceivers.filter(function(B){return!!B.rtpSender}).map(function(B){return B.rtpSender})},ge.prototype.getReceivers=function(){return this.transceivers.filter(function(B){return!!B.rtpReceiver}).map(function(B){return B.rtpReceiver})},ge.prototype._createIceGatherer=function(B,te){var oe=this;if(te&&B>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var Ie=new se.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(Ie,"state",{value:"new",writable:!0}),this.transceivers[B].bufferedCandidateEvents=[],this.transceivers[B].bufferCandidates=function(Ge){var nt=!Ge.candidate||Object.keys(Ge.candidate).length===0;Ie.state=nt?"completed":"gathering",oe.transceivers[B].bufferedCandidateEvents!==null&&oe.transceivers[B].bufferedCandidateEvents.push(Ge)},Ie.addEventListener("localcandidate",this.transceivers[B].bufferCandidates),Ie},ge.prototype._gather=function(B,te){var oe=this,Ie=this.transceivers[te].iceGatherer;if(!Ie.onlocalcandidate){var Ge=this.transceivers[te].bufferedCandidateEvents;this.transceivers[te].bufferedCandidateEvents=null,Ie.removeEventListener("localcandidate",this.transceivers[te].bufferCandidates),Ie.onlocalcandidate=function(nt){if(!(oe.usingBundle&&te>0)){var at=new Event("icecandidate");at.candidate={sdpMid:B,sdpMLineIndex:te};var St=nt.candidate,zt=!St||Object.keys(St).length===0;if(zt)(Ie.state==="new"||Ie.state==="gathering")&&(Ie.state="completed");else{Ie.state==="new"&&(Ie.state="gathering"),St.component=1,St.ufrag=Ie.getLocalParameters().usernameFragment;var qt=T.writeCandidate(St);at.candidate=Object.assign(at.candidate,T.parseCandidate(qt)),at.candidate.candidate=qt,at.candidate.toJSON=function(){return{candidate:at.candidate.candidate,sdpMid:at.candidate.sdpMid,sdpMLineIndex:at.candidate.sdpMLineIndex,usernameFragment:at.candidate.usernameFragment}}}var kt=T.getMediaSections(oe._localDescription.sdp);zt?kt[at.candidate.sdpMLineIndex]+=`a=end-of-candidates\r `:kt[at.candidate.sdpMLineIndex]+="a="+at.candidate.candidate+`\r `,oe._localDescription.sdp=T.getDescription(oe._localDescription.sdp)+kt.join("");var On=oe.transceivers.every(function(Wn){return Wn.iceGatherer&&Wn.iceGatherer.state==="completed"});oe.iceGatheringState!=="gathering"&&(oe.iceGatheringState="gathering",oe._emitGatheringStateChange()),zt||oe._dispatchEvent("icecandidate",at),On&&(oe._dispatchEvent("icecandidate",new Event("icecandidate")),oe.iceGatheringState="complete",oe._emitGatheringStateChange())}},se.setTimeout(function(){Ge.forEach(function(nt){Ie.onlocalcandidate(nt)})},0)}},ge.prototype._createIceAndDtlsTransports=function(){var B=this,te=new se.RTCIceTransport(null);te.onicestatechange=function(){B._updateIceConnectionState(),B._updateConnectionState()};var oe=new se.RTCDtlsTransport(te);return oe.ondtlsstatechange=function(){B._updateConnectionState()},oe.onerror=function(){Object.defineProperty(oe,"state",{value:"failed",writable:!0}),B._updateConnectionState()},{iceTransport:te,dtlsTransport:oe}},ge.prototype._disposeIceAndDtlsTransports=function(B){var te=this.transceivers[B].iceGatherer;te&&(delete te.onlocalcandidate,delete this.transceivers[B].iceGatherer);var oe=this.transceivers[B].iceTransport;oe&&(delete oe.onicestatechange,delete this.transceivers[B].iceTransport);var Ie=this.transceivers[B].dtlsTransport;Ie&&(delete Ie.ondtlsstatechange,delete Ie.onerror,delete this.transceivers[B].dtlsTransport)},ge.prototype._transceive=function(B,te,oe){var Ie=U(B.localCapabilities,B.remoteCapabilities);te&&B.rtpSender&&(Ie.encodings=B.sendEncodingParameters,Ie.rtcp={cname:T.localCName,compound:B.rtcpParameters.compound},B.recvEncodingParameters.length&&(Ie.rtcp.ssrc=B.recvEncodingParameters[0].ssrc),B.rtpSender.send(Ie)),oe&&B.rtpReceiver&&Ie.codecs.length>0&&(B.kind==="video"&&B.recvEncodingParameters&&re<15019&&B.recvEncodingParameters.forEach(function(Ge){delete Ge.rtx}),B.recvEncodingParameters.length?Ie.encodings=B.recvEncodingParameters:Ie.encodings=[{}],Ie.rtcp={compound:B.rtcpParameters.compound},B.rtcpParameters.cname&&(Ie.rtcp.cname=B.rtcpParameters.cname),B.sendEncodingParameters.length&&(Ie.rtcp.ssrc=B.sendEncodingParameters[0].ssrc),B.rtpReceiver.receive(Ie))},ge.prototype.setLocalDescription=function(B){var te=this;if(["offer","answer"].indexOf(B.type)===-1)return Promise.reject(de("TypeError",'Unsupported type "'+B.type+'"'));if(!ue("setLocalDescription",B.type,te.signalingState)||te._isClosed)return Promise.reject(de("InvalidStateError","Can not set local "+B.type+" in state "+te.signalingState));var oe,Ie;if(B.type==="offer")oe=T.splitSections(B.sdp),Ie=oe.shift(),oe.forEach(function(nt,at){var St=T.parseRtpParameters(nt);te.transceivers[at].localCapabilities=St}),te.transceivers.forEach(function(nt,at){te._gather(nt.mid,at)});else if(B.type==="answer"){oe=T.splitSections(te._remoteDescription.sdp),Ie=oe.shift();var Ge=T.matchPrefix(Ie,"a=ice-lite").length>0;oe.forEach(function(nt,at){var St=te.transceivers[at],zt=St.iceGatherer,qt=St.iceTransport,kt=St.dtlsTransport,On=St.localCapabilities,Wn=St.remoteCapabilities,Vn=T.isRejected(nt)&&T.matchPrefix(nt,"a=bundle-only").length===0;if(!Vn&&!St.rejected){var ii=T.getIceParameters(nt,Ie),ti=T.getDtlsParameters(nt,Ie);Ge&&(ti.role="server"),(!te.usingBundle||at===0)&&(te._gather(St.mid,at),qt.state==="new"&&qt.start(zt,ii,Ge?"controlling":"controlled"),kt.state==="new"&&kt.start(ti));var di=U(On,Wn);te._transceive(St,di.codecs.length>0,!1)}})}return te._localDescription={type:B.type,sdp:B.sdp},B.type==="offer"?te._updateSignalingState("have-local-offer"):te._updateSignalingState("stable"),Promise.resolve()},ge.prototype.setRemoteDescription=function(B){var te=this;if(["offer","answer"].indexOf(B.type)===-1)return Promise.reject(de("TypeError",'Unsupported type "'+B.type+'"'));if(!ue("setRemoteDescription",B.type,te.signalingState)||te._isClosed)return Promise.reject(de("InvalidStateError","Can not set remote "+B.type+" in state "+te.signalingState));var oe={};te.remoteStreams.forEach(function(qt){oe[qt.id]=qt});var Ie=[],Ge=T.splitSections(B.sdp),nt=Ge.shift(),at=T.matchPrefix(nt,"a=ice-lite").length>0,St=T.matchPrefix(nt,"a=group:BUNDLE ").length>0;te.usingBundle=St;var zt=T.matchPrefix(nt,"a=ice-options:")[0];return zt?te.canTrickleIceCandidates=zt.substr(14).split(" ").indexOf("trickle")>=0:te.canTrickleIceCandidates=!1,Ge.forEach(function(qt,kt){var On=T.splitLines(qt),Wn=T.getKind(qt),Vn=T.isRejected(qt)&&T.matchPrefix(qt,"a=bundle-only").length===0,ii=On[0].substr(2).split(" ")[2],ti=T.getDirection(qt,nt),di=T.parseMsid(qt),tr=T.getMid(qt)||T.generateIdentifier();if(Vn||Wn==="application"&&(ii==="DTLS/SCTP"||ii==="UDP/DTLS/SCTP")){te.transceivers[kt]={mid:tr,kind:Wn,protocol:ii,rejected:!0};return}!Vn&&te.transceivers[kt]&&te.transceivers[kt].rejected&&(te.transceivers[kt]=te._createTransceiver(Wn,!0));var Ve,Mt,jt,Sn,Hn,pi,hi,yi,nr,zl=T.parseRtpParameters(qt),fs,zr;Vn||(fs=T.getIceParameters(qt,nt),zr=T.getDtlsParameters(qt,nt),zr.role="client"),hi=T.parseRtpEncodingParameters(qt);var Xo=T.parseRtcpParameters(qt),ir=T.matchPrefix(qt,"a=end-of-candidates",nt).length>0,wa=T.matchPrefix(qt,"a=candidate:").map(function(jn){return T.parseCandidate(jn)}).filter(function(jn){return jn.component===1});if((B.type==="offer"||B.type==="answer")&&!Vn&&St&&kt>0&&te.transceivers[kt]&&(te._disposeIceAndDtlsTransports(kt),te.transceivers[kt].iceGatherer=te.transceivers[0].iceGatherer,te.transceivers[kt].iceTransport=te.transceivers[0].iceTransport,te.transceivers[kt].dtlsTransport=te.transceivers[0].dtlsTransport,te.transceivers[kt].rtpSender&&te.transceivers[kt].rtpSender.setTransport(te.transceivers[0].dtlsTransport),te.transceivers[kt].rtpReceiver&&te.transceivers[kt].rtpReceiver.setTransport(te.transceivers[0].dtlsTransport)),B.type==="offer"&&!Vn){Ve=te.transceivers[kt]||te._createTransceiver(Wn),Ve.mid=tr,Ve.iceGatherer||(Ve.iceGatherer=te._createIceGatherer(kt,St)),wa.length&&Ve.iceTransport.state==="new"&&(ir&&(!St||kt===0)?Ve.iceTransport.setRemoteCandidates(wa):wa.forEach(function(jn){pe(Ve.iceTransport,jn)})),yi=se.RTCRtpReceiver.getCapabilities(Wn),re<15019&&(yi.codecs=yi.codecs.filter(function(jn){return jn.name!=="rtx"})),pi=Ve.sendEncodingParameters||[{ssrc:(2*kt+2)*1001}];var co=!1;if(ti==="sendrecv"||ti==="sendonly"){if(co=!Ve.rtpReceiver,Hn=Ve.rtpReceiver||new se.RTCRtpReceiver(Ve.dtlsTransport,Wn),co){var Ui;nr=Hn.track,di&&di.stream==="-"||(di?(oe[di.stream]||(oe[di.stream]=new se.MediaStream,Object.defineProperty(oe[di.stream],"id",{get:function(){return di.stream}})),Object.defineProperty(nr,"id",{get:function(){return di.track}}),Ui=oe[di.stream]):(oe.default||(oe.default=new se.MediaStream),Ui=oe.default)),Ui&&(Oe(nr,Ui),Ve.associatedRemoteMediaStreams.push(Ui)),Ie.push([nr,Hn,Ui])}}else Ve.rtpReceiver&&Ve.rtpReceiver.track&&(Ve.associatedRemoteMediaStreams.forEach(function(jn){var wi=jn.getTracks().find(function(mr){return mr.id===Ve.rtpReceiver.track.id});wi&&be(wi,jn)}),Ve.associatedRemoteMediaStreams=[]);Ve.localCapabilities=yi,Ve.remoteCapabilities=zl,Ve.rtpReceiver=Hn,Ve.rtcpParameters=Xo,Ve.sendEncodingParameters=pi,Ve.recvEncodingParameters=hi,te._transceive(te.transceivers[kt],!1,co)}else if(B.type==="answer"&&!Vn){Ve=te.transceivers[kt],Mt=Ve.iceGatherer,jt=Ve.iceTransport,Sn=Ve.dtlsTransport,Hn=Ve.rtpReceiver,pi=Ve.sendEncodingParameters,yi=Ve.localCapabilities,te.transceivers[kt].recvEncodingParameters=hi,te.transceivers[kt].remoteCapabilities=zl,te.transceivers[kt].rtcpParameters=Xo,wa.length&&jt.state==="new"&&((at||ir)&&(!St||kt===0)?jt.setRemoteCandidates(wa):wa.forEach(function(jn){pe(Ve.iceTransport,jn)})),(!St||kt===0)&&(jt.state==="new"&&jt.start(Mt,fs,"controlling"),Sn.state==="new"&&Sn.start(zr));var xr=U(Ve.localCapabilities,Ve.remoteCapabilities),_i=xr.codecs.filter(function(jn){return jn.name.toLowerCase()==="rtx"}).length;!_i&&Ve.sendEncodingParameters[0].rtx&&delete Ve.sendEncodingParameters[0].rtx,te._transceive(Ve,ti==="sendrecv"||ti==="recvonly",ti==="sendrecv"||ti==="sendonly"),Hn&&(ti==="sendrecv"||ti==="sendonly")?(nr=Hn.track,di?(oe[di.stream]||(oe[di.stream]=new se.MediaStream),Oe(nr,oe[di.stream]),Ie.push([nr,Hn,oe[di.stream]])):(oe.default||(oe.default=new se.MediaStream),Oe(nr,oe.default),Ie.push([nr,Hn,oe.default]))):delete Ve.rtpReceiver}}),te._dtlsRole===void 0&&(te._dtlsRole=B.type==="offer"?"active":"passive"),te._remoteDescription={type:B.type,sdp:B.sdp},B.type==="offer"?te._updateSignalingState("have-remote-offer"):te._updateSignalingState("stable"),Object.keys(oe).forEach(function(qt){var kt=oe[qt];if(kt.getTracks().length){if(te.remoteStreams.indexOf(kt)===-1){te.remoteStreams.push(kt);var On=new Event("addstream");On.stream=kt,se.setTimeout(function(){te._dispatchEvent("addstream",On)})}Ie.forEach(function(Wn){var Vn=Wn[0],ii=Wn[1];kt.id===Wn[2].id&&me(te,Vn,ii,[kt])})}}),Ie.forEach(function(qt){qt[2]||me(te,qt[0],qt[1],[])}),se.setTimeout(function(){te&&te.transceivers&&te.transceivers.forEach(function(qt){qt.iceTransport&&qt.iceTransport.state==="new"&&qt.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),qt.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},ge.prototype.close=function(){this.transceivers.forEach(function(B){B.iceTransport&&B.iceTransport.stop(),B.dtlsTransport&&B.dtlsTransport.stop(),B.rtpSender&&B.rtpSender.stop(),B.rtpReceiver&&B.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},ge.prototype._updateSignalingState=function(B){this.signalingState=B;var te=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",te)},ge.prototype._maybeFireNegotiationNeeded=function(){var B=this;this.signalingState!=="stable"||this.needNegotiation===!0||(this.needNegotiation=!0,se.setTimeout(function(){if(B.needNegotiation){B.needNegotiation=!1;var te=new Event("negotiationneeded");B._dispatchEvent("negotiationneeded",te)}},0))},ge.prototype._updateIceConnectionState=function(){var B,te={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(Ie){Ie.iceTransport&&!Ie.rejected&&te[Ie.iceTransport.state]++}),B="new",te.failed>0?B="failed":te.checking>0?B="checking":te.disconnected>0?B="disconnected":te.new>0?B="new":te.connected>0?B="connected":te.completed>0&&(B="completed"),B!==this.iceConnectionState){this.iceConnectionState=B;var oe=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",oe)}},ge.prototype._updateConnectionState=function(){var B,te={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(Ie){Ie.iceTransport&&Ie.dtlsTransport&&!Ie.rejected&&(te[Ie.iceTransport.state]++,te[Ie.dtlsTransport.state]++)}),te.connected+=te.completed,B="new",te.failed>0?B="failed":te.connecting>0?B="connecting":te.disconnected>0?B="disconnected":te.new>0?B="new":te.connected>0&&(B="connected"),B!==this.connectionState){this.connectionState=B;var oe=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",oe)}},ge.prototype.createOffer=function(){var B=this;if(B._isClosed)return Promise.reject(de("InvalidStateError","Can not call createOffer after close"));var te=B.transceivers.filter(function(at){return at.kind==="audio"}).length,oe=B.transceivers.filter(function(at){return at.kind==="video"}).length,Ie=arguments[0];if(Ie){if(Ie.mandatory||Ie.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");Ie.offerToReceiveAudio!==void 0&&(Ie.offerToReceiveAudio===!0?te=1:Ie.offerToReceiveAudio===!1?te=0:te=Ie.offerToReceiveAudio),Ie.offerToReceiveVideo!==void 0&&(Ie.offerToReceiveVideo===!0?oe=1:Ie.offerToReceiveVideo===!1?oe=0:oe=Ie.offerToReceiveVideo)}for(B.transceivers.forEach(function(at){at.kind==="audio"?(te--,te<0&&(at.wantReceive=!1)):at.kind==="video"&&(oe--,oe<0&&(at.wantReceive=!1))});te>0||oe>0;)te>0&&(B._createTransceiver("audio"),te--),oe>0&&(B._createTransceiver("video"),oe--);var Ge=T.writeSessionBoilerplate(B._sdpSessionId,B._sdpSessionVersion++);B.transceivers.forEach(function(at,St){var zt=at.track,qt=at.kind,kt=at.mid||T.generateIdentifier();at.mid=kt,at.iceGatherer||(at.iceGatherer=B._createIceGatherer(St,B.usingBundle));var On=se.RTCRtpSender.getCapabilities(qt);re<15019&&(On.codecs=On.codecs.filter(function(Vn){return Vn.name!=="rtx"})),On.codecs.forEach(function(Vn){Vn.name==="H264"&&Vn.parameters["level-asymmetry-allowed"]===void 0&&(Vn.parameters["level-asymmetry-allowed"]="1"),at.remoteCapabilities&&at.remoteCapabilities.codecs&&at.remoteCapabilities.codecs.forEach(function(ii){Vn.name.toLowerCase()===ii.name.toLowerCase()&&Vn.clockRate===ii.clockRate&&(Vn.preferredPayloadType=ii.payloadType)})}),On.headerExtensions.forEach(function(Vn){var ii=at.remoteCapabilities&&at.remoteCapabilities.headerExtensions||[];ii.forEach(function(ti){Vn.uri===ti.uri&&(Vn.id=ti.id)})});var Wn=at.sendEncodingParameters||[{ssrc:(2*St+1)*1001}];zt&&re>=15019&&qt==="video"&&!Wn[0].rtx&&(Wn[0].rtx={ssrc:Wn[0].ssrc+1}),at.wantReceive&&(at.rtpReceiver=new se.RTCRtpReceiver(at.dtlsTransport,qt)),at.localCapabilities=On,at.sendEncodingParameters=Wn}),B._config.bundlePolicy!=="max-compat"&&(Ge+="a=group:BUNDLE "+B.transceivers.map(function(at){return at.mid}).join(" ")+`\r `),Ge+=`a=ice-options:trickle\r `,B.transceivers.forEach(function(at,St){Ge+=N(at,at.localCapabilities,"offer",at.stream,B._dtlsRole),Ge+=`a=rtcp-rsize\r `,at.iceGatherer&&B.iceGatheringState!=="new"&&(St===0||!B.usingBundle)&&(at.iceGatherer.getLocalCandidates().forEach(function(zt){zt.component=1,Ge+="a="+T.writeCandidate(zt)+`\r `}),at.iceGatherer.state==="completed"&&(Ge+=`a=end-of-candidates\r `))});var nt=new se.RTCSessionDescription({type:"offer",sdp:Ge});return Promise.resolve(nt)},ge.prototype.createAnswer=function(){var B=this;if(B._isClosed)return Promise.reject(de("InvalidStateError","Can not call createAnswer after close"));if(!(B.signalingState==="have-remote-offer"||B.signalingState==="have-local-pranswer"))return Promise.reject(de("InvalidStateError","Can not call createAnswer in signalingState "+B.signalingState));var te=T.writeSessionBoilerplate(B._sdpSessionId,B._sdpSessionVersion++);B.usingBundle&&(te+="a=group:BUNDLE "+B.transceivers.map(function(Ge){return Ge.mid}).join(" ")+`\r `),te+=`a=ice-options:trickle\r `;var oe=T.getMediaSections(B._remoteDescription.sdp).length;B.transceivers.forEach(function(Ge,nt){if(!(nt+1>oe)){if(Ge.rejected){Ge.kind==="application"?Ge.protocol==="DTLS/SCTP"?te+=`m=application 0 DTLS/SCTP 5000\r `:te+="m=application 0 "+Ge.protocol+` webrtc-datachannel\r `:Ge.kind==="audio"?te+=`m=audio 0 UDP/TLS/RTP/SAVPF 0\r a=rtpmap:0 PCMU/8000\r `:Ge.kind==="video"&&(te+=`m=video 0 UDP/TLS/RTP/SAVPF 120\r a=rtpmap:120 VP8/90000\r `),te+=`c=IN IP4 0.0.0.0\r a=inactive\r a=mid:`+Ge.mid+`\r `;return}if(Ge.stream){var at;Ge.kind==="audio"?at=Ge.stream.getAudioTracks()[0]:Ge.kind==="video"&&(at=Ge.stream.getVideoTracks()[0]),at&&re>=15019&&Ge.kind==="video"&&!Ge.sendEncodingParameters[0].rtx&&(Ge.sendEncodingParameters[0].rtx={ssrc:Ge.sendEncodingParameters[0].ssrc+1})}var St=U(Ge.localCapabilities,Ge.remoteCapabilities),zt=St.codecs.filter(function(qt){return qt.name.toLowerCase()==="rtx"}).length;!zt&&Ge.sendEncodingParameters[0].rtx&&delete Ge.sendEncodingParameters[0].rtx,te+=N(Ge,St,"answer",Ge.stream,B._dtlsRole),Ge.rtcpParameters&&Ge.rtcpParameters.reducedSize&&(te+=`a=rtcp-rsize\r `)}});var Ie=new se.RTCSessionDescription({type:"answer",sdp:te});return Promise.resolve(Ie)},ge.prototype.addIceCandidate=function(B){var te=this,oe;return B&&!(B.sdpMLineIndex!==void 0||B.sdpMid)?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(Ie,Ge){if(te._remoteDescription)if(!B||B.candidate==="")for(var nt=0;nt0?T.parseCandidate(B.candidate):{};if(qt.protocol==="tcp"&&(qt.port===0||qt.port===9)||qt.component&&qt.component!==1)return Ie();if((at===0||at>0&&zt.iceTransport!==te.transceivers[0].iceTransport)&&!pe(zt.iceTransport,qt))return Ge(de("OperationError","Can not add ICE candidate"));var kt=B.candidate.trim();kt.indexOf("a=")===0&&(kt=kt.substr(2)),oe=T.getMediaSections(te._remoteDescription.sdp),oe[at]+="a="+(qt.type?kt:"end-of-candidates")+`\r `,te._remoteDescription.sdp=T.getDescription(te._remoteDescription.sdp)+oe.join("")}else return Ge(de("OperationError","Can not add ICE candidate"))}else return Ge(de("InvalidStateError","Can not add ICE candidate without a remote description"));Ie()})},ge.prototype.getStats=function(B){if(B&&B instanceof se.MediaStreamTrack){var te=null;if(this.transceivers.forEach(function(Ie){Ie.rtpSender&&Ie.rtpSender.track===B?te=Ie.rtpSender:Ie.rtpReceiver&&Ie.rtpReceiver.track===B&&(te=Ie.rtpReceiver)}),!te)throw de("InvalidAccessError","Invalid selector.");return te.getStats()}var oe=[];return this.transceivers.forEach(function(Ie){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(Ge){Ie[Ge]&&oe.push(Ie[Ge].getStats())})}),Promise.all(oe).then(function(Ie){var Ge=new Map;return Ie.forEach(function(nt){nt.forEach(function(at){Ge.set(at.id,at)})}),Ge})};var Ze=["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"];Ze.forEach(function(B){var te=se[B];if(te&&te.prototype&&te.prototype.getStats){var oe=te.prototype.getStats;te.prototype.getStats=function(){return oe.apply(this).then(function(Ie){var Ge=new Map;return Object.keys(Ie).forEach(function(nt){Ie[nt].type=R(Ie[nt]),Ge.set(nt,Ie[nt])}),Ge})}}});var fe=["createOffer","createAnswer"];return fe.forEach(function(B){var te=ge.prototype[B];ge.prototype[B]=function(){var oe=arguments;return typeof oe[0]=="function"||typeof oe[1]=="function"?te.apply(this,[arguments[2]]).then(function(Ie){typeof oe[0]=="function"&&oe[0].apply(null,[Ie])},function(Ie){typeof oe[1]=="function"&&oe[1].apply(null,[Ie])}):te.apply(this,arguments)}}),fe=["setLocalDescription","setRemoteDescription","addIceCandidate"],fe.forEach(function(B){var te=ge.prototype[B];ge.prototype[B]=function(){var oe=arguments;return typeof oe[1]=="function"||typeof oe[2]=="function"?te.apply(this,arguments).then(function(){typeof oe[1]=="function"&&oe[1].apply(null)},function(Ie){typeof oe[2]=="function"&&oe[2].apply(null,[Ie])}):te.apply(this,arguments)}}),["getStats"].forEach(function(B){var te=ge.prototype[B];ge.prototype[B]=function(){var oe=arguments;return typeof oe[1]=="function"?te.apply(this,arguments).then(function(){typeof oe[1]=="function"&&oe[1].apply(null)}):te.apply(this,arguments)}}),ge}},{sdp:17}],17:[function(Z,H,w){var T={};T.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},T.localCName=T.generateIdentifier(),T.splitLines=function(R){return R.trim().split(` `).map(function(N){return N.trim()})},T.splitSections=function(R){var N=R.split(` m=`);return N.map(function(z,U){return(U>0?"m="+z:z).trim()+`\r `})},T.getDescription=function(R){var N=T.splitSections(R);return N&&N[0]},T.getMediaSections=function(R){var N=T.splitSections(R);return N.shift(),N},T.matchPrefix=function(R,N){return T.splitLines(R).filter(function(z){return z.indexOf(N)===0})},T.parseCandidate=function(R){var N;R.indexOf("a=candidate:")===0?N=R.substring(12).split(" "):N=R.substring(10).split(" ");for(var z={foundation:N[0],component:parseInt(N[1],10),protocol:N[2].toLowerCase(),priority:parseInt(N[3],10),ip:N[4],address:N[4],port:parseInt(N[5],10),type:N[7]},U=8;U0?N[0].split("/")[1]:"sendrecv",uri:N[1]}},T.writeExtmap=function(R){return"a=extmap:"+(R.id||R.preferredId)+(R.direction&&R.direction!=="sendrecv"?"/"+R.direction:"")+" "+R.uri+`\r `},T.parseFmtp=function(R){for(var N={},z,U=R.substr(R.indexOf(" ")+1).split(";"),ue=0;ue-1?(z.attribute=R.substr(N+1,U-N-1),z.value=R.substr(U+1)):z.attribute=R.substr(N+1),z},T.parseSsrcGroup=function(R){var N=R.substr(13).split(" ");return{semantics:N.shift(),ssrcs:N.map(function(z){return parseInt(z,10)})}},T.getMid=function(R){var N=T.matchPrefix(R,"a=mid:")[0];if(N)return N.substr(6)},T.parseFingerprint=function(R){var N=R.substr(14).split(" ");return{algorithm:N[0].toLowerCase(),value:N[1]}},T.getDtlsParameters=function(R,N){var z=T.matchPrefix(R+N,"a=fingerprint:");return{role:"auto",fingerprints:z.map(T.parseFingerprint)}},T.writeDtlsParameters=function(R,N){var z="a=setup:"+N+`\r `;return R.fingerprints.forEach(function(U){z+="a=fingerprint:"+U.algorithm+" "+U.value+`\r `}),z},T.getIceParameters=function(R,N){var z=T.splitLines(R);z=z.concat(T.splitLines(N));var U={usernameFragment:z.filter(function(ue){return ue.indexOf("a=ice-ufrag:")===0})[0].substr(12),password:z.filter(function(ue){return ue.indexOf("a=ice-pwd:")===0})[0].substr(10)};return U},T.writeIceParameters=function(R){return"a=ice-ufrag:"+R.usernameFragment+`\r a=ice-pwd:`+R.password+`\r `},T.parseRtpParameters=function(R){for(var N={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},z=T.splitLines(R),U=z[0].split(" "),ue=3;ue0?"9":"0",z+=" UDP/TLS/RTP/SAVPF ",z+=N.codecs.map(function(ue){return ue.preferredPayloadType!==void 0?ue.preferredPayloadType:ue.payloadType}).join(" ")+`\r `,z+=`c=IN IP4 0.0.0.0\r `,z+=`a=rtcp:9 IN IP4 0.0.0.0\r `,N.codecs.forEach(function(ue){z+=T.writeRtpMap(ue),z+=T.writeFmtp(ue),z+=T.writeRtcpFb(ue)});var U=0;return N.codecs.forEach(function(ue){ue.maxptime>U&&(U=ue.maxptime)}),U>0&&(z+="a=maxptime:"+U+`\r `),z+=`a=rtcp-mux\r `,N.headerExtensions&&N.headerExtensions.forEach(function(ue){z+=T.writeExtmap(ue)}),z},T.parseRtpEncodingParameters=function(R){var N=[],z=T.parseRtpParameters(R),U=z.fecMechanisms.indexOf("RED")!==-1,ue=z.fecMechanisms.indexOf("ULPFEC")!==-1,pe=T.matchPrefix(R,"a=ssrc:").map(function(be){return T.parseSsrcMedia(be)}).filter(function(be){return be.attribute==="cname"}),de=pe.length>0&&pe[0].ssrc,se,re=T.matchPrefix(R,"a=ssrc-group:FID").map(function(be){var me=be.substr(17).split(" ");return me.map(function(ge){return parseInt(ge,10)})});re.length>0&&re[0].length>1&&re[0][0]===de&&(se=re[0][1]),z.codecs.forEach(function(be){if(be.name.toUpperCase()==="RTX"&&be.parameters.apt){var me={ssrc:de,codecPayloadType:parseInt(be.parameters.apt,10)};de&&se&&(me.rtx={ssrc:se}),N.push(me),U&&(me=JSON.parse(JSON.stringify(me)),me.fec={ssrc:de,mechanism:ue?"red+ulpfec":"red"},N.push(me))}}),N.length===0&&de&&N.push({ssrc:de});var Oe=T.matchPrefix(R,"b=");return Oe.length&&(Oe[0].indexOf("b=TIAS:")===0?Oe=parseInt(Oe[0].substr(7),10):Oe[0].indexOf("b=AS:")===0?Oe=parseInt(Oe[0].substr(5),10)*1e3*.95-50*40*8:Oe=void 0,N.forEach(function(be){be.maxBitrate=Oe})),N},T.parseRtcpParameters=function(R){var N={},z=T.matchPrefix(R,"a=ssrc:").map(function(pe){return T.parseSsrcMedia(pe)}).filter(function(pe){return pe.attribute==="cname"})[0];z&&(N.cname=z.value,N.ssrc=z.ssrc);var U=T.matchPrefix(R,"a=rtcp-rsize");N.reducedSize=U.length>0,N.compound=U.length===0;var ue=T.matchPrefix(R,"a=rtcp-mux");return N.mux=ue.length>0,N},T.parseMsid=function(R){var N,z=T.matchPrefix(R,"a=msid:");if(z.length===1)return N=z[0].substr(7).split(" "),{stream:N[0],track:N[1]};var U=T.matchPrefix(R,"a=ssrc:").map(function(ue){return T.parseSsrcMedia(ue)}).filter(function(ue){return ue.attribute==="msid"});if(U.length>0)return N=U[0].value.split(" "),{stream:N[0],track:N[1]}},T.parseSctpDescription=function(R){var N=T.parseMLine(R),z=T.matchPrefix(R,"a=max-message-size:"),U;z.length>0&&(U=parseInt(z[0].substr(19),10)),isNaN(U)&&(U=65536);var ue=T.matchPrefix(R,"a=sctp-port:");if(ue.length>0)return{port:parseInt(ue[0].substr(12),10),protocol:N.fmt,maxMessageSize:U};var pe=T.matchPrefix(R,"a=sctpmap:");if(pe.length>0){var de=T.matchPrefix(R,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(de[0],10),protocol:de[1],maxMessageSize:U}}},T.writeSctpDescription=function(R,N){var z=[];return R.protocol!=="DTLS/SCTP"?z=["m="+R.kind+" 9 "+R.protocol+" "+N.protocol+`\r `,`c=IN IP4 0.0.0.0\r `,"a=sctp-port:"+N.port+`\r `]:z=["m="+R.kind+" 9 "+R.protocol+" "+N.port+`\r `,`c=IN IP4 0.0.0.0\r `,"a=sctpmap:"+N.port+" "+N.protocol+` 65535\r `],N.maxMessageSize!==void 0&&z.push("a=max-message-size:"+N.maxMessageSize+`\r `),z.join("")},T.generateSessionId=function(){return Math.random().toString().substr(2,21)},T.writeSessionBoilerplate=function(R,N,z){var U,ue=N!==void 0?N:2;R?U=R:U=T.generateSessionId();var pe=z||"thisisadapterortc";return`v=0\r o=`+pe+" "+U+" "+ue+` IN IP4 127.0.0.1\r s=-\r t=0 0\r `},T.writeMediaSection=function(R,N,z,U){var ue=T.writeRtpDescription(R.kind,N);if(ue+=T.writeIceParameters(R.iceGatherer.getLocalParameters()),ue+=T.writeDtlsParameters(R.dtlsTransport.getLocalParameters(),z==="offer"?"actpass":"active"),ue+="a=mid:"+R.mid+`\r `,R.direction?ue+="a="+R.direction+`\r `:R.rtpSender&&R.rtpReceiver?ue+=`a=sendrecv\r `:R.rtpSender?ue+=`a=sendonly\r `:R.rtpReceiver?ue+=`a=recvonly\r `:ue+=`a=inactive\r `,R.rtpSender){var pe="msid:"+U.id+" "+R.rtpSender.track.id+`\r `;ue+="a="+pe,ue+="a=ssrc:"+R.sendEncodingParameters[0].ssrc+" "+pe,R.sendEncodingParameters[0].rtx&&(ue+="a=ssrc:"+R.sendEncodingParameters[0].rtx.ssrc+" "+pe,ue+="a=ssrc-group:FID "+R.sendEncodingParameters[0].ssrc+" "+R.sendEncodingParameters[0].rtx.ssrc+`\r `)}return ue+="a=ssrc:"+R.sendEncodingParameters[0].ssrc+" cname:"+T.localCName+`\r `,R.rtpSender&&R.sendEncodingParameters[0].rtx&&(ue+="a=ssrc:"+R.sendEncodingParameters[0].rtx.ssrc+" cname:"+T.localCName+`\r `),ue},T.getDirection=function(R,N){for(var z=T.splitLines(R),U=0;U=26&&Z<=H?!0:k.extension.isInstalled()}else return!0};var Ft={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return document.querySelector("#janus-extension-installed")!==null},getScreen:function(H){var w=window.setTimeout(function(){var T=new Error("NavigatorUserMediaError");return T.name='The required Chrome extension is not installed: click here to install it. (NOTE: this will need you to refresh the page)',H(T)},1e3);this.cache[w]=H,window.postMessage({type:"janusGetScreen",id:w},"*")},init:function(){var H={};this.cache=H,window.addEventListener("message",function(w){if(w.origin==window.location.origin)if(w.data.type=="janusGotScreen"&&H[w.data.id]){var T=H[w.data.id];if(delete H[w.data.id],w.data.sourceId===""){var R=new Error("NavigatorUserMediaError");R.name="You cancelled the request for permission, giving up...",T(R)}else T(null,w.data.sourceId)}else w.data.type=="janusGetScreenPending"&&(console.log("clearing ",w.data.id),window.clearTimeout(w.data.id))})}};k.useDefaultDependencies=function(Z){var H=Z&&Z.fetch||fetch,w=Z&&Z.Promise||Promise,T=Z&&Z.WebSocket||WebSocket;return{newWebSocket:function(N,z){return new T(N,z)},extension:Z&&Z.extension||Ft,isArray:function(N){return Array.isArray(N)},webRTCAdapter:Z&&Z.adapter||window.adapter,httpAPICall:function(N,z){var U={method:z.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};z.verb==="POST"&&(U.headers["Content-Type"]="application/json"),z.withCredentials!==void 0&&(U.credentials=z.withCredentials===!0?"include":z.withCredentials?z.withCredentials:"omit"),z.body!==void 0&&(U.body=JSON.stringify(z.body));var ue=H(N,U).catch(function(de){return w.reject({message:"Probably a network error, is the server down?",error:de})});if(z.timeout!==void 0){var pe=new w(function(de,se){var re=setTimeout(function(){return clearTimeout(re),se({message:"Request timed out",timeout:z.timeout})},z.timeout)});ue=w.race([ue,pe])}return ue.then(function(de){if(de.ok){if(t(z.success)===t(k.noop))return de.json().then(function(se){z.success(se)}).catch(function(se){return w.reject({message:"Failed to parse response body",error:se,response:de})})}else return w.reject({message:"API call failed",response:de})}).catch(function(de){t(z.error)===t(k.noop)&&z.error(de.message||"<< internal error >>",de)}),ue}}},k.useOldDependencies=function(Z){var H=Z&&Z.jQuery||jQuery,w=Z&&Z.WebSocket||WebSocket;return{newWebSocket:function(R,N){return new w(R,N)},isArray:function(R){return H.isArray(R)},extension:Z&&Z.extension||Ft,webRTCAdapter:Z&&Z.adapter||adapter,httpAPICall:function(R,N){var z=N.body!==void 0?{contentType:"application/json",data:JSON.stringify(N.body)}:{},U=N.withCredentials!==void 0?{xhrFields:{withCredentials:N.withCredentials}}:{};return H.ajax(H.extend(z,U,{url:R,type:N.verb,cache:!1,dataType:"json",async:N.async,timeout:N.timeout,success:function(pe){t(N.success)===t(k.noop)&&N.success(pe)},error:function(pe,de,se){t(N.error)===t(k.noop)&&N.error(de,se)}}))}}},k.noop=function(){},k.dataChanDefaultLabel="JanusDataChannel",k.endOfCandidates=null,k.init=function(Z){if(Z=Z||{},Z.callback=typeof Z.callback=="function"?Z.callback:k.noop,k.initDone===!0)Z.callback();else{if((typeof console=="undefined"||typeof console.log=="undefined")&&(console={log:function(){}}),k.trace=k.noop,k.debug=k.noop,k.vdebug=k.noop,k.log=k.noop,k.warn=k.noop,k.error=k.noop,Z.debug===!0||Z.debug==="all")k.trace=console.trace.bind(console),k.debug=console.debug.bind(console),k.vdebug=console.debug.bind(console),k.log=console.log.bind(console),k.warn=console.warn.bind(console),k.error=console.error.bind(console);else if(Array.isArray(Z.debug))for(var H in Z.debug){var w=Z.debug[H];switch(w){case"trace":k.trace=console.trace.bind(console);break;case"debug":k.debug=console.debug.bind(console);break;case"vdebug":k.vdebug=console.debug.bind(console);break;case"log":k.log=console.log.bind(console);break;case"warn":k.warn=console.warn.bind(console);break;case"error":k.error=console.error.bind(console);break;default:console.error("Unknown debugging option '"+w+"' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')");break}}k.log("Initializing library");var T=Z.dependencies||k.useDefaultDependencies();k.isArray=T.isArray,k.webRTCAdapter=T.webRTCAdapter,k.httpAPICall=T.httpAPICall,k.newWebSocket=T.newWebSocket,k.extension=T.extension,k.extension.init(),k.listDevices=function(de,se){de=typeof de=="function"?de:k.noop,se==null&&(se={audio:!0,video:!0}),k.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(se).then(function(re){navigator.mediaDevices.enumerateDevices().then(function(Oe){k.debug(Oe),de(Oe);try{var be=re.getTracks();for(var me in be){var ge=be[me];ge!=null&&ge.stop()}}catch(Ze){}})}).catch(function(re){k.error(re),de([])}):(k.warn("navigator.mediaDevices unavailable"),de([]))},k.attachMediaStream=function(de,se){if(k.webRTCAdapter.browserDetails.browser==="chrome"){var re=k.webRTCAdapter.browserDetails.version;re>=52?de.srcObject=se:k.error("Error attaching stream to element")}else de.srcObject=se},k.reattachMediaStream=function(de,se){if(k.webRTCAdapter.browserDetails.browser==="chrome"){var re=k.webRTCAdapter.browserDetails.version;re>=52?de.srcObject=se.srcObject:typeof de.src!="undefined"?de.src=se.src:k.error("Error reattaching stream to element")}else de.srcObject=se.srcObject};var R=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0,N=R?"pagehide":"beforeunload",z=window["on"+N];if(window.addEventListener(N,function(de){k.log("Closing window");for(var se in k.sessions)k.sessions[se]!==null&&k.sessions[se]!==void 0&&k.sessions[se].destroyOnUnload&&(k.log("Destroying session "+se),k.sessions[se].destroy({asyncRequest:!1,notifyDestroyed:!1}));z&&typeof z=="function"&&z()}),k.safariVp8=!1,k.webRTCAdapter.browserDetails.browser==="safari"&&k.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(var H in RTCRtpSender.getCapabilities("video").codecs){var U=RTCRtpSender.getCapabilities("video").codecs[H];if(U&&U.mimeType&&U.mimeType.toLowerCase()==="video/vp8"){k.safariVp8=!0;break}}k.safariVp8?k.log("This version of Safari supports VP8"):k.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{var ue=new RTCPeerConnection({},{});ue.createOffer({offerToReceiveVideo:!0}).then(function(de){k.safariVp8=de.sdp.indexOf("VP8")!==-1,k.safariVp8?k.log("This version of Safari supports VP8"):k.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),ue.close(),ue=null})}if(k.unifiedPlan=!1,k.webRTCAdapter.browserDetails.browser==="firefox"&&k.webRTCAdapter.browserDetails.version>=59)k.unifiedPlan=!0;else if(k.webRTCAdapter.browserDetails.browser==="chrome"&&k.webRTCAdapter.browserDetails.version<72)k.unifiedPlan=!1;else if(typeof RTCRtpTransceiver!="undefined"&&!("currentDirection"in RTCRtpTransceiver.prototype))k.unifiedPlan=!1;else{var pe=new RTCPeerConnection;try{pe.addTransceiver("audio"),k.unifiedPlan=!0}catch(de){}pe.close()}k.initDone=!0,Z.callback()}},k.isWebrtcSupported=function(){return window.RTCPeerConnection!==void 0&&window.RTCPeerConnection!==null},k.isGetUserMediaAvailable=function(){return navigator.mediaDevices!==void 0&&navigator.mediaDevices!==null&&navigator.mediaDevices.getUserMedia!==void 0&&navigator.mediaDevices.getUserMedia!==null},k.randomString=function(Z){for(var H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",w="",T=0;T3){B=!1,Z.error("Lost connection to the server (is it down?)");return}at()}})}}function St(ye,Ne){if(Ge=0,!H&&te!==void 0&&te!==null&&Ne!==!0&&at(),!H&&k.isArray(ye)){for(var qe=0;qe data channel: "+gr),gr==="open"){if(ct.dataChannel[vn].pending&&ct.dataChannel[vn].pending.length>0){k.log("Sending pending messages on <"+vn+">:",ct.dataChannel[vn].pending.length);for(var ea in ct.dataChannel[vn].pending){var vi=ct.dataChannel[vn].pending[ea];k.log("Sending string on data channel <"+vn+">: "+vi),ct.dataChannel[vn].send(vi)}ct.dataChannel[vn].pending=[]}ve.ondataopen(vn)}},Dt=function(Gt){k.error("Got error on data channel:",Gt)};qe?ct.dataChannel[Ne]=qe:ct.dataChannel[Ne]=ct.pc.createDataChannel(Ne,{ordered:!1}),ct.dataChannel[Ne].onmessage=et,ct.dataChannel[Ne].onopen=gt,ct.dataChannel[Ne].onclose=gt,ct.dataChannel[Ne].onerror=Dt,ct.dataChannel[Ne].pending=[],tt&&ct.dataChannel[Ne].pending.push(tt)}function ti(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:k.noop;var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0){k.warn("Invalid handle"),Ne.error("Invalid handle");return}var tt=qe.webrtcStuff,ve=Ne.text;if(ve==null){k.warn("Invalid text"),Ne.error("Invalid text");return}var ct=Ne.label?Ne.label:k.dataChanDefaultLabel;if(!tt.dataChannel[ct]){ii(ye,ct,!1,ve),Ne.success();return}if(tt.dataChannel[ct].readyState!=="open"){tt.dataChannel[ct].pending.push(ve),Ne.success();return}k.log("Sending string on data channel <"+ct+">: "+ve),tt.dataChannel[ct].send(ve),Ne.success()}function di(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:k.noop;var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0){k.warn("Invalid handle"),Ne.error("Invalid handle");return}var tt=qe.webrtcStuff;if(tt.dtmfSender===null||tt.dtmfSender===void 0){if(tt.pc!==void 0&&tt.pc!==null){var ve=tt.pc.getSenders(),ct=ve.find(function(Gt){return Gt.track&&Gt.track.kind==="audio"});if(!ct){k.warn("Invalid DTMF configuration (no audio track)"),Ne.error("Invalid DTMF configuration (no audio track)");return}tt.dtmfSender=ct.dtmf,tt.dtmfSender&&(k.log("Created DTMF Sender"),tt.dtmfSender.ontonechange=function(Gt){k.debug("Sent DTMF tone: "+Gt.tone)})}if(tt.dtmfSender===null||tt.dtmfSender===void 0){k.warn("Invalid DTMF configuration"),Ne.error("Invalid DTMF configuration");return}}var et=Ne.dtmf;if(et==null){k.warn("Invalid DTMF parameters"),Ne.error("Invalid DTMF parameters");return}var gt=et.tones;if(gt==null){k.warn("Invalid DTMF string"),Ne.error("Invalid DTMF string");return}var Dt=et.duration;Dt==null&&(Dt=500);var fn=et.gap;fn==null&&(fn=50),k.debug("Sending DTMF string "+gt+" (duration "+Dt+"ms, gap "+fn+"ms)"),tt.dtmfSender.insertDTMF(gt,Dt,fn),Ne.success()}function tr(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:k.noop;var qe=!0;Ne.asyncRequest!==void 0&&Ne.asyncRequest!==null&&(qe=Ne.asyncRequest===!0);var tt=!0;Ne.noRequest!==void 0&&Ne.noRequest!==null&&(tt=Ne.noRequest===!0),k.log("Destroying handle "+ye+" (async="+qe+")"),zr(ye);var ve=oe[ye];if(ve==null||ve.detached){delete oe[ye],Ne.success();return}if(tt){delete oe[ye],Ne.success();return}if(!B){k.warn("Is the server down? (connected=false)"),Ne.error("Is the server down? (connected=false)");return}var ct={rtcgw:"detach",transaction:k.randomString(12)};if(ve.token!==null&&ve.token!==void 0&&(ct.token=ve.token),me!=null&&(ct.apisecret=me),H){ct.session_id=te,ct.handle_id=ye,w.send(JSON.stringify(ct)),delete oe[ye],Ne.success();return}k.httpAPICall(U+"/"+te+"/"+ye,{verb:"POST",async:qe,withCredentials:re,body:ct,success:function(gt){k.log("Destroyed handle:"),k.debug(gt),gt.rtcgw!=="success"&&k.error("Ooops: "+gt.error.code+" "+gt.error.reason),delete oe[ye],Ne.success()},error:function(gt,Dt){k.error(gt+":",Dt),delete oe[ye],Ne.success()}})}function Ve(ye,Ne,qe,tt,ve){var ct=oe[ye];if(ct==null||ct.webrtcStuff===null||ct.webrtcStuff===void 0){k.warn("Invalid handle"),tt.error("Invalid handle");return}var et=ct.webrtcStuff;k.debug("streamsDone:",ve),ve&&(k.debug(" -- Audio tracks:",ve.getAudioTracks()),k.debug(" -- Video tracks:",ve.getVideoTracks()));var gt=!1;if(!et.myStream||!qe.update||et.streamExternal)et.myStream=ve,gt=!0;else{if((!qe.update&&ir(qe)||qe.update&&(qe.addAudio||qe.replaceAudio))&&ve.getAudioTracks()&&ve.getAudioTracks().length)if(et.myStream.addTrack(ve.getAudioTracks()[0]),k.unifiedPlan){k.log((qe.replaceAudio?"Replacing":"Adding")+" audio track:",ve.getAudioTracks()[0]);var Dt=null,fn=et.pc.getTransceivers();if(fn&&fn.length>0)for(var Gt in fn){var vn=fn[Gt];if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="audio"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="audio"){Dt=vn;break}}Dt&&Dt.sender?Dt.sender.replaceTrack(ve.getAudioTracks()[0]):et.pc.addTrack(ve.getAudioTracks()[0],ve)}else k.log((qe.replaceAudio?"Replacing":"Adding")+" audio track:",ve.getAudioTracks()[0]),et.pc.addTrack(ve.getAudioTracks()[0],ve);if((!qe.update&&Ui(qe)||qe.update&&(qe.addVideo||qe.replaceVideo))&&ve.getVideoTracks()&&ve.getVideoTracks().length)if(et.myStream.addTrack(ve.getVideoTracks()[0]),k.unifiedPlan){k.log((qe.replaceVideo?"Replacing":"Adding")+" video track:",ve.getVideoTracks()[0]);var gr=null,fn=et.pc.getTransceivers();if(fn&&fn.length>0)for(var Gt in fn){var vn=fn[Gt];if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="video"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="video"){gr=vn;break}}gr&&gr.sender?gr.sender.replaceTrack(ve.getVideoTracks()[0]):et.pc.addTrack(ve.getVideoTracks()[0],ve)}else k.log((qe.replaceVideo?"Replacing":"Adding")+" video track:",ve.getVideoTracks()[0]),et.pc.addTrack(ve.getVideoTracks()[0],ve)}if(!et.pc){var ea={iceServers:ue,iceTransportPolicy:pe,bundlePolicy:de};k.webRTCAdapter.browserDetails.browser==="chrome"&&(ea.sdpSemantics=k.webRTCAdapter.browserDetails.version<72?"plan-b":"unified-plan");var vi={optional:[{DtlsSrtpKeyAgreement:!0}]};if(se===!0&&vi.optional.push({googIPv6:!0}),tt.rtcConstraints&&t(tt.rtcConstraints)==="object"){k.debug("Adding custom PeerConnection constraints:",tt.rtcConstraints);for(var Gt in tt.rtcConstraints)vi.optional.push(tt.rtcConstraints[Gt])}k.webRTCAdapter.browserDetails.browser==="edge"&&(ea.bundlePolicy="max-bundle"),k.log("Creating PeerConnection"),k.debug(vi),et.pc=new RTCPeerConnection(ea,vi),k.debug(et.pc),et.pc.getStats&&(et.volume={},et.bitrate.value="0 kbits/sec"),k.log("Preparing local SDP and gathering candidates (trickle="+et.trickle+")"),et.pc.oniceconnectionstatechange=function(Ii){et.pc&&ct.iceState(et.pc.iceConnectionState)},et.pc.onicecandidate=function(Ii){if(Ii.candidate==null||k.webRTCAdapter.browserDetails.browser==="edge"&&Ii.candidate.candidate.indexOf("endOfCandidates")>0)k.log("End of candidates."),et.iceDone=!0,et.trickle===!0?Vn(ye,{completed:!0}):pi(ye,tt);else{var yr={candidate:Ii.candidate.candidate,sdpMid:Ii.candidate.sdpMid,sdpMLineIndex:Ii.candidate.sdpMLineIndex};et.trickle===!0&&Vn(ye,yr)}},et.pc.ontrack=function(Ii){k.log("Handling Remote Track"),k.debug(Ii),Ii.streams&&(et.remoteStream=Ii.streams[0],ct.onremotestream(et.remoteStream),!Ii.track.onended&&(k.log("Adding onended callback to track:",Ii.track),Ii.track.onended=function(yr){k.log("Remote track muted/removed:",yr),et.remoteStream&&(et.remoteStream.removeTrack(yr.target),ct.onremotestream(et.remoteStream))},Ii.track.onmute=Ii.track.onended,Ii.track.onunmute=function(yr){k.log("Remote track flowing again:",yr);try{et.remoteStream.addTrack(yr.target),ct.onremotestream(et.remoteStream)}catch(ps){k.error(ps)}}))}}if(gt&&ve!==null&&ve!==void 0){k.log("Adding local stream");var Kr=tt.simulcast2===!0;ve.getTracks().forEach(function(Ii){if(k.log("Adding local track:",Ii),!Kr)et.pc.addTrack(Ii,ve);else if(Ii.kind==="audio")et.pc.addTrack(Ii,ve);else{k.log("Enabling rid-based simulcasting:",Ii);var yr=fe(tt.simulcastMaxBitrates);et.pc.addTransceiver(Ii,{direction:"sendrecv",streams:[ve],sendEncodings:[{rid:"h",active:!0,maxBitrate:yr.high},{rid:"m",active:!0,maxBitrate:yr.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:yr.low,scaleResolutionDownBy:4}]})}})}wi(qe)&&!et.dataChannel[k.dataChanDefaultLabel]&&(k.log("Creating data channel"),ii(ye,k.dataChanDefaultLabel,!1),et.pc.ondatachannel=function(Ii){k.log("Data channel created by Janus:",Ii),ii(ye,Ii.channel.label,Ii.channel)}),et.myStream&&ct.onlocalstream(et.myStream),Ne==null?Sn(ye,qe,tt):et.pc.setRemoteDescription(Ne).then(function(){if(k.log("Remote description accepted!"),et.remoteSdp=Ne.sdp,et.candidates&&et.candidates.length>0){for(var Ii=0;Ii=26&&uu<=jh?(Kr={video:{mandatory:{googLeakyBucket:!0,maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:ve.screenshareFrameRate,maxFrameRate:ve.screenshareFrameRate,chromeMediaSource:"screen"}},audio:ir(ve)&&!ve.keepAudio},od(Kr,lu)):k.extension.getScreen(function(_a,Zr){if(_a)return ct.consentDialog(!1),qe.error(_a);Kr={audio:!1,video:{mandatory:{chromeMediaSource:"desktop",maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:ve.screenshareFrameRate,maxFrameRate:ve.screenshareFrameRate},optional:[{googLeakyBucket:!0},{googTemporalLayeredScreencast:!0}]}},Kr.video.mandatory.chromeMediaSourceId=Zr,od(Kr,lu,ir(ve)&&!ve.keepAudio)})}else if(k.webRTCAdapter.browserDetails.browser==="firefox")if(k.webRTCAdapter.browserDetails.version>=33)Kr={video:{mozMediaSource:ve.video,mediaSource:ve.video},audio:ir(ve)&&!ve.keepAudio},od(Kr,function(_a,Zr){if(lu(_a,Zr),!_a)var Yo=Zr.currentTime,Ds=window.setInterval(function(){Zr||window.clearInterval(Ds),Zr.currentTime==Yo&&(window.clearInterval(Ds),Zr.onended&&Zr.onended()),Yo=Zr.currentTime},500)});else{var $h=new Error("NavigatorUserMediaError");$h.name="Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)",ct.consentDialog(!1),qe.error($h);return}return}}(ve==null||ve.video!=="screen")&&navigator.mediaDevices.enumerateDevices().then(function(_a){var Zr=_a.some(function(ms){return ms.kind==="audioinput"}),Yo=jn(ve)||_a.some(function(ms){return ms.kind==="videoinput"}),Ds=ir(ve),Gl=Ui(ve),oc=wa(ve),sc=xr(ve);if(Ds||Gl||oc||sc){var qh=Ds?Zr:!1,l1=Gl?Yo:!1;if(!qh&&!l1)return ct.consentDialog(!1),qe.error("No capture device found"),!1;if(!qh&&oc)return ct.consentDialog(!1),qe.error("Audio capture is required, but no capture device found"),!1;if(!l1&&sc)return ct.consentDialog(!1),qe.error("Video capture is required, but no capture device found"),!1}var sd={audio:Zr&&!ve.keepAudio?Ii:!1,video:Yo&&!ve.keepVideo?yr:!1};k.debug("getUserMedia constraints",sd),!sd.audio&&!sd.video?(ct.consentDialog(!1),Ve(ye,tt,ve,qe,vn)):navigator.mediaDevices.getUserMedia(sd).then(function(ms){ct.consentDialog(!1),Ve(ye,tt,ve,qe,ms)}).catch(function(ms){ct.consentDialog(!1),qe.error({code:ms.code,name:ms.name,message:ms.message})})}).catch(function(_a){ct.consentDialog(!1),qe.error("enumerateDevices error",_a)})}else Ve(ye,tt,ve,qe)}function jt(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:fs;var qe=Ne.jsep,tt=oe[ye];if(tt==null||tt.webrtcStuff===null||tt.webrtcStuff===void 0){k.warn("Invalid handle"),Ne.error("Invalid handle");return}var ve=tt.webrtcStuff;if(qe!=null){if(ve.pc===null){k.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),Ne.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");return}ve.pc.setRemoteDescription(qe).then(function(){if(k.log("Remote description accepted!"),ve.remoteSdp=qe.sdp,ve.candidates&&ve.candidates.length>0){for(var ct=0;ct0)for(var Gt in fn){var vn=fn[Gt];if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="audio"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="audio"){gt||(gt=vn);continue}if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="video"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="video"){Dt||(Dt=vn);continue}}var gr=ir(Ne),ea=co(Ne);!gr&&!ea?Ne.removeAudio&>&&(gt.setDirection?gt.setDirection("inactive"):gt.direction="inactive",k.log("Setting audio transceiver to inactive:",gt)):gr&&ea?gt&&(gt.setDirection?gt.setDirection("sendrecv"):gt.direction="sendrecv",k.log("Setting audio transceiver to sendrecv:",gt)):gr&&!ea?gt&&(gt.setDirection?gt.setDirection("sendonly"):gt.direction="sendonly",k.log("Setting audio transceiver to sendonly:",gt)):!gr&&ea&&(gt?(gt.setDirection?gt.setDirection("recvonly"):gt.direction="recvonly",k.log("Setting audio transceiver to recvonly:",gt)):(gt=ve.pc.addTransceiver("audio",{direction:"recvonly"}),k.log("Adding recvonly audio transceiver:",gt)));var vi=Ui(Ne),Kr=_i(Ne);!vi&&!Kr?Ne.removeVideo&&Dt&&(Dt.setDirection?Dt.setDirection("inactive"):Dt.direction="inactive",k.log("Setting video transceiver to inactive:",Dt)):vi&&Kr?Dt&&(Dt.setDirection?Dt.setDirection("sendrecv"):Dt.direction="sendrecv",k.log("Setting video transceiver to sendrecv:",Dt)):vi&&!Kr?Dt&&(Dt.setDirection?Dt.setDirection("sendonly"):Dt.direction="sendonly",k.log("Setting video transceiver to sendonly:",Dt)):!vi&&Kr&&(Dt?(Dt.setDirection?Dt.setDirection("recvonly"):Dt.direction="recvonly",k.log("Setting video transceiver to recvonly:",Dt)):(Dt=ve.pc.addTransceiver("video",{direction:"recvonly"}),k.log("Adding recvonly video transceiver:",Dt)))}else et.offerToReceiveAudio=co(Ne),et.offerToReceiveVideo=_i(Ne);var Ii=qe.iceRestart===!0;Ii&&(et.iceRestart=!0),k.debug(et);var yr=Ui(Ne);if(yr&&ct&&k.webRTCAdapter.browserDetails.browser==="firefox"){k.log("Enabling Simulcasting for Firefox (RID)");var ps=ve.pc.getSenders().find(function(Gr){return Gr.track.kind=="video"});if(ps){var vs=ps.getParameters();vs||(vs={});var zi=fe(qe.simulcastMaxBitrates);vs.encodings=[{rid:"h",active:!0,maxBitrate:zi.high},{rid:"m",active:!0,maxBitrate:zi.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:zi.low,scaleResolutionDownBy:4}],ps.setParameters(vs)}}ve.pc.createOffer(et).then(function(Gr){k.debug(Gr);var lu={type:Gr.type,sdp:Gr.sdp};if(qe.customizeSdp(lu),Gr.sdp=lu.sdp,k.log("Setting local description"),yr&&ct&&(k.webRTCAdapter.browserDetails.browser==="chrome"||k.webRTCAdapter.browserDetails.browser==="safari"?(k.log("Enabling Simulcasting for Chrome (SDP munging)"),Gr.sdp=Xo(Gr.sdp)):k.webRTCAdapter.browserDetails.browser!=="firefox"&&k.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),ve.mySdp=Gr.sdp,ve.pc.setLocalDescription(Gr).catch(qe.error),ve.mediaConstraints=et,!ve.iceDone&&!ve.trickle){k.log("Waiting for all candidates...");return}k.log("Offer ready"),k.debug(qe),qe.success(Gr)},qe.error)}function Hn(ye,Ne,qe){qe=qe||{},qe.success=typeof qe.success=="function"?qe.success:k.noop,qe.error=typeof qe.error=="function"?qe.error:k.noop,qe.customizeSdp=typeof qe.customizeSdp=="function"?qe.customizeSdp:k.noop;var tt=oe[ye];if(tt==null||tt.webrtcStuff===null||tt.webrtcStuff===void 0){k.warn("Invalid handle"),qe.error("Invalid handle");return}var ve=tt.webrtcStuff,ct=qe.simulcast===!0;ct?k.log("Creating answer (iceDone="+ve.iceDone+", simulcast="+ct+")"):k.log("Creating answer (iceDone="+ve.iceDone+")");var et=null;if(k.unifiedPlan){et={};var gt=null,Dt=null,fn=ve.pc.getTransceivers();if(fn&&fn.length>0)for(var Gt in fn){var vn=fn[Gt];if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="audio"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="audio"){gt||(gt=vn);continue}if(vn.sender&&vn.sender.track&&vn.sender.track.kind==="video"||vn.receiver&&vn.receiver.track&&vn.receiver.track.kind==="video"){Dt||(Dt=vn);continue}}var gr=ir(Ne),ea=co(Ne);if(!gr&&!ea){if(Ne.removeAudio&>)try{gt.setDirection?gt.setDirection("inactive"):gt.direction="inactive",k.log("Setting audio transceiver to inactive:",gt)}catch(zi){k.error(zi)}}else if(gr&&ea){if(gt)try{gt.setDirection?gt.setDirection("sendrecv"):gt.direction="sendrecv",k.log("Setting audio transceiver to sendrecv:",gt)}catch(zi){k.error(zi)}}else if(gr&&!ea)try{gt&&(gt.setDirection?gt.setDirection("sendonly"):gt.direction="sendonly",k.log("Setting audio transceiver to sendonly:",gt))}catch(zi){k.error(zi)}else if(!gr&&ea)if(gt)try{gt.setDirection?gt.setDirection("recvonly"):gt.direction="recvonly",k.log("Setting audio transceiver to recvonly:",gt)}catch(zi){k.error(zi)}else gt=ve.pc.addTransceiver("audio",{direction:"recvonly"}),k.log("Adding recvonly audio transceiver:",gt);var vi=Ui(Ne),Kr=_i(Ne);if(!vi&&!Kr){if(Ne.removeVideo&&Dt)try{Dt.setDirection?Dt.setDirection("inactive"):Dt.direction="inactive",k.log("Setting video transceiver to inactive:",Dt)}catch(zi){k.error(zi)}}else if(vi&&Kr){if(Dt)try{Dt.setDirection?Dt.setDirection("sendrecv"):Dt.direction="sendrecv",k.log("Setting video transceiver to sendrecv:",Dt)}catch(zi){k.error(zi)}}else if(vi&&!Kr){if(Dt)try{Dt.setDirection?Dt.setDirection("sendonly"):Dt.direction="sendonly",k.log("Setting video transceiver to sendonly:",Dt)}catch(zi){k.error(zi)}}else if(!vi&&Kr)if(Dt)try{Dt.setDirection?Dt.setDirection("recvonly"):Dt.direction="recvonly",k.log("Setting video transceiver to recvonly:",Dt)}catch(zi){k.error(zi)}else Dt=ve.pc.addTransceiver("video",{direction:"recvonly"}),k.log("Adding recvonly video transceiver:",Dt)}else k.webRTCAdapter.browserDetails.browser=="firefox"||k.webRTCAdapter.browserDetails.browser=="edge"?et={offerToReceiveAudio:co(Ne),offerToReceiveVideo:_i(Ne)}:et={mandatory:{OfferToReceiveAudio:co(Ne),OfferToReceiveVideo:_i(Ne)}};k.debug(et);var Ii=Ui(Ne);if(Ii&&ct&&k.webRTCAdapter.browserDetails.browser==="firefox"){k.log("Enabling Simulcasting for Firefox (RID)");var yr=ve.pc.getSenders()[1];k.log(yr);var ps=yr.getParameters();k.log(ps);var vs=fe(qe.simulcastMaxBitrates);yr.setParameters({encodings:[{rid:"high",active:!0,priority:"high",maxBitrate:vs.high},{rid:"medium",active:!0,priority:"medium",maxBitrate:vs.medium},{rid:"low",active:!0,priority:"low",maxBitrate:vs.low}]})}ve.pc.createAnswer(et).then(function(zi){k.debug(zi);var Gr={type:zi.type,sdp:zi.sdp};if(qe.customizeSdp(Gr),zi.sdp=Gr.sdp,k.log("Setting local description"),Ii&&ct&&(k.webRTCAdapter.browserDetails.browser==="chrome"?k.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it"):k.webRTCAdapter.browserDetails.browser!=="firefox"&&k.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),ve.mySdp=zi.sdp,ve.pc.setLocalDescription(zi).catch(qe.error),ve.mediaConstraints=et,!ve.iceDone&&!ve.trickle){k.log("Waiting for all candidates...");return}qe.success(zi)},qe.error)}function pi(ye,Ne){Ne=Ne||{},Ne.success=typeof Ne.success=="function"?Ne.success:k.noop,Ne.error=typeof Ne.error=="function"?Ne.error:k.noop;var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0){k.warn("Invalid handle, not sending anything");return}var tt=qe.webrtcStuff;if(k.log("Sending offer/answer SDP..."),tt.mySdp===null||tt.mySdp===void 0){k.warn("Local SDP instance is invalid, not sending anything...");return}tt.mySdp={type:tt.pc.localDescription.type,sdp:tt.pc.localDescription.sdp},tt.trickle===!1&&(tt.mySdp.trickle=!1),k.debug(Ne),tt.sdpSent=!0,Ne.success(tt.mySdp)}function hi(ye,Ne){var qe=oe[ye];if(qe==null||qe.webrtcStuff===null||qe.webrtcStuff===void 0)return k.warn("Invalid handle"),0;var tt=Ne?"remote":"local",ve=qe.webrtcStuff;return ve.volume[tt]||(ve.volume[tt]={value:0}),ve.pc.getStats&&k.webRTCAdapter.browserDetails.browser==="chrome"?Ne&&(ve.remoteStream===null||ve.remoteStream===void 0)?(k.warn("Remote stream unavailable"),0):!Ne&&(ve.myStream===null||ve.myStream===void 0)?(k.warn("Local stream unavailable"),0):ve.volume[tt].timer===null||ve.volume[tt].timer===void 0?(k.log("Starting "+tt+" volume monitor"),ve.volume[tt].timer=setInterval(function(){ve.pc.getStats(function(ct){for(var et=ct.result(),gt=0;gt-1)&&ve.type==="inbound-rtp"&&ve.id.indexOf("rtcp")<0||ve.type=="ssrc"&&ve.bytesReceived&&(ve.googCodecName==="VP8"||ve.googCodecName===""))&&(ct=!0),ct)if(qe.bitrate.bsnow=ve.bytesReceived,qe.bitrate.tsnow=ve.timestamp,qe.bitrate.bsbefore===null||qe.bitrate.tsbefore===null)qe.bitrate.bsbefore=qe.bitrate.bsnow,qe.bitrate.tsbefore=qe.bitrate.tsnow;else{var et=qe.bitrate.tsnow-qe.bitrate.tsbefore;k.webRTCAdapter.browserDetails.browser=="safari"&&(et=et/1e3);var gt=Math.round((qe.bitrate.bsnow-qe.bitrate.bsbefore)*8/et);k.webRTCAdapter.browserDetails.browser==="safari"&&(gt=parseInt(gt/1e3)),qe.bitrate.value=gt+" kbits/sec",qe.bitrate.bsbefore=qe.bitrate.bsnow,qe.bitrate.tsbefore=qe.bitrate.tsnow}}})})},1e3),"0 kbits/sec"):qe.bitrate.value:(k.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser")}function fs(ye){k.error("WebRTC error:",ye)}function zr(ye,Ne){k.log("Cleaning WebRTC stuff");var qe=oe[ye];if(qe!=null){var tt=qe.webrtcStuff;if(tt!=null){if(Ne===!0){var ve={rtcgw:"hangup",transaction:k.randomString(12)};qe.token!==null&&qe.token!==void 0&&(ve.token=qe.token),me!=null&&(ve.apisecret=me),k.debug("Sending hangup request (handle="+ye+"):"),k.debug(ve),H?(ve.session_id=te,ve.handle_id=ye,w.send(JSON.stringify(ve))):k.httpAPICall(U+"/"+te+"/"+ye,{verb:"POST",withCredentials:re,body:ve})}tt.remoteStream=null,tt.volume&&(tt.volume.local&&tt.volume.local.timer&&clearInterval(tt.volume.local.timer),tt.volume.remote&&tt.volume.remote.timer&&clearInterval(tt.volume.remote.timer)),tt.volume={},tt.bitrate.timer&&clearInterval(tt.bitrate.timer),tt.bitrate.timer=null,tt.bitrate.bsnow=null,tt.bitrate.bsbefore=null,tt.bitrate.tsnow=null,tt.bitrate.tsbefore=null,tt.bitrate.value=null;try{if(!tt.streamExternal&&tt.myStream!==null&&tt.myStream!==void 0){k.log("Stopping local stream tracks");var ct=tt.myStream.getTracks();for(var et in ct){var gt=ct[et];k.log(gt),gt!=null&>.stop()}}}catch(Dt){}tt.streamExternal=!1,tt.myStream=null;try{tt.pc.close()}catch(Dt){}tt.pc=null,tt.candidates=null,tt.mySdp=null,tt.remoteSdp=null,tt.iceDone=!1,tt.dataChannel={},tt.dtmfSender=null}qe.oncleanup()}}function Xo(ye){for(var Ne=ye.split(`\r `),qe=!1,tt=[-1],ve=[-1],ct=null,et=null,gt=null,Dt=null,fn=-1,Gt=0;Gt-1){fn=Gt;break}continue}if(qe){var ea=Ne[Gt].match(/a=ssrc-group:FID (\d+) (\d+)/);if(ea){tt[0]=ea[1],ve[0]=ea[2],Ne.splice(Gt,1),Gt--;continue}if(tt[0]){var vi=Ne[Gt].match("a=ssrc:"+tt[0]+" cname:(.+)");if(vi&&(ct=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" msid:(.+)"),vi&&(et=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" mslabel:(.+)"),vi&&(gt=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" label:(.+)"),vi&&(Dt=vi[1]),Ne[Gt].indexOf("a=ssrc:"+ve[0])===0){Ne.splice(Gt,1),Gt--;continue}if(Ne[Gt].indexOf("a=ssrc:"+tt[0])===0){Ne.splice(Gt,1),Gt--;continue}}if(Ne[Gt].length==0){Ne.splice(Gt,1),Gt--;continue}}}if(tt[0]<0){fn=-1,qe=!1;for(var Gt=0;Gt-1){fn=Gt;break}continue}if(qe){if(tt[0]<0){var Kr=Ne[Gt].match(/a=ssrc:(\d+)/);if(Kr){tt[0]=Kr[1],Ne.splice(Gt,1),Gt--;continue}}else{var vi=Ne[Gt].match("a=ssrc:"+tt[0]+" cname:(.+)");if(vi&&(ct=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" msid:(.+)"),vi&&(et=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" mslabel:(.+)"),vi&&(gt=vi[1]),vi=Ne[Gt].match("a=ssrc:"+tt[0]+" label:(.+)"),vi&&(Dt=vi[1]),Ne[Gt].indexOf("a=ssrc:"+ve[0])===0){Ne.splice(Gt,1),Gt--;continue}if(Ne[Gt].indexOf("a=ssrc:"+tt[0])===0){Ne.splice(Gt,1),Gt--;continue}}if(Ne[Gt].length==0){Ne.splice(Gt,1),Gt--;continue}}}}if(tt[0]<0)return k.warn("Couldn't find the video SSRC, simulcasting NOT enabled"),ye;fn<0&&(fn=Ne.length),tt[1]=Math.floor(Math.random()*4294967295),tt[2]=Math.floor(Math.random()*4294967295),ve[1]=Math.floor(Math.random()*4294967295),ve[2]=Math.floor(Math.random()*4294967295);for(var Gt=0;Gt
`,document.getElementById("mobile-ez-ptz-item")||R.appendChild(U),h(R,document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),document.getElementById("mobile-ez-ptz-item").ontouchstart=function(ue){ue.preventDefault(),console.log("触摸开始"),w._handlePtzTouch(ue,"start")},document.getElementById("mobile-ez-ptz-item").ontouchend=function(ue){ue.preventDefault(),console.log("触摸结束",ue),w._handlePtzTouch(ue,"stop")},document.getElementById("mobile-ez-ptz-item").onmousedown=function(ue){ue.preventDefault(),console.log("触摸开始"),w._handlePtzTouch(ue,"start")},document.getElementById("mobile-ez-ptz-item").onmouseup=function(ue){ue.preventDefault(),console.log("触摸结束",ue),w._handlePtzTouch(ue,"stop")}}return a(Z,[{key:"show",value:function(){document.getElementById("mobile-ez-ptz-item").style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("mobile-ez-ptz-item").style="display: none"}},{key:"_handlePtzTouch",value:function(w,T){var R=document.getElementById("mobile-ez-ptz-item").getBoundingClientRect(),N=R.left+130,z=R.top+130,U=w.x||w.changedTouches[0].clientX,ue=w.y||w.changedTouches[0].clientY,pe=U-N,de=ue-z,se=0,re=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";Math.abs(pe)>Math.abs(de)?pe>0?(se=3,document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("default","active")):(se=2,document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("default","active")):de>0?(se=1,document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("default","active")):(se=0,document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("default","active")),document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(se===0?180:se===1?0:se===2?90:270,"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)"),T==="stop"&&(re=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",document.getElementById("mobile-ez-ptz-item").style="",document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("active","default"));var Oe=new FormData;Oe.append("deviceSerial",S(this.jSPlugin.url).deviceSerial),Oe.append("channelNo",S(this.jSPlugin.url).channelNo),Oe.append("speed",1),Oe.append("direction",se),Oe.append("accessToken",this.jSPlugin.accessToken),fetch(re,{method:"POST",body:Oe}).then(function(be){return be.json()}).then(function(be){be.code==200||(be.code==60005||be.code==60002||be.code==60003||be.code==60004)&&(document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(se===0?180:se===1?0:se===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"))}).catch(function(be){console.log("云台调用异常",be)})}}]),Z}(),Bt=0,Ce="成功",We={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]},footer:{color:"#FFFFFF",backgroundColor:"rgb(0 0 0 / 0%)",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-0",iconId:"play",part:"left",defaultActive:1,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-1",iconId:"capturePicture",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-2",iconId:"sound",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-3",iconId:"pantile",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-4",iconId:"recordvideo",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-5",iconId:"talk",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-6",iconId:"hd",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-7",iconId:"webExpend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-8",iconId:"expend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]}},$e={retcode:Bt,msg:Ce,data:We},mt={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},Yt={data:mt},st={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},it={data:st},Vt={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},Zt={data:Vt},nn={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},cn={data:nn},an={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:0},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:0},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:0}]}},Ln={data:an},je={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},Ht={data:je},wn={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},zn={data:wn},Be=[{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcLive",themeIntro:"PC直播全量版",themeName:"PC直播全量版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Zt.data.header,footer:Zt.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"security",themeIntro:"PC直播安防版",themeName:"PC直播安防版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:cn.data.header,footer:cn.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"voice",themeIntro:"PC直播语音版",themeName:"PC直播语音版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Ht.data.header,footer:Ht.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"simple",themeIntro:"PC直播极简版",themeName:"PC直播极简版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"",header:Ln.data.header,footer:Ln.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcRec",themeIntro:"PC回放全量版",themeName:"PC回放全量版",themeType:"webRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:zn.data.header,footer:zn.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileLive",themeIntro:"Mobile直播全量版",themeName:"Mobile直播全量版",themeType:"mobileLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:Yt.data.header,footer:Yt.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileRec",themeIntro:"Mobile回放全量版",themeName:"Mobile回放全量版",themeType:"mobileRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:it.data.header,footer:it.data.footer}],pn=function(){function Z(H){var w=this;i(this,Z),this.jSPlugin=H,this.enableZoom=!1,this.isMouseDown=!1,this.videoWidth=1920,this.videoHeight=1080,this.currentScale=1,this.currentPosition={x:0,y:0,xPercent:.1,yPercent:.1,xCurrentVideo:0,yCurrentVideo:0,left:0,top:0,right:1920,bottom:1080},this.DOM=document.getElementById(H.id),this.clientRect=document.getElementById(H.id).getBoundingClientRect();var T=document.createElement("div");T.id="".concat(H.id,"-zoom-container"),T.style=`position: absolute; display:none; left: 12px; bottom: 80px;`;var R=`
2.0X
放大
缩小
`);T.innerHTML=R,document.getElementById("".concat(H.id,"-audioControls-left")).parentNode.appendChild(T),document.getElementById("".concat(H.id,"-addScale")).onclick=function(){w.addScale()},document.getElementById("".concat(H.id,"-subScale")).onclick=function(){w.subScale()}}return a(Z,[{key:"onMouseDown",value:function(w){this.currentPosition,this.currentScale;var T=this.enableZoom;if(!T)return!1;this.moveX=w.clientX,this.moveY=w.clientY,this.isMouseDown=!0}},{key:"onMouseUp",value:function(w){var T=this.currentPosition,R=this.enableZoom;if(!R)return!1;this.isMouseDown=!1,T.left=T.left-(w.clientX-this.moveX),T.top=T.top-(w.clientY-this.moveY),this.doScale()}},{key:"onMouseOut",value:function(w){var T=this.enableZoom;if(!T)return!1;this.isMouseDown&&(console.log("鼠标按上",w),this.isMouseDown=!1),this.isMouseDown=!1}},{key:"renderDot",value:function(){var w=this.currentScale;document.getElementById("".concat(this.jSPlugin.id,"-scale-value")).innerHTML="".concat(w,".0X"),document.getElementById("".concat(this.jSPlugin.id,"-line-dot")).style.height="".concat((w-1)/7*100,"%"),document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot")).style.bottom="calc(".concat((w-1)/7*100,"% - 6px)")}},{key:"startZoom",value:function(){var w=this,T=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=T.width,this.videoHeight=T.height,this.currentPosition.right=T.width,this.currentPosition.bottom=T.height,this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block",this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),this.renderDot(),this.enableZoom=!0,document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0"))?(document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mousedown",function(R){return w.onMouseDown(R)}),document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mouseup",function(R){return w.onMouseUp(R)}),document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mouseout",function(R){return w.onMouseOut(R)})):document.getElementById("".concat(this.jSPlugin.id,"-player"))&&(document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mousedown",function(R){return w.onMouseDown(R)}),document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mouseup",function(R){return w.onMouseUp(R)}),document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mouseout",function(R){return w.onMouseOut(R)}))}},{key:"stopZoom",value:function(){var w=this;this.currentScale=1,this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none",this.renderDot(),this.enableZoom=!1,document.getElementById(this.jSPlugin.id).removeEventListener("mousedown",function(T){return w.onMouseDown(T)}),document.getElementById(this.jSPlugin.id).removeEventListener("mouseup",function(T){return w.onMouseUp(T)}),document.getElementById(this.jSPlugin.id).removeEventListener("mouseout",function(T){return w.onMouseOut(T)})}},{key:"doScale",value:function(){console.log("执行放大");var w=this.currentPosition,T=this.currentScale;w.left=w.left+w.xPercent*(w.right-w.left)-1/2*(this.videoWidth/T),w.left<0?w.left=0:w.left>this.videoWidth-this.videoWidth/T&&(w.left=this.videoWidth-this.videoWidth/T),w.right=w.left+this.videoWidth/T,w.top=w.top+w.yPercent*(w.bottom-w.top)-1/2*(this.videoHeight/T),w.top<0?w.top=0:w.top>this.videoHeight-this.videoHeight/T&&(w.top=this.videoHeight-this.videoHeight/T),w.bottom=w.top+this.videoHeight/T,w.left=parseInt(w.left,10),w.right=parseInt(w.right,10),w.top=parseInt(w.top,10),w.bottom=parseInt(w.bottom,10),console.log("计算后,",this.jSPlugin.jSPlugin,w.left,w.right,w.top,w.bottom,w.xPercent,w.yPercent),this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(w.left,w.right,w.top,w.bottom),this.renderDot()}},{key:"calCurrentPosition",value:function(w){var T=this.currentPosition,R=this.clientRect;T.x=w.clientX,T.y=w.clientY,T.xPercent=(w.clientX-R.x)/R.width,T.yPercent=(w.clientY-R.y)/R.height,this.doScale()}},{key:"addScale",value:function(){var w=this.currentScale,T=this.currentPosition;if(w>=8)return console.log("达到最大倍率了"),this.jSPlugin.Message&&this.jSPlugin.Message.default("已经放大到最大倍数8.0X"),!1;this.currentScale++,T.xPercent=.5,T.yPercent=.5,this.doScale()}},{key:"subScale",value:function(){var w=this.currentScale,T=this.currentPosition;if(w<=1)return console.log("达到最小倍率了"),!1;this.currentScale--,T.xPercent=.5,T.yPercent=.5,this.doScale()}}]),Z}();function dn(Z,H){return Math.abs(H.clientX-Z.clientX)*Math.abs(H.clientX-Z.clientX)+Math.abs(H.clientY-Z.clientY)*Math.abs(H.clientY-Z.clientY)}var Un=function(){function Z(H){var w=this;i(this,Z),this.jSPlugin=H,this.enableZoom=!1,this.isDubboTouch=!1,this.videoWidth=0,this.videoHeight=0,this.currentScale=1,this.currentPosition={x:0,y:0,xPercent:.1,yPercent:.1,xCurrentVideo:0,yCurrentVideo:0,left:0,top:0,right:1920,bottom:1080},this.DOM=document.getElementById(H.id),this.clientRect=document.getElementById(H.id).getBoundingClientRect(),this.point1={clientX:0,clientY:0},this.point2={clientX:0,clientY:0},this.touchLineLength=0,this.inited=!1;var T=document.createElement("div");T.id="".concat(H.id,"-zoom-container"),T.style=`display:none; position: absolute; left: 10px; top: -30px; border: 1px solid rgba(0,0,0,0.6); color: #FFFFFF; background: rgba(0,0,0,0.6); border-radius: 10px; width: 36px; font-size: 12px; text-align: center; height: 22px; line-height: 22px;`;var R="1X";T.innerHTML=R,document.getElementById("".concat(H.id,"-audioControls-left")).parentNode.appendChild(T),document.getElementById(this.jSPlugin.id).addEventListener("touchstart",function(N){return w.onTouchstart(N)}),document.getElementById(this.jSPlugin.id).addEventListener("touchmove",function(N){return w.onTouchmove(N)})}return a(Z,[{key:"onTouchstart",value:function(w){var T=this.jSPlugin.beforeMobileZoomVerify();if(!T)return!1;if(!this.inited){var R=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=R.width,this.videoHeight=R.height,this.currentPosition.right=R.width,this.currentPosition.bottom=R.height,this.inited=!0}var N=this.currentPosition;this.currentScale,console.log("双指按下",N);var z=w.touches,U=z[0],ue=z[1];U&&(this.point1.clientX=U.clientX,this.point1.clientY=U.clientY),ue&&(this.point2.clientX=ue.clientX,this.point2.clientY=ue.clientY,this.touchLineLength=dn(this.point1,this.point2),this.isDubboTouch=!0,this.moveX=U.clientX,this.moveY=U.clientY),console.log("双指按下2",N)}},{key:"onTouchmove",value:function(w){var T=this.isDubboTouch,R=this.currentPosition,N=this.clientRect,z=this.jSPlugin.beforeMobileZoomVerify();if(!z)return!1;if(w.touches.length===1){var ue=w.touches[0];return R.xPercent=R.xPercent+(this.point1.clientX-ue.clientX)/N.width/this.currentScale,R.yPercent=R.yPercent+(this.point1.clientY-ue.clientY)/N.height/this.currentScale,this.doScale(),this.point1.clientX=ue.clientX,this.point1.clientY=ue.clientY,!1}if(!T)return!1;var U=w.touches,ue=U[0],pe=U[1];if(ue&&(this.point1.clientX=ue.clientX,this.point1.clientY=ue.clientY),pe){this.point2.clientX=pe.clientX,this.point2.clientY=pe.clientY;var de=dn(this.point1,this.point2);de!==this.touchLineLength&&(de>this.touchLineLength?this.currentScale<8?(++this.currentScale,R.xPercent=(this.point1.clientX+this.point2.clientX)/2/N.width,R.yPercent=(this.point1.clientY+this.point2.clientY)/2/N.height,this.doScale()):console.log("已经是最大8倍率了"):this.currentScale>1?(--this.currentScale,R.xPercent=(this.point1.clientX+this.point2.clientX)/2/N.width,R.yPercent=(this.point1.clientY+this.point2.clientY)/2/N.height,this.doScale()):console.log("已经是最小1倍率了"),this.isDubboTouch=!1)}}},{key:"startZoom",value:function(){var w=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=w.width,this.videoHeight=w.height,this.currentPosition.right=w.width,this.currentPosition.bottom=w.height,this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block",this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),this.renderDot()}},{key:"stopZoom",value:function(){this.currentScale=1,this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none",this.renderDot()}},{key:"resetZoom",value:function(){this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none"}},{key:"doScale",value:function(){var w=this.currentPosition,T=this.currentScale;w.left=w.left+w.xPercent*(w.right-w.left)-1/2*(this.videoWidth/T),w.left<0?w.left=0:w.left>this.videoWidth-this.videoWidth/T&&(w.left=this.videoWidth-this.videoWidth/T),w.right=w.left+this.videoWidth/T,w.top=w.top+w.yPercent*(w.bottom-w.top)-1/2*(this.videoHeight/T),w.top<0?w.top=0:w.top>this.videoHeight-this.videoHeight/T&&(w.top=this.videoHeight-this.videoHeight/T),w.bottom=w.top+this.videoHeight/T,w.left=parseInt(w.left,10),w.right=parseInt(w.right,10),w.top=parseInt(w.top,10),w.bottom=parseInt(w.bottom,10),console.log("视频宽高",this.videoWidth,this.videoHeight),console.log("计算后,",w.left,w.right,w.top,w.bottom,w.xPercent,w.yPercent),w.left0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",function(){w.stopAutoFocus()})),this.setDecoderState({cloudRec:S(this.jSPlugin.url).type==="cloud.rec",rec:S(this.jSPlugin.url).type==="rec",type:S(this.jSPlugin.url).type});else if(!this.themeInited)var z=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(z),w.jSPlugin.play(),w.themeInited=!0)},50);var U=E.findIndex(this.themeData.footer.btnList,function(pe){return pe.iconId==="zoom"&&pe.isrender>0})>=0;U&&(this.isMobile?(this.jSPlugin.beforeMobileZoomVerify=function(){var pe=w.decoderState.state.play;return console.log("手机端电子放大前校验回调play------------",pe),!!pe},this.jSPlugin.Zoom=new Un(this.jSPlugin)):this.jSPlugin.Zoom=new pn(this.jSPlugin));var ue=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(ue),w.jSPlugin.reSize(w.jSPlugin.params.width,w.jSPlugin.params.height))},50)}},{key:"setDecoderState",value:function(w){var T=this,R=this.themeData,N=R.header,z=R.footer;Object.keys(w).map(function(U,ue){var pe="#FFFFFF",de="#FFFFFF",se=N.btnList.findIndex(function(re){return re.iconId===U});switch(se===-1?(pe=z.color.replace("-diy",""),de=z.activeColor.replace("-diy","")):(pe=N.color.replace("-diy",""),de=z.activeColor.replace("-diy","")),U){case"play":w[U]?document.getElementById("".concat(T.jSPlugin.id,"-play"))&&(document.getElementById("".concat(T.jSPlugin.id,"-play-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-play-content")).children[0].children[1].style="display:none",document.getElementById("".concat(T.jSPlugin.id,"-play")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-play-content")).childNodes[0].children[0].style.fill=w[U]?de:pe):document.getElementById("".concat(T.jSPlugin.id,"-play"))&&(document.getElementById("".concat(T.jSPlugin.id,"-play-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-play-content")).children[0].children[0].style="display:none",document.getElementById("".concat(T.jSPlugin.id,"-play")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-play-content")).childNodes[0].children[1].style.fill=w[U]?de:pe);break;case"sound":document.getElementById("".concat(T.jSPlugin.id,"-sound"))&&(w[U]?(document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none",document.getElementById("".concat(T.jSPlugin.id,"-sound")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=w[U]?de:pe):(document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none",document.getElementById("".concat(T.jSPlugin.id,"-sound")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-sound-content")).childNodes[0].children[0].style.fill=w[U]?de:pe));break;case"recordvideo":document.getElementById("".concat(T.jSPlugin.id,"-recordvideo"))&&(document.getElementById("".concat(T.jSPlugin.id,"-recordvideo")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-recordvideo-content")).childNodes[0].style.fill=w[U]?de:pe,w[U]?T.countTime("add",0):T.countTime("destroy",0));break;case"talk":document.getElementById("".concat(T.jSPlugin.id,"-talk"))&&(document.getElementById("".concat(T.jSPlugin.id,"-talk")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=w[U]?de:pe);break;case"zoom":document.getElementById("".concat(T.jSPlugin.id,"-zoom"))&&(document.getElementById("".concat(T.jSPlugin.id,"-zoom")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-zoom-content")).childNodes[1].style.fill=w[U]?de:pe);break;case"pantile":document.getElementById("".concat(T.jSPlugin.id,"-pantile"))&&(document.getElementById("".concat(T.jSPlugin.id,"-pantile")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-pantile-content")).childNodes[0].style.fill=w[U]?de:pe);break;case"webExpend":w[U]?(document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend")).className="disabled")):(document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend")).className="")),document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[0].style.fill=w[U]?de:pe,document.getElementById("".concat(T.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[1].style.fill=w[U]?de:pe);break;case"capturePicture":document.getElementById("".concat(T.jSPlugin.id,"-capturePicture"))&&(document.getElementById("".concat(T.jSPlugin.id,"-capturePicture")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-capturePicture-content")).childNodes[0].style.fill=w[U]?de:pe);break;case"expend":w[U]?(document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend")).className="disabled")):(document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(T.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-webExpend")).className="")),document.getElementById("".concat(T.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(T.jSPlugin.id,"-expend")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[0].style.fill=w[U]?de:pe,document.getElementById("".concat(T.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[1].style.fill=w[U]?de:pe);break;case"hd":w[U]?document.getElementById("".concat(T.jSPlugin.id,"-hd"))&&(document.getElementById("".concat(T.jSPlugin.id,"-hd-content")).children[1].children[0].style="display:block",document.getElementById("".concat(T.jSPlugin.id,"-hd-content")).children[1].children[1].style="display:none"):document.getElementById("".concat(T.jSPlugin.id,"-hd"))&&(document.getElementById("".concat(T.jSPlugin.id,"-hd-content")).children[1].children[1].style="display:block",document.getElementById("".concat(T.jSPlugin.id,"-hd-content")).children[1].children[0].style="display:none");break;case"speed":document.getElementById("".concat(T.jSPlugin.id,"-speed"))&&(document.getElementById("".concat(T.jSPlugin.id,"-speed-content")).children[1].children[0].style.color=w[U]?de:pe,document.getElementById("".concat(T.jSPlugin.id,"-speed-content")).children[1].children[0].style.borderColor=w[U]?de:pe),document.getElementById("".concat(T.jSPlugin.id,"-select-mask"))&&(T.isMobile&&w[U]?document.getElementById("".concat(T.jSPlugin.id,"-select-mask")).style.display="block":document.getElementById("".concat(T.jSPlugin.id,"-select-mask")).style.display="none");break;case"cloudRec":document.getElementById("".concat(T.jSPlugin.id,"-cloudRec"))&&(console.log("document.getElementById(`${this.jSPlugin.id}-cloudRec-content`)",document.getElementById("".concat(T.jSPlugin.id,"-cloudRec"))),document.getElementById("".concat(T.jSPlugin.id,"-cloudRec")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=w[U]?de:pe),document.getElementById("".concat(T.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(T.jSPlugin.id,"-rec")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=w[U]?pe:de);break;case"rec":document.getElementById("".concat(T.jSPlugin.id,"-cloudRec"))&&(document.getElementById("".concat(T.jSPlugin.id,"-cloudRec")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=w[U]?pe:de),document.getElementById("".concat(T.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(T.jSPlugin.id,"-rec")).className=w[U]?"active":"",document.getElementById("".concat(T.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=w[U]?de:pe);break}T.decoderState.state=Object.assign(T.decoderState.state,w)})}},{key:"startAutoFocus",value:function(){var w=this,T=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout(function(){document.getElementById("".concat(w.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(w.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(w.jSPlugin.id,"-audioControls")).style.pointerEvents="none")},T*1e3)}},{key:"stopAutoFocus",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.opacity=1,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.startAutoFocus()}},{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"renderFooter",value:function(w,T){var R=this,N=this.matchBtn(w);if(this.isMobile&&N.id==="zoom")return!1;var z=document.createElement("div");z.className="theme-icon-item",z.innerHTML="".concat('')+'
')).concat(N.domString,"
")+"
",z.onclick=function(de){if(R.decoderState.state.isEditing)return!1;N.onclick(de)},N.onmouseenter&&(z.onmouseenter=function(de){if(R.decoderState.state.isEditing)return!1;N.onmouseenter(de)}),N.onmouseleave&&(z.onmouseleave=function(de){if(R.decoderState.state.isEditing)return!1;N.onmouseleave(de)});var U=document.createElement("span");U.className="icon-move left",U.innerHTML=''),U.onclick=function(){R.editIcon(N.id,"left","footer")},z.appendChild(U);var ue=document.createElement("span");ue.className="icon-move right",ue.innerHTML=''),ue.onclick=function(){R.editIcon(N.id,"right","footer")},z.appendChild(ue);var pe=document.createElement("span");pe.className="icon-move close",pe.innerHTML='')+'',pe.onclick=function(){R.editIcon(N.id,"delete","footer")},z.appendChild(pe),T==="left"?document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[0].appendChild(z):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[1].appendChild(z)}},{key:"editIcon",value:function(w,T,R){console.log("编辑组件",w,T,R);var N=this.themeData;console.log("themeData",this.themeData);var z=this.themeData[R].btnList,U=E.findIndex(z,function(Oe){return Oe.iconId===w}),ue=z[U];switch(T){case"delete":if(w==="rec"){if(E.findIndex(z,function(Oe){return Oe.iconId==="cloudRec"&&Oe.isrender==1})===-1)return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1}else if(w==="cloudRec"&&E.findIndex(z,function(Oe){return Oe.iconId==="rec"&&Oe.isrender==1})===-1)return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1;z[U].isrender=0;break;case"right":for(var pe=-1,de=U+1;de=0;re--)if(z[re].part===z[U].part&&z[re].isrender==1){se=re;break}se!==-1&&(z[U]=z[se],z[se]=ue);break}console.log("new btnList",z),N[R].btnList=z,this.changeTheme(N)}},{key:"renderHeader",value:function(w,T){var R=this,N=this.matchBtn(w),z=document.createElement("div");z.className="theme-icon-item",z.style="max-width:50%;",z.innerHTML="".concat('')+'')).concat(N.domString,"")+'',z.onclick=function(ue){if(R.decoderState.state.isEditing)return!1;N.onclick(ue)};var U=document.createElement("span");U.className="icon-move close",U.innerHTML='')+'',U.onclick=function(){R.editIcon(N.id,"delete","header")},z.appendChild(U),T==="left"?document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(z):document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[1].appendChild(z)}},{key:"countTime",value:function(w){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,R=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var N=document.createElement("div");N.id=this.jSPlugin.id+"time-area",N.className="time-area",N.innerHTML='00:00',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(N)}if(this.countTimer&&clearInterval(this.countTimer),w==="add"){var z=T;document.getElementById(R.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval(function(){++z,document.getElementById(R.jSPlugin.id+"time-area").children[1].innerHTML=U(z)},1e3)}else w==="destroy"&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(R.jSPlugin.id+"time-area")&&(document.getElementById(R.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(R.jSPlugin.id+"time-area").style.display="none"));function U(ue){var pe=parseInt(ue),de=0,se=0,re="00",Oe="00",be="00";return pe>59&&(de=parseInt(pe/60),pe=parseInt(pe%60),de>59&&(se=parseInt(de/60),de=parseInt(de%60))),re=parseInt(pe)>9?parseInt(pe):"0"+parseInt(pe),Oe=parseInt(de)>9?parseInt(de):"0"+parseInt(de),be=parseInt(se)>9?parseInt(se):"0"+parseInt(se),se>0?be+":"+Oe+":"+re:de>0?Oe+":"+re:"00:"+re}}},{key:"setDisabled",value:function(w){var T=this.decoderState.state,R=T.sound,N=T.hd;document.getElementById(R?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon"))!=null&&document.getElementById(R?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById(N?"".concat(this.jSPlugin.id,"-hdSelect-icon"):"".concat(this.jSPlugin.id,"-sdSelect-icon"))!=null&&document.getElementById(N?"".concat(this.jSPlugin.id,"-hdSelect-icon"):"".concat(this.jSPlugin.id,"-sdSelect-icon")).setAttribute("style",w?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).setAttribute("style",document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).getAttribute("style")+";"+(w?"cursor: not-allowed;color: gray;border-color: gray;":"cursor: default;color: #ffffff;border-color: #ffffff;"))}},{key:"matchBtn",value:function(w){var T=this,R=this.themeData,N=R.header,z=R.footer,U={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}},ue=N.btnList.findIndex(function(pe){return pe.iconId===w});switch(ue===-1?(U.color=z.color,U.backgroundColor=z.backgroundColor,U.activeColor=z.activeColor):(U.color=N.color,U.backgroundColor=N.backgroundColor,U.activeColor=N.activeColor),w){case"play":return U.title="播放/结束播放",U.id=w,U.domString='
'+'`)+'')+'
',U.onclick=function(){var pe=T.decoderState.state,de=pe.play,se=pe.isEditing,re=pe.rec,Oe=pe.cloudRec,be=pe.recordvideo;if(se)return!1;de?(re||Oe?T.jSPlugin.pause():T.jSPlugin.stop(),be&&T.setDecoderState({recordvideo:!1}),T.jSPlugin.Zoom.stopZoom()):(re||Oe?T.jSPlugin.resume():T.jSPlugin.play(),T.resetMobileZoomStatus()),T.setDecoderState({zoom:!1,play:!de}),T.setDisabled(de)},U;case"sound":return U.title="声音",U.id=w,U.domString=''+'`)+' `)+"",U.onclick=function(){var pe=T.decoderState.state,de=pe.play,se=pe.sound,re=pe.talk;de&&(se?(T.jSPlugin.closeSound(),T.setDecoderState({sound:!1})):re||(T.jSPlugin.openSound(),T.setDecoderState({sound:!0})))},U;case"recordvideo":return U.title="录屏",U.id=w,U.domString='')+'',U.onclick=function(){var pe=T.decoderState.state,de=pe.play,se=pe.recordvideo;de&&(se?(T.jSPlugin.stopSave(),T.setDecoderState({recordvideo:!1})):(T.jSPlugin.startSave("".concat(new Date().getTime())),T.setDecoderState({recordvideo:!0})))},U;case"capturePicture":return U.title="截图",U.id=w,U.domString='')+'',U.onclick=function(){var pe=T.decoderState.state.play;pe?T.jSPlugin.capturePicture("".concat(new Date().getTime())):console.log("视频未播放,无法截图")},U;case"talk":return U.title="对讲",U.id=w,U.domString="
"+'')+'',U.onclick=function(){var pe=T.decoderState.state,de=pe.talk,se=pe.sound,re=pe.play;if(re)if(de){console.log("结束对讲"),T.setDecoderState({talk:!1}),T.jSPlugin.Talk.stopTalk();var Oe=E.findIndex(T.themeData.footer.btnList,function(be){return be.iconId==="sound"&&be.isrender===1&&be.defaultActive===1})>-1;T.themeData&&Oe&&(T.jSPlugin.openSound(),T.setDecoderState({sound:!0}))}else console.log("开始对讲"),T.setDecoderState({talk:!0}),se&&(T.jSPlugin.closeSound(),T.setDecoderState({sound:!1})),T.jSPlugin.Talk.startTalk()},U;case"zoom":return U.title="电子放大",U.id=w,U.domString="
"+' `),U.onclick=function(){var pe=T.decoderState.state,de=pe.zoom,se=pe.play;if(!se)return!1;de?(console.log("结束电子放大"),T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom()):(console.log("开始电子放大"),T.jSPlugin.Zoom.startZoom(),T.setDecoderState({zoom:!0}))},U;case"pantile":return U.title="云台控制",U.id=w,U.domString='')+'',U.onclick=function(){var pe=T.decoderState.state,de=pe.play,se=pe.pantile,re=pe.expend;if(de)if(se)console.log("隐藏云台"),T.Ptz.hide(),T.setDecoderState({pantile:!1});else{if(console.log("显示云台"),T.isMobile&&!re)return console.log("移动端,非全屏状态不展示云台"),!1;T.Ptz.show(),T.setDecoderState({pantile:!0})}},U;case"expend":return U.title="全局全屏",U.id=w,U.domString='')+''+' `),U.onclick=function(){var pe=T.decoderState.state,de=pe.webExpend,se=pe.expend;pe.play;var re=pe.pantile;if(de)return console.log("正在网站全屏"),!1;if(se)if(T.isMobile){var Oe=parseInt(getComputedStyle(document.getElementById("".concat(T.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(T.jSPlugin.id)).height,10);document.getElementById("".concat(T.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(T.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-32px"),document.getElementById("".concat(T.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(T.jSPlugin.id,"-headControl")).style.position="relative"),v(document.getElementById("".concat(T.jSPlugin.id,"-wrap")),T.jSPlugin.width,T.jSPlugin.height+Oe),T.jSPlugin.jSPlugin.JS_Resize(T.jSPlugin.width,T.jSPlugin.height),re&&(T.Ptz.hide(),T.setDecoderState({pantile:!1}))}else{console.log("取消全局全屏");var Ze=_();Ze.then(function(fe){console.log("取消全屏",fe,T.jSPlugin),T.jSPlugin.jSPlugin.JS_Resize(T.jSPlugin.width,T.jSPlugin.height)})}else if(console.log("执行全局全屏"),T.isMobile){var Oe=parseInt(getComputedStyle(document.getElementById("".concat(T.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(T.jSPlugin.id)).height,10);p(document.getElementById("".concat(T.jSPlugin.id,"-wrap"))),setTimeout(function(){var fe=document.documentElement.clientWidth,B=document.documentElement.clientHeight;document.getElementById("".concat(T.jSPlugin.id)).style["backface-visibility"]="hidden",T.jSPlugin.jSPlugin.JS_Resize(B,fe-Oe)},100)}else{var be=window.screen.width,me=window.screen.height,ge=m(document.getElementById("".concat(T.jSPlugin.id)));ge.then(function(fe){T.jSPlugin.jSPlugin.JS_Resize(be,me)}).catch(function(fe){console.log(fe)})}T.setDecoderState({expend:!se})},U;case"webExpend":return U.title="网页全屏",U.id=w,U.domString='')+''+'",U.onclick=function(){var pe=T.decoderState.state,de=pe.webExpend,se=pe.expend;if(pe.play,se)return console.log("正在全局全屏"),!1;if(T.jSPlugin.recTimer&&clearInterval(T.jSPlugin.recTimer),de){console.log("取消网页全屏");var fe=_();fe.then(function(B){T.jSPlugin.jSPlugin.JS_Resize(T.jSPlugin.width,T.jSPlugin.height),T.jSPlugin.Theme.Rec&&T.jSPlugin.Theme.Rec.recAutoSize()})}else{console.log("执行网页全屏");var re=0,Oe=0,be=T;["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(B){window.addEventListener(B,function(oe){var Ie=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;return Ie?document.getElementById("".concat(be.jSPlugin.id,"-loading-item-0"))&&(document.getElementById("".concat(be.jSPlugin.id,"-loading-item-0")).style.height=window.screen.height-parseInt(window.getComputedStyle(document.getElementById("".concat(be.jSPlugin.id,"-headControl"))).height,10)+"px"):document.getElementById("".concat(be.jSPlugin.id,"-loading-item-0"))&&(document.getElementById("".concat(be.jSPlugin.id,"-loading-item-0")).style.height=be.jSPlugin.height+parseInt(window.getComputedStyle(document.getElementById("".concat(be.jSPlugin.id,"-headControl"))).height,10)+"px"),Ie})});var me=window.screen.width,ge=window.screen.height,Ze=m(document.getElementById("".concat(T.jSPlugin.id,"-wrap")));Ze.then(function(B){document.getElementById("".concat(T.jSPlugin.id,"-canvas-container"))&&(re=parseInt(window.getComputedStyle(document.getElementById("".concat(T.jSPlugin.id,"-canvas-container"))).height,10)),document.getElementById("".concat(T.jSPlugin.id,"-headControl"))&&(Oe=parseInt(window.getComputedStyle(document.getElementById("".concat(T.jSPlugin.id,"-headControl"))).height,10)),T.jSPlugin.jSPlugin.JS_Resize(me,ge-re-Oe),T.jSPlugin.Theme.Rec&&T.jSPlugin.Theme.Rec.recAutoSize()}).catch(function(B){console.log(B)})}T.setDecoderState({webExpend:!de})},U;case"hd":return U.title="画面清晰度",U.id=w,U.domString='"+'')+''+' `)+`')+"",U.onclick=function(pe){var de=T.decoderState.state,se=de.hd,re=de.expend,Oe=de.recordvideo,be=de.play;be&&(se&&pe.target.id==="".concat(T.jSPlugin.id,"-select-sd")?(console.log("切换到标清"),T.jSPlugin.changeVideoLevel(0),T.setDecoderState({hd:!1}),T.resetMobileZoomStatus(),Oe&&T.setDecoderState({recordvideo:!1}),T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom()):!se&&pe.target.id==="".concat(T.jSPlugin.id,"-select-hd")&&(T.jSPlugin.changeVideoLevel(1),T.setDecoderState({hd:!0}),T.resetMobileZoomStatus(),Oe&&T.setDecoderState({recordvideo:!1}),T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom()),T.showHD=!T.showHD,document.getElementById("".concat(T.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(T.jSPlugin.id,"-hdSelect")).style.display=document.getElementById("".concat(T.jSPlugin.id,"-hdSelect")).style.display==="none"?"block":"none",T.isMobile&&(document.getElementById("".concat(T.jSPlugin.id,"-select-hd-mask")).style.display=document.getElementById("".concat(T.jSPlugin.id,"-select-hd-mask")).style.display==="none"?"block":"none")),T.isMobile&&re&&T.showHD?document.getElementById("".concat(T.jSPlugin.id,"-hdSelect")).className="hd speed-select mobile expend":document.getElementById("".concat(T.jSPlugin.id,"-hdSelect")).className=T.isMobile?"hd speed-select mobile":"speed-select")},U;case"speed":return U.title="回放倍速",U.id=w,U.domString='"+`
`).concat(this.nextRate===1?"倍速":"".concat(this.nextRate,"倍").replace("3","0.5"),`
`)+`')+"
",this.isMobile||(U.onmouseenter=function(pe){var de=T.decoderState.state.play;if(!de)return!1;console.log("鼠标移入",pe),T.setDecoderState({speed:!0}),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display="block")},U.onmouseleave=function(pe){var de=T.decoderState.state.play;if(!de)return!1;console.log("鼠标移出",pe),T.setDecoderState({speed:!1}),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display="none")}),U.onclick=function(pe){var de=T.decoderState.state,se=de.speed,re=de.expend,Oe=de.play;if(!Oe)return!1;if(!se&&T.isMobile&&(document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).className=re?"speed speed-select mobile expend":"speed speed-select mobile"),T.nextRate=1,pe.target.id)switch(pe.target.id){case"".concat(T.jSPlugin.id,"-select-speed1"):console.log("倍速1"),T.nextRate=1,T.jSPlugin.jSPlugin.JS_Speed(T.nextRate),T.changeRecSpeed(1),T.jSPlugin.speed=1,T.setDecoderState({speed:!se});break;case"".concat(T.jSPlugin.id,"-select-speed2"):console.log("倍速2"),T.nextRate=2,T.jSPlugin.jSPlugin.JS_Speed(T.nextRate),T.changeRecSpeed(2),T.jSPlugin.speed=2,T.setDecoderState({speed:!se});break;case"".concat(T.jSPlugin.id,"-select-speed4"):console.log("倍速4"),T.nextRate=4,T.jSPlugin.jSPlugin.JS_Speed(T.nextRate),T.changeRecSpeed(4),T.jSPlugin.speed=4,T.setDecoderState({speed:!se});break;case"".concat(T.jSPlugin.id,"-select-speed05"):console.log("倍速05"),T.nextRate=3,T.jSPlugin.jSPlugin.JS_Speed(T.nextRate),T.changeRecSpeed(.5),T.jSPlugin.speed=.5,T.setDecoderState({speed:!se});break;default:T.isMobile?T.setDecoderState({speed:!se}):T.setDecoderState({speed:!0});break}!T.isMobile&&pe.target.id==="".concat(T.jSPlugin.id,"-speed-text")?document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display="block":document.getElementById("".concat(T.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).style.display==="none"?"block":"none")},U;case"deviceName":return U.title="设备名称",U.id=w,U.domString="设备名称",U.onclick=function(){},U;case"deviceID":return U.title="设备序列号",U.id=w,U.domString="设备序列号",U.onclick=function(){},U;case"cloudRec":return U.title="云存储回放",U.id=w,U.domString=` `),U.onclick=function(){console.log("点击云回放"),T.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),T.jSPlugin.changePlayUrl({type:"cloud.rec"},function(){console.log(T.jSPlugin);var pe=d("begin",T.jSPlugin.url)||new Date().Format("yyyyMMdd");T.Rec.renderRec("".concat(pe.slice(0,4),"-").concat(pe.slice(4,6),"-").concat(pe.slice(6,8)));var de=T.decoderState.state.zoom;de&&(T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom())}),console.log(T.jSPlugin)},U;case"rec":return U.title="本地存储",U.id=w,U.domString=` `),U.onclick=function(){console.log("点击本地回放"),T.setDecoderState({type:"rec",cloudRec:!1,rec:!0}),T.jSPlugin.changePlayUrl({type:"rec"},function(){console.log("---------本地回放"),console.log(T.jSPlugin);var pe=d("begin",T.jSPlugin.url)||new Date().Format("yyyyMMdd");T.Rec.renderRec("".concat(pe.slice(0,4),"-").concat(pe.slice(4,6),"-").concat(pe.slice(6,8)));var de=T.decoderState.state.zoom;de&&(T.setDecoderState({zoom:!1}),T.jSPlugin.Zoom.stopZoom())}),console.log(T.jSPlugin)},U;default:return U}}},{key:"changeRecSpeed",value:function(w){var T=this,R=function(U){if(console.log("setLiActive",U),!document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")))return!1;document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[0].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[0].className.replace("active","default"),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[1].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[1].className.replace("active","default"),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[2].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[2].className.replace("active","default"),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[3].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[3].className.replace("active","default"),document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[U].className=document.getElementById("".concat(T.jSPlugin.id,"-speedSelect")).childNodes[U].className.replace("default","active")},N="1";switch(w){case 1:R(2),N="倍速";break;case 2:R(1),N="".concat(w,"倍");break;case 4:R(0),N="".concat(w,"倍");break;case .5:R(3),N="".concat(w,"倍");break;default:R(2),N="".concat(w,"倍");break}document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))&&(document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).innerHTML=N)}},{key:"initThemeData",value:function(){var w=this,T=this.themeData,R=T.header,N=T.footer,z=this.jSPlugin.id;if(this.header=he.header,this.footer=he.footer,this.isNeedRenderHeader=E.findIndex(R.btnList,function(ge){return ge.isrender>0})>=0,this.isMobile&&(this.isNeedRenderHeader=E.findIndex(R.btnList,function(ge){return ge.isrender>0&&ge.iconId==="deviceID"||ge.isrender>0&&ge.iconId==="deviceName"})>=0),this.isNeedRenderFooter=E.findIndex(N.btnList,function(ge){return ge.isrender>0})>=0,this.isNeedRenderTimeLine=E.findIndex(R.btnList,function(ge){return ge.iconId==="cloudRec"&&ge.isrender===1||ge.iconId==="rec"&&ge.isrender===1})>=0&&!this.jSPlugin.disabledTimeLine,["date-switch-container-wrap","rec-type-container-wrap","mobile-rec-wrap","mobile-ez-ptz-container"].forEach(function(ge,Ze){document.getElementById(ge)&&document.getElementById(ge).parentElement.removeChild(document.getElementById(ge))}),this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="
");else{var U=document.createElement("div");U.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),U.setAttribute("class","header-controls"),U.innerHTML="
`);var ue={height:this.jSPlugin.width>Tn?"48px":"32px","line-height":this.jSPlugin.width>Tn?"48px":"32px",display:"flex","justify-content":"space-between",top:0,"z-index":1,background:"#000000",color:"#FFFFFF",width:"100%"};U.style=En(ue),document.getElementById("".concat(z,"-wrap")).insertBefore(U,document.getElementById(z));var pe=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(pe)},50)}else document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl")));if(this.isNeedRenderFooter)if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")))document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-".concat(this.jSPlugin.width>Tn?48:32,"px"),document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='`));else{var de=document.createElement("div");de.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container")),de.setAttribute("class","ez-iframe-footer-container");var se={"min-height":this.jSPlugin.width>Tn?"48px":"32px","max-height":this.jSPlugin.width>Tn?"96px":"80px",position:"relative","margin-top":this.jSPlugin.width>Tn?"-48px":"-32px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%"};de.style=En(se),de.innerHTML='`),h(de,document.getElementById(z))}else document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")));if(this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=R.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=R.color,R.btnList.map(function(ge,Ze){ge.isrender&&w.renderHeader(ge.iconId,ge.part)})),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=N.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=N.color,N.btnList.map(function(ge,Ze){ge.isrender&&w.renderFooter(ge.iconId,ge.part)})),this.isNeedRenderTimeLine)if(this.isMobile)document.getElementById("".concat(this.jSPlugin.id,"-headControl-right"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl-right")).style.display="none"),this.Rec=new Ot(this.jSPlugin,this.changeRecSpeed,this.resetMobileZoomStatus);else{this.Rec?(this.Rec.unSyncTimeLine(),this.Rec.recInit()):(this.jSPlugin.decoderState=this.decoderState,this.jSPlugin.setDecoderState=this.setDecoderState,this.Rec=new He(this.jSPlugin));var re=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(re)},50)}var Oe=E.findIndex(this.themeData.footer.btnList,function(ge){return ge.iconId==="pantile"&&ge.isrender===1})>=0&&!this.jSPlugin.disabledPTZ;Oe&&(this.isMobile&&(this.MobilePtz=new xt(this.jSPlugin)),this.Ptz=new vt(this.jSPlugin));var be=function(){var Ze=w.decoderState.state,fe=Ze.expend,B=Ze.webExpend,te=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;te||(w.jSPlugin.jSPlugin.JS_Resize(w.jSPlugin.width,w.jSPlugin.height),fe&&w.setDecoderState({expend:!1}),B&&w.setDecoderState({webExpend:!1})),w.jSPlugin.Theme.Rec&&w.jSPlugin.Theme.Rec.recAutoSize()};if(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(ge){window.addEventListener(ge,function(Ze){return be()})}),this.themeData.poster){this.jSPlugin.poster=this.themeData.poster;var me=setInterval(function(){window.EZUIKit[w.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(me),w.jSPlugin.setPoster(w.themeData.poster))},50)}this.inited=!0,this.getDeviceInfo()}},{key:"resetMobileZoomStatus",value:function(){if(this.isMobile){var w=document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"));w&&w.style&&w.style.display!="none"&&(console.log("结束电子放大"),w.style.display="none"),this.jSPlugin.Zoom.resetZoom()}}},{key:"getDeviceInfo",value:function(){var w=this,T=function(N){N.code==200&&N.data&&(N.data.isEncrypt&&setTimeout(function(){w.pluginStatus.loadingClear(),w.pluginStatus.loadingSetText({text:"设备已加密",color:"red"})},1500),document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content"))&&(document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).style.maxWidth="100%",document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).style.overflow="hidden",document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).style.textOverflow="ellipsis",document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).style.whiteSpace="nowrap",document.getElementById("".concat(w.jSPlugin.id,"-deviceName-content")).innerHTML=N.data.deviceName),document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content"))&&(document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).style.maxWidth="100%",document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).style.overflow="hidden",document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).style.textOverflow="ellipsis",document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).style.whiteSpace="nowrap",document.getElementById("".concat(w.jSPlugin.id,"-deviceID-content")).innerHTML=S(w.jSPlugin.url).deviceSerial))};A(this.jSPlugin.env.domain+"/api/lapp/device/info","POST",{accessToken:this.jSPlugin.accessToken,deviceSerial:S(this.jSPlugin.url).deviceSerial},"",T)}},{key:"editStart",value:function(w){var T=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),R=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));R&&R.setAttribute("class","header-controls themeEditing"),T&&T.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(w){var T=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),R=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));R&&R.setAttribute("class","header-controls"),T&&T.setAttribute("class","footer-controls"),this.setDecoderState({isEditing:!1})}},{key:"webExpend",value:function(){var w=this,T=this.decoderState.state;T.webExpend;var R=T.expend,N=T.play;if(!N)return!1;if(R)return console.log("正在全局全屏"),!1;console.log("执行网页全屏");var z=0,U=0,ue=m(document.getElementById("".concat(this.jSPlugin.id,"-wrap")));ue.then(function(pe){console.log("全屏promise",window.screen.width),document.getElementById("".concat(w.jSPlugin.id,"-canvas-container"))&&(z=parseInt(window.getComputedStyle(document.getElementById("".concat(w.jSPlugin.id,"-canvas-container"))).height,10)),document.getElementById("".concat(w.jSPlugin.id,"-headControl"))&&(U=parseInt(window.getComputedStyle(document.getElementById("".concat(w.jSPlugin.id,"-headControl"))).height,10)),console.log("this.jSPlugin.JS_Resiz",z,U,document.body.clientWidth),w.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height-z-U)}).catch(function(pe){console.log(pe)})}},{key:"expend",value:function(){var w=this,T=this.decoderState.state,R=T.webExpend;T.expend;var N=T.play;if(T.pantile,!N)return!1;if(R)return console.log("正在网站全屏"),!1;if(console.log("执行全局全屏"),this.isMobile){var z=parseInt(getComputedStyle(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).height,10);p(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),setTimeout(function(){var ue=document.documentElement.clientWidth,pe=document.documentElement.clientHeight;document.getElementById("".concat(w.jSPlugin.id)).style["backface-visibility"]="hidden",w.jSPlugin.jSPlugin.JS_Resize(pe,ue-z)},100)}else{var U=m(document.getElementById("".concat(this.jSPlugin.id)));U.then(function(ue){w.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height)}).catch(function(ue){console.log(ue)})}}}]),Z}();Date.prototype.Format=function(Z){var H={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(Z)&&(Z=Z.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var w in H)new RegExp("("+w+")").test(Z)&&(Z=Z.replace(RegExp.$1,RegExp.$1.length==1?H[w]:("00"+H[w]).substr((""+H[w]).length)));return Z};var Jt=function(){function Z(H,w){if(i(this,Z),this.params=H,this.state={},this.jsPlugin=w,this.url="https://log.ys7.com/statistics.do?",H.env)switch(H.env){case"test12":this.url="https://test12dclog.ys7.com/statistics.do?";break;case"online":break;default:this.url=H.env;break}}return a(Z,[{key:"uuid",value:function(){for(var w=[],T="0123456789abcdef",R=0;R<36;R++)w[R]=T.substr(Math.floor(Math.random()*16),1);w[14]="4",w[19]=T.substr(w[19]&3|8,1),w[8]=w[13]=w[18]=w[23]="-";var N=w.join("");return N}},{key:"dclog",value:function(w){var T=this.url,R=Object.assign({},{systemName:"open_website_monitor"},{bn:"ezuikit-js"},w,{un:w.url},{st:new Date().getTime(),h:window.location.pathname});Object.keys(R).forEach(function(z,U){var ue=R[z];typeof R[z]=="string"&&(ue=R[z].replace("%","%25")),typeof R[z]!="undefined"&&(T+="".concat(U===0?"":"&").concat(z,"=").concat(encodeURIComponent(ue)))});var N=new Image;N.src=T}},{key:"localInfoLog",value:function(w){var T=this.url,R=window.location.protocol+"//"+window.location.host,N={systemName:"open_netstream_localinfo",Ver:"v6.0.0",PlatAddr:R,ExterVer:"v6.0.0",OpId:this.uuid(),CltType:102,AppId:"",playurl:encodeURIComponent(this.jsPlugin.url),StartTime:new Date().Format("yyyy-MM-dd hh:mm:ss.S"),OS:navigator.platform};N=Object.assign(N,w),Object.keys(N).forEach(function(U,ue){var pe=N[U];typeof N[U]=="string"&&(pe=N[U].replace("%","%25")),typeof N[U]!="undefined"&&(T+="".concat(ue===0?"":"&").concat(U,"=").concat(encodeURIComponent(pe)))});var z=new Image;z.src=T}},{key:"playLog",value:function(w){var T=this.url,R=T,N={systemName:"open_netstream_play_main",playurl:encodeURIComponent(this.jsPlugin.url),Time:new Date().Format("yyyy-MM-dd hh:mm:ss.S"),Via:2,OpId:this.uuid()};N=Object.assign(N,w),Object.keys(N).forEach(function(U,ue){var pe=N[U];typeof N[U]=="string"&&(pe=N[U].replace("%","%25")),typeof N[U]!="undefined"&&(R+="".concat(ue===0?"":"&").concat(U,"=").concat(encodeURIComponent(pe)))});var z=new Image;z.src=R}}]),Z}();(function(Z,H){t(n)==="object"&&t(n.exports)==="object"?n.exports=Z.document?H(Z,!0):function(w){if(!w.document)throw new Error("EZUIPlayer requires a window with a document");return H(w)}:H(Z)})(typeof window!="undefined"?window:void 0,function(Z,H){var w;function T(se,re){for(var Oe=document.getElementsByTagName("head")[0].getElementsByTagName("script"),be=!1,me=0;me0&&(nt=re.controls.join(","),Ge+="&controls="+nt)),re.websocketParams&&(Ge+="&websocketParams="+JSON.stringify(re.websocketParams)),Ge;case"standard":return U+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+oe.opt.url.replace("?","&")+"&autoplay="+oe.opt.autoplay+"&audio="+oe.opt.audio+"&accessToken="+re.accessToken+"&templete=1&id="+Oe+"&decoderVersion="+oe.opt.decoderVersion;case"security":return U+"/ezopen/h5/iframe_se?bSupporDoubleClickFull=0&url="+oe.opt.url.replace("?","&")+"&autoplay="+oe.opt.autoplay+"&audio="+oe.opt.audio+"&accessToken="+re.accessToken+"&templete=0&id="+Oe+"&decoderVersion="+oe.opt.decoderVersion;case"theme":return Ge=U+"/jssdk/theme.html?url=".concat(re.url,"&accessToken=").concat(re.accessToken,"&id=").concat(Oe,"&isMobile=").concat(re.isMobile),typeof re.isMobile!="undefined"&&(Ge+="&isMobile="+re.isMobile),typeof re.autoplay!="undefined"&&(Ge+="&autoplay="+re.autoplay),typeof re.domain!="undefined"&&re.domain=="https://test12open.ys7.com"&&(Ge+="&env=test12"),typeof re.env!="undefined"&&typeof re.env.domain!="undefined"&&re.env.domain=="https://test12open.ys7.com"&&(Ge+="&env=test12"),typeof re.header!="undefined"&&(Ge+="&header="+re.header),Ge;default:return U+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+oe.opt.url.replace("?","&")+"&autoplay="+oe.opt.autoplay+"&audio="+oe.opt.audio+"&accessToken="+re.accessToken+"&templete=0&id="+Oe+"&decoderVersion="+oe.opt.decoderVersion}}me.src=ge();var Ze=document.getElementById(Oe).offsetHeight,fe=document.getElementById(Oe).offsetWidth;re.height&&(Ze=parseInt(re.height),/\%$/.test(re.height)&&(fe=document.getElementById(Oe).offsetWidth*(parseInt(re.height)/100))),re.width&&(fe=parseInt(re.width),/\%$/.test(re.width)&&(fe=document.getElementById(Oe).offsetWidth*(parseInt(re.width)/100))),me.width=fe,me.height=Ze,me.id="EZUIKitPlayer-"+Oe,me.setAttribute("allowfullscreen",!0),me.setAttribute("allow","autoplay"),me.setAttribute("frameborder",0),be.appendChild(me);var B=oe.opt.filePath+"/js/jquery.js",te="https://open.ys7.com/assets/layer/layer.js";T(B,function(){T(te,function(){if(Wn().headerContainer){var Ge=document.createElement("div");Ge.setAttribute("class","panel-top");var nt=document.createElement("div");if(nt.setAttribute("class","contros"),Ge.appendChild(nt),be.insertBefore(Ge,me),Wn().capturePictureModule){var at=document.createElement("span");at.innerHTML=' ',at.onclick=function(){oe.capturePicture()},nt.appendChild(at)}if(console.log("matchHeaderOpt().saveModule",Wn().saveModule),Wn().saveModule){var St=document.createElement("span");St.innerHTML=' ',St.onclick=function(){oe.startSave(),document.getElementById("startSave").setAttribute("class","icon hide"),document.getElementById("stopSave").setAttribute("class","icon")},nt.appendChild(St);var zt=document.createElement("span");zt.innerHTML=' ',zt.onclick=function(){oe.stopSave(),document.getElementById("stopSave").setAttribute("class","icon hide"),document.getElementById("startSave").setAttribute("class","icon")},nt.appendChild(zt)}if(Wn().zoomModule){var qt=document.createElement("span");qt.innerHTML=' ',qt.onclick=function(){oe.enableZoom(),document.getElementById("enableZoom").setAttribute("class","icon hide"),document.getElementById("closeZoom").setAttribute("class","icon")},nt.appendChild(qt);var kt=document.createElement("span");kt.innerHTML=' ',kt.onclick=function(){oe.closeZoom(),document.getElementById("closeZoom").setAttribute("class","icon hide"),document.getElementById("enableZoom").setAttribute("class","icon")},nt.appendChild(kt)}}function On(){var xr={footerContainer:!1,talkModule:!1,broadcastModule:!1,hdModule:!1,fullScreenModule:!1},_i=oe.opt.template;switch(_i){case"simple":if(re.footer&&re.footer instanceof Array){var jn=re.footer;xr={footerContainer:!0,talkModule:jn.indexOf("talk")!==-1,broadcastModule:jn.indexOf("broadcast")!==-1,hdModule:jn.indexOf("hd")!==-1,fullScreenModule:jn.indexOf("fullScreen")!==-1}}break;case"standard":if(re.footer&&re.footer instanceof Array){var jn=re.footer;xr={footerContainer:!0,talkModule:jn.indexOf("talk")!==-1,broadcastModule:jn.indexOf("broadcast")!==-1,hdModule:jn.indexOf("hd")!==-1,fullScreenModule:jn.indexOf("fullScreen")!==-1}}break;case"security":break;case"voice":xr={footerContainer:!0,talkModule:!0,broadcastModule:!0,hdModule:!0,fullScreenModule:!0};break}return xr}function Wn(){var xr={headerContainer:!1,capturePictureModule:!1,saveModule:!1,zoomModule:!1},_i=oe.opt.template;switch(_i){case"simple":if(re.header&&re.header instanceof Array){var jn=re.header;xr={headerContainer:!0,capturePictureModule:jn.indexOf("capturePicture")!==-1,saveModule:jn.indexOf("save")!==-1,zoomModule:jn.indexOf("zoom")!==-1}}break;case"standard":break;case"security":break;case"voice":xr={headerContainer:!0,capturePictureModule:!0,saveModule:!0,zoomModule:!0};break}return xr}if(On().footerContainer||oe.opt.plugin.indexOf("talk")!==-1){var Vn=oe.opt.filePath+"/npm/css/recoder.css",ii=oe.opt.filePath+"/npm/js/recoder.js",ti=oe.opt.filePath+"/recorder.js";if(R(Vn,function(){}),T(ii,function(){T(ti,function(){})}),oe.opt.plugin.indexOf("talk")!==-1||On().talkModule){var di=function(_i){if(console.log("data",_i),_i.code==200){var jn=_i.data;if(jn){var wi=jn.rtcUrl;wi.indexOf("ws")===-1&&(wi=wi.replace("https","wss").replace("rtcgw","rtcgw-ws")),oe.opt.rtcUrl=wi,oe.opt.ttsUrl="tts://"+jn.ttsUrl;var mr="talk://"+oe.opt.deviceSerial+":0:"+oe.opt.channelNo+":cas.ys7.com:6500";if(oe.opt.talkLink=oe.opt.ttsUrl+"/"+mr,oe.opt.stream=jn.stream,console.log("_this.opt",oe.opt),!oe.opt.isReliesReady){var ye=oe.opt.filePath+"/npm/js/adapeter.js",Ne=oe.opt.filePath+"/npm/js/janus.js",qe=oe.opt.filePath+"/npm/js/tts.js";console.log("加载jquery.js"),T(ye,function(){console.log("加载adapeter.js"),T(Ne,function(){console.log("加载janus.js"),T(qe,function(){console.log("加载tts.js"),oe.opt.isReliesReady=!0})})},function(){return!!Z.adapter})}if(!document.getElementById("audioleft")){var tt=document.createElement("div");tt.style.display="none",tt.id="audioleft",document.body.appendChild(tt)}if(!document.getElementById("audioright")){var ve=document.createElement("div");ve.style.display="none",ve.id="audioright",document.body.appendChild(ve)}}}z.opt=oe.opt,Z.EZUIKit&&(Z.EZUIKit.opt=oe.opt)};N(oe.opt.apiDomain,"POST",{accessToken:oe.opt.accessToken,deviceSerial:oe.opt.deviceSerial,channelNo:oe.opt.channelNo},"",di)}if(On().footerContainer){var tr=function(_i,jn){if(clearInterval(z.state.countTimer),_i==="add"){var wi=jn;z.state.countTimer=setInterval(function(){++wi,document.getElementById("time-area").innerHTML=mr(wi)},1e3)}else if(_i==="sub"){var wi=jn;z.state.countTimer=setInterval(function(){wi>0?(wi--,document.getElementById("time-area").innerHTML=mr(wi)):(clearInterval(z.state.countTimer),z.state.countTimer=void 0,console.log("倒计时结束,开启声音"))},1e3)}else _i==="destory"&&(clearInterval(z.state.countTimer),z.state.countTimer=void 0,document.getElementById("time-area").innerHTML="00:00");function mr(ye){var Ne=parseInt(ye),qe=0,tt=0,ve="00",ct="00",et="00";return Ne>59&&(qe=parseInt(Ne/60),Ne=parseInt(Ne%60),qe>59&&(tt=parseInt(qe/60),qe=parseInt(qe%60))),ve=parseInt(Ne)>9?parseInt(Ne):"0"+parseInt(Ne),ct=parseInt(qe)>9?parseInt(qe):"0"+parseInt(qe),et=parseInt(tt)>9?parseInt(tt):"0"+parseInt(tt),tt>0?et+":"+ct+":"+ve:qe>0?ct+":"+ve:"00:"+ve}},Ve=document.createElement("div");if(Ve.setAttribute("class","audio-controls"),be.appendChild(Ve),On().hdModule||On().fullScreenModule){var Mt=document.createElement("div");if(Mt.setAttribute("class","contros"),Ve.appendChild(Mt),On().hdModule){var jt=document.createElement("span");jt.setAttribute("id","video-hd"),jt.innerHTML=oe.opt.url.indexOf(".hd")===-1?"标清":"高清",jt.onclick=function(){if(oe.opt.videoLoading)return layer.msg("视频加载中,请稍后"),!1;var xr=oe.stop();oe.opt.videoLoading=!0,xr.then(function(_i){oe.opt.videoLoading=!1,oe.opt.url.indexOf(".hd")===-1?(oe.opt.url=oe.opt.url.replace(".live",".hd.live"),jt.innerHTML=oe.opt.url.indexOf(".hd")===-1?"标清":"高清"):(oe.opt.url=oe.opt.url.replace(".hd.live",".live"),jt.innerHTML=oe.opt.url.indexOf(".hd")===-1?"标清":"高清"),oe.play(oe.opt.url)}).catch(function(_i){console.log("error",_i)})},Mt.appendChild(jt)}if(On().fullScreenModule){var Sn=document.createElement("span");Sn.setAttribute("class","hide"),Sn.setAttribute("id","ezuikit-open-sound"),Sn.setAttribute("title","打开声音"),Sn.setAttribute("style","vertical-align: top;"),Sn.innerHTML='',Sn.onclick=function(){oe.openSound(0),Sn.setAttribute("class","hide"),Hn.setAttribute("class","")};var Hn=document.createElement("span");Sn.setAttribute("id","ezuikit-close-sound"),Hn.setAttribute("class","hide"),Hn.setAttribute("title","关闭声音"),Hn.setAttribute("style","vertical-align: top;"),Hn.innerHTML='',Hn.onclick=function(){oe.closeSound(0),Sn.setAttribute("class",""),Hn.setAttribute("class","hide")},Mt.appendChild(Sn),Mt.appendChild(Hn)}if(oe.opt.audio==1?Hn.setAttribute("class",""):(Sn.setAttribute("class",""),oe.closeSound(0)),On().fullScreenModule){var pi=document.createElement("span");pi.setAttribute("title","全屏"),pi.setAttribute("style","vertical-align: top;"),pi.innerHTML=' ',pi.onclick=function(){oe.fullScreen()},Mt.appendChild(pi)}}if(On().talkModule){var hi=document.createElement("div"),yi=document.createElement("div");hi.setAttribute("class","ptp-talk off"),hi.innerHTML=' 开启对讲',hi.onclick=function(){if(console.log("EZUIKit.state.countTimer",z.state.countTimer),z.state.countTimer)return Z.layer.msg("语音设备正忙,请稍后重试"),!1;tr("add",0),console.log("开始对讲,关闭声音"),oe.closeSound(0),console.log(oe.opt),oe.startTalk(),this.setAttribute("class","ptp-talk off hide"),yi.setAttribute("class","ptp-talk on")},yi.setAttribute("class","ptp-talk on hide"),yi.innerHTML=' 关闭对讲',yi.onclick=function(){console.log(oe.opt),oe.stopTalk(),tr("destory",0),oe.openSound(0),this.setAttribute("class","ptp-talk on hide"),hi.setAttribute("class","ptp-talk off")},Ve.appendChild(hi),Ve.appendChild(yi)}if(On().broadcastModule){var nr=function xr(_i){function jn(wi){console.log("data",wi),wi.code==200&&(zl(wi.data,5),z.state.page=wi.page.page,_i==0&&wi.data.length==0&&!z.state.fetchDefaultList&&(z.state.fetchDefaultList=!0,xr(0)))}N(U+"/api/lapp/voice/query","POST",{accessToken:oe.opt.accessToken,pageStart:_i,pageSize:z.state.pageSize,default:z.state.fetchDefaultList?"true":"false"},"",jn)},zl=function(_i){if(console.log("renderVoliceList",_i),_i&&_i.length>0){for(var jn=0;jn<_i.length;jn++){var wi=document.createElement("li");wi.innerHTML="
  • "+(_i[jn].voiceName.length>10?_i[jn].voiceName.substr(0,10)+"...":_i[jn].voiceName)+"
  • ",document.getElementsByClassName("voice-list-ul")[0].append(wi),wi.onclick=function(mr){console.log("点击元素",mr.target,mr.target.dataset.url);var ye=mr.target.dataset.url,Ne=mr.target.dataset.time;fs(ye,Ne)}}_i.length===z.state.pageSize?document.getElementById("voice-list-end").innerHTML="向下滚动加载更多":document.getElementById("voice-list-end").innerHTML="没有更多数据了"}},fs=function(_i,jn){console.log("播放语音",_i,jn);function wi(mr){console.log("data.data",mr.data),mr.code==200?tr("sub",parseInt(jn)):mr.code=="10001"?Z.layer.msg("未找到当前语音"):Z.layer.msg(mr.msg||"发送失败,请稍后再试")}N(U+"/api/lapp/voice/send","POST",{accessToken:oe.opt.accessToken,deviceSerial:oe.opt.deviceSerial,channelNo:oe.opt.channelNo,fileUrl:_i},"",wi)},zr=document.createElement("div"),Xo=document.createElement("div");zr.setAttribute("class","broadcast off"),Xo.setAttribute("class","broadcast on hide"),zr.innerHTML=' 语音播报',zr.onclick=function(){this.setAttribute("class","broadcast off hide"),Xo.setAttribute("class","broadcast on")},Xo.innerHTML='
    自定义语音
    语音播报',Xo.onclick=function(){this.setAttribute("class","broadcast on hide"),zr.setAttribute("class","broadcast off")},Ve.appendChild(zr),Ve.appendChild(Xo),document.getElementById("voice-custom").onclick=function(){console.log("显示自定义语音"),ir.setAttribute("class","speak off")},nr(0);var ir=document.createElement("div"),wa=document.createElement("div");ir.setAttribute("class","speak off hide"),wa.setAttribute("class","speak on hide"),ir.setAttribute("id","startSpeak"),wa.setAttribute("id","stopSpeak"),ir.innerHTML=' 按住说话',wa.innerHTML=' 松开发送',Ve.appendChild(ir),Ve.appendChild(wa),document.getElementById("voice-list").onscroll=function(xr){var _i=this.scrollHeight;console.log("sum",_i,this.scrollTop,document.getElementById("voice-list").clientHeight),_i<=this.scrollTop+this.clientHeight&&(console.log("拖动到底,执行加载",z.state.page),nr(++z.state.page))};var co=document.createElement("div");co.setAttribute("class","time-area"),co.setAttribute("id","time-area"),co.innerHTML="00:00",Ve.appendChild(co);var Ui;document.getElementById("startSpeak").onmousedown=function(){if(z.state.countTimer)return Z.layer.msg("语音设备正忙,请稍后重试"),!1;console.log("按住说话"),ir.setAttribute("class","speak off hide"),wa.setAttribute("class","speak on"),wi(),tr("add",0),setTimeout(function(){z.state.recodeTime=0,jn()},1e3),z.state.recodeTimer&&clearInterval(z.state.recodeTimer),z.state.recodeTimer=setInterval(function(){z.state.recodeTime>=59?(oe.stopTalk(),tr("destory",0),this.setAttribute("class","ptp-talk on hide"),hi.setAttribute("class","ptp-talk off"),Z.layer.msg("不超过1分钟")):z.state.recodeTime=z.state.recodeTime+1},1e3);var xr;function _i(mr){var ye=xr.createMediaStreamSource(mr);Ui=new Z.Recorder(ye)}function jn(){Ui&&Ui.record()}function wi(){console.log("run init");try{Z.AudioContext=Z.AudioContext||Z.webkitAudioContext,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia,Z.URL=Z.URL||Z.webkitURL,xr=new AudioContext,console.log("Audio context set up."),console.log("navigator.getUserMedia "+(navigator.getUserMedia?"available.":"not present!"))}catch(mr){console.log("err",mr),Z.layer.msg("No web audio support in this browser!")}navigator.getUserMedia({audio:!0},_i,function(mr){console.log("No live audio input: "+mr)})}},document.getElementById("stopSpeak").onmouseup=function(){console.log("松开发送"),wa.setAttribute("class","speak on hide"),xr();function xr(){if(tr("destory",0),z.state.recodeTime<1)return Z.layer.msg("说话时间过短"),clearInterval(z.state.recodeTimer),!1;clearInterval(z.state.recodeTimer),_i()}function _i(){try{Ui&&Ui.stop(),Ui&&Ui.exportWAV(function(jn){if(console.log("wav_file",jn),jn.size<1e3)return Z.layer.msg("录音失败,请重试"),z.state.recodeTime=0,!1;tr("sub",z.state.recodeTime+2);var wi=new FormData;wi.append("voiceFile",jn),wi.append("accessToken",oe.opt.accessToken),wi.append("deviceSerial",oe.opt.deviceSerial),wi.append("channelNo",oe.opt.channelNo);function mr(Ne){console.log("data.data",Ne.data),Ne.code==200?tr("sub",z.state.recodeTime+2):Ne.code=="10001"?Z.layer.msg("未找到当前语音"):Z.layer.msg(Ne.msg||"发送失败,请稍后再试")}function ye(Ne){console.log("err",Ne)}N(U+"/api/lapp/voice/sendonce","POST",{voiceFile:jn,accessToken:oe.opt.accessToken,deviceSerial:oe.opt.deviceSerial,channelNo:oe.opt.channelNo},"",mr,ye)}),Ui&&Ui.clear()}catch(jn){console.log(jn)}}}}}}})});var oe=this;Z.addEventListener("message",function(Ge){Ge.origin;var nt=oe.opt.id;if(Ge.data.type)switch(Ge.data.type){case"openSound":nt==Ge.data.id&&re.openSoundCallBack&&re.openSoundCallBack(Ge.data);break;case"closeSound":nt==Ge.data.id&&re.closeSoundCallBack&&re.closeSoundCallBack(Ge.data);break;case"capturePicture":nt==Ge.data.id&&re.capturePictureCallBack&&re.capturePictureCallBack(Ge.data);break;case"startSave":nt==Ge.data.id&&re.startSaveCallBack&&re.startSaveCallBack(Ge.data);break;case"stopSave":nt==Ge.data.id&&re.stopSaveCallBack&&re.stopSaveCallBack(Ge.data);break;case"fullScreen":nt==Ge.data.id&&re.fullScreenCallBack&&re.fullScreenCallBack(Ge.data);break;case"getOSDTime":nt==Ge.data.id&&re.getOSDTimeCallBack&&re.getOSDTimeCallBack(Ge.data);break;case"handleSuccess":nt==Ge.data.id&&re.handleSuccess&&re.handleSuccess(Ge.data);break;case"handleError":nt==Ge.data.id&&re.handleError&&re.handleError(Ge.data);break;case"dblclick":nt==Ge.data.id&&oe.opt.bSupporDoubleClickFull&&(oe.opt.fullScreenStatus===0?oe.fullScreen():oe.cancelFullScreen());break;case"startTalk":oe.startTalk(),oe.closeSound();break;case"stopTalk":oe.stopTalk(),oe.openSound();break;case"clickEventHandle":console.log("event.data",Ge.data),re.clickEventHandle&&re.clickEventHandle(Ge.data);break;case"removeEventHandle":re.removeEventHandle&&re.removeEventHandle(Ge.data);break;case"esc":re.clickEventHandle&&re.clickEventHandle(Ge.data);break;case"iframeFullScreen":if(nt==Ge.data.id){var at=function(zt){var qt=zt.requestFullScreen||zt.webkitRequestFullScreen||zt.mozRequestFullScreen||zt.msRequestFullScreen;if(qt)qt.call(zt);else if(typeof Z.ActiveXObject!="undefined"){var kt=new ActiveXObject("WScript.Shell");kt!==null&&kt.SendKeys("{F11}")}};at(document.getElementById("EZUIKitPlayer-"+Ge.data.id))}break}});function Ie(Ge){oe.opt.fullScreenStatus=Ge?1:0,re.fullScreenChangeCallBack&&re.fullScreenChangeCallBack({data:Ge,id:oe.opt.id})}typeof document.fullScreen!="undefined"?document.addEventListener("fullscreenchange",function(){var Ge=document.fullscreen||!1;Ie(Ge)}):typeof document.webkitIsFullScreen!="undefined"?document.addEventListener("webkitfullscreenchange",function(){var Ge=document.webkitIsFullScreen||!1;Ie(Ge)}):typeof document.mozFullScreen!="undefined"&&document.addEventListener("mozfullscreenchange",function(){var Ge=document.mozFullScreen||!1;Ie(Ge)})};pe.prototype.play=function(se){var re="EZUIKitPlayer-"+this.opt.id,Oe=document.getElementById(re).contentWindow;t(se)==="object"&&se.url&&(this.opt.url=se.url),t(se)==="object"&&se.accessToken&&(this.opt.accessToken=se.accessToken),typeof se=="string"&&(this.opt.url=se),Oe.postMessage({action:"play",accessToken:this.opt.accessToken,url:this.opt.url},U+"/ezopen/h5/iframe");var be=this;this.opt.videoLoading=!0;var me=new Promise(function(ge,Ze){Z.addEventListener("message",function(fe){var B=be.opt.id;B==fe.data.id&&fe.data.type==="handleSuccess"&&(setTimeout(function(){be.opt.videoLoading=!1},1e3),ge(fe.data))})});return me},pe.prototype.stop=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("stop",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="stop"&&me(Ze.data)})});return be},pe.prototype.openSound=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("openSound",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="openSound"&&me(Ze.data)})});return be},pe.prototype.closeSound=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("closeSound",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="closeSound"&&me(Ze.data)})});return be},pe.prototype.startSave=function(se){var re="EZUIKitPlayer-"+this.opt.id,Oe=document.getElementById(re).contentWindow;Oe.postMessage({action:"startSave",fileName:se||"default"},U+"/ezopen/h5/iframe");var be=this,me=new Promise(function(ge,Ze){Z.addEventListener("message",function(fe){var B=be.opt.id;B==fe.data.id&&fe.data.type==="startSave"&&ge(fe.data)})});return me},pe.prototype.stopSave=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("stopSave",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="stopSave"&&me(Ze.data)})});return be},pe.prototype.fullScreen=function(){if(this.opt.fullScreenStatus===1)return!1;var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var Oe=document.documentElement.clientWidth,be=document.documentElement.clientHeight,me=document.body;me=document.getElementById(se);var ge="";ge+="width:"+be+"px;",ge+="height:"+Oe+"px;",ge+="-webkit-transform: rotate(90deg); transform: rotate(90deg);",ge+="-webkit-transform-origin: "+Oe/2+"px "+Oe/2+"px;",ge+="transform-origin: "+Oe/2+"px "+Oe/2+"px;",ge+="position: fixed;top: 0;left: 0;z-index:10",me.style.cssText=ge,setTimeout(function(){re.postMessage("autoResize",U+"/ezopen/h5/iframe")},500)}else{var Ze=function(B){var te=B.requestFullScreen||B.webkitRequestFullScreen||B.mozRequestFullScreen||B.msRequestFullScreen;if(te)te.call(B);else if(typeof Z.ActiveXObject!="undefined"){var oe=new ActiveXObject("WScript.Shell");oe!==null&&oe.SendKeys("{F11}")}};Ze(document.getElementById(se))}this.params.fullScreenCallBack&&this.params.fullScreenCallBack(this.opt.id),this.opt.fullScreenStatus=1},pe.prototype.cancelFullScreen=function(){if(this.opt.fullScreenStatus===0)return!1;var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var Oe=document.getElementById(se).width,be=document.getElementById(se).height,me=document.body;me=document.getElementById(se);var ge="";ge+="width:"+Oe+"px;",ge+="height:"+be+"px;",ge+="-webkit-transform: none; transform: none;",ge+="-webkit-transform-origin: 0 0;",ge+="transform-origin: 0 0;",me.style.cssText=ge,setTimeout(function(){re.postMessage("autoResize",U+"/ezopen/h5/iframe")},500);var Ze=se+"cancel-full-screen",fe=document.getElementById(Ze);fe&&document.body.removeChild(fe)}else document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen&&document.mozCancelFullScreen();this.params.cancelFullScreenCallBack&&this.params.cancelFullScreenCallBack(this.opt.id),this.opt.fullScreenStatus=0},pe.prototype.capturePicture=function(se,re){var Oe="EZUIKitPlayer-"+this.opt.id,be=document.getElementById(Oe).contentWindow;be.postMessage({action:"capturePicture",fileName:se||"default",isUndownload:re},U+"/ezopen/h5/iframe");var me=this,ge=new Promise(function(Ze,fe){Z.addEventListener("message",function(B){var te=me.opt.id;te==B.data.id&&B.data.type==="capturePicture"&&Ze(B.data)})});return ge},pe.prototype.enableZoom=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("enableZoom",U+"/ezopen/h5/iframe")},pe.prototype.closeZoom=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("closeZoom",U+"/ezopen/h5/iframe")},pe.prototype.getOSDTime=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("getOSDTime",U+"/ezopen/h5/iframe");var Oe=this,be=new Promise(function(me,ge){Z.addEventListener("message",function(Ze){var fe=Oe.opt.id;fe==Ze.data.id&&Ze.data.type==="getOSDTime"&&me(Ze.data)})});return be},pe.prototype.autoResize=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("autoResize",U+"/ezopen/h5/iframe")},pe.prototype.reSize=function(se,re){var Oe="EZUIKitPlayer-"+this.opt.id,be=document.getElementById(Oe).contentWindow,me=document.getElementById(this.opt.id);me.style.width=se+"px",me.style.height=re+"px",document.getElementById(this.opt.id).style.width=se+"px",document.getElementById(this.opt.id).style.height=re+"px";var ge=document.getElementById(Oe);ge.setAttribute("width",se),ge.setAttribute("height",re),ge.style.width=se+"px",ge.style.height=re+"px",setTimeout(function(){be.postMessage({action:"autoResize"},U+"/ezopen/h5/iframe")},500)},pe.prototype.startTalk=function(){console.log("执行开始对讲"),console.log(this.opt);var se=this;z.opt=this.opt,Z.EZUIKit&&(Z.EZUIKit.opt=this.opt);var re=function(be){if(be.code==200){var me=be.data;if(me){var ge=me.rtcUrl;ge.indexOf("ws")===-1&&(ge=ge.replace("https","wss").replace("rtcgw","rtcgw-ws")),se.opt.rtcUrl=ge,se.opt.ttsUrl="tts://"+me.ttsUrl;var Ze="talk://"+se.opt.deviceSerial+":0:"+se.opt.channelNo+":cas.ys7.com:6500";se.opt.talkLink=se.opt.ttsUrl+"/"+Ze,se.opt.stream=me.stream,Z.startTalk()}}};N(se.opt.apiDomain,"POST",{accessToken:se.opt.accessToken,deviceSerial:se.opt.deviceSerial,channelNo:se.opt.channelNo},"",re)},pe.prototype.stopTalk=function(){console.log("执行结束对讲"),Z.stopTalk()},pe.prototype.edit=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage("edit",U+"/ezopen/h5/iframe")},pe.prototype.btnReRender=function(se){var re="EZUIKitPlayer-"+this.opt.id,Oe=document.getElementById(re).contentWindow;Oe.postMessage({action:"btnReRender",data:se},U+"/ezopen/h5/iframe")},pe.prototype.changePlayUrl=function(se){se.deviceSerial&&(this.opt.deviceSerial=se.deviceSerial),se.channelNo&&(this.opt.channelNo=se.channelNo),se.accessToken&&(this.opt.accessToken=se.accessToken);var re="EZUIKitPlayer-"+this.opt.id,Oe=document.getElementById(re).contentWindow;Oe.postMessage({action:"changePlayUrl",data:se},U+"/ezopen/h5/iframe")},pe.prototype.fetchThemeData=function(){var se="EZUIKitPlayer-"+this.opt.id,re=document.getElementById(se).contentWindow;re.postMessage({action:"fetchThemeData"},U+"/ezopen/h5/iframe")},pe.prototype.setThemeData=function(se,re,Oe){var be="EZUIKitPlayer-"+this.opt.id,me=document.getElementById(be).contentWindow;me.postMessage({action:"setThemeData",data:{accessToken:se,header:re,footer:Oe}},U+"/ezopen/h5/iframe")},z.EZUIKitPlayer=pe,Z.EZUIKitV3=z;var de=z;return de});var hn=EZUIKitV3,Nn=function(H){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=void 0,N=void 0,z=void 0,U=[];return function(){var de=Re(w),se=new Date().getTime(),re=!R||se-R>de;R=se;for(var Oe=arguments.length,be=Array(Oe),me=0;me>>0)+"_",Hn=0;return Mt}),N("Symbol.iterator",function(Ve){if(Ve)return Ve;Ve=Symbol("Symbol.iterator");for(var Mt="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),jt=0;jt0&&R>0){var z=H.left/T,U=H.top/R,ue=H.right/T,pe=H.bottom/R;N=new Float32Array([ue,U,z,U,ue,pe,z,pe])}else N=new Float32Array([1,0,0,0,1,1,0,1]);var de=this.texturePosBuffer;w.bindBuffer(w.ARRAY_BUFFER,de),w.bufferSubData(w.ARRAY_BUFFER,0,N),w.bindBuffer(w.ARRAY_BUFFER,null)},Z.prototype.SR_Destroy=function(){var H=this.contextGL,w=this.YUVProgram;H.deleteProgram(w);var T=this.vertexPosBuffer,R=this.texturePosBuffer;H.deleteBuffer(T),H.deleteBuffer(R);var N=this.yTextureRef,z=this.uTextureRef,U=this.vTextureRef;H.deleteTexture(N),H.deleteTexture(z),H.deleteTexture(U)},Z});var Qe="https://open.ys7.com",At="".concat(Qe,"/console/ezuikit_static/v66/v2"),ke="".concat(Qe,"/console/ezuikit_static/v66/v1"),ft=function(H,w){var T=["theme","standard"],R=["pcLive","pcRec","mobileLive","mobileRec","noData","security","voice","simple"];if(typeof H=="undefined")return w.themeData?{templateType:"themeData",templateId:"themeData"}:{templateType:"local",templateId:""};if(typeof H=="string"){if(H.length===32)return{templateType:"remote",templateId:H};if(T.indexOf(H)!==-1)return H==="simple"&&typeof w.header=="undefined"&&typeof w.footer=="undefined"?{templateType:"local",templateId:""}:{templateType:"iframe",templateId:H};if(R.indexOf(H)!==-1)return{templateType:"local",templateId:H}}},en=function(){var H=window.navigator.userAgent.toLowerCase(),w={sa:/version.*safari/.test(H),ch:/chrome/.test(H),ff:/gecko/.test(H)&&!/webkit/.test(H)},T=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);if(T)return!1;if(w.ch){var R=function(){for(var z=window.navigator.userAgent.split(" "),U="",ue=0;ue91&&!!window.SharedArrayBuffer}return!1},we=function(){function Z(H){var w=this;i(this,Z),this.isStoping=!1;var T=H.autoplay,R=T===void 0?!0:T;if((H.template||H.themeData)&&(R=!1),this.params=H,this.autoplay=R,window.EZUIKit[H.id]={state:{EZUIKitPlayer:{init:window.EZUIKit[H.id]&&window.EZUIKit[H.id].state&&window.EZUIKit[H.id].state.EZUIKitPlayer.init||!1,themeInit:window.EZUIKit[H.id]&&window.EZUIKit[H.id].state&&window.EZUIKit[H.id].state.EZUIKitPlayer.themeInit||!1,talkInit:window.EZUIKit[H.id]&&window.EZUIKit[H.id].state&&window.EZUIKit[H.id].state.EZUIKitPlayer.talkInit||!1}}},ft(this.params.template,H).templateType!=="iframe"){this.Monitor=new Jt({env:typeof H.disableMonitor!="undefined"&&H.disableMonitor?"test12":"online"},this),this.id=H.id,this.width=H.width,this.height=H.height,this.url=H.url,this.accessToken=H.accessToken,this.themeId=ft(H.template,H).templateId,this.id=H.id,this.audio=!0,this.poster=H.poster,this.speed=1,this.disabledTimeLine=!1,this.disabledPTZ=!1,this.enableSharedArrayBufferGuide=!1,this.capacity={},this.playTimer=null,this.env={domain:"https://open.ys7.com"};var N=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);this.isMobile=N,document.getElementById("".concat(this.id,"-wrap"))&&(document.getElementById("".concat(this.id,"-wrap")).innerHTML="",document.getElementById("".concat(this.id,"-wrap")).id=this.id),this.staticPath=en()?At:ke,typeof H.staticPath=="string"&&(H.staticPath.startsWith("http")?this.staticPath=H.staticPath:this.staticPath=window.location.protocol+"//"+window.location.host+H.staticPath,en()?this.staticPath+="/v2":this.staticPath+="/v1"),typeof H.audio!="undefined"&&(this.audio=H.audio),typeof H.env!="undefined"&&(this.env=Object.assign(this.env,H.env)),typeof H.isMobile!="undefined"&&(this.isMobile=H.isMobile),typeof H.disabledTimeLine!="undefined"&&(this.disabledTimeLine=H.disabledTimeLine),typeof H.disabledPTZ!="undefined"&&(this.disabledPTZ=H.disabledPTZ),typeof H.enableSharedArrayBufferGuide!="undefined"&&(this.enableSharedArrayBufferGuide=H.enableSharedArrayBufferGuide);var z="".concat(this.staticPath,"/js/jsPluginV1-1.0.0.min.js"),U=function(){if(window.addPluginUrlIng=!0,en())console.log("启用多线程解析视频"),z="".concat(w.staticPath,"/js/jsPluginV2-2.0.1.min.js");else{var de=function(){for(var ge=navigator.userAgent.split(" "),Ze="",fe=0;fe0&&(z=pe.width),!w.height&&pe.height>0&&(ue=pe.height)}if(!document.getElementById("".concat(R,"-wrap"))){var de=document.createElement("div");de.id="".concat(R,"-wrap"),de.style="display:inline-block;width:".concat(z,"px;position:relative;vertical-align: bottom;"),document.getElementById(R).parentNode.insertBefore(de,document.getElementById(R)),document.getElementById(R).parentNode.removeChild(document.getElementById(R)),de.innerHTML="
    "),document.getElementById(R).style="display:inline-block;width:".concat(z,"px;height:").concat(ue,"px;"),document.getElementById(R).style.verticalAlign="top"}this.themeId&&(this.Theme=new ut(this,w.id),window.EZUIKit[w.id].state.EZUIKitPlayer.themeInit=!0,this.Monitor.dclog({url:this.url,action:2,text:this.themeId}),typeof this.params.handleThemeChange=="function"&&(this.handleThemeChange=this.params.handleThemeChange));var se=new V(this,R);this.Message=se;var re=function(me,ge){var Ze;if(en()){Ze=new window.JSPluginV2({szId:R,iType:2,iWidth:z,iHeight:ue,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",staticPath:T.staticPath,oStyle:{border:"none",background:"#000000"}}),T.pluginStatus.loadingStart(R),T.pluginStatus.loadingSetText({text:"初始化播放器完成"}),Ze.EventCallback={pluginErrorHandler:function(te,oe,Ie){if(console.log(te,oe,Ie),oe===1003)console.log("断流"),T.Theme.setDecoderState({play:!1}),T.pluginStatus.setPlayStatus({play:!1}),Ze.bPlay||(T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:"连接断开,请重试",color:"red"})),typeof T.params.handleError=="function"&&T.params.handleError({msg:"连接断开,请重试",retcode:1003,id:T.params.id,type:"handleError"});else if(Ie.errorCode!=1){var Ge=T.errorHander.matchErrorInfo(Ie.errorCode),nt="连接断开,请重试";Ge&&Ge.msg?nt=Ge.msg:Ge&&Ge.description&&(nt=Ge.description),T.Theme.setDecoderState({play:!1}),T.pluginStatus.setPlayStatus({play:!1}),T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:nt,color:"red"})}else T.pluginStatus.loadingClear(),T.Theme&&T.Theme.setDisabled(!1)},openStreamCallback:function(){console.log("开启取流"),T.openStreamTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:224,d:T.openStreamTime-T.gotWsUrlTime,text:"openStream",isVersion2Available:en()?1:0})},getStreamHeaderCallback:function(){console.log("完成取流返回流头"),T.getStreamHeaderTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:225,d:T.getStreamHeaderTime-T.openStreamTime,text:"getStreamHeader",isVersion2Available:en()?1:0})},getVideoStreamCallback:function(){console.log("返回视频流(首次)"),T.getVideoStreamTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:226,d:T.getVideoStreamTime-T.getStreamHeaderTime,text:"getVideoStream",isVersion2Available:en()?1:0})},appearFirstFrameCallback:function(){console.log("出现首帧画面(播放成功)"),T.appearFirstFrameTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:227,d:T.appearFirstFrameTime-T.getStreamHeaderTime,text:"appearFirstFrame",isVersion2Available:en()?1:0})},averageStreamSuccessCallback:function(){console.log("平均成功取流的出流耗时"),T.averageStreamSuccessTime=T.initSuccessTime-T.initTime+(T.gotWsUrlTime-T.startGetWsUrlTime)+(T.appearFirstFrameTime-T.openStreamTime),T.Monitor.dclog({url:T.url,action:228,d:T.averageStreamSuccessTime,text:"averageStreamSuccess",isVersion2Available:en()?1:0})}},T.env={domain:"https://open.ys7.com"},typeof w.env!="undefined"&&(T.env=Object.assign(T.env,w.env)),typeof w.handleTalkSuccess!="undefined"&&(T.handleTalkSuccess=w.handleTalkSuccess),typeof w.handleTalkError!="undefined"&&(T.handleTalkError=w.handleTalkError),T.errorHander=new K,T.jSPlugin=Ze;var fe=setInterval(function(){window.JSPlayerModuleLoaded&&(clearInterval(fe),typeof T.params.handleInitSuccess=="function"&&T.params.handleInitSuccess({retcode:0,id:T.params.id,type:"handleInitSuccess"}),me({meta:{retcode:200,msg:"初始化成功"}}),w.url.indexOf("rec")!=-1&&T.Theme.changeTheme(T.isMobile?"mobileRec":"pcRec"))},50)}else Ze=new window.JSPluginV1({szId:R,iType:2,iWidth:z,iHeight:ue,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",staticPath:T.staticPath,oStyle:{border:"none",background:"#000000"}}),T.pluginStatus.loadingStart(R),T.pluginStatus.loadingSetText({text:"初始化播放器完成"}),Ze.EventCallback={openStreamCallback:function(){console.log("开启取流---v1"),T.openStreamTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:224,d:T.openStreamTime-T.gotWsUrlTime,text:"openStream",isVersion2Available:en()?1:0})},getStreamHeaderCallback:function(){console.log("完成取流返回流头"),T.getStreamHeaderTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:225,d:T.getStreamHeaderTime-T.openStreamTime,text:"getStreamHeader",isVersion2Available:en()?1:0})},getVideoStreamCallback:function(){console.log("返回视频流(首次)"),T.getVideoStreamTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:226,d:T.getVideoStreamTime-T.getStreamHeaderTime,text:"getVideoStream",isVersion2Available:en()?1:0})},appearFirstFrameCallback:function(){console.log("出现首帧画面(播放成功)"),T.appearFirstFrameTime=new Date().getTime(),T.Monitor.dclog({url:T.url,action:227,d:T.appearFirstFrameTime-T.getStreamHeaderTime,text:"appearFirstFrame",isVersion2Available:en()?1:0})},averageStreamSuccessCallback:function(){console.log("平均成功取流的出流耗时"),T.averageStreamSuccessTime=T.initSuccessTime-T.initTime+(T.gotWsUrlTime-T.startGetWsUrlTime)+(T.appearFirstFrameTime-T.openStreamTime),T.Monitor.dclog({url:T.url,action:228,d:T.averageStreamSuccessTime,text:"averageStreamSuccess",isVersion2Available:en()?1:0})},loadEventHandler:function(){},zoomEventResponse:function(){},windowEventSelect:function(te){},pluginErrorHandler:function(te,oe,Ie){if(console.log(te,oe,Ie),oe===1003)console.log("断流"),T.Theme.setDecoderState({play:!1}),T.pluginStatus.setPlayStatus({play:!1}),Ze.bPlay||(T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:"连接断开,请重试",color:"red"})),typeof T.params.handleError=="function"&&T.params.handleError({msg:"连接断开,请重试",retcode:1003,id:T.params.id,type:"handleError"});else if(Ie.errorCode!=1){var Ge=T.errorHander.matchErrorInfo(Ie.errorCode),nt="连接断开,请重试";Ge&&Ge.msg?nt=Ge.msg:Ge&&Ge.description&&(nt=Ge.description),T.Theme.setDecoderState({play:!1}),T.pluginStatus.setPlayStatus({play:!1}),T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:nt,color:"red"})}else T.pluginStatus.loadingClear(),T.Theme&&T.Theme.setDisabled(!1)},windowEventOver:function(te){},windowEventOut:function(te){},windowEventUp:function(te){},windowFullCcreenChange:function(te){},firstFrameDisplay:function(te,oe,Ie){console.log(oe,Ie),Ze.JS_SetCanFullScreen(!1)},performanceLack:function(){},mouseEvent:function(te,oe,Ie){}},T.env={domain:"https://open.ys7.com"},typeof w.env!="undefined"&&(T.env=Object.assign(T.env,w.env)),typeof w.handleTalkSuccess!="undefined"&&(T.handleTalkSuccess=w.handleTalkSuccess),typeof w.handleTalkError!="undefined"&&(T.handleTalkError=w.handleTalkError),T.errorHander=new K,T.jSPlugin=Ze,typeof T.params.handleInitSuccess=="function"&&T.params.handleInitSuccess({retcode:0,id:T.params.id,type:"handleInitSuccess"}),me({meta:{retcode:200,msg:"初始化成功"}}),w.url.indexOf("rec")!=-1&&T.Theme.changeTheme(T.isMobile?"mobileRec":"pcRec")},Oe=new Promise(re);return Oe}},{key:"_getRealUrlPromise",value:function(w,T){var R=this;console.log("获取播放地址 url => ".concat(T," ").concat(this.accessToken)),console.log("开始获取wsurl"),this.startGetWsUrlTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:222,text:"startGetWsUrl",isVersion2Available:en()?1:0});var N=this.env.domain;this.env&&(N=this.env.domain);var z=function(de,se){var re="",Oe=N+"/api/lapp/live/url/ezopen",be=new FormData;be.append("ezopen",T),be.append("isFlv",!1),be.append("userAgent",window.navigator.userAgent),be.append("isHttp",!1),be.append("accessToken",w),fetch(Oe,{method:"POST",body:be}).then(function(me){return me.json()}).then(function(me){if(me.code==200||me.retcode==0){var ge="",Ze="";me.ext&&me.ext.token?(re+=me.data,Ze=me.ext.token,ge=me.data):me.data&&me.data.token&&(re+=me.data.url,Ze=me.data.token,ge=me.data.url);var fe=T.indexOf("live")!==-1?"live":"playback";fe==="live"?re=re+"&ssn="+Ze+"&auth=1&biz=4&cln=100":re=re+"&ssn="+Ze+"&auth=1&cln=100",console.log(re);var B=d("checkCode",re);if(B&&(typeof R.jSPlugin.decoderVersion!="undefined"&&R.jSPlugin.decoderVersion==="2.0"?R.validateCode=B:(console.log("设置密钥",B),R.jSPlugin.JS_SetSecretKey(0,B))),re.indexOf("playback")!==-1){var te=d("begin",ge)||d("begin",T),oe=d("end",ge)||d("end",T);if(te)re=re.replace("&begin="+d("begin",ge),"&begin="+U(te,"000000")),d("begin",re)||(re+="&begin="+U(te,"000000"));else{var Ie=new Date;re=re+"&begin="+Ie.Format("yyyyMMdd")+"T000000Z"}if(oe?(re=re.replace("&end="+d("end",ge),"&end="+U(oe,"235959")),d("end",re)||(re+="&end="+U(oe,"235959"))):re=re+"&end="+U(d("begin",re).substr(0,8),"235959"),d("stream",ge)||(re=re.replace("stream","&stream")),T.indexOf(".cloud")!==-1){var Ge=function(ii){if(ii.code==200){var ti=[];if(ii.data&&ii.data.files&&ii.data.files.length>0){var di=ii.data.files,tr=new Date().getTime(),Ve=ii.data.isAll;if(Ve){ti=Sn(di);var Mt=JSON.stringify(ti).replace("\\","");re+="&recSlice="+Mt.replace("\\","")+"&r="+Math.random(),de(re)}else{var jt=function Hn(){function pi(hi){if(hi.data&&hi.data.files&&hi.data.files.length>0)if(hi.data.isAll==!1)hi.data.files&&(di=di.concat(hi.data.files)),tr=hi.data.nextFileTime>0?hi.data.nextFileTime:new Date().getTime(),Hn();else{ti=Sn(di);var yi=JSON.stringify(ti).replace("\\","");re+="&recSlice="+yi.replace("\\","")+"&r="+Math.random(),de(re)}else{ti=Sn(di);var yi=JSON.stringify(ti).replace("\\","");re+="&recSlice="+yi.replace("\\","")+"&r="+Math.random(),de(re)}}kt.startTime=tr,A(qt,"POST",kt,"",pi)};jt()}}else se({retcode:-1,msg:"未找到录像片段"})}else se({retcode:-1,msg:"未找到录像片段"});function Sn(Hn){var pi=[];return Hn.forEach(function(hi,yi){pi.length==0||hi.downloadPath!==pi[pi.length-1].downloadPath?pi.push({downloadPath:hi.downloadPath,ownerId:hi.ownerId,iStorageVersion:hi.iStorageVersion,videoType:hi.videoType,iPlaySpeed:0,startTime:hi.startTime,endTime:hi.endTime}):pi[pi.length-1].endTime=hi.endTime}),pi}},nt=ue(d("begin",re)),at=ue(d("end",re)),St=d("serial",re),zt=d("chn",re),qt=N+"/api/lapp/video/by/time",kt={accessToken:R.accessToken,recType:1,deviceSerial:St,channelNo:zt,startTime:nt,endTime:at,version:"2.0"};A(qt,"POST",kt,"",Ge)}else if(T.indexOf("alarmId")!==-1){var On=function(jt){if(jt.code==200){var Sn=[];if(jt.data){Sn=pi([jt.data]);var Hn=JSON.stringify(Sn).replace("\\","");re+="&recSlice="+Hn.replace("\\",""),console.log("realUrl",re,jt.data.recType),jt.data.recType==1?re=re.replace("/playback","/cloudplayback"):re=re.replace("/cloudplayback","/playback"),de(re)}}function pi(hi){var yi=[];return hi.forEach(function(nr,zl){yi.length==0||nr.downloadPath!==yi[yi.length-1].downloadPath?yi.push({downloadPath:nr.downloadPath,ownerId:nr.ownerId,iStorageVersion:nr.iStorageVersion,videoType:nr.videoType,iPlaySpeed:0,startTime:nr.startTime,endTime:nr.endTime}):yi[yi.length-1].endTime=nr.endTime}),console.log("downloadPathArr",yi),yi}};console.log("进入alarmId回放");var Wn=d("alarmId",re),nt=ue(d("begin",re)),at=ue(d("end",re)),St=d("serial",re),zt=d("chn",re),qt=N+"/api/lapp/video/by/id",kt={accessToken:R.accessToken,deviceSerial:St,channelNo:zt,alarmId:Wn};A(qt,"POST",kt,"",On)}else de(re)}else de(re)}else R.Theme&&R.Theme.setDisabled(!0),R.pluginStatus.loadingClear(),R.pluginStatus.loadingSetText({text:me.msg,color:"red"}),typeof R.params.handleError=="function"&&R.params.handleError({retcode:me.code,msg:me.msg,id:R.params.id,type:"handleError"}),se(me)})};return new Promise(function(pe,de){return z(pe,de)});function U(pe,de){var se=/^[0-9]{8}T[0-9]{6}Z$/;if(se.test(pe))return pe;if(/[0-9]{8,14}/.test(pe)){var re=6-(14-pe.length),Oe=de.length,be=pe+de.substring(re,Oe);return be.slice(0,8)+"T"+be.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}function ue(pe){var de=pe.slice(0,4),se=pe.slice(4,6),re=pe.slice(6,8),Oe=pe.slice(9,11),be=pe.slice(11,13),me=pe.slice(13,15),ge=de+"-"+se+"-"+re+" "+Oe+":"+be+":"+me;return new Date(ge.replace(/-/g,"/")).getTime()}}},{key:"_pluginPlay",value:function(w,T,R){var N=this;if(console.log("执行播放 _pluginPlay",w),!w)return!1;function z(de){var se=de.split("?")[0].replace("/live","").replace("/playback",""),re=(de.indexOf("/live")===-1?de.indexOf("cloudplayback")!==-1?"/cloudplayback?":"/playback?":"/live?")+de.split("?")[1];return re.indexOf("/playback")!==-1&&(re=re.replace("stream=2","stream=1")),{websocketConnectUrl:se,websocketStreamingParam:re}}var U=z(w).websocketConnectUrl;this.env&&this.env.wsUrl&&(U=this.env.wsUrl),this.gotWsUrlTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:223,d:this.gotWsUrlTime-this.startGetWsUrlTime,text:"getWsUrlSuccess",isVersion2Available:en()?1:0});var ue={playURL:z(w).websocketStreamingParam};console.log("播放前 stop 阶段 结束"),this.isStoping=!1;var pe=Date.now();console.log("执行播放 ... this.jSPlugin.JS_Play at ",pe),this.jSPlugin.JS_Play(U,ue,0).then(function(){if(console.log("执行播放 ... this.jSPlugin.JS_Play 播放成功",U,ue),console.log("执行播放耗时 ",Date.now()-pe),N.isStoping){console.log("现在在播放前 stop 阶段,此次应为无效播放成功触发。不执行后续回调, 此次耗时无效");return}if(N.validateCode&&typeof N.jSPlugin.decoderVersion!="undefined"&&N.jSPlugin.decoderVersion==="2.0"&&N.jSPlugin.JS_SetSecretKey(0,N.validateCode),N.pluginStatus.loadingClear(),N.pluginStatus.setPlayStatus({play:!0,loading:!1}),N.Theme){N.Theme.setDecoderState({play:!0});var de=E.findIndex(N.Theme.themeData.footer.btnList,function(se){return se.iconId==="sound"&&se.isrender===1&&se.defaultActive===1})>-1;N.audio=de}N.audio&&setTimeout(function(){N.openSound()},500),typeof N.params.handleSuccess=="function"&&N.params.handleSuccess({retcode:0,id:N.params.id,type:"handleSuccess"}),T(ue),N.Monitor.dclog({url:N.url,action:211,d:new Date().getTime()-N.playStartTime,text:"startPlaySuccess"}),N.Monitor.playLog({Enc:N.url.indexOf("@")===-1?0:1,PlTp:N.url.indexOf("back")===-1?1:2,Via:2,ErrCd:0,Cost:new Date().getTime()-N.playStartTime,Serial:S(N.url).deviceSerial,Channel:S(N.url).channelNo,Ver:en()?"v7.0.0":"v6.0.0"})},function(de){console.log("err",de);var se="播放失败,请检查设备及客户端网络",re=-1;if(N.jSPlugin.bPlay)return!1;if(de&&de.errorCode){var Oe=N.errorHander.matchErrorInfo(de.errorCode);N.Theme&&N.Theme.setDisabled(!0),Oe&&Oe.msg?se=Oe.msg:Oe&&Oe.description?se=Oe.description:se="播放失败,请检查设备及客户端网络",re=de.errorCode}N.pluginStatus.loadingClear(),N.pluginStatus.loadingSetText({text:se,color:"red"}),typeof N.params.handleError=="function"&&N.params.handleError({retcode:re,msg:se,id:N.params.id,type:"handleError"}),R(),N.Monitor.dclog({url:N.url,action:411,d:new Date().getTime()-N.playStartTime,text:"startPlayError"}),N.Monitor.playLog({Enc:N.url.indexOf("@")===-1?0:1,PlTp:N.url.indexOf("back")===-1?1:2,Via:2,ErrCd:re,Cost:-1,Serial:S(N.url).deviceSerial,Channel:S(N.url).channelNo,Ver:en()?"v7.0.0":"v6.0.0"})})}},{key:"_play",value:function(w){var T=this;console.log("执行播放 play options.url =>",w),this.pluginStatus.setPlayStatus({play:!1,loading:!0}),this.playStartTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:1,d:new Date().getTime()-this.initTime,text:"startPlay"}),w&&(typeof w=="string"&&(this.url=w),typeof w.url=="string"&&(this.url=w.url),typeof w.accessToken=="string"&&(this.accessToken=w.accessToken),this.Theme&&(typeof w.url=="string"||typeof w.accessToken=="string")&&this.Theme.getDeviceInfo());var R=new Promise(function(N,z){console.log("执行 播放前 stop"),T.isStoping=!0,T.jSPlugin.JS_Stop(0).then(function(){console.log("播放前 stop 执行成功 this.url => ".concat(T.url," ").concat(T.accessToken)),T._getRealUrlPromise(T.accessToken,T.url).then(function(U){T._pluginPlay(U,function(ue){N(!0)},function(){return z(!1)})}).catch(function(U){var ue=U.msg?U.msg:"播放失败,请检查设备及客户端网络";T.Theme&&T.Theme.setDisabled(!0),T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:ue,color:"red"}),typeof T.params.handleError=="function"&&T.params.handleError({retcode:U.oError?U.oError.errorCode:-1,msg:ue,id:T.params.id,type:"handleError"}),z({retcode:U.oError?U.oError.errorCode:-1,msg:ue,id:T.params.id,type:"handleError"})})})});return R}},{key:"stop",value:function(){var w=this;return this.pluginStatus.setPlayStatus({loading:!0}),this.reSetTheme(),this.jSPlugin.JS_Stop(0).then(function(){console.log("停止成功"),w.pluginStatus.setPlayStatus({play:!1,loading:!1}),w.Theme&&w.Theme.setDecoderState({play:!1})})}},{key:"changeVideoLevel",value:function(w){var T=this,R=this.url,N=w?R.replace(".live",".hd.live"):R.replace(".hd.live",".live");this.jSPlugin.playURL=w?this.jSPlugin.playURL.replace("stream=2","stream=1"):this.jSPlugin.playURL.replace("stream=1","stream=2"),console.log("changeVideoLevel",N,this.jSPlugin.playURL),this.url=N;var z=new Promise(function(U,ue){T.pause().then(function(){console.log("暂停成功"),T.resume().then(function(pe){console.log("恢复成功")})}).catch(function(){console.log("暂停失败"),T.resume().then(function(pe){console.log("恢复成功")})})});return z}},{key:"reSetTheme",value:function(){this.Theme&&this.Theme.Ptz&&(this.Theme.setDecoderState({pantile:!1}),this.Theme.Ptz.hide()),this.Theme&&this.Theme.decoderState.state.recordvideo&&this.Theme.setDecoderState({recordvideo:!1}),this.Theme&&this.Theme.decoderState.state.zoom&&(this.Zoom.stopZoom(),this.Theme.setDecoderState({zoom:!1})),this.Theme&&this.Theme.decoderState.state.talk&&(this.stopTalk(),this.Theme.setDecoderState({talk:!1})),this.Theme&&this.Theme.Rec&&!this.Theme.isMobile&&this.Theme.Rec.datepickerHide(),this.Theme&&this.Theme.Rec&&(this.Theme.changeRecSpeed(1),this.Theme.nextRate=1,this.speed=1,this.Theme.setDecoderState({speed:!1}))}},{key:"_changePlayUrl",value:function(w){var T=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};console.log("_changePlayUrl"),console.log(w),this.reSetTheme(),this.getDeviceCapacity({accessToken:w.accessToken,deviceSerial:w.deviceSerial});var N=this.url,z=ue(N,w);w.accessToken&&(this.accessToken=w.accessToken),this.url=z,R(),this.pluginStatus.loadingStart(this.id),this.pluginStatus.loadingSetText({text:"加载中,请稍后"});var U=new Promise(function(pe,de){var se={url:z};return w.accessToken&&(se.accessToken=w.accessToken),console.log("切换播放地址 参数 ",se),T.play(se).then(function(){console.log("切换播放地址 play 执行成功 ",T.url,T.accessToken),T.Theme&&T.Theme.decoderState.state.webExpend&&T.Theme.webExpend(),T.Theme&&T.Theme.decoderState.state.expend&&T.Theme.expend(),w.type?w.type=="rec"||w.type=="cloud.rec"?T.Theme.changeTheme(T.isMobile?"mobileRec":"pcRec"):T.Theme.changeTheme(T.isMobile?"mobileLive":"pcLive"):T.url.indexOf(".rec")>-1?T.Theme.changeTheme(T.isMobile?"mobileRec":"pcRec"):T.Theme.changeTheme(T.isMobile?"mobileLive":"pcLive"),w&&w.begin&&w.deviceSerial&&T.Theme.Rec.setDatepickerDate(w.begin),T.Theme.setDisabled(!1),pe(z)}).catch(function(re){de(z),re&&re.msg&&(T.Theme&&T.Theme.setDisabled(!0),T.pluginStatus.loadingClear(),T.pluginStatus.loadingSetText({text:re.msg,color:"red"}))})});function ue(pe,de){if(de.url)return de.url;console.log("--------------matchInitUrl",pe);var se=pe.split("/")[4].split(".")[pe.split("/")[4].split(".").length-1].split("?")[0];se==="rec"&&pe.indexOf(".cloud.rec")!==-1&&(se="cloud.rec"),de.type&&(se=de.type);var re=pe.split("/")[3];de.deviceSerial&&(re=de.deviceSerial);var Oe=pe.split("/")[4].split(".")[0];de.channelNo&&(Oe=de.channelNo);var be=pe.split("/")[2].split("@").length===2?pe.split("/")[2].split("@")[0]:"";typeof de.validCode!="undefined"&&(be=de.validCode);var me=typeof de.hd=="undefined"?pe.indexOf(".hd")!==-1:de.hd,ge="ezopen://".concat(be?"".concat(be,"@"):"","open.ys7.com/").concat(re,"/").concat(Oe).concat(me?".hd":"",".").concat(se);return se==="live"||(ge="ezopen://".concat(be?"".concat(be,"@"):"","open.ys7.com/").concat(re,"/").concat(Oe,".").concat(se),de.begin&&de.end?ge+="?begin=".concat(de.begin,"&end=").concat(de.end):de.begin?ge+="?begin=".concat(de.begin):d("begin",pe)&&(ge+="?begin=".concat(d("begin",pe)))),ge}return U}},{key:"getOSDTime",value:function(){var w=this,T=new Promise(function(R,N){w.jSPlugin.JS_GetOSDTime(0).then(function(z){R({code:0,retcode:0,data:z}),typeof w.params.getOSDTimeCallBack=="function"&&w.params.getOSDTimeCallBack({id:w.id,type:"getOSDTime",code:0,data:z})}).catch(function(z){N({code:-1,retcode:-1,data:z}),typeof w.params.getOSDTimeCallBack=="function"&&w.params.getOSDTimeCallBack({id:w.id,type:"getOSDTime",code:-1,data:-1})})});return T}},{key:"capturePicture",value:function(w){var T=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,N=this.jSPlugin.JS_CapturePicture(0,w,"JPEG",R,!!R);return c(N)?(typeof this.params.capturePictureCallBack=="function"&&N.then(function(){T.params.capturePictureCallBack({id:T.id,type:"capturePicture",code:0})}).catch(function(){T.params.capturePictureCallBack({id:T.id,type:"capturePicture",code:-1})}),N):new Promise(function(z){z(N)})}},{key:"startSave",value:function(w){var T=this,R=this.jSPlugin.JS_StartSave(0,w);return c(R)?(typeof this.params.startSaveCallBack=="function"&&R.then(function(){T.params.startSaveCallBack({id:T.id,type:"startSave",code:0})}).catch(function(){T.params.startSaveCallBack({id:T.id,type:"startSave",code:-1})}),R):(this.Theme&&this.Theme.setDecoderState({recordvideo:!0}),new Promise(function(N){N(R)}))}},{key:"stopSave",value:function(){var w=this,T=this.jSPlugin.JS_StopSave(0);return c(T)?(typeof this.params.startSaveCallBack=="function"&&T.then(function(){w.params.stopSaveCallBack({id:w.id,type:"stopSave",code:0})}).catch(function(){w.params.stopSaveCallBack({id:w.id,type:"stopSave",code:-1})}),T):(this.Theme&&this.Theme.setDecoderState({recordvideo:!1}),new Promise(function(R){R(T)}))}},{key:"openSound",value:function(){var w=this.jSPlugin.JS_OpenSound(0);return console.log("打开声音",w),c(w)?w:(this.Theme&&this.Theme.setDecoderState({sound:!0}),typeof this.params.openSoundCallBack=="function"&&this.params.openSoundCallBack({id:this.id,type:"openSound",code:w}),new Promise(function(T){T(w)}))}},{key:"closeSound",value:function(){var w=this.jSPlugin.JS_CloseSound(0);return c(w)?w:(this.Theme&&this.Theme.setDecoderState({sound:!1}),typeof this.params.closeSoundCallBack=="function"&&this.params.closeSoundCallBack({id:this.id,type:"closeSound",code:w}),new Promise(function(T){T(w)}))}},{key:"enableZoom",value:function(){var w=this.jSPlugin.JS_EnableZoom(0);return c(w)?w:new Promise(function(T){T(w)})}},{key:"closeZoom",value:function(){var w=this.jSPlugin.JS_DisableZoom(0);return c(w)?w:new Promise(function(T){T(w)})}},{key:"setPoster",value:function(w){en()?document.getElementById("".concat(this.id))&&(document.getElementById("".concat(this.id)).style.backgroundImage="url(".concat(w,")"),document.getElementById("".concat(this.id)).style.backgroundSize="100% 100%"):document.getElementById("".concat(this.id,"canvas0"))&&(document.getElementById("".concat(this.id,"canvas0")).style.backgroundImage="url(".concat(w,")"),document.getElementById("".concat(this.id,"canvas0")).style.backgroundSize="cover")}},{key:"reSize",value:function(w,T){var R=0,N=0;if(this.params.height=T,this.params.width=w,this.Theme&&this.Theme.isNeedRenderHeader&&document.getElementById("".concat(this.id,"-headControl"))&&(R=parseInt(document.getElementById("".concat(this.id,"-headControl")).style.height,10)),this.Theme&&this.Theme.isNeedRenderTimeLine&&!this.isMobile&&(N=48),T=T-R-N,this.width=w,this.height=T,document.getElementById("".concat(this.id,"-wrap")).style="width:".concat(w,"px;position:relative;display:inline-block;vertical-align: bottom;"),document.getElementById("".concat(this.id)).style.width=w+"px",document.getElementById("".concat(this.id)).style.height=T+"px",this.jSPlugin&&this.jSPlugin.bPlay)this.jSPlugin&&(this.jSPlugin.iHeight=T,this.jSPlugin.iWidth=w),this.jSPlugin.JS_Resize(w,T);else{document.getElementById("".concat(this.id,"-player"))&&(document.getElementById("".concat(this.id,"-player")).width=w,document.getElementById("".concat(this.id,"-player")).height=T,document.getElementById("".concat(this.id,"-player")).style.width=w+"px",document.getElementById("".concat(this.id,"-player")).style.height=T+"px");var z=1;if(document.getElementById("".concat(this.id,"canvas0"))){var U=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);U&&(z=2),document.getElementById("".concat(this.id,"canvas0")).style.width=w*z+"px",document.getElementById("".concat(this.id,"canvas0")).style.height=T*z+"px",document.getElementById("".concat(this.id,"canvas0")).width=w*z,document.getElementById("".concat(this.id,"canvas0")).height=T*z,document.getElementById("".concat(this.id,"canvas0")).parentNode.style.width=w*z+"px",document.getElementById("".concat(this.id,"canvas0")).parentNode.style.height=T*z+"px",document.getElementById("".concat(this.id,"canvas_draw0")).height=T*z}this.jSPlugin&&(this.jSPlugin.iHeight=T*z,this.jSPlugin.iWidth=w*z)}}},{key:"fast",value:function(w){var T=this,R=this.speed;if(w)var N=this.jSPlugin.JS_Fast(0,w);else{if(R===1)R=2;else if(R===2)R=4;else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"播放速度最大为4倍速度",retcode:1003,id:this.id,type:"handleError"}),new Promise(function(U,ue){T.speed=R,ue({code:-1,data:{speed:R,result:"播放速度最大为4倍速度"}})});var N=this.jSPlugin.JS_Fast(0)}return new Promise(function(z){T.speed=R,z({code:0,data:{speed:R,result:N}})})}},{key:"slow",value:function(){var w=this,T=this.speed;if(T===4)T=2;else if(T===2)T=1;else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"播放速度最小为1倍速度",retcode:1003,id:this.id,type:"handleError"}),new Promise(function(N,z){w.speed=T,z({code:-1,data:{speed:T,result:"播放速度最小为1倍速度"}})});var R=this.jSPlugin.JS_Slow(0);return new Promise(function(N){w.speed=T,N({code:0,data:{speed:T,result:R}})})}},{key:"seek",value:function(w,T){var R=this.url,N=(d("begin",R)||new Date().Format("yyyyMMdd")).substr(0,8);if(T=z(N,"235959"),w.length===6)w=z(N,w);else if(w.length===16){if(w.substr(0,8)!==N)return typeof this.params.handleError=="function"&&this.params.handleError({msg:"seek时间不能跨日期",retcode:-1,id:this.id,type:"handleError"}),!1}else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"seek时间格式错误",retcode:-1,id:this.id,type:"handleError"}),!1;function z(ue,pe){var de=/^[0-9]{8}T[0-9]{6}Z$/;if(de.test(ue))return ue;if(/[0-9]{8,14}/.test(ue)){var se=6-(14-ue.length),re=pe.length,Oe=ue+pe.substring(se,re);return Oe.slice(0,8)+"T"+Oe.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}var U=this.jSPlugin.JS_Seek(0,w,T);return console.log("seekRT",U),c(U)?U:new Promise(function(ue){ue(U)})}},{key:"fullScreen",value:function(){var w=this,T=m(document.getElementById("".concat(this.id)));T.then(function(N){console.log("全屏promise",window.screen.availWidth),w.jSPlugin.JS_Resize(window.screen.availWidth,window.screen.availHeight),typeof w.params.fullScreenCallBack=="function"&&w.params.fullScreenCallBack({id:w.id,type:"fullScreen",code:0})});var R=function(){var z=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;z||w.jSPlugin.JS_Resize(w.width,w.height),typeof w.params.fullScreenChangeCallBack=="function"&&w.params.fullScreenChangeCallBack({id:w.id,type:"fullScreen",code:z})};["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(N){window.addEventListener(N,function(z){return R()})})}},{key:"cancelFullScreen",value:function(){var w=this,T=_();T.then(function(R){console.log("取消全屏",R,w.jSPlugin),w.jSPlugin.JS_Resize(w.width,w.height)})}},{key:"startTalk",value:function(){this.Talk.startTalk()}},{key:"stopTalk",value:function(){this.Talk.stopTalk()}},{key:"destroy",value:function(){var w=this.jSPlugin.JS_DestroyWorker(0);return this.Theme&&(this.Theme=null,window.EZUIKit[this.params.id].state.EZUIKitPlayer.themeInit=!1),c(w)?w:new Promise(function(T){T(w)})}},{key:"getDeviceCapacity",value:function(w){var T=this,R=this.env.domain;this.env&&(R=this.env.domain);var N=R+"/api/lapp/device/capacity",z=function(pe){pe.code==200&&pe.data&&(T.capacity=pe.data)},U=w||{accessToken:this.accessToken,deviceSerial:S(this.url).deviceSerial};A(N,"POST",U,"",z)}},{key:"pause",value:function(){var w=this;return new Promise(function(T,R){w.jSPlugin.JS_CloseSound(0),w.jSPlugin.JS_Pause(0,function(N){w.setPoster(N.base64)}).then(function(N){w.Theme&&w.Theme.setDecoderState({play:!1}),T()}).catch(function(N){console.log(N),R(N)})})}},{key:"_resume",value:function(w){var T=this;return new Promise(function(R,N){T.pluginStatus.setPlayStatus({play:!1,loading:!0}),T.jSPlugin.JS_Resume(w).then(function(z){if(setTimeout(function(){T.url.indexOf(".rec")!==-1&&T.speed!=1&&T.jSPlugin.JS_Speed(T.speed)},500),T.Theme){T.Theme.setDecoderState({play:!0,speed:T.speed});var U=T.Theme.decoderState.state.sound;U&&setTimeout(function(){T.openSound()},500)}R(z)}).catch(function(z){console.log("resume err",z),N(z)})})}}]),Z}(),Xe=null;function Pt(Z,H,w,T){return new WebControl({szPluginContainer:Z,iServicePortStart:14510,iServicePortEnd:14519,cbConnectSuccess:H,cbConnectError:w,cbConnectClose:T})}function Rt(){Xe!=null&&(Xe.JS_DestroyWnd().then(function(){console.log("JS_DestroyWnd")},function(){}),Xe.JS_StopService("window").then(function(){Xe.JS_Disconnect().then(function(){console.log("JS_Disconnect")},function(){})}))}function Et(Z){Z.responseMsg.eventName,console.log(Z.responseMsg)}function Fn(){Xe.JS_SetWindowControlCallback({cbIntegrationCallBack:Et}),Xe.JS_StartService("window",{dllPath:"./chain/cloudTransform.dll"}).then(function(){Xe.JS_CreateWnd("playWnd",900,500).then(function(){console.log("JS_CreateWnd success")})})}function Qn(){console.log("cbConnectError"),Xe=null,console.error("确认本地进程是否已安装并开启成功!")}function ci(Z){console.log("cbConnectClose"),Xe=null}window.onscroll=function(){Xe!=null&&Xe.JS_Resize(900,500)},window.onresize=function(){Xe!=null&&Xe.JS_Resize(900,500)},window.onunload=function(){try{Xe.JS_HideWnd(),Rt()}catch(Z){console.error(Z)}},window.onpagehide=function(){try{Xe.JS_HideWnd()}catch(Z){console.error(Z)}};var li=function(){function Z(H){var w=this;i(this,Z),o(this,"changeModel",function(T,R){var N=w;w.switchVideo=parseInt(T),Xe&&Xe.JS_RequestInterface({funcName:"ChangeModel",arguments:encodeURI(JSON.stringify({model:T}))}).then(function(z){T==0?N.play({deviceSerial:R.deviceSerial,channelNo:R.channelNo,validateCode:R.validateCode}):N.play({deviceSerial:R.deviceSerial,channelNo:R.channelNo,validateCode:R.validateCode,startTime:R.startTime,endTime:R.endTime})})}),o(this,"init",function(T){var R,N=w;if(!T.appKey||!T.accessToken){N.showTips(!1,"请输入appkey和token");return}typeof T.appKey!="undefined"&&(w.appKey=T.appKey),typeof T.accessToken!="undefined"&&(w.accessToken=T.accessToken),typeof T.platformId!="undefined"&&(w.platformId=T.platformId);var z=(R={layout:+N.layout,userName:"",waterMark:""},o(R,"waterMark","1"),o(R,"iWndType",0),o(R,"intelligenceEnable",1),o(R,"isRecord",1),o(R,"isSetPos",1),o(R,"motionDetectEnable",0),o(R,"playBackAlarmOverlyingEnable",0),o(R,"response",{code:0,message:null,data:{appKey:T.appKey,ezvizToken:T.accessToken,videoLevel:0,logLevel:3,showMainTool:1,showSubTool:1,waterMark:"1",userName:"openteam",platformId:T.platformId}}),R);console.log("初始化入参",z),Xe.JS_RequestInterface({funcName:"Init",arguments:encodeURI(JSON.stringify(z))}).then(function(U){console.log(U.responseMsg),N.showTips(!0,"视频初始化成功!")})}),o(this,"play",function(T){var R=w;if(!(!T.deviceSerial||!T.channelNo)){typeof T.deviceSerial!="undefined"&&(w.deviceSerial=T.deviceSerial),typeof T.channelNo!="undefined"&&(w.channelNo=T.channelNo),typeof T.startTime!="undefined"&&T.startTime&&(w.startTime=T.startTime+" 00:00:00"),typeof T.endTime!="undefined"&&T.endTime&&(w.endTime=T.endTime+" 23:59:59"),typeof T.validateCode!="undefined"&&T.validateCode&&(w.validateCode=T.validateCode);var N={response:{code:0,message:null,data:{deviceSerial:T.deviceSerial,channelCode:T.channelNo,channelNo:+T.channelNo,codeIsEncrypt:0,validateCode:T.validateCode,deviceClass:R.deviceClass,deviceType:"10222",channelId:"2222222222",channelName:"channelNameTest",storeName:"storeName",storeId:"storeid",startTime:w.startTime,endTime:w.endTime}}};R.deviceClass==="1"?(N.response.data.channelCode=R.channelNo,N.response.data.platformId=R.platformId):N.response.data.channelNo=+R.channelNo,w.switchVideo===1&&(w.startTime&&(N.response.data.startTime=w.startTime),w.endTime&&(N.response.data.endTime=w.endTime)),console.log("预览/回放入参",N),Xe.JS_RequestInterface({funcName:w.switchVideo===0?"StartPreview":"StartPlayback",arguments:encodeURI(JSON.stringify(N))}).then(function(z){console.log(z.responseMsg),R.showTips(!0,"预览/回放成功!")}).catch(function(z){console.log("开始播放:",z)})}}),o(this,"showCBInfo",function(T){w.callbackMessage=w.callbackMessage+JSON.stringify(T)+` `,console.log(w.callbackMessage)}),o(this,"showTips",function(T,R){}),o(this,"hideVideo",function(){Xe.JS_HideWnd()}),o(this,"showVideo",function(){Xe.JS_ShowWnd()}),o(this,"GetLayout",function(){var T=null;Xe.JS_RequestInterface({funcName:"GetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:T}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"capturePicture",function(T){var R=null;Xe.JS_RequestInterface({funcName:"CaptureJPGEx",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:R}}))}).then(function(N){console.log(JSON.stringify(N.responseMsg)),console.log(N.responseMsg)})}),o(this,"stop",function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;Xe.JS_RequestInterface({funcName:"StopPlay",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"setLayout",function(T){var R=parseInt(T);if(isNaN(R)||R==0||R>=13){console.log("不支持实际布局大于16的窗口数");return}w.layout=R,Xe.JS_RequestInterface({funcName:"SetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{layout:R}}}))}).then(function(N){console.log(JSON.stringify(N.responseMsg)),console.log(N.responseMsg)})}),o(this,"setSoundVolumn",function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,R=arguments.length>1?arguments[1]:void 0;Xe.JS_RequestInterface({funcName:"SoundVolumn",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T),volumn:parseInt(R)}}}))}).then(function(N){console.log(JSON.stringify(N.responseMsg)),console.log(N.responseMsg)})}),o(this,"testMute",function(){var T=parseInt(prompt("请输入窗口ID"));Xe.JS_RequestInterface({funcName:"MuteOnOff",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:T}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"testSelectWnd",function(){var T=parseInt(prompt("请输入窗口ID"));Xe.JS_RequestInterface({funcName:"SelectPlayWnd",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:T}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"setVideoLevel",function(T,R){Xe.JS_RequestInterface({funcName:"SetVideoLevel",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:w.switchVideo==1?0:parseInt(T),level:parseInt(R,10)}}}))}).then(function(N){console.log(JSON.stringify(N.responseMsg)),console.log(N.responseMsg)})}),o(this,"startTalk",function(T){Xe.JS_RequestInterface({funcName:"StartTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"stopTalk",function(T){Xe.JS_RequestInterface({funcName:"StopTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"startSave",function(T){Xe.JS_RequestInterface({funcName:"StartRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),o(this,"stopSave",function(T){Xe.JS_RequestInterface({funcName:"StopRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(T)}}}))}).then(function(R){console.log(JSON.stringify(R.responseMsg)),console.log(R.responseMsg)})}),this.appKey="b9a3ad6e8026410095d8252169fa430a",this.accessToken="at.2vtum8873rrcwbrv431qb6pn94dkbv23-8dw2twn355-1u3x014-wrthellzk",this.deviceSerial="C33368372",this.channelNo="1",this.validateCode="",this.deviceClass="0",this.platformId="",this.startTime="",this.endTime="",this.layout=2,this.switchVideo=0,this.tips="调用成功",this.successTip=!1,this.tipsShow=!1,Xe=Pt("playWnd",Fn,Qn,ci)}return a(Z,[{key:"alarmMsg",value:function(){var w={request:{body:{alarmTypes:[10800,0,0,0,0],channelId:"066dde0465dd4abaab6afe355baf9d0b",endTime:"1621007999000",startTime:"1620921600000"},callBack:"GetAlarmMsgOrders",majorKey:"",method:"POST",storeId:"",url:"/videoplugin/message/getMessageByTypes"},response:{code:0,message:null,data:[{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620921217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920678e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919513e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919483e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919333e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918913e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918305e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917858e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917658e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917244e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917064e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916668e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916529e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916343e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916081e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915825e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915394e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915197e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914971e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914644e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914533e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914457e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914376e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914284e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913431e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912354e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912275e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912093e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091189e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911839e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091176e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911682e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091127e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911184e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910982e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910781e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910727e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910677e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910647e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910588e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910544e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091041e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091035e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910278e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910124e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909939e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909847e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909817e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909664e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909605e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909575e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090912e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909028e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908999e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908969e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908909e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090888e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908835e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090875e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090872e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908652e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908582e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908552e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908456e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090805e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907918e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907758e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907625e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907386e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907292e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907127e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906828e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906797e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906747e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906717e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906632e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906368e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906013e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905946e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905823e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905622e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905511e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905382e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905352e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905322e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905262e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905196e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090515e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904813e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090473e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209047e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904618e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904286e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904173e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904053e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904023e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903854e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903723e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903643e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903573e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903505e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209032e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090312e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902977e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090286e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090277e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902639e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902517e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902373e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090232e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902253e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902198e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902132e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090194e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090185e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901685e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901638e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090152e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901489e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901424e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901271e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901233e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900915e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900774e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900744e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090065e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090044e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900409e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900175e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900134e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900069e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900016e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899908e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899826e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899756e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899467e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899406e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899265e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899211e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089914e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089911e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089905e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898785e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898666e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898507e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898248e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898218e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898088e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089802e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089796e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089785e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089769e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089763e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16208976e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089757e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089754e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897475e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897369e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897339e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897279e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897237e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897207e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897172e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896985e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896874e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896814e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896783e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896621e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896447e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896358e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896307e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896277e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896214e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089604e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895953e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895921e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895868e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089577e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895704e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089559e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089548e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895377e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895347e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895171e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895136e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895017e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894896e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894738e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894539e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894359e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894213e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894183e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893964e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893934e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893754e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893606e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089353e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893452e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893423e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893357e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892904e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892824e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892764e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892479e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892311e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892281e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892209e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892063e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089187e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089181e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891708e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891655e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891585e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891401e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891257e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891178e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891128e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891033e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089094e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890794e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890714e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890469e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890179e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890108e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890041e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889937e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889635e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889451e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889317e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889227e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889139e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888902e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888837e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888767e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888737e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888706e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888633e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888413e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888353e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888323e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888249e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888162e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888e6},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887859e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887776e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887734e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887692e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887619e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887355e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088732e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887289e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887126e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887066e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088697e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886884e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886804e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886728e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886538e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886396e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886334e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886246e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886111e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885956e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885894e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885696e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885514e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885341e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885306e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885276e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885186e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885114e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885037e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884975e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884945e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884911e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088478e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884696e3}],success:!0}};console.log(w),Xe.JS_RequestInterface({funcName:"TransFunctionResult",arguments:encodeURI(JSON.stringify(w))})}}]),Z}();(function(Z,H){t(n)==="object"&&t(n.exports)==="object"?n.exports=Z.document?H(Z,!0):function(w){if(!w.document)throw new Error("EZUIPlayer requires a window with a document");return H(w)}:H(Z)})(typeof window!="undefined"?window:void 0,function(Z,H){var w={Core:s,HLS:C,FLV:M,EZUIKitPlayer:we,EZUIKitHD:li};return Z.EZUIKit=w,w})})(L8,L8.exports);var kCe=L8.exports;const FCe=NCe(kCe);var xw=null;function OCe(n){return xw||(xw=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){return setTimeout(e,16)}).bind(window)),xw(n)}var ww=null;function BCe(n){ww||(ww=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}).bind(window)),ww(n)}function zCe(n){var e=document.createElement("style");return e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n)),(document.querySelector("head")||document.body).appendChild(e),e}function z6(n,e){e===void 0&&(e={});var t=document.createElement(n);return Object.keys(e).forEach(function(i){t[i]=e[i]}),t}function gQ(n,e,t){var i=window.getComputedStyle(n,t||null)||{display:"none"};return i[e]}function NC(n){if(!document.documentElement.contains(n))return{detached:!0,rendered:!1};for(var e=n;e!==document;){if(gQ(e,"display")==="none")return{detached:!1,rendered:!1};e=e.parentNode}return{detached:!1,rendered:!0}}var GCe='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',kC=0,p5=null;function UCe(n,e){n.__resize_mutation_handler__||(n.__resize_mutation_handler__=WCe.bind(n));var t=n.__resize_listeners__;if(!t){if(n.__resize_listeners__=[],window.ResizeObserver){var i=n.offsetWidth,r=n.offsetHeight,a=new ResizeObserver(function(){!n.__resize_observer_triggered__&&(n.__resize_observer_triggered__=!0,n.offsetWidth===i&&n.offsetHeight===r)||I8(n)}),o=NC(n),s=o.detached,l=o.rendered;n.__resize_observer_triggered__=s===!1&&l===!1,n.__resize_observer__=a,a.observe(n)}else if(n.attachEvent&&n.addEventListener)n.__resize_legacy_resize_handler__=function(){I8(n)},n.attachEvent("onresize",n.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",n.__resize_mutation_handler__);else if(kC||(p5=zCe(GCe)),jCe(n),n.__resize_rendered__=NC(n).rendered,window.MutationObserver){var u=new MutationObserver(n.__resize_mutation_handler__);u.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),n.__resize_mutation_observer__=u}}n.__resize_listeners__.push(e),kC++}function VCe(n,e){var t=n.__resize_listeners__;if(t){if(e&&t.splice(t.indexOf(e),1),!t.length||!e){if(n.detachEvent&&n.removeEventListener){n.detachEvent("onresize",n.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",n.__resize_mutation_handler__);return}n.__resize_observer__?(n.__resize_observer__.unobserve(n),n.__resize_observer__.disconnect(),n.__resize_observer__=null):(n.__resize_mutation_observer__&&(n.__resize_mutation_observer__.disconnect(),n.__resize_mutation_observer__=null),n.removeEventListener("scroll",nR),n.removeChild(n.__resize_triggers__.triggers),n.__resize_triggers__=null),n.__resize_listeners__=null}!--kC&&p5&&p5.parentNode.removeChild(p5)}}function HCe(n){var e=n.__resize_last__,t=e.width,i=e.height,r=n.offsetWidth,a=n.offsetHeight;return r!==t||a!==i?{width:r,height:a}:null}function WCe(){var n=NC(this),e=n.rendered,t=n.detached;e!==this.__resize_rendered__&&(!t&&this.__resize_triggers__&&(iR(this),this.addEventListener("scroll",nR,!0)),this.__resize_rendered__=e,I8(this))}function nR(){var n=this;iR(this),this.__resize_raf__&&BCe(this.__resize_raf__),this.__resize_raf__=OCe(function(){var e=HCe(n);e&&(n.__resize_last__=e,I8(n))})}function I8(n){!n||!n.__resize_listeners__||n.__resize_listeners__.forEach(function(e){e.call(n,n)})}function jCe(n){var e=gQ(n,"position");(!e||e==="static")&&(n.style.position="relative"),n.__resize_old_position__=e,n.__resize_last__={};var t=z6("div",{className:"resize-triggers"}),i=z6("div",{className:"resize-expand-trigger"}),r=z6("div"),a=z6("div",{className:"resize-contract-trigger"});i.appendChild(r),t.appendChild(i),t.appendChild(a),n.appendChild(t),n.__resize_triggers__={triggers:t,expand:i,expandChild:r,contract:a},iR(n),n.addEventListener("scroll",nR,!0),n.__resize_last__={width:n.offsetWidth,height:n.offsetHeight}}function iR(n){var e=n.__resize_triggers__,t=e.expand,i=e.expandChild,r=e.contract,a=r.scrollWidth,o=r.scrollHeight,s=t.offsetWidth,l=t.offsetHeight,u=t.scrollWidth,c=t.scrollHeight;r.scrollLeft=a,r.scrollTop=o,i.style.width=s+1+"px",i.style.height=l+1+"px",t.scrollLeft=u,t.scrollTop=c}var Au=function(){return Au=Object.assign||function(n){for(var e,t=1,i=arguments.length;t{let o=e.width;return`M165 0.5 L165.707 -0.207107 L165.414 -0.5 H165 V0.5Z M10 0.5 V-0.5 H9.58579 L9.29289 -0.207107 L10 0.5Z M175 10.5 L174.293 11.2071 L174.586 11.5 H175 V10.5Z M${o} 10.5 H${o+1} V9.5 H${o} V10.5Z M${o} 34.5 V35.5 H${o+1} V34.5 H${o}Z M0 34.5 H-1 V35.5 H0 V34.5Z M0 10.5 L-0.707107 9.79289 L-1 10.0858 V10.5 H0Z M165 -0.5 H10 V1.5 H165 V-0.5Z M175.707 9.79289 L165.707 -0.207107 L164.293 1.20711 L174.293 11.2071 L175.707 9.79289Z M${o} 9.5 H175 V11.5 H${o} V9.5Z M${o+1} 34.5 V10.5 H397 V34.5 H${o+1}Z M0 35.5 H${o} V33.5 H0 V35.5Z M-1 10.5 V34.5 H1 V10.5 H-1Z M9.29289 -0.207107 L-0.707107 9.79289 L0.707107 11.2071 L10.7071 1.20711 L9.29289 -0.207107Z`}),r=Ye(()=>{let s=e.height-156,l=e.width;return`M3.485 ${46.0565+s/2} V${45.8735+s/2} L3.36682 ${45.7337+s/2} L0.5 ${42.343+s/2} V1 H${l-.5} V${42.3431+s/2} L${l-3.367} ${45.7337+s/2} L${l-3.485} ${45.8735+s/2} V${46.0565+s/2} L${l-3.367} ${88.745+s/2} L${l-.5} ${92.135+s/2} V${155+s} H0.5 V${92.135+s/2} L3.36682 ${88.745+s/2} L3.485 ${88.605+s/2} V${88.422+s/2} V${46.0565+s/2}Z`}),a=Ye(()=>`width:${e.width}px;height:${e.height}px;`);return dl(()=>{t.value="__"+sj().uid}),(o,s)=>(Te(),Pe("div",{class:"m-card",style:Ji(a.value)},[O("div",oMe,[O("div",sMe,[(Te(),Pe("svg",{width:n.width,height:"36",viewBox:`0 0 ${n.width} 36`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[O("g",{"clip-path":`url(#clip0_70_69244${t.value})`},[O("rect",{y:"34.5",width:n.width,height:"1",fill:"url(#paint0_linear_70_69244)"},null,8,cMe),O("mask",{id:`path-2-inside-1_70_69244${t.value}`,fill:"white"},[O("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:`M10 0.5H165L175 10.5H${n.width}V34.5H0V10.5L10 0.5Z`},null,8,hMe)],8,dMe),O("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:`M10 0.5H165L175 10.5H${n.width}V34.5H0V10.5L10 0.5Z`,fill:`url(#paint1_linear_70_69244${t.value})`},null,8,fMe),O("path",{d:i.value,fill:`url(#paint2_linear_70_69244${t.value})`,mask:`url(#path-2-inside-1_70_69244${t.value})`},null,8,pMe),s[1]||(s[1]=pp('',4)),O("g",{style:{"mix-blend-mode":"plus-lighter"},"clip-path":`url(#clip1_70_69244${t.value})`},[...s[0]||(s[0]=[pp('',4)])],8,vMe)],8,uMe),O("defs",null,[O("linearGradient",{id:"paint0_linear_70_69244",x1:n.width,y1:"35.5021",x2:"0",y2:"35.5021",gradientUnits:"userSpaceOnUse"},[...s[2]||(s[2]=[O("stop",{"stop-color":"#35A8EB","stop-opacity":"0.1"},null,-1),O("stop",{offset:"1","stop-color":"#30DCFF"},null,-1)])],8,mMe),O("linearGradient",{id:`paint1_linear_70_69244${t.value}`,x1:n.width,y1:"17.5",x2:"7.94819",y2:"17.5",gradientUnits:"userSpaceOnUse"},[...s[3]||(s[3]=[O("stop",{offset:"0.0364889","stop-color":"#35A8EB","stop-opacity":"0.11"},null,-1),O("stop",{offset:"1","stop-color":"#30C1FF","stop-opacity":"0.27"},null,-1)])],8,gMe),O("linearGradient",{id:`paint2_linear_70_69244${t.value}`,x1:"40.8948",y1:"13.5",x2:"40.895",y2:"-6.50005",gradientUnits:"userSpaceOnUse"},[...s[4]||(s[4]=[O("stop",{"stop-color":"#35A8EB","stop-opacity":"0"},null,-1),O("stop",{offset:"1","stop-color":"#30DCFF"},null,-1)])],8,yMe),s[6]||(s[6]=pp('',8)),O("clipPath",{id:`clip0_70_69244${t.value}`},[O("rect",{width:n.width,height:"35",fill:"white",transform:"translate(0 0.5)"},null,8,SMe)],8,_Me),O("clipPath",{id:`clip1_70_69244${t.value}`},[...s[5]||(s[5]=[O("rect",{width:"130",height:"4",fill:"white",transform:"matrix(1 1.64302e-07 -0.0495776 -0.99877 28 4.5)"},null,-1)])],8,bMe)])],8,lMe))]),s[7]||(s[7]=O("img",{class:"m-card-hd-zs1",src:nMe,alt:""},null,-1)),s[8]||(s[8]=O("div",{class:"saoguang"},[O("img",{src:iMe,alt:""})],-1)),O("div",xMe,De(n.title),1)]),O("div",{class:"m-card-bd",style:Ji(a.value)},[O("div",{class:"m-card-bd-bg",style:Ji(a.value)},[(Te(),Pe("svg",{width:n.width,height:n.height,viewBox:`0 0 ${n.width} ${n.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[O("g",TMe,[O("path",{d:r.value,fill:"rgba(26, 57, 77,1)"},null,8,AMe),O("path",{d:r.value,stroke:"url(#paint1_linear_70_69585)"},null,8,CMe)]),s[9]||(s[9]=O("defs",null,[O("linearGradient",{id:"paint1_linear_70_69585",x1:"199",y1:"203.499",x2:"199",y2:"0.499359",gradientUnits:"userSpaceOnUse"},[O("stop",{"stop-color":"#4FC5DD"}),O("stop",{offset:"1","stop-color":"#05839D","stop-opacity":"0"})])],-1))],8,wMe)),s[10]||(s[10]=O("img",{class:"m-card-bd-bottom-left-arrow",src:rMe,alt:""},null,-1)),s[11]||(s[11]=O("img",{class:"m-card-bd-bottom-right-arrow",src:aMe,alt:""},null,-1)),s[12]||(s[12]=O("img",{class:"m-card-bd-middle-left-line",src:oU,alt:""},null,-1)),s[13]||(s[13]=O("img",{class:"m-card-bd-middle-right-line",src:oU,alt:""},null,-1))],4),O("div",MMe,[av(o.$slots,"default")])],4)],4))}};/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT */const rR="161",X1={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Y1={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},EMe=0,sU=1,PMe=2,_Q=1,RMe=2,Cc=3,Zc=0,rl=1,aa=2,_h=0,Pp=1,Mo=2,lU=3,uU=4,SQ=5,Xd=100,LMe=101,IMe=102,cU=103,dU=104,DMe=200,bQ=201,NMe=202,kMe=203,FC=204,OC=205,FMe=206,OMe=207,xQ=208,BMe=209,zMe=210,GMe=211,UMe=212,VMe=213,HMe=214,WMe=0,jMe=1,$Me=2,D8=3,qMe=4,XMe=5,YMe=6,KMe=7,aR=0,ZMe=1,JMe=2,Sh=0,QMe=1,eEe=2,tEe=3,nEe=4,iEe=5,rEe=6,hU="attached",aEe="detached",wQ=300,xv=301,wv=302,BC=303,zC=304,n7=306,Eo=1e3,us=1001,N8=1002,mo=1003,GC=1004,w2=1005,ao=1006,v5=1007,kc=1008,bh=1009,oEe=1010,sEe=1011,oR=1012,TQ=1013,uh=1014,Nu=1015,K9=1016,AQ=1017,CQ=1018,Rp=1020,lEe=1021,y0=1023,uEe=1024,cEe=1025,Lp=1026,Tv=1027,dEe=1028,MQ=1029,hEe=1030,EQ=1031,PQ=1033,Tw=33776,Aw=33777,Cw=33778,Mw=33779,fU=35840,pU=35841,vU=35842,mU=35843,RQ=36196,gU=37492,yU=37496,_U=37808,SU=37809,bU=37810,xU=37811,wU=37812,TU=37813,AU=37814,CU=37815,MU=37816,EU=37817,PU=37818,RU=37819,LU=37820,IU=37821,Ew=36492,DU=36494,NU=36495,fEe=36283,kU=36284,FU=36285,OU=36286,Z9=2300,Av=2301,Pw=2302,BU=2400,zU=2401,GU=2402,pEe=2500,vEe=0,LQ=1,UC=2,IQ=3e3,Ip=3001,mEe=3200,gEe=3201,sR=0,yEe=1,_0="",$r="srgb",bo="srgb-linear",lR="display-p3",i7="display-p3-linear",k8="linear",ma="srgb",F8="rec709",O8="p3",K1=7680,UU=519,_Ee=512,SEe=513,bEe=514,DQ=515,xEe=516,wEe=517,TEe=518,AEe=519,VC=35044,VU="300 es",HC=1035,Fc=2e3,B8=2001;class s1{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let a=0,o=r.length;a>8&255]+es[n>>16&255]+es[n>>24&255]+"-"+es[e&255]+es[e>>8&255]+"-"+es[e>>16&15|64]+es[e>>24&255]+"-"+es[t&63|128]+es[t>>8&255]+"-"+es[t>>16&255]+es[t>>24&255]+es[i&255]+es[i>>8&255]+es[i>>16&255]+es[i>>24&255]).toLowerCase()}function so(n,e,t){return Math.max(e,Math.min(t,n))}function uR(n,e){return(n%e+e)%e}function CEe(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function MEe(n,e,t){return n!==e?(t-n)/(e-n):0}function n9(n,e,t){return(1-t)*n+t*e}function EEe(n,e,t,i){return n9(n,e,1-Math.exp(-t*i))}function PEe(n,e=1){return e-Math.abs(uR(n,e*2)-e)}function REe(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function LEe(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function IEe(n,e){return n+Math.floor(Math.random()*(e-n+1))}function DEe(n,e){return n+Math.random()*(e-n)}function NEe(n){return n*(.5-Math.random())}function kEe(n){n!==void 0&&(HU=n);let e=HU+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function FEe(n){return n*t9}function OEe(n){return n*Cv}function WC(n){return(n&n-1)===0&&n!==0}function BEe(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function z8(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function zEe(n,e,t,i,r){const a=Math.cos,o=Math.sin,s=a(t/2),l=o(t/2),u=a((e+i)/2),c=o((e+i)/2),d=a((e-i)/2),h=o((e-i)/2),f=a((i-e)/2),p=o((i-e)/2);switch(r){case"XYX":n.set(s*c,l*d,l*h,s*u);break;case"YZY":n.set(l*h,s*c,l*d,s*u);break;case"ZXZ":n.set(l*d,l*h,s*c,s*u);break;case"XZX":n.set(s*c,l*p,l*f,s*u);break;case"YXY":n.set(l*f,s*c,l*p,s*u);break;case"ZYZ":n.set(l*p,l*f,s*c,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function q0(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Vr(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const cR={DEG2RAD:t9,RAD2DEG:Cv,generateUUID:T0,clamp:so,euclideanModulo:uR,mapLinear:CEe,inverseLerp:MEe,lerp:n9,damp:EEe,pingpong:PEe,smoothstep:REe,smootherstep:LEe,randInt:IEe,randFloat:DEe,randFloatSpread:NEe,seededRandom:kEe,degToRad:FEe,radToDeg:OEe,isPowerOfTwo:WC,ceilPowerOfTwo:BEe,floorPowerOfTwo:z8,setQuaternionFromProperEuler:zEe,normalize:Vr,denormalize:q0};class on{constructor(e=0,t=0){on.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(so(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),a=this.x-e.x,o=this.y-e.y;return this.x=a*i-o*r+e.x,this.y=a*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class ar{constructor(e,t,i,r,a,o,s,l,u){ar.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,a,o,s,l,u)}set(e,t,i,r,a,o,s,l,u){const c=this.elements;return c[0]=e,c[1]=r,c[2]=s,c[3]=t,c[4]=a,c[5]=l,c[6]=i,c[7]=o,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,a=this.elements,o=i[0],s=i[3],l=i[6],u=i[1],c=i[4],d=i[7],h=i[2],f=i[5],p=i[8],m=r[0],v=r[3],g=r[6],_=r[1],S=r[4],x=r[7],A=r[2],C=r[5],M=r[8];return a[0]=o*m+s*_+l*A,a[3]=o*v+s*S+l*C,a[6]=o*g+s*x+l*M,a[1]=u*m+c*_+d*A,a[4]=u*v+c*S+d*C,a[7]=u*g+c*x+d*M,a[2]=h*m+f*_+p*A,a[5]=h*v+f*S+p*C,a[8]=h*g+f*x+p*M,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8];return t*o*c-t*s*u-i*a*c+i*s*l+r*a*u-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=c*o-s*u,h=s*l-c*a,f=u*a-o*l,p=t*d+i*h+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return e[0]=d*m,e[1]=(r*u-c*i)*m,e[2]=(s*i-r*o)*m,e[3]=h*m,e[4]=(c*t-r*l)*m,e[5]=(r*a-s*t)*m,e[6]=f*m,e[7]=(i*l-u*t)*m,e[8]=(o*t-i*a)*m,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,a,o,s){const l=Math.cos(a),u=Math.sin(a);return this.set(i*l,i*u,-i*(l*o+u*s)+o+e,-r*u,r*l,-r*(-u*o+l*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(Rw.makeScale(e,t)),this}rotate(e){return this.premultiply(Rw.makeRotation(-e)),this}translate(e,t){return this.premultiply(Rw.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Rw=new ar;function NQ(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function J9(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function GEe(){const n=J9("canvas");return n.style.display="block",n}const WU={};function Dp(n){n in WU||(WU[n]=!0,console.warn(n))}const jU=new ar().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),$U=new ar().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),U6={[bo]:{transfer:k8,primaries:F8,toReference:n=>n,fromReference:n=>n},[$r]:{transfer:ma,primaries:F8,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[i7]:{transfer:k8,primaries:O8,toReference:n=>n.applyMatrix3($U),fromReference:n=>n.applyMatrix3(jU)},[lR]:{transfer:ma,primaries:O8,toReference:n=>n.convertSRGBToLinear().applyMatrix3($U),fromReference:n=>n.applyMatrix3(jU).convertLinearToSRGB()}},UEe=new Set([bo,i7]),Br={enabled:!0,_workingColorSpace:bo,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!UEe.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=U6[e].toReference,r=U6[t].fromReference;return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return U6[n].primaries},getTransfer:function(n){return n===_0?k8:U6[n].transfer}};function Q2(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Lw(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Z1;class kQ{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement=="undefined")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Z1===void 0&&(Z1=J9("canvas")),Z1.width=e.width,Z1.height=e.height;const i=Z1.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Z1}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){const t=J9("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),a=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==wQ)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Eo:e.x=e.x-Math.floor(e.x);break;case us:e.x=e.x<0?0:1;break;case N8:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Eo:e.y=e.y-Math.floor(e.y);break;case us:e.y=e.y<0?0:1;break;case N8:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Dp("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===$r?Ip:IQ}set encoding(e){Dp("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Ip?$r:_0}}yo.DEFAULT_IMAGE=null;yo.DEFAULT_MAPPING=wQ;yo.DEFAULT_ANISOTROPY=1;class Er{constructor(e=0,t=0,i=0,r=1){Er.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,a=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*a,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*a,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*a,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*a,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,a;const l=e.elements,u=l[0],c=l[4],d=l[8],h=l[1],f=l[5],p=l[9],m=l[2],v=l[6],g=l[10];if(Math.abs(c-h)<.01&&Math.abs(d-m)<.01&&Math.abs(p-v)<.01){if(Math.abs(c+h)<.1&&Math.abs(d+m)<.1&&Math.abs(p+v)<.1&&Math.abs(u+f+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const S=(u+1)/2,x=(f+1)/2,A=(g+1)/2,C=(c+h)/4,M=(d+m)/4,I=(p+v)/4;return S>x&&S>A?S<.01?(i=0,r=.707106781,a=.707106781):(i=Math.sqrt(S),r=C/i,a=M/i):x>A?x<.01?(i=.707106781,r=0,a=.707106781):(r=Math.sqrt(x),i=C/r,a=I/r):A<.01?(i=.707106781,r=.707106781,a=0):(a=Math.sqrt(A),i=M/a,r=I/a),this.set(i,r,a,t),this}let _=Math.sqrt((v-p)*(v-p)+(d-m)*(d-m)+(h-c)*(h-c));return Math.abs(_)<.001&&(_=1),this.x=(v-p)/_,this.y=(d-m)/_,this.z=(h-c)/_,this.w=Math.acos((u+f+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class WEe extends s1{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Er(0,0,e,t),this.scissorTest=!1,this.viewport=new Er(0,0,e,t);const r={width:e,height:t,depth:1};i.encoding!==void 0&&(Dp("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===Ip?$r:_0),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ao,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new yo(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new FQ(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Hp extends WEe{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class OQ extends yo{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=mo,this.minFilter=mo,this.wrapR=us,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class jEe extends yo{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=mo,this.minFilter=mo,this.wrapR=us,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ru{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,a,o,s){let l=i[r+0],u=i[r+1],c=i[r+2],d=i[r+3];const h=a[o+0],f=a[o+1],p=a[o+2],m=a[o+3];if(s===0){e[t+0]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d;return}if(s===1){e[t+0]=h,e[t+1]=f,e[t+2]=p,e[t+3]=m;return}if(d!==m||l!==h||u!==f||c!==p){let v=1-s;const g=l*h+u*f+c*p+d*m,_=g>=0?1:-1,S=1-g*g;if(S>Number.EPSILON){const A=Math.sqrt(S),C=Math.atan2(A,g*_);v=Math.sin(v*C)/A,s=Math.sin(s*C)/A}const x=s*_;if(l=l*v+h*x,u=u*v+f*x,c=c*v+p*x,d=d*v+m*x,v===1-s){const A=1/Math.sqrt(l*l+u*u+c*c+d*d);l*=A,u*=A,c*=A,d*=A}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,a,o){const s=i[r],l=i[r+1],u=i[r+2],c=i[r+3],d=a[o],h=a[o+1],f=a[o+2],p=a[o+3];return e[t]=s*p+c*d+l*f-u*h,e[t+1]=l*p+c*h+u*d-s*f,e[t+2]=u*p+c*f+s*h-l*d,e[t+3]=c*p-s*d-l*h-u*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,r=e._y,a=e._z,o=e._order,s=Math.cos,l=Math.sin,u=s(i/2),c=s(r/2),d=s(a/2),h=l(i/2),f=l(r/2),p=l(a/2);switch(o){case"XYZ":this._x=h*c*d+u*f*p,this._y=u*f*d-h*c*p,this._z=u*c*p+h*f*d,this._w=u*c*d-h*f*p;break;case"YXZ":this._x=h*c*d+u*f*p,this._y=u*f*d-h*c*p,this._z=u*c*p-h*f*d,this._w=u*c*d+h*f*p;break;case"ZXY":this._x=h*c*d-u*f*p,this._y=u*f*d+h*c*p,this._z=u*c*p+h*f*d,this._w=u*c*d-h*f*p;break;case"ZYX":this._x=h*c*d-u*f*p,this._y=u*f*d+h*c*p,this._z=u*c*p-h*f*d,this._w=u*c*d+h*f*p;break;case"YZX":this._x=h*c*d+u*f*p,this._y=u*f*d+h*c*p,this._z=u*c*p-h*f*d,this._w=u*c*d-h*f*p;break;case"XZY":this._x=h*c*d-u*f*p,this._y=u*f*d-h*c*p,this._z=u*c*p+h*f*d,this._w=u*c*d+h*f*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],a=t[8],o=t[1],s=t[5],l=t[9],u=t[2],c=t[6],d=t[10],h=i+s+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(c-l)*f,this._y=(a-u)*f,this._z=(o-r)*f}else if(i>s&&i>d){const f=2*Math.sqrt(1+i-s-d);this._w=(c-l)/f,this._x=.25*f,this._y=(r+o)/f,this._z=(a+u)/f}else if(s>d){const f=2*Math.sqrt(1+s-i-d);this._w=(a-u)/f,this._x=(r+o)/f,this._y=.25*f,this._z=(l+c)/f}else{const f=2*Math.sqrt(1+d-i-s);this._w=(o-r)/f,this._x=(a+u)/f,this._y=(l+c)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(so(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,r=e._y,a=e._z,o=e._w,s=t._x,l=t._y,u=t._z,c=t._w;return this._x=i*c+o*s+r*u-a*l,this._y=r*c+o*l+a*s-i*u,this._z=a*c+o*u+i*l-r*s,this._w=o*c-i*s-r*l-a*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,a=this._z,o=this._w;let s=o*e._w+i*e._x+r*e._y+a*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=i,this._y=r,this._z=a,this;const l=1-s*s;if(l<=Number.EPSILON){const f=1-t;return this._w=f*o+t*this._w,this._x=f*i+t*this._x,this._y=f*r+t*this._y,this._z=f*a+t*this._z,this.normalize(),this}const u=Math.sqrt(l),c=Math.atan2(u,s),d=Math.sin((1-t)*c)/u,h=Math.sin(t*c)/u;return this._w=o*d+this._w*h,this._x=i*d+this._x*h,this._y=r*d+this._y*h,this._z=a*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),a=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(a),i*Math.cos(a),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Le{constructor(e=0,t=0,i=0){Le.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(qU.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(qU.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6]*r,this.y=a[1]*t+a[4]*i+a[7]*r,this.z=a[2]*t+a[5]*i+a[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,a=e.elements,o=1/(a[3]*t+a[7]*i+a[11]*r+a[15]);return this.x=(a[0]*t+a[4]*i+a[8]*r+a[12])*o,this.y=(a[1]*t+a[5]*i+a[9]*r+a[13])*o,this.z=(a[2]*t+a[6]*i+a[10]*r+a[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,a=e.x,o=e.y,s=e.z,l=e.w,u=2*(o*r-s*i),c=2*(s*t-a*r),d=2*(a*i-o*t);return this.x=t+l*u+o*d-s*c,this.y=i+l*c+s*u-a*d,this.z=r+l*d+a*c-o*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*r,this.y=a[1]*t+a[5]*i+a[9]*r,this.z=a[2]*t+a[6]*i+a[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,a=e.z,o=t.x,s=t.y,l=t.z;return this.x=r*l-a*s,this.y=a*o-i*l,this.z=i*s-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Dw.copy(this).projectOnVector(e),this.sub(Dw)}reflect(e){return this.sub(Dw.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(so(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-xd(e,2));return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Dw=new Le,qU=new ru;class I0{constructor(e=new Le(1/0,1/0,1/0),t=new Le(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,G0),G0.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ng),H6.subVectors(this.max,ng),J1.subVectors(e.a,ng),Q1.subVectors(e.b,ng),e2.subVectors(e.c,ng),Dd.subVectors(Q1,J1),Nd.subVectors(e2,Q1),Df.subVectors(J1,e2);let t=[0,-Dd.z,Dd.y,0,-Nd.z,Nd.y,0,-Df.z,Df.y,Dd.z,0,-Dd.x,Nd.z,0,-Nd.x,Df.z,0,-Df.x,-Dd.y,Dd.x,0,-Nd.y,Nd.x,0,-Df.y,Df.x,0];return!Nw(t,J1,Q1,e2,H6)||(t=[1,0,0,0,1,0,0,0,1],!Nw(t,J1,Q1,e2,H6))?!1:(W6.crossVectors(Dd,Nd),t=[W6.x,W6.y,W6.z],Nw(t,J1,Q1,e2,H6))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,G0).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(G0).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Sc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Sc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Sc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Sc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Sc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Sc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Sc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Sc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Sc),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Sc=[new Le,new Le,new Le,new Le,new Le,new Le,new Le,new Le],G0=new Le,V6=new I0,J1=new Le,Q1=new Le,e2=new Le,Dd=new Le,Nd=new Le,Df=new Le,ng=new Le,H6=new Le,W6=new Le,Nf=new Le;function Nw(n,e,t,i,r){for(let a=0,o=n.length-3;a<=o;a+=3){Nf.fromArray(n,a);const s=r.x*Math.abs(Nf.x)+r.y*Math.abs(Nf.y)+r.z*Math.abs(Nf.z),l=e.dot(Nf),u=t.dot(Nf),c=i.dot(Nf);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>s)return!1}return!0}const $Ee=new I0,ig=new Le,kw=new Le;class D0{constructor(e=new Le,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):$Ee.setFromPoints(e).getCenter(i);let r=0;for(let a=0,o=e.length;athis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;ig.subVectors(e,this.center);const t=ig.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(ig,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(kw.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ig.copy(e.center).add(kw)),this.expandByPoint(ig.copy(e.center).sub(kw))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const bc=new Le,Fw=new Le,j6=new Le,kd=new Le,Ow=new Le,$6=new Le,Bw=new Le;class Qv{constructor(e=new Le,t=new Le(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,bc)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=bc.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(bc.copy(this.origin).addScaledVector(this.direction,t),bc.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Fw.copy(e).add(t).multiplyScalar(.5),j6.copy(t).sub(e).normalize(),kd.copy(this.origin).sub(Fw);const a=e.distanceTo(t)*.5,o=-this.direction.dot(j6),s=kd.dot(this.direction),l=-kd.dot(j6),u=kd.lengthSq(),c=Math.abs(1-o*o);let d,h,f,p;if(c>0)if(d=o*l-s,h=o*s-l,p=a*c,d>=0)if(h>=-p)if(h<=p){const m=1/c;d*=m,h*=m,f=d*(d+o*h+2*s)+h*(o*d+h+2*l)+u}else h=a,d=Math.max(0,-(o*h+s)),f=-d*d+h*(h+2*l)+u;else h=-a,d=Math.max(0,-(o*h+s)),f=-d*d+h*(h+2*l)+u;else h<=-p?(d=Math.max(0,-(-o*a+s)),h=d>0?-a:Math.min(Math.max(-a,-l),a),f=-d*d+h*(h+2*l)+u):h<=p?(d=0,h=Math.min(Math.max(-a,-l),a),f=h*(h+2*l)+u):(d=Math.max(0,-(o*a+s)),h=d>0?a:Math.min(Math.max(-a,-l),a),f=-d*d+h*(h+2*l)+u);else h=o>0?-a:a,d=Math.max(0,-(o*h+s)),f=-d*d+h*(h+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Fw).addScaledVector(j6,h),f}intersectSphere(e,t){bc.subVectors(e.center,this.origin);const i=bc.dot(this.direction),r=bc.dot(bc)-i*i,a=e.radius*e.radius;if(r>a)return null;const o=Math.sqrt(a-r),s=i-o,l=i+o;return l<0?null:s<0?this.at(l,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,a,o,s,l;const u=1/this.direction.x,c=1/this.direction.y,d=1/this.direction.z,h=this.origin;return u>=0?(i=(e.min.x-h.x)*u,r=(e.max.x-h.x)*u):(i=(e.max.x-h.x)*u,r=(e.min.x-h.x)*u),c>=0?(a=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(a=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),i>o||a>r||((a>i||isNaN(i))&&(i=a),(o=0?(s=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(s=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),i>l||s>r)||((s>i||i!==i)&&(i=s),(l=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,bc)!==null}intersectTriangle(e,t,i,r,a){Ow.subVectors(t,e),$6.subVectors(i,e),Bw.crossVectors(Ow,$6);let o=this.direction.dot(Bw),s;if(o>0){if(r)return null;s=1}else if(o<0)s=-1,o=-o;else return null;kd.subVectors(this.origin,e);const l=s*this.direction.dot($6.crossVectors(kd,$6));if(l<0)return null;const u=s*this.direction.dot(Ow.cross(kd));if(u<0||l+u>o)return null;const c=-s*kd.dot(Bw);return c<0?null:this.at(c/o,a)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Bi{constructor(e,t,i,r,a,o,s,l,u,c,d,h,f,p,m,v){Bi.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,a,o,s,l,u,c,d,h,f,p,m,v)}set(e,t,i,r,a,o,s,l,u,c,d,h,f,p,m,v){const g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=r,g[1]=a,g[5]=o,g[9]=s,g[13]=l,g[2]=u,g[6]=c,g[10]=d,g[14]=h,g[3]=f,g[7]=p,g[11]=m,g[15]=v,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Bi().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/t2.setFromMatrixColumn(e,0).length(),a=1/t2.setFromMatrixColumn(e,1).length(),o=1/t2.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*a,t[5]=i[5]*a,t[6]=i[6]*a,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,a=e.z,o=Math.cos(i),s=Math.sin(i),l=Math.cos(r),u=Math.sin(r),c=Math.cos(a),d=Math.sin(a);if(e.order==="XYZ"){const h=o*c,f=o*d,p=s*c,m=s*d;t[0]=l*c,t[4]=-l*d,t[8]=u,t[1]=f+p*u,t[5]=h-m*u,t[9]=-s*l,t[2]=m-h*u,t[6]=p+f*u,t[10]=o*l}else if(e.order==="YXZ"){const h=l*c,f=l*d,p=u*c,m=u*d;t[0]=h+m*s,t[4]=p*s-f,t[8]=o*u,t[1]=o*d,t[5]=o*c,t[9]=-s,t[2]=f*s-p,t[6]=m+h*s,t[10]=o*l}else if(e.order==="ZXY"){const h=l*c,f=l*d,p=u*c,m=u*d;t[0]=h-m*s,t[4]=-o*d,t[8]=p+f*s,t[1]=f+p*s,t[5]=o*c,t[9]=m-h*s,t[2]=-o*u,t[6]=s,t[10]=o*l}else if(e.order==="ZYX"){const h=o*c,f=o*d,p=s*c,m=s*d;t[0]=l*c,t[4]=p*u-f,t[8]=h*u+m,t[1]=l*d,t[5]=m*u+h,t[9]=f*u-p,t[2]=-u,t[6]=s*l,t[10]=o*l}else if(e.order==="YZX"){const h=o*l,f=o*u,p=s*l,m=s*u;t[0]=l*c,t[4]=m-h*d,t[8]=p*d+f,t[1]=d,t[5]=o*c,t[9]=-s*c,t[2]=-u*c,t[6]=f*d+p,t[10]=h-m*d}else if(e.order==="XZY"){const h=o*l,f=o*u,p=s*l,m=s*u;t[0]=l*c,t[4]=-d,t[8]=u*c,t[1]=h*d+m,t[5]=o*c,t[9]=f*d-p,t[2]=p*d-f,t[6]=s*c,t[10]=m*d+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(qEe,e,XEe)}lookAt(e,t,i){const r=this.elements;return bl.subVectors(e,t),bl.lengthSq()===0&&(bl.z=1),bl.normalize(),Fd.crossVectors(i,bl),Fd.lengthSq()===0&&(Math.abs(i.z)===1?bl.x+=1e-4:bl.z+=1e-4,bl.normalize(),Fd.crossVectors(i,bl)),Fd.normalize(),q6.crossVectors(bl,Fd),r[0]=Fd.x,r[4]=q6.x,r[8]=bl.x,r[1]=Fd.y,r[5]=q6.y,r[9]=bl.y,r[2]=Fd.z,r[6]=q6.z,r[10]=bl.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,a=this.elements,o=i[0],s=i[4],l=i[8],u=i[12],c=i[1],d=i[5],h=i[9],f=i[13],p=i[2],m=i[6],v=i[10],g=i[14],_=i[3],S=i[7],x=i[11],A=i[15],C=r[0],M=r[4],I=r[8],D=r[12],E=r[1],P=r[5],F=r[9],V=r[13],G=r[2],W=r[6],Y=r[10],Q=r[14],K=r[3],ae=r[7],ie=r[11],he=r[15];return a[0]=o*C+s*E+l*G+u*K,a[4]=o*M+s*P+l*W+u*ae,a[8]=o*I+s*F+l*Y+u*ie,a[12]=o*D+s*V+l*Q+u*he,a[1]=c*C+d*E+h*G+f*K,a[5]=c*M+d*P+h*W+f*ae,a[9]=c*I+d*F+h*Y+f*ie,a[13]=c*D+d*V+h*Q+f*he,a[2]=p*C+m*E+v*G+g*K,a[6]=p*M+m*P+v*W+g*ae,a[10]=p*I+m*F+v*Y+g*ie,a[14]=p*D+m*V+v*Q+g*he,a[3]=_*C+S*E+x*G+A*K,a[7]=_*M+S*P+x*W+A*ae,a[11]=_*I+S*F+x*Y+A*ie,a[15]=_*D+S*V+x*Q+A*he,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],a=e[12],o=e[1],s=e[5],l=e[9],u=e[13],c=e[2],d=e[6],h=e[10],f=e[14],p=e[3],m=e[7],v=e[11],g=e[15];return p*(+a*l*d-r*u*d-a*s*h+i*u*h+r*s*f-i*l*f)+m*(+t*l*f-t*u*h+a*o*h-r*o*f+r*u*c-a*l*c)+v*(+t*u*d-t*s*f-a*o*d+i*o*f+a*s*c-i*u*c)+g*(-r*s*c-t*l*d+t*s*h+r*o*d-i*o*h+i*l*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],v=e[14],g=e[15],_=d*v*u-m*h*u+m*l*f-s*v*f-d*l*g+s*h*g,S=p*h*u-c*v*u-p*l*f+o*v*f+c*l*g-o*h*g,x=c*m*u-p*d*u+p*s*f-o*m*f-c*s*g+o*d*g,A=p*d*l-c*m*l-p*s*h+o*m*h+c*s*v-o*d*v,C=t*_+i*S+r*x+a*A;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/C;return e[0]=_*M,e[1]=(m*h*a-d*v*a-m*r*f+i*v*f+d*r*g-i*h*g)*M,e[2]=(s*v*a-m*l*a+m*r*u-i*v*u-s*r*g+i*l*g)*M,e[3]=(d*l*a-s*h*a-d*r*u+i*h*u+s*r*f-i*l*f)*M,e[4]=S*M,e[5]=(c*v*a-p*h*a+p*r*f-t*v*f-c*r*g+t*h*g)*M,e[6]=(p*l*a-o*v*a-p*r*u+t*v*u+o*r*g-t*l*g)*M,e[7]=(o*h*a-c*l*a+c*r*u-t*h*u-o*r*f+t*l*f)*M,e[8]=x*M,e[9]=(p*d*a-c*m*a-p*i*f+t*m*f+c*i*g-t*d*g)*M,e[10]=(o*m*a-p*s*a+p*i*u-t*m*u-o*i*g+t*s*g)*M,e[11]=(c*s*a-o*d*a-c*i*u+t*d*u+o*i*f-t*s*f)*M,e[12]=A*M,e[13]=(c*m*r-p*d*r+p*i*h-t*m*h-c*i*v+t*d*v)*M,e[14]=(p*s*r-o*m*r-p*i*l+t*m*l+o*i*v-t*s*v)*M,e[15]=(o*d*r-c*s*r+c*i*l-t*d*l-o*i*h+t*s*h)*M,this}scale(e){const t=this.elements,i=e.x,r=e.y,a=e.z;return t[0]*=i,t[4]*=r,t[8]*=a,t[1]*=i,t[5]*=r,t[9]*=a,t[2]*=i,t[6]*=r,t[10]*=a,t[3]*=i,t[7]*=r,t[11]*=a,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),a=1-i,o=e.x,s=e.y,l=e.z,u=a*o,c=a*s;return this.set(u*o+i,u*s-r*l,u*l+r*s,0,u*s+r*l,c*s+i,c*l-r*o,0,u*l-r*s,c*l+r*o,a*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,a,o){return this.set(1,i,a,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,a=t._x,o=t._y,s=t._z,l=t._w,u=a+a,c=o+o,d=s+s,h=a*u,f=a*c,p=a*d,m=o*c,v=o*d,g=s*d,_=l*u,S=l*c,x=l*d,A=i.x,C=i.y,M=i.z;return r[0]=(1-(m+g))*A,r[1]=(f+x)*A,r[2]=(p-S)*A,r[3]=0,r[4]=(f-x)*C,r[5]=(1-(h+g))*C,r[6]=(v+_)*C,r[7]=0,r[8]=(p+S)*M,r[9]=(v-_)*M,r[10]=(1-(h+m))*M,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let a=t2.set(r[0],r[1],r[2]).length();const o=t2.set(r[4],r[5],r[6]).length(),s=t2.set(r[8],r[9],r[10]).length();this.determinant()<0&&(a=-a),e.x=r[12],e.y=r[13],e.z=r[14],U0.copy(this);const u=1/a,c=1/o,d=1/s;return U0.elements[0]*=u,U0.elements[1]*=u,U0.elements[2]*=u,U0.elements[4]*=c,U0.elements[5]*=c,U0.elements[6]*=c,U0.elements[8]*=d,U0.elements[9]*=d,U0.elements[10]*=d,t.setFromRotationMatrix(U0),i.x=a,i.y=o,i.z=s,this}makePerspective(e,t,i,r,a,o,s=Fc){const l=this.elements,u=2*a/(t-e),c=2*a/(i-r),d=(t+e)/(t-e),h=(i+r)/(i-r);let f,p;if(s===Fc)f=-(o+a)/(o-a),p=-2*o*a/(o-a);else if(s===B8)f=-o/(o-a),p=-o*a/(o-a);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return l[0]=u,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=c,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,r,a,o,s=Fc){const l=this.elements,u=1/(t-e),c=1/(i-r),d=1/(o-a),h=(t+e)*u,f=(i+r)*c;let p,m;if(s===Fc)p=(o+a)*d,m=-2*d;else if(s===B8)p=a*d,m=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=m,l[14]=-p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const t2=new Le,U0=new Bi,qEe=new Le(0,0,0),XEe=new Le(1,1,1),Fd=new Le,q6=new Le,bl=new Le,XU=new Bi,YU=new ru;class r7{constructor(e=0,t=0,i=0,r=r7.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,a=r[0],o=r[4],s=r[8],l=r[1],u=r[5],c=r[9],d=r[2],h=r[6],f=r[10];switch(t){case"XYZ":this._y=Math.asin(so(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,f),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(h,u),this._z=0);break;case"YXZ":this._x=Math.asin(-so(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,f),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,a),this._z=0);break;case"ZXY":this._x=Math.asin(so(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,a));break;case"ZYX":this._y=Math.asin(-so(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,a)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(so(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-d,a)):(this._x=0,this._y=Math.atan2(s,f));break;case"XZY":this._z=Math.asin(-so(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,u),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-c,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return XU.makeRotationFromQuaternion(e),this.setFromRotationMatrix(XU,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return YU.setFromEuler(this),this.setFromQuaternion(YU,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}r7.DEFAULT_ORDER="XYZ";class dR{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(s=>({boxInitialized:s.boxInitialized,boxMin:s.box.min.toArray(),boxMax:s.box.max.toArray(),sphereInitialized:s.sphereInitialized,sphereRadius:s.sphere.radius,sphereCenter:s.sphere.center.toArray()})),r.maxGeometryCount=this._maxGeometryCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function a(s,l){return s[l.uuid]===void 0&&(s[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=a(e.geometries,this.geometry);const s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0){const l=s.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u0){r.children=[];for(let s=0;s0){r.animations=[];for(let s=0;s0&&(i.geometries=s),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),c.length>0&&(i.images=c),d.length>0&&(i.shapes=d),h.length>0&&(i.skeletons=h),f.length>0&&(i.animations=f),p.length>0&&(i.nodes=p)}return i.object=r,i;function o(s){const l=[];for(const u in s){const c=s[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?r.multiplyScalar(1/Math.sqrt(a)):r.set(0,0,0)}static getBarycoord(e,t,i,r,a){V0.subVectors(r,t),wc.subVectors(i,t),zw.subVectors(e,t);const o=V0.dot(V0),s=V0.dot(wc),l=V0.dot(zw),u=wc.dot(wc),c=wc.dot(zw),d=o*u-s*s;if(d===0)return a.set(0,0,0),null;const h=1/d,f=(u*l-s*c)*h,p=(o*c-s*l)*h;return a.set(1-f-p,p,f)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,Tc)===null?!1:Tc.x>=0&&Tc.y>=0&&Tc.x+Tc.y<=1}static getInterpolation(e,t,i,r,a,o,s,l){return this.getBarycoord(e,t,i,r,Tc)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(a,Tc.x),l.addScaledVector(o,Tc.y),l.addScaledVector(s,Tc.z),l)}static isFrontFacing(e,t,i,r){return V0.subVectors(i,t),wc.subVectors(e,t),V0.cross(wc).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return V0.subVectors(this.c,this.b),wc.subVectors(this.a,this.b),V0.cross(wc).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return X0.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return X0.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,a){return X0.getInterpolation(e,this.a,this.b,this.c,t,i,r,a)}containsPoint(e){return X0.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return X0.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,a=this.c;let o,s;i2.subVectors(r,i),r2.subVectors(a,i),Gw.subVectors(e,i);const l=i2.dot(Gw),u=r2.dot(Gw);if(l<=0&&u<=0)return t.copy(i);Uw.subVectors(e,r);const c=i2.dot(Uw),d=r2.dot(Uw);if(c>=0&&d<=c)return t.copy(r);const h=l*d-c*u;if(h<=0&&l>=0&&c<=0)return o=l/(l-c),t.copy(i).addScaledVector(i2,o);Vw.subVectors(e,a);const f=i2.dot(Vw),p=r2.dot(Vw);if(p>=0&&f<=p)return t.copy(a);const m=f*u-l*p;if(m<=0&&u>=0&&p<=0)return s=u/(u-p),t.copy(i).addScaledVector(r2,s);const v=c*p-f*d;if(v<=0&&d-c>=0&&f-p>=0)return eV.subVectors(a,r),s=(d-c)/(d-c+(f-p)),t.copy(r).addScaledVector(eV,s);const g=1/(v+m+h);return o=m*g,s=h*g,t.copy(i).addScaledVector(i2,o).addScaledVector(r2,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const BQ={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Od={h:0,s:0,l:0},Y6={h:0,s:0,l:0};function Hw(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Jn{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=$r){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Br.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Br.workingColorSpace){return this.r=e,this.g=t,this.b=i,Br.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Br.workingColorSpace){if(e=uR(e,1),t=so(t,0,1),i=so(i,0,1),t===0)this.r=this.g=this.b=i;else{const a=i<=.5?i*(1+t):i+t-i*t,o=2*i-a;this.r=Hw(o,a,e+1/3),this.g=Hw(o,a,e),this.b=Hw(o,a,e-1/3)}return Br.toWorkingColorSpace(this,r),this}setStyle(e,t=$r){function i(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let a;const o=r[1],s=r[2];switch(o){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return i(a[4]),this.setRGB(Math.min(255,parseInt(a[1],10))/255,Math.min(255,parseInt(a[2],10))/255,Math.min(255,parseInt(a[3],10))/255,t);if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return i(a[4]),this.setRGB(Math.min(100,parseInt(a[1],10))/100,Math.min(100,parseInt(a[2],10))/100,Math.min(100,parseInt(a[3],10))/100,t);break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return i(a[4]),this.setHSL(parseFloat(a[1])/360,parseFloat(a[2])/100,parseFloat(a[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const a=r[1],o=a.length;if(o===3)return this.setRGB(parseInt(a.charAt(0),16)/15,parseInt(a.charAt(1),16)/15,parseInt(a.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(a,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=$r){const i=BQ[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Q2(e.r),this.g=Q2(e.g),this.b=Q2(e.b),this}copyLinearToSRGB(e){return this.r=Lw(e.r),this.g=Lw(e.g),this.b=Lw(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=$r){return Br.fromWorkingColorSpace(ts.copy(this),e),Math.round(so(ts.r*255,0,255))*65536+Math.round(so(ts.g*255,0,255))*256+Math.round(so(ts.b*255,0,255))}getHexString(e=$r){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Br.workingColorSpace){Br.fromWorkingColorSpace(ts.copy(this),t);const i=ts.r,r=ts.g,a=ts.b,o=Math.max(i,r,a),s=Math.min(i,r,a);let l,u;const c=(s+o)/2;if(s===o)l=0,u=0;else{const d=o-s;switch(u=c<=.5?d/(o+s):d/(2-o-s),o){case i:l=(r-a)/d+(r0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Pp&&(i.blending=this.blending),this.side!==Zc&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==FC&&(i.blendSrc=this.blendSrc),this.blendDst!==OC&&(i.blendDst=this.blendDst),this.blendEquation!==Xd&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==D8&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==UU&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==K1&&(i.stencilFail=this.stencilFail),this.stencilZFail!==K1&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==K1&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(a){const o=[];for(const s in a){const l=a[s];delete l.metadata,o.push(l)}return o}if(t){const a=r(e.textures),o=r(e.images);a.length>0&&(i.textures=a),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const r=t.length;i=new Array(r);for(let a=0;a!==r;++a)i[a]=t[a].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Mr extends A0{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Jn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=aR,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const eo=new Le,K6=new on;class La{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=VC,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Nu,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Dp("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,a=this.itemSize;r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const u=i[l];e.data.attributes[l]=u.toJSON(e.data)}const r={};let a=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let d=0,h=u.length;d0&&(r[l]=c,a=!0)}a&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const s=this.boundingSphere;return s!==null&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const u in r){const c=r[u];this.setAttribute(u,c.clone(t))}const a=e.morphAttributes;for(const u in a){const c=[],d=a[u];for(let h=0,f=d.length;h0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=r.length;axd(e.far-e.near,2)))&&(tV.copy(a).invert(),kf.copy(e.ray).applyMatrix4(tV),!(i.boundingBox!==null&&kf.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,kf)))}_computeIntersections(e,t,i){let r;const a=this.geometry,o=this.material,s=a.index,l=a.attributes.position,u=a.attributes.uv,c=a.attributes.uv1,d=a.attributes.normal,h=a.groups,f=a.drawRange;if(s!==null)if(Array.isArray(o))for(let p=0,m=h.length;pt.far?null:{distance:u,point:i4.clone(),object:n}}function r4(n,e,t,i,r,a,o,s,l,u){n.getVertexPosition(s,o2),n.getVertexPosition(l,s2),n.getVertexPosition(u,l2);const c=nPe(n,e,t,i,o2,s2,l2,n4);if(c){r&&(Q6.fromBufferAttribute(r,s),e4.fromBufferAttribute(r,l),t4.fromBufferAttribute(r,u),c.uv=X0.getInterpolation(n4,o2,s2,l2,Q6,e4,t4,new on)),a&&(Q6.fromBufferAttribute(a,s),e4.fromBufferAttribute(a,l),t4.fromBufferAttribute(a,u),c.uv1=X0.getInterpolation(n4,o2,s2,l2,Q6,e4,t4,new on),c.uv2=c.uv1),o&&(iV.fromBufferAttribute(o,s),rV.fromBufferAttribute(o,l),aV.fromBufferAttribute(o,u),c.normal=X0.getInterpolation(n4,o2,s2,l2,iV,rV,aV,new Le),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const d={a:s,b:l,c:u,normal:new Le,materialIndex:0};X0.getNormal(o2,s2,l2,d.normal),c.face=d}return c}class em extends Qr{constructor(e=1,t=1,i=1,r=1,a=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:a,depthSegments:o};const s=this;r=Math.floor(r),a=Math.floor(a),o=Math.floor(o);const l=[],u=[],c=[],d=[];let h=0,f=0;p("z","y","x",-1,-1,i,t,e,o,a,0),p("z","y","x",1,-1,i,t,-e,o,a,1),p("x","z","y",1,1,e,i,t,r,o,2),p("x","z","y",1,-1,e,i,-t,r,o,3),p("x","y","z",1,-1,e,t,i,r,a,4),p("x","y","z",-1,-1,e,t,-i,r,a,5),this.setIndex(l),this.setAttribute("position",new ga(u,3)),this.setAttribute("normal",new ga(c,3)),this.setAttribute("uv",new ga(d,2));function p(m,v,g,_,S,x,A,C,M,I,D){const E=x/M,P=A/I,F=x/2,V=A/2,G=C/2,W=M+1,Y=I+1;let Q=0,K=0;const ae=new Le;for(let ie=0;ie0?1:-1,c.push(ae.x,ae.y,ae.z),d.push(Ee/M),d.push(1-ie/I),Q+=1}}for(let ie=0;ie0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}let VQ=class extends la{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Bi,this.projectionMatrix=new Bi,this.projectionMatrixInverse=new Bi,this.coordinateSystem=Fc}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};const Bd=new Le,oV=new on,sV=new on;class ss extends VQ{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Cv*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(t9*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Cv*2*Math.atan(Math.tan(t9*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){Bd.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Bd.x,Bd.y).multiplyScalar(-e/Bd.z),Bd.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Bd.x,Bd.y).multiplyScalar(-e/Bd.z)}getViewSize(e,t){return this.getViewBounds(e,oV,sV),t.subVectors(sV,oV)}setViewOffset(e,t,i,r,a,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(t9*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,a=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,u=o.fullHeight;a+=o.offsetX*r/l,t-=o.offsetY*i/u,r*=o.width/l,i*=o.height/u}const s=this.filmOffset;s!==0&&(a+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(a,a+r,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const u2=-90,c2=1;class oPe extends la{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new ss(u2,c2,e,t);r.layers=this.layers,this.add(r);const a=new ss(u2,c2,e,t);a.layers=this.layers,this.add(a);const o=new ss(u2,c2,e,t);o.layers=this.layers,this.add(o);const s=new ss(u2,c2,e,t);s.layers=this.layers,this.add(s);const l=new ss(u2,c2,e,t);l.layers=this.layers,this.add(l);const u=new ss(u2,c2,e,t);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,a,o,s,l]=t;for(const u of t)this.remove(u);if(e===Fc)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),a.up.set(0,0,-1),a.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===B8)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),a.up.set(0,0,1),a.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of t)this.add(u),u.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[a,o,s,l,u,c]=this.children,d=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const m=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,a),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,s),e.setRenderTarget(i,3,r),e.render(t,l),e.setRenderTarget(i,4,r),e.render(t,u),i.texture.generateMipmaps=m,e.setRenderTarget(i,5,r),e.render(t,c),e.setRenderTarget(d,h,f),e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class HQ extends yo{constructor(e,t,i,r,a,o,s,l,u,c){e=e!==void 0?e:[],t=t!==void 0?t:xv,super(e,t,i,r,a,o,s,l,u,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class sPe extends Hp{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];t.encoding!==void 0&&(Dp("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Ip?$r:_0),this.texture=new HQ(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:ao}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; vec3 transformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); } void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include } `,fragmentShader:` uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { vec3 direction = normalize( vWorldDirection ); vec2 sampleUV = equirectUv( direction ); gl_FragColor = texture2D( tEquirect, sampleUV ); } `},r=new em(5,5,5),a=new Jc({name:"CubemapFromEquirect",uniforms:Mv(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:rl,blending:_h});a.uniforms.tEquirect.value=t;const o=new fr(r,a),s=t.minFilter;return t.minFilter===kc&&(t.minFilter=ao),new oPe(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const a=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(a)}}const $w=new Le,lPe=new Le,uPe=new ar;let jd=class{constructor(e=new Le(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=$w.subVectors(i,t).cross(lPe.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta($w),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const a=-(e.start.dot(this.normal)+this.constant)/r;return a<0||a>1?null:t.copy(e.start).addScaledVector(i,a)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||uPe.getNormalMatrix(e),r=this.coplanarPoint($w).applyMatrix4(e),a=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(a),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};const Ff=new D0,a4=new Le;class fR{constructor(e=new jd,t=new jd,i=new jd,r=new jd,a=new jd,o=new jd){this.planes=[e,t,i,r,a,o]}set(e,t,i,r,a,o){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(i),s[3].copy(r),s[4].copy(a),s[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Fc){const i=this.planes,r=e.elements,a=r[0],o=r[1],s=r[2],l=r[3],u=r[4],c=r[5],d=r[6],h=r[7],f=r[8],p=r[9],m=r[10],v=r[11],g=r[12],_=r[13],S=r[14],x=r[15];if(i[0].setComponents(l-a,h-u,v-f,x-g).normalize(),i[1].setComponents(l+a,h+u,v+f,x+g).normalize(),i[2].setComponents(l+o,h+c,v+p,x+_).normalize(),i[3].setComponents(l-o,h-c,v-p,x-_).normalize(),i[4].setComponents(l-s,h-d,v-m,x-S).normalize(),t===Fc)i[5].setComponents(l+s,h+d,v+m,x+S).normalize();else if(t===B8)i[5].setComponents(s,d,m,S).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ff.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ff.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ff)}intersectsSprite(e){return Ff.center.set(0,0,0),Ff.radius=.7071067811865476,Ff.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ff)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let a=0;a<6;a++)if(t[a].distanceToPoint(i)0?e.max.x:e.min.x,a4.y=r.normal.y>0?e.max.y:e.min.y,a4.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(a4)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function WQ(){let n=null,e=!1,t=null,i=null;function r(a,o){t(a,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(a){t=a},setContext:function(a){n=a}}}function cPe(n,e){const t=e.isWebGL2,i=new WeakMap;function r(u,c){const d=u.array,h=u.usage,f=d.byteLength,p=n.createBuffer();n.bindBuffer(c,p),n.bufferData(c,d,h),u.onUploadCallback();let m;if(d instanceof Float32Array)m=n.FLOAT;else if(d instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(t)m=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else m=n.UNSIGNED_SHORT;else if(d instanceof Int16Array)m=n.SHORT;else if(d instanceof Uint32Array)m=n.UNSIGNED_INT;else if(d instanceof Int32Array)m=n.INT;else if(d instanceof Int8Array)m=n.BYTE;else if(d instanceof Uint8Array)m=n.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)m=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:p,type:m,bytesPerElement:d.BYTES_PER_ELEMENT,version:u.version,size:f}}function a(u,c,d){const h=c.array,f=c._updateRange,p=c.updateRanges;if(n.bindBuffer(d,u),f.count===-1&&p.length===0&&n.bufferSubData(d,0,h),p.length!==0){for(let m=0,v=p.length;m 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; float clipOpacity = 1.0; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; distanceGradient = fwidth( distanceToPlane ) / 2.0; clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); if ( clipOpacity == 0.0 ) discard; } #pragma unroll_loop_end #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES float unionClipOpacity = 1.0; #pragma unroll_loop_start for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; distanceGradient = fwidth( distanceToPlane ) / 2.0; unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); } #pragma unroll_loop_end clipOpacity *= 1.0 - unionClipOpacity; #endif diffuseColor.a *= clipOpacity; if ( diffuseColor.a == 0.0 ) discard; #else #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; } #pragma unroll_loop_end #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES bool clipped = true; #pragma unroll_loop_start for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; } #pragma unroll_loop_end if ( clipped ) discard; #endif #endif #endif`,MPe=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,EPe=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; #endif`,PPe=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; #endif`,RPe=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; #endif`,LPe=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; #endif`,IPe=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; #endif`,DPe=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); #endif #ifdef USE_COLOR vColor *= color; #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; #endif`,NPe=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 #define RECIPROCAL_PI2 0.15915494309189535 #define EPSILON 1e-6 #ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif #define whiteComplement( a ) ( 1.0 - saturate( a ) ) float pow2( const in float x ) { return x*x; } vec3 pow2( const in vec3 x ) { return x*x; } float pow3( const in float x ) { return x*x*x; } float pow4( const in float x ) { float x2 = x*x; return x2*x2; } float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } highp float rand( const in vec2 uv ) { const highp float a = 12.9898, b = 78.233, c = 43758.5453; highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); return fract( sin( sn ) * c ); } #ifdef HIGH_PRECISION float precisionSafeLength( vec3 v ) { return length( v ); } #else float precisionSafeLength( vec3 v ) { float maxComponent = max3( abs( v ) ); return length( v / maxComponent ) * maxComponent; } #endif struct IncidentLight { vec3 color; vec3 direction; bool visible; }; struct ReflectedLight { vec3 directDiffuse; vec3 directSpecular; vec3 indirectDiffuse; vec3 indirectSpecular; }; #ifdef USE_ALPHAHASH varying vec3 vPosition; #endif vec3 transformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); } vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); } mat3 transposeMat3( const in mat3 m ) { mat3 tmp; tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); return tmp; } float luminance( const in vec3 rgb ) { const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); return dot( weights, rgb ); } bool isPerspectiveMatrix( mat4 m ) { return m[ 2 ][ 3 ] == - 1.0; } vec2 equirectUv( in vec3 dir ) { float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; return vec2( u, v ); } vec3 BRDF_Lambert( const in vec3 diffuseColor ) { return RECIPROCAL_PI * diffuseColor; } vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); } float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); } // validated`,kPe=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { vec3 absDirection = abs( direction ); float face = - 1.0; if ( absDirection.x > absDirection.z ) { if ( absDirection.x > absDirection.y ) face = direction.x > 0.0 ? 0.0 : 3.0; else face = direction.y > 0.0 ? 1.0 : 4.0; } else { if ( absDirection.z > absDirection.y ) face = direction.z > 0.0 ? 2.0 : 5.0; else face = direction.y > 0.0 ? 1.0 : 4.0; } return face; } vec2 getUV( vec3 direction, float face ) { vec2 uv; if ( face == 0.0 ) { uv = vec2( direction.z, direction.y ) / abs( direction.x ); } else if ( face == 1.0 ) { uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); } else if ( face == 2.0 ) { uv = vec2( - direction.x, direction.y ) / abs( direction.z ); } else if ( face == 3.0 ) { uv = vec2( - direction.z, direction.y ) / abs( direction.x ); } else if ( face == 4.0 ) { uv = vec2( - direction.x, direction.z ) / abs( direction.y ); } else { uv = vec2( direction.x, direction.y ) / abs( direction.z ); } return 0.5 * ( uv + 1.0 ); } vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { float face = getFace( direction ); float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); mipInt = max( mipInt, cubeUV_minMipLevel ); float faceSize = exp2( mipInt ); highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; if ( face > 2.0 ) { uv.y += faceSize; face -= 3.0; } uv.x += face * faceSize; uv.x += filterInt * 3.0 * cubeUV_minTileSize; uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); uv.x *= CUBEUV_TEXEL_WIDTH; uv.y *= CUBEUV_TEXEL_HEIGHT; #ifdef texture2DGradEXT return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; #else return texture2D( envMap, uv ).rgb; #endif } #define cubeUV_r0 1.0 #define cubeUV_m0 - 2.0 #define cubeUV_r1 0.8 #define cubeUV_m1 - 1.0 #define cubeUV_r4 0.4 #define cubeUV_m4 2.0 #define cubeUV_r5 0.305 #define cubeUV_m5 3.0 #define cubeUV_r6 0.21 #define cubeUV_m6 4.0 float roughnessToMip( float roughness ) { float mip = 0.0; if ( roughness >= cubeUV_r1 ) { mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; } else if ( roughness >= cubeUV_r4 ) { mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; } else if ( roughness >= cubeUV_r5 ) { mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; } else if ( roughness >= cubeUV_r6 ) { mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; } else { mip = - 2.0 * log2( 1.16 * roughness ); } return mip; } vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); float mipF = fract( mip ); float mipInt = floor( mip ); vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); if ( mipF == 0.0 ) { return vec4( color0, 1.0 ); } else { vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); return vec4( mix( color0, color1, mipF ), 1.0 ); } } #endif`,FPe=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif #ifdef USE_BATCHING mat3 bm = mat3( batchingMatrix ); transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); transformedNormal = bm * transformedNormal; #ifdef USE_TANGENT transformedTangent = bm * transformedTangent; #endif #endif #ifdef USE_INSTANCING mat3 im = mat3( instanceMatrix ); transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); transformedNormal = im * transformedNormal; #ifdef USE_TANGENT transformedTangent = im * transformedTangent; #endif #endif transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedNormal = - transformedNormal; #endif #ifdef USE_TANGENT transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif #endif`,OPe=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; #endif`,BPe=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); #endif`,zPe=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; #endif`,GPe=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; #endif`,UPe="gl_FragColor = linearToOutputTexel( gl_FragColor );",VPe=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), vec3( 0.0170827, 0.0723974, 0.9105199 ) ); const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( vec3( 1.2249401, - 0.2249404, 0.0 ), vec3( - 0.0420569, 1.0420571, 0.0 ), vec3( - 0.0196376, - 0.0786361, 1.0982735 ) ); vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); } vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); } vec4 LinearTransferOETF( in vec4 value ) { return value; } vec4 sRGBTransferOETF( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); } vec4 LinearToLinear( in vec4 value ) { return value; } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); }`,HPe=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); } else { cameraToFrag = normalize( vWorldPosition - cameraPosition ); } vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); #ifdef ENVMAP_MODE_REFLECTION vec3 reflectVec = reflect( cameraToFrag, worldNormal ); #else vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); #endif #else vec3 reflectVec = vReflect; #endif #ifdef ENVMAP_TYPE_CUBE vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); #else vec4 envColor = vec4( 0.0 ); #endif #ifdef ENVMAP_BLENDING_MULTIPLY outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); #elif defined( ENVMAP_BLENDING_MIX ) outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif #endif`,WPe=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #else uniform sampler2D envMap; #endif #endif`,jPe=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; uniform float refractionRatio; #else varying vec3 vReflect; #endif #endif`,$Pe=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; #else varying vec3 vReflect; uniform float refractionRatio; #endif #endif`,qPe=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else vec3 cameraToVertex; if ( isOrthographic ) { cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); } else { cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); } vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); #ifdef ENVMAP_MODE_REFLECTION vReflect = reflect( cameraToVertex, worldNormal ); #else vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif #endif`,XPe=`#ifdef USE_FOG vFogDepth = - mvPosition.z; #endif`,YPe=`#ifdef USE_FOG varying float vFogDepth; #endif`,KPe=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); #endif`,ZPe=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 uniform float fogDensity; #else uniform float fogNear; uniform float fogFar; #endif #endif`,JPe=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { float dotNL = dot( normal, lightDirection ); vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); #ifdef USE_GRADIENTMAP return vec3( texture2D( gradientMap, coord ).r ); #else vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif }`,QPe=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; #endif`,eRe=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; #endif`,tRe=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularStrength = specularStrength;`,nRe=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; }; void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert #define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,iRe=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; #endif vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { float x = normal.x, y = normal.y, z = normal.z; vec3 result = shCoefficients[ 0 ] * 0.886227; result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); return result; } vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); return irradiance; } vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { vec3 irradiance = ambientLightColor; return irradiance; } float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { #if defined ( LEGACY_LIGHTS ) if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); } return 1.0; #else float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); if ( cutoffDistance > 0.0 ) { distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); } return distanceFalloff; #endif } float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { return smoothstep( coneCosine, penumbraCosine, angleCosine ); } #if NUM_DIR_LIGHTS > 0 struct DirectionalLight { vec3 direction; vec3 color; }; uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { light.color = directionalLight.color; light.direction = directionalLight.direction; light.visible = true; } #endif #if NUM_POINT_LIGHTS > 0 struct PointLight { vec3 position; vec3 color; float distance; float decay; }; uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { vec3 lVector = pointLight.position - geometryPosition; light.direction = normalize( lVector ); float lightDistance = length( lVector ); light.color = pointLight.color; light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); light.visible = ( light.color != vec3( 0.0 ) ); } #endif #if NUM_SPOT_LIGHTS > 0 struct SpotLight { vec3 position; vec3 direction; vec3 color; float distance; float decay; float coneCos; float penumbraCos; }; uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { vec3 lVector = spotLight.position - geometryPosition; light.direction = normalize( lVector ); float angleCos = dot( light.direction, spotLight.direction ); float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); if ( spotAttenuation > 0.0 ) { float lightDistance = length( lVector ); light.color = spotLight.color * spotAttenuation; light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); light.visible = ( light.color != vec3( 0.0 ) ); } else { light.color = vec3( 0.0 ); light.visible = false; } } #endif #if NUM_RECT_AREA_LIGHTS > 0 struct RectAreaLight { vec3 color; vec3 position; vec3 halfWidth; vec3 halfHeight; }; uniform sampler2D ltc_1; uniform sampler2D ltc_2; uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; #endif #if NUM_HEMI_LIGHTS > 0 struct HemisphereLight { vec3 direction; vec3 skyColor; vec3 groundColor; }; uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { float dotNL = dot( normal, hemiLight.direction ); float hemiDiffuseWeight = 0.5 * dotNL + 0.5; vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } #endif`,rRe=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); return PI * envMapColor.rgb * envMapIntensity; #else return vec3( 0.0 ); #endif } vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 reflectVec = reflect( - viewDir, normal ); reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); return envMapColor.rgb * envMapIntensity; #else return vec3( 0.0 ); #endif } #ifdef USE_ANISOTROPY vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 bentNormal = cross( bitangent, viewDir ); bentNormal = normalize( cross( bentNormal, bitangent ) ); bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); return getIBLRadiance( viewDir, bentNormal, roughness ); #else return vec3( 0.0 ); #endif } #endif #endif`,aRe=`ToonMaterial material; material.diffuseColor = diffuseColor.rgb;`,oRe=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,sRe=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; material.specularStrength = specularStrength;`,lRe=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; float specularShininess; float specularStrength; }; void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; } void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,uRe=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; material.roughness = min( material.roughness, 1.0 ); #ifdef IOR material.ior = ior; #ifdef USE_SPECULAR float specularIntensityFactor = specularIntensity; vec3 specularColorFactor = specularColor; #ifdef USE_SPECULAR_COLORMAP specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; #endif #ifdef USE_SPECULAR_INTENSITYMAP specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; #endif material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); #else float specularIntensityFactor = 1.0; vec3 specularColorFactor = vec3( 1.0 ); material.specularF90 = 1.0; #endif material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); #else material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); material.specularF90 = 1.0; #endif #ifdef USE_CLEARCOAT material.clearcoat = clearcoat; material.clearcoatRoughness = clearcoatRoughness; material.clearcoatF0 = vec3( 0.04 ); material.clearcoatF90 = 1.0; #ifdef USE_CLEARCOATMAP material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; #endif material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); material.clearcoatRoughness += geometryRoughness; material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); #endif #ifdef USE_IRIDESCENCE material.iridescence = iridescence; material.iridescenceIOR = iridescenceIOR; #ifdef USE_IRIDESCENCEMAP material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; #else material.iridescenceThickness = iridescenceThicknessMaximum; #endif #endif #ifdef USE_SHEEN material.sheenColor = sheenColor; #ifdef USE_SHEEN_COLORMAP material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; #endif material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); #ifdef USE_SHEEN_ROUGHNESSMAP material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; #endif #endif #ifdef USE_ANISOTROPY #ifdef USE_ANISOTROPYMAP mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; #else vec2 anisotropyV = anisotropyVector; #endif material.anisotropy = length( anisotropyV ); if( material.anisotropy == 0.0 ) { anisotropyV = vec2( 1.0, 0.0 ); } else { anisotropyV /= material.anisotropy; material.anisotropy = saturate( material.anisotropy ); } material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; #endif`,cRe=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; float specularF90; #ifdef USE_CLEARCOAT float clearcoat; float clearcoatRoughness; vec3 clearcoatF0; float clearcoatF90; #endif #ifdef USE_IRIDESCENCE float iridescence; float iridescenceIOR; float iridescenceThickness; vec3 iridescenceFresnel; vec3 iridescenceF0; #endif #ifdef USE_SHEEN vec3 sheenColor; float sheenRoughness; #endif #ifdef IOR float ior; #endif #ifdef USE_TRANSMISSION float transmission; float transmissionAlpha; float thickness; float attenuationDistance; vec3 attenuationColor; #endif #ifdef USE_ANISOTROPY float anisotropy; float alphaT; vec3 anisotropyT; vec3 anisotropyB; #endif }; vec3 clearcoatSpecularDirect = vec3( 0.0 ); vec3 clearcoatSpecularIndirect = vec3( 0.0 ); vec3 sheenSpecularDirect = vec3( 0.0 ); vec3 sheenSpecularIndirect = vec3(0.0 ); vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); float x2 = x * x; float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); } float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { float a2 = pow2( alpha ); float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); return 0.5 / max( gv + gl, EPSILON ); } float D_GGX( const in float alpha, const in float dotNH ) { float a2 = pow2( alpha ); float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; return RECIPROCAL_PI * a2 / pow2( denom ); } #ifdef USE_ANISOTROPY float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); float v = 0.5 / ( gv + gl ); return saturate(v); } float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { float a2 = alphaT * alphaB; highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); highp float v2 = dot( v, v ); float w2 = a2 / v2; return RECIPROCAL_PI * a2 * pow2 ( w2 ); } #endif #ifdef USE_CLEARCOAT vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { vec3 f0 = material.clearcoatF0; float f90 = material.clearcoatF90; float roughness = material.clearcoatRoughness; float alpha = pow2( roughness ); vec3 halfDir = normalize( lightDir + viewDir ); float dotNL = saturate( dot( normal, lightDir ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float dotVH = saturate( dot( viewDir, halfDir ) ); vec3 F = F_Schlick( f0, f90, dotVH ); float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); float D = D_GGX( alpha, dotNH ); return F * ( V * D ); } #endif vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { vec3 f0 = material.specularColor; float f90 = material.specularF90; float roughness = material.roughness; float alpha = pow2( roughness ); vec3 halfDir = normalize( lightDir + viewDir ); float dotNL = saturate( dot( normal, lightDir ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float dotVH = saturate( dot( viewDir, halfDir ) ); vec3 F = F_Schlick( f0, f90, dotVH ); #ifdef USE_IRIDESCENCE F = mix( F, material.iridescenceFresnel, material.iridescence ); #endif #ifdef USE_ANISOTROPY float dotTL = dot( material.anisotropyT, lightDir ); float dotTV = dot( material.anisotropyT, viewDir ); float dotTH = dot( material.anisotropyT, halfDir ); float dotBL = dot( material.anisotropyB, lightDir ); float dotBV = dot( material.anisotropyB, viewDir ); float dotBH = dot( material.anisotropyB, halfDir ); float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); #else float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); float D = D_GGX( alpha, dotNH ); #endif return F * ( V * D ); } vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { const float LUT_SIZE = 64.0; const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; const float LUT_BIAS = 0.5 / LUT_SIZE; float dotNV = saturate( dot( N, V ) ); vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); uv = uv * LUT_SCALE + LUT_BIAS; return uv; } float LTC_ClippedSphereFormFactor( const in vec3 f ) { float l = length( f ); return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); } vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { float x = dot( v1, v2 ); float y = abs( x ); float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; float b = 3.4175940 + ( 4.1616724 + y ) * y; float v = a / b; float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; return cross( v1, v2 ) * theta_sintheta; } vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; vec3 lightNormal = cross( v1, v2 ); if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); vec3 T1, T2; T1 = normalize( V - N * dot( V, N ) ); T2 = - cross( N, T1 ); mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); vec3 coords[ 4 ]; coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); coords[ 0 ] = normalize( coords[ 0 ] ); coords[ 1 ] = normalize( coords[ 1 ] ); coords[ 2 ] = normalize( coords[ 2 ] ); coords[ 3 ] = normalize( coords[ 3 ] ); vec3 vectorFormFactor = vec3( 0.0 ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); return vec3( result ); } #if defined( USE_SHEEN ) float D_Charlie( float roughness, float dotNH ) { float alpha = pow2( roughness ); float invAlpha = 1.0 / alpha; float cos2h = dotNH * dotNH; float sin2h = max( 1.0 - cos2h, 0.0078125 ); return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); } float V_Neubelt( float dotNV, float dotNL ) { return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); } vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { vec3 halfDir = normalize( lightDir + viewDir ); float dotNL = saturate( dot( normal, lightDir ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float D = D_Charlie( sheenRoughness, dotNH ); float V = V_Neubelt( dotNV, dotNL ); return sheenColor * ( D * V ); } #endif float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { float dotNV = saturate( dot( normal, viewDir ) ); float r2 = roughness * roughness; float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); return saturate( DG * RECIPROCAL_PI ); } vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { float dotNV = saturate( dot( normal, viewDir ) ); const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); vec4 r = roughness * c0 + c1; float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; return fab; } vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { vec2 fab = DFGApprox( normal, viewDir, roughness ); return specularColor * fab.x + specularF90 * fab.y; } #ifdef USE_IRIDESCENCE void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { #else void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { #endif vec2 fab = DFGApprox( normal, viewDir, roughness ); #ifdef USE_IRIDESCENCE vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); #else vec3 Fr = specularColor; #endif vec3 FssEss = Fr * fab.x + specularF90 * fab.y; float Ess = fab.x + fab.y; float Ems = 1.0 - Ess; vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); singleScatter += FssEss; multiScatter += Fms * Ems; } #if NUM_RECT_AREA_LIGHTS > 0 void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { vec3 normal = geometryNormal; vec3 viewDir = geometryViewDir; vec3 position = geometryPosition; vec3 lightPos = rectAreaLight.position; vec3 halfWidth = rectAreaLight.halfWidth; vec3 halfHeight = rectAreaLight.halfHeight; vec3 lightColor = rectAreaLight.color; float roughness = material.roughness; vec3 rectCoords[ 4 ]; rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; vec2 uv = LTC_Uv( normal, viewDir, roughness ); vec4 t1 = texture2D( ltc_1, uv ); vec4 t2 = texture2D( ltc_2, uv ); mat3 mInv = mat3( vec3( t1.x, 0, t1.y ), vec3( 0, 1, 0 ), vec3( t1.z, 0, t1.w ) ); vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); } #endif void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; #ifdef USE_CLEARCOAT float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); vec3 ccIrradiance = dotNLcc * directLight.color; clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); #endif #ifdef USE_SHEEN sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); #endif reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { #ifdef USE_CLEARCOAT clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); #endif #ifdef USE_SHEEN sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); #endif vec3 singleScattering = vec3( 0.0 ); vec3 multiScattering = vec3( 0.0 ); vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; #ifdef USE_IRIDESCENCE computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); #else computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); #endif vec3 totalScattering = singleScattering + multiScattering; vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); reflectedLight.indirectSpecular += radiance * singleScattering; reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; } #define RE_Direct RE_Direct_Physical #define RE_Direct_RectArea RE_Direct_RectArea_Physical #define RE_IndirectDiffuse RE_IndirectDiffuse_Physical #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); }`,dRe=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); vec3 geometryClearcoatNormal = vec3( 0.0 ); #ifdef USE_CLEARCOAT geometryClearcoatNormal = clearcoatNormal; #endif #ifdef USE_IRIDESCENCE float dotNVi = saturate( dot( normal, geometryViewDir ) ); if ( material.iridescenceThickness == 0.0 ) { material.iridescence = 0.0; } else { material.iridescence = saturate( material.iridescence ); } if ( material.iridescence > 0.0 ) { material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); } #endif IncidentLight directLight; #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) PointLight pointLight; #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 PointLightShadow pointLightShadow; #endif #pragma unroll_loop_start for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { pointLight = pointLights[ i ]; getPointLightInfo( pointLight, geometryPosition, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) pointLightShadow = pointLightShadows[ i ]; directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; #endif RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); } #pragma unroll_loop_end #endif #if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) SpotLight spotLight; vec4 spotColor; vec3 spotLightCoord; bool inSpotLightMap; #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 SpotLightShadow spotLightShadow; #endif #pragma unroll_loop_start for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { spotLight = spotLights[ i ]; getSpotLightInfo( spotLight, geometryPosition, directLight ); #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS #else #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) #endif #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; #endif #undef SPOT_LIGHT_MAP_INDEX #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) spotLightShadow = spotLightShadows[ i ]; directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; #endif RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); } #pragma unroll_loop_end #endif #if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) DirectionalLight directionalLight; #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 DirectionalLightShadow directionalLightShadow; #endif #pragma unroll_loop_start for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { directionalLight = directionalLights[ i ]; getDirectionalLightInfo( directionalLight, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) directionalLightShadow = directionalLightShadows[ i ]; directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; #endif RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); } #pragma unroll_loop_end #endif #if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) RectAreaLight rectAreaLight; #pragma unroll_loop_start for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { rectAreaLight = rectAreaLights[ i ]; RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); } #pragma unroll_loop_end #endif #if defined( RE_IndirectDiffuse ) vec3 iblIrradiance = vec3( 0.0 ); vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); #if defined( USE_LIGHT_PROBES ) irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); #endif #if ( NUM_HEMI_LIGHTS > 0 ) #pragma unroll_loop_start for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); } #pragma unroll_loop_end #endif #endif #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); #endif`,hRe=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; irradiance += lightMapIrradiance; #endif #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) iblIrradiance += getIBLIrradiance( geometryNormal ); #endif #endif #if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) #ifdef USE_ANISOTROPY radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); #else radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); #endif #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif #endif`,fRe=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif`,pRe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; #endif`,vRe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; #endif`,mRe=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif #endif`,gRe=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); #else if ( isPerspectiveMatrix( projectionMatrix ) ) { gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; gl_Position.z *= gl_Position.w; } #endif #endif`,yRe=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; #endif`,_Re=`#ifdef USE_MAP uniform sampler2D map; #endif`,SRe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; #endif #endif #ifdef USE_MAP diffuseColor *= texture2D( map, uv ); #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; #endif`,bRe=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) uniform mat3 uvTransform; #endif #endif #ifdef USE_MAP uniform sampler2D map; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; #endif`,xRe=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; #endif`,wRe=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; #endif`,TRe=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; #elif defined( USE_COLOR ) if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } #endif`,ARe=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; } #else objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif #endif`,CRe=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; uniform sampler2DArray morphTargetsTexture; uniform ivec2 morphTargetsTextureSize; vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; int y = texelIndex / morphTargetsTextureSize.x; int x = texelIndex - y * morphTargetsTextureSize.x; ivec3 morphUV = ivec3( x, y, morphTargetIndex ); return texelFetch( morphTargetsTexture, morphUV, 0 ); } #else #ifndef USE_MORPHNORMALS uniform float morphTargetInfluences[ 8 ]; #else uniform float morphTargetInfluences[ 4 ]; #endif #endif #endif`,MRe=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; } #else transformed += morphTarget0 * morphTargetInfluences[ 0 ]; transformed += morphTarget1 * morphTargetInfluences[ 1 ]; transformed += morphTarget2 * morphTargetInfluences[ 2 ]; transformed += morphTarget3 * morphTargetInfluences[ 3 ]; #ifndef USE_MORPHNORMALS transformed += morphTarget4 * morphTargetInfluences[ 4 ]; transformed += morphTarget5 * morphTargetInfluences[ 5 ]; transformed += morphTarget6 * morphTargetInfluences[ 6 ]; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif #endif`,ERe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); vec3 normal = normalize( cross( fdx, fdy ) ); #else vec3 normal = normalize( vNormal ); #ifdef DOUBLE_SIDED normal *= faceDirection; #endif #endif #if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) #ifdef USE_TANGENT mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); #else mat3 tbn = getTangentFrame( - vViewPosition, normal, #if defined( USE_NORMALMAP ) vNormalMapUv #elif defined( USE_CLEARCOAT_NORMALMAP ) vClearcoatNormalMapUv #else vUv #endif ); #endif #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) tbn[0] *= faceDirection; tbn[1] *= faceDirection; #endif #endif #ifdef USE_CLEARCOAT_NORMALMAP #ifdef USE_TANGENT mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); #else mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); #endif #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) tbn2[0] *= faceDirection; tbn2[1] *= faceDirection; #endif #endif vec3 nonPerturbedNormal = normal;`,PRe=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; #endif #ifdef DOUBLE_SIDED normal = normal * faceDirection; #endif normal = normalize( normalMatrix * normal ); #elif defined( USE_NORMALMAP_TANGENTSPACE ) vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; mapN.xy *= normalScale; normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); #endif`,RRe=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif`,LRe=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif`,IRe=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif #endif`,DRe=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif #ifdef USE_NORMALMAP_OBJECTSPACE uniform mat3 normalMatrix; #endif #if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { vec3 q0 = dFdx( eye_pos.xyz ); vec3 q1 = dFdy( eye_pos.xyz ); vec2 st0 = dFdx( uv.st ); vec2 st1 = dFdy( uv.st ); vec3 N = surf_norm; vec3 q1perp = cross( q1, N ); vec3 q0perp = cross( N, q0 ); vec3 T = q1perp * st0.x + q0perp * st1.x; vec3 B = q1perp * st0.y + q0perp * st1.y; float det = max( dot( T, T ), dot( B, B ) ); float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } #endif`,NRe=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; #endif`,kRe=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); #endif`,FRe=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP uniform sampler2D clearcoatNormalMap; uniform vec2 clearcoatNormalScale; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; #endif`,ORe=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; #endif`,BRe=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,zRe=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { return 2.0 * rgb.xyz - 1.0; } const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); const float ShiftRight8 = 1. / 256.; vec4 packDepthToRGBA( const in float v ) { vec4 r = vec4( fract( v * PackFactors ), v ); r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; } float unpackRGBAToDepth( const in vec4 v ) { return dot( v, UnpackFactors ); } vec2 packDepthToRG( in highp float v ) { return packDepthToRGBA( v ).yx; } float unpackRGToDepth( const in highp vec2 v ) { return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); } vec4 pack2HalfToRGBA( vec2 v ) { vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); } vec2 unpackRGBATo2Half( vec4 v ) { return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); } float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { return ( viewZ + near ) / ( near - far ); } float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { return depth * ( near - far ) - near; } float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); }`,GRe=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; #endif`,URe=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif #ifdef USE_INSTANCING mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; gl_Position = projectionMatrix * mvPosition;`,VRe=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); #endif`,HRe=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } #endif`,WRe=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; #endif`,jRe=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; #endif`,$Re=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; #endif #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; struct DirectionalLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; struct SpotLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; #endif #if NUM_POINT_LIGHT_SHADOWS > 0 uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; struct PointLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; float shadowCameraNear; float shadowCameraFar; }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); } vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { return unpackRGBATo2Half( texture2D( shadow, uv ) ); } float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ float occlusion = 1.0; vec2 distribution = texture2DDistribution( shadow, uv ); float hard_shadow = step( compare , distribution.x ); if (hard_shadow != 1.0 ) { float distance = compare - distribution.x ; float variance = max( 0.00000, distribution.y * distribution.y ); float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); } return occlusion; } float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { float shadow = 1.0; shadowCoord.xyz /= shadowCoord.w; shadowCoord.z += shadowBias; bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; bool frustumTest = inFrustum && shadowCoord.z <= 1.0; if ( frustumTest ) { #if defined( SHADOWMAP_TYPE_PCF ) vec2 texelSize = vec2( 1.0 ) / shadowMapSize; float dx0 = - texelSize.x * shadowRadius; float dy0 = - texelSize.y * shadowRadius; float dx1 = + texelSize.x * shadowRadius; float dy1 = + texelSize.y * shadowRadius; float dx2 = dx0 / 2.0; float dy2 = dy0 / 2.0; float dx3 = dx1 / 2.0; float dy3 = dy1 / 2.0; shadow = ( texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) ) * ( 1.0 / 17.0 ); #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) vec2 texelSize = vec2( 1.0 ) / shadowMapSize; float dx = texelSize.x; float dy = texelSize.y; vec2 uv = shadowCoord.xy; vec2 f = fract( uv * shadowMapSize + 0.5 ); uv -= f * texelSize; shadow = ( texture2DCompare( shadowMap, uv, shadowCoord.z ) + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), f.x ) + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), f.x ) + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), f.y ) + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), f.y ) + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), f.x ), mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), f.x ), f.y ) ) * ( 1.0 / 9.0 ); #elif defined( SHADOWMAP_TYPE_VSM ) shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); #else shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); #endif } return shadow; } vec2 cubeToUV( vec3 v, float texelSizeY ) { vec3 absV = abs( v ); float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); absV *= scaleToCube; v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); vec2 planar = v.xy; float almostATexel = 1.5 * texelSizeY; float almostOne = 1.0 - almostATexel; if ( absV.z >= almostOne ) { if ( v.z > 0.0 ) planar.x = 4.0 - v.x; } else if ( absV.x >= almostOne ) { float signX = sign( v.x ); planar.x = v.z * signX + 2.0 * signX; } else if ( absV.y >= almostOne ) { float signY = sign( v.y ); planar.x = v.x + 2.0 * signY + 2.0; planar.y = v.z * signY - 2.0; } return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); } float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); vec3 lightToPosition = shadowCoord.xyz; float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; vec3 bd3D = normalize( lightToPosition ); #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; return ( texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) ) * ( 1.0 / 9.0 ); #else return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } #endif`,qRe=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; struct DirectionalLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 struct SpotLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; #endif #if NUM_POINT_LIGHT_SHADOWS > 0 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; struct PointLightShadow { float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; float shadowCameraNear; float shadowCameraFar; }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif #endif`,XRe=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif #if defined( USE_SHADOWMAP ) #if NUM_DIR_LIGHT_SHADOWS > 0 #pragma unroll_loop_start for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end #endif #if NUM_POINT_LIGHT_SHADOWS > 0 #pragma unroll_loop_start for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end #endif #endif #if NUM_SPOT_LIGHT_COORDS > 0 #pragma unroll_loop_start for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { shadowWorldPosition = worldPosition; #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; #endif vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end #endif`,YRe=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 DirectionalLightShadow directionalLight; #pragma unroll_loop_start for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { directionalLight = directionalLightShadows[ i ]; shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; } #pragma unroll_loop_end #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 SpotLightShadow spotLight; #pragma unroll_loop_start for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { spotLight = spotLightShadows[ i ]; shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; } #pragma unroll_loop_end #endif #if NUM_POINT_LIGHT_SHADOWS > 0 PointLightShadow pointLight; #pragma unroll_loop_start for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { pointLight = pointLightShadows[ i ]; shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; } #pragma unroll_loop_end #endif #endif return shadow; }`,KRe=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); #endif`,ZRe=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; mat4 getBoneMatrix( const in float i ) { int size = textureSize( boneTexture, 0 ).x; int j = int( i ) * 4; int x = j % size; int y = j / size; vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } #endif`,JRe=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; skinned += boneMatY * skinVertex * skinWeight.y; skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; #endif`,QRe=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; skinMatrix += skinWeight.z * boneMatZ; skinMatrix += skinWeight.w * boneMatW; skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif #endif`,eLe=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; #endif`,tLe=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; #endif`,nLe=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); #endif`,iLe=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; vec3 LinearToneMapping( vec3 color ) { return saturate( toneMappingExposure * color ); } vec3 ReinhardToneMapping( vec3 color ) { color *= toneMappingExposure; return saturate( color / ( vec3( 1.0 ) + color ) ); } vec3 OptimizedCineonToneMapping( vec3 color ) { color *= toneMappingExposure; color = max( vec3( 0.0 ), color - 0.004 ); return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); } vec3 RRTAndODTFit( vec3 v ) { vec3 a = v * ( v + 0.0245786 ) - 0.000090537; vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; return a / b; } vec3 ACESFilmicToneMapping( vec3 color ) { const mat3 ACESInputMat = mat3( vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), vec3( 0.04823, 0.01566, 0.83777 ) ); const mat3 ACESOutputMat = mat3( vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), vec3( -0.07367, -0.00605, 1.07602 ) ); color *= toneMappingExposure / 0.6; color = ACESInputMat * color; color = RRTAndODTFit( color ); color = ACESOutputMat * color; return saturate( color ); } const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( vec3( 1.6605, - 0.1246, - 0.0182 ), vec3( - 0.5876, 1.1329, - 0.1006 ), vec3( - 0.0728, - 0.0083, 1.1187 ) ); const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( vec3( 0.6274, 0.0691, 0.0164 ), vec3( 0.3293, 0.9195, 0.0880 ), vec3( 0.0433, 0.0113, 0.8956 ) ); vec3 agxDefaultContrastApprox( vec3 x ) { vec3 x2 = x * x; vec3 x4 = x2 * x2; return + 15.5 * x4 * x2 - 40.14 * x4 * x + 31.96 * x4 - 6.868 * x2 * x + 0.4298 * x2 + 0.1191 * x - 0.00232; } vec3 AgXToneMapping( vec3 color ) { const mat3 AgXInsetMatrix = mat3( vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) ); const mat3 AgXOutsetMatrix = mat3( vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) ); const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; color *= toneMappingExposure; color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; color = AgXInsetMatrix * color; color = max( color, 1e-10 ); color = log2( color ); color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); color = clamp( color, 0.0, 1.0 ); color = agxDefaultContrastApprox( color ); color = AgXOutsetMatrix * color; color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); color = LINEAR_REC2020_TO_LINEAR_SRGB * color; color = clamp( color, 0.0, 1.0 ); return color; } vec3 CustomToneMapping( vec3 color ) { return color; }`,rLe=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; material.attenuationDistance = attenuationDistance; material.attenuationColor = attenuationColor; #ifdef USE_TRANSMISSIONMAP material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; #endif #ifdef USE_THICKNESSMAP material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; #endif vec3 pos = vWorldPosition; vec3 v = normalize( cameraPosition - pos ); vec3 n = inverseTransformDirection( normal, viewMatrix ); vec4 transmitted = getIBLVolumeRefraction( n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); #endif`,aLe=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; uniform vec3 attenuationColor; #ifdef USE_TRANSMISSIONMAP uniform sampler2D transmissionMap; #endif #ifdef USE_THICKNESSMAP uniform sampler2D thicknessMap; #endif uniform vec2 transmissionSamplerSize; uniform sampler2D transmissionSamplerMap; uniform mat4 modelMatrix; uniform mat4 projectionMatrix; varying vec3 vWorldPosition; float w0( float a ) { return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); } float w1( float a ) { return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); } float w2( float a ){ return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); } float w3( float a ) { return ( 1.0 / 6.0 ) * ( a * a * a ); } float g0( float a ) { return w0( a ) + w1( a ); } float g1( float a ) { return w2( a ) + w3( a ); } float h0( float a ) { return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); } float h1( float a ) { return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); } vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { uv = uv * texelSize.zw + 0.5; vec2 iuv = floor( uv ); vec2 fuv = fract( uv ); float g0x = g0( fuv.x ); float g1x = g1( fuv.x ); float h0x = h0( fuv.x ); float h1x = h1( fuv.x ); float h0y = h0( fuv.y ); float h1y = h1( fuv.y ); vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); } vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); vec2 fLodSizeInv = 1.0 / fLodSize; vec2 cLodSizeInv = 1.0 / cLodSize; vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); return mix( fSample, cSample, fract( lod ) ); } vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); vec3 modelScale; modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); return normalize( refractionVector ) * thickness * modelScale; } float applyIorToRoughness( const in float roughness, const in float ior ) { return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); } vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); } vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { if ( isinf( attenuationDistance ) ) { return vec3( 1.0 ); } else { vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; } } vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, const in vec3 attenuationColor, const in float attenuationDistance ) { vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); vec3 refractedRayExit = position + transmissionRay; vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); vec2 refractionCoords = ndcPos.xy / ndcPos.w; refractionCoords += 1.0; refractionCoords /= 2.0; vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); vec3 attenuatedColor = transmittance * transmittedLight.rgb; vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } #endif`,oLe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP varying vec2 vMapUv; #endif #ifdef USE_ALPHAMAP varying vec2 vAlphaMapUv; #endif #ifdef USE_LIGHTMAP varying vec2 vLightMapUv; #endif #ifdef USE_AOMAP varying vec2 vAoMapUv; #endif #ifdef USE_BUMPMAP varying vec2 vBumpMapUv; #endif #ifdef USE_NORMALMAP varying vec2 vNormalMapUv; #endif #ifdef USE_EMISSIVEMAP varying vec2 vEmissiveMapUv; #endif #ifdef USE_METALNESSMAP varying vec2 vMetalnessMapUv; #endif #ifdef USE_ROUGHNESSMAP varying vec2 vRoughnessMapUv; #endif #ifdef USE_ANISOTROPYMAP varying vec2 vAnisotropyMapUv; #endif #ifdef USE_CLEARCOATMAP varying vec2 vClearcoatMapUv; #endif #ifdef USE_CLEARCOAT_NORMALMAP varying vec2 vClearcoatNormalMapUv; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP varying vec2 vClearcoatRoughnessMapUv; #endif #ifdef USE_IRIDESCENCEMAP varying vec2 vIridescenceMapUv; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP varying vec2 vIridescenceThicknessMapUv; #endif #ifdef USE_SHEEN_COLORMAP varying vec2 vSheenColorMapUv; #endif #ifdef USE_SHEEN_ROUGHNESSMAP varying vec2 vSheenRoughnessMapUv; #endif #ifdef USE_SPECULARMAP varying vec2 vSpecularMapUv; #endif #ifdef USE_SPECULAR_COLORMAP varying vec2 vSpecularColorMapUv; #endif #ifdef USE_SPECULAR_INTENSITYMAP varying vec2 vSpecularIntensityMapUv; #endif #ifdef USE_TRANSMISSIONMAP uniform mat3 transmissionMapTransform; varying vec2 vTransmissionMapUv; #endif #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; #endif`,sLe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP uniform mat3 mapTransform; varying vec2 vMapUv; #endif #ifdef USE_ALPHAMAP uniform mat3 alphaMapTransform; varying vec2 vAlphaMapUv; #endif #ifdef USE_LIGHTMAP uniform mat3 lightMapTransform; varying vec2 vLightMapUv; #endif #ifdef USE_AOMAP uniform mat3 aoMapTransform; varying vec2 vAoMapUv; #endif #ifdef USE_BUMPMAP uniform mat3 bumpMapTransform; varying vec2 vBumpMapUv; #endif #ifdef USE_NORMALMAP uniform mat3 normalMapTransform; varying vec2 vNormalMapUv; #endif #ifdef USE_DISPLACEMENTMAP uniform mat3 displacementMapTransform; varying vec2 vDisplacementMapUv; #endif #ifdef USE_EMISSIVEMAP uniform mat3 emissiveMapTransform; varying vec2 vEmissiveMapUv; #endif #ifdef USE_METALNESSMAP uniform mat3 metalnessMapTransform; varying vec2 vMetalnessMapUv; #endif #ifdef USE_ROUGHNESSMAP uniform mat3 roughnessMapTransform; varying vec2 vRoughnessMapUv; #endif #ifdef USE_ANISOTROPYMAP uniform mat3 anisotropyMapTransform; varying vec2 vAnisotropyMapUv; #endif #ifdef USE_CLEARCOATMAP uniform mat3 clearcoatMapTransform; varying vec2 vClearcoatMapUv; #endif #ifdef USE_CLEARCOAT_NORMALMAP uniform mat3 clearcoatNormalMapTransform; varying vec2 vClearcoatNormalMapUv; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform mat3 clearcoatRoughnessMapTransform; varying vec2 vClearcoatRoughnessMapUv; #endif #ifdef USE_SHEEN_COLORMAP uniform mat3 sheenColorMapTransform; varying vec2 vSheenColorMapUv; #endif #ifdef USE_SHEEN_ROUGHNESSMAP uniform mat3 sheenRoughnessMapTransform; varying vec2 vSheenRoughnessMapUv; #endif #ifdef USE_IRIDESCENCEMAP uniform mat3 iridescenceMapTransform; varying vec2 vIridescenceMapUv; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform mat3 iridescenceThicknessMapTransform; varying vec2 vIridescenceThicknessMapUv; #endif #ifdef USE_SPECULARMAP uniform mat3 specularMapTransform; varying vec2 vSpecularMapUv; #endif #ifdef USE_SPECULAR_COLORMAP uniform mat3 specularColorMapTransform; varying vec2 vSpecularColorMapUv; #endif #ifdef USE_SPECULAR_INTENSITYMAP uniform mat3 specularIntensityMapTransform; varying vec2 vSpecularIntensityMapUv; #endif #ifdef USE_TRANSMISSIONMAP uniform mat3 transmissionMapTransform; varying vec2 vTransmissionMapUv; #endif #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; #endif`,lLe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; #endif #ifdef USE_ALPHAMAP vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; #endif #ifdef USE_LIGHTMAP vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; #endif #ifdef USE_AOMAP vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; #endif #ifdef USE_BUMPMAP vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; #endif #ifdef USE_NORMALMAP vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; #endif #ifdef USE_DISPLACEMENTMAP vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; #endif #ifdef USE_EMISSIVEMAP vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; #endif #ifdef USE_METALNESSMAP vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_ROUGHNESSMAP vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_ANISOTROPYMAP vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; #endif #ifdef USE_CLEARCOATMAP vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; #endif #ifdef USE_CLEARCOAT_NORMALMAP vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_IRIDESCENCEMAP vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_SHEEN_COLORMAP vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; #endif #ifdef USE_SHEEN_ROUGHNESSMAP vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_SPECULARMAP vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; #endif #ifdef USE_SPECULAR_COLORMAP vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; #endif #ifdef USE_SPECULAR_INTENSITYMAP vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; #endif #ifdef USE_TRANSMISSIONMAP vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; #endif`,uLe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; #endif #ifdef USE_INSTANCING worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; #endif`;const cLe=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); }`,dLe=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { vec4 texColor = texture2D( t2D, vUv ); #ifdef DECODE_VIDEO_TEXTURE texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); #endif texColor.rgb *= backgroundIntensity; gl_FragColor = texColor; #include #include }`,hLe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; }`,fLe=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; #endif uniform float flipEnvMap; uniform float backgroundBlurriness; uniform float backgroundIntensity; varying vec3 vWorldDirection; #include void main() { #ifdef ENVMAP_TYPE_CUBE vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); #elif defined( ENVMAP_TYPE_CUBE_UV ) vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); #else vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); #endif texColor.rgb *= backgroundIntensity; gl_FragColor = texColor; #include #include }`,pLe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; }`,vLe=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; void main() { vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); gl_FragColor = texColor; gl_FragColor.a *= opacity; #include #include }`,mLe=`#include #include #include #include #include #include #include #include varying vec2 vHighPrecisionZW; void main() { #include #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include vHighPrecisionZW = gl_Position.zw; }`,gLe=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include #include #include #include #include #include #include #include #include varying vec2 vHighPrecisionZW; void main() { vec4 diffuseColor = vec4( 1.0 ); #include #if DEPTH_PACKING == 3200 diffuseColor.a = opacity; #endif #include #include #include #include #include float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; #if DEPTH_PACKING == 3200 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif }`,yLe=`#define DISTANCE varying vec3 vWorldPosition; #include #include #include #include #include #include #include void main() { #include #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include vWorldPosition = worldPosition.xyz; }`,_Le=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; varying vec3 vWorldPosition; #include #include #include #include #include #include #include #include void main () { vec4 diffuseColor = vec4( 1.0 ); #include #include #include #include #include float dist = length( vWorldPosition - referencePosition ); dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); }`,SLe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include }`,bLe=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { vec3 direction = normalize( vWorldDirection ); vec2 sampleUV = equirectUv( direction ); gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include }`,xLe=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include #include #include #include #include #include #include void main() { vLineDistance = scale * lineDistance; #include #include #include #include #include #include #include #include #include }`,wLe=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; varying float vLineDistance; #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include if ( mod( vLineDistance, totalSize ) > dashSize ) { discard; } vec3 outgoingLight = vec3( 0.0 ); #include #include #include outgoingLight = diffuseColor.rgb; #include #include #include #include #include }`,TLe=`#include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) #include #include #include #include #include #endif #include #include #include #include #include #include #include #include #include }`,ALe=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include #include #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; #else reflectedLight.indirectDiffuse += vec3( 1.0 ); #endif #include reflectedLight.indirectDiffuse *= diffuseColor.rgb; vec3 outgoingLight = reflectedLight.indirectDiffuse; #include #include #include #include #include #include #include }`,CLe=`#define LAMBERT varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #include }`,MLe=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; #include #include #include #include #include #include #include }`,ELe=`#define MATCAP varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; }`,PLe=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include #include #include #include vec3 viewDir = normalize( vViewPosition ); vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); vec3 y = cross( viewDir, x ); vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; #ifdef USE_MATCAP vec4 matcapColor = texture2D( matcap, uv ); #else vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); #endif vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; #include #include #include #include #include #include }`,RLe=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif }`,LLe=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); #include #include #include #include gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); #ifdef OPAQUE gl_FragColor.a = 1.0; #endif }`,ILe=`#define PHONG varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #include }`,DLe=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; uniform float shininess; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; #include #include #include #include #include #include #include }`,NLe=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; #endif #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif }`,kLe=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR #endif uniform vec3 diffuse; uniform vec3 emissive; uniform float roughness; uniform float metalness; uniform float opacity; #ifdef IOR uniform float ior; #endif #ifdef USE_SPECULAR uniform float specularIntensity; uniform vec3 specularColor; #ifdef USE_SPECULAR_COLORMAP uniform sampler2D specularColorMap; #endif #ifdef USE_SPECULAR_INTENSITYMAP uniform sampler2D specularIntensityMap; #endif #endif #ifdef USE_CLEARCOAT uniform float clearcoat; uniform float clearcoatRoughness; #endif #ifdef USE_IRIDESCENCE uniform float iridescence; uniform float iridescenceIOR; uniform float iridescenceThicknessMinimum; uniform float iridescenceThicknessMaximum; #endif #ifdef USE_SHEEN uniform vec3 sheenColor; uniform float sheenRoughness; #ifdef USE_SHEEN_COLORMAP uniform sampler2D sheenColorMap; #endif #ifdef USE_SHEEN_ROUGHNESSMAP uniform sampler2D sheenRoughnessMap; #endif #endif #ifdef USE_ANISOTROPY uniform vec2 anisotropyVector; #ifdef USE_ANISOTROPYMAP uniform sampler2D anisotropyMap; #endif #endif varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; #include vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; #ifdef USE_SHEEN float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; #endif #ifdef USE_CLEARCOAT float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; #endif #include #include #include #include #include #include }`,FLe=`#define TOON varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include }`,OLe=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; #include #include #include #include #include #include }`,BLe=`uniform float size; uniform float scale; #include #include #include #include #include #include #ifdef USE_POINTS_UV varying vec2 vUv; uniform mat3 uvTransform; #endif void main() { #ifdef USE_POINTS_UV vUv = ( uvTransform * vec3( uv, 1 ) ).xy; #endif #include #include #include #include #include gl_PointSize = size; #ifdef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); #endif #include #include #include #include }`,zLe=`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include vec3 outgoingLight = vec3( 0.0 ); #include #include #include #include #include outgoingLight = diffuseColor.rgb; #include #include #include #include #include }`,GLe=`#include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include }`,ULe=`uniform vec3 color; uniform float opacity; #include #include #include #include #include #include #include #include void main() { #include gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); #include #include #include }`,VLe=`uniform float rotation; uniform vec2 center; #include #include #include #include #include void main() { #include vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); vec2 scale; scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); #ifndef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) scale *= - mvPosition.z; #endif vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; vec2 rotatedPosition; rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; mvPosition.xy += rotatedPosition; gl_Position = projectionMatrix * mvPosition; #include #include #include }`,HLe=`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include vec3 outgoingLight = vec3( 0.0 ); #include #include #include #include #include outgoingLight = diffuseColor.rgb; #include #include #include #include }`,ji={alphahash_fragment:dPe,alphahash_pars_fragment:hPe,alphamap_fragment:fPe,alphamap_pars_fragment:pPe,alphatest_fragment:vPe,alphatest_pars_fragment:mPe,aomap_fragment:gPe,aomap_pars_fragment:yPe,batching_pars_vertex:_Pe,batching_vertex:SPe,begin_vertex:bPe,beginnormal_vertex:xPe,bsdfs:wPe,iridescence_fragment:TPe,bumpmap_pars_fragment:APe,clipping_planes_fragment:CPe,clipping_planes_pars_fragment:MPe,clipping_planes_pars_vertex:EPe,clipping_planes_vertex:PPe,color_fragment:RPe,color_pars_fragment:LPe,color_pars_vertex:IPe,color_vertex:DPe,common:NPe,cube_uv_reflection_fragment:kPe,defaultnormal_vertex:FPe,displacementmap_pars_vertex:OPe,displacementmap_vertex:BPe,emissivemap_fragment:zPe,emissivemap_pars_fragment:GPe,colorspace_fragment:UPe,colorspace_pars_fragment:VPe,envmap_fragment:HPe,envmap_common_pars_fragment:WPe,envmap_pars_fragment:jPe,envmap_pars_vertex:$Pe,envmap_physical_pars_fragment:rRe,envmap_vertex:qPe,fog_vertex:XPe,fog_pars_vertex:YPe,fog_fragment:KPe,fog_pars_fragment:ZPe,gradientmap_pars_fragment:JPe,lightmap_fragment:QPe,lightmap_pars_fragment:eRe,lights_lambert_fragment:tRe,lights_lambert_pars_fragment:nRe,lights_pars_begin:iRe,lights_toon_fragment:aRe,lights_toon_pars_fragment:oRe,lights_phong_fragment:sRe,lights_phong_pars_fragment:lRe,lights_physical_fragment:uRe,lights_physical_pars_fragment:cRe,lights_fragment_begin:dRe,lights_fragment_maps:hRe,lights_fragment_end:fRe,logdepthbuf_fragment:pRe,logdepthbuf_pars_fragment:vRe,logdepthbuf_pars_vertex:mRe,logdepthbuf_vertex:gRe,map_fragment:yRe,map_pars_fragment:_Re,map_particle_fragment:SRe,map_particle_pars_fragment:bRe,metalnessmap_fragment:xRe,metalnessmap_pars_fragment:wRe,morphcolor_vertex:TRe,morphnormal_vertex:ARe,morphtarget_pars_vertex:CRe,morphtarget_vertex:MRe,normal_fragment_begin:ERe,normal_fragment_maps:PRe,normal_pars_fragment:RRe,normal_pars_vertex:LRe,normal_vertex:IRe,normalmap_pars_fragment:DRe,clearcoat_normal_fragment_begin:NRe,clearcoat_normal_fragment_maps:kRe,clearcoat_pars_fragment:FRe,iridescence_pars_fragment:ORe,opaque_fragment:BRe,packing:zRe,premultiplied_alpha_fragment:GRe,project_vertex:URe,dithering_fragment:VRe,dithering_pars_fragment:HRe,roughnessmap_fragment:WRe,roughnessmap_pars_fragment:jRe,shadowmap_pars_fragment:$Re,shadowmap_pars_vertex:qRe,shadowmap_vertex:XRe,shadowmask_pars_fragment:YRe,skinbase_vertex:KRe,skinning_pars_vertex:ZRe,skinning_vertex:JRe,skinnormal_vertex:QRe,specularmap_fragment:eLe,specularmap_pars_fragment:tLe,tonemapping_fragment:nLe,tonemapping_pars_fragment:iLe,transmission_fragment:rLe,transmission_pars_fragment:aLe,uv_pars_fragment:oLe,uv_pars_vertex:sLe,uv_vertex:lLe,worldpos_vertex:uLe,background_vert:cLe,background_frag:dLe,backgroundCube_vert:hLe,backgroundCube_frag:fLe,cube_vert:pLe,cube_frag:vLe,depth_vert:mLe,depth_frag:gLe,distanceRGBA_vert:yLe,distanceRGBA_frag:_Le,equirect_vert:SLe,equirect_frag:bLe,linedashed_vert:xLe,linedashed_frag:wLe,meshbasic_vert:TLe,meshbasic_frag:ALe,meshlambert_vert:CLe,meshlambert_frag:MLe,meshmatcap_vert:ELe,meshmatcap_frag:PLe,meshnormal_vert:RLe,meshnormal_frag:LLe,meshphong_vert:ILe,meshphong_frag:DLe,meshphysical_vert:NLe,meshphysical_frag:kLe,meshtoon_vert:FLe,meshtoon_frag:OLe,points_vert:BLe,points_frag:zLe,shadow_vert:GLe,shadow_frag:ULe,sprite_vert:VLe,sprite_frag:HLe},Pn={common:{diffuse:{value:new Jn(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new ar},alphaMap:{value:null},alphaMapTransform:{value:new ar},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new ar}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new ar}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new ar}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new ar},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new ar},normalScale:{value:new on(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new ar},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new ar}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new ar}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new ar}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Jn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Jn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new ar},alphaTest:{value:0},uvTransform:{value:new ar}},sprite:{diffuse:{value:new Jn(16777215)},opacity:{value:1},center:{value:new on(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new ar},alphaMap:{value:null},alphaMapTransform:{value:new ar},alphaTest:{value:0}}},qs={basic:{uniforms:ws([Pn.common,Pn.specularmap,Pn.envmap,Pn.aomap,Pn.lightmap,Pn.fog]),vertexShader:ji.meshbasic_vert,fragmentShader:ji.meshbasic_frag},lambert:{uniforms:ws([Pn.common,Pn.specularmap,Pn.envmap,Pn.aomap,Pn.lightmap,Pn.emissivemap,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.fog,Pn.lights,{emissive:{value:new Jn(0)}}]),vertexShader:ji.meshlambert_vert,fragmentShader:ji.meshlambert_frag},phong:{uniforms:ws([Pn.common,Pn.specularmap,Pn.envmap,Pn.aomap,Pn.lightmap,Pn.emissivemap,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.fog,Pn.lights,{emissive:{value:new Jn(0)},specular:{value:new Jn(1118481)},shininess:{value:30}}]),vertexShader:ji.meshphong_vert,fragmentShader:ji.meshphong_frag},standard:{uniforms:ws([Pn.common,Pn.envmap,Pn.aomap,Pn.lightmap,Pn.emissivemap,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.roughnessmap,Pn.metalnessmap,Pn.fog,Pn.lights,{emissive:{value:new Jn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ji.meshphysical_vert,fragmentShader:ji.meshphysical_frag},toon:{uniforms:ws([Pn.common,Pn.aomap,Pn.lightmap,Pn.emissivemap,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.gradientmap,Pn.fog,Pn.lights,{emissive:{value:new Jn(0)}}]),vertexShader:ji.meshtoon_vert,fragmentShader:ji.meshtoon_frag},matcap:{uniforms:ws([Pn.common,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,Pn.fog,{matcap:{value:null}}]),vertexShader:ji.meshmatcap_vert,fragmentShader:ji.meshmatcap_frag},points:{uniforms:ws([Pn.points,Pn.fog]),vertexShader:ji.points_vert,fragmentShader:ji.points_frag},dashed:{uniforms:ws([Pn.common,Pn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ji.linedashed_vert,fragmentShader:ji.linedashed_frag},depth:{uniforms:ws([Pn.common,Pn.displacementmap]),vertexShader:ji.depth_vert,fragmentShader:ji.depth_frag},normal:{uniforms:ws([Pn.common,Pn.bumpmap,Pn.normalmap,Pn.displacementmap,{opacity:{value:1}}]),vertexShader:ji.meshnormal_vert,fragmentShader:ji.meshnormal_frag},sprite:{uniforms:ws([Pn.sprite,Pn.fog]),vertexShader:ji.sprite_vert,fragmentShader:ji.sprite_frag},background:{uniforms:{uvTransform:{value:new ar},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ji.background_vert,fragmentShader:ji.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:ji.backgroundCube_vert,fragmentShader:ji.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ji.cube_vert,fragmentShader:ji.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ji.equirect_vert,fragmentShader:ji.equirect_frag},distanceRGBA:{uniforms:ws([Pn.common,Pn.displacementmap,{referencePosition:{value:new Le},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ji.distanceRGBA_vert,fragmentShader:ji.distanceRGBA_frag},shadow:{uniforms:ws([Pn.lights,Pn.fog,{color:{value:new Jn(0)},opacity:{value:1}}]),vertexShader:ji.shadow_vert,fragmentShader:ji.shadow_frag}};qs.physical={uniforms:ws([qs.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new ar},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new ar},clearcoatNormalScale:{value:new on(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new ar},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new ar},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new ar},sheen:{value:0},sheenColor:{value:new Jn(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new ar},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new ar},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new ar},transmissionSamplerSize:{value:new on},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new ar},attenuationDistance:{value:0},attenuationColor:{value:new Jn(0)},specularColor:{value:new Jn(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new ar},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new ar},anisotropyVector:{value:new on},anisotropyMap:{value:null},anisotropyMapTransform:{value:new ar}}]),vertexShader:ji.meshphysical_vert,fragmentShader:ji.meshphysical_frag};const o4={r:0,b:0,g:0};function WLe(n,e,t,i,r,a,o){const s=new Jn(0);let l=a===!0?0:1,u,c,d=null,h=0,f=null;function p(v,g){let _=!1,S=g.isScene===!0?g.background:null;S&&S.isTexture&&(S=(g.backgroundBlurriness>0?t:e).get(S)),S===null?m(s,l):S&&S.isColor&&(m(S,1),_=!0);const x=n.xr.getEnvironmentBlendMode();x==="additive"?i.buffers.color.setClear(0,0,0,1,o):x==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||_)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),S&&(S.isCubeTexture||S.mapping===n7)?(c===void 0&&(c=new fr(new em(1,1,1),new Jc({name:"BackgroundCubeMaterial",uniforms:Mv(qs.backgroundCube.uniforms),vertexShader:qs.backgroundCube.vertexShader,fragmentShader:qs.backgroundCube.fragmentShader,side:rl,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(A,C,M){this.matrixWorld.copyPosition(M.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(c)),c.material.uniforms.envMap.value=S,c.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,c.material.toneMapped=Br.getTransfer(S.colorSpace)!==ma,(d!==S||h!==S.version||f!==n.toneMapping)&&(c.material.needsUpdate=!0,d=S,h=S.version,f=n.toneMapping),c.layers.enableAll(),v.unshift(c,c.geometry,c.material,0,0,null)):S&&S.isTexture&&(u===void 0&&(u=new fr(new Al(2,2),new Jc({name:"BackgroundMaterial",uniforms:Mv(qs.background.uniforms),vertexShader:qs.background.vertexShader,fragmentShader:qs.background.fragmentShader,side:Zc,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=S,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.toneMapped=Br.getTransfer(S.colorSpace)!==ma,S.matrixAutoUpdate===!0&&S.updateMatrix(),u.material.uniforms.uvTransform.value.copy(S.matrix),(d!==S||h!==S.version||f!==n.toneMapping)&&(u.material.needsUpdate=!0,d=S,h=S.version,f=n.toneMapping),u.layers.enableAll(),v.unshift(u,u.geometry,u.material,0,0,null))}function m(v,g){v.getRGB(o4,UQ(n)),i.buffers.color.setClear(o4.r,o4.g,o4.b,g,o)}return{getClearColor:function(){return s},setClearColor:function(v,g=1){s.set(v),l=g,m(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(v){l=v,m(s,l)},render:p}}function jLe(n,e,t,i){const r=n.getParameter(n.MAX_VERTEX_ATTRIBS),a=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||a!==null,s={},l=v(null);let u=l,c=!1;function d(G,W,Y,Q,K){let ae=!1;if(o){const ie=m(Q,Y,W);u!==ie&&(u=ie,f(u.object)),ae=g(G,Q,Y,K),ae&&_(G,Q,Y,K)}else{const ie=W.wireframe===!0;(u.geometry!==Q.id||u.program!==Y.id||u.wireframe!==ie)&&(u.geometry=Q.id,u.program=Y.id,u.wireframe=ie,ae=!0)}K!==null&&t.update(K,n.ELEMENT_ARRAY_BUFFER),(ae||c)&&(c=!1,I(G,W,Y,Q),K!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(K).buffer))}function h(){return i.isWebGL2?n.createVertexArray():a.createVertexArrayOES()}function f(G){return i.isWebGL2?n.bindVertexArray(G):a.bindVertexArrayOES(G)}function p(G){return i.isWebGL2?n.deleteVertexArray(G):a.deleteVertexArrayOES(G)}function m(G,W,Y){const Q=Y.wireframe===!0;let K=s[G.id];K===void 0&&(K={},s[G.id]=K);let ae=K[W.id];ae===void 0&&(ae={},K[W.id]=ae);let ie=ae[Q];return ie===void 0&&(ie=v(h()),ae[Q]=ie),ie}function v(G){const W=[],Y=[],Q=[];for(let K=0;K=0){const xe=K[Ee];let Fe=ae[Ee];if(Fe===void 0&&(Ee==="instanceMatrix"&&G.instanceMatrix&&(Fe=G.instanceMatrix),Ee==="instanceColor"&&G.instanceColor&&(Fe=G.instanceColor)),xe===void 0||xe.attribute!==Fe||Fe&&xe.data!==Fe.data)return!0;ie++}return u.attributesNum!==ie||u.index!==Q}function _(G,W,Y,Q){const K={},ae=W.attributes;let ie=0;const he=Y.getAttributes();for(const Ee in he)if(he[Ee].location>=0){let xe=ae[Ee];xe===void 0&&(Ee==="instanceMatrix"&&G.instanceMatrix&&(xe=G.instanceMatrix),Ee==="instanceColor"&&G.instanceColor&&(xe=G.instanceColor));const Fe={};Fe.attribute=xe,xe&&xe.data&&(Fe.data=xe.data),K[Ee]=Fe,ie++}u.attributes=K,u.attributesNum=ie,u.index=Q}function S(){const G=u.newAttributes;for(let W=0,Y=G.length;W=0){let He=K[he];if(He===void 0&&(he==="instanceMatrix"&&G.instanceMatrix&&(He=G.instanceMatrix),he==="instanceColor"&&G.instanceColor&&(He=G.instanceColor)),He!==void 0){const xe=He.normalized,Fe=He.itemSize,pt=t.get(He);if(pt===void 0)continue;const Ot=pt.buffer,bt=pt.type,ht=pt.bytesPerElement,Kt=i.isWebGL2===!0&&(bt===n.INT||bt===n.UNSIGNED_INT||He.gpuType===TQ);if(He.isInterleavedBufferAttribute){const Tt=He.data,Ae=Tt.stride,Lt=He.offset;if(Tt.isInstancedInterleavedBuffer){for(let vt=0;vt0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";M="mediump"}return M==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext!="undefined"&&n.constructor.name==="WebGL2RenderingContext";let s=t.precision!==void 0?t.precision:"highp";const l=a(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);const u=o||e.has("WEBGL_draw_buffers"),c=t.logarithmicDepthBuffer===!0,d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),h=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=n.getParameter(n.MAX_TEXTURE_SIZE),p=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),m=n.getParameter(n.MAX_VERTEX_ATTRIBS),v=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),g=n.getParameter(n.MAX_VARYING_VECTORS),_=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),S=h>0,x=o||e.has("OES_texture_float"),A=S&&x,C=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:r,getMaxPrecision:a,precision:s,logarithmicDepthBuffer:c,maxTextures:d,maxVertexTextures:h,maxTextureSize:f,maxCubemapSize:p,maxAttributes:m,maxVertexUniforms:v,maxVaryings:g,maxFragmentUniforms:_,vertexTextures:S,floatFragmentTextures:x,floatVertexTextures:A,maxSamples:C}}function XLe(n){const e=this;let t=null,i=0,r=!1,a=!1;const o=new jd,s=new ar,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,h){const f=d.length!==0||h||i!==0||r;return r=h,i=d.length,f},this.beginShadows=function(){a=!0,c(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(d,h){t=c(d,h,0)},this.setState=function(d,h,f){const p=d.clippingPlanes,m=d.clipIntersection,v=d.clipShadows,g=n.get(d);if(!r||p===null||p.length===0||a&&!v)a?c(null):u();else{const _=a?0:i,S=_*4;let x=g.clippingState||null;l.value=x,x=c(p,h,S,f);for(let A=0;A!==S;++A)x[A]=t[A];g.clippingState=x,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=_}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function c(d,h,f,p){const m=d!==null?d.length:0;let v=null;if(m!==0){if(v=l.value,p!==!0||v===null){const g=f+m*4,_=h.matrixWorldInverse;s.getNormalMatrix(_),(v===null||v.length0){const u=new sPe(l.height);return u.fromEquirectangularTexture(n,o),e.set(o,u),o.addEventListener("dispose",r),t(u.texture,o.mapping)}else return null}}return o}function r(o){const s=o.target;s.removeEventListener("dispose",r);const l=e.get(s);l!==void 0&&(e.delete(s),l.dispose())}function a(){e=new WeakMap}return{get:i,dispose:a}}class a7 extends VQ{constructor(e=-1,t=1,i=1,r=-1,a=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=a,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,a,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let a=i-e,o=i+e,s=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a+=u*this.view.offsetX,o=a+u*this.view.width,s-=c*this.view.offsetY,l=s-c*this.view.height}this.projectionMatrix.makeOrthographic(a,o,s,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const N2=4,lV=[.125,.215,.35,.446,.526,.582],tp=20,qw=new a7,uV=new Jn;let Xw=null,Yw=0,Kw=0;const qf=(1+Math.sqrt(5))/2,d2=1/qf,cV=[new Le(1,1,1),new Le(-1,1,1),new Le(1,1,-1),new Le(-1,1,-1),new Le(0,qf,d2),new Le(0,qf,-d2),new Le(d2,0,qf),new Le(-d2,0,qf),new Le(qf,d2,0),new Le(-qf,d2,0)];class dV{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){Xw=this._renderer.getRenderTarget(),Yw=this._renderer.getActiveCubeFace(),Kw=this._renderer.getActiveMipmapLevel(),this._setSize(256);const a=this._allocateTargets();return a.depthBuffer=!0,this._sceneToCubeUV(e,i,r,a),t>0&&this._blur(a,0,0,t),this._applyPMREM(a),this._cleanup(a),a}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=pV(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=fV(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?S:0,S,S),c.setRenderTarget(r),m&&c.render(p,s),c.render(e,s)}p.geometry.dispose(),p.material.dispose(),c.toneMapping=h,c.autoClear=d,e.background=v}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===xv||e.mapping===wv;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=pV()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=fV());const a=r?this._cubemapMaterial:this._equirectMaterial,o=new fr(this._lodPlanes[0],a),s=a.uniforms;s.envMap.value=e;const l=this._cubeSize;s4(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,qw)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;rtp&&console.warn(`sigmaRadians, ${a}, is too large and will clip, as it requested ${v} samples when the maximum is set to ${tp}`);const g=[];let _=0;for(let M=0;MS-N2?r-S+N2:0),C=4*(this._cubeSize-x);s4(t,A,C,3*x,2*x),l.setRenderTarget(t),l.render(d,qw)}}function KLe(n){const e=[],t=[],i=[];let r=n;const a=n-N2+1+lV.length;for(let o=0;on-N2?l=lV[o-n+N2-1]:o===0&&(l=0),i.push(l);const u=1/(s-2),c=-u,d=1+u,h=[c,c,d,c,d,d,c,c,d,d,c,d],f=6,p=6,m=3,v=2,g=1,_=new Float32Array(m*p*f),S=new Float32Array(v*p*f),x=new Float32Array(g*p*f);for(let C=0;C2?0:-1,D=[M,I,0,M+2/3,I,0,M+2/3,I+1,0,M,I,0,M+2/3,I+1,0,M,I+1,0];_.set(D,m*p*C),S.set(h,v*p*C);const E=[C,C,C,C,C,C];x.set(E,g*p*C)}const A=new Qr;A.setAttribute("position",new La(_,m)),A.setAttribute("uv",new La(S,v)),A.setAttribute("faceIndex",new La(x,g)),e.push(A),r>N2&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function hV(n,e,t){const i=new Hp(n,e,t);return i.texture.mapping=n7,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function s4(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function ZLe(n,e,t){const i=new Float32Array(tp),r=new Le(0,1,0);return new Jc({name:"SphericalGaussianBlur",defines:{n:tp,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:pR(),fragmentShader:` precision mediump float; precision mediump int; varying vec3 vOutputDirection; uniform sampler2D envMap; uniform int samples; uniform float weights[ n ]; uniform bool latitudinal; uniform float dTheta; uniform float mipInt; uniform vec3 poleAxis; #define ENVMAP_TYPE_CUBE_UV #include vec3 getSample( float theta, vec3 axis ) { float cosTheta = cos( theta ); // Rodrigues' axis-angle rotation vec3 sampleDirection = vOutputDirection * cosTheta + cross( axis, vOutputDirection ) * sin( theta ) + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); return bilinearCubeUV( envMap, sampleDirection, mipInt ); } void main() { vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); if ( all( equal( axis, vec3( 0.0 ) ) ) ) { axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); } axis = normalize( axis ); gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); for ( int i = 1; i < n; i++ ) { if ( i >= samples ) { break; } float theta = dTheta * float( i ); gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); } } `,blending:_h,depthTest:!1,depthWrite:!1})}function fV(){return new Jc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:pR(),fragmentShader:` precision mediump float; precision mediump int; varying vec3 vOutputDirection; uniform sampler2D envMap; #include void main() { vec3 outputDirection = normalize( vOutputDirection ); vec2 uv = equirectUv( outputDirection ); gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } `,blending:_h,depthTest:!1,depthWrite:!1})}function pV(){return new Jc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:pR(),fragmentShader:` precision mediump float; precision mediump int; uniform float flipEnvMap; varying vec3 vOutputDirection; uniform samplerCube envMap; void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } `,blending:_h,depthTest:!1,depthWrite:!1})}function pR(){return` precision mediump float; precision mediump int; attribute float faceIndex; varying vec3 vOutputDirection; // RH coordinate system; PMREM face-indexing convention vec3 getDirection( vec2 uv, float face ) { uv = 2.0 * uv - 1.0; vec3 direction = vec3( uv, 1.0 ); if ( face == 0.0 ) { direction = direction.zyx; // ( 1, v, u ) pos x } else if ( face == 1.0 ) { direction = direction.xzy; direction.xz *= -1.0; // ( -u, 1, -v ) pos y } else if ( face == 2.0 ) { direction.x *= -1.0; // ( -u, v, 1 ) pos z } else if ( face == 3.0 ) { direction = direction.zyx; direction.xz *= -1.0; // ( -1, v, -u ) neg x } else if ( face == 4.0 ) { direction = direction.xzy; direction.xy *= -1.0; // ( -u, -1, v ) neg y } else if ( face == 5.0 ) { direction.z *= -1.0; // ( u, v, -1 ) neg z } return direction; } void main() { vOutputDirection = getDirection( uv, faceIndex ); gl_Position = vec4( position, 1.0 ); } `}function JLe(n){let e=new WeakMap,t=null;function i(s){if(s&&s.isTexture){const l=s.mapping,u=l===BC||l===zC,c=l===xv||l===wv;if(u||c)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let d=e.get(s);return t===null&&(t=new dV(n)),d=u?t.fromEquirectangular(s,d):t.fromCubemap(s,d),e.set(s,d),d.texture}else{if(e.has(s))return e.get(s).texture;{const d=s.image;if(u&&d&&d.height>0||c&&d&&r(d)){t===null&&(t=new dV(n));const h=u?t.fromEquirectangular(s):t.fromCubemap(s);return e.set(s,h),s.addEventListener("dispose",a),h.texture}else return null}}}return s}function r(s){let l=0;const u=6;for(let c=0;ce.maxTextureSize&&(E=Math.ceil(D/e.maxTextureSize),D=e.maxTextureSize);const P=new Float32Array(D*E*4*p),F=new OQ(P,D,E,p);F.type=Nu,F.needsUpdate=!0;const V=I*4;for(let W=0;W0)return n;const r=e*t;let a=vV[r];if(a===void 0&&(a=new Float32Array(r),vV[r]=a),e!==0){i.toArray(a,0);for(let o=1,s=0;o!==e;++o)s+=t,n[o].toArray(a,s)}return a}function xo(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${s}: ${t[o]}`)}return i.join(` `)}function eDe(n){const e=Br.getPrimaries(Br.workingColorSpace),t=Br.getPrimaries(n);let i;switch(e===t?i="":e===O8&&t===F8?i="LinearDisplayP3ToLinearSRGB":e===F8&&t===O8&&(i="LinearSRGBToLinearDisplayP3"),n){case bo:case i7:return[i,"LinearTransferOETF"];case $r:case lR:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function xV(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const a=/ERROR: 0:(\d+)/.exec(r);if(a){const o=parseInt(a[1]);return t.toUpperCase()+` `+r+` `+QIe(n.getShaderSource(e),o)}else return r}function tDe(n,e){const t=eDe(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function nDe(n,e){let t;switch(e){case QMe:t="Linear";break;case eEe:t="Reinhard";break;case tEe:t="OptimizedCineon";break;case nEe:t="ACESFilmic";break;case rEe:t="AgX";break;case iEe:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function iDe(n){return[n.extensionDerivatives||n.envMapCubeUVHeight||n.bumpMap||n.normalMapTangentSpace||n.clearcoatNormalMap||n.flatShading||n.alphaToCoverage||n.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(k2).join(` `)}function rDe(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(k2).join(` `)}function aDe(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` `)}function oDe(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r/gm;function jC(n){return n.replace(sDe,uDe)}const lDe=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function uDe(n,e){let t=ji[e];if(t===void 0){const i=lDe.get(e);if(i!==void 0)t=ji[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return jC(t)}const cDe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function AV(n){return n.replace(cDe,dDe)}function dDe(n,e,t,i){let r="";for(let a=parseInt(e);a0&&(g+=` `),_=[f,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m].filter(k2).join(` `),_.length>0&&(_+=` `)):(g=[CV(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(k2).join(` `),_=[f,CV(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.envMap?"#define "+c:"",t.envMap?"#define "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Sh?"#define TONE_MAPPING":"",t.toneMapping!==Sh?ji.tonemapping_pars_fragment:"",t.toneMapping!==Sh?nDe("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",ji.colorspace_pars_fragment,tDe("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` `].filter(k2).join(` `)),o=jC(o),o=wV(o,t),o=TV(o,t),s=jC(s),s=wV(s,t),s=TV(s,t),o=AV(o),s=AV(s),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(S=`#version 300 es `,g=[p,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` `+g,_=["precision mediump sampler2DArray;","#define varying in",t.glslVersion===VU?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===VU?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` `+_);const x=S+g+o,A=S+_+s,C=bV(r,r.VERTEX_SHADER,x),M=bV(r,r.FRAGMENT_SHADER,A);r.attachShader(v,C),r.attachShader(v,M),t.index0AttributeName!==void 0?r.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(v,0,"position"),r.linkProgram(v);function I(F){if(n.debug.checkShaderErrors){const V=r.getProgramInfoLog(v).trim(),G=r.getShaderInfoLog(C).trim(),W=r.getShaderInfoLog(M).trim();let Y=!0,Q=!0;if(r.getProgramParameter(v,r.LINK_STATUS)===!1)if(Y=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,v,C,M);else{const K=xV(r,C,"vertex"),ae=xV(r,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(v,r.VALIDATE_STATUS)+` Material Name: `+F.name+` Material Type: `+F.type+` Program Info Log: `+V+` `+K+` `+ae)}else V!==""?console.warn("THREE.WebGLProgram: Program Info Log:",V):(G===""||W==="")&&(Q=!1);Q&&(F.diagnostics={runnable:Y,programLog:V,vertexShader:{log:G,prefix:g},fragmentShader:{log:W,prefix:_}})}r.deleteShader(C),r.deleteShader(M),D=new m5(r,v),E=oDe(r,v)}let D;this.getUniforms=function(){return D===void 0&&I(this),D};let E;this.getAttributes=function(){return E===void 0&&I(this),E};let P=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return P===!1&&(P=r.getProgramParameter(v,ZIe)),P},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(v),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=JIe++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=C,this.fragmentShader=M,this}let yDe=0;class _De{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),a=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(a)===!1&&(o.add(a),a.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new SDe(e),t.set(e,i)),i}}class SDe{constructor(e){this.id=yDe++,this.code=e,this.usedTimes=0}}function bDe(n,e,t,i,r,a,o){const s=new dR,l=new _De,u=new Set,c=[],d=r.isWebGL2,h=r.logarithmicDepthBuffer,f=r.vertexTextures;let p=r.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function v(E){return u.add(E),E===0?"uv":`uv${E}`}function g(E,P,F,V,G){const W=V.fog,Y=G.geometry,Q=E.isMeshStandardMaterial?V.environment:null,K=(E.isMeshStandardMaterial?t:e).get(E.envMap||Q),ae=K&&K.mapping===n7?K.image.height:null,ie=m[E.type];E.precision!==null&&(p=r.getMaxPrecision(E.precision),p!==E.precision&&console.warn("THREE.WebGLProgram.getParameters:",E.precision,"not supported, using",p,"instead."));const he=Y.morphAttributes.position||Y.morphAttributes.normal||Y.morphAttributes.color,Ee=he!==void 0?he.length:0;let He=0;Y.morphAttributes.position!==void 0&&(He=1),Y.morphAttributes.normal!==void 0&&(He=2),Y.morphAttributes.color!==void 0&&(He=3);let xe,Fe,pt,Ot;if(ie){const ut=qs[ie];xe=ut.vertexShader,Fe=ut.fragmentShader}else xe=E.vertexShader,Fe=E.fragmentShader,l.update(E),pt=l.getVertexShaderID(E),Ot=l.getFragmentShaderID(E);const bt=n.getRenderTarget(),ht=G.isInstancedMesh===!0,Kt=G.isBatchedMesh===!0,Tt=!!E.map,Ae=!!E.matcap,Lt=!!K,vt=!!E.aoMap,Ft=!!E.lightMap,k=!!E.bumpMap,_t=!!E.normalMap,Ct=!!E.displacementMap,J=!!E.emissiveMap,ee=!!E.metalnessMap,Ue=!!E.roughnessMap,xt=E.anisotropy>0,Bt=E.clearcoat>0,Ce=E.iridescence>0,We=E.sheen>0,$e=E.transmission>0,mt=xt&&!!E.anisotropyMap,Yt=Bt&&!!E.clearcoatMap,st=Bt&&!!E.clearcoatNormalMap,it=Bt&&!!E.clearcoatRoughnessMap,Vt=Ce&&!!E.iridescenceMap,Zt=Ce&&!!E.iridescenceThicknessMap,nn=We&&!!E.sheenColorMap,cn=We&&!!E.sheenRoughnessMap,an=!!E.specularMap,Ln=!!E.specularColorMap,je=!!E.specularIntensityMap,Ht=$e&&!!E.transmissionMap,wn=$e&&!!E.thicknessMap,zn=!!E.gradientMap,Be=!!E.alphaMap,pn=E.alphaTest>0,dn=!!E.alphaHash,Un=!!E.extensions;let En=Sh;E.toneMapped&&(bt===null||bt.isXRRenderTarget===!0)&&(En=n.toneMapping);const Tn={isWebGL2:d,shaderID:ie,shaderType:E.type,shaderName:E.name,vertexShader:xe,fragmentShader:Fe,defines:E.defines,customVertexShaderID:pt,customFragmentShaderID:Ot,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:p,batching:Kt,instancing:ht,instancingColor:ht&&G.instanceColor!==null,supportsVertexTextures:f,outputColorSpace:bt===null?n.outputColorSpace:bt.isXRRenderTarget===!0?bt.texture.colorSpace:bo,alphaToCoverage:!!E.alphaToCoverage,map:Tt,matcap:Ae,envMap:Lt,envMapMode:Lt&&K.mapping,envMapCubeUVHeight:ae,aoMap:vt,lightMap:Ft,bumpMap:k,normalMap:_t,displacementMap:f&&Ct,emissiveMap:J,normalMapObjectSpace:_t&&E.normalMapType===yEe,normalMapTangentSpace:_t&&E.normalMapType===sR,metalnessMap:ee,roughnessMap:Ue,anisotropy:xt,anisotropyMap:mt,clearcoat:Bt,clearcoatMap:Yt,clearcoatNormalMap:st,clearcoatRoughnessMap:it,iridescence:Ce,iridescenceMap:Vt,iridescenceThicknessMap:Zt,sheen:We,sheenColorMap:nn,sheenRoughnessMap:cn,specularMap:an,specularColorMap:Ln,specularIntensityMap:je,transmission:$e,transmissionMap:Ht,thicknessMap:wn,gradientMap:zn,opaque:E.transparent===!1&&E.blending===Pp&&E.alphaToCoverage===!1,alphaMap:Be,alphaTest:pn,alphaHash:dn,combine:E.combine,mapUv:Tt&&v(E.map.channel),aoMapUv:vt&&v(E.aoMap.channel),lightMapUv:Ft&&v(E.lightMap.channel),bumpMapUv:k&&v(E.bumpMap.channel),normalMapUv:_t&&v(E.normalMap.channel),displacementMapUv:Ct&&v(E.displacementMap.channel),emissiveMapUv:J&&v(E.emissiveMap.channel),metalnessMapUv:ee&&v(E.metalnessMap.channel),roughnessMapUv:Ue&&v(E.roughnessMap.channel),anisotropyMapUv:mt&&v(E.anisotropyMap.channel),clearcoatMapUv:Yt&&v(E.clearcoatMap.channel),clearcoatNormalMapUv:st&&v(E.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:it&&v(E.clearcoatRoughnessMap.channel),iridescenceMapUv:Vt&&v(E.iridescenceMap.channel),iridescenceThicknessMapUv:Zt&&v(E.iridescenceThicknessMap.channel),sheenColorMapUv:nn&&v(E.sheenColorMap.channel),sheenRoughnessMapUv:cn&&v(E.sheenRoughnessMap.channel),specularMapUv:an&&v(E.specularMap.channel),specularColorMapUv:Ln&&v(E.specularColorMap.channel),specularIntensityMapUv:je&&v(E.specularIntensityMap.channel),transmissionMapUv:Ht&&v(E.transmissionMap.channel),thicknessMapUv:wn&&v(E.thicknessMap.channel),alphaMapUv:Be&&v(E.alphaMap.channel),vertexTangents:!!Y.attributes.tangent&&(_t||xt),vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!Y.attributes.color&&Y.attributes.color.itemSize===4,pointsUvs:G.isPoints===!0&&!!Y.attributes.uv&&(Tt||Be),fog:!!W,useFog:E.fog===!0,fogExp2:!!W&&W.isFogExp2,flatShading:E.flatShading===!0,sizeAttenuation:E.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:G.isSkinnedMesh===!0,morphTargets:Y.morphAttributes.position!==void 0,morphNormals:Y.morphAttributes.normal!==void 0,morphColors:Y.morphAttributes.color!==void 0,morphTargetsCount:Ee,morphTextureStride:He,numDirLights:P.directional.length,numPointLights:P.point.length,numSpotLights:P.spot.length,numSpotLightMaps:P.spotLightMap.length,numRectAreaLights:P.rectArea.length,numHemiLights:P.hemi.length,numDirLightShadows:P.directionalShadowMap.length,numPointLightShadows:P.pointShadowMap.length,numSpotLightShadows:P.spotShadowMap.length,numSpotLightShadowsWithMaps:P.numSpotLightShadowsWithMaps,numLightProbes:P.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:E.dithering,shadowMapEnabled:n.shadowMap.enabled&&F.length>0,shadowMapType:n.shadowMap.type,toneMapping:En,useLegacyLights:n._useLegacyLights,decodeVideoTexture:Tt&&E.map.isVideoTexture===!0&&Br.getTransfer(E.map.colorSpace)===ma,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===aa,flipSided:E.side===rl,useDepthPacking:E.depthPacking>=0,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionDerivatives:Un&&E.extensions.derivatives===!0,extensionFragDepth:Un&&E.extensions.fragDepth===!0,extensionDrawBuffers:Un&&E.extensions.drawBuffers===!0,extensionShaderTextureLOD:Un&&E.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Un&&E.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:Un&&E.extensions.multiDraw===!0&&i.has("WEBGL_multi_draw"),rendererExtensionFragDepth:d||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:E.customProgramCacheKey()};return Tn.vertexUv1s=u.has(1),Tn.vertexUv2s=u.has(2),Tn.vertexUv3s=u.has(3),u.clear(),Tn}function _(E){const P=[];if(E.shaderID?P.push(E.shaderID):(P.push(E.customVertexShaderID),P.push(E.customFragmentShaderID)),E.defines!==void 0)for(const F in E.defines)P.push(F),P.push(E.defines[F]);return E.isRawShaderMaterial===!1&&(S(P,E),x(P,E),P.push(n.outputColorSpace)),P.push(E.customProgramCacheKey),P.join()}function S(E,P){E.push(P.precision),E.push(P.outputColorSpace),E.push(P.envMapMode),E.push(P.envMapCubeUVHeight),E.push(P.mapUv),E.push(P.alphaMapUv),E.push(P.lightMapUv),E.push(P.aoMapUv),E.push(P.bumpMapUv),E.push(P.normalMapUv),E.push(P.displacementMapUv),E.push(P.emissiveMapUv),E.push(P.metalnessMapUv),E.push(P.roughnessMapUv),E.push(P.anisotropyMapUv),E.push(P.clearcoatMapUv),E.push(P.clearcoatNormalMapUv),E.push(P.clearcoatRoughnessMapUv),E.push(P.iridescenceMapUv),E.push(P.iridescenceThicknessMapUv),E.push(P.sheenColorMapUv),E.push(P.sheenRoughnessMapUv),E.push(P.specularMapUv),E.push(P.specularColorMapUv),E.push(P.specularIntensityMapUv),E.push(P.transmissionMapUv),E.push(P.thicknessMapUv),E.push(P.combine),E.push(P.fogExp2),E.push(P.sizeAttenuation),E.push(P.morphTargetsCount),E.push(P.morphAttributeCount),E.push(P.numDirLights),E.push(P.numPointLights),E.push(P.numSpotLights),E.push(P.numSpotLightMaps),E.push(P.numHemiLights),E.push(P.numRectAreaLights),E.push(P.numDirLightShadows),E.push(P.numPointLightShadows),E.push(P.numSpotLightShadows),E.push(P.numSpotLightShadowsWithMaps),E.push(P.numLightProbes),E.push(P.shadowMapType),E.push(P.toneMapping),E.push(P.numClippingPlanes),E.push(P.numClipIntersection),E.push(P.depthPacking)}function x(E,P){s.disableAll(),P.isWebGL2&&s.enable(0),P.supportsVertexTextures&&s.enable(1),P.instancing&&s.enable(2),P.instancingColor&&s.enable(3),P.matcap&&s.enable(4),P.envMap&&s.enable(5),P.normalMapObjectSpace&&s.enable(6),P.normalMapTangentSpace&&s.enable(7),P.clearcoat&&s.enable(8),P.iridescence&&s.enable(9),P.alphaTest&&s.enable(10),P.vertexColors&&s.enable(11),P.vertexAlphas&&s.enable(12),P.vertexUv1s&&s.enable(13),P.vertexUv2s&&s.enable(14),P.vertexUv3s&&s.enable(15),P.vertexTangents&&s.enable(16),P.anisotropy&&s.enable(17),P.alphaHash&&s.enable(18),P.batching&&s.enable(19),E.push(s.mask),s.disableAll(),P.fog&&s.enable(0),P.useFog&&s.enable(1),P.flatShading&&s.enable(2),P.logarithmicDepthBuffer&&s.enable(3),P.skinning&&s.enable(4),P.morphTargets&&s.enable(5),P.morphNormals&&s.enable(6),P.morphColors&&s.enable(7),P.premultipliedAlpha&&s.enable(8),P.shadowMapEnabled&&s.enable(9),P.useLegacyLights&&s.enable(10),P.doubleSided&&s.enable(11),P.flipSided&&s.enable(12),P.useDepthPacking&&s.enable(13),P.dithering&&s.enable(14),P.transmission&&s.enable(15),P.sheen&&s.enable(16),P.opaque&&s.enable(17),P.pointsUvs&&s.enable(18),P.decodeVideoTexture&&s.enable(19),P.alphaToCoverage&&s.enable(20),E.push(s.mask)}function A(E){const P=m[E.type];let F;if(P){const V=qs[P];F=hR.clone(V.uniforms)}else F=E.uniforms;return F}function C(E,P){let F;for(let V=0,G=c.length;V0?i.push(g):f.transparent===!0?r.push(g):t.push(g)}function l(d,h,f,p,m,v){const g=o(d,h,f,p,m,v);f.transmission>0?i.unshift(g):f.transparent===!0?r.unshift(g):t.unshift(g)}function u(d,h){t.length>1&&t.sort(d||wDe),i.length>1&&i.sort(h||MV),r.length>1&&r.sort(h||MV)}function c(){for(let d=e,h=n.length;d=a.length?(o=new EV,a.push(o)):o=a[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function ADe(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new Le,color:new Jn};break;case"SpotLight":t={position:new Le,direction:new Le,color:new Jn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new Le,color:new Jn,distance:0,decay:0};break;case"HemisphereLight":t={direction:new Le,skyColor:new Jn,groundColor:new Jn};break;case"RectAreaLight":t={color:new Jn,position:new Le,halfWidth:new Le,halfHeight:new Le};break}return n[e.id]=t,t}}}function CDe(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new on};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new on};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new on,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let MDe=0;function EDe(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function PDe(n,e){const t=new ADe,i=CDe(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)r.probe.push(new Le);const a=new Le,o=new Bi,s=new Bi;function l(c,d){let h=0,f=0,p=0;for(let F=0;F<9;F++)r.probe[F].set(0,0,0);let m=0,v=0,g=0,_=0,S=0,x=0,A=0,C=0,M=0,I=0,D=0;c.sort(EDe);const E=d===!0?Math.PI:1;for(let F=0,V=c.length;F0&&(e.isWebGL2?n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Pn.LTC_FLOAT_1,r.rectAreaLTC2=Pn.LTC_FLOAT_2):(r.rectAreaLTC1=Pn.LTC_HALF_1,r.rectAreaLTC2=Pn.LTC_HALF_2):n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Pn.LTC_FLOAT_1,r.rectAreaLTC2=Pn.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Pn.LTC_HALF_1,r.rectAreaLTC2=Pn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=h,r.ambient[1]=f,r.ambient[2]=p;const P=r.hash;(P.directionalLength!==m||P.pointLength!==v||P.spotLength!==g||P.rectAreaLength!==_||P.hemiLength!==S||P.numDirectionalShadows!==x||P.numPointShadows!==A||P.numSpotShadows!==C||P.numSpotMaps!==M||P.numLightProbes!==D)&&(r.directional.length=m,r.spot.length=g,r.rectArea.length=_,r.point.length=v,r.hemi.length=S,r.directionalShadow.length=x,r.directionalShadowMap.length=x,r.pointShadow.length=A,r.pointShadowMap.length=A,r.spotShadow.length=C,r.spotShadowMap.length=C,r.directionalShadowMatrix.length=x,r.pointShadowMatrix.length=A,r.spotLightMatrix.length=C+M-I,r.spotLightMap.length=M,r.numSpotLightShadowsWithMaps=I,r.numLightProbes=D,P.directionalLength=m,P.pointLength=v,P.spotLength=g,P.rectAreaLength=_,P.hemiLength=S,P.numDirectionalShadows=x,P.numPointShadows=A,P.numSpotShadows=C,P.numSpotMaps=M,P.numLightProbes=D,r.version=MDe++)}function u(c,d){let h=0,f=0,p=0,m=0,v=0;const g=d.matrixWorldInverse;for(let _=0,S=c.length;_=s.length?(l=new PV(n,e),s.push(l)):l=s[o],l}function r(){t=new WeakMap}return{get:i,dispose:r}}class LDe extends A0{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=mEe,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class IDe extends A0{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const DDe=`void main() { gl_Position = vec4( position, 1.0 ); }`,NDe=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include void main() { const float samples = float( VSM_SAMPLES ); float mean = 0.0; float squared_mean = 0.0; float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); float uvStart = samples <= 1.0 ? 0.0 : - 1.0; for ( float i = 0.0; i < samples; i ++ ) { float uvOffset = uvStart + i * uvStride; #ifdef HORIZONTAL_PASS vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); mean += distribution.x; squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; #else float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); mean += depth; squared_mean += depth * depth; #endif } mean = mean / samples; squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); }`;function kDe(n,e,t){let i=new fR;const r=new on,a=new on,o=new Er,s=new LDe({depthPacking:gEe}),l=new IDe,u={},c=t.maxTextureSize,d={[Zc]:rl,[rl]:Zc,[aa]:aa},h=new Jc({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new on},radius:{value:4}},vertexShader:DDe,fragmentShader:NDe}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const p=new Qr;p.setAttribute("position",new La(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new fr(p,h),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=_Q;let g=this.type;this.render=function(C,M,I){if(v.enabled===!1||v.autoUpdate===!1&&v.needsUpdate===!1||C.length===0)return;const D=n.getRenderTarget(),E=n.getActiveCubeFace(),P=n.getActiveMipmapLevel(),F=n.state;F.setBlending(_h),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);const V=g!==Cc&&this.type===Cc,G=g===Cc&&this.type!==Cc;for(let W=0,Y=C.length;Wc||r.y>c)&&(r.x>c&&(a.x=Math.floor(c/ae.x),r.x=a.x*ae.x,K.mapSize.x=a.x),r.y>c&&(a.y=Math.floor(c/ae.y),r.y=a.y*ae.y,K.mapSize.y=a.y)),K.map===null||V===!0||G===!0){const he=this.type!==Cc?{minFilter:mo,magFilter:mo}:{};K.map!==null&&K.map.dispose(),K.map=new Hp(r.x,r.y,he),K.map.texture.name=Q.name+".shadowMap",K.camera.updateProjectionMatrix()}n.setRenderTarget(K.map),n.clear();const ie=K.getViewportCount();for(let he=0;he0||M.map&&M.alphaTest>0){const F=E.uuid,V=M.uuid;let G=u[F];G===void 0&&(G={},u[F]=G);let W=G[V];W===void 0&&(W=E.clone(),G[V]=W,M.addEventListener("dispose",A)),E=W}if(E.visible=M.visible,E.wireframe=M.wireframe,D===Cc?E.side=M.shadowSide!==null?M.shadowSide:M.side:E.side=M.shadowSide!==null?M.shadowSide:d[M.side],E.alphaMap=M.alphaMap,E.alphaTest=M.alphaTest,E.map=M.map,E.clipShadows=M.clipShadows,E.clippingPlanes=M.clippingPlanes,E.clipIntersection=M.clipIntersection,E.displacementMap=M.displacementMap,E.displacementScale=M.displacementScale,E.displacementBias=M.displacementBias,E.wireframeLinewidth=M.wireframeLinewidth,E.linewidth=M.linewidth,I.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const F=n.properties.get(E);F.light=I}return E}function x(C,M,I,D,E){if(C.visible===!1)return;if(C.layers.test(M.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&E===Cc)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,C.matrixWorld);const V=e.update(C),G=C.material;if(Array.isArray(G)){const W=V.groups;for(let Y=0,Q=W.length;Y=1):ie.indexOf("OpenGL ES")!==-1&&(ae=parseFloat(/^OpenGL ES (\d)/.exec(ie)[1]),K=ae>=2);let he=null,Ee={};const He=n.getParameter(n.SCISSOR_BOX),xe=n.getParameter(n.VIEWPORT),Fe=new Er().fromArray(He),pt=new Er().fromArray(xe);function Ot(Be,pn,dn,Un){const En=new Uint8Array(4),Tn=n.createTexture();n.bindTexture(Be,Tn),n.texParameteri(Be,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(Be,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let ut=0;utxt||J.height>xt)&&(Bt=xt/Math.max(J.width,J.height)),Bt<1||ee===!0)if(typeof HTMLImageElement!="undefined"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&J instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&J instanceof ImageBitmap){const Ce=ee?z8:Math.floor,We=Ce(Bt*J.width),$e=Ce(Bt*J.height);d===void 0&&(d=p(We,$e));const mt=Ue?p(We,$e):d;return mt.width=We,mt.height=$e,mt.getContext("2d").drawImage(J,0,0,We,$e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+J.width+"x"+J.height+") to ("+We+"x"+$e+")."),mt}else return"data"in J&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+J.width+"x"+J.height+")."),J;return J}function v(J){return WC(J.width)&&WC(J.height)}function g(J){return s?!1:J.wrapS!==us||J.wrapT!==us||J.minFilter!==mo&&J.minFilter!==ao}function _(J,ee){return J.generateMipmaps&&ee&&J.minFilter!==mo&&J.minFilter!==ao}function S(J){n.generateMipmap(J)}function x(J,ee,Ue,xt,Bt=!1){if(s===!1)return ee;if(J!==null){if(n[J]!==void 0)return n[J];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+J+"'")}let Ce=ee;if(ee===n.RED&&(Ue===n.FLOAT&&(Ce=n.R32F),Ue===n.HALF_FLOAT&&(Ce=n.R16F),Ue===n.UNSIGNED_BYTE&&(Ce=n.R8)),ee===n.RED_INTEGER&&(Ue===n.UNSIGNED_BYTE&&(Ce=n.R8UI),Ue===n.UNSIGNED_SHORT&&(Ce=n.R16UI),Ue===n.UNSIGNED_INT&&(Ce=n.R32UI),Ue===n.BYTE&&(Ce=n.R8I),Ue===n.SHORT&&(Ce=n.R16I),Ue===n.INT&&(Ce=n.R32I)),ee===n.RG&&(Ue===n.FLOAT&&(Ce=n.RG32F),Ue===n.HALF_FLOAT&&(Ce=n.RG16F),Ue===n.UNSIGNED_BYTE&&(Ce=n.RG8)),ee===n.RGBA){const We=Bt?k8:Br.getTransfer(xt);Ue===n.FLOAT&&(Ce=n.RGBA32F),Ue===n.HALF_FLOAT&&(Ce=n.RGBA16F),Ue===n.UNSIGNED_BYTE&&(Ce=We===ma?n.SRGB8_ALPHA8:n.RGBA8),Ue===n.UNSIGNED_SHORT_4_4_4_4&&(Ce=n.RGBA4),Ue===n.UNSIGNED_SHORT_5_5_5_1&&(Ce=n.RGB5_A1)}return(Ce===n.R16F||Ce===n.R32F||Ce===n.RG16F||Ce===n.RG32F||Ce===n.RGBA16F||Ce===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Ce}function A(J,ee,Ue){return _(J,Ue)===!0||J.isFramebufferTexture&&J.minFilter!==mo&&J.minFilter!==ao?Math.log2(Math.max(ee.width,ee.height))+1:J.mipmaps!==void 0&&J.mipmaps.length>0?J.mipmaps.length:J.isCompressedTexture&&Array.isArray(J.image)?ee.mipmaps.length:1}function C(J){return J===mo||J===GC||J===w2?n.NEAREST:n.LINEAR}function M(J){const ee=J.target;ee.removeEventListener("dispose",M),D(ee),ee.isVideoTexture&&c.delete(ee)}function I(J){const ee=J.target;ee.removeEventListener("dispose",I),P(ee)}function D(J){const ee=i.get(J);if(ee.__webglInit===void 0)return;const Ue=J.source,xt=h.get(Ue);if(xt){const Bt=xt[ee.__cacheKey];Bt.usedTimes--,Bt.usedTimes===0&&E(J),Object.keys(xt).length===0&&h.delete(Ue)}i.remove(J)}function E(J){const ee=i.get(J);n.deleteTexture(ee.__webglTexture);const Ue=J.source,xt=h.get(Ue);delete xt[ee.__cacheKey],o.memory.textures--}function P(J){const ee=J.texture,Ue=i.get(J),xt=i.get(ee);if(xt.__webglTexture!==void 0&&(n.deleteTexture(xt.__webglTexture),o.memory.textures--),J.depthTexture&&J.depthTexture.dispose(),J.isWebGLCubeRenderTarget)for(let Bt=0;Bt<6;Bt++){if(Array.isArray(Ue.__webglFramebuffer[Bt]))for(let Ce=0;Ce=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+J+" texture units while this GPU supports only "+r.maxTextures),F+=1,J}function W(J){const ee=[];return ee.push(J.wrapS),ee.push(J.wrapT),ee.push(J.wrapR||0),ee.push(J.magFilter),ee.push(J.minFilter),ee.push(J.anisotropy),ee.push(J.internalFormat),ee.push(J.format),ee.push(J.type),ee.push(J.generateMipmaps),ee.push(J.premultiplyAlpha),ee.push(J.flipY),ee.push(J.unpackAlignment),ee.push(J.colorSpace),ee.join()}function Y(J,ee){const Ue=i.get(J);if(J.isVideoTexture&&_t(J),J.isRenderTargetTexture===!1&&J.version>0&&Ue.__version!==J.version){const xt=J.image;if(xt===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(xt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Fe(Ue,J,ee);return}}t.bindTexture(n.TEXTURE_2D,Ue.__webglTexture,n.TEXTURE0+ee)}function Q(J,ee){const Ue=i.get(J);if(J.version>0&&Ue.__version!==J.version){Fe(Ue,J,ee);return}t.bindTexture(n.TEXTURE_2D_ARRAY,Ue.__webglTexture,n.TEXTURE0+ee)}function K(J,ee){const Ue=i.get(J);if(J.version>0&&Ue.__version!==J.version){Fe(Ue,J,ee);return}t.bindTexture(n.TEXTURE_3D,Ue.__webglTexture,n.TEXTURE0+ee)}function ae(J,ee){const Ue=i.get(J);if(J.version>0&&Ue.__version!==J.version){pt(Ue,J,ee);return}t.bindTexture(n.TEXTURE_CUBE_MAP,Ue.__webglTexture,n.TEXTURE0+ee)}const ie={[Eo]:n.REPEAT,[us]:n.CLAMP_TO_EDGE,[N8]:n.MIRRORED_REPEAT},he={[mo]:n.NEAREST,[GC]:n.NEAREST_MIPMAP_NEAREST,[w2]:n.NEAREST_MIPMAP_LINEAR,[ao]:n.LINEAR,[v5]:n.LINEAR_MIPMAP_NEAREST,[kc]:n.LINEAR_MIPMAP_LINEAR},Ee={[_Ee]:n.NEVER,[AEe]:n.ALWAYS,[SEe]:n.LESS,[DQ]:n.LEQUAL,[bEe]:n.EQUAL,[TEe]:n.GEQUAL,[xEe]:n.GREATER,[wEe]:n.NOTEQUAL};function He(J,ee,Ue){if(ee.type===Nu&&e.has("OES_texture_float_linear")===!1&&(ee.magFilter===ao||ee.magFilter===v5||ee.magFilter===w2||ee.magFilter===kc||ee.minFilter===ao||ee.minFilter===v5||ee.minFilter===w2||ee.minFilter===kc)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),Ue?(n.texParameteri(J,n.TEXTURE_WRAP_S,ie[ee.wrapS]),n.texParameteri(J,n.TEXTURE_WRAP_T,ie[ee.wrapT]),(J===n.TEXTURE_3D||J===n.TEXTURE_2D_ARRAY)&&n.texParameteri(J,n.TEXTURE_WRAP_R,ie[ee.wrapR]),n.texParameteri(J,n.TEXTURE_MAG_FILTER,he[ee.magFilter]),n.texParameteri(J,n.TEXTURE_MIN_FILTER,he[ee.minFilter])):(n.texParameteri(J,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(J,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(J===n.TEXTURE_3D||J===n.TEXTURE_2D_ARRAY)&&n.texParameteri(J,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(ee.wrapS!==us||ee.wrapT!==us)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(J,n.TEXTURE_MAG_FILTER,C(ee.magFilter)),n.texParameteri(J,n.TEXTURE_MIN_FILTER,C(ee.minFilter)),ee.minFilter!==mo&&ee.minFilter!==ao&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),ee.compareFunction&&(n.texParameteri(J,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(J,n.TEXTURE_COMPARE_FUNC,Ee[ee.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const xt=e.get("EXT_texture_filter_anisotropic");if(ee.magFilter===mo||ee.minFilter!==w2&&ee.minFilter!==kc||ee.type===Nu&&e.has("OES_texture_float_linear")===!1||s===!1&&ee.type===K9&&e.has("OES_texture_half_float_linear")===!1)return;(ee.anisotropy>1||i.get(ee).__currentAnisotropy)&&(n.texParameterf(J,xt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(ee.anisotropy,r.getMaxAnisotropy())),i.get(ee).__currentAnisotropy=ee.anisotropy)}}function xe(J,ee){let Ue=!1;J.__webglInit===void 0&&(J.__webglInit=!0,ee.addEventListener("dispose",M));const xt=ee.source;let Bt=h.get(xt);Bt===void 0&&(Bt={},h.set(xt,Bt));const Ce=W(ee);if(Ce!==J.__cacheKey){Bt[Ce]===void 0&&(Bt[Ce]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,Ue=!0),Bt[Ce].usedTimes++;const We=Bt[J.__cacheKey];We!==void 0&&(Bt[J.__cacheKey].usedTimes--,We.usedTimes===0&&E(ee)),J.__cacheKey=Ce,J.__webglTexture=Bt[Ce].texture}return Ue}function Fe(J,ee,Ue){let xt=n.TEXTURE_2D;(ee.isDataArrayTexture||ee.isCompressedArrayTexture)&&(xt=n.TEXTURE_2D_ARRAY),ee.isData3DTexture&&(xt=n.TEXTURE_3D);const Bt=xe(J,ee),Ce=ee.source;t.bindTexture(xt,J.__webglTexture,n.TEXTURE0+Ue);const We=i.get(Ce);if(Ce.version!==We.__version||Bt===!0){t.activeTexture(n.TEXTURE0+Ue);const $e=Br.getPrimaries(Br.workingColorSpace),mt=ee.colorSpace===_0?null:Br.getPrimaries(ee.colorSpace),Yt=ee.colorSpace===_0||$e===mt?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,ee.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ee.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,ee.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Yt);const st=g(ee)&&v(ee.image)===!1;let it=m(ee.image,st,!1,r.maxTextureSize);it=Ct(ee,it);const Vt=v(it)||s,Zt=a.convert(ee.format,ee.colorSpace);let nn=a.convert(ee.type),cn=x(ee.internalFormat,Zt,nn,ee.colorSpace,ee.isVideoTexture);He(xt,ee,Vt);let an;const Ln=ee.mipmaps,je=s&&ee.isVideoTexture!==!0&&cn!==RQ,Ht=We.__version===void 0||Bt===!0,wn=Ce.dataReady,zn=A(ee,it,Vt);if(ee.isDepthTexture)cn=n.DEPTH_COMPONENT,s?ee.type===Nu?cn=n.DEPTH_COMPONENT32F:ee.type===uh?cn=n.DEPTH_COMPONENT24:ee.type===Rp?cn=n.DEPTH24_STENCIL8:cn=n.DEPTH_COMPONENT16:ee.type===Nu&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),ee.format===Lp&&cn===n.DEPTH_COMPONENT&&ee.type!==oR&&ee.type!==uh&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),ee.type=uh,nn=a.convert(ee.type)),ee.format===Tv&&cn===n.DEPTH_COMPONENT&&(cn=n.DEPTH_STENCIL,ee.type!==Rp&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),ee.type=Rp,nn=a.convert(ee.type))),Ht&&(je?t.texStorage2D(n.TEXTURE_2D,1,cn,it.width,it.height):t.texImage2D(n.TEXTURE_2D,0,cn,it.width,it.height,0,Zt,nn,null));else if(ee.isDataTexture)if(Ln.length>0&&Vt){je&&Ht&&t.texStorage2D(n.TEXTURE_2D,zn,cn,Ln[0].width,Ln[0].height);for(let Be=0,pn=Ln.length;Be>=1,pn>>=1}}else if(Ln.length>0&&Vt){je&&Ht&&t.texStorage2D(n.TEXTURE_2D,zn,cn,Ln[0].width,Ln[0].height);for(let Be=0,pn=Ln.length;Be0&&wn++,t.texStorage2D(n.TEXTURE_CUBE_MAP,wn,an,it[0].width,it[0].height));for(let Be=0;Be<6;Be++)if(st){Ln?Ht&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,0,0,0,it[Be].width,it[Be].height,nn,cn,it[Be].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Be,0,an,it[Be].width,it[Be].height,0,nn,cn,it[Be].data);for(let pn=0;pn>Ce),it=Math.max(1,ee.height>>Ce);Bt===n.TEXTURE_3D||Bt===n.TEXTURE_2D_ARRAY?t.texImage3D(Bt,Ce,mt,st,it,ee.depth,0,We,$e,null):t.texImage2D(Bt,Ce,mt,st,it,0,We,$e,null)}t.bindFramebuffer(n.FRAMEBUFFER,J),k(ee)?l.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,xt,Bt,i.get(Ue).__webglTexture,0,Ft(ee)):(Bt===n.TEXTURE_2D||Bt>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&Bt<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,xt,Bt,i.get(Ue).__webglTexture,Ce),t.bindFramebuffer(n.FRAMEBUFFER,null)}function bt(J,ee,Ue){if(n.bindRenderbuffer(n.RENDERBUFFER,J),ee.depthBuffer&&!ee.stencilBuffer){let xt=s===!0?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(Ue||k(ee)){const Bt=ee.depthTexture;Bt&&Bt.isDepthTexture&&(Bt.type===Nu?xt=n.DEPTH_COMPONENT32F:Bt.type===uh&&(xt=n.DEPTH_COMPONENT24));const Ce=Ft(ee);k(ee)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Ce,xt,ee.width,ee.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,Ce,xt,ee.width,ee.height)}else n.renderbufferStorage(n.RENDERBUFFER,xt,ee.width,ee.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,J)}else if(ee.depthBuffer&&ee.stencilBuffer){const xt=Ft(ee);Ue&&k(ee)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,xt,n.DEPTH24_STENCIL8,ee.width,ee.height):k(ee)?l.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,xt,n.DEPTH24_STENCIL8,ee.width,ee.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,ee.width,ee.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,J)}else{const xt=ee.isWebGLMultipleRenderTargets===!0?ee.texture:[ee.texture];for(let Bt=0;Bt0){Ue.__webglFramebuffer[$e]=[];for(let mt=0;mt0){Ue.__webglFramebuffer=[];for(let $e=0;$e0&&k(J)===!1){const $e=Ce?ee:[ee];Ue.__webglMultisampledFramebuffer=n.createFramebuffer(),Ue.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,Ue.__webglMultisampledFramebuffer);for(let mt=0;mt<$e.length;mt++){const Yt=$e[mt];Ue.__webglColorRenderbuffer[mt]=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,Ue.__webglColorRenderbuffer[mt]);const st=a.convert(Yt.format,Yt.colorSpace),it=a.convert(Yt.type),Vt=x(Yt.internalFormat,st,it,Yt.colorSpace,J.isXRRenderTarget===!0),Zt=Ft(J);n.renderbufferStorageMultisample(n.RENDERBUFFER,Zt,Vt,J.width,J.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+mt,n.RENDERBUFFER,Ue.__webglColorRenderbuffer[mt])}n.bindRenderbuffer(n.RENDERBUFFER,null),J.depthBuffer&&(Ue.__webglDepthRenderbuffer=n.createRenderbuffer(),bt(Ue.__webglDepthRenderbuffer,J,!0)),t.bindFramebuffer(n.FRAMEBUFFER,null)}}if(Bt){t.bindTexture(n.TEXTURE_CUBE_MAP,xt.__webglTexture),He(n.TEXTURE_CUBE_MAP,ee,We);for(let $e=0;$e<6;$e++)if(s&&ee.mipmaps&&ee.mipmaps.length>0)for(let mt=0;mt0)for(let mt=0;mt0&&k(J)===!1){const ee=J.isWebGLMultipleRenderTargets?J.texture:[J.texture],Ue=J.width,xt=J.height;let Bt=n.COLOR_BUFFER_BIT;const Ce=[],We=J.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,$e=i.get(J),mt=J.isWebGLMultipleRenderTargets===!0;if(mt)for(let Yt=0;Yt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&ee.__useRenderToTexture!==!1}function _t(J){const ee=o.render.frame;c.get(J)!==ee&&(c.set(J,ee),J.update())}function Ct(J,ee){const Ue=J.colorSpace,xt=J.format,Bt=J.type;return J.isCompressedTexture===!0||J.isVideoTexture===!0||J.format===HC||Ue!==bo&&Ue!==_0&&(Br.getTransfer(Ue)===ma?s===!1?e.has("EXT_sRGB")===!0&&xt===y0?(J.format=HC,J.minFilter=ao,J.generateMipmaps=!1):ee=kQ.sRGBToLinear(ee):(xt!==y0||Bt!==bh)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Ue)),ee}this.allocateTextureUnit=G,this.resetTextureUnits=V,this.setTexture2D=Y,this.setTexture2DArray=Q,this.setTexture3D=K,this.setTextureCube=ae,this.rebindTextures=Tt,this.setupRenderTarget=Ae,this.updateRenderTargetMipmap=Lt,this.updateMultisampleRenderTarget=vt,this.setupDepthRenderbuffer=Kt,this.setupFrameBufferTexture=Ot,this.useMultisampledRTT=k}function BDe(n,e,t){const i=t.isWebGL2;function r(a,o=_0){let s;const l=Br.getTransfer(o);if(a===bh)return n.UNSIGNED_BYTE;if(a===AQ)return n.UNSIGNED_SHORT_4_4_4_4;if(a===CQ)return n.UNSIGNED_SHORT_5_5_5_1;if(a===oEe)return n.BYTE;if(a===sEe)return n.SHORT;if(a===oR)return n.UNSIGNED_SHORT;if(a===TQ)return n.INT;if(a===uh)return n.UNSIGNED_INT;if(a===Nu)return n.FLOAT;if(a===K9)return i?n.HALF_FLOAT:(s=e.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(a===lEe)return n.ALPHA;if(a===y0)return n.RGBA;if(a===uEe)return n.LUMINANCE;if(a===cEe)return n.LUMINANCE_ALPHA;if(a===Lp)return n.DEPTH_COMPONENT;if(a===Tv)return n.DEPTH_STENCIL;if(a===HC)return s=e.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(a===dEe)return n.RED;if(a===MQ)return n.RED_INTEGER;if(a===hEe)return n.RG;if(a===EQ)return n.RG_INTEGER;if(a===PQ)return n.RGBA_INTEGER;if(a===Tw||a===Aw||a===Cw||a===Mw)if(l===ma)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(a===Tw)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(a===Aw)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(a===Cw)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(a===Mw)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(a===Tw)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===Aw)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===Cw)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===Mw)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(a===fU||a===pU||a===vU||a===mU)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(a===fU)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===pU)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===vU)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===mU)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(a===RQ)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(a===gU||a===yU)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(a===gU)return l===ma?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(a===yU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(a===_U||a===SU||a===bU||a===xU||a===wU||a===TU||a===AU||a===CU||a===MU||a===EU||a===PU||a===RU||a===LU||a===IU)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(a===_U)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(a===SU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(a===bU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(a===xU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(a===wU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(a===TU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(a===AU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(a===CU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(a===MU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(a===EU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(a===PU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(a===RU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(a===LU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(a===IU)return l===ma?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(a===Ew||a===DU||a===NU)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(a===Ew)return l===ma?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(a===DU)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(a===NU)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(a===fEe||a===kU||a===FU||a===OU)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(a===Ew)return s.COMPRESSED_RED_RGTC1_EXT;if(a===kU)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(a===FU)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(a===OU)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return a===Rp?i?n.UNSIGNED_INT_24_8:(s=e.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null):n[a]!==void 0?n[a]:null}return{convert:r}}class zDe extends ss{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Nr extends la{constructor(){super(),this.isGroup=!0,this.type="Group"}}const GDe={type:"move"};class Jw{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Nr,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Nr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Le,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Le),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Nr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Le,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Le),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,a=null,o=null;const s=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const m of e.hand.values()){const v=t.getJointPose(m,i),g=this._getHandJoint(u,m);v!==null&&(g.matrix.fromArray(v.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=v.radius),g.visible=v!==null}const c=u.joints["index-finger-tip"],d=u.joints["thumb-tip"],h=c.position.distanceTo(d.position),f=.02,p=.005;u.inputState.pinching&&h>f+p?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&h<=f-p&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(a=t.getPose(e.gripSpace,i),a!==null&&(l.matrix.fromArray(a.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,a.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(a.linearVelocity)):l.hasLinearVelocity=!1,a.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(a.angularVelocity)):l.hasAngularVelocity=!1));s!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&a!==null&&(r=a),r!==null&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(GDe)))}return s!==null&&(s.visible=r!==null),l!==null&&(l.visible=a!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Nr;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const UDe=` void main() { gl_Position = vec4( position, 1.0 ); }`,VDe=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; void main() { vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); if ( coord.x >= 1.0 ) { gl_FragDepthEXT = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; } else { gl_FragDepthEXT = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; } }`;class HDe{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const r=new yo,a=e.properties.get(r);a.__webglTexture=t.texture,(t.depthNear!=i.depthNear||t.depthFar!=i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}render(e,t){if(this.texture!==null){if(this.mesh===null){const i=t.cameras[0].viewport,r=new Jc({extensions:{fragDepth:!0},vertexShader:UDe,fragmentShader:VDe,uniforms:{depthColor:{value:this.texture},depthWidth:{value:i.z},depthHeight:{value:i.w}}});this.mesh=new fr(new Al(20,20),r)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}}class WDe extends s1{constructor(e,t){super();const i=this;let r=null,a=1,o=null,s="local-floor",l=1,u=null,c=null,d=null,h=null,f=null,p=null;const m=new HDe,v=t.getContextAttributes();let g=null,_=null;const S=[],x=[],A=new on;let C=null;const M=new ss;M.layers.enable(1),M.viewport=new Er;const I=new ss;I.layers.enable(2),I.viewport=new Er;const D=[M,I],E=new zDe;E.layers.enable(1),E.layers.enable(2);let P=null,F=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(xe){let Fe=S[xe];return Fe===void 0&&(Fe=new Jw,S[xe]=Fe),Fe.getTargetRaySpace()},this.getControllerGrip=function(xe){let Fe=S[xe];return Fe===void 0&&(Fe=new Jw,S[xe]=Fe),Fe.getGripSpace()},this.getHand=function(xe){let Fe=S[xe];return Fe===void 0&&(Fe=new Jw,S[xe]=Fe),Fe.getHandSpace()};function V(xe){const Fe=x.indexOf(xe.inputSource);if(Fe===-1)return;const pt=S[Fe];pt!==void 0&&(pt.update(xe.inputSource,xe.frame,u||o),pt.dispatchEvent({type:xe.type,data:xe.inputSource}))}function G(){r.removeEventListener("select",V),r.removeEventListener("selectstart",V),r.removeEventListener("selectend",V),r.removeEventListener("squeeze",V),r.removeEventListener("squeezestart",V),r.removeEventListener("squeezeend",V),r.removeEventListener("end",G),r.removeEventListener("inputsourceschange",W);for(let xe=0;xe=0&&(x[Ot]=null,S[Ot].disconnect(pt))}for(let Fe=0;Fe=x.length){x.push(pt),Ot=ht;break}else if(x[ht]===null){x[ht]=pt,Ot=ht;break}if(Ot===-1)break}const bt=S[Ot];bt&&bt.connect(pt)}}const Y=new Le,Q=new Le;function K(xe,Fe,pt){Y.setFromMatrixPosition(Fe.matrixWorld),Q.setFromMatrixPosition(pt.matrixWorld);const Ot=Y.distanceTo(Q),bt=Fe.projectionMatrix.elements,ht=pt.projectionMatrix.elements,Kt=bt[14]/(bt[10]-1),Tt=bt[14]/(bt[10]+1),Ae=(bt[9]+1)/bt[5],Lt=(bt[9]-1)/bt[5],vt=(bt[8]-1)/bt[0],Ft=(ht[8]+1)/ht[0],k=Kt*vt,_t=Kt*Ft,Ct=Ot/(-vt+Ft),J=Ct*-vt;Fe.matrixWorld.decompose(xe.position,xe.quaternion,xe.scale),xe.translateX(J),xe.translateZ(Ct),xe.matrixWorld.compose(xe.position,xe.quaternion,xe.scale),xe.matrixWorldInverse.copy(xe.matrixWorld).invert();const ee=Kt+Ct,Ue=Tt+Ct,xt=k-J,Bt=_t+(Ot-J),Ce=Ae*Tt/Ue*ee,We=Lt*Tt/Ue*ee;xe.projectionMatrix.makePerspective(xt,Bt,Ce,We,ee,Ue),xe.projectionMatrixInverse.copy(xe.projectionMatrix).invert()}function ae(xe,Fe){Fe===null?xe.matrixWorld.copy(xe.matrix):xe.matrixWorld.multiplyMatrices(Fe.matrixWorld,xe.matrix),xe.matrixWorldInverse.copy(xe.matrixWorld).invert()}this.updateCamera=function(xe){if(r===null)return;m.texture!==null&&(xe.near=m.depthNear,xe.far=m.depthFar),E.near=I.near=M.near=xe.near,E.far=I.far=M.far=xe.far,(P!==E.near||F!==E.far)&&(r.updateRenderState({depthNear:E.near,depthFar:E.far}),P=E.near,F=E.far,M.near=P,M.far=F,I.near=P,I.far=F,M.updateProjectionMatrix(),I.updateProjectionMatrix(),xe.updateProjectionMatrix());const Fe=xe.parent,pt=E.cameras;ae(E,Fe);for(let Ot=0;Ot0&&(v.alphaTest.value=g.alphaTest);const _=e.get(g).envMap;if(_&&(v.envMap.value=_,v.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=g.reflectivity,v.ior.value=g.ior,v.refractionRatio.value=g.refractionRatio),g.lightMap){v.lightMap.value=g.lightMap;const S=n._useLegacyLights===!0?Math.PI:1;v.lightMapIntensity.value=g.lightMapIntensity*S,t(g.lightMap,v.lightMapTransform)}g.aoMap&&(v.aoMap.value=g.aoMap,v.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,v.aoMapTransform))}function o(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,g.map&&(v.map.value=g.map,t(g.map,v.mapTransform))}function s(v,g){v.dashSize.value=g.dashSize,v.totalSize.value=g.dashSize+g.gapSize,v.scale.value=g.scale}function l(v,g,_,S){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.size.value=g.size*_,v.scale.value=S*.5,g.map&&(v.map.value=g.map,t(g.map,v.uvTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,t(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function u(v,g){v.diffuse.value.copy(g.color),v.opacity.value=g.opacity,v.rotation.value=g.rotation,g.map&&(v.map.value=g.map,t(g.map,v.mapTransform)),g.alphaMap&&(v.alphaMap.value=g.alphaMap,t(g.alphaMap,v.alphaMapTransform)),g.alphaTest>0&&(v.alphaTest.value=g.alphaTest)}function c(v,g){v.specular.value.copy(g.specular),v.shininess.value=Math.max(g.shininess,1e-4)}function d(v,g){g.gradientMap&&(v.gradientMap.value=g.gradientMap)}function h(v,g){v.metalness.value=g.metalness,g.metalnessMap&&(v.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,v.metalnessMapTransform)),v.roughness.value=g.roughness,g.roughnessMap&&(v.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,v.roughnessMapTransform)),e.get(g).envMap&&(v.envMapIntensity.value=g.envMapIntensity)}function f(v,g,_){v.ior.value=g.ior,g.sheen>0&&(v.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),v.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(v.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,v.sheenColorMapTransform)),g.sheenRoughnessMap&&(v.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,v.sheenRoughnessMapTransform))),g.clearcoat>0&&(v.clearcoat.value=g.clearcoat,v.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(v.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,v.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,v.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(v.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,v.clearcoatNormalMapTransform),v.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===rl&&v.clearcoatNormalScale.value.negate())),g.iridescence>0&&(v.iridescence.value=g.iridescence,v.iridescenceIOR.value=g.iridescenceIOR,v.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(v.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,v.iridescenceMapTransform)),g.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,v.iridescenceThicknessMapTransform))),g.transmission>0&&(v.transmission.value=g.transmission,v.transmissionSamplerMap.value=_.texture,v.transmissionSamplerSize.value.set(_.width,_.height),g.transmissionMap&&(v.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,v.transmissionMapTransform)),v.thickness.value=g.thickness,g.thicknessMap&&(v.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,v.thicknessMapTransform)),v.attenuationDistance.value=g.attenuationDistance,v.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(v.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(v.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,v.anisotropyMapTransform))),v.specularIntensity.value=g.specularIntensity,v.specularColor.value.copy(g.specularColor),g.specularColorMap&&(v.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,v.specularColorMapTransform)),g.specularIntensityMap&&(v.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,v.specularIntensityMapTransform))}function p(v,g){g.matcap&&(v.matcap.value=g.matcap)}function m(v,g){const _=e.get(g).light;v.referencePosition.value.setFromMatrixPosition(_.matrixWorld),v.nearDistance.value=_.shadow.camera.near,v.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function $De(n,e,t,i){let r={},a={},o=[];const s=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(_,S){const x=S.program;i.uniformBlockBinding(_,x)}function u(_,S){let x=r[_.id];x===void 0&&(p(_),x=c(_),r[_.id]=x,_.addEventListener("dispose",v));const A=S.program;i.updateUBOMapping(_,A);const C=e.render.frame;a[_.id]!==C&&(h(_),a[_.id]=C)}function c(_){const S=d();_.__bindingPointIndex=S;const x=n.createBuffer(),A=_.__size,C=_.usage;return n.bindBuffer(n.UNIFORM_BUFFER,x),n.bufferData(n.UNIFORM_BUFFER,A,C),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,S,x),x}function d(){for(let _=0;_0&&(x+=A-C),_.__size=x,_.__cache={},this}function m(_){const S={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(S.boundary=4,S.storage=4):_.isVector2?(S.boundary=8,S.storage=8):_.isVector3||_.isColor?(S.boundary=16,S.storage=12):_.isVector4?(S.boundary=16,S.storage=16):_.isMatrix3?(S.boundary=48,S.storage=48):_.isMatrix4?(S.boundary=64,S.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),S}function v(_){const S=_.target;S.removeEventListener("dispose",v);const x=o.indexOf(S.__bindingPointIndex);o.splice(x,1),n.deleteBuffer(r[S.id]),delete r[S.id],delete a[S.id]}function g(){for(const _ in r)n.deleteBuffer(r[_]);o=[],r={},a={}}return{bind:l,update:u,dispose:g}}class vR{constructor(e={}){const{canvas:t=GEe(),context:i=null,depth:r=!0,stencil:a=!0,alpha:o=!1,antialias:s=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let h;i!==null?h=i.getContextAttributes().alpha:h=o;const f=new Uint32Array(4),p=new Int32Array(4);let m=null,v=null;const g=[],_=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=$r,this._useLegacyLights=!1,this.toneMapping=Sh,this.toneMappingExposure=1;const S=this;let x=!1,A=0,C=0,M=null,I=-1,D=null;const E=new Er,P=new Er;let F=null;const V=new Jn(0);let G=0,W=t.width,Y=t.height,Q=1,K=null,ae=null;const ie=new Er(0,0,W,Y),he=new Er(0,0,W,Y);let Ee=!1;const He=new fR;let xe=!1,Fe=!1,pt=null;const Ot=new Bi,bt=new on,ht=new Le,Kt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Tt(){return M===null?Q:1}let Ae=i;function Lt(we,Xe){for(let Pt=0;Pt{function Fn(){if(Rt.forEach(function(Qn){Ct.get(Qn).currentProgram.isReady()&&Rt.delete(Qn)}),Rt.size===0){Et(we);return}setTimeout(Fn,10)}vt.get("KHR_parallel_shader_compile")!==null?Fn():setTimeout(Fn,10)})};let ut=null;function Jt(we){ut&&ut(we)}function hn(){Re.stop()}function Nn(){Re.start()}const Re=new WQ;Re.setAnimationLoop(Jt),typeof self!="undefined"&&Re.setContext(self),this.setAnimationLoop=function(we){ut=we,wn.setAnimationLoop(we),we===null?Re.stop():Re.start()},wn.addEventListener("sessionstart",hn),wn.addEventListener("sessionend",Nn),this.render=function(we,Xe){if(Xe!==void 0&&Xe.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(x===!0)return;we.matrixWorldAutoUpdate===!0&&we.updateMatrixWorld(),Xe.parent===null&&Xe.matrixWorldAutoUpdate===!0&&Xe.updateMatrixWorld(),wn.enabled===!0&&wn.isPresenting===!0&&(wn.cameraAutoUpdate===!0&&wn.updateCamera(Xe),Xe=wn.getCamera()),we.isScene===!0&&we.onBeforeRender(S,we,Xe,M),v=Yt.get(we,_.length),v.init(),_.push(v),Ot.multiplyMatrices(Xe.projectionMatrix,Xe.matrixWorldInverse),He.setFromProjectionMatrix(Ot),Fe=this.localClippingEnabled,xe=st.init(this.clippingPlanes,Fe),m=mt.get(we,g.length),m.init(),g.push(m),lt(we,Xe,0,S.sortObjects),m.finish(),S.sortObjects===!0&&m.sort(K,ae),this.info.render.frame++,xe===!0&&st.beginShadows();const Pt=v.state.shadowsArray;if(it.render(Pt,we,Xe),xe===!0&&st.endShadows(),this.info.autoReset===!0&&this.info.reset(),(wn.enabled===!1||wn.isPresenting===!1||wn.hasDepthSensing()===!1)&&Vt.render(m,we),v.setupLights(S._useLegacyLights),Xe.isArrayCamera){const Rt=Xe.cameras;for(let Et=0,Fn=Rt.length;Et0?v=_[_.length-1]:v=null,g.pop(),g.length>0?m=g[g.length-1]:m=null};function lt(we,Xe,Pt,Rt){if(we.visible===!1)return;if(we.layers.test(Xe.layers)){if(we.isGroup)Pt=we.renderOrder;else if(we.isLOD)we.autoUpdate===!0&&we.update(Xe);else if(we.isLight)v.pushLight(we),we.castShadow&&v.pushShadow(we);else if(we.isSprite){if(!we.frustumCulled||He.intersectsSprite(we)){Rt&&ht.setFromMatrixPosition(we.matrixWorld).applyMatrix4(Ot);const Qn=Ce.update(we),ci=we.material;ci.visible&&m.push(we,Qn,ci,Pt,ht.z,null)}}else if((we.isMesh||we.isLine||we.isPoints)&&(!we.frustumCulled||He.intersectsObject(we))){const Qn=Ce.update(we),ci=we.material;if(Rt&&(we.boundingSphere!==void 0?(we.boundingSphere===null&&we.computeBoundingSphere(),ht.copy(we.boundingSphere.center)):(Qn.boundingSphere===null&&Qn.computeBoundingSphere(),ht.copy(Qn.boundingSphere.center)),ht.applyMatrix4(we.matrixWorld).applyMatrix4(Ot)),Array.isArray(ci)){const li=Qn.groups;for(let Z=0,H=li.length;Z0&&Pi(Et,Fn,Xe,Pt),Rt&&k.viewport(E.copy(Rt)),Et.length>0&&er(Et,Xe,Pt),Fn.length>0&&er(Fn,Xe,Pt),Qn.length>0&&er(Qn,Xe,Pt),k.buffers.depth.setTest(!0),k.buffers.depth.setMask(!0),k.buffers.color.setMask(!0),k.setPolygonOffset(!1)}function Pi(we,Xe,Pt,Rt){if((Pt.isScene===!0?Pt.overrideMaterial:null)!==null)return;const Fn=Ft.isWebGL2;pt===null&&(pt=new Hp(1,1,{generateMipmaps:!0,type:vt.has("EXT_color_buffer_half_float")?K9:bh,minFilter:kc,samples:Fn?4:0})),S.getDrawingBufferSize(bt),Fn?pt.setSize(bt.x,bt.y):pt.setSize(z8(bt.x),z8(bt.y));const Qn=S.getRenderTarget();S.setRenderTarget(pt),S.getClearColor(V),G=S.getClearAlpha(),G<1&&S.setClearColor(16777215,.5),S.clear();const ci=S.toneMapping;S.toneMapping=Sh,er(we,Pt,Rt),J.updateMultisampleRenderTarget(pt),J.updateRenderTargetMipmap(pt);let li=!1;for(let Z=0,H=Xe.length;Z0),w=!!Pt.morphAttributes.position,T=!!Pt.morphAttributes.normal,R=!!Pt.morphAttributes.color;let N=Sh;Rt.toneMapped&&(M===null||M.isXRRenderTarget===!0)&&(N=S.toneMapping);const z=Pt.morphAttributes.position||Pt.morphAttributes.normal||Pt.morphAttributes.color,U=z!==void 0?z.length:0,ue=Ct.get(Rt),pe=v.state.lights;if(xe===!0&&(Fe===!0||we!==D)){const fe=we===D&&Rt.id===I;st.setState(Rt,we,fe)}let de=!1;Rt.version===ue.__version?(ue.needsLights&&ue.lightsStateVersion!==pe.state.version||ue.outputColorSpace!==ci||Et.isBatchedMesh&&ue.batching===!1||!Et.isBatchedMesh&&ue.batching===!0||Et.isInstancedMesh&&ue.instancing===!1||!Et.isInstancedMesh&&ue.instancing===!0||Et.isSkinnedMesh&&ue.skinning===!1||!Et.isSkinnedMesh&&ue.skinning===!0||Et.isInstancedMesh&&ue.instancingColor===!0&&Et.instanceColor===null||Et.isInstancedMesh&&ue.instancingColor===!1&&Et.instanceColor!==null||ue.envMap!==li||Rt.fog===!0&&ue.fog!==Fn||ue.numClippingPlanes!==void 0&&(ue.numClippingPlanes!==st.numPlanes||ue.numIntersection!==st.numIntersection)||ue.vertexAlphas!==Z||ue.vertexTangents!==H||ue.morphTargets!==w||ue.morphNormals!==T||ue.morphColors!==R||ue.toneMapping!==N||Ft.isWebGL2===!0&&ue.morphTargetsCount!==U)&&(de=!0):(de=!0,ue.__version=Rt.version);let se=ue.currentProgram;de===!0&&(se=ze(Rt,Xe,Et));let re=!1,Oe=!1,be=!1;const me=se.getUniforms(),ge=ue.uniforms;if(k.useProgram(se.program)&&(re=!0,Oe=!0,be=!0),Rt.id!==I&&(I=Rt.id,Oe=!0),re||D!==we){me.setValue(Ae,"projectionMatrix",we.projectionMatrix),me.setValue(Ae,"viewMatrix",we.matrixWorldInverse);const fe=me.map.cameraPosition;fe!==void 0&&fe.setValue(Ae,ht.setFromMatrixPosition(we.matrixWorld)),Ft.logarithmicDepthBuffer&&me.setValue(Ae,"logDepthBufFC",2/(Math.log(we.far+1)/Math.LN2)),(Rt.isMeshPhongMaterial||Rt.isMeshToonMaterial||Rt.isMeshLambertMaterial||Rt.isMeshBasicMaterial||Rt.isMeshStandardMaterial||Rt.isShaderMaterial)&&me.setValue(Ae,"isOrthographic",we.isOrthographicCamera===!0),D!==we&&(D=we,Oe=!0,be=!0)}if(Et.isSkinnedMesh){me.setOptional(Ae,Et,"bindMatrix"),me.setOptional(Ae,Et,"bindMatrixInverse");const fe=Et.skeleton;fe&&(Ft.floatVertexTextures?(fe.boneTexture===null&&fe.computeBoneTexture(),me.setValue(Ae,"boneTexture",fe.boneTexture,J)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Et.isBatchedMesh&&(me.setOptional(Ae,Et,"batchingTexture"),me.setValue(Ae,"batchingTexture",Et._matricesTexture,J));const Ze=Pt.morphAttributes;if((Ze.position!==void 0||Ze.normal!==void 0||Ze.color!==void 0&&Ft.isWebGL2===!0)&&Zt.update(Et,Pt,se),(Oe||ue.receiveShadow!==Et.receiveShadow)&&(ue.receiveShadow=Et.receiveShadow,me.setValue(Ae,"receiveShadow",Et.receiveShadow)),Rt.isMeshGouraudMaterial&&Rt.envMap!==null&&(ge.envMap.value=li,ge.flipEnvMap.value=li.isCubeTexture&&li.isRenderTargetTexture===!1?-1:1),Oe&&(me.setValue(Ae,"toneMappingExposure",S.toneMappingExposure),ue.needsLights&&ft(ge,be),Fn&&Rt.fog===!0&&$e.refreshFogUniforms(ge,Fn),$e.refreshMaterialUniforms(ge,Rt,Q,Y,pt),m5.upload(Ae,Qe(ue),ge,J)),Rt.isShaderMaterial&&Rt.uniformsNeedUpdate===!0&&(m5.upload(Ae,Qe(ue),ge,J),Rt.uniformsNeedUpdate=!1),Rt.isSpriteMaterial&&me.setValue(Ae,"center",Et.center),me.setValue(Ae,"modelViewMatrix",Et.modelViewMatrix),me.setValue(Ae,"normalMatrix",Et.normalMatrix),me.setValue(Ae,"modelMatrix",Et.matrixWorld),Rt.isShaderMaterial||Rt.isRawShaderMaterial){const fe=Rt.uniformsGroups;for(let B=0,te=fe.length;B0&&J.useMultisampledRTT(we)===!1?Et=Ct.get(we).__webglMultisampledFramebuffer:Array.isArray(H)?Et=H[Pt]:Et=H,E.copy(we.viewport),P.copy(we.scissor),F=we.scissorTest}else E.copy(ie).multiplyScalar(Q).floor(),P.copy(he).multiplyScalar(Q).floor(),F=Ee;if(k.bindFramebuffer(Ae.FRAMEBUFFER,Et)&&Ft.drawBuffers&&Rt&&k.drawBuffers(we,Et),k.viewport(E),k.scissor(P),k.setScissorTest(F),Fn){const li=Ct.get(we.texture);Ae.framebufferTexture2D(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,Ae.TEXTURE_CUBE_MAP_POSITIVE_X+Xe,li.__webglTexture,Pt)}else if(Qn){const li=Ct.get(we.texture),Z=Xe||0;Ae.framebufferTextureLayer(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,li.__webglTexture,Pt||0,Z)}I=-1},this.readRenderTargetPixels=function(we,Xe,Pt,Rt,Et,Fn,Qn){if(!(we&&we.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ci=Ct.get(we).__webglFramebuffer;if(we.isWebGLCubeRenderTarget&&Qn!==void 0&&(ci=ci[Qn]),ci){k.bindFramebuffer(Ae.FRAMEBUFFER,ci);try{const li=we.texture,Z=li.format,H=li.type;if(Z!==y0&&an.convert(Z)!==Ae.getParameter(Ae.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const w=H===K9&&(vt.has("EXT_color_buffer_half_float")||Ft.isWebGL2&&vt.has("EXT_color_buffer_float"));if(H!==bh&&an.convert(H)!==Ae.getParameter(Ae.IMPLEMENTATION_COLOR_READ_TYPE)&&!(H===Nu&&(Ft.isWebGL2||vt.has("OES_texture_float")||vt.has("WEBGL_color_buffer_float")))&&!w){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Xe>=0&&Xe<=we.width-Rt&&Pt>=0&&Pt<=we.height-Et&&Ae.readPixels(Xe,Pt,Rt,Et,an.convert(Z),an.convert(H),Fn)}finally{const li=M!==null?Ct.get(M).__webglFramebuffer:null;k.bindFramebuffer(Ae.FRAMEBUFFER,li)}}},this.copyFramebufferToTexture=function(we,Xe,Pt=0){const Rt=Math.pow(2,-Pt),Et=Math.floor(Xe.image.width*Rt),Fn=Math.floor(Xe.image.height*Rt);J.setTexture2D(Xe,0),Ae.copyTexSubImage2D(Ae.TEXTURE_2D,Pt,0,0,we.x,we.y,Et,Fn),k.unbindTexture()},this.copyTextureToTexture=function(we,Xe,Pt,Rt=0){const Et=Xe.image.width,Fn=Xe.image.height,Qn=an.convert(Pt.format),ci=an.convert(Pt.type);J.setTexture2D(Pt,0),Ae.pixelStorei(Ae.UNPACK_FLIP_Y_WEBGL,Pt.flipY),Ae.pixelStorei(Ae.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Pt.premultiplyAlpha),Ae.pixelStorei(Ae.UNPACK_ALIGNMENT,Pt.unpackAlignment),Xe.isDataTexture?Ae.texSubImage2D(Ae.TEXTURE_2D,Rt,we.x,we.y,Et,Fn,Qn,ci,Xe.image.data):Xe.isCompressedTexture?Ae.compressedTexSubImage2D(Ae.TEXTURE_2D,Rt,we.x,we.y,Xe.mipmaps[0].width,Xe.mipmaps[0].height,Qn,Xe.mipmaps[0].data):Ae.texSubImage2D(Ae.TEXTURE_2D,Rt,we.x,we.y,Qn,ci,Xe.image),Rt===0&&Pt.generateMipmaps&&Ae.generateMipmap(Ae.TEXTURE_2D),k.unbindTexture()},this.copyTextureToTexture3D=function(we,Xe,Pt,Rt,Et=0){if(S.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Fn=we.max.x-we.min.x+1,Qn=we.max.y-we.min.y+1,ci=we.max.z-we.min.z+1,li=an.convert(Rt.format),Z=an.convert(Rt.type);let H;if(Rt.isData3DTexture)J.setTexture3D(Rt,0),H=Ae.TEXTURE_3D;else if(Rt.isDataArrayTexture||Rt.isCompressedArrayTexture)J.setTexture2DArray(Rt,0),H=Ae.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Ae.pixelStorei(Ae.UNPACK_FLIP_Y_WEBGL,Rt.flipY),Ae.pixelStorei(Ae.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Rt.premultiplyAlpha),Ae.pixelStorei(Ae.UNPACK_ALIGNMENT,Rt.unpackAlignment);const w=Ae.getParameter(Ae.UNPACK_ROW_LENGTH),T=Ae.getParameter(Ae.UNPACK_IMAGE_HEIGHT),R=Ae.getParameter(Ae.UNPACK_SKIP_PIXELS),N=Ae.getParameter(Ae.UNPACK_SKIP_ROWS),z=Ae.getParameter(Ae.UNPACK_SKIP_IMAGES),U=Pt.isCompressedTexture?Pt.mipmaps[Et]:Pt.image;Ae.pixelStorei(Ae.UNPACK_ROW_LENGTH,U.width),Ae.pixelStorei(Ae.UNPACK_IMAGE_HEIGHT,U.height),Ae.pixelStorei(Ae.UNPACK_SKIP_PIXELS,we.min.x),Ae.pixelStorei(Ae.UNPACK_SKIP_ROWS,we.min.y),Ae.pixelStorei(Ae.UNPACK_SKIP_IMAGES,we.min.z),Pt.isDataTexture||Pt.isData3DTexture?Ae.texSubImage3D(H,Et,Xe.x,Xe.y,Xe.z,Fn,Qn,ci,li,Z,U.data):Pt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Ae.compressedTexSubImage3D(H,Et,Xe.x,Xe.y,Xe.z,Fn,Qn,ci,li,U.data)):Ae.texSubImage3D(H,Et,Xe.x,Xe.y,Xe.z,Fn,Qn,ci,li,Z,U),Ae.pixelStorei(Ae.UNPACK_ROW_LENGTH,w),Ae.pixelStorei(Ae.UNPACK_IMAGE_HEIGHT,T),Ae.pixelStorei(Ae.UNPACK_SKIP_PIXELS,R),Ae.pixelStorei(Ae.UNPACK_SKIP_ROWS,N),Ae.pixelStorei(Ae.UNPACK_SKIP_IMAGES,z),Et===0&&Rt.generateMipmaps&&Ae.generateMipmap(H),k.unbindTexture()},this.initTexture=function(we){we.isCubeTexture?J.setTextureCube(we,0):we.isData3DTexture?J.setTexture3D(we,0):we.isDataArrayTexture||we.isCompressedArrayTexture?J.setTexture2DArray(we,0):J.setTexture2D(we,0),k.unbindTexture()},this.resetState=function(){A=0,C=0,M=null,k.reset(),Ln.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Fc}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===lR?"display-p3":"srgb",t.unpackColorSpace=Br.workingColorSpace===i7?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===$r?Ip:IQ}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Ip?$r:bo}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class qDe extends vR{}qDe.prototype.isWebGL1Renderer=!0;class mR{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Jn(e),this.near=t,this.far=i}clone(){return new mR(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class ZQ extends la{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class gR{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=VC,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=T0()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Dp("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,a=this.stride;re.far||t.push({distance:l,point:og.clone(),uv:X0.getInterpolation(og,l4,lg,u4,RV,Qw,LV,new on),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function c4(n,e,t,i,r,a){v2.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(sg.x=a*v2.x-r*v2.y,sg.y=r*v2.x+a*v2.y):sg.copy(v2),n.copy(e),n.x+=sg.x,n.y+=sg.y,n.applyMatrix4(JQ)}const IV=new Le,DV=new Er,NV=new Er,XDe=new Le,kV=new Bi,d4=new Le,eT=new D0,FV=new Bi,tT=new Qv;class YDe extends fr{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=hU,this.bindMatrix=new Bi,this.bindMatrixInverse=new Bi,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new I0),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let i=0;il)continue;h.applyMatrix4(this.matrixWorld);const I=e.ray.origin.distanceTo(h);Ie.far||t.push({distance:I,point:d.clone().applyMatrix4(this.matrixWorld),index:S,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),_=Math.min(v.count,o.start+o.count);for(let S=g,x=_-1;Sl)continue;h.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(h);Ce.far||t.push({distance:C,point:d.clone().applyMatrix4(this.matrixWorld),index:S,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=r.length;a0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=r.length;ar.far)return;a.push({distance:u,distanceToRay:Math.sqrt(s),point:l,index:e,face:null,object:o})}}class bR extends yo{constructor(e,t,i,r,a,o,s,l,u){super(e,t,i,r,a,o,s,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class ic{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),a=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),a+=i.distanceTo(r),t.push(a),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const a=i.length;let o;t?o=t:o=e*i[a-1];let s=0,l=a-1,u;for(;s<=l;)if(r=Math.floor(s+(l-s)/2),u=i[r]-o,u<0)s=r+1;else if(u>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(a-1);const c=i[r],h=i[r+1]-c,f=(o-c)/h;return(r+f)/(a-1)}getTangent(e,t){let r=e-1e-4,a=e+1e-4;r<0&&(r=0),a>1&&(a=1);const o=this.getPoint(r),s=this.getPoint(a),l=t||(o.isVector2?new on:new Le);return l.copy(s).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new Le,r=[],a=[],o=[],s=new Le,l=new Bi;for(let f=0;f<=e;f++){const p=f/e;r[f]=this.getTangentAt(p,new Le)}a[0]=new Le,o[0]=new Le;let u=Number.MAX_VALUE;const c=Math.abs(r[0].x),d=Math.abs(r[0].y),h=Math.abs(r[0].z);c<=u&&(u=c,i.set(1,0,0)),d<=u&&(u=d,i.set(0,1,0)),h<=u&&i.set(0,0,1),s.crossVectors(r[0],i).normalize(),a[0].crossVectors(r[0],s),o[0].crossVectors(r[0],a[0]);for(let f=1;f<=e;f++){if(a[f]=a[f-1].clone(),o[f]=o[f-1].clone(),s.crossVectors(r[f-1],r[f]),s.length()>Number.EPSILON){s.normalize();const p=Math.acos(so(r[f-1].dot(r[f]),-1,1));a[f].applyMatrix4(l.makeRotationAxis(s,p))}o[f].crossVectors(r[f],a[f])}if(t===!0){let f=Math.acos(so(a[0].dot(a[e]),-1,1));f/=e,r[0].dot(s.crossVectors(a[0],a[e]))>0&&(f=-f);for(let p=1;p<=e;p++)a[p].applyMatrix4(l.makeRotationAxis(r[p],f*p)),o[p].crossVectors(r[p],a[p])}return{tangents:r,normals:a,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class xR extends ic{constructor(e=0,t=0,i=1,r=1,a=0,o=Math.PI*2,s=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=a,this.aEndAngle=o,this.aClockwise=s,this.aRotation=l}getPoint(e,t){const i=t||new on,r=Math.PI*2;let a=this.aEndAngle-this.aStartAngle;const o=Math.abs(a)r;)a-=r;a0?0:(Math.floor(Math.abs(s)/a)+1)*a:l===0&&s===a-1&&(s=a-2,l=1);let u,c;this.closed||s>0?u=r[(s-1)%a]:(m4.subVectors(r[0],r[1]).add(r[0]),u=m4);const d=r[s%a],h=r[(s+1)%a];if(this.closed||s+2r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(qV(s,l.x,u.x,c.x,d.x),qV(s,l.y,u.y,c.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[a]-i,s=this.curves[a],l=s.getLength(),u=l===0?0:1-o/l;return s.getPointAt(u,t)}a++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const d=u.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(u);const c=u.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class ju extends XV{constructor(e){super(e),this.uuid=T0(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,r=this.holes.length;i80*t){s=u=n[0],l=c=n[1];for(let p=t;pu&&(u=d),h>c&&(c=h);f=Math.max(u-s,c-l),f=f!==0?32767/f:0}return e3(a,o,t,s,l,f,0),o}};function aee(n,e,t,i,r){let a,o;if(r===MNe(n,e,t,i)>0)for(a=e;a=e;a-=i)o=YV(a,n[a],n[a+1],o);return o&&s7(o,o.next)&&(n3(o),o=o.next),o}function Wp(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(s7(t,t.next)||Pa(t.prev,t,t.next)===0)){if(n3(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function e3(n,e,t,i,r,a,o){if(!n)return;!o&&a&&bNe(n,i,r,a);let s=n,l,u;for(;n.prev!==n.next;){if(l=n.prev,u=n.next,a?fNe(n,i,r,a):hNe(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(u.i/t|0),n3(n),n=u.next,s=u.next;continue}if(n=u,n===s){o?o===1?(n=pNe(Wp(n),e,t),e3(n,e,t,i,r,a,2)):o===2&&vNe(n,e,t,i,r,a):e3(Wp(n),e,t,i,r,a,1);break}}}function hNe(n){const e=n.prev,t=n,i=n.next;if(Pa(e,t,i)>=0)return!1;const r=e.x,a=t.x,o=i.x,s=e.y,l=t.y,u=i.y,c=ra?r>o?r:o:a>o?a:o,f=s>l?s>u?s:u:l>u?l:u;let p=i.next;for(;p!==e;){if(p.x>=c&&p.x<=h&&p.y>=d&&p.y<=f&&F2(r,s,a,l,o,u,p.x,p.y)&&Pa(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function fNe(n,e,t,i){const r=n.prev,a=n,o=n.next;if(Pa(r,a,o)>=0)return!1;const s=r.x,l=a.x,u=o.x,c=r.y,d=a.y,h=o.y,f=sl?s>u?s:u:l>u?l:u,v=c>d?c>h?c:h:d>h?d:h,g=XC(f,p,e,t,i),_=XC(m,v,e,t,i);let S=n.prevZ,x=n.nextZ;for(;S&&S.z>=g&&x&&x.z<=_;){if(S.x>=f&&S.x<=m&&S.y>=p&&S.y<=v&&S!==r&&S!==o&&F2(s,c,l,d,u,h,S.x,S.y)&&Pa(S.prev,S,S.next)>=0||(S=S.prevZ,x.x>=f&&x.x<=m&&x.y>=p&&x.y<=v&&x!==r&&x!==o&&F2(s,c,l,d,u,h,x.x,x.y)&&Pa(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;S&&S.z>=g;){if(S.x>=f&&S.x<=m&&S.y>=p&&S.y<=v&&S!==r&&S!==o&&F2(s,c,l,d,u,h,S.x,S.y)&&Pa(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;x&&x.z<=_;){if(x.x>=f&&x.x<=m&&x.y>=p&&x.y<=v&&x!==r&&x!==o&&F2(s,c,l,d,u,h,x.x,x.y)&&Pa(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function pNe(n,e,t){let i=n;do{const r=i.prev,a=i.next.next;!s7(r,a)&&oee(r,i,i.next,a)&&t3(r,a)&&t3(a,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(a.i/t|0),n3(i),n3(i.next),i=n=a),i=i.next}while(i!==n);return Wp(i)}function vNe(n,e,t,i,r,a){let o=n;do{let s=o.next.next;for(;s!==o.prev;){if(o.i!==s.i&&TNe(o,s)){let l=see(o,s);o=Wp(o,o.next),l=Wp(l,l.next),e3(o,e,t,i,r,a,0),e3(l,e,t,i,r,a,0);return}s=s.next}o=o.next}while(o!==n)}function mNe(n,e,t,i){const r=[];let a,o,s,l,u;for(a=0,o=e.length;a=t.next.y&&t.next.y!==t.y){const h=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(h<=a&&h>i&&(i=h,r=t.x=t.x&&t.x>=l&&a!==t.x&&F2(or.x||t.x===r.x&&SNe(r,t)))&&(r=t,c=d)),t=t.next;while(t!==s);return r}function SNe(n,e){return Pa(n.prev,n,e.prev)<0&&Pa(e.next,n,n.next)<0}function bNe(n,e,t,i){let r=n;do r.z===0&&(r.z=XC(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,xNe(r)}function xNe(n){let e,t,i,r,a,o,s,l,u=1;do{for(t=n,n=null,a=null,o=0;t;){for(o++,i=t,s=0,e=0;e0||l>0&&i;)s!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,s--):(r=i,i=i.nextZ,l--),a?a.nextZ=r:n=r,r.prevZ=a,a=r;t=i}a.nextZ=null,u*=2}while(o>1);return n}function XC(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function wNe(n){let e=n,t=n;do(e.x=(n-o)*(a-s)&&(n-o)*(i-s)>=(t-o)*(e-s)&&(t-o)*(a-s)>=(r-o)*(i-s)}function TNe(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!ANe(n,e)&&(t3(n,e)&&t3(e,n)&&CNe(n,e)&&(Pa(n.prev,n,e.prev)||Pa(n,e.prev,e))||s7(n,e)&&Pa(n.prev,n,n.next)>0&&Pa(e.prev,e,e.next)>0)}function Pa(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function s7(n,e){return n.x===e.x&&n.y===e.y}function oee(n,e,t,i){const r=y4(Pa(n,e,t)),a=y4(Pa(n,e,i)),o=y4(Pa(t,i,n)),s=y4(Pa(t,i,e));return!!(r!==a&&o!==s||r===0&&g4(n,t,e)||a===0&&g4(n,i,e)||o===0&&g4(t,n,i)||s===0&&g4(t,e,i))}function g4(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function y4(n){return n>0?1:n<0?-1:0}function ANe(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&oee(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function t3(n,e){return Pa(n.prev,n,n.next)<0?Pa(n,e,n.next)>=0&&Pa(n,n.prev,e)>=0:Pa(n,e,n.prev)<0||Pa(n,n.next,e)<0}function CNe(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,a=(n.y+e.y)/2;do t.y>a!=t.next.y>a&&t.next.y!==t.y&&r<(t.next.x-t.x)*(a-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function see(n,e){const t=new YC(n.i,n.x,n.y),i=new YC(e.i,e.x,e.y),r=n.next,a=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,a.next=i,i.prev=a,i}function YV(n,e,t,i){const r=new YC(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function n3(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function YC(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function MNe(n,e,t,i){let r=0;for(let a=e,o=t-i;a2&&n[e-1].equals(n[0])&&n.pop()}function ZV(n,e){for(let t=0;tNumber.EPSILON){const Ce=Math.sqrt(xt),We=Math.sqrt(ee*ee+Ue*Ue),$e=Lt.x-J/Ce,mt=Lt.y+Ct/Ce,Yt=vt.x-Ue/We,st=vt.y+ee/We,it=((Yt-$e)*Ue-(st-mt)*ee)/(Ct*Ue-J*ee);Ft=$e+Ct*it-Ae.x,k=mt+J*it-Ae.y;const Vt=Ft*Ft+k*k;if(Vt<=2)return new on(Ft,k);_t=Math.sqrt(Vt/2)}else{let Ce=!1;Ct>Number.EPSILON?ee>Number.EPSILON&&(Ce=!0):Ct<-Number.EPSILON?ee<-Number.EPSILON&&(Ce=!0):Math.sign(J)===Math.sign(Ue)&&(Ce=!0),Ce?(Ft=-J,k=Ct,_t=Math.sqrt(xt)):(Ft=Ct,k=J,_t=Math.sqrt(xt/2))}return new on(Ft/_t,k/_t)}const ae=[];for(let Ae=0,Lt=G.length,vt=Lt-1,Ft=Ae+1;Ae=0;Ae--){const Lt=Ae/v,vt=f*Math.cos(Lt*Math.PI/2),Ft=p*Math.sin(Lt*Math.PI/2)+m;for(let k=0,_t=G.length;k<_t;k++){const Ct=W(G[k],ae[k],Ft);Ot(Ct.x,Ct.y,d+vt)}for(let k=0,_t=P.length;k<_t;k++){const Ct=P[k];he=ie[k];for(let J=0,ee=Ct.length;J=0;){const Ft=vt;let k=vt-1;k<0&&(k=Ae.length-1);for(let _t=0,Ct=c+v*2;_t0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class KC extends A0{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Jn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Jn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sR,this.normalScale=new on(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=aR,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function _4(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function INe(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function DNe(n){function e(r,a){return n[r]-n[a]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function QV(n,e,t){const i=n.length,r=new n.constructor(i);for(let a=0,o=0;o!==i;++a){const s=t[a]*e;for(let l=0;l!==e;++l)r[o++]=n[s+l]}return r}function lee(n,e,t,i){let r=1,a=n[0];for(;a!==void 0&&a[i]===void 0;)a=n[r++];if(a===void 0)return;let o=a[i];if(o!==void 0)if(Array.isArray(o))do o=a[i],o!==void 0&&(e.push(a.time),t.push.apply(t,o)),a=n[r++];while(a!==void 0);else if(o.toArray!==void 0)do o=a[i],o!==void 0&&(e.push(a.time),o.toArray(t,t.length)),a=n[r++];while(a!==void 0);else do o=a[i],o!==void 0&&(e.push(a.time),t.push(o)),a=n[r++];while(a!==void 0)}class O3{constructor(e,t,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,r=t[i],a=t[i-1];e:{t:{let o;n:{i:if(!(e=a)){const s=t[1];e=a)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,a!==0||o!==r){a>=o&&(o=Math.max(o,1),a=o-1);const s=this.getValueSize();this.times=i.slice(a,o),this.values=this.values.slice(a*s,o*s)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,a=i.length;a===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let s=0;s!==a;s++){const l=i[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,o),e=!1;break}o=l}if(r!==void 0&&INe(r))for(let s=0,l=r.length;s!==l;++s){const u=r[s];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===Pw,a=e.length-1;let o=1;for(let s=1;s0){e[o]=e[a];for(let s=a*i,l=o*i,u=0;u!==i;++u)t[l+u]=t[s+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}rc.prototype.TimeBufferType=Float32Array;rc.prototype.ValueBufferType=Float32Array;rc.prototype.DefaultInterpolation=Av;class nm extends rc{}nm.prototype.ValueTypeName="bool";nm.prototype.ValueBufferType=Array;nm.prototype.DefaultInterpolation=Z9;nm.prototype.InterpolantFactoryMethodLinear=void 0;nm.prototype.InterpolantFactoryMethodSmooth=void 0;class uee extends rc{}uee.prototype.ValueTypeName="color";class Ev extends rc{}Ev.prototype.ValueTypeName="number";class ONe extends O3{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=(i-t)/(r-t);let u=e*s;for(let c=u+s;u!==c;u+=4)ru.slerpFlat(a,0,o,u-s,o,u,l);return a}}class jp extends rc{InterpolantFactoryMethodLinear(e){return new ONe(this.times,this.values,this.getValueSize(),e)}}jp.prototype.ValueTypeName="quaternion";jp.prototype.DefaultInterpolation=Av;jp.prototype.InterpolantFactoryMethodSmooth=void 0;class im extends rc{}im.prototype.ValueTypeName="string";im.prototype.ValueBufferType=Array;im.prototype.DefaultInterpolation=Z9;im.prototype.InterpolantFactoryMethodLinear=void 0;im.prototype.InterpolantFactoryMethodSmooth=void 0;class Pv extends rc{}Pv.prototype.ValueTypeName="vector";class BNe{constructor(e,t=-1,i,r=pEe){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=T0(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,s=i.length;o!==s;++o)t.push(GNe(i[o]).scale(r));const a=new this(e.name,e.duration,t,e.blendMode);return a.uuid=e.uuid,a}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let a=0,o=i.length;a!==o;++a)t.push(rc.toJSON(i[a]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const a=t.length,o=[];for(let s=0;s1){const d=c[1];let h=r[d];h||(r[d]=h=[]),h.push(u)}}const o=[];for(const s in r)o.push(this.CreateFromMorphTargetSequence(s,r[s],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,h,f,p,m){if(f.length!==0){const v=[],g=[];lee(f,v,g,p),v.length!==0&&m.push(new d(h,v,g))}},r=[],a=e.name||"default",o=e.fps||30,s=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let d=0;d{t&&t(a),this.manager.itemEnd(e)},0),a;if(Ac[e]!==void 0){Ac[e].push({onLoad:t,onProgress:i,onError:r});return}Ac[e]=[],Ac[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,l=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream=="undefined"||u.body===void 0||u.body.getReader===void 0)return u;const c=Ac[e],d=u.body.getReader(),h=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),f=h?parseInt(h):0,p=f!==0;let m=0;const v=new ReadableStream({start(g){_();function _(){d.read().then(({done:S,value:x})=>{if(S)g.close();else{m+=x.byteLength;const A=new ProgressEvent("progress",{lengthComputable:p,loaded:m,total:f});for(let C=0,M=c.length;C{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(c=>new DOMParser().parseFromString(c,s));case"json":return u.json();default:if(s===void 0)return u.text();{const d=/charset="?([^;"\s]*)"?/i.exec(s),h=d&&d[1]?d[1].toLowerCase():void 0,f=new TextDecoder(h);return u.arrayBuffer().then(p=>f.decode(p))}}}).then(u=>{ch.add(e,u);const c=Ac[e];delete Ac[e];for(let d=0,h=c.length;d{const c=Ac[e];if(c===void 0)throw this.manager.itemError(e),u;delete Ac[e];for(let d=0,h=c.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class HNe extends Vh{constructor(e){super(e)}load(e,t,i,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=this,o=ch.get(e);if(o!==void 0)return a.manager.itemStart(e),setTimeout(function(){t&&t(o),a.manager.itemEnd(e)},0),o;const s=J9("img");function l(){c(),ch.add(e,this),t&&t(this),a.manager.itemEnd(e)}function u(d){c(),r&&r(d),a.manager.itemError(e),a.manager.itemEnd(e)}function c(){s.removeEventListener("load",l,!1),s.removeEventListener("error",u,!1)}return s.addEventListener("load",l,!1),s.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(s.crossOrigin=this.crossOrigin),a.manager.itemStart(e),s.src=e,s}}class AR extends Vh{constructor(e){super(e)}load(e,t,i,r){const a=new yo,o=new HNe(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(s){a.image=s,a.needsUpdate=!0,t!==void 0&&t(a)},i,r),a}}class c7 extends la{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Jn(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const oT=new Bi,eH=new Le,tH=new Le;class CR{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new on(512,512),this.map=null,this.mapPass=null,this.matrix=new Bi,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new fR,this._frameExtents=new on(1,1),this._viewportCount=1,this._viewports=[new Er(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;eH.setFromMatrixPosition(e.matrixWorld),t.position.copy(eH),tH.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(tH),t.updateMatrixWorld(),oT.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(oT),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(oT)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class WNe extends CR{constructor(){super(new ss(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=Cv*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,a=e.distance||t.far;(i!==t.fov||r!==t.aspect||a!==t.far)&&(t.fov=i,t.aspect=r,t.far=a,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class jNe extends c7{constructor(e,t,i=0,r=Math.PI/3,a=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(la.DEFAULT_UP),this.updateMatrix(),this.target=new la,this.distance=i,this.angle=r,this.penumbra=a,this.decay=o,this.map=null,this.shadow=new WNe}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const nH=new Bi,hg=new Le,sT=new Le;class $Ne extends CR{constructor(){super(new ss(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new on(4,2),this._viewportCount=6,this._viewports=[new Er(2,1,1,1),new Er(0,1,1,1),new Er(3,1,1,1),new Er(1,1,1,1),new Er(3,0,1,1),new Er(1,0,1,1)],this._cubeDirections=[new Le(1,0,0),new Le(-1,0,0),new Le(0,0,1),new Le(0,0,-1),new Le(0,1,0),new Le(0,-1,0)],this._cubeUps=[new Le(0,1,0),new Le(0,1,0),new Le(0,1,0),new Le(0,1,0),new Le(0,0,1),new Le(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,r=this.matrix,a=e.distance||i.far;a!==i.far&&(i.far=a,i.updateProjectionMatrix()),hg.setFromMatrixPosition(e.matrixWorld),i.position.copy(hg),sT.copy(i.position),sT.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(sT),i.updateMatrixWorld(),r.makeTranslation(-hg.x,-hg.y,-hg.z),nH.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(nH)}}class dee extends c7{constructor(e,t,i=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new $Ne}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class qNe extends CR{constructor(){super(new a7(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class V8 extends c7{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(la.DEFAULT_UP),this.updateMatrix(),this.target=new la,this.shadow=new qNe}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class hee extends c7{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class a9{static decodeText(e){if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i{t&&t(u),a.manager.itemEnd(e)}).catch(u=>{r&&r(u)});return}return setTimeout(function(){t&&t(o),a.manager.itemEnd(e)},0),o}const s={};s.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",s.headers=this.requestHeader;const l=fetch(e,s).then(function(u){return u.blob()}).then(function(u){return createImageBitmap(u,Object.assign(a.options,{colorSpaceConversion:"none"}))}).then(function(u){return ch.add(e,u),t&&t(u),a.manager.itemEnd(e),u}).catch(function(u){r&&r(u),ch.remove(e),a.manager.itemError(e),a.manager.itemEnd(e)});ch.add(e,l),a.manager.itemStart(e)}}class KNe{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=iH(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=iH();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function iH(){return(typeof performance=="undefined"?Date:performance).now()}const MR="\\[\\]\\.:\\/",ZNe=new RegExp("["+MR+"]","g"),ER="[^"+MR+"]",JNe="[^"+MR.replace("\\.","")+"]",QNe=/((?:WC+[\/:])*)/.source.replace("WC",ER),eke=/(WCOD+)?/.source.replace("WCOD",JNe),tke=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",ER),nke=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",ER),ike=new RegExp("^"+QNe+eke+tke+nke+"$"),rke=["material","materials","bones","map"];class ake{constructor(e,t,i){const r=i||Hr.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,a=i.length;r!==a;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class Hr{constructor(e,t,i){this.path=t,this.parsedPath=i||Hr.parseTrackName(t),this.node=Hr.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Hr.Composite(e,t,i):new Hr(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(ZNe,"")}static parseTrackName(e){const t=ike.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const a=i.nodeName.substring(r+1);rke.indexOf(a)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=a)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(a){for(let o=0;ot}}class d7{constructor(){this.events=new Map}on(e,t){let i=this.events.get(e);i||(i=new Set,this.events.set(e,i)),i.add(t)}off(e,t){const i=this.events.get(e);i&&(t?i.delete(t):this.events.delete(e))}emit(e,...t){const i=this.events.get(e);i&&i.forEach(r=>{r(...t)})}once(e,t){const i=(...r)=>{t(...r),this.off(e,i)};this.on(e,i)}}class cke extends d7{constructor({canvas:e}){super(),this.canvas=e,this.pixelRatio=2,this.init(),window.addEventListener("resize",()=>{this.init(),this.emit("resize")})}init(){var t;const e=((t=this.canvas)==null?void 0:t.parentNode)||this.canvas||document.documentElement;this.width=e.offsetWidth||window.innerWidth||1,this.height=e.offsetHeight||window.innerHeight||1,this.pixelRatio=this.pixelRatio||Math.min(window.devicePixelRatio,2)}destroy(){this.off("resize")}}class dke extends d7{constructor(){super(),this.start=Date.now(),this.current=this.start,this.elapsed=0,this.delta=16,this.clock=new KNe,this.raf=uke(()=>this.tick()),this.raf.start()}tick(){const e=Date.now();this.delta=e-this.current,this.current=e,this.elapsed=this.current-this.start;const t=this.clock.getDelta(),i=this.clock.getElapsedTime();this.emit("tick",t,i)}destroy(){this.pause(),this.off("tick")}pause(){this.raf.pause()}resume(){this.raf.resume()}isActive(){this.raf.isActive()}}function pee(n,e=!1){const t=n[0].index!==null,i=new Set(Object.keys(n[0].attributes)),r=new Set(Object.keys(n[0].morphAttributes)),a={},o={},s=n[0].morphTargetsRelative,l=new Qr;let u=0;for(let c=0;c=2.0 are supported."));return}const u=new Wke(a,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&s[d]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+d+'".')}}u.setExtensions(o),u.setPlugins(s),u.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,a){i.parse(e,t,r,a)})}}function fke(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const cr={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class pke{constructor(e){this.parser=e,this.name=cr.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,a.source,o)}}class Mke{constructor(e){this.parser=e,this.name=cr.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,a=r.textures[e];if(!a.extensions||!a.extensions[t])return null;const o=a.extensions[t],s=r.images[o.source];let l=i.textureLoader;if(s.uri){const u=i.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Eke{constructor(e){this.parser=e,this.name=cr.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,a=r.textures[e];if(!a.extensions||!a.extensions[t])return null;const o=a.extensions[t],s=r.images[o.source];let l=i.textureLoader;if(s.uri){const u=i.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class Pke{constructor(e){this.name=cr.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],a=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return a.then(function(s){const l=r.byteOffset||0,u=r.byteLength||0,c=r.count,d=r.byteStride,h=new Uint8Array(s,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(c,d,h,r.mode,r.filter).then(function(f){return f.buffer}):o.ready.then(function(){const f=new ArrayBuffer(c*d);return o.decodeGltfBuffer(new Uint8Array(f),c,d,h,r.mode,r.filter),f})})}else return null}}class Rke{constructor(e){this.name=cr.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=t.meshes[i.mesh];for(const u of r.primitives)if(u.mode!==l0.TRIANGLES&&u.mode!==l0.TRIANGLE_STRIP&&u.mode!==l0.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=i.extensions[this.name].attributes,s=[],l={};for(const u in o)s.push(this.parser.getDependency("accessor",o[u]).then(c=>(l[u]=c,l[u])));return s.length<1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then(u=>{const c=u.pop(),d=c.isGroup?c.children:[c],h=u[0].count,f=[];for(const p of d){const m=new Bi,v=new Le,g=new ru,_=new Le(1,1,1),S=new QDe(p.geometry,p.material,h);for(let x=0;x0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const Hke=new Bi;class Wke{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new fke,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,r=!1,a=-1;typeof navigator!="undefined"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,a=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap=="undefined"||i||r&&a<98?this.textureLoader=new AR(this.options.manager):this.textureLoader=new YNe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new i3(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,a=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const s={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};return Of(a,s,r),$d(s,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(s)})).then(function(){e(s)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,a=t.length;r{const l=this.associations.get(o);l!=null&&this.associations.set(s,l);for(const[u,c]of o.children.entries())a(c,s.children[u])};return a(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&v.setY(D,C[M*l+1]),l>=3&&v.setZ(D,C[M*l+2]),l>=4&&v.setW(D,C[M*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return v})}loadTexture(e){const t=this.json,i=this.options,a=t.textures[e].source,o=t.images[a];let s=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(s=l)}return this.loadTextureImage(e,a,s)}loadTextureImage(e,t,i){const r=this,a=this.json,o=a.textures[e],s=a.images[t],l=(s.uri||s.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(t,i).then(function(c){c.flipY=!1,c.name=o.name||s.name||"",c.name===""&&typeof s.uri=="string"&&s.uri.startsWith("data:image/")===!1&&(c.name=s.uri);const h=(a.samplers||{})[o.sampler]||{};return c.magFilter=cH[h.magFilter]||ao,c.minFilter=cH[h.minFilter]||kc,c.wrapS=dH[h.wrapS]||Eo,c.wrapT=dH[h.wrapT]||Eo,r.associations.set(c,{textures:e}),c}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,t){const i=this,r=this.json,a=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],s=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(d){u=!0;const h=new Blob([d],{type:o.mimeType});return l=s.createObjectURL(h),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(d){return new Promise(function(h,f){let p=h;t.isImageBitmapLoader===!0&&(p=function(m){const v=new yo(m);v.needsUpdate=!0,h(v)}),t.load(a9.resolveURL(d,a.path),p,void 0,f)})}).then(function(d){return u===!0&&s.revokeObjectURL(l),d.userData.mimeType=o.mimeType||Vke(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=c,c}assignTexture(e,t,i,r){const a=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),a.extensions[cr.KHR_TEXTURE_TRANSFORM]){const s=i.extensions!==void 0?i.extensions[cr.KHR_TEXTURE_TRANSFORM]:void 0;if(s){const l=a.associations.get(o);o=a.extensions[cr.KHR_TEXTURE_TRANSFORM].extendTexture(o,s),a.associations.set(o,l)}}return r!==void 0&&(o.colorSpace=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent===void 0,a=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const s="PointsMaterial:"+i.uuid;let l=this.cache.get(s);l||(l=new k3,A0.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(s,l)),i=l}else if(e.isLine){const s="LineBasicMaterial:"+i.uuid;let l=this.cache.get(s);l||(l=new ku,A0.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(s,l)),i=l}if(r||a||o){let s="ClonedMaterial:"+i.uuid+":";r&&(s+="derivative-tangents:"),a&&(s+="vertex-colors:"),o&&(s+="flat-shading:");let l=this.cache.get(s);l||(l=i.clone(),a&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(s,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return dp}loadMaterial(e){const t=this,i=this.json,r=this.extensions,a=i.materials[e];let o;const s={},l=a.extensions||{},u=[];if(l[cr.KHR_MATERIALS_UNLIT]){const d=r[cr.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),u.push(d.extendParams(s,a,t))}else{const d=a.pbrMetallicRoughness||{};if(s.color=new Jn(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){const h=d.baseColorFactor;s.color.setRGB(h[0],h[1],h[2],bo),s.opacity=h[3]}d.baseColorTexture!==void 0&&u.push(t.assignTexture(s,"map",d.baseColorTexture,$r)),s.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,s.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),u.push(t.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(e,s)})))}a.doubleSided===!0&&(s.side=aa);const c=a.alphaMode||uT.OPAQUE;if(c===uT.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,c===uT.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&o!==Mr&&(u.push(t.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new on(1,1),a.normalTexture.scale!==void 0)){const d=a.normalTexture.scale;s.normalScale.set(d,d)}if(a.occlusionTexture!==void 0&&o!==Mr&&(u.push(t.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&o!==Mr){const d=a.emissiveFactor;s.emissive=new Jn().setRGB(d[0],d[1],d[2],bo)}return a.emissiveTexture!==void 0&&o!==Mr&&u.push(t.assignTexture(s,"emissiveMap",a.emissiveTexture,$r)),Promise.all(u).then(function(){const d=new o(s);return a.name&&(d.name=a.name),$d(d,a),t.associations.set(d,{materials:e}),a.extensions&&Of(r,d,a),d})}createUniqueName(e){const t=Hr.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function a(s){return i[cr.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(s,t).then(function(l){return hH(l,s,t)})}const o=[];for(let s=0,l=e.length;s0&&Gke(g,a),g.name=t.createUniqueName(a.name||"mesh_"+e),$d(g,a),v.extensions&&Of(r,g,v),t.assignFinalMaterial(g),d.push(g)}for(let f=0,p=d.length;f1?c=new Nr:u.length===1?c=u[0]:c=new la,c!==u[0])for(let d=0,h=u.length;d{const d=new Map;for(const[h,f]of r.associations)(h instanceof A0||h instanceof yo)&&d.set(h,f);return c.traverse(h=>{const f=r.associations.get(h);f!=null&&d.set(h,f)}),d};return r.associations=u(a),a})}_createAnimationTracks(e,t,i,r,a){const o=[],s=e.name?e.name:e.uuid,l=[];zd[a.path]===zd.weights?e.traverse(function(h){h.morphTargetInfluences&&l.push(h.name?h.name:h.uuid)}):l.push(s);let u;switch(zd[a.path]){case zd.weights:u=Ev;break;case zd.rotation:u=jp;break;case zd.position:case zd.scale:u=Pv;break;default:switch(i.itemSize){case 1:u=Ev;break;case 2:case 3:default:u=Pv;break}break}const c=r.interpolation!==void 0?Oke[r.interpolation]:Av,d=this._getArrayFromAccessor(i);for(let h=0,f=l.length;h{this.parse(o,t,r)},i,r)}parse(e,t,i=()=>{}){this.decodeDracoFile(e,t,null,null,$r).catch(i)}decodeDracoFile(e,t,i,r,a=bo,o=()=>{}){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:a};return this.decodeGeometry(e,s).then(t).catch(o)}decodeGeometry(e,t){const i=JSON.stringify(t);if(dT.has(e)){const l=dT.get(e);if(l.key===i)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const a=this.workerNextTaskID++,o=e.byteLength,s=this._getWorker(a,o).then(l=>(r=l,new Promise((u,c)=>{r._callbacks[a]={resolve:u,reject:c},r.postMessage({type:"decode",id:a,taskConfig:t,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return s.catch(()=>!0).then(()=>{r&&a&&this._releaseTask(r,a)}),dT.set(e,{key:i,promise:s}),s}_createGeometry(e){const t=new Qr;e.index&&t.setIndex(new La(e.index.array,1));for(let i=0;i{i.load(e,r,void 0,a)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const a=qke.toString(),o=["/* draco decoder */",r,"","/* worker */",a.substring(a.indexOf("{")+1,a.lastIndexOf("}"))].join(` `);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.lengtha._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e{const d=c.draco,h=new d.Decoder;try{const f=t(d,h,new Int8Array(l),u),p=f.attributes.map(m=>m.array.buffer);f.index&&p.push(f.index.array.buffer),self.postMessage({type:"decode",id:s.id,geometry:f},p)}catch(f){console.error(f),self.postMessage({type:"error",id:s.id,error:f.message})}finally{d.destroy(h)}});break}};function t(o,s,l,u){const c=u.attributeIDs,d=u.attributeTypes;let h,f;const p=s.GetEncodedGeometryType(l);if(p===o.TRIANGULAR_MESH)h=new o.Mesh,f=s.DecodeArrayToMesh(l,l.byteLength,h);else if(p===o.POINT_CLOUD)h=new o.PointCloud,f=s.DecodeArrayToPointCloud(l,l.byteLength,h);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!f.ok()||h.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+f.error_msg());const m={index:null,attributes:[]};for(const v in c){const g=self[d[v]];let _,S;if(u.useUniqueIDs)S=c[v],_=s.GetAttributeByUniqueId(h,S);else{if(S=s.GetAttributeId(h,o[c[v]]),S===-1)continue;_=s.GetAttribute(h,S)}const x=r(o,s,h,v,g,_);v==="color"&&(x.vertexColorSpace=u.vertexColorSpace),m.attributes.push(x)}return p===o.TRIANGULAR_MESH&&(m.index=i(o,s,h)),o.destroy(h),m}function i(o,s,l){const c=l.num_faces()*3,d=c*4,h=o._malloc(d);s.GetTrianglesUInt32Array(l,d,h);const f=new Uint32Array(o.HEAPF32.buffer,h,c).slice();return o._free(h),{array:f,itemSize:1}}function r(o,s,l,u,c,d){const h=d.num_components(),p=l.num_points()*h,m=p*c.BYTES_PER_ELEMENT,v=a(o,c),g=o._malloc(m);s.GetAttributeDataArrayForAllPoints(l,d,v,m,g);const _=new c(o.HEAPF32.buffer,g,p).slice();return o._free(g),{name:u,array:_,itemSize:h}}function a(o,s){switch(s){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let tM={GLTFLoader:"GLTF",TextureLoader:"Texture",FontLoader:"Font",MMDLoader:"MMD",MTLLoader:"MTL",OBJLoader:"OBJ",PCDLoader:"PCD",FileLoader:"File",ImageLoader:"Image",ObjectLoader:"Object",MaterialLoader:"Material",CubeTextureLoader:"CubeTexture",RGBELoader:"RGBELoader",FBXLoader:"FBX"};const Xke=Object.values(tM);class Yke extends d7{constructor({dracoPath:e}={}){super(),this.dracoPath=e||"./draco/gltf/",this.itemsLoaded=0,this.itemsTotal=0,this.assets=[],this.loaders={},this.initDefaultLoader()}initManager(){const e=new cee;return e.onProgress=(t,i,r)=>{this.itemsLoaded=i,this.itemsTotal=r,this.emit("onProgress",t,i,r)},e.onError=t=>{this.emit("onError",t)},e}initDefaultLoader(){[{loader:hke,name:"GLTFLoader"},{loader:AR,name:"TextureLoader"}].map(e=>this.addLoader(e.loader,e.name))}initDraco(e){const t=new $ke;t.setDecoderPath(this.dracoPath),t.preload(),e.setDRACOLoader(t)}addLoader(e,t=""){if(e.name&&tM[t]){if(!this.loaders[t]){let r=new e(this.manager),a=t;r instanceof Vh&&(a==="GLTFLoader"&&this.initDraco(r),this.loaders[tM[a]]=r)}}else throw new Error("请配置正确的加载器")}loadItem(e){return new Promise((t,i)=>{if(!this.loaders[e.type])throw new Error(`资源${e.path}没有配置加载器`);this.loaders[e.type].load(e.path,r=>{this.itemsLoaded++,this.emit("onProgress",e.path,this.itemsLoaded,this.itemsTotal),t(tn(wt({},e),{data:r}))},null,r=>{this.emit("onError",r),i(r)})})}loadAll(e){return this.itemsLoaded=0,this.itemsTotal=0,new Promise((t,i)=>{let r=this.matchType(e),a=[];this.itemsTotal=r.length,r.map(o=>{let s=this.loadItem(o);a.push(s)}),Promise.all(a).then(o=>{this.assets=o,this.emit("onLoad"),t(o)}).catch(o=>{this.emit("onError",o),i(o)})})}matchType(e){return this.assets=e.map(t=>({type:Xke.includes(t.type)?t.type:"",path:t.path,name:t.name,data:null})).filter(t=>{if(!t.type)throw new Error(`资源${t.path},type不正确`);return t.type}),this.assets}getResource(e){let t=this.assets.find(i=>i.name===e);if(!t)throw new Error(`资源${e}不存在`);return t.data}destroy(){this.off("onProgress"),this.off("onLoad"),this.off("onError"),this.assets=[]}}const gee=n=>{n instanceof Array?n.forEach(gee):(n.map&&n.map.dispose(),n.dispose())},yee=n=>{n.geometry&&n.geometry.dispose(),n.material&&gee(n.material),n.texture&&n.texture.dispose(),n.children&&n.children.forEach(yee)},Kke=n=>{if(n&&n.children)for(;n.children.length;){const e=n.children[0];n.remove(e),yee(e)}};var PR={exports:{}},Zke=function(e,t,i,r){var a=e[0],o=e[1],s=!1;i===void 0&&(i=0),r===void 0&&(r=t.length);for(var l=(r-i)/2,u=0,c=l-1;uo!=p>o&&a<(f-d)*(o-h)/(p-h)+d;m&&(s=!s)}return s},Jke=function(e,t,i,r){var a=e[0],o=e[1],s=!1;i===void 0&&(i=0),r===void 0&&(r=t.length);for(var l=r-i,u=0,c=l-1;uo!=p>o&&a<(f-d)*(o-h)/(p-h)+d;m&&(s=!s)}return s},_ee=Zke,See=Jke;PR.exports=function(e,t,i,r){return t.length>0&&Array.isArray(t[0])?See(e,t,i,r):_ee(e,t,i,r)};PR.exports.nested=See;PR.exports.flat=_ee;function Qke(n=10,e=62){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[],r;if(e=e||t.length,n)for(r=0;r{console.log(n);let e=JSON.parse(n),t=e.features;for(let i=0;iMath.PI&&(ut-=dn),Jt<-Math.PI?Jt+=dn:Jt>Math.PI&&(Jt-=dn),ut<=Jt?s.theta=Math.max(ut,Math.min(Jt,s.theta)):s.theta=s.theta>(ut+Jt)/2?Math.max(ut,s.theta):Math.min(Jt,s.theta)),s.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,s.phi)),s.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(c,i.dampingFactor):i.target.add(c),i.target.sub(i.cursor),i.target.clampLength(i.minTargetRadius,i.maxTargetRadius),i.target.add(i.cursor),i.zoomToCursor&&C||i.object.isOrthographicCamera?s.radius=ie(s.radius):s.radius=ie(s.radius*u),je.setFromSpherical(s),je.applyQuaternion(wn),Tn.copy(i.target).add(je),i.object.lookAt(i.target),i.enableDamping===!0?(l.theta*=1-i.dampingFactor,l.phi*=1-i.dampingFactor,c.multiplyScalar(1-i.dampingFactor)):(l.set(0,0,0),c.set(0,0,0));let hn=!1;if(i.zoomToCursor&&C){let Nn=null;if(i.object.isPerspectiveCamera){const Re=je.length();Nn=ie(Re*u);const lt=Re-Nn;i.object.position.addScaledVector(x,lt),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const Re=new Le(A.x,A.y,0);Re.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/u)),i.object.updateProjectionMatrix(),hn=!0;const lt=new Le(A.x,A.y,0);lt.unproject(i.object),i.object.position.sub(lt).add(Re),i.object.updateMatrixWorld(),Nn=je.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Nn!==null&&(this.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Nn).add(i.object.position):(b4.origin.copy(i.object.position),b4.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(b4.direction))o||8*(1-Be.dot(i.object.quaternion))>o||pn.distanceToSquared(i.target)>0?(i.dispatchEvent(fH),zn.copy(i.object.position),Be.copy(i.object.quaternion),pn.copy(i.target),!0):!1}}(),this.dispose=function(){i.domElement.removeEventListener("contextmenu",Vt),i.domElement.removeEventListener("pointerdown",J),i.domElement.removeEventListener("pointercancel",Ue),i.domElement.removeEventListener("wheel",Ce),i.domElement.removeEventListener("pointermove",ee),i.domElement.removeEventListener("pointerup",Ue),i._domElementKeyEvents!==null&&(i._domElementKeyEvents.removeEventListener("keydown",Yt),i._domElementKeyEvents=null)};const i=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let a=r.NONE;const o=1e-6,s=new aH,l=new aH;let u=1;const c=new Le,d=new on,h=new on,f=new on,p=new on,m=new on,v=new on,g=new on,_=new on,S=new on,x=new Le,A=new on;let C=!1;const M=[],I={};let D=!1;function E(je){return je!==null?2*Math.PI/60*i.autoRotateSpeed*je:2*Math.PI/60/60*i.autoRotateSpeed}function P(je){const Ht=Math.abs(je*.01);return Math.pow(.95,i.zoomSpeed*Ht)}function F(je){l.theta-=je}function V(je){l.phi-=je}const G=function(){const je=new Le;return function(wn,zn){je.setFromMatrixColumn(zn,0),je.multiplyScalar(-wn),c.add(je)}}(),W=function(){const je=new Le;return function(wn,zn){i.screenSpacePanning===!0?je.setFromMatrixColumn(zn,1):(je.setFromMatrixColumn(zn,0),je.crossVectors(i.object.up,je)),je.multiplyScalar(wn),c.add(je)}}(),Y=function(){const je=new Le;return function(wn,zn){const Be=i.domElement;if(i.object.isPerspectiveCamera){const pn=i.object.position;je.copy(pn).sub(i.target);let dn=je.length();dn*=Math.tan(i.object.fov/2*Math.PI/180),G(2*wn*dn/Be.clientHeight,i.object.matrix),W(2*zn*dn/Be.clientHeight,i.object.matrix)}else i.object.isOrthographicCamera?(G(wn*(i.object.right-i.object.left)/i.object.zoom/Be.clientWidth,i.object.matrix),W(zn*(i.object.top-i.object.bottom)/i.object.zoom/Be.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}}();function Q(je){i.object.isPerspectiveCamera||i.object.isOrthographicCamera?u/=je:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function K(je){i.object.isPerspectiveCamera||i.object.isOrthographicCamera?u*=je:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function ae(je,Ht){if(!i.zoomToCursor)return;C=!0;const wn=i.domElement.getBoundingClientRect(),zn=je-wn.left,Be=Ht-wn.top,pn=wn.width,dn=wn.height;A.x=zn/pn*2-1,A.y=-(Be/dn)*2+1,x.set(A.x,A.y,1).unproject(i.object).sub(i.object.position).normalize()}function ie(je){return Math.max(i.minDistance,Math.min(i.maxDistance,je))}function he(je){d.set(je.clientX,je.clientY)}function Ee(je){ae(je.clientX,je.clientX),g.set(je.clientX,je.clientY)}function He(je){p.set(je.clientX,je.clientY)}function xe(je){h.set(je.clientX,je.clientY),f.subVectors(h,d).multiplyScalar(i.rotateSpeed);const Ht=i.domElement;F(2*Math.PI*f.x/Ht.clientHeight),V(2*Math.PI*f.y/Ht.clientHeight),d.copy(h),i.update()}function Fe(je){_.set(je.clientX,je.clientY),S.subVectors(_,g),S.y>0?Q(P(S.y)):S.y<0&&K(P(S.y)),g.copy(_),i.update()}function pt(je){m.set(je.clientX,je.clientY),v.subVectors(m,p).multiplyScalar(i.panSpeed),Y(v.x,v.y),p.copy(m),i.update()}function Ot(je){ae(je.clientX,je.clientY),je.deltaY<0?K(P(je.deltaY)):je.deltaY>0&&Q(P(je.deltaY)),i.update()}function bt(je){let Ht=!1;switch(je.code){case i.keys.UP:je.ctrlKey||je.metaKey||je.shiftKey?V(2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):Y(0,i.keyPanSpeed),Ht=!0;break;case i.keys.BOTTOM:je.ctrlKey||je.metaKey||je.shiftKey?V(-2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):Y(0,-i.keyPanSpeed),Ht=!0;break;case i.keys.LEFT:je.ctrlKey||je.metaKey||je.shiftKey?F(2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):Y(i.keyPanSpeed,0),Ht=!0;break;case i.keys.RIGHT:je.ctrlKey||je.metaKey||je.shiftKey?F(-2*Math.PI*i.rotateSpeed/i.domElement.clientHeight):Y(-i.keyPanSpeed,0),Ht=!0;break}Ht&&(je.preventDefault(),i.update())}function ht(je){if(M.length===1)d.set(je.pageX,je.pageY);else{const Ht=an(je),wn=.5*(je.pageX+Ht.x),zn=.5*(je.pageY+Ht.y);d.set(wn,zn)}}function Kt(je){if(M.length===1)p.set(je.pageX,je.pageY);else{const Ht=an(je),wn=.5*(je.pageX+Ht.x),zn=.5*(je.pageY+Ht.y);p.set(wn,zn)}}function Tt(je){const Ht=an(je),wn=je.pageX-Ht.x,zn=je.pageY-Ht.y,Be=Math.sqrt(wn*wn+zn*zn);g.set(0,Be)}function Ae(je){i.enableZoom&&Tt(je),i.enablePan&&Kt(je)}function Lt(je){i.enableZoom&&Tt(je),i.enableRotate&&ht(je)}function vt(je){if(M.length==1)h.set(je.pageX,je.pageY);else{const wn=an(je),zn=.5*(je.pageX+wn.x),Be=.5*(je.pageY+wn.y);h.set(zn,Be)}f.subVectors(h,d).multiplyScalar(i.rotateSpeed);const Ht=i.domElement;F(2*Math.PI*f.x/Ht.clientHeight),V(2*Math.PI*f.y/Ht.clientHeight),d.copy(h)}function Ft(je){if(M.length===1)m.set(je.pageX,je.pageY);else{const Ht=an(je),wn=.5*(je.pageX+Ht.x),zn=.5*(je.pageY+Ht.y);m.set(wn,zn)}v.subVectors(m,p).multiplyScalar(i.panSpeed),Y(v.x,v.y),p.copy(m)}function k(je){const Ht=an(je),wn=je.pageX-Ht.x,zn=je.pageY-Ht.y,Be=Math.sqrt(wn*wn+zn*zn);_.set(0,Be),S.set(0,Math.pow(_.y/g.y,i.zoomSpeed)),Q(S.y),g.copy(_);const pn=(je.pageX+Ht.x)*.5,dn=(je.pageY+Ht.y)*.5;ae(pn,dn)}function _t(je){i.enableZoom&&k(je),i.enablePan&&Ft(je)}function Ct(je){i.enableZoom&&k(je),i.enableRotate&&vt(je)}function J(je){i.enabled!==!1&&(M.length===0&&(i.domElement.setPointerCapture(je.pointerId),i.domElement.addEventListener("pointermove",ee),i.domElement.addEventListener("pointerup",Ue)),Zt(je),je.pointerType==="touch"?st(je):xt(je))}function ee(je){i.enabled!==!1&&(je.pointerType==="touch"?it(je):Bt(je))}function Ue(je){switch(nn(je),M.length){case 0:i.domElement.releasePointerCapture(je.pointerId),i.domElement.removeEventListener("pointermove",ee),i.domElement.removeEventListener("pointerup",Ue),i.dispatchEvent(pH),a=r.NONE;break;case 1:const Ht=M[0],wn=I[Ht];st({pointerId:Ht,pageX:wn.x,pageY:wn.y});break}}function xt(je){let Ht;switch(je.button){case 0:Ht=i.mouseButtons.LEFT;break;case 1:Ht=i.mouseButtons.MIDDLE;break;case 2:Ht=i.mouseButtons.RIGHT;break;default:Ht=-1}switch(Ht){case X1.DOLLY:if(i.enableZoom===!1)return;Ee(je),a=r.DOLLY;break;case X1.ROTATE:if(je.ctrlKey||je.metaKey||je.shiftKey){if(i.enablePan===!1)return;He(je),a=r.PAN}else{if(i.enableRotate===!1)return;he(je),a=r.ROTATE}break;case X1.PAN:if(je.ctrlKey||je.metaKey||je.shiftKey){if(i.enableRotate===!1)return;he(je),a=r.ROTATE}else{if(i.enablePan===!1)return;He(je),a=r.PAN}break;default:a=r.NONE}a!==r.NONE&&i.dispatchEvent(hT)}function Bt(je){switch(a){case r.ROTATE:if(i.enableRotate===!1)return;xe(je);break;case r.DOLLY:if(i.enableZoom===!1)return;Fe(je);break;case r.PAN:if(i.enablePan===!1)return;pt(je);break}}function Ce(je){i.enabled===!1||i.enableZoom===!1||a!==r.NONE||(je.preventDefault(),i.dispatchEvent(hT),Ot(We(je)),i.dispatchEvent(pH))}function We(je){const Ht=je.deltaMode,wn={clientX:je.clientX,clientY:je.clientY,deltaY:je.deltaY};switch(Ht){case 1:wn.deltaY*=16;break;case 2:wn.deltaY*=100;break}return je.ctrlKey&&!D&&(wn.deltaY*=10),wn}function $e(je){je.key==="Control"&&(D=!0,i.domElement.getRootNode().addEventListener("keyup",mt,{passive:!0,capture:!0}))}function mt(je){je.key==="Control"&&(D=!1,i.domElement.getRootNode().removeEventListener("keyup",mt,{passive:!0,capture:!0}))}function Yt(je){i.enabled===!1||i.enablePan===!1||bt(je)}function st(je){switch(cn(je),M.length){case 1:switch(i.touches.ONE){case Y1.ROTATE:if(i.enableRotate===!1)return;ht(je),a=r.TOUCH_ROTATE;break;case Y1.PAN:if(i.enablePan===!1)return;Kt(je),a=r.TOUCH_PAN;break;default:a=r.NONE}break;case 2:switch(i.touches.TWO){case Y1.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Ae(je),a=r.TOUCH_DOLLY_PAN;break;case Y1.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Lt(je),a=r.TOUCH_DOLLY_ROTATE;break;default:a=r.NONE}break;default:a=r.NONE}a!==r.NONE&&i.dispatchEvent(hT)}function it(je){switch(cn(je),a){case r.TOUCH_ROTATE:if(i.enableRotate===!1)return;vt(je),i.update();break;case r.TOUCH_PAN:if(i.enablePan===!1)return;Ft(je),i.update();break;case r.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;_t(je),i.update();break;case r.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ct(je),i.update();break;default:a=r.NONE}}function Vt(je){i.enabled!==!1&&je.preventDefault()}function Zt(je){M.push(je.pointerId)}function nn(je){delete I[je.pointerId];for(let Ht=0;Ht0){for(o=e[--t];t>0&&(i=o,r=e[--t],o=i+r,a=r-(o-i),!a););t>0&&(a<0&&e[t-1]<0||a>0&&e[t-1]>0)&&(r=a*2,i=o+r,r==i-o&&(o=i))}return o}}function*rFe(n){for(const e of n)yield*CD(e)}function xee(n){return Array.from(rFe(n))}var fa=1e-6,aFe=1e-12,Sr=Math.PI,Ks=Sr/2,mH=Sr/4,E0=Sr*2,wl=180/Sr,io=Sr/180,Oa=Math.abs,wee=Math.atan,r3=Math.atan2,ja=Math.cos,oFe=Math.exp,sFe=Math.log,$a=Math.sin,lFe=Math.sign||function(n){return n>0?1:n<0?-1:0},h7=Math.sqrt,uFe=Math.tan;function cFe(n){return n>1?0:n<-1?Sr:Math.acos(n)}function a3(n){return n>1?Ks:n<-1?-Ks:Math.asin(n)}function Rg(){}function H8(n,e){n&&yH.hasOwnProperty(n.type)&&yH[n.type](n,e)}var gH={Feature:function(n,e){H8(n.geometry,e)},FeatureCollection:function(n,e){for(var t=n.features,i=-1,r=t.length;++iSr&&(n-=Math.round(n/E0)*E0),[n,e]}oM.invert=oM;function Tee(n,e,t){return(n%=E0)?e||t?aM(bH(n),xH(e,t)):bH(n):e||t?xH(e,t):oM}function SH(n){return function(e,t){return e+=n,Oa(e)>Sr&&(e-=Math.round(e/E0)*E0),[e,t]}}function bH(n){var e=SH(n);return e.invert=SH(-n),e}function xH(n,e){var t=ja(n),i=$a(n),r=ja(e),a=$a(e);function o(s,l){var u=ja(l),c=ja(s)*u,d=$a(s)*u,h=$a(l),f=h*t+c*i;return[r3(d*r-f*a,c*t-h*i),a3(f*r+d*a)]}return o.invert=function(s,l){var u=ja(l),c=ja(s)*u,d=$a(s)*u,h=$a(l),f=h*r-d*a;return[r3(d*r+h*a,c*t+f*i),a3(f*t-c*i)]},o}function hFe(n){n=Tee(n[0]*io,n[1]*io,n.length>2?n[2]*io:0);function e(t){return t=n(t[0]*io,t[1]*io),t[0]*=wl,t[1]*=wl,t}return e.invert=function(t){return t=n.invert(t[0]*io,t[1]*io),t[0]*=wl,t[1]*=wl,t},e}function fFe(n,e,t,i,r,a){if(t){var o=ja(e),s=$a(e),l=i*t;r==null?(r=e+i*E0,a=e-l/2):(r=wH(o,r),a=wH(o,a),(i>0?ra)&&(r+=i*E0));for(var u,c=r;i>0?c>a:c1&&n.push(n.pop().concat(n.shift()))},result:function(){var t=n;return n=[],e=null,t}}}function g5(n,e){return Oa(n[0]-e[0])=0;--s)r.point((d=c[s])[0],d[1]);else i(h.x,h.p.x,-1,r);h=h.p}h=h.o,c=h.z,f=!f}while(!h.v);r.lineEnd()}}}function TH(n){if(e=n.length){for(var e,t=0,i=n[0],r;++t=0?1:-1,E=D*I,P=E>Sr,F=v*C;if(l.add(r3(F*D*$a(E),g*M+F*ja(E))),o+=P?I+D*E0:I,P^p>=t^x>=t){var V=W8(Rv(f),Rv(S));rM(V);var G=W8(a,V);rM(G);var W=(P^I>=0?-1:1)*a3(G[2]);(i>W||i===W&&(V[0]||V[1]))&&(s+=P^I>=0?1:-1)}}return(o<-fa||o0){for(l||(r.polygonStart(),l=!0),r.lineStart(),C=0;C1&&x&2&&A.push(A.pop().concat(A.shift())),c.push(A.filter(vFe))}}return h}}function vFe(n){return n.length>1}function mFe(n,e){return((n=n.x)[0]<0?n[1]-Ks-fa:Ks-n[1])-((e=e.x)[0]<0?e[1]-Ks-fa:Ks-e[1])}const AH=Mee(function(){return!0},gFe,_Fe,[-Sr,-Ks]);function gFe(n){var e=NaN,t=NaN,i=NaN,r;return{lineStart:function(){n.lineStart(),r=1},point:function(a,o){var s=a>0?Sr:-Sr,l=Oa(a-e);Oa(l-Sr)0?Ks:-Ks),n.point(i,t),n.lineEnd(),n.lineStart(),n.point(s,t),n.point(a,t),r=0):i!==s&&l>=Sr&&(Oa(e-i)fa?wee(($a(e)*(a=ja(i))*$a(t)-$a(i)*(r=ja(e))*$a(n))/(r*a*o)):(e+i)/2}function _Fe(n,e,t,i){var r;if(n==null)r=t*Ks,i.point(-Sr,r),i.point(0,r),i.point(Sr,r),i.point(Sr,0),i.point(Sr,-r),i.point(0,-r),i.point(-Sr,-r),i.point(-Sr,0),i.point(-Sr,r);else if(Oa(n[0]-e[0])>fa){var a=n[0]0,r=Oa(e)>fa;function a(c,d,h,f){fFe(f,n,t,h,c,d)}function o(c,d){return ja(c)*ja(d)>e}function s(c){var d,h,f,p,m;return{lineStart:function(){p=f=!1,m=1},point:function(v,g){var _=[v,g],S,x=o(v,g),A=i?x?0:u(v,g):x?u(v+(v<0?Sr:-Sr),g):0;if(!d&&(p=f=x)&&c.lineStart(),x!==f&&(S=l(d,_),(!S||g5(d,S)||g5(_,S))&&(_[2]=1)),x!==f)m=0,x?(c.lineStart(),S=l(_,d),c.point(S[0],S[1])):(S=l(d,_),c.point(S[0],S[1],2),c.lineEnd()),d=S;else if(r&&d&&i^x){var C;!(A&h)&&(C=l(_,d,!0))&&(m=0,i?(c.lineStart(),c.point(C[0][0],C[0][1]),c.point(C[1][0],C[1][1]),c.lineEnd()):(c.point(C[1][0],C[1][1]),c.lineEnd(),c.lineStart(),c.point(C[0][0],C[0][1],3)))}x&&(!d||!g5(d,_))&&c.point(_[0],_[1]),d=_,f=x,h=A},lineEnd:function(){f&&c.lineEnd(),d=null},clean:function(){return m|(p&&f)<<1}}}function l(c,d,h){var f=Rv(c),p=Rv(d),m=[1,0,0],v=W8(f,p),g=x4(v,v),_=v[0],S=g-_*_;if(!S)return!h&&c;var x=e*g/S,A=-e*_/S,C=W8(m,v),M=w4(m,x),I=w4(v,A);fT(M,I);var D=C,E=x4(M,D),P=x4(D,D),F=E*E-P*(x4(M,M)-1);if(!(F<0)){var V=h7(F),G=w4(D,(-E-V)/P);if(fT(G,M),G=iM(G),!h)return G;var W=c[0],Y=d[0],Q=c[1],K=d[1],ae;Y0^G[1]<(Oa(G[0]-W)Sr^(W<=G[0]&&G[0]<=Y)){var He=w4(D,(-E+V)/P);return fT(He,M),[G,iM(He)]}}}function u(c,d){var h=i?n:Sr-n,f=0;return c<-h?f|=1:c>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return Mee(o,s,a,i?[0,-n]:[-Sr,n-Sr])}function bFe(n,e,t,i,r,a){var o=n[0],s=n[1],l=e[0],u=e[1],c=0,d=1,h=l-o,f=u-s,p;if(p=t-o,!(!h&&p>0)){if(p/=h,h<0){if(p0){if(p>d)return;p>c&&(c=p)}if(p=r-o,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>c&&(c=p)}else if(h>0){if(p0)){if(p/=f,f<0){if(p0){if(p>d)return;p>c&&(c=p)}if(p=a-s,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>c&&(c=p)}else if(f>0){if(p0&&(n[0]=o+c*h,n[1]=s+c*f),d<1&&(e[0]=o+d*h,e[1]=s+d*f),!0}}}}}var Lg=1e9,A4=-Lg;function xFe(n,e,t,i){function r(u,c){return n<=u&&u<=t&&e<=c&&c<=i}function a(u,c,d,h){var f=0,p=0;if(u==null||(f=o(u,d))!==(p=o(c,d))||l(u,c)<0^d>0)do h.point(f===0||f===3?n:t,f>1?i:e);while((f=(f+d+4)%4)!==p);else h.point(c[0],c[1])}function o(u,c){return Oa(u[0]-n)0?0:3:Oa(u[0]-t)0?2:1:Oa(u[1]-e)0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var d=o(u,1),h=o(c,1);return d!==h?d-h:d===0?c[1]-u[1]:d===1?u[0]-c[0]:d===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,d=Aee(),h,f,p,m,v,g,_,S,x,A,C,M={point:I,lineStart:F,lineEnd:V,polygonStart:E,polygonEnd:P};function I(W,Y){r(W,Y)&&c.point(W,Y)}function D(){for(var W=0,Y=0,Q=f.length;Yi&&(xe-Ee)*(i-He)>(Fe-He)*(n-Ee)&&++W:Fe<=i&&(xe-Ee)*(i-He)<(Fe-He)*(n-Ee)&&--W;return W}function E(){c=d,h=[],f=[],C=!0}function P(){var W=D(),Y=C&&W,Q=(h=xee(h)).length;(Y||Q)&&(u.polygonStart(),Y&&(u.lineStart(),a(null,null,1,u),u.lineEnd()),Q&&Cee(h,s,W,a,u),u.polygonEnd()),c=u,h=f=p=null}function F(){M.point=G,f&&f.push(p=[]),A=!0,x=!1,_=S=NaN}function V(){h&&(G(m,v),g&&x&&d.rejoin(),h.push(d.result())),M.point=I,x&&c.lineEnd()}function G(W,Y){var Q=r(W,Y);if(f&&p.push([W,Y]),A)m=W,v=Y,g=Q,A=!1,Q&&(c.lineStart(),c.point(W,Y));else if(Q&&x)c.point(W,Y);else{var K=[_=Math.max(A4,Math.min(Lg,_)),S=Math.max(A4,Math.min(Lg,S))],ae=[W=Math.max(A4,Math.min(Lg,W)),Y=Math.max(A4,Math.min(Lg,Y))];bFe(K,ae,n,e,t,i)?(x||(c.lineStart(),c.point(K[0],K[1])),c.point(ae[0],ae[1]),Q||c.lineEnd(),C=!1):Q&&(c.lineStart(),c.point(W,Y),C=!1)}_=W,S=Y,x=Q}return M}}const CH=n=>n;var Lv=1/0,j8=Lv,o3=-Lv,$8=o3,wFe={point:TFe,lineStart:Rg,lineEnd:Rg,polygonStart:Rg,polygonEnd:Rg,result:function(){var n=[[Lv,j8],[o3,$8]];return o3=$8=-(j8=Lv=1/0),n}};function TFe(n,e){no3&&(o3=n),e$8&&($8=e)}const MH=wFe;function LR(n){return function(e){var t=new sM;for(var i in n)t[i]=n[i];return t.stream=e,t}}function sM(){}sM.prototype={constructor:sM,point:function(n,e){this.stream.point(n,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function IR(n,e,t){var i=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),i!=null&&n.clipExtent(null),dFe(t,n.stream(MH)),e(MH.result()),i!=null&&n.clipExtent(i),n}function Eee(n,e,t){return IR(n,function(i){var r=e[1][0]-e[0][0],a=e[1][1]-e[0][1],o=Math.min(r/(i[1][0]-i[0][0]),a/(i[1][1]-i[0][1])),s=+e[0][0]+(r-o*(i[1][0]+i[0][0]))/2,l=+e[0][1]+(a-o*(i[1][1]+i[0][1]))/2;n.scale(150*o).translate([s,l])},t)}function AFe(n,e,t){return Eee(n,[[0,0],e],t)}function CFe(n,e,t){return IR(n,function(i){var r=+e,a=r/(i[1][0]-i[0][0]),o=(r-a*(i[1][0]+i[0][0]))/2,s=-a*i[0][1];n.scale(150*a).translate([o,s])},t)}function MFe(n,e,t){return IR(n,function(i){var r=+e,a=r/(i[1][1]-i[0][1]),o=-a*i[0][0],s=(r-a*(i[1][1]+i[0][1]))/2;n.scale(150*a).translate([o,s])},t)}var EH=16,EFe=ja(30*io);function PH(n,e){return+e?RFe(n,e):PFe(n)}function PFe(n){return LR({point:function(e,t){e=n(e,t),this.stream.point(e[0],e[1])}})}function RFe(n,e){function t(i,r,a,o,s,l,u,c,d,h,f,p,m,v){var g=u-i,_=c-r,S=g*g+_*_;if(S>4*e&&m--){var x=o+h,A=s+f,C=l+p,M=h7(x*x+A*A+C*C),I=a3(C/=M),D=Oa(Oa(C)-1)e||Oa((g*V+_*G)/S-.5)>.3||o*h+s*f+l*p2?W[2]%360*io:0,V()):[s*wl,l*wl,u*wl]},P.angle=function(W){return arguments.length?(d=W%360*io,V()):d*wl},P.reflectX=function(W){return arguments.length?(h=W?-1:1,V()):h<0},P.reflectY=function(W){return arguments.length?(f=W?-1:1,V()):f<0},P.precision=function(W){return arguments.length?(C=PH(M,A=W*W),G()):h7(A)},P.fitExtent=function(W,Y){return Eee(P,W,Y)},P.fitSize=function(W,Y){return AFe(P,W,Y)},P.fitWidth=function(W,Y){return CFe(P,W,Y)},P.fitHeight=function(W,Y){return MFe(P,W,Y)};function V(){var W=RH(t,0,0,h,f,d).apply(null,e(a,o)),Y=RH(t,i-W[0],r-W[1],h,f,d);return c=Tee(s,l,u),M=aM(e,Y),I=aM(c,M),C=PH(M,A),G()}function G(){return D=E=null,P}return function(){return e=n.apply(this,arguments),P.invert=e.invert&&F,V()}}function DR(n,e){return[n,sFe(uFe((Ks+e)/2))]}DR.invert=function(n,e){return[n,2*wee(oFe(e))-Ks]};function Ic(){return FFe(DR).scale(961/E0)}function FFe(n){var e=NFe(n),t=e.center,i=e.scale,r=e.translate,a=e.clipExtent,o=null,s,l,u;e.scale=function(d){return arguments.length?(i(d),c()):i()},e.translate=function(d){return arguments.length?(r(d),c()):r()},e.center=function(d){return arguments.length?(t(d),c()):t()},e.clipExtent=function(d){return arguments.length?(d==null?o=s=l=u=null:(o=+d[0][0],s=+d[0][1],l=+d[1][0],u=+d[1][1]),c()):o==null?null:[[o,s],[l,u]]};function c(){var d=Sr*i(),h=e(hFe(e.rotate()).invert([0,0]));return a(o==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:n===DR?[[Math.max(h[0]-d,o),s],[Math.min(h[0]+d,l),u]]:[[o,Math.max(h[1]-d,s)],[l,Math.min(h[1]+d,u)]])}return c()}class OFe extends d7{constructor(e,t={}){super();let i={isOrthographic:!1};this.config=Object.assign({},i,t),this.canvas=e,this.scene=new ZQ,this.sizes=new cke(this),this.time=new dke(this),this.camera=new nFe(this,{isOrthographic:this.config.isOrthographic}),this.renderer=new eFe(this),this.sizes.on("resize",()=>{this.resize()}),this.time.on("tick",r=>{this.update(r)})}setAxesHelper(e=250){if(!e)return!1;let t=new fee(e);this.scene.add(t)}resize(){this.camera.resize(),this.renderer.resize()}update(e){this.camera.update(e),this.renderer.update(e)}destroy(){var e,t;this.sizes.destroy(),this.time.destroy(),this.camera.destroy(),this.renderer.destroy(),this.scene.traverse(i=>{if(i instanceof fr){i.geometry.dispose();for(const r in i.material){const a=i.material[r];a&&typeof a.dispose=="function"&&a.dispose()}}}),(t=(e=this.canvas)==null?void 0:e.parentNode)==null||t.removeChild(this.canvas)}}class BFe{constructor({material:e,time:t,size:i,diffuseColor:r,diffuseSpeed:a,diffuseWidth:o,callback:s=()=>{}}){this.time=t,this.pointShader=null,this.callback=s;let l={size:100,diffuseSpeed:15,diffuseColor:9345950,diffuseWidth:10};this.options=Object.assign({},l,{material:e,size:i,diffuseColor:r,diffuseSpeed:a,diffuseWidth:o}),this.init()}init(){let{material:e,size:t,diffuseColor:i,diffuseSpeed:r,diffuseWidth:a}=this.options,o=t/r;e.onBeforeCompile=s=>{this.pointShader=s,this.callback(s,o),s.uniforms=tn(wt({},s.uniforms),{uTime:{value:0},uSpeed:{value:r},uWidth:{value:a},uColor:{value:new Jn(i)}}),s.vertexShader=s.vertexShader.replace("void main() {",` varying vec3 vPosition; void main(){ vPosition = position; `),s.fragmentShader=s.fragmentShader.replace("void main() {",` uniform float uTime; uniform float uSpeed; uniform float uWidth; uniform vec3 uColor; varying vec3 vPosition; void main(){ `),s.fragmentShader=s.fragmentShader.replace("#include ",` #ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif float r = uTime * uSpeed; float w = uWidth; // if(w>uWidth){ // w = uWidth; // }else{ // w = uTime * 1.5; // } vec2 center = vec2(0.0, 0.0); float rDistance = distance(vPosition.xy, center); if(rDistance > r && rDistance < r + 2.0 * w) { float per = 0.0; if(rDistance < r + w) { float p = smoothstep(0.0,1.0,(rDistance - r) / w); p*=p; outgoingLight = mix(outgoingLight, uColor, p); } else { float p = smoothstep(0.0,1.0,(rDistance - r - w) / w); outgoingLight = mix(uColor, outgoingLight, p); } gl_FragColor = vec4(outgoingLight, diffuseColor.a); } else { gl_FragColor = vec4(outgoingLight, 0.0); } `)}}}class zFe{constructor({scene:e,time:t},i){this.scene=e,this.time=t,this.instance=null;let r={position:new Le(0,0,0),gridSize:100,gridDivision:20,gridColor:2635578,shapeSize:1,shapeColor:9345950,pointSize:.2,pointColor:2635578,pointLayout:{row:200,col:200},pointBlending:Pp};this.options=Object.assign({},r,i),this.init()}init(){let e=new Nr;e.name="Grid";let t=this.createGridHelp(),i=this.createShapes(),r=this.createPoint();e.add(t,i,r),e.position.copy(this.options.position),this.instance=e,this.scene.add(e)}createShapes(){let{gridSize:e,gridDivision:t,shapeSize:i,shapeColor:r}=this.options,a=e/t,o=e/2,s=new Mr({color:r,side:aa}),l=[];for(let d=0;d{this.update()}),this.sizes.on("resize",()=>{this.resize()})}create(e="",t="",i=!1){let r=document.createElement("div");r.innerHTML=e,r.className=t,r.style.visibility="hidden",r.style.position="absolute",t||(r.style.padding="10px",r.style.color="#fff",r.style.fontSize="12px",r.style.textAlign="center",r.style.background="rgba(0,0,0,0.6)",r.style.borderRadius="4px");let a=null;return i?a=new UFe(r):a=new Pee(r),a.init=(o,s)=>{a.element.innerHTML=o,a.element.style.visibility="visible",a.position.copy(s)},a.hide=()=>{a.element.style.visibility="hidden"},a.scaleHide=()=>{a.element.classList.add("scale-hidden")},a.show=()=>{a.element.style.visibility="visible",a.element.classList.remove("scale-hidden")},a.setParent=o=>{this.parent=o,o.add(a)},a.remove=()=>{this.parent.remove(a)},a}setLabelStyle(e,t=.1,i="x",r=Math.PI/2,a="none"){e.element.style.pointerEvents=a,e.scale.set(t,t,t),e.rotation[i]=r}setRenderLevel(e){this.css3dRender.domElement.style.zIndex=e}update(){this.css3dRender.render(this.scene,this.camera.instance)}destroy(){if(this.css3dRender){let e=this.css3dRender.domElement;e.parentNode.removeChild(e)}}resize(){let{width:e,height:t}=this.sizes;this.css3dRender.setSize(e,t)}}class DH{constructor({time:e},t){this.time=e,this.options=Object.assign({},{width:10,scale:1,position:new Le(0,0,0),needRotate:!1,rotateSpeed:.001,material:new Mr({transparent:!0,opacity:1,depthTest:!0})},t);let i=new Al(this.options.width,this.options.width),r=new fr(i,this.options.material);r.position.copy(this.options.position),r.scale.set(this.options.scale,this.options.scale,this.options.scale),this.instance=r}setParent(e){e.add(this.instance),this.time.on("tick",()=>{this.update()})}update(){this.options.needRotate&&(this.instance.rotation.z+=this.options.rotateSpeed)}}class q8{constructor({time:e},t={}){this.instance=null,this.time=e,this.enable=!0,this.config=Object.assign({num:100,range:500,speed:.01,renderOrder:99,dir:"up",material:new k3({map:q8.createTexture(),size:20,color:16777215,transparent:!0,opacity:1,depthTest:!1,vertexColors:!0,blending:Mo,sizeAttenuation:!0})},t),this.create()}create(){const{range:e,speed:t,dir:i,material:r,num:a,renderOrder:o}=this.config,s=[],l=[],u=[];for(let d=0;di/2&&o===1&&(h=-i/2),h<-i/2&&o==-1&&(h=i/2),s.setX(c,d),s.setZ(c,h),l.setX(c,f),l.setY(c,p)}s.needsUpdate=!0,l.needsUpdate=!0}setParent(e){e.add(this.instance),this.time.on("tick",(t,i)=>{this.enable&&this.update(t,i)})}}class C4{constructor({},e={}){this.mapGroup=new Nr,this.coordinates=[],this.config=Object.assign({position:new Le(0,0,0),geoProjectionCenter:new on(0,0),geoProjectionScale:120,data:"",renderOrder:1,merge:!1,material:new Mr({color:1582651,transparent:!0,opacity:1})},e),this.mapGroup.position.copy(this.config.position);let t=RR(this.config.data);this.create(t)}geoProjection(e){return Ic().center(this.config.geoProjectionCenter).scale(this.config.geoProjectionScale).translate([0,0])(e)}create(e){let{merge:t}=this.config,i=[];if(e.features.forEach(r=>{const a=new la;let{name:o,center:s=[],centroid:l=[]}=r.properties;this.coordinates.push({name:o,center:s,centroid:l}),a.userData.name=o,r.geometry.coordinates.forEach(u=>{u.forEach(c=>{const d=new ju;for(let f=0;f{var u,c,d;const i=new la;let{name:r,center:a=[],centroid:o=[]}=t.properties;this.coordinates.push({name:r,center:a,centroid:o});const s={depth:this.config.depth,bevelEnabled:(u=this.config.bevelEnabled)!=null?u:!0,bevelSegments:(c=this.config.bevelSegments)!=null?c:1,bevelThickness:(d=this.config.bevelThickness)!=null?d:.1};let l=[this.config.topFaceMaterial,this.config.sideMaterial];t.geometry.coordinates.forEach(h=>{h.forEach((f,p)=>{const m=new ju;for(let _=0;_ #include #include #include #include uniform float linewidth; uniform vec2 resolution; attribute vec3 instanceStart; attribute vec3 instanceEnd; attribute vec3 instanceColorStart; attribute vec3 instanceColorEnd; #ifdef WORLD_UNITS varying vec4 worldPos; varying vec3 worldStart; varying vec3 worldEnd; #ifdef USE_DASH varying vec2 vUv; #endif #else varying vec2 vUv; #endif #ifdef USE_DASH uniform float dashScale; attribute float instanceDistanceStart; attribute float instanceDistanceEnd; varying float vLineDistance; #endif void trimSegment( const in vec4 start, inout vec4 end ) { // trim end segment so it terminates between the camera plane and the near plane // conservative estimate of the near plane float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column float nearEstimate = - 0.5 * b / a; float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); end.xyz = mix( start.xyz, end.xyz, alpha ); } void main() { #ifdef USE_COLOR vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; #endif #ifdef USE_DASH vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; vUv = uv; #endif float aspect = resolution.x / resolution.y; // camera space vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); #ifdef WORLD_UNITS worldStart = start.xyz; worldEnd = end.xyz; #else vUv = uv; #endif // special case for perspective projection, and segments that terminate either in, or behind, the camera plane // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space // but we need to perform ndc-space calculations in the shader, so we must address this issue directly // perhaps there is a more elegant solution -- WestLangley bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column if ( perspective ) { if ( start.z < 0.0 && end.z >= 0.0 ) { trimSegment( start, end ); } else if ( end.z < 0.0 && start.z >= 0.0 ) { trimSegment( end, start ); } } // clip space vec4 clipStart = projectionMatrix * start; vec4 clipEnd = projectionMatrix * end; // ndc space vec3 ndcStart = clipStart.xyz / clipStart.w; vec3 ndcEnd = clipEnd.xyz / clipEnd.w; // direction vec2 dir = ndcEnd.xy - ndcStart.xy; // account for clip-space aspect ratio dir.x *= aspect; dir = normalize( dir ); #ifdef WORLD_UNITS vec3 worldDir = normalize( end.xyz - start.xyz ); vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) ); vec3 worldUp = normalize( cross( worldDir, tmpFwd ) ); vec3 worldFwd = cross( worldDir, worldUp ); worldPos = position.y < 0.5 ? start: end; // height offset float hw = linewidth * 0.5; worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp; // don't extend the line if we're rendering dashes because we // won't be rendering the endcaps #ifndef USE_DASH // cap extension worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir; // add width to the box worldPos.xyz += worldFwd * hw; // endcaps if ( position.y > 1.0 || position.y < 0.0 ) { worldPos.xyz -= worldFwd * 2.0 * hw; } #endif // project the worldpos vec4 clip = projectionMatrix * worldPos; // shift the depth of the projected points so the line // segments overlap neatly vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; clip.z = clipPose.z * clip.w; #else vec2 offset = vec2( dir.y, - dir.x ); // undo aspect ratio adjustment dir.x /= aspect; offset.x /= aspect; // sign flip if ( position.x < 0.0 ) offset *= - 1.0; // endcaps if ( position.y < 0.0 ) { offset += - dir; } else if ( position.y > 1.0 ) { offset += dir; } // adjust for linewidth offset *= linewidth; // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... offset /= resolution.y; // select end vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; // back to clip space offset *= clip.w; clip.xy += offset; #endif gl_Position = clip; vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation #include #include #include } `,fragmentShader:` uniform vec3 diffuse; uniform float opacity; uniform float linewidth; #ifdef USE_DASH uniform float dashOffset; uniform float dashSize; uniform float gapSize; #endif varying float vLineDistance; #ifdef WORLD_UNITS varying vec4 worldPos; varying vec3 worldStart; varying vec3 worldEnd; #ifdef USE_DASH varying vec2 vUv; #endif #else varying vec2 vUv; #endif #include #include #include #include #include vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { float mua; float mub; vec3 p13 = p1 - p3; vec3 p43 = p4 - p3; vec3 p21 = p2 - p1; float d1343 = dot( p13, p43 ); float d4321 = dot( p43, p21 ); float d1321 = dot( p13, p21 ); float d4343 = dot( p43, p43 ); float d2121 = dot( p21, p21 ); float denom = d2121 * d4343 - d4321 * d4321; float numer = d1343 * d4321 - d1321 * d4343; mua = numer / denom; mua = clamp( mua, 0.0, 1.0 ); mub = ( d1343 + d4321 * ( mua ) ) / d4343; mub = clamp( mub, 0.0, 1.0 ); return vec2( mua, mub ); } void main() { #include #ifdef USE_DASH if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX #endif float alpha = opacity; #ifdef WORLD_UNITS // Find the closest points on the view ray and the line segment vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; vec3 lineDir = worldEnd - worldStart; vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); vec3 p1 = worldStart + lineDir * params.x; vec3 p2 = rayEnd * params.y; vec3 delta = p1 - p2; float len = length( delta ); float norm = len / linewidth; #ifndef USE_DASH #ifdef USE_ALPHA_TO_COVERAGE float dnorm = fwidth( norm ); alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); #else if ( norm > 0.5 ) { discard; } #endif #endif #else #ifdef USE_ALPHA_TO_COVERAGE // artifacts appear on some hardware if a derivative is taken within a conditional float a = vUv.x; float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; float len2 = a * a + b * b; float dlen = fwidth( len2 ); if ( abs( vUv.y ) > 1.0 ) { alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); } #else if ( abs( vUv.y ) > 1.0 ) { float a = vUv.x; float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; float len2 = a * a + b * b; if ( len2 > 1.0 ) discard; } #endif #endif vec4 diffuseColor = vec4( diffuse, alpha ); #include #include gl_FragColor = vec4( diffuseColor.rgb, alpha ); #include #include #include #include } `};class Lee extends Jc{constructor(e){super({type:"LineMaterial",uniforms:hR.clone(qs.line.uniforms),vertexShader:qs.line.vertexShader,fragmentShader:qs.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1))}}const FH=new Le,OH=new Le,ko=new Er,Fo=new Er,Su=new Er,vT=new Le,mT=new Bi,Bo=new ske,BH=new Le,E4=new I0,P4=new D0,bu=new Er;let Fu,Np;function zH(n,e,t){return bu.set(0,0,-e,1).applyMatrix4(n.projectionMatrix),bu.multiplyScalar(1/bu.w),bu.x=Np/t.width,bu.y=Np/t.height,bu.applyMatrix4(n.projectionMatrixInverse),bu.multiplyScalar(1/bu.w),Math.abs(Math.max(bu.x,bu.y))}function jFe(n,e){const t=n.matrixWorld,i=n.geometry,r=i.attributes.instanceStart,a=i.attributes.instanceEnd,o=Math.min(i.instanceCount,r.count);for(let s=0,l=o;sd&&Fo.z>d)continue;if(ko.z>d){const S=ko.z-Fo.z,x=(ko.z-d)/S;ko.lerp(Fo,x)}else if(Fo.z>d){const S=Fo.z-ko.z,x=(Fo.z-d)/S;Fo.lerp(ko,x)}ko.applyMatrix4(i),Fo.applyMatrix4(i),ko.multiplyScalar(1/ko.w),Fo.multiplyScalar(1/Fo.w),ko.x*=a.x/2,ko.y*=a.y/2,Fo.x*=a.x/2,Fo.y*=a.y/2,Bo.start.copy(ko),Bo.start.z=0,Bo.end.copy(Fo),Bo.end.z=0;const m=Bo.closestPointToPointParameter(vT,!0);Bo.at(m,BH);const v=cR.lerp(ko.z,Fo.z,m),g=v>=-1&&v<=1,_=vT.distanceTo(BH){const c=[];let d=null;t==="Line2"?(u[0].forEach(h=>{const[f,p]=this.geoProjection(h);c.push(f,-p,0)}),d=this.createLine2(c)):t==="Line3"?(u[0].forEach(h=>{const[f,p]=this.geoProjection(h);c.push(new Le(f,-p,0))}),d=this.createLine3(c)):u[0].forEach(h=>{const[f,p]=this.geoProjection(h);c.push(new Le(f,-p,0)),d=this.createLine(c)}),l.add(d)}),a.add(l))}return a}createLine3(e){const t=this.config.tubeRadius,i=256*10,r=4,a=!1,{material:o,renderOrder:s}=this.config,l=new TR(e),u=new u7(l,i,t,r,a),c=new fr(u,o);return c.name="mapLine3",c.renderOrder=s,c}createLine2(e){const{material:t,renderOrder:i}=this.config,r=new Iee;r.setPositions(e);let a=new XFe(r,t);return a.name="mapLine2",a.renderOrder=i,a.computeLineDistances(),a}createLine(e){const{material:t,renderOrder:i,type:r}=this.config,a=new Qr;a.setFromPoints(e);let o=new G8(a,t);return o.renderOrder=i,o.name="mapLine",o}setParent(e){e.add(this.lineGroup)}}class L4{constructor(e,t){this.shader=null,this.config=Object.assign({uColor1:2781042,uColor2:860197,size:15,dir:"x"},t),this.init(e)}init(e){let{uColor1:t,uColor2:i,dir:r,size:a}=this.config,o={x:1,y:2,z:3};e.onBeforeCompile=s=>{this.shader=s,s.uniforms=tn(wt({},s.uniforms),{uColor1:{value:new Jn(t)},uColor2:{value:new Jn(i)},uDir:{value:o[r]},uSize:{value:a}}),s.vertexShader=s.vertexShader.replace("void main() {",` attribute float alpha; varying vec3 vPosition; varying float vAlpha; void main() { vAlpha = alpha; vPosition = position; `),s.fragmentShader=s.fragmentShader.replace("void main() {",` varying vec3 vPosition; varying float vAlpha; uniform vec3 uColor1; uniform vec3 uColor2; uniform float uDir; uniform float uSize; void main() { `),s.fragmentShader=s.fragmentShader.replace("#include ",` #ifdef OPAQUE diffuseColor.a = 1.0; #endif // https://github.com/mrdoob/three.js/pull/22425 #ifdef USE_TRANSMISSION diffuseColor.a *= transmissionAlpha + 0.1; #endif // vec3 gradient = mix(uColor1, uColor2, vPosition.x / 15.0); vec3 gradient = vec3(0.0,0.0,0.0); if(uDir==1.0){ gradient = mix(uColor1, uColor2, vPosition.x/ uSize); }else if(uDir==2.0){ gradient = mix(uColor1, uColor2, vPosition.z/ uSize); }else if(uDir==3.0){ gradient = mix(uColor1, uColor2, vPosition.y/ uSize); } outgoingLight = outgoingLight * gradient; gl_FragColor = vec4( outgoingLight, diffuseColor.a ); `)}}}const YFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAK+SURBVHgB7dzNbdswGIdxSugCRtGBuklWSO17nXs/J0hHywA11AEMu3wDsLFT5WCJ5PtI/D8nQ5cA/FmxJJLqtofhHBSmPihUAoElEFgCgfVu7ODX95suqOKNXVDpDIElEFgCgSUQWAKBJRBYAoE1G2Q3DJ/j9fRjUGE7DI+f4niEGc0CMYzzKezjx7vWUQwjnMJdF8djDsq8M+QYLu/om0VJGP8OXI/LTc0C+fJhs4/fiIeLQ82hvMaI/zEevsVxCROb/RvSMkpuDCvLVVaLKCUwrGyXvS2hlMKwst6HtIBSEsPKfmO4ZpTSGFaRO/U1otTAsIo9OlkTSi0Mq+izrDWg1MSwij9cXDJKbQyrytPeJaJ4YFjVHr8vCcULw6o6H7IEFE8Mq/oEFRnFG8NymTEkohAwLLcpXBIKBcNynVMnoJAwLPdFDp4oNAwLserEA4WIYXVjK7C9Vr+fY8Gh7e8/Lhha/f5GhDMjJRBYAoElEFgCgSUQWAKBJRBYAoElEFgCgSUQWAKBJRBYAoElEFgCgSUQWAKBJRBYAoElEFgCgSUQWAKBJZDwvIIQs2kIA/K81tYvzKYhBMh/75vyCYHiDgLBSLmjuIK8xrBV6J1HoO11biCk/Rmk7XUuIMTNMhSU6iDUnUsWAaUqCBkj5Y1SDWQJGClPlCogS8JIeaEUB1kiRsoDpSjIkjFStVGKgawBI1UTpQjImjBStVCyg6wRI1UDJSvImjFSpVGygbSAkSqJkgWkJYxUKZTZIC1ipEqgzAJpGSOVG2UyiDBeyokyCWR3OOyFcd0Yyu4wfA83Ngnk2Pe/ziE82WdhvHSJYuNz7MPPcGOTQH5sNk+nPnyMf/xeGNcZSvyS3tv42DiFG0O94q+19Iq/BSQQWAKBJRBYAoElEFgCgSUQWKM3hsovnSGwBAJLILAEAusvLK6Na4P/Au0AAAAASUVORK5CYII=",KFe=[{name:"邛溪镇",center:[102.63374746802602,32.82576351047847],centroid:[102.63374746802602,32.82576351047847]},{name:"刷经寺镇",center:[102.61668800740293,31.972581499870266],centroid:[102.61668800740293,31.972581499870266]},{name:"安曲镇",center:[102.33517275101616,32.71285091143605],centroid:[102.33517275101616,32.71285091143605]},{name:"龙日镇",center:[102.40041964577492,32.42345274031332],centroid:[102.40041964577492,32.42345274031332]},{name:"江茸乡",center:[102.26876480621743,32.352965999818025],centroid:[102.26876480621743,32.352965999818025]},{name:"查尔玛乡",center:[102.05164640151992,32.45423049990481],centroid:[102.05164640151992,32.45423049990481]},{name:"瓦切镇",center:[102.68497870490992,33.13952250013054],centroid:[102.68497870490992,33.13952250013054]},{name:"阿木乡",center:[102.83552513473182,32.7263610000727],centroid:[102.83552513473182,32.7263610000727]},{name:"麦洼乡",center:[102.940261,33.118079],centroid:[102.940261,33.118079]},{name:"色地镇",center:[103.14352108676084,33.04086199974242],centroid:[103.14352108676084,33.04086199974242]},{name:"壤口乡",center:[102.51205063384711,32.23458652276696],centroid:[102.51205063384711,32.23458652276696]}],GH=[{name:"色地镇",enName:"sedi",center:[103.14352108676084,33.04086199974242],centroid:[103.14352108676084,33.04086199974242],value:1199},{name:"瓦切镇",enName:"waqie",center:[102.68497870490992,33.13952250013054],centroid:[102.68497870490992,33.13952250013054],value:991},{name:"刷经寺镇",enName:"shuajingsi",center:[102.61668800740293,31.972581499870266],centroid:[102.61668800740293,31.972581499870266],value:986},{name:"邛溪镇",enName:"qiongxi",center:[102.63374746802602,32.82576351047847],centroid:[102.63374746802602,32.82576351047847],value:896},{name:"阿木乡",enName:"amu",center:[102.83552513473182,32.7263610000727],centroid:[102.83552513473182,32.7263610000727],value:892},{name:"安曲镇",enName:"anqu",center:[102.33517275101616,32.71285091143605],centroid:[102.33517275101616,32.71285091143605],value:885},{name:"查尔玛乡",enName:"chaerma",center:[102.05164640151992,32.45423049990481],centroid:[102.05164640151992,32.45423049990481],value:729},{name:"龙日镇",enName:"longri",center:[102.40041964577492,32.42345274031332],centroid:[102.40041964577492,32.42345274031332],value:645},{name:"麦洼乡",enName:"maiwa",center:[102.940261,33.118079],centroid:[102.940261,33.118079],value:559},{name:"江茸乡",enName:"jiangrong",center:[102.26876480621743,32.352965999818025],centroid:[102.26876480621743,32.352965999818025],value:514},{name:"壤口乡",enName:"rangkou",center:[102.51205063384711,32.23458652276696],centroid:[102.51205063384711,32.23458652276696],value:0}],ZFe=[{value:180,lng:102.60242339873115,lat:32.83022561372293},{value:160,lng:102.55651980382184,lat:32.204097908180216},{value:150,lng:102.38447320923945,lat:32.696113484169786},{value:177,lng:102.48704663740175,lat:32.471364980560764},{value:130,lng:102.29046083534963,lat:32.355689518554044},{value:165,lng:102.03268479676977,lat:32.440590072394265},{value:165,lng:102.71535664604494,lat:33.12869670968013},{value:132,lng:102.77925597565002,lat:32.73632379185147},{value:158,lng:102.95718106156616,lat:33.15445682575394},{value:187,lng:103.12540730227074,lat:33.010462261362875}],JFe=[{name:"邛溪镇",level:"县城驻地",value:895.94,lng:102.60242339873115,lat:32.83022561372293},{name:"瓦切镇",level:"北部牧区",value:991,lng:102.71535664604494,lat:33.12869670968013},{name:"刷经寺镇",level:"南部通道",value:986.44,lng:102.55651980382184,lat:32.204097908180216},{name:"色地镇",level:"东部片区",value:1199.06,lng:103.12540730227074,lat:33.010462261362875}];var UH=class{constructor(e,t){Ni(this,"target");Ni(this,"name");Ni(this,"intersected");Ni(this,"wasIntersected",!1);Ni(this,"wasIntersectedOnMouseDown",!1);Ni(this,"distance");this.target=e,this.name=t,this.intersected=!1,this.distance=0}},Gs=class{constructor(n,e=null){Ni(this,"type");Ni(this,"cancelBubble");Ni(this,"originalEvent");Ni(this,"coords",new on(0,0));Ni(this,"distance",0);Ni(this,"intersected",!1);Ni(this,"wasIntersected",!1);Ni(this,"wasIntersectedOnMouseDown",!1);this.cancelBubble=!1,this.type=n,this.originalEvent=e}stopPropagation(){this.cancelBubble=!0}},QFe=class{constructor(n,e,t,i){Ni(this,"renderer");Ni(this,"camera");Ni(this,"domElement");Ni(this,"bindEventsOnBodyElement");Ni(this,"autoAdd");Ni(this,"scene");Ni(this,"mouse");Ni(this,"supportsPointerEvents");Ni(this,"interactiveObjects");Ni(this,"closestObject");Ni(this,"raycaster");Ni(this,"treatTouchEventsAsMouseEvents");Ni(this,"dispose",()=>{this.domElement.removeEventListener("click",this.onMouseClick),this.supportsPointerEvents&&(this.bindEventsOnBodyElement?this.domElement.ownerDocument.removeEventListener("pointermove",this.onDocumentPointerMove):this.domElement.removeEventListener("pointermove",this.onDocumentPointerMove),this.domElement.removeEventListener("pointerdown",this.onPointerDown),this.domElement.removeEventListener("pointerup",this.onPointerUp)),this.bindEventsOnBodyElement?this.domElement.ownerDocument.removeEventListener("mousemove",this.onDocumentMouseMove):this.domElement.removeEventListener("mousemove",this.onDocumentMouseMove),this.domElement.removeEventListener("mousedown",this.onMouseDown),this.domElement.removeEventListener("mouseup",this.onMouseUp),this.domElement.removeEventListener("touchstart",this.onTouchStart),this.domElement.removeEventListener("touchmove",this.onTouchMove),this.domElement.removeEventListener("touchend",this.onTouchEnd)});Ni(this,"add",(n,e=[])=>{if(n&&!this.interactiveObjects.find(t=>t.target===n))if(e.length>0)e.forEach(t=>{let i=n.getObjectByName(t);if(i){let r=new UH(i,t);this.interactiveObjects.push(r)}});else{let t=new UH(n,n.name);this.interactiveObjects.push(t)}});Ni(this,"remove",(n,e=[])=>{!n||(e.length>0?e.forEach(t=>{let i=n.getObjectByName(t);i&&(this.interactiveObjects=this.interactiveObjects.filter(r=>r.target!==i))}):this.interactiveObjects=this.interactiveObjects.filter(t=>t.target!==n))});Ni(this,"update",()=>{var i;this.raycaster.setFromCamera(this.mouse,this.camera),this.interactiveObjects.forEach(r=>{r.target&&this.checkIntersection(r)}),this.interactiveObjects.sort(function(r,a){return r.distance-a.distance});let n=(i=this.interactiveObjects.find(r=>r.intersected))!=null?i:null;if(n!=this.closestObject){if(this.closestObject){let r=new Gs("mouseout");this.dispatch(this.closestObject,r)}if(n){let r=new Gs("mouseover");this.dispatch(n,r)}this.closestObject=n}let e;this.interactiveObjects.forEach(r=>{!r.intersected&&r.wasIntersected&&(e||(e=new Gs("mouseleave")),this.dispatch(r,e))});let t;this.interactiveObjects.forEach(r=>{r.intersected&&!r.wasIntersected&&(t||(t=new Gs("mouseenter")),this.dispatch(r,t))})});Ni(this,"checkIntersection",n=>{let e=this.raycaster.intersectObjects([n.target],!0);if(n.wasIntersected=n.intersected,e.length>0){let t=e[0].distance;e.forEach(i=>{i.distance{this.mapPositionToPoint(this.mouse,n.clientX,n.clientY);let e=new Gs("mousemove",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onDocumentPointerMove",n=>{this.mapPositionToPoint(this.mouse,n.clientX,n.clientY);let e=new Gs("pointermove",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onTouchMove",n=>{n.touches.length>0&&this.mapPositionToPoint(this.mouse,n.touches[0].clientX,n.touches[0].clientY);let e=new Gs(this.treatTouchEventsAsMouseEvents?"mousemove":"touchmove",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onMouseClick",n=>{this.update();let e=new Gs("click",n);this.interactiveObjects.forEach(t=>{t.intersected&&this.dispatch(t,e)})});Ni(this,"onMouseDown",n=>{this.mapPositionToPoint(this.mouse,n.clientX,n.clientY),this.update();let e=new Gs("mousedown",n);this.interactiveObjects.forEach(t=>{t.intersected?(t.wasIntersectedOnMouseDown=!0,this.dispatch(t,e)):t.wasIntersectedOnMouseDown=!1})});Ni(this,"onPointerDown",n=>{this.mapPositionToPoint(this.mouse,n.clientX,n.clientY),this.update();let e=new Gs("pointerdown",n);this.interactiveObjects.forEach(t=>{t.intersected&&this.dispatch(t,e)})});Ni(this,"onTouchStart",n=>{n.touches.length>0&&this.mapPositionToPoint(this.mouse,n.touches[0].clientX,n.touches[0].clientY),this.update();let e=new Gs(this.treatTouchEventsAsMouseEvents?"mousedown":"touchstart",n);this.interactiveObjects.forEach(t=>{t.intersected&&this.dispatch(t,e)})});Ni(this,"onMouseUp",n=>{let e=new Gs("mouseup",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onPointerUp",n=>{let e=new Gs("pointerup",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"onTouchEnd",n=>{n.touches.length>0&&this.mapPositionToPoint(this.mouse,n.touches[0].clientX,n.touches[0].clientY),this.update();let e=new Gs(this.treatTouchEventsAsMouseEvents?"mouseup":"touchend",n);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});Ni(this,"dispatch",(n,e)=>{n.target&&!e.cancelBubble&&(e.coords=this.mouse,e.distance=n.distance,e.intersected=n.intersected,e.wasIntersected=n.wasIntersected,e.wasIntersectedOnMouseDown=n.wasIntersectedOnMouseDown,n.target.dispatchEvent(e))});Ni(this,"mapPositionToPoint",(n,e,t)=>{let i=this.renderer.domElement.getBoundingClientRect();n.x=(e-i.left)/i.width*2-1,n.y=-((t-i.top)/i.height)*2+1});this.renderer=n,this.camera=e,this.domElement=t,this.bindEventsOnBodyElement=i&&typeof i.bindEventsOnBodyElement<"u"?i.bindEventsOnBodyElement:!0,this.scene=i&&typeof i.scene<"u"?i.scene:null,this.scene&&(this.scene.onBeforeRender=()=>{this.autoAdd&&this.scene!==null&&this.scene.traverse(r=>{this.add(r),r.addEventListener("removed",a=>{this.remove(a.target)})}),this.update()}),this.autoAdd=i&&typeof i.autoAdd<"u"?i.autoAdd:!1,this.autoAdd&&this.scene===null&&console.error("Attention: Options.scene needs to be set when using options.autoAdd"),this.mouse=new on(-1,1),this.supportsPointerEvents=!!window.PointerEvent,this.interactiveObjects=[],this.closestObject=null,this.raycaster=new oke,t.addEventListener("click",this.onMouseClick),this.supportsPointerEvents&&(this.bindEventsOnBodyElement?t.ownerDocument.addEventListener("pointermove",this.onDocumentPointerMove):t.addEventListener("pointermove",this.onDocumentPointerMove),t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointerup",this.onPointerUp)),this.bindEventsOnBodyElement?t.ownerDocument.addEventListener("mousemove",this.onDocumentMouseMove):t.addEventListener("mousemove",this.onDocumentMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("touchstart",this.onTouchStart,{passive:!0}),t.addEventListener("touchmove",this.onTouchMove,{passive:!0}),t.addEventListener("touchend",this.onTouchEnd,{passive:!0}),this.treatTouchEventsAsMouseEvents=!0}};const O2=256,eOe="https://map.shuxitech.com/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}",Ig={west:101.852492,south:31.851389,east:103.347518,north:33.319796};function VH(n,e,t){const i=xd(2,t),r=Math.sin(e*Math.PI/180);return{x:(n+180)/360*i,y:(.5-Math.log((1+r)/(1-r))/(4*Math.PI))*i}}function HH(n,e,t){const i=xd(2,t),r=n/i*360-180,a=Math.PI-2*Math.PI*e/i,o=180/Math.PI*Math.atan(.5*(Math.exp(a)-Math.exp(-a)));return[r,o]}function tOe(n,e){const t=VH(n.west,n.north,e),i=VH(n.east,n.south,e),r=Math.floor(t.x),a=Math.floor(i.x),o=Math.floor(t.y),s=Math.floor(i.y);return{zoom:e,minX:r,maxX:a,minY:o,maxY:s,cols:a-r+1,rows:s-o+1}}function nOe(n,e){const[t,i]=HH(n.minX,n.minY,n.zoom),[r,a]=HH(n.maxX+1,n.maxY+1,n.zoom),[o]=e([t,Ig.south]),[s]=e([r,Ig.south]),[,l]=e([Ig.west,i]),[,u]=e([Ig.west,a]);return{left:o,right:s,bottom:-u,top:-l}}function iOe(n,e){const{width:t,height:i}=e;n.save(),n.globalCompositeOperation="multiply",n.fillStyle="rgba(5, 24, 34, 0.22)",n.fillRect(0,0,t,i),n.globalCompositeOperation="screen";const r=n.createRadialGradient(t*.5,i*.48,t*.1,t*.5,i*.5,t*.72);r.addColorStop(0,"rgba(80, 230, 255, 0.16)"),r.addColorStop(1,"rgba(0, 18, 36, 0.03)"),n.fillStyle=r,n.fillRect(0,0,t,i),n.restore()}function rOe(n,e){const t=n.createLinearGradient(0,0,e.width,e.height);t.addColorStop(0,"#061927"),t.addColorStop(.5,"#0b2c3c"),t.addColorStop(1,"#07131f"),n.fillStyle=t,n.fillRect(0,0,e.width,e.height)}function aOe(n){return new Promise(e=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>e(t),t.onerror=()=>e(null),t.src=n})}function oOe(n,e,t){return eOe.replace("{x}",n).replace("{y}",e).replace("{z}",t)}function sOe(n,e,t,i){return rn(this,null,function*(){const r=[];n.save(),n.filter="brightness(0.92) contrast(1.22) saturate(1.06)";for(let a=i.minX;a<=i.maxX;a+=1)for(let o=i.minY;o<=i.maxY;o+=1)r.push(aOe(oOe(a,o,i.zoom)).then(s=>{s&&(n.drawImage(s,(a-i.minX)*O2,(o-i.minY)*O2,O2,O2),t.needsUpdate=!0)}));yield Promise.allSettled(r),n.restore(),iOe(n,e),t.needsUpdate=!0})}function lOe({geoProjectionCenter:n,geoProjectionScale:e,zoom:t=11}={}){const i=tOe(Ig,t),r=document.createElement("canvas");r.width=i.cols*O2,r.height=i.rows*O2;const a=r.getContext("2d");rOe(a,r);const o=new bR(r);o.colorSpace=$r,o.wrapS=us,o.wrapT=us,o.minFilter=ao,o.magFilter=ao,o.needsUpdate=!0;const s=Ic().center(n).scale(e).translate([0,0]),l=nOe(i,s);return sOe(a,r,o,i).catch(u=>{console.warn("load satellite tiles failed:",u)}),{texture:o,uvBounds:l}}function WH(n,e){const t=e.right-e.left,i=e.top-e.bottom;n.mapGroup.traverse(r=>{var s,l;const a=(l=(s=r.geometry)==null?void 0:s.attributes)==null?void 0:l.position;if(!r.isMesh||!a)return;const o=new Float32Array(a.count*2);for(let u=0;utn(wt({},n),{key:`grassland-type-${e+1}`,cqlFilter:As("grass_min_type",n.name),rankingPropertyName:["area_code","acreage"],rankingTownCodeKeys:["area_code"],rankingAreaKeys:["acreage"]})),$H=[{name:">4000(kg/hm2)",fillColor:"#39A700",strokeColor:"#39A700"},{name:"3000-4000(kg/hm2)",fillColor:"#8CCF00",strokeColor:"#8CCF00"},{name:"2000-3000(kg/hm2)",fillColor:"#FEFE02",strokeColor:"#FEFE02"},{name:"1500-2000(kg/hm2)",fillColor:"#FE7E01",strokeColor:"#FE7E01"},{name:"<1500(kg/hm2)",fillColor:"#FB0100",strokeColor:"#FB0100"}].map(n=>tn(wt({},n),{selectable:!1})),o9={1:"一级",2:"二级",3:"三级",4:"四级",5:"五级",6:"六级",7:"七级",8:"八级"},Dee=[{level:"1",name:"1级草原",fillColor:"#81D10B",strokeColor:"#81D10B"},{level:"2",name:"2级草原",fillColor:"#8AE611",strokeColor:"#8AE611"},{level:"3",name:"3级草原",fillColor:"#79C801",strokeColor:"#79C801"},{level:"4",name:"4级草原",fillColor:"#D0EC03",strokeColor:"#D0EC03"},{level:"5",name:"5级草原",fillColor:"#FFCC00",strokeColor:"#FFCC00"},{level:"6",name:"6级草原",fillColor:"#FF6501",strokeColor:"#FF6501"},{level:"7",name:"7级草原",fillColor:"#FB0002",strokeColor:"#FB0002"},{level:"8",name:"8级草原",fillColor:"#D71345",strokeColor:"#D71345"}].map(n=>tn(wt({},n),{key:`grassland-level-${n.level}`,cqlFilter:`grassland_level IN ('${n.level}','${n.name}','${o9[n.level]}草原','${o9[n.level]}草地')`,rankingPropertyName:["area_code","acreage"],rankingTownCodeKeys:["area_code"],rankingAreaKeys:["acreage"],level:void 0})),dOe=Dee.map(n=>{const e=n.key.replace("grassland-level-",""),t=n.name.replace("草原","湿地");return tn(wt({},n),{key:`wetland-level-${e}`,name:t,cqlFilter:`grassland_level IN ('${e}','${t}','${n.name}','${o9[e]}湿地','${o9[e]}草原','${o9[e]}草地')`})}),hOe=[{key:"basic-grassland-basic",name:"基本草原",fillColor:"#2EEA78",strokeColor:"#18F8FF",cqlFilter:"(grassland_category_code = 'BASIC' OR grassland_category_name = '基本草原')",rankingValueKey:"basicAreaWanMu"},{key:"basic-grassland-general",name:"一般草原",fillColor:"#FFD15A",strokeColor:"#18F8FF",cqlFilter:"(grassland_category_code = 'GENERAL' OR grassland_category_name = '一般草原')",rankingValueKey:"generalAreaWanMu"}],Iv=[{key:"grassland",name:"草地资源",color:"#8AE611",defaultLayerKey:"grassland-distribution",coreGroups:["grassLand","grassland"]},{key:"wetland",name:"湿地资源",color:"#33A3DC",defaultLayerKey:"wetland-distribution",coreGroups:["wetland"]},{key:"woodland",name:"林地资源",color:"#2BD17E",defaultLayerKey:"woodland-distribution",coreGroups:["woodland"]}],y5=[{key:"national-park",name:"若尔盖国家公园",color:"#8AE611",defaultLayerKey:"national-park-zoning"},{key:"restoration",name:"生态修复工程",color:"#33A3DC",defaultLayerKey:"restoration-projects"},{key:"engineering-analysis",name:"工程分析",color:"#24F6C4",defaultLayerKey:"engineering-analysis-projects"}],Nee=[{key:"yak-industry-chain",name:"牦牛产业链",color:"#24F6C4",defaultLayerKey:"yak-industry-points"}],_5={woodland:[{key:"woodland-distribution",name:"林地范围",layerName:"ne:t_woodland_2023",styles:"woodland_distribution",opacity:.82,legends:[{key:"woodland-distribution-all",name:"林地范围",fillColor:"#2BD17E",strokeColor:"#2BD17E",selectable:!1}]},{key:"woodland-protection",name:"公益林",layerName:"ne:t_woodland_2023",styles:"woodland_protection",opacity:.86,legends:[{key:"woodland-protection-level-1",name:"国家一级公益林",fillColor:"#08C4C5",strokeColor:"#08C4C5",cqlFilter:As("gjgyl_bhdj","1")},{key:"woodland-protection-level-2",name:"国家二级公益林",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:As("gjgyl_bhdj","2")},{key:"woodland-protection-unset",name:"未划定",fillColor:"#6B8191",strokeColor:"#6B8191",cqlFilter:"(gjgyl_bhdj IS NULL OR gjgyl_bhdj = '' OR gjgyl_bhdj NOT IN ('1','2'))"}]},{key:"woodland-type",name:"林地类型",layerName:"ne:t_woodland_2023",styles:"woodland_type",opacity:.84,legends:[{key:"woodland-type-shrub",name:"灌木林地",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:As("dlmc","灌木林地")},{key:"woodland-type-arbor",name:"乔木林地",fillColor:"#0DA368",strokeColor:"#0DA368",cqlFilter:As("dlmc","乔木林地")},{key:"woodland-type-swamp",name:"灌丛沼泽",fillColor:"#23C7B7",strokeColor:"#23C7B7",cqlFilter:As("dlmc","灌丛沼泽")},{key:"woodland-type-other",name:"其他林地",fillColor:"#B7D96B",strokeColor:"#B7D96B",cqlFilter:"(dlmc IS NULL OR dlmc = '' OR dlmc NOT IN ('灌木林地','乔木林地','灌丛沼泽'))"}]},{key:"woodland-quality",name:"林地质量",layerName:"ne:t_woodland_2023",styles:"woodland_quality",opacity:.84,legends:[{key:"woodland-quality-2",name:"二级质量",fillColor:"#08C4C5",strokeColor:"#08C4C5",cqlFilter:As("zl_dj","2")},{key:"woodland-quality-3",name:"三级质量",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:As("zl_dj","3")},{key:"woodland-quality-4",name:"四级质量",fillColor:"#23C7B7",strokeColor:"#23C7B7",cqlFilter:As("zl_dj","4")},{key:"woodland-quality-5",name:"五级质量",fillColor:"#B7D96B",strokeColor:"#B7D96B",cqlFilter:As("zl_dj","5")},{key:"woodland-quality-unset",name:"未划分",fillColor:"#6B8191",strokeColor:"#6B8191",cqlFilter:"(zl_dj IS NULL OR zl_dj = '' OR zl_dj NOT IN ('2','3','4','5'))"}]},{key:"woodland-ownership",name:"林地权属",layerName:"ne:t_woodland_2023",styles:"woodland_ownership",opacity:.84,legends:[{key:"woodland-ownership-collective",name:"集体林地",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:As("ld_qs","10")},{key:"woodland-ownership-other",name:"国有或其他",fillColor:"#08C4C5",strokeColor:"#08C4C5",cqlFilter:"(ld_qs IS NULL OR ld_qs = '' OR ld_qs <> '10')"}]}],grassland:[{key:"grassland-distribution",name:"草地分布",layerName:"ne:t_grassland_result_caodi",opacity:.82,legends:[{name:"草地",fillColor:"#1D953F",strokeColor:"#1D953F"}]},{key:"basic-grassland",name:"基本/一般草原",layerName:"ne:t_basic_grassland_2023",styles:"basic_grassland_type",opacity:.84,legends:hOe},{key:"grassland-level",name:"草原级",layerName:"ne:t_grassland_result_level_caodi",opacity:.82,legends:Dee},{key:"grassland-type",name:"草原类型",layerName:"ne:t_grassland_result_grass_min_type_caodi",opacity:.82,legends:jH},{key:"grassland-yield",name:"草地产草量/生产力",layerName:"ne:t_grassland_result_yield_caodi",opacity:.82,legends:$H},{key:"grassland-health",name:"草地健康/退化",layerName:"ne:2023_08_ndvi",opacity:.72,legends:[{name:"非常差",fillColor:"#FF000533",strokeColor:"#FF0005",selectable:!1},{name:"差",fillColor:"#D8EE8C33",strokeColor:"#D8EE8C",selectable:!1},{name:"正常",fillColor:"#78C96233",strokeColor:"#78C962",selectable:!1},{name:"较好",fillColor:"#25814933",strokeColor:"#258149",selectable:!1}]}],wetland:[{key:"wetland-distribution",name:"湿地分布",layerName:"ne:t_grassland_result_shidi",opacity:.84,legends:[{name:"湿地",fillColor:"#33A3DC",strokeColor:"#33A3DC"}]},{key:"wetland-level",name:"湿地级",layerName:"ne:t_grassland_result_level_shidi",opacity:.82,legends:dOe},{key:"wetland-type",name:"湿地类型",layerName:"ne:t_grassland_result_grass_min_type_shidi",opacity:.82,legends:jH},{key:"wetland-yield",name:"湿地产草量/生产力",layerName:"ne:t_grassland_result_yield_shidi",opacity:.82,legends:$H}]},kee={"national-park":[{key:"national-park-zoning",name:"国家公园分区",sourceType:"wkt-api",apiUrl:"/openApi/gjgy/gjgy_area",fallbackPath:"datas/ecological-protection/national_park_wkt.json",opacity:.9,clipBounds:{west:101.852492,south:32.757724488,east:103.227028864,north:33.319796},mapView:{targetLngLat:[102.74,33.12],distanceScale:.68,targetLocalZ:.78,duration:.95},legends:[{key:"national-park-core",name:"核心保护区",fillColor:"#2EEA78",strokeColor:"#18F8FF",match:{field:"type",value:"核心保护区"},selectable:!1},{key:"national-park-general",name:"一般控制区",fillColor:"#FFD15A",strokeColor:"#FFF2A0",match:{field:"type",value:"一般控制区"},selectable:!1}]}],restoration:[{key:"restoration-projects",name:"生态修复工程",sourceType:"geojson",dataPath:"datas/ecological-protection/ecological_restoration_projects.geojson",opacity:.9,legends:[{key:"restoration-grassland",name:"草地修复",fillColor:"#70D44B",strokeColor:"#B7FF6D",cqlFilter:As("project_category","草地修复"),match:{field:"project_category",value:"草地修复"}},{key:"restoration-wetland",name:"湿地修复",fillColor:"#42C6DF",strokeColor:"#9CF7FF",cqlFilter:As("project_category","湿地修复"),match:{field:"project_category",value:"湿地修复"}},{key:"restoration-woodland",name:"林地修复",fillColor:"#1FB579",strokeColor:"#57F2A6",cqlFilter:As("project_category","林地修复"),match:{field:"project_category",value:"林地修复"}},{key:"restoration-linear",name:"线性设施",fillColor:"#F5C84B",strokeColor:"#FFE289",cqlFilter:As("feature_role","线性设施"),match:{field:"feature_role",value:"线性设施"}}]}],"engineering-analysis":[{key:"engineering-analysis-projects",name:"工程分析项目库",sourceType:"geojson",dataPath:"datas/ecological-protection/ecological_restoration_projects.geojson",opacity:.82,mapView:{targetLngLat:[102.58,32.72],distanceScale:.78,targetLocalZ:.72,duration:.85},legends:[{key:"analysis-project-grassland",name:"草地修复",fillColor:"#70D44B",strokeColor:"#B7FF6D",match:{field:"project_category",value:"草地修复"},selectable:!1},{key:"analysis-project-wetland",name:"湿地修复",fillColor:"#42C6DF",strokeColor:"#9CF7FF",match:{field:"project_category",value:"湿地修复"},selectable:!1},{key:"analysis-project-woodland",name:"林地修复",fillColor:"#1FB579",strokeColor:"#57F2A6",match:{field:"project_category",value:"林地修复"},selectable:!1},{key:"analysis-project-linear",name:"线性设施",fillColor:"#F5C84B",strokeColor:"#FFE289",match:{field:"feature_role",value:"线性设施"},selectable:!1}]}]},Fee={色地乡:[103.14352108676084,33.04086199974242],色地镇:[103.14352108676084,33.04086199974242],瓦切乡:[102.68497870490992,33.13952250013054],瓦切镇:[102.68497870490992,33.13952250013054],刷经寺镇:[102.61668800740293,31.972581499870266],邛溪镇:[102.63374746802602,32.82576351047847],阿木乡:[102.83552513473182,32.7263610000727],安曲乡:[102.33517275101616,32.71285091143605],安曲镇:[102.33517275101616,32.71285091143605],查尔玛乡:[102.05164640151992,32.45423049990481],龙日乡:[102.40041964577492,32.42345274031332],龙日镇:[102.40041964577492,32.42345274031332],麦洼乡:[102.940261,33.118079],江茸乡:[102.26876480621743,32.352965999818025],壤口乡:[102.51205063384711,32.23458652276696]},fOe=[{name:"色地乡",count:11704},{name:"麦洼乡",count:5283},{name:"壤口乡",count:6109},{name:"阿木乡",count:8928},{name:"瓦切镇",count:8892},{name:"查尔玛乡",count:6868},{name:"江茸乡",count:5158},{name:"龙日镇",count:6994},{name:"安曲镇",count:9325},{name:"刷经寺镇",count:500},{name:"邛溪镇",count:9334}],pOe=[{name:"色地乡",count:131983,devices:25},{name:"瓦切乡",count:126611,devices:24},{name:"安曲乡",count:99331,devices:20},{name:"邛溪镇",count:81727,devices:18},{name:"麦洼乡",count:78489,devices:16},{name:"龙日乡",count:66846,devices:15},{name:"阿木乡",count:64176,devices:14},{name:"查尔玛乡",count:47958,devices:11},{name:"江茸乡",count:34576,devices:9},{name:"刷经寺镇",count:30407,devices:8},{name:"壤口乡",count:19744,devices:6}];function vOe(n,e,t,i){const r=Fee[n.name];return{type:"Feature",properties:{id:`${t}-${e+1}`,name:n.name,town:n.name,count:n.count,value:n.count,devices:n.devices,metricLabel:i},geometry:{type:"Point",coordinates:r}}}function qH(n,e,t){return{type:"FeatureCollection",features:n.filter(i=>Fee[i.name]).map((i,r)=>vOe(i,r,e,t))}}const mOe={"yak-industry-chain":[{key:"yak-distribution-layer",name:"牦牛分布",sourceType:"geojson",geojsonData:qH(fOe,"yak-distribution-layer","牦牛数量"),opacity:.94,mapView:{targetLngLat:[102.58,32.72],distanceScale:.82,targetLocalZ:.76,duration:.85},legends:[{key:"yak-distribution-all",name:"牦牛分布",fillColor:"#24F6C4",strokeColor:"#B7FFF2",selectable:!1}]},{key:"yak-recognition-layer",name:"识别数据",sourceType:"geojson",geojsonData:qH(pOe,"yak-recognition-layer","识别数量"),opacity:.94,mapView:{targetLngLat:[102.58,32.72],distanceScale:.82,targetLocalZ:.76,duration:.85},legends:[{key:"yak-recognition-all",name:"识别数据",fillColor:"#32DCFF",strokeColor:"#B8F7FF",selectable:!1}]},{key:"yak-industry-points",name:"牦牛产业点位",sourceType:"geojson",dataPath:"datas/yak-industry-chain/yak_industry_points.geojson",opacity:.96,mapView:{targetLngLat:[102.48,32.69],distanceScale:.82,targetLocalZ:.76,duration:.85},legends:[{key:"yak-industry-family-pasture",name:"家庭生态牧场",fillColor:"#24F6C4",strokeColor:"#B7FFF2",match:{field:"stageKey",value:"family-pasture"}},{key:"yak-industry-artificial-grassland",name:"人工草地",fillColor:"#7EE269",strokeColor:"#D6FF8D",match:{field:"stageKey",value:"artificial-grassland"}},{key:"yak-industry-scale-breeding",name:"规模化养殖基地",fillColor:"#32DCFF",strokeColor:"#B8F7FF",match:{field:"stageKey",value:"scale-breeding"}},{key:"yak-industry-forage-storage",name:"防灾减灾",fillColor:"#FFE06B",strokeColor:"#FFF2A0",match:{field:"stageKey",value:"forage-storage"}},{key:"yak-industry-slaughter-processing",name:"屠宰与加工",fillColor:"#FF9A62",strokeColor:"#FFD0A8",match:{field:"stageKey",value:"slaughter-processing"}},{key:"yak-industry-social-service",name:"社会化服务",fillColor:"#9EA7FF",strokeColor:"#DFE3FF",match:{field:"stageKey",value:"social-service"}}]}]},gOe=wt(wt(wt({},_5),kee),mOe),yOe=[...Iv,...y5,...Nee];function XH(n){return yOe.find(e=>e.key===n)||Iv[0]}function f7(n){return gOe[n]||[]}function B3(n,e){const t=f7(n);return t.find(i=>i.key===e)||t[0]}const _Oe=12e3;function SOe(n,e={}){const t=new URLSearchParams;Object.entries(e).forEach(([r,a])=>{a!=null&&a!==""&&t.append(r,a)});const i=t.toString();return i?`${n}${n.includes("?")?"&":"?"}${i}`:n}function su(t){return rn(this,arguments,function*(n,e={}){const u=e,{params:i,timeout:r=_Oe}=u,a=AD(u,["params","timeout"]),o=new AbortController;let s=!1;const l=window.setTimeout(()=>{s=!0,o.abort()},r);try{const c=yield fetch(SOe(n,i),tn(wt({credentials:"include"},a),{signal:o.signal,headers:wt({Accept:"application/json"},a.headers||{})}));if(!c.ok){const h=new Error(c.status===401?"用户未登录或授权已过期。":`HTTP ${c.status}`);throw h.code=`HTTP_${c.status}`,h.status=c.status,c.status===401&&RD(),h}const d=yield c.json();if((d==null?void 0:d.code)===401||(d==null?void 0:d.code)==="401"){const h=new Error((d==null?void 0:d.msg)||"用户未登录或授权已过期。");throw h.code="HTTP_401",h.status=401,RD(),h}return d}catch(c){if(o.signal.aborted||(c==null?void 0:c.name)==="AbortError"||/aborted/i.test((c==null?void 0:c.message)||"")){const h=new Error(s?"服务响应超时,请稍后再试。":"请求已取消,请重新发送。");throw h.code=s?"REQUEST_TIMEOUT":"REQUEST_ABORTED",h}throw c}finally{window.clearTimeout(l)}})}function ki(n){return(n==null?void 0:n.data)!==void 0?n.data:(n==null?void 0:n.result)!==void 0?n.result:n}const NR="/geoserver/ne/wms",bOe={}.VITE_GEOSERVER_WFS_URL||NR.replace(/\/wms$/i,"/wfs");function kR(n,e){const t=new URLSearchParams;return Object.entries(e).forEach(([i,r])=>{r!=null&&r!==""&&t.append(i,r)}),`${n}${n.includes("?")?"&":"?"}${t.toString()}`}function YH(n,e={}){const t=e.bounds||lr,i=e.size||qd;return kR(e.url||NR,{service:"WMS",version:"1.1.1",request:"GetMap",layers:n.layerName,styles:n.styles||"",format:"image/png",transparent:!0,tiled:!0,srs:"EPSG:4326",bbox:[t.west,t.south,t.east,t.north].join(","),width:i.width,height:i.height,CQL_FILTER:e.cqlFilter||n.cqlFilter,_:Date.now()})}function xOe(n,e,t={}){var a,o;const i=t.bounds||lr,r=t.size||qd;return kR(t.url||NR,{service:"WMS",version:"1.1.1",request:"GetFeatureInfo",layers:n.layerName,query_layers:n.layerName,styles:n.styles||"",info_format:"application/json",feature_count:5,srs:"EPSG:4326",bbox:[i.west,i.south,i.east,i.north].join(","),width:r.width,height:r.height,x:Math.round(e.x),y:Math.round(e.y),buffer:(o=(a=t.buffer)!=null?a:n.queryBuffer)!=null?o:8,CQL_FILTER:t.cqlFilter||n.cqlFilter})}function KH(i,r){return rn(this,arguments,function*(n,e,t={}){const a=xOe(n,e,t);return su(a,{credentials:"include"})})}function wOe(n,e={}){return kR(e.url||bOe,{service:"WFS",version:e.version||"1.0.0",request:"GetFeature",typeName:n,outputFormat:"json",propertyName:Array.isArray(e.propertyName)?e.propertyName.join(","):e.propertyName,CQL_FILTER:e.cqlFilter,maxFeatures:e.maxFeatures||2e5})}function s3(t){return rn(this,arguments,function*(n,e={}){const i=wOe(n,e);return su(i,{credentials:"include",timeout:e.timeout||2e4})})}function ZH(n){var i;const e=(i=n==null?void 0:n.features)==null?void 0:i[0];if(!e)return null;const t=e.properties||{};return{id:e.id||t.gid||t.objectid||t.OBJECTID,properties:t,feature:e}}const TOe=new Le(0,22.8,18.8),AOe=new Le(0,0,0),COe=new Le(-7.2,24.2,31.2);function JH(n){return n.sort((e,t)=>t.value-e.value),n}function g2(n){return String(n||"").replace(/\s+/g,"").trim().replace("色地乡","色地镇").replace("瓦切乡","瓦切镇").replace("安曲乡","安曲镇").replace("龙日乡","龙日镇")}function Jr(n,e=0){const t=Number(n);return Number.isFinite(t)?t:e}function Us(n){return String(n!=null?n:"").replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function QH(n){return(n==null?void 0:n.scope)==="village"||(n==null?void 0:n.labelMode)==="village"}function eW(n){return(n==null?void 0:n.scope)==="trade-flow"||(n==null?void 0:n.labelMode)==="trade-flow"}function tW(n){return!!(n!=null&&n.hideTownNames||(n==null?void 0:n.showTownNames)===!1)}function I4(n){return!!(n!=null&&n.hideMapLabels||(n==null?void 0:n.showMapLabels)===!1)}function MOe(n){return(n==null?void 0:n.displayMode)==="callout"||(n==null?void 0:n.labelMode)==="callout"}function D4(n){return["wkt-api","geojson","wfs"].includes(n==null?void 0:n.sourceType)}function nW(n){return n?/^https?:\/\//.test(n)||n.startsWith("/")?n:`./${n}`:""}function iW(n){if(!n)return null;if(typeof n=="string")try{return JSON.parse(n)}catch(e){return console.warn("地图 GeoJSON 解析失败",e),null}return n}function rW(n){return n!=null&&n.coordinates?n.type==="Polygon"?[n.coordinates]:n.type==="MultiPolygon"?n.coordinates:[]:[]}class EOe extends OFe{constructor(e,t,i={}){var r,a,o,s;super(e),this.geoProjectionCenter=[102.6305459723107,32.72169252326339],this.geoProjectionScale=650,this.tradeGeoProjectionCenter=[104,36],this.tradeGeoProjectionScale=11.4,this.tradeNationalDepth=.24,this.depth=.5,this.mapFocusLabelInfo={name:"红原县",enName:"HONGYUAN COUNTY",center:[102.6305459723107,32.08]},this.clicked=!1,this.scene.fog=new mR(466735,1,50),this.scene.background=new Jn(466735),this.camera.instance.position.copy(COe),this.camera.instance.near=1,this.camera.instance.far=1e4,this.camera.instance.updateProjectionMatrix(),this.defaultMapCameraPosition=TOe.clone(),this.defaultMapTarget=AOe.clone(),this.camera.controls.target.copy(this.defaultMapTarget),this.camera.controls.update(),this.activeMapViewTweens=[],this.interactionManager=new QFe(this.renderer.instance,this.camera.instance,this.canvas),this.assets=t,this.callbacks=i,this.topicLayerLoadId=0,this.visibleTopicLayers=[],this.mapAnimationComplete=!1,this.showTownRankingBars=!1,this.showTownRankingPointMarkers=!1,this.currentTownRanking=null,this.villageRankingGroup=null,this.villageRankingLabels=[],this.tradeFlowGroup=null,this.tradeFlowMeshGroup=null,this.tradeFlowLabelGroup=null,this.tradeFlowLabels=[],this.tradeFlowMaterials=[],this.tradeFlowPulseSprites=[],this.isTradeNationalMapActive=!1,this.selectedFeatureGroup=null,this.selectedVectorFeatures=[],this.analysisBoundaryFeature=null,this.analysisMatchedFeatures=[],this.boundaryDrawingEnabled=!1,this.boundaryDrawPoints=[],this.lastBoundaryDrawPoint=null,this.currentVectorFeatures=[],this.hongyuanBoundaryPolygons=[],this.townMetaByName=new Map(GH.map(l=>[g2(l.name),l])),this.handleCanvasBoundaryPointerDown=this.handleCanvasBoundaryPointerDown.bind(this),this.handleCanvasBoundaryDoubleClick=this.handleCanvasBoundaryDoubleClick.bind(this),(a=(r=this.canvas)==null?void 0:r.addEventListener)==null||a.call(r,"pointerdown",this.handleCanvasBoundaryPointerDown,!0),(s=(o=this.canvas)==null?void 0:o.addEventListener)==null||s.call(o,"dblclick",this.handleCanvasBoundaryDoubleClick,!0),this.initEnvironment(),this.init()}init(){this.labelGroup=new Nr,this.label3d=new WFe(this),this.labelGroup.rotation.x=-Math.PI/2,this.scene.add(this.labelGroup),this.flyLineFocusGroup=new Nr,this.flyLineFocusGroup.visible=!1,this.flyLineFocusGroup.rotation.x=-Math.PI/2,this.scene.add(this.flyLineFocusGroup),this.eventElement=[],this.defaultMaterial=null,this.defaultLightMaterial=null,this.createBottomBg(),this.createChinaBlurLine(),this.createGrid(),this.createRotateBorder(),this.createLabel(),this.createMap(),this.createEvent(),this.createFlyLine(),this.createFocus(),this.createParticles(),this.createScatter(),this.createInfoPoint(),this.createStorke();let e=ka.timeline({onComplete:()=>{if(this.mapAnimationComplete=!0,this.applyLayerMapView(this.currentTopicLayer,{force:!0}),this.setTradeNationalMapVisible(!1),I4(this.currentTownRanking)){this.hideAllMapStatisticLabels();return}this.updateVillageRankingLabels(this.currentTownRanking),this.updateTradeFlowLayer(this.currentTownRanking),this.updateInfoPointStats()}});e.pause(),this.animateTl=e,e.addLabel("focusMap",1.5),e.addLabel("focusMapOpacity",2),e.addLabel("bar",3),e.to(this.camera.instance.position,{duration:2,x:this.defaultMapCameraPosition.x,y:this.defaultMapCameraPosition.y,z:this.defaultMapCameraPosition.z,ease:"circ.out",onStart:()=>{this.flyLineFocusGroup.visible=!1}}),e.to(this.focusMapGroup.position,{duration:1,x:0,y:0,z:0},"focusMap"),e.to(this.focusMapGroup.scale,{duration:1,x:1,y:1,z:1,ease:"circ.out",onComplete:()=>{if(this.flyLineGroup.visible=!0,this.scatterGroup.visible=!0,this.InfoPointGroup.visible=!I4(this.currentTownRanking)&&this.showTownRankingPointMarkers&&this.hasTownRankingRows(),this.setTradeNationalMapVisible(!1),I4(this.currentTownRanking)){this.hideAllMapStatisticLabels();return}this.updateVillageRankingLabels(this.currentTownRanking),this.updateTradeFlowLayer(this.currentTownRanking),this.updateInfoPointStats()}},"focusMap"),e.to(this.focusMapTopMaterial,{duration:1,opacity:1,ease:"circ.out"},"focusMapOpacity"),e.to(this.focusMapSideMaterial,{duration:1,opacity:1,ease:"circ.out",onComplete:()=>{this.focusMapSideMaterial.transparent=!1}},"focusMapOpacity"),this.otherLabel.map((i,r)=>{let a=i.element.querySelector(".other-label");e.to(a,{duration:1,delay:.1*r,translateY:0,opacity:1,ease:"circ.out"},"focusMapOpacity")}),e.to(this.mapLineMaterial,{duration:.5,delay:.3,opacity:1},"focusMapOpacity"),e.to(this.rotateBorder1.scale,{delay:.3,duration:1,x:1,y:1,z:1,ease:"circ.out"},"focusMapOpacity"),e.to(this.rotateBorder2.scale,{duration:1,delay:.5,x:1,y:1,z:1,ease:"circ.out",onComplete:()=>{var i,r;this.flyLineFocusGroup.visible=!0,(r=(i=this.callbacks).onPlayComplete)==null||r.call(i)}},"focusMapOpacity"),this.showTownRankingBars&&(this.allBar.map((i,r)=>{e.to(i.scale,{duration:1,delay:.1*r,x:1,y:1,z:1,ease:"circ.out"},"bar")}),this.allBarMaterial.map((i,r)=>{e.to(i,{duration:1,delay:.1*r,opacity:1,ease:"circ.out"},"bar")}));const t=this;this.allProvinceLabel.map((i,r)=>{let a=i.element.querySelector(".provinces-label-wrap"),o=i.element.querySelector(".number .value"),s={progress:0};e.to(a,{duration:1,delay:.2*r,translateY:0,opacity:1,ease:"circ.out"},"bar"),e.to(s,{duration:1,delay:.2*r,progress:1,onStart:()=>{s.progress=0},onUpdate:l},"bar");function l(){var c,d;const u=Jr((d=(c=i.userData)==null?void 0:c.targetValue)!=null?d:o.dataset.targetValue);o.innerText=t.formatMapRankingValue(u*s.progress)}}),this.showTownRankingBars&&this.allGuangquan.map((i,r)=>{e.to(i.children[0].scale,{duration:1,delay:.1*r,x:1,y:1,z:1,ease:"circ.out"},"bar"),e.to(i.children[1].scale,{duration:1,delay:.1*r,x:1,y:1,z:1,ease:"circ.out"},"bar")})}initEnvironment(){let e=new hee(13171711,4.2);this.scene.add(e);let t=new V8(14679295,5.8);t.position.set(-30,6,-8),t.castShadow=!0,t.shadow.radius=20,t.shadow.mapSize.width=1024,t.shadow.mapSize.height=1024,this.scene.add(t),this.createPointLight({color:"#1fd6df",intensity:680,distance:1e4,x:-9,y:3,z:-3}),this.createPointLight({color:"#2af0c6",intensity:260,distance:1e4,x:0,y:2,z:5})}createPointLight(e){const t=new dee(1924702,e.intensity,e.distance);t.position.set(e.x,e.y,e.z),this.scene.add(t)}createMap(){let e=new Nr,t=new Nr;this.mapGroup=e,this.focusMapGroup=t;let{china:i,chinaTopLine:r}=this.createChina(),{map:a,mapTop:o,mapLine:s}=this.createProvince();i.setParent(e),r.setParent(e),this.createDiffuse(),a.setParent(t),o.setParent(t),s.setParent(t),t.position.set(0,0,-.01),t.scale.set(1,1,0),e.add(t),this.createTopicLayer(),e.rotation.x=-Math.PI/2,e.position.set(0,.2,0),this.scene.add(e),this.createBar()}createChina(){let e={chinaBgMaterialColor:"#0d3349",lineColor:"#39c7ef"},t=this.assets.instance.getResource("china"),i=new KC({color:new Jn(e.chinaBgMaterialColor),transparent:!0,opacity:.72}),r=new C4(this,{data:t,geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,merge:!0,material:i,renderOrder:2}),a=new ku({color:e.lineColor,transparent:!0,opacity:.58}),o=new R4(this,{data:t,geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,material:a,renderOrder:3});return o.lineGroup.position.z+=.01,{china:r,chinaTopLine:o}}createTradeNationalMap(){var d;if(this.tradeNationalMapGroup)return!0;let e=null;try{e=this.assets.instance.getResource("chinaMap")}catch(h){return console.warn("牦牛交易全国地图资源未加载",h),!1}const t=iW(e);if(!e||!((d=t==null?void 0:t.features)!=null&&d.length))return!1;const i=new Nr;i.name="trade-national-map",i.visible=!1,i.rotation.x=-Math.PI/2,i.position.set(0,.04,0);const r=new Mr({color:403001,transparent:!0,opacity:.14,side:aa,depthWrite:!1,fog:!1});new C4(this,{data:e,geoProjectionCenter:this.tradeGeoProjectionCenter,geoProjectionScale:this.tradeGeoProjectionScale,position:new Le(.05,-.05,-.03),material:r,renderOrder:17}).setParent(i);const{topMaterial:o,sideMaterial:s}=this.createTradeNationalMaterials(),l=new NH(this,{data:e,geoProjectionCenter:this.tradeGeoProjectionCenter,geoProjectionScale:this.tradeGeoProjectionScale,position:new Le(0,0,0),depth:this.tradeNationalDepth,topFaceMaterial:o,sideMaterial:s,renderOrder:20,bevelThickness:.024,bevelSegments:1});l.mapGroup.traverse(h=>{h.isMesh&&(h.renderOrder=20)}),l.setParent(i);const u=new ku({color:4777983,transparent:!0,opacity:.52,fog:!1,depthTest:!1}),c=new R4(this,{data:e,geoProjectionCenter:this.tradeGeoProjectionCenter,geoProjectionScale:this.tradeGeoProjectionScale,material:u,renderOrder:21});return c.lineGroup.position.z+=this.tradeNationalDepth+.055,c.setParent(i),this.scene.add(i),this.tradeNationalMapGroup=i,this.createTradeNationalLabels(t),!0}createTradeNationalMaterials(){const e=new dp({color:16777215,transparent:!0,opacity:.54,roughness:.84,metalness:.08,side:aa,fog:!1});new L4(e,{uColor1:827317,uColor2:403515,size:6.8,dir:"x"});const t=this.assets.instance.getResource("side").clone();t.wrapS=Eo,t.wrapT=Eo,t.repeat.set(1,1.2),t.needsUpdate=!0;const i=new dp({color:1485501,map:t,transparent:!0,opacity:.58,roughness:.78,metalness:.04,side:aa,fog:!1});return new L4(i,{uColor1:1354174,uColor2:134940,size:Math.max(this.tradeNationalDepth,.1),dir:"y"}),this.time.on("tick",()=>{t.offset.y+=.004}),{topMaterial:e,sideMaterial:i}}createTradeNationalLabels(e){this.tradeNationalLabelGroup=new Nr,this.tradeNationalLabelGroup.name="trade-national-label",this.tradeNationalLabelGroup.rotation.x=-Math.PI/2,this.tradeNationalLabelGroup.visible=!1,this.scene.add(this.tradeNationalLabelGroup),this.tradeNationalLabels=[];const t=new Set(["四川","青海","甘肃","陕西","重庆","云南","西藏","新疆"]);(e.features||[]).forEach(i=>{var l;const r=((l=i.properties)==null?void 0:l.name)||"",a=this.normalizeTradeProvinceName(r);if(!t.has(a))return;const o=this.getFeatureCenterLngLat(i);if(!o)return;const s=this.label3d.create("","trade-national-label",!0);s.init(`
    ${Us(a)}
    `,this.getTradeLocalPoint(o.lng,o.lat,.82)),this.label3d.setLabelStyle(s,.012,"x"),s.setParent(this.tradeNationalLabelGroup),s.visible=!0,this.tradeNationalLabels.push(s)})}normalizeTradeProvinceName(e=""){return String(e).replace(/省|市|自治区|壮族|回族|维吾尔|特别行政区/g,"").trim()}getFeatureCenterLngLat(e){var a,o,s;const t=((a=e==null?void 0:e.properties)==null?void 0:a.cp)||((o=e==null?void 0:e.properties)==null?void 0:o.centroid)||((s=e==null?void 0:e.properties)==null?void 0:s.center);if(Array.isArray(t)&&Number.isFinite(Number(t[0]))&&Number.isFinite(Number(t[1])))return{lng:Number(t[0]),lat:Number(t[1])};const i=this.getGeometryCoordinateList(e==null?void 0:e.geometry);if(!i.length)return null;const r=i.reduce((l,u)=>({minLng:Math.min(l.minLng,Number(u[0])),maxLng:Math.max(l.maxLng,Number(u[0])),minLat:Math.min(l.minLat,Number(u[1])),maxLat:Math.max(l.maxLat,Number(u[1]))}),{minLng:1/0,maxLng:-1/0,minLat:1/0,maxLat:-1/0});return{lng:(r.minLng+r.maxLng)/2,lat:(r.minLat+r.maxLat)/2}}createProvince(){let e=this.assets.instance.getResource("mapJson");this.mapJsonData=e;const t=lOe({geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,zoom:uOe});this.enhanceTexture(t.texture);let[i,r]=this.createProvinceMaterial();this.focusMapTopMaterial=i,this.focusMapSideMaterial=r;let a=new NH(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new Le(0,0,.11),data:e,depth:this.depth,topFaceMaterial:i,sideMaterial:r,renderOrder:9}),o=new dp({color:16777215,map:t.texture,transparent:!0,opacity:.94,roughness:.82});new L4(o,{uColor1:1629410,uColor2:757673}),this.defaultMaterial=o,this.defaultLightMaterial=this.defaultMaterial.clone(),this.defaultLightMaterial.color=new Jn("rgba(128,244,255,1)"),this.defaultLightMaterial.opacity=.9;let s=new C4(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new Le(0,0,this.depth+.22),data:e,material:o,renderOrder:8});WH(s,t.uvBounds),s.mapGroup.children.map(u=>{u.children.map(c=>{c.type==="Mesh"&&this.eventElement.push(c)})}),this.mapLineMaterial=new ku({color:12254463,opacity:0,transparent:!0,fog:!1});let l=new R4(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,data:e,material:this.mapLineMaterial,renderOrder:3});return l.lineGroup.position.z+=this.depth+.23,{map:a,mapTop:s,mapLine:l}}createTopicLayer(){if(!this.mapJsonData)return;this.initHongyuanBoundaryPolygons();const e=document.createElement("canvas");e.width=qd.width,e.height=qd.height;const t=e.getContext("2d");t.clearRect(0,0,e.width,e.height);const i=new bR(e);i.colorSpace=$r,i.wrapS=us,i.wrapT=us,i.minFilter=ao,i.magFilter=ao,this.enhanceTexture(i),i.needsUpdate=!0;const r=new Mr({map:i,transparent:!0,opacity:0,depthWrite:!1,side:aa,fog:!1}),a=this.createLayerUvBounds(),o=new C4(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new Le(0,0,this.depth+.255),data:this.mapJsonData,material:r,renderOrder:18});WH(o,a),o.setParent(this.focusMapGroup),this.topicLayerUvBounds=a,this.topicLayerCanvas=e,this.topicLayerContext=t,this.topicLayerTexture=i,this.topicLayerMaterial=r,this.topicLayerMap=o}initHongyuanBoundaryPolygons(){var t,i,r,a,o;if((t=this.hongyuanBoundaryPolygons)!=null&&t.length)return;const e=iW((r=(i=this.assets)==null?void 0:i.instance)==null?void 0:r.getResource("mapStroke"));this.hongyuanBoundaryPolygons=rW((o=(a=e==null?void 0:e.features)==null?void 0:a[0])==null?void 0:o.geometry)}createSelectedFeatureGroup(){var e;this.selectedFeatureGroup||(this.selectedFeatureGroup=new Nr,this.selectedFeatureGroup.name="selected-feature-highlight",this.selectedFeatureGroup.position.z=this.depth+.31,(e=this.focusMapGroup)==null||e.add(this.selectedFeatureGroup))}createLayerUvBounds(){const e=Ic().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0]),[t]=e([lr.west,lr.south]),[i]=e([lr.east,lr.south]),[,r]=e([lr.west,lr.north]),[,a]=e([lr.west,lr.south]);return{left:t,right:i,bottom:-a,top:-r}}setTopicLayer(e){var r,a;if(!e||!this.topicLayerContext||!this.topicLayerTexture)return;this.currentTopicLayer=e,this.visibleTopicLayers=[e],this.clearSelectedFeature(),this.applyLayerMapView(e);const t=++this.topicLayerLoadId;if(this.currentVectorFeatures=[],this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(a=(r=this.callbacks).onLayerStatus)==null||a.call(r,{type:"loading",text:`正在加载 ${e.name}`}),D4(e)){this.loadVectorTopicLayer(e,t);return}const i=new Image;i.crossOrigin="anonymous",i.onload=()=>{var o,s,l;t===this.topicLayerLoadId&&(this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerContext.drawImage(i,0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=(o=e.opacity)!=null?o:.84,(l=(s=this.callbacks).onLayerStatus)==null||l.call(s,{type:"success",text:"GeoServer 图层已加载"}))},i.onerror=()=>{var o,s;t===this.topicLayerLoadId&&(this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(s=(o=this.callbacks).onLayerStatus)==null||s.call(o,{type:"error",text:"GeoServer 图层加载失败"}))},i.src=YH(e)}setTopicLayers(e=[],t=e[0]){var o,s,l,u;if(!this.topicLayerContext||!this.topicLayerTexture)return;const i=e.filter(Boolean);if(!i.length){this.topicLayerLoadId+=1,this.visibleTopicLayers=[],this.currentTopicLayer=null,this.currentVectorFeatures=[],this.clearSelectedFeature(),this.applyLayerMapView(null),this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(s=(o=this.callbacks).onLayerStatus)==null||s.call(o,{type:"success",text:"图层已关闭"});return}if(i.length===1){this.setTopicLayer(wt(wt({},i[0]),(t==null?void 0:t.key)===i[0].key?t:{}));return}this.currentTopicLayer=t||i[i.length-1],this.visibleTopicLayers=i,this.clearSelectedFeature(),this.applyLayerMapView(this.currentTopicLayer);const r=++this.topicLayerLoadId;this.currentVectorFeatures=[],this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(u=(l=this.callbacks).onLayerStatus)==null||u.call(l,{type:"loading",text:`正在加载 ${i.length} 个林地图层`});const a=i.filter(c=>!D4(c));Promise.all(a.map(c=>this.loadTopicLayerImage(c))).then(c=>{var h,f;if(r!==this.topicLayerLoadId)return;const d=c.filter(Boolean);this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),d.forEach(({image:p,layer:m},v)=>{var _,S;this.topicLayerContext.save();const g=v===d.length-1?Math.max(.78,(_=m.opacity)!=null?_:.9):Math.min(.52,(S=m.opacity)!=null?S:.52);this.topicLayerContext.globalAlpha=Math.min(1,Math.max(.28,g)),this.topicLayerContext.drawImage(p,0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerContext.restore()}),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=d.length?1:0,(f=(h=this.callbacks).onLayerStatus)==null||f.call(h,{type:d.length?"success":"error",text:d.length?`已加载 ${d.length} 个林地图层`:"林地图层加载失败"})})}loadTopicLayerImage(e){return new Promise(t=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>t({image:i,layer:e}),i.onerror=()=>t(null),i.src=YH(e)})}applyLayerMapView(e,t={}){var s,l;if(!((s=this.camera)!=null&&s.instance)||!((l=this.camera)!=null&&l.controls)||!this.mapAnimationComplete&&!t.force)return;const i=(e==null?void 0:e.mapView)||(e!=null&&e.cameraPosition?{cameraPosition:e.cameraPosition}:null),r=i?this.getLayerMapViewTarget(i):this.defaultMapTarget.clone(),a=i?this.getLayerMapViewCameraPosition(i,r):this.defaultMapCameraPosition.clone(),o=i&&Number.isFinite(i.duration)?i.duration:.75;this.animateMapCamera(a,r,o)}getLayerMapViewTarget(e){var t;return e!=null&&e.targetLngLat?this.lngLatToWorldPoint(e.targetLngLat,(t=e.targetLocalZ)!=null?t:.72):e!=null&&e.target?this.toVector3(e.target,this.defaultMapTarget):this.defaultMapTarget.clone()}getLayerMapViewCameraPosition(e,t){if(e!=null&&e.cameraPosition)return this.toVector3(e.cameraPosition,this.defaultMapCameraPosition);const i=Number.isFinite(e==null?void 0:e.distanceScale)?e.distanceScale:1,r=this.defaultMapCameraPosition.clone().sub(this.defaultMapTarget).multiplyScalar(i),a=t.clone().add(r);return e!=null&&e.cameraOffset&&a.add(this.toVector3(e.cameraOffset,new Le(0,0,0))),a}lngLatToWorldPoint(e,t=0){const i=Array.isArray(e)?e:[e==null?void 0:e.lng,e==null?void 0:e.lat],r=Number(i==null?void 0:i[0]),a=Number(i==null?void 0:i[1]);if(!Number.isFinite(r)||!Number.isFinite(a))return this.defaultMapTarget.clone();const[o,s]=this.geoProjection([r,a]),l=new Le(o,-s,Number(t)||0);return this.focusMapGroup?this.focusMapGroup.localToWorld(l):l}toVector3(e,t){if(Array.isArray(e)){const[o,s,l]=e.map(Number);return[o,s,l].every(Number.isFinite)?new Le(o,s,l):t.clone()}const i=Number(e==null?void 0:e.x),r=Number(e==null?void 0:e.y),a=Number(e==null?void 0:e.z);return[i,r,a].every(Number.isFinite)?new Le(i,r,a):t.clone()}animateMapCamera(e,t,i=.75){this.activeMapViewTweens.forEach(o=>{var s;return(s=o==null?void 0:o.kill)==null?void 0:s.call(o)}),this.activeMapViewTweens=[];const r=this.camera.controls,a=()=>r.update();this.activeMapViewTweens.push(ka.to(this.camera.instance.position,{duration:i,x:e.x,y:e.y,z:e.z,ease:"power2.out",onUpdate:a}),ka.to(r.target,{duration:i,x:t.x,y:t.y,z:t.z,ease:"power2.out",onUpdate:a}))}focusTownByName(e,t={}){var o,s,l;const i=this.townMetaByName.get(g2(e));if(!(i!=null&&i.center))return!1;const r=this.lngLatToWorldPoint(i.center,(o=t.targetLocalZ)!=null?o:.82),a=this.getLayerMapViewCameraPosition({distanceScale:(s=t.distanceScale)!=null?s:.82,cameraOffset:t.cameraOffset||{x:0,y:1.2,z:0}},r);return this.animateMapCamera(a,r,(l=t.duration)!=null?l:.75),!0}loadVectorTopicLayer(e,t){return rn(this,null,function*(){var i,r,a,o,s;try{const l=yield this.fetchVectorLayerGeojson(e);if(t!==this.topicLayerLoadId)return;this.currentVectorFeatures=l.features||[],this.drawVectorTopicLayer(e,this.currentVectorFeatures),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=(i=e.opacity)!=null?i:.9,(a=(r=this.callbacks).onLayerStatus)==null||a.call(r,{type:"success",text:"真实矢量图层已加载"})}catch(l){if(t!==this.topicLayerLoadId)return;this.currentVectorFeatures=[],this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(s=(o=this.callbacks).onLayerStatus)==null||s.call(o,{type:"error",text:"真实矢量图层加载失败"})}})}fetchVectorLayerGeojson(e){return rn(this,null,function*(){var i;if(e.sourceType==="geojson"){if(((i=e.geojsonData)==null?void 0:i.type)==="FeatureCollection")return e.geojsonData;const r=yield fetch(nW(e.dataPath),{credentials:"include"});if(!r.ok)throw new Error(`HTTP ${r.status}`);return yield r.json()}if(e.sourceType==="wfs"){const r=yield s3(e.layerName,{cqlFilter:e.cqlFilter,maxFeatures:e.maxFeatures||1200,timeout:e.timeout||18e3});return(r==null?void 0:r.type)==="FeatureCollection"?r:{type:"FeatureCollection",features:(r==null?void 0:r.features)||[]}}let t=[];try{const r=yield fetch(e.apiUrl,{credentials:"include"});if(!r.ok)throw new Error(`HTTP ${r.status}`);const a=yield r.json();t=Array.isArray(a==null?void 0:a.data)?a.data:[]}catch(r){const a=yield fetch(nW(e.fallbackPath),{credentials:"include"});if(!a.ok)throw r;const o=yield a.json();t=Array.isArray(o==null?void 0:o.rows)?o.rows:[]}return{type:"FeatureCollection",features:t.map(r=>({type:"Feature",properties:{id:r.id,type:r.type,totalAcreage:r.totalAcreage,cdAcreage:r.cdAcreage,sdAcreage:r.sdAcreage,cdScl:r.cdScl,sdScl:r.sdScl},geometry:this.parseWktGeometry(r.wkt)})).filter(r=>r.geometry)}})}drawVectorTopicLayer(e,t){const i=this.topicLayerContext;i.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),i.save(),i.lineJoin="round",i.lineCap="round",this.clipVectorLayerContext(i,e),this.getVisibleVectorFeatures(e,t).sort((o,s)=>{var c,d;const l=this.getGeometryDrawRank((c=o.geometry)==null?void 0:c.type),u=this.getGeometryDrawRank((d=s.geometry)==null?void 0:d.type);return l-u}).forEach(o=>{const s=this.getVectorFeatureStyle(e,o);this.drawVectorFeature(i,o.geometry,s)}),this.drawSelectedVectorOverlay(i),i.restore()}drawSelectedVectorOverlay(e){const t=this.selectedVectorFeatures||[],i=this.analysisMatchedFeatures||[],r=this.analysisBoundaryFeature,a=this.boundaryDrawPoints||[];if(!t.length&&!i.length&&!r&&!a.length)return;const o={fill:"#FFE15A",stroke:"#24F6C4",polygonAlpha:.24,lineAlpha:.98,lineWidth:12,pointRadius:11,glow:!0,halo:!0},s={fill:"#FFF06A",stroke:"#FFFDF2",polygonAlpha:.46,lineAlpha:1,lineWidth:5,pointRadius:6.5,glow:!1,halo:!1};if(e.save(),t.forEach(l=>{var c;const u=(l==null?void 0:l.geometry)||((c=l==null?void 0:l.feature)==null?void 0:c.geometry);this.drawVectorFeature(e,u,o),this.drawVectorFeature(e,u,s)}),i.forEach(l=>{var c;const u=(l==null?void 0:l.geometry)||((c=l==null?void 0:l.feature)==null?void 0:c.geometry);this.drawVectorFeature(e,u,{fill:"#FF8A3D",stroke:"#FFE15A",polygonAlpha:.28,lineAlpha:.98,lineWidth:5,pointRadius:6,glow:!0})}),r!=null&&r.geometry&&this.drawVectorFeature(e,r.geometry,{fill:"#24F6C4",stroke:"#FFFFFF",polygonAlpha:.18,lineAlpha:1,lineWidth:4,pointRadius:6,glow:!0}),a.length){const l=a.map(c=>[c.lng,c.lat]),u={type:"LineString",coordinates:this.boundaryDrawingEnabled?l:[...l,l[0]].filter(Boolean)};this.drawVectorFeature(e,u,{fill:"#24F6C4",stroke:"#24F6C4",polygonAlpha:.12,lineAlpha:1,lineWidth:4,pointRadius:6,glow:!0}),l.forEach(c=>{this.drawVectorFeature(e,{type:"Point",coordinates:c},{fill:"#FFFFFF",stroke:"#24F6C4",polygonAlpha:.2,lineAlpha:1,lineWidth:3,pointRadius:5.5,glow:!0})})}e.restore()}redrawVectorTopicLayer(){!this.topicLayerContext||!this.topicLayerTexture||!this.currentTopicLayer||!D4(this.currentTopicLayer)||(this.drawVectorTopicLayer(this.currentTopicLayer,this.currentVectorFeatures||[]),this.topicLayerTexture.needsUpdate=!0)}getVisibleVectorFeatures(e,t){const i=e==null?void 0:e.activeLegend,r=i==null?void 0:i.match;if(r!=null&&r.field)return(t||[]).filter(s=>{var l,u;return String((u=(l=s==null?void 0:s.properties)==null?void 0:l[r.field])!=null?u:"")===String(r.value)});const o=String((e==null?void 0:e.cqlFilter)||"").trim().match(/^([a-zA-Z0-9_]+)\s*=\s*'((?:''|[^'])*)'$/);if(o){const[,s,l]=o,u=l.replace(/''/g,"'");return(t||[]).filter(c=>{var d,h;return String((h=(d=c==null?void 0:c.properties)==null?void 0:d[s])!=null?h:"")===u})}return[...t||[]]}clipVectorLayerContext(e,t){this.clipContextToHongyuanBoundary(e);const i=this.getLayerClipBounds(t);if(!i)return;const r=this.lngLatToLayerCanvasPoint([i.west,i.north]),a=this.lngLatToLayerCanvasPoint([i.east,i.south]),o=Math.min(r.x,a.x),s=Math.min(r.y,a.y),l=Math.abs(a.x-r.x),u=Math.abs(a.y-r.y);!l||!u||(e.beginPath(),e.rect(o,s,l,u),e.clip())}clipContextToHongyuanBoundary(e){const t=this.hongyuanBoundaryPolygons||[];t.length&&(e.beginPath(),t.forEach(i=>{i.forEach(r=>{r.forEach((a,o)=>{const s=this.lngLatToLayerCanvasPoint(a);o===0?e.moveTo(s.x,s.y):e.lineTo(s.x,s.y)}),e.closePath()})}),e.clip("evenodd"))}shouldClipLayerToHongyuanBoundary(e=this.currentTopicLayer){const t=String((e==null?void 0:e.key)||"");return!!(e!=null&&e.clipToHongyuanBoundary||t==="national-park-zoning"||t.startsWith("yak-"))}shouldClipLayerToLayerBounds(e=this.currentTopicLayer){return!!(e!=null&&e.clipBounds&&(e==null?void 0:e.key)==="national-park-zoning")}isLngLatInHongyuanBoundary(e){const t=this.hongyuanBoundaryPolygons||[];return t.length?t.some(i=>this.isLngLatInPolygon(e,i)):!0}isLngLatInLayerClipBounds(e,t=this.currentTopicLayer){const i=this.getLayerClipBounds(t);return i?e.lng>=i.west&&e.lng<=i.east&&e.lat>=i.south&&e.lat<=i.north:!0}getLayerClipBounds(e){const t=e==null?void 0:e.clipBounds;if(!t)return null;const i=Math.max(Number(t.west),lr.west),r=Math.max(Number(t.south),lr.south),a=Math.min(Number(t.east),lr.east),o=Math.min(Number(t.north),lr.north);return![i,r,a,o].every(Number.isFinite)||i>=a||r>=o?null:{west:i,south:r,east:a,north:o}}getGeometryDrawRank(e){return String(e).includes("Polygon")?1:String(e).includes("LineString")?2:3}getVectorFeatureStyle(e,t){var l,u,c;const i=t.properties||{},a=(e.legends||[]).find(d=>{var f;const h=d.match;return h?String((f=i[h.field])!=null?f:"")===String(h.value):!1})||((l=e.legends)==null?void 0:l[0])||{},o=String(((u=t.geometry)==null?void 0:u.type)||"").includes("LineString"),s=((c=t.geometry)==null?void 0:c.type)==="Point";return(e==null?void 0:e.key)==="yak-epidemic-village-boundary"?{fill:a.fillColor||"#24F6C4",stroke:a.strokeColor||"#FFF06A",polygonAlpha:.16,lineAlpha:1,lineWidth:5,pointRadius:4.5,glow:!0}:(e==null?void 0:e.key)==="yak-industry-points"?{fill:a.fillColor||"#24F6C4",stroke:a.strokeColor||a.fillColor||"#B7FFF2",polygonAlpha:.36,lineAlpha:.82,lineWidth:1.6,pointRadius:this.getVectorPointRadius(e,t),glow:!0,halo:!0}:{fill:o||s?a.strokeColor||a.fillColor||"#30DCFF":a.fillColor||"#30DCFF",stroke:a.strokeColor||a.fillColor||"#30DCFF",polygonAlpha:.36,lineAlpha:o?.92:.9,lineWidth:o?5:2.4,pointRadius:s?this.getVectorPointRadius(e,t):4.5,glow:!0}}getVectorPointRadius(e,t){var r,a;const i=Number(((r=t==null?void 0:t.properties)==null?void 0:r.count)||((a=t==null?void 0:t.properties)==null?void 0:a.value)||0);return(e==null?void 0:e.key)==="yak-recognition-layer"?Math.max(3.8,Math.min(8.6,3.6+Math.sqrt(i)/68)):(e==null?void 0:e.key)==="yak-industry-points"?4.8:4.5}drawVectorFeature(e,t,i){if(t!=null&&t.coordinates){if(t.type==="Polygon"){this.drawPolygonPath(e,t.coordinates,i);return}if(t.type==="MultiPolygon"){t.coordinates.forEach(r=>this.drawPolygonPath(e,r,i));return}if(t.type==="LineString"){this.drawLinePath(e,t.coordinates,i);return}if(t.type==="MultiLineString"){t.coordinates.forEach(r=>this.drawLinePath(e,r,i));return}t.type==="Point"&&this.drawPointPath(e,t.coordinates,i)}}drawPolygonPath(e,t,i){Array.isArray(t==null?void 0:t[0])&&(e.save(),e.beginPath(),t.forEach(r=>{r.forEach((a,o)=>{const s=this.lngLatToLayerCanvasPoint(a);o===0?e.moveTo(s.x,s.y):e.lineTo(s.x,s.y)}),e.closePath()}),e.fillStyle=this.hexToRgba(i.fill,i.polygonAlpha),e.strokeStyle=this.hexToRgba(i.stroke,i.lineAlpha),e.lineWidth=i.lineWidth,i.glow&&(e.shadowColor=i.stroke,e.shadowBlur=14),e.fill("evenodd"),e.stroke(),e.restore())}drawLinePath(e,t,i){!Array.isArray(t)||t.length<2||(e.save(),e.beginPath(),t.forEach((r,a)=>{const o=this.lngLatToLayerCanvasPoint(r);a===0?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y)}),e.strokeStyle=this.hexToRgba(i.stroke,i.lineAlpha),e.lineWidth=i.lineWidth,e.shadowColor=i.stroke,e.shadowBlur=12,e.stroke(),e.restore())}drawPointPath(e,t,i){var a;const r=this.lngLatToLayerCanvasPoint(t);e.save(),i.halo&&(e.beginPath(),e.arc(r.x,r.y,i.pointRadius*2.35,0,Math.PI*2),e.fillStyle=this.hexToRgba(i.fill,.18),e.shadowColor=i.fill,e.shadowBlur=18,e.fill()),e.beginPath(),e.arc(r.x,r.y,i.pointRadius,0,Math.PI*2),e.fillStyle=this.hexToRgba(i.fill,.96),e.shadowColor=i.stroke,e.shadowBlur=i.halo?8:12,e.fill(),i.lineWidth&&(e.lineWidth=i.lineWidth,e.strokeStyle=this.hexToRgba(i.stroke,(a=i.lineAlpha)!=null?a:.9),e.stroke()),e.restore()}lngLatToLayerCanvasPoint(e){const t=Number(e==null?void 0:e[0]),i=Number(e==null?void 0:e[1]);return{x:(t-lr.west)/(lr.east-lr.west)*this.topicLayerCanvas.width,y:(lr.north-i)/(lr.north-lr.south)*this.topicLayerCanvas.height}}hexToRgba(e,t=1){const i=String(e||"#30DCFF").replace("#",""),r=i.length===3?i.split("").map(u=>u+u).join(""):i,a=Number.parseInt(r,16);if(!Number.isFinite(a))return`rgba(48, 220, 255, ${t})`;const o=a>>16&255,s=a>>8&255,l=a&255;return`rgba(${o}, ${s}, ${l}, ${t})`}parseWktGeometry(e){var o;const t=String(e||"").trim();if(!t)return null;const i=t.match(/^([A-Z]+)(?:\s+[A-Z]+)?\s*\(/i),r=(o=i==null?void 0:i[1])==null?void 0:o.toUpperCase();if(!r)return null;const a=t.slice(t.indexOf("("));return r==="POLYGON"?{type:"Polygon",coordinates:this.parseWktPolygonBody(a)}:r==="MULTIPOLYGON"?{type:"MultiPolygon",coordinates:this.parseWktMultiPolygonBody(a)}:r==="POINT"?{type:"Point",coordinates:this.parseWktPoint(a)}:r==="MULTIPOINT"?{type:"MultiPoint",coordinates:this.getWktChildGroups(a).map(s=>this.parseWktPoint(s)).filter(Boolean)}:r==="LINESTRING"?{type:"LineString",coordinates:this.parseWktRing(a)}:r==="MULTILINESTRING"?{type:"MultiLineString",coordinates:this.getWktChildGroups(a).map(s=>this.parseWktRing(s)).filter(s=>s.length)}:null}parseWktMultiPolygonBody(e){return this.getWktChildGroups(e).map(t=>this.parseWktPolygonBody(t)).filter(t=>t.length)}parseWktPolygonBody(e){return this.getWktChildGroups(e).map(t=>this.parseWktRing(t)).filter(t=>t.length>=3)}getWktChildGroups(e){const t=String(e||"").trim(),i=t.startsWith("(")&&t.endsWith(")")?t.slice(1,-1):t,r=[];let a=0,o=-1;for(let s=0;s=0&&(r.push(i.slice(o,s+1)),o=-1))}return r.length?r:[i]}parseWktRing(e){return String(e||"").replace(/^\(+|\)+$/g,"").split(",").map(i=>i.trim().split(/\s+/).slice(0,2).map(Number)).filter(([i,r])=>Number.isFinite(i)&&Number.isFinite(r))}parseWktPoint(e){const t=String(e||"").replace(/^\(+|\)+$/g,"").trim().split(/\s+/).slice(0,2).map(Number);return t.length>=2&&Number.isFinite(t[0])&&Number.isFinite(t[1])?[t[0],t[1]]:null}createProvinceMaterial(){let e=new KC({color:16777215,transparent:!0,opacity:0,fog:!1,side:aa});e.onBeforeCompile=r=>{r.uniforms=tn(wt({},r.uniforms),{uColor1:{value:new Jn(2152676)},uColor2:{value:new Jn(475482)}}),r.vertexShader=r.vertexShader.replace("void main() {",` attribute float alpha; varying vec3 vPosition; varying float vAlpha; void main() { vAlpha = alpha; vPosition = position; `),r.fragmentShader=r.fragmentShader.replace("void main() {",` varying vec3 vPosition; varying float vAlpha; uniform vec3 uColor1; uniform vec3 uColor2; void main() { `),r.fragmentShader=r.fragmentShader.replace("#include ",` #ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= transmissionAlpha + 0.1; #endif vec3 gradient = mix(uColor1, uColor2, vPosition.x/15.78); outgoingLight = mix(outgoingLight * vec3(1.18), outgoingLight * gradient, 0.32); float topAlpha = 0.92; if(vPosition.z>0.3){ diffuseColor.a *= topAlpha; } gl_FragColor = vec4( outgoingLight, diffuseColor.a ); `)};let t=this.assets.instance.getResource("side");t.wrapS=Eo,t.wrapT=Eo,t.repeat.set(1,1.8),t.offset.y+=.065;let i=new dp({color:2148829,map:t,fog:!1,opacity:0,side:aa,roughness:.58,metalness:.08});return this.time.on("tick",()=>{t.offset.y+=.005}),i.onBeforeCompile=r=>{r.uniforms=tn(wt({},r.uniforms),{uColor1:{value:new Jn(1629410)},uColor2:{value:new Jn(205365)}}),r.vertexShader=r.vertexShader.replace("void main() {",` attribute float alpha; varying vec3 vPosition; varying float vAlpha; void main() { vAlpha = alpha; vPosition = position; `),r.fragmentShader=r.fragmentShader.replace("void main() {",` varying vec3 vPosition; varying float vAlpha; uniform vec3 uColor1; uniform vec3 uColor2; void main() { `),r.fragmentShader=r.fragmentShader.replace("#include ",` #ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= transmissionAlpha + 0.1; #endif vec3 gradient = mix(uColor1, uColor2, vPosition.z/1.2); outgoingLight = outgoingLight*gradient*vec3(1.12); gl_FragColor = vec4( outgoingLight, diffuseColor.a ); `)},[e,i]}getDefaultTownRanking(){return{title:"乡镇统计加载中",unit:"",rows:GH.map(e=>({name:e.name,value:0,unit:""}))}}getTownRankingMeta(e=this.currentTownRanking){var r,a;const t=this.getDefaultTownRanking(),i=MOe(e);return{title:(e==null?void 0:e.title)||t.title,unit:(e==null?void 0:e.unit)||t.unit,metricLabel:(e==null?void 0:e.metricLabel)||(e==null?void 0:e.legendName)||"",note:(e==null?void 0:e.note)||"",hideTownNames:tW(e),hideMapLabels:I4(e),calloutMode:i,showBars:(r=e==null?void 0:e.showBars)!=null?r:!1,showPointMarkers:(a=e==null?void 0:e.showPointMarkers)!=null?a:i}}getTownRankingRows(e=this.currentTownRanking,t=7,i=!0){var l;const r=this.getDefaultTownRanking(),a=(l=e==null?void 0:e.rows)!=null&&l.length?e.rows:i?r.rows:[],o=this.getTownRankingMeta(e),s=a.map(u=>{const c=this.townMetaByName.get(g2(u.name));return c?tn(wt(wt({},c),u),{name:c.name,enName:c.enName,center:c.center,centroid:c.centroid,value:Jr(u.value),unit:u.unit||o.unit,metricTitle:o.title}):null}).filter(Boolean).sort((u,c)=>c.value-u.value).map((u,c)=>tn(wt({},u),{rank:c+1}));return Number.isFinite(t)?s.slice(0,t):s}getVillageRankingRows(e=this.currentTownRanking){const t=this.getTownRankingMeta(e);return((e==null?void 0:e.rows)||[]).map((i,r)=>{var u,c,d,h,f,p,m,v;const a=Jr((u=i.lng)!=null?u:i.longitude,NaN),o=Jr((c=i.lat)!=null?c:i.latitude,NaN);if(!Number.isFinite(a)||!Number.isFinite(o))return null;const s=Jr((d=i.displayValue)!=null?d:i.value),l=Jr((p=(f=(h=i.rawValue)!=null?h:i.earTagCount)!=null?f:i.ear_tag_count)!=null?p:i.value);return tn(wt({},i),{key:i.key||`${i.town||""}-${i.village||i.name||r}`,name:i.name||i.village||`村${r+1}`,town:i.town||"",lng:a,lat:o,value:s,rawValue:l,recordCount:Jr((m=i.recordCount)!=null?m:i.record_count,0),imageRate:Jr((v=i.imageRate)!=null?v:i.image_rate,0),unit:i.displayUnit||i.unit||t.unit,metricTitle:t.title,metricLabel:i.metricLabel||t.metricLabel||""})}).filter(Boolean).sort((i,r)=>r.rawValue-i.rawValue).map((i,r)=>tn(wt({},i),{rank:r+1}))}getVillageRankingHtml(e,t){const i=t.hideTownNames?"":`${Us(e.town||"红原县")}`;return e.displayMode==="park-village"||t.displayMode==="park-village"?`
    ${Us(e.name)} ${i}
    ${Us(e.metricLabel||t.metricLabel||"")} ${this.formatMapRankingValue(e.value)} ${Us(e.unit||t.unit||"")}
    `:`
    ${Us(e.name)} ${i}
    ${Us(e.metricLabel||"防疫")} ${this.formatMapRankingValue(e.value)} ${Us(e.unit||t.unit||"")}
    台账 ${this.formatMapCompactValue(e.recordCount)}条 耳标 ${this.formatMapCompactValue(e.rawValue)}头
    `}ensureVillageRankingGroup(){this.villageRankingGroup||(this.villageRankingGroup=new Nr,this.villageRankingGroup.rotation.x=-Math.PI/2,this.villageRankingGroup.visible=!1,this.scene.add(this.villageRankingGroup),this.villageRankingLabels=[])}hideVillageRankingLabels(){var e;this.villageRankingGroup&&(this.villageRankingGroup.visible=!1),(e=this.villageRankingLabels)==null||e.forEach(t=>{t.visible=!1})}hideAllMapStatisticLabels(){var e,t,i,r;this.updateTownNameLabelStats(null),this.setTownNameLabelsVisible(!1),this.hideVillageRankingLabels(),this.hideTradeFlowLayer(),this.clearInfoPointStats(),(e=this.allProvinceLabel)==null||e.forEach(a=>{a.visible=!1}),(t=this.allBar)==null||t.forEach(a=>{a.visible=!1,a.scale.set(1,1,0)}),(i=this.allBarMaterial)==null||i.forEach(a=>{a.opacity=0}),(r=this.allGuangquan)==null||r.forEach(a=>{a.visible=!1})}setTownNameLabelsVisible(e=!0){var t;(t=this.townNameLabels)==null||t.forEach(i=>{i.visible=e})}updateVillageRankingLabels(e=this.currentTownRanking){if(this.ensureVillageRankingGroup(),!QH(e)){this.hideVillageRankingLabels();return}const t=this.getVillageRankingRows(e),i=this.getTownRankingMeta(e);if(!t.length){this.hideVillageRankingLabels();return}this.villageRankingGroup.visible=this.mapAnimationComplete,t.forEach((r,a)=>{let o=this.villageRankingLabels[a];o||(o=this.label3d.create("","epidemic-village-label",!0),this.label3d.setLabelStyle(o,.0135,"x"),o.setParent(this.villageRankingGroup),this.villageRankingLabels.push(o));const[s,l]=this.geoProjection([r.lng,r.lat]),u=(a%3-1)*.06,c=Math.floor(a/3)%2*.04;o.init(this.getVillageRankingHtml(r,i),new Le(s+u,-l+c,this.depth+1.55+Math.min(a,6)*.015)),o.visible=!0,o.userData=wt({},r)}),this.villageRankingLabels.slice(t.length).forEach(r=>{r.visible=!1})}ensureTradeFlowGroup(){this.tradeFlowGroup||(this.tradeFlowGroup=new Nr,this.tradeFlowGroup.name="yak-trade-flow",this.tradeFlowGroup.visible=!1,this.tradeFlowMeshGroup=new Nr,this.tradeFlowMeshGroup.name="yak-trade-flow-mesh",this.tradeFlowMeshGroup.rotation.x=-Math.PI/2,this.tradeFlowLabelGroup=new Nr,this.tradeFlowLabelGroup.name="yak-trade-flow-label",this.tradeFlowLabelGroup.rotation.x=-Math.PI/2,this.tradeFlowGroup.add(this.tradeFlowMeshGroup,this.tradeFlowLabelGroup),this.scene.add(this.tradeFlowGroup))}hideTradeFlowLayer(){var e,t;this.tradeFlowGroup&&(this.tradeFlowGroup.visible=!1),(e=this.tradeFlowLabels)==null||e.forEach(i=>{i.visible=!1}),(t=this.tradeFlowPulseSprites)==null||t.forEach(i=>{i.visible=!1})}clearTradeFlowLayer(){this.tradeFlowMeshGroup&&(this.tradeFlowMeshGroup.children.forEach(e=>{var t;(t=e.traverse)==null||t.call(e,i=>this.disposeObject3D(i))}),this.tradeFlowMeshGroup.clear(),this.tradeFlowMaterials=[],this.tradeFlowPulseSprites=[])}getTradeFlowSource(e=this.currentTownRanking){var a,o,s,l;const t=(e==null?void 0:e.source)||{},i=Jr((a=t.lng)!=null?a:t.longitude,NaN),r=Jr((o=t.lat)!=null?o:t.latitude,NaN);return!Number.isFinite(i)||!Number.isFinite(r)?null:{name:t.name||"红原牦牛交易市场",lng:i,lat:r,total:Jr((l=(s=t.total)!=null?s:t.headCount)!=null?l:t.value,NaN)}}getTradeFlowRows(e=this.currentTownRanking){const t=this.getTownRankingMeta(e);return((e==null?void 0:e.rows)||[]).map((i,r)=>{var h,f,p,m,v,g;const a=Jr((h=i.lng)!=null?h:i.longitude,NaN),o=Jr((f=i.lat)!=null?f:i.latitude,NaN),s=Jr((v=(m=(p=i.headCount)!=null?p:i.head_count)!=null?m:i.rawValue)!=null?v:i.value),l=i.displayName||i.display_name||i.name,u=i.mapTownName||i.map_town_name||i.town||i.startTown||i.start_town||l,c=this.townMetaByName.get(g2(u)),d=Number.isFinite(a)&&Number.isFinite(o)?{lng:a,lat:o}:c!=null&&c.center?{lng:c.center[0],lat:c.center[1]}:null;return!d||!Number.isFinite(s)?null:tn(wt(wt({},i),c),{key:i.key||`${(c==null?void 0:c.name)||l||u||"trade-source"}-${r}`,name:l||u||(c==null?void 0:c.name)||`来源${r+1}`,townName:(c==null?void 0:c.name)||u,lng:d.lng,lat:d.lat,labelSide:i.labelSide||i.label_side||this.getTradeSourceLabelSide(c,r),value:s,headCount:s,recordCount:Jr((g=i.recordCount)!=null?g:i.record_count,0),unit:i.unit||t.unit||"头"})}).filter(Boolean).sort((i,r)=>r.value-i.value).map((i,r)=>tn(wt({},i),{rank:r+1}))}getTradeMarketHtml(e,t){const i=Number.isFinite(e.total)?e.total:t.reduce((r,a)=>r+Jr(a.value),0);return`
    ${Us(e.name)}
    ${this.formatMapIntegerValue(i)}
    `}getTradeFlowDisplayName(e=""){const t=String(e||"").replace(/^.*红原县/,"").replace(/\s+/g,"");return t.length>7?`${t.slice(0,7)}…`:t||"来源区域"}getTradeFlowLabelHtml(e){return`
    ${String(e.rank).padStart(2,"0")}${Us(this.getTradeFlowDisplayName(e.name))}
    ${this.formatMapIntegerValue(e.value)}${Us(e.unit||"头")}
    `}getTradeFlowLabelOffset(e,t){return{left:new Le(-.96,.14+t%2*.14,0),right:new Le(.92,.12-t%2*.12,0),top:new Le(-.34+t%2*.58,.58,0),bottom:new Le(-.32+t%2*.56,-.56,0),"top-left":new Le(-.9,.56,0),"top-right":new Le(.84,.56,0),"bottom-left":new Le(-.9,-.52,0),"bottom-right":new Le(.84,-.52,0)}[e.labelSide]||[new Le(-.96,.26,0),new Le(.92,.14,0),new Le(-.86,-.34,0),new Le(.86,-.32,0)][t%4]}getTradeSourceLabelSide(e,t=0){var a,o;const i=Number((a=e==null?void 0:e.center)==null?void 0:a[0]),r=Number((o=e==null?void 0:e.center)==null?void 0:o[1]);return Number.isFinite(i)&&ithis.geoProjectionCenter[0]+.22?t%2?"bottom-right":"right":Number.isFinite(r)&&r>this.geoProjectionCenter[1]+.24?t%2?"top-right":"top":Number.isFinite(r)&&r0&&(l.normalize().multiplyScalar((i%2===0?1:-1)*Math.min(.18,.05+s*.02)),o.add(l)),new TR([r,o,a])}tradeGeoProjection(e){return Ic().center(this.tradeGeoProjectionCenter).scale(this.tradeGeoProjectionScale).translate([0,0])(e)}setTradeNationalMapVisible(e){const t=!!e;if(!(!t&&!this.isTradeNationalMapActive&&!this.tradeNationalMapGroup&&!this.tradeFlowGroup)){if(t&&!this.createTradeNationalMap()){this.isTradeNationalMapActive=!1;return}this.isTradeNationalMapActive=t,this.tradeNationalMapGroup&&(this.tradeNationalMapGroup.visible=t&&this.mapAnimationComplete),this.tradeNationalLabelGroup&&(this.tradeNationalLabelGroup.visible=t&&this.mapAnimationComplete),this.mapGroup&&(this.mapGroup.visible=!t),this.labelGroup&&(this.labelGroup.visible=!t),this.flyLineGroup&&(this.flyLineGroup.visible=!t&&this.mapAnimationComplete),this.flyLineFocusGroup&&(this.flyLineFocusGroup.visible=!t&&this.mapAnimationComplete),this.scatterGroup&&(this.scatterGroup.visible=!t&&this.mapAnimationComplete),this.topicLayerMaterial&&t&&(this.topicLayerMaterial.opacity=0),t&&this.mapAnimationComplete?this.animateMapCamera(new Le(0,11.4,16.2),new Le(0,-.05,0),.65):!t&&this.mapAnimationComplete&&this.applyLayerMapView(this.currentTopicLayer,{force:!0})}}createTradeSourceMarker(e,t,i,r){const a=new Jn(t%3===1?16766828:t%3===2?2617536:3202303),o=this.getTradeFlowPoint(e,.72);if(r){const p=this.getLocalTradeFlowCurve(e,r,t),m=new Mr({color:a,transparent:!0,opacity:.42,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo}),v=.012+Math.min(.012,Jr(e.value)/Math.max(i,1)*.01),g=new fr(new u7(p,48,v,8,!1),m);g.renderOrder=31,this.tradeFlowMeshGroup.add(g),this.tradeFlowMaterials.push(m);const _=new T2({map:this.assets.instance.getResource("point"),color:a,transparent:!0,opacity:.92,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo}),S=new ug(_),x=.12+Math.min(.08,Jr(e.value)/Math.max(i,1)*.06);S.renderOrder=36,S.scale.set(x,x,x),S.userData={curve:p,phase:t*.13%1,speed:.16+Math.min(.16,Jr(e.value)/Math.max(i,1)*.12)},S.position.copy(p.getPointAt(S.userData.phase)),this.tradeFlowPulseSprites.push(S),this.tradeFlowMeshGroup.add(S)}const s=new T2({map:this.assets.instance.getResource("point"),color:a,transparent:!0,opacity:.95,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo}),l=new ug(s),u=.22+Math.min(.34,Jr(e.value)/Math.max(i,1)*.28);l.renderOrder=34,l.scale.set(u,u,u),l.position.copy(o),this.tradeFlowMeshGroup.add(l);const c=this.assets.instance.getResource("guangquan1"),d=new Mr({map:c,alphaMap:c,color:a,transparent:!0,opacity:.52,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo,side:aa}),h=.38+Math.min(.36,Jr(e.value)/Math.max(i,1)*.28),f=new fr(new Al(h,h),d);f.renderOrder=29,f.position.copy(this.getTradeFlowPoint(e,.5)),this.tradeFlowMeshGroup.add(f)}createTradeMarketMarker(e){const t=this.assets.instance.getResource("point"),i=this.assets.instance.getResource("guangquan1"),r=this.getTradeLocalPoint(e.lng,e.lat,.82),a=new T2({map:t,color:16773997,transparent:!0,opacity:1,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo}),o=new ug(a);o.renderOrder=35,o.scale.set(.34,.34,.34),o.position.copy(r),this.tradeFlowMeshGroup.add(o);const s=new Mr({map:i,alphaMap:i,color:16773997,transparent:!0,opacity:.72,depthWrite:!1,depthTest:!1,fog:!1,blending:Mo,side:aa}),l=new fr(new Al(.58,.58),s);l.renderOrder=29,l.position.copy(this.getTradeLocalPoint(e.lng,e.lat,.58)),this.tradeFlowMeshGroup.add(l)}disposeObject3D(e){var t,i,r,a;(i=(t=e.geometry)==null?void 0:t.dispose)==null||i.call(t),Array.isArray(e.material)?e.material.forEach(o=>{var s;return(s=o==null?void 0:o.dispose)==null?void 0:s.call(o)}):(a=(r=e.material)==null?void 0:r.dispose)==null||a.call(r)}updateTradeFlowPulses(e=.016){var t,i;!((t=this.tradeFlowGroup)!=null&&t.visible)||!((i=this.tradeFlowPulseSprites)!=null&&i.length)||this.tradeFlowPulseSprites.forEach(r=>{var s;const a=(s=r.userData)==null?void 0:s.curve;if(!a)return;const o=(Jr(r.userData.phase)+Jr(r.userData.speed,.16)*e)%1;r.userData.phase=o,r.position.copy(a.getPointAt(o))})}updateTradeFlowLayer(e=this.currentTownRanking){if(!eW(e)){this.hideTradeFlowLayer();return}this.ensureTradeFlowGroup();const t=this.getTradeFlowSource(e),i=this.getTradeFlowRows(e);if(!t||!i.length){this.clearTradeFlowLayer(),this.hideTradeFlowLayer();return}this.clearTradeFlowLayer(),this.tradeFlowGroup.visible=this.mapAnimationComplete,this.createTradeMarketMarker(t);const r=Math.max(...i.map(s=>s.value),1);i.forEach((s,l)=>{this.createTradeSourceMarker(s,l,r,t)});const a=i.length+1;for(let s=this.tradeFlowLabels.length;s{const u=this.tradeFlowLabels[l+1];u.element.className="trade-flow-label",u.init(this.getTradeFlowLabelHtml(s),this.getTradeFlowPoint(s,.92+Math.min(l,5)*.035).add(this.getTradeFlowLabelOffset(s,l))),u.visible=!0,u.userData=wt({},s)}),this.tradeFlowLabels.slice(a).forEach(s=>{s.visible=!1})}hasTownRankingRows(e=this.currentTownRanking){return this.getTownRankingRows(e,Number.POSITIVE_INFINITY,!1).length>0}formatMapRankingValue(e){const t=Jr(e);return Math.abs(t)>=100?String(Math.round(t)):Math.abs(t)>=10?String(Number(t.toFixed(1))):String(Number(t.toFixed(2)))}formatMapCompactValue(e){const t=Jr(e);return Math.abs(t)>=1e4?`${Number((t/1e4).toFixed(Math.abs(t)>=1e5?1:2))}万`:Math.abs(t)>=1e3?`${Number((t/1e3).toFixed(1))}千`:this.formatMapRankingValue(t)}formatMapIntegerValue(e){const t=Jr(e);return Math.round(t).toLocaleString("zh-CN")}getBarHeight(e,t){return t?Math.max(2.8*.12,2.8*(Jr(e)/t)):2.8*.25}createBarGeometry(e){const i=new em(.06999999999999999,.06999999999999999,e);return i.translate(0,0,e/2),i}getProvinceLabelHtml(e,t,i){return`
    ${i.title}
    ${this.formatMapRankingValue(e.value)}${e.unit||i.unit}
    ${e.name}
    ${t+1}
    `}updateBarItem(e,t,i,r,a=!0){var u,c;const o=this.getBarHeight(t.value,r),[s,l]=this.geoProjection(t.centroid);return e.visible=!0,(c=(u=e.geometry)==null?void 0:u.dispose)==null||c.call(u),e.geometry=this.createBarGeometry(o),e.position.set(s,-l,this.depth+.45),e.userData=tn(wt({},t),{targetValue:t.value,geoHeight:o}),e.children.forEach(d=>{var h,f,p,m;(f=(h=d.geometry)==null?void 0:h.dispose)==null||f.call(h),Array.isArray(d.material)?d.material.forEach(v=>{var g;return(g=v==null?void 0:v.dispose)==null?void 0:g.call(v)}):(m=(p=d.material)==null?void 0:p.dispose)==null||m.call(p)}),e.clear(),e.add(...this.createHUIGUANG(o,i>3?16776948:7863285)),a?ka.to(e.scale,{duration:.45,x:1,y:1,z:1,ease:"power2.out"}):this.mapAnimationComplete&&e.scale.set(1,1,1),{x:s,y:l,geoHeight:o}}updateProvinceLabel(e,t,i,r,a,o=!0){var p;const s=Jr((p=e.userData)==null?void 0:p.targetValue,t.value);e.visible=!0,e.userData=tn(wt({},t),{targetValue:t.value}),e.position.copy(r);const l=e.element.querySelector(".label-title"),u=e.element.querySelector(".number .value"),c=e.element.querySelector(".number .unit"),d=e.element.querySelector(".name"),h=e.element.querySelector(".no");!l||!u||!c||!d||!h?e.element.innerHTML=this.getProvinceLabelHtml(t,i,a):(l.innerText=a.title,u.dataset.targetValue=String(t.value),u.innerText=this.formatMapRankingValue(t.value),c.innerText=t.unit||a.unit,d.innerText=t.name,h.innerText=i+1);const f=e.element.querySelector(".provinces-label-wrap");if(this.mapAnimationComplete&&(f.style.opacity="1",f.style.transform="translate(50%, 0)"),o&&this.mapAnimationComplete){const m=e.element.querySelector(".number .value"),g={value:s};ka.to(g,{value:t.value,duration:.45,ease:"power2.out",onUpdate:()=>{m.innerText=this.formatMapRankingValue(g.value)},onComplete:()=>{m.dataset.previousValue=String(t.value),m.innerText=this.formatMapRankingValue(t.value)}})}}clearTownNameLabelStat(e){const t=e.element.querySelector(".town-stat-label"),i=e.element.querySelector(".town-stat-value"),r=e.element.querySelector(".town-stat-unit"),a=e.element.querySelector(".town-rank"),o=e.element.querySelector(".town-stat-metric");t==null||t.classList.remove("has-stat"),i&&(i.innerText=""),r&&(r.innerText=""),a&&(a.innerText=""),o&&(o.innerText="")}updateTownNameLabelStats(e=this.currentTownRanking){var a;if(!((a=this.townNameLabels)!=null&&a.length))return;const t=this.getTownRankingRows(e,Number.POSITIVE_INFINITY,!1),i=this.getTownRankingMeta(e),r=new Map(t.map(o=>[g2(o.name),o]));this.townNameLabels.forEach(o=>{var m,v;const s=((m=o.userData)==null?void 0:m.townName)||((v=o.userData)==null?void 0:v.name),l=r.get(g2(s));if(!l){this.clearTownNameLabelStat(o);return}const u=o.element.querySelector(".town-stat-label"),c=o.element.querySelector(".town-name"),d=o.element.querySelector(".town-stat-value"),h=o.element.querySelector(".town-stat-unit"),f=o.element.querySelector(".town-rank"),p=o.element.querySelector(".town-stat-metric");u==null||u.classList.add("has-stat"),c&&(c.innerText=s),p&&(p.innerText=l.metricLabel||i.metricLabel||""),d&&(d.innerText=this.formatMapRankingValue(l.value)),h&&(h.innerText=l.unit||i.unit||""),f&&(f.innerText=l.rank?`第${l.rank}名`:""),o.userData=tn(wt(wt({},o.userData),l),{townName:s,targetValue:l.value})})}getInfoPointHtml(e,t=this.getTownRankingMeta()){const i=String(e.metricLabel||t.metricLabel||t.title||"统计指标").replace(/排行$/,""),r=Number(e.rank),a=Number.isFinite(r)?String(r).padStart(2,"0"):"--";return`
    ${a} ${Us(e.name||"红原县")}
    ${Us(i)}
    ${this.formatMapRankingValue(e.value)} ${Us(e.unit||t.unit||"")}
    `}updateInfoPointStats(){var o,s;if(!((o=this.infoPointSprites)!=null&&o.length)||!((s=this.infoLabelElement)!=null&&s.length))return;if(!this.showTownRankingPointMarkers){this.clearInfoPointStats();return}const e=this.getTownRankingRows(this.currentTownRanking,Number.POSITIVE_INFINITY,!1);if(!e.length){this.clearInfoPointStats();return}const t=this.getTownRankingMeta(),i=e.slice(0,this.infoPointSprites.length),r=Math.max(...i.map(l=>l.value),1);this.infoPointSprites.forEach((l,u)=>{const c=i[u],d=this.infoLabelElement[u];if(!c){l.visible=!1,l.scale.set(0,0,0),d&&(d.visible=!1);return}const[h,f]=this.geoProjection(c.centroid||c.center),p=[h,-f,this.depth+.72];l.userData=tn(wt(wt({},l.userData),c),{position:p,value:c.value,unit:c.unit||t.unit,rank:c.rank,metricTitle:t.title,index:u}),l.position.set(...p),l.visible=this.showTownRankingPointMarkers;const m=.78+c.value/r*.44;if(l.scale.set(m,m,m),d){const v=(u%2===0?.22:-.18)+(u===0?.12:0),g=u%3===0?.08:-.04;d.position.set(h+v,-f+g,this.depth+1.88+Math.min(u,4)*.03),d.userData=tn(wt({},c),{index:u}),d.element.innerHTML=this.getInfoPointHtml(c,t)}});const a=this.infoLabelElement[this.infoPointIndex];a&&this.showTownRankingPointMarkers&&this.mapAnimationComplete&&(a.visible=!0),this.showTownRankingPointMarkers&&this.mapAnimationComplete&&!this.infoPointLabelTime&&this.createInfoPointLabelLoop()}clearInfoPointStats(){var e,t;clearInterval(this.infoPointLabelTime),this.infoPointLabelTime=null,this.infoPointIndex=0,this.InfoPointGroup&&(this.InfoPointGroup.visible=!1),(e=this.infoLabelElement)==null||e.forEach(i=>{i.visible=!1}),(t=this.infoPointSprites)==null||t.forEach(i=>{i.visible=!1,i.scale.set(0,0,0)})}createBar(){const e=this.getTownRankingRows();this.getTownRankingMeta();const t=new Nr;this.barGroup=t;const i=Math.max(...e.map(r=>r.value),1);this.allBar=[],this.allBarMaterial=[],this.allGuangquan=[],this.allProvinceLabel=[],e.map((r,a)=>{const o=this.getBarHeight(r.value,i),s=new Mr({color:16777215,transparent:!0,opacity:0,depthTest:!1,fog:!1});new L4(s,{uColor1:a>3?16506760:5291006,uColor2:a>3?16776948:7863285,size:o,dir:"y"});const l=new fr(this.createBarGeometry(o),s);l.renderOrder=5;const[u,c]=this.geoProjection(r.centroid);l.position.set(u,-c,this.depth+.45),l.scale.set(1,1,0),l.userData=tn(wt({},r),{targetValue:r.value,geoHeight:o});const d=this.createQuan(new Le(u,this.depth+.44,c),a);l.add(...this.createHUIGUANG(o,a>3?16776948:7863285)),t.add(l),t.rotation.x=-Math.PI/2,this.allBar.push(l),this.allBarMaterial.push(s),this.allGuangquan.push(d)}),this.scene.add(t),this.updateTownNameLabelStats(this.currentTownRanking)}setTownRanking(e){var a,o,s,l,u,c,d,h,f,p,m,v,g,_,S,x;this.currentTownRanking=e;const t=this.getTownRankingMeta(e);if(this.showTownRankingBars=!!t.showBars,this.showTownRankingPointMarkers=!!t.showPointMarkers,t.hideMapLabels){this.hideAllMapStatisticLabels(),this.mapGroup&&(this.mapGroup.visible=!0),this.labelGroup&&(this.labelGroup.visible=!0),this.flyLineGroup&&(this.flyLineGroup.visible=this.mapAnimationComplete),this.flyLineFocusGroup&&(this.flyLineFocusGroup.visible=this.mapAnimationComplete),this.scatterGroup&&(this.scatterGroup.visible=this.mapAnimationComplete);return}if(eW(e)){this.setTradeNationalMapVisible(!1),this.updateTownNameLabelStats(null),this.setTownNameLabelsVisible(!1),this.hideVillageRankingLabels(),this.clearInfoPointStats(),this.mapGroup&&(this.mapGroup.visible=!0),this.labelGroup&&(this.labelGroup.visible=!1),this.flyLineGroup&&(this.flyLineGroup.visible=!1),this.flyLineFocusGroup&&(this.flyLineFocusGroup.visible=!1),this.scatterGroup&&(this.scatterGroup.visible=!1),(a=this.allBar)!=null&&a.length&&(this.allBar.forEach(A=>{A.visible=!1,A.scale.set(1,1,0)}),(o=this.allBarMaterial)==null||o.forEach(A=>{A.opacity=0}),(s=this.allProvinceLabel)==null||s.forEach(A=>{A.visible=!1}),(l=this.allGuangquan)==null||l.forEach(A=>{A.visible=!1})),this.updateTradeFlowLayer(e);return}if(this.setTradeNationalMapVisible(!1),this.hideTradeFlowLayer(),this.mapGroup&&(this.mapGroup.visible=!0),this.labelGroup&&(this.labelGroup.visible=!0),this.flyLineGroup&&(this.flyLineGroup.visible=this.mapAnimationComplete),this.flyLineFocusGroup&&(this.flyLineFocusGroup.visible=this.mapAnimationComplete),this.scatterGroup&&(this.scatterGroup.visible=this.mapAnimationComplete),QH(e)){this.updateTownNameLabelStats(null),this.setTownNameLabelsVisible(!tW(e)),this.clearInfoPointStats(),this.updateVillageRankingLabels(e),(u=this.allBar)!=null&&u.length&&(this.allBar.forEach(A=>{A.visible=!1,A.scale.set(1,1,0)}),(c=this.allBarMaterial)==null||c.forEach(A=>{A.opacity=0}),(d=this.allProvinceLabel)==null||d.forEach(A=>{A.visible=!1}),(h=this.allGuangquan)==null||h.forEach(A=>{A.visible=!1}));return}if(this.setTownNameLabelsVisible(!t.calloutMode&&!t.hideTownNames),this.hideVillageRankingLabels(),t.calloutMode?this.updateTownNameLabelStats(null):this.updateTownNameLabelStats(e),!((f=this.allBar)!=null&&f.length))return;if(!this.showTownRankingBars){this.allBar.forEach(A=>{A.visible=!1,A.scale.set(1,1,0)}),(p=this.allBarMaterial)==null||p.forEach(A=>{A.opacity=0}),(m=this.allProvinceLabel)==null||m.forEach(A=>{A.visible=!1}),(v=this.allGuangquan)==null||v.forEach(A=>{A.visible=!1}),this.showTownRankingPointMarkers?(this.InfoPointGroup&&(this.InfoPointGroup.visible=this.mapAnimationComplete&&this.hasTownRankingRows(e)),this.updateInfoPointStats()):this.clearInfoPointStats();return}const i=this.getTownRankingRows(e,7,!1);if(!i.length){this.allBar.forEach(A=>{A.visible=!1,A.scale.set(1,1,0)}),(g=this.allProvinceLabel)==null||g.forEach(A=>{A.visible=!1}),(_=this.allGuangquan)==null||_.forEach(A=>{A.visible=!1}),this.clearInfoPointStats();return}this.InfoPointGroup&&(this.InfoPointGroup.visible=this.showTownRankingPointMarkers&&this.mapAnimationComplete),(S=this.infoPointSprites)==null||S.forEach(A=>{A.visible=this.showTownRankingPointMarkers});const r=Math.max(...i.map(A=>A.value),1);this.allBar.forEach((A,C)=>{const M=C{A.visible=!1}),this.allGuangquan.forEach((A,C)=>{A.visible=C{const M=this.allBar[C],I=this.allGuangquan[C];if(!M)return;const{x:D,y:E}=this.updateBarItem(M,A,C,r,this.mapAnimationComplete);I&&(I.visible=!0,I.position.set(0,0,0),I.children.forEach(P=>{P.position.set(D,this.depth+.44,E),this.mapAnimationComplete&&P.scale.set(1,1,1)}))}),this.updateInfoPointStats()}createEvent(){let e=[];const t=r=>{r.traverse(a=>{a.isMesh&&(a.material=this.defaultMaterial)})},i=r=>{r.traverse(a=>{a.isMesh&&(a.material=this.defaultLightMaterial)})};this.eventElement.map(r=>{this.interactionManager.add(r),r.addEventListener("mousedown",a=>{this.handleMapClick(a)}),r.addEventListener("mouseover",a=>{e.includes(a.target.parent)||e.push(a.target.parent),document.body.style.cursor="pointer",i(a.target.parent)}),r.addEventListener("mouseout",a=>{e=e.filter(o=>o.userData.name!==a.target.parent.userData.name),e.length>0&&e[e.length-1],t(a.target.parent),document.body.style.cursor="default"})})}createHUIGUANG(e,t){let i=new Al(.35,e);i.translate(0,e/2,0);const r=this.assets.instance.getResource("huiguang");r.colorSpace=$r,r.wrapS=Eo,r.wrapT=Eo;let a=new Mr({color:t,map:r,transparent:!0,opacity:.4,depthWrite:!1,side:aa,blending:Mo}),o=new fr(i,a);o.renderOrder=10,o.rotateX(Math.PI/2);let s=o.clone(),l=o.clone();return s.rotateY(Math.PI/180*60),l.rotateY(Math.PI/180*120),[o,s,l]}createQuan(e,t){const i=this.assets.instance.getResource("guangquan1"),r=this.assets.instance.getResource("guangquan2");let a=new Al(.5,.5),o=new Mr({color:16777215,map:i,alphaMap:i,opacity:1,transparent:!0,depthTest:!1,fog:!1,blending:Mo}),s=new Mr({color:16777215,map:r,alphaMap:r,opacity:1,transparent:!0,depthTest:!1,fog:!1,blending:Mo}),l=new fr(a,o),u=new fr(a,s);return l.renderOrder=6,u.renderOrder=6,l.rotateX(-Math.PI/2),u.rotateX(-Math.PI/2),l.position.copy(e),u.position.copy(e),u.position.y-=.001,l.scale.set(0,0,0),u.scale.set(0,0,0),this.quanGroup=new Nr,this.quanGroup.add(l,u),this.scene.add(this.quanGroup),this.time.on("tick",()=>{l.rotation.z+=.05}),this.quanGroup}createDiffuse(){let e=new Al(200,200),t=new Mr({color:0,depthWrite:!1,transparent:!0,blending:SQ});t.blendEquation=Xd,t.blendSrc=xQ,t.blendDst=bQ,new BFe({material:t,time:this.time,size:60,diffuseSpeed:8,diffuseColor:7442830,diffuseWidth:2,callback:r=>{setTimeout(()=>{ka.to(r.uniforms.uTime,{value:4,repeat:-1,duration:6,ease:"power1.easeIn"})},3)}});let i=new fr(e,t);i.renderOrder=3,i.rotation.x=-Math.PI/2,i.position.set(0,.21,0),this.scene.add(i)}createGrid(){new zFe(this,{gridSize:54,gridDivision:24,gridColor:1990543,shapeSize:.55,shapeColor:3309487,pointSize:.085,pointColor:1993891,pointBlending:Mo})}createBottomBg(){let e=new Al(24,24);const t=this.assets.instance.getResource("ocean");t.colorSpace=$r,t.wrapS=Eo,t.wrapT=Eo,t.repeat.set(1,1);let i=new Mr({map:t,opacity:.92,fog:!1}),r=new fr(e,i);r.rotation.x=-Math.PI/2,r.position.set(0,-.7,0),this.scene.add(r)}createChinaBlurLine(){let e=new Al(154,154);const t=this.assets.instance.getResource("chinaBlurLine");t.colorSpace=$r,t.wrapS=Eo,t.wrapT=Eo,t.generateMipmaps=!1,t.minFilter=mo,t.repeat.set(1,1);let i=new Mr({color:4162253,alphaMap:t,transparent:!0,opacity:.62}),r=new fr(e,i);r.rotateX(-Math.PI/2),r.position.set(-19.3,-.5,-19.7),this.scene.add(r)}createLabel(){let e=this,t=this.labelGroup,i=this.label3d,r=[],a=[];KFe.map(u=>{if(u.hide==!0)return!1;let c=s(u,i,t);r.push(c),a.push(c)});let o=l(wt({},this.mapFocusLabelInfo),i,t);r.push(o),this.otherLabel=r,this.townNameLabels=a;function s(u,c,d){let h=c.create("",`china-label ${u.blur?" blur":""}`,!0);const[f,p]=e.geoProjection(u.center);return h.init(`
    ${u.name}
    `,new Le(f,-p,e.depth+.85)),c.setLabelStyle(h,.018,"x"),h.setParent(d),h.userData=tn(wt({},u),{townName:u.name}),h}function l(u,c,d){let h=c.create("","map-label",!0);const[f,p]=e.geoProjection(u.center);return h.init(`
    ${u.name}${u.enName}
    `,new Le(f,-p,.4)),c.setLabelStyle(h,.015,"x"),h.setParent(d),h}}createRotateBorder(){let e=13.2,t=this.assets.instance.getResource("rotationBorder1"),i=this.assets.instance.getResource("rotationBorder2"),r=new DH(this,{width:e*1.178,needRotate:!0,rotateSpeed:.001,material:new Mr({map:t,color:4763647,transparent:!0,opacity:.26,side:aa,depthWrite:!1,blending:Mo}),position:new Le(0,.31,0)});r.instance.rotation.x=-Math.PI/2,r.instance.renderOrder=6,r.instance.scale.set(0,0,0),r.setParent(this.scene);let a=new DH(this,{width:e*1.116,needRotate:!0,rotateSpeed:-.004,material:new Mr({map:i,color:4763647,transparent:!0,opacity:.5,side:aa,depthWrite:!1,blending:Mo}),position:new Le(0,.33,0)});a.instance.rotation.x=-Math.PI/2,a.instance.renderOrder=6,a.instance.scale.set(0,0,0),a.setParent(this.scene),this.rotateBorder1=r.instance,this.rotateBorder2=a.instance}createFlyLine(){this.flyLineGroup=new Nr,this.flyLineGroup.visible=!1,this.scene.add(this.flyLineGroup)}createFocus(){this.flyLineFocusGroup.clear()}createParticles(){this.particles=new q8(this,{num:10,range:30,dir:"up",speed:.05,material:new k3({map:q8.createTexture(),size:1,color:61166,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1,vertexColors:!0,blending:Mo,sizeAttenuation:!0})}),this.particleGroup=new Nr,this.scene.add(this.particleGroup),this.particleGroup.rotation.x=-Math.PI/2,this.particles.setParent(this.particleGroup),this.particles.enable=!0,this.particleGroup.visible=!0}createScatter(){this.scatterGroup=new Nr,this.scatterGroup.visible=!1,this.scatterGroup.rotation.x=-Math.PI/2,this.scene.add(this.scatterGroup);const e=this.assets.instance.getResource("arrow"),t=new T2({map:e,color:16776948,fog:!1,transparent:!0,depthTest:!1});let i=JH(ZFe),r=i[0].value;i.map(a=>{const o=new ug(t);o.renderOrder=23;let s=.1+a.value/r*.2;o.scale.set(s,s,s);let[l,u]=this.geoProjection([a.lng,a.lat]);o.position.set(l,-u,this.depth+.45),o.userData.position=[l,-u,this.depth+.45],this.scatterGroup.add(o)})}createInfoPoint(){let e=this;this.InfoPointGroup=new Nr,this.scene.add(this.InfoPointGroup),this.InfoPointGroup.visible=!1,this.InfoPointGroup.rotation.x=-Math.PI/2,this.infoPointIndex=0,this.infoPointLabelTime=null,this.infoLabelElement=[],this.infoPointSprites=[];let t=this.label3d;const i=this.assets.instance.getResource("point");let r=[16776948,7863285],a=JH(JFe),o=a[0].value;a.map((l,u)=>{const c=new T2({map:i,color:r[u%r.length],fog:!1,transparent:!0,depthTest:!1}),d=new ug(c);d.renderOrder=23;let h=.7+l.value/o*.4;d.scale.set(h,h,h);let[f,p]=this.geoProjection([l.lng,l.lat]),m=[f,-p,this.depth+.7];d.position.set(...m),d.userData.position=[...m],d.userData={position:[f,-p,this.depth+.7],name:l.name,value:l.value,level:l.level,index:u},this.InfoPointGroup.add(d);let v=s(l,t,this.InfoPointGroup,u);this.infoLabelElement.push(v),this.infoPointSprites.push(d),this.interactionManager.add(d),d.addEventListener("mousedown",g=>{if(this.clicked||!this.InfoPointGroup.visible)return!1;this.clicked=!0,this.infoPointIndex=g.target.userData.index,this.infoLabelElement.map(_=>{_.visible=!1}),v.visible=!0,this.createInfoPointLabelLoop()}),d.addEventListener("mouseup",g=>{this.clicked=!1}),d.addEventListener("mouseover",g=>{document.body.style.cursor="pointer"}),d.addEventListener("mouseout",g=>{document.body.style.cursor="default"})});function s(l,u,c,d){let h=u.create("","info-point",!0);const[f,p]=e.geoProjection([l.lng,l.lat]);return h.init(e.getInfoPointHtml(tn(wt({},l),{value:0,rank:d+1,unit:""}),e.getTownRankingMeta()),new Le(f,-p,e.depth+1.9)),u.setLabelStyle(h,.015,"x"),h.setParent(c),h.visible=!1,h}}createInfoPointLabelLoop(){clearInterval(this.infoPointLabelTime),this.infoPointLabelTime=setInterval(()=>{this.infoPointIndex++,this.infoPointIndex>=this.infoLabelElement.length&&(this.infoPointIndex=0),this.infoLabelElement.map((e,t)=>{this.infoPointIndex===t?e.visible=!0:e.visible=!1})},3e3)}createStorke(){const e=this.assets.instance.getResource("mapStroke"),t=this.assets.instance.getResource("pathLine3");t.wrapS=t.wrapT=Eo,t.repeat.set(2,1);let i=new R4(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new Le(0,0,this.depth+.24),data:e,material:new Mr({color:2868444,map:t,alphaMap:t,fog:!1,transparent:!0,opacity:1,blending:Mo}),type:"Line3",renderOrder:22,tubeRadius:.03});this.focusMapGroup.add(i.lineGroup),this.time.on("tick",()=>{t.offset.x+=.005})}handleMapClick(e){return rn(this,null,function*(){var a,o,s,l,u,c,d,h,f,p,m,v,g,_,S,x,A,C,M,I,D,E,P,F,V,G,W,Y,Q,K,ae,ie,he,Ee,He,xe,Fe,pt,Ot;if(!this.currentTopicLayer)return;const t=this.getScreenPointFromEvent(e),i=this.getLngLatFromEvent(e);if(!i){this.clearSelectedFeature(),(o=(a=this.callbacks).onFeatureInfo)==null||o.call(a,{feature:null});return}if(this.boundaryDrawingEnabled){const bt=((s=e==null?void 0:e.data)==null?void 0:s.originalEvent)||(e==null?void 0:e.originalEvent)||e;if(bt!=null&&bt.__analysisBoundaryHandled)return;this.addBoundaryDrawPoint(i);return}if(this.shouldClipLayerToHongyuanBoundary(this.currentTopicLayer)&&!this.isLngLatInHongyuanBoundary(i)){this.clearSelectedFeature(),(u=(l=this.callbacks).onFeatureInfo)==null||u.call(l,{feature:null}),(d=(c=this.callbacks).onLayerStatus)==null||d.call(c,{type:"success",text:"当前点击位置不在红原县边界内"});return}if(this.shouldClipLayerToLayerBounds(this.currentTopicLayer)&&!this.isLngLatInLayerClipBounds(i,this.currentTopicLayer)){this.clearSelectedFeature(),(f=(h=this.callbacks).onFeatureInfo)==null||f.call(h,{feature:null}),(m=(p=this.callbacks).onLayerStatus)==null||m.call(p,{type:"success",text:"当前点击位置不在图层显示范围内"});return}if(D4(this.currentTopicLayer)){const bt=this.pickVectorFeatureAtPoint(i,t),ht=(bt==null?void 0:bt.feature)||bt;let Kt=(bt==null?void 0:bt.screen)||t;ht?(this.shouldClipLayerToHongyuanBoundary(this.currentTopicLayer)?(this.clearSelectedGeometryGroup(),this.setSelectedVectorFeatures([ht])):this.showSelectedFeature(ht),((v=this.currentTopicLayer)==null?void 0:v.key)==="yak-industry-points"&&(this.setSelectedVectorFeatures([ht]),Kt=this.getPointFeatureScreenPoint(ht)||Kt),(A=(x=this.callbacks).onFeatureInfo)==null||A.call(x,{feature:{id:((g=ht.properties)==null?void 0:g.id)||((_=ht.properties)==null?void 0:_.feature_id)||((S=ht.properties)==null?void 0:S.project_name),properties:ht.properties||{},feature:ht,layer:this.currentTopicLayer,lngLat:i},screen:Kt}),(M=(C=this.callbacks).onLayerStatus)==null||M.call(C,{type:"success",text:"真实矢量要素已选中"})):(this.clearSelectedFeature(),(D=(I=this.callbacks).onFeatureInfo)==null||D.call(I,{feature:null}),(P=(E=this.callbacks).onLayerStatus)==null||P.call(E,{type:"success",text:"当前点击位置无生态保护要素"}));return}const r=this.lngLatToWmsPixel(i);(V=(F=this.callbacks).onFeatureInfo)==null||V.call(F,{feature:null}),(W=(G=this.callbacks).onFeatureLoading)==null||W.call(G,!0);try{const bt=yield KH(this.currentTopicLayer,r,{size:qd,buffer:10}),ht=ZH(bt),Kt=ht?null:yield this.queryFallbackFeatureInfo(i),Tt=ht||(Kt==null?void 0:Kt.feature);if(Tt){const Ae=yield this.enrichFeatureInfo(Tt,r,i);this.showSelectedFeature(Ae.feature||Ae),(Q=(Y=this.callbacks).onFeatureInfo)==null||Q.call(Y,{feature:tn(wt({},Ae),{layer:(Kt==null?void 0:Kt.layer)||this.currentTopicLayer,lngLat:i}),screen:t})}else this.clearSelectedFeature(),(ae=(K=this.callbacks).onFeatureInfo)==null||ae.call(K,{feature:null});Tt||(he=(ie=this.callbacks).onLayerStatus)==null||he.call(ie,{type:"success",text:"当前点击位置无图斑"})}catch(bt){this.clearSelectedFeature(),(He=(Ee=this.callbacks).onFeatureInfo)==null||He.call(Ee,{feature:null}),(Fe=(xe=this.callbacks).onLayerStatus)==null||Fe.call(xe,{type:"error",text:"图斑信息查询失败"})}finally{(Ot=(pt=this.callbacks).onFeatureLoading)==null||Ot.call(pt,!1)}})}handleCanvasBoundaryPointerDown(e){var i,r;if(!this.boundaryDrawingEnabled)return;const t=this.getLngLatFromCanvasEvent(e);t&&this.addBoundaryDrawPoint(t)&&(e.__analysisBoundaryHandled=!0),(i=e.preventDefault)==null||i.call(e),(r=e.stopPropagation)==null||r.call(e)}handleCanvasBoundaryDoubleClick(e){var i,r;if(!this.boundaryDrawingEnabled)return;const t=this.getLngLatFromCanvasEvent(e);(this.boundaryDrawPoints||[]).length<3&&t&&this.addBoundaryDrawPoint(t),(this.boundaryDrawPoints||[]).length>=3&&(this.finishBoundaryDrawing(),e.__analysisBoundaryHandled=!0),(i=e.preventDefault)==null||i.call(e),(r=e.stopPropagation)==null||r.call(e)}getLngLatFromCanvasEvent(e){var h,f,p;if(!((h=this.camera)!=null&&h.instance)||!this.focusMapGroup||!this.canvas)return null;const t=this.canvas.getBoundingClientRect();if(!t.width||!t.height)return null;const i=(f=this.interactionManager)==null?void 0:f.raycaster;if(!(i!=null&&i.setFromCamera))return null;const r={x:(e.clientX-t.left)/t.width*2-1,y:-((e.clientY-t.top)/t.height)*2+1};i.setFromCamera(r,this.camera.instance);const o=((p=i.intersectObjects(this.eventElement||[],!0)[0])==null?void 0:p.point)||this.getRayMapPlaneIntersection(i.ray);if(!o)return null;const s=this.focusMapGroup.worldToLocal(o.clone()),u=Ic().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0]).invert([s.x,-s.y]);if(!u)return null;const c=Number(u[0]),d=Number(u[1]);return!Number.isFinite(c)||!Number.isFinite(d)?null:clr.east+.03||dlr.north+.03?this.getFallbackLngLatFromPointer(e,t):{lng:c,lat:d}}getFallbackLngLatFromPointer(e,t=(r=>(r=(i=>(i=this.canvas)==null?void 0:i.getBoundingClientRect)())==null?void 0:r.call(i))()){if(!(t!=null&&t.width)||!(t!=null&&t.height))return null;const a=Math.min(1,Math.max(0,(e.clientX-t.left)/t.width)),o=Math.min(1,Math.max(0,(e.clientY-t.top)/t.height)),s=lr.west+(lr.east-lr.west)*a,l=lr.north-(lr.north-lr.south)*o;return{lng:s,lat:l}}getRayMapPlaneIntersection(e){if(!(e!=null&&e.origin)||!(e!=null&&e.direction)||!this.focusMapGroup)return null;const t=this.focusMapGroup.worldToLocal(e.origin.clone()),r=this.focusMapGroup.worldToLocal(e.origin.clone().add(e.direction.clone())).sub(t),a=this.depth+.22;if(Math.abs(r.z)<1e-8)return null;const o=(a-t.z)/r.z;if(!Number.isFinite(o)||o<0)return null;const s=t.add(r.multiplyScalar(o));return this.focusMapGroup.localToWorld(s)}enrichFeatureInfo(e,t,i){return rn(this,null,function*(){const r=this.getLayerTopicKey(this.currentTopicLayer);if(!["grassland","woodland"].includes(r))return e;const o=(_5[r]||[]).find(d=>d.key===`${r}-distribution`),s=(this.visibleTopicLayers||[]).filter(d=>this.getLayerTopicKey(d)===r).slice(0,5),l=[o,this.currentTopicLayer,...s].filter(d=>d==null?void 0:d.layerName).filter((d,h,f)=>f.findIndex(p=>this.getLayerQueryKey(p)===this.getLayerQueryKey(d))===h);if(!l.length)return e;const u=yield Promise.allSettled([...l.filter(d=>this.getLayerQueryKey(d)!==this.getLayerQueryKey(this.currentTopicLayer)).map(d=>rn(this,null,function*(){const h=yield KH(d,t,{size:qd,buffer:10}),f=ZH(h);return f?{layer:d,feature:f,source:"wms"}:null})),...l.map(d=>rn(this,null,function*(){const h=yield this.queryLayerFeatureByPoint(d,i);return h?{layer:d,feature:h,source:"wfs"}:null}))]),c=wt({},e.properties||{});return u.forEach(d=>{var h,f;d.status!=="fulfilled"||!((f=(h=d.value)==null?void 0:h.feature)!=null&&f.properties)||this.mergeBusinessProperties(c,d.value.feature.properties,d.value.layer)}),tn(wt({},e),{properties:c,relatedFeatures:u.filter(d=>{var h;return d.status==="fulfilled"&&((h=d.value)==null?void 0:h.feature)}).map(d=>d.value),feature:tn(wt({},e.feature||{}),{properties:c})})})}queryFallbackFeatureInfo(e){return rn(this,null,function*(){const t=this.getLayerTopicKey(this.currentTopicLayer);if(!["grassland","woodland"].includes(t))return null;const r=[(_5[t]||[]).find(a=>a.key===`${t}-distribution`),this.currentTopicLayer,...(this.visibleTopicLayers||[]).filter(a=>this.getLayerTopicKey(a)===t)].filter((a,o,s)=>(a==null?void 0:a.layerName)&&s.findIndex(l=>this.getLayerQueryKey(l)===this.getLayerQueryKey(a))===o);for(const a of r){const o=yield this.queryLayerFeatureByPoint(a,e,{requireContainment:!0});if(o)return{layer:a,feature:o}}return null})}queryLayerFeatureByPoint(r,a){return rn(this,arguments,function*(e,t,i={}){var p,m,v;if(!(e!=null&&e.layerName)||!Number.isFinite(t==null?void 0:t.lng)||!Number.isFinite(t==null?void 0:t.lat))return null;const o=e.pointQueryTolerance||.0015,s=e.geometryField||"geom",l=t.lng-o,u=t.lat-o,c=t.lng+o,d=t.lat+o,h=yield s3(e.layerName,{cqlFilter:`BBOX(${s},${l},${u},${c},${d})`,maxFeatures:8,timeout:12e3}),f=this.pickFeatureAtPoint((h==null?void 0:h.features)||[],t,i);return f?{id:f.id||((p=f.properties)==null?void 0:p.gid)||((m=f.properties)==null?void 0:m.objectid)||((v=f.properties)==null?void 0:v.OBJECTID),properties:f.properties||{},feature:f}:null})}pickFeatureAtPoint(e,t,i={}){var a;if(!Array.isArray(e)||!e.length)return null;const r=e.filter(o=>this.isLngLatInGeometry(t,o.geometry)).sort((o,s)=>this.getGeometryAreaScore(o.geometry)-this.getGeometryAreaScore(s.geometry));return r.length?r[0]:i.requireContainment?null:((a=e.map(o=>({feature:o,distance:this.getGeometryDistanceScore(o.geometry,t)})).sort((o,s)=>o.distance-s.distance)[0])==null?void 0:a.feature)||null}isLngLatInGeometry(e,t){return!e||!(t!=null&&t.coordinates)?!1:t.type==="Polygon"?this.isLngLatInPolygon(e,t.coordinates):t.type==="MultiPolygon"?t.coordinates.some(i=>this.isLngLatInPolygon(e,i)):!1}isLngLatInPolygon(e,t=[]){return!t.length||!this.isLngLatInRing(e,t[0])?!1:!t.slice(1).some(r=>this.isLngLatInRing(e,r))}isLngLatInRing(e,t=[]){if(t.length<3)return!1;let i=!1;const r=e.lng,a=e.lat;for(let o=0,s=t.length-1;oa!=f>a&&r<(h-c)*(a-d)/(f-d)+c&&(i=!i)}return i}isPointOnSegment(e,t,i,r,a,o){const s=(e-i)*(o-r)-(t-r)*(a-i);return Math.abs(s)>1e-10?!1:(e-i)*(e-a)+(t-r)*(t-o)<=1e-10}getGeometryAreaScore(e){return e!=null&&e.coordinates?e.type==="Polygon"?this.getLngLatPolygonAreaScore(e.coordinates):e.type==="MultiPolygon"?e.coordinates.reduce((t,i)=>t+this.getLngLatPolygonAreaScore(i),0):Number.POSITIVE_INFINITY:Number.POSITIVE_INFINITY}getLngLatPolygonAreaScore(e=[]){const t=e[0]||[];if(t.length<3)return Number.POSITIVE_INFINITY;let i=0;for(let r=0;r({minLng:Math.min(i.minLng,Number((r==null?void 0:r[0])||0)),minLat:Math.min(i.minLat,Number((r==null?void 0:r[1])||0)),maxLng:Math.max(i.maxLng,Number((r==null?void 0:r[0])||0)),maxLat:Math.max(i.maxLat,Number((r==null?void 0:r[1])||0))}),{minLng:Number.POSITIVE_INFINITY,minLat:Number.POSITIVE_INFINITY,maxLng:Number.NEGATIVE_INFINITY,maxLat:Number.NEGATIVE_INFINITY}):null}getGeometryCoordinateList(e){const t=[],i=r=>{if(Array.isArray(r)){if(typeof r[0]=="number"&&typeof r[1]=="number"){t.push(r);return}r.forEach(i)}};return i(e==null?void 0:e.coordinates),t}pickVectorFeatureAtPoint(e,t){var o;const i=this.currentVectorFeatures||[];if(((o=this.currentTopicLayer)==null?void 0:o.key)==="yak-industry-points"){const s=this.pickPointFeatureAtScreenPoint(i,t);if(s)return s}const r=i.filter(s=>this.isLngLatInGeometry(e,s.geometry)).sort((s,l)=>this.getGeometryAreaScore(s.geometry)-this.getGeometryAreaScore(l.geometry));if(r.length)return r[0];const a=i.find(s=>this.isPointOrLineNearLngLat(s.geometry,e));return a||null}pickPointFeatureAtScreenPoint(e,t){var a;if(!t||!((a=this.camera)!=null&&a.instance)||!this.focusMapGroup||!this.canvas)return null;const r=(e||[]).filter(o=>{var s;return((s=o==null?void 0:o.geometry)==null?void 0:s.type)==="Point"}).map(o=>{const s=this.getPointFeatureScreenPoint(o);return s?{feature:o,screen:s,distance:Math.hypot(s.x-t.x,s.y-t.y)}:null}).filter(Boolean).sort((o,s)=>o.distance-s.distance)[0];return(r==null?void 0:r.distance)<=22?{feature:r.feature,screen:r.screen}:null}getPointFeatureScreenPoint(e){var i,r;const t=(e==null?void 0:e.geometry)||((i=e==null?void 0:e.feature)==null?void 0:i.geometry);return(t==null?void 0:t.type)!=="Point"?null:((r=this.currentTopicLayer)==null?void 0:r.key)==="yak-industry-points"?this.lngLatToLayerScreenPoint(t.coordinates,this.depth+.255):this.lngLatToScreenPoint(t.coordinates,this.depth+.32)}lngLatToLayerScreenPoint(e,t=0){const i=this.topicLayerUvBounds;if(!i)return this.lngLatToScreenPoint(e,t);const r=this.lngLatToLayerCanvasPoint(e),a=this.topicLayerCanvas;if(!(a!=null&&a.width)||!(a!=null&&a.height))return this.lngLatToScreenPoint(e,t);const o=i.left+r.x/a.width*(i.right-i.left),s=i.bottom+(a.height-r.y)/a.height*(i.top-i.bottom);return this.localMapPointToScreenPoint(new Le(o,s,Number(t)||0))}lngLatToScreenPoint(e,t=0){const i=Number(e==null?void 0:e[0]),r=Number(e==null?void 0:e[1]);if(!Number.isFinite(i)||!Number.isFinite(r))return null;const a=this.lngLatToWorldPoint([i,r],t);return this.worldPointToScreenPoint(a)}localMapPointToScreenPoint(e){const t=this.focusMapGroup?this.focusMapGroup.localToWorld(e):e;return this.worldPointToScreenPoint(t)}worldPointToScreenPoint(e){var r;if(!((r=this.camera)!=null&&r.instance)||!this.canvas||!e)return null;const t=this.canvas.getBoundingClientRect();if(!t.width||!t.height)return null;const i=e.clone().project(this.camera.instance);return!Number.isFinite(i.x)||!Number.isFinite(i.y)?null:{x:t.left+(i.x+1)/2*t.width,y:t.top+(1-i.y)/2*t.height}}focusProject(e){var h,f,p,m;const t=String(e||"").trim();if(!t)return!1;const i=(this.currentVectorFeatures||[]).filter(v=>{var g;return String(((g=v==null?void 0:v.properties)==null?void 0:g.project_name)||"").trim()===t});if(!i.length)return(f=(h=this.callbacks).onLayerStatus)==null||f.call(h,{type:"success",text:"当前项目图斑尚未加载"}),!1;const r=this.getFeatureListLngLatBounds(i);if(!r)return!1;const a=this.getProjectHighlightFeatures(i);a.length?(this.showSelectedFeatures(a),this.setSelectedVectorFeatures(a)):this.clearSelectedFeature();const o=[(r.minLng+r.maxLng)/2,(r.minLat+r.maxLat)/2],s=Math.max(r.maxLng-r.minLng,r.maxLat-r.minLat),l=Math.max(.22,Math.min(.55,s*1.25)),u=this.lngLatToWorldPoint(o,.72),c=this.defaultMapCameraPosition.clone().sub(this.defaultMapTarget).multiplyScalar(l),d=u.clone().add(c);return this.animateMapCamera(d,u,.75),(m=(p=this.callbacks).onLayerStatus)==null||m.call(p,{type:"success",text:"已定位项目"}),!0}setBoundaryDrawing(e){var t,i,r,a;this.boundaryDrawingEnabled=!!e,this.boundaryDrawingEnabled?(this.boundaryDrawPoints=[],this.lastBoundaryDrawPoint=null,this.analysisBoundaryFeature=null,this.analysisMatchedFeatures=[],this.clearSelectedFeature(),(i=(t=this.callbacks).onLayerStatus)==null||i.call(t,{type:"success",text:"请在地图上依次点击绘制分析边界"})):(a=(r=this.callbacks).onLayerStatus)==null||a.call(r,{type:"success",text:"已退出边界绘制"}),this.redrawVectorTopicLayer()}addBoundaryDrawPoint(e){var a,o,s,l;if(!Number.isFinite(e==null?void 0:e.lng)||!Number.isFinite(e==null?void 0:e.lat))return!1;const t=Date.now(),i=this.lastBoundaryDrawPoint;return i&&t-i.time<350&&Math.hypot(e.lng-i.lng,e.lat-i.lat)<8e-4?!1:(this.lastBoundaryDrawPoint={lng:e.lng,lat:e.lat,time:t},this.boundaryDrawPoints=[...this.boundaryDrawPoints||[],{lng:e.lng,lat:e.lat}],(o=(a=this.callbacks).onDrawBoundary)==null||o.call(a,{status:"drawing",points:this.boundaryDrawPoints,pointCount:this.boundaryDrawPoints.length}),(l=(s=this.callbacks).onLayerStatus)==null||l.call(s,{type:"success",text:`已添加边界点 ${this.boundaryDrawPoints.length} 个`}),this.redrawVectorTopicLayer(),!0)}undoBoundaryPoint(){var e,t,i;return(e=this.boundaryDrawPoints)!=null&&e.length?(this.boundaryDrawPoints=this.boundaryDrawPoints.slice(0,-1),(i=(t=this.callbacks).onDrawBoundary)==null||i.call(t,{status:"drawing",points:this.boundaryDrawPoints,pointCount:this.boundaryDrawPoints.length}),this.redrawVectorTopicLayer(),!0):!1}finishBoundaryDrawing(){var o,s,l,u,c,d;const e=this.boundaryDrawPoints||[];if(e.length<3)return(s=(o=this.callbacks).onLayerStatus)==null||s.call(o,{type:"error",text:"至少需要 3 个点才能形成分析边界"}),null;const t=e.map(h=>[h.lng,h.lat]),i=t[0],r=t[t.length-1];(i[0]!==r[0]||i[1]!==r[1])&&t.push([...i]);const a={type:"Feature",properties:{source:"draw",pointCount:e.length},geometry:{type:"Polygon",coordinates:[t]}};return this.boundaryDrawingEnabled=!1,this.boundaryDrawPoints=[],this.lastBoundaryDrawPoint=null,this.analysisBoundaryFeature=a,(u=(l=this.callbacks).onDrawBoundary)==null||u.call(l,{status:"complete",feature:a,points:e,pointCount:e.length}),(d=(c=this.callbacks).onLayerStatus)==null||d.call(c,{type:"success",text:"分析边界已生成"}),this.focusAnalysisGeometry(a.geometry),this.redrawVectorTopicLayer(),a}clearAnalysisBoundary(){var e,t;return this.boundaryDrawingEnabled=!1,this.boundaryDrawPoints=[],this.lastBoundaryDrawPoint=null,this.analysisBoundaryFeature=null,this.analysisMatchedFeatures=[],this.redrawVectorTopicLayer(),(t=(e=this.callbacks).onDrawBoundary)==null||t.call(e,{status:"clear",points:[],pointCount:0}),!0}showAnalysisResult(e={}){var a;const t=Object.prototype.hasOwnProperty.call(e,"boundary")||Object.prototype.hasOwnProperty.call(e,"boundaryFeature")||Object.prototype.hasOwnProperty.call(e,"feature"),i=e.boundary||e.boundaryFeature||e.feature||null,r=Array.isArray(e.matches)?e.matches:[];return t&&(this.analysisBoundaryFeature=(i==null?void 0:i.type)==="Feature"?i:i!=null&&i.geometry?{type:"Feature",properties:i.properties||{},geometry:i.geometry}:null),this.analysisMatchedFeatures=r.map(o=>(o==null?void 0:o.feature)||o).filter(o=>o==null?void 0:o.geometry),!t&&this.analysisMatchedFeatures.length?this.focusAnalysisFeatures(this.analysisMatchedFeatures):(a=this.analysisBoundaryFeature)!=null&&a.geometry&&this.focusAnalysisGeometry(this.analysisBoundaryFeature.geometry),this.redrawVectorTopicLayer(),!0}focusAnalysisFeatures(e=[]){const t=this.getFeatureListLngLatBounds(e);if(!t)return!1;const i=[(t.minLng+t.maxLng)/2,(t.minLat+t.maxLat)/2];return this.flyToLngLat(i,{span:Math.max(t.maxLng-t.minLng,t.maxLat-t.minLat),statusText:"已定位命中项目"})}focusAnalysisGeometry(e){const t=this.getGeometryLngLatBounds(e);if(!t)return!1;const i=[(t.minLng+t.maxLng)/2,(t.minLat+t.maxLat)/2];return this.flyToLngLat(i,{span:Math.max(t.maxLng-t.minLng,t.maxLat-t.minLat),statusText:"已定位分析边界"})}focusPasture(e={}){var r,a;const i=[...this.normalizePastureGrasslandRows(e==null?void 0:e.grasslands),...this.normalizePastureGrasslandRows(e==null?void 0:e.wkt)].map((o,s)=>{const l=this.normalizePastureGrasslandGeometry(o);if(!l)return null;const u=this.normalizePastureGrasslandProperties(o);return{type:"Feature",properties:tn(wt({},u),{id:u.id||u.gid||`${(e==null?void 0:e.name)||"pasture"}-${s}`,pasture_name:(e==null?void 0:e.name)||u.pastureName||u.name}),geometry:l}}).filter(Boolean);if(i.length){const o=this.getFeatureListLngLatBounds(i);if(!o)return!1;this.showSelectedFeatures(i,{mode:"pasture"}),this.setSelectedVectorFeatures(i);const s=[(o.minLng+o.maxLng)/2,(o.minLat+o.maxLat)/2];return this.flyToLngLat(s,{span:Math.max(o.maxLng-o.minLng,o.maxLat-o.minLat),statusText:"已定位具体草场"}),!0}return(a=(r=this.callbacks).onLayerStatus)==null||a.call(r,{type:"warning",text:"当前牧户暂无可定位数据"}),!1}normalizePastureGrasslandRows(e){return e?typeof e=="string"?[e]:Array.isArray(e)?e:(e==null?void 0:e.type)==="FeatureCollection"&&Array.isArray(e.features)?e.features:(e==null?void 0:e.type)==="Feature"||this.isGeoJsonGeometry(e)?[e]:Array.isArray(e==null?void 0:e.rows)?e.rows:Array.isArray(e==null?void 0:e.data)?e.data:e!=null&&e.data?this.normalizePastureGrasslandRows(e.data):Array.isArray(e==null?void 0:e.list)?e.list:Array.isArray(e==null?void 0:e.features)?e.features:e!=null&&e.wkt||e!=null&&e.geo||e!=null&&e.geom||e!=null&&e.geometryWkt||e!=null&&e.geometry_wkt||e!=null&&e.shape||e!=null&&e.location||e!=null&&e.geometry?[e]:[]:[]}normalizePastureGrasslandGeometry(e){var t;return typeof e=="string"?this.parseGeometryText(e):(e==null?void 0:e.type)==="Feature"?this.normalizePastureGrasslandGeometry(e.geometry):this.isGeoJsonGeometry(e)?e:typeof(e==null?void 0:e.geometry)=="string"?this.parseGeometryText(e.geometry):((t=e==null?void 0:e.geometry)==null?void 0:t.type)==="Feature"?this.normalizePastureGrasslandGeometry(e.geometry.geometry):this.isGeoJsonGeometry(e==null?void 0:e.geometry)?e.geometry:this.parseGeometryText((e==null?void 0:e.wkt)||(e==null?void 0:e.geo)||(e==null?void 0:e.geom)||(e==null?void 0:e.geometryWkt)||(e==null?void 0:e.geometry_wkt)||(e==null?void 0:e.shape)||(e==null?void 0:e.location))}normalizePastureGrasslandProperties(e){return!e||typeof e!="object"||Array.isArray(e)?{wkt:e}:e.type==="Feature"?e.properties||{}:e}parseGeometryText(e){const t=String(e||"").trim();if(!t)return null;if(t.startsWith("{")||t.startsWith("["))try{const i=JSON.parse(t);if((i==null?void 0:i.type)==="Feature")return this.normalizePastureGrasslandGeometry(i);if(this.isGeoJsonGeometry(i))return i}catch(i){return null}return this.parseWktGeometry(t)}isGeoJsonGeometry(e){return!!(e&&["Polygon","MultiPolygon","LineString","MultiLineString","Point"].includes(e.type)&&e.coordinates)}flyToLngLat(e,t={}){var d,h;const i=Array.isArray(e)?e:[e==null?void 0:e.lng,e==null?void 0:e.lat],r=Number(i==null?void 0:i[0]),a=Number(i==null?void 0:i[1]);if(!Number.isFinite(r)||!Number.isFinite(a))return!1;const o=Number(t.span),s=Number.isFinite(o)?Math.max(.2,Math.min(.55,o*1.25)):.32,l=this.lngLatToWorldPoint([r,a],.72),u=this.defaultMapCameraPosition.clone().sub(this.defaultMapTarget).multiplyScalar(s),c=l.clone().add(u);return this.animateMapCamera(c,l,t.duration||.75),(h=(d=this.callbacks).onLayerStatus)==null||h.call(d,{type:"success",text:t.statusText||"已定位"}),!0}getProjectHighlightFeatures(e){const t=e.filter(r=>{var o;const a=String(((o=r==null?void 0:r.geometry)==null?void 0:o.type)||"");return a.includes("Polygon")||a.includes("LineString")}),i=t.filter(r=>{var a;return((a=r==null?void 0:r.properties)==null?void 0:a.feature_role)==="工程范围"});return i.length?i:t}getFeatureListLngLatBounds(e){return e.reduce((t,i)=>{const r=this.getGeometryLngLatBounds(i.geometry);return r?t?{minLng:Math.min(t.minLng,r.minLng),minLat:Math.min(t.minLat,r.minLat),maxLng:Math.max(t.maxLng,r.maxLng),maxLat:Math.max(t.maxLat,r.maxLat)}:wt({},r):t},null)}isPointOrLineNearLngLat(e,t){return e!=null&&e.coordinates?e.type==="Point"?this.getCoordinateDistance(e.coordinates,[t.lng,t.lat])<=.02:e.type==="LineString"?this.isCoordinateNearLine(e.coordinates,t,.004):e.type==="MultiLineString"?e.coordinates.some(i=>this.isCoordinateNearLine(i,t,.004)):!1:!1}isCoordinateNearLine(e,t,i){if(!Array.isArray(e)||e.length<2)return!1;const r=[t.lng,t.lat];for(let a=1;aa.some(o=>o.key===i||o.layerName===t));return(r==null?void 0:r[0])||""}getLayerQueryKey(e){return[(e==null?void 0:e.layerName)||"",(e==null?void 0:e.styles)||"",(e==null?void 0:e.cqlFilter)||"",(e==null?void 0:e.key)||""].join("|")}mergeBusinessProperties(e,t,i){const r=(i==null?void 0:i.key)||"";if(Object.entries(t||{}).forEach(([a,o])=>{o==null||o===""||(e[a]===void 0||e[a]===null||e[a]==="")&&(e[a]=o)}),r==="basic-grassland"){const a=(t==null?void 0:t.basic_type_name)||(t==null?void 0:t.grassland_category_name)||(t==null?void 0:t.land_class_name)||(t==null?void 0:t.land_use_name)||(t==null?void 0:t.base_grass);a!=null&&a!==""&&(e.basic_type_name=a)}if(r==="grassland-level"){const a=(t==null?void 0:t.grassland_level)||(t==null?void 0:t.level)||(t==null?void 0:t.grassland_level_name)||(t==null?void 0:t.level_name);a!=null&&a!==""&&(e.grassland_level=a)}if(r==="grassland-type"||r==="wetland-type"){const a=(t==null?void 0:t.grass_min_type)||(t==null?void 0:t.grass_type)||(t==null?void 0:t.grassland_type)||(t==null?void 0:t.type_name)||(t==null?void 0:t.type);a!=null&&a!==""&&(e.grass_min_type=a)}if(r==="grassland-yield"||r==="wetland-yield"){const a=(t==null?void 0:t.yield)||(t==null?void 0:t.xc_yield)||(t==null?void 0:t.xb_xc_yield)||(t==null?void 0:t.fresh_grass_yield)||(t==null?void 0:t.value),o=(t==null?void 0:t.mu_yield)||(t==null?void 0:t.xc_mu_yield)||(t==null?void 0:t.xb_xc_mu_yield)||(t==null?void 0:t.yield_per_mu);a!=null&&a!==""&&(e.fresh_grass_yield=a),o!=null&&o!==""&&(e.mu_yield=o)}if(r==="grassland-health"){const a=(t==null?void 0:t.health_level)||(t==null?void 0:t.health_level_name)||(t==null?void 0:t.ndvi_level)||(t==null?void 0:t.level)||(t==null?void 0:t.level_name),o=(t==null?void 0:t.ndvi)||(t==null?void 0:t.NDVI)||(t==null?void 0:t.value);a!=null&&a!==""&&(e.health_level=a),o!=null&&o!==""&&(e.ndvi=o);const s=(t==null?void 0:t.degradation_level)||(t==null?void 0:t.degradation_level_name)||(t==null?void 0:t.level)||(t==null?void 0:t.level_name);s!=null&&s!==""&&(e.degradation_level=s)}}getScreenPointFromEvent(e){var i;const t=((i=e==null?void 0:e.data)==null?void 0:i.originalEvent)||(e==null?void 0:e.originalEvent)||e;return(t==null?void 0:t.clientX)!==void 0&&(t==null?void 0:t.clientY)!==void 0?{x:t.clientX,y:t.clientY}:null}getLngLatFromEvent(e){var s,l,u;const i=(u=(((l=(s=this.interactionManager)==null?void 0:s.raycaster)==null?void 0:l.intersectObject(e.target,!1))||[])[0])==null?void 0:u.point;if(!i)return null;const r=this.focusMapGroup.worldToLocal(i.clone()),o=Ic().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0]).invert([r.x,-r.y]);return o?{lng:o[0],lat:o[1]}:null}lngLatToWmsPixel({lng:e,lat:t}){const i=(e-lr.west)/(lr.east-lr.west)*qd.width,r=(lr.north-t)/(lr.north-lr.south)*qd.height;return{x:i,y:r}}showSelectedFeature(e,t={}){var r;const i=(e==null?void 0:e.geometry)||((r=e==null?void 0:e.feature)==null?void 0:r.geometry);this.clearSelectedFeature(),this.createSelectedFeatureGroup(),this.addSelectedGeometry(i,t),this.selectedFeatureGroup.children.length||this.clearSelectedFeature()}showSelectedFeatures(e=[],t={}){this.clearSelectedFeature(),this.createSelectedFeatureGroup(),e.forEach(i=>{var a;const r=(i==null?void 0:i.geometry)||((a=i==null?void 0:i.feature)==null?void 0:a.geometry);this.addSelectedGeometry(r,t)}),this.selectedFeatureGroup.children.length||this.clearSelectedFeature()}setSelectedVectorFeatures(e=[]){this.selectedVectorFeatures=[...e],this.redrawVectorTopicLayer()}getSelectedFeatureStyle(e={}){const t=e.mode==="pasture";return{fillColor:t?16765773:16769370,fillOpacity:t?.42:.5,lineColor:16777215,lineOpacity:.98,glowColor:t?2357712:2422468,glowOpacity:t?.92:.96,renderOrderBase:t?42:35,boundary:t,boundaryColor:16773226,boundaryGlowColor:2422468,boundaryWidth:.018,boundaryGlowWidth:.06,boundaryOpacity:.95,boundaryGlowOpacity:.42}}addSelectedGeometry(e,t={}){if(!(e!=null&&e.coordinates)||!this.selectedFeatureGroup)return;const i=this.getSelectedFeatureStyle(t),r=this.getDisplayFeaturePolygons(e),a=new Mr({color:i.fillColor,transparent:!0,opacity:i.fillOpacity,side:aa,depthWrite:!1,fog:!1}),o=new ku({color:i.lineColor,transparent:!0,opacity:i.lineOpacity,linewidth:2,depthTest:!1,depthWrite:!1,fog:!1}),s=new ku({color:i.glowColor,transparent:!0,opacity:i.glowOpacity,linewidth:3,depthTest:!1,depthWrite:!1,fog:!1}),l=i.boundary?new Mr({color:i.boundaryColor,transparent:!0,opacity:i.boundaryOpacity,side:aa,depthTest:!1,depthWrite:!1,fog:!1}):null,u=i.boundary?new Mr({color:i.boundaryGlowColor,transparent:!0,opacity:i.boundaryGlowOpacity,side:aa,depthTest:!1,depthWrite:!1,fog:!1,blending:Mo}):null;r.length&&r.forEach(d=>{const h=this.createProjectedShape(d);if(!h)return;const f=new F3(h),p=new fr(f,a);p.renderOrder=i.renderOrderBase,this.selectedFeatureGroup.add(p),d.forEach(m=>{const v=this.createProjectedRingPoints(m);if(v.length<3)return;i.boundary&&(this.addSelectedBoundaryBand(v,u,i.boundaryGlowWidth,i.renderOrderBase+1,!0),this.addSelectedBoundaryBand(v,l,i.boundaryWidth,i.renderOrderBase+4,!0));const g=new Qr().setFromPoints(v),_=new G8(g,o);_.renderOrder=i.renderOrderBase+5,this.selectedFeatureGroup.add(_);const S=new Qr().setFromPoints(v),x=new G8(S,s);x.renderOrder=i.renderOrderBase+3,x.scale.set(1.004,1.004,1),this.selectedFeatureGroup.add(x)})});const c=this.normalizeFeatureLineStrings(e);c.length&&c.forEach(d=>{const h=this.createProjectedRingPoints(d);if(h.length<2)return;i.boundary&&(this.addSelectedBoundaryBand(h,u,i.boundaryGlowWidth,i.renderOrderBase+1,!1),this.addSelectedBoundaryBand(h,l,i.boundaryWidth,i.renderOrderBase+4,!1));const f=new Qr().setFromPoints(h),p=new Q9(f,s);p.renderOrder=i.renderOrderBase+3,p.scale.set(1.004,1.004,1),this.selectedFeatureGroup.add(p);const m=new Qr().setFromPoints(h),v=new Q9(m,o);v.renderOrder=i.renderOrderBase+5,this.selectedFeatureGroup.add(v)})}addSelectedBoundaryBand(e,t,i,r,a=!0){if(!t||!this.selectedFeatureGroup)return;const o=this.createPathBandGeometry(e,i,a);if(!o)return;const s=new fr(o,t);s.renderOrder=r,this.selectedFeatureGroup.add(s)}createPathBandGeometry(e,t,i=!0){const r=this.normalizePathBandPoints(e,i);if(r.length<(i?3:2))return null;const a=Math.max(Number(t)||0,0)/2;if(!a)return null;const o=[],s=i?r.length:r.length-1;for(let u=0;uNumber.isFinite(r==null?void 0:r.x)&&Number.isFinite(r==null?void 0:r.y)).map(r=>r.clone());if(t&&i.length>2){const r=i[0],a=i[i.length-1];r.distanceToSquared(a)<1e-10&&i.pop()}return i}clearSelectedFeature(){var t;const e=!!((t=this.selectedVectorFeatures)!=null&&t.length);this.selectedVectorFeatures=[],e&&this.redrawVectorTopicLayer(),this.clearSelectedGeometryGroup()}clearSelectedGeometryGroup(){var t,i;if(!this.selectedFeatureGroup)return;const e=new Set;for(;this.selectedFeatureGroup.children.length;){const r=this.selectedFeatureGroup.children.pop();(i=(t=r.geometry)==null?void 0:t.dispose)==null||i.call(t),Array.isArray(r.material)?r.material.forEach(a=>e.add(a)):e.add(r.material)}e.forEach(r=>{var a;return(a=r==null?void 0:r.dispose)==null?void 0:a.call(r)})}normalizeFeaturePolygons(e){return rW(e)}normalizeFeatureLineStrings(e){return e!=null&&e.coordinates?e.type==="LineString"?[e.coordinates]:e.type==="MultiLineString"?e.coordinates:[]:[]}getDisplayFeaturePolygons(e){const t=this.normalizeFeaturePolygons(e),i=this.getLayerClipBounds(this.currentTopicLayer);return i?t.map(r=>{const a=this.clipRingToBounds(r==null?void 0:r[0],i);if(a.length<3)return null;const o=r.slice(1).map(s=>this.clipRingToBounds(s,i)).filter(s=>s.length>=3);return[a,...o]}).filter(Boolean):t}clipRingToBounds(e=[],t){let i=e.map(a=>[Number(a==null?void 0:a[0]),Number(a==null?void 0:a[1])]).filter(([a,o])=>Number.isFinite(a)&&Number.isFinite(o));return[{inside:([a])=>a>=t.west,intersect:(a,o)=>this.getLngLatLineIntersection(a,o,"lng",t.west)},{inside:([a])=>a<=t.east,intersect:(a,o)=>this.getLngLatLineIntersection(a,o,"lng",t.east)},{inside:([,a])=>a>=t.south,intersect:(a,o)=>this.getLngLatLineIntersection(a,o,"lat",t.south)},{inside:([,a])=>a<=t.north,intersect:(a,o)=>this.getLngLatLineIntersection(a,o,"lat",t.north)}].forEach(a=>{const o=i;i=[],o.length&&o.forEach((s,l)=>{const u=o[(l+o.length-1)%o.length],c=a.inside(s),d=a.inside(u);c?(d||i.push(a.intersect(u,s)),i.push(s)):d&&i.push(a.intersect(u,s))})}),i}getLngLatLineIntersection(e,t,i,r){const a=i==="lng"?0:1,o=i==="lng"?1:0,s=t[a]-e[a];if(!s)return[...e];const l=(r-e[a])/s,u=[...e];return u[a]=r,u[o]=e[o]+(t[o]-e[o])*l,u}createProjectedShape(e){const t=e==null?void 0:e[0];if(!Array.isArray(t)||t.length<3)return null;const i=new ju;return this.createProjectedRingPoints(t).forEach((a,o)=>{o===0?i.moveTo(a.x,a.y):i.lineTo(a.x,a.y)}),e.slice(1).forEach(a=>{const o=this.createProjectedRingPoints(a);if(o.length<3)return;const s=new ju;o.forEach((l,u)=>{u===0?s.moveTo(l.x,l.y):s.lineTo(l.x,l.y)}),i.holes.push(s)}),i}createProjectedRingPoints(e){if(!Array.isArray(e))return[];const t=[];return e.forEach(i=>{if(!Array.isArray(i)||i.length<2)return;const r=Number(i[0]),a=Number(i[1]);if(!Number.isFinite(r)||!Number.isFinite(a))return;const[o,s]=this.geoProjection([r,a]);t.push(new Le(o,-s,0))}),t}enhanceTexture(e){var i,r,a;const t=(r=(i=this.renderer)==null?void 0:i.instance)==null?void 0:r.capabilities;e.anisotropy=((a=t==null?void 0:t.getMaxAnisotropy)==null?void 0:a.call(t))||1,e.needsUpdate=!0}geoProjection(e){return Ic().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0])(e)}update(e){super.update(e),this.updateTradeFlowPulses(e),this.interactionManager&&this.interactionManager.update()}destroy(){var e,t,i,r;this.callbacks={},(t=(e=this.canvas)==null?void 0:e.removeEventListener)==null||t.call(e,"pointerdown",this.handleCanvasBoundaryPointerDown,!0),(r=(i=this.canvas)==null?void 0:i.removeEventListener)==null||r.call(i,"dblclick",this.handleCanvasBoundaryDoubleClick,!0),this.clearTradeFlowLayer(),this.clearSelectedFeature(),super.destroy(),this.label3d&&this.label3d.destroy()}}const POe={class:"map"},rm={__name:"map",props:{activeLayer:{type:Object,default:null},mapRanking:{type:Object,default:null}},emits:["feature-loading","feature-info","layer-status","draw-boundary","scene-mounted"],setup(n,{expose:e,emit:t}){const i=n,r=t,a=Wt(null),o=vg(null);let s=null,l=null,u=null,c=null;dl(()=>{r("scene-mounted")}),Bl(()=>{C()});function d(P){o.value||!a.value||(o.value=new EOe(a.value,P,{onFeatureLoading:F=>r("feature-loading",F),onFeatureInfo:F=>r("feature-info",F),onLayerStatus:F=>r("layer-status",F),onDrawBoundary:F=>r("draw-boundary",F)}),o.value.time.pause(),o.value.setTopicLayers(i.activeLayer?[i.activeLayer]:[]),o.value.setTownRanking(i.mapRanking),I(),M())}function h(){return rn(this,null,function*(){o.value&&(o.value.time.resume(),o.value.animateTl.timeScale(1),o.value.animateTl.play())})}function f(){var P,F;(F=(P=o.value)==null?void 0:P.clearSelectedFeature)==null||F.call(P)}function p(P){var F,V;(V=(F=o.value)==null?void 0:F.focusProject)==null||V.call(F,P)}function m(P){var F,V;(V=(F=o.value)==null?void 0:F.focusPasture)==null||V.call(F,P)}function v(P,F){var V,G;return(G=(V=o.value)==null?void 0:V.focusTownByName)==null?void 0:G.call(V,P,F)}function g(P){var F,V;(V=(F=o.value)==null?void 0:F.setBoundaryDrawing)==null||V.call(F,P)}function _(){var P,F;return(F=(P=o.value)==null?void 0:P.finishBoundaryDrawing)==null?void 0:F.call(P)}function S(){var P,F;(F=(P=o.value)==null?void 0:P.undoBoundaryPoint)==null||F.call(P)}function x(){var P,F;(F=(P=o.value)==null?void 0:P.clearAnalysisBoundary)==null||F.call(P)}function A(P){var F,V;(V=(F=o.value)==null?void 0:F.showAnalysisResult)==null||V.call(F,P)}function C(){var P,F;E(),(F=(P=o.value)==null?void 0:P.destroy)==null||F.call(P),o.value=null}function M(){l&&window.cancelAnimationFrame(l),l=window.requestAnimationFrame(()=>{var P,F,V,G,W;l=null,(V=(F=(P=o.value)==null?void 0:P.sizes)==null?void 0:F.init)==null||V.call(F),(W=(G=o.value)==null?void 0:G.resize)==null||W.call(G)}),u&&window.clearTimeout(u),u=window.setTimeout(()=>{var P,F,V,G,W;u=null,(V=(F=(P=o.value)==null?void 0:P.sizes)==null?void 0:F.init)==null||V.call(F),(W=(G=o.value)==null?void 0:G.resize)==null||W.call(G)},180)}function I(){var F;E();const P=(F=a.value)==null?void 0:F.parentNode;P&&window.ResizeObserver&&(s=new ResizeObserver(()=>M()),s.observe(P)),c=window.setInterval(D,1e3),Qs(M)}function D(){var Q;if(!o.value||!a.value)return;const P=a.value.parentNode,F=(P==null?void 0:P.offsetWidth)||window.innerWidth||1,V=(P==null?void 0:P.offsetHeight)||window.innerHeight||1,G=((Q=o.value.sizes)==null?void 0:Q.pixelRatio)||1,W=Math.floor(F*G),Y=Math.floor(V*G);(a.value.width!==W||a.value.height!==Y)&&M()}function E(){s&&(s.disconnect(),s=null),l&&(window.cancelAnimationFrame(l),l=null),u&&(window.clearTimeout(u),u=null),c&&(window.clearInterval(c),c=null)}return qa(()=>i.activeLayer,P=>{o.value&&o.value.setTopicLayers(P?[P]:[])},{deep:!0}),qa(()=>i.mapRanking,P=>{o.value&&o.value.setTownRanking(P)},{deep:!0}),e({loadMap:d,play:h,clearSelectedFeature:f,focusProject:p,focusPasture:m,focusTown:v,setBoundaryDrawing:g,finishBoundaryDrawing:_,undoBoundaryPoint:S,clearAnalysisBoundary:x,showAnalysisResult:A,destroyMap:C,canvasMap:o}),(P,F)=>(Te(),Pe("div",POe,[O("canvas",{ref_key:"canvasRef",ref:a},null,512)]))}};const ROe={key:0,class:"business-stat-empty"},LOe={class:"business-stat-rank"},IOe={class:"business-stat-main"},DOe={class:"business-stat-name"},NOe={class:"business-stat-bar"},kOe={class:"business-stat-value"},FOe={key:0},aW={__name:"BusinessStatList",props:{rows:{type:Array,default:()=>[]},compact:{type:Boolean,default:!1}},setup(n){const e=n,t=Ye(()=>{const r=e.rows.map(a=>Number(a.value)).filter(a=>!Number.isNaN(a));return Math.max(...r,1)});function i(r){const a=Number(r.value);return Number.isNaN(a)?36:Math.max(8,Math.round(a/t.value*100))}return(r,a)=>(Te(),Pe("div",{class:Xn(["business-stat-list",{"is-compact":n.compact,"is-dense":n.rows.length>10}])},[n.rows.length?Dn("",!0):(Te(),Pe("div",ROe,"暂无业务统计数据")),(Te(!0),Pe(bn,null,Bn(n.rows,(o,s)=>(Te(),Pe("div",{key:o.key||o.name,class:"business-stat-row"},[O("div",LOe,De(s+1),1),O("div",IOe,[O("div",DOe,De(o.name),1),O("div",NOe,[O("span",{style:Ji({width:`${i(o)}%`})},null,4)])]),O("div",kOe,[O("strong",null,De(o.value),1),O("em",null,De(o.unit),1),o.extra?(Te(),Pe("span",FOe,De(o.extra),1)):Dn("",!0)])]))),128))],2))}},OOe=""+new URL("ring2-a1b91808-balabala-1782919616283.png",import.meta.url).href,BOe=""+new URL("ring3-fe0f60d7-balabala-1782919616283.png",import.meta.url).href,zOe=""+new URL("ring4-f2e324d6-balabala-1782919616283.png",import.meta.url).href;const GOe={name:"ThreePie",props:{data:{type:Array,default:()=>[]},colors:{type:Array,default:()=>[2161326,15380744,3122407,65535,16536624]},opacity:{type:Number,default:.5},delay:{type:Number,default:5e3},loopComplete:{type:Function,default:()=>{}}},computed:{currentData(){return tn(wt({},this.data[this.activeIndex]),{count:this.count})}},data(){return this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.axes=null,this.pieGroup=new Nr,{width:300,height:200,activeIndex:0,count:0,timer:null}},mounted(){this.width=this.$refs.pieDom.offsetWidth,this.height=this.$refs.pieDom.offsetHeight,this.count=this.data.map(n=>n.value).reduce((n,e)=>n+e,0),this.init()},beforeUnmount(){clearInterval(this.timer),this.destroy()},methods:{init(){this.scene=new ZQ,this.initCamera(),this.initRenderer(),this.initLight(),this.initAxes(),this.initControls(),this.createPlane({url:OOe,width:5,position:new Le(0,0,-.01),color:"#00ffff"}),this.createPlane({url:BOe,width:6.5,position:new Le(0,0,-.02),color:"#00ffff"}),this.createPlane({url:zOe,width:5.5,position:new Le(0,0,-.03),animate:!0,color:"#00ffff"}),this.createPie(),this.loop()},createPlane(n){let e={url:"texture/ring1.png",width:5.5,z:0,position:new Le(0,0,0),animate:!1,color:null},t=Object.assign(e,n);const i=new Al(t.width,t.width),r=new Mr({map:this.getTexture(t.url),transparent:!0,side:aa,depthTest:!1});t.color&&(r.color=new Jn(t.color));const a=new fr(i,r);a.position.copy(t.position),a.rotation.x=-1*Math.PI/2,t.animate&&ka.to(a.rotation,{z:2*Math.PI,repeat:-1,ease:"none",duration:3}),this.scene.add(a)},getTexture(n){const e=new AR().load(n);return e.wrapS=e.wrapT=Eo,e},createPie(){let n=0,e=0;for(var t=0;t{this.loopChange()},this.delay)},loopChange(){let n=this.activeIndex+1;n>=this.data.length&&(n=0,this.loopComplete&&this.loopComplete()),this.chooseRing(n)},chooseRing(n=0,e=!1){let t=n-1<0?this.data.length-1:n-1,i=this.pieGroup.children[t];this.prevMesh=i,this.activeIndex=n;let r=this.pieGroup.children[n];e||(ka.to(i.scale,{z:1}),ka.to(i.material,{opacity:this.opacity})),ka.to(r.scale,{z:2}),ka.to(r.material,{opacity:.8})},addRing(n={}){let e={innerRadius:1.5,outerRadius:2,thickness:.5,startAngle:0,endAngle:Math.PI/2,color:65535,segments:120},t=Object.assign(e,n),i=new ju;i.arc(0,0,t.outerRadius,t.startAngle,t.endAngle);let r=i.getPoints(t.segments),a=new ju;a.arc(0,0,t.innerRadius,t.endAngle,t.startAngle,!0);let o=a.getPoints(t.segments),s=new ju(r.concat(o));const l={steps:1,depth:t.thickness,bevelEnabled:!0,bevelThickness:0,bevelSize:0,bevelOffset:0,bevelSegments:0},u=new l7(s,l);let c=new KC({color:t.color,transparent:!0,opacity:this.opacity,side:aa});const d=new fr(u,c.clone());return d.renderOrder=10,d.rotation.x=-1*Math.PI/2,d},initCamera(){var n=this.width/this.height;this.camera=new ss(30,n,.1,1500),this.camera.position.set(6.023813305272227,4.838542633695233,6.111272698256137),this.camera.lookAt(0,0,0)},initRenderer(){this.renderer=new vR({antialias:!0,alpha:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.$refs.pieDom.appendChild(this.renderer.domElement)},initLight(){let n=new V8(16777215,2);n.position.set(200,300,200);let e=new V8(16777215,2);e.position.set(-200,-300,-200);let t=new hee(16777215,2);this.scene.add(n),this.scene.add(e),this.scene.add(t)},initAxes(){this.axes=new fee(0),this.scene.add(this.axes)},initControls(){this.controls=new bee(this.camera,this.renderer.domElement),this.controls.maxPolarAngle=Math.PI,this.controls.autoRotate=!1,this.controls.enableDamping=!0,this.controls.enabled=!1},loop(){this.renderer.setAnimationLoop(()=>{this.renderer.render(this.scene,this.camera),this.controls&&this.controls.update()})},start(){this.loop(),this.controls.enabled=!0,this.timer=setInterval(()=>{this.loopChange()},this.delay)},stop(){clearInterval(this.timer),this.controls&&(this.controls.enabled=!1),this.renderer&&this.renderer.setAnimationLoop(null)},getScene(){return this.scene},getRender(){return this.renderer},resize(){this.width=this.$refs.pieDom.offsetWidth,this.height=this.$refs.pieDom.offsetHeight;let n=this.width/this.height;this.camera.aspect=n,this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(window.devicePixelRatio)},destroy(){this.prevMesh&&(ka.set(this.prevMesh.scale,{z:1}),ka.set(this.prevMesh.material,{opacity:this.opacity})),this.stop(),window.removeEventListener("resize",()=>{this.resize()}),this.renderer&&(Kke(this.pieGroup),this.renderer.dispose(),this.renderer.forceContextLoss(),this.controls.dispose(),this.$refs.pieDom.innerHTML="",this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.axes=null)}}},UOe={class:"three-pie-wrap"},VOe={class:"three-pie",ref:"pieDom"},HOe={class:"three-pie-slot"};function WOe(n,e,t,i,r,a){return Te(),Pe("div",UOe,[O("div",VOe,null,512),O("div",HOe,[av(n.$slots,"default",{data:a.currentData})])])}const Oee=c_(GOe,[["render",WOe]]);const jOe={key:0,class:"business-panel-empty"},$Oe={key:2,class:"business-metrics"},qOe={key:3,class:"business-icon-metrics"},XOe={class:"business-icon-metric-copy"},YOe={key:0},KOe={key:4,class:"business-spotlight"},ZOe={class:"business-spotlight-main"},JOe={class:"business-spotlight-side"},QOe={key:0},eBe={key:1,class:"business-panel-empty"},tBe={key:0,class:"business-ring-visual"},nBe={class:"business-ring-inner"},iBe={key:1,class:"business-donut-visual"},rBe={class:"business-three-pie-center"},aBe={class:"business-donut-legend"},oBe={key:1,class:"business-panel-empty"},sBe={key:6,class:"business-structure"},lBe={class:"business-structure-overview"},uBe={class:"business-structure-band"},cBe=["title"],dBe={class:"business-structure-list"},hBe={key:1,class:"business-panel-empty"},fBe={key:7,class:"business-capacity"},pBe={class:"business-capacity-head"},vBe={class:"business-capacity-band"},mBe=["title"],gBe={class:"business-capacity-list"},yBe={key:0,class:"business-capacity-town"},_Be={key:1,class:"business-panel-empty"},SBe={class:"business-bar-name"},bBe={class:"business-bar-track"},xBe={key:0},wBe={key:1},TBe={key:0,class:"business-column-unit"},ABe={key:0},CBe={class:"business-column-track"},MBe={key:10,class:"business-project-table"},EBe={class:"business-project-search"},PBe=["placeholder"],RBe={class:"business-project-frame"},LBe=["onClick","onKeydown"],IBe=["title"],DBe={key:0},NBe={key:0},kBe={key:1},FBe={key:0,class:"business-project-empty"},OBe={class:"business-table-head"},BBe={class:"business-table-body"},zBe={class:"business-table-name"},GBe={class:"business-table-value"},UBe={key:0},VBe={class:"business-stack-legend"},HBe={class:"business-stack-chart"},WBe={class:"business-stack-track"},jBe={key:0,class:"business-column-unit business-peak-unit"},$Be={key:0},qBe={key:14,class:"business-line"},XBe={viewBox:"0 0 320 86",preserveAspectRatio:"none","aria-hidden":"true"},YBe=["points"],KBe=["points"],ZBe=["cx","cy"],JBe=["cx","cy","onMouseenter"],QBe=["onMouseenter"],eze={key:0},tze={key:0},nze={class:"business-split-band"},ize={class:"business-split-list"},oW=3e3,Cl={__name:"BusinessPanelRenderer",props:{panel:{type:Object,default:()=>({rows:[]})},compact:{type:Boolean,default:!1}},emits:["row-select"],setup(n,{emit:e}){const t=n,i=e,r=["#24f6c4","#32dcff","#ffe06b","#7ee269","#ff9a62","#9ea7ff"],a=Ye(()=>{var Re;return((Re=t.panel)==null?void 0:Re.type)||"rank"}),o=Ye(()=>{var Re;return(((Re=t.panel)==null?void 0:Re.rows)||[]).filter(lt=>lt==null?void 0:lt.name)}),s=Ye(()=>o.value.map(Re=>tn(wt({},Re),{value:k(Re)})).filter(Re=>Re.value>0)),l=Ye(()=>o.value.map(Re=>k(Re)).filter(Re=>Re>0)),u=Ye(()=>Math.max(...l.value,1)),c=Ye(()=>l.value.reduce((Re,lt)=>Re+lt,0)),d=Ye(()=>o.value.filter(Re=>k(Re)>0)),h=Ye(()=>o.value.filter(Re=>k(Re)>0)),f=Ye(()=>h.value),p=Ye(()=>a.value!=="column"?"":xt()),m=Ye(()=>a.value!=="peak"?"":xt()),v=Ye(()=>o.value.filter(Re=>k(Re)>0)),g=Ye(()=>{var Re;return h.value.slice(0,((Re=t.panel)==null?void 0:Re.limit)||8)}),_=Ye(()=>{var Re;return((Re=t.panel)==null?void 0:Re.segments)||[]}),S=Ye(()=>o.value.filter(Re=>_t(Re)>0)),x=Wt(""),A=Wt(null),C=[{key:"name",label:"项目名称",field:"name",width:"45%",className:"business-project-col-name"},{key:"year",label:"年份",field:"year",width:"13%",fallback:"未知",align:"right",className:"business-project-col-year"},{key:"category",label:"类型",field:"category",width:"20%",className:"business-project-col-category"},{key:"scale",label:"规模",field:"value",width:"22%",align:"right",strong:!0,unitField:"unit",className:"business-project-col-scale"}],M=Ye(()=>{var lt;return(Array.isArray((lt=t.panel)==null?void 0:lt.columns)&&t.panel.columns.length?t.panel.columns:C).map((sn,Pi)=>({key:sn.key||sn.field||`column-${Pi}`,label:sn.label||sn.title||sn.name||"",field:sn.field||sn.dataIndex||sn.key,fields:sn.fields||[],width:sn.width,align:sn.align,strong:!!sn.strong,unit:sn.unit,unitField:sn.unitField,fallback:sn.fallback,format:sn.format,className:sn.className}))}),I=Ye(()=>{var Re;return((Re=t.panel)==null?void 0:Re.searchPlaceholder)||"搜索项目"}),D=Ye(()=>{var Re;return((Re=t.panel)==null?void 0:Re.emptyText)||"无匹配项目"}),E=Ye(()=>{var lt;const Re=Array.isArray((lt=t.panel)==null?void 0:lt.searchKeys)?t.panel.searchKeys:[];return Re.length?Re:[...M.value.flatMap(sn=>[sn.field,...sn.fields||[]]),"projectName","category","year","measure","townships","metric"].filter(Boolean)}),P=Ye(()=>{const Re=$e(x.value);return Re?o.value.filter(lt=>$e(mt(lt)).includes(Re)):o.value}),F=Ye(()=>o.value.find(Re=>["forage-total","wetland-yield-total"].includes(Re.key))||o.value[0]),V=Ye(()=>o.value.filter(Re=>["forage-edible","forage-unavailable","wetland-yield-edible","wetland-yield-unavailable"].includes(Re.key))),G=Ye(()=>o.value.find(Re=>["forage-top-town","wetland-yield-top-town"].includes(Re.key))),W=Wt(0),Y=Wt(null);let Q=null;const K=Ye(()=>{var Re,lt;return`${((Re=t.panel)==null?void 0:Re.key)||((lt=t.panel)==null?void 0:lt.title)||"pie"}-${s.value.map(sn=>`${sn.name}:${sn.value}`).join("|")}`}),ae=Ye(()=>{const Re=ie.value;return Re?W.value%Re:0}),ie=Ye(()=>{var Re;return a.value==="structure"?v.value.length:a.value==="donut"?s.value.length:a.value==="bar"&&((Re=t.panel)==null?void 0:Re.variant)==="capacity"?V.value.length:a.value==="bar"||a.value==="column"?h.value.length:a.value==="table"?f.value.length:a.value==="line"?h.value.length:a.value==="split"?d.value.length:0}),he=Ye(()=>s.value[ae.value]||s.value[0]);Ye(()=>v.value[ae.value]||v.value[0]);const Ee=Ye(()=>o.value[0]),He=Ye(()=>o.value.slice(0,4).map((Re,lt)=>tn(wt({},Re),{icon:Tn(Re,lt)}))),xe=Ye(()=>v.value.map((Re,lt)=>tn(wt({},Re),{displayIndex:lt}))),Fe=Ye(()=>{var Re;return a.value!=="donut"?"standard":((Re=t.panel)==null?void 0:Re.variant)==="ring"?"ring":"three"}),pt=Ye(()=>{if(!s.value.length)return{};const Re=c.value||1;let lt=-90;return{"--ring-gradient":`conic-gradient(${s.value.map((Pi,er)=>{const _e=k(Pi)/Re*360,ze=lt,Qe=lt+_e;return lt=Qe,`${En(er)} ${ze}deg ${Qe}deg`}).join(", ")})`,"--ring-active-color":En(ae.value)}});dl(()=>{ut()}),Bl(()=>{Jt()}),qa(()=>{var Re;return[(Re=t.panel)==null?void 0:Re.key,o.value.length]},()=>{W.value=0,Y.value=null,x.value="",A.value=null,ut()});const Ot=Ye(()=>{const Re=h.value,lt=320,sn=66,Pi=10,er=Re.length>1?lt/(Re.length-1):lt,_e=Re.map(ke=>k(ke)).filter(ke=>ke>0),ze=_e.length?Math.min(..._e):0,Qe=_e.length?Math.max(..._e):1,At=Math.max(Qe-ze,Qe*.08,1);return Re.map((ke,ft)=>{const en=k(ke);return{x:Math.round(ft*er),y:Math.round(Pi+sn-(en-ze)/At*sn),item:ke}})}),bt=Ye(()=>Ot.value.map(Re=>`${Re.x},${Re.y}`).join(" ")),ht=Ye(()=>Ot.value.length?`0,86 ${bt.value} 320,86`:""),Kt=Ye(()=>h.value),Tt=Ye(()=>({gridTemplateColumns:`repeat(${Math.max(Kt.value.length,1)}, minmax(0, 1fr))`})),Ae=Ye(()=>Number.isInteger(Y.value)?Ot.value[Y.value]:null),Lt=Ye(()=>Ot.value.length?Number.isInteger(Y.value)?Y.value:ae.value:0),vt=Ye(()=>Ae.value?Ae.value:Ot.value[Lt.value]||Ot.value[0]),Ft=Ye(()=>{const Re=vt.value;if(!Re)return{};const lt=Re.x/320*100,sn=Re.y/86*100,Pi=Re.y<42;return{left:`${Math.min(84,Math.max(16,lt))}%`,top:`${sn}%`,transform:Pi?"translate(-50%, 10px)":"translate(-50%, calc(-100% - 8px))"}});function k(Re){const lt=Number(Re==null?void 0:Re.value);if(!Number.isNaN(lt)&<>0)return lt;const sn=Number(Re==null?void 0:Re.percent);return Number.isNaN(sn)?0:sn}function _t(Re){const lt=(Re==null?void 0:Re.segments)||(Re==null?void 0:Re.values)||{};return _.value.reduce((sn,Pi)=>sn+(Number(lt[Pi.key])||0),0)}function Ct(Re){const lt=_t(Re),sn=(Re==null?void 0:Re.segments)||(Re==null?void 0:Re.values)||{};return lt?_.value.map(Pi=>{const er=Number(sn[Pi.key])||0;return tn(wt({},Pi),{value:er,percent:Math.max(er>0?3:0,er/lt*100)})}):[]}function J(Re){const lt=Number(Re);return Number.isNaN(lt)?"--":Number.isInteger(lt)?`${lt}`:`${Number(lt.toFixed(2))}`}function ee(Re){return(Re==null?void 0:Re.displayValue)!==void 0&&(Re==null?void 0:Re.displayValue)!==null&&(Re==null?void 0:Re.displayValue)!==""?Re.displayValue:(Re==null?void 0:Re.value)===void 0||(Re==null?void 0:Re.value)===null||(Re==null?void 0:Re.value)===""?"--":J(Re.value)}function Ue(Re){var Pi;const lt=(Re==null?void 0:Re.displayUnit)||(Re==null?void 0:Re.unit)||"";if(!lt)return"";const sn=String((Pi=ee(Re))!=null?Pi:"");return sn&&sn.endsWith(String(lt))?"":lt}function xt(){const Re=[...new Set(h.value.map(lt=>(lt==null?void 0:lt.displayUnit)||(lt==null?void 0:lt.unit)).filter(Boolean))];return Re.length===1?Re[0]:""}function Bt(Re){const lt=Ue(Re);return lt?p.value===lt?"":lt:""}function Ce(Re){const lt=Ue(Re);return lt?m.value===lt?"":lt:""}function We(Re){const lt=String(Re||"").trim();if(!lt)return"";const sn=lt.match(/^(.+)(镇|乡|村)$/);return sn?`${sn[1]} ${sn[2]}`:lt}function $e(Re){return String(Re||"").trim().toLowerCase()}function mt(Re){const lt=E.value.map(sn=>Yt(Re,{field:sn})).filter(sn=>sn!=null);return[Re==null?void 0:Re.searchText,...lt].filter(Boolean).join(" ")}function Yt(Re,lt){const sn=[lt==null?void 0:lt.field,...(lt==null?void 0:lt.fields)||[]].filter(Boolean);for(const Pi of sn){const er=String(Pi).split(".").reduce((_e,ze)=>_e==null?void 0:_e[ze],Re);if(er!=null&&er!=="")return er}}function st(Re,lt){const sn=Yt(Re,lt);return sn==null||sn===""?(lt==null?void 0:lt.fallback)||"--":(lt==null?void 0:lt.format)==="number"?J(sn):(lt==null?void 0:lt.format)==="displayValue"?ee({value:sn}):String(sn)}function it(Re,lt){return lt!=null&<.unitField&&(Re!=null&&Re[lt.unitField])?Re[lt.unitField]:(lt==null?void 0:lt.unit)||""}function Vt(Re){return{"business-project-name":(Re==null?void 0:Re.key)==="name","business-project-locate":(Re==null?void 0:Re.key)==="locate","is-right":(Re==null?void 0:Re.align)==="right","is-center":(Re==null?void 0:Re.align)==="center","is-strong":Re==null?void 0:Re.strong}}function Zt(Re){(Re==null?void 0:Re.canLocate)!==!1&&(A.value=(Re==null?void 0:Re.key)||(Re==null?void 0:Re.name)||null,i("row-select",Re))}function nn(Re){const lt=Number(Re==null?void 0:Re.scaleValue);if(!Number.isNaN(lt)&<>0)return Math.max(8,Math.min(100,Math.round(lt)));const sn=k(Re);return sn?Math.max(8,Math.round(sn/u.value*100)):8}function cn(Re,lt){const sn=nn(Re),Pi=Math.max(.14,Math.min(.46,sn/180));return{"--heat-color":En(lt),"--heat-bg":an(En(lt),Pi)}}function an(Re,lt=.2){const sn=String(Re||"").replace("#","");if(sn.length!==6)return`rgba(48, 220, 255, ${lt})`;const Pi=parseInt(sn,16),er=Pi>>16&255,_e=Pi>>8&255,ze=Pi&255;return`rgba(${er}, ${_e}, ${ze}, ${lt})`}function Ln(Re){const lt=Ot.value.length;if(!lt)return;const sn=Re.currentTarget.getBoundingClientRect(),Pi=sn.width?(Re.clientX-sn.left)/sn.width:0,er=Math.min(lt-1,Math.max(0,Math.round(Pi*(lt-1))));Y.value=er}function je(Re){const lt=k(Re);return!c.value||!lt?0:Math.max(6,lt/c.value*100)}function Ht(Re){const lt=k(Re);return!c.value||!lt?0:Math.max(2,lt/c.value*100)}function wn(Re){if(!Re)return"--";if(Re.extra)return Re.extra;const lt=k(Re);return!c.value||!lt?"--":`${J(lt/c.value*100)}%`}function zn(){const Re=k(F.value);return Re>0?Re:V.value.reduce((lt,sn)=>lt+k(sn),0)}function Be(Re){const lt=zn(),sn=k(Re);return!lt||!sn?0:Math.max(6,sn/lt*100)}function pn(Re){const lt=zn(),sn=k(Re);return!lt||!sn?"--":`${J(sn/lt*100)}%`}function dn(Re,lt){return["forage-edible","wetland-yield-edible"].includes(Re==null?void 0:Re.key)?"#24f6c4":["forage-unavailable","wetland-yield-unavailable"].includes(Re==null?void 0:Re.key)?"#ffe06b":En(lt)}function Un(Re){const lt=k(Re),sn=Number(Re==null?void 0:Re.count)||c.value;return!lt||!sn?"0%":`${J(lt/sn*100)}%`}function En(Re){return r[Re%r.length]}function Tn(Re,lt){if(Re!=null&&Re.icon)return String(Re.icon).replace(/[^a-z0-9-]/gi,"");const sn=String((Re==null?void 0:Re.name)||"");return sn.includes("退化率")||sn.includes("利用率")||sn.includes("占比")?"rate":sn.includes("重度")||sn.includes("退化")?"risk":sn.includes("可食")||sn.includes("供给")?"leaf":sn.includes("不可")?"stack":sn.includes("产量")||sn.includes("鲜草")?"yield":sn.includes("乡镇")?"town":sn.includes("面积")?"area":["yield","leaf","rate","risk"][lt%4]}function ut(){Jt();const Re=ie.value;Re<2||(Q=window.setInterval(()=>{W.value=(W.value+1)%Re},oW))}function Jt(){Q&&(window.clearInterval(Q),Q=null)}function hn(Re){return`linear-gradient(90deg, rgba(36, 246, 196, 0.18), ${En(Re)})`}function Nn(Re){return`linear-gradient(180deg, ${En(Re)}, rgba(50, 220, 255, 0.12))`}return(Re,lt)=>{var sn,Pi,er,_e,ze,Qe,At;return Te(),Pe("div",{class:Xn(["business-panel",[`is-${a.value}`,`is-${Fe.value}`,{"is-compact":n.compact}]])},[o.value.length?a.value==="rank"?(Te(),Uo(aW,{key:1,rows:o.value,compact:""},null,8,["rows"])):a.value==="metric"?(Te(),Pe("div",$Oe,[(Te(!0),Pe(bn,null,Bn(o.value.slice(0,4),ke=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-metric-item"},[O("span",null,De(ke.name),1),O("strong",null,De(ee(ke)),1),O("em",null,De(ke.unit),1)]))),128))])):a.value==="iconMetric"?(Te(),Pe("div",qOe,[(Te(!0),Pe(bn,null,Bn(He.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-icon-metric-item",`is-tone-${ft%r.length}`])},[O("i",{class:Xn(["business-icon-metric-mark",`is-${ke.icon}`])},[...lt[2]||(lt[2]=[O("span",null,null,-1)])],2),O("div",XOe,[O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),ke.unit?(Te(),Pe("em",YOe,De(ke.unit),1)):Dn("",!0)])])],2))),128))])):a.value==="spotlight"?(Te(),Pe("div",KOe,[Ee.value?(Te(),Pe(bn,{key:0},[O("div",ZOe,[O("span",null,De(Ee.value.name),1),O("strong",null,[kr(De(ee(Ee.value)),1),O("em",null,De(Ee.value.unit),1)]),O("small",null,De(Ee.value.extra||((sn=n.panel)==null?void 0:sn.note)||"核心业务指标"),1)]),O("div",JOe,[(Te(!0),Pe(bn,null,Bn(o.value.slice(1,4),(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-spotlight-chip"},[O("i",{style:Ji({borderColor:En(ft+1)})},null,4),O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),O("em",null,De(ke.unit),1)]),ke.extra?(Te(),Pe("small",QOe,De(ke.extra),1)):Dn("",!0)]))),128))])],64)):(Te(),Pe("div",eBe,"暂无业务统计数据"))])):a.value==="donut"?(Te(),Pe("div",{key:5,class:Xn(["business-donut",[`is-variant-${Fe.value}`,{"is-dense":s.value.length>5}]])},[s.value.length?(Te(),Pe(bn,{key:0},[Fe.value==="ring"?(Te(),Pe("div",tBe,[O("div",{class:"business-ring-core",style:Ji(pt.value)},[lt[3]||(lt[3]=O("div",{class:"business-ring-orbit"},null,-1)),O("div",nBe,[O("strong",null,De(Un(he.value)),1),O("span",null,De(((Pi=he.value)==null?void 0:Pi.name)||"结构占比"),1)])],4)])):(Te(),Pe("div",iBe,[(Te(),Uo(Oee,{key:K.value,data:s.value,delay:oW,colors:r,opacity:.62,class:"business-three-pie"},{default:mi(({data:ke})=>[O("div",rBe,[O("strong",null,De(Un(ke)),1),O("span",null,De((ke==null?void 0:ke.name)||"结构占比"),1)])]),_:1},8,["data"]))])),O("div",aBe,[(Te(!0),Pe(bn,null,Bn(s.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-donut-row",{"is-active":ft===ae.value}])},[O("i",{style:Ji({borderColor:En(ft)})},null,4),O("span",null,De(ke.name),1),O("strong",null,De(ee(ke)),1),O("em",null,De(ke.unit),1)],2))),128))])],64)):(Te(),Pe("div",oBe,"暂无业务统计数据"))],2)):a.value==="structure"?(Te(),Pe("div",sBe,[v.value.length?(Te(),Pe(bn,{key:0},[O("div",lBe,[O("div",uBe,[(Te(!0),Pe(bn,null,Bn(v.value,(ke,ft)=>(Te(),Pe("i",{key:ke.key||ke.name,class:Xn({"is-active":ft===ae.value}),style:Ji({width:`${Ht(ke)}%`,background:En(ft),color:En(ft)}),title:`${ke.name}:${ee(ke)}${ke.unit||""} ${wn(ke)}`},null,14,cBe))),128))])]),O("div",dBe,[(Te(!0),Pe(bn,null,Bn(xe.value,ke=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-structure-row",{"is-active":ke.displayIndex===ae.value}])},[O("i",{style:Ji({background:En(ke.displayIndex),color:En(ke.displayIndex)})},null,4),O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),O("em",null,De(ke.unit),1)]),O("small",null,De(wn(ke)),1)],2))),128))])],64)):(Te(),Pe("div",hBe,"暂无业务统计数据"))])):a.value==="bar"&&((er=n.panel)==null?void 0:er.variant)==="capacity"?(Te(),Pe("div",fBe,[F.value?(Te(),Pe(bn,{key:0},[O("div",pBe,[O("span",null,De(F.value.name),1),O("strong",null,[kr(De(ee(F.value)),1),O("em",null,De(F.value.unit),1)])]),O("div",vBe,[(Te(!0),Pe(bn,null,Bn(V.value,(ke,ft)=>(Te(),Pe("i",{key:ke.key||ke.name,class:Xn({"is-active":ft===ae.value}),style:Ji({width:`${Be(ke)}%`,background:dn(ke,ft),color:dn(ke,ft)}),title:`${ke.name}:${ee(ke)}${ke.unit||""} ${pn(ke)}`},null,14,mBe))),128))]),O("div",gBe,[(Te(!0),Pe(bn,null,Bn(V.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-capacity-row",{"is-active":ft===ae.value}])},[O("i",{style:Ji({background:dn(ke,ft),color:dn(ke,ft)})},null,4),O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),O("em",null,De(ke.unit),1)]),O("small",null,De(pn(ke)),1)],2))),128))]),G.value?(Te(),Pe("div",yBe,[O("span",null,De(G.value.name),1),O("strong",null,[kr(De(ee(G.value)),1),O("em",null,De(G.value.unit),1)])])):Dn("",!0)],64)):(Te(),Pe("div",_Be,"暂无业务统计数据"))])):a.value==="bar"?(Te(),Pe("div",{key:8,class:Xn(["business-bars",{"is-dense":h.value.length>=5,"is-long":h.value.length>10,"is-single":((_e=n.panel)==null?void 0:_e.span)===1,"is-distribution":((ze=n.panel)==null?void 0:ze.variant)==="distribution","is-capacity":((Qe=n.panel)==null?void 0:Qe.variant)==="capacity"}])},[(Te(!0),Pe(bn,null,Bn(h.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-bar-row",{"is-active":ft===ae.value}])},[O("span",SBe,De(ke.name),1),O("div",bBe,[O("i",{style:Ji({width:`${nn(ke)}%`,background:hn(ft)})},null,4)]),O("strong",null,[kr(De(ee(ke))+" ",1),ke.unit?(Te(),Pe("em",xBe,De(ke.unit),1)):Dn("",!0),ke.extra?(Te(),Pe("small",wBe,De(ke.extra),1)):Dn("",!0)])],2))),128))],2)):a.value==="column"?(Te(),Pe("div",{key:9,class:Xn(["business-columns",[`is-variant-${((At=n.panel)==null?void 0:At.variant)||"solid"}`,{"is-dense":h.value.length>6}]])},[p.value?(Te(),Pe("small",TBe,"单位:"+De(p.value),1)):Dn("",!0),(Te(!0),Pe(bn,null,Bn(h.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-column-item",{"is-active":ft===ae.value}])},[O("strong",null,[kr(De(ee(ke)),1),Bt(ke)?(Te(),Pe("em",ABe,De(Bt(ke)),1)):Dn("",!0)]),O("div",CBe,[O("i",{style:Ji({height:`${nn(ke)}%`,background:Nn(ft),"--column-load-delay":`${ft*.075}s`})},null,4)]),O("span",null,De(We(ke.name)),1)],2))),128))],2)):a.value==="projectTable"?(Te(),Pe("div",MBe,[O("div",EBe,[to(O("input",{"onUpdate:modelValue":lt[0]||(lt[0]=ke=>x.value=ke),type:"search",placeholder:I.value},null,8,PBe),[[Kf,x.value]])]),O("div",RBe,[O("table",null,[O("colgroup",null,[(Te(!0),Pe(bn,null,Bn(M.value,ke=>(Te(),Pe("col",{key:ke.key,class:Xn(ke.className),style:Ji({width:ke.width||void 0})},null,6))),128))]),O("thead",null,[O("tr",null,[(Te(!0),Pe(bn,null,Bn(M.value,ke=>(Te(),Pe("th",{key:ke.key,class:Xn(Vt(ke))},De(ke.label),3))),128))])]),O("tbody",null,[(Te(!0),Pe(bn,null,Bn(P.value,ke=>(Te(),Pe("tr",{key:ke.key||ke.name,class:Xn({"is-active":A.value===(ke.key||ke.name)}),tabindex:"0",onClick:ft=>Zt(ke),onKeydown:[V2(Ws(ft=>Zt(ke),["prevent"]),["enter"]),V2(Ws(ft=>Zt(ke),["prevent"]),["space"])]},[(Te(!0),Pe(bn,null,Bn(M.value,ft=>(Te(),Pe("td",{key:ft.key,class:Xn(Vt(ft)),title:st(ke,ft)},[ft.strong?(Te(),Pe("strong",DBe,[kr(De(st(ke,ft)),1),it(ke,ft)?(Te(),Pe("em",NBe,De(it(ke,ft)),1)):Dn("",!0)])):(Te(),Pe("span",kBe,De(st(ke,ft)),1))],10,IBe))),128))],42,LBe))),128))])]),P.value.length?Dn("",!0):(Te(),Pe("div",FBe,De(D.value),1))])])):a.value==="table"?(Te(),Pe("div",{key:11,class:Xn(["business-table",{"is-dense":f.value.length>8}])},[O("div",OBe,[(Te(),Pe(bn,null,Bn(2,ke=>O("div",{key:ke,class:"business-table-head-group"},[...lt[4]||(lt[4]=[O("span",null,"乡镇",-1),O("span",null,"亩产",-1)])])),64))]),O("div",BBe,[(Te(!0),Pe(bn,null,Bn(f.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:Xn(["business-table-row",{"is-active":ft===ae.value}])},[O("span",zBe,De(ke.name),1),O("div",GBe,[O("strong",null,[kr(De(ee(ke)),1),ke.unit?(Te(),Pe("em",UBe,De(ke.unit),1)):Dn("",!0)]),O("i",null,[O("b",{style:Ji({width:`${nn(ke)}%`,background:hn(ft)})},null,4)])])],2))),128))])],2)):a.value==="stackColumn"?(Te(),Pe("div",{key:12,class:Xn(["business-stack-columns",{"is-dense":S.value.length>6}])},[O("div",VBe,[(Te(!0),Pe(bn,null,Bn(_.value,(ke,ft)=>(Te(),Pe("span",{key:ke.key||ke.name},[O("i",{style:Ji({background:En(ft)})},null,4),kr(De(ke.name),1)]))),128))]),O("div",HBe,[(Te(!0),Pe(bn,null,Bn(S.value,ke=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-stack-item"},[O("div",WBe,[(Te(!0),Pe(bn,null,Bn(Ct(ke),(ft,en)=>(Te(),Pe("i",{key:ft.key||ft.name,style:Ji({height:`${ft.percent}%`,background:En(en)})},null,4))),128))]),O("span",null,De(We(ke.name)),1)]))),128))])],2)):a.value==="peak"?(Te(),Pe("div",{key:13,class:Xn(["business-peaks",{"is-dense":h.value.length>5}])},[m.value?(Te(),Pe("small",jBe,"单位:"+De(m.value),1)):Dn("",!0),(Te(!0),Pe(bn,null,Bn(h.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-peak-item",style:Ji({"--peak-height":`${nn(ke)}%`,"--peak-color":En(ft)})},[O("strong",null,[kr(De(ee(ke)),1),Ce(ke)?(Te(),Pe("em",$Be,De(Ce(ke)),1)):Dn("",!0)]),lt[5]||(lt[5]=O("div",{class:"business-peak-stage"},[O("i")],-1)),O("span",null,De(We(ke.name)),1)],4))),128))],2)):a.value==="line"?(Te(),Pe("div",qBe,[O("div",{class:"business-line-chart",onMousemove:Ln,onMouseleave:lt[1]||(lt[1]=ke=>Y.value=null)},[(Te(),Pe("svg",XBe,[lt[6]||(lt[6]=O("path",{class:"business-line-grid",d:"M0 18H320M0 44H320M0 70H320"},null,-1)),O("polyline",{class:"business-line-area",points:ht.value},null,8,YBe),O("polyline",{class:"business-line-stroke",points:bt.value},null,8,KBe),(Te(!0),Pe(bn,null,Bn(Ot.value,(ke,ft)=>(Te(),Pe("circle",{key:ft,cx:ke.x,cy:ke.y,r:"3",class:Xn(["business-line-dot",{"is-active":ft===Lt.value}])},null,10,ZBe))),128)),(Te(!0),Pe(bn,null,Bn(Ot.value,(ke,ft)=>(Te(),Pe("circle",{key:`hit-${ft}`,cx:ke.x,cy:ke.y,r:"13",class:"business-line-hit",onMouseenter:en=>Y.value=ft},null,40,JBe))),128))])),O("div",{class:"business-line-hover-zones",style:Ji(Tt.value)},[(Te(!0),Pe(bn,null,Bn(Ot.value,(ke,ft)=>(Te(),Pe("i",{key:`zone-${ft}`,onMouseenter:en=>Y.value=ft},null,40,QBe))),128))],4),vt.value?(Te(),Pe("div",{key:0,class:"business-line-tooltip",style:Ji(Ft.value)},[O("span",null,De(vt.value.item.name),1),O("strong",null,[kr(De(ee(vt.value.item)),1),vt.value.item.unit?(Te(),Pe("em",eze,De(vt.value.item.unit),1)):Dn("",!0)])],4)):Dn("",!0)],32),O("div",{class:"business-line-labels",style:Ji(Tt.value)},[(Te(!0),Pe(bn,null,Bn(Kt.value,ke=>(Te(),Pe("span",{key:ke.key||ke.name},De(We(ke.name)),1))),128))],4)])):a.value==="heat"?(Te(),Pe("div",{key:15,class:Xn(["business-heat",{"is-dense":g.value.length>6}])},[(Te(!0),Pe(bn,null,Bn(g.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-heat-cell",style:Ji(cn(ke,ft))},[lt[7]||(lt[7]=O("i",null,null,-1)),O("span",null,De(ke.name),1),O("strong",null,[kr(De(ee(ke)),1),ke.unit?(Te(),Pe("em",tze,De(ke.unit),1)):Dn("",!0)])],4))),128))],2)):a.value==="split"?(Te(),Pe("div",{key:16,class:Xn(["business-split",{"is-dense":d.value.length>10}])},[O("div",nze,[(Te(!0),Pe(bn,null,Bn(d.value,(ke,ft)=>(Te(),Pe("i",{key:ke.key||ke.name,style:Ji({width:`${je(ke)}%`,background:En(ft)})},null,4))),128))]),O("div",ize,[(Te(!0),Pe(bn,null,Bn(d.value,(ke,ft)=>(Te(),Pe("div",{key:ke.key||ke.name,class:"business-split-row"},[O("span",null,[O("i",{style:Ji({background:En(ft)})},null,4),kr(De(ke.name),1)]),O("strong",null,De(ee(ke))+De(ke.unit),1)]))),128))])],2)):(Te(),Uo(aW,{key:17,rows:o.value,compact:""},null,8,["rows"])):(Te(),Pe("div",jOe,"暂无业务统计数据"))],2)}}},sW="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD0SURBVHgB7dEBDcAgEACxZ/5NTgkg40JaC137mgesf57wDSlCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTEHKbcBaYZyb5dAAAAAElFTkSuQmCC",rze=""+new URL("pathLine2-d4134d4b-balabala-1782919616283.png",import.meta.url).href,aze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADzSURBVHgB7dEBDcAwDMCw9vw5f4MRTTYF73/NC3bnBd+QIiRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSMwBQCIExogIrTYAAAAASUVORK5CYII=",oze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMxSURBVHgB7dZBDcJQFADBB/kCuHAgAQckHAA3Tf27aIXsjIjNXv7bfgyQdB0gSwAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgbN2erwGaHACECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCErfv7M0CTA4AwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYCw9fj+BmhyABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABB2Amb1BS2MWc5zAAAAAElFTkSuQmCC",sze=""+new URL("ocean-bg-8c848b8f-balabala-1782919616283.png",import.meta.url).href,lze=""+new URL("rotationBorder1-2ce8e0ef-balabala-1782919616283.png",import.meta.url).href,uze=""+new URL("rotationBorder2-7496b968-balabala-1782919616283.png",import.meta.url).href,cze=""+new URL("chinaBlurLine-1a2cbc0f-balabala-1782919616283.png",import.meta.url).href,dze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA0ESURBVHgB7Z3/VRu7E8XFO+9/kgpIKoAOEioAKoBUAFSAqSCkAkwFQAVABUAFhAoIFfjt3bzl+TlGtndG0oz2fs6ZY/L94R2v9u6MpJG0FkKYBELIXP4KhJB3oUAIiUCBEBKBAiEkAgVCSAQKhJAIFAghESgQQiJQIIREoEAIiUCBEBKBAiEkAgVCSAQKhJAIFAghESgQQiJQIIREoEAIiUCBEBKBAiEkAgVCSAQKhJAIfweSlA8fPoRPnz6Fra2t9u+NjY23/wyfsBg/f/58+/z161d4fn5++/vh4aH9JOlYC9wXSw089F+/fg2bm5tvosBnSjqhwO7u7lrx4G+iAwUiAA//7u5uKwh8LooGuehEcn19HW5vb9+iEFkdCmRFECF2dnZaQaSODlpAIBDKxcVF+0lWY0Jb3s7OziaeeXp6mpyfn08aobu67wXNlbPFDQ9WLUAsBwcHkyYSumqDzObKWRP28vIyqQ1EFQrlT+M8SA+Qy9dGE0lCE1HCzc1N288i/+FK0RaspjTrPRqhsJ/y21w5a8ZqTLPmMfTUa3ApFuYqMEQrpcY0ax5d6tUIxc2wtjauFC2xw8PDtze/NH0YQpo1SzfqVbINC5grZ3sZUgTk1NPg39LvHUqaNcv9/f2Q0i5Xzq5s01FjlibVEn33eDyeDJmTkxMz7ZzQXDm7tM2LGrMgZWj6JL2vMcQ0axbc45qjSZW1WBjHv7y8XKp48PT0NIxGo9AHfD86sKsUKaL6FrVRXcn66+vruyXr+N719fW3znFXMm8N/Jbj4+NwdXUVasSNmpcxhP1VQPoleQO+l2bhe/F2Re0WOrbNwy2KVp3hOxC5kB7iu3ENK32hSlMuV85GH5wmakz6gLH+vtfFgwo6QRwdHbViyP37cU1ce1FamRq0gcaLwJC5cnauIQKgPyGh77Bv90a39lBAuIhuJaIL2qKifokrZ/8wvDml4gAaw75WDSle7shSkUhcOfs/gzg035C1T4LhgUVU0XihLAPapkS6qWyunH2z/f199fQB31dZ/jzXIBS8DHIIBfcUbeXp/syYK2dbww1PRTPk6+peSA0d+xxCcSwSV84mFQfAG8/T/dAwRJQcS4mdisSPs9p9jllqnxVeZMtUH0hw2ifx4SgaL5U48L1INbzci9SWsn/iUCT2ndSY53iPoUeN2D1PFU2cDQHbdhCjSqnEwaix2DBokQJpoWhGs+1g3/KRRY3D9dbLm9Zk7CxoWwe/365zqxYeLsPAFvuoGe4Z7p02DgocbTrWFQFqglnkIUwEprQUi8SMR3N7TqXolA9tAjClafdLpEsOEps9p7RHTygOfdMWieFiUVsOafc7KI50pi0So6OKdpxBmNWE4khvmiIxmmrZcUZzlITiyGeaIjGYatlwBOUNWmCkxcrvGoppjm4ZS7XKO6E5aoUoZOE3Dc0wfK6VARhbl1PeCWyaoEFla6HdmeaL7vv371Z+V/mbqkUFyzvdm+Zmekbas6wDWtGDnXI7hj6EBkY67OUurvW2qXlHEq+mNdlroAzF901kv8OmaS1wM/DyK3NhregxwPMq3JhWqlU4ipS5sEb0YGpl3ypo5/wX1Rq5Ympl37TaulQUKXJG4cnJSZDy48ePdtt9Yhu0EY6YkKJxrmRf3L1R2DH3ZZgVl3bYS82uZ48gGofUM3r4AgcEoc0k4OCgptMfSpBVkdJSBPz/c/tMk5tGFClUZ5fvYhpDuxzW9WsaZfG5O+tZU6z9/f0gAWnV7e1tID45Ozt79zzGZSnRWc+mRml6JTkqjWbDpFGkwObieS6kkV5x5Mq/oS8iJWealS3FkqZXSK04cuUfpFjSNDl3mpVFidL0ip3zeky6KWDmkcz0F5FODg7xUJuaTWPId2NjI4uvWVIs6eTg1dVVIPWANOv6+jpI2NvbCznIIpCdnZ0gQXoziT3G43GQsLm5GXKwFn6HkqQ0OWNo0qzQl7W1tUDqAqUjeC7w2QdEoY8fP4bUJI8gW1tbInFwYrBO8IA/PDyEvkBYTT8kpCa5QCTiAEyv6kXattvb2yE1yQUi7aAzgtSLtG2RnaQmuUAknSlpGCa2QdtKarOk2ckyZOmD9IXiqB9JG+cYyUoqEHSk+o5SgMfHx0DqRtLGiCCS52sZkgpEmiOy/1E/0iwhdZqVPIJIkK4dIPaRCiR1Rz2pQKTqZh+kfqQV2q5TLIlAED0YQepH2s6DTbG49mM4SNp6fX09pCSpQCSlAIwew0EiENcRRAIjyHB4fX0NfRlsH0Ry04gvJNmCa4FIYIo1HCy3tVmBEGIBCoSQCBQIKc5oNGpXjfaxz58/h5RQIIREoEAIiWBWIKmH7whZhqQCkQzfpS4hIGQZzAokx5YuhCwiqUCen59DX3Js6ULIIsxGkBwL8glZRFKBSAoOpevZCdHAbAQBjCKkNEkFYn29MSGLMJtiAQqElCZ5iiURSa4t7kk5rKfRf4fEIM3qexMYQern/v6+/cRzcnd31+6FJt2SVJukR1idnZ1NJDQiyXLUFi2/oW3foxHO5PLycnJ0dJT1VNtZyxJBJGB3eO6PVSexnf+RPcCmT7TFc4AIg+1K8Xeu5yKpAqUHeN7c3BR7e9DSGtpWQo7sIssRbC8vL6KjtrAohmvU66N5xkNfMPiTerEUyFLuLjlJCMJiZ70+plOnPuTa+T+LQKS54v7+fiB1IT35OOfR4MnzOGk/BIfO4/D5HL7S8hjaVAKeqRx+ZokgyBelhYvSsw6JHQ4ODsT7NufaeTPbklvpiaaHh4eB1IE0Zc59sFKWUIXJHilMs/ybNN0GmScO890cad45Go1y3hhaAjs/P59IeHp6yupv1l1NLi4uggSkWVxE5RfU5En7krnTq6wCkQ7NQRxHR0eB+ATikFbvSl+yfcgaslCEJoFDvn4N6ZGn9AqWfeM46WgWo4hPkB5Lo8fp6WkoQVZF4u0v7awzivgyjFxJowfINTk4bdkjCIoOpXkko4gvNKLHeDwudixfdlVqzImUeqPQVjONeY/CbV3kouK1AIBrRexbBe1c5sJaUQRLMgvePFrEDg4OJhqUXHIbCl5Y5e2CDjtTLXum1TE3kCWUu7hWFGGqZc80Xn6gcPSAFb242o1kqmXHTk5OJhqgbsvA7ynrQGzrl1Ux8LYZvGm2p5HUubgD4r2zOpDzsj9SzrT6HcBI9ICVd0Jjdr0DtV6cZS9j0jq7DmMvOhNOtH0ILQy9fQZj0nUe02B42NBvM+OIWocdoKNo6bfVbFqdcoAoZOz32XEGYVUr1QIUSXrTFAcw2Ic05YxqqgUoknSmLQ6jS6rNOaSaagGKRN+0xWF4steeU9qpFuBEop5pi8P48LxJp9TKUADrtXQMw+eao1Udu7u7ln+3WcfanFQDHsIjN7xgtOY5pnGwlZNp59pThiQYG1N3aYjmWjPk06BtHfx+2w4irPdtHG40J7fDw8NJCtCmTioezDvYq8aH4pDfc+3RxA5nNXMunGz7EcuObKH40cvvsmiIGtqjiB0OB0zcOLqUSJzktSYtZdToxOFwwMSVs9F1zlqVvBjnH9KwMO6Z9tzGPJwOmLhytrV5ItHKa7sHBd9X++RiJ4xU6VQF4oC5cvbNcMO7htUSx7zBAPwb16opouQUBq7hfKjdlbP/M+SzmiMisVliXAf/vWeh5BRGJ44KJmldOZvMVtkBEB1ZL29FiAKlHCk73/PAC6WSCgZXziazPmUUeEMiqlirJYIoMPsN33JFi2kq2xvAlbNJTGsHQLyl0bEv8ebENXFt+FBCFB0YZq9pT4C1f/8YNM0bT7z7+CzYxf7h4aG1u7u7t3/jUwJ2toevjSDC5uZm+wmzcDQdzu8YjUahJgYvkKbTmrVRIRBs4z/9+fr6Ovd/u76+3j74nShgFs9oxG/Y29vLfn5gDgYtEDxwiB6kPxDFt2/fip3dkZrsB+hYAtGD9ANR4/j4OGxvb1crjg7zHaUUprlF5tDAQMCASnFcOatmKRYA1Q5Gxwa4tt+Vsyqmud59KGAJwUC3dHXlrJohRRiPxxMSB+nUwNf0u3JW3RBNcpdheAD3hMdJBAqkMwrlNxTGH+bK2eQ2xNQLnW/0MSiMuebK2WwGoaBGq+bRLhRoYnMLnqcSNVfOFjG8WRFVahALo8VqxmLFFWkerNBElvDlyxf1AsdUYKb7+vo6XF1dVVkvlRIKRAAEAsHs7Oy0FbVWBIMyEIjh8fGx/ay9FCQlFIginUggmq4UPXX1LR5+lNE/Pz+3n4gQFIQeFEhiIJBOKF3JOsrYu2izKOogGnSl8SiL70rkIYbub5IOCoSQCIMudydkERQIIREoEEIiUCCERKBACIlAgRASgQIhJAIFQkgECoSQCBQIIREoEEIiUCCERKBACIlAgRASgQIhJAIFQkgECoSQCBQIIREoEEIiUCCERKBACIlAgRAS4R+Py6dcyrAs4QAAAABJRU5ErkJggg==",hze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA4qSURBVHgB7Z3xVdvMEsX15bz/k1RAOoBUQDrAHUAHpgOgAkgF2BWAKwBXEKggUEGcCvx09d76M/LMalfalXal+zvnHhPFllbWXu3MrCT/UxTFtiCEiHwqCCEqNAghFmgQQizQIIRYoEEIsfCfgkThy5cvlU5OTopv375Vfx8dHe2WY9n++yQ2m00l8Pb2tnt9f3+vlr+8vFSvWGbeR8LyT8Eyb2dgAuj4+Ljq+MYUfQKTQDDNer3e/U26QYN4YkaFs7OznTG0EWBozCgDrVar3YhD3KFBHPjx40dxenpavUI58/z8XI0weIWIHRpEAUbAKHFxcRF8hDC5xX6OoWFyFFuu0haEYTDJcrmkWRRokD1CmcLE/0imTW5gEmmTbLcFuY1J+s3fyH1M6NelzTTLIZM3CDrWfD4vZrNZqw5mOtbr62v1OmRFyZhkv2jQdp9ubm52+zN1tlNUOVpsHx4etn/+/Nn68OvXr+3d3d22NNS27JDJ7yfaiLaizWi7L/f399V3lfp+RlRWje0sHOynpyfnDgID4f2Xl5dZGKJJZUi2LUPI6uTgA74DfC6nfQ2krBrbWji4v3//duoMxhT4zBhMoQn75msWfIcTM0pWjfWWjzHGNFL4yowsrmHYhIySVWOd5RpKYbRAfD7xOPuDysR+u1gsti7AKMhxcto/T2XV2EbhTOhqjOvr60mOFj7fpesIjGQe789p/xyVVWNVoaNfXV01Hkgc7KmGUV3kahQcg5F9t1k1VhTCo6aDN8HkMopcjDKy7zqrxn4QzlRNFRiGUnHkYpSRhF1ZNXYnl1EDyTeNEU/o/PiORz6aZNXYqsPf3t5aDwqS9JEmjEnKpTCCY5bpySqfxuJA2EYNhFNIwHPapzGpKezC/2V44sqjofP53HrdFHIRhlPDCwawzaFkeBJLv5G2kApf+MgnqrJU02iCcnAm+5Ju4zAi2GJb5hppqyk3wWUtGRy/NBvWlG+gdJtq26mPwrHSyCAvSa9RuBZIyzewnNdN5SdbWR7LccwTbXtaDTo/P1fNkcmQTClqigpw7BNsdzqNQaVKA5URVqnyF46hbXIxwQpXGg2xXWjIfGN8suUliVW4hm+EzRyc+BuvMjHJsA2wmYNX345fOMaJm2S4jWs5BytV0xKOtVaYSSCCGGbDqFho5ki45EdFkq20P3B1a5gvg+agpH4hmWTgftHvBm21cIZVFPqAdvIcaA6sv43ZzMGEnDLSEnf0nQHmwvrbmPbMJc5zUHUhOZfAxY89t6WfDWnlXJqD0qTNk+D2hx7bEX8jWjkXlxz0uKNUhtJuvuqx/Bt3A8g7pMrEQPEklZnQR6TQvMekPe7OSUl5pvcmUwNp4JNsvJVrt8qynEv5Siv/9pCPxFmxVqpjUk61lZa0Rz7hhl+pNt8xQImOGpmke9wjh1rhV4pHTko7wbyD6iotH8FjnyJtM+wKtdCKM+VUKOExTz2GWuFWplWtMKLE+KKo6Up6aHmkUCvcyqTZcoZWVAzBCFKoFaEIFGZFMAFDK6pPaddrBT4hh1mRlJizakXFllTVCtzvuq9ES5oYWlGxpUUuARP27iuREnNeiEj1Jek5WwFHkW4rkMq6TMypPqUl7IHy324rkEYPJuZU35IuQ0HfDLDu9h/WRo8+vhCK2pc2BxfgZN3+wxw9qJQU6YSdVGMoqpOkk3bHila7D0r1Z44e1NCSJg87VrT8PyTdvMLRg0pBWkWr7SjyqWjB+fn5wbKbm5uCkKHZbDbFz58/D5bP5/OiLV6O0mYuOe9BpSJpFMG/21zp6z2ClEPVwbLFYlG8vb0VhKQARpHlcvlhWWmOosxPijZ4OUqqEvCB01RqkvJkPD6oxboG2ShFRZdUafVN1r1CLCk5lxIiQlJgtVodLJvNZoUvzm6Swism51Sq0pJ1z/W4vVEKrx4fHwf/EijKpq5hlnOIJYVXpUEKQlKmXs0CvmGWk5Ok8IoPn6ZSV9cwy2kEwdxHmWt8WIYECPVmQlIGffTl5eXDMsyJSPN5Es4GqcPwiuSCVM1yNQhoHGakRIfVKyoXIcyq43GFr//KOTlI5SbpR3hccujGEOvk5ORg2Xq9LgjJCanPSn27TqNBpJLY8/NzQUhOSH3WpdzbaJDj42OnjRGSMlKflfq2hDUGq9eQmX9Quao+l+cyH2IdQRCjoWa8T72mTEgu1PMQ9O2mPMRqkPrkIHh9fS0IyRHp5N7JINJkCkcQkitSHtLJIFISQ4OQXJFuC5eipH28QiyYg9dfkVxB362bpKmSpRoECUzdIDQHyZ16BIQ+Xi9E7aMahAk6GSPv7+8Hyz5//qy+3zqC1OGjfUjuSH34+/fv6vtVg0jZPQ1Ccsc3UfcaQZiDkNyRDBIsBymn6gtCckY6yR8dHanvVw0ifUhKcAjJCWkE+fr1q/p+56eaMLwiY6Hel1tVsTgHQsZKvS+3StKbVkpIrvj0ZecqFg1CxkK9L7eqYtk+RMiYaGUQQggNQogVGoQQCzQIIRZoEEIsqAZhWZdMBVtfdzYIy75kLPjM8TmHWDQIGQs+fVk1SP2qRxqEjIV6X7bdCMgQi0yOICPI379/D5bZbiwhJAekK3dbjSC+N5YQkgOSQWw3AnqVeZueQkdI6vg+a8FrBKFBSO5Ifdj2OF3VINKHaBCSO1IfDjJRqK2ckJyQnsXbuszr+6BfQlJHmgNpPZPu+6BfQlJG+kWppqeFWg0ilb8YZpFckR6n2/RAdq8RBEi/OkVIDkgGafrFZm+DMA8hueKboBusP4Nb/xlo/JRu02coKkXhJ8yD/gw0YKJOxoCUoLv83majQaQkhnkIyQ2pz7r8YlqjQR4fH502RkjKSH1W6tsS1hisHJq2dRDLNX2OolJSPf8A6NsOn21e+dPTU9uVU9TgKvPmg/6LPu3yWad70tfr9cGyi4uLgpAckMIrqU9LOBlEmkw5OzsrCMkBqa82TRDu4zTU1OdD8G+GWVTqknJon7k858f+LJfLD/9GXXk2mxWEpIzUR31GD+DkpDKOa53oUNRQenh4OOi36Mse63DfGMMsKidJ1SvfS6W8Hl4thVmsZpFUkapXvuEVcHYTwywqJ0mTg57hFTTIRikqqk5OTjqHV5D374OsVquDZaxmkdSYz+cHy25uboo2eDkKSTmTdSplSck5wHLfdXmPIHgCRD3RQbJ+eXlZEJICUnK+WCyc7h6U8HaVlKxzFKFSEXKNgHlyu0ZIV/iWo8ggXwhFGZXTDgf9smOltd0HpVGE96tTQ0saPWCaDutMqjEU1VrS6BHgpB2+QcxFqCEU6YQdvlHX19e9fSkUBUUaPaDwDWNFi+pTmN+IGO53b6BU0bq9ve3tC6KmLfS1SKMH1H0lUkULtJm5pCgfabPms9ks1DbCNFQaRXilLxVbUr+7v78PuY0wK9KczMlDKpak/DdC5BKuwahe1WHCTsWQlphHqKCGWxmMIDUa9wXH+qKoaQphVJ1Ic3BhG64l7AGTJmri0kKrSFdxhN8B6UkSCLVY1aK6SgutAifm+wq/Ui3UYlWL6iqpaoW+FvHkG2dHtFDr6uoq1o5QIxf6To+hlVG8Hbq7uxN3iA95oHylnXDRxyJvO97KtVCL+QjlIy3v6OnK8fg7V3/IA8Djgzg/QjUpgZNs/J3EbLpExMoDNRJJFyKCHq/Q6GUjaj7CpJ3SpCXlPd9v1NuGxBJdz2cDKhNp5hjg9zH725gWT4Lz8/O+d5xKVOgLEpHnOzT1ujE1aQcs/1JaOXcgc0C9b7B6sLBkEizD/w3RJmp4af0CDNgvBtmoesEZTTJN2cwx8KOkBtuwWv7FF8VwazrCsdbMkUABZ9CNizdZGZi4j19aQg4SeXzU4A2wmoTzJOPVfD5P3RxQEo2gSSYmbZ4jMXNAyTREzUkALjngtVv5C8dQul3WkOCkcVKNUatbYMBaOBVAOHbSb1wCJOmJPvg8uQZVJT9txh3LWeHKT7ZKVeKl/SQbpd4DYGBeko9s+UYGUUGyDbMOyQAXPzLkSvv4aReomuOXQV6ZdOMq2SpcOAPxR3vSEx7zpIVUoIdbZUMpi0ZW1Q3bF47KCEeT4YURQXrskwHHMLPbG7JpaGNewtFkWGHiz3YSy7QKmVVjqzOUdneigblJv2rKNQCOWabzWFk1dieMFLbRBGBykUaJJ3R47Z7x/VEj87J8Vo39IHT+xWLReIAYdoUVjIHSrS2cAshFRnD1Q1aNFeUymtAo/X7XI5rMzaqxqnCmspWDaZRu3y0qT03GADgGI7tmLqvGNsol7No3CnMUXa6hFBhxYSSrxjoLE1UuZzyAORTe5vuvEB4h+XY1xsivjcuqsd5yiZkNuKxlqqOKCaOayrWGCYWqWTW2tXyMAlCBwWfGfA8K9g37CFO4jBYTM4ZRVo3tLNMhfDBmGcPIsj9SuJoCTCCU0pRVY4MJB9slma+DMAzxOXKcHEYXtBFtRZttV0ZLwEA4OUz5/pt//v/HZClHhaLsAEVZran+9uXl5aXS6+vr7u/NZlMMQWmG3f4cHx9Xr233abVaFXd3d4PtSypM3iD7oEOVoVRxenraqmMZjEnw+v7+Xry9vVX/xivUBbTLGAE6OjqqXssqXKc2o33L5bJ4fHwsnp+fC/I/aBCFUGaRQGfclw2YYV+h20FT2KFBHIBZIJgFrzkDI6zX6+qVpmiGBvEEZ3GEM2XiW8X5+Dv0mT0UJsxDfoRRYsj8KFdokACY+N8kxyY/6BPkNibnMcUCiHSDBomESaTNiINXk1AD82rLLfZzFJPoQzCBSfrNqMCRIQ40CCEWPhWEEBUahBALNAghFmgQQizQIIRY+C9cNXNlJEjHoQAAAABJRU5ErkJggg==",fze=""+new URL("huiguang-3c5dfda5-balabala-1782919616283.png",import.meta.url).href,pze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFPSURBVHgB7ddhbcMwEAXglyEoBEPoGARCIYTBymBhMAgrhDFoIZTBIATC21lxtGhdYieOW7u6T7L6x5HvfPXJBpRSSj0jko2MGqWTJL7tQMkkgSN/tSiRBG5cNQadjB1KI0GfeOsDJXHVmFKjFBLseSaRM0rg2q3PAbn7c8Cn2Dn5HnwJ7p3hWuSI/QHvFiRi5xrkhv+3W59P5ITz7danRi4YdsCn5NGOGdZufRo8kgSwi6zGIPoe9oI4bzIM4tkkjngExh3wqaoYrBRTkRbbslW5bzuWnTswnRorVFiB/dPVII1rVVWvWGjxX4t9qzRIZy9rpD34vH2+zrnIaN03dtj3+zXw27TPYvrvUxcXsMH8ZjRu7pw0z2JOt9sh+MU7GJCUwdZG1ejcwg03LP8oqa9RItvew9i325P7Tf6yY3/1GdbcQymllFJKKaUy9gO4eI9ILG1riwAAAABJRU5ErkJggg==",vze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA5BSURBVHgB7VxbjxxHFT516Znd9a537axDAhGJkQKCkEDCA5ECT0TwgBTxjgQviN/DD+BP8IgEAolAECQkcYAkCiEX2TGxY+9lrt1dF75T1T1T055ZO9u9thPtkdo909Ndl6/P+c6lak10KqdyKqdyKqdyKqdyKp8rEXQXxXvfqj8hhKe7JHcFmASQ+iwb31c+isM1vt8VgE4EmCVAiCWHpNv3b6kCgyJAPvl+oiB1DkwDlBSEWktU9VkN4mextBkchsgADb8bAaqBqcFKQeocoE6BqUBJgakBYQA0fwYYGhe04LnMQaLqM890NnEgYfi7jWe/Q1RQBKgGaaZF9y0wCSj1MdMMPoZEvQoQhaMnIlAMjhwRZXU7ZzBZzLBkBHoApQ9QxkQ5rjkAVJ6NwJU0B8hWjwYu6gqgToBpgCKTQ0ND+ls4TwAILqzhmjIF9YFIJjLqGWNkRlrjHMbiNRmttfUlFT4jC8QKHw82q5K1aBNAfQIgducalGpPJ+C0BibhlBQQtY8XDlXRUIv+Oj7n0Apwxrotyz70fksL8QVM4DFJ/itSyl3n3QU8l0shPoYNXYN6vEfSf2i8+hgojTeybAoNKgFwbqMGWbRZVPyDpucmdj8BU2uKqo4+E6uK5rPGgODcd8acxaC/pIT4IQD4Dp7+GkWTWjawgSX/qrP+RU/6j47MUGo9xs1jzH5SaQ+Dk+9G06oJuhOTagVMw4QCueLIBlFbAig4ztiSNpww2xjp93pK/gQ3f4Mqsr0D2Xfk/2Qd/UYo9TZMbKwyGlSmlQP0KWvOhag1M3DuF2CCpsDuM5BlvwbFFrTppNmEhpzD8QK05Od4qr/YhB9D98GvlFfX+FnQCG0s9EXifev9rwrn3si03gcCQXtwnmxGrjG0CE4rk9LUTlKy1ZhxjzlFxMmdAWwbNoLyPED5Ge7pJ+8iN879s/T+iifogfdlbFFkuKOfKXUBbT2FK+tVR4+Bl35BUv46n5pLPaUJrO3AOQ4eL9jSuUUibiXHBqYZyO1BY+BBJIPCnKJKOlMKs9MT8hlo0C8pgBK9hvH+KgD5O0Y/AmAMpAAgvbptXB8XxrxrhPior9QzAPnL1U9PAJyfukxcF4pK9GPZvVdo8KkmYVV9PrZ0pTF4f5SpGJ+wtvQttEU5t6u0ZvOpzcJbTx/kzv0DQJSsVYrduFwYhwefWCvl2Dk3nRrz0prWEog/wv3BOJ4GOM/mxtyASZXQFIOHjYxzYXBrrRGURMafVtoAMyNeuOYM2qKg8/1RCcIFKF7YLQz8OUH+sfoBjPjj3NrXMbtSk+gDkAwj34L27cAw1gIqgqZw0wMZIl85dYLGubOv9qRUMMmH0aOGlr0grHitAGyZWisRDzEwFqRvt+KLstSSP7vQGKFiNMu5j4Y9aWeCNzqnpHhSxIGGN2e9ewvvfD8Tcg3g9IHUdiYl4hixW0XCfCPCf3+zZFgk3cQ9hXHihpXiTeX9rogctNtT4slCZmxSQ3zna5xqqJs4zlcEzOZ+XAKWdAxJg7pPYpgvNypwQrgvEMl78RB+v1iDxwSLGX7E90rpGYQ1EOzjigO95AXFCYoLGcnH8XkTGtfXirR17ipAnVbtQSvFU6EvY/ommnDoXyX5VxvpooGQ70zjW8uECWeYidwGoz5Q3wcsP8S1AmaGuWICQu7I4EiWqryQwZvJXWgda4JgQkbKfbP6XUENdgDWjmWyL0vOteoX00ma0xqY81WWzG8azKcsmV5pEeWSY8JN3fM07Vd6fvTIIE9BzXYpguAUa533B/EnRpfWBKkNyxorBCeiQXPP3nkR7EhpA0zoeD8CE8wFLkIZC3+kmoMS9T9sg+xe/R0Mu26XOYJBhfcWtjFfD1Q0W19/nsXLvZitpyWQTy2tNaYWuE0JWxdaqdgmkhuMKp+RkaB1fC5BqFPcYOC2wdVHulMuMxzSvKxAbF58jm2Kwjrr7OrJt5pbZ8Cw6GSiFkEpVD9wQnx14lHmIAAGb0FD3Pg/XN5b1RbI+gD3XMa9AzxXyDjW3QoFCzd+TWpZqgS4LqUzYKrIk8uR0TUTDXFcTX5XCNMetSQ4JwJobs+QfwfXD/wtbXl+9m00ycAi6hc5nr0oYj2HJffWvmeRX5tQwlnUPN8oex5H2sQxoWOUGz1GziGnR+7igYwNma+Xk9L5d7US36ToTuGuxFfBoFcAznV2TajByJAWkHhICnk+NuoPEO98BE25ga97IKMxnnkQsc63aV7puzqy/oNeBi8HhA1CH8R9s3rM+XlqcM+SSPafnC6DcUNdlo/SB27xo9z6NxGxfhcuq851HkH8/5x37veOxCFMDRZBe6i7oBi1YBFTHwhXMOYbPaW+j/OD/AP3gQz7JTj0EfKLXPV0juKX4zEwqW92kECyHMuUmtFkVcBGlWEBnALF22Hh3e/weTh7FkEfPMnzoOgv4hsAEOAbcb1xHPJvuPc8gP0RHnu07gptvTE07m0EfTmi3rxETVRlWT6NfZqDOTD3zJRYHNS2hHvJKkCs8pqTw7GT9hCE2x8bxyXKP6xr9QOKNRYO0y/qSMavw6DewrXcxcoBhWRQyj6g/xY07euUvDzUYz4cGfdnBDgDmNcQGjfJ0B+vIvSq1YTtpIrXRtpyTHgrLsYmPDgD4y7G5STTvV6OyQ2FpLNQnUvgghy5wo9FVV+BSGjN0zgxB3GhalI1ywS7wcVyP3fFzFtXpsb9tvT2ak+oMZc+RQSU67+8ksDhb1r/vaeFqlAU2o5aozCaQmc0QcgineccBt7Ei5uoM7pxWb5ls0yuh1ovPSxiiYCFCXW7OqjGoq4bwBxHAPblnNwlFL2uKKn2MP1DAD21pZ6srYfab86xURlBae2RWFqTL1Wqi3S/HMZClQY4OYqxeYbyQXxtXpZey2lp37VK7K8L+WwmBRfC60W2W6K0anb78Gx/HVt7Cea1D4I5yBwNwS8ARk+he9OKz8LSyk6jtEkt5NjA8HxZqgFYZNmqH1WeuSZHgWpisVbkwY2Ih9e1sKjsi3FpXOYkvbIhpIX7fkJEMJfJ4cTavxSOPoA5jrW3I8G5qgJ/eT9CrxMfTWnKmrpVOQBasnx7HOnElHCIagmD3Q+TJXMOyrKaHPQHwdihBwNnLhSnHGotcuLcK8i2N+GhLi5pdzq19kVU+i4rL/axsjBADoF4hph0cdYTB5PF4KdAorCx75Lma9utpQtTSt8QxxIc01gedGDBEiUI4SWnhEqixBkIUYODrMTkXzuj9RYXnpLGfOncf6EGl4VQN+CZJkB6Aq1hUAZcfkDFbpJFTWETMnauLTUorRfdWgFTmVOdAQcXiVim5FnCS3AqTOCbTJbaO22gOWKAKhzqB24DvFMUXlxDqfOdNaU4OYx84/313Ps3OD9CYmWElANcO0RBeYLqdwEtHKlqyRbtT7fisktqQvcuwEulejOztWOA4vYqzeElVdYcqH2OItwY5TXwArhC0iEmfAMZxKTEehEmPgsA8eD7OFD+9Pu4Z8imI8ErYK4JYiQ2HwaFib5wi6uPna5dd5pdU7X74FxceOfAa7Ygz2+5NH6qlCp5kQ0aMQbrInbxe7CHf1XPj7HA9F5PAAwpJxyryJAwBmAZ4GlNuCD6opjveqj7bg1ILV0Bk3qB2fYMX3kp8EGOIhbMIIA0RqcFNGGEcvdIWD8syf2HeAHO+3/DxK7hHngg5EreF9AWeCLPMQrvfGDXXG5EbrG7i9rSqbQm3xUbDoNpbcUBl1NeoQxLHDp4D6fsFBWmPiLfEuYyRu32GkB52Tp/GcWoIY4c5oZcSTF/QFsAhI4RLQONYNJvL2pI89xauvBKTUk5JxxrMcEMOxJM1KACJoW37gb86pFxC8QmfxNxiWCMp+DRwTTIvr3iNlSuI6e49blLTvfndS4nAcwy4TfN0WBYNsU/TgcHhqURKQrOnxD4DOKdvJ6EQJkk4kAVch9XmWV/kVNmbdMJyEkAc2QRWoc4R1XaJHh1YUNy8CsJlsdkzCuSIWYc189wMlWsjmYlNcBps9CWjPP40uCXIwHpc+C2GIShnBK4X2MGD1QrAlj94CRUhoU137Gn+TRykqa0LC8M3krF4Iz3tPBCGu924J0QO/UzfE3OkuuVuxbEku91sNlaunLXTW2pd0GkYip3ywXzmSZUN4WVxOrrmbQt3Bt2NPSW50Bdx2Ez6UpjavsXjWu1pLEGEyi74b6PxaY9Jl8fNYiFl0puyLAHL65eZvMdU7Si/c7lpEypNhtVfTZVX+xduNLG4Ix43ZlNRQRemVX2uCJ3gN9GHAyuzZd2Q0xEtwLe7LcT6SqJZFmmNSw1QIFferHSFvbbYfL7GW9JAwgUTYifZyCQlNOA86wyApkn7ddVuqb4dFzUUk4qwGMQ6n0xdUDGEwrmkkUPFVbPTASCi+S8HJvxhkMTF/F5IW1SzE2vCUiagnQuJ+mVal6p44zaVdfgTItoRky8rBWijJoispgghj11vcVai0naWhXXdCJdApOaUpoW1N4k/RsAFtebAxW8SxLI8W+1ptXE29wBnhJ65yC1BuY2PJMCRLQIGk803U0epHerRjQBadZ106Mz6dqUmuWH5m9NYDQlkXDjXtO41y05p/fHRjr665OTIl+WELkm1+u9t7WH4nOR3Nt8nuhWs2mCMqscUsdy7B1HTVmRN6XbviQt7iRPry1LH9K/Q6onv4xXZuB3+cdcJxngsaRuO6TMtGhuR4X0Ta1Yde1EpDONYVlSzWtqTn2N6PZ/LLqKWJeaz339N5EsK8BhaYJzJ30vK10u9UD3PTC1rKgFC1oEhSezzJyaGuKXXI8Nflb+vHiZHKFFy3KrWx5vXvjM/kH6Kjn9LwzuUG4H1N0Eoin/B14zT4gj8tU+AAAAAElFTkSuQmCC",mze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAnCSURBVHgB7d3tURtXGwbgR563AN4OtgToADrAFYRUYKjASgV2KrBTAUkF0AHuQOrATgUn53iXQBxE9LHfuq6ZM/J4BKPhz3Pv2fusIgAAAAAAAAAAAAAAgGlYBDALKaVP+eU8pu2PxWJxHUDnBACYiRwATvLLQ15VTNM6r7McAL4F0Lk3AcxCMzgvoh6kU7PO68Lwh/7YAYCZyTsBp1HvBExJufL/EkBv7ADAzDSD9Cam48bwB4CW5J2AZRq/ZQAA7coD9nMar9sABqMDADOW6pMBd3mdxrisQ+MfBqUDADPWDNi3Ma6TAevQ+IfB2QGAI5DqkwFlJ+AkhvX9qKLSHwD0JIeAqzQ8T/kDgL6lYU8GLAMAGEYa5mTAxwAAhpOH8UleD6k/q1SfRgAAhpQHctUM5j6GfxUAwDjkwXya19fUna+GPwCMUOr2ZMBlAADjlLo5GbAMAGDcUrsnAzT+AWAqUjsnAx4CAJiOdPjJgFVS+gOA6WlCwD4nAzT+AWDK8iC/TLvT+AeAqUu7nQxYBgAwD3mwf9xi+Gv8A8Dc5AF/98rw1/gHgDlK9RcHrV4Y/uX/qgAA5in9+2SA4Q8AxyAP/PNnAeA8AIDjkAf/tcY/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwGFSSpdlBQAwOXmGn+T1KXaVf+gq1d4HADAZeXZXea3Kil09CwDFhwAARi/P7NNm+Kc2AkDxUBJFAACjlOf0ux9mdysB4PsvEgIAYHzKLfuX5nbsakMAKL4qBwLAODyW/TbM7FYDwCPlQAAYUKrLfg+vzOpOAkChHAgAA0j/LPvtHADexGGuk3IgAPQqz92f8stdXlXs6dAAUJyWDyEEAED3mlvwn/M6iQO0EQCKKuoQcB4AQOvS05P9ltGCtgJAUUUdApQDAaBFzS572fK/ipa0GQAeLYUAAGhHKftFPfxPo0VdBICihIDbsl0RAMBe2ij7bdJVACjKw4KcEACAPbRV9tukywBQVFH3AlrdtgCAOWuz7LdJ1wGgqKLeCbgOAGCjxyf7RYtlv036CACPPigHAsDLnjX9e9k17zMAFMqBAPCDVH/JXrnyr6InfQeAQjkQABrN7vhtdFT222SIAFBUoRwIwJFrvlRvGQMYKgAUVSgHAnCEmsf6lvv9g83AIQPAI+VAAI5Gcwu83O8/jwGNIQAUyoEAzF7zpXm9lv02GUsAKJQDAZitPN/eRX3MbxQXu2MKAMW3AIB5+n+MyJgCwG95XSwWi3UAwMzk+bbMLxcxkovdsQSAX/If5iovOwAAzFaec/f55SyvdQxs6ABQBv7PTSoCgNlrdrrLTsCXGNCQAWAd9Zb/5wCAI1JCQF5lJ+DXGMhQAWAd9fAfNP0AwJDyHCwPAvolBjBEAPg9rzNlPwD4uxz4NnouB/YdAErZ762yHwA8yXPx+8Vx9FgO7DMA3Cj7AcDL+i4H9hEAytV+ud//MQCAjfosB3YdANZR3++/DwBgK32UA7sMAPeh7AcAe+m6HNhVAPg1f/ALZT8A2F+X5cAuAsBNs3UBABzoWTlwHS1qMwAo+wFAB5oQ0Go5sK0AsA5lPwDoTLmt3mY5sI0AcB/KfgDQi6YceBMHOjQAKPsBQM+a2+3dPDkwpXSVXqfoBwADyrO4ymv1yqxebfrZfXYAlP0AYASelQN/j7Zs2AFYlbQRAMCo5Pm83GUH4LVf9GMAeDD8AWC8yu35tgOA7X4AmIA8s0/TUy/goACwDABgMp6VA/cKAJclBAQAMDl5hp/k9SEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6XUqrKCgDgOOTBf5LXKq+H8u8AAOYvD/1P6cmnAADmLQ/89+nf3gcAME950L9Lm/0UAMC85AF/ml73tbwnAIB5aBr/q/TfynuqAACmLT01/rdV3utkAABMWR7mt2l3twEATFN6ufG/LScDAGBq0uuN/21dBwAwDem/G/+7cDIAAMYubd/431Y5HlgFADBOaffG/7ZWyckAABintF/jf1t3AQCMSzqs8b+tDwEAjENPw/+RkwEAMLQ8kM9T/84DGJVFAEcj1e38cm++in59y+tssVisAxgFAQCOxIDD/9E66hDwLYDBvQngWJTn9VcxnKr5DMAICABwBFLdxh/DE/rOk5MBANC91G/jf1tOBsDAdABgxvKgvYzxbrtfLBaL+wAGIQDATKW69PeQ11gfyetkAAxIBwBmKD01/sf8PP7y2e6SLw6CQdgBgBnKQ7Vc+U/la3m/5F2AswB6ZQcAZiaNp/G/rdPkZAAA7C+Ns/G/rfcB9MYtAJiJNO7G/7au8u2A3wLo3P8CmJOfY9r+DAAAAAAAAAAAAAAAAOCZvwCgkvxAcNS/iwAAAABJRU5ErkJggg==",gze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAD/CAMAAABb2Q/2AAAAsVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+3mHKcAAAAO3RSTlMABQoPExgdISgxJTYsQDtTRUr+9vpOWXJdaWVhgIx2om2n6oiWmYTKr5G68J22eqvBfeHZ5c++1LPdxUM4ZWUAAAZvSURBVGjerdrZdpswFAXQmnk0EMB4Ajwbz2Mc1///Yb0SuLg1km66mtfsdRBXRyIP+fH205IURZZa7794h7KqKZKEkrqFCgVpOSpOKoaJljZWOm1VwUnTRUv7/0sbvc62r2FlgJOy0o6x0kVL30NJiUh0ZkfHZuLXGWj/PTNArzPu68hMr4/MVEGqMlJaWNkDKWGukM4IK70uTipq3NVBthASMoWb1CJS644cIoG2OJDIQUYlm4KDH7mWxDJoKfX+3iSyooxEMqRSyhVlJFJp9YY2SGZoiyGZkMh+YtPRN4eWDqQCckSl1CoxIxKkQTMVSWp+pyeUQY4WbSqftuG9S+kkqWupitwkgdZSe5VSo5SeMgOpiaWqmfuVb1BZUUbkU6pyHdokJSJPs0AoZcjU7WRBMhWgQjnkSqmW2dB3ailx5HAW1FJqzJRLOd3Gjo6R7cVTym+y9aecbr1KCjLdae7hMt0090yupBAq/yLld1lHapa7WMVEElqNnimnr1JiS3+Rxqal8aVCZZp3+FJ+ylnRBalSyperA1IGM7ScFwNbIJXvSSOY3/u2QaTSIKVXudp2uVIupW7Eq3kHLetMmSu3RQ8p8/XoVQJtGieVu55A0lfXHY9m6iqhQpkg5fhNtljySKSGkPNxry2SKpGdec6VciUtIvtIOV5nbQekypLKUx4ep1rKHNk9PPZIWdRSEcmTi5KDYjl0HatZSn/IO1Kag/E9E0m1kkVSSlUg++Mic02UvD8WCKkbZn/3ORVLrZSLb0kdIdf06brGkspT9tZf6T9KiSmL25Aj5Ve5Bml8VyqNUn2u8zP1cfJ2mQmlRuToeJnRp2v/TdpE+jaVKk86IH8iZfJAy/UjRcrdkUhLIC0iH1j5uMwDnFyec7TcBrYjkDrIrJI6RuYYaYK8YqRh2vvP61gkNSpPy69t0EbI9pDK+iDx5GUbU6kJ5OIyKQKc/LnZ4TKnZ5R0zHZ63qxxmatreItdkbQM011NwqPHk1WVcJIWxJ2dJzuQDl5aukjOr5O159oYOYmWT6ny5Sb6xMktSkI9fSp9jMw30VcHpCGW4QeRpki2vyM34bITtHmSFqSSPkaO8TKMvujT4WZiSZ3IYBx+XLoI6WKljZVOJQccqbxJhyeNSv4cBLRMfBnDPD8HMVIuqTQwmRjpx7BHF5GkVYoP8EZ9DyG9UkJBOdJ6le3/JB2okleA7OFlWVBmQ0C6IDfhF5UOS2oaLUjnXkqXJ+kWUTnCyTA6j7qwSSxJBw+yew8/zgmVhqaxpe91d7XUEXIQ+zRTZUnYokEpq41XBPKaVZKb2aeSbDxb0hukAzK8iCSMs5J72CS+hMzeGuSJSJsnYfAgP64nsp0Mqfwhh1Q6fDkqZTcWy1v4McHIAZWLpC5Tk4QqeThJNzP5jgzPC6iISPaTI8gpXxovstx4kYR1iiUUJDtGONnLHiDTPU/qpdx/W9KCsiQUuTuicnXqieWJyqFIxiCXYXRd0YIypUPlcBmGRMJHli+TWvIzB8liCeucLWiV2dKv5Ga2SKjUm6RGpFfJOZRJIPsZXk5LmdF7kSVJ6fbTz0p6bGnWcgu140lakPQzjCbbVCxPIEOBtF5kXhaUKeH2HA1XX7DOfLXvYeWJL6EgtewEzVKt5GJG5LiqcrM0XuWsklqjpKWjMgQ5EshsSjMPAul7IOdfUbQ5zKHKIC2uvEThBGTCl1C6LchNQWTMlynIj7DYTkG6PLmv5YAre/vVU2YCeVrlP4nMsfKep3A8GFIH2flL2oxMUuThbFzJfZ8ldQfkiMpos8tXWDkm0ufJxfwpT0J5OMM61wcoPUiDKRMiP4ic8WU3mW6pvEFBhbI4RyALjLxSOYfSs2VM5P0KTz9CQblykKQ5kdHxLpIZkVEUVrLNkC6VOyIf9y3IgCHNV7mD0nPlfjXekXUudzkcJLb0+iDXE5ycVXItkqdapgypUNk7zQ63/y2Hv+U4zVjSKmVxm8A8P29COS+Ov+WgUcog/VouK+nwJawTl0nlmitdpNRrWc8TLW2OpJOvukROh6pITZ33+q8STodpNUgFZFz2k3SenCPPfZctkOT+pKeDyCO5Q0CW/3vyJu3qZgC5Jrdi7Dram6xGT+9kuEOie135Ur4dOfLlOoOsLjCr/rzXki6U/nVBvkf0c1Qu809Z9w4+8GeYUnrqkWm+LvMXnJRTlwruvBIAAAAASUVORK5CYII=",yze=""+new URL("focus_bg-b6803e2d-balabala-1782919616283.png",import.meta.url).href,_ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAOVBMVEUAAAD///////////////////////////////////////////////////////////////////////8KOjVvAAAAEnRSTlMA3yDvvxBAn3CAYFCQzzCgj6+a/gWFAAAIxklEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGB27gRJcRiGAqi8O2sH3f+wM1XM1lOAHZwQKfnvBF3tjyxbBgAAAAAAAAAAAAAAAAAAAAAAAAAAAACAvfBPxkz+lro8xEBwMfyd87dumAkugx9xfhkswRXwUyb1CMH58UvTEgm0CjOVcYlLA4FCMTkOVQFABs4nLo5/ylTEdUxCP6BGyJ7vPBVxNd8TKBA6x3+EugCgDJxGTPyvnkp4HURAtOj5O18RAETgLKLn/7lQDgAicA7W8wN9OQCIwBmEhR/y5QAgAieQHT/mwj4BYJMJpIgTPxVLAXibwdRYhrDwC6kmANgHFBsc/7V+D+AWBpeDRws3LojFAKAI6BUdl4zFAKAIaBUWLnOFADRb8JL0INZwjUiv+MkYw00MtoFDZMdVRqpgY8zdbXL8Doc7gQMsXMnRCvPQ3RyvthB8lp24WqSV5v7L8DoTtoGPmg3XG+kNc+/RCIg1OK7nB3pP6G9cz+Hh6MdkruZzoAZ2TR3oCD6i40pujNTMfhkkQJSlemAbaBOhN0iAHImr+Egbqo1AIthZalj+tgggARIkrjBF2kFvkIDDpUMvZnuDBBwrcVkXaDe2QwKO1HGRt7QrO2EwcJhOxFiuNzgNHqM7/ON/Zz2XYDy8g0HCx7/2Khpzgc1ZJ2gcZ00pjPjOwKf/5WOgDwqjoDhewiRt18382kSwoUXet7Rmg8Pgx2SJ9dYaYUXpvAoNoA90iOD5FYc2YCPB8CtfdJgvfsXgGyPbWOReu3VoA/bXy13/UgLwQ8MbsEbw+hcS4LAJtEui17+QgBtBo174+hN1GArsyBqZ/f+/vrAJNGjYADwJ4XES2Mus4pgdDE4COzHS7n8fswZToV1kfk7UxH3GTGAP1qj5t2b0gTtI/NRIwozoAzdnNTSANY2goG5FlaTqX2qd/POqLlZNA3CXcRTcVtL2ifLa/mDZrIobgH9ZhxLwkQIg9td5M0rAdqzGqzWPErCZpOkE8JvFd8a3YmW/AVj/NkDcxYVwSVsHeBecytwKZNR1gHcZE4F9H4IZEm5SdXkllldaAIgiToIbsGoLAJHHSbBdUlsAiKKaCbZgRm8BeF4CHEGlQXEBIIrYA1olzQWAyOA2sJHTXACIMq4C2gxq3oE9FpyGh8yCJe0ldOQHfFaS3+M5fWPAQhvofI/Vrxb1X6V5rH6DUXcL+L0NdCli9VeatO8AROHX6o9Y/fXsGX5swzO7ERc/b+n17wBEA1b/bQlvqq7NqD8DQAt7hh0A3jfgGvXaRtWDQGjmlc8BoJFDC3BpM1qAaxvwnu7auhPcA8MP9u40yU0ghgIw6s2AWcy7/2EzNUmq8iMzeNwNSNb7jgCNpFYvVNh4ss63xEu3fYusAV3LrAF9K+ZuhaGm7pwE+NZzEuDbwMsVfFt5rNK3jQPAt2R+RzgdcSagIyeEA8A34X4w37gh0DkOAOe4FOAcTwXR+0ic0vjGpoZzbGo4xwHgHLtazrGp4RybGr4FNjV8K9zg6lvhTQe+cYezc9zh7NzGc66+zdzh7FvkjaeuLTzo7NudfSDfeNuRc7ztyLnIWaBrvPHSuZGTAN9unAT4JvivqSMXFrAGdG20//NDqpG4I9S1bP0H6OqUh6ns+RZ/v9SjPKKxCdTGEqCVXB7R3EJ6AM8ENJHLLVrcTDeCXYB6eUzRaBMtgdvBGrx9s48vgAsBVXKfTAfQGyeBh7RRo5EyMAv7wFVyhOkzFSMzQKUVphupwgxQqcByFT2CGaBWhOHtFGI7fqkwGQ4BI5gBqhXYDQECrgPUS2ZDwGh47CrSw+pyioArwQ3kCJu9gBEsAZsYYLIdGIQlYBsZgMHDdQNYAjayWnyUAQwArRQYLKdni6NWqwRzdeDIAHBKCIhKP6cgDAAtJWtJIDEANFVgKwn0YABoK5lKAgEMAOc9UlHXDsrCANDchC89OmUeDADt5WimDOjxJWEAqHusFm5bWmBmqNoy2/iwggBcBjxCgYVCMIuVSGXPBOjvByWwAjxKjvof7g02EpVNdwC69wYM+MCNYIfZlI+AAfpjlGk5qh4BA5gADlageAQMYAI43KR3BAz4xBthDpUFSvPsDTDRqLAuRHwn5e4SOeGDqTVrq3pAX60VBADXAM4x4VuydKdbBCwAzjND2efW4zezhxiNCYLvPXJ3ovyAxqz0zpao6JEHAVgAnuwOaEkDfcQfvA7oRD32pNCdICR80Nucel8D9sjYHa6PfP9XmbBrDt2hQgLf/3VW7BtCd5g8YN/a0WFW4MI80Ee+/6utuGwIlBl8/9dbcc0QKAl8/yqsuGAIlAS+fy0GPEfG3DWRe8FfXABSYMCT5Bba/LPuE+d/agx4WhpDq5/X6GlF0z3iedvLqeCe8LzI/v+JguAn0rjUdx717UnxLMz4GbmN4eUN6de3oGn/89wXt+G+dD8QwfJfrz7iFXHehr6U0HCQRZZ/lwiCKiIyp2dygKK9SPSvPKFafQ6YeP7jOqOgUm0OiOp/YvPewoo6lfOAjZ//j+kKAntn09n8Ua8uCHTfW5n9DVgEL3u9FzQz++vRy0EDIEfO/U14OQ90OxKjvxEvDoGXfgOT2Pr5xc6d4zAIAwEUDdjsm+D+h02X1pZFgcN7V5ivGRr8REUJFLxRFR3/pypI4JMSjb8m7VESQP4NGIz/6dqjuTWA7voJk0+/KsyxIIDkDYij8Vcjfw1k/pYeVru/MssR7gmgu4LLX6ecBj5pu9Vfr37dEgHw79r5aATwcu2yxiCAl9uX6YxBAC/X9cs4DWfcmkYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMC3PTgkAAAAABD0/7UrbAAAAAAAAAAAAAAAAAAAAAAAAHAKGbwwCsmp53wAAAAASUVORK5CYII=",Sze=""+new URL("focus_move_bg-cf41417a-balabala-1782919616283.png",import.meta.url).href;class am{constructor(e={}){this.options=wt({includeChinaMap:!1},e),this.ready=null,this.init()}init(){this.instance=new Yke,this.instance.addLoader(i3,"FileLoader");let e="./",t=[{type:"Texture",name:"flyline",path:sW},{type:"Texture",name:"pathLine",path:sW},{type:"Texture",name:"pathLine2",path:aze},{type:"Texture",name:"pathLine3",path:rze},{type:"File",name:"china",path:e+"assets/json/红原县-轮廓.json"},{type:"File",name:"mapJson",path:e+"assets/json/红原县.json"},{type:"File",name:"mapStroke",path:e+"assets/json/红原县-轮廓.json"},{type:"Texture",name:"huiguang",path:fze},{type:"Texture",name:"rotationBorder1",path:lze},{type:"Texture",name:"rotationBorder2",path:uze},{type:"Texture",name:"guangquan1",path:dze},{type:"Texture",name:"guangquan2",path:hze},{type:"Texture",name:"chinaBlurLine",path:cze},{type:"Texture",name:"ocean",path:sze},{type:"Texture",name:"side",path:oze},{type:"Texture",name:"arrow",path:pze},{type:"Texture",name:"point",path:vze},{type:"Texture",name:"focusArrows",path:mze},{type:"Texture",name:"focusBar",path:gze},{type:"Texture",name:"focusBg",path:yze},{type:"Texture",name:"focusMidQuan",path:_ze},{type:"Texture",name:"focusMoveBg",path:Sze}];this.options.includeChinaMap&&t.push({type:"File",name:"chinaMap",path:e+"assets/json/中华人民共和国.json"}),this.ready=this.instance.loadAll(t)}}const bze="/jsyApi",xze=["邛溪镇","刷经寺镇","安曲镇","龙日镇","江茸乡","查尔玛乡","瓦切镇","阿木乡","麦洼乡","色地镇"];function wze(n){return/^https?:\/\//.test(n)?n:`${bze}${n.startsWith("/")?n:`/${n}`}`}function Tze(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"视频监控接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function Ru(n,e,t=""){for(const i of e)if((n==null?void 0:n[i])!==void 0&&(n==null?void 0:n[i])!==null&&(n==null?void 0:n[i])!=="")return n[i];return t}function Aze(n=""){const e=String(n);return xze.find(i=>e.includes(i.replace(/[镇乡]$/,"")))||"红原县"}function Cze(n=""){const e=String(n);return e.includes("养殖")?"养殖基地":e.includes("饲草")?"饲草基地":e.includes("种草")||e.includes("牧草")?"牧草基地":e.includes("虫情")?"虫情监测":e.includes("机场")?"机场周边":"重点点位"}function Mze(n,e){const t=Ru(n,["hdPlayUrl","playUrl","url"]),i=String(t).match(/\/(\d+)(?:\.hd)?\.live/i);return i?i[1].padStart(2,"0"):String(e+1).padStart(2,"0")}function Eze(){return new Date().toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1})}function Pze(n,e,t,i){const r=Ru(n,["name","title","deviceName"],`视频监控${e+1}`),a=Ru(n,["hdPlayUrl","hd_play_url","url"]),o=Ru(n,["playUrl","play_url"],a),s=Ru(n,["token","accessToken","access_token"]),l=!!(s&&(a||o)),u=t?Math.round(i/t*100):0;return{key:Ru(n,["id","number","deviceSerial"],`${r}-${e}`),title:r,town:Aze(r),scene:Cze(r),device:Ru(n,["number","deviceSerial","serialNumber"],`CAM-${String(e+1).padStart(3,"0")}`),channel:Mze(n,e),cameraCount:t,status:l?"直播中":"离线",onlineRate:u,updateTime:Eze(),operator:l?"萤石云 · 在线预览":"监控参数待同步",progress:l?100:0,image:Ru(n,["img","image","cover","snapshot"]),playUrl:o,hdPlayUrl:a,token:s,source:n}}function Rze(){return rn(this,arguments,function*(n={}){const e=yield su(wze("/api/home/monitorings"),{params:n,timeout:18e3}).then(Tze),t=Array.isArray(e)?e:(e==null?void 0:e.rows)||(e==null?void 0:e.list)||[],i=t.filter(r=>Ru(r,["token","accessToken","access_token"])&&Ru(r,["hdPlayUrl","playUrl","url"])).length;return t.map((r,a)=>Pze(r,a,t.length,i))})}const Lze="/openApi",p7={513233100:"邛溪镇",513233101:"刷经寺镇",513233103:"安曲镇",513233105:"龙日镇",513233202:"江茸乡",513233203:"查尔玛乡",513233204:"瓦切镇",513233205:"阿木乡",513233207:"麦洼乡",513233208:"色地镇"},Ize=Object.values(p7).map(Dv);function Bee(n){return/^https?:\/\//.test(n)?n:`${Lze}${n.startsWith("/")?n:`/${n}`}`}function Yd(n,e){return su(Bee(n),{method:"POST",body:e?JSON.stringify(e):void 0,headers:{"Content-Type":"application/json"}})}function Dr(n,e){return su(Bee(n),{params:e})}function oi(n,e){for(const t of e)if((n==null?void 0:n[t])!==void 0&&(n==null?void 0:n[t])!==null&&(n==null?void 0:n[t])!=="")return n[t]}function cl(n){if(n==null||n==="")return;const e=Number(n);return Number.isNaN(e)?void 0:e}function Ri(n){const e=cl(n);if(e!==void 0)return Number.isInteger(e)?e:Number(e.toFixed(2))}function al(n,e){const t=cl(n),i=cl(e);if(!(t===void 0||i===void 0||i===0))return t/i*100}function N4(n,e,t="占比"){var r;const i=Ri((r=oi(n,["areaPercent","area_percent","percent"]))!=null?r:al(oi(n,["areaWanMu","value"]),e));return i===void 0?"":`${t} ${i}%`}function xu(n,e=""){const t=Ri(oi(n,["areaPercent","area_percent","percent"]));return t===void 0?"":`${e}${t}%`}function Dze(n,e=0){const t=oi(n,["name","title","label","zh","itemName","item_name"])||`指标${e+1}`,i=Ri(oi(n,["value","num","count","area","acreage","total"])),r=oi(n,["unit","unitName","unit_name"])||"";return{key:oi(n,["id","key","code"])||`${t}-${e}`,name:t,value:i,unit:r,source:n}}function Nze(n){return(Array.isArray(n)?n:(n==null?void 0:n.rows)||(n==null?void 0:n.list)||[]).map(Dze).filter(t=>t.name)}function kze(n){const e=(n==null?void 0:n.core)||(n==null?void 0:n.summary)||n||{},t=((n==null?void 0:n.typeDistribution)||(n==null?void 0:n.typeStats)||[])[0]||{},i=((n==null?void 0:n.ecologicalPosition)||[])[0]||{};return[{key:"woodland-area",name:"林地总面积",value:Ri(oi(e,["totalAreaWanMu","total_area_wan_mu","areaWanMu","area_wan_mu"])),unit:"万亩"},{key:"woodland-main-type-rate",name:`${oi(t,["name"])||"主导类型"}占比`,value:Ri(oi(t,["areaPercent","area_percent","percent"])),unit:"%"},{key:"woodland-ecology-area",name:"生态重点区面积",value:Ri(oi(i,["areaWanMu","value"])),unit:"万亩"}]}function Fze(n){const e=(n==null?void 0:n.overview)||(n==null?void 0:n.summary)||n||{};return[{key:"grassland-total-area",name:"草地总面积",value:Ri(oi(e,["totalAreaWanMu","total_area_wan_mu","totalArea","total_area","areaWanMu"])),unit:oi(e,["areaUnit","area_unit"])||"万亩"},{key:"basic-grassland-area",name:"基本草原",value:Ri(oi(e,["basicAreaWanMu","basic_area_wan_mu","basicArea","basic_area"])),unit:oi(e,["areaUnit","area_unit"])||"万亩"},{key:"general-grassland-area",name:"一般草原",value:Ri(oi(e,["generalAreaWanMu","general_area_wan_mu","generalArea","general_area"])),unit:oi(e,["areaUnit","area_unit"])||"万亩"}]}function hp(n,e){const r=({woodland:[{key:"woodland-area",name:"林地总面积",unit:"万亩"},{key:"woodland-public-area",name:"公益林面积",unit:"万亩"},{key:"woodland-public-rate",name:"公益林占比",unit:"%"}],grassland:[{key:"grassland-area",name:"草地总面积",unit:"万亩"},{key:"basic-grassland",name:"基本草原",unit:"万亩"},{key:"general-grassland",name:"一般草原",unit:"万亩"}],wetland:[{key:"wetland-area",name:"湿地面积",unit:"万亩"},{key:"wetland-yield",name:"湿地生产力",unit:"万吨"},{key:"wetland-level-1-area",name:"1级湿地面积",unit:"万亩"}]}[e]||[]).map((a,o)=>{var s,l;return tn(wt(wt({},a),n[o]||{}),{name:((s=n[o])==null?void 0:s.name)||a.name,unit:((l=n[o])==null?void 0:l.unit)||a.unit})});return r.length?r:n}function Oze(n){return rn(this,null,function*(){let e;for(const t of n)try{return yield t()}catch(i){e=i}throw e||new Error("No request configured")})}function ra(n=[],e={}){const{nameKeys:t=["name","townName","typeName"],valueKeys:i=["areaWanMu","value","totalAreaWanMu","basicAreaWanMu"],unit:r="万亩",max:a=Number.POSITIVE_INFINITY,extra:o}=e,s=n.map((l,u)=>{const c=Ri(oi(l,i)),d={key:oi(l,["key","code","townCode"])||`${oi(l,t)||u}-${u}`,name:oi(l,t)||`第${u+1}项`,value:c,unit:r,percent:Ri(oi(l,["percent","areaPercent","basicRatio","generalRatio"])),source:l};return o?tn(wt({},d),{extra:o(l)}):d}).sort((l,u)=>(Number(u.value)||0)-(Number(l.value)||0));return Number.isFinite(a)?s.slice(0,a):s}function k4(n=[],e={}){const{nameKeys:t=["name"],valueKeys:i=["value"],unit:r,max:a=Number.POSITIVE_INFINITY,extra:o}=e;return ra(n,{nameKeys:t,valueKeys:i,unit:r,max:a,extra:o})}function Bze(n=[],e={}){const{nameKeys:t=["grassMinType","name"],valueKeys:i=["acreage"],unit:r="万亩",max:a=Number.POSITIVE_INFINITY}=e,o=n.map((s,l)=>{const u=oi(s,i),c=Ri(r==="万亩"?cl(u)/1e4:u),d=oi(s,t)||`第${l+1}项`;return{key:oi(s,["key","code"])||`${d}-${l}`,name:d,value:c,unit:r,source:s}}).filter(s=>Number(s.value)>0).sort((s,l)=>(Number(l.value)||0)-(Number(s.value)||0));return Number.isFinite(a)?o.slice(0,a):o}function rr(n,e,t,i="rank",r={}){return wt({key:n,title:e,type:i,rows:t||[]},r)}function X8(n=[],e=[],t={}){const{unit:i="万吨",max:r=Number.POSITIVE_INFINITY,showMuYieldExtra:a=!0}=t,o=new Map(e.map(s=>[s.areaName,s]));return ra(n,{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:i,max:r,extra:s=>{const l=o.get(s.areaName),u=Ri(oi(l,["yield","value"])),c=oi(l,["unit"])||"斤";return a&&u!==void 0?`亩产 ${u} ${c}`:""}})}function Dv(n){return String(n||"").replace(/\s+/g,"").trim()}function l3(n=[]){const e=new Map(Ize.map((t,i)=>[t,i]));return[...n].sort((t,i)=>{const r=e.get(Dv(t==null?void 0:t.name)),a=e.get(Dv(i==null?void 0:i.name));return r!==void 0&&a!==void 0?r-a:r!==void 0?-1:a!==void 0?1:0})}function zee(n){const e=String(n||"");return{用于畜牧业生产的人工草地:"人工草地","对调节气候、涵养水源、保持水土、防风固沙具有特殊作用的草原":"生态调节草原",国家重点保护野生动植物生存环境的草原:"野生动植物栖息草原","草原科研、教学实验基地":"科研教学草原"}[e]||e}function Y8(n){return zee(n).replace(/\s+/g,"").replace(/类$/,"")}function K8(n){const e=String(n||""),t=e.match(/level-([1-8])/);if(t)return t[1];const i=e.match(/([1-8])\s*级/);if(i)return i[1];if(/^[1-8]$/.test(e.trim()))return e.trim();const a=Object.entries({一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8"}).find(([o])=>e.includes(`${o}级`));return(a==null?void 0:a[1])||""}function Gee(n){return K8(n==null?void 0:n.key)||K8(n==null?void 0:n.name)}function v7(n=[],e={}){const{nameKeys:t=["name","townName","areaName"],valueKeys:i=["areaWanMu","value","totalAreaWanMu","yield"],unit:r="万亩"}=e;return n.map((a,o)=>{const s=Dv(oi(a,t)),l=Ri(oi(a,i));return!s||l===void 0?null:{key:oi(a,["key","code","townCode"])||`${s}-${o}`,name:s,value:l,unit:oi(a,["unit"])||r,source:a}}).filter(Boolean).sort((a,o)=>(Number(o.value)||0)-(Number(a.value)||0))}function lM(n=[],e={}){const{nameKeys:t=["townName","name","areaName"],valueKeys:i=["areaWanMu","value","totalAreaWanMu","yield"],unit:r="万亩"}=e,a=new Map;return n.forEach(o=>{const s=Dv(oi(o,t)),l=cl(oi(o,i));if(!s||l===void 0)return;const u=a.get(s)||{key:oi(o,["townCode","code"])||s,name:s,value:0,unit:oi(o,["unit"])||r,source:[]};u.value+=l,u.source.push(o),a.set(s,u)}),Array.from(a.values()).map(o=>tn(wt({},o),{value:Ri(o.value)})).sort((o,s)=>(Number(s.value)||0)-(Number(o.value)||0))}function $u({topicKey:n,layerKey:e,title:t,unit:i="万亩",rows:r=[],note:a="",metricLabel:o=""}){const s=r.filter(l=>(l==null?void 0:l.name)&&l.value!==void 0).sort((l,u)=>(Number(u.value)||0)-(Number(l.value)||0)).map((l,u)=>tn(wt({},l),{unit:l.unit||i,rank:u+1}));return{status:s.length?"success":"empty",topicKey:n,layerKey:e,title:t,unit:i,metricLabel:o,note:a,rows:s}}function F4(o){return rn(this,arguments,function*({topicKey:n,layerKey:e,layerName:t,title:i,cqlFilter:r="",unit:a="万亩"}){const s=yield s3(t,{propertyName:["xiang","acreage"],cqlFilter:r,maxFeatures:2e5}),l=new Map;return((s==null?void 0:s.features)||[]).forEach(u=>{const c=u.properties||{},d=String(c.xiang||""),h=p7[d],f=cl(c.acreage);if(!h||f===void 0)return;const p=l.get(h)||{key:d,name:h,value:0,unit:a};p.value+=f/1e4,l.set(h,p)}),$u({topicKey:n,layerKey:e,title:i,unit:a,rows:Array.from(l.values()).map(u=>tn(wt({},u),{value:Ri(u.value)})),note:"按 GeoServer 图斑属性汇总到乡镇"})})}function zze(n,e,t="林地面积排行"){return rn(this,null,function*(){const i=ki(yield Yd("/woodland/distribution"));return $u({topicKey:n,layerKey:e,title:t,unit:"万亩",rows:v7((i==null?void 0:i.areaDistribution)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],unit:"万亩"})})})}function lW(n,e,t,i){return rn(this,null,function*(){const r=ki(yield Dr("/basic_grassland/overview"));return $u({topicKey:n,layerKey:e,title:i,unit:"万亩",rows:v7((r==null?void 0:r.townStats)||[],{nameKeys:["name"],valueKeys:[t],unit:"万亩"})})})}function Gze(n={},e=[],t=[]){const i=oi(n,t);if(i)return Dv(i);const r=e.map(o=>oi(n,[o])).find(o=>o!==void 0),a=String(r||"").slice(0,9);return p7[a]||""}function Uze(n,e,t,i){return rn(this,null,function*(){const r=(i==null?void 0:i.rankingTownCodeKeys)||(t==null?void 0:t.rankingTownCodeKeys)||["area_code","xiang","town_code"],a=(i==null?void 0:i.rankingTownNameKeys)||(t==null?void 0:t.rankingTownNameKeys)||["town_name","area_name","xiang_name"],o=(i==null?void 0:i.rankingAreaKeys)||(t==null?void 0:t.rankingAreaKeys)||["acreage","area_mu","area"],s=(i==null?void 0:i.rankingPropertyName)||[...r,...a,...o],l=yield s3(t.layerName,{propertyName:s,cqlFilter:i.cqlFilter,maxFeatures:2e5,timeout:25e3}),u=new Map;return((l==null?void 0:l.features)||[]).forEach(c=>{const d=c.properties||{},h=Gze(d,r,a),f=cl(oi(d,o));if(!h||f===void 0)return;const p=u.get(h)||{key:h,name:h,value:0,unit:"万亩"};p.value+=f/1e4,u.set(h,p)}),$u({topicKey:n,layerKey:e,title:`${i.name}面积排行`,unit:"万亩",metricLabel:i.name,rows:Array.from(u.values()).map(c=>tn(wt({},c),{value:Ri(c.value),metricLabel:i.name})),note:"按选中图例过滤 GeoServer 图斑并汇总到乡镇"})})}function Vze(n,e,t){return rn(this,null,function*(){const i=ki(yield Dr("/basic_grassland/overview"));return $u({topicKey:n,layerKey:e,title:`${t.name}面积排行`,unit:"万亩",metricLabel:t.name,rows:v7((i==null?void 0:i.townStats)||[],{nameKeys:["name"],valueKeys:[t.rankingValueKey],unit:"万亩"}).map(r=>tn(wt({},r),{metricLabel:t.name}))})})}function m7(n,e,t,i,r={}){const a=A2(i||[],r).map(o=>tn(wt({},o),{metricLabel:t.name}));return $u({topicKey:n,layerKey:e,title:`${t.name}面积排行`,unit:"万亩",metricLabel:t.name,rows:a})}function Hze(n,e,t){return rn(this,null,function*(){const i=Gee(t);if(!i)return null;const r=ki(yield Dr("/grassland_grassland_level/distribution"));return m7(n,e,t,r,{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:a=>K8(oi(a,["level","name"]))===i})})}function Wze(n,e,t){return rn(this,null,function*(){const i=Y8(t.name);if(!i)return null;const[r,a]=yield Promise.all([na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_grass_type/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_grass_type/minTypeAreaDistribution"))}))]);return m7(n,e,t,[...r||[],...a||[]],{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:o=>{const s=oi(o,["grassMinType","grass_min_type","grassType","grass_type","name"]);return Y8(s)===i}})})}function jze(n,e,t){return rn(this,null,function*(){const i=Gee(t);if(!i)return null;const r=ki(yield Dr("/wetland_grassland_level/distribution"));return m7(n,e,t,r,{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:a=>K8(oi(a,["level","name"]))===i})})}function $ze(n,e,t){return rn(this,null,function*(){const i=Y8(t.name);if(!i)return null;const[r,a]=yield Promise.all([na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/minTypeAreaDistribution"))}))]);return m7(n,e,t,[...r||[],...a||[]],{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:o=>{const s=oi(o,["grassMinType","grass_min_type","grassType","grass_type","name"]);return Y8(s)===i}})})}function qze(n,e,t){return rn(this,null,function*(){if(!(t!=null&&t.key))return null;const i=B3(n,e);return i?n==="grassland"&&e==="basic-grassland"&&t.rankingValueKey?Vze(n,e,t):n==="grassland"&&e==="grassland-level"?Hze(n,e,t):n==="grassland"&&e==="grassland-type"?Wze(n,e,t):n==="wetland"&&e==="wetland-level"?jze(n,e,t):n==="wetland"&&e==="wetland-type"?$ze(n,e,t):t.cqlFilter&&i.layerName?Uze(n,e,i,t):null:null})}function O4(n,e,t,i,r="万吨"){return rn(this,null,function*(){const a=ki(yield Dr(t)),o=oi(a==null?void 0:a[0],["unit"])||r;return $u({topicKey:n,layerKey:e,title:i,unit:o,rows:v7(a||[],{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:o})})})}function rs(n=[],e=5){return n.slice(0,e)}function s9(n=[],e={}){var c,d;const{limit:t=5,minPercent:i=1,otherName:r="其他类型"}=e,a=n.filter(h=>(h==null?void 0:h.name)&&Number(h.value)>0).sort((h,f)=>(Number(f.value)||0)-(Number(h.value)||0)),o=a.reduce((h,f)=>h+(Number(f.value)||0),0);if(!o||a.length<=t)return a;const s=[],l=[];if(a.forEach((h,f)=>{const p=al(h.value,o);f=i)?s.push(h):l.push(h)}),!l.length)return s;const u=l.reduce((h,f)=>h+(Number(f.value)||0),0);return[...s,{key:`${r}-${l.length}`,name:r,value:Ri(u),unit:((c=l[0])==null?void 0:c.unit)||((d=a[0])==null?void 0:d.unit)||"万亩",extra:`${Ri(al(u,o))}%`}]}function $p(n=[]){return n.reduce((e,t)=>e+(Number(t.value)||0),0)}function p0(n=[],e=$p(n),t=""){return n.map(i=>{const r=Ri(al(i.value,e));return tn(wt({},i),{extra:r===void 0?i.extra:`${t}${r}%`})})}function uW(n){return Array.isArray(n==null?void 0:n.rows)&&n.rows.length>0}function n0(n=[],e=[],t=4){const i=[],r=new Set,a=s=>{!s||r.has(s.key)||(r.add(s.key),i.push(s))},o=[...n,...e];return o.filter(uW).forEach(a),o.filter(s=>s&&!uW(s)).forEach(a),i.slice(0,t)}function Xze(n,e,t={}){return n&&wt(tn(wt({},n),{type:e}),t)}function ha(n=[]){const e=["bar","line","donut","column","structure","heat","peak","split"],t={bar:["heat","peak","column","structure"],line:["bar","column","heat"],donut:["structure","split","bar"],column:["peak","heat","bar","line"],structure:["split","donut","bar"],heat:["bar","column","structure"],peak:["column","bar","line"],split:["structure","donut","bar"]},i=new Set;return n.map(r=>{if(!(r!=null&&r.type)||["projectTable","iconMetric","metric","spotlight","rank","table","stackColumn"].includes(r.type))return r;if(!i.has(r.type))return i.add(r.type),r;const a=(t[r.type]||e).find(o=>!i.has(o))||r.type;return i.add(a),Xze(r,a,{variant:a===r.type?r.variant:void 0})})}function cW(n=[],e={}){const{headCount:t=4,headName:i="重点区域",tailName:r="其他区域"}=e,a=n.filter(u=>(u==null?void 0:u.name)&&Number(u.value)>0);if(!a.length)return[];const o=a.slice(0,t),s=a.slice(t),l=(u,c)=>{var d,h;return{key:u,name:u,value:Ri(c.reduce((f,p)=>f+(Number(p.value)||0),0)),unit:((d=c[0])==null?void 0:d.unit)||((h=a[0])==null?void 0:h.unit)||"万亩",extra:`${c.length}项`}};return[l(i,o),s.length?l(r,s):null].filter(u=>u&&Number(u.value)>0)}function tv(n,e,t){var s,l,u,c;if(!t)return n;const i={grassland:"grassland-distribution",wetland:"wetland-distribution",woodland:"woodland-distribution"}[e],r=((s=n==null?void 0:n.layerPanels)==null?void 0:s[t])||((l=n==null?void 0:n.layerPanels)==null?void 0:l[i]);if(!r)return n;const a=(u=r.leftPanels)!=null&&u.length?r.leftPanels:n.leftPanels,o=(c=r.rightPanels)!=null&&c.length?r.rightPanels:n.rightPanels;return tn(wt({},n),{activeLayerKey:t||i,leftPanels:a,rightPanels:o,left:(a==null?void 0:a[0])||n.left,right:(o==null?void 0:o[0])||n.right})}function Uee(n,e=["areaWanMu","value","acreage","areaMu"]){for(const t of e){const i=oi(n,[t]),r=cl(i);if(r===void 0)continue;const a=String(t).toLowerCase(),o=String(oi(n,["unit","areaUnit","area_unit"])||"");return a.includes("wanmu")||o==="万亩"?r:a.includes("mu")||o==="亩"?r/1e4:r}}function A2(n=[],e={}){const{nameKeys:t=["name","areaName","townName"],valueKeys:i=["areaWanMu","value","acreage","areaMu"],nameTransform:r=l=>l,filter:a,extra:o}=e,s=new Map;return n.forEach(l=>{if(a&&!a(l))return;const u=oi(l,t),c=r(u,l),d=Uee(l,i);if(!c||d===void 0)return;const h=s.get(c)||{key:oi(l,["key","code","townCode"])||c,name:c,value:0,unit:"万亩",source:[]};h.value+=d,h.source.push(l),s.set(c,h)}),Array.from(s.values()).map(l=>{const u=tn(wt({},l),{value:Ri(l.value)});return o?tn(wt({},u),{extra:o(u)}):u}).filter(l=>Number(l.value)>0).sort((l,u)=>(Number(u.value)||0)-(Number(l.value)||0))}function dW(n){return String(n||"").replace(/草原/g,"湿地")}function Yze(n={},e=[]){var s;const t=(n==null?void 0:n.unit)||oi(e==null?void 0:e[0],["unit"])||"万吨",i=(s=cl(n==null?void 0:n.xc))!=null?s:$p(e),r=cl(n==null?void 0:n.edibleXc),a=i!==void 0&&r!==void 0?Math.max(i-r,0):void 0,o=e[0];return[{key:"wetland-yield-total",name:"鲜草总产",value:Ri(i),unit:t,scaleValue:100},{key:"wetland-yield-edible",name:"可食鲜草",value:Ri(r),unit:t,scaleValue:Ri(al(r,i))},{key:"wetland-yield-unavailable",name:"不可食鲜草",value:Ri(a),unit:t,scaleValue:Ri(al(a,i))},{key:"wetland-yield-top-town",name:o!=null&&o.name?`${o.name}产量`:"最高乡镇产量",value:o==null?void 0:o.value,unit:(o==null?void 0:o.unit)||t,scaleValue:Ri(al(o==null?void 0:o.value,i))}].filter(l=>l.value!==void 0)}function Vee({yieldSummary:n,townAreaRows:e,typeRows:t,levelRows:i,yieldRows:r,minTypeRows:a,muYieldRows:o,edibleYieldRows:s,edibleMuRows:l,typeTownRows:u,levelTownRows:c,minTownRows:d}){const h=rr("wetland-town-area","湿地面积分布",l3(e),"line",{span:1,variant:"distribution"}),f=rr("wetland-type","湿地类型结构",t,"donut",{span:1}),p=rr("wetland-level-proportion","湿地级占比",p0(i),"donut",{span:1}),m=rr("wetland-min-type","湿地优势小类",rs(a,6),"bar",{span:1}),v=rr("wetland-yield-capacity","湿地产能结构",Yze(n,r),"bar",{span:1,variant:"capacity"}),g=rr("wetland-yield","湿地生产力分布",l3(r),"line",{span:1}),_=rr("wetland-edible-yield","可食鲜草产量",rs(s,6),"column",{span:1,variant:"slim"}),S=rr("wetland-mu-yield","湿地亩产效率",rs(o,6),"bar",{span:1}),x=rr("wetland-level","湿地级别面积",i,"column",{span:1}),A=rr("wetland-level-town","1级湿地分布",rs(c,6),"bar",{span:1,variant:"distribution"}),C=rr("wetland-type-town","湿地类型乡镇分布",rs(u,6),"bar",{span:1,variant:"distribution"}),M=rr("wetland-edible-mu","可食鲜草亩产",rs(l,6),"bar",{span:1}),I=rr("wetland-min-town","优势小类乡镇分布",rs(d,6),"bar",{span:1,variant:"distribution"}),D=ha([h,f,p,m]),E=ha([_,g,S,v]);return{leftPanels:D,rightPanels:E,left:D[0],right:E[0],layerPanels:Kze({townAreaPanel:h,typePanel:f,yieldCapacityPanel:v,yieldPanel:g,levelPanel:x,levelTownPanel:A,muYieldPanel:S,levelStructurePanel:p,typeTownPanel:C,minTypePanel:m,edibleYieldPanel:_,edibleMuPanel:M,minTownPanel:I})}}function Kze(n={}){const{townAreaPanel:e,typePanel:t,yieldCapacityPanel:i,yieldPanel:r,levelPanel:a,levelTownPanel:o,muYieldPanel:s,levelStructurePanel:l,typeTownPanel:u,minTypePanel:c,edibleYieldPanel:d,edibleMuPanel:h,minTownPanel:f}=n;return{"wetland-distribution":{leftPanels:ha([e,t,l,c].filter(Boolean)),rightPanels:ha([d,r,s,i].filter(Boolean))},"wetland-level":{leftPanels:ha([l,a,o,t].filter(Boolean)),rightPanels:ha([d,r,s,i].filter(Boolean))},"wetland-type":{leftPanels:ha([t,u,c,f].filter(Boolean)),rightPanels:ha([d,r,h,i].filter(Boolean))},"wetland-yield":{leftPanels:ha([e,t,l,c].filter(Boolean)),rightPanels:ha([d,r,s,i].filter(Boolean))}}}function Zze(n={}){const{leftPanels:e=[],rightPanels:t=[]}=n,i={leftPanels:ha(e.filter(Boolean)),rightPanels:ha(t.filter(Boolean))};return{"grassland-distribution":i,"basic-grassland":i,"grassland-level":i,"grassland-type":i,"grassland-yield":i,"grassland-health":i}}function Hee({townRows:n=[],typeRows:e=[],scaleRows:t=[],protectionRows:i=[],ownershipRows:r=[],qualityRows:a=[],originRows:o=[],ageRows:s=[],canopyRows:l=[],forestTypeRows:u=[],manageLevelRows:c=[],regionRows:d=[],ownerRows:h=[],typeTownRows:f=[],qualityLevelRows:p=[],townConcentrationRows:m=cW(n,{headCount:4,headName:"前四乡镇",tailName:"其他乡镇"}),typeConcentrationRows:v=cW(e,{headCount:2,headName:"主要类型",tailName:"其他类型"})}){const g=rr("woodland-town","林地面积分布",l3(n),"line",{span:1,variant:"distribution"}),_=rr("woodland-type","林地类型结构",e,"donut",{span:1}),S=rr("woodland-protection","公益林保护等级",p0(i),"structure",{span:1}),x=rr("woodland-ownership","林地权属结构",p0(r),"structure",{span:1}),A=rr("woodland-quality","优势树种面积",rs(a,6),"bar",{span:1}),C=rr("woodland-origin","林地起源结构",p0(o),"structure",{span:1}),M=rr("woodland-age","林龄组结构",rs(s,6),"column",{span:1}),I=rr("woodland-canopy","郁闭度结构",rs(l,6),"column",{span:1}),D=rr("woodland-area-scale","林地图斑规模",t,"column",{span:1}),E=rr("woodland-forest-type","森林类别结构",rs(u,6),"bar",{span:1}),P=rr("woodland-manage-level","管护等级分布",rs(c,6),"bar",{span:1}),F=rr("woodland-public-rank","公益林面积排行",rs(d,6),"bar",{span:1,variant:"distribution"}),V=rr("woodland-owner-rank","权属单位排行",rs(h,6),"bar",{span:1}),G=rr("woodland-type-town","乡镇类型构成",rs(f,6),"bar",{span:1,variant:"distribution"}),W=rr("woodland-quality-level","林地质量等级",p0(p),"donut",{span:1}),Y=rr("woodland-town-concentration","林地集中度",p0(m),"structure",{span:1}),Q=rr("woodland-type-concentration","类型集中度",p0(v),"structure",{span:1}),K=ha(n0([g,_,S,x],[D,V,E,A])),ae=ha(n0([A,C,M,I],[D,V,E,F,Y,Q]));return{leftPanels:K,rightPanels:ae,left:K[0],right:ae[0],layerPanels:Jze({townPanel:g,typePanel:_,scalePanel:D,protectionPanel:S,ownershipPanel:x,qualityPanel:A,originPanel:C,agePanel:M,canopyPanel:I,forestTypePanel:E,manageLevelPanel:P,regionPanel:F,ownerPanel:V,typeTownPanel:G,qualityLevelPanel:W,townConcentrationPanel:Y,typeConcentrationPanel:Q})}}function Jze(n={}){const{townPanel:e,typePanel:t,scalePanel:i,protectionPanel:r,ownershipPanel:a,qualityPanel:o,originPanel:s,agePanel:l,canopyPanel:u,forestTypePanel:c,manageLevelPanel:d,regionPanel:h,ownerPanel:f,typeTownPanel:p,qualityLevelPanel:m,townConcentrationPanel:v,typeConcentrationPanel:g}=n;return{"woodland-distribution":{leftPanels:ha(n0([e,t,r,a],[i,c,f])),rightPanels:ha(n0([o,s,l,u],[i,f,h,v,g,m]))},"woodland-protection":{leftPanels:ha(n0([r,c,d,e],[t,a,i])),rightPanels:ha(n0([h,o,s,a],[f,t,i]))},"woodland-type":{leftPanels:ha(n0([t,e,p,i],[r,a,c])),rightPanels:ha(n0([o,s,r,a],[l,u,f,g]))},"woodland-quality":{leftPanels:ha(n0([o,s,l,u],[m,i,t])),rightPanels:ha(n0([e,t,r,a],[c,f,i]))},"woodland-ownership":{leftPanels:ha(n0([a,f,e,t],[i,r,o])),rightPanels:ha(n0([r,o,s,i],[c,l,u]))}}}function Qze(n){const e=String(n||"").trim();return e.includes("未")&&e.includes("退")?"未退化":e.includes("轻")?"轻度退化":e.includes("中")?"中度退化":e.includes("重")?"重度退化":e||"未分级"}function eGe(){return rn(this,null,function*(){const n=yield s3("ne:t_grassland_result_caodi",{propertyName:["area_code","degradation_level","acreage"],maxFeatures:2e5,timeout:25e3}),e=new Map,t=new Map;((n==null?void 0:n.features)||[]).forEach(o=>{const s=o.properties||{},l=Qze(s.degradation_level),u=cl(s.acreage);if(!l||u===void 0)return;const c=u/1e4;if(e.set(l,(e.get(l)||0)+c),l==="未退化")return;const d=String(s.area_code||"").slice(0,9),h=p7[d];h&&t.set(h,(t.get(h)||0)+c)});const i=["未退化","轻度退化","中度退化","重度退化","未分级"],r=Array.from(e.entries()).map(([o,s])=>({key:o,name:o,value:Ri(s),unit:"万亩"})).filter(o=>Number(o.value)>0).sort((o,s)=>{const l=i.indexOf(o.name),u=i.indexOf(s.name);return l!==-1||u!==-1?(l===-1?99:l)-(u===-1?99:u):(Number(s.value)||0)-(Number(o.value)||0)}),a=Array.from(t.entries()).map(([o,s])=>({key:o,name:o,value:Ri(s),unit:"万亩"})).filter(o=>Number(o.value)>0).sort((o,s)=>(Number(s.value)||0)-(Number(o.value)||0));return{levelRows:p0(r),townRows:a}})}function Wee(n=[],e={},t=[],i=[]){var o;const r=nGe(t).find(s=>s.key==="degraded-rate"),a=(o=cl(e==null?void 0:e.xc))!=null?o:$p(i);return[n[0],n[1],{key:"grassland-yield-total",name:"鲜草产量",value:Ri(a),unit:(e==null?void 0:e.unit)||"万吨"},r].filter(s=>(s==null?void 0:s.value)!==void 0)}function tGe(n=[]){const e=$p(n);return n.filter(t=>t.name&&t.name!=="未退化"&&Number(t.value)>0).map(t=>tn(wt({},t),{extra:Ri(al(t.value,e))?`${Ri(al(t.value,e))}%`:""}))}function jee(n={},e=[]){var s;const t=(n==null?void 0:n.unit)||oi(e==null?void 0:e[0],["unit"])||"万吨",i=(s=cl(n==null?void 0:n.xc))!=null?s:$p(e),r=cl(n==null?void 0:n.edibleXc),a=i!==void 0&&r!==void 0?Math.max(i-r,0):void 0,o=e.find(l=>Number(l.value)>0);return[{key:"forage-total",name:"鲜草总产",value:Ri(i),unit:t,scaleValue:100},{key:"forage-edible",name:"可食鲜草",value:Ri(r),unit:t,scaleValue:Ri(al(r,i))},{key:"forage-unavailable",name:"不可食鲜草",value:Ri(a),unit:t,scaleValue:Ri(al(a,i))},{key:"forage-top-town",name:o!=null&&o.name?`最高乡镇:${o.name}`:"最高乡镇产量",value:o==null?void 0:o.value,unit:(o==null?void 0:o.unit)||t,scaleValue:Ri(al(o==null?void 0:o.value,i))}].filter(l=>l.value!==void 0)}function $ee(){return{levelRows:p0([{key:"none",name:"未退化",value:642.42,unit:"万亩"},{key:"light",name:"轻度退化",value:83.95,unit:"万亩"},{key:"middle",name:"中度退化",value:17.49,unit:"万亩"},{key:"heavy",name:"重度退化",value:13.09,unit:"万亩"}]),townRows:[{key:"qiongxi",name:"邛溪镇",value:14.72,unit:"万亩"},{key:"sedi",name:"色地镇",value:13.86,unit:"万亩"},{key:"anqu",name:"安曲镇",value:12.38,unit:"万亩"},{key:"wache",name:"瓦切镇",value:10.64,unit:"万亩"},{key:"chaerma",name:"查尔玛乡",value:9.53,unit:"万亩"},{key:"amu",name:"阿木乡",value:8.71,unit:"万亩"}]}}function nGe(n=[]){const e=$p(n),t=n.filter(o=>o.name&&o.name!=="未退化"),i=$p(t),r=t.filter(o=>o.name.includes("中")||o.name.includes("重")).reduce((o,s)=>o+(Number(s.value)||0),0),a=t.find(o=>o.name.includes("重"));return[{key:"degraded-total",name:"退化面积",value:Ri(i),unit:"万亩",icon:"area"},{key:"degraded-rate",name:"退化率",value:Ri(al(i,e)),unit:"%",icon:"rate"},{key:"medium-heavy-area",name:"中重度",value:Ri(r),unit:"万亩",icon:"risk"},{key:"heavy-area",name:"重度",value:a==null?void 0:a.value,unit:(a==null?void 0:a.unit)||"万亩",icon:"risk"}].filter(o=>o.value!==void 0)}function hW(n,e){if(n==="grassland"){const t=hp([{key:"grassland-area",name:"草地总面积",value:756.43,unit:"万亩"},{key:"basic-grassland",name:"基本草原",value:637.13,unit:"万亩"},{key:"general-grassland",name:"一般草原",value:119.31,unit:"万亩"}],n),i=ra([{name:"色地镇",value:99.09,basicAreaWanMu:66.58},{name:"邛溪镇",value:93.01,basicAreaWanMu:70.6},{name:"安曲镇",value:90.08,basicAreaWanMu:73.49},{name:"阿木乡",value:86.3,basicAreaWanMu:77.31},{name:"查尔玛乡",value:80.8,basicAreaWanMu:79.04},{name:"瓦切镇",value:74.74,basicAreaWanMu:70.73},{name:"刷经寺镇",value:74.3,basicAreaWanMu:56.66},{name:"龙日镇",value:62.64,basicAreaWanMu:49.66},{name:"江茸乡",value:49.67,basicAreaWanMu:48.78},{name:"麦洼乡",value:45.82,basicAreaWanMu:44.28}],{nameKeys:["name"],valueKeys:["value"]}),r=ra([{areaName:"邛溪镇",yield:38.88},{areaName:"色地镇",yield:37.78},{areaName:"安曲镇",yield:36.77},{areaName:"查尔玛乡",yield:33.21},{areaName:"瓦切镇",yield:32.62},{areaName:"阿木乡",yield:32.17},{areaName:"龙日镇",yield:24.43},{areaName:"刷经寺镇",yield:22.51},{areaName:"麦洼乡",yield:19.5},{areaName:"江茸乡",yield:19.43}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"万吨"}),a=s9([{key:"grazing",name:"重要放牧场",value:516.41,unit:"万亩"},{key:"general",name:"一般草原",value:119.31,unit:"万亩"},{key:"ecology",name:"生态调节草原",value:97.23,unit:"万亩"},{key:"mowing",name:"割草地",value:15.95,unit:"万亩"},{key:"improved",name:"改良草地",value:4.33,unit:"万亩"}],{limit:4,minPercent:3,otherName:"其他草原类型"}),o=ra([{areaName:"瓦切镇",yield:798.39},{areaName:"查尔玛乡",yield:794.32},{areaName:"麦洼乡",yield:784.16},{areaName:"邛溪镇",yield:772.43},{areaName:"安曲镇",yield:770.9}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"斤"}),l=$ee().levelRows,u=p0([{key:"level-3",name:"3级草原",value:200.9,unit:"万亩"},{key:"level-4",name:"4级草原",value:205.47,unit:"万亩"},{key:"level-5",name:"5级草原",value:385.42,unit:"万亩"},{key:"level-6",name:"6级草原",value:139.06,unit:"万亩"},{key:"level-7",name:"7级草原",value:3.68,unit:"万亩"},{key:"level-8",name:"8级草原",value:3.61,unit:"万亩"}]),c=p0([{key:"good",name:"较健康",value:231.32,unit:"万亩"},{key:"healthy",name:"健康",value:481.87,unit:"万亩"},{key:"subhealthy",name:"亚健康",value:23.69,unit:"万亩"},{key:"unhealthy",name:"不健康",value:20.27,unit:"万亩"}]),d=jee({xc:297.29,edibleXc:192.26,unit:"万吨"},r),h=ra([{areaName:"邛溪镇",yield:24.71},{areaName:"色地镇",yield:24.18},{areaName:"安曲镇",yield:23.48},{areaName:"查尔玛乡",yield:21.26},{areaName:"瓦切镇",yield:20.88},{areaName:"阿木乡",yield:20.59},{areaName:"龙日镇",yield:15.63},{areaName:"刷经寺镇",yield:14.41},{areaName:"麦洼乡",yield:12.48},{areaName:"江茸乡",yield:12.44}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"万吨"}),f=Xee({core:t,townRows:i,grassTypeRows:a,grassLevelRows:u,healthRows:c,productivityRows:o,edibleYieldRows:h,forageRows:d,degradationRows:l}),p=tn(wt({status:"fallback"},f),{top:Wee(t,{xc:297.29,unit:"万吨"},l,r)});return tv(p,n,e)}if(n==="wetland"){const t=hp([{key:"wetland-area",name:"湿地面积",value:291.82,unit:"万亩"},{key:"wetland-yield",name:"湿地生产力(鲜草)",value:108.84,unit:"万吨"},{key:"wetland-level-1-area",name:"1级湿地面积",value:213.22,unit:"万亩"}],n),i=s9([{name:"高寒草甸类",value:190.32,unit:"万亩"},{name:"山地草甸类",value:49.48,unit:"万亩"},{name:"低地草甸类",value:3.21,unit:"万亩"}],{limit:4,minPercent:1,otherName:"其他湿地类型"}),r=[{name:"1级湿地",value:213.22,unit:"万亩"},{name:"2级湿地",value:22.99,unit:"万亩"},{name:"3级湿地",value:6.42,unit:"万亩"},{name:"4级湿地",value:.36,unit:"万亩"},{name:"5级湿地",value:.02,unit:"万亩"}],a=ra([{areaName:"色地镇",yield:21.32},{areaName:"瓦切镇",yield:17.49},{areaName:"安曲镇",yield:15.19},{areaName:"邛溪镇",yield:13.41},{areaName:"阿木乡",yield:10.37},{areaName:"龙日镇",yield:10.11},{areaName:"麦洼乡",yield:9.67},{areaName:"江茸乡",yield:5.78},{areaName:"刷经寺镇",yield:3.43},{areaName:"查尔玛乡",yield:2.08}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"万吨"}),o=[{name:"瓦切镇",value:944.22,unit:"斤"},{name:"安曲镇",value:913.28,unit:"斤"},{name:"麦洼乡",value:911.14,unit:"斤"},{name:"查尔玛乡",value:873.31,unit:"斤"},{name:"阿木乡",value:872,unit:"斤"}],s=[{name:"瓦切镇",value:36.38,unit:"万亩"},{name:"邛溪镇",value:29.29,unit:"万亩"},{name:"阿木乡",value:25.26,unit:"万亩"},{name:"龙日镇",value:24.59,unit:"万亩"},{name:"色地镇",value:24.62,unit:"万亩"}].sort((f,p)=>p.value-f.value),l=[{name:"矮生嵩草、杂类草型",value:108.35,unit:"万亩"},{name:"高山嵩草、矮生嵩草型",value:34.36,unit:"万亩"},{name:"西藏嵩草、杂类草型",value:32.37,unit:"万亩"},{name:"早熟禾、杂类草型",value:20.99,unit:"万亩"},{name:"苔草、杂类草型",value:14.63,unit:"万亩"}],u=ra([{areaName:"色地镇",yield:2.82},{areaName:"邛溪镇",yield:2.71},{areaName:"瓦切镇",yield:2.64},{areaName:"麦洼乡",yield:1.76},{areaName:"安曲镇",yield:1.66}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"万吨"}),c=ra([{areaName:"阿木乡",yield:509.83},{areaName:"瓦切镇",yield:509.52},{areaName:"邛溪镇",yield:356.74},{areaName:"色地镇",yield:287.23},{areaName:"麦洼乡",yield:281.27}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"斤"}),d=Vee({core:t,yieldSummary:{xc:108.84,edibleXc:1.65,unit:"万吨"},townAreaRows:s,typeRows:i,levelRows:r,yieldRows:a,minTypeRows:l,muYieldRows:o,edibleYieldRows:u,edibleMuRows:c,typeTownRows:s,levelTownRows:s,minTownRows:s}),h=wt({status:"fallback",core:t,top:[t[0],t[1],t[2]]},d);return tv(h,n,e)}if(n==="woodland"){const t=hp([{key:"woodland-area",name:"林地总面积",value:177.92,unit:"万亩"},{key:"woodland-public-area",name:"公益林面积",value:159.33,unit:"万亩"},{key:"woodland-public-rate",name:"公益林占比",value:89.55,unit:"%"}],n),i=ra([{name:"刷经寺镇",value:59.4,percent:33.39},{name:"色地镇",value:27.97,percent:15.72},{name:"查尔玛乡",value:22.6,percent:12.7},{name:"阿木乡",value:19.37,percent:10.89},{name:"江茸乡",value:11.61,percent:6.53},{name:"邛溪镇",value:8.29,percent:4.66},{name:"瓦切镇",value:7.98,percent:4.49},{name:"安曲镇",value:7.47,percent:4.2},{name:"龙日镇",value:7.08,percent:3.98},{name:"麦洼乡",value:6.14,percent:3.45}],{nameKeys:["name"],valueKeys:["value"],extra:d=>`占比 ${Ri(d.percent)}%`}),r=s9([{name:"灌木林地",value:114.78,unit:"万亩"},{name:"乔木林地",value:49.56,unit:"万亩"},{name:"灌丛沼泽",value:8.79,unit:"万亩"},{name:"其他林地",value:4.79,unit:"万亩"}],{limit:4,minPercent:1,otherName:"其他林地"}),u=Hee({townRows:i,typeRows:r,scaleRows:[{name:"15-150亩",value:96.91,unit:"万亩"},{name:"<15亩",value:39.99,unit:"万亩"},{name:"150-1500亩",value:30.81,unit:"万亩"},{name:"≥1500亩",value:10.21,unit:"万亩"}],protectionRows:[{name:"国家二级公益林",value:158.33,unit:"万亩",extra:"88.99%"},{name:"未划定",value:18.72,unit:"万亩",extra:"10.52%"},{name:"国家一级公益林",value:.88,unit:"万亩",extra:"0.49%"}],ownershipRows:[{name:"集体林地",value:172.19,unit:"万亩",extra:"96.78%"},{name:"国有或其他",value:5.73,unit:"万亩",extra:"3.22%"}],ownerRows:[{name:"壤口村",value:42.74,unit:"万亩",extra:"占比 24.02%"},{name:"查龙村",value:16.34,unit:"万亩",extra:"占比 9.18%"},{name:"茸塔玛村",value:14.96,unit:"万亩",extra:"占比 8.41%"},{name:"峨扎村",value:9.96,unit:"万亩",extra:"占比 5.6%"},{name:"三家寨村",value:9.57,unit:"万亩",extra:"占比 5.38%"}]}),c=wt({status:"fallback",core:t,top:[t[0],t[1],t[2]]},u);return tv(c,n,e)}return{status:"empty",core:hp([],n),leftPanels:[],rightPanels:[],left:{title:"业务统计",rows:[]},right:{title:"业务统计",rows:[]}}}function qee(n=[],e=["name"]){const t=new Map;return n.forEach(i=>{const r=oi(i,e);!r||t.has(r)||t.set(r,i)}),Array.from(t.values())}function na(n,e=[]){return n().catch(()=>e)}function gT(n=[],e={}){const{nameKeys:t=["name","health","level"],valueKeys:i=["value","acreage","areaWanMu"],unit:r="万亩",nameTransform:a=l=>l,max:o=Number.POSITIVE_INFINITY}=e,s=ra(n||[],{nameKeys:t,valueKeys:i,unit:r}).map(l=>tn(wt({},l),{name:a(l.name)}));return p0(s).filter(l=>Number(l.value)>0).slice(0,o)}function iGe(n){const e=String(n||"");return/^\d+$/.test(e)?`${e}级草原`:e.includes("级")?e.replace(/草地/g,"草原"):e}function rGe(n){const e=String(n||"");return{healthy:"健康",subhealthy:"亚健康",unhealthy:"不健康"}[e]||e}function Xee({core:n,townRows:e,grassTypeRows:t,grassLevelRows:i,healthRows:r,productivityRows:a,edibleYieldRows:o,forageRows:s,degradationRows:l}){const u=rr("grassland-town","草地面积分布",l3(e),"line",{span:1}),c=rr("grassland-productivity-town","草地生产力分布",l3(a),"line",{span:1}),d=rr("grassland-type-proportion","草原类占比",t,"donut",{span:1}),h=rr("grassland-edible-yield","可食鲜草产量分布",rs(o,10),"column",{span:1,variant:"slim"}),f=rr("grassland-degradation","草地退化统计",tGe(l),"structure",{span:1}),p=rr("grassland-health-proportion","草地健康占比",r,"donut",{span:1}),m=rr("grassland-level-proportion","草原级占比",i,"donut",{span:1}),v=rr("grassland-forage-capacity","饲草供给",s,"bar",{span:1,variant:"capacity"}),g=ha([u,d,f,m]),_=ha([h,c,p,v]);return{core:n,leftPanels:g,rightPanels:_,left:g[0],right:_[0],layerPanels:Zze({leftPanels:g,rightPanels:_})}}function aGe(n,e={}){const t=Nze(n),i=qee(e.typeRows||[],["name"]),r=e.yieldRows||[],a=e.levelRows||[],o=e.minTypeRows||[],s=e.edibleRows||[],l=e.edibleMuRows||[],u=e.typeDistributionRows||[],c=e.levelDistributionRows||[],d=e.minTypeDistributionRows||[],h=e.yieldSummary||{},f=s9(k4(i,{nameKeys:["name"],valueKeys:["value"],unit:"万亩"}),{limit:4,minPercent:1,otherName:"其他湿地类型"}),p=X8(r,e.muYieldRows||[],{showMuYieldExtra:!1}),m=k4(e.muYieldRows||[],{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:"斤",max:5}),v=k4(a,{nameKeys:["name"],valueKeys:["value"],unit:"万亩"}).map(F=>tn(wt({},F),{name:dW(F.name)})),g=Bze(o),_=X8(s,l,{showMuYieldExtra:!1}),S=k4(l,{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:oi(l==null?void 0:l[0],["unit"])||"斤",max:5}),x=A2(u,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"]}),A=A2(u,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"],extra:F=>{var V;return`${((V=F.source)==null?void 0:V.length)||0}类`}}),C=A2(c,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"]}),M=A2(c,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"],filter:F=>dW(oi(F,["level","name"])).startsWith("1级")}),I=A2(d,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"],extra:F=>{var V;return`${((V=F.source)==null?void 0:V.filter(G=>Uee(G,["acreage","areaWanMu","value"])>0).length)||0}型`}}),D=hp(t,"wetland"),E=v.find(F=>/^1级/.test(F.name))||v[0],P=Vee({yieldSummary:h,townAreaRows:x,typeRows:f,levelRows:v,yieldRows:p,minTypeRows:g,muYieldRows:m,edibleYieldRows:_,edibleMuRows:S,typeTownRows:A,levelTownRows:M.length?M:C,minTownRows:I});return wt({core:D,top:[D[0],D[1],{key:"wetland-level-1-area",name:"1级湿地面积",value:E==null?void 0:E.value,unit:(E==null?void 0:E.unit)||"万亩"}].filter(Boolean)},P)}function S5(n,e){return rn(this,null,function*(){var t;try{if(n==="woodland"){const[i,r,a,o,s]=yield Promise.all([Yd("/woodland/distribution").then(ki),na(()=>rn(this,null,function*(){return ki(yield Yd("/woodland/types"))}),{}),na(()=>rn(this,null,function*(){return ki(yield Yd("/woodland/protection"))}),{}),na(()=>rn(this,null,function*(){return ki(yield Yd("/woodland/quality"))}),{}),na(()=>rn(this,null,function*(){return ki(yield Yd("/woodland/ownership"))}),{})]),l=hp(kze(i),n),u=oi((i==null?void 0:i.core)||(i==null?void 0:i.summary)||{},["totalAreaWanMu","total_area_wan_mu","areaWanMu","area_wan_mu"]),c=oi((a==null?void 0:a.summary)||{},["publicAreaWanMu","public_area_wan_mu"]),d=[l[0],{key:"woodland-public-area",name:"公益林面积",value:Ri(c),unit:"万亩"},{key:"woodland-public-rate",name:"公益林占比",value:Ri((t=oi((a==null?void 0:a.summary)||{},["publicAreaPercent","public_area_percent"]))!=null?t:al(c,u)),unit:"%"}].filter(Boolean),h=ra((i==null?void 0:i.areaDistribution)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:V=>N4(V,u)}),f=s9(ra((r==null?void 0:r.typeStats)||(i==null?void 0:i.typeDistribution)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),{limit:4,minPercent:1,otherName:"其他林地"}),p=ra((i==null?void 0:i.patchScale)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:V=>N4(V,u)}),m=ra((a==null?void 0:a.protectionLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),v=ra((o==null?void 0:o.speciesRanks)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:xu}),g=ra((s==null?void 0:s.ownerRanks)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:V=>N4(V,u)}),_=ra((s==null?void 0:s.landOwnerships)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),S=ra((a==null?void 0:a.forestTypes)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:xu}),x=ra((a==null?void 0:a.manageLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:xu}),A=ra((a==null?void 0:a.regionRanks)||[],{nameKeys:["regionName","name","townName"],valueKeys:["areaWanMu","value"],max:6,extra:V=>N4(V,c)}),C=ra((o==null?void 0:o.origins)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),M=ra((o==null?void 0:o.ageGroups)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),I=ra((o==null?void 0:o.canopyLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:V=>{const G=Ri(oi(V,["avgCanopy","avg_canopy"]));return G!==void 0?`均值 ${G}`:xu(V)}}),D=ra((o==null?void 0:o.qualityLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:xu}),E=lM((r==null?void 0:r.townComposition)||[],{nameKeys:["townName","name"],valueKeys:["areaWanMu","value"]}).slice(0,6),P=Hee({townRows:h,typeRows:f,scaleRows:p,protectionRows:m,ownershipRows:_,qualityRows:v,originRows:C,ageRows:M,canopyRows:I,forestTypeRows:S,manageLevelRows:x,regionRows:A,ownerRows:g,typeTownRows:E,qualityLevelRows:D}),F=wt({status:"success",core:l,top:d},P);return tv(F,n,e)}if(n==="grassland"){const[i,r,a,o,s,l,u,c,d]=yield Promise.all([Dr("/basic_grassland/overview").then(ki),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_yield/yieldProportion"))}),{}),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_yield/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_yield/muYieldDistribution"))})),na(()=>rn(this,null,function*(){return eGe()}),$ee()),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_grass_type/areaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_grassland_level/areaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_health/proportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/grassland_yield/edibleXcDistribution"))}))]),h=s.levelRows||[],f=hp(Fze(i),n),p=X8(a||[],o||[],{showMuYieldExtra:!1}),m=ra(o||[],{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:oi(o==null?void 0:o[0],["unit"])||"斤"}),v=ra((i==null?void 0:i.townStats)||[],{nameKeys:["name"],valueKeys:["totalAreaWanMu"]}),g=gT(qee(l||[],["name"]),{nameKeys:["name"],valueKeys:["value","areaWanMu","acreage"],unit:"万亩",nameTransform:zee}),_=gT(u||[],{nameKeys:["name","level"],valueKeys:["value","areaWanMu","acreage"],unit:"万亩",nameTransform:iGe}),S=gT(c||[],{nameKeys:["health","name"],valueKeys:["acreage","value","areaWanMu"],unit:"万亩",nameTransform:rGe}),x=X8(d||[],[],{showMuYieldExtra:!1}),A=Xee({core:f,townRows:v,grassTypeRows:g,grassLevelRows:_,healthRows:S,productivityRows:m,edibleYieldRows:x,forageRows:jee(r,p),degradationRows:h}),C=tn(wt({status:"success"},A),{top:Wee(f,r,h,p)});return tv(C,n,e)}if(n==="wetland"){const[i,r,a,o,s,l,u,c,d,h,f,p]=yield Promise.all([Oze([()=>rn(this,null,function*(){return ki(yield Dr("/index/dataItem",{group:"wetland"}))}),()=>rn(this,null,function*(){return ki(yield Dr("/index/dataItem",{group:"wetland_grassland_level"}))})]),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/areaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/muYieldDistribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grassland_level/areaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/minTypeAreaProportion"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/edibleXcDistribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/edibleXcMuDistribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grassland_level/distribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_grass_type_copy/minTypeAreaDistribution"))})),na(()=>rn(this,null,function*(){return ki(yield Dr("/wetland_yield/yieldProportion"))}),{})]),m=aGe(i,{typeRows:r,yieldRows:a,muYieldRows:o,levelRows:s,minTypeRows:l,edibleRows:u,edibleMuRows:c,typeDistributionRows:d,levelDistributionRows:h,minTypeDistributionRows:f,yieldSummary:p}),v=tn(wt({status:"success"},m),{left:m.leftPanels[0],right:m.rightPanels[0]});return tv(v,n,e)}return hW(n,e)}catch(i){return tn(wt({},hW(n,e)),{status:"error",error:i})}})}function oGe(n,e,t=null){return rn(this,null,function*(){try{const i=yield qze(n,e,t);return i||(n==="woodland"?e==="woodland-protection"?yield F4({topicKey:n,layerKey:e,layerName:"ne:t_woodland_2023",title:"公益林面积排行",cqlFilter:"gjgyl_bhdj IN ('1','2')"}).catch(()=>rn(this,null,function*(){const r=ki(yield Yd("/woodland/protection")),a=lM((r==null?void 0:r.regionRanks)||[],{nameKeys:["townName"],valueKeys:["areaWanMu"],unit:"万亩"});return $u({topicKey:n,layerKey:e,title:"公益林面积排行",unit:"万亩",rows:a,note:"按公益林村级榜单汇总到乡镇"})})):e==="woodland-type"?yield F4({topicKey:n,layerKey:e,layerName:"ne:t_woodland_2023",title:"林地类型面积排行"}).catch(()=>rn(this,null,function*(){const r=ki(yield Yd("/woodland/types")),a=lM((r==null?void 0:r.townComposition)||[],{nameKeys:["townName"],valueKeys:["areaWanMu"],unit:"万亩"});return $u({topicKey:n,layerKey:e,title:"林地类型面积排行",unit:"万亩",rows:a,note:"按林地类型组成汇总到乡镇"})})):e==="woodland-quality"?yield F4({topicKey:n,layerKey:e,layerName:"ne:t_woodland_2023",title:"林地质量面积排行",cqlFilter:"zl_dj IS NOT NULL"}):e==="woodland-ownership"?yield F4({topicKey:n,layerKey:e,layerName:"ne:t_woodland_2023",title:"林地权属面积排行",cqlFilter:"ld_qs IS NOT NULL"}):yield zze(n,e,"林地面积排行"):n==="grassland"?e==="basic-grassland"?yield lW(n,e,"basicAreaWanMu","基本草原面积排行"):e==="grassland-level"?yield O4(n,e,"/grassland_yield/muYieldDistribution","草地亩产排行","斤"):yield lW(n,e,"totalAreaWanMu","草地面积排行"):n==="wetland"?e==="wetland-level"?yield O4(n,e,"/wetland_yield/muYieldDistribution","湿地亩产排行","斤"):e==="wetland-type"?yield O4(n,e,"/wetland_yield/edibleXcDistribution","可食鲜草产量排行","万吨"):yield O4(n,e,"/wetland_yield/distribution","湿地生产力排行","万吨"):$u({topicKey:n,layerKey:e,title:"乡镇统计排行",rows:[]}))}catch(i){return{status:"error",topicKey:n,layerKey:e,title:"乡镇统计排行",unit:"",rows:[],error:i}}})}const FR="AlibabaPuHuiTi, Microsoft YaHei, Arial, sans-serif";function yT(n,e={}){return wt({trigger:"item",backgroundColor:"rgba(5, 31, 51, 0.96)",borderColor:"rgba(0, 210, 255, 0.54)",borderWidth:1,padding:[7,10],textStyle:{color:"#e7fbff",fontFamily:FR,fontSize:12,lineHeight:18},extraCssText:"box-shadow:0 0 18px rgba(0,210,255,.2);",formatter:n},e)}function _T(n={}){var t,i,r;const e=wt({textStyle:wt({fontFamily:FR,color:"rgba(225, 249, 255, 0.78)"},n.textStyle||{}),animation:(t=n.animation)!=null?t:!0,animationDuration:(i=n.animationDuration)!=null?i:900,animationDurationUpdate:(r=n.animationDurationUpdate)!=null?r:700,animationEasing:n.animationEasing||"cubicOut"},n);return uM(e),e}function uM(n){if(!n||typeof n!="object")return;["textStyle","axisLabel","nameTextStyle","label","axisName"].forEach(t=>{!n[t]||typeof n[t]!="object"||(n[t]=sGe(n[t]))}),Object.keys(n).forEach(t=>{const i=n[t];if(!(!i||typeof i!="object")&&!(t==="color"||t==="itemStyle"||t==="areaStyle"||t==="lineStyle")){if(Array.isArray(i)){i.forEach(uM);return}uM(i)}})}function sGe(n){const e=wt({fontFamily:n.fontFamily||FR},n);return typeof e.fontSize=="number"&&e.fontSize<10&&(e.fontSize=10),e}const Vu={herdsmanCount:129,grasslandArea:7568515,wetArea:2429693,yakCount:10965,projectCount:17,baseCount:12},z3=[{zoneName:"色地乡",grasslandArea:1463044,yakCount:11704},{zoneName:"麦洼乡",grasslandArea:660352,yakCount:5283},{zoneName:"壤口乡",grasslandArea:763672,yakCount:6109},{zoneName:"阿木乡",grasslandArea:1115947,yakCount:8928},{zoneName:"瓦切镇",grasslandArea:1111492,yakCount:8892},{zoneName:"查尔玛乡",grasslandArea:858500,yakCount:6868},{zoneName:"江茸乡",grasslandArea:644761,yakCount:5158},{zoneName:"龙日镇",grasslandArea:874234,yakCount:6994},{zoneName:"安曲镇",grasslandArea:1165634,yakCount:9325},{zoneName:"刷经寺镇",grasslandArea:62465,yakCount:500},{zoneName:"邛溪镇",grasslandArea:1166721,yakCount:9334}],lGe=[{zoneName:"色地乡",grasslandArea:350788,wetArea:166983},{zoneName:"麦洼乡",grasslandArea:162198,wetArea:71501},{zoneName:"壤口乡",grasslandArea:241024,wetArea:29239},{zoneName:"阿木乡",grasslandArea:305522,wetArea:89411},{zoneName:"瓦切镇",grasslandArea:264640,wetArea:128717},{zoneName:"查尔玛乡",grasslandArea:286159,wetArea:17664},{zoneName:"江茸乡",grasslandArea:175840,wetArea:52341},{zoneName:"龙日镇",grasslandArea:222346,wetArea:87046},{zoneName:"安曲镇",grasslandArea:304970,wetArea:107548},{zoneName:"刷经寺镇",grasslandArea:22107,wetArea:7002},{zoneName:"邛溪镇",grasslandArea:318316,wetArea:94587}],uGe=[{month:"1月",count:485,speed:380},{month:"2月",count:502,speed:313},{month:"3月",count:471,speed:142},{month:"4月",count:893,speed:574},{month:"5月",count:874,speed:231},{month:"6月",count:879,speed:555},{month:"7月",count:145,speed:654},{month:"8月",count:521,speed:123},{month:"9月",count:741,speed:456},{month:"10月",count:744,speed:458},{month:"11月",count:777,speed:444},{month:"12月",count:563,speed:254}],OR=[{name:"色地乡",count:131983,devices:25},{name:"瓦切乡",count:126611,devices:24},{name:"安曲乡",count:99331,devices:20},{name:"邛溪镇",count:81727,devices:18},{name:"麦洼乡",count:78489,devices:16},{name:"龙日乡",count:66846,devices:15},{name:"阿木乡",count:64176,devices:14},{name:"查尔玛乡",count:47958,devices:11},{name:"江茸乡",count:34576,devices:9},{name:"刷经寺镇",count:30407,devices:8},{name:"壤口乡",count:19744,devices:6}],u3=OR.reduce((n,e)=>n+e.count,0),cGe=1824,BR=-3672,cM=u3+cGe+BR;function dGe(n,e){const t=n.map(r=>tn(wt({},r),{count:Math.round(e*r.ratio/100)})),i=e-t.reduce((r,a)=>r+a.count,0);return i&&t[1]&&(t[1].count+=i),t}dGe([{name:"成年母牛",ratio:47},{name:"其他成年牛",ratio:22},{name:"幼畜",ratio:16},{name:"育成牛",ratio:11},{name:"公牛",ratio:4}],cM);const zR=[{label:"屠宰出栏",value:1706,yoy:6},{label:"活畜交易",value:1043,yoy:-3},{label:"外运销售",value:624,yoy:12},{label:"其他出栏",value:299,yoy:-9}],Yee=[{name:"饲草储备库",value:7,capacity:10500,unit:"座"},{name:"加工企业",value:7,capacity:13e3,unit:"家"},{name:"工程数量",value:Vu.projectCount,capacity:17,unit:"个"},{name:"基地数量",value:Vu.baseCount,capacity:12,unit:"个"}],Kee=1716,Kd=u3+Kee+BR,hGe={色地镇:"色地乡",瓦切镇:"瓦切乡",安曲镇:"安曲乡",龙日镇:"龙日乡"};function dM(n){return hGe[n]||n}const hM=OR.map(({name:n,count:e})=>({name:n,count:e})).sort((n,e)=>e.count-n.count),Lc=vGe([{key:"adultCow",name:"成年母牛",ratio:47,source:"专家共识模型"},{key:"otherAdult",name:"其他成年牛",ratio:22,source:"专家共识模型"},{key:"calf",name:"幼畜(≤1岁)",ratio:16,source:"专家共识模型"},{key:"yearling",name:"育成牛(1-2岁)",ratio:11,source:"专家共识模型"},{key:"bull",name:"公牛",ratio:4,source:"专家共识模型"}],Kd),fW=zR.map((n,e)=>tn(wt({},n),{color:["#ff8f6b","#30dcff","#ffd76c","#7aa7ff"][e%4]})),ST=[{age:"≤1岁",cow:61280,bull:64892},{age:"1-2岁",cow:43076,bull:43752},{age:"2-4岁",cow:148260,bull:78240},{age:"4-8岁",cow:169420,bull:51860},{age:"8岁以上",cow:45534,bull:21416}],Hs=[{key:"2026",label:"2026年底",shortLabel:"2026",months:7,stock:781236,births:44763,outflow:21684,correction:-21735,structure:{adultCow:47,otherAdult:22,calf:16,yearling:11,bull:4}},{key:"2027",label:"2027年底",shortLabel:"2027",months:19,stock:779428,births:121374,outflow:61286,correction:-60552,structure:{adultCow:47,otherAdult:21,calf:17,yearling:11,bull:4}},{key:"2028",label:"2028年底",shortLabel:"2028",months:31,stock:782617,births:199642,outflow:102517,correction:-94400,structure:{adultCow:46,otherAdult:22,calf:17,yearling:11,bull:4}}],pW=[{name:"繁殖补充",value:86},{name:"出栏周转",value:62},{name:"死亡淘汰",value:48},{name:"母牛基础",value:91},{name:"幼畜存活",value:73}];function Zee(n){return Hs.find(e=>e.key===n)||Hs[1]}function fGe(n){var r,a,o,s,l;const e=(n==null?void 0:n.structure)||{},t=[{key:"adultCow",name:"成年母牛",ratio:(r=e.adultCow)!=null?r:47},{key:"otherAdult",name:"其他成年牛",ratio:(a=e.otherAdult)!=null?a:22},{key:"calf",name:"幼畜(≤1岁)",ratio:(o=e.calf)!=null?o:16},{key:"yearling",name:"育成牛(1-2岁)",ratio:(s=e.yearling)!=null?s:11},{key:"bull",name:"公牛",ratio:(l=e.bull)!=null?l:4}].map(u=>tn(wt({},u),{count:Math.round(n.stock*u.ratio/100),source:"预测模型"})),i=n.stock-t.reduce((u,c)=>u+c.count,0);return i&&t[1]&&(t[1].count+=i),t}function pGe(n){const e=n.stock/u3,t=hM.map((r,a)=>tn(wt({},r),{forecast:Math.round(r.count*e+(a%3-1)*n.months*18)})),i=n.stock-t.reduce((r,a)=>r+a.forecast,0);if(i){const r=t.reduce((a,o)=>o.count>a.count?o:a,t[0]);r.forecast+=i}return t.map(r=>tn(wt({},r),{change:r.forecast-r.count})).sort((r,a)=>a.forecast-r.forecast)}function Jee(n){const e=n.months+1,t=Array.from({length:e},(o,s)=>s===0?"2026-06":s===n.months?n.label:`+${s}月`),i=t.map((o,s)=>{const l=s/n.months,u=Math.sin(s/2.6)*Math.sin(Math.PI*l)*Math.min(360,n.months*18);return Math.round(Kd+(n.stock-Kd)*l+u)}),r=t.map((o,s)=>Math.round(n.births/n.months*s)),a=t.map((o,s)=>Math.round(n.outflow/n.months*s));return{labels:t,stock:i,births:r,outflow:a}}function vGe(n,e){const t=n.map(r=>tn(wt({},r),{count:Math.round(e*r.ratio/100)})),i=e-t.reduce((r,a)=>r+a.count,0);return i&&t[1]&&(t[1].count+=i),t}function mGe(n){const e=new Map;return n.forEach(t=>{const i=dM(t.name),r=e.get(i)||{name:i,count:0};r.count+=Number(t.count||0),e.set(i,r)}),[...e.values()].sort((t,i)=>i.count-t.count)}const Qc=(n,e=2)=>{const t=xd(10,e);return Math.round((Number(n)||0)*t)/t},Qee=(n,e)=>n.reduce((t,i)=>t+(Number(i[e])||0),0),vW=n=>Qc((Number(n)||0)/1e4,2),gGe=Qee(zR,"value"),g7=Qee(z3,"yakCount"),GR=Qc(Vu.grasslandArea/1e4,2),yGe=Qc(Vu.wetArea/1e4,2),_Ge=177.92,SGe=Qc(g7/Math.max(GR,1),1),bGe=108.84,xGe=159.33,wGe=[{key:"yak-count",zh:"牦牛数量",name:"牦牛数量",value:g7,unit:"头",decimals:0},{key:"grassland-area",zh:"草地面积",name:"草地面积",value:GR,unit:"万亩",decimals:2},{key:"wetland-area",zh:"湿地面积",name:"湿地面积",value:yGe,unit:"万亩",decimals:2},{key:"woodland-area",zh:"林地面积",name:"林地面积",value:_Ge,unit:"万亩",decimals:2}];lGe.map(n=>{const e=z3.find(r=>r.zoneName===n.zoneName)||{},t=vW(n.grasslandArea),i=vW(n.wetArea);return{key:n.zoneName,name:n.zoneName,grasslandArea:t,wetlandArea:i,yakCount:e.yakCount||0,resourceTotal:Qc(t+i,2),density:Qc((e.yakCount||0)/Math.max(t+i,1),1)}}).sort((n,e)=>e.yakCount-n.yakCount);z3.map(n=>({key:n.zoneName,name:n.zoneName,value:n.yakCount,unit:"头",percent:Qc(n.yakCount/Math.max(g7,1)*100,1)})).sort((n,e)=>e.value-n.value);const mW=zR.map(n=>({key:n.label,name:n.label,value:n.value,unit:"头",yoy:n.yoy,percent:Qc(n.value/Math.max(gGe,1)*100,1)})),TGe=Math.max(...Yee.map(n=>Number(n.value)||0),1);Yee.map(n=>{const e=n.name.includes("储备")||n.name.includes("加工")?`${Number(n.capacity||0).toLocaleString("zh-CN")}吨`:"已接入";return{key:n.name,name:n.name,value:n.value,unit:n.unit,capacity:n.capacity,capacityNote:e,percent:Qc((Number(n.value)||0)/TGe*100,1)}});var aj,oj;(aj=mW[0])!=null&&aj.value,(oj=mW[1])!=null&&oj.value,Vu.baseCount+Vu.projectCount;const B4=""+new URL("live-scene-1-786cdd0a-balabala-1782919616283.png",import.meta.url).href;const AGe={class:"home-dashboard"},CGe={class:"home-layer-tools"},MGe={class:"home-layer-tree-panel"},EGe={class:"home-layer-tree-list"},PGe=["onClick"],RGe={key:0,class:"home-layer-tree-children"},LGe=["onClick"],IGe={class:"home-layer-tree-legend"},DGe=["disabled","title","onClick"],NGe={class:"home-layer-legend-name"},kGe={key:0,class:"home-layer-legend-check"},FGe={key:1,class:"home-layer-tree-empty"},OGe={class:"home-left home-side-stack"},BGe={class:"home-right home-side-stack"},zGe={key:0,class:"home-video-monitor"},GGe=["disabled"],UGe={key:0,class:"home-video-scan"},VGe={key:1,class:"home-video-play"},HGe={key:2,class:"home-video-loading"},WGe={key:3,class:"home-video-error"},jGe={class:"home-video-point-name"},$Ge=["disabled"],gW=186,qGe={__name:"index",emits:["module-stats","loading-progress","map-ready"],setup(n,{emit:e}){const t=e,i=Wt(null),r=Wt(null),a=Wt({}),o=new Map;let s=null,l=!1,u=null,c=null,d=!1,h=0;const f=Wt(0),p=Wt([]),m=Wt(0),v=Wt(!1),g=Wt(!1),_=Wt(""),S=`home-video-player-${Math.random().toString(36).slice(2)}`,x=["#30dcff","#27f0c0","#ffd76c","#7aa7ff","#ff8f6b","#a6f06d"],A=gW,C=A,M=Zee("2028"),I=Jee(M),D=[...Iv.map(({key:ut,name:Jt,color:hn})=>({key:ut,name:Jt.replace("资源",""),color:hn})),...Nee.map(({key:ut,name:Jt,color:hn})=>({key:ut,name:"牦牛",color:hn}))],E=Wt(""),P=Wt(""),F=Wt(""),V=Wt(""),G=Ye(()=>pn(E.value)),W=Ye(()=>D.map(ut=>tn(wt({},ut),{layers:pn(ut.key)}))),Y=Ye(()=>F.value&&G.value.find(ut=>ut.key===F.value)||null),Q=Ye(()=>{var ut;return((ut=Y.value)==null?void 0:ut.legends)||[]}),K=Ye(()=>Q.value.filter(En).length>1),ae=Ye(()=>Q.value.length===1),ie=Ye(()=>{var ut;return(((ut=Y.value)==null?void 0:ut.legends)||[]).find(Jt=>Jt.key===V.value)||null}),he=Ye(()=>{var Jt;const ut=Y.value;return ut?(Jt=ie.value)!=null&&Jt.cqlFilter?tn(wt({},ut),{cqlFilter:ie.value.cqlFilter,activeLegend:ie.value,name:ie.value.name||ut.name}):ut:null}),Ee=Ye(()=>nn(Lc.length)),He=Ye(()=>nn(Hs.length)),xe=Ye(()=>nn(I.labels.length)),Fe=[{key:"fallback-video-1",title:"色地镇牧场入口监控",town:"色地镇",scene:"牧道卡口",device:"HY-CAM-018",channel:"01",cameraCount:6,status:"直播中",onlineRate:98,updateTime:"12:18",operator:"智能巡检 · 重点区域",progress:86,image:B4,playUrl:"",hdPlayUrl:"",token:""},{key:"fallback-video-2",title:"瓦切镇草场巡护监控",town:"瓦切镇",scene:"草场巡护",device:"HY-CAM-026",channel:"02",cameraCount:4,status:"直播中",onlineRate:96,updateTime:"12:16",operator:"远程巡护 · 轮巡中",progress:74,image:B4,playUrl:"",hdPlayUrl:"",token:""},{key:"fallback-video-3",title:"邛溪镇核心区监控",town:"邛溪镇",scene:"核心牧区",device:"HY-CAM-031",channel:"03",cameraCount:5,status:"直播中",onlineRate:97,updateTime:"12:14",operator:"视频联动 · 在线",progress:91,image:B4,playUrl:"",hdPlayUrl:"",token:""}],pt=Ye(()=>{const ut=p.value.length;return ut?v.value?m.value%ut:(f.value+m.value)%ut:0}),Ot=Ye(()=>p.value[pt.value]||Fe[0]),bt=Ye(()=>[an("grassland","grassland-town"),an("grassland","grassland-type-proportion"),an("wetland","wetland-yield"),an("woodland","woodland-type")].filter(Boolean).map((ut,Jt)=>Ln(ut,`forest-grass-wet-${Jt}`))),ht=Ye(()=>[{key:"home-video-monitor",title:"视频监控",type:"video",height:C,live:Ot.value},{key:"yak-structure",title:"畜群结构占比",height:A,option:Kt.value},{key:"yak-three-year-forecast",title:"未来三年牦牛预测",height:A,option:Tt.value},{key:"yak-forecast-trend",title:"未来存栏趋势",height:A,option:Ae.value}]),Kt=Ye(()=>_T({animation:!0,animationDuration:900,animationDurationUpdate:700,animationEasing:"cubicOut",color:x,tooltip:yT(ut=>`${ut.name}
    占比:${ut.percent}%
    估算数量:${Ht(ut.value)}头`),legend:{orient:"vertical",right:0,top:"middle",itemWidth:8,itemHeight:8,itemGap:5,formatter(ut){const Jt=Lc.find(hn=>hn.name===ut);return Jt?`${ut} ${wn(Jt.count)}头`:ut},textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},series:[{name:"畜群结构",type:"pie",selectedMode:"single",selectedOffset:8,radius:["36%","62%"],center:["30%","54%"],avoidLabelOverlap:!0,label:{color:"#fff",fontSize:10,formatter:"{d}%"},labelLine:{length:7,length2:4,lineStyle:{color:"rgba(223, 250, 255, 0.35)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3},emphasis:{scale:!0,scaleSize:8,itemStyle:{shadowBlur:16,shadowColor:"rgba(48, 220, 255, 0.58)"}},data:Lc.map((ut,Jt)=>({name:ut.name,value:ut.count,selected:Jt===Ee.value}))}]})),Tt=Ye(()=>_T({animation:!0,animationDuration:1100,animationDurationUpdate:900,animationEasing:"cubicOut",color:["#30dcff"],tooltip:tn(wt({},yT()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(ut){const Jt=Hs[ut[0].dataIndex];return`${Jt.label}
    预测存栏:${Ht(Jt.stock)}头`}}),grid:{left:42,right:18,top:16,bottom:24},xAxis:{type:"category",data:Hs.map(ut=>ut.shortLabel),axisLabel:{color:"rgba(223, 250, 255, 0.76)",fontSize:11},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.26)"}},axisTick:{show:!1}},yAxis:{type:"value",min(ut){return Math.max(0,Math.floor(ut.min/1e4)*1e4)},axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:wn},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},series:[{name:"预测存栏",type:"bar",barWidth:24,data:Hs.map((ut,Jt)=>({value:ut.stock,itemStyle:{borderRadius:[9,9,1,1],color:new po(0,0,0,1,[{offset:0,color:Jt===He.value?"#ffd76c":"#30dcff"},{offset:.72,color:Jt===He.value?"rgba(255, 215, 108, 0.7)":"rgba(48, 220, 255, 0.62)"},{offset:1,color:Jt===He.value?"rgba(255, 215, 108, 0.1)":"rgba(48, 220, 255, 0.08)"}]),shadowBlur:Jt===He.value?16:8,shadowColor:Jt===He.value?"rgba(255, 215, 108, 0.56)":"rgba(48, 220, 255, 0.28)"}})),itemStyle:{borderRadius:[9,9,1,1],color:new po(0,0,0,1,[{offset:0,color:"#30dcff"},{offset:.72,color:"rgba(48, 220, 255, 0.62)"},{offset:1,color:"rgba(48, 220, 255, 0.08)"}])},label:{show:!0,position:"top",color:"#ffffff",fontSize:10,formatter:({value:ut})=>wn(ut)}}]})),Ae=Ye(()=>_T({animation:!0,animationDuration:1200,animationDurationUpdate:900,animationEasing:"cubicOut",color:["#30dcff","#ffd76c","#ff8f6b"],tooltip:tn(wt({},yT()),{trigger:"axis"}),legend:{top:2,right:2,itemWidth:10,itemHeight:7,itemGap:7,textStyle:{color:"rgba(222, 250, 255, 0.76)",fontSize:10}},grid:{left:42,right:32,top:30,bottom:24},xAxis:{type:"category",boundaryGap:!1,data:I.labels,axisLabel:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,interval:4},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.28)"}},axisTick:{show:!1}},yAxis:[{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:wn},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.48)",fontSize:10,formatter:wn},splitLine:{show:!1}}],series:[je("预测存栏",I.stock,"#30dcff",0,!0,xe.value),je("繁殖补充",I.births,"#ffd76c",1,!1,xe.value),je("出栏扣减",I.outflow,"#ff8f6b",1,!1,xe.value)]}));dl(()=>{t("module-stats",{moduleKey:"home",items:wGe}),cn(),J(),Lt(),k()}),Bl(()=>{var ut,Jt;l=!0,We(),_t(),o.clear(),(Jt=(ut=i.value)==null?void 0:ut.destroyMap)==null||Jt.call(ut)}),qa(pt,()=>{if(!v.value&&!g.value&&!c){_.value="";return}We({resetError:!0})}),qa(F,()=>{V.value=""});function Lt(){var Jt,hn,Nn;s=new am,t("loading-progress",{progress:0}),(hn=(Jt=s.instance)==null?void 0:Jt.on)==null||hn.call(Jt,"onProgress",(Re,lt,sn)=>{t("loading-progress",{progress:Math.floor(lt/(sn||1)*100),path:Re,itemsLoaded:lt,itemsTotal:sn})});const ut=(Re=0)=>rn(this,null,function*(){var sn,Pi;if(l)return;yield Qs();const lt=i.value;if((sn=lt==null?void 0:lt.loadMap)==null||sn.call(lt,s),lt!=null&<.canvasMap){t("loading-progress",{progress:100}),t("map-ready"),(Pi=lt.play)==null||Pi.call(lt);return}if(Re<24){window.setTimeout(()=>ut(Re+1),120);return}t("map-ready")});(Nn=s.ready)==null||Nn.then(ut).catch(()=>{t("map-ready")})}function vt(ut,Jt){ut&&(Jt?o.set(ut,Jt):o.delete(ut))}function Ft(ut){r.value=ut||null}function k(){_t(),u=window.setInterval(Ct,2600),window.setTimeout(Ct,800)}function _t(){u&&(window.clearInterval(u),u=null)}function Ct(){l||(f.value+=1,st(),it(),Vt())}function J(){return rn(this,null,function*(){try{const ut=yield Rze();if(l)return;p.value=ut.length?ut:Fe}catch(ut){if(l)return;p.value=Fe,_.value="监控接口暂不可用",window.setTimeout(()=>{_.value==="监控接口暂不可用"&&(_.value="")},2400)}})}function ee(ut){const Jt=(ut==null?void 0:ut.image)||B4;return v.value?void 0:{backgroundImage:`linear-gradient(180deg, rgba(0, 16, 26, 0.08), rgba(0, 16, 26, 0.32)), url(${Jt})`}}function Ue(){Bt(-1)}function xt(){Bt(1)}function Bt(ut){const Jt=p.value.length;if(!Jt)return;We({resetError:!0});const hn=pt.value;m.value=(hn+ut+Jt)%Jt,f.value=0}function Ce(){return rn(this,null,function*(){var Nn,Re;const ut=Ot.value;if(!(ut!=null&&ut.hdPlayUrl)||!(ut!=null&&ut.token)){_.value="无效的监控参数";return}if(v.value||g.value)return;m.value=pt.value,f.value=0,c&&We({resetError:!0}),_.value="",g.value=!0,yield Qs();const Jt=++h;let hn=null;try{const lt=(Re=(Nn=r.value)==null?void 0:Nn.getBoundingClientRect)==null?void 0:Re.call(Nn),sn=Math.max(300,Math.floor((lt==null?void 0:lt.width)||340)),Pi=Math.max(80,Math.floor((lt==null?void 0:lt.height)||92));if(hn=new FCe.EZUIKitPlayer({id:S,accessToken:ut.token,url:ut.hdPlayUrl,audio:0,width:sn,height:Pi,themeData:Yt(),handleError(er){Jt===h&&(console.warn("EZUIKit player error",er),_.value="视频加载失败",g.value=!1,v.value=!1,h+=1,c=null,d=!1,mt())},handleSuccess(){Jt===h&&(_.value="",d=!0,g.value=!1)},fullScreenChangeCallBack(){}}),Jt!==h){$e(hn),mt();return}c=hn,v.value=!0}catch(lt){console.warn("EZUIKit init error",lt),_.value="视频加载失败",We()}})}function We(ut={}){const{clearElement:Jt=!0,resetError:hn=!1}=ut,Nn=c,Re=d;c=null,d=!1,h+=1,Re&&$e(Nn),Jt&&mt(),v.value=!1,g.value=!1,hn&&(_.value="")}function $e(ut){if(!(!ut||typeof ut.stop!="function"))try{const Jt=ut.stop();Jt&&typeof Jt.catch=="function"&&Jt.catch(()=>{})}catch(Jt){console.warn("EZUIKit stop error",Jt)}}function mt(){if(typeof document=="undefined")return;const ut=document.getElementById(S);ut&&ut.replaceChildren()}function Yt(){return{header:{color:"#1890ff",activeColor:"#ffffff",backgroundColor:"#000000",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,memo:"顶部设备序列号",isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,memo:"顶部设备名称",isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,memo:"云存储",isrender:0},{iconId:"rec",part:"right",defaultActive:0,memo:"SD卡回放",isrender:0}]},footer:{color:"#ffffff",activeColor:"#1890ff",backgroundColor:"#00000021",btnList:[{iconId:"play",part:"left",defaultActive:1,memo:"播放",isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,memo:"截屏按钮",isrender:0},{iconId:"sound",part:"left",defaultActive:0,memo:"声音按钮",isrender:1},{iconId:"pantile",part:"left",defaultActive:0,memo:"云台控制按钮",isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,memo:"录制按钮",isrender:0},{iconId:"zoom",part:"left",defaultActive:0,memo:"电子放大",isrender:1},{iconId:"hd",part:"right",defaultActive:0,memo:"清晰度切换按钮",isrender:1},{iconId:"expend",part:"right",defaultActive:0,memo:"全局全屏按钮",isrender:1}]}}}function st(){const ut=o.get("yak-structure");Zt(ut,"畜群结构",Ee.value)}function it(){const ut=o.get("yak-three-year-forecast");Zt(ut,"预测存栏",He.value)}function Vt(){const ut=o.get("yak-forecast-trend");Zt(ut,"预测存栏",xe.value)}function Zt(ut,Jt,hn){const Nn=typeof(ut==null?void 0:ut.dispatchAction)=="function"?ut:ut==null?void 0:ut.chart;!Nn||hn<0||(Nn.dispatchAction({type:"downplay",seriesName:Jt}),Nn.dispatchAction({type:"hideTip"}),Nn.dispatchAction({type:"highlight",seriesName:Jt,dataIndex:hn}),Nn.dispatchAction({type:"showTip",seriesName:Jt,dataIndex:hn}))}function nn(ut){return ut?f.value%ut:0}function cn(){return rn(this,null,function*(){const[ut,Jt,hn]=yield Promise.all([S5("grassland","grassland-distribution"),S5("wetland","wetland-distribution"),S5("woodland","woodland-distribution")]);l||(a.value={grassland:ut,wetland:Jt,woodland:hn})})}function an(ut,Jt){const hn=a.value[ut];return[...(hn==null?void 0:hn.leftPanels)||[],...(hn==null?void 0:hn.rightPanels)||[]].find(Re=>(Re==null?void 0:Re.key)===Jt)}function Ln(ut,Jt){const Nn={"wetland-yield":{type:"column",variant:"slim"},"woodland-type":{type:"structure",variant:void 0}}[ut.key]||{};return tn(wt(wt({},ut),Nn),{key:`home-${Jt}-${ut.key}`,height:gW})}function je(ut,Jt,hn,Nn=0,Re=!1,lt=-1){return{name:ut,type:"line",yAxisIndex:Nn,smooth:!0,symbolSize:5,data:Jt.map((sn,Pi)=>({value:sn,symbolSize:Pi===lt?10:5,itemStyle:{color:Pi===lt?"#ffffff":hn},label:{show:Pi===lt,position:"top",color:hn,fontSize:10,formatter:({value:er})=>wn(er)}})),lineStyle:{width:2.4,color:hn},itemStyle:{color:hn},areaStyle:Re?{color:new po(0,0,0,1,[{offset:0,color:`${hn}44`},{offset:1,color:`${hn}05`}])}:void 0}}function Ht(ut){const Jt=Number(ut);return Number.isFinite(Jt)?Jt.toLocaleString("zh-CN",{maximumFractionDigits:Number.isInteger(Jt)?0:2}):"--"}function wn(ut){const Jt=Number(ut);return Number.isFinite(Jt)?Math.abs(Jt)>=1e4?`${(Jt/1e4).toFixed(Math.abs(Jt)>=1e5?0:1)}万`:Math.round(Jt).toLocaleString("zh-CN"):"--"}function zn(ut){E.value=ut,F.value="",V.value=""}function Be(ut){if(P.value===ut){P.value="";return}P.value=ut,E.value!==ut&&zn(ut)}function pn(ut){const Jt=f7(ut);return ut!=="yak-industry-chain"?Jt:Jt.filter(hn=>["yak-distribution-layer","yak-recognition-layer"].includes(hn.key))}function dn(ut){F.value=F.value===ut?"":ut}function Un(ut){Tn(ut)&&(V.value=V.value===ut.key?"":ut.key)}function En(ut){return(ut==null?void 0:ut.selectable)===!1?!1:!!(ut!=null&&ut.key&&(ut.cqlFilter||ut.rankingValueKey))}function Tn(ut){return K.value&&En(ut)}return(ut,Jt)=>(Te(),Pe("div",AGe,[gn(rm,{ref_key:"mapSceneRef",ref:i,class:"home-map-scene","active-layer":he.value},null,8,["active-layer"]),Jt[3]||(Jt[3]=O("div",{class:"home-map-scrim"},null,-1)),O("div",CGe,[gn(Mi,{title:"图层控制",width:248,height:430},{default:mi(()=>[O("div",MGe,[O("div",EGe,[(Te(!0),Pe(bn,null,Bn(W.value,hn=>(Te(),Pe("div",{key:hn.key,class:Xn(["home-layer-tree-group",{"is-open":hn.key===P.value}])},[O("button",{class:Xn(["home-layer-tree-parent",{"is-active":hn.key===E.value}]),type:"button",onClick:Nn=>Be(hn.key)},[O("span",null,De(hn.name),1),Jt[0]||(Jt[0]=O("i",null,null,-1))],10,PGe),hn.key===P.value?(Te(),Pe("div",RGe,[(Te(!0),Pe(bn,null,Bn(hn.layers,Nn=>(Te(),Pe("button",{key:Nn.key,class:Xn(["home-layer-tree-child",{"is-active":Nn.key===F.value}]),type:"button",onClick:Re=>dn(Nn.key)},[O("span",null,De(Nn.name),1),Jt[1]||(Jt[1]=O("i",null,null,-1))],10,LGe))),128))])):Dn("",!0)],2))),128))]),O("div",IGe,[Jt[2]||(Jt[2]=O("div",{class:"home-layer-tree-title"},"图例",-1)),Q.value.length?(Te(),Pe("div",{key:0,class:Xn(["home-layer-legend-grid",{"is-single":ae.value}])},[(Te(!0),Pe(bn,null,Bn(Q.value,hn=>(Te(),Pe("button",{key:hn.key||hn.name,class:Xn(["home-layer-legend-row",{"is-selected":Tn(hn)&&hn.key===V.value,"is-checkable":Tn(hn),"is-disabled":!Tn(hn)}]),type:"button",disabled:!Tn(hn),title:hn.name,onClick:Nn=>Un(hn)},[O("span",{class:"home-layer-legend-swatch",style:Ji({backgroundColor:hn.fillColor,borderColor:hn.strokeColor||hn.fillColor})},null,4),O("span",NGe,De(hn.name),1),Tn(hn)?(Te(),Pe("i",kGe)):Dn("",!0)],10,DGe))),128))],2)):(Te(),Pe("div",FGe,"选择图层后显示图例"))])])]),_:1})]),O("div",OGe,[(Te(!0),Pe(bn,null,Bn(bt.value,hn=>(Te(),Uo(Mi,{key:hn.key,class:"home-card left-card",title:hn.title,width:398,height:hn.height},{default:mi(()=>[gn(Cl,{panel:hn,compact:""},null,8,["panel"])]),_:2},1032,["title","height"]))),128))]),O("div",BGe,[(Te(!0),Pe(bn,null,Bn(ht.value,hn=>(Te(),Uo(Mi,{key:hn.key,class:Xn(["home-card","right-card",{"home-video-card":hn.type==="video"}]),title:hn.title,width:398,height:hn.height},{default:mi(()=>[hn.type==="video"?(Te(),Pe("div",zGe,[O("button",{class:"home-video-nav home-video-prev",type:"button","aria-label":"上一路监控",disabled:p.value.length<=1,onClick:Ue},"‹",8,GGe),(Te(),Pe("div",{key:hn.live.key,ref_for:!0,ref:Ft,class:Xn(["home-video-screen",{"is-playing":v.value,"is-loading":g.value}]),style:Ji(ee(hn.live)),onClick:Ce},[O("div",{id:S,class:"home-video-player"}),v.value?Dn("",!0):(Te(),Pe("div",UGe)),!v.value&&hn.live.hdPlayUrl?(Te(),Pe("div",VGe)):Dn("",!0),g.value?(Te(),Pe("div",HGe,"加载中")):Dn("",!0),_.value?(Te(),Pe("div",WGe,De(_.value),1)):Dn("",!0),O("div",jGe,De(hn.live.title),1)],6)),O("button",{class:"home-video-nav home-video-next",type:"button","aria-label":"下一路监控",disabled:p.value.length<=1,onClick:xt},"›",8,$Ge)])):hn.option?(Te(),Uo(Tr(Ua),{key:1,ref_for:!0,ref:Nn=>vt(hn.key,Nn),class:"home-chart",option:hn.option,autoresize:!0},null,8,["option"])):(Te(),Uo(Cl,{key:2,panel:hn,compact:""},null,8,["panel"]))]),_:2},1032,["class","title","height"]))),128))])]))}};const XGe={class:"topic-switcher"},YGe={class:"topic-switcher-menu"},KGe=["onPointerup","onClick"],ZGe={class:"topic-title"},JGe={key:0},y7={__name:"TopicSwitcher",props:{modelValue:{type:String,required:!0},topics:{type:Array,default:()=>Iv}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e;let r="",a=0;const o=Ye(()=>{var l;return(l=t.topics)!=null&&l.length?t.topics:Iv});function s(l,u){var d,h;(h=(d=l.currentTarget)==null?void 0:d.blur)==null||h.call(d);const c=Date.now();l.type==="click"&&r===u&&c-a<450||(l.type==="pointerup"&&(r=u,a=c),i("update:modelValue",u))}return(l,u)=>(Te(),Pe("div",XGe,[u[0]||(u[0]=O("div",{class:"topic-switcher-arrow"},[O("img",{src:M5,alt:""}),O("img",{src:E5,alt:""})],-1)),O("div",YGe,[(Te(!0),Pe(bn,null,Bn(o.value,c=>(Te(),Pe("button",{key:c.key,class:Xn(["topic-switcher-item",{"is-active":c.key===n.modelValue}]),style:Ji({"--topic-color":c.color,"--topic-item-width":c.width?`${c.width}px`:void 0}),type:"button",onPointerup:d=>s(d,c.key),onClick:d=>s(d,c.key)},[O("span",{class:Xn(["topic-name",{"has-sub-name":c.subName}])},[O("span",ZGe,De(c.name),1),c.subName?(Te(),Pe("small",JGe,De(c.subName),1)):Dn("",!0)],2)],46,KGe))),128))]),u[1]||(u[1]=O("div",{class:"topic-switcher-arrow is-reverse"},[O("img",{src:M5,alt:""}),O("img",{src:E5,alt:""})],-1))]))}};const QGe={class:"layer-panel"},eUe={class:"layer-panel-list"},tUe=["onClick"],nUe={key:0,class:"layer-panel-empty"},iUe={class:"layer-panel-legend"},rUe=["disabled","title","onClick"],aUe={class:"legend-name"},oUe={key:0,class:"legend-check"},sUe={key:1,class:"layer-panel-empty is-legend"},UR={__name:"LayerPanel",props:{topicKey:{type:String,required:!0},modelValue:{type:String,default:""},legends:{type:Array,default:()=>[]},selectedLegendKey:{type:String,default:""},height:{type:Number,default:0},width:{type:Number,default:232},layers:{type:Array,default:null}},emits:["update:modelValue","update:selectedLegendKey"],setup(n,{emit:e}){const t=n,i=e,r=Ye(()=>Array.isArray(t.layers)?t.layers:f7(t.topicKey)),a=Ye(()=>t.legends.filter(c).length>1),o=Ye(()=>t.legends.length===1),s=Ye(()=>t.height?t.height:430);function l(h,f){var p,m;(m=(p=h.currentTarget)==null?void 0:p.blur)==null||m.call(p),i("update:modelValue",t.modelValue===f?"":f)}function u(h,f){var p,m;(m=(p=h.currentTarget)==null?void 0:p.blur)==null||m.call(p),d(f)&&i("update:selectedLegendKey",t.selectedLegendKey===f.key?"":f.key)}function c(h){return(h==null?void 0:h.selectable)===!1?!1:!!(h!=null&&h.key&&(h.cqlFilter||h.rankingValueKey))}function d(h){return a.value&&c(h)}return(h,f)=>(Te(),Uo(Mi,{title:"图层控制",width:n.width,height:s.value},{default:mi(()=>[O("div",QGe,[O("div",eUe,[(Te(!0),Pe(bn,null,Bn(r.value,p=>(Te(),Pe("button",{key:p.key,class:Xn(["layer-panel-item",{"is-active":p.key===n.modelValue,"is-checked":p.key===n.modelValue}]),type:"button",onMousedown:f[0]||(f[0]=Ws(()=>{},["prevent"])),onClick:m=>l(m,p.key)},[O("span",null,De(p.name),1),f[2]||(f[2]=O("i",null,null,-1))],42,tUe))),128)),r.value.length?Dn("",!0):(Te(),Pe("div",nUe,"暂无图层配置"))]),O("div",iUe,[f[3]||(f[3]=O("div",{class:"layer-panel-section-title"},"图例",-1)),n.legends.length?(Te(),Pe("div",{key:0,class:Xn(["layer-panel-legend-grid",{"is-single":o.value}])},[(Te(!0),Pe(bn,null,Bn(n.legends,p=>(Te(),Pe("button",{key:p.key||p.name,class:Xn(["layer-panel-legend-row",{"is-selected":d(p)&&p.key===n.selectedLegendKey,"is-checkable":d(p),"is-disabled":!d(p)}]),type:"button",disabled:!d(p),title:p.name,onMousedown:f[1]||(f[1]=Ws(()=>{},["prevent"])),onClick:m=>u(m,p)},[O("span",{class:"legend-swatch",style:Ji({backgroundColor:p.fillColor,borderColor:p.strokeColor||p.fillColor})},null,4),O("span",aUe,De(p.name),1),d(p)?(Te(),Pe("i",oUe)):Dn("",!0)],42,rUe))),128))],2)):(Te(),Pe("div",sUe,"暂无图例"))])])]),_:1},8,["width","height"]))}};const lUe={class:"feature-info"},uUe={key:0,class:"feature-info-state"},cUe={key:1,class:"feature-info-state"},dUe={key:2,class:"feature-info-state"},hUe={key:0,class:"feature-table"},fUe=["title"],pUe={key:1,class:"feature-info-state is-inline"},ete={__name:"FeatureInfoPanel",props:{feature:{type:Object,default:null},empty:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},height:{type:Number,default:380},width:{type:Number,default:430}},setup(n){const e=n,t=[[["town_name","xiangName","xiang_name","xiang","xzqmc","xzqdm","town_code","area_code"],"所在乡镇"],[["village_name","cunName","cun_name","cun","c_name","cmc"],"所在村"],[["full_name"],"所在区域"],[["land_number","patch_no"],"图斑编号"],[["areaWanMu","area_wan_mu","area_mu","acreage","mj","xbmj","tbdlmj","tbmj","geomj","shape_area"],"图斑面积"]],i=[[["investigator"],"调查人"],[["survey_time","dc_rq","sjnf","delimitation_year"],"调查时间"],[["adjust_opinion_name"],"调整意见"],[["adjust_reason"],"调整原因"]],r={woodland:[[["dlmc","layer_class_name"],"地类名称"],...t,[["qsdwmc"],"权属单位"],[["zldwmc"],"坐落单位"],[["lin_ban"],"林班"],[["xiao_ban"],"小班"],[["ld_qs","tdsyqs","qsxz","ownership_name","ownership"],"土地权属"],[["gjgyl_bhdj","bh_dj","protection_level_name","protection_level"],"保护等级"],[["sen_lin_lb","forest_type"],"森林类别"],[["lin_zhong","forest_category"],"林种"],[["zl_dj","quality_level_name","quality_level"],"质量等级"],[["you_shi_sz","tree_species","dominant_tree_species"],"优势树种"],[["qi_yuan","origin"],"起源"],[["ling_zu"],"龄组"],[["yu_bi_du"],"郁闭度"],[["pingjun_sg"],"平均树高"],[["mei_gq_zs"],"每公顷株数"],[["mei_gq_xj"],"每公顷蓄积"],[["huo_lm_xj"],"活立木蓄积"],[["sheng_wu_l"],"生物量"],[["tan_chu_l"],"碳储量"],[["stqwmc"],"生态区位"],[["po_du","slope"],"坡度"],[["po_wei"],"坡位"],[["tu_ceng_hd","soil_depth"],"土层厚度"],...i],grassland:[...t,[["land_class_name","land_use_name","land_use"],"地类名称"],[["land_type"],"资源大类"],[["resource_type"],"资源类别"],[["grassland_category_name","grassland category","base_grass"],"草原类别"],[["basic_type_name"],"基本草原类型"],[["grass_type_name","grassland_type_name","grass_type"],"草原类"],[["grass_min_type"],"草原型"],[["grassland_level_name","grassland_level","level_name","level"],"草原级别"],[["degradation_level_name","degradation_level"],"退化等级"],[["vegetation_structure_name","vegetation_structure"],"植被结构"],[["vegetation_cover"],"植被盖度"],[["lbmjbl"],"裸斑面积比例"],[["dominance_level"],"优势度"],[["dominant_grass_species"],"优势草种"],[["functional_category"],"功能类别"],[["xc_yield"],"鲜草产量"],[["xc_mu_yield","xb_xc_mu_yield","mu_yield"],"鲜草亩产"],[["xb_xc_yield"],"小班鲜草产量"],[["xb_xc_mu_yield"],"小班鲜草亩产"],[["gc_yield"],"干草产量"],[["gc_mu_yield","xb_gc_mu_yield"],"干草亩产"],[["xb_gc_yield"],"小班干草产量"],[["xb_gc_mu_yield"],"小班干草亩产"],[["elevation"],"海拔"],[["landform_name","landform"],"地貌"],[["slope"],"坡度"],[["aspect"],"坡向"],[["soil_depth","tu_ceng_hd"],"土层厚度"],[["soil texture"],"土壤质地"],[["sddl"],"三调地类"],[["hqlm"],"划区轮牧"],[["cdsyq"],"草地所有权"],[["cdsyq2"],"草地使用权"],[["cdjjq"],"草地经营权"],...i],wetland:[[["grass_min_type","grassland_category_name","grassland_type_name","land_class_name","land_use_name"],"湿地类型"],...t,[["grass_type_name","grass_type"],"湿地草地型"],[["grassland_level_name","grassland_level","level_name","level"],"湿地级别"],[["vegetation_structure_name","vegetation_structure"],"植被结构"],[["vegetation_cover"],"植被盖度"],[["dominant_grass_species"],"优势草种"],[["functional_category"],"功能类别"],[["xc_yield","xb_xc_yield"],"鲜草产量"],[["xc_mu_yield","xb_xc_mu_yield","mu_yield"],"鲜草亩产"],[["edible_xc_yield"],"可食鲜草产量"],[["edible_xc_mu_yield"],"可食鲜草亩产"],[["gc_yield","xb_gc_yield"],"干草产量"],[["elevation"],"海拔"],[["landform_name","landform"],"地貌"],[["soil_depth","tu_ceng_hd"],"土层厚度"],...i],ecological:[[["type"],"管控分区"],[["project_name"],"项目名称"],[["project_category"],"项目类型"],[["measure_type"],"措施类型"],[["feature_role"],"要素类型"],[["township"],"涉及乡镇"],[["year"],"建设年份"],[["totalAcreage"],"总面积"],[["cdAcreage"],"草地面积"],[["sdAcreage"],"湿地面积"],[["area_mu"],"治理面积"],[["length_meter"],"工程长度"],[["cdScl"],"草地生产力"],[["sdScl"],"湿地生产力"],[["geometry_type"],"几何类型"]]},a={513233100:"邛溪镇",513233101:"刷经寺镇",513233103:"安曲镇",513233105:"龙日镇",513233202:"江茸乡",513233203:"查尔玛乡",513233204:"瓦切镇",513233205:"阿木乡",513233207:"麦洼乡",513233208:"色地镇","513233101000":"刷经寺镇","513233103000":"安曲镇","513233105000":"龙日镇"},o={land_type:{1:"草地",2:"湿地",caodi:"草地",shidi:"湿地",woodland:"林地",grassland:"草地",wetland:"湿地"},vegetation_structure:{1:"草本型"},landform:{2:"平原",5:"中山",6:"高山"},land_use:{"0401":"天然牧草地","0403":"人工牧草地","0404":"其他草地"},sddl:{"0401":"天然牧草地","0403":"人工牧草地","0404":"其他草地"},ld_qs:{10:"集体林地",20:"国有或其他"},qsxz:{10:"集体林地",20:"国有或其他"},tdsyqs:{10:"集体林地",20:"国有或其他"},gjgyl_bhdj:{0:"未划定",1:"国家一级公益林",2:"国家二级公益林"},bh_dj:{0:"未划定",1:"国家一级公益林",2:"国家二级公益林"},zl_dj:{2:"二级质量",3:"三级质量",4:"四级质量",5:"五级质量"},po_wei:{1:"脊部",2:"上坡",3:"中坡",4:"下坡",5:"谷地",6:"平地"}},s=new Set(["lin_zhong","sen_lin_lb","you_shi_sz","qi_yuan","ling_zu","po_xiang","tu_rang_lx","ownership","ownership_name","protection_level","forest_category","forest_type","quality_level","origin","tree_species","dominant_tree_species","base_grass","degradation_level","land_class","grass_type"]),l={xiang:"所在乡镇",xzqdm:"所在乡镇",xzqmc:"所在乡镇",town_code:"所在乡镇",area_code:"所在乡镇",cun:"所在村",cmc:"所在村",c_name:"所在村",acreage:"图斑面积",mj:"图斑面积",xbmj:"小班面积",tbdlmj:"图斑地类面积",geomj:"图斑面积",tbmj:"图斑面积",shape_area:"图斑面积",area_mu:"图斑面积",grass_min_type:"草原型",grass_type:"草原类",grass_type_name:"草原类",grassland_type_name:"草原类",patch_no:"图斑编号",land_number:"图斑编号",grassland_level:"草原级别",grassland_level_name:"草原级别",level:"等级",level_name:"等级",land_class_name:"地类名称",land_use_name:"地类名称",basic_type_name:"草原类型",grassland_category_name:"草原类别",degradation_level:"退化等级",degradation_level_name:"退化等级",vegetation_structure:"植被结构",vegetation_structure_name:"植被结构",xc_yield:"鲜草产量",gc_yield:"干草产量",xc_mu_yield:"鲜草亩产",gc_mu_yield:"干草亩产",mu_yield:"亩产",edible_xc_yield:"可食鲜草产量",edible_xc_mu_yield:"可食鲜草亩产",dlmc:"地类名称",qsdwmc:"权属单位",zldwmc:"坐落单位",lin_ban:"林班",xiao_ban:"小班",ld_qs:"土地权属",tdsyqs:"土地权属",qsxz:"土地权属",gjgyl_bhdj:"保护等级",bh_dj:"保护等级",sen_lin_lb:"森林类别",lin_zhong:"林种",zl_dj:"质量等级",you_shi_sz:"优势树种",qi_yuan:"起源",cdsyq:"草地所有权",cdsyq2:"草地使用权",cdjjq:"草地经营权",resource_type:"资源类型","grassland category":"草原类别",dominant_grass_species:"优势草种",functional_category:"功能类别",vegetation_cover:"植被盖度",xb_xc_yield:"小班鲜草产量",xb_gc_yield:"小班干草产量",base_grass:"基本草原",hqlm:"划区轮牧",elevation:"海拔",soil_depth:"土层厚度","soil texture":"土壤质地",aspect:"坡向",slope:"坡度",landform:"地貌",landform_name:"地貌",sddl:"三调地类",dominance_level:"优势度",investigator:"调查人",survey_time:"调查时间",land_type:"土地类型",status:"状态",type:"类型",xb_gc_mu_yield:"干草亩产",xb_xc_mu_yield:"鲜草亩产",grass_yield:"草地产量",full_name:"所在区域",gyl_bhlx:"公益林保护类型",ling_zu:"龄组",yu_bi_du:"郁闭度",pingjun_xj:"平均胸径",mei_gq_zs:"每公顷株数",mei_gq_xj:"每公顷蓄积",stqwmc:"生态区位",lyfq:"林业分区",qykz:"区域控制",po_wei:"坡位",tu_rang_zd:"土壤质地",zzsxmc:"主导属性",lin_chang:"林场",di_mao:"地貌",jt_qw:"交通区位",zbfglx:"植被覆盖类型",disaster_c:"灾害类型",dispe:"病虫害",pingjun_sg:"平均树高",huo_lm_xj:"活立木蓄积",sheng_wu_l:"生物量",tan_chu_l:"碳储量",g_cheng_lb:"工程类别",shi_quan_d:"事权等级",sf_tbq:"是否特别区",td_th_lx:"土地退化类型",project_name:"项目名称",project_category:"项目类型",measure_type:"措施类型",feature_role:"要素类型",township:"涉及乡镇",year:"建设年份",length_meter:"工程长度",geometry_type:"几何类型",totalAcreage:"总面积",cdAcreage:"草地面积",sdAcreage:"湿地面积",cdScl:"草地生产力",sdScl:"湿地生产力"},u=new Set(Object.keys(l)),c=new Set(["pingjun_sg","pingjun_xj","mei_gq_zs","mei_gq_xj","huo_lm_xj","sheng_wu_l","tan_chu_l","yu_bi_du","grass_yield","xb_xc_yield","xb_xc_mu_yield","xc_mu_yield","xb_gc_yield","xb_gc_mu_yield","gc_mu_yield"]),d=new Set(["xb_xc_yield","xb_gc_yield","grass_yield","gc_yield","xc_yield","yield","output","remark1","remark2","remark3","remark4","remark5","remarks"]),h=Ye(()=>{var ie;return((ie=e.feature)==null?void 0:ie.properties)||{}}),f=Ye(()=>{var ie,he,Ee;return((he=(ie=e.feature)==null?void 0:ie.feature)==null?void 0:he.geometry)||((Ee=e.feature)==null?void 0:Ee.geometry)||null}),p=Ye(()=>{var Fe,pt,Ot,bt,ht;const ie=String(((Fe=e.feature)==null?void 0:Fe.id)||"").toLowerCase(),he=String(((Ot=(pt=e.feature)==null?void 0:pt.layer)==null?void 0:Ot.key)||"").toLowerCase(),Ee=String(((ht=(bt=e.feature)==null?void 0:bt.layer)==null?void 0:ht.layerName)||"").toLowerCase(),He=`${he} ${Ee}`,xe=h.value;return He.includes("national-park")||He.includes("restoration")||xe.project_name||xe.project_category||xe.totalAcreage?"ecological":xe.dlmc||ie.includes("woodland")||ie.includes("t_woodland")||He.includes("woodland")?"woodland":He.includes("wetland")||He.includes("shidi")||ie.includes("shidi")||xe.land_type==="shidi"||xe.land_type==="湿地"||xe.land_type===2?"wetland":He.includes("grassland")||He.includes("caodi")||xe.grassland_category_name||xe.basic_type_name||ie.includes("caodi")||xe.land_type==="caodi"||xe.land_type===1?"grassland":"woodland"}),m=Ye(()=>{const ie=[],he=new Set;return(r[p.value]||r.woodland).forEach(([He,xe])=>{const Fe=S(h.value,He,xe,he);Fe&&!ie.some(pt=>pt.label===Fe.label)&&(ie.push(Fe),he.add(Fe.sourceKey))}),ie.some(He=>He.label==="图斑面积")||_(ie,he,"图斑面积",W(f.value),"geometry-area"),Object.entries(h.value).forEach(([He,xe])=>{if(he.has(He)||V(He,xe))return;const Fe=A(He,xe);x(Fe)&&(ie.some(pt=>pt.value===Fe||pt.label===(l[He]||ae(He)))||(ie.push({key:`fallback-${He}`,sourceKey:He,label:l[He]||ae(He),value:Fe}),he.add(He)))}),ie}),v=Ye(()=>m.value.map((ie,he)=>tn(wt({},ie),{displayOrder:g(ie,he)})).sort((ie,he)=>ie.displayOrder-he.displayOrder));function g(ie,he){const Ee=(ie==null?void 0:ie.label)||"",He=String((ie==null?void 0:ie.sourceKey)||"").toLowerCase();return["所在乡镇","所在村","所在区域","图斑编号","图斑面积","小班面积","图斑地类面积","地类名称","湿地类型"].includes(Ee)?he:["基本草原类型","草原类型","草原类","草原型","湿地草地型","草原级别","湿地级别","退化等级","功能类别","保护等级","森林类别","林种","质量等级","优势树种","起源","龄组"].includes(Ee)?100+he:Ee.includes("产量")||Ee.includes("亩产")||Ee.includes("植被")||Ee.includes("优势草种")||Ee.includes("优势度")||Ee.includes("海拔")||Ee.includes("地貌")||Ee.includes("坡")||Ee.includes("土壤")||Ee.includes("郁闭度")||Ee.includes("树高")||Ee.includes("蓄积")||Ee.includes("生物量")||Ee.includes("碳储量")?200+he:Ee.includes("权属")||Ee.includes("所有权")||Ee.includes("使用权")||Ee.includes("经营权")||Ee.includes("调查")||Ee.includes("调整")||Ee.includes("划区")||Ee.includes("单位")||He.includes("owner")||He.includes("qsdw")||He.includes("zldw")?300+he:150+he}function _(ie,he,Ee,He,xe){!x(He)||ie.some(Fe=>Fe.label===Ee||Fe.value===He)||(ie.push({key:`static-${xe}`,sourceKey:xe,label:Ee,value:He}),he.add(xe))}function S(ie,he,Ee,He=new Set){for(const xe of he)if(!(He.has(xe)||F(xe))&&x(ie==null?void 0:ie[xe])){const Fe=A(xe,ie[xe]);if(!x(Fe))continue;return{key:`${Ee}-${xe}`,sourceKey:xe,label:Ee,value:Fe}}return null}function x(ie){return ie!=null&&ie!==""&&ie!==" "&&ie!=="null"&&ie!=="undefined"}function A(ie,he){var xe;if(!x(he))return"";if((xe=o[ie])!=null&&xe[String(he)])return o[ie][String(he)];if(["xiang","xzqdm","town_code","area_code"].includes(ie))return C(he);if(["cun","village_code"].includes(ie)&&M(he))return"";if(["grassland_level","level"].includes(ie)&&I(he))return p.value==="wetland"?`${Number(he)}级湿地`:`${Number(he)}级草原`;if(s.has(ie)&&M(he)||G(ie,he))return"";if(E(ie))return P(he);if(typeof he=="number"||/^-?\d+(\.\d+)?$/.test(String(he))){const Fe=Number(he);if(Fe===0&&c.has(ie))return"";const pt=Number.isInteger(Fe)?`${Fe}`:`${Number(Fe.toFixed(2))}`;return["xbmj","tbdlmj","geomj","area_square_meter"].includes(ie)?`${D(Fe/666.6667)} 亩`:["acreage","mj","area_mu"].includes(ie)?`${pt} 亩`:["length_meter"].includes(ie)?`${pt} 米`:["totalAcreage","cdAcreage","sdAcreage"].includes(ie)?`${pt} 万亩`:["cdScl","sdScl"].includes(ie)?`${pt} 万吨`:["areaWanMu","area_wan_mu"].includes(ie)?`${pt} 万亩`:["xc_yield","xb_xc_yield","gc_yield","xb_gc_yield","edible_xc_yield","grass_yield"].includes(ie)?`${pt} 斤`:["mu_yield","xc_mu_yield","gc_mu_yield","xb_xc_mu_yield","xb_gc_mu_yield","edible_xc_mu_yield"].includes(ie)?`${pt} 斤`:["vegetation_cover","lbmjbl","yu_bi_du"].includes(ie)?`${pt}%`:["elevation","tu_ceng_hd","pingjun_sg"].includes(ie)?`${pt} 米`:["po_du","slope"].includes(ie)?`${pt}°`:pt}const He=String(he);return p.value==="wetland"&&["grassland_level","level"].includes(ie)?He.replace(/草原/g,"湿地"):He}function C(ie){const he=String(ie||"").trim();if(!he)return"";if(a[he])return a[he];const Ee=he.replace(/\D/g,"");if(a[Ee])return a[Ee];for(let He=Math.min(12,Ee.length);He>=6;He--){const xe=Ee.slice(0,He);if(a[xe])return a[xe]}return M(he)?"":he}function M(ie){return/^[0-9A-Za-z_-]{1,12}$/.test(String(ie).trim())}function I(ie){return/^-?\d+(\.\d+)?$/.test(String(ie).trim())}function D(ie){return Number.isInteger(ie)?`${ie}`:`${Number(ie.toFixed(2))}`}function E(ie){return["survey_time","dc_rq","create_time","update_time"].includes(String(ie))}function P(ie){const he=String(ie);return/^\d{4}-\d{2}-\d{2}/.test(he)?he.slice(0,10):he}function F(ie){const he=String(ie).toLowerCase();return["geom","wkt","geometry","the_geom","raw_properties"].includes(he)||["bsm","ysdm","gid","id","objectid","object_id","fid","key_uid"].includes(he)||["shape_leng","shape_length","length","perimeter"].includes(he)?!0:["xzqdm","area_code","town_code","patch_no","land_number"].includes(he)?!1:["di_lei","qykz","stqw","lyfq","tbybh","patch_code"].includes(he)||he.endsWith("_code")||he.endsWith("dm")||he.endsWith("_id")||["create_by","create_time","update_by","update_time"].includes(he)?!0:he.includes("geom")||he.includes("boundary")||he.includes("wkb")}function V(ie,he){var He;if(F(ie)||!x(he))return!0;const Ee=String(ie).toLowerCase();return!!(d.has(Ee)||Ee.includes("number")||Ee.includes("patch_no")||!u.has(ie)||M(he)&&!((He=o[ie])!=null&&He[String(he)])&&!["xiang","xzqdm","town_code","area_code","cun","land_type","grassland_level","level","gjgyl_bhdj","bh_dj","ld_qs","qsxz","tdsyqs","zl_dj"].includes(ie))}function G(ie,he){var Ee;return!M(he)||(Ee=o[ie])!=null&&Ee[String(he)]?!1:["resource_type","grassland category","functional_category","aspect","soil_depth","soil texture","cdsyq","cdsyq2","cdjjq"].includes(ie)}function W(ie){const he=Y(ie);if(!he)return"";const Ee=he/666.6667;return Ee>=1e4?`${D(Ee/1e4)} 万亩`:`${D(Ee)} 亩`}function Y(ie){return ie!=null&&ie.coordinates?ie.type==="Polygon"?Q(ie.coordinates):ie.type==="MultiPolygon"?ie.coordinates.reduce((he,Ee)=>he+Q(Ee),0):0:0}function Q(ie=[]){if(!ie.length)return 0;const[he,...Ee]=ie,He=Math.abs(K(he)),xe=Ee.reduce((Fe,pt)=>Fe+Math.abs(K(pt)),0);return Math.max(0,He-xe)}function K(ie=[]){if(ie.length<3)return 0;const he=ie.reduce((Fe,pt)=>Fe+Number((pt==null?void 0:pt[1])||0),0)/ie.length,Ee=111320,He=Ee*Math.cos(he*Math.PI/180);let xe=0;for(let Fe=0;Fehe.toUpperCase())}return(ie,he)=>(Te(),Uo(Mi,{title:"图斑详情",width:n.width,height:n.height},{default:mi(()=>[O("div",lUe,[n.loading?(Te(),Pe("div",uUe,"正在查询图斑信息")):n.empty?(Te(),Pe("div",cUe,"当前点击位置未查询到图斑")):n.feature?(Te(),Pe(bn,{key:3},[v.value.length?(Te(),Pe("div",hUe,[(Te(!0),Pe(bn,null,Bn(v.value,Ee=>(Te(),Pe("div",{key:Ee.key,class:"feature-row"},[O("span",null,De(Ee.label),1),O("strong",{title:Ee.value},De(Ee.value),9,fUe)]))),128))])):(Te(),Pe("div",pUe,"当前图斑暂无可展示的业务字段"))],64)):(Te(),Pe("div",dUe,"点击地图图层查看图斑/要素信息"))])]),_:1},8,["width","height"]))}};const vUe={class:"forest-grass-wet"},mUe={class:"forest-grass-wet-ui",id:"forest-grass-wet-ui"},gUe={class:"fgw-left"},yUe={class:"fgw-side-stack is-left"},_Ue={class:"fgw-right"},SUe={class:"fgw-side-stack is-right"},bUe={class:"fgw-map-layer-tools"},xUe={class:"fgw-bottom-topic"},wUe={key:0,class:"loading"},TUe={class:"loading-progress"},AUe={class:"value"},CUe={__name:"index",props:{showLoading:{type:Boolean,default:!0}},emits:["topic-stats"],setup(n,{emit:e}){const t=n,i=e,r=Wt(null),a=Wt(Iv[0].key),o=Wt(""),s=Wt([]),l=Wt("idle"),u=Wt(!1),c=Wt({title:"业务统计",rows:[]}),d=Wt({title:"业务统计",rows:[]}),h=Wt([]),f=Wt([]),p=Wt({}),m=Wt(null),v=Wt(""),g=Wt(null),_=Wt(!1),S=Wt(!1),x=Wt(null),A=Wt(0),C=Wt(t.showLoading),M=Wt({type:"idle",text:"等待 GeoServer 图层加载"});let I=null,D=!1,E=0,P=0;const F=new Set(["grassland-distribution","wetland-distribution","woodland-distribution","woodland-protection","woodland-type","woodland-quality","woodland-ownership"]);Ye(()=>XH(a.value));const V=Ye(()=>o.value?B3(a.value,o.value):null),G=Ye(()=>{var J;return(((J=V.value)==null?void 0:J.legends)||[]).find(ee=>ee.key===v.value)||null}),W=Ye(()=>{var ee;const J=V.value;return!J||!((ee=G.value)!=null&&ee.cqlFilter)?J:tn(wt({},J),{cqlFilter:G.value.cqlFilter,activeLegend:G.value,name:G.value.name||J.name})}),Y=Ye(()=>190),Q=Ye(()=>12),K=Ye(()=>Y.value*2+Q.value),ae=Ye(()=>!!x.value),ie=Ye(()=>{if(S.value||_.value||!g.value)return 186;const J=Kt(g.value);return Math.min(480,Math.max(300,86+Math.min(J,12)*34))}),he=Ye(()=>{if(!x.value)return{};const J=460,ee=ie.value,Ue=24,xt=Ee(x.value),Bt=xt.x>1420?-J-28:28,Ce=Math.min(Math.max(xt.x+Bt,Ue),1920-J-Ue),We=Math.min(Math.max(xt.y-ee-72,188),1080-ee-132);return{left:`${Ce}px`,top:`${We}px`,right:"auto",bottom:"auto"}});function Ee(J){const ee=document.querySelector(".forest-grass-wet"),Ue=ee==null?void 0:ee.getBoundingClientRect();return!(Ue!=null&&Ue.width)||!(Ue!=null&&Ue.height)?J:{x:(J.x-Ue.left)/Ue.width*1920,y:(J.y-Ue.top)/Ue.height*1080}}dl(()=>{document.addEventListener("pointerdown",_t,!0),He(),xe(a.value,""),Tt(a.value,"")}),Bl(()=>{D=!0,document.removeEventListener("pointerdown",_t,!0)}),qa(a,J=>{v.value="",o.value="",k(),xe(J,""),Tt(J,"",null)}),qa(o,()=>{v.value="",k(),M.value={type:o.value?"loading":"idle",text:o.value?"正在加载 GeoServer 图层":"等待 GeoServer 图层加载"},xe(a.value,o.value),Tt(a.value,o.value,null)}),qa(v,()=>{k(),Tt(a.value,o.value,G.value)});function He(){var xt;I=new am;let J=!1;const ee={progress:0};I.instance.on("onProgress",(Bt,Ce,We)=>{const $e=Math.floor(Ce/We*100);ka.to(ee,{progress:$e,onUpdate:()=>{A.value=Math.floor(ee.progress)}})});const Ue=()=>rn(this,null,function*(){var Bt,Ce;D||J||(J=!0,(Bt=r.value)==null||Bt.loadMap(I),yield Ct(),yield Qs(),(Ce=r.value)==null||Ce.play())});I.instance.on("onLoad",Ue),(xt=I.ready)==null||xt.then(Ue).catch(()=>{D||(M.value={type:"error",text:"地图资源加载失败"})})}function xe(Ue){return rn(this,arguments,function*(J,ee=o.value){const xt=`${J}:${ee||""}`,Bt=p.value[xt];if(Bt){Fe(Bt,J);return}const Ce=++P;u.value=!0,l.value="loading";const We=yield S5(J,ee);D||Ce!==P||J===a.value&&(ee||"")===(o.value||"")&&(p.value=tn(wt({},p.value),{[xt]:We}),Fe(We,J))})}function Fe(J,ee){var xt,Bt,Ce;const Ue=pt(J);s.value=Ue.core||[],c.value=Ue.left||{title:"业务统计",rows:[]},d.value=Ue.right||{title:"业务统计",rows:[]},h.value=(xt=Ue.leftPanels)!=null&&xt.length?Ue.leftPanels:[c.value],f.value=(Bt=Ue.rightPanels)!=null&&Bt.length?Ue.rightPanels:[d.value],l.value=Ue.status,u.value=!1,i("topic-stats",{topicKey:ee,topicName:XH(ee).name,items:((Ce=Ue.top)!=null&&Ce.length?Ue.top:Ue.core||[]).slice(0,4)})}function pt(J){return J||{}}function Ot(J,ee){return`${a.value}-${ee}-${(J==null?void 0:J.key)||(J==null?void 0:J.title)||"panel"}`}function bt(J){var Ue;const ee=((Ue=J==null?void 0:J.rows)==null?void 0:Ue.length)||0;return(J==null?void 0:J.span)===1?!1:(J==null?void 0:J.span)===2?!0:(J==null?void 0:J.type)==="spotlight"||(J==null?void 0:J.type)==="metric"||(J==null?void 0:J.type)==="column"&&ee<=5?!1:(J==null?void 0:J.type)==="rank"&&ee>4||(J==null?void 0:J.type)==="split"&&ee>4||(J==null?void 0:J.type)==="donut"&&ee>5||(J==null?void 0:J.type)==="structure"&&ee>4||(J==null?void 0:J.type)==="bar"&&ee>4||(J==null?void 0:J.type)==="line"&&ee>6}function ht(J){return bt(J)?K.value:Y.value}function Kt(J){var Bt;const ee=(J==null?void 0:J.properties)||{},Ue=Object.keys(ee).filter(Ce=>{const We=ee[Ce];if(We==null||We==="")return!1;const $e=Ce.toLowerCase();return!(["geom","wkt","geometry","the_geom","shape_leng","shape_length","length","perimeter"].includes($e)||["gid","id","objectid","object_id","fid","key_uid","bsm","ysdm"].includes($e))}),xt=!!((Bt=J==null?void 0:J.feature)!=null&&Bt.geometry||J!=null&&J.geometry);return Ue.length+(xt?1:0)}function Tt(xt,Bt){return rn(this,arguments,function*(J,ee,Ue=G.value){const Ce=++E;if(!ee||!Ae(ee,Ue)){m.value=Lt(J,ee);return}const We=yield oGe(J,ee,Ue);D||Ce!==E||J!==a.value||ee!==o.value||((Ue==null?void 0:Ue.key)||"")===v.value&&(m.value=We)})}function Ae(J,ee=null){return!!(ee!=null&&ee.key)||F.has(J)}function Lt(J,ee){return{status:"disabled",topicKey:J,layerKey:ee,title:"",unit:"",rows:[]}}function vt(J){var Ue,xt;const ee=(xt=(Ue=J==null?void 0:J.feature)!=null?Ue:J)!=null?xt:null;if(!ee){k();return}g.value=ee,_.value=!1,J!=null&&J.screen&&(x.value=J.screen)}function Ft(J){M.value=J}function k(){var J,ee;g.value=null,_.value=!1,x.value=null,(ee=(J=r.value)==null?void 0:J.clearSelectedFeature)==null||ee.call(J)}function _t(J){if(!ae.value)return;const ee=document.querySelector(".fgw-map-feature-info"),Ue=J.target;ee&&Ue instanceof Node&&ee.contains(Ue)||k()}function Ct(){return C.value?new Promise(J=>{ka.to(".forest-grass-wet .loading",{opacity:0,duration:.8,delay:.2,onComplete:()=>{C.value=!1,J()}})}):Promise.resolve()}return(J,ee)=>{var Ue;return Te(),Pe("div",vUe,[gn(rm,{ref_key:"mapSceneRef",ref:r,"active-layer":W.value,"map-ranking":m.value,onFeatureLoading:ee[0]||(ee[0]=xt=>S.value=xt),onFeatureInfo:vt,onLayerStatus:Ft},null,8,["active-layer","map-ranking"]),O("div",mUe,[O("div",gUe,[O("div",yUe,[(Te(!0),Pe(bn,null,Bn(h.value,xt=>(Te(),Uo(Mi,{key:Ot(xt,"left"),class:Xn(["fgw-side-card left-card",{"is-double":bt(xt)}]),title:xt.title,width:398,height:ht(xt)},{default:mi(()=>[gn(Cl,{panel:xt,compact:""},null,8,["panel"])]),_:2},1032,["class","title","height"]))),128))])]),O("div",_Ue,[O("div",SUe,[(Te(!0),Pe(bn,null,Bn(f.value,xt=>(Te(),Uo(Mi,{key:Ot(xt,"right"),class:Xn(["fgw-side-card right-card",{"is-double":bt(xt)}]),title:xt.title,width:398,height:ht(xt)},{default:mi(()=>[gn(Cl,{panel:xt,compact:""},null,8,["panel"])]),_:2},1032,["class","title","height"]))),128))])]),O("div",bUe,[gn(UR,{modelValue:o.value,"onUpdate:modelValue":ee[1]||(ee[1]=xt=>o.value=xt),"selected-legend-key":v.value,"onUpdate:selectedLegendKey":ee[2]||(ee[2]=xt=>v.value=xt),"topic-key":a.value,legends:((Ue=W.value)==null?void 0:Ue.legends)||[],width:248,height:430},null,8,["modelValue","selected-legend-key","topic-key","legends"])]),ae.value?(Te(),Pe("div",{key:0,class:"fgw-map-feature-info",style:Ji(he.value)},[gn(ete,{feature:g.value,empty:_.value,loading:S.value,width:460,height:ie.value},null,8,["feature","empty","loading","height"])],4)):Dn("",!0),O("div",xUe,[gn(y7,{modelValue:a.value,"onUpdate:modelValue":ee[3]||(ee[3]=xt=>a.value=xt)},null,8,["modelValue"])])]),C.value?(Te(),Pe("div",wUe,[ee[5]||(ee[5]=pp('
    LOADING
    ',1)),O("div",TUe,[O("span",AUe,De(A.value),1),ee[4]||(ee[4]=O("span",{class:"unit"},"%",-1))])])):Dn("",!0)])}}};function MUe(n){n("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),n("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),n("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)n("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),n("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");n("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),n("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),n.WGS84=n["EPSG:4326"],n["EPSG:3785"]=n["EPSG:3857"],n.GOOGLE=n["EPSG:3857"],n["EPSG:900913"]=n["EPSG:3857"],n["EPSG:102113"]=n["EPSG:3857"]}var qp=1,Xp=2,nv=3,EUe=4,fM=5,yW=6378137,PUe=6356752314e-3,_W=.0066943799901413165,l9=484813681109536e-20,yn=Math.PI/2,RUe=.16666666666666666,LUe=.04722222222222222,IUe=.022156084656084655,Rn=1e-10,Da=.017453292519943295,Zs=57.29577951308232,Fr=Math.PI/4,c3=Math.PI*2,Wa=3.14159265359,fl={};fl.greenwich=0;fl.lisbon=-9.131906111111;fl.paris=2.337229166667;fl.bogota=-74.080916666667;fl.madrid=-3.687938888889;fl.rome=12.452333333333;fl.bern=7.439583333333;fl.jakarta=106.807719444444;fl.ferro=-17.666666666667;fl.brussels=4.367975;fl.stockholm=18.058277777778;fl.athens=23.7163375;fl.oslo=10.722916666667;const DUe={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var SW=/[\s_\-\/\(\)]/g;function Fh(n,e){if(n[e])return n[e];for(var t=Object.keys(n),i=e.toLowerCase().replace(SW,""),r=-1,a,o;++rArray.isArray(i)&&i[0]==="ID");return t&&t.length>=3?{authority:t[1],code:parseInt(t[2],10)}:null}static convertUnit(e,t="unit"){if(!e||e.length<3)return{type:t,name:"unknown",conversion_factor:null};const i=e[1],r=parseFloat(e[2])||null,a=e.find(s=>Array.isArray(s)&&s[0]==="ID"),o=a?{authority:a[1],code:parseInt(a[2],10)}:null;return{type:t,name:i,conversion_factor:r,id:o}}static convertAxis(e){const t=e[1]||"Unknown";let i;const r=t.match(/^\((.)\)$/);if(r){const u=r[1].toUpperCase();if(u==="E")i="east";else if(u==="N")i="north";else if(u==="U")i="up";else if(e[2])i=e[2];else throw new Error(`Unknown axis abbreviation: ${u}`)}else i=e[2]||"unknown";const a=e.find(u=>Array.isArray(u)&&u[0]==="ORDER"),o=a?parseInt(a[1],10):null,s=e.find(u=>Array.isArray(u)&&(u[0]==="LENGTHUNIT"||u[0]==="ANGLEUNIT"||u[0]==="SCALEUNIT")),l=this.convertUnit(s);return{name:t,direction:i,unit:l,order:o}}static extractAxes(e){return e.filter(t=>Array.isArray(t)&&t[0]==="AXIS").map(t=>this.convertAxis(t)).sort((t,i)=>(t.order||0)-(i.order||0))}static convert(e,t={}){switch(e[0]){case"PROJCRS":t.type="ProjectedCRS",t.name=e[1],t.base_crs=e.find(h=>Array.isArray(h)&&h[0]==="BASEGEOGCRS")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="BASEGEOGCRS")):null,t.conversion=e.find(h=>Array.isArray(h)&&h[0]==="CONVERSION")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="CONVERSION")):null;const i=e.find(h=>Array.isArray(h)&&h[0]==="CS");i&&(t.coordinate_system={type:i[1],axis:this.extractAxes(e)});const r=e.find(h=>Array.isArray(h)&&h[0]==="LENGTHUNIT");if(r){const h=this.convertUnit(r);t.coordinate_system.unit=h}t.id=this.getId(e);break;case"BASEGEOGCRS":case"GEOGCRS":case"GEODCRS":t.type=e[0]==="GEODCRS"?"GeodeticCRS":"GeographicCRS",t.name=e[1];const a=e.find(h=>Array.isArray(h)&&(h[0]==="DATUM"||h[0]==="ENSEMBLE"));if(a){const h=this.convert(a);a[0]==="ENSEMBLE"?t.datum_ensemble=h:t.datum=h;const f=e.find(p=>Array.isArray(p)&&p[0]==="PRIMEM");f&&f[1]!=="Greenwich"&&(h.prime_meridian={name:f[1],longitude:parseFloat(f[2])})}t.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(e)},t.id=this.getId(e);break;case"DATUM":t.type="GeodeticReferenceFrame",t.name=e[1],t.ellipsoid=e.find(h=>Array.isArray(h)&&h[0]==="ELLIPSOID")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":t.type="DatumEnsemble",t.name=e[1],t.members=e.filter(h=>Array.isArray(h)&&h[0]==="MEMBER").map(h=>({type:"DatumEnsembleMember",name:h[1],id:this.getId(h)}));const o=e.find(h=>Array.isArray(h)&&h[0]==="ENSEMBLEACCURACY");o&&(t.accuracy=parseFloat(o[1]));const s=e.find(h=>Array.isArray(h)&&h[0]==="ELLIPSOID");s&&(t.ellipsoid=this.convert(s)),t.id=this.getId(e);break;case"ELLIPSOID":t.type="Ellipsoid",t.name=e[1],t.semi_major_axis=parseFloat(e[2]),t.inverse_flattening=parseFloat(e[3]),e.find(h=>Array.isArray(h)&&h[0]==="LENGTHUNIT")&&this.convert(e.find(h=>Array.isArray(h)&&h[0]==="LENGTHUNIT"),t);break;case"CONVERSION":t.type="Conversion",t.name=e[1],t.method=e.find(h=>Array.isArray(h)&&h[0]==="METHOD")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="METHOD")):null,t.parameters=e.filter(h=>Array.isArray(h)&&h[0]==="PARAMETER").map(h=>this.convert(h));break;case"METHOD":t.type="Method",t.name=e[1],t.id=this.getId(e);break;case"PARAMETER":t.type="Parameter",t.name=e[1],t.value=parseFloat(e[2]),t.unit=this.convertUnit(e.find(h=>Array.isArray(h)&&(h[0]==="LENGTHUNIT"||h[0]==="ANGLEUNIT"||h[0]==="SCALEUNIT"))),t.id=this.getId(e);break;case"BOUNDCRS":t.type="BoundCRS";const l=e.find(h=>Array.isArray(h)&&h[0]==="SOURCECRS");if(l){const h=l.find(f=>Array.isArray(f));t.source_crs=h?this.convert(h):null}const u=e.find(h=>Array.isArray(h)&&h[0]==="TARGETCRS");if(u){const h=u.find(f=>Array.isArray(f));t.target_crs=h?this.convert(h):null}const c=e.find(h=>Array.isArray(h)&&h[0]==="ABRIDGEDTRANSFORMATION");c?t.transformation=this.convert(c):t.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(t.type="Transformation",t.name=e[1],t.method=e.find(h=>Array.isArray(h)&&h[0]==="METHOD")?this.convert(e.find(h=>Array.isArray(h)&&h[0]==="METHOD")):null,t.parameters=e.filter(h=>Array.isArray(h)&&(h[0]==="PARAMETER"||h[0]==="PARAMETERFILE")).map(h=>{if(h[0]==="PARAMETER")return this.convert(h);if(h[0]==="PARAMETERFILE")return{name:h[1],value:h[2],id:{authority:"EPSG",code:8656}}}),t.parameters.length===7){const h=t.parameters[6];h.name==="Scale difference"&&(h.value=Math.round((h.value-1)*1e12)/1e6)}t.id=this.getId(e);break;case"AXIS":t.coordinate_system||(t.coordinate_system={type:"unspecified",axis:[]}),t.coordinate_system.axis.push(this.convertAxis(e));break;case"LENGTHUNIT":const d=this.convertUnit(e,"LinearUnit");t.coordinate_system&&t.coordinate_system.axis&&t.coordinate_system.axis.forEach(h=>{h.unit||(h.unit=d)}),d.conversion_factor&&d.conversion_factor!==1&&t.semi_major_axis&&(t.semi_major_axis={value:t.semi_major_axis,unit:d});break;default:t.keyword=e[0];break}return t}}class NUe extends tte{static convert(e,t={}){return super.convert(e,t),t.coordinate_system&&t.coordinate_system.subtype==="Cartesian"&&delete t.coordinate_system,t.usage&&delete t.usage,t}}class kUe extends tte{static convert(e,t={}){super.convert(e,t);const i=e.find(a=>Array.isArray(a)&&a[0]==="CS");i&&(t.coordinate_system={subtype:i[1],axis:this.extractAxes(e)});const r=e.find(a=>Array.isArray(a)&&a[0]==="USAGE");if(r){const a=r.find(l=>Array.isArray(l)&&l[0]==="SCOPE"),o=r.find(l=>Array.isArray(l)&&l[0]==="AREA"),s=r.find(l=>Array.isArray(l)&&l[0]==="BBOX");t.usage={},a&&(t.usage.scope=a[1]),o&&(t.usage.area=o[1]),s&&(t.usage.bbox=s.slice(1))}return t}}function FUe(n){return n.find(e=>Array.isArray(e)&&e[0]==="USAGE")?"2019":(n.find(e=>Array.isArray(e)&&e[0]==="CS")||n[0]==="BOUNDCRS"||n[0]==="PROJCRS"||n[0]==="GEOGCRS","2015")}function OUe(n){return(FUe(n)==="2019"?kUe:NUe).convert(n)}function BUe(n){const e=n.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}var d3=1,nte=2,ite=3,Z8=4,rte=5,VR=-1,zUe=/\s/,GUe=/[A-Za-z]/,UUe=/[A-Za-z84_]/,_7=/[,\]]/,ate=/[\d\.E\-\+]/;function ad(n){if(typeof n!="string")throw new Error("not a string");this.text=n.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=d3}ad.prototype.readCharicter=function(){var n=this.text[this.place++];if(this.state!==Z8)for(;zUe.test(n);){if(this.place>=this.text.length)return;n=this.text[this.place++]}switch(this.state){case d3:return this.neutral(n);case nte:return this.keyword(n);case Z8:return this.quoted(n);case rte:return this.afterquote(n);case ite:return this.number(n);case VR:return}};ad.prototype.afterquote=function(n){if(n==='"'){this.word+='"',this.state=Z8;return}if(_7.test(n)){this.word=this.word.trim(),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in afterquote yet, index '+this.place)};ad.prototype.afterItem=function(n){if(n===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=d3;return}if(n==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=d3,this.currentObject=this.stack.pop(),this.currentObject||(this.state=VR);return}};ad.prototype.number=function(n){if(ate.test(n)){this.word+=n;return}if(_7.test(n)){this.word=parseFloat(this.word),this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in number yet, index '+this.place)};ad.prototype.quoted=function(n){if(n==='"'){this.state=rte;return}this.word+=n};ad.prototype.keyword=function(n){if(UUe.test(n)){this.word+=n;return}if(n==="["){var e=[];e.push(this.word),this.level++,this.root===null?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,this.state=d3;return}if(_7.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in keyword yet, index '+this.place)};ad.prototype.neutral=function(n){if(GUe.test(n)){this.word=n,this.state=nte;return}if(n==='"'){this.word="",this.state=Z8;return}if(ate.test(n)){this.word=n,this.state=ite;return}if(_7.test(n)){this.afterItem(n);return}throw new Error(`havn't handled "`+n+'" in neutral yet, index '+this.place)};ad.prototype.output=function(){for(;this.place0?90:-90),n.lat_ts=n.lat1,delete n.lat1):!n.lat_ts&&n.lat0&&(e==="polar stereographic"||e==="polar stereographic (variant a)")&&(n.lat_ts=n.lat0,n.lat0=i0(n.lat0>0?90:-90),delete n.lat1)}function bW(n){let e={units:null,to_meter:void 0};return typeof n=="string"?(e.units=n.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.units==="meter"&&(e.to_meter=1)):n&&n.name&&(e.units=n.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.to_meter=n.conversion_factor),e}function xW(n){return typeof n=="object"?n.value*n.unit.conversion_factor:n}function wW(n,e){n.ellipsoid.radius?(e.a=n.ellipsoid.radius,e.rf=0):(e.a=xW(n.ellipsoid.semi_major_axis),n.ellipsoid.inverse_flattening!==void 0?e.rf=n.ellipsoid.inverse_flattening:n.ellipsoid.semi_major_axis!==void 0&&n.ellipsoid.semi_minor_axis!==void 0&&(e.rf=e.a/(e.a-xW(n.ellipsoid.semi_minor_axis))))}function J8(n,e={}){return!n||typeof n!="object"?n:n.type==="BoundCRS"?(J8(n.source_crs,e),n.transformation&&(n.transformation.method&&n.transformation.method.name==="NTv2"?e.nadgrids=n.transformation.parameters[0].value:e.datum_params=n.transformation.parameters.map(t=>t.value)),e):(Object.keys(n).forEach(t=>{const i=n[t];if(i!==null)switch(t){case"name":if(e.srsCode)break;e.name=i,e.srsCode=i;break;case"type":i==="GeographicCRS"?e.projName="longlat":i==="GeodeticCRS"?n.coordinate_system&&n.coordinate_system.subtype==="Cartesian"?e.projName="geocent":e.projName="longlat":i==="ProjectedCRS"&&n.conversion&&n.conversion.method&&(e.projName=n.conversion.method.name);break;case"datum":case"datum_ensemble":i.ellipsoid&&(e.ellps=i.ellipsoid.name,wW(i,e)),i.prime_meridian&&(e.from_greenwich=i.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=i.name,wW(i,e);break;case"prime_meridian":e.long0=(i.longitude||0)*Math.PI/180;break;case"coordinate_system":if(i.axis){const r={east:"e",north:"n",west:"w",south:"s",up:"u",down:"d",geocentricx:"e",geocentricy:"n",geocentricz:"u"},a=i.axis.map(o=>r[o.direction.toLowerCase()]);if(a.every(Boolean)&&(e.axis=a.join(""),e.axis.length===2&&(e.axis+="u")),i.unit){const{units:o,to_meter:s}=bW(i.unit);e.units=o,e.to_meter=s}else if(i.axis[0]&&i.axis[0].unit){const{units:o,to_meter:s}=bW(i.axis[0].unit);e.units=o,e.to_meter=s}}break;case"id":i.authority&&i.code&&(e.title=i.authority+":"+i.code);break;case"conversion":i.method&&i.method.name&&(e.projName=i.method.name),i.parameters&&i.parameters.forEach(r=>{const a=r.name.toLowerCase().replace(/\s+/g,"_"),o=r.value;r.unit&&r.unit.conversion_factor?e[a]=o*r.unit.conversion_factor:r.unit==="degree"?e[a]=o*Math.PI/180:e[a]=o});break;case"unit":i.name&&(e.units=i.name.toLowerCase(),e.units==="metre"&&(e.units="meter")),i.conversion_factor&&(e.to_meter=i.conversion_factor);break;case"base_crs":J8(i,e),e.datumCode=i.id?i.id.authority+"_"+i.id.code:i.name;break}}),e.latitude_of_false_origin!==void 0&&(e.lat0=e.latitude_of_false_origin),e.longitude_of_false_origin!==void 0&&(e.long0=e.longitude_of_false_origin),e.latitude_of_standard_parallel!==void 0&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),e.latitude_of_1st_standard_parallel!==void 0&&(e.lat1=e.latitude_of_1st_standard_parallel),e.latitude_of_2nd_standard_parallel!==void 0&&(e.lat2=e.latitude_of_2nd_standard_parallel),e.latitude_of_projection_centre!==void 0&&(e.lat0=e.latitude_of_projection_centre),e.longitude_of_projection_centre!==void 0&&(e.longc=e.longitude_of_projection_centre),e.easting_at_false_origin!==void 0&&(e.x0=e.easting_at_false_origin),e.northing_at_false_origin!==void 0&&(e.y0=e.northing_at_false_origin),e.latitude_of_natural_origin!==void 0&&(e.lat0=e.latitude_of_natural_origin),e.longitude_of_natural_origin!==void 0&&(e.long0=e.longitude_of_natural_origin),e.longitude_of_origin!==void 0&&(e.long0=e.longitude_of_origin),e.false_easting!==void 0&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),e.false_northing!==void 0&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),e.standard_parallel_1!==void 0&&(e.lat1=e.standard_parallel_1),e.standard_parallel_2!==void 0&&(e.lat2=e.standard_parallel_2),e.scale_factor_at_natural_origin!==void 0&&(e.k0=e.scale_factor_at_natural_origin),e.scale_factor_at_projection_centre!==void 0&&(e.k0=e.scale_factor_at_projection_centre),e.scale_factor_on_pseudo_standard_parallel!==void 0&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),e.azimuth!==void 0&&(e.alpha=e.azimuth),e.azimuth_at_projection_centre!==void 0&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),ote(e),e)}var WUe=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function jUe(n,e){var t=e[0],i=e[1];!(t in n)&&i in n&&(n[t]=n[i],e.length===3&&(n[t]=e[2](n[t])))}function ste(n){for(var e=Object.keys(n),t=0,i=e.length;t-1;var e=Fh(n,"authority");if(e){var t=Fh(e,"epsg");return t&&TW.indexOf(t)>-1}}function ZUe(n){var e=Fh(n,"extension");if(e)return Fh(e,"proj4")}function JUe(n){return n[0]==="+"}function QUe(n){let e;if(qUe(n))if(XUe(n))e=zo[n];else if(YUe(n)){e=Q8(n);var t=ZUe(e);t&&(e=pM(t))}else JUe(n)&&(e=pM(n));else"projName"in n?e=n:e=Q8(n);return e&&KUe(e)?zo["EPSG:3857"]:e}function AW(n,e){n=n||{};var t,i;if(!e)return n;for(i in e)t=e[i],t!==void 0&&(n[i]=t);return n}function ec(n,e,t){var i=n*e;return t/Math.sqrt(1-i*i)}function G3(n){return n<0?-1:1}function kn(n,e){return e||Math.abs(n)<=Wa?n:n-G3(n)*c3}function tu(n,e,t){var i=n*t,r=.5*n;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(yn-e))/i}function h3(n,e){for(var t=.5*n,i,r,a=yn-2*Math.atan(e),o=0;o<=15;o++)if(i=n*Math.sin(a),r=yn-2*Math.atan(e*Math.pow((1-i)/(1+i),t))-a,a+=r,Math.abs(r)<=1e-10)return a;return-9999}function eVe(){var n=this.b/this.a;this.es=1-n*n,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ec(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function tVe(n){var e=n.x,t=n.y;if(t*Zs>90&&t*Zs<-90&&e*Zs>180&&e*Zs<-180)return null;var i,r;if(Math.abs(Math.abs(t)-yn)<=Rn)return null;if(this.sphere)i=this.x0+this.a*this.k0*kn(e-this.long0,this.over),r=this.y0+this.a*this.k0*Math.log(Math.tan(Fr+.5*t));else{var a=Math.sin(t),o=tu(this.e,t,a);i=this.x0+this.a*this.k0*kn(e-this.long0,this.over),r=this.y0-this.a*this.k0*Math.log(o)}return n.x=i,n.y=r,n}function nVe(n){var e=n.x-this.x0,t=n.y-this.y0,i,r;if(this.sphere)r=yn-2*Math.atan(Math.exp(-t/(this.a*this.k0)));else{var a=Math.exp(-t/(this.a*this.k0));if(r=h3(this.e,a),r===-9999)return null}return i=kn(this.long0+e/(this.a*this.k0),this.over),n.x=i,n.y=r,n}var iVe=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const rVe={init:eVe,forward:tVe,inverse:nVe,names:iVe};function aVe(){}function CW(n){return n}var lte=["longlat","identity"];const oVe={init:aVe,forward:CW,inverse:CW,names:lte};var sVe=[rVe,oVe],Xf={},z2=[];function ute(n,e){var t=z2.length;return n.names?(z2[t]=n,n.names.forEach(function(i){Xf[i.toLowerCase()]=t}),this):(console.log(e),!0)}function cte(n){return n.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function lVe(n){if(!n)return!1;var e=n.toLowerCase();if(typeof Xf[e]!="undefined"&&z2[Xf[e]]||(e=cte(e),e in Xf&&z2[Xf[e]]))return z2[Xf[e]]}function uVe(){sVe.forEach(ute)}const cVe={start:uVe,add:ute,get:lVe};var dte={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const dVe=dte.WGS84;function hVe(n,e,t,i){var r=n*n,a=e*e,o=(r-a)/r,s=0;i?(n*=1-o*(RUe+o*(LUe+o*IUe)),r=n*n,o=0):s=Math.sqrt(o);var l=(r-a)/a;return{es:o,e:s,ep2:l}}function fVe(n,e,t,i,r){if(!n){var a=Fh(dte,i);a||(a=dVe),n=a.a,e=a.b,t=a.rf}return t&&!e&&(e=(1-1/t)*n),(t===0||Math.abs(n-e)3&&(s.datum_params[3]!==0||s.datum_params[4]!==0||s.datum_params[5]!==0||s.datum_params[6]!==0)&&(s.datum_type=Xp,s.datum_params[3]*=l9,s.datum_params[4]*=l9,s.datum_params[5]*=l9,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=nv,s.grids=o),s.a=t,s.b=i,s.es=r,s.ep2=a,s}var HR={};function mVe(n,e,t){return e instanceof ArrayBuffer?gVe(n,e,t):{ready:yVe(n,e)}}function gVe(n,e,t){var i=!0;t!==void 0&&t.includeErrorFields===!1&&(i=!1);var r=new DataView(e),a=bVe(r),o=xVe(r,a),s=wVe(r,o,a,i),l={header:o,subgrids:s};return HR[n]=l,l}function yVe(n,e){return rn(this,null,function*(){for(var t=[],i=yield e.getImageCount(),r=i-1;r>=0;r--){var a=yield e.getImage(r),o=yield a.readRasters(),s=o,l=[a.getWidth(),a.getHeight()],u=a.getBoundingBox().map(MW),c=typeof a.fileDirectory.getValue=="function"?a.fileDirectory.getValue("ModelPixelScale"):a.fileDirectory.ModelPixelScale,d=[c[0],c[1]].map(MW),h=u[0]+(l[0]-1)*d[0],f=u[3]-(l[1]-1)*d[1],p=s[0],m=s[1],v=[];for(let S=l[1]-1;S>=0;S--)for(let x=l[0]-1;x>=0;x--){var g=S*l[0]+x;v.push([-dh(m[g]),dh(p[g])])}t.push({del:d,lim:l,ll:[-h,f],cvs:v})}var _={header:{nSubgrids:i},subgrids:t};return HR[n]=_,_})}function _Ve(n){if(n===void 0)return null;var e=n.split(",");return e.map(SVe)}function SVe(n){if(n.length===0)return null;var e=n[0]==="@";return e&&(n=n.slice(1)),n==="null"?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:n,mandatory:!e,grid:HR[n]||null,isNull:!1}}function MW(n){return n*Math.PI/180}function dh(n){return n/3600*Math.PI/180}function bVe(n){var e=n.getInt32(8,!1);return e===11?!1:(e=n.getInt32(8,!0),e!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function xVe(n,e){return{nFields:n.getInt32(8,e),nSubgridFields:n.getInt32(24,e),nSubgrids:n.getInt32(40,e),shiftType:vM(n,56,56+8).trim(),fromSemiMajorAxis:n.getFloat64(120,e),fromSemiMinorAxis:n.getFloat64(136,e),toSemiMajorAxis:n.getFloat64(152,e),toSemiMinorAxis:n.getFloat64(168,e)}}function vM(n,e,t){return String.fromCharCode.apply(null,new Uint8Array(n.buffer.slice(e,t)))}function wVe(n,e,t,i){for(var r=176,a=[],o=0;o5e-11?!1:n.datum_type===qp?n.datum_params[0]===e.datum_params[0]&&n.datum_params[1]===e.datum_params[1]&&n.datum_params[2]===e.datum_params[2]:n.datum_type===Xp?n.datum_params[0]===e.datum_params[0]&&n.datum_params[1]===e.datum_params[1]&&n.datum_params[2]===e.datum_params[2]&&n.datum_params[3]===e.datum_params[3]&&n.datum_params[4]===e.datum_params[4]&&n.datum_params[5]===e.datum_params[5]&&n.datum_params[6]===e.datum_params[6]:!0}function hte(n,e,t){var i=n.x,r=n.y,a=n.z?n.z:0,o,s,l,u;if(r<-yn&&r>-1.001*yn)r=-yn;else if(r>yn&&r<1.001*yn)r=yn;else{if(r<-yn)return{x:-1/0,y:-1/0,z:n.z};if(r>yn)return{x:1/0,y:1/0,z:n.z}}return i>Math.PI&&(i-=2*Math.PI),s=Math.sin(r),u=Math.cos(r),l=s*s,o=t/Math.sqrt(1-e*l),{x:(o+a)*u*Math.cos(i),y:(o+a)*u*Math.sin(i),z:(o*(1-e)+a)*s}}function fte(n,e,t,i){var r=1e-12,a=r*r,o=30,s,l,u,c,d,h,f,p,m,v,g,_,S,x=n.x,A=n.y,C=n.z?n.z:0,M,I,D;if(s=Math.sqrt(x*x+A*A),l=Math.sqrt(x*x+A*A+C*C),s/ta&&Si.y||f>i.x||vs&&Math.abs(l.y)>s);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=kn(a.x+t.ll[0]),i.y=a.y+t.ll[1]}else isNaN(a.x)||(i.x=n.x+a.x,i.y=n.y+a.y);return i}function PW(n,e){var t={x:n.x/e.del[0],y:n.y/e.del[1]},i={x:Math.floor(t.x),y:Math.floor(t.y)},r={x:t.x-1*i.x,y:t.y-1*i.y},a={x:Number.NaN,y:Number.NaN},o;if(i.x<0||i.x>=e.lim[0]||i.y<0||i.y>=e.lim[1])return a;o=i.y*e.lim[0]+i.x;var s={x:e.cvs[o][0],y:e.cvs[o][1]};o++;var l={x:e.cvs[o][0],y:e.cvs[o][1]};o+=e.lim[0];var u={x:e.cvs[o][0],y:e.cvs[o][1]};o--;var c={x:e.cvs[o][0],y:e.cvs[o][1]},d=r.x*r.y,h=r.x*(1-r.y),f=(1-r.x)*(1-r.y),p=(1-r.x)*r.y;return a.x=f*s.x+h*l.x+p*c.x+d*u.x,a.y=f*s.y+h*l.y+p*c.y+d*u.y,a}var Yf=["x","y","z"];function IVe(n,e){const t={};for(let i=0,r=n.axis.length;i2&&(e.z=n[2]),n.length>3&&(e.m=n[3]),e}function NVe(n){RW(n.x),RW(n.y)}function RW(n){if(typeof Number.isFinite=="function"){if(Number.isFinite(n))return;throw new TypeError("coordinates must be finite numbers")}if(typeof n!="number"||n!==n||!isFinite(n))throw new TypeError("coordinates must be finite numbers")}function kVe(n,e){return(n.datum.datum_type===qp||n.datum.datum_type===Xp||n.datum.datum_type===nv)&&e.datumCode!=="WGS84"||(e.datum.datum_type===qp||e.datum.datum_type===Xp||e.datum.datum_type===nv)&&n.datumCode!=="WGS84"}function e_(n,e,t,i){var r,a=t.z!==void 0;if(NVe(t),n.datum&&e.datum&&kVe(n,e)&&(r=new C0("WGS84"),t=e_(n,r,t,i),n=r),i&&n.axis!=="enu"&&(t=IVe(n,t)),n.projName==="longlat")t={x:t.x*Da,y:t.y*Da,z:t.z||0};else if(n.to_meter&&(t={x:t.x*n.to_meter,y:t.y*n.to_meter,z:t.z||0}),t=n.inverse(t),!t)return;if(n.from_greenwich&&(t.x+=n.from_greenwich),t=RVe(n.datum,e.datum,t),!!t)return t=t,e.from_greenwich&&(t={x:t.x-e.from_greenwich,y:t.y,z:t.z||0}),e.projName==="longlat"?t={x:t.x*Zs,y:t.y*Zs,z:t.z||0}:(t=e.forward(t),e.to_meter&&(t={x:t.x/e.to_meter,y:t.y/e.to_meter,z:t.z||0})),i&&e.axis!=="enu"?DVe(e,t):(t&&!a&&e.projName!=="geocent"&&delete t.z,t)}function FVe(n,e,t,i){var r;return Array.isArray(t)?r=WR(t):r={x:t.x,y:t.y,z:t.z,m:t.m},e_(n,e,r,i)}var LW=C0("WGS84");function wT(n,e,t,i){var r,a,o;return Array.isArray(t)?(r=e_(n,e,WR(t),i)||{x:NaN,y:NaN},t.length>2?(a=typeof n.name!="undefined"&&n.name==="geocent"||typeof e.name!="undefined"&&e.name==="geocent",a?typeof r.z=="number"?[r.x,r.y,r.z].concat(t.slice(3)):[r.x,r.y,t[2]].concat(t.slice(3)):i&&typeof r.z=="number"?[r.x,r.y,r.z].concat(t.slice(3)):[r.x,r.y].concat(t.slice(2))):[r.x,r.y]):(r=e_(n,e,{x:t.x,y:t.y,z:t.z,m:t.m},i)||{x:NaN,y:NaN},o=Object.keys(t),o.length===2||(a=typeof n.name!="undefined"&&n.name==="geocent"||typeof e.name!="undefined"&&e.name==="geocent",o.forEach(function(s){s==="x"||s==="y"||s==="z"&&(a||i)||(r[s]=t[s])})),r)}function G4(n){return n instanceof C0?n:typeof n=="object"&&"oProj"in n?n.oProj:C0(n)}function OVe(n,e,t){var i,r,a=!1,o;return typeof e=="undefined"?(r=G4(n),i=LW,a=!0):(typeof e.x!="undefined"||Array.isArray(e))&&(t=e,r=G4(n),i=LW,a=!0),i||(i=G4(n)),r||(r=G4(e)),t?wT(i,r,t):(o={forward:function(s,l){return wT(i,r,s,l)},inverse:function(s,l){return wT(r,i,s,l)}},a&&(o.oProj=r),o)}var IW=6,pte="AJSAJS",vte="AFAFAF",G2=65,Vs=73,r0=79,Dg=86,Ng=90;const BVe={forward:mte,inverse:zVe,toPoint:gte};function mte(n,e){return e=e||5,VVe(GVe({lat:n[1],lon:n[0]}),e)}function zVe(n){var e=jR(_te(n.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function gte(n){var e=jR(_te(n.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function TT(n){return n*(Math.PI/180)}function DW(n){return 180*(n/Math.PI)}function GVe(n){var e=n.lat,t=n.lon,i=6378137,r=.00669438,a=.9996,o,s,l,u,c,d,h,f=TT(e),p=TT(t),m,v;v=Math.floor((t+180)/6)+1,t===180&&(v=60),e>=56&&e<64&&t>=3&&t<12&&(v=32),e>=72&&e<84&&(t>=0&&t<9?v=31:t>=9&&t<21?v=33:t>=21&&t<33?v=35:t>=33&&t<42&&(v=37)),o=(v-1)*6-180+3,m=TT(o),s=r/(1-r),l=i/Math.sqrt(1-r*Math.sin(f)*Math.sin(f)),u=Math.tan(f)*Math.tan(f),c=s*Math.cos(f)*Math.cos(f),d=Math.cos(f)*(p-m),h=i*((1-r/4-3*r*r/64-5*r*r*r/256)*f-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*f)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*f)-35*r*r*r/3072*Math.sin(6*f));var g=a*l*(d+(1-u+c)*d*d*d/6+(5-18*u+u*u+72*c-58*s)*d*d*d*d*d/120)+5e5,_=a*(h+l*Math.tan(f)*(d*d/2+(5-u+9*c+4*c*c)*d*d*d*d/24+(61-58*u+u*u+600*c-330*s)*d*d*d*d*d*d/720));return e<0&&(_+=1e7),{northing:Math.round(_),easting:Math.round(g),zoneNumber:v,zoneLetter:UVe(e)}}function jR(n){var e=n.northing,t=n.easting,i=n.zoneLetter,r=n.zoneNumber;if(r<0||r>60)return null;var a=.9996,o=6378137,s=.00669438,l,u=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),c,d,h,f,p,m,v,g,_,S=t-5e5,x=e;i<"N"&&(x-=1e7),v=(r-1)*6-180+3,l=s/(1-s),m=x/a,g=m/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),_=g+(3*u/2-27*u*u*u/32)*Math.sin(2*g)+(21*u*u/16-55*u*u*u*u/32)*Math.sin(4*g)+151*u*u*u/96*Math.sin(6*g),c=o/Math.sqrt(1-s*Math.sin(_)*Math.sin(_)),d=Math.tan(_)*Math.tan(_),h=l*Math.cos(_)*Math.cos(_),f=o*(1-s)/Math.pow(1-s*Math.sin(_)*Math.sin(_),1.5),p=S/(c*a);var A=_-c*Math.tan(_)/f*(p*p/2-(5+3*d+10*h-4*h*h-9*l)*p*p*p*p/24+(61+90*d+298*h+45*d*d-252*l-3*h*h)*p*p*p*p*p*p/720);A=DW(A);var C=(p-(1+2*d+h)*p*p*p/6+(5-2*h+28*d-3*h*h+8*l+24*d*d)*p*p*p*p*p/120)/Math.cos(_);C=v+DW(C);var M;if(n.accuracy){var I=jR({northing:n.northing+n.accuracy,easting:n.easting+n.accuracy,zoneLetter:n.zoneLetter,zoneNumber:n.zoneNumber});M={top:I.lat,right:I.lon,bottom:A,left:C}}else M={lat:A,lon:C};return M}function UVe(n){var e="Z";return 84>=n&&n>=72?e="X":72>n&&n>=64?e="W":64>n&&n>=56?e="V":56>n&&n>=48?e="U":48>n&&n>=40?e="T":40>n&&n>=32?e="S":32>n&&n>=24?e="R":24>n&&n>=16?e="Q":16>n&&n>=8?e="P":8>n&&n>=0?e="N":0>n&&n>=-8?e="M":-8>n&&n>=-16?e="L":-16>n&&n>=-24?e="K":-24>n&&n>=-32?e="J":-32>n&&n>=-40?e="H":-40>n&&n>=-48?e="G":-48>n&&n>=-56?e="F":-56>n&&n>=-64?e="E":-64>n&&n>=-72?e="D":-72>n&&n>=-80&&(e="C"),e}function VVe(n,e){var t="00000"+n.easting,i="00000"+n.northing;return n.zoneNumber+n.zoneLetter+HVe(n.easting,n.northing,n.zoneNumber)+t.substr(t.length-5,e)+i.substr(i.length-5,e)}function HVe(n,e,t){var i=yte(t),r=Math.floor(n/1e5),a=Math.floor(e/1e5)%20;return WVe(r,a,i)}function yte(n){var e=n%IW;return e===0&&(e=IW),e}function WVe(n,e,t){var i=t-1,r=pte.charCodeAt(i),a=vte.charCodeAt(i),o=r+n-1,s=a+e,l=!1;o>Ng&&(o=o-Ng+G2-1,l=!0),(o===Vs||rVs||(o>Vs||rr0||(o>r0||rNg&&(o=o-Ng+G2-1),s>Dg?(s=s-Dg+G2-1,l=!0):l=!1,(s===Vs||aVs||(s>Vs||ar0||(s>r0||aDg&&(s=s-Dg+G2-1);var u=String.fromCharCode(o)+String.fromCharCode(s);return u}function _te(n){if(n&&n.length===0)throw"MGRSPoint coverting from nothing";for(var e=n.length,t=null,i="",r,a=0;!/[A-Z]/.test(r=n.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+n;i+=r,a++}var o=parseInt(i,10);if(a===0||a+3>e)throw"MGRSPoint bad conversion from: "+n;var s=n.charAt(a++);if(s<="A"||s==="B"||s==="Y"||s>="Z"||s==="I"||s==="O")throw"MGRSPoint zone letter "+s+" not handled: "+n;t=n.substring(a,a+=2);for(var l=yte(o),u=jVe(t.charAt(0),l),c=$Ve(t.charAt(1),l);c0&&(m=1e5/Math.pow(10,h),v=n.substring(a,a+h),f=parseFloat(v)*m,g=n.substring(a+h),p=parseFloat(g)*m),_=f+u,S=p+c,{easting:_,northing:S,zoneLetter:s,zoneNumber:o,accuracy:m}}function jVe(n,e){for(var t=pte.charCodeAt(e-1),i=1e5,r=!1;t!==n.charCodeAt(0);){if(t++,t===Vs&&t++,t===r0&&t++,t>Ng){if(r)throw"Bad character: "+n;t=G2,r=!0}i+=1e5}return i}function $Ve(n,e){if(n>"V")throw"MGRSPoint given invalid Northing "+n;for(var t=vte.charCodeAt(e-1),i=0,r=!1;t!==n.charCodeAt(0);){if(t++,t===Vs&&t++,t===r0&&t++,t>Dg){if(r)throw"Bad character: "+n;t=G2,r=!0}i+=1e5}return i}function qVe(n){var e;switch(n){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+n}function Nv(n,e,t){if(!(this instanceof Nv))return new Nv(n,e,t);if(Array.isArray(n))this.x=n[0],this.y=n[1],this.z=n[2]||0;else if(typeof n=="object")this.x=n.x,this.y=n.y,this.z=n.z||0;else if(typeof n=="string"&&typeof e=="undefined"){var i=n.split(",");this.x=parseFloat(i[0]),this.y=parseFloat(i[1]),this.z=parseFloat(i[2])||0}else this.x=n,this.y=e,this.z=t||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Nv.fromMGRS=function(n){return new Nv(gte(n))};Nv.prototype.toMGRS=function(n){return mte([this.x,this.y],n)};var XVe=1,YVe=.25,NW=.046875,kW=.01953125,FW=.01068115234375,KVe=.75,ZVe=.46875,JVe=.013020833333333334,QVe=.007120768229166667,eHe=.3645833333333333,tHe=.005696614583333333,nHe=.3076171875;function $R(n){var e=[];e[0]=XVe-n*(YVe+n*(NW+n*(kW+n*FW))),e[1]=n*(KVe-n*(NW+n*(kW+n*FW)));var t=n*n;return e[2]=t*(ZVe-n*(JVe+n*QVe)),t*=n,e[3]=t*(eHe-n*tHe),e[4]=t*n*nHe,e}function om(n,e,t,i){return t*=e,e*=e,i[0]*n-t*(i[1]+e*(i[2]+e*(i[3]+e*i[4])))}var iHe=20;function qR(n,e,t){for(var i=1/(1-e),r=n,a=iHe;a;--a){var o=Math.sin(r),s=1-e*o*o;if(s=(om(r,o,Math.cos(r),t)-n)*(s*Math.sqrt(s))*i,r-=s,Math.abs(s)Rn?Math.tan(t):0,m=Math.pow(p,2),v=Math.pow(m,2);r=1-this.es*Math.pow(s,2),c=c/Math.sqrt(r);var g=om(t,s,l,this.en);a=this.a*(this.k0*c*(1+d/6*(1-m+h+d/20*(5-18*m+v+14*h-58*m*h+d/42*(61+179*v-v*m-479*m)))))+this.x0,o=this.a*(this.k0*(g-this.ml0+s*i*c/2*(1+d/12*(5-m+9*h+4*f+d/30*(61+v-58*m+270*h-330*m*h+d/56*(1385+543*v-v*m-3111*m))))))+this.y0}else{var u=l*Math.sin(i);if(Math.abs(Math.abs(u)-1)=1){if(u-1>Rn)return 93;o=0}else o=Math.acos(o);t<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return n.x=a,n.y=o,n}function oHe(n){var e,t,i,r,a=(n.x-this.x0)*(1/this.a),o=(n.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+o/this.k0,t=qR(e,this.es,this.en),Math.abs(t)Rn?Math.tan(t):0,p=this.ep2*Math.pow(h,2),m=Math.pow(p,2),v=Math.pow(f,2),g=Math.pow(v,2);e=1-this.es*Math.pow(d,2);var _=a*Math.sqrt(e)/this.k0,S=Math.pow(_,2);e=e*f,i=t-e*S/(1-this.es)*.5*(1-S/12*(5+3*v-9*p*v+p-4*m-S/30*(61+90*v-252*p*v+45*g+46*p-S/56*(1385+3633*v+4095*g+1574*g*v)))),r=kn(this.long0+_*(1-S/6*(1+2*v+p-S/20*(5+28*v+24*g+8*p*v+6*p-S/42*(61+662*v+1320*g+720*g*v))))/h,this.over)}else i=yn*G3(o),r=0;else{var s=Math.exp(a/this.k0),l=.5*(s-1/s),u=this.lat0+o/this.k0,c=Math.cos(u);e=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(l,2))),i=Math.asin(e),o<0&&(i=-i),l===0&&c===0?r=0:r=kn(Math.atan2(l,c)+this.long0,this.over)}return n.x=r,n.y=i,n}var sHe=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const x5={init:rHe,forward:aHe,inverse:oHe,names:sHe};function Ste(n){var e=Math.exp(n);return e=(e-1/e)/2,e}function Ys(n,e){n=Math.abs(n),e=Math.abs(e);var t=Math.max(n,e),i=Math.min(n,e)/(t||1);return t*Math.sqrt(1+Math.pow(i,2))}function lHe(n){var e=1+n,t=e-1;return t===0?n:n*Math.log(e)/t}function uHe(n){var e=Math.abs(n);return e=lHe(e*(1+e/(Ys(1,e)+1))),n<0?-e:e}function XR(n,e){for(var t=2*Math.cos(2*e),i=n.length-1,r=n[i],a=0,o;--i>=0;)o=-a+t*r+n[i],a=r,r=o;return e+o*Math.sin(2*e)}function cHe(n,e){for(var t=2*Math.cos(e),i=n.length-1,r=n[i],a=0,o;--i>=0;)o=-a+t*r+n[i],a=r,r=o;return Math.sin(e)*o}function dHe(n){var e=Math.exp(n);return e=(e+1/e)/2,e}function bte(n,e,t){for(var i=Math.sin(e),r=Math.cos(e),a=Ste(t),o=dHe(t),s=2*r*o,l=-2*i*a,u=n.length-1,c=n[u],d=0,h=0,f=0,p,m;--u>=0;)p=h,m=d,h=c,d=f,c=-p+s*h-l*d+n[u],f=-m+l*h+s*d;return s=i*o,l=r*a,[s*c-l*f,s*f+l*c]}function hHe(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(x5.init.apply(this),this.forward=x5.forward,this.inverse=x5.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var n=this.es/(1+Math.sqrt(1-this.es)),e=n/(2-n),t=e;this.cgb[0]=e*(2+e*(-2/3+e*(-2+e*(116/45+e*(26/45+e*(-2854/675)))))),this.cbg[0]=e*(-2+e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))),t=t*e,this.cgb[1]=t*(7/3+e*(-8/5+e*(-227/45+e*(2704/315+e*(2323/945))))),this.cbg[1]=t*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),t=t*e,this.cgb[2]=t*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=t*(-26/15+e*(34/21+e*(8/5+e*(-12686/2835)))),t=t*e,this.cgb[3]=t*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=t*(1237/630+e*(-12/5+e*(-24832/14175))),t=t*e,this.cgb[4]=t*(4174/315+e*(-144838/6237)),this.cbg[4]=t*(-734/315+e*(109598/31185)),t=t*e,this.cgb[5]=t*(601676/22275),this.cbg[5]=t*(444337/155925),t=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+t*(1/4+t*(1/64+t/256))),this.utg[0]=e*(-.5+e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=t*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=t*(13/48+e*(-3/5+e*(557/1440+e*(281/630+e*(-1983433/1935360))))),t=t*e,this.utg[2]=t*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=t*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),t=t*e,this.utg[3]=t*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=t*(49561/161280+e*(-179/168+e*(6601661/7257600))),t=t*e,this.utg[4]=t*(-4583/161280+e*(108847/3991680)),this.gtu[4]=t*(34729/80640+e*(-3418889/1995840)),t=t*e,this.utg[5]=t*(-20648693/638668800),this.gtu[5]=t*(212378941/319334400);var i=XR(this.cbg,this.lat0);this.Zb=-this.Qn*(i+cHe(this.gtu,2*i))}function fHe(n){var e=kn(n.x-this.long0,this.over),t=n.y;t=XR(this.cbg,t);var i=Math.sin(t),r=Math.cos(t),a=Math.sin(e),o=Math.cos(e);t=Math.atan2(i,o*r),e=Math.atan2(a*r,Ys(i,r*o)),e=uHe(Math.tan(e));var s=bte(this.gtu,2*t,2*e);t=t+s[0],e=e+s[1];var l,u;return Math.abs(e)<=2.623395162778?(l=this.a*(this.Qn*e)+this.x0,u=this.a*(this.Qn*t+this.Zb)+this.y0):(l=1/0,u=1/0),n.x=l,n.y=u,n}function pHe(n){var e=(n.x-this.x0)*(1/this.a),t=(n.y-this.y0)*(1/this.a);t=(t-this.Zb)/this.Qn,e=e/this.Qn;var i,r;if(Math.abs(e)<=2.623395162778){var a=bte(this.utg,2*t,2*e);t=t+a[0],e=e+a[1],e=Math.atan(Ste(e));var o=Math.sin(t),s=Math.cos(t),l=Math.sin(e),u=Math.cos(e);t=Math.atan2(o*u,Ys(l,u*s)),e=Math.atan2(l,u*s),i=kn(e+this.long0,this.over),r=XR(this.cgb,t)}else i=1/0,r=1/0;return n.x=i,n.y=r,n}var vHe=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const w5={init:hHe,forward:fHe,inverse:pHe,names:vHe};function mHe(n,e){if(n===void 0){if(n=Math.floor((kn(e)+Math.PI)*30/Math.PI)+1,n<0)return 0;if(n>60)return 60}return n}var gHe="etmerc";function yHe(){var n=mHe(this.zone,this.long0);if(n===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(n)-183)*Da,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,w5.init.apply(this),this.forward=w5.forward,this.inverse=w5.inverse}var _He=["Universal Transverse Mercator System","utm"];const SHe={init:yHe,names:_He,dependsOn:gHe};function YR(n,e){return Math.pow((1-n)/(1+n),e)}var bHe=20;function xHe(){var n=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*n*n),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(n/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Fr)/(Math.pow(Math.tan(.5*this.lat0+Fr),this.C)*YR(this.e*n,this.ratexp))}function wHe(n){var e=n.x,t=n.y;return n.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*t+Fr),this.C)*YR(this.e*Math.sin(t),this.ratexp))-yn,n.x=this.C*e,n}function THe(n){for(var e=1e-14,t=n.x/this.C,i=n.y,r=Math.pow(Math.tan(.5*i+Fr)/this.K,1/this.C),a=bHe;a>0&&(i=2*Math.atan(r*YR(this.e*Math.sin(n.y),-.5*this.e))-yn,!(Math.abs(i-n.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Rn&&Math.abs(Math.cos(this.lat_ts))>Rn&&(this.k0=.5*this.cons*ec(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/tu(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ec(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(ZR(this.lat0,this.sinlat0,this.e))-yn,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function IHe(n){var e=n.x,t=n.y,i=Math.sin(t),r=Math.cos(t),a,o,s,l,u,c,d=kn(e-this.long0,this.over);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=Rn&&Math.abs(t+this.lat0)<=Rn?(n.x=NaN,n.y=NaN,n):this.sphere?(a=2*this.k0/(1+this.sinlat0*i+this.coslat0*r*Math.cos(d)),n.x=this.a*a*r*Math.sin(d)+this.x0,n.y=this.a*a*(this.coslat0*i-this.sinlat0*r*Math.cos(d))+this.y0,n):(o=2*Math.atan(ZR(t,i,this.e))-yn,l=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=Rn?(u=tu(this.e,t*this.con,this.con*i),c=2*this.a*this.k0*u/this.cons,n.x=this.x0+c*Math.sin(e-this.long0),n.y=this.y0-this.con*c*Math.cos(e-this.long0),n):(Math.abs(this.sinlat0)0?e=kn(this.long0+Math.atan2(n.x,-1*n.y),this.over):e=kn(this.long0+Math.atan2(n.x,n.y),this.over):e=kn(this.long0+Math.atan2(n.x*Math.sin(s),o*this.coslat0*Math.cos(s)-n.y*this.sinlat0*Math.sin(s)),this.over),n.x=e,n.y=t,n)}else if(Math.abs(this.coslat0)<=Rn){if(o<=Rn)return t=this.lat0,e=this.long0,n.x=e,n.y=t,n;n.x*=this.con,n.y*=this.con,i=o*this.cons/(2*this.a*this.k0),t=this.con*h3(this.e,i),e=this.con*kn(this.con*this.long0+Math.atan2(n.x,-1*n.y),this.over)}else r=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=Rn?a=this.X0:(a=Math.asin(Math.cos(r)*this.sinX0+n.y*Math.sin(r)*this.cosX0/o),e=kn(this.long0+Math.atan2(n.x*Math.sin(r),o*this.cosX0*Math.cos(r)-n.y*this.sinX0*Math.sin(r)),this.over)),t=-1*h3(this.e,Math.tan(.5*(yn+a)));return n.x=e,n.y=t,n}var NHe=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const kHe={init:LHe,forward:IHe,inverse:DHe,names:NHe,ssfn_:ZR};function FHe(){var n=this.lat0;this.lambda0=this.long0;var e=Math.sin(n),t=this.a,i=this.rf,r=1/i,a=2*r-Math.pow(r,2),o=this.e=Math.sqrt(a);this.R=this.k0*t*Math.sqrt(1-a)/(1-a*Math.pow(e,2)),this.alpha=Math.sqrt(1+a/(1-a)*Math.pow(Math.cos(n),4)),this.b0=Math.asin(e/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+n/2)),u=Math.log((1+o*e)/(1-o*e));this.K=s-this.alpha*l+this.alpha*o/2*u}function OHe(n){var e=Math.log(Math.tan(Math.PI/4-n.y/2)),t=this.e/2*Math.log((1+this.e*Math.sin(n.y))/(1-this.e*Math.sin(n.y))),i=-this.alpha*(e+t)+this.K,r=2*(Math.atan(Math.exp(i))-Math.PI/4),a=this.alpha*(n.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(a));return n.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,n.x=this.R*o+this.x0,n}function BHe(n){for(var e=n.x-this.x0,t=n.y-this.y0,i=e/this.R,r=2*(Math.atan(Math.exp(t/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(i)),o=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+o/this.alpha,l=0,u=a,c=-1e3,d=0;Math.abs(u-c)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return n.x=s,n.y=u,n}var zHe=["somerc"];const GHe={init:FHe,forward:OHe,inverse:BHe,names:zHe};var C2=1e-7;function UHe(n){var e=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],t=typeof n.projName=="object"?Object.keys(n.projName)[0]:n.projName;return"no_uoff"in n||"no_off"in n||e.indexOf(t)!==-1||e.indexOf(cte(t))!==-1}function VHe(){var n,e,t,i,r,a,o,s,l,u,c=0,d,h=0,f=0,p=0,m=0,v=0,g=0;this.no_off=UHe(this),this.no_rot="no_rot"in this;var _=!1;"alpha"in this&&(_=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),_&&(g=this.alpha),S&&(c=this.rectified_grid_angle,_||(g=0,_=!0)),_||S)h=this.longc;else if(f=this.long1,m=this.lat1,p=this.long2,v=this.lat2,Math.abs(m-v)<=C2||(n=Math.abs(m))<=C2||Math.abs(n-yn)<=C2||Math.abs(Math.abs(this.lat0)-yn)<=C2||Math.abs(Math.abs(v)-yn)<=C2)throw new Error;var x=1-this.es;e=Math.sqrt(x),Math.abs(this.lat0)>Rn?(s=Math.sin(this.lat0),t=Math.cos(this.lat0),n=1-this.es*s*s,this.B=t*t,this.B=Math.sqrt(1+this.es*this.B*this.B/x),this.A=this.B*this.k0*e/n,i=this.B*e/(t*Math.sqrt(n)),r=i*i-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=i,this.E*=Math.pow(tu(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=i=r=1),_||S?(_?(d=Math.asin(Math.sin(g)/i),S||(c=g)):(d=c,g=Math.asin(i*Math.sin(d))),this.lam0=h-Math.asin(.5*(r-1/r)*Math.tan(d))/this.B):(a=Math.pow(tu(this.e,m,Math.sin(m)),this.B),o=Math.pow(tu(this.e,v,Math.sin(v)),this.B),r=this.E/a,l=(o-a)/(o+a),u=this.E*this.E,u=(u-o*a)/(u+o*a),n=f-p,n<-Math.PI?p-=c3:n>Math.PI&&(p+=c3),this.lam0=kn(.5*(f+p)-Math.atan(u*Math.tan(.5*this.B*(f-p))/l)/this.B,this.over),d=Math.atan(2*Math.sin(this.B*kn(f-this.lam0,this.over))/(r-1/r)),c=g=Math.asin(i*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(i*i-1)/Math.cos(g))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(Fr-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(Fr+r))}function HHe(n){var e={},t,i,r,a,o,s,l,u;if(n.x=n.x-this.lam0,Math.abs(Math.abs(n.y)-yn)>Rn){if(o=this.E/Math.pow(tu(this.e,n.y,Math.sin(n.y)),this.B),s=1/o,t=.5*(o-s),i=.5*(o+s),a=Math.sin(this.B*n.x),r=(t*this.singam-a*this.cosgam)/i,Math.abs(Math.abs(r)-1)0?this.v_pole_n:this.v_pole_s,l=this.ArB*n.y;return this.no_rot?(e.x=l,e.y=u):(l-=this.u_0,e.x=u*this.cosrot+l*this.sinrot,e.y=l*this.cosrot-u*this.sinrot),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function WHe(n){var e,t,i,r,a,o,s,l={};if(n.x=(n.x-this.x0)*(1/this.a),n.y=(n.y-this.y0)*(1/this.a),this.no_rot?(t=n.y,e=n.x):(t=n.x*this.cosrot-n.y*this.sinrot,e=n.y*this.cosrot+n.x*this.sinrot+this.u_0),i=Math.exp(-this.BrA*t),r=.5*(i-1/i),a=.5*(i+1/i),o=Math.sin(this.BrA*e),s=(o*this.cosgam+r*this.singam)/a,Math.abs(Math.abs(s)-1)Rn?this.ns=Math.log(i/s)/Math.log(r/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=i/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function XHe(n){var e=n.x,t=n.y;Math.abs(2*Math.abs(t)-Math.PI)<=Rn&&(t=G3(t)*(yn-2*Rn));var i=Math.abs(Math.abs(t)-yn),r,a;if(i>Rn)r=tu(this.e,t,Math.sin(t)),a=this.a*this.f0*Math.pow(r,this.ns);else{if(i=t*this.ns,i<=0)return null;a=0}var o=this.ns*kn(e-this.long0,this.over);return n.x=this.k0*(a*Math.sin(o))+this.x0,n.y=this.k0*(this.rh-a*Math.cos(o))+this.y0,n}function YHe(n){var e,t,i,r,a,o=(n.x-this.x0)/this.k0,s=this.rh-(n.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+s*s),t=1):(e=-Math.sqrt(o*o+s*s),t=-1);var l=0;if(e!==0&&(l=Math.atan2(t*o,t*s)),e!==0||this.ns>0){if(t=1/this.ns,i=Math.pow(e/(this.a*this.f0),t),r=h3(this.e,i),r===-9999)return null}else r=-yn;return a=kn(l/this.ns+this.long0,this.over),n.x=a,n.y=r,n}var KHe=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const ZHe={init:qHe,forward:XHe,inverse:YHe,names:KHe};function JHe(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function QHe(n){var e,t,i,r,a,o,s,l=n.x,u=n.y,c=kn(l-this.long0,this.over);return e=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),t=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/e)-this.s45),i=-c*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(t)+Math.sin(this.ad)*Math.cos(t)*Math.cos(i)),a=Math.asin(Math.cos(t)*Math.sin(i)/Math.cos(r)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),n.y=s*Math.cos(o)/1,n.x=s*Math.sin(o)/1,this.czech||(n.y*=-1,n.x*=-1),n}function eWe(n){var e,t,i,r,a,o,s,l,u=n.x;n.x=n.y,n.y=u,this.czech||(n.y*=-1,n.x*=-1),o=Math.sqrt(n.x*n.x+n.y*n.y),a=Math.atan2(n.y,n.x),r=a/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(r)),t=Math.asin(Math.cos(i)*Math.sin(r)/Math.cos(e)),n.x=this.long0-t/this.alfa,s=e,l=0;var c=0;do n.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-n.y)<1e-10&&(l=1),s=n.y,c+=1;while(l===0&&c<15);return c>=15?null:n}var tWe=["Krovak","Krovak Modified","Krovak (North Orientated)","Krovak Modified (North Orientated)","krovak"];const nWe={init:JHe,forward:QHe,inverse:eWe,names:tWe};function Ps(n,e,t,i,r){return n*r-e*Math.sin(2*r)+t*Math.sin(4*r)-i*Math.sin(6*r)}function U3(n){return 1-.25*n*(1+n/16*(3+1.25*n))}function V3(n){return .375*n*(1+.25*n*(1+.46875*n))}function H3(n){return .05859375*n*n*(1+.75*n)}function W3(n){return n*n*n*(35/3072)}function JR(n,e,t){var i=e*t;return n/Math.sqrt(1-i*i)}function Hh(n){return Math.abs(n)1e-7?(t=n*e,(1-n*n)*(e/(1-t*t)-.5/n*Math.log((1-t)/(1+t)))):2*e}var lWe=.3333333333333333,uWe=.17222222222222222,cWe=.10257936507936508,dWe=.06388888888888888,hWe=.0664021164021164,fWe=.016415012942191543;function xte(n){var e,t=[];return t[0]=n*lWe,e=n*n,t[0]+=e*uWe,t[1]=e*dWe,e*=n,t[0]+=e*cWe,t[1]+=e*hWe,t[2]=e*fWe,t}function wte(n,e){var t=n+n;return n+e[0]*Math.sin(t)+e[1]*Math.sin(t+t)+e[2]*Math.sin(t+t+t)}var mM=1,gM=2,yM=3,T5=4;function pWe(){var n=Math.abs(this.lat0);if(Math.abs(n-yn)0){var e;switch(this.qp=qu(this.e,1),this.mmf=.5/(1-this.es),this.apa=xte(this.es),this.mode){case gM:this.dd=1;break;case mM:this.dd=1;break;case yM:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case T5:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=qu(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===T5&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function vWe(n){var e,t,i,r,a,o,s,l,u,c,d=n.x,h=n.y;if(d=kn(d-this.long0,this.over),this.sphere){if(a=Math.sin(h),c=Math.cos(h),i=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t=this.mode===this.EQUIT?1+c*i:1+this.sinph0*a+this.cosph0*c*i,t<=Rn)return null;t=Math.sqrt(2/t),e=t*c*Math.sin(d),t*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*c*i}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),Math.abs(h+this.lat0)=0?(e=(u=Math.sqrt(o))*r,t=i*(this.mode===this.S_POLE?u:-u)):e=t=0;break}}return n.x=this.a*e+this.x0,n.y=this.a*t+this.y0,n}function mWe(n){n.x-=this.x0,n.y-=this.y0;var e=n.x/this.a,t=n.y/this.a,i,r,a,o,s,l,u;if(this.sphere){var c=0,d,h=0;if(d=Math.sqrt(e*e+t*t),r=d*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(h=Math.sin(r),c=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(d)<=Rn?0:Math.asin(t*h/d),e*=h,t=c*d;break;case this.OBLIQ:r=Math.abs(d)<=Rn?this.lat0:Math.asin(c*this.sinph0+t*h*this.cosph0/d),e*=h*this.cosph0,t=(c-Math.sin(r)*this.sinph0)*d;break;case this.N_POLE:t=-t,r=yn-r;break;case this.S_POLE:r-=yn;break}i=t===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(e,t)}else{if(u=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e/=this.dd,t*=this.dd,l=Math.sqrt(e*e+t*t),l1&&(n=n>1?1:-1),Math.asin(n)}function _We(){Math.abs(this.lat1+this.lat2)Rn?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function SWe(n){var e=n.x,t=n.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var i=qu(this.e3,this.sin_phi),r=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,a=this.ns0*kn(e-this.long0,this.over),o=r*Math.sin(a)+this.x0,s=this.rh-r*Math.cos(a)+this.y0;return n.x=o,n.y=s,n}function bWe(n){var e,t,i,r,a,o;return n.x-=this.x0,n.y=this.rh-n.y+this.y0,this.ns0>=0?(e=Math.sqrt(n.x*n.x+n.y*n.y),i=1):(e=-Math.sqrt(n.x*n.x+n.y*n.y),i=-1),r=0,e!==0&&(r=Math.atan2(i*n.x,i*n.y)),i=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-i*i)/(2*this.ns0)):(t=(this.c-i*i)/this.ns0,o=this.phi1z(this.e3,t)),a=kn(r/this.ns0+this.long0,this.over),n.x=a,n.y=o,n}function xWe(n,e){var t,i,r,a,o,s=Oh(.5*e);if(n0||Math.abs(o)<=Rn?(s=this.x0+this.a*a*t*Math.sin(i)/o,l=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*t*r)/o):(s=this.x0+this.infinity_dist*t*Math.sin(i),l=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*t*r)),n.x=s,n.y=l,n}function MWe(n){var e,t,i,r,a,o;return n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,n.x/=this.k0,n.y/=this.k0,(e=Math.sqrt(n.x*n.x+n.y*n.y))?(r=Math.atan2(e,this.rc),t=Math.sin(r),i=Math.cos(r),o=Oh(i*this.sin_p14+n.y*t*this.cos_p14/e),a=Math.atan2(n.x*t,e*this.cos_p14*i-n.y*this.sin_p14*t),a=kn(this.long0+a,this.over)):(o=this.phic0,a=0),n.x=a,n.y=o,n}var EWe=["gnom"];const PWe={init:AWe,forward:CWe,inverse:MWe,names:EWe};function RWe(n,e){var t=1-(1-n*n)/(2*n)*Math.log((1-n)/(1+n));if(Math.abs(Math.abs(e)-t)<1e-6)return e<0?-1*yn:yn;for(var i=Math.asin(.5*e),r,a,o,s,l=0;l<30;l++)if(a=Math.sin(i),o=Math.cos(i),s=n*a,r=Math.pow(1-s*s,2)/(2*o)*(e/(1-n*n)-a/(1-s*s)+.5/n*Math.log((1-s)/(1+s))),i+=r,Math.abs(r)<=1e-10)return i;return NaN}function LWe(){this.sphere||(this.k0=ec(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function IWe(n){var e=n.x,t=n.y,i,r,a=kn(e-this.long0,this.over);if(this.sphere)i=this.x0+this.a*a*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(t)/Math.cos(this.lat_ts);else{var o=qu(this.e,Math.sin(t));i=this.x0+this.a*this.k0*a,r=this.y0+this.a*o*.5/this.k0}return n.x=i,n.y=r,n}function DWe(n){n.x-=this.x0,n.y-=this.y0;var e,t;return this.sphere?(e=kn(this.long0+n.x/this.a/Math.cos(this.lat_ts),this.over),t=Math.asin(n.y/this.a*Math.cos(this.lat_ts))):(t=RWe(this.e,2*n.y*this.k0/this.a),e=kn(this.long0+n.x/(this.a*this.k0),this.over)),n.x=e,n.y=t,n}var NWe=["cea"];const kWe={init:LWe,forward:IWe,inverse:DWe,names:NWe};function FWe(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function OWe(n){var e=n.x,t=n.y,i=kn(e-this.long0,this.over),r=Hh(t-this.lat0);return n.x=this.x0+this.a*i*this.rc,n.y=this.y0+this.a*r,n}function BWe(n){var e=n.x,t=n.y;return n.x=kn(this.long0+(e-this.x0)/(this.a*this.rc),this.over),n.y=Hh(this.lat0+(t-this.y0)/this.a),n}var zWe=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const GWe={init:FWe,forward:OWe,inverse:BWe,names:zWe};var OW=20;function UWe(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=U3(this.es),this.e1=V3(this.es),this.e2=H3(this.es),this.e3=W3(this.es),this.ml0=this.a*Ps(this.e0,this.e1,this.e2,this.e3,this.lat0)}function VWe(n){var e=n.x,t=n.y,i,r,a,o=kn(e-this.long0,this.over);if(a=o*Math.sin(t),this.sphere)Math.abs(t)<=Rn?(i=this.a*o,r=-1*this.a*this.lat0):(i=this.a*Math.sin(a)/Math.tan(t),r=this.a*(Hh(t-this.lat0)+(1-Math.cos(a))/Math.tan(t)));else if(Math.abs(t)<=Rn)i=this.a*o,r=-1*this.ml0;else{var s=JR(this.a,this.e,Math.sin(t))/Math.tan(t);i=s*Math.sin(a),r=this.a*Ps(this.e0,this.e1,this.e2,this.e3,t)-this.ml0+s*(1-Math.cos(a))}return n.x=i+this.x0,n.y=r+this.y0,n}function HWe(n){var e,t,i,r,a,o,s,l,u;if(i=n.x-this.x0,r=n.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=Rn)e=kn(i/this.a+this.long0,this.over),t=0;else{o=this.lat0+r/this.a,s=i*i/this.a/this.a+o*o,l=o;var c;for(a=OW;a;--a)if(c=Math.tan(l),u=-1*(o*(l*c+1)-l-.5*(l*l+s)*c)/((l-o)/c-1),l+=u,Math.abs(u)<=Rn){t=l;break}e=kn(this.long0+Math.asin(i*Math.tan(l)/this.a)/Math.sin(t),this.over)}else if(Math.abs(r+this.ml0)<=Rn)t=0,e=kn(this.long0+i/this.a,this.over);else{o=(this.ml0+r)/this.a,s=i*i/this.a/this.a+o*o,l=o;var d,h,f,p,m;for(a=OW;a;--a)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),h=this.a*Ps(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),p=h/this.a,u=(o*(d*p+1)-p-.5*d*(p*p+s))/(this.es*Math.sin(2*l)*(p*p+s-2*o*p)/(4*d)+(o-p)*(d*f-2/Math.sin(2*l))-f),l-=u,Math.abs(u)<=Rn){t=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(t),2))*Math.tan(t),e=kn(this.long0+Math.asin(i*d/this.a)/Math.sin(t),this.over)}return n.x=e,n.y=t,n}var WWe=["Polyconic","American_Polyconic","poly"];const jWe={init:UWe,forward:VWe,inverse:HWe,names:WWe};function $We(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function qWe(n){var e,t=n.x,i=n.y,r=i-this.lat0,a=t-this.long0,o=r/l9*1e-5,s=a,l=1,u=0;for(e=1;e<=10;e++)l=l*o,u=u+this.A[e]*l;var c=u,d=s,h=1,f=0,p,m,v=0,g=0;for(e=1;e<=6;e++)p=h*c-f*d,m=f*c+h*d,h=p,f=m,v=v+this.B_re[e]*h-this.B_im[e]*f,g=g+this.B_im[e]*h+this.B_re[e]*f;return n.x=g*this.a+this.x0,n.y=v*this.a+this.y0,n}function XWe(n){var e,t=n.x,i=n.y,r=t-this.x0,a=i-this.y0,o=a/this.a,s=r/this.a,l=1,u=0,c,d,h=0,f=0;for(e=1;e<=6;e++)c=l*o-u*s,d=u*o+l*s,l=c,u=d,h=h+this.C_re[e]*l-this.C_im[e]*u,f=f+this.C_im[e]*l+this.C_re[e]*u;for(var p=0;p.999999999999&&(t=.999999999999),e=Math.asin(t);var i=kn(this.long0+n.x/(.900316316158*this.a*Math.cos(e)),this.over);i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),t=(2*e+Math.sin(2*e))/Math.PI,Math.abs(t)>1&&(t=1);var r=Math.asin(t);return n.x=i,n.y=r,n}var pje=["Mollweide","moll"];const vje={init:dje,forward:hje,inverse:fje,names:pje};function mje(){Math.abs(this.lat1+this.lat2)=0?(t=Math.sqrt(n.x*n.x+n.y*n.y),e=1):(t=-Math.sqrt(n.x*n.x+n.y*n.y),e=-1);var a=0;if(t!==0&&(a=Math.atan2(e*n.x,e*n.y)),this.sphere)return r=kn(this.long0+a/this.ns,this.over),i=Hh(this.g-t/this.a),n.x=r,n.y=i,n;var o=this.g-t/this.a;return i=t_(o,this.e0,this.e1,this.e2,this.e3),r=kn(this.long0+a/this.ns,this.over),n.x=r,n.y=i,n}var _je=["Equidistant_Conic","eqdc"];const Sje={init:mje,forward:gje,inverse:yje,names:_je};function bje(){this.R=this.a}function xje(n){var e=n.x,t=n.y,i=kn(e-this.long0,this.over),r,a;Math.abs(t)<=Rn&&(r=this.x0+this.R*i,a=this.y0);var o=Oh(2*Math.abs(t/Math.PI));(Math.abs(i)<=Rn||Math.abs(Math.abs(t)-yn)<=Rn)&&(r=this.x0,t>=0?a=this.y0+Math.PI*this.R*Math.tan(.5*o):a=this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/i-i/Math.PI),l=s*s,u=Math.sin(o),c=Math.cos(o),d=c/(u+c-1),h=d*d,f=d*(2/u-1),p=f*f,m=Math.PI*this.R*(s*(d-p)+Math.sqrt(l*(d-p)*(d-p)-(p+l)*(h-p)))/(p+l);i<0&&(m=-m),r=this.x0+m;var v=l+d;return m=Math.PI*this.R*(f*v-s*Math.sqrt((p+l)*(l+1)-v*v))/(p+l),t>=0?a=this.y0+m:a=this.y0-m,n.x=r,n.y=a,n}function wje(n){var e,t,i,r,a,o,s,l,u,c,d,h,f;return n.x-=this.x0,n.y-=this.y0,d=Math.PI*this.R,i=n.x/d,r=n.y/d,a=i*i+r*r,o=-Math.abs(r)*(1+a),s=o-2*r*r+i*i,l=-2*o+1+2*r*r+a*a,f=r*r/l+(2*s*s*s/l/l/l-9*o*s/l/l)/27,u=(o-s*s/3/l)/l,c=2*Math.sqrt(-u/3),d=3*f/u/c,Math.abs(d)>1&&(d>=0?d=1:d=-1),h=Math.acos(d)/3,n.y>=0?t=(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI:t=-(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI,Math.abs(i)1e-12&&--m>0);return m===0?{azi1:NaN,s12:NaN}:(D=C*(r*r-r*(1-a)*(r*(1-a)))/(r*(1-a)*(r*(1-a))),E=1+D/16384*(4096+D*(-768+D*(320-175*D))),P=D/1024*(256+D*(-128+D*(74-47*D))),F=P*_*(M+P/4*(S*(-1+2*M*M)-P/6*M*(-3+4*_*_)*(-3+4*M*M))),V=r*(1-a)*E*(x-F),{azi1:Math.atan2(h*v,c*d-u*h*g),s12:V})}function Mje(n,e,t,i,r,a){const o=Math.atan((1-a)*Math.tan(n)),s=Math.sin(o),l=Math.cos(o),u=Math.sin(t),c=Math.cos(t),d=Math.atan2(s,l*c),h=l*u,f=1-h*h,p=f*(r*r-r*(1-a)*(r*(1-a)))/(r*(1-a)*(r*(1-a))),m=1+p/16384*(4096+p*(-768+p*(320-175*p))),v=p/1024*(256+p*(-128+p*(74-47*p)));let g=i/(r*(1-a)*m),_,S=100,x,A,C,M;do x=Math.cos(2*d+g),A=Math.sin(g),C=Math.cos(g),M=v*A*(x+v/4*(C*(-1+2*x*x)-v/6*x*(-3+4*A*A)*(-3+4*x*x))),_=g,g=i/(r*(1-a)*m)+M;while(Math.abs(g-_)>1e-12&&--S>0);if(S===0)return{lat2:NaN,lon2:NaN};const I=s*A-l*C*c,D=Math.atan2(s*C+l*A*c,(1-a)*Math.sqrt(h*h+I*I)),E=Math.atan2(A*u,l*C-s*A*c),P=a/16*f*(4+a*(4-3*f)),F=E-(1-P)*a*h*(g+P*A*(x+P*C*(-1+2*x*x))),V=e+F;return{lat2:D,lon2:V}}function Eje(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))}function Pje(n){var e=n.x,t=n.y,i=Math.sin(n.y),r=Math.cos(n.y),a=kn(e-this.long0,this.over),o,s,l,u,c,d,h,f,p,m,v;return this.sphere?Math.abs(this.sin_p12-1)<=Rn?(n.x=this.x0+this.a*(yn-t)*Math.sin(a),n.y=this.y0-this.a*(yn-t)*Math.cos(a),n):Math.abs(this.sin_p12+1)<=Rn?(n.x=this.x0+this.a*(yn+t)*Math.sin(a),n.y=this.y0+this.a*(yn+t)*Math.cos(a),n):(p=this.sin_p12*i+this.cos_p12*r*Math.cos(a),h=Math.acos(p),f=h?h/Math.sin(h):1,n.x=this.x0+this.a*f*r*Math.sin(a),n.y=this.y0+this.a*f*(this.cos_p12*i-this.sin_p12*r*Math.cos(a)),n):(o=U3(this.es),s=V3(this.es),l=H3(this.es),u=W3(this.es),Math.abs(this.sin_p12-1)<=Rn?(c=this.a*Ps(o,s,l,u,yn),d=this.a*Ps(o,s,l,u,t),n.x=this.x0+(c-d)*Math.sin(a),n.y=this.y0-(c-d)*Math.cos(a),n):Math.abs(this.sin_p12+1)<=Rn?(c=this.a*Ps(o,s,l,u,yn),d=this.a*Ps(o,s,l,u,t),n.x=this.x0+(c+d)*Math.sin(a),n.y=this.y0+(c+d)*Math.cos(a),n):Math.abs(e)2*yn*this.a?void 0:(t=e/this.a,i=Math.sin(t),r=Math.cos(t),a=this.long0,Math.abs(e)<=Rn?o=this.lat0:(o=Oh(r*this.sin_p12+n.y*i*this.cos_p12/e),s=Math.abs(this.lat0)-yn,Math.abs(s)<=Rn?this.lat0>=0?a=kn(this.long0+Math.atan2(n.x,-n.y),this.over):a=kn(this.long0-Math.atan2(-n.x,n.y),this.over):a=kn(this.long0+Math.atan2(n.x*i,e*this.cos_p12*r-n.y*this.sin_p12*i),this.over)),n.x=a,n.y=o,n)):(l=U3(this.es),u=V3(this.es),c=H3(this.es),d=W3(this.es),Math.abs(this.sin_p12-1)<=Rn?(h=this.a*Ps(l,u,c,d,yn),e=Math.sqrt(n.x*n.x+n.y*n.y),f=h-e,o=t_(f/this.a,l,u,c,d),a=kn(this.long0+Math.atan2(n.x,-1*n.y),this.over),n.x=a,n.y=o,n):Math.abs(this.sin_p12+1)<=Rn?(h=this.a*Ps(l,u,c,d,yn),e=Math.sqrt(n.x*n.x+n.y*n.y),f=e-h,o=t_(f/this.a,l,u,c,d),a=kn(this.long0+Math.atan2(n.x,n.y),this.over),n.x=a,n.y=o,n):(p=Math.atan2(n.x,n.y),m=Math.sqrt(n.x*n.x+n.y*n.y),v=Mje(this.lat0,this.long0,p,m,this.a,this.f),n.x=v.lon2,n.y=v.lat2,n))}var Lje=["Azimuthal_Equidistant","aeqd"];const Ije={init:Eje,forward:Pje,inverse:Rje,names:Lje};function Dje(){this.sin_p14=Math.sin(this.lat0||0),this.cos_p14=Math.cos(this.lat0||0)}function Nje(n){var e,t,i,r,a,o,s,l,u=n.x,c=n.y;return i=kn(u-(this.long0||0),this.over),e=Math.sin(c),t=Math.cos(c),r=Math.cos(i),o=this.sin_p14*e+this.cos_p14*t*r,a=1,(o>0||Math.abs(o)<=Rn)&&(s=this.a*a*t*Math.sin(i),l=(this.y0||0)+this.a*a*(this.cos_p14*e-this.sin_p14*t*r)),n.x=s,n.y=l,n}function kje(n){var e,t,i,r,a,o,s,l,u;return n.x-=this.x0||0,n.y-=this.y0||0,e=Math.sqrt(n.x*n.x+n.y*n.y),t=Oh(e/this.a),i=Math.sin(t),r=Math.cos(t),l=this.long0||0,u=this.lat0||0,o=l,Math.abs(e)<=Rn?(s=u,n.x=o,n.y=s,n):(s=Oh(r*this.sin_p14+n.y*i*this.cos_p14/e),a=Math.abs(u)-yn,Math.abs(a)<=Rn?(u>=0?o=kn(l+Math.atan2(n.x,-n.y),this.over):o=kn(l-Math.atan2(-n.x,n.y),this.over),n.x=o,n.y=s,n):(o=kn(l+Math.atan2(n.x*i,e*this.cos_p14*r-n.y*this.sin_p14*i),this.over),n.x=o,n.y=s,n))}var Fje=["ortho"];const Oje={init:Dje,forward:Nje,inverse:kje,names:Fje};var Ca={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Or={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Bje(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=yn-Fr/2?this.face=Ca.TOP:this.lat0<=-(yn-Fr/2)?this.face=Ca.BOTTOM:Math.abs(this.long0)<=Fr?this.face=Ca.FRONT:Math.abs(this.long0)<=yn+Fr?this.face=this.long0>0?Ca.RIGHT:Ca.LEFT:this.face=Ca.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function zje(n){var e={x:0,y:0},t,i,r,a,o,s,l={value:0};if(n.x-=this.long0,this.es!==0?t=Math.atan(this.one_minus_f_squared*Math.tan(n.y)):t=n.y,i=n.x,this.face===Ca.TOP)a=yn-t,i>=Fr&&i<=yn+Fr?(l.value=Or.AREA_0,r=i-yn):i>yn+Fr||i<=-(yn+Fr)?(l.value=Or.AREA_1,r=i>0?i-Wa:i+Wa):i>-(yn+Fr)&&i<=-Fr?(l.value=Or.AREA_2,r=i+yn):(l.value=Or.AREA_3,r=i);else if(this.face===Ca.BOTTOM)a=yn+t,i>=Fr&&i<=yn+Fr?(l.value=Or.AREA_0,r=-i+yn):i=-Fr?(l.value=Or.AREA_1,r=-i):i<-Fr&&i>=-(yn+Fr)?(l.value=Or.AREA_2,r=-i-yn):(l.value=Or.AREA_3,r=i>0?-i+Wa:-i-Wa);else{var u,c,d,h,f,p,m;this.face===Ca.RIGHT?i=iv(i,+yn):this.face===Ca.BACK?i=iv(i,+Wa):this.face===Ca.LEFT&&(i=iv(i,-yn)),h=Math.sin(t),f=Math.cos(t),p=Math.sin(i),m=Math.cos(i),u=f*m,c=f*p,d=h,this.face===Ca.FRONT?(a=Math.acos(u),r=U4(a,d,c,l)):this.face===Ca.RIGHT?(a=Math.acos(c),r=U4(a,d,-u,l)):this.face===Ca.BACK?(a=Math.acos(-u),r=U4(a,d,-c,l)):this.face===Ca.LEFT?(a=Math.acos(-c),r=U4(a,d,u,l)):(a=r=0,l.value=Or.AREA_0)}return s=Math.atan(12/Wa*(r+Math.acos(Math.sin(r)*Math.cos(Fr))-yn)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===Or.AREA_1?s+=yn:l.value===Or.AREA_2?s+=Wa:l.value===Or.AREA_3&&(s+=1.5*Wa),e.x=o*Math.cos(s),e.y=o*Math.sin(s),e.x=e.x*this.a+this.x0,e.y=e.y*this.a+this.y0,n.x=e.x,n.y=e.y,n}function Gje(n){var e={lam:0,phi:0},t,i,r,a,o,s,l,u,c,d={value:0};if(n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,i=Math.atan(Math.sqrt(n.x*n.x+n.y*n.y)),t=Math.atan2(n.y,n.x),n.x>=0&&n.x>=Math.abs(n.y)?d.value=Or.AREA_0:n.y>=0&&n.y>=Math.abs(n.x)?(d.value=Or.AREA_1,t-=yn):n.x<0&&-n.x>=Math.abs(n.y)?(d.value=Or.AREA_2,t=t<0?t+Wa:t-Wa):(d.value=Or.AREA_3,t+=yn),c=Wa/12*Math.tan(t),o=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),s=Math.atan(o),r=Math.cos(t),a=Math.tan(i),l=1-r*r*a*a*(1-Math.cos(Math.atan(1/Math.cos(s)))),l<-1?l=-1:l>1&&(l=1),this.face===Ca.TOP)u=Math.acos(l),e.phi=yn-u,d.value===Or.AREA_0?e.lam=s+yn:d.value===Or.AREA_1?e.lam=s<0?s+Wa:s-Wa:d.value===Or.AREA_2?e.lam=s-yn:e.lam=s;else if(this.face===Ca.BOTTOM)u=Math.acos(l),e.phi=u-yn,d.value===Or.AREA_0?e.lam=-s+yn:d.value===Or.AREA_1?e.lam=-s:d.value===Or.AREA_2?e.lam=-s-yn:e.lam=s<0?-s-Wa:-s+Wa;else{var h,f,p;h=l,c=h*h,c>=1?p=0:p=Math.sqrt(1-c)*Math.sin(s),c+=p*p,c>=1?f=0:f=Math.sqrt(1-c),d.value===Or.AREA_1?(c=f,f=-p,p=c):d.value===Or.AREA_2?(f=-f,p=-p):d.value===Or.AREA_3&&(c=f,f=p,p=-c),this.face===Ca.RIGHT?(c=h,h=-f,f=c):this.face===Ca.BACK?(h=-h,f=-f):this.face===Ca.LEFT&&(c=h,h=f,f=-c),e.phi=Math.acos(-p)-yn,e.lam=Math.atan2(f,h),this.face===Ca.RIGHT?e.lam=iv(e.lam,-yn):this.face===Ca.BACK?e.lam=iv(e.lam,-Wa):this.face===Ca.LEFT&&(e.lam=iv(e.lam,+yn))}if(this.es!==0){var m,v,g;m=e.phi<0?1:0,v=Math.tan(e.phi),g=this.b/Math.sqrt(v*v+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-g*g)/(this.one_minus_f*g)),m&&(e.phi=-e.phi)}return e.lam+=this.long0,n.x=e.lam,n.y=e.phi,n}function U4(n,e,t,i){var r;return nFr&&r<=yn+Fr?(i.value=Or.AREA_1,r-=yn):r>yn+Fr||r<=-(yn+Fr)?(i.value=Or.AREA_2,r=r>=0?r-Wa:r+Wa):(i.value=Or.AREA_3,r+=yn)),r}function iv(n,e){var t=n+e;return t<-Wa?t+=c3:t>+Wa&&(t-=c3),t}var Uje=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const Vje={init:Bje,forward:zje,inverse:Gje,names:Uje};var _M=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],kg=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Cte=.8487,Mte=1.3523,Ete=Zs/5,Hje=1/Ete,U2=18,n_=function(n,e){return n[0]+e*(n[1]+e*(n[2]+e*n[3]))},Wje=function(n,e){return n[1]+e*(2*n[2]+e*3*n[3])};function jje(n,e,t,i){for(var r=e;i;--i){var a=n(r);if(r-=a,Math.abs(a)=U2&&(i=U2-1),t=Zs*(t-Hje*i);var r={x:n_(_M[i],t)*e,y:n_(kg[i],t)};return n.y<0&&(r.y=-r.y),r.x=r.x*this.a*Cte+this.x0,r.y=r.y*this.a*Mte+this.y0,r}function Xje(n){var e={x:(n.x-this.x0)/(this.a*Cte),y:Math.abs(n.y-this.y0)/(this.a*Mte)};if(e.y>=1)e.x/=_M[U2][0],e.y=n.y<0?-yn:yn;else{var t=Math.floor(e.y*U2);for(t<0?t=0:t>=U2&&(t=U2-1);;)if(kg[t][0]>e.y)--t;else if(kg[t+1][0]<=e.y)++t;else break;var i=kg[t],r=5*(e.y-i[0])/(kg[t+1][0]-i[0]);r=jje(function(a){return(n_(i,a)-e.y)/Wje(i,a)},r,Rn,100),e.x/=n_(_M[t],r),e.y=(5*t+r)*Da,n.y<0&&(e.y=-e.y)}return e.x=kn(e.x+this.long0,this.over),e}var Yje=["Robinson","robin"];const Kje={init:$je,forward:qje,inverse:Xje,names:Yje};function Zje(){this.name="geocent"}function Jje(n){var e=hte(n,this.es,this.a);return e}function Qje(n){var e=fte(n,this.es,this.a,this.b);return e}var e$e=["Geocentric","geocentric","geocent","Geocent"];const t$e={init:Zje,forward:Jje,inverse:Qje,names:e$e};var as={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},pg={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function n$e(){if(Object.keys(pg).forEach(function(t){if(typeof this[t]=="undefined")this[t]=pg[t].def;else{if(pg[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);pg[t].num&&(this[t]=parseFloat(this[t]))}pg[t].degrees&&(this[t]=this[t]*Da)}.bind(this)),Math.abs(Math.abs(this.lat0)-yn)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var n=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(n),this.sw=Math.sin(n)}function i$e(n){n.x-=this.long0;var e=Math.sin(n.y),t=Math.cos(n.y),i=Math.cos(n.x),r,a;switch(this.mode){case as.OBLIQ:a=this.sinph0*e+this.cosph0*t*i;break;case as.EQUIT:a=t*i;break;case as.S_POLE:a=-e;break;case as.N_POLE:a=e;break}switch(a=this.pn1/(this.p-a),r=a*t*Math.sin(n.x),this.mode){case as.OBLIQ:a*=this.cosph0*e-this.sinph0*t*i;break;case as.EQUIT:a*=e;break;case as.N_POLE:a*=-(t*i);break;case as.S_POLE:a*=t*i;break}var o,s;return o=a*this.cg+r*this.sg,s=1/(o*this.sw*this.h1+this.cw),r=(r*this.cg-a*this.sg)*this.cw*s,a=o*s,n.x=r*this.a,n.y=a*this.a,n}function r$e(n){n.x/=this.a,n.y/=this.a;var e={x:n.x,y:n.y},t,i,r;r=1/(this.pn1-n.y*this.sw),t=this.pn1*n.x*r,i=this.pn1*n.y*this.cw*r,n.x=t*this.cg+i*this.sg,n.y=i*this.cg-t*this.sg;var a=Ys(n.x,n.y);if(Math.abs(a)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var n=1-this.es,e=1/n;this.radius_p=Math.sqrt(n),this.radius_p2=n,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function l$e(n){var e=n.x,t=n.y,i,r,a,o;if(e=e-this.long0,this.shape==="ellipse"){t=Math.atan(this.radius_p2*Math.tan(t));var s=this.radius_p/Ys(this.radius_p*Math.cos(t),Math.sin(t));if(r=s*Math.cos(e)*Math.cos(t),a=s*Math.sin(e)*Math.cos(t),o=s*Math.sin(t),(this.radius_g-r)*r-a*a-o*o*this.radius_p_inv2<0)return n.x=Number.NaN,n.y=Number.NaN,n;i=this.radius_g-r,this.flip_axis?(n.x=this.radius_g_1*Math.atan(a/Ys(o,i)),n.y=this.radius_g_1*Math.atan(o/i)):(n.x=this.radius_g_1*Math.atan(a/i),n.y=this.radius_g_1*Math.atan(o/Ys(a,i)))}else this.shape==="sphere"&&(i=Math.cos(t),r=Math.cos(e)*i,a=Math.sin(e)*i,o=Math.sin(t),i=this.radius_g-r,this.flip_axis?(n.x=this.radius_g_1*Math.atan(a/Ys(o,i)),n.y=this.radius_g_1*Math.atan(o/i)):(n.x=this.radius_g_1*Math.atan(a/i),n.y=this.radius_g_1*Math.atan(o/Ys(a,i))));return n.x=n.x*this.a,n.y=n.y*this.a,n}function u$e(n){var e=-1,t=0,i=0,r,a,o,s;if(n.x=n.x/this.a,n.y=n.y/this.a,this.shape==="ellipse"){this.flip_axis?(i=Math.tan(n.y/this.radius_g_1),t=Math.tan(n.x/this.radius_g_1)*Ys(1,i)):(t=Math.tan(n.x/this.radius_g_1),i=Math.tan(n.y/this.radius_g_1)*Ys(1,t));var l=i/this.radius_p;if(r=t*t+l*l+e*e,a=2*this.radius_g*e,o=a*a-4*r*this.C,o<0)return n.x=Number.NaN,n.y=Number.NaN,n;s=(-a-Math.sqrt(o))/(2*r),e=this.radius_g+s*e,t*=s,i*=s,n.x=Math.atan2(t,e),n.y=Math.atan(i*Math.cos(n.x)/e),n.y=Math.atan(this.radius_p_inv2*Math.tan(n.y))}else if(this.shape==="sphere"){if(this.flip_axis?(i=Math.tan(n.y/this.radius_g_1),t=Math.tan(n.x/this.radius_g_1)*Math.sqrt(1+i*i)):(t=Math.tan(n.x/this.radius_g_1),i=Math.tan(n.y/this.radius_g_1)*Math.sqrt(1+t*t)),r=t*t+i*i+e*e,a=2*this.radius_g*e,o=a*a-4*r*this.C,o<0)return n.x=Number.NaN,n.y=Number.NaN,n;s=(-a-Math.sqrt(o))/(2*r),e=this.radius_g+s*e,t*=s,i*=s,n.x=Math.atan2(t,e),n.y=Math.atan(i*Math.cos(n.x)/e)}return n.x=n.x+this.long0,n}var c$e=["Geostationary Satellite View","Geostationary_Satellite","geos"];const d$e={init:s$e,forward:l$e,inverse:u$e,names:c$e};var u9=1.340264,c9=-.081106,d9=893e-6,h9=.003796,i_=Math.sqrt(3)/2;function h$e(){this.long0=this.long0!==void 0?this.long0:0,this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.es!==0&&(this.apa=xte(this.es),this.qp=qu(this.e,1),this.rqda=Math.sqrt(.5*this.qp))}function f$e(n){var e=kn(n.x-this.long0,this.over),t=n.y,i=Math.sin(t);this.es!==0&&(i=qu(this.e,i)/this.qp);var r=Math.asin(i_*i),a=r*r,o=a*a*a;return n.x=e*Math.cos(r)/(i_*(u9+3*c9*a+o*(7*d9+9*h9*a))),n.y=r*(u9+c9*a+o*(d9+h9*a)),this.es!==0&&(n.x*=this.rqda,n.y*=this.rqda),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function p$e(n){n.x=(n.x-this.x0)/this.a,n.y=(n.y-this.y0)/this.a,this.es!==0&&(n.x/=this.rqda,n.y/=this.rqda);var e=1e-9,t=12,i=n.y,r,a,o,s,l,u;for(u=0;u=yn?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=b$e,this.forward=S$e)}function y$e(n){var e=kn(n.x-(this.long0||0),this.over),t=n.y,i,r,a;return i=this.am1+this.m1-om(t,r=Math.sin(t),a=Math.cos(t),this.en),r=a*e/(i*Math.sqrt(1-this.es*r*r)),n.x=i*Math.sin(r),n.y=this.am1-i*Math.cos(r),n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function _$e(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var e,t,i,r;if(t=Ys(n.x,n.y=this.am1-n.y),r=qR(this.am1+this.m1-t,this.es,this.en),(e=Math.abs(r))f3?(n.x=r*Math.sin(i=e*Math.cos(t)/r),n.y=this.cphi1-r*Math.cos(i)):n.x=n.y=0,n.x=this.a*n.x+(this.x0||0),n.y=this.a*n.y+(this.y0||0),n}function b$e(n){n.x=(n.x-(this.x0||0))/this.a,n.y=(n.y-(this.y0||0))/this.a;var e,t,i=Ys(n.x,n.y=this.cphi1-n.y);if(t=this.cphi1+this.phi1-i,Math.abs(t)>yn)throw new Error;return Math.abs(Math.abs(t)-yn)<=f3?e=0:e=i*Math.atan2(n.x,n.y)/Math.cos(t),n.x=kn(e+(this.long0||0),this.over),n.y=Hh(t),n}var x$e=["bonne","Bonne (Werner lat_1=90)"];const w$e={init:g$e,names:x$e},BW={OBLIQUE:{forward:E$e,inverse:R$e},TRANSVERSE:{forward:P$e,inverse:L$e}},r_={ROTATE:{o_alpha:"oAlpha",o_lon_c:"oLongC",o_lat_c:"oLatC"},NEW_POLE:{o_lat_p:"oLatP",o_lon_p:"oLongP"},NEW_EQUATOR:{o_lon_1:"oLong1",o_lat_1:"oLat1",o_lon_2:"oLong2",o_lat_2:"oLat2"}};function T$e(){if(this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.title=this.title||"General Oblique Transformation",this.isIdentity=lte.includes(this.o_proj),!this.o_proj)throw new Error("Missing parameter: o_proj");if(this.o_proj==="ob_tran")throw new Error("Invalid value for o_proj: "+this.o_proj);const n=this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim(),e=C0(n);if(!e)throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj);e.long0=0,this.obliqueProjection=e;let t;const i=Object.keys(r_),r=s=>{if(typeof this[s]=="undefined")return;const l=parseFloat(this[s])*Da;if(isNaN(l))throw new Error("Invalid value for "+s+": "+this[s]);return l};for(let s=0;stypeof this[h]!="undefined")){t=u;for(let h=0;hRn?(this.cphip=Math.cos(o),this.sphip=Math.sin(o),this.projectionType=BW.OBLIQUE):this.projectionType=BW.TRANSVERSE}function A$e(n){return this.projectionType.forward(this,n)}function C$e(n){return this.projectionType.inverse(this,n)}function M$e(n,e){let t,i;if(e===r_.ROTATE){let r=n.oLongC,a=n.oLatC,o=n.oAlpha;if(Math.abs(Math.abs(a)-yn)<=Rn)throw new Error("Invalid value for o_lat_c: "+n.o_lat_c+" should be < 90°");i=r+Math.atan2(-1*Math.cos(o),-1*Math.sin(o)*Math.sin(a)),t=Math.asin(Math.cos(a)*Math.sin(o))}else if(e===r_.NEW_POLE)i=n.oLongP,t=n.oLatP;else{let r=n.oLong1,a=n.oLat1,o=n.oLong2,s=n.oLat2,l=Math.abs(a);if(Math.abs(a)>yn-Rn)throw new Error("Invalid value for o_lat_1: "+n.o_lat_1+" should be < 90°");if(Math.abs(s)>yn-Rn)throw new Error("Invalid value for o_lat_2: "+n.o_lat_2+" should be < 90°");if(Math.abs(a-s)new DecompressionStream("deflate-raw"),e=t=>new Response(t);n(),Pte=t=>e(e(t).body.pipeThrough(n())).arrayBuffer().then(i=>new Uint8Array(i))}catch(n){}var Pte,zW=new TextDecoder,AT=n=>{throw Error("but-unzip~"+n)};function*k$e(n,e=Pte){let t=n.length-21,i=t-65536,r=new DataView(n.buffer,n.byteOffset),a=l=>r.getUint16(l+t,1),o=l=>r.getUint32(l+t,1),s=(l,u)=>n.subarray(t+=l,t+=u);for(;t>i&&(t=n.lastIndexOf(80,t-1))+1&&(n[t+1]-75||n[t+2]-5||n[t+3]-6););for(t<0&&AT(2),i=a(10),i-a(8)&&AT(3),t=o(16);i--;){let l=a(10),u=a(28),c=a(30),d=a(32),h=o(20),f=o(42),p=zW.decode(s(46,u)),m=zW.decode(s(c,d)),v=t,g;t=f,g=s(30+a(26)+a(28),h),yield{filename:p,comment:m,read:()=>l-8?l?AT(1):g:e(g)},t=v}}const F$e=/.+\.(shp|dbf|json|prj|cpg)$/i,O$e=n=>rn(void 0,null,function*(){const e={},t=[];for(const a of k$e(n))F$e.test(a.filename)&&t.push(Promise.resolve(a.read()).then(o=>e[a.filename]=o));yield Promise.all(t);const i={},r=new TextDecoder;for(const[a,o]of Object.entries(e))a.slice(-3).toLowerCase()==="shp"||a.slice(-3).toLowerCase()==="dbf"?i[a]=new DataView(o.buffer,o.byteOffset,o.byteLength):i[a]=r.decode(o);return i}),B$e=globalThis.URL,z$e=(n,e)=>{if(!e)return n;const t=new B$e(n);return t.pathname=`${t.pathname}.${e}`,t.href};function p3(n,e){return rn(this,null,function*(){const t=z$e(n,e),i=e==="prj"||e==="cpg";try{const r=yield fetch(t);if(r.status>399)throw new Error(r.statusText);if(i)return r.text();const a=yield r.arrayBuffer();return new DataView(a)}catch(r){if(i||e==="dbf")return!1;throw r}})}function G$e(n){let e=0,t=1;const i=n.length;let r,a;const o=[n[0][0],n[0][1],n[0][0],n[0][1]];for(;to[2]&&(o[2]=a[0]),a[1]>o[3]&&(o[3]=a[1]);return{ring:n,clockWise:e>0,bbox:o,children:[]}}function GW(n,e){return!(n.bbox[0]>e.bbox[0]||n.bbox[1]>e.bbox[1]||n.bbox[2]u.toReversed())));return s}}const a=[];for(const o of t)a.push([o.ring].concat(o.children));return a}Ka.prototype.parsePoint=function(n){return{type:"Point",coordinates:this.parseCoord(n,0)}};Ka.prototype.parseZPoint=function(n){const e=this.parsePoint(n);return e.coordinates.push(n.getFloat64(16,!0)),e};Ka.prototype.parsePointArray=function(n,e,t){const i=[];let r=0;for(;r20&&(e-=20),!(e in UW))throw new Error(`I don't know shp type "${e}"`);this.parseFunc=this[UW[e]],this.parseCoord=U$e(n)};Ka.prototype.getShpCode=function(){return this.parseHeader().shpCode};Ka.prototype.parseHeader=function(){const n=this.buffer;return{length:n.getInt32(24)<<1,version:n.getInt32(28,!0),shpCode:n.getInt32(32,!0),bbox:[n.getFloat64(36,!0),n.getFloat64(44,!0),n.getFloat64(52,!0),n.getFloat64(60,!0)]}};Ka.prototype.getRows=function(){let n=100;const e=this.buffer.byteLength-8,t=[];let i;for(;n<=e&&(i=this.getRow(n),!!i);)n+=8,n+=i.len,i.type?t.push(this.parseFunc(i.data)):t.push(null);return t};Ka.prototype.getRow=function(n){const e=this.buffer.getInt32(n),t=this.buffer.getInt32(n+4)<<1;if(t===0)return{id:e,len:t,type:0};if(!(n+t+8>this.buffer.byteLength))return{id:e,len:t,data:new DataView(this.buffer.buffer,this.buffer.byteOffset+n+12,t-4),type:this.buffer.getInt32(n+8,!0)}};function QR(n,e){return new Ka(n,e).rows}var V$e=/^(?:ANSI\s)?(\d+)$/m;function Lte(n,e){if(!n)return i;try{new TextDecoder(n.trim())}catch(r){var t=V$e.exec(n);return t&&!e?Lte("windows-"+t[1],!0):(n=void 0,i)}return i;function i(r){var a=new TextDecoder(n||void 0),o=a.decode(r,{stream:!0})+a.decode();return o.replace(/\0/g,"").trim()}}function H$e(n){var e={};return e.lastUpdated=new Date(n.getUint8(1)+1900,n.getUint8(2),n.getUint8(3)),e.records=n.getUint32(4,!0),e.headerLen=n.getUint16(8,!0),e.recLen=n.getUint16(10,!0),e}function W$e(n,e,t){for(var i=[],r=32;r{if(!n)throw new Error("forgot to pass buffer");if(kv(n))return new Uint8Array(n);if(kv(n.buffer))return n.BYTES_PER_ELEMENT===1?n:new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error("invalid buffer like object")},Y$e=new TextDecoder,Ite=n=>{if(n){if(typeof n=="string")return n;if(kv(n)||ArrayBuffer.isView(n)||tL(n))return Y$e.decode(n)}},Dte=n=>{if(!n)throw new Error("forgot to pass buffer");if(tL(n))return n;if(kv(n))return new DataView(n);if(kv(n.buffer))return new DataView(n.buffer,n.byteOffset,n.byteLength);throw new Error("invalid buffer like object")};function kv(n){return n instanceof globalThis.ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]"}function tL(n){return n instanceof globalThis.DataView||Object.prototype.toString.call(n)==="[object DataView]"}const nL=function([n,e]){const t={};t.type="FeatureCollection",t.features=[];let i=0;const r=n.length;for(e||(e=[]);i-1?r.push(t.slice(0,-3)+t.slice(-3).toLowerCase()):(t.slice(-4).toLowerCase()===".dbf"||t.slice(-4).toLowerCase()===".cpg")&&(i[t.slice(0,-3)+t.slice(-3).toLowerCase()]=i[t]));if(!r.length)throw new Error("no layers founds");const a=r.map(function(o){let s,l;const u=o.lastIndexOf(".");return u>-1&&o.slice(u).indexOf("json")>-1?(s=JSON.parse(i[o]),s.fileName=o.slice(0,u)):e.indexOf(o.slice(u+1))>-1?(s=i[o],s.fileName=o):(i[o+".dbf"]&&(l=eL(i[o+".dbf"],i[o+".cpg"])),s=nL([QR(i[o+".shp"],i[o+".prj"]),l]),s.fileName=o),s});return a.length===1?a[0]:a})};function K$e(n,e){return rn(this,null,function*(){const t=yield p3(n);return Nte(t,e)})}const Z$e=n=>rn(void 0,null,function*(){const e=yield Promise.all([p3(n,"shp"),p3(n,"prj")]);let t=!1;try{e[1]&&(t=S7(e[1]))}catch(i){t=!1}return QR(e[0],t)}),J$e=n=>rn(void 0,null,function*(){const[e,t]=yield Promise.all([p3(n,"dbf"),p3(n,"cpg")]);if(e)return eL(e,t)}),VW=(n,e)=>{var i;return new q$e(n,(i=globalThis==null?void 0:globalThis.document)==null?void 0:i.location).pathname.slice(-4).toLowerCase()===e},Q$e=({shp:n,dbf:e,cpg:t,prj:i})=>{const r=[tqe(n,i)];return e&&r.push(nqe(e,t)),nL(r)},eqe=function(n,e){return rn(this,null,function*(){if(typeof n!="string"){if(kv(n)||ArrayBuffer.isView(n)||tL(n))return Nte(n);if(n.shp)return Q$e(n);throw new TypeError("must be a string, some sort of Buffer, or an object with at least a .shp property")}if(VW(n,".zip"))return K$e(n,e);VW(n,".shp")&&(n=n.slice(0,-4));const t=yield Promise.all([Z$e(n),J$e(n)]);return nL(t)})},tqe=function(n,e){if(n=Dte(n),e=Ite(e),typeof e=="string")try{e=S7(e)}catch(t){e=!1}return QR(n,e)},nqe=function(n,e){return n=Dte(n),e=Ite(e),eL(n,e)};const iqe={class:"engineering-analysis-panel"},rqe={class:"analysis-card analysis-workbench"},aqe={class:"analysis-card-head"},oqe={key:0},sqe=["disabled"],lqe=["disabled"],uqe={key:1,class:"analysis-drawing-stage"},cqe={class:"analysis-point-count"},dqe=["disabled"],hqe=["disabled"],fqe={key:2,class:"analysis-boundary-bar"},pqe={class:"analysis-card analysis-result"},vqe={class:"analysis-card-head"},mqe={key:0},gqe={key:0,class:"analysis-empty"},yqe={class:"analysis-conclusion-head"},_qe={class:"analysis-conclusion-tags"},Sqe={key:0,class:"analysis-empty is-success"},bqe={key:1,class:"analysis-project-list"},xqe=["onPointerup"],wqe={class:"analysis-project-name"},Tqe={class:"analysis-project-meta"},Aqe={__name:"EngineeringAnalysisPanel",props:{drawingPointCount:{type:Number,default:0}},emits:["drawing-change","finish-drawing","undo-point","clear-boundary","analysis-result","focus-project"],setup(n,{expose:e,emit:t}){const i=n,r=t,a=Wt(!1),o=Wt(null),s=Wt([]),l=Wt([]),u=Wt(""),c=Wt("idle"),d=Wt([]);let h=null;const f=Ye(()=>{var mt;const Ce=l.value.length,We=s.value.length,$e=s.value.reduce((Yt,st)=>Yt+Number(st.overlapAreaWanMu||0),0);return{boundaryAreaWanMu:Ft((mt=o.value)==null?void 0:mt.geometry),featureCount:Ce,projectCount:We,overlapAreaWanMu:$e}}),p=Ye(()=>u.value?u.value:c.value==="loading"?"项目库加载中":c.value==="error"?"项目库加载失败":""),m=Ye(()=>o.value?s.value.length?"已发现建设记录":"未发现建设记录":"未分析"),v=Ye(()=>a.value&&i.drawingPointCount>=3),g=Ye(()=>{if(!o.value)return{levelClass:"",verdict:"",summary:"",tags:[],advice:""};if(!s.value.length)return{levelClass:"is-clear",verdict:"未发现建设记录",summary:"该边界范围暂未与项目库中的已建设工程形成空间叠加。",tags:[`分析范围 ${J(f.value.boundaryAreaWanMu)} 万亩`,"项目库未命中"],advice:"可进入新增工程选址论证,仍需结合保护红线、审批台账和现场踏勘复核。"};const Ce=Ue(s.value),We=xt(s.value),$e=[...s.value].sort((st,it)=>Number(it.overlapAreaWanMu||0)-Number(st.overlapAreaWanMu||0))[0],mt=ee(f.value.overlapAreaWanMu),Yt=s.value.length>=6||f.value.overlapAreaWanMu>=1?"存在建设叠加":"存在局部叠加";return{levelClass:s.value.length>=6?"is-heavy":"is-hit",verdict:Yt,summary:`该边界命中 ${s.value.length} 个历史项目,叠加约 ${mt} 亩,项目类型以${Ce.name}为主,年份集中在 ${We}。`,tags:[`主类型 ${Ce.name}`,`年份 ${We}`,`最大叠加 ${ee($e==null?void 0:$e.overlapAreaWanMu)} 亩`],advice:`重点复核“${Bt($e==null?void 0:$e.projectName)}”(${($e==null?void 0:$e.year)||"未知"},${($e==null?void 0:$e.category)||"未知类型"})与拟建范围的重合边界。`}});dl(()=>{F().catch(()=>{})});function _(Ce){return rn(this,null,function*(){var $e;const We=($e=Ce.target.files)==null?void 0:$e[0];if(Ce.target.value="",!!We){u.value="";try{const mt=yield S(We);a.value&&(a.value=!1,r("drawing-change",!1)),r("clear-boundary"),yield P(mt)}catch(mt){u.value="边界文件解析失败"}}})}function S(Ce){return rn(this,null,function*(){const We=String(Ce.name||"").toLowerCase();if(We.endsWith(".json")||We.endsWith(".geojson"))return x(JSON.parse(yield Ce.text()));if(We.endsWith(".zip")){const $e=yield eqe(yield Ce.arrayBuffer());return x($e)}throw new Error("unsupported file")})}function x(Ce){const We=G(Ce).filter($e=>xe($e==null?void 0:$e.geometry));if(We.length)return W(We);throw new Error("no polygon")}function A(){a.value||(u.value="",a.value=!0,o.value=null,s.value=[],l.value=[],r("analysis-result",{boundary:null,matches:[],rows:[],summary:f.value}),r("drawing-change",!0))}function C(){a.value&&(a.value=!1,r("clear-boundary"),r("analysis-result",{boundary:null,matches:[],rows:[],summary:f.value}))}function M(){v.value&&r("finish-drawing")}function I(){r("undo-point")}function D(){a.value=!1,o.value=null,s.value=[],l.value=[],u.value="",r("clear-boundary"),r("analysis-result",{boundary:null,matches:[],rows:[],summary:f.value})}function E(Ce){Ce!=null&&Ce.geometry&&(a.value=!1,P(Ce))}function P(Ce){return rn(this,null,function*(){o.value=Ce,l.value=[],s.value=[];let We=[];try{const $e=yield F();We=Y(Ce,$e),l.value=We,s.value=Q(We)}catch($e){u.value="项目库加载失败"}r("analysis-result",{boundary:Ce,matches:We,rows:s.value,summary:f.value})})}function F(){return rn(this,null,function*(){return d.value.length?d.value:h||(c.value="loading",h=fetch(V("datas/ecological-protection/ecological_restoration_projects.geojson"),{credentials:"include"}).then(We=>{if(!We.ok)throw new Error(`HTTP ${We.status}`);return We.json()}).then(We=>{const $e=G(We).filter(mt=>{var Yt;return(Yt=mt==null?void 0:mt.geometry)==null?void 0:Yt.coordinates}).map((mt,Yt)=>tn(wt({},mt),{properties:tn(wt({},mt.properties||{}),{source_index:Yt})}));return d.value=$e,c.value="success",$e}).catch(We=>{throw c.value="error",h=null,We}),h)})}function V(Ce){return Ce?/^https?:\/\//.test(Ce)||Ce.startsWith("/")?Ce:`./${Ce}`:""}function G(Ce){return Ce?Array.isArray(Ce)?Ce.flatMap(We=>G(We)):Ce.type==="FeatureCollection"?(Ce.features||[]).filter(Boolean):Ce.type==="Feature"?Ce.geometry?[Ce]:[]:Fe(Ce)?[{type:"Feature",properties:{},geometry:Ce}]:typeof Ce=="object"?Object.values(Ce).flatMap(We=>G(We)):[]:[]}function W(Ce){const We=Ce.flatMap($e=>$e.geometry.type==="Polygon"?[$e.geometry.coordinates]:$e.geometry.coordinates);return We.length===1?{type:"Feature",properties:Ce[0].properties||{},geometry:{type:"Polygon",coordinates:We[0]}}:{type:"Feature",properties:{sourceFeatureCount:Ce.length},geometry:{type:"MultiPolygon",coordinates:We}}}function Y(Ce,We=d.value){const $e=Ae(Ce.geometry);return We.filter(mt=>K(mt.geometry,Ce.geometry,$e)).map(mt=>({feature:mt,properties:mt.properties||{},overlapAreaWanMu:Ee(mt,Ce.geometry)}))}function Q(Ce){const We=new Map;return Ce.forEach($e=>{const mt=$e.properties||{},Yt=mt.project_name||mt.projectName||"未命名项目",st=We.get(Yt)||{key:Yt,projectName:Yt,category:mt.project_category||"未知类型",year:mt.year||"未知",featureCount:0,overlapAreaWanMu:0,features:[],sourceIndex:Number(mt.source_index||0)};st.featureCount+=1,st.overlapAreaWanMu+=Number($e.overlapAreaWanMu||0),st.features.push($e.feature),We.set(Yt,st)}),[...We.values()].map($e=>tn(wt({},$e),{overlapAreaWanMu:Number($e.overlapAreaWanMu.toFixed(4))}))}function K(Ce,We,$e){if(!Lt(Ae(Ce),$e))return!1;const mt=He(We);return mt.length?xe(Ce)?ae(Ce,mt):(Ce==null?void 0:Ce.type)==="Point"?pt(Ce.coordinates,mt):(Ce==null?void 0:Ce.type)==="MultiPoint"?Ce.coordinates.some(Yt=>pt(Yt,mt)):(Ce==null?void 0:Ce.type)==="LineString"?ie(Ce.coordinates,mt):(Ce==null?void 0:Ce.type)==="MultiLineString"?Ce.coordinates.some(Yt=>ie(Yt,mt)):!1:!1}function ae(Ce,We){const $e=He(Ce);return $e.length?$e.some(mt=>mt.some(Yt=>pt(Yt,We)))||We.some(mt=>mt.some(Yt=>pt(Yt,$e)))||$e.some(mt=>We.some(Yt=>bt(mt,Yt))):!1}function ie(Ce=[],We){return!Array.isArray(Ce)||!Ce.length?!1:Ce.some($e=>pt($e,We))?!0:We.some($e=>he(Ce,$e))}function he(Ce,We){for(let $e=1;$ecn+an.filter(Ln=>pt(Ln,Yt)).length,0),Zt=mt.reduce((cn,an)=>cn+an.length,0);return Vt?Number((st*Math.max(.08,Math.min(1,Vt/Math.max(Zt,1)))).toFixed(4)):Yt.reduce((cn,an)=>cn+an.filter(Ln=>pt(Ln,mt)).length,0)?Number(Math.min(st,it).toFixed(4)):mt.some(cn=>Yt.some(an=>bt(cn,an)))?Number((Math.min(st,it)*.12).toFixed(4)):0}function He(Ce){var We;return(Ce==null?void 0:Ce.type)==="Polygon"?[((We=Ce.coordinates)==null?void 0:We[0])||[]]:(Ce==null?void 0:Ce.type)==="MultiPolygon"?Ce.coordinates.map($e=>($e==null?void 0:$e[0])||[]).filter($e=>$e.length):[]}function xe(Ce){return(Ce==null?void 0:Ce.type)==="Polygon"||(Ce==null?void 0:Ce.type)==="MultiPolygon"}function Fe(Ce){return["Polygon","MultiPolygon","LineString","MultiLineString","Point","MultiPoint"].includes(Ce==null?void 0:Ce.type)}function pt(Ce,We){return We.some($e=>Ot(Ce,$e))}function Ot(Ce,We){var st,it,Vt,Zt;let $e=!1;const mt=Number(Ce==null?void 0:Ce[0]),Yt=Number(Ce==null?void 0:Ce[1]);for(let nn=0,cn=We.length-1;nnYt!=Ht>Yt&&mt<(je-an)*(Yt-Ln)/(Ht-Ln)+an&&($e=!$e)}return $e}function bt(Ce,We){for(let $e=1;$e(Number(cn[0])-Number(nn[0]))*(Number(an[1])-Number(nn[1]))-(Number(cn[1])-Number(nn[1]))*(Number(an[0])-Number(nn[0])),st=Yt(Ce,We,$e),it=Yt(Ce,We,mt),Vt=Yt($e,mt,Ce),Zt=Yt($e,mt,We);return st===0&&Tt($e,Ce,We)||it===0&&Tt(mt,Ce,We)||Vt===0&&Tt(Ce,$e,mt)||Zt===0&&Tt(We,$e,mt)?!0:(st>0&&it<0||st<0&&it>0)&&(Vt>0&&Zt<0||Vt<0&&Zt>0)}function Kt(Ce,We,$e,mt){const Yt=Ct([Ce,We]),st=Ct([$e,mt]);return Lt(Yt,st)}function Tt(Ce,We,$e){const mt=Number(Ce==null?void 0:Ce[0]),Yt=Number(Ce==null?void 0:Ce[1]),st=Number(We==null?void 0:We[0]),it=Number(We==null?void 0:We[1]),Vt=Number($e==null?void 0:$e[0]),Zt=Number($e==null?void 0:$e[1]),nn=(mt-st)*(Zt-it)-(Yt-it)*(Vt-st);return Math.abs(nn)>1e-10?!1:mt>=Math.min(st,Vt)-1e-10&&mt<=Math.max(st,Vt)+1e-10&&Yt>=Math.min(it,Zt)-1e-10&&Yt<=Math.max(it,Zt)+1e-10}function Ae(Ce){const We=[];return _t(Ce==null?void 0:Ce.coordinates,We),We.length?We.reduce(($e,mt)=>({minLng:Math.min($e.minLng,Number(mt[0])),minLat:Math.min($e.minLat,Number(mt[1])),maxLng:Math.max($e.maxLng,Number(mt[0])),maxLat:Math.max($e.maxLat,Number(mt[1]))}),{minLng:Number.POSITIVE_INFINITY,minLat:Number.POSITIVE_INFINITY,maxLng:Number.NEGATIVE_INFINITY,maxLat:Number.NEGATIVE_INFINITY}):null}function Lt(Ce,We){return!Ce||!We?!1:!(Ce.maxLngWe.maxLng||Ce.maxLatWe.maxLat)}function vt(Ce){return Ft(Ce==null?void 0:Ce.geometry)}function Ft(Ce){return(Ce==null?void 0:Ce.type)==="Polygon"?k(Ce.coordinates):(Ce==null?void 0:Ce.type)==="MultiPolygon"?Ce.coordinates.reduce((We,$e)=>We+k($e),0):0}function k(Ce=[]){const We=Ce[0]||[];if(We.length<3)return 0;const $e=We.reduce((it,Vt)=>it+Number(Vt[1]||0),0)/We.length,mt=111320*Math.cos($e*Math.PI/180),Yt=110540;let st=0;for(let it=0;it_t($e,We))}}function Ct(Ce){return Ce.reduce((We,$e)=>({minLng:Math.min(We.minLng,Number($e==null?void 0:$e[0])),minLat:Math.min(We.minLat,Number($e==null?void 0:$e[1])),maxLng:Math.max(We.maxLng,Number($e==null?void 0:$e[0])),maxLat:Math.max(We.maxLat,Number($e==null?void 0:$e[1]))}),{minLng:Number.POSITIVE_INFINITY,minLat:Number.POSITIVE_INFINITY,maxLng:Number.NEGATIVE_INFINITY,maxLat:Number.NEGATIVE_INFINITY})}function J(Ce){const We=Number(Ce||0);return Number.isFinite(We)?Number(We.toFixed(We>=10?2:4)).toString():"0"}function ee(Ce){const We=Number(Ce||0)*1e4;return Number.isFinite(We)?We>=1e3?Number(We.toFixed(0)).toLocaleString("zh-CN"):We>=10?Number(We.toFixed(1)).toLocaleString("zh-CN"):Number(We.toFixed(2)).toString():"0"}function Ue(Ce=[]){const We=new Map;return Ce.forEach($e=>{const mt=$e.category||"未知类型",Yt=We.get(mt)||{name:mt,count:0,area:0};Yt.count+=1,Yt.area+=Number($e.overlapAreaWanMu||0),We.set(mt,Yt)}),[...We.values()].sort(($e,mt)=>mt.area-$e.area||mt.count-$e.count)[0]||{name:"未知类型",count:0,area:0}}function xt(Ce=[]){const We=Ce.map(Yt=>Number(Yt.year)).filter(Yt=>Number.isFinite(Yt));if(!We.length)return"未知年份";const $e=Math.min(...We),mt=Math.max(...We);return $e===mt?`${$e} 年`:`${$e}-${mt} 年`}function Bt(Ce,We=18){const $e=String(Ce||"未命名项目");return $e.length>We?`${$e.slice(0,We)}...`:$e}return e({applyDrawnBoundary:E}),(Ce,We)=>(Te(),Pe("div",iqe,[O("div",rqe,[O("div",aqe,[We[0]||(We[0]=O("span",null,"工程分析",-1)),p.value?(Te(),Pe("strong",oqe,De(p.value),1)):Dn("",!0)]),a.value?Dn("",!0):(Te(),Pe("div",{key:0,class:Xn(["analysis-operation",{"has-boundary":o.value}])},[O("label",{class:Xn(["analysis-entry is-upload",{"is-disabled":a.value}])},[O("input",{type:"file",accept:".zip,.json,.geojson",disabled:a.value,onChange:_},null,40,sqe),O("span",null,De(o.value?"更换边界":"上传边界"),1),We[1]||(We[1]=O("strong",null,"SHP / GeoJSON",-1))],2),O("button",{type:"button",class:"analysis-entry is-draw",disabled:a.value,onPointerup:Ws(A,["stop","prevent"])},[O("span",null,De(o.value?"重新绘制":"在线绘制"),1),We[2]||(We[2]=O("strong",null,"地图圈定",-1))],40,lqe)],2)),a.value?(Te(),Pe("div",uqe,[O("div",cqe,[We[3]||(We[3]=O("span",null,"已落点",-1)),O("strong",null,De(n.drawingPointCount),1),We[4]||(We[4]=O("em",null,"点",-1)),We[5]||(We[5]=O("small",null,"至少 3 点",-1))]),O("button",{type:"button",class:"analysis-control is-primary",disabled:!v.value,onPointerup:Ws(M,["stop","prevent"])}," 完成分析 ",40,dqe),O("button",{type:"button",class:"analysis-control",disabled:!n.drawingPointCount,onPointerup:Ws(I,["stop","prevent"])},"撤销",40,hqe),O("button",{type:"button",class:"analysis-control is-danger",onPointerup:Ws(C,["stop","prevent"])},"删除图形",32)])):o.value?(Te(),Pe("div",fqe,[We[6]||(We[6]=O("span",null,"边界已加载",-1)),O("strong",null,De(s.value.length?`命中 ${s.value.length} 项`:m.value),1),O("button",{type:"button",onPointerup:Ws(D,["stop","prevent"])},"删除图形",32)])):Dn("",!0)]),O("div",pqe,[O("div",vqe,[We[7]||(We[7]=O("span",null,"建设记录核查",-1)),o.value?(Te(),Pe("strong",mqe,De(m.value),1)):Dn("",!0)]),o.value?(Te(),Pe(bn,{key:1},[O("div",{class:Xn(["analysis-conclusion",g.value.levelClass])},[O("div",yqe,[We[8]||(We[8]=O("span",null,"分析结论",-1)),O("strong",null,De(g.value.verdict),1)]),O("p",null,De(g.value.summary),1),O("div",_qe,[(Te(!0),Pe(bn,null,Bn(g.value.tags,$e=>(Te(),Pe("span",{key:$e},De($e),1))),128))]),O("small",null,De(g.value.advice),1)],2),s.value.length?(Te(),Pe("div",bqe,[(Te(!0),Pe(bn,null,Bn(s.value,$e=>(Te(),Pe("button",{key:$e.key,type:"button",class:"analysis-project-row",onPointerup:Ws(mt=>Ce.$emit("focus-project",$e),["stop","prevent"])},[O("span",wqe,De($e.projectName),1),O("div",Tqe,[O("strong",null,De($e.year),1),O("em",null,De($e.category),1),O("small",null,"叠加 "+De(ee($e.overlapAreaWanMu))+" 亩",1)]),O("b",null,De($e.featureCount)+" 个要素",1)],40,xqe))),128))])):(Te(),Pe("div",Sqe,"该边界范围内暂未匹配到已建设项目"))],64)):(Te(),Pe("div",gqe))])]))}},Cqe=c_(Aqe,[["__scopeId","data-v-04b20a7e"]]),hh=(n,e)=>n.reduce((t,i)=>t+Number(i[e]||0),0),oo=(n,e=2)=>Number(Number(n||0).toFixed(e)),Y0={kpi:{projectCount:22,featureCount:29280,subjectFeatureCount:1478,controlPointCount:27802,areaWanMu:175.3693,lengthKm:1250.62,townshipCount:10},categories:[{name:"草地修复",subjectFeatureCount:1067,areaWanMu:168.0339,lengthKm:1238.18,projectCount:13},{name:"林地修复",subjectFeatureCount:244,areaWanMu:7.3354,lengthKm:0,projectCount:6},{name:"湿地修复",subjectFeatureCount:167,areaWanMu:0,lengthKm:12.44,projectCount:3}],measures:[{name:"草原改良",subjectFeatureCount:285,areaWanMu:84.2792,lengthKm:467.5,projectCount:8},{name:"人工种草",subjectFeatureCount:532,areaWanMu:29.1561,lengthKm:0,projectCount:13},{name:"封育治理",subjectFeatureCount:45,areaWanMu:21.2487,lengthKm:0,projectCount:1},{name:"围栏建设",subjectFeatureCount:223,areaWanMu:19.4235,lengthKm:660.88,projectCount:9},{name:"林草碳汇试点",subjectFeatureCount:11,areaWanMu:12.5759,lengthKm:0,projectCount:1},{name:"水源涵养",subjectFeatureCount:82,areaWanMu:5.6993,lengthKm:0,projectCount:1},{name:"人工种草/补播",subjectFeatureCount:46,areaWanMu:2.8162,lengthKm:0,projectCount:4},{name:"防风固沙林",subjectFeatureCount:6,areaWanMu:.1303,lengthKm:0,projectCount:1},{name:"草种繁育",subjectFeatureCount:4,areaWanMu:.04,lengthKm:0,projectCount:1},{name:"种草围栏",subjectFeatureCount:77,areaWanMu:0,lengthKm:109.81,projectCount:1},{name:"小型坝",subjectFeatureCount:8,areaWanMu:0,lengthKm:8.83,projectCount:1},{name:"微型坝",subjectFeatureCount:159,areaWanMu:0,lengthKm:3.61,projectCount:2}],years:[{name:2017,areaWanMu:.1412,lengthKm:0,projectCount:1},{name:2018,areaWanMu:.5608,lengthKm:0,projectCount:1},{name:2019,areaWanMu:12.513,lengthKm:0,projectCount:1},{name:2020,areaWanMu:35.9848,lengthKm:0,projectCount:2},{name:2021,areaWanMu:25.0755,lengthKm:467.5,projectCount:5},{name:2022,areaWanMu:72.024,lengthKm:656.05,projectCount:8},{name:2023,areaWanMu:29.07,lengthKm:114.64,projectCount:3},{name:"未知",areaWanMu:0,lengthKm:12.44,projectCount:2}],townships:[{name:"麦洼乡",areaWanMu:28.5019,lengthKm:84.28,projectCount:3},{name:"龙日镇",areaWanMu:15,lengthKm:26.05,projectCount:1},{name:"安曲镇",areaWanMu:13.1168,lengthKm:0,projectCount:2},{name:"瓦切镇",areaWanMu:6.6824,lengthKm:214.41,projectCount:4},{name:"色地镇",areaWanMu:6.344,lengthKm:101.25,projectCount:3},{name:"刷经寺镇",areaWanMu:5.6528,lengthKm:126.26,projectCount:1},{name:"邛溪镇",areaWanMu:2.3127,lengthKm:101.39,projectCount:4},{name:"阿木乡",areaWanMu:1.34,lengthKm:59.5,projectCount:2},{name:"龙日乡",areaWanMu:.8472,lengthKm:20,projectCount:1},{name:"查尔玛乡",areaWanMu:.7001,lengthKm:37.56,projectCount:1}],projects:[{projectName:"阿坝州红原县2020年退牧还草工程项目",projectCategory:"草地修复",year:2020,areaWanMu:35.6232,lengthKm:0,measureTypes:["人工种草","围栏建设"],townships:[],subjectFeatureCount:73},{projectName:"四川省阿坝州若尔盖草原湿地水源涵养生态保护和修复项目(红原县部分)-2022年",projectCategory:"草地修复",year:2022,areaWanMu:21.5,lengthKm:172.31,measureTypes:["人工种草","围栏建设","种草围栏","草原改良"],townships:["刷经寺镇","龙日乡","龙日镇"],subjectFeatureCount:273},{projectName:"阿坝州红原县 2022 年第二批重点生态保护和修护治理项目-草原封育治理-700",projectCategory:"草地修复",year:2022,areaWanMu:21.2487,lengthKm:272.25,measureTypes:["围栏建设","封育治理"],townships:["瓦切镇","色地镇","邛溪镇"],subjectFeatureCount:90},{projectName:"四川省阿坝州 2023 年中央财政林业草原改革发展资金预算(第三批)——红原县草原生态修复项目",projectCategory:"草地修复",year:2023,areaWanMu:18.79,lengthKm:32.32,measureTypes:["人工种草","围栏建设","草原改良","草种繁育"],townships:["瓦切镇","麦洼乡"],subjectFeatureCount:102},{projectName:"阿坝州红原县2022年第二批重点生态保护和修护治理——红原县林草碳汇创新开发建设试点项目",projectCategory:"草地修复",year:2022,areaWanMu:12.5759,lengthKm:0,measureTypes:["林草碳汇试点"],townships:["安曲镇"],subjectFeatureCount:11},{projectName:"四川省红原县2019年草原生态修复治理项目退化草地治理和天然草原改良",projectCategory:"草地修复",year:2019,areaWanMu:12.513,lengthKm:0,measureTypes:["人工种草/补播","草原改良"],townships:[],subjectFeatureCount:25},{projectName:"阿坝州红原县2021年若尔盖—甘南草原湿地生态保护和修复项目-1880",projectCategory:"草地修复",year:2021,areaWanMu:11.0031,lengthKm:467.5,measureTypes:["人工种草","草原改良"],townships:[],subjectFeatureCount:229},{projectName:"2023 年度四川省阿坝州若尔盖草原湿地水源涵养生态保护和修复项目(红原县部分)-1315",projectCategory:"草地修复",year:2023,areaWanMu:10.28,lengthKm:82.32,measureTypes:["人工种草","围栏建设","草原改良"],townships:["查尔玛乡","麦洼乡"],subjectFeatureCount:50},{projectName:"阿坝州红原县 2022 年中央财政林业草原生态保护恢复(第二批)——草原生态修复治理补助项目-1972",projectCategory:"草地修复",year:2022,areaWanMu:8.2,lengthKm:113.37,measureTypes:["围栏建设","草原改良","人工种草"],townships:["色地镇","邛溪镇","阿木乡"],subjectFeatureCount:127},{projectName:"阿坝州红原县2021年省级草原生态保护恢复项目-1790",projectCategory:"草地修复",year:2021,areaWanMu:7,lengthKm:0,measureTypes:["人工种草","草原改良"],townships:[],subjectFeatureCount:16},{projectName:"阿坝州红原县 2021 年中央财政林业草原生态保护恢复项目-984",projectCategory:"草地修复",year:2021,areaWanMu:6.5,lengthKm:0,measureTypes:["草原改良","人工种草"],townships:[],subjectFeatureCount:14},{projectName:"红原县2022年度黄河上游水源涵养补给区综合治理项目实施方案(代作业设计)变更后最终版",projectCategory:"林地修复",year:2022,areaWanMu:5.6993,lengthKm:0,measureTypes:["水源涵养"],townships:["安曲镇","瓦切镇"],subjectFeatureCount:82},{projectName:"阿坝州红原县 2022 年第二批重点生态保护和修护治理——草原生态修复治理项目-1500",projectCategory:"草地修复",year:2022,areaWanMu:2,lengthKm:81.05,measureTypes:["人工种草","围栏建设"],townships:["瓦切镇","色地镇","麦洼乡"],subjectFeatureCount:53},{projectName:"阿坝州红原县 2022 年省级林业草原生态保护恢复——草原生态修复治理补助项目-888",projectCategory:"草地修复",year:2022,areaWanMu:.8,lengthKm:17.07,measureTypes:["人工种草","围栏建设"],townships:["阿木乡"],subjectFeatureCount:4},{projectName:"红原县2018年川西高原生态脆弱区综合治理项目",projectCategory:"林地修复",year:2018,areaWanMu:.5608,lengthKm:0,measureTypes:["人工种草","人工种草/补播"],townships:[],subjectFeatureCount:107},{projectName:"红原县2021年黄河上游水源涵养补给区生态综合治理项目",projectCategory:"林地修复",year:2021,areaWanMu:.5224,lengthKm:0,measureTypes:["人工种草/补播"],townships:["邛溪镇"],subjectFeatureCount:14},{projectName:"红原县2020年川西高原生态脆弱区综合治理项目",projectCategory:"林地修复",year:2020,areaWanMu:.3617,lengthKm:0,measureTypes:["人工种草","人工种草/补播"],townships:[],subjectFeatureCount:31},{projectName:"2017年川西高原生态脆弱区综合治理项目",projectCategory:"林地修复",year:2017,areaWanMu:.1412,lengthKm:0,measureTypes:["人工种草","防风固沙林"],townships:["邛溪镇"],subjectFeatureCount:8},{projectName:"红原县2021年人工造林封山育林项目",projectCategory:"林地修复",year:2021,areaWanMu:.05,lengthKm:0,measureTypes:["围栏建设"],townships:[],subjectFeatureCount:2},{projectName:"4980小型坝(1)(1)",projectCategory:"湿地修复",year:"未知",areaWanMu:0,lengthKm:8.83,measureTypes:["小型坝"],townships:[],subjectFeatureCount:8},{projectName:"红原县蓄水保湿工程-小型坝和微型坝(1)(1)",projectCategory:"湿地修复",year:2023,areaWanMu:0,lengthKm:3.61,measureTypes:["微型坝"],townships:[],subjectFeatureCount:59},{projectName:"4980微型坝成型(1)(1)",projectCategory:"湿地修复",year:2022,areaWanMu:0,lengthKm:0,measureTypes:["微型坝"],townships:[],subjectFeatureCount:100}]},HW=[{key:"national-park",label:"若尔盖国家公园",bottomLabel:"若尔盖国家公园"},{key:"restoration",label:"生态修复工程",bottomLabel:"生态修复工程"},{key:"engineering-analysis",label:"工程分析",bottomLabel:"工程分析"}],d0=[{name:"麦洼乡",grasslandAreaWanMu:31.41,wetlandAreaWanMu:11.16,ecologyJobs:179,yakCount:61720,livestockCount:63507,cover:85,villages:"洞拉村、滚塘村、让里村、茸塔玛村"},{name:"瓦切镇",grasslandAreaWanMu:31.42,wetlandAreaWanMu:11.15,ecologyJobs:160,yakCount:33887,livestockCount:34589,cover:85,villages:"唐日村、德香村、日干村"},{name:"色地镇",grasslandAreaWanMu:31.42,wetlandAreaWanMu:11.16,ecologyJobs:39,yakCount:9572,livestockCount:9843,cover:86,villages:"色永村"}],Js={name:"若尔盖国家公园红原区域",totalAreaWanMu:161.31,grasslandAreaWanMu:94.25,wetlandAreaWanMu:33.47,woodlandAreaWanMu:null,woodlandDataStatus:"待接入",vegetationCoverage:oo(hh(d0,"cover")/d0.length,1),townCount:d0.length,villageCount:d0.reduce((n,e)=>n+String(e.villages||"").split("、").filter(Boolean).length,0),householdCount:3023,ecologyJobCount:hh(d0,"ecologyJobs"),yakCount:hh(d0,"yakCount"),livestockCount:hh(d0,"livestockCount")};Js.otherProtectedAreaWanMu=oo(Js.totalAreaWanMu-Js.grasslandAreaWanMu-Js.wetlandAreaWanMu,2);d0.map(n=>({key:n.name,name:n.name,value:oo(n.grasslandAreaWanMu+n.wetlandAreaWanMu,2),unit:"万亩",extra:`草地 ${n.grasslandAreaWanMu} / 湿地 ${n.wetlandAreaWanMu}`}));d0.map(n=>({key:`${n.name}-town`,name:n.name,value:oo(n.grasslandAreaWanMu+n.wetlandAreaWanMu,2),unit:"万亩",extra:n.villages}));const Mqe=[{key:"core-protection",name:"核心保护区",value:67.36,unit:"万亩"},{key:"general-control",name:"一般控制区",value:93.95,unit:"万亩"}],Eqe=43.66,Pqe=oo(Eqe*(192.26/297.29),2),Rqe={麦洼乡:[{name:"洞拉村",grassland:.29,wetland:.34,household:.3,yak:.32,edible:.31,woodland:.3},{name:"滚塘村",grassland:.26,wetland:.27,household:.25,yak:.25,edible:.26,woodland:.25},{name:"让里村",grassland:.24,wetland:.21,household:.24,yak:.23,edible:.23,woodland:.24},{name:"茸塔玛村",grassland:.21,wetland:.18,household:.21,yak:.2,edible:.2,woodland:.21}],瓦切镇:[{name:"唐日村",grassland:.38,wetland:.42,household:.36,yak:.4,edible:.39,woodland:.38},{name:"德香村",grassland:.32,wetland:.32,household:.33,yak:.32,edible:.32,woodland:.32},{name:"日干村",grassland:.3,wetland:.26,household:.31,yak:.28,edible:.29,woodland:.3}],色地镇:[{name:"色永村",grassland:1,wetland:1,household:1,yak:1,edible:1,woodland:1}]},Lqe=hh(d0,"livestockCount")||hh(d0,"yakCount")||1,a_=d0.map(n=>tn(wt({},n),{householdCount:Math.round(Js.householdCount*Number(n.livestockCount||n.yakCount||0)/Lqe),edibleGrasslandWanTon:oo(Number(n.grasslandAreaWanMu||0)/Math.max(Js.grasslandAreaWanMu,1)*Pqe,2)})),WW=Js.householdCount-hh(a_,"householdCount");WW&&a_[0]&&(a_[0].householdCount+=WW);const iL=(n,e=hh(n,"value"))=>n.map(t=>tn(wt({},t),{extra:t.extra||`占比 ${oo(Number(t.value||0)/Math.max(e,1)*100,1)}%`})),Iqe=iL([{key:"park-scope-grassland",name:"草地",value:Js.grasslandAreaWanMu,unit:"万亩"},{key:"park-scope-wetland",name:"湿地",value:Js.wetlandAreaWanMu,unit:"万亩"},{key:"park-scope-other",name:"其他保护范围",value:Js.otherProtectedAreaWanMu,unit:"万亩"}]),sm=({sourceKey:n,weightKey:e,unit:t="万亩",decimals:i=2,sortByValue:r=!0})=>{const a=a_.flatMap(s=>(Rqe[s.name]||[]).map(u=>({key:`${s.name}-${u.name}-${n}`,name:u.name,town:s.name,value:oo(Number(s[n]||0)*Number(u[e]||0),i),unit:t}))).filter(s=>Number(s.value)>0),o=r?a.sort((s,l)=>Number(l.value||0)-Number(s.value||0)):a;return iL(o)},Dqe=sm({sourceKey:"wetlandAreaWanMu",weightKey:"wetland",sortByValue:!1}),Nqe=sm({sourceKey:"grasslandAreaWanMu",weightKey:"grassland"}),kqe=sm({sourceKey:"householdCount",weightKey:"household",unit:"户",decimals:0}),kte=sm({sourceKey:"yakCount",weightKey:"yak",unit:"头",decimals:0}),Fqe={洞拉村:[102.82,33.22],滚塘村:[102.9,33.23],让里村:[102.99,33.23],茸塔玛村:[103.08,33.2],唐日村:[102.5,33.11],德香村:[102.63,33.12],日干村:[102.72,33.08],色永村:[103.12,33.04]},Oqe=kte.map(n=>{const e=Fqe[n.name];return e?tn(wt({},n),{lng:e[0],lat:e[1],value:n.value,rawValue:n.value,metricLabel:"牦牛数量",displayUnit:n.unit,displayMode:"park-village"}):null}).filter(Boolean),Bqe=sm({sourceKey:"edibleGrasslandWanTon",weightKey:"edible",unit:"万吨"}),zqe=sm({sourceKey:"wetlandAreaWanMu",weightKey:"woodland"}),Gqe=[{zh:"国家公园面积",value:Js.totalAreaWanMu,unit:"万亩",decimals:2},{zh:"草地面积",value:Js.grasslandAreaWanMu,unit:"万亩",decimals:2},{zh:"湿地面积",value:Js.wetlandAreaWanMu,unit:"万亩",decimals:2},{zh:"牦牛数量",value:Js.yakCount,unit:"头",decimals:0}],Uqe=[{zh:"修复项目",value:Y0.kpi.projectCount,unit:"个",decimals:0},{zh:"治理面积",value:Y0.kpi.areaWanMu,unit:"万亩",decimals:2},{zh:"工程长度",value:Y0.kpi.lengthKm,unit:"公里",decimals:2},{zh:"涉及乡镇",value:Y0.kpi.townshipCount,unit:"个",decimals:0}];function Vqe(n){return n==="engineering-analysis"?[]:(n==="restoration"?Uqe:Gqe).map((t,i)=>wt({icon:i%2===0?"xiaoshoujine":"zongxiaoliang",en:""},t))}const Hqe={left:[{key:"park-resource-scope",title:"显示范围资源占比",type:"donut",rows:Iqe},{key:"park-wetland-village",title:"湿地分布村级对比",type:"line",rows:Dqe.slice(0,8)},{key:"park-woodland-village",title:"林地分布村级排行",type:"heat",rows:zqe.slice(0,8)},{key:"park-grassland-village",title:"草地分布村级排行",type:"peak",rows:Nqe.slice(0,8)}],right:[{key:"park-household-village",title:"牧户分布村级排行",type:"column",variant:"pin",rows:kqe.slice(0,8)},{key:"park-yak-village",title:"牦牛分布村级排行",type:"bar",variant:"distribution",rows:kte.slice(0,8)},{key:"park-edible-grass-village",title:"可食草地资源分布",type:"split",rows:Bqe.slice(0,8)},{key:"park-zoning-ledger",title:"核心区和一般区分区面积",type:"structure",rows:iL(Mqe)}]},Fte=(Y0.townships||[]).filter(n=>/[乡镇]$/.test(String(n.name||""))).slice(0,8),Ote=(Y0.projects||[]).map((n,e)=>{const t=Number(n.areaWanMu)>0,i=Number(n.lengthKm)>0,r=t?{value:oo(n.areaWanMu,2),unit:"万亩",metric:"治理面积"}:i?{value:oo(n.lengthKm,2),unit:"公里",metric:"工程长度"}:{value:n.subjectFeatureCount||0,unit:"个",metric:"主体要素"},a=(n.measureTypes||[]).join("、"),o=(n.townships||[]).join("、");return{key:n.id||n.projectName,index:e+1,name:n.projectName,projectName:n.projectName,category:n.projectCategory,year:n.year||"未知",areaWanMu:oo(n.areaWanMu,4),lengthKm:oo(n.lengthKm,2),measure:a,townships:o,subjectFeatureCount:n.subjectFeatureCount||0,value:r.value,unit:r.unit,metric:r.metric,extra:[n.year||"未知",a].filter(Boolean).join(" / "),searchText:[n.projectName,n.projectCategory,n.year,a,o].filter(Boolean).join(" ")}});Ote.map((n,e)=>{const t=e%6,i=Math.floor(e/6),r=102.42+t*.045,a=32.55+i*.035,o=.018+Math.min(.024,Number(n.areaWanMu||0)/1200);return{type:"Feature",properties:{project_name:n.projectName,project_category:n.category,year:n.year,areaWanMu:n.areaWanMu,lengthKm:n.lengthKm,townships:n.townships,measure:n.measure},geometry:{type:"Polygon",coordinates:[[[r,a],[r+o,a+o*.22],[r+o*.82,a+o],[r-o*.16,a+o*.72],[r,a]]]}}});const Wqe={left:[{key:"restoration-year-area",title:"治理面积分布",type:"line",rows:(Y0.years||[]).map(n=>({key:n.name,name:`${n.name}`,value:oo(n.areaWanMu,2),unit:"万亩",extra:`${n.projectCount||0}个项目`}))},{key:"restoration-town-area",title:"乡镇治理面积分布",type:"bar",variant:"distribution",rows:Fte.map(n=>({key:n.name,name:n.name,value:oo(n.areaWanMu,2),unit:"万亩",extra:`${oo(n.lengthKm,2)}公里`}))},{key:"restoration-category",title:"修复类型占比",type:"donut",rows:(Y0.categories||[]).map(n=>({key:n.name,name:n.name,value:oo(n.areaWanMu||n.lengthKm||n.subjectFeatureCount,2),unit:n.areaWanMu?"万亩":n.lengthKm?"公里":"个",extra:`${n.subjectFeatureCount}个图斑`}))},{key:"restoration-year-length",title:"年度工程长度",type:"column",variant:"slim",rows:(Y0.years||[]).filter(n=>Number(n.lengthKm)>0).map(n=>({key:n.name,name:`${n.name}`,value:oo(n.lengthKm,2),unit:"公里",extra:`${n.projectCount||0}个项目`}))}],right:[{key:"restoration-measure-area",title:"修复措施统计",type:"structure",rows:(Y0.measures||[]).slice(0,8).map(n=>({key:n.name,name:n.name,value:oo(n.areaWanMu||n.lengthKm||n.subjectFeatureCount,2),unit:n.areaWanMu?"万亩":n.lengthKm?"公里":"个",extra:`${n.projectCount}个项目`}))},{key:"restoration-year-project",title:"年度项目数量",type:"column",variant:"slim",rows:(Y0.years||[]).map(n=>({key:n.name,name:`${n.name}`,value:n.projectCount,unit:"个",extra:`${oo(n.areaWanMu,2)}万亩`}))},{key:"restoration-projects",title:"重点项目库",type:"projectTable",span:2,rows:Ote}]},jqe={left:[],right:[]};function $qe(n){return n==="restoration"?{status:"success",title:"乡镇治理排行",metricLabel:"治理面积",unit:"万亩",rows:Fte.map(e=>({name:e.name,value:oo(e.areaWanMu,2),unit:"万亩"}))}:n==="engineering-analysis"?{status:"success",title:"工程分析",metricLabel:"",unit:"",rows:[]}:{status:"success",title:"国家公园覆盖村",scope:"village",labelMode:"village",hideTownNames:!1,displayMode:"park-village",metricLabel:"牦牛数量",unit:"头",rows:Oqe}}const qqe={class:"forest-grass-wet ecological-protection"},Xqe={class:"forest-grass-wet-ui ecological-protection-ui"},Yqe={key:0,class:"fgw-left"},Kqe={class:"fgw-side-stack is-left"},Zqe={key:1,class:"fgw-right"},Jqe={class:"fgw-side-stack is-right"},Qqe={class:"fgw-bottom-topic ecological-bottom-topic"},eXe={key:0,class:"loading"},tXe={class:"loading-progress"},nXe={class:"value"},jW=190,iXe=12,rXe={__name:"index",props:{activeView:{type:String,default:"national-park"},showLoading:{type:Boolean,default:!0}},emits:["module-stats","view-change"],setup(n,{emit:e}){const t=n,i=e,r=Wt(null),a=Wt(null),o=Wt(""),s=Wt(""),l=Wt(null),u=Wt(!1),c=Wt(!1),d=Wt(null),h=Wt(0),f=Wt(t.showLoading),p=Wt(null),m=Wt(0),v=Wt({type:"idle",text:"等待生态保护图层加载"});let g=null,_=!1;const S=Ye(()=>["national-park","restoration","engineering-analysis"].includes(t.activeView)?t.activeView:"national-park"),x=Ye(()=>S.value==="engineering-analysis"),A=Ye(()=>o.value?B3(S.value,o.value):null),C=Ye(()=>{var k;return(((k=A.value)==null?void 0:k.legends)||[]).find(_t=>_t.key===s.value)||null}),M=Ye(()=>{const k=A.value;return!k||!C.value?k:tn(wt({},k),{cqlFilter:C.value.cqlFilter||k.cqlFilter,activeLegend:C.value,name:C.value.name||k.name})}),I=Ye(()=>S.value==="restoration"?Wqe:S.value==="engineering-analysis"?jqe:Hqe),D=Ye(()=>I.value.left||[]),E=Ye(()=>I.value.right||[]),P=jW*2+iXe,F=Ye(()=>!!d.value),V=Ye(()=>{if(c.value||u.value||!l.value)return 186;const k=Ee(l.value);return Math.min(480,Math.max(300,86+Math.min(k,12)*34))}),G=Ye(()=>{if(!d.value)return{};const k=460,_t=V.value,Ct=24,J=K(d.value),ee=J.x>1420?-k-28:28,Ue=Math.min(Math.max(J.x+ee,Ct),1920-k-Ct),xt=Math.min(Math.max(J.y-_t-72,188),1080-_t-132);return{left:`${Ue}px`,top:`${xt}px`,right:"auto",bottom:"auto"}});dl(()=>{document.addEventListener("pointerdown",vt,!0),Q(),W(S.value)}),Bl(()=>{_=!0,document.removeEventListener("pointerdown",vt,!0)}),qa(S,k=>{W(k)}),qa(o,()=>{s.value="",Lt()}),qa(s,()=>{Lt()});function W(k){var J,ee,Ue,xt,Bt;const _t=y5.find(Ce=>Ce.key===k)||y5[0],Ct=f7(k);s.value="",o.value=_t.defaultLayerKey||((J=Ct[0])==null?void 0:J.key)||"",p.value=$qe(k),m.value=0,(Ue=(ee=r.value)==null?void 0:ee.setBoundaryDrawing)==null||Ue.call(ee,!1),k!=="engineering-analysis"&&((Bt=(xt=r.value)==null?void 0:xt.clearAnalysisBoundary)==null||Bt.call(xt)),Lt(),i("module-stats",{moduleKey:"ecological-protection",viewKey:k,items:Vqe(k)})}function Y(k){i("view-change",["national-park","restoration","engineering-analysis"].includes(k)?k:"national-park")}function Q(){var J;g=new am;let k=!1;const _t={progress:0};g.instance.on("onProgress",(ee,Ue,xt)=>{const Bt=Math.floor(Ue/xt*100);ka.to(_t,{progress:Bt,onUpdate:()=>{h.value=Math.floor(_t.progress)}})});const Ct=()=>rn(this,null,function*(){var ee,Ue;_||k||(k=!0,(ee=r.value)==null||ee.loadMap(g),yield Ft(),yield Qs(),(Ue=r.value)==null||Ue.play())});g.instance.on("onLoad",Ct),(J=g.ready)==null||J.then(Ct).catch(()=>{_||(v.value={type:"error",text:"地图资源加载失败"})})}function K(k){const _t=document.querySelector(".ecological-protection"),Ct=_t==null?void 0:_t.getBoundingClientRect();return!(Ct!=null&&Ct.width)||!(Ct!=null&&Ct.height)?k:{x:(k.x-Ct.left)/Ct.width*1920,y:(k.y-Ct.top)/Ct.height*1080}}function ae(k,_t){return`${S.value}-${_t}-${(k==null?void 0:k.key)||(k==null?void 0:k.title)||"panel"}`}function ie(k){return(k==null?void 0:k.span)===2}function he(k){return ie(k)?P:jW}function Ee(k){const _t=(k==null?void 0:k.properties)||{};return Object.keys(_t).filter(Ct=>{const J=_t[Ct];return J==null||J===""?!1:!["geom","wkt","geometry","the_geom","raw_properties"].includes(String(Ct).toLowerCase())}).length}function He(k){var Ct,J;const _t=(J=(Ct=k==null?void 0:k.feature)!=null?Ct:k)!=null?J:null;if(!_t){Lt();return}l.value=_t,u.value=!1,k!=null&&k.screen&&(d.value=k.screen)}function xe(k){v.value=k}function Fe(k,_t){var J,ee;if(S.value!=="restoration"||(k==null?void 0:k.key)!=="restoration-projects")return;const Ct=(_t==null?void 0:_t.projectName)||(_t==null?void 0:_t.name);Ct&&(Lt(),(ee=(J=r.value)==null?void 0:J.focusProject)==null||ee.call(J,Ct))}function pt(k){var _t,Ct;Lt(),m.value=0,(Ct=(_t=r.value)==null?void 0:_t.setBoundaryDrawing)==null||Ct.call(_t,k)}function Ot(){var k,_t;(_t=(k=r.value)==null?void 0:k.finishBoundaryDrawing)==null||_t.call(k)}function bt(){var k,_t;(_t=(k=r.value)==null?void 0:k.undoBoundaryPoint)==null||_t.call(k)}function ht(){var k,_t;m.value=0,(_t=(k=r.value)==null?void 0:k.clearAnalysisBoundary)==null||_t.call(k)}function Kt(k={}){var _t,Ct,J;m.value=k.pointCount||((_t=k.points)==null?void 0:_t.length)||0,k.status==="complete"&&k.feature&&(m.value=0,(J=(Ct=a.value)==null?void 0:Ct.applyDrawnBoundary)==null||J.call(Ct,k.feature)),k.status==="clear"&&(m.value=0)}function Tt(k={}){var _t,Ct;(Ct=(_t=r.value)==null?void 0:_t.showAnalysisResult)==null||Ct.call(_t,{boundary:k.boundary,matches:k.matches}),S.value}function Ae(k){var Ct,J;const _t=((k==null?void 0:k.features)||[]).filter(Boolean);(J=(Ct=r.value)==null?void 0:Ct.showAnalysisResult)==null||J.call(Ct,{matches:_t})}function Lt(){var k,_t;l.value=null,u.value=!1,d.value=null,(_t=(k=r.value)==null?void 0:k.clearSelectedFeature)==null||_t.call(k)}function vt(k){if(!F.value)return;const _t=document.querySelector(".fgw-map-feature-info"),Ct=k.target;_t&&Ct instanceof Node&&_t.contains(Ct)||Lt()}function Ft(){return f.value?new Promise(k=>{ka.to(".ecological-protection .loading",{opacity:0,duration:.8,delay:.2,onComplete:()=>{f.value=!1,k()}})}):Promise.resolve()}return(k,_t)=>{var Ct;return Te(),Pe("div",qqe,[gn(rm,{ref_key:"mapSceneRef",ref:r,"active-layer":M.value,"map-ranking":p.value,onFeatureLoading:_t[0]||(_t[0]=J=>c.value=J),onFeatureInfo:He,onLayerStatus:xe,onDrawBoundary:Kt},null,8,["active-layer","map-ranking"]),O("div",Xqe,[x.value?Dn("",!0):(Te(),Pe("div",Yqe,[O("div",Kqe,[(Te(!0),Pe(bn,null,Bn(D.value,J=>(Te(),Uo(Mi,{key:ae(J,"left"),class:Xn(["fgw-side-card left-card",{"is-double":ie(J)}]),title:J.title,width:398,height:he(J)},{default:mi(()=>[gn(Cl,{panel:J,compact:"",onRowSelect:ee=>Fe(J,ee)},null,8,["panel","onRowSelect"])]),_:2},1032,["class","title","height"]))),128))])])),x.value?Dn("",!0):(Te(),Pe("div",Zqe,[O("div",Jqe,[(Te(!0),Pe(bn,null,Bn(E.value,J=>(Te(),Uo(Mi,{key:ae(J,"right"),class:Xn(["fgw-side-card right-card",{"is-double":ie(J)}]),title:J.title,width:398,height:he(J)},{default:mi(()=>[gn(Cl,{panel:J,compact:"",onRowSelect:ee=>Fe(J,ee)},null,8,["panel","onRowSelect"])]),_:2},1032,["class","title","height"]))),128))])])),x.value?(Te(),Uo(Cqe,{key:2,ref_key:"engineeringAnalysisRef",ref:a,"drawing-point-count":m.value,onDrawingChange:pt,onFinishDrawing:Ot,onUndoPoint:bt,onClearBoundary:ht,onAnalysisResult:Tt,onFocusProject:Ae},null,8,["drawing-point-count"])):Dn("",!0),O("div",{class:Xn(["fgw-map-layer-tools",{"is-analysis":x.value}])},[gn(UR,{modelValue:o.value,"onUpdate:modelValue":_t[1]||(_t[1]=J=>o.value=J),"selected-legend-key":s.value,"onUpdate:selectedLegendKey":_t[2]||(_t[2]=J=>s.value=J),"topic-key":S.value,legends:((Ct=M.value)==null?void 0:Ct.legends)||[],width:248,height:430},null,8,["modelValue","selected-legend-key","topic-key","legends"])],2),F.value?(Te(),Pe("div",{key:3,class:"fgw-map-feature-info",style:Ji(G.value)},[gn(ete,{feature:l.value,empty:u.value,loading:c.value,width:460,height:V.value},null,8,["feature","empty","loading","height"])],4)):Dn("",!0),O("div",Qqe,[gn(y7,{"model-value":S.value,topics:Tr(y5),"onUpdate:modelValue":Y},null,8,["model-value","topics"])])]),f.value?(Te(),Pe("div",eXe,[_t[4]||(_t[4]=pp('
    LOADING
    ',1)),O("div",tXe,[O("span",nXe,De(h.value),1),_t[3]||(_t[3]=O("span",{class:"unit"},"%",-1))])])):Dn("",!0)])}}},SM=sXe("/jsyApi"),aXe="/openApi";function oXe(n,e){return/^https?:\/\//.test(e)?e:`${n}${e.startsWith("/")?e:`/${e}`}`}function sXe(n){const e=String(n||"/jsyApi").replace(/\/+$/,"");return e.endsWith("/api")?e:`${e}/api`}function lXe(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function o_(n,e,t,i={}){return su(oXe(n,e),{params:t,timeout:i.timeout||16e3}).then(lXe)}function uXe(n){return Array.isArray(n)?n:Array.isArray(n==null?void 0:n.rows)?n.rows:Array.isArray(n==null?void 0:n.list)?n.list:Array.isArray(n==null?void 0:n.data)?n.data:[]}function cXe(n){return Array.isArray(n)?n.length>0:!n||typeof n!="object"?n!=null&&n!=="":["areaRange","area_range","acreage","grasslandArea","grassland_area","area","yakNumber","yak_number","number","yakCount","yak_count","livestockCount","livestock_count","bearingCapacity","bearing_capacity","capacity","theoryCapacity","livestockCapacity","livestock_capacity","carryingCapacity","actualCapacity","overloadRate","overload_rate","rate","level","conclusion","advice","balanceAdvice","balance_advice"].some(t=>n[t]!==void 0&&n[t]!==null&&n[t]!=="")}function dXe(){return rn(this,arguments,function*({areaCode:n,pasturesId:e}={}){const t={areaCode:n,pasturesId:e},i=[()=>o_(SM,"/ai/livestockBalance",t,{timeout:18e3}),()=>o_(aXe,"/ai/balance/advice",t,{timeout:18e3})];let r;for(const a of i)try{const o=yield a();if(cXe(o))return o}catch(o){r=o}throw r||new Error("草畜平衡接口不可用")})}function hXe(n){return rn(this,null,function*(){const e=[()=>o_(SM,"/area/children",{areaCode:n},{timeout:12e3}),()=>o_(SM,"/map/areaCode",{areaCode:n},{timeout:12e3})];let t,i=!1;for(const r of e)try{const a=uXe(yield r());if(a.length)return a;i=!0}catch(a){t=a}if(i)return[];throw t||new Error("区划接口不可用")})}const Bte="/jsyApi";function zte(n,e){return/^https?:\/\//.test(e)?e:`${n}${e.startsWith("/")?e:`/${e}`}`}function Gte(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function b7(n,e,t={}){return su(zte(Bte,n),{params:e,timeout:t.timeout||12e3}).then(Gte)}function x7(n,e,t={}){return su(zte(Bte,n),{method:"POST",params:e,timeout:t.timeout||12e3}).then(Gte)}function fXe(){return x7("/api/dataItem?group=pastures").then(ed)}function pXe(){return x7("/api/muhu/distribution").then(ed)}function vXe(){return x7("/api/muhu/age").then(ed)}function mXe(){return x7("/api/muhu/upline_rate").then(ed)}function ed(n){return Array.isArray(n)?n:Array.isArray(n==null?void 0:n.rows)?n.rows:Array.isArray(n==null?void 0:n.list)?n.list:Array.isArray(n==null?void 0:n.data)?n.data:n!=null&&n.data?ed(n.data):n!=null&&n.result?ed(n.result):[]}function Ute(n="",e=1,t=80){return b7("/api/home/muhu_list",{query:n,page:e,pageSize:t}).then(ed)}function bM(n){return b7("/api/home/grasslandByPastureId",{id:n}).then(ed)}function gXe(n){return b7("/api/pasturesDetails",{id:n}).then(e=>(e==null?void 0:e.data)||e||{})}function Vte(){return b7("/api/pasturesList").then(ed)}function yXe(){return rn(this,null,function*(){const[n,e,t,i,r,a]=yield Promise.allSettled([fXe(),pXe(),vXe(),mXe(),Vte(),Ute("",1,300)]),o=r.status==="fulfilled"?r.value:[],s=a.status==="fulfilled"?a.value:[],l=XW(s)?s:XW(o)?o:s.length?s:o,u=_Xe(l,o,s);return{core:n.status==="fulfilled"?n.value:[],distribution:e.status==="fulfilled"?e.value:[],age:t.status==="fulfilled"?t.value:[],online:i.status==="fulfilled"?i.value:[],list:u}})}function _Xe(n=[],...e){const t=new Map;return e.flat().forEach(i=>{qW(i).forEach(r=>{const a=t.get(r)||{};t.set(r,$W(a,i))})}),(Array.isArray(n)?n:[]).map(i=>{const r=qW(i).map(a=>t.get(a)).find(Boolean);return r?$W(i,r):i})}function $W(n={},e={}){const t=wt({},n);return Object.entries(e||{}).forEach(([i,r])=>{(t[i]===void 0||t[i]===null||t[i]==="")&&(t[i]=r)}),t}function qW(n={}){return[n.id,n.pastureId,n.pasturesId,n.pastures_id,n.muhuId,n.muhu_id,n.name,n.pasturesName,n.pastures_name,n.muhuName,n.muhu_name,n.pastureName,n.pasture_name].map(e=>String(e||"").trim()).filter(Boolean)}function XW(n=[]){return(Array.isArray(n)?n:[]).some(e=>{var r,a,o,s,l,u;const t=(l=(s=(o=(a=(r=e==null?void 0:e.grasslandArea)!=null?r:e==null?void 0:e.grassland_area)!=null?a:e==null?void 0:e.acreage)!=null?o:e==null?void 0:e.area)!=null?s:e==null?void 0:e.areaRange)!=null?l:e==null?void 0:e.area_range;if(typeof t=="number")return t>0;const i=Number((u=String(t!=null?t:"").replace(/,/g,"").match(/-?\d+(?:\.\d+)?/))==null?void 0:u[0]);return Number.isFinite(i)&&i>0})}const SXe=(n,e=2)=>{const t=xd(10,e);return Math.round((Number(n)||0)*t)/t},xM=n=>SXe((Number(n)||0)/1e4,2),Hte=[{key:"pasture-total",name:"牧户数量",value:9110,unit:"户",icon:"town"},{key:"avg-yak-per-household",name:"户均牦牛头数",value:52,unit:"头",icon:"yield"},{key:"avg-grassland-area",name:"户均草地面积",value:1131,unit:"亩",icon:"area"},{key:"joint-household-count",name:"联户数量",value:237,unit:"户",icon:"town"},{key:"poverty-monitor-count",name:"防反贫监测户",value:122,unit:"户",icon:"town"},{key:"average-income",name:"人均收入",value:19679,unit:"元/年",icon:"rate"}],Wte=Hte,jte=Hte.map(n=>tn(wt({},n),{zh:n.name,decimals:0})),rL=[{areaCode:"513233100",areaName:"邛溪镇",number:1452,year:2024},{areaCode:"513233104",areaName:"刷经寺镇",number:1500,year:2024},{areaCode:"513233101",areaName:"安曲镇",number:76,year:2024},{areaCode:"513233103",areaName:"龙日镇",number:828,year:2024},{areaCode:"513233204",areaName:"江茸乡",number:902,year:2024},{areaCode:"513233205",areaName:"查尔玛乡",number:450,year:2024},{areaCode:"513233102",areaName:"瓦切镇",number:602,year:2024},{areaCode:"513233203",areaName:"阿木乡",number:300,year:2024},{areaCode:"513233202",areaName:"麦洼乡",number:1204,year:2024},{areaCode:"513233105",areaName:"色地乡",number:2638,year:2024}].map(n=>tn(wt({},n),{key:n.areaCode,name:n.areaName,value:n.number,unit:"户"})),$te=[{areaCode:"513233103",areaName:"龙日镇",uplineRate:4,year:2024},{areaCode:"513233202",areaName:"麦洼乡",uplineRate:52,year:2024},{areaCode:"513233101",areaName:"安曲镇",uplineRate:22,year:2024},{areaCode:"513233100",areaName:"邛溪镇",uplineRate:23,year:2024},{areaCode:"513233105",areaName:"色地乡",uplineRate:8,year:2024},{areaCode:"513233203",areaName:"阿木乡",uplineRate:12,year:2024},{areaCode:"513233204",areaName:"江茸乡",uplineRate:14,year:2024},{areaCode:"513233104",areaName:"刷经寺镇",uplineRate:9,year:2024}].map(n=>tn(wt({},n),{key:n.areaCode,name:n.areaName,value:n.uplineRate,unit:"%",extra:`${n.uplineRate}%`})),qte=[{areaName:"全县",ageRange:"0-20",sex:"男",number:340,value:340,year:2024},{areaName:"全县",ageRange:"0-20",sex:"女",number:348,value:348,year:2024},{areaName:"全县",ageRange:"21-40",sex:"男",number:1700,value:1700,year:2024},{areaName:"全县",ageRange:"21-40",sex:"女",number:2040,value:2040,year:2024},{areaName:"全县",ageRange:"41-60",sex:"男",number:2040,value:2040,year:2024},{areaName:"全县",ageRange:"41-60",sex:"女",number:2104,value:2104,year:2024},{areaName:"全县",ageRange:"61-80",sex:"男",number:680,value:680,year:2024},{areaName:"全县",ageRange:"61-80",sex:"女",number:580,value:580,year:2024},{areaName:"全县",ageRange:"81-100",sex:"男",number:60,value:60,year:2024},{areaName:"全县",ageRange:"81-100",sex:"女",number:60,value:60,year:2024}],Xte=(n,e,t,i)=>Array.from(n.reduce((r,a)=>{const o=a[e]||"未标注",s=r.get(o)||{key:o,name:o,value:0,unit:i};return s.value+=Number(a[t])||0,r.set(o,s),r},new Map).values()),bXe=Xte(qte,"ageRange","value","人"),Yte=[{key:"male",name:"男",value:4820,unit:"人"},{key:"female",name:"女",value:5132,unit:"人"}],kp=[{name:"更洼尔",areaName:"瓦切乡",acreage:4704.87,summerAcreage:2267.26,winterAcreage:2437.61,year:2024},{name:"涉尔丹",areaName:"麦洼乡",acreage:1426.53,summerAcreage:687.82,winterAcreage:738.71,year:2024},{name:"热布丹",areaName:"查尔玛乡",acreage:2176.09,summerAcreage:1049.37,winterAcreage:1126.72,year:2024},{name:"王西卓玛",areaName:"阿木乡",acreage:4126.13,summerAcreage:1989.59,winterAcreage:2136.54,year:2024},{name:"阿尔",areaName:"色地乡",acreage:1249.48,summerAcreage:602.25,winterAcreage:647.23,year:2024},{name:"尕让吉",areaName:"邛溪镇",acreage:3688.72,summerAcreage:1778.56,winterAcreage:1910.16,year:2024},{name:"华尔甲",areaName:"安曲镇",acreage:2956.44,summerAcreage:1425.01,winterAcreage:1531.43,year:2024},{name:"泽让措",areaName:"江茸乡",acreage:3448.36,summerAcreage:1662.61,winterAcreage:1785.75,year:2024},{name:"扎西让布",areaName:"龙日镇",acreage:2689.1,summerAcreage:1296.15,winterAcreage:1392.95,year:2024},{name:"格桑卓玛",areaName:"刷经寺镇",acreage:3187.64,summerAcreage:1536.84,winterAcreage:1650.8,year:2024}].map(n=>tn(wt({},n),{township:n.areaName,grasslandArea:n.acreage,value:n.acreage,unit:"亩",canLocate:!1,locateText:"--",searchText:`${n.name} ${n.areaName}`})),xXe=Xte(kp,"township","grasslandArea","亩").map(n=>tn(wt({},n),{value:xM(n.value),unit:"万亩"})),wXe=Array.from(kp.reduce((n,e)=>{const t=e.township||"未填写",i=n.get(t)||{key:`${t}-season`,name:t,values:{summer:0,winter:0}};return i.values.summer+=Number(e.summerAcreage)||0,i.values.winter+=Number(e.winterAcreage)||0,n.set(t,i),n},new Map).values()).map(n=>tn(wt({},n),{values:{summer:xM(n.values.summer),winter:xM(n.values.winter)},unit:"万亩"})),TXe=rL.map(n=>({name:n.name,value:n.value,unit:"户"})),CT={topStats:jte,coreRows:Wte,townRows:rL,ageRows:qte,genderRows:Yte,onlineRows:$te,list:kp},Yp={grasslandCapacityPerMu:.047,yakToSheepUnit:4.8},AXe={key:"county-513233",type:"county",name:"红原县",areaCode:"513233"},V4=[{key:"healthy",label:"草畜平衡",shortLabel:"平衡",range:"≤ 0%",description:"承载力覆盖实际载畜量,当前放牧压力处于合理区间。",actions:["保持当前载畜水平与轮牧节奏","定期复测草地生产力和载畜量","关注极端天气对牧草生长的影响"]},{key:"watch",label:"轻度超载",shortLabel:"关注",range:"0% - 10%",description:"已出现轻度超载迹象,建议提前介入调控。",actions:["适度压减超载畜群规模","延长冬春舍饲补饲周期","增加人工草场补饲供应"]},{key:"warning",label:"中度超载",shortLabel:"预警",range:"10% - 20%",description:"超载较明显,草地退化风险上升,应启动主动调控。",actions:["压减载畜量至理论承载力以内","推行划区轮牧与阶段性休牧","扩大优质人工饲草供给"]},{key:"danger",label:"严重超载",shortLabel:"高压",range:"> 20%",description:"超载压力较高,建议纳入重点管控和生态修复范围。",actions:["强制压减载畜量并实施禁牧休牧","对退化草地实施生态修复","建立重点区域长效监测与考核机制"]}],a0={areaRange:["areaRange","area_range","acreage","grasslandArea","area"],yakNumber:["yakNumber","yak_number","number","yakCount","livestockCount"],bearingCapacity:["bearingCapacity","bearing_capacity","capacity","theoryCapacity"],livestockCapacity:["livestockCapacity","livestock_capacity","carryingCapacity","actualCapacity"],overloadRate:["overloadRate","overload_rate","rate"],level:["level","conclusion"],advice:["advice","balanceAdvice","balance_advice","balanceAdivce","balance_adivce"],year:["year"],areaName:["areaName","area_name","name"],pasturesName:["pasturesName","pastures_name","pastureName","muhuName","name"]},CXe=["grasslandArea","grassland_area","acreage","areaRange","area_range","area","cdAcreage","cd_acreage","totalAcreage","total_acreage","grasslandAcreage","grassland_acreage","pastureArea","pasture_area"],aL={邛溪镇:"513233100",刷经寺镇:"513233101",安曲镇:"513233103",龙日镇:"513233105",江茸乡:"513233202",查尔玛乡:"513233203",瓦切镇:"513233204",瓦切乡:"513233204",阿木乡:"513233205",麦洼乡:"513233207",色地乡:"513233208",色地镇:"513233208",壤口乡:"513233209"},v0=(n,e=2)=>{const t=xd(10,e);return Math.round((Number(n)||0)*t)/t},MXe={色地乡:1.38,麦洼乡:1.26,壤口乡:.92,阿木乡:1.12,瓦切镇:1.2,查尔玛乡:1.04,江茸乡:.88,龙日镇:1.16,安曲镇:1.28,刷经寺镇:.78,邛溪镇:1.08};function jr(n,e=null){if(n==null||n==="")return e;const t=typeof n=="string"?n.replace(/,/g,"").replace(/%/g,"").trim():n,i=Number(t);return Number.isFinite(i)?i:e}function no(n={},e=[],t=void 0){for(const i of e){const r=n==null?void 0:n[i];if(r!=null&&r!=="")return r}return t}function Kte(n,e={}){var i;const t=jr(n);return t===null?"--":t.toLocaleString("zh-CN",{maximumFractionDigits:(i=e.maximumFractionDigits)!=null?i:Number.isInteger(t)?0:2})}function MT(n){const e=jr(n);return e===null?"--":`${Kte(e)}%`}function j3(n){const e=jr(n);return e===null||e<=0?V4[0]:e<=10?V4[1]:e<=20?V4[2]:V4[3]}function wM(n){return Math.round((Number(n)||0)*Yp.yakToSheepUnit)}function TM(n){return Math.round((Number(n)||0)*Yp.grasslandCapacityPerMu)}function w7({key:n,type:e,name:t,areaCode:i,pasturesId:r,areaRange:a,yakNumber:o,location:s,township:l,hasBoundary:u=!1,boundaryCount:c=0,grasslands:d=[],source:h,pressureFactor:f=1}){const p=TM(a),m=Math.round(wM(o)*f),v=p?v0((m-p)/p*100,1):0,g=j3(v);return{key:n,type:e,name:t,areaCode:i,pasturesId:r,areaRange:v0(a,0),yakNumber:v0(o,0),bearingCapacity:p,livestockCapacity:m,overloadRate:v,level:g.label,advice:g.actions.join(";"),year:"2026",location:s,township:l,hasBoundary:!!u,boundaryCount:Number(c)||0,grasslands:d,source:h}}const $3=z3.map((n,e)=>w7({key:`town-${n.zoneName}`,type:"town",name:n.zoneName,areaCode:aL[n.zoneName],areaRange:n.grasslandArea,yakNumber:n.yakCount,location:null,pressureFactor:MXe[n.zoneName]||1,index:e})),EXe=$3.reduce((n,e)=>n+e.areaRange,0),PXe=$3.reduce((n,e)=>n+e.yakNumber,0),A5=$3.reduce((n,e)=>n+e.bearingCapacity,0),Zte=$3.reduce((n,e)=>n+e.livestockCapacity,0),Jte=A5?v0((Zte-A5)/A5*100,1):0,YW=j3(Jte),RXe=tn(wt({},AXe),{areaRange:EXe,yakNumber:PXe,bearingCapacity:A5,livestockCapacity:Zte,overloadRate:Jte,level:YW.label,advice:YW.actions.join(";"),year:"2026"}),LXe=C5(kp.map(n=>w7({key:n.id||n.key||n.name,type:"pasture",name:n.name,areaCode:aL[n.township],pasturesId:n.id,areaRange:n.grasslandArea,yakNumber:n.yakCount,location:n.location,township:n.township,hasBoundary:n.hasBoundary||n.canLocate||fp(n),source:n}))),KW=[RXe,...$3,...LXe];function IXe(n={},e={}){var S,x,A,C,M,I,D,E,P,F,V,G,W;const t=no(n,a0.areaRange),i=no(n,a0.yakNumber),r=no(n,a0.bearingCapacity),a=no(n,a0.livestockCapacity),o=jr(no(n,a0.overloadRate)),s=jr(e.yakNumber),l=kXe(n,a,s),u=jr(t,(S=e.areaRange)!=null?S:0),c=l!==null&&i===(n==null?void 0:n.yak_number)?jr(no(n,["number","yakCount","yak_count","livestockCount","livestock_count"]),s!=null?s:Math.round(l/Yp.yakToSheepUnit)):jr(i,(x=e.yakNumber)!=null?x:0),d=jr(e.bearingCapacity),h=jr(e.livestockCapacity),f=t!=null&&t!=="",p=i!=null&&i!=="",m=(M=(C=(A=jr(a))!=null?A:l)!=null?C:p?wM(c):h)!=null?M:wM(c),v=(E=(D=(I=jr(r))!=null?I:FXe(m,o))!=null?D:f?TM(u):d)!=null?E:TM(u),g=o!==null?v0(o,1):v?v0((m-v)/v*100,1):0,_=j3(g);return tn(wt(wt({},e),n),{key:e.key||n.key||n.id||n.areaCode||n.pasturesId||e.name,type:e.type||n.type||(n.pasturesId?"pasture":"town"),name:no(n,[...a0.pasturesName,...a0.areaName],e.name||"核算对象"),areaCode:n.areaCode||n.area_code||e.areaCode,pasturesId:n.pasturesId||n.pastures_id||e.pasturesId,areaRange:u,yakNumber:c,bearingCapacity:v,livestockCapacity:m,overloadRate:g,level:no(n,a0.level,_.label),advice:no(n,a0.advice,e.advice||_.actions.join(";")),year:no(n,a0.year,e.year||"当前年度"),hasBoundary:!!((V=(F=(P=n.hasBoundary)!=null?P:n.has_boundary)!=null?F:n.canLocate)!=null?V:e.hasBoundary),boundaryCount:jr((G=n.boundaryCount)!=null?G:n.boundary_count,(W=e.boundaryCount)!=null?W:0),grasslands:Array.isArray(n.grasslands)?n.grasslands:e.grasslands,source:n.raw||n.source||e.source})}function ZW(n=[],e=new Map){return(Array.isArray(n)?n:[]).map((t,i)=>NXe(t,i,e)).filter(Boolean).sort(Qte)}function C5(n=[]){return[...Array.isArray(n)?n:[]].sort(Qte)}function Qte(n,e){const t=s_(n)?1:0,i=s_(e)?1:0;if(t!==i)return i-t;const r=l_(n),a=l_(e),o=r>0?1:0,s=a>0?1:0;return o!==s?s-o:r!==a?a-r:String((n==null?void 0:n.name)||"").localeCompare(String((e==null?void 0:e.name)||""),"zh-CN")}function s_(n={}){return n!=null&&n.hasBoundary||n!=null&&n.has_boundary||n!=null&&n.canLocate||n!=null&&n.hasGeometry||n!=null&&n.has_geometry||(Number(n==null?void 0:n.boundaryCount)||Number(n==null?void 0:n.boundary_count)||0)>0||Array.isArray(n==null?void 0:n.boundaryList)&&n.boundaryList.length||Array.isArray(n==null?void 0:n.geometryList)&&n.geometryList.length||Array.isArray(n==null?void 0:n.features)&&n.features.length||Array.isArray(n==null?void 0:n.grasslands)&&n.grasslands.some(fp)||Array.isArray(n==null?void 0:n.boundaryRows)&&n.boundaryRows.some(fp)?!0:fp(n)||ene(n).some(fp)}function l_(n={}){const e=CXe.map(i=>DXe(n==null?void 0:n[i]));return e.find(i=>i>0)||e.find(i=>i===0)||0}function DXe(n){if(typeof n=="number")return Number.isFinite(n)?n:0;const e=String(n!=null?n:"").trim();if(!e||e==="--")return 0;const t=e.replace(/,/g,"").match(/-?\d+(?:\.\d+)?/);if(!t)return 0;const i=Number(t[0]);return Number.isFinite(i)?e.includes("万")?i*1e4:i:0}function NXe(n={},e=0,t=new Map){const i=no(n,["pasturesId","pastures_id","pastureId","pasture_id","muhuId","id","value"]),r=no(n,[...a0.pasturesName,"herdsmanName","ownerName","label"],i||"");if(!r&&!i)return null;const a=no(n,["township","townName","areaName","area_name","zoneName","address"]),o=ene(n),s=o.filter(fp),l=i?t.get(String(i)):null,u=(l==null?void 0:l.rows)||[],c=u.length?u:o,d=l_(n)||OXe(c),h=!!(l!=null&&l.hasBoundary||s.length||fp(n));return w7({key:i?`pasture-${i}`:`pasture-${r}-${e}`,type:"pasture",name:r,areaCode:n.areaCode||n.area_code||aL[a],pasturesId:i,areaRange:d,yakNumber:jr(no(n,a0.yakNumber),0),location:n.location,township:a,hasBoundary:h,boundaryCount:u.length||s.length,grasslands:u.length?u:s.length?s:o,source:n})}function kXe(n={},e,t=null){if(!n||typeof n!="object"||e!=null&&e!=="")return null;const i=Object.prototype.hasOwnProperty.call(n,"yak_number"),r=["overload_rate","overloadRate","advice","balanceAdvice","level","conclusion"].some(s=>n[s]!==void 0&&n[s]!==null&&n[s]!==""),a=jr(n.yak_number);if(!i||!r||a===null)return null;const o=jr(t);return o!==null&&o>0?a>o*1.5?a:null:a}function FXe(n,e){const t=jr(n),i=jr(e);return t===null||i===null||i<=-100?null:Math.round(t/(1+i/100))}function OXe(n=[]){return(Array.isArray(n)?n:[]).reduce((e,t)=>{const i=l_(t);return e+(i>0?i:0)},0)}function ene(n={}){const e=[];["grasslands","grasslandList","grasslandRows","boundaryRows","boundaryList","geometryList","landList","plots","features"].forEach(r=>{const a=n==null?void 0:n[r];Array.isArray(a)?e.push(...a):Array.isArray(a==null?void 0:a.rows)?e.push(...a.rows):Array.isArray(a==null?void 0:a.list)?e.push(...a.list):Array.isArray(a==null?void 0:a.data)&&e.push(...a.data)});const i=no(n,["wkt","geo","geom","geometryWkt","shape"]);return(i||n!=null&&n.geometry)&&e.push(tn(wt({},n),{id:(n==null?void 0:n.grasslandId)||(n==null?void 0:n.gid)||(n==null?void 0:n.id),pastureId:(n==null?void 0:n.pastureId)||(n==null?void 0:n.pasturesId)||(n==null?void 0:n.pastures_id)||(n==null?void 0:n.muhuId)||(n==null?void 0:n.id),name:(n==null?void 0:n.grasslandName)||(n==null?void 0:n.name),wkt:i,geometry:n==null?void 0:n.geometry})),e.filter(Boolean)}function fp(n={}){var e,t;return typeof n=="string"?!!n.trim():(n==null?void 0:n.type)==="Feature"||n!=null&&n.type&&(n!=null&&n.coordinates)||(e=n==null?void 0:n.geometry)!=null&&e.type||(t=n==null?void 0:n.geometry)!=null&&t.coordinates||typeof(n==null?void 0:n.geometry)=="string"?!0:!!no(n,["wkt","geo","geom","geometryWkt","shape"])}function BXe(n={}){const e=jr(n.bearingCapacity,0),t=jr(n.livestockCapacity,0),i=jr(n.areaRange,0),r=jr(n.yakNumber,0),a=jr(n.overloadRate,e?(t-e)/e*100:0),o=t-e,s=e?v0(t/e*100,1):0,l=j3(a),u=Math.round(r*Yp.yakToSheepUnit),c=u?v0(t/u,2):1,d=i?v0(e/i,4):Yp.grasslandCapacityPerMu;return{bearing:e,livestock:t,areaRange:i,yakNumber:r,yakSheepUnit:u,pressureFactor:c,bearingCoefficient:d,overloadRate:v0(a,1),delta:o,usageRate:s,risk:l,bearingPercent:Math.max(4,Math.min(100,v0(e/Math.max(e,t,1)*100,1))),livestockPercent:Math.max(4,Math.min(100,v0(t/Math.max(e,t,1)*100,1)))}}function zXe(n={},e=j3(n.overloadRate)){const t=String(n.advice||"").trim(),i=t?t.split(/[。;;\n]/).map(o=>o.trim()).filter(Boolean):[],r=["提高放牧畜禽的密度","增加草地的利用率","密度不能过高"],a=i.filter(o=>r.some(s=>o.includes(s))?!1:e.key==="healthy"?!0:!r.some(s=>o.includes(s)));return[...e.actions||[],...a].filter((o,s,l)=>l.indexOf(o)===s).slice(0,4)}const GXe={class:"grass-livestock-balance"},UXe={class:"balance-screen"},VXe={class:"balance-selector"},HXe={class:"balance-scope-tabs"},WXe=["onClick"],jXe={class:"balance-target-list"},$Xe=["title","onClick"],qXe={key:0},XXe={class:"balance-action-box"},YXe=["disabled"],KXe={key:0,class:"balance-running"},ZXe={class:"balance-running-head"},JXe={class:"balance-core-inner"},QXe={class:"balance-running-title"},eYe={class:"balance-progress-line"},tYe={class:"balance-live-process"},nYe={key:1,class:"balance-waiting"},iYe={class:"balance-wait-core"},rYe={class:"balance-core-ring is-empty"},aYe={class:"balance-core-inner"},oYe={class:"balance-preflight"},sYe={key:2,class:"balance-analysis"},lYe={class:"balance-dashboard"},uYe={class:"balance-object-block"},cYe={class:"balance-core"},dYe={class:"balance-core-inner"},hYe={class:"balance-compare"},fYe={class:"balance-bar-row"},pYe={class:"balance-bar-row is-livestock"},vYe={class:"balance-detail"},mYe={class:"balance-process"},gYe={class:"balance-section-title"},yYe={class:"balance-process-track"},_Ye={class:"balance-decision"},SYe={class:"balance-section-title"},bYe={class:"balance-conclusion"},xYe={class:"balance-advice-list"},wYe=326,TYe=720,AYe=1310,CYe=820,MYe=1800,EYe={__name:"index",emits:["loading-progress","map-ready"],setup(n,{emit:e}){const t=e,i=Wt("county"),r=Wt(""),a=Wt("idle"),o=Wt(0),s=Wt(0),l=Wt({}),u=C5(KW.filter(st=>st.type==="pasture")),c=Wt([]),d=Wt(u);let h=!1,f=0,p=null,m=0,v=0,g=null;const _=Ye(()=>[...KW.filter(st=>st.type!=="pasture"),...c.value,...d.value].map(st=>IXe(l.value[st.key],st))),S=Ye(()=>_.value.filter(st=>st.type==="county")),x=Ye(()=>_.value.filter(st=>st.type==="town")),A=Ye(()=>_.value.filter(st=>st.type==="village")),C=Ye(()=>C5(_.value.filter(st=>st.type==="pasture"))),M=Ye(()=>i.value==="town"?x.value:i.value==="village"?A.value:i.value==="pasture"?C.value:S.value),I=Ye(()=>_.value.find(st=>st.key===r.value)||null),D=Ye(()=>!!I.value),E=Ye(()=>a.value==="running"),P=Ye(()=>D.value&&a.value==="done"),F=Ye(()=>BXe(I.value||{})),V=Ye(()=>[{key:"county",name:"县"},{key:"town",name:"镇"},{key:"village",name:"村"},{key:"pasture",name:"牧户"}]),G=Ye(()=>{var st;return((st=V.value.find(it=>it.key===i.value))==null?void 0:st.name)||"县"}),W=Ye(()=>I.value?I.value.pasturesId?`牧户编号 ${I.value.pasturesId}`:I.value.areaCode?`行政区划 ${I.value.areaCode}`:I.value.township||"核算对象":"等待选择核算对象"),Y=Ye(()=>D.value?P.value?"分析已完成":E.value?"正在执行核算":"已选择,待开始分析":"请先选择具体对象"),Q=Ye(()=>P.value?"草畜平衡分析舱":"草畜平衡分析"),K=Ye(()=>D.value?E.value?"分析中":"待开始":"待选择"),ae=Ye(()=>D.value?E.value?`${I.value.name} 正在分析`:`${I.value.name} 待开始分析`:"先选择一个核算对象"),ie=Ye(()=>D.value?E.value?"正在读取核算参数、执行公式计算,并生成结论与调控建议。":"点击左侧开始分析后,再展示结果、分析过程、结论和建议。":"选择县、镇、村或牧户后,系统才会进入草地承载力核算。"),he=Ye(()=>{const st=F.value;return`${st.delta>0?"超载量":"承载余量"} ${We(Math.abs(st.delta))} 牛点位,承载利用率 ${MT(st.usageRate)}。`}),Ee=Ye(()=>{const st=Math.max(0,Math.min(130,Number(F.value.usageRate)||0));return`${Math.round(st/130*360)}deg`}),He=Ye(()=>{const st=F.value;return[{key:"target",index:"01",name:"对象锁定",plan:"确定县、镇、村或牧户核算口径",desc:"统一行政区划与牧户对象,作为本次草畜平衡分析范围。",status:"已完成"},{key:"params",index:"02",name:"参数校验",plan:"核验草地、牲畜与承载系数",desc:"优先采用接口返回数据,缺失时使用本地基础台账补齐。",status:"已完成"},{key:"model",index:"03",name:"模型核算",plan:"评估草地承载压力与平衡状态",desc:"对理论承载力和实际载畜压力进行比对,识别超载风险。",status:"已完成"},{key:"scheme",index:"04",name:"方案输出",plan:st.delta>0?"形成压减、补饲与轮牧调控方案":"形成持续监测与稳态保持方案",desc:"根据风险等级生成治理建议,供后续调度和监管使用。",status:st.risk.shortLabel||"完成"}]}),xe=Ye(()=>{const st=F.value;return[{key:"target",index:"01",name:"锁定核算对象",desc:"确认行政区划与对象口径",pending:"等待对象确认",expression:"按所选层级锁定本次核算范围",result:"已锁定"},{key:"params",index:"02",name:"核验基础参数",desc:"校验草地、牲畜与承载系数",pending:"等待参数读取",expression:"按接口数据与本地台账进行参数补齐",result:"已校验"},{key:"model",index:"03",name:"评估平衡状态",desc:"识别承载压力与风险等级",pending:"等待模型核算",expression:"比对理论承载能力与实际放牧压力",result:"已评估"},{key:"conclusion",index:"04",name:"生成调控方案",desc:"输出治理建议与监管方向",pending:"等待结论生成",expression:st.delta>0?"生成载畜调控与补饲建议":"生成稳态保持与动态监测建议",result:st.risk.label}]}),Fe=Ye(()=>xe.value[Math.min(s.value,xe.value.length-1)]||xe.value[0]),pt=Ye(()=>[{key:"select",index:"01",name:"对象锁定",desc:D.value?I.value.name:"等待选择",state:D.value?"done":"active"},{key:"params",index:"02",name:"参数读取",desc:P.value?"草地与牦牛参数已确认":"分析后读取",state:E.value?"active":P.value?"done":D.value?"pending":"disabled"},{key:"formula",index:"03",name:"模型推演",desc:P.value?"承载模型已完成":"等待公式计算",state:E.value?"active":P.value?"done":"disabled"},{key:"result",index:"04",name:"结论生成",desc:P.value?F.value.risk.label:"等待建议生成",state:P.value?"done":"disabled"}]),Ot=Ye(()=>P.value?zXe(I.value,F.value.risk):[]);dl(()=>{t("loading-progress",{progress:100}),t("map-ready"),Lt(),J()}),Bl(()=>{h=!0,f+=1,m+=1,v+=1,$e()}),qa(()=>{var st;return(st=I.value)==null?void 0:st.key},()=>{a.value="idle",o.value=0,s.value=0,g=null,$e()});function bt(st){i.value=st,r.value="",a.value="idle"}function ht(st){st&&(i.value=["county","town","village","pasture"].includes(st.type)?st.type:"county",r.value=st.key,a.value="idle")}function Kt(){if(!I.value||E.value)return;a.value="running",o.value=0,s.value=0,$e();const st=Date.now(),it=Tt();g=it,p=window.setInterval(()=>{if(h)return;const Vt=g===it?92:100;o.value=Math.min(Vt,o.value+4),s.value=Math.min(xe.value.length-1,Math.floor(o.value/22))},90),it.finally(()=>rn(this,null,function*(){const Vt=MYe-(Date.now()-st);Vt>0&&(yield new Promise(Zt=>window.setTimeout(Zt,Vt))),!(h||a.value!=="running"||g!==it)&&(g=null,o.value=100,s.value=xe.value.length-1,$e(),a.value="done")}))}function Tt(){return rn(this,null,function*(){const st=I.value;if(!st||l.value[st.key])return null;const it=++f;try{const Vt=yield dXe({areaCode:st.type==="pasture"?void 0:st.areaCode,pasturesId:st.type==="pasture"?st.pasturesId:void 0});return h||it!==f||!Vt?null:(l.value=tn(wt({},l.value),{[st.key]:Vt}),Vt)}catch(Vt){return null}})}function Ae(st){return st.type==="pasture"?st.township||"牧户":st.type==="village"||st.type==="town"?"":"县级对象"}function Lt(){return rn(this,null,function*(){const st=++m,it=x.value.filter(Vt=>Vt==null?void 0:Vt.areaCode).map(Vt=>wt({},Vt));if(it.length)try{const Vt=yield Promise.all(it.map(Zt=>rn(this,null,function*(){try{const nn=yield hXe(Zt.areaCode);return h||st!==m?[]:vt(nn,Zt)}catch(nn){return[]}})));if(h||st!==m)return;c.value=Vt.flat()}catch(Vt){if(h||st!==m)return;c.value=[]}})}function vt(st=[],it={}){const Vt=(Array.isArray(st)?st:[]).filter(Ln=>{const je=k(Ln),Ht=_t(Ln);return!!(je||Ht)}),Zt=Vt.length||1,nn=(jr(it.areaRange,0)||0)/Zt,cn=(jr(it.yakNumber,0)||0)/Zt,an=Ct(it);return Vt.map((Ln,je)=>Ft(Ln,je,it,{areaRange:nn,yakNumber:cn,pressureFactor:an})).filter(Boolean)}function Ft(st={},it=0,Vt={},Zt={}){const nn=k(st),cn=_t(st)||(nn?`村级区划${nn}`:"");if(!nn&&!cn)return null;const an=jr(no(st,["areaRange","area_range","grasslandArea","grassland_area","acreage","area"]),Zt.areaRange),Ln=jr(no(st,["yakNumber","yak_number","number","yakCount","yak_count","livestockCount","livestock_count"]),Zt.yakNumber);return w7({key:`village-${nn||`${Vt.key||Vt.name}-${cn}-${it}`}`,type:"village",name:cn,areaCode:nn,areaRange:an,yakNumber:Ln,township:Vt.name,source:st,pressureFactor:Zt.pressureFactor})}function k(st={}){return String(no(st,["areaCode","area_code","code","value","id","areaId","area_id"],"")||"").trim()}function _t(st={}){return String(no(st,["areaName","area_name","name","label","zoneName","villageName","village_name"],"")||"").trim()}function Ct(st={}){const it=jr(st.yakNumber,0),Vt=jr(st.livestockCapacity,0),Zt=it*Yp.yakToSheepUnit,nn=Zt?Vt/Zt:1;return Number.isFinite(nn)&&nn>0?nn:1}function J(){return rn(this,null,function*(){const st=++v;try{const[it,Vt]=yield Promise.allSettled([Ute("",1,1e4),Vte()]);if(h||st!==v)return;const Zt=it.status==="fulfilled"?it.value:[],nn=Vt.status==="fulfilled"?Vt.value:[],cn=ee(Zt,nn),an=ZW(cn);an.length&&(d.value=an);const Ln=yield Bt(an,st);if(h||st!==v||!Ln.size)return;d.value=ZW(cn,Ln)}catch(it){d.value=u}})}function ee(st=[],it=[]){const Vt=new Map;(Array.isArray(it)?it:[]).forEach(nn=>{xt(nn).forEach(cn=>{Vt.set(cn,wt(wt({},Vt.get(cn)||{}),nn))})});const Zt=Array.isArray(st)&&st.length?st:it;return(Array.isArray(Zt)?Zt:[]).map(nn=>{const cn=xt(nn).map(an=>Vt.get(an)).find(Boolean);return cn?Ue(nn,cn):nn})}function Ue(st={},it={}){const Vt=wt({},st);return Object.entries(it).forEach(([Zt,nn])=>{(Vt[Zt]===void 0||Vt[Zt]===null||Vt[Zt]==="")&&(Vt[Zt]=nn)}),Vt}function xt(st={}){return[st.id,st.pasturesId,st.pastures_id,st.pastureId,st.pasture_id,st.muhuId,st.muhu_id,st.name,st.pasturesName,st.pastures_name,st.muhuName,st.muhu_name,st.pastureName,st.pasture_name].map(it=>String(it||"").trim()).filter(Boolean)}function Bt(){return rn(this,arguments,function*(st=[],it){const Vt=new Map,Zt=st.filter(nn=>nn==null?void 0:nn.pasturesId);return yield Ce(Zt,12,nn=>rn(this,null,function*(){if(!(h||it!==v))try{const cn=yield bM(nn.pasturesId);if(h||it!==v)return;Vt.set(String(nn.pasturesId),{rows:Array.isArray(cn)?cn:[],hasBoundary:s_({grasslands:cn})}),s_({grasslands:cn})&&(d.value=C5(d.value.map(an=>String(an.pasturesId)===String(nn.pasturesId)?tn(wt({},an),{hasBoundary:!0,boundaryCount:Array.isArray(cn)?cn.length:an.boundaryCount,grasslands:Array.isArray(cn)?cn:an.grasslands}):an)))}catch(cn){Vt.set(String(nn.pasturesId),{rows:[],hasBoundary:!1})}})),Vt})}function Ce(){return rn(this,arguments,function*(st=[],it=6,Vt){const Zt=[...st],nn=Array.from({length:Math.min(it,Zt.length)},()=>rn(this,null,function*(){for(;Zt.length&&!h;){const cn=Zt.shift();yield Vt(cn)}}));yield Promise.all(nn)})}function We(st){return Kte((Number(st)||0)/Yp.yakToSheepUnit)}function $e(){p&&(window.clearInterval(p),p=null)}function mt(st){return P.value||E.value&&st<=s.value}function Yt(st){return st(Te(),Pe("div",GXe,[it[15]||(it[15]=O("div",{class:"balance-backdrop","aria-hidden":"true"},[O("div",{class:"balance-orbit is-left"}),O("div",{class:"balance-orbit is-right"}),O("div",{class:"balance-energy-band"})],-1)),O("div",UXe,[gn(Mi,{class:"balance-card balance-target-card",title:"核算对象",width:wYe,height:TYe},{default:mi(()=>{var Vt;return[O("div",VXe,[O("div",HXe,[(Te(!0),Pe(bn,null,Bn(V.value,Zt=>(Te(),Pe("button",{key:Zt.key,type:"button",class:Xn({active:i.value===Zt.key}),onClick:nn=>bt(Zt.key)},De(Zt.name),11,WXe))),128))]),O("div",jXe,[(Te(!0),Pe(bn,null,Bn(M.value,Zt=>{var nn;return Te(),Pe("button",{key:Zt.key,type:"button",class:Xn({active:Zt.key===((nn=I.value)==null?void 0:nn.key)}),title:Zt.name,onClick:cn=>ht(Zt)},[O("span",null,De(Zt.name),1),Ae(Zt)?(Te(),Pe("small",qXe,De(Ae(Zt)),1)):Dn("",!0)],10,$Xe)}),128))]),O("div",XXe,[it[0]||(it[0]=O("span",null,"当前对象",-1)),O("strong",null,De(((Vt=I.value)==null?void 0:Vt.name)||"未选择"),1),O("small",null,De(Y.value),1),O("button",{type:"button",disabled:!D.value||E.value,onClick:Kt},De(E.value?"分析中...":P.value?"重新分析":"开始分析"),9,YXe)])])]}),_:1}),gn(Mi,{class:"balance-card balance-sheet-card",title:Q.value,width:AYe,height:CYe},{default:mi(()=>[O("div",{class:Xn(["balance-sheet",{"is-ready":P.value,"is-running":E.value}])},[it[14]||(it[14]=O("div",{class:"balance-field-lines","aria-hidden":"true"},[O("i"),O("i"),O("i")],-1)),E.value?(Te(),Pe("section",KXe,[O("div",ZXe,[O("div",{class:"balance-core-ring is-running",style:Ji({"--usage-angle":`${o.value*3.6}deg`})},[O("div",JXe,[it[1]||(it[1]=O("span",null,"分析进度",-1)),O("strong",null,De(o.value)+"%",1),O("small",null,De(Fe.value.name),1)])],4),O("div",QXe,[O("span",null,De(I.value.name),1),O("strong",null,De(Fe.value.desc),1),O("small",null,De(Fe.value.expression),1),O("div",eYe,[O("i",{style:Ji({width:`${o.value}%`})},null,4)])])]),O("div",tYe,[(Te(!0),Pe(bn,null,Bn(xe.value,(Vt,Zt)=>(Te(),Pe("div",{key:Vt.key,class:Xn(["balance-live-step",`is-${Yt(Zt)}`])},[O("span",null,De(Vt.index),1),O("div",null,[O("strong",null,De(Vt.name),1),O("p",null,De(mt(Zt)?Vt.expression:Vt.pending),1)]),O("em",null,De(mt(Zt)?Vt.result:"等待"),1)],2))),128))])])):P.value?(Te(),Pe("section",sYe,[O("div",lYe,[O("div",uYe,[O("span",null,De(G.value)+"核算对象",1),O("strong",null,De(I.value.name),1),O("small",null,De(W.value),1)]),O("div",cYe,[O("div",{class:"balance-core-ring",style:Ji({"--usage-angle":Ee.value})},[O("div",dYe,[it[5]||(it[5]=O("span",null,"承载利用率",-1)),O("strong",null,De(Tr(MT)(F.value.usageRate)),1),O("small",null,"超载率 "+De(Tr(MT)(F.value.overloadRate)),1)])],4),it[6]||(it[6]=O("div",{class:"balance-core-caption"},"草地承载力模型",-1))]),O("div",{class:Xn(["balance-verdict-card",`is-${F.value.risk.key}`])},[it[7]||(it[7]=O("span",null,"分析结论",-1)),O("strong",null,De(F.value.risk.label),1),O("small",null,De(F.value.delta>0?"需调控载畜量":"承载能力可覆盖"),1)],2)]),O("div",hYe,[O("div",fYe,[it[9]||(it[9]=O("span",null,"理论承载力",-1)),O("div",null,[O("i",{style:Ji({width:`${F.value.bearingPercent}%`})},null,4)]),O("strong",null,[kr(De(We(F.value.bearing)),1),it[8]||(it[8]=O("em",null,"牛点位",-1))])]),O("div",pYe,[it[11]||(it[11]=O("span",null,"实际载畜量",-1)),O("div",null,[O("i",{style:Ji({width:`${F.value.livestockPercent}%`})},null,4)]),O("strong",null,[kr(De(We(F.value.livestock)),1),it[10]||(it[10]=O("em",null,"牛点位",-1))])])]),O("div",vYe,[O("div",mYe,[O("div",gYe,[it[12]||(it[12]=O("span",null,"分析过程",-1)),O("small",null,De(I.value.year||"当前年度"),1)]),O("div",yYe,[(Te(!0),Pe(bn,null,Bn(pt.value,Vt=>(Te(),Pe("span",{key:`track-${Vt.key}`,class:Xn(`is-${Vt.state}`)},De(Vt.name),3))),128))]),(Te(!0),Pe(bn,null,Bn(He.value,Vt=>(Te(),Pe("div",{key:Vt.key,class:"balance-formula-row"},[O("span",null,De(Vt.index),1),O("div",null,[O("strong",null,De(Vt.name),1),O("p",null,De(Vt.plan),1),O("small",null,De(Vt.desc),1)]),O("em",null,De(Vt.status),1)]))),128))]),O("div",_Ye,[O("div",SYe,[it[13]||(it[13]=O("span",null,"结论与建议",-1)),O("small",null,De(F.value.delta>0?"需要调控":"保持监测"),1)]),O("div",bYe,[O("strong",null,De(F.value.risk.description),1),O("p",null,De(he.value),1)]),O("div",xYe,[(Te(!0),Pe(bn,null,Bn(Ot.value,(Vt,Zt)=>(Te(),Pe("div",{key:`${Vt}-${Zt}`,class:"balance-advice-item"},[O("span",null,De(Zt+1),1),O("p",null,De(Vt),1)]))),128))])])])])):(Te(),Pe("section",nYe,[O("div",iYe,[O("div",rYe,[O("div",aYe,[O("span",null,De(K.value),1),O("strong",null,De(D.value?I.value.name:"草畜平衡"),1),O("small",null,De(D.value?"待执行模型分析":"等待核算对象"),1)])]),O("h2",null,De(ae.value),1),O("p",null,De(ie.value),1)]),O("div",oYe,[O("span",{class:Xn({active:D.value})},"对象锁定",2),it[2]||(it[2]=O("i",null,null,-1)),O("span",{class:Xn({active:D.value})},"等待启动分析",2),it[3]||(it[3]=O("i",null,null,-1)),it[4]||(it[4]=O("span",null,"生成过程与结论",-1))])]))],2)]),_:1},8,["title"])])]))}},tne="/jsyApi",Wh="/openApi",PYe=new Date().getFullYear();function RYe(n,e){return/^https?:\/\//.test(e)?e:`${n}${e.startsWith("/")?e:`/${e}`}`}function LYe(n){if((n==null?void 0:n.success)===!1&&(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code))throw new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"接口请求失败");return ki(n)}function ac(n,e,t,i={}){return su(RYe(n,e),{params:t,timeout:i.timeout||18e3}).then(LYe)}function IYe(){return ac(tne,"/api/yak/distribution").then(n=>nne(n))}function DYe(){return ac(tne,"/api/yak/forecast").then(n=>nne(n))}function JW(n=PYe){return ac(Wh,"/yak/trade/overview",typeof n=="object"?n:{year:n}).then(t=>t||{})}function NYe(){return ac(Wh,"/yak/trade/options").then(n=>n||{})}function QW(n={}){return ac(Wh,"/yak/trade/records",n).then(e=>e||{})}function kYe(n={}){return ac(Wh,"/yak/epidemic/analysis",n).then(e=>e||{})}function ej(n={}){return ac(Wh,"/yak/epidemic/records",n).then(e=>e||{})}function FYe(n={}){return ac(Wh,"/yak/epidemic/stats",n).then(e=>e||{})}function OYe(n={}){return ac(Wh,"/yak/epidemic/village-stats",n).then(e=>e||{})}function BYe(n){return ac(Wh,"/yak/epidemic/detail",{earTag:n}).then(e=>e||null)}function zYe(){return rn(this,null,function*(){return(yield IYe()).map((e,t)=>({key:rv(e,["areaCode","area_code","code","id"],`yak-town-${t}`),name:rv(e,["areaName","area_name","zoneName","townName","name"],`区域${t+1}`),value:oL(rv(e,["number","yakCount","yak_count","count","value"])),unit:"头"})).filter(e=>e.name&&Number.isFinite(e.value)).sort((e,t)=>t.value-e.value)})}function GYe(){return rn(this,null,function*(){return(yield DYe()).map((e,t)=>{const i=rv(e,["month","date","name","time"],`预测${t+1}`);return{key:`${i}-${t}`,name:UYe(i),value:oL(rv(e,["number","count","yakCount","value"])),unit:"头",extra:VYe("增速",rv(e,["speed","growth","growthRate","rate"]))}}).filter(e=>e.name&&Number.isFinite(e.value))})}function nne(n){return Array.isArray(n)?n:Array.isArray(n==null?void 0:n.rows)?n.rows:Array.isArray(n==null?void 0:n.list)?n.list:Array.isArray(n==null?void 0:n.records)?n.records:Array.isArray(n==null?void 0:n.data)?n.data:[]}function rv(n,e,t=""){for(const i of e){const r=n==null?void 0:n[i];if(r!=null&&r!=="")return r}return t}function UYe(n){const e=String(n||""),t=e.match(/(?:^|\D)(1[0-2]|0?[1-9])(?:月|$|-)/);return t?`${Number(t[1])}月`:e}function VYe(n,e){const t=oL(e);return Number.isFinite(t)?`${n}:${t.toLocaleString("zh-CN",{maximumFractionDigits:2})}`:""}function oL(n){if(n==null||n==="")return NaN;const e=Number(String(n).replace(/,/g,"").replace(/%/g,""));return Number.isFinite(e)?e:NaN}const HYe={class:"yak-management"},WYe={key:0,class:"yak-map-loading"},jYe={class:"yak-management-ui"},$Ye={key:0,class:"trade-year-switcher","aria-label":"交易年份切换"},qYe=["onClick"],XYe={key:1,class:"forecast-year-switcher","aria-label":"预测年份切换"},YYe=["onClick"],KYe={class:"yak-left"},ZYe={class:"yak-side-stack is-left"},JYe={class:"estimate-summary-card"},QYe={class:"estimate-flow-row"},eKe={class:"estimate-flow-item"},tKe={class:"estimate-flow-item is-adjustment"},nKe={class:"estimate-result-band"},iKe={class:"forecast-summary-card"},rKe={class:"forecast-result-row"},aKe={class:"forecast-result-main"},oKe={class:"forecast-simple-grid"},sKe={class:"epidemic-overview-card"},lKe={class:"epidemic-main-value"},uKe={class:"epidemic-progress-ring"},cKe={class:"epidemic-overview-grid"},dKe={class:"epidemic-chain-card"},hKe={class:"epidemic-chain-row"},fKe={class:"epidemic-chain-note"},pKe={class:"epidemic-chain-metrics"},vKe={key:0,class:"epidemic-three-pie-card"},mKe={class:"epidemic-three-pie-visual"},gKe={class:"epidemic-three-pie-center"},yKe={class:"epidemic-three-pie-legend"},_Ke={key:1,class:"epidemic-empty"},SKe={class:"trade-overview-card"},bKe={class:"trade-main-metric"},xKe={class:"trade-metric-grid"},wKe={class:"yak-right"},TKe={class:"yak-side-stack is-right"},AKe={class:"forecast-heat-list"},CKe={class:"epidemic-record-table is-double"},MKe={class:"epidemic-record-toolbar"},EKe={class:"epidemic-record-rows"},PKe=["onClick"],RKe={key:0,class:"epidemic-empty"},LKe={class:"trade-cert-card"},IKe={class:"trade-cert-main"},DKe={class:"trade-dest-list"},NKe={key:0,class:"epidemic-empty"},kKe={class:"trade-ledger-table"},FKe={class:"trade-ledger-toolbar"},OKe={class:"trade-ledger-rows"},BKe=["onClick"],zKe={key:0,class:"epidemic-empty"},GKe={class:"trade-ledger-pager"},UKe=["disabled"],VKe=["disabled"],HKe={class:"yak-bottom-topic"},WKe={class:"epidemic-ledger-dialog"},jKe={class:"epidemic-ledger-dialog-head"},$Ke={class:"epidemic-ledger-filters"},qKe=["value"],XKe=["value"],YKe={class:"epidemic-ledger-workspace"},KKe={class:"epidemic-ledger-list"},ZKe=["onClick"],JKe={key:0,class:"epidemic-empty"},QKe={class:"epidemic-ledger-detail"},eZe={class:"epidemic-detail-head"},tZe={class:"epidemic-detail-scroll"},nZe={class:"epidemic-detail-section-title"},iZe={class:"epidemic-detail-grid is-modal"},rZe={key:0,class:"epidemic-detail-section"},aZe={class:"epidemic-modal-photo-strip"},oZe=["src"],sZe={class:"epidemic-ledger-pager"},lZe=["disabled"],uZe=["disabled"],cZe={class:"epidemic-ledger-dialog trade-ledger-dialog"},dZe={class:"epidemic-ledger-dialog-head"},hZe={class:"epidemic-ledger-filters trade-ledger-filters"},fZe=["value"],pZe=["value"],vZe=["value"],mZe={class:"epidemic-ledger-workspace trade-ledger-workspace"},gZe={class:"epidemic-ledger-list trade-ledger-modal-list"},yZe=["onClick"],_Ze={key:0,class:"epidemic-empty"},SZe={class:"epidemic-ledger-detail trade-ledger-detail"},bZe={class:"epidemic-detail-head"},xZe={class:"epidemic-detail-grid is-modal trade-detail-grid"},wZe={class:"is-wide"},TZe={class:"is-wide"},AZe=["disabled"],CZe={class:"epidemic-ledger-pager"},MZe=["disabled"],EZe=["disabled"],Lr=398,Ir=190,PZe="https://qkl-hy.oss-cn-chengdu.aliyuncs.com/yak-vaccine-images",tj=14,ET=12,nj=14,RZe=5e3,H4=6,LZe=4200,IZe={__name:"index",emits:["module-stats"],setup(n,{emit:e}){const t=e,i=Ir*2+12,r=Ir*2+12,a=["#30dcff","#27f0c0","#ffd76c","#7aa7ff","#ff8f6b","#a6f06d"],o=["#24f6c4","#32dcff","#ffe06b","#7ee269","#ff9a62","#9ea7ff"],s=["#30dcff","#ffd76c","#27f0c0","#7aa7ff","#ff8f6b","#a6f06d","#9ea7ff"],l={name:"红原牦牛交易市场",lng:102.562157,lat:32.820484},u=[{key:"structure",name:"畜群结构",color:"#30dcff"},{key:"forecast",name:"畜群预测",color:"#ffd76c"},{key:"epidemic",name:"牦牛防疫",color:"#27f0c0"},{key:"trade",name:"牦牛交易",color:"#ffcf62"}],c=Wt("structure"),d=Wt("2027"),h=Wt(0),f=Wt([]),p=Wt([]),m=Wt({metrics:{}}),v=Wt({rows:[],year:null}),g=Wt({rows:[]}),_=Wt([]),S=Wt(0),x=Wt(!1),A=Wt(""),C=Wt(!1),M=Wt([]),I=Wt(0),D=Wt(1),E=Wt(!1),P=Wt(""),F=Wt(null),V=Wt(null),G=Wt(!1),W=Wt({keyword:"",town:"",medicine:"",startDate:"",endDate:""}),Y=Wt({years:[],latestYear:null}),Q=Wt({metrics:{},hasData:!1}),K=Wt([]),ae=Wt(0),ie=Wt(null),he=Wt(!1),Ee=Wt(""),He=Wt(1),xe=Wt(""),Fe=Wt(""),pt=Wt(!1),Ot=Wt([]),bt=Wt(0),ht=Wt(1),Kt=Wt(!1),Tt=Wt(""),Ae=Wt(null),Lt=Wt({keyword:"",startTown:"",usageType:"",certType:""}),vt=Wt(null),Ft=Wt(!1);let k=null,_t=!1,Ct=null,J=null,ee=0;const Ue=Ye(()=>Zee(d.value)),xt=Ye(()=>Kee+BR),Bt=Ye(()=>Ue.value.stock-Kd),Ce=Ye(()=>{var X;return((X=Lc.find(q=>q.key==="adultCow"))==null?void 0:X.ratio)||0}),We=Ye(()=>{var X;return((X=Lc.find(q=>q.key==="calf"))==null?void 0:X.ratio)||0}),$e=Ye(()=>di(f.value.length?f.value:hM,hM)),mt=Ye(()=>p.value.length>=6?p.value:uGe),Yt=Ye(()=>pGe(Ue.value)),st=Ye(()=>fGe(Ue.value)),it=Ye(()=>{var X;return((X=m.value)==null?void 0:X.metrics)||{}}),Vt=Ye(()=>{var X;return Mt((X=m.value)==null?void 0:X.dateTrend).sort(Ui)}),Zt=Ye(()=>{var X;return Mt((X=m.value)==null?void 0:X.medicineCounts)}),nn=Ye(()=>Zt.value.filter(X=>X.value>0).map((X,q)=>tn(wt({},X),{key:X.key||`${X.name}-${q}`,unit:"条"}))),cn=Ye(()=>nn.value.map(X=>`${X.name}:${X.value}`).join("|")||"epidemic-medicine-empty"),an=Ye(()=>{var X;return Mt((X=m.value)==null?void 0:X.ownerRanks).slice(0,8)}),Ln=Ye(()=>Math.max(Zt.value.filter(X=>X.name!=="未填写").length,1)),je=Ye(()=>{var X;return((X=Zt.value.find(q=>q.name&&q.name!=="未填写"))==null?void 0:X.name)||"-"}),Ht=Ye(()=>ye(it.value,["total","vaccine"])),wn=Ye(()=>ye(it.value,["owners"])),zn=Ye(()=>ye(it.value,["villages"])),Be=Ye(()=>ut.value.length),pn=Ye(()=>{var X;return((X=ut.value[0])==null?void 0:X.name)||"-"}),dn=Ye(()=>{const X=_.value.map(q=>q.operateTime).filter(Boolean).sort();return X.length?gt(X[X.length-1]):"-"}),Un=Ye(()=>{const X=Math.max(...Zt.value.map(q=>Number(q.value||0)),0);return X>0?X:Math.round(Ht.value/Ln.value)}),En=Ye(()=>{var q;const X=nr((q=v.value)==null?void 0:q.rows);return X.length?X:ut.value.map(ce=>({name:ce.name,recordCount:Number(ce.recordCount||0),earTagCount:Number(ce.earTagCount||0),ratio:ce.ratio,source:"ledger"}))}),Tn=Ye(()=>{var q;const X=new Set;return fs((q=g.value)==null?void 0:q.rows).filter(ce=>Number.isFinite(ce.lng)&&Number.isFinite(ce.lat)).map((ce,Je)=>{const Nt=`${ce.lng.toFixed(4)},${ce.lat.toFixed(4)}`,Cn=X.has(Nt)?(Je%3-1)*.012:0;return X.add(Nt),tn(wt({},ce),{name:ce.village,value:ce.earTagCount,unit:"万头",lng:ce.lng+Cn,lat:ce.lat-Cn*.65,displayValue:Number((ce.earTagCount/1e4).toFixed(2)),displayUnit:"万头",rankLabel:`第${Je+1}名`})})}),ut=Ye(()=>{var q;const X=new Map;return Mt((q=m.value)==null?void 0:q.townCounts).forEach(ce=>{const Je=Ve(ce.name);Je&&X.set(Je,Number(X.get(Je)||0)+Number(ce.value||0))}),[...X.entries()].map(([ce,Je])=>{const Nt=Math.round(Je/Ln.value),Cn=Ht.value?Je/Ht.value*100:0;return{name:ce,recordCount:Je,earTagCount:Nt,ratio:Cn}}).sort((ce,Je)=>Number(Je.recordCount||0)-Number(ce.recordCount||0))}),Jt=Ye(()=>_.value.slice(0,13)),hn=Ye(()=>Math.max(Math.ceil(I.value/tj),1)),Nn=Ye(()=>V.value||F.value||{}),Re=Ye(()=>qe(Nn.value)),lt=Ye(()=>{const X=Nn.value||{};return[{title:"基础信息",fields:[et("电子耳标",X.earTag,{wide:!0}),et("台账编号",X.epidemicId)]},{title:"牧户信息",fields:[et("养殖户",X.owner),et("联系电话",Dt(X.phone)),et("证件类型",X.idType),et("证件号码",fn(X.idNo))]},{title:"行政地址",fields:[et("镇/乡",X.town),et("村",X.village),et("详细地址",X.location,{wide:!0})]},{title:"畜只信息",fields:[et("畜种",X.livestockType),et("性别",X.sex),et("畜龄",X.age),et("体重",Gt(X.weight))]},{title:"防疫信息",fields:[et("疫苗/药品",X.medicine),et("防疫类型",X.preventionType),et("免疫方式",X.method),et("剂量",vn(X.dose)),et("免疫时间",gt(X.operateTime)),et("操作员",X.operator)]}].map(q=>tn(wt({},q),{fields:q.fields.filter(Boolean)})).filter(q=>q.fields.length)}),sn=Ye(()=>{var X;return Mt((X=m.value)==null?void 0:X.townCounts).map(q=>q.name)}),Pi=Ye(()=>Zt.value.map(X=>X.name).filter(X=>X&&X!=="未填写")),er=Ye(()=>{var X;return((X=Q.value)==null?void 0:X.metrics)||{}}),_e=Ye(()=>{var X,q,ce,Je,Nt,Cn,Fi,Ki;return jt((X=Y.value)==null?void 0:X.years,(q=Q.value)==null?void 0:q.availableYears,(ce=Q.value)==null?void 0:ce.available_years,(Je=Q.value)==null?void 0:Je.yearSummary,(Nt=Q.value)==null?void 0:Nt.year_summary,(Cn=Q.value)==null?void 0:Cn.latestYear,(Fi=Q.value)==null?void 0:Fi.latest_year,(Ki=Q.value)==null?void 0:Ki.year)}),ze=Ye(()=>{var X,q;return Sn(((X=Q.value)==null?void 0:X.monthTrend)||((q=Q.value)==null?void 0:q.month_trend),"name")});Ye(()=>{var X,q;return Hn(((X=Q.value)==null?void 0:X.yearSummary)||((q=Q.value)==null?void 0:q.year_summary))});const Qe=Ye(()=>{var X,q;return Sn(((X=Q.value)==null?void 0:X.startTownCounts)||((q=Q.value)==null?void 0:q.start_town_counts),"name")}),At=Ye(()=>{var X,q;return Sn(((X=Q.value)==null?void 0:X.usageCounts)||((q=Q.value)==null?void 0:q.usage_counts),"name")}),ke=Ye(()=>{const X=Qe.value.map(ce=>{const Je=String(ce.name||"").trim(),Nt=Ve(Je),Cn=tr(Nt||Je);return tn(wt({},ce),{rawName:Je,name:Cn,displayName:Cn,town:Nt,mapTownName:Nt})}).filter(ce=>ce.name&&ce.name!=="未填写").slice(0,10),q=Math.max(...X.map(ce=>ce.headCount),1);return X.map((ce,Je)=>tn(wt({},ce),{key:ce.key||`${ce.mapTownName||ce.name}-${Je}`,value:ce.headCount,unit:"头",ratio:Math.max(8,Math.round(ce.headCount/q*100))}))}),ft=Ye(()=>K.value.slice(0,ET)),en=Ye(()=>Math.max(Math.ceil(ae.value/ET),1)),we=Ye(()=>Math.max(Math.ceil(bt.value/nj),1)),Xe=Ye(()=>Ae.value||{}),Pt=Ye(()=>Xe.value.certId||Xe.value.factoryCode||""),Rt=Ye(()=>{var q,ce;const X=pi(((q=Y.value)==null?void 0:q.startTowns)||((ce=Y.value)==null?void 0:ce.start_towns));return X.length?X:yi(Qe.value.map(Je=>Je.name))}),Et=Ye(()=>{var q,ce;const X=pi(((q=Y.value)==null?void 0:q.usageTypes)||((ce=Y.value)==null?void 0:ce.usage_types));return X.length?X:yi(At.value.map(Je=>Je.name))}),Fn=Ye(()=>{var q,ce,Je,Nt;const X=hi(((q=Y.value)==null?void 0:q.certTypeOptions)||((ce=Y.value)==null?void 0:ce.cert_type_options));return X.length?X:pi(((Je=Y.value)==null?void 0:Je.certTypes)||((Nt=Y.value)==null?void 0:Nt.cert_types)).map(Cn=>({value:Cn,label:Cn}))}),Qn=Ye(()=>ke.value.map((X,q)=>({key:X.key||`${X.name}-${q}`,name:X.displayName||X.name,displayName:X.displayName||X.name,rawName:X.rawName,town:X.mapTownName||X.town||Ve(X.name),mapTownName:X.mapTownName||X.town||Ve(X.name),value:X.headCount,headCount:X.headCount,recordCount:X.recordCount,ratio:X.ratio,unit:"头"}))),ci=Ye(()=>$e.value.map(X=>tn(wt({},X),{adultCowRatio:Ce.value,calfRatio:We.value,adultCow:Math.round(X.count*Ce.value/100),calf:Math.round(X.count*We.value/100)}))),li=Ye(()=>{const X=ci.value,q=X.length,ce=Math.max(Math.ceil(q/H4),1),Je=h.value%ce,Nt=Je*H4,Cn=Math.min(Nt+H4,q);return{page:Je,pageCount:ce,start:Nt,end:Cn,total:q,rows:X.slice(Nt,Cn)}}),Z=Ye(()=>c.value==="forecast"?Yt.value:$e.value),H=Ye(()=>c.value==="forecast"?"forecast":"count"),w=Ye(()=>M7(Z.value,H.value)),T=Ye(()=>({key:"yak-marks-layer",layerName:"ne:daping_yak_marks",name:"牦牛识别标记",opacity:.96,queryBuffer:10,legends:[{key:"yak-marks",name:"牦牛",fillColor:"#FFFF00",strokeColor:"#FFFF00",selectable:!1}]})),R=Ye(()=>{var ce;const q=fs((ce=g.value)==null?void 0:ce.rows).map(Je=>ir(Je.town,Je.village)).filter(Boolean);return{key:"yak-epidemic-village-boundary",sourceType:"wfs",layerName:"ne:t_pastures_map",styles:"牧场样式",name:"防疫村边界",opacity:.86,queryBuffer:8,cqlFilter:q.length?q.join(" OR "):"EXCLUDE",legends:[{key:"yak-epidemic-village-boundary",name:"防疫村边界",fillColor:"#24F6C4",strokeColor:"#FFF06A",selectable:!1}]}}),N=Ye(()=>c.value==="epidemic"?R.value:c.value==="trade"?null:T.value),z=Ye(()=>c.value==="trade"?{scope:"trade-flow",title:`${ie.value||""}出栏来源`,metricLabel:"来源",unit:"头",source:tn(wt({},l),{total:Ne("headCount")}),rows:Qn.value}:{scope:c.value==="epidemic"?"village":"town",hideTownNames:c.value==="epidemic",title:c.value==="forecast"?`${Ue.value.shortLabel}预测存栏`:c.value==="epidemic"?"村级防疫信息":"乡镇估算存栏",metricLabel:c.value==="forecast"?"预测":c.value==="epidemic"?"防疫":"存栏",unit:"万头",rows:c.value==="epidemic"?Tn.value:w.value.map(X=>({name:X.name,value:Number((X.value/1e4).toFixed(2)),unit:"万头"}))}),U=Ye(()=>({color:a,tooltip:Ja(X=>`${X.name}
    结构占比:${X.percent}%
    估算数量:${Si(X.value)}头
    来源:无人机识别 + 专家共识模型`),legend:{orient:"vertical",right:8,top:"middle",itemWidth:9,itemHeight:9,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:11}},series:[{name:"畜群结构",type:"pie",radius:["46%","70%"],center:["33%","52%"],avoidLabelOverlap:!0,label:{color:"#fff",fontSize:11,formatter:"{d}%"},labelLine:{lineStyle:{color:"rgba(223, 250, 255, 0.36)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.9)",borderWidth:3},data:Lc.map(X=>({name:X.name,value:X.count}))}]})),ue=Ye(()=>({color:a,tooltip:Ja(X=>`${X.name}
    占比:${X.percent}%
    估算数量:${Si(X.value)}头`),legend:{orient:"vertical",right:6,top:"middle",itemWidth:8,itemHeight:8,itemGap:6,formatter(X){const q=Lc.find(ce=>ce.name===X);return q?`${X} ${Yh(q.ratio)} ${ua(q.count)}头`:X},textStyle:{color:"rgba(222, 250, 255, 0.82)",fontSize:10,rich:{}}},graphic:{type:"text",left:"28%",top:"45%",style:{text:ua(Kd),fill:"#ffffff",fontFamily:"D-DIN, Arial, sans-serif",fontSize:19,fontWeight:900,textAlign:"center"}},series:[{name:"结构明细",type:"pie",radius:["34%","66%"],center:["31%","54%"],avoidLabelOverlap:!0,label:{color:"#fff",fontSize:10,formatter:"{d}%"},labelLine:{length:8,length2:5,lineStyle:{color:"rgba(223, 250, 255, 0.35)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3,shadowBlur:8,shadowColor:"rgba(0, 0, 0, 0.28)"},data:Lc.map(X=>({name:X.name,value:X.count}))}]})),pe=Ye(()=>({color:["#ffd76c","#30dcff"],tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(X){const q=X.map(ce=>`${ce.marker}${ce.seriesName}:${Si(Math.abs(ce.value))}头`);return`${X[0].name}
    ${q.join("
    ")}`}}),legend:{top:4,right:12,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(222, 250, 255, 0.8)",fontSize:11}},grid:{left:22,right:22,top:32,bottom:12,containLabel:!0},xAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:X=>ua(Math.abs(X))},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"category",data:ST.map(X=>X.age),axisLabel:{color:"rgba(223, 250, 255, 0.82)",fontSize:11},axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"母牛",type:"bar",stack:"gender",barWidth:12,data:ST.map(X=>-X.cow),itemStyle:{borderRadius:[7,0,0,7]}},{name:"公牛",type:"bar",stack:"gender",barWidth:12,data:ST.map(X=>X.bull),itemStyle:{borderRadius:[0,7,7,0]}}]})),de=Ye(()=>{const X=$e.value,q=X.map(ce=>ce.count);return{color:a,tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(ce){const Je=ce.map(Nt=>`${Nt.marker}${Nt.seriesName}:${Si(Nt.value)}头`);return`${ce[0].name}
    ${Je.join("
    ")}
    估算存栏:${Si(q[ce[0].dataIndex])}头
    结构依据:专家共识比例`}}),legend:{top:-2,right:0,itemWidth:8,itemHeight:6,itemGap:6,textStyle:{color:"rgba(222, 250, 255, 0.75)",fontSize:10}},grid:{left:54,right:30,top:22,bottom:8},xAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.56)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"category",inverse:!0,data:X.map(ce=>ce.name),axisLabel:{color:"rgba(223, 250, 255, 0.82)",fontSize:10,interval:0},axisLine:{show:!1},axisTick:{show:!1}},series:Lc.map(ce=>({name:ce.name.replace("(≤1岁)","").replace("(1-2岁)",""),type:"bar",stack:"town",barWidth:X.length>8?6:11,data:X.map(Je=>Math.round(Je.count*ce.ratio/100))}))}}),se=Ye(()=>ms($e.value,"count","头",{style:"ladder",tooltipFormatter(X){const q=$e.value[X.dataIndex];return`${q.name}
    估算存栏:${Si(q.count)}头
    来源:无人机识别`}})),re=Ye(()=>{const X=li.value,q=X.rows,ce=Math.max(...q.map(Je=>Je.adultCow+Je.calf),1);return{color:["#30dcff","#ffd76c"],animationDurationUpdate:700,animationEasingUpdate:"cubicOut",tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(Je){const Nt=q[Je[0].dataIndex],Cn=Je.filter(Fi=>["成年母牛","幼畜"].includes(Fi.seriesName)).map(Fi=>`${Fi.marker}${Fi.seriesName}:${Si(Fi.value)}头`);return`${Nt.name}
    母幼合计:${Si(Nt.adultCow+Nt.calf)}头
    ${Cn.join("
    ")}
    依据:无人机识别 + 专家共识模型`}}),legend:{data:["成年母牛","幼畜"],top:2,left:2,itemWidth:10,itemHeight:7,itemGap:9,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},graphic:X.total>H4?{type:"text",right:4,top:3,silent:!0,style:{text:`${X.start+1}-${X.end} / ${X.total}`,fill:"rgba(222, 250, 255, 0.62)",fontSize:10,fontWeight:600}}:void 0,grid:{left:18,right:18,top:42,bottom:44,containLabel:!1},xAxis:{type:"category",data:q.map(Je=>Je.name),axisLabel:{color:"rgba(223, 250, 255, 0.78)",fontSize:10,lineHeight:12,interval:0,margin:8,formatter:co},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"value",max:Math.ceil(ce*1.28),axisLabel:{show:!1},axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.08)",type:"dashed"}}},series:[{name:"基础群规模",type:"bar",barWidth:15,barGap:"-100%",data:q.map(Je=>Je.adultCow+Je.calf),tooltip:{show:!1},itemStyle:{borderRadius:[8,8,1,1],color:"rgba(48, 220, 255, 0.07)"},silent:!0},{name:"成年母牛",type:"bar",stack:"foundation",barWidth:15,data:q.map(Je=>Je.adultCow),itemStyle:{borderRadius:[1,1,0,0],color:new po(0,0,0,1,[{offset:0,color:"rgba(48, 220, 255, 0.34)"},{offset:1,color:"#30dcff"}])}},{name:"幼畜",type:"bar",stack:"foundation",barWidth:15,data:q.map(Je=>Je.calf),itemStyle:{borderRadius:[8,8,1,1],color:new po(0,0,0,1,[{offset:0,color:"#ffd76c"},{offset:1,color:"rgba(255, 215, 108, 0.2)"}])},label:{show:!0,position:"top",formatter:({dataIndex:Je})=>ua(q[Je].adultCow+q[Je].calf),color:"#ffffff",fontSize:10,fontWeight:700}}]}}),Oe=Ye(()=>{const X=fW.slice().sort((Je,Nt)=>Nt.value-Je.value),q=fW.reduce((Je,Nt)=>Je+Nt.value,0),ce=X.map(Je=>Je.yoy||0);return{color:X.map(Je=>Je.color),tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(Je){const Nt=X[Je[0].dataIndex];return`${Nt.label}
    数量:${Si(Nt.value)}头
    占比:${Yh(Nt.value/q*100)}
    同比:${Nt.yoy>0?"+":""}${Nt.yoy}%`}}),grid:{left:36,right:30,top:20,bottom:34},xAxis:{type:"category",data:X.map(Je=>Je.label),axisLabel:{color:"rgba(223, 250, 255, 0.76)",fontSize:10,interval:0,margin:10},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.24)"}},axisTick:{show:!1}},yAxis:[{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.52)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.09)",type:"dashed"}}},{type:"value",min:Math.min(-2,Math.floor(Math.min(...ce)-1)),max:Math.max(8,Math.ceil(Math.max(...ce)+1)),axisLabel:{color:"rgba(255, 215, 108, 0.68)",fontSize:10,formatter:"{value}%"},splitLine:{show:!1},axisLine:{show:!1},axisTick:{show:!1}}],series:[{name:"数量",type:"bar",barWidth:16,data:X.map((Je,Nt)=>({value:Je.value,itemStyle:{borderRadius:[8,8,2,2],color:new po(0,0,0,1,[{offset:0,color:Je.color},{offset:.72,color:`${Je.color}cc`},{offset:1,color:`${Je.color}18`}]),shadowBlur:Nt===0?12:7,shadowColor:Je.color},label:{show:!0,position:"top",color:Nt===0?"#ffd76c":"#ffffff",fontSize:10,formatter:({value:Cn})=>ua(Cn)}}))},{name:"同比",type:"line",yAxisIndex:1,smooth:!0,symbol:"circle",symbolSize:6,data:ce,lineStyle:{width:2,color:"#ffd76c"},itemStyle:{color:"#ffd76c",borderColor:"rgba(3, 18, 28, 0.9)",borderWidth:2},label:{show:!0,position:"top",color:"#ffd76c",fontSize:10,formatter:({value:Je})=>`${Je>0?"+":""}${Je}%`}}]}}),be=Ye(()=>{const X=Jee(Ue.value);return{color:["#30dcff","#ffd76c","#ff8f6b"],tooltip:tn(wt({},Ja()),{trigger:"axis"}),legend:{top:4,right:8,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},grid:{left:44,right:40,top:34,bottom:28},xAxis:{type:"category",boundaryGap:!1,data:X.labels,axisLabel:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,interval:Ue.value.months>18?4:Ue.value.months>12?2:1},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.28)"}},axisTick:{show:!1}},yAxis:[{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.48)",fontSize:10,formatter:ua},splitLine:{show:!1}}],series:[u1("预测存栏",X.stock,"#30dcff",0,!0),u1("繁殖补充",X.births,"#ffd76c",1),u1("出栏扣减",X.outflow,"#ff8f6b",1)]}}),me=Ye(()=>({color:["#30dcff","#ffd76c"],tooltip:tn(wt({},Ja()),{trigger:"axis"}),legend:{top:4,right:12,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},grid:{left:40,right:42,top:34,bottom:28},xAxis:{type:"category",data:mt.value.map(X=>X.month||X.name),axisLabel:{color:"rgba(223, 250, 255, 0.68)",fontSize:10,interval:1},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.26)"}},axisTick:{show:!1}},yAxis:[{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.48)",fontSize:10},splitLine:{show:!1}}],series:[{name:"数量",type:"bar",barWidth:12,data:mt.value.map(X=>X.count||X.value),itemStyle:{borderRadius:[8,8,0,0],color:new po(0,0,0,1,[{offset:0,color:"#30dcff"},{offset:1,color:"rgba(48, 220, 255, 0.08)"}])}},{name:"增速",type:"line",yAxisIndex:1,smooth:!0,symbolSize:5,data:mt.value.map(X=>X.speed||X.growthRate||0),lineStyle:{width:2.4,color:"#ffd76c"},itemStyle:{color:"#ffd76c"}}]})),ge=Ye(()=>({tooltip:Ja(),radar:{center:["50%","54%"],radius:"68%",splitNumber:4,indicator:pW.map(X=>({name:X.name,max:100})),axisName:{color:"rgba(223, 250, 255, 0.76)",fontSize:11},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.22)"}},splitArea:{areaStyle:{color:["rgba(48, 220, 255, 0.04)","rgba(39, 240, 192, 0.02)"]}},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.18)"}}},series:[{type:"radar",data:[{name:"预测因子",value:pW.map(X=>X.value),areaStyle:{color:"rgba(48, 220, 255, 0.22)"},lineStyle:{color:"#30dcff",width:2},itemStyle:{color:"#ffd76c"}}]}]})),Ze=Ye(()=>ms(Yt.value,"forecast","头")),fe=Ye(()=>{const X=st.value;return{color:a,tooltip:Ja(q=>{var Je;const ce=X.find(Nt=>Nt.name===q.name);return`${q.name}
    预测占比:${Yh((Je=ce==null?void 0:ce.ratio)!=null?Je:q.percent)}
    预测数量:${Si((ce==null?void 0:ce.count)||0)}头`}),legend:{orient:"vertical",right:4,top:"middle",itemWidth:8,itemHeight:8,itemGap:6,formatter(q){const ce=X.find(Je=>Je.name===q);return ce?`${q} ${Yh(ce.ratio)}`:q},textStyle:{color:"rgba(222, 250, 255, 0.8)",fontSize:10}},series:[{name:"期末结构预测",type:"pie",radius:["38%","66%"],center:["32%","54%"],startAngle:118,avoidLabelOverlap:!0,label:{color:"#fff",fontSize:10,formatter:({percent:q})=>q>=4?`${q}%`:""},labelLine:{length:8,length2:5,lineStyle:{color:"rgba(223, 250, 255, 0.35)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3},data:X.map(q=>({name:q.name,value:q.count}))}]}}),B=Ye(()=>({color:["#ffd76c","#ff8f6b","#7aa7ff"],tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"}}),legend:{top:4,right:8,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},grid:{left:44,right:26,top:34,bottom:28},xAxis:{type:"category",data:Hs.map(X=>X.shortLabel),axisLabel:{color:"rgba(223, 250, 255, 0.76)",fontSize:11},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.26)"}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},series:[{name:"繁殖补充",type:"bar",barWidth:12,data:Hs.map(X=>X.births),itemStyle:{borderRadius:[7,7,0,0]}},{name:"出栏流出",type:"bar",barWidth:12,data:Hs.map(X=>-X.outflow),itemStyle:{borderRadius:[0,0,7,7]}},{name:"稳态校正",type:"line",smooth:!0,symbolSize:6,data:Hs.map(X=>X.correction),lineStyle:{width:2.4}}]})),te=Ye(()=>{const X=Yt.value,q=Math.max(...X.map(ce=>Math.abs(ce.change)),1);return X.map(ce=>tn(wt({},ce),{width:Math.max(8,Math.round(Math.abs(ce.change)/q*100))}))}),oe=Ye(()=>{const X=Vt.value,q=X.map(Je=>Je.value),ce=Math.max(...q,1);return{color:["#27f0c0","#ffd76c"],tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"line",lineStyle:{color:"rgba(39, 240, 192, 0.34)"}},formatter(Je){const Nt=Je[0];return`${Nt.name}
    防疫记录:${Si(Nt.value)}条`}}),grid:{left:42,right:24,top:20,bottom:28},xAxis:{type:"category",data:X.map(Je=>Je.name),axisLabel:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,interval:Math.max(Math.floor(X.length/7),0)},axisLine:{lineStyle:{color:"rgba(39, 240, 192, 0.22)"}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(39, 240, 192, 0.1)",type:"dashed"}}},series:[{name:"防疫记录",type:"bar",barMaxWidth:12,data:q,itemStyle:{borderRadius:[7,7,0,0],color:new po(0,0,0,1,[{offset:0,color:"#27f0c0"},{offset:1,color:"rgba(39, 240, 192, 0.08)"}])},label:{show:!0,position:"top",color:"rgba(230, 255, 249, 0.92)",fontSize:10,formatter:({value:Je})=>Je>=ce*.42?ua(Je):""}},{name:"作业趋势",type:"line",smooth:!0,showSymbol:!1,data:q,lineStyle:{width:2.4,color:"#ffd76c"}}]}}),Ie=Ye(()=>{const X=En.value,q=X.length>8?10:12,ce=q+8,Je=X.map(br=>Number(br.recordCount||0)),Nt=X.map(br=>Number(br.earTagCount||0)),Cn=Math.max(...Je,1),Fi=X.map(()=>Math.ceil(Cn*1.08)),Ki=new po(0,0,0,1,[{offset:0,color:"rgba(48, 220, 255, 0.18)"},{offset:.48,color:"rgba(48, 220, 255, 0.06)"},{offset:1,color:"rgba(48, 220, 255, 0.02)"}]),wr=new po(0,0,0,1,[{offset:0,color:"#31f7ff"},{offset:.36,color:"#1cbcff"},{offset:1,color:"#266dff"}]);return{color:["#31f7ff","#ffe06b"],title:{text:`台账总量:{value|${ua(Ht.value)}条}`,right:0,top:0,textStyle:{color:"#fff",fontSize:12,fontWeight:500,rich:{value:{color:"#22f1ff",borderColor:"#14bdf4",borderWidth:1,borderRadius:2,padding:[2,6,3,6],fontSize:12,fontWeight:700}}}},tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(br){const _r=X[br[0].dataIndex];return[`${_r.name}`,`防疫记录:${Si(_r.recordCount)}条`,`耳标数量:${Si(_r.earTagCount)}头`,"数据来源:防疫台账"].join("
    ")}}),legend:[{data:["防疫记录"],top:0,left:0,itemWidth:10,itemHeight:10,icon:"circle",textStyle:{color:"#fff",fontSize:11},selectedMode:!1},{data:["耳标数"],top:0,left:82,itemWidth:10,itemHeight:10,icon:"circle",textStyle:{color:"#fff",fontSize:11},selectedMode:!1}],grid:{left:36,right:8,top:38,bottom:50},xAxis:{type:"category",data:X.map(br=>br.name),axisLabel:{color:"#fff",fontSize:10,interval:0,formatter:wa},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{type:"value",name:"数量/条",max:Math.ceil(Cn*1.2),nameTextStyle:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,align:"left"},axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:ua},axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(51, 89, 113, 0.16)",type:"dashed"}}},series:[{name:"统计底柱",type:"bar",barWidth:ce,barGap:"-100%",data:Fi,tooltip:{show:!1},silent:!0,z:1,itemStyle:{borderRadius:[8,8,1,1],borderColor:"rgba(48, 220, 255, 0.22)",borderWidth:1,color:Ki}},{name:"防疫记录",type:"bar",barGap:"-100%",barWidth:q,barMinHeight:2,z:3,data:Je.map(br=>({value:br,itemStyle:{borderRadius:[8,8,1,1],borderColor:"rgba(200, 252, 255, 0.22)",borderWidth:1,color:wr,shadowBlur:10,shadowColor:"rgba(49, 247, 255, 0.28)"}}))},{name:"顶部高光",type:"pictorialBar",symbol:"diamond",symbolSize:[q+7,5],symbolOffset:[0,-3],symbolPosition:"end",z:8,tooltip:{show:!1},data:Je.map(br=>({value:br,itemStyle:{color:"rgba(207, 252, 255, 0.88)",shadowBlur:8,shadowColor:"rgba(49, 247, 255, 0.72)"}}))},{name:"底座光影",type:"pictorialBar",symbol:"diamond",symbolSize:[ce+3,5],symbolOffset:[0,3],z:2,tooltip:{show:!1},data:Je,itemStyle:{color:"rgba(48, 220, 255, 0.24)",shadowBlur:10,shadowColor:"rgba(48, 220, 255, 0.45)"}},{name:"耳标数",type:"line",smooth:!0,showSymbol:!1,z:9,data:Nt,lineStyle:{width:2.2,color:"#ffe06b",shadowBlur:8,shadowColor:"rgba(255, 224, 107, 0.5)"},itemStyle:{color:"#ffe06b"}}]}}),Ge=Ye(()=>{const X=an.value;return{tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(q){const ce=X[q[0].dataIndex];return`${ce.name}
    防疫记录:${Si(ce.value)}条`}}),grid:{left:74,right:42,top:12,bottom:8},xAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.52)",fontSize:10,formatter:ua},axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(39, 240, 192, 0.08)",type:"dashed"}}},yAxis:{type:"category",inverse:!0,data:X.map(q=>q.name),axisLabel:{color:"rgba(223, 250, 255, 0.82)",fontSize:10,interval:0},axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"记录",type:"bar",barWidth:9,data:X.map((q,ce)=>({value:q.value,itemStyle:{borderRadius:[0,8,8,0],color:new po(0,0,1,0,[{offset:0,color:"rgba(48, 220, 255, 0.12)"},{offset:.62,color:["#27f0c0","#30dcff","#ffd76c"][ce%3]},{offset:1,color:"#ffffff"}])}})),label:{show:!0,position:"right",color:"#eaffff",fontSize:10,formatter:({value:q})=>ua(q)}},{type:"scatter",symbolSize:7,data:X.map(q=>q.value),itemStyle:{color:"#ffd76c",shadowBlur:8,shadowColor:"#ffd76c"}}]}}),nt=Ye(()=>{const X=ze.value;return{color:["#30dcff","#ffd76c"],tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(q){const ce=q.find(Nt=>Nt.seriesName==="流通头数"),Je=q.find(Nt=>Nt.seriesName==="出证记录");return`${(ce==null?void 0:ce.axisValue)||""}
    流通头数:${Si((ce==null?void 0:ce.value)||0)}头
    出证记录:${Si((Je==null?void 0:Je.value)||0)}条`}}),legend:{top:4,right:10,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(255, 255, 255, 0.88)",fontSize:10}},grid:{left:42,right:38,top:34,bottom:28},xAxis:{type:"category",data:X.map(q=>q.name),axisLabel:{color:"rgba(255, 255, 255, 0.8)",fontSize:10,interval:1},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.24)"}},axisTick:{show:!1}},yAxis:[{type:"value",axisLabel:{color:"rgba(255, 255, 255, 0.76)",fontSize:10,formatter:ua},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.09)",type:"dashed"}}},{type:"value",axisLabel:{color:"rgba(255, 255, 255, 0.74)",fontSize:10,formatter:ua},splitLine:{show:!1}}],series:[{name:"流通头数",type:"bar",barMaxWidth:13,data:X.map(q=>q.headCount),itemStyle:{borderRadius:[7,7,0,0],color:new po(0,0,0,1,[{offset:0,color:"#30dcff"},{offset:1,color:"rgba(48, 220, 255, 0.08)"}])}},{name:"出证记录",type:"line",yAxisIndex:1,smooth:!0,symbolSize:5,data:X.map(q=>q.recordCount),lineStyle:{width:2.2,color:"#ffd76c"},itemStyle:{color:"#ffd76c",borderColor:"rgba(3, 18, 28, 0.9)",borderWidth:2}}]}}),at=Ye(()=>ms(Qe.value.slice(0,10),"headCount","头",{colors:s,style:"ladder",axisTextColor:"rgba(255, 255, 255, 0.88)",dimAxisTextColor:"rgba(255, 255, 255, 0.74)",tooltipFormatter(X){const q=Qe.value[X.dataIndex];return`${q.name}
    流通头数:${Si(q.headCount)}头
    出证记录:${Si(q.recordCount)}条`}})),St=Ye(()=>{const X=At.value;return{color:s,tooltip:Ja(q=>{const ce=X.find(Je=>Je.name===q.name);return`${q.name}
    占比:${q.percent}%
    流通头数:${Si(q.value)}头
    出证记录:${Si((ce==null?void 0:ce.recordCount)||0)}条`}),legend:{orient:"vertical",right:4,top:"middle",itemWidth:8,itemHeight:8,itemGap:6,textStyle:{color:"rgba(255, 255, 255, 0.88)",fontSize:10},formatter(q){const ce=X.find(Je=>Je.name===q);return ce?`${q} ${ua(ce.headCount)}头`:q}},series:[{name:"用途结构",type:"pie",radius:["38%","64%"],center:["32%","54%"],startAngle:110,label:{color:"#fff",fontSize:10,formatter:({percent:q})=>q>=3?`${q}%`:""},labelLine:{length:8,length2:5,lineStyle:{color:"rgba(223, 250, 255, 0.36)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3},data:X.map(q=>({name:q.name,value:q.headCount}))}]}}),zt=Ye(()=>{const X=[{name:"省外A证",value:Ne("outProvinceHeads","aCertHeads")},{name:"省内B证",value:Ne("inProvinceHeads","bCertHeads")}];return{color:["#ffd76c","#30dcff"],tooltip:Ja(q=>`${q.name}
    流通头数:${Si(q.value)}头
    占比:${q.percent}%`),series:[{type:"pie",radius:["48%","72%"],center:["50%","52%"],label:{show:!1},labelLine:{show:!1},itemStyle:{borderColor:"rgba(3, 18, 31, 0.92)",borderWidth:3},data:X}]}});dl(()=>{l1(),ea(),_a(),vi(),kt(),Vn()}),Bl(()=>{var X,q;_t=!0,Wn(),ti(),(q=(X=vt.value)==null?void 0:X.destroyMap)==null||q.call(X)}),qa([c,Ue,$e,Un,Ht,ie,er],()=>{sd()},{immediate:!0}),qa(c,()=>{kt(),Vn()}),qa(li,X=>{h.value>=X.pageCount&&(h.value=0),Vn()});function qt(X){d.value=X,kt()}function kt(){Wn(),!(c.value!=="forecast"||_t)&&(Ct=window.setInterval(On,RZe))}function On(){const X=Hs.findIndex(ce=>ce.key===d.value),q=X>=0?(X+1)%Hs.length:0;d.value=Hs[q].key}function Wn(){Ct&&(window.clearInterval(Ct),Ct=null)}function Vn(){ti(),!(c.value!=="structure"||_t||li.value.pageCount<=1)&&(J=window.setInterval(ii,LZe))}function ii(){const X=li.value.pageCount;X<=1||(h.value=(h.value+1)%X)}function ti(){J&&(window.clearInterval(J),J=null)}function di(X=[],q=[]){const ce=new Map;return q.forEach(Je=>{const Nt=tr(Je.name);Nt&&ce.set(Nt,tn(wt({},Je),{name:Nt,count:Number(Je.count||0)}))}),X.forEach(Je=>{const Nt=tr(Je.name);if(!Nt)return;const Cn=ce.get(Nt)||{};ce.set(Nt,tn(wt(wt({},Cn),Je),{name:Nt,count:Number.isFinite(Number(Je.count))?Number(Je.count):Number(Cn.count||0)}))}),[...ce.values()].sort((Je,Nt)=>Number(Nt.count||0)-Number(Je.count||0))}function tr(X){return dM(X||"").replace("色地镇","色地乡").replace("瓦切镇","瓦切乡").replace("安曲镇","安曲乡").replace("龙日镇","龙日乡")}function Ve(X){return String(X||"").trim().replace("色地乡","色地镇").replace("瓦切乡","瓦切镇").replace("安曲乡","安曲镇").replace("龙日乡","龙日镇")}function Mt(X=[]){return Array.isArray(X)?X.map((q,ce)=>{var Je,Nt,Cn;return{key:q.key||q.id||`${q.name||q.label||"item"}-${ce}`,name:String(q.name||q.label||q.town||q.village||"未填写"),value:Number((Cn=(Nt=(Je=q.value)!=null?Je:q.count)!=null?Nt:q.total)!=null?Cn:0)}}).filter(q=>q.name&&Number.isFinite(q.value)):[]}function jt(...X){const q=X.flatMap(ce=>Array.isArray(ce)?ce:[ce]).map(ce=>{var Je,Nt,Cn;return ce&&typeof ce=="object"?(Cn=(Nt=(Je=ce.year)!=null?Je:ce.value)!=null?Nt:ce.latestYear)!=null?Cn:ce.latest_year:ce}).map(Number).filter(ce=>Number.isFinite(ce)&&ce>0);return[...new Set(q)].sort((ce,Je)=>ce-Je)}function Sn(X=[],q="name"){return Array.isArray(X)?X.map((ce,Je)=>{var Nt,Cn,Fi,Ki,wr,br,_r,gs,To,ca,Qa,ud,cu,cd,Kh,dd,hd;return{key:ce.key||ce.id||`${ce[q]||ce.name||ce.label||"trade"}-${Je}`,name:String(ce[q]||ce.name||ce.label||ce.town||"未填写"),recordCount:Number((Fi=(Cn=(Nt=ce.recordCount)!=null?Nt:ce.record_count)!=null?Cn:ce.count)!=null?Fi:0),headCount:Number((_r=(br=(wr=(Ki=ce.headCount)!=null?Ki:ce.head_count)!=null?wr:ce.amount)!=null?br:ce.value)!=null?_r:0),lng:zr((ud=(Qa=(ca=(To=(gs=ce.lng)!=null?gs:ce.longitude)!=null?To:ce.destLng)!=null?ca:ce.dest_lng)!=null?Qa:ce.destLongitude)!=null?ud:ce.dest_longitude),lat:zr((hd=(dd=(Kh=(cd=(cu=ce.lat)!=null?cu:ce.latitude)!=null?cd:ce.destLat)!=null?Kh:ce.dest_lat)!=null?dd:ce.destLatitude)!=null?hd:ce.dest_latitude)}}).filter(ce=>ce.name&&Number.isFinite(ce.headCount)):[]}function Hn(X=[]){return Array.isArray(X)?X.map(q=>{var ce,Je,Nt,Cn,Fi,Ki;return{year:Number(q.year),recordCount:Number((Je=(ce=q.recordCount)!=null?ce:q.record_count)!=null?Je:0),headCount:Number((Ki=(Fi=(Cn=(Nt=q.headCount)!=null?Nt:q.head_count)!=null?Cn:q.amount)!=null?Fi:q.value)!=null?Ki:0)}}).filter(q=>Number.isFinite(q.year)&&Number.isFinite(q.headCount)):[]}function pi(X=[]){return Array.isArray(X)?yi(X.map(q=>{var ce,Je,Nt;return q&&typeof q=="object"?(Nt=(Je=(ce=q.value)!=null?ce:q.label)!=null?Je:q.name)!=null?Nt:"":q})):[]}function hi(X=[]){return Array.isArray(X)?X.map(q=>{var ce,Je,Nt,Cn,Fi,Ki;if(q&&typeof q=="object"){const wr=(Nt=(Je=(ce=q.value)!=null?ce:q.name)!=null?Je:q.label)!=null?Nt:"",br=(Ki=(Fi=(Cn=q.label)!=null?Cn:q.name)!=null?Fi:q.value)!=null?Ki:wr;return wr?{value:String(wr),label:String(br||wr)}:null}return q?{value:String(q),label:String(q)}:null}).filter(Boolean):[]}function yi(X=[]){return[...new Set(X.map(q=>String(q||"").trim()).filter(Boolean))]}function nr(X=[]){if(!Array.isArray(X))return[];const q=new Map;X.forEach((Je,Nt)=>{var br,_r,gs,To,ca,Qa;const Cn=Ve(Je.name||Je.areaName||Je.area_name||Je.town||Je.label||"");if(!Cn)return;const Fi=zr((gs=(_r=(br=Je.value)!=null?br:Je.number)!=null?_r:Je.count)!=null?gs:Je.total);if(!Number.isFinite(Fi))return;const Ki=q.get(Cn)||{key:Je.areaCode||Je.area_code||`${Cn}-${Nt}`,name:Cn,recordCount:0,earTagCount:0,source:"stats"};Ki.recordCount+=Fi;const wr=zr((Qa=(ca=(To=Je.earTagCount)!=null?To:Je.ear_tag_count)!=null?ca:Je.headCount)!=null?Qa:Je.head_count);Ki.earTagCount+=Number.isFinite(wr)?wr:0,q.set(Cn,Ki)});const ce=[...q.values()].reduce((Je,Nt)=>Je+Number(Nt.recordCount||0),0);return[...q.values()].map(Je=>tn(wt({},Je),{earTagCount:Je.earTagCount||Math.round(Number(Je.recordCount||0)/Ln.value),ratio:ce?Number(Je.recordCount||0)/ce*100:0})).sort((Je,Nt)=>Number(Nt.recordCount||0)-Number(Je.recordCount||0))}function zl(X={}){var Nt,Cn;const q=Array.isArray(X)?{rows:X}:X||{},ce=q.result||{};return{rows:q.rows||q.data||q.list||q.records||[],year:(Cn=(Nt=q.year)!=null?Nt:ce.year)!=null?Cn:null}}function fs(X=[]){return Array.isArray(X)?X.map((q,ce)=>{var gs,To,ca,Qa,ud,cu,cd,Kh,dd,hd,c1,q3;const Je=Ve(q.town||q.townName||q.town_name||""),Nt=String(q.village||q.villageName||q.village_name||q.name||"").trim(),Cn=zr((ca=(To=(gs=q.recordCount)!=null?gs:q.record_count)!=null?To:q.records)!=null?ca:q.total),Fi=zr((cd=(cu=(ud=(Qa=q.earTagCount)!=null?Qa:q.ear_tag_count)!=null?ud:q.headCount)!=null?cu:q.head_count)!=null?cd:q.value),Ki=zr((dd=(Kh=q.imageCount)!=null?Kh:q.image_count)!=null?dd:q.images),wr=zr((hd=q.imageRate)!=null?hd:q.image_rate),br=zr((c1=q.lng)!=null?c1:q.longitude),_r=zr((q3=q.lat)!=null?q3:q.latitude);return{key:q.key||q.id||`${Je}-${Nt}-${ce}`,town:Je,village:Nt,recordCount:Number.isFinite(Cn)?Cn:0,earTagCount:Number.isFinite(Fi)?Fi:0,imageCount:Number.isFinite(Ki)?Ki:0,imageRate:Number.isFinite(wr)?wr:0,lng:br,lat:_r}}).filter(q=>q.town&&q.village&&Number.isFinite(q.earTagCount)).sort((q,ce)=>Number(ce.earTagCount||0)-Number(q.earTagCount||0)):[]}function zr(X){if(X==null||X==="")return NaN;const q=Number(String(X).replace(/,/g,"").replace(/%/g,""));return Number.isFinite(q)?q:NaN}function Xo(X){return String(X||"").replace(/'/g,"''").replace(/%/g,"\\%").replace(/_/g,"\\_")}function ir(X,q){const ce=Ve(X),Je=String(q||"").trim();if(!ce||!Je)return"";const Nt=`${ce}${Je}`,Cn=Xo(Nt),Fi=Xo(Je);return`(full_name LIKE '%${Cn}%' OR name = '${Cn}' OR name = '${Fi}')`}function wa(X){return co(X)}function co(X){const q=String(X||"").trim();if(!q)return"";const ce=q.match(/^(.+)(镇|乡|村)$/);return ce?`${ce[1]} ${ce[2]}`:q}function Ui(X,q){return xr(X.name)-xr(q.name)}function xr(X){const q=String(X||"").match(/(\d{1,2})\D+(\d{1,2})/);return q?Number(q[1])*100+Number(q[2]):Number.MAX_SAFE_INTEGER}function _i(X=[]){return Array.isArray(X)?X.map(jn).filter(Boolean):[]}function jn(X){return X?{epidemicId:X.epidemicId||X.epidemic_id||X.id||"",earTag:X.earTag||X.ear_tag||"",owner:X.owner||"",idType:X.idType||X.id_type||"",idNo:X.idNo||X.id_no||"",phone:X.phone||"",town:X.town||"",village:X.village||"",location:X.location||"",livestockType:X.livestockType||X.livestock_type||"",age:X.age||"",sex:X.sex||"",weight:X.weight||X.weightKg||X.weight_kg||"",preventionType:X.preventionType||X.prevention_type||"",method:X.method||"",medicine:X.medicine||"",dose:X.dose||"",operator:X.operator||"",operateTime:X.operateTime||X.operate_time||"",imagePaths:X.imagePaths||X.image_paths||""}:null}function wi(X=[]){return Array.isArray(X)?X.map(mr).filter(Boolean):[]}function mr(X){var q,ce,Je,Nt;return X?{certId:X.certId||X.cert_id||X.id||"",certType:X.certType||X.cert_type||"",certScopeName:X.certScopeName||X.cert_scope_name||"",factoryCode:X.factoryCode||X.factory_code||"",ownerName:X.ownerName||X.owner_name||"",ownerPhone:X.ownerPhone||X.owner_phone||"",transportNumber:X.transportNumber||X.transport_number||"",amount:Number((Nt=(Je=(ce=(q=X.amount)!=null?q:X.headCount)!=null?ce:X.head_count)!=null?Je:X.value)!=null?Nt:0),unitName:X.unitName||X.unit_name||"头",animalTypeName:X.animalTypeName||X.animal_type_name||"",usageTypeName:X.usageTypeName||X.usage_type_name||"",startTown:X.startTown||X.start_town||"",startRegionFullName:X.startRegionFullName||X.start_region_full_name||"",destProvince:X.destProvince||X.dest_province||"",destRegionFullName:X.destRegionFullName||X.dest_region_full_name||"",quarantineOfficerName:X.quarantineOfficerName||X.quarantine_officer_name||"",issueTime:X.issueTime||X.issue_time||"",statusName:X.statusName||X.status_name||""}:null}function ye(X,q){for(const ce of q){const Je=Number(X==null?void 0:X[ce]);if(Number.isFinite(Je))return Je}return 0}function Ne(...X){return ye(er.value,X)}function qe(X={}){return String(X.imagePaths||"").split(";").map(q=>q.trim()).filter(Boolean)}function tt(X){const ce=String(X||"").replace(/^images\//,"").split("/").map(encodeURIComponent).join("/");return`${PZe}/${ce}`}function ve(X){return X==null||X===""?"-":X}function ct(X){const q=String(X!=null?X:"").trim();return!!(q&&q!=="-")}function et(X,q,ce={}){return ct(q)?wt({label:X,value:q},ce):null}function gt(X){return X?String(X).slice(0,10):"-"}function Dt(X){const q=String(X||"").trim();return q?q.length<7?q:`${q.slice(0,3)}****${q.slice(-4)}`:"-"}function fn(X){const q=String(X||"").trim();return q?q.length<=4?q:`****${q.slice(-4)}`:"-"}function Gt(X){const q=String(X!=null?X:"").trim();if(!q)return"-";if(/kg|公斤|千克/i.test(q))return q;const ce=Number(q);return Number.isFinite(ce)?`${Si(ce)}kg`:q}function vn(X){return String(X!=null?X:"").trim()||"-"}function gr(X={}){return X.certScopeName||X.certType||"-"}function ea(){return rn(this,null,function*(){var ce,Je;const[X,q]=yield Promise.allSettled([zYe(),GYe()]);X.status==="fulfilled"&&((ce=X.value)!=null&&ce.length)&&(f.value=mGe(X.value.map(Nt=>({name:dM(Nt.name),count:Number(Nt.value)})).filter(Nt=>Nt.name&&Number.isFinite(Nt.count)))),q.status==="fulfilled"&&((Je=q.value)!=null&&Je.length)&&(p.value=q.value.map(Nt=>({month:Nt.name,count:Number(Nt.value),speed:P7(Nt.extra)})).filter(Nt=>Nt.month&&Number.isFinite(Nt.count)))})}function vi(){return rn(this,arguments,function*(X=ie.value){var q,ce,Je,Nt,Cn,Fi;he.value=!0,Ee.value="";try{(ce=(q=Y.value)==null?void 0:q.years)!=null&&ce.length||(Y.value=yield NYe());const Ki=jt((Je=Y.value)==null?void 0:Je.years),wr=Number(((Nt=Y.value)==null?void 0:Nt.latestYear)||((Cn=Y.value)==null?void 0:Cn.latest_year)||Ki[Ki.length-1]),br=Number(X||ie.value||wr||Ki[Ki.length-1]);ie.value=br;let _r=yield JW({year:br});const gs=(Fi=_r==null?void 0:_r.hasData)!=null?Fi:_r==null?void 0:_r.has_data,To=Number((_r==null?void 0:_r.latestYear)||(_r==null?void 0:_r.latest_year)||wr);gs===!1&&To&&To!==br&&(ie.value=To,_r=yield JW({year:To})),Q.value=_r||{metrics:{},hasData:!1},yield Kr(1)}catch(Ki){Ee.value="交易数据接口异常",Q.value={metrics:{},hasData:!1},K.value=[],ae.value=0}finally{he.value=!1}})}function Kr(){return rn(this,arguments,function*(X=He.value){var ce,Je;if(!ie.value)return;const q={year:ie.value,page:X,pageSize:ET,keyword:Fe.value};try{const Nt=yield QW(q);K.value=wi(Nt.rows),ae.value=Number(((ce=Nt.page)==null?void 0:ce.totalCount)||Nt.totalCount||K.value.length||0),He.value=Number(((Je=Nt.page)==null?void 0:Je.page)||X||1)}catch(Nt){Ee.value=Ee.value||"交易台账接口异常",K.value=[],ae.value=0}})}function Ii(X){const q=Number(X);!Number.isFinite(q)||q===Number(ie.value)||(ie.value=q,He.value=1,xe.value="",Fe.value="",vi(q))}function yr(){Fe.value=xe.value.trim(),Kr(1)}function ps(X){const q=Math.min(Math.max(Number(X)||1,1),en.value);Kr(q)}function vs(X=null){pt.value=!0,X&&(Ae.value=X),uu(1,X)}function zi(){pt.value=!1}function Gr(){uu(1)}function lu(){Lt.value={keyword:"",startTown:"",usageType:"",certType:""},uu(1)}function od(X){const q=Math.min(Math.max(Number(X)||1,1),we.value);uu(q)}function uu(){return rn(this,arguments,function*(X=ht.value,q=null){var Nt,Cn;if(!ie.value)return;Kt.value=!0,Tt.value="";const ce=Lt.value,Je={year:ie.value,page:X,pageSize:nj,keyword:ce.keyword.trim(),startTown:ce.startTown,usageType:ce.usageType,certType:ce.certType};try{const Fi=yield QW(Je);Ot.value=wi(Fi.rows),bt.value=Number(((Nt=Fi.page)==null?void 0:Nt.totalCount)||Fi.totalCount||Ot.value.length||0),ht.value=Number(((Cn=Fi.page)==null?void 0:Cn.page)||X||1);const Ki=q?q.certId||q.factoryCode:"",wr=Ki?Ot.value.find(br=>(br.certId||br.factoryCode)===Ki)||q:Ot.value[0]||null;jh(wr)}catch(Fi){Tt.value="交易台账接口异常",Ot.value=[],bt.value=0,Ae.value=null}finally{Kt.value=!1}})}function jh(X){Ae.value=X||null}function $h(X){var q,ce;X!=null&&X.startTown&&(c.value="trade",(ce=(q=vt.value)==null?void 0:q.focusTown)==null||ce.call(q,Ve(X.startTown),{distanceScale:.78,duration:.8}))}function _a(){return rn(this,null,function*(){var Nt;x.value=!0,A.value="";const[X,q,ce,Je]=yield Promise.allSettled([kYe(),ej({page:1,pageSize:8}),FYe(),OYe()]);if(X.status==="fulfilled"?m.value=X.value||{metrics:{}}:(A.value="防疫统计接口异常",m.value={metrics:{}}),q.status==="fulfilled"){const Cn=q.value||{};_.value=_i(Cn.rows),S.value=Number(((Nt=Cn.page)==null?void 0:Nt.totalCount)||Cn.totalCount||_.value.length||0)}else A.value=A.value||"防疫台账接口异常",_.value=[],S.value=0;ce.status==="fulfilled"?v.value=zl(ce.value):v.value={rows:[],year:null},Je.status==="fulfilled"?g.value=Je.value||{rows:[]}:g.value={rows:[]},x.value=!1})}function Zr(X=null){C.value=!0,X&&(F.value=X,V.value=null),sc(1,X)}function Yo(){C.value=!1}function Ds(){sc(1)}function Gl(){W.value={keyword:"",town:"",medicine:"",startDate:"",endDate:""},sc(1)}function oc(X){sc(X)}function sc(){return rn(this,arguments,function*(X=D.value,q=null){var Je,Nt;E.value=!0,P.value="";const ce=tn(wt({},W.value),{page:X,pageSize:tj});try{const Cn=yield ej(ce);M.value=_i(Cn.rows),I.value=Number(((Je=Cn.page)==null?void 0:Je.totalCount)||Cn.totalCount||M.value.length||0),D.value=Number(((Nt=Cn.page)==null?void 0:Nt.page)||X||1);const Fi=q||M.value[0]||null;Fi?qh(Fi):(F.value=null,V.value=null)}catch(Cn){P.value="台账接口异常",M.value=[],I.value=0}finally{E.value=!1}})}function qh(X){return rn(this,null,function*(){if(F.value=X,V.value=null,!(X!=null&&X.earTag)&&!(X!=null&&X.epidemicId))return;const q=++ee;G.value=!0;try{const ce=yield BYe(X.earTag||X.epidemicId);q===ee&&(V.value=jn(ce)||X)}catch(ce){q===ee&&(V.value=X)}finally{q===ee&&(G.value=!1)}})}function l1(){var q;k=new am;const X=(ce=0)=>rn(this,null,function*(){var Nt,Cn;if(_t)return;yield Qs();const Je=vt.value;if((Nt=Je==null?void 0:Je.loadMap)==null||Nt.call(Je,k),Je!=null&&Je.canvasMap){Ft.value=!0,(Cn=Je.play)==null||Cn.call(Je);return}ce<24&&window.setTimeout(()=>X(ce+1),120)});(q=k.ready)==null||q.then(X).catch(()=>{Ft.value=!0})}function sd(){if(c.value==="epidemic"){t("module-stats",{moduleKey:"yak-management",items:[{zh:"防疫记录",value:Ht.value,unit:"条"},{zh:"防疫耳标",value:Un.value,unit:"头"},{zh:"疫苗类型",value:Ln.value,unit:"类"},{zh:"涉及村数",value:zn.value,unit:"个"}]});return}if(c.value==="forecast"){const X=Ue.value.stock-Kd;t("module-stats",{moduleKey:"yak-management",items:[{zh:"预测期末存栏",value:Ue.value.stock,unit:"头"},{zh:"繁殖补充",value:Ue.value.births,unit:"头"},{zh:"出栏流出",value:Ue.value.outflow,unit:"头"},{zh:"预测净变化",value:X,unit:"头"}]});return}if(c.value==="trade"){t("module-stats",{moduleKey:"yak-management",items:[{zh:"流通总量",value:Ne("headCount"),unit:"头"},{zh:"出证记录",value:Ne("recordCount"),unit:"条"},{zh:"交易销售",value:Ne("saleHeadCount"),unit:"头"},{zh:"运输车辆",value:Ne("vehicleCount"),unit:"辆"}]});return}t("module-stats",{moduleKey:"yak-management",items:[{zh:"无人机识别总数",value:u3,unit:"头"},{zh:"专家共识模型修正",value:xt.value,unit:"头"},{zh:"当前存栏预估数量",value:Kd,unit:"头"}]})}function ms(X,q,ce,Je={}){const Nt=Je.labelKey||"name",Cn=Je.colors||a,Fi=Math.max(...X.map(ca=>Number(ca[q]||0)),1),Ki=X.length>8,wr=Je.style==="ladder",br=Ki?wr?7:6:X.length>6?11:13,_r=["#30dcff","#27f0c0","#ffd76c","#7aa7ff","#ff8f6b","#a6f06d"],gs=Je.axisTextColor||"rgba(223, 250, 255, 0.82)",To=Je.dimAxisTextColor||"rgba(223, 250, 255, 0.56)";return{tooltip:tn(wt({},Ja()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(ca){if(Je.tooltipFormatter)return Je.tooltipFormatter(ca[0]);const Qa=X[ca[0].dataIndex];return`${Qa[Nt]}
    数值:${Si(Qa[q])}${ce}`}}),grid:{left:Ki?58:74,right:Ki?50:54,top:Ki?3:14,bottom:Ki?5:14},xAxis:{type:"value",axisLabel:{color:To,fontSize:10,formatter:ce==="%"?"{value}%":ua},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",inverse:!0,data:X.map(ca=>ca[Nt]),axisLabel:{color:gs,fontSize:Ki?9:11,interval:0},axisLine:{show:!1},axisTick:{show:!1}},series:[{type:"bar",barWidth:br,barGap:"-100%",data:X.map((ca,Qa)=>({value:ca[q],itemStyle:{borderRadius:wr?[1,10,10,1]:[0,7,7,0],color:C7(wr?_r[Qa%_r.length]:Cn[Qa%Cn.length],wr),shadowBlur:wr?10:0,shadowColor:wr?Cn[Qa%Cn.length]:"transparent"}})),showBackground:!0,backgroundStyle:{color:wr?"rgba(48, 220, 255, 0.035)":"rgba(48, 220, 255, 0.055)",borderRadius:wr?[1,10,10,1]:[0,7,7,0]},label:{show:!0,position:"right",color:"#ffffff",fontSize:Ki?9:10,formatter:({value:ca})=>`${ce==="%"?Yh(ca):ua(ca)}`},markLine:Je.showAverage===!1?void 0:{silent:!0,symbol:"none",label:{show:!1},lineStyle:{color:"rgba(255, 215, 108, 0.22)",type:"dashed",width:1},data:[{xAxis:Math.round(Fi*.72)}]}},...wr?[{type:"pictorialBar",symbol:"rect",symbolSize:[2,br+5],symbolOffset:[0,0],symbolPosition:"end",z:4,data:X.map((ca,Qa)=>({value:ca[q],itemStyle:{color:"#ffffff",opacity:Qa<3?.82:.5,shadowBlur:8,shadowColor:_r[Qa%_r.length]}}))}]:[]]}}function C7(X,q=!1){return new po(0,0,1,0,[{offset:0,color:q?`${X}22`:"rgba(48, 220, 255, 0.12)"},{offset:.64,color:q?X:`${X}cc`},{offset:1,color:X}])}function u1(X,q,ce,Je=0,Nt=!1){return{name:X,type:"line",yAxisIndex:Je,smooth:!0,symbolSize:5,data:q,lineStyle:{width:2.5,color:ce},itemStyle:{color:ce},areaStyle:Nt?{color:new po(0,0,0,1,[{offset:0,color:`${ce}44`},{offset:1,color:`${ce}05`}])}:void 0}}function M7(X,q){const ce=new Map;return X.forEach(Je=>{const Nt=E7(Je.name);if(!Nt)return;const Cn=ce.get(Nt)||{name:Nt,value:0};Cn.value+=Number(Je[q]||0),ce.set(Nt,Cn)}),[...ce.values()].sort((Je,Nt)=>Nt.value-Je.value)}function E7(X){return{色地乡:"色地镇",瓦切乡:"瓦切镇",安曲乡:"安曲镇",龙日乡:"龙日镇",色地镇:"色地镇",瓦切镇:"瓦切镇",安曲镇:"安曲镇",龙日镇:"龙日镇",邛溪镇:"邛溪镇",刷经寺镇:"刷经寺镇",阿木乡:"阿木乡",查尔玛乡:"查尔玛乡",江茸乡:"江茸乡",麦洼乡:"麦洼乡",壤口乡:"壤口乡"}[X]||""}function Ja(X){return{trigger:"item",backgroundColor:"rgba(5, 31, 51, 0.96)",borderColor:"rgba(0, 210, 255, 0.54)",borderWidth:1,textStyle:{color:"#e7fbff",fontSize:12},extraCssText:"box-shadow:0 0 18px rgba(0,210,255,.2);",formatter:X}}function P7(X){const q=String(X||"").match(/-?\d+(?:\.\d+)?/);return q?Number(q[0]):0}function Si(X){const q=Number(X);return Number.isFinite(q)?q.toLocaleString("zh-CN",{maximumFractionDigits:Number.isInteger(q)?0:2}):"--"}function ua(X){const q=Number(X);return Number.isFinite(q)?Math.abs(q)>=1e4?`${(q/1e4).toFixed(Math.abs(q)>=1e5?0:1)}万`:Math.round(q).toLocaleString("zh-CN"):"--"}function Xh(X,q=2){const ce=Number(X);return Number.isFinite(ce)?`${(ce/1e4).toFixed(q)}万`:"--"}function Yh(X){const q=Number(X);return Number.isFinite(q)?`${Number.isInteger(q)?q:q.toFixed(1)}%`:"--"}function ld(X){const q=Number(X);return Number.isFinite(q)?`${q>=0?"+":"-"}${Si(Math.abs(q))}`:"--"}return(X,q)=>(Te(),Pe("div",HYe,[gn(rm,{ref_key:"mapSceneRef",ref:vt,class:"yak-map-scene","active-layer":N.value,"map-ranking":z.value},null,8,["active-layer","map-ranking"]),q[78]||(q[78]=O("div",{class:"yak-map-scrim"},null,-1)),Ft.value?Dn("",!0):(Te(),Pe("div",WYe,"3D地图加载中")),O("div",jYe,[c.value==="trade"&&_e.value.length?(Te(),Pe("div",$Ye,[q[20]||(q[20]=O("span",null,"交易年份",-1)),(Te(!0),Pe(bn,null,Bn(_e.value,ce=>(Te(),Pe("button",{key:ce,type:"button",class:Xn({active:Number(ce)===Number(ie.value)}),onClick:Je=>Ii(ce)},De(ce),11,qYe))),128))])):Dn("",!0),c.value==="forecast"?(Te(),Pe("div",XYe,[q[21]||(q[21]=O("span",null,"预测年份",-1)),(Te(!0),Pe(bn,null,Bn(Tr(Hs),ce=>(Te(),Pe("button",{key:ce.key,type:"button",class:Xn({active:ce.key===d.value}),onClick:Je=>qt(ce.key)},De(ce.shortLabel),11,YYe))),128))])):Dn("",!0),O("div",KYe,[O("div",ZYe,[c.value==="structure"?(Te(),Pe(bn,{key:0},[gn(Mi,{class:"yak-side-card left-card",title:"存栏估算",width:Lr,height:Ir},{default:mi(()=>[O("div",JYe,[O("div",QYe,[O("span",eKe,[q[23]||(q[23]=O("em",null,"无人机识别总数",-1)),O("strong",null,[kr(De(Si(Tr(u3))),1),q[22]||(q[22]=O("small",null,"头",-1))])]),O("span",tKe,[q[25]||(q[25]=O("em",null,"专家共识模型修正",-1)),O("strong",{class:Xn({positive:xt.value>0,negative:xt.value<0})},[kr(De(ld(xt.value)),1),q[24]||(q[24]=O("small",null,"头",-1))],2)])]),O("div",nKe,[q[27]||(q[27]=O("span",null,"当前存栏预估数量",-1)),O("strong",null,[kr(De(Si(Tr(Kd))),1),q[26]||(q[26]=O("em",null,"头",-1))])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"畜群结构占比",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:U.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"母牛/公牛年龄结构",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:pe.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"牦牛乡镇分布",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:de.value,autoresize:!0},null,8,["option"])]),_:1})],64)):c.value==="forecast"?(Te(),Pe(bn,{key:1},[gn(Mi,{class:"yak-side-card left-card",title:"畜群预测",width:Lr,height:Ir},{default:mi(()=>[O("div",iKe,[O("div",rKe,[O("div",aKe,[O("span",null,De(Ue.value.label)+"预测存栏",1),O("strong",null,[kr(De(Si(Ue.value.stock)),1),q[28]||(q[28]=O("em",null,"头",-1))])]),O("div",{class:Xn(["forecast-change-badge",{positive:Bt.value>0,negative:Bt.value<0}])},[q[30]||(q[30]=O("span",null,"较当前",-1)),O("strong",null,[kr(De(ld(Bt.value)),1),q[29]||(q[29]=O("em",null,"头",-1))])],2)]),O("div",oKe,[O("span",null,[q[31]||(q[31]=O("em",null,"补充",-1)),O("strong",null,De(Xh(Ue.value.births))+"头",1)]),O("span",null,[q[32]||(q[32]=O("em",null,"流出",-1)),O("strong",null,De(Xh(Ue.value.outflow))+"头",1)]),O("span",null,[q[33]||(q[33]=O("em",null,"周期",-1)),O("strong",null,De(Ue.value.months)+"个月",1)])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"未来存栏趋势",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:be.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"月度数量预测",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:me.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"预测因子雷达",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:ge.value,autoresize:!0},null,8,["option"])]),_:1})],64)):c.value==="epidemic"?(Te(),Pe(bn,{key:2},[gn(Mi,{class:"yak-side-card left-card",title:"防疫总览",width:Lr,height:Ir},{default:mi(()=>[O("div",sKe,[O("div",lKe,[q[35]||(q[35]=O("span",null,"防疫记录",-1)),O("strong",null,[kr(De(Si(Ht.value)),1),q[34]||(q[34]=O("em",null,"条",-1))])]),O("div",uKe,[O("strong",null,De(Si(Un.value)),1),q[36]||(q[36]=O("span",null,"耳标数",-1))]),O("div",cKe,[O("span",null,[q[37]||(q[37]=O("em",null,"覆盖乡镇",-1)),O("strong",null,De(Be.value)+"个",1)]),O("span",null,[q[38]||(q[38]=O("em",null,"养殖户",-1)),O("strong",null,De(Si(wn.value))+"户",1)]),O("span",null,[q[39]||(q[39]=O("em",null,"涉及村数",-1)),O("strong",null,De(Si(zn.value))+"个",1)]),O("span",null,[q[40]||(q[40]=O("em",null,"疫苗类型",-1)),O("strong",null,De(Ln.value)+"类",1)])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"防疫覆盖概况",width:Lr,height:Ir},{default:mi(()=>[O("div",dKe,[O("div",hKe,[O("span",null,[q[41]||(q[41]=O("em",null,"覆盖乡镇",-1)),O("strong",null,De(Be.value),1)]),O("span",null,[q[42]||(q[42]=O("em",null,"耳标数",-1)),O("strong",null,De(Si(Un.value)),1)]),O("span",null,[q[43]||(q[43]=O("em",null,"行政村",-1)),O("strong",null,De(Si(zn.value)),1)])]),O("div",fKe,[O("span",null,"最近免疫:"+De(dn.value)+";主用疫苗:"+De(je.value)+";重点乡镇:"+De(pn.value)+"。",1)]),O("div",pKe,[O("span",null,[q[44]||(q[44]=O("em",null,"疫苗类型数",-1)),O("strong",null,De(Ln.value)+"类",1)]),O("span",null,[q[45]||(q[45]=O("em",null,"养殖户数",-1)),O("strong",null,De(Si(wn.value))+"户",1)])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"防疫作业趋势",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:oe.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"疫苗类型分布",width:Lr,height:Ir},{default:mi(()=>[nn.value.length?(Te(),Pe("div",vKe,[O("div",mKe,[(Te(),Uo(Oee,{key:cn.value,data:nn.value,delay:3e3,colors:o,opacity:.62,class:"epidemic-three-pie"},{default:mi(({data:ce})=>[O("div",gKe,[O("strong",null,De(ua((ce==null?void 0:ce.count)||Ht.value)),1),O("span",null,De((ce==null?void 0:ce.name)||"疫苗类型"),1)])]),_:1},8,["data"]))]),O("div",yKe,[(Te(!0),Pe(bn,null,Bn(nn.value,(ce,Je)=>(Te(),Pe("div",{key:ce.key||ce.name,class:"epidemic-three-pie-row"},[O("i",{style:Ji({borderColor:o[Je%o.length]})},null,4),O("span",null,De(ce.name),1),O("strong",null,De(ua(ce.value)),1),O("em",null,De(ce.unit),1)]))),128))])])):(Te(),Pe("div",_Ke,"暂无疫苗类型数据"))]),_:1})],64)):c.value==="trade"?(Te(),Pe(bn,{key:3},[gn(Mi,{class:"yak-side-card left-card",title:"交易年度总览",width:Lr,height:Ir},{default:mi(()=>[O("div",SKe,[O("div",bKe,[O("span",null,De(ie.value)+"年流通总量",1),O("strong",null,[kr(De(Si(Ne("headCount"))),1),q[46]||(q[46]=O("em",null,"头",-1))])]),O("div",xKe,[O("span",null,[q[47]||(q[47]=O("em",null,"出证记录",-1)),O("strong",null,De(Si(Ne("recordCount")))+"条",1)]),O("span",null,[q[48]||(q[48]=O("em",null,"交易销售",-1)),O("strong",null,De(Si(Ne("saleHeadCount")))+"头",1)]),O("span",null,[q[49]||(q[49]=O("em",null,"运输车辆",-1)),O("strong",null,De(Si(Ne("vehicleCount")))+"辆",1)])])])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"交易流通趋势",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:nt.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"来源乡镇分布",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:at.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card left-card",title:"用途结构统计",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:St.value,autoresize:!0},null,8,["option"])]),_:1})],64)):Dn("",!0)])]),O("div",wKe,[O("div",TKe,[c.value==="structure"?(Te(),Pe(bn,{key:0},[gn(Mi,{class:"yak-side-card right-card",title:"乡镇存栏排行",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:se.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"母牛与幼畜分布",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:re.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"出栏/交易影响",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:Oe.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"结构明细",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:ue.value,autoresize:!0},null,8,["option"])]),_:1})],64)):c.value==="forecast"?(Te(),Pe(bn,{key:1},[gn(Mi,{class:"yak-side-card right-card",title:"乡镇预测排行",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:Ze.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"期末结构预测",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:fe.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"补充/流出对比",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:B.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"预测变化热力",width:Lr,height:Ir},{default:mi(()=>[O("div",AKe,[(Te(!0),Pe(bn,null,Bn(te.value,ce=>(Te(),Pe("div",{key:ce.name,class:"heat-row",style:Ji({"--heat-width":`${ce.width}%`})},[O("span",null,De(ce.name),1),O("strong",null,De(ld(ce.change)),1)],4))),128))])]),_:1})],64)):c.value==="epidemic"?(Te(),Pe(bn,{key:2},[gn(Mi,{class:"yak-side-card right-card",title:"防疫统计",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:Ie.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"养殖户防疫排行",width:Lr,height:Ir},{default:mi(()=>[gn(Tr(Ua),{class:"yak-chart",option:Ge.value,autoresize:!0},null,8,["option"])]),_:1}),gn(Mi,{class:"yak-side-card right-card epidemic-ledger-card",title:"防疫记录台账",width:Lr,height:i},{default:mi(()=>[O("div",CKe,[O("div",MKe,[O("span",null,"共 "+De(Si(S.value))+" 条",1),O("button",{type:"button",onClick:q[0]||(q[0]=ce=>Zr())},"查看更多")]),q[50]||(q[50]=O("div",{class:"epidemic-record-header"},[O("span",null,"电子耳标"),O("span",null,"养殖户"),O("span",null,"镇/乡"),O("span",null,"疫苗"),O("span",null,"时间")],-1)),O("div",EKe,[(Te(!0),Pe(bn,null,Bn(Jt.value,ce=>(Te(),Pe("button",{key:ce.epidemicId||ce.earTag,type:"button",onClick:Je=>Zr(ce)},[O("span",null,De(ve(ce.earTag)),1),O("span",null,De(ve(ce.owner)),1),O("span",null,De(ve(ce.town)),1),O("strong",null,De(ve(ce.medicine)),1),O("span",null,De(gt(ce.operateTime)),1)],8,PKe))),128)),_.value.length?Dn("",!0):(Te(),Pe("div",RKe,De(x.value?"防疫台账读取中":A.value||"暂无防疫记录"),1))])])]),_:1})],64)):c.value==="trade"?(Te(),Pe(bn,{key:3},[gn(Mi,{class:"yak-side-card right-card",title:"出证结构统计",width:Lr,height:Ir},{default:mi(()=>[O("div",LKe,[O("div",IKe,[O("span",null,[q[52]||(q[52]=O("em",null,"省外流通 A证",-1)),O("strong",null,[kr(De(Si(Ne("outProvinceHeads","aCertHeads"))),1),q[51]||(q[51]=O("b",null,"头",-1))]),O("small",null,De(Si(Ne("outProvinceCount","aCertCount")))+"条记录",1)]),O("span",null,[q[54]||(q[54]=O("em",null,"省内流通 B证",-1)),O("strong",null,[kr(De(Si(Ne("inProvinceHeads","bCertHeads"))),1),q[53]||(q[53]=O("b",null,"头",-1))]),O("small",null,De(Si(Ne("inProvinceCount","bCertCount")))+"条记录",1)])]),gn(Tr(Ua),{class:"trade-cert-chart",option:zt.value,autoresize:!0},null,8,["option"])])]),_:1}),gn(Mi,{class:"yak-side-card right-card",title:"出栏来源排行",width:Lr,height:Ir},{default:mi(()=>[O("div",DKe,[(Te(!0),Pe(bn,null,Bn(ke.value,(ce,Je)=>(Te(),Pe("div",{key:ce.name,class:"trade-dest-row",style:Ji({"--trade-ratio":`${ce.ratio}%`})},[O("span",null,De(Je+1),1),O("strong",null,De(ce.name),1),O("em",null,De(ua(ce.headCount))+"头",1)],4))),128)),ke.value.length?Dn("",!0):(Te(),Pe("div",NKe,De(he.value?"交易数据读取中":Ee.value||"暂无出栏来源数据"),1))])]),_:1}),gn(Mi,{class:"yak-side-card right-card trade-ledger-card",title:"交易出证台账",width:Lr,height:r},{default:mi(()=>[O("div",kKe,[O("div",FKe,[O("span",null,"共 "+De(Si(ae.value))+" 条",1),O("div",null,[to(O("input",{"onUpdate:modelValue":q[1]||(q[1]=ce=>xe.value=ce),type:"search",placeholder:"货主/车辆/检疫号/地区",onKeyup:V2(yr,["enter"])},null,544),[[Kf,xe.value]]),O("button",{type:"button",onClick:yr},"搜索"),O("button",{type:"button",class:"is-more",onClick:q[2]||(q[2]=ce=>vs())},"查看更多")])]),q[55]||(q[55]=O("div",{class:"trade-ledger-header"},[O("span",null,"货主"),O("span",null,"车牌"),O("span",null,"数量"),O("span",null,"源头"),O("span",null,"用途"),O("span",null,"时间")],-1)),O("div",OKe,[(Te(!0),Pe(bn,null,Bn(ft.value,ce=>(Te(),Pe("button",{key:ce.certId,type:"button",onClick:Je=>$h(ce)},[O("span",null,De(ve(ce.ownerName)),1),O("span",null,De(ve(ce.transportNumber)),1),O("strong",null,De(Si(ce.amount))+"头",1),O("span",null,De(ve(ce.startTown)),1),O("span",null,De(ve(ce.usageTypeName)),1),O("span",null,De(gt(ce.issueTime)),1)],8,BKe))),128)),ft.value.length?Dn("",!0):(Te(),Pe("div",zKe,De(he.value?"交易台账读取中":Ee.value||"暂无交易记录"),1))]),O("div",GKe,[O("span",null,"第 "+De(He.value)+" / "+De(en.value)+" 页",1),O("button",{type:"button",disabled:He.value<=1,onClick:q[3]||(q[3]=ce=>ps(He.value-1))},"上一页",8,UKe),O("button",{type:"button",disabled:He.value>=en.value,onClick:q[4]||(q[4]=ce=>ps(He.value+1))},"下一页",8,VKe)])])]),_:1})],64)):Dn("",!0)])]),O("div",HKe,[gn(y7,{"model-value":c.value,topics:u,"onUpdate:modelValue":q[5]||(q[5]=ce=>c.value=ce)},null,8,["model-value"])])]),C.value?(Te(),Pe("div",{key:1,class:"epidemic-ledger-modal",onClick:Ws(Yo,["self"])},[O("div",WKe,[O("div",jKe,[O("div",null,[q[56]||(q[56]=O("span",null,"牦牛防疫台账",-1)),O("strong",null,De(Si(I.value))+" 条记录",1)]),O("button",{type:"button",onClick:Yo},"关闭")]),O("div",$Ke,[to(O("input",{"onUpdate:modelValue":q[6]||(q[6]=ce=>W.value.keyword=ce),type:"search",placeholder:"耳标 / 养殖户 / 药品","aria-label":"耳标 / 养殖户 / 药品",onKeyup:V2(Ds,["enter"])},null,544),[[Kf,W.value.keyword]]),to(O("select",{"onUpdate:modelValue":q[7]||(q[7]=ce=>W.value.town=ce)},[q[57]||(q[57]=O("option",{value:""},"全部镇/乡",-1)),(Te(!0),Pe(bn,null,Bn(sn.value,ce=>(Te(),Pe("option",{key:ce,value:ce},De(ce),9,qKe))),128))],512),[[wm,W.value.town]]),to(O("select",{"onUpdate:modelValue":q[8]||(q[8]=ce=>W.value.medicine=ce)},[q[58]||(q[58]=O("option",{value:""},"全部疫苗",-1)),(Te(!0),Pe(bn,null,Bn(Pi.value,ce=>(Te(),Pe("option",{key:ce,value:ce},De(ce),9,XKe))),128))],512),[[wm,W.value.medicine]]),to(O("input",{"onUpdate:modelValue":q[9]||(q[9]=ce=>W.value.startDate=ce),type:"date"},null,512),[[Kf,W.value.startDate]]),to(O("input",{"onUpdate:modelValue":q[10]||(q[10]=ce=>W.value.endDate=ce),type:"date"},null,512),[[Kf,W.value.endDate]]),O("button",{type:"button",onClick:Ds},"检索"),O("button",{type:"button",class:"is-ghost",onClick:Gl},"重置")]),O("div",YKe,[O("div",KKe,[q[59]||(q[59]=O("div",{class:"epidemic-ledger-table-head"},[O("span",null,"电子耳标"),O("span",null,"养殖户"),O("span",null,"镇/乡"),O("span",null,"村"),O("span",null,"疫苗"),O("span",null,"免疫时间"),O("span",null,"图片")],-1)),(Te(!0),Pe(bn,null,Bn(M.value,ce=>{var Je,Nt;return Te(),Pe("button",{key:ce.epidemicId||ce.earTag,type:"button",class:Xn({active:(((Je=F.value)==null?void 0:Je.epidemicId)||((Nt=F.value)==null?void 0:Nt.earTag))===(ce.epidemicId||ce.earTag)}),onClick:Cn=>qh(ce)},[O("span",null,De(ve(ce.earTag)),1),O("span",null,De(ve(ce.owner)),1),O("span",null,De(ve(ce.town)),1),O("span",null,De(ve(ce.village)),1),O("strong",null,De(ve(ce.medicine)),1),O("span",null,De(gt(ce.operateTime)),1),O("span",null,De(qe(ce).length?`${qe(ce).length}张`:"无"),1)],10,ZKe)}),128)),M.value.length?Dn("",!0):(Te(),Pe("div",JKe,De(E.value?"台账读取中":P.value||"暂无匹配记录"),1))]),O("div",QKe,[O("div",eZe,[O("span",null,De(ve(Nn.value.earTag)),1),O("strong",null,De(G.value?"加载中":gt(Nn.value.operateTime)),1)]),O("div",tZe,[(Te(!0),Pe(bn,null,Bn(lt.value,ce=>(Te(),Pe("section",{key:ce.title,class:"epidemic-detail-section"},[O("div",nZe,De(ce.title),1),O("div",iZe,[(Te(!0),Pe(bn,null,Bn(ce.fields,Je=>(Te(),Pe("span",{key:`${ce.title}-${Je.label}`,class:Xn({"is-wide":Je.wide})},[O("em",null,De(Je.label),1),O("strong",null,De(Je.value),1)],2))),128))])]))),128)),Re.value.length?(Te(),Pe("section",rZe,[q[60]||(q[60]=O("div",{class:"epidemic-detail-section-title"},"现场照片",-1)),O("div",aZe,[(Te(!0),Pe(bn,null,Bn(Re.value.slice(0,6),ce=>(Te(),Pe("img",{key:ce,src:tt(ce),alt:"防疫照片"},null,8,oZe))),128))])])):Dn("",!0)])])]),O("div",sZe,[O("span",null,"第 "+De(D.value)+" / "+De(hn.value)+" 页",1),O("button",{type:"button",disabled:D.value<=1,onClick:q[11]||(q[11]=ce=>oc(D.value-1))},"上一页",8,lZe),O("button",{type:"button",disabled:D.value>=hn.value,onClick:q[12]||(q[12]=ce=>oc(D.value+1))},"下一页",8,uZe)])])])):Dn("",!0),pt.value?(Te(),Pe("div",{key:2,class:"epidemic-ledger-modal trade-ledger-modal",onClick:Ws(zi,["self"])},[O("div",cZe,[O("div",dZe,[O("div",null,[q[61]||(q[61]=O("span",null,"牦牛交易出证台账",-1)),O("strong",null,De(ie.value)+"年 "+De(Si(bt.value))+" 条记录",1)]),O("button",{type:"button",onClick:zi},"关闭")]),O("div",hZe,[to(O("input",{"onUpdate:modelValue":q[13]||(q[13]=ce=>Lt.value.keyword=ce),type:"search",placeholder:"货主 / 车辆 / 检疫号 / 地区",onKeyup:V2(Gr,["enter"])},null,544),[[Kf,Lt.value.keyword]]),to(O("select",{"onUpdate:modelValue":q[14]||(q[14]=ce=>Lt.value.startTown=ce)},[q[62]||(q[62]=O("option",{value:""},"全部源头乡镇",-1)),(Te(!0),Pe(bn,null,Bn(Rt.value,ce=>(Te(),Pe("option",{key:ce,value:ce},De(ce),9,fZe))),128))],512),[[wm,Lt.value.startTown]]),to(O("select",{"onUpdate:modelValue":q[15]||(q[15]=ce=>Lt.value.usageType=ce)},[q[63]||(q[63]=O("option",{value:""},"全部用途",-1)),(Te(!0),Pe(bn,null,Bn(Et.value,ce=>(Te(),Pe("option",{key:ce,value:ce},De(ce),9,pZe))),128))],512),[[wm,Lt.value.usageType]]),to(O("select",{"onUpdate:modelValue":q[16]||(q[16]=ce=>Lt.value.certType=ce)},[q[64]||(q[64]=O("option",{value:""},"全部证书",-1)),(Te(!0),Pe(bn,null,Bn(Fn.value,ce=>(Te(),Pe("option",{key:ce.value,value:ce.value},De(ce.label),9,vZe))),128))],512),[[wm,Lt.value.certType]]),O("button",{type:"button",onClick:Gr},"检索"),O("button",{type:"button",class:"is-ghost",onClick:lu},"重置")]),O("div",mZe,[O("div",gZe,[q[65]||(q[65]=O("div",{class:"trade-ledger-modal-table-head"},[O("span",null,"货主"),O("span",null,"证书"),O("span",null,"车牌号"),O("span",null,"数量"),O("span",null,"源头"),O("span",null,"用途"),O("span",null,"出证时间"),O("span",null,"状态")],-1)),(Te(!0),Pe(bn,null,Bn(Ot.value,ce=>(Te(),Pe("button",{key:ce.certId||ce.factoryCode,type:"button",class:Xn({active:Pt.value===(ce.certId||ce.factoryCode)}),onClick:Je=>jh(ce)},[O("span",null,De(ve(ce.ownerName)),1),O("span",null,De(ve(ce.certType||ce.certScopeName)),1),O("span",null,De(ve(ce.transportNumber)),1),O("strong",null,De(Si(ce.amount))+"头",1),O("span",null,De(ve(ce.startTown)),1),O("span",null,De(ve(ce.usageTypeName)),1),O("span",null,De(gt(ce.issueTime)),1),O("span",null,De(ve(ce.statusName)),1)],10,yZe))),128)),Ot.value.length?Dn("",!0):(Te(),Pe("div",_Ze,De(Kt.value?"交易台账读取中":Tt.value||"暂无匹配记录"),1))]),O("div",SZe,[O("div",bZe,[O("span",null,De(ve(Xe.value.factoryCode||Xe.value.certId)),1),O("strong",null,De(gt(Xe.value.issueTime)),1)]),O("div",xZe,[O("span",null,[q[66]||(q[66]=O("em",null,"货主",-1)),O("strong",null,De(ve(Xe.value.ownerName)),1)]),O("span",null,[q[67]||(q[67]=O("em",null,"联系方式",-1)),O("strong",null,De(Dt(Xe.value.ownerPhone)),1)]),O("span",null,[q[68]||(q[68]=O("em",null,"证书类型",-1)),O("strong",null,De(gr(Xe.value)),1)]),O("span",null,[q[69]||(q[69]=O("em",null,"车牌号",-1)),O("strong",null,De(ve(Xe.value.transportNumber)),1)]),O("span",null,[q[70]||(q[70]=O("em",null,"牦牛数量",-1)),O("strong",null,De(Si(Xe.value.amount))+"头",1)]),O("span",null,[q[71]||(q[71]=O("em",null,"用途",-1)),O("strong",null,De(ve(Xe.value.usageTypeName)),1)]),O("span",null,[q[72]||(q[72]=O("em",null,"源头乡镇",-1)),O("strong",null,De(ve(Xe.value.startTown)),1)]),O("span",null,[q[73]||(q[73]=O("em",null,"目的省份",-1)),O("strong",null,De(ve(Xe.value.destProvince)),1)]),O("span",null,[q[74]||(q[74]=O("em",null,"检疫员",-1)),O("strong",null,De(ve(Xe.value.quarantineOfficerName)),1)]),O("span",null,[q[75]||(q[75]=O("em",null,"状态",-1)),O("strong",null,De(ve(Xe.value.statusName)),1)]),O("span",wZe,[q[76]||(q[76]=O("em",null,"源头地区",-1)),O("strong",null,De(ve(Xe.value.startRegionFullName)),1)]),O("span",TZe,[q[77]||(q[77]=O("em",null,"目的地",-1)),O("strong",null,De(ve(Xe.value.destRegionFullName)),1)])]),O("button",{type:"button",class:"trade-detail-locate",disabled:!Xe.value.startTown,onClick:q[17]||(q[17]=ce=>$h(Xe.value))}," 定位源头乡镇 ",8,AZe)])]),O("div",CZe,[O("span",null,"第 "+De(ht.value)+" / "+De(we.value)+" 页",1),O("button",{type:"button",disabled:ht.value<=1,onClick:q[18]||(q[18]=ce=>od(ht.value-1))},"上一页",8,MZe),O("button",{type:"button",disabled:ht.value>=we.value,onClick:q[19]||(q[19]=ce=>od(ht.value+1))},"下一页",8,EZe)])])])):Dn("",!0)]))}},DZe='{"features":[{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.72054300028239,32.458068000269385],[102.70921799968262,32.462435999639084],[102.66725399978725,32.46158700022178],[102.66475800022761,32.45708600027499],[102.6542670000292,32.45687099992998],[102.64908599986569,32.454540000142686],[102.64659100013095,32.45003899983171],[102.64140999996745,32.44770700002092],[102.58634200013817,32.44655700029298],[102.57329699975548,32.444055000089435],[102.56811899996505,32.441720000201165],[102.55763000031477,32.44149699985824],[102.54471999965128,32.43454499978366],[102.53443299966735,32.42764900032831],[102.53194499960533,32.42314500031296],[102.526769000363,32.42080799991942],[102.51628400001239,32.42058100014747],[102.51023199963763,32.44714800005664],[102.50747499996206,32.45153699973817],[102.50216300027729,32.453645999886795],[102.49698600031178,32.45130800028919],[102.4947700002363,32.43791000036892],[102.48710900040669,32.431067000238166],[102.4820699996351,32.42428100002831],[102.47965299971818,32.41755300011894],[102.48088100030482,32.37753300002301],[102.48652900044856,32.36430899968859],[102.48666499999267,32.359863000236096],[102.47632399958208,32.355184999646646],[102.46095199969413,32.34371999992253],[102.44289599992558,32.33441799971085],[102.437935999695,32.325407999824286],[102.43890599964051,32.29428500016047],[102.44166099966623,32.289896999645855],[102.44179999958341,32.28545099996393],[102.44730999963487,32.27667599967831],[102.44786100017899,32.25889200011692],[102.43258100035256,32.24520199970394],[102.43010400016118,32.240696999781996],[102.42494200026425,32.238356000256665],[102.42006064394359,32.22712448083805],[102.42005999985149,32.22712299975095],[102.4149690000997,32.22255899991469],[102.41524799975896,32.21366699987058],[102.41277300011569,32.209162000035256],[102.41291299985781,32.20471600018898],[102.40796400039619,32.19570599980383],[102.40810400013831,32.19125999994271],[102.40294600043933,32.188918000250396],[102.4004730004459,32.184412999647414],[102.40061300018799,32.1799679999626],[102.39552599973582,32.175403000277186],[102.39312399988752,32.168675000186546],[102.38676500026439,32.165417000132486],[102.3867639366591,32.16541645489913],[102.38676500026439,32.165415000182996],[102.38726099965864,32.1638040000191],[102.38727599972724,32.161684999802844],[102.38729900019179,32.15967900026607],[102.38745900002534,32.15762099984043],[102.38774199988256,32.15543900038005],[102.38823800017512,32.1534859997799],[102.38827599980993,32.152227000292044],[102.38837500044245,32.15124699963698],[102.38894700000468,32.14986299981094],[102.38973299982715,32.148882000205184],[102.39086900035228,32.14857599982192],[102.3930669999861,32.14773000012812],[102.39454300026985,32.14719500028029],[102.39539000019172,32.14626499966233],[102.39564200008678,32.14523599985536],[102.39555800042119,32.14455000037774],[102.39593199961669,32.142995999951545],[102.39718299976954,32.14217700032519],[102.39883099958247,32.14156699963533],[102.40043300026294,32.14096900006332],[102.40181400011215,32.13985599972305],[102.40294399989118,32.13891400017396],[102.4040569999518,32.137688000352085],[102.40517900023323,32.13652599969788],[102.40663600025042,32.1356969998132],[102.40844399989693,32.135264999687486],[102.41039399983362,32.13540499975514],[102.41229299971668,32.13617599962412],[102.41399499995626,32.1370019996206],[102.4157649999679,32.1378290000206],[102.4172560003203,32.138430999967426],[102.42042999974736,32.13905699999628],[102.4229889999545,32.13974800024432],[102.42490499955602,32.13995300008256],[102.42677800039813,32.13956800032187],[102.42883399974173,32.138619999989075],[102.43134000024544,32.136622999795776],[102.43351799978778,32.13509500007721],[102.43590899976542,32.1336970000722],[102.43770200024161,32.132744000189106],[102.43882000032508,32.1319809999078],[102.43961299982024,32.13121800009119],[102.43998299971608,32.13029500033032],[102.43996799964748,32.129384000236506],[102.43899500022727,32.127972999749424],[102.43774400007442,32.126552999697694],[102.43670299998382,32.12503000000239],[102.43638199959344,32.12280699978877],[102.43694700038127,32.12113599964322],[102.43759199973844,32.11981000027881],[102.43862199995837,32.1178440001187],[102.43992300033995,32.11632899993877],[102.44092199969944,32.115736000343105],[102.44171900029085,32.115553000172454],[102.4431310001022,32.11552299973531],[102.44468400037887,32.115951999723244],[102.44624400032822,32.11660900014873],[102.44767399968295,32.11761099977621],[102.44865100019943,32.11806899971838],[102.4495929996575,32.11822199985972],[102.45079500030488,32.118196999719856],[102.45173299956497,32.118002999802],[102.45305700041109,32.11729100004433],[102.45495299992113,32.11513699982493],[102.45611600021046,32.11345500010981],[102.45795900001704,32.11199000002623],[102.45933599966828,32.110702999788465],[102.460892000318,32.109898999776576],[102.46255900039748,32.10940599986765],[102.4640890002096,32.10885599992084],[102.46528299956276,32.10843699997646],[102.46640800021724,32.10790300007726],[102.46834200026042,32.107114999694105],[102.469924999776,32.10599100027305],[102.47102799979085,32.10465299997843],[102.47139799968672,32.103558999742944],[102.4715580004186,32.10217400014529],[102.47118000012682,32.100238999989465],[102.47079900036032,32.09835900019173],[102.47048600036588,32.09670400025237],[102.47045600022864,32.09504800002299],[102.47063100013084,32.09400800025334],[102.47152699955814,32.09244899972349],[102.47271400013692,32.09139399967068],[102.47419000042068,32.09070200009054],[102.47552199986609,32.09033100007888],[102.47719599961826,32.090122999770244],[102.47872999962834,32.08998000013962],[102.47980199968107,32.08989899984502],[102.48100299960522,32.08964600037],[102.48171999983073,32.08900500008335],[102.48203299982515,32.08791399984918],[102.48170499976213,32.085684000246175],[102.48170499976213,32.08554099975769],[102.48172800022665,32.083676999896674],[102.48170099956415,32.083318000128976],[102.4816060000279,32.08172799962886],[102.48162100009654,32.07971899963388],[102.4817120003331,32.07811699994125],[102.48194599978653,32.07657100019843],[102.48225799995606,32.07558699993045],[102.48271599971548,32.07483600018153],[102.48363499960733,32.074128999893986],[102.48429499993141,32.073940999770485],[102.48510400021841,32.07392600033108],[102.4863510001733,32.074000999787145],[102.48774799991605,32.07379799994004],[102.48867100000588,32.073210000123105],[102.48918599966666,32.07222300027557],[102.48921599980389,32.070788000322466],[102.48898700037334,32.06970399991034],[102.48855600037813,32.06839999983754],[102.48764099978591,32.06686900005756],[102.48694299982702,32.065685999780804],[102.48645099973243,32.06460399966914],[102.48628300040124,32.063292000344006],[102.4865760003042,32.06156700006867],[102.48720999979072,32.060007999683116],[102.48816700021573,32.05810700005182],[102.48858700034029,32.05626800003703],[102.48799200031353,32.05393599962565],[102.4864850000676,32.05207099987044],[102.48472299955357,32.05064399968549],[102.48248700028493,32.04943099967271],[102.47979400018349,32.04902899977396],[102.47623499989362,32.048758999907534],[102.4730649997662,32.04868400031093],[102.4705089999321,32.04822100030305],[102.46834599956007,32.0477559999933],[102.46624800038367,32.04676400006588],[102.46527500006515,32.0453549997488],[102.46542400002808,32.0433479998149],[102.46558399986164,32.041740999826935],[102.46529000013378,32.04031999970817],[102.46452000020483,32.03924099990652],[102.46302800002753,32.038582000178444],[102.46154400024615,32.037985000006735],[102.46091499988421,32.03684799984184],[102.46095300041736,32.03576200037688],[102.46171199957732,32.03386200034655],[102.46263899986509,32.031040999951074],[102.46309699962451,32.02811099979689],[102.46310500002043,32.02530600025379],[102.46285300012534,32.02308099975598],[102.4625329995599,32.020907000299644],[102.46262399979649,32.01907100026484],[102.46339500044864,32.01756999995936],[102.46483300019926,32.01616899972524],[102.46627900034582,32.01504799993893],[102.46805600003015,32.01410900028854],[102.46990600040772,32.01315200030162],[102.47183600025296,32.012538999935906],[102.4740149996202,32.012562999903075],[102.47636499958996,32.013088999636715],[102.47873800002426,32.01401299971645],[102.48069899983162,32.014829000231046],[102.48281199997494,32.016329999735696],[102.48438699999292,32.01789899981495],[102.4856880003745,32.01902099981482],[102.48694299982702,32.01983799995544],[102.48775499958873,32.02015899970552],[102.48890299980945,32.02042299989569],[102.49004400035747,32.0205120003365],[102.49090999964754,32.020379999703074],[102.49190600043063,32.020074999900906],[102.49276000002513,32.01954100026702],[102.49327499968597,32.01850000015909],[102.49395000007863,32.01630800016253],[102.4947130003349,32.014569999674976],[102.49541899979141,32.01324200030587],[102.4961929999183,32.01213600018294],[102.49678799994507,32.01166799979396],[102.49798200019653,32.011296999911494],[102.49829900038894,32.01129199997676],[102.49991299986664,32.011300000329236],[102.50002300036982,32.01132299972018],[102.5026059999681,32.01186699982661],[102.50409700032048,32.01240900025838],[102.5061190002272,32.0128800002763],[102.50818700016468,32.01283899983566],[102.50991100014556,32.01211200010392],[102.51116599959806,32.0105180000837],[102.51239099981167,32.008715000046706],[102.51402613485139,32.006737045894845],[102.51402699992903,32.006738999805634],[102.51802600043492,32.01577800026322],[102.52317599973799,32.01811500036964],[102.52825999981707,32.022672999830995],[102.53602000027922,32.02506600016468],[102.54364799959856,32.031902000320905],[102.55114500029495,32.04318399994739],[102.5505510000931,32.063187000363364],[102.56829700024029,32.08136000012385],[102.57319100034857,32.0925849999706],[102.57860900033855,32.08602800011623],[102.5787390000349,32.081583000296526],[102.58147999981692,32.0771929997732],[102.58676599956239,32.07508100020391],[102.58689600015704,32.07063600014042],[102.59505099973109,32.05968900028574],[102.59518100032574,32.05524399973979],[102.60046500042141,32.05313099989102],[102.60868100009479,32.039961000309994],[102.61396400036554,32.03784800017711],[102.62440100013727,32.03806599983736],[102.62688199962832,32.04256599976612],[102.63719299990169,32.047229000085665],[102.6502409997591,32.0474989998973],[102.66161879165318,32.04519365023855],[102.6603289995514,32.046258999775404],[102.6596189998969,32.04747400020202],[102.65911599993164,32.04879899976884],[102.65887599973216,32.050005000244056],[102.65877600017303,32.051095999820376],[102.65921499966588,32.05234399969794],[102.65992400039376,32.0534280002818],[102.6610190000127,32.055043999878556],[102.66140099960411,32.05680899998501],[102.660752000049,32.05919100011729],[102.66019100035744,32.06091699987881],[102.65949699969818,32.06270299962657],[102.65820299988758,32.064615000125876],[102.65656699977026,32.06653400003934],[102.65506000042267,32.06810799997259],[102.6539580002327,32.069731000146156],[102.65264900035352,32.071304000377886],[102.65126799960599,32.072301000308855],[102.64950199979232,32.074332999979305],[102.64841499967096,32.07591400024069],[102.64744999974837,32.077477999830094],[102.64688499985884,32.07903499970173],[102.64652699965855,32.08081199979456],[102.64657299968931,32.08247099962167],[102.64667899999452,32.08338600022288],[102.64674000009389,32.08396000007435],[102.64651900016092,32.08568099998278],[102.64645800006156,32.08579299985619],[102.64555400023835,32.087527999682024],[102.6444470000255,32.08886799978205],[102.64327700006349,32.09014299979119],[102.64264000020393,32.09181100013682],[102.64228899967635,32.09371399999258],[102.6418769999477,32.09589099972743],[102.64194499971975,32.098589000362075],[102.64247199997446,32.10052499963338],[102.64248700004305,32.10126699982346],[102.64244900040823,32.10224099999723],[102.64218900011723,32.10292900008507],[102.64173899985546,32.1035649998565],[102.64080400007006,32.10403999985824],[102.63953799984857,32.10440899997917],[102.63812299966418,32.10454599980328],[102.6366539999514,32.105029999674755],[102.63526999972915,32.106149000191984],[102.63443000037833,32.10731399993922],[102.63344600018914,32.10829999990261],[102.63237400013641,32.10866199993504],[102.63164199984232,32.10890900024536],[102.63104299961762,32.109382000185356],[102.63039400006248,32.110078999644806],[102.63001300029602,32.11105799999349],[102.63011200003021,32.11214599985974],[102.63053899982745,32.11310700013002],[102.63117999988495,32.11441199968129],[102.63155800017672,32.115950999966785],[102.63166500030687,32.11743800000579],[102.63138199955134,32.11938900019685],[102.63074499969177,32.12089200032874],[102.62925000003973,32.12257699975614],[102.62765199955723,32.12335000011959],[102.6258399997128,32.12366999990971],[102.62503899982174,32.12404900029459],[102.62457699986437,32.12426800029919],[102.62391400006555,32.124735999954304],[102.6235430003448,32.12527000028649],[102.62314199958847,32.12583700034274],[102.62297500008223,32.12715700029693],[102.62300500021946,32.12835700014381],[102.62319600001516,32.13029999984813],[102.62344799991025,32.13235499983715],[102.6235430003448,32.132780000004836],[102.62389800017203,32.13441199980517],[102.624303000228,32.136753999740726],[102.62433300036523,32.13795699968742],[102.62388300010342,32.138819000003096],[102.62355099984238,32.13901299978229],[102.62316599987793,32.1392320003781],[102.6222269998946,32.13936200011829],[102.6208119997102,32.139217000249836],[102.61919099966144,32.13919100027528],[102.61703200038572,32.13905899976349],[102.61508200044901,32.13909500012946],[102.61280500027415,32.13976600029313],[102.6117370004194,32.140359999909556],[102.61061500013797,32.141301999735184],[102.60963799962148,32.1424090000801],[102.60887199989051,32.14396500028183],[102.6085050003677,32.145403999949565],[102.60855100039846,32.14712500019594],[102.60907399955687,32.1490040001611],[102.60986000027765,32.15082000007623],[102.6106379997042,32.152407000322484],[102.61134700043208,32.15370800014774],[102.61179000012285,32.155243999719374],[102.61178199972694,32.15736199983123],[102.6113709998232,32.16000599983707],[102.61083600007089,32.162305999817946],[102.60982900031551,32.1650749997723],[102.60914999972483,32.166692000039326],[102.60881400016417,32.167500999651836],[102.60791799983855,32.169156999904736],[102.60772000037014,32.169522999984466],[102.6064230001865,32.17125699988275],[102.60476699997767,32.17249500018919],[102.60299299976808,32.174187000329056],[102.60148300004744,32.175760999940834],[102.60091899998282,32.17749700013777],[102.60136900024462,32.17915000013801],[102.60213199960256,32.18027700004944],[102.60298199989742,32.18151999990075],[102.60334900031854,32.18283000023751],[102.60334099992264,32.184430999998206],[102.60296699982882,32.185756000338095],[102.60218900040229,32.186856999766334],[102.60106299992287,32.18779000037817],[102.59986600019667,32.18827299976411],[102.59811799992633,32.18869899969253],[102.59637899987685,32.18890000002658],[102.59497499956309,32.189331999855064],[102.59331199968157,32.19038799992703],[102.59193099983236,32.191790000339076],[102.59109200030645,32.19300499966926],[102.59045899974656,32.19450800026738],[102.59009200022375,32.196465000200085],[102.59008499965273,32.19852999972693],[102.5905960000139,32.20023399991587],[102.59177799967148,32.201642999986866],[102.59322800001598,32.20269999967366],[102.59426599973354,32.20376300036406],[102.59537200012143,32.20500399965598],[102.596341000242,32.205902000179094],[102.59731799986018,32.207315999728046],[102.59830899972205,32.209136999753504],[102.59907199997829,32.211992000127196],[102.59933100044437,32.2142709999633],[102.59930799997986,32.21628099984465],[102.5990179995516,32.21806399986507],[102.59852299998231,32.21977300036419],[102.59774499965744,32.221102999664076],[102.59695100033738,32.22198499976515],[102.59650799974827,32.22290800010725],[102.59625699967812,32.22371700016292],[102.59634799991471,32.22456899971848],[102.59663800034294,32.225481999673235],[102.59714899980577,32.226847999679315],[102.59815300008644,32.229858999925064],[102.59948399970696,32.23210100015272],[102.60031999975813,32.233750999872036],[102.60060900036142,32.234303999892475],[102.60270700043614,32.23744800018163],[102.60388200042104,32.23909099982512],[102.60527099976784,32.24061100010734],[102.60679300008238,32.24218799991208],[102.60887500026355,32.24454799993326],[102.61107700009534,32.24639999999734],[102.61275599987039,32.24860199962777],[102.61374400025753,32.250023999733266],[102.6140179998939,32.250410000266136],[102.61487999988432,32.25249800027531],[102.6150320002203,32.252851000048125],[102.61550500004832,32.25553400021737],[102.61535299971236,32.25754099991108],[102.61545200034487,32.258566000070694],[102.61607800033376,32.25935700020992],[102.61717200012781,32.25985299991186],[102.61899599966777,32.26022099989984],[102.62076999987741,32.26070200033467],[102.6222770001233,32.261478000356796],[102.6235430003448,32.26228100002441],[102.62444299997009,32.26286499974024],[102.62502700012618,32.26343699981507],[102.62638500040919,32.264772000030845],[102.62851799974564,32.266169999663845],[102.63035200022969,32.266483000083525],[102.63163000014674,32.266289000004],[102.63263000022945,32.26575300008734],[102.63380799968908,32.264757000077736],[102.63538400043029,32.263068000291],[102.63662700018725,32.2616080002599],[102.63779799997415,32.25992700021094],[102.63911500024926,32.25836200037371],[102.64082800035952,32.25672900023746],[102.64269299990738,32.255724999749056],[102.64457400024712,32.255290000048085],[102.64659899962858,32.25542700019276],[102.64796100010952,32.25585999975642],[102.64965099975522,32.25679100024409],[102.65103599980237,32.25796800020488],[102.6524660000554,32.25913900035345],[102.65426299983122,32.26070599984277],[102.6557320004423,32.2625140002575],[102.6571319996598,32.2644419997306],[102.65908099977158,32.26617700009032],[102.66144599980994,32.267717999879586],[102.66363900031921,32.26887800020565],[102.66535999992706,32.270222999757486],[102.66614199955154,32.271363999784604],[102.66660000020926,32.27335499999744],[102.66672900008072,32.27564700013293],[102.6667288779098,32.27564796699629],[102.6664550004443,32.277825999862166],[102.66590600044832,32.279955000093594],[102.66483400039557,32.28289500016384],[102.66381500004631,32.285258999785924],[102.66365500021276,32.2869800000831],[102.66398699957546,32.2889790003561],[102.66462699980806,32.290732999939486],[102.66523400042867,32.29307499980293],[102.66529499962972,32.29530300014266],[102.66481000010613,32.29749399964315],[102.66398599975052,32.29945499971654],[102.66355499975532,32.301005999863825],[102.66332600032479,32.30254400023498],[102.66330399968514,32.304207000076346],[102.66328799979163,32.306270000359824],[102.663272999723,32.30809799992012],[102.66312799995805,32.310399000171955],[102.6627010001608,32.31189199979196],[102.66205599990532,32.313277999743],[102.66148400034311,32.31448799988423],[102.66142300024373,32.314754999858735],[102.6599629998535,32.31442499998024],[102.6570479999942,32.31396399996381],[102.65467200008513,32.31360600027756],[102.65250500041346,32.31347099965742],[102.65067799960211,32.31333100026397],[102.64959800005177,32.31346100025025],[102.64850699973246,32.31424100004588],[102.64786200037533,32.31579600003118],[102.64725099955673,32.31837999983252],[102.64668300019247,32.31982400021056],[102.64647700032813,32.32189400006608],[102.64646999975716,32.32429699970619],[102.64660700002449,32.32687299985025],[102.646446000366,32.32869999990835],[102.64607999976981,32.3300760001124],[102.64612599980056,32.33179500013766],[102.64649200039676,32.33310500008602],[102.64659899962858,32.33338200006592],[102.64677799972871,32.33390700036274],[102.6465230003589,32.334716000053156],[102.6452980001453,32.33582699982633],[102.64358900023302,32.336142999976154],[102.64164000012123,32.33646299974329],[102.64031600017344,32.33762799964365],[102.6396869998115,32.339295999899285],[102.63908400028713,32.34148999966091],[102.6388780004228,32.34406900016386],[102.6385960003905,32.346021999946295],[102.63829799956638,32.347564999839186],[102.63835199999303,32.349569000149984],[102.63906900021853,32.35127000033997],[102.6404609999384,32.35256200025471],[102.64122400019464,32.35340900023051],[102.64260099984588,32.3542429998874],[102.64443600015484,32.35472600035402],[102.64674799959147,32.355087999729065],[102.64964800028048,32.35588100031466],[102.65190199999081,32.356810000100644],[102.65354599960575,32.35758499982846],[102.65506799992029,32.35876699999654],[102.65605600030743,32.360176000342406],[102.65643799989884,32.361831000300704],[102.65641500033261,32.36372100002522],[102.6570630000628,32.36559699978774],[102.65798199995466,32.36701400018139],[102.65897799983941,32.368826999919975],[102.66031699985584,32.370750000279486],[102.6615260001759,32.37368699969736],[102.66267100002355,32.376354999873506],[102.66366600008341,32.37834499998104],[102.6650050000998,32.380384999794686],[102.66640500021559,32.38196400027017],[102.66778199986688,32.382854000099236],[102.66976199994079,32.38379199973225],[102.67169199978599,32.385018000357135],[102.67302300030481,32.38665599997683],[102.67370299982205,32.38793300012527],[102.67441599984957,32.389127999694196],[102.67513300007508,32.39099600036613],[102.67546100013814,32.392996999824604],[102.6749730002415,32.395065000036375],[102.6748889996776,32.396892000142095],[102.67447000027627,32.398789000098276],[102.6736340002251,32.40058200011194],[102.6722419996069,32.4026909998388],[102.67079600035866,32.404378000020735],[102.67042200026486,32.40541499967604],[102.67038399973171,32.40644799965354],[102.67081100042729,32.4074750001632],[102.67186000001547,32.40853800014644],[102.6735429999885,32.409800999630384],[102.67533200026669,32.41097300009561],[102.67630499968692,32.41181500023215],[102.67693400004887,32.41254499993685],[102.67701799971445,32.413173000172556],[102.67698000007961,32.41426399968438],[102.67722399957879,32.41557299968458],[102.67778799964337,32.41659300007235],[102.67794500000223,32.4167100002004],[102.67951599982223,32.41788199965765],[102.68103099956575,32.41905500002939],[102.68108099979446,32.41909299982196],[102.6828309997146,32.420455999658365],[102.68427699986117,32.42124499982961],[102.68593600044302,32.42135799999464],[102.6876799996171,32.420926000082986],[102.68903399970212,32.420844000101376],[102.69073199974375,32.42115900013263],[102.6925810002964,32.42181299979039],[102.69395100027496,32.42247399973292],[102.69519099965886,32.42325200012484],[102.69652200017771,32.42500500034931],[102.69752499973515,32.42682099962222],[102.69873900007809,32.42836999981922],[102.70045899986098,32.42965399972422],[102.70190500000756,32.43054400029938],[102.7035489996225,32.43137599973765],[102.70513200003639,32.4322069997713],[102.70739800034058,32.43324999990037],[102.70951599960844,32.43400600028861],[102.71112900015959,32.43487400027467],[102.71243300001589,32.43576600018425],[102.71375699996368,32.43711700036367],[102.7153060000424,32.439207000017596],[102.7163050003002,32.44113199962613],[102.71716700029063,32.44289499974975],[102.71755300008003,32.44466000012344],[102.71751100024721,32.445806000128776],[102.71754499968411,32.44695299987042],[102.71799499994587,32.44837499965356],[102.71903299966343,32.44932900021208],[102.72045899971847,32.44975800012479],[102.72183299989501,32.45024899970421],[102.72245800005898,32.45086700032309],[102.72288599968117,32.451716999806905],[102.72269099968749,32.452583000122125],[102.72187100042815,32.45437300037524],[102.72109200027839,32.45576200010515],[102.7205850001152,32.4569159997802],[102.72054300028239,32.458065999948396],[102.72054385637686,32.45806766978815],[102.72054300028239,32.458068000269385]]],"type":"Polygon"},"properties":{"code":"513233206","name":"壤口乡","cp":[102.51205063384711,32.23458652276696]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.22913800004224,32.54569500010043],[102.22766599995644,32.54606099994012],[102.2260370004101,32.54580400033077],[102.22460999963184,32.54519599994064],[102.22266100041834,32.54332300015577],[102.22101299970714,32.541915000185355],[102.22017800037919,32.54061500018888],[102.21946799982638,32.539371999989406],[102.21882699976888,32.53777700008355],[102.21838400007809,32.53623900002918],[102.21783099988413,32.535388999817194],[102.21693899975647,32.534887999813336],[102.2157219999388,32.53462600007702],[102.21376899962902,32.53477100019899],[102.21181899969234,32.53514800017777],[102.20883600006097,32.535750999795056],[102.20627600002894,32.53590899992215],[102.20384600238813,32.53572099967242],[102.20396399969397,32.50236399999247],[102.19902000025526,32.49334199977785],[102.1992479998609,32.486671999873636],[102.19153099995478,32.482031999729095],[102.18149599986594,32.468434000218984],[102.18279300004956,32.43063900016145],[102.19103800003528,32.41971699991332],[102.19119000037125,32.415269999908496],[102.18872099967747,32.41075900003742],[102.18887300001343,32.40631300030013],[102.17653399998557,32.38375799963739],[102.17668700014643,32.37931200017249],[102.17175399968005,32.37029000033684],[102.16666799995113,32.36571399998626],[102.16728100041954,32.34792999976488],[102.162349999603,32.338907999762576],[102.16343702128388,32.30742333491071],[102.16396761569804,32.307330067144775],[102.16396800017696,32.307330000330744],[102.16618400025246,32.307347999873656],[102.16800399959448,32.30754899971455],[102.16942700017482,32.307981000379236],[102.17093299969748,32.30876100028527],[102.17181399995452,32.309487999848685],[102.17251600011139,32.31068100000379],[102.17338200029978,32.312619999917864],[102.17410700002287,32.314735999659085],[102.17481300037771,32.316492999826295],[102.17550700013867,32.317456999932574],[102.17653300016066,32.318411000027766],[102.17782600014631,32.31912800004046],[102.17944700019503,32.3196750003242],[102.18093099997641,32.31982199986218],[102.1824109995598,32.31973800037232],[102.1836890003752,32.319657000193956],[102.18489899962186,32.31975400013652],[102.18600900020775,32.32009099963835],[102.18763799975409,32.3206859997451],[102.18905299993848,32.32118399991292],[102.19034199972619,32.32144900033253],[102.19154400037357,32.321372000035566],[102.19275399962025,32.32094300032765],[102.19400899997108,32.319833999674515],[102.19526000012392,32.31866699966743],[102.19711399980118,32.31749199972528],[102.19873099965194,32.31650699974217],[102.20065399982444,32.31573300027772],[102.20259500043865,32.315065000075805],[102.2043389996127,32.3149219998038],[102.20602499995877,32.31489400023912],[102.20803500016993,32.31434799978495],[102.20943500028568,32.31375299979615],[102.21069800013413,32.3130459999625],[102.21171300028547,32.312306000174324],[102.21256400040524,32.31137500001384],[102.21347900009914,32.31004800014048],[102.21425300022604,32.30865699977465],[102.21490199978112,32.30732899963896],[102.21548199973928,32.30623500002756],[102.21578700023612,32.304739999894934],[102.21608500016195,32.302901000371804],[102.21633899970686,32.302100000342264],[102.21699599965785,32.30123100010397],[102.21806400041095,32.300751999680855],[102.21880400020265,32.30079599989505],[102.22063100011572,32.30145199979604],[102.22192499992629,32.30245899992285],[102.22289400004686,32.30364900007536],[102.22304600038284,32.30461800000232],[102.222672000289,32.30576499978738],[102.22209999982849,32.3074939997457],[102.22193199959898,32.30904299990093],[102.2225659999838,32.31028899986498],[102.22368599971709,32.3111989998362],[102.22384700027389,32.31141799973782],[102.22465099963972,32.312500999632974],[102.2253610001925,32.31391800035055],[102.22579600038567,32.31539499990022],[102.22630699984855,32.31727700013422],[102.22727599996912,32.3185279997631],[102.22749000022935,32.31880299994077],[102.228783000215,32.31952499963558],[102.23075099969505,32.320122999798386],[102.23344799999447,32.320361999711125],[102.23654299977883,32.319755999727306],[102.23968600014209,32.31850299998154],[102.24228399980899,32.31754100001973],[102.24388599959113,32.31671699973908],[102.24514500013991,32.315606000038954],[102.24593799963509,32.31468399981155],[102.24645599966894,32.31364199990284],[102.24655600012635,32.31215399967062],[102.24653299966181,32.31118200018915],[102.24644099960031,32.30997900000677],[102.24640399979039,32.30848400015017],[102.2467770000593,32.30716599985969],[102.24721999975007,32.306125999925655],[102.24799399987697,32.30473799997272],[102.24833000033595,32.30367200021401],[102.24852100013167,32.303147999996426],[102.24867299956932,32.30057300010776],[102.2488109996616,32.297939000116294],[102.24883400012611,32.29581600026148],[102.24899399995967,32.29409700001866],[102.2495580000243,32.29219500003034],[102.25003099985231,32.2912769997075],[102.25059599974185,32.29017800012493],[102.25150399976305,32.2886189996461],[102.25248100027952,32.28705999970095],[102.25332700037644,32.285900000232985],[102.25391499983219,32.28480399981369],[102.25422799982663,32.283880999649],[102.25421199993308,32.28319699993728],[102.25392200040321,32.28234199987823],[102.25349499970763,32.28114699991173],[102.25393800029671,32.27993600019266],[102.25485299999062,32.2786060002747],[102.25609699957246,32.27721100012442],[102.25714199986103,32.27570299995905],[102.25798100028523,32.27391500021707],[102.25833199991452,32.27167999997636],[102.25801899992008,32.269624999977445],[102.25738600025849,32.268264000180416],[102.25708900015756,32.267007999894844],[102.25725700038704,32.26568799970933],[102.2577750004209,32.264535000178356],[102.25840899990743,32.26275500024747],[102.25843099964871,32.26092399973417],[102.2581190003775,32.259098000311496],[102.2577450002837,32.257437999625004],[102.2575770000542,32.25566800000643],[102.25738600025849,32.253153000303215],[102.25730599989255,32.252323000303065],[102.25711900029481,32.25035700018977],[102.25711199972379,32.250026999907114],[102.25707300026404,32.248412000129605],[102.25723399992253,32.24634900031007],[102.25753900041937,32.24502000032892],[102.25792799968349,32.24432799973488],[102.25878999967391,32.24386099966474],[102.26007199978893,32.24401100018006],[102.26218400010735,32.24461300025248],[102.26428999967966,32.24549799967851],[102.26632699965496,32.246433000181995],[102.26818500042849,32.24795100027072],[102.26996999961042,32.24952599989304],[102.27035200010016,32.25003400005911],[102.27157200029087,32.2516749996312],[102.27208699995168,32.252323000303065],[102.27310200010302,32.253599999830854],[102.27439199971565,32.25449300012556],[102.2755440001343,32.25481799985216],[102.27696699981632,32.25496799974261],[102.27843999972704,32.254777999890116],[102.2797059999485,32.254012000218445],[102.28062499984036,32.252908000039824],[102.28132699999726,32.252323000303065],[102.28181599971877,32.251916000287565],[102.28354399989765,32.250862999914744],[102.28418400013022,32.25004699979723],[102.28472599955522,32.249355000279074],[102.28622100010554,32.247082999946834],[102.2875910000841,32.24523600018125],[102.288766000069,32.243618999790215],[102.2896049995949,32.2420569996629],[102.29016600018478,32.23981700027233],[102.29005099965876,32.237584999888874],[102.29002100041983,32.23615299998082],[102.29039499961534,32.23465799968733],[102.291362999911,32.23316099989059],[102.29235100029814,32.2319989998914],[102.29325900031932,32.23067099971789],[102.29390000037682,32.229290999717854],[102.29434999974033,32.228139000084],[102.29499099979783,32.22675500014931],[102.29550600035695,32.22560300028829],[102.29596400011634,32.2250260001222],[102.29642900044676,32.22478699972209],[102.2973680004301,32.22471800008429],[102.29818799968943,32.2250460001971],[102.29949300026898,32.22668000011593],[102.30110599992177,32.22928300021404],[102.30338399992154,32.23153600030531],[102.30414999965251,32.2327799997344],[102.30576300020364,32.23499700007204],[102.30707600028077,32.236461000017556],[102.30859000019939,32.237758000266794],[102.30976099998631,32.23871000022045],[102.31108900013207,32.2394759997948],[102.31285499994578,32.23978799963313],[102.31575399991155,32.23974600005333],[102.31844399963997,32.23959600009318],[102.32107599964203,32.2393260001486],[102.32341399991626,32.23914700017079],[102.32550100012028,32.238892000081364],[102.32757999992842,32.238458000220255],[102.32986100030122,32.23779400036994],[102.33241299993738,32.23724200026062],[102.33442399997344,32.23686600024813],[102.3368719998525,32.23576800036626],[102.33921099995162,32.2348199998676],[102.34182000038749,32.23374699993657],[102.3442919996577,32.23250800005564],[102.34675200013066,32.231043000235516],[102.34878499990803,32.229788000283285],[102.35085700004346,32.22866399970958],[102.35266100039028,32.227951999723714],[102.3542670003704,32.227644999773],[102.35601800011544,32.227270999674445],[102.35727799959086,32.22668300030083],[102.35846400034471,32.22568600027161],[102.35944799963558,32.224472999878785],[102.36033300009055,32.22211600007476],[102.36128299994454,32.220233000197375],[102.36211399997286,32.21850899999326],[102.36288499972667,32.216603999896066],[102.36364399978497,32.21437200016111],[102.36471199963972,32.21126700032529],[102.36566999988966,32.20884599967757],[102.36634799975708,32.20653899962611],[102.36650099991796,32.20447400021169],[102.3664480002145,32.20235800023728],[102.36620399981703,32.20019000035698],[102.36573500018697,32.197624000162456],[102.36481899976985,32.19575000001066],[102.36335000005712,32.19370999969953],[102.36190100043582,32.192132999647654],[102.36020300039422,32.19046600010302],[102.35875700024766,32.18916799978149],[102.35813899975638,32.18855300029495],[102.35716999963581,32.187309000178885],[102.3555789997243,32.1856740001579],[102.3535919999777,32.184214000346586],[102.35193999996685,32.182982999684214],[102.35069999968461,32.18179800032428],[102.34986899965632,32.180898000293034],[102.34951800002703,32.180328000309885],[102.34950999963112,32.17981199980098],[102.34969299992923,32.17924199986226],[102.35022699985659,32.17882999964581],[102.3512989999093,32.17864199995372],[102.3535769999091,32.17803399968339],[102.35624300024635,32.176852999940216],[102.35856599955363,32.17533000021126],[102.36002000009611,32.173874999700985],[102.3611039998444,32.172739999722616],[102.36230499976855,32.17186000025512],[102.36321299978974,32.170868000366525],[102.36392199961934,32.16942599991332],[102.36393800041117,32.168828999780594],[102.36395299958147,32.16810900028119],[102.36368999981573,32.16669999972476],[102.36364799998294,32.16645599987786],[102.36322799985837,32.16571799962962],[102.3628010000611,32.164810999750266],[102.36256400023463,32.16327300021465],[102.36321299978974,32.16211600021737],[102.36553599999536,32.160878000307626],[102.3675539997041,32.1604450000626],[102.36969399961161,32.159952000260894],[102.37131100036069,32.15987099969594],[102.37287200013495,32.1604169999988],[102.37319199980209,32.160662000075504],[102.37477900041392,32.161848999945015],[102.37503899980662,32.16202199990026],[102.37710199972122,32.16341599985209],[102.37907500012246,32.16475799996184],[102.3808519998068,32.16576299985301],[102.38254999984841,32.16653400002464],[102.38341600003682,32.166704000327655],[102.38417500009511,32.16685099973895],[102.38525100034579,32.1668309997968],[102.38549499984495,32.166704000327655],[102.38604399984095,32.16640200032209],[102.3867639366591,32.16541645489913],[102.38676500026439,32.165417000132486],[102.39312399988752,32.168675000186546],[102.39552599973582,32.175403000277186],[102.40061300018799,32.1799679999626],[102.4004730004459,32.184412999647414],[102.40294600043933,32.188918000250396],[102.40810400013831,32.19125999994271],[102.40796400039619,32.19570599980383],[102.41291299985781,32.20471600018898],[102.41277300011569,32.209162000035256],[102.41524799975896,32.21366699987058],[102.4149690000997,32.22255899991469],[102.42005999985149,32.22712299975095],[102.42006064394359,32.22712448083805],[102.42005999985149,32.227124999864486],[102.41200499983658,32.23361399970268],[102.41137499964974,32.25361999969366],[102.4165380002699,32.255961999814495],[102.41901399973806,32.260466999868946],[102.42934000008002,32.26515000000521],[102.43181800009631,32.269654999791],[102.43167900017913,32.27410099982918],[102.42892300032852,32.27848799963024],[102.41817699986196,32.28714299971402],[102.40728900000352,32.30024400021643],[102.3966780001545,32.30445100004478],[102.39604499959458,32.324459000040065],[102.39328600026923,32.32884600028191],[102.37998099959552,32.3352150000978],[102.37700800000991,32.346271000127025],[102.37162799965476,32.35059600000597],[102.36603399993771,32.36159099977306],[102.36574900043068,32.37048400007687],[102.36291599968881,32.377092999636],[102.35760400000409,32.37919500012696],[102.35703200044188,32.39698100007068],[102.34640700034916,32.401184000058215],[102.3462630004091,32.405631000238444],[102.33832899986969,32.40767100036518],[102.33818499992967,32.412116999943095],[102.3329429996668,32.41199499998065],[102.3222420003044,32.41841999975036],[102.31670899978842,32.42718999990334],[102.3162729997703,32.44052900012375],[102.31867700016679,32.44726100036022],[102.31766000036565,32.478388000286635],[102.30942700007549,32.489320000016875],[102.30410699999481,32.49142000031985],[102.29856699980611,32.50018999990818],[102.29834800042133,32.50685999977673],[102.29295299999758,32.51118299962165],[102.28850293382796,32.52992706437461],[102.28850199958005,32.52992699999737],[102.28825399988293,32.529891999982226],[102.2880060001858,32.52981999967023],[102.2870339996922,32.52948700022199],[102.28656099986418,32.529288999657915],[102.28635099980191,32.52921999962268],[102.28611099960241,32.529106000205836],[102.28589700024045,32.52904500030561],[102.28491700024924,32.52868299980977],[102.28398999996146,32.528406000003876],[102.28377200040158,32.528358000270615],[102.28355800014134,32.52835999978663],[102.28334899990396,32.52839600015625],[102.28293299997733,32.52850299990733],[102.28274200018166,32.52853300016855],[102.28256700027946,32.52853099989898],[102.28153700005953,32.52829399982899],[102.28134999956347,32.528220000231904],[102.28104499996492,32.528008999971405],[102.28086900023783,32.527922999956395],[102.27997999958492,32.52755400035787],[102.27985099971346,32.52746499984608],[102.2796559997198,32.52724799994768],[102.27959100032078,32.527188999842835],[102.2792249997246,32.527005999900105],[102.27846999986424,32.52671600010484],[102.27818700000704,32.52654900019502],[102.27791699967031,32.52636000026736],[102.27734799958282,32.5261289999841],[102.27713500004579,32.52599399966163],[102.27672599979188,32.52569100011807],[102.27629899999462,32.52558499983647],[102.27596300043395,32.52547799963982],[102.27563500037091,32.52532300023321],[102.27547100033938,32.525229000062104],[102.27519299960669,32.52499499975696],[102.27504000034415,32.52490599973989],[102.27486100024402,32.524845000017635],[102.27468499961859,32.52476100035723],[102.27425399962335,32.524448000155644],[102.27378499999331,32.524226999813955],[102.2732970000967,32.52390299986926],[102.27280400017719,32.52361799971652],[102.2723539999154,32.52331300010646],[102.2719880002175,32.52311900034973],[102.27185500014811,32.52306799985611],[102.27157599959052,32.523006999643506],[102.2714690003587,32.52294399975304],[102.2713279998934,32.52271000031409],[102.27121800028854,32.522610999814496],[102.27094299992893,32.52246800016266],[102.27064900020109,32.52241700005702],[102.27050000023816,32.52243499991939],[102.27035499957489,32.52249899999],[102.2702299999014,32.52259299998737],[102.27005400017431,32.52277800022681],[102.26994700004421,32.52285199976146],[102.26982900004342,32.52290099998276],[102.26966099981395,32.52293400005489],[102.26919600038184,32.52283700019848],[102.26889400025806,32.522704999694696],[102.26861200022574,32.52254500017828],[102.26845599969182,32.52248900024232],[102.26827300029204,32.52248100014043],[102.2674489999364,32.52259299998737],[102.26724999974479,32.52260599994699],[102.267059999774,32.522557000322294],[102.2668990001155,32.522452999778174],[102.26677299971882,32.52233099999149],[102.26668999987815,32.52221399992875],[102.26665499971803,32.522082000024646],[102.26663200015182,32.521803999730174],[102.266658999916,32.520763999851276],[102.26664800004535,32.52060899988756],[102.26658699994599,32.52026800008667],[102.26657199987736,32.51991199969805],[102.266518000349,32.519551000134165],[102.26614799955483,32.518950999682154],[102.26591199955328,32.51868099998979],[102.26586600042084,32.51854599983945],[102.26584299995632,32.51773799973345],[102.26582399968974,32.51759800029296],[102.26575099989482,32.517459999635484],[102.26564499958957,32.517320999642784],[102.26544600029627,32.51688300001998],[102.26540799976311,32.51677400029233],[102.26534300036411,32.51648400004663],[102.26512200043118,32.51586099966925],[102.26492700043751,32.515217000017074],[102.26486600033813,32.515107999784064],[102.26404600018047,32.514618999996046],[102.2639430002483,32.51453200013143],[102.26361900038322,32.51434900016754],[102.2634550003517,32.51427800019298],[102.26310800002204,32.51420399965837],[102.26219199960494,32.51414799982748],[102.2616540003779,32.51406400001571],[102.26147500027777,32.51408700037779],[102.26130700004829,32.51413799990813],[102.26115100041268,32.51414799982748],[102.2608380004182,32.51410499963607],[102.26068600008227,32.51406900035845],[102.2603570001943,32.51396499983924],[102.25965900023537,32.51368500034903],[102.25946099986868,32.51364199993613],[102.25930100003508,32.51354799966654],[102.25917899983634,32.513413000138925],[102.2591329998056,32.513248000356796],[102.259189999707,32.5129680001482],[102.25919800010291,32.51284299981409],[102.25917899983634,32.5127160001996],[102.25910199984347,32.51230899965942],[102.25887699971257,32.511506000027616],[102.25880899994048,32.51117699992676],[102.25885099977327,32.510374000031405],[102.25896100027646,32.509804000133194],[102.25896100027646,32.50965200010552],[102.25889599997915,32.509392000200066],[102.2578020001851,32.50939500010709],[102.25615400037219,32.509353999853715],[102.2540710003661,32.508912000147326],[102.25263699991514,32.50716099994335],[102.25245299979213,32.505163999904525],[102.25253700035601,32.50286799963787],[102.25253300015807,32.50231499993944],[102.25254800022667,32.500703000206826],[102.25238800039311,32.500028999637955],[102.25203299966755,32.49858900019219],[102.25145000023468,32.49693900005893],[102.25014200018039,32.495128000013004],[102.25003500005025,32.49503699971543],[102.24869199983588,32.49389000014551],[102.24832199994003,32.49379199987134],[102.24697500042603,32.493450999879116],[102.2452279999806,32.49393699996074],[102.24377099996342,32.49505100000034],[102.24253499987915,32.497013999757364],[102.24110499962613,32.49921199979622],[102.24060500003394,32.500018000347765],[102.23967100007346,32.501523000310826],[102.23925500014685,32.5023040001712],[102.23849500026365,32.50371299974934],[102.23832700003419,32.505376000028186],[102.23856399986065,32.50709000035224],[102.23873899976282,32.50880099989339],[102.23876200022735,32.50977499964439],[102.23857200025655,32.510519999857244],[102.23827400033073,32.512130000226904],[102.23796899983388,32.513739999790154],[102.23774000040333,32.515575999766575],[102.2377100002661,32.517234000121036],[102.23754899970932,32.51924100029983],[102.23678299997833,32.520855999708246],[102.23580600036016,32.52326300029506],[102.23508900013469,32.52452999975002],[102.23424999971046,32.526268999767616],[102.23362399972156,32.52839499964124],[102.2331199999314,32.529832000357395],[102.23281899963253,32.53144200013219],[102.23245200010973,32.53310799999886],[102.23235400020042,32.535675999848344],[102.23198699977931,32.537456000267184],[102.23158300044659,32.54004400012641],[102.23123199991898,32.542627999702226],[102.2303320002937,32.54458299981783],[102.22913800004224,32.54569500010043]]],"type":"Polygon"},"properties":{"code":"513233202","name":"江茸乡","cp":[102.26876480621743,32.352965999818025]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.57348199970343,32.61538900004376],[102.57072300037802,32.619780999788595],[102.56546699987146,32.61966900017894],[102.56027895062795,32.61733342766429],[102.56027800021039,32.617333000161864],[102.56047700040199,32.610661999676225],[102.55542099991197,32.60387800005239],[102.55049800038965,32.5926469996716],[102.53776500017648,32.579022000176906],[102.5352720000916,32.57451799970661],[102.53540599998588,32.57007100000381],[102.53022099962445,32.56773399968553],[102.52517000005561,32.56094899973837],[102.51210799995447,32.55844099990557],[102.50699200008827,32.55387899974675],[102.50712699980751,32.54943099966222],[102.50201199976627,32.54486999999856],[102.49420399962354,32.542473999955654],[102.47057699970415,32.54195299963648],[102.46539499971574,32.53961299965333],[102.44964399971111,32.5392630002809],[102.44446400027086,32.53692200021069],[102.44536399989613,32.50801599970725],[102.44287800038224,32.50350999980345],[102.43769999969348,32.50116900005221],[102.43521500000446,32.49666300026659],[102.4247199996081,32.496427000376336],[102.41436599967702,32.49174299973333],[102.40387100017895,32.491505000238035],[102.39834199986095,32.50028000022538],[102.3930949995752,32.50016000003495],[102.39033000040202,32.50454700000259],[102.3901880001118,32.50899400028102],[102.37664099958879,32.52203499977099],[102.37649900019687,32.526481999885426],[102.37117900011619,32.52858500034519],[102.36841099967168,32.532971999854226],[102.3679119999044,32.548537000236436],[102.36237500008873,32.55731000015761],[102.35705199963503,32.55941200007522],[102.35180100004966,32.55929099993555],[102.33633600027531,32.55002999995071],[102.32569000026616,32.55423200036816],[102.31263499983775,32.55170100002052],[102.28715199969295,32.551296000176166],[102.28715178230065,32.551295997147385],[102.28715199969295,32.551291999893806],[102.2871669997616,32.54791199966795],[102.2874570001898,32.544523999740804],[102.28773900022213,32.542065000197084],[102.28815900034668,32.5396099999977],[102.28932199973771,32.5373850003746],[102.29075700001357,32.53532999975784],[102.29192000030291,32.534357999914526],[102.29192799980054,32.53416500022341],[102.29201900003713,32.53268599998084],[102.29279800018686,32.53057100026532],[102.29286599995895,32.53042799964963],[102.2926030001932,32.530214000061406],[102.29152699994253,32.53011300002203],[102.29040200018635,32.53003599967578],[102.29018499955308,32.53004199962644],[102.28850293382796,32.52992706437461],[102.29295299999758,32.51118299962165],[102.29834800042133,32.50685999977673],[102.29856699980611,32.50018999990818],[102.30410699999481,32.49142000031985],[102.30942700007549,32.489320000016875],[102.31766000036565,32.478388000286635],[102.31867700016679,32.44726100036022],[102.3162729997703,32.44052900012375],[102.31670899978842,32.42718999990334],[102.3222420003044,32.41841999975036],[102.3329429996668,32.41199499998065],[102.33818499992967,32.412116999943095],[102.33832899986969,32.40767100036518],[102.3462630004091,32.405631000238444],[102.34640700034916,32.401184000058215],[102.35703200044188,32.39698100007068],[102.35760400000409,32.37919500012696],[102.36291599968881,32.377092999636],[102.36574900043068,32.37048400007687],[102.36603399993771,32.36159099977306],[102.37162799965476,32.35059600000597],[102.37700800000991,32.346271000127025],[102.37998099959552,32.3352150000978],[102.39328600026923,32.32884600028191],[102.39604499959458,32.324459000040065],[102.3966780001545,32.30445100004478],[102.40728900000352,32.30024400021643],[102.41817699986196,32.28714299971402],[102.42892300032852,32.27848799963024],[102.43167900017913,32.27410099982918],[102.43181800009631,32.269654999791],[102.42934000008002,32.26515000000521],[102.41901399973806,32.260466999868946],[102.4165380002699,32.255961999814495],[102.41137499964974,32.25361999969366],[102.41200499983658,32.23361399970268],[102.42005999985149,32.227124999864486],[102.42006064394359,32.22712448083805],[102.42494200026425,32.238356000256665],[102.43010400016118,32.240696999781996],[102.43258100035256,32.24520199970394],[102.44786100017899,32.25889200011692],[102.44730999963487,32.27667599967831],[102.44179999958341,32.28545099996393],[102.44166099966623,32.289896999645855],[102.43890599964051,32.29428500016047],[102.437935999695,32.325407999824286],[102.44289599992558,32.33441799971085],[102.46095199969413,32.34371999992253],[102.47632399958208,32.355184999646646],[102.48666499999267,32.359863000236096],[102.48652900044856,32.36430899968859],[102.48088100030482,32.37753300002301],[102.47965299971818,32.41755300011894],[102.4820699996351,32.42428100002831],[102.48710900040669,32.431067000238166],[102.4947700002363,32.43791000036892],[102.49698600031178,32.45130800028919],[102.50216300027729,32.453645999886795],[102.50747499996206,32.45153699973817],[102.51023199963763,32.44714800005664],[102.51628400001239,32.42058100014747],[102.526769000363,32.42080799991942],[102.53194499960533,32.42314500031296],[102.53443299966735,32.42764900032831],[102.54471999965128,32.43454499978366],[102.55763000031477,32.44149699985824],[102.56811899996505,32.441720000201165],[102.57329699975548,32.444055000089435],[102.58634200013817,32.44655700029298],[102.64140999996745,32.44770700002092],[102.64659100013095,32.45003899983171],[102.64908599986569,32.454540000142686],[102.6542670000292,32.45687099992998],[102.66475800022761,32.45708600027499],[102.66725399978725,32.46158700022178],[102.70921799968262,32.462435999639084],[102.72054300028239,32.458068000269385],[102.72054385637686,32.45806766978815],[102.72111900004255,32.45918999978176],[102.72208800016311,32.46008999966591],[102.72427800029934,32.46157999975049],[102.72681499986686,32.462904999783426],[102.7288030003367,32.46384100013197],[102.7303099996843,32.464672999938855],[102.73229300013126,32.46537299986771],[102.73440299990155,32.465849000016],[102.7362640001498,32.46557100020952],[102.73874700018894,32.464615999879435],[102.74094800019583,32.463710999633626],[102.74328999976969,32.46280800036274],[102.7454449997458,32.46259500025258],[102.74747500004842,32.46272400035811],[102.74827599993948,32.46292999979689],[102.74887900036215,32.463081999941686],[102.75001199961596,32.46309700037587],[102.75063799960486,32.46310799963158],[102.75204199991859,32.46279200015139],[102.75372800026464,32.462528000042596],[102.75372896595357,32.462527981093885],[102.75372800026464,32.462531999728455],[102.75087899962926,32.47438800008821],[102.72940199966311,32.49176300000609],[102.71853600044429,32.50489599974767],[102.71316299976185,32.509238000291866],[102.70785299972694,32.51135699968902],[102.69972999993996,32.52009299999741],[102.69448100000437,32.519987999780255],[102.68916900031965,32.52210499984978],[102.68379399998739,32.526446000263675],[102.67854400022694,32.52634000011547],[102.6679190001342,32.53057400022284],[102.66516699958319,32.534968000355185],[102.65991699982274,32.53486000028845],[102.64928900025528,32.539092000152],[102.64403899959649,32.53898399974345],[102.64128600011891,32.54337700003875],[102.63065600000331,32.54760800031061],[102.6279019998025,32.552000999652456],[102.62258599991979,32.55411599968648],[102.6223280001769,32.563011000099046],[102.61681800012548,32.57179600029717],[102.61668900025403,32.57624399998936],[102.61630099991652,32.589586999975204],[102.6187980001994,32.59408899993758],[102.61866900032796,32.59853700006751],[102.62324192189249,32.606778021045635],[102.60514400044455,32.61160499981802],[102.59726099995878,32.61143999966737],[102.59207200029766,32.6091059998483],[102.58412400041288,32.611163999905294],[102.57873700038506,32.61550000016734],[102.57348199970343,32.61538900004376]]],"type":"Polygon"},"properties":{"code":"513233201","name":"龙日乡","cp":[102.40041964577492,32.42345274031332]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.46684699971004,32.91798499996286],[102.43972829499369,32.934196822634064],[102.43972800034626,32.93419600007244],[102.43848899988897,32.93290699965392],[102.43677599977875,32.93185399962634],[102.43490700003292,32.931065999657854],[102.43256100026107,32.929334000176105],[102.43062700021792,32.92776700017671],[102.42915000010922,32.92562800029134],[102.42808999975205,32.9238699998633],[102.42746399976316,32.92342300004599],[102.4261709997775,32.92310199999368],[102.4249580001578,32.923296000124566],[102.42362300033932,32.92435099992438],[102.42202412579604,32.92540191690798],[102.42202400003191,32.92540199985095],[102.4204749999532,32.92589000022613],[102.41890800033116,32.92540199985095],[102.41697699976271,32.92411499994205],[102.41517699961386,32.922492999738544],[102.41344099993738,32.920801999923604],[102.41210600011894,32.91893699973099],[102.4119420000874,32.91859700007367],[102.4112519996261,32.91717799991624],[102.41110299966317,32.91668200025274],[102.4108089999353,32.91569499987539],[102.41085499996608,32.914545000047994],[102.41150299969627,32.91339500036225],[102.41275499967405,32.911823000186715],[102.41352100030333,32.9099210003071],[102.41328100010382,32.90826799988553],[102.41242699961099,32.907316000006],[102.41071000020112,32.90642900021754],[102.4088790000901,32.90554199983951],[102.40682700004615,32.904774000070844],[102.4039509996466,32.90368099975821],[102.40183000000566,32.902856999696844],[102.40066199969348,32.902301999854075],[102.39961700030325,32.901246000357204],[102.39896799984982,32.89982199974768],[102.39816699995875,32.89720200016635],[102.39777100012363,32.89458099983452],[102.3978620003602,32.89274999971515],[102.39816699995875,32.891531000353794],[102.39915899964554,32.89042800021385],[102.40054799989066,32.88874899972616],[102.40125000004753,32.88679499988101],[102.40154700014845,32.88483700026273],[102.40271499956233,32.88264199966707],[102.40409600030985,32.881014000321954],[102.405225000264,32.879735000008125],[102.40579699982621,32.87823500030655],[102.40594900016218,32.87646399981691],[102.40570499976471,32.87469399981668],[102.40504899963858,32.87287099964126],[102.40391200018684,32.87043300009171],[102.40305000019642,32.868382999748675],[102.4023100004047,32.865875999955875],[102.40185199974698,32.86337600022511],[102.40212700010659,32.86079500016055],[102.40226400037393,32.85821500029422],[102.40203500004509,32.85695600026866],[102.4011200003512,32.85554500018212],[102.39958600034112,32.85402899974049],[102.39732800043285,32.85212100031237],[102.39523399965778,32.850274000324156],[102.39334999984334,32.848010999676625],[102.39276999988518,32.846245999965745],[102.39254099955633,32.84447599987689],[102.3919680001692,32.84322199968011],[102.39065599991696,32.84215900025842],[102.38940899996203,32.84137600017406],[102.38825700044168,32.84139600008575],[102.38668499989845,32.84073000037577],[102.38469399995387,32.839750000351835],[102.38263799971195,32.83852600026861],[102.38029199994014,32.8371299996884],[102.377957000039,32.83562200018811],[102.37748400021097,32.835338999858],[102.37554299959677,32.83417500019824],[102.37503499960867,32.83386200002139],[102.37422299984692,32.83335599997017],[102.37382199998892,32.8331199998821],[102.37316900023588,32.8328580003353],[102.37254700044495,32.832596000015435],[102.37071200013598,32.832679999770015],[102.3683629999911,32.83337799967136],[102.3676879995984,32.83357900011988],[102.36591400028713,32.83343100016428],[102.36576899962385,32.833372999808375],[102.36454000011061,32.83289100007012],[102.36309399996408,32.83193800032076],[102.36171300011486,32.8309279998634],[102.35982599992735,32.82988600007373],[102.35700300012954,32.82826899978397],[102.35425300012666,32.826946000225114],[102.35253199962052,32.825940999889156],[102.35108299999926,32.824699999685954],[102.35051399991178,32.823624999901334],[102.35014099964286,32.82208300032935],[102.34906799976524,32.82037599980736],[102.3479310003135,32.81927600027802],[102.34661499986328,32.81837599979752],[102.34510099994468,32.817429999671134],[102.34311300037317,32.81660099968347],[102.34070599960367,32.815201999980225],[102.33869600029081,32.814196000065216],[102.33706699984616,32.814048000273836],[102.33478999967132,32.813709999815856],[102.33355000028742,32.81304099977583],[102.33133400021192,32.811237999673544],[102.32985700010327,32.8090840002262],[102.32865600017912,32.807103000152765],[102.32786199996072,32.80471500023639],[102.32760699969262,32.80265500013889],[102.32667600010517,32.80066600008849],[102.32557300009032,32.79982400030247],[102.32331900038001,32.799227000303986],[102.32027499975095,32.798608000071944],[102.31815099973697,32.797550000149414],[102.31682699978919,32.79619899994532],[102.31652200019066,32.794720999718756],[102.31568199994153,32.793301999790366],[102.31532000044157,32.792501000273916],[102.31426699975714,32.79085800022711],[102.3132640001997,32.78909500023651],[102.31254600014928,32.787211000077654],[102.31120700013287,32.785287999797106],[102.3097080002829,32.78401200022619],[102.30807600036351,32.78346799989417],[102.30636999992596,32.78297699963568],[102.30454300001288,32.78317500025979],[102.30237999964086,32.78394799978223],[102.30023999973339,32.78524000034578],[102.29797799962714,32.7864939996955],[102.29522000012668,32.78767900005675],[102.29278999979095,32.788171999793576],[102.29061200024861,32.78797399971902],[102.28876900044207,32.787426999793034],[102.28793000001784,32.78641199987229],[102.28749499982466,32.78509499965896],[102.28665200010077,32.783737000317224],[102.28569800004881,32.78296800021474],[102.28488899976185,32.78326800005756],[102.28442799962937,32.784058999661454],[102.2839780002659,32.78504099987402],[102.28373399986843,32.786195000058356],[102.28268799975496,32.787925000326744],[102.2807539997118,32.78950200023615],[102.27840499956694,32.790745999921874],[102.27530399993478,32.79165099997897],[102.27199599971509,32.792037000082225],[102.26902800015236,32.792423999849746],[102.26596500015506,32.79206999987633],[102.26268399969953,32.7908059998602],[102.2602810000263,32.789293000081145],[102.25841200028046,32.78783599963532],[102.25670300036818,32.78728900037104],[102.25529099965853,32.787482000280136],[102.25273499982443,32.78837999968703],[102.25132399983796,32.78891900008848],[102.25003500005025,32.7891889997524],[102.2489589997996,32.78941500009398],[102.24831400044245,32.78928200005943],[102.24703999982503,32.789033000164025],[102.24487300015336,32.789124000145996],[102.24278299957628,32.789618000041564],[102.24083000016485,32.790101000293625],[102.23920800029119,32.79000899994434],[102.2378430003355,32.78958199975359],[102.23633199989163,32.78886000025702],[102.23515799973164,32.787953999862445],[102.23364299998812,32.78677400036405],[102.23200299967283,32.786228999653545],[102.23052700028737,32.786425000042705],[102.22912299997364,32.787419999838455],[102.22833700015119,32.78852299980367],[102.2270669997317,32.78940300022392],[102.22551000015544,32.789767000344334],[102.22437000033064,32.789674999649606],[102.22354599997502,32.789115999703185],[102.22227200025594,32.787636999684736],[102.22122299976942,32.78599399965405],[102.21962000016235,32.78395899970842],[102.21841900023821,32.78129000013323],[102.21767900044648,32.77849800009505],[102.21669400043238,32.77674099988704],[102.21572899961146,32.775781999834535],[102.21457000041845,32.775575999979885],[102.21329199960306,32.77588399994534],[102.21215500015131,32.77629800003906],[102.21003699998512,32.77694000004198],[102.20808899969828,32.7778849998006],[102.2063530000218,32.778828000132506],[102.20496799997464,32.780456000128275],[102.2035910003234,32.78236799976001],[102.20227400004826,32.7837100000167],[102.20108399999478,32.784988999882344],[102.19935599981591,32.78622500005722],[102.198185000029,32.786447000036354],[102.1970250001127,32.78600500008246],[102.19647199991877,32.785327999949416],[102.19549652204667,32.783917755076075],[102.1954960001255,32.783916999845665],[102.19506500013027,32.782780999957026],[102.19496600039608,32.78129599986043],[102.19451600013427,32.779241000146406],[102.19373799980943,32.77776599981821],[102.19304700042153,32.776807000238236],[102.19195600010222,32.77654200004229],[102.18972800033119,32.77652199988146],[102.18742799969178,32.77644800000263],[102.18509299979064,32.77595200020603],[102.18352600016857,32.77511800001696],[102.18268599991943,32.77399400000888],[102.18211799965687,32.772517000218485],[102.18242700035168,32.771076999638716],[102.18328900034211,32.76980399970542],[102.1829920002412,32.768724000259596],[102.18229000008431,32.76764499990366],[102.18139399975868,32.766576999874175],[102.1807679997698,32.76589600022055],[102.17924600035357,32.76403699977091],[102.1779220004058,32.76216999994016],[102.17631600042567,32.759730999799444],[102.17491600030988,32.7575819996621],[102.17421800035099,32.756331000036035],[102.17411899971846,32.754907000021326],[102.17442800041326,32.75335599990197],[102.17459499991952,32.75213199990877],[102.17471000044554,32.75130499995512],[102.17471700011828,32.750023999693894],[102.17472499961585,32.74884100024878],[102.17483199974599,32.74735099962689],[102.17427500025238,32.74655699991256],[102.17338599959943,32.74617599996551],[102.17214600021553,32.745948000181656],[102.17092900039783,32.74596599970865],[102.16823200009846,32.74624099996269],[102.16554700039289,32.74686099993511],[102.16351700009025,32.74661000003592],[102.161399999749,32.74573099993163],[102.15923700027527,32.74420400005751],[102.15819600018469,32.74267600006903],[102.15782999958846,32.74136899974591],[102.15813500008531,32.73987100000883],[102.1589929998778,32.738361000073326],[102.16044599969703,32.73673899998204],[102.16170600007075,32.73507399988482],[102.16357499981659,32.73333099976465],[102.1655619995632,32.731698999741795],[102.16716000004574,32.73057699982118],[102.16882700012519,32.72935100017525],[102.170151000073,32.728067000017404],[102.17126900015647,32.72673600006044],[102.17218399985038,32.725115999684355],[102.17255399974624,32.72362300034286],[102.17312700003168,32.72206400012187],[102.17341699956157,32.72133799996694],[102.1734469996988,32.72001499992831],[102.1740309998549,32.71891700019493],[102.17496200034064,32.71821500015735],[102.17609499959441,32.717561000324814],[102.17682699988852,32.71686900017319],[102.17734999994524,32.716109000146325],[102.17786100030642,32.71439299976132],[102.17883399972662,32.71265600026459],[102.18008099968155,32.71097200035238],[102.18140499962934,32.70958099974845],[102.18305699964023,32.70805799973173],[102.18404900022531,32.706897999631096],[102.1850900003159,32.70510299999321],[102.18608500037573,32.7035059998811],[102.18721400032987,32.702344000149616],[102.18934300036672,32.70104900012156],[102.19153599997766,32.69940599990823],[102.19279100032848,32.698069000057075],[102.19369900034968,32.696222000065],[102.1941450004135,32.69495999990597],[102.19477800007509,32.69288700006184],[102.19506099993232,32.69031100017749],[102.19485500006799,32.68734100025062],[102.1938559998102,32.68506999991927],[102.19358499964855,32.68400199999716],[102.1936650000145,32.68384400007945],[102.19375299987803,32.68368400005022],[102.19390900041195,32.683350000256105],[102.19407000007045,32.68299900013375],[102.19416899980463,32.68268300025017],[102.19429100000337,32.682493000265175],[102.1944049998062,32.68231699967175],[102.19452000033225,32.682141999798894],[102.19464900020367,32.68196600002596],[102.19477899990002,32.68179100022143],[102.19530899962945,32.681062999864444],[102.19587400041726,32.680421999694424],[102.19601900018222,32.6802599996746],[102.19616399994717,32.680101999941584],[102.19631600028315,32.6799549998433],[102.19650000040616,32.67983200003811],[102.19671299994317,32.679750999907895],[102.19693399987611,32.67970500022129],[102.19738800033589,32.679732999868996],[102.19780799956213,32.67981000017805],[102.19800599992887,32.67987100032665],[102.19869600039017,32.6797790002973],[102.19880699981992,32.679640999697504],[102.19889499968349,32.679474000335716],[102.19887200011726,32.679270000057834],[102.19881799969058,32.67910699987152],[102.19869600039017,32.678955000181254],[102.19854700042724,32.67879200017628],[102.19845600019063,32.67858900020406],[102.19843299972612,32.678366999859065],[102.1985020002214,32.67814600007452],[102.19862400042015,32.67793500030371],[102.19889499968349,32.67749500028914],[102.19904700001942,32.67727100027399],[102.19923799981515,32.677057000356015],[102.1994520000754,32.6768660001305],[102.19967999968104,32.67668999979072],[102.1999020003372,32.67652500019696],[102.20012300027012,32.6763600002984],[102.20085899986387,32.675823000127075],[102.20106499972819,32.67565799968803],[102.20121000039146,32.67551000020812],[102.20136299965404,32.67530900035829],[102.20176699988507,32.674884999741124],[102.2020649998109,32.674669000122435],[102.20223600041344,32.67445000030151],[102.20236600010976,32.67421300030471],[102.20244999977535,32.67395599993904],[102.20262499967754,32.67330299980028],[102.20264099957109,32.67304300011411],[102.2026640000356,32.67279700020305],[102.20270199967044,32.67256300010159],[102.20277799983842,32.67234200032529],[102.20287699957264,32.672136000304945],[102.20300700016729,32.671934999669475],[102.20315899960494,32.6717159999521],[102.20406400015139,32.67052399969852],[102.20420100041876,32.67034400021433],[102.2043379997878,32.670172999839195],[102.20447599988005,32.67000600016959],[102.2046199998201,32.669866000210604],[102.20478100037688,32.66974599996311],[102.20492600014184,32.66965499978774],[102.2050709999068,32.66957599965176],[102.20519999977823,32.669510000039814],[102.20532199997696,32.66945599977103],[102.20561999990281,32.66935400035066],[102.20573399970561,32.66931900031509],[102.20612000039331,32.66931599970648],[102.2063100003641,32.66943599977524],[102.2064319996645,32.66961900017474],[102.20649399958882,32.669847999692216],[102.20652399972604,32.67009499985123],[102.20656999975678,32.67033599969112],[102.2066690003893,32.67054999982928],[102.20679099968972,32.67072800028872],[102.20694399985058,32.67088500028493],[102.20712700014869,32.67101399990199],[102.20731000044681,32.671117999809304],[102.20771399977953,32.67126599975961],[102.20792399984181,32.671340000020905],[102.20816099966827,32.67141600032763],[102.20839699966983,32.671484999823825],[102.20864100006732,32.6715460003642],[102.20887000039619,32.671607000106725],[102.20908399975809,32.671697999806426],[102.20935099972179,32.67203900001713],[102.20946500042291,32.672390000107626],[102.20951899995127,32.67259799962253],[102.20955699958611,32.67281000031673],[102.20961000018787,32.673016000295306],[102.20967100028724,32.67319900016784],[102.20973200038661,32.67336599991862],[102.20979299958769,32.67351100021429],[102.20986999958055,32.67363299999909],[102.20996099981716,32.673747999804895],[102.21004899968072,32.67384200004906],[102.21013999991729,32.67393899989167],[102.21025500044334,32.674017999950735],[102.21037699974376,32.674098999986576],[102.21049899994249,32.674169999724214],[102.21062899963886,32.6742390001181],[102.21079699986832,32.67432899976271],[102.21092699956468,32.674389999873604],[102.21118600003076,32.674509999932944],[102.2113159997271,32.6745709999202],[102.21144600032177,32.674631999865845],[102.21274699980505,32.675240000034684],[102.21290699963859,32.67530900035829],[102.21308200043909,32.67535700005878],[102.21327300023482,32.67540800013772],[102.21369300035938,32.67534699996578],[102.21382999972839,32.67522999992859],[102.21394400042954,32.675085000154574],[102.21413500022524,32.67476700021722],[102.21421899989082,32.67460699980642],[102.2143069997544,32.674446000223774],[102.2145050001211,32.67412299978706],[102.21460399985533,32.673962999735124],[102.21471099998543,32.67379799964142],[102.21481800011557,32.67363500005616],[102.2153140004081,32.672872000367576],[102.21583300026687,32.672086000294456],[102.21592399960514,32.671991999715004],[102.21602300023766,32.67190800027198],[102.21613799986538,32.67183199962756],[102.21626799956174,32.671768000268514],[102.2163970003315,32.6717279997951],[102.2165310002258,32.6716999999068],[102.21681300025809,32.6716869996316],[102.21694999962713,32.671706999879724],[102.2170879997194,32.671745999934735],[102.21721699959082,32.67179100026791],[102.21733999961447,32.67185500036668],[102.21744599991966,32.67193100023533],[102.2175460003771,32.6720149996568],[102.2176369997154,32.67209699966396],[102.21772100027928,32.6721750001727],[102.21848399963721,32.6729080001822],[102.21860599983596,32.67302700030652],[102.2188350001648,32.67325100037728],[102.21893800009695,32.67336300020205],[102.21904900042504,32.67347000011285],[102.21915900002992,32.67357899995374],[102.21927399965766,32.67368600036199],[102.21937999996284,32.67379000018368],[102.2195020001616,32.67389500028797],[102.21964000025382,32.67397299998311],[102.21979199969151,32.674056999753134],[102.2199530002483,32.67401900035303],[102.22011300008185,32.67398100018064],[102.2202350002806,32.67388900013411],[102.22033400001479,32.67379000018368],[102.22044100014492,32.67320800008993],[102.22046399971113,32.67306300005867],[102.2204870001757,32.67291799979209],[102.2205170003129,32.67277300004633],[102.22057099984127,32.67262800006521],[102.22064700000924,32.67249100017975],[102.22074599974343,32.67236100000589],[102.22086799994217,32.67224199975071],[102.22100500020954,32.67213000003294],[102.221165999868,32.67203299973862],[102.22134099977019,32.67196199981496],[102.22153999996185,32.671902999654456],[102.22173400013057,32.67184699997876],[102.22192499992629,32.67178099977575],[102.22211599972199,32.67169700013428],[102.22229099962419,32.671590000368624],[102.22245100035607,32.67145800029033],[102.22259600012103,32.67130799979282],[102.2227340002133,32.671140000297726],[102.22298500028346,32.67079700031623],[102.22310699958386,32.6706309999846],[102.22322100028502,32.67047099972843],[102.22325200024717,32.67026299979883],[102.22340399968479,32.670131000028654],[102.22356500024159,32.67001699979517],[102.22375500021239,32.669940000119055],[102.22415600007038,32.669923000063775],[102.2243469998661,32.66997600035892],[102.2246139998298,32.669933000007696],[102.22476600016574,32.66980299989286],[102.22483499976273,32.66963999982474],[102.22484999983133,32.66947200021818],[102.22484999983133,32.66929900028864],[102.22483899996068,32.66889799987217],[102.22482700026511,32.66846300001799],[102.22485800022724,32.668289999647406],[102.22493400039525,32.66812999973645],[102.22507099976428,32.667992000046326],[102.22524700038969,32.6678910001819],[102.22542200029187,32.66779099991911],[102.22561300008756,32.667694999924585],[102.22580399988328,32.66759599991673],[102.22600999974762,32.667485999863395],[102.22620800011433,32.667358999887696],[102.22685699966944,32.6669219998964],[102.22706599990681,32.66674900032343],[102.2271200003335,32.666669999886885],[102.2272269995653,32.66652199988614],[102.22739399996988,32.6663089996643],[102.22760800023012,32.66613299970159],[102.22785199972927,32.66599100025237],[102.22811899969295,32.665891999869125],[102.22839400005257,32.665822999835065],[102.22866100001627,32.665770000101524],[102.22891999958405,32.665714000363224],[102.22916399998154,32.665645000191724],[102.22936999984584,32.665531000284886],[102.22951499961081,32.66537799968383],[102.22962199974091,32.66518700020185],[102.22971399980243,32.66498599981528],[102.22982799960525,32.6647960000011],[102.22998099976611,32.66463100037214],[102.23014899999559,32.664486000034195],[102.23033999979131,32.66436900014283],[102.230542000356,32.66427199974186],[102.23077099978654,32.66422599964747],[102.23105299981884,32.66425400036538],[102.23140400034643,32.664041000031574],[102.2315719996776,32.66392899986541],[102.23173999990712,32.663799000090755],[102.23188499967208,32.663656999957915],[102.23201400044182,32.663506999977365],[102.23212900006955,32.663343999768465],[102.23222799980374,32.663178999727435],[102.2323039999717,32.66300800000977],[102.23241100010185,32.66265700012151],[102.23243399966806,32.662521999622946],[102.23248700026981,32.662361999972376],[102.23261000029345,32.6621940002957],[102.2327540002335,32.66204899978519],[102.23298299966406,32.66183600024637],[102.23312800032734,32.66172900001669],[102.23332699962066,32.66166800033726],[102.23343299992585,32.661568999702816],[102.23357799969081,32.66121500008906],[102.2335559999495,32.66094099989969],[102.2335559999495,32.66068099978798],[102.23360899965294,32.6604370002285],[102.23374599992029,32.660220999715534],[102.23393699971602,32.66004499986394],[102.23416199984692,32.65990299981702],[102.23439899967339,32.65977800002044],[102.23463499967491,32.65965899964633],[102.23489499996592,32.65958299992828],[102.23544399996192,32.65961799999552],[102.2373279997764,32.660135999993756],[102.2375260001431,32.66022499967374],[102.2377019998702,32.66034199969604],[102.23784699963515,32.66049899978914],[102.23793799987175,32.66067699985013],[102.2379920002984,32.66085799969313],[102.23802999993326,32.661026000368466],[102.23809100003263,32.66119600030727],[102.23816700020059,32.66137200016128],[102.23829699989695,32.661528999957675],[102.23845699973052,32.661645999785605],[102.23864800042453,32.66175300011471],[102.23883900022027,32.661857000212805],[102.2390180003204,32.66193400004755],[102.23920900011609,32.66192899962813],[102.2394069995845,32.661895000247554],[102.239574999814,32.6617840002002],[102.23972700014994,32.6616590000091],[102.23988000031082,32.661528999957675],[102.24019300030528,32.661276999866324],[102.24035300013885,32.66116000031163],[102.24051299997244,32.661041000264866],[102.2406579997374,32.66092399964502],[102.24078800033205,32.66078900031015],[102.24089499956385,32.66064200019757],[102.24099400019634,32.660489000302036],[102.24107799986193,32.660330999635846],[102.24116200042585,32.66018400028255],[102.24126899965765,32.66003900029257],[102.24139800042741,32.6599040003774],[102.24153599962135,32.65978699978177],[102.24169600035323,32.659683000300184],[102.24186399968441,32.65959899987428],[102.24203899958658,32.65952799990294],[102.242215000212,32.65946899985183],[102.24239799961177,32.659428999923264],[102.2425890003058,32.659400999962564],[102.24309200027106,32.65939799977723],[102.24331300020398,32.65940599976711],[102.24374800039719,32.65951299975262],[102.24416799962343,32.659621999980715],[102.24461000038761,32.659566000171566],[102.24552199970844,32.659375000369394],[102.24592599993952,32.65927300003068],[102.2464680002628,32.659116000053075],[102.24728400022249,32.65887900022444],[102.24756700007971,32.658794999799284],[102.24785699960964,32.65871699971194],[102.24816200010649,32.658657999881854],[102.24832199994003,32.65866100009209],[102.24879499976805,32.65866999996581],[102.24908500019627,32.65874899991116],[102.24935200015996,32.6588609997618],[102.24958899998643,32.659015999803096],[102.24980200042178,32.65920700037237],[102.24999300021746,32.65941799975065],[102.25003900024824,32.659471000225935],[102.25017599961727,32.65962599996577],[102.25035200024267,32.659829999721126],[102.25052700014486,32.66000999996389],[102.25071799994059,32.66014499971897],[102.25104600000361,32.66037700022238],[102.25122099990581,32.66027500027084],[102.2513890001353,32.66013999995575],[102.25157200043341,32.65997000027736],[102.25177099972673,32.65977599965322],[102.25196099969753,32.65957800013363],[102.252128999927,32.65937200018313],[102.25244199992147,32.658960000370556],[102.25259500008235,32.658745999703875],[102.2527549999159,32.658543000319085],[102.25295300028263,32.6583670001887],[102.25318199971315,32.65823799970977],[102.25344100017927,32.658143999689145],[102.25371599964055,32.658060000085925],[102.25399100000016,32.6579759996474],[102.25424999956795,32.65789400029572],[102.25449399996542,32.657833000268006],[102.25472300029425,32.657869000091],[102.25496699979344,32.65790700030859],[102.25518100005368,32.6580319996964],[102.25557000021608,32.65829900021741],[102.25591300034779,32.6585350002519],[102.25614199977832,32.658707999842946],[102.25628700044157,32.658772000236304],[102.25645499977276,32.65872899978798],[102.25661499960633,32.658665000120095],[102.25674500020098,32.65856800033524],[102.2568439999352,32.65845100025979],[102.2571259999675,32.65809800022232],[102.25724099959521,32.65795600010758],[102.25735500029634,32.657799999913294],[102.25743899996192,32.65762499966222],[102.25748499999268,32.657441999659866],[102.25751599995482,32.65725400011458],[102.25754600009206,32.65706799984548],[102.25766800029079,32.65678800001175],[102.25769099985702,32.6566429998072],[102.25771400032154,32.656483000221336],[102.25773699988775,32.65632000006042],[102.2577600003523,32.65614699962947],[102.25778299991853,32.655971999924034],[102.25779799998712,32.65577099999091],[102.25778999959121,32.65548400014591],[102.25765300022216,32.65527799983678],[102.25756899965828,32.655055999809306],[102.25755399958965,32.654451000309024],[102.25763800015356,32.654221999911385],[102.25769900025294,32.65397300000894],[102.2577600003523,32.653725999915665],[102.2578659997592,32.65349000004336],[102.25828599988378,32.65281299988551],[102.25843900004466,32.65264499965797],[102.25865999997758,32.65252800015043],[102.25897999964474,32.65249799976721],[102.25969000019751,32.6522110000042],[102.25993399969666,32.652073999829426],[102.26013999956099,32.65189099980952],[102.2603229998591,32.65168500029782],[102.26048299969266,32.65146299966853],[102.26106299965082,32.650509999839706],[102.26120099974305,32.65027299988702],[102.26130700004829,32.65002600016142],[102.26139099971388,32.64976999974107],[102.26152100030853,32.64920999962284],[102.26177999987628,32.64808900027492],[102.26184099997565,32.64781100018575],[102.26190200007503,32.64753899964296],[102.26195599960337,32.647266999785636],[102.26200900020517,32.64699000011511],[102.26203199977138,32.64672000000378],[102.26200900020517,32.646452999697175],[102.26195599960337,32.646195999680295],[102.26187199993778,32.64596400019631],[102.26175700031007,32.64574299969778],[102.26165100000486,32.645544000147204],[102.26154399987475,32.64536099962239],[102.26145199981326,32.6452010002703],[102.26137599964525,32.64506100003507],[102.26129199997966,32.64486499964019],[102.26126199984243,32.64477899971729],[102.26124599994893,32.644666999623325],[102.26125400034483,32.6445679998287],[102.26130700004829,32.64446899992448],[102.26164299960894,32.644122999765266],[102.26201699970274,32.643795000254244],[102.26221500006949,32.64362199979462],[102.26243600000241,32.64345099973294],[102.26264199986673,32.643278000120866],[102.26284100005839,32.64310300019029],[102.2630390004251,32.64292499993556],[102.26372599961503,32.64213099972062],[102.26527100039408,32.64035599982543],[102.26543100022766,32.64016599985921],[102.26557599999262,32.6399670000034],[102.26569800019136,32.63975400005117],[102.26579699992554,32.63952999999817],[102.26585100035223,32.63929299969275],[102.26590400005568,32.63904900001176],[102.26595000008642,32.63880000022171],[102.2659960001172,32.638548000366455],[102.26604100032303,32.63829599980134],[102.26608700035379,32.63804500008777],[102.26610999992002,32.637851000305865],[102.26639199995232,32.63716499999581],[102.26649900008242,32.6369380000858],[102.26662899977877,32.636722000296416],[102.26678100011475,32.636509000182535],[102.26694900034423,32.636295000250044],[102.26714000013995,32.636084000016865],[102.26736100007287,32.63575300030843],[102.26747599970061,32.63554000015708],[102.26755199986857,32.63530299987204],[102.26758299983071,32.63504600034733],[102.2675669999372,32.63478699991463],[102.26750599983782,32.634283000337966],[102.26747599970061,32.63408200007061],[102.267392000035,32.633793000024056],[102.26730800036943,32.633509000296534],[102.26722399980554,32.63321899980979],[102.26716299970617,32.63292699968473],[102.26710900017777,32.63263400001087],[102.26717799977476,32.63233699968496],[102.26722399980554,32.6320539999907],[102.26729300030082,32.63160399986333],[102.26724700027005,32.6312860003252],[102.26720100023933,32.630971000039764],[102.26714799963754,32.630668000217426],[102.26709400010918,32.630383999649794],[102.26702600033713,32.630111999827434],[102.26693400027561,32.62985700004696],[102.26682700014548,32.62962099998246],[102.26670499994674,32.62940700021934],[102.26659100014392,32.62920400005242],[102.26650699958003,32.629002999724115],[102.26645300005168,32.62879699969838],[102.26642299991444,32.62859099995494],[102.26641500041683,32.62838499973731],[102.26642299991444,32.62799100002031],[102.26640799984581,32.62780000011119],[102.26636900038609,32.62761700035851],[102.26630099971571,32.627434000231716],[102.2662239997228,32.62726800033455],[102.26604499962266,32.62694000030705],[102.26595699975911,32.626787000247525],[102.2658620002229,32.62663399992645],[102.26578199985696,32.626489000008746],[102.26542700002969,32.62588199982251],[102.26486999963778,32.62488199970803],[102.26477099990359,32.62468400010195],[102.26470999980423,32.62453600020966],[102.26464100020723,32.62436099993432],[102.26458000010787,32.62420100009657],[102.26445100023645,32.623832000009145],[102.26439000013707,32.62364899970907],[102.2643290000377,32.623465999791456],[102.26409200021124,32.622773999858744],[102.26403100011187,32.622604000270286],[102.26399299957872,32.6224279997777],[102.26398500008109,32.62224499963362],[102.2640389996095,32.62150699996932],[102.26409200021124,32.62134700032628],[102.2641609998082,32.621157000094975],[102.26421400040998,32.6209659999777],[102.26444299984053,32.62018500029689],[102.26449600044228,32.61997099991392],[102.26454900014573,32.61975300027764],[102.2646100002451,32.61953099984568],[102.264687000238,32.61930300034224],[102.26477099990359,32.61907399999763],[102.2648780000337,32.61884199979131],[102.26500000023243,32.618606000190844],[102.26513699960147,32.618363999871114],[102.26527399986881,32.618127999767246],[102.26541899963377,32.61789100028081],[102.26555699972606,32.61766000031173],[102.26568599959747,32.61742300034305],[102.26580100012352,32.61718700002862],[102.26589999985771,32.61694499965648],[102.26597600002567,32.616701000326245],[102.26601399966053,32.61646400008892],[102.26602999955408,32.61622000020445],[102.26602200005645,32.615731999954],[102.26605200019368,32.614779999637044],[102.26605999969128,32.61456200022419],[102.26612099979063,32.61433999978378],[102.2662360003167,32.61411699999043],[102.26640299982297,32.6138980001584],[102.26657100005245,32.613681999996366],[102.26710099978186,32.61304100019294],[102.26726200033865,32.612827000137635],[102.2673989997077,32.612613999903544],[102.26750599983782,32.61240000034113],[102.26757500033312,32.61216600032624],[102.26760499957201,32.611913999626296],[102.26761299996794,32.61165500035396],[102.26757500033312,32.61138799983211],[102.26746800020298,32.610878999907996],[102.26735299967696,32.61033999997427],[102.26728499990487,32.61007300007194],[102.26724600044516,32.60981099968023],[102.26723899987414,32.60955400035637],[102.26725399994272,32.60929500031233],[102.26728499990487,32.60902000036601],[102.2673150000421,32.60873799997059],[102.26732300043803,32.608474999834776],[102.26732300043803,32.608203000029874],[102.26729999997352,32.60794100022132],[102.26724700027005,32.60743999972126],[102.26717799977476,32.60697500007553],[102.26712500007132,32.60674599998441],[102.26709800030716,32.60652500024349],[102.26708300023851,32.606303999957284],[102.26709800030716,32.60608000017905],[102.26716299970617,32.605853000129564],[102.2674909997692,32.605372999664105],[102.2676659996714,32.6052179997527],[102.2679259999624,32.60511299997761],[102.26814699989534,32.60499600036434],[102.26835299975966,32.60486900019076],[102.26853600005776,32.60473999975262],[102.26890199975566,32.60444999989621],[102.26906300031244,32.60431999994286],[102.26917700011526,32.60395900005513],[102.2692080000774,32.60371000026162],[102.26932199988022,32.60324399973346],[102.26938299997958,32.603076000267194],[102.26946699964518,32.60290799972908],[102.26957399977528,32.602748000148914],[102.26968799957811,32.60259600005609],[102.26981800017276,32.60244300001577],[102.27020700033519,32.602023000030975],[102.27035200010016,32.60189400003497],[102.2705119999337,32.60178699999708],[102.2706869998359,32.60169999984375],[102.27088600002755,32.601626999928264],[102.27112200002911,32.601573000294636],[102.27167900042102,32.60159400002988],[102.2719539998823,32.60166499981915],[102.27218999988385,32.60177900015174],[102.2724040001441,32.60190100017443],[102.27261000000843,32.601993000118895],[102.27283500013934,32.60204899964393],[102.27305600007226,32.602102000054124],[102.2732700003325,32.60204899964393],[102.27348399969445,32.602010999916],[102.27368999955878,32.60198500029195],[102.27411700025432,32.602010999916],[102.27460500015097,32.60210999987061],[102.27481900041123,32.602193999792156],[102.27505500041275,32.60230899989938],[102.27525399970607,32.60236499998373],[102.27584899973283,32.60252500024794],[102.27604700009952,32.60247900018231],[102.27623000039763,32.602438999744116],[102.27661899966178,32.60243399978268],[102.27679500028717,32.60251000037719],[102.27708499981708,32.60270099975444],[102.27722200008442,32.60279199994849],[102.27736299965144,32.60287899979803],[102.27763800001105,32.60305099987825],[102.27795000018058,32.60321200011172],[102.27840799993997,32.60316099972121],[102.27859100023808,32.60307400014553],[102.27879000042972,32.60301599962471],[102.2792249997246,32.603005999765955],[102.2794309995889,32.60304599995098],[102.27962099955971,32.60310700025547],[102.27980399985782,32.603183999960265],[102.28016299988303,32.60329299995989],[102.28033799978519,32.6032450001708],[102.28050600001468,32.603190999998915],[102.28065499997759,32.60311000005851],[102.28077700017633,32.60300099983616],[102.28085300034432,32.602858000364],[102.28091500026859,32.60270599970098],[102.28097600036797,32.602545000071665],[102.28115899976774,32.60207200016849],[102.28119700030089,32.601904000017846],[102.28121999986712,32.601736000308875],[102.28121200036952,32.601566000129544],[102.28115899976774,32.60139299976717],[102.28049099994605,32.59992500027727],[102.28037700014326,32.5997400001108],[102.28026300034044,32.599558999962746],[102.2801560002103,32.59938900019316],[102.28010199978365,32.599025000171494],[102.28019399984517,32.598869999871326],[102.2803460001811,32.59874800026182],[102.28055200004542,32.59867200025983],[102.28078499967394,32.598627999950445],[102.28100599960688,32.59859499970419],[102.28121999986712,32.59857000033512],[102.28143400012736,32.59854399971251],[102.28163999999168,32.59852200028584],[102.2818380003584,32.598483000085004],[102.28202900015413,32.598417000230285],[102.28220400005631,32.598331000323746],[102.28236399988987,32.59821100021068],[102.28250199998214,32.59806400019366],[102.28260900011225,32.59789600009508],[102.28269299977784,32.5977129997644],[102.28276100044822,32.597514000122075],[102.28282199964926,32.59729600030698],[102.28288299974864,32.59706699969045],[102.28293700017532,32.59683800000228],[102.28294399984799,32.59660100017804],[102.2829289997794,32.59637299981299],[102.28290600021317,32.59614099982853],[102.2828519997865,32.59591599985051],[102.28280699958067,32.59569499988041],[102.2827680001209,32.595468999772],[102.28277599961852,32.59524699968648],[102.28279900008303,32.59503899964598],[102.28287500025104,32.59484099989384],[102.28297399998523,32.59465999968797],[102.28312700014611,32.594512000121895],[102.28328699997971,32.59439299997129],[102.28347799977539,32.59430600020638],[102.2836760001421,32.5942400003023],[102.2840200000987,32.5941619999402],[102.28422199976505,32.59413399998767],[102.28445799976662,32.5941640002608],[102.285251999985,32.594289000155506],[102.28526700005362,32.5940929998252],[102.28485500032497,32.592513999841344],[102.28392800003719,32.589358999929374],[102.28312700014611,32.58632000028105],[102.28298200038115,32.585624999802235],[102.28250600018009,32.58338500026213],[102.28247100001997,32.583230000159624],[102.28248699991352,32.58013799962597],[102.28305099997813,32.57659399973822],[102.28414999979503,32.57385000032533],[102.285512000276,32.570985999999024],[102.28625899974041,32.56827899968342],[102.28668700026088,32.564508000238305],[102.28683899969853,32.560902000139414],[102.2869149998665,32.557298000113995],[102.28699900043043,32.55409200025782],[102.28715178230065,32.551295997147385],[102.28715199969295,32.551296000176166],[102.31263499983775,32.55170100002052],[102.32569000026616,32.55423200036816],[102.33633600027531,32.55002999995071],[102.35180100004966,32.55929099993555],[102.35705199963503,32.55941200007522],[102.36237500008873,32.55731000015761],[102.3679119999044,32.548537000236436],[102.36841099967168,32.532971999854226],[102.37117900011619,32.52858500034519],[102.37649900019687,32.526481999885426],[102.37664099958879,32.52203499977099],[102.3901880001118,32.50899400028102],[102.39033000040202,32.50454700000259],[102.3930949995752,32.50016000003495],[102.39834199986095,32.50028000022538],[102.40387100017895,32.491505000238035],[102.41436599967702,32.49174299973333],[102.4247199996081,32.496427000376336],[102.43521500000446,32.49666300026659],[102.43769999969348,32.50116900005221],[102.44287800038224,32.50350999980345],[102.44536399989613,32.50801599970725],[102.44446400027086,32.53692200021069],[102.44964399971111,32.5392630002809],[102.46539499971574,32.53961299965333],[102.47057699970415,32.54195299963648],[102.49420399962354,32.542473999955654],[102.50201199976627,32.54486999999856],[102.50712699980751,32.54943099966222],[102.50699200008827,32.55387899974675],[102.51210799995447,32.55844099990557],[102.52517000005561,32.56094899973837],[102.53022099962445,32.56773399968553],[102.53540599998588,32.57007100000381],[102.5352720000916,32.57451799970661],[102.53776500017648,32.579022000176906],[102.55049800038965,32.5926469996716],[102.55542099991197,32.60387800005239],[102.56047700040199,32.610661999676225],[102.56027800021039,32.617333000161864],[102.56027895062795,32.61733342766429],[102.56027800021039,32.61733399968518],[102.54956799972884,32.62377999980486],[102.54417900005122,32.62811500021045],[102.54141700035278,32.632506999699224],[102.53609399989905,32.63461699969325],[102.53333200020062,32.639007999987705],[102.52800799992201,32.641119000235484],[102.52787400002771,32.64556700008753],[102.52254999974909,32.64767699989939],[102.51688800025997,32.66090600035049],[102.51634900030972,32.678697999847955],[102.52133899977918,32.68770699989537],[102.53172399967237,32.69238299991795],[102.53685100030751,32.69694399993735],[102.53408700006094,32.70133500015274],[102.52606100035835,32.705612999656935],[102.49449599970158,32.70492700012934],[102.49172899998031,32.70931699984443],[102.49091100037077,32.73600500000966],[102.49833000035107,32.75174599970841],[102.49798999969413,32.762866999710646],[102.50291499976458,32.77410200011542],[102.50271100044839,32.78077400017752],[102.49730900035196,32.78510800002185],[102.49454000008251,32.78949899989414],[102.48920499993324,32.79160800013374],[102.48643599966381,32.79599800025064],[102.4861620000274,32.804895000344786],[102.48865900031028,32.80940100020301],[102.49324500044703,32.8317579998922],[102.48479399969868,32.849378999771204],[102.47938699957939,32.85371199981261],[102.47113699957079,32.86465900021846],[102.4708620001095,32.873556000063495],[102.46808799981719,32.87794699971629],[102.46684699971004,32.91798499996286]]],"type":"Polygon"},"properties":{"code":"513233200","name":"安曲乡","cp":[102.33517275101616,32.71285091143605]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.91208688040663,33.29473401130976],[102.93973596034823,33.29410500063117],[102.94613784015311,33.29589204067135],[102.97857599967278,33.29645598117515],[102.98839608142315,33.30056799082406],[102.99783600063687,33.29670699114722],[103.00667184055123,33.301416960954604],[103.01442588069148,33.302910961157224],[103.02151392065984,33.30084303069479],[103.02466787957121,33.298184971138085],[103.04500283963858,33.29981397095593],[103.06439892009686,33.296916962218894],[103.07459592056739,33.28236099120048],[103.08437496008906,33.28064604124367],[103.09037615983621,33.27231096083713],[103.09331411973588,33.27235704116285],[103.09237416035181,33.270543001084626],[103.09354092009059,33.26758002213691],[103.08943800067595,33.26479101072386],[103.09239396011895,33.26118804111807],[103.08688487994236,33.261100021030316],[103.08839004043855,33.25947903090403],[103.09410612030443,33.25849002212428],[103.09785804008973,33.254847001203125],[103.10152059893372,33.25579693378715],[103.0992600003295,33.2518040003548],[103.09430400029689,33.24747300025029],[103.0945029995902,33.23897799981439],[103.09975599972371,33.23056600033684],[103.09995400009045,33.22207099988567],[103.09752700012776,33.21778200031209],[103.09762599986198,33.21353499972114],[103.09034499997396,33.200666999812604],[103.0853930001393,33.19633600036264],[103.08549299969843,33.19208799976918],[103.08306699956069,33.18779899989373],[103.08386599980193,33.1538199996784],[103.08144200021229,33.149530999624716],[103.08159200000013,33.14316000022164],[103.0791680004105,33.13887100028469],[103.07416899982188,33.13666300005934],[103.05937900044023,33.12154299971651],[103.02152499958221,33.1208989999286],[103.0065910002605,33.112142999992955],[103.0066950000176,33.107895999916586],[103.0017520004038,33.10356199991007],[103.00201299962139,33.09294400025379],[102.99454900033358,33.08856600005777],[102.98466900005542,33.079895000115926],[102.9822510003136,33.075603999852284],[102.97726000012088,33.07339199968166],[102.95257200001943,33.05171199968297],[102.95267900014954,33.04746500002439],[102.94066200033699,33.02388200033576],[102.94109099978404,33.006895999764474],[102.93867800006507,33.00260399968482],[102.93369199989525,33.000390000109995],[102.92613200034796,33.00025400004388],[102.92372100027882,32.995962000033764],[102.91364199980904,32.99577899967564],[102.90641000032484,32.982901999941625],[102.90706300007793,32.957422999796485],[102.8822090002951,32.94422199967649],[102.87252446264299,32.92917471967159],[102.87252400001061,32.929175000157706],[102.86228700025542,32.93535599964521],[102.8621750001024,32.939602999870814],[102.85708400035061,32.94163199975679],[102.85445399999834,32.94583199967179],[102.85434299967025,32.95007799999631],[102.84656399983989,32.95842900007515],[102.84124700013224,32.96895099963013],[102.84113400015437,32.97319700006989],[102.84354100002554,32.97749100007461],[102.84275500020308,33.007216999843614],[102.8451629998992,33.01151000031955],[102.84364800015568,33.06883999999917],[102.8460020003234,33.07525800023619],[102.85581099955813,33.08606299998923],[102.85564300022695,33.092433999881116],[102.86057699961991,33.096775000366634],[102.86298900041228,33.101068000320424],[102.86797899988177,33.10328500011545],[102.86764599979583,33.116025999663535],[102.8599640000498,33.120132999826325],[102.85732899967469,33.124333000252676],[102.8521700001508,33.12848499996107],[102.85161000028415,33.14972099999572],[102.8540220001782,33.154015000316036],[102.85626699966768,33.16467900018266],[102.86126100023343,33.16689700025913],[102.86103799975237,33.17539100002308],[102.85593199993194,33.17742100036876],[102.85329499990698,33.18162100005889],[102.8531269996775,33.18799199964272],[102.88052200012413,33.20337099970739],[102.8854630000881,33.2077120001137],[102.88787900018013,33.212005000113436],[102.8869979999231,33.24598399976756],[102.89194200026014,33.250323999964934],[102.89183199975696,33.254570999815854],[102.89677799974383,33.258911000222284],[102.90128600006277,33.28023999993852],[102.9062880001261,33.282456000159556],[102.90788596578716,33.29672994968289],[102.91208688040663,33.29473401130976]]],"type":"Polygon"},"properties":{"code":"513233207","name":"麦洼乡","cp":[102.940261,33.118079]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[103.12112800010789,33.272119000275914],[103.11971700012147,33.272461999727845],[103.11810699994338,33.27172999995895],[103.11649699976532,33.271337999656964],[103.11387300015916,33.272187000329104],[103.11387085498225,33.27218840405619],[103.10411699972958,33.260383000292826],[103.0992600003295,33.2518040003548],[103.09430400029689,33.24747300025029],[103.0945029995902,33.23897799981439],[103.09975599972371,33.23056600033684],[103.09995400009045,33.22207099988567],[103.09752700012776,33.21778200031209],[103.09762599986198,33.21353499972114],[103.09034499997396,33.200666999812604],[103.0853930001393,33.19633600036264],[103.08549299969843,33.19208799976918],[103.08306699956069,33.18779899989373],[103.08386599980193,33.1538199996784],[103.08144200021229,33.149530999624716],[103.08159200000013,33.14316000022164],[103.0791680004105,33.13887100028469],[103.07416899982188,33.13666300005934],[103.05937900044023,33.12154299971651],[103.02152499958221,33.1208989999286],[103.0065910002605,33.112142999992955],[103.0066950000176,33.107895999916586],[103.0017520004038,33.10356199991007],[103.00201299962139,33.09294400025379],[102.99454900033358,33.08856600005777],[102.98466900005542,33.079895000115926],[102.9822510003136,33.075603999852284],[102.97726000012088,33.07339199968166],[102.95257200001943,33.05171199968297],[102.95267900014954,33.04746500002439],[102.94066200033699,33.02388200033576],[102.94109099978404,33.006895999764474],[102.93867800006507,33.00260399968482],[102.93369199989525,33.000390000109995],[102.92613200034796,33.00025400004388],[102.92372100027882,32.995962000033764],[102.91364199980904,32.99577899967564],[102.90641000032484,32.982901999941625],[102.90706300007793,32.957422999796485],[102.8822090002951,32.94422199967649],[102.87252446264299,32.92917471967159],[102.87252400001061,32.929174000360575],[102.87268999969199,32.922805000162526],[102.87794500037361,32.91440499992099],[102.88817799993086,32.9082209998156],[102.89080499991009,32.90402100014107],[102.89151700011269,32.876421000286044],[102.89665899991813,32.8722670001583],[102.89687700037635,32.863774999764466],[102.90212600031191,32.855375000348026],[102.90223500009185,32.85112900019995],[102.90737400042255,32.84697500021379],[102.91535300026946,32.830127999905166],[102.93081600039399,32.81554000004758],[102.93092400034904,32.811294000149715],[102.93600500005512,32.809261999756984],[102.94606100006033,32.809441999717336],[102.95003499955357,32.81202099974449],[102.95003688960892,32.812022227361034],[102.95077199987054,32.813665999724186],[102.95246099969135,32.81580599987548],[102.95435399972665,32.81760400015349],[102.95671899976502,32.81927699980543],[102.95921000020012,32.820778000221594],[102.96055599988922,32.82240700020189],[102.96109800021253,32.823697000067305],[102.96182700013358,32.82540599985301],[102.96351299958133,32.827089000204246],[102.96553500038637,32.828246000145434],[102.96685900033417,32.82936999983421],[102.96771700012665,32.83072600005403],[102.96809100022044,32.83197699972396],[102.9678769999602,32.83338100004192],[102.96780900018814,32.83381599986146],[102.96691200003762,32.835614000156504],[102.9667139996709,32.836010999817866],[102.96561099965601,32.83774499998743],[102.96537499965447,32.838956000238994],[102.96534399969235,32.84027200017089],[102.96584699965757,32.84145999992396],[102.96657599957864,32.84288400004804],[102.967778000226,32.84434899997535],[102.96907100021167,32.846385999873405],[102.96958599987248,32.847697999983346],[102.96949499963588,32.84913199985729],[102.96897999997509,32.850283999655396],[102.96800699965657,32.851851000169134],[102.96725099997134,32.85397999979227],[102.96713700016852,32.85696399988587],[102.9674119996298,32.85912899985806],[102.96828500038922,32.86106200005941],[102.96998699973048,32.86309399989924],[102.97200100013961,32.86460199966886],[102.9732330000259,32.86626499977328],[102.97381600035709,32.86751700002693],[102.97406800025215,32.86900199964212],[102.97382399985467,32.87009499999824],[102.97379399971744,32.871181000316106],[102.97428900018508,32.871976999663964],[102.97559399986633,32.872238999912604],[102.97713899974708,32.871580999892124],[102.97842099986208,32.87103900014951],[102.9800419999108,32.87077700012727],[102.98182699999104,32.87120699999251],[102.98485599965318,32.87217800020894],[102.98762999994547,32.87335399995172],[102.99044100004771,32.873988999783194],[102.99302399964601,32.87371499962607],[102.99571300044781,32.872572999895965],[102.99814700008318,32.8713750002717],[102.99868400038362,32.87104700000553],[103.00005799966182,32.87003299986356],[103.00122099995114,32.8691630000216],[103.00312099965913,32.866780000066306],[103.0047679996471,32.86452000024356],[103.00561200009422,32.86324399976677],[103.00676699998759,32.86081500022321],[103.00821700033211,32.859242999654974],[103.01004800044312,32.858982000082406],[103.01224600007693,32.85919599998813],[103.01458400035115,32.8596690003],[103.01733400035401,32.86058699999608],[103.01990899955638,32.86243299978484],[103.02173299999468,32.86405799996645],[103.0231399997832,32.86542200031551],[103.02497900029009,32.86767299989042],[103.02696699986163,32.8700990003462],[103.02895000030858,32.872014000203905],[103.03110899958433,32.87374399982871],[103.0325549997309,32.87423399981514],[103.03363400035464,32.873985000365266],[103.03561000023059,32.87321999990749],[103.03682299985033,32.87279799969495],[103.03791800036757,32.872834000213395],[103.03902100038245,32.87326899978953],[103.04097399979388,32.87495000014183],[103.04189699988369,32.87613699991314],[103.04233600027484,32.87761500036862],[103.04224400021333,32.87905199977513],[103.04306400037096,32.881155000013834],[103.04498300034555,32.884031999717514],[103.04718000015446,32.8867960001568],[103.04876699986796,32.88885099989974],[103.05081999973686,32.89149499988623],[103.05180399992602,32.892680000174806],[103.05307500017038,32.89403099963883],[103.05453899986026,32.89531999982399],[103.0557110003704,32.89569600015495],[103.05707200012814,32.895554000041],[103.05867800010826,32.894831999871116],[103.0607490004188,32.89458899982867],[103.06293100015905,32.894780000039134],[103.06527399955782,32.89564199972413],[103.0667280001003,32.8966989998265],[103.06869599958033,32.89866199974025],[103.07105700031909,32.90004599963223],[103.0729520000042,32.900505999908646],[103.07445199967911,32.900476000045444],[103.07609600019234,32.900897999701485],[103.07706500031294,32.901390999975405],[103.07824399959748,32.902506999895316],[103.0793729995516,32.90408900036272],[103.08035300044115,32.904810999739084],[103.08137500026514,32.905017000075766],[103.08265300018219,32.90453399962558],[103.08372199986188,32.90393599997921],[103.08527400031365,32.90344300029728],[103.08666299966045,32.903506999860284],[103.08831499967133,32.90421100029667],[103.08923799976112,32.90545500025331],[103.08984000035889,32.907325999691956],[103.09008100038331,32.9083609999183],[103.09079799971046,32.90960499964059],[103.09190400009841,32.91031999997181],[103.0936930003766,32.91102899979502],[103.09512799975418,32.911280999972725],[103.09709199993459,32.91095300035479],[103.09893899993911,32.909804000024764],[103.10050999975913,32.90771600013755],[103.10171499988125,32.90499199982978],[103.10277600006332,32.901989000214876],[103.10391599988813,32.89933800024443],[103.10575500039504,32.897345000057925],[103.10766199977573,32.89530100018216],[103.10986000030788,32.89410400020007],[103.11223299984385,32.892836000260026],[103.1155670000028,32.890926000317606],[103.11844300040237,32.88930899973474],[103.12089200010635,32.887254000053126],[103.1224589997284,32.88543900026674],[103.12275699965423,32.88426600032813],[103.12293999995234,32.88354799994338],[103.12275699965423,32.882604999791205],[103.12236800039013,32.880631000144234],[103.12159000006525,32.87732500001638],[103.12112499973485,32.87528500012543],[103.12152899996588,32.873045000107886],[103.12276500005014,32.87140700032473],[103.12287999967788,32.87123799965481],[103.12494699979044,32.869643000261526],[103.12501899976047,32.86961799984166],[103.12803300025227,32.86859299994578],[103.13228999960275,32.86809199964521],[103.13561299989102,32.86813299997947],[103.13852399955239,32.868064000344575],[103.14154899991485,32.86736000014848],[103.14543600026775,32.86594600029525],[103.15046799957003,32.86390000022097],[103.15443500028888,32.863114999986536],[103.1568570002287,32.86259799994942],[103.15929500006204,32.862479000204566],[103.16120200034102,32.8624619999046],[103.16260199955848,32.86167800032934],[103.16303699975165,32.860462999970714],[103.16229000028726,32.85808500014605],[103.16204500006488,32.85465500014676],[103.16239599969416,32.851148000254554],[103.1627930002525,32.848561000149914],[103.16320499998116,32.84654399987043],[103.1640100000702,32.84446599989121],[103.16532999982005,32.84328599971115],[103.16695800043978,32.84330299991209],[103.1687279995531,32.84360099988706],[103.17035000032504,32.84339000013483],[103.1718180002129,32.84289900029343],[103.1726120004313,32.84224800014024],[103.17295499966463,32.84146300002132],[103.17306900036579,32.84071499976377],[103.1737899998909,32.84000599964611],[103.17486600014159,32.83969799990971],[103.17662399955935,32.83970799967774],[103.1788220000915,32.84062899997994],[103.18025999984211,32.84122100013943],[103.18228500012187,32.84094099965854],[103.18441800035669,32.8394059999961],[103.18742799975222,32.83758399994895],[103.18936599999334,32.836617999624764],[103.19069800033708,32.835897999705224],[103.19129300036383,32.83542699968388],[103.19392000034304,32.833341000376635],[103.1940500000394,32.83323999987731],[103.19695300020311,32.83099100030408],[103.19893300027704,32.82918199962787],[103.20078699995427,32.82776200013399],[103.20257700005739,32.82645300037418],[103.2045139995753,32.82537399981499],[103.20650899971785,32.8243519997564],[103.20822600002604,32.82425799967609],[103.20846600022554,32.824244999753475],[103.21116699982461,32.825061999784005],[103.2146879995813,32.827264000076546],[103.21728199994855,32.82978199968155],[103.21930800005326,32.83157000021245],[103.2200019998142,32.83217999984388],[103.22101699996554,32.83334500011753],[103.22203899978952,32.83452599970866],[103.22273699974845,32.83546900011901],[103.2234809997381,32.8364569998068],[103.22490799961808,32.838654000263354],[103.22615899977096,32.841490000138826],[103.22712000039394,32.84392899976148],[103.22799699955466,32.84614199986984],[103.22922599996623,32.8484539998872],[103.23014099966011,32.84946600007518],[103.23152999990525,32.850463000322826],[103.23372699971415,32.851212999775065],[103.23544400002234,32.851701999819376],[103.23748799967038,32.852272999690534],[103.24075400005727,32.852480999728336],[103.24354599989293,32.852705000036394],[103.24656299985946,32.853775999825],[103.24788699980729,32.85415700001642],[103.24930299981659,32.8545690002876],[103.25002400024003,32.8546100000817],[103.25283899964191,32.85477000029329],[103.25594000017237,32.85418499993426],[103.25893899969726,32.85451299993082],[103.26096399997702,32.85619199991869],[103.26326500044134,32.85797200021659],[103.26541200002151,32.859119000014516],[103.26782300009066,32.86021000029409],[103.27051600019212,32.861410000213354],[103.27051683113376,32.86141076006723],[103.27283600002467,32.86353400014959],[103.27450999977684,32.865663000081625],[103.27559000022548,32.86736000014848],[103.27722299996977,32.86950099989533],[103.27943099964932,32.870423999719726],[103.28279599977043,32.87148400019276],[103.2860179997764,32.872714999869146],[103.28959999963246,32.87401199963948],[103.29275100039163,32.87462500000634],[103.29461699976441,32.875616999900735],[103.29547899975488,32.87697000001066],[103.29547958635476,32.87697358963336],[103.29582199988654,32.879070000275156],[103.29494499982748,32.881271999668186],[103.2940100000421,32.88387099993798],[103.29322400021965,32.88669899975639],[103.29254499962899,32.88877200027843],[103.29285900034667,32.89037000015614],[103.29359900013839,32.892187999905396],[103.29408299983706,32.894467000217126],[103.29386899957679,32.896133000251425],[103.2924240001535,32.89759800011278],[103.29036399971362,32.89913600006529],[103.2893489995623,32.90133300030748],[103.28840700010423,32.90364100011533],[103.28784999971232,32.90537300015761],[103.28790300031406,32.907032999903656],[103.28776600004673,32.90852199968733],[103.28741500041745,32.910022000220245],[103.28637299960363,32.91153600017645],[103.28548800004698,32.91266200027547],[103.28495499994447,32.913472999917424],[103.28444000028371,32.91428199973979],[103.28386000032555,32.915444000149684],[103.28347799983582,32.91625799977201],[103.28366100013392,32.916423000026214],[103.28326100010084,32.91670600027612],[103.28314999977276,32.9175069997743],[103.28323400033665,32.91877600005164],[103.28324900040528,32.91899699975669],[103.2834479996986,32.92115000001522],[103.2834710001631,32.922190000115464],[103.28343299962998,32.92327900018062],[103.28305100003857,32.92437699983282],[103.2825969995788,32.92529799986808],[103.2819260002824,32.925768000007615],[103.28147600002058,32.92668700023979],[103.28149100008919,32.927783000199554],[103.28172000041806,32.928698999698256],[103.2816740003873,32.9297289998719],[103.28116999969883,32.93134299968235],[103.28101400006322,32.931920999811744],[103.28073600022887,32.93295299967794],[103.2808580004276,32.9349500001305],[103.28091100013106,32.937017999661876],[103.28088099999383,32.937220999806215],[103.28062099970285,32.93897099979577],[103.28004499994266,32.94104200003743],[103.27940399988516,32.94260400034122],[103.27870199972826,32.94461499997904],[103.27780600030096,32.9468070003706],[103.27708900007546,32.94802599996503],[103.27705800011333,32.949686000175106],[103.27682899978448,32.95153300029058],[103.27694400031051,32.953412000076575],[103.27745499977338,32.954782000197916],[103.27816100012818,32.955854999777735],[103.27885499988916,32.95646799968411],[103.27947300038045,32.95663399980141],[103.28104099982741,32.95661100029873],[103.28274600044001,32.95687299965422],[103.28363799966938,32.957308000234804],[103.2841380001599,32.957992000040065],[103.28422199982548,32.95872499990961],[103.28376400006609,32.95953600012609],[103.28316499984136,32.960011999666],[103.28241800037695,32.96018499980406],[103.28152899972403,32.96009300017801],[103.2810480003984,32.95992299971575],[103.2804990004024,32.95970599982545],[103.27989199978178,32.95988999978761],[103.27983900007833,32.96057399995792],[103.27965599978023,32.96149899988652],[103.27906800032447,32.96236699974105],[103.27840499962737,32.96290099990938],[103.27801600036322,32.963586999705505],[103.27796199993658,32.96427900037465],[103.27860299999406,32.96523499987169],[103.28027000007356,32.96653700018689],[103.28171600022009,32.96742200003968],[103.28283000010562,32.968267000251636],[103.28347500036108,32.96945899973406],[103.28403199985469,32.970194000359356],[103.28485500038539,32.970864000286554],[103.28540100000835,32.971699000033524],[103.2855759999105,32.97220700015919],[103.28583600020151,32.972956999854475],[103.28690800025424,32.97482899976248],[103.28802899981245,32.976248000305716],[103.28908599979657,32.977533000244996],[103.2903479998201,32.9792300002162],[103.2918779996322,32.98047300020802],[103.29298400002014,32.98131000020418],[103.29436900006729,32.98209799990015],[103.29554800025018,32.98293500031549],[103.29618099991174,32.98371399966741],[103.29627299997325,32.98475200021908],[103.29592900001668,32.98524500035415],[103.2968179997713,32.98590899966349],[103.29736699976729,32.98607400031039],[103.2983099999486,32.986371000094714],[103.29868300021751,32.98733699975893],[103.29865300008026,32.98843100000605],[103.29895799967879,32.98939699973074],[103.29983999976072,32.98977799964927],[103.30079700018572,32.989702000071745],[103.30133799978579,32.98934100024287],[103.30193399963747,32.988759000098035],[103.3024709999379,32.98863099996825],[103.30315800002616,32.98878699965429],[103.30393299997796,32.9898010003116],[103.3036119995876,32.990439999804714],[103.3027460002975,32.99103200018384],[103.30257800006802,32.992067000306335],[103.3030900002541,32.9933160000843],[103.30566100015682,32.994748000129995],[103.30616400012204,32.99542400015488],[103.3072289996038,32.99677000026856],[103.30766299997205,32.99761899976375],[103.30910499992063,32.99915599965374],[103.31101700022248,32.99976000036677],[103.31257700017186,32.99997900003419],[103.31644100006021,32.99947799977757],[103.31962299988322,32.99889000010637],[103.32247199962028,32.998251999787215],[103.32505900031485,32.99765299968522],[103.3278360000819,32.99707999965733],[103.32975400023153,32.99738099994655],[103.33141399974001,32.998202000016],[103.33178399963585,33.000008000300326],[103.33179100020686,33.00004299980342],[103.33182200016898,33.00019799991141],[103.33189800033699,33.0003920003531],[103.33210400020133,33.00197600013788],[103.33218100019418,33.002478000244594],[103.33238700005852,33.00434200034061],[103.33319899982025,33.00563700024571],[103.33421800016953,33.007381000158276],[103.3357999998602,33.009888000214325],[103.33755099960528,33.01226100015518],[103.33970300010665,33.01473399998899],[103.34159199994397,33.016706999751825],[103.34200000037298,33.018283999750906],[103.34146999974523,33.0190769998768],[103.34039000019489,33.01947399966559],[103.33932200034013,33.01969999979415],[103.33730799993101,33.01998300003134],[103.33583099982235,33.0206590002535],[103.33467599992893,33.021534000246795],[103.33414200000153,33.02238099965653],[103.33408099990217,33.023678000264454],[103.33455399973019,33.02531099988193],[103.33503099975619,33.0264449998032],[103.33547199979714,33.02849300026636],[103.33674999971419,33.030410000358046],[103.3376309999712,33.032497999907136],[103.33770799996411,33.034368000219416],[103.33798199960047,33.036059000001686],[103.33799099982133,33.039433999712934],[103.33753300006191,33.041918999629374],[103.33793700029297,33.04405999994687],[103.33828000042465,33.0460829996306],[103.33876499994822,33.048061999915056],[103.33937500004359,33.05121999978849],[103.34060699992986,33.054822000141314],[103.34169400005123,33.05769799968028],[103.3426439999052,33.06085300008388],[103.34346099968981,33.0640139997436],[103.34454799981117,33.06711400032125],[103.34523099970147,33.07039000007649],[103.34524499994515,33.072360000357406],[103.344993999875,33.0755220003622],[103.34459800003988,33.07855700020561],[103.34433399955093,33.080477000003164],[103.34407499998315,33.083127000269414],[103.34406699958723,33.08337400013174],[103.34401800008172,33.08522499988816],[103.34401399988377,33.085383000060034],[103.34406699958723,33.08665500016193],[103.34409000005175,33.08718899978745],[103.34409800044766,33.08831999997803],[103.34412799968659,33.089420000010314],[103.34318200003055,33.08975999969935],[103.34114500005523,33.09045999970062],[103.33944799983851,33.090986000029666],[103.3377499997969,33.091973000131446],[103.33598800018119,33.09323900005576],[103.3344049997673,33.09419099997668],[103.33257000035663,33.09488999989259],[103.33073099984969,33.095527999669194],[103.32910200030338,33.09588400022832],[103.32863699997294,33.096204999671826],[103.3283159995826,33.09632199983867],[103.32743500022389,33.09716099968873],[103.3262109998352,33.09822200030279],[103.32446000009013,33.099051000279154],[103.32254500031355,33.09979699965614],[103.32200299999023,33.10097500005076],[103.32178200005731,33.10260500019335],[103.32176699998868,33.10418599969594],[103.32128199956679,33.10547799979801],[103.32033599991074,33.106372999937726],[103.31878699983206,33.106981000189286],[103.31689899981964,33.107474999882584],[103.31481199961557,33.10779499985286],[103.31386299958649,33.10839999997462],[103.31332100016152,33.10963299999492],[103.31276799996755,33.11076000037242],[103.3105400001965,33.111924999989526],[103.30772499989632,33.11299599964931],[103.30590499965595,33.11348900016809],[103.30488600020502,33.114266999767764],[103.30540900026172,33.11550899970137],[103.30579800042416,33.1163019999867],[103.30546199996517,33.11714399996476],[103.30384099991645,33.117808000048946],[103.30228799963979,33.11819199970129],[103.30094199995068,33.1184049996486],[103.2999920000967,33.11930099966554],[103.29883600037837,33.120589999783796],[103.29732099973653,33.1213220000879],[103.29617699971378,33.12171399990879],[103.29563100009085,33.122720999720734],[103.29487600023053,33.12424200022204],[103.29359099974246,33.12507299962939],[103.29231299982541,33.125460000107736],[103.29117200017569,33.12539099978002],[103.28995899965766,33.12549799965456],[103.28901700019959,33.12582300005589],[103.2877350000846,33.12688700007209],[103.28631200040257,33.12760900023604],[103.28486700008096,33.127896000349494],[103.28244400031625,33.12776400003375],[103.28103699962945,33.127352000211175],[103.280034000072,33.12711800035677],[103.27848099979533,33.12682299993779],[103.27687099961727,33.12754199970492],[103.2765280003839,33.128725000194784],[103.27518099997157,33.129279000222624],[103.27430800011048,33.128710000293424],[103.27338500002065,33.12723000018488],[103.27268299986378,33.126225999635224],[103.2711990000824,33.12666600035118],[103.26951699993431,33.126650000281714],[103.26723200026184,33.12669100026582],[103.26514900025576,33.1275160002261],[103.26379500017075,33.12869099971255],[103.2633139999468,33.12958899966608],[103.26297099981514,33.13054300025371],[103.26288700014956,33.13179100025532],[103.26294800024891,33.132692000089015],[103.2625969997213,33.13454800013331],[103.26151299997302,33.13532799991325],[103.25976200022797,33.136046000272884],[103.25908299963729,33.13694600036112],[103.25813699998128,33.13772700033523],[103.25643999976455,33.138957000310775],[103.2558220001716,33.14052800032657],[103.25561600030728,33.141371999718956],[103.25499799981597,33.14283900010378],[103.25451699959206,33.143622999907166],[103.2516979999922,33.14360200029921],[103.25015700030943,33.14364800025765],[103.25003500011069,33.143780000004526],[103.24873000042948,33.145214999858084],[103.24788000013459,33.145917000241866],[103.24738399984204,33.14632900017441],[103.24684999991464,33.14657300036873],[103.24617100022232,33.14688399999339],[103.24495799970428,33.14743799973051],[103.24334800042452,33.1477100000289],[103.24207399980712,33.14786999981051],[103.24092999978436,33.14774799972139],[103.23971299996668,33.14852899983061],[103.23930100023802,33.149316999671996],[103.23909500037371,33.15032699962514],[103.23867500024913,33.15201299977157],[103.23746199973108,33.15223100027238],[103.23632500027934,33.152223999836934],[103.23511199976134,33.15270899978454],[103.23489900022429,33.15355799988627],[103.23401399976932,33.154847000120924],[103.23414299964075,33.15586499995508],[103.23418899967152,33.15755799970142],[103.23424999977088,33.15858099992493],[103.2338990001416,33.159984999992496],[103.23302200008254,33.160655999904556],[103.23152999990525,33.16143399962502],[103.2305270003478,33.16204999969201],[103.22984399955918,33.1632860002312],[103.23115199961346,33.16509999964019],[103.23101100004648,33.166622999831425],[103.23086999958117,33.166687000265966],[103.2296610001594,33.167233999758935],[103.22882500010823,33.166687000265966],[103.22879099977303,33.16666100035352],[103.22778800021558,33.16631499985967],[103.22752100025193,33.16668899973827],[103.22717700029531,33.167160000160514],[103.22575799991296,33.16805199987712],[103.22472100002034,33.16859699969577],[103.22447599979796,33.16872399980278],[103.2235300001419,33.16945099978125],[103.22277500028159,33.170106999844336],[103.22262999961835,33.17151199962738],[103.22297000027527,33.172660999832196],[103.22315699987301,33.173622000016636],[103.22219500032347,33.174500999845314],[103.22124499957116,33.17568300028521],[103.22102399963822,33.17753599986057],[103.22061899958224,33.178496999972296],[103.22013099968562,33.17973300018855],[103.22032200037965,33.18063799990851],[103.2215919999008,33.18166299985866],[103.22259500035652,33.18195299964519],[103.2235989997389,33.18264299999672],[103.2245340004226,33.18361099991913],[103.22338600020186,33.18433499997499],[103.22168800016027,33.18493099966393],[103.22054300031262,33.18542700025957],[103.21946000038923,33.186209999852466],[103.21871200020158,33.18705199965811],[103.21856700043662,33.18823900002935],[103.21896400009666,33.189032999981436],[103.21990300008001,33.18988999968335],[103.22055900020611,33.1910189997819],[103.22054400013752,33.192318999761625],[103.2200019998142,33.193051000009014],[103.21910899986162,33.19490200027768],[103.21949800002405,33.195862000306384],[103.22036000001451,33.19688499999473],[103.22128700030227,33.19829899964254],[103.22207700032267,33.199549999916485],[103.22266399995351,33.20113399987928],[103.22272599987778,33.202314999831216],[103.22210800028485,33.20326799964943],[103.22116099990555,33.20422200005209],[103.21974599972117,33.20539700016256],[103.21946399968887,33.206747000202],[103.22036800041042,33.20838699991668],[103.2213590002723,33.20986499990944],[103.22161899966498,33.21110900001929],[103.22100899956958,33.211888999682074],[103.2198679999199,33.21188400019777],[103.21838400013851,33.21260899984911],[103.21790000043984,33.21379199971142],[103.21816300020559,33.21480399987156],[103.2187499998364,33.21565599984386],[103.22008899985283,33.216400999724456],[103.2210160001406,33.2171969996521],[103.22100100007201,33.21866399969423],[103.21999000011864,33.219844000346065],[103.21871200020158,33.22022799968115],[103.21702199965759,33.22100499999663],[103.21634299996524,33.22184700037501],[103.21619800020028,33.22286100025087],[103.216460999966,33.2237670001137],[103.21744900035314,33.22524199976478],[103.21864699990425,33.226151999753114],[103.2193110004263,33.226831000051014],[103.21922699986241,33.228074000009634],[103.21834999980335,33.22874300036838],[103.21753300001872,33.23009099990563],[103.21785799970874,33.231507999986306],[103.21844100003992,33.23242099974133],[103.21825799974184,33.23266700014876],[103.21765900041544,33.23367799978013],[103.21745699985075,33.23435999977888],[103.2157789999006,33.234306000116106],[103.21389799956091,33.23430899963906],[103.21168514808049,33.234316000278845],[103.21168499985846,33.234316000278845],[103.20930899994943,33.234577999775986],[103.2079060003589,33.234522000069866],[103.20595999972186,33.23525900018855],[103.20401800018108,33.23617199985186],[103.20227499993359,33.23662499963809],[103.2012680001782,33.23680000030872],[103.20039799979185,33.23680000030872],[103.19905499957747,33.23646200017111],[103.19737300032769,33.2358940002026],[103.19569799985227,33.23567599972957],[103.1942259997665,33.23568100010842],[103.19288699975007,33.235851000045464],[103.19026999981659,33.23648400013532],[103.18838900037518,33.2367669997282],[103.18739000011739,33.23750699987279],[103.1869890002594,33.2384679999703],[103.18666899969395,33.24037599972463],[103.18687499955826,33.242573000245905],[103.18641000012617,33.24432299985065],[103.1855399997398,33.24539899991028],[103.18404099988982,33.24610999962891],[103.18176299989005,33.2472439999735],[103.1800919996126,33.248491000215246],[103.17908900005516,33.249231000283366],[103.17848300015777,33.25000899975842],[103.17781500033608,33.25086599962786],[103.17746800000644,33.25178899973039],[103.17715500001201,33.25261900035919],[103.1769569996453,33.25442200032124],[103.17675800035198,33.25679200012327],[103.17615599975422,33.25876800023829],[103.17509100027249,33.26057699975352],[103.17354999969139,33.261766999710574],[103.17217300004015,33.26213500035056],[103.17063200035734,33.26236600020314],[103.16895799970688,33.26214500033405],[103.1672830001298,33.261751000268134],[103.16606999961176,33.261138000079086],[103.16466199999836,33.26086300032545],[103.16325799968462,33.260918999681735],[103.16171299980387,33.2611480001767],[103.15941999973549,33.261128999764864],[103.15660899963326,33.26119499979402],[103.15459400029754,33.261421000221794],[103.15325600010605,33.261425999878995],[103.15137099956839,33.26081299966269],[103.14936100025552,33.260198000061195],[103.14686200032284,33.25951300017777],[103.14512300027333,33.25912099987433],[103.14290600037293,33.259124000048146],[103.14156399998349,33.25946499985186],[103.14069799979508,33.25986599980816],[103.139828000307,33.26054300009602],[103.13848500009264,33.261224000280436],[103.13687900011253,33.261113000205505],[103.13480399960406,33.26116900015268],[103.13245799983221,33.26106199990047],[103.13104699984576,33.26140299965074],[103.12984199972368,33.2622499997162],[103.12910100010706,33.26276100026553],[103.12790000018288,33.263949000259124],[103.12696100019954,33.265464000190626],[103.1258249996744,33.26755200018782],[103.12508499988269,33.268684000009],[103.1250270001564,33.268746999743776],[103.12307800004461,33.27082600004563],[103.12274199958563,33.27103999977894],[103.12112800010789,33.272119000275914]]],"type":"Polygon"},"properties":{"code":"513233208","name":"色地乡","cp":[103.14352108676084,33.04086199974242]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.73738999973088,32.98819599992347],[102.73229200030636,32.99021999996018],[102.72725300043311,32.99012000032909],[102.71975400008687,32.98784700011488],[102.71501300013942,32.97713100005532],[102.71003500036554,32.974908000187106],[102.70253799966913,32.97263400013344],[102.68982299989764,32.97662699967278],[102.68484599994864,32.974402999889314],[102.68508600014813,32.96590999965195],[102.67525400044892,32.95721400016075],[102.66530200020073,32.95276399993821],[102.64767499987924,32.95240400015372],[102.64005900025546,32.95437199986834],[102.63231899988483,32.96058600004589],[102.6323185561171,32.960586175664275],[102.62437799967273,32.945836000368494],[102.62463700013885,32.936938000331196],[102.61942599983811,32.934604999993624],[102.61427999983472,32.9300460001063],[102.6145400001257,32.92114800023959],[102.617306999847,32.91675400030336],[102.62811500023783,32.908075000032966],[102.63609099971171,32.906014000179184],[102.64425799987961,32.8972780000953],[102.64959600040197,32.89516199997895],[102.6523599997502,32.890766999947985],[102.66290600020021,32.8909820003087],[102.6732619997811,32.897870000048385],[102.68889399996004,32.904862999715505],[102.70735300013472,32.90523299985553],[102.71256500026034,32.907562999987654],[102.7231140001851,32.907772000072114],[102.73353900026127,32.91242999998657],[102.73869000028755,32.91698300001219],[102.74396500016236,32.9170869999642],[102.74917800011292,32.9194149997371],[102.76500299973739,32.919723999990495],[102.77825200033458,32.91775599983025],[102.78364699986001,32.913408000041485],[102.79161999985915,32.91133599991613],[102.79707399983413,32.90476400009668],[102.79731400003364,32.8958660003745],[102.79479699965928,32.89136599972504],[102.79491700020819,32.88691700025076],[102.78491399990641,32.86669399988988],[102.78509499965638,32.86002099993049],[102.78018600037775,32.84657199992657],[102.7804280002271,32.837675000039425],[102.77521899957621,32.83534800001575],[102.7762470001463,32.79753400002403],[102.77134399981715,32.784085999856046],[102.76356599981169,32.779483999657465],[102.75591099982982,32.77043200016433],[102.7269510003093,32.76986200000567],[102.72181000032879,32.76530899970729],[102.71654499960137,32.76520399991258],[102.71409900027045,32.75847899993467],[102.71453299974041,32.74290900033247],[102.7120260003101,32.738408999868504],[102.71246099960499,32.72283900013436],[102.7023729998127,32.70705999969367],[102.70262300005795,32.69816399978078],[102.69742500017603,32.69583400010416],[102.6841479999897,32.7000170003179],[102.67631999975553,32.697633000012225],[102.67657199965059,32.68873700016843],[102.68484000010085,32.67555199975846],[102.68496499977434,32.67110399977071],[102.6800210003356,32.65987800017425],[102.67213399965189,32.65971800032826],[102.6460990000364,32.65028399967215],[102.64084099987998,32.65017600007306],[102.6252620003028,32.64317800031052],[102.62013399984275,32.63862099968313],[102.62039199958562,32.62972499962597],[102.62590599983504,32.62093900032043],[102.62616399957791,32.61204399990777],[102.62324192189249,32.606778021045635],[102.61866900032796,32.59853700006751],[102.6187980001994,32.59408899993758],[102.61630099991652,32.589586999975204],[102.61668900025403,32.57624399998936],[102.61681800012548,32.57179600029717],[102.6223280001769,32.563011000099046],[102.62258599991979,32.55411599968648],[102.6279019998025,32.552000999652456],[102.63065600000331,32.54760800031061],[102.64128600011891,32.54337700003875],[102.64403899959649,32.53898399974345],[102.64928900025528,32.539092000152],[102.65991699982274,32.53486000028845],[102.66516699958319,32.534968000355185],[102.6679190001342,32.53057400022284],[102.67854400022694,32.52634000011547],[102.68379399998739,32.526446000263675],[102.68916900031965,32.52210499984978],[102.69448100000437,32.519987999780255],[102.69972999993996,32.52009299999741],[102.70785299972694,32.51135699968902],[102.71316299976185,32.509238000291866],[102.71853600044429,32.50489599974767],[102.72940199966311,32.49176300000609],[102.75087899962926,32.47438800008821],[102.75372800026464,32.462531999728455],[102.75372896595357,32.462527981093885],[102.7550780001517,32.46250200018521],[102.75717600022642,32.462860999621576],[102.75995299999344,32.46314599980621],[102.76186100009737,32.4636220003561],[102.76424899970198,32.46443099974373],[102.76637000024121,32.465528000290966],[102.76904800027405,32.46718899990251],[102.77043599979596,32.46836600013842],[102.77151200004666,32.47063000035783],[102.7717560004441,32.47211200033613],[102.77187799974455,32.474169000195886],[102.77164199974298,32.47549399991102],[102.77187799974455,32.47657800002294],[102.77242699974055,32.47707899992157],[102.7735020001663,32.47729599966111],[102.77565799996734,32.47713300020252],[102.7780840001051,32.47696999969087],[102.78091399957557,32.4768529997135],[102.78300099977965,32.47675100001724],[102.78489299999,32.47665499993004],[102.78652999993226,32.47668599963788],[102.7880249995843,32.476937000179035],[102.78945900003525,32.47753300003973],[102.79056200005013,32.478432999994865],[102.79120300010761,32.47967600033784],[102.79104999994674,32.48145699991717],[102.79037100025442,32.4835860001996],[102.78908599976636,32.48601800029126],[102.78826899998178,32.48815100033259],[102.78807099961503,32.490628000225776],[102.78798699994944,32.49240499988278],[102.78734599989194,32.49384700011567],[102.78568700020838,32.49535399978748],[102.78321500003987,32.49620299974083],[102.78094500043606,32.49711299965753],[102.7792819996562,32.497780000177734],[102.77794699983775,32.498376999978866],[102.77556300043109,32.49991599963377],[102.77546299997364,32.50000199993149],[102.7736479997562,32.50156400034707],[102.77284699986511,32.502299999979684],[102.77153399978793,32.50349299997378],[102.76995499957202,32.50495800014896],[102.76931400041282,32.506055999953446],[102.76928400027562,32.50737599987832],[102.7702070003654,32.50873200003502],[102.77194700023982,32.51069700031391],[102.77354099962605,32.5126189999198],[102.7749519996125,32.5146510001689],[102.77610400003118,32.51703200028858],[102.77719500035047,32.519811000197],[102.77788200043874,32.52254500017828],[102.77793500014216,32.52454899974698],[102.77824099956561,32.52574199988031],[102.77887800032347,32.52698999974249],[102.77976999955283,32.52765500024469],[102.78112799983583,32.5280289997517],[102.78350100027012,32.5282040002905],[102.78538900028258,32.528277999900766],[102.78724399978469,32.52882499966346],[102.78909400016228,32.52981899992847],[102.78971199975526,32.53020800012224],[102.79048199968418,32.53110300000094],[102.79200099962567,32.532389999793835],[102.79455999983281,32.53439499984325],[102.7965630003713,32.53623600026088],[102.79852300035374,32.53799799965588],[102.80018299986217,32.539506000262605],[102.80173199994088,32.541529000305495],[102.80232299976969,32.54329100034997],[102.8027810004274,32.54522900015219],[102.80262800026654,32.54700800021203],[102.80200700030052,32.54885200036389],[102.80131199981632,32.550638999671826],[102.80107599981476,32.551791000242545],[102.80138100031161,32.55293499999627],[102.80229699983043,32.55417599974445],[102.80373499958104,32.55522600032343],[102.80511600032854,32.55623099985265],[102.80553899992786,32.557023999817005],[102.80565299973068,32.55845100019321],[102.80540099983558,32.559423999836206],[102.80456599960932,32.56076000028327],[102.80339900002035,32.56261599963522],[102.8027730000315,32.56434999971809],[102.80273899969627,32.56549899962289],[102.80343699965519,32.566459999723904],[102.8046119996401,32.5672309998413],[102.80672899998135,32.56810299995863],[102.80976900041243,32.56837999994169],[102.81134500025533,32.568929000053345],[102.81284800030328,32.56935400022344],[102.81474399981332,32.56953900027406],[102.81656400005367,32.56961499999603],[102.81825299987445,32.56963599964887],[102.81825757768912,32.56963726921207],[102.82016099997834,32.57016500016878],[102.82214799972498,32.57115199973835],[102.82347900024378,32.5720069998542],[102.82528000021756,32.57362699967456],[102.82662599990668,32.575713999758875],[102.82743500019369,32.57793200026015],[102.82817900018334,32.580489999940234],[102.82885100020297,32.582537999680774],[102.82930399993951,32.58333599974596],[102.82983399966894,32.58428500000515],[102.83061600019174,32.58569399962455],[102.83098299971458,32.586663000240144],[102.8309369996838,32.587411000257276],[102.83042200002302,32.588221999627244],[102.82950599960587,32.589330999989976],[102.82880500017224,32.59054300017349],[102.82806100018257,32.59262500031082],[102.82770999965497,32.5947539998071],[102.82742699979777,32.59699600004144],[102.82721400026075,32.59883200030854],[102.82652700017249,32.600909999743024],[102.82453200002993,32.604099999941276],[102.82410900043065,32.60560099982759],[102.82427699976184,32.60679800024485],[102.8251270000567,32.608724999622346],[102.8253100003548,32.61026599993089],[102.8249520001545,32.61193100011622],[102.823978999836,32.61333300012233],[102.82301800011135,32.61395800032116],[102.8217550002629,32.614555999871875],[102.82029800024571,32.61555899971345],[102.81911200039016,32.61644900028265],[102.81887499966538,32.61782200028367],[102.81877599993119,32.61920300021755],[102.81801299967495,32.62076500006388],[102.81706299982095,32.62256300027673],[102.81535399990867,32.624490000101275],[102.8132440001384,32.62619900022524],[102.81186699958883,32.627592000011866],[102.81097399963626,32.629560999725776],[102.81080700012998,32.63099500007169],[102.81140899982944,32.63292799979044],[102.81302300020548,32.63512800022586],[102.8154409999473,32.63702500004273],[102.81832499984448,32.638845999782454],[102.82065700027091,32.640175000081705],[102.8223810002518,32.641281000106574],[102.82446699973262,32.64246500003353],[102.82624900033814,32.64334500018089],[102.82742299959979,32.64428600022566],[102.82806799985525,32.645705000361374],[102.828258999651,32.64764400033428],[102.82825100015336,32.649822999885316],[102.82758400015658,32.652185999722974],[102.82696599966529,32.65431299991831],[102.82694300009908,32.65585899962965],[102.82705000022922,32.65734400022783],[102.82724100002493,32.65883599982759],[102.82774399999016,32.65997000027736],[102.82898400027237,32.661031000082126],[102.83070400005532,32.66213499973565],[102.83262700022784,32.6631239996461],[102.83454600020238,32.663884000110286],[102.83563300032371,32.66431900032354],[102.83750200006955,32.665323000199486],[102.83945500037932,32.66667100037144],[102.83991700033668,32.6669920003191],[102.84151499992085,32.66844099962664],[102.84221299987978,32.66902400022713],[102.8432430000997,32.669891000084334],[102.84469300044421,32.67094599972261],[102.84661900009148,32.672054000333574],[102.84936200042164,32.67275999992726],[102.85133400009964,32.67311600000355],[102.85343200017435,32.673234999850756],[102.85518299991939,32.67302700030652],[102.85713600022915,32.67275200037651],[102.85930700009877,32.67299600034023],[102.86150800010566,32.67388399962746],[102.86323200008653,32.67475900009002],[102.86476199989866,32.67632800035612],[102.8659750004167,32.678477999722496],[102.86602800012014,32.68047900037363],[102.86676100023918,32.682414999692725],[102.86767599993306,32.683597000131336],[102.8690650001782,32.685052000196315],[102.87057999992172,32.68616299977768],[102.87212099960448,32.68779100035823],[102.87270800013363,32.68932699996373],[102.87249399987338,32.691155000273355],[102.87247100030717,32.692644999636876],[102.87291399999795,32.693834999912895],[102.87336000006178,32.69424500033608],[102.87403499955619,32.694871000052686],[102.8747829997438,32.69485300003762],[102.87503100033925,32.69475399988975],[102.87598799986591,32.694366999770246],[102.87765499994539,32.69358600002017],[102.87958499979062,32.69262800012281],[102.88133200023604,32.69201999963115],[102.88282799971299,32.69215399996093],[102.8838500004353,32.69259199994045],[102.88446800002828,32.69286899964672],[102.8855059997458,32.693530000331194],[102.8865400001637,32.693976999704674],[102.8876880003844,32.694125000333344],[102.88889699980616,32.69369999965651],[102.89057200028158,32.69320400031018],[102.89267399965594,32.693157999993424],[102.89450800014,32.69334900015116],[102.89580899962327,32.693778999624136],[102.89745700033447,32.694660999902844],[102.89925800030827,32.69611299988786],[102.90078700029548,32.69733299975012],[102.90257300020063,32.69804499988807],[102.90428200011291,32.698576000229316],[102.90565100026657,32.69895500001563],[102.90700199997855,32.69898600004265],[102.90786399996898,32.69827399985177],[102.90906499989312,32.697679000290854],[102.91041599960515,32.697595000060026],[102.91191600017835,32.698363000091746],[102.9136929998627,32.69895500001563],[102.91608499966527,32.699708000235155],[102.91821000040245,32.70035600028625],[102.9196980003818,32.70043799997371],[102.92153299979243,32.700343999754125],[102.92341300030726,32.69966800018048],[102.92548500044269,32.6985899997414],[102.92695300033053,32.697930999753105],[102.92817000014821,32.69762099986994],[102.92945999976084,32.69782399966635],[102.93063100044608,32.698371000372305],[102.93155000033794,32.69961700034934],[102.93256499959092,32.70171300022556],[102.93308699982276,32.70353599976747],[102.9337510003448,32.705297999741944],[102.93474600040463,32.70693800022448],[102.93639800041548,32.708502000371745],[102.93815599983324,32.71075099964291],[102.94009800027234,32.712149999945126],[102.94208900021692,32.71285400003547],[102.94482099977813,32.713372999639546],[102.9468689996241,32.71378999994281],[102.94874599976589,32.71424300034153],[102.95012300031543,32.71485099984506],[102.95096600003932,32.715575000028814],[102.95250300042245,32.71721100011316],[102.95443400009259,32.72038199999305],[102.9565549997335,32.72297300028633],[102.95784000022157,32.72524399971213],[102.95976300039408,32.7277780001361],[102.96147599960598,32.729494999682316],[102.96355899961206,32.73100299992258],[102.96502400002521,32.7321219997618],[102.96600400001643,32.733191999860445],[102.96657599957864,32.73408999987595],[102.96674800000608,32.735175000063464],[102.96638599960784,32.736844000089185],[102.96569100002195,32.738632000152215],[102.96458899983199,32.74019700026751],[102.96354000024382,32.7415320003065],[102.96264300009328,32.74338099980294],[102.96195299963198,32.745517000222385],[102.96200600023371,32.74729600002704],[102.9626659996595,32.748888000124055],[102.96287999991975,32.750031999873585],[102.96291000005698,32.750197999851586],[102.96288800031567,32.751687999694234],[102.96269300032199,32.75233400001233],[102.96252099989455,32.75289299983703],[102.96127399993962,32.75434499997767],[102.95998400032701,32.755780000300106],[102.95934300026951,32.757164000002874],[102.95919099993354,32.75887999973548],[102.9600679999926,32.760923999965435],[102.96085100034033,32.762955000288684],[102.96183899982915,32.76436400011823],[102.96276600011691,32.76559800023652],[102.96374600010815,32.766727000358934],[102.96521099962295,32.76773200018401],[102.96673999961017,32.768965000354825],[102.96778900009667,32.76997500024771],[102.96857099972115,32.770991999747075],[102.96900599991436,32.77206199979407],[102.96945199997819,32.773431000303205],[102.968944999815,32.776876999801935],[102.96867799985128,32.77911499985897],[102.9687549998442,32.78174899999823],[102.96909399977788,32.78397300016172],[102.96881500011862,32.786212999756806],[102.96853300008632,32.78805200009853],[102.9675599997678,32.78978699979325],[102.96618300011656,32.79123900002765],[102.96442800017353,32.791903000357514],[102.96207099963274,32.792577000048524],[102.96010300015271,32.79344900032664],[102.95864899961023,32.7948499999624],[102.9574700003257,32.79670299988666],[102.95589100010977,32.79856400005485],[102.95503999998998,32.79961200024223],[102.9545289996288,32.80059400013704],[102.95373199993568,32.80152899976169],[102.95238500042167,32.80172800033951],[102.95116799970566,32.801980000098055],[102.95071099977118,32.80255200005127],[102.95055000011271,32.804047999836534],[102.95074900030433,32.80621700017305],[102.95053500004408,32.808229000141274],[102.94998199985012,32.81007199972766],[102.95003499955357,32.81201800016238],[102.95003688960892,32.812022227361034],[102.95003499955357,32.81202099974449],[102.94606100006033,32.809441999717336],[102.93600500005512,32.809261999756984],[102.93092400034904,32.811294000149715],[102.93081600039399,32.81554000004758],[102.91535300026946,32.830127999905166],[102.90737400042255,32.84697500021379],[102.90223500009185,32.85112900019995],[102.90212600031191,32.855375000348026],[102.89687700037635,32.863774999764466],[102.89665899991813,32.8722670001583],[102.89151700011269,32.876421000286044],[102.89080499991009,32.90402100014107],[102.88817799993086,32.9082209998156],[102.87794500037361,32.91440499992099],[102.87268999969199,32.922805000162526],[102.87252400001061,32.929174000360575],[102.87252446264299,32.92917471967159],[102.87252400001061,32.929175000157706],[102.86228700025542,32.93535599964521],[102.8621750001024,32.939602999870814],[102.85708400035061,32.94163199975679],[102.85445399999834,32.94583199967179],[102.85434299967025,32.95007799999631],[102.84656399983989,32.95842900007515],[102.84124700013224,32.96895099963013],[102.82613399981207,32.968665999779134],[102.80329299971515,32.974604000016534],[102.78314200024492,32.97421699992647],[102.77581600015107,32.96557800004163],[102.7710109997312,32.95698799978203],[102.76608999985872,32.95264399967042],[102.76105400035851,32.952546000273145],[102.75841899998336,32.95674300031277],[102.75332400003359,32.9587680001749],[102.75320699985772,32.963014000146636],[102.74811100008304,32.965039000253356],[102.74529999998084,32.975604999716786],[102.73738999973088,32.98819599992347]]],"type":"Polygon"},"properties":{"code":"513233205","name":"阿木乡","cp":[102.83552513473182,32.7263610000727]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.57860900033855,32.08602800011623],[102.57319100034857,32.0925849999706],[102.56829700024029,32.08136000012385],[102.5505510000931,32.063187000363364],[102.55114500029495,32.04318399994739],[102.54364799959856,32.031902000320905],[102.53602000027922,32.02506600016468],[102.52825999981707,32.022672999830995],[102.52317599973799,32.01811500036964],[102.51802600043492,32.01577800026322],[102.51402699992903,32.006738999805634],[102.51402613485139,32.006737045894845],[102.51402699992903,32.006736000000295],[102.51525999964025,32.00516700001056],[102.51696899955249,32.00404100016083],[102.51870400030236,32.00377599978643],[102.52052000034475,32.00413699975097],[102.52153499959775,32.004401999843616],[102.52247699995415,32.00472499999868],[102.52478799956586,32.00482300005418],[102.52725200023679,32.0040830001843],[102.52902600044636,32.00295899966978],[102.52967900019944,32.00232099986442],[102.53065900019065,32.00137000017402],[102.53195200017635,32.00011900035057],[102.53196700024495,31.999984000028892],[102.53219300020075,31.997943999837993],[102.53258200036318,31.99693500007374],[102.53313499965881,31.995873000349484],[102.53419500001598,31.994774000129176],[102.53532099959706,31.99373099995393],[102.53643899968056,31.993187999988],[102.53723200007404,31.99254800007895],[102.53822799995875,31.99173599996684],[102.53894900038223,31.991097999787975],[102.53961300000594,31.990233000055905],[102.539941000069,31.989776999772726],[102.5401960003371,31.988800000186203],[102.54065400009654,31.987708999912215],[102.54103599968796,31.986443000347553],[102.54136399975103,31.985527000059474],[102.54200800018155,31.9840910000397],[102.54260300020832,31.983282000310385],[102.54339300022875,31.982300000137908],[102.54391200008752,31.980863000192578],[102.54430100024994,31.97959900009298],[102.54488500040605,31.9783350001083],[102.54560900030424,31.977411999895253],[102.546460000424,31.976250000179643],[102.54731400001853,31.975268000193612],[102.54810400003893,31.974342000275264],[102.54866800010356,31.97316599964187],[102.54939299982665,31.97241299993556],[102.55052599997875,31.971713999752804],[102.5515219998635,31.971358000025457],[102.55245300034925,31.971051999644505],[102.55331899963932,31.970701000259954],[102.55418099962976,31.970003999650714],[102.5546390002875,31.969025000179307],[102.5550279995516,31.96793699981704],[102.55541300041439,31.96695500005922],[102.55567299980706,31.966210000178584],[102.55612300006884,31.965119000346554],[102.55651999972889,31.964545999824217],[102.55750800011603,31.96333100029745],[102.55902600023259,31.961654999809898],[102.5603500001804,31.960269000225143],[102.56136399960847,31.95936600014267],[102.56281700032605,31.95842699971757],[102.56441599973516,31.95755200031218],[102.56588100014825,31.95633599973228],[102.56686899963707,31.95517699997434],[102.5677919997269,31.954139000189926],[102.56858500012036,31.95333000019361],[102.56924899974408,31.952521999950218],[102.56970999987655,31.951835000324245],[102.56936300044524,31.950410999635213],[102.56893499992474,31.948986999740548],[102.56851599962508,31.947559999663916],[102.56815699959986,31.94595100020293],[102.56779900029791,31.944297999865782],[102.5679819996977,31.942749000309604],[102.5684319999595,31.94160300014654],[102.5692830000793,31.940275000280508],[102.57033599986543,31.93889399987361],[102.57165599961529,31.937507999917404],[102.57317799992978,31.936001999631294],[102.57466599990914,31.935377999933674],[102.57607699989559,31.935247999939968],[102.57816400009962,31.935738999861023],[102.5802470001057,31.936344000285384],[102.58167399998568,31.937360999828122],[102.5835619999981,31.938483000003966],[102.58574299991346,31.940009000077414],[102.58730700006079,31.941552000018646],[102.58894800020099,31.94353500010937],[102.59085499958168,31.945459999953528],[102.59255599999635,31.947045000057056],[102.59445599970432,31.948684999747012],[102.59601999985165,31.949985000285864],[102.59757599960305,31.95128199986644],[102.59935400001059,31.952651999899334],[102.60125799991654,31.954005000051612],[102.60266899990299,31.954506000329985],[102.6044930003413,31.954831000079203],[102.60630900038369,31.955098000047016],[102.60745699970607,31.95526099977431],[102.6084640003598,31.95530699997702],[102.61095499989659,31.955396000353453],[102.61357199983007,31.955651999619615],[102.61606300026513,31.9558000001561],[102.61828699983823,31.955778999764895],[102.62070899977805,31.956041000127904],[102.62294099974702,31.956593000163],[102.62355099984238,31.956710000046723],[102.62503100032413,31.95699300015896],[102.62548499988556,31.95707999972737],[102.62757999958721,31.95751700007115],[102.62946400029999,31.957960000374506],[102.63129100021303,31.958629000034286],[102.63231700023502,31.959540000036373],[102.63313400001961,31.960392000354414],[102.6341600000416,31.961641000188163],[102.63531199956194,31.962658000203074],[102.63701700017458,31.963727000322958],[102.63850900035187,31.96463000020025],[102.63914200001345,31.964724000112646],[102.63932899961121,31.964751999938233],[102.63958800007728,31.964792999776304],[102.64093499959134,31.964606999769217],[102.64159900011335,31.96397400019188],[102.64258300030254,31.962766000062373],[102.64337999999566,31.96189900017005],[102.64385299982368,31.961723000337795],[102.64464299984408,31.96028599985624],[102.64495599983853,31.95913899975513],[102.64513099974073,31.95735900036298],[102.6459240001342,31.956151000104054],[102.64645499968852,31.955631999940824],[102.64724800008199,31.9545949999582],[102.64756899957405,31.95350600010394],[102.64793799964501,31.95155799973505],[102.64777000031381,31.94938399992551],[102.64714099995187,31.9476159998631],[102.64665300005522,31.94607399968674],[102.6461650001586,31.94482000033625],[102.64634799955842,31.943274000025315],[102.64720200005125,31.941950999815205],[102.64877000039652,31.941009000086076],[102.65085599987735,31.940932999842424],[102.65240099975809,31.940973999640647],[102.65354999980369,31.940906999905106],[102.65428600029577,31.94055900009469],[102.65488100032253,31.940095999721347],[102.65534699957955,31.939345999954543],[102.6555979996497,31.938027999725993],[102.6550489996537,31.937230000167567],[102.65401500013412,31.935410999814852],[102.65345799974219,31.934043000074194],[102.65310000044022,31.93278999994118],[102.65268000031566,31.931362999940216],[102.65279499994337,31.930333000046012],[102.65290899974619,31.928788999811406],[102.65361500010104,31.928077000164546],[102.65487700012454,31.927333000151247],[102.65560600004561,31.926638999961014],[102.6560210001473,31.925719999874012],[102.65721200002574,31.92456799971758],[102.6584060002772,31.92358400002168],[102.65967599979831,31.922773000263376],[102.66074799985103,31.922308000349183],[102.66157200020666,31.92119699961887],[102.66175499960644,31.919994000102623],[102.66157999970424,31.91905299993229],[102.66154200006943,31.918851999925135],[102.66094600021776,31.917561000303937],[102.66062599965232,31.91673200034441],[102.66045800032116,31.916307000100794],[102.6601029995956,31.915051000252486],[102.65988199966263,31.913846999982788],[102.6595920001327,31.91242000036754],[102.65970599993554,31.910815999776023],[102.66008800042529,31.90978600005151],[102.6602099997257,31.908583000009514],[102.66018700015948,31.907151000079615],[102.6603699995593,31.90600400028735],[102.660900000187,31.90508599970809],[102.66186599993453,31.903974999943728],[102.66220599969314,31.903572999954225],[102.66231600019633,31.903191999942706],[102.66224800042428,31.902884000215675],[102.66154899974211,31.901114999906667],[102.6610609998455,31.89980000032877],[102.66054199998673,31.898851000062088],[102.6598509997005,31.897829000214863],[102.65971400033145,31.89754899979148],[102.65943200029916,31.896970999683205],[102.65968400019425,31.895603000206098],[102.65980600039296,31.89502799972492],[102.65965300023208,31.893713000142036],[102.65947400013195,31.89225100035206],[102.65955399959957,31.89159699995108],[102.66040100041971,31.88976300037604],[102.6614270004417,31.888408999921772],[102.66255999969547,31.88742800012463],[102.66334600041625,31.886159000028403],[102.663392000447,31.884788000120906],[102.66304099991942,31.883476000013],[102.66355599958024,31.881870999979135],[102.66428100020165,31.88066300032506],[102.66520799959109,31.879793000243517],[102.66613099968092,31.878871999781964],[102.66651999984332,31.877553000355444],[102.66650099957674,31.876185000005915],[102.66695099983855,31.874982000280195],[102.66727200022892,31.873891000297125],[102.66711099967213,31.87200399980528],[102.66648999970612,31.870972999788542],[102.66600099998456,31.869722000098992],[102.66565000035527,31.86875300011352],[102.66556599979138,31.86766699974677],[102.6660169998781,31.86640100037528],[102.66660799970688,31.86508399984214],[102.66651999984332,31.8641679999206],[102.6669740003031,31.86261900006731],[102.66740899959798,31.860500999999953],[102.66765299999541,31.85883799974878],[102.66764499959949,31.858433999790094],[102.66763799992681,31.85757499976961],[102.66782100022493,31.856427999765142],[102.668213999687,31.855397999797873],[102.66920600027208,31.854474999819185],[102.66960600030518,31.854355000162606],[102.67000999963791,31.854180000097333],[102.6714519995865,31.853323000027014],[102.67280300019678,31.85257799976993],[102.6735580000571,31.85407700024378],[102.67457599968317,31.85572300026699],[102.6752629997714,31.856970999846816],[102.67567899969804,31.85765600010267],[102.6760219998297,31.85828099988366],[102.67666999955992,31.860046000169458],[102.67739099998334,31.863013000005548],[102.67787899987998,31.864382000035857],[102.67814300036893,31.865068999807615],[102.67842500040123,31.865928000190923],[102.67843999957152,31.866784999823622],[102.67838699986808,31.867812999627365],[102.67792599973565,31.868732999845893],[102.6771399999132,31.870112000349522],[102.6768880000181,31.871322999915368],[102.67711700034697,31.872694000348],[102.6776050002436,31.874290999981874],[102.67830300020249,31.875659000227643],[102.67865399983177,31.876743000082023],[102.67880699999264,31.877887000359006],[102.679633999823,31.879367000247736],[102.67991699968023,31.880335999987658],[102.67926399992713,31.88188700035318],[102.67868499979392,31.883492000108276],[102.67870800025845,31.884749999662006],[102.67892099979548,31.88583600005471],[102.67924899985853,31.886853999665938],[102.67901299985698,31.88749399995604],[102.67836400030185,31.888869999744006],[102.6777039999778,31.89002700035127],[102.67665100019164,31.891234999989738],[102.67592300009551,31.892555000179186],[102.67554900000168,31.894276000256447],[102.67542699980294,31.89524999964524],[102.67571700023119,31.89638799966763],[102.67619699973189,31.897242999961904],[102.67702500028544,31.898379999909288],[102.67777699977272,31.89940199974055],[102.67812800030033,31.90037099993206],[102.67841799983022,31.901624999976253],[102.67836400030185,31.902603000117814],[102.67790599964414,31.903180000150908],[102.67703299978307,31.903815999924397],[102.67590800002687,31.904796999748942],[102.67577800033055,31.905257999875776],[102.67585399960022,31.905657000073237],[102.67599900026349,31.90674300019138],[102.67615900009703,31.908228000184046],[102.6763380001972,31.910059000305633],[102.67641500019008,31.910570000090246],[102.67629299999133,31.911259000238957],[102.67596800030134,31.912289000250205],[102.67537300027459,31.913383000376918],[102.67506000028015,31.91476099989784],[102.67493100040872,31.91585100022504],[102.67494200027936,31.91671799997835],[102.674945999579,31.91693899978965],[102.67509899973986,31.918140000353198],[102.67510999961053,31.919030000291336],[102.6751139998085,31.919110999962673],[102.6753959998408,31.92008000001728],[102.67561000010105,31.921218000288295],[102.67536599970357,31.92259599985993],[102.67477099967684,31.92362899973771],[102.67431700011538,31.92460500019112],[102.67392799995295,31.92558199974645],[102.67368399955548,31.927239999631],[102.67356899992775,31.928393000140083],[102.67365299959334,31.929765999894144],[102.67373700015726,31.931195000024104],[102.67382900021877,31.932566000158083],[102.67417900002312,31.93376599997771],[102.67473300004198,31.934676000070667],[102.6755570003976,31.935756999657652],[102.67631599955756,31.93700900032871],[102.67673499985722,31.938093999860765],[102.67743299981615,31.939401999823318],[102.67805899980505,31.940995999747958],[102.67883299993194,31.942878000243283],[102.67979500037978,31.944473000203498],[102.68041700017073,31.945495000214905],[102.68050000001139,31.947092999954425],[102.68072900034028,31.948923999977836],[102.68108800036548,31.95034800008668],[102.68184700042374,31.951602000211864],[102.6823579998866,31.952689999755925],[102.68270900041419,31.953829000335194],[102.68299499974614,31.9551420003526],[102.68281599964601,31.956628999967233],[102.68270100001827,31.958005000029452],[102.68297999967753,31.959322000336368],[102.68326199970983,31.96034900021022],[102.68388000020111,31.961483999873913],[102.68497499982006,31.962619999897733],[102.6863149996614,31.963614999719113],[102.68706200002411,31.964291999979633],[102.6871459996897,31.96583200019425],[102.68683299969527,31.9672670002857],[102.68678800038774,31.968754000186124],[102.68654300016536,31.970242000212135],[102.68577999990912,31.971419999828942],[102.68457800016003,31.972404000199283],[102.68343699961203,31.972871999796364],[102.68216700009089,31.973167000197034],[102.68102600044116,31.973579000138475],[102.67986700034982,31.973876999909113],[102.67881000036571,31.974398000147335],[102.67764700007639,31.975324000262734],[102.67683399959141,31.976475999654387],[102.67673499985722,31.977912999718843],[102.67649899985567,31.97935000014198],[102.67656699962775,31.980262999707044],[102.67698299955434,31.981292999892418],[102.67722000027914,31.98254700032174],[102.67736500004406,31.98357700001329],[102.67736400021916,31.98449200029026],[102.67699099995026,31.9857560000365],[102.67636099976342,31.98736299994857],[102.67597199960097,31.988453999766044],[102.67564400043625,31.98966000012659],[102.6755149996665,31.990743999795022],[102.67556800026826,31.991717999712108],[102.67556800026826,31.99297900020639],[102.6756750003984,31.993947999888743],[102.67606399966249,31.995489000297013],[102.67670499972,31.99703199978064],[102.67665899968925,31.99794500012295],[102.6763390000221,31.998579000316393],[102.67574300017044,31.99909999970318],[102.67507600017365,31.999677000380146],[102.67484299964683,32.00004600029722],[102.6747549997833,32.00018099976585],[102.67343199966041,32.001180999656526],[102.67222999991132,32.00239900005017],[102.67205500000914,32.00258800034228],[102.67054799976324,32.00398699977583],[102.66931599987696,32.00584299976031],[102.66829400005295,32.00797699995192],[102.6680799997927,32.00957499985282],[102.66872099985021,32.01093499981669],[102.6703040002641,32.01205400014095],[102.67167400024266,32.01288799972849],[102.67250899957058,32.014019999721896],[102.67301300025908,32.01509800027189],[102.67355300003422,32.01672300004919],[102.67380900012726,32.01872199964661],[102.67385500015803,32.02032399972311],[102.67377899999006,32.022567999707476],[102.67344799955391,32.02396600034241],[102.67248600000437,32.025647000301696],[102.67144499991379,32.02692599963967],[102.67073899955894,32.02836499962778],[102.67085699955975,32.03019600031599],[102.67183400007622,32.03143999988442],[102.67281400006743,32.03285100018201],[102.67331000035998,32.03381900037024],[102.67334799999483,32.03501900016886],[102.67331799985759,32.03650999996831],[102.67276100036399,32.03841200032825],[102.67133000028605,32.04027000019666],[102.6696790001001,32.041441999961805],[102.66748099956797,32.04256899992124],[102.66521900036004,32.043524999671895],[102.66355999977817,32.04435700025634],[102.66162200043539,32.04519099966991],[102.66161879165318,32.04519365023855],[102.6502409997591,32.0474989998973],[102.63719299990169,32.047229000085665],[102.62688199962832,32.04256599976612],[102.62440100013727,32.03806599983736],[102.61396400036554,32.03784800017711],[102.60868100009479,32.039961000309994],[102.60046500042141,32.05313099989102],[102.59518100032574,32.05524399973979],[102.59505099973109,32.05968900028574],[102.58689600015704,32.07063600014042],[102.58676599956239,32.07508100020391],[102.58147999981692,32.0771929997732],[102.5787390000349,32.081583000296526],[102.57860900033855,32.08602800011623]]],"type":"Polygon"},"properties":{"code":"513233101","name":"刷经寺镇","cp":[102.61668800740293,31.972581499870266]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.007541999879,32.618424000067684],[102.0061989996646,32.61940800012594],[102.00470800021053,32.61931100013555],[102.00347600032424,32.618752000279954],[102.00215200037643,32.617869000309426],[102.00111799995855,32.61729699991274],[102.0007060002299,32.617198000098774],[102.00029399960295,32.617104000074754],[102.00005000010377,32.61689499980451],[101.99833000032086,32.61532999962895],[101.99581200012157,32.61343499988366],[101.9904490003832,32.61165700028405],[101.98882400013653,32.6103450002511],[101.98765599982433,32.60645900025964],[101.98722200035436,32.59810599979066],[101.98748099992213,32.593648000067084],[101.98875100034161,32.589762999919344],[101.98888900043386,32.58569399962455],[101.98893399974138,32.58438700029408],[101.98886199977136,32.58339099967469],[101.98830399955455,32.57574600011591],[101.98761399999154,32.571918000255856],[101.98813600022336,32.56728599980658],[101.98926600000239,32.56054000011569],[101.98992999962614,32.557159999875545],[101.98965199979179,32.55578499974042],[101.98622200027167,32.55408800010001],[101.98537899964948,32.55440999973881],[101.98380700000457,32.55491099984957],[101.98241799975943,32.55545500029838],[101.98188399983204,32.55563300027205],[101.97995399998683,32.5565310002431],[101.9771010000518,32.55843800012189],[101.97309900007116,32.56180699986596],[101.97246999970922,32.56241800019745],[101.97161500028977,32.56325500027752],[101.9691740000834,32.56586900010226],[101.96725900030683,32.567135000220254],[101.966412000385,32.56749900028995],[101.96416899964703,32.56759300012207],[101.96342100035773,32.5678680000156],[101.96323800005962,32.56802500032284],[101.96246399993272,32.5686760003283],[101.96204399980815,32.5687709997492],[101.9597249998005,32.57096699998651],[101.95909200013892,32.57141000022818],[101.95708100010283,32.57357699987013],[101.95508199976234,32.57535499967859],[101.95327054070371,32.57012656222263],[101.95326999991792,32.57012499969184],[101.95467000003369,32.56480599999259],[101.95587199978277,32.55880199989272],[101.95571100012428,32.553310999950845],[101.95435799986416,32.54816900005775],[101.95229699959938,32.542390000120236],[101.95026399982201,32.53924400036677],[101.94824600011324,32.535999999744575],[101.94614399984059,32.53166399986675],[101.94281800007757,32.528920000368345],[101.93754599967745,32.52795299965394],[101.93378200024652,32.52613699976118],[101.9305279995552,32.52362199971693],[101.92943999960893,32.52064600017682],[101.92908899997964,32.516126999924566],[101.9291350000104,32.51150000035428],[101.92824999955543,32.50555199999405],[101.92777000005472,32.502505999763514],[101.92738000006739,32.500047000195416],[101.92701799966912,32.49777100005144],[101.92591899985223,32.49159299981916],[101.92508699999901,32.48479600018645],[101.92222999986602,32.476907999702384],[101.91964399989469,32.46942099981953],[101.91928900006747,32.464615000170554],[101.92049800038752,32.46203399995369],[101.92164200041027,32.45997700029198],[101.92170400033454,32.45609399988027],[101.92067400011462,32.45123000007585],[101.92018899969274,32.44791299968669],[101.92032699978498,32.44511499985417],[101.91938100012896,32.44191099973671],[101.91674099973093,32.43785000003877],[101.91302199960754,32.43431300024127],[101.90997700005187,32.43076300010215],[101.90903100039586,32.42767599974535],[101.90900899975624,32.42584499968102],[101.9103519999706,32.4234409997801],[101.91313600030865,32.421848000146255],[101.91507399965148,32.420295000126075],[101.91523000018539,32.419184000277895],[101.91558099981468,32.41670199979463],[101.91560799957884,32.41651800012432],[101.91492899988653,32.41452800011703],[101.91304400024715,32.413901999995595],[101.91040499967406,32.41068800026036],[101.90635400018792,32.40755000004312],[101.90258499983575,32.40584099963662],[101.89968500004508,32.405620000036244],[101.89608800012039,32.40607399996089],[101.89366199998264,32.40579400011353],[101.89136899991426,32.40362299971323],[101.88859200014723,32.40002399970153],[101.88507200021543,32.396994999667925],[101.88178699956197,32.39437700006284],[101.87976899985318,32.392436000316266],[101.8774609997162,32.38889099971489],[101.87501200001223,32.38743900018922],[101.87339099996352,32.3864740001372],[101.87291800013548,32.38619400019312],[101.8663219997876,32.38220299994486],[101.86316400025406,32.3810740000186],[101.86141299961068,32.37844700026899],[101.86084000022353,32.374198999625754],[101.86113099957835,32.3686730002158],[101.8617940002755,32.36392099984435],[101.86238599992919,32.35991600004182],[101.86191300010118,32.356318999696434],[101.85978700043738,32.35235300012472],[101.85608699968222,32.34744799968439],[101.85332499998378,32.343855000221204],[101.85190999979939,32.34123000029027],[101.85129999970403,32.338133000162934],[101.8509599999454,32.33577800031924],[101.85089499964805,32.33533299975479],[101.85108700016701,32.33367700034005],[101.85159799962987,32.33352700007635],[101.85425200027154,32.33400800029031],[101.85604200037469,32.33333299999418],[101.85699600042665,32.33297199974782],[101.86041400025118,32.32895899990505],[101.86165299981018,32.32428900022573],[101.85939099970396,32.3187799998475],[101.85642999981388,32.31312699997951],[101.85548400015787,32.3080440002092],[101.85621700027687,32.305811999693326],[101.86044000019048,32.30248300034957],[101.8636250003865,32.30014699988438],[101.86691400033962,32.29835899989828],[101.87155200035491,32.29880900005412],[101.87339099996352,32.29984899967858],[101.87502000040816,32.30077699980516],[101.8760229999656,32.301344000013856],[101.88000200038,32.30493199981654],[101.8829659997448,32.30932099975599],[101.88330899987649,32.31360700014083],[101.88499100002458,32.316702999855664],[101.88761999965362,32.31761799977815],[101.89171299987086,32.31640699986169],[101.89668999981984,32.31108199974459],[101.90061200033287,32.30810699999536],[101.90559400030472,32.30661400025981],[101.90894699983193,32.30574500002997],[101.91013000021275,32.30430299989334],[101.9132169996012,32.30376399995112],[101.91395700029122,32.30366700034941],[101.91671800016472,32.30375100031582],[101.91947300019046,32.30400800035316],[101.92287900031944,32.30417600033515],[101.92565199988853,32.30451999983267],[101.92862700002227,32.30532900012792],[101.93096600012139,32.30621900015318],[101.93246099977344,32.30711899989681],[101.93373899969049,32.3083759996378],[101.93480700044357,32.309274000151724],[101.935878999598,32.31053200026122],[101.93660400021939,32.31150399988377],[101.93703100001666,32.312313000076486],[101.937781999679,32.31321599962421],[101.93938500018439,32.31492000010634],[101.94024299997687,32.31582700035166],[101.94184499975901,32.317353000295164],[101.94344300024156,32.318697999764446],[101.94622400020653,32.32130399995553],[101.94665500020176,32.3215739996597],[101.94718900012914,32.32219899978044],[101.94909300003509,32.32353100032183],[101.95016500008784,32.32461500011577],[101.95144700020282,32.325779000195965],[101.9536900000425,32.32802099992798],[101.95785600005468,32.331346999965305],[101.96010599956699,32.33296000015857],[101.96080799972388,32.33340999998659],[101.96275000016296,32.33465000014853],[101.9648859998725,32.33572500003249],[101.9650199997668,32.33580400026237],[101.96669799971693,32.336800999658564],[101.96801400016714,32.337262000301585],[101.96839599975857,32.33747500029779],[101.97018800040983,32.33848700016202],[101.973729000258,32.33766199963181],[101.97616200006847,32.33898000013275],[101.97616256331214,32.33898064071596],[101.98097699963576,32.34446899976344],[101.98484899992006,32.34927700000184],[101.98724400009569,32.35340199971132],[101.99022400025233,32.35495499982936],[101.9956170001279,32.3538109998678],[101.99833699999354,32.351660999675374],[102.00005400030174,32.35023299988914],[102.00029399960295,32.35003000025067],[102.0005150004342,32.349961000228745],[102.00151100031893,32.34954600028429],[102.00291499973436,32.348555000053906],[102.00398299958916,32.347970000374126],[102.00478799967819,32.34750399992006],[102.00559299976722,32.34732399990655],[102.0064089997269,32.34771500036117],[102.0071679997852,32.34845499990321],[102.00820200020307,32.3491290002529],[102.00921999982914,32.349685999838286],[102.01045300043866,32.350186999730575],[102.01157099962383,32.350142999986],[102.0133220002672,32.34978200001442],[102.01486700014794,32.34941599974549],[102.01580899960601,32.34923500027198],[102.01668999986302,32.34934199963554],[102.01764800011297,32.349670000051994],[102.01887199960333,32.35029100035259],[102.01962700036194,32.35085000003471],[102.02106599993749,32.3516330000897],[102.02235899992314,32.35225399981472],[102.02339199961781,32.35259599994335],[102.02494499989449,32.352465999993555],[102.02642500037622,32.35198900003073],[102.02843499968904,32.351163000221504],[102.0299720000722,32.35017299971072],[102.03163199958064,32.34883599996909],[102.03281800033453,32.34733800036734],[102.033668999556,32.34577200033116],[102.0340429996498,32.34434299989058],[102.03455400001097,32.342847999650985],[102.03479800040846,32.341642000254694],[102.03505399960315,32.34043900018317],[102.035435000268,32.339515999738566],[102.03585500039257,32.33884900000689],[102.03646100028996,32.33832800017294],[102.03719400040899,32.337976999852444],[102.03779600010844,32.33796700011527],[102.03841100022665,32.33818799974121],[102.0395820000136,32.33908799982162],[102.04026800027692,32.33988100025853],[102.04117200010018,32.34101800034399],[102.0420039999534,32.34209700019645],[102.042968999876,32.343108999981624],[102.04420900015823,32.34406999969074],[102.04564699990884,32.3452549997067],[102.04680699982512,32.345981999993604],[102.04822299983442,32.347141000297185],[102.04945499972074,32.34803800015497],[102.05102999973869,32.34881899979921],[102.05251799971805,32.34931700001543],[102.0546199999907,32.34974699980389],[102.05719900028932,32.350062999912645],[102.05929999983876,32.350491999734615],[102.06138600021791,32.35090299981032],[102.06314100016093,32.351053000109545],[102.06510600016624,32.35131499974208],[102.06679599981192,32.351347999694106],[102.06820699979838,32.351101999692986],[102.06960299971622,32.35033399980867],[102.0707290001956,32.34923200034479],[102.0719950004171,32.34818699965238],[102.07306300027184,32.347714000115644],[102.07471500028274,32.347164000015496],[102.07598900000181,32.34674900014128],[102.07766000027924,32.34626600033735],[102.07914400006062,32.34601400010897],[102.08109700037038,32.34558400003197],[102.08337100017216,32.34469699988228],[102.08484300025798,32.344154999657796],[102.08675499966152,32.343310999677065],[102.08808199998238,32.34238000028718],[102.08914300016444,32.34139100036517],[102.08992899998694,32.340295000189265],[102.09057699971711,32.33867600037276],[102.09075199961931,32.33723900034321],[102.09059199978574,32.33548399968331],[102.09057699971711,32.33529899965072],[102.09081299971868,32.33380800036187],[102.0910040004127,32.33336200033414],[102.09152300027145,32.33213099995053],[102.0923690003684,32.330691999887385],[102.09334599998657,32.329134999729135],[102.09425400000777,32.32739799994257],[102.09495199996668,32.325503999947585],[102.0958059995612,32.3241790000865],[102.09678300007766,32.32273200002332],[102.09743900020379,32.32180600037067],[102.09896499981797,32.32041000018292],[102.10089600038641,32.319235000079715],[102.10276500013227,32.318347000004806],[102.10456899958075,32.31763300009807],[102.10644599972251,32.317091000270416],[102.10798700030362,32.31672499988841],[102.10952399978845,32.3161879998745],[102.11079000000994,32.315489000324995],[102.11185100019202,32.31450100025669],[102.11249600044748,32.3132879999296],[102.1130680000097,32.311508000188724],[102.11323600023917,32.309788999961256],[102.11291499984881,32.307494999676436],[102.11282399961222,32.306125999925655],[102.11292999991743,32.3047480003427],[102.1134420001035,32.30365199999471],[102.11423358026052,32.30272765794833],[102.11423499959866,32.30272599966163],[102.11523399985646,32.30219200015668],[102.11697799992882,32.30160300003506],[102.11832100014318,32.30152600033179],[102.12034999972262,32.301837000250366],[102.12236400013172,32.30248200036353],[102.12310800012142,32.30273400028721],[102.12448599959755,32.30320900019351],[102.12503499959355,32.303372000257326],[102.12631699970858,32.303747999640436],[102.1284800000806,32.30422900010662],[102.13023800039666,32.30465899997209],[102.13172200017804,32.304921000267036],[102.13272899993346,32.30478800029314],[102.13406100027716,32.304192999778145],[102.13503299987246,32.30262899970816],[102.13620100018467,32.30038500009915],[102.13729599980363,32.298306999763255],[102.13840200019152,32.296285999704835],[102.13937399978683,32.294042000238726],[102.14000800017163,32.29185699993547],[102.14078200029853,32.29052700018311],[102.14143800042466,32.28977400015118],[102.1423649998141,32.28917999992815],[102.14337199956952,32.289052999683676],[102.14472599965454,32.28960200030024],[102.14596599993678,32.29090100022735],[102.14681299985861,32.29276999999465],[102.14711800035545,32.29454000031539],[102.14734000011327,32.296021000092146],[102.14749999994687,32.297509000257755],[102.14793099994209,32.298814000186745],[102.14854799971015,32.30037500000697],[102.14918100027006,32.30173600012768],[102.14973500028893,32.30264500021642],[102.15049699982193,32.30360599970136],[102.15153899973743,32.30501999996104],[102.1530379995874,32.306025000027674],[102.15452999976469,32.30674499995336],[102.15662399964144,32.30733499999323],[102.15824499969018,32.30753300007218],[102.15999600033356,32.30773099971844],[102.16175499957623,32.30771899982122],[102.16343702128388,32.30742333491071],[102.162349999603,32.338907999762576],[102.16728100041954,32.34792999976488],[102.16666799995113,32.36571399998626],[102.17175399968005,32.37029000033684],[102.17668700014643,32.37931200017249],[102.17653399998557,32.38375799963739],[102.18887300001343,32.40631300030013],[102.18872099967747,32.41075900003742],[102.19119000037125,32.415269999908496],[102.19103800003528,32.41971699991332],[102.18279300004956,32.43063900016145],[102.18149599986594,32.468434000218984],[102.19153099995478,32.482031999729095],[102.1992479998609,32.486671999873636],[102.19902000025526,32.49334199977785],[102.20396399969397,32.50236399999247],[102.20384600238813,32.53572099967242],[102.20148099965479,32.535300999932694],[102.19876900018511,32.53471899981657],[102.19557999979108,32.53453399993052],[102.19350099998297,32.53497100016584],[102.19243700032615,32.53561999976651],[102.1914559996117,32.53677899986081],[102.1898849997917,32.539213000259195],[102.18819000012311,32.54192399967817],[102.18661500010516,32.54407000007191],[102.18563099991596,32.546298999635304],[102.18365099984204,32.54821899963561],[102.18225099972625,32.54870499968473],[102.18056100008056,32.5486210003785],[102.17887499973452,32.54836199994036],[102.17670499968978,32.54765199991265],[102.17500699964815,32.54728399989218],[102.17366099995904,32.54725300028866],[102.17234500040716,32.54748299970577],[102.1705939997638,32.547570000223935],[102.16850699955974,32.54754700010381],[102.16566899969334,32.54725699999384],[102.1629069999949,32.54730000022073],[102.16006099973258,32.54761899983455],[102.15750499989848,32.54771900033224],[102.15461000013065,32.548108000232155],[102.15233600032886,32.54883199991994],[102.15054700005064,32.55030000007209],[102.14895699996406,32.55152599983523],[102.14706099955573,32.55279900034975],[102.1451499999771,32.554724000235076],[102.14349100029352,32.555948999934124],[102.14127400039314,32.556615999919],[102.13979800010937,32.55675599987778],[102.13852000019232,32.556892999782825],[102.13671599984549,32.55760999996956],[102.13524700013271,32.5586590003211],[102.1332519999902,32.56011800031495],[102.131317999947,32.56106899976265],[102.1297689998683,32.561553000351374],[102.12782700032756,32.56215300012848],[102.12580899972045,32.56235899972981],[102.12503899979151,32.56229000012184],[102.12418799967172,32.56221599977008],[102.12316599984771,32.56160400018937],[102.1231010004487,32.561553000351374],[102.12239500009389,32.56102399977237],[102.12150600033924,32.56052799974687],[102.12021699965322,32.56014699969557],[102.11880200036713,32.56010900037468],[102.11697799992882,32.5603659999108],[102.1146399996546,32.561091000052535],[102.11249999974713,32.56210000032359],[102.10980699964564,32.56328300003214],[102.10659899988339,32.56486900004256],[102.1033829997252,32.56611500026794],[102.10129999971912,32.566840000134654],[102.09847699992136,32.56745000017732],[102.09557100028287,32.56744000013558],[102.09259899962383,32.56736899973163],[102.08954700039551,32.566837999961365],[102.08614799993923,32.56591399993367],[102.08324399995058,32.56494800025897],[102.08086399984356,32.56423299988664],[102.07909399983191,32.563686000048165],[102.07664900032589,32.56297399984954],[102.07405900015661,32.56203599970323],[102.071411000261,32.56152100023031],[102.06937799958531,32.56143200007037],[102.06661199968892,32.561695999853555],[102.06412100015214,32.56241300027479],[102.06136299975336,32.563196999730465],[102.05983799996412,32.563236000141636],[102.05840699988619,32.562849000203464],[102.05650399980514,32.562473000085106],[102.05434100033145,32.56244799972735],[102.05252100009109,32.56250399973159],[102.05219300002803,32.564139000319194],[102.05142999977178,32.566593000353606],[102.05066400004081,32.56917199997321],[102.04948900005591,32.57207700034384],[102.04839400043697,32.57390600002485],[102.04739799965391,32.575125999777036],[102.04603199987329,32.57671999988873],[102.0445249996274,32.57871399966569],[102.04356800010069,32.580077000338484],[102.04321699957312,32.58150600021847],[102.04347600003919,32.58298900029826],[102.0436590003373,32.58339099967469],[102.04409100015744,32.58431700033089],[102.04422400022682,32.58553699997364],[102.04427399955723,32.585980000142854],[102.04419800028757,32.58763499978451],[102.04363699969768,32.589472000190554],[102.04266699975223,32.59174600006811],[102.04190799969392,32.59311600020635],[102.04060800003555,32.59516600013199],[102.03911300038354,32.596706999844805],[102.03733499997598,32.59823599967991],[102.035836000126,32.59937000014543],[102.03505000030351,32.60049000013892],[102.03354399988253,32.602420000343244],[102.032105000307,32.6041240003667],[102.03080499975033,32.605492000366155],[102.02929800040273,32.6075369997076],[102.02779899965442,32.60896500027536],[102.02596000004581,32.61010199994401],[102.02391899987252,32.61088800004919],[102.02205699979936,32.61119399977258],[102.02104599984601,32.611481999803395],[102.01914199994006,32.61203100003945],[102.01709800029202,32.61258800033054],[102.01543799988526,32.6131369998395],[102.01365700000295,32.613744999750665],[102.01149799982889,32.61439900009426],[102.00953000034883,32.616280000324544],[102.007541999879,32.618424000067684]]],"type":"Polygon"},"properties":{"code":"513233203","name":"查尔玛乡","cp":[102.05164640151992,32.45423049990481]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.77503299980334,33.326246000184724],[102.77321699976096,33.326641000107365],[102.77161499997882,33.326529000128744],[102.77027199976442,33.32635300008592],[102.76879200018101,33.325730000071985],[102.76765499983094,33.32499799981976],[102.76651900020411,33.32443300013734],[102.76544299995344,33.32431899994988],[102.76396300037004,33.324430999766584],[102.76235300019194,33.3246539999113],[102.76120800034428,33.32448100001362],[102.75961400005973,33.32396999978558],[102.75820200024842,33.32306199982746],[102.75646300019889,33.322215999746874],[102.75518899958148,33.321368999865655],[102.75357900030171,33.32013100031358],[102.75217499998799,33.31933700024006],[102.75136599970098,33.31899899974013],[102.75003099988253,33.31851599998686],[102.74948600008449,33.31831700003111],[102.74822999990874,33.31805099996163],[102.74767699971477,33.317928999855766],[102.74519399967559,33.31809199966969],[102.74263799984152,33.31836899979179],[102.74041400026843,33.3184170000053],[102.73806400029864,33.31829999981388],[102.73632100005119,33.31761600011375],[102.7357860002989,33.316940000219965],[102.73513799967039,33.315985999625546],[102.73487099970669,33.31468699971999],[102.73474100001036,33.313389999849626],[102.73447400004667,33.312880999791794],[102.73448200044258,33.31152800019204],[102.73421499958056,33.31040200033325],[102.73341799988745,33.30802900008393],[102.73222000033633,33.3053739997026],[102.73088100031991,33.302659999820364],[102.72887100010875,33.299107000362746],[102.72739800019804,33.29633999970058],[102.72560200024712,33.29312900028161],[102.72419399973542,33.291320000092185],[102.72222600025538,33.28863000000148],[102.72142100016636,33.287723999662475],[102.72007799995197,33.2871009999506],[102.71832700020691,33.28697900009738],[102.71590799974186,33.28691300003184],[102.71314299967038,33.2875239997889],[102.71092599976997,33.28802199966007],[102.70920599998705,33.288550999807555],[102.7071199996079,33.289160999896005],[102.70496100033213,33.289485999931486],[102.70260700016442,33.28964599972379],[102.70051999996036,33.28941300028075],[102.69890700030756,33.289293999793465],[102.69691499963974,33.2888029997012],[102.69517200029061,33.28812199983435],[102.69302399998719,33.28726700027714],[102.69140999961115,33.28674900026722],[102.68891599970135,33.28673600012164],[102.68608500040592,33.28706400014242],[102.6835749997043,33.28758700019649],[102.68115299976449,33.28797100005266],[102.67939799982143,33.28841299991501],[102.67770800017577,33.28891699977161],[102.67629299999133,33.2896380003043],[102.67467899961534,33.28996599993008],[102.6726009996321,33.28974799995451],[102.67098299995641,33.289120000101285],[102.66716099990086,33.28769300000493],[102.66325900037764,33.286830999812615],[102.66054199998673,33.286334000150156],[102.65751999999729,33.285643000245116],[102.65523199995178,33.284505999684924],[102.65423199986908,33.28342800011559],[102.65368700007107,33.28258899976212],[102.65368700007107,33.28100399980156],[102.65403400040071,33.27982700030489],[102.65437800035727,33.27836500014547],[102.65505700004962,33.27650199969339],[102.65586899981133,33.274586999742155],[102.65621299976793,33.27278599995639],[102.65723100029231,33.2716569997276],[102.65825300011632,33.27037899985502],[102.65946200043639,33.269422000166614],[102.66074799985103,33.26808000000613],[102.66125099981629,33.2668739996745],[102.6612590002122,33.26568599965676],[102.66076299991967,33.264524000156726],[102.65976000036223,33.26367500009708],[102.6588210003789,33.2630489999723],[102.6575429995635,33.26248199978487],[102.65640299973873,33.26179500023018],[102.65512499982167,33.26116999993681],[102.65290799992128,33.25986000026255],[102.64961599959511,33.25765199979658],[102.64722499961748,33.25630499987768],[102.64494699961772,33.25499500011823],[102.64320000007058,33.25385800008449],[102.64112100026247,33.25215700033212],[102.64103699969856,33.25206300036259],[102.64005300040769,33.250968999993184],[102.63933199998425,33.25004099993615],[102.63904999995195,33.249669999691484],[102.63885099976031,33.24898799967482],[102.63878999966094,33.2479739999806],[102.6389960004236,33.246733000322344],[102.63927099988489,33.24527900032245],[102.6395460002445,33.24386500022204],[102.6392790002808,33.24335700031374],[102.63853899959078,33.24273400035053],[102.63766499990476,33.242501999685494],[102.63719999957435,33.24216199980065],[102.6363869999877,33.24159700007253],[102.63586099955793,33.241041999842814],[102.63518900043663,33.24007800016316],[102.63453800033338,33.23883200015114],[102.63387399981133,33.23742000031671],[102.63340900037922,33.236406000168834],[102.63213099956387,33.234704000298564],[102.63140599984078,33.23312499983352],[102.63093700021071,33.23166099995745],[102.63060900014763,33.229964000109355],[102.63034899985665,33.2280420000563],[102.63013499959642,33.22630500007666],[102.62960800024004,33.22483799965883],[102.6290709999396,33.223141999904946],[102.62840700031589,33.22167199984157],[102.62743099962431,33.21942000014006],[102.62656500033421,33.217497000344274],[102.62556600007642,33.21540400010205],[102.62502700012618,33.21451399988872],[102.62461500039753,33.21381700034279],[102.62415000006712,33.21286100012402],[102.62435599993144,33.211731999805735],[102.62482899975943,33.21066099991447],[102.6250229999282,33.21031500031074],[102.6253739995575,33.20970800016029],[102.62577799978853,33.208524999960424],[102.62586300017735,33.20785300014855],[102.62532900024995,33.207235000310895],[102.62503899982174,33.2070140001089],[102.62452400016092,33.206607000297],[102.62358600000249,33.20610099976095],[102.62349800013895,33.20607300019254],[102.62198000002238,33.20558199986235],[102.62030100024732,33.20501199996049],[102.6191570002246,33.204331000089525],[102.61755500044244,33.20336400034948],[102.61594500026436,33.20211799974145],[102.61381200002957,33.20030600010791],[102.61133599966308,33.19837900001295],[102.60933399984788,33.19651600005441],[102.60818999982511,33.19521699976752],[102.606583999845,33.19396800033723],[102.60463800010625,33.19299900003309],[102.60269999986512,33.19226399989025],[102.60035400009332,33.19151899980236],[102.59829399965346,33.19049300030615],[102.596341000242,33.189533000062404],[102.59460100036762,33.18873699965909],[102.59381899984477,33.188484999856136],[102.5921290001991,33.18793799993105],[102.58998500009365,33.18691600011427],[102.58790999958514,33.186125000191126],[102.5871089996941,33.18577899985171],[102.58589699989925,33.18502899997392],[102.5851110000768,33.18466300017431],[102.58335600013378,33.183833999628966],[102.5818070000551,33.18276199986865],[102.58047499971134,33.181463000094766],[102.57947600035187,33.180160000024784],[102.57875099973046,33.17874899993489],[102.57835499989534,33.177395999870804],[102.57816400009962,33.17621599998523],[102.57797300030393,33.17451800023498],[102.57771399983781,33.17299699969021],[102.57731700017779,33.171699999637895],[102.57664599998306,33.17029599993154],[102.57577599959669,33.16905299986968],[102.57555499966377,33.16877599990006],[102.57504699967566,33.16815000026548],[102.57351400038876,33.166904000275295],[102.57314000029497,33.166662999826485],[102.57128999991737,33.16547500031609],[102.56914599981192,33.16405799982717],[102.56747899973246,33.16298500014539],[102.56641099987768,33.161967999654415],[102.56507900043226,33.16094600001578],[102.56334700005547,33.159982000178594],[102.56174100007534,33.15958299995266],[102.56045599958728,33.15962300015141],[102.55764500038336,33.15990099990078],[102.55570299994426,33.16029500001057],[102.55409699996419,33.160518999821896],[102.55262499987838,33.16006299962956],[102.55182700036035,33.15932799994869],[102.55095699997398,33.15847699963849],[102.5492980002904,33.15666700023969],[102.54815699974239,33.15490099991684],[102.54682500029699,33.15303400021053],[102.54568899977185,33.151961000262084],[102.5444190002507,33.15105600004371],[102.54268299967593,33.150488000195494],[102.54101599959648,33.150486000353716],[102.53934199984427,33.150938999827524],[102.5378000003366,33.15155400037515],[102.53633099972552,33.152285999699046],[102.534856000165,33.15286799995593],[102.53231500039948,33.1537629999424],[102.53063999992408,33.1543279996347],[102.52970599996362,33.15460500012562],[102.52856899961357,33.154266999965635],[102.52710400009875,33.153477999954546],[102.52557400028664,33.15234699999369],[102.52511599962891,33.15189100017945],[102.52399099987274,33.150650000013336],[102.52302599995015,33.14898900032689],[102.52177099959931,33.14650400008975],[102.52117599957255,33.14453099967459],[102.52065300041414,33.14301000018619],[102.5200580003874,33.14159900015953],[102.51952799975965,33.1408639999557],[102.51826499991122,33.13968099983066],[102.51693400029072,33.13855000027389],[102.51561000034292,33.13691200005412],[102.51514500001248,33.13595000029044],[102.51448499968842,33.13442499984778],[102.51430899996133,33.13308500004625],[102.51351999976582,33.13116799998034],[102.51252800007903,33.12930400014548],[102.51119999993328,33.127833999804125],[102.50928199978362,33.12645099973826],[102.50741999971046,33.124869000090406],[102.50529200039685,33.123568999713186],[102.5034949997227,33.122495999840375],[102.50196900010853,33.12119700032405],[102.50084299962916,33.12024000008879],[102.50001900017185,33.11957100009691],[102.4993820003123,33.11905300003162],[102.49826900025171,33.11827499993645],[102.49754399963028,33.11777399985382],[102.49574699985448,33.11635999991164],[102.49395500010151,33.11477799980691],[102.49276099985005,33.113648999880695],[102.49116200044094,33.1118439997434],[102.49003699978647,33.11043499990958],[102.4877860004492,33.10637900022069],[102.4869360001543,33.10417599972706],[102.48654600016697,33.102595000044616],[102.48647800039491,33.101587999780065],[102.48696600029155,33.0990519996571],[102.4871110000565,33.09707899997844],[102.48704999995712,33.09600600014317],[102.48631699983812,33.093857999935544],[102.48600100036894,33.09120500026754],[102.48570300044312,33.08925399988818],[102.48517600018842,33.0872270000826],[102.48444800009229,33.08626599979563],[102.48364999967593,33.08587200006974],[102.48275000005066,33.0852509998407],[102.48258600001913,33.08513700010763],[102.48205200009174,33.084796000314476],[102.4813010004294,33.08332100030505],[102.48114800026852,33.08299400011413],[102.48061400034112,33.081639000363204],[102.48022500017868,33.0794929998852],[102.47964100002258,33.07785999990773],[102.47891200010156,33.07605799986879],[102.47819499987607,33.07385800031114],[102.47713899971687,33.07171199970694],[102.47615100022803,33.06945999969305],[102.47536500040556,33.06629899990047],[102.47516299984089,33.06411000003504],[102.47551000017052,33.06174299997746],[102.47592199989919,33.05976700022909],[102.47612799976352,33.05903199974208],[102.47607400023516,33.05650499988524],[102.47609000012865,33.05424199974102],[102.47598999967123,33.05170199977068],[102.47592899957186,33.050125999846166],[102.47554000030776,33.048372999648514],[102.47487999998368,33.047190999644094],[102.47455199992062,33.04594999995799],[102.47427800028424,33.04460599976522],[102.47428499995694,33.043364999800076],[102.47456000031654,33.04167200012618],[102.47483499977781,33.04038000024334],[102.47532620306677,33.03874964672291],[102.47532699987242,33.03874999990787],[102.48861499992935,33.044638999645755],[102.49365700017567,33.0447489999113],[102.49630900026926,33.040557999709065],[102.50141500008966,33.03854400023393],[102.54678900031197,33.039520999961375],[102.5518940003075,33.03750600004666],[102.55693599965548,33.037612999955144],[102.56204099965102,33.03559699998103],[102.5647520001941,33.02928100033883],[102.5623579998434,33.024980999674796],[102.56280200025742,33.010118999733955],[102.56790499970481,33.00810200023508],[102.57256600018461,33.02094799975619],[102.57748000038441,33.02530099998507],[102.58252099990752,33.02540700018944],[102.59543599969554,33.01505500016427],[102.59808100011642,33.010860999713515],[102.59845600003516,32.998123000093734],[102.6011630003803,32.9918059996968],[102.60632600010213,32.98766500014871],[102.60688599996877,32.96855699965646],[102.60952899984154,32.96436299969485],[102.62212200031261,32.96462400003406],[102.6323185561171,32.960586175664275],[102.63231899988483,32.96058600004589],[102.64005900025546,32.95437199986834],[102.64767499987924,32.95240400015372],[102.66530200020073,32.95276399993821],[102.67525400044892,32.95721400016075],[102.68508600014813,32.96590999965195],[102.68484599994864,32.974402999889314],[102.68982299989764,32.97662699967278],[102.70253799966913,32.97263400013344],[102.71003500036554,32.974908000187106],[102.71501300013942,32.97713100005532],[102.71975400008687,32.98784700011488],[102.72725300043311,32.99012000032909],[102.73229200030636,32.99021999996018],[102.73738999973088,32.98819599992347],[102.74529999998084,32.975604999716786],[102.74811100008304,32.965039000253356],[102.75320699985772,32.963014000146636],[102.75332400003359,32.9587680001749],[102.75841899998336,32.95674300031277],[102.76105400035851,32.952546000273145],[102.76608999985872,32.95264399967042],[102.7710109997312,32.95698799978203],[102.77581600015107,32.96557800004163],[102.78314200024492,32.97421699992647],[102.80329299971515,32.974604000016534],[102.82613399981207,32.968665999779134],[102.84124700013224,32.96895099963013],[102.84113400015437,32.97319700006989],[102.84354100002554,32.97749100007461],[102.84275500020308,33.007216999843614],[102.8451629998992,33.01151000031955],[102.84364800015568,33.06883999999917],[102.8460020003234,33.07525800023619],[102.85581099955813,33.08606299998923],[102.85564300022695,33.092433999881116],[102.86057699961991,33.096775000366634],[102.86298900041228,33.101068000320424],[102.86797899988177,33.10328500011545],[102.86764599979583,33.116025999663535],[102.8599640000498,33.120132999826325],[102.85732899967469,33.124333000252676],[102.8521700001508,33.12848499996107],[102.85161000028415,33.14972099999572],[102.8540220001782,33.154015000316036],[102.85626699966768,33.16467900018266],[102.86126100023343,33.16689700025913],[102.86103799975237,33.17539100002308],[102.85593199993194,33.17742100036876],[102.85329499990698,33.18162100005889],[102.8531269996775,33.18799199964272],[102.88052200012413,33.20337099970739],[102.8854630000881,33.2077120001137],[102.88787900018013,33.212005000113436],[102.8869979999231,33.24598399976756],[102.89194200026014,33.250323999964934],[102.89183199975696,33.254570999815854],[102.89677799974383,33.258911000222284],[102.90128600006277,33.28023999993852],[102.9062880001261,33.282456000159556],[102.9079640004264,33.29742700001929],[102.90574400015299,33.29826899995073],[102.90393200030854,33.29900399970941],[102.9017110002102,33.30012599998098],[102.89982700039575,33.30119399972027],[102.89808400014829,33.30187499966485],[102.89674000010898,33.302714000028516],[102.89512999993092,33.30367299968488],[102.89351300008015,33.30474399964376],[102.8923759997301,33.305305999979694],[102.89103300041403,33.30598199999126],[102.89002599976033,33.30609900019763],[102.88881300014059,33.30564400026514],[102.8867309999594,33.30547600031365],[102.88524299998008,33.305630999931864],[102.88396099986508,33.30625100015428],[102.88281699984233,33.30749200014216],[102.88188600025492,33.30923800004917],[102.88113899989217,33.31211200003087],[102.88066600006415,33.31436999989545],[102.88012399974086,33.316051000309045],[102.87870500025682,33.317912000313534],[102.8779649995668,33.31858900005287],[102.87682399991708,33.31943300032516],[102.87514599996696,33.320052999985734],[102.87503100033925,33.320091999783045],[102.87367300005624,33.320564999765764],[102.87332999992458,33.32062300031059],[102.8719110004405,33.3209370003642],[102.87043500015676,33.32138899976989],[102.8687560003817,33.321720000370355],[102.86700899993627,33.32183699972404],[102.86566999991987,33.32172299989381],[102.86472400026383,33.32155699983491],[102.86331999995011,33.32110200025453],[102.86104299977525,33.32026699985204],[102.85949399969653,33.31962799977367],[102.85788799971644,33.3190049997249],[102.8561410001693,33.31827499979755],[102.85406999985878,33.317372000014934],[102.85279899961444,33.31681299982268],[102.85125100025894,33.316189000017445],[102.84884299966454,33.31500399989317],[102.84680999988717,33.31425300027757],[102.84513199993705,33.313574000024175],[102.84264800007294,33.31284099982791],[102.84084399972612,33.312506000254906],[102.84084394672553,33.31250599575063],[102.8392989998454,33.31239400012849],[102.83788799985895,33.31245200010466],[102.8372850003346,33.31256200026419],[102.83634999965089,33.312731999964726],[102.83511399956663,33.312812999917426],[102.83398100031286,33.31292400031424],[102.83257000032641,33.312645000265356],[102.83082600025405,33.311794999851735],[102.82948700023762,33.31106800024379],[102.82814499984816,33.31033000013965],[102.82681300040275,33.30993599984158],[102.82593600034369,33.31027700011556],[102.82452799983199,33.31129200000602],[102.82358200017595,33.31242100022573],[102.82279600035349,33.313073999753456],[102.82232699982511,33.31369700015275],[102.82119000037338,33.314320999779454],[102.81944700012592,33.31521399973077],[102.81735999992186,33.31651100023892],[102.81628500039443,33.317190000136435],[102.81480800028572,33.31820200021918],[102.81346599989625,33.318992999754954],[102.81131799959283,33.31989900034614],[102.80942200008283,33.32060800025103],[102.80801500029432,33.321107000246286],[102.80600000006032,33.321445000077766],[102.80405500014648,33.321674000158005],[102.80238399986905,33.32183999999411],[102.80076700001828,33.321788999892696],[102.7986270001108,33.32167199972398],[102.79661900044778,33.321541000092836],[102.7949370002997,33.32142699987548],[102.79299200038584,33.32199099969245],[102.79110699984818,33.32277700022518],[102.78849400011268,33.32373900009745],[102.7866100002982,33.32407400003663],[102.78456900012492,33.32422699999275],[102.78275399990743,33.3247329996809],[102.78094200006298,33.32512500030034],[102.7791260000206,33.32546599970557],[102.77744700024554,33.32579900017243],[102.77503299980334,33.326246000184724]]],"type":"Polygon"},"properties":{"code":"513233204","name":"瓦切乡","cp":[102.68497870490992,33.13952250013054]},"type":"Feature"},{"geometry":{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[102.49630900026926,33.040557999709065],[102.49365700017567,33.0447489999113],[102.48861499992935,33.044638999645755],[102.47532699987242,33.03874999990787],[102.47532620306677,33.03874964672291],[102.47532699987242,33.03874699971867],[102.47573899960108,33.03711199963633],[102.47548699970598,33.03468399989877],[102.47528800041266,33.03350099983324],[102.47476600018086,33.032090000014975],[102.47423899992616,33.030962999981135],[102.4730229999334,33.02947200031724],[102.4716999998105,33.02777599971843],[102.47057400022942,33.02614400003298],[102.46937999997795,33.02495900011916],[102.46751500043007,33.0235469996264],[102.46618399991124,33.02280999991109],[102.4647300002671,33.02157100000949],[102.46379600030664,33.02099899970298],[102.46285300012534,33.019818000277574],[102.46252500006227,33.01908600019347],[102.46226499977129,33.01795699974493],[102.46207399997557,33.01660099963153],[102.46175000011048,33.01490699987428],[102.46143000044333,33.013101999898836],[102.4608350004166,33.010848999678224],[102.46054499998836,33.008845000260095],[102.46062100015635,33.006979999975464],[102.460956999717,33.005100000292124],[102.46103399970991,33.00335299984177],[102.46099600007506,33.00195600032361],[102.46098000018155,33.00138400009932],[102.46098000018155,33.000310999886615],[102.46098799967913,33.000177999694074],[102.46097699980848,33.000023000304296],[102.46079699988344,32.997642999665324],[102.45919900029924,32.99455700027357],[102.45841699977643,32.99257099994854],[102.45832499971493,32.99113899999033],[102.45877099977876,32.98901999992293],[102.4594279997298,32.987173999755136],[102.4602169999253,32.98497900031916],[102.46040799972101,32.98326299973028],[102.45991999982438,32.982016000020536],[102.45876400010607,32.98106399964844],[102.45734100042407,32.979944999875194],[102.45631500040207,32.97733400001429],[102.45624599990678,32.97343899973343],[102.45665799963544,32.97051299962675],[102.4571349996614,32.9671280001906],[102.45734100042407,32.96454900005887],[102.4577449997568,32.96351699966268],[102.45828299988213,32.96230200036688],[102.4588939998024,32.96074500011537],[102.4591680003371,32.959598000160724],[102.45869499961078,32.95891900029204],[102.4577449997568,32.95853799988001],[102.45625400030269,32.958110000136635],[102.45469400035334,32.957743999655754],[102.45333900044344,32.95691199987165],[102.45245399998842,32.9552669997591],[102.45190900019041,32.954078999829854],[102.45095500013844,32.95317900007942],[102.44911999982948,32.95258399985238],[102.44726199995429,32.95219100030065],[102.44448500018726,32.95139200035112],[102.44277999957463,32.95050900036823],[102.44154000019071,32.94892999997233],[102.44112400026413,32.94750299963138],[102.44049099970421,32.94517599980698],[102.43985800004263,32.941867000094874],[102.44004800001342,32.938832000306576],[102.44038399957407,32.93602399963781],[102.43972829499369,32.934196822634064],[102.46684699971004,32.91798499996286],[102.46808799981719,32.87794699971629],[102.4708620001095,32.873556000063495],[102.47113699957079,32.86465900021846],[102.47938699957939,32.85371199981261],[102.48479399969868,32.849378999771204],[102.49324500044703,32.8317579998922],[102.48865900031028,32.80940100020301],[102.4861620000274,32.804895000344786],[102.48643599966381,32.79599800025064],[102.48920499993324,32.79160800013374],[102.49454000008251,32.78949899989414],[102.49730900035196,32.78510800002185],[102.50271100044839,32.78077400017752],[102.50291499976458,32.77410200011542],[102.49798999969413,32.762866999710646],[102.49833000035107,32.75174599970841],[102.49091100037077,32.73600500000966],[102.49172899998031,32.70931699984443],[102.49449599970158,32.70492700012934],[102.52606100035835,32.705612999656935],[102.53408700006094,32.70133500015274],[102.53685100030751,32.69694399993735],[102.53172399967237,32.69238299991795],[102.52133899977918,32.68770699989537],[102.51634900030972,32.678697999847955],[102.51688800025997,32.66090600035049],[102.52254999974909,32.64767699989939],[102.52787400002771,32.64556700008753],[102.52800799992201,32.641119000235484],[102.53333200020062,32.639007999987705],[102.53609399989905,32.63461699969325],[102.54141700035278,32.632506999699224],[102.54417900005122,32.62811500021045],[102.54956799972884,32.62377999980486],[102.56027800021039,32.61733399968518],[102.56027895062795,32.61733342766429],[102.56546699987146,32.61966900017894],[102.57072300037802,32.619780999788595],[102.57348199970343,32.61538900004376],[102.57873700038506,32.61550000016734],[102.58412400041288,32.611163999905294],[102.59207200029766,32.6091059998483],[102.59726099995878,32.61143999966737],[102.60514400044455,32.61160499981802],[102.62324192189249,32.606778021045635],[102.62616399957791,32.61204399990777],[102.62590599983504,32.62093900032043],[102.62039199958562,32.62972499962597],[102.62013399984275,32.63862099968313],[102.6252620003028,32.64317800031052],[102.64084099987998,32.65017600007306],[102.6460990000364,32.65028399967215],[102.67213399965189,32.65971800032826],[102.6800210003356,32.65987800017425],[102.68496499977434,32.67110399977071],[102.68484000010085,32.67555199975846],[102.67657199965059,32.68873700016843],[102.67631999975553,32.697633000012225],[102.6841479999897,32.7000170003179],[102.69742500017603,32.69583400010416],[102.70262300005795,32.69816399978078],[102.7023729998127,32.70705999969367],[102.71246099960499,32.72283900013436],[102.7120260003101,32.738408999868504],[102.71453299974041,32.74290900033247],[102.71409900027045,32.75847899993467],[102.71654499960137,32.76520399991258],[102.72181000032879,32.76530899970729],[102.7269510003093,32.76986200000567],[102.75591099982982,32.77043200016433],[102.76356599981169,32.779483999657465],[102.77134399981715,32.784085999856046],[102.7762470001463,32.79753400002403],[102.77521899957621,32.83534800001575],[102.7804280002271,32.837675000039425],[102.78018600037775,32.84657199992657],[102.78509499965638,32.86002099993049],[102.78491399990641,32.86669399988988],[102.79491700020819,32.88691700025076],[102.79479699965928,32.89136599972504],[102.79731400003364,32.8958660003745],[102.79707399983413,32.90476400009668],[102.79161999985915,32.91133599991613],[102.78364699986001,32.913408000041485],[102.77825200033458,32.91775599983025],[102.76500299973739,32.919723999990495],[102.74917800011292,32.9194149997371],[102.74396500016236,32.9170869999642],[102.73869000028755,32.91698300001219],[102.73353900026127,32.91242999998657],[102.7231140001851,32.907772000072114],[102.71256500026034,32.907562999987654],[102.70735300013472,32.90523299985553],[102.68889399996004,32.904862999715505],[102.6732619997811,32.897870000048385],[102.66290600020021,32.8909820003087],[102.6523599997502,32.890766999947985],[102.64959600040197,32.89516199997895],[102.64425799987961,32.8972780000953],[102.63609099971171,32.906014000179184],[102.62811500023783,32.908075000032966],[102.617306999847,32.91675400030336],[102.6145400001257,32.92114800023959],[102.61427999983472,32.9300460001063],[102.61942599983811,32.934604999993624],[102.62463700013885,32.936938000331196],[102.62437799967273,32.945836000368494],[102.6323185561171,32.960586175664275],[102.62212200031261,32.96462400003406],[102.60952899984154,32.96436299969485],[102.60688599996877,32.96855699965646],[102.60632600010213,32.98766500014871],[102.6011630003803,32.9918059996968],[102.59845600003516,32.998123000093734],[102.59808100011642,33.010860999713515],[102.59543599969554,33.01505500016427],[102.58252099990752,33.02540700018944],[102.57748000038441,33.02530099998507],[102.57256600018461,33.02094799975619],[102.56790499970481,33.00810200023508],[102.56280200025742,33.010118999733955],[102.5623579998434,33.024980999674796],[102.5647520001941,33.02928100033883],[102.56204099965102,33.03559699998103],[102.55693599965548,33.037612999955144],[102.5518940003075,33.03750600004666],[102.54678900031197,33.039520999961375],[102.50141500008966,33.03854400023393],[102.49630900026926,33.040557999709065]]],"type":"Polygon"},"properties":{"code":"513233100","name":"邛溪镇","cp":[102.63374746802602,32.82576351047847]},"type":"Feature"}],"type":"FeatureCollection"}';const NZe={class:"pasture-management"},kZe={key:0,class:"pasture-map-loading"},FZe={class:"pasture-management-ui"},OZe={class:"pasture-left"},BZe={class:"pasture-side-stack is-left"},zZe={class:"pasture-right"},GZe={class:"pasture-side-stack is-right"},UZe={class:"pasture-map-layer-tools"},Bf=398,zf=190,VZe=12,HZe={__name:"index",emits:["module-stats","loading-progress","map-ready"],setup(n,{emit:e}){const t=e,i=zf*2+VZe,r=Wt(null),a=Wt(!1),o=Wt(CT),s=Wt(kp),l=Wt(""),u=Wt(""),c=["牧户数量","户均牦牛头数","户均草地面积","联户数量"];let d=null,h=!1,f=!1,p=0;const m={513233100:"邛溪镇",513233101:"刷经寺镇",513233103:"安曲镇",513233105:"龙日镇",513233200:"安曲镇",513233201:"龙日镇",513233202:"江茸乡",513233203:"查尔玛乡",513233204:"瓦切镇",513233205:"阿木乡",513233206:"壤口乡",513233207:"麦洼乡",513233208:"色地镇"},v={安曲乡:"安曲镇",龙日乡:"龙日镇",瓦切乡:"瓦切镇",色地乡:"色地镇"},g={"4028abc18eecd2af018eecdc44b7086b":"瓦切镇","402881828b486d54018b48741f590270":"查尔玛乡","402881828b486d54018b48740ed7024a":"麦洼乡","402881828b486d54018b48732e1c0044":"安曲镇","4028abc18eec9b97018eeca1538900db":"瓦切镇","402881828b486d54018b48740fb1024c":"安曲镇"},_={尼尕尔让:"瓦切镇",更迫尕:"查尔玛乡",王西卓玛:"麦洼乡",扎花克周:"安曲镇",恰波:"瓦切镇",热布丹:"安曲镇",求甲:"阿木乡",罗尔旦:"阿木乡",扎尔江:"阿木乡",达尔基:"阿木乡",尼科:"瓦切镇",班洛:"阿木乡",拉木共:"阿木乡",尕尔玛:"瓦切镇",尕尔丹:"安曲镇",泽旺甲:"瓦切镇",阿尕:"安曲镇",陈理:"瓦切镇",贡秋卓玛:"阿木乡",更多:"瓦切镇",阿泽:"瓦切镇",达勒错:"色地镇",泽朗罗日:"安曲镇",仁青:"瓦切镇",贡多:"阿木乡",泽周:"刷经寺镇",泽科:"瓦切镇",扎巴:"阿木乡",泽真:"瓦切镇",索拉姐:"瓦切镇",尕让罗周:"瓦切镇",尕让拉姆:"瓦切镇",更让尼玛:"阿木乡",向秋卓玛:"瓦切镇",东科:"阿木乡",扑瓦甲:"阿木乡"},S=Re(DZe),x=Ye(()=>{const _e=B3("grassland","grassland-distribution");return _e?[tn(wt({},_e),{name:"草场边界",legends:[{name:"草场边界",fillColor:"#1D953F",strokeColor:"#1D953F"}]})]:[]}),A=Ye(()=>l.value&&x.value.find(_e=>_e.key===l.value)||null),C=Ye(()=>{var _e;return(((_e=A.value)==null?void 0:_e.legends)||[]).find(ze=>ze.key===u.value)||null}),M=Ye(()=>{var ze;const _e=A.value;return _e?(ze=C.value)!=null&&ze.cqlFilter?tn(wt({},_e),{cqlFilter:C.value.cqlFilter,activeLegend:C.value,name:C.value.name||_e.name}):_e:null}),I=Ye(()=>_t(o.value.core).length?_t(o.value.core):Wte),D=Ye(()=>Ue(o.value.distribution).length?Ue(o.value.distribution):rL),E=Ye(()=>xt(o.value.online).length?xt(o.value.online):$te),P=Ye(()=>Bt(o.value.age).length?Bt(o.value.age):bXe),F=Ye(()=>Ce(o.value.age).length?Ce(o.value.age):Yte),V=Ye(()=>Vt(s.value).length?Vt(s.value):xXe),G=Ye(()=>Zt(s.value).length?Zt(s.value):wXe),W=Ye(()=>({title:"牧户分布排行",metricLabel:"牧户",unit:"户",hideMapLabels:!1,hideTownNames:!1,showBars:!1,showPointMarkers:!1,rows:(D.value.length?D.value:TXe).slice(0,8).map(_e=>({name:_e.name,value:Number(_e.value)||0,unit:_e.unit||"户"}))})),Y=Ye(()=>({key:"pasture-town",type:"bar",variant:"distribution",rows:D.value})),Q=Ye(()=>({key:"pasture-grassland-area",type:"heat",rows:V.value})),K=Ye(()=>({key:"pasture-season",type:"stackColumn",segments:[{key:"summer",name:"夏草场"},{key:"winter",name:"冬草场"}],rows:G.value.slice(0,7)})),ae=Ye(()=>({key:"pasture-online",type:"line",rows:E.value})),ie=Ye(()=>({key:"pasture-age",type:"column",variant:"slim",rows:P.value})),he=Ye(()=>({key:"pasture-gender",type:"donut",rows:F.value})),Ee=Ye(()=>({key:"pasture-herdsman-list",type:"projectTable",searchPlaceholder:"搜索牧户 / 乡镇",emptyText:"无匹配牧户",searchKeys:["name","township","id","grasslandArea"],columns:[{key:"name",label:"牧户名称",field:"name",width:"30%"},{key:"grasslandArea",label:"草场面积",field:"grasslandArea",width:"28%",align:"right",strong:!0,format:"number",unit:"亩"},{key:"township",label:"区域",field:"township",width:"24%"},{key:"locate",label:"定位",field:"locateText",width:"18%",align:"center",fallback:"定位"}],rows:s.value}));dl(()=>{Ft(),Ae(),He()}),Bl(()=>{var _e,ze;f=!0,(ze=(_e=r.value)==null?void 0:_e.destroyMap)==null||ze.call(_e)});function He(){return rn(this,null,function*(){try{const _e=yield yXe();if(f)return;o.value=wt(wt({},CT),_e),Ft();const ze=We(_e.list);s.value=ze.length?ze:$e(kp),xe(s.value)}catch(_e){o.value=CT,s.value=$e(kp)}})}function xe(){return rn(this,arguments,function*(_e=[]){const ze=++p,Qe=(Array.isArray(_e)?_e:[]).filter(ft=>(ft==null?void 0:ft.township)==="--"&&Ln(ft)).slice(0,80);if(!Qe.length)return;const At=yield Kt(Qe,5,ft=>rn(this,null,function*(){const en=Ln(ft);let we=[],Xe=null;try{we=Ot(yield bM(en))}catch(Fn){we=[]}let Pt=wn(ft,we)||Be(ft,ft.name,en);if(!Pt){try{Xe=yield gXe(en)}catch(Fn){Xe=null}Pt=bt(Xe)}const Rt=!!(en||we.some(an)||an(ft));if(!Pt&&!we.length&&Rt===ft.canLocate)return null;const Et={key:ft.key,id:ft.id,realPastureId:en,name:ft.name,township:Pt||ft.township,grasslands:we.length?we:ft.grasslands,canLocate:Rt,locateText:Rt?"定位":"--"};return Fe(Et,ze),Et}));if(f||ze!==p)return;const ke=new Map;At.filter(Boolean).forEach(ft=>{[ft.key,ft.id,ft.realPastureId,ft.name].filter(Boolean).forEach(en=>{ke.set(String(en),ft)})}),ke.size&&pt(ke)})}function Fe(_e,ze=p){if(!_e||f||ze!==p)return;const Qe=new Map;[_e.key,_e.id,_e.realPastureId,_e.name].filter(Boolean).forEach(At=>{Qe.set(String(At),_e)}),pt(Qe)}function pt(_e){_e!=null&&_e.size&&(s.value=s.value.map(ze=>{const Qe=[ze.key,ze.id,ze.realPastureId,ze.name].filter(Boolean).map(ke=>_e.get(String(ke))).find(Boolean);if(!Qe)return ze;const At=Qe.township&&Qe.township!=="--"?Qe.township:ze.township;return tn(wt({},ze),{township:At,grasslands:Qe.grasslands,canLocate:Qe.canLocate,locateText:Qe.locateText,searchText:[ze.name,At,ze.id].filter(Boolean).join(" ")})}))}function Ot(_e=[]){const ze=[];return(Array.isArray(_e)?_e:[]).forEach(Qe=>{const At=cn(Qe);At.length?ze.push(...At):Qe&&typeof Qe=="object"&&ze.push(Qe)}),ze}function bt(_e){const ze=Array.isArray(_e)?_e:Array.isArray(_e==null?void 0:_e.rows)?_e.rows:Array.isArray(_e==null?void 0:_e.list)?_e.list:Array.isArray(_e==null?void 0:_e.data)?_e.data:[_e];for(const Qe of ze.filter(Boolean)){const At=Array.isArray(Qe==null?void 0:Qe.fields)?Qe.fields:Array.isArray(Qe==null?void 0:Qe.children)?Qe.children:[],ke=Ht(Qe,["township","townName","town_name","areaName","area_name","fullName","full_name","address","牧场所在区域"]);if(ke)return zn(ht(ke));for(const en of At){const we=String((en==null?void 0:en.name)||(en==null?void 0:en.label)||(en==null?void 0:en.title)||"").trim(),Xe=Ht(en,["value","text","content"]);if(Xe&&/区域|地址|乡镇/.test(we))return zn(ht(Xe))}const ft=Object.entries(Qe||{}).filter(([en])=>/fullName|full_name|address|areaName|area_name|town/i.test(en)).map(([,en])=>en);for(const en of ft)if(en)return zn(ht(en))}return""}function ht(_e){const ze=String(_e||"").trim();if(!ze||ze==="--")return"";const Qe=ze.match(/([\u4e00-\u9fa5]{1,12}(?:镇|乡))/);return(Qe==null?void 0:Qe[1])||ze}function Kt(_e,ze,Qe){return rn(this,null,function*(){const At=new Array(_e.length);let ke=0;const ft=Array.from({length:Math.min(ze,_e.length)},()=>rn(this,null,function*(){for(;ke<_e.length;){const en=ke;ke+=1,At[en]=yield Qe(_e[en],en)}}));return yield Promise.all(ft),At})}function Tt(_e){return rn(this,null,function*(){var en,we,Xe,Pt,Rt,Et;if(!je(_e)){(we=(en=r.value)==null?void 0:en.focusPasture)==null||we.call(en,{name:_e==null?void 0:_e.name});return}const ze=Ln(_e);let Qe=[];if(ze)try{Qe=yield bM(ze)}catch(Fn){Qe=[]}const At=cn(_e),ke=Qe.filter(an),ft=ke.length?ke:At;if(!ft.length){(Pt=(Xe=r.value)==null?void 0:Xe.focusPasture)==null||Pt.call(Xe,{name:_e==null?void 0:_e.name});return}(Et=(Rt=r.value)==null?void 0:Rt.focusPasture)==null||Et.call(Rt,{name:_e==null?void 0:_e.name,grasslands:ft})})}function Ae(){var _e,ze,Qe;d=new am,h=!1,t("loading-progress",{progress:0}),(ze=(_e=d.instance)==null?void 0:_e.on)==null||ze.call(_e,"onProgress",(At,ke,ft)=>{t("loading-progress",{progress:Math.floor(ke/(ft||1)*100),path:At,itemsLoaded:ke,itemsTotal:ft})}),(Qe=d.ready)==null||Qe.then(()=>{h=!0,vt()}).catch(()=>{a.value=!0,t("map-ready")})}function Lt(){h&&vt()}function vt(_e=0){return rn(this,null,function*(){var Qe,At;if(f||!h||!d)return;yield Qs();const ze=r.value;if((Qe=ze==null?void 0:ze.loadMap)==null||Qe.call(ze,d),ze!=null&&ze.canvasMap){a.value=!0,t("loading-progress",{progress:100}),t("map-ready"),(At=ze.play)==null||At.call(ze);return}if(_e<24){window.setTimeout(()=>vt(_e+1),120);return}a.value=!0,t("map-ready")})}function Ft(){t("module-stats",{moduleKey:"pasture-management",items:k().map(_e=>({zh:_e.name,name:_e.name,value:_e.value,unit:_e.unit,decimals:Number.isInteger(Number(_e.value))?0:2}))})}function k(){const _e=new Map;return(Array.isArray(I.value)?I.value:[]).forEach(ze=>{!(ze!=null&&ze.name)||ee(ze.name)||_e.set(ze.name,ze)}),c.map(ze=>_e.get(ze)||jte.find(Qe=>Qe.name===ze||Qe.zh===ze)).filter(Boolean).slice(0,4)}function _t(_e=[]){return(Array.isArray(_e)?_e:[]).map((ze,Qe)=>{const At=ze.key||ze.id||ze.code||ze.name||ze.zh||`${Qe}`,ke=ze.name||ze.title||ze.label||ze.zh,ft=Ct(ke,At),en=Ht(ze,["value","num","count","dataValue"]);if(!ft||en===void 0||en===null||en==="")return null;const we=J(ft,en,ze.unit||ze.dw||"");return{key:At,name:we.name,value:we.value,unit:we.unit,icon:ze.icon||["town","area","yield","rate"][Qe%4]}}).filter(Boolean)}function Ct(_e,ze){const Qe=String(_e||ze||""),At=String(ze||"").toLowerCase();return/avg.*yak|yak.*avg|yak.*household|yak.*per|hjyak/.test(At)||/户均.*牦牛|牦牛.*户均/.test(Qe)?"户均牦牛头数":/avg.*grass|grass.*avg|grass.*household|grass.*per/.test(At)||/户均.*草地|草地.*户均/.test(Qe)?"户均草地面积":/income|revenue|人均收入/.test(At)||Qe.includes("人均收入")?"人均收入":/poverty|monitor|防反贫|监测户/.test(At)||Qe.includes("防反贫")||Qe.includes("监测户")?"防反贫监测户":/joint|union|link|联户/.test(At)||Qe.includes("联户")?"联户数量":/herdsman|muhu|pasture.*count|牧户数量/.test(At)||Qe.includes("牧户数量")?"牧户数量":/yak/.test(At)||Qe.includes("牦牛")?null:/grass/.test(At)||Qe.includes("草地面积")?"草地面积":/wet/.test(At)||Qe.includes("湿地")?"湿地面积":Qe.includes("牧户")||Qe.includes("牧场")?"牧户数量":/project/.test(At)||Qe.includes("工程")||Qe.includes("项目")?"工程数量":/base/.test(At)||Qe.includes("基地")?"基地数量":Qe}function J(_e,ze,Qe){const At=Number(ze)||0;return _e==="户均牦牛头数"?{name:_e,value:At,unit:Qe||"头"}:_e==="户均草地面积"?{name:_e,value:At,unit:Qe||"亩"}:_e==="人均收入"?{name:_e,value:At,unit:Qe||"元/年"}:_e==="联户数量"||_e==="防反贫监测户"?{name:_e,value:At,unit:Qe||"户"}:(_e.includes("草地")||_e.includes("湿地"))&&!String(Qe).includes("万")?{name:_e,value:Math.round(At/1e4*100)/100,unit:"万亩"}:_e.includes("牧户")?{name:_e,value:At,unit:Qe||"户"}:_e.includes("工程")||_e.includes("项目")||_e.includes("基地")?{name:_e,value:At,unit:Qe||"个"}:{name:_e,value:At,unit:Qe}}function ee(_e){return _e==="草地面积"||_e==="湿地面积"||_e==="区域数量"||_e==="牦牛数量"}function Ue(_e=[]){return(Array.isArray(_e)?_e:[]).map(ze=>{const Qe=Ht(ze,["areaName","area_name","name","townName","zoneName"]),At=Ht(ze,["number","value","count","num","pastureCount","muhuCount","muhu_count"]);return!Qe||At===void 0||At===null||At===""?null:{key:ze.code||ze.areaCode||ze.area_code||Qe,name:Qe,value:Number(At)||0,unit:"户"}}).filter(Boolean).sort((ze,Qe)=>Qe.value-ze.value)}function xt(_e=[]){return(Array.isArray(_e)?_e:[]).map(ze=>{const Qe=Ht(ze,["areaName","area_name","name","townName","zoneName"]),At=Number(Ht(ze,["registeredMuhuCount","registered_muhu_count","registeredCount"])),ke=Number(Ht(ze,["muhuCount","muhu_count","onlineCount"])),ft=Ht(ze,["onlinePercent","uplineRate","upline_rate","onlineRate","value","percent","rate"]),en=ft!=null&&ft!==""?ft:At>0?ke/At*100:void 0;return!Qe||en===void 0||en===null||en===""?null:{key:ze.code||ze.areaCode||ze.area_code||Qe,name:Qe,value:Number(String(en).replace("%",""))||0,unit:"%",extra:Number.isFinite(ke)&&Number.isFinite(At)&&At>0?`${ke}/${At}户`:ze.extra}}).filter(Boolean).slice(0,7)}function Bt(_e=[]){const ze=new Map;return(Array.isArray(_e)?_e:[]).forEach(Qe=>{const At=Ht(Qe,["ageRange","age_range","age","name","label"]),ke=Ht(Qe,["number","value","count","num"]);!At||ke===void 0||ke===null||ke===""||ze.set(At,(ze.get(At)||0)+(Number(ke)||0))}),Array.from(ze.entries()).map(([Qe,At])=>({key:Qe,name:Qe,value:At,unit:"人"}))}function Ce(_e=[]){const ze=new Map;return(Array.isArray(_e)?_e:[]).forEach(Qe=>{const At=Ht(Qe,["sex","gender","name"]),ke=Ht(Qe,["number","value","count","num"]);if(!At||ke===void 0||ke===null||ke==="")return;const ft=String(At).includes("女")?"女":String(At).includes("男")?"男":At;ze.set(ft,(ze.get(ft)||0)+(Number(ke)||0))}),Array.from(ze.entries()).map(([Qe,At])=>({key:Qe,name:Qe,value:At,unit:"人"}))}function We(_e=[]){return(Array.isArray(_e)?_e:[]).map((ze,Qe)=>{const At=Ht(ze,["name","pasturesName","pastures_name","muhuName","muhu_name","pastureName","pasture_name","herdsmanName"]);if(!At)return null;const ke=cn(ze),ft=Yt(ze)||st(ke),en=Ln(ze),we=wn(ze,ke)||Be(ze,At,en),Xe=tn(wt({},ze),{key:ze.key||ze.id||ze.pasturesId||ze.pastures_id||`${At}-${Qe}`,id:en||ze.id||ze.pastureId||ze.pasturesId||ze.pastures_id||ze.muhuId||ze.key,realPastureId:en,name:At,township:we||"--",grasslandArea:ft,acreage:ft,grasslands:ke});return Xe.canLocate=!!(en||ke.some(an)||an(ze)),Xe.locateText=Xe.canLocate?"定位":"--",Xe.value=Xe.grasslandArea,Xe.unit="亩",Xe.searchText=[Xe.name,Xe.township,Xe.id].filter(Boolean).join(" "),Xe}).filter(Boolean).sort(mt)}function $e(_e=[]){return[...Array.isArray(_e)?_e:[]].map(ze=>tn(wt({},ze),{grasslandArea:Yt(ze),acreage:Yt(ze)})).sort(mt)}function mt(_e,ze){const Qe=Yt(_e),At=Yt(ze),ke=Qe>0?1:0,ft=At>0?1:0;if(ke!==ft)return ft-ke;const en=je(_e)?1:0,we=je(ze)?1:0;return en!==we?we-en:Qe!==At?At-Qe:String((_e==null?void 0:_e.name)||"").localeCompare(String((ze==null?void 0:ze.name)||""),"zh-CN")}function Yt(_e={}){const Qe=["acreage","grasslandArea","grassland_area","area","areaRange","area_range","cdAcreage","cd_acreage","totalAcreage","total_acreage","grasslandAcreage","grassland_acreage","pastureArea","pasture_area"].map(ke=>it(_e==null?void 0:_e[ke]));return Qe.find(ke=>ke>0)||Qe.find(ke=>ke===0)||0}function st(_e=[]){return(Array.isArray(_e)?_e:[]).reduce((ze,Qe)=>ze+Yt(Qe),0)}function it(_e){if(typeof _e=="number")return Number.isFinite(_e)?_e:0;const ze=String(_e!=null?_e:"").trim();if(!ze||ze==="--")return 0;const Qe=ze.replace(/,/g,"").match(/-?\d+(?:\.\d+)?/);if(!Qe)return 0;const At=Number(Qe[0]);return Number.isFinite(At)?ze.includes("万")?At*1e4:At:0}function Vt(_e=[]){return nn(_e,ze=>Number(ze.grasslandArea)||0,"万亩",ze=>Math.round(ze/1e4*100)/100)}function Zt(_e=[]){const ze=new Map;return(Array.isArray(_e)?_e:[]).forEach(Qe=>{const At=(Qe==null?void 0:Qe.township)||(Qe==null?void 0:Qe.areaName)||(Qe==null?void 0:Qe.area_name);if(!At||At==="--")return;const ke=ze.get(At)||{key:`${At}-season`,name:At,values:{summer:0,winter:0},total:0,unit:"万亩"};ke.values.summer+=Number(Ht(Qe,["summerAcreage","summer_acreage","summerArea","summer_area"]))||0,ke.values.winter+=Number(Ht(Qe,["winterAcreage","winter_acreage","winterArea","winter_area"]))||0,ke.total=ke.values.summer+ke.values.winter,ze.set(At,ke)}),Array.from(ze.values()).filter(Qe=>Qe.total>0).map(Qe=>tn(wt({},Qe),{value:Math.round(Qe.total/1e4*100)/100,values:{summer:Math.round(Qe.values.summer/1e4*100)/100,winter:Math.round(Qe.values.winter/1e4*100)/100}})).sort((Qe,At)=>At.value-Qe.value)}function nn(_e=[],ze,Qe,At=ke=>ke){const ke=new Map;return(Array.isArray(_e)?_e:[]).forEach(ft=>{const en=(ft==null?void 0:ft.township)||(ft==null?void 0:ft.areaName)||(ft==null?void 0:ft.area_name);if(!en||en==="--")return;const we=ke.get(en)||{key:en,name:en,value:0,unit:Qe},Xe=ze(ft);we.value+=Number(Xe)||0,ke.set(en,we)}),Array.from(ke.values()).map(ft=>tn(wt({},ft),{value:At(ft.value)})).filter(ft=>Number.isFinite(ft.value)&&ft.value>0).sort((ft,en)=>en.value-ft.value)}function cn(_e={}){const ze=[];["grasslands","grasslandList","grasslandRows","landList","plots","features"].forEach(ke=>{const ft=_e==null?void 0:_e[ke];Array.isArray(ft)?ze.push(...ft):Array.isArray(ft==null?void 0:ft.rows)?ze.push(...ft.rows):Array.isArray(ft==null?void 0:ft.list)?ze.push(...ft.list):Array.isArray(ft==null?void 0:ft.data)&&ze.push(...ft.data)});const At=Ht(_e,["wkt","geo","geom","geometryWkt","geometry_wkt","shape","location"]);return(At||_e!=null&&_e.geometry)&&ze.push(tn(wt({},_e),{id:(_e==null?void 0:_e.grasslandId)||(_e==null?void 0:_e.gid)||(_e==null?void 0:_e.id),pastureId:(_e==null?void 0:_e.pastureId)||(_e==null?void 0:_e.pasturesId)||(_e==null?void 0:_e.pastures_id)||(_e==null?void 0:_e.muhuId)||(_e==null?void 0:_e.id),name:(_e==null?void 0:_e.grasslandName)||(_e==null?void 0:_e.name),wkt:At,geometry:_e==null?void 0:_e.geometry})),ze.filter(Boolean)}function an(_e={}){var ze,Qe;return typeof _e=="string"?!!_e.trim():(_e==null?void 0:_e.type)==="Feature"||_e!=null&&_e.type&&(_e!=null&&_e.coordinates)||(ze=_e==null?void 0:_e.geometry)!=null&&ze.type||(Qe=_e==null?void 0:_e.geometry)!=null&&Qe.coordinates||typeof(_e==null?void 0:_e.geometry)=="string"?!0:!!Ht(_e,["wkt","geo","geom","geometryWkt","geometry_wkt","shape","location"])}function Ln(_e={}){const ze=(_e==null?void 0:_e.realPastureId)||(_e==null?void 0:_e.pastureId)||(_e==null?void 0:_e.pasturesId)||(_e==null?void 0:_e.pastures_id)||(_e==null?void 0:_e.muhuId)||(_e==null?void 0:_e.id);return ze==null||ze===""?null:ze}function je(_e={}){return _e!=null&&_e.canLocate||Ln(_e)||an(_e)?!0:cn(_e).some(an)}function Ht(_e={},ze=[]){for(const Qe of ze){const At=_e==null?void 0:_e[Qe];if(At!=null&&At!=="")return At}}function wn(_e={},ze=[]){const Qe=Ht(_e,["township","townName","town_name","areaName","area_name","zoneName","zone_name"]);if(Qe)return zn(Qe);const At=dn(Ht(_e,["areaCode","area_code","townCode","town_code","code"]));if(At)return At;for(const ft of ze){const en=Ht(ft,["township","townName","town_name","areaName","area_name","zoneName","zone_name"]);if(en)return zn(en);const we=dn(Ht(ft,["areaCode","area_code","townCode","town_code","code"]));if(we)return we}const ke=Un(_e);if(ke)return ke;for(const ft of ze){const en=Un(ft);if(en)return en}return""}function zn(_e){const ze=String(_e||"").trim();if(!ze||ze==="--")return"";if(v[ze])return v[ze];if(m[ze])return m[ze];const Qe=dn(ze);return Qe||ze}function Be(_e={},ze="",Qe=""){const At=[Qe,_e.realPastureId,_e.pastureId,_e.pasturesId,_e.pastures_id,_e.muhuId,_e.id];for(const ft of At){const en=g[String(ft||"").trim()];if(en)return zn(en)}const ke=[ze,_e.name,_e.pasturesName,_e.pastures_name,_e.muhuName,_e.muhu_name,_e.pastureName,_e.pasture_name];for(const ft of ke){const en=_[pn(ft)];if(en)return zn(en)}return""}function pn(_e){return String(_e||"").replace(/[·•・..。`´’‘ʼʹ''"“”\s\-—_()()]/g,"").replace(/˙/g,"")}function dn(_e){const ze=String(_e||"").trim();if(!ze)return"";const Qe=ze.replace(/\D/g,"");return Qe&&(m[Qe]||m[Qe.slice(0,9)])||""}function Un(_e={}){const ze=En(_e),Qe=lt(ze);if(!Qe)return"";const At=S.find(ke=>Pi(Qe,ke.geometry));return At!=null&&At.name?zn(At.name):""}function En(_e={}){var At,ke;if((_e==null?void 0:_e.type)==="Feature")return En(_e.geometry);if(_e!=null&&_e.type&&(_e!=null&&_e.coordinates))return _e;if((At=_e==null?void 0:_e.geometry)!=null&&At.type||(ke=_e==null?void 0:_e.geometry)!=null&&ke.coordinates)return _e.geometry;const ze=Ht(_e,["geometry","location","wkt","geo","geom","geometryWkt","geometry_wkt","shape"]);if(!ze||typeof ze!="string")return null;const Qe=ze.trim();if(!Qe)return null;if(Qe.startsWith("{")||Qe.startsWith("["))try{const ft=JSON.parse(Qe);return En(ft)}catch(ft){return null}return Tn(Qe)}function Tn(_e){var ft;const ze=String(_e||"").trim(),Qe=ze.match(/^([A-Z]+)(?:\s+[A-Z]+)?\s*\(/i),At=(ft=Qe==null?void 0:Qe[1])==null?void 0:ft.toUpperCase();if(!At)return null;const ke=ze.slice(ze.indexOf("("));return At==="POINT"?{type:"Point",coordinates:ut(ke)}:At==="MULTIPOINT"?{type:"MultiPoint",coordinates:Nn(ke).map(ut).filter(Boolean)}:At==="LINESTRING"?{type:"LineString",coordinates:Jt(ke)}:At==="MULTILINESTRING"?{type:"MultiLineString",coordinates:Nn(ke).map(Jt).filter(en=>en.length)}:At==="POLYGON"?{type:"Polygon",coordinates:hn(ke)}:At==="MULTIPOLYGON"?{type:"MultiPolygon",coordinates:Nn(ke).map(hn).filter(en=>en.length)}:null}function ut(_e){const ze=String(_e||"").replace(/^\(+|\)+$/g,"").trim().split(/\s+/).slice(0,2).map(Number);return ze.length>=2&&Number.isFinite(ze[0])&&Number.isFinite(ze[1])?[ze[0],ze[1]]:null}function Jt(_e){return String(_e||"").replace(/^\(+|\)+$/g,"").split(",").map(ut).filter(Boolean)}function hn(_e){return Nn(_e).map(Jt).filter(ze=>ze.length>=3)}function Nn(_e){const ze=[];let Qe=0,At=-1;return Array.from(String(_e||"")).forEach((ke,ft)=>{ke==="("?(Qe===0&&(At=ft+1),Qe+=1):ke===")"&&(Qe-=1,Qe===0&&At>=0&&(ze.push(_e.slice(At,ft)),At=-1))}),ze.length?ze:[String(_e||"")]}function Re(_e){try{const ze=typeof _e=="string"?JSON.parse(_e):_e;return((ze==null?void 0:ze.features)||[]).map(Qe=>{var At,ke,ft,en;return{name:((At=Qe==null?void 0:Qe.properties)==null?void 0:At.name)||((ke=Qe==null?void 0:Qe.properties)==null?void 0:ke.areaName)||((ft=Qe==null?void 0:Qe.properties)==null?void 0:ft.townName),code:(en=Qe==null?void 0:Qe.properties)==null?void 0:en.code,geometry:Qe==null?void 0:Qe.geometry}}).filter(Qe=>{var At;return Qe.name&&((At=Qe.geometry)==null?void 0:At.coordinates)})}catch(ze){return[]}}function lt(_e){const ze=sn(_e);if(!ze.length)return null;const Qe=ze.reduce((At,ke)=>({lng:At.lng+ke[0],lat:At.lat+ke[1]}),{lng:0,lat:0});return[Qe.lng/ze.length,Qe.lat/ze.length]}function sn(_e){const ze=[],Qe=At=>{if(Array.isArray(At)){if(At.length>=2&&Number.isFinite(Number(At[0]))&&Number.isFinite(Number(At[1]))){ze.push([Number(At[0]),Number(At[1])]);return}At.forEach(Qe)}};return Qe(_e==null?void 0:_e.coordinates),ze}function Pi(_e,ze){return!_e||!(ze!=null&&ze.coordinates)?!1:ze.type==="Polygon"?er(_e,ze.coordinates):ze.type==="MultiPolygon"?ze.coordinates.some(Qe=>er(_e,Qe)):!1}function er(_e,ze){var en,we,Xe,Pt;const Qe=ze==null?void 0:ze[0];if(!Array.isArray(Qe)||Qe.length<3)return!1;let At=!1;const ke=_e[0],ft=_e[1];for(let Rt=0,Et=Qe.length-1;Rtft!=li>ft&&ke<(ci-Fn)*(ft-Qn)/(li-Qn||1e-12)+Fn&&(At=!At)}return At}return(_e,ze)=>{var Qe;return Te(),Pe("div",NZe,[gn(rm,{ref_key:"mapSceneRef",ref:r,class:"pasture-map-scene","active-layer":M.value,"map-ranking":W.value,onSceneMounted:Lt},null,8,["active-layer","map-ranking"]),ze[2]||(ze[2]=O("div",{class:"pasture-map-scrim"},null,-1)),a.value?Dn("",!0):(Te(),Pe("div",kZe,"3D地图加载中")),O("div",FZe,[O("div",OZe,[O("div",BZe,[gn(Mi,{class:"pasture-side-card left-card",title:"牧户区域统计",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:Y.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card left-card",title:"草地面积分布",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:Q.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card left-card",title:"夏冬草场面积",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:K.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card left-card",title:"牧户上线率",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:ae.value,compact:""},null,8,["panel"])]),_:1})])]),O("div",zZe,[O("div",GZe,[gn(Mi,{class:"pasture-side-card right-card",title:"牧户年龄统计",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:ie.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card right-card",title:"牧户性别统计",width:Bf,height:zf},{default:mi(()=>[gn(Cl,{panel:he.value,compact:""},null,8,["panel"])]),_:1}),gn(Mi,{class:"pasture-side-card right-card pasture-list-card",title:"牧户列表",width:Bf,height:i},{default:mi(()=>[gn(Cl,{panel:Ee.value,compact:"",onRowSelect:Tt},null,8,["panel"])]),_:1})])]),O("div",UZe,[gn(UR,{modelValue:l.value,"onUpdate:modelValue":ze[0]||(ze[0]=At=>l.value=At),"selected-legend-key":u.value,"onUpdate:selectedLegendKey":ze[1]||(ze[1]=At=>u.value=At),"topic-key":"grassland",layers:x.value,legends:((Qe=M.value)==null?void 0:Qe.legends)||[],width:232,height:430},null,8,["modelValue","selected-legend-key","layers","legends"])])])])}}},AM=[{key:"family-pasture",name:"家庭生态牧场",color:"#24f6c4",unit:"户",metricLabel:"牧场",width:126},{key:"artificial-grassland",name:"人工草地",color:"#7ee269",unit:"万亩",metricLabel:"草地",width:112},{key:"scale-breeding",name:"规模化养殖基地",subName:"牦牛选育场",color:"#32dcff",unit:"个",metricLabel:"基地",width:132},{key:"forage-storage",name:"防灾减灾",subName:"饲草储备库",color:"#ffe06b",unit:"个",metricLabel:"库点",width:126},{key:"slaughter-processing",name:"屠宰与加工",color:"#ff9a62",unit:"家",metricLabel:"主体",width:112},{key:"farm-equipment",name:"农机装备",color:"#30dcff",unit:"套",metricLabel:"装备",width:112},{key:"social-service",name:"社会化服务",subName:"金融/疫病/银行/保险/培训",color:"#9ea7ff",unit:"个",metricLabel:"主体",width:132}],ine=[{key:"support-disaster-001",name:"嚷口防灾减灾饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"刷经寺镇",address:"壤口村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.489619,latitude:32.20577086},{key:"support-disaster-002",name:"安曲防灾减灾饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"安曲镇",address:"夺龙村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.3283137,latitude:32.63727531},{key:"support-disaster-003",name:"瓦切唐日合作社饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"瓦切镇",address:"唐日村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.6162349,latitude:33.11047864},{key:"support-disaster-004",name:"瓦切牧草交易中心饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"瓦切镇",address:"达俄村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.6014834,latitude:33.09604707},{key:"support-disaster-005",name:"龙日坝龙日坝村 1 饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"龙日镇",address:"龙日坝村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.383916,latitude:32.44992916},{key:"support-disaster-006",name:"龙日坝龙日坝村 2 饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"龙日镇",address:"龙日坝村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.3834086,latitude:32.45041994},{key:"support-disaster-007",name:"江茸乡饲草储备库",stageKey:"forage-storage",typeName:"防灾减灾饲草储备库",capacity:1500,capacityUnit:"吨",town:"江茸乡",address:"茸日玛村",status:"正常运营",products:"燕麦草、披碱草、老芒麦",longitude:102.256868,latitude:32.46996565}],sL=[{key:"support-processing-001",name:"西部牦牛产业集团有限责任公司",stageKey:"slaughter-processing",typeName:"乳制品加工",capacity:3e3,capacityUnit:"吨",outputValue:3e4,town:"邛溪镇",address:"瑞庆西路37号",status:"存续(在营)",products:"牦牛奶粉",longitude:102.5292,latitude:32.7917},{key:"support-processing-002",name:"四川红原菊乐牦牛乳业有限公司",stageKey:"slaughter-processing",typeName:"乳制品加工",capacity:4e3,capacityUnit:"吨",outputValue:7e3,town:"邛溪镇",address:"瑞庆东路76号附6号",status:"存续(在营)",products:"圣舟牦牛奶",longitude:102.5666,latitude:32.8179},{key:"support-processing-003",name:"四川雅克乳业有限公司",stageKey:"slaughter-processing",typeName:"乳制品加工",capacity:1e3,capacityUnit:"吨",outputValue:3e3,town:"邛溪镇",address:"瑞庆西路",status:"存续(在营)",products:"牦牛酸奶、牦牛奶粉",longitude:102.5315,latitude:32.7921},{key:"support-processing-004",name:"四川红原遛遛牛食品有限责任公司",stageKey:"slaughter-processing",typeName:"肉制品加工",capacity:4500,capacityUnit:"吨",outputValue:8e3,town:"邛溪镇",address:"瑞庆东路72号",status:"存续(在营)",products:"风干牦牛肉、卤制牦牛肉",longitude:102.5592,latitude:32.8151},{key:"support-processing-005",name:"四川红原黑帐篷牦牛肉食品有限责任公司",stageKey:"slaughter-processing",typeName:"肉制品加工",capacity:300,capacityUnit:"吨",outputValue:1e3,town:"邛溪镇",address:"瑞庆中路",status:"存续(在营)",products:"风干牦牛肉、牦牛肉礼包",longitude:102.551,latitude:32.7987},{key:"support-processing-006",name:"红原御坊斋牦牛肉制品厂",stageKey:"slaughter-processing",typeName:"肉制品加工",capacity:200,capacityUnit:"吨",outputValue:600,town:"邛溪镇",address:"阳嘎北街",status:"存续(在营)",products:"牛肉干、牦牛肉粒",longitude:102.5431,latitude:32.7962},{key:"support-processing-007",name:"四川牦牛火了生态农业科技有限公司",stageKey:"slaughter-processing",typeName:"肉制品加工",capacity:0,capacityUnit:"吨",outputValue:500,town:"邛溪镇",address:"瑞庆中路13号附1号",status:"存续(在营)",products:"包装牦牛肉干",longitude:102.5402,latitude:32.7958}],WZe=2618,jZe=220605,ij=OR.reduce((n,e)=>n+Number(e.devices||0),0),$Ze=ine.reduce((n,e)=>n+Number(e.capacity||0),0),qZe=sL.reduce((n,e)=>n+Number(e.capacity||0),0);sL.reduce((n,e)=>n+Number(e.outputValue||0),0);new Set(z3.map(n=>n.zoneName)).size;Vu.herdsmanCount,rj(Vu.grasslandArea),rj(Vu.grasslandArea),Vu.baseCount,ine.length,sL.length;function XZe(n){return AM.find(e=>e.key===n)||AM[0]}function rj(n){const e=Number(n||0)/1e4;return Number(e.toFixed(1))}const YZe={class:"yak-industry-chain"},KZe={key:0,class:"industry-map-loading"},ZZe={class:"industry-point-detail__head"},JZe={class:"industry-point-detail__name"},QZe={class:"industry-point-detail__grid"},eJe={class:"industry-bottom-switcher"},tJe={__name:"index",emits:["module-stats","loading-progress","map-ready"],setup(n,{emit:e}){const t=e,i=Wt("family-pasture"),r=Wt(null),a=Wt(!1),o=Wt(null),s=Wt({x:0,y:0});let l=null,u=!1;const c=Ye(()=>XZe(i.value)),d=Ye(()=>{var P;const D=B3("yak-industry-chain","yak-industry-points"),E=(P=D==null?void 0:D.legends)==null?void 0:P.find(F=>{var V;return((V=F.match)==null?void 0:V.value)===i.value});return D&&tn(wt({},D),{activeLegend:E||{key:`yak-industry-empty-${i.value}`,name:c.value.name,fillColor:c.value.color,strokeColor:c.value.color,match:{field:"stageKey",value:i.value}}})}),h=Ye(()=>AM.map(D=>({key:D.key,name:D.name,color:D.color,width:D.width}))),f=Ye(()=>({showTownNames:!0,showBars:!1,showPointMarkers:!1,title:`${c.value.name}排行`,metricLabel:c.value.metricLabel,unit:c.value.unit,rows:[]})),p=Ye(()=>{const D=o.value;return D?[{label:"所属环节",value:M(D.stageName)},{label:"点位类型",value:M(D.categoryName)},{label:"所在乡镇",value:M(D.town)},{label:"村/地址",value:M(D.village||D.address)},{label:"能力规模",value:C(D)},{label:"联系人",value:M(D.contactName)},{label:"联系电话",value:M(D.contactPhone)},{label:"运行状态",value:M(D.status)}].filter(E=>E.value!==void 0&&E.value!==null&&String(E.value).trim()!==""):[]}),m=Ye(()=>{var D,E;return M(((D=o.value)==null?void 0:D.categoryName)||((E=o.value)==null?void 0:E.stageName))}),v=Ye(()=>{var D;return M((D=o.value)==null?void 0:D.name)}),g=Ye(()=>{const V={x:Math.max(24,Math.min(1896,Number(s.value.x||0))),y:Math.max(24,Math.min(1056,Number(s.value.y||0)))},G=V.x>1320,W=G?Math.max(24,V.x-430-28):Math.min(1920-430-24,V.x+28),Y=Math.min(Math.max(V.y-252/2,128),1080-252-116),Q=Math.min(Math.max(V.y-Y,42),252-38);return{left:`${W}px`,top:`${Y}px`,"--point-arrow-top":`${Q}px`,"--point-arrow-side":G?"100%":"0px","--point-arrow-offset":G?"-1px":"-9px","--point-arrow-rotate":G?"-45deg":"135deg"}});dl(S),Bl(()=>{var D,E;u=!0,(E=(D=r.value)==null?void 0:D.destroyMap)==null||E.call(D)});function _(D){i.value=D,A()}function S(){var E,P,F;l=new am,t("loading-progress",{progress:0}),(P=(E=l.instance)==null?void 0:E.on)==null||P.call(E,"onProgress",(V,G,W)=>{t("loading-progress",{progress:Math.floor(G/(W||1)*100),path:V,itemsLoaded:G,itemsTotal:W})});const D=(V=0)=>rn(this,null,function*(){var W,Y;if(u)return;yield Qs();const G=r.value;if((W=G==null?void 0:G.loadMap)==null||W.call(G,l),G!=null&&G.canvasMap){a.value=!0,t("loading-progress",{progress:100}),t("map-ready"),(Y=G.play)==null||Y.call(G);return}if(V<24){window.setTimeout(()=>D(V+1),120);return}a.value=!0,t("map-ready")});(F=l.ready)==null||F.then(D).catch(()=>{a.value=!0,t("map-ready")})}function x(D={}){var P;const E=((P=D.feature)==null?void 0:P.properties)||{};if(E.stageKey){o.value=E,s.value=I(D.screen);return}o.value=null}function A(){var E,P,F,V;o.value=null;const D=((P=(E=r.value)==null?void 0:E.canvasMap)==null?void 0:P.value)||((F=r.value)==null?void 0:F.canvasMap);(V=D==null?void 0:D.clearSelectedFeature)==null||V.call(D)}function C(D){return D.capacity===void 0||D.capacity===null||D.capacity===""?"":`${D.capacity}${D.capacityUnit||""}`}function M(D){return String(D!=null?D:"").replace(/\bcxpt[-_./\s]*/gi,"").replace(/\s+/g," ").trim()}function I(D={}){var Y;const E=document.querySelector("#large-screen"),P=(Y=E==null?void 0:E.getBoundingClientRect)==null?void 0:Y.call(E),F=P!=null&&P.width?1920/P.width:1,V=P!=null&&P.height?1080/P.height:1,G=(P==null?void 0:P.left)||0,W=(P==null?void 0:P.top)||0;return{x:(Number(D.x)-G)*F,y:(Number(D.y)-W)*V}}return(D,E)=>(Te(),Pe("div",YZe,[gn(rm,{ref_key:"mapSceneRef",ref:r,class:"industry-map-scene","active-layer":d.value,"map-ranking":f.value,onFeatureInfo:x},null,8,["active-layer","map-ranking"]),E[0]||(E[0]=O("div",{class:"industry-map-scrim"},null,-1)),a.value?Dn("",!0):(Te(),Pe("div",KZe,"3D地图加载中")),o.value?(Te(),Pe("div",{key:1,class:"industry-point-detail",style:Ji(g.value)},[O("div",ZZe,[O("span",null,De(m.value),1),O("button",{type:"button",title:"关闭",onClick:A},"×")]),O("div",JZe,De(v.value),1),O("div",QZe,[(Te(!0),Pe(bn,null,Bn(p.value,P=>(Te(),Pe("div",{key:P.label,class:"industry-point-detail__row"},[O("span",null,De(P.label),1),O("strong",null,De(P.value),1)]))),128))])],4)):Dn("",!0),O("div",eJe,[gn(y7,{"model-value":i.value,topics:h.value,"onUpdate:modelValue":_},null,8,["model-value","topics"])])]))}},T7="/openApi";function nJe(n,e){return/^https?:\/\//.test(e)?e:`${n}${e.startsWith("/")?e:`/${e}`}`}function A7(n,e,t,i={}){return su(nJe(n,e),{params:t,timeout:i.timeout}).then(iJe)}function iJe(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function rJe(n,e=window.location.hash||window.location.pathname,t="智慧管理"){return A7(T7,"/ai/stat/question",{question:n,pagePath:e,pageName:t},{timeout:45e3})}function aJe(n){return A7(T7,"/ai/balance/targets",{question:n},{timeout:18e3}).then(e=>Array.isArray(e)?e:(e==null?void 0:e.rows)||(e==null?void 0:e.list)||[])}function oJe({areaCode:n,pasturesId:e}={}){return A7(T7,"/ai/balance/advice",{areaCode:n,pasturesId:e},{timeout:18e3})}function sJe(){return A7(T7,"/ai/balance/welcome",void 0,{timeout:12e3})}const lJe="/openApi";function uJe(n){return/^https?:\/\//.test(n)?n:`${lJe}${n.startsWith("/")?n:`/${n}`}`}function cJe(n){if((n==null?void 0:n.success)===!1||(n==null?void 0:n.code)!==void 0&&![0,200,"0","200"].includes(n.code)){const t=new Error((n==null?void 0:n.msg)||(n==null?void 0:n.message)||"图表接口请求失败");throw t.code=n==null?void 0:n.code,t}return ki(n)}function dJe(i){return rn(this,arguments,function*(n,e=window.location.hash||window.location.pathname,t="智慧管理"){const r=yield su(uJe("/ai/stat/charts"),{params:{question:n,pagePath:e,pageName:t},timeout:3e4}).then(cJe);return(Array.isArray(r==null?void 0:r.charts)?r.charts:[]).map(hJe).filter(o=>o.rows.length)})}function hJe(n,e){const t=Array.isArray(n==null?void 0:n.rows)?n.rows:[];return{id:(n==null?void 0:n.id)||`smart-chart-${e}`,type:fJe(n==null?void 0:n.type),title:(n==null?void 0:n.title)||`统计图表${e+1}`,subtitle:(n==null?void 0:n.subtitle)||pJe(n==null?void 0:n.source),unit:(n==null?void 0:n.unit)||"",source:(n==null?void 0:n.source)||{},rows:t.map((i,r)=>({key:(i==null?void 0:i.key)||`${(i==null?void 0:i.name)||"row"}-${r}`,name:String((i==null?void 0:i.name)||`指标${r+1}`),value:vJe(i==null?void 0:i.value),rawValue:i==null?void 0:i.value,unit:(i==null?void 0:i.unit)||(n==null?void 0:n.unit)||"",extra:(i==null?void 0:i.extra)||""})).filter(i=>i.name&&Number.isFinite(i.value))}}function fJe(n){return["pie","donut"].includes(n)?"pie":["line","trend"].includes(n)?"line":"bar"}function pJe(n={}){const e=n.table?`来源:${n.table}`:"来源:openApi 统计库",t=n.period?`,${n.period}`:"";return`${e}${t}`}function vJe(n){if(n==null||n==="")return NaN;const e=Number(String(n).replace(/,/g,"").replace(/%/g,""));return Number.isFinite(e)?e:NaN}const mJe={class:"wisdom-management"},gJe={class:"wisdom-chat"},yJe={key:0,class:"wisdom-empty-state"},_Je={class:"wisdom-prompt-grid"},SJe=["disabled","onClick"],bJe={key:0,class:"wisdom-message-mark"},xJe={class:"wisdom-bubble"},wJe={key:0,class:"wisdom-steps"},TJe={key:1,class:"wisdom-digesting"},AJe={key:2,class:"wisdom-chart-list"},CJe={key:3,class:"wisdom-insight-list"},MJe=["innerHTML"],EJe={key:5,class:"wisdom-stream-caret"},PJe={key:6,class:"wisdom-suggestion-list"},RJe=["disabled","onClick"],LJe={key:7,class:"wisdom-choice-list"},IJe=["disabled","onClick"],DJe={class:"wisdom-input-shell"},NJe=["disabled"],kJe=["disabled"],FJe={key:0,class:"wisdom-button-loading"},OJe={__name:"index",setup(n){const e=l0e({loader:()=>u0e(()=>import("./SmartChartRenderer-3aefa042-1782919616283.js"),["./SmartChartRenderer-3aefa042-1782919616283.js","./index-1782919616283.js","./index-47d6f37a-balabala-1782919616283.css","./SmartChartRenderer-8fd37aa6-balabala-1782919616283.css"],import.meta.url),loadingComponent:{template:'
    正在绘制统计图表
    '}}),t=Wt(""),i=Wt([]),r=Wt(!1),a=Wt(null),o=Wt("可以直接询问牦牛数量、草地面积、牧户情况、饲草产量、林地面积、基地分布、畜群结构和交易流通等统计问题。"),s=[{label:"牦牛分布",question:"牦牛分布"},{label:"畜群结构",question:"牦牛结构占比"},{label:"草地面积",question:"草地面积分布"},{label:"草畜平衡",question:"红原县草畜平衡建议"},{label:"湿地类型",question:"湿地类型结构"},{label:"公益林保护",question:"公益林保护等级统计"}];let l=null;dl(()=>{sJe().then(Q=>{const K=(Q==null?void 0:Q.value)||(Q==null?void 0:Q.text)||Q;typeof K=="string"&&K.trim()&&(o.value=K)}).catch(()=>{})}),Bl(()=>{P()});function u(){return`${Date.now()}-${Math.random().toString(16).slice(2)}`}function c(){return rn(this,arguments,function*(Q=t.value){const K=String(Q||"").trim();if(!K||r.value)return;const ae={id:u(),role:"user",text:K},ie={id:u(),role:"assistant",steps:[`正在理解:${K}`],digesting:!0,digestText:"小牧正在匹配业务数据",visibleText:"",fullText:"",streaming:!1,choices:[],charts:[],insights:[],suggestions:[]};if(i.value=[...i.value,ae,ie],t.value="",r.value=!0,yield W(),m(K)){yield h(K,ie.id);return}yield d(K,ie.id)})}function d(Q,K){return rn(this,null,function*(){M(K,{digestText:"正在理解问题并查询统计库"});const ae=rJe(Q,window.location.hash||window.location.pathname,"智慧管理"),ie=dJe(Q,window.location.hash||window.location.pathname,"智慧管理"),[he,Ee]=yield Promise.allSettled([ae,ie]),He=Ee.status==="fulfilled"?Ee.value||[]:[],xe=Ee.status==="rejected"?Ee.reason:null;if(he.status==="fulfilled"){const Fe=he.value,pt=(Fe==null?void 0:Fe.answer)||"小牧暂时没有查到相关统计数据,可以换一种说法再问一次。",Ot=[`正在理解:${Q}`,"已查询统计库","已生成统计回答"];He.length?Ot.push(`已生成 ${He.length} 个数据图表`):xe&&Ot.push("图表生成暂时不可用"),M(K,{digesting:!1,steps:Ot,insights:He.length?A(He):[],suggestions:C(Q,He),allowFollowUp:!0}),E(K,xe?`${pt} **图表状态** - ${D(xe,"图表接口暂时不可用,已先返回文字分析。")}`:pt,He);return}if(He.length){M(K,{digesting:!1,steps:[`正在理解:${Q}`,"已查询统计库",`已生成 ${He.length} 个数据图表`,"文字分析暂时不可用"],insights:A(He),suggestions:C(Q,He),allowFollowUp:!0}),E(K,"文字分析服务暂时没有返回结果,已按统计库真实数据生成可视化图表。",He);return}I(K,D(he.reason,"小牧暂时没有获取到统计结果,请稍后再试。"))})}function h(Q,K){return rn(this,null,function*(){M(K,{digestText:"正在检索草畜平衡对象"});try{const ae=yield aJe(Q),ie=v(ae);if(!ie.length){M(K,{digesting:!1,steps:[`正在理解:${Q}`,"未匹配到草畜平衡对象"]}),E(K,"暂时没有匹配到对应的区域或牧户。可以输入更明确的乡镇、村名、牧户或牧场名称,例如“红原县草畜平衡建议”。");return}if(ie.length>1){M(K,{digesting:!1,steps:[`正在理解:${Q}`,"已匹配多个对象,请选择一个继续"],choices:ie.slice(0,8)}),r.value=!1;return}yield p(ie[0],K)}catch(ae){I(K,D(ae,"草畜平衡对象检索失败,请稍后再试。"))}})}function f(Q){return rn(this,null,function*(){if(r.value)return;const K=Q.name||Q.label||"草畜平衡建议",ae={id:u(),role:"user",text:K},ie={id:u(),role:"assistant",steps:[`已选择:${K}`],digesting:!0,digestText:"正在消化草畜平衡数据",visibleText:"",fullText:"",streaming:!1,choices:[],charts:[],insights:[],suggestions:[]};i.value=[...i.value,ae,ie],r.value=!0,yield W(),yield p(Q,ie.id)})}function p(Q,K){return rn(this,null,function*(){const ae=(Q==null?void 0:Q.name)||(Q==null?void 0:Q.label)||"该区域",ie=g(Q);M(K,{steps:[`已锁定:${ae}`,"正在消化草畜平衡数据"],digestText:"正在生成平衡建议"});try{const he=yield oJe(ie);M(K,{digesting:!1,steps:[`已锁定:${ae}`,"已生成草畜平衡建议"]}),E(K,_(ae,he||{}))}catch(he){I(K,D(he,"小牧刚才没有消化成功,请稍后再问一次。"))}})}function m(Q){return/草畜|平衡|承载|载畜|超载|放牧压力|轮牧|休牧|牧场建议|牧户建议/.test(Q)}function v(Q=[]){return Q.map((K,ae)=>({key:(K==null?void 0:K.key)||(K==null?void 0:K.type)||"area_code",value:(K==null?void 0:K.value)||(K==null?void 0:K.id)||(K==null?void 0:K.code)||(K==null?void 0:K.areaCode)||(K==null?void 0:K.pasturesId),name:(K==null?void 0:K.name)||(K==null?void 0:K.label)||(K==null?void 0:K.areaName)||(K==null?void 0:K.pasturesName)||`对象${ae+1}`,raw:K})).filter(K=>K.value||K.name==="红原县")}function g(Q){return(Q==null?void 0:Q.key)==="pasturesId"||(Q==null?void 0:Q.key)==="pastures_id"?{pasturesId:Q.value}:{areaCode:(Q==null?void 0:Q.value)||"513233"}}function _(Q,K={}){const ae=S(K,["areaRange","arearange","area_range","area","acreage"],0),ie=S(K,["yakNumber","yaknumber","yak_number","livestock_capacity","livestockCapacity","livestockcapacity"],0),he=S(K,["level","conclusion"],"暂无等级"),Ee=S(K,["overloadRate","overloadrate","overload_rate"],0),He=S(K,["advice","balanceAdvice","balanceadvice","balance_advice"],"暂无建议,请稍后再试。");return`**${Q}草畜平衡建议** - 草地面积:${x(ae)} 亩 - 牦牛/载畜量:${x(ie)} 头 - 草畜平衡等级:${he} - 超载率:${x(Ee)}% **建议** ${He}`}function S(Q,K,ae=""){for(const ie of K){const he=Q==null?void 0:Q[ie];if(he!=null&&he!=="")return he}return ae}function x(Q){const K=Number(String(Q).replace(/,/g,""));return Number.isFinite(K)?K.toLocaleString("zh-CN",{maximumFractionDigits:2}):Q||"--"}function A(Q=[]){const K=[];return Q.slice(0,2).forEach(ae=>{var Ot;const ie=(ae.rows||[]).map(bt=>tn(wt({},bt),{value:Number(bt.value)})).filter(bt=>bt.name&&Number.isFinite(bt.value));if(!ie.length)return;const he=ae.unit||((Ot=ie.find(bt=>bt.unit))==null?void 0:Ot.unit)||"",Ee=ie.slice().sort((bt,ht)=>ht.value-bt.value),He=ie.reduce((bt,ht)=>bt+ht.value,0),xe=He/ie.length,Fe=Ee[0],pt=Ee[Ee.length-1];K.push({label:"最高",value:`${Fe.name} ${x(Fe.value)}${he}`,note:ae.title}),ie.length>2&&K.push({label:ae.type==="pie"?"占比项":"最低",value:`${pt.name} ${x(pt.value)}${he}`,note:ae.type==="pie"?"最小结构项":"低值区域"}),K.push({label:"合计",value:`${x(He)}${he}`,note:ie.length>1?`覆盖 ${ie.length} 项`:ae.title}),ae.type!=="pie"&&ie.length>1&&K.push({label:"均值",value:`${x(xe)}${he}`,note:"按当前图表项计算"})}),K.slice(0,4)}function C(Q,K=[]){const ae=String(Q||""),ie=[],he=(Ee,He)=>{!ie.some(xe=>xe.question===He)&&He!==ae&&ie.push({label:Ee,question:He})};return(/牦牛|畜群|存栏|牛/.test(ae)||K.some(Ee=>{var He,xe;return(xe=(He=Ee.source)==null?void 0:He.localKey)==null?void 0:xe.includes("yak")}))&&(he("看畜群结构","牦牛结构占比"),he("看存栏预测","牦牛存栏预测"),he("看交易结构","牦牛交易结构")),/草地|草原|饲草|鲜草/.test(ae)&&(he("看草地健康","草地健康占比"),he("看生产力","草地生产力分布"),he("看退化统计","草地退化统计")),/湿地/.test(ae)&&(he("看湿地类型","湿地类型结构"),he("看湿地级别","湿地级别面积统计")),/林地|公益林|森林/.test(ae)&&(he("看权属结构","林地权属结构"),he("看公益林等级","公益林保护等级统计")),/草畜|平衡|承载|载畜/.test(ae)&&(he("看牦牛分布","牦牛分布"),he("看草地面积","草地面积分布")),he("换个图表",`${ae} 图表`),ie.slice(0,3)}function M(Q,K,ae=!0){i.value=i.value.map(ie=>ie.id===Q?wt(wt({},ie),K):ie),ae&&W()}function I(Q,K){M(Q,{digesting:!1,steps:["请求已结束"]}),E(Q,K)}function D(Q,K){const ae=String((Q==null?void 0:Q.message)||"");return(Q==null?void 0:Q.code)===401||(Q==null?void 0:Q.code)==="401"||(Q==null?void 0:Q.code)==="HTTP_401"||/未登录|授权|Unauthorized|HTTP 401/i.test(ae)?"接口需要登录授权。当前智慧管理不会使用假数据,请先完成平台登录或使用 openApi 统计库口径继续问数。":(Q==null?void 0:Q.code)==="REQUEST_TIMEOUT"||/timeout|timed out|超时/i.test(ae)?"服务响应时间较长,请稍后再试,或换一个更具体的问题。":(Q==null?void 0:Q.code)==="REQUEST_ABORTED"||/aborted|abort|signal/i.test(ae)?"本次请求被中断了,请重新发送一次。":/Failed to fetch|NetworkError|Load failed|HTTP 50|HTTP 40/i.test(ae)||/[a-zA-Z]{4,}/.test(ae)?K:ae||K}function E(Q,K,ae=[]){P();const ie=String(K||""),he=ie.length>1200?36:ie.length>700?24:14;let Ee=0;const He=ae.length>0;M(Q,{fullText:ie,visibleText:"",streaming:!0,choices:[],charts:ae}),He&&Y();const xe=()=>{if(Ee=Math.min(Ee+he,ie.length),M(Q,{visibleText:ie.slice(0,Ee),streaming:Ee=ie.length){l=null,ae.length&&M(Q,{charts:ae},!1),r.value=!1;return}l=window.setTimeout(xe,18)};l=window.setTimeout(xe,0)}function P(){l&&(window.clearTimeout(l),l=null)}function F(Q){const K=G(Q).split(/\r?\n/),ae=[];let ie=[],he=!1;const Ee=()=>{ie.length&&(ae.push(`<${he?"ol":"ul"}>${ie.map(He=>`
  • ${V(He)}
  • `).join("")}`),ie=[],he=!1)};return K.forEach(He=>{const xe=He.trim();if(!xe){Ee();return}const Fe=xe.match(/^#{1,4}\s+(.+)$/)||xe.match(/^\*\*(.+)\*\*$/);if(Fe){Ee(),ae.push(`

    ${V(Fe[1])}

    `);return}const pt=xe.match(/^\d+[.)、]\s+(.+)$/),Ot=xe.match(/^[-*]\s+(.+)$/);if(pt||Ot){const bt=!!pt;ie.length&&he!==bt&&Ee(),he=bt,ie.push(pt?pt[1]:Ot[1]);return}Ee(),ae.push(`

    ${V(xe)}

    `)}),Ee(),ae.join("")}function V(Q){return Q.replace(/\*\*([^*]+)\*\*/g,"$1")}function G(Q){return String(Q||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function W(){return rn(this,null,function*(){yield Qs(),window.requestAnimationFrame(()=>{a.value&&(a.value.scrollTop=a.value.scrollHeight)})})}function Y(){return rn(this,null,function*(){yield Qs(),window.requestAnimationFrame(()=>{const Q=a.value,K=Q==null?void 0:Q.querySelector(".wisdom-message.is-assistant:last-child .wisdom-chart-list");if(!Q||!K)return;const ae=Q.getBoundingClientRect(),ie=K.getBoundingClientRect();Q.scrollTop+=ie.top-ae.top-12})})}return(Q,K)=>(Te(),Pe("div",mJe,[K[11]||(K[11]=pp('',1)),O("main",gJe,[O("div",{ref_key:"dialogueRef",ref:a,class:Xn(["wisdom-dialogue",{"is-empty":!i.value.length}])},[i.value.length?Dn("",!0):(Te(),Pe("section",yJe,[K[3]||(K[3]=O("div",{class:"wisdom-empty-mark"},[O("span"),O("strong",null,"AI")],-1)),K[4]||(K[4]=O("h2",null,"智慧管理问答",-1)),O("p",null,De(o.value),1),O("div",_Je,[(Te(),Pe(bn,null,Bn(s,ae=>O("button",{key:ae.question,type:"button",disabled:r.value,onClick:ie=>c(ae.question)},De(ae.label),9,SJe)),64))])])),(Te(!0),Pe(bn,null,Bn(i.value,ae=>{var ie,he,Ee,He,xe;return Te(),Pe("article",{key:ae.id,class:Xn(["wisdom-message",`is-${ae.role}`])},[ae.role==="assistant"?(Te(),Pe("div",bJe,[...K[5]||(K[5]=[O("span",null,"牧",-1)])])):Dn("",!0),O("div",xJe,[ae.role==="user"?(Te(),Pe(bn,{key:0},[kr(De(ae.text),1)],64)):(Te(),Pe(bn,{key:1},[(ie=ae.steps)!=null&&ie.length?(Te(),Pe("div",wJe,[(Te(!0),Pe(bn,null,Bn(ae.steps,Fe=>(Te(),Pe("div",{key:Fe,class:"wisdom-step"},[K[6]||(K[6]=O("span",null,null,-1)),kr(De(Fe),1)]))),128))])):Dn("",!0),ae.digesting?(Te(),Pe("div",TJe,[K[7]||(K[7]=O("span",null,null,-1)),K[8]||(K[8]=O("span",null,null,-1)),K[9]||(K[9]=O("span",null,null,-1)),O("em",null,De(ae.digestText||"小牧正在消化中"),1)])):Dn("",!0),(he=ae.charts)!=null&&he.length?(Te(),Pe("div",AJe,[(Te(!0),Pe(bn,null,Bn(ae.charts,Fe=>(Te(),Uo(Tr(e),{key:Fe.id,chart:Fe,onReady:W},null,8,["chart"]))),128))])):Dn("",!0),(Ee=ae.insights)!=null&&Ee.length?(Te(),Pe("div",CJe,[(Te(!0),Pe(bn,null,Bn(ae.insights,Fe=>(Te(),Pe("div",{key:`${Fe.label}-${Fe.value}`,class:"wisdom-insight-item"},[O("span",null,De(Fe.label),1),O("strong",null,De(Fe.value),1),O("em",null,De(Fe.note),1)]))),128))])):Dn("",!0),ae.visibleText?(Te(),Pe("div",{key:4,class:"wisdom-answer",innerHTML:F(ae.visibleText)},null,8,MJe)):Dn("",!0),ae.streaming?(Te(),Pe("span",EJe)):Dn("",!0),(He=ae.suggestions)!=null&&He.length&&(ae.allowFollowUp||!ae.digesting&&!ae.streaming)?(Te(),Pe("div",PJe,[(Te(!0),Pe(bn,null,Bn(ae.suggestions,Fe=>(Te(),Pe("button",{key:Fe.question,type:"button",disabled:r.value,onClick:pt=>c(Fe.question)},De(Fe.label),9,RJe))),128))])):Dn("",!0),(xe=ae.choices)!=null&&xe.length?(Te(),Pe("div",LJe,[(Te(!0),Pe(bn,null,Bn(ae.choices,(Fe,pt)=>(Te(),Pe("button",{key:`${Fe.key||"choice"}-${Fe.value||pt}`,type:"button",disabled:r.value,onClick:Ot=>f(Fe)},De(Fe.name||Fe.label||Fe.value),9,IJe))),128))])):Dn("",!0)],64))])],2)}),128))],2),O("form",{class:"wisdom-input-bar",onSubmit:K[2]||(K[2]=Ws(ae=>c(),["prevent"]))},[O("div",DJe,[K[10]||(K[10]=O("span",{class:"wisdom-input-icon"},null,-1)),to(O("input",{"onUpdate:modelValue":K[0]||(K[0]=ae=>t.value=ae),disabled:r.value,autocomplete:"off",placeholder:"输入牧户、区域或草畜平衡问题",onKeydown:K[1]||(K[1]=V2(Ws(ae=>c(),["prevent"]),["enter"]))},null,40,NJe),[[Kf,t.value]]),O("button",{type:"submit",disabled:r.value||!t.value.trim()},[r.value?(Te(),Pe("span",FJe)):Dn("",!0),O("span",null,De(r.value?"消化中":"发送"),1)],8,kJe)])],32)])]))}},u_=[{key:"home",label:"首页",bottomLabel:"核心指标",status:"ready"},{key:"forest-grass-wet",label:"林草湿一张图",bottomLabel:"林草湿",status:"ready"},{key:"ecological-protection",label:"生态保护",bottomLabel:"生态保护",status:"ready"},{key:"yak-management",label:"牦牛管理",bottomLabel:"牦牛管理",status:"ready"},{key:"pasture-management",label:"牧场管理",bottomLabel:"牧场管理",status:"ready"},{key:"yak-industry-chain",label:"牦牛产业全链",bottomLabel:"产业全链",status:"ready"},{key:"smart-management",label:"智慧管理",bottomLabel:"智慧管理",status:"ready"},{key:"grass-livestock-balance",label:"草畜平衡",bottomLabel:"草畜平衡",status:"ready"}];function BJe(n){return u_.find(e=>e.key===n)||u_[1]}const zJe={key:0,class:"platform-module-pane"},GJe={key:1,class:"platform-module-pane"},UJe={key:2,class:"platform-module-pane"},VJe={key:3,class:"platform-module-pane"},HJe={key:4,class:"platform-module-pane"},WJe={key:5,class:"platform-module-pane"},jJe={key:6,class:"platform-module-pane"},$Je={key:7,class:"platform-module-pane"},qJe={class:"large-screen-wrap"},XJe={class:"top-menu"},YJe={key:0,class:"top-menu-mid-space"},KJe={key:1,class:"module-coming"},ZJe={class:"module-coming-title"},JJe={key:2,class:"bottom-tray"},QJe={class:"bottom-menu"},eQe=["onClick"],tQe={key:8,class:"loading platform-loading"},nQe={class:"loading-progress"},iQe={class:"value"},rQe=1200,aQe={__name:"index",setup(n){const e=Wt("home"),t=Wt("national-park"),i=Wt({home:!0}),r=Wt({}),a=Wt(!0),o=Wt(0);let s=null,l=!1;const u=Date.now(),c={progress:0},d=["xiaoshoujine","zongxiaoliang","xiaoshoujine","zongxiaoliang"],h=Ye(()=>BJe(e.value)),f=Ye(()=>e.value==="ecological-protection"?HW:u_),p=Ye(()=>e.value==="ecological-protection"?t.value:e.value),m=Ye(()=>{const F=r.value[e.value];return Array.isArray(F)||F!=null&&F.length?F:I([{zh:"草地总面积",en:"",value:756.43,unit:"万亩",decimals:2},{zh:"林地总面积",en:"",value:177.92,unit:"万亩",decimals:2},{zh:"湿地面积",en:"",value:291.82,unit:"万亩",decimals:2}])});dl(()=>{s=d_.init({dh:1080,dw:1920,el:"#large-screen",resize:!0}),E()}),Bl(()=>{var F;(F=s==null?void 0:s.off)==null||F.call(s,"#large-screen"),ka.killTweensOf(c)});function v(F){D(F),e.value=F,Qs(E)}function g(F){if(e.value==="ecological-protection"){_(F.key),Qs(E);return}v(F.key)}function _(F){t.value=HW.some(V=>V.key===F)?F:"national-park",Qs(E)}function S(F){const V=F.moduleKey||(F.topicKey?"forest-grass-wet":e.value);r.value=tn(wt({},r.value),{[V]:I(F.items||[])})}function x(F={}){const V=typeof F=="number"?F:F.progress;C(V)}function A(){ka.killTweensOf(c),c.progress=100,o.value=100;const F=Date.now()-u,V=Math.max(180,rQe-F);window.setTimeout(M,V)}function C(F){if(!a.value)return;const V=Math.max(0,Math.min(100,Math.floor(Number(F)||0)));V{o.value=Math.floor(c.progress)}})}function M(){if(!a.value||l)return;l=!0;const F=ka.timeline({onComplete:()=>{a.value=!1}});F.to(".platform-loading .loading-text span",{y:"200%",opacity:0,ease:"power4.inOut",duration:1.4,stagger:.14}),F.to(".platform-loading .loading-progress",{opacity:0,ease:"power4.inOut",duration:1.2},"<"),F.to(".platform-loading",{opacity:0,ease:"power4.inOut",duration:.8},"-=0.55")}function I(F=[]){return F.slice(0,4).map((V,G)=>{var Q;const W=Number(V.value)||0,Y={zh:V.zh||V.name||`指标${G+1}`,en:V.en||"",value:W,unit:V.unit||"",decimals:(Q=V.decimals)!=null?Q:Number.isInteger(W)?0:2};return wt({icon:d[G%d.length]},Y)})}function D(F){["home","forest-grass-wet","ecological-protection","grass-livestock-balance","yak-management","pasture-management","yak-industry-chain","smart-management"].includes(F)&&(i.value[F]||(i.value=tn(wt({},i.value),{[F]:!0})))}function E(){window.scrollTo(0,0),document.documentElement.scrollTop=0,document.body.scrollTop=0;const F=document.querySelector("#app");F&&(F.scrollTop=0)}function P(){c0e()}return(F,V)=>(Te(),Pe("div",{class:Xn(["large-screen platform-screen",{"is-home":h.value.key==="home","is-forest-grass-wet":h.value.key==="forest-grass-wet","is-ecological-protection":h.value.key==="ecological-protection","is-grass-livestock-balance":h.value.key==="grass-livestock-balance","is-yak-management":h.value.key==="yak-management","is-pasture-management":h.value.key==="pasture-management","is-yak-industry-chain":h.value.key==="yak-industry-chain","is-smart-management":h.value.key==="smart-management"}]),id:"large-screen"},[i.value.home?to((Te(),Pe("div",zJe,[gn(qGe,{onLoadingProgress:x,onMapReady:A,onModuleStats:S})],512)),[[wd,h.value.key==="home"]]):Dn("",!0),i.value["forest-grass-wet"]?to((Te(),Pe("div",GJe,[gn(CUe,{"show-loading":!1,onTopicStats:S})],512)),[[wd,h.value.key==="forest-grass-wet"]]):Dn("",!0),i.value["ecological-protection"]?to((Te(),Pe("div",UJe,[gn(rXe,{"active-view":t.value,"show-loading":!1,onModuleStats:S,onViewChange:_},null,8,["active-view"])],512)),[[wd,h.value.key==="ecological-protection"]]):Dn("",!0),i.value["grass-livestock-balance"]?to((Te(),Pe("div",VJe,[gn(EYe,{onLoadingProgress:x,onMapReady:A,onModuleStats:S})],512)),[[wd,h.value.key==="grass-livestock-balance"]]):Dn("",!0),i.value["yak-management"]?to((Te(),Pe("div",HJe,[gn(IZe,{onModuleStats:S})],512)),[[wd,h.value.key==="yak-management"]]):Dn("",!0),i.value["pasture-management"]?to((Te(),Pe("div",WJe,[gn(HZe,{onLoadingProgress:x,onMapReady:A,onModuleStats:S})],512)),[[wd,h.value.key==="pasture-management"]]):Dn("",!0),i.value["yak-industry-chain"]?to((Te(),Pe("div",jJe,[gn(tJe,{onLoadingProgress:x,onMapReady:A,onModuleStats:S})],512)),[[wd,h.value.key==="yak-industry-chain"]]):Dn("",!0),i.value["smart-management"]?to((Te(),Pe("div",$Je,[gn(OJe)],512)),[[wd,h.value.key==="smart-management"]]):Dn("",!0),O("div",qJe,[gn(que,{title:"红原县数字畜牧业监管平台","sub-text":"Hongyuan Digital Animal Husbandry Supervision Platform"},{right:mi(()=>[O("div",{class:"m-header-tools"},[O("button",{class:"logout-button",title:"退出登录",type:"button",onClick:P}," 退出 ")])]),_:1}),O("div",XJe,[gn(Yue,{"default-active":e.value,onSelect:v},{default:mi(()=>[(Te(!0),Pe(bn,null,Bn(Tr(u_),(G,W)=>(Te(),Pe(bn,{key:G.key},[gn(Kue,{index:G.key},{default:mi(()=>[kr(De(G.label),1)]),_:2},1032,["index"]),W===3?(Te(),Pe("div",YJe)):Dn("",!0)],64))),128))]),_:1},8,["default-active"])]),m.value.length&&!["smart-management","grass-livestock-balance","yak-industry-chain"].includes(h.value.key)?(Te(),Pe("div",{key:0,class:Xn(["top-count-card",{"is-four":m.value.length>3}])},[(Te(!0),Pe(bn,null,Bn(m.value,G=>(Te(),Uo(oce,{key:G.zh,info:G},null,8,["info"]))),128))],2)):Dn("",!0),h.value.status!=="ready"?(Te(),Pe("div",KJe,[O("div",ZJe,De(h.value.label),1),V[0]||(V[0]=O("div",{class:"module-coming-text"},"模块建设中,平台框架已预留入口",-1))])):Dn("",!0),["home","forest-grass-wet","ecological-protection","grass-livestock-balance","yak-management","pasture-management","yak-industry-chain","smart-management"].includes(h.value.key)?Dn("",!0):(Te(),Pe("div",JJe,[gn(F5,{class:"bottom-svg-line-left",width:721,height:57,color:"#30DCFF",strokeWidth:2,dir:[0,1],length:50,path:"M1 56.6105C1 31.5123 185.586 10.0503 451.904 1.35519C458.942 1.12543 465.781 4.00883 470.505 9.22964L484.991 25.2383C487.971 28.4775 492.938 30.4201 498.254 30.4201H720.142"}),gn(F5,{class:"bottom-svg-line-left bottom-svg-line-right",width:721,height:57,color:"#30DCFF",strokeWidth:2,dir:[0,1],length:50,path:"M1 56.6105C1 31.5123 185.586 10.0503 451.904 1.35519C458.942 1.12543 465.781 4.00883 470.505 9.22964L484.991 25.2383C487.971 28.4775 492.938 30.4201 498.254 30.4201H720.142"}),V[1]||(V[1]=O("div",{class:"bottom-tray-arrow"},[O("img",{src:M5,alt:""}),O("img",{src:E5,alt:""})],-1)),O("div",QJe,[(Te(!0),Pe(bn,null,Bn(f.value,G=>(Te(),Pe("div",{key:G.key,class:Xn(["bottom-menu-item",{"is-active":G.key===p.value}]),onClick:W=>g(G)},[O("span",null,De(G.bottomLabel),1)],10,eQe))),128))]),V[2]||(V[2]=O("div",{class:"bottom-tray-arrow is-reverse"},[O("img",{src:M5,alt:""}),O("img",{src:E5,alt:""})],-1))])),V[3]||(V[3]=O("div",{class:"large-screen-left-zsline"},null,-1)),V[4]||(V[4]=O("div",{class:"large-screen-right-zsline"},null,-1))]),a.value?(Te(),Pe("div",tQe,[V[6]||(V[6]=pp('
    LOADING
    ',1)),O("div",nQe,[O("span",iQe,De(o.value),1),V[5]||(V[5]=O("span",{class:"unit"},"%",-1))])])):Dn("",!0)],2))}},hQe=Object.freeze(Object.defineProperty({__proto__:null,default:aQe},Symbol.toStringTag,{value:"Module"}));export{Ua as H,po as L,hQe as i};