月球大数据地理空间分析展示平台-【前端】-月球2期前端
WX
2023-07-12 d3591ce8dd26d4336dd99c27efb8d8f792d53cbd
Merge branch 'master' of http://192.168.20.39:8989/r/MoonWeb
已添加37个文件
已修改56个文件
已删除16个文件
6213 ■■■■ 文件已修改
public/CIMSDK.zip 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/CimSDK.min.js 1519 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/ThirdParty/FlowEcharts.js 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/AttributeCompression-10297289.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/AxisAlignedBoundingBox-73c388a7.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/BoundingRectangle-272c38cc.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/BoxGeometry-fa81cb29.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/Color-fb2d0086.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/CoplanarPolygonGeometryLibrary-616dd2ed.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/CorridorGeometryLibrary-e69b5c03.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/CylinderGeometry-80f4e5fa.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/EllipseGeometry-5054f965.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/EllipseGeometryLibrary-18d0a44c.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/EllipseOutlineGeometry-03a52f89.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/EllipsoidGeodesic-ec5fd429.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/EllipsoidGeometry-78610fac.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/EllipsoidOutlineGeometry-08bb8972.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/EllipsoidRhumbLine-2cf9c5ef.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/EllipsoidTangentPlane-a9681249.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/EncodedCartesian3-e8922703.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/FrustumGeometry-47bcac80.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/GeometryAttribute-642addba.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/GeometryInstance-8d112c0c.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/GeometryPipeline-a349886f.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/IntersectionTests-7b064f18.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/Matrix2-2fdcdec7.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/Matrix3-aeb3c326.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/OrientedBoundingBox-34fc6856.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/Plane-fbab0ca2.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/PolygonGeometryLibrary-9908e46b.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/PolygonPipeline-8efb7487.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/PolylinePipeline-482bb0f7.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/PolylineVolumeGeometryLibrary-7de9a48a.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/PrimitivePipeline-07eae5eb.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/RectangleGeometryLibrary-7aaf0b55.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/TerrainEncoding-692d7e68.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/Transforms-221c7c82.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/WallGeometryLibrary-c46d2ee9.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/WebMercatorProjection-bfe55882.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/combineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createBoxGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createBoxOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createCircleGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createCircleOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createCoplanarPolygonGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createCoplanarPolygonOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createCorridorGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createCorridorOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createCylinderGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createCylinderOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createEllipseGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createEllipseOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createEllipsoidGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createEllipsoidOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createFrustumGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createFrustumOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createGroundPolylineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createPlaneGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createPlaneOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createPolygonGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createPolygonOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createPolylineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createPolylineVolumeGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createPolylineVolumeOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createRectangleGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createRectangleOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createSimplePolylineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createSphereGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createSphereOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createVectorTileClampedPolylines.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createVectorTileGeometries.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createVectorTilePoints.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createVectorTilePolygons.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createVectorTilePolylines.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createVerticesFromHeightmap.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createVerticesFromQuantizedTerrainMesh.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createWallGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/createWallOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/decodeI3S.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Workers/upsampleQuantizedTerrainMesh.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/index.cjs 1519 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/index.js 1519 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/css/css.css 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/css/style.css 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/images/3css_globe_diffuse.jpg 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/images/css_1globe_halo.png 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/images/css_globe_bg.jpg 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/images/css_globe_diffuse.jpg 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/images/css_globe_halo.png 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/images/css_globe_halo.zip 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/index.html 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/js/Stats.js 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/js/TweenMax.min.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/js/css_globe_PerspectiveTransform.js 220 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/js/dat.gui.min.js 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/js/modernizr.min.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/js/prefixfree.min.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/mapscreen/js/script.js 352 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Map/config.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Map/index.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Map/server.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.ts 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/index.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/query/SpatialQuery.vue 388 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK.zip
Binary files differ
public/CIMSDK/CimSDK.min.js
ÎļþÌ«´ó
public/CIMSDK/ThirdParty/FlowEcharts.js
@@ -1,9 +1,9 @@
(()=>{var C5=Object.create;var OT=Object.defineProperty;var D5=Object.getOwnPropertyDescriptor;var M5=Object.getOwnPropertyNames;var I5=Object.getPrototypeOf,L5=Object.prototype.hasOwnProperty;var P5=(x,C)=>()=>(C||x((C={exports:{}}).exports,C),C.exports);var E5=(x,C,T,N)=>{if(C&&typeof C=="object"||typeof C=="function")for(let k of M5(C))!L5.call(x,k)&&k!==T&&OT(x,k,{get:()=>C[k],enumerable:!(N=D5(C,k))||N.enumerable});return x};var R5=(x,C,T)=>(T=x!=null?C5(I5(x)):{},E5(C||!x||!x.__esModule?OT(T,"default",{value:x,enumerable:!0}):T,x));var zT=P5((a3,kT)=>{var xa=function(x){x==null&&(x=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,x.constructor==Array?this.init_by_array(x,x.length):this.init_seed(x)};xa.prototype.init_seed=function(x){for(this.mt[0]=x>>>0,this.mti=1;this.mti<this.N;this.mti++){var x=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((x&4294901760)>>>16)*1812433253<<16)+(x&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};xa.prototype.init_by_array=function(x,C){var T,N,k;for(this.init_seed(19650218),T=1,N=0,k=this.N>C?this.N:C;k;k--){var F=this.mt[T-1]^this.mt[T-1]>>>30;this.mt[T]=(this.mt[T]^(((F&4294901760)>>>16)*1664525<<16)+(F&65535)*1664525)+x[N]+N,this.mt[T]>>>=0,T++,N++,T>=this.N&&(this.mt[0]=this.mt[this.N-1],T=1),N>=C&&(N=0)}for(k=this.N-1;k;k--){var F=this.mt[T-1]^this.mt[T-1]>>>30;this.mt[T]=(this.mt[T]^(((F&4294901760)>>>16)*1566083941<<16)+(F&65535)*1566083941)-T,this.mt[T]>>>=0,T++,T>=this.N&&(this.mt[0]=this.mt[this.N-1],T=1)}this.mt[0]=2147483648};xa.prototype.random_int=function(){var x,C=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var T;for(this.mti==this.N+1&&this.init_seed(5489),T=0;T<this.N-this.M;T++)x=this.mt[T]&this.UPPER_MASK|this.mt[T+1]&this.LOWER_MASK,this.mt[T]=this.mt[T+this.M]^x>>>1^C[x&1];for(;T<this.N-1;T++)x=this.mt[T]&this.UPPER_MASK|this.mt[T+1]&this.LOWER_MASK,this.mt[T]=this.mt[T+(this.M-this.N)]^x>>>1^C[x&1];x=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^x>>>1^C[x&1],this.mti=0}return x=this.mt[this.mti++],x^=x>>>11,x^=x<<7&2636928640,x^=x<<15&4022730752,x^=x>>>18,x>>>0};xa.prototype.random_int31=function(){return this.random_int()>>>1};xa.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};xa.prototype.random=function(){return this.random_int()*(1/4294967296)};xa.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};xa.prototype.random_long=function(){var x=this.random_int()>>>5,C=this.random_int()>>>6;return(x*67108864+C)*(1/9007199254740992)};kT.exports=xa});var NT={};(function(x,C){C(x.echarts={})})(NT,function(x){"use strict";var C;typeof window<"u"?C=window.__DEV__:typeof global<"u"&&(C=global.__DEV__),typeof C>"u"&&(C=!0);var T=C,N=2311,k=function(){return N++},F={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?F={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document>"u"&&typeof self<"u"?F={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator>"u"?F={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:F=St(navigator.userAgent);var G=F;function St(t){var e={},r={},a=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),n=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return a&&(r.firefox=!0,r.version=a[1]),i&&(r.ie=!0,r.version=i[1]),n&&(r.edge=!0,r.version=n[1]),o&&(r.weChat=!0),{browser:r,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect<"u",touchEventsSupported:"ontouchstart"in window&&!r.ie&&!r.edge,pointerEventsSupported:"onpointerdown"in window&&(r.edge||r.ie&&r.version>=11),domSupported:typeof document<"u"}}var Ct={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},te={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},de=Object.prototype.toString,Yt=Array.prototype,gr=Yt.forEach,en=Yt.filter,Pr=Yt.slice,UT=Yt.map,$T=Yt.reduce,lf={};function im(t,e){t==="createCanvas"&&(ll=null),lf[t]=e}function rt(t){if(t==null||typeof t!="object")return t;var e=t,r=de.call(t);if(r==="[object Array]"){if(!sn(t)){e=[];for(var a=0,i=t.length;a<i;a++)e[a]=rt(t[a])}}else if(te[r]){if(!sn(t)){var n=t.constructor;if(t.constructor.from)e=n.from(t);else{e=new n(t.length);for(var a=0,i=t.length;a<i;a++)e[a]=rt(t[a])}}}else if(!Ct[r]&&!sn(t)&&!nn(t)){e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=rt(t[o]))}return e}function ut(t,e,r){if(!lt(e)||!lt(t))return r?rt(e):t;for(var a in e)if(e.hasOwnProperty(a)){var i=t[a],n=e[a];lt(n)&&lt(i)&&!z(n)&&!z(i)&&!nn(n)&&!nn(i)&&!uf(n)&&!uf(i)&&!sn(n)&&!sn(i)?ut(i,n,r):(r||!(a in t))&&(t[a]=rt(e[a],!0))}return t}function go(t,e){for(var r=t[0],a=1,i=t.length;a<i;a++)r=ut(r,t[a],e);return r}function et(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function J(t,e,r){for(var a in e)e.hasOwnProperty(a)&&(r?e[a]!=null:t[a]==null)&&(t[a]=e[a]);return t}var rn=function(){return lf.createCanvas()};lf.createCanvas=function(){return document.createElement("canvas")};var ll;function nm(){return ll||(ll=rn().getContext("2d")),ll}function yt(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,a=t.length;r<a;r++)if(t[r]===e)return r}return-1}function It(t,e){var r=t.prototype;function a(){}a.prototype=e.prototype,t.prototype=new a;for(var i in r)r.hasOwnProperty(i)&&(t.prototype[i]=r[i]);t.prototype.constructor=t,t.superClass=e}function Dt(t,e,r){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,J(t,e,r)}function Qr(t){if(!!t)return typeof t=="string"?!1:typeof t.length=="number"}function M(t,e,r){if(!!(t&&e))if(t.forEach&&t.forEach===gr)t.forEach(e,r);else if(t.length===+t.length)for(var a=0,i=t.length;a<i;a++)e.call(r,t[a],a,t);else for(var n in t)t.hasOwnProperty(n)&&e.call(r,t[n],n,t)}function V(t,e,r){if(!!(t&&e)){if(t.map&&t.map===UT)return t.map(e,r);for(var a=[],i=0,n=t.length;i<n;i++)a.push(e.call(r,t[i],i,t));return a}}function an(t,e,r,a){if(!!(t&&e)){if(t.reduce&&t.reduce===$T)return t.reduce(e,r,a);for(var i=0,n=t.length;i<n;i++)r=e.call(a,r,t[i],i,t);return r}}function ee(t,e,r){if(!!(t&&e)){if(t.filter&&t.filter===en)return t.filter(e,r);for(var a=[],i=0,n=t.length;i<n;i++)e.call(r,t[i],i,t)&&a.push(t[i]);return a}}function om(t,e,r){if(!!(t&&e)){for(var a=0,i=t.length;a<i;a++)if(e.call(r,t[a],a,t))return t[a]}}function it(t,e){var r=Pr.call(arguments,2);return function(){return t.apply(e,r.concat(Pr.call(arguments)))}}function ot(t){var e=Pr.call(arguments,1);return function(){return t.apply(this,e.concat(Pr.call(arguments)))}}function z(t){return de.call(t)==="[object Array]"}function se(t){return typeof t=="function"}function Lt(t){return de.call(t)==="[object String]"}function lt(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function uf(t){return!!Ct[de.call(t)]}function pr(t){return!!te[de.call(t)]}function nn(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function po(t){return t!==t}function Ut(t){for(var e=0,r=arguments.length;e<r;e++)if(arguments[e]!=null)return arguments[e]}function Xt(t,e){return t??e}function ni(t,e,r){return t??e??r}function on(){return Function.call.apply(Pr,arguments)}function hf(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function gt(t,e){if(!t)throw new Error(e)}function tr(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var sm="__ec_primitive__";function ff(t){t[sm]=!0}function sn(t){return t[sm]}function ul(t){var e=z(t);this.data={};var r=this;t instanceof ul?t.each(a):t&&M(t,a);function a(i,n){e?r.set(i,n):r.set(n,i)}}ul.prototype={constructor:ul,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){e!==void 0&&(t=it(t,e));for(var r in this.data)this.data.hasOwnProperty(r)&&t(this.data[r],r)},removeKey:function(t){delete this.data[t]}};function ht(t){return new ul(t)}function cf(t,e){for(var r=new t.constructor(t.length+e.length),a=0;a<t.length;a++)r[a]=t[a];var i=t.length;for(a=0;a<e.length;a++)r[a+i]=e[a];return r}function ce(){}var ZT=(Object.freeze||Object)({$override:im,clone:rt,merge:ut,mergeAll:go,extend:et,defaults:J,createCanvas:rn,getContext:nm,indexOf:yt,inherits:It,mixin:Dt,isArrayLike:Qr,each:M,map:V,reduce:an,filter:ee,find:om,bind:it,curry:ot,isArray:z,isFunction:se,isString:Lt,isObject:lt,isBuiltInObject:uf,isTypedArray:pr,isDom:nn,eqNaN:po,retrieve:Ut,retrieve2:Xt,retrieve3:ni,slice:on,normalizeCssArray:hf,assert:gt,trim:tr,setAsPrimitive:ff,isPrimitive:sn,createHashMap:ht,concatArray:cf,noop:ce}),lm=typeof Float32Array>"u"?Array:Float32Array;function wa(t,e){var r=new lm(2);return t==null&&(t=0),e==null&&(e=0),r[0]=t,r[1]=e,r}function ge(t,e){return t[0]=e[0],t[1]=e[1],t}function mr(t){var e=new lm(2);return e[0]=t[0],e[1]=t[1],e}function um(t,e,r){return t[0]=e,t[1]=r,t}function vf(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function mo(t,e,r,a){return t[0]=e[0]+r[0]*a,t[1]=e[1]+r[1]*a,t}function Jr(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function yo(t){return Math.sqrt(df(t))}var YT=yo;function df(t){return t[0]*t[0]+t[1]*t[1]}var XT=df;function qT(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function KT(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function jT(t,e){return t[0]*e[0]+t[1]*e[1]}function hl(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function ln(t,e){var r=yo(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function _o(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ta=_o;function hm(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var ba=hm;function QT(t,e){return t[0]=-e[0],t[1]=-e[1],t}function fm(t,e,r,a){return t[0]=e[0]+a*(r[0]-e[0]),t[1]=e[1]+a*(r[1]-e[1]),t}function Pt(t,e,r){var a=e[0],i=e[1];return t[0]=r[0]*a+r[2]*i+r[4],t[1]=r[1]*a+r[3]*i+r[5],t}function ea(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function ra(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var JT=(Object.freeze||Object)({create:wa,copy:ge,clone:mr,set:um,add:vf,scaleAndAdd:mo,sub:Jr,len:yo,length:YT,lenSquare:df,lengthSquare:XT,mul:qT,div:KT,dot:jT,scale:hl,normalize:ln,distance:_o,dist:ta,distanceSquare:hm,distSquare:ba,negate:QT,lerp:fm,applyTransform:Pt,min:ea,max:ra});function fl(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}fl.prototype={constructor:fl,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(un(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var r=t.offsetX,a=t.offsetY,i=r-this._x,n=a-this._y;this._x=r,this._y=a,e.drift(i,n,t),this.dispatchToElement(un(e,t),"drag",t.event);var o=this.findHover(r,a,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(un(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(un(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(un(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(un(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};function un(t,e){return{target:t,topTarget:e&&e.topTarget}}var cm=Array.prototype.slice,le=function(t){this._$handlers={},this._$eventProcessor=t};le.prototype={constructor:le,one:function(t,e,r,a){return vm(this,t,e,r,a,!0)},on:function(t,e,r,a){return vm(this,t,e,r,a,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var r=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(r[t]){for(var a=[],i=0,n=r[t].length;i<n;i++)r[t][i].h!==e&&a.push(r[t][i]);r[t]=a}r[t]&&r[t].length===0&&delete r[t]}else delete r[t];return this},trigger:function(t){var e=this._$handlers[t],r=this._$eventProcessor;if(e){var a=arguments,i=a.length;i>3&&(a=cm.call(a,1));for(var n=e.length,o=0;o<n;){var s=e[o];if(r&&r.filter&&s.query!=null&&!r.filter(t,s.query)){o++;continue}switch(i){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,a[1]);break;case 3:s.h.call(s.ctx,a[1],a[2]);break;default:s.h.apply(s.ctx,a);break}s.one?(e.splice(o,1),n--):o++}}return r&&r.afterTrigger&&r.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],r=this._$eventProcessor;if(e){var a=arguments,i=a.length;i>4&&(a=cm.call(a,1,a.length-1));for(var n=a[a.length-1],o=e.length,s=0;s<o;){var l=e[s];if(r&&r.filter&&l.query!=null&&!r.filter(t,l.query)){s++;continue}switch(i){case 1:l.h.call(n);break;case 2:l.h.call(n,a[1]);break;case 3:l.h.call(n,a[1],a[2]);break;default:l.h.apply(n,a);break}l.one?(e.splice(s,1),o--):s++}}return r&&r.afterTrigger&&r.afterTrigger(t),this}};function tC(t,e){var r=t._$eventProcessor;return e!=null&&r&&r.normalizeQuery&&(e=r.normalizeQuery(e)),e}function vm(t,e,r,a,i,n){var o=t._$handlers;if(typeof r=="function"&&(i=a,a=r,r=null),!a||!e)return t;r=tC(t,r),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===a)return t;var l={h:a,one:n,query:r,ctx:i||t,callAtLast:a.zrEventfulCallAtLast},u=o[e].length-1,h=o[e][u];return h&&h.callAtLast?o[e].splice(u,0,l):o[e].push(l),t}var eC=Math.log(2);function gf(t,e,r,a,i,n){var o=a+"-"+i,s=t.length;if(n.hasOwnProperty(o))return n[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/eC);return t[r][l]}for(var u=a|1<<r,h=r+1;a&1<<h;)h++;for(var f=0,c=0,v=0;c<s;c++){var d=1<<c;d&i||(f+=(v%2?-1:1)*t[r][c]*gf(t,e-1,h,u,i|d,n),v++)}return n[o]=f,f}function dm(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],a={},i=gf(r,8,0,0,0,a);if(i!==0){for(var n=[],o=0;o<8;o++)for(var s=0;s<8;s++)n[s]==null&&(n[s]=0),n[s]+=((o+s)%2?-1:1)*gf(r,7,o===0?1:0,1<<o,1<<s,a)/i*e[o];return function(l,u,h){var f=u*n[6]+h*n[7]+1;l[0]=(u*n[0]+h*n[1]+n[2])/f,l[1]=(u*n[3]+h*n[4]+n[5])/f}}}var gm="___zrEVENTSAVED",pf=[];function rC(t,e,r,a,i){return mf(pf,e,a,i,!0)&&mf(t,r,pf[0],pf[1])}function mf(t,e,r,a,i){if(e.getBoundingClientRect&&G.domSupported&&!pm(e)){var n=e[gm]||(e[gm]={}),o=aC(e,n),s=iC(o,n,i);if(s)return s(t,r,a),!0}return!1}function aC(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var a=["left","right"],i=["top","bottom"],n=0;n<4;n++){var o=document.createElement("div"),s=o.style,l=n%2,u=(n>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",i[u]+":0",a[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function iC(t,e,r){for(var a=r?"invTrans":"trans",i=e[a],n=e.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),f=2*u,c=h.left,v=h.top;s.push(c,v),o=o&&n&&c===n[f]&&v===n[f+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return o&&i?i:(e.srcCoords=s,e[a]=r?dm(l,s):dm(s,l))}function pm(t){return t.nodeName.toUpperCase()==="CANVAS"}var yf=typeof window<"u"&&!!window.addEventListener,nC=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_f=[];function xf(t,e,r,a){return r=r||{},a||!G.canvasSupported?mm(t,e,r):G.browser.firefox&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):mm(t,e,r),r}function mm(t,e,r){if(G.domSupported&&t.getBoundingClientRect){var a=e.clientX,i=e.clientY;if(pm(t)){var n=t.getBoundingClientRect();r.zrX=a-n.left,r.zrY=i-n.top;return}else if(mf(_f,t,a,i)){r.zrX=_f[0],r.zrY=_f[1];return}}r.zrX=r.zrY=0}function wf(t){return t||window.event}function Er(t,e,r){if(e=wf(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(!i)xf(t,e,e,r),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;else{var n=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];n&&xf(t,n,e,r)}var o=e.button;return e.which==null&&o!==void 0&&nC.test(e.type)&&(e.which=o&1?1:o&2?3:o&4?2:0),e}function bf(t,e,r,a){yf?t.addEventListener(e,r,a):t.attachEvent("on"+e,r)}function oC(t,e,r,a){yf?t.removeEventListener(e,r,a):t.detachEvent("on"+e,r)}var oi=yf?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function ym(t){return t.which===2||t.which===3}var Sf=function(){this._track=[]};Sf.prototype={constructor:Sf,recognize:function(t,e,r){return this._doTrack(t,e,r),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,r){var a=t.touches;if(!!a){for(var i={points:[],touches:[],target:e,event:t},n=0,o=a.length;n<o;n++){var s=a[n],l=xf(r,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},_recognize:function(t){for(var e in Af)if(Af.hasOwnProperty(e)){var r=Af[e](this._track,t);if(r)return r}}};function _m(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function sC(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var Af={pinch:function(t,e){var r=t.length;if(!!r){var a=(t[r-1]||{}).points,i=(t[r-2]||{}).points||a;if(i&&i.length>1&&a&&a.length>1){var n=_m(a)/_m(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=sC(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},xm="silent";function lC(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:uC}}function uC(){oi(this.event)}function wm(){}wm.prototype.dispose=function(){};var hC=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],hn=function(t,e,r,a){le.call(this),this.storage=t,this.painter=e,this.painterRoot=a,r=r||new wm,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,fl.call(this),this.setHandlerProxy(r)};hn.prototype={constructor:hn,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(M(hC,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,r=t.zrY,a=bm(this,e,r),i=this._hovered,n=i.target;n&&!n.__zr&&(i=this.findHover(i.x,i.y),n=i.target);var o=this._hovered=a?{x:e,y:r}:this.findHover(e,r),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),n&&s!==n&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==n&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,r=t.zrIsToLocalDOM;e!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),e!=="no_globalout"&&!r&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var r=this[t];r&&r.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,r){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var i="on"+e,n=lC(e,t,r);a&&(a[i]&&(n.cancelBubble=a[i].call(a,n)),a.trigger(e,n),a=a.parent,!n.cancelBubble););n.cancelBubble||(this.trigger(e,n),this.painter&&this.painter.eachOtherLayer(function(o){typeof o[i]=="function"&&o[i].call(o,n),o.trigger&&o.trigger(e,n)}))}},findHover:function(t,e,r){for(var a=this.storage.getDisplayList(),i={x:t,y:e},n=a.length-1;n>=0;n--){var o;if(a[n]!==r&&!a[n].ignore&&(o=fC(a[n],t,e))&&(!i.topTarget&&(i.topTarget=a[n]),o!==xm)){i.target=a[n];break}}return i},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Sf);var r=this._gestureMgr;e==="start"&&r.clear();var a=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(e==="end"&&r.clear(),a){var i=a.type;t.gestureEvent=i,this.dispatchToElement({target:a.target},i,a.event)}}},M(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){hn.prototype[t]=function(e){var r=e.zrX,a=e.zrY,i=bm(this,r,a),n,o;if((t!=="mouseup"||!i)&&(n=this.findHover(r,a),o=n.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||ta(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});function fC(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var a=t,i;a;){if(a.clipPath&&!a.clipPath.contain(e,r))return!1;a.silent&&(i=!0),a=a.parent}return i?xm:!0}return!1}function bm(t,e,r){var a=t.painter;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}Dt(hn,le),Dt(hn,fl);var cC=typeof Float32Array>"u"?Array:Float32Array;function Ie(){var t=new cC(6);return fn(t),t}function fn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function xo(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Sa(t,e,r){var a=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],n=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=a,t[1]=i,t[2]=n,t[3]=o,t[4]=s,t[5]=l,t}function yr(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function aa(t,e,r){var a=e[0],i=e[2],n=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(r),h=Math.cos(r);return t[0]=a*h+o*u,t[1]=-a*u+o*h,t[2]=i*h+s*u,t[3]=-i*u+h*s,t[4]=h*n+u*l,t[5]=h*l-u*n,t}function wo(t,e,r){var a=r[0],i=r[1];return t[0]=e[0]*a,t[1]=e[1]*i,t[2]=e[2]*a,t[3]=e[3]*i,t[4]=e[4]*a,t[5]=e[5]*i,t}function cl(t,e){var r=e[0],a=e[2],i=e[4],n=e[1],o=e[3],s=e[5],l=r*o-n*a;return l?(l=1/l,t[0]=o*l,t[1]=-n*l,t[2]=-a*l,t[3]=r*l,t[4]=(a*s-o*i)*l,t[5]=(n*i-r*s)*l,t):null}function Sm(t){var e=Ie();return xo(e,t),e}var vC=(Object.freeze||Object)({create:Ie,identity:fn,copy:xo,mul:Sa,translate:yr,rotate:aa,scale:wo,invert:cl,clone:Sm}),Tf=fn,Am=5e-5;function si(t){return t>Am||t<-Am}var _r=function(t){t=t||{},t.position||(this.position=[0,0]),t.rotation==null&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},xr=_r.prototype;xr.transform=null,xr.needLocalTransform=function(){return si(this.rotation)||si(this.position[0])||si(this.position[1])||si(this.scale[0]-1)||si(this.scale[1]-1)};var li=[];xr.updateTransform=function(){var t=this.parent,e=t&&t.transform,r=this.needLocalTransform(),a=this.transform;if(!(r||e)){a&&Tf(a);return}a=a||Ie(),r?this.getLocalTransform(a):Tf(a),e&&(r?Sa(a,t.transform,a):xo(a,t.transform)),this.transform=a;var i=this.globalScaleRatio;if(i!=null&&i!==1){this.getGlobalScale(li);var n=li[0]<0?-1:1,o=li[1]<0?-1:1,s=((li[0]-n)*i+n)/li[0]||0,l=((li[1]-o)*i+o)/li[1]||0;a[0]*=s,a[1]*=s,a[2]*=l,a[3]*=l}this.invTransform=this.invTransform||Ie(),cl(this.invTransform,a)},xr.getLocalTransform=function(t){return _r.getLocalTransform(this,t)},xr.setTransform=function(t){var e=this.transform,r=t.dpr||1;e?t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5]):t.setTransform(r,0,0,r,0,0)},xr.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var cn=[],Cf=Ie();xr.setLocalTransform=function(t){if(!!t){var e=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],a=this.position,i=this.scale;si(e-1)&&(e=Math.sqrt(e)),si(r-1)&&(r=Math.sqrt(r)),t[0]<0&&(e=-e),t[3]<0&&(r=-r),a[0]=t[4],a[1]=t[5],i[0]=e,i[1]=r,this.rotation=Math.atan2(-t[1]/r,t[0]/e)}},xr.decomposeTransform=function(){if(!!this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Sa(cn,t.invTransform,e),e=cn);var r=this.origin;r&&(r[0]||r[1])&&(Cf[4]=r[0],Cf[5]=r[1],Sa(cn,e,Cf),cn[4]-=r[0],cn[5]-=r[1],e=cn),this.setLocalTransform(e)}},xr.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},xr.transformCoordToLocal=function(t,e){var r=[t,e],a=this.invTransform;return a&&Pt(r,r,a),r},xr.transformCoordToGlobal=function(t,e){var r=[t,e],a=this.transform;return a&&Pt(r,r,a),r},_r.getLocalTransform=function(t,e){e=e||[],Tf(e);var r=t.origin,a=t.scale||[1,1],i=t.rotation||0,n=t.position||[0,0];return r&&(e[4]-=r[0],e[5]-=r[1]),wo(e,e,a),i&&aa(e,e,i),r&&(e[4]+=r[0],e[5]+=r[1]),e[4]+=n[0],e[5]+=n[1],e};var vl={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)))},elasticOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/a)+1)},elasticInOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-vl.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?vl.bounceIn(t*2)*.5:vl.bounceOut(t*2-1)*.5+.5}};function Df(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=t.loop==null?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}Df.prototype={constructor:Df,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused){this._pausedTime+=e;return}var r=(t-this._startTime-this._pausedTime)/this._life;if(!(r<0)){r=Math.min(r,1);var a=this.easing,i=typeof a=="string"?vl[a]:a,n=typeof i=="function"?i(r):r;return this.fire("frame",n),r===1?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Tm=function(){this.head=null,this.tail=null,this._len=0},bo=Tm.prototype;bo.insert=function(t){var e=new Cm(t);return this.insertEntry(e),e},bo.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},bo.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._len--},bo.len=function(){return this._len},bo.clear=function(){this.head=this.tail=null,this._len=0};var Cm=function(t){this.value=t,this.next,this.prev},Mf=function(t){this._list=new Tm,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},If=Mf.prototype;If.put=function(t,e){var r=this._list,a=this._map,i=null;if(a[t]==null){var n=r.len(),o=this._lastRemovedEntry;if(n>=this._maxSize&&n>0){var s=r.head;r.remove(s),delete a[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new Cm(e),o.key=t,r.insertEntry(o),a[t]=o}return i},If.get=function(t){var e=this._map[t],r=this._list;if(e!=null)return e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value},If.clear=function(){this._list.clear(),this._map={}};var Dm={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 wr(t){return t=Math.round(t),t<0?0:t>255?255:t}function dC(t){return t=Math.round(t),t<0?0:t>360?360:t}function So(t){return t<0?0:t>1?1:t}function Lf(t){return t.length&&t.charAt(t.length-1)==="%"?wr(parseFloat(t)/100*255):wr(parseInt(t,10))}function vn(t){return t.length&&t.charAt(t.length-1)==="%"?So(parseFloat(t)/100):So(parseFloat(t))}function Pf(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Aa(t,e,r){return t+(e-t)*r}function br(t,e,r,a,i){return t[0]=e,t[1]=r,t[2]=a,t[3]=i,t}function Ef(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Mm=new Mf(20),dl=null;function dn(t,e){dl&&Ef(dl,e),dl=Mm.put(t,dl||e.slice())}function Ve(t,e){if(!!t){e=e||[];var r=Mm.get(t);if(r)return Ef(e,r);t=t+"";var a=t.replace(/ /g,"").toLowerCase();if(a in Dm)return Ef(e,Dm[a]),dn(t,e),e;if(a.charAt(0)==="#"){if(a.length===4){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=4095)){br(e,0,0,0,1);return}return br(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,1),dn(t,e),e}else if(a.length===7){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=16777215)){br(e,0,0,0,1);return}return br(e,(i&16711680)>>16,(i&65280)>>8,i&255,1),dn(t,e),e}return}var n=a.indexOf("("),o=a.indexOf(")");if(n!==-1&&o+1===a.length){var s=a.substr(0,n),l=a.substr(n+1,o-(n+1)).split(","),u=1;switch(s){case"rgba":if(l.length!==4){br(e,0,0,0,1);return}u=vn(l.pop());case"rgb":if(l.length!==3){br(e,0,0,0,1);return}return br(e,Lf(l[0]),Lf(l[1]),Lf(l[2]),u),dn(t,e),e;case"hsla":if(l.length!==4){br(e,0,0,0,1);return}return l[3]=vn(l[3]),Rf(l,e),dn(t,e),e;case"hsl":if(l.length!==3){br(e,0,0,0,1);return}return Rf(l,e),dn(t,e),e;default:return}}br(e,0,0,0,1)}}function Rf(t,e){var r=(parseFloat(t[0])%360+360)%360/360,a=vn(t[1]),i=vn(t[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],br(e,wr(Pf(o,n,r+1/3)*255),wr(Pf(o,n,r)*255),wr(Pf(o,n,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function gC(t){if(!!t){var e=t[0]/255,r=t[1]/255,a=t[2]/255,i=Math.min(e,r,a),n=Math.max(e,r,a),o=n-i,s=(n+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+i):u=o/(2-n-i);var h=((n-e)/6+o/2)/o,f=((n-r)/6+o/2)/o,c=((n-a)/6+o/2)/o;e===n?l=c-f:r===n?l=1/3+h-c:a===n&&(l=2/3+f-h),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function Im(t,e){var r=Ve(t);if(r){for(var a=0;a<3;a++)e<0?r[a]=r[a]*(1-e)|0:r[a]=(255-r[a])*e+r[a]|0,r[a]>255?r[a]=255:t[a]<0&&(r[a]=0);return ia(r,r.length===4?"rgba":"rgb")}}function Of(t){var e=Ve(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ao(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var a=t*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=e[i],s=e[n],l=a-i;return r[0]=wr(Aa(o[0],s[0],l)),r[1]=wr(Aa(o[1],s[1],l)),r[2]=wr(Aa(o[2],s[2],l)),r[3]=So(Aa(o[3],s[3],l)),r}}var pC=Ao;function Lm(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var a=t*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=Ve(e[i]),s=Ve(e[n]),l=a-i,u=ia([wr(Aa(o[0],s[0],l)),wr(Aa(o[1],s[1],l)),wr(Aa(o[2],s[2],l)),So(Aa(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}var mC=Lm;function gn(t,e,r,a){if(t=Ve(t),t)return t=gC(t),e!=null&&(t[0]=dC(e)),r!=null&&(t[1]=vn(r)),a!=null&&(t[2]=vn(a)),ia(Rf(t),"rgba")}function gl(t,e){if(t=Ve(t),t&&e!=null)return t[3]=So(e),ia(t,"rgba")}function ia(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}var yC=(Object.freeze||Object)({parse:Ve,lift:Im,toHex:Of,fastLerp:Ao,fastMapToColor:pC,lerp:Lm,mapToColor:mC,modifyHSL:gn,modifyAlpha:gl,stringify:ia}),Nf=Array.prototype.slice;function _C(t,e){return t[e]}function xC(t,e,r){t[e]=r}function kf(t,e,r){return(e-t)*r+t}function Pm(t,e,r){return r>.5?e:t}function Em(t,e,r,a,i){var n=t.length;if(i===1)for(var o=0;o<n;o++)a[o]=kf(t[o],e[o],r);else for(var s=n&&t[0].length,o=0;o<n;o++)for(var l=0;l<s;l++)a[o][l]=kf(t[o][l],e[o][l],r)}function Rm(t,e,r){var a=t.length,i=e.length;if(a!==i){var n=a>i;if(n)t.length=i;else for(var o=a;o<i;o++)t.push(r===1?e[o]:Nf.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;o<t.length;o++)if(r===1)isNaN(t[o])&&(t[o]=e[o]);else for(var l=0;l<s;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function wC(t,e,r){if(t===e)return!0;var a=t.length;if(a!==e.length)return!1;if(r===1){for(var i=0;i<a;i++)if(t[i]!==e[i])return!1}else for(var n=t[0].length,i=0;i<a;i++)for(var o=0;o<n;o++)if(t[i][o]!==e[i][o])return!1;return!0}function Om(t,e,r,a,i,n,o,s,l){var u=t.length;if(l===1)for(var h=0;h<u;h++)s[h]=zf(t[h],e[h],r[h],a[h],i,n,o);else for(var f=t[0].length,h=0;h<u;h++)for(var c=0;c<f;c++)s[h][c]=zf(t[h][c],e[h][c],r[h][c],a[h][c],i,n,o)}function zf(t,e,r,a,i,n,o){var s=(r-t)*.5,l=(a-e)*.5;return(2*(e-r)+s+l)*o+(-3*(e-r)-2*s-l)*n+s*i+e}function bC(t){if(Qr(t)){var e=t.length;if(Qr(t[0])){for(var r=[],a=0;a<e;a++)r.push(Nf.call(t[a]));return r}return Nf.call(t)}return t}function Nm(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function SC(t){var e=t[t.length-1].value;return Qr(e&&e[0])?2:1}function AC(t,e,r,a,i,n){var o=t._getter,s=t._setter,l=e==="spline",u=a.length;if(!!u){var h=a[0].value,f=Qr(h),c=!1,v=!1,d=f?SC(a):0,g;a.sort(function(Q,j){return Q.time-j.time}),g=a[u-1].time;for(var p=[],m=[],y=a[0].value,_=!0,w=0;w<u;w++){p.push(a[w].time/g);var b=a[w].value;if(f&&wC(b,y,d)||!f&&b===y||(_=!1),y=b,typeof b=="string"){var A=Ve(b);A?(b=A,c=!0):v=!0}m.push(b)}if(!(!n&&_)){for(var S=m[u-1],w=0;w<u-1;w++)f?Rm(m[w],S,d):isNaN(m[w])&&!isNaN(S)&&!v&&!c&&(m[w]=S);f&&Rm(o(t._target,i),S,d);var D=0,I=0,L,P,R,E,Z,W;if(c)var $=[0,0,0,0];var X=function(Q,j){var U;if(j<0)U=0;else if(j<I){for(L=Math.min(D+1,u-1),U=L;U>=0&&!(p[U]<=j);U--);U=Math.min(U,u-2)}else{for(U=D;U<u&&!(p[U]>j);U++);U=Math.min(U-1,u-2)}D=U,I=j;var tt=p[U+1]-p[U];if(tt!==0)if(P=(j-p[U])/tt,l)if(E=m[U],R=m[U===0?U:U-1],Z=m[U>u-2?u-1:U+1],W=m[U>u-3?u-1:U+2],f)Om(R,E,Z,W,P,P*P,P*P*P,o(Q,i),d);else{var ct;if(c)ct=Om(R,E,Z,W,P,P*P,P*P*P,$,1),ct=Nm($);else{if(v)return Pm(E,Z,P);ct=zf(R,E,Z,W,P,P*P,P*P*P)}s(Q,i,ct)}else if(f)Em(m[U],m[U+1],P,o(Q,i),d);else{var ct;if(c)Em(m[U],m[U+1],P,$,1),ct=Nm($);else{if(v)return Pm(m[U],m[U+1],P);ct=kf(m[U],m[U+1],P)}s(Q,i,ct)}},K=new Df({target:t._target,life:g,loop:t._loop,delay:t._delay,onframe:X,ondestroy:r});return e&&e!=="spline"&&(K.easing=e),K}}}var Bf=function(t,e,r,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=r||_C,this._setter=a||xC,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Bf.prototype={when:function(t,e){var r=this._tracks;for(var a in e)if(!!e.hasOwnProperty(a)){if(!r[a]){r[a]=[];var i=this._getter(this._target,a);if(i==null)continue;t!==0&&r[a].push({time:0,value:bC(i)})}r[a].push({time:t,value:e[a]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,r=0;r<e;r++)t[r].call(this)},start:function(t,e){var r=this,a=0,i=function(){a--,a||r._doneCallback()},n;for(var o in this._tracks)if(!!this._tracks.hasOwnProperty(o)){var s=AC(this,t,i,this._tracks[o],o,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(u,h){l(u,h);for(var f=0;f<r._onframeList.length;f++)r._onframeList[f](u,h)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,r=this.animation,a=0;a<e.length;a++){var i=e[a];t&&i.onframe(this._target,1),r&&r.removeClip(i)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var km=1;typeof window<"u"&&(km=Math.max(window.devicePixelRatio||1,1));var TC=0,pl=km,zm=function(){};TC===1&&(zm=console.error);var Ta=zm,ml=function(){this.animators=[]};ml.prototype={constructor:ml,animate:function(t,e){var r,a=!1,i=this,n=this.__zr;if(t){var o=t.split("."),s=i;a=o[0]==="shape";for(var l=0,u=o.length;l<u;l++)!s||(s=s[o[l]]);s&&(r=s)}else r=i;if(!r){Ta('Property "'+t+'" is not existed in element '+i.id);return}var h=i.animators,f=new Bf(r,e);return f.during(function(c){i.dirty(a)}).done(function(){h.splice(yt(h,f),1)}),h.push(f),n&&n.animation.addAnimator(f),f},stopAnimation:function(t){for(var e=this.animators,r=e.length,a=0;a<r;a++)e[a].stop(t);return e.length=0,this},animateTo:function(t,e,r,a,i,n){Bm(this,t,e,r,a,i,n)},animateFrom:function(t,e,r,a,i,n){Bm(this,t,e,r,a,i,n,!0)}};function Bm(t,e,r,a,i,n,o,s){Lt(a)?(n=i,i=a,a=0):se(i)?(n=i,i="linear",a=0):se(a)?(n=a,a=0):se(r)?(n=r,r=500):r||(r=500),t.stopAnimation(),Vm(t,"",t,e,r,a,s);var l=t.animators.slice(),u=l.length;function h(){u--,u||n&&n()}u||n&&n();for(var f=0;f<l.length;f++)l[f].done(h).start(i,o)}function Vm(t,e,r,a,i,n,o){var s={},l=0;for(var u in a)!a.hasOwnProperty(u)||(r[u]!=null?lt(a[u])&&!Qr(a[u])?Vm(t,e?e+"."+u:u,r[u],a[u],i,n,o):(o?(s[u]=r[u],Gm(t,e,u,a[u])):s[u]=a[u],l++):a[u]!=null&&!o&&Gm(t,e,u,a[u]));l>0&&t.animate(e,!1).when(i??500,s).delay(n||0)}function Gm(t,e,r,a){if(!e)t.attr(r,a);else{var i={};i[e]={},i[e][r]=a,t.attr(i)}}var na=function(t){_r.call(this,t),le.call(this,t),ml.call(this,t),this.id=t.id||k()};na.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if(t==="position"||t==="scale"||t==="origin"){if(e){var r=this[t];r||(r=this[t]=[]),r[0]=e[0],r[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(lt(t))for(var r in t)t.hasOwnProperty(r)&&this.attrKV(r,t[r]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.addAnimator(e[r]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.removeAnimator(e[r]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},Dt(na,ml),Dt(na,_r),Dt(na,le);var yl=Pt,_l=Math.min,xl=Math.max;function vt(t,e,r,a){r<0&&(t=t+r,r=-r),a<0&&(e=e+a,a=-a),this.x=t,this.y=e,this.width=r,this.height=a}vt.prototype={constructor:vt,union:function(t){var e=_l(t.x,this.x),r=_l(t.y,this.y);this.width=xl(t.x+t.width,this.x+this.width)-e,this.height=xl(t.y+t.height,this.y+this.height)-r,this.x=e,this.y=r},applyTransform:function(){var t=[],e=[],r=[],a=[];return function(i){if(!!i){t[0]=r[0]=this.x,t[1]=a[1]=this.y,e[0]=a[0]=this.x+this.width,e[1]=r[1]=this.y+this.height,yl(t,t,i),yl(e,e,i),yl(r,r,i),yl(a,a,i),this.x=_l(t[0],e[0],r[0],a[0]),this.y=_l(t[1],e[1],r[1],a[1]);var n=xl(t[0],e[0],r[0],a[0]),o=xl(t[1],e[1],r[1],a[1]);this.width=n-this.x,this.height=o-this.y}}}(),calculateTransform:function(t){var e=this,r=t.width/e.width,a=t.height/e.height,i=Ie();return yr(i,i,[-e.x,-e.y]),wo(i,i,[r,a]),yr(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof vt||(t=vt.create(t));var e=this,r=e.x,a=e.x+e.width,i=e.y,n=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(a<o||s<r||n<l||u<i)},contain:function(t,e){var r=this;return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},clone:function(){return new vt(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},vt.create=function(t){return new vt(t.x,t.y,t.width,t.height)};var q=function(t){t=t||{},na.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};q.prototype={constructor:q,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,r=0;r<e.length;r++)if(e[r].name===t)return e[r]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var r=this._children,a=r.indexOf(e);a>=0&&(r.splice(a,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,r=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof q&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var e=this.__zr,r=this.__storage,a=this._children,i=yt(a,t);return i<0?this:(a.splice(i,1),t.parent=null,r&&(r.delFromStorage(t),t instanceof q&&t.delChildrenFromStorage(r)),e&&e.refresh(),this)},removeAll:function(){var t=this._children,e=this.__storage,r,a;for(a=0;a<t.length;a++)r=t[a],e&&(e.delFromStorage(r),r instanceof q&&r.delChildrenFromStorage(e)),r.parent=null;return t.length=0,this},eachChild:function(t,e){for(var r=this._children,a=0;a<r.length;a++){var i=r[a];t.call(e,i,a)}return this},traverse:function(t,e){for(var r=0;r<this._children.length;r++){var a=this._children[r];t.call(e,a),a.type==="group"&&a.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.addToStorage(r),r instanceof q&&r.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.delFromStorage(r),r instanceof q&&r.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,r=new vt(0,0,0,0),a=t||this._children,i=[],n=0;n<a.length;n++){var o=a[n];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),l=o.getLocalTransform(i);l?(r.copy(s),r.applyTransform(l),e=e||r.clone(),e.union(r)):(e=e||s.clone(),e.union(s))}}return e||r}},It(q,na);var Hm=32,To=7;function CC(t){for(var e=0;t>=Hm;)e|=t&1,t>>=1;return t+e}function Fm(t,e,r,a){var i=e+1;if(i===r)return 1;if(a(t[i++],t[e])<0){for(;i<r&&a(t[i],t[i-1])<0;)i++;DC(t,e,i)}else for(;i<r&&a(t[i],t[i-1])>=0;)i++;return i-e}function DC(t,e,r){for(r--;e<r;){var a=t[e];t[e++]=t[r],t[r--]=a}}function Wm(t,e,r,a,i){for(a===e&&a++;a<r;a++){for(var n=t[a],o=e,s=a,l;o<s;)l=o+s>>>1,i(n,t[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=n}}function Vf(t,e,r,a,i,n){var o=0,s=0,l=1;if(n(t,e[r+i])>0){for(s=a-i;l<s&&n(t,e[r+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&n(t,e[r+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var h=o+(l-o>>>1);n(t,e[r+h])>0?o=h+1:l=h}return l}function Gf(t,e,r,a,i,n){var o=0,s=0,l=1;if(n(t,e[r+i])<0){for(s=i+1;l<s&&n(t,e[r+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=a-i;l<s&&n(t,e[r+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var h=o+(l-o>>>1);n(t,e[r+h])<0?l=h:o=h+1}return l}function MC(t,e){var r=To,a,i,n=0,o=[];a=[],i=[];function s(v,d){a[n]=v,i[n]=d,n+=1}function l(){for(;n>1;){var v=n-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]<i[v+1]&&v--;else if(i[v]>i[v+1])break;h(v)}}function u(){for(;n>1;){var v=n-2;v>0&&i[v-1]<i[v+1]&&v--,h(v)}}function h(v){var d=a[v],g=i[v],p=a[v+1],m=i[v+1];i[v]=g+m,v===n-3&&(a[v+1]=a[v+2],i[v+1]=i[v+2]),n--;var y=Gf(t[p],t,d,g,0,e);d+=y,g-=y,g!==0&&(m=Vf(t[d+g-1],t,p,m,m-1,e),m!==0&&(g<=m?f(d,g,p,m):c(d,g,p,m)))}function f(v,d,g,p){var m=0;for(m=0;m<d;m++)o[m]=t[v+m];var y=0,_=g,w=v;if(t[w++]=t[_++],--p===0){for(m=0;m<d;m++)t[w+m]=o[y+m];return}if(d===1){for(m=0;m<p;m++)t[w+m]=t[_+m];t[w+p]=o[y];return}for(var b=r,A,S,D;;){A=0,S=0,D=!1;do if(e(t[_],o[y])<0){if(t[w++]=t[_++],S++,A=0,--p===0){D=!0;break}}else if(t[w++]=o[y++],A++,S=0,--d===1){D=!0;break}while((A|S)<b);if(D)break;do{if(A=Gf(t[_],o,y,d,0,e),A!==0){for(m=0;m<A;m++)t[w+m]=o[y+m];if(w+=A,y+=A,d-=A,d<=1){D=!0;break}}if(t[w++]=t[_++],--p===0){D=!0;break}if(S=Vf(o[y],t,_,p,0,e),S!==0){for(m=0;m<S;m++)t[w+m]=t[_+m];if(w+=S,_+=S,p-=S,p===0){D=!0;break}}if(t[w++]=o[y++],--d===1){D=!0;break}b--}while(A>=To||S>=To);if(D)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),d===1){for(m=0;m<p;m++)t[w+m]=t[_+m];t[w+p]=o[y]}else{if(d===0)throw new Error;for(m=0;m<d;m++)t[w+m]=o[y+m]}}function c(v,d,g,p){var m=0;for(m=0;m<p;m++)o[m]=t[g+m];var y=v+d-1,_=p-1,w=g+p-1,b=0,A=0;if(t[w--]=t[y--],--d===0){for(b=w-(p-1),m=0;m<p;m++)t[b+m]=o[m];return}if(p===1){for(w-=d,y-=d,A=w+1,b=y+1,m=d-1;m>=0;m--)t[A+m]=t[b+m];t[w]=o[_];return}for(var S=r;;){var D=0,I=0,L=!1;do if(e(o[_],t[y])<0){if(t[w--]=t[y--],D++,I=0,--d===0){L=!0;break}}else if(t[w--]=o[_--],I++,D=0,--p===1){L=!0;break}while((D|I)<S);if(L)break;do{if(D=d-Gf(o[_],t,v,d,d-1,e),D!==0){for(w-=D,y-=D,d-=D,A=w+1,b=y+1,m=D-1;m>=0;m--)t[A+m]=t[b+m];if(d===0){L=!0;break}}if(t[w--]=o[_--],--p===1){L=!0;break}if(I=p-Vf(t[y],o,0,p,p-1,e),I!==0){for(w-=I,_-=I,p-=I,A=w+1,b=_+1,m=0;m<I;m++)t[A+m]=o[b+m];if(p<=1){L=!0;break}}if(t[w--]=t[y--],--d===0){L=!0;break}S--}while(D>=To||I>=To);if(L)break;S<0&&(S=0),S+=2}if(r=S,r<1&&(r=1),p===1){for(w-=d,y-=d,A=w+1,b=y+1,m=d-1;m>=0;m--)t[A+m]=t[b+m];t[w]=o[_]}else{if(p===0)throw new Error;for(b=w-(p-1),m=0;m<p;m++)t[b+m]=o[m]}}this.mergeRuns=l,this.forceMergeRuns=u,this.pushRun=s}function wl(t,e,r,a){r||(r=0),a||(a=t.length);var i=a-r;if(!(i<2)){var n=0;if(i<Hm){n=Fm(t,r,a,e),Wm(t,r,a,r+n,e);return}var o=new MC(t,e),s=CC(i);do{if(n=Fm(t,r,a,e),n<s){var l=i;l>s&&(l=s),Wm(t,r,r+l,r+n,e),n=l}o.pushRun(r,n),o.mergeRuns(),i-=n,r+=n}while(i!==0);o.forceMergeRuns()}}function Um(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Hf=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Hf.prototype={constructor:Hf,traverse:function(t,e){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,r=this._displayList,a=0,i=e.length;a<i;a++)this._updateAndAddDisplayable(e[a],null,t);r.length=this._displayListLen,G.canvasSupported&&wl(r,Um)},_updateAndAddDisplayable:function(t,e,r){if(!(t.ignore&&!r)){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var a=t.clipPath;if(a){e?e=e.slice():e=[];for(var i=a,n=t;i;)i.parent=n,i.updateTransform(),e.push(i),n=i,i=i.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,r)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof q&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(t==null){for(var e=0;e<this._roots.length;e++){var r=this._roots[e];r instanceof q&&r.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(t instanceof Array){for(var e=0,a=t.length;e<a;e++)this.delRoot(t[e]);return}var i=yt(this._roots,t);i>=0&&(this.delFromStorage(t),this._roots.splice(i,1),t instanceof q&&t.delChildrenFromStorage(this))},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Um};var IC={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Ff=function(t,e,r){return IC.hasOwnProperty(e)?r*=t.dpr:r},Ca={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Wf=9,bl=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Da=function(t){this.extendFrom(t,!1)};function LC(t,e,r){var a=e.x==null?0:e.x,i=e.x2==null?1:e.x2,n=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(a=a*r.width+r.x,i=i*r.width+r.x,n=n*r.height+r.y,o=o*r.height+r.y),a=isNaN(a)?0:a,i=isNaN(i)?1:i,n=isNaN(n)?0:n,o=isNaN(o)?0:o;var s=t.createLinearGradient(a,n,i,o);return s}function PC(t,e,r){var a=r.width,i=r.height,n=Math.min(a,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*a+r.x,s=s*i+r.y,l=l*n);var u=t.createRadialGradient(o,s,0,o,s,l);return u}Da.prototype={constructor:Da,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,r){var a=this,i=r&&r.style,n=!i||t.__attrCachedBy!==Ca.STYLE_BIND;t.__attrCachedBy=Ca.STYLE_BIND;for(var o=0;o<bl.length;o++){var s=bl[o],l=s[0];(n||a[l]!==i[l])&&(t[l]=Ff(t,l,a[l]||s[1]))}if((n||a.fill!==i.fill)&&(t.fillStyle=a.fill),(n||a.stroke!==i.stroke)&&(t.strokeStyle=a.stroke),(n||a.opacity!==i.opacity)&&(t.globalAlpha=a.opacity==null?1:a.opacity),(n||a.blend!==i.blend)&&(t.globalCompositeOperation=a.blend||"source-over"),this.hasStroke()){var u=a.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return t!=null&&t!=="none"},hasStroke:function(){var t=this.stroke;return t!=null&&t!=="none"&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var r in t)t.hasOwnProperty(r)&&(e===!0||(e===!1?!this.hasOwnProperty(r):t[r]!=null))&&(this[r]=t[r])},set:function(t,e){typeof t=="string"?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,r){for(var a=e.type==="radial"?PC:LC,i=a(t,e,r),n=e.colorStops,o=0;o<n.length;o++)i.addColorStop(n[o].offset,n[o].color);return i}};for(var Uf=Da.prototype,$f=0;$f<bl.length;$f++){var Zf=bl[$f];Zf[0]in Uf||(Uf[Zf[0]]=Zf[1])}Da.getGradient=Uf.getGradient;var Yf=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};Yf.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};function EC(){return!1}function $m(t,e,r){var a=rn(),i=e.getWidth(),n=e.getHeight(),o=a.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=i+"px",o.height=n+"px",a.setAttribute("data-zr-dom-id",t)),a.width=i*r,a.height=n*r,a}var Co=function(t,e,r){var a;r=r||pl,typeof t=="string"?a=$m(t,e,r):lt(t)&&(a=t,t=a.id),this.id=t,this.dom=a;var i=a.style;i&&(a.onselectstart=EC,i["-webkit-user-select"]="none",i["user-select"]="none",i["-webkit-touch-callout"]="none",i["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",i.padding=0,i.margin=0,i["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=r};Co.prototype={constructor:Co,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=$m("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},resize:function(t,e){var r=this.dpr,a=this.dom,i=a.style,n=this.domBack;i&&(i.width=t+"px",i.height=e+"px"),a.width=t*r,a.height=e*r,n&&(n.width=t*r,n.height=e*r,r!==1&&this.ctxBack.scale(r,r))},clear:function(t,o){var r=this.dom,a=this.ctx,i=r.width,n=r.height,o=o||this.clearColor,s=this.motionBlur&&!t,l=this.lastFrameAlpha,u=this.dpr;if(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,i/u,n/u)),a.clearRect(0,0,i,n),o&&o!=="transparent"){var h;o.colorStops?(h=o.__canvasGradient||Da.getGradient(a,o,{x:0,y:0,width:i,height:n}),o.__canvasGradient=h):o.image&&(h=Yf.prototype.getCanvasPattern.call(o,a)),a.save(),a.fillStyle=h||o,a.fillRect(0,0,i,n),a.restore()}if(s){var f=this.domBack;a.save(),a.globalAlpha=l,a.drawImage(f,0,0,i,n),a.restore()}}};var Xf=typeof window<"u"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},qf=new Mf(50);function RC(t){if(typeof t=="string"){var e=qf.get(t);return e&&e.image}else return t}function Zm(t,e,r,a,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var n=qf.get(t),o={hostEl:r,cb:a,cbPayload:i};return n?(e=n.image,!Sl(e)&&n.pending.push(o)):(e=new Image,e.onload=e.onerror=OC,qf.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}else return t;else return e}function OC(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],a=r.cb;a&&a(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function Sl(t){return t&&t.width&&t.height}var Al={},Kf=0,NC=5e3,jf=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Tl="12px sans-serif",Qf={};function kC(t,e){Qf[t]=e}function er(t,e){e=e||Tl;var r=t+":"+e;if(Al[r])return Al[r];for(var a=(t+"").split(`
`),i=0,n=0,o=a.length;n<o;n++)i=Math.max(GC(a[n],e).width,i);return Kf>NC&&(Kf=0,Al={}),Kf++,Al[r]=i,i}function Rr(t,e,r,a,i,n,o,s){return o?BC(t,e,r,a,i,n,o,s):zC(t,e,r,a,i,n,s)}function zC(t,e,r,a,i,n,o){var s=ec(t,e,i,n,o),l=er(t,e);i&&(l+=i[1]+i[3]);var u=s.outerHeight,h=Do(0,l,r),f=pn(0,u,a),c=new vt(h,f,l,u);return c.lineHeight=s.lineHeight,c}function BC(t,e,r,a,i,n,o,s){var l=rc(t,{rich:o,truncate:s,font:e,textAlign:r,textPadding:i,textLineHeight:n}),u=l.outerWidth,h=l.outerHeight,f=Do(0,u,r),c=pn(0,h,a);return new vt(f,c,u,h)}function Do(t,e,r){return r==="right"?t-=e:r==="center"&&(t-=e/2),t}function pn(t,e,r){return r==="middle"?t-=e/2:r==="bottom"&&(t-=e),t}function Jf(t,e,r){var a=e.textPosition,i=e.textDistance,n=r.x,o=r.y;i=i||0;var s=r.height,l=r.width,u=s/2,h="left",f="top";switch(a){case"left":n-=i,o+=u,h="right",f="middle";break;case"right":n+=i+l,o+=u,f="middle";break;case"top":n+=l/2,o-=i,h="center",f="bottom";break;case"bottom":n+=l/2,o+=s+i,h="center";break;case"inside":n+=l/2,o+=u,h="center",f="middle";break;case"insideLeft":n+=i,o+=u,f="middle";break;case"insideRight":n+=l-i,o+=u,h="right",f="middle";break;case"insideTop":n+=l/2,o+=i,h="center";break;case"insideBottom":n+=l/2,o+=s-i,h="center",f="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=l-i,o+=i,h="right";break;case"insideBottomLeft":n+=i,o+=s-i,f="bottom";break;case"insideBottomRight":n+=l-i,o+=s-i,h="right",f="bottom";break}return t=t||{},t.x=n,t.y=o,t.textAlign=h,t.textVerticalAlign=f,t}function tc(t,e,r,a,i){if(!e)return"";var n=(t+"").split(`
`);i=Ym(e,r,a,i);for(var o=0,s=n.length;o<s;o++)n[o]=Xm(n[o],i);return n.join(`
`)}function Ym(t,e,i,a){a=et({},a),a.font=e;var i=Xt(i,"...");a.maxIterations=Xt(a.maxIterations,2);var n=a.minChar=Xt(a.minChar,0);a.cnCharWidth=er("\u56FD",e);var o=a.ascCharWidth=er("a",e);a.placeholder=Xt(a.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<n&&s>=o;l++)s-=o;var u=er(i,e);return u>s&&(i="",u=0),s=t-u,a.ellipsis=i,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=t,a}function Xm(t,e){var r=e.containerWidth,a=e.font,i=e.contentWidth;if(!r)return"";var n=er(t,a);if(n<=r)return t;for(var o=0;;o++){if(n<=i||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?VC(t,i,e.ascCharWidth,e.cnCharWidth):n>0?Math.floor(t.length*i/n):0;t=t.substr(0,s),n=er(t,a)}return t===""&&(t=e.placeholder),t}function VC(t,e,r,a){for(var i=0,n=0,o=t.length;n<o&&i<e;n++){var s=t.charCodeAt(n);i+=0<=s&&s<=127?r:a}return n}function qm(t){return er("\u56FD",t)}function GC(t,e){return Qf.measureText(t,e)}Qf.measureText=function(t,e){var r=nm();return r.font=e||Tl,r.measureText(t)};function ec(t,e,r,a,i){t!=null&&(t+="");var n=Xt(a,qm(e)),o=t?t.split(`
`):[],s=o.length*n,l=s,u=!0;if(r&&(l+=r[0]+r[2]),t&&i){u=!1;var h=i.outerHeight,f=i.outerWidth;if(h!=null&&l>h)t="",o=[];else if(f!=null)for(var c=Ym(f-(r?r[1]+r[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),v=0,d=o.length;v<d;v++)o[v]=Xm(o[v],c)}return{lines:o,height:s,outerHeight:l,lineHeight:n,canCacheByTextString:u}}function rc(t,e){var r={lines:[],width:0,height:0};if(t!=null&&(t+=""),!t)return r;for(var a=jf.lastIndex=0,i;(i=jf.exec(t))!=null;){var n=i.index;n>a&&ac(r,t.substring(a,n)),ac(r,i[2],i[1]),a=jf.lastIndex}a<t.length&&ac(r,t.substring(a,t.length));var o=r.lines,s=0,l=0,u=[],h=e.textPadding,f=e.truncate,c=f&&f.outerWidth,v=f&&f.outerHeight;h&&(c!=null&&(c-=h[1]+h[3]),v!=null&&(v-=h[0]+h[2]));for(var d=0;d<o.length;d++){for(var g=o[d],p=0,m=0,y=0;y<g.tokens.length;y++){var _=g.tokens[y],w=_.styleName&&e.rich[_.styleName]||{},b=_.textPadding=w.textPadding,A=_.font=w.font||e.font,S=_.textHeight=Xt(w.textHeight,qm(A));if(b&&(S+=b[0]+b[2]),_.height=S,_.lineHeight=ni(w.textLineHeight,e.textLineHeight,S),_.textAlign=w&&w.textAlign||e.textAlign,_.textVerticalAlign=w&&w.textVerticalAlign||"middle",v!=null&&s+_.lineHeight>v)return{lines:[],width:0,height:0};_.textWidth=er(_.text,A);var D=w.textWidth,I=D==null||D==="auto";if(typeof D=="string"&&D.charAt(D.length-1)==="%")_.percentWidth=D,u.push(_),D=0;else{if(I){D=_.textWidth;var L=w.textBackgroundColor,P=L&&L.image;P&&(P=RC(P),Sl(P)&&(D=Math.max(D,P.width*S/P.height)))}var R=b?b[1]+b[3]:0;D+=R;var E=c!=null?c-m:null;E!=null&&E<D&&(!I||E<R?(_.text="",_.textWidth=D=0):(_.text=tc(_.text,E-R,A,f.ellipsis,{minChar:f.minChar}),_.textWidth=er(_.text,A),D=_.textWidth+R))}m+=_.width=D,w&&(p=Math.max(p,_.lineHeight))}g.width=m,g.lineHeight=p,s+=p,l=Math.max(l,m)}r.outerWidth=r.width=Xt(e.textWidth,l),r.outerHeight=r.height=Xt(e.textHeight,s),h&&(r.outerWidth+=h[1]+h[3],r.outerHeight+=h[0]+h[2]);for(var d=0;d<u.length;d++){var _=u[d],Z=_.percentWidth;_.width=parseInt(Z,10)/100*l}return r}function ac(t,e,r){for(var a=e==="",i=e.split(`
`),n=t.lines,o=0;o<i.length;o++){var s=i[o],l={styleName:r,text:s,isLineHolder:!s&&!a};if(o)n.push({tokens:[l]});else{var u=(n[n.length-1]||(n[0]={tokens:[]})).tokens,h=u.length;h===1&&u[0].isLineHolder?u[0]=l:(s||!h||a)&&u.push(l)}}}function Km(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&tr(e)||t.textFont||t.font}function jm(t,e){var r=e.x,a=e.y,i=e.width,n=e.height,o=e.r,s,l,u,h;i<0&&(r=r+i,i=-i),n<0&&(a=a+n,n=-n),typeof o=="number"?s=l=u=h=o:o instanceof Array?o.length===1?s=l=u=h=o[0]:o.length===2?(s=u=o[0],l=h=o[1]):o.length===3?(s=o[0],l=h=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],h=o[3]):s=l=u=h=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+h>i&&(f=u+h,u*=i/f,h*=i/f),l+u>n&&(f=l+u,l*=n/f,u*=n/f),s+h>n&&(f=s+h,s*=n/f,h*=n/f),t.moveTo(r+s,a),t.lineTo(r+i-l,a),l!==0&&t.arc(r+i-l,a+l,l,-Math.PI/2,0),t.lineTo(r+i,a+n-u),u!==0&&t.arc(r+i-u,a+n-u,u,0,Math.PI/2),t.lineTo(r+h,a+n),h!==0&&t.arc(r+h,a+n-h,h,Math.PI/2,Math.PI),t.lineTo(r,a+s),s!==0&&t.arc(r+s,a+s,s,Math.PI,Math.PI*1.5)}var ic=Tl,HC={left:1,right:1,center:1},FC={top:1,bottom:1,middle:1},Qm=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Jm={},t0={};function Mo(t){return e0(t),M(t.rich,e0),t}function e0(t){if(t){t.font=Km(t);var e=t.textAlign;e==="middle"&&(e="center"),t.textAlign=e==null||HC[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;r==="center"&&(r="middle"),t.textVerticalAlign=r==null||FC[r]?r:"top";var a=t.textPadding;a&&(t.textPadding=hf(t.textPadding))}}function r0(t,e,r,a,i,n){a.rich?UC(t,e,r,a,i,n):WC(t,e,r,a,i,n)}function WC(t,e,r,a,i,n){"use strict";var o=oc(a),s,l=!1,u=e.__attrCachedBy===Ca.PLAIN_TEXT;n!==Wf?(n&&(s=n.style,l=!o&&u&&s),e.__attrCachedBy=o?Ca.NONE:Ca.PLAIN_TEXT):u&&(e.__attrCachedBy=Ca.NONE);var h=a.font||ic;(!l||h!==(s.font||ic))&&(e.font=h);var f=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,f=t.__computedFont=e.font);var c=a.textPadding,v=a.textLineHeight,d=t.__textCotentBlock;(!d||t.__dirtyText)&&(d=t.__textCotentBlock=ec(r,f,c,v,a.truncate));var g=d.outerHeight,p=d.lines,m=d.lineHeight,y=lc(t0,t,a,i),_=y.baseX,w=y.baseY,b=y.textAlign||"left",A=y.textVerticalAlign;a0(e,a,i,_,w);var S=pn(w,g,A),D=_,I=S;if(o||c){var L=er(r,f),P=L;c&&(P+=c[1]+c[3]);var R=Do(_,P,b);o&&sc(t,e,a,R,S,P,g),c&&(D=n0(_,b,c),I+=c[0])}e.textAlign=b,e.textBaseline="middle",e.globalAlpha=a.opacity||1;for(var E=0;E<Qm.length;E++){var Z=Qm[E],W=Z[0],$=Z[1],X=a[W];(!l||X!==s[W])&&(e[$]=Ff(e,$,X||Z[2]))}I+=m/2;var K=a.textStrokeWidth,Q=l?s.textStrokeWidth:null,j=!l||K!==Q,U=!l||j||a.textStroke!==s.textStroke,tt=uc(a.textStroke,K),ct=i0(a.textFill);if(tt&&(j&&(e.lineWidth=K),U&&(e.strokeStyle=tt)),ct&&(!l||a.textFill!==s.textFill)&&(e.fillStyle=ct),p.length===1)tt&&e.strokeText(p[0],D,I),ct&&e.fillText(p[0],D,I);else for(var E=0;E<p.length;E++)tt&&e.strokeText(p[E],D,I),ct&&e.fillText(p[E],D,I),I+=m}function UC(t,e,r,a,i,n){n!==Wf&&(e.__attrCachedBy=Ca.NONE);var o=t.__textCotentBlock;(!o||t.__dirtyText)&&(o=t.__textCotentBlock=rc(r,a)),$C(t,e,o,a,i)}function $C(t,e,r,a,i){var n=r.width,o=r.outerWidth,s=r.outerHeight,l=a.textPadding,u=lc(t0,t,a,i),h=u.baseX,f=u.baseY,c=u.textAlign,v=u.textVerticalAlign;a0(e,a,i,h,f);var d=Do(h,o,c),g=pn(f,s,v),p=d,m=g;l&&(p+=l[3],m+=l[0]);var y=p+n;oc(a)&&sc(t,e,a,d,g,o,s);for(var _=0;_<r.lines.length;_++){for(var w=r.lines[_],b=w.tokens,A=b.length,S=w.lineHeight,D=w.width,I=0,L=p,P=y,R=A-1,E;I<A&&(E=b[I],!E.textAlign||E.textAlign==="left");)nc(t,e,E,a,S,m,L,"left"),D-=E.width,L+=E.width,I++;for(;R>=0&&(E=b[R],E.textAlign==="right");)nc(t,e,E,a,S,m,P,"right"),D-=E.width,P-=E.width,R--;for(L+=(n-(L-p)-(y-P)-D)/2;I<=R;)E=b[I],nc(t,e,E,a,S,m,L+E.width/2,"center"),L+=E.width,I++;m+=S}}function a0(t,e,r,a,i){if(r&&e.textRotation){var n=e.textOrigin;n==="center"?(a=r.width/2+r.x,i=r.height/2+r.y):n&&(a=n[0]+r.x,i=n[1]+r.y),t.translate(a,i),t.rotate(-e.textRotation),t.translate(-a,-i)}}function nc(t,e,r,a,i,n,o,s){var l=a.rich[r.styleName]||{};l.text=r.text;var u=r.textVerticalAlign,h=n+i/2;u==="top"?h=n+r.height/2:u==="bottom"&&(h=n+i-r.height/2),!r.isLineHolder&&oc(l)&&sc(t,e,l,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var f=r.textPadding;f&&(o=n0(o,s,f),h-=r.height/2-f[2]-r.textHeight/2),pe(e,"shadowBlur",ni(l.textShadowBlur,a.textShadowBlur,0)),pe(e,"shadowColor",l.textShadowColor||a.textShadowColor||"transparent"),pe(e,"shadowOffsetX",ni(l.textShadowOffsetX,a.textShadowOffsetX,0)),pe(e,"shadowOffsetY",ni(l.textShadowOffsetY,a.textShadowOffsetY,0)),pe(e,"textAlign",s),pe(e,"textBaseline","middle"),pe(e,"font",r.font||ic);var c=uc(l.textStroke||a.textStroke,d),v=i0(l.textFill||a.textFill),d=Xt(l.textStrokeWidth,a.textStrokeWidth);c&&(pe(e,"lineWidth",d),pe(e,"strokeStyle",c),e.strokeText(r.text,o,h)),v&&(pe(e,"fillStyle",v),e.fillText(r.text,o,h))}function oc(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function sc(t,e,r,a,i,n,o){var s=r.textBackgroundColor,l=r.textBorderWidth,u=r.textBorderColor,h=Lt(s);if(pe(e,"shadowBlur",r.textBoxShadowBlur||0),pe(e,"shadowColor",r.textBoxShadowColor||"transparent"),pe(e,"shadowOffsetX",r.textBoxShadowOffsetX||0),pe(e,"shadowOffsetY",r.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var f=r.textBorderRadius;f?jm(e,{x:a,y:i,width:n,height:o,r:f}):e.rect(a,i,n,o),e.closePath()}if(h)if(pe(e,"fillStyle",s),r.fillOpacity!=null){var c=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,e.fill(),e.globalAlpha=c}else e.fill();else if(lt(s)){var v=s.image;v=Zm(v,null,t,ZC,s),v&&Sl(v)&&e.drawImage(v,a,i,n,o)}if(l&&u)if(pe(e,"lineWidth",l),pe(e,"strokeStyle",u),r.strokeOpacity!=null){var c=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,e.stroke(),e.globalAlpha=c}else e.stroke()}function ZC(t,e){e.image=t}function lc(t,e,r,a){var i=r.x||0,n=r.y||0,o=r.textAlign,s=r.textVerticalAlign;if(a){var l=r.textPosition;if(l instanceof Array)i=a.x+hc(l[0],a.width),n=a.y+hc(l[1],a.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(Jm,r,a):Jf(Jm,r,a);i=u.x,n=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=r.textOffset;h&&(i+=h[0],n+=h[1])}return t=t||{},t.baseX=i,t.baseY=n,t.textAlign=o,t.textVerticalAlign=s,t}function pe(t,e,r){return t[e]=Ff(t,e,r),t[e]}function uc(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function i0(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function hc(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function n0(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function fc(t,e){return t!=null&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}var cc=new vt,Cl=function(){};Cl.prototype={constructor:Cl,drawRectText:function(t,e){var r=this.style;e=r.textRect||e,this.__dirty&&Mo(r,!0);var a=r.text;if(a!=null&&(a+=""),!!fc(a,r)){t.save();var i=this.transform;r.transformText?this.setTransform(t):i&&(cc.copy(e),cc.applyTransform(i),e=cc),r0(this,t,a,r,e,Wf),t.restore()}}};function Le(t){t=t||{},na.call(this,t);for(var e in t)t.hasOwnProperty(e)&&e!=="style"&&(this[e]=t[e]);this.style=new Da(t.style,this),this._rect=null,this.__clipPaths=null}Le.prototype={constructor:Le,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect();return a.contain(r[0],r[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){t!=="style"?na.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Da(t,this),this.dirty(!1),this},calculateTextPosition:null},It(Le,na),Dt(Le,Cl);function ve(t){Le.call(this,t)}ve.prototype={constructor:ve,type:"image",brush:function(t,e){var r=this.style,a=r.image;r.bind(t,this,e);var i=this._image=Zm(a,this._image,this,this.onload);if(!(!i||!Sl(i))){var n=r.x||0,o=r.y||0,s=r.width,l=r.height,u=i.width/i.height;if(s==null&&l!=null?s=l*u:l==null&&s!=null?l=s/u:s==null&&l==null&&(s=i.width,l=i.height),this.setTransform(t),r.sWidth&&r.sHeight){var h=r.sx||0,f=r.sy||0;t.drawImage(i,h,f,r.sWidth,r.sHeight,n,o,s,l)}else if(r.sx&&r.sy){var h=r.sx,f=r.sy,c=s-h,v=l-f;t.drawImage(i,h,f,c,v,n,o,s,l)}else t.drawImage(i,n,o,s,l);r.text!=null&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new vt(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},It(ve,Le);var o0=1e5,ui=314159,Dl=.01,YC=.001;function Ml(t){return parseInt(t,10)}function XC(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}var vc=new vt(0,0,0,0),dc=new vt(0,0,0,0);function qC(t,e,r){return vc.copy(t.getBoundingRect()),t.transform&&vc.applyTransform(t.transform),dc.width=e,dc.height=r,!vc.intersect(dc)}function KC(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function jC(t,e){for(var r=0;r<t.length;r++){var a=t[r];a.setTransform(e),e.beginPath(),a.buildPath(e,a.shape),e.clip(),a.restoreTransform(e)}}function QC(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var gc=function(t,e,r){this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=r=et({},r||{}),this.dpr=r.devicePixelRatio||pl,this._singleCanvas=a,this.root=t;var i=t.style;i&&(i["-webkit-tap-highlight-color"]="transparent",i["-webkit-user-select"]=i["user-select"]=i["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var n=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var l=t.width,u=t.height;r.width!=null&&(l=r.width),r.height!=null&&(u=r.height),this.dpr=r.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new Co(t,this,this.dpr);h.__builtin__=!0,h.initContext(),o[ui]=h,h.zlevel=ui,n.push(ui),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var s=this._domRoot=QC(this._width,this._height);t.appendChild(s)}this._hoverlayer=null,this._hoverElements=[]};gc.prototype={constructor:gc,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),r=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var a=0;a<r.length;a++){var i=r[a],n=this._layers[i];if(!n.__builtin__&&n.refresh){var o=a===0?this._backgroundColor:null;n.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var r=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return r.__from=t,t.__hoverMir=r,e&&r.setStyle(e),this._hoverElements.push(r),r}},removeHover:function(t){var e=t.__hoverMir,r=this._hoverElements,a=yt(r,e);a>=0&&r.splice(a,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,r=0;r<e.length;r++){var a=e[r].__from;a&&(a.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,r=this._hoverlayer;if(r&&r.clear(),!!e){wl(t,this.storage.displayableSortFunc),r||(r=this._hoverlayer=this.getLayer(o0));var a={};r.ctx.save();for(var i=0;i<e;){var n=t[i],o=n.__from;if(!(o&&o.__zr)){t.splice(i,1),o.__hoverMir=null,e--;continue}i++,o.invisible||(n.transform=o.transform,n.invTransform=o.invTransform,n.__clipPaths=o.__clipPaths,this._doPaintEl(n,r,!0,a))}r.ctx.restore()}},getHoverLayer:function(){return this.getLayer(o0)},_paintList:function(t,e,r){if(this._redrawId===r){e=e||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!a){var i=this;Xf(function(){i._paintList(t,e,r)})}}},_compositeManually:function(){var t=this.getLayer(ui).ctx,e=this._domRoot.width,r=this._domRoot.height;t.clearRect(0,0,e,r),this.eachBuiltinLayer(function(a){a.virtual&&t.drawImage(a.dom,0,0,e,r)})},_doPaintList:function(t,e){for(var r=[],a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a],n=this._layers[i];n.__builtin__&&n!==this._hoverlayer&&(n.__dirty||e)&&r.push(n)}for(var o=!0,s=0;s<r.length;s++){var n=r[s],l=n.ctx,u={};l.save();var h=e?n.__startIndex:n.__drawIndex,f=!e&&n.incremental&&Date.now,c=f&&Date.now(),v=n.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(n.__startIndex===n.__endIndex)n.clear(!1,v);else if(h===n.__startIndex){var d=t[h];(!d.incremental||!d.notClear||e)&&n.clear(!1,v)}h===-1&&(console.error("For some unknown reason. drawIndex is -1"),h=n.__startIndex);for(var g=h;g<n.__endIndex;g++){var p=t[g];if(this._doPaintEl(p,n,e,u),p.__dirty=p.__dirtyText=!1,f){var m=Date.now()-c;if(m>15)break}}n.__drawIndex=g,n.__drawIndex<n.__endIndex&&(o=!1),u.prevElClipPaths&&l.restore(),l.restore()}return G.wxa&&M(this._layers,function(y){y&&y.ctx&&y.ctx.draw&&y.ctx.draw()}),o},_doPaintEl:function(t,e,r,a){var i=e.ctx,n=t.transform;if((e.__dirty||r)&&!t.invisible&&t.style.opacity!==0&&!(n&&!n[0]&&!n[3])&&!(t.culling&&qC(t,this._width,this._height))){var o=t.__clipPaths,s=a.prevElClipPaths;(!s||KC(o,s))&&(s&&(i.restore(),a.prevElClipPaths=null,a.prevEl=null),o&&(i.save(),jC(o,i),a.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(i),t.brush(i,a.prevEl||null),a.prevEl=t,t.afterBrush&&t.afterBrush(i)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=ui);var r=this._layers[t];return r||(r=new Co("zr_"+t,this,this.dpr),r.zlevel=t,r.__builtin__=!0,this._layerConfig[t]?ut(r,this._layerConfig[t],!0):this._layerConfig[t-Dl]&&ut(r,this._layerConfig[t-Dl],!0),e&&(r.virtual=e),this.insertLayer(t,r),r.initContext()),r},insertLayer:function(t,e){var r=this._layers,a=this._zlevelList,i=a.length,n=null,o=-1,s=this._domRoot;if(r[t]){Ta("ZLevel "+t+" has been used already");return}if(!XC(e)){Ta("Layer of zlevel "+t+" is not valid");return}if(i>0&&t>a[0]){for(o=0;o<i-1&&!(a[o]<t&&a[o+1]>t);o++);n=r[a[o]]}if(a.splice(o+1,0,t),r[t]=e,!e.virtual)if(n){var l=n.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var r=this._zlevelList,a,i;for(i=0;i<r.length;i++)a=r[i],t.call(e,this._layers[a],a)},eachBuiltinLayer:function(t,e){var r=this._zlevelList,a,i,n;for(n=0;n<r.length;n++)i=r[n],a=this._layers[i],a.__builtin__&&t.call(e,a,i)},eachOtherLayer:function(t,e){var r=this._zlevelList,a,i,n;for(n=0;n<r.length;n++)i=r[n],a=this._layers[i],a.__builtin__||t.call(e,a,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){this.eachBuiltinLayer(function(u,h){u.__dirty=u.__used=!1});function e(u){i&&(i.__endIndex!==u&&(i.__dirty=!0),i.__endIndex=u)}if(this._singleCanvas)for(var r=1;r<t.length;r++){var a=t[r];if(a.zlevel!==t[r-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}for(var i=null,n=0,o,r=0;r<t.length;r++){var a=t[r],s=a.zlevel,l;o!==s&&(o=s,n=0),a.incremental?(l=this.getLayer(s+YC,this._needsManuallyCompositing),l.incremental=!0,n=1):l=this.getLayer(s+(n>0?Dl:0),this._needsManuallyCompositing),l.__builtin__||Ta("ZLevel "+s+" has been used by unkown layer "+l.id),l!==i&&(l.__used=!0,l.__startIndex!==r&&(l.__dirty=!0),l.__startIndex=r,l.incremental?l.__drawIndex=-1:l.__drawIndex=r,e(r),i=l),a.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(u,h){!u.__used&&u.getElementCount()>0&&(u.__dirty=!0,u.__startIndex=u.__endIndex=u.__drawIndex=0),u.__dirty&&u.__drawIndex<0&&(u.__drawIndex=u.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var r=this._layerConfig;r[t]?ut(r[t],e,!0):r[t]=e;for(var a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a];if(i===t||i===t+Dl){var n=this._layers[i];ut(n,r[t],!0)}}}},delLayer:function(t){var e=this._layers,r=this._zlevelList,a=e[t];!a||(a.dom.parentNode.removeChild(a.dom),delete e[t],r.splice(yt(r,t),1))},resize:function(t,e){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var a=this._opts;if(t!=null&&(a.width=t),e!=null&&(a.height=e),t=this._getSize(0),e=this._getSize(1),r.style.display="",this._width!==t||e!==this._height){r.style.width=t+"px",r.style.height=e+"px";for(var i in this._layers)this._layers.hasOwnProperty(i)&&this._layers[i].resize(t,e);M(this._progressiveLayers,function(n){n.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(ui).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[ui].dom;var e=new Co("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var r=e.dom.width,a=e.dom.height,i=e.ctx;this.eachLayer(function(u){u.__builtin__?i.drawImage(u.dom,0,0,r,a):u.renderToCanvas&&(e.ctx.save(),u.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var n={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,e,!0,n)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,r=["width","height"][t],a=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],n=["paddingRight","paddingBottom"][t];if(e[r]!=null&&e[r]!=="auto")return parseFloat(e[r]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[a]||Ml(s[r])||Ml(o.style[r]))-(Ml(s[i])||0)-(Ml(s[n])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var r=document.createElement("canvas"),a=r.getContext("2d"),i=t.getBoundingRect(),n=t.style,o=n.shadowBlur*e,s=n.shadowOffsetX*e,l=n.shadowOffsetY*e,u=n.hasStroke()?n.lineWidth:0,h=Math.max(u/2,-s+o),f=Math.max(u/2,s+o),c=Math.max(u/2,-l+o),v=Math.max(u/2,l+o),d=i.width+h+f,g=i.height+c+v;r.width=d*e,r.height=g*e,a.scale(e,e),a.clearRect(0,0,d,g),a.dpr=e;var p={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-i.x,c-i.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(a);var m=ve,y=new m({style:{x:0,y:0,image:r}});return p.position!=null&&(y.position=t.position=p.position),p.rotation!=null&&(y.rotation=t.rotation=p.rotation),p.scale!=null&&(y.scale=t.scale=p.scale),y}};var Il=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,le.call(this)};Il.prototype={constructor:Il,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),r=0;r<e.length;r++)this.addClip(e[r])},removeClip:function(t){var e=yt(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),r=0;r<e.length;r++)this.removeClip(e[r]);t.animation=null},_update:function(){for(var t=new Date().getTime()-this._pausedTime,e=t-this._time,r=this._clips,a=r.length,i=[],n=[],o=0;o<a;o++){var s=r[o],l=s.step(t,e);l&&(i.push(l),n.push(s))}for(var o=0;o<a;)r[o]._needsRemove?(r[o]=r[a-1],r.pop(),a--):o++;a=i.length;for(var o=0;o<a;o++)n[o].fire(i[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0;function e(){t._running&&(Xf(e),!t._paused&&t._update())}Xf(e)},start:function(){this._time=new Date().getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=new Date().getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=new Date().getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var r=new Bf(t,e.loop,e.getter,e.setter);return this.addAnimator(r),r}},Dt(Il,le);var JC=300,pc=G.domSupported,mc=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=V(t,function(i){var n=i.replace("mouse","pointer");return r.hasOwnProperty(n)?n:i});return{mouse:t,touch:e,pointer:a}}(),s0={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function l0(t){return t==="mousewheel"&&G.browser.firefox?"DOMMouseScroll":t}function yc(t){var e=t.pointerType;return e==="pen"||e==="touch"}function tD(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function _c(t){t&&(t.zrByTouch=!0)}function eD(t,e){return Er(t.dom,new h0(t,e),!0)}function u0(t,e){for(var r=e,a=!1;r&&r.nodeType!==9&&!(a=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return a}function h0(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var xc=h0.prototype;xc.stopPropagation=xc.stopImmediatePropagation=xc.preventDefault=ce;var Sr={mousedown:function(t){t=Er(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Er(this.dom,t);var e=this._mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&Sc(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Er(this.dom,t),Sc(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Er(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=u0(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=Er(this.dom,t),_c(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Sr.mousemove.call(this,t),Sr.mousedown.call(this,t)},touchmove:function(t){t=Er(this.dom,t),_c(t),this.handler.processGesture(t,"change"),Sr.mousemove.call(this,t)},touchend:function(t){t=Er(this.dom,t),_c(t),this.handler.processGesture(t,"end"),Sr.mouseup.call(this,t),+new Date-this._lastTouchMoment<JC&&Sr.click.call(this,t)},pointerdown:function(t){Sr.mousedown.call(this,t)},pointermove:function(t){yc(t)||Sr.mousemove.call(this,t)},pointerup:function(t){Sr.mouseup.call(this,t)},pointerout:function(t){yc(t)||Sr.mouseout.call(this,t)}};M(["click","mousewheel","dblclick","contextmenu"],function(t){Sr[t]=function(e){e=Er(this.dom,e),this.trigger(t,e)}});var wc={pointermove:function(t){yc(t)||wc.mousemove.call(this,t)},pointerup:function(t){wc.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Sc(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function rD(t,e){var r=e.domHandlers;G.pointerEventsSupported?M(mc.pointer,function(a){Ll(e,a,function(i){r[a].call(t,i)})}):(G.touchEventsSupported&&M(mc.touch,function(a){Ll(e,a,function(i){r[a].call(t,i),tD(e)})}),M(mc.mouse,function(a){Ll(e,a,function(i){i=wf(i),e.touching||r[a].call(t,i)})}))}function aD(t,e){G.pointerEventsSupported?M(s0.pointer,r):G.touchEventsSupported||M(s0.mouse,r);function r(a){function i(n){n=wf(n),u0(t,n.target)||(n=eD(t,n),e.domHandlers[a].call(t,n))}Ll(e,a,i,{capture:!0})}}function Ll(t,e,r,a){t.mounted[e]=r,t.listenerOpts[e]=a,bf(t.domTarget,l0(e),r,a)}function bc(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&oC(t.domTarget,l0(r),e[r],t.listenerOpts[r]);t.mounted={}}function Sc(t,e){if(t._mayPointerCapture=null,pc&&t._pointerCapturing^e){t._pointerCapturing=e;var r=t._globalHandlerScope;e?aD(t,r):bc(r)}}function f0(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function Ac(t,e){le.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new f0(t,Sr),pc&&(this._globalHandlerScope=new f0(document,wc)),this._pointerCapturing=!1,this._mayPointerCapture=null,rD(this,this._localHandlerScope)}var c0=Ac.prototype;c0.dispose=function(){bc(this._localHandlerScope),pc&&bc(this._globalHandlerScope)},c0.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},Dt(Ac,le);/*!
(()=>{var D5=Object.create;var NT=Object.defineProperty;var M5=Object.getOwnPropertyDescriptor;var I5=Object.getOwnPropertyNames;var L5=Object.getPrototypeOf,P5=Object.prototype.hasOwnProperty;var E5=(x,C)=>()=>(C||x((C={exports:{}}).exports,C),C.exports);var R5=(x,C,T,N)=>{if(C&&typeof C=="object"||typeof C=="function")for(let k of I5(C))!P5.call(x,k)&&k!==T&&NT(x,k,{get:()=>C[k],enumerable:!(N=M5(C,k))||N.enumerable});return x};var O5=(x,C,T)=>(T=x!=null?D5(L5(x)):{},R5(C||!x||!x.__esModule?NT(T,"default",{value:x,enumerable:!0}):T,x));var BT=E5((n3,zT)=>{var xa=function(x){x==null&&(x=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,x.constructor==Array?this.init_by_array(x,x.length):this.init_seed(x)};xa.prototype.init_seed=function(x){for(this.mt[0]=x>>>0,this.mti=1;this.mti<this.N;this.mti++){var x=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((x&4294901760)>>>16)*1812433253<<16)+(x&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};xa.prototype.init_by_array=function(x,C){var T,N,k;for(this.init_seed(19650218),T=1,N=0,k=this.N>C?this.N:C;k;k--){var F=this.mt[T-1]^this.mt[T-1]>>>30;this.mt[T]=(this.mt[T]^(((F&4294901760)>>>16)*1664525<<16)+(F&65535)*1664525)+x[N]+N,this.mt[T]>>>=0,T++,N++,T>=this.N&&(this.mt[0]=this.mt[this.N-1],T=1),N>=C&&(N=0)}for(k=this.N-1;k;k--){var F=this.mt[T-1]^this.mt[T-1]>>>30;this.mt[T]=(this.mt[T]^(((F&4294901760)>>>16)*1566083941<<16)+(F&65535)*1566083941)-T,this.mt[T]>>>=0,T++,T>=this.N&&(this.mt[0]=this.mt[this.N-1],T=1)}this.mt[0]=2147483648};xa.prototype.random_int=function(){var x,C=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var T;for(this.mti==this.N+1&&this.init_seed(5489),T=0;T<this.N-this.M;T++)x=this.mt[T]&this.UPPER_MASK|this.mt[T+1]&this.LOWER_MASK,this.mt[T]=this.mt[T+this.M]^x>>>1^C[x&1];for(;T<this.N-1;T++)x=this.mt[T]&this.UPPER_MASK|this.mt[T+1]&this.LOWER_MASK,this.mt[T]=this.mt[T+(this.M-this.N)]^x>>>1^C[x&1];x=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^x>>>1^C[x&1],this.mti=0}return x=this.mt[this.mti++],x^=x>>>11,x^=x<<7&2636928640,x^=x<<15&4022730752,x^=x>>>18,x>>>0};xa.prototype.random_int31=function(){return this.random_int()>>>1};xa.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};xa.prototype.random=function(){return this.random_int()*(1/4294967296)};xa.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};xa.prototype.random_long=function(){var x=this.random_int()>>>5,C=this.random_int()>>>6;return(x*67108864+C)*(1/9007199254740992)};zT.exports=xa});var kT={};(function(x,C){C(x.echarts={})})(kT,function(x){"use strict";var C;typeof window<"u"?C=window.__DEV__:typeof global<"u"&&(C=global.__DEV__),typeof C>"u"&&(C=!0);var T=C,N=2311,k=function(){return N++},F={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?F={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document>"u"&&typeof self<"u"?F={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator>"u"?F={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:F=St(navigator.userAgent);var G=F;function St(t){var e={},r={},a=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),n=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return a&&(r.firefox=!0,r.version=a[1]),i&&(r.ie=!0,r.version=i[1]),n&&(r.edge=!0,r.version=n[1]),o&&(r.weChat=!0),{browser:r,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect<"u",touchEventsSupported:"ontouchstart"in window&&!r.ie&&!r.edge,pointerEventsSupported:"onpointerdown"in window&&(r.edge||r.ie&&r.version>=11),domSupported:typeof document<"u"}}var Ct={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},te={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},de=Object.prototype.toString,Yt=Array.prototype,gr=Yt.forEach,en=Yt.filter,Pr=Yt.slice,$T=Yt.map,ZT=Yt.reduce,uf={};function nm(t,e){t==="createCanvas"&&(ll=null),uf[t]=e}function rt(t){if(t==null||typeof t!="object")return t;var e=t,r=de.call(t);if(r==="[object Array]"){if(!sn(t)){e=[];for(var a=0,i=t.length;a<i;a++)e[a]=rt(t[a])}}else if(te[r]){if(!sn(t)){var n=t.constructor;if(t.constructor.from)e=n.from(t);else{e=new n(t.length);for(var a=0,i=t.length;a<i;a++)e[a]=rt(t[a])}}}else if(!Ct[r]&&!sn(t)&&!nn(t)){e={};for(var o in t)t.hasOwnProperty(o)&&(e[o]=rt(t[o]))}return e}function ut(t,e,r){if(!lt(e)||!lt(t))return r?rt(e):t;for(var a in e)if(e.hasOwnProperty(a)){var i=t[a],n=e[a];lt(n)&&lt(i)&&!z(n)&&!z(i)&&!nn(n)&&!nn(i)&&!hf(n)&&!hf(i)&&!sn(n)&&!sn(i)?ut(i,n,r):(r||!(a in t))&&(t[a]=rt(e[a],!0))}return t}function go(t,e){for(var r=t[0],a=1,i=t.length;a<i;a++)r=ut(r,t[a],e);return r}function et(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function J(t,e,r){for(var a in e)e.hasOwnProperty(a)&&(r?e[a]!=null:t[a]==null)&&(t[a]=e[a]);return t}var rn=function(){return uf.createCanvas()};uf.createCanvas=function(){return document.createElement("canvas")};var ll;function om(){return ll||(ll=rn().getContext("2d")),ll}function yt(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,a=t.length;r<a;r++)if(t[r]===e)return r}return-1}function It(t,e){var r=t.prototype;function a(){}a.prototype=e.prototype,t.prototype=new a;for(var i in r)r.hasOwnProperty(i)&&(t.prototype[i]=r[i]);t.prototype.constructor=t,t.superClass=e}function Dt(t,e,r){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,J(t,e,r)}function Qr(t){if(!!t)return typeof t=="string"?!1:typeof t.length=="number"}function M(t,e,r){if(!!(t&&e))if(t.forEach&&t.forEach===gr)t.forEach(e,r);else if(t.length===+t.length)for(var a=0,i=t.length;a<i;a++)e.call(r,t[a],a,t);else for(var n in t)t.hasOwnProperty(n)&&e.call(r,t[n],n,t)}function V(t,e,r){if(!!(t&&e)){if(t.map&&t.map===$T)return t.map(e,r);for(var a=[],i=0,n=t.length;i<n;i++)a.push(e.call(r,t[i],i,t));return a}}function an(t,e,r,a){if(!!(t&&e)){if(t.reduce&&t.reduce===ZT)return t.reduce(e,r,a);for(var i=0,n=t.length;i<n;i++)r=e.call(a,r,t[i],i,t);return r}}function ee(t,e,r){if(!!(t&&e)){if(t.filter&&t.filter===en)return t.filter(e,r);for(var a=[],i=0,n=t.length;i<n;i++)e.call(r,t[i],i,t)&&a.push(t[i]);return a}}function sm(t,e,r){if(!!(t&&e)){for(var a=0,i=t.length;a<i;a++)if(e.call(r,t[a],a,t))return t[a]}}function it(t,e){var r=Pr.call(arguments,2);return function(){return t.apply(e,r.concat(Pr.call(arguments)))}}function ot(t){var e=Pr.call(arguments,1);return function(){return t.apply(this,e.concat(Pr.call(arguments)))}}function z(t){return de.call(t)==="[object Array]"}function se(t){return typeof t=="function"}function Lt(t){return de.call(t)==="[object String]"}function lt(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function hf(t){return!!Ct[de.call(t)]}function pr(t){return!!te[de.call(t)]}function nn(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function po(t){return t!==t}function Ut(t){for(var e=0,r=arguments.length;e<r;e++)if(arguments[e]!=null)return arguments[e]}function Xt(t,e){return t??e}function ni(t,e,r){return t??e??r}function on(){return Function.call.apply(Pr,arguments)}function ff(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function gt(t,e){if(!t)throw new Error(e)}function tr(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var lm="__ec_primitive__";function cf(t){t[lm]=!0}function sn(t){return t[lm]}function ul(t){var e=z(t);this.data={};var r=this;t instanceof ul?t.each(a):t&&M(t,a);function a(i,n){e?r.set(i,n):r.set(n,i)}}ul.prototype={constructor:ul,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){e!==void 0&&(t=it(t,e));for(var r in this.data)this.data.hasOwnProperty(r)&&t(this.data[r],r)},removeKey:function(t){delete this.data[t]}};function ht(t){return new ul(t)}function vf(t,e){for(var r=new t.constructor(t.length+e.length),a=0;a<t.length;a++)r[a]=t[a];var i=t.length;for(a=0;a<e.length;a++)r[a+i]=e[a];return r}function ce(){}var YT=(Object.freeze||Object)({$override:nm,clone:rt,merge:ut,mergeAll:go,extend:et,defaults:J,createCanvas:rn,getContext:om,indexOf:yt,inherits:It,mixin:Dt,isArrayLike:Qr,each:M,map:V,reduce:an,filter:ee,find:sm,bind:it,curry:ot,isArray:z,isFunction:se,isString:Lt,isObject:lt,isBuiltInObject:hf,isTypedArray:pr,isDom:nn,eqNaN:po,retrieve:Ut,retrieve2:Xt,retrieve3:ni,slice:on,normalizeCssArray:ff,assert:gt,trim:tr,setAsPrimitive:cf,isPrimitive:sn,createHashMap:ht,concatArray:vf,noop:ce}),um=typeof Float32Array>"u"?Array:Float32Array;function wa(t,e){var r=new um(2);return t==null&&(t=0),e==null&&(e=0),r[0]=t,r[1]=e,r}function ge(t,e){return t[0]=e[0],t[1]=e[1],t}function mr(t){var e=new um(2);return e[0]=t[0],e[1]=t[1],e}function hm(t,e,r){return t[0]=e,t[1]=r,t}function df(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function mo(t,e,r,a){return t[0]=e[0]+r[0]*a,t[1]=e[1]+r[1]*a,t}function Jr(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function yo(t){return Math.sqrt(gf(t))}var XT=yo;function gf(t){return t[0]*t[0]+t[1]*t[1]}var qT=gf;function KT(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function jT(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function QT(t,e){return t[0]*e[0]+t[1]*e[1]}function hl(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function ln(t,e){var r=yo(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function _o(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ta=_o;function fm(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var ba=fm;function JT(t,e){return t[0]=-e[0],t[1]=-e[1],t}function cm(t,e,r,a){return t[0]=e[0]+a*(r[0]-e[0]),t[1]=e[1]+a*(r[1]-e[1]),t}function Pt(t,e,r){var a=e[0],i=e[1];return t[0]=r[0]*a+r[2]*i+r[4],t[1]=r[1]*a+r[3]*i+r[5],t}function ea(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function ra(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var tC=(Object.freeze||Object)({create:wa,copy:ge,clone:mr,set:hm,add:df,scaleAndAdd:mo,sub:Jr,len:yo,length:XT,lenSquare:gf,lengthSquare:qT,mul:KT,div:jT,dot:QT,scale:hl,normalize:ln,distance:_o,dist:ta,distanceSquare:fm,distSquare:ba,negate:JT,lerp:cm,applyTransform:Pt,min:ea,max:ra});function fl(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}fl.prototype={constructor:fl,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(un(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var r=t.offsetX,a=t.offsetY,i=r-this._x,n=a-this._y;this._x=r,this._y=a,e.drift(i,n,t),this.dispatchToElement(un(e,t),"drag",t.event);var o=this.findHover(r,a,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(un(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(un(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(un(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(un(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};function un(t,e){return{target:t,topTarget:e&&e.topTarget}}var vm=Array.prototype.slice,le=function(t){this._$handlers={},this._$eventProcessor=t};le.prototype={constructor:le,one:function(t,e,r,a){return dm(this,t,e,r,a,!0)},on:function(t,e,r,a){return dm(this,t,e,r,a,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var r=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(r[t]){for(var a=[],i=0,n=r[t].length;i<n;i++)r[t][i].h!==e&&a.push(r[t][i]);r[t]=a}r[t]&&r[t].length===0&&delete r[t]}else delete r[t];return this},trigger:function(t){var e=this._$handlers[t],r=this._$eventProcessor;if(e){var a=arguments,i=a.length;i>3&&(a=vm.call(a,1));for(var n=e.length,o=0;o<n;){var s=e[o];if(r&&r.filter&&s.query!=null&&!r.filter(t,s.query)){o++;continue}switch(i){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,a[1]);break;case 3:s.h.call(s.ctx,a[1],a[2]);break;default:s.h.apply(s.ctx,a);break}s.one?(e.splice(o,1),n--):o++}}return r&&r.afterTrigger&&r.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],r=this._$eventProcessor;if(e){var a=arguments,i=a.length;i>4&&(a=vm.call(a,1,a.length-1));for(var n=a[a.length-1],o=e.length,s=0;s<o;){var l=e[s];if(r&&r.filter&&l.query!=null&&!r.filter(t,l.query)){s++;continue}switch(i){case 1:l.h.call(n);break;case 2:l.h.call(n,a[1]);break;case 3:l.h.call(n,a[1],a[2]);break;default:l.h.apply(n,a);break}l.one?(e.splice(s,1),o--):s++}}return r&&r.afterTrigger&&r.afterTrigger(t),this}};function eC(t,e){var r=t._$eventProcessor;return e!=null&&r&&r.normalizeQuery&&(e=r.normalizeQuery(e)),e}function dm(t,e,r,a,i,n){var o=t._$handlers;if(typeof r=="function"&&(i=a,a=r,r=null),!a||!e)return t;r=eC(t,r),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===a)return t;var l={h:a,one:n,query:r,ctx:i||t,callAtLast:a.zrEventfulCallAtLast},u=o[e].length-1,h=o[e][u];return h&&h.callAtLast?o[e].splice(u,0,l):o[e].push(l),t}var rC=Math.log(2);function pf(t,e,r,a,i,n){var o=a+"-"+i,s=t.length;if(n.hasOwnProperty(o))return n[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/rC);return t[r][l]}for(var u=a|1<<r,h=r+1;a&1<<h;)h++;for(var f=0,c=0,v=0;c<s;c++){var d=1<<c;d&i||(f+=(v%2?-1:1)*t[r][c]*pf(t,e-1,h,u,i|d,n),v++)}return n[o]=f,f}function gm(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],a={},i=pf(r,8,0,0,0,a);if(i!==0){for(var n=[],o=0;o<8;o++)for(var s=0;s<8;s++)n[s]==null&&(n[s]=0),n[s]+=((o+s)%2?-1:1)*pf(r,7,o===0?1:0,1<<o,1<<s,a)/i*e[o];return function(l,u,h){var f=u*n[6]+h*n[7]+1;l[0]=(u*n[0]+h*n[1]+n[2])/f,l[1]=(u*n[3]+h*n[4]+n[5])/f}}}var pm="___zrEVENTSAVED",mf=[];function aC(t,e,r,a,i){return yf(mf,e,a,i,!0)&&yf(t,r,mf[0],mf[1])}function yf(t,e,r,a,i){if(e.getBoundingClientRect&&G.domSupported&&!mm(e)){var n=e[pm]||(e[pm]={}),o=iC(e,n),s=nC(o,n,i);if(s)return s(t,r,a),!0}return!1}function iC(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var a=["left","right"],i=["top","bottom"],n=0;n<4;n++){var o=document.createElement("div"),s=o.style,l=n%2,u=(n>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",i[u]+":0",a[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function nC(t,e,r){for(var a=r?"invTrans":"trans",i=e[a],n=e.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),f=2*u,c=h.left,v=h.top;s.push(c,v),o=o&&n&&c===n[f]&&v===n[f+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return o&&i?i:(e.srcCoords=s,e[a]=r?gm(l,s):gm(s,l))}function mm(t){return t.nodeName.toUpperCase()==="CANVAS"}var _f=typeof window<"u"&&!!window.addEventListener,oC=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xf=[];function wf(t,e,r,a){return r=r||{},a||!G.canvasSupported?ym(t,e,r):G.browser.firefox&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):ym(t,e,r),r}function ym(t,e,r){if(G.domSupported&&t.getBoundingClientRect){var a=e.clientX,i=e.clientY;if(mm(t)){var n=t.getBoundingClientRect();r.zrX=a-n.left,r.zrY=i-n.top;return}else if(yf(xf,t,a,i)){r.zrX=xf[0],r.zrY=xf[1];return}}r.zrX=r.zrY=0}function bf(t){return t||window.event}function Er(t,e,r){if(e=bf(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(!i)wf(t,e,e,r),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;else{var n=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];n&&wf(t,n,e,r)}var o=e.button;return e.which==null&&o!==void 0&&oC.test(e.type)&&(e.which=o&1?1:o&2?3:o&4?2:0),e}function Sf(t,e,r,a){_f?t.addEventListener(e,r,a):t.attachEvent("on"+e,r)}function sC(t,e,r,a){_f?t.removeEventListener(e,r,a):t.detachEvent("on"+e,r)}var oi=_f?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function _m(t){return t.which===2||t.which===3}var Af=function(){this._track=[]};Af.prototype={constructor:Af,recognize:function(t,e,r){return this._doTrack(t,e,r),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,r){var a=t.touches;if(!!a){for(var i={points:[],touches:[],target:e,event:t},n=0,o=a.length;n<o;n++){var s=a[n],l=wf(r,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},_recognize:function(t){for(var e in Tf)if(Tf.hasOwnProperty(e)){var r=Tf[e](this._track,t);if(r)return r}}};function xm(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function lC(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var Tf={pinch:function(t,e){var r=t.length;if(!!r){var a=(t[r-1]||{}).points,i=(t[r-2]||{}).points||a;if(i&&i.length>1&&a&&a.length>1){var n=xm(a)/xm(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=lC(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},wm="silent";function uC(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:hC}}function hC(){oi(this.event)}function bm(){}bm.prototype.dispose=function(){};var fC=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],hn=function(t,e,r,a){le.call(this),this.storage=t,this.painter=e,this.painterRoot=a,r=r||new bm,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,fl.call(this),this.setHandlerProxy(r)};hn.prototype={constructor:hn,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(M(fC,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,r=t.zrY,a=Sm(this,e,r),i=this._hovered,n=i.target;n&&!n.__zr&&(i=this.findHover(i.x,i.y),n=i.target);var o=this._hovered=a?{x:e,y:r}:this.findHover(e,r),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),n&&s!==n&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==n&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,r=t.zrIsToLocalDOM;e!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),e!=="no_globalout"&&!r&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var r=this[t];r&&r.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,r){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var i="on"+e,n=uC(e,t,r);a&&(a[i]&&(n.cancelBubble=a[i].call(a,n)),a.trigger(e,n),a=a.parent,!n.cancelBubble););n.cancelBubble||(this.trigger(e,n),this.painter&&this.painter.eachOtherLayer(function(o){typeof o[i]=="function"&&o[i].call(o,n),o.trigger&&o.trigger(e,n)}))}},findHover:function(t,e,r){for(var a=this.storage.getDisplayList(),i={x:t,y:e},n=a.length-1;n>=0;n--){var o;if(a[n]!==r&&!a[n].ignore&&(o=cC(a[n],t,e))&&(!i.topTarget&&(i.topTarget=a[n]),o!==wm)){i.target=a[n];break}}return i},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Af);var r=this._gestureMgr;e==="start"&&r.clear();var a=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(e==="end"&&r.clear(),a){var i=a.type;t.gestureEvent=i,this.dispatchToElement({target:a.target},i,a.event)}}},M(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){hn.prototype[t]=function(e){var r=e.zrX,a=e.zrY,i=Sm(this,r,a),n,o;if((t!=="mouseup"||!i)&&(n=this.findHover(r,a),o=n.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||ta(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});function cC(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var a=t,i;a;){if(a.clipPath&&!a.clipPath.contain(e,r))return!1;a.silent&&(i=!0),a=a.parent}return i?wm:!0}return!1}function Sm(t,e,r){var a=t.painter;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}Dt(hn,le),Dt(hn,fl);var vC=typeof Float32Array>"u"?Array:Float32Array;function Ie(){var t=new vC(6);return fn(t),t}function fn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function xo(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Sa(t,e,r){var a=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],n=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=a,t[1]=i,t[2]=n,t[3]=o,t[4]=s,t[5]=l,t}function yr(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function aa(t,e,r){var a=e[0],i=e[2],n=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(r),h=Math.cos(r);return t[0]=a*h+o*u,t[1]=-a*u+o*h,t[2]=i*h+s*u,t[3]=-i*u+h*s,t[4]=h*n+u*l,t[5]=h*l-u*n,t}function wo(t,e,r){var a=r[0],i=r[1];return t[0]=e[0]*a,t[1]=e[1]*i,t[2]=e[2]*a,t[3]=e[3]*i,t[4]=e[4]*a,t[5]=e[5]*i,t}function cl(t,e){var r=e[0],a=e[2],i=e[4],n=e[1],o=e[3],s=e[5],l=r*o-n*a;return l?(l=1/l,t[0]=o*l,t[1]=-n*l,t[2]=-a*l,t[3]=r*l,t[4]=(a*s-o*i)*l,t[5]=(n*i-r*s)*l,t):null}function Am(t){var e=Ie();return xo(e,t),e}var dC=(Object.freeze||Object)({create:Ie,identity:fn,copy:xo,mul:Sa,translate:yr,rotate:aa,scale:wo,invert:cl,clone:Am}),Cf=fn,Tm=5e-5;function si(t){return t>Tm||t<-Tm}var _r=function(t){t=t||{},t.position||(this.position=[0,0]),t.rotation==null&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},xr=_r.prototype;xr.transform=null,xr.needLocalTransform=function(){return si(this.rotation)||si(this.position[0])||si(this.position[1])||si(this.scale[0]-1)||si(this.scale[1]-1)};var li=[];xr.updateTransform=function(){var t=this.parent,e=t&&t.transform,r=this.needLocalTransform(),a=this.transform;if(!(r||e)){a&&Cf(a);return}a=a||Ie(),r?this.getLocalTransform(a):Cf(a),e&&(r?Sa(a,t.transform,a):xo(a,t.transform)),this.transform=a;var i=this.globalScaleRatio;if(i!=null&&i!==1){this.getGlobalScale(li);var n=li[0]<0?-1:1,o=li[1]<0?-1:1,s=((li[0]-n)*i+n)/li[0]||0,l=((li[1]-o)*i+o)/li[1]||0;a[0]*=s,a[1]*=s,a[2]*=l,a[3]*=l}this.invTransform=this.invTransform||Ie(),cl(this.invTransform,a)},xr.getLocalTransform=function(t){return _r.getLocalTransform(this,t)},xr.setTransform=function(t){var e=this.transform,r=t.dpr||1;e?t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5]):t.setTransform(r,0,0,r,0,0)},xr.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var cn=[],Df=Ie();xr.setLocalTransform=function(t){if(!!t){var e=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],a=this.position,i=this.scale;si(e-1)&&(e=Math.sqrt(e)),si(r-1)&&(r=Math.sqrt(r)),t[0]<0&&(e=-e),t[3]<0&&(r=-r),a[0]=t[4],a[1]=t[5],i[0]=e,i[1]=r,this.rotation=Math.atan2(-t[1]/r,t[0]/e)}},xr.decomposeTransform=function(){if(!!this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Sa(cn,t.invTransform,e),e=cn);var r=this.origin;r&&(r[0]||r[1])&&(Df[4]=r[0],Df[5]=r[1],Sa(cn,e,Df),cn[4]-=r[0],cn[5]-=r[1],e=cn),this.setLocalTransform(e)}},xr.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},xr.transformCoordToLocal=function(t,e){var r=[t,e],a=this.invTransform;return a&&Pt(r,r,a),r},xr.transformCoordToGlobal=function(t,e){var r=[t,e],a=this.transform;return a&&Pt(r,r,a),r},_r.getLocalTransform=function(t,e){e=e||[],Cf(e);var r=t.origin,a=t.scale||[1,1],i=t.rotation||0,n=t.position||[0,0];return r&&(e[4]-=r[0],e[5]-=r[1]),wo(e,e,a),i&&aa(e,e,i),r&&(e[4]+=r[0],e[5]+=r[1]),e[4]+=n[0],e[5]+=n[1],e};var vl={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)))},elasticOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/a)+1)},elasticInOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-vl.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?vl.bounceIn(t*2)*.5:vl.bounceOut(t*2-1)*.5+.5}};function Mf(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=t.loop==null?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}Mf.prototype={constructor:Mf,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused){this._pausedTime+=e;return}var r=(t-this._startTime-this._pausedTime)/this._life;if(!(r<0)){r=Math.min(r,1);var a=this.easing,i=typeof a=="string"?vl[a]:a,n=typeof i=="function"?i(r):r;return this.fire("frame",n),r===1?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Cm=function(){this.head=null,this.tail=null,this._len=0},bo=Cm.prototype;bo.insert=function(t){var e=new Dm(t);return this.insertEntry(e),e},bo.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},bo.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._len--},bo.len=function(){return this._len},bo.clear=function(){this.head=this.tail=null,this._len=0};var Dm=function(t){this.value=t,this.next,this.prev},If=function(t){this._list=new Cm,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Lf=If.prototype;Lf.put=function(t,e){var r=this._list,a=this._map,i=null;if(a[t]==null){var n=r.len(),o=this._lastRemovedEntry;if(n>=this._maxSize&&n>0){var s=r.head;r.remove(s),delete a[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new Dm(e),o.key=t,r.insertEntry(o),a[t]=o}return i},Lf.get=function(t){var e=this._map[t],r=this._list;if(e!=null)return e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value},Lf.clear=function(){this._list.clear(),this._map={}};var Mm={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 wr(t){return t=Math.round(t),t<0?0:t>255?255:t}function gC(t){return t=Math.round(t),t<0?0:t>360?360:t}function So(t){return t<0?0:t>1?1:t}function Pf(t){return t.length&&t.charAt(t.length-1)==="%"?wr(parseFloat(t)/100*255):wr(parseInt(t,10))}function vn(t){return t.length&&t.charAt(t.length-1)==="%"?So(parseFloat(t)/100):So(parseFloat(t))}function Ef(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Aa(t,e,r){return t+(e-t)*r}function br(t,e,r,a,i){return t[0]=e,t[1]=r,t[2]=a,t[3]=i,t}function Rf(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Im=new If(20),dl=null;function dn(t,e){dl&&Rf(dl,e),dl=Im.put(t,dl||e.slice())}function Ve(t,e){if(!!t){e=e||[];var r=Im.get(t);if(r)return Rf(e,r);t=t+"";var a=t.replace(/ /g,"").toLowerCase();if(a in Mm)return Rf(e,Mm[a]),dn(t,e),e;if(a.charAt(0)==="#"){if(a.length===4){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=4095)){br(e,0,0,0,1);return}return br(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,1),dn(t,e),e}else if(a.length===7){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=16777215)){br(e,0,0,0,1);return}return br(e,(i&16711680)>>16,(i&65280)>>8,i&255,1),dn(t,e),e}return}var n=a.indexOf("("),o=a.indexOf(")");if(n!==-1&&o+1===a.length){var s=a.substr(0,n),l=a.substr(n+1,o-(n+1)).split(","),u=1;switch(s){case"rgba":if(l.length!==4){br(e,0,0,0,1);return}u=vn(l.pop());case"rgb":if(l.length!==3){br(e,0,0,0,1);return}return br(e,Pf(l[0]),Pf(l[1]),Pf(l[2]),u),dn(t,e),e;case"hsla":if(l.length!==4){br(e,0,0,0,1);return}return l[3]=vn(l[3]),Of(l,e),dn(t,e),e;case"hsl":if(l.length!==3){br(e,0,0,0,1);return}return Of(l,e),dn(t,e),e;default:return}}br(e,0,0,0,1)}}function Of(t,e){var r=(parseFloat(t[0])%360+360)%360/360,a=vn(t[1]),i=vn(t[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],br(e,wr(Ef(o,n,r+1/3)*255),wr(Ef(o,n,r)*255),wr(Ef(o,n,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function pC(t){if(!!t){var e=t[0]/255,r=t[1]/255,a=t[2]/255,i=Math.min(e,r,a),n=Math.max(e,r,a),o=n-i,s=(n+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+i):u=o/(2-n-i);var h=((n-e)/6+o/2)/o,f=((n-r)/6+o/2)/o,c=((n-a)/6+o/2)/o;e===n?l=c-f:r===n?l=1/3+h-c:a===n&&(l=2/3+f-h),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function Lm(t,e){var r=Ve(t);if(r){for(var a=0;a<3;a++)e<0?r[a]=r[a]*(1-e)|0:r[a]=(255-r[a])*e+r[a]|0,r[a]>255?r[a]=255:t[a]<0&&(r[a]=0);return ia(r,r.length===4?"rgba":"rgb")}}function Nf(t){var e=Ve(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ao(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var a=t*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=e[i],s=e[n],l=a-i;return r[0]=wr(Aa(o[0],s[0],l)),r[1]=wr(Aa(o[1],s[1],l)),r[2]=wr(Aa(o[2],s[2],l)),r[3]=So(Aa(o[3],s[3],l)),r}}var mC=Ao;function Pm(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var a=t*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=Ve(e[i]),s=Ve(e[n]),l=a-i,u=ia([wr(Aa(o[0],s[0],l)),wr(Aa(o[1],s[1],l)),wr(Aa(o[2],s[2],l)),So(Aa(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}var yC=Pm;function gn(t,e,r,a){if(t=Ve(t),t)return t=pC(t),e!=null&&(t[0]=gC(e)),r!=null&&(t[1]=vn(r)),a!=null&&(t[2]=vn(a)),ia(Of(t),"rgba")}function gl(t,e){if(t=Ve(t),t&&e!=null)return t[3]=So(e),ia(t,"rgba")}function ia(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}var _C=(Object.freeze||Object)({parse:Ve,lift:Lm,toHex:Nf,fastLerp:Ao,fastMapToColor:mC,lerp:Pm,mapToColor:yC,modifyHSL:gn,modifyAlpha:gl,stringify:ia}),kf=Array.prototype.slice;function xC(t,e){return t[e]}function wC(t,e,r){t[e]=r}function zf(t,e,r){return(e-t)*r+t}function Em(t,e,r){return r>.5?e:t}function Rm(t,e,r,a,i){var n=t.length;if(i===1)for(var o=0;o<n;o++)a[o]=zf(t[o],e[o],r);else for(var s=n&&t[0].length,o=0;o<n;o++)for(var l=0;l<s;l++)a[o][l]=zf(t[o][l],e[o][l],r)}function Om(t,e,r){var a=t.length,i=e.length;if(a!==i){var n=a>i;if(n)t.length=i;else for(var o=a;o<i;o++)t.push(r===1?e[o]:kf.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;o<t.length;o++)if(r===1)isNaN(t[o])&&(t[o]=e[o]);else for(var l=0;l<s;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function bC(t,e,r){if(t===e)return!0;var a=t.length;if(a!==e.length)return!1;if(r===1){for(var i=0;i<a;i++)if(t[i]!==e[i])return!1}else for(var n=t[0].length,i=0;i<a;i++)for(var o=0;o<n;o++)if(t[i][o]!==e[i][o])return!1;return!0}function Nm(t,e,r,a,i,n,o,s,l){var u=t.length;if(l===1)for(var h=0;h<u;h++)s[h]=Bf(t[h],e[h],r[h],a[h],i,n,o);else for(var f=t[0].length,h=0;h<u;h++)for(var c=0;c<f;c++)s[h][c]=Bf(t[h][c],e[h][c],r[h][c],a[h][c],i,n,o)}function Bf(t,e,r,a,i,n,o){var s=(r-t)*.5,l=(a-e)*.5;return(2*(e-r)+s+l)*o+(-3*(e-r)-2*s-l)*n+s*i+e}function SC(t){if(Qr(t)){var e=t.length;if(Qr(t[0])){for(var r=[],a=0;a<e;a++)r.push(kf.call(t[a]));return r}return kf.call(t)}return t}function km(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function AC(t){var e=t[t.length-1].value;return Qr(e&&e[0])?2:1}function TC(t,e,r,a,i,n){var o=t._getter,s=t._setter,l=e==="spline",u=a.length;if(!!u){var h=a[0].value,f=Qr(h),c=!1,v=!1,d=f?AC(a):0,g;a.sort(function(Q,j){return Q.time-j.time}),g=a[u-1].time;for(var p=[],m=[],y=a[0].value,_=!0,w=0;w<u;w++){p.push(a[w].time/g);var b=a[w].value;if(f&&bC(b,y,d)||!f&&b===y||(_=!1),y=b,typeof b=="string"){var A=Ve(b);A?(b=A,c=!0):v=!0}m.push(b)}if(!(!n&&_)){for(var S=m[u-1],w=0;w<u-1;w++)f?Om(m[w],S,d):isNaN(m[w])&&!isNaN(S)&&!v&&!c&&(m[w]=S);f&&Om(o(t._target,i),S,d);var D=0,I=0,L,P,R,E,Z,W;if(c)var $=[0,0,0,0];var X=function(Q,j){var U;if(j<0)U=0;else if(j<I){for(L=Math.min(D+1,u-1),U=L;U>=0&&!(p[U]<=j);U--);U=Math.min(U,u-2)}else{for(U=D;U<u&&!(p[U]>j);U++);U=Math.min(U-1,u-2)}D=U,I=j;var tt=p[U+1]-p[U];if(tt!==0)if(P=(j-p[U])/tt,l)if(E=m[U],R=m[U===0?U:U-1],Z=m[U>u-2?u-1:U+1],W=m[U>u-3?u-1:U+2],f)Nm(R,E,Z,W,P,P*P,P*P*P,o(Q,i),d);else{var ct;if(c)ct=Nm(R,E,Z,W,P,P*P,P*P*P,$,1),ct=km($);else{if(v)return Em(E,Z,P);ct=Bf(R,E,Z,W,P,P*P,P*P*P)}s(Q,i,ct)}else if(f)Rm(m[U],m[U+1],P,o(Q,i),d);else{var ct;if(c)Rm(m[U],m[U+1],P,$,1),ct=km($);else{if(v)return Em(m[U],m[U+1],P);ct=zf(m[U],m[U+1],P)}s(Q,i,ct)}},K=new Mf({target:t._target,life:g,loop:t._loop,delay:t._delay,onframe:X,ondestroy:r});return e&&e!=="spline"&&(K.easing=e),K}}}var Vf=function(t,e,r,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=r||xC,this._setter=a||wC,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Vf.prototype={when:function(t,e){var r=this._tracks;for(var a in e)if(!!e.hasOwnProperty(a)){if(!r[a]){r[a]=[];var i=this._getter(this._target,a);if(i==null)continue;t!==0&&r[a].push({time:0,value:SC(i)})}r[a].push({time:t,value:e[a]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,r=0;r<e;r++)t[r].call(this)},start:function(t,e){var r=this,a=0,i=function(){a--,a||r._doneCallback()},n;for(var o in this._tracks)if(!!this._tracks.hasOwnProperty(o)){var s=TC(this,t,i,this._tracks[o],o,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(u,h){l(u,h);for(var f=0;f<r._onframeList.length;f++)r._onframeList[f](u,h)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,r=this.animation,a=0;a<e.length;a++){var i=e[a];t&&i.onframe(this._target,1),r&&r.removeClip(i)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var zm=1;typeof window<"u"&&(zm=Math.max(window.devicePixelRatio||1,1));var CC=0,pl=zm,Bm=function(){};CC===1&&(Bm=console.error);var Ta=Bm,ml=function(){this.animators=[]};ml.prototype={constructor:ml,animate:function(t,e){var r,a=!1,i=this,n=this.__zr;if(t){var o=t.split("."),s=i;a=o[0]==="shape";for(var l=0,u=o.length;l<u;l++)!s||(s=s[o[l]]);s&&(r=s)}else r=i;if(!r){Ta('Property "'+t+'" is not existed in element '+i.id);return}var h=i.animators,f=new Vf(r,e);return f.during(function(c){i.dirty(a)}).done(function(){h.splice(yt(h,f),1)}),h.push(f),n&&n.animation.addAnimator(f),f},stopAnimation:function(t){for(var e=this.animators,r=e.length,a=0;a<r;a++)e[a].stop(t);return e.length=0,this},animateTo:function(t,e,r,a,i,n){Vm(this,t,e,r,a,i,n)},animateFrom:function(t,e,r,a,i,n){Vm(this,t,e,r,a,i,n,!0)}};function Vm(t,e,r,a,i,n,o,s){Lt(a)?(n=i,i=a,a=0):se(i)?(n=i,i="linear",a=0):se(a)?(n=a,a=0):se(r)?(n=r,r=500):r||(r=500),t.stopAnimation(),Gm(t,"",t,e,r,a,s);var l=t.animators.slice(),u=l.length;function h(){u--,u||n&&n()}u||n&&n();for(var f=0;f<l.length;f++)l[f].done(h).start(i,o)}function Gm(t,e,r,a,i,n,o){var s={},l=0;for(var u in a)!a.hasOwnProperty(u)||(r[u]!=null?lt(a[u])&&!Qr(a[u])?Gm(t,e?e+"."+u:u,r[u],a[u],i,n,o):(o?(s[u]=r[u],Hm(t,e,u,a[u])):s[u]=a[u],l++):a[u]!=null&&!o&&Hm(t,e,u,a[u]));l>0&&t.animate(e,!1).when(i??500,s).delay(n||0)}function Hm(t,e,r,a){if(!e)t.attr(r,a);else{var i={};i[e]={},i[e][r]=a,t.attr(i)}}var na=function(t){_r.call(this,t),le.call(this,t),ml.call(this,t),this.id=t.id||k()};na.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if(t==="position"||t==="scale"||t==="origin"){if(e){var r=this[t];r||(r=this[t]=[]),r[0]=e[0],r[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(lt(t))for(var r in t)t.hasOwnProperty(r)&&this.attrKV(r,t[r]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.addAnimator(e[r]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.removeAnimator(e[r]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},Dt(na,ml),Dt(na,_r),Dt(na,le);var yl=Pt,_l=Math.min,xl=Math.max;function vt(t,e,r,a){r<0&&(t=t+r,r=-r),a<0&&(e=e+a,a=-a),this.x=t,this.y=e,this.width=r,this.height=a}vt.prototype={constructor:vt,union:function(t){var e=_l(t.x,this.x),r=_l(t.y,this.y);this.width=xl(t.x+t.width,this.x+this.width)-e,this.height=xl(t.y+t.height,this.y+this.height)-r,this.x=e,this.y=r},applyTransform:function(){var t=[],e=[],r=[],a=[];return function(i){if(!!i){t[0]=r[0]=this.x,t[1]=a[1]=this.y,e[0]=a[0]=this.x+this.width,e[1]=r[1]=this.y+this.height,yl(t,t,i),yl(e,e,i),yl(r,r,i),yl(a,a,i),this.x=_l(t[0],e[0],r[0],a[0]),this.y=_l(t[1],e[1],r[1],a[1]);var n=xl(t[0],e[0],r[0],a[0]),o=xl(t[1],e[1],r[1],a[1]);this.width=n-this.x,this.height=o-this.y}}}(),calculateTransform:function(t){var e=this,r=t.width/e.width,a=t.height/e.height,i=Ie();return yr(i,i,[-e.x,-e.y]),wo(i,i,[r,a]),yr(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof vt||(t=vt.create(t));var e=this,r=e.x,a=e.x+e.width,i=e.y,n=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(a<o||s<r||n<l||u<i)},contain:function(t,e){var r=this;return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},clone:function(){return new vt(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},vt.create=function(t){return new vt(t.x,t.y,t.width,t.height)};var q=function(t){t=t||{},na.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};q.prototype={constructor:q,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,r=0;r<e.length;r++)if(e[r].name===t)return e[r]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var r=this._children,a=r.indexOf(e);a>=0&&(r.splice(a,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,r=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof q&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var e=this.__zr,r=this.__storage,a=this._children,i=yt(a,t);return i<0?this:(a.splice(i,1),t.parent=null,r&&(r.delFromStorage(t),t instanceof q&&t.delChildrenFromStorage(r)),e&&e.refresh(),this)},removeAll:function(){var t=this._children,e=this.__storage,r,a;for(a=0;a<t.length;a++)r=t[a],e&&(e.delFromStorage(r),r instanceof q&&r.delChildrenFromStorage(e)),r.parent=null;return t.length=0,this},eachChild:function(t,e){for(var r=this._children,a=0;a<r.length;a++){var i=r[a];t.call(e,i,a)}return this},traverse:function(t,e){for(var r=0;r<this._children.length;r++){var a=this._children[r];t.call(e,a),a.type==="group"&&a.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.addToStorage(r),r instanceof q&&r.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.delFromStorage(r),r instanceof q&&r.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,r=new vt(0,0,0,0),a=t||this._children,i=[],n=0;n<a.length;n++){var o=a[n];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),l=o.getLocalTransform(i);l?(r.copy(s),r.applyTransform(l),e=e||r.clone(),e.union(r)):(e=e||s.clone(),e.union(s))}}return e||r}},It(q,na);var Fm=32,To=7;function DC(t){for(var e=0;t>=Fm;)e|=t&1,t>>=1;return t+e}function Wm(t,e,r,a){var i=e+1;if(i===r)return 1;if(a(t[i++],t[e])<0){for(;i<r&&a(t[i],t[i-1])<0;)i++;MC(t,e,i)}else for(;i<r&&a(t[i],t[i-1])>=0;)i++;return i-e}function MC(t,e,r){for(r--;e<r;){var a=t[e];t[e++]=t[r],t[r--]=a}}function Um(t,e,r,a,i){for(a===e&&a++;a<r;a++){for(var n=t[a],o=e,s=a,l;o<s;)l=o+s>>>1,i(n,t[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=n}}function Gf(t,e,r,a,i,n){var o=0,s=0,l=1;if(n(t,e[r+i])>0){for(s=a-i;l<s&&n(t,e[r+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&n(t,e[r+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var h=o+(l-o>>>1);n(t,e[r+h])>0?o=h+1:l=h}return l}function Hf(t,e,r,a,i,n){var o=0,s=0,l=1;if(n(t,e[r+i])<0){for(s=i+1;l<s&&n(t,e[r+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=a-i;l<s&&n(t,e[r+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var h=o+(l-o>>>1);n(t,e[r+h])<0?l=h:o=h+1}return l}function IC(t,e){var r=To,a,i,n=0,o=[];a=[],i=[];function s(v,d){a[n]=v,i[n]=d,n+=1}function l(){for(;n>1;){var v=n-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]<i[v+1]&&v--;else if(i[v]>i[v+1])break;h(v)}}function u(){for(;n>1;){var v=n-2;v>0&&i[v-1]<i[v+1]&&v--,h(v)}}function h(v){var d=a[v],g=i[v],p=a[v+1],m=i[v+1];i[v]=g+m,v===n-3&&(a[v+1]=a[v+2],i[v+1]=i[v+2]),n--;var y=Hf(t[p],t,d,g,0,e);d+=y,g-=y,g!==0&&(m=Gf(t[d+g-1],t,p,m,m-1,e),m!==0&&(g<=m?f(d,g,p,m):c(d,g,p,m)))}function f(v,d,g,p){var m=0;for(m=0;m<d;m++)o[m]=t[v+m];var y=0,_=g,w=v;if(t[w++]=t[_++],--p===0){for(m=0;m<d;m++)t[w+m]=o[y+m];return}if(d===1){for(m=0;m<p;m++)t[w+m]=t[_+m];t[w+p]=o[y];return}for(var b=r,A,S,D;;){A=0,S=0,D=!1;do if(e(t[_],o[y])<0){if(t[w++]=t[_++],S++,A=0,--p===0){D=!0;break}}else if(t[w++]=o[y++],A++,S=0,--d===1){D=!0;break}while((A|S)<b);if(D)break;do{if(A=Hf(t[_],o,y,d,0,e),A!==0){for(m=0;m<A;m++)t[w+m]=o[y+m];if(w+=A,y+=A,d-=A,d<=1){D=!0;break}}if(t[w++]=t[_++],--p===0){D=!0;break}if(S=Gf(o[y],t,_,p,0,e),S!==0){for(m=0;m<S;m++)t[w+m]=t[_+m];if(w+=S,_+=S,p-=S,p===0){D=!0;break}}if(t[w++]=o[y++],--d===1){D=!0;break}b--}while(A>=To||S>=To);if(D)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),d===1){for(m=0;m<p;m++)t[w+m]=t[_+m];t[w+p]=o[y]}else{if(d===0)throw new Error;for(m=0;m<d;m++)t[w+m]=o[y+m]}}function c(v,d,g,p){var m=0;for(m=0;m<p;m++)o[m]=t[g+m];var y=v+d-1,_=p-1,w=g+p-1,b=0,A=0;if(t[w--]=t[y--],--d===0){for(b=w-(p-1),m=0;m<p;m++)t[b+m]=o[m];return}if(p===1){for(w-=d,y-=d,A=w+1,b=y+1,m=d-1;m>=0;m--)t[A+m]=t[b+m];t[w]=o[_];return}for(var S=r;;){var D=0,I=0,L=!1;do if(e(o[_],t[y])<0){if(t[w--]=t[y--],D++,I=0,--d===0){L=!0;break}}else if(t[w--]=o[_--],I++,D=0,--p===1){L=!0;break}while((D|I)<S);if(L)break;do{if(D=d-Hf(o[_],t,v,d,d-1,e),D!==0){for(w-=D,y-=D,d-=D,A=w+1,b=y+1,m=D-1;m>=0;m--)t[A+m]=t[b+m];if(d===0){L=!0;break}}if(t[w--]=o[_--],--p===1){L=!0;break}if(I=p-Gf(t[y],o,0,p,p-1,e),I!==0){for(w-=I,_-=I,p-=I,A=w+1,b=_+1,m=0;m<I;m++)t[A+m]=o[b+m];if(p<=1){L=!0;break}}if(t[w--]=t[y--],--d===0){L=!0;break}S--}while(D>=To||I>=To);if(L)break;S<0&&(S=0),S+=2}if(r=S,r<1&&(r=1),p===1){for(w-=d,y-=d,A=w+1,b=y+1,m=d-1;m>=0;m--)t[A+m]=t[b+m];t[w]=o[_]}else{if(p===0)throw new Error;for(b=w-(p-1),m=0;m<p;m++)t[b+m]=o[m]}}this.mergeRuns=l,this.forceMergeRuns=u,this.pushRun=s}function wl(t,e,r,a){r||(r=0),a||(a=t.length);var i=a-r;if(!(i<2)){var n=0;if(i<Fm){n=Wm(t,r,a,e),Um(t,r,a,r+n,e);return}var o=new IC(t,e),s=DC(i);do{if(n=Wm(t,r,a,e),n<s){var l=i;l>s&&(l=s),Um(t,r,r+l,r+n,e),n=l}o.pushRun(r,n),o.mergeRuns(),i-=n,r+=n}while(i!==0);o.forceMergeRuns()}}function $m(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Ff=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Ff.prototype={constructor:Ff,traverse:function(t,e){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,r=this._displayList,a=0,i=e.length;a<i;a++)this._updateAndAddDisplayable(e[a],null,t);r.length=this._displayListLen,G.canvasSupported&&wl(r,$m)},_updateAndAddDisplayable:function(t,e,r){if(!(t.ignore&&!r)){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var a=t.clipPath;if(a){e?e=e.slice():e=[];for(var i=a,n=t;i;)i.parent=n,i.updateTransform(),e.push(i),n=i,i=i.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,r)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof q&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(t==null){for(var e=0;e<this._roots.length;e++){var r=this._roots[e];r instanceof q&&r.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(t instanceof Array){for(var e=0,a=t.length;e<a;e++)this.delRoot(t[e]);return}var i=yt(this._roots,t);i>=0&&(this.delFromStorage(t),this._roots.splice(i,1),t instanceof q&&t.delChildrenFromStorage(this))},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:$m};var LC={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Wf=function(t,e,r){return LC.hasOwnProperty(e)?r*=t.dpr:r},Ca={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Uf=9,bl=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Da=function(t){this.extendFrom(t,!1)};function PC(t,e,r){var a=e.x==null?0:e.x,i=e.x2==null?1:e.x2,n=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(a=a*r.width+r.x,i=i*r.width+r.x,n=n*r.height+r.y,o=o*r.height+r.y),a=isNaN(a)?0:a,i=isNaN(i)?1:i,n=isNaN(n)?0:n,o=isNaN(o)?0:o;var s=t.createLinearGradient(a,n,i,o);return s}function EC(t,e,r){var a=r.width,i=r.height,n=Math.min(a,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*a+r.x,s=s*i+r.y,l=l*n);var u=t.createRadialGradient(o,s,0,o,s,l);return u}Da.prototype={constructor:Da,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,r){var a=this,i=r&&r.style,n=!i||t.__attrCachedBy!==Ca.STYLE_BIND;t.__attrCachedBy=Ca.STYLE_BIND;for(var o=0;o<bl.length;o++){var s=bl[o],l=s[0];(n||a[l]!==i[l])&&(t[l]=Wf(t,l,a[l]||s[1]))}if((n||a.fill!==i.fill)&&(t.fillStyle=a.fill),(n||a.stroke!==i.stroke)&&(t.strokeStyle=a.stroke),(n||a.opacity!==i.opacity)&&(t.globalAlpha=a.opacity==null?1:a.opacity),(n||a.blend!==i.blend)&&(t.globalCompositeOperation=a.blend||"source-over"),this.hasStroke()){var u=a.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return t!=null&&t!=="none"},hasStroke:function(){var t=this.stroke;return t!=null&&t!=="none"&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var r in t)t.hasOwnProperty(r)&&(e===!0||(e===!1?!this.hasOwnProperty(r):t[r]!=null))&&(this[r]=t[r])},set:function(t,e){typeof t=="string"?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,r){for(var a=e.type==="radial"?EC:PC,i=a(t,e,r),n=e.colorStops,o=0;o<n.length;o++)i.addColorStop(n[o].offset,n[o].color);return i}};for(var $f=Da.prototype,Zf=0;Zf<bl.length;Zf++){var Yf=bl[Zf];Yf[0]in $f||($f[Yf[0]]=Yf[1])}Da.getGradient=$f.getGradient;var Xf=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};Xf.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};function RC(){return!1}function Zm(t,e,r){var a=rn(),i=e.getWidth(),n=e.getHeight(),o=a.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=i+"px",o.height=n+"px",a.setAttribute("data-zr-dom-id",t)),a.width=i*r,a.height=n*r,a}var Co=function(t,e,r){var a;r=r||pl,typeof t=="string"?a=Zm(t,e,r):lt(t)&&(a=t,t=a.id),this.id=t,this.dom=a;var i=a.style;i&&(a.onselectstart=RC,i["-webkit-user-select"]="none",i["user-select"]="none",i["-webkit-touch-callout"]="none",i["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",i.padding=0,i.margin=0,i["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=r};Co.prototype={constructor:Co,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Zm("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},resize:function(t,e){var r=this.dpr,a=this.dom,i=a.style,n=this.domBack;i&&(i.width=t+"px",i.height=e+"px"),a.width=t*r,a.height=e*r,n&&(n.width=t*r,n.height=e*r,r!==1&&this.ctxBack.scale(r,r))},clear:function(t,o){var r=this.dom,a=this.ctx,i=r.width,n=r.height,o=o||this.clearColor,s=this.motionBlur&&!t,l=this.lastFrameAlpha,u=this.dpr;if(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,i/u,n/u)),a.clearRect(0,0,i,n),o&&o!=="transparent"){var h;o.colorStops?(h=o.__canvasGradient||Da.getGradient(a,o,{x:0,y:0,width:i,height:n}),o.__canvasGradient=h):o.image&&(h=Xf.prototype.getCanvasPattern.call(o,a)),a.save(),a.fillStyle=h||o,a.fillRect(0,0,i,n),a.restore()}if(s){var f=this.domBack;a.save(),a.globalAlpha=l,a.drawImage(f,0,0,i,n),a.restore()}}};var qf=typeof window<"u"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Kf=new If(50);function OC(t){if(typeof t=="string"){var e=Kf.get(t);return e&&e.image}else return t}function Ym(t,e,r,a,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var n=Kf.get(t),o={hostEl:r,cb:a,cbPayload:i};return n?(e=n.image,!Sl(e)&&n.pending.push(o)):(e=new Image,e.onload=e.onerror=NC,Kf.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}else return t;else return e}function NC(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],a=r.cb;a&&a(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function Sl(t){return t&&t.width&&t.height}var Al={},jf=0,kC=5e3,Qf=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Tl="12px sans-serif",Jf={};function zC(t,e){Jf[t]=e}function er(t,e){e=e||Tl;var r=t+":"+e;if(Al[r])return Al[r];for(var a=(t+"").split(`
`),i=0,n=0,o=a.length;n<o;n++)i=Math.max(HC(a[n],e).width,i);return jf>kC&&(jf=0,Al={}),jf++,Al[r]=i,i}function Rr(t,e,r,a,i,n,o,s){return o?VC(t,e,r,a,i,n,o,s):BC(t,e,r,a,i,n,s)}function BC(t,e,r,a,i,n,o){var s=rc(t,e,i,n,o),l=er(t,e);i&&(l+=i[1]+i[3]);var u=s.outerHeight,h=Do(0,l,r),f=pn(0,u,a),c=new vt(h,f,l,u);return c.lineHeight=s.lineHeight,c}function VC(t,e,r,a,i,n,o,s){var l=ac(t,{rich:o,truncate:s,font:e,textAlign:r,textPadding:i,textLineHeight:n}),u=l.outerWidth,h=l.outerHeight,f=Do(0,u,r),c=pn(0,h,a);return new vt(f,c,u,h)}function Do(t,e,r){return r==="right"?t-=e:r==="center"&&(t-=e/2),t}function pn(t,e,r){return r==="middle"?t-=e/2:r==="bottom"&&(t-=e),t}function tc(t,e,r){var a=e.textPosition,i=e.textDistance,n=r.x,o=r.y;i=i||0;var s=r.height,l=r.width,u=s/2,h="left",f="top";switch(a){case"left":n-=i,o+=u,h="right",f="middle";break;case"right":n+=i+l,o+=u,f="middle";break;case"top":n+=l/2,o-=i,h="center",f="bottom";break;case"bottom":n+=l/2,o+=s+i,h="center";break;case"inside":n+=l/2,o+=u,h="center",f="middle";break;case"insideLeft":n+=i,o+=u,f="middle";break;case"insideRight":n+=l-i,o+=u,h="right",f="middle";break;case"insideTop":n+=l/2,o+=i,h="center";break;case"insideBottom":n+=l/2,o+=s-i,h="center",f="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=l-i,o+=i,h="right";break;case"insideBottomLeft":n+=i,o+=s-i,f="bottom";break;case"insideBottomRight":n+=l-i,o+=s-i,h="right",f="bottom";break}return t=t||{},t.x=n,t.y=o,t.textAlign=h,t.textVerticalAlign=f,t}function ec(t,e,r,a,i){if(!e)return"";var n=(t+"").split(`
`);i=Xm(e,r,a,i);for(var o=0,s=n.length;o<s;o++)n[o]=qm(n[o],i);return n.join(`
`)}function Xm(t,e,i,a){a=et({},a),a.font=e;var i=Xt(i,"...");a.maxIterations=Xt(a.maxIterations,2);var n=a.minChar=Xt(a.minChar,0);a.cnCharWidth=er("\u56FD",e);var o=a.ascCharWidth=er("a",e);a.placeholder=Xt(a.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<n&&s>=o;l++)s-=o;var u=er(i,e);return u>s&&(i="",u=0),s=t-u,a.ellipsis=i,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=t,a}function qm(t,e){var r=e.containerWidth,a=e.font,i=e.contentWidth;if(!r)return"";var n=er(t,a);if(n<=r)return t;for(var o=0;;o++){if(n<=i||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?GC(t,i,e.ascCharWidth,e.cnCharWidth):n>0?Math.floor(t.length*i/n):0;t=t.substr(0,s),n=er(t,a)}return t===""&&(t=e.placeholder),t}function GC(t,e,r,a){for(var i=0,n=0,o=t.length;n<o&&i<e;n++){var s=t.charCodeAt(n);i+=0<=s&&s<=127?r:a}return n}function Km(t){return er("\u56FD",t)}function HC(t,e){return Jf.measureText(t,e)}Jf.measureText=function(t,e){var r=om();return r.font=e||Tl,r.measureText(t)};function rc(t,e,r,a,i){t!=null&&(t+="");var n=Xt(a,Km(e)),o=t?t.split(`
`):[],s=o.length*n,l=s,u=!0;if(r&&(l+=r[0]+r[2]),t&&i){u=!1;var h=i.outerHeight,f=i.outerWidth;if(h!=null&&l>h)t="",o=[];else if(f!=null)for(var c=Xm(f-(r?r[1]+r[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),v=0,d=o.length;v<d;v++)o[v]=qm(o[v],c)}return{lines:o,height:s,outerHeight:l,lineHeight:n,canCacheByTextString:u}}function ac(t,e){var r={lines:[],width:0,height:0};if(t!=null&&(t+=""),!t)return r;for(var a=Qf.lastIndex=0,i;(i=Qf.exec(t))!=null;){var n=i.index;n>a&&ic(r,t.substring(a,n)),ic(r,i[2],i[1]),a=Qf.lastIndex}a<t.length&&ic(r,t.substring(a,t.length));var o=r.lines,s=0,l=0,u=[],h=e.textPadding,f=e.truncate,c=f&&f.outerWidth,v=f&&f.outerHeight;h&&(c!=null&&(c-=h[1]+h[3]),v!=null&&(v-=h[0]+h[2]));for(var d=0;d<o.length;d++){for(var g=o[d],p=0,m=0,y=0;y<g.tokens.length;y++){var _=g.tokens[y],w=_.styleName&&e.rich[_.styleName]||{},b=_.textPadding=w.textPadding,A=_.font=w.font||e.font,S=_.textHeight=Xt(w.textHeight,Km(A));if(b&&(S+=b[0]+b[2]),_.height=S,_.lineHeight=ni(w.textLineHeight,e.textLineHeight,S),_.textAlign=w&&w.textAlign||e.textAlign,_.textVerticalAlign=w&&w.textVerticalAlign||"middle",v!=null&&s+_.lineHeight>v)return{lines:[],width:0,height:0};_.textWidth=er(_.text,A);var D=w.textWidth,I=D==null||D==="auto";if(typeof D=="string"&&D.charAt(D.length-1)==="%")_.percentWidth=D,u.push(_),D=0;else{if(I){D=_.textWidth;var L=w.textBackgroundColor,P=L&&L.image;P&&(P=OC(P),Sl(P)&&(D=Math.max(D,P.width*S/P.height)))}var R=b?b[1]+b[3]:0;D+=R;var E=c!=null?c-m:null;E!=null&&E<D&&(!I||E<R?(_.text="",_.textWidth=D=0):(_.text=ec(_.text,E-R,A,f.ellipsis,{minChar:f.minChar}),_.textWidth=er(_.text,A),D=_.textWidth+R))}m+=_.width=D,w&&(p=Math.max(p,_.lineHeight))}g.width=m,g.lineHeight=p,s+=p,l=Math.max(l,m)}r.outerWidth=r.width=Xt(e.textWidth,l),r.outerHeight=r.height=Xt(e.textHeight,s),h&&(r.outerWidth+=h[1]+h[3],r.outerHeight+=h[0]+h[2]);for(var d=0;d<u.length;d++){var _=u[d],Z=_.percentWidth;_.width=parseInt(Z,10)/100*l}return r}function ic(t,e,r){for(var a=e==="",i=e.split(`
`),n=t.lines,o=0;o<i.length;o++){var s=i[o],l={styleName:r,text:s,isLineHolder:!s&&!a};if(o)n.push({tokens:[l]});else{var u=(n[n.length-1]||(n[0]={tokens:[]})).tokens,h=u.length;h===1&&u[0].isLineHolder?u[0]=l:(s||!h||a)&&u.push(l)}}}function jm(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&tr(e)||t.textFont||t.font}function Qm(t,e){var r=e.x,a=e.y,i=e.width,n=e.height,o=e.r,s,l,u,h;i<0&&(r=r+i,i=-i),n<0&&(a=a+n,n=-n),typeof o=="number"?s=l=u=h=o:o instanceof Array?o.length===1?s=l=u=h=o[0]:o.length===2?(s=u=o[0],l=h=o[1]):o.length===3?(s=o[0],l=h=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],h=o[3]):s=l=u=h=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+h>i&&(f=u+h,u*=i/f,h*=i/f),l+u>n&&(f=l+u,l*=n/f,u*=n/f),s+h>n&&(f=s+h,s*=n/f,h*=n/f),t.moveTo(r+s,a),t.lineTo(r+i-l,a),l!==0&&t.arc(r+i-l,a+l,l,-Math.PI/2,0),t.lineTo(r+i,a+n-u),u!==0&&t.arc(r+i-u,a+n-u,u,0,Math.PI/2),t.lineTo(r+h,a+n),h!==0&&t.arc(r+h,a+n-h,h,Math.PI/2,Math.PI),t.lineTo(r,a+s),s!==0&&t.arc(r+s,a+s,s,Math.PI,Math.PI*1.5)}var nc=Tl,FC={left:1,right:1,center:1},WC={top:1,bottom:1,middle:1},Jm=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],t0={},e0={};function Mo(t){return r0(t),M(t.rich,r0),t}function r0(t){if(t){t.font=jm(t);var e=t.textAlign;e==="middle"&&(e="center"),t.textAlign=e==null||FC[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;r==="center"&&(r="middle"),t.textVerticalAlign=r==null||WC[r]?r:"top";var a=t.textPadding;a&&(t.textPadding=ff(t.textPadding))}}function a0(t,e,r,a,i,n){a.rich?$C(t,e,r,a,i,n):UC(t,e,r,a,i,n)}function UC(t,e,r,a,i,n){"use strict";var o=sc(a),s,l=!1,u=e.__attrCachedBy===Ca.PLAIN_TEXT;n!==Uf?(n&&(s=n.style,l=!o&&u&&s),e.__attrCachedBy=o?Ca.NONE:Ca.PLAIN_TEXT):u&&(e.__attrCachedBy=Ca.NONE);var h=a.font||nc;(!l||h!==(s.font||nc))&&(e.font=h);var f=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,f=t.__computedFont=e.font);var c=a.textPadding,v=a.textLineHeight,d=t.__textCotentBlock;(!d||t.__dirtyText)&&(d=t.__textCotentBlock=rc(r,f,c,v,a.truncate));var g=d.outerHeight,p=d.lines,m=d.lineHeight,y=uc(e0,t,a,i),_=y.baseX,w=y.baseY,b=y.textAlign||"left",A=y.textVerticalAlign;i0(e,a,i,_,w);var S=pn(w,g,A),D=_,I=S;if(o||c){var L=er(r,f),P=L;c&&(P+=c[1]+c[3]);var R=Do(_,P,b);o&&lc(t,e,a,R,S,P,g),c&&(D=o0(_,b,c),I+=c[0])}e.textAlign=b,e.textBaseline="middle",e.globalAlpha=a.opacity||1;for(var E=0;E<Jm.length;E++){var Z=Jm[E],W=Z[0],$=Z[1],X=a[W];(!l||X!==s[W])&&(e[$]=Wf(e,$,X||Z[2]))}I+=m/2;var K=a.textStrokeWidth,Q=l?s.textStrokeWidth:null,j=!l||K!==Q,U=!l||j||a.textStroke!==s.textStroke,tt=hc(a.textStroke,K),ct=n0(a.textFill);if(tt&&(j&&(e.lineWidth=K),U&&(e.strokeStyle=tt)),ct&&(!l||a.textFill!==s.textFill)&&(e.fillStyle=ct),p.length===1)tt&&e.strokeText(p[0],D,I),ct&&e.fillText(p[0],D,I);else for(var E=0;E<p.length;E++)tt&&e.strokeText(p[E],D,I),ct&&e.fillText(p[E],D,I),I+=m}function $C(t,e,r,a,i,n){n!==Uf&&(e.__attrCachedBy=Ca.NONE);var o=t.__textCotentBlock;(!o||t.__dirtyText)&&(o=t.__textCotentBlock=ac(r,a)),ZC(t,e,o,a,i)}function ZC(t,e,r,a,i){var n=r.width,o=r.outerWidth,s=r.outerHeight,l=a.textPadding,u=uc(e0,t,a,i),h=u.baseX,f=u.baseY,c=u.textAlign,v=u.textVerticalAlign;i0(e,a,i,h,f);var d=Do(h,o,c),g=pn(f,s,v),p=d,m=g;l&&(p+=l[3],m+=l[0]);var y=p+n;sc(a)&&lc(t,e,a,d,g,o,s);for(var _=0;_<r.lines.length;_++){for(var w=r.lines[_],b=w.tokens,A=b.length,S=w.lineHeight,D=w.width,I=0,L=p,P=y,R=A-1,E;I<A&&(E=b[I],!E.textAlign||E.textAlign==="left");)oc(t,e,E,a,S,m,L,"left"),D-=E.width,L+=E.width,I++;for(;R>=0&&(E=b[R],E.textAlign==="right");)oc(t,e,E,a,S,m,P,"right"),D-=E.width,P-=E.width,R--;for(L+=(n-(L-p)-(y-P)-D)/2;I<=R;)E=b[I],oc(t,e,E,a,S,m,L+E.width/2,"center"),L+=E.width,I++;m+=S}}function i0(t,e,r,a,i){if(r&&e.textRotation){var n=e.textOrigin;n==="center"?(a=r.width/2+r.x,i=r.height/2+r.y):n&&(a=n[0]+r.x,i=n[1]+r.y),t.translate(a,i),t.rotate(-e.textRotation),t.translate(-a,-i)}}function oc(t,e,r,a,i,n,o,s){var l=a.rich[r.styleName]||{};l.text=r.text;var u=r.textVerticalAlign,h=n+i/2;u==="top"?h=n+r.height/2:u==="bottom"&&(h=n+i-r.height/2),!r.isLineHolder&&sc(l)&&lc(t,e,l,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var f=r.textPadding;f&&(o=o0(o,s,f),h-=r.height/2-f[2]-r.textHeight/2),pe(e,"shadowBlur",ni(l.textShadowBlur,a.textShadowBlur,0)),pe(e,"shadowColor",l.textShadowColor||a.textShadowColor||"transparent"),pe(e,"shadowOffsetX",ni(l.textShadowOffsetX,a.textShadowOffsetX,0)),pe(e,"shadowOffsetY",ni(l.textShadowOffsetY,a.textShadowOffsetY,0)),pe(e,"textAlign",s),pe(e,"textBaseline","middle"),pe(e,"font",r.font||nc);var c=hc(l.textStroke||a.textStroke,d),v=n0(l.textFill||a.textFill),d=Xt(l.textStrokeWidth,a.textStrokeWidth);c&&(pe(e,"lineWidth",d),pe(e,"strokeStyle",c),e.strokeText(r.text,o,h)),v&&(pe(e,"fillStyle",v),e.fillText(r.text,o,h))}function sc(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function lc(t,e,r,a,i,n,o){var s=r.textBackgroundColor,l=r.textBorderWidth,u=r.textBorderColor,h=Lt(s);if(pe(e,"shadowBlur",r.textBoxShadowBlur||0),pe(e,"shadowColor",r.textBoxShadowColor||"transparent"),pe(e,"shadowOffsetX",r.textBoxShadowOffsetX||0),pe(e,"shadowOffsetY",r.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var f=r.textBorderRadius;f?Qm(e,{x:a,y:i,width:n,height:o,r:f}):e.rect(a,i,n,o),e.closePath()}if(h)if(pe(e,"fillStyle",s),r.fillOpacity!=null){var c=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,e.fill(),e.globalAlpha=c}else e.fill();else if(lt(s)){var v=s.image;v=Ym(v,null,t,YC,s),v&&Sl(v)&&e.drawImage(v,a,i,n,o)}if(l&&u)if(pe(e,"lineWidth",l),pe(e,"strokeStyle",u),r.strokeOpacity!=null){var c=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,e.stroke(),e.globalAlpha=c}else e.stroke()}function YC(t,e){e.image=t}function uc(t,e,r,a){var i=r.x||0,n=r.y||0,o=r.textAlign,s=r.textVerticalAlign;if(a){var l=r.textPosition;if(l instanceof Array)i=a.x+fc(l[0],a.width),n=a.y+fc(l[1],a.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(t0,r,a):tc(t0,r,a);i=u.x,n=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=r.textOffset;h&&(i+=h[0],n+=h[1])}return t=t||{},t.baseX=i,t.baseY=n,t.textAlign=o,t.textVerticalAlign=s,t}function pe(t,e,r){return t[e]=Wf(t,e,r),t[e]}function hc(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function n0(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function fc(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function o0(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function cc(t,e){return t!=null&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}var vc=new vt,Cl=function(){};Cl.prototype={constructor:Cl,drawRectText:function(t,e){var r=this.style;e=r.textRect||e,this.__dirty&&Mo(r,!0);var a=r.text;if(a!=null&&(a+=""),!!cc(a,r)){t.save();var i=this.transform;r.transformText?this.setTransform(t):i&&(vc.copy(e),vc.applyTransform(i),e=vc),a0(this,t,a,r,e,Uf),t.restore()}}};function Le(t){t=t||{},na.call(this,t);for(var e in t)t.hasOwnProperty(e)&&e!=="style"&&(this[e]=t[e]);this.style=new Da(t.style,this),this._rect=null,this.__clipPaths=null}Le.prototype={constructor:Le,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect();return a.contain(r[0],r[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){t!=="style"?na.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Da(t,this),this.dirty(!1),this},calculateTextPosition:null},It(Le,na),Dt(Le,Cl);function ve(t){Le.call(this,t)}ve.prototype={constructor:ve,type:"image",brush:function(t,e){var r=this.style,a=r.image;r.bind(t,this,e);var i=this._image=Ym(a,this._image,this,this.onload);if(!(!i||!Sl(i))){var n=r.x||0,o=r.y||0,s=r.width,l=r.height,u=i.width/i.height;if(s==null&&l!=null?s=l*u:l==null&&s!=null?l=s/u:s==null&&l==null&&(s=i.width,l=i.height),this.setTransform(t),r.sWidth&&r.sHeight){var h=r.sx||0,f=r.sy||0;t.drawImage(i,h,f,r.sWidth,r.sHeight,n,o,s,l)}else if(r.sx&&r.sy){var h=r.sx,f=r.sy,c=s-h,v=l-f;t.drawImage(i,h,f,c,v,n,o,s,l)}else t.drawImage(i,n,o,s,l);r.text!=null&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new vt(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},It(ve,Le);var s0=1e5,ui=314159,Dl=.01,XC=.001;function Ml(t){return parseInt(t,10)}function qC(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}var dc=new vt(0,0,0,0),gc=new vt(0,0,0,0);function KC(t,e,r){return dc.copy(t.getBoundingRect()),t.transform&&dc.applyTransform(t.transform),gc.width=e,gc.height=r,!dc.intersect(gc)}function jC(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function QC(t,e){for(var r=0;r<t.length;r++){var a=t[r];a.setTransform(e),e.beginPath(),a.buildPath(e,a.shape),e.clip(),a.restoreTransform(e)}}function JC(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var pc=function(t,e,r){this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=r=et({},r||{}),this.dpr=r.devicePixelRatio||pl,this._singleCanvas=a,this.root=t;var i=t.style;i&&(i["-webkit-tap-highlight-color"]="transparent",i["-webkit-user-select"]=i["user-select"]=i["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var n=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var l=t.width,u=t.height;r.width!=null&&(l=r.width),r.height!=null&&(u=r.height),this.dpr=r.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new Co(t,this,this.dpr);h.__builtin__=!0,h.initContext(),o[ui]=h,h.zlevel=ui,n.push(ui),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var s=this._domRoot=JC(this._width,this._height);t.appendChild(s)}this._hoverlayer=null,this._hoverElements=[]};pc.prototype={constructor:pc,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),r=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var a=0;a<r.length;a++){var i=r[a],n=this._layers[i];if(!n.__builtin__&&n.refresh){var o=a===0?this._backgroundColor:null;n.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var r=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return r.__from=t,t.__hoverMir=r,e&&r.setStyle(e),this._hoverElements.push(r),r}},removeHover:function(t){var e=t.__hoverMir,r=this._hoverElements,a=yt(r,e);a>=0&&r.splice(a,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,r=0;r<e.length;r++){var a=e[r].__from;a&&(a.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,r=this._hoverlayer;if(r&&r.clear(),!!e){wl(t,this.storage.displayableSortFunc),r||(r=this._hoverlayer=this.getLayer(s0));var a={};r.ctx.save();for(var i=0;i<e;){var n=t[i],o=n.__from;if(!(o&&o.__zr)){t.splice(i,1),o.__hoverMir=null,e--;continue}i++,o.invisible||(n.transform=o.transform,n.invTransform=o.invTransform,n.__clipPaths=o.__clipPaths,this._doPaintEl(n,r,!0,a))}r.ctx.restore()}},getHoverLayer:function(){return this.getLayer(s0)},_paintList:function(t,e,r){if(this._redrawId===r){e=e||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!a){var i=this;qf(function(){i._paintList(t,e,r)})}}},_compositeManually:function(){var t=this.getLayer(ui).ctx,e=this._domRoot.width,r=this._domRoot.height;t.clearRect(0,0,e,r),this.eachBuiltinLayer(function(a){a.virtual&&t.drawImage(a.dom,0,0,e,r)})},_doPaintList:function(t,e){for(var r=[],a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a],n=this._layers[i];n.__builtin__&&n!==this._hoverlayer&&(n.__dirty||e)&&r.push(n)}for(var o=!0,s=0;s<r.length;s++){var n=r[s],l=n.ctx,u={};l.save();var h=e?n.__startIndex:n.__drawIndex,f=!e&&n.incremental&&Date.now,c=f&&Date.now(),v=n.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(n.__startIndex===n.__endIndex)n.clear(!1,v);else if(h===n.__startIndex){var d=t[h];(!d.incremental||!d.notClear||e)&&n.clear(!1,v)}h===-1&&(console.error("For some unknown reason. drawIndex is -1"),h=n.__startIndex);for(var g=h;g<n.__endIndex;g++){var p=t[g];if(this._doPaintEl(p,n,e,u),p.__dirty=p.__dirtyText=!1,f){var m=Date.now()-c;if(m>15)break}}n.__drawIndex=g,n.__drawIndex<n.__endIndex&&(o=!1),u.prevElClipPaths&&l.restore(),l.restore()}return G.wxa&&M(this._layers,function(y){y&&y.ctx&&y.ctx.draw&&y.ctx.draw()}),o},_doPaintEl:function(t,e,r,a){var i=e.ctx,n=t.transform;if((e.__dirty||r)&&!t.invisible&&t.style.opacity!==0&&!(n&&!n[0]&&!n[3])&&!(t.culling&&KC(t,this._width,this._height))){var o=t.__clipPaths,s=a.prevElClipPaths;(!s||jC(o,s))&&(s&&(i.restore(),a.prevElClipPaths=null,a.prevEl=null),o&&(i.save(),QC(o,i),a.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(i),t.brush(i,a.prevEl||null),a.prevEl=t,t.afterBrush&&t.afterBrush(i)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=ui);var r=this._layers[t];return r||(r=new Co("zr_"+t,this,this.dpr),r.zlevel=t,r.__builtin__=!0,this._layerConfig[t]?ut(r,this._layerConfig[t],!0):this._layerConfig[t-Dl]&&ut(r,this._layerConfig[t-Dl],!0),e&&(r.virtual=e),this.insertLayer(t,r),r.initContext()),r},insertLayer:function(t,e){var r=this._layers,a=this._zlevelList,i=a.length,n=null,o=-1,s=this._domRoot;if(r[t]){Ta("ZLevel "+t+" has been used already");return}if(!qC(e)){Ta("Layer of zlevel "+t+" is not valid");return}if(i>0&&t>a[0]){for(o=0;o<i-1&&!(a[o]<t&&a[o+1]>t);o++);n=r[a[o]]}if(a.splice(o+1,0,t),r[t]=e,!e.virtual)if(n){var l=n.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var r=this._zlevelList,a,i;for(i=0;i<r.length;i++)a=r[i],t.call(e,this._layers[a],a)},eachBuiltinLayer:function(t,e){var r=this._zlevelList,a,i,n;for(n=0;n<r.length;n++)i=r[n],a=this._layers[i],a.__builtin__&&t.call(e,a,i)},eachOtherLayer:function(t,e){var r=this._zlevelList,a,i,n;for(n=0;n<r.length;n++)i=r[n],a=this._layers[i],a.__builtin__||t.call(e,a,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){this.eachBuiltinLayer(function(u,h){u.__dirty=u.__used=!1});function e(u){i&&(i.__endIndex!==u&&(i.__dirty=!0),i.__endIndex=u)}if(this._singleCanvas)for(var r=1;r<t.length;r++){var a=t[r];if(a.zlevel!==t[r-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}for(var i=null,n=0,o,r=0;r<t.length;r++){var a=t[r],s=a.zlevel,l;o!==s&&(o=s,n=0),a.incremental?(l=this.getLayer(s+XC,this._needsManuallyCompositing),l.incremental=!0,n=1):l=this.getLayer(s+(n>0?Dl:0),this._needsManuallyCompositing),l.__builtin__||Ta("ZLevel "+s+" has been used by unkown layer "+l.id),l!==i&&(l.__used=!0,l.__startIndex!==r&&(l.__dirty=!0),l.__startIndex=r,l.incremental?l.__drawIndex=-1:l.__drawIndex=r,e(r),i=l),a.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(u,h){!u.__used&&u.getElementCount()>0&&(u.__dirty=!0,u.__startIndex=u.__endIndex=u.__drawIndex=0),u.__dirty&&u.__drawIndex<0&&(u.__drawIndex=u.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var r=this._layerConfig;r[t]?ut(r[t],e,!0):r[t]=e;for(var a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a];if(i===t||i===t+Dl){var n=this._layers[i];ut(n,r[t],!0)}}}},delLayer:function(t){var e=this._layers,r=this._zlevelList,a=e[t];!a||(a.dom.parentNode.removeChild(a.dom),delete e[t],r.splice(yt(r,t),1))},resize:function(t,e){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var a=this._opts;if(t!=null&&(a.width=t),e!=null&&(a.height=e),t=this._getSize(0),e=this._getSize(1),r.style.display="",this._width!==t||e!==this._height){r.style.width=t+"px",r.style.height=e+"px";for(var i in this._layers)this._layers.hasOwnProperty(i)&&this._layers[i].resize(t,e);M(this._progressiveLayers,function(n){n.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(ui).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[ui].dom;var e=new Co("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var r=e.dom.width,a=e.dom.height,i=e.ctx;this.eachLayer(function(u){u.__builtin__?i.drawImage(u.dom,0,0,r,a):u.renderToCanvas&&(e.ctx.save(),u.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var n={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,e,!0,n)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,r=["width","height"][t],a=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],n=["paddingRight","paddingBottom"][t];if(e[r]!=null&&e[r]!=="auto")return parseFloat(e[r]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[a]||Ml(s[r])||Ml(o.style[r]))-(Ml(s[i])||0)-(Ml(s[n])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var r=document.createElement("canvas"),a=r.getContext("2d"),i=t.getBoundingRect(),n=t.style,o=n.shadowBlur*e,s=n.shadowOffsetX*e,l=n.shadowOffsetY*e,u=n.hasStroke()?n.lineWidth:0,h=Math.max(u/2,-s+o),f=Math.max(u/2,s+o),c=Math.max(u/2,-l+o),v=Math.max(u/2,l+o),d=i.width+h+f,g=i.height+c+v;r.width=d*e,r.height=g*e,a.scale(e,e),a.clearRect(0,0,d,g),a.dpr=e;var p={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-i.x,c-i.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(a);var m=ve,y=new m({style:{x:0,y:0,image:r}});return p.position!=null&&(y.position=t.position=p.position),p.rotation!=null&&(y.rotation=t.rotation=p.rotation),p.scale!=null&&(y.scale=t.scale=p.scale),y}};var Il=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,le.call(this)};Il.prototype={constructor:Il,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),r=0;r<e.length;r++)this.addClip(e[r])},removeClip:function(t){var e=yt(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),r=0;r<e.length;r++)this.removeClip(e[r]);t.animation=null},_update:function(){for(var t=new Date().getTime()-this._pausedTime,e=t-this._time,r=this._clips,a=r.length,i=[],n=[],o=0;o<a;o++){var s=r[o],l=s.step(t,e);l&&(i.push(l),n.push(s))}for(var o=0;o<a;)r[o]._needsRemove?(r[o]=r[a-1],r.pop(),a--):o++;a=i.length;for(var o=0;o<a;o++)n[o].fire(i[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0;function e(){t._running&&(qf(e),!t._paused&&t._update())}qf(e)},start:function(){this._time=new Date().getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=new Date().getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=new Date().getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var r=new Vf(t,e.loop,e.getter,e.setter);return this.addAnimator(r),r}},Dt(Il,le);var tD=300,mc=G.domSupported,yc=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=V(t,function(i){var n=i.replace("mouse","pointer");return r.hasOwnProperty(n)?n:i});return{mouse:t,touch:e,pointer:a}}(),l0={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function u0(t){return t==="mousewheel"&&G.browser.firefox?"DOMMouseScroll":t}function _c(t){var e=t.pointerType;return e==="pen"||e==="touch"}function eD(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function xc(t){t&&(t.zrByTouch=!0)}function rD(t,e){return Er(t.dom,new f0(t,e),!0)}function h0(t,e){for(var r=e,a=!1;r&&r.nodeType!==9&&!(a=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return a}function f0(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var wc=f0.prototype;wc.stopPropagation=wc.stopImmediatePropagation=wc.preventDefault=ce;var Sr={mousedown:function(t){t=Er(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Er(this.dom,t);var e=this._mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&Ac(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Er(this.dom,t),Ac(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Er(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=h0(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=Er(this.dom,t),xc(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Sr.mousemove.call(this,t),Sr.mousedown.call(this,t)},touchmove:function(t){t=Er(this.dom,t),xc(t),this.handler.processGesture(t,"change"),Sr.mousemove.call(this,t)},touchend:function(t){t=Er(this.dom,t),xc(t),this.handler.processGesture(t,"end"),Sr.mouseup.call(this,t),+new Date-this._lastTouchMoment<tD&&Sr.click.call(this,t)},pointerdown:function(t){Sr.mousedown.call(this,t)},pointermove:function(t){_c(t)||Sr.mousemove.call(this,t)},pointerup:function(t){Sr.mouseup.call(this,t)},pointerout:function(t){_c(t)||Sr.mouseout.call(this,t)}};M(["click","mousewheel","dblclick","contextmenu"],function(t){Sr[t]=function(e){e=Er(this.dom,e),this.trigger(t,e)}});var bc={pointermove:function(t){_c(t)||bc.mousemove.call(this,t)},pointerup:function(t){bc.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Ac(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function aD(t,e){var r=e.domHandlers;G.pointerEventsSupported?M(yc.pointer,function(a){Ll(e,a,function(i){r[a].call(t,i)})}):(G.touchEventsSupported&&M(yc.touch,function(a){Ll(e,a,function(i){r[a].call(t,i),eD(e)})}),M(yc.mouse,function(a){Ll(e,a,function(i){i=bf(i),e.touching||r[a].call(t,i)})}))}function iD(t,e){G.pointerEventsSupported?M(l0.pointer,r):G.touchEventsSupported||M(l0.mouse,r);function r(a){function i(n){n=bf(n),h0(t,n.target)||(n=rD(t,n),e.domHandlers[a].call(t,n))}Ll(e,a,i,{capture:!0})}}function Ll(t,e,r,a){t.mounted[e]=r,t.listenerOpts[e]=a,Sf(t.domTarget,u0(e),r,a)}function Sc(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&sC(t.domTarget,u0(r),e[r],t.listenerOpts[r]);t.mounted={}}function Ac(t,e){if(t._mayPointerCapture=null,mc&&t._pointerCapturing^e){t._pointerCapturing=e;var r=t._globalHandlerScope;e?iD(t,r):Sc(r)}}function c0(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function Tc(t,e){le.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new c0(t,Sr),mc&&(this._globalHandlerScope=new c0(document,bc)),this._pointerCapturing=!1,this._mayPointerCapture=null,aD(this,this._localHandlerScope)}var v0=Tc.prototype;v0.dispose=function(){Sc(this._localHandlerScope),mc&&Sc(this._globalHandlerScope)},v0.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},Dt(Tc,le);/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
@@ -11,10 +11,10 @@
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/var iD=!G.canvasSupported,Pl={canvas:gc},hi={},Tc="4.3.1";function Cc(t,e){var r=new Mc(k(),t,e);return hi[r.id]=r,r}function nD(t){if(t)t.dispose();else{for(var e in hi)hi.hasOwnProperty(e)&&hi[e].dispose();hi={}}return this}function oD(t){return hi[t]}function Dc(t,e){Pl[t]=e}function sD(t){delete hi[t]}var Mc=function(t,e,r){r=r||{},this.dom=e,this.id=t;var a=this,i=new Hf,n=r.renderer;if(iD){if(!Pl.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");n="vml"}else(!n||!Pl[n])&&(n="canvas");var o=new Pl[n](e,i,r,t);this.storage=i,this.painter=o;var s=!G.node&&!G.worker?new Ac(o.getViewportRoot(),o.root):null;this.handler=new hn(i,o,s,o.root),this.animation=new Il({stage:{update:it(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=i.delFromStorage,u=i.addToStorage;i.delFromStorage=function(h){l.call(i,h),h&&h.removeSelfFromZr(a)},i.addToStorage=function(h){u.call(i,h),h.addSelfToZr(a)}};Mc.prototype={constructor:Mc,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var r=this.painter.addHover(t,e);return this.refreshHover(),r}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,r){this.handler.on(t,e,r)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,sD(this.id)}};var lD=(Object.freeze||Object)({version:Tc,init:Cc,dispose:nD,getInstance:oD,registerPainter:Dc}),mn=M,yn=lt,uD=z,v0="series\0";function me(t){return t instanceof Array?t:t==null?[]:[t]}function fi(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var a=0,i=r.length;a<i;a++){var n=r[a];!t.emphasis[e].hasOwnProperty(n)&&t[e].hasOwnProperty(n)&&(t.emphasis[e][n]=t[e][n])}}}var d0=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Io(t){return yn(t)&&!uD(t)&&!(t instanceof Date)?t.value:t}function hD(t){return yn(t)&&!(t instanceof Array)}function Ic(t,e){e=(e||[]).slice();var r=V(t||[],function(a,i){return{exist:a}});return mn(e,function(a,i){if(!!yn(a)){for(var n=0;n<r.length;n++)if(!r[n].option&&a.id!=null&&r[n].exist.id===a.id+""){r[n].option=a,e[i]=null;return}for(var n=0;n<r.length;n++){var o=r[n].exist;if(!r[n].option&&(o.id==null||a.id==null)&&a.name!=null&&!El(a)&&!El(o)&&o.name===a.name+""){r[n].option=a,e[i]=null;return}}}}),mn(e,function(a,i){if(!!yn(a)){for(var n=0;n<r.length;n++){var o=r[n].exist;if(!r[n].option&&!El(o)&&a.id==null){r[n].option=a;break}}n>=r.length&&r.push({option:a})}}),r}function g0(t){var e=ht();mn(t,function(r,a){var i=r.exist;i&&e.set(i.id,r)}),mn(t,function(r,a){var i=r.option;gt(!i||i.id==null||!e.get(i.id)||e.get(i.id)===r,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&e.set(i.id,r),!r.keyInfo&&(r.keyInfo={})}),mn(t,function(r,a){var i=r.exist,n=r.option,o=r.keyInfo;if(!!yn(n)){if(o.name=n.name!=null?n.name+"":i?i.name:v0+a,i)o.id=i.id;else if(n.id!=null)o.id=n.id+"";else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,r)}})}function Lc(t){var e=t.name;return!!(e&&e.indexOf(v0))}function El(t){return yn(t)&&t.id&&(t.id+"").indexOf("\0_ec_\0")===0}function fD(t,e){var r={},a={};return i(t||[],r),i(e||[],a,r),[n(r),n(a)];function i(o,s,l){for(var u=0,h=o.length;u<h;u++)for(var f=o[u].seriesId,c=me(o[u].dataIndex),v=l&&l[f],d=0,g=c.length;d<g;d++){var p=c[d];v&&v[p]?v[p]=null:(s[f]||(s[f]={}))[p]=1}}function n(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var h=n(o[u],!0);h.length&&l.push({seriesId:u,dataIndex:h})}return l}}function Rl(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return z(e.dataIndex)?V(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return z(e.name)?V(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function Pe(){var t="__\0ec_inner_"+cD+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}var cD=0;function Ol(t,e,r){if(Lt(e)){var a={};a[e+"Index"]=0,e=a}var i=r&&r.defaultMainType;i&&!Pc(e,i+"Index")&&!Pc(e,i+"Id")&&!Pc(e,i+"Name")&&(e[i+"Index"]=0);var n={};return mn(e,function(l,s){var l=e[s];if(s==="dataIndex"||s==="dataIndexInside"){n[s]=l;return}var u=s.match(/^(\w+)(Index|Id|Name)$/)||[],h=u[1],f=(u[2]||"").toLowerCase();if(!(!h||!f||l==null||f==="index"&&l==="none"||r&&r.includeMainTypes&&yt(r.includeMainTypes,h)<0)){var c={mainType:h};(f!=="index"||l!=="all")&&(c[f]=l);var v=t.queryComponents(c);n[h+"Models"]=v,n[h+"Model"]=v[0]}}),n}function Pc(t,e){return t&&t.hasOwnProperty(e)}function p0(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function vD(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function m0(t){return t==="auto"?G.domSupported?"html":"richText":t||"html"}function Ec(t,e){var r=ht(),a=[];return M(t,function(i){var n=e(i);(r.get(n)||(a.push(n),r.set(n,[]))).push(i)}),{keys:a,buckets:r}}var dD=".",ci="___EC__COMPONENT__CONTAINER___";function Ma(t){var e={main:"",sub:""};return t&&(t=t.split(dD),e.main=t[0]||"",e.sub=t[1]||""),e}function gD(t){gt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Lo(t,e){t.$constructor=t,t.extend=function(r){T&&M(e,function(n){r[n]||console.warn("Method `"+n+"` should be implemented"+(r.type?" in "+r.type:"")+".")});var a=this,i=function(){r.$constructor?r.$constructor.apply(this,arguments):a.apply(this,arguments)};return et(i.prototype,r),i.extend=this.extend,i.superCall=mD,i.superApply=yD,It(i,this),i.superClass=a,i}}var pD=0;function Nl(t){var e=["__\0is_clz",pD++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,T&&gt(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(r){return!!(r&&r[e])}}function mD(t,e){var r=on(arguments,2);return this.superClass.prototype[e].apply(t,r)}function yD(t,e,r){return this.superClass.prototype[e].apply(t,r)}function kl(t,e){e=e||{};var r={};t.registerClass=function(n,o){if(o){if(gD(o),o=Ma(o),!o.sub)T&&r[o.main]&&console.warn(o.main+" exists."),r[o.main]=n;else if(o.sub!==ci){var s=a(o);s[o.sub]=n}}return n},t.getClass=function(n,o,s){var l=r[n];if(l&&l[ci]&&(l=o?l[o]:null),s&&!l)throw new Error(o?"Component "+n+"."+(o||"")+" not exists. Load it first.":n+".type should be specified.");return l},t.getClassesByMainType=function(n){n=Ma(n);var o=[],s=r[n.main];return s&&s[ci]?M(s,function(l,u){u!==ci&&o.push(l)}):o.push(s),o},t.hasClass=function(n){return n=Ma(n),!!r[n.main]},t.getAllClassMainTypes=function(){var n=[];return M(r,function(o,s){n.push(s)}),n},t.hasSubTypes=function(n){n=Ma(n);var o=r[n.main];return o&&o[ci]},t.parseClassType=Ma;function a(n){var o=r[n.main];return(!o||!o[ci])&&(o=r[n.main]={},o[ci]=!0),o}if(e.registerWhenExtend){var i=t.extend;i&&(t.extend=function(n){var o=i.call(this,n);return t.registerClass(o,n.type)})}return t}var _n=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(r,a,i){for(var n={},o=0;o<t.length;o++){var s=t[o][1];if(!(a&&yt(a,s)>=0||i&&yt(i,s)<0)){var l=r.getShallow(s);l!=null&&(n[t[o][0]]=l)}}return n}},_D=_n([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),xD={getLineStyle:function(t){var e=_D(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){t==null&&(t=1);var e=this.get("type"),r=Math.max(t,2),a=t*4;return e==="solid"||e==null?!1:e==="dashed"?[a,a]:[r,r]}},wD=_n([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),bD={getAreaStyle:function(t,e){return wD(this,t,e)}},zl=Math.pow,Ia=Math.sqrt,Bl=1e-8,y0=1e-4,_0=Ia(3),Vl=1/3,Or=wa(),rr=wa(),xn=wa();function La(t){return t>-Bl&&t<Bl}function x0(t){return t>Bl||t<-Bl}function De(t,e,r,a,i){var n=1-i;return n*n*(n*t+3*i*e)+i*i*(i*a+3*n*r)}function w0(t,e,r,a,i){var n=1-i;return 3*(((e-t)*n+2*(r-e)*i)*n+(a-r)*i*i)}function SD(t,e,r,a,i,n){var o=a+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,h=s*s-3*o*l,f=s*l-9*o*u,c=l*l-3*s*u,v=0;if(La(h)&&La(f))if(La(s))n[0]=0;else{var d=-l/s;d>=0&&d<=1&&(n[v++]=d)}else{var g=f*f-4*h*c;if(La(g)){var p=f/h,d=-s/o+p,m=-p/2;d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m)}else if(g>0){var y=Ia(g),_=h*s+1.5*o*(-f+y),w=h*s+1.5*o*(-f-y);_<0?_=-zl(-_,Vl):_=zl(_,Vl),w<0?w=-zl(-w,Vl):w=zl(w,Vl);var d=(-s-(_+w))/(3*o);d>=0&&d<=1&&(n[v++]=d)}else{var b=(2*h*s-3*o*f)/(2*Ia(h*h*h)),A=Math.acos(b)/3,S=Ia(h),D=Math.cos(A),d=(-s-2*S*D)/(3*o),m=(-s+S*(D+_0*Math.sin(A)))/(3*o),I=(-s+S*(D-_0*Math.sin(A)))/(3*o);d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m),I>=0&&I<=1&&(n[v++]=I)}}return v}function b0(t,e,r,a,i){var n=6*r-12*e+6*t,o=9*e+3*a-3*t-9*r,s=3*e-3*t,l=0;if(La(o)){if(x0(n)){var u=-s/n;u>=0&&u<=1&&(i[l++]=u)}}else{var h=n*n-4*o*s;if(La(h))i[0]=-n/(2*o);else if(h>0){var f=Ia(h),u=(-n+f)/(2*o),c=(-n-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function S0(t,e,r,a,i,n){var o=(e-t)*i+t,s=(r-e)*i+e,l=(a-r)*i+r,u=(s-o)*i+o,h=(l-s)*i+s,f=(h-u)*i+u;n[0]=t,n[1]=o,n[2]=u,n[3]=f,n[4]=f,n[5]=h,n[6]=l,n[7]=a}function AD(t,e,r,a,i,n,o,s,l,u,h){var f,c=.005,v=1/0,d,g,p,m;Or[0]=l,Or[1]=u;for(var y=0;y<1;y+=.05)rr[0]=De(t,r,i,o,y),rr[1]=De(e,a,n,s,y),p=ba(Or,rr),p<v&&(f=y,v=p);v=1/0;for(var _=0;_<32&&!(c<y0);_++)d=f-c,g=f+c,rr[0]=De(t,r,i,o,d),rr[1]=De(e,a,n,s,d),p=ba(rr,Or),d>=0&&p<v?(f=d,v=p):(xn[0]=De(t,r,i,o,g),xn[1]=De(e,a,n,s,g),m=ba(xn,Or),g<=1&&m<v?(f=g,v=m):c*=.5);return h&&(h[0]=De(t,r,i,o,f),h[1]=De(e,a,n,s,f)),Ia(v)}function be(t,e,r,a){var i=1-a;return i*(i*t+2*a*e)+a*a*r}function Rc(t,e,r,a){return 2*((1-a)*(e-t)+a*(r-e))}function TD(t,e,r,a,i){var n=t-2*e+r,o=2*(e-t),s=t-a,l=0;if(La(n)){if(x0(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var h=o*o-4*n*s;if(La(h)){var u=-o/(2*n);u>=0&&u<=1&&(i[l++]=u)}else if(h>0){var f=Ia(h),u=(-o+f)/(2*n),c=(-o-f)/(2*n);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function A0(t,e,r){var a=t+r-2*e;return a===0?.5:(t-e)/a}function Oc(t,e,r,a,i){var n=(e-t)*a+t,o=(r-e)*a+e,s=(o-n)*a+n;i[0]=t,i[1]=n,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function CD(t,e,r,a,i,n,o,s,l){var u,h=.005,f=1/0;Or[0]=o,Or[1]=s;for(var c=0;c<1;c+=.05){rr[0]=be(t,r,i,c),rr[1]=be(e,a,n,c);var v=ba(Or,rr);v<f&&(u=c,f=v)}f=1/0;for(var d=0;d<32&&!(h<y0);d++){var g=u-h,p=u+h;rr[0]=be(t,r,i,g),rr[1]=be(e,a,n,g);var v=ba(rr,Or);if(g>=0&&v<f)u=g,f=v;else{xn[0]=be(t,r,i,p),xn[1]=be(e,a,n,p);var m=ba(xn,Or);p<=1&&m<f?(u=p,f=m):h*=.5}}return l&&(l[0]=be(t,r,i,u),l[1]=be(e,a,n,u)),Ia(f)}var Ee=Math.min,Re=Math.max,Nc=Math.sin,kc=Math.cos,vi=Math.PI*2,Gl=wa(),Hl=wa(),Fl=wa();function Po(t,e,r){if(t.length!==0){var a=t[0],i=a[0],n=a[0],o=a[1],s=a[1],l;for(l=1;l<t.length;l++)a=t[l],i=Ee(i,a[0]),n=Re(n,a[0]),o=Ee(o,a[1]),s=Re(s,a[1]);e[0]=i,e[1]=o,r[0]=n,r[1]=s}}function T0(t,e,r,a,i,n){i[0]=Ee(t,r),i[1]=Ee(e,a),n[0]=Re(t,r),n[1]=Re(e,a)}var C0=[],D0=[];function DD(t,e,r,a,i,n,o,s,l,u){var h=b0,f=De,c,v=h(t,r,i,o,C0);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,c=0;c<v;c++){var d=f(t,r,i,o,C0[c]);l[0]=Ee(d,l[0]),u[0]=Re(d,u[0])}for(v=h(e,a,n,s,D0),c=0;c<v;c++){var g=f(e,a,n,s,D0[c]);l[1]=Ee(g,l[1]),u[1]=Re(g,u[1])}l[0]=Ee(t,l[0]),u[0]=Re(t,u[0]),l[0]=Ee(o,l[0]),u[0]=Re(o,u[0]),l[1]=Ee(e,l[1]),u[1]=Re(e,u[1]),l[1]=Ee(s,l[1]),u[1]=Re(s,u[1])}function MD(t,e,r,a,i,n,o,s){var l=A0,u=be,h=Re(Ee(l(t,r,i),1),0),f=Re(Ee(l(e,a,n),1),0),c=u(t,r,i,h),v=u(e,a,n,f);o[0]=Ee(t,i,c),o[1]=Ee(e,n,v),s[0]=Re(t,i,c),s[1]=Re(e,n,v)}function ID(t,e,r,a,i,n,o,s,l){var u=ea,h=ra,f=Math.abs(i-n);if(f%vi<1e-4&&f>1e-4){s[0]=t-r,s[1]=e-a,l[0]=t+r,l[1]=e+a;return}if(Gl[0]=kc(i)*r+t,Gl[1]=Nc(i)*a+e,Hl[0]=kc(n)*r+t,Hl[1]=Nc(n)*a+e,u(s,Gl,Hl),h(l,Gl,Hl),i=i%vi,i<0&&(i=i+vi),n=n%vi,n<0&&(n=n+vi),i>n&&!o?n+=vi:i<n&&o&&(i+=vi),o){var c=n;n=i,i=c}for(var v=0;v<n;v+=Math.PI/2)v>i&&(Fl[0]=kc(v)*r+t,Fl[1]=Nc(v)*a+e,u(s,Fl,s),h(l,Fl,l))}var Zt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Nr=[],Pa=[],kr=[],zr=[],M0=Math.min,I0=Math.max,Eo=Math.cos,Ro=Math.sin,Wl=Math.sqrt,wn=Math.abs,zc=typeof Float32Array<"u",Oe=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Oe.prototype={constructor:Oe,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,r){r=r||0,this._ux=wn(r/pl/t)||0,this._uy=wn(r/pl/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Zt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var r=wn(t-this._xi)>this._ux||wn(e-this._yi)>this._uy||this._len<5;return this.addData(Zt.L,t,e),this._ctx&&r&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,r,a,i,n){return this.addData(Zt.C,t,e,r,a,i,n),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,r,a,i,n):this._ctx.bezierCurveTo(t,e,r,a,i,n)),this._xi=i,this._yi=n,this},quadraticCurveTo:function(t,e,r,a){return this.addData(Zt.Q,t,e,r,a),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,r,a):this._ctx.quadraticCurveTo(t,e,r,a)),this._xi=r,this._yi=a,this},arc:function(t,e,r,a,i,n){return this.addData(Zt.A,t,e,r,r,a,i-a,0,n?0:1),this._ctx&&this._ctx.arc(t,e,r,a,i,n),this._xi=Eo(i)*r+t,this._yi=Ro(i)*r+e,this},arcTo:function(t,e,r,a,i){return this._ctx&&this._ctx.arcTo(t,e,r,a,i),this},rect:function(t,e,r,a){return this._ctx&&this._ctx.rect(t,e,r,a),this.addData(Zt.R,t,e,r,a),this},closePath:function(){this.addData(Zt.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,r),t.closePath()),this._xi=e,this._yi=r,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,r=0;r<t.length;r++)e+=t[r];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;!(this.data&&this.data.length===e)&&zc&&(this.data=new Float32Array(e));for(var r=0;r<e;r++)this.data[r]=t[r];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,r=0,a=this._len,i=0;i<e;i++)r+=t[i].len();zc&&this.data instanceof Float32Array&&(this.data=new Float32Array(a+r));for(var i=0;i<e;i++)for(var n=t[i].data,o=0;o<n.length;o++)this.data[a++]=n[o];this._len=a},addData:function(t){if(!!this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var r=0;r<arguments.length;r++)e[this._len++]=arguments[r];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var r=this._dashSum,a=this._dashOffset,i=this._lineDash,n=this._ctx,o=this._xi,s=this._yi,l=t-o,u=e-s,h=Wl(l*l+u*u),f=o,c=s,v,d=i.length,g;for(l/=h,u/=h,a<0&&(a=r+a),a%=r,f-=a*l,c-=a*u;l>0&&f<=t||l<0&&f>=t||l===0&&(u>0&&c<=e||u<0&&c>=e);)g=this._dashIdx,v=i[g],f+=l*v,c+=u*v,this._dashIdx=(g+1)%d,!(l>0&&f<o||l<0&&f>o||u>0&&c<s||u<0&&c>s)&&n[g%2?"moveTo":"lineTo"](l>=0?M0(f,t):I0(f,t),u>=0?M0(c,e):I0(c,e));l=f-t,u=c-e,this._dashOffset=-Wl(l*l+u*u)},_dashedBezierTo:function(t,e,r,a,i,n){var o=this._dashSum,s=this._dashOffset,l=this._lineDash,u=this._ctx,h=this._xi,f=this._yi,c,v,d,g=De,p=0,m=this._dashIdx,y=l.length,_,w,b=0;for(s<0&&(s=o+s),s%=o,c=0;c<1;c+=.1)v=g(h,t,r,i,c+.1)-g(h,t,r,i,c),d=g(f,e,a,n,c+.1)-g(f,e,a,n,c),p+=Wl(v*v+d*d);for(;m<y&&(b+=l[m],!(b>s));m++);for(c=(b-s)/p;c<=1;)_=g(h,t,r,i,c),w=g(f,e,a,n,c),m%2?u.moveTo(_,w):u.lineTo(_,w),c+=l[m]/p,m=(m+1)%y;m%2!==0&&u.lineTo(i,n),v=i-_,d=n-w,this._dashOffset=-Wl(v*v+d*d)},_dashedQuadraticTo:function(t,e,r,a){var i=r,n=a;r=(r+2*t)/3,a=(a+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,r,a,i,n)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,zc&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Nr[0]=Nr[1]=kr[0]=kr[1]=Number.MAX_VALUE,Pa[0]=Pa[1]=zr[0]=zr[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,r=0,a=0,i=0,n=0;n<t.length;){var o=t[n++];switch(n===1&&(e=t[n],r=t[n+1],a=e,i=r),o){case Zt.M:a=t[n++],i=t[n++],e=a,r=i,kr[0]=a,kr[1]=i,zr[0]=a,zr[1]=i;break;case Zt.L:T0(e,r,t[n],t[n+1],kr,zr),e=t[n++],r=t[n++];break;case Zt.C:DD(e,r,t[n++],t[n++],t[n++],t[n++],t[n],t[n+1],kr,zr),e=t[n++],r=t[n++];break;case Zt.Q:MD(e,r,t[n++],t[n++],t[n],t[n+1],kr,zr),e=t[n++],r=t[n++];break;case Zt.A:var s=t[n++],l=t[n++],u=t[n++],h=t[n++],f=t[n++],c=t[n++]+f;n+=1;var v=1-t[n++];n===1&&(a=Eo(f)*u+s,i=Ro(f)*h+l),ID(s,l,u,h,f,c,v,kr,zr),e=Eo(c)*u+s,r=Ro(c)*h+l;break;case Zt.R:a=e=t[n++],i=r=t[n++];var d=t[n++],g=t[n++];T0(a,i,a+d,i+g,kr,zr);break;case Zt.Z:e=a,r=i;break}ea(Nr,Nr,kr),ra(Pa,Pa,zr)}return n===0&&(Nr[0]=Nr[1]=Pa[0]=Pa[1]=0),new vt(Nr[0],Nr[1],Pa[0]-Nr[0],Pa[1]-Nr[1])},rebuildPath:function(t){for(var e=this.data,r,a,i,n,o,s,l=this._ux,u=this._uy,h=this._len,f=0;f<h;){var c=e[f++];switch(f===1&&(i=e[f],n=e[f+1],r=i,a=n),c){case Zt.M:r=i=e[f++],a=n=e[f++],t.moveTo(i,n);break;case Zt.L:o=e[f++],s=e[f++],(wn(o-i)>l||wn(s-n)>u||f===h-1)&&(t.lineTo(o,s),i=o,n=s);break;case Zt.C:t.bezierCurveTo(e[f++],e[f++],e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case Zt.Q:t.quadraticCurveTo(e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case Zt.A:var v=e[f++],d=e[f++],g=e[f++],p=e[f++],m=e[f++],y=e[f++],_=e[f++],w=e[f++],b=g>p?g:p,A=g>p?1:g/p,S=g>p?p/g:1,D=Math.abs(g-p)>.001,I=m+y;D?(t.translate(v,d),t.rotate(_),t.scale(A,S),t.arc(0,0,b,m,I,1-w),t.scale(1/A,1/S),t.rotate(-_),t.translate(-v,-d)):t.arc(v,d,b,m,I,1-w),f===1&&(r=Eo(m)*g+v,a=Ro(m)*p+d),i=Eo(I)*g+v,n=Ro(I)*p+d;break;case Zt.R:r=i=e[f],a=n=e[f+1],t.rect(e[f++],e[f++],e[f++],e[f++]);break;case Zt.Z:t.closePath(),i=r,n=a}}}},Oe.CMD=Zt;function Ea(t,e,r,a,i,n,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>a+s||o<e-s&&o<a-s||n>t+s&&n>r+s||n<t-s&&n<r-s)return!1;if(t!==r)l=(e-a)/(t-r),u=(t*a-r*e)/(t-r);else return Math.abs(n-t)<=s/2;var h=l*n-o+u,f=h*h/(l*l+1);return f<=s/2*s/2}function LD(t,e,r,a,i,n,o,s,l,u,h){if(l===0)return!1;var f=l;if(h>e+f&&h>a+f&&h>n+f&&h>s+f||h<e-f&&h<a-f&&h<n-f&&h<s-f||u>t+f&&u>r+f&&u>i+f&&u>o+f||u<t-f&&u<r-f&&u<i-f&&u<o-f)return!1;var c=AD(t,e,r,a,i,n,o,s,u,h,null);return c<=f/2}function L0(t,e,r,a,i,n,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>a+u&&l>n+u||l<e-u&&l<a-u&&l<n-u||s>t+u&&s>r+u&&s>i+u||s<t-u&&s<r-u&&s<i-u)return!1;var h=CD(t,e,r,a,i,n,s,l,null);return h<=u/2}var P0=Math.PI*2;function Ra(t){return t%=P0,t<0&&(t+=P0),t}var Oo=Math.PI*2;function PD(t,e,r,a,i,n,o,s,l){if(o===0)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>r||h+u<r)return!1;if(Math.abs(a-i)%Oo<1e-4)return!0;if(n){var f=a;a=Ra(i),i=Ra(f)}else a=Ra(a),i=Ra(i);a>i&&(i+=Oo);var c=Math.atan2(l,s);return c<0&&(c+=Oo),c>=a&&c<=i||c+Oo>=a&&c+Oo<=i}function oa(t,e,r,a,i,n){if(n>e&&n>a||n<e&&n<a||a===e)return 0;var o=a<e?1:-1,s=(n-e)/(a-e);(s===1||s===0)&&(o=a<e?.5:-.5);var l=s*(r-t)+t;return l===i?1/0:l>i?o:0}var Oa=Oe.CMD,bn=Math.PI*2,ED=1e-4;function RD(t,e){return Math.abs(t-e)<ED}var Me=[-1,-1,-1],ar=[-1,-1];function OD(){var t=ar[0];ar[0]=ar[1],ar[1]=t}function ND(t,e,r,a,i,n,o,s,l,u){if(u>e&&u>a&&u>n&&u>s||u<e&&u<a&&u<n&&u<s)return 0;var h=SD(e,a,n,s,u,Me);if(h===0)return 0;for(var f=0,c=-1,v,d,g=0;g<h;g++){var p=Me[g],m=p===0||p===1?.5:1,y=De(t,r,i,o,p);y<l||(c<0&&(c=b0(e,a,n,s,ar),ar[1]<ar[0]&&c>1&&OD(),v=De(e,a,n,s,ar[0]),c>1&&(d=De(e,a,n,s,ar[1]))),c===2?p<ar[0]?f+=v<e?m:-m:p<ar[1]?f+=d<v?m:-m:f+=s<d?m:-m:p<ar[0]?f+=v<e?m:-m:f+=s<v?m:-m)}return f}function kD(t,e,r,a,i,n,o,s){if(s>e&&s>a&&s>n||s<e&&s<a&&s<n)return 0;var l=TD(e,a,n,s,Me);if(l===0)return 0;var u=A0(e,a,n);if(u>=0&&u<=1){for(var h=0,f=be(e,a,n,u),c=0;c<l;c++){var v=Me[c]===0||Me[c]===1?.5:1,d=be(t,r,i,Me[c]);d<o||(Me[c]<u?h+=f<e?v:-v:h+=n<f?v:-v)}return h}else{var v=Me[0]===0||Me[0]===1?.5:1,d=be(t,r,i,Me[0]);return d<o?0:n<e?v:-v}}function zD(t,e,r,a,i,n,o,s){if(s-=e,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Me[0]=-l,Me[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u%bn<1e-4){a=0,i=bn;var h=n?1:-1;return o>=Me[0]+t&&o<=Me[1]+t?h:0}if(n){var l=a;a=Ra(i),i=Ra(l)}else a=Ra(a),i=Ra(i);a>i&&(i+=bn);for(var f=0,c=0;c<2;c++){var v=Me[c];if(v+t>o){var d=Math.atan2(s,v),h=n?1:-1;d<0&&(d=bn+d),(d>=a&&d<=i||d+bn>=a&&d+bn<=i)&&(d>Math.PI/2&&d<Math.PI*1.5&&(h=-h),f+=h)}}return f}function E0(t,e,r,a,i){for(var n=0,o=0,s=0,l=0,u=0,h=0;h<t.length;){var f=t[h++];switch(f===Oa.M&&h>1&&(r||(n+=oa(o,s,l,u,a,i))),h===1&&(o=t[h],s=t[h+1],l=o,u=s),f){case Oa.M:l=t[h++],u=t[h++],o=l,s=u;break;case Oa.L:if(r){if(Ea(o,s,t[h],t[h+1],e,a,i))return!0}else n+=oa(o,s,t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.C:if(r){if(LD(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=ND(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.Q:if(r){if(L0(o,s,t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=kD(o,s,t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.A:var c=t[h++],v=t[h++],d=t[h++],g=t[h++],p=t[h++],m=t[h++];h+=1;var y=1-t[h++],A=Math.cos(p)*d+c,S=Math.sin(p)*g+v;h>1?n+=oa(o,s,A,S,a,i):(l=A,u=S);var _=(a-c)*g/d+c;if(r){if(PD(c,v,g,p,p+m,y,e,_,i))return!0}else n+=zD(c,v,g,p,p+m,y,_,i);o=Math.cos(p+m)*d+c,s=Math.sin(p+m)*g+v;break;case Oa.R:l=o=t[h++],u=s=t[h++];var w=t[h++],b=t[h++],A=l+w,S=u+b;if(r){if(Ea(l,u,A,u,e,a,i)||Ea(A,u,A,S,e,a,i)||Ea(A,S,l,S,e,a,i)||Ea(l,S,l,u,e,a,i))return!0}else n+=oa(A,u,A,S,a,i),n+=oa(l,S,l,u,a,i);break;case Oa.Z:if(r){if(Ea(o,s,l,u,e,a,i))return!0}else n+=oa(o,s,l,u,a,i);o=l,s=u;break}}return!r&&!RD(s,u)&&(n+=oa(o,s,l,u,a,i)||0),n!==0}function BD(t,e,r){return E0(t,0,!1,e,r)}function VD(t,e,r,a){return E0(t,e,!0,r,a)}var R0=Yf.prototype.getCanvasPattern,Bc=Math.abs,GD=new Oe(!0);function pt(t){Le.call(this,t),this.path=null}pt.prototype={constructor:pt,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var r=this.style,a=this.path||GD,i=r.hasStroke(),n=r.hasFill(),o=r.fill,s=r.stroke,l=n&&!!o.colorStops,u=i&&!!s.colorStops,h=n&&!!o.image,f=i&&!!s.image;if(r.bind(t,this,e),this.setTransform(t),this.__dirty){var c;l&&(c=c||this.getBoundingRect(),this._fillGradient=r.getGradient(t,o,c)),u&&(c=c||this.getBoundingRect(),this._strokeGradient=r.getGradient(t,s,c))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=R0.call(o,t)),u?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=R0.call(s,t));var v=r.lineDash,d=r.lineDashOffset,g=!!t.setLineDash,p=this.getGlobalScale();if(a.setScale(p[0],p[1],this.segmentIgnoreThreshold),this.__dirtyPath||v&&!g&&i?(a.beginPath(t),v&&!g&&(a.setLineDash(v),a.setLineDashOffset(d)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),n)if(r.fillOpacity!=null){var m=t.globalAlpha;t.globalAlpha=r.fillOpacity*r.opacity,a.fill(t),t.globalAlpha=m}else a.fill(t);if(v&&g&&(t.setLineDash(v),t.lineDashOffset=d),i)if(r.strokeOpacity!=null){var m=t.globalAlpha;t.globalAlpha=r.strokeOpacity*r.opacity,a.stroke(t),t.globalAlpha=m}else a.stroke(t);v&&g&&t.setLineDash([]),r.text!=null&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,r){},createPathProxy:function(){this.path=new Oe},getBoundingRect:function(){var t=this._rect,e=this.style,r=!t;if(r){var a=this.path;a||(a=this.path=new Oe),this.__dirtyPath&&(a.beginPath(),this.buildPath(a,this.shape,!1)),t=a.getBoundingRect()}if(this._rect=t,e.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||r){i.copy(t);var n=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(n=Math.max(n,this.strokeContainThreshold||4)),o>1e-10&&(i.width+=n/o,i.height+=n/o,i.x-=n/o/2,i.y-=n/o/2)}return i}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect(),i=this.style;if(t=r[0],e=r[1],a.contain(t,e)){var n=this.path.data;if(i.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(i.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),VD(n,o/s,t,e)))return!0}if(i.hasFill())return BD(n,t,e)}return!1},dirty:function(t){t==null&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){t==="shape"?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Le.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(lt(t))for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a]);else r[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Bc(t[0]-1)>1e-10&&Bc(t[3]-1)>1e-10?Math.sqrt(Bc(t[0]*t[3]-t[2]*t[1])):1}},pt.extend=function(t){var e=function(a){pt.call(this,a),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,a)};It(e,pt);for(var r in t)r!=="style"&&r!=="shape"&&(e.prototype[r]=t[r]);return e},It(pt,Le);var Sn=Oe.CMD,HD=[[],[],[]],O0=Math.sqrt,FD=Math.atan2,WD=function(t,e){var r=t.data,a,i,n,o,s,l,u=Sn.M,h=Sn.C,f=Sn.L,c=Sn.R,v=Sn.A,d=Sn.Q;for(n=0,o=0;n<r.length;){switch(a=r[n++],o=n,i=0,a){case u:i=1;break;case f:i=1;break;case h:i=3;break;case d:i=2;break;case v:var g=e[4],p=e[5],m=O0(e[0]*e[0]+e[1]*e[1]),y=O0(e[2]*e[2]+e[3]*e[3]),_=FD(-e[1]/y,e[0]/m);r[n]*=m,r[n++]+=g,r[n]*=y,r[n++]+=p,r[n++]*=m,r[n++]*=y,r[n++]+=_,r[n++]+=_,n+=2,o=n;break;case c:l[0]=r[n++],l[1]=r[n++],Pt(l,l,e),r[o++]=l[0],r[o++]=l[1],l[0]+=r[n++],l[1]+=r[n++],Pt(l,l,e),r[o++]=l[0],r[o++]=l[1]}for(s=0;s<i;s++){var l=HD[s];l[0]=r[n++],l[1]=r[n++],Pt(l,l,e),r[o++]=l[0],r[o++]=l[1]}}},Vc=Math.sqrt,Ul=Math.sin,$l=Math.cos,Zl=Math.PI,N0=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Gc=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(N0(t)*N0(e))},k0=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Gc(t,e))};function z0(t,e,r,a,i,n,o,s,l,u,h){var f=l*(Zl/180),c=$l(f)*(t-r)/2+Ul(f)*(e-a)/2,v=-1*Ul(f)*(t-r)/2+$l(f)*(e-a)/2,d=c*c/(o*o)+v*v/(s*s);d>1&&(o*=Vc(d),s*=Vc(d));var g=(i===n?-1:1)*Vc((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,p=g*o*v/s,m=g*-s*c/o,y=(t+r)/2+$l(f)*p-Ul(f)*m,_=(e+a)/2+Ul(f)*p+$l(f)*m,w=k0([1,0],[(c-p)/o,(v-m)/s]),b=[(c-p)/o,(v-m)/s],A=[(-1*c-p)/o,(-1*v-m)/s],S=k0(b,A);Gc(b,A)<=-1&&(S=Zl),Gc(b,A)>=1&&(S=0),n===0&&S>0&&(S=S-2*Zl),n===1&&S<0&&(S=S+2*Zl),h.addData(u,y,_,o,s,w,S,f,n)}var UD=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,$D=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ZD(t){if(!t)return new Oe;for(var e=0,r=0,a=e,i=r,n,o=new Oe,s=Oe.CMD,l=t.match(UD),u=0;u<l.length;u++){for(var h=l[u],f=h.charAt(0),c,v=h.match($D)||[],d=v.length,g=0;g<d;g++)v[g]=parseFloat(v[g]);for(var p=0;p<d;){var m,y,_,w,b,A,S,D=e,I=r;switch(f){case"l":e+=v[p++],r+=v[p++],c=s.L,o.addData(c,e,r);break;case"L":e=v[p++],r=v[p++],c=s.L,o.addData(c,e,r);break;case"m":e+=v[p++],r+=v[p++],c=s.M,o.addData(c,e,r),a=e,i=r,f="l";break;case"M":e=v[p++],r=v[p++],c=s.M,o.addData(c,e,r),a=e,i=r,f="L";break;case"h":e+=v[p++],c=s.L,o.addData(c,e,r);break;case"H":e=v[p++],c=s.L,o.addData(c,e,r);break;case"v":r+=v[p++],c=s.L,o.addData(c,e,r);break;case"V":r=v[p++],c=s.L,o.addData(c,e,r);break;case"C":c=s.C,o.addData(c,v[p++],v[p++],v[p++],v[p++],v[p++],v[p++]),e=v[p-2],r=v[p-1];break;case"c":c=s.C,o.addData(c,v[p++]+e,v[p++]+r,v[p++]+e,v[p++]+r,v[p++]+e,v[p++]+r),e+=v[p-2],r+=v[p-1];break;case"S":m=e,y=r;var L=o.len(),P=o.data;n===s.C&&(m+=e-P[L-4],y+=r-P[L-3]),c=s.C,D=v[p++],I=v[p++],e=v[p++],r=v[p++],o.addData(c,m,y,D,I,e,r);break;case"s":m=e,y=r;var L=o.len(),P=o.data;n===s.C&&(m+=e-P[L-4],y+=r-P[L-3]),c=s.C,D=e+v[p++],I=r+v[p++],e+=v[p++],r+=v[p++],o.addData(c,m,y,D,I,e,r);break;case"Q":D=v[p++],I=v[p++],e=v[p++],r=v[p++],c=s.Q,o.addData(c,D,I,e,r);break;case"q":D=v[p++]+e,I=v[p++]+r,e+=v[p++],r+=v[p++],c=s.Q,o.addData(c,D,I,e,r);break;case"T":m=e,y=r;var L=o.len(),P=o.data;n===s.Q&&(m+=e-P[L-4],y+=r-P[L-3]),e=v[p++],r=v[p++],c=s.Q,o.addData(c,m,y,e,r);break;case"t":m=e,y=r;var L=o.len(),P=o.data;n===s.Q&&(m+=e-P[L-4],y+=r-P[L-3]),e+=v[p++],r+=v[p++],c=s.Q,o.addData(c,m,y,e,r);break;case"A":_=v[p++],w=v[p++],b=v[p++],A=v[p++],S=v[p++],D=e,I=r,e=v[p++],r=v[p++],c=s.A,z0(D,I,e,r,A,S,_,w,b,c,o);break;case"a":_=v[p++],w=v[p++],b=v[p++],A=v[p++],S=v[p++],D=e,I=r,e+=v[p++],r+=v[p++],c=s.A,z0(D,I,e,r,A,S,_,w,b,c,o);break}}(f==="z"||f==="Z")&&(c=s.Z,o.addData(c),e=a,r=i),n=c}return o.toStatic(),o}function B0(t,e){var r=ZD(t);return e=e||{},e.buildPath=function(a){if(a.setData){a.setData(r.data);var i=a.getContext();i&&a.rebuildPath(i)}else{var i=a;r.rebuildPath(i)}},e.applyTransform=function(a){WD(r,a),this.dirty(!0)},e}function V0(t,e){return new pt(B0(t,e))}function YD(t,e){return pt.extend(B0(t,e))}function XD(t,e){for(var r=[],a=t.length,i=0;i<a;i++){var n=t[i];n.path||n.createPathProxy(),n.__dirtyPath&&n.buildPath(n.path,n.shape,!0),r.push(n.path)}var o=new pt(e);return o.createPathProxy(),o.buildPath=function(s){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l)},o}var dt=function(t){Le.call(this,t)};dt.prototype={constructor:dt,type:"text",brush:function(t,e){var r=this.style;this.__dirty&&Mo(r,!0),r.fill=r.stroke=r.shadowBlur=r.shadowColor=r.shadowOffsetX=r.shadowOffsetY=null;var a=r.text;if(a!=null&&(a+=""),!fc(a,r)){t.__attrCachedBy=Ca.NONE;return}this.setTransform(t),r0(this,t,a,r,null,e),this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&Mo(t,!0),!this._rect){var e=t.text;e!=null?e+="":e="";var r=Rr(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(r.x+=t.x||0,r.y+=t.y||0,uc(t.textStroke,t.textStrokeWidth)){var a=t.textStrokeWidth;r.x-=a/2,r.y-=a/2,r.width+=a,r.height+=a}this._rect=r}return this._rect}},It(dt,Le);var Br=pt.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,r){r&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2,!0)}}),Na=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Hc=function(t){return G.browser.ie&&G.browser.version>=11?function(){var e=this.__clipPaths,r=this.style,a;if(e)for(var i=0;i<e.length;i++){var n=e[i],o=n&&n.shape,s=n&&n.type;if(o&&(s==="sector"&&o.startAngle===o.endAngle||s==="rect"&&(!o.width||!o.height))){for(var l=0;l<Na.length;l++)Na[l][2]=r[Na[l][0]],r[Na[l][0]]=Na[l][1];a=!0;break}}if(t.apply(this,arguments),a)for(var l=0;l<Na.length;l++)r[Na[l][0]]=Na[l][2]}:t},Ar=pt.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:Hc(pt.prototype.brush),buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r0||0,0),n=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(o),h=Math.sin(o);t.moveTo(u*i+r,h*i+a),t.lineTo(u*n+r,h*n+a),t.arc(r,a,n,o,s,!l),t.lineTo(Math.cos(s)*i+r,Math.sin(s)*i+a),i!==0&&t.arc(r,a,i,s,o,l),t.closePath()}}),Yl=pt.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.PI*2;t.moveTo(r+e.r,a),t.arc(r,a,e.r,0,i,!1),t.moveTo(r+e.r0,a),t.arc(r,a,e.r0,0,i,!0)}});function G0(t,e,r,a,i,n,o){var s=(r-t)*.5,l=(a-e)*.5;return(2*(e-r)+s+l)*o+(-3*(e-r)-2*s-l)*n+s*i+e}var qD=function(t,e){for(var r=t.length,a=[],i=0,n=1;n<r;n++)i+=_o(t[n-1],t[n]);var o=i/2;o=o<r?r:o;for(var n=0;n<o;n++){var s=n/(o-1)*(e?r:r-1),l=Math.floor(s),u=s-l,h,f=t[l%r],c,v;e?(h=t[(l-1+r)%r],c=t[(l+1)%r],v=t[(l+2)%r]):(h=t[l===0?l:l-1],c=t[l>r-2?r-1:l+1],v=t[l>r-3?r-1:l+2]);var d=u*u,g=u*d;a.push([G0(h[0],f[0],c[0],v[0],u,d,g),G0(h[1],f[1],c[1],v[1],u,d,g)])}return a},KD=function(t,e,r,a){var i=[],n=[],o=[],s=[],l,u,h,f;if(a){h=[1/0,1/0],f=[-1/0,-1/0];for(var c=0,v=t.length;c<v;c++)ea(h,h,t[c]),ra(f,f,t[c]);ea(h,h,a[0]),ra(f,f,a[1])}for(var c=0,v=t.length;c<v;c++){var d=t[c];if(r)l=t[c?c-1:v-1],u=t[(c+1)%v];else if(c===0||c===v-1){i.push(mr(t[c]));continue}else l=t[c-1],u=t[c+1];Jr(n,u,l),hl(n,n,e);var g=_o(d,l),p=_o(d,u),m=g+p;m!==0&&(g/=m,p/=m),hl(o,n,-g),hl(s,n,p);var y=vf([],d,o),_=vf([],d,s);a&&(ra(y,y,h),ea(y,y,f),ra(_,_,h),ea(_,_,f)),i.push(y),i.push(_)}return r&&i.push(i.shift()),i};function H0(t,e,r){var a=e.points,i=e.smooth;if(a&&a.length>=2){if(i&&i!=="spline"){var n=KD(a,i,r,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(r?o:o-1);s++){var l=n[s*2],u=n[s*2+1],h=a[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{i==="spline"&&(a=qD(a,r)),t.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s<f;s++)t.lineTo(a[s][0],a[s][1])}r&&t.closePath()}}var Ge=pt.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){H0(t,e,!0)}}),ir=pt.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){H0(t,e,!1)}}),An=Math.round;function F0(t,e,r){if(!!e){var a=e.x1,i=e.x2,n=e.y1,o=e.y2;t.x1=a,t.x2=i,t.y1=n,t.y2=o;var s=r&&r.lineWidth;!s||(An(a*2)===An(i*2)&&(t.x1=t.x2=di(a,s,!0)),An(n*2)===An(o*2)&&(t.y1=t.y2=di(n,s,!0)))}}function W0(t,e,r){if(!!e){var a=e.x,i=e.y,n=e.width,o=e.height;t.x=a,t.y=i,t.width=n,t.height=o;var s=r&&r.lineWidth;!s||(t.x=di(a,s,!0),t.y=di(i,s,!0),t.width=Math.max(di(a+n,s,!1)-t.x,n===0?0:1),t.height=Math.max(di(i+o,s,!1)-t.y,o===0?0:1))}}function di(t,e,r){if(!e)return t;var a=An(t*2);return(a+An(e))%2===0?a/2:(a+(r?1:-1))/2}var gi={},xt=pt.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var r,a,i,n;this.subPixelOptimize?(W0(gi,e,this.style),r=gi.x,a=gi.y,i=gi.width,n=gi.height,gi.r=e.r,e=gi):(r=e.x,a=e.y,i=e.width,n=e.height),e.r?jm(t,e):t.rect(r,a,i,n),t.closePath()}}),No={},ye=pt.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r,a,i,n;this.subPixelOptimize?(F0(No,e,this.style),r=No.x1,a=No.y1,i=No.x2,n=No.y2):(r=e.x1,a=e.y1,i=e.x2,n=e.y2);var o=e.percent;o!==0&&(t.moveTo(r,a),o<1&&(i=r*(1-o)+i*o,n=a*(1-o)+n*o),t.lineTo(i,n))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Ne=[];function U0(t,e,r){var a=t.cpx2,i=t.cpy2;return a===null||i===null?[(r?w0:De)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?w0:De)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?Rc:be)(t.x1,t.cpx1,t.x2,e),(r?Rc:be)(t.y1,t.cpy1,t.y2,e)]}var Xl=pt.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.x1,a=e.y1,i=e.x2,n=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;h!==0&&(t.moveTo(r,a),l==null||u==null?(h<1&&(Oc(r,o,i,h,Ne),o=Ne[1],i=Ne[2],Oc(a,s,n,h,Ne),s=Ne[1],n=Ne[2]),t.quadraticCurveTo(o,s,i,n)):(h<1&&(S0(r,o,l,i,h,Ne),o=Ne[1],l=Ne[2],i=Ne[3],S0(a,s,u,n,h,Ne),s=Ne[1],u=Ne[2],n=Ne[3]),t.bezierCurveTo(o,s,l,u,i,n)))},pointAt:function(t){return U0(this.shape,t,!1)},tangentAt:function(t){var e=U0(this.shape,t,!0);return ln(e,e)}}),Fc=pt.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r,0),n=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(n),u=Math.sin(n);t.moveTo(l*i+r,u*i+a),t.arc(r,a,i,n,o,!s)}}),$0=pt.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,r=0;r<e.length;r++)t=t||e[r].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),r=0;r<t.length;r++)t[r].path||t[r].createPathProxy(),t[r].path.setScale(e[0],e[1],t[r].segmentIgnoreThreshold)},buildPath:function(t,e){for(var r=e.paths||[],a=0;a<r.length;a++)r[a].buildPath(t,r[a].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),pt.prototype.getBoundingRect.call(this)}}),Vr=function(t){this.colorStops=t||[]};Vr.prototype={constructor:Vr,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var pi=function(t,e,r,a,i,n){this.x=t??0,this.y=e??0,this.x2=r??1,this.y2=a??0,this.type="linear",this.global=n||!1,Vr.call(this,i)};pi.prototype={constructor:pi},It(pi,Vr);var ql=function(t,e,r,a,i){this.x=t??.5,this.y=e??.5,this.r=r??.5,this.type="radial",this.global=i||!1,Vr.call(this,a)};ql.prototype={constructor:ql},It(ql,Vr);function He(t){Le.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}He.prototype.incremental=!0,He.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},He.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},He.prototype.addDisplayables=function(t,e){e=e||!1;for(var r=0;r<t.length;r++)this.addDisplayable(t[r],e)},He.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},He.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},He.prototype.brush=function(t,e){for(var r=this._cursor;r<this._displayables.length;r++){var a=this._displayables[r];a.beforeBrush&&a.beforeBrush(t),a.brush(t,r===this._cursor?null:this._displayables[r-1]),a.afterBrush&&a.afterBrush(t)}this._cursor=r;for(var r=0;r<this._temporaryDisplayables.length;r++){var a=this._temporaryDisplayables[r];a.beforeBrush&&a.beforeBrush(t),a.brush(t,r===0?null:this._temporaryDisplayables[r-1]),a.afterBrush&&a.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var jD=[];He.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new vt(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var r=this._displayables[e],a=r.getBoundingRect().clone();r.needLocalTransform()&&a.applyTransform(r.getLocalTransform(jD)),t.union(a)}this._rect=t}return this._rect},He.prototype.contain=function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect();if(a.contain(r[0],r[1]))for(var i=0;i<this._displayables.length;i++){var n=this._displayables[i];if(n.contain(t,e))return!0}return!1},It(He,Le);var Kl=Math.max,jl=Math.min,Ql={},ko=1,Z0={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},Y0="emphasis",X0="normal",q0=1,K0={},Wc={};function nr(t){return pt.extend(t)}function QD(t,e){return YD(t,e)}function Gr(t,e){Wc[t]=e}function Uc(t){if(Wc.hasOwnProperty(t))return Wc[t]}function zo(t,e,r,a){var i=V0(t,e);return r&&(a==="center"&&(r=Q0(r,i.getBoundingRect())),J0(i,r)),i}function j0(t,e,r){var a=new ve({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(r==="center"){var n={width:i.width,height:i.height};a.setStyle(Q0(e,n))}}});return a}function Q0(t,e){var r=e.width/e.height,a=t.height*r,i;a<=t.width?i=t.height:(a=t.width,i=a/r);var n=t.x+t.width/2,o=t.y+t.height/2;return{x:n-a/2,y:o-i/2,width:a,height:i}}var or=XD;function J0(t,e){if(!!t.applyTransform){var r=t.getBoundingRect(),a=r.calculateTransform(e);t.applyTransform(a)}}function JD(t){return F0(t.shape,t.shape,t.style),t}function tM(t){return W0(t.shape,t.shape,t.style),t}var Jl=di;function ty(t){return t!=null&&t!=="none"}var ey=ht(),ry=0;function eM(t){if(typeof t!="string")return t;var e=ey.get(t);return e||(e=Im(t,-.1),ry<1e4&&(ey.set(t,e),ry++)),e}function rM(t){if(!!t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e){t.__cachedNormalStl=t.__cachedNormalZ2=null;return}var r=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var a=t.style;for(var i in e)e[i]!=null&&(r[i]=a[i]);r.fill=a.fill,r.stroke=a.stroke}}function $c(t){var e=t.__hoverStl;if(!(!e||t.__highlighted)){var r=t.__zr,a=t.useHoverLayer&&r&&r.painter.type==="canvas";if(t.__highlighted=a?"layer":"plain",!(t.isGroup||!r&&t.useHoverLayer)){var i=t,n=t.style;a&&(i=r.addHover(t),n=i.style),ru(n),a||rM(i),n.extendFrom(e),ay(n,e,"fill"),ay(n,e,"stroke"),Go(n),a||(t.dirty(!1),t.z2+=ko)}}}function ay(t,e,r){!ty(e[r])&&ty(t[r])&&(t[r]=eM(t[r]))}function Zc(t){var e=t.__highlighted;if(!!e&&(t.__highlighted=!1,!t.isGroup))if(e==="layer")t.__zr&&t.__zr.removeHover(t);else{var r=t.style,a=t.__cachedNormalStl;a&&(ru(r),t.setStyle(a),Go(r));var i=t.__cachedNormalZ2;i!=null&&t.z2-i===ko&&(t.z2=i)}}function Bo(t,e,r){var a=X0,i=X0,n;t.__highlighted&&(a=Y0,n=!0),e(t,r),t.__highlighted&&(i=Y0,n=!0),t.isGroup&&t.traverse(function(o){!o.isGroup&&e(o,r)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(a,i)}function Vo(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Zc(t),$c(t))}function aM(t){!iy(this,t)&&!this.__highByOuter&&Bo(this,$c)}function iM(t){!iy(this,t)&&!this.__highByOuter&&Bo(this,Zc)}function nM(t){this.__highByOuter|=1<<(t||0),Bo(this,$c)}function oM(t){!(this.__highByOuter&=~(1<<(t||0)))&&Bo(this,Zc)}function iy(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ot(t,e){mi(t,!0),Bo(t,Vo,e)}function mi(t,e){var r=e===!1;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!r||t.__highDownDispatcher){var a=r?"off":"on";t[a]("mouseover",aM)[a]("mouseout",iM),t[a]("emphasis",nM)[a]("normal",oM),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!r}}function tu(t){return!!(t&&t.__highDownDispatcher)}function ny(t){var e=K0[t];return e==null&&q0<=32&&(e=K0[t]=q0++),e}function Fe(t,e,r,a,i,n,o){i=i||Ql;var s=i.labelFetcher,l=i.labelDataIndex,u=i.labelDimIndex,h=i.labelProp,f=r.getShallow("show"),c=a.getShallow("show"),v;(f||c)&&(s&&(v=s.getFormattedLabel(l,"normal",null,u,h)),v==null&&(v=se(i.defaultText)?i.defaultText(l,i):i.defaultText));var d=f?v:null,g=c?Xt(s?s.getFormattedLabel(l,"emphasis",null,u,h):null,v):null;(d!=null||g!=null)&&($t(t,r,n,i),$t(e,a,o,i,!0)),t.text=d,e.text=g}function Yc(t,e,r){var a=t.style;e&&(ru(a),t.setStyle(e),Go(a)),a=t.__hoverStl,r&&a&&(ru(a),et(a,r),Go(a))}function $t(t,e,r,a,i){return oy(t,e,a,i),r&&et(t,r),t}function sM(t,e,r){var a={isRectText:!0},i;r===!1?i=!0:a.autoColor=r,oy(t,e,a,i)}function oy(t,e,r,a){if(r=r||Ql,r.isRectText){var i;r.getTextPosition?i=r.getTextPosition(e,a):(i=e.getShallow("position")||(a?null:"inside"),i==="outside"&&(i="top")),t.textPosition=i,t.textOffset=e.getShallow("offset");var n=e.getShallow("rotate");n!=null&&(n*=Math.PI/180),t.textRotation=n,t.textDistance=Xt(e.getShallow("distance"),a?null:5)}var o=e.ecModel,s=o&&o.option.textStyle,l=lM(e),u;if(l){u={};for(var h in l)if(l.hasOwnProperty(h)){var f=e.getModel(["rich",h]);sy(u[h]={},f,s,r,a)}}return t.rich=u,sy(t,e,s,r,a,!0),r.forceRich&&!r.textStyle&&(r.textStyle={}),t}function lM(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||Ql).rich;if(r){e=e||{};for(var a in r)r.hasOwnProperty(a)&&(e[a]=1)}t=t.parentModel}return e}function sy(t,e,r,a,i,n){r=!i&&r||Ql,t.textFill=eu(e.getShallow("color"),a)||r.color,t.textStroke=eu(e.getShallow("textBorderColor"),a)||r.textBorderColor,t.textStrokeWidth=Xt(e.getShallow("textBorderWidth"),r.textBorderWidth),i||(n&&(t.insideRollbackOpt=a,Go(t)),t.textFill==null&&(t.textFill=a.autoColor)),t.fontStyle=e.getShallow("fontStyle")||r.fontStyle,t.fontWeight=e.getShallow("fontWeight")||r.fontWeight,t.fontSize=e.getShallow("fontSize")||r.fontSize,t.fontFamily=e.getShallow("fontFamily")||r.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),(!n||!a.disableBox)&&(t.textBackgroundColor=eu(e.getShallow("backgroundColor"),a),t.textPadding=e.getShallow("padding"),t.textBorderColor=eu(e.getShallow("borderColor"),a),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||r.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||r.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||r.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||r.textShadowOffsetY}function eu(t,e){return t!=="auto"?t:e&&e.autoColor?e.autoColor:null}function Go(t){var e=t.textPosition,r=t.insideRollbackOpt,a;if(r&&t.textFill==null){var i=r.autoColor,n=r.isRectText,o=r.useInsideStyle,s=o!==!1&&(o===!0||n&&e&&typeof e=="string"&&e.indexOf("inside")>=0),l=!s&&i!=null;(s||l)&&(a={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",t.textStroke==null&&(t.textStroke=i,t.textStrokeWidth==null&&(t.textStrokeWidth=2))),l&&(t.textFill=i)}t.insideRollback=a}function ru(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Xc(t,e){var r=e&&e.getModel("textStyle");return tr([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}function ly(t,e,r,a,i,n){typeof i=="function"&&(n=i,i=null);var o=a&&a.isAnimationEnabled();if(o){var s=t?"Update":"",l=a.getShallow("animationDuration"+s),u=a.getShallow("animationEasing"+s),h=a.getShallow("animationDelay"+s);typeof h=="function"&&(h=h(i,a.getAnimationDelayParams?a.getAnimationDelayParams(e,i):null)),typeof l=="function"&&(l=l(i)),l>0?e.animateTo(r,l,h||0,u,n,!!n):(e.stopAnimation(),e.attr(r),n&&n())}else e.stopAnimation(),e.attr(r),n&&n()}function ft(t,e,r,a,i){ly(!0,t,e,r,a,i)}function Se(t,e,r,a,i){ly(!1,t,e,r,a,i)}function yi(t,e){for(var r=fn([]);t&&t!==e;)Sa(r,t.getLocalTransform(),r),t=t.parent;return r}function Hr(t,e,r){return e&&!Qr(e)&&(e=_r.getLocalTransform(e)),r&&(e=cl([],e)),Pt([],t,e)}function qc(t,e,r){var a=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),n=[t==="left"?-a:t==="right"?a:0,t==="top"?-i:t==="bottom"?i:0];return n=Hr(n,e,r),Math.abs(n[0])>Math.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function au(t,e,r,a){if(!t||!e)return;function i(s){var l={};return s.traverse(function(u){!u.isGroup&&u.anid&&(l[u.anid]=u)}),l}function n(s){var l={position:mr(s.position),rotation:s.rotation};return s.shape&&(l.shape=et({},s.shape)),l}var o=i(t);e.traverse(function(s){if(!s.isGroup&&s.anid){var l=o[s.anid];if(l){var u=n(s);s.attr(n(l)),ft(s,u,r,s.dataIndex)}}})}function uy(t,e){return V(t,function(r){var a=r[0];a=Kl(a,e.x),a=jl(a,e.x+e.width);var i=r[1];return i=Kl(i,e.y),i=jl(i,e.y+e.height),[a,i]})}function uM(t,e){var r=Kl(t.x,e.x),a=jl(t.x+t.width,e.x+e.width),i=Kl(t.y,e.y),n=jl(t.y+t.height,e.y+e.height);if(a>=r&&n>=i)return{x:r,y:i,width:a-r,height:n-i}}function Ho(t,e,r){e=et({rectHover:!0},e);var a=e.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(a.image=t.slice(8),J(a,r),new ve(e)):zo(t.replace("path://",""),e,r,"center")}function Fo(t,e,r,a,i){for(var n=0,o=i[i.length-1];n<i.length;n++){var s=i[n];if(hy(t,e,r,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function hy(t,e,r,a,i,n,o,s){var l=r-t,u=a-e,h=o-i,f=s-n,c=Kc(h,f,l,u);if(hM(c))return!1;var v=t-i,d=e-n,g=Kc(v,d,l,u)/c;if(g<0||g>1)return!1;var p=Kc(v,d,h,f)/c;return!(p<0||p>1)}function Kc(t,e,r,a){return t*a-r*e}function hM(t){return t<=1e-6&&t>=-1e-6}Gr("circle",Br),Gr("sector",Ar),Gr("ring",Yl),Gr("polygon",Ge),Gr("polyline",ir),Gr("rect",xt),Gr("line",ye),Gr("bezierCurve",Xl),Gr("arc",Fc);var sa=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:ko,CACHED_LABEL_STYLE_PROPERTIES:Z0,extendShape:nr,extendPath:QD,registerShape:Gr,getShapeClass:Uc,makePath:zo,makeImage:j0,mergePath:or,resizePath:J0,subPixelOptimizeLine:JD,subPixelOptimizeRect:tM,subPixelOptimize:Jl,setElementHoverStyle:Vo,setHoverStyle:Ot,setAsHighDownDispatcher:mi,isHighDownDispatcher:tu,getHighlightDigit:ny,setLabelStyle:Fe,modifyLabelStyle:Yc,setTextStyle:$t,setText:sM,getFont:Xc,updateProps:ft,initProps:Se,getTransform:yi,applyTransform:Hr,transformDirection:qc,groupTransition:au,clipPointsByRect:uy,clipRectByRect:uM,createIcon:Ho,linePolygonIntersect:Fo,lineLineIntersect:hy,Group:q,Image:ve,Text:dt,Circle:Br,Sector:Ar,Ring:Yl,Polygon:Ge,Polyline:ir,Rect:xt,Line:ye,BezierCurve:Xl,Arc:Fc,IncrementalDisplayable:He,CompoundPath:$0,LinearGradient:pi,RadialGradient:ql,BoundingRect:vt}),fM=["textStyle","color"],cM={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(fM):null)},getFont:function(){return Xc({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Rr(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},vM=_n([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),dM={getItemStyle:function(t,e){var r=vM(this,t,e),a=this.getBorderLineDash();return a&&(r.lineDash=a),r},getBorderLineDash:function(){var t=this.get("borderType");return t==="solid"||t==null?null:t==="dashed"?[5,5]:[1,1]}},iu=Dt,fy=Pe();function _t(t,e,r){this.parentModel=e,this.ecModel=r,this.option=t}_t.prototype={constructor:_t,init:null,mergeOption:function(t){ut(this.option,t,!0)},get:function(t,e){return t==null?this.option:cy(this.option,this.parsePath(t),!e&&jc(this,t))},getShallow:function(t,e){var r=this.option,a=r==null?r:r[t],i=!e&&jc(this,t);return a==null&&i&&(a=i.getShallow(t)),a},getModel:function(t,e){var r=t==null?this.option:cy(this.option,t=this.parsePath(t)),a;return e=e||(a=jc(this,t))&&a.getModel(t),new _t(r,e,this.ecModel)},isEmpty:function(){return this.option==null},restoreData:function(){},clone:function(){var t=this.constructor;return new t(rt(this.option))},setReadOnly:function(t){},parsePath:function(t){return typeof t=="string"&&(t=t.split(".")),t},customizeGetParent:function(t){fy(this).getParent=t},isAnimationEnabled:function(){if(!G.node){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}};function cy(t,e,r){for(var a=0;a<e.length&&!(!!e[a]&&(t=t&&typeof t=="object"?t[e[a]]:null,t==null));a++);return t==null&&r&&(t=r.get(e)),t}function jc(t,e){var r=fy(t).getParent;return r?r.call(t,e):t.parentModel}Lo(_t),Nl(_t),iu(_t,xD),iu(_t,bD),iu(_t,cM),iu(_t,dM);var gM=0;function Wo(t){return[t||"",gM++,Math.random().toFixed(5)].join("_")}function pM(t){var e={};return t.registerSubTypeDefaulter=function(r,a){r=Ma(r),e[r.main]=a},t.determineSubType=function(r,a){var i=a.type;if(!i){var n=Ma(r).main;t.hasSubTypes(r)&&e[n]&&(i=e[n](a))}return i},t}function mM(t,e){t.topologicalTravel=function(n,o,s,l){if(!n.length)return;var u=r(o),h=u.graph,f=u.noEntryList,c={};for(M(n,function(y){c[y]=!0});f.length;){var v=f.pop(),d=h[v],g=!!c[v];g&&(s.call(l,v,d.originalDeps.slice()),delete c[v]),M(d.successor,g?m:p)}M(c,function(){throw new Error("Circle dependency may exists")});function p(y){h[y].entryCount--,h[y].entryCount===0&&f.push(y)}function m(y){c[y]=!0,p(y)}};function r(n){var o={},s=[];return M(n,function(l){var u=a(o,l),h=u.originalDeps=e(l),f=i(h,n);u.entryCount=f.length,u.entryCount===0&&s.push(l),M(f,function(c){yt(u.predecessor,c)<0&&u.predecessor.push(c);var v=a(o,c);yt(v.successor,c)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function a(n,o){return n[o]||(n[o]={predecessor:[],successor:[]}),n[o]}function i(n,o){var s=[];return M(n,function(l){yt(o,l)>=0&&s.push(l)}),s}}var vy=1e-4;function yM(t){return t.replace(/^\s+|\s+$/g,"")}function Nt(t,e,r,a){var i=e[1]-e[0],n=r[1]-r[0];if(i===0)return n===0?r[0]:(r[0]+r[1])/2;if(a)if(i>0){if(t<=e[0])return r[0];if(t>=e[1])return r[1]}else{if(t>=e[0])return r[0];if(t<=e[1])return r[1]}else{if(t===e[0])return r[0];if(t===e[1])return r[1]}return(t-e[0])/i*n+r[0]}function H(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return typeof t=="string"?yM(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function re(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),r?t:+t}function _i(t){return t.sort(function(e,r){return e-r}),t}function dy(t){if(t=+t,isNaN(t))return 0;for(var e=1,r=0;Math.round(t*e)/e!==t;)e*=10,r++;return r}function nu(t){var e=t.toString(),r=e.indexOf("e");if(r>0){var a=+e.slice(r+1);return a<0?-a:0}else{var i=e.indexOf(".");return i<0?0:e.length-1-i}}function Qc(t,e){var r=Math.log,a=Math.LN10,i=Math.floor(r(t[1]-t[0])/a),n=Math.round(r(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-i+n,0),20);return isFinite(o)?o:20}function gy(t,e,r){if(!t[e])return 0;var a=an(t,function(d,g){return d+(isNaN(g)?0:g)},0);if(a===0)return 0;for(var i=Math.pow(10,r),n=V(t,function(d){return(isNaN(d)?0:d)/a*i*100}),o=i*100,s=V(n,function(d){return Math.floor(d)}),l=an(s,function(d,g){return d+g},0),u=V(n,function(d,g){return d-s[g]});l<o;){for(var h=Number.NEGATIVE_INFINITY,f=null,c=0,v=u.length;c<v;++c)u[c]>h&&(h=u[c],f=c);++s[f],u[f]=0,++l}return s[e]/i}var Jc=9007199254740991;function tv(t){var e=Math.PI*2;return(t%e+e)%e}function Uo(t){return t>-vy&&t<vy}var _M=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function $o(t){if(t instanceof Date)return t;if(typeof t=="string"){var e=_M.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(r-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(e[5]||0),+e[6]||0,+e[7]||0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}else if(t==null)return new Date(NaN);return new Date(Math.round(t))}function py(t){return Math.pow(10,ev(t))}function ev(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function rv(t,e){var r=ev(t),a=Math.pow(10,r),i=t/a,n;return e?i<1.5?n=1:i<2.5?n=2:i<4?n=3:i<7?n=5:n=10:i<1?n=1:i<2?n=2:i<3?n=3:i<5?n=5:n=10,t=n*a,r>=-20?+t.toFixed(r<0?-r:0):t}function xM(t,e){var r=(t.length-1)*e+1,a=Math.floor(r),i=+t[a-1],n=r-a;return n?i+n*(t[a]-i):i}function av(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,a=0;a<t.length;){for(var i=t[a].interval,n=t[a].close,o=0;o<2;o++)i[o]<=e&&(i[o]=e,n[o]=o?1:1-r),e=i[o],r=n[o];i[0]===i[1]&&n[0]*n[1]!==1?t.splice(a,1):a++}return t;function s(l,u,h){return l.interval[h]<u.interval[h]||l.interval[h]===u.interval[h]&&(l.close[h]-u.close[h]===(h?-1:1)||!h&&s(l,u,1))}}function my(t){return t-parseFloat(t)>=0}var wM=(Object.freeze||Object)({linearMap:Nt,parsePercent:H,round:re,asc:_i,getPrecision:dy,getPrecisionSafe:nu,getPixelPrecision:Qc,getPercentWithPrecision:gy,MAX_SAFE_INTEGER:Jc,remRadian:tv,isRadianAroundZero:Uo,parseDate:$o,quantity:py,quantityExponent:ev,nice:rv,quantile:xM,reformIntervals:av,isNumeric:my});function ka(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function yy(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,a){return a.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var xi=hf,bM=/([&<>"'])/g,SM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function kt(t){return t==null?"":(t+"").replace(bM,function(e,r){return SM[r]})}var _y=["a","b","c","d","e","f","g"],iv=function(t,e){return"{"+t+(e??"")+"}"};function nv(t,e,r){z(e)||(e=[e]);var a=e.length;if(!a)return"";for(var i=e[0].$vars||[],n=0;n<i.length;n++){var o=_y[n];t=t.replace(iv(o),iv(o,0))}for(var s=0;s<a;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];t=t.replace(iv(_y[l],s),r?kt(u):u)}return t}function xy(t,e,r){return M(e,function(a,i){t=t.replace("{"+i+"}",r?kt(a):a)}),t}function ou(t,i){t=Lt(t)?{color:t,extraCssText:i}:t||{};var r=t.color,a=t.type,i=t.extraCssText,n=t.renderMode||"html",o=t.markerId||"X";return r?n==="html"?a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+kt(r)+";"+(i||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+kt(r)+";"+(i||"")+'"></span>':{renderMode:n,content:"{marker"+o+"|}  ",style:{color:r}}:""}function Tn(t,e){return t+="","0000".substr(0,e-t.length)+t}function ov(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd
yyyy`);var a=$o(e),i=r?"UTC":"",n=a["get"+i+"FullYear"](),o=a["get"+i+"Month"]()+1,s=a["get"+i+"Date"](),l=a["get"+i+"Hours"](),u=a["get"+i+"Minutes"](),h=a["get"+i+"Seconds"](),f=a["get"+i+"Milliseconds"]();return t=t.replace("MM",Tn(o,2)).replace("M",o).replace("yyyy",n).replace("yy",n%100).replace("dd",Tn(s,2)).replace("d",s).replace("hh",Tn(l,2)).replace("h",l).replace("mm",Tn(u,2)).replace("m",u).replace("ss",Tn(h,2)).replace("s",h).replace("SSS",Tn(f,3)),t}function su(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}var wy=tc;function AM(t){return Rr(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function TM(t,e,r,a,i,n,o,s){return Rr(t,e,r,a,i,s,n,o)}function Zo(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location=t}else window.open(t,e)}var CM=(Object.freeze||Object)({addCommas:ka,toCamelCase:yy,normalizeCssArray:xi,encodeHTML:kt,formatTpl:nv,formatTplSimple:xy,getTooltipMarker:ou,formatTime:ov,capitalFirst:su,truncateText:wy,getTextBoundingRect:AM,getTextRect:TM,windowOpen:Zo}),lu=M,by=["left","right","top","bottom","width","height"],wi=[["width","left","right"],["height","top","bottom"]];function sv(t,e,r,a,i){var n=0,o=0;a==null&&(a=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var h=l.position,f=l.getBoundingRect(),c=e.childAt(u+1),v=c&&c.getBoundingRect(),d,g;if(t==="horizontal"){var p=f.width+(v?-v.x+f.x:0);d=n+p,d>a||l.newline?(n=0,d=p,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(v?-v.y+f.y:0);g=o+m,g>i||l.newline?(n+=s+r,o=0,g=m,s=f.width):s=Math.max(s,f.width)}l.newline||(h[0]=n,h[1]=o,t==="horizontal"?n=d+r:o=g+r)})}var bi=sv,V5=ot(sv,"vertical"),G5=ot(sv,"horizontal");function DM(t,e,r){var a=e.width,i=e.height,n=H(t.x,a),o=H(t.y,i),s=H(t.x2,a),l=H(t.y2,i);return(isNaN(n)||isNaN(parseFloat(t.x)))&&(n=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=a),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=i),r=xi(r||0),{width:Math.max(s-n-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function qt(t,e,r){r=xi(r||0);var a=e.width,i=e.height,n=H(t.left,a),o=H(t.top,i),s=H(t.right,a),l=H(t.bottom,i),u=H(t.width,a),h=H(t.height,i),f=r[2]+r[0],c=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=a-s-c-n),isNaN(h)&&(h=i-l-f-o),v!=null&&(isNaN(u)&&isNaN(h)&&(v>a/i?u=a*.8:h=i*.8),isNaN(u)&&(u=v*h),isNaN(h)&&(h=u/v)),isNaN(n)&&(n=a-s-u-c),isNaN(o)&&(o=i-l-h-f),t.left||t.right){case"center":n=a/2-u/2-r[3];break;case"right":n=a-u-c;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-h/2-r[0];break;case"bottom":o=i-h-f;break}n=n||0,o=o||0,isNaN(u)&&(u=a-c-n-(s||0)),isNaN(h)&&(h=i-f-o-(l||0));var d=new vt(n+r[3],o+r[0],u,h);return d.margin=r,d}function uu(t,e,r,a,i){var n=!i||!i.hv||i.hv[0],o=!i||!i.hv||i.hv[1],s=i&&i.boundingMode||"all";if(!(!n&&!o)){var l;if(s==="raw")l=t.type==="group"?new vt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();l=l.clone(),l.applyTransform(u)}e=qt(J({width:l.width,height:l.height},e),r,a);var h=t.position,f=n?e.x-l.x:0,c=o?e.y-l.y:0;t.attr("position",s==="raw"?[f,c]:[h[0]+f,h[1]+c])}}function MM(t,e){return t[wi[e][0]]!=null||t[wi[e][1]]!=null&&t[wi[e][2]]!=null}function za(t,e,r){!lt(r)&&(r={});var a=r.ignoreSize;!z(a)&&(a=[a,a]);var i=o(wi[0],0),n=o(wi[1],1);u(wi[0],t,i),u(wi[1],t,n);function o(h,f){var c={},v=0,d={},g=0,p=2;if(lu(h,function(_){d[_]=t[_]}),lu(h,function(_){s(e,_)&&(c[_]=d[_]=e[_]),l(c,_)&&v++,l(d,_)&&g++}),a[f])return l(e,h[1])?d[h[2]]=null:l(e,h[2])&&(d[h[1]]=null),d;if(g===p||!v)return d;if(v>=p)return c;for(var m=0;m<h.length;m++){var y=h[m];if(!s(c,y)&&s(t,y)){c[y]=t[y];break}}return c}function s(h,f){return h.hasOwnProperty(f)}function l(h,f){return h[f]!=null&&h[f]!=="auto"}function u(h,f,c){lu(h,function(v){f[v]=c[v]})}}function Cn(t){return Sy({},t)}function Sy(t,e){return e&&t&&lu(by,function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var IM={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}},LM=Pe(),wt=_t.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,r,a){_t.call(this,t,e,r,a),this.uid=Wo("ec_cpt_model")},init:function(t,e,r,a){this.mergeDefaultAndTheme(t,r)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode,a=r?Cn(t):{},i=e.getTheme();ut(t,i.get(this.mainType)),ut(t,this.getDefaultOption()),r&&za(t,a,r)},mergeOption:function(t,e){ut(this.option,t,!0);var r=this.layoutMode;r&&za(this.option,t,r)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=LM(this);if(!t.defaultOption){for(var e=[],r=this.constructor;r;){var a=r.prototype.defaultOption;a&&e.push(a),r=r.superClass}for(var i={},n=e.length-1;n>=0;n--)i=ut(i,e[n],!0);t.defaultOption=i}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});kl(wt,{registerWhenExtend:!0}),pM(wt),mM(wt,PM);function PM(t){var e=[];return M(wt.getClassesByMainType(t),function(r){e=e.concat(r.prototype.dependencies||[])}),e=V(e,function(r){return Ma(r).main}),t!=="dataset"&&yt(e,"dataset")<=0&&e.unshift("dataset"),e}Dt(wt,IM);var Ay="";typeof navigator<"u"&&(Ay=navigator.platform||"");var EM={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Ay.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},lv=Pe();function RM(t,e){for(var r=t.length,a=0;a<r;a++)if(t[a].length>e)return t[a];return t[r-1]}var uv={clearColorPalette:function(){lv(this).colorIdx=0,lv(this).colorNameMap={}},getColorFromPalette:function(t,e,r){e=e||this;var a=lv(e),i=a.colorIdx||0,n=a.colorNameMap=a.colorNameMap||{};if(n.hasOwnProperty(t))return n[t];var o=me(this.get("color",!0)),s=this.get("colorLayer",!0),l=r==null||!s?o:RM(s,r);if(l=l||o,!(!l||!l.length)){var u=l[i];return t&&(n[t]=u),a.colorIdx=(i+1)%l.length,u}}},Si="original",Yo="arrayRows",Xo="objectRows",qo="keyedColumns",Ty="unknown",Ko="typedArray",Cy="column",hv="row";function Tr(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===qo?{}:[]),this.sourceFormat=t.sourceFormat||Ty,this.seriesLayoutBy=t.seriesLayoutBy||Cy,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&ht(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Tr.seriesDataToSource=function(t){return new Tr({data:t,sourceFormat:pr(t)?Ko:Si,fromDataset:!1})},Nl(Tr);var Ae={Must:1,Might:2,Not:3},Dn=Pe();function OM(t){var e=t.option.source,r=Ty;if(pr(e))r=Ko;else if(z(e)){e.length===0&&(r=Yo);for(var a=0,i=e.length;a<i;a++){var n=e[a];if(n!=null){if(z(n)){r=Yo;break}else if(lt(n)){r=Xo;break}}}}else if(lt(e)){for(var o in e)if(e.hasOwnProperty(o)&&Qr(e[o])){r=qo;break}}else if(e!=null)throw new Error("Invalid data");Dn(t).sourceFormat=r}function NM(t){return Dn(t).source}function kM(t){Dn(t).datasetMap=ht()}function Dy(t){var e=t.option,r=e.data,a=pr(r)?Ko:Si,i=!1,n=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=cv(t);if(l){var u=l.option;r=u.source,a=Dn(l).sourceFormat,i=!0,n=n||u.seriesLayoutBy,o==null&&(o=u.sourceHeader),s=s||u.dimensions}var h=zM(r,a,n,o,s);Dn(t).source=new Tr({data:r,fromDataset:i,seriesLayoutBy:n,sourceFormat:a,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function zM(t,e,r,a,i){if(!t)return{dimensionsDefine:My(i)};var n,o;if(e===Yo)a==="auto"||a==null?Iy(function(l){l!=null&&l!=="-"&&(Lt(l)?o==null&&(o=1):o=0)},r,t,10):o=a?1:0,!i&&o===1&&(i=[],Iy(function(l,u){i[u]=l??""},r,t)),n=i?i.length:r===hv?t.length:t[0]?t[0].length:null;else if(e===Xo)i||(i=BM(t));else if(e===qo)i||(i=[],M(t,function(l,u){i.push(u)}));else if(e===Si){var s=Io(t[0]);n=z(s)&&s.length||1}else e===Ko&&T&&gt(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:My(i),dimensionsDetectCount:n}}function My(t){if(!!t){var e=ht();return V(t,function(r,a){if(r=et({},lt(r)?r:{name:r}),r.name==null)return r;r.name+="",r.displayName==null&&(r.displayName=r.name);var i=e.get(r.name);return i?r.name+="-"+i.count++:e.set(r.name,{count:1}),r})}}function Iy(t,e,r,a){if(a==null&&(a=1/0),e===hv)for(var i=0;i<r.length&&i<a;i++)t(r[i]?r[i][0]:null,i);else for(var n=r[0]||[],i=0;i<n.length&&i<a;i++)t(n[i],i)}function BM(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r){var a=[];return M(r,function(i,n){a.push(n)}),a}}function Ly(t,e,r){var a={},i=cv(e);if(!i||!t)return a;var n=[],o=[],s=e.ecModel,l=Dn(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,h,f;t=t.slice(),M(t,function(g,p){!lt(g)&&(t[p]={name:g}),g.type==="ordinal"&&h==null&&(h=p,f=d(t[p])),a[g.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});M(t,function(g,p){var m=g.name,y=d(g);if(h==null){var _=c.valueWayDim;v(a[m],_,y),v(o,_,y),c.valueWayDim+=y}else if(h===p)v(a[m],0,y),v(n,0,y);else{var _=c.categoryWayDim;v(a[m],_,y),v(o,_,y),c.categoryWayDim+=y}});function v(g,p,m){for(var y=0;y<m;y++)g.push(p+y)}function d(g){var p=g.dimsDef;return p?p.length:1}return n.length&&(a.itemName=n),o.length&&(a.seriesName=o),a}function fv(t,e,r){var a={},i=cv(t);if(!i)return a;var n=e.sourceFormat,o=e.dimensionsDefine,s;(n===Xo||n===qo)&&M(o,function(h,f){(lt(h)?h.name:h)==="name"&&(s=f)});var l=function(){for(var h={},f={},c=[],v=0,d=Math.min(5,r);v<d;v++){var g=Py(e.data,n,e.seriesLayoutBy,o,e.startIndex,v);c.push(g);var p=g===Ae.Not;if(p&&h.v==null&&v!==s&&(h.v=v),(h.n==null||h.n===h.v||!p&&c[h.n]===Ae.Not)&&(h.n=v),m(h)&&c[h.n]!==Ae.Not)return h;p||(g===Ae.Might&&f.v==null&&v!==s&&(f.v=v),(f.n==null||f.n===f.v)&&(f.n=v))}function m(y){return y.v!=null&&y.n!=null}return m(h)?h:m(f)?f:null}();if(l){a.value=l.v;var u=s??l.n;a.itemName=[u],a.seriesName=[u]}return a}function cv(t){var e=t.option,r=e.data;if(!r)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function VM(t,e){return Py(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Py(t,e,r,a,i,n){var o,s=5;if(pr(t))return Ae.Not;var l,u;if(a){var h=a[n];lt(h)?(l=h.name,u=h.type):Lt(h)&&(l=h)}if(u!=null)return u==="ordinal"?Ae.Must:Ae.Not;if(e===Yo)if(r===hv){for(var f=t[n],c=0;c<(f||[]).length&&c<s;c++)if((o=p(f[i+c]))!=null)return o}else for(var c=0;c<t.length&&c<s;c++){var v=t[i+c];if(v&&(o=p(v[n]))!=null)return o}else if(e===Xo){if(!l)return Ae.Not;for(var c=0;c<t.length&&c<s;c++){var d=t[c];if(d&&(o=p(d[l]))!=null)return o}}else if(e===qo){if(!l)return Ae.Not;var f=t[l];if(!f||pr(f))return Ae.Not;for(var c=0;c<f.length&&c<s;c++)if((o=p(f[c]))!=null)return o}else if(e===Si)for(var c=0;c<t.length&&c<s;c++){var d=t[c],g=Io(d);if(!z(g))return Ae.Not;if((o=p(g[n]))!=null)return o}function p(m){var y=Lt(m);if(m!=null&&isFinite(m)&&m!=="")return y?Ae.Might:Ae.Not;if(y&&m!=="-")return Ae.Must}return Ae.Not}var vv="\0_ec_inner",dv=_t.extend({init:function(t,e,r,a){r=r||{},this.option=null,this._theme=new _t(r),this._optionManager=a},setOption:function(t,e){gt(!(vv in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,r=this._optionManager;if(!t||t==="recreate"){var a=r.mountOption(t==="recreate");!this.option||t==="recreate"?FM.call(this,a):(this.restoreData(),this.mergeOption(a)),e=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var i=r.getTimelineOption(this);i&&(this.mergeOption(i),e=!0)}if(!t||t==="recreate"||t==="media"){var n=r.getMediaOption(this,this._api);n.length&&M(n,function(o){this.mergeOption(o,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,r=this._componentsMap,a=[];kM(this),M(t,function(n,o){n!=null&&(wt.hasClass(o)?o&&a.push(o):e[o]=e[o]==null?rt(n):ut(e[o],n,!0))}),wt.topologicalTravel(a,wt.getAllClassMainTypes(),i,this);function i(n,o){var s=me(t[n]),l=Ic(r.get(n),s);g0(l),M(l,function(h,f){var c=h.option;lt(c)&&(h.keyInfo.mainType=n,h.keyInfo.subType=UM(n,c,h.exist))});var u=WM(r,o);e[n]=[],r.set(n,[]),M(l,function(h,f){var c=h.exist,v=h.option;if(gt(lt(v)||c,"Empty component definition"),!v)c.mergeOption({},this),c.optionUpdated({},!1);else{var d=wt.getClass(n,h.keyInfo.subType,!0);if(c&&c.constructor===d)c.name=h.keyInfo.name,c.mergeOption(v,this),c.optionUpdated(v,!1);else{var g=et({dependentModels:u,componentIndex:f},h.keyInfo);c=new d(v,this,this,g),et(c,g),c.init(v,this,this,g),c.optionUpdated(null,!0)}}r.get(n)[f]=c,e[n][f]=c.option},this),n==="series"&&gv(this,r.get("series"))}this._seriesIndicesMap=ht(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=rt(this.option);return M(t,function(e,r){if(wt.hasClass(r)){for(var e=me(e),a=e.length-1;a>=0;a--)El(e[a])&&e.splice(a,1);t[r]=e}}),delete t[vv],t},getTheme:function(){return this._theme},getComponent:function(t,e){var r=this._componentsMap.get(t);if(r)return r[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var r=t.index,a=t.id,i=t.name,n=this._componentsMap.get(e);if(!n||!n.length)return[];var o;if(r!=null)z(r)||(r=[r]),o=ee(V(r,function(u){return n[u]}),function(u){return!!u});else if(a!=null){var s=z(a);o=ee(n,function(u){return s&&yt(a,u.id)>=0||!s&&u.id===a})}else if(i!=null){var l=z(i);o=ee(n,function(u){return l&&yt(i,u.name)>=0||!l&&u.name===i})}else o=n.slice();return Ey(o,t)},findComponents:function(t){var e=t.query,r=t.mainType,a=n(e),i=a?this.queryComponents(a):this._componentsMap.get(r);return o(Ey(i,t));function n(s){var l=r+"Index",u=r+"Id",h=r+"Name";return s&&(s[l]!=null||s[u]!=null||s[h]!=null)?{mainType:r,index:s[l],id:s[u],name:s[h]}:null}function o(s){return t.filter?ee(s,t.filter):s}},eachComponent:function(t,e,r){var a=this._componentsMap;if(typeof t=="function")r=e,e=t,a.each(function(n,o){M(n,function(s,l){e.call(r,o,s,l)})});else if(Lt(t))M(a.get(t),e,r);else if(lt(t)){var i=this.findComponents(t);M(i,e,r)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return ee(e,function(r){return r.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return ee(e,function(r){return r.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){hu(this),M(this._seriesIndices,function(r){var a=this._componentsMap.get("series")[r];t.call(e,a,r)},this)},eachRawSeries:function(t,e){M(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,r){hu(this),M(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];i.subType===t&&e.call(r,i,a)},this)},eachRawSeriesByType:function(t,e,r){return M(this.getSeriesByType(t),e,r)},isSeriesFiltered:function(t){return hu(this),this._seriesIndicesMap.get(t.componentIndex)==null},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){hu(this);var r=ee(this._componentsMap.get("series"),t,e);gv(this,r)},restoreData:function(t){var e=this._componentsMap;gv(this,e.get("series"));var r=[];e.each(function(a,i){r.push(i)}),wt.topologicalTravel(r,wt.getAllClassMainTypes(),function(a,i){M(e.get(a),function(n){(a!=="series"||!GM(n,t))&&n.restoreData()})})}});function GM(t,e){if(e){var r=e.seiresIndex,a=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||a!=null&&t.id!==a||i!=null&&t.name!==i}}function HM(t,e){var r=t.color&&!t.colorLayer;M(e,function(a,i){i==="colorLayer"&&r||wt.hasClass(i)||(typeof a=="object"?t[i]=t[i]?ut(t[i],a,!1):rt(a):t[i]==null&&(t[i]=a))})}function FM(t){t=t,this.option={},this.option[vv]=1,this._componentsMap=ht({series:[]}),this._seriesIndices,this._seriesIndicesMap,HM(t,this._theme.option),ut(t,EM,!1),this.mergeOption(t)}function WM(t,e){z(e)||(e=e?[e]:[]);var r={};return M(e,function(a){r[a]=(t.get(a)||[]).slice()}),r}function UM(t,e,r){var a=e.type?e.type:r?r.subType:wt.determineSubType(t,e);return a}function gv(t,e){t._seriesIndicesMap=ht(t._seriesIndices=V(e,function(r){return r.componentIndex})||[])}function Ey(t,e){return e.hasOwnProperty("subType")?ee(t,function(r){return r.subType===e.subType}):t}function hu(t){if(T&&!t._seriesIndices)throw new Error("Option should contains series.")}Dt(dv,uv);var $M=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Ry(t){M($M,function(e){this[e]=it(t[e],t)},this)}var pv={};function _e(){this._coordinateSystems=[]}_e.prototype={constructor:_e,create:function(t,e){var r=[];M(pv,function(a,i){var n=a.create(t,e);r=r.concat(n||[])}),this._coordinateSystems=r},update:function(t,e){M(this._coordinateSystems,function(r){r.update&&r.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},_e.register=function(t,e){pv[t]=e},_e.get=function(t){return pv[t]};var fu=M,Ai=rt,cu=V,Oy=ut,ZM=/^(min|max)?(.+)$/;function mv(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}mv.prototype={constructor:mv,setOption:function(t,e){t&&M(me(t.series),function(i){i&&i.data&&pr(i.data)&&ff(i.data)}),t=Ai(t);var r=this._optionBackup,a=YM.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(jM(r.baseOption,a.baseOption),a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=cu(e.timelineOptions,Ai),this._mediaList=cu(e.mediaList,Ai),this._mediaDefault=Ai(e.mediaDefault),this._currentMediaIndices=[],Ai(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,r=this._timelineOptions;if(r.length){var a=t.getComponent("timeline");a&&(e=Ai(r[a.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,n=[],o=[];if(!a.length&&!i)return o;for(var s=0,l=a.length;s<l;s++)XM(a[s].query,e,r)&&n.push(s);return!n.length&&i&&(n=[-1]),n.length&&!KM(n,this._currentMediaIndices)&&(o=cu(n,function(u){return Ai(u===-1?i.option:a[u].option)})),this._currentMediaIndices=n,o}};function YM(t,e,r){var a=[],i=[],n,o,s=t.timeline;if(t.baseOption&&(o=t.baseOption),(s||t.options)&&(o=o||{},a=(t.options||[]).slice()),t.media){o=o||{};var l=t.media;fu(l,function(u){u&&u.option&&(u.query?i.push(u):n||(n=u))})}return o||(o=t),o.timeline||(o.timeline=s),fu([o].concat(a).concat(V(i,function(u){return u.option})),function(u){fu(e,function(h){h(u,r)})}),{baseOption:o,timelineOptions:a,mediaDefault:n,mediaList:i}}function XM(t,e,r){var a={width:e,height:r,aspectratio:e/r},i=!0;return M(t,function(n,o){var s=o.match(ZM);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();qM(a[u],n,l)||(i=!1)}}),i}function qM(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function KM(t,e){return t.join(",")===e.join(",")}function jM(t,e){e=e||{},fu(e,function(r,a){if(r!=null){var i=t[a];if(!wt.hasClass(a))t[a]=Oy(i,r,!0);else{r=me(r),i=me(i);var n=Ic(i,r);t[a]=cu(n,function(o){return o.option&&o.exist?Oy(o.exist,o.option,!0):o.exist||o.option})}}})}var Cr=M,jo=lt,Ny=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function yv(t){var e=t&&t.itemStyle;if(!!e)for(var r=0,a=Ny.length;r<a;r++){var i=Ny[r],n=e.normal,o=e.emphasis;n&&n[i]&&(t[i]=t[i]||{},t[i].normal?ut(t[i].normal,n[i]):t[i].normal=n[i],n[i]=null),o&&o[i]&&(t[i]=t[i]||{},t[i].emphasis?ut(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function Te(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var a=t[e].normal,i=t[e].emphasis;a&&(r?(t[e].normal=t[e].emphasis=null,J(t[e],a)):t[e]=a),i&&(t.emphasis=t.emphasis||{},t.emphasis[e]=i)}}function Qo(t){Te(t,"itemStyle"),Te(t,"lineStyle"),Te(t,"areaStyle"),Te(t,"label"),Te(t,"labelLine"),Te(t,"upperLabel"),Te(t,"edgeLabel")}function Kt(t,e){var r=jo(t)&&t[e],a=jo(r)&&r.textStyle;if(a)for(var i=0,n=d0.length;i<n;i++){var e=d0[i];a.hasOwnProperty(e)&&(r[e]=a[e])}}function sr(t){t&&(Qo(t),Kt(t,"label"),t.emphasis&&Kt(t.emphasis,"label"))}function QM(t){if(!!jo(t)){yv(t),Qo(t),Kt(t,"label"),Kt(t,"upperLabel"),Kt(t,"edgeLabel"),t.emphasis&&(Kt(t.emphasis,"label"),Kt(t.emphasis,"upperLabel"),Kt(t.emphasis,"edgeLabel"));var n=t.markPoint;n&&(yv(n),sr(n));var s=t.markLine;s&&(yv(s),sr(s));var e=t.markArea;e&&sr(e);var r=t.data;if(t.type==="graph"){r=r||t.nodes;var a=t.links||t.edges;if(a&&!pr(a))for(var i=0;i<a.length;i++)sr(a[i]);M(t.categories,function(u){Qo(u)})}if(r&&!pr(r))for(var i=0;i<r.length;i++)sr(r[i]);var n=t.markPoint;if(n&&n.data)for(var o=n.data,i=0;i<o.length;i++)sr(o[i]);var s=t.markLine;if(s&&s.data)for(var l=s.data,i=0;i<l.length;i++)z(l[i])?(sr(l[i][0]),sr(l[i][1])):sr(l[i]);t.type==="gauge"?(Kt(t,"axisLabel"),Kt(t,"title"),Kt(t,"detail")):t.type==="treemap"?(Te(t.breadcrumb,"itemStyle"),M(t.levels,function(u){Qo(u)})):t.type==="tree"&&Qo(t.leaves)}}function la(t){return z(t)?t:t?[t]:[]}function ky(t){return(z(t)?t[0]:t)||{}}var JM=function(t,e){Cr(la(t.series),function(a){jo(a)&&QM(a)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Cr(r,function(a){Cr(la(t[a]),function(i){i&&(Kt(i,"axisLabel"),Kt(i.axisPointer,"label"))})}),Cr(la(t.parallel),function(a){var i=a&&a.parallelAxisDefault;Kt(i,"axisLabel"),Kt(i&&i.axisPointer,"label")}),Cr(la(t.calendar),function(a){Te(a,"itemStyle"),Kt(a,"dayLabel"),Kt(a,"monthLabel"),Kt(a,"yearLabel")}),Cr(la(t.radar),function(a){Kt(a,"name")}),Cr(la(t.geo),function(a){jo(a)&&(sr(a),Cr(la(a.regions),function(i){sr(i)}))}),Cr(la(t.timeline),function(a){sr(a),Te(a,"label"),Te(a,"itemStyle"),Te(a,"controlStyle",!0);var i=a.data;z(i)&&M(i,function(n){lt(n)&&(Te(n,"label"),Te(n,"itemStyle"))})}),Cr(la(t.toolbox),function(a){Te(a,"iconStyle"),Cr(a.feature,function(i){Te(i,"iconStyle")})}),Kt(ky(t.axisPointer),"label"),Kt(ky(t.tooltip).axisPointer,"label")};function tI(t,e){e=e.split(",");for(var r=t,a=0;a<e.length&&(r=r&&r[e[a]],r!=null);a++);return r}function eI(t,e,r,a){e=e.split(",");for(var i=t,n,o=0;o<e.length-1;o++)n=e[o],i[n]==null&&(i[n]={}),i=i[n];(a||i[e[o]]==null)&&(i[e[o]]=r)}function zy(t){M(rI,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var rI=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],aI=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],By=function(t,e){JM(t,e),t.series=me(t.series),M(t.series,function(r){if(!!lt(r)){var a=r.type;if(a==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow);else if(a==="pie"||a==="gauge")r.clockWise!=null&&(r.clockwise=r.clockWise);else if(a==="gauge"){var i=tI(r,"pointer.color");i!=null&&eI(r,"itemStyle.color",i)}zy(r)}}),t.dataRange&&(t.visualMap=t.dataRange),M(aI,function(r){var a=t[r];a&&(z(a)||(a=[a]),M(a,function(i){zy(i)}))})},iI=function(t){var e=ht();t.eachSeries(function(r){var a=r.get("stack");if(a){var i=e.get(a)||e.set(a,[]),n=r.getData(),o={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&n.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(nI)};function nI(t){M(t,function(e,r){var a=[],i=[NaN,NaN],n=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(n,function(u,h,f){var c=o.get(e.stackedDimension,f);if(isNaN(c))return i;var v,d;s?d=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var g=NaN,p=r-1;p>=0;p--){var m=t[p];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(c>=0&&y>0||c<=0&&y<0){c+=y,g=y;break}}}return a[0]=c,a[1]=g,a});o.hostModel.setData(l),e.data=l})}function Vy(t,e){Tr.isInstance(t)||(t=Tr.seriesDataToSource(t)),this._source=t;var r=this._data=t.data,a=t.sourceFormat;if(a===Ko){if(T&&e==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=r}var i=oI[a===Yo?a+"_"+t.seriesLayoutBy:a];T&&gt(i,"Invalide sourceFormat: "+a),et(this,i)}var _v=Vy.prototype;_v.pure=!1,_v.persistent=!0,_v.getSource=function(){return this._source};var oI={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:xv},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],r=this._data,a=0;a<r.length;a++){var i=r[a];e.push(i?i[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Gy,getItem:Hy,appendData:xv},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],r=this._source.dimensionsDefine,a=0;a<r.length;a++){var i=this._data[r[a].name];e.push(i?i[t]:null)}return e},appendData:function(t){var e=this._data;M(t,function(r,a){for(var i=e[a]||(e[a]=[]),n=0;n<(r||[]).length;n++)i.push(r[n])})}},original:{count:Gy,getItem:Hy,appendData:xv},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t=t-this._offset,e=e||[];for(var r=this._dimSize*t,a=0;a<this._dimSize;a++)e[a]=this._data[r+a];return e},appendData:function(t){T&&gt(pr(t),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function Gy(){return this._data.length}function Hy(t){return this._data[t]}function xv(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var sI={arrayRows:wv,objectRows:function(t,e,r,a){return r!=null?t[a]:t},keyedColumns:wv,original:function(t,e,r,a){var i=Io(t);return r==null||!(i instanceof Array)?i:i[r]},typedArray:wv};function wv(t,e,r,a){return r!=null?t[r]:t}var Fy={arrayRows:Wy,objectRows:function(t,e,r,a){return bv(t[e],this._dimensionInfos[e])},keyedColumns:Wy,original:function(t,e,r,a){var i=t&&(t.value==null?t:t.value);return!this._rawData.pure&&hD(t)&&(this.hasItemOption=!0),bv(i instanceof Array?i[a]:i,this._dimensionInfos[e])},typedArray:function(t,e,r,a){return t[a]}};function Wy(t,e,r,a){return bv(t[a],this._dimensionInfos[e])}function bv(t,e){var r=e&&e.type;if(r==="ordinal"){var a=e&&e.ordinalMeta;return a?a.parseAndCollect(t):t}return r==="time"&&typeof t!="number"&&t!=null&&t!=="-"&&(t=+$o(t)),t==null||t===""?NaN:+t}function Ti(t,e,r){if(!!t){var a=t.getRawDataItem(e);if(a!=null){var i=t.getProvider().getSource().sourceFormat,n,o,s=t.getDimensionInfo(r);return s&&(n=s.name,o=s.index),sI[i](a,e,o,n)}}}function Uy(t,e,r){if(!!t){var a=t.getProvider().getSource().sourceFormat;if(!(a!==Si&&a!==Xo)){var i=t.getRawDataItem(e);if(a===Si&&!lt(i)&&(i=null),i)return i[r]}}}var lI=/\{@(.+?)\}/g,Sv={getDataParams:function(t,e){var r=this.getData(e),a=this.getRawValue(t,e),i=r.getRawIndex(t),n=r.getName(t),o=r.getRawDataItem(t),s=r.getItemVisual(t,"color"),l=r.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),f=m0(h),c=this.mainType,v=c==="series",d=r.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:v?this.subType:null,seriesIndex:this.seriesIndex,seriesId:v?this.id:null,seriesName:v?this.name:null,name:n,dataIndex:i,data:o,dataType:e,value:a,color:s,borderColor:l,dimensionNames:d?d.dimensionNames:null,encode:d?d.encode:null,marker:ou({color:s,renderMode:f}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,r,a,i){e=e||"normal";var n=this.getData(r),o=n.getItemModel(t),s=this.getDataParams(t,r);a!=null&&s.value instanceof Array&&(s.value=s.value[a]);var l=o.get(e==="normal"?[i||"label","formatter"]:[e,i||"label","formatter"]);if(typeof l=="function")return s.status=e,s.dimensionIndex=a,l(s);if(typeof l=="string"){var u=nv(l,s);return u.replace(lI,function(h,f){var c=f.length;return f.charAt(0)==="["&&f.charAt(c-1)==="]"&&(f=+f.slice(1,c-1)),Ti(n,t,f)})}},getRawValue:function(t,e){return Ti(this.getData(e),t)},formatTooltip:function(){}};function Jo(t){return new $y(t)}function $y(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var Ba=$y.prototype;Ba.perform=function(t){var e=this._upstream,r=t&&t.skip;if(this._dirty&&e){var a=this.context;a.data=a.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!r&&(i=this._plan(this.context));var n=u(this._modBy),o=this._modDataCount||0,s=u(t&&t.modBy),l=t&&t.modDataCount||0;(n!==s||o!==l)&&(i="reset");function u(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=uI(this,r)),this._modBy=s,this._modDataCount=l;var f=t&&t.step;if(e?(T&&gt(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(T&&gt(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var c=this._dueIndex,v=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!r&&(h||c<v)){var d=this._progress;if(z(d))for(var g=0;g<d.length;g++)Yy(this,d[g],c,v,s,l);else Yy(this,d,c,v,s,l)}this._dueIndex=v;var p=this._settedOutputEnd!=null?this._settedOutputEnd:v;T&&gt(p>=this._outputDueEnd),this._outputDueEnd=p}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Zy=function(){var t,e,r,a,i,n={reset:function(l,u,h,f){e=l,t=u,r=h,a=f,i=Math.ceil(a/r),n.next=r>1&&a>0?s:o}};return n;function o(){return e<t?e++:null}function s(){var l=e%i*r+Math.ceil(e/i),u=e>=t?null:l<a?l:e;return e++,u}}();Ba.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)};function Yy(t,e,r,a,i,n){Zy.reset(r,a,i,n),t._callingProgress=e,t._callingProgress({start:r,end:a,count:a-r,next:Zy.next},t.context)}function uI(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var r,a;!e&&t._reset&&(r=t._reset(t.context),r&&r.progress&&(a=r.forceFirstProgress,r=r.progress),z(r)&&!r.length&&(r=null)),t._progress=r,t._modBy=t._modDataCount=null;var i=t._downstream;return i&&i.dirty(),a}Ba.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Ba.pipe=function(t){T&&gt(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},Ba.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Ba.getUpstream=function(){return this._upstream},Ba.getDownstream=function(){return this._downstream},Ba.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var ts=Pe(),Vt=wt.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,r,a){this.seriesIndex=this.componentIndex,this.dataTask=Jo({count:fI,reset:cI}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,r),Dy(this);var i=this.getInitialData(t,r);qy(i,this),this.dataTask.context.data=i,T&&gt(i,"getInitialData returned invalid data."),ts(this).dataBeforeProcessed=i,Xy(this)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode,a=r?Cn(t):{},i=this.subType;wt.hasClass(i)&&(i+="Series"),ut(t,e.getTheme().get(this.subType)),ut(t,this.getDefaultOption()),fi(t,"label",["show"]),this.fillDataTextStyle(t.data),r&&za(t,a,r)},mergeOption:function(t,e){t=ut(this.option,t,!0),this.fillDataTextStyle(t.data);var r=this.layoutMode;r&&za(this.option,t,r),Dy(this);var a=this.getInitialData(t,e);qy(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,ts(this).dataBeforeProcessed=a,Xy(this)},fillDataTextStyle:function(t){if(t&&!pr(t))for(var e=["show"],r=0;r<t.length;r++)t[r]&&t[r].label&&fi(t[r],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=Av(this);if(e){var r=e.context.data;return t==null?r:r.getLinkedData(t)}else return ts(this).data},setData:function(t){var e=Av(this);if(e){var r=e.context;r.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),r.outputData=t,e!==this.dataTask&&(r.data=t)}ts(this).data=t},getSource:function(){return NM(this)},getRawData:function(){return ts(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,r,a){var i=this;a=a||"html";var n=a==="html"?"<br/>":`
`,o=a==="richText",s={},l=0;function u(I){var L=an(I,function(W,$,X){var K=f.getDimensionInfo(X);return W|=K&&K.tooltip!==!1&&K.displayName!=null},0),P=[];c.length?M(c,function(W){R(Ti(f,t,W),W)}):M(I,R);function R(W,$){var X=f.getDimensionInfo($);if(!(!X||X.otherDims.tooltip===!1)){var K=X.type,Q="sub"+i.seriesIndex+"at"+l,j=ou({color:p,type:"subItem",renderMode:a,markerId:Q}),U=typeof j=="string"?j:j.content,tt=(L?U+kt(X.displayName||"-")+": ":"")+kt(K==="ordinal"?W+"":K==="time"?e?"":ov("yyyy/MM/dd hh:mm:ss",W):ka(W));tt&&P.push(tt),o&&(s[Q]=p,++l)}}var E=L?o?`
`:"<br/>":"",Z=E+P.join(E||", ");return{renderMode:a,content:Z,style:s}}function h(I){return{renderMode:a,content:kt(ka(I)),style:s}}var f=this.getData(),c=f.mapDimension("defaultedTooltip",!0),v=c.length,d=this.getRawValue(t),g=z(d),p=f.getItemVisual(t,"color");lt(p)&&p.colorStops&&(p=(p.colorStops[0]||{}).color),p=p||"transparent";var m=v>1||g&&!v?u(d):h(v?Ti(f,t,c[0]):g?d[0]:d),y=m.content,_=i.seriesIndex+"at"+l,w=ou({color:p,type:"item",renderMode:a,markerId:_});s[_]=p,++l;var b=f.getName(t),A=this.name;Lc(this)||(A=""),A=A?kt(A)+(e?": ":n):"";var S=typeof w=="string"?w:w.content,D=e?S+A+y:A+S+(b?kt(b)+": "+y:y);return{html:D,markers:s}},isAnimationEnabled:function(){if(G.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,r){var a=this.ecModel,i=uv.getColorFromPalette.call(this,t,e,r);return i||(i=a.getColorFromPalette(t,e,r)),i},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});Dt(Vt,Sv),Dt(Vt,uv);function Xy(t){var e=t.name;Lc(t)||(t.name=hI(t)||e)}function hI(t){var e=t.getRawData(),r=e.mapDimension("seriesName",!0),a=[];return M(r,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function fI(t){return t.model.getRawData().count()}function cI(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),vI}function vI(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function qy(t,e){M(t.CHANGABLE_METHODS,function(r){t.wrapMethod(r,ot(dI,e))})}function dI(t){var e=Av(t);e&&e.setOutputEnd(this.count())}function Av(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var a=r.currentTask;if(a){var i=a.agentStubMap;i&&(a=i.get(t.uid))}return a}}var Fr=function(){this.group=new q,this.uid=Wo("viewComponent")};Fr.prototype={constructor:Fr,init:function(t,e){},render:function(t,e,r,a){},dispose:function(){},filterForExposedEvent:null};var Tv=Fr.prototype;Tv.updateView=Tv.updateLayout=Tv.updateVisual=function(t,e,r,a){},Lo(Fr),kl(Fr,{registerWhenExtend:!0});var Mn=function(){var t=Pe();return function(e){var r=t(e),a=e.pipelineContext,i=r.large,n=r.progressiveRender,o=r.large=a&&a.large,s=r.progressiveRender=a&&a.progressiveRender;return!!(i^o||n^s)&&"reset"}},Ky=Pe(),gI=Mn();function ue(){this.group=new q,this.uid=Wo("viewChart"),this.renderTask=Jo({plan:pI,reset:mI}),this.renderTask.context={view:this}}ue.prototype={type:"chart",init:function(t,e){},render:function(t,e,r,a){},highlight:function(t,e,r,a){jy(t.getData(),a,"emphasis")},downplay:function(t,e,r,a){jy(t.getData(),a,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var Cv=ue.prototype;Cv.updateView=Cv.updateLayout=Cv.updateVisual=function(t,e,r,a){this.render(t,e,r,a)};function Dv(t,e,r){if(t&&(t.trigger(e,r),t.isGroup&&!tu(t)))for(var a=0,i=t.childCount();a<i;a++)Dv(t.childAt(a),e,r)}function jy(t,e,r){var a=Rl(t,e),i=e&&e.highlightKey!=null?ny(e.highlightKey):null;a!=null?M(me(a),function(n){Dv(t.getItemGraphicEl(n),r,i)}):t.eachItemGraphicEl(function(n){Dv(n,r,i)})}Lo(ue,["dispose"]),kl(ue,{registerWhenExtend:!0}),ue.markUpdateMethod=function(t,e){Ky(t).updateMethod=e};function pI(t){return gI(t.model)}function mI(t){var e=t.model,r=t.ecModel,a=t.api,i=t.payload,n=e.pipelineContext.progressiveRender,o=t.view,s=i&&Ky(i).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,a,i),yI[l]}var yI={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},vu="\0__throttleOriginMethod",Qy="\0__throttleRate",Jy="\0__throttleType";function du(t,e,r){var a,i=0,n=0,o=null,s,l,u,h;e=e||0;function f(){n=new Date().getTime(),o=null,t.apply(l,u||[])}var c=function(){a=new Date().getTime(),l=this,u=arguments;var v=h||e,d=h||r;h=null,s=a-(d?i:n)-v,clearTimeout(o),d?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),i=a};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){h=v},c}function es(t,e,r,a){var i=t[e];if(!!i){var n=i[vu]||i,o=i[Jy],s=i[Qy];if(s!==r||o!==a){if(r==null||!a)return t[e]=n;i=t[e]=du(n,r,a==="debounce"),i[vu]=n,i[Jy]=a,i[Qy]=r}return i}}function t_(t,e){var r=t[e];r&&r[vu]&&(t[e]=r[vu])}var _I={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),a=(t.visualColorAccessPath||"itemStyle.color").split("."),i=t.get(a),n=se(i)&&!(i instanceof Vr)?i:null;(!i||n)&&(i=t.getColorFromPalette(t.name,null,e.getSeriesCount())),r.setVisual("color",i);var o=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(o);if(r.setVisual("borderColor",s),!e.isSeriesFiltered(t)){n&&r.each(function(u){r.setItemVisual(u,"color",n(t.getDataParams(u)))});var l=function(u,h){var f=u.getItemModel(h),c=f.get(a,!0),v=f.get(o,!0);c!=null&&u.setItemVisual(h,"color",c),v!=null&&u.setItemVisual(h,"borderColor",v)};return{dataEach:r.hasItemOption?l:null}}}},ua={legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}},xI=function(t,e){var r=e.getModel("aria");if(r.get("show")){if(r.get("description")){t.setAttribute("aria-label",r.get("description"));return}}else return;var a=0;e.eachSeries(function(g,p){++a},this);var i=r.get("data.maxCount")||10,n=r.get("series.maxCount")||10,o=Math.min(a,n),s;if(a<1)return;var l=v();l?s=f(c("general.withTitle"),{title:l}):s=c("general.withoutTitle");var u=[],h=a>1?"series.multiple.prefix":"series.single.prefix";s+=f(c(h),{seriesCount:a}),e.eachSeries(function(g,p){if(p<o){var m,y=g.get("name"),_="series."+(a>1?"multiple":"single")+".";m=c(y?_+"withName":_+"withoutName"),m=f(m,{seriesId:g.seriesIndex,seriesName:g.get("name"),seriesType:d(g.subType)});var w=g.getData();window.data=w,w.count()>i?m+=f(c("data.partialData"),{displayCnt:i}):m+=c("data.allData");for(var b=[],A=0;A<w.count();A++)if(A<i){var S=w.getName(A),D=Ti(w,A);b.push(f(c(S?"data.withName":"data.withoutName"),{name:S,value:D}))}m+=b.join(c("data.separator.middle"))+c("data.separator.end"),u.push(m)}}),s+=u.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),t.setAttribute("aria-label",s);function f(g,p){if(typeof g!="string")return g;var m=g;return M(p,function(y,_){m=m.replace(new RegExp("\\{\\s*"+_+"\\s*\\}","g"),y)}),m}function c(g){var p=r.get(g);if(p==null){for(var m=g.split("."),y=ua.aria,_=0;_<m.length;++_)y=y[m[_]];return y}else return p}function v(){var g=e.getModel("title").option;return g&&g.length&&(g=g[0]),g&&g.text}function d(g){return ua.series.typeNames[g]||"\u81EA\u5B9A\u4E49\u56FE"}},gu=Math.PI,wI=function(t,e){e=e||{},J(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new q,a=new xt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(a);var i=e.fontSize+" sans-serif",n=new xt({style:{fill:"none",text:e.text,font:i,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(r.add(n),e.showSpinner){var o=new Fc({shape:{startAngle:-gu/2,endAngle:-gu/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:gu*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:gu*3/2}).delay(300).start("circularInOut"),r.add(o)}return r.resize=function(){var s=er(e.text,i),l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner?0:s/2),h=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:h}),n.setShape({x:u-l,y:h-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r};function pu(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=ht()}var lr=pu.prototype;lr.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(r){var a=r.overallTask;a&&a.dirty()})},lr.getPerformArgs=function(t,e){if(!!t.__pipeline){var r=this._pipelineMap.get(t.__pipeline.id),a=r.context,i=!e&&r.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>r.blockIndex,n=i?r.step:null,o=a&&a.modDataCount,s=o!=null?Math.ceil(o/n):null;return{step:n,modBy:s,modDataCount:o}}},lr.getPipeline=function(t){return this._pipelineMap.get(t)},lr.updateStreamModes=function(t,e){var r=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),n=r.progressiveEnabled&&e.incrementalPrepareRender&&i>=r.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),s=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=r.context={progressiveRender:n,modDataCount:s,large:o}},lr.restorePipelines=function(t){var e=this,r=e._pipelineMap=ht();t.eachSeries(function(a){var i=a.getProgressive(),n=a.uid;r.set(n,{id:n,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),mu(e,a,a.dataTask)})},lr.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),r=this.api;M(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,[]);a.reset&&bI(this,a,i,e,r),a.overallReset&&SI(this,a,i,e,r)},this)},lr.prepareView=function(t,e,r,a){var i=t.renderTask,n=i.context;n.model=e,n.ecModel=r,n.api=a,i.__block=!t.incrementalPrepareRender,mu(this,e,i)},lr.performDataProcessorTasks=function(t,e){e_(this,this._dataProcessorHandlers,t,e,{block:!0})},lr.performVisualTasks=function(t,e,r){e_(this,this._visualHandlers,t,e,r)};function e_(t,e,r,a,i){i=i||{};var n;M(e,function(s,l){if(!(i.visualType&&i.visualType!==s.visualType)){var u=t._stageTaskMap.get(s.uid),h=u.seriesTaskMap,f=u.overallTask;if(f){var c,v=f.agentStubMap;v.each(function(g){o(i,g)&&(g.dirty(),c=!0)}),c&&f.dirty(),r_(f,a);var d=t.getPerformArgs(f,i.block);v.each(function(g){g.perform(d)}),n|=f.perform(d)}else h&&h.each(function(g,p){o(i,g)&&g.dirty();var m=t.getPerformArgs(g,i.block);m.skip=!s.performRawSeries&&r.isSeriesFiltered(g.context.model),r_(g,a),n|=g.perform(m)})}});function o(s,l){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(l.__pipeline.id))}t.unfinished|=n}lr.performSeriesTasks=function(t){var e;t.eachSeries(function(r){e|=r.dataTask.perform()}),this.unfinished|=e},lr.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var r_=lr.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)};function bI(t,e,r,a,i){var n=r.seriesTaskMap||(r.seriesTaskMap=ht()),o=e.seriesType,s=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(l):o?a.eachRawSeriesByType(o,l):s&&s(a,i).each(l);function l(h){var f=h.uid,c=n.get(f)||n.set(f,Jo({plan:MI,reset:II,count:PI}));c.context={model:h,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},mu(t,h,c)}var u=t._pipelineMap;n.each(function(h,f){u.get(f)||(h.dispose(),n.removeKey(f))})}function SI(t,e,r,a,i){var n=r.overallTask=r.overallTask||Jo({reset:AI});n.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:t};var o=n.agentStubMap=n.agentStubMap||ht(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?a.eachRawSeriesByType(s,f):l?l(a,i).each(f):(u=!1,M(a.getSeries(),f));function f(v){var d=v.uid,g=o.get(d);g||(g=o.set(d,Jo({reset:TI,onDirty:DI})),n.dirty()),g.context={model:v,overallProgress:u,modifyOutputEnd:h},g.agent=n,g.__block=u,mu(t,v,g)}var c=t._pipelineMap;o.each(function(v,d){c.get(d)||(v.dispose(),n.dirty(),o.removeKey(d))})}function AI(t){t.overallReset(t.ecModel,t.api,t.payload)}function TI(t,e){return t.overallProgress&&CI}function CI(){this.agent.dirty(),this.getDownstream().dirty()}function DI(){this.agent&&this.agent.dirty()}function MI(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function II(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=me(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?V(e,function(r,a){return a_(a)}):LI}var LI=a_(0);function a_(t){return function(e,r){var a=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var n=e.start;n<e.end;n++)i.dataEach(a,n);else i&&i.progress&&i.progress(e,a)}}function PI(t){return t.data.count()}function mu(t,e,r){var a=e.uid,i=t._pipelineMap.get(a);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i}pu.wrapStageHandler=function(t,e){return se(t)&&(t={overallReset:t,seriesType:EI(t)}),t.uid=Wo("stageHandler"),e&&(t.visualType=e),t};function EI(t){yu=null;try{t(rs,i_)}catch{}return yu}var rs={},i_={},yu;n_(rs,dv),n_(i_,Ry),rs.eachSeriesByType=rs.eachRawSeriesByType=function(t){yu=t},rs.eachComponent=function(t){t.mainType==="series"&&t.subType&&(yu=t.subType)};function n_(t,e){for(var r in e.prototype)t[r]=ce}var o_=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],RI={color:o_,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],o_]},xe="#eee",_u=function(){return{axisLine:{lineStyle:{color:xe}},axisTick:{lineStyle:{color:xe}},axisLabel:{textStyle:{color:xe}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:xe}}}},Mv=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],s_={color:Mv,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:xe},crossStyle:{color:xe},label:{color:"#000"}}},legend:{textStyle:{color:xe}},textStyle:{color:xe},title:{textStyle:{color:xe}},toolbox:{iconStyle:{normal:{borderColor:xe}}},dataZoom:{textStyle:{color:xe}},visualMap:{textStyle:{color:xe}},timeline:{lineStyle:{color:xe},itemStyle:{normal:{color:Mv[1]}},label:{normal:{textStyle:{color:xe}}},controlStyle:{normal:{color:xe,borderColor:xe}}},timeAxis:_u(),logAxis:_u(),valueAxis:_u(),categoryAxis:_u(),line:{symbol:"circle"},graph:{color:Mv},gauge:{title:{textStyle:{color:xe}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};s_.categoryAxis.splitLine.show=!1,wt.extend({type:"dataset",defaultOption:{seriesLayoutBy:Cy,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){OM(this)}}),Fr.extend({type:"dataset"});var OI=pt.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var r=.5522848,a=e.cx,i=e.cy,n=e.rx,o=e.ry,s=n*r,l=o*r;t.moveTo(a-n,i),t.bezierCurveTo(a-n,i-l,a-s,i-o,a,i-o),t.bezierCurveTo(a+s,i-o,a+n,i-l,a+n,i),t.bezierCurveTo(a+n,i+l,a+s,i+o,a,i+o),t.bezierCurveTo(a-s,i+o,a-n,i+l,a-n,i),t.closePath()}}),Va=/[\s,]+/;function l_(t){if(Lt(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}function xu(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}xu.prototype.parse=function(t,e){e=e||{};var r=l_(t);if(!r)throw new Error("Illegal svg");var a=new q;this._root=a;var i=r.getAttribute("viewBox")||"",n=parseFloat(r.getAttribute("width")||e.width),o=parseFloat(r.getAttribute("height")||e.height);isNaN(n)&&(n=null),isNaN(o)&&(o=null),We(r,a,null,!0);for(var s=r.firstChild;s;)this._parseNode(s,a),s=s.nextSibling;var l,u;if(i){var h=tr(i).split(Va);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&n!=null&&o!=null&&(u=c_(l,n,o),!e.ignoreViewBox)){var f=a;a=new q,a.add(f),f.scale=u.scale.slice(),f.position=u.position.slice()}return!e.ignoreRootClip&&n!=null&&o!=null&&a.setClipPath(new xt({shape:{x:0,y:0,width:n,height:o}})),{root:a,width:n,height:o,viewBoxRect:l,viewBoxTransform:u}},xu.prototype._parseNode=function(t,e){var r=t.nodeName.toLowerCase();r==="defs"?this._isDefine=!0:r==="text"&&(this._isText=!0);var a;if(this._isDefine){var i=kI[r];if(i){var n=i.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=n)}}else{var i=NI[r];i&&(a=i.call(this,t,e),e.add(a))}for(var s=t.firstChild;s;)s.nodeType===1&&this._parseNode(s,a),s.nodeType===3&&this._isText&&this._parseText(s,a),s=s.nextSibling;r==="defs"?this._isDefine=!1:r==="text"&&(this._isText=!1)},xu.prototype._parseText=function(t,e){if(t.nodeType===1){var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX+=parseFloat(r),this._textY+=parseFloat(a)}var i=new dt({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});ur(e,i),We(t,i,this._defs);var n=i.style.fontSize;n&&n<9&&(i.style.fontSize=9,i.scale=i.scale||[1,1],i.scale[0]*=n/9,i.scale[1]*=n/9);var o=i.getBoundingRect();return this._textX+=o.width,e.add(i),i};var NI={g:function(t,e){var r=new q;return ur(e,r),We(t,r,this._defs),r},rect:function(t,e){var r=new xt;return ur(e,r),We(t,r,this._defs),r.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),r},circle:function(t,e){var r=new Br;return ur(e,r),We(t,r,this._defs),r.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),r},line:function(t,e){var r=new ye;return ur(e,r),We(t,r,this._defs),r.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),r},ellipse:function(t,e){var r=new OI;return ur(e,r),We(t,r,this._defs),r.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),r},polygon:function(t,e){var r=t.getAttribute("points");r&&(r=u_(r));var a=new Ge({shape:{points:r||[]}});return ur(e,a),We(t,a,this._defs),a},polyline:function(t,e){var r=new pt;ur(e,r),We(t,r,this._defs);var a=t.getAttribute("points");a&&(a=u_(a));var i=new ir({shape:{points:a||[]}});return i},image:function(t,e){var r=new ve;return ur(e,r),We(t,r,this._defs),r.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),r},text:function(t,e){var r=t.getAttribute("x")||0,a=t.getAttribute("y")||0,i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX=parseFloat(r)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(n);var o=new q;return ur(e,o),We(t,o,this._defs),o},tspan:function(t,e){var r=t.getAttribute("x"),a=t.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),a!=null&&(this._textY=parseFloat(a));var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0,o=new q;return ur(e,o),We(t,o,this._defs),this._textX+=i,this._textY+=n,o},path:function(t,e){var r=t.getAttribute("d")||"",a=V0(r);return ur(e,a),We(t,a,this._defs),a}},kI={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),r=parseInt(t.getAttribute("y1")||0,10),a=parseInt(t.getAttribute("x2")||10,10),i=parseInt(t.getAttribute("y2")||0,10),n=new pi(e,r,a,i);return zI(t,n),n},radialgradient:function(t){}};function zI(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1){var a=r.getAttribute("offset");a.indexOf("%")>0?a=parseInt(a,10)/100:a?a=parseFloat(a):a=0;var i=r.getAttribute("stop-color")||"#000000";e.addColorStop(a,i)}r=r.nextSibling}}function ur(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),J(e.__inheritedStyle,t.__inheritedStyle))}function u_(t){for(var e=tr(t).split(Va),r=[],a=0;a<e.length;a+=2){var i=parseFloat(e[a]),n=parseFloat(e[a+1]);r.push([i,n])}return r}var In={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-align":"textAlign","alignment-baseline":"textBaseline"};function We(t,e,r,a){var i=e.__inheritedStyle||{},n=e.type==="text";if(t.nodeType===1&&(GI(t,e),et(i,HI(t)),!a)){for(var o in In)if(In.hasOwnProperty(o)){var s=t.getAttribute(o);s!=null&&(i[In[o]]=s)}}var l=n?"textFill":"fill",u=n?"textStroke":"stroke";e.style=e.style||new Da;var h=e.style;i.fill!=null&&h.set(l,h_(i.fill,r)),i.stroke!=null&&h.set(u,h_(i.stroke,r)),M(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(f){var c=f==="lineWidth"&&n?"textStrokeWidth":f;i[f]!=null&&h.set(c,parseFloat(i[f]))}),(!i.textBaseline||i.textBaseline==="auto")&&(i.textBaseline="alphabetic"),i.textBaseline==="alphabetic"&&(i.textBaseline="bottom"),i.textAlign==="start"&&(i.textAlign="left"),i.textAlign==="end"&&(i.textAlign="right"),M(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(f){i[f]!=null&&h.set(f,i[f])}),i.lineDash&&(e.style.lineDash=tr(i.lineDash).split(Va)),h[u]&&h[u]!=="none"&&(e[u]=!0),e.__inheritedStyle=i}var BI=/url\(\s*#(.*?)\)/;function h_(t,e){var r=e&&t&&t.match(BI);if(r){var a=tr(r[1]),i=e[a];return i}return t}var VI=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function GI(t,e){var r=t.getAttribute("transform");if(r){r=r.replace(/,/g," ");var a=null,i=[];r.replace(VI,function(l,u,h){i.push(u,h)});for(var n=i.length-1;n>0;n-=2){var o=i[n],s=i[n-1];switch(a=a||Ie(),s){case"translate":o=tr(o).split(Va),yr(a,a,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=tr(o).split(Va),wo(a,a,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=tr(o).split(Va),aa(a,a,parseFloat(o[0]));break;case"skew":o=tr(o).split(Va),console.warn("Skew transform is not supported yet");break;case"matrix":var o=tr(o).split(Va);a[0]=parseFloat(o[0]),a[1]=parseFloat(o[1]),a[2]=parseFloat(o[2]),a[3]=parseFloat(o[3]),a[4]=parseFloat(o[4]),a[5]=parseFloat(o[5]);break}}e.setLocalTransform(a)}}var f_=/([^\s:;]+)\s*:\s*([^:;]+)/g;function HI(t){var e=t.getAttribute("style"),r={};if(!e)return r;var a={};f_.lastIndex=0;for(var i;(i=f_.exec(e))!=null;)a[i[1]]=i[2];for(var n in In)In.hasOwnProperty(n)&&a[n]!=null&&(r[In[n]]=a[n]);return r}function c_(t,e,r){var a=e/t.width,i=r/t.height,n=Math.min(a,i),o=[n,n],s=[-(t.x+t.width/2)*n+e/2,-(t.y+t.height/2)*n+r/2];return{scale:o,position:s}}function FI(t,e){var r=new xu;return r.parse(t,e)}var v_=ht(),wu={registerMap:function(t,e,r){var a;return z(e)?a=e:e.svg?a=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(r=e.specialAreas,e=e.geoJson),a=[{type:"geoJSON",source:e,specialAreas:r}]),M(a,function(i){var n=i.type;n==="geoJson"&&(n=i.type="geoJSON");var o=WI[n];T&&gt(o,"Illegal map type: "+n),o(i)}),v_.set(t,a)},retrieveMap:function(t){return v_.get(t)}},WI={geoJSON:function(t){var e=t.source;t.geoJSON=Lt(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=l_(t.source)}},Ln=gt,ae=M,UI=se,as=lt,Iv=wt.parseClassType,d_="4.8.0",Lv={zrender:"4.3.1"},$I=1,g_=1e3,ZI=800,YI=900,XI=5e3,p_=1e3,qI=1100,m_=2e3,y_=3e3,KI=3500,jI=4e3,QI=5e3,Wr={PROCESSOR:{FILTER:g_,SERIES_FILTER:ZI,STATISTIC:XI},VISUAL:{LAYOUT:p_,PROGRESSIVE_LAYOUT:qI,GLOBAL:m_,CHART:y_,POST_CHART_LAYOUT:KI,COMPONENT:jI,BRUSH:QI}},hr="__flagInMainProcess",Ga="__optionUpdated",__=/^[a-zA-Z0-9_]+$/;function Pn(t,e){return function(r,a,i){if(!e&&this._disposed){Ue(this.id);return}r=r&&r.toLowerCase(),le.prototype[t].call(this,r,a,i)}}function is(){le.call(this)}is.prototype.on=Pn("on",!0),is.prototype.off=Pn("off",!0),is.prototype.one=Pn("one",!0),Dt(is,le);function ns(t,n,r){r=r||{},typeof n=="string"&&(n=I_[n]),this.id,this.group,this._dom=t;var a="canvas";T&&(a=(typeof window>"u"?global:window).__ECHARTS__DEFAULT__RENDERER__||a);var i=this._zr=Cc(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height});this._throttledZrFlush=du(it(i.flush,i),17);var n=rt(n);n&&By(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new _e;var o=this._api=i2(this);function s(l,u){return l.__prio-u.__prio}wl(Cu,s),wl(Nv,s),this._scheduler=new pu(this,o,Nv,Cu),le.call(this,this._ecEventProcessor=new Ov),this._messageCenter=new is,this._initEvents(),this.resize=it(this.resize,this),this._pendingActions=[],i.animation.on("frame",this._onframe,this),JI(i,this),ff(this)}var At=ns.prototype;At._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[Ga]){var e=this[Ga].silent;this[hr]=!0,os(this),Ha.update.call(this),this[hr]=!1,this[Ga]=!1,bu.call(this,e),Su.call(this,e)}else if(t.unfinished){var r=$I,a=this._model,i=this._api;t.unfinished=!1;do{var n=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),b_(this,a),t.performVisualTasks(a),Ev(this,this._model,i,"remain"),r-=+new Date-n}while(r>0&&t.unfinished);t.unfinished||this._zr.flush()}}},At.getDom=function(){return this._dom},At.getZr=function(){return this._zr},At.setOption=function(t,e,r){if(T&&Ln(!this[hr],"`setOption` should not be called during main process."),this._disposed){Ue(this.id);return}var a;if(as(e)&&(r=e.lazyUpdate,a=e.silent,e=e.notMerge),this[hr]=!0,!this._model||e){var i=new mv(this._api),n=this._theme,o=this._model=new dv;o.scheduler=this._scheduler,o.init(null,null,n,i)}this._model.setOption(t,D_),r?(this[Ga]={silent:a},this[hr]=!1):(os(this),Ha.update.call(this),this._zr.flush(),this[Ga]=!1,this[hr]=!1,bu.call(this,a),Su.call(this,a))},At.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},At.getModel=function(){return this._model},At.getOption=function(){return this._model&&this._model.getOption()},At.getWidth=function(){return this._zr.getWidth()},At.getHeight=function(){return this._zr.getHeight()},At.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},At.getRenderedCanvas=function(t){if(!!G.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},At.getSvgDataURL=function(){if(!!G.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return M(e,function(r){r.stopAnimation(!0)}),t.painter.toDataURL()}},At.getDataURL=function(t){if(this._disposed){Ue(this.id);return}t=t||{};var e=t.excludeComponents,r=this._model,a=[],i=this;ae(e,function(o){r.eachComponent({mainType:o},function(s){var l=i._componentsMap[s.__viewId];l.group.ignore||(a.push(l),l.group.ignore=!0)})});var n=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return ae(a,function(o){o.group.ignore=!1}),n},At.getConnectedDataURL=function(t){if(this._disposed){Ue(this.id);return}if(!!G.canvasSupported){var e=t.type==="svg",r=this.group,a=Math.min,i=Math.max,n=1/0;if(Du[r]){var o=n,s=n,l=-n,u=-n,h=[],f=t&&t.pixelRatio||1;M(Ci,function(m,y){if(m.group===r){var _=e?m.getZr().painter.getSvgDom().innerHTML:m.getRenderedCanvas(rt(t)),w=m.getDom().getBoundingClientRect();o=a(w.left,o),s=a(w.top,s),l=i(w.right,l),u=i(w.bottom,u),h.push({dom:_,left:w.left,top:w.top})}}),o*=f,s*=f,l*=f,u*=f;var c=l-o,v=u-s,d=rn(),g=Cc(d,{renderer:e?"svg":"canvas"});if(g.resize({width:c,height:v}),e){var p="";return ae(h,function(m){var y=m.left-o,_=m.top-s;p+='<g transform="translate('+y+","+_+')">'+m.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=p,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new xt({shape:{x:0,y:0,width:c,height:v},style:{fill:t.connectedBackgroundColor}})),ae(h,function(m){var y=new ve({style:{x:m.left*f-o,y:m.top*f-s,image:m.dom}});g.add(y)}),g.refreshImmediately(),d.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)}},At.convertToPixel=ot(x_,"convertToPixel"),At.convertFromPixel=ot(x_,"convertFromPixel");function x_(t,e,r){if(this._disposed){Ue(this.id);return}var a=this._model,i=this._coordSysMgr.getCoordinateSystems(),n;e=Ol(a,e);for(var o=0;o<i.length;o++){var s=i[o];if(s[t]&&(n=s[t](a,e,r))!=null)return n}T&&console.warn("No coordinate system that supports "+t+" found by the given finder.")}At.containPixel=function(t,e){if(this._disposed){Ue(this.id);return}var r=this._model,a;return t=Ol(r,t),M(t,function(i,n){n.indexOf("Models")>=0&&M(i,function(o){var s=o.coordinateSystem;if(s&&s.containPoint)a|=!!s.containPoint(e);else if(n==="seriesModels"){var l=this._chartsMap[o.__viewId];l&&l.containPoint?a|=l.containPoint(e,o):T&&console.warn(n+": "+(l?"The found component do not support containPoint.":"No view mapping to the found component."))}else T&&console.warn(n+": containPoint is not supported")},this)},this),!!a},At.getVisual=function(t,e){var r=this._model;t=Ol(r,t,{defaultMainType:"series"});var a=t.seriesModel;T&&(a||console.warn("There is no specified seires model"));var i=a.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return n!=null?i.getItemVisual(n,e):i.getVisual(e)},At.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},At.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Ha={prepareAndUpdate:function(t){os(this),Ha.update.call(this,t)},update:function(t){var e=this._model,r=this._api,a=this._zr,i=this._coordSysMgr,n=this._scheduler;if(!!e){n.restoreData(e,t),n.performSeriesTasks(e),i.create(e,r),n.performDataProcessorTasks(e,t),b_(this,e),i.update(e,r),Pv(e),n.performVisualTasks(e,t),T_(this,e,r,t);var o=e.get("backgroundColor")||"transparent";if(G.canvasSupported)a.setBackgroundColor(o);else{var s=Ve(o);o=ia(s,"rgb"),s[3]===0&&(o="transparent")}Rv(e,r)}},updateTransform:function(t){var e=this._model,r=this,a=this._api;if(!!e){var i=[];e.eachComponent(function(o,s){var l=r.getViewOfComponentModel(s);if(l&&l.__alive)if(l.updateTransform){var u=l.updateTransform(s,e,a,t);u&&u.update&&i.push(l)}else i.push(l)});var n=ht();e.eachSeries(function(o){var s=r._chartsMap[o.__viewId];if(s.updateTransform){var l=s.updateTransform(o,e,a,t);l&&l.update&&n.set(o.uid,1)}else n.set(o.uid,1)}),Pv(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:n}),Ev(r,e,a,t,n),Rv(e,this._api)}},updateView:function(t){var e=this._model;!e||(ue.markUpdateMethod(t,"updateView"),Pv(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),T_(this,this._model,this._api,t),Rv(e,this._api))},updateVisual:function(t){Ha.update.call(this,t)},updateLayout:function(t){Ha.update.call(this,t)}};function os(t){var e=t._model,r=t._scheduler;r.restorePipelines(e),r.prepareStageTasks(),A_(t,"component",e,r),A_(t,"chart",e,r),r.plan()}function w_(t,e,r,a,i){var n=t._model;if(!a){ae(t._componentsViews.concat(t._chartsViews),u);return}var o={};o[a+"Id"]=r[a+"Id"],o[a+"Index"]=r[a+"Index"],o[a+"Name"]=r[a+"Name"];var s={mainType:a,query:o};i&&(s.subType=i);var l=r.excludeSeriesId;l!=null&&(l=ht(me(l))),n&&n.eachComponent(s,function(h){(!l||l.get(h.id)==null)&&u(t[a==="series"?"_chartsMap":"_componentsMap"][h.__viewId])},t);function u(h){h&&h.__alive&&h[e]&&h[e](h.__model,n,t._api,r)}}At.resize=function(t){if(T&&Ln(!this[hr],"`resize` should not be called during main process."),this._disposed){Ue(this.id);return}this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!e){var r=e.resetOption("media"),a=t&&t.silent;this[hr]=!0,r&&os(this),Ha.update.call(this),this[hr]=!1,bu.call(this,a),Su.call(this,a)}};function b_(t,e){var r=t._chartsMap,a=t._scheduler;e.eachSeries(function(i){a.updateStreamModes(i,r[i.__viewId])})}At.showLoading=function(t,e){if(this._disposed){Ue(this.id);return}if(as(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),!kv[t]){T&&console.warn("Loading effects "+t+" not exists.");return}var r=kv[t](this._api,e),a=this._zr;this._loadingFX=r,a.add(r)},At.hideLoading=function(){if(this._disposed){Ue(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},At.makeActionFromEvent=function(t){var e=et({},t);return e.type=Tu[t.type],e},At.dispatchAction=function(t,e){if(this._disposed){Ue(this.id);return}if(as(e)||(e={silent:!!e}),!!Au[t.type]&&!!this._model){if(this[hr]){this._pendingActions.push(t);return}S_.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&G.browser.weChat&&this._throttledZrFlush(),bu.call(this,e.silent),Su.call(this,e.silent)}};function S_(t,e){var r=t.type,a=t.escapeConnect,i=Au[r],n=i.actionInfo,o=(n.update||"update").split(":"),s=o.pop();o=o[0]!=null&&Iv(o[0]),this[hr]=!0;var l=[t],u=!1;t.batch&&(u=!0,l=V(t.batch,function(v){return v=J(et({},v),t),v.batch=null,v}));var h=[],f,c=r==="highlight"||r==="downplay";ae(l,function(v){f=i.action(v,this._model,this._api),f=f||et({},v),f.type=n.event||f.type,h.push(f),c?w_(this,s,v,"series"):o&&w_(this,s,v,o.main,o.sub)},this),s!=="none"&&!c&&!o&&(this[Ga]?(os(this),Ha.update.call(this,t),this[Ga]=!1):Ha[s].call(this,t)),u?f={type:n.event||r,escapeConnect:a,batch:h}:f=h[0],this[hr]=!1,!e&&this._messageCenter.trigger(f.type,f)}function bu(t){for(var e=this._pendingActions;e.length;){var r=e.shift();S_.call(this,r,t)}}function Su(t){!t&&this.trigger("updated")}function JI(t,e){t.on("rendered",function(){e.trigger("rendered"),t.animation.isFinished()&&!e[Ga]&&!e._scheduler.unfinished&&!e._pendingActions.length&&e.trigger("finished")})}At.appendData=function(t){if(this._disposed){Ue(this.id);return}var e=t.seriesIndex,r=this.getModel(),a=r.getSeriesByIndex(e);T&&Ln(t.data&&a),a.appendData(t),this._scheduler.unfinished=!0},At.on=Pn("on",!1),At.off=Pn("off",!1),At.one=Pn("one",!1);function A_(t,e,r,a){for(var i=e==="component",n=i?t._componentsViews:t._chartsViews,o=i?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;u<n.length;u++)n[u].__alive=!1;i?r.eachComponent(function(c,v){c!=="series"&&h(v)}):r.eachSeries(h);function h(c){var v="_ec_"+c.id+"_"+c.type,d=o[v];if(!d){var g=Iv(c.type),p=i?Fr.getClass(g.main,g.sub):ue.getClass(g.sub);T&&Ln(p,g.sub+" does not exist."),d=new p,d.init(r,l),o[v]=d,n.push(d),s.add(d.group)}c.__viewId=d.__id=v,d.__alive=!0,d.__model=c,d.group.__ecComponentInfo={mainType:c.mainType,index:c.componentIndex},!i&&a.prepareView(d,c,r,l)}for(var u=0;u<n.length;){var f=n[u];f.__alive?u++:(!i&&f.renderTask.dispose(),s.remove(f.group),f.dispose(r,l),n.splice(u,1),delete o[f.__id],f.__id=f.group.__ecComponentInfo=null)}}function Pv(t){t.clearColorPalette(),t.eachSeries(function(e){e.clearColorPalette()})}function T_(t,e,r,a){t2(t,e,r,a),ae(t._chartsViews,function(i){i.__alive=!1}),Ev(t,e,r,a),ae(t._chartsViews,function(i){i.__alive||i.remove(e,r)})}function t2(t,e,r,a,i){ae(i||t._componentsViews,function(n){var o=n.__model;n.render(o,e,r,a),C_(o,n)})}function Ev(t,e,r,a,i){var n=t._scheduler,o;e.eachSeries(function(s){var l=t._chartsMap[s.__viewId];l.__alive=!0;var u=l.renderTask;n.updatePayload(u,a),i&&i.get(s.uid)&&u.dirty(),o|=u.perform(n.getPerformArgs(u)),l.group.silent=!!s.get("silent"),C_(s,l),a2(s,l)}),n.unfinished|=o,r2(t,e),xI(t._zr.dom,e)}function Rv(t,e){ae(M_,function(r){r(t,e)})}var e2=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];At._initEvents=function(){ae(e2,function(t){var e=function(r){var a=this.getModel(),i=r.target,n,o=t==="globalout";if(o)n={};else if(i&&i.dataIndex!=null){var s=i.dataModel||a.getSeriesByIndex(i.seriesIndex);n=s&&s.getDataParams(i.dataIndex,i.dataType,i)||{}}else i&&i.eventData&&(n=et({},i.eventData));if(n){var l=n.componentType,u=n.componentIndex;(l==="markLine"||l==="markPoint"||l==="markArea")&&(l="series",u=n.seriesIndex);var h=l&&u!=null&&a.getComponent(l,u),f=h&&this[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];T&&!o&&!(h&&f)&&console.warn("model or view can not be found by params"),n.event=r,n.type=t,this._ecEventProcessor.eventInfo={targetEl:i,packedEvent:n,model:h,view:f},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),ae(Tu,function(t,e){this._messageCenter.on(e,function(r){this.trigger(e,r)},this)},this)},At.isDisposed=function(){return this._disposed},At.clear=function(){if(this._disposed){Ue(this.id);return}this.setOption({series:[]},!0)},At.dispose=function(){if(this._disposed){Ue(this.id);return}this._disposed=!0,p0(this.getDom(),zv,"");var t=this._api,e=this._model;ae(this._componentsViews,function(r){r.dispose(e,t)}),ae(this._chartsViews,function(r){r.dispose(e,t)}),this._zr.dispose(),delete Ci[this.id]},Dt(ns,le);function Ue(t){T&&console.warn("Instance "+t+" has been disposed")}function r2(t,e){var r=t._zr,a=r.storage,i=0;a.traverse(function(n){i++}),i>e.get("hoverLayerThreshold")&&!G.node&&e.eachSeries(function(n){if(!n.preventUsingHoverLayer){var o=t._chartsMap[n.__viewId];o.__alive&&o.group.traverse(function(s){s.useHoverLayer=!0})}})}function a2(t,e){var r=t.get("blendMode")||null;T&&!G.canvasSupported&&r&&r!=="source-over"&&console.warn("Only canvas support blendMode"),e.group.traverse(function(a){a.isGroup||a.style.blend!==r&&a.setStyle("blend",r),a.eachPendingDisplayable&&a.eachPendingDisplayable(function(i){i.setStyle("blend",r)})})}function C_(t,e){var r=t.get("z"),a=t.get("zlevel");e.group.traverse(function(i){i.type!=="group"&&(r!=null&&(i.z=r),a!=null&&(i.zlevel=a))})}function i2(t){var e=t._coordSysMgr;return et(new Ry(t),{getCoordinateSystems:it(e.getCoordinateSystems,e),getComponentByElement:function(r){for(;r;){var a=r.__ecComponentInfo;if(a!=null)return t._model.getComponent(a.mainType,a.index);r=r.parent}}})}function Ov(){this.eventInfo}Ov.prototype={constructor:Ov,normalizeQuery:function(t){var e={},r={},a={};if(Lt(t)){var i=Iv(t);e.mainType=i.main||null,e.subType=i.sub||null}else{var n=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};M(t,function(s,l){for(var u=!1,h=0;h<n.length;h++){var f=n[h],c=l.lastIndexOf(f);if(c>0&&c===l.length-f.length){var v=l.slice(0,c);v!=="data"&&(e.mainType=v,e[f.toLowerCase()]=s,u=!0)}}o.hasOwnProperty(l)&&(r[l]=s,u=!0),u||(a[l]=s)})}return{cptQuery:e,dataQuery:r,otherQuery:a}},filter:function(t,e,r){var a=this.eventInfo;if(!a)return!0;var i=a.targetEl,n=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,n,"name")&&h(u,n,"dataIndex")&&h(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,n));function h(f,c,v,d){return f[v]==null||c[d||v]===f[v]}},afterTrigger:function(){this.eventInfo=null}};var Au={},Tu={},Nv=[],D_=[],M_=[],Cu=[],I_={},kv={},Ci={},Du={},n2=new Date-0,o2=new Date-0,zv="_echarts_instance_";function s2(t){var e=0,r=1,a=2,i="__connectUpdateStatus";function n(o,s){for(var l=0;l<o.length;l++){var u=o[l];u[i]=s}}ae(Tu,function(o,s){t._messageCenter.on(s,function(l){if(Du[t.group]&&t[i]!==e){if(l&&l.escapeConnect)return;var u=t.makeActionFromEvent(l),h=[];ae(Ci,function(f){f!==t&&f.group===t.group&&h.push(f)}),n(h,e),ae(h,function(f){f[i]!==r&&f.dispatchAction(u)}),n(h,a)}})})}function l2(t,e,r){if(T){if(Tc.replace(".","")-0<Lv.zrender.replace(".","")-0)throw new Error("zrender/src "+Tc+" is too old for ECharts "+d_+". Current version need ZRender "+Lv.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.")}var a=Bv(t);if(a)return T&&console.warn("There is a chart instance already initialized on the dom."),a;T&&nn(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&(!r||r.width==null)||!t.clientHeight&&(!r||r.height==null))&&console.warn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.");var i=new ns(t,e,r);return i.id="ec_"+n2++,Ci[i.id]=i,p0(t,zv,i.id),s2(i),i}function u2(t){if(z(t)){var e=t;t=null,ae(e,function(r){r.group!=null&&(t=r.group)}),t=t||"g_"+o2++,ae(e,function(r){r.group=t})}return Du[t]=!0,t}function L_(t){Du[t]=!1}var h2=L_;function f2(t){typeof t=="string"?t=Ci[t]:t instanceof ns||(t=Bv(t)),t instanceof ns&&!t.isDisposed()&&t.dispose()}function Bv(t){return Ci[vD(t,zv)]}function c2(t){return Ci[t]}function Vv(t,e){I_[t]=e}function we(t){D_.push(t)}function $e(t,e){Hv(Nv,t,e,g_)}function v2(t){M_.push(t)}function mt(t,e,r){typeof e=="function"&&(r=e,e="");var a=as(t)?t.type:[t,t={event:e}][0];t.event=(t.event||a).toLowerCase(),e=t.event,Ln(__.test(a)&&__.test(e)),Au[a]||(Au[a]={action:r,actionInfo:t}),Tu[e]=a}function Gv(t,e){_e.register(t,e)}function d2(t){var e=_e.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function Gt(t,e){Hv(Cu,t,e,p_,"layout")}function Rt(t,e){Hv(Cu,t,e,y_,"visual")}function Hv(t,e,r,a,i){if((UI(e)||as(e))&&(r=e,e=a),T){if(isNaN(e)||e==null)throw new Error("Illegal priority");ae(t,function(o){Ln(o.__raw!==r)})}var n=pu.wrapStageHandler(r,i);return n.__prio=e,n.__raw=r,t.push(n),n}function P_(t,e){kv[t]=e}function Ze(t){return wt.extend(t)}function he(t){return Fr.extend(t)}function Mu(t){return Vt.extend(t)}function ke(t){return ue.extend(t)}function g2(t){im("createCanvas",t)}function p2(t,e,r){wu.registerMap(t,e,r)}function m2(t){var e=wu.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}Rt(m_,_I),we(By),$e(YI,iI),P_("default",wI),mt({type:"highlight",event:"highlight",update:"highlight"},ce),mt({type:"downplay",event:"downplay",update:"downplay"},ce),Vv("light",RI),Vv("dark",s_);var y2={};function E_(t){return t}function ha(t,e,r,a,i){this._old=t,this._new=e,this._oldKeyGetter=r||E_,this._newKeyGetter=a||E_,this.context=i}ha.prototype={constructor:ha,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,r={},a={},i=[],n=[],o;for(R_(t,r,i,"_oldKeyGetter",this),R_(e,a,n,"_newKeyGetter",this),o=0;o<t.length;o++){var s=i[o],l=a[s];if(l!=null){var u=l.length;u?(u===1&&(a[s]=null),l=l.shift()):a[s]=null,this._update&&this._update(l,o)}else this._remove&&this._remove(o)}for(var o=0;o<n.length;o++){var s=n[o];if(a.hasOwnProperty(s)){var l=a[s];if(l==null)continue;if(!l.length)this._add&&this._add(l);else for(var h=0,u=l.length;h<u;h++)this._add&&this._add(l[h])}}}};function R_(t,e,r,a,i){for(var n=0;n<t.length;n++){var o="_ec_"+i[a](t[n],n),s=e[o];s==null?(r.push(o),e[o]=n):(s.length||(e[o]=s=[s]),s.push(n))}}var Fv=ht(["tooltip","label","itemName","itemId","seriesName"]);function _2(t){var e={},r=e.encode={},a=ht(),i=[],n=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};M(t.dimensions,function(f){var c=t.getDimensionInfo(f),v=c.coordDim;if(v){T&&gt(Fv.get(v)==null);var d=c.coordDimIndex;Wv(r,v)[d]=f,c.isExtraCoord||(a.set(v,1),x2(c.type)&&(i[0]=f),Wv(o.encode,v)[d]=c.index),c.defaultTooltip&&n.push(f)}Fv.each(function(g,p){var m=Wv(r,p),y=c.otherDims[p];y!=null&&y!==!1&&(m[y]=c.name)})});var s=[],l={};a.each(function(f,c){var v=r[c];l[c]=v[0],s=s.concat(v)}),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(i=u.slice());var h=r.tooltip;return h&&h.length?n=h.slice():n.length||(n=i.slice()),r.defaultedLabel=i,r.defaultedTooltip=n,e}function Wv(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Iu(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function x2(t){return!(t==="ordinal"||t==="time")}function ss(t){t!=null&&et(this,t),this.otherDims={}}var Lu=lt,ls="undefined",O_=-1,w2="e\0\0",b2={float:typeof Float64Array===ls?Array:Float64Array,int:typeof Int32Array===ls?Array:Int32Array,ordinal:Array,number:Array,time:Array},S2=typeof Uint32Array===ls?Array:Uint32Array,A2=typeof Int32Array===ls?Array:Int32Array,T2=typeof Uint16Array===ls?Array:Uint16Array;function Pu(t){return t._rawCount>65535?S2:T2}function C2(t){var e=t.constructor;return e===Array?t.slice():new e(t)}var D2=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],M2=["_extent","_approximateExtent","_rawExtent"];function N_(t,e){M(D2.concat(e.__wrappedMethods||[]),function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t.__wrappedMethods=e.__wrappedMethods,M(M2,function(r){t[r]=rt(e[r])}),t._calculationInfo=et(e._calculationInfo)}var fe=function(t,e){t=t||["x","y"];for(var r={},a=[],i={},n=0;n<t.length;n++){var o=t[n];Lt(o)?o=new ss({name:o}):o instanceof ss||(o=new ss(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},a.push(s),r[s]=o,o.index=n,o.createInvertedIndices&&(i[s]=[])}this.dimensions=a,this._dimensionInfos=r,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=_2(this),this._invertedIndicesMap=i,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},nt=fe.prototype;nt.type="list",nt.hasItemOption=!0,nt.getDimension=function(t){return(typeof t=="number"||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},nt.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},nt.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},nt.mapDimension=function(t,e){var r=this._dimensionsSummary;if(e==null)return r.encodeFirstDimNotExtra[t];var a=r.encode[t];return e===!0?(a||[]).slice():a&&a[e]},nt.initData=function(t,e,r){var a=Tr.isInstance(t)||Qr(t);if(a&&(t=new Vy(t,this.dimensions.length)),T&&!a&&(typeof t.getItem!="function"||typeof t.count!="function"))throw new Error("Inavlid data provider.");this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},r||(this.hasItemOption=!1),this.defaultDimValueGetter=Fy[this._rawData.getSource().sourceFormat],this._dimValueGetter=r=r||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Fy.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},nt.getProvider=function(){return this._rawData},nt.appendData=function(t){T&&gt(!this._indices,"appendData can only be called on raw data.");var e=this._rawData,r=this.count();e.appendData(t);var a=e.count();e.persistent||(a+=r),this._initDataFromProvider(r,a)},nt.appendValues=function(t,e){for(var r=this._chunkSize,a=this._storage,i=this.dimensions,n=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<n;h++){var f=i[h];o[f]||(o[f]=Ru()),a[f]||(a[f]=[]),k_(a,this._dimensionInfos[f],r,u,l),this._chunkCount=a[f].length}for(var c=new Array(n),v=s;v<l;v++){for(var d=v-s,g=Math.floor(v/r),p=v%r,m=0;m<n;m++){var f=i[m],y=this._dimValueGetterArrayRows(t[d]||c,f,d,m);a[f][g][p]=y;var _=o[f];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[v]=e[d])}this._rawCount=this._count=l,this._extent={},z_(this)},nt._initDataFromProvider=function(t,e){if(!(t>=e)){for(var r=this._chunkSize,a=this._rawData,i=this._storage,n=this.dimensions,o=n.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,f=this._nameRepeatCount={},c,v=this._chunkCount,d=0;d<o;d++){var g=n[d];h[g]||(h[g]=Ru());var p=s[g];p.otherDims.itemName===0&&(c=this._nameDimIdx=d),p.otherDims.itemId===0&&(this._idDimIdx=d),i[g]||(i[g]=[]),k_(i,p,r,v,e),this._chunkCount=i[g].length}for(var m=new Array(o),y=t;y<e;y++){m=a.getItem(y,m);for(var _=Math.floor(y/r),w=y%r,b=0;b<o;b++){var g=n[b],A=i[g][_],S=this._dimValueGetter(m,g,y,b);A[w]=S;var D=h[g];S<D[0]&&(D[0]=S),S>D[1]&&(D[1]=S)}if(!a.pure){var I=l[y];if(m&&I==null){if(m.name!=null)l[y]=I=m.name;else if(c!=null){var L=n[c],P=i[L][_];if(P){I=P[w];var R=s[L].ordinalMeta;R&&R.categories.length&&(I=R.categories[I])}}}var E=m==null?null:m.id;E==null&&I!=null&&(f[I]=f[I]||0,E=I,f[I]>0&&(E+="__ec__"+f[I]),f[I]++),E!=null&&(u[y]=E)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent={},z_(this)}};function k_(t,e,r,a,i){var n=b2[e.type],o=a-1,s=e.name,l=t[s][o];if(l&&l.length<r){for(var u=new n(Math.min(i-o*r,r)),h=0;h<l.length;h++)u[h]=l[h];t[s][o]=u}for(var f=a*r;f<i;f+=r)t[s].push(new n(Math.min(i-f,r)))}function z_(t){var e=t._invertedIndicesMap;M(e,function(r,a){var i=t._dimensionInfos[a],n=i.ordinalMeta;if(n){r=e[a]=new A2(n.categories.length);for(var o=0;o<r.length;o++)r[o]=O_;for(var o=0;o<t._count;o++)r[t.get(a,o)]=o}})}function B_(t,e,r){var a;if(e!=null){var i=t._chunkSize,n=Math.floor(r/i),o=r%i,s=t.dimensions[e],l=t._storage[s][n];if(l){a=l[o];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(a=u.categories[a])}}return a}nt.count=function(){return this._count},nt.getIndices=function(){var t,e=this._indices;if(e){var r=e.constructor,a=this._count;if(r===Array){t=new r(a);for(var i=0;i<a;i++)t[i]=e[i]}else t=new r(e.buffer,0,a)}else for(var r=Pu(this),t=new r(this.count()),i=0;i<t.length;i++)t[i]=i;return t},nt.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var r=this._storage;if(!r[t])return NaN;e=this.getRawIndex(e);var a=Math.floor(e/this._chunkSize),i=e%this._chunkSize,n=r[t][a],o=n[i];return o},nt.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var r=this._storage[t];if(!r)return NaN;var a=Math.floor(e/this._chunkSize),i=e%this._chunkSize,n=r[a];return n[i]},nt._getFast=function(t,e){var r=Math.floor(e/this._chunkSize),a=e%this._chunkSize,i=this._storage[t][r];return i[a]},nt.getValues=function(t,e){var r=[];z(t)||(e=t,t=this.dimensions);for(var a=0,i=t.length;a<i;a++)r.push(this.get(t[a],e));return r},nt.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,r=0,a=e.length;r<a;r++)if(isNaN(this.get(e[r],t)))return!1;return!0},nt.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],r=Ru();if(!e)return r;var a=this.count(),i=!this._indices,n;if(i)return this._rawExtent[t].slice();if(n=this._extent[t],n)return n.slice();n=r;for(var o=n[0],s=n[1],l=0;l<a;l++){var u=this._getFast(t,this.getRawIndex(l));u<o&&(o=u),u>s&&(s=u)}return n=[o,s],this._extent[t]=n,n},nt.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},nt.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},nt.getCalculationInfo=function(t){return this._calculationInfo[t]},nt.setCalculationInfo=function(t,e){Lu(t)?et(this._calculationInfo,t):this._calculationInfo[t]=e},nt.getSum=function(t){var e=this._storage[t],r=0;if(e)for(var a=0,i=this.count();a<i;a++){var n=this.get(t,a);isNaN(n)||(r+=n)}return r},nt.getMedian=function(t){var e=[];this.each(t,function(i,n){isNaN(i)||e.push(i)});var r=[].concat(e).sort(function(i,n){return i-n}),a=this.count();return a===0?0:a%2===1?r[(a-1)/2]:(r[a/2]+r[a/2-1])/2},nt.rawIndexOf=function(t,e){var r=t&&this._invertedIndicesMap[t];if(T&&!r)throw new Error("Do not supported yet");var a=r[e];return a==null||isNaN(a)?O_:a},nt.indexOfName=function(t){for(var e=0,r=this.count();e<r;e++)if(this.getName(e)===t)return e;return-1},nt.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,r=e[t];if(r!=null&&r<this._count&&r===t)return t;for(var a=0,i=this._count-1;a<=i;){var n=(a+i)/2|0;if(e[n]<t)a=n+1;else if(e[n]>t)i=n-1;else return n}return-1},nt.indicesOfNearest=function(t,e,r){var a=this._storage,i=a[t],n=[];if(!i)return n;r==null&&(r=1/0);for(var o=1/0,s=-1,l=0,u=0,h=this.count();u<h;u++){var f=e-this.get(t,u),c=Math.abs(f);c<=r&&((c<o||c===o&&f>=0&&s<0)&&(o=c,s=f,l=0),f===s&&(n[l++]=u))}return n.length=l,n},nt.getRawIndex=us;function us(t){return t}function hs(t){return t<this._count&&t>=0?this._indices[t]:-1}nt.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],r=0;r<this.dimensions.length;r++){var a=this.dimensions[r];e.push(this.get(a,t))}return e},nt.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||B_(this,this._nameDimIdx,e)||""},nt.getId=function(t){return Uv(this,this.getRawIndex(t))};function Uv(t,e){var r=t._idList[e];return r==null&&(r=B_(t,t._idDimIdx,e)),r==null&&(r=w2+e),r}function $v(t){return z(t)||(t=[t]),t}function Eu(t,e){for(var r=0;r<e.length;r++)t._dimensionInfos[e[r]]||console.error("Unkown dimension "+e[r])}nt.each=function(t,e,r,a){"use strict";if(!!this._count){typeof t=="function"&&(a=r,r=e,e=t,t=[]),r=r||a||this,t=V($v(t),this.getDimension,this),T&&Eu(this,t);for(var i=t.length,n=0;n<this.count();n++)switch(i){case 0:e.call(r,n);break;case 1:e.call(r,this.get(t[0],n),n);break;case 2:e.call(r,this.get(t[0],n),this.get(t[1],n),n);break;default:for(var o=0,s=[];o<i;o++)s[o]=this.get(t[o],n);s[o]=n,e.apply(r,s)}}},nt.filterSelf=function(t,e,r,a){"use strict";if(!!this._count){typeof t=="function"&&(a=r,r=e,e=t,t=[]),r=r||a||this,t=V($v(t),this.getDimension,this),T&&Eu(this,t);for(var i=this.count(),n=Pu(this),o=new n(i),s=[],l=t.length,u=0,h=t[0],f=0;f<i;f++){var c,v=this.getRawIndex(f);if(l===0)c=e.call(r,f);else if(l===1){var d=this._getFast(h,v);c=e.call(r,d,f)}else{for(var g=0;g<l;g++)s[g]=this._getFast(h,v);s[g]=f,c=e.apply(r,s)}c&&(o[u++]=v)}return u<i&&(this._indices=o),this._count=u,this._extent={},this.getRawIndex=this._indices?hs:us,this}},nt.selectRange=function(t){"use strict";if(!!this._count){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);T&&Eu(this,e);var a=e.length;if(!!a){var i=this.count(),n=Pu(this),o=new n(i),s=0,l=e[0],u=t[l][0],h=t[l][1],f=!1;if(!this._indices){var c=0;if(a===1){for(var v=this._storage[e[0]],d=0;d<this._chunkCount;d++)for(var g=v[d],p=Math.min(this._count-d*this._chunkSize,this._chunkSize),m=0;m<p;m++){var y=g[m];(y>=u&&y<=h||isNaN(y))&&(o[s++]=c),c++}f=!0}else if(a===2){for(var v=this._storage[l],_=this._storage[e[1]],w=t[e[1]][0],b=t[e[1]][1],d=0;d<this._chunkCount;d++)for(var g=v[d],A=_[d],p=Math.min(this._count-d*this._chunkSize,this._chunkSize),m=0;m<p;m++){var y=g[m],S=A[m];(y>=u&&y<=h||isNaN(y))&&(S>=w&&S<=b||isNaN(S))&&(o[s++]=c),c++}f=!0}}if(!f)if(a===1)for(var m=0;m<i;m++){var D=this.getRawIndex(m),y=this._getFast(l,D);(y>=u&&y<=h||isNaN(y))&&(o[s++]=D)}else for(var m=0;m<i;m++){for(var I=!0,D=this.getRawIndex(m),d=0;d<a;d++){var L=e[d],y=this._getFast(r,D);(y<t[L][0]||y>t[L][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return s<i&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?hs:us,this}}},nt.mapArray=function(t,e,r,a){"use strict";typeof t=="function"&&(a=r,r=e,e=t,t=[]),r=r||a||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},r),i};function V_(t,e){var r=t.dimensions,a=new fe(V(r,t.getDimensionInfo,t),t.hostModel);N_(a,t);for(var i=a._storage={},n=t._storage,o=0;o<r.length;o++){var s=r[o];n[s]&&(yt(e,s)>=0?(i[s]=I2(n[s]),a._rawExtent[s]=Ru(),a._extent[s]=null):i[s]=n[s])}return a}function I2(t){for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=C2(t[r]);return e}function Ru(){return[1/0,-1/0]}nt.map=function(t,e,r,a){"use strict";r=r||a||this,t=V($v(t),this.getDimension,this),T&&Eu(this,t);var i=V_(this,t);i._indices=this._indices,i.getRawIndex=i._indices?hs:us;for(var n=i._storage,o=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],f=i._rawExtent,c=0;c<u;c++){for(var v=0;v<l;v++)h[v]=this.get(t[v],c);h[l]=c;var d=e&&e.apply(r,h);if(d!=null){typeof d!="object"&&(o[0]=d,d=o);for(var g=this.getRawIndex(c),p=Math.floor(g/s),m=g%s,y=0;y<d.length;y++){var _=t[y],w=d[y],b=f[_],A=n[_];A&&(A[p][m]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return i},nt.downSample=function(t,e,r,a){for(var i=V_(this,[t]),n=i._storage,o=[],s=Math.floor(1/e),l=n[t],u=this.count(),h=this._chunkSize,f=i._rawExtent[t],c=new(Pu(this))(u),v=0,d=0;d<u;d+=s){s>u-d&&(s=u-d,o.length=s);for(var g=0;g<s;g++){var p=this.getRawIndex(d+g),m=Math.floor(p/h),y=p%h;o[g]=l[m][y]}var _=r(o),w=this.getRawIndex(Math.min(d+a(o,_)||0,u-1)),b=Math.floor(w/h),A=w%h;l[b][A]=_,_<f[0]&&(f[0]=_),_>f[1]&&(f[1]=_),c[v++]=w}return i._count=v,i._indices=c,i.getRawIndex=hs,i},nt.getItemModel=function(t){var e=this.hostModel;return new _t(this.getRawDataItem(t),e,e&&e.ecModel)},nt.diff=function(t){var e=this;return new ha(t?t.getIndices():[],this.getIndices(),function(r){return Uv(t,r)},function(r){return Uv(e,r)})},nt.getVisual=function(t){var e=this._visual;return e&&e[t]},nt.setVisual=function(t,e){if(Lu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setVisual(r,t[r]);return}this._visual=this._visual||{},this._visual[t]=e},nt.setLayout=function(t,e){if(Lu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setLayout(r,t[r]);return}this._layout[t]=e},nt.getLayout=function(t){return this._layout[t]},nt.getItemLayout=function(t){return this._itemLayouts[t]},nt.setItemLayout=function(t,e,r){this._itemLayouts[t]=r?et(this._itemLayouts[t]||{},e):e},nt.clearItemLayouts=function(){this._itemLayouts.length=0},nt.getItemVisual=function(t,e,r){var a=this._itemVisuals[t],i=a&&a[e];return i==null&&!r?this.getVisual(e):i},nt.setItemVisual=function(t,e,r){var a=this._itemVisuals[t]||{},i=this.hasItemVisual;if(this._itemVisuals[t]=a,Lu(e)){for(var n in e)e.hasOwnProperty(n)&&(a[n]=e[n],i[n]=!0);return}a[e]=r,i[e]=!0},nt.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var L2=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};nt.setItemGraphicEl=function(t,e){var r=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=r&&r.seriesIndex,e.type==="group"&&e.traverse(L2,e)),this._graphicEls[t]=e},nt.getItemGraphicEl=function(t){return this._graphicEls[t]},nt.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(r,a){r&&t&&t.call(e,r,a)})},nt.cloneShallow=function(t){if(!t){var e=V(this.dimensions,this.getDimensionInfo,this);t=new fe(e,this.hostModel)}if(t._storage=this._storage,N_(t,this),this._indices){var r=this._indices.constructor;t._indices=new r(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?hs:us,t},nt.wrapMethod=function(t,e){var r=this[t];typeof r=="function"&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=r.apply(this,arguments);return e.apply(this,[a].concat(on(arguments)))})},nt.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],nt.CHANGABLE_METHODS=["filterSelf","selectRange"];function G_(t,e,r){Tr.isInstance(e)||(e=Tr.seriesDataToSource(e)),r=r||{},t=(t||[]).slice();for(var a=(r.dimsDef||[]).slice(),i=ht(),n=ht(),o=[],s=P2(e,t,a,r.dimCount),l=0;l<s;l++){var u=a[l]=et({},lt(a[l])?a[l]:{name:a[l]}),h=u.name,f=o[l]=new ss;h!=null&&i.get(h)==null&&(f.name=f.displayName=h,i.set(h,l)),u.type!=null&&(f.type=u.type),u.displayName!=null&&(f.displayName=u.displayName)}var c=r.encodeDef;!c&&r.encodeDefaulter&&(c=r.encodeDefaulter(e,s)),c=ht(c),c.each(function(b,A){if(b=me(b).slice(),b.length===1&&!Lt(b[0])&&b[0]<0){c.set(A,!1);return}var S=c.set(A,[]);M(b,function(D,I){Lt(D)&&(D=i.get(D)),D!=null&&D<s&&(S[I]=D,d(o[D],A,I))})});var v=0;M(t,function(D,A){var S,D,I,L;if(Lt(D))S=D,D={};else{S=D.name;var P=D.ordinalMeta;D.ordinalMeta=null,D=rt(D),D.ordinalMeta=P,I=D.dimsDef,L=D.otherDims,D.name=D.coordDim=D.coordDimIndex=D.dimsDef=D.otherDims=null}var R=c.get(S);if(R!==!1){var R=me(R);if(!R.length)for(var E=0;E<(I&&I.length||1);E++){for(;v<o.length&&o[v].coordDim!=null;)v++;v<o.length&&R.push(v++)}M(R,function(Z,W){var $=o[Z];if(d(J($,D),S,W),$.name==null&&I){var X=I[W];!lt(X)&&(X={name:X}),$.name=$.displayName=X.name,$.defaultTooltip=X.defaultTooltip}L&&J($.otherDims,L)})}});function d(b,A,S){Fv.get(A)!=null?b.otherDims[A]=S:(b.coordDim=A,b.coordDimIndex=S,n.set(A,!0))}var g=r.generateCoord,p=r.generateCoordCount,m=p!=null;p=g?p||1:0;for(var y=g||"value",_=0;_<s;_++){var f=o[_]=o[_]||new ss,w=f.coordDim;w==null&&(f.coordDim=H_(y,n,m),f.coordDimIndex=0,(!g||p<=0)&&(f.isExtraCoord=!0),p--),f.name==null&&(f.name=H_(f.coordDim,i)),f.type==null&&(VM(e,_,f.name)===Ae.Must||f.isExtraCoord&&(f.otherDims.itemName!=null||f.otherDims.seriesName!=null))&&(f.type="ordinal")}return o}function P2(t,e,r,a){var i=Math.max(t.dimensionsDetectCount||1,e.length,r.length,a||0);return M(e,function(n){var o=n.dimsDef;o&&(i=Math.max(i,o.length))}),i}function H_(t,e,r){if(r||e.get(t)!=null){for(var a=0;e.get(t+a)!=null;)a++;t+=a}return e.set(t,!0),t}var En=function(t,e){return e=e||{},G_(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function E2(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=ht(),this.categoryAxisMap=ht(),this.firstCategoryDimIndex=null}function R2(t){var e=t.get("coordinateSystem"),r=new E2(e),a=O2[e];if(a)return a(t,r,r.axisMap,r.categoryAxisMap),r}var O2={cartesian2d:function(t,e,r,a){var i=t.getReferringComponents("xAxis")[0],n=t.getReferringComponents("yAxis")[0];if(T){if(!i)throw new Error('xAxis "'+Ut(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!n)throw new Error('yAxis "'+Ut(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",n),Rn(i)&&(a.set("x",i),e.firstCategoryDimIndex=0),Rn(n)&&(a.set("y",n),e.firstCategoryDimIndex==null&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,a){var i=t.getReferringComponents("singleAxis")[0];if(T&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),Rn(i)&&(a.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,a){var i=t.getReferringComponents("polar")[0],n=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(T){if(!o)throw new Error("angleAxis option not found");if(!n)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",n),r.set("angle",o),Rn(n)&&(a.set("radius",n),e.firstCategoryDimIndex=0),Rn(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,a){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,a){var i=t.ecModel,n=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=n.dimensions.slice();M(n.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),h=o[l];r.set(h,u),Rn(u)&&e.firstCategoryDimIndex==null&&(a.set(h,u),e.firstCategoryDimIndex=l)})}};function Rn(t){return t.get("type")==="category"}function F_(t,e,r){r=r||{};var a=r.byIndex,i=r.stackedCoordDimension,n=!!(t&&t.get("stack")),o,s,l,u;if(M(e,function(v,d){Lt(v)&&(e[d]=v={name:v}),n&&!v.isExtraCoord&&(!a&&!o&&v.ordinalMeta&&(o=v),!s&&v.type!=="ordinal"&&v.type!=="time"&&(!i||i===v.coordDim)&&(s=v))}),s&&!a&&!o&&(a=!0),s){l="__\0ecstackresult",u="__\0ecstackedover",o&&(o.createInvertedIndices=!0);var h=s.coordDim,f=s.type,c=0;M(e,function(v){v.coordDim===h&&c++}),e.push({name:l,coordDim:h,coordDimIndex:c,type:f,isExtraCoord:!0,isCalculationCoord:!0}),c++,e.push({name:u,coordDim:u,coordDimIndex:c,type:f,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:s&&s.name,stackedByDimension:o&&o.name,isStackedByIndex:a,stackedOverDimension:u,stackResultDimension:l}}function fa(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function fs(t,e){return fa(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ca(t,e,r){r=r||{},Tr.isInstance(t)||(t=Tr.seriesDataToSource(t));var a=e.get("coordinateSystem"),i=_e.get(a),n=R2(e),o;n&&(o=V(n.coordSysDims,function(v){var d={name:v},g=n.axisMap.get(v);if(g){var p=g.get("type");d.type=Iu(p)}return d})),o||(o=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]);var s=En(t,{coordDimensions:o,generateCoord:r.generateCoord,encodeDefaulter:r.useEncodeDefaulter?ot(Ly,o,e):null}),l,u;n&&M(s,function(v,d){var g=v.coordDim,p=n.categoryAxisMap.get(g);p&&(l==null&&(l=d),v.ordinalMeta=p.getOrdinalMeta()),v.otherDims.itemName!=null&&(u=!0)}),!u&&l!=null&&(s[l].otherDims.itemName=0);var h=F_(e,s),f=new fe(s,e);f.setCalculationInfo(h);var c=l!=null&&N2(t)?function(v,d,g,p){return p===l?g:this.defaultDimValueGetter(v,d,g,p)}:null;return f.hasItemOption=!1,f.initData(t,null,c),f}function N2(t){if(t.sourceFormat===Si){var e=k2(t.data||[]);return e!=null&&!z(Io(e))}}function k2(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function jt(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}jt.prototype.parse=function(t){return t},jt.prototype.getSetting=function(t){return this._setting[t]},jt.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},jt.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},jt.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},jt.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},jt.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},jt.prototype.getExtent=function(){return this._extent.slice()},jt.prototype.setExtent=function(t,e){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(e)||(r[1]=e)},jt.prototype.isBlank=function(){return this._isBlank},jt.prototype.setBlank=function(t){this._isBlank=t},jt.prototype.getLabel=null,Lo(jt),kl(jt,{registerWhenExtend:!0});function cs(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}cs.createByAxisModel=function(t){var e=t.option,r=e.data,a=r&&V(r,z2);return new cs({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})};var W_=cs.prototype;W_.getOrdinal=function(t){return U_(this).get(t)},W_.parseAndCollect=function(t){var e,r=this._needCollect;if(typeof t!="string"&&!r)return t;if(r&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var a=U_(this);return e=a.get(t),e==null&&(r?(e=this.categories.length,this.categories[e]=t,a.set(t,e)):e=NaN),e};function U_(t){return t._map||(t._map=ht(t.categories))}function z2(t){return lt(t)&&t.value!=null?t.value:t+""}var Zv=jt.prototype,Yv=jt.extend({type:"ordinal",init:function(t,e){(!t||z(t))&&(t=new cs({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return typeof t=="string"?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Zv.contain.call(this,t)&&this._ordinalMeta.categories[t]!=null},normalize:function(t){return Zv.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Zv.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,r=e[0];r<=e[1];)t.push(r),r++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:ce,niceExtent:ce});Yv.create=function(){return new Yv};var $_=re;function B2(t,e,r,a){var i={},n=t[1]-t[0],o=i.interval=rv(n/e,!0);r!=null&&o<r&&(o=i.interval=r),a!=null&&o>a&&(o=i.interval=a);var s=i.intervalPrecision=Z_(o),l=i.niceTickExtent=[$_(Math.ceil(t[0]/o)*o,s),$_(Math.floor(t[1]/o)*o,s)];return X_(l,t),i}function Z_(t){return nu(t)+2}function Y_(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function X_(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Y_(t,0,e),Y_(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var On=re,Ur=jt.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var r=this._extent;isNaN(t)||(r[0]=parseFloat(t)),isNaN(e)||(r[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Ur.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Z_(t)},getTicks:function(t){var e=this._interval,r=this._extent,a=this._niceExtent,i=this._intervalPrecision,n=[];if(!e)return n;var o=1e4;r[0]<a[0]&&(t?n.push(On(a[0]-e,i)):n.push(r[0]));for(var s=a[0];s<=a[1]&&(n.push(s),s=On(s+e,i),s!==n[n.length-1]);)if(n.length>o)return[];var l=n.length?n[n.length-1]:a[1];return r[1]>l&&(t?n.push(On(l+e,i)):n.push(r[1])),n},getMinorTicks:function(t){for(var e=this.getTicks(!0),r=[],a=this.getExtent(),i=1;i<e.length;i++){for(var n=e[i],o=e[i-1],s=0,l=[],u=n-o,h=u/t;s<t-1;){var f=re(o+(s+1)*h);f>a[0]&&f<a[1]&&l.push(f),s++}r.push(l)}return r},getLabel:function(t,e){if(t==null)return"";var r=e&&e.precision;return r==null?r=nu(t)||0:r==="auto"&&(r=this._intervalPrecision),t=On(t,r,!0),ka(t)},niceTicks:function(t,e,r){t=t||5;var a=this._extent,i=a[1]-a[0];if(!!isFinite(i)){i<0&&(i=-i,a.reverse());var n=B2(a,t,e,r);this._intervalPrecision=n.intervalPrecision,this._interval=n.interval,this._niceExtent=n.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(e[0]!==0){var r=e[0];t.fixMax||(e[1]+=r/2),e[0]-=r/2}else e[1]=1;var a=e[1]-e[0];isFinite(a)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=On(Math.floor(e[0]/i)*i)),t.fixMax||(e[1]=On(Math.ceil(e[1]/i)*i))}});Ur.create=function(){return new Ur};var Xv="__ec_stack_",q_=.5,qv=typeof Float32Array<"u"?Float32Array:Array;function Kv(t){return t.get("stack")||Xv+t.seriesIndex}function jv(t){return t.dim+t.index}function V2(t){var e=[],r=t.axis,a="axis0";if(r.type==="category"){for(var i=r.getBandWidth(),n=0;n<t.count;n++)e.push(J({bandWidth:i,axisKey:a,stackId:Xv+n},t));for(var o=j_(e),s=[],n=0;n<t.count;n++){var l=o[a][Xv+n];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function K_(t,e){var r=[];return e.eachSeriesByType(t,function(a){t1(a)&&!e1(a)&&r.push(a)}),r}function G2(t){var e={};M(t,function(l){var u=l.coordinateSystem,h=u.getBaseAxis();if(!(h.type!=="time"&&h.type!=="value"))for(var f=l.getData(),c=h.dim+"_"+h.index,v=f.mapDimension(h.dim),d=0,g=f.count();d<g;++d){var p=f.get(v,d);e[c]?e[c].push(p):e[c]=[p]}});var r=[];for(var a in e)if(e.hasOwnProperty(a)){var i=e[a];if(i){i.sort(function(l,u){return l-u});for(var n=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(n=n===null?s:Math.min(n,s))}r[a]=n}}return r}function Qv(t){var e=G2(t),r=[];return M(t,function(a){var i=a.coordinateSystem,n=i.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=e[l],h=Math.abs(o[1]-o[0]),f=n.scale.getExtent(),c=Math.abs(f[1]-f[0]);s=u?h/c*u:h}else{var v=a.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=H(a.get("barWidth"),s),g=H(a.get("barMaxWidth"),s),p=H(a.get("barMinWidth")||1,s),m=a.get("barGap"),y=a.get("barCategoryGap");r.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:p,barGap:m,barCategoryGap:y,axisKey:jv(n),stackId:Kv(a)})}),j_(r)}function j_(t){var e={};M(t,function(a,i){var n=a.axisKey,o=a.bandWidth,s=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;e[n]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=a.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var f=a.barMaxWidth;f&&(l[u].maxWidth=f);var c=a.barMinWidth;c&&(l[u].minWidth=c);var v=a.barGap;v!=null&&(s.gap=v);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var r={};return M(e,function(a,i){r[i]={};var n=a.stacks,o=a.bandWidth,s=H(a.categoryGap,o),l=H(a.gap,1),u=a.remainedWidth,h=a.autoWidthCount,f=(u-s)/(h+(h-1)*l);f=Math.max(f,0),M(n,function(g){var p=g.maxWidth,m=g.minWidth;if(g.width){var y=g.width;p&&(y=Math.min(y,p)),m&&(y=Math.max(y,m)),g.width=y,u-=y+l*y,h--}else{var y=f;p&&p<y&&(y=Math.min(p,u)),m&&m>y&&(y=m),y!==f&&(g.width=y,u-=y+l*y,h--)}}),f=(u-s)/(h+(h-1)*l),f=Math.max(f,0);var c=0,v;M(n,function(g,p){g.width||(g.width=f),v=g,c+=g.width*(1+l)}),v&&(c-=v.width*l);var d=-c/2;M(n,function(g,p){r[i][p]=r[i][p]||{bandWidth:o,offset:d,width:g.width},d+=g.width*(1+l)})}),r}function Q_(t,e,r){if(t&&e){var a=t[jv(e)];return a!=null&&r!=null&&(a=a[Kv(r)]),a}}function J_(t,e){var r=K_(t,e),a=Qv(r),i={};M(r,function(n){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=Kv(n),h=a[jv(l)][u],f=h.offset,c=h.width,v=s.getOtherAxis(l),d=n.get("barMinHeight")||0;i[u]=i[u]||[],o.setLayout({bandWidth:h.bandWidth,offset:f,size:c});for(var g=o.mapDimension(v.dim),p=o.mapDimension(l.dim),m=fa(o,g),y=v.isHorizontal(),_=r1(l,v,m),w=0,b=o.count();w<b;w++){var A=o.get(g,w),S=o.get(p,w),D=A>=0?"p":"n",I=_;m&&(i[u][S]||(i[u][S]={p:_,n:_}),I=i[u][S][D]);var L,P,R,E;if(y){var Z=s.dataToPoint([A,S]);L=I,P=Z[1]+f,R=Z[0]-_,E=c,Math.abs(R)<d&&(R=(R<0?-1:1)*d),isNaN(R)||m&&(i[u][S][D]+=R)}else{var Z=s.dataToPoint([S,A]);L=Z[0]+f,P=I,R=c,E=Z[1]-_,Math.abs(E)<d&&(E=(E<=0?-1:1)*d),isNaN(E)||m&&(i[u][S][D]+=E)}o.setItemLayout(w,{x:L,y:P,width:R,height:E})}},this)}var H2={seriesType:"bar",plan:Mn(),reset:function(t){if(!t1(t)||!e1(t))return;var e=t.getData(),r=t.coordinateSystem,a=r.grid.getRect(),i=r.getBaseAxis(),n=r.getOtherAxis(i),o=e.mapDimension(n.dim),s=e.mapDimension(i.dim),l=n.isHorizontal(),u=l?0:1,h=Q_(Qv([t]),i,t).width;return h>q_||(h=q_),{progress:f};function f(c,v){for(var d=c.count,g=new qv(d*2),p=new qv(d*2),m=new qv(d),y,_=[],w=[],b=0,A=0;(y=c.next())!=null;)w[u]=v.get(o,y),w[1-u]=v.get(s,y),_=r.dataToPoint(w,null,_),p[b]=l?a.x+a.width:_[0],g[b++]=_[0],p[b]=l?_[1]:a.y+a.height,g[b++]=_[1],m[A++]=y;v.setLayout({largePoints:g,largeDataIndices:m,largeBackgroundPoints:p,barWidth:h,valueAxisStart:r1(i,n,!1),backgroundStart:l?a.x:a.y,valueAxisHorizontal:l})}}};function t1(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function e1(t){return t.pipelineContext&&t.pipelineContext.large}function r1(t,e,r){return e.toGlobalCoord(e.dataToCoord(e.type==="log"?1:0))}var F2=Ur.prototype,a1=Math.ceil,i1=Math.floor,Nn=1e3,kn=Nn*60,vs=kn*60,Ht=vs*24,W2=function(t,e,r,a){for(;r<a;){var i=r+a>>>1;t[i][1]<e?r=i+1:a=i}return r},Jv=Ur.extend({type:"time",getLabel:function(t){var e=this._stepLvl,r=new Date(t);return ov(e[0],r,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Ht,e[1]+=Ht),e[1]===-1/0&&e[0]===1/0){var r=new Date;e[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),e[0]=e[1]-Ht}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval;t.fixMin||(e[0]=re(i1(e[0]/a)*a)),t.fixMax||(e[1]=re(a1(e[1]/a)*a))},niceTicks:function(t,e,r){t=t||10;var a=this._extent,i=a[1]-a[0],n=i/t;e!=null&&n<e&&(n=e),r!=null&&n>r&&(n=r);var o=td.length,s=W2(td,n,0,o),l=td[Math.min(s,o-1)],u=l[1];if(l[0]==="year"){var h=i/u,f=rv(h/t,!0);u*=f}var c=this.getSetting("useUTC")?0:new Date(+a[0]||+a[1]).getTimezoneOffset()*60*1e3,v=[Math.round(a1((a[0]-c)/u)*u+c),Math.round(i1((a[1]-c)/u)*u+c)];X_(v,a),this._stepLvl=l,this._interval=u,this._niceExtent=v},parse:function(t){return+$o(t)}});M(["contain","normalize"],function(t){Jv.prototype[t]=function(e){return F2[t].call(this,this.parse(e))}});var td=[["hh:mm:ss",Nn],["hh:mm:ss",Nn*5],["hh:mm:ss",Nn*10],["hh:mm:ss",Nn*15],["hh:mm:ss",Nn*30],[`hh:mm
*/var nD=!G.canvasSupported,Pl={canvas:pc},hi={},Cc="4.3.1";function Dc(t,e){var r=new Ic(k(),t,e);return hi[r.id]=r,r}function oD(t){if(t)t.dispose();else{for(var e in hi)hi.hasOwnProperty(e)&&hi[e].dispose();hi={}}return this}function sD(t){return hi[t]}function Mc(t,e){Pl[t]=e}function lD(t){delete hi[t]}var Ic=function(t,e,r){r=r||{},this.dom=e,this.id=t;var a=this,i=new Ff,n=r.renderer;if(nD){if(!Pl.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");n="vml"}else(!n||!Pl[n])&&(n="canvas");var o=new Pl[n](e,i,r,t);this.storage=i,this.painter=o;var s=!G.node&&!G.worker?new Tc(o.getViewportRoot(),o.root):null;this.handler=new hn(i,o,s,o.root),this.animation=new Il({stage:{update:it(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=i.delFromStorage,u=i.addToStorage;i.delFromStorage=function(h){l.call(i,h),h&&h.removeSelfFromZr(a)},i.addToStorage=function(h){u.call(i,h),h.addSelfToZr(a)}};Ic.prototype={constructor:Ic,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var r=this.painter.addHover(t,e);return this.refreshHover(),r}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,r){this.handler.on(t,e,r)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,lD(this.id)}};var uD=(Object.freeze||Object)({version:Cc,init:Dc,dispose:oD,getInstance:sD,registerPainter:Mc}),mn=M,yn=lt,hD=z,d0="series\0";function me(t){return t instanceof Array?t:t==null?[]:[t]}function fi(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var a=0,i=r.length;a<i;a++){var n=r[a];!t.emphasis[e].hasOwnProperty(n)&&t[e].hasOwnProperty(n)&&(t.emphasis[e][n]=t[e][n])}}}var g0=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Io(t){return yn(t)&&!hD(t)&&!(t instanceof Date)?t.value:t}function fD(t){return yn(t)&&!(t instanceof Array)}function Lc(t,e){e=(e||[]).slice();var r=V(t||[],function(a,i){return{exist:a}});return mn(e,function(a,i){if(!!yn(a)){for(var n=0;n<r.length;n++)if(!r[n].option&&a.id!=null&&r[n].exist.id===a.id+""){r[n].option=a,e[i]=null;return}for(var n=0;n<r.length;n++){var o=r[n].exist;if(!r[n].option&&(o.id==null||a.id==null)&&a.name!=null&&!El(a)&&!El(o)&&o.name===a.name+""){r[n].option=a,e[i]=null;return}}}}),mn(e,function(a,i){if(!!yn(a)){for(var n=0;n<r.length;n++){var o=r[n].exist;if(!r[n].option&&!El(o)&&a.id==null){r[n].option=a;break}}n>=r.length&&r.push({option:a})}}),r}function p0(t){var e=ht();mn(t,function(r,a){var i=r.exist;i&&e.set(i.id,r)}),mn(t,function(r,a){var i=r.option;gt(!i||i.id==null||!e.get(i.id)||e.get(i.id)===r,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&e.set(i.id,r),!r.keyInfo&&(r.keyInfo={})}),mn(t,function(r,a){var i=r.exist,n=r.option,o=r.keyInfo;if(!!yn(n)){if(o.name=n.name!=null?n.name+"":i?i.name:d0+a,i)o.id=i.id;else if(n.id!=null)o.id=n.id+"";else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,r)}})}function Pc(t){var e=t.name;return!!(e&&e.indexOf(d0))}function El(t){return yn(t)&&t.id&&(t.id+"").indexOf("\0_ec_\0")===0}function cD(t,e){var r={},a={};return i(t||[],r),i(e||[],a,r),[n(r),n(a)];function i(o,s,l){for(var u=0,h=o.length;u<h;u++)for(var f=o[u].seriesId,c=me(o[u].dataIndex),v=l&&l[f],d=0,g=c.length;d<g;d++){var p=c[d];v&&v[p]?v[p]=null:(s[f]||(s[f]={}))[p]=1}}function n(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var h=n(o[u],!0);h.length&&l.push({seriesId:u,dataIndex:h})}return l}}function Rl(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return z(e.dataIndex)?V(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return z(e.name)?V(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function Pe(){var t="__\0ec_inner_"+vD+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}var vD=0;function Ol(t,e,r){if(Lt(e)){var a={};a[e+"Index"]=0,e=a}var i=r&&r.defaultMainType;i&&!Ec(e,i+"Index")&&!Ec(e,i+"Id")&&!Ec(e,i+"Name")&&(e[i+"Index"]=0);var n={};return mn(e,function(l,s){var l=e[s];if(s==="dataIndex"||s==="dataIndexInside"){n[s]=l;return}var u=s.match(/^(\w+)(Index|Id|Name)$/)||[],h=u[1],f=(u[2]||"").toLowerCase();if(!(!h||!f||l==null||f==="index"&&l==="none"||r&&r.includeMainTypes&&yt(r.includeMainTypes,h)<0)){var c={mainType:h};(f!=="index"||l!=="all")&&(c[f]=l);var v=t.queryComponents(c);n[h+"Models"]=v,n[h+"Model"]=v[0]}}),n}function Ec(t,e){return t&&t.hasOwnProperty(e)}function m0(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function dD(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function y0(t){return t==="auto"?G.domSupported?"html":"richText":t||"html"}function Rc(t,e){var r=ht(),a=[];return M(t,function(i){var n=e(i);(r.get(n)||(a.push(n),r.set(n,[]))).push(i)}),{keys:a,buckets:r}}var gD=".",ci="___EC__COMPONENT__CONTAINER___";function Ma(t){var e={main:"",sub:""};return t&&(t=t.split(gD),e.main=t[0]||"",e.sub=t[1]||""),e}function pD(t){gt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Lo(t,e){t.$constructor=t,t.extend=function(r){T&&M(e,function(n){r[n]||console.warn("Method `"+n+"` should be implemented"+(r.type?" in "+r.type:"")+".")});var a=this,i=function(){r.$constructor?r.$constructor.apply(this,arguments):a.apply(this,arguments)};return et(i.prototype,r),i.extend=this.extend,i.superCall=yD,i.superApply=_D,It(i,this),i.superClass=a,i}}var mD=0;function Nl(t){var e=["__\0is_clz",mD++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,T&&gt(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(r){return!!(r&&r[e])}}function yD(t,e){var r=on(arguments,2);return this.superClass.prototype[e].apply(t,r)}function _D(t,e,r){return this.superClass.prototype[e].apply(t,r)}function kl(t,e){e=e||{};var r={};t.registerClass=function(n,o){if(o){if(pD(o),o=Ma(o),!o.sub)T&&r[o.main]&&console.warn(o.main+" exists."),r[o.main]=n;else if(o.sub!==ci){var s=a(o);s[o.sub]=n}}return n},t.getClass=function(n,o,s){var l=r[n];if(l&&l[ci]&&(l=o?l[o]:null),s&&!l)throw new Error(o?"Component "+n+"."+(o||"")+" not exists. Load it first.":n+".type should be specified.");return l},t.getClassesByMainType=function(n){n=Ma(n);var o=[],s=r[n.main];return s&&s[ci]?M(s,function(l,u){u!==ci&&o.push(l)}):o.push(s),o},t.hasClass=function(n){return n=Ma(n),!!r[n.main]},t.getAllClassMainTypes=function(){var n=[];return M(r,function(o,s){n.push(s)}),n},t.hasSubTypes=function(n){n=Ma(n);var o=r[n.main];return o&&o[ci]},t.parseClassType=Ma;function a(n){var o=r[n.main];return(!o||!o[ci])&&(o=r[n.main]={},o[ci]=!0),o}if(e.registerWhenExtend){var i=t.extend;i&&(t.extend=function(n){var o=i.call(this,n);return t.registerClass(o,n.type)})}return t}var _n=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(r,a,i){for(var n={},o=0;o<t.length;o++){var s=t[o][1];if(!(a&&yt(a,s)>=0||i&&yt(i,s)<0)){var l=r.getShallow(s);l!=null&&(n[t[o][0]]=l)}}return n}},xD=_n([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),wD={getLineStyle:function(t){var e=xD(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){t==null&&(t=1);var e=this.get("type"),r=Math.max(t,2),a=t*4;return e==="solid"||e==null?!1:e==="dashed"?[a,a]:[r,r]}},bD=_n([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),SD={getAreaStyle:function(t,e){return bD(this,t,e)}},zl=Math.pow,Ia=Math.sqrt,Bl=1e-8,_0=1e-4,x0=Ia(3),Vl=1/3,Or=wa(),rr=wa(),xn=wa();function La(t){return t>-Bl&&t<Bl}function w0(t){return t>Bl||t<-Bl}function De(t,e,r,a,i){var n=1-i;return n*n*(n*t+3*i*e)+i*i*(i*a+3*n*r)}function b0(t,e,r,a,i){var n=1-i;return 3*(((e-t)*n+2*(r-e)*i)*n+(a-r)*i*i)}function AD(t,e,r,a,i,n){var o=a+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,h=s*s-3*o*l,f=s*l-9*o*u,c=l*l-3*s*u,v=0;if(La(h)&&La(f))if(La(s))n[0]=0;else{var d=-l/s;d>=0&&d<=1&&(n[v++]=d)}else{var g=f*f-4*h*c;if(La(g)){var p=f/h,d=-s/o+p,m=-p/2;d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m)}else if(g>0){var y=Ia(g),_=h*s+1.5*o*(-f+y),w=h*s+1.5*o*(-f-y);_<0?_=-zl(-_,Vl):_=zl(_,Vl),w<0?w=-zl(-w,Vl):w=zl(w,Vl);var d=(-s-(_+w))/(3*o);d>=0&&d<=1&&(n[v++]=d)}else{var b=(2*h*s-3*o*f)/(2*Ia(h*h*h)),A=Math.acos(b)/3,S=Ia(h),D=Math.cos(A),d=(-s-2*S*D)/(3*o),m=(-s+S*(D+x0*Math.sin(A)))/(3*o),I=(-s+S*(D-x0*Math.sin(A)))/(3*o);d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m),I>=0&&I<=1&&(n[v++]=I)}}return v}function S0(t,e,r,a,i){var n=6*r-12*e+6*t,o=9*e+3*a-3*t-9*r,s=3*e-3*t,l=0;if(La(o)){if(w0(n)){var u=-s/n;u>=0&&u<=1&&(i[l++]=u)}}else{var h=n*n-4*o*s;if(La(h))i[0]=-n/(2*o);else if(h>0){var f=Ia(h),u=(-n+f)/(2*o),c=(-n-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function A0(t,e,r,a,i,n){var o=(e-t)*i+t,s=(r-e)*i+e,l=(a-r)*i+r,u=(s-o)*i+o,h=(l-s)*i+s,f=(h-u)*i+u;n[0]=t,n[1]=o,n[2]=u,n[3]=f,n[4]=f,n[5]=h,n[6]=l,n[7]=a}function TD(t,e,r,a,i,n,o,s,l,u,h){var f,c=.005,v=1/0,d,g,p,m;Or[0]=l,Or[1]=u;for(var y=0;y<1;y+=.05)rr[0]=De(t,r,i,o,y),rr[1]=De(e,a,n,s,y),p=ba(Or,rr),p<v&&(f=y,v=p);v=1/0;for(var _=0;_<32&&!(c<_0);_++)d=f-c,g=f+c,rr[0]=De(t,r,i,o,d),rr[1]=De(e,a,n,s,d),p=ba(rr,Or),d>=0&&p<v?(f=d,v=p):(xn[0]=De(t,r,i,o,g),xn[1]=De(e,a,n,s,g),m=ba(xn,Or),g<=1&&m<v?(f=g,v=m):c*=.5);return h&&(h[0]=De(t,r,i,o,f),h[1]=De(e,a,n,s,f)),Ia(v)}function be(t,e,r,a){var i=1-a;return i*(i*t+2*a*e)+a*a*r}function Oc(t,e,r,a){return 2*((1-a)*(e-t)+a*(r-e))}function CD(t,e,r,a,i){var n=t-2*e+r,o=2*(e-t),s=t-a,l=0;if(La(n)){if(w0(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var h=o*o-4*n*s;if(La(h)){var u=-o/(2*n);u>=0&&u<=1&&(i[l++]=u)}else if(h>0){var f=Ia(h),u=(-o+f)/(2*n),c=(-o-f)/(2*n);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function T0(t,e,r){var a=t+r-2*e;return a===0?.5:(t-e)/a}function Nc(t,e,r,a,i){var n=(e-t)*a+t,o=(r-e)*a+e,s=(o-n)*a+n;i[0]=t,i[1]=n,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function DD(t,e,r,a,i,n,o,s,l){var u,h=.005,f=1/0;Or[0]=o,Or[1]=s;for(var c=0;c<1;c+=.05){rr[0]=be(t,r,i,c),rr[1]=be(e,a,n,c);var v=ba(Or,rr);v<f&&(u=c,f=v)}f=1/0;for(var d=0;d<32&&!(h<_0);d++){var g=u-h,p=u+h;rr[0]=be(t,r,i,g),rr[1]=be(e,a,n,g);var v=ba(rr,Or);if(g>=0&&v<f)u=g,f=v;else{xn[0]=be(t,r,i,p),xn[1]=be(e,a,n,p);var m=ba(xn,Or);p<=1&&m<f?(u=p,f=m):h*=.5}}return l&&(l[0]=be(t,r,i,u),l[1]=be(e,a,n,u)),Ia(f)}var Ee=Math.min,Re=Math.max,kc=Math.sin,zc=Math.cos,vi=Math.PI*2,Gl=wa(),Hl=wa(),Fl=wa();function Po(t,e,r){if(t.length!==0){var a=t[0],i=a[0],n=a[0],o=a[1],s=a[1],l;for(l=1;l<t.length;l++)a=t[l],i=Ee(i,a[0]),n=Re(n,a[0]),o=Ee(o,a[1]),s=Re(s,a[1]);e[0]=i,e[1]=o,r[0]=n,r[1]=s}}function C0(t,e,r,a,i,n){i[0]=Ee(t,r),i[1]=Ee(e,a),n[0]=Re(t,r),n[1]=Re(e,a)}var D0=[],M0=[];function MD(t,e,r,a,i,n,o,s,l,u){var h=S0,f=De,c,v=h(t,r,i,o,D0);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,c=0;c<v;c++){var d=f(t,r,i,o,D0[c]);l[0]=Ee(d,l[0]),u[0]=Re(d,u[0])}for(v=h(e,a,n,s,M0),c=0;c<v;c++){var g=f(e,a,n,s,M0[c]);l[1]=Ee(g,l[1]),u[1]=Re(g,u[1])}l[0]=Ee(t,l[0]),u[0]=Re(t,u[0]),l[0]=Ee(o,l[0]),u[0]=Re(o,u[0]),l[1]=Ee(e,l[1]),u[1]=Re(e,u[1]),l[1]=Ee(s,l[1]),u[1]=Re(s,u[1])}function ID(t,e,r,a,i,n,o,s){var l=T0,u=be,h=Re(Ee(l(t,r,i),1),0),f=Re(Ee(l(e,a,n),1),0),c=u(t,r,i,h),v=u(e,a,n,f);o[0]=Ee(t,i,c),o[1]=Ee(e,n,v),s[0]=Re(t,i,c),s[1]=Re(e,n,v)}function LD(t,e,r,a,i,n,o,s,l){var u=ea,h=ra,f=Math.abs(i-n);if(f%vi<1e-4&&f>1e-4){s[0]=t-r,s[1]=e-a,l[0]=t+r,l[1]=e+a;return}if(Gl[0]=zc(i)*r+t,Gl[1]=kc(i)*a+e,Hl[0]=zc(n)*r+t,Hl[1]=kc(n)*a+e,u(s,Gl,Hl),h(l,Gl,Hl),i=i%vi,i<0&&(i=i+vi),n=n%vi,n<0&&(n=n+vi),i>n&&!o?n+=vi:i<n&&o&&(i+=vi),o){var c=n;n=i,i=c}for(var v=0;v<n;v+=Math.PI/2)v>i&&(Fl[0]=zc(v)*r+t,Fl[1]=kc(v)*a+e,u(s,Fl,s),h(l,Fl,l))}var Zt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Nr=[],Pa=[],kr=[],zr=[],I0=Math.min,L0=Math.max,Eo=Math.cos,Ro=Math.sin,Wl=Math.sqrt,wn=Math.abs,Bc=typeof Float32Array<"u",Oe=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Oe.prototype={constructor:Oe,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,r){r=r||0,this._ux=wn(r/pl/t)||0,this._uy=wn(r/pl/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Zt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var r=wn(t-this._xi)>this._ux||wn(e-this._yi)>this._uy||this._len<5;return this.addData(Zt.L,t,e),this._ctx&&r&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,r,a,i,n){return this.addData(Zt.C,t,e,r,a,i,n),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,r,a,i,n):this._ctx.bezierCurveTo(t,e,r,a,i,n)),this._xi=i,this._yi=n,this},quadraticCurveTo:function(t,e,r,a){return this.addData(Zt.Q,t,e,r,a),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,r,a):this._ctx.quadraticCurveTo(t,e,r,a)),this._xi=r,this._yi=a,this},arc:function(t,e,r,a,i,n){return this.addData(Zt.A,t,e,r,r,a,i-a,0,n?0:1),this._ctx&&this._ctx.arc(t,e,r,a,i,n),this._xi=Eo(i)*r+t,this._yi=Ro(i)*r+e,this},arcTo:function(t,e,r,a,i){return this._ctx&&this._ctx.arcTo(t,e,r,a,i),this},rect:function(t,e,r,a){return this._ctx&&this._ctx.rect(t,e,r,a),this.addData(Zt.R,t,e,r,a),this},closePath:function(){this.addData(Zt.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,r),t.closePath()),this._xi=e,this._yi=r,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,r=0;r<t.length;r++)e+=t[r];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;!(this.data&&this.data.length===e)&&Bc&&(this.data=new Float32Array(e));for(var r=0;r<e;r++)this.data[r]=t[r];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,r=0,a=this._len,i=0;i<e;i++)r+=t[i].len();Bc&&this.data instanceof Float32Array&&(this.data=new Float32Array(a+r));for(var i=0;i<e;i++)for(var n=t[i].data,o=0;o<n.length;o++)this.data[a++]=n[o];this._len=a},addData:function(t){if(!!this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var r=0;r<arguments.length;r++)e[this._len++]=arguments[r];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var r=this._dashSum,a=this._dashOffset,i=this._lineDash,n=this._ctx,o=this._xi,s=this._yi,l=t-o,u=e-s,h=Wl(l*l+u*u),f=o,c=s,v,d=i.length,g;for(l/=h,u/=h,a<0&&(a=r+a),a%=r,f-=a*l,c-=a*u;l>0&&f<=t||l<0&&f>=t||l===0&&(u>0&&c<=e||u<0&&c>=e);)g=this._dashIdx,v=i[g],f+=l*v,c+=u*v,this._dashIdx=(g+1)%d,!(l>0&&f<o||l<0&&f>o||u>0&&c<s||u<0&&c>s)&&n[g%2?"moveTo":"lineTo"](l>=0?I0(f,t):L0(f,t),u>=0?I0(c,e):L0(c,e));l=f-t,u=c-e,this._dashOffset=-Wl(l*l+u*u)},_dashedBezierTo:function(t,e,r,a,i,n){var o=this._dashSum,s=this._dashOffset,l=this._lineDash,u=this._ctx,h=this._xi,f=this._yi,c,v,d,g=De,p=0,m=this._dashIdx,y=l.length,_,w,b=0;for(s<0&&(s=o+s),s%=o,c=0;c<1;c+=.1)v=g(h,t,r,i,c+.1)-g(h,t,r,i,c),d=g(f,e,a,n,c+.1)-g(f,e,a,n,c),p+=Wl(v*v+d*d);for(;m<y&&(b+=l[m],!(b>s));m++);for(c=(b-s)/p;c<=1;)_=g(h,t,r,i,c),w=g(f,e,a,n,c),m%2?u.moveTo(_,w):u.lineTo(_,w),c+=l[m]/p,m=(m+1)%y;m%2!==0&&u.lineTo(i,n),v=i-_,d=n-w,this._dashOffset=-Wl(v*v+d*d)},_dashedQuadraticTo:function(t,e,r,a){var i=r,n=a;r=(r+2*t)/3,a=(a+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,r,a,i,n)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Bc&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Nr[0]=Nr[1]=kr[0]=kr[1]=Number.MAX_VALUE,Pa[0]=Pa[1]=zr[0]=zr[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,r=0,a=0,i=0,n=0;n<t.length;){var o=t[n++];switch(n===1&&(e=t[n],r=t[n+1],a=e,i=r),o){case Zt.M:a=t[n++],i=t[n++],e=a,r=i,kr[0]=a,kr[1]=i,zr[0]=a,zr[1]=i;break;case Zt.L:C0(e,r,t[n],t[n+1],kr,zr),e=t[n++],r=t[n++];break;case Zt.C:MD(e,r,t[n++],t[n++],t[n++],t[n++],t[n],t[n+1],kr,zr),e=t[n++],r=t[n++];break;case Zt.Q:ID(e,r,t[n++],t[n++],t[n],t[n+1],kr,zr),e=t[n++],r=t[n++];break;case Zt.A:var s=t[n++],l=t[n++],u=t[n++],h=t[n++],f=t[n++],c=t[n++]+f;n+=1;var v=1-t[n++];n===1&&(a=Eo(f)*u+s,i=Ro(f)*h+l),LD(s,l,u,h,f,c,v,kr,zr),e=Eo(c)*u+s,r=Ro(c)*h+l;break;case Zt.R:a=e=t[n++],i=r=t[n++];var d=t[n++],g=t[n++];C0(a,i,a+d,i+g,kr,zr);break;case Zt.Z:e=a,r=i;break}ea(Nr,Nr,kr),ra(Pa,Pa,zr)}return n===0&&(Nr[0]=Nr[1]=Pa[0]=Pa[1]=0),new vt(Nr[0],Nr[1],Pa[0]-Nr[0],Pa[1]-Nr[1])},rebuildPath:function(t){for(var e=this.data,r,a,i,n,o,s,l=this._ux,u=this._uy,h=this._len,f=0;f<h;){var c=e[f++];switch(f===1&&(i=e[f],n=e[f+1],r=i,a=n),c){case Zt.M:r=i=e[f++],a=n=e[f++],t.moveTo(i,n);break;case Zt.L:o=e[f++],s=e[f++],(wn(o-i)>l||wn(s-n)>u||f===h-1)&&(t.lineTo(o,s),i=o,n=s);break;case Zt.C:t.bezierCurveTo(e[f++],e[f++],e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case Zt.Q:t.quadraticCurveTo(e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case Zt.A:var v=e[f++],d=e[f++],g=e[f++],p=e[f++],m=e[f++],y=e[f++],_=e[f++],w=e[f++],b=g>p?g:p,A=g>p?1:g/p,S=g>p?p/g:1,D=Math.abs(g-p)>.001,I=m+y;D?(t.translate(v,d),t.rotate(_),t.scale(A,S),t.arc(0,0,b,m,I,1-w),t.scale(1/A,1/S),t.rotate(-_),t.translate(-v,-d)):t.arc(v,d,b,m,I,1-w),f===1&&(r=Eo(m)*g+v,a=Ro(m)*p+d),i=Eo(I)*g+v,n=Ro(I)*p+d;break;case Zt.R:r=i=e[f],a=n=e[f+1],t.rect(e[f++],e[f++],e[f++],e[f++]);break;case Zt.Z:t.closePath(),i=r,n=a}}}},Oe.CMD=Zt;function Ea(t,e,r,a,i,n,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>a+s||o<e-s&&o<a-s||n>t+s&&n>r+s||n<t-s&&n<r-s)return!1;if(t!==r)l=(e-a)/(t-r),u=(t*a-r*e)/(t-r);else return Math.abs(n-t)<=s/2;var h=l*n-o+u,f=h*h/(l*l+1);return f<=s/2*s/2}function PD(t,e,r,a,i,n,o,s,l,u,h){if(l===0)return!1;var f=l;if(h>e+f&&h>a+f&&h>n+f&&h>s+f||h<e-f&&h<a-f&&h<n-f&&h<s-f||u>t+f&&u>r+f&&u>i+f&&u>o+f||u<t-f&&u<r-f&&u<i-f&&u<o-f)return!1;var c=TD(t,e,r,a,i,n,o,s,u,h,null);return c<=f/2}function P0(t,e,r,a,i,n,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>a+u&&l>n+u||l<e-u&&l<a-u&&l<n-u||s>t+u&&s>r+u&&s>i+u||s<t-u&&s<r-u&&s<i-u)return!1;var h=DD(t,e,r,a,i,n,s,l,null);return h<=u/2}var E0=Math.PI*2;function Ra(t){return t%=E0,t<0&&(t+=E0),t}var Oo=Math.PI*2;function ED(t,e,r,a,i,n,o,s,l){if(o===0)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>r||h+u<r)return!1;if(Math.abs(a-i)%Oo<1e-4)return!0;if(n){var f=a;a=Ra(i),i=Ra(f)}else a=Ra(a),i=Ra(i);a>i&&(i+=Oo);var c=Math.atan2(l,s);return c<0&&(c+=Oo),c>=a&&c<=i||c+Oo>=a&&c+Oo<=i}function oa(t,e,r,a,i,n){if(n>e&&n>a||n<e&&n<a||a===e)return 0;var o=a<e?1:-1,s=(n-e)/(a-e);(s===1||s===0)&&(o=a<e?.5:-.5);var l=s*(r-t)+t;return l===i?1/0:l>i?o:0}var Oa=Oe.CMD,bn=Math.PI*2,RD=1e-4;function OD(t,e){return Math.abs(t-e)<RD}var Me=[-1,-1,-1],ar=[-1,-1];function ND(){var t=ar[0];ar[0]=ar[1],ar[1]=t}function kD(t,e,r,a,i,n,o,s,l,u){if(u>e&&u>a&&u>n&&u>s||u<e&&u<a&&u<n&&u<s)return 0;var h=AD(e,a,n,s,u,Me);if(h===0)return 0;for(var f=0,c=-1,v,d,g=0;g<h;g++){var p=Me[g],m=p===0||p===1?.5:1,y=De(t,r,i,o,p);y<l||(c<0&&(c=S0(e,a,n,s,ar),ar[1]<ar[0]&&c>1&&ND(),v=De(e,a,n,s,ar[0]),c>1&&(d=De(e,a,n,s,ar[1]))),c===2?p<ar[0]?f+=v<e?m:-m:p<ar[1]?f+=d<v?m:-m:f+=s<d?m:-m:p<ar[0]?f+=v<e?m:-m:f+=s<v?m:-m)}return f}function zD(t,e,r,a,i,n,o,s){if(s>e&&s>a&&s>n||s<e&&s<a&&s<n)return 0;var l=CD(e,a,n,s,Me);if(l===0)return 0;var u=T0(e,a,n);if(u>=0&&u<=1){for(var h=0,f=be(e,a,n,u),c=0;c<l;c++){var v=Me[c]===0||Me[c]===1?.5:1,d=be(t,r,i,Me[c]);d<o||(Me[c]<u?h+=f<e?v:-v:h+=n<f?v:-v)}return h}else{var v=Me[0]===0||Me[0]===1?.5:1,d=be(t,r,i,Me[0]);return d<o?0:n<e?v:-v}}function BD(t,e,r,a,i,n,o,s){if(s-=e,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Me[0]=-l,Me[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u%bn<1e-4){a=0,i=bn;var h=n?1:-1;return o>=Me[0]+t&&o<=Me[1]+t?h:0}if(n){var l=a;a=Ra(i),i=Ra(l)}else a=Ra(a),i=Ra(i);a>i&&(i+=bn);for(var f=0,c=0;c<2;c++){var v=Me[c];if(v+t>o){var d=Math.atan2(s,v),h=n?1:-1;d<0&&(d=bn+d),(d>=a&&d<=i||d+bn>=a&&d+bn<=i)&&(d>Math.PI/2&&d<Math.PI*1.5&&(h=-h),f+=h)}}return f}function R0(t,e,r,a,i){for(var n=0,o=0,s=0,l=0,u=0,h=0;h<t.length;){var f=t[h++];switch(f===Oa.M&&h>1&&(r||(n+=oa(o,s,l,u,a,i))),h===1&&(o=t[h],s=t[h+1],l=o,u=s),f){case Oa.M:l=t[h++],u=t[h++],o=l,s=u;break;case Oa.L:if(r){if(Ea(o,s,t[h],t[h+1],e,a,i))return!0}else n+=oa(o,s,t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.C:if(r){if(PD(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=kD(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.Q:if(r){if(P0(o,s,t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=zD(o,s,t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.A:var c=t[h++],v=t[h++],d=t[h++],g=t[h++],p=t[h++],m=t[h++];h+=1;var y=1-t[h++],A=Math.cos(p)*d+c,S=Math.sin(p)*g+v;h>1?n+=oa(o,s,A,S,a,i):(l=A,u=S);var _=(a-c)*g/d+c;if(r){if(ED(c,v,g,p,p+m,y,e,_,i))return!0}else n+=BD(c,v,g,p,p+m,y,_,i);o=Math.cos(p+m)*d+c,s=Math.sin(p+m)*g+v;break;case Oa.R:l=o=t[h++],u=s=t[h++];var w=t[h++],b=t[h++],A=l+w,S=u+b;if(r){if(Ea(l,u,A,u,e,a,i)||Ea(A,u,A,S,e,a,i)||Ea(A,S,l,S,e,a,i)||Ea(l,S,l,u,e,a,i))return!0}else n+=oa(A,u,A,S,a,i),n+=oa(l,S,l,u,a,i);break;case Oa.Z:if(r){if(Ea(o,s,l,u,e,a,i))return!0}else n+=oa(o,s,l,u,a,i);o=l,s=u;break}}return!r&&!OD(s,u)&&(n+=oa(o,s,l,u,a,i)||0),n!==0}function VD(t,e,r){return R0(t,0,!1,e,r)}function GD(t,e,r,a){return R0(t,e,!0,r,a)}var O0=Xf.prototype.getCanvasPattern,Vc=Math.abs,HD=new Oe(!0);function pt(t){Le.call(this,t),this.path=null}pt.prototype={constructor:pt,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var r=this.style,a=this.path||HD,i=r.hasStroke(),n=r.hasFill(),o=r.fill,s=r.stroke,l=n&&!!o.colorStops,u=i&&!!s.colorStops,h=n&&!!o.image,f=i&&!!s.image;if(r.bind(t,this,e),this.setTransform(t),this.__dirty){var c;l&&(c=c||this.getBoundingRect(),this._fillGradient=r.getGradient(t,o,c)),u&&(c=c||this.getBoundingRect(),this._strokeGradient=r.getGradient(t,s,c))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=O0.call(o,t)),u?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=O0.call(s,t));var v=r.lineDash,d=r.lineDashOffset,g=!!t.setLineDash,p=this.getGlobalScale();if(a.setScale(p[0],p[1],this.segmentIgnoreThreshold),this.__dirtyPath||v&&!g&&i?(a.beginPath(t),v&&!g&&(a.setLineDash(v),a.setLineDashOffset(d)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),n)if(r.fillOpacity!=null){var m=t.globalAlpha;t.globalAlpha=r.fillOpacity*r.opacity,a.fill(t),t.globalAlpha=m}else a.fill(t);if(v&&g&&(t.setLineDash(v),t.lineDashOffset=d),i)if(r.strokeOpacity!=null){var m=t.globalAlpha;t.globalAlpha=r.strokeOpacity*r.opacity,a.stroke(t),t.globalAlpha=m}else a.stroke(t);v&&g&&t.setLineDash([]),r.text!=null&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,r){},createPathProxy:function(){this.path=new Oe},getBoundingRect:function(){var t=this._rect,e=this.style,r=!t;if(r){var a=this.path;a||(a=this.path=new Oe),this.__dirtyPath&&(a.beginPath(),this.buildPath(a,this.shape,!1)),t=a.getBoundingRect()}if(this._rect=t,e.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||r){i.copy(t);var n=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(n=Math.max(n,this.strokeContainThreshold||4)),o>1e-10&&(i.width+=n/o,i.height+=n/o,i.x-=n/o/2,i.y-=n/o/2)}return i}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect(),i=this.style;if(t=r[0],e=r[1],a.contain(t,e)){var n=this.path.data;if(i.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(i.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),GD(n,o/s,t,e)))return!0}if(i.hasFill())return VD(n,t,e)}return!1},dirty:function(t){t==null&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){t==="shape"?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Le.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(lt(t))for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a]);else r[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Vc(t[0]-1)>1e-10&&Vc(t[3]-1)>1e-10?Math.sqrt(Vc(t[0]*t[3]-t[2]*t[1])):1}},pt.extend=function(t){var e=function(a){pt.call(this,a),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,a)};It(e,pt);for(var r in t)r!=="style"&&r!=="shape"&&(e.prototype[r]=t[r]);return e},It(pt,Le);var Sn=Oe.CMD,FD=[[],[],[]],N0=Math.sqrt,WD=Math.atan2,UD=function(t,e){var r=t.data,a,i,n,o,s,l,u=Sn.M,h=Sn.C,f=Sn.L,c=Sn.R,v=Sn.A,d=Sn.Q;for(n=0,o=0;n<r.length;){switch(a=r[n++],o=n,i=0,a){case u:i=1;break;case f:i=1;break;case h:i=3;break;case d:i=2;break;case v:var g=e[4],p=e[5],m=N0(e[0]*e[0]+e[1]*e[1]),y=N0(e[2]*e[2]+e[3]*e[3]),_=WD(-e[1]/y,e[0]/m);r[n]*=m,r[n++]+=g,r[n]*=y,r[n++]+=p,r[n++]*=m,r[n++]*=y,r[n++]+=_,r[n++]+=_,n+=2,o=n;break;case c:l[0]=r[n++],l[1]=r[n++],Pt(l,l,e),r[o++]=l[0],r[o++]=l[1],l[0]+=r[n++],l[1]+=r[n++],Pt(l,l,e),r[o++]=l[0],r[o++]=l[1]}for(s=0;s<i;s++){var l=FD[s];l[0]=r[n++],l[1]=r[n++],Pt(l,l,e),r[o++]=l[0],r[o++]=l[1]}}},Gc=Math.sqrt,Ul=Math.sin,$l=Math.cos,Zl=Math.PI,k0=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Hc=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(k0(t)*k0(e))},z0=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Hc(t,e))};function B0(t,e,r,a,i,n,o,s,l,u,h){var f=l*(Zl/180),c=$l(f)*(t-r)/2+Ul(f)*(e-a)/2,v=-1*Ul(f)*(t-r)/2+$l(f)*(e-a)/2,d=c*c/(o*o)+v*v/(s*s);d>1&&(o*=Gc(d),s*=Gc(d));var g=(i===n?-1:1)*Gc((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,p=g*o*v/s,m=g*-s*c/o,y=(t+r)/2+$l(f)*p-Ul(f)*m,_=(e+a)/2+Ul(f)*p+$l(f)*m,w=z0([1,0],[(c-p)/o,(v-m)/s]),b=[(c-p)/o,(v-m)/s],A=[(-1*c-p)/o,(-1*v-m)/s],S=z0(b,A);Hc(b,A)<=-1&&(S=Zl),Hc(b,A)>=1&&(S=0),n===0&&S>0&&(S=S-2*Zl),n===1&&S<0&&(S=S+2*Zl),h.addData(u,y,_,o,s,w,S,f,n)}var $D=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,ZD=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function YD(t){if(!t)return new Oe;for(var e=0,r=0,a=e,i=r,n,o=new Oe,s=Oe.CMD,l=t.match($D),u=0;u<l.length;u++){for(var h=l[u],f=h.charAt(0),c,v=h.match(ZD)||[],d=v.length,g=0;g<d;g++)v[g]=parseFloat(v[g]);for(var p=0;p<d;){var m,y,_,w,b,A,S,D=e,I=r;switch(f){case"l":e+=v[p++],r+=v[p++],c=s.L,o.addData(c,e,r);break;case"L":e=v[p++],r=v[p++],c=s.L,o.addData(c,e,r);break;case"m":e+=v[p++],r+=v[p++],c=s.M,o.addData(c,e,r),a=e,i=r,f="l";break;case"M":e=v[p++],r=v[p++],c=s.M,o.addData(c,e,r),a=e,i=r,f="L";break;case"h":e+=v[p++],c=s.L,o.addData(c,e,r);break;case"H":e=v[p++],c=s.L,o.addData(c,e,r);break;case"v":r+=v[p++],c=s.L,o.addData(c,e,r);break;case"V":r=v[p++],c=s.L,o.addData(c,e,r);break;case"C":c=s.C,o.addData(c,v[p++],v[p++],v[p++],v[p++],v[p++],v[p++]),e=v[p-2],r=v[p-1];break;case"c":c=s.C,o.addData(c,v[p++]+e,v[p++]+r,v[p++]+e,v[p++]+r,v[p++]+e,v[p++]+r),e+=v[p-2],r+=v[p-1];break;case"S":m=e,y=r;var L=o.len(),P=o.data;n===s.C&&(m+=e-P[L-4],y+=r-P[L-3]),c=s.C,D=v[p++],I=v[p++],e=v[p++],r=v[p++],o.addData(c,m,y,D,I,e,r);break;case"s":m=e,y=r;var L=o.len(),P=o.data;n===s.C&&(m+=e-P[L-4],y+=r-P[L-3]),c=s.C,D=e+v[p++],I=r+v[p++],e+=v[p++],r+=v[p++],o.addData(c,m,y,D,I,e,r);break;case"Q":D=v[p++],I=v[p++],e=v[p++],r=v[p++],c=s.Q,o.addData(c,D,I,e,r);break;case"q":D=v[p++]+e,I=v[p++]+r,e+=v[p++],r+=v[p++],c=s.Q,o.addData(c,D,I,e,r);break;case"T":m=e,y=r;var L=o.len(),P=o.data;n===s.Q&&(m+=e-P[L-4],y+=r-P[L-3]),e=v[p++],r=v[p++],c=s.Q,o.addData(c,m,y,e,r);break;case"t":m=e,y=r;var L=o.len(),P=o.data;n===s.Q&&(m+=e-P[L-4],y+=r-P[L-3]),e+=v[p++],r+=v[p++],c=s.Q,o.addData(c,m,y,e,r);break;case"A":_=v[p++],w=v[p++],b=v[p++],A=v[p++],S=v[p++],D=e,I=r,e=v[p++],r=v[p++],c=s.A,B0(D,I,e,r,A,S,_,w,b,c,o);break;case"a":_=v[p++],w=v[p++],b=v[p++],A=v[p++],S=v[p++],D=e,I=r,e+=v[p++],r+=v[p++],c=s.A,B0(D,I,e,r,A,S,_,w,b,c,o);break}}(f==="z"||f==="Z")&&(c=s.Z,o.addData(c),e=a,r=i),n=c}return o.toStatic(),o}function V0(t,e){var r=YD(t);return e=e||{},e.buildPath=function(a){if(a.setData){a.setData(r.data);var i=a.getContext();i&&a.rebuildPath(i)}else{var i=a;r.rebuildPath(i)}},e.applyTransform=function(a){UD(r,a),this.dirty(!0)},e}function G0(t,e){return new pt(V0(t,e))}function XD(t,e){return pt.extend(V0(t,e))}function qD(t,e){for(var r=[],a=t.length,i=0;i<a;i++){var n=t[i];n.path||n.createPathProxy(),n.__dirtyPath&&n.buildPath(n.path,n.shape,!0),r.push(n.path)}var o=new pt(e);return o.createPathProxy(),o.buildPath=function(s){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l)},o}var dt=function(t){Le.call(this,t)};dt.prototype={constructor:dt,type:"text",brush:function(t,e){var r=this.style;this.__dirty&&Mo(r,!0),r.fill=r.stroke=r.shadowBlur=r.shadowColor=r.shadowOffsetX=r.shadowOffsetY=null;var a=r.text;if(a!=null&&(a+=""),!cc(a,r)){t.__attrCachedBy=Ca.NONE;return}this.setTransform(t),a0(this,t,a,r,null,e),this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&Mo(t,!0),!this._rect){var e=t.text;e!=null?e+="":e="";var r=Rr(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(r.x+=t.x||0,r.y+=t.y||0,hc(t.textStroke,t.textStrokeWidth)){var a=t.textStrokeWidth;r.x-=a/2,r.y-=a/2,r.width+=a,r.height+=a}this._rect=r}return this._rect}},It(dt,Le);var Br=pt.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,r){r&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2,!0)}}),Na=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Fc=function(t){return G.browser.ie&&G.browser.version>=11?function(){var e=this.__clipPaths,r=this.style,a;if(e)for(var i=0;i<e.length;i++){var n=e[i],o=n&&n.shape,s=n&&n.type;if(o&&(s==="sector"&&o.startAngle===o.endAngle||s==="rect"&&(!o.width||!o.height))){for(var l=0;l<Na.length;l++)Na[l][2]=r[Na[l][0]],r[Na[l][0]]=Na[l][1];a=!0;break}}if(t.apply(this,arguments),a)for(var l=0;l<Na.length;l++)r[Na[l][0]]=Na[l][2]}:t},Ar=pt.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:Fc(pt.prototype.brush),buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r0||0,0),n=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(o),h=Math.sin(o);t.moveTo(u*i+r,h*i+a),t.lineTo(u*n+r,h*n+a),t.arc(r,a,n,o,s,!l),t.lineTo(Math.cos(s)*i+r,Math.sin(s)*i+a),i!==0&&t.arc(r,a,i,s,o,l),t.closePath()}}),Yl=pt.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.PI*2;t.moveTo(r+e.r,a),t.arc(r,a,e.r,0,i,!1),t.moveTo(r+e.r0,a),t.arc(r,a,e.r0,0,i,!0)}});function H0(t,e,r,a,i,n,o){var s=(r-t)*.5,l=(a-e)*.5;return(2*(e-r)+s+l)*o+(-3*(e-r)-2*s-l)*n+s*i+e}var KD=function(t,e){for(var r=t.length,a=[],i=0,n=1;n<r;n++)i+=_o(t[n-1],t[n]);var o=i/2;o=o<r?r:o;for(var n=0;n<o;n++){var s=n/(o-1)*(e?r:r-1),l=Math.floor(s),u=s-l,h,f=t[l%r],c,v;e?(h=t[(l-1+r)%r],c=t[(l+1)%r],v=t[(l+2)%r]):(h=t[l===0?l:l-1],c=t[l>r-2?r-1:l+1],v=t[l>r-3?r-1:l+2]);var d=u*u,g=u*d;a.push([H0(h[0],f[0],c[0],v[0],u,d,g),H0(h[1],f[1],c[1],v[1],u,d,g)])}return a},jD=function(t,e,r,a){var i=[],n=[],o=[],s=[],l,u,h,f;if(a){h=[1/0,1/0],f=[-1/0,-1/0];for(var c=0,v=t.length;c<v;c++)ea(h,h,t[c]),ra(f,f,t[c]);ea(h,h,a[0]),ra(f,f,a[1])}for(var c=0,v=t.length;c<v;c++){var d=t[c];if(r)l=t[c?c-1:v-1],u=t[(c+1)%v];else if(c===0||c===v-1){i.push(mr(t[c]));continue}else l=t[c-1],u=t[c+1];Jr(n,u,l),hl(n,n,e);var g=_o(d,l),p=_o(d,u),m=g+p;m!==0&&(g/=m,p/=m),hl(o,n,-g),hl(s,n,p);var y=df([],d,o),_=df([],d,s);a&&(ra(y,y,h),ea(y,y,f),ra(_,_,h),ea(_,_,f)),i.push(y),i.push(_)}return r&&i.push(i.shift()),i};function F0(t,e,r){var a=e.points,i=e.smooth;if(a&&a.length>=2){if(i&&i!=="spline"){var n=jD(a,i,r,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(r?o:o-1);s++){var l=n[s*2],u=n[s*2+1],h=a[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{i==="spline"&&(a=KD(a,r)),t.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s<f;s++)t.lineTo(a[s][0],a[s][1])}r&&t.closePath()}}var Ge=pt.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){F0(t,e,!0)}}),ir=pt.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){F0(t,e,!1)}}),An=Math.round;function W0(t,e,r){if(!!e){var a=e.x1,i=e.x2,n=e.y1,o=e.y2;t.x1=a,t.x2=i,t.y1=n,t.y2=o;var s=r&&r.lineWidth;!s||(An(a*2)===An(i*2)&&(t.x1=t.x2=di(a,s,!0)),An(n*2)===An(o*2)&&(t.y1=t.y2=di(n,s,!0)))}}function U0(t,e,r){if(!!e){var a=e.x,i=e.y,n=e.width,o=e.height;t.x=a,t.y=i,t.width=n,t.height=o;var s=r&&r.lineWidth;!s||(t.x=di(a,s,!0),t.y=di(i,s,!0),t.width=Math.max(di(a+n,s,!1)-t.x,n===0?0:1),t.height=Math.max(di(i+o,s,!1)-t.y,o===0?0:1))}}function di(t,e,r){if(!e)return t;var a=An(t*2);return(a+An(e))%2===0?a/2:(a+(r?1:-1))/2}var gi={},xt=pt.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var r,a,i,n;this.subPixelOptimize?(U0(gi,e,this.style),r=gi.x,a=gi.y,i=gi.width,n=gi.height,gi.r=e.r,e=gi):(r=e.x,a=e.y,i=e.width,n=e.height),e.r?Qm(t,e):t.rect(r,a,i,n),t.closePath()}}),No={},ye=pt.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r,a,i,n;this.subPixelOptimize?(W0(No,e,this.style),r=No.x1,a=No.y1,i=No.x2,n=No.y2):(r=e.x1,a=e.y1,i=e.x2,n=e.y2);var o=e.percent;o!==0&&(t.moveTo(r,a),o<1&&(i=r*(1-o)+i*o,n=a*(1-o)+n*o),t.lineTo(i,n))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Ne=[];function $0(t,e,r){var a=t.cpx2,i=t.cpy2;return a===null||i===null?[(r?b0:De)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?b0:De)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?Oc:be)(t.x1,t.cpx1,t.x2,e),(r?Oc:be)(t.y1,t.cpy1,t.y2,e)]}var Xl=pt.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.x1,a=e.y1,i=e.x2,n=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;h!==0&&(t.moveTo(r,a),l==null||u==null?(h<1&&(Nc(r,o,i,h,Ne),o=Ne[1],i=Ne[2],Nc(a,s,n,h,Ne),s=Ne[1],n=Ne[2]),t.quadraticCurveTo(o,s,i,n)):(h<1&&(A0(r,o,l,i,h,Ne),o=Ne[1],l=Ne[2],i=Ne[3],A0(a,s,u,n,h,Ne),s=Ne[1],u=Ne[2],n=Ne[3]),t.bezierCurveTo(o,s,l,u,i,n)))},pointAt:function(t){return $0(this.shape,t,!1)},tangentAt:function(t){var e=$0(this.shape,t,!0);return ln(e,e)}}),Wc=pt.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r,0),n=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(n),u=Math.sin(n);t.moveTo(l*i+r,u*i+a),t.arc(r,a,i,n,o,!s)}}),Z0=pt.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,r=0;r<e.length;r++)t=t||e[r].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),r=0;r<t.length;r++)t[r].path||t[r].createPathProxy(),t[r].path.setScale(e[0],e[1],t[r].segmentIgnoreThreshold)},buildPath:function(t,e){for(var r=e.paths||[],a=0;a<r.length;a++)r[a].buildPath(t,r[a].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),pt.prototype.getBoundingRect.call(this)}}),Vr=function(t){this.colorStops=t||[]};Vr.prototype={constructor:Vr,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var pi=function(t,e,r,a,i,n){this.x=t??0,this.y=e??0,this.x2=r??1,this.y2=a??0,this.type="linear",this.global=n||!1,Vr.call(this,i)};pi.prototype={constructor:pi},It(pi,Vr);var ql=function(t,e,r,a,i){this.x=t??.5,this.y=e??.5,this.r=r??.5,this.type="radial",this.global=i||!1,Vr.call(this,a)};ql.prototype={constructor:ql},It(ql,Vr);function He(t){Le.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}He.prototype.incremental=!0,He.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},He.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},He.prototype.addDisplayables=function(t,e){e=e||!1;for(var r=0;r<t.length;r++)this.addDisplayable(t[r],e)},He.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},He.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},He.prototype.brush=function(t,e){for(var r=this._cursor;r<this._displayables.length;r++){var a=this._displayables[r];a.beforeBrush&&a.beforeBrush(t),a.brush(t,r===this._cursor?null:this._displayables[r-1]),a.afterBrush&&a.afterBrush(t)}this._cursor=r;for(var r=0;r<this._temporaryDisplayables.length;r++){var a=this._temporaryDisplayables[r];a.beforeBrush&&a.beforeBrush(t),a.brush(t,r===0?null:this._temporaryDisplayables[r-1]),a.afterBrush&&a.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var QD=[];He.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new vt(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var r=this._displayables[e],a=r.getBoundingRect().clone();r.needLocalTransform()&&a.applyTransform(r.getLocalTransform(QD)),t.union(a)}this._rect=t}return this._rect},He.prototype.contain=function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect();if(a.contain(r[0],r[1]))for(var i=0;i<this._displayables.length;i++){var n=this._displayables[i];if(n.contain(t,e))return!0}return!1},It(He,Le);var Kl=Math.max,jl=Math.min,Ql={},ko=1,Y0={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},X0="emphasis",q0="normal",K0=1,j0={},Uc={};function nr(t){return pt.extend(t)}function JD(t,e){return XD(t,e)}function Gr(t,e){Uc[t]=e}function $c(t){if(Uc.hasOwnProperty(t))return Uc[t]}function zo(t,e,r,a){var i=G0(t,e);return r&&(a==="center"&&(r=J0(r,i.getBoundingRect())),ty(i,r)),i}function Q0(t,e,r){var a=new ve({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(r==="center"){var n={width:i.width,height:i.height};a.setStyle(J0(e,n))}}});return a}function J0(t,e){var r=e.width/e.height,a=t.height*r,i;a<=t.width?i=t.height:(a=t.width,i=a/r);var n=t.x+t.width/2,o=t.y+t.height/2;return{x:n-a/2,y:o-i/2,width:a,height:i}}var or=qD;function ty(t,e){if(!!t.applyTransform){var r=t.getBoundingRect(),a=r.calculateTransform(e);t.applyTransform(a)}}function tM(t){return W0(t.shape,t.shape,t.style),t}function eM(t){return U0(t.shape,t.shape,t.style),t}var Jl=di;function ey(t){return t!=null&&t!=="none"}var ry=ht(),ay=0;function rM(t){if(typeof t!="string")return t;var e=ry.get(t);return e||(e=Lm(t,-.1),ay<1e4&&(ry.set(t,e),ay++)),e}function aM(t){if(!!t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e){t.__cachedNormalStl=t.__cachedNormalZ2=null;return}var r=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var a=t.style;for(var i in e)e[i]!=null&&(r[i]=a[i]);r.fill=a.fill,r.stroke=a.stroke}}function Zc(t){var e=t.__hoverStl;if(!(!e||t.__highlighted)){var r=t.__zr,a=t.useHoverLayer&&r&&r.painter.type==="canvas";if(t.__highlighted=a?"layer":"plain",!(t.isGroup||!r&&t.useHoverLayer)){var i=t,n=t.style;a&&(i=r.addHover(t),n=i.style),ru(n),a||aM(i),n.extendFrom(e),iy(n,e,"fill"),iy(n,e,"stroke"),Go(n),a||(t.dirty(!1),t.z2+=ko)}}}function iy(t,e,r){!ey(e[r])&&ey(t[r])&&(t[r]=rM(t[r]))}function Yc(t){var e=t.__highlighted;if(!!e&&(t.__highlighted=!1,!t.isGroup))if(e==="layer")t.__zr&&t.__zr.removeHover(t);else{var r=t.style,a=t.__cachedNormalStl;a&&(ru(r),t.setStyle(a),Go(r));var i=t.__cachedNormalZ2;i!=null&&t.z2-i===ko&&(t.z2=i)}}function Bo(t,e,r){var a=q0,i=q0,n;t.__highlighted&&(a=X0,n=!0),e(t,r),t.__highlighted&&(i=X0,n=!0),t.isGroup&&t.traverse(function(o){!o.isGroup&&e(o,r)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(a,i)}function Vo(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Yc(t),Zc(t))}function iM(t){!ny(this,t)&&!this.__highByOuter&&Bo(this,Zc)}function nM(t){!ny(this,t)&&!this.__highByOuter&&Bo(this,Yc)}function oM(t){this.__highByOuter|=1<<(t||0),Bo(this,Zc)}function sM(t){!(this.__highByOuter&=~(1<<(t||0)))&&Bo(this,Yc)}function ny(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ot(t,e){mi(t,!0),Bo(t,Vo,e)}function mi(t,e){var r=e===!1;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!r||t.__highDownDispatcher){var a=r?"off":"on";t[a]("mouseover",iM)[a]("mouseout",nM),t[a]("emphasis",oM)[a]("normal",sM),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!r}}function tu(t){return!!(t&&t.__highDownDispatcher)}function oy(t){var e=j0[t];return e==null&&K0<=32&&(e=j0[t]=K0++),e}function Fe(t,e,r,a,i,n,o){i=i||Ql;var s=i.labelFetcher,l=i.labelDataIndex,u=i.labelDimIndex,h=i.labelProp,f=r.getShallow("show"),c=a.getShallow("show"),v;(f||c)&&(s&&(v=s.getFormattedLabel(l,"normal",null,u,h)),v==null&&(v=se(i.defaultText)?i.defaultText(l,i):i.defaultText));var d=f?v:null,g=c?Xt(s?s.getFormattedLabel(l,"emphasis",null,u,h):null,v):null;(d!=null||g!=null)&&($t(t,r,n,i),$t(e,a,o,i,!0)),t.text=d,e.text=g}function Xc(t,e,r){var a=t.style;e&&(ru(a),t.setStyle(e),Go(a)),a=t.__hoverStl,r&&a&&(ru(a),et(a,r),Go(a))}function $t(t,e,r,a,i){return sy(t,e,a,i),r&&et(t,r),t}function lM(t,e,r){var a={isRectText:!0},i;r===!1?i=!0:a.autoColor=r,sy(t,e,a,i)}function sy(t,e,r,a){if(r=r||Ql,r.isRectText){var i;r.getTextPosition?i=r.getTextPosition(e,a):(i=e.getShallow("position")||(a?null:"inside"),i==="outside"&&(i="top")),t.textPosition=i,t.textOffset=e.getShallow("offset");var n=e.getShallow("rotate");n!=null&&(n*=Math.PI/180),t.textRotation=n,t.textDistance=Xt(e.getShallow("distance"),a?null:5)}var o=e.ecModel,s=o&&o.option.textStyle,l=uM(e),u;if(l){u={};for(var h in l)if(l.hasOwnProperty(h)){var f=e.getModel(["rich",h]);ly(u[h]={},f,s,r,a)}}return t.rich=u,ly(t,e,s,r,a,!0),r.forceRich&&!r.textStyle&&(r.textStyle={}),t}function uM(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||Ql).rich;if(r){e=e||{};for(var a in r)r.hasOwnProperty(a)&&(e[a]=1)}t=t.parentModel}return e}function ly(t,e,r,a,i,n){r=!i&&r||Ql,t.textFill=eu(e.getShallow("color"),a)||r.color,t.textStroke=eu(e.getShallow("textBorderColor"),a)||r.textBorderColor,t.textStrokeWidth=Xt(e.getShallow("textBorderWidth"),r.textBorderWidth),i||(n&&(t.insideRollbackOpt=a,Go(t)),t.textFill==null&&(t.textFill=a.autoColor)),t.fontStyle=e.getShallow("fontStyle")||r.fontStyle,t.fontWeight=e.getShallow("fontWeight")||r.fontWeight,t.fontSize=e.getShallow("fontSize")||r.fontSize,t.fontFamily=e.getShallow("fontFamily")||r.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),(!n||!a.disableBox)&&(t.textBackgroundColor=eu(e.getShallow("backgroundColor"),a),t.textPadding=e.getShallow("padding"),t.textBorderColor=eu(e.getShallow("borderColor"),a),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||r.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||r.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||r.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||r.textShadowOffsetY}function eu(t,e){return t!=="auto"?t:e&&e.autoColor?e.autoColor:null}function Go(t){var e=t.textPosition,r=t.insideRollbackOpt,a;if(r&&t.textFill==null){var i=r.autoColor,n=r.isRectText,o=r.useInsideStyle,s=o!==!1&&(o===!0||n&&e&&typeof e=="string"&&e.indexOf("inside")>=0),l=!s&&i!=null;(s||l)&&(a={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",t.textStroke==null&&(t.textStroke=i,t.textStrokeWidth==null&&(t.textStrokeWidth=2))),l&&(t.textFill=i)}t.insideRollback=a}function ru(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function qc(t,e){var r=e&&e.getModel("textStyle");return tr([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}function uy(t,e,r,a,i,n){typeof i=="function"&&(n=i,i=null);var o=a&&a.isAnimationEnabled();if(o){var s=t?"Update":"",l=a.getShallow("animationDuration"+s),u=a.getShallow("animationEasing"+s),h=a.getShallow("animationDelay"+s);typeof h=="function"&&(h=h(i,a.getAnimationDelayParams?a.getAnimationDelayParams(e,i):null)),typeof l=="function"&&(l=l(i)),l>0?e.animateTo(r,l,h||0,u,n,!!n):(e.stopAnimation(),e.attr(r),n&&n())}else e.stopAnimation(),e.attr(r),n&&n()}function ft(t,e,r,a,i){uy(!0,t,e,r,a,i)}function Se(t,e,r,a,i){uy(!1,t,e,r,a,i)}function yi(t,e){for(var r=fn([]);t&&t!==e;)Sa(r,t.getLocalTransform(),r),t=t.parent;return r}function Hr(t,e,r){return e&&!Qr(e)&&(e=_r.getLocalTransform(e)),r&&(e=cl([],e)),Pt([],t,e)}function Kc(t,e,r){var a=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),n=[t==="left"?-a:t==="right"?a:0,t==="top"?-i:t==="bottom"?i:0];return n=Hr(n,e,r),Math.abs(n[0])>Math.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function au(t,e,r,a){if(!t||!e)return;function i(s){var l={};return s.traverse(function(u){!u.isGroup&&u.anid&&(l[u.anid]=u)}),l}function n(s){var l={position:mr(s.position),rotation:s.rotation};return s.shape&&(l.shape=et({},s.shape)),l}var o=i(t);e.traverse(function(s){if(!s.isGroup&&s.anid){var l=o[s.anid];if(l){var u=n(s);s.attr(n(l)),ft(s,u,r,s.dataIndex)}}})}function hy(t,e){return V(t,function(r){var a=r[0];a=Kl(a,e.x),a=jl(a,e.x+e.width);var i=r[1];return i=Kl(i,e.y),i=jl(i,e.y+e.height),[a,i]})}function hM(t,e){var r=Kl(t.x,e.x),a=jl(t.x+t.width,e.x+e.width),i=Kl(t.y,e.y),n=jl(t.y+t.height,e.y+e.height);if(a>=r&&n>=i)return{x:r,y:i,width:a-r,height:n-i}}function Ho(t,e,r){e=et({rectHover:!0},e);var a=e.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(a.image=t.slice(8),J(a,r),new ve(e)):zo(t.replace("path://",""),e,r,"center")}function Fo(t,e,r,a,i){for(var n=0,o=i[i.length-1];n<i.length;n++){var s=i[n];if(fy(t,e,r,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function fy(t,e,r,a,i,n,o,s){var l=r-t,u=a-e,h=o-i,f=s-n,c=jc(h,f,l,u);if(fM(c))return!1;var v=t-i,d=e-n,g=jc(v,d,l,u)/c;if(g<0||g>1)return!1;var p=jc(v,d,h,f)/c;return!(p<0||p>1)}function jc(t,e,r,a){return t*a-r*e}function fM(t){return t<=1e-6&&t>=-1e-6}Gr("circle",Br),Gr("sector",Ar),Gr("ring",Yl),Gr("polygon",Ge),Gr("polyline",ir),Gr("rect",xt),Gr("line",ye),Gr("bezierCurve",Xl),Gr("arc",Wc);var sa=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:ko,CACHED_LABEL_STYLE_PROPERTIES:Y0,extendShape:nr,extendPath:JD,registerShape:Gr,getShapeClass:$c,makePath:zo,makeImage:Q0,mergePath:or,resizePath:ty,subPixelOptimizeLine:tM,subPixelOptimizeRect:eM,subPixelOptimize:Jl,setElementHoverStyle:Vo,setHoverStyle:Ot,setAsHighDownDispatcher:mi,isHighDownDispatcher:tu,getHighlightDigit:oy,setLabelStyle:Fe,modifyLabelStyle:Xc,setTextStyle:$t,setText:lM,getFont:qc,updateProps:ft,initProps:Se,getTransform:yi,applyTransform:Hr,transformDirection:Kc,groupTransition:au,clipPointsByRect:hy,clipRectByRect:hM,createIcon:Ho,linePolygonIntersect:Fo,lineLineIntersect:fy,Group:q,Image:ve,Text:dt,Circle:Br,Sector:Ar,Ring:Yl,Polygon:Ge,Polyline:ir,Rect:xt,Line:ye,BezierCurve:Xl,Arc:Wc,IncrementalDisplayable:He,CompoundPath:Z0,LinearGradient:pi,RadialGradient:ql,BoundingRect:vt}),cM=["textStyle","color"],vM={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(cM):null)},getFont:function(){return qc({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Rr(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},dM=_n([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),gM={getItemStyle:function(t,e){var r=dM(this,t,e),a=this.getBorderLineDash();return a&&(r.lineDash=a),r},getBorderLineDash:function(){var t=this.get("borderType");return t==="solid"||t==null?null:t==="dashed"?[5,5]:[1,1]}},iu=Dt,cy=Pe();function _t(t,e,r){this.parentModel=e,this.ecModel=r,this.option=t}_t.prototype={constructor:_t,init:null,mergeOption:function(t){ut(this.option,t,!0)},get:function(t,e){return t==null?this.option:vy(this.option,this.parsePath(t),!e&&Qc(this,t))},getShallow:function(t,e){var r=this.option,a=r==null?r:r[t],i=!e&&Qc(this,t);return a==null&&i&&(a=i.getShallow(t)),a},getModel:function(t,e){var r=t==null?this.option:vy(this.option,t=this.parsePath(t)),a;return e=e||(a=Qc(this,t))&&a.getModel(t),new _t(r,e,this.ecModel)},isEmpty:function(){return this.option==null},restoreData:function(){},clone:function(){var t=this.constructor;return new t(rt(this.option))},setReadOnly:function(t){},parsePath:function(t){return typeof t=="string"&&(t=t.split(".")),t},customizeGetParent:function(t){cy(this).getParent=t},isAnimationEnabled:function(){if(!G.node){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}};function vy(t,e,r){for(var a=0;a<e.length&&!(!!e[a]&&(t=t&&typeof t=="object"?t[e[a]]:null,t==null));a++);return t==null&&r&&(t=r.get(e)),t}function Qc(t,e){var r=cy(t).getParent;return r?r.call(t,e):t.parentModel}Lo(_t),Nl(_t),iu(_t,wD),iu(_t,SD),iu(_t,vM),iu(_t,gM);var pM=0;function Wo(t){return[t||"",pM++,Math.random().toFixed(5)].join("_")}function mM(t){var e={};return t.registerSubTypeDefaulter=function(r,a){r=Ma(r),e[r.main]=a},t.determineSubType=function(r,a){var i=a.type;if(!i){var n=Ma(r).main;t.hasSubTypes(r)&&e[n]&&(i=e[n](a))}return i},t}function yM(t,e){t.topologicalTravel=function(n,o,s,l){if(!n.length)return;var u=r(o),h=u.graph,f=u.noEntryList,c={};for(M(n,function(y){c[y]=!0});f.length;){var v=f.pop(),d=h[v],g=!!c[v];g&&(s.call(l,v,d.originalDeps.slice()),delete c[v]),M(d.successor,g?m:p)}M(c,function(){throw new Error("Circle dependency may exists")});function p(y){h[y].entryCount--,h[y].entryCount===0&&f.push(y)}function m(y){c[y]=!0,p(y)}};function r(n){var o={},s=[];return M(n,function(l){var u=a(o,l),h=u.originalDeps=e(l),f=i(h,n);u.entryCount=f.length,u.entryCount===0&&s.push(l),M(f,function(c){yt(u.predecessor,c)<0&&u.predecessor.push(c);var v=a(o,c);yt(v.successor,c)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function a(n,o){return n[o]||(n[o]={predecessor:[],successor:[]}),n[o]}function i(n,o){var s=[];return M(n,function(l){yt(o,l)>=0&&s.push(l)}),s}}var dy=1e-4;function _M(t){return t.replace(/^\s+|\s+$/g,"")}function Nt(t,e,r,a){var i=e[1]-e[0],n=r[1]-r[0];if(i===0)return n===0?r[0]:(r[0]+r[1])/2;if(a)if(i>0){if(t<=e[0])return r[0];if(t>=e[1])return r[1]}else{if(t>=e[0])return r[0];if(t<=e[1])return r[1]}else{if(t===e[0])return r[0];if(t===e[1])return r[1]}return(t-e[0])/i*n+r[0]}function H(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return typeof t=="string"?_M(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function re(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),r?t:+t}function _i(t){return t.sort(function(e,r){return e-r}),t}function gy(t){if(t=+t,isNaN(t))return 0;for(var e=1,r=0;Math.round(t*e)/e!==t;)e*=10,r++;return r}function nu(t){var e=t.toString(),r=e.indexOf("e");if(r>0){var a=+e.slice(r+1);return a<0?-a:0}else{var i=e.indexOf(".");return i<0?0:e.length-1-i}}function Jc(t,e){var r=Math.log,a=Math.LN10,i=Math.floor(r(t[1]-t[0])/a),n=Math.round(r(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-i+n,0),20);return isFinite(o)?o:20}function py(t,e,r){if(!t[e])return 0;var a=an(t,function(d,g){return d+(isNaN(g)?0:g)},0);if(a===0)return 0;for(var i=Math.pow(10,r),n=V(t,function(d){return(isNaN(d)?0:d)/a*i*100}),o=i*100,s=V(n,function(d){return Math.floor(d)}),l=an(s,function(d,g){return d+g},0),u=V(n,function(d,g){return d-s[g]});l<o;){for(var h=Number.NEGATIVE_INFINITY,f=null,c=0,v=u.length;c<v;++c)u[c]>h&&(h=u[c],f=c);++s[f],u[f]=0,++l}return s[e]/i}var tv=9007199254740991;function ev(t){var e=Math.PI*2;return(t%e+e)%e}function Uo(t){return t>-dy&&t<dy}var xM=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function $o(t){if(t instanceof Date)return t;if(typeof t=="string"){var e=xM.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(r-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(e[5]||0),+e[6]||0,+e[7]||0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}else if(t==null)return new Date(NaN);return new Date(Math.round(t))}function my(t){return Math.pow(10,rv(t))}function rv(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function av(t,e){var r=rv(t),a=Math.pow(10,r),i=t/a,n;return e?i<1.5?n=1:i<2.5?n=2:i<4?n=3:i<7?n=5:n=10:i<1?n=1:i<2?n=2:i<3?n=3:i<5?n=5:n=10,t=n*a,r>=-20?+t.toFixed(r<0?-r:0):t}function wM(t,e){var r=(t.length-1)*e+1,a=Math.floor(r),i=+t[a-1],n=r-a;return n?i+n*(t[a]-i):i}function iv(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,a=0;a<t.length;){for(var i=t[a].interval,n=t[a].close,o=0;o<2;o++)i[o]<=e&&(i[o]=e,n[o]=o?1:1-r),e=i[o],r=n[o];i[0]===i[1]&&n[0]*n[1]!==1?t.splice(a,1):a++}return t;function s(l,u,h){return l.interval[h]<u.interval[h]||l.interval[h]===u.interval[h]&&(l.close[h]-u.close[h]===(h?-1:1)||!h&&s(l,u,1))}}function yy(t){return t-parseFloat(t)>=0}var bM=(Object.freeze||Object)({linearMap:Nt,parsePercent:H,round:re,asc:_i,getPrecision:gy,getPrecisionSafe:nu,getPixelPrecision:Jc,getPercentWithPrecision:py,MAX_SAFE_INTEGER:tv,remRadian:ev,isRadianAroundZero:Uo,parseDate:$o,quantity:my,quantityExponent:rv,nice:av,quantile:wM,reformIntervals:iv,isNumeric:yy});function ka(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function _y(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,a){return a.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var xi=ff,SM=/([&<>"'])/g,AM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function kt(t){return t==null?"":(t+"").replace(SM,function(e,r){return AM[r]})}var xy=["a","b","c","d","e","f","g"],nv=function(t,e){return"{"+t+(e??"")+"}"};function ov(t,e,r){z(e)||(e=[e]);var a=e.length;if(!a)return"";for(var i=e[0].$vars||[],n=0;n<i.length;n++){var o=xy[n];t=t.replace(nv(o),nv(o,0))}for(var s=0;s<a;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];t=t.replace(nv(xy[l],s),r?kt(u):u)}return t}function wy(t,e,r){return M(e,function(a,i){t=t.replace("{"+i+"}",r?kt(a):a)}),t}function ou(t,i){t=Lt(t)?{color:t,extraCssText:i}:t||{};var r=t.color,a=t.type,i=t.extraCssText,n=t.renderMode||"html",o=t.markerId||"X";return r?n==="html"?a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+kt(r)+";"+(i||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+kt(r)+";"+(i||"")+'"></span>':{renderMode:n,content:"{marker"+o+"|}  ",style:{color:r}}:""}function Tn(t,e){return t+="","0000".substr(0,e-t.length)+t}function sv(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd
yyyy`);var a=$o(e),i=r?"UTC":"",n=a["get"+i+"FullYear"](),o=a["get"+i+"Month"]()+1,s=a["get"+i+"Date"](),l=a["get"+i+"Hours"](),u=a["get"+i+"Minutes"](),h=a["get"+i+"Seconds"](),f=a["get"+i+"Milliseconds"]();return t=t.replace("MM",Tn(o,2)).replace("M",o).replace("yyyy",n).replace("yy",n%100).replace("dd",Tn(s,2)).replace("d",s).replace("hh",Tn(l,2)).replace("h",l).replace("mm",Tn(u,2)).replace("m",u).replace("ss",Tn(h,2)).replace("s",h).replace("SSS",Tn(f,3)),t}function su(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}var by=ec;function TM(t){return Rr(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function CM(t,e,r,a,i,n,o,s){return Rr(t,e,r,a,i,s,n,o)}function Zo(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location=t}else window.open(t,e)}var DM=(Object.freeze||Object)({addCommas:ka,toCamelCase:_y,normalizeCssArray:xi,encodeHTML:kt,formatTpl:ov,formatTplSimple:wy,getTooltipMarker:ou,formatTime:sv,capitalFirst:su,truncateText:by,getTextBoundingRect:TM,getTextRect:CM,windowOpen:Zo}),lu=M,Sy=["left","right","top","bottom","width","height"],wi=[["width","left","right"],["height","top","bottom"]];function lv(t,e,r,a,i){var n=0,o=0;a==null&&(a=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var h=l.position,f=l.getBoundingRect(),c=e.childAt(u+1),v=c&&c.getBoundingRect(),d,g;if(t==="horizontal"){var p=f.width+(v?-v.x+f.x:0);d=n+p,d>a||l.newline?(n=0,d=p,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(v?-v.y+f.y:0);g=o+m,g>i||l.newline?(n+=s+r,o=0,g=m,s=f.width):s=Math.max(s,f.width)}l.newline||(h[0]=n,h[1]=o,t==="horizontal"?n=d+r:o=g+r)})}var bi=lv,H5=ot(lv,"vertical"),F5=ot(lv,"horizontal");function MM(t,e,r){var a=e.width,i=e.height,n=H(t.x,a),o=H(t.y,i),s=H(t.x2,a),l=H(t.y2,i);return(isNaN(n)||isNaN(parseFloat(t.x)))&&(n=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=a),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=i),r=xi(r||0),{width:Math.max(s-n-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function qt(t,e,r){r=xi(r||0);var a=e.width,i=e.height,n=H(t.left,a),o=H(t.top,i),s=H(t.right,a),l=H(t.bottom,i),u=H(t.width,a),h=H(t.height,i),f=r[2]+r[0],c=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=a-s-c-n),isNaN(h)&&(h=i-l-f-o),v!=null&&(isNaN(u)&&isNaN(h)&&(v>a/i?u=a*.8:h=i*.8),isNaN(u)&&(u=v*h),isNaN(h)&&(h=u/v)),isNaN(n)&&(n=a-s-u-c),isNaN(o)&&(o=i-l-h-f),t.left||t.right){case"center":n=a/2-u/2-r[3];break;case"right":n=a-u-c;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-h/2-r[0];break;case"bottom":o=i-h-f;break}n=n||0,o=o||0,isNaN(u)&&(u=a-c-n-(s||0)),isNaN(h)&&(h=i-f-o-(l||0));var d=new vt(n+r[3],o+r[0],u,h);return d.margin=r,d}function uu(t,e,r,a,i){var n=!i||!i.hv||i.hv[0],o=!i||!i.hv||i.hv[1],s=i&&i.boundingMode||"all";if(!(!n&&!o)){var l;if(s==="raw")l=t.type==="group"?new vt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();l=l.clone(),l.applyTransform(u)}e=qt(J({width:l.width,height:l.height},e),r,a);var h=t.position,f=n?e.x-l.x:0,c=o?e.y-l.y:0;t.attr("position",s==="raw"?[f,c]:[h[0]+f,h[1]+c])}}function IM(t,e){return t[wi[e][0]]!=null||t[wi[e][1]]!=null&&t[wi[e][2]]!=null}function za(t,e,r){!lt(r)&&(r={});var a=r.ignoreSize;!z(a)&&(a=[a,a]);var i=o(wi[0],0),n=o(wi[1],1);u(wi[0],t,i),u(wi[1],t,n);function o(h,f){var c={},v=0,d={},g=0,p=2;if(lu(h,function(_){d[_]=t[_]}),lu(h,function(_){s(e,_)&&(c[_]=d[_]=e[_]),l(c,_)&&v++,l(d,_)&&g++}),a[f])return l(e,h[1])?d[h[2]]=null:l(e,h[2])&&(d[h[1]]=null),d;if(g===p||!v)return d;if(v>=p)return c;for(var m=0;m<h.length;m++){var y=h[m];if(!s(c,y)&&s(t,y)){c[y]=t[y];break}}return c}function s(h,f){return h.hasOwnProperty(f)}function l(h,f){return h[f]!=null&&h[f]!=="auto"}function u(h,f,c){lu(h,function(v){f[v]=c[v]})}}function Cn(t){return Ay({},t)}function Ay(t,e){return e&&t&&lu(Sy,function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var LM={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}},PM=Pe(),wt=_t.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,r,a){_t.call(this,t,e,r,a),this.uid=Wo("ec_cpt_model")},init:function(t,e,r,a){this.mergeDefaultAndTheme(t,r)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode,a=r?Cn(t):{},i=e.getTheme();ut(t,i.get(this.mainType)),ut(t,this.getDefaultOption()),r&&za(t,a,r)},mergeOption:function(t,e){ut(this.option,t,!0);var r=this.layoutMode;r&&za(this.option,t,r)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=PM(this);if(!t.defaultOption){for(var e=[],r=this.constructor;r;){var a=r.prototype.defaultOption;a&&e.push(a),r=r.superClass}for(var i={},n=e.length-1;n>=0;n--)i=ut(i,e[n],!0);t.defaultOption=i}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});kl(wt,{registerWhenExtend:!0}),mM(wt),yM(wt,EM);function EM(t){var e=[];return M(wt.getClassesByMainType(t),function(r){e=e.concat(r.prototype.dependencies||[])}),e=V(e,function(r){return Ma(r).main}),t!=="dataset"&&yt(e,"dataset")<=0&&e.unshift("dataset"),e}Dt(wt,LM);var Ty="";typeof navigator<"u"&&(Ty=navigator.platform||"");var RM={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Ty.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},uv=Pe();function OM(t,e){for(var r=t.length,a=0;a<r;a++)if(t[a].length>e)return t[a];return t[r-1]}var hv={clearColorPalette:function(){uv(this).colorIdx=0,uv(this).colorNameMap={}},getColorFromPalette:function(t,e,r){e=e||this;var a=uv(e),i=a.colorIdx||0,n=a.colorNameMap=a.colorNameMap||{};if(n.hasOwnProperty(t))return n[t];var o=me(this.get("color",!0)),s=this.get("colorLayer",!0),l=r==null||!s?o:OM(s,r);if(l=l||o,!(!l||!l.length)){var u=l[i];return t&&(n[t]=u),a.colorIdx=(i+1)%l.length,u}}},Si="original",Yo="arrayRows",Xo="objectRows",qo="keyedColumns",Cy="unknown",Ko="typedArray",Dy="column",fv="row";function Tr(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===qo?{}:[]),this.sourceFormat=t.sourceFormat||Cy,this.seriesLayoutBy=t.seriesLayoutBy||Dy,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&ht(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Tr.seriesDataToSource=function(t){return new Tr({data:t,sourceFormat:pr(t)?Ko:Si,fromDataset:!1})},Nl(Tr);var Ae={Must:1,Might:2,Not:3},Dn=Pe();function NM(t){var e=t.option.source,r=Cy;if(pr(e))r=Ko;else if(z(e)){e.length===0&&(r=Yo);for(var a=0,i=e.length;a<i;a++){var n=e[a];if(n!=null){if(z(n)){r=Yo;break}else if(lt(n)){r=Xo;break}}}}else if(lt(e)){for(var o in e)if(e.hasOwnProperty(o)&&Qr(e[o])){r=qo;break}}else if(e!=null)throw new Error("Invalid data");Dn(t).sourceFormat=r}function kM(t){return Dn(t).source}function zM(t){Dn(t).datasetMap=ht()}function My(t){var e=t.option,r=e.data,a=pr(r)?Ko:Si,i=!1,n=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=vv(t);if(l){var u=l.option;r=u.source,a=Dn(l).sourceFormat,i=!0,n=n||u.seriesLayoutBy,o==null&&(o=u.sourceHeader),s=s||u.dimensions}var h=BM(r,a,n,o,s);Dn(t).source=new Tr({data:r,fromDataset:i,seriesLayoutBy:n,sourceFormat:a,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function BM(t,e,r,a,i){if(!t)return{dimensionsDefine:Iy(i)};var n,o;if(e===Yo)a==="auto"||a==null?Ly(function(l){l!=null&&l!=="-"&&(Lt(l)?o==null&&(o=1):o=0)},r,t,10):o=a?1:0,!i&&o===1&&(i=[],Ly(function(l,u){i[u]=l??""},r,t)),n=i?i.length:r===fv?t.length:t[0]?t[0].length:null;else if(e===Xo)i||(i=VM(t));else if(e===qo)i||(i=[],M(t,function(l,u){i.push(u)}));else if(e===Si){var s=Io(t[0]);n=z(s)&&s.length||1}else e===Ko&&T&&gt(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:Iy(i),dimensionsDetectCount:n}}function Iy(t){if(!!t){var e=ht();return V(t,function(r,a){if(r=et({},lt(r)?r:{name:r}),r.name==null)return r;r.name+="",r.displayName==null&&(r.displayName=r.name);var i=e.get(r.name);return i?r.name+="-"+i.count++:e.set(r.name,{count:1}),r})}}function Ly(t,e,r,a){if(a==null&&(a=1/0),e===fv)for(var i=0;i<r.length&&i<a;i++)t(r[i]?r[i][0]:null,i);else for(var n=r[0]||[],i=0;i<n.length&&i<a;i++)t(n[i],i)}function VM(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r){var a=[];return M(r,function(i,n){a.push(n)}),a}}function Py(t,e,r){var a={},i=vv(e);if(!i||!t)return a;var n=[],o=[],s=e.ecModel,l=Dn(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,h,f;t=t.slice(),M(t,function(g,p){!lt(g)&&(t[p]={name:g}),g.type==="ordinal"&&h==null&&(h=p,f=d(t[p])),a[g.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});M(t,function(g,p){var m=g.name,y=d(g);if(h==null){var _=c.valueWayDim;v(a[m],_,y),v(o,_,y),c.valueWayDim+=y}else if(h===p)v(a[m],0,y),v(n,0,y);else{var _=c.categoryWayDim;v(a[m],_,y),v(o,_,y),c.categoryWayDim+=y}});function v(g,p,m){for(var y=0;y<m;y++)g.push(p+y)}function d(g){var p=g.dimsDef;return p?p.length:1}return n.length&&(a.itemName=n),o.length&&(a.seriesName=o),a}function cv(t,e,r){var a={},i=vv(t);if(!i)return a;var n=e.sourceFormat,o=e.dimensionsDefine,s;(n===Xo||n===qo)&&M(o,function(h,f){(lt(h)?h.name:h)==="name"&&(s=f)});var l=function(){for(var h={},f={},c=[],v=0,d=Math.min(5,r);v<d;v++){var g=Ey(e.data,n,e.seriesLayoutBy,o,e.startIndex,v);c.push(g);var p=g===Ae.Not;if(p&&h.v==null&&v!==s&&(h.v=v),(h.n==null||h.n===h.v||!p&&c[h.n]===Ae.Not)&&(h.n=v),m(h)&&c[h.n]!==Ae.Not)return h;p||(g===Ae.Might&&f.v==null&&v!==s&&(f.v=v),(f.n==null||f.n===f.v)&&(f.n=v))}function m(y){return y.v!=null&&y.n!=null}return m(h)?h:m(f)?f:null}();if(l){a.value=l.v;var u=s??l.n;a.itemName=[u],a.seriesName=[u]}return a}function vv(t){var e=t.option,r=e.data;if(!r)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function GM(t,e){return Ey(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Ey(t,e,r,a,i,n){var o,s=5;if(pr(t))return Ae.Not;var l,u;if(a){var h=a[n];lt(h)?(l=h.name,u=h.type):Lt(h)&&(l=h)}if(u!=null)return u==="ordinal"?Ae.Must:Ae.Not;if(e===Yo)if(r===fv){for(var f=t[n],c=0;c<(f||[]).length&&c<s;c++)if((o=p(f[i+c]))!=null)return o}else for(var c=0;c<t.length&&c<s;c++){var v=t[i+c];if(v&&(o=p(v[n]))!=null)return o}else if(e===Xo){if(!l)return Ae.Not;for(var c=0;c<t.length&&c<s;c++){var d=t[c];if(d&&(o=p(d[l]))!=null)return o}}else if(e===qo){if(!l)return Ae.Not;var f=t[l];if(!f||pr(f))return Ae.Not;for(var c=0;c<f.length&&c<s;c++)if((o=p(f[c]))!=null)return o}else if(e===Si)for(var c=0;c<t.length&&c<s;c++){var d=t[c],g=Io(d);if(!z(g))return Ae.Not;if((o=p(g[n]))!=null)return o}function p(m){var y=Lt(m);if(m!=null&&isFinite(m)&&m!=="")return y?Ae.Might:Ae.Not;if(y&&m!=="-")return Ae.Must}return Ae.Not}var dv="\0_ec_inner",gv=_t.extend({init:function(t,e,r,a){r=r||{},this.option=null,this._theme=new _t(r),this._optionManager=a},setOption:function(t,e){gt(!(dv in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,r=this._optionManager;if(!t||t==="recreate"){var a=r.mountOption(t==="recreate");!this.option||t==="recreate"?WM.call(this,a):(this.restoreData(),this.mergeOption(a)),e=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var i=r.getTimelineOption(this);i&&(this.mergeOption(i),e=!0)}if(!t||t==="recreate"||t==="media"){var n=r.getMediaOption(this,this._api);n.length&&M(n,function(o){this.mergeOption(o,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,r=this._componentsMap,a=[];zM(this),M(t,function(n,o){n!=null&&(wt.hasClass(o)?o&&a.push(o):e[o]=e[o]==null?rt(n):ut(e[o],n,!0))}),wt.topologicalTravel(a,wt.getAllClassMainTypes(),i,this);function i(n,o){var s=me(t[n]),l=Lc(r.get(n),s);p0(l),M(l,function(h,f){var c=h.option;lt(c)&&(h.keyInfo.mainType=n,h.keyInfo.subType=$M(n,c,h.exist))});var u=UM(r,o);e[n]=[],r.set(n,[]),M(l,function(h,f){var c=h.exist,v=h.option;if(gt(lt(v)||c,"Empty component definition"),!v)c.mergeOption({},this),c.optionUpdated({},!1);else{var d=wt.getClass(n,h.keyInfo.subType,!0);if(c&&c.constructor===d)c.name=h.keyInfo.name,c.mergeOption(v,this),c.optionUpdated(v,!1);else{var g=et({dependentModels:u,componentIndex:f},h.keyInfo);c=new d(v,this,this,g),et(c,g),c.init(v,this,this,g),c.optionUpdated(null,!0)}}r.get(n)[f]=c,e[n][f]=c.option},this),n==="series"&&pv(this,r.get("series"))}this._seriesIndicesMap=ht(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=rt(this.option);return M(t,function(e,r){if(wt.hasClass(r)){for(var e=me(e),a=e.length-1;a>=0;a--)El(e[a])&&e.splice(a,1);t[r]=e}}),delete t[dv],t},getTheme:function(){return this._theme},getComponent:function(t,e){var r=this._componentsMap.get(t);if(r)return r[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var r=t.index,a=t.id,i=t.name,n=this._componentsMap.get(e);if(!n||!n.length)return[];var o;if(r!=null)z(r)||(r=[r]),o=ee(V(r,function(u){return n[u]}),function(u){return!!u});else if(a!=null){var s=z(a);o=ee(n,function(u){return s&&yt(a,u.id)>=0||!s&&u.id===a})}else if(i!=null){var l=z(i);o=ee(n,function(u){return l&&yt(i,u.name)>=0||!l&&u.name===i})}else o=n.slice();return Ry(o,t)},findComponents:function(t){var e=t.query,r=t.mainType,a=n(e),i=a?this.queryComponents(a):this._componentsMap.get(r);return o(Ry(i,t));function n(s){var l=r+"Index",u=r+"Id",h=r+"Name";return s&&(s[l]!=null||s[u]!=null||s[h]!=null)?{mainType:r,index:s[l],id:s[u],name:s[h]}:null}function o(s){return t.filter?ee(s,t.filter):s}},eachComponent:function(t,e,r){var a=this._componentsMap;if(typeof t=="function")r=e,e=t,a.each(function(n,o){M(n,function(s,l){e.call(r,o,s,l)})});else if(Lt(t))M(a.get(t),e,r);else if(lt(t)){var i=this.findComponents(t);M(i,e,r)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return ee(e,function(r){return r.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return ee(e,function(r){return r.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){hu(this),M(this._seriesIndices,function(r){var a=this._componentsMap.get("series")[r];t.call(e,a,r)},this)},eachRawSeries:function(t,e){M(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,r){hu(this),M(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];i.subType===t&&e.call(r,i,a)},this)},eachRawSeriesByType:function(t,e,r){return M(this.getSeriesByType(t),e,r)},isSeriesFiltered:function(t){return hu(this),this._seriesIndicesMap.get(t.componentIndex)==null},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){hu(this);var r=ee(this._componentsMap.get("series"),t,e);pv(this,r)},restoreData:function(t){var e=this._componentsMap;pv(this,e.get("series"));var r=[];e.each(function(a,i){r.push(i)}),wt.topologicalTravel(r,wt.getAllClassMainTypes(),function(a,i){M(e.get(a),function(n){(a!=="series"||!HM(n,t))&&n.restoreData()})})}});function HM(t,e){if(e){var r=e.seiresIndex,a=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||a!=null&&t.id!==a||i!=null&&t.name!==i}}function FM(t,e){var r=t.color&&!t.colorLayer;M(e,function(a,i){i==="colorLayer"&&r||wt.hasClass(i)||(typeof a=="object"?t[i]=t[i]?ut(t[i],a,!1):rt(a):t[i]==null&&(t[i]=a))})}function WM(t){t=t,this.option={},this.option[dv]=1,this._componentsMap=ht({series:[]}),this._seriesIndices,this._seriesIndicesMap,FM(t,this._theme.option),ut(t,RM,!1),this.mergeOption(t)}function UM(t,e){z(e)||(e=e?[e]:[]);var r={};return M(e,function(a){r[a]=(t.get(a)||[]).slice()}),r}function $M(t,e,r){var a=e.type?e.type:r?r.subType:wt.determineSubType(t,e);return a}function pv(t,e){t._seriesIndicesMap=ht(t._seriesIndices=V(e,function(r){return r.componentIndex})||[])}function Ry(t,e){return e.hasOwnProperty("subType")?ee(t,function(r){return r.subType===e.subType}):t}function hu(t){if(T&&!t._seriesIndices)throw new Error("Option should contains series.")}Dt(gv,hv);var ZM=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Oy(t){M(ZM,function(e){this[e]=it(t[e],t)},this)}var mv={};function _e(){this._coordinateSystems=[]}_e.prototype={constructor:_e,create:function(t,e){var r=[];M(mv,function(a,i){var n=a.create(t,e);r=r.concat(n||[])}),this._coordinateSystems=r},update:function(t,e){M(this._coordinateSystems,function(r){r.update&&r.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},_e.register=function(t,e){mv[t]=e},_e.get=function(t){return mv[t]};var fu=M,Ai=rt,cu=V,Ny=ut,YM=/^(min|max)?(.+)$/;function yv(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}yv.prototype={constructor:yv,setOption:function(t,e){t&&M(me(t.series),function(i){i&&i.data&&pr(i.data)&&cf(i.data)}),t=Ai(t);var r=this._optionBackup,a=XM.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(QM(r.baseOption,a.baseOption),a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=cu(e.timelineOptions,Ai),this._mediaList=cu(e.mediaList,Ai),this._mediaDefault=Ai(e.mediaDefault),this._currentMediaIndices=[],Ai(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,r=this._timelineOptions;if(r.length){var a=t.getComponent("timeline");a&&(e=Ai(r[a.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,n=[],o=[];if(!a.length&&!i)return o;for(var s=0,l=a.length;s<l;s++)qM(a[s].query,e,r)&&n.push(s);return!n.length&&i&&(n=[-1]),n.length&&!jM(n,this._currentMediaIndices)&&(o=cu(n,function(u){return Ai(u===-1?i.option:a[u].option)})),this._currentMediaIndices=n,o}};function XM(t,e,r){var a=[],i=[],n,o,s=t.timeline;if(t.baseOption&&(o=t.baseOption),(s||t.options)&&(o=o||{},a=(t.options||[]).slice()),t.media){o=o||{};var l=t.media;fu(l,function(u){u&&u.option&&(u.query?i.push(u):n||(n=u))})}return o||(o=t),o.timeline||(o.timeline=s),fu([o].concat(a).concat(V(i,function(u){return u.option})),function(u){fu(e,function(h){h(u,r)})}),{baseOption:o,timelineOptions:a,mediaDefault:n,mediaList:i}}function qM(t,e,r){var a={width:e,height:r,aspectratio:e/r},i=!0;return M(t,function(n,o){var s=o.match(YM);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();KM(a[u],n,l)||(i=!1)}}),i}function KM(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function jM(t,e){return t.join(",")===e.join(",")}function QM(t,e){e=e||{},fu(e,function(r,a){if(r!=null){var i=t[a];if(!wt.hasClass(a))t[a]=Ny(i,r,!0);else{r=me(r),i=me(i);var n=Lc(i,r);t[a]=cu(n,function(o){return o.option&&o.exist?Ny(o.exist,o.option,!0):o.exist||o.option})}}})}var Cr=M,jo=lt,ky=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function _v(t){var e=t&&t.itemStyle;if(!!e)for(var r=0,a=ky.length;r<a;r++){var i=ky[r],n=e.normal,o=e.emphasis;n&&n[i]&&(t[i]=t[i]||{},t[i].normal?ut(t[i].normal,n[i]):t[i].normal=n[i],n[i]=null),o&&o[i]&&(t[i]=t[i]||{},t[i].emphasis?ut(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function Te(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var a=t[e].normal,i=t[e].emphasis;a&&(r?(t[e].normal=t[e].emphasis=null,J(t[e],a)):t[e]=a),i&&(t.emphasis=t.emphasis||{},t.emphasis[e]=i)}}function Qo(t){Te(t,"itemStyle"),Te(t,"lineStyle"),Te(t,"areaStyle"),Te(t,"label"),Te(t,"labelLine"),Te(t,"upperLabel"),Te(t,"edgeLabel")}function Kt(t,e){var r=jo(t)&&t[e],a=jo(r)&&r.textStyle;if(a)for(var i=0,n=g0.length;i<n;i++){var e=g0[i];a.hasOwnProperty(e)&&(r[e]=a[e])}}function sr(t){t&&(Qo(t),Kt(t,"label"),t.emphasis&&Kt(t.emphasis,"label"))}function JM(t){if(!!jo(t)){_v(t),Qo(t),Kt(t,"label"),Kt(t,"upperLabel"),Kt(t,"edgeLabel"),t.emphasis&&(Kt(t.emphasis,"label"),Kt(t.emphasis,"upperLabel"),Kt(t.emphasis,"edgeLabel"));var n=t.markPoint;n&&(_v(n),sr(n));var s=t.markLine;s&&(_v(s),sr(s));var e=t.markArea;e&&sr(e);var r=t.data;if(t.type==="graph"){r=r||t.nodes;var a=t.links||t.edges;if(a&&!pr(a))for(var i=0;i<a.length;i++)sr(a[i]);M(t.categories,function(u){Qo(u)})}if(r&&!pr(r))for(var i=0;i<r.length;i++)sr(r[i]);var n=t.markPoint;if(n&&n.data)for(var o=n.data,i=0;i<o.length;i++)sr(o[i]);var s=t.markLine;if(s&&s.data)for(var l=s.data,i=0;i<l.length;i++)z(l[i])?(sr(l[i][0]),sr(l[i][1])):sr(l[i]);t.type==="gauge"?(Kt(t,"axisLabel"),Kt(t,"title"),Kt(t,"detail")):t.type==="treemap"?(Te(t.breadcrumb,"itemStyle"),M(t.levels,function(u){Qo(u)})):t.type==="tree"&&Qo(t.leaves)}}function la(t){return z(t)?t:t?[t]:[]}function zy(t){return(z(t)?t[0]:t)||{}}var tI=function(t,e){Cr(la(t.series),function(a){jo(a)&&JM(a)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Cr(r,function(a){Cr(la(t[a]),function(i){i&&(Kt(i,"axisLabel"),Kt(i.axisPointer,"label"))})}),Cr(la(t.parallel),function(a){var i=a&&a.parallelAxisDefault;Kt(i,"axisLabel"),Kt(i&&i.axisPointer,"label")}),Cr(la(t.calendar),function(a){Te(a,"itemStyle"),Kt(a,"dayLabel"),Kt(a,"monthLabel"),Kt(a,"yearLabel")}),Cr(la(t.radar),function(a){Kt(a,"name")}),Cr(la(t.geo),function(a){jo(a)&&(sr(a),Cr(la(a.regions),function(i){sr(i)}))}),Cr(la(t.timeline),function(a){sr(a),Te(a,"label"),Te(a,"itemStyle"),Te(a,"controlStyle",!0);var i=a.data;z(i)&&M(i,function(n){lt(n)&&(Te(n,"label"),Te(n,"itemStyle"))})}),Cr(la(t.toolbox),function(a){Te(a,"iconStyle"),Cr(a.feature,function(i){Te(i,"iconStyle")})}),Kt(zy(t.axisPointer),"label"),Kt(zy(t.tooltip).axisPointer,"label")};function eI(t,e){e=e.split(",");for(var r=t,a=0;a<e.length&&(r=r&&r[e[a]],r!=null);a++);return r}function rI(t,e,r,a){e=e.split(",");for(var i=t,n,o=0;o<e.length-1;o++)n=e[o],i[n]==null&&(i[n]={}),i=i[n];(a||i[e[o]]==null)&&(i[e[o]]=r)}function By(t){M(aI,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var aI=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],iI=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Vy=function(t,e){tI(t,e),t.series=me(t.series),M(t.series,function(r){if(!!lt(r)){var a=r.type;if(a==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow);else if(a==="pie"||a==="gauge")r.clockWise!=null&&(r.clockwise=r.clockWise);else if(a==="gauge"){var i=eI(r,"pointer.color");i!=null&&rI(r,"itemStyle.color",i)}By(r)}}),t.dataRange&&(t.visualMap=t.dataRange),M(iI,function(r){var a=t[r];a&&(z(a)||(a=[a]),M(a,function(i){By(i)}))})},nI=function(t){var e=ht();t.eachSeries(function(r){var a=r.get("stack");if(a){var i=e.get(a)||e.set(a,[]),n=r.getData(),o={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&n.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(oI)};function oI(t){M(t,function(e,r){var a=[],i=[NaN,NaN],n=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(n,function(u,h,f){var c=o.get(e.stackedDimension,f);if(isNaN(c))return i;var v,d;s?d=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var g=NaN,p=r-1;p>=0;p--){var m=t[p];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(c>=0&&y>0||c<=0&&y<0){c+=y,g=y;break}}}return a[0]=c,a[1]=g,a});o.hostModel.setData(l),e.data=l})}function Gy(t,e){Tr.isInstance(t)||(t=Tr.seriesDataToSource(t)),this._source=t;var r=this._data=t.data,a=t.sourceFormat;if(a===Ko){if(T&&e==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=r}var i=sI[a===Yo?a+"_"+t.seriesLayoutBy:a];T&&gt(i,"Invalide sourceFormat: "+a),et(this,i)}var xv=Gy.prototype;xv.pure=!1,xv.persistent=!0,xv.getSource=function(){return this._source};var sI={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:wv},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],r=this._data,a=0;a<r.length;a++){var i=r[a];e.push(i?i[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Hy,getItem:Fy,appendData:wv},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],r=this._source.dimensionsDefine,a=0;a<r.length;a++){var i=this._data[r[a].name];e.push(i?i[t]:null)}return e},appendData:function(t){var e=this._data;M(t,function(r,a){for(var i=e[a]||(e[a]=[]),n=0;n<(r||[]).length;n++)i.push(r[n])})}},original:{count:Hy,getItem:Fy,appendData:wv},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t=t-this._offset,e=e||[];for(var r=this._dimSize*t,a=0;a<this._dimSize;a++)e[a]=this._data[r+a];return e},appendData:function(t){T&&gt(pr(t),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function Hy(){return this._data.length}function Fy(t){return this._data[t]}function wv(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var lI={arrayRows:bv,objectRows:function(t,e,r,a){return r!=null?t[a]:t},keyedColumns:bv,original:function(t,e,r,a){var i=Io(t);return r==null||!(i instanceof Array)?i:i[r]},typedArray:bv};function bv(t,e,r,a){return r!=null?t[r]:t}var Wy={arrayRows:Uy,objectRows:function(t,e,r,a){return Sv(t[e],this._dimensionInfos[e])},keyedColumns:Uy,original:function(t,e,r,a){var i=t&&(t.value==null?t:t.value);return!this._rawData.pure&&fD(t)&&(this.hasItemOption=!0),Sv(i instanceof Array?i[a]:i,this._dimensionInfos[e])},typedArray:function(t,e,r,a){return t[a]}};function Uy(t,e,r,a){return Sv(t[a],this._dimensionInfos[e])}function Sv(t,e){var r=e&&e.type;if(r==="ordinal"){var a=e&&e.ordinalMeta;return a?a.parseAndCollect(t):t}return r==="time"&&typeof t!="number"&&t!=null&&t!=="-"&&(t=+$o(t)),t==null||t===""?NaN:+t}function Ti(t,e,r){if(!!t){var a=t.getRawDataItem(e);if(a!=null){var i=t.getProvider().getSource().sourceFormat,n,o,s=t.getDimensionInfo(r);return s&&(n=s.name,o=s.index),lI[i](a,e,o,n)}}}function $y(t,e,r){if(!!t){var a=t.getProvider().getSource().sourceFormat;if(!(a!==Si&&a!==Xo)){var i=t.getRawDataItem(e);if(a===Si&&!lt(i)&&(i=null),i)return i[r]}}}var uI=/\{@(.+?)\}/g,Av={getDataParams:function(t,e){var r=this.getData(e),a=this.getRawValue(t,e),i=r.getRawIndex(t),n=r.getName(t),o=r.getRawDataItem(t),s=r.getItemVisual(t,"color"),l=r.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),f=y0(h),c=this.mainType,v=c==="series",d=r.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:v?this.subType:null,seriesIndex:this.seriesIndex,seriesId:v?this.id:null,seriesName:v?this.name:null,name:n,dataIndex:i,data:o,dataType:e,value:a,color:s,borderColor:l,dimensionNames:d?d.dimensionNames:null,encode:d?d.encode:null,marker:ou({color:s,renderMode:f}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,r,a,i){e=e||"normal";var n=this.getData(r),o=n.getItemModel(t),s=this.getDataParams(t,r);a!=null&&s.value instanceof Array&&(s.value=s.value[a]);var l=o.get(e==="normal"?[i||"label","formatter"]:[e,i||"label","formatter"]);if(typeof l=="function")return s.status=e,s.dimensionIndex=a,l(s);if(typeof l=="string"){var u=ov(l,s);return u.replace(uI,function(h,f){var c=f.length;return f.charAt(0)==="["&&f.charAt(c-1)==="]"&&(f=+f.slice(1,c-1)),Ti(n,t,f)})}},getRawValue:function(t,e){return Ti(this.getData(e),t)},formatTooltip:function(){}};function Jo(t){return new Zy(t)}function Zy(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var Ba=Zy.prototype;Ba.perform=function(t){var e=this._upstream,r=t&&t.skip;if(this._dirty&&e){var a=this.context;a.data=a.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!r&&(i=this._plan(this.context));var n=u(this._modBy),o=this._modDataCount||0,s=u(t&&t.modBy),l=t&&t.modDataCount||0;(n!==s||o!==l)&&(i="reset");function u(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=hI(this,r)),this._modBy=s,this._modDataCount=l;var f=t&&t.step;if(e?(T&&gt(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(T&&gt(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var c=this._dueIndex,v=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!r&&(h||c<v)){var d=this._progress;if(z(d))for(var g=0;g<d.length;g++)Xy(this,d[g],c,v,s,l);else Xy(this,d,c,v,s,l)}this._dueIndex=v;var p=this._settedOutputEnd!=null?this._settedOutputEnd:v;T&&gt(p>=this._outputDueEnd),this._outputDueEnd=p}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Yy=function(){var t,e,r,a,i,n={reset:function(l,u,h,f){e=l,t=u,r=h,a=f,i=Math.ceil(a/r),n.next=r>1&&a>0?s:o}};return n;function o(){return e<t?e++:null}function s(){var l=e%i*r+Math.ceil(e/i),u=e>=t?null:l<a?l:e;return e++,u}}();Ba.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)};function Xy(t,e,r,a,i,n){Yy.reset(r,a,i,n),t._callingProgress=e,t._callingProgress({start:r,end:a,count:a-r,next:Yy.next},t.context)}function hI(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var r,a;!e&&t._reset&&(r=t._reset(t.context),r&&r.progress&&(a=r.forceFirstProgress,r=r.progress),z(r)&&!r.length&&(r=null)),t._progress=r,t._modBy=t._modDataCount=null;var i=t._downstream;return i&&i.dirty(),a}Ba.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Ba.pipe=function(t){T&&gt(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},Ba.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Ba.getUpstream=function(){return this._upstream},Ba.getDownstream=function(){return this._downstream},Ba.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var ts=Pe(),Vt=wt.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,r,a){this.seriesIndex=this.componentIndex,this.dataTask=Jo({count:cI,reset:vI}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,r),My(this);var i=this.getInitialData(t,r);Ky(i,this),this.dataTask.context.data=i,T&&gt(i,"getInitialData returned invalid data."),ts(this).dataBeforeProcessed=i,qy(this)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode,a=r?Cn(t):{},i=this.subType;wt.hasClass(i)&&(i+="Series"),ut(t,e.getTheme().get(this.subType)),ut(t,this.getDefaultOption()),fi(t,"label",["show"]),this.fillDataTextStyle(t.data),r&&za(t,a,r)},mergeOption:function(t,e){t=ut(this.option,t,!0),this.fillDataTextStyle(t.data);var r=this.layoutMode;r&&za(this.option,t,r),My(this);var a=this.getInitialData(t,e);Ky(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,ts(this).dataBeforeProcessed=a,qy(this)},fillDataTextStyle:function(t){if(t&&!pr(t))for(var e=["show"],r=0;r<t.length;r++)t[r]&&t[r].label&&fi(t[r],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=Tv(this);if(e){var r=e.context.data;return t==null?r:r.getLinkedData(t)}else return ts(this).data},setData:function(t){var e=Tv(this);if(e){var r=e.context;r.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),r.outputData=t,e!==this.dataTask&&(r.data=t)}ts(this).data=t},getSource:function(){return kM(this)},getRawData:function(){return ts(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,r,a){var i=this;a=a||"html";var n=a==="html"?"<br/>":`
`,o=a==="richText",s={},l=0;function u(I){var L=an(I,function(W,$,X){var K=f.getDimensionInfo(X);return W|=K&&K.tooltip!==!1&&K.displayName!=null},0),P=[];c.length?M(c,function(W){R(Ti(f,t,W),W)}):M(I,R);function R(W,$){var X=f.getDimensionInfo($);if(!(!X||X.otherDims.tooltip===!1)){var K=X.type,Q="sub"+i.seriesIndex+"at"+l,j=ou({color:p,type:"subItem",renderMode:a,markerId:Q}),U=typeof j=="string"?j:j.content,tt=(L?U+kt(X.displayName||"-")+": ":"")+kt(K==="ordinal"?W+"":K==="time"?e?"":sv("yyyy/MM/dd hh:mm:ss",W):ka(W));tt&&P.push(tt),o&&(s[Q]=p,++l)}}var E=L?o?`
`:"<br/>":"",Z=E+P.join(E||", ");return{renderMode:a,content:Z,style:s}}function h(I){return{renderMode:a,content:kt(ka(I)),style:s}}var f=this.getData(),c=f.mapDimension("defaultedTooltip",!0),v=c.length,d=this.getRawValue(t),g=z(d),p=f.getItemVisual(t,"color");lt(p)&&p.colorStops&&(p=(p.colorStops[0]||{}).color),p=p||"transparent";var m=v>1||g&&!v?u(d):h(v?Ti(f,t,c[0]):g?d[0]:d),y=m.content,_=i.seriesIndex+"at"+l,w=ou({color:p,type:"item",renderMode:a,markerId:_});s[_]=p,++l;var b=f.getName(t),A=this.name;Pc(this)||(A=""),A=A?kt(A)+(e?": ":n):"";var S=typeof w=="string"?w:w.content,D=e?S+A+y:A+S+(b?kt(b)+": "+y:y);return{html:D,markers:s}},isAnimationEnabled:function(){if(G.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,r){var a=this.ecModel,i=hv.getColorFromPalette.call(this,t,e,r);return i||(i=a.getColorFromPalette(t,e,r)),i},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});Dt(Vt,Av),Dt(Vt,hv);function qy(t){var e=t.name;Pc(t)||(t.name=fI(t)||e)}function fI(t){var e=t.getRawData(),r=e.mapDimension("seriesName",!0),a=[];return M(r,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function cI(t){return t.model.getRawData().count()}function vI(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),dI}function dI(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ky(t,e){M(t.CHANGABLE_METHODS,function(r){t.wrapMethod(r,ot(gI,e))})}function gI(t){var e=Tv(t);e&&e.setOutputEnd(this.count())}function Tv(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var a=r.currentTask;if(a){var i=a.agentStubMap;i&&(a=i.get(t.uid))}return a}}var Fr=function(){this.group=new q,this.uid=Wo("viewComponent")};Fr.prototype={constructor:Fr,init:function(t,e){},render:function(t,e,r,a){},dispose:function(){},filterForExposedEvent:null};var Cv=Fr.prototype;Cv.updateView=Cv.updateLayout=Cv.updateVisual=function(t,e,r,a){},Lo(Fr),kl(Fr,{registerWhenExtend:!0});var Mn=function(){var t=Pe();return function(e){var r=t(e),a=e.pipelineContext,i=r.large,n=r.progressiveRender,o=r.large=a&&a.large,s=r.progressiveRender=a&&a.progressiveRender;return!!(i^o||n^s)&&"reset"}},jy=Pe(),pI=Mn();function ue(){this.group=new q,this.uid=Wo("viewChart"),this.renderTask=Jo({plan:mI,reset:yI}),this.renderTask.context={view:this}}ue.prototype={type:"chart",init:function(t,e){},render:function(t,e,r,a){},highlight:function(t,e,r,a){Qy(t.getData(),a,"emphasis")},downplay:function(t,e,r,a){Qy(t.getData(),a,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var Dv=ue.prototype;Dv.updateView=Dv.updateLayout=Dv.updateVisual=function(t,e,r,a){this.render(t,e,r,a)};function Mv(t,e,r){if(t&&(t.trigger(e,r),t.isGroup&&!tu(t)))for(var a=0,i=t.childCount();a<i;a++)Mv(t.childAt(a),e,r)}function Qy(t,e,r){var a=Rl(t,e),i=e&&e.highlightKey!=null?oy(e.highlightKey):null;a!=null?M(me(a),function(n){Mv(t.getItemGraphicEl(n),r,i)}):t.eachItemGraphicEl(function(n){Mv(n,r,i)})}Lo(ue,["dispose"]),kl(ue,{registerWhenExtend:!0}),ue.markUpdateMethod=function(t,e){jy(t).updateMethod=e};function mI(t){return pI(t.model)}function yI(t){var e=t.model,r=t.ecModel,a=t.api,i=t.payload,n=e.pipelineContext.progressiveRender,o=t.view,s=i&&jy(i).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,a,i),_I[l]}var _I={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},vu="\0__throttleOriginMethod",Jy="\0__throttleRate",t_="\0__throttleType";function du(t,e,r){var a,i=0,n=0,o=null,s,l,u,h;e=e||0;function f(){n=new Date().getTime(),o=null,t.apply(l,u||[])}var c=function(){a=new Date().getTime(),l=this,u=arguments;var v=h||e,d=h||r;h=null,s=a-(d?i:n)-v,clearTimeout(o),d?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),i=a};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){h=v},c}function es(t,e,r,a){var i=t[e];if(!!i){var n=i[vu]||i,o=i[t_],s=i[Jy];if(s!==r||o!==a){if(r==null||!a)return t[e]=n;i=t[e]=du(n,r,a==="debounce"),i[vu]=n,i[t_]=a,i[Jy]=r}return i}}function e_(t,e){var r=t[e];r&&r[vu]&&(t[e]=r[vu])}var xI={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),a=(t.visualColorAccessPath||"itemStyle.color").split("."),i=t.get(a),n=se(i)&&!(i instanceof Vr)?i:null;(!i||n)&&(i=t.getColorFromPalette(t.name,null,e.getSeriesCount())),r.setVisual("color",i);var o=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(o);if(r.setVisual("borderColor",s),!e.isSeriesFiltered(t)){n&&r.each(function(u){r.setItemVisual(u,"color",n(t.getDataParams(u)))});var l=function(u,h){var f=u.getItemModel(h),c=f.get(a,!0),v=f.get(o,!0);c!=null&&u.setItemVisual(h,"color",c),v!=null&&u.setItemVisual(h,"borderColor",v)};return{dataEach:r.hasItemOption?l:null}}}},ua={legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}},wI=function(t,e){var r=e.getModel("aria");if(r.get("show")){if(r.get("description")){t.setAttribute("aria-label",r.get("description"));return}}else return;var a=0;e.eachSeries(function(g,p){++a},this);var i=r.get("data.maxCount")||10,n=r.get("series.maxCount")||10,o=Math.min(a,n),s;if(a<1)return;var l=v();l?s=f(c("general.withTitle"),{title:l}):s=c("general.withoutTitle");var u=[],h=a>1?"series.multiple.prefix":"series.single.prefix";s+=f(c(h),{seriesCount:a}),e.eachSeries(function(g,p){if(p<o){var m,y=g.get("name"),_="series."+(a>1?"multiple":"single")+".";m=c(y?_+"withName":_+"withoutName"),m=f(m,{seriesId:g.seriesIndex,seriesName:g.get("name"),seriesType:d(g.subType)});var w=g.getData();window.data=w,w.count()>i?m+=f(c("data.partialData"),{displayCnt:i}):m+=c("data.allData");for(var b=[],A=0;A<w.count();A++)if(A<i){var S=w.getName(A),D=Ti(w,A);b.push(f(c(S?"data.withName":"data.withoutName"),{name:S,value:D}))}m+=b.join(c("data.separator.middle"))+c("data.separator.end"),u.push(m)}}),s+=u.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),t.setAttribute("aria-label",s);function f(g,p){if(typeof g!="string")return g;var m=g;return M(p,function(y,_){m=m.replace(new RegExp("\\{\\s*"+_+"\\s*\\}","g"),y)}),m}function c(g){var p=r.get(g);if(p==null){for(var m=g.split("."),y=ua.aria,_=0;_<m.length;++_)y=y[m[_]];return y}else return p}function v(){var g=e.getModel("title").option;return g&&g.length&&(g=g[0]),g&&g.text}function d(g){return ua.series.typeNames[g]||"\u81EA\u5B9A\u4E49\u56FE"}},gu=Math.PI,bI=function(t,e){e=e||{},J(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new q,a=new xt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(a);var i=e.fontSize+" sans-serif",n=new xt({style:{fill:"none",text:e.text,font:i,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(r.add(n),e.showSpinner){var o=new Wc({shape:{startAngle:-gu/2,endAngle:-gu/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:gu*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:gu*3/2}).delay(300).start("circularInOut"),r.add(o)}return r.resize=function(){var s=er(e.text,i),l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner?0:s/2),h=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:h}),n.setShape({x:u-l,y:h-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r};function pu(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=ht()}var lr=pu.prototype;lr.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(r){var a=r.overallTask;a&&a.dirty()})},lr.getPerformArgs=function(t,e){if(!!t.__pipeline){var r=this._pipelineMap.get(t.__pipeline.id),a=r.context,i=!e&&r.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>r.blockIndex,n=i?r.step:null,o=a&&a.modDataCount,s=o!=null?Math.ceil(o/n):null;return{step:n,modBy:s,modDataCount:o}}},lr.getPipeline=function(t){return this._pipelineMap.get(t)},lr.updateStreamModes=function(t,e){var r=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),n=r.progressiveEnabled&&e.incrementalPrepareRender&&i>=r.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),s=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=r.context={progressiveRender:n,modDataCount:s,large:o}},lr.restorePipelines=function(t){var e=this,r=e._pipelineMap=ht();t.eachSeries(function(a){var i=a.getProgressive(),n=a.uid;r.set(n,{id:n,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),mu(e,a,a.dataTask)})},lr.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),r=this.api;M(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,[]);a.reset&&SI(this,a,i,e,r),a.overallReset&&AI(this,a,i,e,r)},this)},lr.prepareView=function(t,e,r,a){var i=t.renderTask,n=i.context;n.model=e,n.ecModel=r,n.api=a,i.__block=!t.incrementalPrepareRender,mu(this,e,i)},lr.performDataProcessorTasks=function(t,e){r_(this,this._dataProcessorHandlers,t,e,{block:!0})},lr.performVisualTasks=function(t,e,r){r_(this,this._visualHandlers,t,e,r)};function r_(t,e,r,a,i){i=i||{};var n;M(e,function(s,l){if(!(i.visualType&&i.visualType!==s.visualType)){var u=t._stageTaskMap.get(s.uid),h=u.seriesTaskMap,f=u.overallTask;if(f){var c,v=f.agentStubMap;v.each(function(g){o(i,g)&&(g.dirty(),c=!0)}),c&&f.dirty(),a_(f,a);var d=t.getPerformArgs(f,i.block);v.each(function(g){g.perform(d)}),n|=f.perform(d)}else h&&h.each(function(g,p){o(i,g)&&g.dirty();var m=t.getPerformArgs(g,i.block);m.skip=!s.performRawSeries&&r.isSeriesFiltered(g.context.model),a_(g,a),n|=g.perform(m)})}});function o(s,l){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(l.__pipeline.id))}t.unfinished|=n}lr.performSeriesTasks=function(t){var e;t.eachSeries(function(r){e|=r.dataTask.perform()}),this.unfinished|=e},lr.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var a_=lr.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)};function SI(t,e,r,a,i){var n=r.seriesTaskMap||(r.seriesTaskMap=ht()),o=e.seriesType,s=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(l):o?a.eachRawSeriesByType(o,l):s&&s(a,i).each(l);function l(h){var f=h.uid,c=n.get(f)||n.set(f,Jo({plan:II,reset:LI,count:EI}));c.context={model:h,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},mu(t,h,c)}var u=t._pipelineMap;n.each(function(h,f){u.get(f)||(h.dispose(),n.removeKey(f))})}function AI(t,e,r,a,i){var n=r.overallTask=r.overallTask||Jo({reset:TI});n.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:t};var o=n.agentStubMap=n.agentStubMap||ht(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?a.eachRawSeriesByType(s,f):l?l(a,i).each(f):(u=!1,M(a.getSeries(),f));function f(v){var d=v.uid,g=o.get(d);g||(g=o.set(d,Jo({reset:CI,onDirty:MI})),n.dirty()),g.context={model:v,overallProgress:u,modifyOutputEnd:h},g.agent=n,g.__block=u,mu(t,v,g)}var c=t._pipelineMap;o.each(function(v,d){c.get(d)||(v.dispose(),n.dirty(),o.removeKey(d))})}function TI(t){t.overallReset(t.ecModel,t.api,t.payload)}function CI(t,e){return t.overallProgress&&DI}function DI(){this.agent.dirty(),this.getDownstream().dirty()}function MI(){this.agent&&this.agent.dirty()}function II(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function LI(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=me(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?V(e,function(r,a){return i_(a)}):PI}var PI=i_(0);function i_(t){return function(e,r){var a=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var n=e.start;n<e.end;n++)i.dataEach(a,n);else i&&i.progress&&i.progress(e,a)}}function EI(t){return t.data.count()}function mu(t,e,r){var a=e.uid,i=t._pipelineMap.get(a);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i}pu.wrapStageHandler=function(t,e){return se(t)&&(t={overallReset:t,seriesType:RI(t)}),t.uid=Wo("stageHandler"),e&&(t.visualType=e),t};function RI(t){yu=null;try{t(rs,n_)}catch{}return yu}var rs={},n_={},yu;o_(rs,gv),o_(n_,Oy),rs.eachSeriesByType=rs.eachRawSeriesByType=function(t){yu=t},rs.eachComponent=function(t){t.mainType==="series"&&t.subType&&(yu=t.subType)};function o_(t,e){for(var r in e.prototype)t[r]=ce}var s_=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],OI={color:s_,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],s_]},xe="#eee",_u=function(){return{axisLine:{lineStyle:{color:xe}},axisTick:{lineStyle:{color:xe}},axisLabel:{textStyle:{color:xe}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:xe}}}},Iv=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],l_={color:Iv,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:xe},crossStyle:{color:xe},label:{color:"#000"}}},legend:{textStyle:{color:xe}},textStyle:{color:xe},title:{textStyle:{color:xe}},toolbox:{iconStyle:{normal:{borderColor:xe}}},dataZoom:{textStyle:{color:xe}},visualMap:{textStyle:{color:xe}},timeline:{lineStyle:{color:xe},itemStyle:{normal:{color:Iv[1]}},label:{normal:{textStyle:{color:xe}}},controlStyle:{normal:{color:xe,borderColor:xe}}},timeAxis:_u(),logAxis:_u(),valueAxis:_u(),categoryAxis:_u(),line:{symbol:"circle"},graph:{color:Iv},gauge:{title:{textStyle:{color:xe}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};l_.categoryAxis.splitLine.show=!1,wt.extend({type:"dataset",defaultOption:{seriesLayoutBy:Dy,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){NM(this)}}),Fr.extend({type:"dataset"});var NI=pt.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var r=.5522848,a=e.cx,i=e.cy,n=e.rx,o=e.ry,s=n*r,l=o*r;t.moveTo(a-n,i),t.bezierCurveTo(a-n,i-l,a-s,i-o,a,i-o),t.bezierCurveTo(a+s,i-o,a+n,i-l,a+n,i),t.bezierCurveTo(a+n,i+l,a+s,i+o,a,i+o),t.bezierCurveTo(a-s,i+o,a-n,i+l,a-n,i),t.closePath()}}),Va=/[\s,]+/;function u_(t){if(Lt(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}function xu(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}xu.prototype.parse=function(t,e){e=e||{};var r=u_(t);if(!r)throw new Error("Illegal svg");var a=new q;this._root=a;var i=r.getAttribute("viewBox")||"",n=parseFloat(r.getAttribute("width")||e.width),o=parseFloat(r.getAttribute("height")||e.height);isNaN(n)&&(n=null),isNaN(o)&&(o=null),We(r,a,null,!0);for(var s=r.firstChild;s;)this._parseNode(s,a),s=s.nextSibling;var l,u;if(i){var h=tr(i).split(Va);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&n!=null&&o!=null&&(u=v_(l,n,o),!e.ignoreViewBox)){var f=a;a=new q,a.add(f),f.scale=u.scale.slice(),f.position=u.position.slice()}return!e.ignoreRootClip&&n!=null&&o!=null&&a.setClipPath(new xt({shape:{x:0,y:0,width:n,height:o}})),{root:a,width:n,height:o,viewBoxRect:l,viewBoxTransform:u}},xu.prototype._parseNode=function(t,e){var r=t.nodeName.toLowerCase();r==="defs"?this._isDefine=!0:r==="text"&&(this._isText=!0);var a;if(this._isDefine){var i=zI[r];if(i){var n=i.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=n)}}else{var i=kI[r];i&&(a=i.call(this,t,e),e.add(a))}for(var s=t.firstChild;s;)s.nodeType===1&&this._parseNode(s,a),s.nodeType===3&&this._isText&&this._parseText(s,a),s=s.nextSibling;r==="defs"?this._isDefine=!1:r==="text"&&(this._isText=!1)},xu.prototype._parseText=function(t,e){if(t.nodeType===1){var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX+=parseFloat(r),this._textY+=parseFloat(a)}var i=new dt({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});ur(e,i),We(t,i,this._defs);var n=i.style.fontSize;n&&n<9&&(i.style.fontSize=9,i.scale=i.scale||[1,1],i.scale[0]*=n/9,i.scale[1]*=n/9);var o=i.getBoundingRect();return this._textX+=o.width,e.add(i),i};var kI={g:function(t,e){var r=new q;return ur(e,r),We(t,r,this._defs),r},rect:function(t,e){var r=new xt;return ur(e,r),We(t,r,this._defs),r.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),r},circle:function(t,e){var r=new Br;return ur(e,r),We(t,r,this._defs),r.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),r},line:function(t,e){var r=new ye;return ur(e,r),We(t,r,this._defs),r.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),r},ellipse:function(t,e){var r=new NI;return ur(e,r),We(t,r,this._defs),r.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),r},polygon:function(t,e){var r=t.getAttribute("points");r&&(r=h_(r));var a=new Ge({shape:{points:r||[]}});return ur(e,a),We(t,a,this._defs),a},polyline:function(t,e){var r=new pt;ur(e,r),We(t,r,this._defs);var a=t.getAttribute("points");a&&(a=h_(a));var i=new ir({shape:{points:a||[]}});return i},image:function(t,e){var r=new ve;return ur(e,r),We(t,r,this._defs),r.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),r},text:function(t,e){var r=t.getAttribute("x")||0,a=t.getAttribute("y")||0,i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX=parseFloat(r)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(n);var o=new q;return ur(e,o),We(t,o,this._defs),o},tspan:function(t,e){var r=t.getAttribute("x"),a=t.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),a!=null&&(this._textY=parseFloat(a));var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0,o=new q;return ur(e,o),We(t,o,this._defs),this._textX+=i,this._textY+=n,o},path:function(t,e){var r=t.getAttribute("d")||"",a=G0(r);return ur(e,a),We(t,a,this._defs),a}},zI={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),r=parseInt(t.getAttribute("y1")||0,10),a=parseInt(t.getAttribute("x2")||10,10),i=parseInt(t.getAttribute("y2")||0,10),n=new pi(e,r,a,i);return BI(t,n),n},radialgradient:function(t){}};function BI(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1){var a=r.getAttribute("offset");a.indexOf("%")>0?a=parseInt(a,10)/100:a?a=parseFloat(a):a=0;var i=r.getAttribute("stop-color")||"#000000";e.addColorStop(a,i)}r=r.nextSibling}}function ur(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),J(e.__inheritedStyle,t.__inheritedStyle))}function h_(t){for(var e=tr(t).split(Va),r=[],a=0;a<e.length;a+=2){var i=parseFloat(e[a]),n=parseFloat(e[a+1]);r.push([i,n])}return r}var In={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-align":"textAlign","alignment-baseline":"textBaseline"};function We(t,e,r,a){var i=e.__inheritedStyle||{},n=e.type==="text";if(t.nodeType===1&&(HI(t,e),et(i,FI(t)),!a)){for(var o in In)if(In.hasOwnProperty(o)){var s=t.getAttribute(o);s!=null&&(i[In[o]]=s)}}var l=n?"textFill":"fill",u=n?"textStroke":"stroke";e.style=e.style||new Da;var h=e.style;i.fill!=null&&h.set(l,f_(i.fill,r)),i.stroke!=null&&h.set(u,f_(i.stroke,r)),M(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(f){var c=f==="lineWidth"&&n?"textStrokeWidth":f;i[f]!=null&&h.set(c,parseFloat(i[f]))}),(!i.textBaseline||i.textBaseline==="auto")&&(i.textBaseline="alphabetic"),i.textBaseline==="alphabetic"&&(i.textBaseline="bottom"),i.textAlign==="start"&&(i.textAlign="left"),i.textAlign==="end"&&(i.textAlign="right"),M(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(f){i[f]!=null&&h.set(f,i[f])}),i.lineDash&&(e.style.lineDash=tr(i.lineDash).split(Va)),h[u]&&h[u]!=="none"&&(e[u]=!0),e.__inheritedStyle=i}var VI=/url\(\s*#(.*?)\)/;function f_(t,e){var r=e&&t&&t.match(VI);if(r){var a=tr(r[1]),i=e[a];return i}return t}var GI=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function HI(t,e){var r=t.getAttribute("transform");if(r){r=r.replace(/,/g," ");var a=null,i=[];r.replace(GI,function(l,u,h){i.push(u,h)});for(var n=i.length-1;n>0;n-=2){var o=i[n],s=i[n-1];switch(a=a||Ie(),s){case"translate":o=tr(o).split(Va),yr(a,a,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=tr(o).split(Va),wo(a,a,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=tr(o).split(Va),aa(a,a,parseFloat(o[0]));break;case"skew":o=tr(o).split(Va),console.warn("Skew transform is not supported yet");break;case"matrix":var o=tr(o).split(Va);a[0]=parseFloat(o[0]),a[1]=parseFloat(o[1]),a[2]=parseFloat(o[2]),a[3]=parseFloat(o[3]),a[4]=parseFloat(o[4]),a[5]=parseFloat(o[5]);break}}e.setLocalTransform(a)}}var c_=/([^\s:;]+)\s*:\s*([^:;]+)/g;function FI(t){var e=t.getAttribute("style"),r={};if(!e)return r;var a={};c_.lastIndex=0;for(var i;(i=c_.exec(e))!=null;)a[i[1]]=i[2];for(var n in In)In.hasOwnProperty(n)&&a[n]!=null&&(r[In[n]]=a[n]);return r}function v_(t,e,r){var a=e/t.width,i=r/t.height,n=Math.min(a,i),o=[n,n],s=[-(t.x+t.width/2)*n+e/2,-(t.y+t.height/2)*n+r/2];return{scale:o,position:s}}function WI(t,e){var r=new xu;return r.parse(t,e)}var d_=ht(),wu={registerMap:function(t,e,r){var a;return z(e)?a=e:e.svg?a=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(r=e.specialAreas,e=e.geoJson),a=[{type:"geoJSON",source:e,specialAreas:r}]),M(a,function(i){var n=i.type;n==="geoJson"&&(n=i.type="geoJSON");var o=UI[n];T&&gt(o,"Illegal map type: "+n),o(i)}),d_.set(t,a)},retrieveMap:function(t){return d_.get(t)}},UI={geoJSON:function(t){var e=t.source;t.geoJSON=Lt(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=u_(t.source)}},Ln=gt,ae=M,$I=se,as=lt,Lv=wt.parseClassType,g_="4.8.0",Pv={zrender:"4.3.1"},ZI=1,p_=1e3,YI=800,XI=900,qI=5e3,m_=1e3,KI=1100,y_=2e3,__=3e3,jI=3500,QI=4e3,JI=5e3,Wr={PROCESSOR:{FILTER:p_,SERIES_FILTER:YI,STATISTIC:qI},VISUAL:{LAYOUT:m_,PROGRESSIVE_LAYOUT:KI,GLOBAL:y_,CHART:__,POST_CHART_LAYOUT:jI,COMPONENT:QI,BRUSH:JI}},hr="__flagInMainProcess",Ga="__optionUpdated",x_=/^[a-zA-Z0-9_]+$/;function Pn(t,e){return function(r,a,i){if(!e&&this._disposed){Ue(this.id);return}r=r&&r.toLowerCase(),le.prototype[t].call(this,r,a,i)}}function is(){le.call(this)}is.prototype.on=Pn("on",!0),is.prototype.off=Pn("off",!0),is.prototype.one=Pn("one",!0),Dt(is,le);function ns(t,n,r){r=r||{},typeof n=="string"&&(n=L_[n]),this.id,this.group,this._dom=t;var a="canvas";T&&(a=(typeof window>"u"?global:window).__ECHARTS__DEFAULT__RENDERER__||a);var i=this._zr=Dc(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height});this._throttledZrFlush=du(it(i.flush,i),17);var n=rt(n);n&&Vy(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new _e;var o=this._api=n2(this);function s(l,u){return l.__prio-u.__prio}wl(Cu,s),wl(kv,s),this._scheduler=new pu(this,o,kv,Cu),le.call(this,this._ecEventProcessor=new Nv),this._messageCenter=new is,this._initEvents(),this.resize=it(this.resize,this),this._pendingActions=[],i.animation.on("frame",this._onframe,this),t2(i,this),cf(this)}var At=ns.prototype;At._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[Ga]){var e=this[Ga].silent;this[hr]=!0,os(this),Ha.update.call(this),this[hr]=!1,this[Ga]=!1,bu.call(this,e),Su.call(this,e)}else if(t.unfinished){var r=ZI,a=this._model,i=this._api;t.unfinished=!1;do{var n=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),S_(this,a),t.performVisualTasks(a),Rv(this,this._model,i,"remain"),r-=+new Date-n}while(r>0&&t.unfinished);t.unfinished||this._zr.flush()}}},At.getDom=function(){return this._dom},At.getZr=function(){return this._zr},At.setOption=function(t,e,r){if(T&&Ln(!this[hr],"`setOption` should not be called during main process."),this._disposed){Ue(this.id);return}var a;if(as(e)&&(r=e.lazyUpdate,a=e.silent,e=e.notMerge),this[hr]=!0,!this._model||e){var i=new yv(this._api),n=this._theme,o=this._model=new gv;o.scheduler=this._scheduler,o.init(null,null,n,i)}this._model.setOption(t,M_),r?(this[Ga]={silent:a},this[hr]=!1):(os(this),Ha.update.call(this),this._zr.flush(),this[Ga]=!1,this[hr]=!1,bu.call(this,a),Su.call(this,a))},At.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},At.getModel=function(){return this._model},At.getOption=function(){return this._model&&this._model.getOption()},At.getWidth=function(){return this._zr.getWidth()},At.getHeight=function(){return this._zr.getHeight()},At.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},At.getRenderedCanvas=function(t){if(!!G.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},At.getSvgDataURL=function(){if(!!G.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return M(e,function(r){r.stopAnimation(!0)}),t.painter.toDataURL()}},At.getDataURL=function(t){if(this._disposed){Ue(this.id);return}t=t||{};var e=t.excludeComponents,r=this._model,a=[],i=this;ae(e,function(o){r.eachComponent({mainType:o},function(s){var l=i._componentsMap[s.__viewId];l.group.ignore||(a.push(l),l.group.ignore=!0)})});var n=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return ae(a,function(o){o.group.ignore=!1}),n},At.getConnectedDataURL=function(t){if(this._disposed){Ue(this.id);return}if(!!G.canvasSupported){var e=t.type==="svg",r=this.group,a=Math.min,i=Math.max,n=1/0;if(Du[r]){var o=n,s=n,l=-n,u=-n,h=[],f=t&&t.pixelRatio||1;M(Ci,function(m,y){if(m.group===r){var _=e?m.getZr().painter.getSvgDom().innerHTML:m.getRenderedCanvas(rt(t)),w=m.getDom().getBoundingClientRect();o=a(w.left,o),s=a(w.top,s),l=i(w.right,l),u=i(w.bottom,u),h.push({dom:_,left:w.left,top:w.top})}}),o*=f,s*=f,l*=f,u*=f;var c=l-o,v=u-s,d=rn(),g=Dc(d,{renderer:e?"svg":"canvas"});if(g.resize({width:c,height:v}),e){var p="";return ae(h,function(m){var y=m.left-o,_=m.top-s;p+='<g transform="translate('+y+","+_+')">'+m.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=p,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new xt({shape:{x:0,y:0,width:c,height:v},style:{fill:t.connectedBackgroundColor}})),ae(h,function(m){var y=new ve({style:{x:m.left*f-o,y:m.top*f-s,image:m.dom}});g.add(y)}),g.refreshImmediately(),d.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)}},At.convertToPixel=ot(w_,"convertToPixel"),At.convertFromPixel=ot(w_,"convertFromPixel");function w_(t,e,r){if(this._disposed){Ue(this.id);return}var a=this._model,i=this._coordSysMgr.getCoordinateSystems(),n;e=Ol(a,e);for(var o=0;o<i.length;o++){var s=i[o];if(s[t]&&(n=s[t](a,e,r))!=null)return n}T&&console.warn("No coordinate system that supports "+t+" found by the given finder.")}At.containPixel=function(t,e){if(this._disposed){Ue(this.id);return}var r=this._model,a;return t=Ol(r,t),M(t,function(i,n){n.indexOf("Models")>=0&&M(i,function(o){var s=o.coordinateSystem;if(s&&s.containPoint)a|=!!s.containPoint(e);else if(n==="seriesModels"){var l=this._chartsMap[o.__viewId];l&&l.containPoint?a|=l.containPoint(e,o):T&&console.warn(n+": "+(l?"The found component do not support containPoint.":"No view mapping to the found component."))}else T&&console.warn(n+": containPoint is not supported")},this)},this),!!a},At.getVisual=function(t,e){var r=this._model;t=Ol(r,t,{defaultMainType:"series"});var a=t.seriesModel;T&&(a||console.warn("There is no specified seires model"));var i=a.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return n!=null?i.getItemVisual(n,e):i.getVisual(e)},At.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},At.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Ha={prepareAndUpdate:function(t){os(this),Ha.update.call(this,t)},update:function(t){var e=this._model,r=this._api,a=this._zr,i=this._coordSysMgr,n=this._scheduler;if(!!e){n.restoreData(e,t),n.performSeriesTasks(e),i.create(e,r),n.performDataProcessorTasks(e,t),S_(this,e),i.update(e,r),Ev(e),n.performVisualTasks(e,t),C_(this,e,r,t);var o=e.get("backgroundColor")||"transparent";if(G.canvasSupported)a.setBackgroundColor(o);else{var s=Ve(o);o=ia(s,"rgb"),s[3]===0&&(o="transparent")}Ov(e,r)}},updateTransform:function(t){var e=this._model,r=this,a=this._api;if(!!e){var i=[];e.eachComponent(function(o,s){var l=r.getViewOfComponentModel(s);if(l&&l.__alive)if(l.updateTransform){var u=l.updateTransform(s,e,a,t);u&&u.update&&i.push(l)}else i.push(l)});var n=ht();e.eachSeries(function(o){var s=r._chartsMap[o.__viewId];if(s.updateTransform){var l=s.updateTransform(o,e,a,t);l&&l.update&&n.set(o.uid,1)}else n.set(o.uid,1)}),Ev(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:n}),Rv(r,e,a,t,n),Ov(e,this._api)}},updateView:function(t){var e=this._model;!e||(ue.markUpdateMethod(t,"updateView"),Ev(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),C_(this,this._model,this._api,t),Ov(e,this._api))},updateVisual:function(t){Ha.update.call(this,t)},updateLayout:function(t){Ha.update.call(this,t)}};function os(t){var e=t._model,r=t._scheduler;r.restorePipelines(e),r.prepareStageTasks(),T_(t,"component",e,r),T_(t,"chart",e,r),r.plan()}function b_(t,e,r,a,i){var n=t._model;if(!a){ae(t._componentsViews.concat(t._chartsViews),u);return}var o={};o[a+"Id"]=r[a+"Id"],o[a+"Index"]=r[a+"Index"],o[a+"Name"]=r[a+"Name"];var s={mainType:a,query:o};i&&(s.subType=i);var l=r.excludeSeriesId;l!=null&&(l=ht(me(l))),n&&n.eachComponent(s,function(h){(!l||l.get(h.id)==null)&&u(t[a==="series"?"_chartsMap":"_componentsMap"][h.__viewId])},t);function u(h){h&&h.__alive&&h[e]&&h[e](h.__model,n,t._api,r)}}At.resize=function(t){if(T&&Ln(!this[hr],"`resize` should not be called during main process."),this._disposed){Ue(this.id);return}this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!e){var r=e.resetOption("media"),a=t&&t.silent;this[hr]=!0,r&&os(this),Ha.update.call(this),this[hr]=!1,bu.call(this,a),Su.call(this,a)}};function S_(t,e){var r=t._chartsMap,a=t._scheduler;e.eachSeries(function(i){a.updateStreamModes(i,r[i.__viewId])})}At.showLoading=function(t,e){if(this._disposed){Ue(this.id);return}if(as(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),!zv[t]){T&&console.warn("Loading effects "+t+" not exists.");return}var r=zv[t](this._api,e),a=this._zr;this._loadingFX=r,a.add(r)},At.hideLoading=function(){if(this._disposed){Ue(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},At.makeActionFromEvent=function(t){var e=et({},t);return e.type=Tu[t.type],e},At.dispatchAction=function(t,e){if(this._disposed){Ue(this.id);return}if(as(e)||(e={silent:!!e}),!!Au[t.type]&&!!this._model){if(this[hr]){this._pendingActions.push(t);return}A_.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&G.browser.weChat&&this._throttledZrFlush(),bu.call(this,e.silent),Su.call(this,e.silent)}};function A_(t,e){var r=t.type,a=t.escapeConnect,i=Au[r],n=i.actionInfo,o=(n.update||"update").split(":"),s=o.pop();o=o[0]!=null&&Lv(o[0]),this[hr]=!0;var l=[t],u=!1;t.batch&&(u=!0,l=V(t.batch,function(v){return v=J(et({},v),t),v.batch=null,v}));var h=[],f,c=r==="highlight"||r==="downplay";ae(l,function(v){f=i.action(v,this._model,this._api),f=f||et({},v),f.type=n.event||f.type,h.push(f),c?b_(this,s,v,"series"):o&&b_(this,s,v,o.main,o.sub)},this),s!=="none"&&!c&&!o&&(this[Ga]?(os(this),Ha.update.call(this,t),this[Ga]=!1):Ha[s].call(this,t)),u?f={type:n.event||r,escapeConnect:a,batch:h}:f=h[0],this[hr]=!1,!e&&this._messageCenter.trigger(f.type,f)}function bu(t){for(var e=this._pendingActions;e.length;){var r=e.shift();A_.call(this,r,t)}}function Su(t){!t&&this.trigger("updated")}function t2(t,e){t.on("rendered",function(){e.trigger("rendered"),t.animation.isFinished()&&!e[Ga]&&!e._scheduler.unfinished&&!e._pendingActions.length&&e.trigger("finished")})}At.appendData=function(t){if(this._disposed){Ue(this.id);return}var e=t.seriesIndex,r=this.getModel(),a=r.getSeriesByIndex(e);T&&Ln(t.data&&a),a.appendData(t),this._scheduler.unfinished=!0},At.on=Pn("on",!1),At.off=Pn("off",!1),At.one=Pn("one",!1);function T_(t,e,r,a){for(var i=e==="component",n=i?t._componentsViews:t._chartsViews,o=i?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;u<n.length;u++)n[u].__alive=!1;i?r.eachComponent(function(c,v){c!=="series"&&h(v)}):r.eachSeries(h);function h(c){var v="_ec_"+c.id+"_"+c.type,d=o[v];if(!d){var g=Lv(c.type),p=i?Fr.getClass(g.main,g.sub):ue.getClass(g.sub);T&&Ln(p,g.sub+" does not exist."),d=new p,d.init(r,l),o[v]=d,n.push(d),s.add(d.group)}c.__viewId=d.__id=v,d.__alive=!0,d.__model=c,d.group.__ecComponentInfo={mainType:c.mainType,index:c.componentIndex},!i&&a.prepareView(d,c,r,l)}for(var u=0;u<n.length;){var f=n[u];f.__alive?u++:(!i&&f.renderTask.dispose(),s.remove(f.group),f.dispose(r,l),n.splice(u,1),delete o[f.__id],f.__id=f.group.__ecComponentInfo=null)}}function Ev(t){t.clearColorPalette(),t.eachSeries(function(e){e.clearColorPalette()})}function C_(t,e,r,a){e2(t,e,r,a),ae(t._chartsViews,function(i){i.__alive=!1}),Rv(t,e,r,a),ae(t._chartsViews,function(i){i.__alive||i.remove(e,r)})}function e2(t,e,r,a,i){ae(i||t._componentsViews,function(n){var o=n.__model;n.render(o,e,r,a),D_(o,n)})}function Rv(t,e,r,a,i){var n=t._scheduler,o;e.eachSeries(function(s){var l=t._chartsMap[s.__viewId];l.__alive=!0;var u=l.renderTask;n.updatePayload(u,a),i&&i.get(s.uid)&&u.dirty(),o|=u.perform(n.getPerformArgs(u)),l.group.silent=!!s.get("silent"),D_(s,l),i2(s,l)}),n.unfinished|=o,a2(t,e),wI(t._zr.dom,e)}function Ov(t,e){ae(I_,function(r){r(t,e)})}var r2=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];At._initEvents=function(){ae(r2,function(t){var e=function(r){var a=this.getModel(),i=r.target,n,o=t==="globalout";if(o)n={};else if(i&&i.dataIndex!=null){var s=i.dataModel||a.getSeriesByIndex(i.seriesIndex);n=s&&s.getDataParams(i.dataIndex,i.dataType,i)||{}}else i&&i.eventData&&(n=et({},i.eventData));if(n){var l=n.componentType,u=n.componentIndex;(l==="markLine"||l==="markPoint"||l==="markArea")&&(l="series",u=n.seriesIndex);var h=l&&u!=null&&a.getComponent(l,u),f=h&&this[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];T&&!o&&!(h&&f)&&console.warn("model or view can not be found by params"),n.event=r,n.type=t,this._ecEventProcessor.eventInfo={targetEl:i,packedEvent:n,model:h,view:f},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),ae(Tu,function(t,e){this._messageCenter.on(e,function(r){this.trigger(e,r)},this)},this)},At.isDisposed=function(){return this._disposed},At.clear=function(){if(this._disposed){Ue(this.id);return}this.setOption({series:[]},!0)},At.dispose=function(){if(this._disposed){Ue(this.id);return}this._disposed=!0,m0(this.getDom(),Bv,"");var t=this._api,e=this._model;ae(this._componentsViews,function(r){r.dispose(e,t)}),ae(this._chartsViews,function(r){r.dispose(e,t)}),this._zr.dispose(),delete Ci[this.id]},Dt(ns,le);function Ue(t){T&&console.warn("Instance "+t+" has been disposed")}function a2(t,e){var r=t._zr,a=r.storage,i=0;a.traverse(function(n){i++}),i>e.get("hoverLayerThreshold")&&!G.node&&e.eachSeries(function(n){if(!n.preventUsingHoverLayer){var o=t._chartsMap[n.__viewId];o.__alive&&o.group.traverse(function(s){s.useHoverLayer=!0})}})}function i2(t,e){var r=t.get("blendMode")||null;T&&!G.canvasSupported&&r&&r!=="source-over"&&console.warn("Only canvas support blendMode"),e.group.traverse(function(a){a.isGroup||a.style.blend!==r&&a.setStyle("blend",r),a.eachPendingDisplayable&&a.eachPendingDisplayable(function(i){i.setStyle("blend",r)})})}function D_(t,e){var r=t.get("z"),a=t.get("zlevel");e.group.traverse(function(i){i.type!=="group"&&(r!=null&&(i.z=r),a!=null&&(i.zlevel=a))})}function n2(t){var e=t._coordSysMgr;return et(new Oy(t),{getCoordinateSystems:it(e.getCoordinateSystems,e),getComponentByElement:function(r){for(;r;){var a=r.__ecComponentInfo;if(a!=null)return t._model.getComponent(a.mainType,a.index);r=r.parent}}})}function Nv(){this.eventInfo}Nv.prototype={constructor:Nv,normalizeQuery:function(t){var e={},r={},a={};if(Lt(t)){var i=Lv(t);e.mainType=i.main||null,e.subType=i.sub||null}else{var n=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};M(t,function(s,l){for(var u=!1,h=0;h<n.length;h++){var f=n[h],c=l.lastIndexOf(f);if(c>0&&c===l.length-f.length){var v=l.slice(0,c);v!=="data"&&(e.mainType=v,e[f.toLowerCase()]=s,u=!0)}}o.hasOwnProperty(l)&&(r[l]=s,u=!0),u||(a[l]=s)})}return{cptQuery:e,dataQuery:r,otherQuery:a}},filter:function(t,e,r){var a=this.eventInfo;if(!a)return!0;var i=a.targetEl,n=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,n,"name")&&h(u,n,"dataIndex")&&h(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,n));function h(f,c,v,d){return f[v]==null||c[d||v]===f[v]}},afterTrigger:function(){this.eventInfo=null}};var Au={},Tu={},kv=[],M_=[],I_=[],Cu=[],L_={},zv={},Ci={},Du={},o2=new Date-0,s2=new Date-0,Bv="_echarts_instance_";function l2(t){var e=0,r=1,a=2,i="__connectUpdateStatus";function n(o,s){for(var l=0;l<o.length;l++){var u=o[l];u[i]=s}}ae(Tu,function(o,s){t._messageCenter.on(s,function(l){if(Du[t.group]&&t[i]!==e){if(l&&l.escapeConnect)return;var u=t.makeActionFromEvent(l),h=[];ae(Ci,function(f){f!==t&&f.group===t.group&&h.push(f)}),n(h,e),ae(h,function(f){f[i]!==r&&f.dispatchAction(u)}),n(h,a)}})})}function u2(t,e,r){if(T){if(Cc.replace(".","")-0<Pv.zrender.replace(".","")-0)throw new Error("zrender/src "+Cc+" is too old for ECharts "+g_+". Current version need ZRender "+Pv.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.")}var a=Vv(t);if(a)return T&&console.warn("There is a chart instance already initialized on the dom."),a;T&&nn(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&(!r||r.width==null)||!t.clientHeight&&(!r||r.height==null))&&console.warn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.");var i=new ns(t,e,r);return i.id="ec_"+o2++,Ci[i.id]=i,m0(t,Bv,i.id),l2(i),i}function h2(t){if(z(t)){var e=t;t=null,ae(e,function(r){r.group!=null&&(t=r.group)}),t=t||"g_"+s2++,ae(e,function(r){r.group=t})}return Du[t]=!0,t}function P_(t){Du[t]=!1}var f2=P_;function c2(t){typeof t=="string"?t=Ci[t]:t instanceof ns||(t=Vv(t)),t instanceof ns&&!t.isDisposed()&&t.dispose()}function Vv(t){return Ci[dD(t,Bv)]}function v2(t){return Ci[t]}function Gv(t,e){L_[t]=e}function we(t){M_.push(t)}function $e(t,e){Fv(kv,t,e,p_)}function d2(t){I_.push(t)}function mt(t,e,r){typeof e=="function"&&(r=e,e="");var a=as(t)?t.type:[t,t={event:e}][0];t.event=(t.event||a).toLowerCase(),e=t.event,Ln(x_.test(a)&&x_.test(e)),Au[a]||(Au[a]={action:r,actionInfo:t}),Tu[e]=a}function Hv(t,e){_e.register(t,e)}function g2(t){var e=_e.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function Gt(t,e){Fv(Cu,t,e,m_,"layout")}function Rt(t,e){Fv(Cu,t,e,__,"visual")}function Fv(t,e,r,a,i){if(($I(e)||as(e))&&(r=e,e=a),T){if(isNaN(e)||e==null)throw new Error("Illegal priority");ae(t,function(o){Ln(o.__raw!==r)})}var n=pu.wrapStageHandler(r,i);return n.__prio=e,n.__raw=r,t.push(n),n}function E_(t,e){zv[t]=e}function Ze(t){return wt.extend(t)}function he(t){return Fr.extend(t)}function Mu(t){return Vt.extend(t)}function ke(t){return ue.extend(t)}function p2(t){nm("createCanvas",t)}function m2(t,e,r){wu.registerMap(t,e,r)}function y2(t){var e=wu.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}Rt(y_,xI),we(Vy),$e(XI,nI),E_("default",bI),mt({type:"highlight",event:"highlight",update:"highlight"},ce),mt({type:"downplay",event:"downplay",update:"downplay"},ce),Gv("light",OI),Gv("dark",l_);var _2={};function R_(t){return t}function ha(t,e,r,a,i){this._old=t,this._new=e,this._oldKeyGetter=r||R_,this._newKeyGetter=a||R_,this.context=i}ha.prototype={constructor:ha,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,r={},a={},i=[],n=[],o;for(O_(t,r,i,"_oldKeyGetter",this),O_(e,a,n,"_newKeyGetter",this),o=0;o<t.length;o++){var s=i[o],l=a[s];if(l!=null){var u=l.length;u?(u===1&&(a[s]=null),l=l.shift()):a[s]=null,this._update&&this._update(l,o)}else this._remove&&this._remove(o)}for(var o=0;o<n.length;o++){var s=n[o];if(a.hasOwnProperty(s)){var l=a[s];if(l==null)continue;if(!l.length)this._add&&this._add(l);else for(var h=0,u=l.length;h<u;h++)this._add&&this._add(l[h])}}}};function O_(t,e,r,a,i){for(var n=0;n<t.length;n++){var o="_ec_"+i[a](t[n],n),s=e[o];s==null?(r.push(o),e[o]=n):(s.length||(e[o]=s=[s]),s.push(n))}}var Wv=ht(["tooltip","label","itemName","itemId","seriesName"]);function x2(t){var e={},r=e.encode={},a=ht(),i=[],n=[],o=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};M(t.dimensions,function(f){var c=t.getDimensionInfo(f),v=c.coordDim;if(v){T&&gt(Wv.get(v)==null);var d=c.coordDimIndex;Uv(r,v)[d]=f,c.isExtraCoord||(a.set(v,1),w2(c.type)&&(i[0]=f),Uv(o.encode,v)[d]=c.index),c.defaultTooltip&&n.push(f)}Wv.each(function(g,p){var m=Uv(r,p),y=c.otherDims[p];y!=null&&y!==!1&&(m[y]=c.name)})});var s=[],l={};a.each(function(f,c){var v=r[c];l[c]=v[0],s=s.concat(v)}),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(i=u.slice());var h=r.tooltip;return h&&h.length?n=h.slice():n.length||(n=i.slice()),r.defaultedLabel=i,r.defaultedTooltip=n,e}function Uv(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Iu(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function w2(t){return!(t==="ordinal"||t==="time")}function ss(t){t!=null&&et(this,t),this.otherDims={}}var Lu=lt,ls="undefined",N_=-1,b2="e\0\0",S2={float:typeof Float64Array===ls?Array:Float64Array,int:typeof Int32Array===ls?Array:Int32Array,ordinal:Array,number:Array,time:Array},A2=typeof Uint32Array===ls?Array:Uint32Array,T2=typeof Int32Array===ls?Array:Int32Array,C2=typeof Uint16Array===ls?Array:Uint16Array;function Pu(t){return t._rawCount>65535?A2:C2}function D2(t){var e=t.constructor;return e===Array?t.slice():new e(t)}var M2=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],I2=["_extent","_approximateExtent","_rawExtent"];function k_(t,e){M(M2.concat(e.__wrappedMethods||[]),function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t.__wrappedMethods=e.__wrappedMethods,M(I2,function(r){t[r]=rt(e[r])}),t._calculationInfo=et(e._calculationInfo)}var fe=function(t,e){t=t||["x","y"];for(var r={},a=[],i={},n=0;n<t.length;n++){var o=t[n];Lt(o)?o=new ss({name:o}):o instanceof ss||(o=new ss(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},a.push(s),r[s]=o,o.index=n,o.createInvertedIndices&&(i[s]=[])}this.dimensions=a,this._dimensionInfos=r,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=x2(this),this._invertedIndicesMap=i,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},nt=fe.prototype;nt.type="list",nt.hasItemOption=!0,nt.getDimension=function(t){return(typeof t=="number"||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},nt.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},nt.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},nt.mapDimension=function(t,e){var r=this._dimensionsSummary;if(e==null)return r.encodeFirstDimNotExtra[t];var a=r.encode[t];return e===!0?(a||[]).slice():a&&a[e]},nt.initData=function(t,e,r){var a=Tr.isInstance(t)||Qr(t);if(a&&(t=new Gy(t,this.dimensions.length)),T&&!a&&(typeof t.getItem!="function"||typeof t.count!="function"))throw new Error("Inavlid data provider.");this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},r||(this.hasItemOption=!1),this.defaultDimValueGetter=Wy[this._rawData.getSource().sourceFormat],this._dimValueGetter=r=r||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Wy.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},nt.getProvider=function(){return this._rawData},nt.appendData=function(t){T&&gt(!this._indices,"appendData can only be called on raw data.");var e=this._rawData,r=this.count();e.appendData(t);var a=e.count();e.persistent||(a+=r),this._initDataFromProvider(r,a)},nt.appendValues=function(t,e){for(var r=this._chunkSize,a=this._storage,i=this.dimensions,n=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<n;h++){var f=i[h];o[f]||(o[f]=Ru()),a[f]||(a[f]=[]),z_(a,this._dimensionInfos[f],r,u,l),this._chunkCount=a[f].length}for(var c=new Array(n),v=s;v<l;v++){for(var d=v-s,g=Math.floor(v/r),p=v%r,m=0;m<n;m++){var f=i[m],y=this._dimValueGetterArrayRows(t[d]||c,f,d,m);a[f][g][p]=y;var _=o[f];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[v]=e[d])}this._rawCount=this._count=l,this._extent={},B_(this)},nt._initDataFromProvider=function(t,e){if(!(t>=e)){for(var r=this._chunkSize,a=this._rawData,i=this._storage,n=this.dimensions,o=n.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,f=this._nameRepeatCount={},c,v=this._chunkCount,d=0;d<o;d++){var g=n[d];h[g]||(h[g]=Ru());var p=s[g];p.otherDims.itemName===0&&(c=this._nameDimIdx=d),p.otherDims.itemId===0&&(this._idDimIdx=d),i[g]||(i[g]=[]),z_(i,p,r,v,e),this._chunkCount=i[g].length}for(var m=new Array(o),y=t;y<e;y++){m=a.getItem(y,m);for(var _=Math.floor(y/r),w=y%r,b=0;b<o;b++){var g=n[b],A=i[g][_],S=this._dimValueGetter(m,g,y,b);A[w]=S;var D=h[g];S<D[0]&&(D[0]=S),S>D[1]&&(D[1]=S)}if(!a.pure){var I=l[y];if(m&&I==null){if(m.name!=null)l[y]=I=m.name;else if(c!=null){var L=n[c],P=i[L][_];if(P){I=P[w];var R=s[L].ordinalMeta;R&&R.categories.length&&(I=R.categories[I])}}}var E=m==null?null:m.id;E==null&&I!=null&&(f[I]=f[I]||0,E=I,f[I]>0&&(E+="__ec__"+f[I]),f[I]++),E!=null&&(u[y]=E)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent={},B_(this)}};function z_(t,e,r,a,i){var n=S2[e.type],o=a-1,s=e.name,l=t[s][o];if(l&&l.length<r){for(var u=new n(Math.min(i-o*r,r)),h=0;h<l.length;h++)u[h]=l[h];t[s][o]=u}for(var f=a*r;f<i;f+=r)t[s].push(new n(Math.min(i-f,r)))}function B_(t){var e=t._invertedIndicesMap;M(e,function(r,a){var i=t._dimensionInfos[a],n=i.ordinalMeta;if(n){r=e[a]=new T2(n.categories.length);for(var o=0;o<r.length;o++)r[o]=N_;for(var o=0;o<t._count;o++)r[t.get(a,o)]=o}})}function V_(t,e,r){var a;if(e!=null){var i=t._chunkSize,n=Math.floor(r/i),o=r%i,s=t.dimensions[e],l=t._storage[s][n];if(l){a=l[o];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(a=u.categories[a])}}return a}nt.count=function(){return this._count},nt.getIndices=function(){var t,e=this._indices;if(e){var r=e.constructor,a=this._count;if(r===Array){t=new r(a);for(var i=0;i<a;i++)t[i]=e[i]}else t=new r(e.buffer,0,a)}else for(var r=Pu(this),t=new r(this.count()),i=0;i<t.length;i++)t[i]=i;return t},nt.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var r=this._storage;if(!r[t])return NaN;e=this.getRawIndex(e);var a=Math.floor(e/this._chunkSize),i=e%this._chunkSize,n=r[t][a],o=n[i];return o},nt.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var r=this._storage[t];if(!r)return NaN;var a=Math.floor(e/this._chunkSize),i=e%this._chunkSize,n=r[a];return n[i]},nt._getFast=function(t,e){var r=Math.floor(e/this._chunkSize),a=e%this._chunkSize,i=this._storage[t][r];return i[a]},nt.getValues=function(t,e){var r=[];z(t)||(e=t,t=this.dimensions);for(var a=0,i=t.length;a<i;a++)r.push(this.get(t[a],e));return r},nt.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,r=0,a=e.length;r<a;r++)if(isNaN(this.get(e[r],t)))return!1;return!0},nt.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],r=Ru();if(!e)return r;var a=this.count(),i=!this._indices,n;if(i)return this._rawExtent[t].slice();if(n=this._extent[t],n)return n.slice();n=r;for(var o=n[0],s=n[1],l=0;l<a;l++){var u=this._getFast(t,this.getRawIndex(l));u<o&&(o=u),u>s&&(s=u)}return n=[o,s],this._extent[t]=n,n},nt.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},nt.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},nt.getCalculationInfo=function(t){return this._calculationInfo[t]},nt.setCalculationInfo=function(t,e){Lu(t)?et(this._calculationInfo,t):this._calculationInfo[t]=e},nt.getSum=function(t){var e=this._storage[t],r=0;if(e)for(var a=0,i=this.count();a<i;a++){var n=this.get(t,a);isNaN(n)||(r+=n)}return r},nt.getMedian=function(t){var e=[];this.each(t,function(i,n){isNaN(i)||e.push(i)});var r=[].concat(e).sort(function(i,n){return i-n}),a=this.count();return a===0?0:a%2===1?r[(a-1)/2]:(r[a/2]+r[a/2-1])/2},nt.rawIndexOf=function(t,e){var r=t&&this._invertedIndicesMap[t];if(T&&!r)throw new Error("Do not supported yet");var a=r[e];return a==null||isNaN(a)?N_:a},nt.indexOfName=function(t){for(var e=0,r=this.count();e<r;e++)if(this.getName(e)===t)return e;return-1},nt.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,r=e[t];if(r!=null&&r<this._count&&r===t)return t;for(var a=0,i=this._count-1;a<=i;){var n=(a+i)/2|0;if(e[n]<t)a=n+1;else if(e[n]>t)i=n-1;else return n}return-1},nt.indicesOfNearest=function(t,e,r){var a=this._storage,i=a[t],n=[];if(!i)return n;r==null&&(r=1/0);for(var o=1/0,s=-1,l=0,u=0,h=this.count();u<h;u++){var f=e-this.get(t,u),c=Math.abs(f);c<=r&&((c<o||c===o&&f>=0&&s<0)&&(o=c,s=f,l=0),f===s&&(n[l++]=u))}return n.length=l,n},nt.getRawIndex=us;function us(t){return t}function hs(t){return t<this._count&&t>=0?this._indices[t]:-1}nt.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],r=0;r<this.dimensions.length;r++){var a=this.dimensions[r];e.push(this.get(a,t))}return e},nt.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||V_(this,this._nameDimIdx,e)||""},nt.getId=function(t){return $v(this,this.getRawIndex(t))};function $v(t,e){var r=t._idList[e];return r==null&&(r=V_(t,t._idDimIdx,e)),r==null&&(r=b2+e),r}function Zv(t){return z(t)||(t=[t]),t}function Eu(t,e){for(var r=0;r<e.length;r++)t._dimensionInfos[e[r]]||console.error("Unkown dimension "+e[r])}nt.each=function(t,e,r,a){"use strict";if(!!this._count){typeof t=="function"&&(a=r,r=e,e=t,t=[]),r=r||a||this,t=V(Zv(t),this.getDimension,this),T&&Eu(this,t);for(var i=t.length,n=0;n<this.count();n++)switch(i){case 0:e.call(r,n);break;case 1:e.call(r,this.get(t[0],n),n);break;case 2:e.call(r,this.get(t[0],n),this.get(t[1],n),n);break;default:for(var o=0,s=[];o<i;o++)s[o]=this.get(t[o],n);s[o]=n,e.apply(r,s)}}},nt.filterSelf=function(t,e,r,a){"use strict";if(!!this._count){typeof t=="function"&&(a=r,r=e,e=t,t=[]),r=r||a||this,t=V(Zv(t),this.getDimension,this),T&&Eu(this,t);for(var i=this.count(),n=Pu(this),o=new n(i),s=[],l=t.length,u=0,h=t[0],f=0;f<i;f++){var c,v=this.getRawIndex(f);if(l===0)c=e.call(r,f);else if(l===1){var d=this._getFast(h,v);c=e.call(r,d,f)}else{for(var g=0;g<l;g++)s[g]=this._getFast(h,v);s[g]=f,c=e.apply(r,s)}c&&(o[u++]=v)}return u<i&&(this._indices=o),this._count=u,this._extent={},this.getRawIndex=this._indices?hs:us,this}},nt.selectRange=function(t){"use strict";if(!!this._count){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);T&&Eu(this,e);var a=e.length;if(!!a){var i=this.count(),n=Pu(this),o=new n(i),s=0,l=e[0],u=t[l][0],h=t[l][1],f=!1;if(!this._indices){var c=0;if(a===1){for(var v=this._storage[e[0]],d=0;d<this._chunkCount;d++)for(var g=v[d],p=Math.min(this._count-d*this._chunkSize,this._chunkSize),m=0;m<p;m++){var y=g[m];(y>=u&&y<=h||isNaN(y))&&(o[s++]=c),c++}f=!0}else if(a===2){for(var v=this._storage[l],_=this._storage[e[1]],w=t[e[1]][0],b=t[e[1]][1],d=0;d<this._chunkCount;d++)for(var g=v[d],A=_[d],p=Math.min(this._count-d*this._chunkSize,this._chunkSize),m=0;m<p;m++){var y=g[m],S=A[m];(y>=u&&y<=h||isNaN(y))&&(S>=w&&S<=b||isNaN(S))&&(o[s++]=c),c++}f=!0}}if(!f)if(a===1)for(var m=0;m<i;m++){var D=this.getRawIndex(m),y=this._getFast(l,D);(y>=u&&y<=h||isNaN(y))&&(o[s++]=D)}else for(var m=0;m<i;m++){for(var I=!0,D=this.getRawIndex(m),d=0;d<a;d++){var L=e[d],y=this._getFast(r,D);(y<t[L][0]||y>t[L][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return s<i&&(this._indices=o),this._count=s,this._extent={},this.getRawIndex=this._indices?hs:us,this}}},nt.mapArray=function(t,e,r,a){"use strict";typeof t=="function"&&(a=r,r=e,e=t,t=[]),r=r||a||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},r),i};function G_(t,e){var r=t.dimensions,a=new fe(V(r,t.getDimensionInfo,t),t.hostModel);k_(a,t);for(var i=a._storage={},n=t._storage,o=0;o<r.length;o++){var s=r[o];n[s]&&(yt(e,s)>=0?(i[s]=L2(n[s]),a._rawExtent[s]=Ru(),a._extent[s]=null):i[s]=n[s])}return a}function L2(t){for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=D2(t[r]);return e}function Ru(){return[1/0,-1/0]}nt.map=function(t,e,r,a){"use strict";r=r||a||this,t=V(Zv(t),this.getDimension,this),T&&Eu(this,t);var i=G_(this,t);i._indices=this._indices,i.getRawIndex=i._indices?hs:us;for(var n=i._storage,o=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],f=i._rawExtent,c=0;c<u;c++){for(var v=0;v<l;v++)h[v]=this.get(t[v],c);h[l]=c;var d=e&&e.apply(r,h);if(d!=null){typeof d!="object"&&(o[0]=d,d=o);for(var g=this.getRawIndex(c),p=Math.floor(g/s),m=g%s,y=0;y<d.length;y++){var _=t[y],w=d[y],b=f[_],A=n[_];A&&(A[p][m]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return i},nt.downSample=function(t,e,r,a){for(var i=G_(this,[t]),n=i._storage,o=[],s=Math.floor(1/e),l=n[t],u=this.count(),h=this._chunkSize,f=i._rawExtent[t],c=new(Pu(this))(u),v=0,d=0;d<u;d+=s){s>u-d&&(s=u-d,o.length=s);for(var g=0;g<s;g++){var p=this.getRawIndex(d+g),m=Math.floor(p/h),y=p%h;o[g]=l[m][y]}var _=r(o),w=this.getRawIndex(Math.min(d+a(o,_)||0,u-1)),b=Math.floor(w/h),A=w%h;l[b][A]=_,_<f[0]&&(f[0]=_),_>f[1]&&(f[1]=_),c[v++]=w}return i._count=v,i._indices=c,i.getRawIndex=hs,i},nt.getItemModel=function(t){var e=this.hostModel;return new _t(this.getRawDataItem(t),e,e&&e.ecModel)},nt.diff=function(t){var e=this;return new ha(t?t.getIndices():[],this.getIndices(),function(r){return $v(t,r)},function(r){return $v(e,r)})},nt.getVisual=function(t){var e=this._visual;return e&&e[t]},nt.setVisual=function(t,e){if(Lu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setVisual(r,t[r]);return}this._visual=this._visual||{},this._visual[t]=e},nt.setLayout=function(t,e){if(Lu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setLayout(r,t[r]);return}this._layout[t]=e},nt.getLayout=function(t){return this._layout[t]},nt.getItemLayout=function(t){return this._itemLayouts[t]},nt.setItemLayout=function(t,e,r){this._itemLayouts[t]=r?et(this._itemLayouts[t]||{},e):e},nt.clearItemLayouts=function(){this._itemLayouts.length=0},nt.getItemVisual=function(t,e,r){var a=this._itemVisuals[t],i=a&&a[e];return i==null&&!r?this.getVisual(e):i},nt.setItemVisual=function(t,e,r){var a=this._itemVisuals[t]||{},i=this.hasItemVisual;if(this._itemVisuals[t]=a,Lu(e)){for(var n in e)e.hasOwnProperty(n)&&(a[n]=e[n],i[n]=!0);return}a[e]=r,i[e]=!0},nt.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var P2=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};nt.setItemGraphicEl=function(t,e){var r=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=r&&r.seriesIndex,e.type==="group"&&e.traverse(P2,e)),this._graphicEls[t]=e},nt.getItemGraphicEl=function(t){return this._graphicEls[t]},nt.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(r,a){r&&t&&t.call(e,r,a)})},nt.cloneShallow=function(t){if(!t){var e=V(this.dimensions,this.getDimensionInfo,this);t=new fe(e,this.hostModel)}if(t._storage=this._storage,k_(t,this),this._indices){var r=this._indices.constructor;t._indices=new r(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?hs:us,t},nt.wrapMethod=function(t,e){var r=this[t];typeof r=="function"&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=r.apply(this,arguments);return e.apply(this,[a].concat(on(arguments)))})},nt.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],nt.CHANGABLE_METHODS=["filterSelf","selectRange"];function H_(t,e,r){Tr.isInstance(e)||(e=Tr.seriesDataToSource(e)),r=r||{},t=(t||[]).slice();for(var a=(r.dimsDef||[]).slice(),i=ht(),n=ht(),o=[],s=E2(e,t,a,r.dimCount),l=0;l<s;l++){var u=a[l]=et({},lt(a[l])?a[l]:{name:a[l]}),h=u.name,f=o[l]=new ss;h!=null&&i.get(h)==null&&(f.name=f.displayName=h,i.set(h,l)),u.type!=null&&(f.type=u.type),u.displayName!=null&&(f.displayName=u.displayName)}var c=r.encodeDef;!c&&r.encodeDefaulter&&(c=r.encodeDefaulter(e,s)),c=ht(c),c.each(function(b,A){if(b=me(b).slice(),b.length===1&&!Lt(b[0])&&b[0]<0){c.set(A,!1);return}var S=c.set(A,[]);M(b,function(D,I){Lt(D)&&(D=i.get(D)),D!=null&&D<s&&(S[I]=D,d(o[D],A,I))})});var v=0;M(t,function(D,A){var S,D,I,L;if(Lt(D))S=D,D={};else{S=D.name;var P=D.ordinalMeta;D.ordinalMeta=null,D=rt(D),D.ordinalMeta=P,I=D.dimsDef,L=D.otherDims,D.name=D.coordDim=D.coordDimIndex=D.dimsDef=D.otherDims=null}var R=c.get(S);if(R!==!1){var R=me(R);if(!R.length)for(var E=0;E<(I&&I.length||1);E++){for(;v<o.length&&o[v].coordDim!=null;)v++;v<o.length&&R.push(v++)}M(R,function(Z,W){var $=o[Z];if(d(J($,D),S,W),$.name==null&&I){var X=I[W];!lt(X)&&(X={name:X}),$.name=$.displayName=X.name,$.defaultTooltip=X.defaultTooltip}L&&J($.otherDims,L)})}});function d(b,A,S){Wv.get(A)!=null?b.otherDims[A]=S:(b.coordDim=A,b.coordDimIndex=S,n.set(A,!0))}var g=r.generateCoord,p=r.generateCoordCount,m=p!=null;p=g?p||1:0;for(var y=g||"value",_=0;_<s;_++){var f=o[_]=o[_]||new ss,w=f.coordDim;w==null&&(f.coordDim=F_(y,n,m),f.coordDimIndex=0,(!g||p<=0)&&(f.isExtraCoord=!0),p--),f.name==null&&(f.name=F_(f.coordDim,i)),f.type==null&&(GM(e,_,f.name)===Ae.Must||f.isExtraCoord&&(f.otherDims.itemName!=null||f.otherDims.seriesName!=null))&&(f.type="ordinal")}return o}function E2(t,e,r,a){var i=Math.max(t.dimensionsDetectCount||1,e.length,r.length,a||0);return M(e,function(n){var o=n.dimsDef;o&&(i=Math.max(i,o.length))}),i}function F_(t,e,r){if(r||e.get(t)!=null){for(var a=0;e.get(t+a)!=null;)a++;t+=a}return e.set(t,!0),t}var En=function(t,e){return e=e||{},H_(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function R2(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=ht(),this.categoryAxisMap=ht(),this.firstCategoryDimIndex=null}function O2(t){var e=t.get("coordinateSystem"),r=new R2(e),a=N2[e];if(a)return a(t,r,r.axisMap,r.categoryAxisMap),r}var N2={cartesian2d:function(t,e,r,a){var i=t.getReferringComponents("xAxis")[0],n=t.getReferringComponents("yAxis")[0];if(T){if(!i)throw new Error('xAxis "'+Ut(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!n)throw new Error('yAxis "'+Ut(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",n),Rn(i)&&(a.set("x",i),e.firstCategoryDimIndex=0),Rn(n)&&(a.set("y",n),e.firstCategoryDimIndex==null&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,a){var i=t.getReferringComponents("singleAxis")[0];if(T&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),Rn(i)&&(a.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,a){var i=t.getReferringComponents("polar")[0],n=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(T){if(!o)throw new Error("angleAxis option not found");if(!n)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",n),r.set("angle",o),Rn(n)&&(a.set("radius",n),e.firstCategoryDimIndex=0),Rn(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,a){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,a){var i=t.ecModel,n=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=n.dimensions.slice();M(n.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),h=o[l];r.set(h,u),Rn(u)&&e.firstCategoryDimIndex==null&&(a.set(h,u),e.firstCategoryDimIndex=l)})}};function Rn(t){return t.get("type")==="category"}function W_(t,e,r){r=r||{};var a=r.byIndex,i=r.stackedCoordDimension,n=!!(t&&t.get("stack")),o,s,l,u;if(M(e,function(v,d){Lt(v)&&(e[d]=v={name:v}),n&&!v.isExtraCoord&&(!a&&!o&&v.ordinalMeta&&(o=v),!s&&v.type!=="ordinal"&&v.type!=="time"&&(!i||i===v.coordDim)&&(s=v))}),s&&!a&&!o&&(a=!0),s){l="__\0ecstackresult",u="__\0ecstackedover",o&&(o.createInvertedIndices=!0);var h=s.coordDim,f=s.type,c=0;M(e,function(v){v.coordDim===h&&c++}),e.push({name:l,coordDim:h,coordDimIndex:c,type:f,isExtraCoord:!0,isCalculationCoord:!0}),c++,e.push({name:u,coordDim:u,coordDimIndex:c,type:f,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:s&&s.name,stackedByDimension:o&&o.name,isStackedByIndex:a,stackedOverDimension:u,stackResultDimension:l}}function fa(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function fs(t,e){return fa(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ca(t,e,r){r=r||{},Tr.isInstance(t)||(t=Tr.seriesDataToSource(t));var a=e.get("coordinateSystem"),i=_e.get(a),n=O2(e),o;n&&(o=V(n.coordSysDims,function(v){var d={name:v},g=n.axisMap.get(v);if(g){var p=g.get("type");d.type=Iu(p)}return d})),o||(o=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]);var s=En(t,{coordDimensions:o,generateCoord:r.generateCoord,encodeDefaulter:r.useEncodeDefaulter?ot(Py,o,e):null}),l,u;n&&M(s,function(v,d){var g=v.coordDim,p=n.categoryAxisMap.get(g);p&&(l==null&&(l=d),v.ordinalMeta=p.getOrdinalMeta()),v.otherDims.itemName!=null&&(u=!0)}),!u&&l!=null&&(s[l].otherDims.itemName=0);var h=W_(e,s),f=new fe(s,e);f.setCalculationInfo(h);var c=l!=null&&k2(t)?function(v,d,g,p){return p===l?g:this.defaultDimValueGetter(v,d,g,p)}:null;return f.hasItemOption=!1,f.initData(t,null,c),f}function k2(t){if(t.sourceFormat===Si){var e=z2(t.data||[]);return e!=null&&!z(Io(e))}}function z2(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function jt(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}jt.prototype.parse=function(t){return t},jt.prototype.getSetting=function(t){return this._setting[t]},jt.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},jt.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},jt.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},jt.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},jt.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},jt.prototype.getExtent=function(){return this._extent.slice()},jt.prototype.setExtent=function(t,e){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(e)||(r[1]=e)},jt.prototype.isBlank=function(){return this._isBlank},jt.prototype.setBlank=function(t){this._isBlank=t},jt.prototype.getLabel=null,Lo(jt),kl(jt,{registerWhenExtend:!0});function cs(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}cs.createByAxisModel=function(t){var e=t.option,r=e.data,a=r&&V(r,B2);return new cs({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})};var U_=cs.prototype;U_.getOrdinal=function(t){return $_(this).get(t)},U_.parseAndCollect=function(t){var e,r=this._needCollect;if(typeof t!="string"&&!r)return t;if(r&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var a=$_(this);return e=a.get(t),e==null&&(r?(e=this.categories.length,this.categories[e]=t,a.set(t,e)):e=NaN),e};function $_(t){return t._map||(t._map=ht(t.categories))}function B2(t){return lt(t)&&t.value!=null?t.value:t+""}var Yv=jt.prototype,Xv=jt.extend({type:"ordinal",init:function(t,e){(!t||z(t))&&(t=new cs({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return typeof t=="string"?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Yv.contain.call(this,t)&&this._ordinalMeta.categories[t]!=null},normalize:function(t){return Yv.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Yv.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,r=e[0];r<=e[1];)t.push(r),r++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:ce,niceExtent:ce});Xv.create=function(){return new Xv};var Z_=re;function V2(t,e,r,a){var i={},n=t[1]-t[0],o=i.interval=av(n/e,!0);r!=null&&o<r&&(o=i.interval=r),a!=null&&o>a&&(o=i.interval=a);var s=i.intervalPrecision=Y_(o),l=i.niceTickExtent=[Z_(Math.ceil(t[0]/o)*o,s),Z_(Math.floor(t[1]/o)*o,s)];return q_(l,t),i}function Y_(t){return nu(t)+2}function X_(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function q_(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),X_(t,0,e),X_(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var On=re,Ur=jt.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var r=this._extent;isNaN(t)||(r[0]=parseFloat(t)),isNaN(e)||(r[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Ur.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Y_(t)},getTicks:function(t){var e=this._interval,r=this._extent,a=this._niceExtent,i=this._intervalPrecision,n=[];if(!e)return n;var o=1e4;r[0]<a[0]&&(t?n.push(On(a[0]-e,i)):n.push(r[0]));for(var s=a[0];s<=a[1]&&(n.push(s),s=On(s+e,i),s!==n[n.length-1]);)if(n.length>o)return[];var l=n.length?n[n.length-1]:a[1];return r[1]>l&&(t?n.push(On(l+e,i)):n.push(r[1])),n},getMinorTicks:function(t){for(var e=this.getTicks(!0),r=[],a=this.getExtent(),i=1;i<e.length;i++){for(var n=e[i],o=e[i-1],s=0,l=[],u=n-o,h=u/t;s<t-1;){var f=re(o+(s+1)*h);f>a[0]&&f<a[1]&&l.push(f),s++}r.push(l)}return r},getLabel:function(t,e){if(t==null)return"";var r=e&&e.precision;return r==null?r=nu(t)||0:r==="auto"&&(r=this._intervalPrecision),t=On(t,r,!0),ka(t)},niceTicks:function(t,e,r){t=t||5;var a=this._extent,i=a[1]-a[0];if(!!isFinite(i)){i<0&&(i=-i,a.reverse());var n=V2(a,t,e,r);this._intervalPrecision=n.intervalPrecision,this._interval=n.interval,this._niceExtent=n.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(e[0]!==0){var r=e[0];t.fixMax||(e[1]+=r/2),e[0]-=r/2}else e[1]=1;var a=e[1]-e[0];isFinite(a)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=On(Math.floor(e[0]/i)*i)),t.fixMax||(e[1]=On(Math.ceil(e[1]/i)*i))}});Ur.create=function(){return new Ur};var qv="__ec_stack_",K_=.5,Kv=typeof Float32Array<"u"?Float32Array:Array;function jv(t){return t.get("stack")||qv+t.seriesIndex}function Qv(t){return t.dim+t.index}function G2(t){var e=[],r=t.axis,a="axis0";if(r.type==="category"){for(var i=r.getBandWidth(),n=0;n<t.count;n++)e.push(J({bandWidth:i,axisKey:a,stackId:qv+n},t));for(var o=Q_(e),s=[],n=0;n<t.count;n++){var l=o[a][qv+n];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function j_(t,e){var r=[];return e.eachSeriesByType(t,function(a){e1(a)&&!r1(a)&&r.push(a)}),r}function H2(t){var e={};M(t,function(l){var u=l.coordinateSystem,h=u.getBaseAxis();if(!(h.type!=="time"&&h.type!=="value"))for(var f=l.getData(),c=h.dim+"_"+h.index,v=f.mapDimension(h.dim),d=0,g=f.count();d<g;++d){var p=f.get(v,d);e[c]?e[c].push(p):e[c]=[p]}});var r=[];for(var a in e)if(e.hasOwnProperty(a)){var i=e[a];if(i){i.sort(function(l,u){return l-u});for(var n=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(n=n===null?s:Math.min(n,s))}r[a]=n}}return r}function Jv(t){var e=H2(t),r=[];return M(t,function(a){var i=a.coordinateSystem,n=i.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=e[l],h=Math.abs(o[1]-o[0]),f=n.scale.getExtent(),c=Math.abs(f[1]-f[0]);s=u?h/c*u:h}else{var v=a.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=H(a.get("barWidth"),s),g=H(a.get("barMaxWidth"),s),p=H(a.get("barMinWidth")||1,s),m=a.get("barGap"),y=a.get("barCategoryGap");r.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:p,barGap:m,barCategoryGap:y,axisKey:Qv(n),stackId:jv(a)})}),Q_(r)}function Q_(t){var e={};M(t,function(a,i){var n=a.axisKey,o=a.bandWidth,s=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;e[n]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=a.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var f=a.barMaxWidth;f&&(l[u].maxWidth=f);var c=a.barMinWidth;c&&(l[u].minWidth=c);var v=a.barGap;v!=null&&(s.gap=v);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var r={};return M(e,function(a,i){r[i]={};var n=a.stacks,o=a.bandWidth,s=H(a.categoryGap,o),l=H(a.gap,1),u=a.remainedWidth,h=a.autoWidthCount,f=(u-s)/(h+(h-1)*l);f=Math.max(f,0),M(n,function(g){var p=g.maxWidth,m=g.minWidth;if(g.width){var y=g.width;p&&(y=Math.min(y,p)),m&&(y=Math.max(y,m)),g.width=y,u-=y+l*y,h--}else{var y=f;p&&p<y&&(y=Math.min(p,u)),m&&m>y&&(y=m),y!==f&&(g.width=y,u-=y+l*y,h--)}}),f=(u-s)/(h+(h-1)*l),f=Math.max(f,0);var c=0,v;M(n,function(g,p){g.width||(g.width=f),v=g,c+=g.width*(1+l)}),v&&(c-=v.width*l);var d=-c/2;M(n,function(g,p){r[i][p]=r[i][p]||{bandWidth:o,offset:d,width:g.width},d+=g.width*(1+l)})}),r}function J_(t,e,r){if(t&&e){var a=t[Qv(e)];return a!=null&&r!=null&&(a=a[jv(r)]),a}}function t1(t,e){var r=j_(t,e),a=Jv(r),i={};M(r,function(n){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=jv(n),h=a[Qv(l)][u],f=h.offset,c=h.width,v=s.getOtherAxis(l),d=n.get("barMinHeight")||0;i[u]=i[u]||[],o.setLayout({bandWidth:h.bandWidth,offset:f,size:c});for(var g=o.mapDimension(v.dim),p=o.mapDimension(l.dim),m=fa(o,g),y=v.isHorizontal(),_=a1(l,v,m),w=0,b=o.count();w<b;w++){var A=o.get(g,w),S=o.get(p,w),D=A>=0?"p":"n",I=_;m&&(i[u][S]||(i[u][S]={p:_,n:_}),I=i[u][S][D]);var L,P,R,E;if(y){var Z=s.dataToPoint([A,S]);L=I,P=Z[1]+f,R=Z[0]-_,E=c,Math.abs(R)<d&&(R=(R<0?-1:1)*d),isNaN(R)||m&&(i[u][S][D]+=R)}else{var Z=s.dataToPoint([S,A]);L=Z[0]+f,P=I,R=c,E=Z[1]-_,Math.abs(E)<d&&(E=(E<=0?-1:1)*d),isNaN(E)||m&&(i[u][S][D]+=E)}o.setItemLayout(w,{x:L,y:P,width:R,height:E})}},this)}var F2={seriesType:"bar",plan:Mn(),reset:function(t){if(!e1(t)||!r1(t))return;var e=t.getData(),r=t.coordinateSystem,a=r.grid.getRect(),i=r.getBaseAxis(),n=r.getOtherAxis(i),o=e.mapDimension(n.dim),s=e.mapDimension(i.dim),l=n.isHorizontal(),u=l?0:1,h=J_(Jv([t]),i,t).width;return h>K_||(h=K_),{progress:f};function f(c,v){for(var d=c.count,g=new Kv(d*2),p=new Kv(d*2),m=new Kv(d),y,_=[],w=[],b=0,A=0;(y=c.next())!=null;)w[u]=v.get(o,y),w[1-u]=v.get(s,y),_=r.dataToPoint(w,null,_),p[b]=l?a.x+a.width:_[0],g[b++]=_[0],p[b]=l?_[1]:a.y+a.height,g[b++]=_[1],m[A++]=y;v.setLayout({largePoints:g,largeDataIndices:m,largeBackgroundPoints:p,barWidth:h,valueAxisStart:a1(i,n,!1),backgroundStart:l?a.x:a.y,valueAxisHorizontal:l})}}};function e1(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function r1(t){return t.pipelineContext&&t.pipelineContext.large}function a1(t,e,r){return e.toGlobalCoord(e.dataToCoord(e.type==="log"?1:0))}var W2=Ur.prototype,i1=Math.ceil,n1=Math.floor,Nn=1e3,kn=Nn*60,vs=kn*60,Ht=vs*24,U2=function(t,e,r,a){for(;r<a;){var i=r+a>>>1;t[i][1]<e?r=i+1:a=i}return r},td=Ur.extend({type:"time",getLabel:function(t){var e=this._stepLvl,r=new Date(t);return sv(e[0],r,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Ht,e[1]+=Ht),e[1]===-1/0&&e[0]===1/0){var r=new Date;e[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),e[0]=e[1]-Ht}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval;t.fixMin||(e[0]=re(n1(e[0]/a)*a)),t.fixMax||(e[1]=re(i1(e[1]/a)*a))},niceTicks:function(t,e,r){t=t||10;var a=this._extent,i=a[1]-a[0],n=i/t;e!=null&&n<e&&(n=e),r!=null&&n>r&&(n=r);var o=ed.length,s=U2(ed,n,0,o),l=ed[Math.min(s,o-1)],u=l[1];if(l[0]==="year"){var h=i/u,f=av(h/t,!0);u*=f}var c=this.getSetting("useUTC")?0:new Date(+a[0]||+a[1]).getTimezoneOffset()*60*1e3,v=[Math.round(i1((a[0]-c)/u)*u+c),Math.round(n1((a[1]-c)/u)*u+c)];q_(v,a),this._stepLvl=l,this._interval=u,this._niceExtent=v},parse:function(t){return+$o(t)}});M(["contain","normalize"],function(t){td.prototype[t]=function(e){return W2[t].call(this,this.parse(e))}});var ed=[["hh:mm:ss",Nn],["hh:mm:ss",Nn*5],["hh:mm:ss",Nn*10],["hh:mm:ss",Nn*15],["hh:mm:ss",Nn*30],[`hh:mm
MM-dd`,kn],[`hh:mm
MM-dd`,kn*5],[`hh:mm
MM-dd`,kn*10],[`hh:mm
@@ -30,29 +30,29 @@
yyyy`,Ht*4],[`MM-dd
yyyy`,Ht*5],[`MM-dd
yyyy`,Ht*6],["week",Ht*7],[`MM-dd
yyyy`,Ht*10],["week",Ht*14],["week",Ht*21],["month",Ht*31],["week",Ht*42],["month",Ht*62],["week",Ht*70],["quarter",Ht*95],["month",Ht*31*4],["month",Ht*31*5],["half-year",Ht*380/2],["month",Ht*31*8],["month",Ht*31*10],["year",Ht*380]];Jv.create=function(t){return new Jv({useUTC:t.ecModel.get("useUTC")})};var Ou=jt.prototype,ds=Ur.prototype,U2=nu,$2=re,Z2=Math.floor,Y2=Math.ceil,Nu=Math.pow,$r=Math.log,ku=jt.extend({type:"log",base:10,$constructor:function(){jt.apply(this,arguments),this._originalScale=new Ur},getTicks:function(t){var e=this._originalScale,r=this._extent,a=e.getExtent();return V(ds.getTicks.call(this,t),function(i){var n=re(Nu(this.base,i));return n=i===r[0]&&e.__fixMin?zu(n,a[0]):n,n=i===r[1]&&e.__fixMax?zu(n,a[1]):n,n},this)},getMinorTicks:ds.getMinorTicks,getLabel:ds.getLabel,scale:function(t){return t=Ou.scale.call(this,t),Nu(this.base,t)},setExtent:function(t,e){var r=this.base;t=$r(t)/$r(r),e=$r(e)/$r(r),ds.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Ou.getExtent.call(this);e[0]=Nu(t,e[0]),e[1]=Nu(t,e[1]);var r=this._originalScale,a=r.getExtent();return r.__fixMin&&(e[0]=zu(e[0],a[0])),r.__fixMax&&(e[1]=zu(e[1],a[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=$r(t[0])/$r(e),t[1]=$r(t[1])/$r(e),Ou.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,r=e[1]-e[0];if(!(r===1/0||r<=0)){var a=py(r),i=t/r*a;for(i<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var n=[re(Y2(e[0]/a)*a),re(Z2(e[1]/a)*a)];this._interval=a,this._niceExtent=n}},niceExtent:function(t){ds.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});M(["contain","normalize"],function(t){ku.prototype[t]=function(e){return e=$r(e)/$r(this.base),Ou[t].call(this,e)}}),ku.create=function(){return new ku};function zu(t,e){return $2(t,U2(e))}function n1(t,e){var r=t.type,a=e.getMin(),i=e.getMax(),n=t.getExtent(),o,s,l;r==="ordinal"?o=e.getCategories().length:(s=e.get("boundaryGap"),z(s)||(s=[s||0,s||0]),typeof s[0]=="boolean"&&(T&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),s=[0,0]),s[0]=H(s[0],1),s[1]=H(s[1],1),l=n[1]-n[0]||Math.abs(n[0])),a==="dataMin"?a=n[0]:typeof a=="function"&&(a=a({min:n[0],max:n[1]})),i==="dataMax"?i=n[1]:typeof i=="function"&&(i=i({min:n[0],max:n[1]}));var u=a!=null,h=i!=null;a==null&&(a=r==="ordinal"?o?0:NaN:n[0]-s[0]*l),i==null&&(i=r==="ordinal"?o?o-1:NaN:n[1]+s[1]*l),(a==null||!isFinite(a))&&(a=NaN),(i==null||!isFinite(i))&&(i=NaN),t.setBlank(po(a)||po(i)||r==="ordinal"&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(a>0&&i>0&&!u&&(a=0),a<0&&i<0&&!h&&(i=0));var f=e.ecModel;if(f&&r==="time"){var c=K_("bar",f),v;if(M(c,function(p){v|=p.getBaseAxis()===e.axis}),v){var d=Qv(c),g=X2(a,i,e,d);a=g.min,i=g.max}}return{extent:[a,i],fixMin:u,fixMax:h}}function X2(t,e,r,a){var i=r.axis.getExtent(),n=i[1]-i[0],o=Q_(a,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;M(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;M(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,f=1-(s+l)/n,c=h/f-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function Fa(t,e){var r=n1(t,e),a=r.extent,i=e.get("splitNumber");t.type==="log"&&(t.base=e.get("logBase"));var n=t.type;t.setExtent(a[0],a[1]),t.niceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:n==="interval"||n==="time"?e.get("minInterval"):null,maxInterval:n==="interval"||n==="time"?e.get("maxInterval"):null});var o=e.get("interval");o!=null&&t.setInterval&&t.setInterval(o)}function zn(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Yv(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Ur;default:return(jt.getClass(e)||Ur).create(t)}}function q2(t){var e=t.scale.getExtent(),r=e[0],a=e[1];return!(r>0&&a>0||r<0&&a<0)}function gs(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return typeof e=="string"?(e=function(a){return function(i){return i=t.scale.getLabel(i),a.replace("{value}",i??"")}}(e),e):typeof e=="function"?function(a,i){return r!=null&&(i=a-r),e(ed(t,a),i)}:function(a){return t.scale.getLabel(a)}}function ed(t,e){return t.type==="category"?t.scale.getLabel(e):e}function K2(t){var e=t.model,r=t.scale;if(!(!e.get("axisLabel.show")||r.isBlank())){var a=t.type==="category",i,n,o=r.getExtent();a?n=r.count():(i=r.getTicks(),n=i.length);var s=t.getLabelModel(),l=gs(t),u,h=1;n>40&&(h=Math.ceil(n/40));for(var f=0;f<n;f+=h){var c=i?i[f]:o[0]+f,v=l(c),d=s.getTextRect(v),g=j2(d,s.get("rotate")||0);u?u.union(g):u=g}return u}}function j2(t,e){var r=e*Math.PI/180,a=t.plain(),i=a.width,n=a.height,o=i*Math.cos(r)+n*Math.sin(r),s=i*Math.sin(r)+n*Math.cos(r),l=new vt(a.x,a.y,o,s);return l}function rd(t){var e=t.get("interval");return e??"auto"}function o1(t){return t.type==="category"&&rd(t.getLabelModel())===0}var Di={getMin:function(t){var e=this.option,r=!t&&e.rangeStart!=null?e.rangeStart:e.min;return this.axis&&r!=null&&r!=="dataMin"&&typeof r!="function"&&!po(r)&&(r=this.axis.scale.parse(r)),r},getMax:function(t){var e=this.option,r=!t&&e.rangeEnd!=null?e.rangeEnd:e.max;return this.axis&&r!=null&&r!=="dataMax"&&typeof r!="function"&&!po(r)&&(r=this.axis.scale.parse(r)),r},getNeedCrossZero:function(){var t=this.option;return t.rangeStart!=null||t.rangeEnd!=null?!1:!t.scale},getCoordSysModel:ce,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Q2=nr({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=e.width/2,n=e.height/2;t.moveTo(r,a-n),t.lineTo(r+i,a+n),t.lineTo(r-i,a+n),t.closePath()}}),J2=nr({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=e.width/2,n=e.height/2;t.moveTo(r,a-n),t.lineTo(r+i,a),t.lineTo(r,a+n),t.lineTo(r-i,a),t.closePath()}}),tL=nr({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,a=e.y,i=e.width/5*3,n=Math.max(i,e.height),o=i/2,s=o*o/(n-o),l=a-n+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,f=Math.sin(u),c=Math.cos(u),v=o*.6,d=o*.7;t.moveTo(r-h,l+s),t.arc(r,l,o,Math.PI-u,Math.PI*2+u),t.bezierCurveTo(r+h-f*v,l+s+c*v,r,a-d,r,a),t.bezierCurveTo(r,a-d,r-h+f*v,l+s+c*v,r-h,l+s),t.closePath()}}),eL=nr({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,a=e.width,i=e.x,n=e.y,o=a/3*2;t.moveTo(i,n),t.lineTo(i+o,n+r),t.lineTo(i,n+r/4*3),t.lineTo(i-o,n+r),t.lineTo(i,n),t.closePath()}}),rL={line:ye,rect:xt,roundRect:xt,square:xt,circle:Br,diamond:J2,pin:tL,arrow:eL,triangle:Q2},aL={line:function(t,e,r,a,i){i.x1=t,i.y1=e+a/2,i.x2=t+r,i.y2=e+a/2},rect:function(t,e,r,a,i){i.x=t,i.y=e,i.width=r,i.height=a},roundRect:function(t,e,r,a,i){i.x=t,i.y=e,i.width=r,i.height=a,i.r=Math.min(r,a)/4},square:function(t,e,r,a,i){var n=Math.min(r,a);i.x=t,i.y=e,i.width=n,i.height=n},circle:function(t,e,r,a,i){i.cx=t+r/2,i.cy=e+a/2,i.r=Math.min(r,a)/2},diamond:function(t,e,r,a,i){i.cx=t+r/2,i.cy=e+a/2,i.width=r,i.height=a},pin:function(t,e,r,a,i){i.x=t+r/2,i.y=e+a/2,i.width=r,i.height=a},arrow:function(t,e,r,a,i){i.x=t+r/2,i.y=e+a/2,i.width=r,i.height=a},triangle:function(t,e,r,a,i){i.cx=t+r/2,i.cy=e+a/2,i.width=r,i.height=a}},ad={};M(rL,function(t,e){ad[e]=new t});var iL=nr({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var a=Jf(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.textPosition==="inside"&&(a.y=r.y+r.height*.4),a},buildPath:function(t,e,r){var a=e.symbolType;if(a!=="none"){var i=ad[a];i||(a="rect",i=ad[a]),aL[a](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function nL(t,e){if(this.type!=="image"){var r=this.style,a=this.shape;a&&a.symbolType==="line"?r.stroke=t:this.__isEmptyBrush?(r.stroke=t,r.fill=e||"#fff"):(r.fill&&(r.fill=t),r.stroke&&(r.stroke=t)),this.dirty(!1)}}function Ye(t,e,r,a,i,n,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return t.indexOf("image://")===0?l=j0(t.slice(8),new vt(e,r,a,i),o?"center":"cover"):t.indexOf("path://")===0?l=zo(t.slice(7),{},new vt(e,r,a,i),o?"center":"cover"):l=new iL({shape:{symbolType:t,x:e,y:r,width:a,height:i}}),l.__isEmptyBrush=s,l.setColor=nL,l.setColor(n),l}function oL(t){return ca(t.getSource(),t)}var sL={isDimensionStacked:fa,enableDataStack:F_,getStackedDimension:fs};function lL(t,e){var r=e;_t.isInstance(e)||(r=new _t(e),Dt(r,Di));var a=zn(r);return a.setExtent(t[0],t[1]),Fa(a,r),a}function uL(t){Dt(t,Di)}var hL=(Object.freeze||Object)({createList:oL,getLayoutRect:qt,dataStack:sL,createScale:lL,mixinAxisModelCommonMethods:uL,completeDimensions:G_,createDimensions:En,createSymbol:Ye}),fL=1e-8;function s1(t,e){return Math.abs(t-e)<fL}function Mi(t,e,r){var a=0,i=t[0];if(!i)return!1;for(var n=1;n<t.length;n++){var o=t[n];a+=oa(i[0],i[1],o[0],o[1],e,r),i=o}var s=t[0];return(!s1(i[0],s[0])||!s1(i[1],s[1]))&&(a+=oa(i[0],i[1],s[0],s[1],e,r)),a!==0}function ps(t,e,r){if(this.name=t,this.geometries=e,r)r=[r[0],r[1]];else{var a=this.getBoundingRect();r=[a.x+a.width/2,a.y+a.height/2]}this.center=r}ps.prototype={constructor:ps,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,r=[e,e],a=[-e,-e],i=[],n=[],o=this.geometries,s=0;s<o.length;s++)if(o[s].type==="polygon"){var l=o[s].exterior;Po(l,i,n),ea(r,r,i),ra(a,a,n)}return s===0&&(r[0]=r[1]=a[0]=a[1]=0),this._rect=new vt(r[0],r[1],a[0]-r[0],a[1]-r[1])},contain:function(t){var e=this.getBoundingRect(),r=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var a=0,i=r.length;a<i;a++)if(r[a].type==="polygon"){var n=r[a].exterior,o=r[a].interiors;if(Mi(n,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(Mi(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=i.width/i.height;r?a||(a=r/n):r=n*a;for(var o=new vt(t,e,r,a),s=i.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if(l[u].type==="polygon"){for(var h=l[u].exterior,f=l[u].interiors,c=0;c<h.length;c++)Pt(h[c],h[c],s);for(var v=0;v<(f?f.length:0);v++)for(var c=0;c<f[v].length;c++)Pt(f[v][c],f[v][c],s)}i=this._rect,i.copy(o),this.center=[i.x+i.width/2,i.y+i.height/2]},cloneShallow:function(t){t==null&&(t=this.name);var e=new ps(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function cL(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;e==null&&(e=1024);for(var r=t.features,a=0;a<r.length;a++)for(var i=r[a],n=i.geometry,o=n.coordinates,s=n.encodeOffsets,l=0;l<o.length;l++){var u=o[l];if(n.type==="Polygon")o[l]=l1(u,s[l],e);else if(n.type==="MultiPolygon")for(var h=0;h<u.length;h++){var f=u[h];u[h]=l1(f,s[l][h],e)}}return t.UTF8Encoding=!1,t}function l1(t,e,r){for(var a=[],i=e[0],n=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,a.push([s/r,l/r])}return a}var id=function(t,e){return cL(t),V(ee(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var a=r.properties,i=r.geometry,n=i.coordinates,o=[];i.type==="Polygon"&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),i.type==="MultiPolygon"&&M(n,function(l){l[0]&&o.push({type:"polygon",exterior:l[0],interiors:l.slice(1)})});var s=new ps(a[e||"name"],o,a.cp);return s.properties=a,s})},ms=Pe();function vL(t){return t.type==="category"?gL(t):mL(t)}function dL(t,e){return t.type==="category"?pL(t,e):{ticks:t.scale.getTicks()}}function gL(t){var e=t.getLabelModel(),r=u1(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function u1(t,e){var r=h1(t,"labels"),a=rd(e),i=f1(r,a);if(i)return i;var n,o;return se(a)?n=d1(t,a):(o=a==="auto"?yL(t):a,n=v1(t,o)),c1(r,a,{labels:n,labelCategoryInterval:o})}function pL(t,e){var r=h1(t,"ticks"),a=rd(e),i=f1(r,a);if(i)return i;var n,o;if((!e.get("show")||t.scale.isBlank())&&(n=[]),se(a))n=d1(t,a,!0);else if(a==="auto"){var s=u1(t,t.getLabelModel());o=s.labelCategoryInterval,n=V(s.labels,function(l){return l.tickValue})}else o=a,n=v1(t,o,!0);return c1(r,a,{ticks:n,tickCategoryInterval:o})}function mL(t){var e=t.scale.getTicks(),r=gs(t);return{labels:V(e,function(a,i){return{formattedLabel:r(a,i),rawLabel:t.scale.getLabel(a),tickValue:a}})}}function h1(t,e){return ms(t)[e]||(ms(t)[e]=[])}function f1(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function c1(t,e,r){return t.push({key:e,value:r}),r}function yL(t){var e=ms(t).autoInterval;return e??(ms(t).autoInterval=t.calculateCategoryInterval())}function _L(t){var e=xL(t),r=gs(t),a=(e.axisRotate-e.labelRotate)/180*Math.PI,i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=n[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(a)),f=Math.abs(u*Math.sin(a)),c=0,v=0;l<=n[1];l+=s){var d=0,g=0,p=Rr(r(l),e.font,"center","top");d=p.width*1.3,g=p.height*1.3,c=Math.max(c,d,7),v=Math.max(v,g,7)}var m=c/h,y=v/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),w=ms(t.model),b=t.getExtent(),A=w.lastAutoInterval,S=w.lastTickCount;return A!=null&&S!=null&&Math.abs(A-_)<=1&&Math.abs(S-o)<=1&&A>_&&w.axisExtend0===b[0]&&w.axisExtend1===b[1]?_=A:(w.lastTickCount=o,w.lastAutoInterval=_,w.axisExtend0=b[0],w.axisExtend1=b[1]),_}function xL(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function v1(t,e,r){var a=gs(t),i=t.scale,n=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=n[0],h=i.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=o1(t),c=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;c&&u!==n[0]&&g(n[0]);for(var d=u;d<=n[1];d+=l)g(d);v&&d-l!==n[1]&&g(n[1]);function g(p){s.push(r?p:{formattedLabel:a(p),rawLabel:i.getLabel(p),tickValue:p})}return s}function d1(t,e,r){var a=t.scale,i=gs(t),n=[];return M(a.getTicks(),function(o){var s=a.getLabel(o);e(o,s)&&n.push(r?o:{formattedLabel:i(o),rawLabel:s,tickValue:o})}),n}var g1=[0,1],Qt=function(t,e,r){this.dim=t,this.scale=e,this._extent=r||[0,0],this.inverse=!1,this.onBand=!1};Qt.prototype={constructor:Qt,contain:function(t){var e=this._extent,r=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=r&&t<=a},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Qc(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var r=this._extent;r[0]=t,r[1]=e},dataToCoord:function(t,e){var r=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(r=r.slice(),p1(r,a.count())),Nt(t,g1,r,e)},coordToData:function(t,e){var r=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(r=r.slice(),p1(r,a.count()));var i=Nt(t,r,g1,e);return this.scale.scale(i)},pointToData:function(t,e){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),r=dL(this,e),a=r.ticks,i=V(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this),n=e.get("alignWithLabel");return wL(this,i,n,t.clamp),i},getMinorTicksCoords:function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var r=this.scale.getMinorTicks(e),a=V(r,function(i){return V(i,function(n){return{coord:this.dataToCoord(n),tickValue:n}},this)},this);return a},getViewLabels:function(){return vL(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),r=e[1]-e[0]+(this.onBand?1:0);r===0&&(r=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/r},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return _L(this)}};function p1(t,e){var r=t[1]-t[0],a=e,i=r/a/2;t[0]+=i,t[1]-=i}function wL(t,e,r,a){var i=e.length;if(!t.onBand||r||!i)return;var n=t.getExtent(),o,s;if(i===1)e[0].coord=n[0],o=e[1]={coord:n[0]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;M(e,function(v){v.coord-=u/2});var h=t.scale.getExtent();s=1+h[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var f=n[0]>n[1];c(e[0].coord,n[0])&&(a?e[0].coord=n[0]:e.shift()),a&&c(n[0],e[0].coord)&&e.unshift({coord:n[0]}),c(n[1],o.coord)&&(a?o.coord=n[1]:e.pop()),a&&c(o.coord,n[1])&&e.push({coord:n[1]});function c(v,d){return v=re(v),d=re(d),f?v>d:v<d}}var bL=id,m1={};M(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){m1[t]=ZT[t]});var y1={};M(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){y1[t]=sa[t]}),Vt.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){if(T){var r=t.coordinateSystem;if(r!=="polar"&&r!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return ca(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},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}});function Bu(t,e){var r=t.mapDimension("defaultedLabel",!0),a=r.length;if(a===1)return Ti(t,e,r[0]);if(a){for(var i=[],n=0;n<r.length;n++){var o=Ti(t,e,r[n]);i.push(o)}return i.join(" ")}}function Wa(t,e,r){q.call(this),this.updateData(t,e,r)}var Dr=Wa.prototype,SL=Wa.getSymbolSize=function(t,e){var r=t.getItemVisual(e,"symbolSize");return r instanceof Array?r.slice():[+r,+r]};function nd(t){return[t[0]/2,t[1]/2]}function AL(t,e){this.parent.drift(t,e)}Dr._createSymbol=function(t,e,r,a,i){this.removeAll();var n=e.getItemVisual(r,"color"),o=Ye(t,-1,-1,2,2,n,i);o.attr({z2:100,culling:!0,scale:nd(a)}),o.drift=AL,this._symbolType=t,this.add(o)},Dr.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Dr.getSymbolPath=function(){return this.childAt(0)},Dr.getScale=function(){return this.childAt(0).scale},Dr.highlight=function(){this.childAt(0).trigger("emphasis")},Dr.downplay=function(){this.childAt(0).trigger("normal")},Dr.setZ=function(t,e){var r=this.childAt(0);r.zlevel=t,r.z=e},Dr.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Dr.updateData=function(t,e,r){this.silent=!1;var a=t.getItemVisual(e,"symbol")||"circle",i=t.hostModel,n=SL(t,e),o=a!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(a,t,e,n,s)}else{var l=this.childAt(0);l.silent=!1,ft(l,{scale:nd(n)},i,e)}if(this._updateCommon(t,e,n,r),o){var l=this.childAt(0),u=r&&r.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),Se(l,h,i,e)}this._seriesModel=i};var TL=["itemStyle"],CL=["emphasis","itemStyle"],DL=["label"],ML=["emphasis","label"];Dr._updateCommon=function(t,e,r,a){var i=this.childAt(0),n=t.hostModel,o=t.getItemVisual(e,"color");i.type!=="image"?i.useStyle({strokeNoScale:!0}):i.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=a&&a.itemStyle,l=a&&a.hoverItemStyle,u=a&&a.symbolOffset,h=a&&a.labelModel,f=a&&a.hoverLabelModel,c=a&&a.hoverAnimation,v=a&&a.cursorStyle;if(!a||t.hasItemOption){var d=a&&a.itemModel?a.itemModel:t.getItemModel(e);s=d.getModel(TL).getItemStyle(["color"]),l=d.getModel(CL).getItemStyle(),u=d.getShallow("symbolOffset"),h=d.getModel(DL),f=d.getModel(ML),c=d.getShallow("hoverAnimation"),v=d.getShallow("cursor")}else l=et({},l);var g=i.style,p=t.getItemVisual(e,"symbolRotate");i.attr("rotation",(p||0)*Math.PI/180||0),u&&i.attr("position",[H(u[0],r[0]),H(u[1],r[1])]),v&&i.attr("cursor",v),i.setColor(o,a&&a.symbolInnerColor),i.setStyle(s);var m=t.getItemVisual(e,"opacity");m!=null&&(g.opacity=m);var y=t.getItemVisual(e,"liftZ"),_=i.__z2Origin;y!=null?_==null&&(i.__z2Origin=i.z2,i.z2+=y):_!=null&&(i.z2=_,i.__z2Origin=null);var w=a&&a.useNameLabel;Fe(g,l,h,f,{labelFetcher:n,labelDataIndex:e,defaultText:b,isRectText:!0,autoColor:o});function b(A,S){return w?t.getName(A):Bu(t,A)}i.__symbolOriginalScale=nd(r),i.hoverStyle=l,i.highDownOnUpdate=c&&n.isAnimationEnabled()?IL:null,Ot(i)};function IL(t,e){if(!(this.incremental||this.useHoverLayer))if(e==="emphasis"){var r=this.__symbolOriginalScale,a=r[1]/r[0],i={scale:[Math.max(r[0]*1.1,r[0]+3),Math.max(r[1]*1.1,r[1]+3*a)]};this.animateTo(i,400,"elasticOut")}else e==="normal"&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}Dr.fadeOut=function(t,e){var r=this.childAt(0);this.silent=r.silent=!0,!(e&&e.keepLabel)&&(r.style.text=null),ft(r,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},It(Wa,q);function Bn(t){this.group=new q,this._symbolCtor=t||Wa}var Vn=Bn.prototype;function od(t,e,r,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(r))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}Vn.updateData=function(t,e){e=_1(e);var r=this.group,a=t.hostModel,i=this._data,n=this._symbolCtor,o=x1(t);i||r.removeAll(),t.diff(i).add(function(s){var l=t.getItemLayout(s);if(od(t,l,s,e)){var u=new n(t,s,o);u.attr("position",l),t.setItemGraphicEl(s,u),r.add(u)}}).update(function(s,l){var u=i.getItemGraphicEl(l),h=t.getItemLayout(s);if(!od(t,h,s,e)){r.remove(u);return}u?(u.updateData(t,s,o),ft(u,{position:h},a)):(u=new n(t,s),u.attr("position",h)),r.add(u),t.setItemGraphicEl(s,u)}).remove(function(s){var l=i.getItemGraphicEl(s);l&&l.fadeOut(function(){r.remove(l)})}).execute(),this._data=t},Vn.isPersistent=function(){return!0},Vn.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,r){var a=t.getItemLayout(r);e.attr("position",a)})},Vn.incrementalPrepareUpdate=function(t){this._seriesScope=x1(t),this._data=null,this.group.removeAll()},Vn.incrementalUpdate=function(t,e,r){r=_1(r);function a(s){s.isGroup||(s.incremental=s.useHoverLayer=!0)}for(var i=t.start;i<t.end;i++){var n=e.getItemLayout(i);if(od(e,n,i,r)){var o=new this._symbolCtor(e,i,this._seriesScope);o.traverse(a),o.attr("position",n),this.group.add(o),e.setItemGraphicEl(i,o)}}};function _1(t){return t!=null&&!lt(t)&&(t={isIgnore:t}),t||{}}Vn.remove=function(t){var e=this.group,r=this._data;r&&t?r.eachItemGraphicEl(function(a){a.fadeOut(function(){e.remove(a)})}):e.removeAll()};function x1(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function sd(t,e,r){var a=t.getBaseAxis(),i=t.getOtherAxis(a),n=LL(i,r),o=a.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),h=s==="x"||s==="radius"?1:0,f=V(t.dimensions,function(d){return e.mapDimension(d)}),c,v=e.getCalculationInfo("stackResultDimension");return(c|=fa(e,f[0]))&&(f[0]=v),(c|=fa(e,f[1]))&&(f[1]=v),{dataDimsForPoint:f,valueStart:n,valueAxisDim:s,baseAxisDim:o,stacked:!!c,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function LL(t,e){var r=0,a=t.scale.getExtent();return e==="start"?r=a[0]:e==="end"?r=a[1]:a[0]>0?r=a[0]:a[1]<0&&(r=a[1]),r}function ld(t,e,r,a){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=t.valueStart);var n=t.baseDataOffset,o=[];return o[n]=r.get(t.baseDim,a),o[1-n]=i,e.dataToPoint(o)}function PL(t,e){var r=[];return e.diff(t).add(function(a){r.push({cmd:"+",idx:a})}).update(function(a,i){r.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){r.push({cmd:"-",idx:a})}).execute(),r}var EL=function(t,e,r,a,i,n,o,s){for(var l=PL(t,e),u=[],h=[],f=[],c=[],v=[],d=[],g=[],p=sd(i,e,o),m=sd(n,t,s),y=0;y<l.length;y++){var _=l[y],w=!0;switch(_.cmd){case"=":var b=t.getItemLayout(_.idx),A=e.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=A.slice()),u.push(b),h.push(A),f.push(r[_.idx]),c.push(a[_.idx1]),g.push(e.getRawIndex(_.idx1));break;case"+":var S=_.idx;u.push(i.dataToPoint([e.get(p.dataDimsForPoint[0],S),e.get(p.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),f.push(ld(p,i,e,S)),c.push(a[S]),g.push(e.getRawIndex(S));break;case"-":var S=_.idx,D=t.getRawIndex(S);D!==S?(u.push(t.getItemLayout(S)),h.push(n.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),f.push(r[S]),c.push(ld(m,n,t,S)),g.push(D)):w=!1}w&&(v.push(_),d.push(d.length))}d.sort(function(Z,W){return g[Z]-g[W]});for(var I=[],L=[],P=[],R=[],E=[],y=0;y<d.length;y++){var S=d[y];I[y]=u[S],L[y]=h[S],P[y]=f[S],R[y]=c[S],E[y]=v[S]}return{current:I,next:L,stackedOnCurrent:P,stackedOnNext:R,status:E}},w1=ea,b1=ra,S1=mo,Vu=ge,ud=[],fr=[],cr=[];function va(t){return isNaN(t[0])||isNaN(t[1])}function hd(t,e,r,a,i,n,o,s,l,u,h){return u==="none"||!u?OL.apply(this,arguments):RL.apply(this,arguments)}function RL(t,e,r,a,i,n,o,s,l,u,h){for(var f=0,c=r,v=0;v<a;v++){var d=e[c];if(c>=i||c<0)break;if(va(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]);else if(l>0){var g=e[f],p=u==="y"?1:0,m=(d[p]-g[p])*l;Vu(fr,g),fr[p]=g[p]+m,Vu(cr,d),cr[p]=d[p]-m,t.bezierCurveTo(fr[0],fr[1],cr[0],cr[1],d[0],d[1])}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function OL(t,e,r,a,i,n,o,s,l,u,h){for(var f=0,c=r,v=0;v<a;v++){var d=e[c];if(c>=i||c<0)break;if(va(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]),Vu(fr,d);else if(l>0){var g=c+n,y=e[g];if(h)for(;y&&va(e[g]);)g+=n,y=e[g];var p=.5,m=e[f],y=e[g];if(!y||va(y))Vu(cr,d);else{va(y)&&!h&&(y=d),Jr(ud,y,m);var _,w;if(u==="x"||u==="y"){var b=u==="x"?0:1;_=Math.abs(d[b]-m[b]),w=Math.abs(d[b]-y[b])}else _=ta(d,m),w=ta(d,y);p=w/(w+_),S1(cr,d,ud,-l*(1-p))}w1(fr,fr,s),b1(fr,fr,o),w1(cr,cr,s),b1(cr,cr,o),t.bezierCurveTo(fr[0],fr[1],cr[0],cr[1],d[0],d[1]),S1(fr,d,ud,l*p)}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function fd(t,e){var r=[1/0,1/0],a=[-1/0,-1/0];if(e)for(var i=0;i<t.length;i++){var n=t[i];n[0]<r[0]&&(r[0]=n[0]),n[1]<r[1]&&(r[1]=n[1]),n[0]>a[0]&&(a[0]=n[0]),n[1]>a[1]&&(a[1]=n[1])}return{min:e?r:a,max:e?a:r}}var NL=pt.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Hc(pt.prototype.brush),buildPath:function(t,e){var r=e.points,a=0,i=r.length,n=fd(r,e.smoothConstraint);if(e.connectNulls){for(;i>0&&va(r[i-1]);i--);for(;a<i&&va(r[a]);a++);}for(;a<i;)a+=hd(t,r,a,i,i,1,n.min,n.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),A1=pt.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Hc(pt.prototype.brush),buildPath:function(t,e){var r=e.points,a=e.stackedOnPoints,i=0,n=r.length,o=e.smoothMonotone,s=fd(r,e.smoothConstraint),l=fd(a,e.smoothConstraint);if(e.connectNulls){for(;n>0&&va(r[n-1]);n--);for(;i<n&&va(r[i]);i++);}for(;i<n;){var u=hd(t,r,i,n,n,1,s.min,s.max,e.smooth,o,e.connectNulls);hd(t,a,i+u-1,u,n,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),i+=u+1,t.closePath()}}});function T1(t,e,r){var a=t.getArea(),i=t.getBaseAxis().isHorizontal(),n=a.x,o=a.y,s=a.width,l=a.height,u=r.get("lineStyle.width")||2;n-=u/2,o-=u/2,s+=u,l+=u,n=Math.floor(n),s=Math.round(s);var h=new xt({shape:{x:n,y:o,width:s,height:l}});return e&&(h.shape[i?"width":"height"]=0,Se(h,{shape:{width:s,height:l}},r)),h}function C1(t,e,r){var a=t.getArea(),i=new Ar({shape:{cx:re(t.cx,1),cy:re(t.cy,1),r0:re(a.r0,1),r:re(a.r,1),startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});return e&&(i.shape.endAngle=a.startAngle,Se(i,{shape:{endAngle:a.endAngle}},r)),i}function Gu(t,e,r){if(t){if(t.type==="polar")return C1(t,e,r);if(t.type==="cartesian2d")return T1(t,e,r)}else return null;return null}function D1(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++){var a=t[r],i=e[r];if(a[0]!==i[0]||a[1]!==i[1])return}return!0}}function M1(t,e){var r=[],a=[],i=[],n=[];return Po(t,r,a),Po(e,i,n),Math.max(Math.abs(r[0]-i[0]),Math.abs(r[1]-i[1]),Math.abs(a[0]-n[0]),Math.abs(a[1]-n[1]))}function I1(t){return typeof t=="number"?t:t?.5:0}function kL(t,e,r){if(!r.valueDim)return[];for(var a=[],i=0,n=e.count();i<n;i++)a.push(ld(r,t,e,i));return a}function Ua(t,e,r){for(var a=e.getBaseAxis(),i=a.dim==="x"||a.dim==="radius"?0:1,n=[],o=0;o<t.length-1;o++){var s=t[o+1],l=t[o];n.push(l);var u=[];switch(r){case"end":u[i]=s[i],u[1-i]=l[1-i],n.push(u);break;case"middle":var h=(l[i]+s[i])/2,f=[];u[i]=f[i]=h,u[1-i]=l[1-i],f[1-i]=s[1-i],n.push(u),n.push(f);break;default:u[i]=l[i],u[1-i]=s[1-i],n.push(u)}}return t[o]&&n.push(t[o]),n}function zL(t,e){var r=t.getVisual("visualMeta");if(!(!r||!r.length||!t.count())){if(e.type!=="cartesian2d"){T&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var a,i,n=r.length-1;n>=0;n--){var o=r[n].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if(a=l&&l.coordDim,a==="x"||a==="y"){i=r[n];break}}if(!i){T&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(a),h=V(i.stops,function(y){return{coord:u.toGlobalCoord(u.dataToCoord(y.value)),color:y.color}}),f=h.length,c=i.outerColors.slice();f&&h[0].coord>h[f-1].coord&&(h.reverse(),c.reverse());var v=10,d=h[0].coord-v,g=h[f-1].coord+v,p=g-d;if(p<.001)return"transparent";M(h,function(y){y.offset=(y.coord-d)/p}),h.push({offset:f?h[f-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:c[0]||"transparent"});var m=new pi(0,0,0,0,h,!0);return m[a]=d,m[a+"2"]=g,m}}function BL(t,e,r){var a=t.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=r.getAxesByScale("ordinal")[0];if(!!n&&!(i&&VL(n,e))){var o=e.mapDimension(n.dim),s={};return M(n.getViewLabels(),function(l){s[l.tickValue]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function VL(t,e){var r=t.getExtent(),a=Math.abs(r[1]-r[0])/t.scale.count();isNaN(a)&&(a=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;o<i;o+=n)if(Wa.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>a)return!1;return!0}function L1(t,e,r){if(t.type==="cartesian2d"){var a=t.getBaseAxis().isHorizontal(),i=T1(t,e,r);if(!r.get("clip",!0)){var n=i.shape,o=Math.max(n.width,n.height);a?(n.y-=o,n.height+=o*2):(n.x-=o,n.width+=o*2)}return i}else return C1(t,e,r)}ue.extend({type:"line",init:function(){var t=new q,e=new Bn;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,r){var a=t.coordinateSystem,i=this.group,n=t.getData(),o=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=n.mapArray(n.getItemLayout),u=a.type==="polar",h=this._coordSys,f=this._symbolDraw,c=this._polyline,v=this._polygon,d=this._lineGroup,g=t.get("animation"),p=!s.isEmpty(),m=s.get("origin"),y=sd(a,n,m),_=kL(a,n,y),w=t.get("showSymbol"),b=w&&!u&&BL(t,n,a),A=this._data;A&&A.eachItemGraphicEl(function(E,Z){E.__temp&&(i.remove(E),A.setItemGraphicEl(Z,null))}),w||f.remove(),i.add(d);var S=!u&&t.get("step"),D;a&&a.getArea&&t.get("clip",!0)&&(D=a.getArea(),D.width!=null?(D.x-=.1,D.y-=.1,D.width+=.2,D.height+=.2):D.r0&&(D.r0-=.5,D.r1+=.5)),this._clipShapeForSymbol=D,c&&h.type===a.type&&S===this._step?(p&&!v?v=this._newPolygon(l,_,a,g):v&&!p&&(d.remove(v),v=this._polygon=null),d.setClipPath(L1(a,!1,t)),w&&f.updateData(n,{isIgnore:b,clipShape:D}),n.eachItemGraphicEl(function(E){E.stopAnimation(!0)}),(!D1(this._stackedOnPoints,_)||!D1(this._points,l))&&(g?this._updateAnimation(n,_,a,r,S,m):(S&&(l=Ua(l,a,S),_=Ua(_,a,S)),c.setShape({points:l}),v&&v.setShape({points:l,stackedOnPoints:_})))):(w&&f.updateData(n,{isIgnore:b,clipShape:D}),S&&(l=Ua(l,a,S),_=Ua(_,a,S)),c=this._newPolyline(l,a,g),p&&(v=this._newPolygon(l,_,a,g)),d.setClipPath(L1(a,!0,t)));var I=zL(n,a)||n.getVisual("color");c.useStyle(J(o.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"}));var L=t.get("smooth");if(L=I1(t.get("smooth")),c.setShape({smooth:L,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),v){var P=n.getCalculationInfo("stackedOnSeries"),R=0;v.useStyle(J(s.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel"})),P&&(R=I1(P.get("smooth"))),v.setShape({smooth:L,stackedOnSmooth:R,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=n,this._coordSys=a,this._stackedOnPoints=_,this._points=l,this._step=S,this._valueOrigin=m},dispose:function(){},highlight:function(t,e,r,a){var i=t.getData(),n=Rl(i,a);if(!(n instanceof Array)&&n!=null&&n>=0){var o=i.getItemGraphicEl(n);if(!o){var s=i.getItemLayout(n);if(!s||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;o=new Wa(i,n),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,i.setItemGraphicEl(n,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else ue.prototype.highlight.call(this,t,e,r,a)},downplay:function(t,e,r,a){var i=t.getData(),n=Rl(i,a);if(n!=null&&n>=0){var o=i.getItemGraphicEl(n);o&&(o.__temp?(i.setItemGraphicEl(n,null),this.group.remove(o)):o.downplay())}else ue.prototype.downplay.call(this,t,e,r,a)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new NL({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new A1({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(r),this._polygon=r,r},_updateAnimation:function(t,e,r,a,i,n){var o=this._polyline,s=this._polygon,l=t.hostModel,u=EL(this._data,t,this._stackedOnPoints,e,this._coordSys,r,this._valueOrigin,n),h=u.current,f=u.stackedOnCurrent,c=u.next,v=u.stackedOnNext;if(i&&(h=Ua(u.current,r,i),f=Ua(u.stackedOnCurrent,r,i),c=Ua(u.next,r,i),v=Ua(u.stackedOnNext,r,i)),M1(h,c)>3e3||s&&M1(f,v)>3e3){o.setShape({points:c}),s&&s.setShape({points:c,stackedOnPoints:v});return}o.shape.__points=u.current,o.shape.points=h,ft(o,{shape:{points:c}},l),s&&(s.setShape({points:h,stackedOnPoints:f}),ft(s,{shape:{points:c,stackedOnPoints:v}},l));for(var d=[],g=u.status,p=0;p<g.length;p++){var m=g[p].cmd;if(m==="="){var y=t.getItemGraphicEl(g[p].idx1);y&&d.push({el:y,ptIdx:p})}}o.animators&&o.animators.length&&o.animators[0].during(function(){for(var _=0;_<d.length;_++){var w=d[_].el;w.attr("position",o.shape.__points[d[_].ptIdx])}})},remove:function(t){var e=this.group,r=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),r&&r.eachItemGraphicEl(function(a,i){a.__temp&&(e.remove(a),r.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var Ii=function(t,e,r){return{seriesType:t,performRawSeries:!0,reset:function(a,i,n){var o=a.getData(),s=a.get("symbol"),l=a.get("symbolSize"),u=a.get("symbolKeepAspect"),h=a.get("symbolRotate"),f=se(s),c=se(l),v=se(h),d=f||c||v,g=!f&&s?s:e,p=c?null:l;if(o.setVisual({legendSymbol:r||g,symbol:g,symbolSize:p,symbolKeepAspect:u,symbolRotate:h}),i.isSeriesFiltered(a))return;function m(y,_){if(d){var w=a.getRawValue(_),b=a.getDataParams(_);f&&y.setItemVisual(_,"symbol",s(w,b)),c&&y.setItemVisual(_,"symbolSize",l(w,b)),v&&y.setItemVisual(_,"symbolRotate",h(w,b))}if(y.hasItemOption){var A=y.getItemModel(_),S=A.getShallow("symbol",!0),D=A.getShallow("symbolSize",!0),I=A.getShallow("symbolRotate",!0),L=A.getShallow("symbolKeepAspect",!0);S!=null&&y.setItemVisual(_,"symbol",S),D!=null&&y.setItemVisual(_,"symbolSize",D),I!=null&&y.setItemVisual(_,"symbolRotate",I),L!=null&&y.setItemVisual(_,"symbolKeepAspect",L)}}return{dataEach:o.hasItemOption||d?m:null}}}},ys=function(t){return{seriesType:t,plan:Mn(),reset:function(e){var r=e.getData(),a=e.coordinateSystem,i=e.pipelineContext,n=i.large;if(!a)return;var o=V(a.dimensions,function(h){return r.mapDimension(h)}).slice(0,2),s=o.length,l=r.getCalculationInfo("stackResultDimension");fa(r,o[0])&&(o[0]=l),fa(r,o[1])&&(o[1]=l);function u(h,f){for(var c=h.end-h.start,v=n&&new Float32Array(c*s),d=h.start,g=0,p=[],m=[];d<h.end;d++){var y;if(s===1){var _=f.get(o[0],d);y=!isNaN(_)&&a.dataToPoint(_,null,m)}else{var _=p[0]=f.get(o[0],d),w=p[1]=f.get(o[1],d);y=!isNaN(_)&&!isNaN(w)&&a.dataToPoint(p,null,m)}n?(v[g++]=y?y[0]:NaN,v[g++]=y?y[1]:NaN):f.setItemLayout(d,y&&y.slice()||[NaN,NaN])}n&&f.setLayout("symbolPoints",v)}return s&&{progress:u}}}},GL={average:function(t){for(var e=0,r=0,a=0;a<t.length;a++)isNaN(t[a])||(e+=t[a],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},HL=function(t,e){return Math.round(t.length/2)},FL=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(e,r,a){var i=e.getData(),n=e.get("sampling"),o=e.coordinateSystem;if(o.type==="cartesian2d"&&n){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=u[1]-u[0],f=Math.round(i.count()/h);if(f>1){var c;typeof n=="string"?c=GL[n]:typeof n=="function"&&(c=n),c&&e.setData(i.downSample(i.mapDimension(l.dim),1/f,c,HL))}}}}};function WL(t){return this._axes[t]}var Hu=function(t){this._axes={},this._dimList=[],this.name=t||""};Hu.prototype={constructor:Hu,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return V(this._dimList,WL,this)},getAxesByScale:function(t){return t=t.toLowerCase(),ee(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var r=this._dimList,a=t instanceof Array?[]:{},i=0;i<r.length;i++){var n=r[i],o=this._axes[n];a[n]=o[e](t[n])}return a}};function _s(t){Hu.call(this,t)}_s.prototype={constructor:_s,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),r=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&r.contain(r.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,r){var a=this.getAxis("x"),i=this.getAxis("y");return r=r||[],r[0]=a.toGlobalCoord(a.dataToCoord(t[0])),r[1]=i.toGlobalCoord(i.dataToCoord(t[1])),r},clampData:function(t,e){var r=this.getAxis("x").scale,a=this.getAxis("y").scale,i=r.getExtent(),n=a.getExtent(),o=r.parse(t[0]),s=a.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),e[1]=Math.min(Math.max(Math.min(n[0],n[1]),s),Math.max(n[0],n[1])),e},pointToData:function(t,e){var r=this.getAxis("x"),a=this.getAxis("y");return e=e||[],e[0]=r.coordToData(r.toLocalCoord(t[0])),e[1]=a.coordToData(a.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis(t.dim==="x"?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1]),a=Math.min(e[0],e[1]),i=Math.max(t[0],t[1])-r,n=Math.max(e[0],e[1])-a,o=new vt(r,a,i,n);return o}},It(_s,Hu);var Fu=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom"};Fu.prototype={constructor:Fu,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return t==="top"||t==="bottom"},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},It(Fu,Qt);var P1={show:!0,zlevel: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:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},$a={};$a.categoryAxis=ut({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},P1),$a.valueAxis=ut({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},P1),$a.timeAxis=J({scale:!0,min:"dataMin",max:"dataMax"},$a.valueAxis),$a.logAxis=J({scale:!0,logBase:10},$a.valueAxis);var UL=["value","category","time","log"],Gn=function(t,e,r,a){M(UL,function(i){e.extend({type:t+"Axis."+i,mergeDefaultAndTheme:function(n,o){var s=this.layoutMode,l=s?Cn(n):{},u=o.getTheme();ut(n,u.get(i+"Axis")),ut(n,this.getDefaultOption()),n.type=r(t,n),s&&za(n,l,s)},optionUpdated:function(){var n=this.option;n.type==="category"&&(this.__ordinalMeta=cs.createByAxisModel(this))},getCategories:function(n){var o=this.option;if(o.type==="category")return n?o.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:go([{},$a[i+"Axis"],a],!0)})}),wt.registerSubTypeDefaulter(t+"Axis",ot(r,t))},Hn=wt.extend({type:"cartesian2dAxis",axis:null,init:function(){Hn.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Hn.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Hn.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function E1(t,e){return e.type||(e.data?"category":"value")}ut(Hn.prototype,Di);var R1={offset:0};Gn("x",Hn,E1,R1),Gn("y",Hn,E1,R1),wt.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});function cd(t,e,r){return t.getCoordSysModel()===e}function Fn(t,e,r){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,r),this.model=t}var Ce=Fn.prototype;Ce.type="grid",Ce.axisPointerEnabled=!0,Ce.getRect=function(){return this._rect},Ce.update=function(t,e){var r=this._axesMap;this._updateScale(t,this.model),M(r.x,function(i){Fa(i.scale,i.model)}),M(r.y,function(i){Fa(i.scale,i.model)});var a={};M(r.x,function(i){O1(r,"y",i,a)}),M(r.y,function(i){O1(r,"x",i,a)}),this.resize(this.model,e)};function O1(t,e,r,a){r.getAxesOnZeroOf=function(){return n?[n]:[]};var i=t[e],n,o=r.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(!s)return;if(l!=null)N1(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&N1(i[u])&&!a[h(i[u])]){n=i[u];break}n&&(a[h(n)]=!0);function h(f){return f.dim+"_"+f.index}}function N1(t){return t&&t.type!=="category"&&t.type!=="time"&&q2(t)}Ce.resize=function(t,e,r){var a=qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var i=this._axesList;n(),!r&&t.get("containLabel")&&(M(i,function(o){if(!o.model.get("axisLabel.inside")){var s=K2(o);if(s){var l=o.isHorizontal()?"height":"width",u=o.model.get("axisLabel.margin");a[l]-=s[l]+u,o.position==="top"?a.y+=s.height+u:o.position==="left"&&(a.x+=s.width+u)}}}),n());function n(){M(i,function(o){var s=o.isHorizontal(),l=s?[0,a.width]:[0,a.height],u=o.inverse?1:0;o.setExtent(l[u],l[1-u]),$L(o,s?a.x:a.y)})}},Ce.getAxis=function(t,e){var r=this._axesMap[t];if(r!=null){if(e==null){for(var a in r)if(r.hasOwnProperty(a))return r[a]}return r[e]}},Ce.getAxes=function(){return this._axesList.slice()},Ce.getCartesian=function(t,e){if(t!=null&&e!=null){var r="x"+t+"y"+e;return this._coordsMap[r]}lt(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===t||i[a].getAxis("y").index===e)return i[a]},Ce.getCartesians=function(){return this._coordsList.slice()},Ce.convertToPixel=function(t,e,r){var a=this._findConvertTarget(t,e);return a.cartesian?a.cartesian.dataToPoint(r):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(r)):null},Ce.convertFromPixel=function(t,e,r){var a=this._findConvertTarget(t,e);return a.cartesian?a.cartesian.pointToData(r):a.axis?a.axis.coordToData(a.axis.toLocalCoord(r)):null},Ce._findConvertTarget=function(t,e){var r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],n=e.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,yt(o,s)<0&&(s=null);else if(a&&i)s=this.getCartesian(a.componentIndex,i.componentIndex);else if(a)l=this.getAxis("x",a.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(n){var u=n.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},Ce.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Ce._initCartesian=function(t,e,r){var a={left:!1,right:!1,top:!1,bottom:!1},i={x:{},y:{}},n={x:0,y:0};if(e.eachComponent("xAxis",o("x"),this),e.eachComponent("yAxis",o("y"),this),!n.x||!n.y){this._axesMap={},this._axesList=[];return}this._axesMap=i,M(i.x,function(s,l){M(i.y,function(u,h){var f="x"+l+"y"+h,c=new _s(f);c.grid=this,c.model=t,this._coordsMap[f]=c,this._coordsList.push(c),c.addAxis(s),c.addAxis(u)},this)},this);function o(s){return function(l,u){if(!!cd(l,t,e)){var h=l.get("position");s==="x"?h!=="top"&&h!=="bottom"&&(h=a.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=a.left?"right":"left"),a[h]=!0;var f=new Fu(s,zn(l),[0,0],l.get("type"),h),c=f.type==="category";f.onBand=c&&l.get("boundaryGap"),f.inverse=l.get("inverse"),l.axis=f,f.model=l,f.grid=this,f.index=u,this._axesList.push(f),i[s][u]=f,n[s]++}}}},Ce._updateScale=function(t,e){M(this._axesList,function(a){a.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(a){if(z1(a)){var i=k1(a,t),n=i[0],o=i[1];if(!cd(n,e,t)||!cd(o,e,t))return;var s=this.getCartesian(n.componentIndex,o.componentIndex),l=a.getData(),u=s.getAxis("x"),h=s.getAxis("y");l.type==="list"&&(r(l,u,a),r(l,h,a))}},this);function r(a,i,n){M(a.mapDimension(i.dim,!0),function(o){i.scale.unionExtentFromData(a,fs(a,o))})}},Ce.getTooltipAxes=function(t){var e=[],r=[];return M(this.getCartesians(),function(a){var i=t!=null&&t!=="auto"?a.getAxis(t):a.getBaseAxis(),n=a.getOtherAxis(i);yt(e,i)<0&&e.push(i),yt(r,n)<0&&r.push(n)}),{baseAxes:e,otherAxes:r}};function $L(t,e){var r=t.getExtent(),a=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return a-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return a-i+e}}var ZL=["xAxis","yAxis"];function k1(t,e){return V(ZL,function(r){var a=t.getReferringComponents(r)[0];if(T&&!a)throw new Error(r+' "'+Ut(t.get(r+"Index"),t.get(r+"Id"),0)+'" not found');return a})}function z1(t){return t.get("coordinateSystem")==="cartesian2d"}Fn.create=function(t,e){var r=[];return t.eachComponent("grid",function(a,i){var n=new Fn(a,t,e);n.name="grid_"+i,n.resize(a,e,!0),a.coordinateSystem=n,r.push(n)}),t.eachSeries(function(a){if(!!z1(a)){var i=k1(a,t),n=i[0],o=i[1],s=n.getCoordSysModel();if(T){if(!s)throw new Error('Grid "'+Ut(n.get("gridIndex"),n.get("gridId"),0)+'" not found');if(n.getCoordSysModel()!==o.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var l=s.coordinateSystem;a.coordinateSystem=l.getCartesian(n.componentIndex,o.componentIndex)}}),r},Fn.dimensions=Fn.prototype.dimensions=_s.prototype.dimensions,_e.register("cartesian2d",Fn);var Za=Math.PI,ze=function(t,e){this.opt=e,this.axisModel=t,J(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new q;var r=new q({position:e.position.slice(),rotation:e.rotation});r.updateTransform(),this._transform=r.transform,this._dumbGroup=r};ze.prototype={constructor:ze,hasBuilder:function(t){return!!B1[t]},add:function(t){B1[t].call(this)},getGroup:function(){return this.group}};var B1={axisLine:function(){var t=this.opt,e=this.axisModel;if(!!e.get("axisLine.show")){var r=this.axisModel.axis.getExtent(),a=this._transform,i=[r[0],0],n=[r[1],0];a&&(Pt(i,i,a),Pt(n,n,a));var o=et({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ye({anid:"line",subPixelOptimize:!0,shape:{x1:i[0],y1:i[1],x2:n[0],y2:n[1]},style:o,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize"),u=e.get("axisLine.symbolOffset")||0;if(typeof u=="number"&&(u=[u,u]),s!=null){typeof s=="string"&&(s=[s,s]),(typeof l=="string"||typeof l=="number")&&(l=[l,l]);var h=l[0],f=l[1];M([{rotate:t.rotation+Math.PI/2,offset:u[0],r:0},{rotate:t.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((i[0]-n[0])*(i[0]-n[0])+(i[1]-n[1])*(i[1]-n[1]))}],function(c,v){if(s[v]!=="none"&&s[v]!=null){var d=Ye(s[v],-h/2,-f/2,h,f,o.stroke,!0),g=c.r+c.offset,p=[i[0]+g*Math.cos(t.rotation),i[1]-g*Math.sin(t.rotation)];d.attr({rotation:c.rotate,position:p,silent:!0,z2:11}),this.group.add(d)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,r=qL(this,t,e),a=jL(this,t,e);XL(t,a,r),KL(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,r=Ut(t.axisName,e.get("name"));if(!!r){var a=e.get("nameLocation"),i=t.nameDirection,n=e.getModel("nameTextStyle"),o=e.get("nameGap")||0,s=this.axisModel.axis.getExtent(),l=s[0]>s[1]?-1:1,u=[a==="start"?s[0]-l*o:a==="end"?s[1]+l*o:(s[0]+s[1])/2,W1(a)?t.labelOffset+i*o:0],h,f=e.get("nameRotate");f!=null&&(f=f*Za/180);var c;W1(a)?h=G1(t.rotation,f??t.rotation,i):(h=YL(t,a,f||0,s),c=t.axisNameAvailableWidth,c!=null&&(c=Math.abs(c/Math.sin(h.rotation)),!isFinite(c)&&(c=null)));var v=n.getFont(),d=e.get("nameTruncate",!0)||{},g=d.ellipsis,p=Ut(t.nameTruncateMaxWidth,d.maxWidth,c),m=g!=null&&p!=null?wy(r,p,v,g,{minChar:2,placeholder:d.placeholder}):r,y=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:r,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new dt({anid:"name",__fullText:r,__truncatedText:m,position:u,rotation:h.rotation,silent:H1(e),z2:1,tooltip:y&&y.show?et({content:r,formatter:function(){return r},formatterParams:w},y):null});$t(b.style,n,{text:m,textFont:v,textFill:n.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.get("align")||h.textAlign,textVerticalAlign:n.get("verticalAlign")||h.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=V1(e),b.eventData.targetType="axisName",b.eventData.name=r),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},V1=ze.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},G1=ze.innerTextLayout=function(t,e,r){var a=tv(e-t),i,n;return Uo(a)?(n=r>0?"top":"bottom",i="center"):Uo(a-Za)?(n=r>0?"bottom":"top",i="center"):(n="middle",a>0&&a<Za?i=r>0?"right":"left":i=r>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:n}};function YL(t,e,r,a){var i=tv(r-t.rotation),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Uo(i-Za/2)?(o=l?"bottom":"top",n="center"):Uo(i-Za*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",i<Za*1.5&&i>Za/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}var H1=ze.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function XL(t,e,r){if(!o1(t.axis)){var a=t.get("axisLabel.showMinLabel"),i=t.get("axisLabel.showMaxLabel");e=e||[],r=r||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=r[0],h=r[1],f=r[r.length-1],c=r[r.length-2];a===!1?(vr(n),vr(u)):F1(n,o)&&(a?(vr(o),vr(h)):(vr(n),vr(u))),i===!1?(vr(s),vr(f)):F1(l,s)&&(i?(vr(l),vr(c)):(vr(s),vr(f)))}}function vr(t){t&&(t.ignore=!0)}function F1(t,e,r){var a=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!a||!i)){var n=fn([]);return aa(n,n,-t.rotation),a.applyTransform(Sa([],n,t.getLocalTransform())),i.applyTransform(Sa([],n,e.getLocalTransform())),a.intersect(i)}}function W1(t){return t==="middle"||t==="center"}function U1(t,e,r,a,i){for(var n=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,e&&(Pt(o,o,e),Pt(s,s,e));var h=new ye({anid:i+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:a,z2:2,silent:!0});n.push(h)}return n}function qL(t,e,r){var a=e.axis,i=e.getModel("axisTick");if(!(!i.get("show")||a.scale.isBlank())){for(var n=i.getModel("lineStyle"),o=r.tickDirection*i.get("length"),s=a.getTicksCoords(),l=U1(s,t._transform,o,J(n.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),u=0;u<l.length;u++)t.group.add(l[u]);return l}}function KL(t,e,r){var a=e.axis,i=e.getModel("minorTick");if(!(!i.get("show")||a.scale.isBlank())){var n=a.getMinorTicksCoords();if(!!n.length)for(var o=i.getModel("lineStyle"),s=r.tickDirection*i.get("length"),l=J(o.getLineStyle(),J(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<n.length;u++)for(var h=U1(n[u],t._transform,s,l,"minorticks_"+u),f=0;f<h.length;f++)t.group.add(h[f])}}function jL(t,e,r){var a=e.axis,i=Ut(r.axisLabelShow,e.get("axisLabel.show"));if(!(!i||a.scale.isBlank())){var n=e.getModel("axisLabel"),o=n.get("margin"),s=a.getViewLabels(),l=(Ut(r.labelRotate,n.get("rotate"))||0)*Za/180,u=G1(r.rotation,l,r.labelDirection),h=e.getCategories&&e.getCategories(!0),f=[],c=H1(e),v=e.get("triggerEvent");return M(s,function(d,g){var p=d.tickValue,m=d.formattedLabel,y=d.rawLabel,_=n;h&&h[p]&&h[p].textStyle&&(_=new _t(h[p].textStyle,n,e.ecModel));var w=_.getTextColor()||e.get("axisLine.lineStyle.color"),b=a.dataToCoord(p),A=[b,r.labelOffset+r.labelDirection*o],S=new dt({anid:"label_"+p,position:A,rotation:u.rotation,silent:c,z2:10});$t(S.style,_,{text:m,textAlign:_.getShallow("align",!0)||u.textAlign,textVerticalAlign:_.getShallow("verticalAlign",!0)||_.getShallow("baseline",!0)||u.textVerticalAlign,textFill:typeof w=="function"?w(a.type==="category"?y:a.type==="value"?p+"":p,g):w}),v&&(S.eventData=V1(e),S.eventData.targetType="axisLabel",S.eventData.value=y),t._dumbGroup.add(S),S.updateTransform(),f.push(S),t.group.add(S),S.decomposeTransform()}),f}}var Wn=M,vd=ot;function QL(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return JL(r,t,e),r.seriesInvolved&&eP(r,t),r}function JL(t,e,r){var a=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),n=i.get("link",!0)||[],o=[];Wn(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=xs(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var h=s.model,f=h.getModel("tooltip",a);if(Wn(s.getAxes(),vd(g,!1,null)),s.getTooltipAxes&&a&&f.get("show")){var c=f.get("trigger")==="axis",v=f.get("axisPointer.type")==="cross",d=s.getTooltipAxes(f.get("axisPointer.axis"));(c||v)&&Wn(d.baseAxes,vd(g,v?"cross":!0,c)),v&&Wn(d.otherAxes,vd(g,"cross",!1))}function g(p,m,y){var _=y.model.getModel("axisPointer",i),w=_.get("show");if(!(!w||w==="auto"&&!p&&!pd(_))){m==null&&(m=_.get("triggerTooltip")),_=p?tP(y,f,i,e,p,m):_;var b=_.get("snap"),A=xs(y.model),S=m||b||y.type==="category",D=t.axesInfo[A]={key:A,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,involveSeries:S,snap:b,useHandle:pd(_),seriesModels:[]};u[A]=D,t.seriesInvolved|=S;var I=rP(n,y);if(I!=null){var L=o[I]||(o[I]={axesInfo:{}});L.axesInfo[A]=D,L.mapper=n[I].mapper,D.linkGroup=L}}}})}function tP(t,e,r,a,i,n){var o=e.getModel("axisPointer"),s={};Wn(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(f){s[f]=rt(o.get(f))}),s.snap=t.type!=="category"&&!!n,o.get("type")==="cross"&&(s.type="line");var l=s.label||(s.label={});if(l.show==null&&(l.show=!1),i==="cross"){var u=o.get("label.show");if(l.show=u??!0,!n){var h=s.lineStyle=o.get("crossStyle");h&&J(l,h.textStyle)}}return t.model.getModel("axisPointer",new _t(s,r,a))}function eP(t,e){e.eachSeries(function(r){var a=r.coordinateSystem,i=r.get("tooltip.trigger",!0),n=r.get("tooltip.show",!0);!a||i==="none"||i===!1||i==="item"||n===!1||r.get("axisPointer.show",!0)===!1||Wn(t.coordSysAxesInfo[xs(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})},this)}function rP(t,e){for(var r=e.model,a=e.dim,i=0;i<t.length;i++){var n=t[i]||{};if(dd(n[a+"AxisId"],r.id)||dd(n[a+"AxisIndex"],r.componentIndex)||dd(n[a+"AxisName"],r.name))return i}}function dd(t,e){return t==="all"||z(t)&&yt(t,e)>=0||t===e}function aP(t){var e=gd(t);if(!!e){var r=e.axisPointerModel,a=e.axis.scale,i=r.option,n=r.get("status"),o=r.get("value");o!=null&&(o=a.parse(o));var s=pd(r);n==null&&(i.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function gd(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[xs(t)]}function iP(t){var e=gd(t);return e&&e.axisPointerModel}function pd(t){return!!t.get("handle.show")}function xs(t){return t.type+"||"+t.id}var Xe=he({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,r,a){this.axisPointerClass&&aP(t),Xe.superApply(this,"render",arguments),$1(this,t,e,r,a,!0)},updateAxisPointer:function(t,e,r,a,i){$1(this,t,e,r,a,!1)},remove:function(t,e){var r=this._axisPointer;r&&r.remove(e),Xe.superApply(this,"remove",arguments)},dispose:function(t,e){Z1(this,e),Xe.superApply(this,"dispose",arguments)}});function $1(t,e,r,a,i,n){var o=Xe.getAxisPointerClass(t.axisPointerClass);if(!!o){var s=iP(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,a,n):Z1(t,a)}}function Z1(t,e,r){var a=t._axisPointer;a&&a.dispose(e,r),t._axisPointer=null}var md=[];Xe.registerAxisPointerClass=function(t,e){if(T&&md[t])throw new Error("axisPointer "+t+" exists");md[t]=e},Xe.getAxisPointerClass=function(t){return t&&md[t]};function yd(t,e,r){r=r||{};var a=t.coordinateSystem,i=e.axis,n={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,h=a.getRect(),f=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=e.get("offset")||0,d=u==="x"?[f[2]-v,f[3]+v]:[f[0]-v,f[1]+v];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(g,d[1]),d[0])}n.position=[u==="y"?d[c[l]]:f[0],u==="x"?d[c[l]]:f[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=p[s],n.labelOffset=o?d[c[s]]-d[c.onZero]:0,e.get("axisTick.inside")&&(n.tickDirection=-n.tickDirection),Ut(r.labelInside,e.get("axisLabel.inside"))&&(n.labelDirection=-n.labelDirection);var m=e.get("axisLabel.rotate");return n.labelRotate=l==="top"?-m:m,n.z2=1,n}function Y1(t,e,r,a){var i=r.axis;if(!i.scale.isBlank()){var n=r.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=a.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:n,clamp:!0});if(!!u.length){var h=s.length,f=t.__splitAreaColors,c=ht(),v=0;if(f)for(var d=0;d<u.length;d++){var g=f.get(u[d].tickValue);if(g!=null){v=(g+(h-1)*d)%h;break}}var p=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=z(s)?s:[s];for(var d=1;d<u.length;d++){var y=i.toGlobalCoord(u[d].coord),_,w,b,A;i.isHorizontal()?(_=p,w=l.y,b=y-_,A=l.height,p=_+b):(_=l.x,w=p,b=l.width,A=y-w,p=w+A);var S=u[d-1].tickValue;S!=null&&c.set(S,v),e.add(new xt({anid:S!=null?"area_"+S:null,shape:{x:_,y:w,width:b,height:A},style:J({fill:s[v]},m),silent:!0})),v=(v+1)%h}t.__splitAreaColors=c}}}function X1(t){t.__splitAreaColors=null}var nP=["axisLine","axisTickLabel","axisName"],oP=["splitArea","splitLine","minorSplitLine"],_d=Xe.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,r,a){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),!!t.get("show")){var n=t.getCoordSysModel(),o=yd(n,t),s=new ze(t,o);M(nP,s.add,s),this._axisGroup.add(s.getGroup()),M(oP,function(l){t.get(l+".show")&&this["_"+l](t,n)},this),au(i,this._axisGroup,t),_d.superCall(this,"render",t,e,r,a)}},remove:function(){X1(this)},_splitLine:function(t,e){var r=t.axis;if(!r.scale.isBlank()){var a=t.getModel("splitLine"),i=a.getModel("lineStyle"),n=i.get("color");n=z(n)?n:[n];for(var o=e.coordinateSystem.getRect(),s=r.isHorizontal(),l=0,u=r.getTicksCoords({tickModel:a}),h=[],f=[],c=i.getLineStyle(),v=0;v<u.length;v++){var d=r.toGlobalCoord(u[v].coord);s?(h[0]=d,h[1]=o.y,f[0]=d,f[1]=o.y+o.height):(h[0]=o.x,h[1]=d,f[0]=o.x+o.width,f[1]=d);var g=l++%n.length,p=u[v].tickValue;this._axisGroup.add(new ye({anid:p!=null?"line_"+u[v].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:J({stroke:n[g]},c),silent:!0}))}}},_minorSplitLine:function(t,e){var r=t.axis,a=t.getModel("minorSplitLine"),i=a.getModel("lineStyle"),n=e.coordinateSystem.getRect(),o=r.isHorizontal(),s=r.getMinorTicksCoords();if(!!s.length)for(var l=[],u=[],h=i.getLineStyle(),f=0;f<s.length;f++)for(var c=0;c<s[f].length;c++){var v=r.toGlobalCoord(s[f][c].coord);o?(l[0]=v,l[1]=n.y,u[0]=v,u[1]=n.y+n.height):(l[0]=n.x,l[1]=v,u[0]=n.x+n.width,u[1]=v),this._axisGroup.add(new ye({anid:"minor_line_"+s[f][c].tickValue,subPixelOptimize:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}))}},_splitArea:function(t,e){Y1(this,this._axisGroup,t,e)}});_d.extend({type:"xAxis"}),_d.extend({type:"yAxis"}),he({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new xt({shape:t.coordinateSystem.getRect(),style:J({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),we(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Rt(Ii("line","circle","line")),Gt(ys("line")),$e(Wr.PROCESSOR.STATISTIC,FL("line"));var q1=Vt.extend({type:"series.__base_bar__",getInitialData:function(t,e){return ca(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var r=e.dataToPoint(e.clampData(t)),a=this.getData(),i=a.getLayout("offset"),n=a.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return r[o]+=i+n/2,r}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});q1.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return this.get("large")?this.get("progressive"):!1},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},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}}});function K1(t,e,r,a,i,n,o){var s=r.getModel("label"),l=r.getModel("emphasis.label");Fe(t,e,s,l,{labelFetcher:i,labelDataIndex:n,defaultText:Bu(i.getData(),n),isRectText:!0,autoColor:a}),j1(t),j1(e)}function j1(t,e){t.textPosition==="outside"&&(t.textPosition=e)}var sP=_n([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),lP={getBarItemStyle:function(t){var e=sP(this,t);if(this.getBorderLineDash){var r=this.getBorderLineDash();r&&(e.lineDash=r)}return e}},uP=nr({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r0||0,0),n=Math.max(e.r,0),o=(n-i)*.5,s=i+o,l=e.startAngle,u=e.endAngle,h=e.clockwise,f=Math.cos(l),c=Math.sin(l),v=Math.cos(u),d=Math.sin(u),g=h?u-l<Math.PI*2:l-u<Math.PI*2;g&&(t.moveTo(f*i+r,c*i+a),t.arc(f*s+r,c*s+a,o,-Math.PI+l,l,!h)),t.arc(r,a,n,l,u,!h),t.moveTo(v*n+r,d*n+a),t.arc(v*s+r,d*s+a,o,u-Math.PI*2,u-Math.PI,!h),i!==0&&(t.arc(r,a,i,u,l,h),t.moveTo(f*i+r,d*i+a)),t.closePath()}}),hP=["itemStyle","barBorderWidth"],Wu=[0,0];et(_t.prototype,lP);function fP(t,e){var r=t.getArea&&t.getArea();if(t.type==="cartesian2d"){var a=t.getBaseAxis();if(a.type!=="category"||!a.onBand){var i=e.getLayout("bandWidth");a.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}ke({type:"bar",render:function(t,e,r){this._updateDrawMode(t);var a=t.get("coordinateSystem");return a==="cartesian2d"||a==="polar"?this._isLargeDraw?this._renderLarge(t,e,r):this._renderNormal(t,e,r):T&&console.warn("Only cartesian2d and polar supported for bar."),this.group},incrementalPrepareRender:function(t,e,r){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,r,a){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(this._isLargeDraw==null||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,r){var a=this.group,i=t.getData(),n=this._data,o=t.coordinateSystem,s=o.getBaseAxis(),l;o.type==="cartesian2d"?l=s.isHorizontal():o.type==="polar"&&(l=s.dim==="angle");var u=t.isAnimationEnabled()?t:null,h=t.get("clip",!0),f=fP(o,i);a.removeClipPath();var c=t.get("roundCap",!0),v=t.get("showBackground",!0),d=t.getModel("backgroundStyle"),g=d.get("barBorderRadius")||0,p=[],m=this._backgroundEls||[];i.diff(n).add(function(w){var b=i.getItemModel(w),A=Uu[o.type](i,w,b);if(v){var S=Uu[o.type](i,w),D=pP(o,l,S);D.useStyle(d.getBarItemStyle()),o.type==="cartesian2d"&&D.setShape("r",g),p[w]=D}if(!!i.hasValue(w)){if(h){var I=tx[o.type](f,A);if(I){a.remove(L);return}}var L=ex[o.type](w,A,l,u,!1,c);i.setItemGraphicEl(w,L),a.add(L),ix(L,i,w,b,A,t,l,o.type==="polar")}}).update(function(w,b){var A=i.getItemModel(w),S=Uu[o.type](i,w,A);if(v){var D=m[b];D.useStyle(d.getBarItemStyle()),o.type==="cartesian2d"&&D.setShape("r",g),p[w]=D;var I=Uu[o.type](i,w),L=lx(l,I,o);ft(D,{shape:L},u,w)}var P=n.getItemGraphicEl(b);if(!i.hasValue(w)){a.remove(P);return}if(h){var R=tx[o.type](f,S);if(R){a.remove(P);return}}P?ft(P,{shape:S},u,w):P=ex[o.type](w,S,l,u,!0,c),i.setItemGraphicEl(w,P),a.add(P),ix(P,i,w,A,S,t,l,o.type==="polar")}).remove(function(w){var b=n.getItemGraphicEl(w);o.type==="cartesian2d"?b&&rx(w,u,b):b&&ax(w,u,b)}).execute();var y=this._backgroundGroup||(this._backgroundGroup=new q);y.removeAll();for(var _=0;_<p.length;++_)y.add(p[_]);a.add(y),this._backgroundEls=p,this._data=i},_renderLarge:function(t,e,r){this._clear(),ox(t,this.group);var a=t.get("clip",!0)?Gu(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),ox(e,this.group,!0)},dispose:ce,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,r=this._data;t&&t.get("animation")&&r&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],r.eachItemGraphicEl(function(a){a.type==="sector"?ax(a.dataIndex,t,a):rx(a.dataIndex,t,a)})):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var Q1=Math.max,J1=Math.min,tx={cartesian2d:function(t,e){var r=e.width<0?-1:1,a=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var i=Q1(e.x,t.x),n=J1(e.x+e.width,t.x+t.width),o=Q1(e.y,t.y),s=J1(e.y+e.height,t.y+t.height);e.x=i,e.y=o,e.width=n-i,e.height=s-o;var l=e.width<0||e.height<0;return r<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t){return!1}},ex={cartesian2d:function(t,e,r,a,i){var n=new xt({shape:et({},e),z2:1});if(n.name="item",a){var o=n.shape,s=r?"height":"width",l={};o[s]=0,l[s]=e[s],sa[i?"updateProps":"initProps"](n,{shape:l},a,t)}return n},polar:function(t,e,r,a,i,n){var o=e.startAngle<e.endAngle,s=!r&&n?uP:Ar,l=new s({shape:J({clockwise:o},e),z2:1});if(l.name="item",a){var u=l.shape,h=r?"r":"endAngle",f={};u[h]=r?0:e.startAngle,f[h]=e[h],sa[i?"updateProps":"initProps"](l,{shape:f},a,t)}return l}};function rx(t,e,r){r.style.text=null,ft(r,{shape:{width:0}},e,t,function(){r.parent&&r.parent.remove(r)})}function ax(t,e,r){r.style.text=null,ft(r,{shape:{r:r.shape.r0}},e,t,function(){r.parent&&r.parent.remove(r)})}var Uu={cartesian2d:function(t,e,r){var a=t.getItemLayout(e),i=r?cP(r,a):0,n=a.width>0?1:-1,o=a.height>0?1:-1;return{x:a.x+n*i/2,y:a.y+o*i/2,width:a.width-n*i,height:a.height-o*i}},polar:function(t,e,r){var a=t.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle}}};function xd(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function ix(t,e,r,a,i,n,o,s){var l=e.getItemVisual(r,"color"),u=e.getItemVisual(r,"opacity"),h=e.getVisual("borderColor"),f=a.getModel("itemStyle"),c=a.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",f.get("barBorderRadius")||0),t.useStyle(J({stroke:xd(i)?"none":h,fill:xd(i)?"none":l,opacity:u},f.getBarItemStyle()));var v=a.getShallow("cursor");v&&t.attr("cursor",v);var d=o?i.height>0?"bottom":"top":i.width>0?"left":"right";s||K1(t.style,c,a,l,n,r,d),xd(i)&&(c.fill=c.stroke="none"),Ot(t,c)}function cP(t,e){var r=t.get(hP)||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,a,i)}var nx=pt.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var r=e.points,a=this.__startPoint,i=this.__baseDimIdx,n=0;n<r.length;n+=2)a[i]=r[n+i],t.moveTo(a[0],a[1]),t.lineTo(r[n],r[n+1])}});function ox(t,e,r){var a=t.getData(),i=[],n=a.getLayout("valueAxisHorizontal")?1:0;i[1-n]=a.getLayout("valueAxisStart");var o=a.getLayout("largeDataIndices"),s=a.getLayout("barWidth"),l=t.getModel("backgroundStyle"),u=t.get("showBackground",!0);if(u){var h=a.getLayout("largeBackgroundPoints"),f=[];f[1-n]=a.getLayout("backgroundStart");var c=new nx({shape:{points:h},incremental:!!r,__startPoint:f,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});gP(c,l,a),e.add(c)}var v=new nx({shape:{points:a.getLayout("largePoints")},incremental:!!r,__startPoint:i,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s});e.add(v),dP(v,t,a),v.seriesIndex=t.seriesIndex,t.get("silent")||(v.on("mousedown",sx),v.on("mousemove",sx))}var sx=du(function(t){var e=this,r=vP(e,t.offsetX,t.offsetY);e.dataIndex=r>=0?r:null},30,!1);function vP(t,e,r){var a=t.__baseDimIdx,i=1-a,n=t.shape.points,o=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[i];Wu[0]=e,Wu[1]=r;for(var u=Wu[a],h=Wu[1-a],f=u-s,c=u+s,v=0,d=n.length/2;v<d;v++){var g=v*2,p=n[g+a],m=n[g+i];if(p>=f&&p<=c&&(l<=m?h>=l&&h<=m:h>=m&&h<=l))return o[v]}return-1}function dP(t,e,r){var a=r.getVisual("borderColor")||r.getVisual("color"),i=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(i),t.style.fill=null,t.style.stroke=a,t.style.lineWidth=r.getLayout("barWidth")}function gP(t,e,r){var a=e.get("borderColor")||e.get("color"),i=e.getItemStyle(["color","borderColor"]);t.useStyle(i),t.style.fill=null,t.style.stroke=a,t.style.lineWidth=r.getLayout("barWidth")}function lx(t,e,r){var a,i=r.type==="polar";return i?a=r.getArea():a=r.grid.getRect(),i?{cx:a.cx,cy:a.cy,r0:t?a.r0:e.r0,r:t?a.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:Math.PI*2}:{x:t?e.x:a.x,y:t?a.y:e.y,width:t?e.width:a.width,height:t?a.height:e.height}}function pP(t,e,r){var a=t.type==="polar"?Ar:xt;return new a({shape:lx(e,r,t),silent:!0,z2:0})}Gt(Wr.VISUAL.LAYOUT,ot(J_,"bar")),Gt(Wr.VISUAL.PROGRESSIVE_LAYOUT,H2),Rt({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var Un=function(t,e,r){e=z(e)&&{coordDimensions:e}||et({},e);var a=t.getSource(),i=En(a,e),n=new fe(i,t);return n.initData(a,r),n},wd={updateSelectedMap:function(t){this._targetList=z(t)?t.slice():[],this._selectTargetMap=an(t||[],function(e,r){return e.set(r.name,r),e},ht())},select:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t),a=this.get("selectedMode");a==="single"&&this._selectTargetMap.each(function(i){i.selected=!1}),r&&(r.selected=!0)},unSelect:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);r&&(r.selected=!1)},toggleSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);if(r!=null)return this[r.selected?"unSelect":"select"](t,e),r.selected},isSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);return r&&r.selected}};function ws(t,e){this.getAllNames=function(){var r=e();return r.mapArray(r.getName)},this.containName=function(r){var a=e();return a.indexOfName(r)>=0},this.indexOfName=function(r){var a=t();return a.indexOfName(r)},this.getItemVisual=function(r,a){var i=t();return i.getItemVisual(r,a)}}var $u=Mu({type:"series.pie",init:function(t){$u.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){$u.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Un(this,{coordDimensions:["value"],encodeDefaulter:ot(fv,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),r=[],a=0,i=t.count();a<i;a++)r.push({name:t.getName(a),value:t.get(e,a),selected:Uy(t,a,"selected")});return r},getDataParams:function(t){var e=this.getData(),r=$u.superCall(this,"getDataParams",t),a=[];return e.each(e.mapDimension("value"),function(i){a.push(i)}),r.percent=gy(a,t,e.hostModel.get("percentPrecision")),r.$vars.push("percent"),r},_defaultLabelLine:function(t){fi(t,"labelLine",["show"]);var e=t.labelLine,r=t.emphasis.labelLine;e.show=e.show&&t.label.show,r.show=r.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});Dt($u,wd);function mP(t,e,r,a){var i=e.getData(),n=this.dataIndex,o=i.getName(n),s=e.get("selectedOffset");a.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),i.each(function(l){ux(i.getItemGraphicEl(l),i.getItemLayout(l),e.isSelected(i.getName(l)),s,r)})}function ux(t,e,r,a,i){var n=(e.startAngle+e.endAngle)/2,o=Math.cos(n),s=Math.sin(n),l=r?a:0,u=[o*l,s*l];i?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function bd(t,e){q.call(this);var r=new Ar({z2:2}),a=new ir,i=new dt;this.add(r),this.add(a),this.add(i),this.updateData(t,e,!0)}var hx=bd.prototype;hx.updateData=function(t,e,r){var a=this.childAt(0),i=this.childAt(1),n=this.childAt(2),o=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=et({},l);u.label=null;var h=o.getShallow("animationTypeUpdate");if(r){a.setShape(u);var f=o.getShallow("animationType");f==="scale"?(a.shape.r=l.r0,Se(a,{shape:{r:l.r}},o,e)):(a.shape.endAngle=l.startAngle,ft(a,{shape:{endAngle:l.endAngle}},o,e))}else h==="expansion"?a.setShape(u):ft(a,{shape:u},o,e);var c=t.getItemVisual(e,"color");a.useStyle(J({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),a.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var v=s.getShallow("cursor");v&&a.attr("cursor",v),ux(this,t.getItemLayout(e),o.isSelected(t.getName(e)),o.get("selectedOffset"),o.get("animation"));var d=!r&&h==="transition";this._updateLabel(t,e,d),this.highDownOnUpdate=o.get("silent")?null:function(g,p){var m=o.isAnimationEnabled()&&s.get("hoverAnimation");p==="emphasis"?(i.ignore=i.hoverIgnore,n.ignore=n.hoverIgnore,m&&(a.stopAnimation(!0),a.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(i.ignore=i.normalIgnore,n.ignore=n.normalIgnore,m&&(a.stopAnimation(!0),a.animateTo({shape:{r:l.r}},300,"elasticOut")))},Ot(this)},hx._updateLabel=function(t,e,r){var a=this.childAt(1),i=this.childAt(2),n=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,g=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y)){i.ignore=i.normalIgnore=i.hoverIgnore=a.ignore=a.normalIgnore=a.hoverIgnore=!0;return}var u={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},h={x:l.x,y:l.y};r?(ft(a,{shape:u},n,e),ft(i,{style:h},n,e)):(a.attr({shape:u}),i.attr({style:h})),i.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var f=o.getModel("label"),c=o.getModel("emphasis.label"),v=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine"),g=t.getItemVisual(e,"color");Fe(i.style,i.hoverStyle={},f,c,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:l.text,autoColor:g,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!c.get("show"),a.ignore=a.normalIgnore=!v.get("show"),a.hoverIgnore=!d.get("show"),a.setStyle({stroke:g,opacity:t.getItemVisual(e,"opacity")}),a.setStyle(v.getModel("lineStyle").getLineStyle()),a.hoverStyle=d.getModel("lineStyle").getLineStyle();var p=v.get("smooth");p&&p===!0&&(p=.4),a.setShape({smooth:p})},It(bd,q);var H5=ue.extend({type:"pie",init:function(){var t=new q;this._sectorGroup=t},render:function(t,e,r,a){if(!(a&&a.from===this.uid)){var i=t.getData(),n=this._data,o=this.group,s=e.get("animation"),l=!n,u=t.get("animationType"),h=t.get("animationTypeUpdate"),f=ot(mP,this.uid,t,s,r),c=t.get("selectedMode");if(i.diff(n).add(function(m){var y=new bd(i,m);l&&u!=="scale"&&y.eachChild(function(_){_.stopAnimation(!0)}),c&&y.on("click",f),i.setItemGraphicEl(m,y),o.add(y)}).update(function(m,y){var _=n.getItemGraphicEl(y);!l&&h!=="transition"&&_.eachChild(function(w){w.stopAnimation(!0)}),_.updateData(i,m),_.off("click"),c&&_.on("click",f),o.add(_),i.setItemGraphicEl(m,_)}).remove(function(m){var y=n.getItemGraphicEl(m);o.remove(y)}).execute(),s&&i.count()>0&&(l?u!=="scale":h!=="transition")){for(var v=i.getItemLayout(0),d=1;isNaN(v.startAngle)&&d<i.count();++d)v=i.getItemLayout(d);var g=Math.max(r.getWidth(),r.getHeight())/2,p=it(o.removeClipPath,o);o.setClipPath(this._createClipPath(v.cx,v.cy,g,v.startAngle,v.clockwise,p,t,l))}else o.removeClipPath();this._data=i}},dispose:function(){},_createClipPath:function(t,e,r,a,i,n,o,s){var l=new Ar({shape:{cx:t,cy:e,r0:0,r,startAngle:a,endAngle:a,clockwise:i}}),u=s?Se:ft;return u(l,{shape:{endAngle:a+(i?1:-1)*Math.PI*2}},o,n),l},containPoint:function(t,e){var r=e.getData(),a=r.getItemLayout(0);if(a){var i=t[0]-a.cx,n=t[1]-a.cy,o=Math.sqrt(i*i+n*n);return o<=a.r&&o>=a.r0}}}),fx=function(t,e){M(e,function(r){r.update="updateView",mt(r,function(a,i){var n={};return i.eachComponent({mainType:"series",subType:t,query:a},function(o){o[r.method]&&o[r.method](a.name,a.dataIndex);var s=o.getData();s.each(function(l){var u=s.getName(l);n[u]=o.isSelected(u)||!1})}),{name:a.name,selected:n,seriesId:a.seriesId}})})},Zu=function(t){return{getTargetSeries:function(e){var r={},a=ht();return e.eachSeriesByType(t,function(i){i.__paletteScope=r,a.set(i.uid,i)}),a},reset:function(e,r){var a=e.getRawData(),i={},n=e.getData();n.each(function(o){var s=n.getRawIndex(o);i[s]=o}),a.each(function(o){var s=i[o],l=s!=null&&n.getItemVisual(s,"color",!0),u=s!=null&&n.getItemVisual(s,"borderColor",!0),h;if((!l||!u)&&(h=a.getItemModel(o)),!l){var f=h.get("itemStyle.color")||e.getColorFromPalette(a.getName(o)||o+"",e.__paletteScope,a.count());s!=null&&n.setItemVisual(s,"color",f)}if(!u){var c=h.get("itemStyle.borderColor");s!=null&&n.setItemVisual(s,"borderColor",c)}})}}},yP=Math.PI/180;function cx(t,e,r,a,i,n,o,s,l,u){t.sort(function(w,b){return w.y-b.y});function h(w,b,A,S){for(var D=w;D<b&&!(t[D].y+A>l+o);D++)if(t[D].y+=A,D>w&&D+1<b&&t[D+1].y>t[D].y+t[D].height){f(D,A/2);return}f(b-1,A/2)}function f(w,b){for(var A=w;A>=0&&!(t[A].y-b<l||(t[A].y-=b,A>0&&t[A].y>t[A-1].y+t[A-1].height));A--);}function c(w,b,A,S,D,I){for(var L=(I>0,b?Number.MAX_VALUE:0),P=0,R=w.length;P<R;P++)if(w[P].labelAlignTo==="none"){var E=Math.abs(w[P].y-S),Z=w[P].len,W=w[P].len2,$=E<D+Z?Math.sqrt((D+Z+W)*(D+Z+W)-E*E):Math.abs(w[P].x-A);b&&$>=L&&($=L-10),!b&&$<=L&&($=L+10),w[P].x=A+$*I,L=$}}for(var v=0,d,g=t.length,p=[],m=[],y=0;y<g;y++){if(t[y].position==="outer"&&t[y].labelAlignTo==="labelLine"){var _=t[y].x-u;t[y].linePoints[1][0]+=_,t[y].x=u}d=t[y].y-v,d<0&&h(y,g,-d,i),v=t[y].y+t[y].height}o-v<0&&f(g-1,v-o);for(var y=0;y<g;y++)t[y].y>=r?m.push(t[y]):p.push(t[y]);c(p,!1,e,r,a,i),c(m,!0,e,r,a,i)}function _P(t,e,r,a,i,n,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,f=-Number.MAX_VALUE,c=0;c<t.length;c++)vx(t[c])||(t[c].x<e?(h=Math.min(h,t[c].x),l.push(t[c])):(f=Math.max(f,t[c].x),u.push(t[c])));cx(u,e,r,a,1,i,n,o,s,f),cx(l,e,r,a,-1,i,n,o,s,h);for(var c=0;c<t.length;c++){var v=t[c];if(!vx(v)){var d=v.linePoints;if(d){var g=v.labelAlignTo==="edge",p=v.textRect.width,m;g?v.x<e?m=d[2][0]-v.labelDistance-o-v.labelMargin:m=o+i-v.labelMargin-d[2][0]-v.labelDistance:v.x<e?m=v.x-o-v.bleedMargin:m=o+i-v.x-v.bleedMargin,m<v.textRect.width&&(v.text=tc(v.text,m,v.font),v.labelAlignTo==="edge"&&(p=er(v.text,v.font)));var y=d[1][0]-d[2][0];g?v.x<e?d[2][0]=o+v.labelMargin+p+v.labelDistance:d[2][0]=o+i-v.labelMargin-p-v.labelDistance:(v.x<e?d[2][0]=v.x+v.labelDistance:d[2][0]=v.x-v.labelDistance,d[1][0]=d[2][0]+y),d[1][1]=d[2][1]=v.y}}}}function vx(t){return t.position==="center"}var xP=function(t,e,r,a,i,n){var o=t.getData(),s=[],l,u,h=!1,f=(t.get("minShowLabelAngle")||0)*yP;o.each(function(c){var v=o.getItemLayout(c),d=o.getItemModel(c),g=d.getModel("label"),p=g.get("position")||d.get("emphasis.label.position"),m=g.get("distanceToLabelLine"),y=g.get("alignTo"),_=H(g.get("margin"),r),w=g.get("bleedMargin"),b=g.getFont(),A=d.getModel("labelLine"),S=A.get("length");S=H(S,r);var D=A.get("length2");if(D=H(D,r),!(v.angle<f)){var I=(v.startAngle+v.endAngle)/2,L=Math.cos(I),P=Math.sin(I),R,E,Z,W;l=v.cx,u=v.cy;var $=t.getFormattedLabel(c,"normal")||o.getName(c),X=Rr($,b,W,"top"),K=p==="inside"||p==="inner";if(p==="center")R=v.cx,E=v.cy,W="center";else{var Q=(K?(v.r+v.r0)/2*L:v.r*L)+l,j=(K?(v.r+v.r0)/2*P:v.r*P)+u;if(R=Q+L*3,E=j+P*3,!K){var U=Q+L*(S+e-v.r),tt=j+P*(S+e-v.r),ct=U+(L<0?-1:1)*D,bt=tt;y==="edge"?R=L<0?i+_:i+r-_:R=ct+(L<0?-m:m),E=bt,Z=[[Q,j],[U,tt],[ct,bt]]}W=K?"center":y==="edge"?L>0?"right":"left":L>0?"left":"right"}var Et,ie=g.get("rotate");typeof ie=="number"?Et=ie*(Math.PI/180):Et=ie?L<0?-I+Math.PI:-I:0,h=!!Et,v.label={x:R,y:E,position:p,height:X.height,len:S,len2:D,linePoints:Z,textAlign:W,verticalAlign:"middle",rotation:Et,inside:K,labelDistance:m,labelAlignTo:y,labelMargin:_,bleedMargin:w,textRect:X,text:$,font:b},K||s.push(v.label)}}),!h&&t.get("avoidLabelOverlap")&&_P(s,l,u,e,r,a,i,n)},Yu=Math.PI*2,dx=Math.PI/180;function wP(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}var bP=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.getData(),o=n.mapDimension("value"),s=wP(i,r),l=i.get("center"),u=i.get("radius");z(u)||(u=[0,u]),z(l)||(l=[l,l]);var h=H(s.width,r.getWidth()),f=H(s.height,r.getHeight()),c=Math.min(h,f),v=H(l[0],h)+s.x,d=H(l[1],f)+s.y,g=H(u[0],c/2),p=H(u[1],c/2),m=-i.get("startAngle")*dx,y=i.get("minAngle")*dx,_=0;n.each(o,function(W){!isNaN(W)&&_++});var w=n.getSum(o),b=Math.PI/(w||_)*2,A=i.get("clockwise"),S=i.get("roseType"),D=i.get("stillShowZeroSum"),I=n.getDataExtent(o);I[0]=0;var L=Yu,P=0,R=m,E=A?1:-1;if(n.each(o,function(W,$){var X;if(isNaN(W)){n.setItemLayout($,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:A,cx:v,cy:d,r0:g,r:S?NaN:p,viewRect:s});return}S!=="area"?X=w===0&&D?b:W*b:X=Yu/_,X<y?(X=y,L-=y):P+=W;var K=R+E*X;n.setItemLayout($,{angle:X,startAngle:R,endAngle:K,clockwise:A,cx:v,cy:d,r0:g,r:S?Nt(W,I,[g,p]):p,viewRect:s}),R=K}),L<Yu&&_)if(L<=.001){var Z=Yu/_;n.each(o,function(W,$){if(!isNaN(W)){var X=n.getItemLayout($);X.angle=Z,X.startAngle=m+E*$*Z,X.endAngle=m+E*($+1)*Z}})}else b=L/P,R=m,n.each(o,function(W,$){if(!isNaN(W)){var X=n.getItemLayout($),K=X.angle===y?y:W*b;X.startAngle=R,X.endAngle=R+E*K,R+=E*K}});xP(i,p,s.width,s.height,s.x,s.y)})},bs=function(t){return{seriesType:t,reset:function(e,r){var a=r.findComponents({mainType:"legend"});if(!(!a||!a.length)){var i=e.getData();i.filterSelf(function(n){for(var o=i.getName(n),s=0;s<a.length;s++)if(!a[s].isSelected(o))return!1;return!0})}}}};fx("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Rt(Zu("pie")),Gt(ot(bP,"pie")),$e(bs("pie")),Vt.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return ca(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var Sd=4,Ad=nr({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var r=e.points,a=e.size,i=this.symbolProxy,n=i.shape,o=t.getContext?t.getContext():t,s=o&&a[0]<Sd;if(!s)for(var l=0;l<r.length;){var u=r[l++],h=r[l++];isNaN(u)||isNaN(h)||this.softClipShape&&!this.softClipShape.contain(u,h)||(n.x=u-a[0]/2,n.y=h-a[1]/2,n.width=a[0],n.height=a[1],i.buildPath(t,n,!0))}},afterBrush:function(t){var e=this.shape,r=e.points,a=e.size,i=a[0]<Sd;if(!!i){this.setTransform(t);for(var n=0;n<r.length;){var o=r[n++],s=r[n++];isNaN(o)||isNaN(s)||this.softClipShape&&!this.softClipShape.contain(o,s)||t.fillRect(o-a[0]/2,s-a[1]/2,a[0],a[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var r=this.shape,a=r.points,i=r.size,n=Math.max(i[0],4),o=Math.max(i[1],4),s=a.length/2-1;s>=0;s--){var l=s*2,u=a[l]-n/2,h=a[l+1]-o/2;if(t>=u&&e>=h&&t<=u+n&&e<=h+o)return s}return-1}});function gx(){this.group=new q}var Ya=gx.prototype;Ya.isPersistent=function(){return!this._incremental},Ya.updateData=function(t,e){this.group.removeAll();var r=new Ad({rectHover:!0,cursor:"default"});r.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(r,t,!1,e),this.group.add(r),this._incremental=null},Ya.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(r){if(r.startIndex!=null){var a=(r.endIndex-r.startIndex)*2,i=r.startIndex*4*2;e=new Float32Array(e.buffer,i,a)}r.setShape("points",e)})}},Ya.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new He({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Ya.incrementalUpdate=function(t,e,r){var a;this._incremental?(a=new Ad,this._incremental.addDisplayable(a,!0)):(a=new Ad({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),a.incremental=!0,this.group.add(a)),a.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(a,e,!!this._incremental,r)},Ya._setCommon=function(t,e,r,a){var i=e.hostModel;a=a||{};var n=e.getVisual("symbolSize");t.setShape("size",n instanceof Array?n:[n,n]),t.softClipShape=a.clipShape||null,t.symbolProxy=Ye(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<Sd;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("color");s&&t.setColor(s),r||(t.seriesIndex=i.seriesIndex,t.on("mousemove",function(l){t.dataIndex=null;var u=t.findDataIndex(l.offsetX,l.offsetY);u>=0&&(t.dataIndex=u+(t.startIndex||0))}))},Ya.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Ya._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},ke({type:"scatter",render:function(t,e,r){var a=t.getData(),i=this._updateSymbolDraw(a,t);i.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,r){var a=t.getData(),i=this._updateSymbolDraw(a,t);i.incrementalPrepareUpdate(a),this._finished=!1},incrementalRender:function(t,e,r){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,r){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=ys().reset(t);i.progress&&i.progress({start:0,end:a.count()},a),this._symbolDraw.updateLayout(a)},_getClipShape:function(t){var e=t.coordinateSystem,r=e&&e.getArea&&e.getArea();return t.get("clip",!0)?r:null},_updateSymbolDraw:function(t,e){var r=this._symbolDraw,a=e.pipelineContext,i=a.large;return(!r||i!==this._isLargeDraw)&&(r&&r.remove(),r=this._symbolDraw=i?new gx:new Bn,this._isLargeDraw=i,this.group.removeAll()),this.group.add(r.group),r},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Rt(Ii("scatter","circle")),Gt(ys("scatter"));function px(t,e,r){Qt.call(this,t,e,r),this.type="value",this.angle=0,this.name="",this.model}It(px,Qt);function Zr(t,e,r){this._model=t,this.dimensions=[],this._indicatorAxes=V(t.getIndicatorModels(),function(a,i){var n="indicator_"+i,o=new px(n,a.get("axisType")==="log"?new ku:new Ur);return o.name=a.get("name"),o.model=a,a.axis=o,this.dimensions.push(n),o},this),this.resize(t,r),this.cx,this.cy,this.r,this.r0,this.startAngle}Zr.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Zr.prototype.dataToPoint=function(t,e){var r=this._indicatorAxes[e];return this.coordToPoint(r.dataToCoord(t),e)},Zr.prototype.coordToPoint=function(t,e){var r=this._indicatorAxes[e],a=r.angle,i=this.cx+t*Math.cos(a),n=this.cy-t*Math.sin(a);return[i,n]},Zr.prototype.pointToData=function(t){var e=t[0]-this.cx,r=t[1]-this.cy,a=Math.sqrt(e*e+r*r);e/=a,r/=a;for(var i=Math.atan2(-r,e),n=1/0,o,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(i-u.angle);h<n&&(o=u,s=l,n=h)}return[s,+(o&&o.coordToData(a))]},Zr.prototype.resize=function(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i)/2;this.cx=H(r[0],a),this.cy=H(r[1],i),this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(typeof o=="string"||typeof o=="number")&&(o=[0,o]),this.r0=H(o[0],n),this.r=H(o[1],n),M(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},Zr.prototype.update=function(t,e){var r=this._indicatorAxes,a=this._model;M(r,function(o){o.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(o,s){if(!(o.get("coordinateSystem")!=="radar"||t.getComponent("radar",o.get("radarIndex"))!==a)){var l=o.getData();M(r,function(u){u.scale.unionExtentFromData(l,l.mapDimension(u.dim))})}},this);var i=a.get("splitNumber");function n(o){var s=Math.pow(10,Math.floor(Math.log(o)/Math.LN10)),l=o/s;return l===2?l=5:l*=2,l*s}M(r,function(o,s){var l=n1(o.scale,o.model).extent;Fa(o.scale,o.model);var u=o.model,h=o.scale,f=u.getMin(),c=u.getMax(),v=h.getInterval();if(f!=null&&c!=null)h.setExtent(+f,+c),h.setInterval((c-f)/i);else if(f!=null){var d;do d=f+v*i,h.setExtent(+f,d),h.setInterval(v),v=n(v);while(d<l[1]&&isFinite(d)&&isFinite(l[1]))}else if(c!=null){var g;do g=c-v*i,h.setExtent(g,+c),h.setInterval(v),v=n(v);while(g>l[0]&&isFinite(g)&&isFinite(l[0]))}else{var p=h.getTicks().length-1;p>i&&(v=n(v));var d=Math.ceil(l[1]/v)*v,g=re(d-v*i);h.setExtent(g,d),h.setInterval(v)}})},Zr.dimensions=[],Zr.create=function(t,e){var r=[];return t.eachComponent("radar",function(a){var i=new Zr(a,t,e);r.push(i),a.coordinateSystem=i}),t.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=r[a.get("radarIndex")||0])}),r},_e.register("radar",Zr);var Ss=$a.valueAxis;function Xu(t,e){return J({show:e},t)}var F5=Ze({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),r=this.get("scale"),a=this.get("axisLine"),i=this.get("axisTick"),n=this.get("axisType"),o=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),h=this.get("nameGap"),f=this.get("triggerEvent"),c=V(this.get("indicator")||[],function(v){v.max!=null&&v.max>0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var d=s;if(v.color!=null&&(d=J({color:v.color},s)),v=ut(rt(v),{boundaryGap:t,splitNumber:e,scale:r,axisLine:a,axisTick:i,axisType:n,axisLabel:o,name:v.text,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:f},!1),l||(v.name=""),typeof u=="string"){var g=v.name;v.name=u.replace("{value}",g??"")}else typeof u=="function"&&(v.name=u(v.name,v));var p=et(new _t(v,null,this.ecModel),Di);return p.mainType="radar",p.componentIndex=this.componentIndex,p},this);this.getIndicatorModels=function(){return c}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:ut({lineStyle:{color:"#bbb"}},Ss.axisLine),axisLabel:Xu(Ss.axisLabel,!1),axisTick:Xu(Ss.axisTick,!1),axisType:"interval",splitLine:Xu(Ss.splitLine,!0),splitArea:Xu(Ss.splitArea,!0),indicator:[]}}),SP=["axisLine","axisTickLabel","axisName"];he({type:"radar",render:function(t,e,r){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,r=e.getIndicatorAxes(),a=V(r,function(i){var n=new ze(i.model,{position:[e.cx,e.cy],rotation:i.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return n});M(a,function(i){M(SP,i.add,i),this.group.add(i.getGroup())},this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,r=e.getIndicatorAxes();if(!r.length)return;var a=t.get("shape"),i=t.getModel("splitLine"),n=t.getModel("splitArea"),o=i.getModel("lineStyle"),s=n.getModel("areaStyle"),l=i.get("show"),u=n.get("show"),h=o.get("color"),f=s.get("color");h=z(h)?h:[h],f=z(f)?f:[f];var c=[],v=[];function d(P,R,E){var Z=E%R.length;return P[Z]=P[Z]||[],Z}if(a==="circle")for(var g=r[0].getTicksCoords(),p=e.cx,m=e.cy,y=0;y<g.length;y++){if(l){var _=d(c,h,y);c[_].push(new Br({shape:{cx:p,cy:m,r:g[y].coord}}))}if(u&&y<g.length-1){var _=d(v,f,y);v[_].push(new Yl({shape:{cx:p,cy:m,r0:g[y].coord,r:g[y+1].coord}}))}}else for(var w,b=V(r,function(P,R){var E=P.getTicksCoords();return w=w==null?E.length-1:Math.min(E.length-1,w),V(E,function(Z){return e.coordToPoint(Z.coord,R)})}),A=[],y=0;y<=w;y++){for(var S=[],D=0;D<r.length;D++)S.push(b[D][y]);if(S[0]?S.push(S[0].slice()):T&&console.error("Can't draw value axis "+y),l){var _=d(c,h,y);c[_].push(new ir({shape:{points:S}}))}if(u&&A){var _=d(v,f,y-1);v[_].push(new Ge({shape:{points:S.concat(A)}}))}A=S.slice().reverse()}var I=o.getLineStyle(),L=s.getAreaStyle();M(v,function(P,R){this.group.add(or(P,{style:J({stroke:"none",fill:f[R%f.length]},L),silent:!0}))},this),M(c,function(P,R){this.group.add(or(P,{style:J({fill:"none",stroke:h[R%h.length]},I),silent:!0}))},this)}});var AP=Vt.extend({type:"series.radar",dependencies:["radar"],init:function(t){AP.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this))},getInitialData:function(t,e){return Un(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(t){var e=this.getData(),r=this.coordinateSystem,a=r.getIndicatorAxes(),i=this.getData().getName(t);return kt(i===""?this.name:i)+"<br/>"+V(a,function(n,o){var s=e.get(e.mapDimension(n.dim),t);return kt(n.name+" : "+s)}).join("<br />")},getTooltipPosition:function(t){if(t!=null){for(var e=this.getData(),r=this.coordinateSystem,a=e.getValues(V(r.dimensions,function(s){return e.mapDimension(s)}),t,!0),i=0,n=a.length;i<n;i++)if(!isNaN(a[i])){var o=r.getIndicatorAxes();return r.coordToPoint(o[i].dataToCoord(a[i]),i)}}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});function TP(t){return z(t)||(t=[+t,+t]),t}ke({type:"radar",render:function(t,e,r){var a=t.coordinateSystem,i=this.group,n=t.getData(),o=this._data;function s(h,f){var c=h.getItemVisual(f,"symbol")||"circle",v=h.getItemVisual(f,"color");if(c!=="none"){var d=TP(h.getItemVisual(f,"symbolSize")),g=Ye(c,-1,-1,2,2,v);return g.attr({style:{strokeNoScale:!0},z2:100,scale:[d[0]/2,d[1]/2]}),g}}function l(h,f,c,v,d,g){c.removeAll();for(var p=0;p<f.length-1;p++){var m=s(v,d);m&&(m.__dimIdx=p,h[p]?(m.attr("position",h[p]),sa[g?"initProps":"updateProps"](m,{position:f[p]},t,d)):m.attr("position",f[p]),c.add(m))}}function u(h){return V(h,function(f){return[a.cx,a.cy]})}n.diff(o).add(function(h){var f=n.getItemLayout(h);if(!!f){var c=new Ge,v=new ir,d={shape:{points:f}};c.shape.points=u(f),v.shape.points=u(f),Se(c,d,t,h),Se(v,d,t,h);var g=new q,p=new q;g.add(v),g.add(c),g.add(p),l(v.shape.points,f,p,n,h,!0),n.setItemGraphicEl(h,g)}}).update(function(h,f){var c=o.getItemGraphicEl(f),v=c.childAt(0),d=c.childAt(1),g=c.childAt(2),p={shape:{points:n.getItemLayout(h)}};!p.shape.points||(l(v.shape.points,p.shape.points,g,n,h,!1),ft(v,p,t),ft(d,p,t),n.setItemGraphicEl(h,c))}).remove(function(h){i.remove(o.getItemGraphicEl(h))}).execute(),n.eachItemGraphicEl(function(h,f){var c=n.getItemModel(f),v=h.childAt(0),d=h.childAt(1),g=h.childAt(2),p=n.getItemVisual(f,"color");i.add(h),v.useStyle(J(c.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:p})),v.hoverStyle=c.getModel("emphasis.lineStyle").getLineStyle();var m=c.getModel("areaStyle"),y=c.getModel("emphasis.areaStyle"),_=m.isEmpty()&&m.parentModel.isEmpty(),w=y.isEmpty()&&y.parentModel.isEmpty();w=w&&_,d.ignore=_,d.useStyle(J(m.getAreaStyle(),{fill:p,opacity:.7})),d.hoverStyle=y.getAreaStyle();var b=c.getModel("itemStyle").getItemStyle(["color"]),A=c.getModel("emphasis.itemStyle").getItemStyle(),S=c.getModel("label"),D=c.getModel("emphasis.label");g.eachChild(function(I){I.setStyle(b),I.hoverStyle=rt(A);var L=n.get(n.dimensions[I.__dimIdx],f);(L==null||isNaN(L))&&(L=""),Fe(I.style,I.hoverStyle,S,D,{labelFetcher:n.hostModel,labelDataIndex:f,labelDimIndex:I.__dimIdx,defaultText:L,autoColor:p,isRectText:!0})}),h.highDownOnUpdate=function(I,L){d.attr("ignore",L==="emphasis"?w:_)},Ot(h)}),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var CP=function(t){t.eachSeriesByType("radar",function(e){var r=e.getData(),a=[],i=e.coordinateSystem;if(!!i){var n=i.getIndicatorAxes();M(n,function(o,s){r.each(r.mapDimension(n[s].dim),function(l,u){a[u]=a[u]||[];var h=i.dataToPoint(l,s);a[u][s]=mx(h)?h:yx(i)})}),r.each(function(o){var s=om(a[o],function(l){return mx(l)})||yx(i);a[o].push(s.slice()),r.setItemLayout(o,a[o])})}})};function mx(t){return!isNaN(t[0])&&!isNaN(t[1])}function yx(t){return[t.cx,t.cy]}var DP=function(t){var e=t.polar;if(e){z(e)||(e=[e]);var r=[];M(e,function(a,i){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),t.radar=t.radar||[],z(t.radar)||(t.radar=[t.radar]),t.radar.push(a)):r.push(a)}),t.polar=r}M(t.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})};Rt(Zu("radar")),Rt(Ii("radar","circle")),Gt(CP),$e(bs("radar")),we(DP);for(var Td=[126,25],Li=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Pi=0;Pi<Li.length;Pi++)for(var $n=0;$n<Li[Pi].length;$n++)Li[Pi][$n][0]/=10.5,Li[Pi][$n][1]/=-10.5/.75,Li[Pi][$n][0]+=Td[0],Li[Pi][$n][1]+=Td[1];var MP=function(t,e){t==="china"&&e.push(new ps("\u5357\u6D77\u8BF8\u5C9B",V(Li,function(r){return{type:"polygon",exterior:r}}),Td))},IP={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]},LP=function(t,e){if(t==="china"){var r=IP[e.name];if(r){var a=e.center;a[0]+=r[0]/10.5,a[1]+=-r[1]/(10.5/.75)}}},PP={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},EP=function(t,e){if(t==="world"){var r=PP[e.name];if(r){var a=e.center;a[0]=r[0],a[1]=r[1]}}},RP=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],OP=function(t,e){t==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:RP[0]})},_x=Pe(),NP={load:function(t,e,r){var a=_x(e).parsed;if(a)return a;var i=e.specialAreas||{},n=e.geoJSON,o;try{o=n?id(n,r):[]}catch(s){throw new Error(`Invalid geoJson format
`+s.message)}return MP(t,o),M(o,function(s){var l=s.name;LP(t,s),EP(t,s),OP(t,s);var u=i[l];u&&s.transformTo(u.left,u.top,u.width,u.height)}),_x(e).parsed={regions:o,boundingRect:kP(o)}}};function kP(t){for(var e,r=0;r<t.length;r++){var a=t[r].getBoundingRect();e=e||a.clone(),e.union(a)}return e}var Zn=Pe(),zP={load:function(t,e){var r=Zn(e).originRoot;if(r)return{root:r,boundingRect:Zn(e).boundingRect};var a=xx(e);return Zn(e).originRoot=a.root,Zn(e).boundingRect=a.boundingRect,a},makeGraphic:function(t,e,r){var a=Zn(e),i=a.rootMap||(a.rootMap=ht()),n=i.get(r);if(n)return n;var o=a.originRoot,s=a.boundingRect;return a.originRootHostKey?n=xx(e,s).root:(a.originRootHostKey=r,n=o),i.set(r,n)},removeGraphic:function(t,e,r){var a=Zn(e),i=a.rootMap;i&&i.removeKey(r),r===a.originRootHostKey&&(a.originRootHostKey=null)}};function xx(t,e){var r=t.svgXML,a,i;try{a=r&&FI(r,{ignoreViewBox:!0,ignoreRootClip:!0})||{},i=a.root,gt(i!=null)}catch(h){throw new Error(`Invalid svg format
`+h.message)}var n=a.width,o=a.height,s=a.viewBoxRect;if(e||(e=n==null||o==null?i.getBoundingRect():new vt(0,0,0,0),n!=null&&(e.width=n),o!=null&&(e.height=o)),s){var l=c_(s,e.width,e.height),u=i;i=new q,i.add(u),u.scale=l.scale,u.position=l.position}return i.setClipPath(new xt({shape:e.plain()})),{root:i,boundingRect:e}}var bx={geoJSON:NP,svg:zP},As={load:function(t,e,r){var a=[],i=ht(),n=ht(),o,s=Ax(t);return M(s,function(l){var u=bx[l.type].load(t,l,r);M(u.regions,function(f){var c=f.name;e&&e.hasOwnProperty(c)&&(f=f.cloneShallow(c=e[c])),a.push(f),i.set(c,f),n.set(c,f.center)});var h=u.boundingRect;h&&(o?o.union(h):o=h.clone())}),{regions:a,regionsMap:i,nameCoordMap:n,boundingRect:o||new vt(0,0,0,0)}},makeGraphic:Sx("makeGraphic"),removeGraphic:Sx("removeGraphic")};function Sx(t){return function(e,r){var a=Ax(e),i=[];return M(a,function(n){var o=bx[n.type][t];o&&i.push(o(e,n,r))}),i}}function BP(t){T&&console.error("Map "+t+" not exists. The GeoJSON of the map must be provided.")}function Ax(t){var e=wu.retrieveMap(t)||[];return T&&(e.length||BP(t)),e}var VP=Vt.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=Un(this,{coordDimensions:["value"],encodeDefaulter:ot(fv,this)}),r=e.mapDimension("value"),a=ht(),i=[],n=[],o=0,s=e.count();o<s;o++){var l=e.getName(o);a.set(l,!0),i.push({name:l,value:e.get(r,o),selected:Uy(e,o,"selected")})}var u=As.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return M(u.regions,function(h){var f=h.name;a.get(f)||(i.push({name:f}),n.push(f))}),this.updateSelectedMap(i),e.appendValues([],n),e},getHostGeoModel:function(){var t=this.option.geoIndex;return t!=null?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),r=ka(this.getRawValue(t)),a=e.getName(t),i=this.seriesGroup,n=[],o=0;o<i.length;o++){var s=i[o].originalData.indexOfName(a),l=e.mapDimension("value");isNaN(i[o].originalData.get(l,s))||n.push(kt(i[o].name))}return n.join(", ")+"<br />"+kt(a+" : "+r)},getTooltipPosition:function(t){if(t!=null){var e=this.getData().getName(t),r=this.coordinateSystem,a=r.getRegion(e);return a&&r.dataToPoint(a.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,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)"}},nameProperty:"name"}});Dt(VP,wd);var Tx="\0_ec_interaction_mutex";function GP(t,e,r){var a=Cd(t);a[e]=r}function HP(t,e,r){var a=Cd(t),i=a[e];i===r&&(a[e]=null)}function Cx(t,e){return!!Cd(t)[e]}function Cd(t){return t[Tx]||(t[Tx]={})}mt({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});function Yn(t){this.pointerChecker,this._zr=t,this._opt={};var e=it,r=e(FP,this),a=e(WP,this),i=e(UP,this),n=e($P,this),o=e(ZP,this);le.call(this),this.setPointerChecker=function(s){this.pointerChecker=s},this.enable=function(s,l){this.disable(),this._opt=J(rt(l)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),s==null&&(s=!0),(s===!0||s==="move"||s==="pan")&&(t.on("mousedown",r),t.on("mousemove",a),t.on("mouseup",i)),(s===!0||s==="scale"||s==="zoom")&&(t.on("mousewheel",n),t.on("pinch",o))},this.disable=function(){t.off("mousedown",r),t.off("mousemove",a),t.off("mouseup",i),t.off("mousewheel",n),t.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}Dt(Yn,le);function FP(t){if(!(ym(t)||t.target&&t.target.draggable)){var e=t.offsetX,r=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,r)&&(this._x=e,this._y=r,this._dragging=!0)}}function WP(t){if(!(!this._dragging||!qu("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||Cx(this._zr,"globalPan"))){var e=t.offsetX,r=t.offsetY,a=this._x,i=this._y,n=e-a,o=r-i;this._x=e,this._y=r,this._opt.preventDefaultMouseMove&&oi(t.event),Dx(this,"pan","moveOnMouseMove",t,{dx:n,dy:o,oldX:a,oldY:i,newX:e,newY:r})}}function UP(t){ym(t)||(this._dragging=!1)}function $P(t){var e=qu("zoomOnMouseWheel",t,this._opt),r=qu("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,i=Math.abs(a),n=t.offsetX,o=t.offsetY;if(!(a===0||!e&&!r)){if(e){var s=i>3?1.4:i>1?1.2:1.1,l=a>0?s:1/s;Dd(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:n,originY:o})}if(r){var u=Math.abs(a),h=(a>0?1:-1)*(u>3?.4:u>1?.15:.05);Dd(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:n,originY:o})}}}function ZP(t){if(!Cx(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Dd(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function Dd(t,e,r,a,i){t.pointerChecker&&t.pointerChecker(a,i.originX,i.originY)&&(oi(a.event),Dx(t,e,r,a,i))}function Dx(t,e,r,a,i){i.isAvailableBehavior=it(qu,null,r,a),t.trigger(e,i)}function qu(t,e,r){var a=r[t];return!t||a&&(!Lt(a)||e.event[a+"Key"])}function Md(t,e,r){var a=t.target,i=a.position;i[0]+=e,i[1]+=r,a.dirty()}function Id(t,e,r,a){var i=t.target,n=t.zoomLimit,o=i.position,s=i.scale,l=t.zoom=t.zoom||1;if(l*=e,n){var u=n.min||0,h=n.max||1/0;l=Math.max(Math.min(h,l),u)}var f=l/t.zoom;t.zoom=l,o[0]-=(r-o[0])*(f-1),o[1]-=(a-o[1])*(f-1),s[0]*=f,s[1]*=f,i.dirty()}var YP={axisPointer:1,tooltip:1,brush:1};function Ku(t,e,r){var a=e.getComponentByElement(t.topTarget),i=a&&a.coordinateSystem;return a&&a!==r&&!YP[a.mainType]&&i&&i.model!==r}function Mx(t){var e=t.getItemStyle(),r=t.get("areaColor");return r!=null&&(e.fill=r),e}function XP(t,e,r,a,i){r.off("click"),r.off("mousedown"),e.get("selectedMode")&&(r.on("mousedown",function(){t._mouseDownFlag=!0}),r.on("click",function(n){if(!!t._mouseDownFlag){t._mouseDownFlag=!1;for(var o=n.target;!o.__regions;)o=o.parent;if(!!o){var s={type:(e.mainType==="geo"?"geo":"map")+"ToggleSelect",batch:V(o.__regions,function(l){return{name:l.name,from:i.uid}})};s[e.mainType+"Id"]=e.id,a.dispatchAction(s),Ix(e,r)}}}))}function Ix(t,e){e.eachChild(function(r){M(r.__regions,function(a){r.trigger(t.isSelected(a.name)?"emphasis":"normal")})})}function ju(t,e){var r=new q;this.uid=Wo("ec_map_draw"),this._controller=new Yn(t.getZr()),this._controllerHost={target:e?r:null},this.group=r,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,r.add(this._regionsGroup=new q),r.add(this._backgroundGroup=new q)}ju.prototype={constructor:ju,draw:function(t,e,r,a,i){var n=t.mainType==="geo",o=t.getData&&t.getData();n&&e.eachComponent({mainType:"series",subType:"map"},function(A){!o&&A.getHostGeoModel()===t&&(o=A.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group,h=s.getTransformInfo(),f=!l.childAt(0)||i,c;if(f)u.transform=h.roamTransform,u.decomposeTransform(),u.dirty();else{var v=new _r;v.transform=h.roamTransform,v.decomposeTransform();var d={scale:v.scale,position:v.position};c=v.scale,ft(u,d,t)}var g=h.rawScale,p=h.rawPosition;l.removeAll();var m=["itemStyle"],y=["emphasis","itemStyle"],_=["label"],w=["emphasis","label"],b=ht();M(s.regions,function(A){var S=b.get(A.name)||b.set(A.name,new q),D=new $0({segmentIgnoreThreshold:1,shape:{paths:[]}});S.add(D);var I=t.getRegionModel(A.name)||t,L=I.getModel(m),P=I.getModel(y),R=Mx(L),E=Mx(P),Z=I.getModel(_),W=I.getModel(w),$;if(o){$=o.indexOfName(A.name);var X=o.getItemVisual($,"color",!0);X&&(R.fill=X)}var K=function(dr){return[dr[0]*g[0]+p[0],dr[1]*g[1]+p[1]]};M(A.geometries,function(dr){if(dr.type==="polygon"){for(var sl=[],Ji=0;Ji<dr.exterior.length;++Ji)sl.push(K(dr.exterior[Ji]));D.shape.paths.push(new Ge({segmentIgnoreThreshold:1,shape:{points:sl}}));for(var Ji=0;Ji<(dr.interiors?dr.interiors.length:0);++Ji){for(var RT=dr.interiors[Ji],sl=[],tm=0;tm<RT.length;++tm)sl.push(K(RT[tm]));D.shape.paths.push(new Ge({segmentIgnoreThreshold:1,shape:{points:sl}}))}}}),D.setStyle(R),D.style.strokeNoScale=!0,D.culling=!0;var Q=Z.get("show"),j=W.get("show"),U=o&&isNaN(o.get(o.mapDimension("value"),$)),tt=o&&o.getItemLayout($);if(n||U&&(Q||j)||tt&&tt.showLabel){var ct=n?A.name:$,bt;(!o||$>=0)&&(bt=t);var Et=new dt({position:K(A.center.slice()),scale:[1/u.scale[0],1/u.scale[1]],z2:10,silent:!0});if(Fe(Et.style,Et.hoverStyle={},Z,W,{labelFetcher:bt,labelDataIndex:ct,defaultText:A.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!f){var ie=[1/c[0],1/c[1]];ft(Et,{scale:ie},t)}S.add(Et)}if(o)o.setItemGraphicEl($,S);else{var I=t.getRegionModel(A.name);D.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:A.name,region:I&&I.option||{}}}var ol=S.__regions||(S.__regions=[]);ol.push(A),S.highDownSilentOnTouch=!!t.get("selectedMode"),Ot(S,E),l.add(S)}),this._updateController(t,e,r),XP(this,t,l,r,a),Ix(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&As.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&M(As.makeGraphic(e,this.uid),function(r){this._backgroundGroup.add(r)},this),this._mapName=e},_updateController:function(t,e,r){var a=t.coordinateSystem,i=this._controller,n=this._controllerHost;n.zoomLimit=t.get("scaleLimit"),n.zoom=a.getZoom(),i.enable(t.get("roam")||!1);var o=t.mainType;function s(){var l={type:"geoRoam",componentType:o};return l[o+"Id"]=t.id,l}i.off("pan").on("pan",function(l){this._mouseDownFlag=!1,Md(n,l.dx,l.dy),r.dispatchAction(et(s(),{dx:l.dx,dy:l.dy}))},this),i.off("zoom").on("zoom",function(l){if(this._mouseDownFlag=!1,Id(n,l.scale,l.originX,l.originY),r.dispatchAction(et(s(),{zoom:l.scale,originX:l.originX,originY:l.originY})),this._updateGroup){var u=this.group.scale;this._regionsGroup.traverse(function(h){h.type==="text"&&h.attr("scale",[1/u[0],1/u[1]])})}},this),i.setPointerChecker(function(l,u,h){return a.getViewRectAfterRoam().contain(u,h)&&!Ku(l,r,t)})}};var Ld="__seriesMapHighDown",Lx="__seriesMapCallKey";ke({type:"map",render:function(t,e,r,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var i=this.group;if(i.removeAll(),!t.getHostGeoModel()){if(a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===t.id){var n=this._mapDraw;n&&i.add(n.group)}else if(t.needsDrawMap){var n=this._mapDraw||new ju(r,!0);i.add(n.group),n.draw(t,e,r,this,a),this._mapDraw=n}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,r)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,r){var a=t.originalData,i=this.group;a.each(a.mapDimension("value"),function(n,o){if(!isNaN(n)){var s=a.getItemLayout(o);if(!(!s||!s.point)){var l=s.point,u=s.offset,h=new Br({style:{fill:t.getData().getVisual("color")},shape:{cx:l[0]+u*9,cy:l[1],r:3},silent:!0,z2:8+(u?0:ko+1)});if(!u){var f=t.mainSeries.getData(),c=a.getName(o),v=f.indexOfName(c),d=a.getItemModel(o),g=d.getModel("label"),p=d.getModel("emphasis.label"),m=f.getItemGraphicEl(v),y=Xt(t.getFormattedLabel(v,"normal"),c),_=Xt(t.getFormattedLabel(v,"emphasis"),y),w=m[Ld],b=Math.random();if(!w){w=m[Ld]={};var A=ot(Px,!0),S=ot(Px,!1);m.on("mouseover",A).on("mouseout",S).on("emphasis",A).on("normal",S)}m[Lx]=b,et(w,{recordVersion:b,circle:h,labelModel:g,hoverLabelModel:p,emphasisText:_,normalText:y}),Ex(w,!1)}i.add(h)}}})}});function Px(t){var e=this[Ld];e&&e.recordVersion===this[Lx]&&Ex(e,t)}function Ex(t,e){var r=t.circle,a=t.labelModel,i=t.hoverLabelModel,n=t.emphasisText,o=t.normalText;e?(r.style.extendFrom($t({},i,{text:i.get("show")?n:null},{isRectText:!0,useInsideStyle:!1},!0)),r.__mapOriginalZ2=r.z2,r.z2+=ko):($t(r.style,a,{text:a.get("show")?o:null,textPosition:a.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),r.dirty(!1),r.__mapOriginalZ2!=null&&(r.z2=r.__mapOriginalZ2,r.__mapOriginalZ2=null))}function Pd(t,e,r){var a=t.getZoom(),i=t.getCenter(),n=e.zoom,o=t.dataToPoint(i);if(e.dx!=null&&e.dy!=null){o[0]-=e.dx,o[1]-=e.dy;var i=t.pointToData(o);t.setCenter(i)}if(n!=null){if(r){var s=r.min||0,l=r.max||1/0;n=Math.max(Math.min(a*n,l),s)/a}t.scale[0]*=n,t.scale[1]*=n;var u=t.position,h=(e.originX-u[0])*(n-1),f=(e.originY-u[1])*(n-1);u[0]-=h,u[1]-=f,t.updateTransform();var i=t.pointToData(o);t.setCenter(i),t.setZoom(n*a)}return{center:t.getCenter(),zoom:t.getZoom()}}mt({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var r=t.componentType||"series";e.eachComponent({mainType:r,query:t},function(a){var i=a.coordinateSystem;if(i.type==="geo"){var n=Pd(i,t,a.get("scaleLimit"));a.setCenter&&a.setCenter(n.center),a.setZoom&&a.setZoom(n.zoom),r==="series"&&M(a.seriesGroup,function(o){o.setCenter(n.center),o.setZoom(n.zoom)})}})});var Rx=Pt;function Ed(){_r.call(this)}Dt(Ed,_r);function Xa(t){this.name=t,this.zoomLimit,_r.call(this),this._roamTransformable=new Ed,this._rawTransformable=new Ed,this._center,this._zoom}Xa.prototype={constructor:Xa,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,r,a){return this._rect=new vt(t,e,r,a),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,r,a){this.transformTo(t,e,r,a),this._viewRect=new vt(t,e,r,a)},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=this._rawTransformable;n.transform=i.calculateTransform(new vt(t,e,r,a)),n.decomposeTransform(),this._updateTransform()},setCenter:function(t){!t||(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(e.max!=null&&(t=Math.min(e.max,t)),e.min!=null&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,r=t.y+t.height/2;return[e,r]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,r=this.getDefaultCenter(),a=this.getCenter(),i=this.getZoom();a=Pt([],a,t),r=Pt([],r,t),e.origin=a,e.position=[r[0]-a[0],r[1]-a[1]],e.scale=[i,i],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),xo(this.transform||(this.transform=[]),e.transform||Ie()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],cl(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?on(t):Ie(),rawScale:on(e.scale),rawPosition:on(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,r){var a=e?this._rawTransform:this.transform;return r=r||[],a?Rx(r,t,a):ge(r,t)},pointToData:function(t){var e=this.invTransform;return e?Rx([],t,e):[t[0],t[1]]},convertToPixel:ot(Ox,"dataToPoint"),convertFromPixel:ot(Ox,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},Dt(Xa,_r);function Ox(t,e,r,a){var i=r.seriesModel,n=i?i.coordinateSystem:null;return n===this?n[t](a):null}function Xn(t,e,r,a){Xa.call(this,t),this.map=e;var i=As.load(e,r);this._nameCoordMap=i.nameCoordMap,this._regionsMap=i.regionsMap,this._invertLongitute=a??!0,this.regions=i.regions,this._rect=i.boundingRect}Xn.prototype={constructor:Xn,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,r=0;r<e.length;r++)if(e[r].contain(t))return!0;return!1},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=this._invertLongitute;i=i.clone(),n&&(i.y=-i.y-i.height);var o=this._rawTransformable;if(o.transform=i.calculateTransform(new vt(t,e,r,a)),o.decomposeTransform(),n){var s=o.scale;s[1]=-s[1]}o.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,r=0;r<e.length;r++)if(e[r].contain(t))return e[r]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,r){if(typeof t=="string"&&(t=this.getGeoCoord(t)),t)return Xa.prototype.dataToPoint.call(this,t,e,r)},convertToPixel:ot(Nx,"dataToPoint"),convertFromPixel:ot(Nx,"pointToData")},Dt(Xn,Xa);function Nx(t,e,r,a){var i=r.geoModel,n=r.seriesModel,o=i?i.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[t](a):null}function kx(t,e){var r=t.get("boundingCoords");if(r!=null){var a=r[0],i=r[1];isNaN(a[0])||isNaN(a[1])||isNaN(i[0])||isNaN(i[1])?T&&console.error("Invalid boundingCoords"):this.setBoundingRect(a[0],a[1],i[0]-a[0],i[1]-a[1])}var n=this.getBoundingRect(),o,s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),f=n.width/n.height*this.aspectScale,c=!1;s&&l&&(s=[H(s[0],u),H(s[1],h)],l=H(l,Math.min(u,h)),!isNaN(s[0])&&!isNaN(s[1])&&!isNaN(l)?c=!0:T&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var v;if(c){var v={};f>1?(v.width=l,v.height=l/f):(v.height=l,v.width=l*f),v.y=s[1]-v.height/2,v.x=s[0]-v.width/2}else o=t.getBoxLayoutParams(),o.aspect=f,v=qt(o,{width:u,height:h});this.setViewRect(v.x,v.y,v.width,v.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function zx(t,e){M(e.get("geoCoord"),function(r,a){t.addGeoCoord(a,r)})}var Bx={dimensions:Xn.prototype.dimensions,create:function(t,e){var r=[];t.eachComponent("geo",function(i,n){var o=i.get("map"),s=i.get("aspectScale"),l=!0,u=wu.retrieveMap(o);u&&u[0]&&u[0].type==="svg"?(s==null&&(s=1),l=!1):s==null&&(s=.75);var h=new Xn(o+n,o,i.get("nameMap"),l);h.aspectScale=s,h.zoomLimit=i.get("scaleLimit"),r.push(h),zx(h,i),i.coordinateSystem=h,h.model=i,h.resize=kx,h.resize(i,e)}),t.eachSeries(function(i){var n=i.get("coordinateSystem");if(n==="geo"){var o=i.get("geoIndex")||0;i.coordinateSystem=r[o]}});var a={};return t.eachSeriesByType("map",function(i){if(!i.getHostGeoModel()){var n=i.getMapType();a[n]=a[n]||[],a[n].push(i)}}),M(a,function(i,n){var o=V(i,function(l){return l.get("nameMap")}),s=new Xn(n,n,go(o));s.zoomLimit=Ut.apply(null,V(i,function(l){return l.get("scaleLimit")})),r.push(s),s.resize=kx,s.aspectScale=i[0].get("aspectScale"),s.resize(i[0],e),M(i,function(l){l.coordinateSystem=s,zx(s,l)})}),r},getFilledRegions:function(t,e,r){for(var a=(t||[]).slice(),i=ht(),n=0;n<a.length;n++)i.set(a[n].name,a[n]);var o=As.load(e,r);return M(o.regions,function(s){var l=s.name;!i.get(l)&&a.push({name:l})}),a}};Gv("geo",Bx);var qP=function(t){var e={};t.eachSeriesByType("map",function(r){var a=r.getMapType();if(!(r.getHostGeoModel()||e[a])){var i={};M(r.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&t.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,h){var f=l.getName(h),c=s.getRegion(f);if(!(!c||isNaN(u))){var v=i[f]||0,d=s.dataToPoint(c.center);i[f]=v+1,l.setItemLayout(h,{point:d,offset:v})}})});var n=r.getData();n.each(function(o){var s=n.getName(o),l=n.getItemLayout(o)||{};l.showLabel=!i[s],n.setItemLayout(o,l)}),e[a]=!0}})},KP=function(t){t.eachSeriesByType("map",function(e){var r=e.get("color"),a=e.getModel("itemStyle"),i=a.get("areaColor"),n=a.get("color")||r[e.seriesIndex%r.length];e.getData().setVisual({areaColor:i,color:n})})};function jP(t,e){var r={};return M(t,function(a){a.each(a.mapDimension("value"),function(i,n){var o="ec-"+a.getName(n);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(a,i){for(var n="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[n].length,h=0;h<u;h++)s=Math.min(s,r[n][h]),l=Math.max(l,r[n][h]),o+=r[n][h];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}var QP=function(t){var e={};t.eachSeriesByType("map",function(r){var a=r.getHostGeoModel(),i=a?"o"+a.id:"i"+r.getMapType();(e[i]=e[i]||[]).push(r)}),M(e,function(r,a){for(var i=jP(V(r,function(o){return o.getData()}),r[0].get("mapValueCalculation")),n=0;n<r.length;n++)r[n].originalData=r[n].getData();for(var n=0;n<r.length;n++)r[n].seriesGroup=r,r[n].needsDrawMap=n===0&&!r[n].getHostGeoModel(),r[n].setData(i.cloneShallow()),r[n].mainSeries=r[0]})},JP=function(t){var e=[];M(t.series,function(r){r&&r.type==="map"&&(e.push(r),r.map=r.map||r.mapType,J(r,r.mapLocation))})};Gt(qP),Rt(KP),$e(Wr.PROCESSOR.STATISTIC,QP),we(JP),fx("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var Ts=M,Cs="\0__link_datas",Qu="\0__link_mainData";function Vx(t){var e=t.mainData,r=t.datas;r||(r={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,Gx(e,r,t),Ts(r,function(a){Ts(e.TRANSFERABLE_METHODS,function(i){a.wrapMethod(i,ot(tE,t))})}),e.wrapMethod("cloneShallow",ot(rE,t)),Ts(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,ot(eE,t))}),gt(r[e.dataType]===e)}function tE(t,e){if(iE(this)){var r=et({},this[Cs]);r[this.dataType]=e,Gx(e,r,t)}else Rd(e,this.dataType,this[Qu],t);return e}function eE(t,e){return t.struct&&t.struct.update(this),e}function rE(t,e){return Ts(e[Cs],function(r,a){r!==e&&Rd(r.cloneShallow(),a,e,t)}),e}function aE(t){var e=this[Qu];return t==null||e==null?e:e[Cs][t]}function iE(t){return t[Qu]===t}function Gx(t,e,r){t[Cs]={},Ts(e,function(a,i){Rd(a,i,t,r)})}function Rd(t,e,r,a){r[Cs][e]=t,t[Qu]=r,t.dataType=e,a.struct&&(t[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=t),t.getLinkedData=aE}var Od=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};Od.prototype={constructor:Od,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,r){typeof t=="function"&&(r=e,e=t,t=null),t=t||{},Lt(t)&&(t={order:t});var a=t.order||"preorder",i=this[t.attr||"children"],n;a==="preorder"&&(n=e.call(r,this));for(var o=0;!n&&o<i.length;o++)i[o].eachNode(t,e,r);a==="postorder"&&e.call(r,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var r=0;r<this.children.length;r++){var a=this.children[r];a.updateDepthAndHeight(t+1),a.height>e&&(e=a.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,r=this.children,a=r.length;e<a;e++){var i=r[e].getNodeById(t);if(i)return i}},contains:function(t){if(t===this)return!0;for(var e=0,r=this.children,a=r.length;e<a;e++){var i=r[e].contains(t);if(i)return i}},getAncestors:function(t){for(var e=[],r=t?this:this.parentNode;r;)e.push(r),r=r.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,r=e.data.getItemModel(this.dataIndex),a=this.getLevelModel();return a?r.getModel(t,a.getModel(t)):r.getModel(t)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}};function Ei(t,e){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=V(e||[],function(r){return new _t(r,t,t.ecModel)})}Ei.prototype={constructor:Ei,type:"tree",eachNode:function(t,e,r){this.root.eachNode(t,e,r)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,r=0,a=e.length;r<a;r++)e[r].dataIndex=-1;for(var r=0,a=t.count();r<a;r++)e[t.getRawIndex(r)].dataIndex=r},clearLayouts:function(){this.data.clearItemLayouts()}},Ei.createTree=function(t,e,r,a){var i=new Ei(e,r&&r.levels),n=[],o=1;s(t);function s(h,f){var c=h.value;o=Math.max(o,z(c)?c.length:1),n.push(h);var v=new Od(h.name,i);f?nE(v,f):i.root=v,i._nodes.push(v);var d=h.children;if(d)for(var g=0;g<d.length;g++)s(d[g],v)}i.root.updateDepthAndHeight(0);var l=En(n,{coordDimensions:["value"],dimensionsCount:o}),u=new fe(l,e);return u.initData(n),a&&a(u),Vx({mainData:u,struct:i,structAttr:"tree"}),i.update(),i};function nE(t,e){var r=e.children;t.parentNode!==e&&(r.push(t),t.parentNode=e)}Vt.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},r=t.leaves||{},a=new _t(r,this,this.ecModel),i=Ei.createTree(e,this,{},n);function n(u){u.wrapMethod("getItemModel",function(h,f){var c=i.getNodeByDataIndex(f);return(!c.children.length||!c.isExpand)&&(h.parentModel=a),h})}var o=0;i.eachNode("preorder",function(u){u.depth>o&&(o=u.depth)});var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return i.root.eachNode("preorder",function(u){var h=u.hostTree.data.getRawDataItem(u.dataIndex);u.isExpand=h&&h.collapsed!=null?!h.collapsed:u.depth<=l}),i.data},getOrient:function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,r=e.root.children[0],a=e.getNodeByDataIndex(t),i=a.getValue(),n=a.name;a&&a!==r;)n=a.parentNode.name+"."+n,a=a.parentNode;return kt(n+(isNaN(i)||i==null?"":" : "+i))},defaultOption:{zlevel:0,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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});function oE(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],r,a;r=e.pop();)if(a=r.children,r.isExpand&&a.length)for(var i=a.length,n=i-1;n>=0;n--){var o=a[n];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:n,thread:null},e.push(o)}}function sE(t,e){var r=t.isExpand?t.children:[],a=t.parentNode.children,i=t.hierNode.i?a[t.hierNode.i-1]:null;if(r.length){hE(t);var n=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-n):t.hierNode.prelim=n}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=fE(t,i,t.parentNode.hierNode.defaultAncestor||a[0],e)}function lE(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Hx(t){return arguments.length?t:dE}function Ds(t,e){var r={};return t-=Math.PI/2,r.x=e*Math.cos(t),r.y=e*Math.sin(t),r}function uE(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function hE(t){for(var e=t.children,r=e.length,a=0,i=0;--r>=0;){var n=e[r];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function fE(t,e,r,a){if(e){for(var i=t,n=t,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,h=o.hierNode.modifier,f=s.hierNode.modifier;s=Nd(s),n=kd(n),s&&n;){i=Nd(i),o=kd(o),i.hierNode.ancestor=t;var c=s.hierNode.prelim+f-n.hierNode.prelim-u+a(s,n);c>0&&(vE(cE(s,t,r),t,c),u+=c,l+=c),f+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,h+=o.hierNode.modifier}s&&!Nd(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),n&&!kd(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-h,r=t)}return r}function Nd(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function kd(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function cE(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function vE(t,e,r){var a=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=a}function dE(t,e){return t.parentNode===e.parentNode?1:2}var gE=nr({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.childPoints,a=r.length,i=e.parentPoint,n=r[0],o=r[a-1];if(a===1){t.moveTo(i[0],i[1]),t.lineTo(n[0],n[1]);return}var s=e.orient,l=s==="TB"||s==="BT"?0:1,u=1-l,h=H(e.forkPosition,1),f=[];f[l]=i[l],f[u]=i[u]+(o[u]-i[u])*h,t.moveTo(i[0],i[1]),t.lineTo(f[0],f[1]),t.moveTo(n[0],n[1]),f[l]=n[l],t.lineTo(f[0],f[1]),f[l]=o[l],t.lineTo(f[0],f[1]),t.lineTo(o[0],o[1]);for(var c=1;c<a-1;c++){var v=r[c];t.moveTo(v[0],v[1]),f[l]=v[l],t.lineTo(f[0],f[1])}}});ke({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new q,this._controller=new Yn(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,r,a){var i=t.getData(),n=t.layoutInfo,o=this._mainGroup,s=t.get("layout");s==="radial"?o.attr("position",[n.x+n.width/2,n.y+n.height/2]):o.attr("position",[n.x,n.y]),this._updateViewCoordSys(t,n,s),this._updateController(t,e,r);var l=this._data,u={expandAndCollapse:t.get("expandAndCollapse"),layout:s,edgeShape:t.get("edgeShape"),edgeForkPosition:t.get("edgeForkPosition"),orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};i.diff(l).add(function(h){Fx(i,h)&&Ux(i,h,null,o,t,u)}).update(function(h,f){var c=l.getItemGraphicEl(f);if(!Fx(i,h)){c&&$x(l,f,c,o,t,u);return}Ux(i,h,c,o,t,u)}).remove(function(h){var f=l.getItemGraphicEl(h);f&&$x(l,h,f,o,t,u)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),u.expandAndCollapse===!0&&i.eachItemGraphicEl(function(h,f){h.off("click").on("click",function(){r.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},_updateViewCoordSys:function(t){var e=t.getData(),r=[];e.each(function(l){var u=e.getItemLayout(l);u&&!isNaN(u.x)&&!isNaN(u.y)&&r.push([+u.x,+u.y])});var a=[],i=[];Po(r,a,i);var n=this._min,o=this._max;i[0]-a[0]===0&&(a[0]=n?n[0]:a[0]-1,i[0]=o?o[0]:i[0]+1),i[1]-a[1]===0&&(a[1]=n?n[1]:a[1]-1,i[1]=o?o[1]:i[1]+1);var s=t.coordinateSystem=new Xa;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(a[0],a[1],i[0]-a[0],i[1]-a[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=a,this._max=i},_updateController:function(t,e,r){var a=this._controller,i=this._controllerHost,n=this.group;a.setPointerChecker(function(o,s,l){var u=n.getBoundingRect();return u.applyTransform(n.transform),u.contain(s,l)&&!Ku(o,r,t)}),a.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),a.off("pan").off("zoom").on("pan",function(o){Md(i,o.dx,o.dy),r.dispatchAction({seriesId:t.id,type:"treeRoam",dx:o.dx,dy:o.dy})},this).on("zoom",function(o){Id(i,o.scale,o.originX,o.originY),r.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:o.scale,originX:o.originX,originY:o.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),r=this._getNodeGlobalScale(t),a=[r,r];e.eachItemGraphicEl(function(i,n){i.attr("scale",a)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if(e.type!=="view")return 1;var r=this._nodeScaleRatio,a=e.scale,i=a&&a[0]||1,n=e.getZoom(),o=(n-1)*r+1;return o/i},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function Fx(t,e){var r=t.getItemLayout(e);return r&&!isNaN(r.x)&&!isNaN(r.y)&&t.getItemVisual(e,"symbol")!=="none"}function Wx(t,e,r){return r.itemModel=e,r.itemStyle=e.getModel("itemStyle").getItemStyle(),r.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),r.lineStyle=e.getModel("lineStyle").getLineStyle(),r.labelModel=e.getModel("label"),r.hoverLabelModel=e.getModel("emphasis.label"),t.isExpand===!1&&t.children.length!==0?r.symbolInnerColor=r.itemStyle.fill:r.symbolInnerColor="#fff",r}function Ux(t,e,r,a,i,u){var o=!r,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),u=Wx(s,l,u),h=t.tree.root,f=s.parentNode===h?s:s.parentNode||s,c=t.getItemGraphicEl(f.dataIndex),v=f.getLayout(),d=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:v,g=s.getLayout();o?(r=new Wa(t,e,u),r.attr("position",[d.x,d.y])):r.updateData(t,e,u),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=g.rawX,r.__radialRawY=g.rawY,a.add(r),t.setItemGraphicEl(e,r),ft(r,{position:[g.x,g.y]},i);var p=r.getSymbolPath();if(u.layout==="radial"){var m=h.children[0],y=m.getLayout(),_=m.children.length,w,b;if(g.x===y.x&&s.isExpand===!0){var A={};A.x=(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,A.y=(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2,w=Math.atan2(A.y-y.y,A.x-y.x),w<0&&(w=Math.PI*2+w),b=A.x<y.x,b&&(w=w-Math.PI)}else w=Math.atan2(g.y-y.y,g.x-y.x),w<0&&(w=Math.PI*2+w),s.children.length===0||s.children.length!==0&&s.isExpand===!1?(b=g.x<y.x,b&&(w=w-Math.PI)):(b=g.x>y.x,b||(w=w-Math.PI));var S=b?"left":"right",D=u.labelModel.get("rotate"),I=D*(Math.PI/180);p.setStyle({textPosition:u.labelModel.get("position")||S,textRotation:D==null?-w:I,textOrigin:"center",verticalAlign:"middle"})}pE(i,s,h,r,d,v,g,a,u)}function pE(t,e,r,a,i,n,o,s,l){var u=l.edgeShape,h=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(h||(h=a.__edge=new Xl({shape:zd(l,i,i),style:J({opacity:0,strokeNoScale:!0},l.lineStyle)})),ft(h,{shape:zd(l,n,o),style:{opacity:1}},t));else if(u==="polyline"){if(l.layout==="orthogonal"){if(e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var f=e.children,c=[],v=0;v<f.length;v++){var d=f[v].getLayout();c.push([d.x,d.y])}h||(h=a.__edge=new gE({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:J({opacity:0,strokeNoScale:!0},l.lineStyle)})),ft(h,{shape:{parentPoint:[o.x,o.y],childPoints:c},style:{opacity:1}},t)}}else if(T)throw new Error("The polyline edgeShape can only be used in orthogonal layout")}s.add(h)}function $x(t,e,r,a,i,u){for(var o=t.tree.getNodeByDataIndex(e),s=t.tree.root,l=o.getModel(),u=Wx(o,l,u),h=o.parentNode===s?o:o.parentNode||o,g=u.edgeShape,f;f=h.getLayout(),f==null;)h=h.parentNode===s?h:h.parentNode||h;ft(r,{position:[f.x+1,f.y+1]},i,function(){a.remove(r),t.setItemGraphicEl(e,null)}),r.fadeOut(null,{keepLabel:!0});var c=t.getItemGraphicEl(h.dataIndex),v=c.__edge,d=r.__edge||(h.isExpand===!1||h.children.length===1?v:void 0),g=u.edgeShape;d&&(g==="curve"?ft(d,{shape:zd(u,f,f),style:{opacity:0}},i,function(){a.remove(d)}):g==="polyline"&&u.layout==="orthogonal"&&ft(d,{shape:{parentPoint:[f.x,f.y],childPoints:[[f.x,f.y]]},style:{opacity:0}},i,function(){a.remove(d)}))}function zd(t,e,r){var a,i,n,o,s=t.orient,l,u,h,f;if(t.layout==="radial"){l=e.rawX,h=e.rawY,u=r.rawX,f=r.rawY;var c=Ds(l,h),v=Ds(l,h+(f-h)*t.curvature),d=Ds(u,f+(h-f)*t.curvature),g=Ds(u,f);return{x1:c.x,y1:c.y,x2:g.x,y2:g.y,cpx1:v.x,cpy1:v.y,cpx2:d.x,cpy2:d.y}}else l=e.x,h=e.y,u=r.x,f=r.y,(s==="LR"||s==="RL")&&(a=l+(u-l)*t.curvature,i=h,n=u+(l-u)*t.curvature,o=f),(s==="TB"||s==="BT")&&(a=l,i=h+(f-h)*t.curvature,n=u,o=f+(h-f)*t.curvature);return{x1:l,y1:h,x2:u,y2:f,cpx1:a,cpy1:i,cpx2:n,cpy2:o}}mt({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(r){var a=t.dataIndex,i=r.getData().tree,n=i.getNodeByDataIndex(a);n.isExpand=!n.isExpand})}),mt({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(r){var a=r.coordinateSystem,i=Pd(a,t);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})});function mE(t,e,r){for(var a=[t],i=[],n;n=a.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;n=i.pop();)e(n,r)}function Ms(t,e){for(var r=[t],a;a=r.pop();)if(e(a),a.isExpand){var i=a.children;if(i.length)for(var n=i.length-1;n>=0;n--)r.push(i[n])}}var yE=function(t,e){t.eachSeriesByType("tree",function(r){_E(r,e)})};function _E(t,e){var r=uE(t,e);t.layoutInfo=r;var a=t.get("layout"),i=0,n=0,o=null;a==="radial"?(i=2*Math.PI,n=Math.min(r.height,r.width)/2,o=Hx(function(_,w){return(_.parentNode===w.parentNode?1:2)/_.depth})):(i=r.width,n=r.height,o=Hx());var s=t.getData().tree.root,l=s.children[0];if(l){oE(s),mE(l,sE,o),s.hierNode.modifier=-l.hierNode.prelim,Ms(l,lE);var u=l,h=l,f=l;Ms(l,function(_){var w=_.getLayout().x;w<u.getLayout().x&&(u=_),w>h.getLayout().x&&(h=_),_.depth>f.depth&&(f=_)});var c=u===h?1:o(u,h)/2,v=c-u.getLayout().x,d=0,g=0,p=0,m=0;if(a==="radial")d=i/(h.getLayout().x+c+v),g=n/(f.depth-1||1),Ms(l,function(_){p=(_.getLayout().x+v)*d,m=(_.depth-1)*g;var w=Ds(p,m);_.setLayout({x:w.x,y:w.y,rawX:p,rawY:m},!0)});else{var y=t.getOrient();y==="RL"||y==="LR"?(g=n/(h.getLayout().x+c+v),d=i/(f.depth-1||1),Ms(l,function(_){m=(_.getLayout().x+v)*g,p=y==="LR"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:p,y:m},!0)})):(y==="TB"||y==="BT")&&(d=i/(h.getLayout().x+c+v),g=n/(f.depth-1||1),Ms(l,function(_){p=(_.getLayout().x+v)*d,m=y==="TB"?(_.depth-1)*g:n-(_.depth-1)*g,_.setLayout({x:p,y:m},!0)}))}}}Rt(Ii("tree","circle")),Gt(yE);function Is(t,e,r){if(t&&yt(e,t.type)>=0){var a=r.getData().tree.root,i=t.targetNode;if(typeof i=="string"&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=t.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function Zx(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function Bd(t,e){var r=Zx(t);return yt(r,e)>=0}function Vd(t,e){for(var r=[];t;){var a=t.dataIndex;r.push({name:t.name,dataIndex:a,value:e.getRawValue(a)}),t=t.parentNode}return r.reverse(),r}Vt.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,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)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var r={name:t.name,children:t.data};Yx(r);var a=t.levels||[];a=t.levels=xE(a,e);var i=V(a||[],function(s){return new _t(s,this,e)},this),n=Ei.createTree(r,this,null,o);function o(s){s.wrapMethod("getItemModel",function(l,u){var h=n.getNodeByDataIndex(u),f=i[h.depth];return f&&(l.parentModel=f),l})}return n.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),r=this.getRawValue(t),a=z(r)?ka(r[0]):ka(r),i=e.getName(t);return kt(i+": "+a)},getDataParams:function(t){var e=Vt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Vd(r,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},et(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ht(),this._idIndexMapCount=0);var r=e.get(t);return r==null&&e.set(t,r=this._idIndexMapCount++),r},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});function Yx(t){var e=0;M(t.children,function(a){Yx(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var r=t.value;z(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),z(t.value)?t.value[0]=r:t.value=r}function xE(t,e){var r=e.get("color");if(!!r){t=t||[];var a;if(M(t,function(n){var o=new _t(n),s=o.get("color");(o.get("itemStyle.color")||s&&s!=="none")&&(a=!0)}),!a){var i=t[0]||(t[0]={});i.color=r.slice()}return t}}var wE=8,Xx=8,Gd=5;function Hd(t){this.group=new q,t.add(this.group)}Hd.prototype={constructor:Hd,render:function(t,e,r,a){var i=t.getModel("breadcrumb"),n=this.group;if(n.removeAll(),!(!i.get("show")||!r)){var o=i.getModel("itemStyle"),s=o.getModel("textStyle"),l={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,l,s),this._renderContent(t,l,o,s,a),uu(n,l.pos,l.box)}},_prepare:function(t,e,r){for(var a=t;a;a=a.parentNode){var i=a.getModel().get("name"),n=r.getTextRect(i),o=Math.max(n.width+wE*2,e.emptyItemWidth);e.totalWidth+=o+Xx,e.renderList.push({node:a,text:i,width:o})}},_renderContent:function(t,e,r,a,i){for(var n=0,o=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=DM(e.pos,e.box),u=e.totalWidth,h=e.renderList,f=h.length-1;f>=0;f--){var c=h[f],v=c.node,d=c.width,g=c.text;u>l.width&&(u-=d-o,d=o,g=null);var p=new Ge({shape:{points:bE(n,0,d,s,f===h.length-1,f===0)},style:J(r.getItemStyle(),{lineJoin:"bevel",text:g,textFill:a.getTextColor(),textFont:a.getFont()}),z:10,onclick:ot(i,v)});this.group.add(p),SE(p,t,v),n+=d+Xx}},remove:function(){this.group.removeAll()}};function bE(t,e,r,a,i,n){var o=[[i?t:t-Gd,e],[t+r,e],[t+r,e+a],[i?t:t-Gd,e+a]];return!n&&o.splice(2,0,[t+r+Gd,e+a/2]),!i&&o.push([t,e+a/2]),o}function SE(t,e,r){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Vd(r,e)}}function AE(){var t=[],e={},r;return{add:function(a,i,n,o,s){return Lt(o)&&(s=o,o=0),e[a.id]?!1:(e[a.id]=1,t.push({el:a,target:i,time:n,delay:o,easing:s}),!0)},done:function(a){return r=a,this},start:function(){for(var a=t.length,i=0,n=t.length;i<n;i++){var o=t[i];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){a--,a||(t.length=0,e={},r&&r())}}}}var Ju=it,qx=q,Kx=xt,Yr=M,jx=3,TE=["label"],CE=["emphasis","label"],DE=["upperLabel"],ME=["emphasis","upperLabel"],IE=10,LE=1,PE=2,Fd=_n([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Qx=function(t){var e=Fd(t);return e.stroke=e.fill=e.lineWidth=null,e};ke({type:"treemap",init:function(t,e){this._containerGroup,this._storage=Ls(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,r,a){var i=e.findComponents({mainType:"series",subType:"treemap",query:a});if(!(yt(i,t)<0)){this.seriesModel=t,this.api=r,this.ecModel=e;var n=["treemapZoomToNode","treemapRootToNode"],o=Is(a,n,t),s=a&&a.type,l=t.layoutInfo,u=!this._oldTree,h=this._storage,f=s==="treemapRootToNode"&&o&&h?{rootNodeGroup:h.nodeGroup[o.node.getRawIndex()],direction:a.direction}:null,c=this._giveContainerGroup(l),v=this._doRender(c,t,f);!u&&(!s||s==="treemapZoomToNode"||s==="treemapRootToNode")?this._doAnimation(c,v,t,f):v.renderFinally(),this._resetController(r),this._renderBreadcrumb(t,r,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new qx,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,r){var a=e.getData().tree,i=this._oldTree,n=Ls(),o=Ls(),s=this._storage,l=[],u=ot(EE,e,o,s,r,n,l);f(a.root?[a.root]:[],i&&i.root?[i.root]:[],t,a===i||!i,0);var h=c(s);return this._oldTree=a,this._storage=o,{lastsForAnimation:n,willDeleteEls:h,renderFinally:v};function f(d,g,p,m,y){m?(g=d,Yr(d,function(b,A){!b.isRemoved()&&w(A,A)})):new ha(g,d,_,_).add(w).update(w).remove(ot(w,null)).execute();function _(b){return b.getId()}function w(b,A){var S=b!=null?d[b]:null,D=A!=null?g[A]:null,I=u(S,D,p,y);I&&f(S&&S.viewChildren||[],D&&D.viewChildren||[],I,m,y+1)}}function c(d){var g=Ls();return d&&Yr(d,function(p,m){var y=g[m];Yr(p,function(_){_&&(y.push(_),_.__tmWillDelete=1)})}),g}function v(){Yr(h,function(d){Yr(d,function(g){g.parent&&g.parent.remove(g)})}),Yr(l,function(d){d.invisible=!0,d.dirty()})}},_doAnimation:function(t,e,r,a){if(!!r.get("animation")){var i=r.get("animationDurationUpdate"),n=r.get("animationEasing"),o=AE();Yr(e.willDeleteEls,function(s,l){Yr(s,function(u,h){if(!u.invisible){var f=u.parent,c;if(a&&a.direction==="drillDown")c=f===a.rootNodeGroup?{shape:{x:0,y:0,width:f.__tmNodeWidth,height:f.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var v=0,d=0;f.__tmWillDelete||(v=f.__tmNodeWidth/2,d=f.__tmNodeHeight/2),c=l==="nodeGroup"?{position:[v,d],style:{opacity:0}}:{shape:{x:v,y:d,width:0,height:0},style:{opacity:0}}}c&&o.add(u,c,i,n)}})}),Yr(this._storage,function(s,l){Yr(s,function(u,h){var f=e.lastsForAnimation[l][h],c={};!f||(l==="nodeGroup"?f.old&&(c.position=u.position.slice(),u.attr("position",f.old)):(f.old&&(c.shape=et({},u.shape),u.setShape(f.old)),f.fadein?(u.setStyle("opacity",0),c.style={opacity:1}):u.style.opacity!==1&&(c.style={opacity:1})),o.add(u,c,i,n))})},this),this._state="animating",o.done(Ju(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new Yn(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",Ju(this._onPan,this)),e.on("zoom",Ju(this._onZoom,this)));var r=new vt(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(a,i,n){return r.contain(i,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>jx||Math.abs(t.dy)>jx)){var e=this.seriesModel.getData().tree.root;if(!e)return;var r=e.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}})}},_onZoom:function(t){var e=t.originX,r=t.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;var n=new vt(i.x,i.y,i.width,i.height),o=this.seriesModel.layoutInfo;e-=o.x,r-=o.y;var s=Ie();yr(s,s,[-e,-r]),wo(s,s,[t.scale,t.scale]),yr(s,s,[e,r]),n.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x,y:n.y,width:n.width,height:n.height}})}},_initEvents:function(t){t.on("click",function(e){if(this._state==="ready"){var r=this.seriesModel.get("nodeClick",!0);if(!!r){var a=this.findTarget(e.offsetX,e.offsetY);if(!!a){var i=a.node;if(i.getLayout().isLeafRoot)this._rootToNode(a);else if(r==="zoomToNode")this._zoomToNode(a);else if(r==="link"){var n=i.hostTree.data.getItemModel(i.dataIndex),o=n.get("link",!0),s=n.get("target",!0)||"blank";o&&Zo(o,s)}}}}},this)},_renderBreadcrumb:function(t,e,r){r||(r=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),r||(r={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Hd(this.group))).render(t,e,r.node,Ju(a,this));function a(i){this._state!=="animating"&&(Bd(t.getViewRoot(),i)?this._rootToNode({node:i}):this._zoomToNode({node:i}))}},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ls(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var r,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(i){var n=this._storage.background[i.getRawIndex()];if(n){var o=n.transformCoordToLocal(t,e),s=n.shape;if(s.x<=o[0]&&o[0]<=s.x+s.width&&s.y<=o[1]&&o[1]<=s.y+s.height)r={node:i,offsetX:o[0],offsetY:o[1]};else return!1}},this),r}});function Ls(){return{nodeGroup:[],background:[],content:[]}}function EE(t,e,r,a,i,n,o,s,l,u){if(!o)return;var h=o.getLayout(),f=t.getData();if(f.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var c=h.width,v=h.height,d=h.borderWidth,g=h.invisible,p=o.getRawIndex(),m=s&&s.getRawIndex(),y=o.viewChildren,_=h.upperHeight,w=y&&y.length,b=o.getModel("itemStyle"),A=o.getModel("emphasis.itemStyle"),S=$("nodeGroup",qx);if(!S)return;if(l.add(S),S.attr("position",[h.x||0,h.y||0]),S.__tmNodeWidth=c,S.__tmNodeHeight=v,h.isAboveViewRoot)return S;var D=o.getModel(),I=$("background",Kx,u,LE);if(I&&P(S,I,w&&h.upperLabelHeight),w)tu(S)&&mi(S,!1),I&&(mi(I,!0),f.setItemGraphicEl(o.dataIndex,I));else{var L=$("content",Kx,u,PE);L&&R(S,L),I&&tu(I)&&mi(I,!1),mi(S,!0),f.setItemGraphicEl(o.dataIndex,S)}return S;function P(Q,j,U){if(j.dataIndex=o.dataIndex,j.seriesIndex=t.seriesIndex,j.setShape({x:0,y:0,width:c,height:v}),g)E(j);else{j.invisible=!1;var tt=o.getVisual("borderColor",!0),ct=A.get("borderColor"),bt=Qx(b);bt.fill=tt;var Et=Fd(A);if(Et.fill=ct,U){var ie=c-2*d;Z(bt,Et,tt,ie,_,{x:d,y:0,width:ie,height:_})}else bt.text=Et.text=null;j.setStyle(bt),Vo(j,Et)}Q.add(j)}function R(Q,j){j.dataIndex=o.dataIndex,j.seriesIndex=t.seriesIndex;var U=Math.max(c-2*d,0),tt=Math.max(v-2*d,0);if(j.culling=!0,j.setShape({x:d,y:d,width:U,height:tt}),g)E(j);else{j.invisible=!1;var ct=o.getVisual("color",!0),bt=Qx(b);bt.fill=ct;var Et=Fd(A);Z(bt,Et,ct,U,tt),j.setStyle(bt),Vo(j,Et)}Q.add(j)}function E(Q){!Q.invisible&&n.push(Q)}function Z(Q,j,U,tt,ct,bt){var Et=D.get("name"),ie=D.getModel(bt?DE:TE),ol=D.getModel(bt?ME:CE),dr=ie.getShallow("show");Fe(Q,j,ie,ol,{defaultText:dr?Et:null,autoColor:U,isRectText:!0,labelFetcher:t,labelDataIndex:o.dataIndex,labelProp:bt?"upperLabel":"label"}),W(Q,bt,h),W(j,bt,h),bt&&(Q.textRect=rt(bt)),Q.truncate=dr&&ie.get("ellipsis")?{outerWidth:tt,outerHeight:ct,minChar:2}:null}function W(Q,j,U){var tt=Q.text;if(!j&&U.isLeafRoot&&tt!=null){var ct=t.get("drillDownIcon",!0);Q.text=ct?ct+" "+tt:tt}}function $(Q,j,U,tt){var ct=m!=null&&r[Q][m],bt=i[Q];return ct?(r[Q][m]=null,X(bt,ct,Q)):g||(ct=new j({z:RE(U,tt)}),ct.__tmDepth=U,ct.__tmStorageName=Q,K(bt,ct,Q)),e[Q][p]=ct}function X(Q,j,U){var tt=Q[p]={};tt.old=U==="nodeGroup"?j.position.slice():et({},j.shape)}function K(Q,j,U){var tt=Q[p]={},ct=o.parentNode;if(ct&&(!a||a.direction==="drillDown")){var bt=0,Et=0,ie=i.background[ct.getRawIndex()];!a&&ie&&ie.old&&(bt=ie.old.width,Et=ie.old.height),tt.old=U==="nodeGroup"?[0,Et]:{x:bt,y:Et,width:0,height:0}}tt.fadein=U!=="nodeGroup"}}function RE(t,e){var r=t*IE+e;return(r-1)/r}for(var OE=function(){},Jx=["treemapZoomToNode","treemapRender","treemapMove"],Wd=0;Wd<Jx.length;Wd++)mt({type:Jx[Wd],update:"updateView"},OE);mt({type:"treemapRootToNode",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},r);function r(a,i){var n=["treemapZoomToNode","treemapRootToNode"],o=Is(t,n,a);if(o){var s=a.getViewRoot();s&&(t.direction=Bd(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}});var Ps=M,tw=lt,th=-1,Mt=function(t){var e=t.mappingMethod,r=t.type,a=this.option=rt(t);this.type=r,this.mappingMethod=e,this._normalizeData=zE[e];var i=Es[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._doMap=i._doMap[e],e==="piecewise"?(Ud(a),NE(a)):e==="category"?a.categories?kE(a):Ud(a,!0):(gt(e!=="linear"||a.dataExtent),Ud(a))};Mt.prototype={constructor:Mt,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return it(this._normalizeData,this)}};var Es=Mt.visualHandlers={color:{applyVisual:rh("color"),getColorMapper:function(){var t=this.option;return it(t.mappingMethod==="category"?function(e,r){return!r&&(e=this._normalizeData(e)),ah.call(this,e)}:function(e,r,a){var i=!!a;return!r&&(e=this._normalizeData(e)),a=Ao(e,t.parsedVisual,a),i?a:ia(a,"rgba")},this)},_doMap:{linear:function(t){return ia(Ao(t,this.option.parsedVisual),"rgba")},category:ah,piecewise:function(t,e){var r=Zd.call(this,e);return r==null&&(r=ia(Ao(t,this.option.parsedVisual),"rgba")),r},fixed:Ri}},colorHue:eh(function(t,e){return gn(t,e)}),colorSaturation:eh(function(t,e){return gn(t,null,e)}),colorLightness:eh(function(t,e){return gn(t,null,null,e)}),colorAlpha:eh(function(t,e){return gl(t,e)}),opacity:{applyVisual:rh("opacity"),_doMap:$d([0,1])},liftZ:{applyVisual:rh("liftZ"),_doMap:{linear:Ri,category:Ri,piecewise:Ri,fixed:Ri}},symbol:{applyVisual:function(t,e,r){var a=this.mapValueToVisual(t);if(Lt(a))r("symbol",a);else if(tw(a))for(var i in a)a.hasOwnProperty(i)&&r(i,a[i])},_doMap:{linear:ew,category:ah,piecewise:function(t,e){var r=Zd.call(this,e);return r==null&&(r=ew.call(this,t)),r},fixed:Ri}},symbolSize:{applyVisual:rh("symbolSize"),_doMap:$d([0,1])}};function NE(t){var e=t.pieceList;t.hasSpecialVisual=!1,M(e,function(r,a){r.originIndex=a,r.visual!=null&&(t.hasSpecialVisual=!0)})}function kE(t){var e=t.categories,r=t.visual,a=t.categoryMap={};if(Ps(e,function(o,s){a[o]=s}),!z(r)){var i=[];lt(r)?Ps(r,function(o,s){var l=a[s];i[l??th]=o}):i[th]=r,r=rw(t,i)}for(var n=e.length-1;n>=0;n--)r[n]==null&&(delete a[e[n]],e.pop())}function Ud(t,e){var r=t.visual,a=[];lt(r)?Ps(r,function(n){a.push(n)}):r!=null&&a.push(r);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(t.type)&&(a[1]=a[0]),rw(t,a)}function eh(t){return{applyVisual:function(e,r,a){e=this.mapValueToVisual(e),a("color",t(r("color"),e))},_doMap:$d([0,1])}}function ew(t){var e=this.option.visual;return e[Math.round(Nt(t,[0,1],[0,e.length-1],!0))]||{}}function rh(t){return function(e,r,a){a(t,this.mapValueToVisual(e))}}function ah(t){var e=this.option.visual;return e[this.option.loop&&t!==th?t%e.length:t]}function Ri(){return this.option.visual[0]}function $d(t){return{linear:function(e){return Nt(e,t,this.option.visual,!0)},category:ah,piecewise:function(e,r){var a=Zd.call(this,r);return a==null&&(a=Nt(e,t,this.option.visual,!0)),a},fixed:Ri}}function Zd(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var a=Mt.findPieceIndex(t,r),i=r[a];if(i&&i.visual)return i.visual[this.type]}}function rw(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=V(e,function(r){return Ve(r)})),e}var zE={linear:function(t){return Nt(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=Mt.findPieceIndex(t,e,!0);if(r!=null)return Nt(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??th},fixed:ce};Mt.listVisualTypes=function(){var t=[];return M(Es,function(e,r){t.push(r)}),t},Mt.addVisualHandler=function(t,e){Es[t]=e},Mt.isValidType=function(t){return Es.hasOwnProperty(t)},Mt.eachVisual=function(t,e,r){lt(t)?M(t,e,r):e.call(r,t)},Mt.mapVisual=function(t,e,r){var a,i=z(t)?[]:lt(t)?{}:(a=!0,null);return Mt.eachVisual(t,function(n,o){var s=e.call(r,n,o);a?i=s:i[o]=s}),i},Mt.retrieveVisuals=function(t){var e={},r;return t&&Ps(Es,function(a,i){t.hasOwnProperty(i)&&(e[i]=t[i],r=!0)}),r?e:null},Mt.prepareVisualTypes=function(t){if(tw(t)){var e=[];Ps(t,function(r,a){e.push(a)}),t=e}else if(z(t))t=t.slice();else return[];return t.sort(function(r,a){return a==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),t},Mt.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},Mt.findPieceIndex=function(t,e,r){for(var a,i=1/0,n=0,o=e.length;n<o;n++){var s=e[n].value;if(s!=null){if(s===t||typeof s=="string"&&s===t+"")return n;r&&f(s,n)}}for(var n=0,o=e.length;n<o;n++){var l=e[n],u=l.interval,h=l.close;if(u){if(u[0]===-1/0){if(ih(h[1],t,u[1]))return n}else if(u[1]===1/0){if(ih(h[0],u[0],t))return n}else if(ih(h[0],u[0],t)&&ih(h[1],t,u[1]))return n;r&&f(u[0],n),r&&f(u[1],n)}}if(r)return t===1/0?e.length-1:t===-1/0?0:a;function f(c,v){var d=Math.abs(c-t);d<i&&(i=d,a=v)}};function ih(t,e,r){return t?e<=r:e<r}var BE=z,Yd="itemStyle",VE={seriesType:"treemap",reset:function(t,e,r,a){var i=t.getData().tree,n=i.root,o=t.getModel(Yd);if(!n.isRemoved()){var s=V(i.levelModels,function(l){return l?l.get(Yd):null});aw(n,{},s,o,t.getViewRoot().getAncestors(),t)}}};function aw(t,e,r,a,i,n){var o=t.getModel(),s=t.getLayout();if(!(!s||s.invisible||!s.isInView)){var l=t.getModel(Yd),u=r[t.depth],h=GE(l,e,u,a),f=l.get("borderColor"),c=l.get("borderColorSaturation"),v;c!=null&&(v=iw(h,t),f=HE(c,v)),t.setVisual("borderColor",f);var d=t.viewChildren;if(!d||!d.length)v=iw(h,t),t.setVisual("color",v);else{var g=FE(t,o,s,l,h,d);M(d,function(p,m){if(p.depth>=i.length||p===i[p.depth]){var y=WE(o,h,p,m,g,n);aw(p,y,r,a,i,n)}})}}}function GE(t,e,r,a){var i=et({},e);return M(["color","colorAlpha","colorSaturation"],function(n){var o=t.get(n,!0);o==null&&r&&(o=r[n]),o==null&&(o=e[n]),o==null&&(o=a.get(n)),o!=null&&(i[n]=o)}),i}function iw(t){var e=Xd(t,"color");if(e){var r=Xd(t,"colorAlpha"),a=Xd(t,"colorSaturation");return a&&(e=gn(e,null,null,a)),r&&(e=gl(e,r)),e}}function HE(t,e){return e!=null?gn(e,null,null,t):null}function Xd(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function FE(t,e,r,a,i,n){if(!(!n||!n.length)){var o=qd(e,"color")||i.color!=null&&i.color!=="none"&&(qd(e,"colorAlpha")||qd(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(h==="index"||h==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var c=new Mt(f);return c.__drColorMappingBy=h,c}}}function qd(t,e){var r=t.get(e);return BE(r)&&r.length?{name:e,range:r}:null}function WE(t,e,r,a,i,n){var o=et({},e);if(i){var s=i.type,l=s==="color"&&i.__drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Rs=Math.max,nh=Math.min,nw=Ut,Kd=M,ow=["itemStyle","borderWidth"],UE=["itemStyle","gapWidth"],$E=["upperLabel","show"],ZE=["upperLabel","height"],YE={seriesType:"treemap",reset:function(t,e,r,a){var i=r.getWidth(),n=r.getHeight(),o=t.option,s=qt(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=H(nw(s.width,l[0]),i),h=H(nw(s.height,l[1]),n),f=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],v=Is(a,c,t),d=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,g=t.getViewRoot(),p=Zx(g);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?JE(t,v,g,u,h):d?[d.width,d.height]:[u,h],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var w={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(w),sw(g,_,!1,0);var w=g.getLayout();Kd(p,function(A,S){var D=(p[S+1]||g).getValue();A.setLayout(et({dataExtent:[D,D],borderWidth:0,upperHeight:0},w))})}var b=t.getData().tree.root;b.setLayout(tR(s,d,v),!0),t.setLayoutInfo(s),uw(b,new vt(-s.x,-s.y,i,n),p,g,0)}};function sw(t,e,r,a){var i,n;if(!t.isRemoved()){var o=t.getLayout();i=o.width,n=o.height;var v=t.getModel(),s=v.get(ow),l=v.get(UE)/2,u=hw(v),h=Math.max(s,u),f=s-l,c=h-l,v=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0),i=Rs(i-2*f,0),n=Rs(n-f-c,0);var d=i*n,g=XE(t,v,d,e,r,a);if(!!g.length){var p={x:f,y:c,width:i,height:n},m=nh(i,n),y=1/0,_=[];_.area=0;for(var w=0,b=g.length;w<b;){var A=g[w];_.push(A),_.area+=A.getLayout().area;var S=QE(_,m,e.squareRatio);S<=y?(w++,y=S):(_.area-=_.pop().getLayout().area,lw(_,m,p,l,!1),m=nh(p.width,p.height),_.length=_.area=0,y=1/0)}if(_.length&&lw(_,m,p,l,!0),!r){var D=v.get("childrenVisibleMin");D!=null&&d<D&&(r=!0)}for(var w=0,b=g.length;w<b;w++)sw(g[w],e,r,a+1)}}}function XE(t,e,r,a,i,n){var o=t.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=n;if(i&&!l)return t.viewChildren=[];o=ee(o,function(v){return!v.isRemoved()}),KE(o,s);var u=jE(e,o,s);if(u.sum===0)return t.viewChildren=[];if(u.sum=qE(e,r,u.sum,s,o),u.sum===0)return t.viewChildren=[];for(var h=0,f=o.length;h<f;h++){var c=o[h].getValue()/u.sum*r;o[h].setLayout({area:c})}return l&&(o.length&&t.setLayout({isLeafRoot:!0},!0),o.length=0),t.viewChildren=o,t.setLayout({dataExtent:u.dataExtent},!0),o}function qE(t,e,r,a,i){if(!a)return r;for(var n=t.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/r*e<n&&(s=l,r-=u)}return a==="asc"?i.splice(0,o-s):i.splice(s,o-s),r}function KE(t,e){return e&&t.sort(function(r,a){var i=e==="asc"?r.getValue()-a.getValue():a.getValue()-r.getValue();return i===0?e==="asc"?r.dataIndex-a.dataIndex:a.dataIndex-r.dataIndex:i}),t}function jE(t,e,r){for(var a=0,i=0,n=e.length;i<n;i++)a+=e[i].getValue();var o=t.get("visualDimension"),s;if(!e||!e.length)s=[NaN,NaN];else if(o==="value"&&r)s=[e[e.length-1].getValue(),e[0].getValue()],r==="asc"&&s.reverse();else{var s=[1/0,-1/0];Kd(e,function(u){var h=u.getValue(o);h<s[0]&&(s[0]=h),h>s[1]&&(s[1]=h)})}return{sum:a,dataExtent:s}}function QE(t,e,r){for(var a=0,i=1/0,n=0,o,s=t.length;n<s;n++)o=t[n].getLayout().area,o&&(o<i&&(i=o),o>a&&(a=o));var l=t.area*t.area,u=e*e*r;return l?Rs(u*a/l,l/(u*i)):1/0}function lw(t,e,r,a,i){var n=e===r.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=r[s[n]],h=e?t.area/e:0;(i||h>r[l[o]])&&(h=r[l[o]]);for(var f=0,c=t.length;f<c;f++){var v=t[f],d={},g=h?v.getLayout().area/h:0,p=d[l[o]]=Rs(h-2*a,0),m=r[s[n]]+r[l[n]]-u,y=f===c-1||m<g?m:g,_=d[l[n]]=Rs(y-2*a,0);d[s[o]]=r[s[o]]+nh(a,p/2),d[s[n]]=u+nh(a,_/2),u+=y,v.setLayout(d,!0)}r[s[o]]+=h,r[l[o]]-=h}function JE(t,e,r,a,i){var n=(e||{}).node,o=[a,i];if(!n||n===r)return o;for(var s,l=a*i,u=l*t.option.zoomToNodeRatio;s=n.parentNode;){for(var h=0,f=s.children,c=0,v=f.length;c<v;c++)h+=f[c].getValue();var d=n.getValue();if(d===0)return o;u*=h/d;var g=s.getModel(),p=g.get(ow),m=Math.max(p,hw(g,p));u+=4*p*p+(3*p+m)*Math.pow(u,.5),u>Jc&&(u=Jc),n=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[a*y,i*y]}function tR(t,e,r){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!r)return a;var i=r.node,n=i.getLayout();if(!n)return a;for(var o=[n.width/2,n.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}function uw(t,e,r,a,i){var n=t.getLayout(),o=r[i],s=o&&o===t;if(!(o&&!s||i===r.length&&t!==a)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(n),isAboveViewRoot:s},!0);var l=new vt(e.x-n.x,e.y-n.y,e.width,e.height);Kd(t.viewChildren||[],function(u){uw(u,l,r,a,i+1)})}}function hw(t){return t.get($E)?t.get(ZE):0}Rt(VE),Gt(YE);function qn(t){return"_EC_"+t}var Os=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},qe=Os.prototype;qe.type="graph",qe.isDirected=function(){return this._directed},qe.addNode=function(t,e){t=t==null?""+e:""+t;var r=this._nodesMap;if(r[qn(t)]){T&&console.error("Graph nodes have duplicate name or id");return}var a=new Mr(t,e);return a.hostGraph=this,this.nodes.push(a),r[qn(t)]=a,a},qe.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},qe.getNodeById=function(t){return this._nodesMap[qn(t)]},qe.addEdge=function(t,e,r){var a=this._nodesMap,i=this._edgesMap;if(typeof t=="number"&&(t=this.nodes[t]),typeof e=="number"&&(e=this.nodes[e]),Mr.isInstance(t)||(t=a[qn(t)]),Mr.isInstance(e)||(e=a[qn(e)]),!(!t||!e)){var n=t.id+"-"+e.id;if(!i[n]){var o=new Ns(t,e,r);return o.hostGraph=this,this._directed&&(t.outEdges.push(o),e.inEdges.push(o)),t.edges.push(o),t!==e&&e.edges.push(o),this.edges.push(o),i[n]=o,o}}},qe.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},qe.getEdge=function(t,e){Mr.isInstance(t)&&(t=t.id),Mr.isInstance(e)&&(e=e.id);var r=this._edgesMap;return this._directed?r[t+"-"+e]:r[t+"-"+e]||r[e+"-"+t]},qe.eachNode=function(t,e){for(var r=this.nodes,a=r.length,i=0;i<a;i++)r[i].dataIndex>=0&&t.call(e,r[i],i)},qe.eachEdge=function(t,e){for(var r=this.edges,a=r.length,i=0;i<a;i++)r[i].dataIndex>=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&t.call(e,r[i],i)},qe.breadthFirstTraverse=function(t,e,r,a){if(Mr.isInstance(e)||(e=this._nodesMap[qn(e)]),!!e){for(var i=r==="out"?"outEdges":r==="in"?"inEdges":"edges",n=0;n<this.nodes.length;n++)this.nodes[n].__visited=!1;if(!t.call(a,e,null))for(var o=[e];o.length;)for(var s=o.shift(),l=s[i],n=0;n<l.length;n++){var u=l[n],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(a,h,s))return;o.push(h),h.__visited=!0}}}},qe.update=function(){for(var t=this.data,e=this.edgeData,r=this.nodes,a=this.edges,i=0,n=r.length;i<n;i++)r[i].dataIndex=-1;for(var i=0,n=t.count();i<n;i++)r[t.getRawIndex(i)].dataIndex=i;e.filterSelf(function(o){var s=a[e.getRawIndex(o)];return s.node1.dataIndex>=0&&s.node2.dataIndex>=0});for(var i=0,n=a.length;i<n;i++)a[i].dataIndex=-1;for(var i=0,n=e.count();i<n;i++)a[e.getRawIndex(i)].dataIndex=i},qe.clone=function(){for(var t=new Os(this._directed),e=this.nodes,r=this.edges,a=0;a<e.length;a++)t.addNode(e[a].id,e[a].dataIndex);for(var a=0;a<r.length;a++){var i=r[a];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t};function Mr(t,e){this.id=t??"",this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=e??-1}Mr.prototype={constructor:Mr,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,r=e.data.getItemModel(this.dataIndex);return r.getModel(t)}}};function Ns(t,e,r){this.node1=t,this.node2=e,this.dataIndex=r??-1}Ns.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,r=e.edgeData.getItemModel(this.dataIndex);return r.getModel(t)}};var fw=function(t,e){return{getValue:function(r){var a=this[t][e];return a.get(a.getDimension(r||"value"),this.dataIndex)},setVisual:function(r,a){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,a)},getVisual:function(r,a){return this[t][e].getItemVisual(this.dataIndex,r,a)},setLayout:function(r,a){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,a)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};Dt(Mr,fw("hostGraph","data")),Dt(Ns,fw("hostGraph","edgeData")),Os.Node=Mr,Os.Edge=Ns,Nl(Mr),Nl(Ns);var cw=function(t,e,r,a,i){for(var n=new Os(a),o=0;o<t.length;o++)n.addNode(Ut(t[o].id,t[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var h=e[o],f=h.source,c=h.target;n.addEdge(f,c,u)&&(l.push(h),s.push(Ut(h.id,f+" > "+c)),u++)}var v=r.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=ca(t,r);else{var g=_e.get(v),p=g&&g.type!=="view"?g.dimensions||[]:[];yt(p,"value")<0&&p.concat(["value"]);var m=En(t,{coordDimensions:p});d=new fe(m,r),d.initData(t)}var y=new fe(["value"],r);return y.initData(l,s),i&&i(d,y),Vx({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n},ks=Mu({type:"series.graph",init:function(t){ks.superApply(this,"init",arguments);var e=this;function r(){return e._categoriesData}this.legendVisualProvider=new ws(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){ks.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){ks.superApply(this,"mergeDefaultAndTheme",arguments),fi(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var r=t.edges||t.links||[],a=t.data||t.nodes||[],i=this;if(a&&r)return cw(a,r,this,!0,n).data;function n(o,s){o.wrapMethod("getItemModel",function(v){var d=i._categoriesModels,g=v.getShallow("category"),p=d[g];return p&&(p.parentModel=v.parentModel,v.parentModel=p),v});var l=i.getModel("edgeLabel"),u=new _t({label:l.option},l.parentModel,e),h=i.getModel("emphasis.edgeLabel"),f=new _t({emphasis:{label:h.option}},h.parentModel,e);s.wrapMethod("getItemModel",function(v){return v.customizeGetParent(c),v});function c(v){return v=this.parsePath(v),v&&v[0]==="label"?u:v&&v[0]==="emphasis"&&v[1]==="label"?f:this.parentModel}}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,r){if(r==="edge"){var a=this.getData(),i=this.getDataParams(t,r),n=a.graph.getEdgeByIndex(t),o=a.getName(n.node1.dataIndex),s=a.getName(n.node2.dataIndex),l=[];return o!=null&&l.push(o),s!=null&&l.push(s),l=kt(l.join(" > ")),i.value&&(l+=" : "+kt(i.value)),l}else return ks.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=V(this.option.categories||[],function(r){return r.value!=null?r:et({value:0},r)}),e=new fe(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(r){return e.getItemModel(r,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return ks.superCall(this,"isAnimationEnabled")&&!(this.get("layout")==="force"&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,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,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),vw=ye.prototype,jd=Xl.prototype;function Qd(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var eR=nr({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Qd(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:vw.buildPath,_buildPathCurve:jd.buildPath,pointAt:function(t){return this[Qd(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:vw.pointAt,_pointAtCurve:jd.pointAt,tangentAt:function(t){var e=this.shape,r=Qd(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return ln(r,r)},_tangentAtCurve:jd.tangentAt}),Jd=["fromSymbol","toSymbol"];function dw(t){return"_"+t+"Type"}function gw(t,e,r){var a=e.getItemVisual(r,"color"),i=e.getItemVisual(r,t),n=e.getItemVisual(r,t+"Size");if(!(!i||i==="none")){z(n)||(n=[n,n]);var o=Ye(i,-n[0]/2,-n[1]/2,n[0],n[1],a);return o.name=t,o}}function rR(t){var e=new eR({name:"line",subPixelOptimize:!0});return tg(e.shape,t),e}function tg(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var r=e[2];r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=NaN,t.cpy1=NaN)}function aR(){var t=this,e=t.childOfName("fromSymbol"),r=t.childOfName("toSymbol"),a=t.childOfName("label");if(!(!e&&!r&&a.ignore)){for(var i=1,n=this.parent;n;)n.scale&&(i/=n.scale[0]),n=n.parent;var o=t.childOfName("line");if(!(!this.__dirty&&!o.__dirty)){var s=o.shape.percent,l=o.pointAt(0),u=o.pointAt(s),h=Jr([],u,l);if(ln(h,h),e){e.attr("position",l);var f=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(f[1],f[0])),e.attr("scale",[i*s,i*s])}if(r){r.attr("position",u);var f=o.tangentAt(1);r.attr("rotation",-Math.PI/2-Math.atan2(f[1],f[0])),r.attr("scale",[i*s,i*s])}if(!a.ignore){a.attr("position",u);var c,v,d,g,p=a.__labelDistance,m=p[0]*i,y=p[1]*i,_=s/2,f=o.tangentAt(_),w=[f[1],-f[0]],b=o.pointAt(_);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var A=f[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var S=-Math.atan2(f[1],f[0]);u[0]<l[0]&&(S=Math.PI+S),a.attr("rotation",S)}var D;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":D=-y,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":D=y,d="top";break;default:D=0,d="middle"}switch(a.__position){case"end":c=[h[0]*m+u[0],h[1]*y+u[1]],v=h[0]>.8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":c=[-h[0]*m+l[0],-h[1]*y+l[1]],v=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":c=[m*A+l[0],l[1]+D],v=f[0]<0?"right":"left",g=[-m*A,-D];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[b[0],b[1]+D],v="center",g=[0,-D];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*A+u[0],u[1]+D],v=f[0]>=0?"right":"left",g=[m*A,-D];break}a.attr({style:{textVerticalAlign:a.__verticalAlign||d,textAlign:a.__textAlign||v},position:c,scale:[i,i],origin:g})}}}}function zs(t,e,r){q.call(this),this._createLine(t,e,r)}var qa=zs.prototype;qa.beforeUpdate=aR,qa._createLine=function(t,e,r){var a=t.hostModel,i=t.getItemLayout(e),n=rR(i);n.shape.percent=0,Se(n,{shape:{percent:1}},a,e),this.add(n);var o=new dt({name:"label",lineLabelOriginalOpacity:1});this.add(o),M(Jd,function(s){var l=gw(s,t,e);this.add(l),this[dw(s)]=t.getItemVisual(e,s)},this),this._updateCommonStl(t,e,r)},qa.updateData=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=t.getItemLayout(e),o={shape:{}};tg(o.shape,n),ft(i,o,a,e),M(Jd,function(s){var l=t.getItemVisual(e,s),u=dw(s);if(this[u]!==l){this.remove(this.childOfName(s));var h=gw(s,t,e);this.add(h)}this[u]=l},this),this._updateCommonStl(t,e,r)},qa._updateCommonStl=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=r&&r.lineStyle,o=r&&r.hoverLineStyle,s=r&&r.labelModel,l=r&&r.hoverLabelModel;if(!r||t.hasItemOption){var u=t.getItemModel(e);n=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),f=ni(t.getItemVisual(e,"opacity"),n.opacity,1);i.useStyle(J({strokeNoScale:!0,fill:"none",stroke:h,opacity:f},n)),i.hoverStyle=o,M(Jd,function(A){var S=this.childOfName(A);S&&(S.setColor(h),S.setStyle({opacity:f}))},this);var c=s.getShallow("show"),v=l.getShallow("show"),d=this.childOfName("label"),g,p;if((c||v)&&(g=h||"#000",p=a.getFormattedLabel(e,"normal",t.dataType),p==null)){var m=a.getRawValue(e);p=m==null?t.getName(e):isFinite(m)?re(m):m}var y=c?p:null,_=v?Xt(a.getFormattedLabel(e,"emphasis",t.dataType),p):null,w=d.style;if(y!=null||_!=null){$t(d.style,s,{text:y},{autoColor:g}),d.__textAlign=w.textAlign,d.__verticalAlign=w.textVerticalAlign,d.__position=s.get("position")||"middle";var b=s.get("distance");z(b)||(b=[b,b]),d.__labelDistance=b}_!=null?d.hoverStyle={text:_,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:d.hoverStyle={text:null},d.ignore=!c&&!v,Ot(this)},qa.highlight=function(){this.trigger("emphasis")},qa.downplay=function(){this.trigger("normal")},qa.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},qa.setLinePoints=function(t){var e=this.childOfName("line");tg(e.shape,t),e.dirty()},It(zs,q);function oh(t){this._ctor=t||zs,this.group=new q}var Oi=oh.prototype;Oi.isPersistent=function(){return!0},Oi.updateData=function(t){var e=this,r=e.group,a=e._lineData;e._lineData=t,a||r.removeAll();var i=pw(t);t.diff(a).add(function(n){iR(e,t,n,i)}).update(function(n,o){nR(e,a,t,o,n,i)}).remove(function(n){r.remove(a.getItemGraphicEl(n))}).execute()};function iR(t,e,r,a){var i=e.getItemLayout(r);if(!!eg(i)){var n=new t._ctor(e,r,a);e.setItemGraphicEl(r,n),t.group.add(n)}}function nR(t,e,r,a,i,n){var o=e.getItemGraphicEl(a);if(!eg(r.getItemLayout(i))){t.group.remove(o);return}o?o.updateData(r,i,n):o=new t._ctor(r,i,n),r.setItemGraphicEl(i,o),t.group.add(o)}Oi.updateLayout=function(){var t=this._lineData;!t||t.eachItemGraphicEl(function(e,r){e.updateLayout(t,r)},this)},Oi.incrementalPrepareUpdate=function(t){this._seriesScope=pw(t),this._lineData=null,this.group.removeAll()};function oR(t){return t.animators&&t.animators.length>0}Oi.incrementalUpdate=function(t,e){function r(o){!o.isGroup&&!oR(o)&&(o.incremental=o.useHoverLayer=!0)}for(var a=t.start;a<t.end;a++){var i=e.getItemLayout(a);if(eg(i)){var n=new this._ctor(e,a,this._seriesScope);n.traverse(r),this.group.add(n),e.setItemGraphicEl(a,n)}}};function pw(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}Oi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Oi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};function mw(t){return isNaN(t[0])||isNaN(t[1])}function eg(t){return!mw(t[0])&&!mw(t[1])}function Bs(t){var e=t.coordinateSystem;if(e.type!=="view")return 1;var r=t.option.nodeScaleRatio,a=e.scale,i=a&&a[0]||1,n=e.getZoom(),o=(n-1)*r+1;return o/i}function Vs(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var rg=[],ag=[],ig=[],Kn=be,ng=ba,yw=Math.abs;function _w(t,e,r){for(var a=t[0],i=t[1],n=t[2],o=1/0,s,l=r*r,u=.1,h=.1;h<=.9;h+=.1){rg[0]=Kn(a[0],i[0],n[0],h),rg[1]=Kn(a[1],i[1],n[1],h);var f=yw(ng(rg,e)-l);f<o&&(o=f,s=h)}for(var c=0;c<32;c++){var v=s+u;ag[0]=Kn(a[0],i[0],n[0],s),ag[1]=Kn(a[1],i[1],n[1],s),ig[0]=Kn(a[0],i[0],n[0],v),ig[1]=Kn(a[1],i[1],n[1],v);var f=ng(ag,e)-l;if(yw(f)<.01)break;var d=ng(ig,e)-l;u/=2,f<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}var og=function(t,e){var r=[],a=Oc,i=[[],[],[]],n=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[mr(u[0]),mr(u[1])],u[2]&&u.__original.push(mr(u[2])));var c=u.__original;if(u[2]!=null){if(ge(i[0],c[0]),ge(i[1],c[2]),ge(i[2],c[1]),h&&h!=="none"){var v=Vs(s.node1),d=_w(i,c[0],v*e);a(i[0][0],i[1][0],i[2][0],d,r),i[0][0]=r[3],i[1][0]=r[4],a(i[0][1],i[1][1],i[2][1],d,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var v=Vs(s.node2),d=_w(i,c[1],v*e);a(i[0][0],i[1][0],i[2][0],d,r),i[1][0]=r[1],i[2][0]=r[2],a(i[0][1],i[1][1],i[2][1],d,r),i[1][1]=r[1],i[2][1]=r[2]}ge(u[0],i[0]),ge(u[1],i[2]),ge(u[2],i[1])}else{if(ge(n[0],c[0]),ge(n[1],c[1]),Jr(o,n[1],n[0]),ln(o,o),h&&h!=="none"){var v=Vs(s.node1);mo(n[0],n[0],o,v*e)}if(f&&f!=="none"){var v=Vs(s.node2);mo(n[1],n[1],o,-v*e)}ge(u[0],n[0]),ge(u[1],n[1])}})},jn="__focusNodeAdjacency",Qn="__unfocusNodeAdjacency",Ni=["itemStyle","opacity"],sh=["lineStyle","opacity"];function xw(t,e){var r=t.getVisual("opacity");return r??t.getModel().get(e)}function lh(t,e,r){var a=t.getGraphicEl(),i=xw(t,e);r!=null&&(i==null&&(i=1),i*=r),a.downplay&&a.downplay(),a.traverse(function(n){if(!n.isGroup){var o=n.lineLabelOriginalOpacity;(o==null||r!=null)&&(o=i),n.setStyle("opacity",o)}})}function ki(t,e){var r=xw(t,e),a=t.getGraphicEl();a.traverse(function(i){!i.isGroup&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}ke({type:"graph",init:function(t,e){var r=new Bn,a=new oh,i=this.group;this._controller=new Yn(e.getZr()),this._controllerHost={target:i},i.add(r.group),i.add(a.group),this._symbolDraw=r,this._lineDraw=a,this._firstRender=!0},render:function(t,e,r){var a=this,i=t.coordinateSystem;this._model=t;var n=this._symbolDraw,o=this._lineDraw,s=this.group;if(i.type==="view"){var l={position:i.position,scale:i.scale};this._firstRender?s.attr(l):ft(s,l,t)}og(t.getGraph(),Bs(t));var u=t.getData();n.updateData(u);var h=t.getEdgeData();o.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,r),clearTimeout(this._layoutTimeout);var f=t.forceLayout,c=t.get("force.layoutAnimation");f&&this._startForceLayoutIteration(f,c),u.eachItemGraphicEl(function(p,m){var y=u.getItemModel(m);p.off("drag").off("dragend");var _=y.get("draggable");_&&p.on("drag",function(){f&&(f.warmUp(),!this._layouting&&this._startForceLayoutIteration(f,c),f.setFixed(m),u.setItemLayout(m,p.position))},this).on("dragend",function(){f&&f.setUnfixed(m)},this),p.setDraggable(_&&f),p[jn]&&p.off("mouseover",p[jn]),p[Qn]&&p.off("mouseout",p[Qn]),y.get("focusNodeAdjacency")&&(p.on("mouseover",p[jn]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:p.dataIndex})}),p.on("mouseout",p[Qn]=function(){a._dispatchUnfocus(r)}))},this),u.graph.eachEdge(function(p){var m=p.getGraphicEl();m[jn]&&m.off("mouseover",m[jn]),m[Qn]&&m.off("mouseout",m[Qn]),p.getModel().get("focusNodeAdjacency")&&(m.on("mouseover",m[jn]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:p.dataIndex})}),m.on("mouseout",m[Qn]=function(){a._dispatchUnfocus(r)}))});var v=t.get("layout")==="circular"&&t.get("circular.rotateLabel"),d=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(p,m){var y=u.getItemModel(m),_=y.get("label.rotate")||0,w=p.getSymbolPath();if(v){var b=u.getItemLayout(m),A=Math.atan2(b[1]-g,b[0]-d);A<0&&(A=Math.PI*2+A);var S=b[0]<d;S&&(A=A-Math.PI);var D=S?"left":"right";Yc(w,{textRotation:-A,textPosition:D,textOrigin:"center"},{textPosition:D})}else Yc(w,{textRotation:_*=Math.PI/180})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var r=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){r._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:r._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,r,a){var i=t.getData(),n=i.graph,o=a.dataIndex,s=a.edgeDataIndex,l=n.getNodeByIndex(o),u=n.getEdgeByIndex(s);!l&&!u||(n.eachNode(function(h){lh(h,Ni,.1)}),n.eachEdge(function(h){lh(h,sh,.1)}),l&&(ki(l,Ni),M(l.edges,function(h){h.dataIndex<0||(ki(h,sh),ki(h.node1,Ni),ki(h.node2,Ni))})),u&&(ki(u,sh),ki(u.node1,Ni),ki(u.node2,Ni)))},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getData().graph;i.eachNode(function(n){lh(n,Ni)}),i.eachEdge(function(n){lh(n,sh)})},_startForceLayoutIteration:function(t,e){var r=this;(function a(){t.step(function(i){r.updateLayout(r._model),(r._layouting=!i)&&(e?r._layoutTimeout=setTimeout(a,16):a())})})()},_updateController:function(t,e,r){var a=this._controller,i=this._controllerHost,n=this.group;if(a.setPointerChecker(function(o,s,l){var u=n.getBoundingRect();return u.applyTransform(n.transform),u.contain(s,l)&&!Ku(o,r,t)}),t.coordinateSystem.type!=="view"){a.disable();return}a.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),a.off("pan").off("zoom").on("pan",function(o){Md(i,o.dx,o.dy),r.dispatchAction({seriesId:t.id,type:"graphRoam",dx:o.dx,dy:o.dy})}).on("zoom",function(o){Id(i,o.scale,o.originX,o.originY),r.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:o.scale,originX:o.originX,originY:o.originY}),this._updateNodeAndLinkScale(),og(t.getGraph(),Bs(t)),this._lineDraw.updateLayout()},this)},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),r=Bs(t),a=[r,r];e.eachItemGraphicEl(function(i,n){i.attr("scale",a)})},updateLayout:function(t){og(t.getGraph(),Bs(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),mt({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),mt({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});var sR={type:"graphRoam",event:"graphRoam",update:"none"};mt(sR,function(t,e){e.eachComponent({mainType:"series",query:t},function(r){var a=r.coordinateSystem,i=Pd(a,t);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})});var lR=function(t){var e=t.findComponents({mainType:"legend"});!e||!e.length||t.eachSeriesByType("graph",function(r){var a=r.getCategoriesData(),i=r.getGraph(),n=i.data,o=a.mapArray(a.getName);n.filterSelf(function(s){var l=n.getItemModel(s),u=l.getShallow("category");if(u!=null){typeof u=="number"&&(u=o[u]);for(var h=0;h<e.length;h++)if(!e[h].isSelected(u))return!1}return!0})},this)},uR=function(t){var e={};t.eachSeriesByType("graph",function(r){var a=r.getCategoriesData(),i=r.getData(),n={};a.each(function(o){var s=a.getName(o);n["ec-"+s]=o;var l=a.getItemModel(o),u=l.get("itemStyle.color")||r.getColorFromPalette(s,e);a.setItemVisual(o,"color",u);for(var h=["opacity","symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++){var c=l.getShallow(h[f],!0);c!=null&&a.setItemVisual(o,h[f],c)}}),a.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){typeof l=="string"&&(l=n["ec-"+l]);for(var u=["color","opacity","symbol","symbolSize","symbolKeepAspect"],h=0;h<u.length;h++)i.getItemVisual(o,u[h],!0)==null&&i.setItemVisual(o,u[h],a.getItemVisual(l,u[h]))}})})};function uh(t){return t instanceof Array||(t=[t,t]),t}var hR=function(t){t.eachSeriesByType("graph",function(e){var r=e.getGraph(),a=e.getEdgeData(),i=uh(e.get("edgeSymbol")),n=uh(e.get("edgeSymbolSize")),o="lineStyle.color".split("."),s="lineStyle.opacity".split(".");a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),a.setVisual("color",e.get(o)),a.setVisual("opacity",e.get(s)),a.each(function(l){var u=a.getItemModel(l),h=r.getEdgeByIndex(l),f=uh(u.getShallow("symbol",!0)),c=uh(u.getShallow("symbolSize",!0)),v=u.get(o),d=u.get(s);switch(v){case"source":v=h.node1.getVisual("color");break;case"target":v=h.node2.getVisual("color");break}f[0]&&h.setVisual("fromSymbol",f[0]),f[1]&&h.setVisual("toSymbol",f[1]),c[0]&&h.setVisual("fromSymbolSize",c[0]),c[1]&&h.setVisual("toSymbolSize",c[1]),h.setVisual("color",v),h.setVisual("opacity",d)})})};function ww(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view")){var r=t.getGraph();r.eachNode(function(a){var i=a.getModel();a.setLayout([+i.get("x"),+i.get("y")])}),bw(r)}}function bw(t){t.eachEdge(function(e){var r=e.getModel().get("lineStyle.curveness")||0,a=mr(e.node1.getLayout()),i=mr(e.node2.getLayout()),n=[a,i];+r&&n.push([(a[0]+i[0])/2-(a[1]-i[1])*r,(a[1]+i[1])/2-(i[0]-a[0])*r]),e.setLayout(n)})}var fR=function(t,e){t.eachSeriesByType("graph",function(r){var a=r.get("layout"),i=r.coordinateSystem;if(i&&i.type!=="view"){var n=r.getData(),o=[];M(i.dimensions,function(c){o=o.concat(n.mapDimension(c,!0))});for(var s=0;s<n.count();s++){for(var l=[],u=!1,h=0;h<o.length;h++){var f=n.get(o[h],s);isNaN(f)||(u=!0),l.push(f)}u?n.setItemLayout(s,i.dataToPoint(l)):n.setItemLayout(s,[NaN,NaN])}bw(n.graph)}else(!a||a==="none")&&ww(r)})},Sw=Math.PI,sg=[];function Aw(t,e){var r=t.coordinateSystem;if(!(r&&r.type!=="view")){var a=r.getBoundingRect(),i=t.getData(),n=i.graph,o=a.width/2+a.x,s=a.height/2+a.y,l=Math.min(a.width,a.height)/2,u=i.count();i.setLayout({cx:o,cy:s}),u&&(cR[e](t,r,n,i,l,o,s,u),n.eachEdge(function(h){var f=h.getModel().get("lineStyle.curveness")||0,c=mr(h.node1.getLayout()),v=mr(h.node2.getLayout()),d,g=(c[0]+v[0])/2,p=(c[1]+v[1])/2;+f&&(f*=3,d=[o*f+g*(1-f),s*f+p*(1-f)]),h.setLayout([c,v,d])}))}}var cR={value:function(t,e,r,a,i,n,o,s){var l=0,u=a.getSum("value"),h=Math.PI*2/(u||s);r.eachNode(function(f){var c=f.getValue("value"),v=h*(u?c:1)/2;l+=v,f.setLayout([i*Math.cos(l)+n,i*Math.sin(l)+o]),l+=v})},symbolSize:function(t,e,r,a,i,n,o,s){var l=0;sg.length=s;var u=Bs(t);r.eachNode(function(c){var v=Vs(c);isNaN(v)&&(v=2),v<0&&(v=0),v*=u;var d=Math.asin(v/2/i);isNaN(d)&&(d=Sw/2),sg[c.dataIndex]=d,l+=d*2});var h=(2*Sw-l)/s/2,f=0;r.eachNode(function(c){var v=h+sg[c.dataIndex];f+=v,c.setLayout([i*Math.cos(f)+n,i*Math.sin(f)+o]),f+=v})}},vR=function(t){t.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&Aw(e,"symbolSize")})},Jn=mo;function dR(t,e,r){for(var a=r.rect,i=a.width,n=a.height,o=[a.x+i/2,a.y+n/2],s=r.gravity==null?.1:r.gravity,l=0;l<t.length;l++){var u=t[l];u.p||(u.p=wa(i*(Math.random()-.5)+o[0],n*(Math.random()-.5)+o[1])),u.pp=mr(u.p),u.edges=null}var h=r.friction==null?.6:r.friction,f=h;return{warmUp:function(){f=h*.8},setFixed:function(c){t[c].fixed=!0},setUnfixed:function(c){t[c].fixed=!1},step:function(c){for(var v=[],d=t.length,g=0;g<e.length;g++){var p=e[g];if(!p.ignoreForceLayout){var m=p.n1,y=p.n2;Jr(v,y.p,m.p);var _=yo(v)-p.d,w=y.w/(m.w+y.w);isNaN(w)&&(w=0),ln(v,v),!m.fixed&&Jn(m.p,m.p,v,w*_*f),!y.fixed&&Jn(y.p,y.p,v,-(1-w)*_*f)}}for(var g=0;g<d;g++){var b=t[g];b.fixed||(Jr(v,o,b.p),Jn(b.p,b.p,v,s*f))}for(var g=0;g<d;g++)for(var m=t[g],A=g+1;A<d;A++){var y=t[A];Jr(v,y.p,m.p);var _=yo(v);_===0&&(um(v,Math.random()-.5,Math.random()-.5),_=1);var S=(m.rep+y.rep)/_/_;!m.fixed&&Jn(m.pp,m.pp,v,S),!y.fixed&&Jn(y.pp,y.pp,v,-S)}for(var D=[],g=0;g<d;g++){var b=t[g];b.fixed||(Jr(D,b.p,b.pp),Jn(b.p,b.p,D,f),ge(b.pp,b.p))}f=f*.992,c&&c(t,e,f<.01)}}}var gR=function(t){t.eachSeriesByType("graph",function(e){var r=e.coordinateSystem;if(!(r&&r.type!=="view"))if(e.get("layout")==="force"){var a=e.preservedPoints||{},i=e.getGraph(),n=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?n.each(function(_){var w=n.getId(_);n.setItemLayout(_,a[w]||[NaN,NaN])}):!l||l==="none"?ww(e):l==="circular"&&Aw(e,"value");var u=n.getDataExtent("value"),h=o.getDataExtent("value"),f=s.get("repulsion"),c=s.get("edgeLength");z(f)||(f=[f,f]),z(c)||(c=[c,c]),c=[c[1],c[0]];var v=n.mapArray("value",function(_,w){var b=n.getItemLayout(w),A=Nt(_,u,f);return isNaN(A)&&(A=(f[0]+f[1])/2),{w:A,rep:A,fixed:n.getItemModel(w).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),d=o.mapArray("value",function(_,w){var b=i.getEdgeByIndex(w),A=Nt(_,h,c);isNaN(A)&&(A=(c[0]+c[1])/2);var S=b.getModel();return{n1:v[b.node1.dataIndex],n2:v[b.node2.dataIndex],d:A,curveness:S.get("lineStyle.curveness")||0,ignoreForceLayout:S.get("ignoreForceLayout")}}),r=e.coordinateSystem,g=r.getBoundingRect(),p=dR(v,d,{rect:g,gravity:s.get("gravity"),friction:s.get("friction")}),m=p.step;p.step=function(_){for(var w=0,b=v.length;w<b;w++)v[w].fixed&&ge(v[w].p,i.getNodeByIndex(w).getLayout());m(function(A,S,D){for(var I=0,L=A.length;I<L;I++)A[I].fixed||i.getNodeByIndex(I).setLayout(A[I].p),a[n.getId(I)]=A[I].p;for(var I=0,L=S.length;I<L;I++){var P=S[I],R=i.getEdgeByIndex(I),E=P.n1.p,Z=P.n2.p,W=R.getLayout();W=W?W.slice():[],W[0]=W[0]||[],W[1]=W[1]||[],ge(W[0],E),ge(W[1],Z),+P.curveness&&(W[2]=[(E[0]+Z[0])/2-(E[1]-Z[1])*P.curveness,(E[1]+Z[1])/2-(Z[0]-E[0])*P.curveness]),R.setLayout(W)}_&&_(D)})},e.forceLayout=p,e.preservedPoints=a,p.step()}else e.forceLayout=null})};function pR(t,e,r){var a=t.getBoxLayoutParams();return a.aspect=r,qt(a,{width:e.getWidth(),height:e.getHeight()})}var mR=function(t,e){var r=[];return t.eachSeriesByType("graph",function(a){var i=a.get("coordinateSystem");if(!i||i==="view"){var n=a.getData(),o=n.mapArray(function(p){var m=n.getItemModel(p);return[+m.get("x"),+m.get("y")]}),s=[],l=[];Po(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),h=pR(a,e,u);isNaN(u)&&(s=[h.x,h.y],l=[h.x+h.width,h.y+h.height]);var f=l[0]-s[0],c=l[1]-s[1],v=h.width,d=h.height,g=a.coordinateSystem=new Xa;g.zoomLimit=a.get("scaleLimit"),g.setBoundingRect(s[0],s[1],f,c),g.setViewRect(h.x,h.y,v,d),g.setCenter(a.get("center")),g.setZoom(a.get("zoom")),r.push(g)}}),r};$e(lR),Rt(Ii("graph","circle",null)),Rt(uR),Rt(hR),Gt(fR),Gt(Wr.VISUAL.POST_CHART_LAYOUT,vR),Gt(gR),Gv("graphView",{create:mR});var W5=Vt.extend({type:"series.gauge",getInitialData:function(t,e){return Un(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),yR=pt.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var r=Math.cos,a=Math.sin,i=e.r,n=e.width,o=e.angle,s=e.x-r(o)*n*(n>=i/3?1:2),l=e.y-a(o)*n*(n>=i/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+r(o)*n,e.y+a(o)*n),t.lineTo(e.x+r(e.angle)*i,e.y+a(e.angle)*i),t.lineTo(e.x-r(o)*n,e.y-a(o)*n),t.lineTo(s,l)}});function _R(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=H(r[0],e.getWidth()),s=H(r[1],e.getHeight()),l=H(t.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Tw(t,e){return e&&(typeof e=="string"?t=e.replace("{value}",t??""):typeof e=="function"&&(t=e(t))),t}var xR=Math.PI*2,U5=ue.extend({type:"gauge",render:function(t,e,r){this.group.removeAll();var a=t.get("axisLine.lineStyle.color"),i=_R(t,r);this._renderMain(t,e,r,a,i)},dispose:function(){},_renderMain:function(t,e,r,a,i){for(var n=this.group,o=t.getModel("axisLine"),s=o.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,f=(h-u)%xR,c=u,v=s.get("width"),d=o.get("show"),g=0;d&&g<a.length;g++){var p=Math.min(Math.max(a[g][0],0),1),h=u+f*p,m=new Ar({shape:{startAngle:c,endAngle:h,cx:i.cx,cy:i.cy,clockwise:l,r0:i.r-v,r:i.r},silent:!0});m.setStyle({fill:a[g][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),n.add(m),c=h}var y=function(w){if(w<=0)return a[0][1];for(var b=0;b<a.length;b++)if(a[b][0]>=w&&(b===0?0:a[b-1][0])<w)return a[b][1];return a[b-1][1]};if(!l){var _=u;u=h,h=_}this._renderTicks(t,e,r,y,i,u,h,l),this._renderPointer(t,e,r,y,i,u,h,l),this._renderTitle(t,e,r,y,i),this._renderDetail(t,e,r,y,i)},_renderTicks:function(t,e,r,a,i,n,o,s){for(var l=this.group,u=i.cx,h=i.cy,f=i.r,c=+t.get("min"),v=+t.get("max"),d=t.getModel("splitLine"),g=t.getModel("axisTick"),p=t.getModel("axisLabel"),m=t.get("splitNumber"),y=g.get("splitNumber"),_=H(d.get("length"),f),w=H(g.get("length"),f),b=n,A=(o-n)/m,S=A/y,D=d.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),L=0;L<=m;L++){var P=Math.cos(b),R=Math.sin(b);if(d.get("show")){var E=new ye({shape:{x1:P*f+u,y1:R*f+h,x2:P*(f-_)+u,y2:R*(f-_)+h},style:D,silent:!0});D.stroke==="auto"&&E.setStyle({stroke:a(L/m)}),l.add(E)}if(p.get("show")){var Z=Tw(re(L/m*(v-c)+c),p.get("formatter")),W=p.get("distance"),$=a(L/m);l.add(new dt({style:$t({},p,{text:Z,x:P*(f-_-W)+u,y:R*(f-_-W)+h,textVerticalAlign:R<-.4?"top":R>.4?"bottom":"middle",textAlign:P<-.4?"left":P>.4?"right":"center"},{autoColor:$}),silent:!0}))}if(g.get("show")&&L!==m){for(var X=0;X<=y;X++){var P=Math.cos(b),R=Math.sin(b),K=new ye({shape:{x1:P*f+u,y1:R*f+h,x2:P*(f-w)+u,y2:R*(f-w)+h},silent:!0,style:I});I.stroke==="auto"&&K.setStyle({stroke:a((L+X/y)/m)}),l.add(K),b+=S}b-=S}else b+=A}},_renderPointer:function(t,e,r,a,i,n,o,s){var l=this.group,u=this._data;if(!t.get("pointer.show")){u&&u.eachItemGraphicEl(function(d){l.remove(d)});return}var h=[+t.get("min"),+t.get("max")],f=[n,o],c=t.getData(),v=c.mapDimension("value");c.diff(u).add(function(d){var g=new yR({shape:{angle:n}});Se(g,{shape:{angle:Nt(c.get(v,d),h,f,!0)}},t),l.add(g),c.setItemGraphicEl(d,g)}).update(function(d,g){var p=u.getItemGraphicEl(g);ft(p,{shape:{angle:Nt(c.get(v,d),h,f,!0)}},t),l.add(p),c.setItemGraphicEl(d,p)}).remove(function(d){var g=u.getItemGraphicEl(d);l.remove(g)}).execute(),c.eachItemGraphicEl(function(d,g){var p=c.getItemModel(g),m=p.getModel("pointer");d.setShape({x:i.cx,y:i.cy,width:H(m.get("width"),i.r),r:H(m.get("length"),i.r)}),d.useStyle(p.getModel("itemStyle").getItemStyle()),d.style.fill==="auto"&&d.setStyle("fill",a(Nt(c.get(v,g),h,[0,1],!0))),Ot(d,p.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,r,a,i){var n=t.getData(),o=n.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=i.cx+H(l[0],i.r),h=i.cy+H(l[1],i.r),f=+t.get("min"),c=+t.get("max"),v=t.getData().get(o,0),d=a(Nt(v,[f,c],[0,1],!0));this.group.add(new dt({silent:!0,style:$t({},s,{x:u,y:h,text:n.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})}))}},_renderDetail:function(t,e,r,a,i){var n=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(n.get("show")){var l=n.get("offsetCenter"),u=i.cx+H(l[0],i.r),h=i.cy+H(l[1],i.r),f=H(n.get("width"),i.r),c=H(n.get("height"),i.r),v=t.getData(),d=v.get(v.mapDimension("value"),0),g=a(Nt(d,[o,s],[0,1],!0));this.group.add(new dt({silent:!0,style:$t({},n,{x:u,y:h,text:Tw(d,n.get("formatter")),textWidth:isNaN(f)?null:f,textHeight:isNaN(c)?null:c,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Cw=Mu({type:"series.funnel",init:function(t){Cw.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return Un(this,{coordDimensions:["value"],encodeDefaulter:ot(fv,this)})},_defaultLabelLine:function(t){fi(t,"labelLine",["show"]);var e=t.labelLine,r=t.emphasis.labelLine;e.show=e.show&&t.label.show,r.show=r.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),r=Cw.superCall(this,"getDataParams",t),a=e.mapDimension("value"),i=e.getSum(a);return r.percent=i?+(e.get(a,t)/i*100).toFixed(2):0,r.$vars.push("percent"),r},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});function lg(t,e){q.call(this);var r=new Ge,a=new ir,i=new dt;this.add(r),this.add(a),this.add(i),this.highDownOnUpdate=function(n,o){o==="emphasis"?(a.ignore=a.hoverIgnore,i.ignore=i.hoverIgnore):(a.ignore=a.normalIgnore,i.ignore=i.normalIgnore)},this.updateData(t,e,!0)}var Dw=lg.prototype,wR=["itemStyle","opacity"];Dw.updateData=function(t,e,r){var a=this.childAt(0),i=t.hostModel,n=t.getItemModel(e),o=t.getItemLayout(e),s=t.getItemModel(e).get(wR);s=s??1,a.useStyle({}),r?(a.setShape({points:o.points}),a.setStyle({opacity:0}),Se(a,{style:{opacity:s}},i,e)):ft(a,{style:{opacity:s},shape:{points:o.points}},i,e);var l=n.getModel("itemStyle"),u=t.getItemVisual(e,"color");a.setStyle(J({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),a.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Ot(this)},Dw._updateLabel=function(t,e){var r=this.childAt(1),a=this.childAt(2),i=t.hostModel,n=t.getItemModel(e),o=t.getItemLayout(e),s=o.label,c=t.getItemVisual(e,"color");ft(r,{shape:{points:s.linePoints||s.linePoints}},i,e),ft(a,{style:{x:s.x,y:s.y}},i,e),a.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var l=n.getModel("label"),u=n.getModel("emphasis.label"),h=n.getModel("labelLine"),f=n.getModel("emphasis.labelLine"),c=t.getItemVisual(e,"color");Fe(a.style,a.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:c,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),a.ignore=a.normalIgnore=!l.get("show"),a.hoverIgnore=!u.get("show"),r.ignore=r.normalIgnore=!h.get("show"),r.hoverIgnore=!f.get("show"),r.setStyle({stroke:c}),r.setStyle(h.getModel("lineStyle").getLineStyle()),r.hoverStyle=f.getModel("lineStyle").getLineStyle()},It(lg,q);var $5=ue.extend({type:"funnel",render:function(t,e,r){var a=t.getData(),i=this._data,n=this.group;a.diff(i).add(function(o){var s=new lg(a,o);a.setItemGraphicEl(o,s),n.add(s)}).update(function(o,s){var l=i.getItemGraphicEl(s);l.updateData(a,o),n.add(l),a.setItemGraphicEl(o,l)}).remove(function(o){var s=i.getItemGraphicEl(o);n.remove(s)}).execute(),this._data=a},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function bR(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function SR(t,e){for(var r=t.mapDimension("value"),a=t.mapArray(r,function(l){return l}),i=[],n=e==="ascending",o=0,s=t.count();o<s;o++)i[o]=o;return typeof e=="function"?i.sort(e):e!=="none"&&i.sort(function(l,u){return n?a[l]-a[u]:a[u]-a[l]}),i}function AR(t){t.each(function(e){var r=t.getItemModel(e),a=r.getModel("label"),i=a.get("position"),n=r.getModel("labelLine"),o=t.getItemLayout(e),s=o.points,l=i==="inner"||i==="inside"||i==="center"||i==="insideLeft"||i==="insideRight",u,h,f,c;if(l)i==="insideLeft"?(h=(s[0][0]+s[3][0])/2+5,f=(s[0][1]+s[3][1])/2,u="left"):i==="insideRight"?(h=(s[1][0]+s[2][0])/2-5,f=(s[1][1]+s[2][1])/2,u="right"):(h=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,f=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,u="center"),c=[[h,f],[h,f]];else{var v,d,g,p=n.get("length");i==="left"?(v=(s[3][0]+s[0][0])/2,d=(s[3][1]+s[0][1])/2,g=v-p,h=g-5,u="right"):i==="right"?(v=(s[1][0]+s[2][0])/2,d=(s[1][1]+s[2][1])/2,g=v+p,h=g+5,u="left"):i==="rightTop"?(v=s[1][0],d=s[1][1],g=v+p,h=g+5,u="top"):i==="rightBottom"?(v=s[2][0],d=s[2][1],g=v+p,h=g+5,u="bottom"):i==="leftTop"?(v=s[0][0],d=s[1][1],g=v-p,h=g-5,u="right"):i==="leftBottom"?(v=s[3][0],d=s[2][1],g=v-p,h=g-5,u="right"):(v=(s[1][0]+s[2][0])/2,d=(s[1][1]+s[2][1])/2,g=v+p,h=g+5,u="left");var m=d;c=[[v,d],[g,m]],f=m}o.label={linePoints:c,x:h,y:f,verticalAlign:"middle",textAlign:u,inside:l}})}var TR=function(t,e,r){t.eachSeriesByType("funnel",function(a){var i=a.getData(),n=i.mapDimension("value"),o=a.get("sort"),s=bR(a,e),l=SR(i,o),u=[H(a.get("minSize"),s.width),H(a.get("maxSize"),s.width)],h=i.getDataExtent(n),f=a.get("min"),c=a.get("max");f==null&&(f=Math.min(h[0],0)),c==null&&(c=h[1]);var v=a.get("funnelAlign"),d=a.get("gap"),g=(s.height-d*(i.count()-1))/i.count(),p=s.y,m=function(I,L){var P=i.get(n,I)||0,R=Nt(P,[f,c],u,!0),E;switch(v){case"left":E=s.x;break;case"center":E=s.x+(s.width-R)/2;break;case"right":E=s.x+s.width-R;break}return[[E,L],[E+R,L]]};o==="ascending"&&(g=-g,d=-d,p+=s.height,l=l.reverse());for(var y=0;y<l.length;y++){var _=l[y],w=l[y+1],b=i.getItemModel(_),A=b.get("itemStyle.height");A==null?A=g:(A=H(A,s.height),o==="ascending"&&(A=-A));var S=m(_,p),D=m(w,p+A);p+=A+d,i.setItemLayout(_,{points:S.concat(D.slice().reverse())})}AR(i)})};Rt(Zu("funnel")),Gt(TR),$e(bs("funnel"));var CR=function(t){DR(t),MR(t)};function DR(t){if(!t.parallel){var e=!1;M(t.series,function(r){r&&r.type==="parallel"&&(e=!0)}),e&&(t.parallel=[{}])}}function MR(t){var e=me(t.parallelAxis);M(e,function(r){if(!!lt(r)){var a=r.parallelIndex||0,i=me(t.parallel)[a];i&&i.parallelAxisDefault&&ut(r,i.parallelAxisDefault,!1)}})}var hh=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.axisIndex=i};hh.prototype={constructor:hh,model:null,isHorizontal:function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"}},It(hh,Qt);var zi=function(t,e,r,a,i,n){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=to(i,[0,o])),n!=null&&(n=Math.max(n,i??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=to(s,[0,o]),i=n=to(s,[i,n]),a=0}e[0]=to(e[0],r),e[1]=to(e[1],r);var l=ug(e,a);e[a]+=t;var u=i||0,h=r.slice();l.sign<0?h[0]+=u:h[1]-=u,e[a]=to(e[a],h);var f=ug(e,a);i!=null&&(f.sign!==l.sign||f.span<i)&&(e[1-a]=e[a]+l.sign*i);var f=ug(e,a);return n!=null&&f.span>n&&(e[1-a]=e[a]+f.sign*n),e};function ug(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function to(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var hg=M,Mw=Math.min,Iw=Math.max,Lw=Math.floor,IR=Math.ceil,Pw=re,LR=Math.PI;function fg(t,e,r){this._axesMap=ht(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,r)}fg.prototype={type:"parallel",constructor:fg,_init:function(t,e,r){var a=t.dimensions,i=t.parallelAxisIndex;hg(a,function(n,o){var s=i[o],l=e.getComponent("parallelAxis",s),u=this._axesMap.set(n,new hh(n,zn(l),[0,0],l.get("type"),s)),h=u.type==="category";u.onBand=h&&l.get("boundaryGap"),u.inverse=l.get("inverse"),l.axis=u,u.model=l,u.coordinateSystem=l.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),r=e.axisBase,a=e.layoutBase,i=e.pixelDimIndex,n=t[1-i],o=t[i];return n>=r&&n<=r+e.axisLength&&o>=a&&o<=a+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(r){if(!!t.contains(r,e)){var a=r.getData();hg(this.dimensions,function(i){var n=this._axesMap.get(i);n.scale.unionExtentFromData(a,a.mapDimension(i)),Fa(n.scale,n.model)},this)}},this)},resize:function(t,e){this._rect=qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t=this._model,e=this._rect,r=["x","y"],a=["width","height"],i=t.get("layout"),n=i==="horizontal"?0:1,o=e[a[n]],s=[0,o],l=this.dimensions.length,u=fh(t.get("axisExpandWidth"),s),h=fh(t.get("axisExpandCount")||0,[0,l]),f=t.get("axisExpandable")&&l>3&&l>h&&h>1&&u>0&&o>0,c=t.get("axisExpandWindow"),v;if(c)v=fh(c[1]-c[0],s),c[1]=c[0]+v;else{v=fh(u*(h-1),s);var d=t.get("axisExpandCenter")||Lw(l/2);c=[u*d-v/2],c[1]=c[0]+v}var g=(o-v)/(l-h);g<3&&(g=0);var p=[Lw(Pw(c[0]/u,1))+1,IR(Pw(c[1]/u,1))-1],m=g/u*c[0];return{layout:i,pixelDimIndex:n,layoutBase:e[r[n]],layoutLength:o,axisBase:e[r[1-n]],axisLength:e[a[1-n]],axisExpandable:f,axisExpandWidth:u,axisCollapseWidth:g,axisExpandWindow:c,axisCount:l,winInnerIndices:p,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,r=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;e.each(function(n){var o=[0,a.axisLength],s=n.inverse?1:0;n.setExtent(o[s],o[1-s])}),hg(r,function(n,o){var s=(a.axisExpandable?ER:PR)(o,a),l={horizontal:{x:s.position,y:a.axisLength},vertical:{x:0,y:s.position}},u={horizontal:LR/2,vertical:0},h=[l[i].x+t.x,l[i].y+t.y],f=u[i],c=Ie();aa(c,c,f),yr(c,c,h),this._axesLayout[n]={position:h,rotation:f,transform:c,axisNameAvailableWidth:s.axisNameAvailableWidth,axisLabelShow:s.axisLabelShow,nameTruncateMaxWidth:s.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,r,a){r==null&&(r=0),a==null&&(a=t.count());var i=this._axesMap,n=this.dimensions,o=[],s=[];M(n,function(g){o.push(t.mapDimension(g)),s.push(i.get(g).model)});for(var l=this.hasAxisBrushed(),u=r;u<a;u++){var h;if(!l)h="normal";else{h="active";for(var f=t.getValues(o,u),c=0,v=n.length;c<v;c++){var d=s[c].getActiveState(f[c]);if(d==="inactive"){h="inactive";break}}}e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,r=!1,a=0,i=t.length;a<i;a++)e.get(t[a]).model.getActiveState()!=="normal"&&(r=!0);return r},axisCoordToPoint:function(t,e){var r=this._axesLayout[e];return Hr([t,0],r.transform)},getAxisLayout:function(t){return rt(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),r=e.pixelDimIndex,a=e.axisExpandWindow.slice(),i=a[1]-a[0],n=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:a};var o=t[r]-e.layoutBase-e.axisExpandWindow0Pos,s,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),f=h[0]!=null;if(u)f&&u&&o<i*h[0]?(l="jump",s=o-i*h[2]):f&&u&&o>i*(1-h[0])?(l="jump",s=o-i*(1-h[2])):(s=o-i*h[1])>=0&&(s=o-i*(1-h[1]))<=0&&(s=0),s*=e.axisExpandWidth/u,s?zi(s,a,n,"all"):l="none";else{var i=a[1]-a[0],c=n[1]*o/i;a=[Iw(0,c-i/2)],a[1]=Mw(n[1],a[0]+i),a[0]=a[1]-i}return{axisExpandWindow:a,behavior:l}}};function fh(t,e){return Mw(Iw(t,e[0]),e[1])}function PR(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function ER(t,e){var r=e.layoutLength,a=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,h;return t<o[0]?(s=t*n,h=n):t<=o[1]?(s=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],l=a,u=!0):(s=r-(i-1-t)*n,h=n),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:h}}function RR(t,e){var r=[];return t.eachComponent("parallel",function(a,i){var n=new fg(a,t,e);n.name="parallel_"+i,n.resize(a,e),a.coordinateSystem=n,n.model=a,r.push(n)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var i=t.queryComponents({mainType:"parallel",index:a.get("parallelIndex"),id:a.get("parallelId")})[0];a.coordinateSystem=i.coordinateSystem}}),r}_e.register("parallel",{create:RR});var Ew=wt.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return _n([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=rt(t);if(e)for(var r=e.length-1;r>=0;r--)_i(e[r])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(t==null||isNaN(t))return"inactive";if(e.length===1){var r=e[0];if(r[0]<=t&&t<=r[1])return"active"}else for(var a=0,i=e.length;a<i;a++)if(e[a][0]<=t&&t<=e[a][1])return"active";return"inactive"}}),OR={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};ut(Ew.prototype,Di);function NR(t,e){return e.type||(e.data?"category":"value")}Gn("parallel",Ew,NR,OR),wt.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,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},init:function(){wt.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&ut(e,t,!0),this._initDimensions()},contains:function(t,e){var r=t.get("parallelIndex");return r!=null&&e.getComponent("parallel",r)===this},setAxisExpand:function(t){M(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],r=ee(this.dependentModels.parallelAxis,function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);M(r,function(a){t.push("dim"+a.get("dim")),e.push(a.componentIndex)})}});var kR={type:"axisAreaSelect",event:"axisAreaSelected"};mt(kR,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(r){r.axis.model.setActiveIntervals(t.intervals)})}),mt("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(r){r.setAxisExpand(t)})});var Ka=ot,Xr=M,zR=V,Gs=Math.min,eo=Math.max,BR=Math.pow,VR=1e4,GR=6,HR=6,Rw="globalPan",FR={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},WR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Ow={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},UR=0;function ro(t){T&&gt(t),le.call(this),this._zr=t,this.group=new q,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,T&&this._mounted,this._uid="brushController_"+UR++,this._handlers={},Xr(tO,function(e,r){this._handlers[r]=it(e,this)},this)}ro.prototype={constructor:ro,enableBrush:function(t){return T&&gt(this._mounted),this._brushType&&ZR(this),t.brushType&&$R(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};M(t,function(r){e[r.panelId]=rt(r)})}else this._panels=null;return this},mount:function(t){t=t||{},T&&(this._mounted=!0),this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){Xr(this._covers,t,e)},updateCovers:function(t){T&&gt(this._mounted),t=V(t,function(h){return ut(rt(Ow),h,!0)});var e="\0-brush-index-",r=this._covers,a=this._covers=[],i=this,n=this._creatingCover;return new ha(r,t,s,o).add(l).update(l).remove(u).execute(),this;function o(h,f){return(h.id!=null?h.id:e+f)+"-"+h.brushType}function s(h,f){return o(h.__brushOption,f)}function l(h,f){var c=t[h];if(f!=null&&r[f]===n)a[h]=r[f];else{var v=a[h]=f!=null?(r[f].__brushOption=c,r[f]):kw(i,Nw(i,c));cg(i,v)}}function u(h){r[h]!==n&&i.group.remove(r[h])}},unmount:function(){if(!(T&&!this._mounted))return this.enableBrush(!1),gg(this),this._zr.remove(this.group),T&&(this._mounted=!1),this},dispose:function(){this.unmount(),this.off()}},Dt(ro,le);function $R(t,e){var r=t._zr;t._enableGlobalPan||GP(r,Rw,t._uid),YR(r,t._handlers),t._brushType=e.brushType,t._brushOption=ut(rt(Ow),e,!0)}function ZR(t){var e=t._zr;HP(e,Rw,t._uid),XR(e,t._handlers),t._brushType=t._brushOption=null}function YR(t,e){Xr(e,function(r,a){t.on(a,r)})}function XR(t,e){Xr(e,function(r,a){t.off(a,r)})}function Nw(t,e){var r=ch[e.brushType].createCover(t,e);return r.__brushOption=e,Bw(r,e),t.group.add(r),r}function kw(t,e){var r=vg(e);return r.endCreating&&(r.endCreating(t,e),Bw(e,e.__brushOption)),e}function zw(t,e){var r=e.__brushOption;vg(e).updateCoverShape(t,e,r.range,r)}function Bw(t,e){var r=e.z;r==null&&(r=VR),t.traverse(function(a){a.z=r,a.z2=r})}function cg(t,e){vg(e).updateCommon(t,e),zw(t,e)}function vg(t){return ch[t.__brushOption.brushType]}function dg(t,e,r){var a=t._panels;if(!a)return!0;var i,n=t._transform;return Xr(a,function(o){o.isTargetByCursor(e,r,n)&&(i=o)}),i}function Vw(t,e){var r=t._panels;if(!r)return!0;var a=e.__brushOption.panelId;return a!=null?r[a]:!0}function gg(t){var e=t._covers,r=e.length;return Xr(e,function(a){t.group.remove(a)},t),e.length=0,!!r}function Bi(t,e){var r=zR(t._covers,function(a){var i=a.__brushOption,n=rt(i.range);return{brushType:i.brushType,panelId:i.panelId,range:n}});t.trigger("brush",r,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function qR(t){var e=t._track;if(!e.length)return!1;var r=e[e.length-1],a=e[0],i=r[0]-a[0],n=r[1]-a[1],o=BR(i*i+n*n,.5);return o>GR}function Gw(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Hw(t,e,r,a){var i=new q;return i.add(new xt({name:"main",style:mg(r),silent:!0,draggable:!0,cursor:"move",drift:Ka(t,e,i,"nswe"),ondragend:Ka(Bi,e,{isEnd:!0})})),Xr(a,function(n){i.add(new xt({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ka(t,e,i,n),ondragend:Ka(Bi,e,{isEnd:!0})}))}),i}function Fw(t,e,r,a){var i=a.brushStyle.lineWidth||0,n=eo(i,HR),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,h=r[0][1],f=r[1][1],c=h-n+i/2,v=f-n+i/2,d=h-o,g=f-s,p=d+i,m=g+i;da(t,e,"main",o,s,d,g),a.transformable&&(da(t,e,"w",l,u,n,m),da(t,e,"e",c,u,n,m),da(t,e,"n",l,u,p,n),da(t,e,"s",l,v,p,n),da(t,e,"nw",l,u,n,n),da(t,e,"ne",c,u,n,n),da(t,e,"sw",l,v,n,n),da(t,e,"se",c,v,n,n))}function pg(t,e){var r=e.__brushOption,a=r.transformable,i=e.childAt(0);i.useStyle(mg(r)),i.attr({silent:!a,cursor:a?"move":"default"}),Xr(["w","e","n","s","se","sw","ne","nw"],function(n){var o=e.childOfName(n),s=yg(t,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?WR[s]+"-resize":null})})}function da(t,e,r,a,i,n,o){var s=e.childOfName(r);s&&s.setShape(QR(_g(t,e,[[a,i],[a+n,i+o]])))}function mg(t){return J({strokeNoScale:!0},t.brushStyle)}function Ww(t,e,r,a){var i=[Gs(t,r),Gs(e,a)],n=[eo(t,r),eo(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function KR(t){return yi(t.group)}function yg(t,e){if(e.length>1){e=e.split("");var r=[yg(t,e[0]),yg(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}else{var a={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},r=qc(a[e],KR(t));return i[r]}}function Uw(t,e,r,a,i,n,o,s){var l=a.__brushOption,u=t(l.range),h=$w(r,n,o);Xr(i.split(""),function(f){var c=FR[f];u[c[0]][c[1]]+=h[c[0]]}),l.range=e(Ww(u[0][0],u[1][0],u[0][1],u[1][1])),cg(r,a),Bi(r,{isEnd:!1})}function jR(t,e,r,a,i){var n=e.__brushOption.range,o=$w(t,r,a);Xr(n,function(s){s[0]+=o[0],s[1]+=o[1]}),cg(t,e),Bi(t,{isEnd:!1})}function $w(t,e,r){var a=t.group,i=a.transformCoordToLocal(e,r),n=a.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function _g(t,e,r){var a=Vw(t,e);return a&&a!==!0?a.clipPath(r,t._transform):rt(r)}function QR(t){var e=Gs(t[0][0],t[1][0]),r=Gs(t[0][1],t[1][1]),a=eo(t[0][0],t[1][0]),i=eo(t[0][1],t[1][1]);return{x:e,y:r,width:a-e,height:i-r}}function JR(t,e,r){if(!(!t._brushType||eO(t,e))){var a=t._zr,i=t._covers,n=dg(t,e,r);if(!t._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(n&&(n===!0||s.panelId===n.panelId)&&ch[s.brushType].contain(i[o],r[0],r[1]))return}n&&a.setCursorStyle("crosshair")}}function xg(t){var e=t.event;e.preventDefault&&e.preventDefault()}function wg(t,e,r){return t.childOfName("main").contain(e,r)}function Zw(t,e,r,a){var i=t._creatingCover,n=t._creatingPanel,o=t._brushOption,s;if(t._track.push(r.slice()),qR(t)||i){if(n&&!i){o.brushMode==="single"&&gg(t);var l=rt(o);l.brushType=Yw(l.brushType,n),l.panelId=n===!0?null:n.panelId,i=t._creatingCover=Nw(t,l),t._covers.push(i)}if(i){var u=ch[Yw(t._brushType,n)],h=i.__brushOption;h.range=u.getCreatingRange(_g(t,i,t._track)),a&&(kw(t,i),u.updateCommon(t,i)),zw(t,i),s={isEnd:a}}}else a&&o.brushMode==="single"&&o.removeOnClick&&dg(t,e,r)&&gg(t)&&(s={isEnd:a,removeOnClick:!0});return s}function Yw(t,e){return t==="auto"?(T&&gt(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}var tO={mousedown:function(t){if(this._dragging)Xw(this,t);else if(!t.target||!t.target.draggable){xg(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var r=this._creatingPanel=dg(this,t,e);r&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,r=t.offsetY,a=this.group.transformCoordToLocal(e,r);if(JR(this,t,a),this._dragging){xg(t);var i=Zw(this,t,a,!1);i&&Bi(this,i)}},mouseup:function(t){Xw(this,t)}};function Xw(t,e){if(t._dragging){xg(e);var r=e.offsetX,a=e.offsetY,i=t.group.transformCoordToLocal(r,a),n=Zw(t,e,i,!0);t._dragging=!1,t._track=[],t._creatingCover=null,n&&Bi(t,n)}}function eO(t,e,r){var a=t._zr;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}var ch={lineX:qw(0),lineY:qw(1),rect:{createCover:function(t,e){return Hw(Ka(Uw,function(r){return r},function(r){return r}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Gw(t);return Ww(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,a){Fw(t,e,r,a)},updateCommon:pg,contain:wg},polygon:{createCover:function(t,e){var r=new q;return r.add(new ir({name:"main",style:mg(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Ge({name:"main",draggable:!0,drift:Ka(jR,t,e),ondragend:Ka(Bi,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,a){e.childAt(0).setShape({points:_g(t,e,r)})},updateCommon:pg,contain:wg}};function qw(t){return{createCover:function(e,r){return Hw(Ka(Uw,function(a){var i=[a,[0,100]];return t&&i.reverse(),i},function(a){return a[t]}),e,r,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var r=Gw(e),a=Gs(r[0][t],r[1][t]),i=eo(r[0][t],r[1][t]);return[a,i]},updateCoverShape:function(e,r,a,i){var n,o=Vw(e,r);if(o!==!0&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[a,n];t&&l.reverse(),Fw(e,r,l,i)},updateCommon:pg,contain:wg}}function Kw(t){return t=bg(t),function(e,r){return uy(e,t)}}function jw(t,e){return t=bg(t),function(r){var a=e??r,i=a?t.width:t.height,n=a?t.x:t.y;return[n,n+(i||0)]}}function Qw(t,e,r){return t=bg(t),function(a,i,n){return t.contain(i[0],i[1])&&!Ku(a,e,r)}}function bg(t){return vt.create(t)}var rO=["axisLine","axisTickLabel","axisName"],aO=he({type:"parallelAxis",init:function(t,e){aO.superApply(this,"init",arguments),(this._brushController=new ro(e.getZr())).on("brush",it(this._onBrush,this))},render:function(t,e,r,a){if(!iO(t,e,a)){this.axisModel=t,this.api=r,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),!!t.get("show")){var n=oO(t,e),o=n.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,h=o.getAxisLayout(u),f=et({strokeContainThreshold:l},h),c=new ze(t,f);M(rO,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(f,s,t,n,l,r);var v=a&&a.animation===!1?null:t;au(i,this._axisGroup,v)}}},_refreshBrushController:function(t,e,r,a,i,n){var o=r.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,Math.abs(s)*.1),u=vt.create({x:o[0],y:-i/2,width:s,height:i});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Kw(u),isTargetByCursor:Qw(u,n,a),getLinearBrushOtherExtent:jw(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(nO(r))},_onBrush:function(t,e){var r=this.axisModel,a=r.axis,i=V(t,function(n){return[a.coordToData(n.range[0],!0),a.coordToData(n.range[1],!0)]});(!r.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:r.id,intervals:i})},dispose:function(){this._brushController.dispose()}});function iO(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function nO(t){var e=t.axis;return V(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function oO(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var sO=5;he({type:"parallel",render:function(t,e,r){this._model=t,this._api=r,this._handlers||(this._handlers={},M(lO,function(a,i){r.getZr().on(i,this._handlers[i]=it(a,this))},this)),es(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){M(this._handlers,function(r,a){e.getZr().off(a,r)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(et({type:"parallelAxisExpand"},t))}});var lO={mousedown:function(t){Sg(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Sg(this,"click")&&e){var r=[t.offsetX,t.offsetY],a=Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2);if(a>sO)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!Sg(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),a=r.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:a==="jump"?null:!1})}}};function Sg(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}we(CR),Vt.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var r=this.getSource();return uO(r,this),ca(r,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,r=this.getData(),a=[];return e.eachActiveState(r,function(i,n){t===i&&a.push(r.getRawIndex(n))}),a},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});function uO(t,e){if(!t.encodeDefine){var r=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!!r){var a=t.encodeDefine=ht();M(r.dimensions,function(i){var n=hO(i);a.set(i,n)})}}}function hO(t){return+t.replace("dim","")}var Jw=.3,Z5=ue.extend({type:"parallel",init:function(){this._dataGroup=new q,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,r,a){var i=this._dataGroup,n=t.getData(),o=this._data,s=t.coordinateSystem,l=s.dimensions,u=rb(t);n.diff(o).add(h).update(f).remove(c).execute();function h(d){var g=eb(n,i,d,l,s);Ag(g,n,d,u)}function f(d,g){var p=o.getItemGraphicEl(g),m=tb(n,d,l,s);n.setItemGraphicEl(d,p);var y=a&&a.animation===!1?null:t;ft(p,{shape:{points:m}},y,d),Ag(p,n,d,u)}function c(d){var g=o.getItemGraphicEl(d);i.remove(g)}if(!this._initialized){this._initialized=!0;var v=fO(s,t,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(v)}this._data=n},incrementalPrepareRender:function(t,e,r){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,r){for(var a=e.getData(),i=e.coordinateSystem,n=i.dimensions,o=rb(e),s=t.start;s<t.end;s++){var l=eb(a,this._dataGroup,s,n,i);l.incremental=!0,Ag(l,a,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function fO(t,e,r){var a=t.model,i=t.getRect(),n=new xt({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=a.get("layout")==="horizontal"?"width":"height";return n.setShape(o,0),Se(n,{shape:{width:i.width,height:i.height}},e,r),n}function tb(t,e,r,a){for(var i=[],n=0;n<r.length;n++){var o=r[n],s=t.get(t.mapDimension(o),e);cO(s,a.getAxis(o).type)||i.push(a.dataToPoint(s,o))}return i}function eb(t,e,r,a,i){var n=tb(t,r,a,i),o=new ir({shape:{points:n},silent:!0,z2:10});return e.add(o),t.setItemGraphicEl(r,o),o}function rb(t){var e=t.get("smooth",!0);return e===!0&&(e=Jw),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:e??Jw}}function Ag(t,e,r,a){var i=a.lineStyle;if(e.hasItemOption){var n=e.getItemModel(r).getModel("lineStyle");i=n.getLineStyle()}t.useStyle(i);var o=t.style;o.fill=null,o.stroke=e.getItemVisual(r,"color"),o.opacity=e.getItemVisual(r,"opacity"),a.smooth&&(t.shape.smooth=a.smooth)}function cO(t,e){return e==="category"?t==null:t==null||isNaN(t)}var vO=["lineStyle","normal","opacity"],dO={seriesType:"parallel",reset:function(t,e,r){var a=t.getModel("itemStyle"),i=t.getModel("lineStyle"),n=e.get("color"),o=i.get("color")||a.get("color")||n[t.seriesIndex%n.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,f=t.getData(),c={normal:u.opacity,active:l,inactive:s};f.setVisual("color",o);function v(d,g){h.eachActiveState(g,function(p,m){var y=c[p];if(p==="normal"&&g.hasItemOption){var _=g.getItemModel(m).get(vO,!0);_!=null&&(y=_)}g.setItemVisual(m,"opacity",y)},d.start,d.end)}return{progress:v}}};Rt(dO);var ab=Vt.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(t,e){for(var r=t.edges||t.links,a=t.data||t.nodes,i=t.levels,n=this.levelModels={},o=0;o<i.length;o++)if(i[o].depth!=null&&i[o].depth>=0)n[i[o].depth]=new _t(i[o],this,e);else if(T)throw new Error("levels[i].depth is mandatory and should be natural number");if(a&&r){var s=cw(a,r,this,!0,l);return s.data}function l(u,h){u.wrapMethod("getItemModel",function(f,c){return f.customizeGetParent(function(v){var d=this.parentModel,g=d.getData().getItemLayout(c).depth,p=d.levelModels[g];return p||this.parentModel}),f}),h.wrapMethod("getItemModel",function(f,c){return f.customizeGetParent(function(v){var d=this.parentModel,g=d.getGraph().getEdgeByIndex(c),p=g.node1.getLayout().depth,m=d.levelModels[p];return m||this.parentModel}),f})}},setNodePosition:function(t,e){var r=this.option.data[t];r.localX=e[0],r.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,r){if(r==="edge"){var a=this.getDataParams(t,r),i=a.data,n=i.source+" -- "+i.target;return a.value&&(n+=" : "+a.value),kt(n)}else if(r==="node"){var o=this.getGraph().getNodeByIndex(t),s=o.getLayout().value,l=this.getDataParams(t,r).data.name;if(s)var n=l+" : "+s;return kt(n)}return ab.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var r=ab.superCall(this,"getDataParams",t,e);if(r.value==null&&e==="node"){var a=this.getGraph().getNodeByIndex(t),i=a.getLayout().value;r.value=i}return r},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),ib=["itemStyle","opacity"],Vi=["emphasis","itemStyle","opacity"],nb=["lineStyle","opacity"],vh=["emphasis","lineStyle","opacity"];function ob(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function dh(t,e,r){var a=t.getGraphicEl(),i=ob(t,e);r!=null&&(i==null&&(i=1),i*=r),a.downplay&&a.downplay(),a.traverse(function(n){n.type!=="group"&&n.setStyle("opacity",i)})}function Ir(t,e){var r=ob(t,e),a=t.getGraphicEl();a.traverse(function(i){i.type!=="group"&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}var gO=nr({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var r=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),e.orient==="vertical"?(t.lineTo(e.x2+r,e.y2),t.bezierCurveTo(e.cpx2+r,e.cpy2,e.cpx1+r,e.cpy1,e.x1+r,e.y1)):(t.lineTo(e.x2,e.y2+r),t.bezierCurveTo(e.cpx2,e.cpy2+r,e.cpx1,e.cpy1+r,e.x1,e.y1+r)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});ke({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,r){var a=this,i=t.getGraph(),n=this.group,o=t.layoutInfo,s=o.width,l=o.height,u=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,n.removeAll(),n.attr("position",[o.x,o.y]),i.eachEdge(function(c){var v=new gO;v.dataIndex=c.dataIndex,v.seriesIndex=t.seriesIndex,v.dataType="edge";var d=c.getModel("lineStyle"),g=d.get("curveness"),p=c.node1.getLayout(),m=c.node1.getModel(),y=m.get("localX"),_=m.get("localY"),w=c.node2.getLayout(),b=c.node2.getModel(),A=b.get("localX"),S=b.get("localY"),D=c.getLayout(),I,L,P,R,E,Z,W,$;switch(v.shape.extent=Math.max(1,D.dy),v.shape.orient=f,f==="vertical"?(I=(y!=null?y*s:p.x)+D.sy,L=(_!=null?_*l:p.y)+p.dy,P=(A!=null?A*s:w.x)+D.ty,R=S!=null?S*l:w.y,E=I,Z=L*(1-g)+R*g,W=P,$=L*g+R*(1-g)):(I=(y!=null?y*s:p.x)+p.dx,L=(_!=null?_*l:p.y)+D.sy,P=A!=null?A*s:w.x,R=(S!=null?S*l:w.y)+D.ty,E=I*(1-g)+P*g,Z=L,W=I*g+P*(1-g),$=R),v.setShape({x1:I,y1:L,x2:P,y2:R,cpx1:E,cpy1:Z,cpx2:W,cpy2:$}),v.setStyle(d.getItemStyle()),v.style.fill){case"source":v.style.fill=c.node1.getVisual("color");break;case"target":v.style.fill=c.node2.getVisual("color");break}Ot(v,c.getModel("emphasis.lineStyle").getItemStyle()),n.add(v),h.setItemGraphicEl(c.dataIndex,v)}),i.eachNode(function(c){var v=c.getLayout(),d=c.getModel(),g=d.get("localX"),p=d.get("localY"),m=d.getModel("label"),y=d.getModel("emphasis.label"),_=new xt({shape:{x:g!=null?g*s:v.x,y:p!=null?p*l:v.y,width:v.dx,height:v.dy},style:d.getModel("itemStyle").getItemStyle()}),w=c.getModel("emphasis.itemStyle").getItemStyle();Fe(_.style,w,m,y,{labelFetcher:t,labelDataIndex:c.dataIndex,defaultText:c.id,isRectText:!0}),_.setStyle("fill",c.getVisual("color")),Ot(_,w),n.add(_),u.setItemGraphicEl(c.dataIndex,_),_.dataType="node"}),u.eachItemGraphicEl(function(c,v){var d=u.getItemModel(v);d.get("draggable")&&(c.drift=function(g,p){a._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=p,this.dirty(),r.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(v),localX:this.shape.x/s,localY:this.shape.y/l})},c.ondragend=function(){a._focusAdjacencyDisabled=!1},c.draggable=!0,c.cursor="move"),c.highlight=function(){this.trigger("emphasis")},c.downplay=function(){this.trigger("normal")},c.focusNodeAdjHandler&&c.off("mouseover",c.focusNodeAdjHandler),c.unfocusNodeAdjHandler&&c.off("mouseout",c.unfocusNodeAdjHandler),d.get("focusNodeAdjacency")&&(c.on("mouseover",c.focusNodeAdjHandler=function(){a._focusAdjacencyDisabled||(a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:c.dataIndex}))}),c.on("mouseout",c.unfocusNodeAdjHandler=function(){a._focusAdjacencyDisabled||a._dispatchUnfocus(r)}))}),h.eachItemGraphicEl(function(c,v){var d=h.getItemModel(v);c.focusNodeAdjHandler&&c.off("mouseover",c.focusNodeAdjHandler),c.unfocusNodeAdjHandler&&c.off("mouseout",c.unfocusNodeAdjHandler),d.get("focusNodeAdjacency")&&(c.on("mouseover",c.focusNodeAdjHandler=function(){a._focusAdjacencyDisabled||(a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:c.dataIndex}))}),c.on("mouseout",c.unfocusNodeAdjHandler=function(){a._focusAdjacencyDisabled||a._dispatchUnfocus(r)}))}),!this._data&&t.get("animation")&&n.setClipPath(pO(n.getBoundingRect(),t,function(){n.removeClipPath()})),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,r,a){var i=t.getData(),n=i.graph,o=a.dataIndex,s=i.getItemModel(o),l=a.edgeDataIndex;if(!(o==null&&l==null)){var u=n.getNodeByIndex(o),h=n.getEdgeByIndex(l);if(n.eachNode(function(c){dh(c,ib,.1)}),n.eachEdge(function(c){dh(c,nb,.1)}),u){Ir(u,Vi);var f=s.get("focusNodeAdjacency");f==="outEdges"?M(u.outEdges,function(c){c.dataIndex<0||(Ir(c,vh),Ir(c.node2,Vi))}):f==="inEdges"?M(u.inEdges,function(c){c.dataIndex<0||(Ir(c,vh),Ir(c.node1,Vi))}):f==="allEdges"&&M(u.edges,function(c){c.dataIndex<0||(Ir(c,vh),c.node1!==u&&Ir(c.node1,Vi),c.node2!==u&&Ir(c.node2,Vi))})}h&&(Ir(h,vh),Ir(h.node1,Vi),Ir(h.node2,Vi))}},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getGraph();i.eachNode(function(n){dh(n,ib)}),i.eachEdge(function(n){dh(n,nb)})}});function pO(t,e,r){var a=new xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Se(a,{shape:{width:t.width+20}},e,r),a}mt({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(r){r.setNodePosition(t.dataIndex,[t.localX,t.localY])})});var mO=function(t,e,r){t.eachSeriesByType("sankey",function(a){var i=a.get("nodeWidth"),n=a.get("nodeGap"),o=yO(a,e);a.layoutInfo=o;var s=o.width,l=o.height,u=a.getGraph(),h=u.nodes,f=u.edges;xO(h);var c=ee(h,function(p){return p.getLayout().value===0}),v=c.length!==0?0:a.get("layoutIterations"),d=a.get("orient"),g=a.get("nodeAlign");_O(h,f,i,n,s,l,v,d,g)})};function yO(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function _O(t,e,r,a,i,n,o,s,l){wO(t,e,r,i,n,s,l),TO(t,e,n,i,a,o,s),OO(t,s)}function xO(t){M(t,function(e){var r=Qa(e.outEdges,gh),a=Qa(e.inEdges,gh),i=e.getValue()||0,n=Math.max(r,a,i);e.setLayout({value:n},!0)})}function wO(t,e,r,a,i,n,o){for(var s=[],l=[],u=[],h=[],f=0,D=0,c=0;c<e.length;c++)s[c]=1;for(c=0;c<t.length;c++)l[c]=t[c].inEdges.length,l[c]===0&&u.push(t[c]);for(var v=-1;u.length;){for(var d=0;d<u.length;d++){var g=u[d],p=g.hostGraph.data.getRawDataItem(g.dataIndex),m=p.depth!=null&&p.depth>=0;m&&p.depth>v&&(v=p.depth),g.setLayout({depth:m?p.depth:f},!0),n==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var y=0;y<g.outEdges.length;y++){var _=g.outEdges[y],w=e.indexOf(_);s[w]=0;var b=_.node2,A=t.indexOf(b);--l[A]===0&&h.indexOf(b)<0&&h.push(b)}}++f,u=h,h=[]}for(c=0;c<s.length;c++)if(s[c]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var S=v>f-1?v:f-1;o&&o!=="left"&&bO(t,o,n,S);var D=n==="vertical"?(i-r)/S:(a-r)/S;AO(t,D,n)}function sb(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function bO(t,e,r,a){if(e==="right"){for(var i=[],n=t,o=0;n.length;){for(var s=0;s<n.length;s++){var l=n[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];i.indexOf(h.node1)<0&&i.push(h.node1)}}n=i,i=[],++o}M(t,function(f){sb(f)||f.setLayout({depth:Math.max(0,a-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&SO(t,a)}function SO(t,e){M(t,function(r){!sb(r)&&!r.outEdges.length&&r.setLayout({depth:e},!0)})}function AO(t,e,r){M(t,function(a){var i=a.getLayout().depth*e;r==="vertical"?a.setLayout({y:i},!0):a.setLayout({x:i},!0)})}function TO(t,e,r,a,i,n,o){var s=CO(t,o);DO(s,e,r,a,i,o),Tg(s,i,r,a,o);for(var l=1;n>0;n--)l*=.99,MO(s,l,o),Tg(s,i,r,a,o),RO(s,l,o),Tg(s,i,r,a,o)}function CO(t,e){var r=[],a=e==="vertical"?"y":"x",i=Ec(t,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),M(i.keys,function(n){r.push(i.buckets.get(n))}),r}function DO(t,e,r,a,i,n){var o=1/0;M(t,function(s){var l=s.length,u=0;M(s,function(f){u+=f.getLayout().value});var h=n==="vertical"?(a-(l-1)*i)/u:(r-(l-1)*i)/u;h<o&&(o=h)}),M(t,function(s){M(s,function(l,u){var h=l.getLayout().value*o;n==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:h},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:h},!0))})}),M(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Tg(t,e,r,a,i){var n=i==="vertical"?"x":"y";M(t,function(o){o.sort(function(g,p){return g.getLayout()[n]-p.getLayout()[n]});for(var s,l,u,h=0,f=o.length,c=i==="vertical"?"dx":"dy",v=0;v<f;v++)l=o[v],u=h-l.getLayout()[n],u>0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]+l.getLayout()[c]+e;var d=i==="vertical"?a:r;if(u=h-e-d,u>0)for(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s,v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[n]+l.getLayout()[c]+e-h,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]})}function MO(t,e,r){M(t.slice().reverse(),function(a){M(a,function(i){if(i.outEdges.length){var n=Qa(i.outEdges,IO,r)/Qa(i.outEdges,gh,r);if(isNaN(n)){var o=i.outEdges.length;n=o?Qa(i.outEdges,LO,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-ja(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-ja(i,r))*e;i.setLayout({y:l},!0)}}})})}function IO(t,e){return ja(t.node2,e)*t.getValue()}function LO(t,e){return ja(t.node2,e)}function PO(t,e){return ja(t.node1,e)*t.getValue()}function EO(t,e){return ja(t.node1,e)}function ja(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function gh(t){return t.getValue()}function Qa(t,e,r){for(var a=0,i=t.length,n=-1;++n<i;){var o=+e.call(t,t[n],r);isNaN(o)||(a+=o)}return a}function RO(t,e,r){M(t,function(a){M(a,function(i){if(i.inEdges.length){var n=Qa(i.inEdges,PO,r)/Qa(i.inEdges,gh,r);if(isNaN(n)){var o=i.inEdges.length;n=o?Qa(i.inEdges,EO,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-ja(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-ja(i,r))*e;i.setLayout({y:l},!0)}}})})}function OO(t,e){var r=e==="vertical"?"x":"y";M(t,function(a){a.outEdges.sort(function(i,n){return i.node2.getLayout()[r]-n.node2.getLayout()[r]}),a.inEdges.sort(function(i,n){return i.node1.getLayout()[r]-n.node1.getLayout()[r]})}),M(t,function(a){var i=0,n=0;M(a.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),M(a.inEdges,function(o){o.setLayout({ty:n},!0),n+=o.getLayout().dy})})}var NO=function(t,e){t.eachSeriesByType("sankey",function(r){var a=r.getGraph(),i=a.nodes;if(i.length){var n=1/0,o=-1/0;M(i,function(s){var l=s.getLayout().value;l<n&&(n=l),l>o&&(o=l)}),M(i,function(s){var l=new Mt({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:r.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get("itemStyle.color");h!=null?s.setVisual("color",h):s.setVisual("color",u)})}})};Gt(mO),Rt(NO);var lb={_baseAxisDim:null,getInitialData:function(t,e){var r,a=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),n=a.get("type"),o=i.get("type"),s;n==="category"?(t.layout="horizontal",r=a.getOrdinalMeta(),s=!0):o==="category"?(t.layout="vertical",r=i.getOrdinalMeta(),s=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u=t.layout==="horizontal"?0:1,h=this._baseAxisDim=l[u],f=l[1-u],c=[a,i],v=c[u].get("type"),d=c[1-u].get("type"),g=t.data;if(g&&s){var p=[];M(g,function(_,w){var b;_.value&&z(_.value)?(b=_.value.slice(),_.value.unshift(w)):z(_)?(b=_.slice(),_.unshift(w)):b=_,p.push(b)}),t.data=p}var m=this.defaultValueDimensions,y=[{name:h,type:Iu(v),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Iu(d),dimsDef:m.slice()}];return Un(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:ot(Ly,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},kO=Vt.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});Dt(kO,lb,!0);var zO=["itemStyle"],BO=["emphasis","itemStyle"],Y5=ue.extend({type:"boxplot",render:function(t,e,r){var a=t.getData(),i=this.group,n=this._data;this._data||i.removeAll();var o=t.get("layout")==="horizontal"?1:0;a.diff(n).add(function(s){if(a.hasValue(s)){var l=a.getItemLayout(s),u=ub(l,a,s,o,!0);a.setItemGraphicEl(s,u),i.add(u)}}).update(function(s,l){var u=n.getItemGraphicEl(l);if(!a.hasValue(s)){i.remove(u);return}var h=a.getItemLayout(s);u?hb(h,u,a,s):u=ub(h,a,s,o),i.add(u),a.setItemGraphicEl(s,u)}).remove(function(s){var l=n.getItemGraphicEl(s);l&&i.remove(l)}).execute(),this._data=a},remove:function(t){var e=this.group,r=this._data;this._data=null,r&&r.eachItemGraphicEl(function(a){a&&e.remove(a)})},dispose:ce}),VO=pt.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var r=e.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();a<r.length;a++)t.moveTo(r[a][0],r[a][1]),a++,t.lineTo(r[a][0],r[a][1])}});function ub(t,e,r,a,i){var n=t.ends,o=new VO({shape:{points:i?GO(n,a,t):n}});return hb(t,o,e,r,i),o}function hb(t,e,r,a,i){var n=r.hostModel,o=sa[i?"initProps":"updateProps"];o(e,{shape:{points:t.ends}},n,a);var s=r.getItemModel(a),l=s.getModel(zO),u=r.getItemVisual(a,"color"),h=l.getItemStyle(["borderColor"]);h.stroke=u,h.strokeNoScale=!0,e.useStyle(h),e.z2=100;var f=s.getModel(BO).getItemStyle();Ot(e,f)}function GO(t,e,r){return V(t,function(a){return a=a.slice(),a[e]=r.initBaseline,a})}var fb=["itemStyle","borderColor"],HO=function(t,e){var r=t.get("color");t.eachRawSeriesByType("boxplot",function(a){var i=r[a.seriesIndex%r.length],n=a.getData();n.setVisual({legendSymbol:"roundRect",color:a.get(fb)||i}),t.isSeriesFiltered(a)||n.each(function(o){var s=n.getItemModel(o);n.setItemVisual(o,{color:s.get(fb,!0)})})})},Hs=M,FO=function(t){var e=WO(t);Hs(e,function(r){var a=r.seriesModels;!a.length||(UO(r),Hs(a,function(i,n){$O(i,r.boxOffsetList[n],r.boxWidthList[n])}))})};function WO(t){var e=[],r=[];return t.eachSeriesByType("boxplot",function(a){var i=a.getBaseAxis(),n=yt(r,i);n<0&&(n=r.length,r[n]=i,e[n]={axis:i,seriesModels:[]}),e[n].seriesModels.push(a)}),e}function UO(t){var e,r=t.axis,a=t.seriesModels,i=a.length,n=t.boxWidthList=[],o=t.boxOffsetList=[],s=[],l;if(r.type==="category")l=r.getBandWidth();else{var u=0;Hs(a,function(d){u=Math.max(u,d.getData().count())}),e=r.getExtent(),Math.abs(e[1]-e[0])/u}Hs(a,function(d){var g=d.get("boxWidth");z(g)||(g=[g,g]),s.push([H(g[0],l)||0,H(g[1],l)||0])});var h=l*.8-2,f=h/i*.3,c=(h-f*(i-1))/i,v=c/2-h/2;Hs(a,function(d,g){o.push(v),v+=f+c,n.push(Math.min(Math.max(c,s[g][0]),s[g][1]))})}function $O(t,e,r){var a=t.coordinateSystem,i=t.getData(),n=r/2,o=t.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),h=i.mapDimension(l[s],!0);if(u==null||h.length<5)return;for(var f=0;f<i.count();f++){var c=i.get(u,f),v=_(c,h[2],f),d=_(c,h[0],f),g=_(c,h[1],f),p=_(c,h[3],f),m=_(c,h[4],f),y=[];w(y,g,0),w(y,p,1),y.push(d,g,m,p),b(y,d),b(y,m),b(y,v),i.setItemLayout(f,{initBaseline:v[s],ends:y})}function _(A,S,D){var I=i.get(S,D),L=[];L[o]=A,L[s]=I;var P;return isNaN(A)||isNaN(I)?P=[NaN,NaN]:(P=a.dataToPoint(L),P[o]+=e),P}function w(A,S,D){var I=S.slice(),L=S.slice();I[o]+=n,L[o]-=n,D?A.push(I,L):A.push(L,I)}function b(A,S){var D=S.slice(),I=S.slice();D[o]-=n,I[o]+=n,A.push(D,I)}}Rt(HO),Gt(FO);var ZO=Vt.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,r){var a=e.getItemLayout(t);return a&&r.rect(a.brushRect)}});Dt(ZO,lb,!0);var cb=["itemStyle"],YO=["emphasis","itemStyle"],vb=["color","color0","borderColor","borderColor0"],X5=ue.extend({type:"candlestick",render:function(t,e,r){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,r){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,r,a){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(this._isLargeDraw==null||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e=t.getData(),r=this._data,a=this.group,i=e.getLayout("isSimpleBox"),n=t.get("clip",!0),o=t.coordinateSystem,s=o.getArea&&o.getArea();this._data||a.removeAll(),e.diff(r).add(function(l){if(e.hasValue(l)){var u,h=e.getItemLayout(l);if(n&&db(s,h))return;u=Cg(h,l,!0),Se(u,{shape:{points:h.ends}},t,l),Dg(u,e,l,i),a.add(u),e.setItemGraphicEl(l,u)}}).update(function(l,u){var h=r.getItemGraphicEl(u);if(!e.hasValue(l)){a.remove(h);return}var f=e.getItemLayout(l);if(n&&db(s,f)){a.remove(h);return}h?ft(h,{shape:{points:f.ends}},t,l):h=Cg(f,l),Dg(h,e,l,i),a.add(h),e.setItemGraphicEl(l,h)}).remove(function(l){var u=r.getItemGraphicEl(l);u&&a.remove(u)}).execute(),this._data=e},_renderLarge:function(t){this._clear(),pb(t,this.group);var e=t.get("clip",!0)?Gu(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){for(var r=e.getData(),a=r.getLayout("isSimpleBox"),i;(i=t.next())!=null;){var n,o=r.getItemLayout(i);n=Cg(o,i),Dg(n,r,i,a),n.incremental=!0,this.group.add(n)}},_incrementalRenderLarge:function(t,e){pb(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:ce}),XO=pt.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var r=e.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]))}});function Cg(t,e,r){var a=t.ends;return new XO({shape:{points:r?qO(a,t):a},z2:100})}function db(t,e){for(var r=!0,a=0;a<e.ends.length;a++)if(t.contain(e.ends[a][0],e.ends[a][1])){r=!1;break}return r}function Dg(t,e,r,a){var i=e.getItemModel(r),n=i.getModel(cb),o=e.getItemVisual(r,"color"),s=e.getItemVisual(r,"borderColor")||o,l=n.getItemStyle(vb);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=o,t.style.stroke=s,t.__simpleBox=a;var u=i.getModel(YO).getItemStyle();Ot(t,u)}function qO(t,e){return V(t,function(r){return r=r.slice(),r[1]=e.initBaseline,r})}var gb=pt.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var r=e.points,a=0;a<r.length;)if(this.__sign===r[a++]){var i=r[a++];t.moveTo(i,r[a++]),t.lineTo(i,r[a++])}else a+=3}});function pb(t,e,r){var a=t.getData(),i=a.getLayout("largePoints"),n=new gb({shape:{points:i},__sign:1});e.add(n);var o=new gb({shape:{points:i},__sign:-1});e.add(o),mb(1,n,t,a),mb(-1,o,t,a),r&&(n.incremental=!0,o.incremental=!0)}function mb(t,e,r,a){var i=t>0?"P":"N",n=a.getVisual("borderColor"+i)||a.getVisual("color"+i),o=r.getModel(cb).getItemStyle(vb);e.useStyle(o),e.style.fill=null,e.style.stroke=n}var KO=function(t){!t||!z(t.series)||M(t.series,function(e){lt(e)&&e.type==="k"&&(e.type="candlestick")})},jO=["itemStyle","borderColor"],QO=["itemStyle","borderColor0"],JO=["itemStyle","color"],tN=["itemStyle","color0"],eN={seriesType:"candlestick",plan:Mn(),performRawSeries:!0,reset:function(t,e){var r=t.getData();if(r.setVisual({legendSymbol:"roundRect",colorP:n(1,t),colorN:n(-1,t),borderColorP:o(1,t),borderColorN:o(-1,t)}),e.isSeriesFiltered(t))return;var a=t.pipelineContext.large;return!a&&{progress:i};function i(s,l){for(var u;(u=s.next())!=null;){var h=l.getItemModel(u),f=l.getItemLayout(u).sign;l.setItemVisual(u,{color:n(f,h),borderColor:o(f,h)})}}function n(s,l){return l.get(s>0?JO:tN)}function o(s,l){return l.get(s>0?jO:QO)}}},rN=typeof Float32Array<"u"?Float32Array:Array,aN={seriesType:"candlestick",plan:Mn(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),a=iN(t,r),i=0,n=1,o=["x","y"],s=r.mapDimension(o[i]),l=r.mapDimension(o[n],!0),u=l[0],h=l[1],f=l[2],c=l[3];if(r.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s==null||l.length<4)return;return{progress:t.pipelineContext.large?d:v};function v(g,p){for(var m;(m=g.next())!=null;){var y=p.get(s,m),_=p.get(u,m),w=p.get(h,m),b=p.get(f,m),A=p.get(c,m),S=Math.min(_,w),D=Math.max(_,w),I=Z(S,y),L=Z(D,y),P=Z(b,y),R=Z(A,y),E=[];W(E,L,0),W(E,I,1),E.push(X(R),X(L),X(P),X(I)),p.setItemLayout(m,{sign:yb(p,m,_,w,h),initBaseline:_>w?L[n]:I[n],ends:E,brushRect:$(b,A,y)})}function Z(K,Q){var j=[];return j[i]=Q,j[n]=K,isNaN(Q)||isNaN(K)?[NaN,NaN]:e.dataToPoint(j)}function W(K,Q,j){var U=Q.slice(),tt=Q.slice();U[i]=Jl(U[i]+a/2,1,!1),tt[i]=Jl(tt[i]-a/2,1,!0),j?K.push(U,tt):K.push(tt,U)}function $(K,Q,j){var U=Z(K,j),tt=Z(Q,j);return U[i]-=a/2,tt[i]-=a/2,{x:U[0],y:U[1],width:n?a:tt[0]-U[0],height:n?tt[1]-U[1]:a}}function X(K){return K[i]=Jl(K[i],1),K}}function d(g,p){for(var m=new rN(g.count*4),y=0,_,w=[],b=[],A;(A=g.next())!=null;){var S=p.get(s,A),D=p.get(u,A),I=p.get(h,A),L=p.get(f,A),P=p.get(c,A);if(isNaN(S)||isNaN(L)||isNaN(P)){m[y++]=NaN,y+=3;continue}m[y++]=yb(p,A,D,I,h),w[i]=S,w[n]=L,_=e.dataToPoint(w,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,w[n]=P,_=e.dataToPoint(w,null,b),m[y++]=_?_[1]:NaN}p.setLayout("largePoints",m)}}};function yb(t,e,r,a,i){var n;return r>a?n=-1:r<a?n=1:n=e>0?t.get(i,e-1)<=a?1:-1:1,n}function iN(t,e){var r=t.getBaseAxis(),a,i=r.type==="category"?r.getBandWidth():(a=r.getExtent(),Math.abs(a[1]-a[0])/e.count()),n=H(Xt(t.get("barMaxWidth"),i),i),o=H(Xt(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?H(s,i):Math.max(Math.min(i/2,n),o)}we(KO),Rt(eN),Gt(aN),Vt.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return ca(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var _b=3;function nN(t){return z(t)||(t=[+t,+t]),t}function xb(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}function Mg(t,e){q.call(this);var r=new Wa(t,e),a=new q;this.add(r),this.add(a),a.beforeUpdate=function(){this.attr(r.getScale())},this.updateData(t,e)}var Gi=Mg.prototype;Gi.stopEffectAnimation=function(){this.childAt(1).removeAll()},Gi.startEffectAnimation=function(t){for(var e=t.symbolType,r=t.color,a=this.childAt(1),i=0;i<_b;i++){var n=Ye(e,-1,-1,2,2,r);n.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-i/_b*t.period+t.effectOffset;n.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(o).start(),n.animateStyle(!0).when(t.period,{opacity:0}).delay(o).start(),a.add(n)}xb(a,t)},Gi.updateEffectAnimation=function(t){for(var e=this._effectCfg,r=this.childAt(1),a=["symbolType","period","rippleScale"],i=0;i<a.length;i++){var n=a[i];if(e[n]!==t[n]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}xb(r,t)},Gi.highlight=function(){this.trigger("emphasis")},Gi.downplay=function(){this.trigger("normal")},Gi.updateData=function(t,e){var r=t.hostModel;this.childAt(0).updateData(t,e);var a=this.childAt(1),i=t.getItemModel(e),n=t.getItemVisual(e,"symbol"),o=nN(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");a.attr("scale",o),a.traverse(function(g){g.attr({fill:s})});var l=i.getShallow("symbolOffset");if(l){var u=a.position;u[0]=H(l[0],o[0]),u[1]=H(l[1],o[1])}var h=t.getItemVisual(e,"symbolRotate");a.rotation=(h||0)*Math.PI/180||0;var f={};if(f.showEffectOn=r.get("showEffectOn"),f.rippleScale=i.get("rippleEffect.scale"),f.brushType=i.get("rippleEffect.brushType"),f.period=i.get("rippleEffect.period")*1e3,f.effectOffset=e/t.count(),f.z=i.getShallow("z")||0,f.zlevel=i.getShallow("zlevel")||0,f.symbolType=n,f.color=s,f.rippleEffectColor=i.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),f.showEffectOn==="render")this._effectCfg?this.updateEffectAnimation(f):this.startEffectAnimation(f),this._effectCfg=f;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),v=function(){c.highlight(),f.showEffectOn!=="render"&&this.startEffectAnimation(f)},d=function(){c.downplay(),f.showEffectOn!=="render"&&this.stopEffectAnimation()};this.on("mouseover",v,this).on("mouseout",d,this).on("emphasis",v,this).on("normal",d,this)}this._effectCfg=f},Gi.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},It(Mg,q),ke({type:"effectScatter",init:function(){this._symbolDraw=new Bn(Mg)},render:function(t,e,r){var a=t.getData(),i=this._symbolDraw;i.updateData(a),this.group.add(i.group)},updateTransform:function(t,e,r){var a=t.getData();this.group.dirty();var i=ys().reset(t);i.progress&&i.progress({start:0,end:a.count()},a),this._symbolDraw.updateLayout(a)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=Sm(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Rt(Ii("effectScatter","circle")),Gt(ys("effectScatter"));var oN=typeof Uint32Array>"u"?Array:Uint32Array,sN=typeof Float64Array>"u"?Array:Float64Array;function wb(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(T&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=V(e,function(r){var a=[r[0].coord,r[1].coord],i={coords:a};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),go([i,r[0],r[1]])}))}var bb=Vt.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],wb(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),bb.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],wb(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}bb.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=cf(this._flatCoords,e.flatCoords),this._flatCoordsOffset=cf(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),r=e.option instanceof Array?e.option:e.getShallow("coords");if(T&&!(r instanceof Array&&r.length>0&&r[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(r)+". Lines must have 2d coords array in data item.");return r},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var r=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],i=0;i<a;i++)e[i]=e[i]||[],e[i][0]=this._flatCoords[r+i*2],e[i][1]=this._flatCoords[r+i*2+1];return a}else{for(var n=this._getCoordsFromItemModel(t),i=0;i<n.length;i++)e[i]=e[i]||[],e[i][0]=n[i][0],e[i][1]=n[i][1];return n.length}},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),typeof t[0]=="number"){for(var r=t.length,a=new oN(r),i=new sN(r),n=0,o=0,s=0,l=0;l<r;){s++;var u=t[l++];a[o++]=n+e,a[o++]=u;for(var h=0;h<u;h++){var f=t[l++],c=t[l++];if(i[n++]=f,i[n++]=c,l>r&&T)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,o),flatCoords:i,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){if(T){var r=_e.get(t.coordinateSystem);if(!r)throw new Error("Unkown coordinate system "+t.coordinateSystem)}var a=new fe(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(i,n,o,s){if(i instanceof Array)return NaN;a.hasItemOption=!0;var l=i.value;if(l!=null)return l instanceof Array?l[s]:l}),a},formatTooltip:function(t){var e=this.getData(),r=e.getItemModel(t),a=r.get("name");if(a)return a;var i=r.get("fromName"),n=r.get("toName"),o=[];return i!=null&&o.push(i),n!=null&&o.push(n),kt(o.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!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}}});function Fs(t,e,r){q.call(this),this.add(this.createLine(t,e,r)),this._updateEffectSymbol(t,e)}var Ja=Fs.prototype;Ja.createLine=function(t,e,r){return new zs(t,e,r)},Ja._updateEffectSymbol=function(t,e){var r=t.getItemModel(e),a=r.getModel("effect"),i=a.get("symbolSize"),n=a.get("symbol");z(i)||(i=[i,i]);var o=a.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==n&&(this.remove(s),s=Ye(n,-.5,-.5,1,1,o),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",o),s.setStyle(a.getItemStyle(["color"])),s.attr("scale",i),s.setColor(o),s.attr("scale",i),this._symbolType=n,this._symbolScale=i,this._updateEffectAnimation(t,a,e))},Ja._updateEffectAnimation=function(t,e,r){var a=this.childAt(1);if(!!a){var i=this,n=t.getItemLayout(r),o=e.get("period")*1e3,s=e.get("loop"),l=e.get("constantSpeed"),u=Ut(e.get("delay"),function(v){return v/t.count()*o/3}),h=typeof u=="function";if(a.ignore=!0,this.updateAnimationPoints(a,n),l>0&&(o=this.getLineLength(a)/l*1e3),o!==this._period||s!==this._loop){a.stopAnimation();var f=u;h&&(f=u(r)),a.__t>0&&(f=-o*a.__t),a.__t=0;var c=a.animate("",s).when(o,{__t:1}).delay(f).during(function(){i.updateSymbolPosition(a)});s||c.done(function(){i.remove(a)}),c.start()}this._period=o,this._loop=s}},Ja.getLineLength=function(t){return ta(t.__p1,t.__cp1)+ta(t.__cp1,t.__p2)},Ja.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},Ja.updateData=function(t,e,r){this.childAt(0).updateData(t,e,r),this._updateEffectSymbol(t,e)},Ja.updateSymbolPosition=function(t){var e=t.__p1,r=t.__p2,a=t.__cp1,i=t.__t,n=t.position,o=[n[0],n[1]],s=be,l=Rc;n[0]=s(e[0],a[0],r[0],i),n[1]=s(e[1],a[1],r[1],i);var u=l(e[0],a[0],r[0],i),h=l(e[1],a[1],r[1],i);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")if(t.__lastT!==void 0&&t.__lastT<t.__t){var f=ta(o,n)*1.05;t.attr("scale",[t.scale[0],f]),i===1&&(n[0]=o[0]+(n[0]-o[0])/2,n[1]=o[1]+(n[1]-o[1])/2)}else if(t.__lastT===1){var f=2*ta(e,n);t.attr("scale",[t.scale[0],f])}else t.attr("scale",this._symbolScale);t.__lastT=t.__t,t.ignore=!1},Ja.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var r=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,r,e)},It(Fs,q);function ph(t,e,r){q.call(this),this._createPolyline(t,e,r)}var mh=ph.prototype;mh._createPolyline=function(t,e,r){var a=t.getItemLayout(e),i=new ir({shape:{points:a}});this.add(i),this._updateCommonStl(t,e,r)},mh.updateData=function(t,e,r){var a=t.hostModel,i=this.childAt(0),n={shape:{points:t.getItemLayout(e)}};ft(i,n,a,e),this._updateCommonStl(t,e,r)},mh._updateCommonStl=function(t,e,r){var a=this.childAt(0),i=t.getItemModel(e),n=t.getItemVisual(e,"color"),o=r&&r.lineStyle,s=r&&r.hoverLineStyle;(!r||t.hasItemOption)&&(o=i.getModel("lineStyle").getLineStyle(),s=i.getModel("emphasis.lineStyle").getLineStyle()),a.useStyle(J({strokeNoScale:!0,fill:"none",stroke:n},o)),a.hoverStyle=s,Ot(this)},mh.updateLayout=function(t,e){var r=this.childAt(0);r.setShape("points",t.getItemLayout(e))},It(ph,q);function Ig(t,e,r){Fs.call(this,t,e,r),this._lastFrame=0,this._lastFramePercent=0}var yh=Ig.prototype;yh.createLine=function(t,e,r){return new ph(t,e,r)},yh.updateAnimationPoints=function(t,e){this._points=e;for(var r=[0],a=0,i=1;i<e.length;i++){var n=e[i-1],o=e[i];a+=ta(n,o),r.push(a)}if(a!==0){for(var i=0;i<r.length;i++)r[i]/=a;this._offsets=r,this._length=a}},yh.getLineLength=function(t){return this._length},yh.updateSymbolPosition=function(t){var e=t.__t,r=this._points,a=this._offsets,i=r.length;if(!!a){var n=this._lastFrame,o;if(e<this._lastFramePercent){var s=Math.min(n+1,i-1);for(o=s;o>=0&&!(a[o]<=e);o--);o=Math.min(o,i-2)}else{for(var o=n;o<i&&!(a[o]>e);o++);o=Math.min(o-1,i-2)}fm(t.position,r[o],r[o+1],(e-a[o])/(a[o+1]-a[o]));var l=r[o+1][0]-r[o][0],u=r[o+1][1]-r[o][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},It(Ig,Fs);var Sb=nr({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var r=e.segs,a=e.curveness;if(e.polyline)for(var i=0;i<r.length;){var n=r[i++];if(n>0){t.moveTo(r[i++],r[i++]);for(var o=1;o<n;o++)t.lineTo(r[i++],r[i++])}}else for(var i=0;i<r.length;){var s=r[i++],l=r[i++],u=r[i++],h=r[i++];if(t.moveTo(s,l),a>0){var f=(s+u)/2-(l-h)*a,c=(l+h)/2-(u-s)*a;t.quadraticCurveTo(f,c,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var r=this.shape,a=r.segs,i=r.curveness;if(r.polyline)for(var n=0,o=0;o<a.length;){var s=a[o++];if(s>0)for(var l=a[o++],u=a[o++],h=1;h<s;h++){var f=a[o++],c=a[o++];if(Ea(l,u,f,c))return n}n++}else for(var n=0,o=0;o<a.length;){var l=a[o++],u=a[o++],f=a[o++],c=a[o++];if(i>0){var v=(l+f)/2-(u-c)*i,d=(u+c)/2-(f-l)*i;if(L0(l,u,v,d,f,c))return n}else if(Ea(l,u,f,c))return n;n++}return-1}});function Ab(){this.group=new q}var Hi=Ab.prototype;Hi.isPersistent=function(){return!this._incremental},Hi.updateData=function(t){this.group.removeAll();var e=new Sb({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},Hi.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new He({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Hi.incrementalUpdate=function(t,e){var r=new Sb;r.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(r,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(r,!0):(r.rectHover=!0,r.cursor="default",r.__startIndex=t.start,this.group.add(r))},Hi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Hi._setCommon=function(t,e,r){var a=e.hostModel;t.setShape({polyline:a.get("polyline"),curveness:a.get("lineStyle.curveness")}),t.useStyle(a.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var i=e.getVisual("color");i&&t.setStyle("stroke",i),t.setStyle("fill"),r||(t.seriesIndex=a.seriesIndex,t.on("mousemove",function(n){t.dataIndex=null;var o=t.findDataIndex(n.offsetX,n.offsetY);o>0&&(t.dataIndex=o+t.__startIndex)}))},Hi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var Tb={seriesType:"lines",plan:Mn(),reset:function(t){var e=t.coordinateSystem,r=t.get("polyline"),a=t.pipelineContext.large;function i(n,o){var s=[];if(a){var l,u=n.end-n.start;if(r){for(var h=0,f=n.start;f<n.end;f++)h+=t.getLineCoordsCount(f);l=new Float32Array(u+h*2)}else l=new Float32Array(u*4);for(var c=0,v=[],f=n.start;f<n.end;f++){var d=t.getLineCoords(f,s);r&&(l[c++]=d);for(var g=0;g<d;g++)v=e.dataToPoint(s[g],!1,v),l[c++]=v[0],l[c++]=v[1]}o.setLayout("linesPoints",l)}else for(var f=n.start;f<n.end;f++){var p=o.getItemModel(f),d=t.getLineCoords(f,s),m=[];if(r)for(var y=0;y<d;y++)m.push(e.dataToPoint(s[y]));else{m[0]=e.dataToPoint(s[0]),m[1]=e.dataToPoint(s[1]);var _=p.get("lineStyle.curveness");+_&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*_,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*_])}o.setItemLayout(f,m)}}return{progress:i}}};ke({type:"lines",init:function(){},render:function(t,e,r){var a=t.getData(),i=this._updateLineDraw(a,t),n=t.get("zlevel"),o=t.get("effect.trailLength"),s=r.getZr(),l=s.painter.getType()==="svg";if(l||s.painter.getLayer(n).clear(!0),this._lastZlevel!=null&&!l&&s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&o){if(T){var u=!1;e.eachSeries(function(f){f!==t&&f.get("zlevel")===n&&(u=!0)}),u&&console.warn("Lines with trail effect should have an individual zlevel")}l||s.configLayer(n,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})}i.updateData(a);var h=t.get("clip",!0)&&Gu(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=n,this._finished=!0},incrementalPrepareRender:function(t,e,r){var a=t.getData(),i=this._updateLineDraw(a,t);i.incrementalPrepareUpdate(a),this._clearLayer(r),this._finished=!1},incrementalRender:function(t,e,r){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,r){var a=t.getData(),i=t.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var n=Tb.reset(t);n.progress&&n.progress({start:0,end:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(r)},_updateLineDraw:function(t,e){var r=this._lineDraw,a=this._showEffect(e),i=!!e.get("polyline"),n=e.pipelineContext,o=n.large;return T&&a&&o&&console.warn("Large lines not support effect"),(!r||a!==this._hasEffet||i!==this._isPolyline||o!==this._isLargeDraw)&&(r&&r.remove(),r=this._lineDraw=o?new Ab:new oh(i?a?Ig:ph:a?Fs:zs),this._hasEffet=a,this._isPolyline=i,this._isLargeDraw=o,this.group.removeAll()),this.group.add(r.group),r},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),r=e.painter.getType()==="svg";!r&&this._lastZlevel!=null&&e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});function _h(t){return t instanceof Array||(t=[t,t]),t}var Cb="lineStyle.opacity".split("."),lN={seriesType:"lines",reset:function(t,e,r){var a=_h(t.get("symbol")),i=_h(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("opacity",t.get(Cb));function o(s,l){var u=s.getItemModel(l),h=_h(u.getShallow("symbol",!0)),f=_h(u.getShallow("symbolSize",!0)),c=u.get(Cb);h[0]&&s.setItemVisual(l,"fromSymbol",h[0]),h[1]&&s.setItemVisual(l,"toSymbol",h[1]),f[0]&&s.setItemVisual(l,"fromSymbolSize",f[0]),f[1]&&s.setItemVisual(l,"toSymbolSize",f[1]),s.setItemVisual(l,"opacity",c)}return{dataEach:n.hasItemOption?o:null}}};Gt(Tb),Rt(lN),Vt.extend({type:"series.heatmap",getInitialData:function(t,e){return ca(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=_e.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});var uN=256;function Db(){var t=rn();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}Db.prototype={update:function(t,e,r,a,i,n){var o=this._getBrush(),s=this._getGradient(t,i,"inRange"),l=this._getGradient(t,i,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),c=t.length;h.width=e,h.height=r;for(var v=0;v<c;++v){var d=t[v],g=d[0],p=d[1],m=d[2],y=a(m);f.globalAlpha=y,f.drawImage(o,g-u,p-u)}if(!h.width||!h.height)return h;for(var _=f.getImageData(0,0,h.width,h.height),w=_.data,b=0,A=w.length,S=this.minOpacity,D=this.maxOpacity,I=D-S;b<A;){var y=w[b+3]/256,L=Math.floor(y*(uN-1))*4;if(y>0){var P=n(y)?s:l;y>0&&(y=y*I+S),w[b++]=P[L],w[b++]=P[L+1],w[b++]=P[L+2],w[b++]=P[L+3]*y*256}else b+=4}return f.putImageData(_,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=rn()),e=this.pointSize+this.blurSize,r=e*2;t.width=r,t.height=r;var a=t.getContext("2d");return a.clearRect(0,0,r,r),a.shadowOffsetX=r,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-e,e,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),t},_getGradient:function(t,e,r){for(var a=this._gradientPixels,i=a[r]||(a[r]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i}};function hN(t,e,r){var a=t[1]-t[0];e=V(e,function(o){return{interval:[(o.interval[0]-t[0])/a,(o.interval[1]-t[0])/a]}});var i=e.length,n=0;return function(o){for(var s=n;s<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}if(s===i)for(var s=n-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s<i&&r[s]}}function fN(t,e){var r=t[1]-t[0];return e=[(e[0]-t[0])/r,(e[1]-t[0])/r],function(a){return a>=e[0]&&a<=e[1]}}function cN(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}ke({type:"heatmap",render:function(t,e,r){var a;if(e.eachComponent("visualMap",function(n){n.eachTargetSeries(function(o){o===t&&(a=n)})}),T&&!a)throw new Error("Heatmap must use with visualMap");this.group.removeAll(),this._incrementalDisplayable=null;var i=t.coordinateSystem;i.type==="cartesian2d"||i.type==="calendar"?this._renderOnCartesianAndCalendar(t,r,0,t.getData().count()):cN(i)&&this._renderOnGeo(i,t,a,r)},incrementalPrepareRender:function(t,e,r){this.group.removeAll()},incrementalRender:function(t,e,r,a){var i=e.coordinateSystem;i&&this._renderOnCartesianAndCalendar(e,a,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,r,a,i){var n=t.coordinateSystem,o,s;if(n.type==="cartesian2d"){var l=n.getAxis("x"),u=n.getAxis("y");if(T){if(!(l.type==="category"&&u.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(l.onBand&&u.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}o=l.getBandWidth(),s=u.getBandWidth()}for(var h=this.group,f=t.getData(),c="itemStyle",v="emphasis.itemStyle",d="label",g="emphasis.label",p=t.getModel(c).getItemStyle(["color"]),m=t.getModel(v).getItemStyle(),y=t.getModel(d),_=t.getModel(g),w=n.type,b=w==="cartesian2d"?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],A=r;A<a;A++){var S;if(w==="cartesian2d"){if(isNaN(f.get(b[2],A)))continue;var D=n.dataToPoint([f.get(b[0],A),f.get(b[1],A)]);S=new xt({shape:{x:Math.floor(Math.round(D[0])-o/2),y:Math.floor(Math.round(D[1])-s/2),width:Math.ceil(o),height:Math.ceil(s)},style:{fill:f.getItemVisual(A,"color"),opacity:f.getItemVisual(A,"opacity")}})}else{if(isNaN(f.get(b[1],A)))continue;S=new xt({z2:1,shape:n.dataToRect([f.get(b[0],A)]).contentShape,style:{fill:f.getItemVisual(A,"color"),opacity:f.getItemVisual(A,"opacity")}})}var I=f.getItemModel(A);f.hasItemOption&&(p=I.getModel(c).getItemStyle(["color"]),m=I.getModel(v).getItemStyle(),y=I.getModel(d),_=I.getModel(g));var L=t.getRawValue(A),P="-";L&&L[2]!=null&&(P=L[2]),Fe(p,m,y,_,{labelFetcher:t,labelDataIndex:A,defaultText:P,isRectText:!0}),S.setStyle(p),Ot(S,f.hasItemOption?m:et({},m)),S.incremental=i,i&&(S.useHoverLayer=!0),h.add(S),f.setItemGraphicEl(A,S)}},_renderOnGeo:function(t,e,r,a){var i=r.targetVisuals.inRange,n=r.targetVisuals.outOfRange,o=e.getData(),s=this._hmLayer||this._hmLayer||new Db;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),f=Math.max(l.y,0),c=Math.min(l.width+l.x,a.getWidth()),v=Math.min(l.height+l.y,a.getHeight()),d=c-h,g=v-f,p=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],m=o.mapArray(p,function(b,A,S){var D=t.dataToPoint([b,A]);return D[0]-=h,D[1]-=f,D.push(S),D}),y=r.getExtent(),_=r.type==="visualMap.continuous"?fN(y,r.option.range):hN(y,r.getPieceList(),r.option.selected);s.update(m,d,g,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:n.color.getColorMapper()},_);var w=new ve({style:{width:d,height:g,x:h,y:f,image:s.canvas},silent:!0});this.group.add(w)},dispose:function(){}});var vN=q1.extend({type:"series.pictorialBar",dependencies:["grid"],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%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,vN.superApply(this,"getInitialData",arguments)}}),dN=["itemStyle","borderWidth"],Mb=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Lg=new Br,q5=ke({type:"pictorialBar",render:function(t,e,r){var a=this.group,i=t.getData(),n=this._data,o=t.coordinateSystem,s=o.getBaseAxis(),l=!!s.isHorizontal(),u=o.grid.getRect(),h={ecSize:{width:r.getWidth(),height:r.getHeight()},seriesModel:t,coordSys:o,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:l,valueDim:Mb[+l],categoryDim:Mb[1-l]};return i.diff(n).add(function(f){if(!!i.hasValue(f)){var c=Nb(i,f),v=Ib(i,f,c,h),d=kb(i,h,v);i.setItemGraphicEl(f,d),a.add(d),Vb(d,h,v)}}).update(function(f,c){var v=n.getItemGraphicEl(c);if(!i.hasValue(f)){a.remove(v);return}var d=Nb(i,f),g=Ib(i,f,d,h),p=Bb(i,g);v&&p!==v.__pictorialShapeStr&&(a.remove(v),i.setItemGraphicEl(f,null),v=null),v?wN(v,h,g):v=kb(i,h,g,!0),i.setItemGraphicEl(f,v),v.__pictorialSymbolMeta=g,a.add(v),Vb(v,h,g)}).remove(function(f){var c=n.getItemGraphicEl(f);c&&zb(n,f,c.__pictorialSymbolMeta.animationModel,c)}).execute(),this._data=i,this.group},dispose:ce,remove:function(t,e){var r=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(i){zb(a,i.dataIndex,t,i)}):r.removeAll()}});function Ib(t,e,r,a){var i=t.getItemLayout(e),n=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),c={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:f?r:null,hoverAnimation:f&&r.get("hoverAnimation"),z2:r.getShallow("z",!0)||0};gN(r,n,i,a,c),pN(t,e,i,n,o,c.boundingLength,c.pxSign,h,a,c),mN(r,c.symbolScale,u,a,c);var v=c.symbolSize,d=r.get("symbolOffset");return z(d)&&(d=[H(d[0],v[0]),H(d[1],v[1])]),yN(r,v,i,n,o,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,a,c),c}function gN(t,e,r,a,i){var n=a.valueDim,o=t.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[n.wh]<=0),h;if(z(o)){var f=[Pg(s,o[0])-l,Pg(s,o[1])-l];f[1]<f[0]&&f.reverse(),h=f[u]}else o!=null?h=Pg(s,o)-l:e?h=a.coordSysExtent[n.index][u]-l:h=r[n.wh];i.boundingLength=h,e&&(i.repeatCutLength=r[n.wh]),i.pxSign=h>0?1:h<0?-1:0}function Pg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function pN(t,e,r,a,i,n,o,s,l,u){var h=l.valueDim,f=l.categoryDim,c=Math.abs(r[f.wh]),v=t.getItemVisual(e,"symbolSize");z(v)?v=v.slice():(v==null&&(v="100%"),v=[v,v]),v[f.index]=H(v[f.index],c),v[h.index]=H(v[h.index],a?c:Math.abs(n)),u.symbolSize=v;var d=u.symbolScale=[v[0]/s,v[1]/s];d[h.index]*=(l.isHorizontal?-1:1)*o}function mN(t,e,r,a,i){var n=t.get(dN)||0;n&&(Lg.attr({scale:e.slice(),rotation:r}),Lg.updateTransform(),n/=Lg.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n}function yN(t,e,r,a,i,n,o,s,l,u,h,f){var c=h.categoryDim,v=h.valueDim,d=f.pxSign,g=Math.max(e[v.index]+s,0),p=g;if(a){var m=Math.abs(l),y=Ut(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=H(y,e[v.index]);var w=Math.max(g+y*2,0),b=_?0:y*2,A=my(a),S=A?a:Gb((m+b)/w),D=m-S*g;y=D/2/(_?S:S-1),w=g+y*2,b=_?0:y*2,!A&&a!=="fixed"&&(S=u?Gb((Math.abs(u)+b)/w):0),p=S*w-b,f.repeatTimes=S,f.symbolMargin=y}var I=d*(p/2),L=f.pathPosition=[];L[c.index]=r[c.wh]/2,L[v.index]=o==="start"?I:o==="end"?l-I:l/2,n&&(L[0]+=n[0],L[1]+=n[1]);var P=f.bundlePosition=[];P[c.index]=r[c.xy],P[v.index]=r[v.xy];var R=f.barRectShape=et({},r);R[v.wh]=d*Math.max(Math.abs(r[v.wh]),Math.abs(L[v.index]+I)),R[c.wh]=r[c.wh];var E=f.clipShape={};E[c.xy]=-r[c.xy],E[c.wh]=h.ecSize[c.wh],E[v.xy]=0,E[v.wh]=r[v.wh]}function Lb(t){var e=t.symbolPatternSize,r=Ye(t.symbolType,-e/2,-e/2,e,e,t.color);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function Pb(t,e,r,a){var i=t.__pictorialBundle,n=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,h=0,f=n[e.valueDim.index]+o+r.symbolMargin*2;for(Ws(t,function(m){m.__pictorialAnimationIndex=h,m.__pictorialRepeatTimes=u,h<u?ao(m,null,d(h),r,a):ao(m,null,{scale:[0,0]},r,a,function(){i.remove(m)}),Eg(m,r),h++});h<u;h++){var c=Lb(r);c.__pictorialAnimationIndex=h,c.__pictorialRepeatTimes=u,i.add(c);var v=d(h);ao(c,{position:v.position,scale:[0,0]},{scale:v.scale,rotation:v.rotation},r,a),c.on("mouseover",g).on("mouseout",p),Eg(c,r)}function d(m){var y=s.slice(),_=r.pxSign,w=m;return(r.symbolRepeatDirection==="start"?_>0:_<0)&&(w=u-1-m),y[l.index]=f*(w-u/2+.5)+s[l.index],{position:y,scale:r.symbolScale.slice(),rotation:r.rotation}}function g(){Ws(t,function(m){m.trigger("emphasis")})}function p(){Ws(t,function(m){m.trigger("normal")})}}function Eb(t,e,r,a){var i=t.__pictorialBundle,n=t.__pictorialMainPath;n?ao(n,null,{position:r.pathPosition.slice(),scale:r.symbolScale.slice(),rotation:r.rotation},r,a):(n=t.__pictorialMainPath=Lb(r),i.add(n),ao(n,{position:r.pathPosition.slice(),scale:[0,0],rotation:r.rotation},{scale:r.symbolScale.slice()},r,a),n.on("mouseover",o).on("mouseout",s)),Eg(n,r);function o(){this.trigger("emphasis")}function s(){this.trigger("normal")}}function Rb(t,e,r){var a=et({},e.barRectShape),i=t.__pictorialBarRect;i?ao(i,null,{shape:a},e,r):(i=t.__pictorialBarRect=new xt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(i))}function Ob(t,e,r,a){if(r.symbolClip){var i=t.__pictorialClipPath,n=et({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)ft(i,{shape:n},s,l);else{n[o.wh]=0,i=new xt({shape:n}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],sa[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function Nb(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=_N,r.isAnimationEnabled=xN,r}function _N(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function xN(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Eg(t,e){t.off("emphasis").off("normal");var r=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[r[0]*1.1,r[1]*1.1]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:r.slice()},400,"elasticOut")})}function kb(t,e,r,a){var i=new q,n=new q;return i.add(n),i.__pictorialBundle=n,n.attr("position",r.bundlePosition.slice()),r.symbolRepeat?Pb(i,e,r):Eb(i,e,r),Rb(i,r,a),Ob(i,e,r,a),i.__pictorialShapeStr=Bb(t,r),i.__pictorialSymbolMeta=r,i}function wN(t,e,r){var a=r.animationModel,i=r.dataIndex,n=t.__pictorialBundle;ft(n,{position:r.bundlePosition.slice()},a,i),r.symbolRepeat?Pb(t,e,r,!0):Eb(t,e,r,!0),Rb(t,r,!0),Ob(t,e,r,!0)}function zb(t,e,r,a){var i=a.__pictorialBarRect;i&&(i.style.text=null);var n=[];Ws(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(r=null),M(n,function(o){ft(o,{scale:[0,0]},r,e,function(){a.parent&&a.parent.remove(a)})}),t.setItemGraphicEl(e,null)}function Bb(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Ws(t,e,r){M(t.__pictorialBundle.children(),function(a){a!==t.__pictorialBarRect&&e.call(r,a)})}function ao(t,e,r,a,i,n){e&&t.attr(e),a.symbolClip&&!i?r&&t.attr(r):r&&sa[i?"updateProps":"initProps"](t,r,a.animationModel,a.dataIndex,n)}function Vb(t,e,r){var a=r.color,i=r.dataIndex,n=r.itemModel,o=n.getModel("itemStyle").getItemStyle(["color"]),s=n.getModel("emphasis.itemStyle").getItemStyle(),l=n.getShallow("cursor");Ws(t,function(c){c.setColor(a),c.setStyle(J({fill:a,opacity:r.opacity},o)),Ot(c,s),l&&(c.cursor=l),c.z2=r.z2});var u={},h=e.valueDim.posDesc[+(r.boundingLength>0)],f=t.__pictorialBarRect;K1(f.style,u,n,a,e.seriesModel,i,h),Ot(f,u)}function Gb(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}Gt(ot(J_,"pictorialBar")),Rt(Ii("pictorialBar","roundRect"));var xh=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom",this.orient=null};xh.prototype={constructor:xh,model:null,isHorizontal:function(){var t=this.position;return t==="top"||t==="bottom"},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},It(xh,Qt);function wh(t,e,r){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,r),this.model=t}wh.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:wh,_init:function(t,e,r){var a=this.dimension,i=new xh(a,zn(t),[0,0],t.get("type"),t.get("position")),n=i.type==="category";i.onBand=n&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},update:function(t,e){t.eachSeries(function(r){if(r.coordinateSystem===this){var a=r.getData();M(a.mapDimension(this.dimension,!0),function(i){this._axis.scale.unionExtentFromData(a,i)},this),Fa(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=qt({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,r=e.isHorizontal(),a=r?[0,t.width]:[0,t.height],i=e.reverse?1:0;e.setExtent(a[i],a[1-i]),this._updateAxisTransform(e,r?t.x:t.y)},_updateAxisTransform:function(t,e){var r=t.getExtent(),a=r[0]+r[1],i=t.isHorizontal();t.toGlobalCoord=i?function(n){return n+e}:function(n){return a-n+e},t.toLocalCoord=i?function(n){return n-e}:function(n){return a-n+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),r=this.getAxis(),a=r.orient;return a==="horizontal"?r.contain(r.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:r.contain(r.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),r=this.getRect(),a=[],i=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),a[i]=e.toGlobalCoord(e.dataToCoord(+t)),a[1-i]=i===0?r.y+r.height/2:r.x+r.width/2,a}};function bN(t,e){var r=[];return t.eachComponent("singleAxis",function(a,i){var n=new wh(a,t,e);n.name="single_"+i,n.resize(a,e),a.coordinateSystem=n,r.push(n)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=t.queryComponents({mainType:"singleAxis",index:a.get("singleAxisIndex"),id:a.get("singleAxisId")})[0];a.coordinateSystem=i&&i.coordinateSystem}}),r}_e.register("single",{create:bN,dimensions:wh.prototype.dimensions});function Rg(t,e){e=e||{};var r=t.coordinateSystem,a=t.axis,i={},n=a.position,o=a.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var h={horizontal:0,vertical:1};i.rotation=Math.PI/2*h[o];var f={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=f[n],t.get("axisTick.inside")&&(i.tickDirection=-i.tickDirection),Ut(e.labelInside,t.get("axisLabel.inside"))&&(i.labelDirection=-i.labelDirection);var c=e.rotate;return c==null&&(c=t.get("axisLabel.rotate")),i.labelRotation=n==="top"?-c:c,i.z2=1,i}var SN=["axisLine","axisTickLabel","axisName"],AN=["splitArea","splitLine"],TN=Xe.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,r,a){var i=this.group;i.removeAll();var n=this._axisGroup;this._axisGroup=new q;var o=Rg(t),s=new ze(t,o);M(SN,s.add,s),i.add(this._axisGroup),i.add(s.getGroup()),M(AN,function(l){t.get(l+".show")&&this["_"+l](t)},this),au(n,this._axisGroup,t),TN.superCall(this,"render",t,e,r,a)},remove:function(){X1(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var r=t.getModel("splitLine"),a=r.getModel("lineStyle"),i=a.get("width"),n=a.get("color");n=n instanceof Array?n:[n];for(var o=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:r}),f=[],c=[],v=0;v<h.length;++v){var d=e.toGlobalCoord(h[v].coord);s?(f[0]=d,f[1]=o.y,c[0]=d,c[1]=o.y+o.height):(f[0]=o.x,f[1]=d,c[0]=o.x+o.width,c[1]=d);var g=u++%n.length;l[g]=l[g]||[],l[g].push(new ye({subPixelOptimize:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:{lineWidth:i},silent:!0}))}for(var v=0;v<l.length;++v)this.group.add(or(l[v],{style:{stroke:n[v%n.length],lineDash:a.getLineDash(i),lineWidth:i},silent:!0}))}},_splitArea:function(t){Y1(this,this._axisGroup,t,t)}}),Hb=wt.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),CN={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}};function DN(t,e){return e.type||(e.data?"category":"value")}ut(Hb.prototype,Di),Gn("single",Hb,DN,CN);var Fb=function(t,e){var r=[],a=t.seriesIndex,i;if(a==null||!(i=e.getSeriesByIndex(a)))return{point:[]};var n=i.getData(),o=Rl(n,t);if(o==null||o<0||z(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)r=l.dataToPoint(n.getValues(V(l.dimensions,function(h){return n.mapDimension(h)}),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),r=[u.x+u.width/2,u.y+u.height/2]}return{point:r,el:s}},qr=M,Wb=ot,Ub=Pe(),MN=function(t,e,r){var a=t.currTrigger,i=[t.x,t.y],n=t,o=t.dispatchAction||it(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){bh(i)&&(i=Fb({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=bh(i),u=n.axesInfo,h=s.axesInfo,f=a==="leave"||bh(i),c={},v={},d={list:[],map:{}},g={showPointer:Wb(LN,v),showTooltip:Wb(PN,d)};qr(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);qr(s.coordSysAxesInfo[y],function(w,b){var A=w.axis,S=NN(u,w);if(!f&&_&&(!u||S)){var D=S&&S.value;D==null&&!l&&(D=A.pointToData(i)),D!=null&&$b(w,D,g,!1,c)}})});var p={};return qr(h,function(m,y){var _=m.linkGroup;_&&!v[y]&&qr(_.axesInfo,function(w,b){var A=v[b];if(w!==m&&A){var S=A.value;_.mapper&&(S=m.axis.scale.parse(_.mapper(S,Zb(w),Zb(m)))),p[m.key]=S}})}),qr(p,function(m,y){$b(h[y],m,g,!0,c)}),EN(v,h,c),RN(d,i,t,o),ON(h,o,r),c}};function $b(t,e,r,a,i){var n=t.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=IN(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&et(i,s[0]),!a&&t.snap&&n.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s,i),r.showTooltip(t,o,l)}}function IN(t,e){var r=e.axis,a=r.dim,i=t,n=[],o=Number.MAX_VALUE,s=-1;return qr(e.seriesModels,function(l,u){var h=l.getData().mapDimension(a,!0),f,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(h,t,r);c=v.dataIndices,f=v.nestestValue}else{if(c=l.getData().indicesOfNearest(h[0],t,r.type==="category"?.5:null),!c.length)return;f=l.getData().get(h[0],c[0])}if(!(f==null||!isFinite(f))){var d=t-f,g=Math.abs(d);g<=o&&((g<o||d>=0&&s<0)&&(o=g,s=d,i=f,n.length=0),qr(c,function(p){n.push({seriesIndex:l.seriesIndex,dataIndexInside:p,dataIndex:l.getData().getRawIndex(p)})}))}}),{payloadBatch:n,snapToValue:i}}function LN(t,e,r,a){t[e.key]={value:r,payloadBatch:a}}function PN(t,e,r,a){var i=r.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=xs(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:i.slice()})}}function EN(t,e,r){var a=r.axesInfo=[];qr(e,function(i,n){var o=i.axisPointerModel.option,s=t[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function RN(t,e,r,a){if(bh(e)||!t.list.length){a({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function ON(t,e,r){var a=r.getZr(),i="axisPointerLastHighlights",n=Ub(a)[i]||{},o=Ub(a)[i]={};qr(t,function(u,h){var f=u.axisPointerModel.option;f.status==="show"&&qr(f.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];M(n,function(u,h){!o[h]&&l.push(u)}),M(o,function(u,h){!n[h]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function NN(t,e){for(var r=0;r<(t||[]).length;r++){var a=t[r];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function Zb(t){var e=t.axis.model,r={},a=r.axisDim=t.axis.dim;return r.axisIndex=r[a+"AxisIndex"]=e.componentIndex,r.axisName=r[a+"AxisName"]=e.name,r.axisId=r[a+"AxisId"]=e.id,r}function bh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}var K5=Ze({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},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}}}),ga=Pe(),kN=M;function Yb(t,e,r){if(!G.node){var a=e.getZr();ga(a).records||(ga(a).records={}),zN(a,e);var i=ga(a).records[t]||(ga(a).records[t]={});i.handler=r}}function zN(t,e){if(ga(t).initialized)return;ga(t).initialized=!0,r("click",ot(Xb,"click")),r("mousemove",ot(Xb,"mousemove")),r("globalout",VN);function r(a,i){t.on(a,function(n){var o=GN(e);kN(ga(t).records,function(s){s&&i(s,n,o.dispatchAction)}),BN(o.pendings,e)})}}function BN(t,e){var r=t.showTip.length,a=t.hideTip.length,i;r?i=t.showTip[r-1]:a&&(i=t.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function VN(t,e,r){t.handler("leave",null,r)}function Xb(t,e,r,a){e.handler(t,r,a)}function GN(t){var e={showTip:[],hideTip:[]},r=function(a){var i=e[a.type];i?i.push(a):(a.dispatchAction=r,t.dispatchAction(a))};return{dispatchAction:r,pendings:e}}function Og(t,e){if(!G.node){var r=e.getZr(),a=(ga(r).records||{})[t];a&&(ga(r).records[t]=null)}}var qb=he({type:"axisPointer",render:function(t,e,r){var a=e.getComponent("tooltip"),i=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Yb("axisPointer",r,function(n,o,s){i!=="none"&&(n==="leave"||i.indexOf(n)>=0)&&s({type:"updateAxisPointer",currTrigger:n,x:o&&o.offsetX,y:o&&o.offsetY})})},remove:function(t,e){Og(e.getZr(),"axisPointer"),qb.superApply(this._model,"remove",arguments)},dispose:function(t,e){Og("axisPointer",e),qb.superApply(this._model,"dispose",arguments)}}),Fi=Pe(),Kb=rt,Ng=it;function Wi(){}Wi.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,r,a){var i=e.get("value"),n=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=r,!(!a&&this._lastValue===i&&this._lastStatus===n)){this._lastValue=i,this._lastStatus=n;var o=this._group,s=this._handle;if(!n||n==="hide"){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var l={};this.makeElOption(l,i,t,e,r);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(!o)o=this._group=new q,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),r.getZr().add(o);else{var f=ot(jb,e,h);this.updatePointerEl(o,l,f,e),this.updateLabelEl(o,l,f,e)}tS(o,e,!0),this._renderHandle(i)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var r=e.get("animation"),a=t.axis,i=a.type==="category",n=e.get("snap");if(!n&&!i)return!1;if(r==="auto"||r==null){var o=this.animationThreshold;if(i&&a.getBandWidth()>o)return!0;if(n){var s=gd(t).seriesDataCount,l=a.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return r===!0},makeElOption:function(t,e,r,a,i){},createPointerEl:function(t,e,r,a){var i=e.pointer;if(i){var n=Fi(t).pointerEl=new sa[i.type](Kb(e.pointer));t.add(n)}},createLabelEl:function(t,e,r,a){if(e.label){var i=Fi(t).labelEl=new xt(Kb(e.label));t.add(i),Jb(i,a)}},updatePointerEl:function(t,e,r){var a=Fi(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),r(a,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,r,a){var i=Fi(t).labelEl;i&&(i.setStyle(e.label.style),r(i,{shape:e.label.shape,position:e.label.position}),Jb(i,a))},_renderHandle:function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,r=this._api.getZr(),a=this._handle,i=e.getModel("handle"),n=e.get("status");if(!i.get("show")||!n||n==="hide"){a&&r.remove(a),this._handle=null;return}var o;this._handle||(o=!0,a=this._handle=Ho(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oi(u.event)},onmousedown:Ng(this._onHandleDragMove,this,0,0),drift:Ng(this._onHandleDragMove,this),ondragend:Ng(this._onHandleDragEnd,this)}),r.add(a)),tS(a,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];a.setStyle(i.getItemStyle(null,s));var l=i.get("size");z(l)||(l=[l,l]),a.attr("scale",[l[0]/2,l[1]/2]),es(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){jb(this._axisPointerModel,!e&&this._moveAnimation,this._handle,kg(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var r=this._handle;if(!!r){this._dragging=!0;var a=this.updateHandleTransform(kg(r),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,r.stopAnimation(),r.attr(kg(a)),Fi(r).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(!!t){var e=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},_onHandleDragEnd:function(t){this._dragging=!1;var e=this._handle;if(!!e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),r=this._group,a=this._handle;e&&r&&(this._lastGraphicKey=null,r&&e.remove(r),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}},Wi.prototype.constructor=Wi;function jb(t,e,r,a){Qb(Fi(r).lastProp,a)||(Fi(r).lastProp=a,e?ft(r,a,t):(r.stopAnimation(),r.attr(a)))}function Qb(t,e){if(lt(t)&&lt(e)){var r=!0;return M(e,function(a,i){r=r&&Qb(t[i],a)}),!!r}else return t===e}function Jb(t,e){t[e.get("label.show")?"show":"hide"]()}function kg(t){return{position:t.position.slice(),rotation:t.rotation||0}}function tS(t,e,r){var a=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(n){n.type!=="group"&&(a!=null&&(n.z=a),i!=null&&(n.zlevel=i),n.silent=r)})}Lo(Wi);function zg(t){var e=t.get("type"),r=t.getModel(e+"Style"),a;return e==="line"?(a=r.getLineStyle(),a.fill=null):e==="shadow"&&(a=r.getAreaStyle(),a.stroke=null),a}function eS(t,e,r,a,i){var n=r.get("value"),o=rS(n,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get("label.precision"),formatter:r.get("label.formatter")}),s=r.getModel("label"),l=xi(s.get("padding")||0),u=s.getFont(),h=Rr(o,u),f=i.position,c=h.width+l[1]+l[3],v=h.height+l[0]+l[2],d=i.align;d==="right"&&(f[0]-=c),d==="center"&&(f[0]-=c/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=v),g==="middle"&&(f[1]-=v/2),HN(f,c,v,a);var p=s.get("backgroundColor");(!p||p==="auto")&&(p=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:v,r:s.get("borderRadius")},position:f.slice(),style:{text:o,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:p,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function HN(t,e,r,a){var i=a.getWidth(),n=a.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,n)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function rS(t,e,r,a,i){t=e.scale.parse(t);var n=e.scale.getLabel(t,{precision:i.precision}),o=i.formatter;if(o){var s={value:ed(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};M(a,function(l){var u=r.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=u&&u.getDataParams(h);f&&s.seriesData.push(f)}),Lt(o)?n=o.replace("{value}",n):se(o)&&(n=o(s))}return n}function Bg(t,e,r){var a=Ie();return aa(a,a,r.rotation),yr(a,a,r.position),Hr([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],a)}function aS(t,e,r,a,i,n){var o=ze.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get("label.margin"),eS(e,a,i,n,{position:Bg(a.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Vg(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function iS(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function nS(t,e,r,a,i,n){return{cx:t,cy:e,r0:r,r:a,startAngle:i,endAngle:n,clockwise:!0}}var FN=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.grid,s=a.get("type"),l=oS(o,n).getOtherAxis(n).getGlobalExtent(),u=n.toGlobalCoord(n.dataToCoord(e,!0));if(s&&s!=="none"){var h=zg(a),f=WN[s](n,u,l);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=yd(o.model,r);aS(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=yd(e.axis.grid.model,e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:Bg(e.axis,t,a),rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,a){var i=r.axis,n=i.grid,o=i.getGlobalExtent(!0),s=oS(n,i).getOtherAxis(i).getGlobalExtent(),l=i.dim==="x"?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var h=(s[1]+s[0])/2,f=[h,h];f[l]=u[l];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:f,tooltipOption:c[l]}}});function oS(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var WN={line:function(t,e,r){var a=Vg([e,r[0]],[e,r[1]],sS(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:iS([e-a/2,r[0]],[a,i],sS(t))}}};function sS(t){return t.dim==="x"?0:1}Xe.registerAxisPointerClass("CartesianAxisPointer",FN),we(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!z(e)&&(t.axisPointer.link=[e])}}),$e(Wr.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=QL(t,e)}),mt({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},MN);var lS=["x","y"],UN=["width","height"],$N=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.coordinateSystem,s=Gg(o,1-Sh(n)),l=o.dataToPoint(e)[0],u=a.get("type");if(u&&u!=="none"){var h=zg(a),f=ZN[u](n,l,s);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=Rg(r);aS(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=Rg(e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:Bg(e.axis,t,a),rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,a){var i=r.axis,n=i.coordinateSystem,o=Sh(i),s=Gg(n,o),l=t.position;l[o]+=e[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var u=Gg(n,1-o),h=(u[1]+u[0])/2,f=[h,h];return f[o]=l[o],{position:l,rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}}}),ZN={line:function(t,e,r){var a=Vg([e,r[0]],[e,r[1]],Sh(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:iS([e-a/2,r[0]],[a,i],Sh(t))}}};function Sh(t){return t.isHorizontal()?0:1}function Gg(t,e){var r=t.getRect();return[r[lS[e]],r[lS[e]]+r[UN[e]]]}Xe.registerAxisPointerClass("SingleAxisPointer",$N),he({type:"single"});var Hg=2,YN=Vt.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){YN.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this))},fixData:function(t){var e=t.length,r=Ec(t,function(m){return m[2]}),a=[];r.buckets.each(function(m,y){a.push({name:y,dataList:m})});for(var i=a.length,n=-1,o=-1,s=0;s<i;++s){var l=a[s].dataList.length;l>n&&(n=l,o=s)}for(var u=0;u<i;++u)if(u!==o)for(var h=a[u].name,f=0;f<n;++f){for(var c=a[o].dataList[f][0],v=a[u].dataList.length,d=-1,g=0;g<v;++g){var p=a[u].dataList[g][0];if(p===c){d=g;break}}d===-1&&(t[e]=[],t[e][0]=c,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var r=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0],a=r.get("type"),i=ee(t.data,function(c){return c[2]!==void 0}),n=this.fixData(i||[]),o=[],s=this.nameMap=ht(),l=0,u=0;u<n.length;++u)o.push(n[u][Hg]),s.get(n[u][Hg])||(s.set(n[u][Hg],l),l++);var h=En(n,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Iu(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),f=new fe(h,this);return f.initData(n),f},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),r=[],a=0;a<e;++a)r[a]=a;var i=t.mapDimension("single"),n=Ec(r,function(s){return t.get("name",s)}),o=[];return n.buckets.each(function(s,l){s.sort(function(u,h){return t.get(i,u)-t.get(i,h)}),o.push({name:l,indices:s})}),o},getAxisTooltipData:function(t,e,r){z(t)||(t=t?[t]:[]);for(var a=this.getData(),i=this.getLayerSeries(),n=[],o=i.length,s,l=0;l<o;++l){for(var u=Number.MAX_VALUE,h=-1,f=i[l].indices.length,c=0;c<f;++c){var v=a.get(t[0],i[l].indices[c]),d=Math.abs(v-e);d<=u&&(s=v,u=d,h=i[l].indices[c])}n.push(h)}return{dataIndices:n,nestestValue:s}},formatTooltip:function(t){var e=this.getData(),r=e.getName(t),a=e.get(e.mapDimension("value"),t);return(isNaN(a)||a==null)&&(a="-"),kt(r+" : "+a)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});ke({type:"themeRiver",init:function(){this._layers=[]},render:function(t,e,r){var a=t.getData(),i=this.group,n=t.getLayerSeries(),o=a.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;i.attr("position",[0,s.y+l[0]]);function u(v){return v.name}var h=new ha(this._layersSeries||[],n,u,u),f={};h.add(it(c,this,"add")).update(it(c,this,"update")).remove(it(c,this,"remove")).execute();function c(v,d,g){var p=this._layers;if(v==="remove"){i.remove(p[d]);return}for(var m=[],y=[],_,w=n[d].indices,b=0;b<w.length;b++){var A=a.getItemLayout(w[b]),S=A.x,D=A.y0,I=A.y;m.push([S,D]),y.push([S,D+I]),_=a.getItemVisual(w[b],"color")}var L,P,R=a.getItemLayout(w[0]),E=a.getItemModel(w[b-1]),Z=E.getModel("label"),W=Z.get("margin");if(v==="add"){var $=f[d]=new q;L=new A1({shape:{points:m,stackedOnPoints:y,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),P=new dt({style:{x:R.x-W,y:R.y0+R.y/2}}),$.add(L),$.add(P),i.add($),L.setClipPath(XN(L.getBoundingRect(),t,function(){L.removeClipPath()}))}else{var $=p[g];L=$.childAt(0),P=$.childAt(1),i.add($),f[d]=$,ft(L,{shape:{points:m,stackedOnPoints:y}},t),ft(P,{style:{x:R.x-W,y:R.y0+R.y/2}},t)}var X=E.getModel("emphasis.itemStyle"),K=E.getModel("itemStyle");$t(P.style,Z,{text:Z.get("show")?t.getFormattedLabel(w[b-1],"normal")||a.getName(w[b-1]):null,textVerticalAlign:"middle"}),L.setStyle(et({fill:_},K.getItemStyle(["color"]))),Ot(L,X.getItemStyle())}this._layersSeries=n,this._layers=f},dispose:function(){}});function XN(t,e,r){var a=new xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Se(a,{shape:{width:t.width+20,height:t.height+20}},e,r),a}var qN=function(t,e){t.eachSeriesByType("themeRiver",function(r){var a=r.getData(),i=r.coordinateSystem,n={},o=i.getRect();n.rect=o;var s=r.get("boundaryGap"),l=i.getAxis();if(n.boundaryGap=s,l.orient==="horizontal"){s[0]=H(s[0],o.height),s[1]=H(s[1],o.height);var u=o.height-s[0]-s[1];uS(a,r,u)}else{s[0]=H(s[0],o.width),s[1]=H(s[1],o.width);var h=o.width-s[0]-s[1];uS(a,r,h)}a.setLayout("layoutInfo",n)})};function uS(t,e,r){if(!!t.count())for(var a=e.coordinateSystem,i=e.getLayerSeries(),n=t.mapDimension("single"),o=t.mapDimension("value"),s=V(i,function(p){return V(p.indices,function(m){var y=a.dataToPoint(t.get(n,m));return y[1]=t.get(o,m),y})}),l=KN(s),u=l.y0,h=r/l.max,f=i.length,c=i[0].indices.length,v,d=0;d<c;++d){v=u[d]*h,t.setItemLayout(i[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:v,y:s[0][d][1]*h});for(var g=1;g<f;++g)v+=s[g-1][d][1]*h,t.setItemLayout(i[g].indices[d],{layerIndex:g,x:s[g][d][0],y0:v,y:s[g][d][1]*h})}}function KN(t){for(var e=t.length,r=t[0].length,a=[],i=[],n=0,o,s={},l=0;l<r;++l){for(var u=0,o=0;u<e;++u)o+=t[u][l][1];o>n&&(n=o),a.push(o)}for(var h=0;h<r;++h)i[h]=(n-a[h])/2;n=0;for(var f=0;f<r;++f){var c=a[f]+i[f];c>n&&(n=c)}return s.y0=i,s.max=n,s}var jN=function(t){t.eachSeriesByType("themeRiver",function(e){var r=e.getData(),a=e.getRawData(),i=e.get("color"),n=ht();r.each(function(o){n.set(r.getRawIndex(o),o)}),a.each(function(o){var s=a.getName(o),l=i[(e.nameMap.get(s)-1)%i.length];a.setItemVisual(o,"color",l);var u=n.get(o);u!=null&&r.setItemVisual(u,"color",l)})})};Gt(qN),Rt(jN),$e(bs("themeRiver")),Vt.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var r={name:t.name,children:t.data};hS(r);var a=t.levels||[],i={};return i.levels=a,Ei.createTree(r,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Vt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Vd(r,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",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},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});function hS(t){var e=0;M(t.children,function(a){hS(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var r=t.value;z(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),z(t.value)?t.value[0]=r:t.value=r}var Ah={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},QN=2,JN=4;function Th(t,e,r){q.call(this);var a=new Ar({z2:QN});a.seriesIndex=e.seriesIndex;var i=new dt({z2:JN,silent:t.getModel("label").get("silent")});this.add(a),this.add(i),this.updateData(!0,t,"normal",e,r);function n(){i.ignore=i.hoverIgnore}function o(){i.ignore=i.normalIgnore}this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}var Ui=Th.prototype;Ui.updateData=function(t,e,r,a,i){this.node=e,e.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var n=this.childAt(0);n.dataIndex=e.dataIndex;var o=e.getModel(),s=e.getLayout(),l=et({},s);l.label=null;var u=tk(e,a,i);ak(e,a,u);var h=o.getModel("itemStyle").getItemStyle(),f;if(r==="normal")f=h;else{var c=o.getModel(r+".itemStyle").getItemStyle();f=ut(c,h)}f=J({lineJoin:"bevel",fill:f.fill||u},f),t?(n.setShape(l),n.shape.r=s.r0,ft(n,{shape:{r:s.r}},a,e.dataIndex),n.useStyle(f)):typeof f.fill=="object"&&f.fill.type||typeof n.style.fill=="object"&&n.style.fill.type?(ft(n,{shape:l},a),n.useStyle(f)):ft(n,{shape:l,style:f},a),this._updateLabel(a,u,r);var v=o.getShallow("cursor");if(v&&n.attr("cursor",v),t){var d=a.getShallow("highlightPolicy");this._initEvents(n,e,a,d)}this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel,Ot(this)},Ui.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(r){r.piece&&(e.node===r?r.piece.updateData(!1,r,"emphasis"):rk(r,e.node,t)?r.piece.childAt(0).trigger("highlight"):t!==Ah.NONE&&r.piece.childAt(0).trigger("downplay"))})},Ui.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},Ui.onHighlight=function(){this.updateData(!1,this.node,"highlight")},Ui.onDownplay=function(){this.updateData(!1,this.node,"downplay")},Ui._updateLabel=function(t,e,r){var a=this.node.getModel(),i=a.getModel("label"),n=r==="normal"||r==="emphasis"?i:a.getModel(r+".label"),o=a.getModel("emphasis.label"),s=Ut(t.getFormattedLabel(this.node.dataIndex,r,null,null,"label"),this.node.name);S("show")===!1&&(s="");var l=this.node.getLayout(),u=n.get("minAngle");u==null&&(u=i.get("minAngle")),u=u/180*Math.PI;var h=l.endAngle-l.startAngle;u!=null&&Math.abs(h)<u&&(s="");var f=this.childAt(1);Fe(f.style,f.hoverStyle||{},i,o,{defaultText:n.getShallow("show")?s:null,autoColor:e,useInsideStyle:!0});var c=(l.startAngle+l.endAngle)/2,v=Math.cos(c),d=Math.sin(c),g,p=S("position"),m=S("distance")||0,y=S("align");p==="outside"?(g=l.r+m,y=c>Math.PI/2?"right":"left"):!y||y==="center"?(g=(l.r+l.r0)/2,y="center"):y==="left"?(g=l.r0+m,c>Math.PI/2&&(y="right")):y==="right"&&(g=l.r-m,c>Math.PI/2&&(y="left")),f.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var _=g*v+l.cx,w=g*d+l.cy;f.attr("position",[_,w]);var b=S("rotate"),A=0;b==="radial"?(A=-c,A<-Math.PI/2&&(A+=Math.PI)):b==="tangential"?(A=Math.PI/2-c,A>Math.PI/2?A-=Math.PI:A<-Math.PI/2&&(A+=Math.PI)):typeof b=="number"&&(A=b*Math.PI/180),f.attr("rotation",A);function S(D){var I=n.get(D);return I??i.get(D)}},Ui._initEvents=function(t,e,r,a){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var i=this,n=function(){i.onEmphasis(a)},o=function(){i.onNormal()},s=function(){i.onDownplay()},l=function(){i.onHighlight()};r.isAnimationEnabled()&&t.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o).on("downplay",s).on("highlight",l)},It(Th,q);function tk(t,e,r){var a=t.getVisual("color"),i=t.getVisual("visualMeta");(!i||i.length===0)&&(a=null);var n=t.getModel("itemStyle").get("color");if(n)return n;if(a)return a;if(t.depth===0)return r.option.color[0];var o=r.option.color.length;return n=r.option.color[ek(t)%o],n}function ek(t){for(var e=t;e.depth>1;)e=e.parentNode;var r=t.getAncestors()[0];return yt(r.children,e)}function rk(t,e,r){return r===Ah.NONE?!1:r===Ah.SELF?t===e:r===Ah.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e)}function ak(t,e,r){var a=e.getData();a.setItemVisual(t.dataIndex,"color",r)}var ik="sunburstRootToNode",j5=ue.extend({type:"sunburst",init:function(){},render:function(t,e,r,a){var i=this;this.seriesModel=t,this.api=r,this.ecModel=e;var n=t.getData(),o=n.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode(function(y){h.push(y)});var f=this._oldChildren||[];if(d(h,f),m(o,s),a&&a.highlight&&a.highlight.piece){var c=t.getShallow("highlightPolicy");a.highlight.piece.onEmphasis(c)}else if(a&&a.unhighlight){var v=this.virtualPiece;!v&&o.children.length&&(v=o.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=h;function d(y,_){if(y.length===0&&_.length===0)return;new ha(_,y,w,w).add(b).update(b).remove(ot(b,null)).execute();function w(A){return A.getId()}function b(A,S){var D=A==null?null:y[A],I=S==null?null:_[S];g(D,I)}}function g(y,_){if(!u&&y&&!y.getValue()&&(y=null),y!==o&&_!==o){if(_&&_.piece)y?(_.piece.updateData(!1,y,"normal",t,e),n.setItemGraphicEl(y.dataIndex,_.piece)):p(_);else if(y){var w=new Th(y,t,e);l.add(w),n.setItemGraphicEl(y.dataIndex,w)}}}function p(y){!y||y.piece&&(l.remove(y.piece),y.piece=null)}function m(y,_){if(_.depth>0){i.virtualPiece?i.virtualPiece.updateData(!1,y,"normal",t,e):(i.virtualPiece=new Th(y,t,e),l.add(i.virtualPiece)),_.piece._onclickEvent&&_.piece.off("click",_.piece._onclickEvent);var w=function(b){i._rootToNode(_.parentNode)};_.piece._onclickEvent=w,i.virtualPiece.on("click",w)}else i.virtualPiece&&(l.remove(i.virtualPiece),i.virtualPiece=null)}},dispose:function(){},_initEvents:function(){var t=this,e=function(r){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(n){if(!a&&n.piece&&n.piece.childAt(0)===r.target){var o=n.getModel().get("nodeClick");if(o==="rootToNode")t._rootToNode(n);else if(o==="link"){var s=n.getModel(),l=s.get("link");if(l){var u=s.get("target",!0)||"_blank";Zo(l,u)}}a=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ik,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var r=e.getData(),a=r.getItemLayout(0);if(a){var i=t[0]-a.cx,n=t[1]-a.cy,o=Math.sqrt(i*i+n*n);return o<=a.r&&o>=a.r0}}}),fS="sunburstRootToNode";mt({type:fS,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=Is(t,[fS],a);if(n){var o=a.getViewRoot();o&&(t.direction=Bd(o,n.node)?"rollUp":"drillDown"),a.resetViewRoot(n.node)}}});var cS="sunburstHighlight";mt({type:cS,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=Is(t,[cS],a);n&&(t.highlight=n.node)}});var nk="sunburstUnhighlight";mt({type:nk,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){t.unhighlight=!0}});var vS=Math.PI/180,ok=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.get("center"),o=i.get("radius");z(o)||(o=[0,o]),z(n)||(n=[n,n]);var s=r.getWidth(),l=r.getHeight(),u=Math.min(s,l),h=H(n[0],s),f=H(n[1],l),c=H(o[0],u/2),v=H(o[1],u/2),d=-i.get("startAngle")*vS,g=i.get("minAngle")*vS,p=i.getData().tree.root,m=i.getViewRoot(),y=m.depth,_=i.get("sort");_!=null&&dS(m,_);var w=0;M(m.children,function(X){!isNaN(X.getValue())&&w++});var b=m.getValue(),A=Math.PI/(b||w)*2,S=m.depth>0,D=m.height-(S?-1:1),I=(v-c)/(D||1),L=i.get("clockwise"),P=i.get("stillShowZeroSum"),R=L?1:-1,E=function(X,K){if(!!X){var Q=K;if(X!==p){var j=X.getValue(),U=b===0&&P?A:j*A;U<g&&(U=g),Q=K+R*U;var tt=X.depth-y-(S?-1:1),ct=c+I*tt,bt=c+I*(tt+1),Et=X.getModel();Et.get("r0")!=null&&(ct=H(Et.get("r0"),u/2)),Et.get("r")!=null&&(bt=H(Et.get("r"),u/2)),X.setLayout({angle:U,startAngle:K,endAngle:Q,clockwise:L,cx:h,cy:f,r0:ct,r:bt})}if(X.children&&X.children.length){var ie=0;M(X.children,function(ol){ie+=E(ol,K+ie)})}return Q-K}};if(S){var Z=c,W=c+I,$=Math.PI*2;p.setLayout({angle:$,startAngle:d,endAngle:d+$,clockwise:L,cx:h,cy:f,r0:Z,r:W})}E(m,d)})};function dS(t,e){var r=t.children||[];t.children=sk(r,e),r.length&&M(t.children,function(a){dS(a,e)})}function sk(t,e){if(typeof e=="function")return t.sort(e);var r=e==="asc";return t.sort(function(a,i){var n=(a.getValue()-i.getValue())*(r?1:-1);return n===0?(a.dataIndex-i.dataIndex)*(r?-1:1):n})}Rt(ot(Zu,"sunburst")),Gt(ot(ok,"sunburst")),$e(ot(bs,"sunburst"));function lk(t,e){return e=e||[0,0],V(["x","y"],function(r,a){var i=this.getAxis(r),n=e[a],o=t[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}var uk=function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:it(lk,t)}}};function hk(t,e){return e=e||[0,0],V([0,1],function(r){var a=e[r],i=t[r]/2,n=[],o=[];return n[r]=a-i,o[r]=a+i,n[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(n)[r]-this.dataToPoint(o)[r])},this)}var fk=function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:it(hk,t)}}};function ck(t,e){var r=this.getAxis(),a=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(a-i)-r.dataToCoord(a+i))}var vk=function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:it(ck,t)}}};function dk(t,e){return V(["Radius","Angle"],function(r,a){var i=this["get"+r+"Axis"](),n=e[a],o=t[a]/2,s="dataTo"+r,l=i.type==="category"?i.getBandWidth():Math.abs(i[s](n-o)-i[s](n+o));return r==="Angle"&&(l=l*Math.PI/180),l},this)}var gk=function(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:it(function(i){var n=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s}),size:it(dk,t)}}},pk=function(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(a,i){return t.dataToPoint(a,i)}}}},gS=Z0,mk=["itemStyle"],yk=["emphasis","itemStyle"],_k=["label"],xk=["emphasis","label"],wk="e\0\0",pS={cartesian2d:uk,geo:fk,singleAxis:vk,polar:gk,calendar:pk};Vt.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(t,e){return ca(this.getSource(),this)},getDataParams:function(t,e,r){var a=Vt.prototype.getDataParams.apply(this,arguments);return r&&(a.info=r.info),a}}),ue.extend({type:"custom",_data:null,render:function(t,e,r,a){var i=this._data,n=t.getData(),o=this.group,s=yS(t,n,e,r);n.diff(i).add(function(u){Fg(null,u,s(u,a),t,o,n)}).update(function(u,h){var f=i.getItemGraphicEl(h);Fg(f,u,s(u,a),t,o,n)}).remove(function(u){var h=i.getItemGraphicEl(u);h&&o.remove(h)}).execute();var l=t.get("clip",!0)?Gu(t.coordinateSystem,!1,t):null;l?o.setClipPath(l):o.removeClipPath(),this._data=n},incrementalPrepareRender:function(t,e,r){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,r,a,i){var n=e.getData(),o=yS(e,n,r,a);function s(h){h.isGroup||(h.incremental=!0,h.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++){var u=Fg(null,l,o(l,i),e,this.group,n);u.traverse(s)}},dispose:ce,filterForExposedEvent:function(t,e,r,a){var i=e.element;if(i==null||r.name===i)return!0;for(;(r=r.parent)&&r!==this.group;)if(r.name===i)return!0;return!1}});function bk(t){var e=t.type,r;if(e==="path"){var a=t.shape,i=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,n=SS(a);r=zo(n,null,i,a.layout||"center"),r.__customPathData=n}else if(e==="image")r=new ve({}),r.__customImagePath=t.style.image;else if(e==="text")r=new dt({}),r.__customText=t.style.text;else if(e==="group")r=new q;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Uc(e);T&&gt(o,'graphic type "'+e+'" can not be found.'),r=new o}return r.__customGraphicType=e,r.name=t.name,r}function Sk(t,e,r,a,i,n,o){var s={},l=r.style||{};if(r.shape&&(s.shape=rt(r.shape)),r.position&&(s.position=r.position.slice()),r.scale&&(s.scale=r.scale.slice()),r.origin&&(s.origin=r.origin.slice()),r.rotation&&(s.rotation=r.rotation),t.type==="image"&&r.style){var u=s.style={};M(["x","y","width","height"],function(c){mS(c,u,l,t.style,n)})}if(t.type==="text"&&r.style){var u=s.style={};M(["x","y"],function(v){mS(v,u,l,t.style,n)}),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if(t.type!=="group"&&(t.useStyle(l),n)){t.style.opacity=0;var h=l.opacity;h==null&&(h=1),Se(t,{style:{opacity:h}},a,e)}n?t.attr(s):ft(t,s,a,e),r.hasOwnProperty("z2")&&t.attr("z2",r.z2||0),r.hasOwnProperty("silent")&&t.attr("silent",r.silent),r.hasOwnProperty("invisible")&&t.attr("invisible",r.invisible),r.hasOwnProperty("ignore")&&t.attr("ignore",r.ignore),r.hasOwnProperty("info")&&t.attr("info",r.info);var f=r.styleEmphasis;Vo(t,f),o&&mi(t,f!==!1)}function mS(t,e,r,a,i){r[t]!=null&&!i&&(e[t]=r[t],r[t]=a[t])}function yS(t,e,r,a){var i=t.get("renderItem"),n=t.coordinateSystem,o={};n&&(T&&(gt(i,"series.render is required."),gt(n.prepareCustoms||pS[n.type],"This coordSys does not support custom series.")),o=n.prepareCustoms?n.prepareCustoms():pS[n.type](n));var s=J({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:p,style:m,styleEmphasis:y,visual:_,barLayout:w,currentSeriesIndices:b,font:A},o.api||{}),l={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:Ak(t.getData())},u,h=!0,f,c,v,d;return function(S,D){return u=S,h=!0,i&&i(J({dataIndexInside:S,dataIndex:e.getRawIndex(S),actionType:D?D.type:null},l),s)};function g(S){S==null&&(S=u),h&&(f=e.getItemModel(S),c=f.getModel(_k),v=f.getModel(xk),d=e.getItemVisual(S,"color"),h=!1)}function p(S,D){return D==null&&(D=u),e.get(e.getDimension(S||0),D)}function m(S,D){D==null&&(D=u),g(D);var I=f.getModel(mk).getItemStyle();d!=null&&(I.fill=d);var L=e.getItemVisual(D,"opacity");L!=null&&(I.opacity=L);var P=S?wS(S,c):c;return $t(I,P,null,{autoColor:d,isRectText:!0}),I.text=P.getShallow("show")?Xt(t.getFormattedLabel(D,"normal"),Bu(e,D)):null,S&&bS(I,S),I}function y(S,D){D==null&&(D=u),g(D);var I=f.getModel(yk).getItemStyle(),L=S?wS(S,v):v;return $t(I,L,null,{isRectText:!0},!0),I.text=L.getShallow("show")?ni(t.getFormattedLabel(D,"emphasis"),t.getFormattedLabel(D,"normal"),Bu(e,D)):null,S&&bS(I,S),I}function _(S,D){return D==null&&(D=u),e.getItemVisual(D,S)}function w(S){if(n.getBaseAxis){var D=n.getBaseAxis();return V2(J({axis:D},S),a)}}function b(){return r.getCurrentSeriesIndices()}function A(S){return Xc(S,r)}}function Ak(t){var e={};return M(t.dimensions,function(r,a){var i=t.getDimensionInfo(r);if(!i.isExtraCoord){var n=i.coordDim,o=e[n]=e[n]||[];o[i.coordDimIndex]=a}}),e}function Fg(t,e,r,a,i,n){return t=Wg(t,e,r,a,i,n,!0),t&&n.setItemGraphicEl(e,t),t}function Wg(t,e,r,a,i,n,o){var s=!r;r=r||{};var l=r.type,u=r.shape,h=r.style;if(t&&(s||l!=null&&l!==t.__customGraphicType||l==="path"&&Mk(u)&&SS(u)!==t.__customPathData||l==="image"&&AS(h,"image")&&h.image!==t.__customImagePath||l==="text"&&AS(u,"text")&&h.text!==t.__customText)&&(i.remove(t),t=null),!s){var f=!t;return!t&&(t=bk(r)),Sk(t,e,r,a,n,f,o),l==="group"&&Tk(t,e,r,a,n),i.add(t),t}}function Tk(t,e,r,a,i){var n=r.children,o=n?n.length:0,s=r.$mergeChildren,l=s==="byName"||r.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Ck({oldChildren:t.children()||[],newChildren:n||[],dataIndex:e,animatableModel:a,group:t,data:i});return}u&&t.removeAll();for(var h=0;h<o;h++)n[h]&&Wg(t.childAt(h),e,n[h],a,t,i);T&&gt(!u||t.childCount()===h,"MUST NOT contain empty item in children array when `group.$mergeChildren` is `false`.")}}function Ck(t){new ha(t.oldChildren,t.newChildren,_S,_S,t).add(xS).update(xS).remove(Dk).execute()}function _S(t,e){var r=t&&t.name;return r??wk+e}function xS(t,e){var r=this.context,a=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;Wg(i,r.dataIndex,a,r.animatableModel,r.group,r.data)}function wS(t,e){var r=new _t({},e);return M(gS,function(a,i){t.hasOwnProperty(a)&&(r.option[i]=t[a])}),r}function bS(t,e){for(var r in e)(e.hasOwnProperty(r)||!gS.hasOwnProperty(r))&&(t[r]=e[r])}function Dk(t){var e=this.context,r=e.oldChildren[t];r&&e.group.remove(r)}function SS(t){return t&&(t.pathData||t.d)}function Mk(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function AS(t,e){return t&&t.hasOwnProperty(e)}function TS(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function CS(t,e){return e.dim+t.model.componentIndex}function Ik(t,e,r){var a={},i=Lk(ee(e.getSeriesByType(t),function(n){return!e.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));e.eachSeriesByType(t,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=CS(s,l),h=TS(n),f=i[u][h],c=f.offset,v=f.width,d=s.getOtherAxis(l),g=n.coordinateSystem.cx,p=n.coordinateSystem.cy,m=n.get("barMinHeight")||0,y=n.get("barMinAngle")||0;a[h]=a[h]||[];for(var _=o.mapDimension(d.dim),w=o.mapDimension(l.dim),b=fa(o,_),A=l.dim!=="radius"||!n.get("roundCap",!0),S=d.getExtent()[0],D=0,I=o.count();D<I;D++){var L=o.get(_,D),P=o.get(w,D),R=L>=0?"p":"n",E=S;b&&(a[h][P]||(a[h][P]={p:S,n:S}),E=a[h][P][R]);var Z,W,$,X;if(d.dim==="radius"){var K=d.dataToRadius(L)-S,Q=l.dataToAngle(P);Math.abs(K)<m&&(K=(K<0?-1:1)*m),Z=E,W=E+K,$=Q-c,X=$-v,b&&(a[h][P][R]=W)}else{var j=d.dataToAngle(L,A)-S,U=l.dataToRadius(P);Math.abs(j)<y&&(j=(j<0?-1:1)*y),Z=U+c,W=Z+v,$=E,X=E+j,b&&(a[h][P][R]=X)}o.setItemLayout(D,{cx:g,cy:p,r0:Z,r:W,startAngle:-$*Math.PI/180,endAngle:-X*Math.PI/180})}}},this)}function Lk(t,e){var r={};M(t,function(i,n){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=CS(s,l),h=l.getExtent(),f=l.type==="category"?l.getBandWidth():Math.abs(h[1]-h[0])/o.count(),c=r[u]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=c.stacks;r[u]=c;var d=TS(i);v[d]||c.autoWidthCount++,v[d]=v[d]||{width:0,maxWidth:0};var g=H(i.get("barWidth"),f),p=H(i.get("barMaxWidth"),f),m=i.get("barGap"),y=i.get("barCategoryGap");g&&!v[d].width&&(g=Math.min(c.remainedWidth,g),v[d].width=g,c.remainedWidth-=g),p&&(v[d].maxWidth=p),m!=null&&(c.gap=m),y!=null&&(c.categoryGap=y)});var a={};return M(r,function(i,n){a[n]={};var o=i.stacks,s=i.bandWidth,l=H(i.categoryGap,s),u=H(i.gap,1),h=i.remainedWidth,f=i.autoWidthCount,c=(h-l)/(f+(f-1)*u);c=Math.max(c,0),M(o,function(p,m){var y=p.maxWidth;y&&y<c&&(y=Math.min(y,h),p.width&&(y=Math.min(y,p.width)),h-=y,p.width=y,f--)}),c=(h-l)/(f+(f-1)*u),c=Math.max(c,0);var v=0,d;M(o,function(p,m){p.width||(p.width=c),d=p,v+=p.width*(1+u)}),d&&(v-=d.width*u);var g=-v/2;M(o,function(p,m){a[n][m]=a[n][m]||{offset:g,width:p.width},g+=p.width*(1+u)})}),a}function Ch(t,e){Qt.call(this,"radius",t,e),this.type="category"}Ch.prototype={constructor:Ch,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToRadius:Qt.prototype.dataToCoord,radiusToData:Qt.prototype.coordToData},It(Ch,Qt);var Pk=Pe();function Dh(t,e){e=e||[0,360],Qt.call(this,"angle",t,e),this.type="category"}Dh.prototype={constructor:Dh,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToAngle:Qt.prototype.dataToCoord,angleToData:Qt.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),r=t.scale,a=r.getExtent(),i=r.count();if(a[1]-a[0]<1)return 0;var n=a[0],o=t.dataToCoord(n+1)-t.dataToCoord(n),s=Math.abs(o),l=Rr(n,e.getFont(),"center","top"),u=Math.max(l.height,7),h=u/s;isNaN(h)&&(h=1/0);var f=Math.max(0,Math.floor(h)),c=Pk(t.model),v=c.lastAutoInterval,d=c.lastTickCount;return v!=null&&d!=null&&Math.abs(v-f)<=1&&Math.abs(d-i)<=1&&v>f?f=v:(c.lastTickCount=i,c.lastAutoInterval=f),f}},It(Dh,Qt);var Mh=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Ch,this._angleAxis=new Dh,this._radiusAxis.polar=this._angleAxis.polar=this};Mh.prototype={type:"polar",axisPointerEnabled:!0,constructor:Mh,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],r=this._angleAxis,a=this._radiusAxis;return r.scale.type===t&&e.push(r),a.scale.type===t&&e.push(a),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var r=this.pointToCoord(t);return[this._radiusAxis.radiusToData(r[0],e),this._angleAxis.angleToData(r[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,r=t[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),n=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);a.inverse?n=o-360:o=n+360;var s=Math.sqrt(e*e+r*r);e/=s,r/=s;for(var l=Math.atan2(-r,e)/Math.PI*180,u=l<n?1:-1;l<n||l>o;)l+=u*360;return[s,l]},coordToPoint:function(t){var e=t[0],r=t[1]/180*Math.PI,a=Math.cos(r)*e+this.cx,i=-Math.sin(r)*e+this.cy;return[a,i]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),r=e.getExtent().slice();r[0]>r[1]&&r.reverse();var a=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:t.inverse,contain:function(n,o){var s=n-this.cx,l=o-this.cy,u=s*s+l*l,h=this.r,f=this.r0;return u<=h*h&&u>=f*f}}}};var Ug=wt.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});ut(Ug.prototype,Di);var DS={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};function MS(t,e){return e.type||(e.data?"category":"value")}Gn("angle",Ug,MS,DS.angle),Gn("radius",Ug,MS,DS.radius),Ze({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,r=this.ecModel;return r.eachComponent(t,function(a){a.getCoordSysModel()===this&&(e=a)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});function Ek(t,e,r){var a=e.get("center"),i=r.getWidth(),n=r.getHeight();t.cx=H(a[0],i),t.cy=H(a[1],n);var o=t.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:z(l)||(l=[0,l]),l=[H(l[0],s),H(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}function Rk(t,e){var r=this,a=r.getAngleAxis(),i=r.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();M(l.mapDimension("radius",!0),function(u){i.scale.unionExtentFromData(l,fs(l,u))}),M(l.mapDimension("angle",!0),function(u){a.scale.unionExtentFromData(l,fs(l,u))})}}),Fa(a.scale,a.model),Fa(i.scale,i.model),a.type==="category"&&!a.onBand){var n=a.getExtent(),o=360/a.scale.count();a.inverse?n[1]+=o:n[1]-=o,a.setExtent(n[0],n[1])}}function IS(t,e){if(t.type=e.get("type"),t.scale=zn(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),e.mainType==="angleAxis"){t.inverse^=e.get("clockwise");var r=e.get("startAngle");t.setExtent(r,r+(t.inverse?-360:360))}e.axis=t,t.model=e}var Ok={dimensions:Mh.prototype.dimensions,create:function(t,e){var r=[];return t.eachComponent("polar",function(a,i){var n=new Mh(i);n.update=Rk;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");IS(o,l),IS(s,u),Ek(n,a,e),r.push(n),a.coordinateSystem=n,n.model=a}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var i=t.queryComponents({mainType:"polar",index:a.get("polarIndex"),id:a.get("polarId")})[0];if(T&&!i)throw new Error('Polar "'+Ut(a.get("polarIndex"),a.get("polarId"),0)+'" not found');a.coordinateSystem=i.coordinateSystem}}),r}};_e.register("polar",Ok);var Nk=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Ih(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var a=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function Lh(t){var e=t.getRadiusAxis();return e.inverse?0:1}function LS(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}Xe.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),!!t.get("show")){var r=t.axis,a=r.polar,i=a.getRadiusAxis().getExtent(),n=r.getTicksCoords(),o=r.getMinorTicksCoords(),s=V(r.getViewLabels(),function(u){var u=rt(u);return u.coord=r.dataToCoord(u.tickValue),u});LS(s),LS(n),M(Nk,function(l){t.get(l+".show")&&(!r.scale.isBlank()||l==="axisLine")&&this["_"+l](t,a,n,o,i,s)},this)}},_axisLine:function(t,e,r,a,i){var n=t.getModel("axisLine.lineStyle"),o=Lh(e),s=o?0:1,l;i[s]===0?l=new Br({shape:{cx:e.cx,cy:e.cy,r:i[o]},style:n.getLineStyle(),z2:1,silent:!0}):l=new Yl({shape:{cx:e.cx,cy:e.cy,r:i[o],r0:i[s]},style:n.getLineStyle(),z2:1,silent:!0}),l.style.fill=null,this.group.add(l)},_axisTick:function(t,e,r,a,i){var n=t.getModel("axisTick"),o=(n.get("inside")?-1:1)*n.get("length"),s=i[Lh(e)],l=V(r,function(u){return new ye({shape:Ih(e,[s,s+o],u.coord)})});this.group.add(or(l,{style:J(n.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,r,a,i){if(!!a.length){for(var n=t.getModel("axisTick"),o=t.getModel("minorTick"),s=(n.get("inside")?-1:1)*o.get("length"),l=i[Lh(e)],u=[],h=0;h<a.length;h++)for(var f=0;f<a[h].length;f++)u.push(new ye({shape:Ih(e,[l,l+s],a[h][f].coord)}));this.group.add(or(u,{style:J(o.getModel("lineStyle").getLineStyle(),J(n.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(t,e,r,a,i,n){var o=t.getCategories(!0),s=t.getModel("axisLabel"),l=s.get("margin"),u=t.get("triggerEvent");M(n,function(h,f){var c=s,v=h.tickValue,d=i[Lh(e)],g=e.coordToPoint([d+l,h.coord]),p=e.cx,m=e.cy,y=Math.abs(g[0]-p)/d<.3?"center":g[0]>p?"left":"right",_=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";o&&o[v]&&o[v].textStyle&&(c=new _t(o[v].textStyle,s,s.ecModel));var w=new dt({silent:ze.isLabelSilent(t)});this.group.add(w),$t(w.style,c,{x:g[0],y:g[1],textFill:c.getTextColor()||t.get("axisLine.lineStyle.color"),text:h.formattedLabel,textAlign:y,textVerticalAlign:_}),u&&(w.eventData=ze.makeAxisEventDataBase(t),w.eventData.targetType="axisLabel",w.eventData.value=h.rawLabel)},this)},_splitLine:function(t,e,r,a,i){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h<r.length;h++){var f=l++%s.length;u[f]=u[f]||[],u[f].push(new ye({shape:Ih(e,i,r[h].coord)}))}for(var h=0;h<u.length;h++)this.group.add(or(u[h],{style:J({stroke:s[h%s.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,r,a,i){if(!!a.length){for(var n=t.getModel("minorSplitLine"),o=n.getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new ye({shape:Ih(e,i,a[l][u].coord)}));this.group.add(or(s,{style:o.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,r,a,i){if(!!r.length){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=Math.PI/180,f=-r[0].coord*h,c=Math.min(i[0],i[1]),v=Math.max(i[0],i[1]),d=t.get("clockwise"),g=1;g<r.length;g++){var p=l++%s.length;u[p]=u[p]||[],u[p].push(new Ar({shape:{cx:e.cx,cy:e.cy,r0:c,r:v,startAngle:f,endAngle:-r[g].coord*h,clockwise:d},silent:!0})),f=-r[g].coord*h}for(var g=0;g<u.length;g++)this.group.add(or(u[g],{style:J({fill:s[g%s.length]},o.getAreaStyle()),silent:!0}))}}});var kk=["axisLine","axisTickLabel","axisName"],zk=["splitLine","splitArea","minorSplitLine"];Xe.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),!!t.get("show")){var r=t.axis,a=r.polar,i=a.getAngleAxis(),n=r.getTicksCoords(),o=r.getMinorTicksCoords(),s=i.getExtent()[0],l=r.getExtent(),u=Bk(a,t,s),h=new ze(t,u);M(kk,h.add,h),this.group.add(h.getGroup()),M(zk,function(f){t.get(f+".show")&&!r.scale.isBlank()&&this["_"+f](t,a,s,l,n,o)},this)}},_splitLine:function(t,e,r,a,i){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h<i.length;h++){var f=l++%s.length;u[f]=u[f]||[],u[f].push(new Br({shape:{cx:e.cx,cy:e.cy,r:i[h].coord}}))}for(var h=0;h<u.length;h++)this.group.add(or(u[h],{style:J({stroke:s[h%s.length],fill:null},o.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,r,a,i,n){if(!!n.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<n.length;u++)for(var h=0;h<n[u].length;h++)l.push(new Br({shape:{cx:e.cx,cy:e.cy,r:n[u][h].coord}}));this.group.add(or(l,{style:J({fill:null},s.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,r,a,i){if(!!i.length){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=i[0].coord,f=1;f<i.length;f++){var c=l++%s.length;u[c]=u[c]||[],u[c].push(new Ar({shape:{cx:e.cx,cy:e.cy,r0:h,r:i[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=i[f].coord}for(var f=0;f<u.length;f++)this.group.add(or(u[f],{style:J({fill:s[f%s.length]},o.getAreaStyle()),silent:!0}))}}});function Bk(t,e,r){return{position:[t.cx,t.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}var Vk=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis;n.dim==="angle"&&(this.animationThreshold=Math.PI/18);var o=n.polar,s=o.getOtherAxis(n),l=s.getExtent(),u;u=n["dataTo"+su(n.dim)](e);var h=a.get("type");if(h&&h!=="none"){var f=zg(a),c=Hk[h](n,o,u,l,f);c.style=f,t.graphicKey=c.type,t.pointer=c}var v=a.get("label.margin"),d=Gk(e,r,a,o,v);eS(t,r,a,i,d)}});function Gk(t,e,r,a,i){var n=e.axis,o=n.dataToCoord(t),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,h,f;if(n.dim==="radius"){var c=Ie();aa(c,c,s),yr(c,c,[a.cx,a.cy]),u=Hr([o,-i],c);var v=e.getModel("axisLabel").get("rotate")||0,d=ze.innerTextLayout(s,v*Math.PI/180,-1);h=d.textAlign,f=d.textVerticalAlign}else{var g=l[1];u=a.coordToPoint([g+i,o]);var p=a.cx,m=a.cy;h=Math.abs(u[0]-p)/g<.3?"center":u[0]>p?"left":"right",f=Math.abs(u[1]-m)/g<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:h,verticalAlign:f}}var Hk={line:function(t,e,r,a,i){return t.dim==="angle"?{type:"Line",shape:Vg(e.coordToPoint([a[0],r]),e.coordToPoint([a[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,a,i){var n=Math.max(1,t.getBandWidth()),o=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:nS(e.cx,e.cy,a[0],a[1],(-r-n/2)*o,(-r+n/2)*o)}:{type:"Sector",shape:nS(e.cx,e.cy,r-n/2,r+n/2,0,Math.PI*2)}}};Xe.registerAxisPointerClass("PolarAxisPointer",Vk),Gt(ot(Ik,"bar")),he({type:"polar"});var Fk=wt.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){wt.prototype.init.apply(this,arguments),fi(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=Bx.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=an(t.regions||[],function(r,a){return a.name&&r.set(a.name,new _t(a,e)),r},ht()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new _t(null,this,this.ecModel)},getFormattedLabel:function(t,e){var r=this.getRegionModel(t),a=r.get("label"+(e==="normal"?".":e+".")+"formatter"),i={name:t};if(typeof a=="function")return i.status=e,a(i);if(typeof a=="string")return a.replace("{a}",t??"")},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});Dt(Fk,wd),he({type:"geo",init:function(t,e){var r=new ju(e,!0);this._mapDraw=r,this.group.add(r.group)},render:function(t,e,r,a){if(!(a&&a.type==="geoToggleSelect"&&a.from===this.uid)){var i=this._mapDraw;t.get("show")?i.draw(t,e,r,this,a):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});function $g(t,e){e.update="updateView",mt(e,function(r,a){var i={};return a.eachComponent({mainType:"geo",query:r},function(n){n[t](r.name);var o=n.coordinateSystem;M(o.regions,function(s){i[s.name]=n.isSelected(s.name)||!1})}),{selected:i,name:r.name}})}$g("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),$g("select",{type:"geoSelect",event:"geoselected"}),$g("unSelect",{type:"geoUnSelect",event:"geounselected"});var Zg=864e5;function pa(t,e,r){this._model=t}pa.prototype={constructor:pa,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){t=$o(t);var e=t.getFullYear(),r=t.getMonth()+1;r=r<10?"0"+r:r;var a=t.getDate();a=a<10?"0"+a:a;var i=t.getDay();return i=Math.abs((i+7-this.getFirstDayOfWeek())%7),{y:e,m:r,d:a,day:i,time:t.getTime(),formatedDate:e+"-"+r+"-"+a,date:t}},getNextNDay:function(t,e){return e=e||0,e===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.get("cellSize").slice(),n=this._model.getBoxLayoutParams(),o=this._orient==="horizontal"?[r,7]:[7,r];M([0,1],function(h){u(i,h)&&(n[a[h]]=i[h]*o[h])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=qt(n,s);M([0,1],function(h){u(i,h)||(i[h]=l[a[h]]/o[h])});function u(h,f){return h[f]!=null&&h[f]!=="auto"}this._sw=i[0],this._sh=i[1]},dataToPoint:function(t,e){z(t)&&(t=t[0]),e==null&&(e=!0);var r=this.getDateInfo(t),a=this._rangeInfo,i=r.formatedDate;if(e&&!(r.time>=a.start.time&&r.time<a.end.time+Zg))return[NaN,NaN];var n=r.day,o=this._getRangeInfo([a.start.time,i]).nthWeek;return this._orient==="vertical"?[this._rect.x+n*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+n*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var r=this.dataToPoint(t,e);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,r=Math.floor((t[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,e-1,a):this._getDateByWeeksAndDay(e,r-1,a)},convertToPixel:ot(PS,"dataToPoint"),convertFromPixel:ot(PS,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(z(e)&&e.length===1&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var r=this.getDateInfo(e),a=r.date;a.setMonth(a.getMonth()+1);var i=this.getNextNDay(a,-1);t=[r.formatedDate,i.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var n=this._getRangeInfo(t);return n.start.time>n.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var r=Math.floor(t[1].time/Zg)-Math.floor(t[0].time/Zg)+1,a=new Date(t[0].time),i=a.getDate(),n=t[1].date.getDate();a.setDate(i+r-1);var o=a.getDate();if(o!==n)for(var s=a.getTime()-t[1].time>0?1:-1;(o=a.getDate())!==n&&(a.getTime()-t[1].time)*s>0;)r-=s,a.setDate(o-s);var l=Math.floor((r+t[0].day+6)/7),u=e?-l+1:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,r){var a=this._getRangeInfo(r);if(t>a.weeks||t===0&&e<a.fweek||t===a.weeks&&e>a.lweek)return!1;var i=(t-1)*7-a.fweek+e,n=new Date(a.start.time);return n.setDate(a.start.d+i),this.getDateInfo(n)}},pa.dimensions=pa.prototype.dimensions,pa.getDimensionsInfo=pa.prototype.getDimensionsInfo,pa.create=function(t,e){var r=[];return t.eachComponent("calendar",function(a){var i=new pa(a,t,e);r.push(i),a.coordinateSystem=i}),t.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=r[a.get("calendarIndex")||0])}),r};function PS(t,e,r,a){var i=r.calendarModel,n=r.seriesModel,o=i?i.coordinateSystem:n?n.coordinateSystem:null;return o===this?o[t](a):null}_e.register("calendar",pa);var ES=wt.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,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%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,r,a){var i=Cn(t);ES.superApply(this,"init",arguments),RS(t,i)},mergeOption:function(t,e){ES.superApply(this,"mergeOption",arguments),RS(this.option,t)}});function RS(t,e){var r=t.cellSize;z(r)?r.length===1&&(r[1]=r[0]):r=t.cellSize=[r,r];var a=V([0,1],function(i){return MM(e,i)&&(r[i]="auto"),r[i]!=null&&r[i]!=="auto"});za(t,e,{type:"box",ignoreSize:a})}var Wk={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]},Uk={EN:["S","M","T","W","T","F","S"],CN:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]};he({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,r){var a=this.group;a.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),o=i.getOrient();this._renderDayRect(t,n,a),this._renderLines(t,n,o,a),this._renderYearText(t,n,o,a),this._renderMonthText(t,o,a),this._renderWeekText(t,n,o,a)},_renderDayRect:function(t,e,r){for(var a=t.coordinateSystem,i=t.getModel("itemStyle").getItemStyle(),n=a.getCellWidth(),o=a.getCellHeight(),s=e.start.time;s<=e.end.time;s=a.getNextNDay(s,1).time){var l=a.dataToRect([s],!1).tl,u=new xt({shape:{x:l[0],y:l[1],width:n,height:o},cursor:"default",style:i});r.add(u)}},_renderLines:function(t,e,r,a){var i=this,n=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){c(u.formatedDate),h===0&&(u=n.getDateInfo(e.start.y+"-"+e.start.m));var f=u.date;f.setMonth(f.getMonth()+1),u=n.getDateInfo(f)}c(n.getNextNDay(e.end.time,1).formatedDate);function c(v){i._firstDayOfMonth.push(n.getDateInfo(v)),i._firstDayPoints.push(n.dataToRect([v],!1).tl);var d=i._getLinePointsOfOneWeek(t,v,r);i._tlpoints.push(d[0]),i._blpoints.push(d[d.length-1]),s&&i._drawSplitline(d,o,a)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,l,r),o,a),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,l,r),o,a)},_getEdgesPoints:function(t,e,r){var a=[t[0].slice(),t[t.length-1].slice()],i=r==="horizontal"?0:1;return a[0][i]=a[0][i]-e/2,a[1][i]=a[1][i]+e/2,a},_drawSplitline:function(t,e,r){var a=new ir({z2:20,shape:{points:t},style:e});r.add(a)},_getLinePointsOfOneWeek:function(t,e,r){var a=t.coordinateSystem;e=a.getDateInfo(e);for(var i=[],n=0;n<7;n++){var o=a.getNextNDay(e.time,n),s=a.dataToRect([o.time],!1);i[2*o.day]=s.tl,i[2*o.day+1]=s[r==="horizontal"?"bl":"tr"]}return i},_formatterLabel:function(t,e){return typeof t=="string"&&t?xy(t,e):typeof t=="function"?t(e):e.nameMap},_yearTextPositionControl:function(t,e,r,a,i){e=e.slice();var n=["center","bottom"];a==="bottom"?(e[1]+=i,n=["center","top"]):a==="left"?e[0]-=i:a==="right"?(e[0]+=i,n=["center","top"]):e[1]-=i;var o=0;return(a==="left"||a==="right")&&(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:n[0],textVerticalAlign:n[1]}}},_renderYearText:function(t,e,r,a){var i=t.getModel("yearLabel");if(!!i.get("show")){var n=i.get("margin"),o=i.get("position");o||(o=r!=="horizontal"?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h=r==="horizontal"?0:1,f={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},c=e.start.y;+e.end.y>+e.start.y&&(c=c+"-"+e.end.y);var v=i.get("formatter"),d={start:e.start.y,end:e.end.y,nameMap:c},g=this._formatterLabel(v,d),p=new dt({z2:30});$t(p.style,i,{text:g}),p.attr(this._yearTextPositionControl(p,f[o],r,o,n)),a.add(p)}},_monthTextPositionControl:function(t,e,r,a,i){var n="left",o="top",s=t[0],l=t[1];return r==="horizontal"?(l=l+i,e&&(n="center"),a==="start"&&(o="bottom")):(s=s+i,e&&(o="middle"),a==="start"&&(n="right")),{x:s,y:l,textAlign:n,textVerticalAlign:o}},_renderMonthText:function(t,e,r){var a=t.getModel("monthLabel");if(!!a.get("show")){var i=a.get("nameMap"),n=a.get("margin"),o=a.get("position"),s=a.get("align"),l=[this._tlpoints,this._blpoints];Lt(i)&&(i=Wk[i.toUpperCase()]||[]);var u=o==="start"?0:1,h=e==="horizontal"?0:1;n=o==="start"?-n:n;for(var f=s==="center",c=0;c<l[u].length-1;c++){var v=l[u][c].slice(),d=this._firstDayOfMonth[c];if(f){var g=this._firstDayPoints[c];v[h]=(g[h]+l[0][c+1][h])/2}var p=a.get("formatter"),m=i[+d.m-1],y={yyyy:d.y,yy:(d.y+"").slice(2),MM:d.m,M:+d.m,nameMap:m},_=this._formatterLabel(p,y),w=new dt({z2:30});et($t(w.style,a,{text:_}),this._monthTextPositionControl(v,f,e,o,n)),r.add(w)}}},_weekTextPositionControl:function(t,e,r,a,i){var n="center",o="middle",s=t[0],l=t[1],u=r==="start";return e==="horizontal"?(s=s+a+(u?1:-1)*i[0]/2,n=u?"right":"left"):(l=l+a+(u?1:-1)*i[1]/2,o=u?"bottom":"top"),{x:s,y:l,textAlign:n,textVerticalAlign:o}},_renderWeekText:function(t,e,r,a){var i=t.getModel("dayLabel");if(!!i.get("show")){var n=t.coordinateSystem,o=i.get("position"),s=i.get("nameMap"),l=i.get("margin"),u=n.getFirstDayOfWeek();Lt(s)&&(s=Uk[s.toUpperCase()]||[]);var h=n.getNextNDay(e.end.time,7-e.lweek).time,f=[n.getCellWidth(),n.getCellHeight()];l=H(l,f[r==="horizontal"?0:1]),o==="start"&&(h=n.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var c=0;c<7;c++){var v=n.getNextNDay(h,c),d=n.dataToRect([v.time],!1).center,g=c;g=Math.abs((c+u)%7);var p=new dt({z2:30});et($t(p.style,i,{text:s[g]}),this._weekTextPositionControl(d,r,o,l,f)),a.add(p)}}}});var OS={path:null,compoundPath:null,group:q,image:ve,text:dt};we(function(t){var e=t.graphic;z(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var $k=Ze({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,$k.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var r=this.option,a=(e?r:t).elements,i=r.elements=e?[]:r.elements,n=[];this._flatten(a,n);var o=Ic(i,n);g0(o);var s=this._elOptionsToUpdate=[];M(o,function(u,h){var f=u.option;T&&gt(lt(f)||u.exist,"Empty graphic option definition"),f&&(s.push(f),Yk(u,f),Xk(i,h,f),qk(i[h],f))},this);for(var l=i.length-1;l>=0;l--)i[l]==null?i.splice(l,1):delete i[l].$action},_flatten:function(t,e,r){M(t,function(a){if(!!a){r&&(a.parentOption=r),e.push(a);var i=a.children;a.type==="group"&&i&&this._flatten(i,e,a),delete a.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});he({type:"graphic",init:function(t,e){this._elMap=ht(),this._lastGraphicModel},render:function(t,e,r){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,r)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(!!e){var r=this._elMap,a=this.group;M(e,function(i){var n=i.$action,o=i.id,s=r.get(o),l=i.parentId,u=l!=null?r.get(l):a,h=i.style;i.type==="text"&&h&&(i.hv&&i.hv[1]&&(h.textVerticalAlign=h.textBaseline=null),!h.hasOwnProperty("textFill")&&h.fill&&(h.textFill=h.fill),!h.hasOwnProperty("textStroke")&&h.stroke&&(h.textStroke=h.stroke));var f=Zk(i);T&&s&&gt(u===s.parent,"Changing parent is not supported."),!n||n==="merge"?s?s.attr(f):NS(o,u,f,r):n==="replace"?(Ph(s,r),NS(o,u,f,r)):n==="remove"&&Ph(s,r);var c=r.get(o);c&&(c.__ecGraphicWidthOption=i.width,c.__ecGraphicHeightOption=i.height,Kk(c,t,i))})}},_relocate:function(t,e){for(var r=t.option.elements,a=this.group,i=this._elMap,n=e.getWidth(),o=e.getHeight(),s=0;s<r.length;s++){var l=r[s],u=i.get(l.id);if(!(!u||!u.isGroup)){var h=u.parent,f=h===a;u.__ecGraphicWidth=H(u.__ecGraphicWidthOption,f?n:h.__ecGraphicWidth)||0,u.__ecGraphicHeight=H(u.__ecGraphicHeightOption,f?o:h.__ecGraphicHeight)||0}}for(var s=r.length-1;s>=0;s--){var l=r[s],u=i.get(l.id);if(!!u){var h=u.parent,c=h===a?{width:n,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};uu(u,l,c,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Ph(e,t)}),this._elMap=ht()},dispose:function(){this._clear()}});function NS(t,e,r,a){var i=r.type;T&&gt(i,"graphic type MUST be set");var n=OS.hasOwnProperty(i)?OS[i]:Uc(i);T&&gt(n,"graphic type can not be found");var o=new n(r);e.add(o),a.set(t,o),o.__ecGraphicId=t}function Ph(t,e){var r=t&&t.parent;r&&(t.type==="group"&&t.traverse(function(a){Ph(a,e)}),e.removeKey(t.__ecGraphicId),r.remove(t))}function Zk(t){return t=et({},t),M(["id","parentId","$action","hv","bounding"].concat(by),function(e){delete t[e]}),t}function kS(t,e){var r;return M(e,function(a){t[a]!=null&&t[a]!=="auto"&&(r=!0)}),r}function Yk(t,e){var r=t.exist;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function Xk(t,e,r){var a=et({},r),i=t[e],n=r.$action||"merge";if(n==="merge")if(i){if(T){var o=r.type;gt(!o||i.type===o,'Please set $action: "replace" to change `type`')}ut(i,a,!0),za(i,a,{ignoreSize:!0}),Sy(r,i)}else t[e]=a;else n==="replace"?t[e]=a:n==="remove"&&i&&(t[e]=null)}function qk(t,e){!t||(t.hv=e.hv=[kS(e,["left","right"]),kS(e,["top","bottom"])],t.type==="group"&&(t.width==null&&(t.width=e.width=0),t.height==null&&(t.height=e.height=0)))}function Kk(t,e,r){var a=t.eventData;!t.silent&&!t.ignore&&!a&&(a=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),a&&(a.info=t.info)}var zS={};function io(t,e){zS[t]=e}function BS(t){return zS[t]}var jk=Ze({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){jk.superApply(this,"optionUpdated",arguments),M(this.option.feature,function(t,e){var r=BS(e);r&&ut(t,r.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,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}}});function Qk(t,e,r){var a=e.getBoxLayoutParams(),i=e.get("padding"),n={width:r.getWidth(),height:r.getHeight()},o=qt(a,n,i);bi(e.get("orient"),t,e.get("itemGap"),o.width,o.height),uu(t,a,n,i)}function VS(i,e){var r=xi(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var i=new xt({shape:{x:i.x-r[3],y:i.y-r[0],width:i.width+r[1]+r[3],height:i.height+r[0]+r[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1});return i}he({type:"toolbox",render:function(t,e,r,a){var i=this.group;if(i.removeAll(),!t.get("show"))return;var n=+t.get("itemSize"),o=t.get("feature")||{},s=this._features||(this._features={}),l=[];M(o,function(f,c){l.push(c)}),new ha(this._featureNames||[],l).add(u).update(u).remove(ot(u,null)).execute(),this._featureNames=l;function u(f,c){var v=l[f],d=l[c],g=o[v],p=new _t(g,t,t.ecModel),m;if(a&&a.newTitle!=null&&a.featureName===v&&(g.title=a.newTitle),v&&!d){if(Jk(v))m={model:p,onclick:p.option.onclick,featureName:v};else{var y=BS(v);if(!y)return;m=new y(p,e,r)}s[v]=m}else{if(m=s[d],!m)return;m.model=p,m.ecModel=e,m.api=r}if(!v&&d){m.dispose&&m.dispose(e,r);return}if(!p.get("show")||m.unusable){m.remove&&m.remove(e,r);return}h(p,m,v),p.setIconStatus=function(_,w){var b=this.option,A=this.iconPaths;b.iconStatus=b.iconStatus||{},b.iconStatus[_]=w,A[_]&&A[_].trigger(w)},m.render&&m.render(p,e,r,a)}function h(f,c,v){var d=f.getModel("iconStyle"),g=f.getModel("emphasis.iconStyle"),p=c.getIcons?c.getIcons():f.get("icon"),m=f.get("title")||{};if(typeof p=="string"){var y=p,_=m;p={},m={},p[v]=y,m[v]=_}var w=f.iconPaths={};M(p,function(b,A){var S=Ho(b,{},{x:-n/2,y:-n/2,width:n,height:n});S.setStyle(d.getItemStyle()),S.hoverStyle=g.getItemStyle(),S.setStyle({text:m[A],textAlign:g.get("textAlign"),textBorderRadius:g.get("textBorderRadius"),textPadding:g.get("textPadding"),textFill:null});var D=t.getModel("tooltip");D&&D.get("show")&&S.attr("tooltip",et({content:m[A],formatter:D.get("formatter",!0)||function(){return m[A]},formatterParams:{componentType:"toolbox",name:A,title:m[A],$vars:["name","title"]},position:D.get("position",!0)||"bottom"},D.option)),Ot(S),t.get("showTitle")&&(S.__title=m[A],S.on("mouseover",function(){var I=g.getItemStyle(),L=t.get("orient")==="vertical"?t.get("right")==null?"right":"left":t.get("bottom")==null?"bottom":"top";S.setStyle({textFill:g.get("textFill")||I.fill||I.stroke||"#000",textBackgroundColor:g.get("textBackgroundColor"),textPosition:g.get("textPosition")||L})}).on("mouseout",function(){S.setStyle({textFill:null,textBackgroundColor:null})})),S.trigger(f.get("iconStatus."+A)||"normal"),i.add(S),S.on("click",it(c.onclick,c,e,r,A)),w[A]=S})}Qk(i,t,r),i.add(VS(i.getBoundingRect(),t)),i.eachChild(function(f){var c=f.__title,v=f.hoverStyle;if(v&&c){var d=Rr(c,Km(v)),g=f.position[0]+i.position[0],p=f.position[1]+i.position[1]+n,m=!1;p+d.height>r.getHeight()&&(v.textPosition="top",m=!0);var y=m?-5-d.height:n+8;g+d.width/2>r.getWidth()?(v.textPosition=["100%",y],v.textAlign="right"):g-d.width/2<0&&(v.textPosition=[0,y],v.textAlign="left")}})},updateView:function(t,e,r,a){M(this._features,function(i){i.updateView&&i.updateView(i.model,e,r,a)})},remove:function(t,e){M(this._features,function(r){r.remove&&r.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){M(this._features,function(r){r.dispose&&r.dispose(t,e)})}});function Jk(t){return t.indexOf("my")===0}var GS=ua.toolbox.saveAsImage;function Eh(t){this.model=t}Eh.defaultOption={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:GS.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:GS.lang.slice()},Eh.prototype.unusable=!G.canvasSupported;var tz=Eh.prototype;tz.onclick=function(t,e){var r=this.model,a=r.get("name")||t.get("title.0.text")||"echarts",i=e.getZr().painter.getType()==="svg",n=i?"svg":r.get("type",!0)||"png",o=e.getConnectedDataURL({type:n,backgroundColor:r.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:r.get("connectedBackgroundColor"),excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")});if(typeof MouseEvent=="function"&&!G.browser.ie&&!G.browser.edge){var s=document.createElement("a");s.download=a+"."+n,s.target="_blank",s.href=o;var l=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});s.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob){for(var u=atob(o.split(",")[1]),h=u.length,f=new Uint8Array(h);h--;)f[h]=u.charCodeAt(h);var c=new Blob([f]);window.navigator.msSaveOrOpenBlob(c,a+"."+n)}else{var v=r.get("lang"),d='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(v&&v[0]||"")+'" /></body>',g=window.open();g.document.write(d)}},io("saveAsImage",Eh);var Rh=ua.toolbox.magicType,Yg="__ec_magicType_stack__";function Xg(t){this.model=t}Xg.defaultOption={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:rt(Rh.title),option:{},seriesIndex:{}};var HS=Xg.prototype;HS.getIcons=function(){var t=this.model,e=t.get("icon"),r={};return M(t.get("type"),function(a){e[a]&&(r[a]=e[a])}),r};var FS={line:function(t,e,r,a){if(t==="bar")return ut({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get("option.line")||{},!0)},bar:function(t,e,r,a){if(t==="line")return ut({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get("option.bar")||{},!0)},stack:function(t,e,r,a){var i=r.get("stack")===Yg;if(t==="line"||t==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),ut({id:e,stack:i?"":Yg},a.get("option.stack")||{},!0)}},ez=[["line","bar"],["stack"]];HS.onclick=function(t,e,r){var a=this.model,i=a.get("seriesIndex."+r);if(!!FS[r]){var n={series:[]},o=function(u){var h=u.subType,f=u.id,c=FS[r](h,f,u,a);c&&(J(c,u.option),n.series.push(c));var v=u.coordinateSystem;if(v&&v.type==="cartesian2d"&&(r==="line"||r==="bar")){var d=v.getAxesByScale("ordinal")[0];if(d){var g=d.dim,p=g+"Axis",m=t.queryComponents({mainType:p,index:u.get(name+"Index"),id:u.get(name+"Id")})[0],y=m.componentIndex;n[p]=n[p]||[];for(var _=0;_<=y;_++)n[p][y]=n[p][y]||{};n[p][y].boundaryGap=r==="bar"}}};M(ez,function(u){yt(u,r)>=0&&M(u,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(r,"emphasis"),t.eachComponent({mainType:"series",query:i==null?null:{seriesIndex:i}},o);var s;if(r==="stack"){var l=n.series&&n.series[0]&&n.series[0].stack===Yg;s=l?ut({stack:Rh.title.tiled},Rh.title):rt(Rh.title)}e.dispatchAction({type:"changeMagicType",currentType:r,newOption:n,newTitle:s,featureName:"magicType"})}},mt({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),io("magicType",Xg);var WS=ua.toolbox.dataView,Oh=new Array(60).join("-"),no="    ";function rz(t){var e={},r=[],a=[];return t.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:a}}function az(t){var e=[];return M(t,function(r,a){var i=r.categoryAxis,n=r.valueAxis,o=n.dim,s=[" "].concat(V(r.series,function(v){return v.name})),l=[i.model.getCategories()];M(r.series,function(v){l.push(v.getRawData().mapArray(o,function(d){return d}))});for(var u=[s.join(no)],h=0;h<l[0].length;h++){for(var f=[],c=0;c<l.length;c++)f.push(l[c][h]);u.push(f.join(no))}e.push(u.join(`
yyyy`,Ht*10],["week",Ht*14],["week",Ht*21],["month",Ht*31],["week",Ht*42],["month",Ht*62],["week",Ht*70],["quarter",Ht*95],["month",Ht*31*4],["month",Ht*31*5],["half-year",Ht*380/2],["month",Ht*31*8],["month",Ht*31*10],["year",Ht*380]];td.create=function(t){return new td({useUTC:t.ecModel.get("useUTC")})};var Ou=jt.prototype,ds=Ur.prototype,$2=nu,Z2=re,Y2=Math.floor,X2=Math.ceil,Nu=Math.pow,$r=Math.log,ku=jt.extend({type:"log",base:10,$constructor:function(){jt.apply(this,arguments),this._originalScale=new Ur},getTicks:function(t){var e=this._originalScale,r=this._extent,a=e.getExtent();return V(ds.getTicks.call(this,t),function(i){var n=re(Nu(this.base,i));return n=i===r[0]&&e.__fixMin?zu(n,a[0]):n,n=i===r[1]&&e.__fixMax?zu(n,a[1]):n,n},this)},getMinorTicks:ds.getMinorTicks,getLabel:ds.getLabel,scale:function(t){return t=Ou.scale.call(this,t),Nu(this.base,t)},setExtent:function(t,e){var r=this.base;t=$r(t)/$r(r),e=$r(e)/$r(r),ds.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Ou.getExtent.call(this);e[0]=Nu(t,e[0]),e[1]=Nu(t,e[1]);var r=this._originalScale,a=r.getExtent();return r.__fixMin&&(e[0]=zu(e[0],a[0])),r.__fixMax&&(e[1]=zu(e[1],a[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=$r(t[0])/$r(e),t[1]=$r(t[1])/$r(e),Ou.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,r=e[1]-e[0];if(!(r===1/0||r<=0)){var a=my(r),i=t/r*a;for(i<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var n=[re(X2(e[0]/a)*a),re(Y2(e[1]/a)*a)];this._interval=a,this._niceExtent=n}},niceExtent:function(t){ds.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});M(["contain","normalize"],function(t){ku.prototype[t]=function(e){return e=$r(e)/$r(this.base),Ou[t].call(this,e)}}),ku.create=function(){return new ku};function zu(t,e){return Z2(t,$2(e))}function o1(t,e){var r=t.type,a=e.getMin(),i=e.getMax(),n=t.getExtent(),o,s,l;r==="ordinal"?o=e.getCategories().length:(s=e.get("boundaryGap"),z(s)||(s=[s||0,s||0]),typeof s[0]=="boolean"&&(T&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),s=[0,0]),s[0]=H(s[0],1),s[1]=H(s[1],1),l=n[1]-n[0]||Math.abs(n[0])),a==="dataMin"?a=n[0]:typeof a=="function"&&(a=a({min:n[0],max:n[1]})),i==="dataMax"?i=n[1]:typeof i=="function"&&(i=i({min:n[0],max:n[1]}));var u=a!=null,h=i!=null;a==null&&(a=r==="ordinal"?o?0:NaN:n[0]-s[0]*l),i==null&&(i=r==="ordinal"?o?o-1:NaN:n[1]+s[1]*l),(a==null||!isFinite(a))&&(a=NaN),(i==null||!isFinite(i))&&(i=NaN),t.setBlank(po(a)||po(i)||r==="ordinal"&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(a>0&&i>0&&!u&&(a=0),a<0&&i<0&&!h&&(i=0));var f=e.ecModel;if(f&&r==="time"){var c=j_("bar",f),v;if(M(c,function(p){v|=p.getBaseAxis()===e.axis}),v){var d=Jv(c),g=q2(a,i,e,d);a=g.min,i=g.max}}return{extent:[a,i],fixMin:u,fixMax:h}}function q2(t,e,r,a){var i=r.axis.getExtent(),n=i[1]-i[0],o=J_(a,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;M(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;M(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,f=1-(s+l)/n,c=h/f-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function Fa(t,e){var r=o1(t,e),a=r.extent,i=e.get("splitNumber");t.type==="log"&&(t.base=e.get("logBase"));var n=t.type;t.setExtent(a[0],a[1]),t.niceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:n==="interval"||n==="time"?e.get("minInterval"):null,maxInterval:n==="interval"||n==="time"?e.get("maxInterval"):null});var o=e.get("interval");o!=null&&t.setInterval&&t.setInterval(o)}function zn(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Xv(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Ur;default:return(jt.getClass(e)||Ur).create(t)}}function K2(t){var e=t.scale.getExtent(),r=e[0],a=e[1];return!(r>0&&a>0||r<0&&a<0)}function gs(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return typeof e=="string"?(e=function(a){return function(i){return i=t.scale.getLabel(i),a.replace("{value}",i??"")}}(e),e):typeof e=="function"?function(a,i){return r!=null&&(i=a-r),e(rd(t,a),i)}:function(a){return t.scale.getLabel(a)}}function rd(t,e){return t.type==="category"?t.scale.getLabel(e):e}function j2(t){var e=t.model,r=t.scale;if(!(!e.get("axisLabel.show")||r.isBlank())){var a=t.type==="category",i,n,o=r.getExtent();a?n=r.count():(i=r.getTicks(),n=i.length);var s=t.getLabelModel(),l=gs(t),u,h=1;n>40&&(h=Math.ceil(n/40));for(var f=0;f<n;f+=h){var c=i?i[f]:o[0]+f,v=l(c),d=s.getTextRect(v),g=Q2(d,s.get("rotate")||0);u?u.union(g):u=g}return u}}function Q2(t,e){var r=e*Math.PI/180,a=t.plain(),i=a.width,n=a.height,o=i*Math.cos(r)+n*Math.sin(r),s=i*Math.sin(r)+n*Math.cos(r),l=new vt(a.x,a.y,o,s);return l}function ad(t){var e=t.get("interval");return e??"auto"}function s1(t){return t.type==="category"&&ad(t.getLabelModel())===0}var Di={getMin:function(t){var e=this.option,r=!t&&e.rangeStart!=null?e.rangeStart:e.min;return this.axis&&r!=null&&r!=="dataMin"&&typeof r!="function"&&!po(r)&&(r=this.axis.scale.parse(r)),r},getMax:function(t){var e=this.option,r=!t&&e.rangeEnd!=null?e.rangeEnd:e.max;return this.axis&&r!=null&&r!=="dataMax"&&typeof r!="function"&&!po(r)&&(r=this.axis.scale.parse(r)),r},getNeedCrossZero:function(){var t=this.option;return t.rangeStart!=null||t.rangeEnd!=null?!1:!t.scale},getCoordSysModel:ce,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},J2=nr({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=e.width/2,n=e.height/2;t.moveTo(r,a-n),t.lineTo(r+i,a+n),t.lineTo(r-i,a+n),t.closePath()}}),tL=nr({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=e.width/2,n=e.height/2;t.moveTo(r,a-n),t.lineTo(r+i,a),t.lineTo(r,a+n),t.lineTo(r-i,a),t.closePath()}}),eL=nr({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,a=e.y,i=e.width/5*3,n=Math.max(i,e.height),o=i/2,s=o*o/(n-o),l=a-n+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,f=Math.sin(u),c=Math.cos(u),v=o*.6,d=o*.7;t.moveTo(r-h,l+s),t.arc(r,l,o,Math.PI-u,Math.PI*2+u),t.bezierCurveTo(r+h-f*v,l+s+c*v,r,a-d,r,a),t.bezierCurveTo(r,a-d,r-h+f*v,l+s+c*v,r-h,l+s),t.closePath()}}),rL=nr({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,a=e.width,i=e.x,n=e.y,o=a/3*2;t.moveTo(i,n),t.lineTo(i+o,n+r),t.lineTo(i,n+r/4*3),t.lineTo(i-o,n+r),t.lineTo(i,n),t.closePath()}}),aL={line:ye,rect:xt,roundRect:xt,square:xt,circle:Br,diamond:tL,pin:eL,arrow:rL,triangle:J2},iL={line:function(t,e,r,a,i){i.x1=t,i.y1=e+a/2,i.x2=t+r,i.y2=e+a/2},rect:function(t,e,r,a,i){i.x=t,i.y=e,i.width=r,i.height=a},roundRect:function(t,e,r,a,i){i.x=t,i.y=e,i.width=r,i.height=a,i.r=Math.min(r,a)/4},square:function(t,e,r,a,i){var n=Math.min(r,a);i.x=t,i.y=e,i.width=n,i.height=n},circle:function(t,e,r,a,i){i.cx=t+r/2,i.cy=e+a/2,i.r=Math.min(r,a)/2},diamond:function(t,e,r,a,i){i.cx=t+r/2,i.cy=e+a/2,i.width=r,i.height=a},pin:function(t,e,r,a,i){i.x=t+r/2,i.y=e+a/2,i.width=r,i.height=a},arrow:function(t,e,r,a,i){i.x=t+r/2,i.y=e+a/2,i.width=r,i.height=a},triangle:function(t,e,r,a,i){i.cx=t+r/2,i.cy=e+a/2,i.width=r,i.height=a}},id={};M(aL,function(t,e){id[e]=new t});var nL=nr({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var a=tc(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.textPosition==="inside"&&(a.y=r.y+r.height*.4),a},buildPath:function(t,e,r){var a=e.symbolType;if(a!=="none"){var i=id[a];i||(a="rect",i=id[a]),iL[a](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function oL(t,e){if(this.type!=="image"){var r=this.style,a=this.shape;a&&a.symbolType==="line"?r.stroke=t:this.__isEmptyBrush?(r.stroke=t,r.fill=e||"#fff"):(r.fill&&(r.fill=t),r.stroke&&(r.stroke=t)),this.dirty(!1)}}function Ye(t,e,r,a,i,n,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return t.indexOf("image://")===0?l=Q0(t.slice(8),new vt(e,r,a,i),o?"center":"cover"):t.indexOf("path://")===0?l=zo(t.slice(7),{},new vt(e,r,a,i),o?"center":"cover"):l=new nL({shape:{symbolType:t,x:e,y:r,width:a,height:i}}),l.__isEmptyBrush=s,l.setColor=oL,l.setColor(n),l}function sL(t){return ca(t.getSource(),t)}var lL={isDimensionStacked:fa,enableDataStack:W_,getStackedDimension:fs};function uL(t,e){var r=e;_t.isInstance(e)||(r=new _t(e),Dt(r,Di));var a=zn(r);return a.setExtent(t[0],t[1]),Fa(a,r),a}function hL(t){Dt(t,Di)}var fL=(Object.freeze||Object)({createList:sL,getLayoutRect:qt,dataStack:lL,createScale:uL,mixinAxisModelCommonMethods:hL,completeDimensions:H_,createDimensions:En,createSymbol:Ye}),cL=1e-8;function l1(t,e){return Math.abs(t-e)<cL}function Mi(t,e,r){var a=0,i=t[0];if(!i)return!1;for(var n=1;n<t.length;n++){var o=t[n];a+=oa(i[0],i[1],o[0],o[1],e,r),i=o}var s=t[0];return(!l1(i[0],s[0])||!l1(i[1],s[1]))&&(a+=oa(i[0],i[1],s[0],s[1],e,r)),a!==0}function ps(t,e,r){if(this.name=t,this.geometries=e,r)r=[r[0],r[1]];else{var a=this.getBoundingRect();r=[a.x+a.width/2,a.y+a.height/2]}this.center=r}ps.prototype={constructor:ps,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,r=[e,e],a=[-e,-e],i=[],n=[],o=this.geometries,s=0;s<o.length;s++)if(o[s].type==="polygon"){var l=o[s].exterior;Po(l,i,n),ea(r,r,i),ra(a,a,n)}return s===0&&(r[0]=r[1]=a[0]=a[1]=0),this._rect=new vt(r[0],r[1],a[0]-r[0],a[1]-r[1])},contain:function(t){var e=this.getBoundingRect(),r=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var a=0,i=r.length;a<i;a++)if(r[a].type==="polygon"){var n=r[a].exterior,o=r[a].interiors;if(Mi(n,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(Mi(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=i.width/i.height;r?a||(a=r/n):r=n*a;for(var o=new vt(t,e,r,a),s=i.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if(l[u].type==="polygon"){for(var h=l[u].exterior,f=l[u].interiors,c=0;c<h.length;c++)Pt(h[c],h[c],s);for(var v=0;v<(f?f.length:0);v++)for(var c=0;c<f[v].length;c++)Pt(f[v][c],f[v][c],s)}i=this._rect,i.copy(o),this.center=[i.x+i.width/2,i.y+i.height/2]},cloneShallow:function(t){t==null&&(t=this.name);var e=new ps(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function vL(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;e==null&&(e=1024);for(var r=t.features,a=0;a<r.length;a++)for(var i=r[a],n=i.geometry,o=n.coordinates,s=n.encodeOffsets,l=0;l<o.length;l++){var u=o[l];if(n.type==="Polygon")o[l]=u1(u,s[l],e);else if(n.type==="MultiPolygon")for(var h=0;h<u.length;h++){var f=u[h];u[h]=u1(f,s[l][h],e)}}return t.UTF8Encoding=!1,t}function u1(t,e,r){for(var a=[],i=e[0],n=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,a.push([s/r,l/r])}return a}var nd=function(t,e){return vL(t),V(ee(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var a=r.properties,i=r.geometry,n=i.coordinates,o=[];i.type==="Polygon"&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),i.type==="MultiPolygon"&&M(n,function(l){l[0]&&o.push({type:"polygon",exterior:l[0],interiors:l.slice(1)})});var s=new ps(a[e||"name"],o,a.cp);return s.properties=a,s})},ms=Pe();function dL(t){return t.type==="category"?pL(t):yL(t)}function gL(t,e){return t.type==="category"?mL(t,e):{ticks:t.scale.getTicks()}}function pL(t){var e=t.getLabelModel(),r=h1(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function h1(t,e){var r=f1(t,"labels"),a=ad(e),i=c1(r,a);if(i)return i;var n,o;return se(a)?n=g1(t,a):(o=a==="auto"?_L(t):a,n=d1(t,o)),v1(r,a,{labels:n,labelCategoryInterval:o})}function mL(t,e){var r=f1(t,"ticks"),a=ad(e),i=c1(r,a);if(i)return i;var n,o;if((!e.get("show")||t.scale.isBlank())&&(n=[]),se(a))n=g1(t,a,!0);else if(a==="auto"){var s=h1(t,t.getLabelModel());o=s.labelCategoryInterval,n=V(s.labels,function(l){return l.tickValue})}else o=a,n=d1(t,o,!0);return v1(r,a,{ticks:n,tickCategoryInterval:o})}function yL(t){var e=t.scale.getTicks(),r=gs(t);return{labels:V(e,function(a,i){return{formattedLabel:r(a,i),rawLabel:t.scale.getLabel(a),tickValue:a}})}}function f1(t,e){return ms(t)[e]||(ms(t)[e]=[])}function c1(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function v1(t,e,r){return t.push({key:e,value:r}),r}function _L(t){var e=ms(t).autoInterval;return e??(ms(t).autoInterval=t.calculateCategoryInterval())}function xL(t){var e=wL(t),r=gs(t),a=(e.axisRotate-e.labelRotate)/180*Math.PI,i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=n[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(a)),f=Math.abs(u*Math.sin(a)),c=0,v=0;l<=n[1];l+=s){var d=0,g=0,p=Rr(r(l),e.font,"center","top");d=p.width*1.3,g=p.height*1.3,c=Math.max(c,d,7),v=Math.max(v,g,7)}var m=c/h,y=v/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),w=ms(t.model),b=t.getExtent(),A=w.lastAutoInterval,S=w.lastTickCount;return A!=null&&S!=null&&Math.abs(A-_)<=1&&Math.abs(S-o)<=1&&A>_&&w.axisExtend0===b[0]&&w.axisExtend1===b[1]?_=A:(w.lastTickCount=o,w.lastAutoInterval=_,w.axisExtend0=b[0],w.axisExtend1=b[1]),_}function wL(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function d1(t,e,r){var a=gs(t),i=t.scale,n=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=n[0],h=i.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=s1(t),c=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;c&&u!==n[0]&&g(n[0]);for(var d=u;d<=n[1];d+=l)g(d);v&&d-l!==n[1]&&g(n[1]);function g(p){s.push(r?p:{formattedLabel:a(p),rawLabel:i.getLabel(p),tickValue:p})}return s}function g1(t,e,r){var a=t.scale,i=gs(t),n=[];return M(a.getTicks(),function(o){var s=a.getLabel(o);e(o,s)&&n.push(r?o:{formattedLabel:i(o),rawLabel:s,tickValue:o})}),n}var p1=[0,1],Qt=function(t,e,r){this.dim=t,this.scale=e,this._extent=r||[0,0],this.inverse=!1,this.onBand=!1};Qt.prototype={constructor:Qt,contain:function(t){var e=this._extent,r=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=r&&t<=a},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Jc(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var r=this._extent;r[0]=t,r[1]=e},dataToCoord:function(t,e){var r=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(r=r.slice(),m1(r,a.count())),Nt(t,p1,r,e)},coordToData:function(t,e){var r=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(r=r.slice(),m1(r,a.count()));var i=Nt(t,r,p1,e);return this.scale.scale(i)},pointToData:function(t,e){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),r=gL(this,e),a=r.ticks,i=V(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this),n=e.get("alignWithLabel");return bL(this,i,n,t.clamp),i},getMinorTicksCoords:function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var r=this.scale.getMinorTicks(e),a=V(r,function(i){return V(i,function(n){return{coord:this.dataToCoord(n),tickValue:n}},this)},this);return a},getViewLabels:function(){return dL(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),r=e[1]-e[0]+(this.onBand?1:0);r===0&&(r=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/r},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return xL(this)}};function m1(t,e){var r=t[1]-t[0],a=e,i=r/a/2;t[0]+=i,t[1]-=i}function bL(t,e,r,a){var i=e.length;if(!t.onBand||r||!i)return;var n=t.getExtent(),o,s;if(i===1)e[0].coord=n[0],o=e[1]={coord:n[0]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;M(e,function(v){v.coord-=u/2});var h=t.scale.getExtent();s=1+h[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var f=n[0]>n[1];c(e[0].coord,n[0])&&(a?e[0].coord=n[0]:e.shift()),a&&c(n[0],e[0].coord)&&e.unshift({coord:n[0]}),c(n[1],o.coord)&&(a?o.coord=n[1]:e.pop()),a&&c(o.coord,n[1])&&e.push({coord:n[1]});function c(v,d){return v=re(v),d=re(d),f?v>d:v<d}}var SL=nd,y1={};M(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){y1[t]=YT[t]});var _1={};M(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){_1[t]=sa[t]}),Vt.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){if(T){var r=t.coordinateSystem;if(r!=="polar"&&r!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return ca(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},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}});function Bu(t,e){var r=t.mapDimension("defaultedLabel",!0),a=r.length;if(a===1)return Ti(t,e,r[0]);if(a){for(var i=[],n=0;n<r.length;n++){var o=Ti(t,e,r[n]);i.push(o)}return i.join(" ")}}function Wa(t,e,r){q.call(this),this.updateData(t,e,r)}var Dr=Wa.prototype,AL=Wa.getSymbolSize=function(t,e){var r=t.getItemVisual(e,"symbolSize");return r instanceof Array?r.slice():[+r,+r]};function od(t){return[t[0]/2,t[1]/2]}function TL(t,e){this.parent.drift(t,e)}Dr._createSymbol=function(t,e,r,a,i){this.removeAll();var n=e.getItemVisual(r,"color"),o=Ye(t,-1,-1,2,2,n,i);o.attr({z2:100,culling:!0,scale:od(a)}),o.drift=TL,this._symbolType=t,this.add(o)},Dr.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Dr.getSymbolPath=function(){return this.childAt(0)},Dr.getScale=function(){return this.childAt(0).scale},Dr.highlight=function(){this.childAt(0).trigger("emphasis")},Dr.downplay=function(){this.childAt(0).trigger("normal")},Dr.setZ=function(t,e){var r=this.childAt(0);r.zlevel=t,r.z=e},Dr.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Dr.updateData=function(t,e,r){this.silent=!1;var a=t.getItemVisual(e,"symbol")||"circle",i=t.hostModel,n=AL(t,e),o=a!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(a,t,e,n,s)}else{var l=this.childAt(0);l.silent=!1,ft(l,{scale:od(n)},i,e)}if(this._updateCommon(t,e,n,r),o){var l=this.childAt(0),u=r&&r.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),Se(l,h,i,e)}this._seriesModel=i};var CL=["itemStyle"],DL=["emphasis","itemStyle"],ML=["label"],IL=["emphasis","label"];Dr._updateCommon=function(t,e,r,a){var i=this.childAt(0),n=t.hostModel,o=t.getItemVisual(e,"color");i.type!=="image"?i.useStyle({strokeNoScale:!0}):i.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=a&&a.itemStyle,l=a&&a.hoverItemStyle,u=a&&a.symbolOffset,h=a&&a.labelModel,f=a&&a.hoverLabelModel,c=a&&a.hoverAnimation,v=a&&a.cursorStyle;if(!a||t.hasItemOption){var d=a&&a.itemModel?a.itemModel:t.getItemModel(e);s=d.getModel(CL).getItemStyle(["color"]),l=d.getModel(DL).getItemStyle(),u=d.getShallow("symbolOffset"),h=d.getModel(ML),f=d.getModel(IL),c=d.getShallow("hoverAnimation"),v=d.getShallow("cursor")}else l=et({},l);var g=i.style,p=t.getItemVisual(e,"symbolRotate");i.attr("rotation",(p||0)*Math.PI/180||0),u&&i.attr("position",[H(u[0],r[0]),H(u[1],r[1])]),v&&i.attr("cursor",v),i.setColor(o,a&&a.symbolInnerColor),i.setStyle(s);var m=t.getItemVisual(e,"opacity");m!=null&&(g.opacity=m);var y=t.getItemVisual(e,"liftZ"),_=i.__z2Origin;y!=null?_==null&&(i.__z2Origin=i.z2,i.z2+=y):_!=null&&(i.z2=_,i.__z2Origin=null);var w=a&&a.useNameLabel;Fe(g,l,h,f,{labelFetcher:n,labelDataIndex:e,defaultText:b,isRectText:!0,autoColor:o});function b(A,S){return w?t.getName(A):Bu(t,A)}i.__symbolOriginalScale=od(r),i.hoverStyle=l,i.highDownOnUpdate=c&&n.isAnimationEnabled()?LL:null,Ot(i)};function LL(t,e){if(!(this.incremental||this.useHoverLayer))if(e==="emphasis"){var r=this.__symbolOriginalScale,a=r[1]/r[0],i={scale:[Math.max(r[0]*1.1,r[0]+3),Math.max(r[1]*1.1,r[1]+3*a)]};this.animateTo(i,400,"elasticOut")}else e==="normal"&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}Dr.fadeOut=function(t,e){var r=this.childAt(0);this.silent=r.silent=!0,!(e&&e.keepLabel)&&(r.style.text=null),ft(r,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},It(Wa,q);function Bn(t){this.group=new q,this._symbolCtor=t||Wa}var Vn=Bn.prototype;function sd(t,e,r,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(r))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}Vn.updateData=function(t,e){e=x1(e);var r=this.group,a=t.hostModel,i=this._data,n=this._symbolCtor,o=w1(t);i||r.removeAll(),t.diff(i).add(function(s){var l=t.getItemLayout(s);if(sd(t,l,s,e)){var u=new n(t,s,o);u.attr("position",l),t.setItemGraphicEl(s,u),r.add(u)}}).update(function(s,l){var u=i.getItemGraphicEl(l),h=t.getItemLayout(s);if(!sd(t,h,s,e)){r.remove(u);return}u?(u.updateData(t,s,o),ft(u,{position:h},a)):(u=new n(t,s),u.attr("position",h)),r.add(u),t.setItemGraphicEl(s,u)}).remove(function(s){var l=i.getItemGraphicEl(s);l&&l.fadeOut(function(){r.remove(l)})}).execute(),this._data=t},Vn.isPersistent=function(){return!0},Vn.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,r){var a=t.getItemLayout(r);e.attr("position",a)})},Vn.incrementalPrepareUpdate=function(t){this._seriesScope=w1(t),this._data=null,this.group.removeAll()},Vn.incrementalUpdate=function(t,e,r){r=x1(r);function a(s){s.isGroup||(s.incremental=s.useHoverLayer=!0)}for(var i=t.start;i<t.end;i++){var n=e.getItemLayout(i);if(sd(e,n,i,r)){var o=new this._symbolCtor(e,i,this._seriesScope);o.traverse(a),o.attr("position",n),this.group.add(o),e.setItemGraphicEl(i,o)}}};function x1(t){return t!=null&&!lt(t)&&(t={isIgnore:t}),t||{}}Vn.remove=function(t){var e=this.group,r=this._data;r&&t?r.eachItemGraphicEl(function(a){a.fadeOut(function(){e.remove(a)})}):e.removeAll()};function w1(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function ld(t,e,r){var a=t.getBaseAxis(),i=t.getOtherAxis(a),n=PL(i,r),o=a.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),h=s==="x"||s==="radius"?1:0,f=V(t.dimensions,function(d){return e.mapDimension(d)}),c,v=e.getCalculationInfo("stackResultDimension");return(c|=fa(e,f[0]))&&(f[0]=v),(c|=fa(e,f[1]))&&(f[1]=v),{dataDimsForPoint:f,valueStart:n,valueAxisDim:s,baseAxisDim:o,stacked:!!c,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function PL(t,e){var r=0,a=t.scale.getExtent();return e==="start"?r=a[0]:e==="end"?r=a[1]:a[0]>0?r=a[0]:a[1]<0&&(r=a[1]),r}function ud(t,e,r,a){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=t.valueStart);var n=t.baseDataOffset,o=[];return o[n]=r.get(t.baseDim,a),o[1-n]=i,e.dataToPoint(o)}function EL(t,e){var r=[];return e.diff(t).add(function(a){r.push({cmd:"+",idx:a})}).update(function(a,i){r.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){r.push({cmd:"-",idx:a})}).execute(),r}var RL=function(t,e,r,a,i,n,o,s){for(var l=EL(t,e),u=[],h=[],f=[],c=[],v=[],d=[],g=[],p=ld(i,e,o),m=ld(n,t,s),y=0;y<l.length;y++){var _=l[y],w=!0;switch(_.cmd){case"=":var b=t.getItemLayout(_.idx),A=e.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=A.slice()),u.push(b),h.push(A),f.push(r[_.idx]),c.push(a[_.idx1]),g.push(e.getRawIndex(_.idx1));break;case"+":var S=_.idx;u.push(i.dataToPoint([e.get(p.dataDimsForPoint[0],S),e.get(p.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),f.push(ud(p,i,e,S)),c.push(a[S]),g.push(e.getRawIndex(S));break;case"-":var S=_.idx,D=t.getRawIndex(S);D!==S?(u.push(t.getItemLayout(S)),h.push(n.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),f.push(r[S]),c.push(ud(m,n,t,S)),g.push(D)):w=!1}w&&(v.push(_),d.push(d.length))}d.sort(function(Z,W){return g[Z]-g[W]});for(var I=[],L=[],P=[],R=[],E=[],y=0;y<d.length;y++){var S=d[y];I[y]=u[S],L[y]=h[S],P[y]=f[S],R[y]=c[S],E[y]=v[S]}return{current:I,next:L,stackedOnCurrent:P,stackedOnNext:R,status:E}},b1=ea,S1=ra,A1=mo,Vu=ge,hd=[],fr=[],cr=[];function va(t){return isNaN(t[0])||isNaN(t[1])}function fd(t,e,r,a,i,n,o,s,l,u,h){return u==="none"||!u?NL.apply(this,arguments):OL.apply(this,arguments)}function OL(t,e,r,a,i,n,o,s,l,u,h){for(var f=0,c=r,v=0;v<a;v++){var d=e[c];if(c>=i||c<0)break;if(va(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]);else if(l>0){var g=e[f],p=u==="y"?1:0,m=(d[p]-g[p])*l;Vu(fr,g),fr[p]=g[p]+m,Vu(cr,d),cr[p]=d[p]-m,t.bezierCurveTo(fr[0],fr[1],cr[0],cr[1],d[0],d[1])}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function NL(t,e,r,a,i,n,o,s,l,u,h){for(var f=0,c=r,v=0;v<a;v++){var d=e[c];if(c>=i||c<0)break;if(va(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]),Vu(fr,d);else if(l>0){var g=c+n,y=e[g];if(h)for(;y&&va(e[g]);)g+=n,y=e[g];var p=.5,m=e[f],y=e[g];if(!y||va(y))Vu(cr,d);else{va(y)&&!h&&(y=d),Jr(hd,y,m);var _,w;if(u==="x"||u==="y"){var b=u==="x"?0:1;_=Math.abs(d[b]-m[b]),w=Math.abs(d[b]-y[b])}else _=ta(d,m),w=ta(d,y);p=w/(w+_),A1(cr,d,hd,-l*(1-p))}b1(fr,fr,s),S1(fr,fr,o),b1(cr,cr,s),S1(cr,cr,o),t.bezierCurveTo(fr[0],fr[1],cr[0],cr[1],d[0],d[1]),A1(fr,d,hd,l*p)}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function cd(t,e){var r=[1/0,1/0],a=[-1/0,-1/0];if(e)for(var i=0;i<t.length;i++){var n=t[i];n[0]<r[0]&&(r[0]=n[0]),n[1]<r[1]&&(r[1]=n[1]),n[0]>a[0]&&(a[0]=n[0]),n[1]>a[1]&&(a[1]=n[1])}return{min:e?r:a,max:e?a:r}}var kL=pt.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Fc(pt.prototype.brush),buildPath:function(t,e){var r=e.points,a=0,i=r.length,n=cd(r,e.smoothConstraint);if(e.connectNulls){for(;i>0&&va(r[i-1]);i--);for(;a<i&&va(r[a]);a++);}for(;a<i;)a+=fd(t,r,a,i,i,1,n.min,n.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),T1=pt.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Fc(pt.prototype.brush),buildPath:function(t,e){var r=e.points,a=e.stackedOnPoints,i=0,n=r.length,o=e.smoothMonotone,s=cd(r,e.smoothConstraint),l=cd(a,e.smoothConstraint);if(e.connectNulls){for(;n>0&&va(r[n-1]);n--);for(;i<n&&va(r[i]);i++);}for(;i<n;){var u=fd(t,r,i,n,n,1,s.min,s.max,e.smooth,o,e.connectNulls);fd(t,a,i+u-1,u,n,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),i+=u+1,t.closePath()}}});function C1(t,e,r){var a=t.getArea(),i=t.getBaseAxis().isHorizontal(),n=a.x,o=a.y,s=a.width,l=a.height,u=r.get("lineStyle.width")||2;n-=u/2,o-=u/2,s+=u,l+=u,n=Math.floor(n),s=Math.round(s);var h=new xt({shape:{x:n,y:o,width:s,height:l}});return e&&(h.shape[i?"width":"height"]=0,Se(h,{shape:{width:s,height:l}},r)),h}function D1(t,e,r){var a=t.getArea(),i=new Ar({shape:{cx:re(t.cx,1),cy:re(t.cy,1),r0:re(a.r0,1),r:re(a.r,1),startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});return e&&(i.shape.endAngle=a.startAngle,Se(i,{shape:{endAngle:a.endAngle}},r)),i}function Gu(t,e,r){if(t){if(t.type==="polar")return D1(t,e,r);if(t.type==="cartesian2d")return C1(t,e,r)}else return null;return null}function M1(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++){var a=t[r],i=e[r];if(a[0]!==i[0]||a[1]!==i[1])return}return!0}}function I1(t,e){var r=[],a=[],i=[],n=[];return Po(t,r,a),Po(e,i,n),Math.max(Math.abs(r[0]-i[0]),Math.abs(r[1]-i[1]),Math.abs(a[0]-n[0]),Math.abs(a[1]-n[1]))}function L1(t){return typeof t=="number"?t:t?.5:0}function zL(t,e,r){if(!r.valueDim)return[];for(var a=[],i=0,n=e.count();i<n;i++)a.push(ud(r,t,e,i));return a}function Ua(t,e,r){for(var a=e.getBaseAxis(),i=a.dim==="x"||a.dim==="radius"?0:1,n=[],o=0;o<t.length-1;o++){var s=t[o+1],l=t[o];n.push(l);var u=[];switch(r){case"end":u[i]=s[i],u[1-i]=l[1-i],n.push(u);break;case"middle":var h=(l[i]+s[i])/2,f=[];u[i]=f[i]=h,u[1-i]=l[1-i],f[1-i]=s[1-i],n.push(u),n.push(f);break;default:u[i]=l[i],u[1-i]=s[1-i],n.push(u)}}return t[o]&&n.push(t[o]),n}function BL(t,e){var r=t.getVisual("visualMeta");if(!(!r||!r.length||!t.count())){if(e.type!=="cartesian2d"){T&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var a,i,n=r.length-1;n>=0;n--){var o=r[n].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if(a=l&&l.coordDim,a==="x"||a==="y"){i=r[n];break}}if(!i){T&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(a),h=V(i.stops,function(y){return{coord:u.toGlobalCoord(u.dataToCoord(y.value)),color:y.color}}),f=h.length,c=i.outerColors.slice();f&&h[0].coord>h[f-1].coord&&(h.reverse(),c.reverse());var v=10,d=h[0].coord-v,g=h[f-1].coord+v,p=g-d;if(p<.001)return"transparent";M(h,function(y){y.offset=(y.coord-d)/p}),h.push({offset:f?h[f-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:c[0]||"transparent"});var m=new pi(0,0,0,0,h,!0);return m[a]=d,m[a+"2"]=g,m}}function VL(t,e,r){var a=t.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=r.getAxesByScale("ordinal")[0];if(!!n&&!(i&&GL(n,e))){var o=e.mapDimension(n.dim),s={};return M(n.getViewLabels(),function(l){s[l.tickValue]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function GL(t,e){var r=t.getExtent(),a=Math.abs(r[1]-r[0])/t.scale.count();isNaN(a)&&(a=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;o<i;o+=n)if(Wa.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>a)return!1;return!0}function P1(t,e,r){if(t.type==="cartesian2d"){var a=t.getBaseAxis().isHorizontal(),i=C1(t,e,r);if(!r.get("clip",!0)){var n=i.shape,o=Math.max(n.width,n.height);a?(n.y-=o,n.height+=o*2):(n.x-=o,n.width+=o*2)}return i}else return D1(t,e,r)}ue.extend({type:"line",init:function(){var t=new q,e=new Bn;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,r){var a=t.coordinateSystem,i=this.group,n=t.getData(),o=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=n.mapArray(n.getItemLayout),u=a.type==="polar",h=this._coordSys,f=this._symbolDraw,c=this._polyline,v=this._polygon,d=this._lineGroup,g=t.get("animation"),p=!s.isEmpty(),m=s.get("origin"),y=ld(a,n,m),_=zL(a,n,y),w=t.get("showSymbol"),b=w&&!u&&VL(t,n,a),A=this._data;A&&A.eachItemGraphicEl(function(E,Z){E.__temp&&(i.remove(E),A.setItemGraphicEl(Z,null))}),w||f.remove(),i.add(d);var S=!u&&t.get("step"),D;a&&a.getArea&&t.get("clip",!0)&&(D=a.getArea(),D.width!=null?(D.x-=.1,D.y-=.1,D.width+=.2,D.height+=.2):D.r0&&(D.r0-=.5,D.r1+=.5)),this._clipShapeForSymbol=D,c&&h.type===a.type&&S===this._step?(p&&!v?v=this._newPolygon(l,_,a,g):v&&!p&&(d.remove(v),v=this._polygon=null),d.setClipPath(P1(a,!1,t)),w&&f.updateData(n,{isIgnore:b,clipShape:D}),n.eachItemGraphicEl(function(E){E.stopAnimation(!0)}),(!M1(this._stackedOnPoints,_)||!M1(this._points,l))&&(g?this._updateAnimation(n,_,a,r,S,m):(S&&(l=Ua(l,a,S),_=Ua(_,a,S)),c.setShape({points:l}),v&&v.setShape({points:l,stackedOnPoints:_})))):(w&&f.updateData(n,{isIgnore:b,clipShape:D}),S&&(l=Ua(l,a,S),_=Ua(_,a,S)),c=this._newPolyline(l,a,g),p&&(v=this._newPolygon(l,_,a,g)),d.setClipPath(P1(a,!0,t)));var I=BL(n,a)||n.getVisual("color");c.useStyle(J(o.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"}));var L=t.get("smooth");if(L=L1(t.get("smooth")),c.setShape({smooth:L,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),v){var P=n.getCalculationInfo("stackedOnSeries"),R=0;v.useStyle(J(s.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel"})),P&&(R=L1(P.get("smooth"))),v.setShape({smooth:L,stackedOnSmooth:R,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=n,this._coordSys=a,this._stackedOnPoints=_,this._points=l,this._step=S,this._valueOrigin=m},dispose:function(){},highlight:function(t,e,r,a){var i=t.getData(),n=Rl(i,a);if(!(n instanceof Array)&&n!=null&&n>=0){var o=i.getItemGraphicEl(n);if(!o){var s=i.getItemLayout(n);if(!s||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;o=new Wa(i,n),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,i.setItemGraphicEl(n,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else ue.prototype.highlight.call(this,t,e,r,a)},downplay:function(t,e,r,a){var i=t.getData(),n=Rl(i,a);if(n!=null&&n>=0){var o=i.getItemGraphicEl(n);o&&(o.__temp?(i.setItemGraphicEl(n,null),this.group.remove(o)):o.downplay())}else ue.prototype.downplay.call(this,t,e,r,a)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new kL({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new T1({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(r),this._polygon=r,r},_updateAnimation:function(t,e,r,a,i,n){var o=this._polyline,s=this._polygon,l=t.hostModel,u=RL(this._data,t,this._stackedOnPoints,e,this._coordSys,r,this._valueOrigin,n),h=u.current,f=u.stackedOnCurrent,c=u.next,v=u.stackedOnNext;if(i&&(h=Ua(u.current,r,i),f=Ua(u.stackedOnCurrent,r,i),c=Ua(u.next,r,i),v=Ua(u.stackedOnNext,r,i)),I1(h,c)>3e3||s&&I1(f,v)>3e3){o.setShape({points:c}),s&&s.setShape({points:c,stackedOnPoints:v});return}o.shape.__points=u.current,o.shape.points=h,ft(o,{shape:{points:c}},l),s&&(s.setShape({points:h,stackedOnPoints:f}),ft(s,{shape:{points:c,stackedOnPoints:v}},l));for(var d=[],g=u.status,p=0;p<g.length;p++){var m=g[p].cmd;if(m==="="){var y=t.getItemGraphicEl(g[p].idx1);y&&d.push({el:y,ptIdx:p})}}o.animators&&o.animators.length&&o.animators[0].during(function(){for(var _=0;_<d.length;_++){var w=d[_].el;w.attr("position",o.shape.__points[d[_].ptIdx])}})},remove:function(t){var e=this.group,r=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),r&&r.eachItemGraphicEl(function(a,i){a.__temp&&(e.remove(a),r.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var Ii=function(t,e,r){return{seriesType:t,performRawSeries:!0,reset:function(a,i,n){var o=a.getData(),s=a.get("symbol"),l=a.get("symbolSize"),u=a.get("symbolKeepAspect"),h=a.get("symbolRotate"),f=se(s),c=se(l),v=se(h),d=f||c||v,g=!f&&s?s:e,p=c?null:l;if(o.setVisual({legendSymbol:r||g,symbol:g,symbolSize:p,symbolKeepAspect:u,symbolRotate:h}),i.isSeriesFiltered(a))return;function m(y,_){if(d){var w=a.getRawValue(_),b=a.getDataParams(_);f&&y.setItemVisual(_,"symbol",s(w,b)),c&&y.setItemVisual(_,"symbolSize",l(w,b)),v&&y.setItemVisual(_,"symbolRotate",h(w,b))}if(y.hasItemOption){var A=y.getItemModel(_),S=A.getShallow("symbol",!0),D=A.getShallow("symbolSize",!0),I=A.getShallow("symbolRotate",!0),L=A.getShallow("symbolKeepAspect",!0);S!=null&&y.setItemVisual(_,"symbol",S),D!=null&&y.setItemVisual(_,"symbolSize",D),I!=null&&y.setItemVisual(_,"symbolRotate",I),L!=null&&y.setItemVisual(_,"symbolKeepAspect",L)}}return{dataEach:o.hasItemOption||d?m:null}}}},ys=function(t){return{seriesType:t,plan:Mn(),reset:function(e){var r=e.getData(),a=e.coordinateSystem,i=e.pipelineContext,n=i.large;if(!a)return;var o=V(a.dimensions,function(h){return r.mapDimension(h)}).slice(0,2),s=o.length,l=r.getCalculationInfo("stackResultDimension");fa(r,o[0])&&(o[0]=l),fa(r,o[1])&&(o[1]=l);function u(h,f){for(var c=h.end-h.start,v=n&&new Float32Array(c*s),d=h.start,g=0,p=[],m=[];d<h.end;d++){var y;if(s===1){var _=f.get(o[0],d);y=!isNaN(_)&&a.dataToPoint(_,null,m)}else{var _=p[0]=f.get(o[0],d),w=p[1]=f.get(o[1],d);y=!isNaN(_)&&!isNaN(w)&&a.dataToPoint(p,null,m)}n?(v[g++]=y?y[0]:NaN,v[g++]=y?y[1]:NaN):f.setItemLayout(d,y&&y.slice()||[NaN,NaN])}n&&f.setLayout("symbolPoints",v)}return s&&{progress:u}}}},HL={average:function(t){for(var e=0,r=0,a=0;a<t.length;a++)isNaN(t[a])||(e+=t[a],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},FL=function(t,e){return Math.round(t.length/2)},WL=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(e,r,a){var i=e.getData(),n=e.get("sampling"),o=e.coordinateSystem;if(o.type==="cartesian2d"&&n){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=u[1]-u[0],f=Math.round(i.count()/h);if(f>1){var c;typeof n=="string"?c=HL[n]:typeof n=="function"&&(c=n),c&&e.setData(i.downSample(i.mapDimension(l.dim),1/f,c,FL))}}}}};function UL(t){return this._axes[t]}var Hu=function(t){this._axes={},this._dimList=[],this.name=t||""};Hu.prototype={constructor:Hu,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return V(this._dimList,UL,this)},getAxesByScale:function(t){return t=t.toLowerCase(),ee(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var r=this._dimList,a=t instanceof Array?[]:{},i=0;i<r.length;i++){var n=r[i],o=this._axes[n];a[n]=o[e](t[n])}return a}};function _s(t){Hu.call(this,t)}_s.prototype={constructor:_s,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),r=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&r.contain(r.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,r){var a=this.getAxis("x"),i=this.getAxis("y");return r=r||[],r[0]=a.toGlobalCoord(a.dataToCoord(t[0])),r[1]=i.toGlobalCoord(i.dataToCoord(t[1])),r},clampData:function(t,e){var r=this.getAxis("x").scale,a=this.getAxis("y").scale,i=r.getExtent(),n=a.getExtent(),o=r.parse(t[0]),s=a.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),e[1]=Math.min(Math.max(Math.min(n[0],n[1]),s),Math.max(n[0],n[1])),e},pointToData:function(t,e){var r=this.getAxis("x"),a=this.getAxis("y");return e=e||[],e[0]=r.coordToData(r.toLocalCoord(t[0])),e[1]=a.coordToData(a.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis(t.dim==="x"?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1]),a=Math.min(e[0],e[1]),i=Math.max(t[0],t[1])-r,n=Math.max(e[0],e[1])-a,o=new vt(r,a,i,n);return o}},It(_s,Hu);var Fu=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom"};Fu.prototype={constructor:Fu,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return t==="top"||t==="bottom"},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},It(Fu,Qt);var E1={show:!0,zlevel: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:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},$a={};$a.categoryAxis=ut({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},E1),$a.valueAxis=ut({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},E1),$a.timeAxis=J({scale:!0,min:"dataMin",max:"dataMax"},$a.valueAxis),$a.logAxis=J({scale:!0,logBase:10},$a.valueAxis);var $L=["value","category","time","log"],Gn=function(t,e,r,a){M($L,function(i){e.extend({type:t+"Axis."+i,mergeDefaultAndTheme:function(n,o){var s=this.layoutMode,l=s?Cn(n):{},u=o.getTheme();ut(n,u.get(i+"Axis")),ut(n,this.getDefaultOption()),n.type=r(t,n),s&&za(n,l,s)},optionUpdated:function(){var n=this.option;n.type==="category"&&(this.__ordinalMeta=cs.createByAxisModel(this))},getCategories:function(n){var o=this.option;if(o.type==="category")return n?o.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:go([{},$a[i+"Axis"],a],!0)})}),wt.registerSubTypeDefaulter(t+"Axis",ot(r,t))},Hn=wt.extend({type:"cartesian2dAxis",axis:null,init:function(){Hn.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Hn.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Hn.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function R1(t,e){return e.type||(e.data?"category":"value")}ut(Hn.prototype,Di);var O1={offset:0};Gn("x",Hn,R1,O1),Gn("y",Hn,R1,O1),wt.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});function vd(t,e,r){return t.getCoordSysModel()===e}function Fn(t,e,r){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,r),this.model=t}var Ce=Fn.prototype;Ce.type="grid",Ce.axisPointerEnabled=!0,Ce.getRect=function(){return this._rect},Ce.update=function(t,e){var r=this._axesMap;this._updateScale(t,this.model),M(r.x,function(i){Fa(i.scale,i.model)}),M(r.y,function(i){Fa(i.scale,i.model)});var a={};M(r.x,function(i){N1(r,"y",i,a)}),M(r.y,function(i){N1(r,"x",i,a)}),this.resize(this.model,e)};function N1(t,e,r,a){r.getAxesOnZeroOf=function(){return n?[n]:[]};var i=t[e],n,o=r.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(!s)return;if(l!=null)k1(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&k1(i[u])&&!a[h(i[u])]){n=i[u];break}n&&(a[h(n)]=!0);function h(f){return f.dim+"_"+f.index}}function k1(t){return t&&t.type!=="category"&&t.type!=="time"&&K2(t)}Ce.resize=function(t,e,r){var a=qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var i=this._axesList;n(),!r&&t.get("containLabel")&&(M(i,function(o){if(!o.model.get("axisLabel.inside")){var s=j2(o);if(s){var l=o.isHorizontal()?"height":"width",u=o.model.get("axisLabel.margin");a[l]-=s[l]+u,o.position==="top"?a.y+=s.height+u:o.position==="left"&&(a.x+=s.width+u)}}}),n());function n(){M(i,function(o){var s=o.isHorizontal(),l=s?[0,a.width]:[0,a.height],u=o.inverse?1:0;o.setExtent(l[u],l[1-u]),ZL(o,s?a.x:a.y)})}},Ce.getAxis=function(t,e){var r=this._axesMap[t];if(r!=null){if(e==null){for(var a in r)if(r.hasOwnProperty(a))return r[a]}return r[e]}},Ce.getAxes=function(){return this._axesList.slice()},Ce.getCartesian=function(t,e){if(t!=null&&e!=null){var r="x"+t+"y"+e;return this._coordsMap[r]}lt(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===t||i[a].getAxis("y").index===e)return i[a]},Ce.getCartesians=function(){return this._coordsList.slice()},Ce.convertToPixel=function(t,e,r){var a=this._findConvertTarget(t,e);return a.cartesian?a.cartesian.dataToPoint(r):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(r)):null},Ce.convertFromPixel=function(t,e,r){var a=this._findConvertTarget(t,e);return a.cartesian?a.cartesian.pointToData(r):a.axis?a.axis.coordToData(a.axis.toLocalCoord(r)):null},Ce._findConvertTarget=function(t,e){var r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],n=e.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,yt(o,s)<0&&(s=null);else if(a&&i)s=this.getCartesian(a.componentIndex,i.componentIndex);else if(a)l=this.getAxis("x",a.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(n){var u=n.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},Ce.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Ce._initCartesian=function(t,e,r){var a={left:!1,right:!1,top:!1,bottom:!1},i={x:{},y:{}},n={x:0,y:0};if(e.eachComponent("xAxis",o("x"),this),e.eachComponent("yAxis",o("y"),this),!n.x||!n.y){this._axesMap={},this._axesList=[];return}this._axesMap=i,M(i.x,function(s,l){M(i.y,function(u,h){var f="x"+l+"y"+h,c=new _s(f);c.grid=this,c.model=t,this._coordsMap[f]=c,this._coordsList.push(c),c.addAxis(s),c.addAxis(u)},this)},this);function o(s){return function(l,u){if(!!vd(l,t,e)){var h=l.get("position");s==="x"?h!=="top"&&h!=="bottom"&&(h=a.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=a.left?"right":"left"),a[h]=!0;var f=new Fu(s,zn(l),[0,0],l.get("type"),h),c=f.type==="category";f.onBand=c&&l.get("boundaryGap"),f.inverse=l.get("inverse"),l.axis=f,f.model=l,f.grid=this,f.index=u,this._axesList.push(f),i[s][u]=f,n[s]++}}}},Ce._updateScale=function(t,e){M(this._axesList,function(a){a.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(a){if(B1(a)){var i=z1(a,t),n=i[0],o=i[1];if(!vd(n,e,t)||!vd(o,e,t))return;var s=this.getCartesian(n.componentIndex,o.componentIndex),l=a.getData(),u=s.getAxis("x"),h=s.getAxis("y");l.type==="list"&&(r(l,u,a),r(l,h,a))}},this);function r(a,i,n){M(a.mapDimension(i.dim,!0),function(o){i.scale.unionExtentFromData(a,fs(a,o))})}},Ce.getTooltipAxes=function(t){var e=[],r=[];return M(this.getCartesians(),function(a){var i=t!=null&&t!=="auto"?a.getAxis(t):a.getBaseAxis(),n=a.getOtherAxis(i);yt(e,i)<0&&e.push(i),yt(r,n)<0&&r.push(n)}),{baseAxes:e,otherAxes:r}};function ZL(t,e){var r=t.getExtent(),a=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return a-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return a-i+e}}var YL=["xAxis","yAxis"];function z1(t,e){return V(YL,function(r){var a=t.getReferringComponents(r)[0];if(T&&!a)throw new Error(r+' "'+Ut(t.get(r+"Index"),t.get(r+"Id"),0)+'" not found');return a})}function B1(t){return t.get("coordinateSystem")==="cartesian2d"}Fn.create=function(t,e){var r=[];return t.eachComponent("grid",function(a,i){var n=new Fn(a,t,e);n.name="grid_"+i,n.resize(a,e,!0),a.coordinateSystem=n,r.push(n)}),t.eachSeries(function(a){if(!!B1(a)){var i=z1(a,t),n=i[0],o=i[1],s=n.getCoordSysModel();if(T){if(!s)throw new Error('Grid "'+Ut(n.get("gridIndex"),n.get("gridId"),0)+'" not found');if(n.getCoordSysModel()!==o.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var l=s.coordinateSystem;a.coordinateSystem=l.getCartesian(n.componentIndex,o.componentIndex)}}),r},Fn.dimensions=Fn.prototype.dimensions=_s.prototype.dimensions,_e.register("cartesian2d",Fn);var Za=Math.PI,ze=function(t,e){this.opt=e,this.axisModel=t,J(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new q;var r=new q({position:e.position.slice(),rotation:e.rotation});r.updateTransform(),this._transform=r.transform,this._dumbGroup=r};ze.prototype={constructor:ze,hasBuilder:function(t){return!!V1[t]},add:function(t){V1[t].call(this)},getGroup:function(){return this.group}};var V1={axisLine:function(){var t=this.opt,e=this.axisModel;if(!!e.get("axisLine.show")){var r=this.axisModel.axis.getExtent(),a=this._transform,i=[r[0],0],n=[r[1],0];a&&(Pt(i,i,a),Pt(n,n,a));var o=et({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ye({anid:"line",subPixelOptimize:!0,shape:{x1:i[0],y1:i[1],x2:n[0],y2:n[1]},style:o,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize"),u=e.get("axisLine.symbolOffset")||0;if(typeof u=="number"&&(u=[u,u]),s!=null){typeof s=="string"&&(s=[s,s]),(typeof l=="string"||typeof l=="number")&&(l=[l,l]);var h=l[0],f=l[1];M([{rotate:t.rotation+Math.PI/2,offset:u[0],r:0},{rotate:t.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((i[0]-n[0])*(i[0]-n[0])+(i[1]-n[1])*(i[1]-n[1]))}],function(c,v){if(s[v]!=="none"&&s[v]!=null){var d=Ye(s[v],-h/2,-f/2,h,f,o.stroke,!0),g=c.r+c.offset,p=[i[0]+g*Math.cos(t.rotation),i[1]-g*Math.sin(t.rotation)];d.attr({rotation:c.rotate,position:p,silent:!0,z2:11}),this.group.add(d)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,r=KL(this,t,e),a=QL(this,t,e);qL(t,a,r),jL(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,r=Ut(t.axisName,e.get("name"));if(!!r){var a=e.get("nameLocation"),i=t.nameDirection,n=e.getModel("nameTextStyle"),o=e.get("nameGap")||0,s=this.axisModel.axis.getExtent(),l=s[0]>s[1]?-1:1,u=[a==="start"?s[0]-l*o:a==="end"?s[1]+l*o:(s[0]+s[1])/2,U1(a)?t.labelOffset+i*o:0],h,f=e.get("nameRotate");f!=null&&(f=f*Za/180);var c;U1(a)?h=H1(t.rotation,f??t.rotation,i):(h=XL(t,a,f||0,s),c=t.axisNameAvailableWidth,c!=null&&(c=Math.abs(c/Math.sin(h.rotation)),!isFinite(c)&&(c=null)));var v=n.getFont(),d=e.get("nameTruncate",!0)||{},g=d.ellipsis,p=Ut(t.nameTruncateMaxWidth,d.maxWidth,c),m=g!=null&&p!=null?by(r,p,v,g,{minChar:2,placeholder:d.placeholder}):r,y=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:r,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new dt({anid:"name",__fullText:r,__truncatedText:m,position:u,rotation:h.rotation,silent:F1(e),z2:1,tooltip:y&&y.show?et({content:r,formatter:function(){return r},formatterParams:w},y):null});$t(b.style,n,{text:m,textFont:v,textFill:n.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.get("align")||h.textAlign,textVerticalAlign:n.get("verticalAlign")||h.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=G1(e),b.eventData.targetType="axisName",b.eventData.name=r),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},G1=ze.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},H1=ze.innerTextLayout=function(t,e,r){var a=ev(e-t),i,n;return Uo(a)?(n=r>0?"top":"bottom",i="center"):Uo(a-Za)?(n=r>0?"bottom":"top",i="center"):(n="middle",a>0&&a<Za?i=r>0?"right":"left":i=r>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:n}};function XL(t,e,r,a){var i=ev(r-t.rotation),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Uo(i-Za/2)?(o=l?"bottom":"top",n="center"):Uo(i-Za*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",i<Za*1.5&&i>Za/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}var F1=ze.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function qL(t,e,r){if(!s1(t.axis)){var a=t.get("axisLabel.showMinLabel"),i=t.get("axisLabel.showMaxLabel");e=e||[],r=r||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=r[0],h=r[1],f=r[r.length-1],c=r[r.length-2];a===!1?(vr(n),vr(u)):W1(n,o)&&(a?(vr(o),vr(h)):(vr(n),vr(u))),i===!1?(vr(s),vr(f)):W1(l,s)&&(i?(vr(l),vr(c)):(vr(s),vr(f)))}}function vr(t){t&&(t.ignore=!0)}function W1(t,e,r){var a=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!a||!i)){var n=fn([]);return aa(n,n,-t.rotation),a.applyTransform(Sa([],n,t.getLocalTransform())),i.applyTransform(Sa([],n,e.getLocalTransform())),a.intersect(i)}}function U1(t){return t==="middle"||t==="center"}function $1(t,e,r,a,i){for(var n=[],o=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,e&&(Pt(o,o,e),Pt(s,s,e));var h=new ye({anid:i+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:a,z2:2,silent:!0});n.push(h)}return n}function KL(t,e,r){var a=e.axis,i=e.getModel("axisTick");if(!(!i.get("show")||a.scale.isBlank())){for(var n=i.getModel("lineStyle"),o=r.tickDirection*i.get("length"),s=a.getTicksCoords(),l=$1(s,t._transform,o,J(n.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),u=0;u<l.length;u++)t.group.add(l[u]);return l}}function jL(t,e,r){var a=e.axis,i=e.getModel("minorTick");if(!(!i.get("show")||a.scale.isBlank())){var n=a.getMinorTicksCoords();if(!!n.length)for(var o=i.getModel("lineStyle"),s=r.tickDirection*i.get("length"),l=J(o.getLineStyle(),J(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<n.length;u++)for(var h=$1(n[u],t._transform,s,l,"minorticks_"+u),f=0;f<h.length;f++)t.group.add(h[f])}}function QL(t,e,r){var a=e.axis,i=Ut(r.axisLabelShow,e.get("axisLabel.show"));if(!(!i||a.scale.isBlank())){var n=e.getModel("axisLabel"),o=n.get("margin"),s=a.getViewLabels(),l=(Ut(r.labelRotate,n.get("rotate"))||0)*Za/180,u=H1(r.rotation,l,r.labelDirection),h=e.getCategories&&e.getCategories(!0),f=[],c=F1(e),v=e.get("triggerEvent");return M(s,function(d,g){var p=d.tickValue,m=d.formattedLabel,y=d.rawLabel,_=n;h&&h[p]&&h[p].textStyle&&(_=new _t(h[p].textStyle,n,e.ecModel));var w=_.getTextColor()||e.get("axisLine.lineStyle.color"),b=a.dataToCoord(p),A=[b,r.labelOffset+r.labelDirection*o],S=new dt({anid:"label_"+p,position:A,rotation:u.rotation,silent:c,z2:10});$t(S.style,_,{text:m,textAlign:_.getShallow("align",!0)||u.textAlign,textVerticalAlign:_.getShallow("verticalAlign",!0)||_.getShallow("baseline",!0)||u.textVerticalAlign,textFill:typeof w=="function"?w(a.type==="category"?y:a.type==="value"?p+"":p,g):w}),v&&(S.eventData=G1(e),S.eventData.targetType="axisLabel",S.eventData.value=y),t._dumbGroup.add(S),S.updateTransform(),f.push(S),t.group.add(S),S.decomposeTransform()}),f}}var Wn=M,dd=ot;function JL(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return tP(r,t,e),r.seriesInvolved&&rP(r,t),r}function tP(t,e,r){var a=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),n=i.get("link",!0)||[],o=[];Wn(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=xs(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var h=s.model,f=h.getModel("tooltip",a);if(Wn(s.getAxes(),dd(g,!1,null)),s.getTooltipAxes&&a&&f.get("show")){var c=f.get("trigger")==="axis",v=f.get("axisPointer.type")==="cross",d=s.getTooltipAxes(f.get("axisPointer.axis"));(c||v)&&Wn(d.baseAxes,dd(g,v?"cross":!0,c)),v&&Wn(d.otherAxes,dd(g,"cross",!1))}function g(p,m,y){var _=y.model.getModel("axisPointer",i),w=_.get("show");if(!(!w||w==="auto"&&!p&&!md(_))){m==null&&(m=_.get("triggerTooltip")),_=p?eP(y,f,i,e,p,m):_;var b=_.get("snap"),A=xs(y.model),S=m||b||y.type==="category",D=t.axesInfo[A]={key:A,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,involveSeries:S,snap:b,useHandle:md(_),seriesModels:[]};u[A]=D,t.seriesInvolved|=S;var I=aP(n,y);if(I!=null){var L=o[I]||(o[I]={axesInfo:{}});L.axesInfo[A]=D,L.mapper=n[I].mapper,D.linkGroup=L}}}})}function eP(t,e,r,a,i,n){var o=e.getModel("axisPointer"),s={};Wn(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(f){s[f]=rt(o.get(f))}),s.snap=t.type!=="category"&&!!n,o.get("type")==="cross"&&(s.type="line");var l=s.label||(s.label={});if(l.show==null&&(l.show=!1),i==="cross"){var u=o.get("label.show");if(l.show=u??!0,!n){var h=s.lineStyle=o.get("crossStyle");h&&J(l,h.textStyle)}}return t.model.getModel("axisPointer",new _t(s,r,a))}function rP(t,e){e.eachSeries(function(r){var a=r.coordinateSystem,i=r.get("tooltip.trigger",!0),n=r.get("tooltip.show",!0);!a||i==="none"||i===!1||i==="item"||n===!1||r.get("axisPointer.show",!0)===!1||Wn(t.coordSysAxesInfo[xs(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})},this)}function aP(t,e){for(var r=e.model,a=e.dim,i=0;i<t.length;i++){var n=t[i]||{};if(gd(n[a+"AxisId"],r.id)||gd(n[a+"AxisIndex"],r.componentIndex)||gd(n[a+"AxisName"],r.name))return i}}function gd(t,e){return t==="all"||z(t)&&yt(t,e)>=0||t===e}function iP(t){var e=pd(t);if(!!e){var r=e.axisPointerModel,a=e.axis.scale,i=r.option,n=r.get("status"),o=r.get("value");o!=null&&(o=a.parse(o));var s=md(r);n==null&&(i.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function pd(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[xs(t)]}function nP(t){var e=pd(t);return e&&e.axisPointerModel}function md(t){return!!t.get("handle.show")}function xs(t){return t.type+"||"+t.id}var Xe=he({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,r,a){this.axisPointerClass&&iP(t),Xe.superApply(this,"render",arguments),Z1(this,t,e,r,a,!0)},updateAxisPointer:function(t,e,r,a,i){Z1(this,t,e,r,a,!1)},remove:function(t,e){var r=this._axisPointer;r&&r.remove(e),Xe.superApply(this,"remove",arguments)},dispose:function(t,e){Y1(this,e),Xe.superApply(this,"dispose",arguments)}});function Z1(t,e,r,a,i,n){var o=Xe.getAxisPointerClass(t.axisPointerClass);if(!!o){var s=nP(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,a,n):Y1(t,a)}}function Y1(t,e,r){var a=t._axisPointer;a&&a.dispose(e,r),t._axisPointer=null}var yd=[];Xe.registerAxisPointerClass=function(t,e){if(T&&yd[t])throw new Error("axisPointer "+t+" exists");yd[t]=e},Xe.getAxisPointerClass=function(t){return t&&yd[t]};function _d(t,e,r){r=r||{};var a=t.coordinateSystem,i=e.axis,n={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,h=a.getRect(),f=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=e.get("offset")||0,d=u==="x"?[f[2]-v,f[3]+v]:[f[0]-v,f[1]+v];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(g,d[1]),d[0])}n.position=[u==="y"?d[c[l]]:f[0],u==="x"?d[c[l]]:f[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=p[s],n.labelOffset=o?d[c[s]]-d[c.onZero]:0,e.get("axisTick.inside")&&(n.tickDirection=-n.tickDirection),Ut(r.labelInside,e.get("axisLabel.inside"))&&(n.labelDirection=-n.labelDirection);var m=e.get("axisLabel.rotate");return n.labelRotate=l==="top"?-m:m,n.z2=1,n}function X1(t,e,r,a){var i=r.axis;if(!i.scale.isBlank()){var n=r.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=a.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:n,clamp:!0});if(!!u.length){var h=s.length,f=t.__splitAreaColors,c=ht(),v=0;if(f)for(var d=0;d<u.length;d++){var g=f.get(u[d].tickValue);if(g!=null){v=(g+(h-1)*d)%h;break}}var p=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=z(s)?s:[s];for(var d=1;d<u.length;d++){var y=i.toGlobalCoord(u[d].coord),_,w,b,A;i.isHorizontal()?(_=p,w=l.y,b=y-_,A=l.height,p=_+b):(_=l.x,w=p,b=l.width,A=y-w,p=w+A);var S=u[d-1].tickValue;S!=null&&c.set(S,v),e.add(new xt({anid:S!=null?"area_"+S:null,shape:{x:_,y:w,width:b,height:A},style:J({fill:s[v]},m),silent:!0})),v=(v+1)%h}t.__splitAreaColors=c}}}function q1(t){t.__splitAreaColors=null}var oP=["axisLine","axisTickLabel","axisName"],sP=["splitArea","splitLine","minorSplitLine"],xd=Xe.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,r,a){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),!!t.get("show")){var n=t.getCoordSysModel(),o=_d(n,t),s=new ze(t,o);M(oP,s.add,s),this._axisGroup.add(s.getGroup()),M(sP,function(l){t.get(l+".show")&&this["_"+l](t,n)},this),au(i,this._axisGroup,t),xd.superCall(this,"render",t,e,r,a)}},remove:function(){q1(this)},_splitLine:function(t,e){var r=t.axis;if(!r.scale.isBlank()){var a=t.getModel("splitLine"),i=a.getModel("lineStyle"),n=i.get("color");n=z(n)?n:[n];for(var o=e.coordinateSystem.getRect(),s=r.isHorizontal(),l=0,u=r.getTicksCoords({tickModel:a}),h=[],f=[],c=i.getLineStyle(),v=0;v<u.length;v++){var d=r.toGlobalCoord(u[v].coord);s?(h[0]=d,h[1]=o.y,f[0]=d,f[1]=o.y+o.height):(h[0]=o.x,h[1]=d,f[0]=o.x+o.width,f[1]=d);var g=l++%n.length,p=u[v].tickValue;this._axisGroup.add(new ye({anid:p!=null?"line_"+u[v].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:J({stroke:n[g]},c),silent:!0}))}}},_minorSplitLine:function(t,e){var r=t.axis,a=t.getModel("minorSplitLine"),i=a.getModel("lineStyle"),n=e.coordinateSystem.getRect(),o=r.isHorizontal(),s=r.getMinorTicksCoords();if(!!s.length)for(var l=[],u=[],h=i.getLineStyle(),f=0;f<s.length;f++)for(var c=0;c<s[f].length;c++){var v=r.toGlobalCoord(s[f][c].coord);o?(l[0]=v,l[1]=n.y,u[0]=v,u[1]=n.y+n.height):(l[0]=n.x,l[1]=v,u[0]=n.x+n.width,u[1]=v),this._axisGroup.add(new ye({anid:"minor_line_"+s[f][c].tickValue,subPixelOptimize:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}))}},_splitArea:function(t,e){X1(this,this._axisGroup,t,e)}});xd.extend({type:"xAxis"}),xd.extend({type:"yAxis"}),he({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new xt({shape:t.coordinateSystem.getRect(),style:J({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),we(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Rt(Ii("line","circle","line")),Gt(ys("line")),$e(Wr.PROCESSOR.STATISTIC,WL("line"));var K1=Vt.extend({type:"series.__base_bar__",getInitialData:function(t,e){return ca(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var r=e.dataToPoint(e.clampData(t)),a=this.getData(),i=a.getLayout("offset"),n=a.getLayout("size"),o=e.getBaseAxis().isHorizontal()?0:1;return r[o]+=i+n/2,r}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});K1.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return this.get("large")?this.get("progressive"):!1},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},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}}});function j1(t,e,r,a,i,n,o){var s=r.getModel("label"),l=r.getModel("emphasis.label");Fe(t,e,s,l,{labelFetcher:i,labelDataIndex:n,defaultText:Bu(i.getData(),n),isRectText:!0,autoColor:a}),Q1(t),Q1(e)}function Q1(t,e){t.textPosition==="outside"&&(t.textPosition=e)}var lP=_n([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),uP={getBarItemStyle:function(t){var e=lP(this,t);if(this.getBorderLineDash){var r=this.getBorderLineDash();r&&(e.lineDash=r)}return e}},hP=nr({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r0||0,0),n=Math.max(e.r,0),o=(n-i)*.5,s=i+o,l=e.startAngle,u=e.endAngle,h=e.clockwise,f=Math.cos(l),c=Math.sin(l),v=Math.cos(u),d=Math.sin(u),g=h?u-l<Math.PI*2:l-u<Math.PI*2;g&&(t.moveTo(f*i+r,c*i+a),t.arc(f*s+r,c*s+a,o,-Math.PI+l,l,!h)),t.arc(r,a,n,l,u,!h),t.moveTo(v*n+r,d*n+a),t.arc(v*s+r,d*s+a,o,u-Math.PI*2,u-Math.PI,!h),i!==0&&(t.arc(r,a,i,u,l,h),t.moveTo(f*i+r,d*i+a)),t.closePath()}}),fP=["itemStyle","barBorderWidth"],Wu=[0,0];et(_t.prototype,uP);function cP(t,e){var r=t.getArea&&t.getArea();if(t.type==="cartesian2d"){var a=t.getBaseAxis();if(a.type!=="category"||!a.onBand){var i=e.getLayout("bandWidth");a.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}ke({type:"bar",render:function(t,e,r){this._updateDrawMode(t);var a=t.get("coordinateSystem");return a==="cartesian2d"||a==="polar"?this._isLargeDraw?this._renderLarge(t,e,r):this._renderNormal(t,e,r):T&&console.warn("Only cartesian2d and polar supported for bar."),this.group},incrementalPrepareRender:function(t,e,r){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,r,a){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(this._isLargeDraw==null||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,r){var a=this.group,i=t.getData(),n=this._data,o=t.coordinateSystem,s=o.getBaseAxis(),l;o.type==="cartesian2d"?l=s.isHorizontal():o.type==="polar"&&(l=s.dim==="angle");var u=t.isAnimationEnabled()?t:null,h=t.get("clip",!0),f=cP(o,i);a.removeClipPath();var c=t.get("roundCap",!0),v=t.get("showBackground",!0),d=t.getModel("backgroundStyle"),g=d.get("barBorderRadius")||0,p=[],m=this._backgroundEls||[];i.diff(n).add(function(w){var b=i.getItemModel(w),A=Uu[o.type](i,w,b);if(v){var S=Uu[o.type](i,w),D=mP(o,l,S);D.useStyle(d.getBarItemStyle()),o.type==="cartesian2d"&&D.setShape("r",g),p[w]=D}if(!!i.hasValue(w)){if(h){var I=ex[o.type](f,A);if(I){a.remove(L);return}}var L=rx[o.type](w,A,l,u,!1,c);i.setItemGraphicEl(w,L),a.add(L),nx(L,i,w,b,A,t,l,o.type==="polar")}}).update(function(w,b){var A=i.getItemModel(w),S=Uu[o.type](i,w,A);if(v){var D=m[b];D.useStyle(d.getBarItemStyle()),o.type==="cartesian2d"&&D.setShape("r",g),p[w]=D;var I=Uu[o.type](i,w),L=ux(l,I,o);ft(D,{shape:L},u,w)}var P=n.getItemGraphicEl(b);if(!i.hasValue(w)){a.remove(P);return}if(h){var R=ex[o.type](f,S);if(R){a.remove(P);return}}P?ft(P,{shape:S},u,w):P=rx[o.type](w,S,l,u,!0,c),i.setItemGraphicEl(w,P),a.add(P),nx(P,i,w,A,S,t,l,o.type==="polar")}).remove(function(w){var b=n.getItemGraphicEl(w);o.type==="cartesian2d"?b&&ax(w,u,b):b&&ix(w,u,b)}).execute();var y=this._backgroundGroup||(this._backgroundGroup=new q);y.removeAll();for(var _=0;_<p.length;++_)y.add(p[_]);a.add(y),this._backgroundEls=p,this._data=i},_renderLarge:function(t,e,r){this._clear(),sx(t,this.group);var a=t.get("clip",!0)?Gu(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),sx(e,this.group,!0)},dispose:ce,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,r=this._data;t&&t.get("animation")&&r&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],r.eachItemGraphicEl(function(a){a.type==="sector"?ix(a.dataIndex,t,a):ax(a.dataIndex,t,a)})):e.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var J1=Math.max,tx=Math.min,ex={cartesian2d:function(t,e){var r=e.width<0?-1:1,a=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var i=J1(e.x,t.x),n=tx(e.x+e.width,t.x+t.width),o=J1(e.y,t.y),s=tx(e.y+e.height,t.y+t.height);e.x=i,e.y=o,e.width=n-i,e.height=s-o;var l=e.width<0||e.height<0;return r<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t){return!1}},rx={cartesian2d:function(t,e,r,a,i){var n=new xt({shape:et({},e),z2:1});if(n.name="item",a){var o=n.shape,s=r?"height":"width",l={};o[s]=0,l[s]=e[s],sa[i?"updateProps":"initProps"](n,{shape:l},a,t)}return n},polar:function(t,e,r,a,i,n){var o=e.startAngle<e.endAngle,s=!r&&n?hP:Ar,l=new s({shape:J({clockwise:o},e),z2:1});if(l.name="item",a){var u=l.shape,h=r?"r":"endAngle",f={};u[h]=r?0:e.startAngle,f[h]=e[h],sa[i?"updateProps":"initProps"](l,{shape:f},a,t)}return l}};function ax(t,e,r){r.style.text=null,ft(r,{shape:{width:0}},e,t,function(){r.parent&&r.parent.remove(r)})}function ix(t,e,r){r.style.text=null,ft(r,{shape:{r:r.shape.r0}},e,t,function(){r.parent&&r.parent.remove(r)})}var Uu={cartesian2d:function(t,e,r){var a=t.getItemLayout(e),i=r?vP(r,a):0,n=a.width>0?1:-1,o=a.height>0?1:-1;return{x:a.x+n*i/2,y:a.y+o*i/2,width:a.width-n*i,height:a.height-o*i}},polar:function(t,e,r){var a=t.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle}}};function wd(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function nx(t,e,r,a,i,n,o,s){var l=e.getItemVisual(r,"color"),u=e.getItemVisual(r,"opacity"),h=e.getVisual("borderColor"),f=a.getModel("itemStyle"),c=a.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",f.get("barBorderRadius")||0),t.useStyle(J({stroke:wd(i)?"none":h,fill:wd(i)?"none":l,opacity:u},f.getBarItemStyle()));var v=a.getShallow("cursor");v&&t.attr("cursor",v);var d=o?i.height>0?"bottom":"top":i.width>0?"left":"right";s||j1(t.style,c,a,l,n,r,d),wd(i)&&(c.fill=c.stroke="none"),Ot(t,c)}function vP(t,e){var r=t.get(fP)||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,a,i)}var ox=pt.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var r=e.points,a=this.__startPoint,i=this.__baseDimIdx,n=0;n<r.length;n+=2)a[i]=r[n+i],t.moveTo(a[0],a[1]),t.lineTo(r[n],r[n+1])}});function sx(t,e,r){var a=t.getData(),i=[],n=a.getLayout("valueAxisHorizontal")?1:0;i[1-n]=a.getLayout("valueAxisStart");var o=a.getLayout("largeDataIndices"),s=a.getLayout("barWidth"),l=t.getModel("backgroundStyle"),u=t.get("showBackground",!0);if(u){var h=a.getLayout("largeBackgroundPoints"),f=[];f[1-n]=a.getLayout("backgroundStart");var c=new ox({shape:{points:h},incremental:!!r,__startPoint:f,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});pP(c,l,a),e.add(c)}var v=new ox({shape:{points:a.getLayout("largePoints")},incremental:!!r,__startPoint:i,__baseDimIdx:n,__largeDataIndices:o,__barWidth:s});e.add(v),gP(v,t,a),v.seriesIndex=t.seriesIndex,t.get("silent")||(v.on("mousedown",lx),v.on("mousemove",lx))}var lx=du(function(t){var e=this,r=dP(e,t.offsetX,t.offsetY);e.dataIndex=r>=0?r:null},30,!1);function dP(t,e,r){var a=t.__baseDimIdx,i=1-a,n=t.shape.points,o=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[i];Wu[0]=e,Wu[1]=r;for(var u=Wu[a],h=Wu[1-a],f=u-s,c=u+s,v=0,d=n.length/2;v<d;v++){var g=v*2,p=n[g+a],m=n[g+i];if(p>=f&&p<=c&&(l<=m?h>=l&&h<=m:h>=m&&h<=l))return o[v]}return-1}function gP(t,e,r){var a=r.getVisual("borderColor")||r.getVisual("color"),i=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(i),t.style.fill=null,t.style.stroke=a,t.style.lineWidth=r.getLayout("barWidth")}function pP(t,e,r){var a=e.get("borderColor")||e.get("color"),i=e.getItemStyle(["color","borderColor"]);t.useStyle(i),t.style.fill=null,t.style.stroke=a,t.style.lineWidth=r.getLayout("barWidth")}function ux(t,e,r){var a,i=r.type==="polar";return i?a=r.getArea():a=r.grid.getRect(),i?{cx:a.cx,cy:a.cy,r0:t?a.r0:e.r0,r:t?a.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:Math.PI*2}:{x:t?e.x:a.x,y:t?a.y:e.y,width:t?e.width:a.width,height:t?a.height:e.height}}function mP(t,e,r){var a=t.type==="polar"?Ar:xt;return new a({shape:ux(e,r,t),silent:!0,z2:0})}Gt(Wr.VISUAL.LAYOUT,ot(t1,"bar")),Gt(Wr.VISUAL.PROGRESSIVE_LAYOUT,F2),Rt({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var Un=function(t,e,r){e=z(e)&&{coordDimensions:e}||et({},e);var a=t.getSource(),i=En(a,e),n=new fe(i,t);return n.initData(a,r),n},bd={updateSelectedMap:function(t){this._targetList=z(t)?t.slice():[],this._selectTargetMap=an(t||[],function(e,r){return e.set(r.name,r),e},ht())},select:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t),a=this.get("selectedMode");a==="single"&&this._selectTargetMap.each(function(i){i.selected=!1}),r&&(r.selected=!0)},unSelect:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);r&&(r.selected=!1)},toggleSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);if(r!=null)return this[r.selected?"unSelect":"select"](t,e),r.selected},isSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);return r&&r.selected}};function ws(t,e){this.getAllNames=function(){var r=e();return r.mapArray(r.getName)},this.containName=function(r){var a=e();return a.indexOfName(r)>=0},this.indexOfName=function(r){var a=t();return a.indexOfName(r)},this.getItemVisual=function(r,a){var i=t();return i.getItemVisual(r,a)}}var $u=Mu({type:"series.pie",init:function(t){$u.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){$u.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Un(this,{coordDimensions:["value"],encodeDefaulter:ot(cv,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),r=[],a=0,i=t.count();a<i;a++)r.push({name:t.getName(a),value:t.get(e,a),selected:$y(t,a,"selected")});return r},getDataParams:function(t){var e=this.getData(),r=$u.superCall(this,"getDataParams",t),a=[];return e.each(e.mapDimension("value"),function(i){a.push(i)}),r.percent=py(a,t,e.hostModel.get("percentPrecision")),r.$vars.push("percent"),r},_defaultLabelLine:function(t){fi(t,"labelLine",["show"]);var e=t.labelLine,r=t.emphasis.labelLine;e.show=e.show&&t.label.show,r.show=r.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});Dt($u,bd);function yP(t,e,r,a){var i=e.getData(),n=this.dataIndex,o=i.getName(n),s=e.get("selectedOffset");a.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),i.each(function(l){hx(i.getItemGraphicEl(l),i.getItemLayout(l),e.isSelected(i.getName(l)),s,r)})}function hx(t,e,r,a,i){var n=(e.startAngle+e.endAngle)/2,o=Math.cos(n),s=Math.sin(n),l=r?a:0,u=[o*l,s*l];i?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Sd(t,e){q.call(this);var r=new Ar({z2:2}),a=new ir,i=new dt;this.add(r),this.add(a),this.add(i),this.updateData(t,e,!0)}var fx=Sd.prototype;fx.updateData=function(t,e,r){var a=this.childAt(0),i=this.childAt(1),n=this.childAt(2),o=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=et({},l);u.label=null;var h=o.getShallow("animationTypeUpdate");if(r){a.setShape(u);var f=o.getShallow("animationType");f==="scale"?(a.shape.r=l.r0,Se(a,{shape:{r:l.r}},o,e)):(a.shape.endAngle=l.startAngle,ft(a,{shape:{endAngle:l.endAngle}},o,e))}else h==="expansion"?a.setShape(u):ft(a,{shape:u},o,e);var c=t.getItemVisual(e,"color");a.useStyle(J({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),a.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var v=s.getShallow("cursor");v&&a.attr("cursor",v),hx(this,t.getItemLayout(e),o.isSelected(t.getName(e)),o.get("selectedOffset"),o.get("animation"));var d=!r&&h==="transition";this._updateLabel(t,e,d),this.highDownOnUpdate=o.get("silent")?null:function(g,p){var m=o.isAnimationEnabled()&&s.get("hoverAnimation");p==="emphasis"?(i.ignore=i.hoverIgnore,n.ignore=n.hoverIgnore,m&&(a.stopAnimation(!0),a.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(i.ignore=i.normalIgnore,n.ignore=n.normalIgnore,m&&(a.stopAnimation(!0),a.animateTo({shape:{r:l.r}},300,"elasticOut")))},Ot(this)},fx._updateLabel=function(t,e,r){var a=this.childAt(1),i=this.childAt(2),n=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,g=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y)){i.ignore=i.normalIgnore=i.hoverIgnore=a.ignore=a.normalIgnore=a.hoverIgnore=!0;return}var u={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},h={x:l.x,y:l.y};r?(ft(a,{shape:u},n,e),ft(i,{style:h},n,e)):(a.attr({shape:u}),i.attr({style:h})),i.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var f=o.getModel("label"),c=o.getModel("emphasis.label"),v=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine"),g=t.getItemVisual(e,"color");Fe(i.style,i.hoverStyle={},f,c,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:l.text,autoColor:g,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!c.get("show"),a.ignore=a.normalIgnore=!v.get("show"),a.hoverIgnore=!d.get("show"),a.setStyle({stroke:g,opacity:t.getItemVisual(e,"opacity")}),a.setStyle(v.getModel("lineStyle").getLineStyle()),a.hoverStyle=d.getModel("lineStyle").getLineStyle();var p=v.get("smooth");p&&p===!0&&(p=.4),a.setShape({smooth:p})},It(Sd,q);var W5=ue.extend({type:"pie",init:function(){var t=new q;this._sectorGroup=t},render:function(t,e,r,a){if(!(a&&a.from===this.uid)){var i=t.getData(),n=this._data,o=this.group,s=e.get("animation"),l=!n,u=t.get("animationType"),h=t.get("animationTypeUpdate"),f=ot(yP,this.uid,t,s,r),c=t.get("selectedMode");if(i.diff(n).add(function(m){var y=new Sd(i,m);l&&u!=="scale"&&y.eachChild(function(_){_.stopAnimation(!0)}),c&&y.on("click",f),i.setItemGraphicEl(m,y),o.add(y)}).update(function(m,y){var _=n.getItemGraphicEl(y);!l&&h!=="transition"&&_.eachChild(function(w){w.stopAnimation(!0)}),_.updateData(i,m),_.off("click"),c&&_.on("click",f),o.add(_),i.setItemGraphicEl(m,_)}).remove(function(m){var y=n.getItemGraphicEl(m);o.remove(y)}).execute(),s&&i.count()>0&&(l?u!=="scale":h!=="transition")){for(var v=i.getItemLayout(0),d=1;isNaN(v.startAngle)&&d<i.count();++d)v=i.getItemLayout(d);var g=Math.max(r.getWidth(),r.getHeight())/2,p=it(o.removeClipPath,o);o.setClipPath(this._createClipPath(v.cx,v.cy,g,v.startAngle,v.clockwise,p,t,l))}else o.removeClipPath();this._data=i}},dispose:function(){},_createClipPath:function(t,e,r,a,i,n,o,s){var l=new Ar({shape:{cx:t,cy:e,r0:0,r,startAngle:a,endAngle:a,clockwise:i}}),u=s?Se:ft;return u(l,{shape:{endAngle:a+(i?1:-1)*Math.PI*2}},o,n),l},containPoint:function(t,e){var r=e.getData(),a=r.getItemLayout(0);if(a){var i=t[0]-a.cx,n=t[1]-a.cy,o=Math.sqrt(i*i+n*n);return o<=a.r&&o>=a.r0}}}),cx=function(t,e){M(e,function(r){r.update="updateView",mt(r,function(a,i){var n={};return i.eachComponent({mainType:"series",subType:t,query:a},function(o){o[r.method]&&o[r.method](a.name,a.dataIndex);var s=o.getData();s.each(function(l){var u=s.getName(l);n[u]=o.isSelected(u)||!1})}),{name:a.name,selected:n,seriesId:a.seriesId}})})},Zu=function(t){return{getTargetSeries:function(e){var r={},a=ht();return e.eachSeriesByType(t,function(i){i.__paletteScope=r,a.set(i.uid,i)}),a},reset:function(e,r){var a=e.getRawData(),i={},n=e.getData();n.each(function(o){var s=n.getRawIndex(o);i[s]=o}),a.each(function(o){var s=i[o],l=s!=null&&n.getItemVisual(s,"color",!0),u=s!=null&&n.getItemVisual(s,"borderColor",!0),h;if((!l||!u)&&(h=a.getItemModel(o)),!l){var f=h.get("itemStyle.color")||e.getColorFromPalette(a.getName(o)||o+"",e.__paletteScope,a.count());s!=null&&n.setItemVisual(s,"color",f)}if(!u){var c=h.get("itemStyle.borderColor");s!=null&&n.setItemVisual(s,"borderColor",c)}})}}},_P=Math.PI/180;function vx(t,e,r,a,i,n,o,s,l,u){t.sort(function(w,b){return w.y-b.y});function h(w,b,A,S){for(var D=w;D<b&&!(t[D].y+A>l+o);D++)if(t[D].y+=A,D>w&&D+1<b&&t[D+1].y>t[D].y+t[D].height){f(D,A/2);return}f(b-1,A/2)}function f(w,b){for(var A=w;A>=0&&!(t[A].y-b<l||(t[A].y-=b,A>0&&t[A].y>t[A-1].y+t[A-1].height));A--);}function c(w,b,A,S,D,I){for(var L=(I>0,b?Number.MAX_VALUE:0),P=0,R=w.length;P<R;P++)if(w[P].labelAlignTo==="none"){var E=Math.abs(w[P].y-S),Z=w[P].len,W=w[P].len2,$=E<D+Z?Math.sqrt((D+Z+W)*(D+Z+W)-E*E):Math.abs(w[P].x-A);b&&$>=L&&($=L-10),!b&&$<=L&&($=L+10),w[P].x=A+$*I,L=$}}for(var v=0,d,g=t.length,p=[],m=[],y=0;y<g;y++){if(t[y].position==="outer"&&t[y].labelAlignTo==="labelLine"){var _=t[y].x-u;t[y].linePoints[1][0]+=_,t[y].x=u}d=t[y].y-v,d<0&&h(y,g,-d,i),v=t[y].y+t[y].height}o-v<0&&f(g-1,v-o);for(var y=0;y<g;y++)t[y].y>=r?m.push(t[y]):p.push(t[y]);c(p,!1,e,r,a,i),c(m,!0,e,r,a,i)}function xP(t,e,r,a,i,n,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,f=-Number.MAX_VALUE,c=0;c<t.length;c++)dx(t[c])||(t[c].x<e?(h=Math.min(h,t[c].x),l.push(t[c])):(f=Math.max(f,t[c].x),u.push(t[c])));vx(u,e,r,a,1,i,n,o,s,f),vx(l,e,r,a,-1,i,n,o,s,h);for(var c=0;c<t.length;c++){var v=t[c];if(!dx(v)){var d=v.linePoints;if(d){var g=v.labelAlignTo==="edge",p=v.textRect.width,m;g?v.x<e?m=d[2][0]-v.labelDistance-o-v.labelMargin:m=o+i-v.labelMargin-d[2][0]-v.labelDistance:v.x<e?m=v.x-o-v.bleedMargin:m=o+i-v.x-v.bleedMargin,m<v.textRect.width&&(v.text=ec(v.text,m,v.font),v.labelAlignTo==="edge"&&(p=er(v.text,v.font)));var y=d[1][0]-d[2][0];g?v.x<e?d[2][0]=o+v.labelMargin+p+v.labelDistance:d[2][0]=o+i-v.labelMargin-p-v.labelDistance:(v.x<e?d[2][0]=v.x+v.labelDistance:d[2][0]=v.x-v.labelDistance,d[1][0]=d[2][0]+y),d[1][1]=d[2][1]=v.y}}}}function dx(t){return t.position==="center"}var wP=function(t,e,r,a,i,n){var o=t.getData(),s=[],l,u,h=!1,f=(t.get("minShowLabelAngle")||0)*_P;o.each(function(c){var v=o.getItemLayout(c),d=o.getItemModel(c),g=d.getModel("label"),p=g.get("position")||d.get("emphasis.label.position"),m=g.get("distanceToLabelLine"),y=g.get("alignTo"),_=H(g.get("margin"),r),w=g.get("bleedMargin"),b=g.getFont(),A=d.getModel("labelLine"),S=A.get("length");S=H(S,r);var D=A.get("length2");if(D=H(D,r),!(v.angle<f)){var I=(v.startAngle+v.endAngle)/2,L=Math.cos(I),P=Math.sin(I),R,E,Z,W;l=v.cx,u=v.cy;var $=t.getFormattedLabel(c,"normal")||o.getName(c),X=Rr($,b,W,"top"),K=p==="inside"||p==="inner";if(p==="center")R=v.cx,E=v.cy,W="center";else{var Q=(K?(v.r+v.r0)/2*L:v.r*L)+l,j=(K?(v.r+v.r0)/2*P:v.r*P)+u;if(R=Q+L*3,E=j+P*3,!K){var U=Q+L*(S+e-v.r),tt=j+P*(S+e-v.r),ct=U+(L<0?-1:1)*D,bt=tt;y==="edge"?R=L<0?i+_:i+r-_:R=ct+(L<0?-m:m),E=bt,Z=[[Q,j],[U,tt],[ct,bt]]}W=K?"center":y==="edge"?L>0?"right":"left":L>0?"left":"right"}var Et,ie=g.get("rotate");typeof ie=="number"?Et=ie*(Math.PI/180):Et=ie?L<0?-I+Math.PI:-I:0,h=!!Et,v.label={x:R,y:E,position:p,height:X.height,len:S,len2:D,linePoints:Z,textAlign:W,verticalAlign:"middle",rotation:Et,inside:K,labelDistance:m,labelAlignTo:y,labelMargin:_,bleedMargin:w,textRect:X,text:$,font:b},K||s.push(v.label)}}),!h&&t.get("avoidLabelOverlap")&&xP(s,l,u,e,r,a,i,n)},Yu=Math.PI*2,gx=Math.PI/180;function bP(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}var SP=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.getData(),o=n.mapDimension("value"),s=bP(i,r),l=i.get("center"),u=i.get("radius");z(u)||(u=[0,u]),z(l)||(l=[l,l]);var h=H(s.width,r.getWidth()),f=H(s.height,r.getHeight()),c=Math.min(h,f),v=H(l[0],h)+s.x,d=H(l[1],f)+s.y,g=H(u[0],c/2),p=H(u[1],c/2),m=-i.get("startAngle")*gx,y=i.get("minAngle")*gx,_=0;n.each(o,function(W){!isNaN(W)&&_++});var w=n.getSum(o),b=Math.PI/(w||_)*2,A=i.get("clockwise"),S=i.get("roseType"),D=i.get("stillShowZeroSum"),I=n.getDataExtent(o);I[0]=0;var L=Yu,P=0,R=m,E=A?1:-1;if(n.each(o,function(W,$){var X;if(isNaN(W)){n.setItemLayout($,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:A,cx:v,cy:d,r0:g,r:S?NaN:p,viewRect:s});return}S!=="area"?X=w===0&&D?b:W*b:X=Yu/_,X<y?(X=y,L-=y):P+=W;var K=R+E*X;n.setItemLayout($,{angle:X,startAngle:R,endAngle:K,clockwise:A,cx:v,cy:d,r0:g,r:S?Nt(W,I,[g,p]):p,viewRect:s}),R=K}),L<Yu&&_)if(L<=.001){var Z=Yu/_;n.each(o,function(W,$){if(!isNaN(W)){var X=n.getItemLayout($);X.angle=Z,X.startAngle=m+E*$*Z,X.endAngle=m+E*($+1)*Z}})}else b=L/P,R=m,n.each(o,function(W,$){if(!isNaN(W)){var X=n.getItemLayout($),K=X.angle===y?y:W*b;X.startAngle=R,X.endAngle=R+E*K,R+=E*K}});wP(i,p,s.width,s.height,s.x,s.y)})},bs=function(t){return{seriesType:t,reset:function(e,r){var a=r.findComponents({mainType:"legend"});if(!(!a||!a.length)){var i=e.getData();i.filterSelf(function(n){for(var o=i.getName(n),s=0;s<a.length;s++)if(!a[s].isSelected(o))return!1;return!0})}}}};cx("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Rt(Zu("pie")),Gt(ot(SP,"pie")),$e(bs("pie")),Vt.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return ca(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var Ad=4,Td=nr({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var r=e.points,a=e.size,i=this.symbolProxy,n=i.shape,o=t.getContext?t.getContext():t,s=o&&a[0]<Ad;if(!s)for(var l=0;l<r.length;){var u=r[l++],h=r[l++];isNaN(u)||isNaN(h)||this.softClipShape&&!this.softClipShape.contain(u,h)||(n.x=u-a[0]/2,n.y=h-a[1]/2,n.width=a[0],n.height=a[1],i.buildPath(t,n,!0))}},afterBrush:function(t){var e=this.shape,r=e.points,a=e.size,i=a[0]<Ad;if(!!i){this.setTransform(t);for(var n=0;n<r.length;){var o=r[n++],s=r[n++];isNaN(o)||isNaN(s)||this.softClipShape&&!this.softClipShape.contain(o,s)||t.fillRect(o-a[0]/2,s-a[1]/2,a[0],a[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var r=this.shape,a=r.points,i=r.size,n=Math.max(i[0],4),o=Math.max(i[1],4),s=a.length/2-1;s>=0;s--){var l=s*2,u=a[l]-n/2,h=a[l+1]-o/2;if(t>=u&&e>=h&&t<=u+n&&e<=h+o)return s}return-1}});function px(){this.group=new q}var Ya=px.prototype;Ya.isPersistent=function(){return!this._incremental},Ya.updateData=function(t,e){this.group.removeAll();var r=new Td({rectHover:!0,cursor:"default"});r.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(r,t,!1,e),this.group.add(r),this._incremental=null},Ya.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(r){if(r.startIndex!=null){var a=(r.endIndex-r.startIndex)*2,i=r.startIndex*4*2;e=new Float32Array(e.buffer,i,a)}r.setShape("points",e)})}},Ya.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new He({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Ya.incrementalUpdate=function(t,e,r){var a;this._incremental?(a=new Td,this._incremental.addDisplayable(a,!0)):(a=new Td({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),a.incremental=!0,this.group.add(a)),a.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(a,e,!!this._incremental,r)},Ya._setCommon=function(t,e,r,a){var i=e.hostModel;a=a||{};var n=e.getVisual("symbolSize");t.setShape("size",n instanceof Array?n:[n,n]),t.softClipShape=a.clipShape||null,t.symbolProxy=Ye(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<Ad;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("color");s&&t.setColor(s),r||(t.seriesIndex=i.seriesIndex,t.on("mousemove",function(l){t.dataIndex=null;var u=t.findDataIndex(l.offsetX,l.offsetY);u>=0&&(t.dataIndex=u+(t.startIndex||0))}))},Ya.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Ya._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},ke({type:"scatter",render:function(t,e,r){var a=t.getData(),i=this._updateSymbolDraw(a,t);i.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,r){var a=t.getData(),i=this._updateSymbolDraw(a,t);i.incrementalPrepareUpdate(a),this._finished=!1},incrementalRender:function(t,e,r){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,r){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=ys().reset(t);i.progress&&i.progress({start:0,end:a.count()},a),this._symbolDraw.updateLayout(a)},_getClipShape:function(t){var e=t.coordinateSystem,r=e&&e.getArea&&e.getArea();return t.get("clip",!0)?r:null},_updateSymbolDraw:function(t,e){var r=this._symbolDraw,a=e.pipelineContext,i=a.large;return(!r||i!==this._isLargeDraw)&&(r&&r.remove(),r=this._symbolDraw=i?new px:new Bn,this._isLargeDraw=i,this.group.removeAll()),this.group.add(r.group),r},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Rt(Ii("scatter","circle")),Gt(ys("scatter"));function mx(t,e,r){Qt.call(this,t,e,r),this.type="value",this.angle=0,this.name="",this.model}It(mx,Qt);function Zr(t,e,r){this._model=t,this.dimensions=[],this._indicatorAxes=V(t.getIndicatorModels(),function(a,i){var n="indicator_"+i,o=new mx(n,a.get("axisType")==="log"?new ku:new Ur);return o.name=a.get("name"),o.model=a,a.axis=o,this.dimensions.push(n),o},this),this.resize(t,r),this.cx,this.cy,this.r,this.r0,this.startAngle}Zr.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Zr.prototype.dataToPoint=function(t,e){var r=this._indicatorAxes[e];return this.coordToPoint(r.dataToCoord(t),e)},Zr.prototype.coordToPoint=function(t,e){var r=this._indicatorAxes[e],a=r.angle,i=this.cx+t*Math.cos(a),n=this.cy-t*Math.sin(a);return[i,n]},Zr.prototype.pointToData=function(t){var e=t[0]-this.cx,r=t[1]-this.cy,a=Math.sqrt(e*e+r*r);e/=a,r/=a;for(var i=Math.atan2(-r,e),n=1/0,o,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(i-u.angle);h<n&&(o=u,s=l,n=h)}return[s,+(o&&o.coordToData(a))]},Zr.prototype.resize=function(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i)/2;this.cx=H(r[0],a),this.cy=H(r[1],i),this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(typeof o=="string"||typeof o=="number")&&(o=[0,o]),this.r0=H(o[0],n),this.r=H(o[1],n),M(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},Zr.prototype.update=function(t,e){var r=this._indicatorAxes,a=this._model;M(r,function(o){o.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(o,s){if(!(o.get("coordinateSystem")!=="radar"||t.getComponent("radar",o.get("radarIndex"))!==a)){var l=o.getData();M(r,function(u){u.scale.unionExtentFromData(l,l.mapDimension(u.dim))})}},this);var i=a.get("splitNumber");function n(o){var s=Math.pow(10,Math.floor(Math.log(o)/Math.LN10)),l=o/s;return l===2?l=5:l*=2,l*s}M(r,function(o,s){var l=o1(o.scale,o.model).extent;Fa(o.scale,o.model);var u=o.model,h=o.scale,f=u.getMin(),c=u.getMax(),v=h.getInterval();if(f!=null&&c!=null)h.setExtent(+f,+c),h.setInterval((c-f)/i);else if(f!=null){var d;do d=f+v*i,h.setExtent(+f,d),h.setInterval(v),v=n(v);while(d<l[1]&&isFinite(d)&&isFinite(l[1]))}else if(c!=null){var g;do g=c-v*i,h.setExtent(g,+c),h.setInterval(v),v=n(v);while(g>l[0]&&isFinite(g)&&isFinite(l[0]))}else{var p=h.getTicks().length-1;p>i&&(v=n(v));var d=Math.ceil(l[1]/v)*v,g=re(d-v*i);h.setExtent(g,d),h.setInterval(v)}})},Zr.dimensions=[],Zr.create=function(t,e){var r=[];return t.eachComponent("radar",function(a){var i=new Zr(a,t,e);r.push(i),a.coordinateSystem=i}),t.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=r[a.get("radarIndex")||0])}),r},_e.register("radar",Zr);var Ss=$a.valueAxis;function Xu(t,e){return J({show:e},t)}var U5=Ze({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),r=this.get("scale"),a=this.get("axisLine"),i=this.get("axisTick"),n=this.get("axisType"),o=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),h=this.get("nameGap"),f=this.get("triggerEvent"),c=V(this.get("indicator")||[],function(v){v.max!=null&&v.max>0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var d=s;if(v.color!=null&&(d=J({color:v.color},s)),v=ut(rt(v),{boundaryGap:t,splitNumber:e,scale:r,axisLine:a,axisTick:i,axisType:n,axisLabel:o,name:v.text,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:f},!1),l||(v.name=""),typeof u=="string"){var g=v.name;v.name=u.replace("{value}",g??"")}else typeof u=="function"&&(v.name=u(v.name,v));var p=et(new _t(v,null,this.ecModel),Di);return p.mainType="radar",p.componentIndex=this.componentIndex,p},this);this.getIndicatorModels=function(){return c}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:ut({lineStyle:{color:"#bbb"}},Ss.axisLine),axisLabel:Xu(Ss.axisLabel,!1),axisTick:Xu(Ss.axisTick,!1),axisType:"interval",splitLine:Xu(Ss.splitLine,!0),splitArea:Xu(Ss.splitArea,!0),indicator:[]}}),AP=["axisLine","axisTickLabel","axisName"];he({type:"radar",render:function(t,e,r){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,r=e.getIndicatorAxes(),a=V(r,function(i){var n=new ze(i.model,{position:[e.cx,e.cy],rotation:i.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return n});M(a,function(i){M(AP,i.add,i),this.group.add(i.getGroup())},this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,r=e.getIndicatorAxes();if(!r.length)return;var a=t.get("shape"),i=t.getModel("splitLine"),n=t.getModel("splitArea"),o=i.getModel("lineStyle"),s=n.getModel("areaStyle"),l=i.get("show"),u=n.get("show"),h=o.get("color"),f=s.get("color");h=z(h)?h:[h],f=z(f)?f:[f];var c=[],v=[];function d(P,R,E){var Z=E%R.length;return P[Z]=P[Z]||[],Z}if(a==="circle")for(var g=r[0].getTicksCoords(),p=e.cx,m=e.cy,y=0;y<g.length;y++){if(l){var _=d(c,h,y);c[_].push(new Br({shape:{cx:p,cy:m,r:g[y].coord}}))}if(u&&y<g.length-1){var _=d(v,f,y);v[_].push(new Yl({shape:{cx:p,cy:m,r0:g[y].coord,r:g[y+1].coord}}))}}else for(var w,b=V(r,function(P,R){var E=P.getTicksCoords();return w=w==null?E.length-1:Math.min(E.length-1,w),V(E,function(Z){return e.coordToPoint(Z.coord,R)})}),A=[],y=0;y<=w;y++){for(var S=[],D=0;D<r.length;D++)S.push(b[D][y]);if(S[0]?S.push(S[0].slice()):T&&console.error("Can't draw value axis "+y),l){var _=d(c,h,y);c[_].push(new ir({shape:{points:S}}))}if(u&&A){var _=d(v,f,y-1);v[_].push(new Ge({shape:{points:S.concat(A)}}))}A=S.slice().reverse()}var I=o.getLineStyle(),L=s.getAreaStyle();M(v,function(P,R){this.group.add(or(P,{style:J({stroke:"none",fill:f[R%f.length]},L),silent:!0}))},this),M(c,function(P,R){this.group.add(or(P,{style:J({fill:"none",stroke:h[R%h.length]},I),silent:!0}))},this)}});var TP=Vt.extend({type:"series.radar",dependencies:["radar"],init:function(t){TP.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this))},getInitialData:function(t,e){return Un(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(t){var e=this.getData(),r=this.coordinateSystem,a=r.getIndicatorAxes(),i=this.getData().getName(t);return kt(i===""?this.name:i)+"<br/>"+V(a,function(n,o){var s=e.get(e.mapDimension(n.dim),t);return kt(n.name+" : "+s)}).join("<br />")},getTooltipPosition:function(t){if(t!=null){for(var e=this.getData(),r=this.coordinateSystem,a=e.getValues(V(r.dimensions,function(s){return e.mapDimension(s)}),t,!0),i=0,n=a.length;i<n;i++)if(!isNaN(a[i])){var o=r.getIndicatorAxes();return r.coordToPoint(o[i].dataToCoord(a[i]),i)}}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});function CP(t){return z(t)||(t=[+t,+t]),t}ke({type:"radar",render:function(t,e,r){var a=t.coordinateSystem,i=this.group,n=t.getData(),o=this._data;function s(h,f){var c=h.getItemVisual(f,"symbol")||"circle",v=h.getItemVisual(f,"color");if(c!=="none"){var d=CP(h.getItemVisual(f,"symbolSize")),g=Ye(c,-1,-1,2,2,v);return g.attr({style:{strokeNoScale:!0},z2:100,scale:[d[0]/2,d[1]/2]}),g}}function l(h,f,c,v,d,g){c.removeAll();for(var p=0;p<f.length-1;p++){var m=s(v,d);m&&(m.__dimIdx=p,h[p]?(m.attr("position",h[p]),sa[g?"initProps":"updateProps"](m,{position:f[p]},t,d)):m.attr("position",f[p]),c.add(m))}}function u(h){return V(h,function(f){return[a.cx,a.cy]})}n.diff(o).add(function(h){var f=n.getItemLayout(h);if(!!f){var c=new Ge,v=new ir,d={shape:{points:f}};c.shape.points=u(f),v.shape.points=u(f),Se(c,d,t,h),Se(v,d,t,h);var g=new q,p=new q;g.add(v),g.add(c),g.add(p),l(v.shape.points,f,p,n,h,!0),n.setItemGraphicEl(h,g)}}).update(function(h,f){var c=o.getItemGraphicEl(f),v=c.childAt(0),d=c.childAt(1),g=c.childAt(2),p={shape:{points:n.getItemLayout(h)}};!p.shape.points||(l(v.shape.points,p.shape.points,g,n,h,!1),ft(v,p,t),ft(d,p,t),n.setItemGraphicEl(h,c))}).remove(function(h){i.remove(o.getItemGraphicEl(h))}).execute(),n.eachItemGraphicEl(function(h,f){var c=n.getItemModel(f),v=h.childAt(0),d=h.childAt(1),g=h.childAt(2),p=n.getItemVisual(f,"color");i.add(h),v.useStyle(J(c.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:p})),v.hoverStyle=c.getModel("emphasis.lineStyle").getLineStyle();var m=c.getModel("areaStyle"),y=c.getModel("emphasis.areaStyle"),_=m.isEmpty()&&m.parentModel.isEmpty(),w=y.isEmpty()&&y.parentModel.isEmpty();w=w&&_,d.ignore=_,d.useStyle(J(m.getAreaStyle(),{fill:p,opacity:.7})),d.hoverStyle=y.getAreaStyle();var b=c.getModel("itemStyle").getItemStyle(["color"]),A=c.getModel("emphasis.itemStyle").getItemStyle(),S=c.getModel("label"),D=c.getModel("emphasis.label");g.eachChild(function(I){I.setStyle(b),I.hoverStyle=rt(A);var L=n.get(n.dimensions[I.__dimIdx],f);(L==null||isNaN(L))&&(L=""),Fe(I.style,I.hoverStyle,S,D,{labelFetcher:n.hostModel,labelDataIndex:f,labelDimIndex:I.__dimIdx,defaultText:L,autoColor:p,isRectText:!0})}),h.highDownOnUpdate=function(I,L){d.attr("ignore",L==="emphasis"?w:_)},Ot(h)}),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var DP=function(t){t.eachSeriesByType("radar",function(e){var r=e.getData(),a=[],i=e.coordinateSystem;if(!!i){var n=i.getIndicatorAxes();M(n,function(o,s){r.each(r.mapDimension(n[s].dim),function(l,u){a[u]=a[u]||[];var h=i.dataToPoint(l,s);a[u][s]=yx(h)?h:_x(i)})}),r.each(function(o){var s=sm(a[o],function(l){return yx(l)})||_x(i);a[o].push(s.slice()),r.setItemLayout(o,a[o])})}})};function yx(t){return!isNaN(t[0])&&!isNaN(t[1])}function _x(t){return[t.cx,t.cy]}var MP=function(t){var e=t.polar;if(e){z(e)||(e=[e]);var r=[];M(e,function(a,i){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),t.radar=t.radar||[],z(t.radar)||(t.radar=[t.radar]),t.radar.push(a)):r.push(a)}),t.polar=r}M(t.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})};Rt(Zu("radar")),Rt(Ii("radar","circle")),Gt(DP),$e(bs("radar")),we(MP);for(var Cd=[126,25],Li=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Pi=0;Pi<Li.length;Pi++)for(var $n=0;$n<Li[Pi].length;$n++)Li[Pi][$n][0]/=10.5,Li[Pi][$n][1]/=-10.5/.75,Li[Pi][$n][0]+=Cd[0],Li[Pi][$n][1]+=Cd[1];var IP=function(t,e){t==="china"&&e.push(new ps("\u5357\u6D77\u8BF8\u5C9B",V(Li,function(r){return{type:"polygon",exterior:r}}),Cd))},LP={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]},PP=function(t,e){if(t==="china"){var r=LP[e.name];if(r){var a=e.center;a[0]+=r[0]/10.5,a[1]+=-r[1]/(10.5/.75)}}},EP={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},RP=function(t,e){if(t==="world"){var r=EP[e.name];if(r){var a=e.center;a[0]=r[0],a[1]=r[1]}}},OP=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],NP=function(t,e){t==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:OP[0]})},xx=Pe(),kP={load:function(t,e,r){var a=xx(e).parsed;if(a)return a;var i=e.specialAreas||{},n=e.geoJSON,o;try{o=n?nd(n,r):[]}catch(s){throw new Error(`Invalid geoJson format
`+s.message)}return IP(t,o),M(o,function(s){var l=s.name;PP(t,s),RP(t,s),NP(t,s);var u=i[l];u&&s.transformTo(u.left,u.top,u.width,u.height)}),xx(e).parsed={regions:o,boundingRect:zP(o)}}};function zP(t){for(var e,r=0;r<t.length;r++){var a=t[r].getBoundingRect();e=e||a.clone(),e.union(a)}return e}var Zn=Pe(),BP={load:function(t,e){var r=Zn(e).originRoot;if(r)return{root:r,boundingRect:Zn(e).boundingRect};var a=bx(e);return Zn(e).originRoot=a.root,Zn(e).boundingRect=a.boundingRect,a},makeGraphic:function(t,e,r){var a=Zn(e),i=a.rootMap||(a.rootMap=ht()),n=i.get(r);if(n)return n;var o=a.originRoot,s=a.boundingRect;return a.originRootHostKey?n=bx(e,s).root:(a.originRootHostKey=r,n=o),i.set(r,n)},removeGraphic:function(t,e,r){var a=Zn(e),i=a.rootMap;i&&i.removeKey(r),r===a.originRootHostKey&&(a.originRootHostKey=null)}};function bx(t,e){var r=t.svgXML,a,i;try{a=r&&WI(r,{ignoreViewBox:!0,ignoreRootClip:!0})||{},i=a.root,gt(i!=null)}catch(h){throw new Error(`Invalid svg format
`+h.message)}var n=a.width,o=a.height,s=a.viewBoxRect;if(e||(e=n==null||o==null?i.getBoundingRect():new vt(0,0,0,0),n!=null&&(e.width=n),o!=null&&(e.height=o)),s){var l=v_(s,e.width,e.height),u=i;i=new q,i.add(u),u.scale=l.scale,u.position=l.position}return i.setClipPath(new xt({shape:e.plain()})),{root:i,boundingRect:e}}var Sx={geoJSON:kP,svg:BP},As={load:function(t,e,r){var a=[],i=ht(),n=ht(),o,s=Tx(t);return M(s,function(l){var u=Sx[l.type].load(t,l,r);M(u.regions,function(f){var c=f.name;e&&e.hasOwnProperty(c)&&(f=f.cloneShallow(c=e[c])),a.push(f),i.set(c,f),n.set(c,f.center)});var h=u.boundingRect;h&&(o?o.union(h):o=h.clone())}),{regions:a,regionsMap:i,nameCoordMap:n,boundingRect:o||new vt(0,0,0,0)}},makeGraphic:Ax("makeGraphic"),removeGraphic:Ax("removeGraphic")};function Ax(t){return function(e,r){var a=Tx(e),i=[];return M(a,function(n){var o=Sx[n.type][t];o&&i.push(o(e,n,r))}),i}}function VP(t){T&&console.error("Map "+t+" not exists. The GeoJSON of the map must be provided.")}function Tx(t){var e=wu.retrieveMap(t)||[];return T&&(e.length||VP(t)),e}var GP=Vt.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=Un(this,{coordDimensions:["value"],encodeDefaulter:ot(cv,this)}),r=e.mapDimension("value"),a=ht(),i=[],n=[],o=0,s=e.count();o<s;o++){var l=e.getName(o);a.set(l,!0),i.push({name:l,value:e.get(r,o),selected:$y(e,o,"selected")})}var u=As.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return M(u.regions,function(h){var f=h.name;a.get(f)||(i.push({name:f}),n.push(f))}),this.updateSelectedMap(i),e.appendValues([],n),e},getHostGeoModel:function(){var t=this.option.geoIndex;return t!=null?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),r=ka(this.getRawValue(t)),a=e.getName(t),i=this.seriesGroup,n=[],o=0;o<i.length;o++){var s=i[o].originalData.indexOfName(a),l=e.mapDimension("value");isNaN(i[o].originalData.get(l,s))||n.push(kt(i[o].name))}return n.join(", ")+"<br />"+kt(a+" : "+r)},getTooltipPosition:function(t){if(t!=null){var e=this.getData().getName(t),r=this.coordinateSystem,a=r.getRegion(e);return a&&r.dataToPoint(a.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,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)"}},nameProperty:"name"}});Dt(GP,bd);var Cx="\0_ec_interaction_mutex";function HP(t,e,r){var a=Dd(t);a[e]=r}function FP(t,e,r){var a=Dd(t),i=a[e];i===r&&(a[e]=null)}function Dx(t,e){return!!Dd(t)[e]}function Dd(t){return t[Cx]||(t[Cx]={})}mt({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});function Yn(t){this.pointerChecker,this._zr=t,this._opt={};var e=it,r=e(WP,this),a=e(UP,this),i=e($P,this),n=e(ZP,this),o=e(YP,this);le.call(this),this.setPointerChecker=function(s){this.pointerChecker=s},this.enable=function(s,l){this.disable(),this._opt=J(rt(l)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),s==null&&(s=!0),(s===!0||s==="move"||s==="pan")&&(t.on("mousedown",r),t.on("mousemove",a),t.on("mouseup",i)),(s===!0||s==="scale"||s==="zoom")&&(t.on("mousewheel",n),t.on("pinch",o))},this.disable=function(){t.off("mousedown",r),t.off("mousemove",a),t.off("mouseup",i),t.off("mousewheel",n),t.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}Dt(Yn,le);function WP(t){if(!(_m(t)||t.target&&t.target.draggable)){var e=t.offsetX,r=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,r)&&(this._x=e,this._y=r,this._dragging=!0)}}function UP(t){if(!(!this._dragging||!qu("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||Dx(this._zr,"globalPan"))){var e=t.offsetX,r=t.offsetY,a=this._x,i=this._y,n=e-a,o=r-i;this._x=e,this._y=r,this._opt.preventDefaultMouseMove&&oi(t.event),Mx(this,"pan","moveOnMouseMove",t,{dx:n,dy:o,oldX:a,oldY:i,newX:e,newY:r})}}function $P(t){_m(t)||(this._dragging=!1)}function ZP(t){var e=qu("zoomOnMouseWheel",t,this._opt),r=qu("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,i=Math.abs(a),n=t.offsetX,o=t.offsetY;if(!(a===0||!e&&!r)){if(e){var s=i>3?1.4:i>1?1.2:1.1,l=a>0?s:1/s;Md(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:n,originY:o})}if(r){var u=Math.abs(a),h=(a>0?1:-1)*(u>3?.4:u>1?.15:.05);Md(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:n,originY:o})}}}function YP(t){if(!Dx(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Md(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function Md(t,e,r,a,i){t.pointerChecker&&t.pointerChecker(a,i.originX,i.originY)&&(oi(a.event),Mx(t,e,r,a,i))}function Mx(t,e,r,a,i){i.isAvailableBehavior=it(qu,null,r,a),t.trigger(e,i)}function qu(t,e,r){var a=r[t];return!t||a&&(!Lt(a)||e.event[a+"Key"])}function Id(t,e,r){var a=t.target,i=a.position;i[0]+=e,i[1]+=r,a.dirty()}function Ld(t,e,r,a){var i=t.target,n=t.zoomLimit,o=i.position,s=i.scale,l=t.zoom=t.zoom||1;if(l*=e,n){var u=n.min||0,h=n.max||1/0;l=Math.max(Math.min(h,l),u)}var f=l/t.zoom;t.zoom=l,o[0]-=(r-o[0])*(f-1),o[1]-=(a-o[1])*(f-1),s[0]*=f,s[1]*=f,i.dirty()}var XP={axisPointer:1,tooltip:1,brush:1};function Ku(t,e,r){var a=e.getComponentByElement(t.topTarget),i=a&&a.coordinateSystem;return a&&a!==r&&!XP[a.mainType]&&i&&i.model!==r}function Ix(t){var e=t.getItemStyle(),r=t.get("areaColor");return r!=null&&(e.fill=r),e}function qP(t,e,r,a,i){r.off("click"),r.off("mousedown"),e.get("selectedMode")&&(r.on("mousedown",function(){t._mouseDownFlag=!0}),r.on("click",function(n){if(!!t._mouseDownFlag){t._mouseDownFlag=!1;for(var o=n.target;!o.__regions;)o=o.parent;if(!!o){var s={type:(e.mainType==="geo"?"geo":"map")+"ToggleSelect",batch:V(o.__regions,function(l){return{name:l.name,from:i.uid}})};s[e.mainType+"Id"]=e.id,a.dispatchAction(s),Lx(e,r)}}}))}function Lx(t,e){e.eachChild(function(r){M(r.__regions,function(a){r.trigger(t.isSelected(a.name)?"emphasis":"normal")})})}function ju(t,e){var r=new q;this.uid=Wo("ec_map_draw"),this._controller=new Yn(t.getZr()),this._controllerHost={target:e?r:null},this.group=r,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,r.add(this._regionsGroup=new q),r.add(this._backgroundGroup=new q)}ju.prototype={constructor:ju,draw:function(t,e,r,a,i){var n=t.mainType==="geo",o=t.getData&&t.getData();n&&e.eachComponent({mainType:"series",subType:"map"},function(A){!o&&A.getHostGeoModel()===t&&(o=A.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group,h=s.getTransformInfo(),f=!l.childAt(0)||i,c;if(f)u.transform=h.roamTransform,u.decomposeTransform(),u.dirty();else{var v=new _r;v.transform=h.roamTransform,v.decomposeTransform();var d={scale:v.scale,position:v.position};c=v.scale,ft(u,d,t)}var g=h.rawScale,p=h.rawPosition;l.removeAll();var m=["itemStyle"],y=["emphasis","itemStyle"],_=["label"],w=["emphasis","label"],b=ht();M(s.regions,function(A){var S=b.get(A.name)||b.set(A.name,new q),D=new Z0({segmentIgnoreThreshold:1,shape:{paths:[]}});S.add(D);var I=t.getRegionModel(A.name)||t,L=I.getModel(m),P=I.getModel(y),R=Ix(L),E=Ix(P),Z=I.getModel(_),W=I.getModel(w),$;if(o){$=o.indexOfName(A.name);var X=o.getItemVisual($,"color",!0);X&&(R.fill=X)}var K=function(dr){return[dr[0]*g[0]+p[0],dr[1]*g[1]+p[1]]};M(A.geometries,function(dr){if(dr.type==="polygon"){for(var sl=[],Ji=0;Ji<dr.exterior.length;++Ji)sl.push(K(dr.exterior[Ji]));D.shape.paths.push(new Ge({segmentIgnoreThreshold:1,shape:{points:sl}}));for(var Ji=0;Ji<(dr.interiors?dr.interiors.length:0);++Ji){for(var OT=dr.interiors[Ji],sl=[],em=0;em<OT.length;++em)sl.push(K(OT[em]));D.shape.paths.push(new Ge({segmentIgnoreThreshold:1,shape:{points:sl}}))}}}),D.setStyle(R),D.style.strokeNoScale=!0,D.culling=!0;var Q=Z.get("show"),j=W.get("show"),U=o&&isNaN(o.get(o.mapDimension("value"),$)),tt=o&&o.getItemLayout($);if(n||U&&(Q||j)||tt&&tt.showLabel){var ct=n?A.name:$,bt;(!o||$>=0)&&(bt=t);var Et=new dt({position:K(A.center.slice()),scale:[1/u.scale[0],1/u.scale[1]],z2:10,silent:!0});if(Fe(Et.style,Et.hoverStyle={},Z,W,{labelFetcher:bt,labelDataIndex:ct,defaultText:A.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!f){var ie=[1/c[0],1/c[1]];ft(Et,{scale:ie},t)}S.add(Et)}if(o)o.setItemGraphicEl($,S);else{var I=t.getRegionModel(A.name);D.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:A.name,region:I&&I.option||{}}}var ol=S.__regions||(S.__regions=[]);ol.push(A),S.highDownSilentOnTouch=!!t.get("selectedMode"),Ot(S,E),l.add(S)}),this._updateController(t,e,r),qP(this,t,l,r,a),Lx(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&As.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&M(As.makeGraphic(e,this.uid),function(r){this._backgroundGroup.add(r)},this),this._mapName=e},_updateController:function(t,e,r){var a=t.coordinateSystem,i=this._controller,n=this._controllerHost;n.zoomLimit=t.get("scaleLimit"),n.zoom=a.getZoom(),i.enable(t.get("roam")||!1);var o=t.mainType;function s(){var l={type:"geoRoam",componentType:o};return l[o+"Id"]=t.id,l}i.off("pan").on("pan",function(l){this._mouseDownFlag=!1,Id(n,l.dx,l.dy),r.dispatchAction(et(s(),{dx:l.dx,dy:l.dy}))},this),i.off("zoom").on("zoom",function(l){if(this._mouseDownFlag=!1,Ld(n,l.scale,l.originX,l.originY),r.dispatchAction(et(s(),{zoom:l.scale,originX:l.originX,originY:l.originY})),this._updateGroup){var u=this.group.scale;this._regionsGroup.traverse(function(h){h.type==="text"&&h.attr("scale",[1/u[0],1/u[1]])})}},this),i.setPointerChecker(function(l,u,h){return a.getViewRectAfterRoam().contain(u,h)&&!Ku(l,r,t)})}};var Pd="__seriesMapHighDown",Px="__seriesMapCallKey";ke({type:"map",render:function(t,e,r,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var i=this.group;if(i.removeAll(),!t.getHostGeoModel()){if(a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===t.id){var n=this._mapDraw;n&&i.add(n.group)}else if(t.needsDrawMap){var n=this._mapDraw||new ju(r,!0);i.add(n.group),n.draw(t,e,r,this,a),this._mapDraw=n}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,r)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,r){var a=t.originalData,i=this.group;a.each(a.mapDimension("value"),function(n,o){if(!isNaN(n)){var s=a.getItemLayout(o);if(!(!s||!s.point)){var l=s.point,u=s.offset,h=new Br({style:{fill:t.getData().getVisual("color")},shape:{cx:l[0]+u*9,cy:l[1],r:3},silent:!0,z2:8+(u?0:ko+1)});if(!u){var f=t.mainSeries.getData(),c=a.getName(o),v=f.indexOfName(c),d=a.getItemModel(o),g=d.getModel("label"),p=d.getModel("emphasis.label"),m=f.getItemGraphicEl(v),y=Xt(t.getFormattedLabel(v,"normal"),c),_=Xt(t.getFormattedLabel(v,"emphasis"),y),w=m[Pd],b=Math.random();if(!w){w=m[Pd]={};var A=ot(Ex,!0),S=ot(Ex,!1);m.on("mouseover",A).on("mouseout",S).on("emphasis",A).on("normal",S)}m[Px]=b,et(w,{recordVersion:b,circle:h,labelModel:g,hoverLabelModel:p,emphasisText:_,normalText:y}),Rx(w,!1)}i.add(h)}}})}});function Ex(t){var e=this[Pd];e&&e.recordVersion===this[Px]&&Rx(e,t)}function Rx(t,e){var r=t.circle,a=t.labelModel,i=t.hoverLabelModel,n=t.emphasisText,o=t.normalText;e?(r.style.extendFrom($t({},i,{text:i.get("show")?n:null},{isRectText:!0,useInsideStyle:!1},!0)),r.__mapOriginalZ2=r.z2,r.z2+=ko):($t(r.style,a,{text:a.get("show")?o:null,textPosition:a.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),r.dirty(!1),r.__mapOriginalZ2!=null&&(r.z2=r.__mapOriginalZ2,r.__mapOriginalZ2=null))}function Ed(t,e,r){var a=t.getZoom(),i=t.getCenter(),n=e.zoom,o=t.dataToPoint(i);if(e.dx!=null&&e.dy!=null){o[0]-=e.dx,o[1]-=e.dy;var i=t.pointToData(o);t.setCenter(i)}if(n!=null){if(r){var s=r.min||0,l=r.max||1/0;n=Math.max(Math.min(a*n,l),s)/a}t.scale[0]*=n,t.scale[1]*=n;var u=t.position,h=(e.originX-u[0])*(n-1),f=(e.originY-u[1])*(n-1);u[0]-=h,u[1]-=f,t.updateTransform();var i=t.pointToData(o);t.setCenter(i),t.setZoom(n*a)}return{center:t.getCenter(),zoom:t.getZoom()}}mt({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var r=t.componentType||"series";e.eachComponent({mainType:r,query:t},function(a){var i=a.coordinateSystem;if(i.type==="geo"){var n=Ed(i,t,a.get("scaleLimit"));a.setCenter&&a.setCenter(n.center),a.setZoom&&a.setZoom(n.zoom),r==="series"&&M(a.seriesGroup,function(o){o.setCenter(n.center),o.setZoom(n.zoom)})}})});var Ox=Pt;function Rd(){_r.call(this)}Dt(Rd,_r);function Xa(t){this.name=t,this.zoomLimit,_r.call(this),this._roamTransformable=new Rd,this._rawTransformable=new Rd,this._center,this._zoom}Xa.prototype={constructor:Xa,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,r,a){return this._rect=new vt(t,e,r,a),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,r,a){this.transformTo(t,e,r,a),this._viewRect=new vt(t,e,r,a)},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=this._rawTransformable;n.transform=i.calculateTransform(new vt(t,e,r,a)),n.decomposeTransform(),this._updateTransform()},setCenter:function(t){!t||(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(e.max!=null&&(t=Math.min(e.max,t)),e.min!=null&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,r=t.y+t.height/2;return[e,r]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,r=this.getDefaultCenter(),a=this.getCenter(),i=this.getZoom();a=Pt([],a,t),r=Pt([],r,t),e.origin=a,e.position=[r[0]-a[0],r[1]-a[1]],e.scale=[i,i],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),xo(this.transform||(this.transform=[]),e.transform||Ie()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],cl(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?on(t):Ie(),rawScale:on(e.scale),rawPosition:on(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,r){var a=e?this._rawTransform:this.transform;return r=r||[],a?Ox(r,t,a):ge(r,t)},pointToData:function(t){var e=this.invTransform;return e?Ox([],t,e):[t[0],t[1]]},convertToPixel:ot(Nx,"dataToPoint"),convertFromPixel:ot(Nx,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},Dt(Xa,_r);function Nx(t,e,r,a){var i=r.seriesModel,n=i?i.coordinateSystem:null;return n===this?n[t](a):null}function Xn(t,e,r,a){Xa.call(this,t),this.map=e;var i=As.load(e,r);this._nameCoordMap=i.nameCoordMap,this._regionsMap=i.regionsMap,this._invertLongitute=a??!0,this.regions=i.regions,this._rect=i.boundingRect}Xn.prototype={constructor:Xn,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,r=0;r<e.length;r++)if(e[r].contain(t))return!0;return!1},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=this._invertLongitute;i=i.clone(),n&&(i.y=-i.y-i.height);var o=this._rawTransformable;if(o.transform=i.calculateTransform(new vt(t,e,r,a)),o.decomposeTransform(),n){var s=o.scale;s[1]=-s[1]}o.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,r=0;r<e.length;r++)if(e[r].contain(t))return e[r]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,r){if(typeof t=="string"&&(t=this.getGeoCoord(t)),t)return Xa.prototype.dataToPoint.call(this,t,e,r)},convertToPixel:ot(kx,"dataToPoint"),convertFromPixel:ot(kx,"pointToData")},Dt(Xn,Xa);function kx(t,e,r,a){var i=r.geoModel,n=r.seriesModel,o=i?i.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[t](a):null}function zx(t,e){var r=t.get("boundingCoords");if(r!=null){var a=r[0],i=r[1];isNaN(a[0])||isNaN(a[1])||isNaN(i[0])||isNaN(i[1])?T&&console.error("Invalid boundingCoords"):this.setBoundingRect(a[0],a[1],i[0]-a[0],i[1]-a[1])}var n=this.getBoundingRect(),o,s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),f=n.width/n.height*this.aspectScale,c=!1;s&&l&&(s=[H(s[0],u),H(s[1],h)],l=H(l,Math.min(u,h)),!isNaN(s[0])&&!isNaN(s[1])&&!isNaN(l)?c=!0:T&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var v;if(c){var v={};f>1?(v.width=l,v.height=l/f):(v.height=l,v.width=l*f),v.y=s[1]-v.height/2,v.x=s[0]-v.width/2}else o=t.getBoxLayoutParams(),o.aspect=f,v=qt(o,{width:u,height:h});this.setViewRect(v.x,v.y,v.width,v.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Bx(t,e){M(e.get("geoCoord"),function(r,a){t.addGeoCoord(a,r)})}var Vx={dimensions:Xn.prototype.dimensions,create:function(t,e){var r=[];t.eachComponent("geo",function(i,n){var o=i.get("map"),s=i.get("aspectScale"),l=!0,u=wu.retrieveMap(o);u&&u[0]&&u[0].type==="svg"?(s==null&&(s=1),l=!1):s==null&&(s=.75);var h=new Xn(o+n,o,i.get("nameMap"),l);h.aspectScale=s,h.zoomLimit=i.get("scaleLimit"),r.push(h),Bx(h,i),i.coordinateSystem=h,h.model=i,h.resize=zx,h.resize(i,e)}),t.eachSeries(function(i){var n=i.get("coordinateSystem");if(n==="geo"){var o=i.get("geoIndex")||0;i.coordinateSystem=r[o]}});var a={};return t.eachSeriesByType("map",function(i){if(!i.getHostGeoModel()){var n=i.getMapType();a[n]=a[n]||[],a[n].push(i)}}),M(a,function(i,n){var o=V(i,function(l){return l.get("nameMap")}),s=new Xn(n,n,go(o));s.zoomLimit=Ut.apply(null,V(i,function(l){return l.get("scaleLimit")})),r.push(s),s.resize=zx,s.aspectScale=i[0].get("aspectScale"),s.resize(i[0],e),M(i,function(l){l.coordinateSystem=s,Bx(s,l)})}),r},getFilledRegions:function(t,e,r){for(var a=(t||[]).slice(),i=ht(),n=0;n<a.length;n++)i.set(a[n].name,a[n]);var o=As.load(e,r);return M(o.regions,function(s){var l=s.name;!i.get(l)&&a.push({name:l})}),a}};Hv("geo",Vx);var KP=function(t){var e={};t.eachSeriesByType("map",function(r){var a=r.getMapType();if(!(r.getHostGeoModel()||e[a])){var i={};M(r.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&t.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,h){var f=l.getName(h),c=s.getRegion(f);if(!(!c||isNaN(u))){var v=i[f]||0,d=s.dataToPoint(c.center);i[f]=v+1,l.setItemLayout(h,{point:d,offset:v})}})});var n=r.getData();n.each(function(o){var s=n.getName(o),l=n.getItemLayout(o)||{};l.showLabel=!i[s],n.setItemLayout(o,l)}),e[a]=!0}})},jP=function(t){t.eachSeriesByType("map",function(e){var r=e.get("color"),a=e.getModel("itemStyle"),i=a.get("areaColor"),n=a.get("color")||r[e.seriesIndex%r.length];e.getData().setVisual({areaColor:i,color:n})})};function QP(t,e){var r={};return M(t,function(a){a.each(a.mapDimension("value"),function(i,n){var o="ec-"+a.getName(n);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(a,i){for(var n="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[n].length,h=0;h<u;h++)s=Math.min(s,r[n][h]),l=Math.max(l,r[n][h]),o+=r[n][h];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}var JP=function(t){var e={};t.eachSeriesByType("map",function(r){var a=r.getHostGeoModel(),i=a?"o"+a.id:"i"+r.getMapType();(e[i]=e[i]||[]).push(r)}),M(e,function(r,a){for(var i=QP(V(r,function(o){return o.getData()}),r[0].get("mapValueCalculation")),n=0;n<r.length;n++)r[n].originalData=r[n].getData();for(var n=0;n<r.length;n++)r[n].seriesGroup=r,r[n].needsDrawMap=n===0&&!r[n].getHostGeoModel(),r[n].setData(i.cloneShallow()),r[n].mainSeries=r[0]})},tE=function(t){var e=[];M(t.series,function(r){r&&r.type==="map"&&(e.push(r),r.map=r.map||r.mapType,J(r,r.mapLocation))})};Gt(KP),Rt(jP),$e(Wr.PROCESSOR.STATISTIC,JP),we(tE),cx("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var Ts=M,Cs="\0__link_datas",Qu="\0__link_mainData";function Gx(t){var e=t.mainData,r=t.datas;r||(r={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,Hx(e,r,t),Ts(r,function(a){Ts(e.TRANSFERABLE_METHODS,function(i){a.wrapMethod(i,ot(eE,t))})}),e.wrapMethod("cloneShallow",ot(aE,t)),Ts(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,ot(rE,t))}),gt(r[e.dataType]===e)}function eE(t,e){if(nE(this)){var r=et({},this[Cs]);r[this.dataType]=e,Hx(e,r,t)}else Od(e,this.dataType,this[Qu],t);return e}function rE(t,e){return t.struct&&t.struct.update(this),e}function aE(t,e){return Ts(e[Cs],function(r,a){r!==e&&Od(r.cloneShallow(),a,e,t)}),e}function iE(t){var e=this[Qu];return t==null||e==null?e:e[Cs][t]}function nE(t){return t[Qu]===t}function Hx(t,e,r){t[Cs]={},Ts(e,function(a,i){Od(a,i,t,r)})}function Od(t,e,r,a){r[Cs][e]=t,t[Qu]=r,t.dataType=e,a.struct&&(t[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=t),t.getLinkedData=iE}var Nd=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};Nd.prototype={constructor:Nd,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,r){typeof t=="function"&&(r=e,e=t,t=null),t=t||{},Lt(t)&&(t={order:t});var a=t.order||"preorder",i=this[t.attr||"children"],n;a==="preorder"&&(n=e.call(r,this));for(var o=0;!n&&o<i.length;o++)i[o].eachNode(t,e,r);a==="postorder"&&e.call(r,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var r=0;r<this.children.length;r++){var a=this.children[r];a.updateDepthAndHeight(t+1),a.height>e&&(e=a.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,r=this.children,a=r.length;e<a;e++){var i=r[e].getNodeById(t);if(i)return i}},contains:function(t){if(t===this)return!0;for(var e=0,r=this.children,a=r.length;e<a;e++){var i=r[e].contains(t);if(i)return i}},getAncestors:function(t){for(var e=[],r=t?this:this.parentNode;r;)e.push(r),r=r.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,r=e.data.getItemModel(this.dataIndex),a=this.getLevelModel();return a?r.getModel(t,a.getModel(t)):r.getModel(t)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}};function Ei(t,e){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=V(e||[],function(r){return new _t(r,t,t.ecModel)})}Ei.prototype={constructor:Ei,type:"tree",eachNode:function(t,e,r){this.root.eachNode(t,e,r)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,r=0,a=e.length;r<a;r++)e[r].dataIndex=-1;for(var r=0,a=t.count();r<a;r++)e[t.getRawIndex(r)].dataIndex=r},clearLayouts:function(){this.data.clearItemLayouts()}},Ei.createTree=function(t,e,r,a){var i=new Ei(e,r&&r.levels),n=[],o=1;s(t);function s(h,f){var c=h.value;o=Math.max(o,z(c)?c.length:1),n.push(h);var v=new Nd(h.name,i);f?oE(v,f):i.root=v,i._nodes.push(v);var d=h.children;if(d)for(var g=0;g<d.length;g++)s(d[g],v)}i.root.updateDepthAndHeight(0);var l=En(n,{coordDimensions:["value"],dimensionsCount:o}),u=new fe(l,e);return u.initData(n),a&&a(u),Gx({mainData:u,struct:i,structAttr:"tree"}),i.update(),i};function oE(t,e){var r=e.children;t.parentNode!==e&&(r.push(t),t.parentNode=e)}Vt.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},r=t.leaves||{},a=new _t(r,this,this.ecModel),i=Ei.createTree(e,this,{},n);function n(u){u.wrapMethod("getItemModel",function(h,f){var c=i.getNodeByDataIndex(f);return(!c.children.length||!c.isExpand)&&(h.parentModel=a),h})}var o=0;i.eachNode("preorder",function(u){u.depth>o&&(o=u.depth)});var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return i.root.eachNode("preorder",function(u){var h=u.hostTree.data.getRawDataItem(u.dataIndex);u.isExpand=h&&h.collapsed!=null?!h.collapsed:u.depth<=l}),i.data},getOrient:function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,r=e.root.children[0],a=e.getNodeByDataIndex(t),i=a.getValue(),n=a.name;a&&a!==r;)n=a.parentNode.name+"."+n,a=a.parentNode;return kt(n+(isNaN(i)||i==null?"":" : "+i))},defaultOption:{zlevel:0,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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});function sE(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],r,a;r=e.pop();)if(a=r.children,r.isExpand&&a.length)for(var i=a.length,n=i-1;n>=0;n--){var o=a[n];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:n,thread:null},e.push(o)}}function lE(t,e){var r=t.isExpand?t.children:[],a=t.parentNode.children,i=t.hierNode.i?a[t.hierNode.i-1]:null;if(r.length){fE(t);var n=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-n):t.hierNode.prelim=n}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=cE(t,i,t.parentNode.hierNode.defaultAncestor||a[0],e)}function uE(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Fx(t){return arguments.length?t:gE}function Ds(t,e){var r={};return t-=Math.PI/2,r.x=e*Math.cos(t),r.y=e*Math.sin(t),r}function hE(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function fE(t){for(var e=t.children,r=e.length,a=0,i=0;--r>=0;){var n=e[r];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function cE(t,e,r,a){if(e){for(var i=t,n=t,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,h=o.hierNode.modifier,f=s.hierNode.modifier;s=kd(s),n=zd(n),s&&n;){i=kd(i),o=zd(o),i.hierNode.ancestor=t;var c=s.hierNode.prelim+f-n.hierNode.prelim-u+a(s,n);c>0&&(dE(vE(s,t,r),t,c),u+=c,l+=c),f+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,h+=o.hierNode.modifier}s&&!kd(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),n&&!zd(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-h,r=t)}return r}function kd(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function zd(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function vE(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function dE(t,e,r){var a=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=a}function gE(t,e){return t.parentNode===e.parentNode?1:2}var pE=nr({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.childPoints,a=r.length,i=e.parentPoint,n=r[0],o=r[a-1];if(a===1){t.moveTo(i[0],i[1]),t.lineTo(n[0],n[1]);return}var s=e.orient,l=s==="TB"||s==="BT"?0:1,u=1-l,h=H(e.forkPosition,1),f=[];f[l]=i[l],f[u]=i[u]+(o[u]-i[u])*h,t.moveTo(i[0],i[1]),t.lineTo(f[0],f[1]),t.moveTo(n[0],n[1]),f[l]=n[l],t.lineTo(f[0],f[1]),f[l]=o[l],t.lineTo(f[0],f[1]),t.lineTo(o[0],o[1]);for(var c=1;c<a-1;c++){var v=r[c];t.moveTo(v[0],v[1]),f[l]=v[l],t.lineTo(f[0],f[1])}}});ke({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new q,this._controller=new Yn(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,r,a){var i=t.getData(),n=t.layoutInfo,o=this._mainGroup,s=t.get("layout");s==="radial"?o.attr("position",[n.x+n.width/2,n.y+n.height/2]):o.attr("position",[n.x,n.y]),this._updateViewCoordSys(t,n,s),this._updateController(t,e,r);var l=this._data,u={expandAndCollapse:t.get("expandAndCollapse"),layout:s,edgeShape:t.get("edgeShape"),edgeForkPosition:t.get("edgeForkPosition"),orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};i.diff(l).add(function(h){Wx(i,h)&&$x(i,h,null,o,t,u)}).update(function(h,f){var c=l.getItemGraphicEl(f);if(!Wx(i,h)){c&&Zx(l,f,c,o,t,u);return}$x(i,h,c,o,t,u)}).remove(function(h){var f=l.getItemGraphicEl(h);f&&Zx(l,h,f,o,t,u)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),u.expandAndCollapse===!0&&i.eachItemGraphicEl(function(h,f){h.off("click").on("click",function(){r.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},_updateViewCoordSys:function(t){var e=t.getData(),r=[];e.each(function(l){var u=e.getItemLayout(l);u&&!isNaN(u.x)&&!isNaN(u.y)&&r.push([+u.x,+u.y])});var a=[],i=[];Po(r,a,i);var n=this._min,o=this._max;i[0]-a[0]===0&&(a[0]=n?n[0]:a[0]-1,i[0]=o?o[0]:i[0]+1),i[1]-a[1]===0&&(a[1]=n?n[1]:a[1]-1,i[1]=o?o[1]:i[1]+1);var s=t.coordinateSystem=new Xa;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(a[0],a[1],i[0]-a[0],i[1]-a[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=a,this._max=i},_updateController:function(t,e,r){var a=this._controller,i=this._controllerHost,n=this.group;a.setPointerChecker(function(o,s,l){var u=n.getBoundingRect();return u.applyTransform(n.transform),u.contain(s,l)&&!Ku(o,r,t)}),a.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),a.off("pan").off("zoom").on("pan",function(o){Id(i,o.dx,o.dy),r.dispatchAction({seriesId:t.id,type:"treeRoam",dx:o.dx,dy:o.dy})},this).on("zoom",function(o){Ld(i,o.scale,o.originX,o.originY),r.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:o.scale,originX:o.originX,originY:o.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),r=this._getNodeGlobalScale(t),a=[r,r];e.eachItemGraphicEl(function(i,n){i.attr("scale",a)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if(e.type!=="view")return 1;var r=this._nodeScaleRatio,a=e.scale,i=a&&a[0]||1,n=e.getZoom(),o=(n-1)*r+1;return o/i},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function Wx(t,e){var r=t.getItemLayout(e);return r&&!isNaN(r.x)&&!isNaN(r.y)&&t.getItemVisual(e,"symbol")!=="none"}function Ux(t,e,r){return r.itemModel=e,r.itemStyle=e.getModel("itemStyle").getItemStyle(),r.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),r.lineStyle=e.getModel("lineStyle").getLineStyle(),r.labelModel=e.getModel("label"),r.hoverLabelModel=e.getModel("emphasis.label"),t.isExpand===!1&&t.children.length!==0?r.symbolInnerColor=r.itemStyle.fill:r.symbolInnerColor="#fff",r}function $x(t,e,r,a,i,u){var o=!r,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),u=Ux(s,l,u),h=t.tree.root,f=s.parentNode===h?s:s.parentNode||s,c=t.getItemGraphicEl(f.dataIndex),v=f.getLayout(),d=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:v,g=s.getLayout();o?(r=new Wa(t,e,u),r.attr("position",[d.x,d.y])):r.updateData(t,e,u),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=g.rawX,r.__radialRawY=g.rawY,a.add(r),t.setItemGraphicEl(e,r),ft(r,{position:[g.x,g.y]},i);var p=r.getSymbolPath();if(u.layout==="radial"){var m=h.children[0],y=m.getLayout(),_=m.children.length,w,b;if(g.x===y.x&&s.isExpand===!0){var A={};A.x=(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,A.y=(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2,w=Math.atan2(A.y-y.y,A.x-y.x),w<0&&(w=Math.PI*2+w),b=A.x<y.x,b&&(w=w-Math.PI)}else w=Math.atan2(g.y-y.y,g.x-y.x),w<0&&(w=Math.PI*2+w),s.children.length===0||s.children.length!==0&&s.isExpand===!1?(b=g.x<y.x,b&&(w=w-Math.PI)):(b=g.x>y.x,b||(w=w-Math.PI));var S=b?"left":"right",D=u.labelModel.get("rotate"),I=D*(Math.PI/180);p.setStyle({textPosition:u.labelModel.get("position")||S,textRotation:D==null?-w:I,textOrigin:"center",verticalAlign:"middle"})}mE(i,s,h,r,d,v,g,a,u)}function mE(t,e,r,a,i,n,o,s,l){var u=l.edgeShape,h=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(h||(h=a.__edge=new Xl({shape:Bd(l,i,i),style:J({opacity:0,strokeNoScale:!0},l.lineStyle)})),ft(h,{shape:Bd(l,n,o),style:{opacity:1}},t));else if(u==="polyline"){if(l.layout==="orthogonal"){if(e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var f=e.children,c=[],v=0;v<f.length;v++){var d=f[v].getLayout();c.push([d.x,d.y])}h||(h=a.__edge=new pE({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:J({opacity:0,strokeNoScale:!0},l.lineStyle)})),ft(h,{shape:{parentPoint:[o.x,o.y],childPoints:c},style:{opacity:1}},t)}}else if(T)throw new Error("The polyline edgeShape can only be used in orthogonal layout")}s.add(h)}function Zx(t,e,r,a,i,u){for(var o=t.tree.getNodeByDataIndex(e),s=t.tree.root,l=o.getModel(),u=Ux(o,l,u),h=o.parentNode===s?o:o.parentNode||o,g=u.edgeShape,f;f=h.getLayout(),f==null;)h=h.parentNode===s?h:h.parentNode||h;ft(r,{position:[f.x+1,f.y+1]},i,function(){a.remove(r),t.setItemGraphicEl(e,null)}),r.fadeOut(null,{keepLabel:!0});var c=t.getItemGraphicEl(h.dataIndex),v=c.__edge,d=r.__edge||(h.isExpand===!1||h.children.length===1?v:void 0),g=u.edgeShape;d&&(g==="curve"?ft(d,{shape:Bd(u,f,f),style:{opacity:0}},i,function(){a.remove(d)}):g==="polyline"&&u.layout==="orthogonal"&&ft(d,{shape:{parentPoint:[f.x,f.y],childPoints:[[f.x,f.y]]},style:{opacity:0}},i,function(){a.remove(d)}))}function Bd(t,e,r){var a,i,n,o,s=t.orient,l,u,h,f;if(t.layout==="radial"){l=e.rawX,h=e.rawY,u=r.rawX,f=r.rawY;var c=Ds(l,h),v=Ds(l,h+(f-h)*t.curvature),d=Ds(u,f+(h-f)*t.curvature),g=Ds(u,f);return{x1:c.x,y1:c.y,x2:g.x,y2:g.y,cpx1:v.x,cpy1:v.y,cpx2:d.x,cpy2:d.y}}else l=e.x,h=e.y,u=r.x,f=r.y,(s==="LR"||s==="RL")&&(a=l+(u-l)*t.curvature,i=h,n=u+(l-u)*t.curvature,o=f),(s==="TB"||s==="BT")&&(a=l,i=h+(f-h)*t.curvature,n=u,o=f+(h-f)*t.curvature);return{x1:l,y1:h,x2:u,y2:f,cpx1:a,cpy1:i,cpx2:n,cpy2:o}}mt({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(r){var a=t.dataIndex,i=r.getData().tree,n=i.getNodeByDataIndex(a);n.isExpand=!n.isExpand})}),mt({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(r){var a=r.coordinateSystem,i=Ed(a,t);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})});function yE(t,e,r){for(var a=[t],i=[],n;n=a.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;n=i.pop();)e(n,r)}function Ms(t,e){for(var r=[t],a;a=r.pop();)if(e(a),a.isExpand){var i=a.children;if(i.length)for(var n=i.length-1;n>=0;n--)r.push(i[n])}}var _E=function(t,e){t.eachSeriesByType("tree",function(r){xE(r,e)})};function xE(t,e){var r=hE(t,e);t.layoutInfo=r;var a=t.get("layout"),i=0,n=0,o=null;a==="radial"?(i=2*Math.PI,n=Math.min(r.height,r.width)/2,o=Fx(function(_,w){return(_.parentNode===w.parentNode?1:2)/_.depth})):(i=r.width,n=r.height,o=Fx());var s=t.getData().tree.root,l=s.children[0];if(l){sE(s),yE(l,lE,o),s.hierNode.modifier=-l.hierNode.prelim,Ms(l,uE);var u=l,h=l,f=l;Ms(l,function(_){var w=_.getLayout().x;w<u.getLayout().x&&(u=_),w>h.getLayout().x&&(h=_),_.depth>f.depth&&(f=_)});var c=u===h?1:o(u,h)/2,v=c-u.getLayout().x,d=0,g=0,p=0,m=0;if(a==="radial")d=i/(h.getLayout().x+c+v),g=n/(f.depth-1||1),Ms(l,function(_){p=(_.getLayout().x+v)*d,m=(_.depth-1)*g;var w=Ds(p,m);_.setLayout({x:w.x,y:w.y,rawX:p,rawY:m},!0)});else{var y=t.getOrient();y==="RL"||y==="LR"?(g=n/(h.getLayout().x+c+v),d=i/(f.depth-1||1),Ms(l,function(_){m=(_.getLayout().x+v)*g,p=y==="LR"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:p,y:m},!0)})):(y==="TB"||y==="BT")&&(d=i/(h.getLayout().x+c+v),g=n/(f.depth-1||1),Ms(l,function(_){p=(_.getLayout().x+v)*d,m=y==="TB"?(_.depth-1)*g:n-(_.depth-1)*g,_.setLayout({x:p,y:m},!0)}))}}}Rt(Ii("tree","circle")),Gt(_E);function Is(t,e,r){if(t&&yt(e,t.type)>=0){var a=r.getData().tree.root,i=t.targetNode;if(typeof i=="string"&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=t.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function Yx(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function Vd(t,e){var r=Yx(t);return yt(r,e)>=0}function Gd(t,e){for(var r=[];t;){var a=t.dataIndex;r.push({name:t.name,dataIndex:a,value:e.getRawValue(a)}),t=t.parentNode}return r.reverse(),r}Vt.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,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)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var r={name:t.name,children:t.data};Xx(r);var a=t.levels||[];a=t.levels=wE(a,e);var i=V(a||[],function(s){return new _t(s,this,e)},this),n=Ei.createTree(r,this,null,o);function o(s){s.wrapMethod("getItemModel",function(l,u){var h=n.getNodeByDataIndex(u),f=i[h.depth];return f&&(l.parentModel=f),l})}return n.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),r=this.getRawValue(t),a=z(r)?ka(r[0]):ka(r),i=e.getName(t);return kt(i+": "+a)},getDataParams:function(t){var e=Vt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Gd(r,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},et(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ht(),this._idIndexMapCount=0);var r=e.get(t);return r==null&&e.set(t,r=this._idIndexMapCount++),r},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});function Xx(t){var e=0;M(t.children,function(a){Xx(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var r=t.value;z(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),z(t.value)?t.value[0]=r:t.value=r}function wE(t,e){var r=e.get("color");if(!!r){t=t||[];var a;if(M(t,function(n){var o=new _t(n),s=o.get("color");(o.get("itemStyle.color")||s&&s!=="none")&&(a=!0)}),!a){var i=t[0]||(t[0]={});i.color=r.slice()}return t}}var bE=8,qx=8,Hd=5;function Fd(t){this.group=new q,t.add(this.group)}Fd.prototype={constructor:Fd,render:function(t,e,r,a){var i=t.getModel("breadcrumb"),n=this.group;if(n.removeAll(),!(!i.get("show")||!r)){var o=i.getModel("itemStyle"),s=o.getModel("textStyle"),l={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,l,s),this._renderContent(t,l,o,s,a),uu(n,l.pos,l.box)}},_prepare:function(t,e,r){for(var a=t;a;a=a.parentNode){var i=a.getModel().get("name"),n=r.getTextRect(i),o=Math.max(n.width+bE*2,e.emptyItemWidth);e.totalWidth+=o+qx,e.renderList.push({node:a,text:i,width:o})}},_renderContent:function(t,e,r,a,i){for(var n=0,o=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=MM(e.pos,e.box),u=e.totalWidth,h=e.renderList,f=h.length-1;f>=0;f--){var c=h[f],v=c.node,d=c.width,g=c.text;u>l.width&&(u-=d-o,d=o,g=null);var p=new Ge({shape:{points:SE(n,0,d,s,f===h.length-1,f===0)},style:J(r.getItemStyle(),{lineJoin:"bevel",text:g,textFill:a.getTextColor(),textFont:a.getFont()}),z:10,onclick:ot(i,v)});this.group.add(p),AE(p,t,v),n+=d+qx}},remove:function(){this.group.removeAll()}};function SE(t,e,r,a,i,n){var o=[[i?t:t-Hd,e],[t+r,e],[t+r,e+a],[i?t:t-Hd,e+a]];return!n&&o.splice(2,0,[t+r+Hd,e+a/2]),!i&&o.push([t,e+a/2]),o}function AE(t,e,r){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Gd(r,e)}}function TE(){var t=[],e={},r;return{add:function(a,i,n,o,s){return Lt(o)&&(s=o,o=0),e[a.id]?!1:(e[a.id]=1,t.push({el:a,target:i,time:n,delay:o,easing:s}),!0)},done:function(a){return r=a,this},start:function(){for(var a=t.length,i=0,n=t.length;i<n;i++){var o=t[i];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){a--,a||(t.length=0,e={},r&&r())}}}}var Ju=it,Kx=q,jx=xt,Yr=M,Qx=3,CE=["label"],DE=["emphasis","label"],ME=["upperLabel"],IE=["emphasis","upperLabel"],LE=10,PE=1,EE=2,Wd=_n([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Jx=function(t){var e=Wd(t);return e.stroke=e.fill=e.lineWidth=null,e};ke({type:"treemap",init:function(t,e){this._containerGroup,this._storage=Ls(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,r,a){var i=e.findComponents({mainType:"series",subType:"treemap",query:a});if(!(yt(i,t)<0)){this.seriesModel=t,this.api=r,this.ecModel=e;var n=["treemapZoomToNode","treemapRootToNode"],o=Is(a,n,t),s=a&&a.type,l=t.layoutInfo,u=!this._oldTree,h=this._storage,f=s==="treemapRootToNode"&&o&&h?{rootNodeGroup:h.nodeGroup[o.node.getRawIndex()],direction:a.direction}:null,c=this._giveContainerGroup(l),v=this._doRender(c,t,f);!u&&(!s||s==="treemapZoomToNode"||s==="treemapRootToNode")?this._doAnimation(c,v,t,f):v.renderFinally(),this._resetController(r),this._renderBreadcrumb(t,r,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Kx,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,r){var a=e.getData().tree,i=this._oldTree,n=Ls(),o=Ls(),s=this._storage,l=[],u=ot(RE,e,o,s,r,n,l);f(a.root?[a.root]:[],i&&i.root?[i.root]:[],t,a===i||!i,0);var h=c(s);return this._oldTree=a,this._storage=o,{lastsForAnimation:n,willDeleteEls:h,renderFinally:v};function f(d,g,p,m,y){m?(g=d,Yr(d,function(b,A){!b.isRemoved()&&w(A,A)})):new ha(g,d,_,_).add(w).update(w).remove(ot(w,null)).execute();function _(b){return b.getId()}function w(b,A){var S=b!=null?d[b]:null,D=A!=null?g[A]:null,I=u(S,D,p,y);I&&f(S&&S.viewChildren||[],D&&D.viewChildren||[],I,m,y+1)}}function c(d){var g=Ls();return d&&Yr(d,function(p,m){var y=g[m];Yr(p,function(_){_&&(y.push(_),_.__tmWillDelete=1)})}),g}function v(){Yr(h,function(d){Yr(d,function(g){g.parent&&g.parent.remove(g)})}),Yr(l,function(d){d.invisible=!0,d.dirty()})}},_doAnimation:function(t,e,r,a){if(!!r.get("animation")){var i=r.get("animationDurationUpdate"),n=r.get("animationEasing"),o=TE();Yr(e.willDeleteEls,function(s,l){Yr(s,function(u,h){if(!u.invisible){var f=u.parent,c;if(a&&a.direction==="drillDown")c=f===a.rootNodeGroup?{shape:{x:0,y:0,width:f.__tmNodeWidth,height:f.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var v=0,d=0;f.__tmWillDelete||(v=f.__tmNodeWidth/2,d=f.__tmNodeHeight/2),c=l==="nodeGroup"?{position:[v,d],style:{opacity:0}}:{shape:{x:v,y:d,width:0,height:0},style:{opacity:0}}}c&&o.add(u,c,i,n)}})}),Yr(this._storage,function(s,l){Yr(s,function(u,h){var f=e.lastsForAnimation[l][h],c={};!f||(l==="nodeGroup"?f.old&&(c.position=u.position.slice(),u.attr("position",f.old)):(f.old&&(c.shape=et({},u.shape),u.setShape(f.old)),f.fadein?(u.setStyle("opacity",0),c.style={opacity:1}):u.style.opacity!==1&&(c.style={opacity:1})),o.add(u,c,i,n))})},this),this._state="animating",o.done(Ju(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new Yn(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",Ju(this._onPan,this)),e.on("zoom",Ju(this._onZoom,this)));var r=new vt(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(a,i,n){return r.contain(i,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>Qx||Math.abs(t.dy)>Qx)){var e=this.seriesModel.getData().tree.root;if(!e)return;var r=e.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}})}},_onZoom:function(t){var e=t.originX,r=t.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;var n=new vt(i.x,i.y,i.width,i.height),o=this.seriesModel.layoutInfo;e-=o.x,r-=o.y;var s=Ie();yr(s,s,[-e,-r]),wo(s,s,[t.scale,t.scale]),yr(s,s,[e,r]),n.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x,y:n.y,width:n.width,height:n.height}})}},_initEvents:function(t){t.on("click",function(e){if(this._state==="ready"){var r=this.seriesModel.get("nodeClick",!0);if(!!r){var a=this.findTarget(e.offsetX,e.offsetY);if(!!a){var i=a.node;if(i.getLayout().isLeafRoot)this._rootToNode(a);else if(r==="zoomToNode")this._zoomToNode(a);else if(r==="link"){var n=i.hostTree.data.getItemModel(i.dataIndex),o=n.get("link",!0),s=n.get("target",!0)||"blank";o&&Zo(o,s)}}}}},this)},_renderBreadcrumb:function(t,e,r){r||(r=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),r||(r={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Fd(this.group))).render(t,e,r.node,Ju(a,this));function a(i){this._state!=="animating"&&(Vd(t.getViewRoot(),i)?this._rootToNode({node:i}):this._zoomToNode({node:i}))}},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ls(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var r,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(i){var n=this._storage.background[i.getRawIndex()];if(n){var o=n.transformCoordToLocal(t,e),s=n.shape;if(s.x<=o[0]&&o[0]<=s.x+s.width&&s.y<=o[1]&&o[1]<=s.y+s.height)r={node:i,offsetX:o[0],offsetY:o[1]};else return!1}},this),r}});function Ls(){return{nodeGroup:[],background:[],content:[]}}function RE(t,e,r,a,i,n,o,s,l,u){if(!o)return;var h=o.getLayout(),f=t.getData();if(f.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var c=h.width,v=h.height,d=h.borderWidth,g=h.invisible,p=o.getRawIndex(),m=s&&s.getRawIndex(),y=o.viewChildren,_=h.upperHeight,w=y&&y.length,b=o.getModel("itemStyle"),A=o.getModel("emphasis.itemStyle"),S=$("nodeGroup",Kx);if(!S)return;if(l.add(S),S.attr("position",[h.x||0,h.y||0]),S.__tmNodeWidth=c,S.__tmNodeHeight=v,h.isAboveViewRoot)return S;var D=o.getModel(),I=$("background",jx,u,PE);if(I&&P(S,I,w&&h.upperLabelHeight),w)tu(S)&&mi(S,!1),I&&(mi(I,!0),f.setItemGraphicEl(o.dataIndex,I));else{var L=$("content",jx,u,EE);L&&R(S,L),I&&tu(I)&&mi(I,!1),mi(S,!0),f.setItemGraphicEl(o.dataIndex,S)}return S;function P(Q,j,U){if(j.dataIndex=o.dataIndex,j.seriesIndex=t.seriesIndex,j.setShape({x:0,y:0,width:c,height:v}),g)E(j);else{j.invisible=!1;var tt=o.getVisual("borderColor",!0),ct=A.get("borderColor"),bt=Jx(b);bt.fill=tt;var Et=Wd(A);if(Et.fill=ct,U){var ie=c-2*d;Z(bt,Et,tt,ie,_,{x:d,y:0,width:ie,height:_})}else bt.text=Et.text=null;j.setStyle(bt),Vo(j,Et)}Q.add(j)}function R(Q,j){j.dataIndex=o.dataIndex,j.seriesIndex=t.seriesIndex;var U=Math.max(c-2*d,0),tt=Math.max(v-2*d,0);if(j.culling=!0,j.setShape({x:d,y:d,width:U,height:tt}),g)E(j);else{j.invisible=!1;var ct=o.getVisual("color",!0),bt=Jx(b);bt.fill=ct;var Et=Wd(A);Z(bt,Et,ct,U,tt),j.setStyle(bt),Vo(j,Et)}Q.add(j)}function E(Q){!Q.invisible&&n.push(Q)}function Z(Q,j,U,tt,ct,bt){var Et=D.get("name"),ie=D.getModel(bt?ME:CE),ol=D.getModel(bt?IE:DE),dr=ie.getShallow("show");Fe(Q,j,ie,ol,{defaultText:dr?Et:null,autoColor:U,isRectText:!0,labelFetcher:t,labelDataIndex:o.dataIndex,labelProp:bt?"upperLabel":"label"}),W(Q,bt,h),W(j,bt,h),bt&&(Q.textRect=rt(bt)),Q.truncate=dr&&ie.get("ellipsis")?{outerWidth:tt,outerHeight:ct,minChar:2}:null}function W(Q,j,U){var tt=Q.text;if(!j&&U.isLeafRoot&&tt!=null){var ct=t.get("drillDownIcon",!0);Q.text=ct?ct+" "+tt:tt}}function $(Q,j,U,tt){var ct=m!=null&&r[Q][m],bt=i[Q];return ct?(r[Q][m]=null,X(bt,ct,Q)):g||(ct=new j({z:OE(U,tt)}),ct.__tmDepth=U,ct.__tmStorageName=Q,K(bt,ct,Q)),e[Q][p]=ct}function X(Q,j,U){var tt=Q[p]={};tt.old=U==="nodeGroup"?j.position.slice():et({},j.shape)}function K(Q,j,U){var tt=Q[p]={},ct=o.parentNode;if(ct&&(!a||a.direction==="drillDown")){var bt=0,Et=0,ie=i.background[ct.getRawIndex()];!a&&ie&&ie.old&&(bt=ie.old.width,Et=ie.old.height),tt.old=U==="nodeGroup"?[0,Et]:{x:bt,y:Et,width:0,height:0}}tt.fadein=U!=="nodeGroup"}}function OE(t,e){var r=t*LE+e;return(r-1)/r}for(var NE=function(){},tw=["treemapZoomToNode","treemapRender","treemapMove"],Ud=0;Ud<tw.length;Ud++)mt({type:tw[Ud],update:"updateView"},NE);mt({type:"treemapRootToNode",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},r);function r(a,i){var n=["treemapZoomToNode","treemapRootToNode"],o=Is(t,n,a);if(o){var s=a.getViewRoot();s&&(t.direction=Vd(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}});var Ps=M,ew=lt,th=-1,Mt=function(t){var e=t.mappingMethod,r=t.type,a=this.option=rt(t);this.type=r,this.mappingMethod=e,this._normalizeData=BE[e];var i=Es[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._doMap=i._doMap[e],e==="piecewise"?($d(a),kE(a)):e==="category"?a.categories?zE(a):$d(a,!0):(gt(e!=="linear"||a.dataExtent),$d(a))};Mt.prototype={constructor:Mt,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return it(this._normalizeData,this)}};var Es=Mt.visualHandlers={color:{applyVisual:rh("color"),getColorMapper:function(){var t=this.option;return it(t.mappingMethod==="category"?function(e,r){return!r&&(e=this._normalizeData(e)),ah.call(this,e)}:function(e,r,a){var i=!!a;return!r&&(e=this._normalizeData(e)),a=Ao(e,t.parsedVisual,a),i?a:ia(a,"rgba")},this)},_doMap:{linear:function(t){return ia(Ao(t,this.option.parsedVisual),"rgba")},category:ah,piecewise:function(t,e){var r=Yd.call(this,e);return r==null&&(r=ia(Ao(t,this.option.parsedVisual),"rgba")),r},fixed:Ri}},colorHue:eh(function(t,e){return gn(t,e)}),colorSaturation:eh(function(t,e){return gn(t,null,e)}),colorLightness:eh(function(t,e){return gn(t,null,null,e)}),colorAlpha:eh(function(t,e){return gl(t,e)}),opacity:{applyVisual:rh("opacity"),_doMap:Zd([0,1])},liftZ:{applyVisual:rh("liftZ"),_doMap:{linear:Ri,category:Ri,piecewise:Ri,fixed:Ri}},symbol:{applyVisual:function(t,e,r){var a=this.mapValueToVisual(t);if(Lt(a))r("symbol",a);else if(ew(a))for(var i in a)a.hasOwnProperty(i)&&r(i,a[i])},_doMap:{linear:rw,category:ah,piecewise:function(t,e){var r=Yd.call(this,e);return r==null&&(r=rw.call(this,t)),r},fixed:Ri}},symbolSize:{applyVisual:rh("symbolSize"),_doMap:Zd([0,1])}};function kE(t){var e=t.pieceList;t.hasSpecialVisual=!1,M(e,function(r,a){r.originIndex=a,r.visual!=null&&(t.hasSpecialVisual=!0)})}function zE(t){var e=t.categories,r=t.visual,a=t.categoryMap={};if(Ps(e,function(o,s){a[o]=s}),!z(r)){var i=[];lt(r)?Ps(r,function(o,s){var l=a[s];i[l??th]=o}):i[th]=r,r=aw(t,i)}for(var n=e.length-1;n>=0;n--)r[n]==null&&(delete a[e[n]],e.pop())}function $d(t,e){var r=t.visual,a=[];lt(r)?Ps(r,function(n){a.push(n)}):r!=null&&a.push(r);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(t.type)&&(a[1]=a[0]),aw(t,a)}function eh(t){return{applyVisual:function(e,r,a){e=this.mapValueToVisual(e),a("color",t(r("color"),e))},_doMap:Zd([0,1])}}function rw(t){var e=this.option.visual;return e[Math.round(Nt(t,[0,1],[0,e.length-1],!0))]||{}}function rh(t){return function(e,r,a){a(t,this.mapValueToVisual(e))}}function ah(t){var e=this.option.visual;return e[this.option.loop&&t!==th?t%e.length:t]}function Ri(){return this.option.visual[0]}function Zd(t){return{linear:function(e){return Nt(e,t,this.option.visual,!0)},category:ah,piecewise:function(e,r){var a=Yd.call(this,r);return a==null&&(a=Nt(e,t,this.option.visual,!0)),a},fixed:Ri}}function Yd(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var a=Mt.findPieceIndex(t,r),i=r[a];if(i&&i.visual)return i.visual[this.type]}}function aw(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=V(e,function(r){return Ve(r)})),e}var BE={linear:function(t){return Nt(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=Mt.findPieceIndex(t,e,!0);if(r!=null)return Nt(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??th},fixed:ce};Mt.listVisualTypes=function(){var t=[];return M(Es,function(e,r){t.push(r)}),t},Mt.addVisualHandler=function(t,e){Es[t]=e},Mt.isValidType=function(t){return Es.hasOwnProperty(t)},Mt.eachVisual=function(t,e,r){lt(t)?M(t,e,r):e.call(r,t)},Mt.mapVisual=function(t,e,r){var a,i=z(t)?[]:lt(t)?{}:(a=!0,null);return Mt.eachVisual(t,function(n,o){var s=e.call(r,n,o);a?i=s:i[o]=s}),i},Mt.retrieveVisuals=function(t){var e={},r;return t&&Ps(Es,function(a,i){t.hasOwnProperty(i)&&(e[i]=t[i],r=!0)}),r?e:null},Mt.prepareVisualTypes=function(t){if(ew(t)){var e=[];Ps(t,function(r,a){e.push(a)}),t=e}else if(z(t))t=t.slice();else return[];return t.sort(function(r,a){return a==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),t},Mt.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},Mt.findPieceIndex=function(t,e,r){for(var a,i=1/0,n=0,o=e.length;n<o;n++){var s=e[n].value;if(s!=null){if(s===t||typeof s=="string"&&s===t+"")return n;r&&f(s,n)}}for(var n=0,o=e.length;n<o;n++){var l=e[n],u=l.interval,h=l.close;if(u){if(u[0]===-1/0){if(ih(h[1],t,u[1]))return n}else if(u[1]===1/0){if(ih(h[0],u[0],t))return n}else if(ih(h[0],u[0],t)&&ih(h[1],t,u[1]))return n;r&&f(u[0],n),r&&f(u[1],n)}}if(r)return t===1/0?e.length-1:t===-1/0?0:a;function f(c,v){var d=Math.abs(c-t);d<i&&(i=d,a=v)}};function ih(t,e,r){return t?e<=r:e<r}var VE=z,Xd="itemStyle",GE={seriesType:"treemap",reset:function(t,e,r,a){var i=t.getData().tree,n=i.root,o=t.getModel(Xd);if(!n.isRemoved()){var s=V(i.levelModels,function(l){return l?l.get(Xd):null});iw(n,{},s,o,t.getViewRoot().getAncestors(),t)}}};function iw(t,e,r,a,i,n){var o=t.getModel(),s=t.getLayout();if(!(!s||s.invisible||!s.isInView)){var l=t.getModel(Xd),u=r[t.depth],h=HE(l,e,u,a),f=l.get("borderColor"),c=l.get("borderColorSaturation"),v;c!=null&&(v=nw(h,t),f=FE(c,v)),t.setVisual("borderColor",f);var d=t.viewChildren;if(!d||!d.length)v=nw(h,t),t.setVisual("color",v);else{var g=WE(t,o,s,l,h,d);M(d,function(p,m){if(p.depth>=i.length||p===i[p.depth]){var y=UE(o,h,p,m,g,n);iw(p,y,r,a,i,n)}})}}}function HE(t,e,r,a){var i=et({},e);return M(["color","colorAlpha","colorSaturation"],function(n){var o=t.get(n,!0);o==null&&r&&(o=r[n]),o==null&&(o=e[n]),o==null&&(o=a.get(n)),o!=null&&(i[n]=o)}),i}function nw(t){var e=qd(t,"color");if(e){var r=qd(t,"colorAlpha"),a=qd(t,"colorSaturation");return a&&(e=gn(e,null,null,a)),r&&(e=gl(e,r)),e}}function FE(t,e){return e!=null?gn(e,null,null,t):null}function qd(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function WE(t,e,r,a,i,n){if(!(!n||!n.length)){var o=Kd(e,"color")||i.color!=null&&i.color!=="none"&&(Kd(e,"colorAlpha")||Kd(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(h==="index"||h==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var c=new Mt(f);return c.__drColorMappingBy=h,c}}}function Kd(t,e){var r=t.get(e);return VE(r)&&r.length?{name:e,range:r}:null}function UE(t,e,r,a,i,n){var o=et({},e);if(i){var s=i.type,l=s==="color"&&i.__drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Rs=Math.max,nh=Math.min,ow=Ut,jd=M,sw=["itemStyle","borderWidth"],$E=["itemStyle","gapWidth"],ZE=["upperLabel","show"],YE=["upperLabel","height"],XE={seriesType:"treemap",reset:function(t,e,r,a){var i=r.getWidth(),n=r.getHeight(),o=t.option,s=qt(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=H(ow(s.width,l[0]),i),h=H(ow(s.height,l[1]),n),f=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],v=Is(a,c,t),d=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,g=t.getViewRoot(),p=Yx(g);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?tR(t,v,g,u,h):d?[d.width,d.height]:[u,h],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var w={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(w),lw(g,_,!1,0);var w=g.getLayout();jd(p,function(A,S){var D=(p[S+1]||g).getValue();A.setLayout(et({dataExtent:[D,D],borderWidth:0,upperHeight:0},w))})}var b=t.getData().tree.root;b.setLayout(eR(s,d,v),!0),t.setLayoutInfo(s),hw(b,new vt(-s.x,-s.y,i,n),p,g,0)}};function lw(t,e,r,a){var i,n;if(!t.isRemoved()){var o=t.getLayout();i=o.width,n=o.height;var v=t.getModel(),s=v.get(sw),l=v.get($E)/2,u=fw(v),h=Math.max(s,u),f=s-l,c=h-l,v=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0),i=Rs(i-2*f,0),n=Rs(n-f-c,0);var d=i*n,g=qE(t,v,d,e,r,a);if(!!g.length){var p={x:f,y:c,width:i,height:n},m=nh(i,n),y=1/0,_=[];_.area=0;for(var w=0,b=g.length;w<b;){var A=g[w];_.push(A),_.area+=A.getLayout().area;var S=JE(_,m,e.squareRatio);S<=y?(w++,y=S):(_.area-=_.pop().getLayout().area,uw(_,m,p,l,!1),m=nh(p.width,p.height),_.length=_.area=0,y=1/0)}if(_.length&&uw(_,m,p,l,!0),!r){var D=v.get("childrenVisibleMin");D!=null&&d<D&&(r=!0)}for(var w=0,b=g.length;w<b;w++)lw(g[w],e,r,a+1)}}}function qE(t,e,r,a,i,n){var o=t.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=n;if(i&&!l)return t.viewChildren=[];o=ee(o,function(v){return!v.isRemoved()}),jE(o,s);var u=QE(e,o,s);if(u.sum===0)return t.viewChildren=[];if(u.sum=KE(e,r,u.sum,s,o),u.sum===0)return t.viewChildren=[];for(var h=0,f=o.length;h<f;h++){var c=o[h].getValue()/u.sum*r;o[h].setLayout({area:c})}return l&&(o.length&&t.setLayout({isLeafRoot:!0},!0),o.length=0),t.viewChildren=o,t.setLayout({dataExtent:u.dataExtent},!0),o}function KE(t,e,r,a,i){if(!a)return r;for(var n=t.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/r*e<n&&(s=l,r-=u)}return a==="asc"?i.splice(0,o-s):i.splice(s,o-s),r}function jE(t,e){return e&&t.sort(function(r,a){var i=e==="asc"?r.getValue()-a.getValue():a.getValue()-r.getValue();return i===0?e==="asc"?r.dataIndex-a.dataIndex:a.dataIndex-r.dataIndex:i}),t}function QE(t,e,r){for(var a=0,i=0,n=e.length;i<n;i++)a+=e[i].getValue();var o=t.get("visualDimension"),s;if(!e||!e.length)s=[NaN,NaN];else if(o==="value"&&r)s=[e[e.length-1].getValue(),e[0].getValue()],r==="asc"&&s.reverse();else{var s=[1/0,-1/0];jd(e,function(u){var h=u.getValue(o);h<s[0]&&(s[0]=h),h>s[1]&&(s[1]=h)})}return{sum:a,dataExtent:s}}function JE(t,e,r){for(var a=0,i=1/0,n=0,o,s=t.length;n<s;n++)o=t[n].getLayout().area,o&&(o<i&&(i=o),o>a&&(a=o));var l=t.area*t.area,u=e*e*r;return l?Rs(u*a/l,l/(u*i)):1/0}function uw(t,e,r,a,i){var n=e===r.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=r[s[n]],h=e?t.area/e:0;(i||h>r[l[o]])&&(h=r[l[o]]);for(var f=0,c=t.length;f<c;f++){var v=t[f],d={},g=h?v.getLayout().area/h:0,p=d[l[o]]=Rs(h-2*a,0),m=r[s[n]]+r[l[n]]-u,y=f===c-1||m<g?m:g,_=d[l[n]]=Rs(y-2*a,0);d[s[o]]=r[s[o]]+nh(a,p/2),d[s[n]]=u+nh(a,_/2),u+=y,v.setLayout(d,!0)}r[s[o]]+=h,r[l[o]]-=h}function tR(t,e,r,a,i){var n=(e||{}).node,o=[a,i];if(!n||n===r)return o;for(var s,l=a*i,u=l*t.option.zoomToNodeRatio;s=n.parentNode;){for(var h=0,f=s.children,c=0,v=f.length;c<v;c++)h+=f[c].getValue();var d=n.getValue();if(d===0)return o;u*=h/d;var g=s.getModel(),p=g.get(sw),m=Math.max(p,fw(g,p));u+=4*p*p+(3*p+m)*Math.pow(u,.5),u>tv&&(u=tv),n=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[a*y,i*y]}function eR(t,e,r){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!r)return a;var i=r.node,n=i.getLayout();if(!n)return a;for(var o=[n.width/2,n.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}function hw(t,e,r,a,i){var n=t.getLayout(),o=r[i],s=o&&o===t;if(!(o&&!s||i===r.length&&t!==a)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(n),isAboveViewRoot:s},!0);var l=new vt(e.x-n.x,e.y-n.y,e.width,e.height);jd(t.viewChildren||[],function(u){hw(u,l,r,a,i+1)})}}function fw(t){return t.get(ZE)?t.get(YE):0}Rt(GE),Gt(XE);function qn(t){return"_EC_"+t}var Os=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},qe=Os.prototype;qe.type="graph",qe.isDirected=function(){return this._directed},qe.addNode=function(t,e){t=t==null?""+e:""+t;var r=this._nodesMap;if(r[qn(t)]){T&&console.error("Graph nodes have duplicate name or id");return}var a=new Mr(t,e);return a.hostGraph=this,this.nodes.push(a),r[qn(t)]=a,a},qe.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},qe.getNodeById=function(t){return this._nodesMap[qn(t)]},qe.addEdge=function(t,e,r){var a=this._nodesMap,i=this._edgesMap;if(typeof t=="number"&&(t=this.nodes[t]),typeof e=="number"&&(e=this.nodes[e]),Mr.isInstance(t)||(t=a[qn(t)]),Mr.isInstance(e)||(e=a[qn(e)]),!(!t||!e)){var n=t.id+"-"+e.id;if(!i[n]){var o=new Ns(t,e,r);return o.hostGraph=this,this._directed&&(t.outEdges.push(o),e.inEdges.push(o)),t.edges.push(o),t!==e&&e.edges.push(o),this.edges.push(o),i[n]=o,o}}},qe.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},qe.getEdge=function(t,e){Mr.isInstance(t)&&(t=t.id),Mr.isInstance(e)&&(e=e.id);var r=this._edgesMap;return this._directed?r[t+"-"+e]:r[t+"-"+e]||r[e+"-"+t]},qe.eachNode=function(t,e){for(var r=this.nodes,a=r.length,i=0;i<a;i++)r[i].dataIndex>=0&&t.call(e,r[i],i)},qe.eachEdge=function(t,e){for(var r=this.edges,a=r.length,i=0;i<a;i++)r[i].dataIndex>=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&t.call(e,r[i],i)},qe.breadthFirstTraverse=function(t,e,r,a){if(Mr.isInstance(e)||(e=this._nodesMap[qn(e)]),!!e){for(var i=r==="out"?"outEdges":r==="in"?"inEdges":"edges",n=0;n<this.nodes.length;n++)this.nodes[n].__visited=!1;if(!t.call(a,e,null))for(var o=[e];o.length;)for(var s=o.shift(),l=s[i],n=0;n<l.length;n++){var u=l[n],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(a,h,s))return;o.push(h),h.__visited=!0}}}},qe.update=function(){for(var t=this.data,e=this.edgeData,r=this.nodes,a=this.edges,i=0,n=r.length;i<n;i++)r[i].dataIndex=-1;for(var i=0,n=t.count();i<n;i++)r[t.getRawIndex(i)].dataIndex=i;e.filterSelf(function(o){var s=a[e.getRawIndex(o)];return s.node1.dataIndex>=0&&s.node2.dataIndex>=0});for(var i=0,n=a.length;i<n;i++)a[i].dataIndex=-1;for(var i=0,n=e.count();i<n;i++)a[e.getRawIndex(i)].dataIndex=i},qe.clone=function(){for(var t=new Os(this._directed),e=this.nodes,r=this.edges,a=0;a<e.length;a++)t.addNode(e[a].id,e[a].dataIndex);for(var a=0;a<r.length;a++){var i=r[a];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t};function Mr(t,e){this.id=t??"",this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=e??-1}Mr.prototype={constructor:Mr,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,r=e.data.getItemModel(this.dataIndex);return r.getModel(t)}}};function Ns(t,e,r){this.node1=t,this.node2=e,this.dataIndex=r??-1}Ns.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,r=e.edgeData.getItemModel(this.dataIndex);return r.getModel(t)}};var cw=function(t,e){return{getValue:function(r){var a=this[t][e];return a.get(a.getDimension(r||"value"),this.dataIndex)},setVisual:function(r,a){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,a)},getVisual:function(r,a){return this[t][e].getItemVisual(this.dataIndex,r,a)},setLayout:function(r,a){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,a)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};Dt(Mr,cw("hostGraph","data")),Dt(Ns,cw("hostGraph","edgeData")),Os.Node=Mr,Os.Edge=Ns,Nl(Mr),Nl(Ns);var vw=function(t,e,r,a,i){for(var n=new Os(a),o=0;o<t.length;o++)n.addNode(Ut(t[o].id,t[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var h=e[o],f=h.source,c=h.target;n.addEdge(f,c,u)&&(l.push(h),s.push(Ut(h.id,f+" > "+c)),u++)}var v=r.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=ca(t,r);else{var g=_e.get(v),p=g&&g.type!=="view"?g.dimensions||[]:[];yt(p,"value")<0&&p.concat(["value"]);var m=En(t,{coordDimensions:p});d=new fe(m,r),d.initData(t)}var y=new fe(["value"],r);return y.initData(l,s),i&&i(d,y),Gx({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n},ks=Mu({type:"series.graph",init:function(t){ks.superApply(this,"init",arguments);var e=this;function r(){return e._categoriesData}this.legendVisualProvider=new ws(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){ks.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){ks.superApply(this,"mergeDefaultAndTheme",arguments),fi(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var r=t.edges||t.links||[],a=t.data||t.nodes||[],i=this;if(a&&r)return vw(a,r,this,!0,n).data;function n(o,s){o.wrapMethod("getItemModel",function(v){var d=i._categoriesModels,g=v.getShallow("category"),p=d[g];return p&&(p.parentModel=v.parentModel,v.parentModel=p),v});var l=i.getModel("edgeLabel"),u=new _t({label:l.option},l.parentModel,e),h=i.getModel("emphasis.edgeLabel"),f=new _t({emphasis:{label:h.option}},h.parentModel,e);s.wrapMethod("getItemModel",function(v){return v.customizeGetParent(c),v});function c(v){return v=this.parsePath(v),v&&v[0]==="label"?u:v&&v[0]==="emphasis"&&v[1]==="label"?f:this.parentModel}}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,r){if(r==="edge"){var a=this.getData(),i=this.getDataParams(t,r),n=a.graph.getEdgeByIndex(t),o=a.getName(n.node1.dataIndex),s=a.getName(n.node2.dataIndex),l=[];return o!=null&&l.push(o),s!=null&&l.push(s),l=kt(l.join(" > ")),i.value&&(l+=" : "+kt(i.value)),l}else return ks.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=V(this.option.categories||[],function(r){return r.value!=null?r:et({value:0},r)}),e=new fe(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(r){return e.getItemModel(r,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return ks.superCall(this,"isAnimationEnabled")&&!(this.get("layout")==="force"&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,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,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),dw=ye.prototype,Qd=Xl.prototype;function Jd(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var rR=nr({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Jd(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:dw.buildPath,_buildPathCurve:Qd.buildPath,pointAt:function(t){return this[Jd(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:dw.pointAt,_pointAtCurve:Qd.pointAt,tangentAt:function(t){var e=this.shape,r=Jd(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return ln(r,r)},_tangentAtCurve:Qd.tangentAt}),tg=["fromSymbol","toSymbol"];function gw(t){return"_"+t+"Type"}function pw(t,e,r){var a=e.getItemVisual(r,"color"),i=e.getItemVisual(r,t),n=e.getItemVisual(r,t+"Size");if(!(!i||i==="none")){z(n)||(n=[n,n]);var o=Ye(i,-n[0]/2,-n[1]/2,n[0],n[1],a);return o.name=t,o}}function aR(t){var e=new rR({name:"line",subPixelOptimize:!0});return eg(e.shape,t),e}function eg(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var r=e[2];r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=NaN,t.cpy1=NaN)}function iR(){var t=this,e=t.childOfName("fromSymbol"),r=t.childOfName("toSymbol"),a=t.childOfName("label");if(!(!e&&!r&&a.ignore)){for(var i=1,n=this.parent;n;)n.scale&&(i/=n.scale[0]),n=n.parent;var o=t.childOfName("line");if(!(!this.__dirty&&!o.__dirty)){var s=o.shape.percent,l=o.pointAt(0),u=o.pointAt(s),h=Jr([],u,l);if(ln(h,h),e){e.attr("position",l);var f=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(f[1],f[0])),e.attr("scale",[i*s,i*s])}if(r){r.attr("position",u);var f=o.tangentAt(1);r.attr("rotation",-Math.PI/2-Math.atan2(f[1],f[0])),r.attr("scale",[i*s,i*s])}if(!a.ignore){a.attr("position",u);var c,v,d,g,p=a.__labelDistance,m=p[0]*i,y=p[1]*i,_=s/2,f=o.tangentAt(_),w=[f[1],-f[0]],b=o.pointAt(_);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var A=f[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var S=-Math.atan2(f[1],f[0]);u[0]<l[0]&&(S=Math.PI+S),a.attr("rotation",S)}var D;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":D=-y,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":D=y,d="top";break;default:D=0,d="middle"}switch(a.__position){case"end":c=[h[0]*m+u[0],h[1]*y+u[1]],v=h[0]>.8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":c=[-h[0]*m+l[0],-h[1]*y+l[1]],v=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":c=[m*A+l[0],l[1]+D],v=f[0]<0?"right":"left",g=[-m*A,-D];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[b[0],b[1]+D],v="center",g=[0,-D];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*A+u[0],u[1]+D],v=f[0]>=0?"right":"left",g=[m*A,-D];break}a.attr({style:{textVerticalAlign:a.__verticalAlign||d,textAlign:a.__textAlign||v},position:c,scale:[i,i],origin:g})}}}}function zs(t,e,r){q.call(this),this._createLine(t,e,r)}var qa=zs.prototype;qa.beforeUpdate=iR,qa._createLine=function(t,e,r){var a=t.hostModel,i=t.getItemLayout(e),n=aR(i);n.shape.percent=0,Se(n,{shape:{percent:1}},a,e),this.add(n);var o=new dt({name:"label",lineLabelOriginalOpacity:1});this.add(o),M(tg,function(s){var l=pw(s,t,e);this.add(l),this[gw(s)]=t.getItemVisual(e,s)},this),this._updateCommonStl(t,e,r)},qa.updateData=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=t.getItemLayout(e),o={shape:{}};eg(o.shape,n),ft(i,o,a,e),M(tg,function(s){var l=t.getItemVisual(e,s),u=gw(s);if(this[u]!==l){this.remove(this.childOfName(s));var h=pw(s,t,e);this.add(h)}this[u]=l},this),this._updateCommonStl(t,e,r)},qa._updateCommonStl=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=r&&r.lineStyle,o=r&&r.hoverLineStyle,s=r&&r.labelModel,l=r&&r.hoverLabelModel;if(!r||t.hasItemOption){var u=t.getItemModel(e);n=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),f=ni(t.getItemVisual(e,"opacity"),n.opacity,1);i.useStyle(J({strokeNoScale:!0,fill:"none",stroke:h,opacity:f},n)),i.hoverStyle=o,M(tg,function(A){var S=this.childOfName(A);S&&(S.setColor(h),S.setStyle({opacity:f}))},this);var c=s.getShallow("show"),v=l.getShallow("show"),d=this.childOfName("label"),g,p;if((c||v)&&(g=h||"#000",p=a.getFormattedLabel(e,"normal",t.dataType),p==null)){var m=a.getRawValue(e);p=m==null?t.getName(e):isFinite(m)?re(m):m}var y=c?p:null,_=v?Xt(a.getFormattedLabel(e,"emphasis",t.dataType),p):null,w=d.style;if(y!=null||_!=null){$t(d.style,s,{text:y},{autoColor:g}),d.__textAlign=w.textAlign,d.__verticalAlign=w.textVerticalAlign,d.__position=s.get("position")||"middle";var b=s.get("distance");z(b)||(b=[b,b]),d.__labelDistance=b}_!=null?d.hoverStyle={text:_,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:d.hoverStyle={text:null},d.ignore=!c&&!v,Ot(this)},qa.highlight=function(){this.trigger("emphasis")},qa.downplay=function(){this.trigger("normal")},qa.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},qa.setLinePoints=function(t){var e=this.childOfName("line");eg(e.shape,t),e.dirty()},It(zs,q);function oh(t){this._ctor=t||zs,this.group=new q}var Oi=oh.prototype;Oi.isPersistent=function(){return!0},Oi.updateData=function(t){var e=this,r=e.group,a=e._lineData;e._lineData=t,a||r.removeAll();var i=mw(t);t.diff(a).add(function(n){nR(e,t,n,i)}).update(function(n,o){oR(e,a,t,o,n,i)}).remove(function(n){r.remove(a.getItemGraphicEl(n))}).execute()};function nR(t,e,r,a){var i=e.getItemLayout(r);if(!!rg(i)){var n=new t._ctor(e,r,a);e.setItemGraphicEl(r,n),t.group.add(n)}}function oR(t,e,r,a,i,n){var o=e.getItemGraphicEl(a);if(!rg(r.getItemLayout(i))){t.group.remove(o);return}o?o.updateData(r,i,n):o=new t._ctor(r,i,n),r.setItemGraphicEl(i,o),t.group.add(o)}Oi.updateLayout=function(){var t=this._lineData;!t||t.eachItemGraphicEl(function(e,r){e.updateLayout(t,r)},this)},Oi.incrementalPrepareUpdate=function(t){this._seriesScope=mw(t),this._lineData=null,this.group.removeAll()};function sR(t){return t.animators&&t.animators.length>0}Oi.incrementalUpdate=function(t,e){function r(o){!o.isGroup&&!sR(o)&&(o.incremental=o.useHoverLayer=!0)}for(var a=t.start;a<t.end;a++){var i=e.getItemLayout(a);if(rg(i)){var n=new this._ctor(e,a,this._seriesScope);n.traverse(r),this.group.add(n),e.setItemGraphicEl(a,n)}}};function mw(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}Oi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Oi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};function yw(t){return isNaN(t[0])||isNaN(t[1])}function rg(t){return!yw(t[0])&&!yw(t[1])}function Bs(t){var e=t.coordinateSystem;if(e.type!=="view")return 1;var r=t.option.nodeScaleRatio,a=e.scale,i=a&&a[0]||1,n=e.getZoom(),o=(n-1)*r+1;return o/i}function Vs(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var ag=[],ig=[],ng=[],Kn=be,og=ba,_w=Math.abs;function xw(t,e,r){for(var a=t[0],i=t[1],n=t[2],o=1/0,s,l=r*r,u=.1,h=.1;h<=.9;h+=.1){ag[0]=Kn(a[0],i[0],n[0],h),ag[1]=Kn(a[1],i[1],n[1],h);var f=_w(og(ag,e)-l);f<o&&(o=f,s=h)}for(var c=0;c<32;c++){var v=s+u;ig[0]=Kn(a[0],i[0],n[0],s),ig[1]=Kn(a[1],i[1],n[1],s),ng[0]=Kn(a[0],i[0],n[0],v),ng[1]=Kn(a[1],i[1],n[1],v);var f=og(ig,e)-l;if(_w(f)<.01)break;var d=og(ng,e)-l;u/=2,f<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}var sg=function(t,e){var r=[],a=Nc,i=[[],[],[]],n=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[mr(u[0]),mr(u[1])],u[2]&&u.__original.push(mr(u[2])));var c=u.__original;if(u[2]!=null){if(ge(i[0],c[0]),ge(i[1],c[2]),ge(i[2],c[1]),h&&h!=="none"){var v=Vs(s.node1),d=xw(i,c[0],v*e);a(i[0][0],i[1][0],i[2][0],d,r),i[0][0]=r[3],i[1][0]=r[4],a(i[0][1],i[1][1],i[2][1],d,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var v=Vs(s.node2),d=xw(i,c[1],v*e);a(i[0][0],i[1][0],i[2][0],d,r),i[1][0]=r[1],i[2][0]=r[2],a(i[0][1],i[1][1],i[2][1],d,r),i[1][1]=r[1],i[2][1]=r[2]}ge(u[0],i[0]),ge(u[1],i[2]),ge(u[2],i[1])}else{if(ge(n[0],c[0]),ge(n[1],c[1]),Jr(o,n[1],n[0]),ln(o,o),h&&h!=="none"){var v=Vs(s.node1);mo(n[0],n[0],o,v*e)}if(f&&f!=="none"){var v=Vs(s.node2);mo(n[1],n[1],o,-v*e)}ge(u[0],n[0]),ge(u[1],n[1])}})},jn="__focusNodeAdjacency",Qn="__unfocusNodeAdjacency",Ni=["itemStyle","opacity"],sh=["lineStyle","opacity"];function ww(t,e){var r=t.getVisual("opacity");return r??t.getModel().get(e)}function lh(t,e,r){var a=t.getGraphicEl(),i=ww(t,e);r!=null&&(i==null&&(i=1),i*=r),a.downplay&&a.downplay(),a.traverse(function(n){if(!n.isGroup){var o=n.lineLabelOriginalOpacity;(o==null||r!=null)&&(o=i),n.setStyle("opacity",o)}})}function ki(t,e){var r=ww(t,e),a=t.getGraphicEl();a.traverse(function(i){!i.isGroup&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}ke({type:"graph",init:function(t,e){var r=new Bn,a=new oh,i=this.group;this._controller=new Yn(e.getZr()),this._controllerHost={target:i},i.add(r.group),i.add(a.group),this._symbolDraw=r,this._lineDraw=a,this._firstRender=!0},render:function(t,e,r){var a=this,i=t.coordinateSystem;this._model=t;var n=this._symbolDraw,o=this._lineDraw,s=this.group;if(i.type==="view"){var l={position:i.position,scale:i.scale};this._firstRender?s.attr(l):ft(s,l,t)}sg(t.getGraph(),Bs(t));var u=t.getData();n.updateData(u);var h=t.getEdgeData();o.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,r),clearTimeout(this._layoutTimeout);var f=t.forceLayout,c=t.get("force.layoutAnimation");f&&this._startForceLayoutIteration(f,c),u.eachItemGraphicEl(function(p,m){var y=u.getItemModel(m);p.off("drag").off("dragend");var _=y.get("draggable");_&&p.on("drag",function(){f&&(f.warmUp(),!this._layouting&&this._startForceLayoutIteration(f,c),f.setFixed(m),u.setItemLayout(m,p.position))},this).on("dragend",function(){f&&f.setUnfixed(m)},this),p.setDraggable(_&&f),p[jn]&&p.off("mouseover",p[jn]),p[Qn]&&p.off("mouseout",p[Qn]),y.get("focusNodeAdjacency")&&(p.on("mouseover",p[jn]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:p.dataIndex})}),p.on("mouseout",p[Qn]=function(){a._dispatchUnfocus(r)}))},this),u.graph.eachEdge(function(p){var m=p.getGraphicEl();m[jn]&&m.off("mouseover",m[jn]),m[Qn]&&m.off("mouseout",m[Qn]),p.getModel().get("focusNodeAdjacency")&&(m.on("mouseover",m[jn]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:p.dataIndex})}),m.on("mouseout",m[Qn]=function(){a._dispatchUnfocus(r)}))});var v=t.get("layout")==="circular"&&t.get("circular.rotateLabel"),d=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(p,m){var y=u.getItemModel(m),_=y.get("label.rotate")||0,w=p.getSymbolPath();if(v){var b=u.getItemLayout(m),A=Math.atan2(b[1]-g,b[0]-d);A<0&&(A=Math.PI*2+A);var S=b[0]<d;S&&(A=A-Math.PI);var D=S?"left":"right";Xc(w,{textRotation:-A,textPosition:D,textOrigin:"center"},{textPosition:D})}else Xc(w,{textRotation:_*=Math.PI/180})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var r=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){r._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:r._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,r,a){var i=t.getData(),n=i.graph,o=a.dataIndex,s=a.edgeDataIndex,l=n.getNodeByIndex(o),u=n.getEdgeByIndex(s);!l&&!u||(n.eachNode(function(h){lh(h,Ni,.1)}),n.eachEdge(function(h){lh(h,sh,.1)}),l&&(ki(l,Ni),M(l.edges,function(h){h.dataIndex<0||(ki(h,sh),ki(h.node1,Ni),ki(h.node2,Ni))})),u&&(ki(u,sh),ki(u.node1,Ni),ki(u.node2,Ni)))},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getData().graph;i.eachNode(function(n){lh(n,Ni)}),i.eachEdge(function(n){lh(n,sh)})},_startForceLayoutIteration:function(t,e){var r=this;(function a(){t.step(function(i){r.updateLayout(r._model),(r._layouting=!i)&&(e?r._layoutTimeout=setTimeout(a,16):a())})})()},_updateController:function(t,e,r){var a=this._controller,i=this._controllerHost,n=this.group;if(a.setPointerChecker(function(o,s,l){var u=n.getBoundingRect();return u.applyTransform(n.transform),u.contain(s,l)&&!Ku(o,r,t)}),t.coordinateSystem.type!=="view"){a.disable();return}a.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),a.off("pan").off("zoom").on("pan",function(o){Id(i,o.dx,o.dy),r.dispatchAction({seriesId:t.id,type:"graphRoam",dx:o.dx,dy:o.dy})}).on("zoom",function(o){Ld(i,o.scale,o.originX,o.originY),r.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:o.scale,originX:o.originX,originY:o.originY}),this._updateNodeAndLinkScale(),sg(t.getGraph(),Bs(t)),this._lineDraw.updateLayout()},this)},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),r=Bs(t),a=[r,r];e.eachItemGraphicEl(function(i,n){i.attr("scale",a)})},updateLayout:function(t){sg(t.getGraph(),Bs(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),mt({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),mt({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});var lR={type:"graphRoam",event:"graphRoam",update:"none"};mt(lR,function(t,e){e.eachComponent({mainType:"series",query:t},function(r){var a=r.coordinateSystem,i=Ed(a,t);r.setCenter&&r.setCenter(i.center),r.setZoom&&r.setZoom(i.zoom)})});var uR=function(t){var e=t.findComponents({mainType:"legend"});!e||!e.length||t.eachSeriesByType("graph",function(r){var a=r.getCategoriesData(),i=r.getGraph(),n=i.data,o=a.mapArray(a.getName);n.filterSelf(function(s){var l=n.getItemModel(s),u=l.getShallow("category");if(u!=null){typeof u=="number"&&(u=o[u]);for(var h=0;h<e.length;h++)if(!e[h].isSelected(u))return!1}return!0})},this)},hR=function(t){var e={};t.eachSeriesByType("graph",function(r){var a=r.getCategoriesData(),i=r.getData(),n={};a.each(function(o){var s=a.getName(o);n["ec-"+s]=o;var l=a.getItemModel(o),u=l.get("itemStyle.color")||r.getColorFromPalette(s,e);a.setItemVisual(o,"color",u);for(var h=["opacity","symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++){var c=l.getShallow(h[f],!0);c!=null&&a.setItemVisual(o,h[f],c)}}),a.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){typeof l=="string"&&(l=n["ec-"+l]);for(var u=["color","opacity","symbol","symbolSize","symbolKeepAspect"],h=0;h<u.length;h++)i.getItemVisual(o,u[h],!0)==null&&i.setItemVisual(o,u[h],a.getItemVisual(l,u[h]))}})})};function uh(t){return t instanceof Array||(t=[t,t]),t}var fR=function(t){t.eachSeriesByType("graph",function(e){var r=e.getGraph(),a=e.getEdgeData(),i=uh(e.get("edgeSymbol")),n=uh(e.get("edgeSymbolSize")),o="lineStyle.color".split("."),s="lineStyle.opacity".split(".");a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),a.setVisual("color",e.get(o)),a.setVisual("opacity",e.get(s)),a.each(function(l){var u=a.getItemModel(l),h=r.getEdgeByIndex(l),f=uh(u.getShallow("symbol",!0)),c=uh(u.getShallow("symbolSize",!0)),v=u.get(o),d=u.get(s);switch(v){case"source":v=h.node1.getVisual("color");break;case"target":v=h.node2.getVisual("color");break}f[0]&&h.setVisual("fromSymbol",f[0]),f[1]&&h.setVisual("toSymbol",f[1]),c[0]&&h.setVisual("fromSymbolSize",c[0]),c[1]&&h.setVisual("toSymbolSize",c[1]),h.setVisual("color",v),h.setVisual("opacity",d)})})};function bw(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view")){var r=t.getGraph();r.eachNode(function(a){var i=a.getModel();a.setLayout([+i.get("x"),+i.get("y")])}),Sw(r)}}function Sw(t){t.eachEdge(function(e){var r=e.getModel().get("lineStyle.curveness")||0,a=mr(e.node1.getLayout()),i=mr(e.node2.getLayout()),n=[a,i];+r&&n.push([(a[0]+i[0])/2-(a[1]-i[1])*r,(a[1]+i[1])/2-(i[0]-a[0])*r]),e.setLayout(n)})}var cR=function(t,e){t.eachSeriesByType("graph",function(r){var a=r.get("layout"),i=r.coordinateSystem;if(i&&i.type!=="view"){var n=r.getData(),o=[];M(i.dimensions,function(c){o=o.concat(n.mapDimension(c,!0))});for(var s=0;s<n.count();s++){for(var l=[],u=!1,h=0;h<o.length;h++){var f=n.get(o[h],s);isNaN(f)||(u=!0),l.push(f)}u?n.setItemLayout(s,i.dataToPoint(l)):n.setItemLayout(s,[NaN,NaN])}Sw(n.graph)}else(!a||a==="none")&&bw(r)})},Aw=Math.PI,lg=[];function Tw(t,e){var r=t.coordinateSystem;if(!(r&&r.type!=="view")){var a=r.getBoundingRect(),i=t.getData(),n=i.graph,o=a.width/2+a.x,s=a.height/2+a.y,l=Math.min(a.width,a.height)/2,u=i.count();i.setLayout({cx:o,cy:s}),u&&(vR[e](t,r,n,i,l,o,s,u),n.eachEdge(function(h){var f=h.getModel().get("lineStyle.curveness")||0,c=mr(h.node1.getLayout()),v=mr(h.node2.getLayout()),d,g=(c[0]+v[0])/2,p=(c[1]+v[1])/2;+f&&(f*=3,d=[o*f+g*(1-f),s*f+p*(1-f)]),h.setLayout([c,v,d])}))}}var vR={value:function(t,e,r,a,i,n,o,s){var l=0,u=a.getSum("value"),h=Math.PI*2/(u||s);r.eachNode(function(f){var c=f.getValue("value"),v=h*(u?c:1)/2;l+=v,f.setLayout([i*Math.cos(l)+n,i*Math.sin(l)+o]),l+=v})},symbolSize:function(t,e,r,a,i,n,o,s){var l=0;lg.length=s;var u=Bs(t);r.eachNode(function(c){var v=Vs(c);isNaN(v)&&(v=2),v<0&&(v=0),v*=u;var d=Math.asin(v/2/i);isNaN(d)&&(d=Aw/2),lg[c.dataIndex]=d,l+=d*2});var h=(2*Aw-l)/s/2,f=0;r.eachNode(function(c){var v=h+lg[c.dataIndex];f+=v,c.setLayout([i*Math.cos(f)+n,i*Math.sin(f)+o]),f+=v})}},dR=function(t){t.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&Tw(e,"symbolSize")})},Jn=mo;function gR(t,e,r){for(var a=r.rect,i=a.width,n=a.height,o=[a.x+i/2,a.y+n/2],s=r.gravity==null?.1:r.gravity,l=0;l<t.length;l++){var u=t[l];u.p||(u.p=wa(i*(Math.random()-.5)+o[0],n*(Math.random()-.5)+o[1])),u.pp=mr(u.p),u.edges=null}var h=r.friction==null?.6:r.friction,f=h;return{warmUp:function(){f=h*.8},setFixed:function(c){t[c].fixed=!0},setUnfixed:function(c){t[c].fixed=!1},step:function(c){for(var v=[],d=t.length,g=0;g<e.length;g++){var p=e[g];if(!p.ignoreForceLayout){var m=p.n1,y=p.n2;Jr(v,y.p,m.p);var _=yo(v)-p.d,w=y.w/(m.w+y.w);isNaN(w)&&(w=0),ln(v,v),!m.fixed&&Jn(m.p,m.p,v,w*_*f),!y.fixed&&Jn(y.p,y.p,v,-(1-w)*_*f)}}for(var g=0;g<d;g++){var b=t[g];b.fixed||(Jr(v,o,b.p),Jn(b.p,b.p,v,s*f))}for(var g=0;g<d;g++)for(var m=t[g],A=g+1;A<d;A++){var y=t[A];Jr(v,y.p,m.p);var _=yo(v);_===0&&(hm(v,Math.random()-.5,Math.random()-.5),_=1);var S=(m.rep+y.rep)/_/_;!m.fixed&&Jn(m.pp,m.pp,v,S),!y.fixed&&Jn(y.pp,y.pp,v,-S)}for(var D=[],g=0;g<d;g++){var b=t[g];b.fixed||(Jr(D,b.p,b.pp),Jn(b.p,b.p,D,f),ge(b.pp,b.p))}f=f*.992,c&&c(t,e,f<.01)}}}var pR=function(t){t.eachSeriesByType("graph",function(e){var r=e.coordinateSystem;if(!(r&&r.type!=="view"))if(e.get("layout")==="force"){var a=e.preservedPoints||{},i=e.getGraph(),n=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?n.each(function(_){var w=n.getId(_);n.setItemLayout(_,a[w]||[NaN,NaN])}):!l||l==="none"?bw(e):l==="circular"&&Tw(e,"value");var u=n.getDataExtent("value"),h=o.getDataExtent("value"),f=s.get("repulsion"),c=s.get("edgeLength");z(f)||(f=[f,f]),z(c)||(c=[c,c]),c=[c[1],c[0]];var v=n.mapArray("value",function(_,w){var b=n.getItemLayout(w),A=Nt(_,u,f);return isNaN(A)&&(A=(f[0]+f[1])/2),{w:A,rep:A,fixed:n.getItemModel(w).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),d=o.mapArray("value",function(_,w){var b=i.getEdgeByIndex(w),A=Nt(_,h,c);isNaN(A)&&(A=(c[0]+c[1])/2);var S=b.getModel();return{n1:v[b.node1.dataIndex],n2:v[b.node2.dataIndex],d:A,curveness:S.get("lineStyle.curveness")||0,ignoreForceLayout:S.get("ignoreForceLayout")}}),r=e.coordinateSystem,g=r.getBoundingRect(),p=gR(v,d,{rect:g,gravity:s.get("gravity"),friction:s.get("friction")}),m=p.step;p.step=function(_){for(var w=0,b=v.length;w<b;w++)v[w].fixed&&ge(v[w].p,i.getNodeByIndex(w).getLayout());m(function(A,S,D){for(var I=0,L=A.length;I<L;I++)A[I].fixed||i.getNodeByIndex(I).setLayout(A[I].p),a[n.getId(I)]=A[I].p;for(var I=0,L=S.length;I<L;I++){var P=S[I],R=i.getEdgeByIndex(I),E=P.n1.p,Z=P.n2.p,W=R.getLayout();W=W?W.slice():[],W[0]=W[0]||[],W[1]=W[1]||[],ge(W[0],E),ge(W[1],Z),+P.curveness&&(W[2]=[(E[0]+Z[0])/2-(E[1]-Z[1])*P.curveness,(E[1]+Z[1])/2-(Z[0]-E[0])*P.curveness]),R.setLayout(W)}_&&_(D)})},e.forceLayout=p,e.preservedPoints=a,p.step()}else e.forceLayout=null})};function mR(t,e,r){var a=t.getBoxLayoutParams();return a.aspect=r,qt(a,{width:e.getWidth(),height:e.getHeight()})}var yR=function(t,e){var r=[];return t.eachSeriesByType("graph",function(a){var i=a.get("coordinateSystem");if(!i||i==="view"){var n=a.getData(),o=n.mapArray(function(p){var m=n.getItemModel(p);return[+m.get("x"),+m.get("y")]}),s=[],l=[];Po(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),h=mR(a,e,u);isNaN(u)&&(s=[h.x,h.y],l=[h.x+h.width,h.y+h.height]);var f=l[0]-s[0],c=l[1]-s[1],v=h.width,d=h.height,g=a.coordinateSystem=new Xa;g.zoomLimit=a.get("scaleLimit"),g.setBoundingRect(s[0],s[1],f,c),g.setViewRect(h.x,h.y,v,d),g.setCenter(a.get("center")),g.setZoom(a.get("zoom")),r.push(g)}}),r};$e(uR),Rt(Ii("graph","circle",null)),Rt(hR),Rt(fR),Gt(cR),Gt(Wr.VISUAL.POST_CHART_LAYOUT,dR),Gt(pR),Hv("graphView",{create:yR});var $5=Vt.extend({type:"series.gauge",getInitialData:function(t,e){return Un(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),_R=pt.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var r=Math.cos,a=Math.sin,i=e.r,n=e.width,o=e.angle,s=e.x-r(o)*n*(n>=i/3?1:2),l=e.y-a(o)*n*(n>=i/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+r(o)*n,e.y+a(o)*n),t.lineTo(e.x+r(e.angle)*i,e.y+a(e.angle)*i),t.lineTo(e.x-r(o)*n,e.y-a(o)*n),t.lineTo(s,l)}});function xR(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=H(r[0],e.getWidth()),s=H(r[1],e.getHeight()),l=H(t.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Cw(t,e){return e&&(typeof e=="string"?t=e.replace("{value}",t??""):typeof e=="function"&&(t=e(t))),t}var wR=Math.PI*2,Z5=ue.extend({type:"gauge",render:function(t,e,r){this.group.removeAll();var a=t.get("axisLine.lineStyle.color"),i=xR(t,r);this._renderMain(t,e,r,a,i)},dispose:function(){},_renderMain:function(t,e,r,a,i){for(var n=this.group,o=t.getModel("axisLine"),s=o.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,f=(h-u)%wR,c=u,v=s.get("width"),d=o.get("show"),g=0;d&&g<a.length;g++){var p=Math.min(Math.max(a[g][0],0),1),h=u+f*p,m=new Ar({shape:{startAngle:c,endAngle:h,cx:i.cx,cy:i.cy,clockwise:l,r0:i.r-v,r:i.r},silent:!0});m.setStyle({fill:a[g][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),n.add(m),c=h}var y=function(w){if(w<=0)return a[0][1];for(var b=0;b<a.length;b++)if(a[b][0]>=w&&(b===0?0:a[b-1][0])<w)return a[b][1];return a[b-1][1]};if(!l){var _=u;u=h,h=_}this._renderTicks(t,e,r,y,i,u,h,l),this._renderPointer(t,e,r,y,i,u,h,l),this._renderTitle(t,e,r,y,i),this._renderDetail(t,e,r,y,i)},_renderTicks:function(t,e,r,a,i,n,o,s){for(var l=this.group,u=i.cx,h=i.cy,f=i.r,c=+t.get("min"),v=+t.get("max"),d=t.getModel("splitLine"),g=t.getModel("axisTick"),p=t.getModel("axisLabel"),m=t.get("splitNumber"),y=g.get("splitNumber"),_=H(d.get("length"),f),w=H(g.get("length"),f),b=n,A=(o-n)/m,S=A/y,D=d.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),L=0;L<=m;L++){var P=Math.cos(b),R=Math.sin(b);if(d.get("show")){var E=new ye({shape:{x1:P*f+u,y1:R*f+h,x2:P*(f-_)+u,y2:R*(f-_)+h},style:D,silent:!0});D.stroke==="auto"&&E.setStyle({stroke:a(L/m)}),l.add(E)}if(p.get("show")){var Z=Cw(re(L/m*(v-c)+c),p.get("formatter")),W=p.get("distance"),$=a(L/m);l.add(new dt({style:$t({},p,{text:Z,x:P*(f-_-W)+u,y:R*(f-_-W)+h,textVerticalAlign:R<-.4?"top":R>.4?"bottom":"middle",textAlign:P<-.4?"left":P>.4?"right":"center"},{autoColor:$}),silent:!0}))}if(g.get("show")&&L!==m){for(var X=0;X<=y;X++){var P=Math.cos(b),R=Math.sin(b),K=new ye({shape:{x1:P*f+u,y1:R*f+h,x2:P*(f-w)+u,y2:R*(f-w)+h},silent:!0,style:I});I.stroke==="auto"&&K.setStyle({stroke:a((L+X/y)/m)}),l.add(K),b+=S}b-=S}else b+=A}},_renderPointer:function(t,e,r,a,i,n,o,s){var l=this.group,u=this._data;if(!t.get("pointer.show")){u&&u.eachItemGraphicEl(function(d){l.remove(d)});return}var h=[+t.get("min"),+t.get("max")],f=[n,o],c=t.getData(),v=c.mapDimension("value");c.diff(u).add(function(d){var g=new _R({shape:{angle:n}});Se(g,{shape:{angle:Nt(c.get(v,d),h,f,!0)}},t),l.add(g),c.setItemGraphicEl(d,g)}).update(function(d,g){var p=u.getItemGraphicEl(g);ft(p,{shape:{angle:Nt(c.get(v,d),h,f,!0)}},t),l.add(p),c.setItemGraphicEl(d,p)}).remove(function(d){var g=u.getItemGraphicEl(d);l.remove(g)}).execute(),c.eachItemGraphicEl(function(d,g){var p=c.getItemModel(g),m=p.getModel("pointer");d.setShape({x:i.cx,y:i.cy,width:H(m.get("width"),i.r),r:H(m.get("length"),i.r)}),d.useStyle(p.getModel("itemStyle").getItemStyle()),d.style.fill==="auto"&&d.setStyle("fill",a(Nt(c.get(v,g),h,[0,1],!0))),Ot(d,p.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,r,a,i){var n=t.getData(),o=n.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=i.cx+H(l[0],i.r),h=i.cy+H(l[1],i.r),f=+t.get("min"),c=+t.get("max"),v=t.getData().get(o,0),d=a(Nt(v,[f,c],[0,1],!0));this.group.add(new dt({silent:!0,style:$t({},s,{x:u,y:h,text:n.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})}))}},_renderDetail:function(t,e,r,a,i){var n=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(n.get("show")){var l=n.get("offsetCenter"),u=i.cx+H(l[0],i.r),h=i.cy+H(l[1],i.r),f=H(n.get("width"),i.r),c=H(n.get("height"),i.r),v=t.getData(),d=v.get(v.mapDimension("value"),0),g=a(Nt(d,[o,s],[0,1],!0));this.group.add(new dt({silent:!0,style:$t({},n,{x:u,y:h,text:Cw(d,n.get("formatter")),textWidth:isNaN(f)?null:f,textHeight:isNaN(c)?null:c,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Dw=Mu({type:"series.funnel",init:function(t){Dw.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return Un(this,{coordDimensions:["value"],encodeDefaulter:ot(cv,this)})},_defaultLabelLine:function(t){fi(t,"labelLine",["show"]);var e=t.labelLine,r=t.emphasis.labelLine;e.show=e.show&&t.label.show,r.show=r.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),r=Dw.superCall(this,"getDataParams",t),a=e.mapDimension("value"),i=e.getSum(a);return r.percent=i?+(e.get(a,t)/i*100).toFixed(2):0,r.$vars.push("percent"),r},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});function ug(t,e){q.call(this);var r=new Ge,a=new ir,i=new dt;this.add(r),this.add(a),this.add(i),this.highDownOnUpdate=function(n,o){o==="emphasis"?(a.ignore=a.hoverIgnore,i.ignore=i.hoverIgnore):(a.ignore=a.normalIgnore,i.ignore=i.normalIgnore)},this.updateData(t,e,!0)}var Mw=ug.prototype,bR=["itemStyle","opacity"];Mw.updateData=function(t,e,r){var a=this.childAt(0),i=t.hostModel,n=t.getItemModel(e),o=t.getItemLayout(e),s=t.getItemModel(e).get(bR);s=s??1,a.useStyle({}),r?(a.setShape({points:o.points}),a.setStyle({opacity:0}),Se(a,{style:{opacity:s}},i,e)):ft(a,{style:{opacity:s},shape:{points:o.points}},i,e);var l=n.getModel("itemStyle"),u=t.getItemVisual(e,"color");a.setStyle(J({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),a.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Ot(this)},Mw._updateLabel=function(t,e){var r=this.childAt(1),a=this.childAt(2),i=t.hostModel,n=t.getItemModel(e),o=t.getItemLayout(e),s=o.label,c=t.getItemVisual(e,"color");ft(r,{shape:{points:s.linePoints||s.linePoints}},i,e),ft(a,{style:{x:s.x,y:s.y}},i,e),a.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var l=n.getModel("label"),u=n.getModel("emphasis.label"),h=n.getModel("labelLine"),f=n.getModel("emphasis.labelLine"),c=t.getItemVisual(e,"color");Fe(a.style,a.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:c,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),a.ignore=a.normalIgnore=!l.get("show"),a.hoverIgnore=!u.get("show"),r.ignore=r.normalIgnore=!h.get("show"),r.hoverIgnore=!f.get("show"),r.setStyle({stroke:c}),r.setStyle(h.getModel("lineStyle").getLineStyle()),r.hoverStyle=f.getModel("lineStyle").getLineStyle()},It(ug,q);var Y5=ue.extend({type:"funnel",render:function(t,e,r){var a=t.getData(),i=this._data,n=this.group;a.diff(i).add(function(o){var s=new ug(a,o);a.setItemGraphicEl(o,s),n.add(s)}).update(function(o,s){var l=i.getItemGraphicEl(s);l.updateData(a,o),n.add(l),a.setItemGraphicEl(o,l)}).remove(function(o){var s=i.getItemGraphicEl(o);n.remove(s)}).execute(),this._data=a},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function SR(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function AR(t,e){for(var r=t.mapDimension("value"),a=t.mapArray(r,function(l){return l}),i=[],n=e==="ascending",o=0,s=t.count();o<s;o++)i[o]=o;return typeof e=="function"?i.sort(e):e!=="none"&&i.sort(function(l,u){return n?a[l]-a[u]:a[u]-a[l]}),i}function TR(t){t.each(function(e){var r=t.getItemModel(e),a=r.getModel("label"),i=a.get("position"),n=r.getModel("labelLine"),o=t.getItemLayout(e),s=o.points,l=i==="inner"||i==="inside"||i==="center"||i==="insideLeft"||i==="insideRight",u,h,f,c;if(l)i==="insideLeft"?(h=(s[0][0]+s[3][0])/2+5,f=(s[0][1]+s[3][1])/2,u="left"):i==="insideRight"?(h=(s[1][0]+s[2][0])/2-5,f=(s[1][1]+s[2][1])/2,u="right"):(h=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,f=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,u="center"),c=[[h,f],[h,f]];else{var v,d,g,p=n.get("length");i==="left"?(v=(s[3][0]+s[0][0])/2,d=(s[3][1]+s[0][1])/2,g=v-p,h=g-5,u="right"):i==="right"?(v=(s[1][0]+s[2][0])/2,d=(s[1][1]+s[2][1])/2,g=v+p,h=g+5,u="left"):i==="rightTop"?(v=s[1][0],d=s[1][1],g=v+p,h=g+5,u="top"):i==="rightBottom"?(v=s[2][0],d=s[2][1],g=v+p,h=g+5,u="bottom"):i==="leftTop"?(v=s[0][0],d=s[1][1],g=v-p,h=g-5,u="right"):i==="leftBottom"?(v=s[3][0],d=s[2][1],g=v-p,h=g-5,u="right"):(v=(s[1][0]+s[2][0])/2,d=(s[1][1]+s[2][1])/2,g=v+p,h=g+5,u="left");var m=d;c=[[v,d],[g,m]],f=m}o.label={linePoints:c,x:h,y:f,verticalAlign:"middle",textAlign:u,inside:l}})}var CR=function(t,e,r){t.eachSeriesByType("funnel",function(a){var i=a.getData(),n=i.mapDimension("value"),o=a.get("sort"),s=SR(a,e),l=AR(i,o),u=[H(a.get("minSize"),s.width),H(a.get("maxSize"),s.width)],h=i.getDataExtent(n),f=a.get("min"),c=a.get("max");f==null&&(f=Math.min(h[0],0)),c==null&&(c=h[1]);var v=a.get("funnelAlign"),d=a.get("gap"),g=(s.height-d*(i.count()-1))/i.count(),p=s.y,m=function(I,L){var P=i.get(n,I)||0,R=Nt(P,[f,c],u,!0),E;switch(v){case"left":E=s.x;break;case"center":E=s.x+(s.width-R)/2;break;case"right":E=s.x+s.width-R;break}return[[E,L],[E+R,L]]};o==="ascending"&&(g=-g,d=-d,p+=s.height,l=l.reverse());for(var y=0;y<l.length;y++){var _=l[y],w=l[y+1],b=i.getItemModel(_),A=b.get("itemStyle.height");A==null?A=g:(A=H(A,s.height),o==="ascending"&&(A=-A));var S=m(_,p),D=m(w,p+A);p+=A+d,i.setItemLayout(_,{points:S.concat(D.slice().reverse())})}TR(i)})};Rt(Zu("funnel")),Gt(CR),$e(bs("funnel"));var DR=function(t){MR(t),IR(t)};function MR(t){if(!t.parallel){var e=!1;M(t.series,function(r){r&&r.type==="parallel"&&(e=!0)}),e&&(t.parallel=[{}])}}function IR(t){var e=me(t.parallelAxis);M(e,function(r){if(!!lt(r)){var a=r.parallelIndex||0,i=me(t.parallel)[a];i&&i.parallelAxisDefault&&ut(r,i.parallelAxisDefault,!1)}})}var hh=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.axisIndex=i};hh.prototype={constructor:hh,model:null,isHorizontal:function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"}},It(hh,Qt);var zi=function(t,e,r,a,i,n){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=to(i,[0,o])),n!=null&&(n=Math.max(n,i??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=to(s,[0,o]),i=n=to(s,[i,n]),a=0}e[0]=to(e[0],r),e[1]=to(e[1],r);var l=hg(e,a);e[a]+=t;var u=i||0,h=r.slice();l.sign<0?h[0]+=u:h[1]-=u,e[a]=to(e[a],h);var f=hg(e,a);i!=null&&(f.sign!==l.sign||f.span<i)&&(e[1-a]=e[a]+l.sign*i);var f=hg(e,a);return n!=null&&f.span>n&&(e[1-a]=e[a]+f.sign*n),e};function hg(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function to(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var fg=M,Iw=Math.min,Lw=Math.max,Pw=Math.floor,LR=Math.ceil,Ew=re,PR=Math.PI;function cg(t,e,r){this._axesMap=ht(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,r)}cg.prototype={type:"parallel",constructor:cg,_init:function(t,e,r){var a=t.dimensions,i=t.parallelAxisIndex;fg(a,function(n,o){var s=i[o],l=e.getComponent("parallelAxis",s),u=this._axesMap.set(n,new hh(n,zn(l),[0,0],l.get("type"),s)),h=u.type==="category";u.onBand=h&&l.get("boundaryGap"),u.inverse=l.get("inverse"),l.axis=u,u.model=l,u.coordinateSystem=l.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),r=e.axisBase,a=e.layoutBase,i=e.pixelDimIndex,n=t[1-i],o=t[i];return n>=r&&n<=r+e.axisLength&&o>=a&&o<=a+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(r){if(!!t.contains(r,e)){var a=r.getData();fg(this.dimensions,function(i){var n=this._axesMap.get(i);n.scale.unionExtentFromData(a,a.mapDimension(i)),Fa(n.scale,n.model)},this)}},this)},resize:function(t,e){this._rect=qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t=this._model,e=this._rect,r=["x","y"],a=["width","height"],i=t.get("layout"),n=i==="horizontal"?0:1,o=e[a[n]],s=[0,o],l=this.dimensions.length,u=fh(t.get("axisExpandWidth"),s),h=fh(t.get("axisExpandCount")||0,[0,l]),f=t.get("axisExpandable")&&l>3&&l>h&&h>1&&u>0&&o>0,c=t.get("axisExpandWindow"),v;if(c)v=fh(c[1]-c[0],s),c[1]=c[0]+v;else{v=fh(u*(h-1),s);var d=t.get("axisExpandCenter")||Pw(l/2);c=[u*d-v/2],c[1]=c[0]+v}var g=(o-v)/(l-h);g<3&&(g=0);var p=[Pw(Ew(c[0]/u,1))+1,LR(Ew(c[1]/u,1))-1],m=g/u*c[0];return{layout:i,pixelDimIndex:n,layoutBase:e[r[n]],layoutLength:o,axisBase:e[r[1-n]],axisLength:e[a[1-n]],axisExpandable:f,axisExpandWidth:u,axisCollapseWidth:g,axisExpandWindow:c,axisCount:l,winInnerIndices:p,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,r=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;e.each(function(n){var o=[0,a.axisLength],s=n.inverse?1:0;n.setExtent(o[s],o[1-s])}),fg(r,function(n,o){var s=(a.axisExpandable?RR:ER)(o,a),l={horizontal:{x:s.position,y:a.axisLength},vertical:{x:0,y:s.position}},u={horizontal:PR/2,vertical:0},h=[l[i].x+t.x,l[i].y+t.y],f=u[i],c=Ie();aa(c,c,f),yr(c,c,h),this._axesLayout[n]={position:h,rotation:f,transform:c,axisNameAvailableWidth:s.axisNameAvailableWidth,axisLabelShow:s.axisLabelShow,nameTruncateMaxWidth:s.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,r,a){r==null&&(r=0),a==null&&(a=t.count());var i=this._axesMap,n=this.dimensions,o=[],s=[];M(n,function(g){o.push(t.mapDimension(g)),s.push(i.get(g).model)});for(var l=this.hasAxisBrushed(),u=r;u<a;u++){var h;if(!l)h="normal";else{h="active";for(var f=t.getValues(o,u),c=0,v=n.length;c<v;c++){var d=s[c].getActiveState(f[c]);if(d==="inactive"){h="inactive";break}}}e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,r=!1,a=0,i=t.length;a<i;a++)e.get(t[a]).model.getActiveState()!=="normal"&&(r=!0);return r},axisCoordToPoint:function(t,e){var r=this._axesLayout[e];return Hr([t,0],r.transform)},getAxisLayout:function(t){return rt(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),r=e.pixelDimIndex,a=e.axisExpandWindow.slice(),i=a[1]-a[0],n=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:a};var o=t[r]-e.layoutBase-e.axisExpandWindow0Pos,s,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),f=h[0]!=null;if(u)f&&u&&o<i*h[0]?(l="jump",s=o-i*h[2]):f&&u&&o>i*(1-h[0])?(l="jump",s=o-i*(1-h[2])):(s=o-i*h[1])>=0&&(s=o-i*(1-h[1]))<=0&&(s=0),s*=e.axisExpandWidth/u,s?zi(s,a,n,"all"):l="none";else{var i=a[1]-a[0],c=n[1]*o/i;a=[Lw(0,c-i/2)],a[1]=Iw(n[1],a[0]+i),a[0]=a[1]-i}return{axisExpandWindow:a,behavior:l}}};function fh(t,e){return Iw(Lw(t,e[0]),e[1])}function ER(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function RR(t,e){var r=e.layoutLength,a=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,h;return t<o[0]?(s=t*n,h=n):t<=o[1]?(s=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],l=a,u=!0):(s=r-(i-1-t)*n,h=n),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:h}}function OR(t,e){var r=[];return t.eachComponent("parallel",function(a,i){var n=new cg(a,t,e);n.name="parallel_"+i,n.resize(a,e),a.coordinateSystem=n,n.model=a,r.push(n)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var i=t.queryComponents({mainType:"parallel",index:a.get("parallelIndex"),id:a.get("parallelId")})[0];a.coordinateSystem=i.coordinateSystem}}),r}_e.register("parallel",{create:OR});var Rw=wt.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return _n([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=rt(t);if(e)for(var r=e.length-1;r>=0;r--)_i(e[r])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(t==null||isNaN(t))return"inactive";if(e.length===1){var r=e[0];if(r[0]<=t&&t<=r[1])return"active"}else for(var a=0,i=e.length;a<i;a++)if(e[a][0]<=t&&t<=e[a][1])return"active";return"inactive"}}),NR={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};ut(Rw.prototype,Di);function kR(t,e){return e.type||(e.data?"category":"value")}Gn("parallel",Rw,kR,NR),wt.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,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},init:function(){wt.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&ut(e,t,!0),this._initDimensions()},contains:function(t,e){var r=t.get("parallelIndex");return r!=null&&e.getComponent("parallel",r)===this},setAxisExpand:function(t){M(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],r=ee(this.dependentModels.parallelAxis,function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);M(r,function(a){t.push("dim"+a.get("dim")),e.push(a.componentIndex)})}});var zR={type:"axisAreaSelect",event:"axisAreaSelected"};mt(zR,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(r){r.axis.model.setActiveIntervals(t.intervals)})}),mt("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(r){r.setAxisExpand(t)})});var Ka=ot,Xr=M,BR=V,Gs=Math.min,eo=Math.max,VR=Math.pow,GR=1e4,HR=6,FR=6,Ow="globalPan",WR={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},UR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Nw={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},$R=0;function ro(t){T&&gt(t),le.call(this),this._zr=t,this.group=new q,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,T&&this._mounted,this._uid="brushController_"+$R++,this._handlers={},Xr(eO,function(e,r){this._handlers[r]=it(e,this)},this)}ro.prototype={constructor:ro,enableBrush:function(t){return T&&gt(this._mounted),this._brushType&&YR(this),t.brushType&&ZR(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};M(t,function(r){e[r.panelId]=rt(r)})}else this._panels=null;return this},mount:function(t){t=t||{},T&&(this._mounted=!0),this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){Xr(this._covers,t,e)},updateCovers:function(t){T&&gt(this._mounted),t=V(t,function(h){return ut(rt(Nw),h,!0)});var e="\0-brush-index-",r=this._covers,a=this._covers=[],i=this,n=this._creatingCover;return new ha(r,t,s,o).add(l).update(l).remove(u).execute(),this;function o(h,f){return(h.id!=null?h.id:e+f)+"-"+h.brushType}function s(h,f){return o(h.__brushOption,f)}function l(h,f){var c=t[h];if(f!=null&&r[f]===n)a[h]=r[f];else{var v=a[h]=f!=null?(r[f].__brushOption=c,r[f]):zw(i,kw(i,c));vg(i,v)}}function u(h){r[h]!==n&&i.group.remove(r[h])}},unmount:function(){if(!(T&&!this._mounted))return this.enableBrush(!1),pg(this),this._zr.remove(this.group),T&&(this._mounted=!1),this},dispose:function(){this.unmount(),this.off()}},Dt(ro,le);function ZR(t,e){var r=t._zr;t._enableGlobalPan||HP(r,Ow,t._uid),XR(r,t._handlers),t._brushType=e.brushType,t._brushOption=ut(rt(Nw),e,!0)}function YR(t){var e=t._zr;FP(e,Ow,t._uid),qR(e,t._handlers),t._brushType=t._brushOption=null}function XR(t,e){Xr(e,function(r,a){t.on(a,r)})}function qR(t,e){Xr(e,function(r,a){t.off(a,r)})}function kw(t,e){var r=ch[e.brushType].createCover(t,e);return r.__brushOption=e,Vw(r,e),t.group.add(r),r}function zw(t,e){var r=dg(e);return r.endCreating&&(r.endCreating(t,e),Vw(e,e.__brushOption)),e}function Bw(t,e){var r=e.__brushOption;dg(e).updateCoverShape(t,e,r.range,r)}function Vw(t,e){var r=e.z;r==null&&(r=GR),t.traverse(function(a){a.z=r,a.z2=r})}function vg(t,e){dg(e).updateCommon(t,e),Bw(t,e)}function dg(t){return ch[t.__brushOption.brushType]}function gg(t,e,r){var a=t._panels;if(!a)return!0;var i,n=t._transform;return Xr(a,function(o){o.isTargetByCursor(e,r,n)&&(i=o)}),i}function Gw(t,e){var r=t._panels;if(!r)return!0;var a=e.__brushOption.panelId;return a!=null?r[a]:!0}function pg(t){var e=t._covers,r=e.length;return Xr(e,function(a){t.group.remove(a)},t),e.length=0,!!r}function Bi(t,e){var r=BR(t._covers,function(a){var i=a.__brushOption,n=rt(i.range);return{brushType:i.brushType,panelId:i.panelId,range:n}});t.trigger("brush",r,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function KR(t){var e=t._track;if(!e.length)return!1;var r=e[e.length-1],a=e[0],i=r[0]-a[0],n=r[1]-a[1],o=VR(i*i+n*n,.5);return o>HR}function Hw(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Fw(t,e,r,a){var i=new q;return i.add(new xt({name:"main",style:yg(r),silent:!0,draggable:!0,cursor:"move",drift:Ka(t,e,i,"nswe"),ondragend:Ka(Bi,e,{isEnd:!0})})),Xr(a,function(n){i.add(new xt({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ka(t,e,i,n),ondragend:Ka(Bi,e,{isEnd:!0})}))}),i}function Ww(t,e,r,a){var i=a.brushStyle.lineWidth||0,n=eo(i,FR),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,h=r[0][1],f=r[1][1],c=h-n+i/2,v=f-n+i/2,d=h-o,g=f-s,p=d+i,m=g+i;da(t,e,"main",o,s,d,g),a.transformable&&(da(t,e,"w",l,u,n,m),da(t,e,"e",c,u,n,m),da(t,e,"n",l,u,p,n),da(t,e,"s",l,v,p,n),da(t,e,"nw",l,u,n,n),da(t,e,"ne",c,u,n,n),da(t,e,"sw",l,v,n,n),da(t,e,"se",c,v,n,n))}function mg(t,e){var r=e.__brushOption,a=r.transformable,i=e.childAt(0);i.useStyle(yg(r)),i.attr({silent:!a,cursor:a?"move":"default"}),Xr(["w","e","n","s","se","sw","ne","nw"],function(n){var o=e.childOfName(n),s=_g(t,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?UR[s]+"-resize":null})})}function da(t,e,r,a,i,n,o){var s=e.childOfName(r);s&&s.setShape(JR(xg(t,e,[[a,i],[a+n,i+o]])))}function yg(t){return J({strokeNoScale:!0},t.brushStyle)}function Uw(t,e,r,a){var i=[Gs(t,r),Gs(e,a)],n=[eo(t,r),eo(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function jR(t){return yi(t.group)}function _g(t,e){if(e.length>1){e=e.split("");var r=[_g(t,e[0]),_g(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}else{var a={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},r=Kc(a[e],jR(t));return i[r]}}function $w(t,e,r,a,i,n,o,s){var l=a.__brushOption,u=t(l.range),h=Zw(r,n,o);Xr(i.split(""),function(f){var c=WR[f];u[c[0]][c[1]]+=h[c[0]]}),l.range=e(Uw(u[0][0],u[1][0],u[0][1],u[1][1])),vg(r,a),Bi(r,{isEnd:!1})}function QR(t,e,r,a,i){var n=e.__brushOption.range,o=Zw(t,r,a);Xr(n,function(s){s[0]+=o[0],s[1]+=o[1]}),vg(t,e),Bi(t,{isEnd:!1})}function Zw(t,e,r){var a=t.group,i=a.transformCoordToLocal(e,r),n=a.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function xg(t,e,r){var a=Gw(t,e);return a&&a!==!0?a.clipPath(r,t._transform):rt(r)}function JR(t){var e=Gs(t[0][0],t[1][0]),r=Gs(t[0][1],t[1][1]),a=eo(t[0][0],t[1][0]),i=eo(t[0][1],t[1][1]);return{x:e,y:r,width:a-e,height:i-r}}function tO(t,e,r){if(!(!t._brushType||rO(t,e))){var a=t._zr,i=t._covers,n=gg(t,e,r);if(!t._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(n&&(n===!0||s.panelId===n.panelId)&&ch[s.brushType].contain(i[o],r[0],r[1]))return}n&&a.setCursorStyle("crosshair")}}function wg(t){var e=t.event;e.preventDefault&&e.preventDefault()}function bg(t,e,r){return t.childOfName("main").contain(e,r)}function Yw(t,e,r,a){var i=t._creatingCover,n=t._creatingPanel,o=t._brushOption,s;if(t._track.push(r.slice()),KR(t)||i){if(n&&!i){o.brushMode==="single"&&pg(t);var l=rt(o);l.brushType=Xw(l.brushType,n),l.panelId=n===!0?null:n.panelId,i=t._creatingCover=kw(t,l),t._covers.push(i)}if(i){var u=ch[Xw(t._brushType,n)],h=i.__brushOption;h.range=u.getCreatingRange(xg(t,i,t._track)),a&&(zw(t,i),u.updateCommon(t,i)),Bw(t,i),s={isEnd:a}}}else a&&o.brushMode==="single"&&o.removeOnClick&&gg(t,e,r)&&pg(t)&&(s={isEnd:a,removeOnClick:!0});return s}function Xw(t,e){return t==="auto"?(T&&gt(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}var eO={mousedown:function(t){if(this._dragging)qw(this,t);else if(!t.target||!t.target.draggable){wg(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var r=this._creatingPanel=gg(this,t,e);r&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,r=t.offsetY,a=this.group.transformCoordToLocal(e,r);if(tO(this,t,a),this._dragging){wg(t);var i=Yw(this,t,a,!1);i&&Bi(this,i)}},mouseup:function(t){qw(this,t)}};function qw(t,e){if(t._dragging){wg(e);var r=e.offsetX,a=e.offsetY,i=t.group.transformCoordToLocal(r,a),n=Yw(t,e,i,!0);t._dragging=!1,t._track=[],t._creatingCover=null,n&&Bi(t,n)}}function rO(t,e,r){var a=t._zr;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}var ch={lineX:Kw(0),lineY:Kw(1),rect:{createCover:function(t,e){return Fw(Ka($w,function(r){return r},function(r){return r}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Hw(t);return Uw(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,a){Ww(t,e,r,a)},updateCommon:mg,contain:bg},polygon:{createCover:function(t,e){var r=new q;return r.add(new ir({name:"main",style:yg(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Ge({name:"main",draggable:!0,drift:Ka(QR,t,e),ondragend:Ka(Bi,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,a){e.childAt(0).setShape({points:xg(t,e,r)})},updateCommon:mg,contain:bg}};function Kw(t){return{createCover:function(e,r){return Fw(Ka($w,function(a){var i=[a,[0,100]];return t&&i.reverse(),i},function(a){return a[t]}),e,r,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var r=Hw(e),a=Gs(r[0][t],r[1][t]),i=eo(r[0][t],r[1][t]);return[a,i]},updateCoverShape:function(e,r,a,i){var n,o=Gw(e,r);if(o!==!0&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[a,n];t&&l.reverse(),Ww(e,r,l,i)},updateCommon:mg,contain:bg}}function jw(t){return t=Sg(t),function(e,r){return hy(e,t)}}function Qw(t,e){return t=Sg(t),function(r){var a=e??r,i=a?t.width:t.height,n=a?t.x:t.y;return[n,n+(i||0)]}}function Jw(t,e,r){return t=Sg(t),function(a,i,n){return t.contain(i[0],i[1])&&!Ku(a,e,r)}}function Sg(t){return vt.create(t)}var aO=["axisLine","axisTickLabel","axisName"],iO=he({type:"parallelAxis",init:function(t,e){iO.superApply(this,"init",arguments),(this._brushController=new ro(e.getZr())).on("brush",it(this._onBrush,this))},render:function(t,e,r,a){if(!nO(t,e,a)){this.axisModel=t,this.api=r,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),!!t.get("show")){var n=sO(t,e),o=n.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,h=o.getAxisLayout(u),f=et({strokeContainThreshold:l},h),c=new ze(t,f);M(aO,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(f,s,t,n,l,r);var v=a&&a.animation===!1?null:t;au(i,this._axisGroup,v)}}},_refreshBrushController:function(t,e,r,a,i,n){var o=r.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,Math.abs(s)*.1),u=vt.create({x:o[0],y:-i/2,width:s,height:i});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:jw(u),isTargetByCursor:Jw(u,n,a),getLinearBrushOtherExtent:Qw(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(oO(r))},_onBrush:function(t,e){var r=this.axisModel,a=r.axis,i=V(t,function(n){return[a.coordToData(n.range[0],!0),a.coordToData(n.range[1],!0)]});(!r.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:r.id,intervals:i})},dispose:function(){this._brushController.dispose()}});function nO(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function oO(t){var e=t.axis;return V(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function sO(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var lO=5;he({type:"parallel",render:function(t,e,r){this._model=t,this._api=r,this._handlers||(this._handlers={},M(uO,function(a,i){r.getZr().on(i,this._handlers[i]=it(a,this))},this)),es(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){M(this._handlers,function(r,a){e.getZr().off(a,r)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(et({type:"parallelAxisExpand"},t))}});var uO={mousedown:function(t){Ag(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Ag(this,"click")&&e){var r=[t.offsetX,t.offsetY],a=Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2);if(a>lO)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!Ag(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),a=r.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:a==="jump"?null:!1})}}};function Ag(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}we(DR),Vt.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var r=this.getSource();return hO(r,this),ca(r,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,r=this.getData(),a=[];return e.eachActiveState(r,function(i,n){t===i&&a.push(r.getRawIndex(n))}),a},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});function hO(t,e){if(!t.encodeDefine){var r=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!!r){var a=t.encodeDefine=ht();M(r.dimensions,function(i){var n=fO(i);a.set(i,n)})}}}function fO(t){return+t.replace("dim","")}var tb=.3,X5=ue.extend({type:"parallel",init:function(){this._dataGroup=new q,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,r,a){var i=this._dataGroup,n=t.getData(),o=this._data,s=t.coordinateSystem,l=s.dimensions,u=ab(t);n.diff(o).add(h).update(f).remove(c).execute();function h(d){var g=rb(n,i,d,l,s);Tg(g,n,d,u)}function f(d,g){var p=o.getItemGraphicEl(g),m=eb(n,d,l,s);n.setItemGraphicEl(d,p);var y=a&&a.animation===!1?null:t;ft(p,{shape:{points:m}},y,d),Tg(p,n,d,u)}function c(d){var g=o.getItemGraphicEl(d);i.remove(g)}if(!this._initialized){this._initialized=!0;var v=cO(s,t,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(v)}this._data=n},incrementalPrepareRender:function(t,e,r){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,r){for(var a=e.getData(),i=e.coordinateSystem,n=i.dimensions,o=ab(e),s=t.start;s<t.end;s++){var l=rb(a,this._dataGroup,s,n,i);l.incremental=!0,Tg(l,a,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function cO(t,e,r){var a=t.model,i=t.getRect(),n=new xt({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=a.get("layout")==="horizontal"?"width":"height";return n.setShape(o,0),Se(n,{shape:{width:i.width,height:i.height}},e,r),n}function eb(t,e,r,a){for(var i=[],n=0;n<r.length;n++){var o=r[n],s=t.get(t.mapDimension(o),e);vO(s,a.getAxis(o).type)||i.push(a.dataToPoint(s,o))}return i}function rb(t,e,r,a,i){var n=eb(t,r,a,i),o=new ir({shape:{points:n},silent:!0,z2:10});return e.add(o),t.setItemGraphicEl(r,o),o}function ab(t){var e=t.get("smooth",!0);return e===!0&&(e=tb),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:e??tb}}function Tg(t,e,r,a){var i=a.lineStyle;if(e.hasItemOption){var n=e.getItemModel(r).getModel("lineStyle");i=n.getLineStyle()}t.useStyle(i);var o=t.style;o.fill=null,o.stroke=e.getItemVisual(r,"color"),o.opacity=e.getItemVisual(r,"opacity"),a.smooth&&(t.shape.smooth=a.smooth)}function vO(t,e){return e==="category"?t==null:t==null||isNaN(t)}var dO=["lineStyle","normal","opacity"],gO={seriesType:"parallel",reset:function(t,e,r){var a=t.getModel("itemStyle"),i=t.getModel("lineStyle"),n=e.get("color"),o=i.get("color")||a.get("color")||n[t.seriesIndex%n.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,f=t.getData(),c={normal:u.opacity,active:l,inactive:s};f.setVisual("color",o);function v(d,g){h.eachActiveState(g,function(p,m){var y=c[p];if(p==="normal"&&g.hasItemOption){var _=g.getItemModel(m).get(dO,!0);_!=null&&(y=_)}g.setItemVisual(m,"opacity",y)},d.start,d.end)}return{progress:v}}};Rt(gO);var ib=Vt.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(t,e){for(var r=t.edges||t.links,a=t.data||t.nodes,i=t.levels,n=this.levelModels={},o=0;o<i.length;o++)if(i[o].depth!=null&&i[o].depth>=0)n[i[o].depth]=new _t(i[o],this,e);else if(T)throw new Error("levels[i].depth is mandatory and should be natural number");if(a&&r){var s=vw(a,r,this,!0,l);return s.data}function l(u,h){u.wrapMethod("getItemModel",function(f,c){return f.customizeGetParent(function(v){var d=this.parentModel,g=d.getData().getItemLayout(c).depth,p=d.levelModels[g];return p||this.parentModel}),f}),h.wrapMethod("getItemModel",function(f,c){return f.customizeGetParent(function(v){var d=this.parentModel,g=d.getGraph().getEdgeByIndex(c),p=g.node1.getLayout().depth,m=d.levelModels[p];return m||this.parentModel}),f})}},setNodePosition:function(t,e){var r=this.option.data[t];r.localX=e[0],r.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,r){if(r==="edge"){var a=this.getDataParams(t,r),i=a.data,n=i.source+" -- "+i.target;return a.value&&(n+=" : "+a.value),kt(n)}else if(r==="node"){var o=this.getGraph().getNodeByIndex(t),s=o.getLayout().value,l=this.getDataParams(t,r).data.name;if(s)var n=l+" : "+s;return kt(n)}return ib.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var r=ib.superCall(this,"getDataParams",t,e);if(r.value==null&&e==="node"){var a=this.getGraph().getNodeByIndex(t),i=a.getLayout().value;r.value=i}return r},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),nb=["itemStyle","opacity"],Vi=["emphasis","itemStyle","opacity"],ob=["lineStyle","opacity"],vh=["emphasis","lineStyle","opacity"];function sb(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function dh(t,e,r){var a=t.getGraphicEl(),i=sb(t,e);r!=null&&(i==null&&(i=1),i*=r),a.downplay&&a.downplay(),a.traverse(function(n){n.type!=="group"&&n.setStyle("opacity",i)})}function Ir(t,e){var r=sb(t,e),a=t.getGraphicEl();a.traverse(function(i){i.type!=="group"&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}var pO=nr({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var r=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),e.orient==="vertical"?(t.lineTo(e.x2+r,e.y2),t.bezierCurveTo(e.cpx2+r,e.cpy2,e.cpx1+r,e.cpy1,e.x1+r,e.y1)):(t.lineTo(e.x2,e.y2+r),t.bezierCurveTo(e.cpx2,e.cpy2+r,e.cpx1,e.cpy1+r,e.x1,e.y1+r)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});ke({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,r){var a=this,i=t.getGraph(),n=this.group,o=t.layoutInfo,s=o.width,l=o.height,u=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,n.removeAll(),n.attr("position",[o.x,o.y]),i.eachEdge(function(c){var v=new pO;v.dataIndex=c.dataIndex,v.seriesIndex=t.seriesIndex,v.dataType="edge";var d=c.getModel("lineStyle"),g=d.get("curveness"),p=c.node1.getLayout(),m=c.node1.getModel(),y=m.get("localX"),_=m.get("localY"),w=c.node2.getLayout(),b=c.node2.getModel(),A=b.get("localX"),S=b.get("localY"),D=c.getLayout(),I,L,P,R,E,Z,W,$;switch(v.shape.extent=Math.max(1,D.dy),v.shape.orient=f,f==="vertical"?(I=(y!=null?y*s:p.x)+D.sy,L=(_!=null?_*l:p.y)+p.dy,P=(A!=null?A*s:w.x)+D.ty,R=S!=null?S*l:w.y,E=I,Z=L*(1-g)+R*g,W=P,$=L*g+R*(1-g)):(I=(y!=null?y*s:p.x)+p.dx,L=(_!=null?_*l:p.y)+D.sy,P=A!=null?A*s:w.x,R=(S!=null?S*l:w.y)+D.ty,E=I*(1-g)+P*g,Z=L,W=I*g+P*(1-g),$=R),v.setShape({x1:I,y1:L,x2:P,y2:R,cpx1:E,cpy1:Z,cpx2:W,cpy2:$}),v.setStyle(d.getItemStyle()),v.style.fill){case"source":v.style.fill=c.node1.getVisual("color");break;case"target":v.style.fill=c.node2.getVisual("color");break}Ot(v,c.getModel("emphasis.lineStyle").getItemStyle()),n.add(v),h.setItemGraphicEl(c.dataIndex,v)}),i.eachNode(function(c){var v=c.getLayout(),d=c.getModel(),g=d.get("localX"),p=d.get("localY"),m=d.getModel("label"),y=d.getModel("emphasis.label"),_=new xt({shape:{x:g!=null?g*s:v.x,y:p!=null?p*l:v.y,width:v.dx,height:v.dy},style:d.getModel("itemStyle").getItemStyle()}),w=c.getModel("emphasis.itemStyle").getItemStyle();Fe(_.style,w,m,y,{labelFetcher:t,labelDataIndex:c.dataIndex,defaultText:c.id,isRectText:!0}),_.setStyle("fill",c.getVisual("color")),Ot(_,w),n.add(_),u.setItemGraphicEl(c.dataIndex,_),_.dataType="node"}),u.eachItemGraphicEl(function(c,v){var d=u.getItemModel(v);d.get("draggable")&&(c.drift=function(g,p){a._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=p,this.dirty(),r.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(v),localX:this.shape.x/s,localY:this.shape.y/l})},c.ondragend=function(){a._focusAdjacencyDisabled=!1},c.draggable=!0,c.cursor="move"),c.highlight=function(){this.trigger("emphasis")},c.downplay=function(){this.trigger("normal")},c.focusNodeAdjHandler&&c.off("mouseover",c.focusNodeAdjHandler),c.unfocusNodeAdjHandler&&c.off("mouseout",c.unfocusNodeAdjHandler),d.get("focusNodeAdjacency")&&(c.on("mouseover",c.focusNodeAdjHandler=function(){a._focusAdjacencyDisabled||(a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:c.dataIndex}))}),c.on("mouseout",c.unfocusNodeAdjHandler=function(){a._focusAdjacencyDisabled||a._dispatchUnfocus(r)}))}),h.eachItemGraphicEl(function(c,v){var d=h.getItemModel(v);c.focusNodeAdjHandler&&c.off("mouseover",c.focusNodeAdjHandler),c.unfocusNodeAdjHandler&&c.off("mouseout",c.unfocusNodeAdjHandler),d.get("focusNodeAdjacency")&&(c.on("mouseover",c.focusNodeAdjHandler=function(){a._focusAdjacencyDisabled||(a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:c.dataIndex}))}),c.on("mouseout",c.unfocusNodeAdjHandler=function(){a._focusAdjacencyDisabled||a._dispatchUnfocus(r)}))}),!this._data&&t.get("animation")&&n.setClipPath(mO(n.getBoundingRect(),t,function(){n.removeClipPath()})),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,r,a){var i=t.getData(),n=i.graph,o=a.dataIndex,s=i.getItemModel(o),l=a.edgeDataIndex;if(!(o==null&&l==null)){var u=n.getNodeByIndex(o),h=n.getEdgeByIndex(l);if(n.eachNode(function(c){dh(c,nb,.1)}),n.eachEdge(function(c){dh(c,ob,.1)}),u){Ir(u,Vi);var f=s.get("focusNodeAdjacency");f==="outEdges"?M(u.outEdges,function(c){c.dataIndex<0||(Ir(c,vh),Ir(c.node2,Vi))}):f==="inEdges"?M(u.inEdges,function(c){c.dataIndex<0||(Ir(c,vh),Ir(c.node1,Vi))}):f==="allEdges"&&M(u.edges,function(c){c.dataIndex<0||(Ir(c,vh),c.node1!==u&&Ir(c.node1,Vi),c.node2!==u&&Ir(c.node2,Vi))})}h&&(Ir(h,vh),Ir(h.node1,Vi),Ir(h.node2,Vi))}},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getGraph();i.eachNode(function(n){dh(n,nb)}),i.eachEdge(function(n){dh(n,ob)})}});function mO(t,e,r){var a=new xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Se(a,{shape:{width:t.width+20}},e,r),a}mt({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(r){r.setNodePosition(t.dataIndex,[t.localX,t.localY])})});var yO=function(t,e,r){t.eachSeriesByType("sankey",function(a){var i=a.get("nodeWidth"),n=a.get("nodeGap"),o=_O(a,e);a.layoutInfo=o;var s=o.width,l=o.height,u=a.getGraph(),h=u.nodes,f=u.edges;wO(h);var c=ee(h,function(p){return p.getLayout().value===0}),v=c.length!==0?0:a.get("layoutIterations"),d=a.get("orient"),g=a.get("nodeAlign");xO(h,f,i,n,s,l,v,d,g)})};function _O(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function xO(t,e,r,a,i,n,o,s,l){bO(t,e,r,i,n,s,l),CO(t,e,n,i,a,o,s),NO(t,s)}function wO(t){M(t,function(e){var r=Qa(e.outEdges,gh),a=Qa(e.inEdges,gh),i=e.getValue()||0,n=Math.max(r,a,i);e.setLayout({value:n},!0)})}function bO(t,e,r,a,i,n,o){for(var s=[],l=[],u=[],h=[],f=0,D=0,c=0;c<e.length;c++)s[c]=1;for(c=0;c<t.length;c++)l[c]=t[c].inEdges.length,l[c]===0&&u.push(t[c]);for(var v=-1;u.length;){for(var d=0;d<u.length;d++){var g=u[d],p=g.hostGraph.data.getRawDataItem(g.dataIndex),m=p.depth!=null&&p.depth>=0;m&&p.depth>v&&(v=p.depth),g.setLayout({depth:m?p.depth:f},!0),n==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var y=0;y<g.outEdges.length;y++){var _=g.outEdges[y],w=e.indexOf(_);s[w]=0;var b=_.node2,A=t.indexOf(b);--l[A]===0&&h.indexOf(b)<0&&h.push(b)}}++f,u=h,h=[]}for(c=0;c<s.length;c++)if(s[c]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var S=v>f-1?v:f-1;o&&o!=="left"&&SO(t,o,n,S);var D=n==="vertical"?(i-r)/S:(a-r)/S;TO(t,D,n)}function lb(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function SO(t,e,r,a){if(e==="right"){for(var i=[],n=t,o=0;n.length;){for(var s=0;s<n.length;s++){var l=n[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];i.indexOf(h.node1)<0&&i.push(h.node1)}}n=i,i=[],++o}M(t,function(f){lb(f)||f.setLayout({depth:Math.max(0,a-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&AO(t,a)}function AO(t,e){M(t,function(r){!lb(r)&&!r.outEdges.length&&r.setLayout({depth:e},!0)})}function TO(t,e,r){M(t,function(a){var i=a.getLayout().depth*e;r==="vertical"?a.setLayout({y:i},!0):a.setLayout({x:i},!0)})}function CO(t,e,r,a,i,n,o){var s=DO(t,o);MO(s,e,r,a,i,o),Cg(s,i,r,a,o);for(var l=1;n>0;n--)l*=.99,IO(s,l,o),Cg(s,i,r,a,o),OO(s,l,o),Cg(s,i,r,a,o)}function DO(t,e){var r=[],a=e==="vertical"?"y":"x",i=Rc(t,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),M(i.keys,function(n){r.push(i.buckets.get(n))}),r}function MO(t,e,r,a,i,n){var o=1/0;M(t,function(s){var l=s.length,u=0;M(s,function(f){u+=f.getLayout().value});var h=n==="vertical"?(a-(l-1)*i)/u:(r-(l-1)*i)/u;h<o&&(o=h)}),M(t,function(s){M(s,function(l,u){var h=l.getLayout().value*o;n==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:h},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:h},!0))})}),M(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Cg(t,e,r,a,i){var n=i==="vertical"?"x":"y";M(t,function(o){o.sort(function(g,p){return g.getLayout()[n]-p.getLayout()[n]});for(var s,l,u,h=0,f=o.length,c=i==="vertical"?"dx":"dy",v=0;v<f;v++)l=o[v],u=h-l.getLayout()[n],u>0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]+l.getLayout()[c]+e;var d=i==="vertical"?a:r;if(u=h-e-d,u>0)for(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s,v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[n]+l.getLayout()[c]+e-h,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]})}function IO(t,e,r){M(t.slice().reverse(),function(a){M(a,function(i){if(i.outEdges.length){var n=Qa(i.outEdges,LO,r)/Qa(i.outEdges,gh,r);if(isNaN(n)){var o=i.outEdges.length;n=o?Qa(i.outEdges,PO,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-ja(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-ja(i,r))*e;i.setLayout({y:l},!0)}}})})}function LO(t,e){return ja(t.node2,e)*t.getValue()}function PO(t,e){return ja(t.node2,e)}function EO(t,e){return ja(t.node1,e)*t.getValue()}function RO(t,e){return ja(t.node1,e)}function ja(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function gh(t){return t.getValue()}function Qa(t,e,r){for(var a=0,i=t.length,n=-1;++n<i;){var o=+e.call(t,t[n],r);isNaN(o)||(a+=o)}return a}function OO(t,e,r){M(t,function(a){M(a,function(i){if(i.inEdges.length){var n=Qa(i.inEdges,EO,r)/Qa(i.inEdges,gh,r);if(isNaN(n)){var o=i.inEdges.length;n=o?Qa(i.inEdges,RO,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-ja(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-ja(i,r))*e;i.setLayout({y:l},!0)}}})})}function NO(t,e){var r=e==="vertical"?"x":"y";M(t,function(a){a.outEdges.sort(function(i,n){return i.node2.getLayout()[r]-n.node2.getLayout()[r]}),a.inEdges.sort(function(i,n){return i.node1.getLayout()[r]-n.node1.getLayout()[r]})}),M(t,function(a){var i=0,n=0;M(a.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),M(a.inEdges,function(o){o.setLayout({ty:n},!0),n+=o.getLayout().dy})})}var kO=function(t,e){t.eachSeriesByType("sankey",function(r){var a=r.getGraph(),i=a.nodes;if(i.length){var n=1/0,o=-1/0;M(i,function(s){var l=s.getLayout().value;l<n&&(n=l),l>o&&(o=l)}),M(i,function(s){var l=new Mt({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:r.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get("itemStyle.color");h!=null?s.setVisual("color",h):s.setVisual("color",u)})}})};Gt(yO),Rt(kO);var ub={_baseAxisDim:null,getInitialData:function(t,e){var r,a=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),n=a.get("type"),o=i.get("type"),s;n==="category"?(t.layout="horizontal",r=a.getOrdinalMeta(),s=!0):o==="category"?(t.layout="vertical",r=i.getOrdinalMeta(),s=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u=t.layout==="horizontal"?0:1,h=this._baseAxisDim=l[u],f=l[1-u],c=[a,i],v=c[u].get("type"),d=c[1-u].get("type"),g=t.data;if(g&&s){var p=[];M(g,function(_,w){var b;_.value&&z(_.value)?(b=_.value.slice(),_.value.unshift(w)):z(_)?(b=_.slice(),_.unshift(w)):b=_,p.push(b)}),t.data=p}var m=this.defaultValueDimensions,y=[{name:h,type:Iu(v),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Iu(d),dimsDef:m.slice()}];return Un(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:ot(Py,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},zO=Vt.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});Dt(zO,ub,!0);var BO=["itemStyle"],VO=["emphasis","itemStyle"],q5=ue.extend({type:"boxplot",render:function(t,e,r){var a=t.getData(),i=this.group,n=this._data;this._data||i.removeAll();var o=t.get("layout")==="horizontal"?1:0;a.diff(n).add(function(s){if(a.hasValue(s)){var l=a.getItemLayout(s),u=hb(l,a,s,o,!0);a.setItemGraphicEl(s,u),i.add(u)}}).update(function(s,l){var u=n.getItemGraphicEl(l);if(!a.hasValue(s)){i.remove(u);return}var h=a.getItemLayout(s);u?fb(h,u,a,s):u=hb(h,a,s,o),i.add(u),a.setItemGraphicEl(s,u)}).remove(function(s){var l=n.getItemGraphicEl(s);l&&i.remove(l)}).execute(),this._data=a},remove:function(t){var e=this.group,r=this._data;this._data=null,r&&r.eachItemGraphicEl(function(a){a&&e.remove(a)})},dispose:ce}),GO=pt.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var r=e.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();a<r.length;a++)t.moveTo(r[a][0],r[a][1]),a++,t.lineTo(r[a][0],r[a][1])}});function hb(t,e,r,a,i){var n=t.ends,o=new GO({shape:{points:i?HO(n,a,t):n}});return fb(t,o,e,r,i),o}function fb(t,e,r,a,i){var n=r.hostModel,o=sa[i?"initProps":"updateProps"];o(e,{shape:{points:t.ends}},n,a);var s=r.getItemModel(a),l=s.getModel(BO),u=r.getItemVisual(a,"color"),h=l.getItemStyle(["borderColor"]);h.stroke=u,h.strokeNoScale=!0,e.useStyle(h),e.z2=100;var f=s.getModel(VO).getItemStyle();Ot(e,f)}function HO(t,e,r){return V(t,function(a){return a=a.slice(),a[e]=r.initBaseline,a})}var cb=["itemStyle","borderColor"],FO=function(t,e){var r=t.get("color");t.eachRawSeriesByType("boxplot",function(a){var i=r[a.seriesIndex%r.length],n=a.getData();n.setVisual({legendSymbol:"roundRect",color:a.get(cb)||i}),t.isSeriesFiltered(a)||n.each(function(o){var s=n.getItemModel(o);n.setItemVisual(o,{color:s.get(cb,!0)})})})},Hs=M,WO=function(t){var e=UO(t);Hs(e,function(r){var a=r.seriesModels;!a.length||($O(r),Hs(a,function(i,n){ZO(i,r.boxOffsetList[n],r.boxWidthList[n])}))})};function UO(t){var e=[],r=[];return t.eachSeriesByType("boxplot",function(a){var i=a.getBaseAxis(),n=yt(r,i);n<0&&(n=r.length,r[n]=i,e[n]={axis:i,seriesModels:[]}),e[n].seriesModels.push(a)}),e}function $O(t){var e,r=t.axis,a=t.seriesModels,i=a.length,n=t.boxWidthList=[],o=t.boxOffsetList=[],s=[],l;if(r.type==="category")l=r.getBandWidth();else{var u=0;Hs(a,function(d){u=Math.max(u,d.getData().count())}),e=r.getExtent(),Math.abs(e[1]-e[0])/u}Hs(a,function(d){var g=d.get("boxWidth");z(g)||(g=[g,g]),s.push([H(g[0],l)||0,H(g[1],l)||0])});var h=l*.8-2,f=h/i*.3,c=(h-f*(i-1))/i,v=c/2-h/2;Hs(a,function(d,g){o.push(v),v+=f+c,n.push(Math.min(Math.max(c,s[g][0]),s[g][1]))})}function ZO(t,e,r){var a=t.coordinateSystem,i=t.getData(),n=r/2,o=t.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),h=i.mapDimension(l[s],!0);if(u==null||h.length<5)return;for(var f=0;f<i.count();f++){var c=i.get(u,f),v=_(c,h[2],f),d=_(c,h[0],f),g=_(c,h[1],f),p=_(c,h[3],f),m=_(c,h[4],f),y=[];w(y,g,0),w(y,p,1),y.push(d,g,m,p),b(y,d),b(y,m),b(y,v),i.setItemLayout(f,{initBaseline:v[s],ends:y})}function _(A,S,D){var I=i.get(S,D),L=[];L[o]=A,L[s]=I;var P;return isNaN(A)||isNaN(I)?P=[NaN,NaN]:(P=a.dataToPoint(L),P[o]+=e),P}function w(A,S,D){var I=S.slice(),L=S.slice();I[o]+=n,L[o]-=n,D?A.push(I,L):A.push(L,I)}function b(A,S){var D=S.slice(),I=S.slice();D[o]-=n,I[o]+=n,A.push(D,I)}}Rt(FO),Gt(WO);var YO=Vt.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,r){var a=e.getItemLayout(t);return a&&r.rect(a.brushRect)}});Dt(YO,ub,!0);var vb=["itemStyle"],XO=["emphasis","itemStyle"],db=["color","color0","borderColor","borderColor0"],K5=ue.extend({type:"candlestick",render:function(t,e,r){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,r){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,r,a){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(this._isLargeDraw==null||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e=t.getData(),r=this._data,a=this.group,i=e.getLayout("isSimpleBox"),n=t.get("clip",!0),o=t.coordinateSystem,s=o.getArea&&o.getArea();this._data||a.removeAll(),e.diff(r).add(function(l){if(e.hasValue(l)){var u,h=e.getItemLayout(l);if(n&&gb(s,h))return;u=Dg(h,l,!0),Se(u,{shape:{points:h.ends}},t,l),Mg(u,e,l,i),a.add(u),e.setItemGraphicEl(l,u)}}).update(function(l,u){var h=r.getItemGraphicEl(u);if(!e.hasValue(l)){a.remove(h);return}var f=e.getItemLayout(l);if(n&&gb(s,f)){a.remove(h);return}h?ft(h,{shape:{points:f.ends}},t,l):h=Dg(f,l),Mg(h,e,l,i),a.add(h),e.setItemGraphicEl(l,h)}).remove(function(l){var u=r.getItemGraphicEl(l);u&&a.remove(u)}).execute(),this._data=e},_renderLarge:function(t){this._clear(),mb(t,this.group);var e=t.get("clip",!0)?Gu(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){for(var r=e.getData(),a=r.getLayout("isSimpleBox"),i;(i=t.next())!=null;){var n,o=r.getItemLayout(i);n=Dg(o,i),Mg(n,r,i,a),n.incremental=!0,this.group.add(n)}},_incrementalRenderLarge:function(t,e){mb(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:ce}),qO=pt.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var r=e.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]))}});function Dg(t,e,r){var a=t.ends;return new qO({shape:{points:r?KO(a,t):a},z2:100})}function gb(t,e){for(var r=!0,a=0;a<e.ends.length;a++)if(t.contain(e.ends[a][0],e.ends[a][1])){r=!1;break}return r}function Mg(t,e,r,a){var i=e.getItemModel(r),n=i.getModel(vb),o=e.getItemVisual(r,"color"),s=e.getItemVisual(r,"borderColor")||o,l=n.getItemStyle(db);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=o,t.style.stroke=s,t.__simpleBox=a;var u=i.getModel(XO).getItemStyle();Ot(t,u)}function KO(t,e){return V(t,function(r){return r=r.slice(),r[1]=e.initBaseline,r})}var pb=pt.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var r=e.points,a=0;a<r.length;)if(this.__sign===r[a++]){var i=r[a++];t.moveTo(i,r[a++]),t.lineTo(i,r[a++])}else a+=3}});function mb(t,e,r){var a=t.getData(),i=a.getLayout("largePoints"),n=new pb({shape:{points:i},__sign:1});e.add(n);var o=new pb({shape:{points:i},__sign:-1});e.add(o),yb(1,n,t,a),yb(-1,o,t,a),r&&(n.incremental=!0,o.incremental=!0)}function yb(t,e,r,a){var i=t>0?"P":"N",n=a.getVisual("borderColor"+i)||a.getVisual("color"+i),o=r.getModel(vb).getItemStyle(db);e.useStyle(o),e.style.fill=null,e.style.stroke=n}var jO=function(t){!t||!z(t.series)||M(t.series,function(e){lt(e)&&e.type==="k"&&(e.type="candlestick")})},QO=["itemStyle","borderColor"],JO=["itemStyle","borderColor0"],tN=["itemStyle","color"],eN=["itemStyle","color0"],rN={seriesType:"candlestick",plan:Mn(),performRawSeries:!0,reset:function(t,e){var r=t.getData();if(r.setVisual({legendSymbol:"roundRect",colorP:n(1,t),colorN:n(-1,t),borderColorP:o(1,t),borderColorN:o(-1,t)}),e.isSeriesFiltered(t))return;var a=t.pipelineContext.large;return!a&&{progress:i};function i(s,l){for(var u;(u=s.next())!=null;){var h=l.getItemModel(u),f=l.getItemLayout(u).sign;l.setItemVisual(u,{color:n(f,h),borderColor:o(f,h)})}}function n(s,l){return l.get(s>0?tN:eN)}function o(s,l){return l.get(s>0?QO:JO)}}},aN=typeof Float32Array<"u"?Float32Array:Array,iN={seriesType:"candlestick",plan:Mn(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),a=nN(t,r),i=0,n=1,o=["x","y"],s=r.mapDimension(o[i]),l=r.mapDimension(o[n],!0),u=l[0],h=l[1],f=l[2],c=l[3];if(r.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s==null||l.length<4)return;return{progress:t.pipelineContext.large?d:v};function v(g,p){for(var m;(m=g.next())!=null;){var y=p.get(s,m),_=p.get(u,m),w=p.get(h,m),b=p.get(f,m),A=p.get(c,m),S=Math.min(_,w),D=Math.max(_,w),I=Z(S,y),L=Z(D,y),P=Z(b,y),R=Z(A,y),E=[];W(E,L,0),W(E,I,1),E.push(X(R),X(L),X(P),X(I)),p.setItemLayout(m,{sign:_b(p,m,_,w,h),initBaseline:_>w?L[n]:I[n],ends:E,brushRect:$(b,A,y)})}function Z(K,Q){var j=[];return j[i]=Q,j[n]=K,isNaN(Q)||isNaN(K)?[NaN,NaN]:e.dataToPoint(j)}function W(K,Q,j){var U=Q.slice(),tt=Q.slice();U[i]=Jl(U[i]+a/2,1,!1),tt[i]=Jl(tt[i]-a/2,1,!0),j?K.push(U,tt):K.push(tt,U)}function $(K,Q,j){var U=Z(K,j),tt=Z(Q,j);return U[i]-=a/2,tt[i]-=a/2,{x:U[0],y:U[1],width:n?a:tt[0]-U[0],height:n?tt[1]-U[1]:a}}function X(K){return K[i]=Jl(K[i],1),K}}function d(g,p){for(var m=new aN(g.count*4),y=0,_,w=[],b=[],A;(A=g.next())!=null;){var S=p.get(s,A),D=p.get(u,A),I=p.get(h,A),L=p.get(f,A),P=p.get(c,A);if(isNaN(S)||isNaN(L)||isNaN(P)){m[y++]=NaN,y+=3;continue}m[y++]=_b(p,A,D,I,h),w[i]=S,w[n]=L,_=e.dataToPoint(w,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,w[n]=P,_=e.dataToPoint(w,null,b),m[y++]=_?_[1]:NaN}p.setLayout("largePoints",m)}}};function _b(t,e,r,a,i){var n;return r>a?n=-1:r<a?n=1:n=e>0?t.get(i,e-1)<=a?1:-1:1,n}function nN(t,e){var r=t.getBaseAxis(),a,i=r.type==="category"?r.getBandWidth():(a=r.getExtent(),Math.abs(a[1]-a[0])/e.count()),n=H(Xt(t.get("barMaxWidth"),i),i),o=H(Xt(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?H(s,i):Math.max(Math.min(i/2,n),o)}we(jO),Rt(rN),Gt(iN),Vt.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return ca(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var xb=3;function oN(t){return z(t)||(t=[+t,+t]),t}function wb(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}function Ig(t,e){q.call(this);var r=new Wa(t,e),a=new q;this.add(r),this.add(a),a.beforeUpdate=function(){this.attr(r.getScale())},this.updateData(t,e)}var Gi=Ig.prototype;Gi.stopEffectAnimation=function(){this.childAt(1).removeAll()},Gi.startEffectAnimation=function(t){for(var e=t.symbolType,r=t.color,a=this.childAt(1),i=0;i<xb;i++){var n=Ye(e,-1,-1,2,2,r);n.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-i/xb*t.period+t.effectOffset;n.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(o).start(),n.animateStyle(!0).when(t.period,{opacity:0}).delay(o).start(),a.add(n)}wb(a,t)},Gi.updateEffectAnimation=function(t){for(var e=this._effectCfg,r=this.childAt(1),a=["symbolType","period","rippleScale"],i=0;i<a.length;i++){var n=a[i];if(e[n]!==t[n]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}wb(r,t)},Gi.highlight=function(){this.trigger("emphasis")},Gi.downplay=function(){this.trigger("normal")},Gi.updateData=function(t,e){var r=t.hostModel;this.childAt(0).updateData(t,e);var a=this.childAt(1),i=t.getItemModel(e),n=t.getItemVisual(e,"symbol"),o=oN(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");a.attr("scale",o),a.traverse(function(g){g.attr({fill:s})});var l=i.getShallow("symbolOffset");if(l){var u=a.position;u[0]=H(l[0],o[0]),u[1]=H(l[1],o[1])}var h=t.getItemVisual(e,"symbolRotate");a.rotation=(h||0)*Math.PI/180||0;var f={};if(f.showEffectOn=r.get("showEffectOn"),f.rippleScale=i.get("rippleEffect.scale"),f.brushType=i.get("rippleEffect.brushType"),f.period=i.get("rippleEffect.period")*1e3,f.effectOffset=e/t.count(),f.z=i.getShallow("z")||0,f.zlevel=i.getShallow("zlevel")||0,f.symbolType=n,f.color=s,f.rippleEffectColor=i.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),f.showEffectOn==="render")this._effectCfg?this.updateEffectAnimation(f):this.startEffectAnimation(f),this._effectCfg=f;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),v=function(){c.highlight(),f.showEffectOn!=="render"&&this.startEffectAnimation(f)},d=function(){c.downplay(),f.showEffectOn!=="render"&&this.stopEffectAnimation()};this.on("mouseover",v,this).on("mouseout",d,this).on("emphasis",v,this).on("normal",d,this)}this._effectCfg=f},Gi.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},It(Ig,q),ke({type:"effectScatter",init:function(){this._symbolDraw=new Bn(Ig)},render:function(t,e,r){var a=t.getData(),i=this._symbolDraw;i.updateData(a),this.group.add(i.group)},updateTransform:function(t,e,r){var a=t.getData();this.group.dirty();var i=ys().reset(t);i.progress&&i.progress({start:0,end:a.count()},a),this._symbolDraw.updateLayout(a)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=Am(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Rt(Ii("effectScatter","circle")),Gt(ys("effectScatter"));var sN=typeof Uint32Array>"u"?Array:Uint32Array,lN=typeof Float64Array>"u"?Array:Float64Array;function bb(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(T&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=V(e,function(r){var a=[r[0].coord,r[1].coord],i={coords:a};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),go([i,r[0],r[1]])}))}var Sb=Vt.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],bb(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),Sb.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],bb(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}Sb.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=vf(this._flatCoords,e.flatCoords),this._flatCoordsOffset=vf(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),r=e.option instanceof Array?e.option:e.getShallow("coords");if(T&&!(r instanceof Array&&r.length>0&&r[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(r)+". Lines must have 2d coords array in data item.");return r},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var r=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],i=0;i<a;i++)e[i]=e[i]||[],e[i][0]=this._flatCoords[r+i*2],e[i][1]=this._flatCoords[r+i*2+1];return a}else{for(var n=this._getCoordsFromItemModel(t),i=0;i<n.length;i++)e[i]=e[i]||[],e[i][0]=n[i][0],e[i][1]=n[i][1];return n.length}},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),typeof t[0]=="number"){for(var r=t.length,a=new sN(r),i=new lN(r),n=0,o=0,s=0,l=0;l<r;){s++;var u=t[l++];a[o++]=n+e,a[o++]=u;for(var h=0;h<u;h++){var f=t[l++],c=t[l++];if(i[n++]=f,i[n++]=c,l>r&&T)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,o),flatCoords:i,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){if(T){var r=_e.get(t.coordinateSystem);if(!r)throw new Error("Unkown coordinate system "+t.coordinateSystem)}var a=new fe(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(i,n,o,s){if(i instanceof Array)return NaN;a.hasItemOption=!0;var l=i.value;if(l!=null)return l instanceof Array?l[s]:l}),a},formatTooltip:function(t){var e=this.getData(),r=e.getItemModel(t),a=r.get("name");if(a)return a;var i=r.get("fromName"),n=r.get("toName"),o=[];return i!=null&&o.push(i),n!=null&&o.push(n),kt(o.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!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}}});function Fs(t,e,r){q.call(this),this.add(this.createLine(t,e,r)),this._updateEffectSymbol(t,e)}var Ja=Fs.prototype;Ja.createLine=function(t,e,r){return new zs(t,e,r)},Ja._updateEffectSymbol=function(t,e){var r=t.getItemModel(e),a=r.getModel("effect"),i=a.get("symbolSize"),n=a.get("symbol");z(i)||(i=[i,i]);var o=a.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==n&&(this.remove(s),s=Ye(n,-.5,-.5,1,1,o),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",o),s.setStyle(a.getItemStyle(["color"])),s.attr("scale",i),s.setColor(o),s.attr("scale",i),this._symbolType=n,this._symbolScale=i,this._updateEffectAnimation(t,a,e))},Ja._updateEffectAnimation=function(t,e,r){var a=this.childAt(1);if(!!a){var i=this,n=t.getItemLayout(r),o=e.get("period")*1e3,s=e.get("loop"),l=e.get("constantSpeed"),u=Ut(e.get("delay"),function(v){return v/t.count()*o/3}),h=typeof u=="function";if(a.ignore=!0,this.updateAnimationPoints(a,n),l>0&&(o=this.getLineLength(a)/l*1e3),o!==this._period||s!==this._loop){a.stopAnimation();var f=u;h&&(f=u(r)),a.__t>0&&(f=-o*a.__t),a.__t=0;var c=a.animate("",s).when(o,{__t:1}).delay(f).during(function(){i.updateSymbolPosition(a)});s||c.done(function(){i.remove(a)}),c.start()}this._period=o,this._loop=s}},Ja.getLineLength=function(t){return ta(t.__p1,t.__cp1)+ta(t.__cp1,t.__p2)},Ja.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},Ja.updateData=function(t,e,r){this.childAt(0).updateData(t,e,r),this._updateEffectSymbol(t,e)},Ja.updateSymbolPosition=function(t){var e=t.__p1,r=t.__p2,a=t.__cp1,i=t.__t,n=t.position,o=[n[0],n[1]],s=be,l=Oc;n[0]=s(e[0],a[0],r[0],i),n[1]=s(e[1],a[1],r[1],i);var u=l(e[0],a[0],r[0],i),h=l(e[1],a[1],r[1],i);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")if(t.__lastT!==void 0&&t.__lastT<t.__t){var f=ta(o,n)*1.05;t.attr("scale",[t.scale[0],f]),i===1&&(n[0]=o[0]+(n[0]-o[0])/2,n[1]=o[1]+(n[1]-o[1])/2)}else if(t.__lastT===1){var f=2*ta(e,n);t.attr("scale",[t.scale[0],f])}else t.attr("scale",this._symbolScale);t.__lastT=t.__t,t.ignore=!1},Ja.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var r=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,r,e)},It(Fs,q);function ph(t,e,r){q.call(this),this._createPolyline(t,e,r)}var mh=ph.prototype;mh._createPolyline=function(t,e,r){var a=t.getItemLayout(e),i=new ir({shape:{points:a}});this.add(i),this._updateCommonStl(t,e,r)},mh.updateData=function(t,e,r){var a=t.hostModel,i=this.childAt(0),n={shape:{points:t.getItemLayout(e)}};ft(i,n,a,e),this._updateCommonStl(t,e,r)},mh._updateCommonStl=function(t,e,r){var a=this.childAt(0),i=t.getItemModel(e),n=t.getItemVisual(e,"color"),o=r&&r.lineStyle,s=r&&r.hoverLineStyle;(!r||t.hasItemOption)&&(o=i.getModel("lineStyle").getLineStyle(),s=i.getModel("emphasis.lineStyle").getLineStyle()),a.useStyle(J({strokeNoScale:!0,fill:"none",stroke:n},o)),a.hoverStyle=s,Ot(this)},mh.updateLayout=function(t,e){var r=this.childAt(0);r.setShape("points",t.getItemLayout(e))},It(ph,q);function Lg(t,e,r){Fs.call(this,t,e,r),this._lastFrame=0,this._lastFramePercent=0}var yh=Lg.prototype;yh.createLine=function(t,e,r){return new ph(t,e,r)},yh.updateAnimationPoints=function(t,e){this._points=e;for(var r=[0],a=0,i=1;i<e.length;i++){var n=e[i-1],o=e[i];a+=ta(n,o),r.push(a)}if(a!==0){for(var i=0;i<r.length;i++)r[i]/=a;this._offsets=r,this._length=a}},yh.getLineLength=function(t){return this._length},yh.updateSymbolPosition=function(t){var e=t.__t,r=this._points,a=this._offsets,i=r.length;if(!!a){var n=this._lastFrame,o;if(e<this._lastFramePercent){var s=Math.min(n+1,i-1);for(o=s;o>=0&&!(a[o]<=e);o--);o=Math.min(o,i-2)}else{for(var o=n;o<i&&!(a[o]>e);o++);o=Math.min(o-1,i-2)}cm(t.position,r[o],r[o+1],(e-a[o])/(a[o+1]-a[o]));var l=r[o+1][0]-r[o][0],u=r[o+1][1]-r[o][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},It(Lg,Fs);var Ab=nr({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var r=e.segs,a=e.curveness;if(e.polyline)for(var i=0;i<r.length;){var n=r[i++];if(n>0){t.moveTo(r[i++],r[i++]);for(var o=1;o<n;o++)t.lineTo(r[i++],r[i++])}}else for(var i=0;i<r.length;){var s=r[i++],l=r[i++],u=r[i++],h=r[i++];if(t.moveTo(s,l),a>0){var f=(s+u)/2-(l-h)*a,c=(l+h)/2-(u-s)*a;t.quadraticCurveTo(f,c,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var r=this.shape,a=r.segs,i=r.curveness;if(r.polyline)for(var n=0,o=0;o<a.length;){var s=a[o++];if(s>0)for(var l=a[o++],u=a[o++],h=1;h<s;h++){var f=a[o++],c=a[o++];if(Ea(l,u,f,c))return n}n++}else for(var n=0,o=0;o<a.length;){var l=a[o++],u=a[o++],f=a[o++],c=a[o++];if(i>0){var v=(l+f)/2-(u-c)*i,d=(u+c)/2-(f-l)*i;if(P0(l,u,v,d,f,c))return n}else if(Ea(l,u,f,c))return n;n++}return-1}});function Tb(){this.group=new q}var Hi=Tb.prototype;Hi.isPersistent=function(){return!this._incremental},Hi.updateData=function(t){this.group.removeAll();var e=new Ab({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},Hi.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new He({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Hi.incrementalUpdate=function(t,e){var r=new Ab;r.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(r,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(r,!0):(r.rectHover=!0,r.cursor="default",r.__startIndex=t.start,this.group.add(r))},Hi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Hi._setCommon=function(t,e,r){var a=e.hostModel;t.setShape({polyline:a.get("polyline"),curveness:a.get("lineStyle.curveness")}),t.useStyle(a.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var i=e.getVisual("color");i&&t.setStyle("stroke",i),t.setStyle("fill"),r||(t.seriesIndex=a.seriesIndex,t.on("mousemove",function(n){t.dataIndex=null;var o=t.findDataIndex(n.offsetX,n.offsetY);o>0&&(t.dataIndex=o+t.__startIndex)}))},Hi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var Cb={seriesType:"lines",plan:Mn(),reset:function(t){var e=t.coordinateSystem,r=t.get("polyline"),a=t.pipelineContext.large;function i(n,o){var s=[];if(a){var l,u=n.end-n.start;if(r){for(var h=0,f=n.start;f<n.end;f++)h+=t.getLineCoordsCount(f);l=new Float32Array(u+h*2)}else l=new Float32Array(u*4);for(var c=0,v=[],f=n.start;f<n.end;f++){var d=t.getLineCoords(f,s);r&&(l[c++]=d);for(var g=0;g<d;g++)v=e.dataToPoint(s[g],!1,v),l[c++]=v[0],l[c++]=v[1]}o.setLayout("linesPoints",l)}else for(var f=n.start;f<n.end;f++){var p=o.getItemModel(f),d=t.getLineCoords(f,s),m=[];if(r)for(var y=0;y<d;y++)m.push(e.dataToPoint(s[y]));else{m[0]=e.dataToPoint(s[0]),m[1]=e.dataToPoint(s[1]);var _=p.get("lineStyle.curveness");+_&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*_,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*_])}o.setItemLayout(f,m)}}return{progress:i}}};ke({type:"lines",init:function(){},render:function(t,e,r){var a=t.getData(),i=this._updateLineDraw(a,t),n=t.get("zlevel"),o=t.get("effect.trailLength"),s=r.getZr(),l=s.painter.getType()==="svg";if(l||s.painter.getLayer(n).clear(!0),this._lastZlevel!=null&&!l&&s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&o){if(T){var u=!1;e.eachSeries(function(f){f!==t&&f.get("zlevel")===n&&(u=!0)}),u&&console.warn("Lines with trail effect should have an individual zlevel")}l||s.configLayer(n,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})}i.updateData(a);var h=t.get("clip",!0)&&Gu(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=n,this._finished=!0},incrementalPrepareRender:function(t,e,r){var a=t.getData(),i=this._updateLineDraw(a,t);i.incrementalPrepareUpdate(a),this._clearLayer(r),this._finished=!1},incrementalRender:function(t,e,r){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,r){var a=t.getData(),i=t.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var n=Cb.reset(t);n.progress&&n.progress({start:0,end:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(r)},_updateLineDraw:function(t,e){var r=this._lineDraw,a=this._showEffect(e),i=!!e.get("polyline"),n=e.pipelineContext,o=n.large;return T&&a&&o&&console.warn("Large lines not support effect"),(!r||a!==this._hasEffet||i!==this._isPolyline||o!==this._isLargeDraw)&&(r&&r.remove(),r=this._lineDraw=o?new Tb:new oh(i?a?Lg:ph:a?Fs:zs),this._hasEffet=a,this._isPolyline=i,this._isLargeDraw=o,this.group.removeAll()),this.group.add(r.group),r},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),r=e.painter.getType()==="svg";!r&&this._lastZlevel!=null&&e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});function _h(t){return t instanceof Array||(t=[t,t]),t}var Db="lineStyle.opacity".split("."),uN={seriesType:"lines",reset:function(t,e,r){var a=_h(t.get("symbol")),i=_h(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("opacity",t.get(Db));function o(s,l){var u=s.getItemModel(l),h=_h(u.getShallow("symbol",!0)),f=_h(u.getShallow("symbolSize",!0)),c=u.get(Db);h[0]&&s.setItemVisual(l,"fromSymbol",h[0]),h[1]&&s.setItemVisual(l,"toSymbol",h[1]),f[0]&&s.setItemVisual(l,"fromSymbolSize",f[0]),f[1]&&s.setItemVisual(l,"toSymbolSize",f[1]),s.setItemVisual(l,"opacity",c)}return{dataEach:n.hasItemOption?o:null}}};Gt(Cb),Rt(uN),Vt.extend({type:"series.heatmap",getInitialData:function(t,e){return ca(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=_e.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});var hN=256;function Mb(){var t=rn();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}Mb.prototype={update:function(t,e,r,a,i,n){var o=this._getBrush(),s=this._getGradient(t,i,"inRange"),l=this._getGradient(t,i,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),c=t.length;h.width=e,h.height=r;for(var v=0;v<c;++v){var d=t[v],g=d[0],p=d[1],m=d[2],y=a(m);f.globalAlpha=y,f.drawImage(o,g-u,p-u)}if(!h.width||!h.height)return h;for(var _=f.getImageData(0,0,h.width,h.height),w=_.data,b=0,A=w.length,S=this.minOpacity,D=this.maxOpacity,I=D-S;b<A;){var y=w[b+3]/256,L=Math.floor(y*(hN-1))*4;if(y>0){var P=n(y)?s:l;y>0&&(y=y*I+S),w[b++]=P[L],w[b++]=P[L+1],w[b++]=P[L+2],w[b++]=P[L+3]*y*256}else b+=4}return f.putImageData(_,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=rn()),e=this.pointSize+this.blurSize,r=e*2;t.width=r,t.height=r;var a=t.getContext("2d");return a.clearRect(0,0,r,r),a.shadowOffsetX=r,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-e,e,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),t},_getGradient:function(t,e,r){for(var a=this._gradientPixels,i=a[r]||(a[r]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i}};function fN(t,e,r){var a=t[1]-t[0];e=V(e,function(o){return{interval:[(o.interval[0]-t[0])/a,(o.interval[1]-t[0])/a]}});var i=e.length,n=0;return function(o){for(var s=n;s<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}if(s===i)for(var s=n-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s<i&&r[s]}}function cN(t,e){var r=t[1]-t[0];return e=[(e[0]-t[0])/r,(e[1]-t[0])/r],function(a){return a>=e[0]&&a<=e[1]}}function vN(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}ke({type:"heatmap",render:function(t,e,r){var a;if(e.eachComponent("visualMap",function(n){n.eachTargetSeries(function(o){o===t&&(a=n)})}),T&&!a)throw new Error("Heatmap must use with visualMap");this.group.removeAll(),this._incrementalDisplayable=null;var i=t.coordinateSystem;i.type==="cartesian2d"||i.type==="calendar"?this._renderOnCartesianAndCalendar(t,r,0,t.getData().count()):vN(i)&&this._renderOnGeo(i,t,a,r)},incrementalPrepareRender:function(t,e,r){this.group.removeAll()},incrementalRender:function(t,e,r,a){var i=e.coordinateSystem;i&&this._renderOnCartesianAndCalendar(e,a,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,r,a,i){var n=t.coordinateSystem,o,s;if(n.type==="cartesian2d"){var l=n.getAxis("x"),u=n.getAxis("y");if(T){if(!(l.type==="category"&&u.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(l.onBand&&u.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}o=l.getBandWidth(),s=u.getBandWidth()}for(var h=this.group,f=t.getData(),c="itemStyle",v="emphasis.itemStyle",d="label",g="emphasis.label",p=t.getModel(c).getItemStyle(["color"]),m=t.getModel(v).getItemStyle(),y=t.getModel(d),_=t.getModel(g),w=n.type,b=w==="cartesian2d"?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],A=r;A<a;A++){var S;if(w==="cartesian2d"){if(isNaN(f.get(b[2],A)))continue;var D=n.dataToPoint([f.get(b[0],A),f.get(b[1],A)]);S=new xt({shape:{x:Math.floor(Math.round(D[0])-o/2),y:Math.floor(Math.round(D[1])-s/2),width:Math.ceil(o),height:Math.ceil(s)},style:{fill:f.getItemVisual(A,"color"),opacity:f.getItemVisual(A,"opacity")}})}else{if(isNaN(f.get(b[1],A)))continue;S=new xt({z2:1,shape:n.dataToRect([f.get(b[0],A)]).contentShape,style:{fill:f.getItemVisual(A,"color"),opacity:f.getItemVisual(A,"opacity")}})}var I=f.getItemModel(A);f.hasItemOption&&(p=I.getModel(c).getItemStyle(["color"]),m=I.getModel(v).getItemStyle(),y=I.getModel(d),_=I.getModel(g));var L=t.getRawValue(A),P="-";L&&L[2]!=null&&(P=L[2]),Fe(p,m,y,_,{labelFetcher:t,labelDataIndex:A,defaultText:P,isRectText:!0}),S.setStyle(p),Ot(S,f.hasItemOption?m:et({},m)),S.incremental=i,i&&(S.useHoverLayer=!0),h.add(S),f.setItemGraphicEl(A,S)}},_renderOnGeo:function(t,e,r,a){var i=r.targetVisuals.inRange,n=r.targetVisuals.outOfRange,o=e.getData(),s=this._hmLayer||this._hmLayer||new Mb;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),f=Math.max(l.y,0),c=Math.min(l.width+l.x,a.getWidth()),v=Math.min(l.height+l.y,a.getHeight()),d=c-h,g=v-f,p=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],m=o.mapArray(p,function(b,A,S){var D=t.dataToPoint([b,A]);return D[0]-=h,D[1]-=f,D.push(S),D}),y=r.getExtent(),_=r.type==="visualMap.continuous"?cN(y,r.option.range):fN(y,r.getPieceList(),r.option.selected);s.update(m,d,g,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:n.color.getColorMapper()},_);var w=new ve({style:{width:d,height:g,x:h,y:f,image:s.canvas},silent:!0});this.group.add(w)},dispose:function(){}});var dN=K1.extend({type:"series.pictorialBar",dependencies:["grid"],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%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,dN.superApply(this,"getInitialData",arguments)}}),gN=["itemStyle","borderWidth"],Ib=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Pg=new Br,j5=ke({type:"pictorialBar",render:function(t,e,r){var a=this.group,i=t.getData(),n=this._data,o=t.coordinateSystem,s=o.getBaseAxis(),l=!!s.isHorizontal(),u=o.grid.getRect(),h={ecSize:{width:r.getWidth(),height:r.getHeight()},seriesModel:t,coordSys:o,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:l,valueDim:Ib[+l],categoryDim:Ib[1-l]};return i.diff(n).add(function(f){if(!!i.hasValue(f)){var c=kb(i,f),v=Lb(i,f,c,h),d=zb(i,h,v);i.setItemGraphicEl(f,d),a.add(d),Gb(d,h,v)}}).update(function(f,c){var v=n.getItemGraphicEl(c);if(!i.hasValue(f)){a.remove(v);return}var d=kb(i,f),g=Lb(i,f,d,h),p=Vb(i,g);v&&p!==v.__pictorialShapeStr&&(a.remove(v),i.setItemGraphicEl(f,null),v=null),v?bN(v,h,g):v=zb(i,h,g,!0),i.setItemGraphicEl(f,v),v.__pictorialSymbolMeta=g,a.add(v),Gb(v,h,g)}).remove(function(f){var c=n.getItemGraphicEl(f);c&&Bb(n,f,c.__pictorialSymbolMeta.animationModel,c)}).execute(),this._data=i,this.group},dispose:ce,remove:function(t,e){var r=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(i){Bb(a,i.dataIndex,t,i)}):r.removeAll()}});function Lb(t,e,r,a){var i=t.getItemLayout(e),n=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),c={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:f?r:null,hoverAnimation:f&&r.get("hoverAnimation"),z2:r.getShallow("z",!0)||0};pN(r,n,i,a,c),mN(t,e,i,n,o,c.boundingLength,c.pxSign,h,a,c),yN(r,c.symbolScale,u,a,c);var v=c.symbolSize,d=r.get("symbolOffset");return z(d)&&(d=[H(d[0],v[0]),H(d[1],v[1])]),_N(r,v,i,n,o,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,a,c),c}function pN(t,e,r,a,i){var n=a.valueDim,o=t.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[n.wh]<=0),h;if(z(o)){var f=[Eg(s,o[0])-l,Eg(s,o[1])-l];f[1]<f[0]&&f.reverse(),h=f[u]}else o!=null?h=Eg(s,o)-l:e?h=a.coordSysExtent[n.index][u]-l:h=r[n.wh];i.boundingLength=h,e&&(i.repeatCutLength=r[n.wh]),i.pxSign=h>0?1:h<0?-1:0}function Eg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function mN(t,e,r,a,i,n,o,s,l,u){var h=l.valueDim,f=l.categoryDim,c=Math.abs(r[f.wh]),v=t.getItemVisual(e,"symbolSize");z(v)?v=v.slice():(v==null&&(v="100%"),v=[v,v]),v[f.index]=H(v[f.index],c),v[h.index]=H(v[h.index],a?c:Math.abs(n)),u.symbolSize=v;var d=u.symbolScale=[v[0]/s,v[1]/s];d[h.index]*=(l.isHorizontal?-1:1)*o}function yN(t,e,r,a,i){var n=t.get(gN)||0;n&&(Pg.attr({scale:e.slice(),rotation:r}),Pg.updateTransform(),n/=Pg.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n}function _N(t,e,r,a,i,n,o,s,l,u,h,f){var c=h.categoryDim,v=h.valueDim,d=f.pxSign,g=Math.max(e[v.index]+s,0),p=g;if(a){var m=Math.abs(l),y=Ut(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=H(y,e[v.index]);var w=Math.max(g+y*2,0),b=_?0:y*2,A=yy(a),S=A?a:Hb((m+b)/w),D=m-S*g;y=D/2/(_?S:S-1),w=g+y*2,b=_?0:y*2,!A&&a!=="fixed"&&(S=u?Hb((Math.abs(u)+b)/w):0),p=S*w-b,f.repeatTimes=S,f.symbolMargin=y}var I=d*(p/2),L=f.pathPosition=[];L[c.index]=r[c.wh]/2,L[v.index]=o==="start"?I:o==="end"?l-I:l/2,n&&(L[0]+=n[0],L[1]+=n[1]);var P=f.bundlePosition=[];P[c.index]=r[c.xy],P[v.index]=r[v.xy];var R=f.barRectShape=et({},r);R[v.wh]=d*Math.max(Math.abs(r[v.wh]),Math.abs(L[v.index]+I)),R[c.wh]=r[c.wh];var E=f.clipShape={};E[c.xy]=-r[c.xy],E[c.wh]=h.ecSize[c.wh],E[v.xy]=0,E[v.wh]=r[v.wh]}function Pb(t){var e=t.symbolPatternSize,r=Ye(t.symbolType,-e/2,-e/2,e,e,t.color);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function Eb(t,e,r,a){var i=t.__pictorialBundle,n=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,h=0,f=n[e.valueDim.index]+o+r.symbolMargin*2;for(Ws(t,function(m){m.__pictorialAnimationIndex=h,m.__pictorialRepeatTimes=u,h<u?ao(m,null,d(h),r,a):ao(m,null,{scale:[0,0]},r,a,function(){i.remove(m)}),Rg(m,r),h++});h<u;h++){var c=Pb(r);c.__pictorialAnimationIndex=h,c.__pictorialRepeatTimes=u,i.add(c);var v=d(h);ao(c,{position:v.position,scale:[0,0]},{scale:v.scale,rotation:v.rotation},r,a),c.on("mouseover",g).on("mouseout",p),Rg(c,r)}function d(m){var y=s.slice(),_=r.pxSign,w=m;return(r.symbolRepeatDirection==="start"?_>0:_<0)&&(w=u-1-m),y[l.index]=f*(w-u/2+.5)+s[l.index],{position:y,scale:r.symbolScale.slice(),rotation:r.rotation}}function g(){Ws(t,function(m){m.trigger("emphasis")})}function p(){Ws(t,function(m){m.trigger("normal")})}}function Rb(t,e,r,a){var i=t.__pictorialBundle,n=t.__pictorialMainPath;n?ao(n,null,{position:r.pathPosition.slice(),scale:r.symbolScale.slice(),rotation:r.rotation},r,a):(n=t.__pictorialMainPath=Pb(r),i.add(n),ao(n,{position:r.pathPosition.slice(),scale:[0,0],rotation:r.rotation},{scale:r.symbolScale.slice()},r,a),n.on("mouseover",o).on("mouseout",s)),Rg(n,r);function o(){this.trigger("emphasis")}function s(){this.trigger("normal")}}function Ob(t,e,r){var a=et({},e.barRectShape),i=t.__pictorialBarRect;i?ao(i,null,{shape:a},e,r):(i=t.__pictorialBarRect=new xt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(i))}function Nb(t,e,r,a){if(r.symbolClip){var i=t.__pictorialClipPath,n=et({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)ft(i,{shape:n},s,l);else{n[o.wh]=0,i=new xt({shape:n}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],sa[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function kb(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=xN,r.isAnimationEnabled=wN,r}function xN(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function wN(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Rg(t,e){t.off("emphasis").off("normal");var r=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[r[0]*1.1,r[1]*1.1]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:r.slice()},400,"elasticOut")})}function zb(t,e,r,a){var i=new q,n=new q;return i.add(n),i.__pictorialBundle=n,n.attr("position",r.bundlePosition.slice()),r.symbolRepeat?Eb(i,e,r):Rb(i,e,r),Ob(i,r,a),Nb(i,e,r,a),i.__pictorialShapeStr=Vb(t,r),i.__pictorialSymbolMeta=r,i}function bN(t,e,r){var a=r.animationModel,i=r.dataIndex,n=t.__pictorialBundle;ft(n,{position:r.bundlePosition.slice()},a,i),r.symbolRepeat?Eb(t,e,r,!0):Rb(t,e,r,!0),Ob(t,r,!0),Nb(t,e,r,!0)}function Bb(t,e,r,a){var i=a.__pictorialBarRect;i&&(i.style.text=null);var n=[];Ws(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(r=null),M(n,function(o){ft(o,{scale:[0,0]},r,e,function(){a.parent&&a.parent.remove(a)})}),t.setItemGraphicEl(e,null)}function Vb(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Ws(t,e,r){M(t.__pictorialBundle.children(),function(a){a!==t.__pictorialBarRect&&e.call(r,a)})}function ao(t,e,r,a,i,n){e&&t.attr(e),a.symbolClip&&!i?r&&t.attr(r):r&&sa[i?"updateProps":"initProps"](t,r,a.animationModel,a.dataIndex,n)}function Gb(t,e,r){var a=r.color,i=r.dataIndex,n=r.itemModel,o=n.getModel("itemStyle").getItemStyle(["color"]),s=n.getModel("emphasis.itemStyle").getItemStyle(),l=n.getShallow("cursor");Ws(t,function(c){c.setColor(a),c.setStyle(J({fill:a,opacity:r.opacity},o)),Ot(c,s),l&&(c.cursor=l),c.z2=r.z2});var u={},h=e.valueDim.posDesc[+(r.boundingLength>0)],f=t.__pictorialBarRect;j1(f.style,u,n,a,e.seriesModel,i,h),Ot(f,u)}function Hb(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}Gt(ot(t1,"pictorialBar")),Rt(Ii("pictorialBar","roundRect"));var xh=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom",this.orient=null};xh.prototype={constructor:xh,model:null,isHorizontal:function(){var t=this.position;return t==="top"||t==="bottom"},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},It(xh,Qt);function wh(t,e,r){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,r),this.model=t}wh.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:wh,_init:function(t,e,r){var a=this.dimension,i=new xh(a,zn(t),[0,0],t.get("type"),t.get("position")),n=i.type==="category";i.onBand=n&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},update:function(t,e){t.eachSeries(function(r){if(r.coordinateSystem===this){var a=r.getData();M(a.mapDimension(this.dimension,!0),function(i){this._axis.scale.unionExtentFromData(a,i)},this),Fa(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=qt({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,r=e.isHorizontal(),a=r?[0,t.width]:[0,t.height],i=e.reverse?1:0;e.setExtent(a[i],a[1-i]),this._updateAxisTransform(e,r?t.x:t.y)},_updateAxisTransform:function(t,e){var r=t.getExtent(),a=r[0]+r[1],i=t.isHorizontal();t.toGlobalCoord=i?function(n){return n+e}:function(n){return a-n+e},t.toLocalCoord=i?function(n){return n-e}:function(n){return a-n+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),r=this.getAxis(),a=r.orient;return a==="horizontal"?r.contain(r.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:r.contain(r.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),r=this.getRect(),a=[],i=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),a[i]=e.toGlobalCoord(e.dataToCoord(+t)),a[1-i]=i===0?r.y+r.height/2:r.x+r.width/2,a}};function SN(t,e){var r=[];return t.eachComponent("singleAxis",function(a,i){var n=new wh(a,t,e);n.name="single_"+i,n.resize(a,e),a.coordinateSystem=n,r.push(n)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=t.queryComponents({mainType:"singleAxis",index:a.get("singleAxisIndex"),id:a.get("singleAxisId")})[0];a.coordinateSystem=i&&i.coordinateSystem}}),r}_e.register("single",{create:SN,dimensions:wh.prototype.dimensions});function Og(t,e){e=e||{};var r=t.coordinateSystem,a=t.axis,i={},n=a.position,o=a.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var h={horizontal:0,vertical:1};i.rotation=Math.PI/2*h[o];var f={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=f[n],t.get("axisTick.inside")&&(i.tickDirection=-i.tickDirection),Ut(e.labelInside,t.get("axisLabel.inside"))&&(i.labelDirection=-i.labelDirection);var c=e.rotate;return c==null&&(c=t.get("axisLabel.rotate")),i.labelRotation=n==="top"?-c:c,i.z2=1,i}var AN=["axisLine","axisTickLabel","axisName"],TN=["splitArea","splitLine"],CN=Xe.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,r,a){var i=this.group;i.removeAll();var n=this._axisGroup;this._axisGroup=new q;var o=Og(t),s=new ze(t,o);M(AN,s.add,s),i.add(this._axisGroup),i.add(s.getGroup()),M(TN,function(l){t.get(l+".show")&&this["_"+l](t)},this),au(n,this._axisGroup,t),CN.superCall(this,"render",t,e,r,a)},remove:function(){q1(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var r=t.getModel("splitLine"),a=r.getModel("lineStyle"),i=a.get("width"),n=a.get("color");n=n instanceof Array?n:[n];for(var o=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:r}),f=[],c=[],v=0;v<h.length;++v){var d=e.toGlobalCoord(h[v].coord);s?(f[0]=d,f[1]=o.y,c[0]=d,c[1]=o.y+o.height):(f[0]=o.x,f[1]=d,c[0]=o.x+o.width,c[1]=d);var g=u++%n.length;l[g]=l[g]||[],l[g].push(new ye({subPixelOptimize:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:{lineWidth:i},silent:!0}))}for(var v=0;v<l.length;++v)this.group.add(or(l[v],{style:{stroke:n[v%n.length],lineDash:a.getLineDash(i),lineWidth:i},silent:!0}))}},_splitArea:function(t){X1(this,this._axisGroup,t,t)}}),Fb=wt.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),DN={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}};function MN(t,e){return e.type||(e.data?"category":"value")}ut(Fb.prototype,Di),Gn("single",Fb,MN,DN);var Wb=function(t,e){var r=[],a=t.seriesIndex,i;if(a==null||!(i=e.getSeriesByIndex(a)))return{point:[]};var n=i.getData(),o=Rl(n,t);if(o==null||o<0||z(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)r=l.dataToPoint(n.getValues(V(l.dimensions,function(h){return n.mapDimension(h)}),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),r=[u.x+u.width/2,u.y+u.height/2]}return{point:r,el:s}},qr=M,Ub=ot,$b=Pe(),IN=function(t,e,r){var a=t.currTrigger,i=[t.x,t.y],n=t,o=t.dispatchAction||it(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){bh(i)&&(i=Wb({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=bh(i),u=n.axesInfo,h=s.axesInfo,f=a==="leave"||bh(i),c={},v={},d={list:[],map:{}},g={showPointer:Ub(PN,v),showTooltip:Ub(EN,d)};qr(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);qr(s.coordSysAxesInfo[y],function(w,b){var A=w.axis,S=kN(u,w);if(!f&&_&&(!u||S)){var D=S&&S.value;D==null&&!l&&(D=A.pointToData(i)),D!=null&&Zb(w,D,g,!1,c)}})});var p={};return qr(h,function(m,y){var _=m.linkGroup;_&&!v[y]&&qr(_.axesInfo,function(w,b){var A=v[b];if(w!==m&&A){var S=A.value;_.mapper&&(S=m.axis.scale.parse(_.mapper(S,Yb(w),Yb(m)))),p[m.key]=S}})}),qr(p,function(m,y){Zb(h[y],m,g,!0,c)}),RN(v,h,c),ON(d,i,t,o),NN(h,o,r),c}};function Zb(t,e,r,a,i){var n=t.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=LN(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&et(i,s[0]),!a&&t.snap&&n.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s,i),r.showTooltip(t,o,l)}}function LN(t,e){var r=e.axis,a=r.dim,i=t,n=[],o=Number.MAX_VALUE,s=-1;return qr(e.seriesModels,function(l,u){var h=l.getData().mapDimension(a,!0),f,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(h,t,r);c=v.dataIndices,f=v.nestestValue}else{if(c=l.getData().indicesOfNearest(h[0],t,r.type==="category"?.5:null),!c.length)return;f=l.getData().get(h[0],c[0])}if(!(f==null||!isFinite(f))){var d=t-f,g=Math.abs(d);g<=o&&((g<o||d>=0&&s<0)&&(o=g,s=d,i=f,n.length=0),qr(c,function(p){n.push({seriesIndex:l.seriesIndex,dataIndexInside:p,dataIndex:l.getData().getRawIndex(p)})}))}}),{payloadBatch:n,snapToValue:i}}function PN(t,e,r,a){t[e.key]={value:r,payloadBatch:a}}function EN(t,e,r,a){var i=r.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=xs(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:i.slice()})}}function RN(t,e,r){var a=r.axesInfo=[];qr(e,function(i,n){var o=i.axisPointerModel.option,s=t[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function ON(t,e,r,a){if(bh(e)||!t.list.length){a({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function NN(t,e,r){var a=r.getZr(),i="axisPointerLastHighlights",n=$b(a)[i]||{},o=$b(a)[i]={};qr(t,function(u,h){var f=u.axisPointerModel.option;f.status==="show"&&qr(f.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];M(n,function(u,h){!o[h]&&l.push(u)}),M(o,function(u,h){!n[h]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function kN(t,e){for(var r=0;r<(t||[]).length;r++){var a=t[r];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function Yb(t){var e=t.axis.model,r={},a=r.axisDim=t.axis.dim;return r.axisIndex=r[a+"AxisIndex"]=e.componentIndex,r.axisName=r[a+"AxisName"]=e.name,r.axisId=r[a+"AxisId"]=e.id,r}function bh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}var Q5=Ze({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},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}}}),ga=Pe(),zN=M;function Xb(t,e,r){if(!G.node){var a=e.getZr();ga(a).records||(ga(a).records={}),BN(a,e);var i=ga(a).records[t]||(ga(a).records[t]={});i.handler=r}}function BN(t,e){if(ga(t).initialized)return;ga(t).initialized=!0,r("click",ot(qb,"click")),r("mousemove",ot(qb,"mousemove")),r("globalout",GN);function r(a,i){t.on(a,function(n){var o=HN(e);zN(ga(t).records,function(s){s&&i(s,n,o.dispatchAction)}),VN(o.pendings,e)})}}function VN(t,e){var r=t.showTip.length,a=t.hideTip.length,i;r?i=t.showTip[r-1]:a&&(i=t.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function GN(t,e,r){t.handler("leave",null,r)}function qb(t,e,r,a){e.handler(t,r,a)}function HN(t){var e={showTip:[],hideTip:[]},r=function(a){var i=e[a.type];i?i.push(a):(a.dispatchAction=r,t.dispatchAction(a))};return{dispatchAction:r,pendings:e}}function Ng(t,e){if(!G.node){var r=e.getZr(),a=(ga(r).records||{})[t];a&&(ga(r).records[t]=null)}}var Kb=he({type:"axisPointer",render:function(t,e,r){var a=e.getComponent("tooltip"),i=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Xb("axisPointer",r,function(n,o,s){i!=="none"&&(n==="leave"||i.indexOf(n)>=0)&&s({type:"updateAxisPointer",currTrigger:n,x:o&&o.offsetX,y:o&&o.offsetY})})},remove:function(t,e){Ng(e.getZr(),"axisPointer"),Kb.superApply(this._model,"remove",arguments)},dispose:function(t,e){Ng("axisPointer",e),Kb.superApply(this._model,"dispose",arguments)}}),Fi=Pe(),jb=rt,kg=it;function Wi(){}Wi.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,r,a){var i=e.get("value"),n=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=r,!(!a&&this._lastValue===i&&this._lastStatus===n)){this._lastValue=i,this._lastStatus=n;var o=this._group,s=this._handle;if(!n||n==="hide"){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var l={};this.makeElOption(l,i,t,e,r);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(!o)o=this._group=new q,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),r.getZr().add(o);else{var f=ot(Qb,e,h);this.updatePointerEl(o,l,f,e),this.updateLabelEl(o,l,f,e)}eS(o,e,!0),this._renderHandle(i)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var r=e.get("animation"),a=t.axis,i=a.type==="category",n=e.get("snap");if(!n&&!i)return!1;if(r==="auto"||r==null){var o=this.animationThreshold;if(i&&a.getBandWidth()>o)return!0;if(n){var s=pd(t).seriesDataCount,l=a.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return r===!0},makeElOption:function(t,e,r,a,i){},createPointerEl:function(t,e,r,a){var i=e.pointer;if(i){var n=Fi(t).pointerEl=new sa[i.type](jb(e.pointer));t.add(n)}},createLabelEl:function(t,e,r,a){if(e.label){var i=Fi(t).labelEl=new xt(jb(e.label));t.add(i),tS(i,a)}},updatePointerEl:function(t,e,r){var a=Fi(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),r(a,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,r,a){var i=Fi(t).labelEl;i&&(i.setStyle(e.label.style),r(i,{shape:e.label.shape,position:e.label.position}),tS(i,a))},_renderHandle:function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,r=this._api.getZr(),a=this._handle,i=e.getModel("handle"),n=e.get("status");if(!i.get("show")||!n||n==="hide"){a&&r.remove(a),this._handle=null;return}var o;this._handle||(o=!0,a=this._handle=Ho(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oi(u.event)},onmousedown:kg(this._onHandleDragMove,this,0,0),drift:kg(this._onHandleDragMove,this),ondragend:kg(this._onHandleDragEnd,this)}),r.add(a)),eS(a,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];a.setStyle(i.getItemStyle(null,s));var l=i.get("size");z(l)||(l=[l,l]),a.attr("scale",[l[0]/2,l[1]/2]),es(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){Qb(this._axisPointerModel,!e&&this._moveAnimation,this._handle,zg(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var r=this._handle;if(!!r){this._dragging=!0;var a=this.updateHandleTransform(zg(r),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,r.stopAnimation(),r.attr(zg(a)),Fi(r).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(!!t){var e=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},_onHandleDragEnd:function(t){this._dragging=!1;var e=this._handle;if(!!e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),r=this._group,a=this._handle;e&&r&&(this._lastGraphicKey=null,r&&e.remove(r),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}},Wi.prototype.constructor=Wi;function Qb(t,e,r,a){Jb(Fi(r).lastProp,a)||(Fi(r).lastProp=a,e?ft(r,a,t):(r.stopAnimation(),r.attr(a)))}function Jb(t,e){if(lt(t)&&lt(e)){var r=!0;return M(e,function(a,i){r=r&&Jb(t[i],a)}),!!r}else return t===e}function tS(t,e){t[e.get("label.show")?"show":"hide"]()}function zg(t){return{position:t.position.slice(),rotation:t.rotation||0}}function eS(t,e,r){var a=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(n){n.type!=="group"&&(a!=null&&(n.z=a),i!=null&&(n.zlevel=i),n.silent=r)})}Lo(Wi);function Bg(t){var e=t.get("type"),r=t.getModel(e+"Style"),a;return e==="line"?(a=r.getLineStyle(),a.fill=null):e==="shadow"&&(a=r.getAreaStyle(),a.stroke=null),a}function rS(t,e,r,a,i){var n=r.get("value"),o=aS(n,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get("label.precision"),formatter:r.get("label.formatter")}),s=r.getModel("label"),l=xi(s.get("padding")||0),u=s.getFont(),h=Rr(o,u),f=i.position,c=h.width+l[1]+l[3],v=h.height+l[0]+l[2],d=i.align;d==="right"&&(f[0]-=c),d==="center"&&(f[0]-=c/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=v),g==="middle"&&(f[1]-=v/2),FN(f,c,v,a);var p=s.get("backgroundColor");(!p||p==="auto")&&(p=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:v,r:s.get("borderRadius")},position:f.slice(),style:{text:o,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:p,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function FN(t,e,r,a){var i=a.getWidth(),n=a.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,n)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function aS(t,e,r,a,i){t=e.scale.parse(t);var n=e.scale.getLabel(t,{precision:i.precision}),o=i.formatter;if(o){var s={value:rd(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};M(a,function(l){var u=r.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=u&&u.getDataParams(h);f&&s.seriesData.push(f)}),Lt(o)?n=o.replace("{value}",n):se(o)&&(n=o(s))}return n}function Vg(t,e,r){var a=Ie();return aa(a,a,r.rotation),yr(a,a,r.position),Hr([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],a)}function iS(t,e,r,a,i,n){var o=ze.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get("label.margin"),rS(e,a,i,n,{position:Vg(a.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Gg(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function nS(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function oS(t,e,r,a,i,n){return{cx:t,cy:e,r0:r,r:a,startAngle:i,endAngle:n,clockwise:!0}}var WN=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.grid,s=a.get("type"),l=sS(o,n).getOtherAxis(n).getGlobalExtent(),u=n.toGlobalCoord(n.dataToCoord(e,!0));if(s&&s!=="none"){var h=Bg(a),f=UN[s](n,u,l);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=_d(o.model,r);iS(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=_d(e.axis.grid.model,e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:Vg(e.axis,t,a),rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,a){var i=r.axis,n=i.grid,o=i.getGlobalExtent(!0),s=sS(n,i).getOtherAxis(i).getGlobalExtent(),l=i.dim==="x"?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var h=(s[1]+s[0])/2,f=[h,h];f[l]=u[l];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:f,tooltipOption:c[l]}}});function sS(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var UN={line:function(t,e,r){var a=Gg([e,r[0]],[e,r[1]],lS(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:nS([e-a/2,r[0]],[a,i],lS(t))}}};function lS(t){return t.dim==="x"?0:1}Xe.registerAxisPointerClass("CartesianAxisPointer",WN),we(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!z(e)&&(t.axisPointer.link=[e])}}),$e(Wr.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=JL(t,e)}),mt({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},IN);var uS=["x","y"],$N=["width","height"],ZN=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.coordinateSystem,s=Hg(o,1-Sh(n)),l=o.dataToPoint(e)[0],u=a.get("type");if(u&&u!=="none"){var h=Bg(a),f=YN[u](n,l,s);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=Og(r);iS(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=Og(e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:Vg(e.axis,t,a),rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,a){var i=r.axis,n=i.coordinateSystem,o=Sh(i),s=Hg(n,o),l=t.position;l[o]+=e[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var u=Hg(n,1-o),h=(u[1]+u[0])/2,f=[h,h];return f[o]=l[o],{position:l,rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}}}),YN={line:function(t,e,r){var a=Gg([e,r[0]],[e,r[1]],Sh(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:nS([e-a/2,r[0]],[a,i],Sh(t))}}};function Sh(t){return t.isHorizontal()?0:1}function Hg(t,e){var r=t.getRect();return[r[uS[e]],r[uS[e]]+r[$N[e]]]}Xe.registerAxisPointerClass("SingleAxisPointer",ZN),he({type:"single"});var Fg=2,XN=Vt.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){XN.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this))},fixData:function(t){var e=t.length,r=Rc(t,function(m){return m[2]}),a=[];r.buckets.each(function(m,y){a.push({name:y,dataList:m})});for(var i=a.length,n=-1,o=-1,s=0;s<i;++s){var l=a[s].dataList.length;l>n&&(n=l,o=s)}for(var u=0;u<i;++u)if(u!==o)for(var h=a[u].name,f=0;f<n;++f){for(var c=a[o].dataList[f][0],v=a[u].dataList.length,d=-1,g=0;g<v;++g){var p=a[u].dataList[g][0];if(p===c){d=g;break}}d===-1&&(t[e]=[],t[e][0]=c,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var r=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0],a=r.get("type"),i=ee(t.data,function(c){return c[2]!==void 0}),n=this.fixData(i||[]),o=[],s=this.nameMap=ht(),l=0,u=0;u<n.length;++u)o.push(n[u][Fg]),s.get(n[u][Fg])||(s.set(n[u][Fg],l),l++);var h=En(n,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Iu(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),f=new fe(h,this);return f.initData(n),f},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),r=[],a=0;a<e;++a)r[a]=a;var i=t.mapDimension("single"),n=Rc(r,function(s){return t.get("name",s)}),o=[];return n.buckets.each(function(s,l){s.sort(function(u,h){return t.get(i,u)-t.get(i,h)}),o.push({name:l,indices:s})}),o},getAxisTooltipData:function(t,e,r){z(t)||(t=t?[t]:[]);for(var a=this.getData(),i=this.getLayerSeries(),n=[],o=i.length,s,l=0;l<o;++l){for(var u=Number.MAX_VALUE,h=-1,f=i[l].indices.length,c=0;c<f;++c){var v=a.get(t[0],i[l].indices[c]),d=Math.abs(v-e);d<=u&&(s=v,u=d,h=i[l].indices[c])}n.push(h)}return{dataIndices:n,nestestValue:s}},formatTooltip:function(t){var e=this.getData(),r=e.getName(t),a=e.get(e.mapDimension("value"),t);return(isNaN(a)||a==null)&&(a="-"),kt(r+" : "+a)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});ke({type:"themeRiver",init:function(){this._layers=[]},render:function(t,e,r){var a=t.getData(),i=this.group,n=t.getLayerSeries(),o=a.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;i.attr("position",[0,s.y+l[0]]);function u(v){return v.name}var h=new ha(this._layersSeries||[],n,u,u),f={};h.add(it(c,this,"add")).update(it(c,this,"update")).remove(it(c,this,"remove")).execute();function c(v,d,g){var p=this._layers;if(v==="remove"){i.remove(p[d]);return}for(var m=[],y=[],_,w=n[d].indices,b=0;b<w.length;b++){var A=a.getItemLayout(w[b]),S=A.x,D=A.y0,I=A.y;m.push([S,D]),y.push([S,D+I]),_=a.getItemVisual(w[b],"color")}var L,P,R=a.getItemLayout(w[0]),E=a.getItemModel(w[b-1]),Z=E.getModel("label"),W=Z.get("margin");if(v==="add"){var $=f[d]=new q;L=new T1({shape:{points:m,stackedOnPoints:y,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),P=new dt({style:{x:R.x-W,y:R.y0+R.y/2}}),$.add(L),$.add(P),i.add($),L.setClipPath(qN(L.getBoundingRect(),t,function(){L.removeClipPath()}))}else{var $=p[g];L=$.childAt(0),P=$.childAt(1),i.add($),f[d]=$,ft(L,{shape:{points:m,stackedOnPoints:y}},t),ft(P,{style:{x:R.x-W,y:R.y0+R.y/2}},t)}var X=E.getModel("emphasis.itemStyle"),K=E.getModel("itemStyle");$t(P.style,Z,{text:Z.get("show")?t.getFormattedLabel(w[b-1],"normal")||a.getName(w[b-1]):null,textVerticalAlign:"middle"}),L.setStyle(et({fill:_},K.getItemStyle(["color"]))),Ot(L,X.getItemStyle())}this._layersSeries=n,this._layers=f},dispose:function(){}});function qN(t,e,r){var a=new xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Se(a,{shape:{width:t.width+20,height:t.height+20}},e,r),a}var KN=function(t,e){t.eachSeriesByType("themeRiver",function(r){var a=r.getData(),i=r.coordinateSystem,n={},o=i.getRect();n.rect=o;var s=r.get("boundaryGap"),l=i.getAxis();if(n.boundaryGap=s,l.orient==="horizontal"){s[0]=H(s[0],o.height),s[1]=H(s[1],o.height);var u=o.height-s[0]-s[1];hS(a,r,u)}else{s[0]=H(s[0],o.width),s[1]=H(s[1],o.width);var h=o.width-s[0]-s[1];hS(a,r,h)}a.setLayout("layoutInfo",n)})};function hS(t,e,r){if(!!t.count())for(var a=e.coordinateSystem,i=e.getLayerSeries(),n=t.mapDimension("single"),o=t.mapDimension("value"),s=V(i,function(p){return V(p.indices,function(m){var y=a.dataToPoint(t.get(n,m));return y[1]=t.get(o,m),y})}),l=jN(s),u=l.y0,h=r/l.max,f=i.length,c=i[0].indices.length,v,d=0;d<c;++d){v=u[d]*h,t.setItemLayout(i[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:v,y:s[0][d][1]*h});for(var g=1;g<f;++g)v+=s[g-1][d][1]*h,t.setItemLayout(i[g].indices[d],{layerIndex:g,x:s[g][d][0],y0:v,y:s[g][d][1]*h})}}function jN(t){for(var e=t.length,r=t[0].length,a=[],i=[],n=0,o,s={},l=0;l<r;++l){for(var u=0,o=0;u<e;++u)o+=t[u][l][1];o>n&&(n=o),a.push(o)}for(var h=0;h<r;++h)i[h]=(n-a[h])/2;n=0;for(var f=0;f<r;++f){var c=a[f]+i[f];c>n&&(n=c)}return s.y0=i,s.max=n,s}var QN=function(t){t.eachSeriesByType("themeRiver",function(e){var r=e.getData(),a=e.getRawData(),i=e.get("color"),n=ht();r.each(function(o){n.set(r.getRawIndex(o),o)}),a.each(function(o){var s=a.getName(o),l=i[(e.nameMap.get(s)-1)%i.length];a.setItemVisual(o,"color",l);var u=n.get(o);u!=null&&r.setItemVisual(u,"color",l)})})};Gt(KN),Rt(QN),$e(bs("themeRiver")),Vt.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var r={name:t.name,children:t.data};fS(r);var a=t.levels||[],i={};return i.levels=a,Ei.createTree(r,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Vt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Gd(r,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",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},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});function fS(t){var e=0;M(t.children,function(a){fS(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var r=t.value;z(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),z(t.value)?t.value[0]=r:t.value=r}var Ah={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},JN=2,tk=4;function Th(t,e,r){q.call(this);var a=new Ar({z2:JN});a.seriesIndex=e.seriesIndex;var i=new dt({z2:tk,silent:t.getModel("label").get("silent")});this.add(a),this.add(i),this.updateData(!0,t,"normal",e,r);function n(){i.ignore=i.hoverIgnore}function o(){i.ignore=i.normalIgnore}this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}var Ui=Th.prototype;Ui.updateData=function(t,e,r,a,i){this.node=e,e.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var n=this.childAt(0);n.dataIndex=e.dataIndex;var o=e.getModel(),s=e.getLayout(),l=et({},s);l.label=null;var u=ek(e,a,i);ik(e,a,u);var h=o.getModel("itemStyle").getItemStyle(),f;if(r==="normal")f=h;else{var c=o.getModel(r+".itemStyle").getItemStyle();f=ut(c,h)}f=J({lineJoin:"bevel",fill:f.fill||u},f),t?(n.setShape(l),n.shape.r=s.r0,ft(n,{shape:{r:s.r}},a,e.dataIndex),n.useStyle(f)):typeof f.fill=="object"&&f.fill.type||typeof n.style.fill=="object"&&n.style.fill.type?(ft(n,{shape:l},a),n.useStyle(f)):ft(n,{shape:l,style:f},a),this._updateLabel(a,u,r);var v=o.getShallow("cursor");if(v&&n.attr("cursor",v),t){var d=a.getShallow("highlightPolicy");this._initEvents(n,e,a,d)}this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel,Ot(this)},Ui.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(r){r.piece&&(e.node===r?r.piece.updateData(!1,r,"emphasis"):ak(r,e.node,t)?r.piece.childAt(0).trigger("highlight"):t!==Ah.NONE&&r.piece.childAt(0).trigger("downplay"))})},Ui.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},Ui.onHighlight=function(){this.updateData(!1,this.node,"highlight")},Ui.onDownplay=function(){this.updateData(!1,this.node,"downplay")},Ui._updateLabel=function(t,e,r){var a=this.node.getModel(),i=a.getModel("label"),n=r==="normal"||r==="emphasis"?i:a.getModel(r+".label"),o=a.getModel("emphasis.label"),s=Ut(t.getFormattedLabel(this.node.dataIndex,r,null,null,"label"),this.node.name);S("show")===!1&&(s="");var l=this.node.getLayout(),u=n.get("minAngle");u==null&&(u=i.get("minAngle")),u=u/180*Math.PI;var h=l.endAngle-l.startAngle;u!=null&&Math.abs(h)<u&&(s="");var f=this.childAt(1);Fe(f.style,f.hoverStyle||{},i,o,{defaultText:n.getShallow("show")?s:null,autoColor:e,useInsideStyle:!0});var c=(l.startAngle+l.endAngle)/2,v=Math.cos(c),d=Math.sin(c),g,p=S("position"),m=S("distance")||0,y=S("align");p==="outside"?(g=l.r+m,y=c>Math.PI/2?"right":"left"):!y||y==="center"?(g=(l.r+l.r0)/2,y="center"):y==="left"?(g=l.r0+m,c>Math.PI/2&&(y="right")):y==="right"&&(g=l.r-m,c>Math.PI/2&&(y="left")),f.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var _=g*v+l.cx,w=g*d+l.cy;f.attr("position",[_,w]);var b=S("rotate"),A=0;b==="radial"?(A=-c,A<-Math.PI/2&&(A+=Math.PI)):b==="tangential"?(A=Math.PI/2-c,A>Math.PI/2?A-=Math.PI:A<-Math.PI/2&&(A+=Math.PI)):typeof b=="number"&&(A=b*Math.PI/180),f.attr("rotation",A);function S(D){var I=n.get(D);return I??i.get(D)}},Ui._initEvents=function(t,e,r,a){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var i=this,n=function(){i.onEmphasis(a)},o=function(){i.onNormal()},s=function(){i.onDownplay()},l=function(){i.onHighlight()};r.isAnimationEnabled()&&t.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o).on("downplay",s).on("highlight",l)},It(Th,q);function ek(t,e,r){var a=t.getVisual("color"),i=t.getVisual("visualMeta");(!i||i.length===0)&&(a=null);var n=t.getModel("itemStyle").get("color");if(n)return n;if(a)return a;if(t.depth===0)return r.option.color[0];var o=r.option.color.length;return n=r.option.color[rk(t)%o],n}function rk(t){for(var e=t;e.depth>1;)e=e.parentNode;var r=t.getAncestors()[0];return yt(r.children,e)}function ak(t,e,r){return r===Ah.NONE?!1:r===Ah.SELF?t===e:r===Ah.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e)}function ik(t,e,r){var a=e.getData();a.setItemVisual(t.dataIndex,"color",r)}var nk="sunburstRootToNode",J5=ue.extend({type:"sunburst",init:function(){},render:function(t,e,r,a){var i=this;this.seriesModel=t,this.api=r,this.ecModel=e;var n=t.getData(),o=n.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode(function(y){h.push(y)});var f=this._oldChildren||[];if(d(h,f),m(o,s),a&&a.highlight&&a.highlight.piece){var c=t.getShallow("highlightPolicy");a.highlight.piece.onEmphasis(c)}else if(a&&a.unhighlight){var v=this.virtualPiece;!v&&o.children.length&&(v=o.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=h;function d(y,_){if(y.length===0&&_.length===0)return;new ha(_,y,w,w).add(b).update(b).remove(ot(b,null)).execute();function w(A){return A.getId()}function b(A,S){var D=A==null?null:y[A],I=S==null?null:_[S];g(D,I)}}function g(y,_){if(!u&&y&&!y.getValue()&&(y=null),y!==o&&_!==o){if(_&&_.piece)y?(_.piece.updateData(!1,y,"normal",t,e),n.setItemGraphicEl(y.dataIndex,_.piece)):p(_);else if(y){var w=new Th(y,t,e);l.add(w),n.setItemGraphicEl(y.dataIndex,w)}}}function p(y){!y||y.piece&&(l.remove(y.piece),y.piece=null)}function m(y,_){if(_.depth>0){i.virtualPiece?i.virtualPiece.updateData(!1,y,"normal",t,e):(i.virtualPiece=new Th(y,t,e),l.add(i.virtualPiece)),_.piece._onclickEvent&&_.piece.off("click",_.piece._onclickEvent);var w=function(b){i._rootToNode(_.parentNode)};_.piece._onclickEvent=w,i.virtualPiece.on("click",w)}else i.virtualPiece&&(l.remove(i.virtualPiece),i.virtualPiece=null)}},dispose:function(){},_initEvents:function(){var t=this,e=function(r){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(n){if(!a&&n.piece&&n.piece.childAt(0)===r.target){var o=n.getModel().get("nodeClick");if(o==="rootToNode")t._rootToNode(n);else if(o==="link"){var s=n.getModel(),l=s.get("link");if(l){var u=s.get("target",!0)||"_blank";Zo(l,u)}}a=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:nk,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var r=e.getData(),a=r.getItemLayout(0);if(a){var i=t[0]-a.cx,n=t[1]-a.cy,o=Math.sqrt(i*i+n*n);return o<=a.r&&o>=a.r0}}}),cS="sunburstRootToNode";mt({type:cS,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=Is(t,[cS],a);if(n){var o=a.getViewRoot();o&&(t.direction=Vd(o,n.node)?"rollUp":"drillDown"),a.resetViewRoot(n.node)}}});var vS="sunburstHighlight";mt({type:vS,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=Is(t,[vS],a);n&&(t.highlight=n.node)}});var ok="sunburstUnhighlight";mt({type:ok,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){t.unhighlight=!0}});var dS=Math.PI/180,sk=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.get("center"),o=i.get("radius");z(o)||(o=[0,o]),z(n)||(n=[n,n]);var s=r.getWidth(),l=r.getHeight(),u=Math.min(s,l),h=H(n[0],s),f=H(n[1],l),c=H(o[0],u/2),v=H(o[1],u/2),d=-i.get("startAngle")*dS,g=i.get("minAngle")*dS,p=i.getData().tree.root,m=i.getViewRoot(),y=m.depth,_=i.get("sort");_!=null&&gS(m,_);var w=0;M(m.children,function(X){!isNaN(X.getValue())&&w++});var b=m.getValue(),A=Math.PI/(b||w)*2,S=m.depth>0,D=m.height-(S?-1:1),I=(v-c)/(D||1),L=i.get("clockwise"),P=i.get("stillShowZeroSum"),R=L?1:-1,E=function(X,K){if(!!X){var Q=K;if(X!==p){var j=X.getValue(),U=b===0&&P?A:j*A;U<g&&(U=g),Q=K+R*U;var tt=X.depth-y-(S?-1:1),ct=c+I*tt,bt=c+I*(tt+1),Et=X.getModel();Et.get("r0")!=null&&(ct=H(Et.get("r0"),u/2)),Et.get("r")!=null&&(bt=H(Et.get("r"),u/2)),X.setLayout({angle:U,startAngle:K,endAngle:Q,clockwise:L,cx:h,cy:f,r0:ct,r:bt})}if(X.children&&X.children.length){var ie=0;M(X.children,function(ol){ie+=E(ol,K+ie)})}return Q-K}};if(S){var Z=c,W=c+I,$=Math.PI*2;p.setLayout({angle:$,startAngle:d,endAngle:d+$,clockwise:L,cx:h,cy:f,r0:Z,r:W})}E(m,d)})};function gS(t,e){var r=t.children||[];t.children=lk(r,e),r.length&&M(t.children,function(a){gS(a,e)})}function lk(t,e){if(typeof e=="function")return t.sort(e);var r=e==="asc";return t.sort(function(a,i){var n=(a.getValue()-i.getValue())*(r?1:-1);return n===0?(a.dataIndex-i.dataIndex)*(r?-1:1):n})}Rt(ot(Zu,"sunburst")),Gt(ot(sk,"sunburst")),$e(ot(bs,"sunburst"));function uk(t,e){return e=e||[0,0],V(["x","y"],function(r,a){var i=this.getAxis(r),n=e[a],o=t[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}var hk=function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:it(uk,t)}}};function fk(t,e){return e=e||[0,0],V([0,1],function(r){var a=e[r],i=t[r]/2,n=[],o=[];return n[r]=a-i,o[r]=a+i,n[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(n)[r]-this.dataToPoint(o)[r])},this)}var ck=function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:it(fk,t)}}};function vk(t,e){var r=this.getAxis(),a=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(a-i)-r.dataToCoord(a+i))}var dk=function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:it(vk,t)}}};function gk(t,e){return V(["Radius","Angle"],function(r,a){var i=this["get"+r+"Axis"](),n=e[a],o=t[a]/2,s="dataTo"+r,l=i.type==="category"?i.getBandWidth():Math.abs(i[s](n-o)-i[s](n+o));return r==="Angle"&&(l=l*Math.PI/180),l},this)}var pk=function(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:it(function(i){var n=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s}),size:it(gk,t)}}},mk=function(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(a,i){return t.dataToPoint(a,i)}}}},pS=Y0,yk=["itemStyle"],_k=["emphasis","itemStyle"],xk=["label"],wk=["emphasis","label"],bk="e\0\0",mS={cartesian2d:hk,geo:ck,singleAxis:dk,polar:pk,calendar:mk};Vt.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(t,e){return ca(this.getSource(),this)},getDataParams:function(t,e,r){var a=Vt.prototype.getDataParams.apply(this,arguments);return r&&(a.info=r.info),a}}),ue.extend({type:"custom",_data:null,render:function(t,e,r,a){var i=this._data,n=t.getData(),o=this.group,s=_S(t,n,e,r);n.diff(i).add(function(u){Wg(null,u,s(u,a),t,o,n)}).update(function(u,h){var f=i.getItemGraphicEl(h);Wg(f,u,s(u,a),t,o,n)}).remove(function(u){var h=i.getItemGraphicEl(u);h&&o.remove(h)}).execute();var l=t.get("clip",!0)?Gu(t.coordinateSystem,!1,t):null;l?o.setClipPath(l):o.removeClipPath(),this._data=n},incrementalPrepareRender:function(t,e,r){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,r,a,i){var n=e.getData(),o=_S(e,n,r,a);function s(h){h.isGroup||(h.incremental=!0,h.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++){var u=Wg(null,l,o(l,i),e,this.group,n);u.traverse(s)}},dispose:ce,filterForExposedEvent:function(t,e,r,a){var i=e.element;if(i==null||r.name===i)return!0;for(;(r=r.parent)&&r!==this.group;)if(r.name===i)return!0;return!1}});function Sk(t){var e=t.type,r;if(e==="path"){var a=t.shape,i=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,n=AS(a);r=zo(n,null,i,a.layout||"center"),r.__customPathData=n}else if(e==="image")r=new ve({}),r.__customImagePath=t.style.image;else if(e==="text")r=new dt({}),r.__customText=t.style.text;else if(e==="group")r=new q;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=$c(e);T&&gt(o,'graphic type "'+e+'" can not be found.'),r=new o}return r.__customGraphicType=e,r.name=t.name,r}function Ak(t,e,r,a,i,n,o){var s={},l=r.style||{};if(r.shape&&(s.shape=rt(r.shape)),r.position&&(s.position=r.position.slice()),r.scale&&(s.scale=r.scale.slice()),r.origin&&(s.origin=r.origin.slice()),r.rotation&&(s.rotation=r.rotation),t.type==="image"&&r.style){var u=s.style={};M(["x","y","width","height"],function(c){yS(c,u,l,t.style,n)})}if(t.type==="text"&&r.style){var u=s.style={};M(["x","y"],function(v){yS(v,u,l,t.style,n)}),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if(t.type!=="group"&&(t.useStyle(l),n)){t.style.opacity=0;var h=l.opacity;h==null&&(h=1),Se(t,{style:{opacity:h}},a,e)}n?t.attr(s):ft(t,s,a,e),r.hasOwnProperty("z2")&&t.attr("z2",r.z2||0),r.hasOwnProperty("silent")&&t.attr("silent",r.silent),r.hasOwnProperty("invisible")&&t.attr("invisible",r.invisible),r.hasOwnProperty("ignore")&&t.attr("ignore",r.ignore),r.hasOwnProperty("info")&&t.attr("info",r.info);var f=r.styleEmphasis;Vo(t,f),o&&mi(t,f!==!1)}function yS(t,e,r,a,i){r[t]!=null&&!i&&(e[t]=r[t],r[t]=a[t])}function _S(t,e,r,a){var i=t.get("renderItem"),n=t.coordinateSystem,o={};n&&(T&&(gt(i,"series.render is required."),gt(n.prepareCustoms||mS[n.type],"This coordSys does not support custom series.")),o=n.prepareCustoms?n.prepareCustoms():mS[n.type](n));var s=J({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:p,style:m,styleEmphasis:y,visual:_,barLayout:w,currentSeriesIndices:b,font:A},o.api||{}),l={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:Tk(t.getData())},u,h=!0,f,c,v,d;return function(S,D){return u=S,h=!0,i&&i(J({dataIndexInside:S,dataIndex:e.getRawIndex(S),actionType:D?D.type:null},l),s)};function g(S){S==null&&(S=u),h&&(f=e.getItemModel(S),c=f.getModel(xk),v=f.getModel(wk),d=e.getItemVisual(S,"color"),h=!1)}function p(S,D){return D==null&&(D=u),e.get(e.getDimension(S||0),D)}function m(S,D){D==null&&(D=u),g(D);var I=f.getModel(yk).getItemStyle();d!=null&&(I.fill=d);var L=e.getItemVisual(D,"opacity");L!=null&&(I.opacity=L);var P=S?bS(S,c):c;return $t(I,P,null,{autoColor:d,isRectText:!0}),I.text=P.getShallow("show")?Xt(t.getFormattedLabel(D,"normal"),Bu(e,D)):null,S&&SS(I,S),I}function y(S,D){D==null&&(D=u),g(D);var I=f.getModel(_k).getItemStyle(),L=S?bS(S,v):v;return $t(I,L,null,{isRectText:!0},!0),I.text=L.getShallow("show")?ni(t.getFormattedLabel(D,"emphasis"),t.getFormattedLabel(D,"normal"),Bu(e,D)):null,S&&SS(I,S),I}function _(S,D){return D==null&&(D=u),e.getItemVisual(D,S)}function w(S){if(n.getBaseAxis){var D=n.getBaseAxis();return G2(J({axis:D},S),a)}}function b(){return r.getCurrentSeriesIndices()}function A(S){return qc(S,r)}}function Tk(t){var e={};return M(t.dimensions,function(r,a){var i=t.getDimensionInfo(r);if(!i.isExtraCoord){var n=i.coordDim,o=e[n]=e[n]||[];o[i.coordDimIndex]=a}}),e}function Wg(t,e,r,a,i,n){return t=Ug(t,e,r,a,i,n,!0),t&&n.setItemGraphicEl(e,t),t}function Ug(t,e,r,a,i,n,o){var s=!r;r=r||{};var l=r.type,u=r.shape,h=r.style;if(t&&(s||l!=null&&l!==t.__customGraphicType||l==="path"&&Ik(u)&&AS(u)!==t.__customPathData||l==="image"&&TS(h,"image")&&h.image!==t.__customImagePath||l==="text"&&TS(u,"text")&&h.text!==t.__customText)&&(i.remove(t),t=null),!s){var f=!t;return!t&&(t=Sk(r)),Ak(t,e,r,a,n,f,o),l==="group"&&Ck(t,e,r,a,n),i.add(t),t}}function Ck(t,e,r,a,i){var n=r.children,o=n?n.length:0,s=r.$mergeChildren,l=s==="byName"||r.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Dk({oldChildren:t.children()||[],newChildren:n||[],dataIndex:e,animatableModel:a,group:t,data:i});return}u&&t.removeAll();for(var h=0;h<o;h++)n[h]&&Ug(t.childAt(h),e,n[h],a,t,i);T&&gt(!u||t.childCount()===h,"MUST NOT contain empty item in children array when `group.$mergeChildren` is `false`.")}}function Dk(t){new ha(t.oldChildren,t.newChildren,xS,xS,t).add(wS).update(wS).remove(Mk).execute()}function xS(t,e){var r=t&&t.name;return r??bk+e}function wS(t,e){var r=this.context,a=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;Ug(i,r.dataIndex,a,r.animatableModel,r.group,r.data)}function bS(t,e){var r=new _t({},e);return M(pS,function(a,i){t.hasOwnProperty(a)&&(r.option[i]=t[a])}),r}function SS(t,e){for(var r in e)(e.hasOwnProperty(r)||!pS.hasOwnProperty(r))&&(t[r]=e[r])}function Mk(t){var e=this.context,r=e.oldChildren[t];r&&e.group.remove(r)}function AS(t){return t&&(t.pathData||t.d)}function Ik(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function TS(t,e){return t&&t.hasOwnProperty(e)}function CS(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function DS(t,e){return e.dim+t.model.componentIndex}function Lk(t,e,r){var a={},i=Pk(ee(e.getSeriesByType(t),function(n){return!e.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));e.eachSeriesByType(t,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=DS(s,l),h=CS(n),f=i[u][h],c=f.offset,v=f.width,d=s.getOtherAxis(l),g=n.coordinateSystem.cx,p=n.coordinateSystem.cy,m=n.get("barMinHeight")||0,y=n.get("barMinAngle")||0;a[h]=a[h]||[];for(var _=o.mapDimension(d.dim),w=o.mapDimension(l.dim),b=fa(o,_),A=l.dim!=="radius"||!n.get("roundCap",!0),S=d.getExtent()[0],D=0,I=o.count();D<I;D++){var L=o.get(_,D),P=o.get(w,D),R=L>=0?"p":"n",E=S;b&&(a[h][P]||(a[h][P]={p:S,n:S}),E=a[h][P][R]);var Z,W,$,X;if(d.dim==="radius"){var K=d.dataToRadius(L)-S,Q=l.dataToAngle(P);Math.abs(K)<m&&(K=(K<0?-1:1)*m),Z=E,W=E+K,$=Q-c,X=$-v,b&&(a[h][P][R]=W)}else{var j=d.dataToAngle(L,A)-S,U=l.dataToRadius(P);Math.abs(j)<y&&(j=(j<0?-1:1)*y),Z=U+c,W=Z+v,$=E,X=E+j,b&&(a[h][P][R]=X)}o.setItemLayout(D,{cx:g,cy:p,r0:Z,r:W,startAngle:-$*Math.PI/180,endAngle:-X*Math.PI/180})}}},this)}function Pk(t,e){var r={};M(t,function(i,n){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=DS(s,l),h=l.getExtent(),f=l.type==="category"?l.getBandWidth():Math.abs(h[1]-h[0])/o.count(),c=r[u]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=c.stacks;r[u]=c;var d=CS(i);v[d]||c.autoWidthCount++,v[d]=v[d]||{width:0,maxWidth:0};var g=H(i.get("barWidth"),f),p=H(i.get("barMaxWidth"),f),m=i.get("barGap"),y=i.get("barCategoryGap");g&&!v[d].width&&(g=Math.min(c.remainedWidth,g),v[d].width=g,c.remainedWidth-=g),p&&(v[d].maxWidth=p),m!=null&&(c.gap=m),y!=null&&(c.categoryGap=y)});var a={};return M(r,function(i,n){a[n]={};var o=i.stacks,s=i.bandWidth,l=H(i.categoryGap,s),u=H(i.gap,1),h=i.remainedWidth,f=i.autoWidthCount,c=(h-l)/(f+(f-1)*u);c=Math.max(c,0),M(o,function(p,m){var y=p.maxWidth;y&&y<c&&(y=Math.min(y,h),p.width&&(y=Math.min(y,p.width)),h-=y,p.width=y,f--)}),c=(h-l)/(f+(f-1)*u),c=Math.max(c,0);var v=0,d;M(o,function(p,m){p.width||(p.width=c),d=p,v+=p.width*(1+u)}),d&&(v-=d.width*u);var g=-v/2;M(o,function(p,m){a[n][m]=a[n][m]||{offset:g,width:p.width},g+=p.width*(1+u)})}),a}function Ch(t,e){Qt.call(this,"radius",t,e),this.type="category"}Ch.prototype={constructor:Ch,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToRadius:Qt.prototype.dataToCoord,radiusToData:Qt.prototype.coordToData},It(Ch,Qt);var Ek=Pe();function Dh(t,e){e=e||[0,360],Qt.call(this,"angle",t,e),this.type="category"}Dh.prototype={constructor:Dh,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToAngle:Qt.prototype.dataToCoord,angleToData:Qt.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),r=t.scale,a=r.getExtent(),i=r.count();if(a[1]-a[0]<1)return 0;var n=a[0],o=t.dataToCoord(n+1)-t.dataToCoord(n),s=Math.abs(o),l=Rr(n,e.getFont(),"center","top"),u=Math.max(l.height,7),h=u/s;isNaN(h)&&(h=1/0);var f=Math.max(0,Math.floor(h)),c=Ek(t.model),v=c.lastAutoInterval,d=c.lastTickCount;return v!=null&&d!=null&&Math.abs(v-f)<=1&&Math.abs(d-i)<=1&&v>f?f=v:(c.lastTickCount=i,c.lastAutoInterval=f),f}},It(Dh,Qt);var Mh=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Ch,this._angleAxis=new Dh,this._radiusAxis.polar=this._angleAxis.polar=this};Mh.prototype={type:"polar",axisPointerEnabled:!0,constructor:Mh,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],r=this._angleAxis,a=this._radiusAxis;return r.scale.type===t&&e.push(r),a.scale.type===t&&e.push(a),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var r=this.pointToCoord(t);return[this._radiusAxis.radiusToData(r[0],e),this._angleAxis.angleToData(r[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,r=t[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),n=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);a.inverse?n=o-360:o=n+360;var s=Math.sqrt(e*e+r*r);e/=s,r/=s;for(var l=Math.atan2(-r,e)/Math.PI*180,u=l<n?1:-1;l<n||l>o;)l+=u*360;return[s,l]},coordToPoint:function(t){var e=t[0],r=t[1]/180*Math.PI,a=Math.cos(r)*e+this.cx,i=-Math.sin(r)*e+this.cy;return[a,i]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),r=e.getExtent().slice();r[0]>r[1]&&r.reverse();var a=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:t.inverse,contain:function(n,o){var s=n-this.cx,l=o-this.cy,u=s*s+l*l,h=this.r,f=this.r0;return u<=h*h&&u>=f*f}}}};var $g=wt.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});ut($g.prototype,Di);var MS={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};function IS(t,e){return e.type||(e.data?"category":"value")}Gn("angle",$g,IS,MS.angle),Gn("radius",$g,IS,MS.radius),Ze({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,r=this.ecModel;return r.eachComponent(t,function(a){a.getCoordSysModel()===this&&(e=a)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});function Rk(t,e,r){var a=e.get("center"),i=r.getWidth(),n=r.getHeight();t.cx=H(a[0],i),t.cy=H(a[1],n);var o=t.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:z(l)||(l=[0,l]),l=[H(l[0],s),H(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}function Ok(t,e){var r=this,a=r.getAngleAxis(),i=r.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();M(l.mapDimension("radius",!0),function(u){i.scale.unionExtentFromData(l,fs(l,u))}),M(l.mapDimension("angle",!0),function(u){a.scale.unionExtentFromData(l,fs(l,u))})}}),Fa(a.scale,a.model),Fa(i.scale,i.model),a.type==="category"&&!a.onBand){var n=a.getExtent(),o=360/a.scale.count();a.inverse?n[1]+=o:n[1]-=o,a.setExtent(n[0],n[1])}}function LS(t,e){if(t.type=e.get("type"),t.scale=zn(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),e.mainType==="angleAxis"){t.inverse^=e.get("clockwise");var r=e.get("startAngle");t.setExtent(r,r+(t.inverse?-360:360))}e.axis=t,t.model=e}var Nk={dimensions:Mh.prototype.dimensions,create:function(t,e){var r=[];return t.eachComponent("polar",function(a,i){var n=new Mh(i);n.update=Ok;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");LS(o,l),LS(s,u),Rk(n,a,e),r.push(n),a.coordinateSystem=n,n.model=a}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var i=t.queryComponents({mainType:"polar",index:a.get("polarIndex"),id:a.get("polarId")})[0];if(T&&!i)throw new Error('Polar "'+Ut(a.get("polarIndex"),a.get("polarId"),0)+'" not found');a.coordinateSystem=i.coordinateSystem}}),r}};_e.register("polar",Nk);var kk=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Ih(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var a=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function Lh(t){var e=t.getRadiusAxis();return e.inverse?0:1}function PS(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}Xe.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),!!t.get("show")){var r=t.axis,a=r.polar,i=a.getRadiusAxis().getExtent(),n=r.getTicksCoords(),o=r.getMinorTicksCoords(),s=V(r.getViewLabels(),function(u){var u=rt(u);return u.coord=r.dataToCoord(u.tickValue),u});PS(s),PS(n),M(kk,function(l){t.get(l+".show")&&(!r.scale.isBlank()||l==="axisLine")&&this["_"+l](t,a,n,o,i,s)},this)}},_axisLine:function(t,e,r,a,i){var n=t.getModel("axisLine.lineStyle"),o=Lh(e),s=o?0:1,l;i[s]===0?l=new Br({shape:{cx:e.cx,cy:e.cy,r:i[o]},style:n.getLineStyle(),z2:1,silent:!0}):l=new Yl({shape:{cx:e.cx,cy:e.cy,r:i[o],r0:i[s]},style:n.getLineStyle(),z2:1,silent:!0}),l.style.fill=null,this.group.add(l)},_axisTick:function(t,e,r,a,i){var n=t.getModel("axisTick"),o=(n.get("inside")?-1:1)*n.get("length"),s=i[Lh(e)],l=V(r,function(u){return new ye({shape:Ih(e,[s,s+o],u.coord)})});this.group.add(or(l,{style:J(n.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,r,a,i){if(!!a.length){for(var n=t.getModel("axisTick"),o=t.getModel("minorTick"),s=(n.get("inside")?-1:1)*o.get("length"),l=i[Lh(e)],u=[],h=0;h<a.length;h++)for(var f=0;f<a[h].length;f++)u.push(new ye({shape:Ih(e,[l,l+s],a[h][f].coord)}));this.group.add(or(u,{style:J(o.getModel("lineStyle").getLineStyle(),J(n.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(t,e,r,a,i,n){var o=t.getCategories(!0),s=t.getModel("axisLabel"),l=s.get("margin"),u=t.get("triggerEvent");M(n,function(h,f){var c=s,v=h.tickValue,d=i[Lh(e)],g=e.coordToPoint([d+l,h.coord]),p=e.cx,m=e.cy,y=Math.abs(g[0]-p)/d<.3?"center":g[0]>p?"left":"right",_=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";o&&o[v]&&o[v].textStyle&&(c=new _t(o[v].textStyle,s,s.ecModel));var w=new dt({silent:ze.isLabelSilent(t)});this.group.add(w),$t(w.style,c,{x:g[0],y:g[1],textFill:c.getTextColor()||t.get("axisLine.lineStyle.color"),text:h.formattedLabel,textAlign:y,textVerticalAlign:_}),u&&(w.eventData=ze.makeAxisEventDataBase(t),w.eventData.targetType="axisLabel",w.eventData.value=h.rawLabel)},this)},_splitLine:function(t,e,r,a,i){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h<r.length;h++){var f=l++%s.length;u[f]=u[f]||[],u[f].push(new ye({shape:Ih(e,i,r[h].coord)}))}for(var h=0;h<u.length;h++)this.group.add(or(u[h],{style:J({stroke:s[h%s.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,r,a,i){if(!!a.length){for(var n=t.getModel("minorSplitLine"),o=n.getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new ye({shape:Ih(e,i,a[l][u].coord)}));this.group.add(or(s,{style:o.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,r,a,i){if(!!r.length){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=Math.PI/180,f=-r[0].coord*h,c=Math.min(i[0],i[1]),v=Math.max(i[0],i[1]),d=t.get("clockwise"),g=1;g<r.length;g++){var p=l++%s.length;u[p]=u[p]||[],u[p].push(new Ar({shape:{cx:e.cx,cy:e.cy,r0:c,r:v,startAngle:f,endAngle:-r[g].coord*h,clockwise:d},silent:!0})),f=-r[g].coord*h}for(var g=0;g<u.length;g++)this.group.add(or(u[g],{style:J({fill:s[g%s.length]},o.getAreaStyle()),silent:!0}))}}});var zk=["axisLine","axisTickLabel","axisName"],Bk=["splitLine","splitArea","minorSplitLine"];Xe.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),!!t.get("show")){var r=t.axis,a=r.polar,i=a.getAngleAxis(),n=r.getTicksCoords(),o=r.getMinorTicksCoords(),s=i.getExtent()[0],l=r.getExtent(),u=Vk(a,t,s),h=new ze(t,u);M(zk,h.add,h),this.group.add(h.getGroup()),M(Bk,function(f){t.get(f+".show")&&!r.scale.isBlank()&&this["_"+f](t,a,s,l,n,o)},this)}},_splitLine:function(t,e,r,a,i){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h<i.length;h++){var f=l++%s.length;u[f]=u[f]||[],u[f].push(new Br({shape:{cx:e.cx,cy:e.cy,r:i[h].coord}}))}for(var h=0;h<u.length;h++)this.group.add(or(u[h],{style:J({stroke:s[h%s.length],fill:null},o.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,r,a,i,n){if(!!n.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<n.length;u++)for(var h=0;h<n[u].length;h++)l.push(new Br({shape:{cx:e.cx,cy:e.cy,r:n[u][h].coord}}));this.group.add(or(l,{style:J({fill:null},s.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,r,a,i){if(!!i.length){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=i[0].coord,f=1;f<i.length;f++){var c=l++%s.length;u[c]=u[c]||[],u[c].push(new Ar({shape:{cx:e.cx,cy:e.cy,r0:h,r:i[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=i[f].coord}for(var f=0;f<u.length;f++)this.group.add(or(u[f],{style:J({fill:s[f%s.length]},o.getAreaStyle()),silent:!0}))}}});function Vk(t,e,r){return{position:[t.cx,t.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}var Gk=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis;n.dim==="angle"&&(this.animationThreshold=Math.PI/18);var o=n.polar,s=o.getOtherAxis(n),l=s.getExtent(),u;u=n["dataTo"+su(n.dim)](e);var h=a.get("type");if(h&&h!=="none"){var f=Bg(a),c=Fk[h](n,o,u,l,f);c.style=f,t.graphicKey=c.type,t.pointer=c}var v=a.get("label.margin"),d=Hk(e,r,a,o,v);rS(t,r,a,i,d)}});function Hk(t,e,r,a,i){var n=e.axis,o=n.dataToCoord(t),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,h,f;if(n.dim==="radius"){var c=Ie();aa(c,c,s),yr(c,c,[a.cx,a.cy]),u=Hr([o,-i],c);var v=e.getModel("axisLabel").get("rotate")||0,d=ze.innerTextLayout(s,v*Math.PI/180,-1);h=d.textAlign,f=d.textVerticalAlign}else{var g=l[1];u=a.coordToPoint([g+i,o]);var p=a.cx,m=a.cy;h=Math.abs(u[0]-p)/g<.3?"center":u[0]>p?"left":"right",f=Math.abs(u[1]-m)/g<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:h,verticalAlign:f}}var Fk={line:function(t,e,r,a,i){return t.dim==="angle"?{type:"Line",shape:Gg(e.coordToPoint([a[0],r]),e.coordToPoint([a[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,a,i){var n=Math.max(1,t.getBandWidth()),o=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:oS(e.cx,e.cy,a[0],a[1],(-r-n/2)*o,(-r+n/2)*o)}:{type:"Sector",shape:oS(e.cx,e.cy,r-n/2,r+n/2,0,Math.PI*2)}}};Xe.registerAxisPointerClass("PolarAxisPointer",Gk),Gt(ot(Lk,"bar")),he({type:"polar"});var Wk=wt.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){wt.prototype.init.apply(this,arguments),fi(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=Vx.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=an(t.regions||[],function(r,a){return a.name&&r.set(a.name,new _t(a,e)),r},ht()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new _t(null,this,this.ecModel)},getFormattedLabel:function(t,e){var r=this.getRegionModel(t),a=r.get("label"+(e==="normal"?".":e+".")+"formatter"),i={name:t};if(typeof a=="function")return i.status=e,a(i);if(typeof a=="string")return a.replace("{a}",t??"")},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});Dt(Wk,bd),he({type:"geo",init:function(t,e){var r=new ju(e,!0);this._mapDraw=r,this.group.add(r.group)},render:function(t,e,r,a){if(!(a&&a.type==="geoToggleSelect"&&a.from===this.uid)){var i=this._mapDraw;t.get("show")?i.draw(t,e,r,this,a):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});function Zg(t,e){e.update="updateView",mt(e,function(r,a){var i={};return a.eachComponent({mainType:"geo",query:r},function(n){n[t](r.name);var o=n.coordinateSystem;M(o.regions,function(s){i[s.name]=n.isSelected(s.name)||!1})}),{selected:i,name:r.name}})}Zg("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),Zg("select",{type:"geoSelect",event:"geoselected"}),Zg("unSelect",{type:"geoUnSelect",event:"geounselected"});var Yg=864e5;function pa(t,e,r){this._model=t}pa.prototype={constructor:pa,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){t=$o(t);var e=t.getFullYear(),r=t.getMonth()+1;r=r<10?"0"+r:r;var a=t.getDate();a=a<10?"0"+a:a;var i=t.getDay();return i=Math.abs((i+7-this.getFirstDayOfWeek())%7),{y:e,m:r,d:a,day:i,time:t.getTime(),formatedDate:e+"-"+r+"-"+a,date:t}},getNextNDay:function(t,e){return e=e||0,e===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.get("cellSize").slice(),n=this._model.getBoxLayoutParams(),o=this._orient==="horizontal"?[r,7]:[7,r];M([0,1],function(h){u(i,h)&&(n[a[h]]=i[h]*o[h])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=qt(n,s);M([0,1],function(h){u(i,h)||(i[h]=l[a[h]]/o[h])});function u(h,f){return h[f]!=null&&h[f]!=="auto"}this._sw=i[0],this._sh=i[1]},dataToPoint:function(t,e){z(t)&&(t=t[0]),e==null&&(e=!0);var r=this.getDateInfo(t),a=this._rangeInfo,i=r.formatedDate;if(e&&!(r.time>=a.start.time&&r.time<a.end.time+Yg))return[NaN,NaN];var n=r.day,o=this._getRangeInfo([a.start.time,i]).nthWeek;return this._orient==="vertical"?[this._rect.x+n*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+n*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var r=this.dataToPoint(t,e);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,r=Math.floor((t[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,e-1,a):this._getDateByWeeksAndDay(e,r-1,a)},convertToPixel:ot(ES,"dataToPoint"),convertFromPixel:ot(ES,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(z(e)&&e.length===1&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var r=this.getDateInfo(e),a=r.date;a.setMonth(a.getMonth()+1);var i=this.getNextNDay(a,-1);t=[r.formatedDate,i.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var n=this._getRangeInfo(t);return n.start.time>n.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var r=Math.floor(t[1].time/Yg)-Math.floor(t[0].time/Yg)+1,a=new Date(t[0].time),i=a.getDate(),n=t[1].date.getDate();a.setDate(i+r-1);var o=a.getDate();if(o!==n)for(var s=a.getTime()-t[1].time>0?1:-1;(o=a.getDate())!==n&&(a.getTime()-t[1].time)*s>0;)r-=s,a.setDate(o-s);var l=Math.floor((r+t[0].day+6)/7),u=e?-l+1:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,r){var a=this._getRangeInfo(r);if(t>a.weeks||t===0&&e<a.fweek||t===a.weeks&&e>a.lweek)return!1;var i=(t-1)*7-a.fweek+e,n=new Date(a.start.time);return n.setDate(a.start.d+i),this.getDateInfo(n)}},pa.dimensions=pa.prototype.dimensions,pa.getDimensionsInfo=pa.prototype.getDimensionsInfo,pa.create=function(t,e){var r=[];return t.eachComponent("calendar",function(a){var i=new pa(a,t,e);r.push(i),a.coordinateSystem=i}),t.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=r[a.get("calendarIndex")||0])}),r};function ES(t,e,r,a){var i=r.calendarModel,n=r.seriesModel,o=i?i.coordinateSystem:n?n.coordinateSystem:null;return o===this?o[t](a):null}_e.register("calendar",pa);var RS=wt.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,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%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,r,a){var i=Cn(t);RS.superApply(this,"init",arguments),OS(t,i)},mergeOption:function(t,e){RS.superApply(this,"mergeOption",arguments),OS(this.option,t)}});function OS(t,e){var r=t.cellSize;z(r)?r.length===1&&(r[1]=r[0]):r=t.cellSize=[r,r];var a=V([0,1],function(i){return IM(e,i)&&(r[i]="auto"),r[i]!=null&&r[i]!=="auto"});za(t,e,{type:"box",ignoreSize:a})}var Uk={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]},$k={EN:["S","M","T","W","T","F","S"],CN:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]};he({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,r){var a=this.group;a.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),o=i.getOrient();this._renderDayRect(t,n,a),this._renderLines(t,n,o,a),this._renderYearText(t,n,o,a),this._renderMonthText(t,o,a),this._renderWeekText(t,n,o,a)},_renderDayRect:function(t,e,r){for(var a=t.coordinateSystem,i=t.getModel("itemStyle").getItemStyle(),n=a.getCellWidth(),o=a.getCellHeight(),s=e.start.time;s<=e.end.time;s=a.getNextNDay(s,1).time){var l=a.dataToRect([s],!1).tl,u=new xt({shape:{x:l[0],y:l[1],width:n,height:o},cursor:"default",style:i});r.add(u)}},_renderLines:function(t,e,r,a){var i=this,n=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){c(u.formatedDate),h===0&&(u=n.getDateInfo(e.start.y+"-"+e.start.m));var f=u.date;f.setMonth(f.getMonth()+1),u=n.getDateInfo(f)}c(n.getNextNDay(e.end.time,1).formatedDate);function c(v){i._firstDayOfMonth.push(n.getDateInfo(v)),i._firstDayPoints.push(n.dataToRect([v],!1).tl);var d=i._getLinePointsOfOneWeek(t,v,r);i._tlpoints.push(d[0]),i._blpoints.push(d[d.length-1]),s&&i._drawSplitline(d,o,a)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,l,r),o,a),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,l,r),o,a)},_getEdgesPoints:function(t,e,r){var a=[t[0].slice(),t[t.length-1].slice()],i=r==="horizontal"?0:1;return a[0][i]=a[0][i]-e/2,a[1][i]=a[1][i]+e/2,a},_drawSplitline:function(t,e,r){var a=new ir({z2:20,shape:{points:t},style:e});r.add(a)},_getLinePointsOfOneWeek:function(t,e,r){var a=t.coordinateSystem;e=a.getDateInfo(e);for(var i=[],n=0;n<7;n++){var o=a.getNextNDay(e.time,n),s=a.dataToRect([o.time],!1);i[2*o.day]=s.tl,i[2*o.day+1]=s[r==="horizontal"?"bl":"tr"]}return i},_formatterLabel:function(t,e){return typeof t=="string"&&t?wy(t,e):typeof t=="function"?t(e):e.nameMap},_yearTextPositionControl:function(t,e,r,a,i){e=e.slice();var n=["center","bottom"];a==="bottom"?(e[1]+=i,n=["center","top"]):a==="left"?e[0]-=i:a==="right"?(e[0]+=i,n=["center","top"]):e[1]-=i;var o=0;return(a==="left"||a==="right")&&(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:n[0],textVerticalAlign:n[1]}}},_renderYearText:function(t,e,r,a){var i=t.getModel("yearLabel");if(!!i.get("show")){var n=i.get("margin"),o=i.get("position");o||(o=r!=="horizontal"?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h=r==="horizontal"?0:1,f={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},c=e.start.y;+e.end.y>+e.start.y&&(c=c+"-"+e.end.y);var v=i.get("formatter"),d={start:e.start.y,end:e.end.y,nameMap:c},g=this._formatterLabel(v,d),p=new dt({z2:30});$t(p.style,i,{text:g}),p.attr(this._yearTextPositionControl(p,f[o],r,o,n)),a.add(p)}},_monthTextPositionControl:function(t,e,r,a,i){var n="left",o="top",s=t[0],l=t[1];return r==="horizontal"?(l=l+i,e&&(n="center"),a==="start"&&(o="bottom")):(s=s+i,e&&(o="middle"),a==="start"&&(n="right")),{x:s,y:l,textAlign:n,textVerticalAlign:o}},_renderMonthText:function(t,e,r){var a=t.getModel("monthLabel");if(!!a.get("show")){var i=a.get("nameMap"),n=a.get("margin"),o=a.get("position"),s=a.get("align"),l=[this._tlpoints,this._blpoints];Lt(i)&&(i=Uk[i.toUpperCase()]||[]);var u=o==="start"?0:1,h=e==="horizontal"?0:1;n=o==="start"?-n:n;for(var f=s==="center",c=0;c<l[u].length-1;c++){var v=l[u][c].slice(),d=this._firstDayOfMonth[c];if(f){var g=this._firstDayPoints[c];v[h]=(g[h]+l[0][c+1][h])/2}var p=a.get("formatter"),m=i[+d.m-1],y={yyyy:d.y,yy:(d.y+"").slice(2),MM:d.m,M:+d.m,nameMap:m},_=this._formatterLabel(p,y),w=new dt({z2:30});et($t(w.style,a,{text:_}),this._monthTextPositionControl(v,f,e,o,n)),r.add(w)}}},_weekTextPositionControl:function(t,e,r,a,i){var n="center",o="middle",s=t[0],l=t[1],u=r==="start";return e==="horizontal"?(s=s+a+(u?1:-1)*i[0]/2,n=u?"right":"left"):(l=l+a+(u?1:-1)*i[1]/2,o=u?"bottom":"top"),{x:s,y:l,textAlign:n,textVerticalAlign:o}},_renderWeekText:function(t,e,r,a){var i=t.getModel("dayLabel");if(!!i.get("show")){var n=t.coordinateSystem,o=i.get("position"),s=i.get("nameMap"),l=i.get("margin"),u=n.getFirstDayOfWeek();Lt(s)&&(s=$k[s.toUpperCase()]||[]);var h=n.getNextNDay(e.end.time,7-e.lweek).time,f=[n.getCellWidth(),n.getCellHeight()];l=H(l,f[r==="horizontal"?0:1]),o==="start"&&(h=n.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var c=0;c<7;c++){var v=n.getNextNDay(h,c),d=n.dataToRect([v.time],!1).center,g=c;g=Math.abs((c+u)%7);var p=new dt({z2:30});et($t(p.style,i,{text:s[g]}),this._weekTextPositionControl(d,r,o,l,f)),a.add(p)}}}});var NS={path:null,compoundPath:null,group:q,image:ve,text:dt};we(function(t){var e=t.graphic;z(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var Zk=Ze({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,Zk.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var r=this.option,a=(e?r:t).elements,i=r.elements=e?[]:r.elements,n=[];this._flatten(a,n);var o=Lc(i,n);p0(o);var s=this._elOptionsToUpdate=[];M(o,function(u,h){var f=u.option;T&&gt(lt(f)||u.exist,"Empty graphic option definition"),f&&(s.push(f),Xk(u,f),qk(i,h,f),Kk(i[h],f))},this);for(var l=i.length-1;l>=0;l--)i[l]==null?i.splice(l,1):delete i[l].$action},_flatten:function(t,e,r){M(t,function(a){if(!!a){r&&(a.parentOption=r),e.push(a);var i=a.children;a.type==="group"&&i&&this._flatten(i,e,a),delete a.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});he({type:"graphic",init:function(t,e){this._elMap=ht(),this._lastGraphicModel},render:function(t,e,r){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,r)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(!!e){var r=this._elMap,a=this.group;M(e,function(i){var n=i.$action,o=i.id,s=r.get(o),l=i.parentId,u=l!=null?r.get(l):a,h=i.style;i.type==="text"&&h&&(i.hv&&i.hv[1]&&(h.textVerticalAlign=h.textBaseline=null),!h.hasOwnProperty("textFill")&&h.fill&&(h.textFill=h.fill),!h.hasOwnProperty("textStroke")&&h.stroke&&(h.textStroke=h.stroke));var f=Yk(i);T&&s&&gt(u===s.parent,"Changing parent is not supported."),!n||n==="merge"?s?s.attr(f):kS(o,u,f,r):n==="replace"?(Ph(s,r),kS(o,u,f,r)):n==="remove"&&Ph(s,r);var c=r.get(o);c&&(c.__ecGraphicWidthOption=i.width,c.__ecGraphicHeightOption=i.height,jk(c,t,i))})}},_relocate:function(t,e){for(var r=t.option.elements,a=this.group,i=this._elMap,n=e.getWidth(),o=e.getHeight(),s=0;s<r.length;s++){var l=r[s],u=i.get(l.id);if(!(!u||!u.isGroup)){var h=u.parent,f=h===a;u.__ecGraphicWidth=H(u.__ecGraphicWidthOption,f?n:h.__ecGraphicWidth)||0,u.__ecGraphicHeight=H(u.__ecGraphicHeightOption,f?o:h.__ecGraphicHeight)||0}}for(var s=r.length-1;s>=0;s--){var l=r[s],u=i.get(l.id);if(!!u){var h=u.parent,c=h===a?{width:n,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};uu(u,l,c,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Ph(e,t)}),this._elMap=ht()},dispose:function(){this._clear()}});function kS(t,e,r,a){var i=r.type;T&&gt(i,"graphic type MUST be set");var n=NS.hasOwnProperty(i)?NS[i]:$c(i);T&&gt(n,"graphic type can not be found");var o=new n(r);e.add(o),a.set(t,o),o.__ecGraphicId=t}function Ph(t,e){var r=t&&t.parent;r&&(t.type==="group"&&t.traverse(function(a){Ph(a,e)}),e.removeKey(t.__ecGraphicId),r.remove(t))}function Yk(t){return t=et({},t),M(["id","parentId","$action","hv","bounding"].concat(Sy),function(e){delete t[e]}),t}function zS(t,e){var r;return M(e,function(a){t[a]!=null&&t[a]!=="auto"&&(r=!0)}),r}function Xk(t,e){var r=t.exist;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function qk(t,e,r){var a=et({},r),i=t[e],n=r.$action||"merge";if(n==="merge")if(i){if(T){var o=r.type;gt(!o||i.type===o,'Please set $action: "replace" to change `type`')}ut(i,a,!0),za(i,a,{ignoreSize:!0}),Ay(r,i)}else t[e]=a;else n==="replace"?t[e]=a:n==="remove"&&i&&(t[e]=null)}function Kk(t,e){!t||(t.hv=e.hv=[zS(e,["left","right"]),zS(e,["top","bottom"])],t.type==="group"&&(t.width==null&&(t.width=e.width=0),t.height==null&&(t.height=e.height=0)))}function jk(t,e,r){var a=t.eventData;!t.silent&&!t.ignore&&!a&&(a=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),a&&(a.info=t.info)}var BS={};function io(t,e){BS[t]=e}function VS(t){return BS[t]}var Qk=Ze({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){Qk.superApply(this,"optionUpdated",arguments),M(this.option.feature,function(t,e){var r=VS(e);r&&ut(t,r.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,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}}});function Jk(t,e,r){var a=e.getBoxLayoutParams(),i=e.get("padding"),n={width:r.getWidth(),height:r.getHeight()},o=qt(a,n,i);bi(e.get("orient"),t,e.get("itemGap"),o.width,o.height),uu(t,a,n,i)}function GS(i,e){var r=xi(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var i=new xt({shape:{x:i.x-r[3],y:i.y-r[0],width:i.width+r[1]+r[3],height:i.height+r[0]+r[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1});return i}he({type:"toolbox",render:function(t,e,r,a){var i=this.group;if(i.removeAll(),!t.get("show"))return;var n=+t.get("itemSize"),o=t.get("feature")||{},s=this._features||(this._features={}),l=[];M(o,function(f,c){l.push(c)}),new ha(this._featureNames||[],l).add(u).update(u).remove(ot(u,null)).execute(),this._featureNames=l;function u(f,c){var v=l[f],d=l[c],g=o[v],p=new _t(g,t,t.ecModel),m;if(a&&a.newTitle!=null&&a.featureName===v&&(g.title=a.newTitle),v&&!d){if(tz(v))m={model:p,onclick:p.option.onclick,featureName:v};else{var y=VS(v);if(!y)return;m=new y(p,e,r)}s[v]=m}else{if(m=s[d],!m)return;m.model=p,m.ecModel=e,m.api=r}if(!v&&d){m.dispose&&m.dispose(e,r);return}if(!p.get("show")||m.unusable){m.remove&&m.remove(e,r);return}h(p,m,v),p.setIconStatus=function(_,w){var b=this.option,A=this.iconPaths;b.iconStatus=b.iconStatus||{},b.iconStatus[_]=w,A[_]&&A[_].trigger(w)},m.render&&m.render(p,e,r,a)}function h(f,c,v){var d=f.getModel("iconStyle"),g=f.getModel("emphasis.iconStyle"),p=c.getIcons?c.getIcons():f.get("icon"),m=f.get("title")||{};if(typeof p=="string"){var y=p,_=m;p={},m={},p[v]=y,m[v]=_}var w=f.iconPaths={};M(p,function(b,A){var S=Ho(b,{},{x:-n/2,y:-n/2,width:n,height:n});S.setStyle(d.getItemStyle()),S.hoverStyle=g.getItemStyle(),S.setStyle({text:m[A],textAlign:g.get("textAlign"),textBorderRadius:g.get("textBorderRadius"),textPadding:g.get("textPadding"),textFill:null});var D=t.getModel("tooltip");D&&D.get("show")&&S.attr("tooltip",et({content:m[A],formatter:D.get("formatter",!0)||function(){return m[A]},formatterParams:{componentType:"toolbox",name:A,title:m[A],$vars:["name","title"]},position:D.get("position",!0)||"bottom"},D.option)),Ot(S),t.get("showTitle")&&(S.__title=m[A],S.on("mouseover",function(){var I=g.getItemStyle(),L=t.get("orient")==="vertical"?t.get("right")==null?"right":"left":t.get("bottom")==null?"bottom":"top";S.setStyle({textFill:g.get("textFill")||I.fill||I.stroke||"#000",textBackgroundColor:g.get("textBackgroundColor"),textPosition:g.get("textPosition")||L})}).on("mouseout",function(){S.setStyle({textFill:null,textBackgroundColor:null})})),S.trigger(f.get("iconStatus."+A)||"normal"),i.add(S),S.on("click",it(c.onclick,c,e,r,A)),w[A]=S})}Jk(i,t,r),i.add(GS(i.getBoundingRect(),t)),i.eachChild(function(f){var c=f.__title,v=f.hoverStyle;if(v&&c){var d=Rr(c,jm(v)),g=f.position[0]+i.position[0],p=f.position[1]+i.position[1]+n,m=!1;p+d.height>r.getHeight()&&(v.textPosition="top",m=!0);var y=m?-5-d.height:n+8;g+d.width/2>r.getWidth()?(v.textPosition=["100%",y],v.textAlign="right"):g-d.width/2<0&&(v.textPosition=[0,y],v.textAlign="left")}})},updateView:function(t,e,r,a){M(this._features,function(i){i.updateView&&i.updateView(i.model,e,r,a)})},remove:function(t,e){M(this._features,function(r){r.remove&&r.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){M(this._features,function(r){r.dispose&&r.dispose(t,e)})}});function tz(t){return t.indexOf("my")===0}var HS=ua.toolbox.saveAsImage;function Eh(t){this.model=t}Eh.defaultOption={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:HS.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:HS.lang.slice()},Eh.prototype.unusable=!G.canvasSupported;var ez=Eh.prototype;ez.onclick=function(t,e){var r=this.model,a=r.get("name")||t.get("title.0.text")||"echarts",i=e.getZr().painter.getType()==="svg",n=i?"svg":r.get("type",!0)||"png",o=e.getConnectedDataURL({type:n,backgroundColor:r.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:r.get("connectedBackgroundColor"),excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")});if(typeof MouseEvent=="function"&&!G.browser.ie&&!G.browser.edge){var s=document.createElement("a");s.download=a+"."+n,s.target="_blank",s.href=o;var l=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});s.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob){for(var u=atob(o.split(",")[1]),h=u.length,f=new Uint8Array(h);h--;)f[h]=u.charCodeAt(h);var c=new Blob([f]);window.navigator.msSaveOrOpenBlob(c,a+"."+n)}else{var v=r.get("lang"),d='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(v&&v[0]||"")+'" /></body>',g=window.open();g.document.write(d)}},io("saveAsImage",Eh);var Rh=ua.toolbox.magicType,Xg="__ec_magicType_stack__";function qg(t){this.model=t}qg.defaultOption={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:rt(Rh.title),option:{},seriesIndex:{}};var FS=qg.prototype;FS.getIcons=function(){var t=this.model,e=t.get("icon"),r={};return M(t.get("type"),function(a){e[a]&&(r[a]=e[a])}),r};var WS={line:function(t,e,r,a){if(t==="bar")return ut({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get("option.line")||{},!0)},bar:function(t,e,r,a){if(t==="line")return ut({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get("option.bar")||{},!0)},stack:function(t,e,r,a){var i=r.get("stack")===Xg;if(t==="line"||t==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),ut({id:e,stack:i?"":Xg},a.get("option.stack")||{},!0)}},rz=[["line","bar"],["stack"]];FS.onclick=function(t,e,r){var a=this.model,i=a.get("seriesIndex."+r);if(!!WS[r]){var n={series:[]},o=function(u){var h=u.subType,f=u.id,c=WS[r](h,f,u,a);c&&(J(c,u.option),n.series.push(c));var v=u.coordinateSystem;if(v&&v.type==="cartesian2d"&&(r==="line"||r==="bar")){var d=v.getAxesByScale("ordinal")[0];if(d){var g=d.dim,p=g+"Axis",m=t.queryComponents({mainType:p,index:u.get(name+"Index"),id:u.get(name+"Id")})[0],y=m.componentIndex;n[p]=n[p]||[];for(var _=0;_<=y;_++)n[p][y]=n[p][y]||{};n[p][y].boundaryGap=r==="bar"}}};M(rz,function(u){yt(u,r)>=0&&M(u,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(r,"emphasis"),t.eachComponent({mainType:"series",query:i==null?null:{seriesIndex:i}},o);var s;if(r==="stack"){var l=n.series&&n.series[0]&&n.series[0].stack===Xg;s=l?ut({stack:Rh.title.tiled},Rh.title):rt(Rh.title)}e.dispatchAction({type:"changeMagicType",currentType:r,newOption:n,newTitle:s,featureName:"magicType"})}},mt({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),io("magicType",qg);var US=ua.toolbox.dataView,Oh=new Array(60).join("-"),no="    ";function az(t){var e={},r=[],a=[];return t.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:a}}function iz(t){var e=[];return M(t,function(r,a){var i=r.categoryAxis,n=r.valueAxis,o=n.dim,s=[" "].concat(V(r.series,function(v){return v.name})),l=[i.model.getCategories()];M(r.series,function(v){l.push(v.getRawData().mapArray(o,function(d){return d}))});for(var u=[s.join(no)],h=0;h<l[0].length;h++){for(var f=[],c=0;c<l.length;c++)f.push(l[c][h]);u.push(f.join(no))}e.push(u.join(`
`))}),e.join(`
`+Oh+`
`)}function iz(t){return V(t,function(e){var r=e.getRawData(),a=[e.name],i=[];return r.each(r.dimensions,function(){for(var n=arguments.length,o=arguments[n-1],s=r.getName(o),l=0;l<n-1;l++)i[l]=arguments[l];a.push((s?s+no:"")+i.join(no))}),a.join(`
`)}function nz(t){return V(t,function(e){var r=e.getRawData(),a=[e.name],i=[];return r.each(r.dimensions,function(){for(var n=arguments.length,o=arguments[n-1],s=r.getName(o),l=0;l<n-1;l++)i[l]=arguments[l];a.push((s?s+no:"")+i.join(no))}),a.join(`
`)}).join(`
`+Oh+`
`)}function nz(t){var e=rz(t);return{value:ee([az(e.seriesGroupByCategoryAxis),iz(e.other)],function(r){return r.replace(/[\n\t\s]/g,"")}).join(`
`)}function oz(t){var e=az(t);return{value:ee([iz(e.seriesGroupByCategoryAxis),nz(e.other)],function(r){return r.replace(/[\n\t\s]/g,"")}).join(`
`+Oh+`
`),meta:e.meta}}function Nh(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function oz(t){var e=t.slice(0,t.indexOf(`
`));if(e.indexOf(no)>=0)return!0}var qg=new RegExp("["+no+"]+","g");function sz(t){for(var e=t.split(/\n+/g),r=Nh(e.shift()).split(qg),a=[],i=V(r,function(l){return{name:l,data:[]}}),n=0;n<e.length;n++){var o=Nh(e[n]).split(qg);a.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[n]=o[s])}return{series:i,categories:a}}function lz(t){for(var e=t.split(/\n+/g),r=Nh(e.shift()),a=[],i=0;i<e.length;i++){var n=Nh(e[i]).split(qg),o="",s,l=!1;isNaN(n[0])?(l=!0,o=n[0],n=n.slice(1),a[i]={name:o,value:[]},s=a[i].value):s=a[i]=[];for(var u=0;u<n.length;u++)s.push(+n[u]);s.length===1&&(l?a[i].value=s[0]:a[i]=s[0])}return{name:r,data:a}}function uz(t,e){var r=t.split(new RegExp(`
`),meta:e.meta}}function Nh(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function sz(t){var e=t.slice(0,t.indexOf(`
`));if(e.indexOf(no)>=0)return!0}var Kg=new RegExp("["+no+"]+","g");function lz(t){for(var e=t.split(/\n+/g),r=Nh(e.shift()).split(Kg),a=[],i=V(r,function(l){return{name:l,data:[]}}),n=0;n<e.length;n++){var o=Nh(e[n]).split(Kg);a.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[n]=o[s])}return{series:i,categories:a}}function uz(t){for(var e=t.split(/\n+/g),r=Nh(e.shift()),a=[],i=0;i<e.length;i++){var n=Nh(e[i]).split(Kg),o="",s,l=!1;isNaN(n[0])?(l=!0,o=n[0],n=n.slice(1),a[i]={name:o,value:[]},s=a[i].value):s=a[i]=[];for(var u=0;u<n.length;u++)s.push(+n[u]);s.length===1&&(l?a[i].value=s[0]:a[i]=s[0])}return{name:r,data:a}}function hz(t,e){var r=t.split(new RegExp(`
*`+Oh+`
*`,"g")),a={series:[]};return M(r,function(i,n){if(oz(i)){var o=sz(i),s=e[n],l=s.axisDim+"Axis";s&&(a[l]=a[l]||[],a[l][s.axisIndex]={data:o.categories},a.series=a.series.concat(o.series))}else{var o=lz(i);a.series.push(o)}}),a}function Us(t){this._dom=null,this.model=t}Us.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:rt(WS.title),lang:rt(WS.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Us.prototype.onclick=function(t,e){var r=e.getDom(),a=this.model;this._dom&&r.removeChild(this._dom);var i=document.createElement("div");i.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",i.style.backgroundColor=a.get("backgroundColor")||"#fff";var n=document.createElement("h4"),o=a.get("lang")||[];n.innerHTML=o[0]||a.get("title"),n.style.cssText="margin: 10px 20px;",n.style.color=a.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=a.get("optionToContent"),h=a.get("contentToOption"),f=nz(t);if(typeof u=="function"){var c=u(e.getOption());typeof c=="string"?s.innerHTML=c:nn(c)&&s.appendChild(c)}else s.appendChild(l),l.readOnly=a.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=a.get("textColor"),l.style.borderColor=a.get("textareaBorderColor"),l.style.backgroundColor=a.get("textareaColor"),l.value=f.value;var v=f.meta,d=document.createElement("div");d.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",p=document.createElement("div"),m=document.createElement("div");g+=";background-color:"+a.get("buttonColor"),g+=";color:"+a.get("buttonTextColor");var y=this;function _(){r.removeChild(i),y._dom=null}bf(p,"click",_),bf(m,"click",function(){var w;try{typeof h=="function"?w=h(s,e.getOption()):w=uz(l.value,v)}catch(b){throw _(),new Error("Data view format error "+b)}w&&e.dispatchAction({type:"changeDataView",newOption:w}),_()}),p.innerHTML=o[1],m.innerHTML=o[2],m.style.cssText=g,p.style.cssText=g,!a.get("readOnly")&&d.appendChild(m),d.appendChild(p),i.appendChild(n),i.appendChild(s),i.appendChild(d),s.style.height=r.clientHeight-80+"px",r.appendChild(i),this._dom=i},Us.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Us.prototype.dispose=function(t,e){this.remove(t,e)};function hz(t,e){return V(t,function(r,a){var i=e&&e[a];return lt(i)&&!z(i)?(lt(r)&&!z(r)&&(r=r.value),J({value:r},i)):r})}io("dataView",Us),mt({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var r=[];M(t.newOption.series,function(a){var i=e.getSeriesByName(a.name)[0];if(!i)r.push(et({type:"scatter"},a));else{var n=i.get("data");r.push({name:a.name,data:hz(a.data,n)})}}),e.mergeOption(J({series:r},t.newOption))});var ti=M,kh=yt,zh=ot,Kg=["dataToPoint","pointToData"],fz=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function Bh(t,e,r){var a=this._targetInfoList=[],i={},n=US(e,t);ti(cz,function(o,s){(!r||!r.include||kh(r.include,s)>=0)&&o(n,a,i)})}var oo=Bh.prototype;oo.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(r,a,i){if((r.coordRanges||(r.coordRanges=[])).push(a),!r.coordRange){r.coordRange=a;var n=Qg[r.brushType](0,i,a);r.__rangeOffset={offset:XS[r.brushType](n.values,r.range,[1,1]),xyMinMax:n.xyMinMax}}})},oo.matchOutputRanges=function(t,e,r){ti(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&M(i.coordSyses,function(n){var o=Qg[a.brushType](1,n,a.range);r(a,o.values,n,e)})},this)},oo.setInputRanges=function(t,e){ti(t,function(r){var a=this.findTargetInfo(r,e);if(T&&(gt(!a||a===!0||r.coordRange,"coordRange must be specified when coord index specified."),gt(!a||a!==!0||r.range,"range must be specified in global brush.")),r.range=r.range||[],a&&a!==!0){r.panelId=a.panelId;var i=Qg[r.brushType](0,a.coordSys,r.coordRange),n=r.__rangeOffset;r.range=n?XS[r.brushType](i.values,n.offset,vz(i.xyMinMax,n.xyMinMax)):i.values}},this)},oo.makePanelOpts=function(t,e){return V(this._targetInfoList,function(r){var a=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:e&&e(r),clipPath:Kw(a),isTargetByCursor:Qw(a,t,r.coordSysModel),getLinearBrushOtherExtent:jw(a)}})},oo.controlSeries=function(t,e,r){var a=this.findTargetInfo(t,r);return a===!0||a&&kh(a.coordSyses,e.coordinateSystem)>=0},oo.findTargetInfo=function(t,e){for(var r=this._targetInfoList,a=US(e,t),i=0;i<r.length;i++){var n=r[i],o=t.panelId;if(o){if(n.panelId===o)return n}else for(var i=0;i<$S.length;i++)if($S[i](a,n))return n}return!0};function jg(t){return t[0]>t[1]&&t.reverse(),t}function US(t,e){return Ol(t,e,{includeMainTypes:fz})}var cz={grid:function(t,e){var r=t.xAxisModels,a=t.yAxisModels,i=t.gridModels,n=ht(),o={},s={};!r&&!a&&!i||(ti(r,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),ti(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),ti(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,h=[];ti(u.getCartesians(),function(f,c){(kh(r,f.getAxis("x").model)>=0||kh(a,f.getAxis("y").model)>=0)&&h.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:ZS.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){ti(t.geoModels,function(r){var a=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:a,coordSyses:[a],getPanelRect:ZS.geo})})}},$S=[function(t,e){var r=t.xAxisModel,a=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&a&&(i=a.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],ZS={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(yi(t)),e}},Qg={lineX:zh(YS,0),lineY:zh(YS,1),rect:function(t,e,r){var a=e[Kg[t]]([r[0][0],r[1][0]]),i=e[Kg[t]]([r[0][1],r[1][1]]),n=[jg([a[0],i[0]]),jg([a[1],i[1]])];return{values:n,xyMinMax:n}},polygon:function(t,e,r){var a=[[1/0,-1/0],[1/0,-1/0]],i=V(r,function(n){var o=e[Kg[t]](n);return a[0][0]=Math.min(a[0][0],o[0]),a[1][0]=Math.min(a[1][0],o[1]),a[0][1]=Math.max(a[0][1],o[0]),a[1][1]=Math.max(a[1][1],o[1]),o});return{values:i,xyMinMax:a}}};function YS(t,e,r,a){T&&gt(r.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=r.getAxis(["x","y"][t]),n=jg(V([0,1],function(s){return e?i.coordToData(i.toLocalCoord(a[s])):i.toGlobalCoord(i.dataToCoord(a[s]))})),o=[];return o[t]=n,o[1-t]=[NaN,NaN],{values:n,xyMinMax:o}}var XS={lineX:zh(qS,0),lineY:zh(qS,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return V(t,function(a,i){return[a[0]-r[0]*e[i][0],a[1]-r[1]*e[i][1]]})}};function qS(t,e,r,a){return[e[0]-a[t]*r[0],e[1]-a[t]*r[1]]}function vz(t,e){var r=KS(t),a=KS(e),i=[r[0]/a[0],r[1]/a[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function KS(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var jS=M,Jg="\0_ec_hist_store";function dz(t,e){var r=tp(t);jS(e,function(a,i){for(var n=r.length-1;n>=0;n--){var o=r[n];if(o[i])break}if(n<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function gz(t){var e=tp(t),r=e[e.length-1];e.length>1&&e.pop();var a={};return jS(r,function(i,n){for(var o=e.length-1;o>=0;o--){var i=e[o][n];if(i){a[n]=i;break}}}),a}function pz(t){t[Jg]=null}function mz(t){return tp(t).length}function tp(t){var e=t[Jg];return e||(e=t[Jg]=[{}]),e}wt.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var yz=["x","y","z","radius","angle","single"],_z=["cartesian2d","polar","singleAxis"];function xz(t){return yt(_z,t)>=0}function wz(t,e){t=t.slice();var r=V(t,su);e=(e||[]).slice();var a=V(e,su);return function(i,n){M(t,function(o,s){for(var l={name:o,capital:r[s]},u=0;u<e.length;u++)l[e[u]]=o+a[u];i.call(n,l)})}}var QS=wz(yz,["axisIndex","axis","index","id"]);function bz(t,e,r){return function(o){var s={nodes:[],records:{}};if(e(function(h){s.records[h.name]={}}),!o)return s;n(o,s);var l;do l=!1,t(u);while(l);function u(h){!a(h,s)&&i(h,s)&&(n(h,s),l=!0)}return s};function a(o,s){return yt(s.nodes,o)>=0}function i(o,s){var l=!1;return e(function(u){M(r(o,u)||[],function(h){s.records[u.name][h]&&(l=!0)})}),l}function n(o,s){s.nodes.push(o),e(function(l){M(r(o,l)||[],function(u){s.records[l.name][u]=!0})})}}var $i=M,JS=_i,ep=function(t,e,r,a){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=a,this._dataZoomModel=r};ep.prototype={constructor:ep,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(r){if(xz(r.get("coordinateSystem"))){var a=this._dimName,i=e.queryComponents({mainType:a+"Axis",index:r.get(a+"AxisIndex"),id:r.get(a+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&t.push(r)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t=this._dimName,e=this.ecModel,r=this.getAxisModel(),a=t==="x"||t==="y",i,n;a?(n="gridIndex",i=t==="x"?"y":"x"):(n="polarIndex",i=t==="angle"?"radius":"angle");var o;return e.eachComponent(i+"Axis",function(s){(s.get(n)||0)===(r.get(n)||0)&&(o=s)}),o},getMinMaxSpan:function(){return rt(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,r=this.getAxisModel(),a=r.axis.scale,i=this._dataZoomModel.getRangePropMode(),n=[0,100],o=[],s=[],l;$i(["start","end"],function(f,c){var v=t[f],d=t[f+"Value"];i[c]==="percent"?(v==null&&(v=n[c]),d=a.parse(Nt(v,n,e))):(l=!0,d=d==null?e[c]:a.parse(d),v=Nt(d,e,n)),s[c]=d,o[c]=v}),JS(s),JS(o);var u=this._minMaxSpan;l?h(s,o,e,n,!1):h(o,s,n,e,!0);function h(f,c,v,d,g){var p=g?"Span":"ValueSpan";zi(0,f,v,"all",u["min"+p],u["max"+p]);for(var m=0;m<2;m++)c[m]=Nt(f[m],v,d,!0),g&&(c[m]=a.parse(c[m]))}return{valueWindow:s,percentWindow:o}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Sz(this,this._dimName,e),Tz(this);var r=this.calculateDataWindow(t.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,tA(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,tA(this,!0))},filterData:function(t,e){if(t!==this._dataZoomModel)return;var r=this._dimName,a=this.getTargetSeriesModels(),i=t.get("filterMode"),n=this._valueWindow;if(i==="none")return;$i(a,function(s){var l=s.getData(),u=l.mapDimension(r,!0);!u.length||(i==="weakFilter"?l.filterSelf(function(h){for(var f,c,v,d=0;d<u.length;d++){var g=l.get(u[d],h),p=!isNaN(g),m=g<n[0],y=g>n[1];if(p&&!m&&!y)return!0;p&&(v=!0),m&&(f=!0),y&&(c=!0)}return v&&f&&c}):$i(u,function(h){if(i==="empty")s.setData(l=l.map(h,function(c){return o(c)?c:NaN}));else{var f={};f[h]=n,l.selectRange(f)}}),$i(u,function(h){l.setApproximateExtent(n,h)}))});function o(s){return s>=n[0]&&s<=n[1]}}};function Sz(t,e,r){var a=[1/0,-1/0];return $i(r,function(i){var n=i.getData();n&&$i(n.mapDimension(e,!0),function(o){var s=n.getApproximateExtent(o);s[0]<a[0]&&(a[0]=s[0]),s[1]>a[1]&&(a[1]=s[1])})}),a[1]<a[0]&&(a=[NaN,NaN]),Az(t,a),a}function Az(t,e){var r=t.getAxisModel(),a=r.getMin(!0),i=r.get("type")==="category",n=i&&r.getCategories().length;a!=null&&a!=="dataMin"&&typeof a!="function"?e[0]=a:i&&(e[0]=n>0?0:NaN);var o=r.getMax(!0);return o!=null&&o!=="dataMax"&&typeof o!="function"?e[1]=o:i&&(e[1]=n>0?n-1:NaN),r.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function tA(t,e){var r=t.getAxisModel(),a=t._percentWindow,i=t._valueWindow;if(!!a){var n=Qc(i,[0,500]);n=Math.min(n,20);var o=e||a[0]===0&&a[1]===100;r.setRange(o?null:+i[0].toFixed(n),o?null:+i[1].toFixed(n))}}function Tz(t){var e=t._minMaxSpan={},r=t._dataZoomModel,a=t._dataExtent;$i(["min","max"],function(i){var n=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=t.getAxisModel().axis.scale.parse(o)),o!=null?n=Nt(a[0]+o,a,[0,100],!0):n!=null&&(o=Nt(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o})}var Zi=M,Yi=QS,rp=Ze({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,r){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var a=eA(t);this.settledOption=a,this.mergeDefaultAndTheme(t,r),this.doInit(a)},mergeOption:function(t){var e=eA(t);ut(this.option,t,!0),ut(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;G.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),rA(this,t);var r=this.settledOption;Zi([["start","startValue"],["end","endValue"]],function(a,i){this._rangePropMode[i]==="value"&&(e[a[0]]=r[a[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,r,a,i){var n=this.dependentModels[e.axis][r],o=n.__dzAxisProxy||(n.__dzAxisProxy=new ep(e.name,r,this,i));t[e.name+"_"+r]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Yi(function(r){var a=r.axisIndex;t[a]=me(t[a])},this),e==="axisIndex"?this._autoSetAxisIndex():e==="orient"&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Yi(function(a){t[a.axisIndex]!=null&&(e=!0)},this);var r=t.orient;if(r==null&&e)return"orient";if(!e)return r==null&&(t.orient="horizontal"),"axisIndex"},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),r=this.option,a=this.dependentModels;if(t){var i=e==="vertical"?"y":"x";a[i+"Axis"].length?(r[i+"AxisIndex"]=[0],t=!1):Zi(a.singleAxis,function(n){t&&n.get("orient",!0)===e&&(r.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Yi(function(n){if(!!t){var o=[],s=this.dependentModels[n.axis];if(s.length&&!o.length)for(var l=0,u=s.length;l<u;l++)s[l].get("type")==="category"&&o.push(l);r[n.axisIndex]=o,o.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(n){this._isSeriesHasAllAxesTypeOf(n,"value")&&Yi(function(o){var s=r[o.axisIndex],l=n.get(o.axisIndex),u=n.get(o.axisId),h=n.ecModel.queryComponents({mainType:o.axis,index:l,id:u})[0];if(T&&!h)throw new Error(o.axis+' "'+Ut(l,u,0)+'" not found');l=h.componentIndex,yt(s,l)<0&&s.push(l)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient=t==="y"?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var r=!0;return Yi(function(a){var i=t.get(a.axisIndex),n=this.dependentModels[a.axis][i];(!n||n.get("type")!==e)&&(r=!1)},this),r},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return Yi(function(e){if(t==null){var r=this.get(e.axisIndex);r.length&&(t=this.dependentModels[e.axis][r[0]])}},this),t},eachTargetAxis:function(t,e){var r=this.ecModel;Yi(function(a){Zi(this.get(a.axisIndex),function(i){t.call(e,a,i,this,r)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var r=this.getAxisProxy(t,e);return r&&r.getAxisModel()},setRawRange:function(t){var e=this.option,r=this.settledOption;Zi([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(e[a[0]]=r[a[0]]=t[a[0]],e[a[1]]=r[a[1]]=t[a[1]])},this),rA(this,t)},setCalculatedRange:function(t){var e=this.option;Zi(["start","startValue","end","endValue"],function(r){e[r]=t[r]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(t==null&&e==null){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataValueWindow()}else return this.getAxisProxy(t,e).getDataValueWindow()},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var r in e)if(e.hasOwnProperty(r)&&e[r].hostedBy(this))return e[r];for(var r in e)if(e.hasOwnProperty(r)&&!e[r].hostedBy(this))return e[r]},getRangePropMode:function(){return this._rangePropMode.slice()}});function eA(t){var e={};return Zi(["start","end","startValue","endValue","throttle"],function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}function rA(t,e){var r=t._rangePropMode,a=t.get("rangeMode");Zi([["start","startValue"],["end","endValue"]],function(i,n){var o=e[i[0]]!=null,s=e[i[1]]!=null;o&&!s?r[n]="percent":!o&&s?r[n]="value":a?r[n]=a[n]:o&&(r[n]="percent")})}var ap=Fr.extend({type:"dataZoom",render:function(t,e,r,a){this.dataZoomModel=t,this.ecModel=e,this.api=r},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,r={};t.eachTargetAxis(function(i,n){var o=e.getComponent(i.axis,n);if(o){var s=o.getCoordSysModel();s&&a(s,o,r[s.mainType]||(r[s.mainType]=[]),s.componentIndex)}},this);function a(i,n,o,s){for(var l,u=0;u<o.length;u++)if(o[u].model===i){l=o[u];break}l||o.push(l={model:i,axisModels:[],coordIndex:s}),l.axisModels.push(n)}return r}});rp.extend({type:"dataZoom.select"}),ap.extend({type:"dataZoom.select"}),$e({getTargetSeries:function(t){var e=ht();return t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(a,i,n){var o=n.getAxisProxy(a.name,i);M(o.getTargetSeriesModels(),function(s){e.set(s.uid,s)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(a,i,n){n.getAxisProxy(a.name,i).reset(n,e)}),r.eachTargetAxis(function(a,i,n){n.getAxisProxy(a.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(r){var a=r.findRepresentativeAxisProxy(),i=a.getDataPercentWindow(),n=a.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),mt("dataZoom",function(t,e){var r=bz(it(e.eachComponent,e,"dataZoom"),QS,function(i,n){return i.get(n.axisIndex)}),a=[];e.eachComponent({mainType:"dataZoom",query:t},function(i,n){a.push.apply(a,r(i).nodes)}),M(a,function(i,n){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var Cz=ua.toolbox.dataZoom,aA=M,Dz="\0_ec_\0toolbox-dataZoom_";function ip(t,e,r){(this._brushController=new ro(r.getZr())).on("brush",it(this._onBrush,this)).mount(),this._isZoomActive}ip.defaultOption={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:rt(Cz.title)};var so=ip.prototype;so.render=function(t,e,r,a){this.model=t,this.ecModel=e,this.api=r,Lz(t,e,this,a,r),Iz(t,e)},so.onclick=function(t,e,r){Mz[r].call(this)},so.remove=function(t,e){this._brushController.unmount()},so.dispose=function(t,e){this._brushController.dispose()};var Mz={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(gz(this.ecModel))}};so._onBrush=function(t,e){if(!e.isEnd||!t.length)return;var r={},a=this.ecModel;this._brushController.updateCovers([]);var i=new Bh(iA(this.model.option),a,{include:["grid"]});i.matchOutputRanges(t,a,function(s,l,u){if(u.type==="cartesian2d"){var h=s.brushType;h==="rect"?(n("x",u,l[0]),n("y",u,l[1])):n({lineX:"x",lineY:"y"}[h],u,l)}}),dz(a,r),this._dispatchZoomAction(r);function n(s,l,u){var h=l.getAxis(s),f=h.model,c=o(s,f,a),v=c.findRepresentativeAxisProxy(f).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(u=zi(0,u.slice(),h.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),c&&(r[c.id]={dataZoomId:c.id,startValue:u[0],endValue:u[1]})}function o(s,l,u){var h;return u.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var c=f.getAxisModel(s,l.componentIndex);c&&(h=f)}),h}},so._dispatchZoomAction=function(t){var e=[];aA(t,function(r,a){e.push(rt(r))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})};function iA(t){var e={};return M(["xAxisIndex","yAxisIndex"],function(r){e[r]=t[r],e[r]==null&&(e[r]="all"),(e[r]===!1||e[r]==="none")&&(e[r]=[])}),e}function Iz(t,e){t.setIconStatus("back",mz(e)>1?"emphasis":"normal")}function Lz(t,e,r,a,i){var n=r._isZoomActive;a&&a.type==="takeGlobalCursor"&&(n=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),r._isZoomActive=n,t.setIconStatus("zoom",n?"emphasis":"normal");var o=new Bh(iA(t.option),e,{include:["grid"]});r._brushController.setPanels(o.makePanelOpts(i,function(s){return s.xAxisDeclared&&!s.yAxisDeclared?"lineX":!s.xAxisDeclared&&s.yAxisDeclared?"lineY":"rect"})).enableBrush(n?{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}io("dataZoom",ip),we(function(t){if(!t)return;var e=t.dataZoom||(t.dataZoom=[]);z(e)||(t.dataZoom=e=[e]);var r=t.toolbox;if(r&&(z(r)&&(r=r[0]),r&&r.feature)){var a=r.feature.dataZoom;i("xAxis",a),i("yAxis",a)}function i(o,s){if(!!s){var l=o+"Index",u=s[l];u!=null&&u!=="all"&&!z(u)&&(u=u===!1||u==="none"?[]:[u]),n(o,function(h,f){if(!(u!=null&&u!=="all"&&yt(u,f)===-1)){var c={type:"select",$fromToolbox:!0,filterMode:s.filterMode||"filter",id:Dz+o+f};c[l]=f,e.push(c)}})}}function n(o,s){var l=t[o];z(l)||(l=l?[l]:[]),aA(l,s)}});var Pz=ua.toolbox.restore;function np(t){this.model=t}np.defaultOption={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:Pz.title};var Ez=np.prototype;Ez.onclick=function(t,e,r){pz(t),e.dispatchAction({type:"restore",from:this.uid})},io("restore",np),mt({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),Ze({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var nA=M,Rz=yy,Oz=["","-webkit-","-moz-","-o-"],Nz="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";function kz(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",r="left "+t+"s "+e+",top "+t+"s "+e;return V(Oz,function(a){return a+"transition:"+r}).join(";")}function zz(t){var e=[],r=t.get("fontSize"),a=t.getTextColor();return a&&e.push("color:"+a),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px"),nA(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Bz(t){var e=[],r=t.get("transitionDuration"),a=t.get("backgroundColor"),i=t.getModel("textStyle"),n=t.get("padding");return r&&e.push(kz(r)),a&&(G.canvasSupported?e.push("background-Color:"+a):(e.push("background-Color:#"+Of(a)),e.push("filter:alpha(opacity=70)"))),nA(["width","color","radius"],function(o){var s="border-"+o,l=Rz(s),u=t.get(l);u!=null&&e.push(s+":"+u+(o==="color"?"":"px"))}),e.push(zz(i)),n!=null&&e.push("padding:"+xi(n).join("px ")+"px"),e.join(";")+";"}function oA(t,e,r,a,i){var n=e&&e.painter;if(r){var o=n&&n.getViewportRoot();o&&rC(t,o,document.body,a,i)}else{t[0]=a,t[1]=i;var s=n&&n.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function op(t,e,r){if(G.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=e.getZr(),n=this._appendToBody=r&&r.appendToBody;this._styleCoord=[0,0],oA(this._styleCoord,i,n,e.getWidth()/2,e.getHeight()/2),n?document.body.appendChild(a):t.appendChild(a),this._container=t,this._show=!1,this._hideTimeout;var o=this;a.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},a.onmousemove=function(s){if(s=s||window.event,!o._enterable){var l=i.handler,u=i.painter.getViewportRoot();Er(u,s,!0),l.dispatch("mousemove",s)}},a.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}op.prototype={constructor:op,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),r=t.style;r.position!=="absolute"&&e.position!=="absolute"&&(r.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,r=this._styleCoord;e.style.cssText=Nz+Bz(t)+";left:"+r[0]+"px;top:"+r[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=t??""},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var r=this._styleCoord;oA(r,this._zr,this._appendToBody,t,e);var a=this.el.style;a.left=r[0]+"px",a.top=r[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(it(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var r=document.defaultView.getComputedStyle(this.el);r&&(t+=parseInt(r.borderLeftWidth,10)+parseInt(r.borderRightWidth,10),e+=parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10))}return{width:t,height:e}}};function sp(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}sp.prototype={constructor:sp,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,r){this.el&&this._zr.remove(this.el);for(var a={},i=t,n="{marker",o="|}",s=i.indexOf(n);s>=0;){var l=i.indexOf(o),u=i.substr(s+n.length,l-s-n.length);u.indexOf("sub")>-1?a["marker"+u]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:a["marker"+u]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},i=i.substr(l+1),s=i.indexOf("{marker")}this.el=new dt({style:{rich:a,text:t,textLineHeight:20,textBackgroundColor:r.get("backgroundColor"),textBorderRadius:r.get("borderRadius"),textFill:r.get("textStyle.color"),textPadding:r.get("padding")},z:r.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(it(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var sA=it,$s=M,lA=H,Vz=new xt({shape:{x:-1,y:-1,width:2,height:2}});he({type:"tooltip",init:function(t,e){if(!G.node){var r=t.getComponent("tooltip"),a=r.get("renderMode");this._renderMode=m0(a);var i;this._renderMode==="html"?(i=new op(e.getDom(),e,{appendToBody:r.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new sp(e),this._newLine=`
`),this._tooltipContent=i}},render:function(t,e,r){if(!G.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=r,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var a=this._tooltipContent;a.update(),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Yb("itemTooltip",this._api,sA(function(r,a,i){e!=="none"&&(e.indexOf(r)>=0?this._tryShow(a,i):r==="leave"&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,r=this._api;if(this._lastX!=null&&this._lastY!=null&&t.get("triggerOn")!=="none"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!r.isDisposed()&&a.manuallyShowTip(t,e,r,{x:a._lastX,y:a._lastY})})}},manuallyShowTip:function(t,e,r,a){if(!(a.from===this.uid||G.node)){var i=uA(a,r);this._ticket="";var n=a.dataByCoordSys;if(a.tooltip&&a.x!=null&&a.y!=null){var o=Vz;o.position=[a.x,a.y],o.update(),o.tooltip=a.tooltip,this._tryShow({offsetX:a.x,offsetY:a.y,target:o},i)}else if(n)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:a.dataByCoordSys,tooltipOption:a.tooltipOption},i);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,e,r,a))return;var s=Fb(a,e),l=s.point[0],u=s.point[1];l!=null&&u!=null&&this._tryShow({offsetX:l,offsetY:u,position:a.position,target:s.el},i)}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},i))}},manuallyHideTip:function(t,e,r,a){var i=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,a.from!==this.uid&&this._hide(uA(a,r))},_manuallyAxisShowTip:function(u,e,r,a){var i=a.seriesIndex,n=a.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(!(i==null||n==null||o==null)){var s=e.getSeriesByIndex(i);if(!!s){var l=s.getData(),u=lp([l.getItemModel(n),s,(s.coordinateSystem||{}).model,u]);if(u.get("trigger")==="axis")return r.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:n,position:a.position}),!0}}},_tryShow:function(t,e){var r=t.target,a=this._tooltipModel;if(!!a){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):r&&r.dataIndex!=null?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,r,e)):r&&r.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,r,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var r=t.get("showDelay");e=it(e,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(e,r):e()},_showAxisTooltip:function(t,e){var r=this._ecModel,a=this._tooltipModel,i=[e.offsetX,e.offsetY],n=[],o=[],s=lp([e.tooltipOption,a]),l=this._renderMode,u=this._newLine,h={};$s(t,function(c){$s(c.dataByAxis,function(v){var d=r.getComponent(v.axisDim+"Axis",v.axisIndex),g=v.value,p=[];if(!(!d||g==null)){var m=rS(g,d.axis,r,v.seriesDataIndices,v.valueLabelOpt);M(v.seriesDataIndices,function(_){var w=r.getSeriesByIndex(_.seriesIndex),b=_.dataIndexInside,A=w&&w.getDataParams(b);if(A.axisDim=v.axisDim,A.axisIndex=v.axisIndex,A.axisType=v.axisType,A.axisId=v.axisId,A.axisValue=ed(d.axis,g),A.axisValueLabel=m,A){o.push(A);var S=w.formatTooltip(b,!0,null,l),D;if(lt(S)){D=S.html;var I=S.markers;ut(h,I)}else D=S;p.push(D)}});var y=m;l!=="html"?n.push(p.join(u)):n.push((y?kt(y)+u:"")+p.join(u))}})},this),n.reverse(),n=n.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,f,i[0],i[1],this._tooltipContent,o):this._showTooltipContent(s,n,o,Math.random(),i[0],i[1],f,void 0,h)})},_showSeriesItemTooltip:function(t,e,r){var a=this._ecModel,i=e.seriesIndex,n=a.getSeriesByIndex(i),o=e.dataModel||n,s=e.dataIndex,l=e.dataType,u=o.getData(l),h=lp([u.getItemModel(s),o,n&&(n.coordinateSystem||{}).model,this._tooltipModel]),f=h.get("trigger");if(!(f!=null&&f!=="item")){var c=o.getDataParams(s,l),v=o.formatTooltip(s,!1,l,this._renderMode),d,g;lt(v)?(d=v.html,g=v.markers):(d=v,g=null);var p="item_"+o.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,c,p,t.offsetX,t.offsetY,t.position,t.target,g)}),r({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:i,from:this.uid})}},_showComponentItemTooltip:function(t,e,r){var a=e.tooltip;if(typeof a=="string"){var i=a;a={content:i,formatter:i}}var n=new _t(a,this._tooltipModel,this._ecModel),o=n.get("content"),s=Math.random();this._showOrMove(n,function(){this._showTooltipContent(n,o,n.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),r({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,r,a,i,n,o,s,l){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var u=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var f=e;if(h&&typeof h=="string")f=nv(h,r,!0);else if(typeof h=="function"){var c=sA(function(v,d){v===this._ticket&&(u.setContent(d,l,t),this._updatePosition(t,o,i,n,u,r,s))},this);this._ticket=a,f=h(r,a,c)}u.setContent(f,l,t),u.show(t),this._updatePosition(t,o,i,n,u,r,s)}},_updatePosition:function(t,e,r,a,i,n,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=i.getSize(),h=t.get("align"),f=t.get("verticalAlign"),c=o&&o.getBoundingRect().clone();if(o&&c.applyTransform(o.transform),typeof e=="function"&&(e=e([r,a],n,i.el,c,{viewSize:[s,l],contentSize:u.slice()})),z(e))r=lA(e[0],s),a=lA(e[1],l);else if(lt(e)){e.width=u[0],e.height=u[1];var v=qt(e,{width:s,height:l});r=v.x,a=v.y,h=null,f=null}else if(typeof e=="string"&&o){var d=Fz(e,c,u);r=d[0],a=d[1]}else{var d=Gz(r,a,i,s,l,h?null:20,f?null:20);r=d[0],a=d[1]}if(h&&(r-=hA(h)?u[0]/2:h==="right"?u[0]:0),f&&(a-=hA(f)?u[1]/2:f==="bottom"?u[1]:0),t.get("confine")){var d=Hz(r,a,i,s,l);r=d[0],a=d[1]}i.moveTo(r,a)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,r=!!e&&e.length===t.length;return r&&$s(e,function(a,i){var n=a.dataByAxis||{},o=t[i]||{},s=o.dataByAxis||[];r&=n.length===s.length,r&&$s(n,function(l,u){var h=s[u]||{},f=l.seriesDataIndices||[],c=h.seriesDataIndices||[];r&=l.value===h.value&&l.axisType===h.axisType&&l.axisId===h.axisId&&f.length===c.length,r&&$s(f,function(v,d){var g=c[d];r&=v.seriesIndex===g.seriesIndex&&v.dataIndex===g.dataIndex})})}),this._lastDataByCoordSys=t,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){G.node||(this._tooltipContent.dispose(),Og("itemTooltip",e))}});function lp(t){for(var e=t.pop();t.length;){var r=t.pop();r&&(_t.isInstance(r)&&(r=r.get("tooltip",!0)),typeof r=="string"&&(r={formatter:r}),e=new _t(r,e,e.ecModel))}return e}function uA(t,e){return t.dispatchAction||it(e.dispatchAction,e)}function Gz(t,e,r,a,i,n,o){var s=r.getOuterSize(),l=s.width,u=s.height;return n!=null&&(t+l+n>a?t-=l+n:t+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function Hz(t,e,r,a,i){var n=r.getOuterSize(),o=n.width,s=n.height;return t=Math.min(t+o,a)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Fz(t,e,r){var a=r[0],i=r[1],n=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-a/2,s=e.y+u/2-i/2;break;case"top":o=e.x+l/2-a/2,s=e.y-i-n;break;case"bottom":o=e.x+l/2-a/2,s=e.y+u+n;break;case"left":o=e.x-a-n,s=e.y+u/2-i/2;break;case"right":o=e.x+l+n,s=e.y+u/2-i/2}return[o,s]}function hA(t){return t==="center"||t==="middle"}mt({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),mt({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var Wz=["rect","polygon","keep","clear"],Uz=function(t,e){var r=t&&t.brush;if(z(r)||(r=r?[r]:[]),!!r.length){var a=[];M(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=t&&t.toolbox;z(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),$z(s),e&&!s.length&&s.push.apply(s,Wz)}};function $z(t){var e={};M(t,function(r){e[r]=1}),t.length=0,M(e,function(r,a){t.push(a)})}var fA=M;function cA(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function up(t,e,r){var a={};return fA(e,function(n){var o=a[n]=i();fA(t[n],function(s,l){if(!!Mt.isValidType(l)){var u={type:l,visual:s};r&&r(u,n),o[l]=new Mt(u),l==="opacity"&&(u=rt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Mt(u))}})}),a;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function vA(t,e,r){var a;M(r,function(i){e.hasOwnProperty(i)&&cA(e[i])&&(a=!0)}),a&&M(r,function(i){e.hasOwnProperty(i)&&cA(e[i])?t[i]=rt(e[i]):delete t[i]})}function Zz(t,e,r,a,i,n){var o={};M(t,function(f){var c=Mt.prepareVisualTypes(e[f]);o[f]=c});var s;function l(f){return r.getItemVisual(s,f)}function u(f,c){r.setItemVisual(s,f,c)}n==null?r.each(h):r.each([n],h);function h(f,c){s=n==null?f:c;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var d=a.call(i,f),g=e[d],p=o[d],m=0,y=p.length;m<y;m++){var _=p[m];g[_]&&g[_].applyVisual(f,l,u)}}}function Yz(t,e,r,a){var i={};M(t,function(o){var s=Mt.prepareVisualTypes(e[o]);i[o]=s});function n(o,s){a!=null&&(a=s.getDimension(a));function l(_){return s.getItemVisual(h,_)}function u(_,w){s.setItemVisual(h,_,w)}for(var h;(h=o.next())!=null;){var f=s.getRawDataItem(h);if(!(f&&f.visualMap===!1))for(var c=a!=null?s.get(a,h,!0):h,v=r(c),d=e[v],g=i[v],p=0,m=g.length;p<m;p++){var y=g[p];d[y]&&d[y].applyVisual(c,l,u)}}}return{progress:n}}var hp={lineX:dA(0),lineY:dA(1),rect:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])},rect:function(t,e,r){return t&&r.boundingRect.intersect(t)}},polygon:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])&&Mi(r.range,t[0],t[1])},rect:function(t,e,r){var a=r.range;if(!t||a.length<=1)return!1;var i=t.x,n=t.y,o=t.width,s=t.height,l=a[0];if(Mi(a,i,n)||Mi(a,i+o,n)||Mi(a,i,n+s)||Mi(a,i+o,n+s)||vt.create(t).contain(l[0],l[1])||Fo(i,n,i+o,n,a)||Fo(i,n,i,n+s,a)||Fo(i+o,n,i+o,n+s,a)||Fo(i,n+s,i+o,n+s,a))return!0}}};function dA(t){var e=["x","y"],r=["width","height"];return{point:function(a,i,n){if(a){var o=n.range,s=a[t];return Zs(s,o)}},rect:function(a,i,n){if(a){var o=n.range,s=[a[e[t]],a[e[t]]+a[r[t]]];return s[1]<s[0]&&s.reverse(),Zs(s[0],o)||Zs(s[1],o)||Zs(o[0],s)||Zs(o[1],s)}}}}function Zs(t,e){return e[0]<=t&&t<=e[1]}var gA=["inBrush","outOfBrush"],fp="__ecBrushSelect",cp="__ecInBrushSelectEvent",pA=Wr.VISUAL.BRUSH;Gt(pA,function(t,e,r){t.eachComponent({mainType:"brush"},function(a){r&&r.type==="takeGlobalCursor"&&a.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),mA(t)});function mA(t){t.eachComponent({mainType:"brush"},function(e){var r=e.brushTargetManager=new Bh(e.option,t);r.setInputRanges(e.areas,t)})}Rt(pA,function(t,e,r){var a=[],i,n;t.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:rt(o.areas),selected:[]};a.push(l);var u=o.option,h=u.brushLink,f=[],c=[],v=[],d=0;s||(i=u.throttleType,n=u.throttleDelay);var g=V(o.areas,function(b){return jz(J({boundingRect:Qz[b.brushType](b)},b))}),p=up(o.option,gA,function(b){b.mappingMethod="fixed"});z(h)&&M(h,function(b){f[b]=1});function m(b){return h==="all"||f[b]}function y(b){return!!b.length}t.eachSeries(function(b,A){var S=v[A]=[];b.subType==="parallel"?_(b,A,S):w(b,A,S)});function _(b,A){var S=b.coordinateSystem;d|=S.hasAxisBrushed(),m(A)&&S.eachActiveState(b.getData(),function(D,I){D==="active"&&(c[I]=1)})}function w(b,A,S){var D=_A(b);if(!(!D||Kz(o,A))&&(M(g,function(L){D[L.brushType]&&o.brushTargetManager.controlSeries(L,b,t)&&S.push(L),d|=y(S)}),m(A)&&y(S))){var I=b.getData();I.each(function(L){yA(D,S,I,L)&&(c[L]=1)})}}t.eachSeries(function(b,A){var S={seriesId:b.id,seriesIndex:A,seriesName:b.name,dataIndex:[]};l.selected.push(S);var D=_A(b),I=v[A],L=b.getData(),P=m(A)?function(R){return c[R]?(S.dataIndex.push(L.getRawIndex(R)),"inBrush"):"outOfBrush"}:function(R){return yA(D,I,L,R)?(S.dataIndex.push(L.getRawIndex(R)),"inBrush"):"outOfBrush"};(m(A)?d:y(I))&&Zz(gA,p,L,P)})}),Xz(e,i,n,a,r)});function Xz(t,e,r,a,i){if(!!i){var n=t.getZr();if(!n[cp]){n[fp]||(n[fp]=qz);var o=es(n,fp,r,e);o(t,a)}}}function qz(t,e){if(!t.isDisposed()){var r=t.getZr();r[cp]=!0,t.dispatchAction({type:"brushSelect",batch:e}),r[cp]=!1}}function yA(t,e,r,a){for(var i=0,n=e.length;i<n;i++){var o=e[i];if(t[o.brushType](a,r,o.selectors,o))return!0}}function _A(t){var e=t.brushSelector;if(Lt(e)){var r=[];return M(hp,function(i,n){r[n]=function(o,s,l,u){var h=s.getItemLayout(o);return i[e](h,l,u)}}),r}else if(se(e)){var a={};return M(hp,function(i,n){a[n]=e}),a}return e}function Kz(t,e){var r=t.option.seriesIndex;return r!=null&&r!=="all"&&(z(r)?yt(r,e)<0:e!==r)}function jz(t){var e=t.selectors={};return M(hp[t.brushType],function(r,a){e[a]=function(i){return r(i,e,t)}}),t}var Qz={lineX:ce,lineY:ce,rect:function(t){return xA(t.range)},polygon:function(t){for(var e,r=t.range,a=0,i=r.length;a<i;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var n=r[a];n[0]<e[0][0]&&(e[0][0]=n[0]),n[0]>e[0][1]&&(e[0][1]=n[0]),n[1]<e[1][0]&&(e[1][0]=n[1]),n[1]>e[1][1]&&(e[1][1]=n[1])}return e&&xA(e)}};function xA(t){return new vt(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Jz=["#ddd"],Q5=Ze({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var r=this.option;!e&&vA(r,t,["inBrush","outOfBrush"]);var a=r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:Jz},a.hasOwnProperty("liftZ")||(a.liftZ=5)},setAreas:function(t){T&&(gt(z(t)),M(t,function(e){gt(e.brushType,"Illegal areas")})),t&&(this.areas=V(t,function(e){return wA(this.option,e)},this))},setBrushOption:function(t){this.brushOption=wA(this.option,t),this.brushType=this.brushOption.brushType}});function wA(t,e){return ut({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new _t(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}he({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new ro(e.getZr())).on("brush",it(this._onBrush,this)).mount()},render:function(t){return this.model=t,vp.apply(this,arguments)},updateTransform:function(t,e){return mA(e),vp.apply(this,arguments)},updateView:vp,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var r=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:rt(t),$from:r}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:rt(t),$from:r})}});function vp(t,e,r,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(r)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}mt({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(r){r.setAreas(t.areas)})}),mt({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),mt({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var tB=ua.toolbox.brush;function dp(t,e,r){this.model=t,this.ecModel=e,this.api=r,this._brushType,this._brushMode}dp.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],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:rt(tB.title)};var Vh=dp.prototype;Vh.render=Vh.updateView=function(t,e,r){var a,i,n;e.eachComponent({mainType:"brush"},function(o){a=o.brushType,i=o.brushOption.brushMode||"single",n|=o.areas.length}),this._brushType=a,this._brushMode=i,M(t.get("type",!0),function(o){t.setIconStatus(o,(o==="keep"?i==="multiple":o==="clear"?n:o===a)?"emphasis":"normal")})},Vh.getIcons=function(){var t=this.model,e=t.get("icon",!0),r={};return M(t.get("type",!0),function(a){e[a]&&(r[a]=e[a])}),r},Vh.onclick=function(t,e,r){var a=this._brushType,i=this._brushMode;r==="clear"?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:r==="keep"?a:a===r?!1:r,brushMode:r==="keep"?i==="multiple"?"single":"multiple":i}})},io("brush",dp),we(Uz),Ze({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),he({type:"title",render:function(t,e,r){if(this.group.removeAll(),!!t.get("show")){var a=this.group,i=t.getModel("textStyle"),n=t.getModel("subtextStyle"),o=t.get("textAlign"),s=Xt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new dt({style:$t({},i,{text:t.get("text"),textFill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),f=new dt({style:$t({},n,{text:h,textFill:n.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),c=t.get("link"),v=t.get("sublink"),d=t.get("triggerEvent",!0);l.silent=!c&&!d,f.silent=!v&&!d,c&&l.on("click",function(){Zo(c,"_"+t.get("target"))}),v&&f.on("click",function(){Zo(c,"_"+t.get("subtarget"))}),l.eventData=f.eventData=d?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(l),h&&a.add(f);var g=a.getBoundingRect(),p=t.getBoxLayoutParams();p.width=g.width,p.height=g.height;var m=qt(p,{width:r.getWidth(),height:r.getHeight()},t.get("padding"));o||(o=t.get("left")||t.get("right"),o==="middle"&&(o="center"),o==="right"?m.x+=m.width:o==="center"&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),s==="center"&&(s="middle"),s==="bottom"?m.y+=m.height:s==="middle"&&(m.y+=m.height/2),s=s||"top"),a.attr("position",[m.x,m.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),f.setStyle(y),g=a.getBoundingRect();var _=m.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var b=new xt({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(b)}}});var eB=function(t){var e=t&&t.timeline;z(e)||(e=e?[e]:[]),M(e,function(r){!r||rB(r)})};function rB(t){var e=t.type,r={number:"value",time:"time"};if(r[e]&&(t.axisType=r[e],delete t.type),bA(t),Xi(t,"controlPosition")){var a=t.controlStyle||(t.controlStyle={});Xi(a,"position")||(a.position=t.controlPosition),a.position==="none"&&!Xi(a,"show")&&(a.show=!1,delete a.position),delete t.controlPosition}M(t.data||[],function(i){lt(i)&&!z(i)&&(!Xi(i,"value")&&Xi(i,"name")&&(i.value=i.name),bA(i))})}function bA(t){var e=t.itemStyle||(t.itemStyle={}),r=e.emphasis||(e.emphasis={}),a=t.label||t.label||{},i=a.normal||(a.normal={}),n={normal:1,emphasis:1};M(a,function(o,s){!n[s]&&!Xi(i,s)&&(i[s]=o)}),r.label&&!Xi(a,"emphasis")&&(a.emphasis=r.label,delete r.label)}function Xi(t,e){return t.hasOwnProperty(e)}wt.registerSubTypeDefaulter("timeline",function(){return"slider"}),mt({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var r=e.getComponent("timeline");return r&&t.currentIndex!=null&&(r.setCurrentIndex(t.currentIndex),!r.get("loop",!0)&&r.isIndexMax()&&r.setPlayState(!1)),e.resetOption("timeline"),J({currentIndex:r.option.currentIndex},t)}),mt({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var r=e.getComponent("timeline");r&&t.playState!=null&&r.setPlayState(t.playState)});var SA=wt.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,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:[]},init:function(t,e,r){this._data,this._names,this.mergeDefaultAndTheme(t,r),this._initData()},mergeOption:function(t){SA.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){t==null&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],r=t.axisType,a=this._names=[];if(r==="category"){var i=[];M(e,function(s,l){var u=Io(s),h;lt(s)?(h=rt(s),h.value=l):h=l,i.push(h),!Lt(u)&&(u==null||isNaN(u))&&(u=""),a.push(u+"")}),e=i}var n={category:"ordinal",time:"time"}[r]||"number",o=this._data=new fe([{name:"value",type:n}],this);o.initData(e,a)},getData:function(){return this._data},getCategories:function(){if(this.get("axisType")==="category")return this._names.slice()}}),aB=SA.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,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:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});Dt(aB,Sv);var iB=Fr.extend({type:"timeline"}),Gh=function(t,e,r,a){Qt.call(this,t,e,r),this.type=a||"value",this.model=null};Gh.prototype={constructor:Gh,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return this.model.get("orient")==="horizontal"}},It(Gh,Qt);var ei=it,gp=M,pp=Math.PI;iB.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,r,a){if(this.model=t,this.api=r,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,r),n=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(i,t);t.formatTooltip=function(l){return kt(s.scale.getLabel(l))},gp(["AxisLine","AxisTick","Control","CurrentPointer"],function(l){this["_render"+l](i,n,s,t)},this),this._renderAxisLabel(i,o,s,t),this._position(i,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var r=t.get("label.position"),a=t.get("orient"),i=nB(t,e);r==null||r==="auto"?r=a==="horizontal"?i.y+i.height/2<e.getHeight()/2?"-":"+":i.x+i.width/2<e.getWidth()/2?"+":"-":isNaN(r)&&(r={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][r]);var n={horizontal:"center",vertical:r>=0||r==="+"?"left":"right"},o={horizontal:r>=0||r==="+"?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:pp/2},l=a==="vertical"?i.height:i.width,u=t.getModel("controlStyle"),h=u.get("show",!0),f=h?u.get("itemSize"):0,c=h?u.get("itemGap"):0,v=f+c,d=t.get("label.rotate")||0;d=d*pp/180;var g,p,m,y,_=u.get("position",!0),w=h&&u.get("showPlayBtn",!0),b=h&&u.get("showPrevBtn",!0),A=h&&u.get("showNextBtn",!0),S=0,D=l;return _==="left"||_==="bottom"?(w&&(g=[0,0],S+=v),b&&(p=[S,0],S+=v),A&&(m=[D-f,0],D-=v)):(w&&(g=[D-f,0],D-=v),b&&(p=[0,0],S+=v),A&&(m=[D-f,0],D-=v)),y=[S,D],t.get("inverse")&&y.reverse(),{viewRect:i,mainLength:l,orient:a,rotation:s[a],labelRotation:d,labelPosOpt:r,labelAlign:t.get("label.align")||n[a],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||o[a],playPosition:g,prevBtnPosition:p,nextBtnPosition:m,axisExtent:y,controlSize:f,controlGap:c}},_position:function(t,e){var r=this._mainGroup,a=this._labelGroup,i=t.viewRect;if(t.orient==="vertical"){var n=Ie(),o=i.x,s=i.y+i.height;yr(n,n,[-o,-s]),aa(n,n,-pp/2),yr(n,n,[o,s]),i=i.clone(),i.applyTransform(n)}var l=p(i),u=p(r.getBoundingRect()),h=p(a.getBoundingRect()),f=r.position,c=a.position;c[0]=f[0]=l[0][0];var v=t.labelPosOpt;if(isNaN(v)){var d=v==="+"?0:1;m(f,u,l,1,d),m(c,h,l,1,1-d)}else{var d=v>=0?0:1;m(f,u,l,1,d),c[1]=f[1]+v}r.attr("position",f),a.attr("position",c),r.rotation=a.rotation=t.rotation,g(r),g(a);function g(y){var _=y.position;y.origin=[l[0][0]-_[0],l[1][0]-_[1]]}function p(y){return[[y.x,y.x+y.width],[y.y,y.y+y.height]]}function m(y,_,w,b,A){y[b]+=w[b][A]-_[b][A]}},_createAxis:function(t,e){var r=e.getData(),a=e.get("axisType"),i=zn(e,a);i.getTicks=function(){return r.mapArray(["value"],function(s){return s})};var n=r.getDataExtent("value");i.setExtent(n[0],n[1]),i.niceTicks();var o=new Gh("value",i,t.axisExtent,a);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new q;return this.group.add(e),e},_renderAxisLine:function(t,e,r,a){var i=r.getExtent();!a.get("lineStyle.show")||e.add(new ye({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:et({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,r,a){var i=a.getData(),n=r.scale.getTicks();gp(n,function(o){var s=r.dataToCoord(o),l=i.getItemModel(o),u=l.getModel("itemStyle"),h=l.getModel("emphasis.itemStyle"),f={position:[s,0],onclick:ei(this._changeTimeline,this,o)},c=AA(l,u,e,f);Ot(c,h.getItemStyle()),l.get("tooltip")?(c.dataIndex=o,c.dataModel=a):c.dataIndex=c.dataModel=null},this)},_renderAxisLabel:function(t,e,r,a){var i=r.getLabelModel();if(!!i.get("show")){var n=a.getData(),o=r.getViewLabels();gp(o,function(s){var l=s.tickValue,u=n.getItemModel(l),h=u.getModel("label"),f=u.getModel("emphasis.label"),c=r.dataToCoord(s.tickValue),v=new dt({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:ei(this._changeTimeline,this,l),silent:!1});$t(v.style,h,{text:s.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(v),Ot(v,$t({},f))},this)}},_renderControl:function(t,e,r,a){var i=t.controlSize,n=t.rotation,o=a.getModel("controlStyle").getItemStyle(),s=a.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-i/2,i,i],u=a.getPlayState(),h=a.get("inverse",!0);f(t.nextBtnPosition,"controlStyle.nextIcon",ei(this._changeTimeline,this,h?"-":"+")),f(t.prevBtnPosition,"controlStyle.prevIcon",ei(this._changeTimeline,this,h?"+":"-")),f(t.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),ei(this._handlePlayClick,this,!u),!0);function f(c,v,d,g){if(!!c){var p={position:c,origin:[i/2,0],rotation:g?-n:0,rectHover:!0,style:o,onclick:d},m=oB(a,v,l,p);e.add(m),Ot(m,s)}}},_renderCurrentPointer:function(t,e,r,a){var i=a.getData(),n=a.getCurrentIndex(),o=i.getItemModel(n).getModel("checkpointStyle"),s=this,l={onCreate:function(u){u.draggable=!0,u.drift=ei(s._handlePointerDrag,s),u.ondragend=ei(s._handlePointerDragend,s),TA(u,n,r,a,!0)},onUpdate:function(u){TA(u,n,r,a)}};this._currentPointer=AA(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,r){this._clearTimer(),this._pointerChangeTimeline([r.offsetX,r.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var r=this._toAxisCoord(t)[0],a=this._axis,i=_i(a.getExtent().slice());r>i[1]&&(r=i[1]),r<i[0]&&(r=i[0]),this._currentPointer.position[0]=r,this._currentPointer.dirty();var n=this._findNearestTick(r),o=this.model;(e||n!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(n)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(ei(t,this),this.model.get("playInterval")));function t(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return Hr(t,e,!0)},_findNearestTick:function(t){var e=this.model.getData(),r=1/0,a,i=this._axis;return e.each(["value"],function(n,o){var s=i.dataToCoord(n),l=Math.abs(s-t);l<r&&(r=l,a=o)}),a},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();t==="+"?t=e+1:t==="-"&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}});function nB(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function oB(t,e,r,a){var i=zo(t.get(e).replace(/^path:\/\//,""),rt(a||{}),new vt(r[0],r[1],r[2],r[3]),"center");return i}function AA(t,e,r,a,i,n){var o=e.get("color");if(i)i.setColor(o),r.add(i),n&&n.onUpdate(i);else{var s=t.get("symbol");i=Ye(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),r.add(i),n&&n.onCreate(i)}var l=e.getItemStyle(["color","symbol","symbolSize"]);i.setStyle(l),a=ut({rectHover:!0,z2:100},a,!0);var u=t.get("symbolSize");u=u instanceof Array?u.slice():[+u,+u],u[0]/=2,u[1]/=2,a.scale=u;var h=t.get("symbolOffset");if(h){var f=a.position=a.position||[0,0];f[0]+=H(h[0],u[0]),f[1]+=H(h[1],u[1])}var c=t.get("symbolRotate");return a.rotation=(c||0)*Math.PI/180||0,i.attr(a),i.updateTransform(),i}function TA(t,e,r,a,i){if(!t.dragging){var n=a.getModel("checkpointStyle"),o=r.dataToCoord(a.getData().get(["value"],e));i||!n.get("animation",!0)?t.attr({position:[o,0]}):(t.stopAnimation(!0),t.animateTo({position:[o,0]},n.get("animationDuration",!0),n.get("animationEasing",!0)))}}we(eB);var CA=ka,mp=kt;function Hh(t){fi(t,"label",["show"])}var Fh=Ze({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,r){if(T&&this.type==="marker")throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,r),this._mergeOption(t,r,!1,!0)},isAnimationEnabled:function(){if(G.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,r,a){var i=this.constructor,n=this.mainType+"Model";r||e.eachSeries(function(o){var s=o.get(this.mainType,!0),l=o[n];if(!s||!s.data){o[n]=null;return}l?l._mergeOption(s,e,!0):(a&&Hh(s),M(s.data,function(u){u instanceof Array?(Hh(u[0]),Hh(u[1])):Hh(u)}),l=new i(s,this,e),et(l,{mainType:this.mainType,seriesIndex:o.seriesIndex,name:o.name,createdBySelf:!0}),l.__hostSeries=o),o[n]=l},this)},formatTooltip:function(t){var e=this.getData(),r=this.getRawValue(t),a=z(r)?V(r,CA).join(", "):CA(r),i=e.getName(t),n=mp(this.name);return(r!=null||i)&&(n+="<br />"),i&&(n+=mp(i),r!=null&&(n+=" : ")),r!=null&&(n+=mp(a)),n},getData:function(){return this._data},setData:function(t){this._data=t}});Dt(Fh,Sv),Fh.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var DA=yt;function sB(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function lB(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function yp(t,e,r,a,i,n){var o=[],s=fa(e,a),l=s?e.getCalculationInfo("stackResultDimension"):a,u=wp(e,l,t),h=e.indicesOfNearest(l,u)[0];o[i]=e.get(r,h),o[n]=e.get(l,h);var f=e.get(a,h),c=dy(e.get(a,h));return c=Math.min(c,20),c>=0&&(o[n]=+o[n].toFixed(c)),[o,f]}var _p=ot,xp={min:_p(yp,"min"),max:_p(yp,"max"),average:_p(yp,"average")};function Ys(t,e){var r=t.getData(),a=t.coordinateSystem;if(e&&!lB(e)&&!z(e.coord)&&a){var i=a.dimensions,n=MA(e,r,a,t);if(e=rt(e),e.type&&xp[e.type]&&n.baseAxis&&n.valueAxis){var o=DA(i,n.baseAxis.dim),s=DA(i,n.valueAxis.dim),l=xp[e.type](r,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],h=0;h<2;h++)xp[u[h]]&&(u[h]=wp(r,r.mapDimension(i[h]),u[h]));e.coord=u}}return e}function MA(t,e,r,a){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(uB(a,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function uB(t,e){var r=t.getData(),a=r.dimensions;e=r.getDimension(e);for(var i=0;i<a.length;i++){var n=r.getDimensionInfo(a[i]);if(n.name===e)return n.coordDim}}function Xs(t,e){return t&&t.containData&&e.coord&&!sB(e)?t.containData(e.coord):!0}function IA(t,e,r,a){return a<2?t.coord&&t.coord[a]:t.value}function wp(t,e,r){if(r==="average"){var a=0,i=0;return t.each(e,function(n,o){isNaN(n)||(a+=n,i++)}),a/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e,!0)[r==="max"?1:0]}var bp=he({type:"marker",init:function(){this.markerGroupMap=ht()},render:function(t,e,r){var a=this.markerGroupMap;a.each(function(n){n.__keep=!1});var i=this.type+"Model";e.eachSeries(function(n){var o=n[i];o&&this.renderSeries(n,o,e,r)},this),a.each(function(n){!n.__keep&&this.group.remove(n.group)},this)},renderSeries:function(){}});function LA(t,e,r){var a=e.coordinateSystem;t.each(function(i){var n=t.getItemModel(i),o,s=H(n.get("x"),r.getWidth()),l=H(n.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,i));else if(a){var u=t.get(a.dimensions[0],i),h=t.get(a.dimensions[1],i);o=a.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(i,o)})}bp.extend({type:"markPoint",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markPointModel;i&&(LA(i.getData(),a,r),this.markerGroupMap.get(a.id).updateLayout(i))},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new Bn),u=hB(i,t,e);e.setData(u),LA(e.getData(),t,a),u.each(function(h){var f=u.getItemModel(h),c=f.getShallow("symbol"),v=f.getShallow("symbolSize"),d=se(c),g=se(v);if(d||g){var p=e.getRawValue(h),m=e.getDataParams(h);d&&(c=c(p,m)),g&&(v=v(p,m))}u.setItemVisual(h,{symbol:c,symbolSize:v,color:f.get("itemStyle.color")||o.getVisual("color")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(h){h.traverse(function(f){f.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}});function hB(t,e,r){var a;t?a=V(t&&t.dimensions,function(o){var s=e.getData().getDimensionInfo(e.getData().mapDimension(o))||{};return J({name:o},s)}):a=[{name:"value",type:"float"}];var i=new fe(a,r),n=V(r.get("data"),ot(Ys,e));return t&&(n=ee(n,ot(Xs,t))),i.initData(n,null,t?IA:function(o){return o.value}),i}we(function(t){t.markPoint=t.markPoint||{}}),Fh.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var fB=function(t,e,r,a){var i=t.getData(),n=a.type;if(!z(a)&&(n==="min"||n==="max"||n==="average"||n==="median"||a.xAxis!=null||a.yAxis!=null)){var o,s;if(a.yAxis!=null||a.xAxis!=null)o=e.getAxis(a.yAxis!=null?"y":"x"),s=Ut(a.yAxis,a.xAxis);else{var l=MA(a,i,e,t);o=l.valueAxis;var u=fs(i,l.valueDataDim);s=wp(i,u,n)}var h=o.dim==="x"?0:1,f=1-h,c=rt(a),v={};c.type=null,c.coord=[],v.coord=[],c.coord[f]=-1/0,v.coord[f]=1/0;var d=r.get("precision");d>=0&&typeof s=="number"&&(s=+s.toFixed(Math.min(d,20))),c.coord[h]=v.coord[h]=s,a=[c,v,{type:n,valueIndex:a.valueIndex,value:s}]}return a=[Ys(t,a[0]),Ys(t,a[1]),et({},a[2])],a[2].type=a[2].type||"",ut(a[2],a[0]),ut(a[2],a[1]),a};function Wh(t){return!isNaN(t)&&!isFinite(t)}function PA(t,e,r,a){var i=1-t,n=a.dimensions[t];return Wh(e[i])&&Wh(r[i])&&e[t]===r[t]&&a.getAxis(n).containData(e[t])}function cB(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,a=e[1].coord;if(r&&a&&(PA(1,r,a,t)||PA(0,r,a,t)))return!0}return Xs(t,e[0])&&Xs(t,e[1])}function Sp(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=H(o.get("x"),i.getWidth()),u=H(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=n.dimensions,f=t.get(h[0],e),c=t.get(h[1],e);s=n.dataToPoint([f,c])}if(n.type==="cartesian2d"){var v=n.getAxis("x"),d=n.getAxis("y"),h=n.dimensions;Wh(t.get(h[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):Wh(t.get(h[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}bp.extend({type:"markLine",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markLineModel;if(i){var n=i.getData(),o=i.__from,s=i.__to;o.each(function(l){Sp(o,l,!0,a,r),Sp(s,l,!1,a,r)}),n.each(function(l){n.setItemLayout(l,[o.getItemLayout(l),s.getItemLayout(l)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new oh);this.group.add(l.group);var u=vB(i,t,e),h=u.from,f=u.to,c=u.line;e.__from=h,e.__to=f,e.setData(c);var v=e.get("symbol"),d=e.get("symbolSize");z(v)||(v=[v,v]),typeof d=="number"&&(d=[d,d]),u.from.each(function(p){g(h,p,!0),g(f,p,!1)}),c.each(function(p){var m=c.getItemModel(p).get("lineStyle.color");c.setItemVisual(p,{color:m||h.getItemVisual(p,"color")}),c.setItemLayout(p,[h.getItemLayout(p),f.getItemLayout(p)]),c.setItemVisual(p,{fromSymbolSize:h.getItemVisual(p,"symbolSize"),fromSymbol:h.getItemVisual(p,"symbol"),toSymbolSize:f.getItemVisual(p,"symbolSize"),toSymbol:f.getItemVisual(p,"symbol")})}),l.updateData(c),u.line.eachItemGraphicEl(function(p,m){p.traverse(function(y){y.dataModel=e})});function g(p,m,y){var _=p.getItemModel(m);Sp(p,m,y,t,a),p.setItemVisual(m,{symbolSize:_.get("symbolSize")||d[y?0:1],symbol:_.get("symbol",!0)||v[y?0:1],color:_.get("itemStyle.color")||o.getVisual("color")})}l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}});function vB(t,e,r){var a;t?a=V(t&&t.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J({name:u},h)}):a=[{name:"value",type:"float"}];var i=new fe(a,r),n=new fe(a,r),o=new fe([],r),s=V(r.get("data"),ot(fB,e,t,r));t&&(s=ee(s,ot(cB,t)));var l=t?IA:function(u){return u.value};return i.initData(V(s,function(u){return u[0]}),null,l),n.initData(V(s,function(u){return u[1]}),null,l),o.initData(V(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}we(function(t){t.markLine=t.markLine||{}}),Fh.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var dB=function(t,e,r,a){var i=Ys(t,a[0]),n=Ys(t,a[1]),o=Ut,s=i.coord,l=n.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=go([{},i,n]);return u.coord=[i.coord,n.coord],u.x0=i.x,u.y0=i.y,u.x1=n.x,u.y1=n.y,u};function Uh(t){return!isNaN(t)&&!isFinite(t)}function EA(t,e,r,a){var i=1-t;return Uh(e[i])&&Uh(r[i])}function gB(t,e){var r=e.coord[0],a=e.coord[1];return t.type==="cartesian2d"&&r&&a&&(EA(1,r,a,t)||EA(0,r,a,t))?!0:Xs(t,{coord:r,x:e.x0,y:e.y0})||Xs(t,{coord:a,x:e.x1,y:e.y1})}function RA(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=H(o.get(r[0]),i.getWidth()),u=H(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(t.getValues(r,e));else{var h=t.get(r[0],e),f=t.get(r[1],e),c=[h,f];n.clampData&&n.clampData(c,c),s=n.dataToPoint(c,!0)}if(n.type==="cartesian2d"){var v=n.getAxis("x"),d=n.getAxis("y"),h=t.get(r[0],e),f=t.get(r[1],e);Uh(h)?s[0]=v.toGlobalCoord(v.getExtent()[r[0]==="x0"?0:1]):Uh(f)&&(s[1]=d.toGlobalCoord(d.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var OA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];bp.extend({type:"markArea",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markAreaModel;if(i){var n=i.getData();n.each(function(o){var s=V(OA,function(u){return RA(n,o,u,a,r)});n.setItemLayout(o,s);var l=n.getItemGraphicEl(o);l.setShape("points",s)})}},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,{group:new q});this.group.add(l.group),l.__keep=!0;var u=pB(i,t,e);e.setData(u),u.each(function(h){u.setItemLayout(h,V(OA,function(f){return RA(u,h,f,t,a)})),u.setItemVisual(h,{color:o.getVisual("color")})}),u.diff(l.__data).add(function(h){var f=new Ge({shape:{points:u.getItemLayout(h)}});u.setItemGraphicEl(h,f),l.group.add(f)}).update(function(h,f){var c=l.__data.getItemGraphicEl(f);ft(c,{shape:{points:u.getItemLayout(h)}},e,h),l.group.add(c),u.setItemGraphicEl(h,c)}).remove(function(h){var f=l.__data.getItemGraphicEl(h);l.group.remove(f)}).execute(),u.eachItemGraphicEl(function(h,f){var c=u.getItemModel(f),v=c.getModel("label"),d=c.getModel("emphasis.label"),g=u.getItemVisual(f,"color");h.useStyle(J(c.getModel("itemStyle").getItemStyle(),{fill:gl(g,.4),stroke:g})),h.hoverStyle=c.getModel("emphasis.itemStyle").getItemStyle(),Fe(h.style,h.hoverStyle,v,d,{labelFetcher:e,labelDataIndex:f,defaultText:u.getName(f)||"",isRectText:!0,autoColor:g}),Ot(h,{}),h.dataModel=e}),l.__data=u,l.group.silent=e.get("silent")||t.get("silent")}});function pB(t,e,r){var a,i,n=["x0","y0","x1","y1"];t?(a=V(t&&t.dimensions,function(l){var u=e.getData(),h=u.getDimensionInfo(u.mapDimension(l))||{};return J({name:l},h)}),i=new fe(V(n,function(l,u){return{name:l,type:a[u%2].type}}),r)):(a=[{name:"value",type:"float"}],i=new fe(a,r));var o=V(r.get("data"),ot(dB,e,t,r));t&&(o=ee(o,ot(gB,t)));var s=t?function(l,u,h,f){return l.coord[Math.floor(f/2)][f%2]}:function(l){return l.value};return i.initData(o,null,s),i.hasItemOption=!0,i}we(function(t){t.markArea=t.markArea||{}});var NA=ua.legend.selector,mB={all:{type:"all",title:rt(NA.all)},inverse:{type:"inverse",title:rt(NA.inverse)}},kA=Ze({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,r){this.mergeDefaultAndTheme(t,r),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){kA.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),z(e)&&M(e,function(r,a){Lt(r)&&(r={type:r}),e[a]=ut(r,mB[r.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var e=!1,r=0;r<t.length;r++){var a=t[r].get("name");if(this.isSelected(a)){this.select(a),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],r=[];t.eachRawSeries(function(n){var o=n.name;r.push(o);var s;if(n.legendVisualProvider){var l=n.legendVisualProvider,u=l.getAllNames();t.isSeriesFiltered(n)||(r=r.concat(u)),u.length?e=e.concat(u):s=!0}else s=!0;s&&Lc(n)&&e.push(n.name)}),this._availableNames=r;var a=this.get("data")||e,i=V(a,function(n){return(typeof n=="string"||typeof n=="number")&&(n={name:n}),new _t(n,this,this.ecModel)},this);this._data=i},getData:function(){return this._data},select:function(t){var e=this.option.selected,r=this.get("selectedMode");if(r==="single"){var a=this._data;M(a,function(i){e[i.get("name")]=!1})}e[t]=!0},unSelect:function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this._data,e=this.option.selected;M(t,function(r){e[r.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,e=this.option.selected;M(t,function(r){var a=r.get("name",!0);e.hasOwnProperty(a)||(e[a]=!0),e[a]=!e[a]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&yt(this._availableNames,t)>=0},getOrient:function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,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,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},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}}});function qs(t,e,r){var a={},i=t==="toggleSelected",n;return r.eachComponent("legend",function(o){i&&n!=null?o[n?"select":"unSelect"](e.name):t==="allSelect"||t==="inverseSelect"?o[t]():(o[t](e.name),n=o.isSelected(e.name));var s=o.getData();M(s,function(l){var u=l.get("name");if(!(u===`
`||u==="")){var h=o.isSelected(u);a.hasOwnProperty(u)?a[u]=a[u]&&h:a[u]=h}})}),t==="allSelect"||t==="inverseSelect"?{selected:a}:{name:e.name,selected:a}}mt("legendToggleSelect","legendselectchanged",ot(qs,"toggleSelected")),mt("legendAllSelect","legendselectall",ot(qs,"allSelect")),mt("legendInverseSelect","legendinverseselect",ot(qs,"inverseSelect")),mt("legendSelect","legendselected",ot(qs,"select")),mt("legendUnSelect","legendunselected",ot(qs,"unSelect"));var lo=ot,zA=M,$h=q,yB=he({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new $h),this._backgroundEl,this.group.add(this._selectorGroup=new $h),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,r){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var i=t.get("align"),n=t.get("orient");(!i||i==="auto")&&(i=t.get("left")==="right"&&n==="vertical"?"right":"left");var o=t.get("selector",!0),s=t.get("selectorPosition",!0);o&&(!s||s==="auto")&&(s=n==="horizontal"?"end":"start"),this.renderInner(i,t,e,r,o,n,s);var l=t.getBoxLayoutParams(),u={width:r.getWidth(),height:r.getHeight()},h=t.get("padding"),f=qt(l,u,h),c=this.layoutInner(t,i,f,a,o,s),v=qt(J({width:c.width,height:c.height},l),u,h);this.group.attr("position",[v.x-c.x,v.y-c.y]),this.group.add(this._backgroundEl=VS(c,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,r,a,i,n,o){var s=this.getContentGroup(),l=ht(),u=e.get("selectedMode"),h=[];r.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),zA(e.getData(),function(f,c){var v=f.get("name");if(!this.newlineDisabled&&(v===""||v===`
`)){s.add(new $h({newline:!0}));return}var d=r.getSeriesByName(v)[0];if(!l.get(v)){if(d){var g=d.getData(),p=g.getVisual("color"),m=g.getVisual("borderColor");typeof p=="function"&&(p=p(d.getDataParams(0))),typeof m=="function"&&(m=m(d.getDataParams(0)));var y=g.getVisual("legendSymbol")||"roundRect",_=g.getVisual("symbol"),w=this._createItem(v,c,f,e,y,_,t,p,m,u);w.on("click",lo(VA,v,null,a,h)).on("mouseover",lo(Ap,d.name,null,a,h)).on("mouseout",lo(Tp,d.name,null,a,h)),l.set(v,!0)}else r.eachRawSeries(function(b){if(!l.get(v)&&b.legendVisualProvider){var A=b.legendVisualProvider;if(!A.containName(v))return;var S=A.indexOfName(v),D=A.getItemVisual(S,"color"),I=A.getItemVisual(S,"borderColor"),L="roundRect",P=this._createItem(v,c,f,e,L,null,t,D,I,u);P.on("click",lo(VA,null,v,a,h)).on("mouseover",lo(Ap,null,v,a,h)).on("mouseout",lo(Tp,null,v,a,h)),l.set(v,!0)}},this);T&&(l.get(v)||console.warn(v+" series not exists. Legend data should be same with series name or data name."))}},this),i&&this._createSelector(i,e,a,n,o)},_createSelector:function(t,e,r,a,i){var n=this.getSelectorGroup();zA(t,function(s){o(s)});function o(s){var l=s.type,u=new dt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:l==="all"?"legendAllSelect":"legendInverseSelect"})}});n.add(u);var h=e.getModel("selectorLabel"),f=e.getModel("emphasis.selectorLabel");Fe(u.style,u.hoverStyle={},h,f,{defaultText:s.title,isRectText:!1}),Ot(u)}},_createItem:function(t,e,r,a,i,n,o,s,l,u){var h=a.get("itemWidth"),f=a.get("itemHeight"),c=a.get("inactiveColor"),v=a.get("inactiveBorderColor"),d=a.get("symbolKeepAspect"),g=a.getModel("itemStyle"),p=a.isSelected(t),m=new $h,y=r.getModel("textStyle"),_=r.get("icon"),w=r.getModel("tooltip"),b=w.parentModel;i=_||i;var A=Ye(i,0,0,h,f,p?s:c,d??!0);if(m.add(BA(A,i,g,l,v,p)),!_&&n&&(n!==i||n==="none")){var S=f*.8;n==="none"&&(n="circle");var D=Ye(n,(h-S)/2,(f-S)/2,S,S,p?s:c,d??!0);m.add(BA(D,n,g,l,v,p))}var I=o==="left"?h+5:-5,L=o,P=a.get("formatter"),R=t;typeof P=="string"&&P?R=P.replace("{name}",t??""):typeof P=="function"&&(R=P(t)),m.add(new dt({style:$t({},y,{text:R,x:I,y:f/2,textFill:p?y.getTextColor():c,textAlign:L,textVerticalAlign:"middle"})}));var E=new xt({shape:m.getBoundingRect(),invisible:!0,tooltip:w.get("show")?et({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:a.componentIndex,name:t,$vars:["name"]}},w.option):null});return m.add(E),m.eachChild(function(Z){Z.silent=!0}),E.silent=!u,this.getContentGroup().add(m),Ot(m),m.__legendDataIndex=e,m},layoutInner:function(t,e,r,a,i,n){var o=this.getContentGroup(),s=this.getSelectorGroup();bi(t.get("orient"),o,t.get("itemGap"),r.width,r.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(i){bi("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),f=[-h.x,-h.y],c=t.get("selectorButtonGap",!0),v=t.getOrient().index,d=v===0?"width":"height",g=v===0?"height":"width",p=v===0?"y":"x";n==="end"?f[v]+=l[d]+c:u[v]+=h[d]+c,f[1-v]+=l[g]/2-h[g]/2,s.attr("position",f),o.attr("position",u);var m={x:0,y:0};return m[d]=l[d]+c+h[d],m[g]=Math.max(l[g],h[g]),m[p]=Math.min(0,h[p]+f[1-v]),m}else return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function BA(t,e,r,a,i,n){var o;return e!=="line"&&e.indexOf("empty")<0?(o=r.getItemStyle(),t.style.stroke=a,n||(o.stroke=i)):o=r.getItemStyle(["borderWidth","borderColor"]),t.setStyle(o)}function VA(t,e,r,a){Tp(t,e,r,a),r.dispatchAction({type:"legendToggleSelect",name:t??e}),Ap(t,e,r,a)}function Ap(t,e,r,a){var i=r.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:a})}function Tp(t,e,r,a){var i=r.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:a})}var _B=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var a=0;a<e.length;a++)if(!e[a].isSelected(r.name))return!1;return!0})};$e(Wr.PROCESSOR.SERIES_FILTER,_B),wt.registerSubTypeDefaulter("legend",function(){return"plain"});var GA=kA.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,r,a){var i=Cn(t);GA.superCall(this,"init",t,e,r,a),HA(this,t,i)},mergeOption:function(t,e){GA.superCall(this,"mergeOption",t,e),HA(this,this.option,t)}});function HA(t,e,r){var a=t.getOrient(),i=[1,1];i[a.index]=0,za(e,r,{type:"box",ignoreSize:i})}var FA=q,Cp=["width","height"],Dp=["x","y"],Mp=yB.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){Mp.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new FA),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new FA),this._showController},resetInner:function(){Mp.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,r,a,i,n,o){var s=this;Mp.superCall(this,"renderInner",t,e,r,a,i,n,o);var l=this._controllerGroup,u=e.get("pageIconSize",!0);z(u)||(u=[u,u]),f("pagePrev",0);var h=e.getModel("pageTextStyle");l.add(new dt({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),f("pageNext",1);function f(c,v){var d=c+"DataIndex",g=Ho(e.get("pageIcons",!0)[e.getOrient().name][v],{onclick:it(s._pageGo,s,d,e,a)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});g.name=c,l.add(g)}},layoutInner:function(t,e,r,a,i,n){var o=this.getSelectorGroup(),s=t.getOrient().index,l=Cp[s],u=Dp[s],h=Cp[1-s],f=Dp[1-s];i&&bi("horizontal",o,t.get("selectorItemGap",!0));var c=t.get("selectorButtonGap",!0),v=o.getBoundingRect(),d=[-v.x,-v.y],g=rt(r);i&&(g[l]=r[l]-v[l]-c);var p=this._layoutContentAndController(t,a,g,s,l,h,f);if(i){if(n==="end")d[s]+=p[l]+c;else{var m=v[l]+c;d[s]-=m,p[u]-=m}p[l]+=v[l]+c,d[1-s]+=p[f]+p[h]/2-v[h]/2,p[h]=Math.max(p[h],v[h]),p[f]=Math.min(p[f],v[f]+d[1-s]),o.attr("position",d)}return p},_layoutContentAndController:function(t,e,r,a,i,n,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;bi(t.get("orient"),s,t.get("itemGap"),a?r.width:null,a?null:r.height),bi("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),f=u.getBoundingRect(),c=this._showController=h[i]>r[i],v=[-h.x,-h.y];e||(v[a]=s.position[a]);var d=[0,0],g=[-f.x,-f.y],p=Xt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(c){var m=t.get("pageButtonPosition",!0);m==="end"?g[a]+=r[i]-f[i]:d[a]+=f[i]+p}g[1-a]+=h[n]/2-f[n]/2,s.attr("position",v),l.attr("position",d),u.attr("position",g);var y={x:0,y:0};if(y[i]=c?r[i]:h[i],y[n]=Math.max(h[n],f[n]),y[o]=Math.min(0,f[o]+g[1-a]),l.__rectSize=r[i],c){var _={x:0,y:0};_[i]=Math.max(r[i]-f[i]-p,0),_[n]=y[n],l.setClipPath(new xt({shape:_})),l.__rectSize=_[i]}else u.eachChild(function(b){b.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&ft(s,{position:w.contentPosition},c?t:!1),this._updatePageInfoView(t,w),y},_pageGo:function(t,e,r){var a=this._getPageInfo(e)[t];a!=null&&r.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:e.id})},_updatePageInfoView:function(t,e){var r=this._controllerGroup;M(["pagePrev","pageNext"],function(l){var u=e[l+"DataIndex"]!=null,h=r.childOfName(l);h&&(h.setStyle("fill",u?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=u?"pointer":"default")});var a=r.childOfName("pageText"),i=t.get("pageFormatter"),n=e.pageIndex,o=n!=null?n+1:0,s=e.pageCount;a&&i&&a.setStyle("text",Lt(i)?i.replace("{current}",o).replace("{total}",s):i({current:o,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,i=t.getOrient().index,n=Cp[i],o=Dp[i],s=this._findTargetItemIndex(e),l=r.children(),u=l[s],h=l.length,f=h?1:0,c={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return c;var v=y(u);c.contentPosition[i]=-v.s;for(var d=s+1,g=v,p=v,m=null;d<=h;++d)m=y(l[d]),(!m&&p.e>g.s+a||m&&!_(m,g.s))&&(p.i>g.i?g=p:g=m,g&&(c.pageNextDataIndex==null&&(c.pageNextDataIndex=g.i),++c.pageCount)),p=m;for(var d=s-1,g=v,p=v,m=null;d>=-1;--d)m=y(l[d]),(!m||!_(p,m.s))&&g.i<p.i&&(p=g,c.pagePrevDataIndex==null&&(c.pagePrevDataIndex=g.i),++c.pageCount,++c.pageIndex),g=m;return c;function y(w){if(w){var b=w.getBoundingRect(),A=b[o]+w.position[i];return{s:A,e:A+b[n],i:w.__legendDataIndex}}}function _(w,b){return w.e>=b&&w.s<=b+a}},_findTargetItemIndex:function(t){if(!this._showController)return 0;var e,r=this.getContentGroup(),a;return r.eachChild(function(i,n){var o=i.__legendDataIndex;a==null&&o!=null&&(a=n),o===t&&(e=n)}),e??a}});mt("legendScroll","legendscroll",function(t,e){var r=t.scrollDataIndex;r!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(r)})});var J5=rp.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),Zh=xt,qi=Nt,Ip=_i,ma=it,Lp=M,WA=7,xB=1,Pp=30,Ks="horizontal",UA="vertical",wB=5,bB=["line","bar","candlestick","scatter"],Ep=ap.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,r,a){if(Ep.superApply(this,"render",arguments),es(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1){this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},remove:function(){Ep.superApply(this,"remove",arguments),t_(this,"_dispatchZoomAction")},dispose:function(){Ep.superApply(this,"dispose",arguments),t_(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new q;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,r=this._findCoordRect(),a={width:e.getWidth(),height:e.getHeight()},i=this._orient===Ks?{right:a.width-r.x-r.width,top:a.height-Pp-WA,width:r.width,height:Pp}:{right:WA,top:r.y,width:Pp,height:r.height},n=Cn(t.option);M(["right","top","width","height"],function(s){n[s]==="ph"&&(n[s]=i[s])});var o=qt(n,a,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===UA&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,r=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),i=a&&a.get("inverse"),n=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;n.attr(r===Ks&&!i?{scale:o?[1,1]:[1,-1]}:r===Ks&&i?{scale:o?[-1,1]:[-1,-1]}:r===UA&&!i?{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2});var s=t.getBoundingRect([n]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,r=this._displayables.barGroup;r.add(new Zh({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),r.add(new Zh({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:it(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(!!t){var e=this._size,r=t.series,a=r.getRawData(),i=r.getShadowDim?r.getShadowDim():t.otherDim;if(i!=null){var n=a.getDataExtent(i),o=(n[1]-n[0])*.3;n=[n[0]-o,n[1]+o];var s=[0,e[1]],l=[0,e[0]],u=[[e[0],0],[0,0]],h=[],f=l[1]/(a.count()-1),c=0,v=Math.round(a.count()/e[0]),d;a.each([i],function(p,m){if(v>0&&m%v){c+=f;return}var y=p==null||isNaN(p)||p==="",_=y?0:qi(p,n,s,!0);y&&!d&&m?(u.push([u[u.length-1][0],0]),h.push([h[h.length-1][0],0])):!y&&d&&(u.push([c,0]),h.push([c,0])),u.push([c,_]),h.push([c,_]),c+=f,d=y});var g=this.dataZoomModel;this._displayables.barGroup.add(new Ge({shape:{points:u},style:J({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new ir({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var r,a=this.ecModel;return t.eachTargetAxis(function(i,n){var o=t.getAxisProxy(i.name,n).getTargetSeriesModels();M(o,function(s){if(!r&&!(e!==!0&&yt(bB,s.get("type"))<0)){var l=a.getComponent(i.axis,n).axis,u=SB(i.name),h,f=s.coordinateSystem;u!=null&&f.getOtherAxis&&(h=f.getOtherAxis(l).inverse),u=s.getData().mapDimension(u),r={thisAxis:l,series:s,thisDim:i.name,otherDim:u,otherAxisInverse:h}}},this)},this),r}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],r=t.handleLabels=[],a=this._displayables.barGroup,i=this._size,n=this.dataZoomModel;a.add(t.filler=new Zh({draggable:!0,cursor:$A(this._orient),drift:ma(this._onDragMove,this,"all"),ondragstart:ma(this._showDataInfo,this,!0),ondragend:ma(this._onDragEnd,this),onmouseover:ma(this._showDataInfo,this,!0),onmouseout:ma(this._showDataInfo,this,!1),style:{fill:n.get("fillerColor"),textPosition:"inside"}})),a.add(new Zh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{stroke:n.get("dataBackgroundColor")||n.get("borderColor"),lineWidth:xB,fill:"rgba(0,0,0,0)"}})),Lp([0,1],function(o){var s=Ho(n.get("handleIcon"),{cursor:$A(this._orient),draggable:!0,drift:ma(this._onDragMove,this,o),ondragend:ma(this._onDragEnd,this),onmouseover:ma(this._showDataInfo,this,!0),onmouseout:ma(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),l=s.getBoundingRect();this._handleHeight=H(n.get("handleSize"),this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(n.getModel("handleStyle").getItemStyle());var u=n.get("handleColor");u!=null&&(s.style.fill=u),a.add(e[o]=s);var h=n.textStyleModel;this.group.add(r[o]=new dt({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:h.getTextColor(),textFont:h.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[qi(t[0],[0,100],e,!0),qi(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var r=this.dataZoomModel,a=this._handleEnds,i=this._getViewExtent(),n=r.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];zi(e,a,i,r.get("zoomLock")?"all":t,n.minSpan!=null?qi(n.minSpan,o,i,!0):null,n.maxSpan!=null?qi(n.maxSpan,o,i,!0):null);var s=this._range,l=this._range=Ip([qi(a[0],i,o,!0),qi(a[1],i,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,r=this._handleEnds,a=Ip(r.slice()),i=this._size;Lp([0,1],function(n){var o=e.handles[n],s=this._handleHeight;o.attr({scale:[s/2,s/2],position:[r[n],i[1]/2-s/2]})},this),e.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:i[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,r=this._displayables,a=r.handleLabels,i=this._orient,n=["",""];if(e.get("showDetail")){var o=e.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,u=t?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();n=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var h=Ip(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(c){var v=yi(r.handles[c].parent,this.group),d=qc(c===0?"right":"left",v),g=this._handleWidth/2+wB,p=Hr([h[c]+(c===0?-g:g),this._size[1]/2],v);a[c].setStyle({x:p[0],y:p[1],textVerticalAlign:i===Ks?"middle":d,textAlign:i===Ks?d:"center",text:n[c]})}},_formatLabel:function(t,e){var r=this.dataZoomModel,a=r.get("labelFormatter"),i=r.get("labelPrecision");(i==null||i==="auto")&&(i=e.getPixelPrecision());var n=t==null||isNaN(t)?"":e.type==="category"||e.type==="time"?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(i,20));return se(a)?a(t,n):Lt(a)?a.replace("{value}",n):n},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,r,a){this._dragging=!0,oi(a.event);var i=this._displayables.barGroup.getLocalTransform(),n=Hr([e,r],i,!0),o=this._updateInterval(t,n[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,r=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(r[0]<0||r[0]>e[0]||r[1]<0||r[1]>e[1])){var a=this._handleEnds,i=(a[0]+a[1])/2,n=this._updateInterval("all",r[0]-i);this._updateView(),n&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(Lp(this.getTargetCoordInfo(),function(a){if(!t&&a.length){var i=a[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),r=this.api.getHeight();t={x:e*.2,y:r*.2,width:e*.6,height:r*.6}}return t}});function SB(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function $A(t){return t==="vertical"?"ns-resize":"ew-resize"}rp.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var ZA="\0_ec_dataZoom_roams";function AB(t,e){var r=XA(t),a=e.dataZoomId,i=e.coordId;M(r,function(s,l){var u=s.dataZoomInfos;u[a]&&yt(e.allCoordIds,i)<0&&(delete u[a],s.count--)}),qA(r);var n=r[i];n||(n=r[i]={coordId:i,dataZoomInfos:{},count:0},n.controller=CB(t,n),n.dispatchAction=ot(DB,t)),!n.dataZoomInfos[a]&&n.count++,n.dataZoomInfos[a]=e;var o=MB(n.dataZoomInfos);n.controller.enable(o.controlType,o.opt),n.controller.setPointerChecker(e.containsPoint),es(n,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function TB(t,e){var r=XA(t);M(r,function(a){a.controller.dispose();var i=a.dataZoomInfos;i[e]&&(delete i[e],a.count--)}),qA(r)}function YA(t){return t.type+"\0_"+t.id}function XA(t){var e=t.getZr();return e[ZA]||(e[ZA]={})}function CB(t,e){var r=new Yn(t.getZr());return M(["pan","zoom","scrollMove"],function(a){r.on(a,function(i){var n=[];M(e.dataZoomInfos,function(o){if(!!i.isAvailableBehavior(o.dataZoomModel.option)){var s=(o.getRange||{})[a],l=s&&s(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&l&&n.push({dataZoomId:o.dataZoomId,start:l[0],end:l[1]})}}),n.length&&e.dispatchAction(n)})}),r}function qA(t){M(t,function(e,r){e.count||(e.controller.dispose(),delete t[r])})}function DB(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function MB(t){var e,r="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return M(t,function(n){var o=n.dataZoomModel,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;a[r+s]>a[r+e]&&(e=s),i&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}var IB=it,KA=ap.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,r,a){KA.superApply(this,"render",arguments),this._range=t.getPercentRange(),M(this.getTargetCoordInfo(),function(i,n){var o=V(i,function(s){return YA(s.model)});M(i,function(s){var l=s.model,u={};M(["pan","zoom","scrollMove"],function(h){u[h]=IB(LB[h],this,s,n)},this),AB(r,{coordId:YA(l),allCoordIds:o,containsPoint:function(h,f,c){return l.coordinateSystem.containPoint([f,c])},dataZoomId:t.id,dataZoomModel:t,getRange:u})},this)},this)},dispose:function(){TB(this.api,this.dataZoomModel.id),KA.superApply(this,"dispose",arguments),this._range=null}}),LB={zoom:function(t,e,r,a){var i=this._range,n=i.slice(),o=t.axisModels[0];if(!!o){var s=Rp[e](null,[a.originX,a.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/a.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(zi(0,n,[0,100],0,h.minSpan,h.maxSpan),this._range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:jA(function(t,e,r,a,i,n){var o=Rp[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:jA(function(t,e,r,a,i,n){var o=Rp[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*n.scrollDelta})};function jA(t){return function(e,r,a,i){var n=this._range,o=n.slice(),s=e.axisModels[0];if(!!s){var l=t(o,s,e,r,a,i);if(zi(l,o,[0,100],"all"),this._range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var Rp={grid:function(t,e,r,a,i){var n=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],n.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(t,e,r,a,i){var n=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(t,e,r,a,i){var n=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},QA=M,JA=function(t){var e=t&&t.visualMap;z(e)||(e=e?[e]:[]),QA(e,function(r){if(!!r){uo(r,"splitList")&&!uo(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var a=r.pieces;a&&z(a)&&QA(a,function(i){lt(i)&&(uo(i,"start")&&!uo(i,"min")&&(i.min=i.start),uo(i,"end")&&!uo(i,"max")&&(i.max=i.end))})}})};function uo(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}wt.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"});var tT=Wr.VISUAL.COMPONENT;Rt(tT,{createOnAllSeries:!0,reset:function(t,e){var r=[];return e.eachComponent("visualMap",function(a){var i=t.pipelineContext;!a.isTargetSeries(t)||i&&i.large||r.push(Yz(a.stateList,a.targetVisuals,it(a.getValueState,a),a.getDataDimension(t.getData())))}),r}}),Rt(tT,{createOnAllSeries:!0,reset:function(t,e){var r=t.getData(),a=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(t)){var n=i.getVisualMeta(it(PB,null,t,i))||{stops:[],outerColors:[]},o=i.getDataDimension(r),s=r.getDimensionInfo(o);s!=null&&(n.dimension=s.index,a.push(n))}}),t.getData().setVisual("visualMeta",a)}});function PB(t,e,r,a){for(var i=e.targetVisuals[a],n=Mt.prepareVisualTypes(i),o={color:t.getData().getVisual("color")},s=0,l=n.length;s<l;s++){var u=n[s],h=i[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(r,f,c)}return o.color;function f(v){return o[v]}function c(v,d){o[v]=d}}var Op={get:function(t,e,r){var a=rt((EB[t]||{})[e]);return r&&z(a)?a[a.length-1]:a}},EB={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]}},eT=Mt.mapVisual,RB=Mt.eachVisual,OB=z,Np=M,NB=_i,kB=Nt,kp=ce,Yh=Ze({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,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,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,r){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,r)},optionUpdated:function(t,e){var r=this.option;G.canvasSupported||(r.realtime=!1),!e&&vA(r,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=it(t,this),this.controllerVisuals=up(this.option.controller,e,t),this.targetVisuals=up(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return t==null||t==="all"?this.ecModel.eachSeries(function(r,a){e.push(a)}):e=me(t),e},eachTargetSeries:function(t,e){M(this.getTargetSeriesIndices(),function(r){t.call(e,this.ecModel.getSeriesByIndex(r))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(r){r===t&&(e=!0)}),e},formatValueText:function(t,e,r){var a=this.option,i=a.precision,n=this.dataBound,o=a.formatter,s,l;if(r=r||["<",">"],z(t)&&(t=t.slice(),s=!0),l=e?t:s?[u(t[0]),u(t[1])]:u(t),Lt(o))return o.replace("{value}",s?l[0]:l).replace("{value2}",s?l[1]:l);if(se(o))return s?o(t[0],t[1]):o(t);if(s)return t[0]===n[0]?r[0]+" "+l[1]:t[1]===n[1]?r[1]+" "+l[0]:l[0]+" - "+l[1];return l;function u(h){return h===n[0]?"min":h===n[1]?"max":(+h).toFixed(Math.min(i,20))}},resetExtent:function(){var t=this.option,e=NB([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,r=t.dimensions;if(!(e==null&&!r.length)){if(e!=null)return t.getDimension(e);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var n=a[i],o=t.getDimensionInfo(n);if(!o.isCalculationCoord)return n}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,r={inRange:e.inRange,outOfRange:e.outOfRange},a=e.target||(e.target={}),i=e.controller||(e.controller={});ut(a,r),ut(i,r);var n=this.isCategory();o.call(this,a),o.call(this,i),s.call(this,a,"inRange","outOfRange"),l.call(this,i);function o(u){OB(e.color)&&!u.inRange&&(u.inRange={color:e.color.slice().reverse()}),u.inRange=u.inRange||{color:t.get("gradientColor")},Np(this.stateList,function(h){var f=u[h];if(Lt(f)){var c=Op.get(f,"active",n);c?(u[h]={},u[h][f]=c):delete u[h]}},this)}function s(u,h,f){var c=u[h],v=u[f];c&&!v&&(v=u[f]={},Np(c,function(d,g){if(!!Mt.isValidType(g)){var p=Op.get(g,"inactive",n);p!=null&&(v[g]=p,g==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function l(u){var h=(u.inRange||{}).symbol||(u.outOfRange||{}).symbol,f=(u.inRange||{}).symbolSize||(u.outOfRange||{}).symbolSize,c=this.get("inactiveColor");Np(this.stateList,function(v){var d=this.itemSize,g=u[v];g||(g=u[v]={color:n?c:[c]}),g.symbol==null&&(g.symbol=h&&rt(h)||(n?"roundRect":["roundRect"])),g.symbolSize==null&&(g.symbolSize=f&&rt(f)||(n?d[0]:[d[0],d[0]])),g.symbol=eT(g.symbol,function(y){return y==="none"||y==="square"?"roundRect":y});var p=g.symbolSize;if(p!=null){var m=-1/0;RB(p,function(y){y>m&&(m=y)}),g.symbolSize=eT(p,function(y){return kB(y,[0,m],[0,d[0]],!0)})}},this)}},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:kp,getValueState:kp,getVisualMeta:kp}),rT=[20,140],aT=Yh.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){aT.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){aT.superApply(this,"resetItemSize",arguments);var t=this.itemSize;this._orient==="horizontal"&&t.reverse(),(t[0]==null||isNaN(t[0]))&&(t[0]=rT[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=rT[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):z(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){Yh.prototype.completeVisualOption.apply(this,arguments),M(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=_i((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,r=this.getExtent();return(e[0]<=r[0]||e[0]<=t)&&(e[1]>=r[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(r){var a=[],i=r.getData();i.each(this.getDataDimension(i),function(n,o){t[0]<=n&&n<=t[1]&&a.push(o)},this),e.push({seriesId:r.id,dataIndex:a})},this),e},getVisualMeta:function(t){var e=iT(this,"outOfRange",this.getExtent()),r=iT(this,"inRange",this.option.range.slice()),a=[];function i(f,c){a.push({value:f,color:t(f,c)})}for(var n=0,o=0,s=r.length,l=e.length;o<l&&(!r.length||e[o]<=r[0]);o++)e[o]<r[n]&&i(e[o],"outOfRange");for(var u=1;n<s;n++,u=0)u&&a.length&&i(r[n],"outOfRange"),i(r[n],"inRange");for(var u=1;o<l;o++)(!r.length||r[r.length-1]<e[o])&&(u&&(a.length&&i(a[a.length-1].value,"outOfRange"),u=0),i(e[o],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}}});function iT(t,e,r){if(r[0]===r[1])return r.slice();for(var a=200,i=(r[1]-r[0])/a,n=r[0],o=[],s=0;s<=a&&n<r[1];s++)o.push(n),n+=i;return o.push(r[1]),o}var nT=he({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,r,a){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,r=xi(e.get("padding")||0),a=t.getBoundingRect();t.add(new xt({z2:-1,silent:!0,shape:{x:a.x-r[3],y:a.y-r[0],width:a.width+r[3]+r[1],height:a.height+r[0]+r[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,r){r=r||{};var a=r.forceState,i=this.visualMapModel,n={};if(e==="symbol"&&(n.symbol=i.get("itemSymbol")),e==="color"){var o=i.get("contentColor");n.color=o}function s(f){return n[f]}function l(f,c){n[f]=c}var u=i.controllerVisuals[a||i.getValueState(t)],h=Mt.prepareVisualTypes(u);return M(h,function(f){var c=u[f];r.convertOpacityToAlpha&&f==="opacity"&&(f="colorAlpha",c=u.__alphaForOpacity),Mt.dependsOn(f,e)&&c&&c.applyVisual(t,s,l)}),n[e]},positionGroup:function(t){var e=this.visualMapModel,r=this.api;uu(t,e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})},doRender:ce});function oT(t,e,r){var a=t.option,i=a.align;if(i!=null&&i!=="auto")return i;for(var n={width:e.getWidth(),height:e.getHeight()},o=a.orient==="horizontal"?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],h={},f=0;f<3;f++)h[s[1-o][f]]=u[f],h[l[f]]=f===2?r[0]:a[l[f]];var c=[["x","width",3],["y","height",0]][o],v=qt(h,n,a.padding);return l[(v.margin[c[2]]||0)+v[c[0]]+v[c[1]]*.5<n[c[1]]*.5?0:1]}function Xh(t,e){return M(t||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var ya=Nt,zB=M,qh=Math.min,js=Math.max,BB=12,sT=6,VB=nT.extend({type:"visualMap.continuous",init:function(){VB.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,r,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var r=t.get("text");this._renderEndsText(e,r,0),this._renderEndsText(e,r,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,r){if(!!e){var a=e[1-r];a=a!=null?a+"":"";var i=this.visualMapModel,n=i.get("textGap"),o=i.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,r===0?-n:o[1]+n],s),u=this._applyTransform(r===0?"bottom":"top",s),h=this._orient,f=this.visualMapModel.textStyleModel;this.group.add(new dt({style:{x:l[0],y:l[1],textVerticalAlign:h==="horizontal"?"middle":u,textAlign:h==="horizontal"?u:"center",text:a,textFont:f.getFont(),textFill:f.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,r=this._shapes,a=e.itemSize,i=this._orient,n=this._useHandle,o=oT(e,this.api,a),s=r.barGroup=this._createBarGroup(o);s.add(r.outOfRange=Kh()),s.add(r.inRange=Kh(null,n?uT(this._orient):null,it(this._dragHandle,this,"all",!1),it(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("\u56FD"),u=js(l.width,l.height);n&&(r.handleThumbs=[],r.handleLabels=[],r.handleLabelPoints=[],this._createHandle(s,0,a,u,i,o),this._createHandle(s,1,a,u,i,o)),this._createIndicator(s,a,u,i),t.add(s)},_createHandle:function(t,e,r,a,i){var n=it(this._dragHandle,this,e,!1),o=it(this._dragHandle,this,e,!0),s=Kh(GB(e,a),uT(this._orient),n,o);s.position[0]=r[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new dt({draggable:!0,drift:n,onmousemove:function(c){oi(c.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=[i==="horizontal"?a/2:a*1.5,i==="horizontal"?e===0?-(a*1.5):a*1.5:e===0?-a/2:a/2],f=this._shapes;f.handleThumbs[e]=s,f.handleLabelPoints[e]=h,f.handleLabels[e]=u},_createIndicator:function(t,e,r,a){var i=Kh([[0,0]],"move");i.position[0]=e[0],i.attr({invisible:!0,silent:!0}),t.add(i);var n=this.visualMapModel.textStyleModel,o=new dt({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:n.getFont(),textFill:n.getTextColor()}});this.group.add(o);var s=[a==="horizontal"?r/2:sT+3,0],l=this._shapes;l.indicator=i,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(t,e,r,a){if(!!this._useHandle){if(this._dragging=!e,!e){var i=this._applyTransform([r,a],this._shapes.barGroup,!0);this._updateInterval(t,i[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():lT(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),r=t.getExtent(),a=[0,t.itemSize[1]];this._handleEnds=[ya(e[0],r,a,!0),ya(e[1],r,a,!0)]},_updateInterval:function(t,e){e=e||0;var r=this.visualMapModel,a=this._handleEnds,i=[0,r.itemSize[1]];zi(e,a,i,t,0);var n=r.getExtent();this._dataInterval=[ya(a[0],i,n,!0),ya(a[1],i,n,!0)]},_updateView:function(t){var e=this.visualMapModel,r=e.getExtent(),a=this._shapes,i=[0,e.itemSize[1]],n=t?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,r,n,"inRange"),s=this._createBarVisual(r,r,i,"outOfRange");a.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),a.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(n,o)},_createBarVisual:function(t,e,r,a){var i={forceState:a,convertOpacityToAlpha:!0},n=this._makeColorGradient(t,i),o=[this.getControllerVisual(t[0],"symbolSize",i),this.getControllerVisual(t[1],"symbolSize",i)],s=this._createBarPoints(r,o);return{barColor:new pi(0,0,0,1,n),barPoints:s,handlesColor:[n[0].color,n[n.length-1].color]}},_makeColorGradient:function(t,e){var r=100,a=[],i=(t[1]-t[0])/r;a.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var n=1;n<r;n++){var o=t[0]+i*n;if(o>t[1])break;a.push({color:this.getControllerVisual(o,"color",e),offset:n/r})}return a.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),a},_createBarPoints:function(t,e){var r=this.visualMapModel.itemSize;return[[r[0]-e[0],t[0]],[r[0],t[0]],[r[0],t[1]],[r[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,r=this.visualMapModel.get("inverse");return new q(e==="horizontal"&&!r?{scale:t==="bottom"?[1,1]:[-1,1],rotation:Math.PI/2}:e==="horizontal"&&r?{scale:t==="bottom"?[-1,1]:[1,1],rotation:-Math.PI/2}:e==="vertical"&&!r?{scale:t==="left"?[1,-1]:[-1,-1]}:{scale:t==="left"?[1,1]:[-1,1]})},_updateHandle:function(t,e){if(!!this._useHandle){var r=this._shapes,a=this.visualMapModel,i=r.handleThumbs,n=r.handleLabels;zB([0,1],function(o){var s=i[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=Hr(r.handleLabelPoints[o],yi(s,this.group));n[o].setStyle({x:l[0],y:l[1],text:a.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform(this._orient==="horizontal"?o===0?"bottom":"top":"left",r.barGroup)})},this)}},_showIndicator:function(t,e,r,a){var i=this.visualMapModel,n=i.getExtent(),o=i.itemSize,s=[0,o[1]],l=ya(t,n,s,!0),u=this._shapes,h=u.indicator;if(!!h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",HB(!!r,a,l,o[1]));var f={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",f);h.setStyle("fill",c);var v=Hr(u.indicatorLabelPoint,yi(h,this.group)),d=u.indicatorLabel;d.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),p=this._orient;d.setStyle({text:(r||"")+i.formatValueText(e),textVerticalAlign:p==="horizontal"?g:"middle",textAlign:p==="horizontal"?"center":g,x:v[0],y:v[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var r=t.visualMapModel.itemSize,a=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);a[1]=qh(js(0,a[1]),r[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=r[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var r=this.visualMapModel,a=r.itemSize;if(!!r.option.hoverLink){var i=[0,a[1]],n=r.getExtent();t=qh(js(i[0],t),i[1]);var o=FB(r,n,i),s=[t-o,t+o],l=ya(t,i,n,!0),u=[ya(s[0],i,n,!0),ya(s[1],i,n,!0)];s[0]<i[0]&&(u[0]=-1/0),s[1]>i[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"\u2248 ",o));var h=this._hoverLinkDataIndices,f=[];(e||lT(r))&&(f=this._hoverLinkDataIndices=r.findTargetDataIndices(u));var c=fD(h,f);this._dispatchHighDown("downplay",Xh(c[0],r)),this._dispatchHighDown("highlight",Xh(c[1],r))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,r=this.visualMapModel;if(!(!e||e.dataIndex==null)){var a=this.ecModel.getSeriesByIndex(e.seriesIndex);if(!!r.isTargetSeries(a)){var i=a.getData(e.dataType),n=i.get(r.getDataDimension(i),e.dataIndex,!0);isNaN(n)||this._showIndicator(n,n)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Xh(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,r,a){var i=yi(e,a?null:this.group);return sa[z(t)?"applyTransform":"transformDirection"](t,i,r)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function Kh(t,e,r,a){return new Ge({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(i){oi(i.event)},ondragend:a})}function GB(t,e){return t===0?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function HB(t,e,r,a){return t?[[0,-qh(e,js(r,0))],[sT,0],[0,qh(e,js(a-r,0))]]:[[0,0],[5,-5],[5,5]]}function FB(t,e,r){var a=BB/2,i=t.get("hoverLinkDataSize");return i&&(a=ya(i,e,r,!0)/2),a}function lT(t){var e=t.get("hoverLinkOnHandle");return!!(e??t.get("realtime"))}function uT(t){return t==="vertical"?"ns-resize":"ew-resize"}var WB={type:"selectDataRange",event:"dataRangeSelected",update:"update"};mt(WB,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(r){r.setSelected(t.selected)})}),we(JA);var UB=Yh.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){UB.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var r=this._mode=this._determineMode();$B[this._mode].call(this),this._resetSelected(t,e);var a=this.option.categories;this.resetVisual(function(i,n){r==="categories"?(i.mappingMethod="category",i.categories=rt(a)):(i.dataExtent=this.getExtent(),i.mappingMethod="piecewise",i.pieceList=V(this._pieceList,function(s){var s=rt(s);return n!=="inRange"&&(s.visual=null),s}))})},completeVisualOption:function(){var t=this.option,e={},r=Mt.listVisualTypes(),a=this.isCategory();M(t.pieces,function(n){M(r,function(o){n.hasOwnProperty(o)&&(e[o]=1)})}),M(e,function(n,o){var s=0;M(this.stateList,function(l){s|=i(t,l,o)||i(t.target,l,o)},this),!s&&M(this.stateList,function(l){(t[l]||(t[l]={}))[o]=Op.get(o,l==="inRange"?"active":"inactive",a)})},this);function i(n,o,s){return n&&n[o]&&(lt(n[o])?n[o].hasOwnProperty(s):n[o]===s)}Yh.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var r=this.option,a=this._pieceList,i=(e?r:t).selected||{};if(r.selected=i,M(a,function(o,s){var l=this.getSelectedMapKey(o);i.hasOwnProperty(l)||(i[l]=!0)},this),r.selectedMode==="single"){var n=!1;M(a,function(o,s){var l=this.getSelectedMapKey(o);i[l]&&(n?i[l]=!1:n=!0)},this)}},getSelectedMapKey:function(t){return this._mode==="categories"?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=rt(t)},getValueState:function(t){var e=Mt.findPieceIndex(t,this._pieceList);return e!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(r){var a=[],i=r.getData();i.each(this.getDataDimension(i),function(n,o){var s=Mt.findPieceIndex(n,this._pieceList);s===t&&a.push(o)},this),e.push({seriesId:r.id,dataIndex:a})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(t.value!=null)e=t.value;else{var r=t.interval||[];e=r[0]===-1/0&&r[1]===1/0?0:(r[0]+r[1])/2}return e},getVisualMeta:function(t){if(this.isCategory())return;var e=[],r=[],a=this;function i(l,u){var h=a.getRepresentValue({interval:l});u||(u=a.getValueState(h));var f=t(h,u);l[0]===-1/0?r[0]=f:l[1]===1/0?r[1]=f:e.push({value:l[0],color:f},{value:l[1],color:f})}var n=this._pieceList.slice();if(!n.length)n.push({interval:[-1/0,1/0]});else{var o=n[0].interval[0];o!==-1/0&&n.unshift({interval:[-1/0,o]}),o=n[n.length-1].interval[1],o!==1/0&&n.push({interval:[o,1/0]})}var s=-1/0;return M(n,function(l){var u=l.interval;u&&(u[0]>s&&i([s,u[0]],"outOfRange"),i(u.slice()),s=u[1])},this),{stops:e,outerColors:r}}}),$B={splitNumber:function(){var t=this.option,e=this._pieceList,r=Math.min(t.precision,20),a=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var n=(a[1]-a[0])/i;+n.toFixed(r)!==n&&r<5;)r++;t.precision=r,n=+n.toFixed(r),t.minOpen&&e.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<i;s+=n,o++){var l=o===i-1?a[1]:s+n;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[a[1],1/0],close:[0,0]}),av(e),M(e,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(){var t=this.option;M(t.categories,function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})},this),hT(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;M(t.pieces,function(r,a){lt(r)||(r={value:r});var i={text:"",index:a};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var n=i.value=r.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],h=[],f=0;f<2;f++){for(var c=[["gte","gt","min"],["lte","lt","max"]][f],v=0;v<3&&o[f]==null;v++)o[f]=r[c[v]],s[f]=l[v],h[f]=v===2;o[f]==null&&(o[f]=u[f])}h[0]&&o[1]===1/0&&(s[0]=0),h[1]&&o[0]===-1/0&&(s[1]=0),T&&o[0]>o[1]&&console.warn("Piece "+a+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Mt.retrieveVisuals(r),e.push(i)},this),hT(t,e),av(e),M(e,function(r){var a=r.close,i=[["<","\u2264"][a[1]],[">","\u2265"][a[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function hT(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var t3=nT.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,r=e.get("textGap"),a=e.textStyleModel,i=a.getFont(),n=a.getTextColor(),o=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=Ut(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,o),M(l.viewPieceList,f,this),u&&this._renderEndsText(t,u[1],s,h,o),bi(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t);function f(c){var v=c.piece,d=new q;d.onclick=it(this._onItemClick,this,v),this._enableHoverLink(d,c.indexInModelPieceList);var g=e.getRepresentValue(v);if(this._createItemSymbol(d,g,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(g);d.add(new dt({style:{x:o==="right"?-r:s[0]+r,y:s[1]/2,text:v.text,textVerticalAlign:"middle",textAlign:o,textFont:i,textFill:n,opacity:p==="outOfRange"?.5:1}}))}t.add(d)}},_enableHoverLink:function(t,e){t.on("mouseover",it(r,this,"highlight")).on("mouseout",it(r,this,"downplay"));function r(a){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:a,batch:Xh(i.findTargetDataIndices(e),i)})}},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if(e.orient==="vertical")return oT(t,this.api,t.itemSize);var r=e.align;return(!r||r==="auto")&&(r="left"),r},_renderEndsText:function(t,e,r,a,i){if(!!e){var n=new q,o=this.visualMapModel.textStyleModel;n.add(new dt({style:{x:a?i==="right"?r[0]:0:r[0]/2,y:r[1]/2,textVerticalAlign:"middle",textAlign:a?i:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}})),t.add(n)}},_getViewData:function(){var t=this.visualMapModel,e=V(t.getPieceList(),function(n,o){return{piece:n,indexInModelPieceList:o}}),r=t.get("text"),a=t.get("orient"),i=t.get("inverse");return(a==="horizontal"?i:!i)?e.reverse():r&&(r=r.slice().reverse()),{viewPieceList:e,endsText:r}},_createItemSymbol:function(t,e,r){t.add(Ye(this.getControllerVisual(e,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,r=e.option,a=rt(r.selected),i=e.getSelectedMapKey(t);r.selectedMode==="single"?(a[i]=!0,M(a,function(n,o){a[o]=o===i})):a[i]=!a[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}});we(JA);var fT="urn:schemas-microsoft-com:vml",cT=typeof window>"u"?null:window,vT=!1,Ke=cT&&cT.document;function zp(t){return Bp(t)}var Bp;if(Ke&&!G.canvasSupported)try{!Ke.namespaces.zrvml&&Ke.namespaces.add("zrvml",fT),Bp=function(t){return Ke.createElement("<zrvml:"+t+' class="zrvml">')}}catch{Bp=function(e){return Ke.createElement("<"+e+' xmlns="'+fT+'" class="zrvml">')}}function ZB(){if(!(vT||!Ke)){vT=!0;var t=Ke.styleSheets;t.length<31?Ke.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}var Ki=Oe.CMD,Tt=Math.round,Qs=Math.sqrt,YB=Math.abs,dT=Math.cos,gT=Math.sin,Vp=Math.max;if(!G.canvasSupported){var Jt=",",Gp="progid:DXImageTransform.Microsoft",Ft=21600,Be=Ft/2,XB=1e5,qB=1e3,Hp=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Ft+","+Ft,t.coordorigin="0,0"},KB=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")},pT=function(t,e,r){return"rgb("+[t,e,r].join(",")+")"},Kr=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Js=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},Fp=function(t,e,r){return(parseFloat(t)||0)*XB+(parseFloat(e)||0)*qB+r},mT=hc,yT=function(t,e,r){var a=Ve(e);r=+r,isNaN(r)&&(r=1),a&&(t.color=pT(a[0],a[1],a[2]),t.opacity=r*a[3])},jB=function(t){var e=Ve(t);return[pT(e[0],e[1],e[2]),e[3]]},QB=function(t,e,r){var a=e.fill;if(a!=null)if(a instanceof Vr){var i,n=0,o=[0,0],s=0,l=1,u=r.getBoundingRect(),h=u.width,f=u.height;if(a.type==="linear"){i="gradient";var c=r.transform,v=[a.x*h,a.y*f],d=[a.x2*h,a.y2*f];c&&(Pt(v,v,c),Pt(d,d,c));var g=d[0]-v[0],p=d[1]-v[1];n=Math.atan2(g,p)*180/Math.PI,n<0&&(n+=360),n<1e-6&&(n=0)}else{i="gradientradial";var v=[a.x*h,a.y*f],c=r.transform,m=r.scale,y=h,_=f;o=[(v[0]-u.x)/y,(v[1]-u.y)/_],c&&Pt(v,v,c),y/=m[0]*Ft,_/=m[1]*Ft;var w=Vp(y,_);s=2*0/w,l=2*a.r/w-s}var b=a.colorStops.slice();b.sort(function($,X){return $.offset-X.offset});for(var A=b.length,S=[],D=[],I=0;I<A;I++){var L=b[I],P=jB(L.color);D.push(L.offset*l+s+" "+P[0]),(I===0||I===A-1)&&S.push(P)}if(A>=2){var R=S[0][0],E=S[1][0],Z=S[0][1]*e.opacity,W=S[1][1]*e.opacity;t.type=i,t.method="none",t.focus="100%",t.angle=n,t.color=R,t.color2=E,t.colors=D.join(","),t.opacity=W,t.opacity2=Z}i==="radial"&&(t.focusposition=o.join(","))}else yT(t,a,e.opacity)},JB=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),e.stroke!=null&&!(e.stroke instanceof Vr)&&yT(t,e.stroke,e.opacity)},jh=function(t,e,r,a){var i=e==="fill",n=t.getElementsByTagName(e)[0];r[e]!=null&&r[e]!=="none"&&(i||!i&&r.lineWidth)?(t[i?"filled":"stroked"]="true",r[e]instanceof Vr&&Js(t,n),n||(n=zp(e)),i?QB(n,r,a):JB(n,r),Kr(t,n)):(t[i?"filled":"stroked"]="false",Js(t,n))},je=[[],[],[]],t5=function(t,e){var r=Ki.M,a=Ki.C,i=Ki.L,n=Ki.A,o=Ki.Q,s=[],l,u,h,f,c,v,d=t.data,g=t.len();for(f=0;f<g;){switch(h=d[f++],u="",l=0,h){case r:u=" m ",l=1,c=d[f++],v=d[f++],je[0][0]=c,je[0][1]=v;break;case i:u=" l ",l=1,c=d[f++],v=d[f++],je[0][0]=c,je[0][1]=v;break;case o:case a:u=" c ",l=3;var K=d[f++],Q=d[f++],p=d[f++],m=d[f++],y,_;h===o?(y=p,_=m,p=(p+2*K)/3,m=(m+2*Q)/3,K=(c+2*K)/3,Q=(v+2*Q)/3):(y=d[f++],_=d[f++]),je[0][0]=K,je[0][1]=Q,je[1][0]=p,je[1][1]=m,je[2][0]=y,je[2][1]=_,c=y,v=_;break;case n:var w=0,b=0,A=1,S=1,D=0;e&&(w=e[4],b=e[5],A=Qs(e[0]*e[0]+e[1]*e[1]),S=Qs(e[2]*e[2]+e[3]*e[3]),D=Math.atan2(-e[1]/S,e[0]/A));var I=d[f++],L=d[f++],P=d[f++],R=d[f++],E=d[f++]+D,Z=d[f++]+E+D;f++;var W=d[f++],$=I+dT(E)*P,X=L+gT(E)*R,K=I+dT(Z)*P,Q=L+gT(Z)*R,j=W?" wa ":" at ";Math.abs($-K)<1e-4&&(Math.abs(Z-E)>.01?W&&($+=270/Ft):Math.abs(X-L)<1e-4?W&&$<I||!W&&$>I?Q-=270/Ft:Q+=270/Ft:W&&X<L||!W&&X>L?K+=270/Ft:K-=270/Ft),s.push(j,Tt(((I-P)*A+w)*Ft-Be),Jt,Tt(((L-R)*S+b)*Ft-Be),Jt,Tt(((I+P)*A+w)*Ft-Be),Jt,Tt(((L+R)*S+b)*Ft-Be),Jt,Tt(($*A+w)*Ft-Be),Jt,Tt((X*S+b)*Ft-Be),Jt,Tt((K*A+w)*Ft-Be),Jt,Tt((Q*S+b)*Ft-Be)),c=K,v=Q;break;case Ki.R:var U=je[0],tt=je[1];U[0]=d[f++],U[1]=d[f++],tt[0]=U[0]+d[f++],tt[1]=U[1]+d[f++],e&&(Pt(U,U,e),Pt(tt,tt,e)),U[0]=Tt(U[0]*Ft-Be),tt[0]=Tt(tt[0]*Ft-Be),U[1]=Tt(U[1]*Ft-Be),tt[1]=Tt(tt[1]*Ft-Be),s.push(" m ",U[0],Jt,U[1]," l ",tt[0],Jt,U[1]," l ",tt[0],Jt,tt[1]," l ",U[0],Jt,tt[1]);break;case Ki.Z:s.push(" x ")}if(l>0){s.push(u);for(var ct=0;ct<l;ct++){var bt=je[ct];e&&Pt(bt,bt,e),s.push(Tt(bt[0]*Ft-Be),Jt,Tt(bt[1]*Ft-Be),ct<l-1?Jt:"")}}}return s.join("")};pt.prototype.brushVML=function(t){var e=this.style,r=this._vmlEl;r||(r=zp("shape"),Hp(r),this._vmlEl=r),jh(r,"fill",e,this),jh(r,"stroke",e,this);var a=this.transform,i=a!=null,n=r.getElementsByTagName("stroke")[0];if(n){var o=e.lineWidth;if(i&&!e.strokeNoScale){var s=a[0]*a[3]-a[1]*a[2];o*=Qs(YB(s))}n.weight=o+"px"}var l=this.path||(this.path=new Oe);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),r.path=t5(l,this.transform),r.style.zIndex=Fp(this.zlevel,this.z,this.z2),Kr(t,r),e.text!=null?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},pt.prototype.onRemove=function(t){Js(t,this._vmlEl),this.removeRectText(t)},pt.prototype.onAdd=function(t){Kr(t,this._vmlEl),this.appendRectText(t)};var e5=function(t){return typeof t=="object"&&t.tagName&&t.tagName.toUpperCase()==="IMG"};ve.prototype.brushVML=function(t){var e=this.style,r=e.image,a,i;if(e5(r)){var n=r.src;if(n===this._imageSrc)a=this._imageWidth,i=this._imageHeight;else{var o=r.runtimeStyle,s=o.width,l=o.height;o.width="auto",o.height="auto",a=r.width,i=r.height,o.width=s,o.height=l,this._imageSrc=n,this._imageWidth=a,this._imageHeight=i}r=n}else r===this._imageSrc&&(a=this._imageWidth,i=this._imageHeight);if(!!r){var u=e.x||0,h=e.y||0,f=e.width,c=e.height,v=e.sWidth,d=e.sHeight,g=e.sx||0,p=e.sy||0,m=v&&d,y=this._vmlEl;y||(y=Ke.createElement("div"),Hp(y),this._vmlEl=y);var _=y.style,w=!1,b,A=1,S=1;if(this.transform&&(b=this.transform,A=Qs(b[0]*b[0]+b[1]*b[1]),S=Qs(b[2]*b[2]+b[3]*b[3]),w=b[1]||b[2]),w){var D=[u,h],I=[u+f,h],L=[u,h+c],P=[u+f,h+c];Pt(D,D,b),Pt(I,I,b),Pt(L,L,b),Pt(P,P,b);var R=Vp(D[0],I[0],L[0],P[0]),E=Vp(D[1],I[1],L[1],P[1]),Z=[];Z.push("M11=",b[0]/A,Jt,"M12=",b[2]/S,Jt,"M21=",b[1]/A,Jt,"M22=",b[3]/S,Jt,"Dx=",Tt(u*A+b[4]),Jt,"Dy=",Tt(h*S+b[5])),_.padding="0 "+Tt(R)+"px "+Tt(E)+"px 0",_.filter=Gp+".Matrix("+Z.join("")+", SizingMethod=clip)"}else b&&(u=u*A+b[4],h=h*S+b[5]),_.filter="",_.left=Tt(u)+"px",_.top=Tt(h)+"px";var W=this._imageEl,$=this._cropEl;W||(W=Ke.createElement("div"),this._imageEl=W);var X=W.style;if(m){if(a&&i)X.width=Tt(A*a*f/v)+"px",X.height=Tt(S*i*c/d)+"px";else{var K=new Image,Q=this;K.onload=function(){K.onload=null,a=K.width,i=K.height,X.width=Tt(A*a*f/v)+"px",X.height=Tt(S*i*c/d)+"px",Q._imageWidth=a,Q._imageHeight=i,Q._imageSrc=r},K.src=r}$||($=Ke.createElement("div"),$.style.overflow="hidden",this._cropEl=$);var j=$.style;j.width=Tt((f+g*f/v)*A),j.height=Tt((c+p*c/d)*S),j.filter=Gp+".Matrix(Dx="+-g*f/v*A+",Dy="+-p*c/d*S+")",$.parentNode||y.appendChild($),W.parentNode!==$&&$.appendChild(W)}else X.width=Tt(A*f)+"px",X.height=Tt(S*c)+"px",y.appendChild(W),$&&$.parentNode&&(y.removeChild($),this._cropEl=null);var U="",tt=e.opacity;tt<1&&(U+=".Alpha(opacity="+Tt(tt*100)+") "),U+=Gp+".AlphaImageLoader(src="+r+", SizingMethod=scale)",X.filter=U,y.style.zIndex=Fp(this.zlevel,this.z,this.z2),Kr(t,y),e.text!=null&&this.drawRectText(t,this.getBoundingRect())}},ve.prototype.onRemove=function(t){Js(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},ve.prototype.onAdd=function(t){Kr(t,this._vmlEl),this.appendRectText(t)};var Wp="normal",Up={},$p=0,r5=100,a5=document.createElement("div"),i5=function(t){var e=Up[t];if(!e){$p>r5&&($p=0,Up={});var r=a5.style,a;try{r.font=t,a=r.fontFamily.split(",")[0]}catch{}e={style:r.fontStyle||Wp,variant:r.fontVariant||Wp,weight:r.fontWeight||Wp,size:parseFloat(r.fontSize||12)|0,family:a||"Microsoft YaHei"},Up[t]=e,$p++}return e},ri;kC("measureText",function(t,e){var r=Ke;ri||(ri=r.createElement("div"),ri.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",Ke.body.appendChild(ri));try{ri.style.font=e}catch{}return ri.innerHTML="",ri.appendChild(r.createTextNode(t)),{width:ri.offsetWidth}});for(var Zp=new vt,n5=function(t,e,r,a){var i=this.style;this.__dirty&&Mo(i,!0);var n=i.text;if(n!=null&&(n+=""),!!n){if(i.rich){var o=rc(n,i);n=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);n.push(u.join(""))}n=n.join(`
`)}var f,c,v=i.textAlign,d=i.textVerticalAlign,g=i5(i.font),p=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';r=r||Rr(n,p,v,d,i.textPadding,i.textLineHeight);var m=this.transform;if(m&&!a&&(Zp.copy(e),Zp.applyTransform(m),e=Zp),a)f=e.x,c=e.y;else{var y=i.textPosition;if(y instanceof Array)f=e.x+mT(y[0],e.width),c=e.y+mT(y[1],e.height),v=v||"left";else{var _=this.calculateTextPosition?this.calculateTextPosition({},i,e):Jf({},i,e);f=_.x,c=_.y,v=v||_.textAlign,d=d||_.textVerticalAlign}}f=Do(f,r.width,v),c=pn(c,r.height,d),c+=r.height/2;var w=zp,b=this._textVmlEl,A,S,D;b?(D=b.firstChild,A=D.nextSibling,S=A.nextSibling):(b=w("line"),A=w("path"),S=w("textpath"),D=w("skew"),S.style["v-text-align"]="left",Hp(b),A.textpathok=!0,S.on=!0,b.from="0 0",b.to="1000 0.05",Kr(b,D),Kr(b,A),Kr(b,S),this._textVmlEl=b);var I=[f,c],L=b.style;m&&a?(Pt(I,I,m),D.on=!0,D.matrix=m[0].toFixed(3)+Jt+m[2].toFixed(3)+Jt+m[1].toFixed(3)+Jt+m[3].toFixed(3)+",0,0",D.offset=(Tt(I[0])||0)+","+(Tt(I[1])||0),D.origin="0 0",L.left="0px",L.top="0px"):(D.on=!1,L.left=Tt(f)+"px",L.top=Tt(c)+"px"),S.string=KB(n);try{S.style.font=p}catch{}jh(b,"fill",{fill:i.textFill,opacity:i.opacity},this),jh(b,"stroke",{stroke:i.textStroke,opacity:i.opacity,lineDash:i.lineDash||null},this),b.style.zIndex=Fp(this.zlevel,this.z,this.z2),Kr(t,b)}},o5=function(t){Js(t,this._textVmlEl),this._textVmlEl=null},s5=function(t){Kr(t,this._textVmlEl)},_T=[Cl,Le,ve,pt,dt],Yp=0;Yp<_T.length;Yp++){var Xp=_T[Yp].prototype;Xp.drawRectText=n5,Xp.removeRectText=o5,Xp.appendRectText=s5}dt.prototype.brushVML=function(t){var e=this.style;e.text!=null?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},dt.prototype.onRemove=function(t){this.removeRectText(t)},dt.prototype.onAdd=function(t){this.appendRectText(t)}}function ho(t){return parseInt(t,10)}function Qh(t,e){ZB(),this.root=t,this.storage=e;var r=document.createElement("div"),a=document.createElement("div");r.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",a.style.cssText="position:absolute;left:0;top:0;",t.appendChild(r),this._vmlRoot=a,this._vmlViewport=r,this.resize();var i=e.delFromStorage,n=e.addToStorage;e.delFromStorage=function(o){i.call(e,o),o&&o.onRemove&&o.onRemove(a)},e.addToStorage=function(o){o.onAdd&&o.onAdd(a),n.call(e,o)},this._firstPaint=!0}Qh.prototype={constructor:Qh,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,r=0;r<t.length;r++){var a=t[r];a.invisible||a.ignore?(a.__alreadyNotVisible||a.onRemove(e),a.__alreadyNotVisible=!0):(a.__alreadyNotVisible&&a.onAdd(e),a.__alreadyNotVisible=!1,a.__dirty&&(a.beforeBrush&&a.beforeBrush(),(a.brushVML||a.brush).call(a,e),a.afterBrush&&a.afterBrush())),a.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(r,a){var r=r??this._getWidth(),a=a??this._getHeight();if(this._width!==r||this._height!==a){this._width=r,this._height=a;var i=this._vmlViewport.style;i.width=r+"px",i.height=a+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||ho(e.width))-ho(e.paddingLeft)-ho(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||ho(e.height))-ho(e.paddingTop)-ho(e.paddingBottom)|0}};function l5(t){return function(){Ta('In IE8.0 VML mode painter not support method "'+t+'"')}}M(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Qh.prototype[t]=l5(t)}),Dc("vml",Qh);var u5="http://www.w3.org/2000/svg";function jr(t){return document.createElementNS(u5,t)}var ji=Oe.CMD,h5=Array.prototype.join,fo="none",qp=Math.round,xT=Math.sin,wT=Math.cos,bT=Math.PI,ai=Math.PI*2,f5=180/bT,ST=1e-4;function Lr(t){return qp(t*1e4)/1e4}function AT(t){return t<ST&&t>-ST}function c5(t,e){var r=e?t.textFill:t.fill;return r!=null&&r!==fo}function v5(t,e){var r=e?t.textStroke:t.stroke;return r!=null&&r!==fo}function Kp(t,e){e&&Wt(t,"transform","matrix("+h5.call(e,",")+")")}function Wt(t,e,r){(!r||r.type!=="linear"&&r.type!=="radial")&&t.setAttribute(e,r)}function d5(t,e,r){t.setAttributeNS("http://www.w3.org/1999/xlink",e,r)}function TT(t,e,r,a){if(c5(e,r)){var i=r?e.textFill:e.fill;i=i==="transparent"?fo:i,Wt(t,"fill",i),Wt(t,"fill-opacity",e.fillOpacity!=null?e.fillOpacity*e.opacity:e.opacity)}else Wt(t,"fill",fo);if(v5(e,r)){var n=r?e.textStroke:e.stroke;n=n==="transparent"?fo:n,Wt(t,"stroke",n);var o=r?e.textStrokeWidth:e.lineWidth,s=!r&&e.strokeNoScale?a.getLineScale():1;Wt(t,"stroke-width",o/s),Wt(t,"paint-order",r?"stroke":"fill"),Wt(t,"stroke-opacity",e.strokeOpacity!=null?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(Wt(t,"stroke-dasharray",e.lineDash.join(",")),Wt(t,"stroke-dashoffset",qp(e.lineDashOffset||0))):Wt(t,"stroke-dasharray",""),e.lineCap&&Wt(t,"stroke-linecap",e.lineCap),e.lineJoin&&Wt(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Wt(t,"stroke-miterlimit",e.miterLimit)}else Wt(t,"stroke",fo)}function g5(t){for(var e=[],r=t.data,a=t.len(),i=0;i<a;){var n=r[i++],o="",s=0;switch(n){case ji.M:o="M",s=2;break;case ji.L:o="L",s=2;break;case ji.Q:o="Q",s=4;break;case ji.C:o="C",s=6;break;case ji.A:var l=r[i++],u=r[i++],h=r[i++],f=r[i++],c=r[i++],v=r[i++],d=r[i++],g=r[i++],p=Math.abs(v),m=AT(p-ai)||(g?v>=ai:-v>=ai),y=v>0?v%ai:v%ai+ai,_=!1;m?_=!0:AT(p)?_=!1:_=y>=bT==!!g;var w=Lr(l+h*wT(c)),b=Lr(u+f*xT(c));m&&(g?v=ai-1e-4:v=-ai+1e-4,_=!0,i===9&&e.push("M",w,b));var A=Lr(l+h*wT(c+v)),S=Lr(u+f*xT(c+v));e.push("A",Lr(h),Lr(f),qp(d*f5),+_,+g,A,S);break;case ji.Z:o="Z";break;case ji.R:var A=Lr(r[i++]),S=Lr(r[i++]),D=Lr(r[i++]),I=Lr(r[i++]);e.push("M",A,S,"L",A+D,S,"L",A+D,S+I,"L",A,S+I,"L",A,S);break}o&&e.push(o);for(var L=0;L<s;L++)e.push(Lr(r[i++]))}return e.join(" ")}var tl={};tl.brush=function(t){var e=t.style,r=t.__svgEl;r||(r=jr("path"),t.__svgEl=r),t.path||t.createPathProxy();var a=t.path;if(t.__dirtyPath){a.beginPath(),a.subPixelOptimize=!1,t.buildPath(a,t.shape),t.__dirtyPath=!1;var i=g5(a);i.indexOf("NaN")<0&&Wt(r,"d",i)}TT(r,e,!1,t),Kp(r,t.transform),e.text!=null?tf(t,t.getBoundingRect()):Jp(t)};var jp={};jp.brush=function(t){var e=t.style,r=e.image;if(r instanceof HTMLImageElement){var a=r.src;r=a}if(!!r){var i=e.x||0,n=e.y||0,o=e.width,s=e.height,l=t.__svgEl;l||(l=jr("image"),t.__svgEl=l),r!==t.__imageSrc&&(d5(l,"href",r),t.__imageSrc=r),Wt(l,"width",o),Wt(l,"height",s),Wt(l,"x",i),Wt(l,"y",n),Kp(l,t.transform),e.text!=null?tf(t,t.getBoundingRect()):Jp(t)}};var Jh={},Qp=new vt,el={},_a=[],p5={left:"start",right:"end",center:"middle",middle:"middle"},tf=function(t,e){var r=t.style,a=t.transform,i=t instanceof dt||r.transformText;t.__dirty&&Mo(r,!0);var n=r.text;if(n!=null&&(n+=""),!!fc(n,r)){n==null&&(n=""),!i&&a&&(Qp.copy(e),Qp.applyTransform(a),e=Qp);var o=t.__textSvgEl;o||(o=jr("text"),t.__textSvgEl=o);var s=o.style,l=r.font||Tl,u=o.__computedFont;l!==o.__styleFont&&(s.font=o.__styleFont=l,u=o.__computedFont=s.font);var h=r.textPadding,f=r.textLineHeight,c=t.__textCotentBlock;(!c||t.__dirtyText)&&(c=t.__textCotentBlock=ec(n,u,h,f,r.truncate));var v=c.outerHeight,d=c.lineHeight;lc(el,t,r,e);var g=el.baseX,p=el.baseY,m=el.textAlign||"left",y=el.textVerticalAlign;m5(o,i,a,r,e,g,p);var _=pn(p,v,y),w=g,b=_;h&&(w=y5(g,m,h),b+=h[0]),b+=d/2,TT(o,r,!0,t);var A=c.canCacheByTextString,S=t.__tspanList||(t.__tspanList=[]),D=S.length;if(A&&t.__canCacheByTextString&&t.__text===n){if(t.__dirtyText&&D)for(var I=0;I<D;++I)CT(S[I],m,w,b+I*d)}else{t.__text=n,t.__canCacheByTextString=A;for(var L=c.lines,P=L.length,I=0;I<P;I++){var R=S[I],E=L[I];R?R.__zrText!==E&&(R.innerHTML="",R.appendChild(document.createTextNode(E))):(R=S[I]=jr("tspan"),o.appendChild(R),R.appendChild(document.createTextNode(E))),CT(R,m,w,b+I*d)}if(D>P){for(;I<D;I++)o.removeChild(S[I]);S.length=P}}}};function m5(t,e,r,a,i,n,o){fn(_a),e&&r&&xo(_a,r);var s=a.textRotation;if(i&&s){var l=a.textOrigin;l==="center"?(n=i.width/2+i.x,o=i.height/2+i.y):l&&(n=l[0]+i.x,o=l[1]+i.y),_a[4]-=n,_a[5]-=o,aa(_a,_a,s),_a[4]+=n,_a[5]+=o}Kp(t,_a)}function y5(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function CT(t,e,r,a){Wt(t,"dominant-baseline","middle"),Wt(t,"text-anchor",p5[e]),Wt(t,"x",r),Wt(t,"y",a)}function Jp(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}Jh.drawRectText=tf,Jh.brush=function(t){var e=t.style;e.text!=null?tf(t,!1):Jp(t)};function DT(){}DT.prototype={diff:function(t,e,r){r||(r=function(d,g){return d===g}),this.equals=r;var a=this;t=t.slice(),e=e.slice();var i=e.length,n=t.length,o=1,s=i+n,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=i&&u+1>=n){for(var h=[],f=0;f<e.length;f++)h.push(f);return[{indices:h,count:e.length}]}function c(){for(var d=-1*o;d<=o;d+=2){var g,p=l[d-1],m=l[d+1],y=(m?m.newPos:0)-d;p&&(l[d-1]=void 0);var _=p&&p.newPos+1<i,w=m&&0<=y&&y<n;if(!_&&!w){l[d]=void 0;continue}if(!_||w&&p.newPos<m.newPos?(g=x5(m),a.pushComponent(g.components,void 0,!0)):(g=p,g.newPos++,a.pushComponent(g.components,!0,void 0)),y=a.extractCommon(g,e,t,d),g.newPos+1>=i&&y+1>=n)return _5(a,g.components,e,t);l[d]=g}o++}for(;o<=s;){var v=c();if(v)return v}},pushComponent:function(t,e,r){var a=t[t.length-1];a&&a.added===e&&a.removed===r?t[t.length-1]={count:a.count+1,added:e,removed:r}:t.push({count:1,added:e,removed:r})},extractCommon:function(t,e,r,a){for(var i=e.length,n=r.length,o=t.newPos,s=o-a,l=0;o+1<i&&s+1<n&&this.equals(e[o+1],r[s+1]);)o++,s++,l++;return l&&t.components.push({count:l}),t.newPos=o,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};function _5(t,e,r,a){for(var i=0,n=e.length,o=0,s=0;i<n;i++){var l=e[i];if(l.removed){for(var u=[],h=s;h<s+l.count;h++)u.push(h);l.indices=u,s+=l.count}else{for(var u=[],h=o;h<o+l.count;h++)u.push(h);l.indices=u,o+=l.count,l.added||(s+=l.count)}}return e}function x5(t){return{newPos:t.newPos,components:t.components.slice(0)}}var w5=new DT,b5=function(t,e,r){return w5.diff(t,e,r)},S5="0",MT="1";function zt(t,e,r,a,i){this._zrId=t,this._svgRoot=e,this._tagNames=typeof r=="string"?[r]:r,this._markLabel=a,this._domName=i||"_dom",this.nextId=0}zt.prototype.createElement=jr,zt.prototype.getDefs=function(t){var e=this._svgRoot,r=this._svgRoot.getElementsByTagName("defs");return r.length===0?t?(r=e.insertBefore(this.createElement("defs"),e.firstChild),r.contains||(r.contains=function(a){var i=r.children;if(!i)return!1;for(var n=i.length-1;n>=0;--n)if(i[n]===a)return!0;return!1}),r):null:r[0]},zt.prototype.update=function(t,e){if(!!t){var r=this.getDefs(!1);if(t[this._domName]&&r.contains(t[this._domName]))typeof e=="function"&&e(t);else{var a=this.add(t);a&&(t[this._domName]=a)}}},zt.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},zt.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},zt.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return M(this._tagNames,function(r){var a=t.getElementsByTagName(r);e=e.concat([].slice.call(a))}),e},zt.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;M(t,function(r){r[e._markLabel]=S5})},zt.prototype.markUsed=function(t){t&&(t[this._markLabel]=MT)},zt.prototype.removeUnused=function(){var t=this.getDefs(!1);if(!!t){var e=this.getDoms(),r=this;M(e,function(a){a[r._markLabel]!==MT&&t.removeChild(a)})}},zt.prototype.getSvgProxy=function(t){return t instanceof pt?tl:t instanceof ve?jp:t instanceof dt?Jh:tl},zt.prototype.getTextSvgElement=function(t){return t.__textSvgEl},zt.prototype.getSvgElement=function(t){return t.__svgEl};function Qi(t,e){zt.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}It(Qi,zt),Qi.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var r=this;M(["fill","stroke"],function(a){if(e.style[a]&&(e.style[a].type==="linear"||e.style[a].type==="radial")){var i=e.style[a],n=r.getDefs(!0),o;i._dom?(o=i._dom,n.contains(i._dom)||r.addDom(o)):o=r.add(i),r.markUsed(e);var s=o.getAttribute("id");t.setAttribute(a,"url(#"+s+")")}})}},Qi.prototype.add=function(t){var e;if(t.type==="linear")e=this.createElement("linearGradient");else if(t.type==="radial")e=this.createElement("radialGradient");else return Ta("Illegal gradient type."),null;return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},Qi.prototype.update=function(t){var e=this;zt.prototype.update.call(this,t,function(){var r=t.type,a=t._dom.tagName;r==="linear"&&a==="linearGradient"||r==="radial"&&a==="radialGradient"?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},Qi.prototype.updateDom=function(t,e){if(t.type==="linear")e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else if(t.type==="radial")e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r);else{Ta("Illegal gradient type.");return}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var r=t.colorStops,a=0,i=r.length;a<i;++a){var n=this.createElement("stop");n.setAttribute("offset",r[a].offset*100+"%");var o=r[a].color;if(o.indexOf("rgba">-1)){var s=Ve(o)[3],l=Of(o);n.setAttribute("stop-color","#"+l),n.setAttribute("stop-opacity",s)}else n.setAttribute("stop-color",r[a].color);e.appendChild(n)}t._dom=e},Qi.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&zt.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&zt.prototype.markUsed.call(this,e._dom)}};function rl(t,e){zt.call(this,t,e,"clipPath","__clippath_in_use__")}It(rl,zt),rl.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var r=this.getTextSvgElement(t);r&&this.updateDom(r,t.__clipPaths,!0),this.markUsed(t)},rl.prototype.updateDom=function(t,e,r){if(e&&e.length>0){var a=this.getDefs(!0),i=e[0],n,o,s=r?"_textDom":"_dom";i[s]?(o=i[s].getAttribute("id"),n=i[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,n=this.createElement("clipPath"),n.setAttribute("id",o),a.appendChild(n),i[s]=n);var l=this.getSvgProxy(i);if(i.transform&&i.parent.invTransform&&!r){var u=Array.prototype.slice.call(i.transform);Sa(i.transform,i.parent.invTransform,i.transform),l.brush(i),i.transform=u}else l.brush(i);var h=this.getSvgElement(i);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),r)}else t&&t.setAttribute("clip-path","none")},rl.prototype.markUsed=function(t){var e=this;t.__clipPaths&&M(t.__clipPaths,function(r){r._dom&&zt.prototype.markUsed.call(e,r._dom),r._textDom&&zt.prototype.markUsed.call(e,r._textDom)})};function ii(t,e){zt.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}It(ii,zt),ii.prototype.addWithoutUpdate=function(t,e){if(e&&IT(e.style)){var r;if(e._shadowDom){r=e._shadowDom;var a=this.getDefs(!0);a.contains(e._shadowDom)||this.addDom(r)}else r=this.add(e);this.markUsed(e);var i=r.getAttribute("id");t.style.filter="url(#"+i+")"}},ii.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},ii.prototype.update=function(t,e){var r=e.style;if(IT(r)){var a=this;zt.prototype.update.call(this,e,function(){a.updateDom(e,e._shadowDom)})}else this.remove(t,e)},ii.prototype.remove=function(t,e){e._shadowDomId!=null&&(this.removeDom(t),t.style.filter="")},ii.prototype.updateDom=function(t,e){var r=e.getElementsByTagName("feDropShadow");r.length===0?r=this.createElement("feDropShadow"):r=r[0];var a=t.style,i=t.scale&&t.scale[0]||1,n=t.scale&&t.scale[1]||1,o,s,l,u;if(a.shadowBlur||a.shadowOffsetX||a.shadowOffsetY)o=a.shadowOffsetX||0,s=a.shadowOffsetY||0,l=a.shadowBlur,u=a.shadowColor;else if(a.textShadowBlur)o=a.textShadowOffsetX||0,s=a.textShadowOffsetY||0,l=a.textShadowBlur,u=a.textShadowColor;else{this.removeDom(e,a);return}r.setAttribute("dx",o/i),r.setAttribute("dy",s/n),r.setAttribute("flood-color",u);var h=l/2/i,f=l/2/n,c=h+" "+f;r.setAttribute("stdDeviation",c),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(l/2*200)+"%"),e.setAttribute("height",Math.ceil(l/2*200)+"%"),e.appendChild(r),t._shadowDom=e},ii.prototype.markUsed=function(t){t._shadowDom&&zt.prototype.markUsed.call(this,t._shadowDom)};function IT(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function ef(t){return parseInt(t,10)}function A5(t){return t instanceof pt?tl:t instanceof ve?jp:t instanceof dt?Jh:tl}function LT(t,e){return e&&t&&e.parentNode!==t}function al(t,e,r){if(LT(t,e)&&r){var a=r.nextSibling;a?t.insertBefore(e,a):t.appendChild(e)}}function PT(t,e){if(LT(t,e)){var r=t.firstChild;r?t.insertBefore(e,r):t.appendChild(e)}}function ET(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function il(t){return t.__textSvgEl}function nl(t){return t.__svgEl}var rf=function(t,e,r,a){this.root=t,this.storage=e,this._opts=r=et({},r||{});var i=jr("svg");i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("version","1.1"),i.setAttribute("baseProfile","full"),i.style.cssText="user-select:none;position:absolute;left:0;top:0;";var n=jr("g");i.appendChild(n);var o=jr("g");i.appendChild(o),this.gradientManager=new Qi(a,o),this.clipPathManager=new rl(a,o),this.shadowManager=new ii(a,o);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=i,this._svgRoot=o,this._backgroundRoot=n,this._viewport=s,t.appendChild(s),s.appendChild(i),this.resize(r.width,r.height),this._visibleList=[]};rf.prototype={constructor:rf,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=jr("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e=this._svgRoot,r=this._visibleList,a=t.length,i=[],n;for(n=0;n<a;n++){var o=t[n],s=A5(o),l=nl(o)||il(o);o.invisible||(o.__dirty&&(s&&s.brush(o),this.clipPathManager.update(o),o.style&&(this.gradientManager.update(o.style.fill),this.gradientManager.update(o.style.stroke),this.shadowManager.update(l,o)),o.__dirty=!1),i.push(o))}var u=b5(r,i),h;for(n=0;n<u.length;n++){var f=u[n];if(f.removed)for(var c=0;c<f.count;c++){var o=r[f.indices[c]],l=nl(o),v=il(o);ET(e,l),ET(e,v)}}for(n=0;n<u.length;n++){var f=u[n];if(f.added)for(var c=0;c<f.count;c++){var o=i[f.indices[c]],l=nl(o),v=il(o);h?al(e,l,h):PT(e,l),l?al(e,v,l):h?al(e,v,h):PT(e,v),al(e,v,l),h=v||l||h,this.gradientManager.addWithoutUpdate(l||v,o),this.shadowManager.addWithoutUpdate(l||v,o),this.clipPathManager.markUsed(o)}else if(!f.removed)for(var c=0;c<f.count;c++){var o=i[f.indices[c]],l=nl(o),v=il(o),l=nl(o),v=il(o);this.gradientManager.markUsed(o),this.gradientManager.addWithoutUpdate(l||v,o),this.shadowManager.markUsed(o),this.shadowManager.addWithoutUpdate(l||v,o),this.clipPathManager.markUsed(o),v&&al(e,v,l),h=l||v||h}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=i},_getDefs:function(t){var e=this._svgDom,r=e.getElementsByTagName("defs");if(r.length===0)if(t){var r=e.insertBefore(jr("defs"),e.firstChild);return r.contains||(r.contains=function(i){var n=r.children;if(!n)return!1;for(var o=n.length-1;o>=0;--o)if(n[o]===i)return!0;return!1}),r}else return null;else return r[0]},resize:function(t,e){var r=this._viewport;r.style.display="none";var a=this._opts;if(t!=null&&(a.width=t),e!=null&&(a.height=e),t=this._getSize(0),e=this._getSize(1),r.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var i=r.style;i.width=t+"px",i.height=e+"px";var n=this._svgDom;n.setAttribute("width",t),n.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,r=["width","height"][t],a=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],n=["paddingRight","paddingBottom"][t];if(e[r]!=null&&e[r]!=="auto")return parseFloat(e[r]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[a]||ef(s[r])||ef(o.style[r]))-(ef(s[i])||0)-(ef(s[n])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var t=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
\r<`));return"data:image/svg+xml;charset=UTF-8,"+t}};function T5(t){return function(){Ta('In SVG mode painter not support method "'+t+'"')}}M(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){rf.prototype[t]=T5(t)}),Dc("svg",rf),x.version=d_,x.dependencies=Lv,x.PRIORITY=Wr,x.init=l2,x.connect=u2,x.disConnect=L_,x.disconnect=h2,x.dispose=f2,x.getInstanceByDom=Bv,x.getInstanceById=c2,x.registerTheme=Vv,x.registerPreprocessor=we,x.registerProcessor=$e,x.registerPostUpdate=v2,x.registerAction=mt,x.registerCoordinateSystem=Gv,x.getCoordinateSystemDimensions=d2,x.registerLayout=Gt,x.registerVisual=Rt,x.registerLoading=P_,x.extendComponentModel=Ze,x.extendComponentView=he,x.extendSeriesModel=Mu,x.extendChartView=ke,x.setCanvasCreator=g2,x.registerMap=p2,x.getMap=m2,x.dataTool=y2,x.zrender=lD,x.number=wM,x.format=CM,x.throttle=du,x.helper=hL,x.matrix=vC,x.vector=JT,x.color=yC,x.parseGeoJSON=id,x.parseGeoJson=bL,x.util=m1,x.graphic=y1,x.List=fe,x.Model=_t,x.Axis=Qt,x.env=G});var co=NT.echarts;var em=R5(zT(),1);function O5(x){return x!=null}var st=O5;function tn(x){this.name="DeveloperError",this.message=x;let C;try{throw new Error}catch(T){C=T.stack}this.stack=C}st(Object.create)&&(tn.prototype=Object.create(Error.prototype),tn.prototype.constructor=tn);tn.prototype.toString=function(){let x=`${this.name}: ${this.message}`;return st(this.stack)&&(x+=`
${this.stack.toString()}`),x};tn.throwInstantiationError=function(){throw new tn("This function defines an interface and should not be called directly.")};var at=tn;var ne={};ne.typeOf={};function N5(x){return`${x} is required, actual value was undefined`}function vo(x,C,T){return`Expected ${T} to be typeof ${C}, actual typeof was ${x}`}ne.defined=function(x,C){if(!st(C))throw new at(N5(x))};ne.typeOf.func=function(x,C){if(typeof C!="function")throw new at(vo(typeof C,"function",x))};ne.typeOf.string=function(x,C){if(typeof C!="string")throw new at(vo(typeof C,"string",x))};ne.typeOf.number=function(x,C){if(typeof C!="number")throw new at(vo(typeof C,"number",x))};ne.typeOf.number.lessThan=function(x,C,T){if(ne.typeOf.number(x,C),C>=T)throw new at(`Expected ${x} to be less than ${T}, actual value was ${C}`)};ne.typeOf.number.lessThanOrEquals=function(x,C,T){if(ne.typeOf.number(x,C),C>T)throw new at(`Expected ${x} to be less than or equal to ${T}, actual value was ${C}`)};ne.typeOf.number.greaterThan=function(x,C,T){if(ne.typeOf.number(x,C),C<=T)throw new at(`Expected ${x} to be greater than ${T}, actual value was ${C}`)};ne.typeOf.number.greaterThanOrEquals=function(x,C,T){if(ne.typeOf.number(x,C),C<T)throw new at(`Expected ${x} to be greater than or equal to ${T}, actual value was ${C}`)};ne.typeOf.object=function(x,C){if(typeof C!="object")throw new at(vo(typeof C,"object",x))};ne.typeOf.bool=function(x,C){if(typeof C!="boolean")throw new at(vo(typeof C,"boolean",x))};ne.typeOf.bigint=function(x,C){if(typeof C!="bigint")throw new at(vo(typeof C,"bigint",x))};ne.typeOf.number.equals=function(x,C,T,N){if(ne.typeOf.number(x,T),ne.typeOf.number(C,N),T!==N)throw new at(`${x} must be equal to ${C}, the actual values are ${T} and ${N}`)};var Y=ne;function BT(x,C){return x??C}BT.EMPTY_OBJECT=Object.freeze({});var oe=BT;var B={};B.EPSILON1=.1;B.EPSILON2=.01;B.EPSILON3=.001;B.EPSILON4=1e-4;B.EPSILON5=1e-5;B.EPSILON6=1e-6;B.EPSILON7=1e-7;B.EPSILON8=1e-8;B.EPSILON9=1e-9;B.EPSILON10=1e-10;B.EPSILON11=1e-11;B.EPSILON12=1e-12;B.EPSILON13=1e-13;B.EPSILON14=1e-14;B.EPSILON15=1e-15;B.EPSILON16=1e-16;B.EPSILON17=1e-17;B.EPSILON18=1e-18;B.EPSILON19=1e-19;B.EPSILON20=1e-20;B.EPSILON21=1e-21;B.GRAVITATIONALPARAMETER=3986004418e5;B.SOLAR_RADIUS=6955e5;B.LUNAR_RADIUS=1737400;B.SIXTY_FOUR_KILOBYTES=64*1024;B.FOUR_GIGABYTES=4*1024*1024*1024;B.sign=oe(Math.sign,function(C){return C=+C,C===0||C!==C?C:C>0?1:-1});B.signNotZero=function(x){return x<0?-1:1};B.toSNorm=function(x,C){return C=oe(C,255),Math.round((B.clamp(x,-1,1)*.5+.5)*C)};B.fromSNorm=function(x,C){return C=oe(C,255),B.clamp(x,0,C)/C*2-1};B.normalize=function(x,C,T){return T=Math.max(T-C,0),T===0?0:B.clamp((x-C)/T,0,1)};B.sinh=oe(Math.sinh,function(C){return(Math.exp(C)-Math.exp(-C))/2});B.cosh=oe(Math.cosh,function(C){return(Math.exp(C)+Math.exp(-C))/2});B.lerp=function(x,C,T){return(1-T)*x+T*C};B.PI=Math.PI;B.ONE_OVER_PI=1/Math.PI;B.PI_OVER_TWO=Math.PI/2;B.PI_OVER_THREE=Math.PI/3;B.PI_OVER_FOUR=Math.PI/4;B.PI_OVER_SIX=Math.PI/6;B.THREE_PI_OVER_TWO=3*Math.PI/2;B.TWO_PI=2*Math.PI;B.ONE_OVER_TWO_PI=1/(2*Math.PI);B.RADIANS_PER_DEGREE=Math.PI/180;B.DEGREES_PER_RADIAN=180/Math.PI;B.RADIANS_PER_ARCSECOND=B.RADIANS_PER_DEGREE/3600;B.toRadians=function(x){if(!st(x))throw new at("degrees is required.");return x*B.RADIANS_PER_DEGREE};B.toDegrees=function(x){if(!st(x))throw new at("radians is required.");return x*B.DEGREES_PER_RADIAN};B.convertLongitudeRange=function(x){if(!st(x))throw new at("angle is required.");let C=B.TWO_PI,T=x-Math.floor(x/C)*C;return T<-Math.PI?T+C:T>=Math.PI?T-C:T};B.clampToLatitudeRange=function(x){if(!st(x))throw new at("angle is required.");return B.clamp(x,-1*B.PI_OVER_TWO,B.PI_OVER_TWO)};B.negativePiToPi=function(x){if(!st(x))throw new at("angle is required.");return x>=-B.PI&&x<=B.PI?x:B.zeroToTwoPi(x+B.PI)-B.PI};B.zeroToTwoPi=function(x){if(!st(x))throw new at("angle is required.");if(x>=0&&x<=B.TWO_PI)return x;let C=B.mod(x,B.TWO_PI);return Math.abs(C)<B.EPSILON14&&Math.abs(x)>B.EPSILON14?B.TWO_PI:C};B.mod=function(x,C){if(!st(x))throw new at("m is required.");if(!st(C))throw new at("n is required.");if(C===0)throw new at("divisor cannot be 0.");return B.sign(x)===B.sign(C)&&Math.abs(x)<Math.abs(C)?x:(x%C+C)%C};B.equalsEpsilon=function(x,C,T,N){if(!st(x))throw new at("left is required.");if(!st(C))throw new at("right is required.");T=oe(T,0),N=oe(N,T);let k=Math.abs(x-C);return k<=N||k<=T*Math.max(Math.abs(x),Math.abs(C))};B.lessThan=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C<-T};B.lessThanOrEquals=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C<T};B.greaterThan=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C>T};B.greaterThanOrEquals=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C>-T};var af=[1];B.factorial=function(x){if(typeof x!="number"||x<0)throw new at("A number greater than or equal to 0 is required.");let C=af.length;if(x>=C){let T=af[C-1];for(let N=C;N<=x;N++){let k=T*N;af.push(k),T=k}}return af[x]};B.incrementWrap=function(x,C,T){if(T=oe(T,0),!st(x))throw new at("n is required.");if(C<=T)throw new at("maximumValue must be greater than minimumValue.");return++x,x>C&&(x=T),x};B.isPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>4294967295)throw new at("A number between 0 and (2^32)-1 is required.");return x!==0&&(x&x-1)===0};B.nextPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>2147483648)throw new at("A number between 0 and 2^31 is required.");return--x,x|=x>>1,x|=x>>2,x|=x>>4,x|=x>>8,x|=x>>16,++x,x};B.previousPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>4294967295)throw new at("A number between 0 and (2^32)-1 is required.");return x|=x>>1,x|=x>>2,x|=x>>4,x|=x>>8,x|=x>>16,x|=x>>32,x=(x>>>0)-(x>>>1),x};B.clamp=function(x,C,T){return Y.typeOf.number("value",x),Y.typeOf.number("min",C),Y.typeOf.number("max",T),x<C?C:x>T?T:x};var VT=new em.default;B.setRandomNumberSeed=function(x){if(!st(x))throw new at("seed is required.");VT=new em.default(x)};B.nextRandomNumber=function(){return VT.random()};B.randomBetween=function(x,C){return B.nextRandomNumber()*(C-x)+x};B.acosClamped=function(x){if(!st(x))throw new at("value is required.");return Math.acos(B.clamp(x,-1,1))};B.asinClamped=function(x){if(!st(x))throw new at("value is required.");return Math.asin(B.clamp(x,-1,1))};B.chordLength=function(x,C){if(!st(x))throw new at("angle is required.");if(!st(C))throw new at("radius is required.");return 2*C*Math.sin(x*.5)};B.logBase=function(x,C){if(!st(x))throw new at("number is required.");if(!st(C))throw new at("base is required.");return Math.log(x)/Math.log(C)};B.cbrt=oe(Math.cbrt,function(C){let T=Math.pow(Math.abs(C),.3333333333333333);return C<0?-T:T});B.log2=oe(Math.log2,function(C){return Math.log(C)*Math.LOG2E});B.fog=function(x,C){let T=x*C;return 1-Math.exp(-(T*T))};B.fastApproximateAtan=function(x){return Y.typeOf.number("x",x),x*(-.1784*Math.abs(x)-.0663*x*x+1.0301)};B.fastApproximateAtan2=function(x,C){Y.typeOf.number("x",x),Y.typeOf.number("y",C);let T,N=Math.abs(x);T=Math.abs(C);let k=Math.max(N,T);T=Math.min(N,T);let F=T/k;if(isNaN(F))throw new at("either x or y must be nonzero");return N=B.fastApproximateAtan(F),N=Math.abs(C)>Math.abs(x)?B.PI_OVER_TWO-N:N,N=x<0?B.PI-N:N,N=C<0?-N:N,N};var Qe=B;function O(x,C,T){this.x=oe(x,0),this.y=oe(C,0),this.z=oe(T,0)}O.fromSpherical=function(x,C){Y.typeOf.object("spherical",x),st(C)||(C=new O);let T=x.clock,N=x.cone,k=oe(x.magnitude,1),F=k*Math.sin(N);return C.x=F*Math.cos(T),C.y=F*Math.sin(T),C.z=k*Math.cos(N),C};O.fromElements=function(x,C,T,N){return st(N)?(N.x=x,N.y=C,N.z=T,N):new O(x,C,T)};O.clone=function(x,C){if(!!st(x))return st(C)?(C.x=x.x,C.y=x.y,C.z=x.z,C):new O(x.x,x.y,x.z)};O.fromCartesian4=O.clone;O.packedLength=3;O.pack=function(x,C,T){return Y.typeOf.object("value",x),Y.defined("array",C),T=oe(T,0),C[T++]=x.x,C[T++]=x.y,C[T]=x.z,C};O.unpack=function(x,C,T){return Y.defined("array",x),C=oe(C,0),st(T)||(T=new O),T.x=x[C++],T.y=x[C++],T.z=x[C],T};O.packArray=function(x,C){Y.defined("array",x);let T=x.length,N=T*3;if(!st(C))C=new Array(N);else{if(!Array.isArray(C)&&C.length!==N)throw new at("If result is a typed array, it must have exactly array.length * 3 elements");C.length!==N&&(C.length=N)}for(let k=0;k<T;++k)O.pack(x[k],C,k*3);return C};O.unpackArray=function(x,C){if(Y.defined("array",x),Y.typeOf.number.greaterThanOrEquals("array.length",x.length,3),x.length%3!==0)throw new at("array length must be a multiple of 3.");let T=x.length;st(C)?C.length=T/3:C=new Array(T/3);for(let N=0;N<T;N+=3){let k=N/3;C[k]=O.unpack(x,N,C[k])}return C};O.fromArray=O.unpack;O.maximumComponent=function(x){return Y.typeOf.object("cartesian",x),Math.max(x.x,x.y,x.z)};O.minimumComponent=function(x){return Y.typeOf.object("cartesian",x),Math.min(x.x,x.y,x.z)};O.minimumByComponent=function(x,C,T){return Y.typeOf.object("first",x),Y.typeOf.object("second",C),Y.typeOf.object("result",T),T.x=Math.min(x.x,C.x),T.y=Math.min(x.y,C.y),T.z=Math.min(x.z,C.z),T};O.maximumByComponent=function(x,C,T){return Y.typeOf.object("first",x),Y.typeOf.object("second",C),Y.typeOf.object("result",T),T.x=Math.max(x.x,C.x),T.y=Math.max(x.y,C.y),T.z=Math.max(x.z,C.z),T};O.clamp=function(x,C,T,N){Y.typeOf.object("value",x),Y.typeOf.object("min",C),Y.typeOf.object("max",T),Y.typeOf.object("result",N);let k=Qe.clamp(x.x,C.x,T.x),F=Qe.clamp(x.y,C.y,T.y),G=Qe.clamp(x.z,C.z,T.z);return N.x=k,N.y=F,N.z=G,N};O.magnitudeSquared=function(x){return Y.typeOf.object("cartesian",x),x.x*x.x+x.y*x.y+x.z*x.z};O.magnitude=function(x){return Math.sqrt(O.magnitudeSquared(x))};var of=new O;O.distance=function(x,C){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),O.subtract(x,C,of),O.magnitude(of)};O.distanceSquared=function(x,C){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),O.subtract(x,C,of),O.magnitudeSquared(of)};O.normalize=function(x,C){Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C);let T=O.magnitude(x);if(C.x=x.x/T,C.y=x.y/T,C.z=x.z/T,isNaN(C.x)||isNaN(C.y)||isNaN(C.z))throw new at("normalized result is not a number");return C};O.dot=function(x,C){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),x.x*C.x+x.y*C.y+x.z*C.z};O.multiplyComponents=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x*C.x,T.y=x.y*C.y,T.z=x.z*C.z,T};O.divideComponents=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x/C.x,T.y=x.y/C.y,T.z=x.z/C.z,T};O.add=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x+C.x,T.y=x.y+C.y,T.z=x.z+C.z,T};O.subtract=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x-C.x,T.y=x.y-C.y,T.z=x.z-C.z,T};O.multiplyByScalar=function(x,C,T){return Y.typeOf.object("cartesian",x),Y.typeOf.number("scalar",C),Y.typeOf.object("result",T),T.x=x.x*C,T.y=x.y*C,T.z=x.z*C,T};O.divideByScalar=function(x,C,T){return Y.typeOf.object("cartesian",x),Y.typeOf.number("scalar",C),Y.typeOf.object("result",T),T.x=x.x/C,T.y=x.y/C,T.z=x.z/C,T};O.negate=function(x,C){return Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C),C.x=-x.x,C.y=-x.y,C.z=-x.z,C};O.abs=function(x,C){return Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C),C.x=Math.abs(x.x),C.y=Math.abs(x.y),C.z=Math.abs(x.z),C};var GT=new O;O.lerp=function(x,C,T,N){return Y.typeOf.object("start",x),Y.typeOf.object("end",C),Y.typeOf.number("t",T),Y.typeOf.object("result",N),O.multiplyByScalar(C,T,GT),N=O.multiplyByScalar(x,1-T,N),O.add(GT,N,N)};var nf=new O,rm=new O;O.angleBetween=function(x,C){Y.typeOf.object("left",x),Y.typeOf.object("right",C),O.normalize(x,nf),O.normalize(C,rm);let T=O.dot(nf,rm),N=O.magnitude(O.cross(nf,rm,nf));return Math.atan2(N,T)};var k5=new O;O.mostOrthogonalAxis=function(x,C){Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C);let T=O.normalize(x,k5);return O.abs(T,T),T.x<=T.y?T.x<=T.z?C=O.clone(O.UNIT_X,C):C=O.clone(O.UNIT_Z,C):T.y<=T.z?C=O.clone(O.UNIT_Y,C):C=O.clone(O.UNIT_Z,C),C};O.projectVector=function(x,C,T){Y.defined("a",x),Y.defined("b",C),Y.defined("result",T);let N=O.dot(x,C)/O.dot(C,C);return O.multiplyByScalar(C,N,T)};O.equals=function(x,C){return x===C||st(x)&&st(C)&&x.x===C.x&&x.y===C.y&&x.z===C.z};O.equalsArray=function(x,C,T){return x.x===C[T]&&x.y===C[T+1]&&x.z===C[T+2]};O.equalsEpsilon=function(x,C,T,N){return x===C||st(x)&&st(C)&&Qe.equalsEpsilon(x.x,C.x,T,N)&&Qe.equalsEpsilon(x.y,C.y,T,N)&&Qe.equalsEpsilon(x.z,C.z,T,N)};O.cross=function(x,C,T){Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T);let N=x.x,k=x.y,F=x.z,G=C.x,St=C.y,Ct=C.z,te=k*Ct-F*St,de=F*G-N*Ct,Yt=N*St-k*G;return T.x=te,T.y=de,T.z=Yt,T};O.midpoint=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=(x.x+C.x)*.5,T.y=(x.y+C.y)*.5,T.z=(x.z+C.z)*.5,T};O.fromDegrees=function(x,C,T,N,k){return Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),x=Qe.toRadians(x),C=Qe.toRadians(C),O.fromRadians(x,C,T,N,k)};var Bt=new O,Je=new O,z5=new O(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);O.fromCGCS2000Degrees=function(x,C,T,N){return Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),x=Qe.toRadians(x),C=Qe.toRadians(C),O.fromcgcs2000Radians(x,C,T,N)};var HT=new O(6378137*6378137,6378137*6378137,6356752314140356e-9*6356752314140356e-9);O.fromcgcs2000Radians=function(x,C,T,N){Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),T=oe(T,0);let k=HT,F=Math.cos(C);Bt.x=F*Math.cos(x),Bt.y=F*Math.sin(x),Bt.z=Math.sin(C),Bt=O.normalize(Bt,Bt),O.multiplyComponents(k,Bt,Je);let G=Math.sqrt(O.dot(Bt,Je));return Je=O.divideByScalar(Je,G,Je),Bt=O.multiplyByScalar(Bt,T,Bt),st(N)||(N=new O),O.add(Je,Bt,N)};Bt=new O;Je=new O;var B5=new O(1737400*1737400,1737400*1737400,1737400*1737400);O.fromRadians=function(x,C,T,N,k){Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),T=oe(T,0);let F=null;globalThis?.ellipsoidCoordinates==="CGCS2000"?F=HT:globalThis?.ellipsoidCoordinates==="MOON"?F=B5:F=st(N)?N.radiiSquared:z5;let G=Math.cos(C);Bt.x=G*Math.cos(x),Bt.y=G*Math.sin(x),Bt.z=Math.sin(C),Bt=O.normalize(Bt,Bt),O.multiplyComponents(F,Bt,Je);let St=Math.sqrt(O.dot(Bt,Je));return Je=O.divideByScalar(Je,St,Je),Bt=O.multiplyByScalar(Bt,T,Bt),st(k)||(k=new O),O.add(Je,Bt,k)};O.fromDegreesArray=function(x,C,T){if(Y.defined("coordinates",x),x.length<2||x.length%2!==0)throw new at("the number of coordinates must be a multiple of 2 and at least 2");let N=x.length;st(T)?T.length=N/2:T=new Array(N/2);for(let k=0;k<N;k+=2){let F=x[k],G=x[k+1],St=k/2;T[St]=O.fromDegrees(F,G,0,C,T[St])}return T};O.fromRadiansArray=function(x,C,T){if(Y.defined("coordinates",x),x.length<2||x.length%2!==0)throw new at("the number of coordinates must be a multiple of 2 and at least 2");let N=x.length;st(T)?T.length=N/2:T=new Array(N/2);for(let k=0;k<N;k+=2){let F=x[k],G=x[k+1],St=k/2;T[St]=O.fromRadians(F,G,0,C,T[St])}return T};O.fromDegreesArrayHeights=function(x,C,T){if(Y.defined("coordinates",x),x.length<3||x.length%3!==0)throw new at("the number of coordinates must be a multiple of 3 and at least 3");let N=x.length;st(T)?T.length=N/3:T=new Array(N/3);for(let k=0;k<N;k+=3){let F=x[k],G=x[k+1],St=x[k+2],Ct=k/3;T[Ct]=O.fromDegrees(F,G,St,C,T[Ct])}return T};O.fromRadiansArrayHeights=function(x,C,T){if(Y.defined("coordinates",x),x.length<3||x.length%3!==0)throw new at("the number of coordinates must be a multiple of 3 and at least 3");let N=x.length;st(T)?T.length=N/3:T=new Array(N/3);for(let k=0;k<N;k+=3){let F=x[k],G=x[k+1],St=x[k+2],Ct=k/3;T[Ct]=O.fromRadians(F,G,St,C,T[Ct])}return T};O.ZERO=Object.freeze(new O(0,0,0));O.ONE=Object.freeze(new O(1,1,1));O.UNIT_X=Object.freeze(new O(1,0,0));O.UNIT_Y=Object.freeze(new O(0,1,0));O.UNIT_Z=Object.freeze(new O(0,0,1));O.prototype.clone=function(x){return O.clone(this,x)};O.prototype.equals=function(x){return O.equals(this,x)};O.prototype.equalsEpsilon=function(x,C,T){return O.equalsEpsilon(this,x,C,T)};O.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var am=O;var sf={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};sf.getMorphTime=function(x){return x===sf.SCENE3D?1:x===sf.MORPHING?void 0:0};var FT=Object.freeze(sf);var WT={};(function(C,T){C.FlowEcharts=T(co,C.Geoworld)})(WT,function(x,C){return function(T){var N={};function k(F){if(N[F])return N[F].exports;var G=N[F]={i:F,l:!1,exports:{}};return T[F].call(G.exports,G,G.exports,k),G.l=!0,G.exports}return k.m=T,k.c=N,k.d=function(F,G,St){k.o(F,G)||Object.defineProperty(F,G,{enumerable:!0,get:St})},k.r=function(F){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(F,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(F,"__esModule",{value:!0})},k.t=function(F,G){if(G&1&&(F=k(F)),G&8||G&4&&typeof F=="object"&&F&&F.__esModule)return F;var St=Object.create(null);if(k.r(St),Object.defineProperty(St,"default",{enumerable:!0,value:F}),G&2&&typeof F!="string")for(var Ct in F)k.d(St,Ct,function(te){return F[te]}.bind(null,Ct));return St},k.n=function(F){var G=F&&F.__esModule?function(){return F.default}:function(){return F};return k.d(G,"a",G),G},k.o=function(F,G){return Object.prototype.hasOwnProperty.call(F,G)},k.p="",k(k.s=0)}([function(T,N,k){k(1);var F=k(7);T.exports=F},function(T,N,k){var F;F=function(G){return k(2).registerCoordinateSystem("GLMap",k(3)),k(5),k(6),k(2).registerAction({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(St,Ct){}),{version:"1.0.0"}}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){T.exports=x},function(T,N,k){var F;F=function(G){var St=k(2);function Ct(te,de){this._GLMap=te,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=de}return Ct.prototype.dimensions=["lng","lat"],Ct.prototype.setMapOffset=function(te){this._mapOffset=te},Ct.prototype.getBMap=function(){return this._GLMap},Ct.prototype.dataToPoint=function(te){var de=Qe.toRadians(80),Yt=[99999,99999],gr=am.fromDegrees(te[0],te[1]);if(!gr)return Yt;var en=this._GLMap.cartesianToCanvasCoordinates(gr);if(!en)return Yt;var Pr=this._GLMap;return Pr.mode===FT.SCENE3D&&am.angleBetween(Pr.camera.position,gr)>de?!1:[en.x-this._mapOffset[0],en.y-this._mapOffset[1]]},Ct.prototype.pointToData=function(Yt){var de=this._mapOffset,Yt=this._bmap.project([Yt[0]+de[0],Yt[1]+de[1]]);return[Yt.lng,Yt.lat]},Ct.prototype.getViewRect=function(){var te=this._api;return new St.graphic.BoundingRect(0,0,te.getWidth(),te.getHeight())},Ct.prototype.getRoamTransform=function(){return St.matrix.create()},Ct.dimensions=Ct.prototype.dimensions,Ct.create=function(te,de){var Yt;te.eachComponent("GLMap",function(gr){var en=de.getZr().painter.getViewportRoot(),Pr=St.glMap;Yt=new Ct(Pr,de),Yt.setMapOffset(gr.__mapOffset||[0,0]),gr.coordinateSystem=Yt}),te.eachSeries(function(gr){gr.get("coordinateSystem")==="GLMap"&&(gr.coordinateSystem=Yt)})},Ct}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){T.exports=C},function(T,N,k){var F;F=function(G){return k(2).extendComponentModel({type:"GLMap",getBMap:function(){return this.__GLMap},defaultOption:{roam:!1}})}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N,k){var F;F=function(G){return k(2).extendComponentView({type:"GLMap",init:function(St,Ct){this.api=Ct,co.glMap.postRender.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.dispatchAction({type:"GLMapRoam"})},render:function(St,Ct,te){},dispose:function(St,Ct){co.glMap.postRender.removeEventListener(this.moveHandler,this)}})}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){function k(F,G){this._mapContainer=F,this._overlay=this._createChartOverlay(),this._overlay.setOption(G)}k.prototype._createChartOverlay=function(){var F=this._mapContainer.scene;F.canvas.setAttribute("tabIndex",0);var G=document.createElement("div");return G.style.position="absolute",G.style.top="0px",G.style.left="0px",G.style.width=F.canvas.width+"px",G.style.height=F.canvas.height+"px",G.style.pointerEvents="none",G.setAttribute("id","echarts"),G.setAttribute("class","echartMap"),this._mapContainer.container.appendChild(G),this._echartsContainer=G,co.glMap=F,co.init(G)},k.prototype.dispose=function(){this._echartsContainer&&(this._mapContainer.container.removeChild(this._echartsContainer),this._echartsContainer=null),this._overlay&&(this._overlay.dispose(),this._overlay=null)},k.prototype.destroy=function(){this.dispose()},k.prototype.updateOverlay=function(F){this._overlay&&this._overlay.setOption(F)},k.prototype.getMap=function(){return this._mapContainer},k.prototype.getOverlay=function(){return this._overlay},T.exports=k}])});var D3=WT.FlowEcharts;})();
*`,"g")),a={series:[]};return M(r,function(i,n){if(sz(i)){var o=lz(i),s=e[n],l=s.axisDim+"Axis";s&&(a[l]=a[l]||[],a[l][s.axisIndex]={data:o.categories},a.series=a.series.concat(o.series))}else{var o=uz(i);a.series.push(o)}}),a}function Us(t){this._dom=null,this.model=t}Us.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:rt(US.title),lang:rt(US.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Us.prototype.onclick=function(t,e){var r=e.getDom(),a=this.model;this._dom&&r.removeChild(this._dom);var i=document.createElement("div");i.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",i.style.backgroundColor=a.get("backgroundColor")||"#fff";var n=document.createElement("h4"),o=a.get("lang")||[];n.innerHTML=o[0]||a.get("title"),n.style.cssText="margin: 10px 20px;",n.style.color=a.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=a.get("optionToContent"),h=a.get("contentToOption"),f=oz(t);if(typeof u=="function"){var c=u(e.getOption());typeof c=="string"?s.innerHTML=c:nn(c)&&s.appendChild(c)}else s.appendChild(l),l.readOnly=a.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=a.get("textColor"),l.style.borderColor=a.get("textareaBorderColor"),l.style.backgroundColor=a.get("textareaColor"),l.value=f.value;var v=f.meta,d=document.createElement("div");d.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",p=document.createElement("div"),m=document.createElement("div");g+=";background-color:"+a.get("buttonColor"),g+=";color:"+a.get("buttonTextColor");var y=this;function _(){r.removeChild(i),y._dom=null}Sf(p,"click",_),Sf(m,"click",function(){var w;try{typeof h=="function"?w=h(s,e.getOption()):w=hz(l.value,v)}catch(b){throw _(),new Error("Data view format error "+b)}w&&e.dispatchAction({type:"changeDataView",newOption:w}),_()}),p.innerHTML=o[1],m.innerHTML=o[2],m.style.cssText=g,p.style.cssText=g,!a.get("readOnly")&&d.appendChild(m),d.appendChild(p),i.appendChild(n),i.appendChild(s),i.appendChild(d),s.style.height=r.clientHeight-80+"px",r.appendChild(i),this._dom=i},Us.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Us.prototype.dispose=function(t,e){this.remove(t,e)};function fz(t,e){return V(t,function(r,a){var i=e&&e[a];return lt(i)&&!z(i)?(lt(r)&&!z(r)&&(r=r.value),J({value:r},i)):r})}io("dataView",Us),mt({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var r=[];M(t.newOption.series,function(a){var i=e.getSeriesByName(a.name)[0];if(!i)r.push(et({type:"scatter"},a));else{var n=i.get("data");r.push({name:a.name,data:fz(a.data,n)})}}),e.mergeOption(J({series:r},t.newOption))});var ti=M,kh=yt,zh=ot,jg=["dataToPoint","pointToData"],cz=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function Bh(t,e,r){var a=this._targetInfoList=[],i={},n=$S(e,t);ti(vz,function(o,s){(!r||!r.include||kh(r.include,s)>=0)&&o(n,a,i)})}var oo=Bh.prototype;oo.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(r,a,i){if((r.coordRanges||(r.coordRanges=[])).push(a),!r.coordRange){r.coordRange=a;var n=Jg[r.brushType](0,i,a);r.__rangeOffset={offset:qS[r.brushType](n.values,r.range,[1,1]),xyMinMax:n.xyMinMax}}})},oo.matchOutputRanges=function(t,e,r){ti(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&M(i.coordSyses,function(n){var o=Jg[a.brushType](1,n,a.range);r(a,o.values,n,e)})},this)},oo.setInputRanges=function(t,e){ti(t,function(r){var a=this.findTargetInfo(r,e);if(T&&(gt(!a||a===!0||r.coordRange,"coordRange must be specified when coord index specified."),gt(!a||a!==!0||r.range,"range must be specified in global brush.")),r.range=r.range||[],a&&a!==!0){r.panelId=a.panelId;var i=Jg[r.brushType](0,a.coordSys,r.coordRange),n=r.__rangeOffset;r.range=n?qS[r.brushType](i.values,n.offset,dz(i.xyMinMax,n.xyMinMax)):i.values}},this)},oo.makePanelOpts=function(t,e){return V(this._targetInfoList,function(r){var a=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:e&&e(r),clipPath:jw(a),isTargetByCursor:Jw(a,t,r.coordSysModel),getLinearBrushOtherExtent:Qw(a)}})},oo.controlSeries=function(t,e,r){var a=this.findTargetInfo(t,r);return a===!0||a&&kh(a.coordSyses,e.coordinateSystem)>=0},oo.findTargetInfo=function(t,e){for(var r=this._targetInfoList,a=$S(e,t),i=0;i<r.length;i++){var n=r[i],o=t.panelId;if(o){if(n.panelId===o)return n}else for(var i=0;i<ZS.length;i++)if(ZS[i](a,n))return n}return!0};function Qg(t){return t[0]>t[1]&&t.reverse(),t}function $S(t,e){return Ol(t,e,{includeMainTypes:cz})}var vz={grid:function(t,e){var r=t.xAxisModels,a=t.yAxisModels,i=t.gridModels,n=ht(),o={},s={};!r&&!a&&!i||(ti(r,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),ti(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),ti(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,h=[];ti(u.getCartesians(),function(f,c){(kh(r,f.getAxis("x").model)>=0||kh(a,f.getAxis("y").model)>=0)&&h.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:YS.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){ti(t.geoModels,function(r){var a=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:a,coordSyses:[a],getPanelRect:YS.geo})})}},ZS=[function(t,e){var r=t.xAxisModel,a=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&a&&(i=a.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],YS={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(yi(t)),e}},Jg={lineX:zh(XS,0),lineY:zh(XS,1),rect:function(t,e,r){var a=e[jg[t]]([r[0][0],r[1][0]]),i=e[jg[t]]([r[0][1],r[1][1]]),n=[Qg([a[0],i[0]]),Qg([a[1],i[1]])];return{values:n,xyMinMax:n}},polygon:function(t,e,r){var a=[[1/0,-1/0],[1/0,-1/0]],i=V(r,function(n){var o=e[jg[t]](n);return a[0][0]=Math.min(a[0][0],o[0]),a[1][0]=Math.min(a[1][0],o[1]),a[0][1]=Math.max(a[0][1],o[0]),a[1][1]=Math.max(a[1][1],o[1]),o});return{values:i,xyMinMax:a}}};function XS(t,e,r,a){T&&gt(r.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=r.getAxis(["x","y"][t]),n=Qg(V([0,1],function(s){return e?i.coordToData(i.toLocalCoord(a[s])):i.toGlobalCoord(i.dataToCoord(a[s]))})),o=[];return o[t]=n,o[1-t]=[NaN,NaN],{values:n,xyMinMax:o}}var qS={lineX:zh(KS,0),lineY:zh(KS,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return V(t,function(a,i){return[a[0]-r[0]*e[i][0],a[1]-r[1]*e[i][1]]})}};function KS(t,e,r,a){return[e[0]-a[t]*r[0],e[1]-a[t]*r[1]]}function dz(t,e){var r=jS(t),a=jS(e),i=[r[0]/a[0],r[1]/a[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function jS(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var QS=M,tp="\0_ec_hist_store";function gz(t,e){var r=ep(t);QS(e,function(a,i){for(var n=r.length-1;n>=0;n--){var o=r[n];if(o[i])break}if(n<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function pz(t){var e=ep(t),r=e[e.length-1];e.length>1&&e.pop();var a={};return QS(r,function(i,n){for(var o=e.length-1;o>=0;o--){var i=e[o][n];if(i){a[n]=i;break}}}),a}function mz(t){t[tp]=null}function yz(t){return ep(t).length}function ep(t){var e=t[tp];return e||(e=t[tp]=[{}]),e}wt.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var _z=["x","y","z","radius","angle","single"],xz=["cartesian2d","polar","singleAxis"];function wz(t){return yt(xz,t)>=0}function bz(t,e){t=t.slice();var r=V(t,su);e=(e||[]).slice();var a=V(e,su);return function(i,n){M(t,function(o,s){for(var l={name:o,capital:r[s]},u=0;u<e.length;u++)l[e[u]]=o+a[u];i.call(n,l)})}}var JS=bz(_z,["axisIndex","axis","index","id"]);function Sz(t,e,r){return function(o){var s={nodes:[],records:{}};if(e(function(h){s.records[h.name]={}}),!o)return s;n(o,s);var l;do l=!1,t(u);while(l);function u(h){!a(h,s)&&i(h,s)&&(n(h,s),l=!0)}return s};function a(o,s){return yt(s.nodes,o)>=0}function i(o,s){var l=!1;return e(function(u){M(r(o,u)||[],function(h){s.records[u.name][h]&&(l=!0)})}),l}function n(o,s){s.nodes.push(o),e(function(l){M(r(o,l)||[],function(u){s.records[l.name][u]=!0})})}}var $i=M,tA=_i,rp=function(t,e,r,a){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=a,this._dataZoomModel=r};rp.prototype={constructor:rp,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(r){if(wz(r.get("coordinateSystem"))){var a=this._dimName,i=e.queryComponents({mainType:a+"Axis",index:r.get(a+"AxisIndex"),id:r.get(a+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&t.push(r)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t=this._dimName,e=this.ecModel,r=this.getAxisModel(),a=t==="x"||t==="y",i,n;a?(n="gridIndex",i=t==="x"?"y":"x"):(n="polarIndex",i=t==="angle"?"radius":"angle");var o;return e.eachComponent(i+"Axis",function(s){(s.get(n)||0)===(r.get(n)||0)&&(o=s)}),o},getMinMaxSpan:function(){return rt(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,r=this.getAxisModel(),a=r.axis.scale,i=this._dataZoomModel.getRangePropMode(),n=[0,100],o=[],s=[],l;$i(["start","end"],function(f,c){var v=t[f],d=t[f+"Value"];i[c]==="percent"?(v==null&&(v=n[c]),d=a.parse(Nt(v,n,e))):(l=!0,d=d==null?e[c]:a.parse(d),v=Nt(d,e,n)),s[c]=d,o[c]=v}),tA(s),tA(o);var u=this._minMaxSpan;l?h(s,o,e,n,!1):h(o,s,n,e,!0);function h(f,c,v,d,g){var p=g?"Span":"ValueSpan";zi(0,f,v,"all",u["min"+p],u["max"+p]);for(var m=0;m<2;m++)c[m]=Nt(f[m],v,d,!0),g&&(c[m]=a.parse(c[m]))}return{valueWindow:s,percentWindow:o}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Az(this,this._dimName,e),Cz(this);var r=this.calculateDataWindow(t.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,eA(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,eA(this,!0))},filterData:function(t,e){if(t!==this._dataZoomModel)return;var r=this._dimName,a=this.getTargetSeriesModels(),i=t.get("filterMode"),n=this._valueWindow;if(i==="none")return;$i(a,function(s){var l=s.getData(),u=l.mapDimension(r,!0);!u.length||(i==="weakFilter"?l.filterSelf(function(h){for(var f,c,v,d=0;d<u.length;d++){var g=l.get(u[d],h),p=!isNaN(g),m=g<n[0],y=g>n[1];if(p&&!m&&!y)return!0;p&&(v=!0),m&&(f=!0),y&&(c=!0)}return v&&f&&c}):$i(u,function(h){if(i==="empty")s.setData(l=l.map(h,function(c){return o(c)?c:NaN}));else{var f={};f[h]=n,l.selectRange(f)}}),$i(u,function(h){l.setApproximateExtent(n,h)}))});function o(s){return s>=n[0]&&s<=n[1]}}};function Az(t,e,r){var a=[1/0,-1/0];return $i(r,function(i){var n=i.getData();n&&$i(n.mapDimension(e,!0),function(o){var s=n.getApproximateExtent(o);s[0]<a[0]&&(a[0]=s[0]),s[1]>a[1]&&(a[1]=s[1])})}),a[1]<a[0]&&(a=[NaN,NaN]),Tz(t,a),a}function Tz(t,e){var r=t.getAxisModel(),a=r.getMin(!0),i=r.get("type")==="category",n=i&&r.getCategories().length;a!=null&&a!=="dataMin"&&typeof a!="function"?e[0]=a:i&&(e[0]=n>0?0:NaN);var o=r.getMax(!0);return o!=null&&o!=="dataMax"&&typeof o!="function"?e[1]=o:i&&(e[1]=n>0?n-1:NaN),r.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function eA(t,e){var r=t.getAxisModel(),a=t._percentWindow,i=t._valueWindow;if(!!a){var n=Jc(i,[0,500]);n=Math.min(n,20);var o=e||a[0]===0&&a[1]===100;r.setRange(o?null:+i[0].toFixed(n),o?null:+i[1].toFixed(n))}}function Cz(t){var e=t._minMaxSpan={},r=t._dataZoomModel,a=t._dataExtent;$i(["min","max"],function(i){var n=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=t.getAxisModel().axis.scale.parse(o)),o!=null?n=Nt(a[0]+o,a,[0,100],!0):n!=null&&(o=Nt(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o})}var Zi=M,Yi=JS,ap=Ze({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,r){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var a=rA(t);this.settledOption=a,this.mergeDefaultAndTheme(t,r),this.doInit(a)},mergeOption:function(t){var e=rA(t);ut(this.option,t,!0),ut(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;G.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),aA(this,t);var r=this.settledOption;Zi([["start","startValue"],["end","endValue"]],function(a,i){this._rangePropMode[i]==="value"&&(e[a[0]]=r[a[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,r,a,i){var n=this.dependentModels[e.axis][r],o=n.__dzAxisProxy||(n.__dzAxisProxy=new rp(e.name,r,this,i));t[e.name+"_"+r]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Yi(function(r){var a=r.axisIndex;t[a]=me(t[a])},this),e==="axisIndex"?this._autoSetAxisIndex():e==="orient"&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Yi(function(a){t[a.axisIndex]!=null&&(e=!0)},this);var r=t.orient;if(r==null&&e)return"orient";if(!e)return r==null&&(t.orient="horizontal"),"axisIndex"},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),r=this.option,a=this.dependentModels;if(t){var i=e==="vertical"?"y":"x";a[i+"Axis"].length?(r[i+"AxisIndex"]=[0],t=!1):Zi(a.singleAxis,function(n){t&&n.get("orient",!0)===e&&(r.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Yi(function(n){if(!!t){var o=[],s=this.dependentModels[n.axis];if(s.length&&!o.length)for(var l=0,u=s.length;l<u;l++)s[l].get("type")==="category"&&o.push(l);r[n.axisIndex]=o,o.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(n){this._isSeriesHasAllAxesTypeOf(n,"value")&&Yi(function(o){var s=r[o.axisIndex],l=n.get(o.axisIndex),u=n.get(o.axisId),h=n.ecModel.queryComponents({mainType:o.axis,index:l,id:u})[0];if(T&&!h)throw new Error(o.axis+' "'+Ut(l,u,0)+'" not found');l=h.componentIndex,yt(s,l)<0&&s.push(l)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient=t==="y"?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var r=!0;return Yi(function(a){var i=t.get(a.axisIndex),n=this.dependentModels[a.axis][i];(!n||n.get("type")!==e)&&(r=!1)},this),r},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return Yi(function(e){if(t==null){var r=this.get(e.axisIndex);r.length&&(t=this.dependentModels[e.axis][r[0]])}},this),t},eachTargetAxis:function(t,e){var r=this.ecModel;Yi(function(a){Zi(this.get(a.axisIndex),function(i){t.call(e,a,i,this,r)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var r=this.getAxisProxy(t,e);return r&&r.getAxisModel()},setRawRange:function(t){var e=this.option,r=this.settledOption;Zi([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(e[a[0]]=r[a[0]]=t[a[0]],e[a[1]]=r[a[1]]=t[a[1]])},this),aA(this,t)},setCalculatedRange:function(t){var e=this.option;Zi(["start","startValue","end","endValue"],function(r){e[r]=t[r]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(t==null&&e==null){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataValueWindow()}else return this.getAxisProxy(t,e).getDataValueWindow()},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var r in e)if(e.hasOwnProperty(r)&&e[r].hostedBy(this))return e[r];for(var r in e)if(e.hasOwnProperty(r)&&!e[r].hostedBy(this))return e[r]},getRangePropMode:function(){return this._rangePropMode.slice()}});function rA(t){var e={};return Zi(["start","end","startValue","endValue","throttle"],function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}function aA(t,e){var r=t._rangePropMode,a=t.get("rangeMode");Zi([["start","startValue"],["end","endValue"]],function(i,n){var o=e[i[0]]!=null,s=e[i[1]]!=null;o&&!s?r[n]="percent":!o&&s?r[n]="value":a?r[n]=a[n]:o&&(r[n]="percent")})}var ip=Fr.extend({type:"dataZoom",render:function(t,e,r,a){this.dataZoomModel=t,this.ecModel=e,this.api=r},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,r={};t.eachTargetAxis(function(i,n){var o=e.getComponent(i.axis,n);if(o){var s=o.getCoordSysModel();s&&a(s,o,r[s.mainType]||(r[s.mainType]=[]),s.componentIndex)}},this);function a(i,n,o,s){for(var l,u=0;u<o.length;u++)if(o[u].model===i){l=o[u];break}l||o.push(l={model:i,axisModels:[],coordIndex:s}),l.axisModels.push(n)}return r}});ap.extend({type:"dataZoom.select"}),ip.extend({type:"dataZoom.select"}),$e({getTargetSeries:function(t){var e=ht();return t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(a,i,n){var o=n.getAxisProxy(a.name,i);M(o.getTargetSeriesModels(),function(s){e.set(s.uid,s)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(a,i,n){n.getAxisProxy(a.name,i).reset(n,e)}),r.eachTargetAxis(function(a,i,n){n.getAxisProxy(a.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(r){var a=r.findRepresentativeAxisProxy(),i=a.getDataPercentWindow(),n=a.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),mt("dataZoom",function(t,e){var r=Sz(it(e.eachComponent,e,"dataZoom"),JS,function(i,n){return i.get(n.axisIndex)}),a=[];e.eachComponent({mainType:"dataZoom",query:t},function(i,n){a.push.apply(a,r(i).nodes)}),M(a,function(i,n){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var Dz=ua.toolbox.dataZoom,iA=M,Mz="\0_ec_\0toolbox-dataZoom_";function np(t,e,r){(this._brushController=new ro(r.getZr())).on("brush",it(this._onBrush,this)).mount(),this._isZoomActive}np.defaultOption={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:rt(Dz.title)};var so=np.prototype;so.render=function(t,e,r,a){this.model=t,this.ecModel=e,this.api=r,Pz(t,e,this,a,r),Lz(t,e)},so.onclick=function(t,e,r){Iz[r].call(this)},so.remove=function(t,e){this._brushController.unmount()},so.dispose=function(t,e){this._brushController.dispose()};var Iz={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(pz(this.ecModel))}};so._onBrush=function(t,e){if(!e.isEnd||!t.length)return;var r={},a=this.ecModel;this._brushController.updateCovers([]);var i=new Bh(nA(this.model.option),a,{include:["grid"]});i.matchOutputRanges(t,a,function(s,l,u){if(u.type==="cartesian2d"){var h=s.brushType;h==="rect"?(n("x",u,l[0]),n("y",u,l[1])):n({lineX:"x",lineY:"y"}[h],u,l)}}),gz(a,r),this._dispatchZoomAction(r);function n(s,l,u){var h=l.getAxis(s),f=h.model,c=o(s,f,a),v=c.findRepresentativeAxisProxy(f).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(u=zi(0,u.slice(),h.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),c&&(r[c.id]={dataZoomId:c.id,startValue:u[0],endValue:u[1]})}function o(s,l,u){var h;return u.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var c=f.getAxisModel(s,l.componentIndex);c&&(h=f)}),h}},so._dispatchZoomAction=function(t){var e=[];iA(t,function(r,a){e.push(rt(r))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})};function nA(t){var e={};return M(["xAxisIndex","yAxisIndex"],function(r){e[r]=t[r],e[r]==null&&(e[r]="all"),(e[r]===!1||e[r]==="none")&&(e[r]=[])}),e}function Lz(t,e){t.setIconStatus("back",yz(e)>1?"emphasis":"normal")}function Pz(t,e,r,a,i){var n=r._isZoomActive;a&&a.type==="takeGlobalCursor"&&(n=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),r._isZoomActive=n,t.setIconStatus("zoom",n?"emphasis":"normal");var o=new Bh(nA(t.option),e,{include:["grid"]});r._brushController.setPanels(o.makePanelOpts(i,function(s){return s.xAxisDeclared&&!s.yAxisDeclared?"lineX":!s.xAxisDeclared&&s.yAxisDeclared?"lineY":"rect"})).enableBrush(n?{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}io("dataZoom",np),we(function(t){if(!t)return;var e=t.dataZoom||(t.dataZoom=[]);z(e)||(t.dataZoom=e=[e]);var r=t.toolbox;if(r&&(z(r)&&(r=r[0]),r&&r.feature)){var a=r.feature.dataZoom;i("xAxis",a),i("yAxis",a)}function i(o,s){if(!!s){var l=o+"Index",u=s[l];u!=null&&u!=="all"&&!z(u)&&(u=u===!1||u==="none"?[]:[u]),n(o,function(h,f){if(!(u!=null&&u!=="all"&&yt(u,f)===-1)){var c={type:"select",$fromToolbox:!0,filterMode:s.filterMode||"filter",id:Mz+o+f};c[l]=f,e.push(c)}})}}function n(o,s){var l=t[o];z(l)||(l=l?[l]:[]),iA(l,s)}});var Ez=ua.toolbox.restore;function op(t){this.model=t}op.defaultOption={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:Ez.title};var Rz=op.prototype;Rz.onclick=function(t,e,r){mz(t),e.dispatchAction({type:"restore",from:this.uid})},io("restore",op),mt({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),Ze({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var oA=M,Oz=_y,Nz=["","-webkit-","-moz-","-o-"],kz="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";function zz(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",r="left "+t+"s "+e+",top "+t+"s "+e;return V(Nz,function(a){return a+"transition:"+r}).join(";")}function Bz(t){var e=[],r=t.get("fontSize"),a=t.getTextColor();return a&&e.push("color:"+a),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px"),oA(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Vz(t){var e=[],r=t.get("transitionDuration"),a=t.get("backgroundColor"),i=t.getModel("textStyle"),n=t.get("padding");return r&&e.push(zz(r)),a&&(G.canvasSupported?e.push("background-Color:"+a):(e.push("background-Color:#"+Nf(a)),e.push("filter:alpha(opacity=70)"))),oA(["width","color","radius"],function(o){var s="border-"+o,l=Oz(s),u=t.get(l);u!=null&&e.push(s+":"+u+(o==="color"?"":"px"))}),e.push(Bz(i)),n!=null&&e.push("padding:"+xi(n).join("px ")+"px"),e.join(";")+";"}function sA(t,e,r,a,i){var n=e&&e.painter;if(r){var o=n&&n.getViewportRoot();o&&aC(t,o,document.body,a,i)}else{t[0]=a,t[1]=i;var s=n&&n.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function sp(t,e,r){if(G.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=e.getZr(),n=this._appendToBody=r&&r.appendToBody;this._styleCoord=[0,0],sA(this._styleCoord,i,n,e.getWidth()/2,e.getHeight()/2),n?document.body.appendChild(a):t.appendChild(a),this._container=t,this._show=!1,this._hideTimeout;var o=this;a.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},a.onmousemove=function(s){if(s=s||window.event,!o._enterable){var l=i.handler,u=i.painter.getViewportRoot();Er(u,s,!0),l.dispatch("mousemove",s)}},a.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}sp.prototype={constructor:sp,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),r=t.style;r.position!=="absolute"&&e.position!=="absolute"&&(r.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,r=this._styleCoord;e.style.cssText=kz+Vz(t)+";left:"+r[0]+"px;top:"+r[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=t??""},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var r=this._styleCoord;sA(r,this._zr,this._appendToBody,t,e);var a=this.el.style;a.left=r[0]+"px",a.top=r[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(it(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var r=document.defaultView.getComputedStyle(this.el);r&&(t+=parseInt(r.borderLeftWidth,10)+parseInt(r.borderRightWidth,10),e+=parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10))}return{width:t,height:e}}};function lp(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}lp.prototype={constructor:lp,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,r){this.el&&this._zr.remove(this.el);for(var a={},i=t,n="{marker",o="|}",s=i.indexOf(n);s>=0;){var l=i.indexOf(o),u=i.substr(s+n.length,l-s-n.length);u.indexOf("sub")>-1?a["marker"+u]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:a["marker"+u]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},i=i.substr(l+1),s=i.indexOf("{marker")}this.el=new dt({style:{rich:a,text:t,textLineHeight:20,textBackgroundColor:r.get("backgroundColor"),textBorderRadius:r.get("borderRadius"),textFill:r.get("textStyle.color"),textPadding:r.get("padding")},z:r.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(it(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var lA=it,$s=M,uA=H,Gz=new xt({shape:{x:-1,y:-1,width:2,height:2}});he({type:"tooltip",init:function(t,e){if(!G.node){var r=t.getComponent("tooltip"),a=r.get("renderMode");this._renderMode=y0(a);var i;this._renderMode==="html"?(i=new sp(e.getDom(),e,{appendToBody:r.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new lp(e),this._newLine=`
`),this._tooltipContent=i}},render:function(t,e,r){if(!G.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=r,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var a=this._tooltipContent;a.update(),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Xb("itemTooltip",this._api,lA(function(r,a,i){e!=="none"&&(e.indexOf(r)>=0?this._tryShow(a,i):r==="leave"&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,r=this._api;if(this._lastX!=null&&this._lastY!=null&&t.get("triggerOn")!=="none"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!r.isDisposed()&&a.manuallyShowTip(t,e,r,{x:a._lastX,y:a._lastY})})}},manuallyShowTip:function(t,e,r,a){if(!(a.from===this.uid||G.node)){var i=hA(a,r);this._ticket="";var n=a.dataByCoordSys;if(a.tooltip&&a.x!=null&&a.y!=null){var o=Gz;o.position=[a.x,a.y],o.update(),o.tooltip=a.tooltip,this._tryShow({offsetX:a.x,offsetY:a.y,target:o},i)}else if(n)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:a.dataByCoordSys,tooltipOption:a.tooltipOption},i);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,e,r,a))return;var s=Wb(a,e),l=s.point[0],u=s.point[1];l!=null&&u!=null&&this._tryShow({offsetX:l,offsetY:u,position:a.position,target:s.el},i)}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},i))}},manuallyHideTip:function(t,e,r,a){var i=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,a.from!==this.uid&&this._hide(hA(a,r))},_manuallyAxisShowTip:function(u,e,r,a){var i=a.seriesIndex,n=a.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(!(i==null||n==null||o==null)){var s=e.getSeriesByIndex(i);if(!!s){var l=s.getData(),u=up([l.getItemModel(n),s,(s.coordinateSystem||{}).model,u]);if(u.get("trigger")==="axis")return r.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:n,position:a.position}),!0}}},_tryShow:function(t,e){var r=t.target,a=this._tooltipModel;if(!!a){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):r&&r.dataIndex!=null?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,r,e)):r&&r.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,r,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var r=t.get("showDelay");e=it(e,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(e,r):e()},_showAxisTooltip:function(t,e){var r=this._ecModel,a=this._tooltipModel,i=[e.offsetX,e.offsetY],n=[],o=[],s=up([e.tooltipOption,a]),l=this._renderMode,u=this._newLine,h={};$s(t,function(c){$s(c.dataByAxis,function(v){var d=r.getComponent(v.axisDim+"Axis",v.axisIndex),g=v.value,p=[];if(!(!d||g==null)){var m=aS(g,d.axis,r,v.seriesDataIndices,v.valueLabelOpt);M(v.seriesDataIndices,function(_){var w=r.getSeriesByIndex(_.seriesIndex),b=_.dataIndexInside,A=w&&w.getDataParams(b);if(A.axisDim=v.axisDim,A.axisIndex=v.axisIndex,A.axisType=v.axisType,A.axisId=v.axisId,A.axisValue=rd(d.axis,g),A.axisValueLabel=m,A){o.push(A);var S=w.formatTooltip(b,!0,null,l),D;if(lt(S)){D=S.html;var I=S.markers;ut(h,I)}else D=S;p.push(D)}});var y=m;l!=="html"?n.push(p.join(u)):n.push((y?kt(y)+u:"")+p.join(u))}})},this),n.reverse(),n=n.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,f,i[0],i[1],this._tooltipContent,o):this._showTooltipContent(s,n,o,Math.random(),i[0],i[1],f,void 0,h)})},_showSeriesItemTooltip:function(t,e,r){var a=this._ecModel,i=e.seriesIndex,n=a.getSeriesByIndex(i),o=e.dataModel||n,s=e.dataIndex,l=e.dataType,u=o.getData(l),h=up([u.getItemModel(s),o,n&&(n.coordinateSystem||{}).model,this._tooltipModel]),f=h.get("trigger");if(!(f!=null&&f!=="item")){var c=o.getDataParams(s,l),v=o.formatTooltip(s,!1,l,this._renderMode),d,g;lt(v)?(d=v.html,g=v.markers):(d=v,g=null);var p="item_"+o.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,c,p,t.offsetX,t.offsetY,t.position,t.target,g)}),r({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:i,from:this.uid})}},_showComponentItemTooltip:function(t,e,r){var a=e.tooltip;if(typeof a=="string"){var i=a;a={content:i,formatter:i}}var n=new _t(a,this._tooltipModel,this._ecModel),o=n.get("content"),s=Math.random();this._showOrMove(n,function(){this._showTooltipContent(n,o,n.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),r({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,r,a,i,n,o,s,l){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var u=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var f=e;if(h&&typeof h=="string")f=ov(h,r,!0);else if(typeof h=="function"){var c=lA(function(v,d){v===this._ticket&&(u.setContent(d,l,t),this._updatePosition(t,o,i,n,u,r,s))},this);this._ticket=a,f=h(r,a,c)}u.setContent(f,l,t),u.show(t),this._updatePosition(t,o,i,n,u,r,s)}},_updatePosition:function(t,e,r,a,i,n,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=i.getSize(),h=t.get("align"),f=t.get("verticalAlign"),c=o&&o.getBoundingRect().clone();if(o&&c.applyTransform(o.transform),typeof e=="function"&&(e=e([r,a],n,i.el,c,{viewSize:[s,l],contentSize:u.slice()})),z(e))r=uA(e[0],s),a=uA(e[1],l);else if(lt(e)){e.width=u[0],e.height=u[1];var v=qt(e,{width:s,height:l});r=v.x,a=v.y,h=null,f=null}else if(typeof e=="string"&&o){var d=Wz(e,c,u);r=d[0],a=d[1]}else{var d=Hz(r,a,i,s,l,h?null:20,f?null:20);r=d[0],a=d[1]}if(h&&(r-=fA(h)?u[0]/2:h==="right"?u[0]:0),f&&(a-=fA(f)?u[1]/2:f==="bottom"?u[1]:0),t.get("confine")){var d=Fz(r,a,i,s,l);r=d[0],a=d[1]}i.moveTo(r,a)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,r=!!e&&e.length===t.length;return r&&$s(e,function(a,i){var n=a.dataByAxis||{},o=t[i]||{},s=o.dataByAxis||[];r&=n.length===s.length,r&&$s(n,function(l,u){var h=s[u]||{},f=l.seriesDataIndices||[],c=h.seriesDataIndices||[];r&=l.value===h.value&&l.axisType===h.axisType&&l.axisId===h.axisId&&f.length===c.length,r&&$s(f,function(v,d){var g=c[d];r&=v.seriesIndex===g.seriesIndex&&v.dataIndex===g.dataIndex})})}),this._lastDataByCoordSys=t,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){G.node||(this._tooltipContent.dispose(),Ng("itemTooltip",e))}});function up(t){for(var e=t.pop();t.length;){var r=t.pop();r&&(_t.isInstance(r)&&(r=r.get("tooltip",!0)),typeof r=="string"&&(r={formatter:r}),e=new _t(r,e,e.ecModel))}return e}function hA(t,e){return t.dispatchAction||it(e.dispatchAction,e)}function Hz(t,e,r,a,i,n,o){var s=r.getOuterSize(),l=s.width,u=s.height;return n!=null&&(t+l+n>a?t-=l+n:t+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function Fz(t,e,r,a,i){var n=r.getOuterSize(),o=n.width,s=n.height;return t=Math.min(t+o,a)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Wz(t,e,r){var a=r[0],i=r[1],n=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-a/2,s=e.y+u/2-i/2;break;case"top":o=e.x+l/2-a/2,s=e.y-i-n;break;case"bottom":o=e.x+l/2-a/2,s=e.y+u+n;break;case"left":o=e.x-a-n,s=e.y+u/2-i/2;break;case"right":o=e.x+l+n,s=e.y+u/2-i/2}return[o,s]}function fA(t){return t==="center"||t==="middle"}mt({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),mt({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var Uz=["rect","polygon","keep","clear"],$z=function(t,e){var r=t&&t.brush;if(z(r)||(r=r?[r]:[]),!!r.length){var a=[];M(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=t&&t.toolbox;z(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),Zz(s),e&&!s.length&&s.push.apply(s,Uz)}};function Zz(t){var e={};M(t,function(r){e[r]=1}),t.length=0,M(e,function(r,a){t.push(a)})}var cA=M;function vA(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function hp(t,e,r){var a={};return cA(e,function(n){var o=a[n]=i();cA(t[n],function(s,l){if(!!Mt.isValidType(l)){var u={type:l,visual:s};r&&r(u,n),o[l]=new Mt(u),l==="opacity"&&(u=rt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Mt(u))}})}),a;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function dA(t,e,r){var a;M(r,function(i){e.hasOwnProperty(i)&&vA(e[i])&&(a=!0)}),a&&M(r,function(i){e.hasOwnProperty(i)&&vA(e[i])?t[i]=rt(e[i]):delete t[i]})}function Yz(t,e,r,a,i,n){var o={};M(t,function(f){var c=Mt.prepareVisualTypes(e[f]);o[f]=c});var s;function l(f){return r.getItemVisual(s,f)}function u(f,c){r.setItemVisual(s,f,c)}n==null?r.each(h):r.each([n],h);function h(f,c){s=n==null?f:c;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var d=a.call(i,f),g=e[d],p=o[d],m=0,y=p.length;m<y;m++){var _=p[m];g[_]&&g[_].applyVisual(f,l,u)}}}function Xz(t,e,r,a){var i={};M(t,function(o){var s=Mt.prepareVisualTypes(e[o]);i[o]=s});function n(o,s){a!=null&&(a=s.getDimension(a));function l(_){return s.getItemVisual(h,_)}function u(_,w){s.setItemVisual(h,_,w)}for(var h;(h=o.next())!=null;){var f=s.getRawDataItem(h);if(!(f&&f.visualMap===!1))for(var c=a!=null?s.get(a,h,!0):h,v=r(c),d=e[v],g=i[v],p=0,m=g.length;p<m;p++){var y=g[p];d[y]&&d[y].applyVisual(c,l,u)}}}return{progress:n}}var fp={lineX:gA(0),lineY:gA(1),rect:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])},rect:function(t,e,r){return t&&r.boundingRect.intersect(t)}},polygon:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])&&Mi(r.range,t[0],t[1])},rect:function(t,e,r){var a=r.range;if(!t||a.length<=1)return!1;var i=t.x,n=t.y,o=t.width,s=t.height,l=a[0];if(Mi(a,i,n)||Mi(a,i+o,n)||Mi(a,i,n+s)||Mi(a,i+o,n+s)||vt.create(t).contain(l[0],l[1])||Fo(i,n,i+o,n,a)||Fo(i,n,i,n+s,a)||Fo(i+o,n,i+o,n+s,a)||Fo(i,n+s,i+o,n+s,a))return!0}}};function gA(t){var e=["x","y"],r=["width","height"];return{point:function(a,i,n){if(a){var o=n.range,s=a[t];return Zs(s,o)}},rect:function(a,i,n){if(a){var o=n.range,s=[a[e[t]],a[e[t]]+a[r[t]]];return s[1]<s[0]&&s.reverse(),Zs(s[0],o)||Zs(s[1],o)||Zs(o[0],s)||Zs(o[1],s)}}}}function Zs(t,e){return e[0]<=t&&t<=e[1]}var pA=["inBrush","outOfBrush"],cp="__ecBrushSelect",vp="__ecInBrushSelectEvent",mA=Wr.VISUAL.BRUSH;Gt(mA,function(t,e,r){t.eachComponent({mainType:"brush"},function(a){r&&r.type==="takeGlobalCursor"&&a.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),yA(t)});function yA(t){t.eachComponent({mainType:"brush"},function(e){var r=e.brushTargetManager=new Bh(e.option,t);r.setInputRanges(e.areas,t)})}Rt(mA,function(t,e,r){var a=[],i,n;t.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:rt(o.areas),selected:[]};a.push(l);var u=o.option,h=u.brushLink,f=[],c=[],v=[],d=0;s||(i=u.throttleType,n=u.throttleDelay);var g=V(o.areas,function(b){return Qz(J({boundingRect:Jz[b.brushType](b)},b))}),p=hp(o.option,pA,function(b){b.mappingMethod="fixed"});z(h)&&M(h,function(b){f[b]=1});function m(b){return h==="all"||f[b]}function y(b){return!!b.length}t.eachSeries(function(b,A){var S=v[A]=[];b.subType==="parallel"?_(b,A,S):w(b,A,S)});function _(b,A){var S=b.coordinateSystem;d|=S.hasAxisBrushed(),m(A)&&S.eachActiveState(b.getData(),function(D,I){D==="active"&&(c[I]=1)})}function w(b,A,S){var D=xA(b);if(!(!D||jz(o,A))&&(M(g,function(L){D[L.brushType]&&o.brushTargetManager.controlSeries(L,b,t)&&S.push(L),d|=y(S)}),m(A)&&y(S))){var I=b.getData();I.each(function(L){_A(D,S,I,L)&&(c[L]=1)})}}t.eachSeries(function(b,A){var S={seriesId:b.id,seriesIndex:A,seriesName:b.name,dataIndex:[]};l.selected.push(S);var D=xA(b),I=v[A],L=b.getData(),P=m(A)?function(R){return c[R]?(S.dataIndex.push(L.getRawIndex(R)),"inBrush"):"outOfBrush"}:function(R){return _A(D,I,L,R)?(S.dataIndex.push(L.getRawIndex(R)),"inBrush"):"outOfBrush"};(m(A)?d:y(I))&&Yz(pA,p,L,P)})}),qz(e,i,n,a,r)});function qz(t,e,r,a,i){if(!!i){var n=t.getZr();if(!n[vp]){n[cp]||(n[cp]=Kz);var o=es(n,cp,r,e);o(t,a)}}}function Kz(t,e){if(!t.isDisposed()){var r=t.getZr();r[vp]=!0,t.dispatchAction({type:"brushSelect",batch:e}),r[vp]=!1}}function _A(t,e,r,a){for(var i=0,n=e.length;i<n;i++){var o=e[i];if(t[o.brushType](a,r,o.selectors,o))return!0}}function xA(t){var e=t.brushSelector;if(Lt(e)){var r=[];return M(fp,function(i,n){r[n]=function(o,s,l,u){var h=s.getItemLayout(o);return i[e](h,l,u)}}),r}else if(se(e)){var a={};return M(fp,function(i,n){a[n]=e}),a}return e}function jz(t,e){var r=t.option.seriesIndex;return r!=null&&r!=="all"&&(z(r)?yt(r,e)<0:e!==r)}function Qz(t){var e=t.selectors={};return M(fp[t.brushType],function(r,a){e[a]=function(i){return r(i,e,t)}}),t}var Jz={lineX:ce,lineY:ce,rect:function(t){return wA(t.range)},polygon:function(t){for(var e,r=t.range,a=0,i=r.length;a<i;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var n=r[a];n[0]<e[0][0]&&(e[0][0]=n[0]),n[0]>e[0][1]&&(e[0][1]=n[0]),n[1]<e[1][0]&&(e[1][0]=n[1]),n[1]>e[1][1]&&(e[1][1]=n[1])}return e&&wA(e)}};function wA(t){return new vt(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var tB=["#ddd"],t3=Ze({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var r=this.option;!e&&dA(r,t,["inBrush","outOfBrush"]);var a=r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:tB},a.hasOwnProperty("liftZ")||(a.liftZ=5)},setAreas:function(t){T&&(gt(z(t)),M(t,function(e){gt(e.brushType,"Illegal areas")})),t&&(this.areas=V(t,function(e){return bA(this.option,e)},this))},setBrushOption:function(t){this.brushOption=bA(this.option,t),this.brushType=this.brushOption.brushType}});function bA(t,e){return ut({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new _t(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}he({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new ro(e.getZr())).on("brush",it(this._onBrush,this)).mount()},render:function(t){return this.model=t,dp.apply(this,arguments)},updateTransform:function(t,e){return yA(e),dp.apply(this,arguments)},updateView:dp,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var r=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:rt(t),$from:r}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:rt(t),$from:r})}});function dp(t,e,r,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(r)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}mt({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(r){r.setAreas(t.areas)})}),mt({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),mt({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var eB=ua.toolbox.brush;function gp(t,e,r){this.model=t,this.ecModel=e,this.api=r,this._brushType,this._brushMode}gp.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],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:rt(eB.title)};var Vh=gp.prototype;Vh.render=Vh.updateView=function(t,e,r){var a,i,n;e.eachComponent({mainType:"brush"},function(o){a=o.brushType,i=o.brushOption.brushMode||"single",n|=o.areas.length}),this._brushType=a,this._brushMode=i,M(t.get("type",!0),function(o){t.setIconStatus(o,(o==="keep"?i==="multiple":o==="clear"?n:o===a)?"emphasis":"normal")})},Vh.getIcons=function(){var t=this.model,e=t.get("icon",!0),r={};return M(t.get("type",!0),function(a){e[a]&&(r[a]=e[a])}),r},Vh.onclick=function(t,e,r){var a=this._brushType,i=this._brushMode;r==="clear"?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:r==="keep"?a:a===r?!1:r,brushMode:r==="keep"?i==="multiple"?"single":"multiple":i}})},io("brush",gp),we($z),Ze({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),he({type:"title",render:function(t,e,r){if(this.group.removeAll(),!!t.get("show")){var a=this.group,i=t.getModel("textStyle"),n=t.getModel("subtextStyle"),o=t.get("textAlign"),s=Xt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new dt({style:$t({},i,{text:t.get("text"),textFill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),f=new dt({style:$t({},n,{text:h,textFill:n.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),c=t.get("link"),v=t.get("sublink"),d=t.get("triggerEvent",!0);l.silent=!c&&!d,f.silent=!v&&!d,c&&l.on("click",function(){Zo(c,"_"+t.get("target"))}),v&&f.on("click",function(){Zo(c,"_"+t.get("subtarget"))}),l.eventData=f.eventData=d?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(l),h&&a.add(f);var g=a.getBoundingRect(),p=t.getBoxLayoutParams();p.width=g.width,p.height=g.height;var m=qt(p,{width:r.getWidth(),height:r.getHeight()},t.get("padding"));o||(o=t.get("left")||t.get("right"),o==="middle"&&(o="center"),o==="right"?m.x+=m.width:o==="center"&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),s==="center"&&(s="middle"),s==="bottom"?m.y+=m.height:s==="middle"&&(m.y+=m.height/2),s=s||"top"),a.attr("position",[m.x,m.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),f.setStyle(y),g=a.getBoundingRect();var _=m.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var b=new xt({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(b)}}});var rB=function(t){var e=t&&t.timeline;z(e)||(e=e?[e]:[]),M(e,function(r){!r||aB(r)})};function aB(t){var e=t.type,r={number:"value",time:"time"};if(r[e]&&(t.axisType=r[e],delete t.type),SA(t),Xi(t,"controlPosition")){var a=t.controlStyle||(t.controlStyle={});Xi(a,"position")||(a.position=t.controlPosition),a.position==="none"&&!Xi(a,"show")&&(a.show=!1,delete a.position),delete t.controlPosition}M(t.data||[],function(i){lt(i)&&!z(i)&&(!Xi(i,"value")&&Xi(i,"name")&&(i.value=i.name),SA(i))})}function SA(t){var e=t.itemStyle||(t.itemStyle={}),r=e.emphasis||(e.emphasis={}),a=t.label||t.label||{},i=a.normal||(a.normal={}),n={normal:1,emphasis:1};M(a,function(o,s){!n[s]&&!Xi(i,s)&&(i[s]=o)}),r.label&&!Xi(a,"emphasis")&&(a.emphasis=r.label,delete r.label)}function Xi(t,e){return t.hasOwnProperty(e)}wt.registerSubTypeDefaulter("timeline",function(){return"slider"}),mt({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var r=e.getComponent("timeline");return r&&t.currentIndex!=null&&(r.setCurrentIndex(t.currentIndex),!r.get("loop",!0)&&r.isIndexMax()&&r.setPlayState(!1)),e.resetOption("timeline"),J({currentIndex:r.option.currentIndex},t)}),mt({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var r=e.getComponent("timeline");r&&t.playState!=null&&r.setPlayState(t.playState)});var AA=wt.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,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:[]},init:function(t,e,r){this._data,this._names,this.mergeDefaultAndTheme(t,r),this._initData()},mergeOption:function(t){AA.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){t==null&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],r=t.axisType,a=this._names=[];if(r==="category"){var i=[];M(e,function(s,l){var u=Io(s),h;lt(s)?(h=rt(s),h.value=l):h=l,i.push(h),!Lt(u)&&(u==null||isNaN(u))&&(u=""),a.push(u+"")}),e=i}var n={category:"ordinal",time:"time"}[r]||"number",o=this._data=new fe([{name:"value",type:n}],this);o.initData(e,a)},getData:function(){return this._data},getCategories:function(){if(this.get("axisType")==="category")return this._names.slice()}}),iB=AA.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,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:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});Dt(iB,Av);var nB=Fr.extend({type:"timeline"}),Gh=function(t,e,r,a){Qt.call(this,t,e,r),this.type=a||"value",this.model=null};Gh.prototype={constructor:Gh,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return this.model.get("orient")==="horizontal"}},It(Gh,Qt);var ei=it,pp=M,mp=Math.PI;nB.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,r,a){if(this.model=t,this.api=r,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,r),n=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(i,t);t.formatTooltip=function(l){return kt(s.scale.getLabel(l))},pp(["AxisLine","AxisTick","Control","CurrentPointer"],function(l){this["_render"+l](i,n,s,t)},this),this._renderAxisLabel(i,o,s,t),this._position(i,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var r=t.get("label.position"),a=t.get("orient"),i=oB(t,e);r==null||r==="auto"?r=a==="horizontal"?i.y+i.height/2<e.getHeight()/2?"-":"+":i.x+i.width/2<e.getWidth()/2?"+":"-":isNaN(r)&&(r={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][r]);var n={horizontal:"center",vertical:r>=0||r==="+"?"left":"right"},o={horizontal:r>=0||r==="+"?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:mp/2},l=a==="vertical"?i.height:i.width,u=t.getModel("controlStyle"),h=u.get("show",!0),f=h?u.get("itemSize"):0,c=h?u.get("itemGap"):0,v=f+c,d=t.get("label.rotate")||0;d=d*mp/180;var g,p,m,y,_=u.get("position",!0),w=h&&u.get("showPlayBtn",!0),b=h&&u.get("showPrevBtn",!0),A=h&&u.get("showNextBtn",!0),S=0,D=l;return _==="left"||_==="bottom"?(w&&(g=[0,0],S+=v),b&&(p=[S,0],S+=v),A&&(m=[D-f,0],D-=v)):(w&&(g=[D-f,0],D-=v),b&&(p=[0,0],S+=v),A&&(m=[D-f,0],D-=v)),y=[S,D],t.get("inverse")&&y.reverse(),{viewRect:i,mainLength:l,orient:a,rotation:s[a],labelRotation:d,labelPosOpt:r,labelAlign:t.get("label.align")||n[a],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||o[a],playPosition:g,prevBtnPosition:p,nextBtnPosition:m,axisExtent:y,controlSize:f,controlGap:c}},_position:function(t,e){var r=this._mainGroup,a=this._labelGroup,i=t.viewRect;if(t.orient==="vertical"){var n=Ie(),o=i.x,s=i.y+i.height;yr(n,n,[-o,-s]),aa(n,n,-mp/2),yr(n,n,[o,s]),i=i.clone(),i.applyTransform(n)}var l=p(i),u=p(r.getBoundingRect()),h=p(a.getBoundingRect()),f=r.position,c=a.position;c[0]=f[0]=l[0][0];var v=t.labelPosOpt;if(isNaN(v)){var d=v==="+"?0:1;m(f,u,l,1,d),m(c,h,l,1,1-d)}else{var d=v>=0?0:1;m(f,u,l,1,d),c[1]=f[1]+v}r.attr("position",f),a.attr("position",c),r.rotation=a.rotation=t.rotation,g(r),g(a);function g(y){var _=y.position;y.origin=[l[0][0]-_[0],l[1][0]-_[1]]}function p(y){return[[y.x,y.x+y.width],[y.y,y.y+y.height]]}function m(y,_,w,b,A){y[b]+=w[b][A]-_[b][A]}},_createAxis:function(t,e){var r=e.getData(),a=e.get("axisType"),i=zn(e,a);i.getTicks=function(){return r.mapArray(["value"],function(s){return s})};var n=r.getDataExtent("value");i.setExtent(n[0],n[1]),i.niceTicks();var o=new Gh("value",i,t.axisExtent,a);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new q;return this.group.add(e),e},_renderAxisLine:function(t,e,r,a){var i=r.getExtent();!a.get("lineStyle.show")||e.add(new ye({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:et({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,r,a){var i=a.getData(),n=r.scale.getTicks();pp(n,function(o){var s=r.dataToCoord(o),l=i.getItemModel(o),u=l.getModel("itemStyle"),h=l.getModel("emphasis.itemStyle"),f={position:[s,0],onclick:ei(this._changeTimeline,this,o)},c=TA(l,u,e,f);Ot(c,h.getItemStyle()),l.get("tooltip")?(c.dataIndex=o,c.dataModel=a):c.dataIndex=c.dataModel=null},this)},_renderAxisLabel:function(t,e,r,a){var i=r.getLabelModel();if(!!i.get("show")){var n=a.getData(),o=r.getViewLabels();pp(o,function(s){var l=s.tickValue,u=n.getItemModel(l),h=u.getModel("label"),f=u.getModel("emphasis.label"),c=r.dataToCoord(s.tickValue),v=new dt({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:ei(this._changeTimeline,this,l),silent:!1});$t(v.style,h,{text:s.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(v),Ot(v,$t({},f))},this)}},_renderControl:function(t,e,r,a){var i=t.controlSize,n=t.rotation,o=a.getModel("controlStyle").getItemStyle(),s=a.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-i/2,i,i],u=a.getPlayState(),h=a.get("inverse",!0);f(t.nextBtnPosition,"controlStyle.nextIcon",ei(this._changeTimeline,this,h?"-":"+")),f(t.prevBtnPosition,"controlStyle.prevIcon",ei(this._changeTimeline,this,h?"+":"-")),f(t.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),ei(this._handlePlayClick,this,!u),!0);function f(c,v,d,g){if(!!c){var p={position:c,origin:[i/2,0],rotation:g?-n:0,rectHover:!0,style:o,onclick:d},m=sB(a,v,l,p);e.add(m),Ot(m,s)}}},_renderCurrentPointer:function(t,e,r,a){var i=a.getData(),n=a.getCurrentIndex(),o=i.getItemModel(n).getModel("checkpointStyle"),s=this,l={onCreate:function(u){u.draggable=!0,u.drift=ei(s._handlePointerDrag,s),u.ondragend=ei(s._handlePointerDragend,s),CA(u,n,r,a,!0)},onUpdate:function(u){CA(u,n,r,a)}};this._currentPointer=TA(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,r){this._clearTimer(),this._pointerChangeTimeline([r.offsetX,r.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var r=this._toAxisCoord(t)[0],a=this._axis,i=_i(a.getExtent().slice());r>i[1]&&(r=i[1]),r<i[0]&&(r=i[0]),this._currentPointer.position[0]=r,this._currentPointer.dirty();var n=this._findNearestTick(r),o=this.model;(e||n!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(n)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(ei(t,this),this.model.get("playInterval")));function t(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return Hr(t,e,!0)},_findNearestTick:function(t){var e=this.model.getData(),r=1/0,a,i=this._axis;return e.each(["value"],function(n,o){var s=i.dataToCoord(n),l=Math.abs(s-t);l<r&&(r=l,a=o)}),a},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();t==="+"?t=e+1:t==="-"&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}});function oB(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function sB(t,e,r,a){var i=zo(t.get(e).replace(/^path:\/\//,""),rt(a||{}),new vt(r[0],r[1],r[2],r[3]),"center");return i}function TA(t,e,r,a,i,n){var o=e.get("color");if(i)i.setColor(o),r.add(i),n&&n.onUpdate(i);else{var s=t.get("symbol");i=Ye(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),r.add(i),n&&n.onCreate(i)}var l=e.getItemStyle(["color","symbol","symbolSize"]);i.setStyle(l),a=ut({rectHover:!0,z2:100},a,!0);var u=t.get("symbolSize");u=u instanceof Array?u.slice():[+u,+u],u[0]/=2,u[1]/=2,a.scale=u;var h=t.get("symbolOffset");if(h){var f=a.position=a.position||[0,0];f[0]+=H(h[0],u[0]),f[1]+=H(h[1],u[1])}var c=t.get("symbolRotate");return a.rotation=(c||0)*Math.PI/180||0,i.attr(a),i.updateTransform(),i}function CA(t,e,r,a,i){if(!t.dragging){var n=a.getModel("checkpointStyle"),o=r.dataToCoord(a.getData().get(["value"],e));i||!n.get("animation",!0)?t.attr({position:[o,0]}):(t.stopAnimation(!0),t.animateTo({position:[o,0]},n.get("animationDuration",!0),n.get("animationEasing",!0)))}}we(rB);var DA=ka,yp=kt;function Hh(t){fi(t,"label",["show"])}var Fh=Ze({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,r){if(T&&this.type==="marker")throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,r),this._mergeOption(t,r,!1,!0)},isAnimationEnabled:function(){if(G.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,r,a){var i=this.constructor,n=this.mainType+"Model";r||e.eachSeries(function(o){var s=o.get(this.mainType,!0),l=o[n];if(!s||!s.data){o[n]=null;return}l?l._mergeOption(s,e,!0):(a&&Hh(s),M(s.data,function(u){u instanceof Array?(Hh(u[0]),Hh(u[1])):Hh(u)}),l=new i(s,this,e),et(l,{mainType:this.mainType,seriesIndex:o.seriesIndex,name:o.name,createdBySelf:!0}),l.__hostSeries=o),o[n]=l},this)},formatTooltip:function(t){var e=this.getData(),r=this.getRawValue(t),a=z(r)?V(r,DA).join(", "):DA(r),i=e.getName(t),n=yp(this.name);return(r!=null||i)&&(n+="<br />"),i&&(n+=yp(i),r!=null&&(n+=" : ")),r!=null&&(n+=yp(a)),n},getData:function(){return this._data},setData:function(t){this._data=t}});Dt(Fh,Av),Fh.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var MA=yt;function lB(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function uB(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function _p(t,e,r,a,i,n){var o=[],s=fa(e,a),l=s?e.getCalculationInfo("stackResultDimension"):a,u=bp(e,l,t),h=e.indicesOfNearest(l,u)[0];o[i]=e.get(r,h),o[n]=e.get(l,h);var f=e.get(a,h),c=gy(e.get(a,h));return c=Math.min(c,20),c>=0&&(o[n]=+o[n].toFixed(c)),[o,f]}var xp=ot,wp={min:xp(_p,"min"),max:xp(_p,"max"),average:xp(_p,"average")};function Ys(t,e){var r=t.getData(),a=t.coordinateSystem;if(e&&!uB(e)&&!z(e.coord)&&a){var i=a.dimensions,n=IA(e,r,a,t);if(e=rt(e),e.type&&wp[e.type]&&n.baseAxis&&n.valueAxis){var o=MA(i,n.baseAxis.dim),s=MA(i,n.valueAxis.dim),l=wp[e.type](r,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],h=0;h<2;h++)wp[u[h]]&&(u[h]=bp(r,r.mapDimension(i[h]),u[h]));e.coord=u}}return e}function IA(t,e,r,a){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(hB(a,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function hB(t,e){var r=t.getData(),a=r.dimensions;e=r.getDimension(e);for(var i=0;i<a.length;i++){var n=r.getDimensionInfo(a[i]);if(n.name===e)return n.coordDim}}function Xs(t,e){return t&&t.containData&&e.coord&&!lB(e)?t.containData(e.coord):!0}function LA(t,e,r,a){return a<2?t.coord&&t.coord[a]:t.value}function bp(t,e,r){if(r==="average"){var a=0,i=0;return t.each(e,function(n,o){isNaN(n)||(a+=n,i++)}),a/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e,!0)[r==="max"?1:0]}var Sp=he({type:"marker",init:function(){this.markerGroupMap=ht()},render:function(t,e,r){var a=this.markerGroupMap;a.each(function(n){n.__keep=!1});var i=this.type+"Model";e.eachSeries(function(n){var o=n[i];o&&this.renderSeries(n,o,e,r)},this),a.each(function(n){!n.__keep&&this.group.remove(n.group)},this)},renderSeries:function(){}});function PA(t,e,r){var a=e.coordinateSystem;t.each(function(i){var n=t.getItemModel(i),o,s=H(n.get("x"),r.getWidth()),l=H(n.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,i));else if(a){var u=t.get(a.dimensions[0],i),h=t.get(a.dimensions[1],i);o=a.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(i,o)})}Sp.extend({type:"markPoint",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markPointModel;i&&(PA(i.getData(),a,r),this.markerGroupMap.get(a.id).updateLayout(i))},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new Bn),u=fB(i,t,e);e.setData(u),PA(e.getData(),t,a),u.each(function(h){var f=u.getItemModel(h),c=f.getShallow("symbol"),v=f.getShallow("symbolSize"),d=se(c),g=se(v);if(d||g){var p=e.getRawValue(h),m=e.getDataParams(h);d&&(c=c(p,m)),g&&(v=v(p,m))}u.setItemVisual(h,{symbol:c,symbolSize:v,color:f.get("itemStyle.color")||o.getVisual("color")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(h){h.traverse(function(f){f.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}});function fB(t,e,r){var a;t?a=V(t&&t.dimensions,function(o){var s=e.getData().getDimensionInfo(e.getData().mapDimension(o))||{};return J({name:o},s)}):a=[{name:"value",type:"float"}];var i=new fe(a,r),n=V(r.get("data"),ot(Ys,e));return t&&(n=ee(n,ot(Xs,t))),i.initData(n,null,t?LA:function(o){return o.value}),i}we(function(t){t.markPoint=t.markPoint||{}}),Fh.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var cB=function(t,e,r,a){var i=t.getData(),n=a.type;if(!z(a)&&(n==="min"||n==="max"||n==="average"||n==="median"||a.xAxis!=null||a.yAxis!=null)){var o,s;if(a.yAxis!=null||a.xAxis!=null)o=e.getAxis(a.yAxis!=null?"y":"x"),s=Ut(a.yAxis,a.xAxis);else{var l=IA(a,i,e,t);o=l.valueAxis;var u=fs(i,l.valueDataDim);s=bp(i,u,n)}var h=o.dim==="x"?0:1,f=1-h,c=rt(a),v={};c.type=null,c.coord=[],v.coord=[],c.coord[f]=-1/0,v.coord[f]=1/0;var d=r.get("precision");d>=0&&typeof s=="number"&&(s=+s.toFixed(Math.min(d,20))),c.coord[h]=v.coord[h]=s,a=[c,v,{type:n,valueIndex:a.valueIndex,value:s}]}return a=[Ys(t,a[0]),Ys(t,a[1]),et({},a[2])],a[2].type=a[2].type||"",ut(a[2],a[0]),ut(a[2],a[1]),a};function Wh(t){return!isNaN(t)&&!isFinite(t)}function EA(t,e,r,a){var i=1-t,n=a.dimensions[t];return Wh(e[i])&&Wh(r[i])&&e[t]===r[t]&&a.getAxis(n).containData(e[t])}function vB(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,a=e[1].coord;if(r&&a&&(EA(1,r,a,t)||EA(0,r,a,t)))return!0}return Xs(t,e[0])&&Xs(t,e[1])}function Ap(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=H(o.get("x"),i.getWidth()),u=H(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=n.dimensions,f=t.get(h[0],e),c=t.get(h[1],e);s=n.dataToPoint([f,c])}if(n.type==="cartesian2d"){var v=n.getAxis("x"),d=n.getAxis("y"),h=n.dimensions;Wh(t.get(h[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):Wh(t.get(h[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}Sp.extend({type:"markLine",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markLineModel;if(i){var n=i.getData(),o=i.__from,s=i.__to;o.each(function(l){Ap(o,l,!0,a,r),Ap(s,l,!1,a,r)}),n.each(function(l){n.setItemLayout(l,[o.getItemLayout(l),s.getItemLayout(l)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new oh);this.group.add(l.group);var u=dB(i,t,e),h=u.from,f=u.to,c=u.line;e.__from=h,e.__to=f,e.setData(c);var v=e.get("symbol"),d=e.get("symbolSize");z(v)||(v=[v,v]),typeof d=="number"&&(d=[d,d]),u.from.each(function(p){g(h,p,!0),g(f,p,!1)}),c.each(function(p){var m=c.getItemModel(p).get("lineStyle.color");c.setItemVisual(p,{color:m||h.getItemVisual(p,"color")}),c.setItemLayout(p,[h.getItemLayout(p),f.getItemLayout(p)]),c.setItemVisual(p,{fromSymbolSize:h.getItemVisual(p,"symbolSize"),fromSymbol:h.getItemVisual(p,"symbol"),toSymbolSize:f.getItemVisual(p,"symbolSize"),toSymbol:f.getItemVisual(p,"symbol")})}),l.updateData(c),u.line.eachItemGraphicEl(function(p,m){p.traverse(function(y){y.dataModel=e})});function g(p,m,y){var _=p.getItemModel(m);Ap(p,m,y,t,a),p.setItemVisual(m,{symbolSize:_.get("symbolSize")||d[y?0:1],symbol:_.get("symbol",!0)||v[y?0:1],color:_.get("itemStyle.color")||o.getVisual("color")})}l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}});function dB(t,e,r){var a;t?a=V(t&&t.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J({name:u},h)}):a=[{name:"value",type:"float"}];var i=new fe(a,r),n=new fe(a,r),o=new fe([],r),s=V(r.get("data"),ot(cB,e,t,r));t&&(s=ee(s,ot(vB,t)));var l=t?LA:function(u){return u.value};return i.initData(V(s,function(u){return u[0]}),null,l),n.initData(V(s,function(u){return u[1]}),null,l),o.initData(V(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}we(function(t){t.markLine=t.markLine||{}}),Fh.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var gB=function(t,e,r,a){var i=Ys(t,a[0]),n=Ys(t,a[1]),o=Ut,s=i.coord,l=n.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=go([{},i,n]);return u.coord=[i.coord,n.coord],u.x0=i.x,u.y0=i.y,u.x1=n.x,u.y1=n.y,u};function Uh(t){return!isNaN(t)&&!isFinite(t)}function RA(t,e,r,a){var i=1-t;return Uh(e[i])&&Uh(r[i])}function pB(t,e){var r=e.coord[0],a=e.coord[1];return t.type==="cartesian2d"&&r&&a&&(RA(1,r,a,t)||RA(0,r,a,t))?!0:Xs(t,{coord:r,x:e.x0,y:e.y0})||Xs(t,{coord:a,x:e.x1,y:e.y1})}function OA(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=H(o.get(r[0]),i.getWidth()),u=H(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(t.getValues(r,e));else{var h=t.get(r[0],e),f=t.get(r[1],e),c=[h,f];n.clampData&&n.clampData(c,c),s=n.dataToPoint(c,!0)}if(n.type==="cartesian2d"){var v=n.getAxis("x"),d=n.getAxis("y"),h=t.get(r[0],e),f=t.get(r[1],e);Uh(h)?s[0]=v.toGlobalCoord(v.getExtent()[r[0]==="x0"?0:1]):Uh(f)&&(s[1]=d.toGlobalCoord(d.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var NA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];Sp.extend({type:"markArea",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markAreaModel;if(i){var n=i.getData();n.each(function(o){var s=V(NA,function(u){return OA(n,o,u,a,r)});n.setItemLayout(o,s);var l=n.getItemGraphicEl(o);l.setShape("points",s)})}},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,{group:new q});this.group.add(l.group),l.__keep=!0;var u=mB(i,t,e);e.setData(u),u.each(function(h){u.setItemLayout(h,V(NA,function(f){return OA(u,h,f,t,a)})),u.setItemVisual(h,{color:o.getVisual("color")})}),u.diff(l.__data).add(function(h){var f=new Ge({shape:{points:u.getItemLayout(h)}});u.setItemGraphicEl(h,f),l.group.add(f)}).update(function(h,f){var c=l.__data.getItemGraphicEl(f);ft(c,{shape:{points:u.getItemLayout(h)}},e,h),l.group.add(c),u.setItemGraphicEl(h,c)}).remove(function(h){var f=l.__data.getItemGraphicEl(h);l.group.remove(f)}).execute(),u.eachItemGraphicEl(function(h,f){var c=u.getItemModel(f),v=c.getModel("label"),d=c.getModel("emphasis.label"),g=u.getItemVisual(f,"color");h.useStyle(J(c.getModel("itemStyle").getItemStyle(),{fill:gl(g,.4),stroke:g})),h.hoverStyle=c.getModel("emphasis.itemStyle").getItemStyle(),Fe(h.style,h.hoverStyle,v,d,{labelFetcher:e,labelDataIndex:f,defaultText:u.getName(f)||"",isRectText:!0,autoColor:g}),Ot(h,{}),h.dataModel=e}),l.__data=u,l.group.silent=e.get("silent")||t.get("silent")}});function mB(t,e,r){var a,i,n=["x0","y0","x1","y1"];t?(a=V(t&&t.dimensions,function(l){var u=e.getData(),h=u.getDimensionInfo(u.mapDimension(l))||{};return J({name:l},h)}),i=new fe(V(n,function(l,u){return{name:l,type:a[u%2].type}}),r)):(a=[{name:"value",type:"float"}],i=new fe(a,r));var o=V(r.get("data"),ot(gB,e,t,r));t&&(o=ee(o,ot(pB,t)));var s=t?function(l,u,h,f){return l.coord[Math.floor(f/2)][f%2]}:function(l){return l.value};return i.initData(o,null,s),i.hasItemOption=!0,i}we(function(t){t.markArea=t.markArea||{}});var kA=ua.legend.selector,yB={all:{type:"all",title:rt(kA.all)},inverse:{type:"inverse",title:rt(kA.inverse)}},zA=Ze({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,r){this.mergeDefaultAndTheme(t,r),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){zA.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),z(e)&&M(e,function(r,a){Lt(r)&&(r={type:r}),e[a]=ut(r,yB[r.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var e=!1,r=0;r<t.length;r++){var a=t[r].get("name");if(this.isSelected(a)){this.select(a),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],r=[];t.eachRawSeries(function(n){var o=n.name;r.push(o);var s;if(n.legendVisualProvider){var l=n.legendVisualProvider,u=l.getAllNames();t.isSeriesFiltered(n)||(r=r.concat(u)),u.length?e=e.concat(u):s=!0}else s=!0;s&&Pc(n)&&e.push(n.name)}),this._availableNames=r;var a=this.get("data")||e,i=V(a,function(n){return(typeof n=="string"||typeof n=="number")&&(n={name:n}),new _t(n,this,this.ecModel)},this);this._data=i},getData:function(){return this._data},select:function(t){var e=this.option.selected,r=this.get("selectedMode");if(r==="single"){var a=this._data;M(a,function(i){e[i.get("name")]=!1})}e[t]=!0},unSelect:function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this._data,e=this.option.selected;M(t,function(r){e[r.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,e=this.option.selected;M(t,function(r){var a=r.get("name",!0);e.hasOwnProperty(a)||(e[a]=!0),e[a]=!e[a]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&yt(this._availableNames,t)>=0},getOrient:function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,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,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},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}}});function qs(t,e,r){var a={},i=t==="toggleSelected",n;return r.eachComponent("legend",function(o){i&&n!=null?o[n?"select":"unSelect"](e.name):t==="allSelect"||t==="inverseSelect"?o[t]():(o[t](e.name),n=o.isSelected(e.name));var s=o.getData();M(s,function(l){var u=l.get("name");if(!(u===`
`||u==="")){var h=o.isSelected(u);a.hasOwnProperty(u)?a[u]=a[u]&&h:a[u]=h}})}),t==="allSelect"||t==="inverseSelect"?{selected:a}:{name:e.name,selected:a}}mt("legendToggleSelect","legendselectchanged",ot(qs,"toggleSelected")),mt("legendAllSelect","legendselectall",ot(qs,"allSelect")),mt("legendInverseSelect","legendinverseselect",ot(qs,"inverseSelect")),mt("legendSelect","legendselected",ot(qs,"select")),mt("legendUnSelect","legendunselected",ot(qs,"unSelect"));var lo=ot,BA=M,$h=q,_B=he({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new $h),this._backgroundEl,this.group.add(this._selectorGroup=new $h),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,r){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var i=t.get("align"),n=t.get("orient");(!i||i==="auto")&&(i=t.get("left")==="right"&&n==="vertical"?"right":"left");var o=t.get("selector",!0),s=t.get("selectorPosition",!0);o&&(!s||s==="auto")&&(s=n==="horizontal"?"end":"start"),this.renderInner(i,t,e,r,o,n,s);var l=t.getBoxLayoutParams(),u={width:r.getWidth(),height:r.getHeight()},h=t.get("padding"),f=qt(l,u,h),c=this.layoutInner(t,i,f,a,o,s),v=qt(J({width:c.width,height:c.height},l),u,h);this.group.attr("position",[v.x-c.x,v.y-c.y]),this.group.add(this._backgroundEl=GS(c,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,r,a,i,n,o){var s=this.getContentGroup(),l=ht(),u=e.get("selectedMode"),h=[];r.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),BA(e.getData(),function(f,c){var v=f.get("name");if(!this.newlineDisabled&&(v===""||v===`
`)){s.add(new $h({newline:!0}));return}var d=r.getSeriesByName(v)[0];if(!l.get(v)){if(d){var g=d.getData(),p=g.getVisual("color"),m=g.getVisual("borderColor");typeof p=="function"&&(p=p(d.getDataParams(0))),typeof m=="function"&&(m=m(d.getDataParams(0)));var y=g.getVisual("legendSymbol")||"roundRect",_=g.getVisual("symbol"),w=this._createItem(v,c,f,e,y,_,t,p,m,u);w.on("click",lo(GA,v,null,a,h)).on("mouseover",lo(Tp,d.name,null,a,h)).on("mouseout",lo(Cp,d.name,null,a,h)),l.set(v,!0)}else r.eachRawSeries(function(b){if(!l.get(v)&&b.legendVisualProvider){var A=b.legendVisualProvider;if(!A.containName(v))return;var S=A.indexOfName(v),D=A.getItemVisual(S,"color"),I=A.getItemVisual(S,"borderColor"),L="roundRect",P=this._createItem(v,c,f,e,L,null,t,D,I,u);P.on("click",lo(GA,null,v,a,h)).on("mouseover",lo(Tp,null,v,a,h)).on("mouseout",lo(Cp,null,v,a,h)),l.set(v,!0)}},this);T&&(l.get(v)||console.warn(v+" series not exists. Legend data should be same with series name or data name."))}},this),i&&this._createSelector(i,e,a,n,o)},_createSelector:function(t,e,r,a,i){var n=this.getSelectorGroup();BA(t,function(s){o(s)});function o(s){var l=s.type,u=new dt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:l==="all"?"legendAllSelect":"legendInverseSelect"})}});n.add(u);var h=e.getModel("selectorLabel"),f=e.getModel("emphasis.selectorLabel");Fe(u.style,u.hoverStyle={},h,f,{defaultText:s.title,isRectText:!1}),Ot(u)}},_createItem:function(t,e,r,a,i,n,o,s,l,u){var h=a.get("itemWidth"),f=a.get("itemHeight"),c=a.get("inactiveColor"),v=a.get("inactiveBorderColor"),d=a.get("symbolKeepAspect"),g=a.getModel("itemStyle"),p=a.isSelected(t),m=new $h,y=r.getModel("textStyle"),_=r.get("icon"),w=r.getModel("tooltip"),b=w.parentModel;i=_||i;var A=Ye(i,0,0,h,f,p?s:c,d??!0);if(m.add(VA(A,i,g,l,v,p)),!_&&n&&(n!==i||n==="none")){var S=f*.8;n==="none"&&(n="circle");var D=Ye(n,(h-S)/2,(f-S)/2,S,S,p?s:c,d??!0);m.add(VA(D,n,g,l,v,p))}var I=o==="left"?h+5:-5,L=o,P=a.get("formatter"),R=t;typeof P=="string"&&P?R=P.replace("{name}",t??""):typeof P=="function"&&(R=P(t)),m.add(new dt({style:$t({},y,{text:R,x:I,y:f/2,textFill:p?y.getTextColor():c,textAlign:L,textVerticalAlign:"middle"})}));var E=new xt({shape:m.getBoundingRect(),invisible:!0,tooltip:w.get("show")?et({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:a.componentIndex,name:t,$vars:["name"]}},w.option):null});return m.add(E),m.eachChild(function(Z){Z.silent=!0}),E.silent=!u,this.getContentGroup().add(m),Ot(m),m.__legendDataIndex=e,m},layoutInner:function(t,e,r,a,i,n){var o=this.getContentGroup(),s=this.getSelectorGroup();bi(t.get("orient"),o,t.get("itemGap"),r.width,r.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(i){bi("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),f=[-h.x,-h.y],c=t.get("selectorButtonGap",!0),v=t.getOrient().index,d=v===0?"width":"height",g=v===0?"height":"width",p=v===0?"y":"x";n==="end"?f[v]+=l[d]+c:u[v]+=h[d]+c,f[1-v]+=l[g]/2-h[g]/2,s.attr("position",f),o.attr("position",u);var m={x:0,y:0};return m[d]=l[d]+c+h[d],m[g]=Math.max(l[g],h[g]),m[p]=Math.min(0,h[p]+f[1-v]),m}else return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function VA(t,e,r,a,i,n){var o;return e!=="line"&&e.indexOf("empty")<0?(o=r.getItemStyle(),t.style.stroke=a,n||(o.stroke=i)):o=r.getItemStyle(["borderWidth","borderColor"]),t.setStyle(o)}function GA(t,e,r,a){Cp(t,e,r,a),r.dispatchAction({type:"legendToggleSelect",name:t??e}),Tp(t,e,r,a)}function Tp(t,e,r,a){var i=r.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:a})}function Cp(t,e,r,a){var i=r.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:a})}var xB=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var a=0;a<e.length;a++)if(!e[a].isSelected(r.name))return!1;return!0})};$e(Wr.PROCESSOR.SERIES_FILTER,xB),wt.registerSubTypeDefaulter("legend",function(){return"plain"});var HA=zA.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,r,a){var i=Cn(t);HA.superCall(this,"init",t,e,r,a),FA(this,t,i)},mergeOption:function(t,e){HA.superCall(this,"mergeOption",t,e),FA(this,this.option,t)}});function FA(t,e,r){var a=t.getOrient(),i=[1,1];i[a.index]=0,za(e,r,{type:"box",ignoreSize:i})}var WA=q,Dp=["width","height"],Mp=["x","y"],Ip=_B.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){Ip.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new WA),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new WA),this._showController},resetInner:function(){Ip.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,r,a,i,n,o){var s=this;Ip.superCall(this,"renderInner",t,e,r,a,i,n,o);var l=this._controllerGroup,u=e.get("pageIconSize",!0);z(u)||(u=[u,u]),f("pagePrev",0);var h=e.getModel("pageTextStyle");l.add(new dt({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),f("pageNext",1);function f(c,v){var d=c+"DataIndex",g=Ho(e.get("pageIcons",!0)[e.getOrient().name][v],{onclick:it(s._pageGo,s,d,e,a)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});g.name=c,l.add(g)}},layoutInner:function(t,e,r,a,i,n){var o=this.getSelectorGroup(),s=t.getOrient().index,l=Dp[s],u=Mp[s],h=Dp[1-s],f=Mp[1-s];i&&bi("horizontal",o,t.get("selectorItemGap",!0));var c=t.get("selectorButtonGap",!0),v=o.getBoundingRect(),d=[-v.x,-v.y],g=rt(r);i&&(g[l]=r[l]-v[l]-c);var p=this._layoutContentAndController(t,a,g,s,l,h,f);if(i){if(n==="end")d[s]+=p[l]+c;else{var m=v[l]+c;d[s]-=m,p[u]-=m}p[l]+=v[l]+c,d[1-s]+=p[f]+p[h]/2-v[h]/2,p[h]=Math.max(p[h],v[h]),p[f]=Math.min(p[f],v[f]+d[1-s]),o.attr("position",d)}return p},_layoutContentAndController:function(t,e,r,a,i,n,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;bi(t.get("orient"),s,t.get("itemGap"),a?r.width:null,a?null:r.height),bi("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),f=u.getBoundingRect(),c=this._showController=h[i]>r[i],v=[-h.x,-h.y];e||(v[a]=s.position[a]);var d=[0,0],g=[-f.x,-f.y],p=Xt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(c){var m=t.get("pageButtonPosition",!0);m==="end"?g[a]+=r[i]-f[i]:d[a]+=f[i]+p}g[1-a]+=h[n]/2-f[n]/2,s.attr("position",v),l.attr("position",d),u.attr("position",g);var y={x:0,y:0};if(y[i]=c?r[i]:h[i],y[n]=Math.max(h[n],f[n]),y[o]=Math.min(0,f[o]+g[1-a]),l.__rectSize=r[i],c){var _={x:0,y:0};_[i]=Math.max(r[i]-f[i]-p,0),_[n]=y[n],l.setClipPath(new xt({shape:_})),l.__rectSize=_[i]}else u.eachChild(function(b){b.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&ft(s,{position:w.contentPosition},c?t:!1),this._updatePageInfoView(t,w),y},_pageGo:function(t,e,r){var a=this._getPageInfo(e)[t];a!=null&&r.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:e.id})},_updatePageInfoView:function(t,e){var r=this._controllerGroup;M(["pagePrev","pageNext"],function(l){var u=e[l+"DataIndex"]!=null,h=r.childOfName(l);h&&(h.setStyle("fill",u?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=u?"pointer":"default")});var a=r.childOfName("pageText"),i=t.get("pageFormatter"),n=e.pageIndex,o=n!=null?n+1:0,s=e.pageCount;a&&i&&a.setStyle("text",Lt(i)?i.replace("{current}",o).replace("{total}",s):i({current:o,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,i=t.getOrient().index,n=Dp[i],o=Mp[i],s=this._findTargetItemIndex(e),l=r.children(),u=l[s],h=l.length,f=h?1:0,c={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return c;var v=y(u);c.contentPosition[i]=-v.s;for(var d=s+1,g=v,p=v,m=null;d<=h;++d)m=y(l[d]),(!m&&p.e>g.s+a||m&&!_(m,g.s))&&(p.i>g.i?g=p:g=m,g&&(c.pageNextDataIndex==null&&(c.pageNextDataIndex=g.i),++c.pageCount)),p=m;for(var d=s-1,g=v,p=v,m=null;d>=-1;--d)m=y(l[d]),(!m||!_(p,m.s))&&g.i<p.i&&(p=g,c.pagePrevDataIndex==null&&(c.pagePrevDataIndex=g.i),++c.pageCount,++c.pageIndex),g=m;return c;function y(w){if(w){var b=w.getBoundingRect(),A=b[o]+w.position[i];return{s:A,e:A+b[n],i:w.__legendDataIndex}}}function _(w,b){return w.e>=b&&w.s<=b+a}},_findTargetItemIndex:function(t){if(!this._showController)return 0;var e,r=this.getContentGroup(),a;return r.eachChild(function(i,n){var o=i.__legendDataIndex;a==null&&o!=null&&(a=n),o===t&&(e=n)}),e??a}});mt("legendScroll","legendscroll",function(t,e){var r=t.scrollDataIndex;r!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(r)})});var e3=ap.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),Zh=xt,qi=Nt,Lp=_i,ma=it,Pp=M,UA=7,wB=1,Ep=30,Ks="horizontal",$A="vertical",bB=5,SB=["line","bar","candlestick","scatter"],Rp=ip.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,r,a){if(Rp.superApply(this,"render",arguments),es(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1){this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},remove:function(){Rp.superApply(this,"remove",arguments),e_(this,"_dispatchZoomAction")},dispose:function(){Rp.superApply(this,"dispose",arguments),e_(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new q;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,r=this._findCoordRect(),a={width:e.getWidth(),height:e.getHeight()},i=this._orient===Ks?{right:a.width-r.x-r.width,top:a.height-Ep-UA,width:r.width,height:Ep}:{right:UA,top:r.y,width:Ep,height:r.height},n=Cn(t.option);M(["right","top","width","height"],function(s){n[s]==="ph"&&(n[s]=i[s])});var o=qt(n,a,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===$A&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,r=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),i=a&&a.get("inverse"),n=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;n.attr(r===Ks&&!i?{scale:o?[1,1]:[1,-1]}:r===Ks&&i?{scale:o?[-1,1]:[-1,-1]}:r===$A&&!i?{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2});var s=t.getBoundingRect([n]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,r=this._displayables.barGroup;r.add(new Zh({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),r.add(new Zh({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:it(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(!!t){var e=this._size,r=t.series,a=r.getRawData(),i=r.getShadowDim?r.getShadowDim():t.otherDim;if(i!=null){var n=a.getDataExtent(i),o=(n[1]-n[0])*.3;n=[n[0]-o,n[1]+o];var s=[0,e[1]],l=[0,e[0]],u=[[e[0],0],[0,0]],h=[],f=l[1]/(a.count()-1),c=0,v=Math.round(a.count()/e[0]),d;a.each([i],function(p,m){if(v>0&&m%v){c+=f;return}var y=p==null||isNaN(p)||p==="",_=y?0:qi(p,n,s,!0);y&&!d&&m?(u.push([u[u.length-1][0],0]),h.push([h[h.length-1][0],0])):!y&&d&&(u.push([c,0]),h.push([c,0])),u.push([c,_]),h.push([c,_]),c+=f,d=y});var g=this.dataZoomModel;this._displayables.barGroup.add(new Ge({shape:{points:u},style:J({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new ir({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var r,a=this.ecModel;return t.eachTargetAxis(function(i,n){var o=t.getAxisProxy(i.name,n).getTargetSeriesModels();M(o,function(s){if(!r&&!(e!==!0&&yt(SB,s.get("type"))<0)){var l=a.getComponent(i.axis,n).axis,u=AB(i.name),h,f=s.coordinateSystem;u!=null&&f.getOtherAxis&&(h=f.getOtherAxis(l).inverse),u=s.getData().mapDimension(u),r={thisAxis:l,series:s,thisDim:i.name,otherDim:u,otherAxisInverse:h}}},this)},this),r}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],r=t.handleLabels=[],a=this._displayables.barGroup,i=this._size,n=this.dataZoomModel;a.add(t.filler=new Zh({draggable:!0,cursor:ZA(this._orient),drift:ma(this._onDragMove,this,"all"),ondragstart:ma(this._showDataInfo,this,!0),ondragend:ma(this._onDragEnd,this),onmouseover:ma(this._showDataInfo,this,!0),onmouseout:ma(this._showDataInfo,this,!1),style:{fill:n.get("fillerColor"),textPosition:"inside"}})),a.add(new Zh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{stroke:n.get("dataBackgroundColor")||n.get("borderColor"),lineWidth:wB,fill:"rgba(0,0,0,0)"}})),Pp([0,1],function(o){var s=Ho(n.get("handleIcon"),{cursor:ZA(this._orient),draggable:!0,drift:ma(this._onDragMove,this,o),ondragend:ma(this._onDragEnd,this),onmouseover:ma(this._showDataInfo,this,!0),onmouseout:ma(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),l=s.getBoundingRect();this._handleHeight=H(n.get("handleSize"),this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(n.getModel("handleStyle").getItemStyle());var u=n.get("handleColor");u!=null&&(s.style.fill=u),a.add(e[o]=s);var h=n.textStyleModel;this.group.add(r[o]=new dt({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:h.getTextColor(),textFont:h.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[qi(t[0],[0,100],e,!0),qi(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var r=this.dataZoomModel,a=this._handleEnds,i=this._getViewExtent(),n=r.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];zi(e,a,i,r.get("zoomLock")?"all":t,n.minSpan!=null?qi(n.minSpan,o,i,!0):null,n.maxSpan!=null?qi(n.maxSpan,o,i,!0):null);var s=this._range,l=this._range=Lp([qi(a[0],i,o,!0),qi(a[1],i,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,r=this._handleEnds,a=Lp(r.slice()),i=this._size;Pp([0,1],function(n){var o=e.handles[n],s=this._handleHeight;o.attr({scale:[s/2,s/2],position:[r[n],i[1]/2-s/2]})},this),e.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:i[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,r=this._displayables,a=r.handleLabels,i=this._orient,n=["",""];if(e.get("showDetail")){var o=e.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,u=t?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();n=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var h=Lp(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(c){var v=yi(r.handles[c].parent,this.group),d=Kc(c===0?"right":"left",v),g=this._handleWidth/2+bB,p=Hr([h[c]+(c===0?-g:g),this._size[1]/2],v);a[c].setStyle({x:p[0],y:p[1],textVerticalAlign:i===Ks?"middle":d,textAlign:i===Ks?d:"center",text:n[c]})}},_formatLabel:function(t,e){var r=this.dataZoomModel,a=r.get("labelFormatter"),i=r.get("labelPrecision");(i==null||i==="auto")&&(i=e.getPixelPrecision());var n=t==null||isNaN(t)?"":e.type==="category"||e.type==="time"?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(i,20));return se(a)?a(t,n):Lt(a)?a.replace("{value}",n):n},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,r,a){this._dragging=!0,oi(a.event);var i=this._displayables.barGroup.getLocalTransform(),n=Hr([e,r],i,!0),o=this._updateInterval(t,n[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,r=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(r[0]<0||r[0]>e[0]||r[1]<0||r[1]>e[1])){var a=this._handleEnds,i=(a[0]+a[1])/2,n=this._updateInterval("all",r[0]-i);this._updateView(),n&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(Pp(this.getTargetCoordInfo(),function(a){if(!t&&a.length){var i=a[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),r=this.api.getHeight();t={x:e*.2,y:r*.2,width:e*.6,height:r*.6}}return t}});function AB(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function ZA(t){return t==="vertical"?"ns-resize":"ew-resize"}ap.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var YA="\0_ec_dataZoom_roams";function TB(t,e){var r=qA(t),a=e.dataZoomId,i=e.coordId;M(r,function(s,l){var u=s.dataZoomInfos;u[a]&&yt(e.allCoordIds,i)<0&&(delete u[a],s.count--)}),KA(r);var n=r[i];n||(n=r[i]={coordId:i,dataZoomInfos:{},count:0},n.controller=DB(t,n),n.dispatchAction=ot(MB,t)),!n.dataZoomInfos[a]&&n.count++,n.dataZoomInfos[a]=e;var o=IB(n.dataZoomInfos);n.controller.enable(o.controlType,o.opt),n.controller.setPointerChecker(e.containsPoint),es(n,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function CB(t,e){var r=qA(t);M(r,function(a){a.controller.dispose();var i=a.dataZoomInfos;i[e]&&(delete i[e],a.count--)}),KA(r)}function XA(t){return t.type+"\0_"+t.id}function qA(t){var e=t.getZr();return e[YA]||(e[YA]={})}function DB(t,e){var r=new Yn(t.getZr());return M(["pan","zoom","scrollMove"],function(a){r.on(a,function(i){var n=[];M(e.dataZoomInfos,function(o){if(!!i.isAvailableBehavior(o.dataZoomModel.option)){var s=(o.getRange||{})[a],l=s&&s(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&l&&n.push({dataZoomId:o.dataZoomId,start:l[0],end:l[1]})}}),n.length&&e.dispatchAction(n)})}),r}function KA(t){M(t,function(e,r){e.count||(e.controller.dispose(),delete t[r])})}function MB(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function IB(t){var e,r="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return M(t,function(n){var o=n.dataZoomModel,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;a[r+s]>a[r+e]&&(e=s),i&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}var LB=it,jA=ip.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,r,a){jA.superApply(this,"render",arguments),this._range=t.getPercentRange(),M(this.getTargetCoordInfo(),function(i,n){var o=V(i,function(s){return XA(s.model)});M(i,function(s){var l=s.model,u={};M(["pan","zoom","scrollMove"],function(h){u[h]=LB(PB[h],this,s,n)},this),TB(r,{coordId:XA(l),allCoordIds:o,containsPoint:function(h,f,c){return l.coordinateSystem.containPoint([f,c])},dataZoomId:t.id,dataZoomModel:t,getRange:u})},this)},this)},dispose:function(){CB(this.api,this.dataZoomModel.id),jA.superApply(this,"dispose",arguments),this._range=null}}),PB={zoom:function(t,e,r,a){var i=this._range,n=i.slice(),o=t.axisModels[0];if(!!o){var s=Op[e](null,[a.originX,a.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/a.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(zi(0,n,[0,100],0,h.minSpan,h.maxSpan),this._range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:QA(function(t,e,r,a,i,n){var o=Op[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:QA(function(t,e,r,a,i,n){var o=Op[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*n.scrollDelta})};function QA(t){return function(e,r,a,i){var n=this._range,o=n.slice(),s=e.axisModels[0];if(!!s){var l=t(o,s,e,r,a,i);if(zi(l,o,[0,100],"all"),this._range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var Op={grid:function(t,e,r,a,i){var n=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],n.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(t,e,r,a,i){var n=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(t,e,r,a,i){var n=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},JA=M,tT=function(t){var e=t&&t.visualMap;z(e)||(e=e?[e]:[]),JA(e,function(r){if(!!r){uo(r,"splitList")&&!uo(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var a=r.pieces;a&&z(a)&&JA(a,function(i){lt(i)&&(uo(i,"start")&&!uo(i,"min")&&(i.min=i.start),uo(i,"end")&&!uo(i,"max")&&(i.max=i.end))})}})};function uo(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}wt.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"});var eT=Wr.VISUAL.COMPONENT;Rt(eT,{createOnAllSeries:!0,reset:function(t,e){var r=[];return e.eachComponent("visualMap",function(a){var i=t.pipelineContext;!a.isTargetSeries(t)||i&&i.large||r.push(Xz(a.stateList,a.targetVisuals,it(a.getValueState,a),a.getDataDimension(t.getData())))}),r}}),Rt(eT,{createOnAllSeries:!0,reset:function(t,e){var r=t.getData(),a=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(t)){var n=i.getVisualMeta(it(EB,null,t,i))||{stops:[],outerColors:[]},o=i.getDataDimension(r),s=r.getDimensionInfo(o);s!=null&&(n.dimension=s.index,a.push(n))}}),t.getData().setVisual("visualMeta",a)}});function EB(t,e,r,a){for(var i=e.targetVisuals[a],n=Mt.prepareVisualTypes(i),o={color:t.getData().getVisual("color")},s=0,l=n.length;s<l;s++){var u=n[s],h=i[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(r,f,c)}return o.color;function f(v){return o[v]}function c(v,d){o[v]=d}}var Np={get:function(t,e,r){var a=rt((RB[t]||{})[e]);return r&&z(a)?a[a.length-1]:a}},RB={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]}},rT=Mt.mapVisual,OB=Mt.eachVisual,NB=z,kp=M,kB=_i,zB=Nt,zp=ce,Yh=Ze({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,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,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,r){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,r)},optionUpdated:function(t,e){var r=this.option;G.canvasSupported||(r.realtime=!1),!e&&dA(r,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=it(t,this),this.controllerVisuals=hp(this.option.controller,e,t),this.targetVisuals=hp(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return t==null||t==="all"?this.ecModel.eachSeries(function(r,a){e.push(a)}):e=me(t),e},eachTargetSeries:function(t,e){M(this.getTargetSeriesIndices(),function(r){t.call(e,this.ecModel.getSeriesByIndex(r))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(r){r===t&&(e=!0)}),e},formatValueText:function(t,e,r){var a=this.option,i=a.precision,n=this.dataBound,o=a.formatter,s,l;if(r=r||["<",">"],z(t)&&(t=t.slice(),s=!0),l=e?t:s?[u(t[0]),u(t[1])]:u(t),Lt(o))return o.replace("{value}",s?l[0]:l).replace("{value2}",s?l[1]:l);if(se(o))return s?o(t[0],t[1]):o(t);if(s)return t[0]===n[0]?r[0]+" "+l[1]:t[1]===n[1]?r[1]+" "+l[0]:l[0]+" - "+l[1];return l;function u(h){return h===n[0]?"min":h===n[1]?"max":(+h).toFixed(Math.min(i,20))}},resetExtent:function(){var t=this.option,e=kB([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,r=t.dimensions;if(!(e==null&&!r.length)){if(e!=null)return t.getDimension(e);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var n=a[i],o=t.getDimensionInfo(n);if(!o.isCalculationCoord)return n}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,r={inRange:e.inRange,outOfRange:e.outOfRange},a=e.target||(e.target={}),i=e.controller||(e.controller={});ut(a,r),ut(i,r);var n=this.isCategory();o.call(this,a),o.call(this,i),s.call(this,a,"inRange","outOfRange"),l.call(this,i);function o(u){NB(e.color)&&!u.inRange&&(u.inRange={color:e.color.slice().reverse()}),u.inRange=u.inRange||{color:t.get("gradientColor")},kp(this.stateList,function(h){var f=u[h];if(Lt(f)){var c=Np.get(f,"active",n);c?(u[h]={},u[h][f]=c):delete u[h]}},this)}function s(u,h,f){var c=u[h],v=u[f];c&&!v&&(v=u[f]={},kp(c,function(d,g){if(!!Mt.isValidType(g)){var p=Np.get(g,"inactive",n);p!=null&&(v[g]=p,g==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function l(u){var h=(u.inRange||{}).symbol||(u.outOfRange||{}).symbol,f=(u.inRange||{}).symbolSize||(u.outOfRange||{}).symbolSize,c=this.get("inactiveColor");kp(this.stateList,function(v){var d=this.itemSize,g=u[v];g||(g=u[v]={color:n?c:[c]}),g.symbol==null&&(g.symbol=h&&rt(h)||(n?"roundRect":["roundRect"])),g.symbolSize==null&&(g.symbolSize=f&&rt(f)||(n?d[0]:[d[0],d[0]])),g.symbol=rT(g.symbol,function(y){return y==="none"||y==="square"?"roundRect":y});var p=g.symbolSize;if(p!=null){var m=-1/0;OB(p,function(y){y>m&&(m=y)}),g.symbolSize=rT(p,function(y){return zB(y,[0,m],[0,d[0]],!0)})}},this)}},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:zp,getValueState:zp,getVisualMeta:zp}),aT=[20,140],iT=Yh.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){iT.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){iT.superApply(this,"resetItemSize",arguments);var t=this.itemSize;this._orient==="horizontal"&&t.reverse(),(t[0]==null||isNaN(t[0]))&&(t[0]=aT[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=aT[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):z(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){Yh.prototype.completeVisualOption.apply(this,arguments),M(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=_i((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,r=this.getExtent();return(e[0]<=r[0]||e[0]<=t)&&(e[1]>=r[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(r){var a=[],i=r.getData();i.each(this.getDataDimension(i),function(n,o){t[0]<=n&&n<=t[1]&&a.push(o)},this),e.push({seriesId:r.id,dataIndex:a})},this),e},getVisualMeta:function(t){var e=nT(this,"outOfRange",this.getExtent()),r=nT(this,"inRange",this.option.range.slice()),a=[];function i(f,c){a.push({value:f,color:t(f,c)})}for(var n=0,o=0,s=r.length,l=e.length;o<l&&(!r.length||e[o]<=r[0]);o++)e[o]<r[n]&&i(e[o],"outOfRange");for(var u=1;n<s;n++,u=0)u&&a.length&&i(r[n],"outOfRange"),i(r[n],"inRange");for(var u=1;o<l;o++)(!r.length||r[r.length-1]<e[o])&&(u&&(a.length&&i(a[a.length-1].value,"outOfRange"),u=0),i(e[o],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}}});function nT(t,e,r){if(r[0]===r[1])return r.slice();for(var a=200,i=(r[1]-r[0])/a,n=r[0],o=[],s=0;s<=a&&n<r[1];s++)o.push(n),n+=i;return o.push(r[1]),o}var oT=he({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,r,a){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,r=xi(e.get("padding")||0),a=t.getBoundingRect();t.add(new xt({z2:-1,silent:!0,shape:{x:a.x-r[3],y:a.y-r[0],width:a.width+r[3]+r[1],height:a.height+r[0]+r[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,r){r=r||{};var a=r.forceState,i=this.visualMapModel,n={};if(e==="symbol"&&(n.symbol=i.get("itemSymbol")),e==="color"){var o=i.get("contentColor");n.color=o}function s(f){return n[f]}function l(f,c){n[f]=c}var u=i.controllerVisuals[a||i.getValueState(t)],h=Mt.prepareVisualTypes(u);return M(h,function(f){var c=u[f];r.convertOpacityToAlpha&&f==="opacity"&&(f="colorAlpha",c=u.__alphaForOpacity),Mt.dependsOn(f,e)&&c&&c.applyVisual(t,s,l)}),n[e]},positionGroup:function(t){var e=this.visualMapModel,r=this.api;uu(t,e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})},doRender:ce});function sT(t,e,r){var a=t.option,i=a.align;if(i!=null&&i!=="auto")return i;for(var n={width:e.getWidth(),height:e.getHeight()},o=a.orient==="horizontal"?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],h={},f=0;f<3;f++)h[s[1-o][f]]=u[f],h[l[f]]=f===2?r[0]:a[l[f]];var c=[["x","width",3],["y","height",0]][o],v=qt(h,n,a.padding);return l[(v.margin[c[2]]||0)+v[c[0]]+v[c[1]]*.5<n[c[1]]*.5?0:1]}function Xh(t,e){return M(t||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var ya=Nt,BB=M,qh=Math.min,js=Math.max,VB=12,lT=6,GB=oT.extend({type:"visualMap.continuous",init:function(){GB.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,r,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var r=t.get("text");this._renderEndsText(e,r,0),this._renderEndsText(e,r,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,r){if(!!e){var a=e[1-r];a=a!=null?a+"":"";var i=this.visualMapModel,n=i.get("textGap"),o=i.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,r===0?-n:o[1]+n],s),u=this._applyTransform(r===0?"bottom":"top",s),h=this._orient,f=this.visualMapModel.textStyleModel;this.group.add(new dt({style:{x:l[0],y:l[1],textVerticalAlign:h==="horizontal"?"middle":u,textAlign:h==="horizontal"?u:"center",text:a,textFont:f.getFont(),textFill:f.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,r=this._shapes,a=e.itemSize,i=this._orient,n=this._useHandle,o=sT(e,this.api,a),s=r.barGroup=this._createBarGroup(o);s.add(r.outOfRange=Kh()),s.add(r.inRange=Kh(null,n?hT(this._orient):null,it(this._dragHandle,this,"all",!1),it(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("\u56FD"),u=js(l.width,l.height);n&&(r.handleThumbs=[],r.handleLabels=[],r.handleLabelPoints=[],this._createHandle(s,0,a,u,i,o),this._createHandle(s,1,a,u,i,o)),this._createIndicator(s,a,u,i),t.add(s)},_createHandle:function(t,e,r,a,i){var n=it(this._dragHandle,this,e,!1),o=it(this._dragHandle,this,e,!0),s=Kh(HB(e,a),hT(this._orient),n,o);s.position[0]=r[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new dt({draggable:!0,drift:n,onmousemove:function(c){oi(c.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=[i==="horizontal"?a/2:a*1.5,i==="horizontal"?e===0?-(a*1.5):a*1.5:e===0?-a/2:a/2],f=this._shapes;f.handleThumbs[e]=s,f.handleLabelPoints[e]=h,f.handleLabels[e]=u},_createIndicator:function(t,e,r,a){var i=Kh([[0,0]],"move");i.position[0]=e[0],i.attr({invisible:!0,silent:!0}),t.add(i);var n=this.visualMapModel.textStyleModel,o=new dt({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:n.getFont(),textFill:n.getTextColor()}});this.group.add(o);var s=[a==="horizontal"?r/2:lT+3,0],l=this._shapes;l.indicator=i,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(t,e,r,a){if(!!this._useHandle){if(this._dragging=!e,!e){var i=this._applyTransform([r,a],this._shapes.barGroup,!0);this._updateInterval(t,i[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():uT(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),r=t.getExtent(),a=[0,t.itemSize[1]];this._handleEnds=[ya(e[0],r,a,!0),ya(e[1],r,a,!0)]},_updateInterval:function(t,e){e=e||0;var r=this.visualMapModel,a=this._handleEnds,i=[0,r.itemSize[1]];zi(e,a,i,t,0);var n=r.getExtent();this._dataInterval=[ya(a[0],i,n,!0),ya(a[1],i,n,!0)]},_updateView:function(t){var e=this.visualMapModel,r=e.getExtent(),a=this._shapes,i=[0,e.itemSize[1]],n=t?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,r,n,"inRange"),s=this._createBarVisual(r,r,i,"outOfRange");a.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),a.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(n,o)},_createBarVisual:function(t,e,r,a){var i={forceState:a,convertOpacityToAlpha:!0},n=this._makeColorGradient(t,i),o=[this.getControllerVisual(t[0],"symbolSize",i),this.getControllerVisual(t[1],"symbolSize",i)],s=this._createBarPoints(r,o);return{barColor:new pi(0,0,0,1,n),barPoints:s,handlesColor:[n[0].color,n[n.length-1].color]}},_makeColorGradient:function(t,e){var r=100,a=[],i=(t[1]-t[0])/r;a.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var n=1;n<r;n++){var o=t[0]+i*n;if(o>t[1])break;a.push({color:this.getControllerVisual(o,"color",e),offset:n/r})}return a.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),a},_createBarPoints:function(t,e){var r=this.visualMapModel.itemSize;return[[r[0]-e[0],t[0]],[r[0],t[0]],[r[0],t[1]],[r[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,r=this.visualMapModel.get("inverse");return new q(e==="horizontal"&&!r?{scale:t==="bottom"?[1,1]:[-1,1],rotation:Math.PI/2}:e==="horizontal"&&r?{scale:t==="bottom"?[-1,1]:[1,1],rotation:-Math.PI/2}:e==="vertical"&&!r?{scale:t==="left"?[1,-1]:[-1,-1]}:{scale:t==="left"?[1,1]:[-1,1]})},_updateHandle:function(t,e){if(!!this._useHandle){var r=this._shapes,a=this.visualMapModel,i=r.handleThumbs,n=r.handleLabels;BB([0,1],function(o){var s=i[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=Hr(r.handleLabelPoints[o],yi(s,this.group));n[o].setStyle({x:l[0],y:l[1],text:a.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform(this._orient==="horizontal"?o===0?"bottom":"top":"left",r.barGroup)})},this)}},_showIndicator:function(t,e,r,a){var i=this.visualMapModel,n=i.getExtent(),o=i.itemSize,s=[0,o[1]],l=ya(t,n,s,!0),u=this._shapes,h=u.indicator;if(!!h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",FB(!!r,a,l,o[1]));var f={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",f);h.setStyle("fill",c);var v=Hr(u.indicatorLabelPoint,yi(h,this.group)),d=u.indicatorLabel;d.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),p=this._orient;d.setStyle({text:(r||"")+i.formatValueText(e),textVerticalAlign:p==="horizontal"?g:"middle",textAlign:p==="horizontal"?"center":g,x:v[0],y:v[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var r=t.visualMapModel.itemSize,a=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);a[1]=qh(js(0,a[1]),r[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=r[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var r=this.visualMapModel,a=r.itemSize;if(!!r.option.hoverLink){var i=[0,a[1]],n=r.getExtent();t=qh(js(i[0],t),i[1]);var o=WB(r,n,i),s=[t-o,t+o],l=ya(t,i,n,!0),u=[ya(s[0],i,n,!0),ya(s[1],i,n,!0)];s[0]<i[0]&&(u[0]=-1/0),s[1]>i[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"\u2248 ",o));var h=this._hoverLinkDataIndices,f=[];(e||uT(r))&&(f=this._hoverLinkDataIndices=r.findTargetDataIndices(u));var c=cD(h,f);this._dispatchHighDown("downplay",Xh(c[0],r)),this._dispatchHighDown("highlight",Xh(c[1],r))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,r=this.visualMapModel;if(!(!e||e.dataIndex==null)){var a=this.ecModel.getSeriesByIndex(e.seriesIndex);if(!!r.isTargetSeries(a)){var i=a.getData(e.dataType),n=i.get(r.getDataDimension(i),e.dataIndex,!0);isNaN(n)||this._showIndicator(n,n)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Xh(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,r,a){var i=yi(e,a?null:this.group);return sa[z(t)?"applyTransform":"transformDirection"](t,i,r)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function Kh(t,e,r,a){return new Ge({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(i){oi(i.event)},ondragend:a})}function HB(t,e){return t===0?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function FB(t,e,r,a){return t?[[0,-qh(e,js(r,0))],[lT,0],[0,qh(e,js(a-r,0))]]:[[0,0],[5,-5],[5,5]]}function WB(t,e,r){var a=VB/2,i=t.get("hoverLinkDataSize");return i&&(a=ya(i,e,r,!0)/2),a}function uT(t){var e=t.get("hoverLinkOnHandle");return!!(e??t.get("realtime"))}function hT(t){return t==="vertical"?"ns-resize":"ew-resize"}var UB={type:"selectDataRange",event:"dataRangeSelected",update:"update"};mt(UB,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(r){r.setSelected(t.selected)})}),we(tT);var $B=Yh.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){$B.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var r=this._mode=this._determineMode();ZB[this._mode].call(this),this._resetSelected(t,e);var a=this.option.categories;this.resetVisual(function(i,n){r==="categories"?(i.mappingMethod="category",i.categories=rt(a)):(i.dataExtent=this.getExtent(),i.mappingMethod="piecewise",i.pieceList=V(this._pieceList,function(s){var s=rt(s);return n!=="inRange"&&(s.visual=null),s}))})},completeVisualOption:function(){var t=this.option,e={},r=Mt.listVisualTypes(),a=this.isCategory();M(t.pieces,function(n){M(r,function(o){n.hasOwnProperty(o)&&(e[o]=1)})}),M(e,function(n,o){var s=0;M(this.stateList,function(l){s|=i(t,l,o)||i(t.target,l,o)},this),!s&&M(this.stateList,function(l){(t[l]||(t[l]={}))[o]=Np.get(o,l==="inRange"?"active":"inactive",a)})},this);function i(n,o,s){return n&&n[o]&&(lt(n[o])?n[o].hasOwnProperty(s):n[o]===s)}Yh.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var r=this.option,a=this._pieceList,i=(e?r:t).selected||{};if(r.selected=i,M(a,function(o,s){var l=this.getSelectedMapKey(o);i.hasOwnProperty(l)||(i[l]=!0)},this),r.selectedMode==="single"){var n=!1;M(a,function(o,s){var l=this.getSelectedMapKey(o);i[l]&&(n?i[l]=!1:n=!0)},this)}},getSelectedMapKey:function(t){return this._mode==="categories"?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=rt(t)},getValueState:function(t){var e=Mt.findPieceIndex(t,this._pieceList);return e!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(r){var a=[],i=r.getData();i.each(this.getDataDimension(i),function(n,o){var s=Mt.findPieceIndex(n,this._pieceList);s===t&&a.push(o)},this),e.push({seriesId:r.id,dataIndex:a})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(t.value!=null)e=t.value;else{var r=t.interval||[];e=r[0]===-1/0&&r[1]===1/0?0:(r[0]+r[1])/2}return e},getVisualMeta:function(t){if(this.isCategory())return;var e=[],r=[],a=this;function i(l,u){var h=a.getRepresentValue({interval:l});u||(u=a.getValueState(h));var f=t(h,u);l[0]===-1/0?r[0]=f:l[1]===1/0?r[1]=f:e.push({value:l[0],color:f},{value:l[1],color:f})}var n=this._pieceList.slice();if(!n.length)n.push({interval:[-1/0,1/0]});else{var o=n[0].interval[0];o!==-1/0&&n.unshift({interval:[-1/0,o]}),o=n[n.length-1].interval[1],o!==1/0&&n.push({interval:[o,1/0]})}var s=-1/0;return M(n,function(l){var u=l.interval;u&&(u[0]>s&&i([s,u[0]],"outOfRange"),i(u.slice()),s=u[1])},this),{stops:e,outerColors:r}}}),ZB={splitNumber:function(){var t=this.option,e=this._pieceList,r=Math.min(t.precision,20),a=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var n=(a[1]-a[0])/i;+n.toFixed(r)!==n&&r<5;)r++;t.precision=r,n=+n.toFixed(r),t.minOpen&&e.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<i;s+=n,o++){var l=o===i-1?a[1]:s+n;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[a[1],1/0],close:[0,0]}),iv(e),M(e,function(u,h){u.index=h,u.text=this.formatValueText(u.interval)},this)},categories:function(){var t=this.option;M(t.categories,function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})},this),fT(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;M(t.pieces,function(r,a){lt(r)||(r={value:r});var i={text:"",index:a};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var n=i.value=r.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],h=[],f=0;f<2;f++){for(var c=[["gte","gt","min"],["lte","lt","max"]][f],v=0;v<3&&o[f]==null;v++)o[f]=r[c[v]],s[f]=l[v],h[f]=v===2;o[f]==null&&(o[f]=u[f])}h[0]&&o[1]===1/0&&(s[0]=0),h[1]&&o[0]===-1/0&&(s[1]=0),T&&o[0]>o[1]&&console.warn("Piece "+a+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Mt.retrieveVisuals(r),e.push(i)},this),fT(t,e),iv(e),M(e,function(r){var a=r.close,i=[["<","\u2264"][a[1]],[">","\u2265"][a[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function fT(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var r3=oT.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,r=e.get("textGap"),a=e.textStyleModel,i=a.getFont(),n=a.getTextColor(),o=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=Ut(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,o),M(l.viewPieceList,f,this),u&&this._renderEndsText(t,u[1],s,h,o),bi(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t);function f(c){var v=c.piece,d=new q;d.onclick=it(this._onItemClick,this,v),this._enableHoverLink(d,c.indexInModelPieceList);var g=e.getRepresentValue(v);if(this._createItemSymbol(d,g,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(g);d.add(new dt({style:{x:o==="right"?-r:s[0]+r,y:s[1]/2,text:v.text,textVerticalAlign:"middle",textAlign:o,textFont:i,textFill:n,opacity:p==="outOfRange"?.5:1}}))}t.add(d)}},_enableHoverLink:function(t,e){t.on("mouseover",it(r,this,"highlight")).on("mouseout",it(r,this,"downplay"));function r(a){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:a,batch:Xh(i.findTargetDataIndices(e),i)})}},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if(e.orient==="vertical")return sT(t,this.api,t.itemSize);var r=e.align;return(!r||r==="auto")&&(r="left"),r},_renderEndsText:function(t,e,r,a,i){if(!!e){var n=new q,o=this.visualMapModel.textStyleModel;n.add(new dt({style:{x:a?i==="right"?r[0]:0:r[0]/2,y:r[1]/2,textVerticalAlign:"middle",textAlign:a?i:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}})),t.add(n)}},_getViewData:function(){var t=this.visualMapModel,e=V(t.getPieceList(),function(n,o){return{piece:n,indexInModelPieceList:o}}),r=t.get("text"),a=t.get("orient"),i=t.get("inverse");return(a==="horizontal"?i:!i)?e.reverse():r&&(r=r.slice().reverse()),{viewPieceList:e,endsText:r}},_createItemSymbol:function(t,e,r){t.add(Ye(this.getControllerVisual(e,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,r=e.option,a=rt(r.selected),i=e.getSelectedMapKey(t);r.selectedMode==="single"?(a[i]=!0,M(a,function(n,o){a[o]=o===i})):a[i]=!a[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}});we(tT);var cT="urn:schemas-microsoft-com:vml",vT=typeof window>"u"?null:window,dT=!1,Ke=vT&&vT.document;function Bp(t){return Vp(t)}var Vp;if(Ke&&!G.canvasSupported)try{!Ke.namespaces.zrvml&&Ke.namespaces.add("zrvml",cT),Vp=function(t){return Ke.createElement("<zrvml:"+t+' class="zrvml">')}}catch{Vp=function(e){return Ke.createElement("<"+e+' xmlns="'+cT+'" class="zrvml">')}}function YB(){if(!(dT||!Ke)){dT=!0;var t=Ke.styleSheets;t.length<31?Ke.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}var Ki=Oe.CMD,Tt=Math.round,Qs=Math.sqrt,XB=Math.abs,gT=Math.cos,pT=Math.sin,Gp=Math.max;if(!G.canvasSupported){var Jt=",",Hp="progid:DXImageTransform.Microsoft",Ft=21600,Be=Ft/2,qB=1e5,KB=1e3,Fp=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Ft+","+Ft,t.coordorigin="0,0"},jB=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")},mT=function(t,e,r){return"rgb("+[t,e,r].join(",")+")"},Kr=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Js=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},Wp=function(t,e,r){return(parseFloat(t)||0)*qB+(parseFloat(e)||0)*KB+r},yT=fc,_T=function(t,e,r){var a=Ve(e);r=+r,isNaN(r)&&(r=1),a&&(t.color=mT(a[0],a[1],a[2]),t.opacity=r*a[3])},QB=function(t){var e=Ve(t);return[mT(e[0],e[1],e[2]),e[3]]},JB=function(t,e,r){var a=e.fill;if(a!=null)if(a instanceof Vr){var i,n=0,o=[0,0],s=0,l=1,u=r.getBoundingRect(),h=u.width,f=u.height;if(a.type==="linear"){i="gradient";var c=r.transform,v=[a.x*h,a.y*f],d=[a.x2*h,a.y2*f];c&&(Pt(v,v,c),Pt(d,d,c));var g=d[0]-v[0],p=d[1]-v[1];n=Math.atan2(g,p)*180/Math.PI,n<0&&(n+=360),n<1e-6&&(n=0)}else{i="gradientradial";var v=[a.x*h,a.y*f],c=r.transform,m=r.scale,y=h,_=f;o=[(v[0]-u.x)/y,(v[1]-u.y)/_],c&&Pt(v,v,c),y/=m[0]*Ft,_/=m[1]*Ft;var w=Gp(y,_);s=2*0/w,l=2*a.r/w-s}var b=a.colorStops.slice();b.sort(function($,X){return $.offset-X.offset});for(var A=b.length,S=[],D=[],I=0;I<A;I++){var L=b[I],P=QB(L.color);D.push(L.offset*l+s+" "+P[0]),(I===0||I===A-1)&&S.push(P)}if(A>=2){var R=S[0][0],E=S[1][0],Z=S[0][1]*e.opacity,W=S[1][1]*e.opacity;t.type=i,t.method="none",t.focus="100%",t.angle=n,t.color=R,t.color2=E,t.colors=D.join(","),t.opacity=W,t.opacity2=Z}i==="radial"&&(t.focusposition=o.join(","))}else _T(t,a,e.opacity)},t5=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),e.stroke!=null&&!(e.stroke instanceof Vr)&&_T(t,e.stroke,e.opacity)},jh=function(t,e,r,a){var i=e==="fill",n=t.getElementsByTagName(e)[0];r[e]!=null&&r[e]!=="none"&&(i||!i&&r.lineWidth)?(t[i?"filled":"stroked"]="true",r[e]instanceof Vr&&Js(t,n),n||(n=Bp(e)),i?JB(n,r,a):t5(n,r),Kr(t,n)):(t[i?"filled":"stroked"]="false",Js(t,n))},je=[[],[],[]],e5=function(t,e){var r=Ki.M,a=Ki.C,i=Ki.L,n=Ki.A,o=Ki.Q,s=[],l,u,h,f,c,v,d=t.data,g=t.len();for(f=0;f<g;){switch(h=d[f++],u="",l=0,h){case r:u=" m ",l=1,c=d[f++],v=d[f++],je[0][0]=c,je[0][1]=v;break;case i:u=" l ",l=1,c=d[f++],v=d[f++],je[0][0]=c,je[0][1]=v;break;case o:case a:u=" c ",l=3;var K=d[f++],Q=d[f++],p=d[f++],m=d[f++],y,_;h===o?(y=p,_=m,p=(p+2*K)/3,m=(m+2*Q)/3,K=(c+2*K)/3,Q=(v+2*Q)/3):(y=d[f++],_=d[f++]),je[0][0]=K,je[0][1]=Q,je[1][0]=p,je[1][1]=m,je[2][0]=y,je[2][1]=_,c=y,v=_;break;case n:var w=0,b=0,A=1,S=1,D=0;e&&(w=e[4],b=e[5],A=Qs(e[0]*e[0]+e[1]*e[1]),S=Qs(e[2]*e[2]+e[3]*e[3]),D=Math.atan2(-e[1]/S,e[0]/A));var I=d[f++],L=d[f++],P=d[f++],R=d[f++],E=d[f++]+D,Z=d[f++]+E+D;f++;var W=d[f++],$=I+gT(E)*P,X=L+pT(E)*R,K=I+gT(Z)*P,Q=L+pT(Z)*R,j=W?" wa ":" at ";Math.abs($-K)<1e-4&&(Math.abs(Z-E)>.01?W&&($+=270/Ft):Math.abs(X-L)<1e-4?W&&$<I||!W&&$>I?Q-=270/Ft:Q+=270/Ft:W&&X<L||!W&&X>L?K+=270/Ft:K-=270/Ft),s.push(j,Tt(((I-P)*A+w)*Ft-Be),Jt,Tt(((L-R)*S+b)*Ft-Be),Jt,Tt(((I+P)*A+w)*Ft-Be),Jt,Tt(((L+R)*S+b)*Ft-Be),Jt,Tt(($*A+w)*Ft-Be),Jt,Tt((X*S+b)*Ft-Be),Jt,Tt((K*A+w)*Ft-Be),Jt,Tt((Q*S+b)*Ft-Be)),c=K,v=Q;break;case Ki.R:var U=je[0],tt=je[1];U[0]=d[f++],U[1]=d[f++],tt[0]=U[0]+d[f++],tt[1]=U[1]+d[f++],e&&(Pt(U,U,e),Pt(tt,tt,e)),U[0]=Tt(U[0]*Ft-Be),tt[0]=Tt(tt[0]*Ft-Be),U[1]=Tt(U[1]*Ft-Be),tt[1]=Tt(tt[1]*Ft-Be),s.push(" m ",U[0],Jt,U[1]," l ",tt[0],Jt,U[1]," l ",tt[0],Jt,tt[1]," l ",U[0],Jt,tt[1]);break;case Ki.Z:s.push(" x ")}if(l>0){s.push(u);for(var ct=0;ct<l;ct++){var bt=je[ct];e&&Pt(bt,bt,e),s.push(Tt(bt[0]*Ft-Be),Jt,Tt(bt[1]*Ft-Be),ct<l-1?Jt:"")}}}return s.join("")};pt.prototype.brushVML=function(t){var e=this.style,r=this._vmlEl;r||(r=Bp("shape"),Fp(r),this._vmlEl=r),jh(r,"fill",e,this),jh(r,"stroke",e,this);var a=this.transform,i=a!=null,n=r.getElementsByTagName("stroke")[0];if(n){var o=e.lineWidth;if(i&&!e.strokeNoScale){var s=a[0]*a[3]-a[1]*a[2];o*=Qs(XB(s))}n.weight=o+"px"}var l=this.path||(this.path=new Oe);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),r.path=e5(l,this.transform),r.style.zIndex=Wp(this.zlevel,this.z,this.z2),Kr(t,r),e.text!=null?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},pt.prototype.onRemove=function(t){Js(t,this._vmlEl),this.removeRectText(t)},pt.prototype.onAdd=function(t){Kr(t,this._vmlEl),this.appendRectText(t)};var r5=function(t){return typeof t=="object"&&t.tagName&&t.tagName.toUpperCase()==="IMG"};ve.prototype.brushVML=function(t){var e=this.style,r=e.image,a,i;if(r5(r)){var n=r.src;if(n===this._imageSrc)a=this._imageWidth,i=this._imageHeight;else{var o=r.runtimeStyle,s=o.width,l=o.height;o.width="auto",o.height="auto",a=r.width,i=r.height,o.width=s,o.height=l,this._imageSrc=n,this._imageWidth=a,this._imageHeight=i}r=n}else r===this._imageSrc&&(a=this._imageWidth,i=this._imageHeight);if(!!r){var u=e.x||0,h=e.y||0,f=e.width,c=e.height,v=e.sWidth,d=e.sHeight,g=e.sx||0,p=e.sy||0,m=v&&d,y=this._vmlEl;y||(y=Ke.createElement("div"),Fp(y),this._vmlEl=y);var _=y.style,w=!1,b,A=1,S=1;if(this.transform&&(b=this.transform,A=Qs(b[0]*b[0]+b[1]*b[1]),S=Qs(b[2]*b[2]+b[3]*b[3]),w=b[1]||b[2]),w){var D=[u,h],I=[u+f,h],L=[u,h+c],P=[u+f,h+c];Pt(D,D,b),Pt(I,I,b),Pt(L,L,b),Pt(P,P,b);var R=Gp(D[0],I[0],L[0],P[0]),E=Gp(D[1],I[1],L[1],P[1]),Z=[];Z.push("M11=",b[0]/A,Jt,"M12=",b[2]/S,Jt,"M21=",b[1]/A,Jt,"M22=",b[3]/S,Jt,"Dx=",Tt(u*A+b[4]),Jt,"Dy=",Tt(h*S+b[5])),_.padding="0 "+Tt(R)+"px "+Tt(E)+"px 0",_.filter=Hp+".Matrix("+Z.join("")+", SizingMethod=clip)"}else b&&(u=u*A+b[4],h=h*S+b[5]),_.filter="",_.left=Tt(u)+"px",_.top=Tt(h)+"px";var W=this._imageEl,$=this._cropEl;W||(W=Ke.createElement("div"),this._imageEl=W);var X=W.style;if(m){if(a&&i)X.width=Tt(A*a*f/v)+"px",X.height=Tt(S*i*c/d)+"px";else{var K=new Image,Q=this;K.onload=function(){K.onload=null,a=K.width,i=K.height,X.width=Tt(A*a*f/v)+"px",X.height=Tt(S*i*c/d)+"px",Q._imageWidth=a,Q._imageHeight=i,Q._imageSrc=r},K.src=r}$||($=Ke.createElement("div"),$.style.overflow="hidden",this._cropEl=$);var j=$.style;j.width=Tt((f+g*f/v)*A),j.height=Tt((c+p*c/d)*S),j.filter=Hp+".Matrix(Dx="+-g*f/v*A+",Dy="+-p*c/d*S+")",$.parentNode||y.appendChild($),W.parentNode!==$&&$.appendChild(W)}else X.width=Tt(A*f)+"px",X.height=Tt(S*c)+"px",y.appendChild(W),$&&$.parentNode&&(y.removeChild($),this._cropEl=null);var U="",tt=e.opacity;tt<1&&(U+=".Alpha(opacity="+Tt(tt*100)+") "),U+=Hp+".AlphaImageLoader(src="+r+", SizingMethod=scale)",X.filter=U,y.style.zIndex=Wp(this.zlevel,this.z,this.z2),Kr(t,y),e.text!=null&&this.drawRectText(t,this.getBoundingRect())}},ve.prototype.onRemove=function(t){Js(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},ve.prototype.onAdd=function(t){Kr(t,this._vmlEl),this.appendRectText(t)};var Up="normal",$p={},Zp=0,a5=100,i5=document.createElement("div"),n5=function(t){var e=$p[t];if(!e){Zp>a5&&(Zp=0,$p={});var r=i5.style,a;try{r.font=t,a=r.fontFamily.split(",")[0]}catch{}e={style:r.fontStyle||Up,variant:r.fontVariant||Up,weight:r.fontWeight||Up,size:parseFloat(r.fontSize||12)|0,family:a||"Microsoft YaHei"},$p[t]=e,Zp++}return e},ri;zC("measureText",function(t,e){var r=Ke;ri||(ri=r.createElement("div"),ri.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",Ke.body.appendChild(ri));try{ri.style.font=e}catch{}return ri.innerHTML="",ri.appendChild(r.createTextNode(t)),{width:ri.offsetWidth}});for(var Yp=new vt,o5=function(t,e,r,a){var i=this.style;this.__dirty&&Mo(i,!0);var n=i.text;if(n!=null&&(n+=""),!!n){if(i.rich){var o=ac(n,i);n=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);n.push(u.join(""))}n=n.join(`
`)}var f,c,v=i.textAlign,d=i.textVerticalAlign,g=n5(i.font),p=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';r=r||Rr(n,p,v,d,i.textPadding,i.textLineHeight);var m=this.transform;if(m&&!a&&(Yp.copy(e),Yp.applyTransform(m),e=Yp),a)f=e.x,c=e.y;else{var y=i.textPosition;if(y instanceof Array)f=e.x+yT(y[0],e.width),c=e.y+yT(y[1],e.height),v=v||"left";else{var _=this.calculateTextPosition?this.calculateTextPosition({},i,e):tc({},i,e);f=_.x,c=_.y,v=v||_.textAlign,d=d||_.textVerticalAlign}}f=Do(f,r.width,v),c=pn(c,r.height,d),c+=r.height/2;var w=Bp,b=this._textVmlEl,A,S,D;b?(D=b.firstChild,A=D.nextSibling,S=A.nextSibling):(b=w("line"),A=w("path"),S=w("textpath"),D=w("skew"),S.style["v-text-align"]="left",Fp(b),A.textpathok=!0,S.on=!0,b.from="0 0",b.to="1000 0.05",Kr(b,D),Kr(b,A),Kr(b,S),this._textVmlEl=b);var I=[f,c],L=b.style;m&&a?(Pt(I,I,m),D.on=!0,D.matrix=m[0].toFixed(3)+Jt+m[2].toFixed(3)+Jt+m[1].toFixed(3)+Jt+m[3].toFixed(3)+",0,0",D.offset=(Tt(I[0])||0)+","+(Tt(I[1])||0),D.origin="0 0",L.left="0px",L.top="0px"):(D.on=!1,L.left=Tt(f)+"px",L.top=Tt(c)+"px"),S.string=jB(n);try{S.style.font=p}catch{}jh(b,"fill",{fill:i.textFill,opacity:i.opacity},this),jh(b,"stroke",{stroke:i.textStroke,opacity:i.opacity,lineDash:i.lineDash||null},this),b.style.zIndex=Wp(this.zlevel,this.z,this.z2),Kr(t,b)}},s5=function(t){Js(t,this._textVmlEl),this._textVmlEl=null},l5=function(t){Kr(t,this._textVmlEl)},xT=[Cl,Le,ve,pt,dt],Xp=0;Xp<xT.length;Xp++){var qp=xT[Xp].prototype;qp.drawRectText=o5,qp.removeRectText=s5,qp.appendRectText=l5}dt.prototype.brushVML=function(t){var e=this.style;e.text!=null?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},dt.prototype.onRemove=function(t){this.removeRectText(t)},dt.prototype.onAdd=function(t){this.appendRectText(t)}}function ho(t){return parseInt(t,10)}function Qh(t,e){YB(),this.root=t,this.storage=e;var r=document.createElement("div"),a=document.createElement("div");r.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",a.style.cssText="position:absolute;left:0;top:0;",t.appendChild(r),this._vmlRoot=a,this._vmlViewport=r,this.resize();var i=e.delFromStorage,n=e.addToStorage;e.delFromStorage=function(o){i.call(e,o),o&&o.onRemove&&o.onRemove(a)},e.addToStorage=function(o){o.onAdd&&o.onAdd(a),n.call(e,o)},this._firstPaint=!0}Qh.prototype={constructor:Qh,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,r=0;r<t.length;r++){var a=t[r];a.invisible||a.ignore?(a.__alreadyNotVisible||a.onRemove(e),a.__alreadyNotVisible=!0):(a.__alreadyNotVisible&&a.onAdd(e),a.__alreadyNotVisible=!1,a.__dirty&&(a.beforeBrush&&a.beforeBrush(),(a.brushVML||a.brush).call(a,e),a.afterBrush&&a.afterBrush())),a.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(r,a){var r=r??this._getWidth(),a=a??this._getHeight();if(this._width!==r||this._height!==a){this._width=r,this._height=a;var i=this._vmlViewport.style;i.width=r+"px",i.height=a+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||ho(e.width))-ho(e.paddingLeft)-ho(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||ho(e.height))-ho(e.paddingTop)-ho(e.paddingBottom)|0}};function u5(t){return function(){Ta('In IE8.0 VML mode painter not support method "'+t+'"')}}M(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Qh.prototype[t]=u5(t)}),Mc("vml",Qh);var h5="http://www.w3.org/2000/svg";function jr(t){return document.createElementNS(h5,t)}var ji=Oe.CMD,f5=Array.prototype.join,fo="none",Kp=Math.round,wT=Math.sin,bT=Math.cos,ST=Math.PI,ai=Math.PI*2,c5=180/ST,AT=1e-4;function Lr(t){return Kp(t*1e4)/1e4}function TT(t){return t<AT&&t>-AT}function v5(t,e){var r=e?t.textFill:t.fill;return r!=null&&r!==fo}function d5(t,e){var r=e?t.textStroke:t.stroke;return r!=null&&r!==fo}function jp(t,e){e&&Wt(t,"transform","matrix("+f5.call(e,",")+")")}function Wt(t,e,r){(!r||r.type!=="linear"&&r.type!=="radial")&&t.setAttribute(e,r)}function g5(t,e,r){t.setAttributeNS("http://www.w3.org/1999/xlink",e,r)}function CT(t,e,r,a){if(v5(e,r)){var i=r?e.textFill:e.fill;i=i==="transparent"?fo:i,Wt(t,"fill",i),Wt(t,"fill-opacity",e.fillOpacity!=null?e.fillOpacity*e.opacity:e.opacity)}else Wt(t,"fill",fo);if(d5(e,r)){var n=r?e.textStroke:e.stroke;n=n==="transparent"?fo:n,Wt(t,"stroke",n);var o=r?e.textStrokeWidth:e.lineWidth,s=!r&&e.strokeNoScale?a.getLineScale():1;Wt(t,"stroke-width",o/s),Wt(t,"paint-order",r?"stroke":"fill"),Wt(t,"stroke-opacity",e.strokeOpacity!=null?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(Wt(t,"stroke-dasharray",e.lineDash.join(",")),Wt(t,"stroke-dashoffset",Kp(e.lineDashOffset||0))):Wt(t,"stroke-dasharray",""),e.lineCap&&Wt(t,"stroke-linecap",e.lineCap),e.lineJoin&&Wt(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Wt(t,"stroke-miterlimit",e.miterLimit)}else Wt(t,"stroke",fo)}function p5(t){for(var e=[],r=t.data,a=t.len(),i=0;i<a;){var n=r[i++],o="",s=0;switch(n){case ji.M:o="M",s=2;break;case ji.L:o="L",s=2;break;case ji.Q:o="Q",s=4;break;case ji.C:o="C",s=6;break;case ji.A:var l=r[i++],u=r[i++],h=r[i++],f=r[i++],c=r[i++],v=r[i++],d=r[i++],g=r[i++],p=Math.abs(v),m=TT(p-ai)||(g?v>=ai:-v>=ai),y=v>0?v%ai:v%ai+ai,_=!1;m?_=!0:TT(p)?_=!1:_=y>=ST==!!g;var w=Lr(l+h*bT(c)),b=Lr(u+f*wT(c));m&&(g?v=ai-1e-4:v=-ai+1e-4,_=!0,i===9&&e.push("M",w,b));var A=Lr(l+h*bT(c+v)),S=Lr(u+f*wT(c+v));e.push("A",Lr(h),Lr(f),Kp(d*c5),+_,+g,A,S);break;case ji.Z:o="Z";break;case ji.R:var A=Lr(r[i++]),S=Lr(r[i++]),D=Lr(r[i++]),I=Lr(r[i++]);e.push("M",A,S,"L",A+D,S,"L",A+D,S+I,"L",A,S+I,"L",A,S);break}o&&e.push(o);for(var L=0;L<s;L++)e.push(Lr(r[i++]))}return e.join(" ")}var tl={};tl.brush=function(t){var e=t.style,r=t.__svgEl;r||(r=jr("path"),t.__svgEl=r),t.path||t.createPathProxy();var a=t.path;if(t.__dirtyPath){a.beginPath(),a.subPixelOptimize=!1,t.buildPath(a,t.shape),t.__dirtyPath=!1;var i=p5(a);i.indexOf("NaN")<0&&Wt(r,"d",i)}CT(r,e,!1,t),jp(r,t.transform),e.text!=null?tf(t,t.getBoundingRect()):tm(t)};var Qp={};Qp.brush=function(t){var e=t.style,r=e.image;if(r instanceof HTMLImageElement){var a=r.src;r=a}if(!!r){var i=e.x||0,n=e.y||0,o=e.width,s=e.height,l=t.__svgEl;l||(l=jr("image"),t.__svgEl=l),r!==t.__imageSrc&&(g5(l,"href",r),t.__imageSrc=r),Wt(l,"width",o),Wt(l,"height",s),Wt(l,"x",i),Wt(l,"y",n),jp(l,t.transform),e.text!=null?tf(t,t.getBoundingRect()):tm(t)}};var Jh={},Jp=new vt,el={},_a=[],m5={left:"start",right:"end",center:"middle",middle:"middle"},tf=function(t,e){var r=t.style,a=t.transform,i=t instanceof dt||r.transformText;t.__dirty&&Mo(r,!0);var n=r.text;if(n!=null&&(n+=""),!!cc(n,r)){n==null&&(n=""),!i&&a&&(Jp.copy(e),Jp.applyTransform(a),e=Jp);var o=t.__textSvgEl;o||(o=jr("text"),t.__textSvgEl=o);var s=o.style,l=r.font||Tl,u=o.__computedFont;l!==o.__styleFont&&(s.font=o.__styleFont=l,u=o.__computedFont=s.font);var h=r.textPadding,f=r.textLineHeight,c=t.__textCotentBlock;(!c||t.__dirtyText)&&(c=t.__textCotentBlock=rc(n,u,h,f,r.truncate));var v=c.outerHeight,d=c.lineHeight;uc(el,t,r,e);var g=el.baseX,p=el.baseY,m=el.textAlign||"left",y=el.textVerticalAlign;y5(o,i,a,r,e,g,p);var _=pn(p,v,y),w=g,b=_;h&&(w=_5(g,m,h),b+=h[0]),b+=d/2,CT(o,r,!0,t);var A=c.canCacheByTextString,S=t.__tspanList||(t.__tspanList=[]),D=S.length;if(A&&t.__canCacheByTextString&&t.__text===n){if(t.__dirtyText&&D)for(var I=0;I<D;++I)DT(S[I],m,w,b+I*d)}else{t.__text=n,t.__canCacheByTextString=A;for(var L=c.lines,P=L.length,I=0;I<P;I++){var R=S[I],E=L[I];R?R.__zrText!==E&&(R.innerHTML="",R.appendChild(document.createTextNode(E))):(R=S[I]=jr("tspan"),o.appendChild(R),R.appendChild(document.createTextNode(E))),DT(R,m,w,b+I*d)}if(D>P){for(;I<D;I++)o.removeChild(S[I]);S.length=P}}}};function y5(t,e,r,a,i,n,o){fn(_a),e&&r&&xo(_a,r);var s=a.textRotation;if(i&&s){var l=a.textOrigin;l==="center"?(n=i.width/2+i.x,o=i.height/2+i.y):l&&(n=l[0]+i.x,o=l[1]+i.y),_a[4]-=n,_a[5]-=o,aa(_a,_a,s),_a[4]+=n,_a[5]+=o}jp(t,_a)}function _5(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function DT(t,e,r,a){Wt(t,"dominant-baseline","middle"),Wt(t,"text-anchor",m5[e]),Wt(t,"x",r),Wt(t,"y",a)}function tm(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}Jh.drawRectText=tf,Jh.brush=function(t){var e=t.style;e.text!=null?tf(t,!1):tm(t)};function MT(){}MT.prototype={diff:function(t,e,r){r||(r=function(d,g){return d===g}),this.equals=r;var a=this;t=t.slice(),e=e.slice();var i=e.length,n=t.length,o=1,s=i+n,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=i&&u+1>=n){for(var h=[],f=0;f<e.length;f++)h.push(f);return[{indices:h,count:e.length}]}function c(){for(var d=-1*o;d<=o;d+=2){var g,p=l[d-1],m=l[d+1],y=(m?m.newPos:0)-d;p&&(l[d-1]=void 0);var _=p&&p.newPos+1<i,w=m&&0<=y&&y<n;if(!_&&!w){l[d]=void 0;continue}if(!_||w&&p.newPos<m.newPos?(g=w5(m),a.pushComponent(g.components,void 0,!0)):(g=p,g.newPos++,a.pushComponent(g.components,!0,void 0)),y=a.extractCommon(g,e,t,d),g.newPos+1>=i&&y+1>=n)return x5(a,g.components,e,t);l[d]=g}o++}for(;o<=s;){var v=c();if(v)return v}},pushComponent:function(t,e,r){var a=t[t.length-1];a&&a.added===e&&a.removed===r?t[t.length-1]={count:a.count+1,added:e,removed:r}:t.push({count:1,added:e,removed:r})},extractCommon:function(t,e,r,a){for(var i=e.length,n=r.length,o=t.newPos,s=o-a,l=0;o+1<i&&s+1<n&&this.equals(e[o+1],r[s+1]);)o++,s++,l++;return l&&t.components.push({count:l}),t.newPos=o,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};function x5(t,e,r,a){for(var i=0,n=e.length,o=0,s=0;i<n;i++){var l=e[i];if(l.removed){for(var u=[],h=s;h<s+l.count;h++)u.push(h);l.indices=u,s+=l.count}else{for(var u=[],h=o;h<o+l.count;h++)u.push(h);l.indices=u,o+=l.count,l.added||(s+=l.count)}}return e}function w5(t){return{newPos:t.newPos,components:t.components.slice(0)}}var b5=new MT,S5=function(t,e,r){return b5.diff(t,e,r)},A5="0",IT="1";function zt(t,e,r,a,i){this._zrId=t,this._svgRoot=e,this._tagNames=typeof r=="string"?[r]:r,this._markLabel=a,this._domName=i||"_dom",this.nextId=0}zt.prototype.createElement=jr,zt.prototype.getDefs=function(t){var e=this._svgRoot,r=this._svgRoot.getElementsByTagName("defs");return r.length===0?t?(r=e.insertBefore(this.createElement("defs"),e.firstChild),r.contains||(r.contains=function(a){var i=r.children;if(!i)return!1;for(var n=i.length-1;n>=0;--n)if(i[n]===a)return!0;return!1}),r):null:r[0]},zt.prototype.update=function(t,e){if(!!t){var r=this.getDefs(!1);if(t[this._domName]&&r.contains(t[this._domName]))typeof e=="function"&&e(t);else{var a=this.add(t);a&&(t[this._domName]=a)}}},zt.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},zt.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},zt.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return M(this._tagNames,function(r){var a=t.getElementsByTagName(r);e=e.concat([].slice.call(a))}),e},zt.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;M(t,function(r){r[e._markLabel]=A5})},zt.prototype.markUsed=function(t){t&&(t[this._markLabel]=IT)},zt.prototype.removeUnused=function(){var t=this.getDefs(!1);if(!!t){var e=this.getDoms(),r=this;M(e,function(a){a[r._markLabel]!==IT&&t.removeChild(a)})}},zt.prototype.getSvgProxy=function(t){return t instanceof pt?tl:t instanceof ve?Qp:t instanceof dt?Jh:tl},zt.prototype.getTextSvgElement=function(t){return t.__textSvgEl},zt.prototype.getSvgElement=function(t){return t.__svgEl};function Qi(t,e){zt.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}It(Qi,zt),Qi.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var r=this;M(["fill","stroke"],function(a){if(e.style[a]&&(e.style[a].type==="linear"||e.style[a].type==="radial")){var i=e.style[a],n=r.getDefs(!0),o;i._dom?(o=i._dom,n.contains(i._dom)||r.addDom(o)):o=r.add(i),r.markUsed(e);var s=o.getAttribute("id");t.setAttribute(a,"url(#"+s+")")}})}},Qi.prototype.add=function(t){var e;if(t.type==="linear")e=this.createElement("linearGradient");else if(t.type==="radial")e=this.createElement("radialGradient");else return Ta("Illegal gradient type."),null;return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},Qi.prototype.update=function(t){var e=this;zt.prototype.update.call(this,t,function(){var r=t.type,a=t._dom.tagName;r==="linear"&&a==="linearGradient"||r==="radial"&&a==="radialGradient"?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},Qi.prototype.updateDom=function(t,e){if(t.type==="linear")e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else if(t.type==="radial")e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r);else{Ta("Illegal gradient type.");return}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var r=t.colorStops,a=0,i=r.length;a<i;++a){var n=this.createElement("stop");n.setAttribute("offset",r[a].offset*100+"%");var o=r[a].color;if(o.indexOf("rgba">-1)){var s=Ve(o)[3],l=Nf(o);n.setAttribute("stop-color","#"+l),n.setAttribute("stop-opacity",s)}else n.setAttribute("stop-color",r[a].color);e.appendChild(n)}t._dom=e},Qi.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&zt.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&zt.prototype.markUsed.call(this,e._dom)}};function rl(t,e){zt.call(this,t,e,"clipPath","__clippath_in_use__")}It(rl,zt),rl.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var r=this.getTextSvgElement(t);r&&this.updateDom(r,t.__clipPaths,!0),this.markUsed(t)},rl.prototype.updateDom=function(t,e,r){if(e&&e.length>0){var a=this.getDefs(!0),i=e[0],n,o,s=r?"_textDom":"_dom";i[s]?(o=i[s].getAttribute("id"),n=i[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,n=this.createElement("clipPath"),n.setAttribute("id",o),a.appendChild(n),i[s]=n);var l=this.getSvgProxy(i);if(i.transform&&i.parent.invTransform&&!r){var u=Array.prototype.slice.call(i.transform);Sa(i.transform,i.parent.invTransform,i.transform),l.brush(i),i.transform=u}else l.brush(i);var h=this.getSvgElement(i);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),r)}else t&&t.setAttribute("clip-path","none")},rl.prototype.markUsed=function(t){var e=this;t.__clipPaths&&M(t.__clipPaths,function(r){r._dom&&zt.prototype.markUsed.call(e,r._dom),r._textDom&&zt.prototype.markUsed.call(e,r._textDom)})};function ii(t,e){zt.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}It(ii,zt),ii.prototype.addWithoutUpdate=function(t,e){if(e&&LT(e.style)){var r;if(e._shadowDom){r=e._shadowDom;var a=this.getDefs(!0);a.contains(e._shadowDom)||this.addDom(r)}else r=this.add(e);this.markUsed(e);var i=r.getAttribute("id");t.style.filter="url(#"+i+")"}},ii.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},ii.prototype.update=function(t,e){var r=e.style;if(LT(r)){var a=this;zt.prototype.update.call(this,e,function(){a.updateDom(e,e._shadowDom)})}else this.remove(t,e)},ii.prototype.remove=function(t,e){e._shadowDomId!=null&&(this.removeDom(t),t.style.filter="")},ii.prototype.updateDom=function(t,e){var r=e.getElementsByTagName("feDropShadow");r.length===0?r=this.createElement("feDropShadow"):r=r[0];var a=t.style,i=t.scale&&t.scale[0]||1,n=t.scale&&t.scale[1]||1,o,s,l,u;if(a.shadowBlur||a.shadowOffsetX||a.shadowOffsetY)o=a.shadowOffsetX||0,s=a.shadowOffsetY||0,l=a.shadowBlur,u=a.shadowColor;else if(a.textShadowBlur)o=a.textShadowOffsetX||0,s=a.textShadowOffsetY||0,l=a.textShadowBlur,u=a.textShadowColor;else{this.removeDom(e,a);return}r.setAttribute("dx",o/i),r.setAttribute("dy",s/n),r.setAttribute("flood-color",u);var h=l/2/i,f=l/2/n,c=h+" "+f;r.setAttribute("stdDeviation",c),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(l/2*200)+"%"),e.setAttribute("height",Math.ceil(l/2*200)+"%"),e.appendChild(r),t._shadowDom=e},ii.prototype.markUsed=function(t){t._shadowDom&&zt.prototype.markUsed.call(this,t._shadowDom)};function LT(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function ef(t){return parseInt(t,10)}function T5(t){return t instanceof pt?tl:t instanceof ve?Qp:t instanceof dt?Jh:tl}function PT(t,e){return e&&t&&e.parentNode!==t}function al(t,e,r){if(PT(t,e)&&r){var a=r.nextSibling;a?t.insertBefore(e,a):t.appendChild(e)}}function ET(t,e){if(PT(t,e)){var r=t.firstChild;r?t.insertBefore(e,r):t.appendChild(e)}}function RT(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function il(t){return t.__textSvgEl}function nl(t){return t.__svgEl}var rf=function(t,e,r,a){this.root=t,this.storage=e,this._opts=r=et({},r||{});var i=jr("svg");i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("version","1.1"),i.setAttribute("baseProfile","full"),i.style.cssText="user-select:none;position:absolute;left:0;top:0;";var n=jr("g");i.appendChild(n);var o=jr("g");i.appendChild(o),this.gradientManager=new Qi(a,o),this.clipPathManager=new rl(a,o),this.shadowManager=new ii(a,o);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=i,this._svgRoot=o,this._backgroundRoot=n,this._viewport=s,t.appendChild(s),s.appendChild(i),this.resize(r.width,r.height),this._visibleList=[]};rf.prototype={constructor:rf,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=jr("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e=this._svgRoot,r=this._visibleList,a=t.length,i=[],n;for(n=0;n<a;n++){var o=t[n],s=T5(o),l=nl(o)||il(o);o.invisible||(o.__dirty&&(s&&s.brush(o),this.clipPathManager.update(o),o.style&&(this.gradientManager.update(o.style.fill),this.gradientManager.update(o.style.stroke),this.shadowManager.update(l,o)),o.__dirty=!1),i.push(o))}var u=S5(r,i),h;for(n=0;n<u.length;n++){var f=u[n];if(f.removed)for(var c=0;c<f.count;c++){var o=r[f.indices[c]],l=nl(o),v=il(o);RT(e,l),RT(e,v)}}for(n=0;n<u.length;n++){var f=u[n];if(f.added)for(var c=0;c<f.count;c++){var o=i[f.indices[c]],l=nl(o),v=il(o);h?al(e,l,h):ET(e,l),l?al(e,v,l):h?al(e,v,h):ET(e,v),al(e,v,l),h=v||l||h,this.gradientManager.addWithoutUpdate(l||v,o),this.shadowManager.addWithoutUpdate(l||v,o),this.clipPathManager.markUsed(o)}else if(!f.removed)for(var c=0;c<f.count;c++){var o=i[f.indices[c]],l=nl(o),v=il(o),l=nl(o),v=il(o);this.gradientManager.markUsed(o),this.gradientManager.addWithoutUpdate(l||v,o),this.shadowManager.markUsed(o),this.shadowManager.addWithoutUpdate(l||v,o),this.clipPathManager.markUsed(o),v&&al(e,v,l),h=l||v||h}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=i},_getDefs:function(t){var e=this._svgDom,r=e.getElementsByTagName("defs");if(r.length===0)if(t){var r=e.insertBefore(jr("defs"),e.firstChild);return r.contains||(r.contains=function(i){var n=r.children;if(!n)return!1;for(var o=n.length-1;o>=0;--o)if(n[o]===i)return!0;return!1}),r}else return null;else return r[0]},resize:function(t,e){var r=this._viewport;r.style.display="none";var a=this._opts;if(t!=null&&(a.width=t),e!=null&&(a.height=e),t=this._getSize(0),e=this._getSize(1),r.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var i=r.style;i.width=t+"px",i.height=e+"px";var n=this._svgDom;n.setAttribute("width",t),n.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,r=["width","height"][t],a=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],n=["paddingRight","paddingBottom"][t];if(e[r]!=null&&e[r]!=="auto")return parseFloat(e[r]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[a]||ef(s[r])||ef(o.style[r]))-(ef(s[i])||0)-(ef(s[n])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var t=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
\r<`));return"data:image/svg+xml;charset=UTF-8,"+t}};function C5(t){return function(){Ta('In SVG mode painter not support method "'+t+'"')}}M(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){rf.prototype[t]=C5(t)}),Mc("svg",rf),x.version=g_,x.dependencies=Pv,x.PRIORITY=Wr,x.init=u2,x.connect=h2,x.disConnect=P_,x.disconnect=f2,x.dispose=c2,x.getInstanceByDom=Vv,x.getInstanceById=v2,x.registerTheme=Gv,x.registerPreprocessor=we,x.registerProcessor=$e,x.registerPostUpdate=d2,x.registerAction=mt,x.registerCoordinateSystem=Hv,x.getCoordinateSystemDimensions=g2,x.registerLayout=Gt,x.registerVisual=Rt,x.registerLoading=E_,x.extendComponentModel=Ze,x.extendComponentView=he,x.extendSeriesModel=Mu,x.extendChartView=ke,x.setCanvasCreator=p2,x.registerMap=m2,x.getMap=y2,x.dataTool=_2,x.zrender=uD,x.number=bM,x.format=DM,x.throttle=du,x.helper=fL,x.matrix=dC,x.vector=tC,x.color=_C,x.parseGeoJSON=nd,x.parseGeoJson=SL,x.util=y1,x.graphic=_1,x.List=fe,x.Model=_t,x.Axis=Qt,x.env=G});var co=kT.echarts;var rm=O5(BT(),1);function N5(x){return x!=null}var st=N5;function tn(x){this.name="DeveloperError",this.message=x;let C;try{throw new Error}catch(T){C=T.stack}this.stack=C}st(Object.create)&&(tn.prototype=Object.create(Error.prototype),tn.prototype.constructor=tn);tn.prototype.toString=function(){let x=`${this.name}: ${this.message}`;return st(this.stack)&&(x+=`
${this.stack.toString()}`),x};tn.throwInstantiationError=function(){throw new tn("This function defines an interface and should not be called directly.")};var at=tn;var ne={};ne.typeOf={};function k5(x){return`${x} is required, actual value was undefined`}function vo(x,C,T){return`Expected ${T} to be typeof ${C}, actual typeof was ${x}`}ne.defined=function(x,C){if(!st(C))throw new at(k5(x))};ne.typeOf.func=function(x,C){if(typeof C!="function")throw new at(vo(typeof C,"function",x))};ne.typeOf.string=function(x,C){if(typeof C!="string")throw new at(vo(typeof C,"string",x))};ne.typeOf.number=function(x,C){if(typeof C!="number")throw new at(vo(typeof C,"number",x))};ne.typeOf.number.lessThan=function(x,C,T){if(ne.typeOf.number(x,C),C>=T)throw new at(`Expected ${x} to be less than ${T}, actual value was ${C}`)};ne.typeOf.number.lessThanOrEquals=function(x,C,T){if(ne.typeOf.number(x,C),C>T)throw new at(`Expected ${x} to be less than or equal to ${T}, actual value was ${C}`)};ne.typeOf.number.greaterThan=function(x,C,T){if(ne.typeOf.number(x,C),C<=T)throw new at(`Expected ${x} to be greater than ${T}, actual value was ${C}`)};ne.typeOf.number.greaterThanOrEquals=function(x,C,T){if(ne.typeOf.number(x,C),C<T)throw new at(`Expected ${x} to be greater than or equal to ${T}, actual value was ${C}`)};ne.typeOf.object=function(x,C){if(typeof C!="object")throw new at(vo(typeof C,"object",x))};ne.typeOf.bool=function(x,C){if(typeof C!="boolean")throw new at(vo(typeof C,"boolean",x))};ne.typeOf.bigint=function(x,C){if(typeof C!="bigint")throw new at(vo(typeof C,"bigint",x))};ne.typeOf.number.equals=function(x,C,T,N){if(ne.typeOf.number(x,T),ne.typeOf.number(C,N),T!==N)throw new at(`${x} must be equal to ${C}, the actual values are ${T} and ${N}`)};var Y=ne;function VT(x,C){return x??C}VT.EMPTY_OBJECT=Object.freeze({});var oe=VT;var B={};B.EPSILON1=.1;B.EPSILON2=.01;B.EPSILON3=.001;B.EPSILON4=1e-4;B.EPSILON5=1e-5;B.EPSILON6=1e-6;B.EPSILON7=1e-7;B.EPSILON8=1e-8;B.EPSILON9=1e-9;B.EPSILON10=1e-10;B.EPSILON11=1e-11;B.EPSILON12=1e-12;B.EPSILON13=1e-13;B.EPSILON14=1e-14;B.EPSILON15=1e-15;B.EPSILON16=1e-16;B.EPSILON17=1e-17;B.EPSILON18=1e-18;B.EPSILON19=1e-19;B.EPSILON20=1e-20;B.EPSILON21=1e-21;B.GRAVITATIONALPARAMETER=3986004418e5;B.SOLAR_RADIUS=6955e5;B.LUNAR_RADIUS=1737400;B.SIXTY_FOUR_KILOBYTES=64*1024;B.FOUR_GIGABYTES=4*1024*1024*1024;B.sign=oe(Math.sign,function(C){return C=+C,C===0||C!==C?C:C>0?1:-1});B.signNotZero=function(x){return x<0?-1:1};B.toSNorm=function(x,C){return C=oe(C,255),Math.round((B.clamp(x,-1,1)*.5+.5)*C)};B.fromSNorm=function(x,C){return C=oe(C,255),B.clamp(x,0,C)/C*2-1};B.normalize=function(x,C,T){return T=Math.max(T-C,0),T===0?0:B.clamp((x-C)/T,0,1)};B.sinh=oe(Math.sinh,function(C){return(Math.exp(C)-Math.exp(-C))/2});B.cosh=oe(Math.cosh,function(C){return(Math.exp(C)+Math.exp(-C))/2});B.lerp=function(x,C,T){return(1-T)*x+T*C};B.PI=Math.PI;B.ONE_OVER_PI=1/Math.PI;B.PI_OVER_TWO=Math.PI/2;B.PI_OVER_THREE=Math.PI/3;B.PI_OVER_FOUR=Math.PI/4;B.PI_OVER_SIX=Math.PI/6;B.THREE_PI_OVER_TWO=3*Math.PI/2;B.TWO_PI=2*Math.PI;B.ONE_OVER_TWO_PI=1/(2*Math.PI);B.RADIANS_PER_DEGREE=Math.PI/180;B.DEGREES_PER_RADIAN=180/Math.PI;B.RADIANS_PER_ARCSECOND=B.RADIANS_PER_DEGREE/3600;B.toRadians=function(x){if(!st(x))throw new at("degrees is required.");return x*B.RADIANS_PER_DEGREE};B.toDegrees=function(x){if(!st(x))throw new at("radians is required.");return x*B.DEGREES_PER_RADIAN};B.convertLongitudeRange=function(x){if(!st(x))throw new at("angle is required.");let C=B.TWO_PI,T=x-Math.floor(x/C)*C;return T<-Math.PI?T+C:T>=Math.PI?T-C:T};B.clampToLatitudeRange=function(x){if(!st(x))throw new at("angle is required.");return B.clamp(x,-1*B.PI_OVER_TWO,B.PI_OVER_TWO)};B.negativePiToPi=function(x){if(!st(x))throw new at("angle is required.");return x>=-B.PI&&x<=B.PI?x:B.zeroToTwoPi(x+B.PI)-B.PI};B.zeroToTwoPi=function(x){if(!st(x))throw new at("angle is required.");if(x>=0&&x<=B.TWO_PI)return x;let C=B.mod(x,B.TWO_PI);return Math.abs(C)<B.EPSILON14&&Math.abs(x)>B.EPSILON14?B.TWO_PI:C};B.mod=function(x,C){if(!st(x))throw new at("m is required.");if(!st(C))throw new at("n is required.");if(C===0)throw new at("divisor cannot be 0.");return B.sign(x)===B.sign(C)&&Math.abs(x)<Math.abs(C)?x:(x%C+C)%C};B.equalsEpsilon=function(x,C,T,N){if(!st(x))throw new at("left is required.");if(!st(C))throw new at("right is required.");T=oe(T,0),N=oe(N,T);let k=Math.abs(x-C);return k<=N||k<=T*Math.max(Math.abs(x),Math.abs(C))};B.lessThan=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C<-T};B.lessThanOrEquals=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C<T};B.greaterThan=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C>T};B.greaterThanOrEquals=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C>-T};var af=[1];B.factorial=function(x){if(typeof x!="number"||x<0)throw new at("A number greater than or equal to 0 is required.");let C=af.length;if(x>=C){let T=af[C-1];for(let N=C;N<=x;N++){let k=T*N;af.push(k),T=k}}return af[x]};B.incrementWrap=function(x,C,T){if(T=oe(T,0),!st(x))throw new at("n is required.");if(C<=T)throw new at("maximumValue must be greater than minimumValue.");return++x,x>C&&(x=T),x};B.isPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>4294967295)throw new at("A number between 0 and (2^32)-1 is required.");return x!==0&&(x&x-1)===0};B.nextPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>2147483648)throw new at("A number between 0 and 2^31 is required.");return--x,x|=x>>1,x|=x>>2,x|=x>>4,x|=x>>8,x|=x>>16,++x,x};B.previousPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>4294967295)throw new at("A number between 0 and (2^32)-1 is required.");return x|=x>>1,x|=x>>2,x|=x>>4,x|=x>>8,x|=x>>16,x|=x>>32,x=(x>>>0)-(x>>>1),x};B.clamp=function(x,C,T){return Y.typeOf.number("value",x),Y.typeOf.number("min",C),Y.typeOf.number("max",T),x<C?C:x>T?T:x};var GT=new rm.default;B.setRandomNumberSeed=function(x){if(!st(x))throw new at("seed is required.");GT=new rm.default(x)};B.nextRandomNumber=function(){return GT.random()};B.randomBetween=function(x,C){return B.nextRandomNumber()*(C-x)+x};B.acosClamped=function(x){if(!st(x))throw new at("value is required.");return Math.acos(B.clamp(x,-1,1))};B.asinClamped=function(x){if(!st(x))throw new at("value is required.");return Math.asin(B.clamp(x,-1,1))};B.chordLength=function(x,C){if(!st(x))throw new at("angle is required.");if(!st(C))throw new at("radius is required.");return 2*C*Math.sin(x*.5)};B.logBase=function(x,C){if(!st(x))throw new at("number is required.");if(!st(C))throw new at("base is required.");return Math.log(x)/Math.log(C)};B.cbrt=oe(Math.cbrt,function(C){let T=Math.pow(Math.abs(C),.3333333333333333);return C<0?-T:T});B.log2=oe(Math.log2,function(C){return Math.log(C)*Math.LOG2E});B.fog=function(x,C){let T=x*C;return 1-Math.exp(-(T*T))};B.fastApproximateAtan=function(x){return Y.typeOf.number("x",x),x*(-.1784*Math.abs(x)-.0663*x*x+1.0301)};B.fastApproximateAtan2=function(x,C){Y.typeOf.number("x",x),Y.typeOf.number("y",C);let T,N=Math.abs(x);T=Math.abs(C);let k=Math.max(N,T);T=Math.min(N,T);let F=T/k;if(isNaN(F))throw new at("either x or y must be nonzero");return N=B.fastApproximateAtan(F),N=Math.abs(C)>Math.abs(x)?B.PI_OVER_TWO-N:N,N=x<0?B.PI-N:N,N=C<0?-N:N,N};var Qe=B;var z5={ellipsoidCoordinates:null},nf=z5;function O(x,C,T){this.x=oe(x,0),this.y=oe(C,0),this.z=oe(T,0)}O.fromSpherical=function(x,C){Y.typeOf.object("spherical",x),st(C)||(C=new O);let T=x.clock,N=x.cone,k=oe(x.magnitude,1),F=k*Math.sin(N);return C.x=F*Math.cos(T),C.y=F*Math.sin(T),C.z=k*Math.cos(N),C};O.fromElements=function(x,C,T,N){return st(N)?(N.x=x,N.y=C,N.z=T,N):new O(x,C,T)};O.clone=function(x,C){if(!!st(x))return st(C)?(C.x=x.x,C.y=x.y,C.z=x.z,C):new O(x.x,x.y,x.z)};O.fromCartesian4=O.clone;O.packedLength=3;O.pack=function(x,C,T){return Y.typeOf.object("value",x),Y.defined("array",C),T=oe(T,0),C[T++]=x.x,C[T++]=x.y,C[T]=x.z,C};O.unpack=function(x,C,T){return Y.defined("array",x),C=oe(C,0),st(T)||(T=new O),T.x=x[C++],T.y=x[C++],T.z=x[C],T};O.packArray=function(x,C){Y.defined("array",x);let T=x.length,N=T*3;if(!st(C))C=new Array(N);else{if(!Array.isArray(C)&&C.length!==N)throw new at("If result is a typed array, it must have exactly array.length * 3 elements");C.length!==N&&(C.length=N)}for(let k=0;k<T;++k)O.pack(x[k],C,k*3);return C};O.unpackArray=function(x,C){if(Y.defined("array",x),Y.typeOf.number.greaterThanOrEquals("array.length",x.length,3),x.length%3!==0)throw new at("array length must be a multiple of 3.");let T=x.length;st(C)?C.length=T/3:C=new Array(T/3);for(let N=0;N<T;N+=3){let k=N/3;C[k]=O.unpack(x,N,C[k])}return C};O.fromArray=O.unpack;O.maximumComponent=function(x){return Y.typeOf.object("cartesian",x),Math.max(x.x,x.y,x.z)};O.minimumComponent=function(x){return Y.typeOf.object("cartesian",x),Math.min(x.x,x.y,x.z)};O.minimumByComponent=function(x,C,T){return Y.typeOf.object("first",x),Y.typeOf.object("second",C),Y.typeOf.object("result",T),T.x=Math.min(x.x,C.x),T.y=Math.min(x.y,C.y),T.z=Math.min(x.z,C.z),T};O.maximumByComponent=function(x,C,T){return Y.typeOf.object("first",x),Y.typeOf.object("second",C),Y.typeOf.object("result",T),T.x=Math.max(x.x,C.x),T.y=Math.max(x.y,C.y),T.z=Math.max(x.z,C.z),T};O.clamp=function(x,C,T,N){Y.typeOf.object("value",x),Y.typeOf.object("min",C),Y.typeOf.object("max",T),Y.typeOf.object("result",N);let k=Qe.clamp(x.x,C.x,T.x),F=Qe.clamp(x.y,C.y,T.y),G=Qe.clamp(x.z,C.z,T.z);return N.x=k,N.y=F,N.z=G,N};O.magnitudeSquared=function(x){return Y.typeOf.object("cartesian",x),x.x*x.x+x.y*x.y+x.z*x.z};O.magnitude=function(x){return Math.sqrt(O.magnitudeSquared(x))};var sf=new O;O.distance=function(x,C){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),O.subtract(x,C,sf),O.magnitude(sf)};O.distanceSquared=function(x,C){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),O.subtract(x,C,sf),O.magnitudeSquared(sf)};O.normalize=function(x,C){Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C);let T=O.magnitude(x);if(C.x=x.x/T,C.y=x.y/T,C.z=x.z/T,isNaN(C.x)||isNaN(C.y)||isNaN(C.z))throw new at("normalized result is not a number");return C};O.dot=function(x,C){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),x.x*C.x+x.y*C.y+x.z*C.z};O.multiplyComponents=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x*C.x,T.y=x.y*C.y,T.z=x.z*C.z,T};O.divideComponents=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x/C.x,T.y=x.y/C.y,T.z=x.z/C.z,T};O.add=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x+C.x,T.y=x.y+C.y,T.z=x.z+C.z,T};O.subtract=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=x.x-C.x,T.y=x.y-C.y,T.z=x.z-C.z,T};O.multiplyByScalar=function(x,C,T){return Y.typeOf.object("cartesian",x),Y.typeOf.number("scalar",C),Y.typeOf.object("result",T),T.x=x.x*C,T.y=x.y*C,T.z=x.z*C,T};O.divideByScalar=function(x,C,T){return Y.typeOf.object("cartesian",x),Y.typeOf.number("scalar",C),Y.typeOf.object("result",T),T.x=x.x/C,T.y=x.y/C,T.z=x.z/C,T};O.negate=function(x,C){return Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C),C.x=-x.x,C.y=-x.y,C.z=-x.z,C};O.abs=function(x,C){return Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C),C.x=Math.abs(x.x),C.y=Math.abs(x.y),C.z=Math.abs(x.z),C};var HT=new O;O.lerp=function(x,C,T,N){return Y.typeOf.object("start",x),Y.typeOf.object("end",C),Y.typeOf.number("t",T),Y.typeOf.object("result",N),O.multiplyByScalar(C,T,HT),N=O.multiplyByScalar(x,1-T,N),O.add(HT,N,N)};var of=new O,am=new O;O.angleBetween=function(x,C){Y.typeOf.object("left",x),Y.typeOf.object("right",C),O.normalize(x,of),O.normalize(C,am);let T=O.dot(of,am),N=O.magnitude(O.cross(of,am,of));return Math.atan2(N,T)};var B5=new O;O.mostOrthogonalAxis=function(x,C){Y.typeOf.object("cartesian",x),Y.typeOf.object("result",C);let T=O.normalize(x,B5);return O.abs(T,T),T.x<=T.y?T.x<=T.z?C=O.clone(O.UNIT_X,C):C=O.clone(O.UNIT_Z,C):T.y<=T.z?C=O.clone(O.UNIT_Y,C):C=O.clone(O.UNIT_Z,C),C};O.projectVector=function(x,C,T){Y.defined("a",x),Y.defined("b",C),Y.defined("result",T);let N=O.dot(x,C)/O.dot(C,C);return O.multiplyByScalar(C,N,T)};O.equals=function(x,C){return x===C||st(x)&&st(C)&&x.x===C.x&&x.y===C.y&&x.z===C.z};O.equalsArray=function(x,C,T){return x.x===C[T]&&x.y===C[T+1]&&x.z===C[T+2]};O.equalsEpsilon=function(x,C,T,N){return x===C||st(x)&&st(C)&&Qe.equalsEpsilon(x.x,C.x,T,N)&&Qe.equalsEpsilon(x.y,C.y,T,N)&&Qe.equalsEpsilon(x.z,C.z,T,N)};O.cross=function(x,C,T){Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T);let N=x.x,k=x.y,F=x.z,G=C.x,St=C.y,Ct=C.z,te=k*Ct-F*St,de=F*G-N*Ct,Yt=N*St-k*G;return T.x=te,T.y=de,T.z=Yt,T};O.midpoint=function(x,C,T){return Y.typeOf.object("left",x),Y.typeOf.object("right",C),Y.typeOf.object("result",T),T.x=(x.x+C.x)*.5,T.y=(x.y+C.y)*.5,T.z=(x.z+C.z)*.5,T};O.fromDegrees=function(x,C,T,N,k){return Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),x=Qe.toRadians(x),C=Qe.toRadians(C),O.fromRadians(x,C,T,N,k)};var Bt=new O,Je=new O,V5=new O(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);O.fromCGCS2000Degrees=function(x,C,T,N){return Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),x=Qe.toRadians(x),C=Qe.toRadians(C),O.fromcgcs2000Radians(x,C,T,N)};var FT=new O(6378137*6378137,6378137*6378137,6356752314140356e-9*6356752314140356e-9);O.fromcgcs2000Radians=function(x,C,T,N){Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),T=oe(T,0);let k=FT,F=Math.cos(C);Bt.x=F*Math.cos(x),Bt.y=F*Math.sin(x),Bt.z=Math.sin(C),Bt=O.normalize(Bt,Bt),O.multiplyComponents(k,Bt,Je);let G=Math.sqrt(O.dot(Bt,Je));return Je=O.divideByScalar(Je,G,Je),Bt=O.multiplyByScalar(Bt,T,Bt),st(N)||(N=new O),O.add(Je,Bt,N)};Bt=new O;Je=new O;var G5=new O(1737400*1737400,1737400*1737400,1737400*1737400);O.fromRadians=function(x,C,T,N,k){Y.typeOf.number("longitude",x),Y.typeOf.number("latitude",C),T=oe(T,0);let F=null;nf.ellipsoidCoordinates==="CGCS2000"?F=FT:nf.ellipsoidCoordinates==="MOON"||nf.ellipsoidCoordinates==="MOON2000"?F=G5:F=st(N)?N.radiiSquared:V5;let G=Math.cos(C);Bt.x=G*Math.cos(x),Bt.y=G*Math.sin(x),Bt.z=Math.sin(C),Bt=O.normalize(Bt,Bt),O.multiplyComponents(F,Bt,Je);let St=Math.sqrt(O.dot(Bt,Je));return Je=O.divideByScalar(Je,St,Je),Bt=O.multiplyByScalar(Bt,T,Bt),st(k)||(k=new O),O.add(Je,Bt,k)};O.fromDegreesArray=function(x,C,T){if(Y.defined("coordinates",x),x.length<2||x.length%2!==0)throw new at("the number of coordinates must be a multiple of 2 and at least 2");let N=x.length;st(T)?T.length=N/2:T=new Array(N/2);for(let k=0;k<N;k+=2){let F=x[k],G=x[k+1],St=k/2;T[St]=O.fromDegrees(F,G,0,C,T[St])}return T};O.fromRadiansArray=function(x,C,T){if(Y.defined("coordinates",x),x.length<2||x.length%2!==0)throw new at("the number of coordinates must be a multiple of 2 and at least 2");let N=x.length;st(T)?T.length=N/2:T=new Array(N/2);for(let k=0;k<N;k+=2){let F=x[k],G=x[k+1],St=k/2;T[St]=O.fromRadians(F,G,0,C,T[St])}return T};O.fromDegreesArrayHeights=function(x,C,T){if(Y.defined("coordinates",x),x.length<3||x.length%3!==0)throw new at("the number of coordinates must be a multiple of 3 and at least 3");let N=x.length;st(T)?T.length=N/3:T=new Array(N/3);for(let k=0;k<N;k+=3){let F=x[k],G=x[k+1],St=x[k+2],Ct=k/3;T[Ct]=O.fromDegrees(F,G,St,C,T[Ct])}return T};O.fromRadiansArrayHeights=function(x,C,T){if(Y.defined("coordinates",x),x.length<3||x.length%3!==0)throw new at("the number of coordinates must be a multiple of 3 and at least 3");let N=x.length;st(T)?T.length=N/3:T=new Array(N/3);for(let k=0;k<N;k+=3){let F=x[k],G=x[k+1],St=x[k+2],Ct=k/3;T[Ct]=O.fromRadians(F,G,St,C,T[Ct])}return T};O.ZERO=Object.freeze(new O(0,0,0));O.ONE=Object.freeze(new O(1,1,1));O.UNIT_X=Object.freeze(new O(1,0,0));O.UNIT_Y=Object.freeze(new O(0,1,0));O.UNIT_Z=Object.freeze(new O(0,0,1));O.prototype.clone=function(x){return O.clone(this,x)};O.prototype.equals=function(x){return O.equals(this,x)};O.prototype.equalsEpsilon=function(x,C,T){return O.equalsEpsilon(this,x,C,T)};O.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var im=O;var lf={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};lf.getMorphTime=function(x){return x===lf.SCENE3D?1:x===lf.MORPHING?void 0:0};var WT=Object.freeze(lf);var UT={};(function(C,T){C.FlowEcharts=T(co,C.Geoworld)})(UT,function(x,C){return function(T){var N={};function k(F){if(N[F])return N[F].exports;var G=N[F]={i:F,l:!1,exports:{}};return T[F].call(G.exports,G,G.exports,k),G.l=!0,G.exports}return k.m=T,k.c=N,k.d=function(F,G,St){k.o(F,G)||Object.defineProperty(F,G,{enumerable:!0,get:St})},k.r=function(F){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(F,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(F,"__esModule",{value:!0})},k.t=function(F,G){if(G&1&&(F=k(F)),G&8||G&4&&typeof F=="object"&&F&&F.__esModule)return F;var St=Object.create(null);if(k.r(St),Object.defineProperty(St,"default",{enumerable:!0,value:F}),G&2&&typeof F!="string")for(var Ct in F)k.d(St,Ct,function(te){return F[te]}.bind(null,Ct));return St},k.n=function(F){var G=F&&F.__esModule?function(){return F.default}:function(){return F};return k.d(G,"a",G),G},k.o=function(F,G){return Object.prototype.hasOwnProperty.call(F,G)},k.p="",k(k.s=0)}([function(T,N,k){k(1);var F=k(7);T.exports=F},function(T,N,k){var F;F=function(G){return k(2).registerCoordinateSystem("GLMap",k(3)),k(5),k(6),k(2).registerAction({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(St,Ct){}),{version:"1.0.0"}}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){T.exports=x},function(T,N,k){var F;F=function(G){var St=k(2);function Ct(te,de){this._GLMap=te,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=de}return Ct.prototype.dimensions=["lng","lat"],Ct.prototype.setMapOffset=function(te){this._mapOffset=te},Ct.prototype.getBMap=function(){return this._GLMap},Ct.prototype.dataToPoint=function(te){var de=Qe.toRadians(80),Yt=[99999,99999],gr=im.fromDegrees(te[0],te[1]);if(!gr)return Yt;var en=this._GLMap.cartesianToCanvasCoordinates(gr);if(!en)return Yt;var Pr=this._GLMap;return Pr.mode===WT.SCENE3D&&im.angleBetween(Pr.camera.position,gr)>de?!1:[en.x-this._mapOffset[0],en.y-this._mapOffset[1]]},Ct.prototype.pointToData=function(Yt){var de=this._mapOffset,Yt=this._bmap.project([Yt[0]+de[0],Yt[1]+de[1]]);return[Yt.lng,Yt.lat]},Ct.prototype.getViewRect=function(){var te=this._api;return new St.graphic.BoundingRect(0,0,te.getWidth(),te.getHeight())},Ct.prototype.getRoamTransform=function(){return St.matrix.create()},Ct.dimensions=Ct.prototype.dimensions,Ct.create=function(te,de){var Yt;te.eachComponent("GLMap",function(gr){var en=de.getZr().painter.getViewportRoot(),Pr=St.glMap;Yt=new Ct(Pr,de),Yt.setMapOffset(gr.__mapOffset||[0,0]),gr.coordinateSystem=Yt}),te.eachSeries(function(gr){gr.get("coordinateSystem")==="GLMap"&&(gr.coordinateSystem=Yt)})},Ct}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){T.exports=C},function(T,N,k){var F;F=function(G){return k(2).extendComponentModel({type:"GLMap",getBMap:function(){return this.__GLMap},defaultOption:{roam:!1}})}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N,k){var F;F=function(G){return k(2).extendComponentView({type:"GLMap",init:function(St,Ct){this.api=Ct,co.glMap.postRender.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.dispatchAction({type:"GLMapRoam"})},render:function(St,Ct,te){},dispose:function(St,Ct){co.glMap.postRender.removeEventListener(this.moveHandler,this)}})}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){function k(F,G){this._mapContainer=F,this._overlay=this._createChartOverlay(),this._overlay.setOption(G)}k.prototype._createChartOverlay=function(){var F=this._mapContainer.scene;F.canvas.setAttribute("tabIndex",0);var G=document.createElement("div");return G.style.position="absolute",G.style.top="0px",G.style.left="0px",G.style.width=F.canvas.width+"px",G.style.height=F.canvas.height+"px",G.style.pointerEvents="none",G.setAttribute("id","echarts"),G.setAttribute("class","echartMap"),this._mapContainer.container.appendChild(G),this._echartsContainer=G,co.glMap=F,co.init(G)},k.prototype.dispose=function(){this._echartsContainer&&(this._mapContainer.container.removeChild(this._echartsContainer),this._echartsContainer=null),this._overlay&&(this._overlay.dispose(),this._overlay=null)},k.prototype.destroy=function(){this.dispose()},k.prototype.updateOverlay=function(F){this._overlay&&this._overlay.setOption(F)},k.prototype.getMap=function(){return this._mapContainer},k.prototype.getOverlay=function(){return this._overlay},T.exports=k}])});var P3=UT.FlowEcharts;})();
public/CIMSDK/Workers/AttributeCompression-10297289.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./Math-76ce6367"],(function(t,e,n,o,a,c){"use strict";const r={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",getMathType:function(t){switch(t){case r.SCALAR:return Number;case r.VEC2:return e.Cartesian2;case r.VEC3:return n.Cartesian3;case r.VEC4:return e.Cartesian4;case r.MAT2:return e.Matrix2;case r.MAT3:return n.Matrix3;case r.MAT4:return e.Matrix4}},getNumberOfComponents:function(t){switch(t){case r.SCALAR:return 1;case r.VEC2:return 2;case r.VEC3:return 3;case r.VEC4:case r.MAT2:return 4;case r.MAT3:return 9;case r.MAT4:return 16}},getAttributeLocationCount:function(t){switch(t){case r.SCALAR:case r.VEC2:case r.VEC3:case r.VEC4:return 1;case r.MAT2:return 2;case r.MAT3:return 3;case r.MAT4:return 4}},getGlslType:function(t){switch(t){case r.SCALAR:return"float";case r.VEC2:return"vec2";case r.VEC3:return"vec3";case r.VEC4:return"vec4";case r.MAT2:return"mat2";case r.MAT3:return"mat3";case r.MAT4:return"mat4"}}};var s=Object.freeze(r);const u=1/256,i={octEncodeInRange:function(t,e,n){if(n.x=t.x/(Math.abs(t.x)+Math.abs(t.y)+Math.abs(t.z)),n.y=t.y/(Math.abs(t.x)+Math.abs(t.y)+Math.abs(t.z)),t.z<0){const t=n.x,e=n.y;n.x=(1-Math.abs(e))*c.CesiumMath.signNotZero(t),n.y=(1-Math.abs(t))*c.CesiumMath.signNotZero(e)}return n.x=c.CesiumMath.toSNorm(n.x,e),n.y=c.CesiumMath.toSNorm(n.y,e),n},octEncode:function(t,e){return i.octEncodeInRange(t,255,e)}},C=new e.Cartesian2,M=new Uint8Array(1);function f(t){return M[0]=t,M[0]}i.octEncodeToCartesian4=function(t,e){return i.octEncodeInRange(t,65535,C),e.x=f(C.x*u),e.y=f(C.x),e.z=f(C.y*u),e.w=f(C.y),e},i.octDecodeInRange=function(t,e,o,a){if(a.x=c.CesiumMath.fromSNorm(t,o),a.y=c.CesiumMath.fromSNorm(e,o),a.z=1-(Math.abs(a.x)+Math.abs(a.y)),a.z<0){const t=a.x;a.x=(1-Math.abs(a.y))*c.CesiumMath.signNotZero(t),a.y=(1-Math.abs(t))*c.CesiumMath.signNotZero(a.y)}return n.Cartesian3.normalize(a,a)},i.octDecode=function(t,e,n){return i.octDecodeInRange(t,e,255,n)},i.octDecodeFromCartesian4=function(t,e){const n=256*t.x+t.y,o=256*t.z+t.w;return i.octDecodeInRange(n,o,65535,e)},i.octPackFloat=function(t){return 256*t.x+t.y};const d=new e.Cartesian2;function m(t){return t>>1^-(1&t)}i.octEncodeFloat=function(t){return i.octEncode(t,d),i.octPackFloat(d)},i.octDecodeFloat=function(t,e){const n=t/256,o=Math.floor(n),a=256*(n-o);return i.octDecode(o,a,e)},i.octPack=function(t,e,n,o){const a=i.octEncodeFloat(t),c=i.octEncodeFloat(e),r=i.octEncode(n,d);return o.x=65536*r.x+a,o.y=65536*r.y+c,o},i.octUnpack=function(t,e,n,o){let a=t.x/65536;const c=Math.floor(a),r=65536*(a-c);a=t.y/65536;const s=Math.floor(a),u=65536*(a-s);i.octDecodeFloat(r,e),i.octDecodeFloat(u,n),i.octDecode(c,s,o)},i.compressTextureCoordinates=function(t){return 4096*(4095*t.x|0)+(4095*t.y|0)},i.decompressTextureCoordinates=function(t,e){const n=t/4096,o=Math.floor(n);return e.x=o/4095,e.y=(t-4096*o)/4095,e},i.zigZagDeltaDecode=function(t,e,n){const o=t.length;let c=0,r=0,s=0;for(let u=0;u<o;++u)c+=m(t[u]),r+=m(e[u]),t[u]=c,e[u]=r,a.defined(n)&&(s+=m(n[u]),n[u]=s)},i.dequantize=function(t,e,n,a){const c=s.getNumberOfComponents(n);let r;switch(e){case o.ComponentDatatype.BYTE:r=127;break;case o.ComponentDatatype.UNSIGNED_BYTE:r=255;break;case o.ComponentDatatype.SHORT:r=32767;break;case o.ComponentDatatype.UNSIGNED_SHORT:r=65535;break;case o.ComponentDatatype.INT:r=2147483647;break;case o.ComponentDatatype.UNSIGNED_INT:r=4294967295}const u=new Float32Array(a*c);for(let e=0;e<a;e++)for(let n=0;n<c;n++){const o=e*c+n;u[o]=Math.max(t[o]/r,-1)}return u},i.decodeRGB565=function(t,e){const n=t.length;a.defined(e)||(e=new Float32Array(3*n));const o=1/31;for(let a=0;a<n;a++){const n=t[a],c=n>>11,r=n>>5&63,s=31&n,u=3*a;e[u]=c*o,e[u+1]=.015873015873015872*r,e[u+2]=s*o}return e};var y=i;t.AttributeCompression=y}));
public/CIMSDK/Workers/AxisAlignedBoundingBox-73c388a7.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./defaultValue-865ac579","./Transforms-221c7c82"],(function(e,n,t,i){"use strict";function a(e,i,a){this.minimum=n.Cartesian3.clone(t.defaultValue(e,n.Cartesian3.ZERO)),this.maximum=n.Cartesian3.clone(t.defaultValue(i,n.Cartesian3.ZERO)),a=t.defined(a)?n.Cartesian3.clone(a):n.Cartesian3.midpoint(this.minimum,this.maximum,new n.Cartesian3),this.center=a}a.fromCorners=function(e,i,m){return t.defined(m)||(m=new a),m.minimum=n.Cartesian3.clone(e,m.minimum),m.maximum=n.Cartesian3.clone(i,m.maximum),m.center=n.Cartesian3.midpoint(e,i,m.center),m},a.fromPoints=function(e,i){if(t.defined(i)||(i=new a),!t.defined(e)||0===e.length)return i.minimum=n.Cartesian3.clone(n.Cartesian3.ZERO,i.minimum),i.maximum=n.Cartesian3.clone(n.Cartesian3.ZERO,i.maximum),i.center=n.Cartesian3.clone(n.Cartesian3.ZERO,i.center),i;let m=e[0].x,r=e[0].y,s=e[0].z,u=e[0].x,c=e[0].y,o=e[0].z;const l=e.length;for(let n=1;n<l;n++){const t=e[n],i=t.x,a=t.y,l=t.z;m=Math.min(i,m),u=Math.max(i,u),r=Math.min(a,r),c=Math.max(a,c),s=Math.min(l,s),o=Math.max(l,o)}const C=i.minimum;C.x=m,C.y=r,C.z=s;const f=i.maximum;return f.x=u,f.y=c,f.z=o,i.center=n.Cartesian3.midpoint(C,f,i.center),i},a.clone=function(e,i){if(t.defined(e))return t.defined(i)?(i.minimum=n.Cartesian3.clone(e.minimum,i.minimum),i.maximum=n.Cartesian3.clone(e.maximum,i.maximum),i.center=n.Cartesian3.clone(e.center,i.center),i):new a(e.minimum,e.maximum,e.center)},a.equals=function(e,i){return e===i||t.defined(e)&&t.defined(i)&&n.Cartesian3.equals(e.center,i.center)&&n.Cartesian3.equals(e.minimum,i.minimum)&&n.Cartesian3.equals(e.maximum,i.maximum)};let m=new n.Cartesian3;a.intersectPlane=function(e,t){m=n.Cartesian3.subtract(e.maximum,e.minimum,m);const a=n.Cartesian3.multiplyByScalar(m,.5,m),r=t.normal,s=a.x*Math.abs(r.x)+a.y*Math.abs(r.y)+a.z*Math.abs(r.z),u=n.Cartesian3.dot(e.center,r)+t.distance;return u-s>0?i.Intersect.INSIDE:u+s<0?i.Intersect.OUTSIDE:i.Intersect.INTERSECTING},a.prototype.clone=function(e){return a.clone(this,e)},a.prototype.intersectPlane=function(e){return a.intersectPlane(this,e)},a.prototype.equals=function(e){return a.equals(this,e)},e.AxisAlignedBoundingBox=a}));
public/CIMSDK/Workers/BoundingRectangle-272c38cc.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./defaultValue-865ac579","./Transforms-221c7c82"],(function(t,e,n,i,h){"use strict";function r(t,e,n,h){this.x=i.defaultValue(t,0),this.y=i.defaultValue(e,0),this.width=i.defaultValue(n,0),this.height=i.defaultValue(h,0)}r.packedLength=4,r.pack=function(t,e,n){return n=i.defaultValue(n,0),e[n++]=t.x,e[n++]=t.y,e[n++]=t.width,e[n]=t.height,e},r.unpack=function(t,e,n){return e=i.defaultValue(e,0),i.defined(n)||(n=new r),n.x=t[e++],n.y=t[e++],n.width=t[e++],n.height=t[e],n},r.fromPoints=function(t,e){if(i.defined(e)||(e=new r),!i.defined(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;const n=t.length;let h=t[0].x,d=t[0].y,a=t[0].x,u=t[0].y;for(let e=1;e<n;e++){const n=t[e],i=n.x,r=n.y;h=Math.min(i,h),a=Math.max(i,a),d=Math.min(r,d),u=Math.max(r,u)}return e.x=h,e.y=d,e.width=a-h,e.height=u-d,e};const d=new h.GeographicProjection,a=new n.Cartographic,u=new n.Cartographic;r.fromRectangle=function(t,n,h){if(i.defined(h)||(h=new r),!i.defined(t))return h.x=0,h.y=0,h.width=0,h.height=0,h;const c=(n=i.defaultValue(n,d)).project(e.Rectangle.southwest(t,a)),o=n.project(e.Rectangle.northeast(t,u));return e.Cartesian2.subtract(o,c,o),h.x=c.x,h.y=c.y,h.width=o.x,h.height=o.y,h},r.clone=function(t,e){if(i.defined(t))return i.defined(e)?(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e):new r(t.x,t.y,t.width,t.height)},r.union=function(t,e,n){i.defined(n)||(n=new r);const h=Math.min(t.x,e.x),d=Math.min(t.y,e.y),a=Math.max(t.x+t.width,e.x+e.width),u=Math.max(t.y+t.height,e.y+e.height);return n.x=h,n.y=d,n.width=a-h,n.height=u-d,n},r.expand=function(t,e,n){n=r.clone(t,n);const i=e.x-n.x,h=e.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=e.x),h>n.height?n.height=h:h<0&&(n.height-=h,n.y=e.y),n},r.intersect=function(t,e){const n=t.x,i=t.y,r=e.x,d=e.y;return n>r+e.width||n+t.width<r||i+t.height<d||i>d+e.height?h.Intersect.OUTSIDE:h.Intersect.INTERSECTING},r.equals=function(t,e){return t===e||i.defined(t)&&i.defined(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},r.prototype.clone=function(t){return r.clone(this,t)},r.prototype.intersect=function(t){return r.intersect(this,t)},r.prototype.equals=function(t){return r.equals(this,t)},t.BoundingRectangle=r}));
public/CIMSDK/Workers/BoxGeometry-fa81cb29.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./VertexFormat-20b5279f"],(function(t,e,n,a,r,i,o,m,u){"use strict";const s=new n.Cartesian3;function y(t){const e=(t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT)).minimum,a=t.maximum,i=r.defaultValue(t.vertexFormat,u.VertexFormat.DEFAULT);this._minimum=n.Cartesian3.clone(e),this._maximum=n.Cartesian3.clone(a),this._vertexFormat=i,this._offsetAttribute=t.offsetAttribute,this._workerName="createBoxGeometry"}y.fromDimensions=function(t){const e=(t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT)).dimensions,a=n.Cartesian3.multiplyByScalar(e,.5,new n.Cartesian3);return new y({minimum:n.Cartesian3.negate(a,new n.Cartesian3),maximum:a,vertexFormat:t.vertexFormat,offsetAttribute:t.offsetAttribute})},y.fromAxisAlignedBoundingBox=function(t){return new y({minimum:t.minimum,maximum:t.maximum})},y.packedLength=2*n.Cartesian3.packedLength+u.VertexFormat.packedLength+1,y.pack=function(t,e,a){return a=r.defaultValue(a,0),n.Cartesian3.pack(t._minimum,e,a),n.Cartesian3.pack(t._maximum,e,a+n.Cartesian3.packedLength),u.VertexFormat.pack(t._vertexFormat,e,a+2*n.Cartesian3.packedLength),e[a+2*n.Cartesian3.packedLength+u.VertexFormat.packedLength]=r.defaultValue(t._offsetAttribute,-1),e};const c=new n.Cartesian3,p=new n.Cartesian3,x=new u.VertexFormat,f={minimum:c,maximum:p,vertexFormat:x,offsetAttribute:void 0};let l;y.unpack=function(t,e,a){e=r.defaultValue(e,0);const i=n.Cartesian3.unpack(t,e,c),o=n.Cartesian3.unpack(t,e+n.Cartesian3.packedLength,p),m=u.VertexFormat.unpack(t,e+2*n.Cartesian3.packedLength,x),s=t[e+2*n.Cartesian3.packedLength+u.VertexFormat.packedLength];return r.defined(a)?(a._minimum=n.Cartesian3.clone(i,a._minimum),a._maximum=n.Cartesian3.clone(o,a._maximum),a._vertexFormat=u.VertexFormat.clone(m,a._vertexFormat),a._offsetAttribute=-1===s?void 0:s,a):(f.offsetAttribute=-1===s?void 0:s,new y(f))},y.createGeometry=function(t){const u=t._minimum,y=t._maximum,c=t._vertexFormat;if(n.Cartesian3.equals(u,y))return;const p=new o.GeometryAttributes;let x,f;if(c.position&&(c.st||c.normal||c.tangent||c.bitangent)){if(c.position&&(f=new Float64Array(72),f[0]=u.x,f[1]=u.y,f[2]=y.z,f[3]=y.x,f[4]=u.y,f[5]=y.z,f[6]=y.x,f[7]=y.y,f[8]=y.z,f[9]=u.x,f[10]=y.y,f[11]=y.z,f[12]=u.x,f[13]=u.y,f[14]=u.z,f[15]=y.x,f[16]=u.y,f[17]=u.z,f[18]=y.x,f[19]=y.y,f[20]=u.z,f[21]=u.x,f[22]=y.y,f[23]=u.z,f[24]=y.x,f[25]=u.y,f[26]=u.z,f[27]=y.x,f[28]=y.y,f[29]=u.z,f[30]=y.x,f[31]=y.y,f[32]=y.z,f[33]=y.x,f[34]=u.y,f[35]=y.z,f[36]=u.x,f[37]=u.y,f[38]=u.z,f[39]=u.x,f[40]=y.y,f[41]=u.z,f[42]=u.x,f[43]=y.y,f[44]=y.z,f[45]=u.x,f[46]=u.y,f[47]=y.z,f[48]=u.x,f[49]=y.y,f[50]=u.z,f[51]=y.x,f[52]=y.y,f[53]=u.z,f[54]=y.x,f[55]=y.y,f[56]=y.z,f[57]=u.x,f[58]=y.y,f[59]=y.z,f[60]=u.x,f[61]=u.y,f[62]=u.z,f[63]=y.x,f[64]=u.y,f[65]=u.z,f[66]=y.x,f[67]=u.y,f[68]=y.z,f[69]=u.x,f[70]=u.y,f[71]=y.z,p.position=new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f})),c.normal){const t=new Float32Array(72);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,t[12]=0,t[13]=0,t[14]=-1,t[15]=0,t[16]=0,t[17]=-1,t[18]=0,t[19]=0,t[20]=-1,t[21]=0,t[22]=0,t[23]=-1,t[24]=1,t[25]=0,t[26]=0,t[27]=1,t[28]=0,t[29]=0,t[30]=1,t[31]=0,t[32]=0,t[33]=1,t[34]=0,t[35]=0,t[36]=-1,t[37]=0,t[38]=0,t[39]=-1,t[40]=0,t[41]=0,t[42]=-1,t[43]=0,t[44]=0,t[45]=-1,t[46]=0,t[47]=0,t[48]=0,t[49]=1,t[50]=0,t[51]=0,t[52]=1,t[53]=0,t[54]=0,t[55]=1,t[56]=0,t[57]=0,t[58]=1,t[59]=0,t[60]=0,t[61]=-1,t[62]=0,t[63]=0,t[64]=-1,t[65]=0,t[66]=0,t[67]=-1,t[68]=0,t[69]=0,t[70]=-1,t[71]=0,p.normal=new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(c.st){const t=new Float32Array(48);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,t[8]=1,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=1,t[14]=1,t[15]=1,t[16]=0,t[17]=0,t[18]=1,t[19]=0,t[20]=1,t[21]=1,t[22]=0,t[23]=1,t[24]=1,t[25]=0,t[26]=0,t[27]=0,t[28]=0,t[29]=1,t[30]=1,t[31]=1,t[32]=1,t[33]=0,t[34]=0,t[35]=0,t[36]=0,t[37]=1,t[38]=1,t[39]=1,t[40]=0,t[41]=0,t[42]=1,t[43]=0,t[44]=1,t[45]=1,t[46]=0,t[47]=1,p.st=new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}if(c.tangent){const t=new Float32Array(72);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,t[12]=-1,t[13]=0,t[14]=0,t[15]=-1,t[16]=0,t[17]=0,t[18]=-1,t[19]=0,t[20]=0,t[21]=-1,t[22]=0,t[23]=0,t[24]=0,t[25]=1,t[26]=0,t[27]=0,t[28]=1,t[29]=0,t[30]=0,t[31]=1,t[32]=0,t[33]=0,t[34]=1,t[35]=0,t[36]=0,t[37]=-1,t[38]=0,t[39]=0,t[40]=-1,t[41]=0,t[42]=0,t[43]=-1,t[44]=0,t[45]=0,t[46]=-1,t[47]=0,t[48]=-1,t[49]=0,t[50]=0,t[51]=-1,t[52]=0,t[53]=0,t[54]=-1,t[55]=0,t[56]=0,t[57]=-1,t[58]=0,t[59]=0,t[60]=1,t[61]=0,t[62]=0,t[63]=1,t[64]=0,t[65]=0,t[66]=1,t[67]=0,t[68]=0,t[69]=1,t[70]=0,t[71]=0,p.tangent=new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(c.bitangent){const t=new Float32Array(72);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=1,t[14]=0,t[15]=0,t[16]=1,t[17]=0,t[18]=0,t[19]=1,t[20]=0,t[21]=0,t[22]=1,t[23]=0,t[24]=0,t[25]=0,t[26]=1,t[27]=0,t[28]=0,t[29]=1,t[30]=0,t[31]=0,t[32]=1,t[33]=0,t[34]=0,t[35]=1,t[36]=0,t[37]=0,t[38]=1,t[39]=0,t[40]=0,t[41]=1,t[42]=0,t[43]=0,t[44]=1,t[45]=0,t[46]=0,t[47]=1,t[48]=0,t[49]=0,t[50]=1,t[51]=0,t[52]=0,t[53]=1,t[54]=0,t[55]=0,t[56]=1,t[57]=0,t[58]=0,t[59]=1,t[60]=0,t[61]=0,t[62]=1,t[63]=0,t[64]=0,t[65]=1,t[66]=0,t[67]=0,t[68]=1,t[69]=0,t[70]=0,t[71]=1,p.bitangent=new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}x=new Uint16Array(36),x[0]=0,x[1]=1,x[2]=2,x[3]=0,x[4]=2,x[5]=3,x[6]=6,x[7]=5,x[8]=4,x[9]=7,x[10]=6,x[11]=4,x[12]=8,x[13]=9,x[14]=10,x[15]=8,x[16]=10,x[17]=11,x[18]=14,x[19]=13,x[20]=12,x[21]=15,x[22]=14,x[23]=12,x[24]=18,x[25]=17,x[26]=16,x[27]=19,x[28]=18,x[29]=16,x[30]=20,x[31]=21,x[32]=22,x[33]=20,x[34]=22,x[35]=23}else f=new Float64Array(24),f[0]=u.x,f[1]=u.y,f[2]=u.z,f[3]=y.x,f[4]=u.y,f[5]=u.z,f[6]=y.x,f[7]=y.y,f[8]=u.z,f[9]=u.x,f[10]=y.y,f[11]=u.z,f[12]=u.x,f[13]=u.y,f[14]=y.z,f[15]=y.x,f[16]=u.y,f[17]=y.z,f[18]=y.x,f[19]=y.y,f[20]=y.z,f[21]=u.x,f[22]=y.y,f[23]=y.z,p.position=new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f}),x=new Uint16Array(36),x[0]=4,x[1]=5,x[2]=6,x[3]=4,x[4]=6,x[5]=7,x[6]=1,x[7]=0,x[8]=3,x[9]=1,x[10]=3,x[11]=2,x[12]=1,x[13]=6,x[14]=5,x[15]=1,x[16]=2,x[17]=6,x[18]=2,x[19]=3,x[20]=7,x[21]=2,x[22]=7,x[23]=6,x[24]=3,x[25]=0,x[26]=4,x[27]=3,x[28]=4,x[29]=7,x[30]=0,x[31]=1,x[32]=5,x[33]=0,x[34]=5,x[35]=4;const l=n.Cartesian3.subtract(y,u,s),A=.5*n.Cartesian3.magnitude(l);if(r.defined(t._offsetAttribute)){const e=f.length,n=t._offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1,r=new Uint8Array(e/3).fill(n);p.applyOffset=new i.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}return new i.Geometry({attributes:p,indices:x,primitiveType:i.PrimitiveType.TRIANGLES,boundingSphere:new e.BoundingSphere(n.Cartesian3.ZERO,A),offsetAttribute:t._offsetAttribute})},y.getUnitBox=function(){return r.defined(l)||(l=y.createGeometry(y.fromDimensions({dimensions:new n.Cartesian3(1,1,1),vertexFormat:u.VertexFormat.POSITION_ONLY}))),l},t.BoxGeometry=y}));
public/CIMSDK/Workers/Color-fb2d0086.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./defaultValue-865ac579","./Transforms-221c7c82","./Math-76ce6367"],(function(e,r,t,o){"use strict";function f(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),6*t<1?e+6*(r-e)*t:2*t<1?r:3*t<2?e+(r-e)*(2/3-t)*6:e}function s(e,t,o,f){this.red=r.defaultValue(e,1),this.green=r.defaultValue(t,1),this.blue=r.defaultValue(o,1),this.alpha=r.defaultValue(f,1)}let n,l,C;s.fromCartesian4=function(e,t){return r.defined(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new s(e.x,e.y,e.z,e.w)},s.fromBytes=function(e,t,o,f,n){return e=s.byteToFloat(r.defaultValue(e,255)),t=s.byteToFloat(r.defaultValue(t,255)),o=s.byteToFloat(r.defaultValue(o,255)),f=s.byteToFloat(r.defaultValue(f,255)),r.defined(n)?(n.red=e,n.green=t,n.blue=o,n.alpha=f,n):new s(e,t,o,f)},s.fromAlpha=function(e,t,o){return r.defined(o)?(o.red=e.red,o.green=e.green,o.blue=e.blue,o.alpha=t,o):new s(e.red,e.green,e.blue,t)},t.FeatureDetection.supportsTypedArrays()&&(n=new ArrayBuffer(4),l=new Uint32Array(n),C=new Uint8Array(n)),s.fromRgba=function(e,r){return l[0]=e,s.fromBytes(C[0],C[1],C[2],C[3],r)},s.fromHsl=function(e,t,o,n,l){e=r.defaultValue(e,0)%1,t=r.defaultValue(t,0),o=r.defaultValue(o,0),n=r.defaultValue(n,1);let C=o,i=o,a=o;if(0!==t){let r;r=o<.5?o*(1+t):o+t-o*t;const s=2*o-r;C=f(s,r,e+1/3),i=f(s,r,e),a=f(s,r,e-1/3)}return r.defined(l)?(l.red=C,l.green=i,l.blue=a,l.alpha=n,l):new s(C,i,a,n)},s.fromRandom=function(e,t){let f=(e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT)).red;if(!r.defined(f)){const t=r.defaultValue(e.minimumRed,0),s=r.defaultValue(e.maximumRed,1);f=t+o.CesiumMath.nextRandomNumber()*(s-t)}let n=e.green;if(!r.defined(n)){const t=r.defaultValue(e.minimumGreen,0),f=r.defaultValue(e.maximumGreen,1);n=t+o.CesiumMath.nextRandomNumber()*(f-t)}let l=e.blue;if(!r.defined(l)){const t=r.defaultValue(e.minimumBlue,0),f=r.defaultValue(e.maximumBlue,1);l=t+o.CesiumMath.nextRandomNumber()*(f-t)}let C=e.alpha;if(!r.defined(C)){const t=r.defaultValue(e.minimumAlpha,0),f=r.defaultValue(e.maximumAlpha,1);C=t+o.CesiumMath.nextRandomNumber()*(f-t)}return r.defined(t)?(t.red=f,t.green=n,t.blue=l,t.alpha=C,t):new s(f,n,l,C)};const i=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,a=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,E=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,u=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;s.fromCssColorString=function(e,t){r.defined(t)||(t=new s);const o=s[(e=e.replace(/\s/g,"")).toUpperCase()];if(r.defined(o))return s.clone(o,t),t;let f=i.exec(e);return null!==f?(t.red=parseInt(f[1],16)/15,t.green=parseInt(f[2],16)/15,t.blue=parseInt(f[3],16)/15,t.alpha=parseInt(r.defaultValue(f[4],"f"),16)/15,t):(f=a.exec(e),null!==f?(t.red=parseInt(f[1],16)/255,t.green=parseInt(f[2],16)/255,t.blue=parseInt(f[3],16)/255,t.alpha=parseInt(r.defaultValue(f[4],"ff"),16)/255,t):(f=E.exec(e),null!==f?(t.red=parseFloat(f[1])/("%"===f[1].substr(-1)?100:255),t.green=parseFloat(f[2])/("%"===f[2].substr(-1)?100:255),t.blue=parseFloat(f[3])/("%"===f[3].substr(-1)?100:255),t.alpha=parseFloat(r.defaultValue(f[4],"1.0")),t):(f=u.exec(e),null!==f?s.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(r.defaultValue(f[4],"1.0")),t):t=void 0)))},s.packedLength=4,s.pack=function(e,t,o){return o=r.defaultValue(o,0),t[o++]=e.red,t[o++]=e.green,t[o++]=e.blue,t[o]=e.alpha,t},s.unpack=function(e,t,o){return t=r.defaultValue(t,0),r.defined(o)||(o=new s),o.red=e[t++],o.green=e[t++],o.blue=e[t++],o.alpha=e[t],o},s.byteToFloat=function(e){return e/255},s.floatToByte=function(e){return 1===e?255:256*e|0},s.clone=function(e,t){if(r.defined(e))return r.defined(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new s(e.red,e.green,e.blue,e.alpha)},s.equals=function(e,t){return e===t||r.defined(e)&&r.defined(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},s.equalsArray=function(e,r,t){return e.red===r[t]&&e.green===r[t+1]&&e.blue===r[t+2]&&e.alpha===r[t+3]},s.prototype.clone=function(e){return s.clone(this,e)},s.prototype.equals=function(e){return s.equals(this,e)},s.prototype.equalsEpsilon=function(e,t){return this===e||r.defined(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},s.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`},s.prototype.toCssColorString=function(){const e=s.floatToByte(this.red),r=s.floatToByte(this.green),t=s.floatToByte(this.blue);return 1===this.alpha?`rgb(${e},${r},${t})`:`rgba(${e},${r},${t},${this.alpha})`},s.prototype.toCssHexString=function(){let e=s.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let r=s.floatToByte(this.green).toString(16);r.length<2&&(r=`0${r}`);let t=s.floatToByte(this.blue).toString(16);if(t.length<2&&(t=`0${t}`),this.alpha<1){let o=s.floatToByte(this.alpha).toString(16);return o.length<2&&(o=`0${o}`),`#${e}${r}${t}${o}`}return`#${e}${r}${t}`},s.prototype.toBytes=function(e){const t=s.floatToByte(this.red),o=s.floatToByte(this.green),f=s.floatToByte(this.blue),n=s.floatToByte(this.alpha);return r.defined(e)?(e[0]=t,e[1]=o,e[2]=f,e[3]=n,e):[t,o,f,n]},s.prototype.toRgba=function(){return C[0]=s.floatToByte(this.red),C[1]=s.floatToByte(this.green),C[2]=s.floatToByte(this.blue),C[3]=s.floatToByte(this.alpha),l[0]},s.prototype.brighten=function(e,r){return e=1-e,r.red=1-(1-this.red)*e,r.green=1-(1-this.green)*e,r.blue=1-(1-this.blue)*e,r.alpha=this.alpha,r},s.prototype.darken=function(e,r){return e=1-e,r.red=this.red*e,r.green=this.green*e,r.blue=this.blue*e,r.alpha=this.alpha,r},s.prototype.withAlpha=function(e,r){return s.fromAlpha(this,e,r)},s.add=function(e,r,t){return t.red=e.red+r.red,t.green=e.green+r.green,t.blue=e.blue+r.blue,t.alpha=e.alpha+r.alpha,t},s.subtract=function(e,r,t){return t.red=e.red-r.red,t.green=e.green-r.green,t.blue=e.blue-r.blue,t.alpha=e.alpha-r.alpha,t},s.multiply=function(e,r,t){return t.red=e.red*r.red,t.green=e.green*r.green,t.blue=e.blue*r.blue,t.alpha=e.alpha*r.alpha,t},s.divide=function(e,r,t){return t.red=e.red/r.red,t.green=e.green/r.green,t.blue=e.blue/r.blue,t.alpha=e.alpha/r.alpha,t},s.mod=function(e,r,t){return t.red=e.red%r.red,t.green=e.green%r.green,t.blue=e.blue%r.blue,t.alpha=e.alpha%r.alpha,t},s.lerp=function(e,r,t,f){return f.red=o.CesiumMath.lerp(e.red,r.red,t),f.green=o.CesiumMath.lerp(e.green,r.green,t),f.blue=o.CesiumMath.lerp(e.blue,r.blue,t),f.alpha=o.CesiumMath.lerp(e.alpha,r.alpha,t),f},s.multiplyByScalar=function(e,r,t){return t.red=e.red*r,t.green=e.green*r,t.blue=e.blue*r,t.alpha=e.alpha*r,t},s.divideByScalar=function(e,r,t){return t.red=e.red/r,t.green=e.green/r,t.blue=e.blue/r,t.alpha=e.alpha/r,t},s.ALICEBLUE=Object.freeze(s.fromCssColorString("#F0F8FF")),s.ANTIQUEWHITE=Object.freeze(s.fromCssColorString("#FAEBD7")),s.AQUA=Object.freeze(s.fromCssColorString("#00FFFF")),s.AQUAMARINE=Object.freeze(s.fromCssColorString("#7FFFD4")),s.AZURE=Object.freeze(s.fromCssColorString("#F0FFFF")),s.BEIGE=Object.freeze(s.fromCssColorString("#F5F5DC")),s.BISQUE=Object.freeze(s.fromCssColorString("#FFE4C4")),s.BLACK=Object.freeze(s.fromCssColorString("#000000")),s.BLANCHEDALMOND=Object.freeze(s.fromCssColorString("#FFEBCD")),s.BLUE=Object.freeze(s.fromCssColorString("#0000FF")),s.BLUEVIOLET=Object.freeze(s.fromCssColorString("#8A2BE2")),s.BROWN=Object.freeze(s.fromCssColorString("#A52A2A")),s.BURLYWOOD=Object.freeze(s.fromCssColorString("#DEB887")),s.CADETBLUE=Object.freeze(s.fromCssColorString("#5F9EA0")),s.CHARTREUSE=Object.freeze(s.fromCssColorString("#7FFF00")),s.CHOCOLATE=Object.freeze(s.fromCssColorString("#D2691E")),s.CORAL=Object.freeze(s.fromCssColorString("#FF7F50")),s.CORNFLOWERBLUE=Object.freeze(s.fromCssColorString("#6495ED")),s.CORNSILK=Object.freeze(s.fromCssColorString("#FFF8DC")),s.CRIMSON=Object.freeze(s.fromCssColorString("#DC143C")),s.CYAN=Object.freeze(s.fromCssColorString("#00FFFF")),s.DARKBLUE=Object.freeze(s.fromCssColorString("#00008B")),s.DARKCYAN=Object.freeze(s.fromCssColorString("#008B8B")),s.DARKGOLDENROD=Object.freeze(s.fromCssColorString("#B8860B")),s.DARKGRAY=Object.freeze(s.fromCssColorString("#A9A9A9")),s.DARKGREEN=Object.freeze(s.fromCssColorString("#006400")),s.DARKGREY=s.DARKGRAY,s.DARKKHAKI=Object.freeze(s.fromCssColorString("#BDB76B")),s.DARKMAGENTA=Object.freeze(s.fromCssColorString("#8B008B")),s.DARKOLIVEGREEN=Object.freeze(s.fromCssColorString("#556B2F")),s.DARKORANGE=Object.freeze(s.fromCssColorString("#FF8C00")),s.DARKORCHID=Object.freeze(s.fromCssColorString("#9932CC")),s.DARKRED=Object.freeze(s.fromCssColorString("#8B0000")),s.DARKSALMON=Object.freeze(s.fromCssColorString("#E9967A")),s.DARKSEAGREEN=Object.freeze(s.fromCssColorString("#8FBC8F")),s.DARKSLATEBLUE=Object.freeze(s.fromCssColorString("#483D8B")),s.DARKSLATEGRAY=Object.freeze(s.fromCssColorString("#2F4F4F")),s.DARKSLATEGREY=s.DARKSLATEGRAY,s.DARKTURQUOISE=Object.freeze(s.fromCssColorString("#00CED1")),s.DARKVIOLET=Object.freeze(s.fromCssColorString("#9400D3")),s.DEEPPINK=Object.freeze(s.fromCssColorString("#FF1493")),s.DEEPSKYBLUE=Object.freeze(s.fromCssColorString("#00BFFF")),s.DIMGRAY=Object.freeze(s.fromCssColorString("#696969")),s.DIMGREY=s.DIMGRAY,s.DODGERBLUE=Object.freeze(s.fromCssColorString("#1E90FF")),s.FIREBRICK=Object.freeze(s.fromCssColorString("#B22222")),s.FLORALWHITE=Object.freeze(s.fromCssColorString("#FFFAF0")),s.FORESTGREEN=Object.freeze(s.fromCssColorString("#228B22")),s.FUCHSIA=Object.freeze(s.fromCssColorString("#FF00FF")),s.GAINSBORO=Object.freeze(s.fromCssColorString("#DCDCDC")),s.GHOSTWHITE=Object.freeze(s.fromCssColorString("#F8F8FF")),s.GOLD=Object.freeze(s.fromCssColorString("#FFD700")),s.GOLDENROD=Object.freeze(s.fromCssColorString("#DAA520")),s.GRAY=Object.freeze(s.fromCssColorString("#808080")),s.GREEN=Object.freeze(s.fromCssColorString("#008000")),s.GREENYELLOW=Object.freeze(s.fromCssColorString("#ADFF2F")),s.GREY=s.GRAY,s.HONEYDEW=Object.freeze(s.fromCssColorString("#F0FFF0")),s.HOTPINK=Object.freeze(s.fromCssColorString("#FF69B4")),s.INDIANRED=Object.freeze(s.fromCssColorString("#CD5C5C")),s.INDIGO=Object.freeze(s.fromCssColorString("#4B0082")),s.IVORY=Object.freeze(s.fromCssColorString("#FFFFF0")),s.KHAKI=Object.freeze(s.fromCssColorString("#F0E68C")),s.LAVENDER=Object.freeze(s.fromCssColorString("#E6E6FA")),s.LAVENDAR_BLUSH=Object.freeze(s.fromCssColorString("#FFF0F5")),s.LAWNGREEN=Object.freeze(s.fromCssColorString("#7CFC00")),s.LEMONCHIFFON=Object.freeze(s.fromCssColorString("#FFFACD")),s.LIGHTBLUE=Object.freeze(s.fromCssColorString("#ADD8E6")),s.LIGHTCORAL=Object.freeze(s.fromCssColorString("#F08080")),s.LIGHTCYAN=Object.freeze(s.fromCssColorString("#E0FFFF")),s.LIGHTGOLDENRODYELLOW=Object.freeze(s.fromCssColorString("#FAFAD2")),s.LIGHTGRAY=Object.freeze(s.fromCssColorString("#D3D3D3")),s.LIGHTGREEN=Object.freeze(s.fromCssColorString("#90EE90")),s.LIGHTGREY=s.LIGHTGRAY,s.LIGHTPINK=Object.freeze(s.fromCssColorString("#FFB6C1")),s.LIGHTSEAGREEN=Object.freeze(s.fromCssColorString("#20B2AA")),s.LIGHTSKYBLUE=Object.freeze(s.fromCssColorString("#87CEFA")),s.LIGHTSLATEGRAY=Object.freeze(s.fromCssColorString("#778899")),s.LIGHTSLATEGREY=s.LIGHTSLATEGRAY,s.LIGHTSTEELBLUE=Object.freeze(s.fromCssColorString("#B0C4DE")),s.LIGHTYELLOW=Object.freeze(s.fromCssColorString("#FFFFE0")),s.LIME=Object.freeze(s.fromCssColorString("#00FF00")),s.LIMEGREEN=Object.freeze(s.fromCssColorString("#32CD32")),s.LINEN=Object.freeze(s.fromCssColorString("#FAF0E6")),s.MAGENTA=Object.freeze(s.fromCssColorString("#FF00FF")),s.MAROON=Object.freeze(s.fromCssColorString("#800000")),s.MEDIUMAQUAMARINE=Object.freeze(s.fromCssColorString("#66CDAA")),s.MEDIUMBLUE=Object.freeze(s.fromCssColorString("#0000CD")),s.MEDIUMORCHID=Object.freeze(s.fromCssColorString("#BA55D3")),s.MEDIUMPURPLE=Object.freeze(s.fromCssColorString("#9370DB")),s.MEDIUMSEAGREEN=Object.freeze(s.fromCssColorString("#3CB371")),s.MEDIUMSLATEBLUE=Object.freeze(s.fromCssColorString("#7B68EE")),s.MEDIUMSPRINGGREEN=Object.freeze(s.fromCssColorString("#00FA9A")),s.MEDIUMTURQUOISE=Object.freeze(s.fromCssColorString("#48D1CC")),s.MEDIUMVIOLETRED=Object.freeze(s.fromCssColorString("#C71585")),s.MIDNIGHTBLUE=Object.freeze(s.fromCssColorString("#191970")),s.MINTCREAM=Object.freeze(s.fromCssColorString("#F5FFFA")),s.MISTYROSE=Object.freeze(s.fromCssColorString("#FFE4E1")),s.MOCCASIN=Object.freeze(s.fromCssColorString("#FFE4B5")),s.NAVAJOWHITE=Object.freeze(s.fromCssColorString("#FFDEAD")),s.NAVY=Object.freeze(s.fromCssColorString("#000080")),s.OLDLACE=Object.freeze(s.fromCssColorString("#FDF5E6")),s.OLIVE=Object.freeze(s.fromCssColorString("#808000")),s.OLIVEDRAB=Object.freeze(s.fromCssColorString("#6B8E23")),s.ORANGE=Object.freeze(s.fromCssColorString("#FFA500")),s.ORANGERED=Object.freeze(s.fromCssColorString("#FF4500")),s.ORCHID=Object.freeze(s.fromCssColorString("#DA70D6")),s.PALEGOLDENROD=Object.freeze(s.fromCssColorString("#EEE8AA")),s.PALEGREEN=Object.freeze(s.fromCssColorString("#98FB98")),s.PALETURQUOISE=Object.freeze(s.fromCssColorString("#AFEEEE")),s.PALEVIOLETRED=Object.freeze(s.fromCssColorString("#DB7093")),s.PAPAYAWHIP=Object.freeze(s.fromCssColorString("#FFEFD5")),s.PEACHPUFF=Object.freeze(s.fromCssColorString("#FFDAB9")),s.PERU=Object.freeze(s.fromCssColorString("#CD853F")),s.PINK=Object.freeze(s.fromCssColorString("#FFC0CB")),s.PLUM=Object.freeze(s.fromCssColorString("#DDA0DD")),s.POWDERBLUE=Object.freeze(s.fromCssColorString("#B0E0E6")),s.PURPLE=Object.freeze(s.fromCssColorString("#800080")),s.RED=Object.freeze(s.fromCssColorString("#FF0000")),s.ROSYBROWN=Object.freeze(s.fromCssColorString("#BC8F8F")),s.ROYALBLUE=Object.freeze(s.fromCssColorString("#4169E1")),s.SADDLEBROWN=Object.freeze(s.fromCssColorString("#8B4513")),s.SALMON=Object.freeze(s.fromCssColorString("#FA8072")),s.SANDYBROWN=Object.freeze(s.fromCssColorString("#F4A460")),s.SEAGREEN=Object.freeze(s.fromCssColorString("#2E8B57")),s.SEASHELL=Object.freeze(s.fromCssColorString("#FFF5EE")),s.SIENNA=Object.freeze(s.fromCssColorString("#A0522D")),s.SILVER=Object.freeze(s.fromCssColorString("#C0C0C0")),s.SKYBLUE=Object.freeze(s.fromCssColorString("#87CEEB")),s.SLATEBLUE=Object.freeze(s.fromCssColorString("#6A5ACD")),s.SLATEGRAY=Object.freeze(s.fromCssColorString("#708090")),s.SLATEGREY=s.SLATEGRAY,s.SNOW=Object.freeze(s.fromCssColorString("#FFFAFA")),s.SPRINGGREEN=Object.freeze(s.fromCssColorString("#00FF7F")),s.STEELBLUE=Object.freeze(s.fromCssColorString("#4682B4")),s.TAN=Object.freeze(s.fromCssColorString("#D2B48C")),s.TEAL=Object.freeze(s.fromCssColorString("#008080")),s.THISTLE=Object.freeze(s.fromCssColorString("#D8BFD8")),s.TOMATO=Object.freeze(s.fromCssColorString("#FF6347")),s.TURQUOISE=Object.freeze(s.fromCssColorString("#40E0D0")),s.VIOLET=Object.freeze(s.fromCssColorString("#EE82EE")),s.WHEAT=Object.freeze(s.fromCssColorString("#F5DEB3")),s.WHITE=Object.freeze(s.fromCssColorString("#FFFFFF")),s.WHITESMOKE=Object.freeze(s.fromCssColorString("#F5F5F5")),s.YELLOW=Object.freeze(s.fromCssColorString("#FFFF00")),s.YELLOWGREEN=Object.freeze(s.fromCssColorString("#9ACD32")),s.TRANSPARENT=Object.freeze(new s(0,0,0,0)),e.Color=s}));
public/CIMSDK/Workers/CoplanarPolygonGeometryLibrary-616dd2ed.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./OrientedBoundingBox-34fc6856"],(function(n,t,e,r){"use strict";const a={},i=new e.Cartesian3,o=new e.Cartesian3,u=new e.Cartesian3,s=new e.Cartesian3,c=new r.OrientedBoundingBox;function C(n,r,a,o,u){const s=e.Cartesian3.subtract(n,r,i),c=e.Cartesian3.dot(a,s),C=e.Cartesian3.dot(o,s);return t.Cartesian2.fromElements(c,C,u)}a.validOutline=function(n){const t=r.OrientedBoundingBox.fromPoints(n,c).halfAxes,a=e.Matrix3.getColumn(t,0,o),i=e.Matrix3.getColumn(t,1,u),C=e.Matrix3.getColumn(t,2,s),m=e.Cartesian3.magnitude(a),d=e.Cartesian3.magnitude(i),g=e.Cartesian3.magnitude(C);return!(0===m&&(0===d||0===g)||0===d&&0===g)},a.computeProjectTo2DArguments=function(n,t,a,i){const C=r.OrientedBoundingBox.fromPoints(n,c),m=C.halfAxes,d=e.Matrix3.getColumn(m,0,o),g=e.Matrix3.getColumn(m,1,u),l=e.Matrix3.getColumn(m,2,s),f=e.Cartesian3.magnitude(d),x=e.Cartesian3.magnitude(g),M=e.Cartesian3.magnitude(l),B=Math.min(f,x,M);if(0===f&&(0===x||0===M)||0===x&&0===M)return!1;let P,w;return B!==x&&B!==M||(P=d),B===f?P=g:B===M&&(w=g),B!==f&&B!==x||(w=l),e.Cartesian3.normalize(P,a),e.Cartesian3.normalize(w,i),e.Cartesian3.clone(C.center,t),!0},a.createProjectPointsTo2DFunction=function(n,t,e){return function(r){const a=new Array(r.length);for(let i=0;i<r.length;i++)a[i]=C(r[i],n,t,e);return a}},a.createProjectPointTo2DFunction=function(n,t,e){return function(r,a){return C(r,n,t,e,a)}};var m=a;n.CoplanarPolygonGeometryLibrary=m}));
public/CIMSDK/Workers/CorridorGeometryLibrary-e69b5c03.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./PolylineVolumeGeometryLibrary-7de9a48a","./defaultValue-865ac579","./Math-76ce6367","./PolylinePipeline-482bb0f7","./Transforms-221c7c82"],(function(a,e,n,t,r,i,s){"use strict";const o={},l=new e.Cartesian3,C=new e.Cartesian3,c=new e.Cartesian3,y=new e.Cartesian3,u=[new e.Cartesian3,new e.Cartesian3],d=new e.Cartesian3,p=new e.Cartesian3,m=new e.Cartesian3,g=new e.Cartesian3,f=new e.Cartesian3,h=new e.Cartesian3,w=new e.Cartesian3,x=new e.Cartesian3,z=new e.Cartesian3,P=new e.Cartesian3,A=new s.Quaternion,B=new e.Matrix3;function E(a,t,i,o,c){const y=e.Cartesian3.angleBetween(e.Cartesian3.subtract(t,a,l),e.Cartesian3.subtract(i,a,C)),u=o===n.CornerType.BEVELED?1:Math.ceil(y/r.CesiumMath.toRadians(5))+1,d=3*u,p=new Array(d);let m;p[d-3]=i.x,p[d-2]=i.y,p[d-1]=i.z,m=c?e.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(e.Cartesian3.negate(a,l),y/u,A),B):e.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(a,y/u,A),B);let g=0;t=e.Cartesian3.clone(t,l);for(let a=0;a<u;a++)t=e.Matrix3.multiplyByVector(m,t,t),p[g++]=t.x,p[g++]=t.y,p[g++]=t.z;return p}function S(a,n,t,r){let i=l;return r||(n=e.Cartesian3.negate(n,n)),i=e.Cartesian3.add(a,n,i),[i.x,i.y,i.z,t.x,t.y,t.z]}function b(a,n,t,r){const i=new Array(a.length),s=new Array(a.length),o=e.Cartesian3.multiplyByScalar(n,t,l),u=e.Cartesian3.negate(o,C);let d=0,p=a.length-1;for(let n=0;n<a.length;n+=3){const t=e.Cartesian3.fromArray(a,n,c),r=e.Cartesian3.add(t,u,y);i[d++]=r.x,i[d++]=r.y,i[d++]=r.z;const l=e.Cartesian3.add(t,o,y);s[p--]=l.z,s[p--]=l.y,s[p--]=l.x}return r.push(i,s),r}o.addAttribute=function(a,e,n,r){const i=e.x,s=e.y,o=e.z;t.defined(n)&&(a[n]=i,a[n+1]=s,a[n+2]=o),t.defined(r)&&(a[r]=o,a[r-1]=s,a[r-2]=i)};const D=new e.Cartesian3,M=new e.Cartesian3;o.computePositions=function(a){const t=a.granularity,s=a.positions,o=a.ellipsoid,C=a.width/2,c=a.cornerType,y=a.saveAttributes;let A=d,B=p,T=m,N=g,L=f,V=h,O=w,R=x,Q=z,U=P,v=[];const G=y?[]:void 0,I=y?[]:void 0;let q,j=s[0],k=s[1];B=e.Cartesian3.normalize(e.Cartesian3.subtract(k,j,B),B),A=o.geodeticSurfaceNormal(j,A),N=e.Cartesian3.normalize(e.Cartesian3.cross(A,B,N),N),y&&(G.push(N.x,N.y,N.z),I.push(A.x,A.y,A.z)),O=e.Cartesian3.clone(j,O),j=k,T=e.Cartesian3.negate(B,T);const F=[];let H;const J=s.length;for(H=1;H<J-1;H++){A=o.geodeticSurfaceNormal(j,A),k=s[H+1],B=e.Cartesian3.normalize(e.Cartesian3.subtract(k,j,B),B),L=e.Cartesian3.normalize(e.Cartesian3.add(B,T,L),L);const a=e.Cartesian3.multiplyByScalar(A,e.Cartesian3.dot(B,A),D);e.Cartesian3.subtract(B,a,a),e.Cartesian3.normalize(a,a);const d=e.Cartesian3.multiplyByScalar(A,e.Cartesian3.dot(T,A),M);e.Cartesian3.subtract(T,d,d),e.Cartesian3.normalize(d,d);if(!r.CesiumMath.equalsEpsilon(Math.abs(e.Cartesian3.dot(a,d)),1,r.CesiumMath.EPSILON7)){L=e.Cartesian3.cross(L,A,L),L=e.Cartesian3.cross(A,L,L),L=e.Cartesian3.normalize(L,L);const a=C/Math.max(.25,e.Cartesian3.magnitude(e.Cartesian3.cross(L,T,l))),r=n.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(B,T,j,o);L=e.Cartesian3.multiplyByScalar(L,a,L),r?(R=e.Cartesian3.add(j,L,R),U=e.Cartesian3.add(R,e.Cartesian3.multiplyByScalar(N,C,U),U),Q=e.Cartesian3.add(R,e.Cartesian3.multiplyByScalar(N,2*C,Q),Q),u[0]=e.Cartesian3.clone(O,u[0]),u[1]=e.Cartesian3.clone(U,u[1]),q=i.PolylinePipeline.generateArc({positions:u,granularity:t,ellipsoid:o}),v=b(q,N,C,v),y&&(G.push(N.x,N.y,N.z),I.push(A.x,A.y,A.z)),V=e.Cartesian3.clone(Q,V),N=e.Cartesian3.normalize(e.Cartesian3.cross(A,B,N),N),Q=e.Cartesian3.add(R,e.Cartesian3.multiplyByScalar(N,2*C,Q),Q),O=e.Cartesian3.add(R,e.Cartesian3.multiplyByScalar(N,C,O),O),c===n.CornerType.ROUNDED||c===n.CornerType.BEVELED?F.push({leftPositions:E(R,V,Q,c,r)}):F.push({leftPositions:S(j,e.Cartesian3.negate(L,L),Q,r)})):(Q=e.Cartesian3.add(j,L,Q),U=e.Cartesian3.add(Q,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(N,C,U),U),U),R=e.Cartesian3.add(Q,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(N,2*C,R),R),R),u[0]=e.Cartesian3.clone(O,u[0]),u[1]=e.Cartesian3.clone(U,u[1]),q=i.PolylinePipeline.generateArc({positions:u,granularity:t,ellipsoid:o}),v=b(q,N,C,v),y&&(G.push(N.x,N.y,N.z),I.push(A.x,A.y,A.z)),V=e.Cartesian3.clone(R,V),N=e.Cartesian3.normalize(e.Cartesian3.cross(A,B,N),N),R=e.Cartesian3.add(Q,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(N,2*C,R),R),R),O=e.Cartesian3.add(Q,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(N,C,O),O),O),c===n.CornerType.ROUNDED||c===n.CornerType.BEVELED?F.push({rightPositions:E(Q,V,R,c,r)}):F.push({rightPositions:S(j,L,R,r)})),T=e.Cartesian3.negate(B,T)}j=k}let K;return A=o.geodeticSurfaceNormal(j,A),u[0]=e.Cartesian3.clone(O,u[0]),u[1]=e.Cartesian3.clone(j,u[1]),q=i.PolylinePipeline.generateArc({positions:u,granularity:t,ellipsoid:o}),v=b(q,N,C,v),y&&(G.push(N.x,N.y,N.z),I.push(A.x,A.y,A.z)),c===n.CornerType.ROUNDED&&(K=function(a){let t=d,r=p,i=m,s=a[1];r=e.Cartesian3.fromArray(a[1],s.length-3,r),i=e.Cartesian3.fromArray(a[0],0,i),t=e.Cartesian3.midpoint(r,i,t);const o=E(t,r,i,n.CornerType.ROUNDED,!1),l=a.length-1,C=a[l-1];return s=a[l],r=e.Cartesian3.fromArray(C,C.length-3,r),i=e.Cartesian3.fromArray(s,0,i),t=e.Cartesian3.midpoint(r,i,t),[o,E(t,r,i,n.CornerType.ROUNDED,!1)]}(v)),{positions:v,corners:F,lefts:G,normals:I,endPositions:K}};var T=o;a.CorridorGeometryLibrary=T}));
public/CIMSDK/Workers/CylinderGeometry-80f4e5fa.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./CylinderGeometryLibrary-f1481b60","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./VertexFormat-20b5279f"],(function(t,e,n,a,o,r,i,s,u,m,c,l,d){"use strict";const f=new n.Cartesian2,p=new a.Cartesian3,y=new a.Cartesian3,b=new a.Cartesian3,A=new a.Cartesian3;function x(t){const e=(t=i.defaultValue(t,i.defaultValue.EMPTY_OBJECT)).length,n=t.topRadius,a=t.bottomRadius,o=i.defaultValue(t.vertexFormat,d.VertexFormat.DEFAULT),r=i.defaultValue(t.slices,128);this._length=e,this._topRadius=n,this._bottomRadius=a,this._vertexFormat=d.VertexFormat.clone(o),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}x.packedLength=d.VertexFormat.packedLength+5,x.pack=function(t,e,n){return n=i.defaultValue(n,0),d.VertexFormat.pack(t._vertexFormat,e,n),n+=d.VertexFormat.packedLength,e[n++]=t._length,e[n++]=t._topRadius,e[n++]=t._bottomRadius,e[n++]=t._slices,e[n]=i.defaultValue(t._offsetAttribute,-1),e};const g=new d.VertexFormat,_={vertexFormat:g,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};let h;x.unpack=function(t,e,n){e=i.defaultValue(e,0);const a=d.VertexFormat.unpack(t,e,g);e+=d.VertexFormat.packedLength;const o=t[e++],r=t[e++],s=t[e++],u=t[e++],m=t[e];return i.defined(n)?(n._vertexFormat=d.VertexFormat.clone(a,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=u,n._offsetAttribute=-1===m?void 0:m,n):(_.length=o,_.topRadius=r,_.bottomRadius=s,_.slices=u,_.offsetAttribute=-1===m?void 0:m,new x(_))},x.createGeometry=function(t){let d=t._length;const x=t._topRadius,g=t._bottomRadius,_=t._vertexFormat,h=t._slices;if(d<=0||x<0||g<0||0===x&&0===g)return;const F=h+h,v=h+F,C=F+F,w=r.CylinderGeometryLibrary.computePositions(d,x,g,h,!0),G=_.st?new Float32Array(2*C):void 0,V=_.normal?new Float32Array(3*C):void 0,D=_.tangent?new Float32Array(3*C):void 0,R=_.bitangent?new Float32Array(3*C):void 0;let T;const O=_.normal||_.tangent||_.bitangent;if(O){const t=_.tangent||_.bitangent;let e=0,n=0,o=0;const r=Math.atan2(g-x,d),i=p;i.z=Math.sin(r);const s=Math.cos(r);let u=b,m=y;for(T=0;T<h;T++){const r=T/h*l.CesiumMath.TWO_PI,c=s*Math.cos(r),d=s*Math.sin(r);O&&(i.x=c,i.y=d,t&&(u=a.Cartesian3.normalize(a.Cartesian3.cross(a.Cartesian3.UNIT_Z,i,u),u)),_.normal&&(V[e++]=i.x,V[e++]=i.y,V[e++]=i.z,V[e++]=i.x,V[e++]=i.y,V[e++]=i.z),_.tangent&&(D[n++]=u.x,D[n++]=u.y,D[n++]=u.z,D[n++]=u.x,D[n++]=u.y,D[n++]=u.z),_.bitangent&&(m=a.Cartesian3.normalize(a.Cartesian3.cross(i,u,m),m),R[o++]=m.x,R[o++]=m.y,R[o++]=m.z,R[o++]=m.x,R[o++]=m.y,R[o++]=m.z))}for(T=0;T<h;T++)_.normal&&(V[e++]=0,V[e++]=0,V[e++]=-1),_.tangent&&(D[n++]=1,D[n++]=0,D[n++]=0),_.bitangent&&(R[o++]=0,R[o++]=-1,R[o++]=0);for(T=0;T<h;T++)_.normal&&(V[e++]=0,V[e++]=0,V[e++]=1),_.tangent&&(D[n++]=1,D[n++]=0,D[n++]=0),_.bitangent&&(R[o++]=0,R[o++]=1,R[o++]=0)}const L=12*h-12,M=c.IndexDatatype.createTypedArray(C,L);let P=0,k=0;for(T=0;T<h-1;T++)M[P++]=k,M[P++]=k+2,M[P++]=k+3,M[P++]=k,M[P++]=k+3,M[P++]=k+1,k+=2;for(M[P++]=F-2,M[P++]=0,M[P++]=1,M[P++]=F-2,M[P++]=1,M[P++]=F-1,T=1;T<h-1;T++)M[P++]=F+T+1,M[P++]=F+T,M[P++]=F;for(T=1;T<h-1;T++)M[P++]=v,M[P++]=v+T,M[P++]=v+T+1;let z=0;if(_.st){const t=Math.max(x,g);for(T=0;T<C;T++){const e=a.Cartesian3.fromArray(w,3*T,A);G[z++]=(e.x+t)/(2*t),G[z++]=(e.y+t)/(2*t)}}const E=new u.GeometryAttributes;_.position&&(E.position=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w})),_.normal&&(E.normal=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:V})),_.tangent&&(E.tangent=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),_.bitangent&&(E.bitangent=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R})),_.st&&(E.st=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:G})),f.x=.5*d,f.y=Math.max(g,x);const N=new e.BoundingSphere(a.Cartesian3.ZERO,n.Cartesian2.magnitude(f));if(i.defined(t._offsetAttribute)){d=w.length;const e=t._offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(d/3).fill(e);E.applyOffset=new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new s.Geometry({attributes:E,indices:M,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:N,offsetAttribute:t._offsetAttribute})},x.getUnitCylinder=function(){return i.defined(h)||(h=x.createGeometry(new x({topRadius:1,bottomRadius:1,length:1,vertexFormat:d.VertexFormat.POSITION_ONLY}))),h},t.CylinderGeometry=x}));
public/CIMSDK/Workers/EllipseGeometry-5054f965.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./EllipseGeometryLibrary-18d0a44c","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryInstance-8d112c0c","./GeometryOffsetAttribute-06264989","./GeometryPipeline-a349886f","./IndexDatatype-16f6b4a1","./Math-76ce6367","./VertexFormat-20b5279f"],(function(t,e,i,r,n,o,a,s,l,u,m,c,p,y,d){"use strict";const f=new r.Cartesian3,A=new r.Cartesian3,x=new r.Cartesian3,h=new r.Cartesian3,g=new i.Cartesian2,_=new r.Matrix3,b=new r.Matrix3,C=new e.Quaternion,w=new r.Cartesian3,M=new r.Cartesian3,E=new r.Cartesian3,I=new r.Cartographic,T=new r.Cartesian3,G=new i.Cartesian2,N=new i.Cartesian2;function P(t,u,c){const p=u.vertexFormat,y=u.center,d=u.semiMajorAxis,h=u.semiMinorAxis,P=u.ellipsoid,v=u.stRotation,V=c?t.length/3*2:t.length/3,F=u.shadowVolume,D=p.st?new Float32Array(2*V):void 0,O=p.normal?new Float32Array(3*V):void 0,S=p.tangent?new Float32Array(3*V):void 0,L=p.bitangent?new Float32Array(3*V):void 0,R=F?new Float32Array(3*V):void 0;let j=0,z=w,k=M,B=E;const Y=new e.GeographicProjection(P),H=Y.project(P.cartesianToCartographic(y,I),T),U=P.scaleToGeodeticSurface(y,f);P.geodeticSurfaceNormal(U,U);let Q=_,W=b;if(0!==v){let t=e.Quaternion.fromAxisAngle(U,v,C);Q=r.Matrix3.fromQuaternion(t,Q),t=e.Quaternion.fromAxisAngle(U,-v,C),W=r.Matrix3.fromQuaternion(t,W)}else Q=r.Matrix3.clone(r.Matrix3.IDENTITY,Q),W=r.Matrix3.clone(r.Matrix3.IDENTITY,W);const J=i.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,G),q=i.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,N);let Z=t.length;const K=c?Z:0,X=K/3*2;for(let e=0;e<Z;e+=3){const i=e+1,n=e+2,o=r.Cartesian3.fromArray(t,e,f);if(p.st){const t=r.Matrix3.multiplyByVector(Q,o,A),e=Y.project(P.cartesianToCartographic(t,I),x);r.Cartesian3.subtract(e,H,e),g.x=(e.x+d)/(2*d),g.y=(e.y+h)/(2*h),J.x=Math.min(g.x,J.x),J.y=Math.min(g.y,J.y),q.x=Math.max(g.x,q.x),q.y=Math.max(g.y,q.y),c&&(D[j+X]=g.x,D[j+1+X]=g.y),D[j++]=g.x,D[j++]=g.y}(p.normal||p.tangent||p.bitangent||F)&&(z=P.geodeticSurfaceNormal(o,z),F&&(R[e+K]=-z.x,R[i+K]=-z.y,R[n+K]=-z.z),(p.normal||p.tangent||p.bitangent)&&((p.tangent||p.bitangent)&&(k=r.Cartesian3.normalize(r.Cartesian3.cross(r.Cartesian3.UNIT_Z,z,k),k),r.Matrix3.multiplyByVector(W,k,k)),p.normal&&(O[e]=z.x,O[i]=z.y,O[n]=z.z,c&&(O[e+K]=-z.x,O[i+K]=-z.y,O[n+K]=-z.z)),p.tangent&&(S[e]=k.x,S[i]=k.y,S[n]=k.z,c&&(S[e+K]=-k.x,S[i+K]=-k.y,S[n+K]=-k.z)),p.bitangent&&(B=r.Cartesian3.normalize(r.Cartesian3.cross(z,k,B),B),L[e]=B.x,L[i]=B.y,L[n]=B.z,c&&(L[e+K]=B.x,L[i+K]=B.y,L[n+K]=B.z))))}if(p.st){Z=D.length;for(let t=0;t<Z;t+=2)D[t]=(D[t]-J.x)/(q.x-J.x),D[t+1]=(D[t+1]-J.y)/(q.y-J.y)}const $=new l.GeometryAttributes;if(p.position){const e=a.EllipseGeometryLibrary.raisePositionsToHeight(t,u,c);$.position=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e})}if(p.st&&($.st=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:D})),p.normal&&($.normal=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O})),p.tangent&&($.tangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:S})),p.bitangent&&($.bitangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),F&&($.extrudeDirection=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R})),c&&o.defined(u.offsetAttribute)){let t=new Uint8Array(V);if(u.offsetAttribute===m.GeometryOffsetAttribute.TOP)t=t.fill(1,0,V/2);else{const e=u.offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}$.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return $}function v(t){const e=new Array(t*(t+1)*12-6);let i,r,n,o,a,s=0;for(i=0,n=1,o=0;o<3;o++)e[s++]=n++,e[s++]=i,e[s++]=n;for(o=2;o<t+1;++o){for(n=o*(o+1)-1,i=(o-1)*o-1,e[s++]=n++,e[s++]=i,e[s++]=n,r=2*o,a=0;a<r-1;++a)e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i,e[s++]=n;e[s++]=n++,e[s++]=i,e[s++]=n}for(r=2*t,++n,++i,o=0;o<r-1;++o)e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i,e[s++]=n;for(e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i++,e[s++]=i,++i,o=t-1;o>1;--o){for(e[s++]=i++,e[s++]=i,e[s++]=n,r=2*o,a=0;a<r-1;++a)e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i,e[s++]=n;e[s++]=i++,e[s++]=i++,e[s++]=n++}for(o=0;o<3;o++)e[s++]=i++,e[s++]=i,e[s++]=n;return e}let V=new r.Cartesian3;const F=new e.BoundingSphere,D=new e.BoundingSphere;function O(t){const y=t.center,d=t.ellipsoid,b=t.semiMajorAxis;let V=r.Cartesian3.multiplyByScalar(d.geodeticSurfaceNormal(y,f),t.height,f);F.center=r.Cartesian3.add(y,V,F.center),F.radius=b,V=r.Cartesian3.multiplyByScalar(d.geodeticSurfaceNormal(y,V),t.extrudedHeight,V),D.center=r.Cartesian3.add(y,V,D.center),D.radius=b;const O=a.EllipseGeometryLibrary.computeEllipsePositions(t,!0,!0),S=O.positions,L=O.numPts,R=O.outerPositions,j=e.BoundingSphere.union(F,D),z=P(S,t,!0);let k=v(L);const B=k.length;k.length=2*B;const Y=S.length/3;for(let t=0;t<B;t+=3)k[t+B]=k[t+2]+Y,k[t+1+B]=k[t+1]+Y,k[t+2+B]=k[t]+Y;const H=p.IndexDatatype.createTypedArray(2*Y/3,k),U=new s.Geometry({attributes:z,indices:H,primitiveType:s.PrimitiveType.TRIANGLES}),Q=function(t,a){const u=a.vertexFormat,c=a.center,p=a.semiMajorAxis,y=a.semiMinorAxis,d=a.ellipsoid,b=a.height,P=a.extrudedHeight,v=a.stRotation,V=t.length/3*2,F=new Float64Array(3*V),D=u.st?new Float32Array(2*V):void 0,O=u.normal?new Float32Array(3*V):void 0,S=u.tangent?new Float32Array(3*V):void 0,L=u.bitangent?new Float32Array(3*V):void 0,R=a.shadowVolume,j=R?new Float32Array(3*V):void 0;let z=0,k=w,B=M,Y=E;const H=new e.GeographicProjection(d),U=H.project(d.cartesianToCartographic(c,I),T),Q=d.scaleToGeodeticSurface(c,f);d.geodeticSurfaceNormal(Q,Q);const W=e.Quaternion.fromAxisAngle(Q,v,C),J=r.Matrix3.fromQuaternion(W,_),q=i.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,G),Z=i.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,N);let K=t.length;const X=K/3*2;for(let e=0;e<K;e+=3){const i=e+1,n=e+2;let o,a=r.Cartesian3.fromArray(t,e,f);if(u.st){const t=r.Matrix3.multiplyByVector(J,a,A),e=H.project(d.cartesianToCartographic(t,I),x);r.Cartesian3.subtract(e,U,e),g.x=(e.x+p)/(2*p),g.y=(e.y+y)/(2*y),q.x=Math.min(g.x,q.x),q.y=Math.min(g.y,q.y),Z.x=Math.max(g.x,Z.x),Z.y=Math.max(g.y,Z.y),D[z+X]=g.x,D[z+1+X]=g.y,D[z++]=g.x,D[z++]=g.y}a=d.scaleToGeodeticSurface(a,a),o=r.Cartesian3.clone(a,A),k=d.geodeticSurfaceNormal(a,k),R&&(j[e+K]=-k.x,j[i+K]=-k.y,j[n+K]=-k.z);let s=r.Cartesian3.multiplyByScalar(k,b,h);if(a=r.Cartesian3.add(a,s,a),s=r.Cartesian3.multiplyByScalar(k,P,s),o=r.Cartesian3.add(o,s,o),u.position&&(F[e+K]=o.x,F[i+K]=o.y,F[n+K]=o.z,F[e]=a.x,F[i]=a.y,F[n]=a.z),u.normal||u.tangent||u.bitangent){Y=r.Cartesian3.clone(k,Y);const s=r.Cartesian3.fromArray(t,(e+3)%K,h);r.Cartesian3.subtract(s,a,s);const l=r.Cartesian3.subtract(o,a,x);k=r.Cartesian3.normalize(r.Cartesian3.cross(l,s,k),k),u.normal&&(O[e]=k.x,O[i]=k.y,O[n]=k.z,O[e+K]=k.x,O[i+K]=k.y,O[n+K]=k.z),u.tangent&&(B=r.Cartesian3.normalize(r.Cartesian3.cross(Y,k,B),B),S[e]=B.x,S[i]=B.y,S[n]=B.z,S[e+K]=B.x,S[e+1+K]=B.y,S[e+2+K]=B.z),u.bitangent&&(L[e]=Y.x,L[i]=Y.y,L[n]=Y.z,L[e+K]=Y.x,L[i+K]=Y.y,L[n+K]=Y.z)}}if(u.st){K=D.length;for(let t=0;t<K;t+=2)D[t]=(D[t]-q.x)/(Z.x-q.x),D[t+1]=(D[t+1]-q.y)/(Z.y-q.y)}const $=new l.GeometryAttributes;if(u.position&&($.position=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:F})),u.st&&($.st=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:D})),u.normal&&($.normal=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O})),u.tangent&&($.tangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:S})),u.bitangent&&($.bitangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),R&&($.extrudeDirection=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:j})),o.defined(a.offsetAttribute)){let t=new Uint8Array(V);if(a.offsetAttribute===m.GeometryOffsetAttribute.TOP)t=t.fill(1,0,V/2);else{const e=a.offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}$.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return $}(R,t);k=function(t){const e=t.length/3,i=p.IndexDatatype.createTypedArray(e,6*e);let r=0;for(let t=0;t<e;t++){const n=t,o=t+e,a=(n+1)%e,s=a+e;i[r++]=n,i[r++]=o,i[r++]=a,i[r++]=a,i[r++]=o,i[r++]=s}return i}(R);const W=p.IndexDatatype.createTypedArray(2*R.length/3,k),J=new s.Geometry({attributes:Q,indices:W,primitiveType:s.PrimitiveType.TRIANGLES}),q=c.GeometryPipeline.combineInstances([new u.GeometryInstance({geometry:U}),new u.GeometryInstance({geometry:J})]);return{boundingSphere:j,attributes:q[0].attributes,indices:q[0].indices}}function S(t,e,n,o,s,l,u){const m=a.EllipseGeometryLibrary.computeEllipsePositions({center:t,semiMajorAxis:e,semiMinorAxis:n,rotation:o,granularity:s},!1,!0).outerPositions,c=m.length/3,p=new Array(c);for(let t=0;t<c;++t)p[t]=r.Cartesian3.fromArray(m,3*t);const d=i.Rectangle.fromCartesianArray(p,l,u);return d.width>y.CesiumMath.PI&&(d.north=d.north>0?y.CesiumMath.PI_OVER_TWO-y.CesiumMath.EPSILON7:d.north,d.south=d.south<0?y.CesiumMath.EPSILON7-y.CesiumMath.PI_OVER_TWO:d.south,d.east=y.CesiumMath.PI,d.west=-y.CesiumMath.PI),d}function L(t){const e=(t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT)).center,i=o.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),n=t.semiMajorAxis,a=t.semiMinorAxis,s=o.defaultValue(t.granularity,y.CesiumMath.RADIANS_PER_DEGREE),l=o.defaultValue(t.vertexFormat,d.VertexFormat.DEFAULT),u=o.defaultValue(t.height,0),m=o.defaultValue(t.extrudedHeight,u);this._center=r.Cartesian3.clone(e),this._semiMajorAxis=n,this._semiMinorAxis=a,this._ellipsoid=r.Ellipsoid.clone(i),this._rotation=o.defaultValue(t.rotation,0),this._stRotation=o.defaultValue(t.stRotation,0),this._height=Math.max(m,u),this._granularity=s,this._vertexFormat=d.VertexFormat.clone(l),this._extrudedHeight=Math.min(m,u),this._shadowVolume=o.defaultValue(t.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}L.packedLength=r.Cartesian3.packedLength+r.Ellipsoid.packedLength+d.VertexFormat.packedLength+9,L.pack=function(t,e,i){return i=o.defaultValue(i,0),r.Cartesian3.pack(t._center,e,i),i+=r.Cartesian3.packedLength,r.Ellipsoid.pack(t._ellipsoid,e,i),i+=r.Ellipsoid.packedLength,d.VertexFormat.pack(t._vertexFormat,e,i),i+=d.VertexFormat.packedLength,e[i++]=t._semiMajorAxis,e[i++]=t._semiMinorAxis,e[i++]=t._rotation,e[i++]=t._stRotation,e[i++]=t._height,e[i++]=t._granularity,e[i++]=t._extrudedHeight,e[i++]=t._shadowVolume?1:0,e[i]=o.defaultValue(t._offsetAttribute,-1),e};const R=new r.Cartesian3,j=new r.Ellipsoid,z=new d.VertexFormat,k={center:R,ellipsoid:j,vertexFormat:z,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};L.unpack=function(t,e,i){e=o.defaultValue(e,0);const n=r.Cartesian3.unpack(t,e,R);e+=r.Cartesian3.packedLength;const a=r.Ellipsoid.unpack(t,e,j);e+=r.Ellipsoid.packedLength;const s=d.VertexFormat.unpack(t,e,z);e+=d.VertexFormat.packedLength;const l=t[e++],u=t[e++],m=t[e++],c=t[e++],p=t[e++],y=t[e++],f=t[e++],A=1===t[e++],x=t[e];return o.defined(i)?(i._center=r.Cartesian3.clone(n,i._center),i._ellipsoid=r.Ellipsoid.clone(a,i._ellipsoid),i._vertexFormat=d.VertexFormat.clone(s,i._vertexFormat),i._semiMajorAxis=l,i._semiMinorAxis=u,i._rotation=m,i._stRotation=c,i._height=p,i._granularity=y,i._extrudedHeight=f,i._shadowVolume=A,i._offsetAttribute=-1===x?void 0:x,i):(k.height=p,k.extrudedHeight=f,k.granularity=y,k.stRotation=c,k.rotation=m,k.semiMajorAxis=l,k.semiMinorAxis=u,k.shadowVolume=A,k.offsetAttribute=-1===x?void 0:x,new L(k))},L.computeRectangle=function(t,e){const i=(t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT)).center,n=o.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),a=t.semiMajorAxis,s=t.semiMinorAxis,l=o.defaultValue(t.granularity,y.CesiumMath.RADIANS_PER_DEGREE);return S(i,a,s,o.defaultValue(t.rotation,0),l,n,e)},L.createGeometry=function(t){if(t._semiMajorAxis<=0||t._semiMinorAxis<=0)return;const i=t._height,l=t._extrudedHeight,u=!y.CesiumMath.equalsEpsilon(i,l,0,y.CesiumMath.EPSILON2);t._center=t._ellipsoid.scaleToGeodeticSurface(t._center,t._center);const c={center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:t._ellipsoid,rotation:t._rotation,height:i,granularity:t._granularity,vertexFormat:t._vertexFormat,stRotation:t._stRotation};let d;if(u)c.extrudedHeight=l,c.shadowVolume=t._shadowVolume,c.offsetAttribute=t._offsetAttribute,d=O(c);else if(d=function(t){const i=t.center;V=r.Cartesian3.multiplyByScalar(t.ellipsoid.geodeticSurfaceNormal(i,V),t.height,V),V=r.Cartesian3.add(i,V,V);const n=new e.BoundingSphere(V,t.semiMajorAxis),o=a.EllipseGeometryLibrary.computeEllipsePositions(t,!0,!1),s=o.positions,l=o.numPts,u=P(s,t,!1);let m=v(l);return m=p.IndexDatatype.createTypedArray(s.length/3,m),{boundingSphere:n,attributes:u,indices:m}}(c),o.defined(t._offsetAttribute)){const e=d.attributes.position.values.length,i=t._offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1,r=new Uint8Array(e/3).fill(i);d.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}return new s.Geometry({attributes:d.attributes,indices:d.indices,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:d.boundingSphere,offsetAttribute:t._offsetAttribute})},L.createShadowVolume=function(t,e,i){const r=t._granularity,n=t._ellipsoid,o=e(r,n),a=i(r,n);return new L({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:n,rotation:t._rotation,stRotation:t._stRotation,granularity:r,extrudedHeight:o,height:a,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(L.prototype,{rectangle:{get:function(){return o.defined(this._rectangle)||(this._rectangle=S(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return o.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){const e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];const i=a.EllipseGeometryLibrary.computeEllipsePositions({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,rotation:t._rotation,granularity:t._granularity},!1,!0).outerPositions,n=i.length/3,o=new Array(n);for(let t=0;t<n;++t)o[t]=r.Cartesian3.fromArray(i,3*t);const l=t._ellipsoid,u=t.rectangle;return s.Geometry._textureCoordinateRotationPoints(o,e,l,u)}(this)),this._textureCoordinateRotationPoints}}}),t.EllipseGeometry=L}));
public/CIMSDK/Workers/EllipseGeometryLibrary-18d0a44c.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./Math-76ce6367","./Transforms-221c7c82"],(function(t,a,e,n){"use strict";const i={},r=new a.Cartesian3,s=new a.Cartesian3,o=new n.Quaternion,l=new a.Matrix3;function c(t,e,i,c,C,u,y,m,h,x){const M=t+e;a.Cartesian3.multiplyByScalar(c,Math.cos(M),r),a.Cartesian3.multiplyByScalar(i,Math.sin(M),s),a.Cartesian3.add(r,s,r);let f=Math.cos(t);f*=f;let z=Math.sin(t);z*=z;const O=u/Math.sqrt(y*f+C*z)/m;return n.Quaternion.fromAxisAngle(r,O,o),a.Matrix3.fromQuaternion(o,l),a.Matrix3.multiplyByVector(l,h,x),a.Cartesian3.normalize(x,x),a.Cartesian3.multiplyByScalar(x,m,x),x}i.pointOnEllipsoid=function(t,a,e,n,i,r,s,o,l,C){return c(t,a,e,n,i,r,s,o,l,C)};const C=new a.Cartesian3,u=new a.Cartesian3,y=new a.Cartesian3,m=new a.Cartesian3;i.raisePositionsToHeight=function(t,e,n){const i=e.ellipsoid,r=e.height,s=e.extrudedHeight,o=n?t.length/3*2:t.length/3,l=new Float64Array(3*o),c=t.length,h=n?c:0;for(let e=0;e<c;e+=3){const o=e+1,c=e+2,x=a.Cartesian3.fromArray(t,e,C);i.scaleToGeodeticSurface(x,x);const M=a.Cartesian3.clone(x,u),f=i.geodeticSurfaceNormal(x,m),z=a.Cartesian3.multiplyByScalar(f,r,y);a.Cartesian3.add(x,z,x),n&&(a.Cartesian3.multiplyByScalar(f,s,z),a.Cartesian3.add(M,z,M),l[e+h]=M.x,l[o+h]=M.y,l[c+h]=M.z),l[e]=x.x,l[o]=x.y,l[c]=x.z}return l};const h=new a.Cartesian3,x=new a.Cartesian3,M=new a.Cartesian3;i.computeEllipsePositions=function(t,n,i){const r=t.semiMinorAxis,s=t.semiMajorAxis,o=t.rotation,l=t.center,m=8*t.granularity,f=r*r,z=s*s,O=s*r,_=a.Cartesian3.magnitude(l),d=a.Cartesian3.normalize(l,h);let p=a.Cartesian3.cross(a.Cartesian3.UNIT_Z,l,x);p=a.Cartesian3.normalize(p,p);const w=a.Cartesian3.cross(d,p,M);let P=1+Math.ceil(e.CesiumMath.PI_OVER_TWO/m);const T=e.CesiumMath.PI_OVER_TWO/(P-1);let E=e.CesiumMath.PI_OVER_TWO-P*T;E<0&&(P-=Math.ceil(Math.abs(E)/T));const I=n?new Array(3*(P*(P+2)*2)):void 0;let g=0,V=C,A=u;const R=4*P*3;let W=R-1,S=0;const B=i?new Array(R):void 0;let b,v,Q,G,H;for(E=e.CesiumMath.PI_OVER_TWO,V=c(E,o,w,p,f,O,z,_,d,V),n&&(I[g++]=V.x,I[g++]=V.y,I[g++]=V.z),i&&(B[W--]=V.z,B[W--]=V.y,B[W--]=V.x),E=e.CesiumMath.PI_OVER_TWO-T,b=1;b<P+1;++b){if(V=c(E,o,w,p,f,O,z,_,d,V),A=c(Math.PI-E,o,w,p,f,O,z,_,d,A),n){for(I[g++]=V.x,I[g++]=V.y,I[g++]=V.z,Q=2*b+2,v=1;v<Q-1;++v)G=v/(Q-1),H=a.Cartesian3.lerp(V,A,G,y),I[g++]=H.x,I[g++]=H.y,I[g++]=H.z;I[g++]=A.x,I[g++]=A.y,I[g++]=A.z}i&&(B[W--]=V.z,B[W--]=V.y,B[W--]=V.x,B[S++]=A.x,B[S++]=A.y,B[S++]=A.z),E=e.CesiumMath.PI_OVER_TWO-(b+1)*T}for(b=P;b>1;--b){if(E=e.CesiumMath.PI_OVER_TWO-(b-1)*T,V=c(-E,o,w,p,f,O,z,_,d,V),A=c(E+Math.PI,o,w,p,f,O,z,_,d,A),n){for(I[g++]=V.x,I[g++]=V.y,I[g++]=V.z,Q=2*(b-1)+2,v=1;v<Q-1;++v)G=v/(Q-1),H=a.Cartesian3.lerp(V,A,G,y),I[g++]=H.x,I[g++]=H.y,I[g++]=H.z;I[g++]=A.x,I[g++]=A.y,I[g++]=A.z}i&&(B[W--]=V.z,B[W--]=V.y,B[W--]=V.x,B[S++]=A.x,B[S++]=A.y,B[S++]=A.z)}E=e.CesiumMath.PI_OVER_TWO,V=c(-E,o,w,p,f,O,z,_,d,V);const N={};return n&&(I[g++]=V.x,I[g++]=V.y,I[g++]=V.z,N.positions=I,N.numPts=P),i&&(B[W--]=V.z,B[W--]=V.y,B[W--]=V.x,N.outerPositions=B),N};var f=i;t.EllipseGeometryLibrary=f}));
public/CIMSDK/Workers/EllipseOutlineGeometry-03a52f89.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./EllipseGeometryLibrary-18d0a44c","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367"],(function(e,t,i,r,n,a,o,s,l,u,c){"use strict";const d=new i.Cartesian3;let p=new i.Cartesian3;const f=new t.BoundingSphere,m=new t.BoundingSphere;function h(e){const t=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).center,r=n.defaultValue(e.ellipsoid,i.Ellipsoid.WGS84),a=e.semiMajorAxis,o=e.semiMinorAxis,s=n.defaultValue(e.granularity,c.CesiumMath.RADIANS_PER_DEGREE),l=n.defaultValue(e.height,0),u=n.defaultValue(e.extrudedHeight,l);this._center=i.Cartesian3.clone(t),this._semiMajorAxis=a,this._semiMinorAxis=o,this._ellipsoid=i.Ellipsoid.clone(r),this._rotation=n.defaultValue(e.rotation,0),this._height=Math.max(u,l),this._granularity=s,this._extrudedHeight=Math.min(u,l),this._numberOfVerticalLines=Math.max(n.defaultValue(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}h.packedLength=i.Cartesian3.packedLength+i.Ellipsoid.packedLength+8,h.pack=function(e,t,r){return r=n.defaultValue(r,0),i.Cartesian3.pack(e._center,t,r),r+=i.Cartesian3.packedLength,i.Ellipsoid.pack(e._ellipsoid,t,r),r+=i.Ellipsoid.packedLength,t[r++]=e._semiMajorAxis,t[r++]=e._semiMinorAxis,t[r++]=e._rotation,t[r++]=e._height,t[r++]=e._granularity,t[r++]=e._extrudedHeight,t[r++]=e._numberOfVerticalLines,t[r]=n.defaultValue(e._offsetAttribute,-1),t};const y=new i.Cartesian3,b=new i.Ellipsoid,A={center:y,ellipsoid:b,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};h.unpack=function(e,t,r){t=n.defaultValue(t,0);const a=i.Cartesian3.unpack(e,t,y);t+=i.Cartesian3.packedLength;const o=i.Ellipsoid.unpack(e,t,b);t+=i.Ellipsoid.packedLength;const s=e[t++],l=e[t++],u=e[t++],c=e[t++],d=e[t++],p=e[t++],f=e[t++],m=e[t];return n.defined(r)?(r._center=i.Cartesian3.clone(a,r._center),r._ellipsoid=i.Ellipsoid.clone(o,r._ellipsoid),r._semiMajorAxis=s,r._semiMinorAxis=l,r._rotation=u,r._height=c,r._granularity=d,r._extrudedHeight=p,r._numberOfVerticalLines=f,r._offsetAttribute=-1===m?void 0:m,r):(A.height=c,A.extrudedHeight=p,A.granularity=d,A.rotation=u,A.semiMajorAxis=s,A.semiMinorAxis=l,A.numberOfVerticalLines=f,A.offsetAttribute=-1===m?void 0:m,new h(A))},h.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;const h=e._height,y=e._extrudedHeight,b=!c.CesiumMath.equalsEpsilon(h,y,0,c.CesiumMath.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);const A={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:h,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines};let _;if(b)A.extrudedHeight=y,A.offsetAttribute=e._offsetAttribute,_=function(e){const p=e.center,h=e.ellipsoid,y=e.semiMajorAxis;let b=i.Cartesian3.multiplyByScalar(h.geodeticSurfaceNormal(p,d),e.height,d);f.center=i.Cartesian3.add(p,b,f.center),f.radius=y,b=i.Cartesian3.multiplyByScalar(h.geodeticSurfaceNormal(p,b),e.extrudedHeight,b),m.center=i.Cartesian3.add(p,b,m.center),m.radius=y;let A=a.EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions;const _=new s.GeometryAttributes({position:new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:a.EllipseGeometryLibrary.raisePositionsToHeight(A,e,!0)})});A=_.position.values;const g=t.BoundingSphere.union(f,m);let x=A.length/3;if(n.defined(e.offsetAttribute)){let t=new Uint8Array(x);if(e.offsetAttribute===l.GeometryOffsetAttribute.TOP)t=t.fill(1,0,x/2);else{const i=e.offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1;t=t.fill(i)}_.applyOffset=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}let E=n.defaultValue(e.numberOfVerticalLines,16);E=c.CesiumMath.clamp(E,0,x/2);const M=u.IndexDatatype.createTypedArray(x,2*x+2*E);x/=2;let C,G,L=0;for(C=0;C<x;++C)M[L++]=C,M[L++]=(C+1)%x,M[L++]=C+x,M[L++]=(C+1)%x+x;if(E>0){const e=Math.min(E,x);G=Math.round(x/e);const t=Math.min(G*E,x);for(C=0;C<t;C+=G)M[L++]=C,M[L++]=C+x}return{boundingSphere:g,attributes:_,indices:M}}(A);else if(_=function(e){const n=e.center;p=i.Cartesian3.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(n,p),e.height,p),p=i.Cartesian3.add(n,p,p);const l=new t.BoundingSphere(p,e.semiMajorAxis),c=a.EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions,d=new s.GeometryAttributes({position:new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:a.EllipseGeometryLibrary.raisePositionsToHeight(c,e,!1)})}),f=c.length/3,m=u.IndexDatatype.createTypedArray(f,2*f);let h=0;for(let e=0;e<f;++e)m[h++]=e,m[h++]=(e+1)%f;return{boundingSphere:l,attributes:d,indices:m}}(A),n.defined(e._offsetAttribute)){const t=_.attributes.position.values.length,i=e._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(i);_.attributes.applyOffset=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new o.Geometry({attributes:_.attributes,indices:_.indices,primitiveType:o.PrimitiveType.LINES,boundingSphere:_.boundingSphere,offsetAttribute:e._offsetAttribute})},e.EllipseOutlineGeometry=h}));
public/CIMSDK/Workers/EllipsoidGeodesic-ec5fd429.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./defaultValue-865ac579","./Math-76ce6367"],(function(t,a,i,n){"use strict";function e(t,a,i,n,e,s,o){const r=function(t,a){return t*a*(4+t*(4-3*a))/16}(t,i);return(1-r)*t*a*(n+r*e*(o+r*s*(2*o*o-1)))}const s=new a.Cartesian3,o=new a.Cartesian3;function r(t,i,r,h){a.Cartesian3.normalize(h.cartographicToCartesian(i,o),s),a.Cartesian3.normalize(h.cartographicToCartesian(r,o),o),function(t,a,i,s,o,r,h){const c=(a-i)/a,d=r-s,u=Math.atan((1-c)*Math.tan(o)),l=Math.atan((1-c)*Math.tan(h)),M=Math.cos(u),g=Math.sin(u),_=Math.cos(l),p=Math.sin(l),f=M*_,m=M*p,H=g*p,C=g*_;let v,O,S,q,U,A=d,b=n.CesiumMath.TWO_PI,w=Math.cos(A),R=Math.sin(A);do{w=Math.cos(A),R=Math.sin(A);const t=m-C*w;let a;S=Math.sqrt(_*_*R*R+t*t),O=H+f*w,v=Math.atan2(S,O),0===S?(a=0,q=1):(a=f*R/S,q=1-a*a),b=A,U=O-2*H/q,isFinite(U)||(U=0),A=d+e(c,a,q,v,S,O,U)}while(Math.abs(A-b)>n.CesiumMath.EPSILON12);const x=q*(a*a-i*i)/(i*i),y=x*(256+x*(x*(74-47*x)-128))/1024,E=U*U,P=i*(1+x*(4096+x*(x*(320-175*x)-768))/16384)*(v-y*S*(U+y*(O*(2*E-1)-y*U*(4*S*S-3)*(4*E-3)/6)/4)),D=Math.atan2(_*R,m-C*w),T=Math.atan2(M*R,m*w-C);t._distance=P,t._startHeading=D,t._endHeading=T,t._uSquared=x}(t,h.maximumRadius,h.minimumRadius,i.longitude,i.latitude,r.longitude,r.latitude),t._start=a.Cartographic.clone(i,t._start),t._end=a.Cartographic.clone(r,t._end),t._start.height=0,t._end.height=0,function(t){const a=t._uSquared,i=t._ellipsoid.maximumRadius,n=t._ellipsoid.minimumRadius,e=(i-n)/i,s=Math.cos(t._startHeading),o=Math.sin(t._startHeading),r=(1-e)*Math.tan(t._start.latitude),h=1/Math.sqrt(1+r*r),c=h*r,d=Math.atan2(r,s),u=h*o,l=u*u,M=1-l,g=Math.sqrt(M),_=a/4,p=_*_,f=p*_,m=p*p,H=1+_-3*p/4+5*f/4-175*m/64,C=1-_+15*p/8-35*f/8,v=1-3*_+35*p/4,O=1-5*_,S=H*d-C*Math.sin(2*d)*_/2-v*Math.sin(4*d)*p/16-O*Math.sin(6*d)*f/48-5*Math.sin(8*d)*m/512,q=t._constants;q.a=i,q.b=n,q.f=e,q.cosineHeading=s,q.sineHeading=o,q.tanU=r,q.cosineU=h,q.sineU=c,q.sigma=d,q.sineAlpha=u,q.sineSquaredAlpha=l,q.cosineSquaredAlpha=M,q.cosineAlpha=g,q.u2Over4=_,q.u4Over16=p,q.u6Over64=f,q.u8Over256=m,q.a0=H,q.a1=C,q.a2=v,q.a3=O,q.distanceRatio=S}(t)}function h(t,n,e){const s=i.defaultValue(e,a.Ellipsoid.WGS84);this._ellipsoid=s,this._start=new a.Cartographic,this._end=new a.Cartographic,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,i.defined(t)&&i.defined(n)&&r(this,t,n,s)}Object.defineProperties(h.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}}),h.prototype.setEndPoints=function(t,a){r(this,t,a,this._ellipsoid)},h.prototype.interpolateUsingFraction=function(t,a){return this.interpolateUsingSurfaceDistance(this._distance*t,a)},h.prototype.interpolateUsingSurfaceDistance=function(t,n){const s=this._constants,o=s.distanceRatio+t/s.b,r=Math.cos(2*o),h=Math.cos(4*o),c=Math.cos(6*o),d=Math.sin(2*o),u=Math.sin(4*o),l=Math.sin(6*o),M=Math.sin(8*o),g=o*o,_=o*g,p=s.u8Over256,f=s.u2Over4,m=s.u6Over64,H=s.u4Over16;let C=2*_*p*r/3+o*(1-f+7*H/4-15*m/4+579*p/64-(H-15*m/4+187*p/16)*r-(5*m/4-115*p/16)*h-29*p*c/16)+(f/2-H+71*m/32-85*p/16)*d+(5*H/16-5*m/4+383*p/96)*u-g*((m-11*p/2)*d+5*p*u/2)+(29*m/96-29*p/16)*l+539*p*M/1536;const v=Math.asin(Math.sin(C)*s.cosineAlpha),O=Math.atan(s.a/s.b*Math.tan(v));C-=s.sigma;const S=Math.cos(2*s.sigma+C),q=Math.sin(C),U=Math.cos(C),A=s.cosineU*U,b=s.sineU*q,w=Math.atan2(q*s.sineHeading,A-b*s.cosineHeading)-e(s.f,s.sineAlpha,s.cosineSquaredAlpha,C,q,U,S);return i.defined(n)?(n.longitude=this._start.longitude+w,n.latitude=O,n.height=0,n):new a.Cartographic(this._start.longitude+w,O,0)},t.EllipsoidGeodesic=h}));
public/CIMSDK/Workers/EllipsoidGeometry-78610fac.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./VertexFormat-20b5279f"],(function(t,e,a,n,i,r,o,s,m,u,c,l){"use strict";const f=new n.Cartesian3,d=new n.Cartesian3,C=new n.Cartesian3,p=new n.Cartesian3,y=new n.Cartesian3,_=new n.Cartesian3(1,1,1),h=Math.cos,x=Math.sin;function A(t){t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT);const e=r.defaultValue(t.radii,_),a=r.defaultValue(t.innerRadii,e),i=r.defaultValue(t.minimumClock,0),o=r.defaultValue(t.maximumClock,c.CesiumMath.TWO_PI),s=r.defaultValue(t.minimumCone,0),m=r.defaultValue(t.maximumCone,c.CesiumMath.PI),u=Math.round(r.defaultValue(t.stackPartitions,64)),f=Math.round(r.defaultValue(t.slicePartitions,64)),d=r.defaultValue(t.vertexFormat,l.VertexFormat.DEFAULT);this._radii=n.Cartesian3.clone(e),this._innerRadii=n.Cartesian3.clone(a),this._minimumClock=i,this._maximumClock=o,this._minimumCone=s,this._maximumCone=m,this._stackPartitions=u,this._slicePartitions=f,this._vertexFormat=l.VertexFormat.clone(d),this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidGeometry"}A.packedLength=2*n.Cartesian3.packedLength+l.VertexFormat.packedLength+7,A.pack=function(t,e,a){return a=r.defaultValue(a,0),n.Cartesian3.pack(t._radii,e,a),a+=n.Cartesian3.packedLength,n.Cartesian3.pack(t._innerRadii,e,a),a+=n.Cartesian3.packedLength,l.VertexFormat.pack(t._vertexFormat,e,a),a+=l.VertexFormat.packedLength,e[a++]=t._minimumClock,e[a++]=t._maximumClock,e[a++]=t._minimumCone,e[a++]=t._maximumCone,e[a++]=t._stackPartitions,e[a++]=t._slicePartitions,e[a]=r.defaultValue(t._offsetAttribute,-1),e};const b=new n.Cartesian3,k=new n.Cartesian3,w=new l.VertexFormat,P={radii:b,innerRadii:k,vertexFormat:w,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};let g;A.unpack=function(t,e,a){e=r.defaultValue(e,0);const i=n.Cartesian3.unpack(t,e,b);e+=n.Cartesian3.packedLength;const o=n.Cartesian3.unpack(t,e,k);e+=n.Cartesian3.packedLength;const s=l.VertexFormat.unpack(t,e,w);e+=l.VertexFormat.packedLength;const m=t[e++],u=t[e++],c=t[e++],f=t[e++],d=t[e++],C=t[e++],p=t[e];return r.defined(a)?(a._radii=n.Cartesian3.clone(i,a._radii),a._innerRadii=n.Cartesian3.clone(o,a._innerRadii),a._vertexFormat=l.VertexFormat.clone(s,a._vertexFormat),a._minimumClock=m,a._maximumClock=u,a._minimumCone=c,a._maximumCone=f,a._stackPartitions=d,a._slicePartitions=C,a._offsetAttribute=-1===p?void 0:p,a):(P.minimumClock=m,P.maximumClock=u,P.minimumCone=c,P.maximumCone=f,P.stackPartitions=d,P.slicePartitions=C,P.offsetAttribute=-1===p?void 0:p,new A(P))},A.createGeometry=function(t){const l=t._radii;if(l.x<=0||l.y<=0||l.z<=0)return;const _=t._innerRadii;if(_.x<=0||_.y<=0||_.z<=0)return;const A=t._minimumClock,b=t._maximumClock,k=t._minimumCone,w=t._maximumCone,P=t._vertexFormat;let g,v,F=t._slicePartitions+1,V=t._stackPartitions+1;F=Math.round(F*Math.abs(b-A)/c.CesiumMath.TWO_PI),V=Math.round(V*Math.abs(w-k)/c.CesiumMath.PI),F<2&&(F=2),V<2&&(V=2);let M=0;const T=[k],D=[A];for(g=0;g<V;g++)T.push(k+g*(w-k)/(V-1));for(T.push(w),v=0;v<F;v++)D.push(A+v*(b-A)/(F-1));D.push(b);const G=T.length,L=D.length;let O=0,I=1;const E=_.x!==l.x||_.y!==l.y||_.z!==l.z;let z=!1,N=!1,R=!1;E&&(I=2,k>0&&(z=!0,O+=F-1),w<Math.PI&&(N=!0,O+=F-1),(b-A)%c.CesiumMath.TWO_PI?(R=!0,O+=2*(V-1)+1):O+=1);const U=L*G*I,S=new Float64Array(3*U),B=new Array(U).fill(!1),W=new Array(U).fill(!1),Y=F*V*I,J=6*(Y+O+1-(F+V)*I),X=u.IndexDatatype.createTypedArray(Y,J),Z=P.normal?new Float32Array(3*U):void 0,j=P.tangent?new Float32Array(3*U):void 0,q=P.bitangent?new Float32Array(3*U):void 0,H=P.st?new Float32Array(2*U):void 0,K=new Array(G),Q=new Array(G);for(g=0;g<G;g++)K[g]=x(T[g]),Q[g]=h(T[g]);const $=new Array(L),tt=new Array(L);for(v=0;v<L;v++)tt[v]=h(D[v]),$[v]=x(D[v]);for(g=0;g<G;g++)for(v=0;v<L;v++)S[M++]=l.x*K[g]*tt[v],S[M++]=l.y*K[g]*$[v],S[M++]=l.z*Q[g];let et,at,nt,it,rt=U/2;if(E)for(g=0;g<G;g++)for(v=0;v<L;v++)S[M++]=_.x*K[g]*tt[v],S[M++]=_.y*K[g]*$[v],S[M++]=_.z*Q[g],B[rt]=!0,g>0&&g!==G-1&&0!==v&&v!==L-1&&(W[rt]=!0),rt++;for(M=0,g=1;g<G-2;g++)for(et=g*L,at=(g+1)*L,v=1;v<L-2;v++)X[M++]=at+v,X[M++]=at+v+1,X[M++]=et+v+1,X[M++]=at+v,X[M++]=et+v+1,X[M++]=et+v;if(E){const t=G*L;for(g=1;g<G-2;g++)for(et=t+g*L,at=t+(g+1)*L,v=1;v<L-2;v++)X[M++]=at+v,X[M++]=et+v,X[M++]=et+v+1,X[M++]=at+v,X[M++]=et+v+1,X[M++]=at+v+1}if(E){if(z)for(it=G*L,g=1;g<L-2;g++)X[M++]=g,X[M++]=g+1,X[M++]=it+g+1,X[M++]=g,X[M++]=it+g+1,X[M++]=it+g;if(N)for(nt=G*L-L,it=G*L*I-L,g=1;g<L-2;g++)X[M++]=nt+g+1,X[M++]=nt+g,X[M++]=it+g,X[M++]=nt+g+1,X[M++]=it+g,X[M++]=it+g+1}if(R){for(g=1;g<G-2;g++)it=L*G+L*g,nt=L*g,X[M++]=it,X[M++]=nt+L,X[M++]=nt,X[M++]=it,X[M++]=it+L,X[M++]=nt+L;for(g=1;g<G-2;g++)it=L*G+L*(g+1)-1,nt=L*(g+1)-1,X[M++]=nt+L,X[M++]=it,X[M++]=nt,X[M++]=nt+L,X[M++]=it+L,X[M++]=it}const ot=new s.GeometryAttributes;P.position&&(ot.position=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:S}));let st=0,mt=0,ut=0,ct=0;const lt=U/2;let ft;const dt=n.Ellipsoid.fromCartesian3(l),Ct=n.Ellipsoid.fromCartesian3(_);if(P.st||P.normal||P.tangent||P.bitangent){for(g=0;g<U;g++){ft=B[g]?Ct:dt;const t=n.Cartesian3.fromArray(S,3*g,f),e=ft.geodeticSurfaceNormal(t,d);if(W[g]&&n.Cartesian3.negate(e,e),P.st){const t=a.Cartesian2.negate(e,y);H[st++]=Math.atan2(t.y,t.x)/c.CesiumMath.TWO_PI+.5,H[st++]=Math.asin(e.z)/Math.PI+.5}if(P.normal&&(Z[mt++]=e.x,Z[mt++]=e.y,Z[mt++]=e.z),P.tangent||P.bitangent){const t=C;let a,i=0;if(B[g]&&(i=lt),a=!z&&g>=i&&g<i+2*L?n.Cartesian3.UNIT_X:n.Cartesian3.UNIT_Z,n.Cartesian3.cross(a,e,t),n.Cartesian3.normalize(t,t),P.tangent&&(j[ut++]=t.x,j[ut++]=t.y,j[ut++]=t.z),P.bitangent){const a=n.Cartesian3.cross(e,t,p);n.Cartesian3.normalize(a,a),q[ct++]=a.x,q[ct++]=a.y,q[ct++]=a.z}}}P.st&&(ot.st=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:H})),P.normal&&(ot.normal=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:Z})),P.tangent&&(ot.tangent=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:j})),P.bitangent&&(ot.bitangent=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:q}))}if(r.defined(t._offsetAttribute)){const e=S.length,a=t._offsetAttribute===m.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(e/3).fill(a);ot.applyOffset=new o.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new o.Geometry({attributes:ot,indices:X,primitiveType:o.PrimitiveType.TRIANGLES,boundingSphere:e.BoundingSphere.fromEllipsoid(dt),offsetAttribute:t._offsetAttribute})},A.getUnitEllipsoid=function(){return r.defined(g)||(g=A.createGeometry(new A({radii:new n.Cartesian3(1,1,1),vertexFormat:l.VertexFormat.POSITION_ONLY}))),g},t.EllipsoidGeometry=A}));
public/CIMSDK/Workers/EllipsoidOutlineGeometry-08bb8972.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367"],(function(t,i,e,a,n,o,r,s,u,m){"use strict";const f=new e.Cartesian3(1,1,1),c=Math.cos,l=Math.sin;function d(t){t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT);const i=n.defaultValue(t.radii,f),a=n.defaultValue(t.innerRadii,i),o=n.defaultValue(t.minimumClock,0),r=n.defaultValue(t.maximumClock,m.CesiumMath.TWO_PI),s=n.defaultValue(t.minimumCone,0),u=n.defaultValue(t.maximumCone,m.CesiumMath.PI),c=Math.round(n.defaultValue(t.stackPartitions,10)),l=Math.round(n.defaultValue(t.slicePartitions,8)),d=Math.round(n.defaultValue(t.subdivisions,128));this._radii=e.Cartesian3.clone(i),this._innerRadii=e.Cartesian3.clone(a),this._minimumClock=o,this._maximumClock=r,this._minimumCone=s,this._maximumCone=u,this._stackPartitions=c,this._slicePartitions=l,this._subdivisions=d,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}d.packedLength=2*e.Cartesian3.packedLength+8,d.pack=function(t,i,a){return a=n.defaultValue(a,0),e.Cartesian3.pack(t._radii,i,a),a+=e.Cartesian3.packedLength,e.Cartesian3.pack(t._innerRadii,i,a),a+=e.Cartesian3.packedLength,i[a++]=t._minimumClock,i[a++]=t._maximumClock,i[a++]=t._minimumCone,i[a++]=t._maximumCone,i[a++]=t._stackPartitions,i[a++]=t._slicePartitions,i[a++]=t._subdivisions,i[a]=n.defaultValue(t._offsetAttribute,-1),i};const C=new e.Cartesian3,_=new e.Cartesian3,p={radii:C,innerRadii:_,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};d.unpack=function(t,i,a){i=n.defaultValue(i,0);const o=e.Cartesian3.unpack(t,i,C);i+=e.Cartesian3.packedLength;const r=e.Cartesian3.unpack(t,i,_);i+=e.Cartesian3.packedLength;const s=t[i++],u=t[i++],m=t[i++],f=t[i++],c=t[i++],l=t[i++],h=t[i++],y=t[i];return n.defined(a)?(a._radii=e.Cartesian3.clone(o,a._radii),a._innerRadii=e.Cartesian3.clone(r,a._innerRadii),a._minimumClock=s,a._maximumClock=u,a._minimumCone=m,a._maximumCone=f,a._stackPartitions=c,a._slicePartitions=l,a._subdivisions=h,a._offsetAttribute=-1===y?void 0:y,a):(p.minimumClock=s,p.maximumClock=u,p.minimumCone=m,p.maximumCone=f,p.stackPartitions=c,p.slicePartitions=l,p.subdivisions=h,p.offsetAttribute=-1===y?void 0:y,new d(p))},d.createGeometry=function(t){const f=t._radii;if(f.x<=0||f.y<=0||f.z<=0)return;const d=t._innerRadii;if(d.x<=0||d.y<=0||d.z<=0)return;const C=t._minimumClock,_=t._maximumClock,p=t._minimumCone,h=t._maximumCone,y=t._subdivisions,k=e.Ellipsoid.fromCartesian3(f);let b=t._slicePartitions+1,x=t._stackPartitions+1;b=Math.round(b*Math.abs(_-C)/m.CesiumMath.TWO_PI),x=Math.round(x*Math.abs(h-p)/m.CesiumMath.PI),b<2&&(b=2),x<2&&(x=2);let A=0,P=1;const v=d.x!==f.x||d.y!==f.y||d.z!==f.z;let M=!1,w=!1;v&&(P=2,p>0&&(M=!0,A+=b),h<Math.PI&&(w=!0,A+=b));const V=y*P*(x+b),g=new Float64Array(3*V),G=2*(V+A-(b+x)*P),E=u.IndexDatatype.createTypedArray(V,G);let O,D,I,T,z=0;const L=new Array(x),R=new Array(x);for(O=0;O<x;O++)T=p+O*(h-p)/(x-1),L[O]=l(T),R[O]=c(T);const N=new Array(y),B=new Array(y);for(O=0;O<y;O++)I=C+O*(_-C)/(y-1),N[O]=l(I),B[O]=c(I);for(O=0;O<x;O++)for(D=0;D<y;D++)g[z++]=f.x*L[O]*B[D],g[z++]=f.y*L[O]*N[D],g[z++]=f.z*R[O];if(v)for(O=0;O<x;O++)for(D=0;D<y;D++)g[z++]=d.x*L[O]*B[D],g[z++]=d.y*L[O]*N[D],g[z++]=d.z*R[O];for(L.length=y,R.length=y,O=0;O<y;O++)T=p+O*(h-p)/(y-1),L[O]=l(T),R[O]=c(T);for(N.length=b,B.length=b,O=0;O<b;O++)I=C+O*(_-C)/(b-1),N[O]=l(I),B[O]=c(I);for(O=0;O<y;O++)for(D=0;D<b;D++)g[z++]=f.x*L[O]*B[D],g[z++]=f.y*L[O]*N[D],g[z++]=f.z*R[O];if(v)for(O=0;O<y;O++)for(D=0;D<b;D++)g[z++]=d.x*L[O]*B[D],g[z++]=d.y*L[O]*N[D],g[z++]=d.z*R[O];for(z=0,O=0;O<x*P;O++){const t=O*y;for(D=0;D<y-1;D++)E[z++]=t+D,E[z++]=t+D+1}let S=x*y*P;for(O=0;O<b;O++)for(D=0;D<y-1;D++)E[z++]=S+O+D*b,E[z++]=S+O+(D+1)*b;if(v)for(S=x*y*P+b*y,O=0;O<b;O++)for(D=0;D<y-1;D++)E[z++]=S+O+D*b,E[z++]=S+O+(D+1)*b;if(v){let t=x*y*P,i=t+y*b;if(M)for(O=0;O<b;O++)E[z++]=t+O,E[z++]=i+O;if(w)for(t+=y*b-b,i+=y*b-b,O=0;O<b;O++)E[z++]=t+O,E[z++]=i+O}const U=new r.GeometryAttributes({position:new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})});if(n.defined(t._offsetAttribute)){const i=g.length,e=t._offsetAttribute===s.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(i/3).fill(e);U.applyOffset=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new o.Geometry({attributes:U,indices:E,primitiveType:o.PrimitiveType.LINES,boundingSphere:i.BoundingSphere.fromEllipsoid(k),offsetAttribute:t._offsetAttribute})},t.EllipsoidOutlineGeometry=d}));
public/CIMSDK/Workers/EllipsoidRhumbLine-2cf9c5ef.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./defaultValue-865ac579","./Math-76ce6367"],(function(t,i,e,a){"use strict";function n(t,i,e){if(0===t)return i*e;const a=t*t,n=a*a,s=n*a,h=s*a,u=h*a,o=u*a,l=e;return i*((1-a/4-3*n/64-5*s/256-175*h/16384-441*u/65536-4851*o/1048576)*l-(3*a/8+3*n/32+45*s/1024+105*h/4096+2205*u/131072+6237*o/524288)*Math.sin(2*l)+(15*n/256+45*s/1024+525*h/16384+1575*u/65536+155925*o/8388608)*Math.sin(4*l)-(35*s/3072+175*h/12288+3675*u/262144+13475*o/1048576)*Math.sin(6*l)+(315*h/131072+2205*u/524288+43659*o/8388608)*Math.sin(8*l)-(693*u/1310720+6237*o/5242880)*Math.sin(10*l)+1001*o/8388608*Math.sin(12*l))}function s(t,i){if(0===t)return Math.log(Math.tan(.5*(a.CesiumMath.PI_OVER_TWO+i)));const e=t*Math.sin(i);return Math.log(Math.tan(.5*(a.CesiumMath.PI_OVER_TWO+i)))-t/2*Math.log((1+e)/(1-e))}const h=new i.Cartesian3,u=new i.Cartesian3;function o(t,e,o,l){i.Cartesian3.normalize(l.cartographicToCartesian(e,u),h),i.Cartesian3.normalize(l.cartographicToCartesian(o,u),u);const r=l.maximumRadius,d=l.minimumRadius,c=r*r,M=d*d;t._ellipticitySquared=(c-M)/c,t._ellipticity=Math.sqrt(t._ellipticitySquared),t._start=i.Cartographic.clone(e,t._start),t._start.height=0,t._end=i.Cartographic.clone(o,t._end),t._end.height=0,t._heading=function(t,i,e,n,h){const u=s(t._ellipticity,e),o=s(t._ellipticity,h);return Math.atan2(a.CesiumMath.negativePiToPi(n-i),o-u)}(t,e.longitude,e.latitude,o.longitude,o.latitude),t._distance=function(t,i,e,s,h,u,o){const l=t._heading,r=u-s;let d=0;if(a.CesiumMath.equalsEpsilon(Math.abs(l),a.CesiumMath.PI_OVER_TWO,a.CesiumMath.EPSILON8))if(i===e)d=i*Math.cos(h)*a.CesiumMath.negativePiToPi(r);else{const e=Math.sin(h);d=i*Math.cos(h)*a.CesiumMath.negativePiToPi(r)/Math.sqrt(1-t._ellipticitySquared*e*e)}else{const e=n(t._ellipticity,i,h);d=(n(t._ellipticity,i,o)-e)/Math.cos(l)}return Math.abs(d)}(t,l.maximumRadius,l.minimumRadius,e.longitude,e.latitude,o.longitude,o.latitude)}function l(t,h,u,o,l,r){if(0===u)return i.Cartographic.clone(t,r);const d=l*l;let c,M,g;if(Math.abs(a.CesiumMath.PI_OVER_TWO-Math.abs(h))>a.CesiumMath.EPSILON8){M=function(t,i,e){const a=t/e;if(0===i)return a;const n=a*a,s=n*a,h=s*a,u=i*i,o=u*u,l=o*u,r=l*u,d=r*u,c=d*u,M=Math.sin(2*a),g=Math.cos(2*a),m=Math.sin(4*a),_=Math.cos(4*a),p=Math.sin(6*a),C=Math.cos(6*a),f=Math.sin(8*a),P=Math.cos(8*a),O=Math.sin(10*a);return a+a*u/4+7*a*o/64+15*a*l/256+579*a*r/16384+1515*a*d/65536+16837*a*c/1048576+(3*a*o/16+45*a*l/256-a*(32*n-561)*r/4096-a*(232*n-1677)*d/16384+a*(399985-90560*n+512*h)*c/5242880)*g+(21*a*l/256+483*a*r/4096-a*(224*n-1969)*d/16384-a*(33152*n-112599)*c/1048576)*_+(151*a*r/4096+4681*a*d/65536+1479*a*c/16384-453*s*c/32768)*C+(1097*a*d/65536+42783*a*c/1048576)*P+8011*a*c/1048576*Math.cos(10*a)+(3*u/8+3*o/16+213*l/2048-3*n*l/64+255*r/4096-33*n*r/512+20861*d/524288-33*n*d/512+h*d/1024+28273*c/1048576-471*n*c/8192+9*h*c/4096)*M+(21*o/256+21*l/256+533*r/8192-21*n*r/512+197*d/4096-315*n*d/4096+584039*c/16777216-12517*n*c/131072+7*h*c/2048)*m+(151*l/6144+151*r/4096+5019*d/131072-453*n*d/16384+26965*c/786432-8607*n*c/131072)*p+(1097*r/131072+1097*d/65536+225797*c/10485760-1097*n*c/65536)*f+(8011*d/2621440+8011*c/1048576)*O+293393*c/251658240*Math.sin(12*a)}(n(l,o,t.latitude)+u*Math.cos(h),l,o);const i=s(l,t.latitude),e=s(l,M);g=Math.tan(h)*(e-i),c=a.CesiumMath.negativePiToPi(t.longitude+g)}else{let i;if(M=t.latitude,0===l)i=o*Math.cos(t.latitude);else{const e=Math.sin(t.latitude);i=o*Math.cos(t.latitude)/Math.sqrt(1-d*e*e)}g=u/i,c=h>0?a.CesiumMath.negativePiToPi(t.longitude+g):a.CesiumMath.negativePiToPi(t.longitude-g)}return e.defined(r)?(r.longitude=c,r.latitude=M,r.height=0,r):new i.Cartographic(c,M,0)}function r(t,a,n){const s=e.defaultValue(n,i.Ellipsoid.WGS84);this._ellipsoid=s,this._start=new i.Cartographic,this._end=new i.Cartographic,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,e.defined(t)&&e.defined(a)&&o(this,t,a,s)}Object.defineProperties(r.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}}),r.fromStartHeadingDistance=function(t,n,s,h,u){const o=e.defaultValue(h,i.Ellipsoid.WGS84),d=o.maximumRadius,c=o.minimumRadius,M=d*d,g=c*c,m=Math.sqrt((M-g)/M),_=l(t,n=a.CesiumMath.negativePiToPi(n),s,o.maximumRadius,m);return!e.defined(u)||e.defined(h)&&!h.equals(u.ellipsoid)?new r(t,_,o):(u.setEndPoints(t,_),u)},r.prototype.setEndPoints=function(t,i){o(this,t,i,this._ellipsoid)},r.prototype.interpolateUsingFraction=function(t,i){return this.interpolateUsingSurfaceDistance(t*this._distance,i)},r.prototype.interpolateUsingSurfaceDistance=function(t,i){return l(this._start,this._heading,t,this._ellipsoid.maximumRadius,this._ellipticity,i)},r.prototype.findIntersectionWithLongitude=function(t,n){const s=this._ellipticity,h=this._heading,u=Math.abs(h),o=this._start;if(t=a.CesiumMath.negativePiToPi(t),a.CesiumMath.equalsEpsilon(Math.abs(t),Math.PI,a.CesiumMath.EPSILON14)&&(t=a.CesiumMath.sign(o.longitude)*Math.PI),e.defined(n)||(n=new i.Cartographic),Math.abs(a.CesiumMath.PI_OVER_TWO-u)<=a.CesiumMath.EPSILON8)return n.longitude=t,n.latitude=o.latitude,n.height=0,n;if(a.CesiumMath.equalsEpsilon(Math.abs(a.CesiumMath.PI_OVER_TWO-u),a.CesiumMath.PI_OVER_TWO,a.CesiumMath.EPSILON8)){if(a.CesiumMath.equalsEpsilon(t,o.longitude,a.CesiumMath.EPSILON12))return;return n.longitude=t,n.latitude=a.CesiumMath.PI_OVER_TWO*a.CesiumMath.sign(a.CesiumMath.PI_OVER_TWO-h),n.height=0,n}const l=o.latitude,r=s*Math.sin(l),d=Math.tan(.5*(a.CesiumMath.PI_OVER_TWO+l))*Math.exp((t-o.longitude)/Math.tan(h)),c=(1+r)/(1-r);let M,g=o.latitude;do{M=g;const t=s*Math.sin(M),i=(1+t)/(1-t);g=2*Math.atan(d*Math.pow(i/c,s/2))-a.CesiumMath.PI_OVER_TWO}while(!a.CesiumMath.equalsEpsilon(g,M,a.CesiumMath.EPSILON12));return n.longitude=t,n.latitude=g,n.height=0,n},r.prototype.findIntersectionWithLatitude=function(t,n){const h=this._ellipticity,u=this._heading,o=this._start;if(a.CesiumMath.equalsEpsilon(Math.abs(u),a.CesiumMath.PI_OVER_TWO,a.CesiumMath.EPSILON8))return;const l=s(h,o.latitude),r=s(h,t),d=Math.tan(u)*(r-l),c=a.CesiumMath.negativePiToPi(o.longitude+d);return e.defined(n)?(n.longitude=c,n.latitude=t,n.height=0,n):new i.Cartographic(c,t,0)},t.EllipsoidRhumbLine=r}));
public/CIMSDK/Workers/EllipsoidTangentPlane-a9681249.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./AxisAlignedBoundingBox-73c388a7","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./defaultValue-865ac579","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./Transforms-221c7c82"],(function(t,n,e,i,o,r,s,a){"use strict";const l=new e.Cartesian4;function c(t,n){t=(n=o.defaultValue(n,i.Ellipsoid.WGS84)).scaleToGeodeticSurface(t);const r=a.Transforms.eastNorthUpToFixedFrame(t,n);this._ellipsoid=n,this._origin=t,this._xAxis=i.Cartesian3.fromCartesian4(e.Matrix4.getColumn(r,0,l)),this._yAxis=i.Cartesian3.fromCartesian4(e.Matrix4.getColumn(r,1,l));const c=i.Cartesian3.fromCartesian4(e.Matrix4.getColumn(r,2,l));this._plane=s.Plane.fromPointNormal(t,c)}Object.defineProperties(c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});const d=new n.AxisAlignedBoundingBox;c.fromPoints=function(t,e){return new c(n.AxisAlignedBoundingBox.fromPoints(t,d).center,e)};const f=new r.Ray,p=new i.Cartesian3;c.prototype.projectPointOntoPlane=function(t,n){const s=f;s.origin=t,i.Cartesian3.normalize(t,s.direction);let a=r.IntersectionTests.rayPlane(s,this._plane,p);if(o.defined(a)||(i.Cartesian3.negate(s.direction,s.direction),a=r.IntersectionTests.rayPlane(s,this._plane,p)),o.defined(a)){const t=i.Cartesian3.subtract(a,this._origin,a),r=i.Cartesian3.dot(this._xAxis,t),s=i.Cartesian3.dot(this._yAxis,t);return o.defined(n)?(n.x=r,n.y=s,n):new e.Cartesian2(r,s)}},c.prototype.projectPointsOntoPlane=function(t,n){o.defined(n)||(n=[]);let e=0;const i=t.length;for(let r=0;r<i;r++){const i=this.projectPointOntoPlane(t[r],n[e]);o.defined(i)&&(n[e]=i,e++)}return n.length=e,n},c.prototype.projectPointToNearestOnPlane=function(t,n){o.defined(n)||(n=new e.Cartesian2);const s=f;s.origin=t,i.Cartesian3.clone(this._plane.normal,s.direction);let a=r.IntersectionTests.rayPlane(s,this._plane,p);o.defined(a)||(i.Cartesian3.negate(s.direction,s.direction),a=r.IntersectionTests.rayPlane(s,this._plane,p));const l=i.Cartesian3.subtract(a,this._origin,a),c=i.Cartesian3.dot(this._xAxis,l),d=i.Cartesian3.dot(this._yAxis,l);return n.x=c,n.y=d,n},c.prototype.projectPointsToNearestOnPlane=function(t,n){o.defined(n)||(n=[]);const e=t.length;n.length=e;for(let i=0;i<e;i++)n[i]=this.projectPointToNearestOnPlane(t[i],n[i]);return n};const u=new i.Cartesian3;c.prototype.projectPointOntoEllipsoid=function(t,n){o.defined(n)||(n=new i.Cartesian3);const e=this._ellipsoid,r=this._origin,s=this._xAxis,a=this._yAxis,l=u;return i.Cartesian3.multiplyByScalar(s,t.x,l),n=i.Cartesian3.add(r,l,n),i.Cartesian3.multiplyByScalar(a,t.y,l),i.Cartesian3.add(n,l,n),e.scaleToGeocentricSurface(n,n),n},c.prototype.projectPointsOntoEllipsoid=function(t,n){const e=t.length;o.defined(n)?n.length=e:n=new Array(e);for(let i=0;i<e;++i)n[i]=this.projectPointOntoEllipsoid(t[i],n[i]);return n},t.EllipsoidTangentPlane=c}));
public/CIMSDK/Workers/EncodedCartesian3-e8922703.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./defaultValue-865ac579"],(function(e,n,o){"use strict";function i(){this.high=n.Cartesian3.clone(n.Cartesian3.ZERO),this.low=n.Cartesian3.clone(n.Cartesian3.ZERO)}i.encode=function(e,n){let i;return o.defined(n)||(n={high:0,low:0}),e>=0?(i=65536*Math.floor(e/65536),n.high=i,n.low=e-i):(i=65536*Math.floor(-e/65536),n.high=-i,n.low=e+i),n};const t={high:0,low:0};i.fromCartesian=function(e,n){o.defined(n)||(n=new i);const h=n.high,a=n.low;return i.encode(e.x,t),h.x=t.high,a.x=t.low,i.encode(e.y,t),h.y=t.high,a.y=t.low,i.encode(e.z,t),h.z=t.high,a.z=t.low,n};const h=new i;i.writeElements=function(e,n,o){i.fromCartesian(e,h);const t=h.high,a=h.low;n[o]=t.x,n[o+1]=t.y,n[o+2]=t.z,n[o+3]=a.x,n[o+4]=a.y,n[o+5]=a.z},e.EncodedCartesian3=i}));
public/CIMSDK/Workers/FrustumGeometry-47bcac80.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./Matrix3-aeb3c326","./Matrix2-2fdcdec7","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./Math-76ce6367","./Plane-fbab0ca2","./VertexFormat-20b5279f"],(function(t,e,a,i,n,r,s,o,f,u,l){"use strict";function c(t){this.planes=r.defaultValue(t,[])}const h=[new a.Cartesian3,new a.Cartesian3,new a.Cartesian3];a.Cartesian3.clone(a.Cartesian3.UNIT_X,h[0]),a.Cartesian3.clone(a.Cartesian3.UNIT_Y,h[1]),a.Cartesian3.clone(a.Cartesian3.UNIT_Z,h[2]);const p=new a.Cartesian3,d=new a.Cartesian3,C=new u.Plane(new a.Cartesian3(1,0,0),0);function m(t){t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT),this.left=t.left,this._left=void 0,this.right=t.right,this._right=void 0,this.top=t.top,this._top=void 0,this.bottom=t.bottom,this._bottom=void 0,this.near=r.defaultValue(t.near,1),this._near=this.near,this.far=r.defaultValue(t.far,5e8),this._far=this.far,this._cullingVolume=new c,this._orthographicMatrix=new i.Matrix4}function _(t){t.top===t._top&&t.bottom===t._bottom&&t.left===t._left&&t.right===t._right&&t.near===t._near&&t.far===t._far||(t._left=t.left,t._right=t.right,t._top=t.top,t._bottom=t.bottom,t._near=t.near,t._far=t.far,t._orthographicMatrix=i.Matrix4.computeOrthographicOffCenter(t.left,t.right,t.bottom,t.top,t.near,t.far,t._orthographicMatrix))}c.fromBoundingSphere=function(t,e){r.defined(e)||(e=new c);const n=h.length,s=e.planes;s.length=2*n;const o=t.center,f=t.radius;let u=0;for(let t=0;t<n;++t){const e=h[t];let n=s[u],l=s[u+1];r.defined(n)||(n=s[u]=new i.Cartesian4),r.defined(l)||(l=s[u+1]=new i.Cartesian4),a.Cartesian3.multiplyByScalar(e,-f,p),a.Cartesian3.add(o,p,p),n.x=e.x,n.y=e.y,n.z=e.z,n.w=-a.Cartesian3.dot(e,p),a.Cartesian3.multiplyByScalar(e,f,p),a.Cartesian3.add(o,p,p),l.x=-e.x,l.y=-e.y,l.z=-e.z,l.w=-a.Cartesian3.dot(a.Cartesian3.negate(e,d),p),u+=2}return e},c.prototype.computeVisibility=function(t){const a=this.planes;let i=!1;for(let n=0,r=a.length;n<r;++n){const r=t.intersectPlane(u.Plane.fromCartesian4(a[n],C));if(r===e.Intersect.OUTSIDE)return e.Intersect.OUTSIDE;r===e.Intersect.INTERSECTING&&(i=!0)}return i?e.Intersect.INTERSECTING:e.Intersect.INSIDE},c.prototype.computeVisibilityWithPlaneMask=function(t,a){if(a===c.MASK_OUTSIDE||a===c.MASK_INSIDE)return a;let i=c.MASK_INSIDE;const n=this.planes;for(let r=0,s=n.length;r<s;++r){const s=r<31?1<<r:0;if(r<31&&0==(a&s))continue;const o=t.intersectPlane(u.Plane.fromCartesian4(n[r],C));if(o===e.Intersect.OUTSIDE)return c.MASK_OUTSIDE;o===e.Intersect.INTERSECTING&&(i|=s)}return i},c.MASK_OUTSIDE=4294967295,c.MASK_INSIDE=0,c.MASK_INDETERMINATE=2147483647,Object.defineProperties(m.prototype,{projectionMatrix:{get:function(){return _(this),this._orthographicMatrix}}});const y=new a.Cartesian3,w=new a.Cartesian3,g=new a.Cartesian3,x=new a.Cartesian3;function v(t){t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT),this._offCenterFrustum=new m,this.width=t.width,this._width=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=r.defaultValue(t.near,1),this._near=this.near,this.far=r.defaultValue(t.far,5e8),this._far=this.far}function F(t){const e=t._offCenterFrustum;if(t.width!==t._width||t.aspectRatio!==t._aspectRatio||t.near!==t._near||t.far!==t._far){t._aspectRatio=t.aspectRatio,t._width=t.width,t._near=t.near,t._far=t.far;const a=1/t.aspectRatio;e.right=.5*t.width,e.left=-e.right,e.top=a*e.right,e.bottom=-e.top,e.near=t.near,e.far=t.far}}function b(t){t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT),this.left=t.left,this._left=void 0,this.right=t.right,this._right=void 0,this.top=t.top,this._top=void 0,this.bottom=t.bottom,this._bottom=void 0,this.near=r.defaultValue(t.near,1),this._near=this.near,this.far=r.defaultValue(t.far,5e8),this._far=this.far,this.farForTileset=r.defaultValue(t.farForTileset,5e8),this._farForTileset=this.farForTileset,this._cullingVolumeForTileset=new c,this._cullingVolume=new c,this._perspectiveMatrix=new i.Matrix4,this._infinitePerspective=new i.Matrix4}function M(t){const e=t.top,a=t.bottom,n=t.right,r=t.left,s=t.near,o=t.far;e===t._top&&a===t._bottom&&r===t._left&&n===t._right&&s===t._near&&o===t._far||(t._left=r,t._right=n,t._top=e,t._bottom=a,t._near=s,t._far=o,t._perspectiveMatrix=i.Matrix4.computePerspectiveOffCenter(r,n,a,e,s,o,t._perspectiveMatrix),t._infinitePerspective=i.Matrix4.computeInfinitePerspectiveOffCenter(r,n,a,e,s,t._infinitePerspective))}m.prototype.computeCullingVolume=function(t,e,n){const s=this._cullingVolume.planes,o=this.top,f=this.bottom,u=this.right,l=this.left,c=this.near,h=this.far,p=a.Cartesian3.cross(e,n,y);a.Cartesian3.normalize(p,p);const d=w;a.Cartesian3.multiplyByScalar(e,c,d),a.Cartesian3.add(t,d,d);const C=g;a.Cartesian3.multiplyByScalar(p,l,C),a.Cartesian3.add(d,C,C);let m=s[0];return r.defined(m)||(m=s[0]=new i.Cartesian4),m.x=p.x,m.y=p.y,m.z=p.z,m.w=-a.Cartesian3.dot(p,C),a.Cartesian3.multiplyByScalar(p,u,C),a.Cartesian3.add(d,C,C),m=s[1],r.defined(m)||(m=s[1]=new i.Cartesian4),m.x=-p.x,m.y=-p.y,m.z=-p.z,m.w=-a.Cartesian3.dot(a.Cartesian3.negate(p,x),C),a.Cartesian3.multiplyByScalar(n,f,C),a.Cartesian3.add(d,C,C),m=s[2],r.defined(m)||(m=s[2]=new i.Cartesian4),m.x=n.x,m.y=n.y,m.z=n.z,m.w=-a.Cartesian3.dot(n,C),a.Cartesian3.multiplyByScalar(n,o,C),a.Cartesian3.add(d,C,C),m=s[3],r.defined(m)||(m=s[3]=new i.Cartesian4),m.x=-n.x,m.y=-n.y,m.z=-n.z,m.w=-a.Cartesian3.dot(a.Cartesian3.negate(n,x),C),m=s[4],r.defined(m)||(m=s[4]=new i.Cartesian4),m.x=e.x,m.y=e.y,m.z=e.z,m.w=-a.Cartesian3.dot(e,d),a.Cartesian3.multiplyByScalar(e,h,C),a.Cartesian3.add(t,C,C),m=s[5],r.defined(m)||(m=s[5]=new i.Cartesian4),m.x=-e.x,m.y=-e.y,m.z=-e.z,m.w=-a.Cartesian3.dot(a.Cartesian3.negate(e,x),C),this._cullingVolume},m.prototype.getPixelDimensions=function(t,e,a,i,n){_(this);const r=i*(this.right-this.left)/t,s=i*(this.top-this.bottom)/e;return n.x=r,n.y=s,n},m.prototype.clone=function(t){return r.defined(t)||(t=new m),t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},m.prototype.equals=function(t){return r.defined(t)&&t instanceof m&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},m.prototype.equalsEpsilon=function(t,e,a){return t===this||r.defined(t)&&t instanceof m&&f.CesiumMath.equalsEpsilon(this.right,t.right,e,a)&&f.CesiumMath.equalsEpsilon(this.left,t.left,e,a)&&f.CesiumMath.equalsEpsilon(this.top,t.top,e,a)&&f.CesiumMath.equalsEpsilon(this.bottom,t.bottom,e,a)&&f.CesiumMath.equalsEpsilon(this.near,t.near,e,a)&&f.CesiumMath.equalsEpsilon(this.far,t.far,e,a)},v.packedLength=4,v.pack=function(t,e,a){return a=r.defaultValue(a,0),e[a++]=t.width,e[a++]=t.aspectRatio,e[a++]=t.near,e[a]=t.far,e},v.unpack=function(t,e,a){return e=r.defaultValue(e,0),r.defined(a)||(a=new v),a.width=t[e++],a.aspectRatio=t[e++],a.near=t[e++],a.far=t[e],a},Object.defineProperties(v.prototype,{projectionMatrix:{get:function(){return F(this),this._offCenterFrustum.projectionMatrix}}}),v.prototype.computeCullingVolume=function(t,e,a){return F(this),this._offCenterFrustum.computeCullingVolume(t,e,a)},v.prototype.getPixelDimensions=function(t,e,a,i,n){return F(this),this._offCenterFrustum.getPixelDimensions(t,e,a,i,n)},v.prototype.clone=function(t){return r.defined(t)||(t=new v),t.aspectRatio=this.aspectRatio,t.width=this.width,t.near=this.near,t.far=this.far,t._aspectRatio=void 0,t._width=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},v.prototype.equals=function(t){return!!(r.defined(t)&&t instanceof v)&&(F(this),F(t),this.width===t.width&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},v.prototype.equalsEpsilon=function(t,e,a){return!!(r.defined(t)&&t instanceof v)&&(F(this),F(t),f.CesiumMath.equalsEpsilon(this.width,t.width,e,a)&&f.CesiumMath.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,a)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,a))},Object.defineProperties(b.prototype,{projectionMatrix:{get:function(){return M(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return M(this),this._infinitePerspective}}});const V=new a.Cartesian3,z=new a.Cartesian3,T=new a.Cartesian3,E=new a.Cartesian3;function O(t){t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT),this._offCenterFrustum=new b,this.fov=t.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=r.defaultValue(t.near,1),this._near=this.near,this.far=r.defaultValue(t.far,5e8),this._far=this.far,this.farForTileset=r.defaultValue(t.farForTileset,5e8),this._farForTileset=this.farForTileset,this.xOffset=r.defaultValue(t.xOffset,0),this._xOffset=this.xOffset,this.yOffset=r.defaultValue(t.yOffset,0),this._yOffset=this.yOffset}function S(t){const e=t._offCenterFrustum;t.fov===t._fov&&t.aspectRatio===t._aspectRatio&&t.near===t._near&&t.far===t._far&&t.farForTileset===t._farForTileset&&t.xOffset===t._xOffset&&t.yOffset===t._yOffset||(t._aspectRatio=t.aspectRatio,t._fov=t.fov,t._fovy=t.aspectRatio<=1?t.fov:2*Math.atan(Math.tan(.5*t.fov)/t.aspectRatio),t._near=t.near,t._far=t.far,t._farForTileset=t.farForTileset,t._sseDenominator=2*Math.tan(.5*t._fovy),t._xOffset=t.xOffset,t._yOffset=t.yOffset,e.top=t.near*Math.tan(.5*t._fovy),e.bottom=-e.top,e.right=t.aspectRatio*e.top,e.left=-e.right,e.near=t.near,e.far=t.far,e.farForTileset=t.farForTileset,e.right+=t.xOffset,e.left+=t.xOffset,e.top+=t.yOffset,e.bottom+=t.yOffset)}b.prototype.computeCullingVolume=function(t,e,n){const s=this._cullingVolume.planes,o=this.top,f=this.bottom,u=this.right,l=this.left,c=this.near,h=this.far,p=a.Cartesian3.cross(e,n,V),d=z;a.Cartesian3.multiplyByScalar(e,c,d),a.Cartesian3.add(t,d,d);const C=T;a.Cartesian3.multiplyByScalar(e,h,C),a.Cartesian3.add(t,C,C);const m=E;a.Cartesian3.multiplyByScalar(p,l,m),a.Cartesian3.add(d,m,m),a.Cartesian3.subtract(m,t,m),a.Cartesian3.normalize(m,m),a.Cartesian3.cross(m,n,m),a.Cartesian3.normalize(m,m);let _=s[0];return r.defined(_)||(_=s[0]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,t),a.Cartesian3.multiplyByScalar(p,u,m),a.Cartesian3.add(d,m,m),a.Cartesian3.subtract(m,t,m),a.Cartesian3.cross(n,m,m),a.Cartesian3.normalize(m,m),_=s[1],r.defined(_)||(_=s[1]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,t),a.Cartesian3.multiplyByScalar(n,f,m),a.Cartesian3.add(d,m,m),a.Cartesian3.subtract(m,t,m),a.Cartesian3.cross(p,m,m),a.Cartesian3.normalize(m,m),_=s[2],r.defined(_)||(_=s[2]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,t),a.Cartesian3.multiplyByScalar(n,o,m),a.Cartesian3.add(d,m,m),a.Cartesian3.subtract(m,t,m),a.Cartesian3.cross(m,p,m),a.Cartesian3.normalize(m,m),_=s[3],r.defined(_)||(_=s[3]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,t),_=s[4],r.defined(_)||(_=s[4]=new i.Cartesian4),_.x=e.x,_.y=e.y,_.z=e.z,_.w=-a.Cartesian3.dot(e,d),a.Cartesian3.negate(e,m),_=s[5],r.defined(_)||(_=s[5]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,C),this._cullingVolume},b.prototype.computeCullingVolumeForTileset=function(t,e,n){const s=this._cullingVolumeForTileset.planes,o=this.top,f=this.bottom,u=this.right,l=this.left,c=this.near,h=this.farForTileset,p=a.Cartesian3.cross(e,n,V),d=z;a.Cartesian3.multiplyByScalar(e,c,d),a.Cartesian3.add(t,d,d);const C=T;a.Cartesian3.multiplyByScalar(e,h,C),a.Cartesian3.add(t,C,C);const m=E;a.Cartesian3.multiplyByScalar(p,l,m),a.Cartesian3.add(d,m,m),a.Cartesian3.subtract(m,t,m),a.Cartesian3.normalize(m,m),a.Cartesian3.cross(m,n,m),a.Cartesian3.normalize(m,m);let _=s[0];return r.defined(_)||(_=s[0]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,t),a.Cartesian3.multiplyByScalar(p,u,m),a.Cartesian3.add(d,m,m),a.Cartesian3.subtract(m,t,m),a.Cartesian3.cross(n,m,m),a.Cartesian3.normalize(m,m),_=s[1],r.defined(_)||(_=s[1]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,t),a.Cartesian3.multiplyByScalar(n,f,m),a.Cartesian3.add(d,m,m),a.Cartesian3.subtract(m,t,m),a.Cartesian3.cross(p,m,m),a.Cartesian3.normalize(m,m),_=s[2],r.defined(_)||(_=s[2]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,t),a.Cartesian3.multiplyByScalar(n,o,m),a.Cartesian3.add(d,m,m),a.Cartesian3.subtract(m,t,m),a.Cartesian3.cross(m,p,m),a.Cartesian3.normalize(m,m),_=s[3],r.defined(_)||(_=s[3]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,t),_=s[4],r.defined(_)||(_=s[4]=new i.Cartesian4),_.x=e.x,_.y=e.y,_.z=e.z,_.w=-a.Cartesian3.dot(e,d),a.Cartesian3.negate(e,m),_=s[5],r.defined(_)||(_=s[5]=new i.Cartesian4),_.x=m.x,_.y=m.y,_.z=m.z,_.w=-a.Cartesian3.dot(m,C),this._cullingVolumeForTileset},b.prototype.getPixelDimensions=function(t,e,a,i,n){M(this);const r=1/this.near;let s=this.top*r;const o=2*i*a*s/e;s=this.right*r;const f=2*i*a*s/t;return n.x=f,n.y=o,n},b.prototype.clone=function(t){return r.defined(t)||(t=new b),t.right=this.right,t.left=this.left,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t._left=void 0,t._right=void 0,t._top=void 0,t._bottom=void 0,t._near=void 0,t._far=void 0,t},b.prototype.equals=function(t){return r.defined(t)&&t instanceof b&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far},b.prototype.equalsEpsilon=function(t,e,a){return t===this||r.defined(t)&&t instanceof b&&f.CesiumMath.equalsEpsilon(this.right,t.right,e,a)&&f.CesiumMath.equalsEpsilon(this.left,t.left,e,a)&&f.CesiumMath.equalsEpsilon(this.top,t.top,e,a)&&f.CesiumMath.equalsEpsilon(this.bottom,t.bottom,e,a)&&f.CesiumMath.equalsEpsilon(this.near,t.near,e,a)&&f.CesiumMath.equalsEpsilon(this.far,t.far,e,a)},O.packedLength=6,O.pack=function(t,e,a){return a=r.defaultValue(a,0),e[a++]=t.fov,e[a++]=t.aspectRatio,e[a++]=t.near,e[a++]=t.far,e[a++]=t.xOffset,e[a]=t.yOffset,e},O.unpack=function(t,e,a){return e=r.defaultValue(e,0),r.defined(a)||(a=new O),a.fov=t[e++],a.aspectRatio=t[e++],a.near=t[e++],a.far=t[e++],a.xOffset=t[e++],a.yOffset=t[e],a},Object.defineProperties(O.prototype,{projectionMatrix:{get:function(){return S(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return S(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return S(this),this._fovy}},sseDenominator:{get:function(){return S(this),this._sseDenominator}}}),O.prototype.computeCullingVolume=function(t,e,a){return S(this),this._offCenterFrustum.computeCullingVolume(t,e,a)},O.prototype.computeCullingVolumeForTileset=function(t,e,a){return S(this),this._offCenterFrustum.computeCullingVolumeForTileset(t,e,a)},O.prototype.getPixelDimensions=function(t,e,a,i,n){return S(this),this._offCenterFrustum.getPixelDimensions(t,e,a,i,n)},O.prototype.clone=function(t){return r.defined(t)||(t=new O),t.aspectRatio=this.aspectRatio,t.fov=this.fov,t.near=this.near,t.far=this.far,t._aspectRatio=void 0,t._fov=void 0,t._near=void 0,t._far=void 0,this._offCenterFrustum.clone(t._offCenterFrustum),t},O.prototype.equals=function(t){return!!(r.defined(t)&&t instanceof O)&&(S(this),S(t),this.fov===t.fov&&this.aspectRatio===t.aspectRatio&&this._offCenterFrustum.equals(t._offCenterFrustum))},O.prototype.equalsEpsilon=function(t,e,a){return!!(r.defined(t)&&t instanceof O)&&(S(this),S(t),f.CesiumMath.equalsEpsilon(this.fov,t.fov,e,a)&&f.CesiumMath.equalsEpsilon(this.aspectRatio,t.aspectRatio,e,a)&&this._offCenterFrustum.equalsEpsilon(t._offCenterFrustum,e,a))};function P(t){const i=t.frustum,n=t.orientation,s=t.origin,o=r.defaultValue(t.vertexFormat,l.VertexFormat.DEFAULT),f=r.defaultValue(t._drawNearPlane,!0);let u,c;i instanceof O?(u=0,c=O.packedLength):i instanceof v&&(u=1,c=v.packedLength),this._frustumType=u,this._frustum=i.clone(),this._origin=a.Cartesian3.clone(s),this._orientation=e.Quaternion.clone(n),this._drawNearPlane=f,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+c+a.Cartesian3.packedLength+e.Quaternion.packedLength+l.VertexFormat.packedLength}P.pack=function(t,i,n){n=r.defaultValue(n,0);const s=t._frustumType,o=t._frustum;return i[n++]=s,0===s?(O.pack(o,i,n),n+=O.packedLength):(v.pack(o,i,n),n+=v.packedLength),a.Cartesian3.pack(t._origin,i,n),n+=a.Cartesian3.packedLength,e.Quaternion.pack(t._orientation,i,n),n+=e.Quaternion.packedLength,l.VertexFormat.pack(t._vertexFormat,i,n),i[n+=l.VertexFormat.packedLength]=t._drawNearPlane?1:0,i};const R=new O,k=new v,A=new e.Quaternion,D=new a.Cartesian3,I=new l.VertexFormat;function B(t,e,a,i,n,s,o,f){const u=t/3*2;for(let n=0;n<4;++n)r.defined(e)&&(e[t]=s.x,e[t+1]=s.y,e[t+2]=s.z),r.defined(a)&&(a[t]=o.x,a[t+1]=o.y,a[t+2]=o.z),r.defined(i)&&(i[t]=f.x,i[t+1]=f.y,i[t+2]=f.z),t+=3;n[u]=0,n[u+1]=0,n[u+2]=1,n[u+3]=0,n[u+4]=1,n[u+5]=1,n[u+6]=0,n[u+7]=1}P.unpack=function(t,i,n){i=r.defaultValue(i,0);const s=t[i++];let o;0===s?(o=O.unpack(t,i,R),i+=O.packedLength):(o=v.unpack(t,i,k),i+=v.packedLength);const f=a.Cartesian3.unpack(t,i,D);i+=a.Cartesian3.packedLength;const u=e.Quaternion.unpack(t,i,A);i+=e.Quaternion.packedLength;const c=l.VertexFormat.unpack(t,i,I),h=1===t[i+=l.VertexFormat.packedLength];if(!r.defined(n))return new P({frustum:o,origin:f,orientation:u,vertexFormat:c,_drawNearPlane:h});const p=s===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(p),n._frustumType=s,n._origin=a.Cartesian3.clone(f,n._origin),n._orientation=e.Quaternion.clone(u,n._orientation),n._vertexFormat=l.VertexFormat.clone(c,n._vertexFormat),n._drawNearPlane=h,n};const q=new a.Matrix3,L=new i.Matrix4,N=new i.Matrix4,G=new a.Cartesian3,j=new a.Cartesian3,U=new a.Cartesian3,Q=new a.Cartesian3,K=new a.Cartesian3,Y=new a.Cartesian3,J=new Array(3),W=new Array(4);W[0]=new i.Cartesian4(-1,-1,1,1),W[1]=new i.Cartesian4(1,-1,1,1),W[2]=new i.Cartesian4(1,1,1,1),W[3]=new i.Cartesian4(-1,1,1,1);const X=new Array(4);for(let t=0;t<4;++t)X[t]=new i.Cartesian4;P._computeNearFarPlanes=function(t,e,n,s,o,f,u,l){const c=a.Matrix3.fromQuaternion(e,q);let h=r.defaultValue(f,G),p=r.defaultValue(u,j),d=r.defaultValue(l,U);h=a.Matrix3.getColumn(c,0,h),p=a.Matrix3.getColumn(c,1,p),d=a.Matrix3.getColumn(c,2,d),a.Cartesian3.normalize(h,h),a.Cartesian3.normalize(p,p),a.Cartesian3.normalize(d,d),a.Cartesian3.negate(h,h);const C=i.Matrix4.computeView(t,d,p,h,L);let m,_;if(0===n){const t=s.projectionMatrix,e=i.Matrix4.multiply(t,C,N);_=i.Matrix4.inverse(e,N)}else m=i.Matrix4.inverseTransformation(C,N);r.defined(_)?(J[0]=s.near,J[1]=s.far):(J[0]=0,J[1]=s.near,J[2]=s.far);for(let e=0;e<2;++e)for(let n=0;n<4;++n){let f=i.Cartesian4.clone(W[n],X[n]);if(r.defined(_)){f=i.Matrix4.multiplyByVector(_,f,f);const n=1/f.w;a.Cartesian3.multiplyByScalar(f,n,f),a.Cartesian3.subtract(f,t,f),a.Cartesian3.normalize(f,f);const r=a.Cartesian3.dot(d,f);a.Cartesian3.multiplyByScalar(f,J[e]/r,f),a.Cartesian3.add(f,t,f)}else{r.defined(s._offCenterFrustum)&&(s=s._offCenterFrustum);const t=J[e],a=J[e+1];f.x=.5*(f.x*(s.right-s.left)+s.left+s.right),f.y=.5*(f.y*(s.top-s.bottom)+s.bottom+s.top),f.z=.5*(f.z*(t-a)-t-a),f.w=1,i.Matrix4.multiplyByVector(m,f,f)}o[12*e+3*n]=f.x,o[12*e+3*n+1]=f.y,o[12*e+3*n+2]=f.z}},P.createGeometry=function(t){const i=t._frustumType,f=t._frustum,u=t._origin,l=t._orientation,c=t._drawNearPlane,h=t._vertexFormat,p=c?6:5;let d=new Float64Array(72);P._computeNearFarPlanes(u,l,i,f,d);let C=24;d[C]=d[12],d[C+1]=d[13],d[C+2]=d[14],d[C+3]=d[0],d[C+4]=d[1],d[C+5]=d[2],d[C+6]=d[9],d[C+7]=d[10],d[C+8]=d[11],d[C+9]=d[21],d[C+10]=d[22],d[C+11]=d[23],C+=12,d[C]=d[15],d[C+1]=d[16],d[C+2]=d[17],d[C+3]=d[3],d[C+4]=d[4],d[C+5]=d[5],d[C+6]=d[0],d[C+7]=d[1],d[C+8]=d[2],d[C+9]=d[12],d[C+10]=d[13],d[C+11]=d[14],C+=12,d[C]=d[3],d[C+1]=d[4],d[C+2]=d[5],d[C+3]=d[15],d[C+4]=d[16],d[C+5]=d[17],d[C+6]=d[18],d[C+7]=d[19],d[C+8]=d[20],d[C+9]=d[6],d[C+10]=d[7],d[C+11]=d[8],C+=12,d[C]=d[6],d[C+1]=d[7],d[C+2]=d[8],d[C+3]=d[18],d[C+4]=d[19],d[C+5]=d[20],d[C+6]=d[21],d[C+7]=d[22],d[C+8]=d[23],d[C+9]=d[9],d[C+10]=d[10],d[C+11]=d[11],c||(d=d.subarray(12));const m=new o.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:d})});if(r.defined(h.normal)||r.defined(h.tangent)||r.defined(h.bitangent)||r.defined(h.st)){const t=r.defined(h.normal)?new Float32Array(12*p):void 0,e=r.defined(h.tangent)?new Float32Array(12*p):void 0,i=r.defined(h.bitangent)?new Float32Array(12*p):void 0,o=r.defined(h.st)?new Float32Array(8*p):void 0,f=G,u=j,l=U,d=a.Cartesian3.negate(f,Q),_=a.Cartesian3.negate(u,K),y=a.Cartesian3.negate(l,Y);C=0,c&&(B(C,t,e,i,o,y,f,u),C+=12),B(C,t,e,i,o,l,d,u),C+=12,B(C,t,e,i,o,d,y,u),C+=12,B(C,t,e,i,o,_,y,d),C+=12,B(C,t,e,i,o,f,l,u),C+=12,B(C,t,e,i,o,u,l,d),r.defined(t)&&(m.normal=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})),r.defined(e)&&(m.tangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})),r.defined(i)&&(m.bitangent=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:i})),r.defined(o)&&(m.st=new s.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:o}))}const _=new Uint16Array(6*p);for(let t=0;t<p;++t){const e=6*t,a=4*t;_[e]=a,_[e+1]=a+1,_[e+2]=a+2,_[e+3]=a,_[e+4]=a+2,_[e+5]=a+3}return new s.Geometry({attributes:m,indices:_,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:e.BoundingSphere.fromVertices(d)})},t.FrustumGeometry=P,t.OrthographicFrustum=v,t.PerspectiveFrustum=O}));
public/CIMSDK/Workers/GeometryAttribute-642addba.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./defaultValue-865ac579","./WebGLConstants-258cf3a0","./Transforms-221c7c82"],(function(t,e,n,a,r,i){"use strict";var o=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});const s={POINTS:r.WebGLConstants.POINTS,LINES:r.WebGLConstants.LINES,LINE_LOOP:r.WebGLConstants.LINE_LOOP,LINE_STRIP:r.WebGLConstants.LINE_STRIP,TRIANGLES:r.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:r.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:r.WebGLConstants.TRIANGLE_FAN,isLines:function(t){return t===s.LINES||t===s.LINE_LOOP||t===s.LINE_STRIP},isTriangles:function(t){return t===s.TRIANGLES||t===s.TRIANGLE_STRIP||t===s.TRIANGLE_FAN},validate:function(t){return t===s.POINTS||t===s.LINES||t===s.LINE_LOOP||t===s.LINE_STRIP||t===s.TRIANGLES||t===s.TRIANGLE_STRIP||t===s.TRIANGLE_FAN}};var u=Object.freeze(s);function I(t){t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=a.defaultValue(t.primitiveType,u.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=a.defaultValue(t.geometryType,o.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}I.computeNumberOfVertices=function(t){let e=-1;for(const n in t.attributes)if(t.attributes.hasOwnProperty(n)&&a.defined(t.attributes[n])&&a.defined(t.attributes[n].values)){const a=t.attributes[n];e=a.values.length/a.componentsPerAttribute}return e};const N=new n.Cartographic,c=new n.Cartesian3,T=new e.Matrix4,l=[new n.Cartographic,new n.Cartographic,new n.Cartographic],L=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],E=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],f=new n.Cartesian3,p=new i.Quaternion,m=new e.Matrix4,y=new e.Matrix2;I._textureCoordinateRotationPoints=function(t,a,r,o){let s;const u=e.Rectangle.center(o,N),I=n.Cartographic.toCartesian(u,r,c),b=i.Transforms.eastNorthUpToFixedFrame(I,r,T),C=e.Matrix4.inverse(b,T),h=L,A=l;A[0].longitude=o.west,A[0].latitude=o.south,A[1].longitude=o.west,A[1].latitude=o.north,A[2].longitude=o.east,A[2].latitude=o.south;let d=f;for(s=0;s<3;s++)n.Cartographic.toCartesian(A[s],r,d),d=e.Matrix4.multiplyByPointAsVector(C,d,d),h[s].x=d.x,h[s].y=d.y;const x=i.Quaternion.fromAxisAngle(n.Cartesian3.UNIT_Z,-a,p),S=n.Matrix3.fromQuaternion(x,m),P=t.length;let G=Number.POSITIVE_INFINITY,R=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY,O=Number.NEGATIVE_INFINITY;for(s=0;s<P;s++)d=e.Matrix4.multiplyByPointAsVector(C,t[s],d),d=n.Matrix3.multiplyByVector(S,d,d),G=Math.min(G,d.x),R=Math.min(R,d.y),_=Math.max(_,d.x),O=Math.max(O,d.y);const g=e.Matrix2.fromRotation(a,y),w=E;w[0].x=G,w[0].y=R,w[1].x=G,w[1].y=O,w[2].x=_,w[2].y=R;const V=h[0],M=h[2].x-V.x,v=h[1].y-V.y;for(s=0;s<3;s++){const t=w[s];e.Matrix2.multiplyByVector(g,t,t),t.x=(t.x-V.x)/M,t.y=(t.y-V.y)/v}const F=w[0],W=w[1],Y=w[2],B=new Array(6);return e.Cartesian2.pack(F,B),e.Cartesian2.pack(W,B,2),e.Cartesian2.pack(Y,B,4),B},t.Geometry=I,t.GeometryAttribute=function(t){t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT),this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=a.defaultValue(t.normalize,!1),this.values=t.values},t.GeometryType=o,t.PrimitiveType=u}));
public/CIMSDK/Workers/GeometryInstance-8d112c0c.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./defaultValue-865ac579","./Matrix2-2fdcdec7"],(function(e,t,i){"use strict";e.GeometryInstance=function(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=i.Matrix4.clone(t.defaultValue(e.modelMatrix,i.Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}}));
public/CIMSDK/Workers/GeometryPipeline-a349886f.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./AttributeCompression-10297289","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./defaultValue-865ac579","./Math-76ce6367","./Transforms-221c7c82","./ComponentDatatype-985dcc38","./EncodedCartesian3-e8922703","./GeometryAttribute-642addba","./IndexDatatype-16f6b4a1","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(e,t,n,i,r,a,s,o,u,c,l,p,d){"use strict";const f=new i.Cartesian3,y=new i.Cartesian3,m=new i.Cartesian3;const C={calculateACMR:function(e){const t=(e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT)).indices;let n=e.maximumIndex;const i=r.defaultValue(e.cacheSize,24),a=t.length;if(!r.defined(n)){n=0;let e=0,i=t[e];for(;e<a;)i>n&&(n=i),++e,i=t[e]}const s=[];for(let e=0;e<n+1;e++)s[e]=0;let o=i+1;for(let e=0;e<a;++e)o-s[t[e]]>i&&(s[t[e]]=o,++o);return(o-i+1)/(a/3)}};C.tipsify=function(e){const t=(e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT)).indices,n=e.maximumIndex,i=r.defaultValue(e.cacheSize,24);let a;function s(e,t,n,i,r,s,o){let u,c=-1,l=-1,p=0;for(;p<n.length;){const e=n[p];i[e].numLiveTriangles&&(u=0,r-i[e].timeStamp+2*i[e].numLiveTriangles<=t&&(u=r-i[e].timeStamp),(u>l||-1===l)&&(l=u,c=e)),++p}return-1===c?function(e,t,n,i){for(;t.length>=1;){const n=t[t.length-1];if(t.splice(t.length-1,1),e[n].numLiveTriangles>0)return n}for(;a<i;){if(e[a].numLiveTriangles>0)return++a,a-1;++a}return-1}(i,s,0,o):c}const o=t.length;let u=0,c=0,l=t[c];const p=o;if(r.defined(n))u=n+1;else{for(;c<p;)l>u&&(u=l),++c,l=t[c];if(-1===u)return 0;++u}const d=[];let f;for(f=0;f<u;f++)d[f]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};c=0;let y=0;for(;c<p;)d[t[c]].vertexTriangles.push(y),++d[t[c]].numLiveTriangles,d[t[c+1]].vertexTriangles.push(y),++d[t[c+1]].numLiveTriangles,d[t[c+2]].vertexTriangles.push(y),++d[t[c+2]].numLiveTriangles,++y,c+=3;let m=0,C=i+1;a=1;let h=[];const v=[];let b,g,A=0;const T=[],x=o/3,P=[];for(f=0;f<x;f++)P[f]=!1;let w,S;for(;-1!==m;){h=[],g=d[m],S=g.vertexTriangles.length;for(let e=0;e<S;++e)if(y=g.vertexTriangles[e],!P[y]){P[y]=!0,c=y+y+y;for(let e=0;e<3;++e)w=t[c],h.push(w),v.push(w),T[A]=w,++A,b=d[w],--b.numLiveTriangles,C-b.timeStamp>i&&(b.timeStamp=C,++C),++c}m=s(0,i,h,d,C,v,u)}return T};var h=C;const v={};function b(e,t,n,i,r){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=r,e[t++]=r,e[t]=n}function g(e){const t={};for(const n in e)if(e.hasOwnProperty(n)&&r.defined(e[n])&&r.defined(e[n].values)){const i=e[n];t[n]=new c.GeometryAttribute({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function A(e,t,n){for(const i in t)if(t.hasOwnProperty(i)&&r.defined(t[i])&&r.defined(t[i].values)){const r=t[i];for(let t=0;t<r.componentsPerAttribute;++t)e[i].values.push(r.values[n*r.componentsPerAttribute+t])}}v.toWireframe=function(e){const t=e.indices;if(r.defined(t)){switch(e.primitiveType){case c.PrimitiveType.TRIANGLES:e.indices=function(e){const t=e.length,n=t/3*6,i=l.IndexDatatype.createTypedArray(t,n);let r=0;for(let n=0;n<t;n+=3,r+=6)b(i,r,e[n],e[n+1],e[n+2]);return i}(t);break;case c.PrimitiveType.TRIANGLE_STRIP:e.indices=function(e){const t=e.length;if(t>=3){const n=6*(t-2),i=l.IndexDatatype.createTypedArray(t,n);b(i,0,e[0],e[1],e[2]);let r=6;for(let n=3;n<t;++n,r+=6)b(i,r,e[n-1],e[n],e[n-2]);return i}return new Uint16Array}(t);break;case c.PrimitiveType.TRIANGLE_FAN:e.indices=function(e){if(e.length>0){const t=e.length-1,n=6*(t-1),i=l.IndexDatatype.createTypedArray(t,n),r=e[0];let a=0;for(let n=1;n<t;++n,a+=6)b(i,a,r,e[n],e[n+1]);return i}return new Uint16Array}(t)}e.primitiveType=c.PrimitiveType.LINES}return e},v.createLineSegmentsForVectors=function(e,t,n){t=r.defaultValue(t,"normal"),n=r.defaultValue(n,1e4);const i=e.attributes.position.values,a=e.attributes[t].values,u=i.length,l=new Float64Array(2*u);let p,d=0;for(let e=0;e<u;e+=3)l[d++]=i[e],l[d++]=i[e+1],l[d++]=i[e+2],l[d++]=i[e]+a[e]*n,l[d++]=i[e+1]+a[e+1]*n,l[d++]=i[e+2]+a[e+2]*n;const f=e.boundingSphere;return r.defined(f)&&(p=new s.BoundingSphere(f.center,f.radius+n)),new c.Geometry({attributes:{position:new c.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})},primitiveType:c.PrimitiveType.LINES,boundingSphere:p})},v.createAttributeLocations=function(e){const t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={};let a,s=0;const o=t.length;for(a=0;a<o;++a){const e=t[a];r.defined(n[e])&&(i[e]=s++)}for(const e in n)n.hasOwnProperty(e)&&!r.defined(i[e])&&(i[e]=s++);return i},v.reorderForPreVertexCache=function(e){const t=c.Geometry.computeNumberOfVertices(e),n=e.indices;if(r.defined(n)){const i=new Int32Array(t);for(let e=0;e<t;e++)i[e]=-1;const a=n,s=a.length,u=l.IndexDatatype.createTypedArray(t,s);let c,p=0,d=0,f=0;for(;p<s;)c=i[a[p]],-1!==c?u[d]=c:(c=a[p],i[c]=f,u[d]=f,++f),++p,++d;e.indices=u;const y=e.attributes;for(const e in y)if(y.hasOwnProperty(e)&&r.defined(y[e])&&r.defined(y[e].values)){const n=y[e],r=n.values;let a=0;const s=n.componentsPerAttribute,u=o.ComponentDatatype.createTypedArray(n.componentDatatype,f*s);for(;a<t;){const e=i[a];if(-1!==e)for(let t=0;t<s;t++)u[s*e+t]=r[s*a+t];++a}n.values=u}}return e},v.reorderForPostVertexCache=function(e,t){const n=e.indices;if(e.primitiveType===c.PrimitiveType.TRIANGLES&&r.defined(n)){const i=n.length;let r=0;for(let e=0;e<i;e++)n[e]>r&&(r=n[e]);e.indices=h.tipsify({indices:n,maximumIndex:r,cacheSize:t})}return e},v.fitToUnsignedShortIndices=function(e){const t=[],n=c.Geometry.computeNumberOfVertices(e);if(r.defined(e.indices)&&n>=a.CesiumMath.SIXTY_FOUR_KILOBYTES){let n=[],i=[],s=0,o=g(e.attributes);const u=e.indices,l=u.length;let p;e.primitiveType===c.PrimitiveType.TRIANGLES?p=3:e.primitiveType===c.PrimitiveType.LINES?p=2:e.primitiveType===c.PrimitiveType.POINTS&&(p=1);for(let d=0;d<l;d+=p){for(let t=0;t<p;++t){const a=u[d+t];let c=n[a];r.defined(c)||(c=s++,n[a]=c,A(o,e.attributes,a)),i.push(c)}s+p>=a.CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(new c.Geometry({attributes:o,indices:i,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),n=[],i=[],s=0,o=g(e.attributes))}0!==i.length&&t.push(new c.Geometry({attributes:o,indices:i,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};const T=new i.Cartesian3,x=new i.Cartographic;v.projectTo2D=function(e,t,n,a,u){const l=e.attributes[t],p=(u=r.defined(u)?u:new s.GeographicProjection).ellipsoid,d=l.values,f=new Float64Array(d.length);let y=0;for(let e=0;e<d.length;e+=3){const t=i.Cartesian3.fromArray(d,e,T),n=p.cartesianToCartographic(t,x),r=u.project(n,T);f[y++]=r.x,f[y++]=r.y,f[y++]=r.z}return e.attributes[n]=l,e.attributes[a]=new c.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f}),delete e.attributes[t],e};const P={high:0,low:0};v.encodeAttribute=function(e,t,n,i){const r=e.attributes[t],a=r.values,s=a.length,l=new Float32Array(s),p=new Float32Array(s);for(let e=0;e<s;++e)u.EncodedCartesian3.encode(a[e],P),l[e]=P.high,p[e]=P.low;const d=r.componentsPerAttribute;return e.attributes[n]=new c.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:d,values:l}),e.attributes[i]=new c.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:d,values:p}),delete e.attributes[t],e};let w=new i.Cartesian3;function S(e,t){if(r.defined(t)){const r=t.values,a=r.length;for(let t=0;t<a;t+=3)i.Cartesian3.unpack(r,t,w),n.Matrix4.multiplyByPoint(e,w,w),i.Cartesian3.pack(w,r,t)}}function I(e,t){if(r.defined(t)){const n=t.values,r=n.length;for(let t=0;t<r;t+=3)i.Cartesian3.unpack(n,t,w),i.Matrix3.multiplyByVector(e,w,w),w=i.Cartesian3.normalize(w,w),i.Cartesian3.pack(w,n,t)}}const O=new n.Matrix4,E=new i.Matrix3;v.transformToWorldCoordinates=function(e){const t=e.modelMatrix;if(n.Matrix4.equals(t,n.Matrix4.IDENTITY))return e;const i=e.geometry.attributes;S(t,i.position),S(t,i.prevPosition),S(t,i.nextPosition),(r.defined(i.normal)||r.defined(i.tangent)||r.defined(i.bitangent))&&(n.Matrix4.inverse(t,O),n.Matrix4.transpose(O,O),n.Matrix4.getMatrix3(O,E),I(E,i.normal),I(E,i.tangent),I(E,i.bitangent));const a=e.geometry.boundingSphere;return r.defined(a)&&(e.geometry.boundingSphere=s.BoundingSphere.transform(a,t,a)),e.modelMatrix=n.Matrix4.clone(n.Matrix4.IDENTITY),e};const N=new i.Cartesian3;function L(e,t){const n=e.length;let a,u,p,d;e[0].modelMatrix;const f=r.defined(e[0][t].indices),y=e[0][t].primitiveType,m=function(e,t){const n=e.length,i={},a=e[0][t].attributes;let s;for(s in a)if(a.hasOwnProperty(s)&&r.defined(a[s])&&r.defined(a[s].values)){const u=a[s];let l=u.values.length,p=!0;for(let i=1;i<n;++i){const n=e[i][t].attributes[s];if(!r.defined(n)||u.componentDatatype!==n.componentDatatype||u.componentsPerAttribute!==n.componentsPerAttribute||u.normalize!==n.normalize){p=!1;break}l+=n.values.length}p&&(i[s]=new c.GeometryAttribute({componentDatatype:u.componentDatatype,componentsPerAttribute:u.componentsPerAttribute,normalize:u.normalize,values:o.ComponentDatatype.createTypedArray(u.componentDatatype,l)}))}return i}(e,t);let C,h,v,b;for(a in m)if(m.hasOwnProperty(a))for(C=m[a].values,d=0,u=0;u<n;++u)for(h=e[u][t].attributes[a].values,v=h.length,p=0;p<v;++p)C[d++]=h[p];if(f){let i=0;for(u=0;u<n;++u)i+=e[u][t].indices.length;const r=c.Geometry.computeNumberOfVertices(new c.Geometry({attributes:m,primitiveType:c.PrimitiveType.POINTS})),a=l.IndexDatatype.createTypedArray(r,i);let s=0,o=0;for(u=0;u<n;++u){const n=e[u][t].indices,i=n.length;for(d=0;d<i;++d)a[s++]=o+n[d];o+=c.Geometry.computeNumberOfVertices(e[u][t])}b=a}let g,A=new i.Cartesian3,T=0;for(u=0;u<n;++u){if(g=e[u][t].boundingSphere,!r.defined(g)){A=void 0;break}i.Cartesian3.add(g.center,A,A)}if(r.defined(A))for(i.Cartesian3.divideByScalar(A,n,A),u=0;u<n;++u){g=e[u][t].boundingSphere;const n=i.Cartesian3.magnitude(i.Cartesian3.subtract(g.center,A,N))+g.radius;n>T&&(T=n)}return new c.Geometry({attributes:m,indices:b,primitiveType:y,boundingSphere:r.defined(A)?new s.BoundingSphere(A,T):void 0})}v.combineInstances=function(e){const t=[],n=[],i=e.length;for(let a=0;a<i;++a){const i=e[a];r.defined(i.geometry)?t.push(i):r.defined(i.westHemisphereGeometry)&&r.defined(i.eastHemisphereGeometry)&&n.push(i)}const a=[];return t.length>0&&a.push(L(t,"geometry")),n.length>0&&(a.push(L(n,"westHemisphereGeometry")),a.push(L(n,"eastHemisphereGeometry"))),a};const M=new i.Cartesian3,z=new i.Cartesian3,D=new i.Cartesian3,G=new i.Cartesian3;v.computeNormal=function(e){const t=e.indices,n=e.attributes,r=n.position.values,s=n.position.values.length/3,u=t.length,l=new Array(s),p=new Array(u/3),d=new Array(u);let f;for(f=0;f<s;f++)l[f]={indexOffset:0,count:0,currentCount:0};let y=0;for(f=0;f<u;f+=3){const e=t[f],n=t[f+1],a=t[f+2],s=3*e,o=3*n,u=3*a;z.x=r[s],z.y=r[s+1],z.z=r[s+2],D.x=r[o],D.y=r[o+1],D.z=r[o+2],G.x=r[u],G.y=r[u+1],G.z=r[u+2],l[e].count++,l[n].count++,l[a].count++,i.Cartesian3.subtract(D,z,D),i.Cartesian3.subtract(G,z,G),p[y]=i.Cartesian3.cross(D,G,new i.Cartesian3),y++}let m,C=0;for(f=0;f<s;f++)l[f].indexOffset+=C,C+=l[f].count;for(y=0,f=0;f<u;f+=3){m=l[t[f]];let e=m.indexOffset+m.currentCount;d[e]=y,m.currentCount++,m=l[t[f+1]],e=m.indexOffset+m.currentCount,d[e]=y,m.currentCount++,m=l[t[f+2]],e=m.indexOffset+m.currentCount,d[e]=y,m.currentCount++,y++}const h=new Float32Array(3*s);for(f=0;f<s;f++){const e=3*f;if(m=l[f],i.Cartesian3.clone(i.Cartesian3.ZERO,M),m.count>0){for(y=0;y<m.count;y++)i.Cartesian3.add(M,p[d[m.indexOffset+y]],M);i.Cartesian3.equalsEpsilon(i.Cartesian3.ZERO,M,a.CesiumMath.EPSILON10)&&i.Cartesian3.clone(p[d[m.indexOffset]],M)}i.Cartesian3.equalsEpsilon(i.Cartesian3.ZERO,M,a.CesiumMath.EPSILON10)&&(M.z=1),i.Cartesian3.normalize(M,M),h[e]=M.x,h[e+1]=M.y,h[e+2]=M.z}return e.attributes.normal=new c.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h}),e};const V=new i.Cartesian3,R=new i.Cartesian3,F=new i.Cartesian3;v.computeTangentAndBitangent=function(e){e.attributes;const t=e.indices,n=e.attributes.position.values,r=e.attributes.normal.values,a=e.attributes.st.values,s=e.attributes.position.values.length/3,u=t.length,l=new Array(3*s);let p,d,f,y;for(p=0;p<l.length;p++)l[p]=0;for(p=0;p<u;p+=3){const e=t[p],i=t[p+1],r=t[p+2];d=3*e,f=3*i,y=3*r;const s=2*e,o=2*i,u=2*r,c=n[d],m=n[d+1],C=n[d+2],h=a[s],v=a[s+1],b=a[o+1]-v,g=a[u+1]-v,A=1/((a[o]-h)*g-(a[u]-h)*b),T=(g*(n[f]-c)-b*(n[y]-c))*A,x=(g*(n[f+1]-m)-b*(n[y+1]-m))*A,P=(g*(n[f+2]-C)-b*(n[y+2]-C))*A;l[d]+=T,l[d+1]+=x,l[d+2]+=P,l[f]+=T,l[f+1]+=x,l[f+2]+=P,l[y]+=T,l[y+1]+=x,l[y+2]+=P}const m=new Float32Array(3*s),C=new Float32Array(3*s);for(p=0;p<s;p++){d=3*p,f=d+1,y=d+2;const e=i.Cartesian3.fromArray(r,d,V),t=i.Cartesian3.fromArray(l,d,F),n=i.Cartesian3.dot(e,t);i.Cartesian3.multiplyByScalar(e,n,R),i.Cartesian3.normalize(i.Cartesian3.subtract(t,R,t),t),m[d]=t.x,m[f]=t.y,m[y]=t.z,i.Cartesian3.normalize(i.Cartesian3.cross(e,t,t),t),C[d]=t.x,C[f]=t.y,C[y]=t.z}return e.attributes.tangent=new c.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:m}),e.attributes.bitangent=new c.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:C}),e};const B=new n.Cartesian2,_=new i.Cartesian3,k=new i.Cartesian3,q=new i.Cartesian3;let U=new n.Cartesian2;function Y(e){switch(e.primitiveType){case c.PrimitiveType.TRIANGLE_FAN:return function(e){const t=c.Geometry.computeNumberOfVertices(e),n=l.IndexDatatype.createTypedArray(t,3*(t-2));n[0]=1,n[1]=0,n[2]=2;let i=3;for(let e=3;e<t;++e)n[i++]=e-1,n[i++]=0,n[i++]=e;return e.indices=n,e.primitiveType=c.PrimitiveType.TRIANGLES,e}(e);case c.PrimitiveType.TRIANGLE_STRIP:return function(e){const t=c.Geometry.computeNumberOfVertices(e),n=l.IndexDatatype.createTypedArray(t,3*(t-2));n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let e=3;e<t-1;e+=2)n[i++]=e,n[i++]=e-1,n[i++]=e+1,e+2<t&&(n[i++]=e,n[i++]=e+1,n[i++]=e+2);return e.indices=n,e.primitiveType=c.PrimitiveType.TRIANGLES,e}(e);case c.PrimitiveType.TRIANGLES:return function(e){if(r.defined(e.indices))return e;const t=c.Geometry.computeNumberOfVertices(e),n=l.IndexDatatype.createTypedArray(t,t);for(let e=0;e<t;++e)n[e]=e;return e.indices=n,e}(e);case c.PrimitiveType.LINE_STRIP:return function(e){const t=c.Geometry.computeNumberOfVertices(e),n=l.IndexDatatype.createTypedArray(t,2*(t-1));n[0]=0,n[1]=1;let i=2;for(let e=2;e<t;++e)n[i++]=e-1,n[i++]=e;return e.indices=n,e.primitiveType=c.PrimitiveType.LINES,e}(e);case c.PrimitiveType.LINE_LOOP:return function(e){const t=c.Geometry.computeNumberOfVertices(e),n=l.IndexDatatype.createTypedArray(t,2*t);n[0]=0,n[1]=1;let i=2;for(let e=2;e<t;++e)n[i++]=e-1,n[i++]=e;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=c.PrimitiveType.LINES,e}(e);case c.PrimitiveType.LINES:return function(e){if(r.defined(e.indices))return e;const t=c.Geometry.computeNumberOfVertices(e),n=l.IndexDatatype.createTypedArray(t,t);for(let e=0;e<t;++e)n[e]=e;return e.indices=n,e}(e)}return e}function Z(e,t){Math.abs(e.y)<a.CesiumMath.EPSILON6&&(e.y=t?-a.CesiumMath.EPSILON6:a.CesiumMath.EPSILON6)}v.compressVertices=function(e){const a=e.attributes.extrudeDirection;let s,u;if(r.defined(a)){const n=a.values;u=n.length/3;const r=new Float32Array(2*u);let l=0;for(s=0;s<u;++s)i.Cartesian3.fromArray(n,3*s,_),i.Cartesian3.equals(_,i.Cartesian3.ZERO)?l+=2:(U=t.AttributeCompression.octEncodeInRange(_,65535,U),r[l++]=U.x,r[l++]=U.y);return e.attributes.compressedAttributes=new c.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:r}),delete e.attributes.extrudeDirection,e}const l=e.attributes.normal,p=e.attributes.st,d=r.defined(l),f=r.defined(p);if(!d&&!f)return e;const y=e.attributes.tangent,m=e.attributes.bitangent,C=r.defined(y),h=r.defined(m);let v,b,g,A;d&&(v=l.values),f&&(b=p.values),C&&(g=y.values),h&&(A=m.values);u=(d?v.length:b.length)/(d?3:2);let T=u,x=f&&d?2:1;x+=C||h?1:0,T*=x;const P=new Float32Array(T);let w=0;for(s=0;s<u;++s){f&&(n.Cartesian2.fromArray(b,2*s,B),P[w++]=t.AttributeCompression.compressTextureCoordinates(B));const e=3*s;d&&r.defined(g)&&r.defined(A)?(i.Cartesian3.fromArray(v,e,_),i.Cartesian3.fromArray(g,e,k),i.Cartesian3.fromArray(A,e,q),t.AttributeCompression.octPack(_,k,q,B),P[w++]=B.x,P[w++]=B.y):(d&&(i.Cartesian3.fromArray(v,e,_),P[w++]=t.AttributeCompression.octEncodeFloat(_)),C&&(i.Cartesian3.fromArray(g,e,_),P[w++]=t.AttributeCompression.octEncodeFloat(_)),h&&(i.Cartesian3.fromArray(A,e,_),P[w++]=t.AttributeCompression.octEncodeFloat(_)))}return e.attributes.compressedAttributes=new c.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:x,values:P}),d&&delete e.attributes.normal,f&&delete e.attributes.st,h&&delete e.attributes.bitangent,C&&delete e.attributes.tangent,e};const H=new i.Cartesian3;function W(e,t,n,r){i.Cartesian3.add(e,i.Cartesian3.multiplyByScalar(i.Cartesian3.subtract(t,e,H),e.y/(e.y-t.y),H),n),i.Cartesian3.clone(n,r),Z(n,!0),Z(r,!1)}const X=new i.Cartesian3,j=new i.Cartesian3,J=new i.Cartesian3,K=new i.Cartesian3,Q={positions:new Array(7),indices:new Array(9)};function $(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;!function(e,t,n){if(0!==e.y&&0!==t.y&&0!==n.y)return Z(e,e.y<0),Z(t,t.y<0),void Z(n,n.y<0);const i=Math.abs(e.y),r=Math.abs(t.y),s=Math.abs(n.y);let o;o=i>r?i>s?a.CesiumMath.sign(e.y):a.CesiumMath.sign(n.y):r>s?a.CesiumMath.sign(t.y):a.CesiumMath.sign(n.y);const u=o<0;Z(e,u),Z(t,u),Z(n,u)}(e,t,n);const i=e.y<0,r=t.y<0,s=n.y<0;let o=0;o+=i?1:0,o+=r?1:0,o+=s?1:0;const u=Q.indices;1===o?(u[1]=3,u[2]=4,u[5]=6,u[7]=6,u[8]=5,i?(W(e,t,X,J),W(e,n,j,K),u[0]=0,u[3]=1,u[4]=2,u[6]=1):r?(W(t,n,X,J),W(t,e,j,K),u[0]=1,u[3]=2,u[4]=0,u[6]=2):s&&(W(n,e,X,J),W(n,t,j,K),u[0]=2,u[3]=0,u[4]=1,u[6]=0)):2===o&&(u[2]=4,u[4]=4,u[5]=3,u[7]=5,u[8]=6,i?r?s||(W(n,e,X,J),W(n,t,j,K),u[0]=0,u[1]=1,u[3]=0,u[6]=2):(W(t,n,X,J),W(t,e,j,K),u[0]=2,u[1]=0,u[3]=2,u[6]=1):(W(e,t,X,J),W(e,n,j,K),u[0]=1,u[1]=2,u[3]=1,u[6]=0));const c=Q.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,1!==o&&2!==o||(c[3]=X,c[4]=j,c[5]=J,c[6]=K,c.length=7),Q}function ee(e,t){const n=e.attributes;if(0===n.position.values.length)return;for(const e in n)if(n.hasOwnProperty(e)&&r.defined(n[e])&&r.defined(n[e].values)){const t=n[e];t.values=o.ComponentDatatype.createTypedArray(t.componentDatatype,t.values)}const i=c.Geometry.computeNumberOfVertices(e);return e.indices=l.IndexDatatype.createTypedArray(i,e.indices),t&&(e.boundingSphere=s.BoundingSphere.fromVertices(n.position.values)),e}function te(e){const t=e.attributes,n={};for(const e in t)if(t.hasOwnProperty(e)&&r.defined(t[e])&&r.defined(t[e].values)){const i=t[e];n[e]=new c.GeometryAttribute({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return new c.Geometry({attributes:n,indices:[],primitiveType:e.primitiveType})}function ne(e,t,n){const i=r.defined(e.geometry.boundingSphere);t=ee(t,i),n=ee(n,i),r.defined(n)&&!r.defined(t)?e.geometry=n:!r.defined(n)&&r.defined(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function ie(e,t){const n=new e,i=new e,r=new e;return function(a,s,o,u,c,l,p,d){const f=e.fromArray(c,a*t,n),y=e.fromArray(c,s*t,i),m=e.fromArray(c,o*t,r);e.multiplyByScalar(f,u.x,f),e.multiplyByScalar(y,u.y,y),e.multiplyByScalar(m,u.z,m);const C=e.add(f,y,f);e.add(C,m,C),d&&e.normalize(C,C),e.pack(C,l,p*t)}}const re=ie(n.Cartesian4,4),ae=ie(i.Cartesian3,3),se=ie(n.Cartesian2,2),oe=new i.Cartesian3,ue=new i.Cartesian3,ce=new i.Cartesian3,le=new i.Cartesian3;function pe(e,t,s,o,u,c,l,p,d,C,h,v,b,g,A,T){if(!(r.defined(c)||r.defined(l)||r.defined(p)||r.defined(d)||r.defined(C)||0!==g))return;const x=function(e,t,s,o,u){let c,l,p,d,C,h,v,b;if(r.defined(u)||(u=new i.Cartesian3),r.defined(t.z)){if(i.Cartesian3.equalsEpsilon(e,t,a.CesiumMath.EPSILON14))return i.Cartesian3.clone(i.Cartesian3.UNIT_X,u);if(i.Cartesian3.equalsEpsilon(e,s,a.CesiumMath.EPSILON14))return i.Cartesian3.clone(i.Cartesian3.UNIT_Y,u);if(i.Cartesian3.equalsEpsilon(e,o,a.CesiumMath.EPSILON14))return i.Cartesian3.clone(i.Cartesian3.UNIT_Z,u);c=i.Cartesian3.subtract(s,t,f),l=i.Cartesian3.subtract(o,t,y),p=i.Cartesian3.subtract(e,t,m),d=i.Cartesian3.dot(c,c),C=i.Cartesian3.dot(c,l),h=i.Cartesian3.dot(c,p),v=i.Cartesian3.dot(l,l),b=i.Cartesian3.dot(l,p)}else{if(n.Cartesian2.equalsEpsilon(e,t,a.CesiumMath.EPSILON14))return i.Cartesian3.clone(i.Cartesian3.UNIT_X,u);if(n.Cartesian2.equalsEpsilon(e,s,a.CesiumMath.EPSILON14))return i.Cartesian3.clone(i.Cartesian3.UNIT_Y,u);if(n.Cartesian2.equalsEpsilon(e,o,a.CesiumMath.EPSILON14))return i.Cartesian3.clone(i.Cartesian3.UNIT_Z,u);c=n.Cartesian2.subtract(s,t,f),l=n.Cartesian2.subtract(o,t,y),p=n.Cartesian2.subtract(e,t,m),d=n.Cartesian2.dot(c,c),C=n.Cartesian2.dot(c,l),h=n.Cartesian2.dot(c,p),v=n.Cartesian2.dot(l,l),b=n.Cartesian2.dot(l,p)}u.y=v*h-C*b,u.z=d*b-C*h;const g=d*v-C*C;if(0!==g)return u.y/=g,u.z/=g,u.x=1-u.y-u.z,u}(o,i.Cartesian3.fromArray(u,3*e,oe),i.Cartesian3.fromArray(u,3*t,ue),i.Cartesian3.fromArray(u,3*s,ce),le);if(r.defined(x)){if(r.defined(c)&&ae(e,t,s,x,c,v.normal.values,T,!0),r.defined(C)){const n=i.Cartesian3.fromArray(C,3*e,oe),r=i.Cartesian3.fromArray(C,3*t,ue),a=i.Cartesian3.fromArray(C,3*s,ce);let o;i.Cartesian3.multiplyByScalar(n,x.x,n),i.Cartesian3.multiplyByScalar(r,x.y,r),i.Cartesian3.multiplyByScalar(a,x.z,a),i.Cartesian3.equals(n,i.Cartesian3.ZERO)&&i.Cartesian3.equals(r,i.Cartesian3.ZERO)&&i.Cartesian3.equals(a,i.Cartesian3.ZERO)?(o=oe,o.x=0,o.y=0,o.z=0):(o=i.Cartesian3.add(n,r,n),i.Cartesian3.add(o,a,o),i.Cartesian3.normalize(o,o)),i.Cartesian3.pack(o,v.extrudeDirection.values,3*T)}if(r.defined(h)&&function(e,t,n,i,r,s,o){const u=r[e]*i.x,c=r[t]*i.y,l=r[n]*i.z;s[o]=u+c+l>a.CesiumMath.EPSILON6?1:0}(e,t,s,x,h,v.applyOffset.values,T),r.defined(l)&&ae(e,t,s,x,l,v.tangent.values,T,!0),r.defined(p)&&ae(e,t,s,x,p,v.bitangent.values,T,!0),r.defined(d)&&se(e,t,s,x,d,v.st.values,T),g>0)for(let n=0;n<g;n++){const i=b[n];de(e,t,s,x,T,A[i],v[i])}}}function de(e,t,n,i,r,a,s){const o=a.componentsPerAttribute,u=a.values,c=s.values;switch(o){case 4:re(e,t,n,i,u,c,r,!1);break;case 3:ae(e,t,n,i,u,c,r,!1);break;case 2:se(e,t,n,i,u,c,r,!1);break;default:c[r]=u[e]*i.x+u[t]*i.y+u[n]*i.z}}function fe(e,t,n,i,r,a){const s=e.position.values.length/3;if(-1!==r){const o=i[r],u=n[o];return-1===u?(n[o]=s,e.position.values.push(a.x,a.y,a.z),t.push(s),s):(t.push(u),u)}return e.position.values.push(a.x,a.y,a.z),t.push(s),s}const ye={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function me(e){const t=e.geometry,n=t.attributes,a=n.position.values,s=r.defined(n.normal)?n.normal.values:void 0,o=r.defined(n.bitangent)?n.bitangent.values:void 0,u=r.defined(n.tangent)?n.tangent.values:void 0,c=r.defined(n.st)?n.st.values:void 0,l=r.defined(n.extrudeDirection)?n.extrudeDirection.values:void 0,p=r.defined(n.applyOffset)?n.applyOffset.values:void 0,d=t.indices,f=[];for(const e in n)n.hasOwnProperty(e)&&!ye[e]&&r.defined(n[e])&&f.push(e);const y=f.length,m=te(t),C=te(t);let h,v,b,g,A;const T=[];T.length=a.length/3;const x=[];for(x.length=a.length/3,A=0;A<T.length;++A)T[A]=-1,x[A]=-1;const P=d.length;for(A=0;A<P;A+=3){const e=d[A],t=d[A+1],P=d[A+2];let w=i.Cartesian3.fromArray(a,3*e),S=i.Cartesian3.fromArray(a,3*t),I=i.Cartesian3.fromArray(a,3*P);const O=$(w,S,I);if(r.defined(O)&&O.positions.length>3){const i=O.positions,r=O.indices,w=r.length;for(let S=0;S<w;++S){const w=r[S],I=i[w];I.y<0?(h=C.attributes,v=C.indices,b=T):(h=m.attributes,v=m.indices,b=x),g=fe(h,v,b,d,w<3?A+w:-1,I),pe(e,t,P,I,a,s,u,o,c,l,p,h,f,y,n,g)}}else r.defined(O)&&(w=O.positions[0],S=O.positions[1],I=O.positions[2]),w.y<0?(h=C.attributes,v=C.indices,b=T):(h=m.attributes,v=m.indices,b=x),g=fe(h,v,b,d,A,w),pe(e,t,P,w,a,s,u,o,c,l,p,h,f,y,n,g),g=fe(h,v,b,d,A+1,S),pe(e,t,P,S,a,s,u,o,c,l,p,h,f,y,n,g),g=fe(h,v,b,d,A+2,I),pe(e,t,P,I,a,s,u,o,c,l,p,h,f,y,n,g)}ne(e,C,m)}const Ce=d.Plane.fromPointNormal(i.Cartesian3.ZERO,i.Cartesian3.UNIT_Y),he=new i.Cartesian3,ve=new i.Cartesian3;function be(e,t,n,s,o,u,c){if(!r.defined(c))return;const l=i.Cartesian3.fromArray(s,3*e,oe);i.Cartesian3.equalsEpsilon(l,n,a.CesiumMath.EPSILON10)?u.applyOffset.values[o]=c[e]:u.applyOffset.values[o]=c[t]}function ge(e){const t=e.geometry,n=t.attributes,s=n.position.values,o=r.defined(n.applyOffset)?n.applyOffset.values:void 0,u=t.indices,c=te(t),l=te(t);let d;const f=u.length,y=[];y.length=s.length/3;const m=[];for(m.length=s.length/3,d=0;d<y.length;++d)y[d]=-1,m[d]=-1;for(d=0;d<f;d+=2){const e=u[d],t=u[d+1],n=i.Cartesian3.fromArray(s,3*e,oe),f=i.Cartesian3.fromArray(s,3*t,ue);let C;Math.abs(n.y)<a.CesiumMath.EPSILON6&&(n.y<0?n.y=-a.CesiumMath.EPSILON6:n.y=a.CesiumMath.EPSILON6),Math.abs(f.y)<a.CesiumMath.EPSILON6&&(f.y<0?f.y=-a.CesiumMath.EPSILON6:f.y=a.CesiumMath.EPSILON6);let h=c.attributes,v=c.indices,b=m,g=l.attributes,A=l.indices,T=y;const x=p.IntersectionTests.lineSegmentPlane(n,f,Ce,ce);if(r.defined(x)){const r=i.Cartesian3.multiplyByScalar(i.Cartesian3.UNIT_Y,5*a.CesiumMath.EPSILON9,he);n.y<0&&(i.Cartesian3.negate(r,r),h=l.attributes,v=l.indices,b=y,g=c.attributes,A=c.indices,T=m);const p=i.Cartesian3.add(x,r,ve);C=fe(h,v,b,u,d,n),be(e,t,n,s,C,h,o),C=fe(h,v,b,u,-1,p),be(e,t,p,s,C,h,o),i.Cartesian3.negate(r,r),i.Cartesian3.add(x,r,p),C=fe(g,A,T,u,-1,p),be(e,t,p,s,C,g,o),C=fe(g,A,T,u,d+1,f),be(e,t,f,s,C,g,o)}else{let i,r,a;n.y<0?(i=l.attributes,r=l.indices,a=y):(i=c.attributes,r=c.indices,a=m),C=fe(i,r,a,u,d,n),be(e,t,n,s,C,i,o),C=fe(i,r,a,u,d+1,f),be(e,t,f,s,C,i,o)}}ne(e,l,c)}const Ae=new n.Cartesian2,Te=new n.Cartesian2,xe=new i.Cartesian3,Pe=new i.Cartesian3,we=new i.Cartesian3,Se=new i.Cartesian3,Ie=new i.Cartesian3,Oe=new i.Cartesian3,Ee=new n.Cartesian4;function Ne(e){const t=e.attributes,n=t.position.values,r=t.prevPosition.values,a=t.nextPosition.values,s=n.length;for(let e=0;e<s;e+=3){const t=i.Cartesian3.unpack(n,e,xe);if(t.x>0)continue;const o=i.Cartesian3.unpack(r,e,Pe);(t.y<0&&o.y>0||t.y>0&&o.y<0)&&(e-3>0?(r[e]=n[e-3],r[e+1]=n[e-2],r[e+2]=n[e-1]):i.Cartesian3.pack(t,r,e));const u=i.Cartesian3.unpack(a,e,we);(t.y<0&&u.y>0||t.y>0&&u.y<0)&&(e+3<s?(a[e]=n[e+3],a[e+1]=n[e+4],a[e+2]=n[e+5]):i.Cartesian3.pack(t,a,e))}}const Le=5*a.CesiumMath.EPSILON9,Me=a.CesiumMath.EPSILON6;v.splitLongitude=function(e){const t=e.geometry,o=t.boundingSphere;if(r.defined(o)){if(o.center.x-o.radius>0||s.BoundingSphere.intersectPlane(o,d.Plane.ORIGIN_ZX_PLANE)!==s.Intersect.INTERSECTING)return e}if(t.geometryType!==c.GeometryType.NONE)switch(t.geometryType){case c.GeometryType.POLYLINES:!function(e){const t=e.geometry,s=t.attributes,o=s.position.values,u=s.prevPosition.values,c=s.nextPosition.values,l=s.expandAndWidth.values,d=r.defined(s.st)?s.st.values:void 0,f=r.defined(s.color)?s.color.values:void 0,y=te(t),m=te(t);let C,h,v,b=!1;const g=o.length/3;for(C=0;C<g;C+=4){const e=C,t=C+2,s=i.Cartesian3.fromArray(o,3*e,xe),g=i.Cartesian3.fromArray(o,3*t,Pe);if(Math.abs(s.y)<Me)for(s.y=Me*(g.y<0?-1:1),o[3*C+1]=s.y,o[3*(C+1)+1]=s.y,h=3*e;h<3*e+12;h+=3)u[h]=o[3*C],u[h+1]=o[3*C+1],u[h+2]=o[3*C+2];if(Math.abs(g.y)<Me)for(g.y=Me*(s.y<0?-1:1),o[3*(C+2)+1]=g.y,o[3*(C+3)+1]=g.y,h=3*e;h<3*e+12;h+=3)c[h]=o[3*(C+2)],c[h+1]=o[3*(C+2)+1],c[h+2]=o[3*(C+2)+2];let A=y.attributes,T=y.indices,x=m.attributes,P=m.indices;const w=p.IntersectionTests.lineSegmentPlane(s,g,Ce,Se);if(r.defined(w)){b=!0;const o=i.Cartesian3.multiplyByScalar(i.Cartesian3.UNIT_Y,Le,Ie);s.y<0&&(i.Cartesian3.negate(o,o),A=m.attributes,T=m.indices,x=y.attributes,P=y.indices);const p=i.Cartesian3.add(w,o,Oe);A.position.values.push(s.x,s.y,s.z,s.x,s.y,s.z),A.position.values.push(p.x,p.y,p.z),A.position.values.push(p.x,p.y,p.z),A.prevPosition.values.push(u[3*e],u[3*e+1],u[3*e+2]),A.prevPosition.values.push(u[3*e+3],u[3*e+4],u[3*e+5]),A.prevPosition.values.push(s.x,s.y,s.z,s.x,s.y,s.z),A.nextPosition.values.push(p.x,p.y,p.z),A.nextPosition.values.push(p.x,p.y,p.z),A.nextPosition.values.push(p.x,p.y,p.z),A.nextPosition.values.push(p.x,p.y,p.z),i.Cartesian3.negate(o,o),i.Cartesian3.add(w,o,p),x.position.values.push(p.x,p.y,p.z),x.position.values.push(p.x,p.y,p.z),x.position.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.prevPosition.values.push(p.x,p.y,p.z),x.prevPosition.values.push(p.x,p.y,p.z),x.prevPosition.values.push(p.x,p.y,p.z),x.prevPosition.values.push(p.x,p.y,p.z),x.nextPosition.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.nextPosition.values.push(c[3*t],c[3*t+1],c[3*t+2]),x.nextPosition.values.push(c[3*t+3],c[3*t+4],c[3*t+5]);const S=n.Cartesian2.fromArray(l,2*e,Ae),I=Math.abs(S.y);A.expandAndWidth.values.push(-1,I,1,I),A.expandAndWidth.values.push(-1,-I,1,-I),x.expandAndWidth.values.push(-1,I,1,I),x.expandAndWidth.values.push(-1,-I,1,-I);let O=i.Cartesian3.magnitudeSquared(i.Cartesian3.subtract(w,s,we));if(O/=i.Cartesian3.magnitudeSquared(i.Cartesian3.subtract(g,s,we)),r.defined(f)){const i=n.Cartesian4.fromArray(f,4*e,Ee),r=n.Cartesian4.fromArray(f,4*t,Ee),s=a.CesiumMath.lerp(i.x,r.x,O),o=a.CesiumMath.lerp(i.y,r.y,O),u=a.CesiumMath.lerp(i.z,r.z,O),c=a.CesiumMath.lerp(i.w,r.w,O);for(h=4*e;h<4*e+8;++h)A.color.values.push(f[h]);for(A.color.values.push(s,o,u,c),A.color.values.push(s,o,u,c),x.color.values.push(s,o,u,c),x.color.values.push(s,o,u,c),h=4*t;h<4*t+8;++h)x.color.values.push(f[h])}if(r.defined(d)){const i=n.Cartesian2.fromArray(d,2*e,Ae),r=n.Cartesian2.fromArray(d,2*(C+3),Te),s=a.CesiumMath.lerp(i.x,r.x,O);for(h=2*e;h<2*e+4;++h)A.st.values.push(d[h]);for(A.st.values.push(s,i.y),A.st.values.push(s,r.y),x.st.values.push(s,i.y),x.st.values.push(s,r.y),h=2*t;h<2*t+4;++h)x.st.values.push(d[h])}v=A.position.values.length/3-4,T.push(v,v+2,v+1),T.push(v+1,v+2,v+3),v=x.position.values.length/3-4,P.push(v,v+2,v+1),P.push(v+1,v+2,v+3)}else{let e,t;for(s.y<0?(e=m.attributes,t=m.indices):(e=y.attributes,t=y.indices),e.position.values.push(s.x,s.y,s.z),e.position.values.push(s.x,s.y,s.z),e.position.values.push(g.x,g.y,g.z),e.position.values.push(g.x,g.y,g.z),h=3*C;h<3*C+12;++h)e.prevPosition.values.push(u[h]),e.nextPosition.values.push(c[h]);for(h=2*C;h<2*C+8;++h)e.expandAndWidth.values.push(l[h]),r.defined(d)&&e.st.values.push(d[h]);if(r.defined(f))for(h=4*C;h<4*C+16;++h)e.color.values.push(f[h]);v=e.position.values.length/3-4,t.push(v,v+2,v+1),t.push(v+1,v+2,v+3)}}b&&(Ne(m),Ne(y)),ne(e,m,y)}(e);break;case c.GeometryType.TRIANGLES:me(e);break;case c.GeometryType.LINES:ge(e)}else Y(t),t.primitiveType===c.PrimitiveType.TRIANGLES?me(e):t.primitiveType===c.PrimitiveType.LINES&&ge(e);return e};var ze=v;e.GeometryPipeline=ze}));
public/CIMSDK/Workers/IntersectionTests-7b064f18.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./defaultValue-865ac579","./Transforms-221c7c82","./Math-76ce6367"],(function(t,n,e,a,i){"use strict";const r={};function s(t,n,e){const a=t+n;return i.CesiumMath.sign(t)!==i.CesiumMath.sign(n)&&Math.abs(a/Math.max(Math.abs(t),Math.abs(n)))<e?0:a}r.computeDiscriminant=function(t,n,e){return n*n-4*t*e},r.computeRealRoots=function(t,n,e){let a;if(0===t)return 0===n?[]:[-e/n];if(0===n){if(0===e)return[0,0];const n=Math.abs(e),r=Math.abs(t);if(n<r&&n/r<i.CesiumMath.EPSILON14)return[0,0];if(n>r&&r/n<i.CesiumMath.EPSILON14)return[];if(a=-e/t,a<0)return[];const s=Math.sqrt(a);return[-s,s]}if(0===e)return a=-n/t,a<0?[a,0]:[0,a];const r=s(n*n,-(4*t*e),i.CesiumMath.EPSILON14);if(r<0)return[];const o=-.5*s(n,i.CesiumMath.sign(n)*Math.sqrt(r),i.CesiumMath.EPSILON14);return n>0?[o/t,e/o]:[e/o,o/t]};var o=r;const c={};function u(t,n,e,a){const i=t,r=n/3,s=e/3,o=a,c=i*s,u=r*o,l=r*r,C=s*s,M=i*s-l,h=i*o-r*s,m=r*o-C,f=4*M*m-h*h;let d,g;if(f<0){let t,n,e;l*u>=c*C?(t=i,n=M,e=-2*r*M+i*h):(t=o,n=m,e=-o*h+2*s*m);const a=-(e<0?-1:1)*Math.abs(t)*Math.sqrt(-f);g=-e+a;const p=g/2,w=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),R=g===a?-w:-n/w;return d=n<=0?w+R:-e/(w*w+R*R+n),l*u>=c*C?[(d-r)/i]:[-o/(d+s)]}const p=M,w=-2*r*M+i*h,R=m,S=-o*h+2*s*m,O=Math.sqrt(f),x=Math.sqrt(3)/2;let y=Math.abs(Math.atan2(i*O,-w)/3);d=2*Math.sqrt(-p);let P=Math.cos(y);g=d*P;let N=d*(-P/2-x*Math.sin(y));const b=g+N>2*r?g-r:N-r,q=i,L=b/q;y=Math.abs(Math.atan2(o*O,-S)/3),d=2*Math.sqrt(-R),P=Math.cos(y),g=d*P,N=d*(-P/2-x*Math.sin(y));const I=-o,E=g+N<2*s?g+s:N+s,v=I/E,z=-b*E-q*I,T=(s*z-r*(b*I))/(-r*z+s*(q*E));return L<=T?L<=v?T<=v?[L,T,v]:[L,v,T]:[v,L,T]:L<=v?[T,L,v]:T<=v?[T,v,L]:[v,T,L]}c.computeDiscriminant=function(t,n,e,a){const i=n*n,r=e*e;return 18*t*n*e*a+i*r-27*(t*t)*(a*a)-4*(t*r*e+i*n*a)},c.computeRealRoots=function(t,n,e,a){let i,r;if(0===t)return o.computeRealRoots(n,e,a);if(0===n){if(0===e){if(0===a)return[0,0,0];r=-a/t;const n=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[n,n,n]}return 0===a?(i=o.computeRealRoots(t,0,e),0===i.Length?[0]:[i[0],0,i[1]]):u(t,0,e,a)}return 0===e?0===a?(r=-n/t,r<0?[r,0,0]:[0,0,r]):u(t,n,0,a):0===a?(i=o.computeRealRoots(t,n,e),0===i.length?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]):u(t,n,e,a)};var l=c;const C={};function M(t,n,e,a){const r=t*t,s=n-3*r/8,c=e-n*t/2+r*t/8,u=a-e*t/4+n*r/16-3*r*r/256,C=l.computeRealRoots(1,2*s,s*s-4*u,-c*c);if(C.length>0){const n=-t/4,e=C[C.length-1];if(Math.abs(e)<i.CesiumMath.EPSILON14){const t=o.computeRealRoots(1,s,u);if(2===t.length){const e=t[0],a=t[1];let i;if(e>=0&&a>=0){const t=Math.sqrt(e),i=Math.sqrt(a);return[n-i,n-t,n+t,n+i]}if(e>=0&&a<0)return i=Math.sqrt(e),[n-i,n+i];if(e<0&&a>=0)return i=Math.sqrt(a),[n-i,n+i]}return[]}if(e>0){const t=Math.sqrt(e),a=(s+e-c/t)/2,i=(s+e+c/t)/2,r=o.computeRealRoots(1,t,a),u=o.computeRealRoots(1,-t,i);return 0!==r.length?(r[0]+=n,r[1]+=n,0!==u.length?(u[0]+=n,u[1]+=n,r[1]<=u[0]?[r[0],r[1],u[0],u[1]]:u[1]<=r[0]?[u[0],u[1],r[0],r[1]]:r[0]>=u[0]&&r[1]<=u[1]?[u[0],r[0],r[1],u[1]]:u[0]>=r[0]&&u[1]<=r[1]?[r[0],u[0],u[1],r[1]]:r[0]>u[0]&&r[0]<u[1]?[u[0],r[0],u[1],r[1]]:[r[0],u[0],r[1],u[1]]):r):0!==u.length?(u[0]+=n,u[1]+=n,u):[]}}return[]}function h(t,n,e,a){const r=t*t,s=-2*n,c=e*t+n*n-4*a,u=r*a-e*n*t+e*e,C=l.computeRealRoots(1,s,c,u);if(C.length>0){const s=C[0],c=n-s,u=c*c,l=t/2,M=c/2,h=u-4*a,m=u+4*Math.abs(a),f=r-4*s,d=r+4*Math.abs(s);let g,p,w,R,S,O;if(s<0||h*d<f*m){const n=Math.sqrt(f);g=n/2,p=0===n?0:(t*M-e)/n}else{const n=Math.sqrt(h);g=0===n?0:(t*M-e)/n,p=n/2}0===l&&0===g?(w=0,R=0):i.CesiumMath.sign(l)===i.CesiumMath.sign(g)?(w=l+g,R=s/w):(R=l-g,w=s/R),0===M&&0===p?(S=0,O=0):i.CesiumMath.sign(M)===i.CesiumMath.sign(p)?(S=M+p,O=a/S):(O=M-p,S=a/O);const x=o.computeRealRoots(1,w,S),y=o.computeRealRoots(1,R,O);if(0!==x.length)return 0!==y.length?x[1]<=y[0]?[x[0],x[1],y[0],y[1]]:y[1]<=x[0]?[y[0],y[1],x[0],x[1]]:x[0]>=y[0]&&x[1]<=y[1]?[y[0],x[0],x[1],y[1]]:y[0]>=x[0]&&y[1]<=x[1]?[x[0],y[0],y[1],x[1]]:x[0]>y[0]&&x[0]<y[1]?[y[0],x[0],y[1],x[1]]:[x[0],y[0],x[1],y[1]]:x;if(0!==y.length)return y}return[]}C.computeDiscriminant=function(t,n,e,a,i){const r=t*t,s=n*n,o=s*n,c=e*e,u=c*e,l=a*a,C=l*a,M=i*i;return s*c*l-4*o*C-4*t*u*l+18*t*n*e*C-27*r*l*l+256*(r*t)*(M*i)+i*(18*o*e*a-4*s*u+16*t*c*c-80*t*n*c*a-6*t*s*l+144*r*e*l)+M*(144*t*s*e-27*s*s-128*r*c-192*r*n*a)},C.computeRealRoots=function(t,n,e,a,r){if(Math.abs(t)<i.CesiumMath.EPSILON15)return l.computeRealRoots(n,e,a,r);const s=n/t,o=e/t,c=a/t,u=r/t;let C=s<0?1:0;switch(C+=o<0?C+1:C,C+=c<0?C+1:C,C+=u<0?C+1:C,C){case 0:case 3:case 4:case 6:case 7:case 9:case 10:case 12:case 13:case 14:case 15:return M(s,o,c,u);case 1:case 2:case 5:case 8:case 11:return h(s,o,c,u);default:return}};var m=C;function f(t,a){a=n.Cartesian3.clone(e.defaultValue(a,n.Cartesian3.ZERO)),n.Cartesian3.equals(a,n.Cartesian3.ZERO)||n.Cartesian3.normalize(a,a),this.origin=n.Cartesian3.clone(e.defaultValue(t,n.Cartesian3.ZERO)),this.direction=a}f.clone=function(t,a){if(e.defined(t))return e.defined(a)?(a.origin=n.Cartesian3.clone(t.origin),a.direction=n.Cartesian3.clone(t.direction),a):new f(t.origin,t.direction)},f.getPoint=function(t,a,i){return e.defined(i)||(i=new n.Cartesian3),i=n.Cartesian3.multiplyByScalar(t.direction,a,i),n.Cartesian3.add(t.origin,i,i)};const d={rayPlane:function(t,a,r){e.defined(r)||(r=new n.Cartesian3);const s=t.origin,o=t.direction,c=a.normal,u=n.Cartesian3.dot(c,o);if(Math.abs(u)<i.CesiumMath.EPSILON15)return;const l=(-a.distance-n.Cartesian3.dot(c,s))/u;return l<0?void 0:(r=n.Cartesian3.multiplyByScalar(o,l,r),n.Cartesian3.add(s,r,r))}},g=new n.Cartesian3,p=new n.Cartesian3,w=new n.Cartesian3,R=new n.Cartesian3,S=new n.Cartesian3;d.rayTriangleParametric=function(t,a,r,s,o){o=e.defaultValue(o,!1);const c=t.origin,u=t.direction,l=n.Cartesian3.subtract(r,a,g),C=n.Cartesian3.subtract(s,a,p),M=n.Cartesian3.cross(u,C,w),h=n.Cartesian3.dot(l,M);let m,f,d,O,x;if(o){if(h<i.CesiumMath.EPSILON6)return;if(m=n.Cartesian3.subtract(c,a,R),d=n.Cartesian3.dot(m,M),d<0||d>h)return;if(f=n.Cartesian3.cross(m,l,S),O=n.Cartesian3.dot(u,f),O<0||d+O>h)return;x=n.Cartesian3.dot(C,f)/h}else{if(Math.abs(h)<i.CesiumMath.EPSILON6)return;const t=1/h;if(m=n.Cartesian3.subtract(c,a,R),d=n.Cartesian3.dot(m,M)*t,d<0||d>1)return;if(f=n.Cartesian3.cross(m,l,S),O=n.Cartesian3.dot(u,f)*t,O<0||d+O>1)return;x=n.Cartesian3.dot(C,f)*t}return x},d.rayTriangle=function(t,a,i,r,s,o){const c=d.rayTriangleParametric(t,a,i,r,s);if(e.defined(c)&&!(c<0))return e.defined(o)||(o=new n.Cartesian3),n.Cartesian3.multiplyByScalar(t.direction,c,o),n.Cartesian3.add(t.origin,o,o)};const O=new f;d.lineSegmentTriangle=function(t,a,i,r,s,o,c){const u=O;n.Cartesian3.clone(t,u.origin),n.Cartesian3.subtract(a,t,u.direction),n.Cartesian3.normalize(u.direction,u.direction);const l=d.rayTriangleParametric(u,i,r,s,o);if(!(!e.defined(l)||l<0||l>n.Cartesian3.distance(t,a)))return e.defined(c)||(c=new n.Cartesian3),n.Cartesian3.multiplyByScalar(u.direction,l,c),n.Cartesian3.add(u.origin,c,c)};const x={root0:0,root1:0};function y(t,i,r){e.defined(r)||(r=new a.Interval);const s=t.origin,o=t.direction,c=i.center,u=i.radius*i.radius,l=n.Cartesian3.subtract(s,c,w),C=function(t,n,e,a){const i=n*n-4*t*e;if(i<0)return;if(i>0){const e=1/(2*t),r=Math.sqrt(i),s=(-n+r)*e,o=(-n-r)*e;return s<o?(a.root0=s,a.root1=o):(a.root0=o,a.root1=s),a}const r=-n/(2*t);return 0!==r?(a.root0=a.root1=r,a):void 0}(n.Cartesian3.dot(o,o),2*n.Cartesian3.dot(o,l),n.Cartesian3.magnitudeSquared(l)-u,x);if(e.defined(C))return r.start=C.root0,r.stop=C.root1,r}d.raySphere=function(t,n,a){if(a=y(t,n,a),e.defined(a)&&!(a.stop<0))return a.start=Math.max(a.start,0),a};const P=new f;d.lineSegmentSphere=function(t,a,i,r){const s=P;n.Cartesian3.clone(t,s.origin);const o=n.Cartesian3.subtract(a,t,s.direction),c=n.Cartesian3.magnitude(o);if(n.Cartesian3.normalize(o,o),r=y(s,i,r),!(!e.defined(r)||r.stop<0||r.start>c))return r.start=Math.max(r.start,0),r.stop=Math.min(r.stop,c),r};const N=new n.Cartesian3,b=new n.Cartesian3;function q(t,n,e){const a=t+n;return i.CesiumMath.sign(t)!==i.CesiumMath.sign(n)&&Math.abs(a/Math.max(Math.abs(t),Math.abs(n)))<e?0:a}d.rayEllipsoid=function(t,e){const i=e.oneOverRadii,r=n.Cartesian3.multiplyComponents(i,t.origin,N),s=n.Cartesian3.multiplyComponents(i,t.direction,b),o=n.Cartesian3.magnitudeSquared(r),c=n.Cartesian3.dot(r,s);let u,l,C,M,h;if(o>1){if(c>=0)return;const t=c*c;if(u=o-1,l=n.Cartesian3.magnitudeSquared(s),C=l*u,t<C)return;if(t>C){M=c*c-C,h=-c+Math.sqrt(M);const t=h/l,n=u/h;return t<n?new a.Interval(t,n):{start:n,stop:t}}const e=Math.sqrt(u/l);return new a.Interval(e,e)}return o<1?(u=o-1,l=n.Cartesian3.magnitudeSquared(s),C=l*u,M=c*c-C,h=-c+Math.sqrt(M),new a.Interval(0,h/l)):c<0?(l=n.Cartesian3.magnitudeSquared(s),new a.Interval(0,-c/l)):void 0};const L=new n.Cartesian3,I=new n.Cartesian3,E=new n.Cartesian3,v=new n.Cartesian3,z=new n.Cartesian3,T=new n.Matrix3,U=new n.Matrix3,W=new n.Matrix3,B=new n.Matrix3,V=new n.Matrix3,Z=new n.Matrix3,A=new n.Matrix3,D=new n.Cartesian3,F=new n.Cartesian3,G=new n.Cartographic;d.grazingAltitudeLocation=function(t,a){const r=t.origin,s=t.direction;if(!n.Cartesian3.equals(r,n.Cartesian3.ZERO)){const t=a.geodeticSurfaceNormal(r,L);if(n.Cartesian3.dot(s,t)>=0)return r}const c=e.defined(this.rayEllipsoid(t,a)),u=a.transformPositionToScaledSpace(s,L),l=n.Cartesian3.normalize(u,u),C=n.Cartesian3.mostOrthogonalAxis(u,v),M=n.Cartesian3.normalize(n.Cartesian3.cross(C,l,I),I),h=n.Cartesian3.normalize(n.Cartesian3.cross(l,M,E),E),f=T;f[0]=l.x,f[1]=l.y,f[2]=l.z,f[3]=M.x,f[4]=M.y,f[5]=M.z,f[6]=h.x,f[7]=h.y,f[8]=h.z;const d=n.Matrix3.transpose(f,U),g=n.Matrix3.fromScale(a.radii,W),p=n.Matrix3.fromScale(a.oneOverRadii,B),w=V;w[0]=0,w[1]=-s.z,w[2]=s.y,w[3]=s.z,w[4]=0,w[5]=-s.x,w[6]=-s.y,w[7]=s.x,w[8]=0;const R=n.Matrix3.multiply(n.Matrix3.multiply(d,p,Z),w,Z),S=n.Matrix3.multiply(n.Matrix3.multiply(R,g,A),f,A),O=n.Matrix3.multiplyByVector(R,r,z),x=function(t,e,a,r,s){const c=r*r,u=s*s,l=(t[n.Matrix3.COLUMN1ROW1]-t[n.Matrix3.COLUMN2ROW2])*u,C=s*(r*q(t[n.Matrix3.COLUMN1ROW0],t[n.Matrix3.COLUMN0ROW1],i.CesiumMath.EPSILON15)+e.y),M=t[n.Matrix3.COLUMN0ROW0]*c+t[n.Matrix3.COLUMN2ROW2]*u+r*e.x+a,h=u*q(t[n.Matrix3.COLUMN2ROW1],t[n.Matrix3.COLUMN1ROW2],i.CesiumMath.EPSILON15),f=s*(r*q(t[n.Matrix3.COLUMN2ROW0],t[n.Matrix3.COLUMN0ROW2])+e.z);let d;const g=[];if(0===f&&0===h){if(d=o.computeRealRoots(l,C,M),0===d.length)return g;const t=d[0],e=Math.sqrt(Math.max(1-t*t,0));if(g.push(new n.Cartesian3(r,s*t,s*-e)),g.push(new n.Cartesian3(r,s*t,s*e)),2===d.length){const t=d[1],e=Math.sqrt(Math.max(1-t*t,0));g.push(new n.Cartesian3(r,s*t,s*-e)),g.push(new n.Cartesian3(r,s*t,s*e))}return g}const p=f*f,w=h*h,R=f*h,S=l*l+w,O=2*(C*l+R),x=2*M*l+C*C-w+p,y=2*(M*C-R),P=M*M-p;if(0===S&&0===O&&0===x&&0===y)return g;d=m.computeRealRoots(S,O,x,y,P);const N=d.length;if(0===N)return g;for(let t=0;t<N;++t){const e=d[t],a=e*e,o=Math.max(1-a,0),c=Math.sqrt(o);let u;u=i.CesiumMath.sign(l)===i.CesiumMath.sign(M)?q(l*a+M,C*e,i.CesiumMath.EPSILON12):i.CesiumMath.sign(M)===i.CesiumMath.sign(C*e)?q(l*a,C*e+M,i.CesiumMath.EPSILON12):q(l*a+C*e,M,i.CesiumMath.EPSILON12);const m=u*q(h*e,f,i.CesiumMath.EPSILON15);m<0?g.push(new n.Cartesian3(r,s*e,s*c)):m>0?g.push(new n.Cartesian3(r,s*e,s*-c)):0!==c?(g.push(new n.Cartesian3(r,s*e,s*-c)),g.push(new n.Cartesian3(r,s*e,s*c)),++t):g.push(new n.Cartesian3(r,s*e,s*c))}return g}(S,n.Cartesian3.negate(O,L),0,0,1);let y,P;const N=x.length;if(N>0){let t=n.Cartesian3.clone(n.Cartesian3.ZERO,F),e=Number.NEGATIVE_INFINITY;for(let a=0;a<N;++a){y=n.Matrix3.multiplyByVector(g,n.Matrix3.multiplyByVector(f,x[a],D),D);const i=n.Cartesian3.normalize(n.Cartesian3.subtract(y,r,v),v),o=n.Cartesian3.dot(i,s);o>e&&(e=o,t=n.Cartesian3.clone(y,t))}const o=a.cartesianToCartographic(t,G);return e=i.CesiumMath.clamp(e,0,1),P=n.Cartesian3.magnitude(n.Cartesian3.subtract(t,r,v))*Math.sqrt(1-e*e),P=c?-P:P,o.height=P,a.cartographicToCartesian(o,new n.Cartesian3)}};const Y=new n.Cartesian3;d.lineSegmentPlane=function(t,a,r,s){e.defined(s)||(s=new n.Cartesian3);const o=n.Cartesian3.subtract(a,t,Y),c=r.normal,u=n.Cartesian3.dot(c,o);if(Math.abs(u)<i.CesiumMath.EPSILON6)return;const l=n.Cartesian3.dot(c,t),C=-(r.distance+l)/u;return C<0||C>1?void 0:(n.Cartesian3.multiplyByScalar(o,C,s),n.Cartesian3.add(t,s,s),s)},d.trianglePlaneIntersection=function(t,e,a,i){const r=i.normal,s=i.distance,o=n.Cartesian3.dot(r,t)+s<0,c=n.Cartesian3.dot(r,e)+s<0,u=n.Cartesian3.dot(r,a)+s<0;let l,C,M=0;if(M+=o?1:0,M+=c?1:0,M+=u?1:0,1!==M&&2!==M||(l=new n.Cartesian3,C=new n.Cartesian3),1===M){if(o)return d.lineSegmentPlane(t,e,i,l),d.lineSegmentPlane(t,a,i,C),{positions:[t,e,a,l,C],indices:[0,3,4,1,2,4,1,4,3]};if(c)return d.lineSegmentPlane(e,a,i,l),d.lineSegmentPlane(e,t,i,C),{positions:[t,e,a,l,C],indices:[1,3,4,2,0,4,2,4,3]};if(u)return d.lineSegmentPlane(a,t,i,l),d.lineSegmentPlane(a,e,i,C),{positions:[t,e,a,l,C],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===M){if(!o)return d.lineSegmentPlane(e,t,i,l),d.lineSegmentPlane(a,t,i,C),{positions:[t,e,a,l,C],indices:[1,2,4,1,4,3,0,3,4]};if(!c)return d.lineSegmentPlane(a,e,i,l),d.lineSegmentPlane(t,e,i,C),{positions:[t,e,a,l,C],indices:[2,0,4,2,4,3,1,3,4]};if(!u)return d.lineSegmentPlane(t,a,i,l),d.lineSegmentPlane(e,a,i,C),{positions:[t,e,a,l,C],indices:[0,1,4,0,4,3,2,3,4]}}};var _=d;t.IntersectionTests=_,t.Ray=f}));
public/CIMSDK/Workers/Matrix2-2fdcdec7.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./defaultValue-865ac579","./Math-76ce6367","./RuntimeError-9e0724f9"],(function(t,e,n,a,u){"use strict";function r(t,e,a,u){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0),this.z=n.defaultValue(a,0),this.w=n.defaultValue(u,0)}r.fromElements=function(t,e,a,u,i){return n.defined(i)?(i.x=t,i.y=e,i.z=a,i.w=u,i):new r(t,e,a,u)},r.fromColor=function(t,e){return n.defined(e)?(e.x=t.red,e.y=t.green,e.z=t.blue,e.w=t.alpha,e):new r(t.red,t.green,t.blue,t.alpha)},r.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e):new r(t.x,t.y,t.z,t.w)},r.packedLength=4,r.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t.x,e[a++]=t.y,e[a++]=t.z,e[a]=t.w,e},r.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new r),a.x=t[e++],a.y=t[e++],a.z=t[e++],a.w=t[e],a},r.packArray=function(t,e){const a=t.length,u=4*a;n.defined(e)?(Array.isArray(e)||e.length===u)&&e.length!==u&&(e.length=u):e=new Array(u);for(let n=0;n<a;++n)r.pack(t[n],e,4*n);return e},r.unpackArray=function(t,e){const a=t.length;n.defined(e)?e.length=a/4:e=new Array(a/4);for(let n=0;n<a;n+=4){const a=n/4;e[a]=r.unpack(t,n,e[a])}return e},r.fromArray=r.unpack,r.maximumComponent=function(t){return Math.max(t.x,t.y,t.z,t.w)},r.minimumComponent=function(t){return Math.min(t.x,t.y,t.z,t.w)},r.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n.z=Math.min(t.z,e.z),n.w=Math.min(t.w,e.w),n},r.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n.z=Math.max(t.z,e.z),n.w=Math.max(t.w,e.w),n},r.clamp=function(t,e,n,u){const r=a.CesiumMath.clamp(t.x,e.x,n.x),i=a.CesiumMath.clamp(t.y,e.y,n.y),o=a.CesiumMath.clamp(t.z,e.z,n.z),s=a.CesiumMath.clamp(t.w,e.w,n.w);return u.x=r,u.y=i,u.z=o,u.w=s,u},r.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},r.magnitude=function(t){return Math.sqrt(r.magnitudeSquared(t))};const i=new r;r.distance=function(t,e){return r.subtract(t,e,i),r.magnitude(i)},r.distanceSquared=function(t,e){return r.subtract(t,e,i),r.magnitudeSquared(i)},r.normalize=function(t,e){const n=r.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e.w=t.w/n,e},r.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w},r.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n.z=t.z*e.z,n.w=t.w*e.w,n},r.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n.z=t.z/e.z,n.w=t.w/e.w,n},r.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n.w=t.w+e.w,n},r.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n.w=t.w-e.w,n},r.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n.z=t.z*e,n.w=t.w*e,n},r.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n.w=t.w/e,n},r.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e.z=-t.z,e.w=-t.w,e},r.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e.z=Math.abs(t.z),e.w=Math.abs(t.w),e};const o=new r;r.lerp=function(t,e,n,a){return r.multiplyByScalar(e,n,o),a=r.multiplyByScalar(t,1-n,a),r.add(o,a,a)};const s=new r;r.mostOrthogonalAxis=function(t,e){const n=r.normalize(t,s);return r.abs(n,n),e=n.x<=n.y?n.x<=n.z?n.x<=n.w?r.clone(r.UNIT_X,e):r.clone(r.UNIT_W,e):n.z<=n.w?r.clone(r.UNIT_Z,e):r.clone(r.UNIT_W,e):n.y<=n.z?n.y<=n.w?r.clone(r.UNIT_Y,e):r.clone(r.UNIT_W,e):n.z<=n.w?r.clone(r.UNIT_Z,e):r.clone(r.UNIT_W,e)},r.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w},r.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]&&t.z===e[n+2]&&t.w===e[n+3]},r.equalsEpsilon=function(t,e,u,r){return t===e||n.defined(t)&&n.defined(e)&&a.CesiumMath.equalsEpsilon(t.x,e.x,u,r)&&a.CesiumMath.equalsEpsilon(t.y,e.y,u,r)&&a.CesiumMath.equalsEpsilon(t.z,e.z,u,r)&&a.CesiumMath.equalsEpsilon(t.w,e.w,u,r)},r.ZERO=Object.freeze(new r(0,0,0,0)),r.ONE=Object.freeze(new r(1,1,1,1)),r.UNIT_X=Object.freeze(new r(1,0,0,0)),r.UNIT_Y=Object.freeze(new r(0,1,0,0)),r.UNIT_Z=Object.freeze(new r(0,0,1,0)),r.UNIT_W=Object.freeze(new r(0,0,0,1)),r.prototype.clone=function(t){return r.clone(this,t)},r.prototype.equals=function(t){return r.equals(this,t)},r.prototype.equalsEpsilon=function(t,e,n){return r.equalsEpsilon(this,t,e,n)},r.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const c=new Float32Array(1),l=new Uint8Array(c.buffer),f=new Uint32Array([287454020]),h=68===new Uint8Array(f.buffer)[0];function d(t,e,a,u,r,i,o,s,c,l,f,h,d,m,y,w){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(r,0),this[2]=n.defaultValue(c,0),this[3]=n.defaultValue(d,0),this[4]=n.defaultValue(e,0),this[5]=n.defaultValue(i,0),this[6]=n.defaultValue(l,0),this[7]=n.defaultValue(m,0),this[8]=n.defaultValue(a,0),this[9]=n.defaultValue(o,0),this[10]=n.defaultValue(f,0),this[11]=n.defaultValue(y,0),this[12]=n.defaultValue(u,0),this[13]=n.defaultValue(s,0),this[14]=n.defaultValue(h,0),this[15]=n.defaultValue(w,0)}r.packFloat=function(t,e){return n.defined(e)||(e=new r),c[0]=t,h?(e.x=l[0],e.y=l[1],e.z=l[2],e.w=l[3]):(e.x=l[3],e.y=l[2],e.z=l[1],e.w=l[0]),e},r.unpackFloat=function(t){return h?(l[0]=t.x,l[1]=t.y,l[2]=t.z,l[3]=t.w):(l[0]=t.w,l[1]=t.z,l[2]=t.y,l[3]=t.x),c[0]},d.packedLength=16,d.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t[0],e[a++]=t[1],e[a++]=t[2],e[a++]=t[3],e[a++]=t[4],e[a++]=t[5],e[a++]=t[6],e[a++]=t[7],e[a++]=t[8],e[a++]=t[9],e[a++]=t[10],e[a++]=t[11],e[a++]=t[12],e[a++]=t[13],e[a++]=t[14],e[a]=t[15],e},d.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new d),a[0]=t[e++],a[1]=t[e++],a[2]=t[e++],a[3]=t[e++],a[4]=t[e++],a[5]=t[e++],a[6]=t[e++],a[7]=t[e++],a[8]=t[e++],a[9]=t[e++],a[10]=t[e++],a[11]=t[e++],a[12]=t[e++],a[13]=t[e++],a[14]=t[e++],a[15]=t[e],a},d.packArray=function(t,e){const a=t.length,u=16*a;n.defined(e)?(Array.isArray(e)||e.length===u)&&e.length!==u&&(e.length=u):e=new Array(u);for(let n=0;n<a;++n)d.pack(t[n],e,16*n);return e},d.unpackArray=function(t,e){const a=t.length;n.defined(e)?e.length=a/16:e=new Array(a/16);for(let n=0;n<a;n+=16){const a=n/16;e[a]=d.unpack(t,n,e[a])}return e},d.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):new d(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])},d.fromArray=d.unpack,d.fromColumnMajorArray=function(t,e){return d.clone(t,e)},d.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15],e):new d(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},d.fromRotationTranslation=function(t,a,u){return a=n.defaultValue(a,e.Cartesian3.ZERO),n.defined(u)?(u[0]=t[0],u[1]=t[1],u[2]=t[2],u[3]=0,u[4]=t[3],u[5]=t[4],u[6]=t[5],u[7]=0,u[8]=t[6],u[9]=t[7],u[10]=t[8],u[11]=0,u[12]=a.x,u[13]=a.y,u[14]=a.z,u[15]=1,u):new d(t[0],t[3],t[6],a.x,t[1],t[4],t[7],a.y,t[2],t[5],t[8],a.z,0,0,0,1)},d.fromTranslationQuaternionRotationScale=function(t,e,a,u){n.defined(u)||(u=new d);const r=a.x,i=a.y,o=a.z,s=e.x*e.x,c=e.x*e.y,l=e.x*e.z,f=e.x*e.w,h=e.y*e.y,m=e.y*e.z,y=e.y*e.w,w=e.z*e.z,x=e.z*e.w,M=e.w*e.w,p=s-h-w+M,g=2*(c-x),C=2*(l+y),z=2*(c+x),b=-s+h-w+M,O=2*(m-f),V=2*(l-y),T=2*(m+f),A=-s-h+w+M;return u[0]=p*r,u[1]=z*r,u[2]=V*r,u[3]=0,u[4]=g*i,u[5]=b*i,u[6]=T*i,u[7]=0,u[8]=C*o,u[9]=O*o,u[10]=A*o,u[11]=0,u[12]=t.x,u[13]=t.y,u[14]=t.z,u[15]=1,u},d.fromTranslationRotationScale=function(t,e){return d.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,e)},d.fromTranslation=function(t,n){return d.fromRotationTranslation(e.Matrix3.IDENTITY,t,n)},d.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t.y,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t.z,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new d(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)},d.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new d(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)},d.fromRotation=function(t,e){return n.defined(e)||(e=new d),e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=0,e[4]=t[3],e[5]=t[4],e[6]=t[5],e[7]=0,e[8]=t[6],e[9]=t[7],e[10]=t[8],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e};const m=new e.Cartesian3,y=new e.Cartesian3,w=new e.Cartesian3;d.fromCamera=function(t,a){const u=t.position,r=t.direction,i=t.up;e.Cartesian3.normalize(r,m),e.Cartesian3.normalize(e.Cartesian3.cross(m,i,y),y),e.Cartesian3.normalize(e.Cartesian3.cross(y,m,w),w);const o=y.x,s=y.y,c=y.z,l=m.x,f=m.y,h=m.z,x=w.x,M=w.y,p=w.z,g=u.x,C=u.y,z=u.z,b=o*-g+s*-C+c*-z,O=x*-g+M*-C+p*-z,V=l*g+f*C+h*z;return n.defined(a)?(a[0]=o,a[1]=x,a[2]=-l,a[3]=0,a[4]=s,a[5]=M,a[6]=-f,a[7]=0,a[8]=c,a[9]=p,a[10]=-h,a[11]=0,a[12]=b,a[13]=O,a[14]=V,a[15]=1,a):new d(o,s,c,b,x,M,p,O,-l,-f,-h,V,0,0,0,1)},d.computePerspectiveFieldOfView=function(t,e,n,a,u){const r=1/Math.tan(.5*t),i=r/e,o=(a+n)/(n-a),s=2*a*n/(n-a);return u[0]=i,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=r,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=o,u[11]=-1,u[12]=0,u[13]=0,u[14]=s,u[15]=0,u},d.computeOrthographicOffCenter=function(t,e,n,a,u,r,i){let o=1/(e-t),s=1/(a-n),c=1/(r-u);const l=-(e+t)*o,f=-(a+n)*s,h=-(r+u)*c;return o*=2,s*=2,c*=-2,i[0]=o,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=s,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=c,i[11]=0,i[12]=l,i[13]=f,i[14]=h,i[15]=1,i},d.computePerspectiveOffCenter=function(t,e,n,a,u,r,i){const o=2*u/(e-t),s=2*u/(a-n),c=(e+t)/(e-t),l=(a+n)/(a-n),f=-(r+u)/(r-u),h=-2*r*u/(r-u);return i[0]=o,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=s,i[6]=0,i[7]=0,i[8]=c,i[9]=l,i[10]=f,i[11]=-1,i[12]=0,i[13]=0,i[14]=h,i[15]=0,i},d.computeInfinitePerspectiveOffCenter=function(t,e,n,a,u,r){const i=2*u/(e-t),o=2*u/(a-n),s=(e+t)/(e-t),c=(a+n)/(a-n),l=-2*u;return r[0]=i,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=o,r[6]=0,r[7]=0,r[8]=s,r[9]=c,r[10]=-1,r[11]=-1,r[12]=0,r[13]=0,r[14]=l,r[15]=0,r},d.computeViewportTransformation=function(t,e,a,u){n.defined(u)||(u=new d),t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT);const r=n.defaultValue(t.x,0),i=n.defaultValue(t.y,0),o=n.defaultValue(t.width,0),s=n.defaultValue(t.height,0);e=n.defaultValue(e,0);const c=.5*o,l=.5*s,f=.5*((a=n.defaultValue(a,1))-e),h=c,m=l,y=f,w=r+c,x=i+l,M=e+f;return u[0]=h,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=m,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=y,u[11]=0,u[12]=w,u[13]=x,u[14]=M,u[15]=1,u},d.computeView=function(t,n,a,u,r){return r[0]=u.x,r[1]=a.x,r[2]=-n.x,r[3]=0,r[4]=u.y,r[5]=a.y,r[6]=-n.y,r[7]=0,r[8]=u.z,r[9]=a.z,r[10]=-n.z,r[11]=0,r[12]=-e.Cartesian3.dot(u,t),r[13]=-e.Cartesian3.dot(a,t),r[14]=e.Cartesian3.dot(n,t),r[15]=1,r},d.toArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},d.getElementIndex=function(t,e){return 4*t+e},d.getColumn=function(t,e,n){const a=4*e,u=t[a],r=t[a+1],i=t[a+2],o=t[a+3];return n.x=u,n.y=r,n.z=i,n.w=o,n},d.setColumn=function(t,e,n,a){const u=4*e;return(a=d.clone(t,a))[u]=n.x,a[u+1]=n.y,a[u+2]=n.z,a[u+3]=n.w,a},d.getRow=function(t,e,n){const a=t[e],u=t[e+4],r=t[e+8],i=t[e+12];return n.x=a,n.y=u,n.z=r,n.w=i,n},d.setRow=function(t,e,n,a){return(a=d.clone(t,a))[e]=n.x,a[e+4]=n.y,a[e+8]=n.z,a[e+12]=n.w,a},d.setTranslation=function(t,e,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=t[15],n};const x=new e.Cartesian3;d.setScale=function(t,e,n){const a=d.getScale(t,x),u=e.x/a.x,r=e.y/a.y,i=e.z/a.z;return n[0]=t[0]*u,n[1]=t[1]*u,n[2]=t[2]*u,n[3]=t[3],n[4]=t[4]*r,n[5]=t[5]*r,n[6]=t[6]*r,n[7]=t[7],n[8]=t[8]*i,n[9]=t[9]*i,n[10]=t[10]*i,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const M=new e.Cartesian3;d.setUniformScale=function(t,e,n){const a=d.getScale(t,M),u=e/a.x,r=e/a.y,i=e/a.z;return n[0]=t[0]*u,n[1]=t[1]*u,n[2]=t[2]*u,n[3]=t[3],n[4]=t[4]*r,n[5]=t[5]*r,n[6]=t[6]*r,n[7]=t[7],n[8]=t[8]*i,n[9]=t[9]*i,n[10]=t[10]*i,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const p=new e.Cartesian3;d.getScale=function(t,n){return n.x=e.Cartesian3.magnitude(e.Cartesian3.fromElements(t[0],t[1],t[2],p)),n.y=e.Cartesian3.magnitude(e.Cartesian3.fromElements(t[4],t[5],t[6],p)),n.z=e.Cartesian3.magnitude(e.Cartesian3.fromElements(t[8],t[9],t[10],p)),n};const g=new e.Cartesian3;d.getMaximumScale=function(t){return d.getScale(t,g),e.Cartesian3.maximumComponent(g)};const C=new e.Cartesian3;d.setRotation=function(t,e,n){const a=d.getScale(t,C);return n[0]=e[0]*a.x,n[1]=e[1]*a.x,n[2]=e[2]*a.x,n[3]=t[3],n[4]=e[3]*a.y,n[5]=e[4]*a.y,n[6]=e[5]*a.y,n[7]=t[7],n[8]=e[6]*a.z,n[9]=e[7]*a.z,n[10]=e[8]*a.z,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const z=new e.Cartesian3;d.getRotation=function(t,e){const n=d.getScale(t,z);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.x,e[3]=t[4]/n.y,e[4]=t[5]/n.y,e[5]=t[6]/n.y,e[6]=t[8]/n.z,e[7]=t[9]/n.z,e[8]=t[10]/n.z,e},d.multiply=function(t,e,n){const a=t[0],u=t[1],r=t[2],i=t[3],o=t[4],s=t[5],c=t[6],l=t[7],f=t[8],h=t[9],d=t[10],m=t[11],y=t[12],w=t[13],x=t[14],M=t[15],p=e[0],g=e[1],C=e[2],z=e[3],b=e[4],O=e[5],V=e[6],T=e[7],A=e[8],E=e[9],I=e[10],U=e[11],N=e[12],S=e[13],P=e[14],_=e[15],q=a*p+o*g+f*C+y*z,R=u*p+s*g+h*C+w*z,W=r*p+c*g+d*C+x*z,L=i*p+l*g+m*C+M*z,k=a*b+o*O+f*V+y*T,B=u*b+s*O+h*V+w*T,$=r*b+c*O+d*V+x*T,j=i*b+l*O+m*V+M*T,v=a*A+o*E+f*I+y*U,X=u*A+s*E+h*I+w*U,Y=r*A+c*E+d*I+x*U,Z=i*A+l*E+m*I+M*U,D=a*N+o*S+f*P+y*_,F=u*N+s*S+h*P+w*_,G=r*N+c*S+d*P+x*_,H=i*N+l*S+m*P+M*_;return n[0]=q,n[1]=R,n[2]=W,n[3]=L,n[4]=k,n[5]=B,n[6]=$,n[7]=j,n[8]=v,n[9]=X,n[10]=Y,n[11]=Z,n[12]=D,n[13]=F,n[14]=G,n[15]=H,n},d.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n[4]=t[4]+e[4],n[5]=t[5]+e[5],n[6]=t[6]+e[6],n[7]=t[7]+e[7],n[8]=t[8]+e[8],n[9]=t[9]+e[9],n[10]=t[10]+e[10],n[11]=t[11]+e[11],n[12]=t[12]+e[12],n[13]=t[13]+e[13],n[14]=t[14]+e[14],n[15]=t[15]+e[15],n},d.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n[4]=t[4]-e[4],n[5]=t[5]-e[5],n[6]=t[6]-e[6],n[7]=t[7]-e[7],n[8]=t[8]-e[8],n[9]=t[9]-e[9],n[10]=t[10]-e[10],n[11]=t[11]-e[11],n[12]=t[12]-e[12],n[13]=t[13]-e[13],n[14]=t[14]-e[14],n[15]=t[15]-e[15],n},d.multiplyTransformation=function(t,e,n){const a=t[0],u=t[1],r=t[2],i=t[4],o=t[5],s=t[6],c=t[8],l=t[9],f=t[10],h=t[12],d=t[13],m=t[14],y=e[0],w=e[1],x=e[2],M=e[4],p=e[5],g=e[6],C=e[8],z=e[9],b=e[10],O=e[12],V=e[13],T=e[14],A=a*y+i*w+c*x,E=u*y+o*w+l*x,I=r*y+s*w+f*x,U=a*M+i*p+c*g,N=u*M+o*p+l*g,S=r*M+s*p+f*g,P=a*C+i*z+c*b,_=u*C+o*z+l*b,q=r*C+s*z+f*b,R=a*O+i*V+c*T+h,W=u*O+o*V+l*T+d,L=r*O+s*V+f*T+m;return n[0]=A,n[1]=E,n[2]=I,n[3]=0,n[4]=U,n[5]=N,n[6]=S,n[7]=0,n[8]=P,n[9]=_,n[10]=q,n[11]=0,n[12]=R,n[13]=W,n[14]=L,n[15]=1,n},d.multiplyByMatrix3=function(t,e,n){const a=t[0],u=t[1],r=t[2],i=t[4],o=t[5],s=t[6],c=t[8],l=t[9],f=t[10],h=e[0],d=e[1],m=e[2],y=e[3],w=e[4],x=e[5],M=e[6],p=e[7],g=e[8],C=a*h+i*d+c*m,z=u*h+o*d+l*m,b=r*h+s*d+f*m,O=a*y+i*w+c*x,V=u*y+o*w+l*x,T=r*y+s*w+f*x,A=a*M+i*p+c*g,E=u*M+o*p+l*g,I=r*M+s*p+f*g;return n[0]=C,n[1]=z,n[2]=b,n[3]=0,n[4]=O,n[5]=V,n[6]=T,n[7]=0,n[8]=A,n[9]=E,n[10]=I,n[11]=0,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},d.multiplyByTranslation=function(t,e,n){const a=e.x,u=e.y,r=e.z,i=a*t[0]+u*t[4]+r*t[8]+t[12],o=a*t[1]+u*t[5]+r*t[9]+t[13],s=a*t[2]+u*t[6]+r*t[10]+t[14];return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=i,n[13]=o,n[14]=s,n[15]=t[15],n},d.multiplyByScale=function(t,e,n){const a=e.x,u=e.y,r=e.z;return 1===a&&1===u&&1===r?d.clone(t,n):(n[0]=a*t[0],n[1]=a*t[1],n[2]=a*t[2],n[3]=t[3],n[4]=u*t[4],n[5]=u*t[5],n[6]=u*t[6],n[7]=t[7],n[8]=r*t[8],n[9]=r*t[9],n[10]=r*t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n)},d.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3],n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7],n[8]=t[8]*e,n[9]=t[9]*e,n[10]=t[10]*e,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},d.multiplyByVector=function(t,e,n){const a=e.x,u=e.y,r=e.z,i=e.w,o=t[0]*a+t[4]*u+t[8]*r+t[12]*i,s=t[1]*a+t[5]*u+t[9]*r+t[13]*i,c=t[2]*a+t[6]*u+t[10]*r+t[14]*i,l=t[3]*a+t[7]*u+t[11]*r+t[15]*i;return n.x=o,n.y=s,n.z=c,n.w=l,n},d.multiplyByPointAsVector=function(t,e,n){const a=e.x,u=e.y,r=e.z,i=t[0]*a+t[4]*u+t[8]*r,o=t[1]*a+t[5]*u+t[9]*r,s=t[2]*a+t[6]*u+t[10]*r;return n.x=i,n.y=o,n.z=s,n},d.multiplyByPoint=function(t,e,n){const a=e.x,u=e.y,r=e.z,i=t[0]*a+t[4]*u+t[8]*r+t[12],o=t[1]*a+t[5]*u+t[9]*r+t[13],s=t[2]*a+t[6]*u+t[10]*r+t[14];return n.x=i,n.y=o,n.z=s,n},d.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7]*e,n[8]=t[8]*e,n[9]=t[9]*e,n[10]=t[10]*e,n[11]=t[11]*e,n[12]=t[12]*e,n[13]=t[13]*e,n[14]=t[14]*e,n[15]=t[15]*e,n},d.negate=function(t,e){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e[9]=-t[9],e[10]=-t[10],e[11]=-t[11],e[12]=-t[12],e[13]=-t[13],e[14]=-t[14],e[15]=-t[15],e},d.transpose=function(t,e){const n=t[1],a=t[2],u=t[3],r=t[6],i=t[7],o=t[11];return e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=a,e[9]=r,e[10]=t[10],e[11]=t[14],e[12]=u,e[13]=i,e[14]=o,e[15]=t[15],e},d.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e[9]=Math.abs(t[9]),e[10]=Math.abs(t[10]),e[11]=Math.abs(t[11]),e[12]=Math.abs(t[12]),e[13]=Math.abs(t[13]),e[14]=Math.abs(t[14]),e[15]=Math.abs(t[15]),e},d.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[3]===e[3]&&t[7]===e[7]&&t[11]===e[11]&&t[15]===e[15]},d.equalsEpsilon=function(t,e,a){return a=n.defaultValue(a,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=a&&Math.abs(t[1]-e[1])<=a&&Math.abs(t[2]-e[2])<=a&&Math.abs(t[3]-e[3])<=a&&Math.abs(t[4]-e[4])<=a&&Math.abs(t[5]-e[5])<=a&&Math.abs(t[6]-e[6])<=a&&Math.abs(t[7]-e[7])<=a&&Math.abs(t[8]-e[8])<=a&&Math.abs(t[9]-e[9])<=a&&Math.abs(t[10]-e[10])<=a&&Math.abs(t[11]-e[11])<=a&&Math.abs(t[12]-e[12])<=a&&Math.abs(t[13]-e[13])<=a&&Math.abs(t[14]-e[14])<=a&&Math.abs(t[15]-e[15])<=a},d.getTranslation=function(t,e){return e.x=t[12],e.y=t[13],e.z=t[14],e},d.getMatrix3=function(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e};const b=new e.Matrix3,O=new e.Matrix3,V=new r,T=new r(0,0,0,1);d.inverse=function(t,n){const i=t[0],o=t[4],s=t[8],c=t[12],l=t[1],f=t[5],h=t[9],m=t[13],y=t[2],w=t[6],x=t[10],M=t[14],p=t[3],g=t[7],C=t[11],z=t[15];let A=x*z,E=M*C,I=w*z,U=M*g,N=w*C,S=x*g,P=y*z,_=M*p,q=y*C,R=x*p,W=y*g,L=w*p;const k=A*f+U*h+N*m-(E*f+I*h+S*m),B=E*l+P*h+R*m-(A*l+_*h+q*m),$=I*l+_*f+W*m-(U*l+P*f+L*m),j=S*l+q*f+L*h-(N*l+R*f+W*h),v=E*o+I*s+S*c-(A*o+U*s+N*c),X=A*i+_*s+q*c-(E*i+P*s+R*c),Y=U*i+P*o+L*c-(I*i+_*o+W*c),Z=N*i+R*o+W*s-(S*i+q*o+L*s);A=s*m,E=c*h,I=o*m,U=c*f,N=o*h,S=s*f,P=i*m,_=c*l,q=i*h,R=s*l,W=i*f,L=o*l;const D=A*g+U*C+N*z-(E*g+I*C+S*z),F=E*p+P*C+R*z-(A*p+_*C+q*z),G=I*p+_*g+W*z-(U*p+P*g+L*z),H=S*p+q*g+L*C-(N*p+R*g+W*C),Q=I*x+S*M+E*w-(N*M+A*w+U*x),J=q*M+A*y+_*x-(P*x+R*M+E*y),K=P*w+L*M+U*y-(W*M+I*y+_*w),tt=W*x+N*y+R*w-(q*w+L*x+S*y);let et=i*k+o*B+s*$+c*j;if(Math.abs(et)<a.CesiumMath.EPSILON21){if(e.Matrix3.equalsEpsilon(d.getMatrix3(t,b),O,a.CesiumMath.EPSILON7)&&r.equals(d.getRow(t,3,V),T))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=1,n;throw new u.RuntimeError("matrix is not invertible because its determinate is zero.")}return et=1/et,n[0]=k*et,n[1]=B*et,n[2]=$*et,n[3]=j*et,n[4]=v*et,n[5]=X*et,n[6]=Y*et,n[7]=Z*et,n[8]=D*et,n[9]=F*et,n[10]=G*et,n[11]=H*et,n[12]=Q*et,n[13]=J*et,n[14]=K*et,n[15]=tt*et,n},d.inverseTransformation=function(t,e){const n=t[0],a=t[1],u=t[2],r=t[4],i=t[5],o=t[6],s=t[8],c=t[9],l=t[10],f=t[12],h=t[13],d=t[14],m=-n*f-a*h-u*d,y=-r*f-i*h-o*d,w=-s*f-c*h-l*d;return e[0]=n,e[1]=r,e[2]=s,e[3]=0,e[4]=a,e[5]=i,e[6]=c,e[7]=0,e[8]=u,e[9]=o,e[10]=l,e[11]=0,e[12]=m,e[13]=y,e[14]=w,e[15]=1,e};const A=new d;function E(t,e,a,u){this.west=n.defaultValue(t,0),this.south=n.defaultValue(e,0),this.east=n.defaultValue(a,0),this.north=n.defaultValue(u,0)}d.inverseTranspose=function(t,e){return d.inverse(d.transpose(t,A),e)},d.IDENTITY=Object.freeze(new d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),d.ZERO=Object.freeze(new d(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),d.COLUMN0ROW0=0,d.COLUMN0ROW1=1,d.COLUMN0ROW2=2,d.COLUMN0ROW3=3,d.COLUMN1ROW0=4,d.COLUMN1ROW1=5,d.COLUMN1ROW2=6,d.COLUMN1ROW3=7,d.COLUMN2ROW0=8,d.COLUMN2ROW1=9,d.COLUMN2ROW2=10,d.COLUMN2ROW3=11,d.COLUMN3ROW0=12,d.COLUMN3ROW1=13,d.COLUMN3ROW2=14,d.COLUMN3ROW3=15,Object.defineProperties(d.prototype,{length:{get:function(){return d.packedLength}}}),d.prototype.clone=function(t){return d.clone(this,t)},d.prototype.equals=function(t){return d.equals(this,t)},d.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]&&t[4]===e[n+4]&&t[5]===e[n+5]&&t[6]===e[n+6]&&t[7]===e[n+7]&&t[8]===e[n+8]&&t[9]===e[n+9]&&t[10]===e[n+10]&&t[11]===e[n+11]&&t[12]===e[n+12]&&t[13]===e[n+13]&&t[14]===e[n+14]&&t[15]===e[n+15]},d.prototype.equalsEpsilon=function(t,e){return d.equalsEpsilon(this,t,e)},d.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\n(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\n(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\n(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`},Object.defineProperties(E.prototype,{width:{get:function(){return E.computeWidth(this)}},height:{get:function(){return E.computeHeight(this)}}}),E.packedLength=4,E.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t.west,e[a++]=t.south,e[a++]=t.east,e[a]=t.north,e},E.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new E),a.west=t[e++],a.south=t[e++],a.east=t[e++],a.north=t[e],a},E.computeWidth=function(t){let e=t.east;const n=t.west;return e<n&&(e+=a.CesiumMath.TWO_PI),e-n},E.computeHeight=function(t){return t.north-t.south},E.fromDegrees=function(t,e,u,r,i){return t=a.CesiumMath.toRadians(n.defaultValue(t,0)),e=a.CesiumMath.toRadians(n.defaultValue(e,0)),u=a.CesiumMath.toRadians(n.defaultValue(u,0)),r=a.CesiumMath.toRadians(n.defaultValue(r,0)),n.defined(i)?(i.west=t,i.south=e,i.east=u,i.north=r,i):new E(t,e,u,r)},E.fromRadians=function(t,e,a,u,r){return n.defined(r)?(r.west=n.defaultValue(t,0),r.south=n.defaultValue(e,0),r.east=n.defaultValue(a,0),r.north=n.defaultValue(u,0),r):new E(t,e,a,u)},E.fromCartographicArray=function(t,e){let u=Number.MAX_VALUE,r=-Number.MAX_VALUE,i=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let e=0,n=t.length;e<n;e++){const n=t[e];u=Math.min(u,n.longitude),r=Math.max(r,n.longitude),s=Math.min(s,n.latitude),c=Math.max(c,n.latitude);const l=n.longitude>=0?n.longitude:n.longitude+a.CesiumMath.TWO_PI;i=Math.min(i,l),o=Math.max(o,l)}return r-u>o-i&&(u=i,r=o,r>a.CesiumMath.PI&&(r-=a.CesiumMath.TWO_PI),u>a.CesiumMath.PI&&(u-=a.CesiumMath.TWO_PI)),n.defined(e)?(e.west=u,e.south=s,e.east=r,e.north=c,e):new E(u,s,r,c)},E.fromCartesianArray=function(t,u,r){u=n.defaultValue(u,e.Ellipsoid.WGS84);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,c=-Number.MAX_VALUE,l=Number.MAX_VALUE,f=-Number.MAX_VALUE;for(let e=0,n=t.length;e<n;e++){const n=u.cartesianToCartographic(t[e]);i=Math.min(i,n.longitude),o=Math.max(o,n.longitude),l=Math.min(l,n.latitude),f=Math.max(f,n.latitude);const r=n.longitude>=0?n.longitude:n.longitude+a.CesiumMath.TWO_PI;s=Math.min(s,r),c=Math.max(c,r)}return o-i>c-s&&(i=s,o=c,o>a.CesiumMath.PI&&(o-=a.CesiumMath.TWO_PI),i>a.CesiumMath.PI&&(i-=a.CesiumMath.TWO_PI)),n.defined(r)?(r.west=i,r.south=l,r.east=o,r.north=f,r):new E(i,l,o,f)},E.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e):new E(t.west,t.south,t.east,t.north)},E.equalsEpsilon=function(t,e,a){return a=n.defaultValue(a,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t.west-e.west)<=a&&Math.abs(t.south-e.south)<=a&&Math.abs(t.east-e.east)<=a&&Math.abs(t.north-e.north)<=a},E.prototype.clone=function(t){return E.clone(this,t)},E.prototype.equals=function(t){return E.equals(this,t)},E.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.west===e.west&&t.south===e.south&&t.east===e.east&&t.north===e.north},E.prototype.equalsEpsilon=function(t,e){return E.equalsEpsilon(this,t,e)},E.validate=function(t){},E.southwest=function(t,a){return n.defined(a)?(a.longitude=t.west,a.latitude=t.south,a.height=0,a):new e.Cartographic(t.west,t.south)},E.northwest=function(t,a){return n.defined(a)?(a.longitude=t.west,a.latitude=t.north,a.height=0,a):new e.Cartographic(t.west,t.north)},E.northeast=function(t,a){return n.defined(a)?(a.longitude=t.east,a.latitude=t.north,a.height=0,a):new e.Cartographic(t.east,t.north)},E.southeast=function(t,a){return n.defined(a)?(a.longitude=t.east,a.latitude=t.south,a.height=0,a):new e.Cartographic(t.east,t.south)},E.center=function(t,u){let r=t.east;const i=t.west;r<i&&(r+=a.CesiumMath.TWO_PI);const o=a.CesiumMath.negativePiToPi(.5*(i+r)),s=.5*(t.south+t.north);return n.defined(u)?(u.longitude=o,u.latitude=s,u.height=0,u):new e.Cartographic(o,s)},E.intersection=function(t,e,u){let r=t.east,i=t.west,o=e.east,s=e.west;r<i&&o>0?r+=a.CesiumMath.TWO_PI:o<s&&r>0&&(o+=a.CesiumMath.TWO_PI),r<i&&s<0?s+=a.CesiumMath.TWO_PI:o<s&&i<0&&(i+=a.CesiumMath.TWO_PI);const c=a.CesiumMath.negativePiToPi(Math.max(i,s)),l=a.CesiumMath.negativePiToPi(Math.min(r,o));if((t.west<t.east||e.west<e.east)&&l<=c)return;const f=Math.max(t.south,e.south),h=Math.min(t.north,e.north);return f>=h?void 0:n.defined(u)?(u.west=c,u.south=f,u.east=l,u.north=h,u):new E(c,f,l,h)},E.simpleIntersection=function(t,e,a){const u=Math.max(t.west,e.west),r=Math.max(t.south,e.south),i=Math.min(t.east,e.east),o=Math.min(t.north,e.north);if(!(r>=o||u>=i))return n.defined(a)?(a.west=u,a.south=r,a.east=i,a.north=o,a):new E(u,r,i,o)},E.union=function(t,e,u){n.defined(u)||(u=new E);let r=t.east,i=t.west,o=e.east,s=e.west;r<i&&o>0?r+=a.CesiumMath.TWO_PI:o<s&&r>0&&(o+=a.CesiumMath.TWO_PI),r<i&&s<0?s+=a.CesiumMath.TWO_PI:o<s&&i<0&&(i+=a.CesiumMath.TWO_PI);const c=a.CesiumMath.negativePiToPi(Math.min(i,s)),l=a.CesiumMath.negativePiToPi(Math.max(r,o));return u.west=c,u.south=Math.min(t.south,e.south),u.east=l,u.north=Math.max(t.north,e.north),u},E.expand=function(t,e,a){return n.defined(a)||(a=new E),a.west=Math.min(t.west,e.longitude),a.south=Math.min(t.south,e.latitude),a.east=Math.max(t.east,e.longitude),a.north=Math.max(t.north,e.latitude),a},E.contains=function(t,e){let n=e.longitude;const u=e.latitude,r=t.west;let i=t.east;return i<r&&(i+=a.CesiumMath.TWO_PI,n<0&&(n+=a.CesiumMath.TWO_PI)),(n>r||a.CesiumMath.equalsEpsilon(n,r,a.CesiumMath.EPSILON14))&&(n<i||a.CesiumMath.equalsEpsilon(n,i,a.CesiumMath.EPSILON14))&&u>=t.south&&u<=t.north};const I=new e.Cartographic;function U(t,e){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0)}E.subsample=function(t,u,r,i){u=n.defaultValue(u,e.Ellipsoid.WGS84),r=n.defaultValue(r,0),n.defined(i)||(i=[]);let o=0;const s=t.north,c=t.south,l=t.east,f=t.west,h=I;h.height=r,h.longitude=f,h.latitude=s,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.longitude=l,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.latitude=c,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.longitude=f,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.latitude=s<0?s:c>0?c:0;for(let e=1;e<8;++e)h.longitude=-Math.PI+e*a.CesiumMath.PI_OVER_TWO,E.contains(t,h)&&(i[o]=u.cartographicToCartesian(h,i[o]),o++);return 0===h.latitude&&(h.longitude=f,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.longitude=l,i[o]=u.cartographicToCartesian(h,i[o]),o++),i.length=o,i},E.subsection=function(t,e,u,r,i,o){if(n.defined(o)||(o=new E),t.west<=t.east){const n=t.east-t.west;o.west=t.west+e*n,o.east=t.west+r*n}else{const n=a.CesiumMath.TWO_PI+t.east-t.west;o.west=a.CesiumMath.negativePiToPi(t.west+e*n),o.east=a.CesiumMath.negativePiToPi(t.west+r*n)}const s=t.north-t.south;return o.south=t.south+u*s,o.north=t.south+i*s,1===e&&(o.west=t.east),1===r&&(o.east=t.east),1===u&&(o.south=t.north),1===i&&(o.north=t.north),o},E.MAX_VALUE=Object.freeze(new E(-Math.PI,-a.CesiumMath.PI_OVER_TWO,Math.PI,a.CesiumMath.PI_OVER_TWO)),U.fromElements=function(t,e,a){return n.defined(a)?(a.x=t,a.y=e,a):new U(t,e)},U.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e):new U(t.x,t.y)},U.fromCartesian3=U.clone,U.fromCartesian4=U.clone,U.packedLength=2,U.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t.x,e[a]=t.y,e},U.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new U),a.x=t[e++],a.y=t[e],a},U.packArray=function(t,e){const a=t.length,u=2*a;n.defined(e)?(Array.isArray(e)||e.length===u)&&e.length!==u&&(e.length=u):e=new Array(u);for(let n=0;n<a;++n)U.pack(t[n],e,2*n);return e},U.unpackArray=function(t,e){const a=t.length;n.defined(e)?e.length=a/2:e=new Array(a/2);for(let n=0;n<a;n+=2){const a=n/2;e[a]=U.unpack(t,n,e[a])}return e},U.fromArray=U.unpack,U.maximumComponent=function(t){return Math.max(t.x,t.y)},U.minimumComponent=function(t){return Math.min(t.x,t.y)},U.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n},U.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n},U.clamp=function(t,e,n,u){const r=a.CesiumMath.clamp(t.x,e.x,n.x),i=a.CesiumMath.clamp(t.y,e.y,n.y);return u.x=r,u.y=i,u},U.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},U.magnitude=function(t){return Math.sqrt(U.magnitudeSquared(t))};const N=new U;U.distance=function(t,e){return U.subtract(t,e,N),U.magnitude(N)},U.distanceSquared=function(t,e){return U.subtract(t,e,N),U.magnitudeSquared(N)},U.normalize=function(t,e){const n=U.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e},U.dot=function(t,e){return t.x*e.x+t.y*e.y},U.cross=function(t,e){return t.x*e.y-t.y*e.x},U.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n},U.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n},U.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n},U.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n},U.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n},U.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n},U.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e},U.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e};const S=new U;U.lerp=function(t,e,n,a){return U.multiplyByScalar(e,n,S),a=U.multiplyByScalar(t,1-n,a),U.add(S,a,a)};const P=new U,_=new U;U.angleBetween=function(t,e){return U.normalize(t,P),U.normalize(e,_),a.CesiumMath.acosClamped(U.dot(P,_))};const q=new U;function R(t,e,a,u){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(a,0),this[2]=n.defaultValue(e,0),this[3]=n.defaultValue(u,0)}U.mostOrthogonalAxis=function(t,e){const n=U.normalize(t,q);return U.abs(n,n),e=n.x<=n.y?U.clone(U.UNIT_X,e):U.clone(U.UNIT_Y,e)},U.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y},U.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]},U.equalsEpsilon=function(t,e,u,r){return t===e||n.defined(t)&&n.defined(e)&&a.CesiumMath.equalsEpsilon(t.x,e.x,u,r)&&a.CesiumMath.equalsEpsilon(t.y,e.y,u,r)},U.ZERO=Object.freeze(new U(0,0)),U.ONE=Object.freeze(new U(1,1)),U.UNIT_X=Object.freeze(new U(1,0)),U.UNIT_Y=Object.freeze(new U(0,1)),U.prototype.clone=function(t){return U.clone(this,t)},U.prototype.equals=function(t){return U.equals(this,t)},U.prototype.equalsEpsilon=function(t,e,n){return U.equalsEpsilon(this,t,e,n)},U.prototype.toString=function(){return`(${this.x}, ${this.y})`},R.packedLength=4,R.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t[0],e[a++]=t[1],e[a++]=t[2],e[a++]=t[3],e},R.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new R),a[0]=t[e++],a[1]=t[e++],a[2]=t[e++],a[3]=t[e++],a},R.packArray=function(t,e){const a=t.length,u=4*a;n.defined(e)?(Array.isArray(e)||e.length===u)&&e.length!==u&&(e.length=u):e=new Array(u);for(let n=0;n<a;++n)R.pack(t[n],e,4*n);return e},R.unpackArray=function(t,e){const a=t.length;n.defined(e)?e.length=a/4:e=new Array(a/4);for(let n=0;n<a;n+=4){const a=n/4;e[a]=R.unpack(t,n,e[a])}return e},R.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):new R(t[0],t[2],t[1],t[3])},R.fromArray=R.unpack,R.fromColumnMajorArray=function(t,e){return R.clone(t,e)},R.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3],e):new R(t[0],t[1],t[2],t[3])},R.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=t.y,e):new R(t.x,0,0,t.y)},R.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=t,e):new R(t,0,0,t)},R.fromRotation=function(t,e){const a=Math.cos(t),u=Math.sin(t);return n.defined(e)?(e[0]=a,e[1]=u,e[2]=-u,e[3]=a,e):new R(a,-u,u,a)},R.toArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):[t[0],t[1],t[2],t[3]]},R.getElementIndex=function(t,e){return 2*t+e},R.getColumn=function(t,e,n){const a=2*e,u=t[a],r=t[a+1];return n.x=u,n.y=r,n},R.setColumn=function(t,e,n,a){const u=2*e;return(a=R.clone(t,a))[u]=n.x,a[u+1]=n.y,a},R.getRow=function(t,e,n){const a=t[e],u=t[e+2];return n.x=a,n.y=u,n},R.setRow=function(t,e,n,a){return(a=R.clone(t,a))[e]=n.x,a[e+2]=n.y,a};const W=new U;R.setScale=function(t,e,n){const a=R.getScale(t,W),u=e.x/a.x,r=e.y/a.y;return n[0]=t[0]*u,n[1]=t[1]*u,n[2]=t[2]*r,n[3]=t[3]*r,n};const L=new U;R.setUniformScale=function(t,e,n){const a=R.getScale(t,L),u=e/a.x,r=e/a.y;return n[0]=t[0]*u,n[1]=t[1]*u,n[2]=t[2]*r,n[3]=t[3]*r,n};const k=new U;R.getScale=function(t,e){return e.x=U.magnitude(U.fromElements(t[0],t[1],k)),e.y=U.magnitude(U.fromElements(t[2],t[3],k)),e};const B=new U;R.getMaximumScale=function(t){return R.getScale(t,B),U.maximumComponent(B)};const $=new U;R.setRotation=function(t,e,n){const a=R.getScale(t,$);return n[0]=e[0]*a.x,n[1]=e[1]*a.x,n[2]=e[2]*a.y,n[3]=e[3]*a.y,n};const j=new U;R.getRotation=function(t,e){const n=R.getScale(t,j);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.y,e[3]=t[3]/n.y,e},R.multiply=function(t,e,n){const a=t[0]*e[0]+t[2]*e[1],u=t[0]*e[2]+t[2]*e[3],r=t[1]*e[0]+t[3]*e[1],i=t[1]*e[2]+t[3]*e[3];return n[0]=a,n[1]=r,n[2]=u,n[3]=i,n},R.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n},R.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n},R.multiplyByVector=function(t,e,n){const a=t[0]*e.x+t[2]*e.y,u=t[1]*e.x+t[3]*e.y;return n.x=a,n.y=u,n},R.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n},R.multiplyByScale=function(t,e,n){return n[0]=t[0]*e.x,n[1]=t[1]*e.x,n[2]=t[2]*e.y,n[3]=t[3]*e.y,n},R.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n},R.negate=function(t,e){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},R.transpose=function(t,e){const n=t[0],a=t[2],u=t[1],r=t[3];return e[0]=n,e[1]=a,e[2]=u,e[3]=r,e},R.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e},R.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},R.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]},R.equalsEpsilon=function(t,e,a){return a=n.defaultValue(a,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=a&&Math.abs(t[1]-e[1])<=a&&Math.abs(t[2]-e[2])<=a&&Math.abs(t[3]-e[3])<=a},R.IDENTITY=Object.freeze(new R(1,0,0,1)),R.ZERO=Object.freeze(new R(0,0,0,0)),R.COLUMN0ROW0=0,R.COLUMN0ROW1=1,R.COLUMN1ROW0=2,R.COLUMN1ROW1=3,Object.defineProperties(R.prototype,{length:{get:function(){return R.packedLength}}}),R.prototype.clone=function(t){return R.clone(this,t)},R.prototype.equals=function(t){return R.equals(this,t)},R.prototype.equalsEpsilon=function(t,e){return R.equalsEpsilon(this,t,e)},R.prototype.toString=function(){return`(${this[0]}, ${this[2]})\n(${this[1]}, ${this[3]})`},t.Cartesian2=U,t.Cartesian4=r,t.Matrix2=R,t.Matrix4=d,t.Rectangle=E}));
public/CIMSDK/Workers/Matrix3-aeb3c326.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./defaultValue-865ac579","./Math-76ce6367"],(function(e,t,n){"use strict";var i={ellipsoidCoordinates:null};function r(e,n,i){this.x=t.defaultValue(e,0),this.y=t.defaultValue(n,0),this.z=t.defaultValue(i,0)}r.fromSpherical=function(e,n){t.defined(n)||(n=new r);const i=e.clock,a=e.cone,o=t.defaultValue(e.magnitude,1),u=o*Math.sin(a);return n.x=u*Math.cos(i),n.y=u*Math.sin(i),n.z=o*Math.cos(a),n},r.fromElements=function(e,n,i,a){return t.defined(a)?(a.x=e,a.y=n,a.z=i,a):new r(e,n,i)},r.clone=function(e,n){if(t.defined(e))return t.defined(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n):new r(e.x,e.y,e.z)},r.fromCartesian4=r.clone,r.packedLength=3,r.pack=function(e,n,i){return i=t.defaultValue(i,0),n[i++]=e.x,n[i++]=e.y,n[i]=e.z,n},r.unpack=function(e,n,i){return n=t.defaultValue(n,0),t.defined(i)||(i=new r),i.x=e[n++],i.y=e[n++],i.z=e[n],i},r.packArray=function(e,n){const i=e.length,a=3*i;t.defined(n)?(Array.isArray(n)||n.length===a)&&n.length!==a&&(n.length=a):n=new Array(a);for(let t=0;t<i;++t)r.pack(e[t],n,3*t);return n},r.unpackArray=function(e,n){const i=e.length;t.defined(n)?n.length=i/3:n=new Array(i/3);for(let t=0;t<i;t+=3){const i=t/3;n[i]=r.unpack(e,t,n[i])}return n},r.fromArray=r.unpack,r.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)},r.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)},r.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n},r.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n},r.clamp=function(e,t,i,r){const a=n.CesiumMath.clamp(e.x,t.x,i.x),o=n.CesiumMath.clamp(e.y,t.y,i.y),u=n.CesiumMath.clamp(e.z,t.z,i.z);return r.x=a,r.y=o,r.z=u,r},r.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z},r.magnitude=function(e){return Math.sqrt(r.magnitudeSquared(e))};const a=new r;r.distance=function(e,t){return r.subtract(e,t,a),r.magnitude(a)},r.distanceSquared=function(e,t){return r.subtract(e,t,a),r.magnitudeSquared(a)},r.normalize=function(e,t){const n=r.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t},r.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},r.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n},r.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n},r.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n},r.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n},r.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n},r.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n},r.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t},r.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};const o=new r;r.lerp=function(e,t,n,i){return r.multiplyByScalar(t,n,o),i=r.multiplyByScalar(e,1-n,i),r.add(o,i,i)};const u=new r,s=new r;r.angleBetween=function(e,t){r.normalize(e,u),r.normalize(t,s);const n=r.dot(u,s),i=r.magnitude(r.cross(u,s,u));return Math.atan2(i,n)};const c=new r;r.mostOrthogonalAxis=function(e,t){const n=r.normalize(e,c);return r.abs(n,n),t=n.x<=n.y?n.x<=n.z?r.clone(r.UNIT_X,t):r.clone(r.UNIT_Z,t):n.y<=n.z?r.clone(r.UNIT_Y,t):r.clone(r.UNIT_Z,t)},r.projectVector=function(e,t,n){const i=r.dot(e,t)/r.dot(t,t);return r.multiplyByScalar(t,i,n)},r.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z},r.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]},r.equalsEpsilon=function(e,i,r,a){return e===i||t.defined(e)&&t.defined(i)&&n.CesiumMath.equalsEpsilon(e.x,i.x,r,a)&&n.CesiumMath.equalsEpsilon(e.y,i.y,r,a)&&n.CesiumMath.equalsEpsilon(e.z,i.z,r,a)},r.cross=function(e,t,n){const i=e.x,r=e.y,a=e.z,o=t.x,u=t.y,s=t.z,c=r*s-a*u,d=a*o-i*s,l=i*u-r*o;return n.x=c,n.y=d,n.z=l,n},r.midpoint=function(e,t,n){return n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),n.z=.5*(e.z+t.z),n},r.fromDegrees=function(e,t,i,a,o){return e=n.CesiumMath.toRadians(e),t=n.CesiumMath.toRadians(t),r.fromRadians(e,t,i,a,o)};let d=new r,l=new r;const f=new r(40680631590769,40680631590769,40408299984661.445);r.fromCGCS2000Degrees=function(e,t,i,a){return e=n.CesiumMath.toRadians(e),t=n.CesiumMath.toRadians(t),r.fromcgcs2000Radians(e,t,i,a)};const h=new r(40680631590769,40680631590769,40408299983328.77);r.fromcgcs2000Radians=function(e,n,i,a){i=t.defaultValue(i,0);const o=h,u=Math.cos(n);d.x=u*Math.cos(e),d.y=u*Math.sin(e),d.z=Math.sin(n),d=r.normalize(d,d),r.multiplyComponents(o,d,l);const s=Math.sqrt(r.dot(d,l));return l=r.divideByScalar(l,s,l),d=r.multiplyByScalar(d,i,d),t.defined(a)||(a=new r),r.add(l,d,a)},d=new r,l=new r;const m=new r(301855876e4,301855876e4,301855876e4);r.fromRadians=function(e,n,a,o,u){a=t.defaultValue(a,0);let s=null;s="CGCS2000"===i.ellipsoidCoordinates?h:"MOON"===i.ellipsoidCoordinates||"MOON2000"===i.ellipsoidCoordinates?m:t.defined(o)?o.radiiSquared:f;const c=Math.cos(n);d.x=c*Math.cos(e),d.y=c*Math.sin(e),d.z=Math.sin(n),d=r.normalize(d,d),r.multiplyComponents(s,d,l);const y=Math.sqrt(r.dot(d,l));return l=r.divideByScalar(l,y,l),d=r.multiplyByScalar(d,a,d),t.defined(u)||(u=new r),r.add(l,d,u)},r.fromDegreesArray=function(e,n,i){const a=e.length;t.defined(i)?i.length=a/2:i=new Array(a/2);for(let t=0;t<a;t+=2){const a=e[t],o=e[t+1],u=t/2;i[u]=r.fromDegrees(a,o,0,n,i[u])}return i},r.fromRadiansArray=function(e,n,i){const a=e.length;t.defined(i)?i.length=a/2:i=new Array(a/2);for(let t=0;t<a;t+=2){const a=e[t],o=e[t+1],u=t/2;i[u]=r.fromRadians(a,o,0,n,i[u])}return i},r.fromDegreesArrayHeights=function(e,n,i){const a=e.length;t.defined(i)?i.length=a/3:i=new Array(a/3);for(let t=0;t<a;t+=3){const a=e[t],o=e[t+1],u=e[t+2],s=t/3;i[s]=r.fromDegrees(a,o,u,n,i[s])}return i},r.fromRadiansArrayHeights=function(e,n,i){const a=e.length;t.defined(i)?i.length=a/3:i=new Array(a/3);for(let t=0;t<a;t+=3){const a=e[t],o=e[t+1],u=e[t+2],s=t/3;i[s]=r.fromRadians(a,o,u,n,i[s])}return i},r.ZERO=Object.freeze(new r(0,0,0)),r.ONE=Object.freeze(new r(1,1,1)),r.UNIT_X=Object.freeze(new r(1,0,0)),r.UNIT_Y=Object.freeze(new r(0,1,0)),r.UNIT_Z=Object.freeze(new r(0,0,1)),r.prototype.clone=function(e){return r.clone(this,e)},r.prototype.equals=function(e){return r.equals(this,e)},r.prototype.equalsEpsilon=function(e,t,n){return r.equalsEpsilon(this,e,t,n)},r.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};const y=new r,p=new r;function g(e,i,a,o,u){const s=e.x,c=e.y,d=e.z,l=i.x,f=i.y,h=i.z,m=s*s*l*l,g=c*c*f*f,x=d*d*h*h,z=m+g+x,M=Math.sqrt(1/z),w=r.multiplyByScalar(e,M,y);if(z<o)return isFinite(M)?r.clone(w,u):void 0;const S=a.x,C=a.y,O=a.z,R=p;R.x=w.x*S*2,R.y=w.y*C*2,R.z=w.z*O*2;let q,_,b,E,T,A,N,v,I,V,U,k=(1-M)*r.magnitude(e)/(.5*r.magnitude(R)),L=0;do{k-=L,b=1/(1+k*S),E=1/(1+k*C),T=1/(1+k*O),A=b*b,N=E*E,v=T*T,I=A*b,V=N*E,U=v*T,q=m*A+g*N+x*v-1,_=m*I*S+g*V*C+x*U*O;L=q/(-2*_)}while(Math.abs(q)>n.CesiumMath.EPSILON12);return t.defined(u)?(u.x=s*b,u.y=c*E,u.z=d*T,u):new r(s*b,c*E,d*T)}function x(e,n,i){this.longitude=t.defaultValue(e,0),this.latitude=t.defaultValue(n,0),this.height=t.defaultValue(i,0)}x.fromRadians=function(e,n,i,r){return i=t.defaultValue(i,0),t.defined(r)?(r.longitude=e,r.latitude=n,r.height=i,r):new x(e,n,i)},x.fromDegrees=function(e,t,i,r){return e=n.CesiumMath.toRadians(e),t=n.CesiumMath.toRadians(t),x.fromRadians(e,t,i,r)};const z=new r,M=new r,w=new r,S=new r(1/6378137,1/6378137,1/6356752.314245179),C=new r(1/40680631590769,1/40680631590769,1/40408299984661.445),O=new r(1/1737400,1/1737400,1/1737400),R=new r(1/301855876e4,1/301855876e4,1/301855876e4),q=new r(1/6378137,1/6378137,1/6356752.314140356),_=new r(1/40680631590769,1/40680631590769,1/40408299983328.77),b=n.CesiumMath.EPSILON1;function E(e,i,a,o){i=t.defaultValue(i,0),a=t.defaultValue(a,0),o=t.defaultValue(o,0),e._radii=new r(i,a,o),e._radiiSquared=new r(i*i,a*a,o*o),e._radiiToTheFourth=new r(i*i*i*i,a*a*a*a,o*o*o*o),e._oneOverRadii=new r(0===i?0:1/i,0===a?0:1/a,0===o?0:1/o),e._oneOverRadiiSquared=new r(0===i?0:1/(i*i),0===a?0:1/(a*a),0===o?0:1/(o*o)),e._minimumRadius=Math.min(i,a,o),e._maximumRadius=Math.max(i,a,o),e._centerToleranceSquared=n.CesiumMath.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function T(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,E(this,e,t,n)}x.fromCartesian=function(e,a,o){let u=null,s=null;const c=t.defined(a)?a._centerToleranceSquared:b;"CGCS2000"===i.ellipsoidCoordinates?(u=q,s=_):"MOON"===i.ellipsoidCoordinates||"MOON2000"===i.ellipsoidCoordinates?(u=O,s=R):(u=t.defined(a)?a.oneOverRadii:S,s=t.defined(a)?a.oneOverRadiiSquared:C);const d=g(e,u,s,c,M);if(!t.defined(d))return;let l=r.multiplyComponents(d,s,z);l=r.normalize(l,l);const f=r.subtract(e,d,w),h=Math.atan2(l.y,l.x),m=Math.asin(l.z),y=n.CesiumMath.sign(r.dot(f,e))*r.magnitude(f);return t.defined(o)?(o.longitude=h,o.latitude=m,o.height=y,o):new x(h,m,y)},x.toCartesian=function(e,t,n){return r.fromRadians(e.longitude,e.latitude,e.height,t,n)},x.clone=function(e,n){if(t.defined(e))return t.defined(n)?(n.longitude=e.longitude,n.latitude=e.latitude,n.height=e.height,n):new x(e.longitude,e.latitude,e.height)},x.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e.longitude===n.longitude&&e.latitude===n.latitude&&e.height===n.height},x.equalsEpsilon=function(e,n,i){return i=t.defaultValue(i,0),e===n||t.defined(e)&&t.defined(n)&&Math.abs(e.longitude-n.longitude)<=i&&Math.abs(e.latitude-n.latitude)<=i&&Math.abs(e.height-n.height)<=i},x.ZERO=Object.freeze(new x(0,0,0)),x.prototype.clone=function(e){return x.clone(this,e)},x.prototype.equals=function(e){return x.equals(this,e)},x.prototype.equalsEpsilon=function(e,t){return x.equalsEpsilon(this,e,t)},x.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`},Object.defineProperties(T.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),T.clone=function(e,n){if(!t.defined(e))return;const i=e._radii;return t.defined(n)?(r.clone(i,n._radii),r.clone(e._radiiSquared,n._radiiSquared),r.clone(e._radiiToTheFourth,n._radiiToTheFourth),r.clone(e._oneOverRadii,n._oneOverRadii),r.clone(e._oneOverRadiiSquared,n._oneOverRadiiSquared),n._minimumRadius=e._minimumRadius,n._maximumRadius=e._maximumRadius,n._centerToleranceSquared=e._centerToleranceSquared,n):new T(i.x,i.y,i.z)},T.fromCartesian3=function(e,n){return t.defined(n)||(n=new T),t.defined(e)?(E(n,e.x,e.y,e.z),n):n},T.WGS84=Object.freeze(new T(6378137,6378137,6356752.314245179)),T.CGCS2000=Object.freeze(new T(6378137,6378137,6356752.314140356)),T.MOON2000=Object.freeze(new T(1737400,1737400,1737400)),T.UNIT_SPHERE=Object.freeze(new T(1,1,1)),T.MOON=Object.freeze(new T(n.CesiumMath.LUNAR_RADIUS,n.CesiumMath.LUNAR_RADIUS,n.CesiumMath.LUNAR_RADIUS)),T.prototype.clone=function(e){return T.clone(this,e)},T.packedLength=r.packedLength,T.pack=function(e,n,i){return i=t.defaultValue(i,0),r.pack(e._radii,n,i),n},T.unpack=function(e,n,i){n=t.defaultValue(n,0);const a=r.unpack(e,n);return T.fromCartesian3(a,i)},T.prototype.geocentricSurfaceNormal=r.normalize,T.prototype.geodeticSurfaceNormalCartographic=function(e,n){const i=e.longitude,a=e.latitude,o=Math.cos(a),u=o*Math.cos(i),s=o*Math.sin(i),c=Math.sin(a);return t.defined(n)||(n=new r),n.x=u,n.y=s,n.z=c,r.normalize(n,n)},T.prototype.geodeticSurfaceNormal=function(e,i){if(!r.equalsEpsilon(e,r.ZERO,n.CesiumMath.EPSILON14))return t.defined(i)||(i=new r),i=r.multiplyComponents(e,this._oneOverRadiiSquared,i),r.normalize(i,i)};const A=new r,N=new r;T.prototype.cartographicToCartesian=function(e,n){const i=A,a=N;this.geodeticSurfaceNormalCartographic(e,i),r.multiplyComponents(this._radiiSquared,i,a);const o=Math.sqrt(r.dot(i,a));return r.divideByScalar(a,o,a),r.multiplyByScalar(i,e.height,i),t.defined(n)||(n=new r),r.add(a,i,n)},T.prototype.cartographicArrayToCartesianArray=function(e,n){const i=e.length;t.defined(n)?n.length=i:n=new Array(i);for(let t=0;t<i;t++)n[t]=this.cartographicToCartesian(e[t],n[t]);return n};const v=new r,I=new r,V=new r;T.prototype.cartesianToCartographic=function(e,i){const a=this.scaleToGeodeticSurface(e,I);if(!t.defined(a))return;const o=this.geodeticSurfaceNormal(a,v),u=r.subtract(e,a,V),s=Math.atan2(o.y,o.x),c=Math.asin(o.z),d=n.CesiumMath.sign(r.dot(u,e))*r.magnitude(u);return t.defined(i)?(i.longitude=s,i.latitude=c,i.height=d,i):new x(s,c,d)},T.prototype.cartesianArrayToCartographicArray=function(e,n){const i=e.length;t.defined(n)?n.length=i:n=new Array(i);for(let t=0;t<i;++t)n[t]=this.cartesianToCartographic(e[t],n[t]);return n},T.prototype.scaleToGeodeticSurface=function(e,t){return g(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},T.prototype.scaleToGeocentricSurface=function(e,n){t.defined(n)||(n=new r);const i=e.x,a=e.y,o=e.z,u=this._oneOverRadiiSquared,s=1/Math.sqrt(i*i*u.x+a*a*u.y+o*o*u.z);return r.multiplyByScalar(e,s,n)},T.prototype.transformPositionToScaledSpace=function(e,n){return t.defined(n)||(n=new r),r.multiplyComponents(e,this._oneOverRadii,n)},T.prototype.transformPositionFromScaledSpace=function(e,n){return t.defined(n)||(n=new r),r.multiplyComponents(e,this._radii,n)},T.prototype.equals=function(e){return this===e||t.defined(e)&&r.equals(this._radii,e._radii)},T.prototype.toString=function(){return this._radii.toString()},T.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,n,i){n=t.defaultValue(n,0);const a=this._squaredXOverSquaredZ;if(t.defined(i)||(i=new r),i.x=0,i.y=0,i.z=e.z*(1-a),!(Math.abs(i.z)>=this._radii.z-n))return i};const U=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],k=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function L(e,t,n){const i=.5*(t+e),r=.5*(t-e);let a=0;for(let e=0;e<5;e++){const t=r*U[e];a+=k[e]*(n(i+t)+n(i-t))}return a*=r,a}function B(e,n,i,r,a,o,u,s,c){this[0]=t.defaultValue(e,0),this[1]=t.defaultValue(r,0),this[2]=t.defaultValue(u,0),this[3]=t.defaultValue(n,0),this[4]=t.defaultValue(a,0),this[5]=t.defaultValue(s,0),this[6]=t.defaultValue(i,0),this[7]=t.defaultValue(o,0),this[8]=t.defaultValue(c,0)}T.prototype.surfaceArea=function(e){const t=e.west;let i=e.east;const r=e.south,a=e.north;for(;i<t;)i+=n.CesiumMath.TWO_PI;const o=this._radiiSquared,u=o.x,s=o.y,c=o.z,d=u*s;return L(r,a,(function(e){const n=Math.cos(e),r=Math.sin(e);return Math.cos(e)*L(t,i,(function(e){const t=Math.cos(e),i=Math.sin(e);return Math.sqrt(d*r*r+c*(s*t*t+u*i*i)*n*n)}))}))},B.packedLength=9,B.pack=function(e,n,i){return i=t.defaultValue(i,0),n[i++]=e[0],n[i++]=e[1],n[i++]=e[2],n[i++]=e[3],n[i++]=e[4],n[i++]=e[5],n[i++]=e[6],n[i++]=e[7],n[i++]=e[8],n},B.unpack=function(e,n,i){return n=t.defaultValue(n,0),t.defined(i)||(i=new B),i[0]=e[n++],i[1]=e[n++],i[2]=e[n++],i[3]=e[n++],i[4]=e[n++],i[5]=e[n++],i[6]=e[n++],i[7]=e[n++],i[8]=e[n++],i},B.packArray=function(e,n){const i=e.length,r=9*i;t.defined(n)?(Array.isArray(n)||n.length===r)&&n.length!==r&&(n.length=r):n=new Array(r);for(let t=0;t<i;++t)B.pack(e[t],n,9*t);return n},B.unpackArray=function(e,n){const i=e.length;t.defined(n)?n.length=i/9:n=new Array(i/9);for(let t=0;t<i;t+=9){const i=t/9;n[i]=B.unpack(e,t,n[i])}return n},B.clone=function(e,n){if(t.defined(e))return t.defined(n)?(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[6]=e[6],n[7]=e[7],n[8]=e[8],n):new B(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},B.fromArray=B.unpack,B.fromColumnMajorArray=function(e,t){return B.clone(e,t)},B.fromRowMajorArray=function(e,n){return t.defined(n)?(n[0]=e[0],n[1]=e[3],n[2]=e[6],n[3]=e[1],n[4]=e[4],n[5]=e[7],n[6]=e[2],n[7]=e[5],n[8]=e[8],n):new B(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},B.fromQuaternion=function(e,n){const i=e.x*e.x,r=e.x*e.y,a=e.x*e.z,o=e.x*e.w,u=e.y*e.y,s=e.y*e.z,c=e.y*e.w,d=e.z*e.z,l=e.z*e.w,f=e.w*e.w,h=i-u-d+f,m=2*(r-l),y=2*(a+c),p=2*(r+l),g=-i+u-d+f,x=2*(s-o),z=2*(a-c),M=2*(s+o),w=-i-u+d+f;return t.defined(n)?(n[0]=h,n[1]=p,n[2]=z,n[3]=m,n[4]=g,n[5]=M,n[6]=y,n[7]=x,n[8]=w,n):new B(h,m,y,p,g,x,z,M,w)},B.fromHeadingPitchRoll=function(e,n){const i=Math.cos(-e.pitch),r=Math.cos(-e.heading),a=Math.cos(e.roll),o=Math.sin(-e.pitch),u=Math.sin(-e.heading),s=Math.sin(e.roll),c=i*r,d=-a*u+s*o*r,l=s*u+a*o*r,f=i*u,h=a*r+s*o*u,m=-s*r+a*o*u,y=-o,p=s*i,g=a*i;return t.defined(n)?(n[0]=c,n[1]=f,n[2]=y,n[3]=d,n[4]=h,n[5]=p,n[6]=l,n[7]=m,n[8]=g,n):new B(c,d,l,f,h,m,y,p,g)},B.fromScale=function(e,n){return t.defined(n)?(n[0]=e.x,n[1]=0,n[2]=0,n[3]=0,n[4]=e.y,n[5]=0,n[6]=0,n[7]=0,n[8]=e.z,n):new B(e.x,0,0,0,e.y,0,0,0,e.z)},B.fromUniformScale=function(e,n){return t.defined(n)?(n[0]=e,n[1]=0,n[2]=0,n[3]=0,n[4]=e,n[5]=0,n[6]=0,n[7]=0,n[8]=e,n):new B(e,0,0,0,e,0,0,0,e)},B.fromCrossProduct=function(e,n){return t.defined(n)?(n[0]=0,n[1]=e.z,n[2]=-e.y,n[3]=-e.z,n[4]=0,n[5]=e.x,n[6]=e.y,n[7]=-e.x,n[8]=0,n):new B(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},B.fromRotationX=function(e,n){const i=Math.cos(e),r=Math.sin(e);return t.defined(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=i,n[5]=r,n[6]=0,n[7]=-r,n[8]=i,n):new B(1,0,0,0,i,-r,0,r,i)},B.fromRotationY=function(e,n){const i=Math.cos(e),r=Math.sin(e);return t.defined(n)?(n[0]=i,n[1]=0,n[2]=-r,n[3]=0,n[4]=1,n[5]=0,n[6]=r,n[7]=0,n[8]=i,n):new B(i,0,r,0,1,0,-r,0,i)},B.fromRotationZ=function(e,n){const i=Math.cos(e),r=Math.sin(e);return t.defined(n)?(n[0]=i,n[1]=r,n[2]=0,n[3]=-r,n[4]=i,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new B(i,-r,0,r,i,0,0,0,1)},B.toArray=function(e,n){return t.defined(n)?(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[6]=e[6],n[7]=e[7],n[8]=e[8],n):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},B.getElementIndex=function(e,t){return 3*e+t},B.getColumn=function(e,t,n){const i=3*t,r=e[i],a=e[i+1],o=e[i+2];return n.x=r,n.y=a,n.z=o,n},B.setColumn=function(e,t,n,i){const r=3*t;return(i=B.clone(e,i))[r]=n.x,i[r+1]=n.y,i[r+2]=n.z,i},B.getRow=function(e,t,n){const i=e[t],r=e[t+3],a=e[t+6];return n.x=i,n.y=r,n.z=a,n},B.setRow=function(e,t,n,i){return(i=B.clone(e,i))[t]=n.x,i[t+3]=n.y,i[t+6]=n.z,i};const j=new r;B.setScale=function(e,t,n){const i=B.getScale(e,j),r=t.x/i.x,a=t.y/i.y,o=t.z/i.z;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=e[3]*a,n[4]=e[4]*a,n[5]=e[5]*a,n[6]=e[6]*o,n[7]=e[7]*o,n[8]=e[8]*o,n};const $=new r;B.setUniformScale=function(e,t,n){const i=B.getScale(e,$),r=t/i.x,a=t/i.y,o=t/i.z;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=e[3]*a,n[4]=e[4]*a,n[5]=e[5]*a,n[6]=e[6]*o,n[7]=e[7]*o,n[8]=e[8]*o,n};const D=new r;B.getScale=function(e,t){return t.x=r.magnitude(r.fromElements(e[0],e[1],e[2],D)),t.y=r.magnitude(r.fromElements(e[3],e[4],e[5],D)),t.z=r.magnitude(r.fromElements(e[6],e[7],e[8],D)),t};const P=new r;B.getMaximumScale=function(e){return B.getScale(e,P),r.maximumComponent(P)};const W=new r;B.setRotation=function(e,t,n){const i=B.getScale(e,W);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=t[3]*i.y,n[4]=t[4]*i.y,n[5]=t[5]*i.y,n[6]=t[6]*i.z,n[7]=t[7]*i.z,n[8]=t[8]*i.z,n};const Z=new r;B.getRotation=function(e,t){const n=B.getScale(e,Z);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t},B.multiply=function(e,t,n){const i=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],r=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],a=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],o=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],u=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],s=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],c=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],d=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],l=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=i,n[1]=r,n[2]=a,n[3]=o,n[4]=u,n[5]=s,n[6]=c,n[7]=d,n[8]=l,n},B.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n},B.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n},B.multiplyByVector=function(e,t,n){const i=t.x,r=t.y,a=t.z,o=e[0]*i+e[3]*r+e[6]*a,u=e[1]*i+e[4]*r+e[7]*a,s=e[2]*i+e[5]*r+e[8]*a;return n.x=o,n.y=u,n.z=s,n},B.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},B.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n},B.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},B.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},B.transpose=function(e,t){const n=e[0],i=e[3],r=e[6],a=e[1],o=e[4],u=e[7],s=e[2],c=e[5],d=e[8];return t[0]=n,t[1]=i,t[2]=r,t[3]=a,t[4]=o,t[5]=u,t[6]=s,t[7]=c,t[8]=d,t};const F=[1,0,0],G=[2,2,1];function X(e){let t=0;for(let n=0;n<3;++n){const i=e[B.getElementIndex(G[n],F[n])];t+=2*i*i}return Math.sqrt(t)}function Y(e,t){const i=n.CesiumMath.EPSILON15;let r=0,a=1;for(let t=0;t<3;++t){const n=Math.abs(e[B.getElementIndex(G[t],F[t])]);n>r&&(a=t,r=n)}let o=1,u=0;const s=F[a],c=G[a];if(Math.abs(e[B.getElementIndex(c,s)])>i){const t=(e[B.getElementIndex(c,c)]-e[B.getElementIndex(s,s)])/2/e[B.getElementIndex(c,s)];let n;n=t<0?-1/(-t+Math.sqrt(1+t*t)):1/(t+Math.sqrt(1+t*t)),o=1/Math.sqrt(1+n*n),u=n*o}return(t=B.clone(B.IDENTITY,t))[B.getElementIndex(s,s)]=t[B.getElementIndex(c,c)]=o,t[B.getElementIndex(c,s)]=u,t[B.getElementIndex(s,c)]=-u,t}const H=new B,Q=new B;B.computeEigenDecomposition=function(e,i){const r=n.CesiumMath.EPSILON20;let a=0,o=0;t.defined(i)||(i={});const u=i.unitary=B.clone(B.IDENTITY,i.unitary),s=i.diagonal=B.clone(e,i.diagonal),c=r*function(e){let t=0;for(let n=0;n<9;++n){const i=e[n];t+=i*i}return Math.sqrt(t)}(s);for(;o<10&&X(s)>c;)Y(s,H),B.transpose(H,Q),B.multiply(s,H,s),B.multiply(Q,s,s),B.multiply(u,H,u),++a>2&&(++o,a=0);return i},B.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},B.determinant=function(e){const t=e[0],n=e[3],i=e[6],r=e[1],a=e[4],o=e[7],u=e[2],s=e[5],c=e[8];return t*(a*c-s*o)+r*(s*i-n*c)+u*(n*o-a*i)},B.inverse=function(e,t){const n=e[0],i=e[1],r=e[2],a=e[3],o=e[4],u=e[5],s=e[6],c=e[7],d=e[8],l=B.determinant(e);t[0]=o*d-c*u,t[1]=c*r-i*d,t[2]=i*u-o*r,t[3]=s*u-a*d,t[4]=n*d-s*r,t[5]=a*r-n*u,t[6]=a*c-s*o,t[7]=s*i-n*c,t[8]=n*o-a*i;const f=1/l;return B.multiplyByScalar(t,f,t)};const J=new B;B.inverseTranspose=function(e,t){return B.inverse(B.transpose(e,J),t)},B.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[3]===n[3]&&e[4]===n[4]&&e[5]===n[5]&&e[6]===n[6]&&e[7]===n[7]&&e[8]===n[8]},B.equalsEpsilon=function(e,n,i){return i=t.defaultValue(i,0),e===n||t.defined(e)&&t.defined(n)&&Math.abs(e[0]-n[0])<=i&&Math.abs(e[1]-n[1])<=i&&Math.abs(e[2]-n[2])<=i&&Math.abs(e[3]-n[3])<=i&&Math.abs(e[4]-n[4])<=i&&Math.abs(e[5]-n[5])<=i&&Math.abs(e[6]-n[6])<=i&&Math.abs(e[7]-n[7])<=i&&Math.abs(e[8]-n[8])<=i},B.IDENTITY=Object.freeze(new B(1,0,0,0,1,0,0,0,1)),B.ZERO=Object.freeze(new B(0,0,0,0,0,0,0,0,0)),B.COLUMN0ROW0=0,B.COLUMN0ROW1=1,B.COLUMN0ROW2=2,B.COLUMN1ROW0=3,B.COLUMN1ROW1=4,B.COLUMN1ROW2=5,B.COLUMN2ROW0=6,B.COLUMN2ROW1=7,B.COLUMN2ROW2=8,Object.defineProperties(B.prototype,{length:{get:function(){return B.packedLength}}}),B.prototype.clone=function(e){return B.clone(this,e)},B.prototype.equals=function(e){return B.equals(this,e)},B.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]},B.prototype.equalsEpsilon=function(e,t){return B.equalsEpsilon(this,e,t)},B.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`},e.Cartesian3=r,e.Cartographic=x,e.Ellipsoid=T,e.Matrix3=B}));
public/CIMSDK/Workers/OrientedBoundingBox-34fc6856.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./defaultValue-865ac579","./EllipsoidTangentPlane-a9681249","./Math-76ce6367","./Plane-fbab0ca2"],(function(a,t,e,n,r,i,s,o){"use strict";function c(a,t){this.center=n.Cartesian3.clone(r.defaultValue(a,n.Cartesian3.ZERO)),this.halfAxes=n.Matrix3.clone(r.defaultValue(t,n.Matrix3.ZERO))}c.packedLength=n.Cartesian3.packedLength+n.Matrix3.packedLength,c.pack=function(a,t,e){return e=r.defaultValue(e,0),n.Cartesian3.pack(a.center,t,e),n.Matrix3.pack(a.halfAxes,t,e+n.Cartesian3.packedLength),t},c.unpack=function(a,t,e){return t=r.defaultValue(t,0),r.defined(e)||(e=new c),n.Cartesian3.unpack(a,t,e.center),n.Matrix3.unpack(a,t+n.Cartesian3.packedLength,e.halfAxes),e};const C=new n.Cartesian3,u=new n.Cartesian3,l=new n.Cartesian3,d=new n.Cartesian3,h=new n.Cartesian3,x=new n.Cartesian3,m=new n.Matrix3,M={unitary:new n.Matrix3,diagonal:new n.Matrix3};c.fromPoints=function(a,t){if(r.defined(t)||(t=new c),!r.defined(a)||0===a.length)return t.halfAxes=n.Matrix3.ZERO,t.center=n.Cartesian3.ZERO,t;let e;const i=a.length,s=n.Cartesian3.clone(a[0],C);for(e=1;e<i;e++)n.Cartesian3.add(s,a[e],s);const o=1/i;n.Cartesian3.multiplyByScalar(s,o,s);let f,p=0,w=0,g=0,y=0,b=0,N=0;for(e=0;e<i;e++)f=n.Cartesian3.subtract(a[e],s,u),p+=f.x*f.x,w+=f.x*f.y,g+=f.x*f.z,y+=f.y*f.y,b+=f.y*f.z,N+=f.z*f.z;p*=o,w*=o,g*=o,y*=o,b*=o,N*=o;const T=m;T[0]=p,T[1]=w,T[2]=g,T[3]=w,T[4]=y,T[5]=b,T[6]=g,T[7]=b,T[8]=N;const O=n.Matrix3.computeEigenDecomposition(T,M),A=n.Matrix3.clone(O.unitary,t.halfAxes);let P=n.Matrix3.getColumn(A,0,d),I=n.Matrix3.getColumn(A,1,h),R=n.Matrix3.getColumn(A,2,x),E=-Number.MAX_VALUE,S=-Number.MAX_VALUE,U=-Number.MAX_VALUE,L=Number.MAX_VALUE,z=Number.MAX_VALUE,B=Number.MAX_VALUE;for(e=0;e<i;e++)f=a[e],E=Math.max(n.Cartesian3.dot(P,f),E),S=Math.max(n.Cartesian3.dot(I,f),S),U=Math.max(n.Cartesian3.dot(R,f),U),L=Math.min(n.Cartesian3.dot(P,f),L),z=Math.min(n.Cartesian3.dot(I,f),z),B=Math.min(n.Cartesian3.dot(R,f),B);P=n.Cartesian3.multiplyByScalar(P,.5*(L+E),P),I=n.Cartesian3.multiplyByScalar(I,.5*(z+S),I),R=n.Cartesian3.multiplyByScalar(R,.5*(B+U),R);const V=n.Cartesian3.add(P,I,t.center);n.Cartesian3.add(V,R,V);const _=l;return _.x=E-L,_.y=S-z,_.z=U-B,n.Cartesian3.multiplyByScalar(_,.5,_),n.Matrix3.multiplyByScale(t.halfAxes,_,t.halfAxes),t};const f=new n.Cartesian3,p=new n.Cartesian3;function w(a,t,e,i,s,o,C,u,l,d,h){r.defined(h)||(h=new c);const x=h.halfAxes;n.Matrix3.setColumn(x,0,t,x),n.Matrix3.setColumn(x,1,e,x),n.Matrix3.setColumn(x,2,i,x);let m=f;m.x=(s+o)/2,m.y=(C+u)/2,m.z=(l+d)/2;const M=p;M.x=(o-s)/2,M.y=(u-C)/2,M.z=(d-l)/2;const w=h.center;return m=n.Matrix3.multiplyByVector(x,m,m),n.Cartesian3.add(a,m,w),n.Matrix3.multiplyByScale(x,M,x),h}const g=new n.Cartographic,y=new n.Cartesian3,b=new n.Cartographic,N=new n.Cartographic,T=new n.Cartographic,O=new n.Cartographic,A=new n.Cartographic,P=new n.Cartesian3,I=new n.Cartesian3,R=new n.Cartesian3,E=new n.Cartesian3,S=new n.Cartesian3,U=new e.Cartesian2,L=new e.Cartesian2,z=new e.Cartesian2,B=new e.Cartesian2,V=new e.Cartesian2,_=new n.Cartesian3,k=new n.Cartesian3,W=new n.Cartesian3,X=new n.Cartesian3,q=new e.Cartesian2,D=new n.Cartesian3,j=new n.Cartesian3,Z=new n.Cartesian3,v=new o.Plane(n.Cartesian3.UNIT_X,0);c.fromRectangle=function(a,t,c,C,u){let l,d,h,x,m,M,f;if(t=r.defaultValue(t,0),c=r.defaultValue(c,0),C=r.defaultValue(C,n.Ellipsoid.WGS84),a.width<=s.CesiumMath.PI){const r=e.Rectangle.center(a,g),s=C.cartographicToCartesian(r,y),p=new i.EllipsoidTangentPlane(s,C);f=p.plane;const _=r.longitude,k=a.south<0&&a.north>0?0:r.latitude,W=n.Cartographic.fromRadians(_,a.north,c,b),X=n.Cartographic.fromRadians(a.west,a.north,c,N),q=n.Cartographic.fromRadians(a.west,k,c,T),D=n.Cartographic.fromRadians(a.west,a.south,c,O),j=n.Cartographic.fromRadians(_,a.south,c,A),Z=C.cartographicToCartesian(W,P);let v=C.cartographicToCartesian(X,I);const Y=C.cartographicToCartesian(q,R);let G=C.cartographicToCartesian(D,E);const F=C.cartographicToCartesian(j,S),H=p.projectPointToNearestOnPlane(Z,U),J=p.projectPointToNearestOnPlane(v,L),K=p.projectPointToNearestOnPlane(Y,z),Q=p.projectPointToNearestOnPlane(G,B),$=p.projectPointToNearestOnPlane(F,V);return l=Math.min(J.x,K.x,Q.x),d=-l,x=Math.max(J.y,H.y),h=Math.min(Q.y,$.y),X.height=D.height=t,v=C.cartographicToCartesian(X,I),G=C.cartographicToCartesian(D,E),m=Math.min(o.Plane.getPointDistance(f,v),o.Plane.getPointDistance(f,G)),M=c,w(p.origin,p.xAxis,p.yAxis,p.zAxis,l,d,h,x,m,M,u)}const p=a.south>0,Y=a.north<0,G=p?a.south:Y?a.north:0,F=e.Rectangle.center(a,g).longitude,H=n.Cartesian3.fromRadians(F,G,c,C,_);H.z=0;const J=Math.abs(H.x)<s.CesiumMath.EPSILON10&&Math.abs(H.y)<s.CesiumMath.EPSILON10?n.Cartesian3.UNIT_X:n.Cartesian3.normalize(H,k),K=n.Cartesian3.UNIT_Z,Q=n.Cartesian3.cross(J,K,W);f=o.Plane.fromPointNormal(H,J,v);const $=n.Cartesian3.fromRadians(F+s.CesiumMath.PI_OVER_TWO,G,c,C,X);d=n.Cartesian3.dot(o.Plane.projectPointOntoPlane(f,$,q),Q),l=-d,x=n.Cartesian3.fromRadians(0,a.north,Y?t:c,C,D).z,h=n.Cartesian3.fromRadians(0,a.south,p?t:c,C,j).z;const aa=n.Cartesian3.fromRadians(a.east,G,c,C,Z);return m=o.Plane.getPointDistance(f,aa),M=0,w(H,Q,K,J,l,d,h,x,m,M,u)},c.fromTransformation=function(a,t){return r.defined(t)||(t=new c),t.center=e.Matrix4.getTranslation(a,t.center),t.halfAxes=e.Matrix4.getMatrix3(a,t.halfAxes),t.halfAxes=n.Matrix3.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t},c.clone=function(a,t){if(r.defined(a))return r.defined(t)?(n.Cartesian3.clone(a.center,t.center),n.Matrix3.clone(a.halfAxes,t.halfAxes),t):new c(a.center,a.halfAxes)},c.intersectPlane=function(a,e){const r=a.center,i=e.normal,s=a.halfAxes,o=i.x,c=i.y,C=i.z,u=Math.abs(o*s[n.Matrix3.COLUMN0ROW0]+c*s[n.Matrix3.COLUMN0ROW1]+C*s[n.Matrix3.COLUMN0ROW2])+Math.abs(o*s[n.Matrix3.COLUMN1ROW0]+c*s[n.Matrix3.COLUMN1ROW1]+C*s[n.Matrix3.COLUMN1ROW2])+Math.abs(o*s[n.Matrix3.COLUMN2ROW0]+c*s[n.Matrix3.COLUMN2ROW1]+C*s[n.Matrix3.COLUMN2ROW2]),l=n.Cartesian3.dot(i,r)+e.distance;return l<=-u?t.Intersect.OUTSIDE:l>=u?t.Intersect.INSIDE:t.Intersect.INTERSECTING};const Y=new n.Cartesian3,G=new n.Cartesian3,F=new n.Cartesian3,H=new n.Cartesian3,J=new n.Cartesian3,K=new n.Cartesian3;c.distanceSquaredTo=function(a,t){const e=n.Cartesian3.subtract(t,a.center,f),r=a.halfAxes;let i=n.Matrix3.getColumn(r,0,Y),o=n.Matrix3.getColumn(r,1,G),c=n.Matrix3.getColumn(r,2,F);const C=n.Cartesian3.magnitude(i),u=n.Cartesian3.magnitude(o),l=n.Cartesian3.magnitude(c);let d=!0,h=!0,x=!0;C>0?n.Cartesian3.divideByScalar(i,C,i):d=!1,u>0?n.Cartesian3.divideByScalar(o,u,o):h=!1,l>0?n.Cartesian3.divideByScalar(c,l,c):x=!1;const m=!d+!h+!x;let M,p,w;if(1===m){let a=i;M=o,p=c,h?x||(a=c,p=i):(a=o,M=i),w=n.Cartesian3.cross(M,p,J),a===i?i=w:a===o?o=w:a===c&&(c=w)}else if(2===m){M=i,h?M=o:x&&(M=c);let a=n.Cartesian3.UNIT_Y;a.equalsEpsilon(M,s.CesiumMath.EPSILON3)&&(a=n.Cartesian3.UNIT_X),p=n.Cartesian3.cross(M,a,H),n.Cartesian3.normalize(p,p),w=n.Cartesian3.cross(M,p,J),n.Cartesian3.normalize(w,w),M===i?(o=p,c=w):M===o?(c=p,i=w):M===c&&(i=p,o=w)}else 3===m&&(i=n.Cartesian3.UNIT_X,o=n.Cartesian3.UNIT_Y,c=n.Cartesian3.UNIT_Z);const g=K;g.x=n.Cartesian3.dot(e,i),g.y=n.Cartesian3.dot(e,o),g.z=n.Cartesian3.dot(e,c);let y,b=0;return g.x<-C?(y=g.x+C,b+=y*y):g.x>C&&(y=g.x-C,b+=y*y),g.y<-u?(y=g.y+u,b+=y*y):g.y>u&&(y=g.y-u,b+=y*y),g.z<-l?(y=g.z+l,b+=y*y):g.z>l&&(y=g.z-l,b+=y*y),b};const Q=new n.Cartesian3,$=new n.Cartesian3;c.computePlaneDistances=function(a,e,i,s){r.defined(s)||(s=new t.Interval);let o=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;const C=a.center,u=a.halfAxes,l=n.Matrix3.getColumn(u,0,Y),d=n.Matrix3.getColumn(u,1,G),h=n.Matrix3.getColumn(u,2,F),x=n.Cartesian3.add(l,d,Q);n.Cartesian3.add(x,h,x),n.Cartesian3.add(x,C,x);const m=n.Cartesian3.subtract(x,e,$);let M=n.Cartesian3.dot(i,m);return o=Math.min(M,o),c=Math.max(M,c),n.Cartesian3.add(C,l,x),n.Cartesian3.add(x,d,x),n.Cartesian3.subtract(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),c=Math.max(M,c),n.Cartesian3.add(C,l,x),n.Cartesian3.subtract(x,d,x),n.Cartesian3.add(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),c=Math.max(M,c),n.Cartesian3.add(C,l,x),n.Cartesian3.subtract(x,d,x),n.Cartesian3.subtract(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),c=Math.max(M,c),n.Cartesian3.subtract(C,l,x),n.Cartesian3.add(x,d,x),n.Cartesian3.add(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),c=Math.max(M,c),n.Cartesian3.subtract(C,l,x),n.Cartesian3.add(x,d,x),n.Cartesian3.subtract(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),c=Math.max(M,c),n.Cartesian3.subtract(C,l,x),n.Cartesian3.subtract(x,d,x),n.Cartesian3.add(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),c=Math.max(M,c),n.Cartesian3.subtract(C,l,x),n.Cartesian3.subtract(x,d,x),n.Cartesian3.subtract(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),c=Math.max(M,c),s.start=o,s.stop=c,s};const aa=new n.Cartesian3,ta=new n.Cartesian3,ea=new n.Cartesian3;c.computeCorners=function(a,t){r.defined(t)||(t=[new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3]);const e=a.center,i=a.halfAxes,s=n.Matrix3.getColumn(i,0,aa),o=n.Matrix3.getColumn(i,1,ta),c=n.Matrix3.getColumn(i,2,ea);return n.Cartesian3.clone(e,t[0]),n.Cartesian3.subtract(t[0],s,t[0]),n.Cartesian3.subtract(t[0],o,t[0]),n.Cartesian3.subtract(t[0],c,t[0]),n.Cartesian3.clone(e,t[1]),n.Cartesian3.subtract(t[1],s,t[1]),n.Cartesian3.subtract(t[1],o,t[1]),n.Cartesian3.add(t[1],c,t[1]),n.Cartesian3.clone(e,t[2]),n.Cartesian3.subtract(t[2],s,t[2]),n.Cartesian3.add(t[2],o,t[2]),n.Cartesian3.subtract(t[2],c,t[2]),n.Cartesian3.clone(e,t[3]),n.Cartesian3.subtract(t[3],s,t[3]),n.Cartesian3.add(t[3],o,t[3]),n.Cartesian3.add(t[3],c,t[3]),n.Cartesian3.clone(e,t[4]),n.Cartesian3.add(t[4],s,t[4]),n.Cartesian3.subtract(t[4],o,t[4]),n.Cartesian3.subtract(t[4],c,t[4]),n.Cartesian3.clone(e,t[5]),n.Cartesian3.add(t[5],s,t[5]),n.Cartesian3.subtract(t[5],o,t[5]),n.Cartesian3.add(t[5],c,t[5]),n.Cartesian3.clone(e,t[6]),n.Cartesian3.add(t[6],s,t[6]),n.Cartesian3.add(t[6],o,t[6]),n.Cartesian3.subtract(t[6],c,t[6]),n.Cartesian3.clone(e,t[7]),n.Cartesian3.add(t[7],s,t[7]),n.Cartesian3.add(t[7],o,t[7]),n.Cartesian3.add(t[7],c,t[7]),t};const na=new n.Matrix3;c.computeTransformation=function(a,t){r.defined(t)||(t=new e.Matrix4);const i=a.center,s=n.Matrix3.multiplyByUniformScale(a.halfAxes,2,na);return e.Matrix4.fromRotationTranslation(s,i,t)};const ra=new t.BoundingSphere;c.isOccluded=function(a,e){const n=t.BoundingSphere.fromOrientedBoundingBox(a,ra);return!e.isBoundingSphereVisible(n)},c.prototype.intersectPlane=function(a){return c.intersectPlane(this,a)},c.prototype.distanceSquaredTo=function(a){return c.distanceSquaredTo(this,a)},c.prototype.computePlaneDistances=function(a,t,e){return c.computePlaneDistances(this,a,t,e)},c.prototype.computeCorners=function(a){return c.computeCorners(this,a)},c.prototype.computeTransformation=function(a){return c.computeTransformation(this,a)},c.prototype.isOccluded=function(a){return c.isOccluded(this,a)},c.equals=function(a,t){return a===t||r.defined(a)&&r.defined(t)&&n.Cartesian3.equals(a.center,t.center)&&n.Matrix3.equals(a.halfAxes,t.halfAxes)},c.prototype.clone=function(a){return c.clone(this,a)},c.prototype.equals=function(a){return c.equals(this,a)},a.OrientedBoundingBox=c}));
public/CIMSDK/Workers/Plane-fbab0ca2.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./Matrix2-2fdcdec7","./defaultValue-865ac579"],(function(n,e,a,t){"use strict";function r(n,a){this.normal=e.Cartesian3.clone(n),this.distance=a}r.fromPointNormal=function(n,a,i){const s=-e.Cartesian3.dot(a,n);return t.defined(i)?(e.Cartesian3.clone(a,i.normal),i.distance=s,i):new r(a,s)};const i=new e.Cartesian3;r.fromCartesian4=function(n,a){const s=e.Cartesian3.fromCartesian4(n,i),o=n.w;return t.defined(a)?(e.Cartesian3.clone(s,a.normal),a.distance=o,a):new r(s,o)},r.getPointDistance=function(n,a){return e.Cartesian3.dot(n.normal,a)+n.distance};const s=new e.Cartesian3;r.projectPointOntoPlane=function(n,a,i){t.defined(i)||(i=new e.Cartesian3);const o=r.getPointDistance(n,a),c=e.Cartesian3.multiplyByScalar(n.normal,o,s);return e.Cartesian3.subtract(a,c,i)};const o=new a.Matrix4,c=new a.Cartesian4,l=new e.Cartesian3;r.transform=function(n,t,i){const s=n.normal,d=n.distance,f=a.Matrix4.inverseTranspose(t,o);let C=a.Cartesian4.fromElements(s.x,s.y,s.z,d,c);C=a.Matrix4.multiplyByVector(f,C,C);const u=e.Cartesian3.fromCartesian4(C,l);return C=a.Cartesian4.divideByScalar(C,e.Cartesian3.magnitude(u),C),r.fromCartesian4(C,i)},r.clone=function(n,a){return t.defined(a)?(e.Cartesian3.clone(n.normal,a.normal),a.distance=n.distance,a):new r(n.normal,n.distance)},r.equals=function(n,a){return n.distance===a.distance&&e.Cartesian3.equals(n.normal,a.normal)},r.ORIGIN_XY_PLANE=Object.freeze(new r(e.Cartesian3.UNIT_Z,0)),r.ORIGIN_YZ_PLANE=Object.freeze(new r(e.Cartesian3.UNIT_X,0)),r.ORIGIN_ZX_PLANE=Object.freeze(new r(e.Cartesian3.UNIT_Y,0)),n.Plane=r}));
public/CIMSDK/Workers/PolygonGeometryLibrary-9908e46b.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./ArcType-68098157","./arrayRemoveDuplicates-398390b2","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./EllipsoidRhumbLine-2cf9c5ef","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryPipeline-a349886f","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-8efb7487","./Transforms-221c7c82"],(function(e,t,n,i,o,r,a,s,c,l,u,h,p,d,f){"use strict";function y(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(y.prototype,{length:{get:function(){return this._length}}}),y.prototype.enqueue=function(e){this._array.push(e),this._length++},y.prototype.dequeue=function(){if(0===this._length)return;const e=this._array;let t=this._offset;const n=e[t];return e[t]=void 0,t++,t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n},y.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},y.prototype.contains=function(e){return-1!==this._array.indexOf(e)},y.prototype.clear=function(){this._array.length=this._offset=this._length=0},y.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};const g={computeHierarchyPackedLength:function(e,t){let n=0;const i=[e];for(;i.length>0;){const e=i.pop();if(!a.defined(e))continue;n+=2;const o=e.positions,r=e.holes;if(a.defined(o)&&o.length>0&&(n+=o.length*t.packedLength),a.defined(r)){const e=r.length;for(let t=0;t<e;++t)i.push(r[t])}}return n},packPolygonHierarchy:function(e,t,n,i){const o=[e];for(;o.length>0;){const e=o.pop();if(!a.defined(e))continue;const r=e.positions,s=e.holes;if(t[n++]=a.defined(r)?r.length:0,t[n++]=a.defined(s)?s.length:0,a.defined(r)){const e=r.length;for(let o=0;o<e;++o,n+=i.packedLength)i.pack(r[o],t,n)}if(a.defined(s)){const e=s.length;for(let t=0;t<e;++t)o.push(s[t])}}return n},unpackPolygonHierarchy:function(e,t,n){const i=e[t++],o=e[t++],r=new Array(i),a=o>0?new Array(o):void 0;for(let o=0;o<i;++o,t+=n.packedLength)r[o]=n.unpack(e,t);for(let i=0;i<o;++i)a[i]=g.unpackPolygonHierarchy(e,t,n),t=a[i].startingIndex,delete a[i].startingIndex;return{positions:r,holes:a,startingIndex:t}}},m=new i.Cartesian2;function C(e,t,n,o){return i.Cartesian2.subtract(t,e,m),i.Cartesian2.multiplyByScalar(m,n/o,m),i.Cartesian2.add(e,m,m),[m.x,m.y]}const b=new o.Cartesian3;function x(e,t,n,i){return o.Cartesian3.subtract(t,e,b),o.Cartesian3.multiplyByScalar(b,n/i,b),o.Cartesian3.add(e,b,b),[b.x,b.y,b.z]}g.subdivideLineCount=function(e,t,n){const i=o.Cartesian3.distance(e,t)/n,r=Math.max(0,Math.ceil(p.CesiumMath.log2(i)));return Math.pow(2,r)};const T=new o.Cartographic,v=new o.Cartographic,w=new o.Cartographic,A=new o.Cartesian3,L=new s.EllipsoidRhumbLine;g.subdivideRhumbLineCount=function(e,t,n,i){const o=e.cartesianToCartographic(t,T),r=e.cartesianToCartographic(n,v),a=new s.EllipsoidRhumbLine(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(p.CesiumMath.log2(a)));return Math.pow(2,c)},g.subdivideTexcoordLine=function(e,t,n,o,r,a){const s=g.subdivideLineCount(n,o,r),c=i.Cartesian2.distance(e,t),l=c/s,u=a;u.length=2*s;let h=0;for(let n=0;n<s;n++){const i=C(e,t,n*l,c);u[h++]=i[0],u[h++]=i[1]}return u},g.subdivideLine=function(e,t,n,i){const r=g.subdivideLineCount(e,t,n),s=o.Cartesian3.distance(e,t),c=s/r;a.defined(i)||(i=[]);const l=i;l.length=3*r;let u=0;for(let n=0;n<r;n++){const i=x(e,t,n*c,s);l[u++]=i[0],l[u++]=i[1],l[u++]=i[2]}return l},g.subdivideTexcoordRhumbLine=function(e,t,n,o,r,a,s){const c=n.cartesianToCartographic(o,T),l=n.cartesianToCartographic(r,v);L.setEndPoints(c,l);const u=L.surfaceDistance/a,h=Math.max(0,Math.ceil(p.CesiumMath.log2(u))),d=Math.pow(2,h),f=i.Cartesian2.distance(e,t),y=f/d,g=s;g.length=2*d;let m=0;for(let n=0;n<d;n++){const i=C(e,t,n*y,f);g[m++]=i[0],g[m++]=i[1]}return g},g.subdivideRhumbLine=function(e,t,n,i,o){const r=e.cartesianToCartographic(t,T),c=e.cartesianToCartographic(n,v),l=new s.EllipsoidRhumbLine(r,c,e),u=l.surfaceDistance/i,h=Math.max(0,Math.ceil(p.CesiumMath.log2(u))),d=Math.pow(2,h),f=l.surfaceDistance/d;a.defined(o)||(o=[]);const y=o;y.length=3*d;let g=0;for(let t=0;t<d;t++){const n=l.interpolateUsingSurfaceDistance(t*f,w),i=e.cartographicToCartesian(n,A);y[g++]=i.x,y[g++]=i.y,y[g++]=i.z}return y};const E=new o.Cartesian3,I=new o.Cartesian3,M=new o.Cartesian3,P=new o.Cartesian3;g.scaleToGeodeticHeightExtruded=function(e,t,n,i,r){i=a.defaultValue(i,o.Ellipsoid.WGS84);const s=E;let c=I;const l=M;let u=P;if(a.defined(e)&&a.defined(e.attributes)&&a.defined(e.attributes.position)){const a=e.attributes.position.values,h=a.length/2;for(let e=0;e<h;e+=3)o.Cartesian3.fromArray(a,e,l),i.geodeticSurfaceNormal(l,s),u=i.scaleToGeodeticSurface(l,u),c=o.Cartesian3.multiplyByScalar(s,n,c),c=o.Cartesian3.add(u,c,c),a[e+h]=c.x,a[e+1+h]=c.y,a[e+2+h]=c.z,r&&(u=o.Cartesian3.clone(l,u)),c=o.Cartesian3.multiplyByScalar(s,t,c),c=o.Cartesian3.add(u,c,c),a[e]=c.x,a[e+1]=c.y,a[e+2]=c.z}return e},g.polygonOutlinesFromHierarchy=function(e,t,i){const r=[],s=new y;let c,l,u;for(s.enqueue(e);0!==s.length;){const e=s.dequeue();let h=e.positions;if(t)for(u=h.length,c=0;c<u;c++)i.scaleToGeodeticSurface(h[c],h[c]);if(h=n.arrayRemoveDuplicates(h,o.Cartesian3.equalsEpsilon,!0),h.length<3)continue;const p=e.holes?e.holes.length:0;for(c=0;c<p;c++){const h=e.holes[c];let p=h.positions;if(t)for(u=p.length,l=0;l<u;++l)i.scaleToGeodeticSurface(p[l],p[l]);if(p=n.arrayRemoveDuplicates(p,o.Cartesian3.equalsEpsilon,!0),p.length<3)continue;r.push(p);let d=0;for(a.defined(h.holes)&&(d=h.holes.length),l=0;l<d;l++)s.enqueue(h.holes[l])}r.push(h)}return r},g.polygonsFromHierarchy=function(e,t,i,r,s){const c=[],l=[],u=new y;for(u.enqueue(e);0!==u.length;){const e=u.dequeue();let h=e.positions;const p=e.holes;let f,y;if(r)for(y=h.length,f=0;f<y;f++)s.scaleToGeodeticSurface(h[f],h[f]);if(t||(h=n.arrayRemoveDuplicates(h,o.Cartesian3.equalsEpsilon,!0)),h.length<3)continue;let g=i(h);if(!a.defined(g))continue;const m=[];let C=d.PolygonPipeline.computeWindingOrder2D(g);C===d.WindingOrder.CLOCKWISE&&(g.reverse(),h=h.slice().reverse());let b=h.slice();const x=a.defined(p)?p.length:0,T=[];let v;for(f=0;f<x;f++){const e=p[f];let c=e.positions;if(r)for(y=c.length,v=0;v<y;++v)s.scaleToGeodeticSurface(c[v],c[v]);if(t||(c=n.arrayRemoveDuplicates(c,o.Cartesian3.equalsEpsilon,!0)),c.length<3)continue;const l=i(c);if(!a.defined(l))continue;C=d.PolygonPipeline.computeWindingOrder2D(l),C===d.WindingOrder.CLOCKWISE&&(l.reverse(),c=c.slice().reverse()),T.push(c),m.push(b.length),b=b.concat(c),g=g.concat(l);let h=0;for(a.defined(e.holes)&&(h=e.holes.length),v=0;v<h;v++)u.enqueue(e.holes[v])}c.push({outerRing:h,holes:T}),l.push({positions:b,positions2D:g,holes:m})}return{hierarchy:c,polygons:l}};const D=new i.Cartesian2,_=new o.Cartesian3,G=new f.Quaternion,S=new o.Matrix3;g.computeBoundingRectangle=function(e,t,n,i,r){const s=f.Quaternion.fromAxisAngle(e,i,G),c=o.Matrix3.fromQuaternion(s,S);let l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY,p=Number.NEGATIVE_INFINITY;const d=n.length;for(let e=0;e<d;++e){const i=o.Cartesian3.clone(n[e],_);o.Matrix3.multiplyByVector(c,i,i);const r=t(i,D);a.defined(r)&&(l=Math.min(l,r.x),u=Math.max(u,r.x),h=Math.min(h,r.y),p=Math.max(p,r.y))}return r.x=l,r.y=h,r.width=u-l,r.height=p-h,r},g.createGeometryFromPositions=function(e,n,o,s,l,h,p){let f=d.PolygonPipeline.triangulate(n.positions2D,n.holes);f.length<3&&(f=[0,1,2]);const y=n.positions,g=a.defined(o),m=g?o.positions:void 0;if(l){const e=y.length,t=new Array(3*e);let n=0;for(let i=0;i<e;i++){const e=y[i];t[n++]=e.x,t[n++]=e.y,t[n++]=e.z}const o={attributes:{position:new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:t})},indices:f,primitiveType:c.PrimitiveType.TRIANGLES};g&&(o.attributes.st=new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i.Cartesian2.packArray(m)}));const a=new c.Geometry(o);return h.normal?u.GeometryPipeline.computeNormal(a):a}return p===t.ArcType.GEODESIC?d.PolygonPipeline.computeSubdivision(e,y,f,m,s):p===t.ArcType.RHUMB?d.PolygonPipeline.computeRhumbLineSubdivision(e,y,f,m,s):void 0};const R=[],N=[],O=new o.Cartesian3,q=new o.Cartesian3;g.computeWallGeometry=function(e,n,i,s,u,d){let f,y,m,C,b,x,T,v,w,A=e.length,L=0,E=0;const I=a.defined(n),M=I?n.positions:void 0;if(u)for(y=3*A*2,f=new Array(2*y),I&&(w=2*A*2,v=new Array(2*w)),m=0;m<A;m++)C=e[m],b=e[(m+1)%A],f[L]=f[L+y]=C.x,++L,f[L]=f[L+y]=C.y,++L,f[L]=f[L+y]=C.z,++L,f[L]=f[L+y]=b.x,++L,f[L]=f[L+y]=b.y,++L,f[L]=f[L+y]=b.z,++L,I&&(x=M[m],T=M[(m+1)%A],v[E]=v[E+w]=x.x,++E,v[E]=v[E+w]=x.y,++E,v[E]=v[E+w]=T.x,++E,v[E]=v[E+w]=T.y,++E);else{const n=p.CesiumMath.chordLength(s,i.maximumRadius);let o=0;if(d===t.ArcType.GEODESIC)for(m=0;m<A;m++)o+=g.subdivideLineCount(e[m],e[(m+1)%A],n);else if(d===t.ArcType.RHUMB)for(m=0;m<A;m++)o+=g.subdivideRhumbLineCount(i,e[m],e[(m+1)%A],n);for(y=3*(o+A),f=new Array(2*y),I&&(w=2*(o+A),v=new Array(2*w)),m=0;m<A;m++){let o,r;C=e[m],b=e[(m+1)%A],I&&(x=M[m],T=M[(m+1)%A]),d===t.ArcType.GEODESIC?(o=g.subdivideLine(C,b,n,N),I&&(r=g.subdivideTexcoordLine(x,T,C,b,n,R))):d===t.ArcType.RHUMB&&(o=g.subdivideRhumbLine(i,C,b,n,N),I&&(r=g.subdivideTexcoordRhumbLine(x,T,i,C,b,n,R)));const a=o.length;for(let e=0;e<a;++e,++L)f[L]=o[e],f[L+y]=o[e];if(f[L]=b.x,f[L+y]=b.x,++L,f[L]=b.y,f[L+y]=b.y,++L,f[L]=b.z,f[L+y]=b.z,++L,I){const e=r.length;for(let t=0;t<e;++t,++E)v[E]=r[t],v[E+w]=r[t];v[E]=T.x,v[E+w]=T.x,++E,v[E]=T.y,v[E+w]=T.y,++E}}}A=f.length;const P=h.IndexDatatype.createTypedArray(A/3,A-6*e.length);let D=0;for(A/=6,m=0;m<A;m++){const e=m,t=e+1,n=e+A,i=n+1;C=o.Cartesian3.fromArray(f,3*e,O),b=o.Cartesian3.fromArray(f,3*t,q),o.Cartesian3.equalsEpsilon(C,b,p.CesiumMath.EPSILON10,p.CesiumMath.EPSILON10)||(P[D++]=e,P[D++]=n,P[D++]=t,P[D++]=t,P[D++]=n,P[D++]=i)}const _={attributes:new l.GeometryAttributes({position:new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f})}),indices:P,primitiveType:c.PrimitiveType.TRIANGLES};I&&(_.attributes.st=new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:v}));return new c.Geometry(_)};var k=g;e.PolygonGeometryLibrary=k}));
public/CIMSDK/Workers/PolygonPipeline-8efb7487.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./EllipsoidRhumbLine-2cf9c5ef","./GeometryAttribute-642addba","./Math-76ce6367","./WebGLConstants-258cf3a0"],(function(e,t,n,r,a,i,o,s,u){"use strict";var x={exports:{}};function p(e,t,n){n=n||2;var r,a,i,o,s,u,x,p=t&&t.length,h=p?t[0]*n:e.length,y=l(e,0,h,n,!0),f=[];if(!y||y.next===y.prev)return f;if(p&&(y=function(e,t,n,r){var a,i,o,s=[];for(a=0,i=t.length;a<i;a++)(o=l(e,t[a]*r,a<i-1?t[a+1]*r:e.length,r,!1))===o.next&&(o.steiner=!0),s.push(A(o));for(s.sort(m),a=0;a<s.length;a++)n=C(s[a],n);return n}(e,t,y,n)),e.length>80*n){r=i=e[0],a=o=e[1];for(var v=n;v<h;v+=n)(s=e[v])<r&&(r=s),(u=e[v+1])<a&&(a=u),s>i&&(i=s),u>o&&(o=u);x=0!==(x=Math.max(i-r,o-a))?32767/x:0}return c(y,f,n,r,a,x,0),f}function l(e,t,n,r,a){var i,o;if(a===B(e,t,n,r)>0)for(i=t;i<n;i+=r)o=G(i,e[i],e[i+1],o);else for(i=n-r;i>=t;i-=r)o=G(i,e[i],e[i+1],o);return o&&E(o,o.next)&&(O(o),o=o.next),o}function h(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!E(r,r.next)&&0!==S(r.prev,r,r.next))r=r.next;else{if(O(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function c(e,t,n,r,a,i,o){if(e){!o&&i&&function(e,t,n,r){var a=e;do{0===a.z&&(a.z=w(a.x,a.y,t,n,r)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){var t,n,r,a,i,o,s,u,x=1;do{for(n=e,e=null,i=null,o=0;n;){for(o++,r=n,s=0,t=0;t<x&&(s++,r=r.nextZ);t++);for(u=x;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(a=n,n=n.nextZ,s--):(a=r,r=r.nextZ,u--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;n=r}i.nextZ=null,x*=2}while(o>1)}(a)}(e,r,a,i);for(var s,u,x=e;e.prev!==e.next;)if(s=e.prev,u=e.next,i?f(e,r,a,i):y(e))t.push(s.i/n|0),t.push(e.i/n|0),t.push(u.i/n|0),O(e),e=u.next,x=u.next;else if((e=u)===x){o?1===o?c(e=v(h(e),t,n),t,n,r,a,i,2):2===o&&d(e,t,n,r,a,i):c(h(e),t,n,r,a,i,1);break}}}function y(e){var t=e.prev,n=e,r=e.next;if(S(t,n,r)>=0)return!1;for(var a=t.x,i=n.x,o=r.x,s=t.y,u=n.y,x=r.y,p=a<i?a<o?a:o:i<o?i:o,l=s<u?s<x?s:x:u<x?u:x,h=a>i?a>o?a:o:i>o?i:o,c=s>u?s>x?s:x:u>x?u:x,y=r.next;y!==t;){if(y.x>=p&&y.x<=h&&y.y>=l&&y.y<=c&&b(a,s,i,u,o,x,y.x,y.y)&&S(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function f(e,t,n,r){var a=e.prev,i=e,o=e.next;if(S(a,i,o)>=0)return!1;for(var s=a.x,u=i.x,x=o.x,p=a.y,l=i.y,h=o.y,c=s<u?s<x?s:x:u<x?u:x,y=p<l?p<h?p:h:l<h?l:h,f=s>u?s>x?s:x:u>x?u:x,v=p>l?p>h?p:h:l>h?l:h,d=w(c,y,t,n,r),m=w(f,v,t,n,r),C=e.prevZ,g=e.nextZ;C&&C.z>=d&&g&&g.z<=m;){if(C.x>=c&&C.x<=f&&C.y>=y&&C.y<=v&&C!==a&&C!==o&&b(s,p,u,l,x,h,C.x,C.y)&&S(C.prev,C,C.next)>=0)return!1;if(C=C.prevZ,g.x>=c&&g.x<=f&&g.y>=y&&g.y<=v&&g!==a&&g!==o&&b(s,p,u,l,x,h,g.x,g.y)&&S(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;C&&C.z>=d;){if(C.x>=c&&C.x<=f&&C.y>=y&&C.y<=v&&C!==a&&C!==o&&b(s,p,u,l,x,h,C.x,C.y)&&S(C.prev,C,C.next)>=0)return!1;C=C.prevZ}for(;g&&g.z<=m;){if(g.x>=c&&g.x<=f&&g.y>=y&&g.y<=v&&g!==a&&g!==o&&b(s,p,u,l,x,h,g.x,g.y)&&S(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function v(e,t,n){var r=e;do{var a=r.prev,i=r.next.next;!E(a,i)&&Z(a,r,r.next,i)&&D(a,i)&&D(i,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),O(r),O(r.next),r=e=i),r=r.next}while(r!==e);return h(r)}function d(e,t,n,r,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&M(o,s)){var u=R(o,s);return o=h(o,o.next),u=h(u,u.next),c(o,t,n,r,a,i,0),void c(u,t,n,r,a,i,0)}s=s.next}o=o.next}while(o!==e)}function m(e,t){return e.x-t.x}function C(e,t){var n=function(e,t){var n,r=t,a=e.x,i=e.y,o=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=a&&s>o&&(o=s,n=r.x<r.next.x?r:r.next,s===a))return n}r=r.next}while(r!==t);if(!n)return null;var u,x=n,p=n.x,l=n.y,h=1/0;r=n;do{a>=r.x&&r.x>=p&&a!==r.x&&b(i<l?a:o,i,p,l,i<l?o:a,i,r.x,r.y)&&(u=Math.abs(i-r.y)/(a-r.x),D(r,e)&&(u<h||u===h&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,h=u)),r=r.next}while(r!==x);return n}(e,t);if(!n)return t;var r=R(n,e);return h(r,r.next),h(n,n.next)}function g(e,t){return S(e.prev,e,t.prev)<0&&S(t.next,e,e.next)<0}function w(e,t,n,r,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*a|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*a|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function A(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function b(e,t,n,r,a,i,o,s){return(a-o)*(t-s)>=(e-o)*(i-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(i-s)>=(a-o)*(r-s)}function M(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Z(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(D(e,t)&&D(t,e)&&function(e,t){var n=e,r=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&a<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(S(e.prev,e,t.prev)||S(e,t.prev,t))||E(e,t)&&S(e.prev,e,e.next)>0&&S(t.prev,t,t.next)>0)}function S(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function E(e,t){return e.x===t.x&&e.y===t.y}function Z(e,t,n,r){var a=L(S(e,t,n)),i=L(S(e,t,r)),o=L(S(n,r,e)),s=L(S(n,r,t));return a!==i&&o!==s||(!(0!==a||!z(e,n,t))||(!(0!==i||!z(e,r,t))||(!(0!==o||!z(n,e,r))||!(0!==s||!z(n,t,r)))))}function z(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function L(e){return e>0?1:e<0?-1:0}function D(e,t){return S(e.prev,e,e.next)<0?S(e,t,e.next)>=0&&S(e,e.prev,t)>=0:S(e,t,e.prev)<0||S(e,e.next,t)<0}function R(e,t){var n=new T(e.i,e.x,e.y),r=new T(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=a,a.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function G(e,t,n,r){var a=new T(e,t,n);return r?(a.next=r.next,a.prev=r,r.next.prev=a,r.next=a):(a.prev=a,a.next=a),a}function O(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function T(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function B(e,t,n,r){for(var a=0,i=t,o=n-r;i<n;i+=r)a+=(e[o]-e[i])*(e[i+1]+e[o+1]),o=i;return a}x.exports=p,x.exports.default=p,p.deviation=function(e,t,n,r){var a=t&&t.length,i=a?t[0]*n:e.length,o=Math.abs(B(e,0,i,n));if(a)for(var s=0,u=t.length;s<u;s++){var x=t[s]*n,p=s<u-1?t[s+1]*n:e.length;o-=Math.abs(B(e,x,p,n))}var l=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,c=r[s+1]*n,y=r[s+2]*n;l+=Math.abs((e[h]-e[y])*(e[c+1]-e[h+1])-(e[h]-e[c])*(e[y+1]-e[h+1]))}return 0===o&&0===l?0:Math.abs((l-o)/o)},p.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,a=0;a<e.length;a++){for(var i=0;i<e[a].length;i++)for(var o=0;o<t;o++)n.vertices.push(e[a][i][o]);a>0&&(r+=e[a-1].length,n.holes.push(r))}return n};const W={CLOCKWISE:u.WebGLConstants.CW,COUNTER_CLOCKWISE:u.WebGLConstants.CCW,validate:function(e){return e===W.CLOCKWISE||e===W.COUNTER_CLOCKWISE}};var P=Object.freeze(W);const $=new n.Cartesian3,I=new n.Cartesian3,N={computeArea2D:function(e){const t=e.length;let n=0;for(let r=t-1,a=0;a<t;r=a++){const t=e[r],i=e[a];n+=t.x*i.y-i.x*t.y}return.5*n},computeWindingOrder2D:function(e){return N.computeArea2D(e)>0?P.COUNTER_CLOCKWISE:P.CLOCKWISE},triangulate:function(e,n){const r=t.Cartesian2.packArray(e);return x.exports(r,n,2)}},U=new n.Cartesian3,_=new n.Cartesian3,K=new n.Cartesian3,V=new n.Cartesian3,F=new n.Cartesian3,k=new n.Cartesian3,q=new n.Cartesian3,j=new t.Cartesian2,H=new t.Cartesian2,J=new t.Cartesian2,Q=new t.Cartesian2;N.computeSubdivision=function(e,i,u,x,p){p=a.defaultValue(p,s.CesiumMath.RADIANS_PER_DEGREE);const l=a.defined(x),h=u.slice(0);let c;const y=i.length,f=new Array(3*y),v=new Array(2*y);let d=0,m=0;for(c=0;c<y;c++){const e=i[c];if(f[d++]=e.x,f[d++]=e.y,f[d++]=e.z,l){const e=x[c];v[m++]=e.x,v[m++]=e.y}}const C=[],g={},w=e.maximumRadius,A=s.CesiumMath.chordLength(p,w),b=A*A;for(;h.length>0;){const e=h.pop(),r=h.pop(),i=h.pop(),o=n.Cartesian3.fromArray(f,3*i,U),s=n.Cartesian3.fromArray(f,3*r,_),u=n.Cartesian3.fromArray(f,3*e,K);let x,p,y;l&&(x=t.Cartesian2.fromArray(v,2*i,j),p=t.Cartesian2.fromArray(v,2*r,H),y=t.Cartesian2.fromArray(v,2*e,J));const d=n.Cartesian3.multiplyByScalar(n.Cartesian3.normalize(o,V),w,V),m=n.Cartesian3.multiplyByScalar(n.Cartesian3.normalize(s,F),w,F),A=n.Cartesian3.multiplyByScalar(n.Cartesian3.normalize(u,k),w,k),M=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(d,m,q)),S=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(m,A,q)),E=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(A,d,q)),Z=Math.max(M,S,E);let z,L,D;Z>b?M===Z?(z=`${Math.min(i,r)} ${Math.max(i,r)}`,c=g[z],a.defined(c)||(L=n.Cartesian3.add(o,s,q),n.Cartesian3.multiplyByScalar(L,.5,L),f.push(L.x,L.y,L.z),c=f.length/3-1,g[z]=c,l&&(D=t.Cartesian2.add(x,p,Q),t.Cartesian2.multiplyByScalar(D,.5,D),v.push(D.x,D.y))),h.push(i,c,e),h.push(c,r,e)):S===Z?(z=`${Math.min(r,e)} ${Math.max(r,e)}`,c=g[z],a.defined(c)||(L=n.Cartesian3.add(s,u,q),n.Cartesian3.multiplyByScalar(L,.5,L),f.push(L.x,L.y,L.z),c=f.length/3-1,g[z]=c,l&&(D=t.Cartesian2.add(p,y,Q),t.Cartesian2.multiplyByScalar(D,.5,D),v.push(D.x,D.y))),h.push(r,c,i),h.push(c,e,i)):E===Z&&(z=`${Math.min(e,i)} ${Math.max(e,i)}`,c=g[z],a.defined(c)||(L=n.Cartesian3.add(u,o,q),n.Cartesian3.multiplyByScalar(L,.5,L),f.push(L.x,L.y,L.z),c=f.length/3-1,g[z]=c,l&&(D=t.Cartesian2.add(y,x,Q),t.Cartesian2.multiplyByScalar(D,.5,D),v.push(D.x,D.y))),h.push(e,c,r),h.push(c,i,r)):(C.push(i),C.push(r),C.push(e))}const M={attributes:{position:new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f})},indices:C,primitiveType:o.PrimitiveType.TRIANGLES};return l&&(M.attributes.st=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:v})),new o.Geometry(M)};const X=new n.Cartographic,Y=new n.Cartographic,ee=new n.Cartographic,te=new n.Cartographic;N.computeRhumbLineSubdivision=function(e,u,x,p,l){l=a.defaultValue(l,s.CesiumMath.RADIANS_PER_DEGREE);const h=a.defined(p),c=x.slice(0);let y;const f=u.length,v=new Array(3*f),d=new Array(2*f);let m=0,C=0;for(y=0;y<f;y++){const e=u[y];if(v[m++]=e.x,v[m++]=e.y,v[m++]=e.z,h){const e=p[y];d[C++]=e.x,d[C++]=e.y}}const g=[],w={},A=e.maximumRadius,b=s.CesiumMath.chordLength(l,A),M=new i.EllipsoidRhumbLine(void 0,void 0,e),S=new i.EllipsoidRhumbLine(void 0,void 0,e),E=new i.EllipsoidRhumbLine(void 0,void 0,e);for(;c.length>0;){const r=c.pop(),i=c.pop(),o=c.pop(),s=n.Cartesian3.fromArray(v,3*o,U),u=n.Cartesian3.fromArray(v,3*i,_),x=n.Cartesian3.fromArray(v,3*r,K);let p,l,f;h&&(p=t.Cartesian2.fromArray(d,2*o,j),l=t.Cartesian2.fromArray(d,2*i,H),f=t.Cartesian2.fromArray(d,2*r,J));const m=e.cartesianToCartographic(s,X),C=e.cartesianToCartographic(u,Y),A=e.cartesianToCartographic(x,ee);M.setEndPoints(m,C);const Z=M.surfaceDistance;S.setEndPoints(C,A);const z=S.surfaceDistance;E.setEndPoints(A,m);const L=E.surfaceDistance,D=Math.max(Z,z,L);let R,G,O,T,B;D>b?Z===D?(R=`${Math.min(o,i)} ${Math.max(o,i)}`,y=w[R],a.defined(y)||(G=M.interpolateUsingFraction(.5,te),O=.5*(m.height+C.height),T=n.Cartesian3.fromRadians(G.longitude,G.latitude,O,e,q),v.push(T.x,T.y,T.z),y=v.length/3-1,w[R]=y,h&&(B=t.Cartesian2.add(p,l,Q),t.Cartesian2.multiplyByScalar(B,.5,B),d.push(B.x,B.y))),c.push(o,y,r),c.push(y,i,r)):z===D?(R=`${Math.min(i,r)} ${Math.max(i,r)}`,y=w[R],a.defined(y)||(G=S.interpolateUsingFraction(.5,te),O=.5*(C.height+A.height),T=n.Cartesian3.fromRadians(G.longitude,G.latitude,O,e,q),v.push(T.x,T.y,T.z),y=v.length/3-1,w[R]=y,h&&(B=t.Cartesian2.add(l,f,Q),t.Cartesian2.multiplyByScalar(B,.5,B),d.push(B.x,B.y))),c.push(i,y,o),c.push(y,r,o)):L===D&&(R=`${Math.min(r,o)} ${Math.max(r,o)}`,y=w[R],a.defined(y)||(G=E.interpolateUsingFraction(.5,te),O=.5*(A.height+m.height),T=n.Cartesian3.fromRadians(G.longitude,G.latitude,O,e,q),v.push(T.x,T.y,T.z),y=v.length/3-1,w[R]=y,h&&(B=t.Cartesian2.add(f,p,Q),t.Cartesian2.multiplyByScalar(B,.5,B),d.push(B.x,B.y))),c.push(r,y,i),c.push(y,o,i)):(g.push(o),g.push(i),g.push(r))}const Z={attributes:{position:new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})},indices:g,primitiveType:o.PrimitiveType.TRIANGLES};return h&&(Z.attributes.st=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),new o.Geometry(Z)},N.scaleToGeodeticHeight=function(e,t,r,i){r=a.defaultValue(r,n.Ellipsoid.WGS84);let o=$,s=I;if(t=a.defaultValue(t,0),i=a.defaultValue(i,!0),a.defined(e)){const a=e.length;for(let u=0;u<a;u+=3)n.Cartesian3.fromArray(e,u,s),i&&(s=r.scaleToGeodeticSurface(s,s)),0!==t&&(o=r.geodeticSurfaceNormal(s,o),n.Cartesian3.multiplyByScalar(o,t,o),n.Cartesian3.add(s,o,s)),e[u]=s.x,e[u+1]=s.y,e[u+2]=s.z}return e};var ne=N;e.PolygonPipeline=ne,e.WindingOrder=P}));
public/CIMSDK/Workers/PolylinePipeline-482bb0f7.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./defaultValue-865ac579","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef","./IntersectionTests-7b064f18","./Math-76ce6367","./Matrix2-2fdcdec7","./Plane-fbab0ca2"],(function(e,t,a,n,i,r,o,s,c){"use strict";const l={numberOfPoints:function(e,a,n){const i=t.Cartesian3.distance(e,a);return Math.ceil(i/n)},numberOfPointsRhumbLine:function(e,t,a){const n=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(n/(a*a))))}},u=new t.Cartographic;l.extractHeights=function(e,t){const a=e.length,n=new Array(a);for(let i=0;i<a;i++){const a=e[i];n[i]=t.cartesianToCartographic(a,u).height}return n};const h=new s.Matrix4,f=new t.Cartesian3,g=new t.Cartesian3,C=new c.Plane(t.Cartesian3.UNIT_X,0),p=new t.Cartesian3,d=new c.Plane(t.Cartesian3.UNIT_X,0),m=new t.Cartesian3,w=new t.Cartesian3,P=[];function T(e,t,a){const n=P;let i;if(n.length=e,t===a){for(i=0;i<e;i++)n[i]=t;return n}const r=(a-t)/e;for(i=0;i<e;i++){const e=t+i*r;n[i]=e}return n}const y=new t.Cartographic,A=new t.Cartographic,b=new t.Cartesian3,E=new t.Cartesian3,M=new t.Cartesian3,R=new n.EllipsoidGeodesic;let S=new i.EllipsoidRhumbLine;function x(e,a,n,i,r,o,s,c){const u=i.scaleToGeodeticSurface(e,E),h=i.scaleToGeodeticSurface(a,M),f=l.numberOfPoints(e,a,n),g=i.cartesianToCartographic(u,y),C=i.cartesianToCartographic(h,A),p=T(f,r,o);R.setEndPoints(g,C);const d=R.surfaceDistance/f;let m=c;g.height=r;let w=i.cartographicToCartesian(g,b);t.Cartesian3.pack(w,s,m),m+=3;for(let e=1;e<f;e++){const a=R.interpolateUsingSurfaceDistance(e*d,A);a.height=p[e],w=i.cartographicToCartesian(a,b),t.Cartesian3.pack(w,s,m),m+=3}return m}function D(e,a,n,r,o,s,c,u){const h=r.cartesianToCartographic(e,y),f=r.cartesianToCartographic(a,A),g=l.numberOfPointsRhumbLine(h,f,n);h.height=0,f.height=0;const C=T(g,o,s);S.ellipsoid.equals(r)||(S=new i.EllipsoidRhumbLine(void 0,void 0,r)),S.setEndPoints(h,f);const p=S.surfaceDistance/g;let d=u;h.height=o;let m=r.cartographicToCartesian(h,b);t.Cartesian3.pack(m,c,d),d+=3;for(let e=1;e<g;e++){const a=S.interpolateUsingSurfaceDistance(e*p,A);a.height=C[e],m=r.cartographicToCartesian(a,b),t.Cartesian3.pack(m,c,d),d+=3}return d}l.wrapLongitude=function(e,n){const i=[],o=[];if(a.defined(e)&&e.length>0){n=a.defaultValue(n,s.Matrix4.IDENTITY);const l=s.Matrix4.inverseTransformation(n,h),u=s.Matrix4.multiplyByPoint(l,t.Cartesian3.ZERO,f),P=t.Cartesian3.normalize(s.Matrix4.multiplyByPointAsVector(l,t.Cartesian3.UNIT_Y,g),g),T=c.Plane.fromPointNormal(u,P,C),y=t.Cartesian3.normalize(s.Matrix4.multiplyByPointAsVector(l,t.Cartesian3.UNIT_X,p),p),A=c.Plane.fromPointNormal(u,y,d);let b=1;i.push(t.Cartesian3.clone(e[0]));let E=i[0];const M=e.length;for(let n=1;n<M;++n){const s=e[n];if(c.Plane.getPointDistance(A,E)<0||c.Plane.getPointDistance(A,s)<0){const e=r.IntersectionTests.lineSegmentPlane(E,s,T,m);if(a.defined(e)){const a=t.Cartesian3.multiplyByScalar(P,5e-9,w);c.Plane.getPointDistance(T,E)<0&&t.Cartesian3.negate(a,a),i.push(t.Cartesian3.add(e,a,new t.Cartesian3)),o.push(b+1),t.Cartesian3.negate(a,a),i.push(t.Cartesian3.add(e,a,new t.Cartesian3)),b=1}}i.push(t.Cartesian3.clone(e[n])),b++,E=s}o.push(b)}return{positions:i,lengths:o}},l.generateArc=function(e){a.defined(e)||(e={});const n=e.positions,i=n.length,r=a.defaultValue(e.ellipsoid,t.Ellipsoid.WGS84);let s=a.defaultValue(e.height,0);const c=Array.isArray(s);if(i<1)return[];if(1===i){const e=r.scaleToGeodeticSurface(n[0],E);if(s=c?s[0]:s,0!==s){const a=r.geodeticSurfaceNormal(e,b);t.Cartesian3.multiplyByScalar(a,s,a),t.Cartesian3.add(e,a,e)}return[e.x,e.y,e.z]}let u=e.minDistance;if(!a.defined(u)){const t=a.defaultValue(e.granularity,o.CesiumMath.RADIANS_PER_DEGREE);u=o.CesiumMath.chordLength(t,r.maximumRadius)}let h,f=0;for(h=0;h<i-1;h++)f+=l.numberOfPoints(n[h],n[h+1],u);const g=3*(f+1),C=new Array(g);let p=0;for(h=0;h<i-1;h++){p=x(n[h],n[h+1],u,r,c?s[h]:s,c?s[h+1]:s,C,p)}P.length=0;const d=n[i-1],m=r.cartesianToCartographic(d,y);m.height=c?s[i-1]:s;const w=r.cartographicToCartesian(m,b);return t.Cartesian3.pack(w,C,g-3),C};const N=new t.Cartographic,G=new t.Cartographic;l.generateRhumbArc=function(e){a.defined(e)||(e={});const n=e.positions,i=n.length,r=a.defaultValue(e.ellipsoid,t.Ellipsoid.WGS84);let s=a.defaultValue(e.height,0);const c=Array.isArray(s);if(i<1)return[];if(1===i){const e=r.scaleToGeodeticSurface(n[0],E);if(s=c?s[0]:s,0!==s){const a=r.geodeticSurfaceNormal(e,b);t.Cartesian3.multiplyByScalar(a,s,a),t.Cartesian3.add(e,a,e)}return[e.x,e.y,e.z]}const u=a.defaultValue(e.granularity,o.CesiumMath.RADIANS_PER_DEGREE);let h,f,g=0,C=r.cartesianToCartographic(n[0],N);for(h=0;h<i-1;h++)f=r.cartesianToCartographic(n[h+1],G),g+=l.numberOfPointsRhumbLine(C,f,u),C=t.Cartographic.clone(f,N);const p=3*(g+1),d=new Array(p);let m=0;for(h=0;h<i-1;h++){m=D(n[h],n[h+1],u,r,c?s[h]:s,c?s[h+1]:s,d,m)}P.length=0;const w=n[i-1],T=r.cartesianToCartographic(w,y);T.height=c?s[i-1]:s;const A=r.cartographicToCartesian(T,b);return t.Cartesian3.pack(A,d,p-3),d},l.generateCartesianArc=function(e){const a=l.generateArc(e),n=a.length/3,i=new Array(n);for(let e=0;e<n;e++)i[e]=t.Cartesian3.unpack(a,3*e);return i},l.generateCartesianRhumbArc=function(e){const a=l.generateRhumbArc(e),n=a.length/3,i=new Array(n);for(let e=0;e<n;e++)i[e]=t.Cartesian3.unpack(a,3*e);return i};var I=l;e.PolylinePipeline=I}));
public/CIMSDK/Workers/PolylineVolumeGeometryLibrary-7de9a48a.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./EllipsoidTangentPlane-a9681249","./Math-76ce6367","./PolylinePipeline-482bb0f7","./Transforms-221c7c82","./defaultValue-865ac579"],(function(e,a,t,n,r,i,s,o){"use strict";var l=Object.freeze({ROUNDED:0,MITERED:1,BEVELED:2});const c={};function C(e,a){o.defined(c[e])||(c[e]=!0,console.warn(o.defaultValue(a,e)))}C.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",C.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined.  zIndex will be ignored",C.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height.  heightReference will be ignored",C.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight.  extrudedHeightReference will be ignored";const u=[new t.Cartesian3,new t.Cartesian3],d=new t.Cartesian3,g=new t.Cartesian3,y=new t.Cartesian3,h=new t.Cartesian3,f=new t.Cartesian3,m=new t.Cartesian3,p=new t.Cartesian3,w=new t.Cartesian3,x=new t.Cartesian3,E=new t.Cartesian3,P=new t.Cartesian3,M={};let b=new t.Cartographic;function T(e,a,n,r){const i=e[0],s=e[1],o=t.Cartesian3.angleBetween(i,s),l=Math.ceil(o/r),c=new Array(l);let C;if(a===n){for(C=0;C<l;C++)c[C]=a;return c.push(n),c}const u=(n-a)/l;for(C=1;C<l;C++){const e=a+C*u;c[C]=e}return c[0]=a,c.push(n),c}const B=new t.Cartesian3,z=new t.Cartesian3;const S=new t.Cartesian3(-1,0,0);let A=new a.Matrix4;const D=new a.Matrix4;let R=new t.Matrix3;const O=t.Matrix3.IDENTITY.clone(),V=new t.Cartesian3,I=new a.Cartesian4,v=new t.Cartesian3;function N(e,r,i,o,l,c,C,u){let d=V,g=I;A=s.Transforms.eastNorthUpToFixedFrame(e,l,A),d=a.Matrix4.multiplyByPointAsVector(A,S,d),d=t.Cartesian3.normalize(d,d);const y=function(e,r,i,s){const o=new n.EllipsoidTangentPlane(i,s),l=o.projectPointOntoPlane(t.Cartesian3.add(i,e,B),B),c=o.projectPointOntoPlane(t.Cartesian3.add(i,r,z),z),C=a.Cartesian2.angleBetween(l,c);return c.x*l.y-c.y*l.x>=0?-C:C}(d,r,e,l);R=t.Matrix3.fromRotationZ(y,R),v.z=c,A=a.Matrix4.multiplyTransformation(A,a.Matrix4.fromRotationTranslation(R,v,D),A);const h=O;h[0]=C;for(let e=0;e<u;e++)for(let e=0;e<i.length;e+=3)g=t.Cartesian3.fromArray(i,e,g),g=t.Matrix3.multiplyByVector(h,g,g),g=a.Matrix4.multiplyByPoint(A,g,g),o.push(g.x,g.y,g.z);return o}const G=new t.Cartesian3;function H(e,a,n,r,i,s,o){for(let l=0;l<e.length;l+=3){r=N(t.Cartesian3.fromArray(e,l,G),a,n,r,i,s[l/3],o,1)}return r}function L(e,a){const t=e.length,n=new Array(3*t);let r=0;const i=a.x+a.width/2,s=a.y+a.height/2;for(let a=0;a<t;a++)n[r++]=e[a].x-i,n[r++]=0,n[r++]=e[a].y-s;return n}const j=new s.Quaternion,Q=new t.Cartesian3,q=new t.Matrix3;function F(e,a,n,i,o,c,C,u,d,g){const y=t.Cartesian3.angleBetween(t.Cartesian3.subtract(a,e,E),t.Cartesian3.subtract(n,e,P)),h=i===l.BEVELED?0:Math.ceil(y/r.CesiumMath.toRadians(5));let f,m,p;if(f=o?t.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(t.Cartesian3.negate(e,E),y/(h+1),j),q):t.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(e,y/(h+1),j),q),a=t.Cartesian3.clone(a,Q),h>0){const n=g?2:1;for(let r=0;r<h;r++)a=t.Matrix3.multiplyByVector(f,a,a),m=t.Cartesian3.subtract(a,e,E),m=t.Cartesian3.normalize(m,m),o||(m=t.Cartesian3.negate(m,m)),p=c.scaleToGeodeticSurface(a,P),C=N(p,m,u,C,c,d,1,n)}else m=t.Cartesian3.subtract(a,e,E),m=t.Cartesian3.normalize(m,m),o||(m=t.Cartesian3.negate(m,m)),p=c.scaleToGeodeticSurface(a,P),C=N(p,m,u,C,c,d,1,1),n=t.Cartesian3.clone(n,Q),m=t.Cartesian3.subtract(n,e,E),m=t.Cartesian3.normalize(m,m),o||(m=t.Cartesian3.negate(m,m)),p=c.scaleToGeodeticSurface(n,P),C=N(p,m,u,C,c,d,1,1);return C}M.removeDuplicatesFromShape=function(e){const t=e.length,n=[];for(let r=t-1,i=0;i<t;r=i++){const t=e[r],s=e[i];a.Cartesian2.equals(t,s)||n.push(s)}return n},M.angleIsGreaterThanPi=function(e,a,r,i){const s=new n.EllipsoidTangentPlane(r,i),o=s.projectPointOntoPlane(t.Cartesian3.add(r,e,B),B),l=s.projectPointOntoPlane(t.Cartesian3.add(r,a,z),z);return l.x*o.y-l.y*o.x>=0};const U=new t.Cartesian3,_=new t.Cartesian3;M.computePositions=function(e,a,n,s,o){const c=s._ellipsoid,P=function(e,a){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];b=a.cartesianToCartographic(r,b),t[n]=b.height,e[n]=a.scaleToGeodeticSurface(r,r)}return t}(e,c),B=s._granularity,z=s._cornerType,S=o?function(e,a){const t=e.length,n=new Array(6*t);let r=0;const i=a.x+a.width/2,s=a.y+a.height/2;let o=e[0];n[r++]=o.x-i,n[r++]=0,n[r++]=o.y-s;for(let a=1;a<t;a++){o=e[a];const t=o.x-i,l=o.y-s;n[r++]=t,n[r++]=0,n[r++]=l,n[r++]=t,n[r++]=0,n[r++]=l}return o=e[0],n[r++]=o.x-i,n[r++]=0,n[r++]=o.y-s,n}(a,n):L(a,n),A=o?L(a,n):void 0,D=n.height/2,R=n.width/2;let O=e.length,V=[],I=o?[]:void 0,v=d,G=g,j=y,Q=h,q=f,Z=m,W=p,Y=w,k=x,J=e[0],K=e[1];Q=c.geodeticSurfaceNormal(J,Q),v=t.Cartesian3.subtract(K,J,v),v=t.Cartesian3.normalize(v,v),Y=t.Cartesian3.cross(Q,v,Y),Y=t.Cartesian3.normalize(Y,Y);let X,$,ee=P[0],ae=P[1];o&&(I=N(J,Y,A,I,c,ee+D,1,1)),k=t.Cartesian3.clone(J,k),J=K,G=t.Cartesian3.negate(v,G);for(let a=1;a<O-1;a++){const n=o?2:1;if(K=e[a+1],J.equals(K)){C("Positions are too close and are considered equivalent with rounding error.");continue}v=t.Cartesian3.subtract(K,J,v),v=t.Cartesian3.normalize(v,v),j=t.Cartesian3.add(v,G,j),j=t.Cartesian3.normalize(j,j),Q=c.geodeticSurfaceNormal(J,Q);const s=t.Cartesian3.multiplyByScalar(Q,t.Cartesian3.dot(v,Q),U);t.Cartesian3.subtract(v,s,s),t.Cartesian3.normalize(s,s);const d=t.Cartesian3.multiplyByScalar(Q,t.Cartesian3.dot(G,Q),_);t.Cartesian3.subtract(G,d,d),t.Cartesian3.normalize(d,d);if(!r.CesiumMath.equalsEpsilon(Math.abs(t.Cartesian3.dot(s,d)),1,r.CesiumMath.EPSILON7)){j=t.Cartesian3.cross(j,Q,j),j=t.Cartesian3.cross(Q,j,j),j=t.Cartesian3.normalize(j,j);const e=1/Math.max(.25,t.Cartesian3.magnitude(t.Cartesian3.cross(j,G,E))),a=M.angleIsGreaterThanPi(v,G,J,c);a?(q=t.Cartesian3.add(J,t.Cartesian3.multiplyByScalar(j,e*R,j),q),Z=t.Cartesian3.add(q,t.Cartesian3.multiplyByScalar(Y,R,Z),Z),u[0]=t.Cartesian3.clone(k,u[0]),u[1]=t.Cartesian3.clone(Z,u[1]),X=T(u,ee+D,ae+D,B),$=i.PolylinePipeline.generateArc({positions:u,granularity:B,ellipsoid:c}),V=H($,Y,S,V,c,X,1),Y=t.Cartesian3.cross(Q,v,Y),Y=t.Cartesian3.normalize(Y,Y),W=t.Cartesian3.add(q,t.Cartesian3.multiplyByScalar(Y,R,W),W),z===l.ROUNDED||z===l.BEVELED?F(q,Z,W,z,a,c,V,S,ae+D,o):(j=t.Cartesian3.negate(j,j),V=N(J,j,S,V,c,ae+D,e,n)),k=t.Cartesian3.clone(W,k)):(q=t.Cartesian3.add(J,t.Cartesian3.multiplyByScalar(j,e*R,j),q),Z=t.Cartesian3.add(q,t.Cartesian3.multiplyByScalar(Y,-R,Z),Z),u[0]=t.Cartesian3.clone(k,u[0]),u[1]=t.Cartesian3.clone(Z,u[1]),X=T(u,ee+D,ae+D,B),$=i.PolylinePipeline.generateArc({positions:u,granularity:B,ellipsoid:c}),V=H($,Y,S,V,c,X,1),Y=t.Cartesian3.cross(Q,v,Y),Y=t.Cartesian3.normalize(Y,Y),W=t.Cartesian3.add(q,t.Cartesian3.multiplyByScalar(Y,-R,W),W),z===l.ROUNDED||z===l.BEVELED?F(q,Z,W,z,a,c,V,S,ae+D,o):V=N(J,j,S,V,c,ae+D,e,n),k=t.Cartesian3.clone(W,k)),G=t.Cartesian3.negate(v,G)}else V=N(k,Y,S,V,c,ee+D,1,1),k=J;ee=ae,ae=P[a+1],J=K}u[0]=t.Cartesian3.clone(k,u[0]),u[1]=t.Cartesian3.clone(J,u[1]),X=T(u,ee+D,ae+D,B),$=i.PolylinePipeline.generateArc({positions:u,granularity:B,ellipsoid:c}),V=H($,Y,S,V,c,X,1),o&&(I=N(J,Y,A,I,c,ae+D,1,1)),O=V.length;const te=o?O+I.length:O,ne=new Float64Array(te);return ne.set(V),o&&ne.set(I,O),ne};var Z=M;e.CornerType=l,e.PolylineVolumeGeometryLibrary=Z,e.oneTimeWarning=C}));
public/CIMSDK/Workers/PrimitivePipeline-07eae5eb.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./Matrix3-aeb3c326","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryPipeline-a349886f","./IndexDatatype-16f6b4a1","./Matrix2-2fdcdec7","./WebMercatorProjection-bfe55882"],(function(e,t,n,r,o,i,s,c,a,d,p){"use strict";function u(e,t,n){e=r.defaultValue(e,0),t=r.defaultValue(t,0),n=r.defaultValue(n,0),this.value=new Float32Array([e,t,n])}function f(e,t){const r=e.attributes,o=r.position,s=o.values.length/o.componentsPerAttribute;r.batchId=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:1,values:new Float32Array(s)});const c=r.batchId.values;for(let e=0;e<s;++e)c[e]=t}function l(e){const o=e.instances,i=e.projection,s=e.elementIndexUintSupported,a=e.scene3DOnly,p=e.vertexCacheOptimize,u=e.compressVertices,l=e.modelMatrix;let m,h,g=o.length;for(m=0;m<g;++m)if(r.defined(o[m].geometry)){o[m].geometry.primitiveType;break}if(function(e,t,n){let o=!n;const i=e.length;let s;if(!o&&i>1){const t=e[0].modelMatrix;for(s=1;s<i;++s)if(!d.Matrix4.equals(t,e[s].modelMatrix)){o=!0;break}}if(o)for(s=0;s<i;++s)r.defined(e[s].geometry)&&c.GeometryPipeline.transformToWorldCoordinates(e[s]);else d.Matrix4.multiplyTransformation(t,e[0].modelMatrix,t)}(o,l,a),!a)for(m=0;m<g;++m)r.defined(o[m].geometry)&&c.GeometryPipeline.splitLongitude(o[m]);if(function(e){const t=e.length;for(let n=0;n<t;++n){const t=e[n];r.defined(t.geometry)?f(t.geometry,n):r.defined(t.westHemisphereGeometry)&&r.defined(t.eastHemisphereGeometry)&&(f(t.westHemisphereGeometry,n),f(t.eastHemisphereGeometry,n))}}(o),p)for(m=0;m<g;++m){const e=o[m];r.defined(e.geometry)?(c.GeometryPipeline.reorderForPostVertexCache(e.geometry),c.GeometryPipeline.reorderForPreVertexCache(e.geometry)):r.defined(e.westHemisphereGeometry)&&r.defined(e.eastHemisphereGeometry)&&(c.GeometryPipeline.reorderForPostVertexCache(e.westHemisphereGeometry),c.GeometryPipeline.reorderForPreVertexCache(e.westHemisphereGeometry),c.GeometryPipeline.reorderForPostVertexCache(e.eastHemisphereGeometry),c.GeometryPipeline.reorderForPreVertexCache(e.eastHemisphereGeometry))}let y=c.GeometryPipeline.combineInstances(o);for(g=y.length,m=0;m<g;++m){h=y[m];const e=h.attributes;if(a)for(const t in e)e.hasOwnProperty(t)&&e[t].componentDatatype===n.ComponentDatatype.DOUBLE&&c.GeometryPipeline.encodeAttribute(h,t,`${t}3DHigh`,`${t}3DLow`);else for(const o in e)if(e.hasOwnProperty(o)&&e[o].componentDatatype===n.ComponentDatatype.DOUBLE){const e=`${o}3D`,n=`${o}2D`;c.GeometryPipeline.projectTo2D(h,o,e,n,i),r.defined(h.boundingSphere)&&"position"===o&&(h.boundingSphereCV=t.BoundingSphere.fromVertices(h.attributes.position2D.values)),c.GeometryPipeline.encodeAttribute(h,e,`${e}High`,`${e}Low`),c.GeometryPipeline.encodeAttribute(h,n,`${n}High`,`${n}Low`)}u&&c.GeometryPipeline.compressVertices(h)}if(!s){let e=[];for(g=y.length,m=0;m<g;++m)h=y[m],e=e.concat(c.GeometryPipeline.fitToUnsignedShortIndices(h));y=e}return y}function m(e,t,n,o){let i,s,c;const a=o.length-1;if(a>=0){const e=o[a];i=e.offset+e.count,c=e.index,s=n[c].indices.length}else i=0,c=0,s=n[c].indices.length;const d=e.length;for(let a=0;a<d;++a){const d=e[a][t];if(!r.defined(d))continue;const p=d.indices.length;i+p>s&&(i=0,s=n[++c].indices.length),o.push({index:c,offset:i,count:p}),i+=p}}Object.defineProperties(u.prototype,{componentDatatype:{get:function(){return n.ComponentDatatype.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),u.fromCartesian3=function(e){return new u(e.x,e.y,e.z)},u.toValue=function(e,t){return r.defined(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};const h={};function g(e,t){const n=e.attributes;for(const e in n)if(n.hasOwnProperty(e)){const o=n[e];r.defined(o)&&r.defined(o.values)&&t.push(o.values.buffer)}r.defined(e.indices)&&t.push(e.indices.buffer)}function y(e,t){const n=e.length,o=new Float64Array(1+19*n);let i=0;o[i++]=n;for(let t=0;t<n;t++){const n=e[t];if(d.Matrix4.pack(n.modelMatrix,o,i),i+=d.Matrix4.packedLength,r.defined(n.attributes)&&r.defined(n.attributes.offset)){const e=n.attributes.offset.value;o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2]}i+=3}return t.push(o.buffer),o}function b(e){const n=e.length,o=1+(t.BoundingSphere.packedLength+1)*n,i=new Float32Array(o);let s=0;i[s++]=n;for(let o=0;o<n;++o){const n=e[o];r.defined(n)?(i[s++]=1,t.BoundingSphere.pack(e[o],i,s)):i[s++]=0,s+=t.BoundingSphere.packedLength}return i}function x(e){const n=new Array(e[0]);let r=0,o=1;for(;o<e.length;)1===e[o++]&&(n[r]=t.BoundingSphere.unpack(e,o)),++r,o+=t.BoundingSphere.packedLength;return n}h.combineGeometry=function(e){let n,o;const i=e.instances,s=i.length;let a,d,p=!1;s>0&&(n=l(e),n.length>0&&(o=c.GeometryPipeline.createAttributeLocations(n[0]),e.createPickOffsets&&(a=function(e,t){const n=[];return m(e,"geometry",t,n),m(e,"westHemisphereGeometry",t,n),m(e,"eastHemisphereGeometry",t,n),n}(i,n))),r.defined(i[0].attributes)&&r.defined(i[0].attributes.offset)&&(d=new Array(s),p=!0));const u=new Array(s),f=new Array(s);for(let e=0;e<s;++e){const n=i[e],o=n.geometry;r.defined(o)&&(u[e]=o.boundingSphere,f[e]=o.boundingSphereCV,p&&(d[e]=n.geometry.offsetAttribute));const s=n.eastHemisphereGeometry,c=n.westHemisphereGeometry;r.defined(s)&&r.defined(c)&&(r.defined(s.boundingSphere)&&r.defined(c.boundingSphere)&&(u[e]=t.BoundingSphere.union(s.boundingSphere,c.boundingSphere)),r.defined(s.boundingSphereCV)&&r.defined(c.boundingSphereCV)&&(f[e]=t.BoundingSphere.union(s.boundingSphereCV,c.boundingSphereCV)))}return{geometries:n,modelMatrix:e.modelMatrix,attributeLocations:o,pickOffsets:a,offsetInstanceExtend:d,boundingSpheres:u,boundingSpheresCV:f}},h.packCreateGeometryResults=function(e,n){const o=new Float64Array(function(e){let n=1;const o=e.length;for(let i=0;i<o;i++){const o=e[i];if(++n,!r.defined(o))continue;const s=o.attributes;n+=7+2*t.BoundingSphere.packedLength+(r.defined(o.indices)?o.indices.length:0);for(const e in s)s.hasOwnProperty(e)&&r.defined(s[e])&&(n+=5+s[e].values.length)}return n}(e)),i=[],s={},c=e.length;let a=0;o[a++]=c;for(let n=0;n<c;n++){const c=e[n],d=r.defined(c);if(o[a++]=d?1:0,!d)continue;o[a++]=c.primitiveType,o[a++]=c.geometryType,o[a++]=r.defaultValue(c.offsetAttribute,-1);const p=r.defined(c.boundingSphere)?1:0;o[a++]=p,p&&t.BoundingSphere.pack(c.boundingSphere,o,a),a+=t.BoundingSphere.packedLength;const u=r.defined(c.boundingSphereCV)?1:0;o[a++]=u,u&&t.BoundingSphere.pack(c.boundingSphereCV,o,a),a+=t.BoundingSphere.packedLength;const f=c.attributes,l=[];for(const e in f)f.hasOwnProperty(e)&&r.defined(f[e])&&(l.push(e),r.defined(s[e])||(s[e]=i.length,i.push(e)));o[a++]=l.length;for(let e=0;e<l.length;e++){const t=l[e],n=f[t];o[a++]=s[t],o[a++]=n.componentDatatype,o[a++]=n.componentsPerAttribute,o[a++]=n.normalize?1:0,o[a++]=n.values.length,o.set(n.values,a),a+=n.values.length}const m=r.defined(c.indices)?c.indices.length:0;o[a++]=m,m>0&&(o.set(c.indices,a),a+=m)}return n.push(o.buffer),{stringTable:i,packedData:o}},h.unpackCreateGeometryResults=function(e){const r=e.stringTable,o=e.packedData;let c;const d=new Array(o[0]);let p=0,u=1;for(;u<o.length;){if(!(1===o[u++])){d[p++]=void 0;continue}const e=o[u++],f=o[u++];let l,m,h=o[u++];-1===h&&(h=void 0);1===o[u++]&&(l=t.BoundingSphere.unpack(o,u)),u+=t.BoundingSphere.packedLength;let g,y,b;1===o[u++]&&(m=t.BoundingSphere.unpack(o,u)),u+=t.BoundingSphere.packedLength;const x=new s.GeometryAttributes,G=o[u++];for(c=0;c<G;c++){const e=r[o[u++]],t=o[u++];b=o[u++];const s=0!==o[u++];g=o[u++],y=n.ComponentDatatype.createTypedArray(t,g);for(let e=0;e<g;e++)y[e]=o[u++];x[e]=new i.GeometryAttribute({componentDatatype:t,componentsPerAttribute:b,normalize:s,values:y})}let S;if(g=o[u++],g>0){const e=y.length/b;for(S=a.IndexDatatype.createTypedArray(e,g),c=0;c<g;c++)S[c]=o[u++]}d[p++]=new i.Geometry({primitiveType:e,geometryType:f,boundingSphere:l,boundingSphereCV:m,indices:S,attributes:x,offsetAttribute:h})}return d},h.packCombineGeometryParameters=function(e,n){const r=e.createGeometryResults,o=r.length;for(let e=0;e<o;e++)n.push(r[e].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:y(e.instances,n),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof t.GeographicProjection,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},h.unpackCombineGeometryParameters=function(e){const n=function(e){const t=e,n=new Array(t[0]);let o=0,i=1;for(;i<t.length;){const e=d.Matrix4.unpack(t,i);let s;i+=d.Matrix4.packedLength,r.defined(t[i])&&(s={offset:new u(t[i],t[i+1],t[i+2])}),i+=3,n[o++]={modelMatrix:e,attributes:s}}return n}(e.packedInstances),i=e.createGeometryResults,s=i.length;let c=0;for(let e=0;e<s;e++){const t=h.unpackCreateGeometryResults(i[e]),r=t.length;for(let e=0;e<r;e++){const r=t[e];n[c].geometry=r,++c}}const a=o.Ellipsoid.clone(e.ellipsoid);return{instances:n,ellipsoid:a,projection:e.isGeographic?new t.GeographicProjection(a):new p.WebMercatorProjection(a),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:d.Matrix4.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},h.packCombineGeometryResults=function(e,t){r.defined(e.geometries)&&function(e,t){const n=e.length;for(let r=0;r<n;++r)g(e[r],t)}(e.geometries,t);const n=b(e.boundingSpheres),o=b(e.boundingSpheresCV);return t.push(n.buffer,o.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:n,boundingSpheresCV:o}},h.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:x(e.boundingSpheres),boundingSpheresCV:x(e.boundingSpheresCV)}};var G=h;e.PrimitivePipeline=G}));
public/CIMSDK/Workers/RectangleGeometryLibrary-7aaf0b55.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./defaultValue-865ac579","./Transforms-221c7c82","./Math-76ce6367","./Matrix2-2fdcdec7"],(function(t,n,a,e,o,r){"use strict";const s=Math.cos,i=Math.sin,c=Math.sqrt,g={computePosition:function(t,n,e,o,r,g,u){const h=n.radiiSquared,l=t.nwCorner,C=t.boundingRectangle;let S=l.latitude-t.granYCos*o+r*t.granXSin;const d=s(S),M=i(S),w=h.z*M;let X=l.longitude+o*t.granYSin+r*t.granXCos;const Y=d*s(X),m=d*i(X),f=h.x*Y,p=h.y*m,x=c(f*Y+p*m+w*M);if(g.x=f/x,g.y=p/x,g.z=w/x,e){const n=t.stNwCorner;a.defined(n)?(S=n.latitude-t.stGranYCos*o+r*t.stGranXSin,X=n.longitude+o*t.stGranYSin+r*t.stGranXCos,u.x=(X-t.stWest)*t.lonScalar,u.y=(S-t.stSouth)*t.latScalar):(u.x=(X-C.west)*t.lonScalar,u.y=(S-C.south)*t.latScalar)}}},u=new r.Matrix2;let h=new n.Cartesian3;const l=new n.Cartographic;let C=new n.Cartesian3;const S=new e.GeographicProjection;function d(t,a,e,o,s,i,c){const g=Math.cos(a),l=o*g,d=e*g,M=Math.sin(a),w=o*M,X=e*M;h=S.project(t,h),h=n.Cartesian3.subtract(h,C,h);const Y=r.Matrix2.fromRotation(a,u);h=r.Matrix2.multiplyByVector(Y,h,h),h=n.Cartesian3.add(h,C,h),i-=1,c-=1;const m=(t=S.unproject(h,t)).latitude,f=m+i*X,p=m-l*c,x=m-l*c+i*X,G=Math.max(m,f,p,x),R=Math.min(m,f,p,x),y=t.longitude,O=y+i*d,P=y+c*w,W=y+c*w+i*d;return{north:G,south:R,east:Math.max(y,O,P,W),west:Math.min(y,O,P,W),granYCos:l,granYSin:w,granXCos:d,granXSin:X,nwCorner:t}}g.computeOptions=function(t,n,a,e,s,i,c){let g,u=t.east,h=t.west,M=t.north,w=t.south,X=!1,Y=!1;M===o.CesiumMath.PI_OVER_TWO&&(X=!0),w===-o.CesiumMath.PI_OVER_TWO&&(Y=!0);const m=M-w;g=h>u?o.CesiumMath.TWO_PI-h+u:u-h;const f=Math.ceil(g/n)+1,p=Math.ceil(m/n)+1,x=g/(f-1),G=m/(p-1),R=r.Rectangle.northwest(t,i),y=r.Rectangle.center(t,l);0===a&&0===e||(y.longitude<R.longitude&&(y.longitude+=o.CesiumMath.TWO_PI),C=S.project(y,C));const O=G,P=x,W=r.Rectangle.clone(t,s),_={granYCos:O,granYSin:0,granXCos:P,granXSin:0,nwCorner:R,boundingRectangle:W,width:f,height:p,northCap:X,southCap:Y};if(0!==a){const t=d(R,a,x,G,0,f,p);M=t.north,w=t.south,u=t.east,h=t.west,_.granYCos=t.granYCos,_.granYSin=t.granYSin,_.granXCos=t.granXCos,_.granXSin=t.granXSin,W.north=M,W.south=w,W.east=u,W.west=h}if(0!==e){a-=e;const t=r.Rectangle.northwest(W,c),n=d(t,a,x,G,0,f,p);_.stGranYCos=n.granYCos,_.stGranXCos=n.granXCos,_.stGranYSin=n.granYSin,_.stGranXSin=n.granXSin,_.stNwCorner=t,_.stWest=n.west,_.stSouth=n.south}return _};var M=g;t.RectangleGeometryLibrary=M}));
public/CIMSDK/Workers/TerrainEncoding-692d7e68.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Transforms-221c7c82","./Matrix3-aeb3c326","./defaultValue-865ac579","./Matrix2-2fdcdec7","./AttributeCompression-10297289","./ComponentDatatype-985dcc38","./Math-76ce6367"],(function(t,e,i,o,a,r,n,s){"use strict";function c(t,e){this._ellipsoid=t,this._cameraPosition=new i.Cartesian3,this._cameraPositionInScaledSpace=new i.Cartesian3,this._distanceToLimbInScaledSpaceSquared=0,o.defined(e)&&(this.cameraPosition=e)}Object.defineProperties(c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(t){const e=this._ellipsoid.transformPositionToScaledSpace(t,this._cameraPositionInScaledSpace),o=i.Cartesian3.magnitudeSquared(e)-1;i.Cartesian3.clone(t,this._cameraPosition),this._cameraPositionInScaledSpace=e,this._distanceToLimbInScaledSpaceSquared=o}}});const d=new i.Cartesian3;c.prototype.isPointVisible=function(t){return C(this._ellipsoid.transformPositionToScaledSpace(t,d),this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)},c.prototype.isScaledSpacePointVisible=function(t){return C(t,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};const u=new i.Cartesian3;c.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(t,e){const i=this._ellipsoid;let a,r;return o.defined(e)&&e<0&&i.minimumRadius>-e?(r=u,r.x=this._cameraPosition.x/(i.radii.x+e),r.y=this._cameraPosition.y/(i.radii.y+e),r.z=this._cameraPosition.z/(i.radii.z+e),a=r.x*r.x+r.y*r.y+r.z*r.z-1):(r=this._cameraPositionInScaledSpace,a=this._distanceToLimbInScaledSpaceSquared),C(t,r,a)},c.prototype.computeHorizonCullingPoint=function(t,e,i){return p(this._ellipsoid,t,e,i)};const l=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE);c.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(t,e,i,o){return p(f(this._ellipsoid,i,l),t,e,o)},c.prototype.computeHorizonCullingPointFromVertices=function(t,e,i,o,a){return S(this._ellipsoid,t,e,i,o,a)},c.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(t,e,i,o,a,r){return S(f(this._ellipsoid,a,l),t,e,i,o,r)};const m=[];c.prototype.computeHorizonCullingPointFromRectangle=function(t,o,r){const n=a.Rectangle.subsample(t,o,0,m),s=e.BoundingSphere.fromPoints(n);if(!(i.Cartesian3.magnitude(s.center)<.1*o.minimumRadius))return this.computeHorizonCullingPoint(s.center,n,r)};const h=new i.Cartesian3;function f(t,e,a){if(o.defined(e)&&e<0&&t.minimumRadius>-e){const o=i.Cartesian3.fromElements(t.radii.x+e,t.radii.y+e,t.radii.z+e,h);t=i.Ellipsoid.fromCartesian3(o,a)}return t}function p(t,e,a,r){o.defined(r)||(r=new i.Cartesian3);const n=b(t,e);let s=0;for(let e=0,i=a.length;e<i;++e){const i=N(t,a[e],n);if(i<0)return;s=Math.max(s,i)}return M(n,s,r)}const x=new i.Cartesian3;function S(t,e,a,r,n,s){o.defined(s)||(s=new i.Cartesian3),r=o.defaultValue(r,3),n=o.defaultValue(n,i.Cartesian3.ZERO);const c=b(t,e);let d=0;for(let e=0,i=a.length;e<i;e+=r){x.x=a[e]+n.x,x.y=a[e+1]+n.y,x.z=a[e+2]+n.z;const i=N(t,x,c);if(i<0)return;d=Math.max(d,i)}return M(c,d,s)}function C(t,e,o){const a=e,r=o,n=i.Cartesian3.subtract(t,a,d),s=-i.Cartesian3.dot(n,a);return!(r<0?s>0:s>r&&s*s/i.Cartesian3.magnitudeSquared(n)>r)}const g=new i.Cartesian3,y=new i.Cartesian3;function N(t,e,o){const a=t.transformPositionToScaledSpace(e,g);let r=i.Cartesian3.magnitudeSquared(a),n=Math.sqrt(r);const s=i.Cartesian3.divideByScalar(a,n,y);r=Math.max(1,r),n=Math.max(1,n);const c=1/n;return 1/(i.Cartesian3.dot(s,o)*c-i.Cartesian3.magnitude(i.Cartesian3.cross(s,o,s))*(Math.sqrt(r-1)*c))}function M(t,e,o){if(!(e<=0||e===1/0||e!=e))return i.Cartesian3.multiplyByScalar(t,e,o)}const T=new i.Cartesian3;function b(t,e){return i.Cartesian3.equals(e,i.Cartesian3.ZERO)?e:(t.transformPositionToScaledSpace(e,T),i.Cartesian3.normalize(T,T))}const P={getHeight:function(t,e,i){return(t-i)*e+i}},z=new i.Cartesian3;P.getPosition=function(t,e,o,a,r){const n=e.cartesianToCartographic(t,z),s=P.getHeight(n.height,o,a);return i.Cartesian3.fromRadians(n.longitude,n.latitude,s,e,r)};var _=P;var E=Object.freeze({NONE:0,BITS12:1});const H=new i.Cartesian3,w=new i.Cartesian3,A=new a.Cartesian2,I=new a.Matrix4,V=new a.Matrix4,q=Math.pow(2,12);function G(t,e,r,n,s,c,d,u,l,m){let h,f,p=E.NONE;if(o.defined(e)&&o.defined(r)&&o.defined(n)&&o.defined(s)){const t=e.minimum,o=e.maximum,c=i.Cartesian3.subtract(o,t,w),d=n-r;p=Math.max(i.Cartesian3.maximumComponent(c),d)<q-1?E.BITS12:E.NONE,h=a.Matrix4.inverseTransformation(s,new a.Matrix4);const u=i.Cartesian3.negate(t,H);a.Matrix4.multiply(a.Matrix4.fromTranslation(u,I),h,h);const l=H;l.x=1/c.x,l.y=1/c.y,l.z=1/c.z,a.Matrix4.multiply(a.Matrix4.fromScale(l,I),h,h),f=a.Matrix4.clone(s),a.Matrix4.setTranslation(f,i.Cartesian3.ZERO,f),s=a.Matrix4.clone(s,new a.Matrix4);const m=a.Matrix4.fromTranslation(t,I),x=a.Matrix4.fromScale(c,V),S=a.Matrix4.multiply(m,x,I);a.Matrix4.multiply(s,S,s),a.Matrix4.multiply(f,S,f)}this.quantization=p,this.minimumHeight=r,this.maximumHeight=n,this.center=i.Cartesian3.clone(t),this.toScaledENU=h,this.fromScaledENU=s,this.matrix=f,this.hasVertexNormals=c,this.hasWebMercatorT=o.defaultValue(d,!1),this.hasGeodeticSurfaceNormals=o.defaultValue(u,!1),this.exaggeration=o.defaultValue(l,1),this.exaggerationRelativeHeight=o.defaultValue(m,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}G.prototype.encode=function(t,e,o,n,c,d,u,l,m,h,f){const p=n.x,x=n.y;if(this.quantization===E.BITS12){(o=a.Matrix4.multiplyByPoint(this.toScaledENU,o,H)).x=s.CesiumMath.clamp(o.x,0,1),o.y=s.CesiumMath.clamp(o.y,0,1),o.z=s.CesiumMath.clamp(o.z,0,1);const i=this.maximumHeight-this.minimumHeight,n=s.CesiumMath.clamp((c-this.minimumHeight)/i,0,1);a.Cartesian2.fromElements(o.x,o.y,A);const d=r.AttributeCompression.compressTextureCoordinates(A);a.Cartesian2.fromElements(o.z,n,A);const l=r.AttributeCompression.compressTextureCoordinates(A);a.Cartesian2.fromElements(p,x,A);const m=r.AttributeCompression.compressTextureCoordinates(A);if(t[e++]=d,t[e++]=l,t[e++]=m,this.hasWebMercatorT){a.Cartesian2.fromElements(u,0,A);const i=r.AttributeCompression.compressTextureCoordinates(A);t[e++]=i}}else i.Cartesian3.subtract(o,this.center,H),t[e++]=H.x,t[e++]=H.y,t[e++]=H.z,t[e++]=c,t[e++]=p,t[e++]=x,this.hasWebMercatorT&&(t[e++]=u);return this.hasVertexNormals&&(m?t[e++]=d:(h&&(d.x=123.456,d.y=123.456),t[e++]=r.AttributeCompression.octPackFloat(d))),this.hasGeodeticSurfaceNormals&&(t[e++]=l.x,t[e++]=l.y,t[e++]=l.z),t[e++]=f,e};const O=new i.Cartesian3,B=new i.Cartesian3;G.prototype.addGeodeticSurfaceNormals=function(t,e,i){if(this.hasGeodeticSurfaceNormals)return;const o=this.stride,a=t.length/o;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();const r=this.stride;for(let n=0;n<a;n++){for(let i=0;i<o;i++){const a=n*o+i;e[n*r+i]=t[a]}const a=this.decodePosition(e,n,O),s=i.geodeticSurfaceNormal(a,B),c=n*r+this._offsetGeodeticSurfaceNormal;e[c]=s.x,e[c+1]=s.y,e[c+2]=s.z}},G.prototype.removeGeodeticSurfaceNormals=function(t,e){if(!this.hasGeodeticSurfaceNormals)return;const i=this.stride,o=t.length/i;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();const a=this.stride;for(let r=0;r<o;r++)for(let o=0;o<a;o++){const n=r*i+o;e[r*a+o]=t[n]}},G.prototype.decodePosition=function(t,e,n){if(o.defined(n)||(n=new i.Cartesian3),e*=this.stride,this.quantization===E.BITS12){const i=r.AttributeCompression.decompressTextureCoordinates(t[e],A);n.x=i.x,n.y=i.y;const o=r.AttributeCompression.decompressTextureCoordinates(t[e+1],A);return n.z=o.x,a.Matrix4.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=t[e],n.y=t[e+1],n.z=t[e+2],i.Cartesian3.add(n,this.center,n)},G.prototype.getExaggeratedPosition=function(t,e,i){i=this.decodePosition(t,e,i);const o=this.exaggeration,a=this.exaggerationRelativeHeight;if(1!==o&&this.hasGeodeticSurfaceNormals){const r=this.decodeGeodeticSurfaceNormal(t,e,B),n=this.decodeHeight(t,e),s=_.getHeight(n,o,a)-n;i.x+=r.x*s,i.y+=r.y*s,i.z+=r.z*s}return i},G.prototype.decodeTextureCoordinates=function(t,e,i){return o.defined(i)||(i=new a.Cartesian2),e*=this.stride,this.quantization===E.BITS12?r.AttributeCompression.decompressTextureCoordinates(t[e+2],i):a.Cartesian2.fromElements(t[e+4],t[e+5],i)},G.prototype.decodeHeight=function(t,e){if(e*=this.stride,this.quantization===E.BITS12){return r.AttributeCompression.decompressTextureCoordinates(t[e+1],A).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight}return t[e+3]},G.prototype.decodeWebMercatorT=function(t,e){return e*=this.stride,this.quantization===E.BITS12?r.AttributeCompression.decompressTextureCoordinates(t[e+3],A).x:t[e+6]},G.prototype.getOctEncodedNormal=function(t,e,i){const o=t[e=e*this.stride+this._offsetVertexNormal]/256,r=Math.floor(o),n=256*(o-r);return a.Cartesian2.fromElements(r,n,i)},G.prototype.decodeGeodeticSurfaceNormal=function(t,e,i){return e=e*this.stride+this._offsetGeodeticSurfaceNormal,i.x=t[e],i.y=t[e+1],i.z=t[e+2],i},G.prototype._calculateStrideAndOffsets=function(){let t=0;if(this.quantization===E.BITS12)t+=3;else t+=6;this.hasWebMercatorT&&(t+=1),this.hasVertexNormals&&(this._offsetVertexNormal=t,t+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=t,t+=3),t+=1,this.stride=t};const R={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2,skirt:3},U={compressed0:0,compressed1:1,geodeticSurfaceNormal:2,skirt:3};G.prototype.getAttributes=function(t){const e=n.ComponentDatatype.FLOAT,i=n.ComponentDatatype.getSizeInBytes(e),o=this.stride*i;let a=0;const r=[];function s(n,s){r.push({index:n,vertexBuffer:t,componentDatatype:e,componentsPerAttribute:s,offsetInBytes:a,strideInBytes:o}),a+=s*i}if(this.quantization===E.NONE){s(R.position3DAndHeight,4);let t=2;t+=this.hasWebMercatorT?1:0,t+=this.hasVertexNormals?1:0,s(R.textureCoordAndEncodedNormals,t),this.hasGeodeticSurfaceNormals&&s(R.geodeticSurfaceNormal,3),s(R.skirt,1)}else{const t=this.hasWebMercatorT||this.hasVertexNormals,e=this.hasWebMercatorT&&this.hasVertexNormals;s(U.compressed0,t?4:3),e&&s(U.compressed1,1),this.hasGeodeticSurfaceNormals&&s(U.geodeticSurfaceNormal,3),s(U.skirt,1)}return r},G.prototype.getAttributeLocations=function(){return this.quantization===E.NONE?R:U},G.clone=function(t,e){if(o.defined(t))return o.defined(e)||(e=new G),e.quantization=t.quantization,e.minimumHeight=t.minimumHeight,e.maximumHeight=t.maximumHeight,e.center=i.Cartesian3.clone(t.center),e.toScaledENU=a.Matrix4.clone(t.toScaledENU),e.fromScaledENU=a.Matrix4.clone(t.fromScaledENU),e.matrix=a.Matrix4.clone(t.matrix),e.hasVertexNormals=t.hasVertexNormals,e.hasWebMercatorT=t.hasWebMercatorT,e.hasGeodeticSurfaceNormals=t.hasGeodeticSurfaceNormals,e.exaggeration=t.exaggeration,e.exaggerationRelativeHeight=t.exaggerationRelativeHeight,e._calculateStrideAndOffsets(),e},t.EllipsoidalOccluder=c,t.TerrainEncoding=G}));
public/CIMSDK/Workers/Transforms-221c7c82.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
define(["require","exports","./Matrix3-aeb3c326","./defaultValue-865ac579","./Math-76ce6367","./Matrix2-2fdcdec7","./combine-5e110d09","./RuntimeError-9e0724f9"],(function(e,t,n,r,o,i,s,a){"use strict";function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}function c(e){let t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}r.defined(Object.create)&&(c.prototype=Object.create(Error.prototype),c.prototype.constructor=c),c.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return r.defined(this.stack)&&(e+=`\n${this.stack.toString()}`),e},c.throwInstantiationError=function(){throw new c("This function defines an interface and should not be called directly.")};const l={};function d(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}l.typeOf={},l.defined=function(e,t){if(!r.defined(t))throw new c(function(e){return`${e} is required, actual value was undefined`}(e))},l.typeOf.func=function(e,t){if("function"!=typeof t)throw new c(d(typeof t,"function",e))},l.typeOf.string=function(e,t){if("string"!=typeof t)throw new c(d(typeof t,"string",e))},l.typeOf.number=function(e,t){if("number"!=typeof t)throw new c(d(typeof t,"number",e))},l.typeOf.number.lessThan=function(e,t,n){if(l.typeOf.number(e,t),t>=n)throw new c(`Expected ${e} to be less than ${n}, actual value was ${t}`)},l.typeOf.number.lessThanOrEquals=function(e,t,n){if(l.typeOf.number(e,t),t>n)throw new c(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)},l.typeOf.number.greaterThan=function(e,t,n){if(l.typeOf.number(e,t),t<=n)throw new c(`Expected ${e} to be greater than ${n}, actual value was ${t}`)},l.typeOf.number.greaterThanOrEquals=function(e,t,n){if(l.typeOf.number(e,t),t<n)throw new c(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)},l.typeOf.object=function(e,t){if("object"!=typeof t)throw new c(d(typeof t,"object",e))},l.typeOf.bool=function(e,t){if("boolean"!=typeof t)throw new c(d(typeof t,"boolean",e))},l.typeOf.bigint=function(e,t){if("bigint"!=typeof t)throw new c(d(typeof t,"bigint",e))},l.typeOf.number.equals=function(e,t,n,r){if(l.typeOf.number(e,n),l.typeOf.number(t,r),n!==r)throw new c(`${e} must be equal to ${t}, the actual values are ${n} and ${r}`)};var f=l,p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e){this._ellipsoid=r.defaultValue(e,n.Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(h.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),h.prototype.project=function(e,t){const o=this._semimajorAxis,i=e.longitude*o,s=e.latitude*o,a=e.height;return r.defined(t)?(t.x=i,t.y=s,t.z=a,t):new n.Cartesian3(i,s,a)},h.prototype.unproject=function(e,t){const o=this._oneOverSemimajorAxis,i=e.x*o,s=e.y*o,a=e.z;return r.defined(t)?(t.longitude=i,t.latitude=s,t.height=a,t):new n.Cartographic(i,s,a)};var m=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});function g(e,t){this.start=r.defaultValue(e,0),this.stop=r.defaultValue(t,0)}function y(e,t){this.center=n.Cartesian3.clone(r.defaultValue(e,n.Cartesian3.ZERO)),this.radius=r.defaultValue(t,0)}const v=new n.Cartesian3,w=new n.Cartesian3,_=new n.Cartesian3,C=new n.Cartesian3,b=new n.Cartesian3,x=new n.Cartesian3,S=new n.Cartesian3,A=new n.Cartesian3,E=new n.Cartesian3,O=new n.Cartesian3,I=new n.Cartesian3,P=new n.Cartesian3,R=4/3*o.CesiumMath.PI;y.fromPoints=function(e,t){if(r.defined(t)||(t=new y),!r.defined(e)||0===e.length)return t.center=n.Cartesian3.clone(n.Cartesian3.ZERO,t.center),t.radius=0,t;const o=n.Cartesian3.clone(e[0],S),i=n.Cartesian3.clone(o,v),s=n.Cartesian3.clone(o,w),a=n.Cartesian3.clone(o,_),u=n.Cartesian3.clone(o,C),c=n.Cartesian3.clone(o,b),l=n.Cartesian3.clone(o,x),d=e.length;let f;for(f=1;f<d;f++){n.Cartesian3.clone(e[f],o);const t=o.x,r=o.y,d=o.z;t<i.x&&n.Cartesian3.clone(o,i),t>u.x&&n.Cartesian3.clone(o,u),r<s.y&&n.Cartesian3.clone(o,s),r>c.y&&n.Cartesian3.clone(o,c),d<a.z&&n.Cartesian3.clone(o,a),d>l.z&&n.Cartesian3.clone(o,l)}const p=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(u,i,A)),h=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(c,s,A)),m=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(l,a,A));let g=i,R=u,T=p;h>T&&(T=h,g=s,R=c),m>T&&(T=m,g=a,R=l);const q=E;q.x=.5*(g.x+R.x),q.y=.5*(g.y+R.y),q.z=.5*(g.z+R.z);let z=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(R,q,A)),M=Math.sqrt(z);const D=O;D.x=i.x,D.y=s.y,D.z=a.z;const U=I;U.x=u.x,U.y=c.y,U.z=l.z;const k=n.Cartesian3.midpoint(D,U,P);let F=0;for(f=0;f<d;f++){n.Cartesian3.clone(e[f],o);const t=n.Cartesian3.magnitude(n.Cartesian3.subtract(o,k,A));t>F&&(F=t);const r=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(o,q,A));if(r>z){const e=Math.sqrt(r);M=.5*(M+e),z=M*M;const t=e-M;q.x=(M*q.x+t*o.x)/e,q.y=(M*q.y+t*o.y)/e,q.z=(M*q.z+t*o.z)/e}}return M<F?(n.Cartesian3.clone(q,t.center),t.radius=M):(n.Cartesian3.clone(k,t.center),t.radius=F),t};const T=new h,q=new n.Cartesian3,z=new n.Cartesian3,M=new n.Cartographic,D=new n.Cartographic;y.fromRectangle2D=function(e,t,n){return y.fromRectangleWithHeights2D(e,t,0,0,n)},y.fromRectangleWithHeights2D=function(e,t,o,s,a){if(r.defined(a)||(a=new y),!r.defined(e))return a.center=n.Cartesian3.clone(n.Cartesian3.ZERO,a.center),a.radius=0,a;t=r.defaultValue(t,T),i.Rectangle.southwest(e,M),M.height=o,i.Rectangle.northeast(e,D),D.height=s;const u=t.project(M,q),c=t.project(D,z),l=c.x-u.x,d=c.y-u.y,f=c.z-u.z;a.radius=.5*Math.sqrt(l*l+d*d+f*f);const p=a.center;return p.x=u.x+.5*l,p.y=u.y+.5*d,p.z=u.z+.5*f,a};const U=[];y.fromRectangle3D=function(e,t,o,s){if(t=r.defaultValue(t,n.Ellipsoid.WGS84),o=r.defaultValue(o,0),r.defined(s)||(s=new y),!r.defined(e))return s.center=n.Cartesian3.clone(n.Cartesian3.ZERO,s.center),s.radius=0,s;const a=i.Rectangle.subsample(e,t,o,U);return y.fromPoints(a,s)},y.fromVertices=function(e,t,o,i){if(r.defined(i)||(i=new y),!r.defined(e)||0===e.length)return i.center=n.Cartesian3.clone(n.Cartesian3.ZERO,i.center),i.radius=0,i;t=r.defaultValue(t,n.Cartesian3.ZERO),o=r.defaultValue(o,3);const s=S;s.x=e[0]+t.x,s.y=e[1]+t.y,s.z=e[2]+t.z;const a=n.Cartesian3.clone(s,v),u=n.Cartesian3.clone(s,w),c=n.Cartesian3.clone(s,_),l=n.Cartesian3.clone(s,C),d=n.Cartesian3.clone(s,b),f=n.Cartesian3.clone(s,x),p=e.length;let h;for(h=0;h<p;h+=o){const r=e[h]+t.x,o=e[h+1]+t.y,i=e[h+2]+t.z;s.x=r,s.y=o,s.z=i,r<a.x&&n.Cartesian3.clone(s,a),r>l.x&&n.Cartesian3.clone(s,l),o<u.y&&n.Cartesian3.clone(s,u),o>d.y&&n.Cartesian3.clone(s,d),i<c.z&&n.Cartesian3.clone(s,c),i>f.z&&n.Cartesian3.clone(s,f)}const m=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(l,a,A)),g=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(d,u,A)),R=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(f,c,A));let T=a,q=l,z=m;g>z&&(z=g,T=u,q=d),R>z&&(z=R,T=c,q=f);const M=E;M.x=.5*(T.x+q.x),M.y=.5*(T.y+q.y),M.z=.5*(T.z+q.z);let D=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(q,M,A)),U=Math.sqrt(D);const k=O;k.x=a.x,k.y=u.y,k.z=c.z;const F=I;F.x=l.x,F.y=d.y,F.z=f.z;const N=n.Cartesian3.midpoint(k,F,P);let j=0;for(h=0;h<p;h+=o){s.x=e[h]+t.x,s.y=e[h+1]+t.y,s.z=e[h+2]+t.z;const r=n.Cartesian3.magnitude(n.Cartesian3.subtract(s,N,A));r>j&&(j=r);const o=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(s,M,A));if(o>D){const e=Math.sqrt(o);U=.5*(U+e),D=U*U;const t=e-U;M.x=(U*M.x+t*s.x)/e,M.y=(U*M.y+t*s.y)/e,M.z=(U*M.z+t*s.z)/e}}return U<j?(n.Cartesian3.clone(M,i.center),i.radius=U):(n.Cartesian3.clone(N,i.center),i.radius=j),i},y.fromEncodedCartesianVertices=function(e,t,o){if(r.defined(o)||(o=new y),!r.defined(e)||!r.defined(t)||e.length!==t.length||0===e.length)return o.center=n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=0,o;const i=S;i.x=e[0]+t[0],i.y=e[1]+t[1],i.z=e[2]+t[2];const s=n.Cartesian3.clone(i,v),a=n.Cartesian3.clone(i,w),u=n.Cartesian3.clone(i,_),c=n.Cartesian3.clone(i,C),l=n.Cartesian3.clone(i,b),d=n.Cartesian3.clone(i,x),f=e.length;let p;for(p=0;p<f;p+=3){const r=e[p]+t[p],o=e[p+1]+t[p+1],f=e[p+2]+t[p+2];i.x=r,i.y=o,i.z=f,r<s.x&&n.Cartesian3.clone(i,s),r>c.x&&n.Cartesian3.clone(i,c),o<a.y&&n.Cartesian3.clone(i,a),o>l.y&&n.Cartesian3.clone(i,l),f<u.z&&n.Cartesian3.clone(i,u),f>d.z&&n.Cartesian3.clone(i,d)}const h=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(c,s,A)),m=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(l,a,A)),g=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(d,u,A));let R=s,T=c,q=h;m>q&&(q=m,R=a,T=l),g>q&&(q=g,R=u,T=d);const z=E;z.x=.5*(R.x+T.x),z.y=.5*(R.y+T.y),z.z=.5*(R.z+T.z);let M=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(T,z,A)),D=Math.sqrt(M);const U=O;U.x=s.x,U.y=a.y,U.z=u.z;const k=I;k.x=c.x,k.y=l.y,k.z=d.z;const F=n.Cartesian3.midpoint(U,k,P);let N=0;for(p=0;p<f;p+=3){i.x=e[p]+t[p],i.y=e[p+1]+t[p+1],i.z=e[p+2]+t[p+2];const r=n.Cartesian3.magnitude(n.Cartesian3.subtract(i,F,A));r>N&&(N=r);const o=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(i,z,A));if(o>M){const e=Math.sqrt(o);D=.5*(D+e),M=D*D;const t=e-D;z.x=(D*z.x+t*i.x)/e,z.y=(D*z.y+t*i.y)/e,z.z=(D*z.z+t*i.z)/e}}return D<N?(n.Cartesian3.clone(z,o.center),o.radius=D):(n.Cartesian3.clone(F,o.center),o.radius=N),o},y.fromCornerPoints=function(e,t,o){r.defined(o)||(o=new y);const i=n.Cartesian3.midpoint(e,t,o.center);return o.radius=n.Cartesian3.distance(i,t),o},y.fromEllipsoid=function(e,t){return r.defined(t)||(t=new y),n.Cartesian3.clone(n.Cartesian3.ZERO,t.center),t.radius=e.maximumRadius,t};const k=new n.Cartesian3;y.fromBoundingSpheres=function(e,t){if(r.defined(t)||(t=new y),!r.defined(e)||0===e.length)return t.center=n.Cartesian3.clone(n.Cartesian3.ZERO,t.center),t.radius=0,t;const o=e.length;if(1===o)return y.clone(e[0],t);if(2===o)return y.union(e[0],e[1],t);const i=[];let s;for(s=0;s<o;s++)i.push(e[s].center);const a=(t=y.fromPoints(i,t)).center;let u=t.radius;for(s=0;s<o;s++){const t=e[s];u=Math.max(u,n.Cartesian3.distance(a,t.center,k)+t.radius)}return t.radius=u,t};const F=new n.Cartesian3,N=new n.Cartesian3,j=new n.Cartesian3;y.fromOrientedBoundingBox=function(e,t){r.defined(t)||(t=new y);const o=e.halfAxes,i=n.Matrix3.getColumn(o,0,F),s=n.Matrix3.getColumn(o,1,N),a=n.Matrix3.getColumn(o,2,j);return n.Cartesian3.add(i,s,i),n.Cartesian3.add(i,a,i),t.center=n.Cartesian3.clone(e.center,t.center),t.radius=n.Cartesian3.magnitude(i),t};const B=new n.Cartesian3,V=new n.Cartesian3;y.fromTransformation=function(e,t){r.defined(t)||(t=new y);const o=i.Matrix4.getTranslation(e,B),s=i.Matrix4.getScale(e,V),a=.5*n.Cartesian3.magnitude(s);return t.center=n.Cartesian3.clone(o,t.center),t.radius=a,t},y.clone=function(e,t){if(r.defined(e))return r.defined(t)?(t.center=n.Cartesian3.clone(e.center,t.center),t.radius=e.radius,t):new y(e.center,e.radius)},y.packedLength=4,y.pack=function(e,t,n){n=r.defaultValue(n,0);const o=e.center;return t[n++]=o.x,t[n++]=o.y,t[n++]=o.z,t[n]=e.radius,t},y.unpack=function(e,t,n){t=r.defaultValue(t,0),r.defined(n)||(n=new y);const o=n.center;return o.x=e[t++],o.y=e[t++],o.z=e[t++],n.radius=e[t],n};const $=new n.Cartesian3,L=new n.Cartesian3;y.union=function(e,t,o){r.defined(o)||(o=new y);const i=e.center,s=e.radius,a=t.center,u=t.radius,c=n.Cartesian3.subtract(a,i,$),l=n.Cartesian3.magnitude(c);if(s>=l+u)return e.clone(o),o;if(u>=l+s)return t.clone(o),o;const d=.5*(s+l+u),f=n.Cartesian3.multiplyByScalar(c,(-s+d)/l,L);return n.Cartesian3.add(f,i,f),n.Cartesian3.clone(f,o.center),o.radius=d,o};const Q=new n.Cartesian3;y.expand=function(e,t,r){r=y.clone(e,r);const o=n.Cartesian3.magnitude(n.Cartesian3.subtract(t,r.center,Q));return o>r.radius&&(r.radius=o),r},y.intersectPlane=function(e,t){const r=e.center,o=e.radius,i=t.normal,s=n.Cartesian3.dot(i,r)+t.distance;return s<-o?m.OUTSIDE:s<o?m.INTERSECTING:m.INSIDE},y.transform=function(e,t,n){return r.defined(n)||(n=new y),n.center=i.Matrix4.multiplyByPoint(t,e.center,n.center),n.radius=i.Matrix4.getMaximumScale(t)*e.radius,n};const W=new n.Cartesian3;y.distanceSquaredTo=function(e,t){const r=n.Cartesian3.subtract(e.center,t,W),o=n.Cartesian3.magnitude(r)-e.radius;return o<=0?0:o*o},y.transformWithoutScale=function(e,t,n){return r.defined(n)||(n=new y),n.center=i.Matrix4.multiplyByPoint(t,e.center,n.center),n.radius=e.radius,n};const H=new n.Cartesian3;y.computePlaneDistances=function(e,t,o,i){r.defined(i)||(i=new g);const s=n.Cartesian3.subtract(e.center,t,H),a=n.Cartesian3.dot(o,s);return i.start=a-e.radius,i.stop=a+e.radius,i};const Y=new n.Cartesian3,Z=new n.Cartesian3,G=new n.Cartesian3,J=new n.Cartesian3,X=new n.Cartesian3,K=new n.Cartographic,ee=new Array(8);for(let e=0;e<8;++e)ee[e]=new n.Cartesian3;const te=new h;let ne;y.projectTo2D=function(e,t,o){const i=(t=r.defaultValue(t,te)).ellipsoid;let s=e.center;const a=e.radius;let u;u=n.Cartesian3.equals(s,n.Cartesian3.ZERO)?n.Cartesian3.clone(n.Cartesian3.UNIT_X,Y):i.geodeticSurfaceNormal(s,Y);const c=n.Cartesian3.cross(n.Cartesian3.UNIT_Z,u,Z);n.Cartesian3.normalize(c,c);const l=n.Cartesian3.cross(u,c,G);n.Cartesian3.normalize(l,l),n.Cartesian3.multiplyByScalar(u,a,u),n.Cartesian3.multiplyByScalar(l,a,l),n.Cartesian3.multiplyByScalar(c,a,c);const d=n.Cartesian3.negate(l,X),f=n.Cartesian3.negate(c,J),p=ee;let h=p[0];n.Cartesian3.add(u,l,h),n.Cartesian3.add(h,c,h),h=p[1],n.Cartesian3.add(u,l,h),n.Cartesian3.add(h,f,h),h=p[2],n.Cartesian3.add(u,d,h),n.Cartesian3.add(h,f,h),h=p[3],n.Cartesian3.add(u,d,h),n.Cartesian3.add(h,c,h),n.Cartesian3.negate(u,u),h=p[4],n.Cartesian3.add(u,l,h),n.Cartesian3.add(h,c,h),h=p[5],n.Cartesian3.add(u,l,h),n.Cartesian3.add(h,f,h),h=p[6],n.Cartesian3.add(u,d,h),n.Cartesian3.add(h,f,h),h=p[7],n.Cartesian3.add(u,d,h),n.Cartesian3.add(h,c,h);const m=p.length;for(let e=0;e<m;++e){const r=p[e];n.Cartesian3.add(s,r,r);const o=i.cartesianToCartographic(r,K);t.project(o,r)}s=(o=y.fromPoints(p,o)).center;const g=s.x,v=s.y,w=s.z;return s.x=w,s.y=g,s.z=v,o},y.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)},y.equals=function(e,t){return e===t||r.defined(e)&&r.defined(t)&&n.Cartesian3.equals(e.center,t.center)&&e.radius===t.radius},y.prototype.intersectPlane=function(e){return y.intersectPlane(this,e)},y.prototype.distanceSquaredTo=function(e){return y.distanceSquaredTo(this,e)},y.prototype.computePlaneDistances=function(e,t,n){return y.computePlaneDistances(this,e,t,n)},y.prototype.isOccluded=function(e){return y.isOccluded(this,e)},y.prototype.equals=function(e){return y.equals(this,e)},y.prototype.clone=function(e){return y.clone(this,e)},y.prototype.volume=function(){const e=this.radius;return R*e*e*e};const re={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},oe={};Object.defineProperties(oe,{element:{get:function(){if(oe.supportsFullscreen())return document[re.fullscreenElement]}},changeEventName:{get:function(){if(oe.supportsFullscreen())return re.fullscreenchange}},errorEventName:{get:function(){if(oe.supportsFullscreen())return re.fullscreenerror}},enabled:{get:function(){if(oe.supportsFullscreen())return document[re.fullscreenEnabled]}},fullscreen:{get:function(){if(oe.supportsFullscreen())return null!==oe.element}}}),oe.supportsFullscreen=function(){if(r.defined(ne))return ne;ne=!1;const e=document.body;if("function"==typeof e.requestFullscreen)return re.requestFullscreen="requestFullscreen",re.exitFullscreen="exitFullscreen",re.fullscreenEnabled="fullscreenEnabled",re.fullscreenElement="fullscreenElement",re.fullscreenchange="fullscreenchange",re.fullscreenerror="fullscreenerror",ne=!0,ne;const t=["webkit","moz","o","ms","khtml"];let n;for(let r=0,o=t.length;r<o;++r){const o=t[r];n=`${o}RequestFullscreen`,"function"==typeof e[n]?(re.requestFullscreen=n,ne=!0):(n=`${o}RequestFullScreen`,"function"==typeof e[n]&&(re.requestFullscreen=n,ne=!0)),n=`${o}ExitFullscreen`,"function"==typeof document[n]?re.exitFullscreen=n:(n=`${o}CancelFullScreen`,"function"==typeof document[n]&&(re.exitFullscreen=n)),n=`${o}FullscreenEnabled`,void 0!==document[n]?re.fullscreenEnabled=n:(n=`${o}FullScreenEnabled`,void 0!==document[n]&&(re.fullscreenEnabled=n)),n=`${o}FullscreenElement`,void 0!==document[n]?re.fullscreenElement=n:(n=`${o}FullScreenElement`,void 0!==document[n]&&(re.fullscreenElement=n)),n=`${o}fullscreenchange`,void 0!==document[`on${n}`]&&("ms"===o&&(n="MSFullscreenChange"),re.fullscreenchange=n),n=`${o}fullscreenerror`,void 0!==document[`on${n}`]&&("ms"===o&&(n="MSFullscreenError"),re.fullscreenerror=n)}return ne},oe.requestFullscreen=function(e,t){oe.supportsFullscreen()&&e[re.requestFullscreen]({vrDisplay:t})},oe.exitFullscreen=function(){oe.supportsFullscreen()&&document[re.exitFullscreen]()},oe._names=re;var ie=oe;let se,ae,ue,ce,le,de,fe,pe,he,me,ge,ye,ve,we,_e,Ce,be,xe;function Se(e){const t=e.split(".");for(let e=0,n=t.length;e<n;++e)t[e]=parseInt(t[e],10);return t}function Ae(){if(!r.defined(ae)&&(ae=!1,!Pe())){const e=/ Chrome\/([\.0-9]+)/.exec(se.userAgent);null!==e&&(ae=!0,ue=Se(e[1]))}return ae}function Ee(){if(!r.defined(ce)&&(ce=!1,!Ae()&&!Pe()&&/ Safari\/[\.0-9]+/.test(se.userAgent))){const e=/ Version\/([\.0-9]+)/.exec(se.userAgent);null!==e&&(ce=!0,le=Se(e[1]))}return ce}function Oe(){if(!r.defined(de)){de=!1;const e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(se.userAgent);null!==e&&(de=!0,fe=Se(e[1]),fe.isNightly=!!e[2])}return de}function Ie(){if(!r.defined(pe)){let e;pe=!1,"Microsoft Internet Explorer"===se.appName?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(se.userAgent),null!==e&&(pe=!0,he=Se(e[1]))):"Netscape"===se.appName&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(se.userAgent),null!==e&&(pe=!0,he=Se(e[1])))}return pe}function Pe(){if(!r.defined(me)){me=!1;const e=/ Edg\/([\.0-9]+)/.exec(se.userAgent);null!==e&&(me=!0,ge=Se(e[1]))}return me}function Re(){if(!r.defined(ye)){ye=!1;const e=/Firefox\/([\.0-9]+)/.exec(se.userAgent);null!==e&&(ye=!0,ve=Se(e[1]))}return ye}function Te(){if(!r.defined(xe)){const e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");const t=e.style.imageRendering;xe=r.defined(t)&&""!==t,xe&&(be=t)}return xe}function qe(){return qe._result}se="undefined"!=typeof navigator?navigator:{},qe._promise=void 0,qe._result=void 0,qe.initialize=function(){return r.defined(qe._promise)||(qe._promise=new Promise((e=>{const t=new Image;t.onload=function(){qe._result=t.width>0&&t.height>0,e(qe._result)},t.onerror=function(){qe._result=!1,e(qe._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"}))),qe._promise},Object.defineProperties(qe,{initialized:{get:function(){return r.defined(qe._result)}}});const ze=[];"undefined"!=typeof ArrayBuffer&&(ze.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&ze.push(Uint8ClampedArray),"undefined"!=typeof Uint8ClampedArray&&ze.push(Uint8ClampedArray),"undefined"!=typeof BigInt64Array&&ze.push(BigInt64Array),"undefined"!=typeof BigUint64Array&&ze.push(BigUint64Array));const Me={isChrome:Ae,chromeVersion:function(){return Ae()&&ue},isSafari:Ee,safariVersion:function(){return Ee()&&le},isWebkit:Oe,webkitVersion:function(){return Oe()&&fe},isInternetExplorer:Ie,internetExplorerVersion:function(){return Ie()&&he},isEdge:Pe,edgeVersion:function(){return Pe()&&ge},isFirefox:Re,firefoxVersion:function(){return Re()&&ve},isWindows:function(){return r.defined(we)||(we=/Windows/i.test(se.appVersion)),we},isIPadOrIOS:function(){return r.defined(_e)||(_e="iPhone"===navigator.platform||"iPod"===navigator.platform||"iPad"===navigator.platform),_e},hardwareConcurrency:r.defaultValue(se.hardwareConcurrency,3),supportsPointerEvents:function(){return r.defined(Ce)||(Ce=!Re()&&"undefined"!=typeof PointerEvent&&(!r.defined(se.pointerEnabled)||se.pointerEnabled)),Ce},supportsImageRenderingPixelated:Te,supportsWebP:qe,imageRenderingValue:function(){return Te()?be:void 0},typedArrayTypes:ze,supportsBasis:function(e){return Me.supportsWebAssembly()&&e.context.supportsBasis},supportsFullscreen:function(){return ie.supportsFullscreen()},supportsTypedArrays:function(){return"undefined"!=typeof ArrayBuffer},supportsBigInt64Array:function(){return"undefined"!=typeof BigInt64Array},supportsBigUint64Array:function(){return"undefined"!=typeof BigUint64Array},supportsBigInt:function(){return"undefined"!=typeof BigInt},supportsWebWorkers:function(){return"undefined"!=typeof Worker},supportsWebAssembly:function(){return"undefined"!=typeof WebAssembly}};var De=Me;function Ue(e,t,n,o){this.x=r.defaultValue(e,0),this.y=r.defaultValue(t,0),this.z=r.defaultValue(n,0),this.w=r.defaultValue(o,0)}let ke=new n.Cartesian3;Ue.fromAxisAngle=function(e,t,o){const i=t/2,s=Math.sin(i);ke=n.Cartesian3.normalize(e,ke);const a=ke.x*s,u=ke.y*s,c=ke.z*s,l=Math.cos(i);return r.defined(o)?(o.x=a,o.y=u,o.z=c,o.w=l,o):new Ue(a,u,c,l)};const Fe=[1,2,0],Ne=new Array(3);Ue.fromRotationMatrix=function(e,t){let o,i,s,a,u;const c=e[n.Matrix3.COLUMN0ROW0],l=e[n.Matrix3.COLUMN1ROW1],d=e[n.Matrix3.COLUMN2ROW2],f=c+l+d;if(f>0)o=Math.sqrt(f+1),u=.5*o,o=.5/o,i=(e[n.Matrix3.COLUMN1ROW2]-e[n.Matrix3.COLUMN2ROW1])*o,s=(e[n.Matrix3.COLUMN2ROW0]-e[n.Matrix3.COLUMN0ROW2])*o,a=(e[n.Matrix3.COLUMN0ROW1]-e[n.Matrix3.COLUMN1ROW0])*o;else{const t=Fe;let r=0;l>c&&(r=1),d>c&&d>l&&(r=2);const f=t[r],p=t[f];o=Math.sqrt(e[n.Matrix3.getElementIndex(r,r)]-e[n.Matrix3.getElementIndex(f,f)]-e[n.Matrix3.getElementIndex(p,p)]+1);const h=Ne;h[r]=.5*o,o=.5/o,u=(e[n.Matrix3.getElementIndex(p,f)]-e[n.Matrix3.getElementIndex(f,p)])*o,h[f]=(e[n.Matrix3.getElementIndex(f,r)]+e[n.Matrix3.getElementIndex(r,f)])*o,h[p]=(e[n.Matrix3.getElementIndex(p,r)]+e[n.Matrix3.getElementIndex(r,p)])*o,i=-h[0],s=-h[1],a=-h[2]}return r.defined(t)?(t.x=i,t.y=s,t.z=a,t.w=u,t):new Ue(i,s,a,u)};const je=new Ue;let Be=new Ue,Ve=new Ue,$e=new Ue;Ue.fromHeadingPitchRoll=function(e,t){return $e=Ue.fromAxisAngle(n.Cartesian3.UNIT_X,e.roll,je),Ve=Ue.fromAxisAngle(n.Cartesian3.UNIT_Y,-e.pitch,t),t=Ue.multiply(Ve,$e,Ve),Be=Ue.fromAxisAngle(n.Cartesian3.UNIT_Z,-e.heading,je),Ue.multiply(Be,t,t)};const Le=new n.Cartesian3,Qe=new n.Cartesian3,We=new Ue,He=new Ue,Ye=new Ue;Ue.packedLength=4,Ue.pack=function(e,t,n){return n=r.defaultValue(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},Ue.unpack=function(e,t,n){return t=r.defaultValue(t,0),r.defined(n)||(n=new Ue),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n},Ue.packedInterpolationLength=3,Ue.convertPackedArrayForInterpolation=function(e,t,n,o){Ue.unpack(e,4*n,Ye),Ue.conjugate(Ye,Ye);for(let i=0,s=n-t+1;i<s;i++){const n=3*i;Ue.unpack(e,4*(t+i),We),Ue.multiply(We,Ye,We),We.w<0&&Ue.negate(We,We),Ue.computeAxis(We,Le);const s=Ue.computeAngle(We);r.defined(o)||(o=[]),o[n]=Le.x*s,o[n+1]=Le.y*s,o[n+2]=Le.z*s}},Ue.unpackInterpolationResult=function(e,t,o,i,s){r.defined(s)||(s=new Ue),n.Cartesian3.fromArray(e,0,Qe);const a=n.Cartesian3.magnitude(Qe);return Ue.unpack(t,4*i,He),0===a?Ue.clone(Ue.IDENTITY,We):Ue.fromAxisAngle(Qe,a,We),Ue.multiply(We,He,s)},Ue.clone=function(e,t){if(r.defined(e))return r.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Ue(e.x,e.y,e.z,e.w)},Ue.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t},Ue.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Ue.magnitude=function(e){return Math.sqrt(Ue.magnitudeSquared(e))},Ue.normalize=function(e,t){const n=1/Ue.magnitude(e),r=e.x*n,o=e.y*n,i=e.z*n,s=e.w*n;return t.x=r,t.y=o,t.z=i,t.w=s,t},Ue.inverse=function(e,t){const n=Ue.magnitudeSquared(e);return t=Ue.conjugate(e,t),Ue.multiplyByScalar(t,1/n,t)},Ue.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n},Ue.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n},Ue.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Ue.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Ue.multiply=function(e,t,n){const r=e.x,o=e.y,i=e.z,s=e.w,a=t.x,u=t.y,c=t.z,l=t.w,d=s*a+r*l+o*c-i*u,f=s*u-r*c+o*l+i*a,p=s*c+r*u-o*a+i*l,h=s*l-r*a-o*u-i*c;return n.x=d,n.y=f,n.z=p,n.w=h,n},Ue.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n},Ue.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n},Ue.computeAxis=function(e,t){const n=e.w;if(Math.abs(n-1)<o.CesiumMath.EPSILON6)return t.x=t.y=t.z=0,t;const r=1/Math.sqrt(1-n*n);return t.x=e.x*r,t.y=e.y*r,t.z=e.z*r,t},Ue.computeAngle=function(e){return Math.abs(e.w-1)<o.CesiumMath.EPSILON6?0:2*Math.acos(e.w)};let Ze=new Ue;Ue.lerp=function(e,t,n,r){return Ze=Ue.multiplyByScalar(t,n,Ze),r=Ue.multiplyByScalar(e,1-n,r),Ue.add(Ze,r,r)};let Ge=new Ue,Je=new Ue,Xe=new Ue;Ue.slerp=function(e,t,n,r){let i=Ue.dot(e,t),s=t;if(i<0&&(i=-i,s=Ge=Ue.negate(t,Ge)),1-i<o.CesiumMath.EPSILON6)return Ue.lerp(e,s,n,r);const a=Math.acos(i);return Je=Ue.multiplyByScalar(e,Math.sin((1-n)*a),Je),Xe=Ue.multiplyByScalar(s,Math.sin(n*a),Xe),r=Ue.add(Je,Xe,r),Ue.multiplyByScalar(r,1/Math.sin(a),r)},Ue.log=function(e,t){const r=o.CesiumMath.acosClamped(e.w);let i=0;return 0!==r&&(i=r/Math.sin(r)),n.Cartesian3.multiplyByScalar(e,i,t)},Ue.exp=function(e,t){const r=n.Cartesian3.magnitude(e);let o=0;return 0!==r&&(o=Math.sin(r)/r),t.x=e.x*o,t.y=e.y*o,t.z=e.z*o,t.w=Math.cos(r),t};const Ke=new n.Cartesian3,et=new n.Cartesian3,tt=new Ue,nt=new Ue;Ue.computeInnerQuadrangle=function(e,t,r,o){const i=Ue.conjugate(t,tt);Ue.multiply(i,r,nt);const s=Ue.log(nt,Ke);Ue.multiply(i,e,nt);const a=Ue.log(nt,et);return n.Cartesian3.add(s,a,s),n.Cartesian3.multiplyByScalar(s,.25,s),n.Cartesian3.negate(s,s),Ue.exp(s,tt),Ue.multiply(t,tt,o)},Ue.squad=function(e,t,n,r,o,i){const s=Ue.slerp(e,t,o,tt),a=Ue.slerp(n,r,o,nt);return Ue.slerp(s,a,2*o*(1-o),i)};const rt=new Ue,ot=1.9011074535173003,it=De.supportsTypedArrays()?new Float32Array(8):[],st=De.supportsTypedArrays()?new Float32Array(8):[],at=De.supportsTypedArrays()?new Float32Array(8):[],ut=De.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){const t=e+1,n=2*t+1;it[e]=1/(t*n),st[e]=t/n}function ct(e,t,n){let r,o,i=0,s=e.length-1;for(;i<=s;)if(r=~~((i+s)/2),o=n(e[r],t),o<0)i=r+1;else{if(!(o>0))return r;s=r-1}return~(s+1)}function lt(e,t,n,r,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=r,this.ut1MinusUtc=o}function dt(e,t,n,r,o,i,s,a){this.year=e,this.month=t,this.day=n,this.hour=r,this.minute=o,this.second=i,this.millisecond=s,this.isLeapSecond=a}function ft(e){return e%4==0&&e%100!=0||e%400==0}function pt(e,t){this.julianDate=e,this.offset=t}it[7]=ot/136,st[7]=8*ot/17,Ue.fastSlerp=function(e,t,n,r){let o,i=Ue.dot(e,t);i>=0?o=1:(o=-1,i=-i);const s=i-1,a=1-n,u=n*n,c=a*a;for(let e=7;e>=0;--e)at[e]=(it[e]*u-st[e])*s,ut[e]=(it[e]*c-st[e])*s;const l=o*n*(1+at[0]*(1+at[1]*(1+at[2]*(1+at[3]*(1+at[4]*(1+at[5]*(1+at[6]*(1+at[7])))))))),d=a*(1+ut[0]*(1+ut[1]*(1+ut[2]*(1+ut[3]*(1+ut[4]*(1+ut[5]*(1+ut[6]*(1+ut[7])))))))),f=Ue.multiplyByScalar(e,d,rt);return Ue.multiplyByScalar(t,l,r),Ue.add(f,r,r)},Ue.fastSquad=function(e,t,n,r,o,i){const s=Ue.fastSlerp(e,t,o,tt),a=Ue.fastSlerp(n,r,o,nt);return Ue.fastSlerp(s,a,2*o*(1-o),i)},Ue.equals=function(e,t){return e===t||r.defined(e)&&r.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Ue.equalsEpsilon=function(e,t,n){return n=r.defaultValue(n,0),e===t||r.defined(e)&&r.defined(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n},Ue.ZERO=Object.freeze(new Ue(0,0,0,0)),Ue.IDENTITY=Object.freeze(new Ue(0,0,0,1)),Ue.prototype.clone=function(e){return Ue.clone(this,e)},Ue.prototype.equals=function(e){return Ue.equals(this,e)},Ue.prototype.equalsEpsilon=function(e,t){return Ue.equalsEpsilon(this,e,t)},Ue.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var ht=Object.freeze({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5});var mt=Object.freeze({UTC:0,TAI:1});const gt=new dt,yt=[31,28,31,30,31,30,31,31,30,31,30,31];function vt(e,t){return zt.compare(e.julianDate,t.julianDate)}const wt=new pt;function _t(e){wt.julianDate=e;const t=zt.leapSeconds;let n=ct(t,wt,vt);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let r=t[n].offset;if(n>0){zt.secondsDifference(t[n].julianDate,e)>r&&(n--,r=t[n].offset)}zt.addSeconds(e,r,e)}function Ct(e,t){wt.julianDate=e;const n=zt.leapSeconds;let r=ct(n,wt,vt);if(r<0&&(r=~r),0===r)return zt.addSeconds(e,-n[0].offset,t);if(r>=n.length)return zt.addSeconds(e,-n[r-1].offset,t);const o=zt.secondsDifference(n[r].julianDate,e);return 0===o?zt.addSeconds(e,-n[r].offset,t):o<=1?void 0:zt.addSeconds(e,-n[--r].offset,t)}function bt(e,t,n){const r=t/ht.SECONDS_PER_DAY|0;return e+=r,(t-=ht.SECONDS_PER_DAY*r)<0&&(e--,t+=ht.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function xt(e,t,n,r,o,i,s){const a=(t-14)/12|0,u=e+4800+a;let c=(1461*u/4|0)+(367*(t-2-12*a)/12|0)-(3*((u+100)/100|0)/4|0)+n-32075;(r-=12)<0&&(r+=24);const l=i+(r*ht.SECONDS_PER_HOUR+o*ht.SECONDS_PER_MINUTE+s*ht.SECONDS_PER_MILLISECOND);return l>=43200&&(c-=1),[c,l]}const St=/^(\d{4})$/,At=/^(\d{4})-(\d{2})$/,Et=/^(\d{4})-?(\d{3})$/,Ot=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,It=/^(\d{4})-?(\d{2})-?(\d{2})$/,Pt=/([Z+\-])?(\d{2})?:?(\d{2})?$/,Rt=/^(\d{2})(\.\d+)?/.source+Pt.source,Tt=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Pt.source,qt=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Pt.source;function zt(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=r.defaultValue(e,0),t=r.defaultValue(t,0),n=r.defaultValue(n,mt.UTC);const o=0|e;bt(o,t+=(e-o)*ht.SECONDS_PER_DAY,this),n===mt.UTC&&_t(this)}zt.fromGregorianDate=function(e,t){const n=xt(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return r.defined(t)?(bt(n[0],n[1],t),_t(t),t):new zt(n[0],n[1],mt.UTC)},zt.fromDate=function(e,t){const n=xt(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return r.defined(t)?(bt(n[0],n[1],t),_t(t),t):new zt(n[0],n[1],mt.UTC)},zt.fromIso8601=function(e,t){let n,o=(e=e.replace(",",".")).split("T"),i=1,s=1,a=0,u=0,c=0,l=0;const d=o[0],f=o[1];let p,h,m;if(o=d.match(It),null!==o)n=+o[1],i=+o[2],s=+o[3];else if(o=d.match(At),null!==o)n=+o[1],i=+o[2];else if(o=d.match(St),null!==o)n=+o[1];else{let e;if(o=d.match(Et),null!==o)n=+o[1],e=+o[2],h=ft(n);else if(o=d.match(Ot),null!==o){n=+o[1];e=7*+o[2]+(+o[3]||0)-new Date(Date.UTC(n,0,4)).getUTCDay()-3}p=new Date(Date.UTC(n,0,1)),p.setUTCDate(e),i=p.getUTCMonth()+1,s=p.getUTCDate()}if(h=ft(n),r.defined(f)){o=f.match(qt),null!==o?(a=+o[1],u=+o[2],c=+o[3],l=1e3*+(o[4]||0),m=5):(o=f.match(Tt),null!==o?(a=+o[1],u=+o[2],c=60*+(o[3]||0),m=4):(o=f.match(Rt),null!==o&&(a=+o[1],u=60*+(o[2]||0),m=3)));const e=o[m],t=+o[m+1],r=+(o[m+2]||0);switch(e){case"+":a-=t,u-=r;break;case"-":a+=t,u+=r;break;case"Z":break;default:u+=new Date(Date.UTC(n,i-1,s,a,u)).getTimezoneOffset()}}const g=60===c;for(g&&c--;u>=60;)u-=60,a++;for(;a>=24;)a-=24,s++;for(p=h&&2===i?29:yt[i-1];s>p;)s-=p,i++,i>12&&(i-=12,n++),p=h&&2===i?29:yt[i-1];for(;u<0;)u+=60,a--;for(;a<0;)a+=24,s--;for(;s<1;)i--,i<1&&(i+=12,n--),p=h&&2===i?29:yt[i-1],s+=p;const y=xt(n,i,s,a,u,c,l);return r.defined(t)?(bt(y[0],y[1],t),_t(t)):t=new zt(y[0],y[1],mt.UTC),g&&zt.addSeconds(t,1,t),t},zt.now=function(e){return zt.fromDate(new Date,e)};const Mt=new zt(0,0,mt.TAI);zt.toGregorianDate=function(e,t){let n=!1,o=Ct(e,Mt);r.defined(o)||(zt.addSeconds(e,-1,Mt),o=Ct(Mt,Mt),n=!0);let i=o.dayNumber;const s=o.secondsOfDay;s>=43200&&(i+=1);let a=i+68569|0;const u=4*a/146097|0;a=a-((146097*u+3)/4|0)|0;const c=4e3*(a+1)/1461001|0;a=a-(1461*c/4|0)+31|0;const l=80*a/2447|0,d=a-(2447*l/80|0)|0;a=l/11|0;const f=l+2-12*a|0,p=100*(u-49)+c+a|0;let h=s/ht.SECONDS_PER_HOUR|0,m=s-h*ht.SECONDS_PER_HOUR;const g=m/ht.SECONDS_PER_MINUTE|0;m-=g*ht.SECONDS_PER_MINUTE;let y=0|m;const v=(m-y)/ht.SECONDS_PER_MILLISECOND;return h+=12,h>23&&(h-=24),n&&(y+=1),r.defined(t)?(t.year=p,t.month=f,t.day=d,t.hour=h,t.minute=g,t.second=y,t.millisecond=v,t.isLeapSecond=n,t):new dt(p,f,d,h,g,y,v,n)},zt.toDate=function(e){const t=zt.toGregorianDate(e,gt);let n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))},zt.toIso8601=function(e,t){const n=zt.toGregorianDate(e,gt);let o=n.year,i=n.month,s=n.day,a=n.hour;const u=n.minute,c=n.second,l=n.millisecond;let d;return 1e4===o&&1===i&&1===s&&0===a&&0===u&&0===c&&0===l&&(o=9999,i=12,s=31,a=24),r.defined(t)||0===l?r.defined(t)&&0!==t?(d=(.01*l).toFixed(t).replace(".","").slice(0,t),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${d}Z`):`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}Z`:(d=(.01*l).toString().replace(".",""),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${d}Z`)},zt.clone=function(e,t){if(r.defined(e))return r.defined(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new zt(e.dayNumber,e.secondsOfDay,mt.TAI)},zt.compare=function(e,t){const n=e.dayNumber-t.dayNumber;return 0!==n?n:e.secondsOfDay-t.secondsOfDay},zt.equals=function(e,t){return e===t||r.defined(e)&&r.defined(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},zt.equalsEpsilon=function(e,t,n){return n=r.defaultValue(n,0),e===t||r.defined(e)&&r.defined(t)&&Math.abs(zt.secondsDifference(e,t))<=n},zt.totalDays=function(e){return e.dayNumber+e.secondsOfDay/ht.SECONDS_PER_DAY},zt.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*ht.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},zt.daysDifference=function(e,t){return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/ht.SECONDS_PER_DAY},zt.computeTaiMinusUtc=function(e){wt.julianDate=e;const t=zt.leapSeconds;let n=ct(t,wt,vt);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset},zt.addSeconds=function(e,t,n){return bt(e.dayNumber,e.secondsOfDay+t,n)},zt.addMinutes=function(e,t,n){const r=e.secondsOfDay+t*ht.SECONDS_PER_MINUTE;return bt(e.dayNumber,r,n)},zt.addHours=function(e,t,n){const r=e.secondsOfDay+t*ht.SECONDS_PER_HOUR;return bt(e.dayNumber,r,n)},zt.addDays=function(e,t,n){return bt(e.dayNumber+t,e.secondsOfDay,n)},zt.lessThan=function(e,t){return zt.compare(e,t)<0},zt.lessThanOrEquals=function(e,t){return zt.compare(e,t)<=0},zt.greaterThan=function(e,t){return zt.compare(e,t)>0},zt.greaterThanOrEquals=function(e,t){return zt.compare(e,t)>=0},zt.prototype.clone=function(e){return zt.clone(this,e)},zt.prototype.equals=function(e){return zt.equals(this,e)},zt.prototype.equalsEpsilon=function(e,t){return zt.equalsEpsilon(this,e,t)},zt.prototype.toString=function(){return zt.toIso8601(this)},zt.leapSeconds=[new pt(new zt(2441317,43210,mt.TAI),10),new pt(new zt(2441499,43211,mt.TAI),11),new pt(new zt(2441683,43212,mt.TAI),12),new pt(new zt(2442048,43213,mt.TAI),13),new pt(new zt(2442413,43214,mt.TAI),14),new pt(new zt(2442778,43215,mt.TAI),15),new pt(new zt(2443144,43216,mt.TAI),16),new pt(new zt(2443509,43217,mt.TAI),17),new pt(new zt(2443874,43218,mt.TAI),18),new pt(new zt(2444239,43219,mt.TAI),19),new pt(new zt(2444786,43220,mt.TAI),20),new pt(new zt(2445151,43221,mt.TAI),21),new pt(new zt(2445516,43222,mt.TAI),22),new pt(new zt(2446247,43223,mt.TAI),23),new pt(new zt(2447161,43224,mt.TAI),24),new pt(new zt(2447892,43225,mt.TAI),25),new pt(new zt(2448257,43226,mt.TAI),26),new pt(new zt(2448804,43227,mt.TAI),27),new pt(new zt(2449169,43228,mt.TAI),28),new pt(new zt(2449534,43229,mt.TAI),29),new pt(new zt(2450083,43230,mt.TAI),30),new pt(new zt(2450630,43231,mt.TAI),31),new pt(new zt(2451179,43232,mt.TAI),32),new pt(new zt(2453736,43233,mt.TAI),33),new pt(new zt(2454832,43234,mt.TAI),34),new pt(new zt(2456109,43235,mt.TAI),35),new pt(new zt(2457204,43236,mt.TAI),36),new pt(new zt(2457754,43237,mt.TAI),37)];var Dt,Ut={exports:{}},kt={exports:{}};var Ft,Nt={exports:{}};
/*!
   * URI.js - Mutating URLs
   * IPv6 Support
   *
   * Version: 1.19.11
   *
   * Author: Rodney Rehm
   * Web: http://medialize.github.io/URI.js/
   *
   * Licensed under
   *   MIT License http://www.opensource.org/licenses/mit-license
   *
   */var jt,Bt,Vt,$t,Lt={exports:{}};
/*!
   * URI.js - Mutating URLs
   * Second Level Domain (SLD) Support
   *
   * Version: 1.19.11
   *
   * Author: Rodney Rehm
   * Web: http://medialize.github.io/URI.js/
   *
   * Licensed under
   *   MIT License http://www.opensource.org/licenses/mit-license
   *
   */Vt=p,$t=function(e,t,n,r){var o=r&&r.URI;function i(e,t){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(e,t):new i(e):new i;if(void 0===e){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.11";var s=i.prototype,a=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===c(e)}function d(e,t){var n,r,o={};if("RegExp"===c(t))o=null;else if(l(t))for(n=0,r=t.length;n<r;n++)o[t[n]]=!0;else o[t]=!0;for(n=0,r=e.length;n<r;n++)(o&&void 0!==o[e[n]]||!o&&t.test(e[n]))&&(e.splice(n,1),r--,n--);return e}function f(e,t){var n,r;if(l(t)){for(n=0,r=t.length;n<r;n++)if(!f(e,t[n]))return!1;return!0}var o=c(t);for(n=0,r=e.length;n<r;n++)if("RegExp"===o){if("string"==typeof e[n]&&e[n].match(t))return!0}else if(e[n]===t)return!0;return!1}function p(e,t){if(!l(e)||!l(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function h(e){return e.replace(/^\/+|\/+$/g,"")}function m(e){return escape(e)}function g(e){return encodeURIComponent(e).replace(/[!'()*]/g,m).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var n=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var y,v={encode:"encode",decode:"decode"},w=function(e,t){return function(n){try{return i[t](n+"").replace(i.characters[e][t].expression,(function(n){return i.characters[e][t].map[n]}))}catch(e){return n}}};for(y in v)i[y+"PathSegment"]=w("pathname",v[y]),i[y+"UrnPathSegment"]=w("urnpath",v[y]);var _=function(e,t,n){return function(r){var o;o=n?function(e){return i[t](i[n](e))}:i[t];for(var s=(r+"").split(e),a=0,u=s.length;a<u;a++)s[a]=o(s[a]);return s.join(e)}};function C(e){return function(t,n){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!n),this)}}function b(e,t){return function(n,r){return void 0===n?this._parts[e]||"":(null!==n&&(n+="").charAt(0)===t&&(n=n.substring(1)),this._parts[e]=n,this.build(!r),this)}}i.decodePath=_("/","decodePathSegment"),i.decodeUrnPath=_(":","decodeUrnPathSegment"),i.recodePath=_("/","encodePathSegment","decode"),i.recodeUrnPath=_(":","encodeUrnPathSegment","decode"),i.encodeReserved=w("reserved","encode"),i.parse=function(e,t){var n;return t||(t={preventInvalidHostname:i.preventInvalidHostname}),(n=(e=(e=e.replace(i.leading_whitespace_expression,"")).replace(i.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),(n=e.indexOf("?"))>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(n=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(n+1,n+3).replace(/\\/g,"/")?(e=e.substring(n+3),e=i.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var n,r,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,o)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),u=e.indexOf(":",s+1);-1!==u&&(-1===a||u<a)?(t.hostname=e.substring(0,o)||null,t.port=null):(r=e.substring(0,o).split(":"),t.hostname=r[0]||null,t.port=r[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&i.ensureValidHostname(t.hostname,t.protocol),t.port&&i.ensureValidPort(t.port),e.substring(o)||"/"},i.parseAuthority=function(e,t){return e=i.parseUserinfo(e,t),i.parseHost(e,t)},i.parseUserinfo=function(e,t){var n=e;-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/"));var r,o=e.indexOf("/"),s=e.lastIndexOf("@",o>-1?o:e.length-1);return s>-1&&(-1===o||s<o)?(r=e.substring(0,s).split(":"),t.username=r[0]?i.decode(r[0]):null,r.shift(),t.password=r[0]?i.decode(r.join(":")):null,e=n.substring(s+1)):(t.username=null,t.password=null),e},i.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var n,r,o,s={},u=e.split("&"),c=u.length,l=0;l<c;l++)n=u[l].split("="),r=i.decodeQuery(n.shift(),t),o=n.length?i.decodeQuery(n.join("="),t):null,"__proto__"!==r&&(a.call(s,r)?("string"!=typeof s[r]&&null!==s[r]||(s[r]=[s[r]]),s[r].push(o)):s[r]=o);return s},i.build=function(e){var t="",n=!1;return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",n=!0),t+=i.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&n&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},i.buildHost=function(e){var t="";return e.hostname?(i.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},i.buildAuthority=function(e){return i.buildUserinfo(e)+i.buildHost(e)},i.buildUserinfo=function(e){var t="";return e.username&&(t+=i.encode(e.username)),e.password&&(t+=":"+i.encode(e.password)),t&&(t+="@"),t},i.buildQuery=function(e,t,n){var r,o,s,u,c="";for(o in e)if("__proto__"!==o&&a.call(e,o))if(l(e[o]))for(r={},s=0,u=e[o].length;s<u;s++)void 0!==e[o][s]&&void 0===r[e[o][s]+""]&&(c+="&"+i.buildQueryParameter(o,e[o][s],n),!0!==t&&(r[e[o][s]+""]=!0));else void 0!==e[o]&&(c+="&"+i.buildQueryParameter(o,e[o],n));return c.substring(1)},i.buildQueryParameter=function(e,t,n){return i.encodeQuery(e,n)+(null!==t?"="+i.encodeQuery(t,n):"")},i.addQuery=function(e,t,n){if("object"==typeof t)for(var r in t)a.call(t,r)&&i.addQuery(e,r,t[r]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=n);"string"==typeof e[t]&&(e[t]=[e[t]]),l(n)||(n=[n]),e[t]=(e[t]||[]).concat(n)}},i.setQuery=function(e,t,n){if("object"==typeof t)for(var r in t)a.call(t,r)&&i.setQuery(e,r,t[r]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===n?null:n}},i.removeQuery=function(e,t,n){var r,o,s;if(l(t))for(r=0,o=t.length;r<o;r++)e[t[r]]=void 0;else if("RegExp"===c(t))for(s in e)t.test(s)&&(e[s]=void 0);else if("object"==typeof t)for(s in t)a.call(t,s)&&i.removeQuery(e,s,t[s]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==n?"RegExp"===c(n)?!l(e[t])&&n.test(e[t])?e[t]=void 0:e[t]=d(e[t],n):e[t]!==String(n)||l(n)&&1!==n.length?l(e[t])&&(e[t]=d(e[t],n)):e[t]=void 0:e[t]=void 0}},i.hasQuery=function(e,t,n,r){switch(c(t)){case"String":break;case"RegExp":for(var o in e)if(a.call(e,o)&&t.test(o)&&(void 0===n||i.hasQuery(e,o,n)))return!0;return!1;case"Object":for(var s in t)if(a.call(t,s)&&!i.hasQuery(e,s,t[s]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(n)){case"Undefined":return t in e;case"Boolean":return n===Boolean(l(e[t])?e[t].length:e[t]);case"Function":return!!n(e[t],t,e);case"Array":return!!l(e[t])&&(r?f:p)(e[t],n);case"RegExp":return l(e[t])?!!r&&f(e[t],n):Boolean(e[t]&&e[t].match(n));case"Number":n=String(n);case"String":return l(e[t])?!!r&&f(e[t],n):e[t]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var e=[],t=[],n=0,r=0;r<arguments.length;r++){var o=new i(arguments[r]);e.push(o);for(var s=o.segment(),a=0;a<s.length;a++)"string"==typeof s[a]&&t.push(s[a]),s[a]&&n++}if(!t.length||!n)return new i("");var u=new i("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},i.commonPath=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}return n<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(n)&&"/"===t.charAt(n)||(n=e.substring(0,n).lastIndexOf("/")),e.substring(0,n+1))},i.withinString=function(e,t,n){n||(n={});var r=n.start||i.findUri.start,o=n.end||i.findUri.end,s=n.trim||i.findUri.trim,a=n.parens||i.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(r.lastIndex=0;;){var c=r.exec(e);if(!c)break;var l=c.index;if(n.ignoreHtml){var d=e.slice(Math.max(l-3,0),l);if(d&&u.test(d))continue}for(var f=l+e.slice(l).search(o),p=e.slice(l,f),h=-1;;){var m=a.exec(p);if(!m)break;var g=m.index+m[0].length;h=Math.max(h,g)}if(!((p=h>-1?p.slice(0,h)+p.slice(h).replace(s,""):p.replace(s,"")).length<=c[0].length||n.ignore&&n.ignore.test(p))){var y=t(p,l,f=l+p.length,e);void 0!==y?(y=String(y),e=e.slice(0,l)+y+e.slice(f),r.lastIndex=l+y.length):r.lastIndex=f}}return r.lastIndex=0,e},i.ensureValidHostname=function(t,n){var r=!!t,o=!1;if(!!n&&(o=f(i.hostProtocols,n)),o&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(t.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(t.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=r.SecondLevelDomains.noConflict()),t}return r.URI===this&&(r.URI=o),this},s.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new i(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=C("protocol"),s.username=C("username"),s.password=C("password"),s.hostname=C("hostname"),s.port=C("port"),s.query=b("query","?"),s.fragment=b("fragment","#"),s.search=function(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},s.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},s.pathname=function(e,t){if(void 0===e||!0===e){var n=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(n):n}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},s.path=s.pathname,s.href=function(e,t){var n;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var r=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[i.getDomAttribute(e)]||"",o=!1),!r&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!r&&!o)throw new TypeError("invalid input");var s=r?e._parts:e;for(n in s)"query"!==n&&a.call(this._parts,n)&&(this._parts[n]=s[n]);s.query&&this.query(s.query,!1)}return this.build(!t),this},s.is=function(e){var t=!1,r=!1,o=!1,s=!1,a=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,r=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),a=(s=!(t=r||o))&&n&&n.has(this._parts.hostname),u=s&&i.idn_expression.test(this._parts.hostname),c=s&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var x=s.protocol,S=s.port,A=s.hostname;s.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,e,t)},s.scheme=s.protocol,s.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),S.call(this,e,t))},s.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,n))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=n.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return A.call(this,e,t)},s.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=i(e);return this.protocol(r.protocol()).authority(r.authority()).build(!t),this},s.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=i.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},s.resource=function(e,t){var n;return void 0===e?this.path()+this.search()+this.hash():(n=i.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},s.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,r),s=new RegExp("^"+u(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},s.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(t).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},s.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(r+1);return!0!==t&&n&&n.list[o.toLowerCase()]&&n.get(this._parts.hostname)||o}var i;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},s.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return e?i.decodePath(r):r}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),a=new RegExp("^"+u(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},s.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return e?i.decodePathSegment(r):r}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var s=new RegExp(u(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),o?this.normalizePath(t):this.build(!t),this},s.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(n=o.substring(s+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",e?i.decodePathSegment(r):r)}"."===e.charAt(0)&&(e=e.substring(1));var a,c=this.suffix();if(c)a=e?new RegExp(u(c)+"$"):new RegExp(u("."+c)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return a&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},s.segment=function(e,t,n){var r=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),s=o.split(r);if(void 0!==e&&"number"!=typeof e&&(n=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(l(t)){s=[];for(var a=0,u=t.length;a<u;a++)(t[a].length||s.length&&s[s.length-1].length)&&(s.length&&!s[s.length-1].length&&s.pop(),s.push(h(t[a])))}else(t||"string"==typeof t)&&(t=h(t),""===s[s.length-1]?s[s.length-1]=t:s.push(t));else t?s[e]=h(t):s.splice(e,1);return i&&s.unshift(""),this.path(s.join(r),n)},s.segmentCoded=function(e,t,n){var r,o,s;if("number"!=typeof e&&(n=t,t=e,e=void 0),void 0===t){if(l(r=this.segment(e,t,n)))for(o=0,s=r.length;o<s;o++)r[o]=i.decode(r[o]);else r=void 0!==r?i.decode(r):void 0;return r}if(l(t))for(o=0,s=t.length;o<s;o++)t[o]=i.encode(t[o]);else t="string"==typeof t||t instanceof String?i.encode(t):t;return this.segment(e,t,n)};var E=s.query;return s.query=function(e,t){if(!0===e)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),r=e.call(this,n);return this._parts.query=i.buildQuery(r||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=i.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):E.call(this,e,t)},s.setQuery=function(e,t,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)r[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)a.call(e,o)&&(r[o]=e[o])}return this._parts.query=i.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},s.addQuery=function(e,t,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(r,e,void 0===t?null:t),this._parts.query=i.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},s.removeQuery=function(e,t,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(r,e,t),this._parts.query=i.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},s.hasQuery=function(e,t,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(r,e,t,n)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},s.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},s.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},s.normalizePath=function(e){var t,n=this._parts.path;if(!n)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var r,o,s="";for("/"!==(n=i.recodePath(n)).charAt(0)&&(t=!0,n="/"+n),"/.."!==n.slice(-3)&&"/."!==n.slice(-2)||(n+="/"),n=n.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(s=n.substring(1).match(/^(\.\.\/)+/)||"")&&(s=s[0]);-1!==(r=n.search(/\/\.\.(\/|$)/));)0!==r?(-1===(o=n.substring(0,r).lastIndexOf("/"))&&(o=r),n=n.substring(0,o)+n.substring(r+3)):n=n.substring(3);return t&&this.is("relative")&&(n=s+n.substring(1)),this._parts.path=n,this.build(!e),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},s.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var e=i.encode,t=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},s.unicode=function(){var e=i.encode,t=i.decode;i.encode=g,i.decode=unescape;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},s.readable=function(){var t=this.clone();t.username("").password("").normalize();var n="";if(t._parts.protocol&&(n+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(n+=e.toUnicode(t._parts.hostname),t._parts.port&&(n+=":"+t._parts.port)):n+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(n+="/"),n+=t.path(!0),t._parts.query){for(var r="",o=0,s=t._parts.query.split("&"),a=s.length;o<a;o++){var u=(s[o]||"").split("=");r+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(r+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+r.substring(1)}return n+=i.decodeQuery(t.hash(),!0)},s.absoluteTo=function(e){var t,n,r,o=this.clone(),s=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof i||(e=new i(e)),o._parts.protocol)return o;if(o._parts.protocol=e._parts.protocol,this._parts.hostname)return o;for(n=0;r=s[n];n++)o._parts[r]=e._parts[r];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},s.relativeTo=function(e){var t,n,r,o,s,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new i(e).normalize(),t=a._parts,n=e._parts,o=a.path(),s=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==s.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===n.protocol&&(t.protocol=null),t.username!==n.username||t.password!==n.password)return a.build();if(null!==t.protocol||null!==t.username||null!==t.password)return a.build();if(t.hostname!==n.hostname||t.port!==n.port)return a.build();if(t.hostname=null,t.port=null,o===s)return t.path="",a.build();if(!(r=i.commonPath(o,s)))return a.build();var u=n.path.substring(r.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=u+t.path.substring(r.length)||"./",a.build()},s.equals=function(e){var t,n,r,o,s,u=this.clone(),c=new i(e),d={};if(u.normalize(),c.normalize(),u.toString()===c.toString())return!0;if(r=u.query(),o=c.query(),u.query(""),c.query(""),u.toString()!==c.toString())return!1;if(r.length!==o.length)return!1;for(s in t=i.parseQuery(r,this._parts.escapeQuerySpace),n=i.parseQuery(o,this._parts.escapeQuerySpace),t)if(a.call(t,s)){if(l(t[s])){if(!p(t[s],n[s]))return!1}else if(t[s]!==n[s])return!1;d[s]=!0}for(s in n)if(a.call(n,s)&&!d[s])return!1;return!0},s.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},s.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},s.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},i},(
/*!
   * URI.js - Mutating URLs
   *
   * Version: 1.19.11
   *
   * Author: Rodney Rehm
   * Web: http://medialize.github.io/URI.js/
   *
   * Licensed under
   *   MIT License http://www.opensource.org/licenses/mit-license
   *
   */
Bt=Ut).exports?Bt.exports=$t((Dt||(Dt=1,function(e,t){!function(n){var r=t&&!t.nodeType&&t,o=e&&!e.nodeType&&e,i="object"==typeof p&&p;i.global!==i&&i.window!==i&&i.self!==i||(n=i);var s,a,u=2147483647,c=36,l=/^xn--/,d=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,g=String.fromCharCode;function y(e){throw new RangeError(h[e])}function v(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function w(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+v((e=e.replace(f,".")).split("."),t).join(".")}function _(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function C(e){return v(e,(function(e){var t="";return e>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+g(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var r=0;for(e=n?m(e/700):e>>1,e+=m(e/t);e>455;r+=c)e=m(e/35);return m(r+36*e/(e+38))}function S(e){var t,n,r,o,i,s,a,l,d,f,p,h=[],g=e.length,v=0,w=128,_=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&y("not-basic"),h.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<g;){for(i=v,s=1,a=c;o>=g&&y("invalid-input"),((l=(p=e.charCodeAt(o++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:c)>=c||l>m((u-v)/s))&&y("overflow"),v+=l*s,!(l<(d=a<=_?1:a>=_+26?26:a-_));a+=c)s>m(u/(f=c-d))&&y("overflow"),s*=f;_=x(v-i,t=h.length+1,0==i),m(v/t)>u-w&&y("overflow"),w+=m(v/t),v%=t,h.splice(v++,0,w)}return C(h)}function A(e){var t,n,r,o,i,s,a,l,d,f,p,h,v,w,C,S=[];for(h=(e=_(e)).length,t=128,n=0,i=72,s=0;s<h;++s)(p=e[s])<128&&S.push(g(p));for(r=o=S.length,o&&S.push("-");r<h;){for(a=u,s=0;s<h;++s)(p=e[s])>=t&&p<a&&(a=p);for(a-t>m((u-n)/(v=r+1))&&y("overflow"),n+=(a-t)*v,t=a,s=0;s<h;++s)if((p=e[s])<t&&++n>u&&y("overflow"),p==t){for(l=n,d=c;!(l<(f=d<=i?1:d>=i+26?26:d-i));d+=c)C=l-f,w=c-f,S.push(g(b(f+C%w,0))),l=m(C/w);S.push(g(b(l,0))),i=x(n,v,r==o),n=0,++r}++n,++t}return S.join("")}if(s={version:"1.3.2",ucs2:{decode:_,encode:C},decode:S,encode:A,toASCII:function(e){return w(e,(function(e){return d.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return w(e,(function(e){return l.test(e)?S(e.slice(4).toLowerCase()):e}))}},r&&o)if(e.exports==r)o.exports=s;else for(a in s)s.hasOwnProperty(a)&&(r[a]=s[a]);else n.punycode=s}(p)}(kt,kt.exports)),kt.exports),function(){return Ft||(Ft=1,t=p,n=function(e){var t=e&&e.IPv6;return{best:function(e){var t,n,r=e.toLowerCase().split(":"),o=r.length,i=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[o-1]&&""===r[o-2]&&r.pop(),-1!==r[(o=r.length)-1].indexOf(".")&&(i=7),t=0;t<o&&""!==r[t];t++);if(t<i)for(r.splice(t,1,"0000");r.length<i;)r.splice(t,0,"0000");for(var s=0;s<i;s++){n=r[s].split("");for(var a=0;a<3&&"0"===n[0]&&n.length>1;a++)n.splice(0,1);r[s]=n.join("")}var u=-1,c=0,l=0,d=-1,f=!1;for(s=0;s<i;s++)f?"0"===r[s]?l+=1:(f=!1,l>c&&(u=d,c=l)):"0"===r[s]&&(f=!0,d=s,l=1);l>c&&(u=d,c=l),c>1&&r.splice(u,c,""),o=r.length;var p="";for(""===r[0]&&(p=":"),s=0;s<o&&(p+=r[s],s!==o-1);s++)p+=":";return""===r[o-1]&&(p+=":"),p},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}},(e=Nt).exports?e.exports=n():t.IPv6=n(t)),Nt.exports;var e,t,n}(),function(){return jt||(jt=1,t=p,n=function(e){var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return!1;var o=n.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(r+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var r=n.list[e.slice(t+1)];return!!r&&r.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return null;var o=n.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(r+1,t)+" ")<0?null:e.slice(r+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n},(e=Lt).exports?e.exports=n():t.SecondLevelDomains=n(t)),Lt.exports;var e,t,n}()):Vt.URI=$t(Vt.punycode,Vt.IPv6,Vt.SecondLevelDomains,Vt);var Qt=Ut.exports;function Wt(e,t){if(null===e||"object"!=typeof e)return e;t=r.defaultValue(t,!1);const n=new e.constructor;for(const r in e)if(e.hasOwnProperty(r)){let o=e[r];t&&(o=Wt(o,t)),n[r]=o}return n}function Ht(){let e,t;const n=new Promise((function(n,r){e=n,t=r}));return{resolve:e,reject:t,promise:n}}function Yt(e,t){let n;return"undefined"!=typeof document&&(n=document),Yt._implementation(e,t,n)}Yt._implementation=function(e,t,n){if(!r.defined(t)){if(void 0===n)return e;t=r.defaultValue(n.baseURI,n.location.href)}const o=new Qt(e);return""!==o.scheme()?o.toString():o.absoluteTo(t).toString()};const Zt={};function Gt(e,t,n){r.defined(t)||(t=e.width),r.defined(n)||(n=e.height);let o=Zt[t];r.defined(o)||(o={},Zt[t]=o);let i=o[n];if(!r.defined(i)){const e=document.createElement("canvas");e.width=t,e.height=n,i=e.getContext("2d",{willReadFrequently:!0}),i.globalCompositeOperation="copy",o[n]=i}return i.drawImage(e,0,0,t,n),i.getImageData(0,0,t,n).data}const Jt=/^blob:/i;function Xt(e){return Jt.test(e)}let Kt;const en=/^data:/i;function tn(e){return en.test(e)}var nn=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5});var rn=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3});function on(e){e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT);const t=r.defaultValue(e.throttleByServer,!1),n=r.defaultValue(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=r.defaultValue(e.priority,0),this.throttle=n,this.throttleByServer=t,this.type=r.defaultValue(e.type,rn.OTHER),this.serverKey=void 0,this.state=nn.UNISSUED,this.deferred=void 0,this.cancelled=!1}function sn(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,"string"==typeof this.responseHeaders&&(this.responseHeaders=function(e){const t={};if(!e)return t;const n=e.split("\r\n");for(let e=0;e<n.length;++e){const r=n[e],o=r.indexOf(": ");if(o>0){const e=r.substring(0,o),n=r.substring(o+2);t[e]=n}}return t}(this.responseHeaders))}function an(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function un(e,t){return t-e}function cn(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function ln(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}on.prototype.cancel=function(){this.cancelled=!0},on.prototype.clone=function(e){return r.defined(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new on(this)},sn.prototype.toString=function(){let e="Request has failed.";return r.defined(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e},Object.defineProperties(an.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),an.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);const n=this;return function(){n.removeEventListener(e,t)}},an.prototype.removeEventListener=function(e,t){const n=this._listeners,r=this._scopes;let o=-1;for(let i=0;i<n.length;i++)if(n[i]===e&&r[i]===t){o=i;break}return-1!==o&&(this._insideRaiseEvent?(this._toRemove.push(o),n[o]=void 0,r[o]=void 0):(n.splice(o,1),r.splice(o,1)),!0)},an.prototype.raiseEvent=function(){let e;this._insideRaiseEvent=!0;const t=this._listeners,n=this._scopes;let o=t.length;for(e=0;e<o;e++){const o=t[e];r.defined(o)&&t[e].apply(n[e],arguments)}const i=this._toRemove;if(o=i.length,o>0){for(i.sort(un),e=0;e<o;e++){const r=i[e];t.splice(r,1),n.splice(r,1)}i.length=0}this._insideRaiseEvent=!1},Object.defineProperties(cn.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){const t=this._length;if(e<t){const n=this._array;for(let r=e;r<t;++r)n[r]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}}),cn.prototype.reserve=function(e){e=r.defaultValue(e,this._length),this._array.length=e},cn.prototype.heapify=function(e){e=r.defaultValue(e,0);const t=this._length,n=this._comparator,o=this._array;let i=-1,s=!0;for(;s;){const r=2*(e+1),a=r-1;i=a<t&&n(o[a],o[e])<0?a:e,r<t&&n(o[r],o[i])<0&&(i=r),i!==e?(ln(o,i,e),e=i):s=!1}},cn.prototype.resort=function(){const e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},cn.prototype.insert=function(e){const t=this._array,n=this._comparator,o=this._maximumLength;let i,s=this._length++;for(s<t.length?t[s]=e:t.push(e);0!==s;){const e=Math.floor((s-1)/2);if(!(n(t[s],t[e])<0))break;ln(t,s,e),s=e}return r.defined(o)&&this._length>o&&(i=t[o],this._length=o),i},cn.prototype.pop=function(e){if(e=r.defaultValue(e,0),0===this._length)return;const t=this._array,n=t[e];return ln(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};const dn={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0};let fn=20;const pn=new cn({comparator:function(e,t){return e.priority-t.priority}});pn.maximumLength=fn,pn.reserve(fn);const hn=[];let mn={};const gn="undefined"!=typeof document?new Qt(document.location.href):new Qt,yn=new an;function vn(){}function wn(e){r.defined(e.priorityFunction)&&(e.priority=e.priorityFunction())}function _n(e){return e.state===nn.UNISSUED&&(e.state=nn.ISSUED,e.deferred=Ht()),e.deferred.promise}function Cn(e){const t=_n(e);return e.state=nn.ACTIVE,hn.push(e),++dn.numberOfActiveRequests,++dn.numberOfActiveRequestsEver,++mn[e.serverKey],e.requestFunction().then(function(e){return function(t){if(e.state===nn.CANCELLED)return;const n=e.deferred;--dn.numberOfActiveRequests,--mn[e.serverKey],yn.raiseEvent(),e.state=nn.RECEIVED,e.deferred=void 0,n.resolve(t)}}(e)).catch(function(e){return function(t){e.state!==nn.CANCELLED&&(++dn.numberOfFailedRequests,--dn.numberOfActiveRequests,--mn[e.serverKey],yn.raiseEvent(t),e.state=nn.FAILED,e.deferred.reject(t))}}(e)),t}function bn(e){const t=e.state===nn.ACTIVE;if(e.state=nn.CANCELLED,++dn.numberOfCancelledRequests,r.defined(e.deferred)){const t=e.deferred;e.deferred=void 0,t.reject()}t&&(--dn.numberOfActiveRequests,--mn[e.serverKey],++dn.numberOfCancelledActiveRequests),r.defined(e.cancelFunction)&&e.cancelFunction()}vn.maximumRequests=50,vn.maximumRequestsPerServer=6,vn.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},vn.throttleRequests=!0,vn.debugShowStatistics=!1,vn.requestCompletedEvent=yn,Object.defineProperties(vn,{statistics:{get:function(){return dn}},priorityHeapLength:{get:function(){return fn},set:function(e){if(e<fn)for(;pn.length>e;){bn(pn.pop())}fn=e,pn.maximumLength=e,pn.reserve(e)}}}),vn.serverHasOpenSlots=function(e,t){t=r.defaultValue(t,1);const n=r.defaultValue(vn.requestsByServer[e],vn.maximumRequestsPerServer);return mn[e]+t<=n},vn.heapHasOpenSlots=function(e){return pn.length+e<=fn},vn.update=function(){let e,t,n=0;const r=hn.length;for(e=0;e<r;++e)t=hn[e],t.cancelled&&bn(t),t.state===nn.ACTIVE?n>0&&(hn[e-n]=t):++n;hn.length-=n;const o=pn.internalArray,i=pn.length;for(e=0;e<i;++e)wn(o[e]);pn.resort();const s=Math.max(vn.maximumRequests-hn.length,0);let a=0;for(;a<s&&pn.length>0;)t=pn.pop(),t.cancelled?bn(t):!t.throttleByServer||vn.serverHasOpenSlots(t.serverKey)?(Cn(t),++a):bn(t);!function(){if(!vn.debugShowStatistics)return;0===dn.numberOfActiveRequests&&dn.lastNumberOfActiveRequests>0&&(dn.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${dn.numberOfAttemptedRequests}`),dn.numberOfAttemptedRequests=0),dn.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${dn.numberOfCancelledRequests}`),dn.numberOfCancelledRequests=0),dn.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${dn.numberOfCancelledActiveRequests}`),dn.numberOfCancelledActiveRequests=0),dn.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${dn.numberOfFailedRequests}`),dn.numberOfFailedRequests=0));dn.lastNumberOfActiveRequests=dn.numberOfActiveRequests}()},vn.getServerKey=function(e){let t=new Qt(e);""===t.scheme()&&(t=new Qt(e).absoluteTo(gn),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${"https"===t.scheme()?"443":"80"}`);const o=mn[n];return r.defined(o)||(mn[n]=0),n},vn.request=function(e){if(tn(e.url)||Xt(e.url))return yn.raiseEvent(),e.state=nn.RECEIVED,e.requestFunction();if(++dn.numberOfAttemptedRequests,r.defined(e.serverKey)||(e.serverKey=vn.getServerKey(e.url)),vn.throttleRequests&&e.throttleByServer&&!vn.serverHasOpenSlots(e.serverKey))return;if(!vn.throttleRequests||!e.throttle)return Cn(e);if(hn.length>=vn.maximumRequests)return;wn(e);const t=pn.insert(e);if(r.defined(t)){if(t===e)return;bn(t)}return _n(e)},vn.clearForSpecs=function(){for(;pn.length>0;){bn(pn.pop())}const e=hn.length;for(let t=0;t<e;++t)bn(hn[t]);hn.length=0,mn={},dn.numberOfAttemptedRequests=0,dn.numberOfActiveRequests=0,dn.numberOfCancelledRequests=0,dn.numberOfCancelledActiveRequests=0,dn.numberOfFailedRequests=0,dn.numberOfActiveRequestsEver=0,dn.lastNumberOfActiveRequests=0},vn.numberOfActiveRequestsByServer=function(e){return mn[e]},vn.requestHeap=pn;const xn={};let Sn={};xn.add=function(e,t){const n=`${e.toLowerCase()}:${t}`;r.defined(Sn[n])||(Sn[n]=!0)},xn.remove=function(e,t){const n=`${e.toLowerCase()}:${t}`;r.defined(Sn[n])&&delete Sn[n]},xn.contains=function(e){const t=function(e){const t=new Qt(e);t.normalize();let n=t.authority();if(0!==n.length){if(t.authority(n),-1!==n.indexOf("@")){const e=n.split("@");n=e[1]}if(-1===n.indexOf(":")){let e=t.scheme();if(0===e.length&&(e=window.location.protocol,e=e.substring(0,e.length-1)),"http"===e)n+=":80";else{if("https"!==e)return;n+=":443"}}return n}}(e);return!(!r.defined(t)||!r.defined(Sn[t]))},xn.clear=function(){Sn={}};var An=xn;const En=function(){try{const e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch(e){return!1}}();function On(e,t,n,o){const i=e.query();if(0===i.length)return{};let s;if(-1===i.indexOf("=")){const e={};e[i]=void 0,s=e}else s=function(e){const t={};if(""===e)return t;const n=e.replace(/\+/g,"%20").split(/[&;]/);for(let e=0,o=n.length;e<o;++e){const o=n[e].split("="),i=decodeURIComponent(o[0]);let s=o[1];s=r.defined(s)?decodeURIComponent(s):"";const a=t[i];"string"==typeof a?t[i]=[a,s]:Array.isArray(a)?a.push(s):t[i]=s}return t}(i);t._queryParameters=n?Tn(s,t._queryParameters,o):s,e.search("")}function In(e,t){const n=t._queryParameters,o=Object.keys(n);1!==o.length||r.defined(n[o[0]])?e.search(function(e){let t="";for(const n in e)if(e.hasOwnProperty(n)){const r=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(r))for(let e=0,n=r.length;e<n;++e)t+=`${o+encodeURIComponent(r[e])}&`;else t+=`${o+encodeURIComponent(r)}&`}return t=t.slice(0,-1),t}(n)):e.search(o[0])}function Pn(e,t){return r.defined(e)?r.defined(e.clone)?e.clone():Wt(e):t}function Rn(e){if(e.state===nn.ISSUED||e.state===nn.ACTIVE)throw new a.RuntimeError("The Resource is already being fetched.");e.state=nn.UNISSUED,e.deferred=void 0}function Tn(e,t,n){if(!n)return s.combine(e,t);const o=Wt(e,!0);for(const e in t)if(t.hasOwnProperty(e)){let n=o[e];const i=t[e];r.defined(n)?(Array.isArray(n)||(n=o[e]=[n]),o[e]=n.concat(i)):o[e]=Array.isArray(i)?i.slice():i}return o}function qn(e){"string"==typeof(e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT))&&(e={url:e}),this._url=void 0,this._templateValues=Pn(e.templateValues,{}),this._queryParameters=Pn(e.queryParameters,{}),this.headers=Pn(e.headers,{}),this.request=r.defaultValue(e.request,new on),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=r.defaultValue(e.retryAttempts,0),this._retryCount=0;const t=new Qt(e.url);On(t,this,!0,!0),t.fragment(""),this._url=t.toString()}let zn;function Mn(e){const t=e.resource,n=e.flipY,o=e.skipColorSpaceConversion,i=e.preferImageBitmap,s=t.request;s.url=t.url,s.requestFunction=function(){let e=!1;t.isDataUri||t.isBlobUri||(e=t.isCrossOriginUrl);const r=Ht();return s.url.indexOf("nullvalue=")>-1?qn._Implementations.createImageSGS(s.url,e,r):qn._Implementations.createImage(s,e,r,n,o,i),r.promise};const a=vn.request(s);if(r.defined(a))return a.catch((function(e){return s.state!==nn.FAILED?Promise.reject(e):t.retryOnError(e).then((function(r){return r?(s.state=nn.UNISSUED,s.deferred=void 0,Mn({resource:t,flipY:n,skipColorSpaceConversion:o,preferImageBitmap:i})):Promise.reject(e)}))}))}function Dn(e,t,n){const o={};o[t]=n,e.setQueryParameters(o);const i=e.request;i.url=e.url,i.requestFunction=function(){const t=Ht();return window[n]=function(e){t.resolve(e);try{delete window[n]}catch(e){window[n]=void 0}},qn._Implementations.loadAndExecuteScript(e.url,n,t),t.promise};const s=vn.request(i);if(r.defined(s))return s.catch((function(r){return i.state!==nn.FAILED?Promise.reject(r):e.retryOnError(r).then((function(o){return o?(i.state=nn.UNISSUED,i.deferred=void 0,Dn(e,t,n)):Promise.reject(r)}))}))}qn.createIfNeeded=function(e){return e instanceof qn?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new qn({url:e})},qn.supportsImageBitmapOptions=function(){if(r.defined(zn))return zn;if("function"!=typeof createImageBitmap)return zn=Promise.resolve(!1),zn;return zn=qn.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then((function(e){return Promise.all([createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"}),createImageBitmap(e)])})).then((function(e){const t=Gt(e[0]),n=Gt(e[1]);return t[1]!==n[1]})).catch((function(){return!1})),zn},Object.defineProperties(qn,{isBlobSupported:{get:function(){return En}}}),Object.defineProperties(qn.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){const t=new Qt(e);On(t,this,!1),t.fragment(""),this._url=t.toString()}},extension:{get:function(){return function(e){const t=new Qt(e);t.normalize();let n=t.path(),r=n.lastIndexOf("/");return-1!==r&&(n=n.substr(r+1)),r=n.lastIndexOf("."),n=-1===r?"":n.substr(r+1),n}(this._url)}},isDataUri:{get:function(){return tn(this._url)}},isBlobUri:{get:function(){return Xt(this._url)}},isCrossOriginUrl:{get:function(){return function(e){r.defined(Kt)||(Kt=document.createElement("a")),Kt.href=window.location.href;const t=Kt.host,n=Kt.protocol;return Kt.href=e,Kt.href=Kt.href,n!==Kt.protocol||t!==Kt.host}(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),qn.prototype.toString=function(){return this.getUrlComponent(!0,!0)},qn.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;const n=new Qt(this._url);e&&In(n,this);let o=n.toString().replace(/%7B/g,"{").replace(/%7D/g,"}");const i=this._templateValues;return o=o.replace(/{(.*?)}/g,(function(e,t){const n=i[t];return r.defined(n)?encodeURIComponent(n):e})),t&&r.defined(this.proxy)&&(o=this.proxy.getURL(o)),o},qn.prototype.setQueryParameters=function(e,t){this._queryParameters=t?Tn(this._queryParameters,e,!1):Tn(e,this._queryParameters,!1)},qn.prototype.appendQueryParameters=function(e){this._queryParameters=Tn(e,this._queryParameters,!0)},qn.prototype.setTemplateValues=function(e,t){this._templateValues=t?s.combine(this._templateValues,e):s.combine(e,this._templateValues)},qn.prototype.getDerivedResource=function(e){const t=this.clone();if(t._retryCount=0,r.defined(e.url)){const n=new Qt(e.url);On(n,t,!0,r.defaultValue(e.preserveQueryParameters,!1)),n.fragment(""),""!==n.scheme()?t._url=n.toString():t._url=n.absoluteTo(new Qt(Yt(this._url))).toString()}return r.defined(e.queryParameters)&&(t._queryParameters=s.combine(e.queryParameters,t._queryParameters)),r.defined(e.templateValues)&&(t._templateValues=s.combine(e.templateValues,t.templateValues)),r.defined(e.headers)&&(t.headers=s.combine(e.headers,t.headers)),r.defined(e.proxy)&&(t.proxy=e.proxy),r.defined(e.request)&&(t.request=e.request),r.defined(e.retryCallback)&&(t.retryCallback=e.retryCallback),r.defined(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},qn.prototype.retryOnError=function(e){const t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);const n=this;return Promise.resolve(t(this,e)).then((function(e){return++n._retryCount,e}))},qn.prototype.clone=function(e){return r.defined(e)||(e=new qn({url:this._url})),e._url=this._url,e._queryParameters=Wt(this._queryParameters),e._templateValues=Wt(this._templateValues),e.headers=Wt(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},qn.prototype.getBaseUri=function(e){return function(e,t){let n="";const r=e.lastIndexOf("/");return-1!==r&&(n=e.substring(0,r+1)),t?(0!==(e=new Qt(e)).query().length&&(n+=`?${e.query()}`),0!==e.fragment().length&&(n+=`#${e.fragment()}`),n):n}(this.getUrlComponent(e),e)},qn.prototype.appendForwardSlash=function(){var e;this._url=(0!==(e=this._url).length&&"/"===e[e.length-1]||(e=`${e}/`),e)},qn.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},qn.fetchArrayBuffer=function(e){return new qn(e).fetchArrayBuffer()},qn.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},qn.fetchBlob=function(e){return new qn(e).fetchBlob()},qn.prototype.fetchImage=function(e){e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT);const t=r.defaultValue(e.preferImageBitmap,!1),n=r.defaultValue(e.preferBlob,!1),o=r.defaultValue(e.flipY,!1),i=r.defaultValue(e.skipColorSpaceConversion,!1);if(Rn(this.request),!En||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return Mn({resource:this,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:t});const s=this.fetchBlob();if(!r.defined(s))return;let a,u,c,l;return qn.supportsImageBitmapOptions().then((function(e){return a=e,u=a&&t,s})).then((function(e){if(!r.defined(e))return;if(l=e,u)return qn.createImageBitmapFromBlob(e,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i});const t=window.URL.createObjectURL(e);return c=new qn({url:t}),Mn({resource:c,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:!1})})).then((function(e){if(r.defined(e))return e.blob=l,u||window.URL.revokeObjectURL(c.url),e})).catch((function(e){return r.defined(c)&&window.URL.revokeObjectURL(c.url),e.blob=l,Promise.reject(e)}))},qn.fetchImage=function(e){return new qn(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},qn.prototype.fetchText=function(){return this.fetch({responseType:"text"})},qn.fetchText=function(e){return new qn(e).fetchText()},qn.prototype.fetchJson=function(){const e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(r.defined(e))return e.then((function(e){if(r.defined(e))return JSON.parse(e)}))},qn.fetchJson=function(e){return new qn(e).fetchJson()},qn.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},qn.fetchXML=function(e){return new qn(e).fetchXML()},qn.prototype.fetchJsonp=function(e){let t;e=r.defaultValue(e,"callback"),Rn(this.request);do{t=`loadJsonp${o.CesiumMath.nextRandomNumber().toString().substring(2,8)}`}while(r.defined(window[t]));return Dn(this,e,t)},qn.fetchJsonp=function(e){return new qn(e).fetchJsonp(e.callbackParameterName)},qn.prototype._makeRequest=function(e){const t=this;Rn(t.request);const n=t.request;n.url=t.url,n.requestFunction=function(){const o=e.responseType,i=s.combine(e.headers,t.headers),a=e.overrideMimeType,u=e.method,c=e.data,l=Ht(),d=qn._Implementations.loadWithXhr(t.url,o,u,c,i,l,a);return r.defined(d)&&r.defined(d.abort)&&(n.cancelFunction=function(){d.abort()}),l.promise};const o=vn.request(n);if(r.defined(o))return o.then((function(e){return n.cancelFunction=void 0,e})).catch((function(r){return n.cancelFunction=void 0,n.state!==nn.FAILED?Promise.reject(r):t.retryOnError(r).then((function(o){return o?(n.state=nn.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)}))}))};const Un=/^data:(.*?)(;base64)?,(.*)$/;function kn(e,t){const n=decodeURIComponent(t);return e?atob(n):n}function Fn(e,t){const n=kn(e,t),r=new ArrayBuffer(n.length),o=new Uint8Array(r);for(let e=0;e<n.length;e++)o[e]=n.charCodeAt(e);return r}function Nn(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}qn.prototype.fetch=function(e){return(e=Pn(e,{})).method="GET",this._makeRequest(e)},qn.fetch=function(e){return new qn(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},qn.prototype.delete=function(e){return(e=Pn(e,{})).method="DELETE",this._makeRequest(e)},qn.delete=function(e){return new qn(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},qn.prototype.head=function(e){return(e=Pn(e,{})).method="HEAD",this._makeRequest(e)},qn.head=function(e){return new qn(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},qn.prototype.options=function(e){return(e=Pn(e,{})).method="OPTIONS",this._makeRequest(e)},qn.options=function(e){return new qn(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},qn.prototype.post=function(e,t){return f.defined("data",e),(t=Pn(t,{})).method="POST",t.data=e,this._makeRequest(t)},qn.post=function(e){return new qn(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},qn.prototype.put=function(e,t){return f.defined("data",e),(t=Pn(t,{})).method="PUT",t.data=e,this._makeRequest(t)},qn.put=function(e){return new qn(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},qn.prototype.patch=function(e,t){return f.defined("data",e),(t=Pn(t,{})).method="PATCH",t.data=e,this._makeRequest(t)},qn.patch=function(e){return new qn(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},qn._Implementations={},qn._Implementations.loadImageElement=function(e,t,n){const r=new Image;r.onload=function(){0===r.naturalWidth&&0===r.naturalHeight&&0===r.width&&0===r.height&&(r.width=300,r.height=150),n.resolve(r)},r.onerror=function(e){n.reject(e)},t&&(An.contains(e)?r.crossOrigin="use-credentials":r.crossOrigin=""),r.src=e},qn._Implementations.createImage=function(e,t,n,o,i,s){const u=e.url;qn.supportsImageBitmapOptions().then((function(c){if(!c||!s)return void qn._Implementations.loadImageElement(u,t,n);const l=Ht(),d=qn._Implementations.loadWithXhr(u,"blob","GET",void 0,void 0,l,void 0,void 0,void 0);return r.defined(d)&&r.defined(d.abort)&&(e.cancelFunction=function(){d.abort()}),l.promise.then((function(e){if(r.defined(e))return qn.createImageBitmapFromBlob(e,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i});n.reject(new a.RuntimeError(`Successfully retrieved ${u} but it contained no content.`))})).then((function(e){n.resolve(e)}))})).catch((function(e){n.reject(e)}))},qn.createImageBitmapFromBlob=function(e,t){return f.defined("options",t),f.typeOf.bool("options.flipY",t.flipY),f.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),f.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};const jn="undefined"==typeof XMLHttpRequest;function Bn(e){if(e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=r.defaultValue(e.addNewLeapSeconds,!0),r.defined(e.data))$n(this,e.data);else if(r.defined(e.url)){const t=qn.createIfNeeded(e.url),n=this;this._downloadPromise=t.fetchJson().then((function(e){$n(n,e)})).catch((function(){n._dataError=`An error occurred while retrieving the EOP data from the URL ${t.url}.`}))}else $n(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function Vn(e,t){return zt.compare(e.julianDate,t)}function $n(e,t){if(!r.defined(t.columnNames))return void(e._dataError="Error in loaded EOP data: The columnNames property is required.");if(!r.defined(t.samples))return void(e._dataError="Error in loaded EOP data: The samples property is required.");const n=t.columnNames.indexOf("modifiedJulianDateUtc"),o=t.columnNames.indexOf("xPoleWanderRadians"),i=t.columnNames.indexOf("yPoleWanderRadians"),s=t.columnNames.indexOf("ut1MinusUtcSeconds"),a=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),c=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||o<0||i<0||s<0||a<0||u<0||c<0)return void(e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");const l=e._samples=t.samples,d=e._dates=[];let f;e._dateColumn=n,e._xPoleWanderRadiansColumn=o,e._yPoleWanderRadiansColumn=i,e._ut1MinusUtcSecondsColumn=s,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=c,e._columnCount=t.columnNames.length,e._lastIndex=void 0;const p=e._addNewLeapSeconds;for(let t=0,o=l.length;t<o;t+=e._columnCount){const e=l[t+n],o=l[t+c],i=new zt(e+ht.MODIFIED_JULIAN_DATE_DIFFERENCE,o,mt.TAI);if(d.push(i),p){if(o!==f&&r.defined(f)){const e=zt.leapSeconds,t=ct(e,i,Vn);if(t<0){const n=new pt(i,o);e.splice(~t,0,n)}}f=o}}}function Ln(e,t,n,r,o){const i=n*r;o.xPoleWander=t[i+e._xPoleWanderRadiansColumn],o.yPoleWander=t[i+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[i+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[i+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[i+e._ut1MinusUtcSecondsColumn]}function Qn(e,t,n){return t+e*(n-t)}function Wn(e,t,n,r,o,i,s){const a=e._columnCount;if(i>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;const u=t[o],c=t[i];if(u.equals(c)||r.equals(u))return Ln(e,n,o,a,s),s;if(r.equals(c))return Ln(e,n,i,a,s),s;const l=zt.secondsDifference(r,u)/zt.secondsDifference(c,u),d=o*a,f=i*a;let p=n[d+e._ut1MinusUtcSecondsColumn],h=n[f+e._ut1MinusUtcSecondsColumn];const m=h-p;if(m>.5||m<-.5){const t=n[d+e._taiMinusUtcSecondsColumn],o=n[f+e._taiMinusUtcSecondsColumn];t!==o&&(c.equals(r)?p=h:h-=o-t)}return s.xPoleWander=Qn(l,n[d+e._xPoleWanderRadiansColumn],n[f+e._xPoleWanderRadiansColumn]),s.yPoleWander=Qn(l,n[d+e._yPoleWanderRadiansColumn],n[f+e._yPoleWanderRadiansColumn]),s.xPoleOffset=Qn(l,n[d+e._xCelestialPoleOffsetRadiansColumn],n[f+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=Qn(l,n[d+e._yCelestialPoleOffsetRadiansColumn],n[f+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=Qn(l,p,h),s}function Hn(e,t,n){this.heading=r.defaultValue(e,0),this.pitch=r.defaultValue(t,0),this.roll=r.defaultValue(n,0)}qn._Implementations.loadWithXhr=function(t,n,o,i,s,c,l){const d=Un.exec(t);if(null!==d)return void c.resolve(function(e,t){t=r.defaultValue(t,"");const n=e[1],o=!!e[2],i=e[3];let s,a;switch(t){case"":case"text":return kn(o,i);case"arraybuffer":return Fn(o,i);case"blob":return s=Fn(o,i),new Blob([s],{type:n});case"document":return a=new DOMParser,a.parseFromString(kn(o,i),n);case"json":return JSON.parse(kn(o,i))}}(d,n));if(jn)return void function(t,n,r,o,i,s,c){let l,d;Promise.all([new Promise((function(t,n){e(["url"],(function(e){t(u(e))}),n)})),new Promise((function(t,n){e(["zlib"],(function(e){t(u(e))}),n)}))]).then((([n,r])=>(l=n.parse(t),d=r,"https:"===l.protocol?new Promise((function(t,n){e(["https"],(function(e){t(u(e))}),n)})):new Promise((function(t,n){e(["http"],(function(e){t(u(e))}),n)}))))).then((e=>{const t={protocol:l.protocol,hostname:l.hostname,port:l.port,path:l.path,query:l.query,method:r,headers:i};e.request(t).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)return void s.reject(new sn(e.statusCode,e,e.headers));const t=[];e.on("data",(function(e){t.push(e)})),e.on("end",(function(){const r=Buffer.concat(t);"gzip"===e.headers["content-encoding"]?d.gunzip(r,(function(e,t){e?s.reject(new a.RuntimeError("Error decompressing response.")):s.resolve(Nn(t,n))})):s.resolve(Nn(r,n))}))})).on("error",(function(e){s.reject(new sn)})).end()}))}(t,n,o,0,s,c);const f=new XMLHttpRequest;if(An.contains(t)&&(f.withCredentials=!0),f.open(o,t,!0),r.defined(l)&&r.defined(f.overrideMimeType)&&f.overrideMimeType(l),r.defined(s))for(const e in s)s.hasOwnProperty(e)&&f.setRequestHeader(e,s[e]);r.defined(n)&&(f.responseType=n);let p=!1;return"string"==typeof t&&(p=0===t.indexOf("file://")||"undefined"!=typeof window&&"file://"===window.location.origin),f.onload=function(){if((f.status<200||f.status>=300)&&(!p||0!==f.status))return void c.reject(new sn(f.status,f.response,f.getAllResponseHeaders()));const e=f.response,t=f.responseType;if("HEAD"===o||"OPTIONS"===o){const e=f.getAllResponseHeaders().trim().split(/[\r\n]+/),t={};return e.forEach((function(e){const n=e.split(": "),r=n.shift();t[r]=n.join(": ")})),void c.resolve(t)}if(204===f.status)c.resolve();else if(!r.defined(e)||r.defined(n)&&t!==n)if("json"===n&&"string"==typeof e)try{c.resolve(JSON.parse(e))}catch(e){c.reject(e)}else(""===t||"document"===t)&&r.defined(f.responseXML)&&f.responseXML.hasChildNodes()?c.resolve(f.responseXML):""!==t&&"text"!==t||!r.defined(f.responseText)?c.reject(new a.RuntimeError("Invalid XMLHttpRequest response type.")):c.resolve(f.responseText);else c.resolve(e)},f.onerror=function(e){c.reject(new sn)},t.includes("gisserver")&&t.includes("tmsserver")&&t.includes(".json")||f.send(i),f},qn._Implementations.loadAndExecuteScript=function(e,t,n){return function(e){const t=document.createElement("script");return t.async=!0,t.src=e,new Promise(((e,n)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");const r=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,r.removeChild(t),e()},t.onerror=function(e){n(e)},r.appendChild(t)}))}(e).catch((function(e){n.reject(e)}))},qn._DefaultImplementations={},qn._DefaultImplementations.createImage=qn._Implementations.createImage,qn._DefaultImplementations.loadWithXhr=qn._Implementations.loadWithXhr,qn._DefaultImplementations.loadAndExecuteScript=qn._Implementations.loadAndExecuteScript,qn.DEFAULT=Object.freeze(new qn({url:"undefined"==typeof document?"":document.location.href.split("?")[0]})),Bn.NONE=Object.freeze({getPromiseToLoad:function(){return Promise.resolve()},compute:function(e,t){return r.defined(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new lt(0,0,0,0,0),t}}),Bn.prototype.getPromiseToLoad=function(){return Promise.resolve(this._downloadPromise)},Bn.prototype.compute=function(e,t){if(!r.defined(this._samples)){if(r.defined(this._dataError))throw new a.RuntimeError(this._dataError);return}if(r.defined(t)||(t=new lt(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;const n=this._dates,o=this._lastIndex;let i=0,s=0;if(r.defined(o)){const a=n[o],u=n[o+1],c=zt.lessThanOrEquals(a,e),l=!r.defined(u),d=l||zt.greaterThanOrEquals(u,e);if(c&&d)return i=o,!l&&u.equals(e)&&++i,s=i+1,Wn(this,n,this._samples,e,i,s,t),t}let u=ct(n,e,zt.compare,this._dateColumn);return u>=0?(u<n.length-1&&n[u+1].equals(e)&&++u,i=u,s=u):(s=~u,i=s-1,i<0&&(i=0)),this._lastIndex=i,Wn(this,n,this._samples,e,i,s,t),t},Hn.fromQuaternion=function(e,t){r.defined(t)||(t=new Hn);const n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),s=2*(e.w*e.x+e.y*e.z),a=1-2*(e.y*e.y+e.z*e.z),u=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(u,a),t.roll=Math.atan2(s,i),t.pitch=-o.CesiumMath.asinClamped(n),t},Hn.fromDegrees=function(e,t,n,i){return r.defined(i)||(i=new Hn),i.heading=e*o.CesiumMath.RADIANS_PER_DEGREE,i.pitch=t*o.CesiumMath.RADIANS_PER_DEGREE,i.roll=n*o.CesiumMath.RADIANS_PER_DEGREE,i},Hn.clone=function(e,t){if(r.defined(e))return r.defined(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new Hn(e.heading,e.pitch,e.roll)},Hn.equals=function(e,t){return e===t||r.defined(e)&&r.defined(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},Hn.equalsEpsilon=function(e,t,n,i){return e===t||r.defined(e)&&r.defined(t)&&o.CesiumMath.equalsEpsilon(e.heading,t.heading,n,i)&&o.CesiumMath.equalsEpsilon(e.pitch,t.pitch,n,i)&&o.CesiumMath.equalsEpsilon(e.roll,t.roll,n,i)},Hn.prototype.clone=function(e){return Hn.clone(this,e)},Hn.prototype.equals=function(e){return Hn.equals(this,e)},Hn.prototype.equalsEpsilon=function(e,t,n){return Hn.equalsEpsilon(this,e,t,n)},Hn.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};const Yn=/((?:.*\/)|^)WebSDK\.js(?:\?|\#|$)/;let Zn,Gn,Jn;function Xn(e){return"undefined"==typeof document?e:(r.defined(Zn)||(Zn=document.createElement("a")),Zn.href=e,Zn.href=Zn.href,Zn.href)}function Kn(){if(r.defined(Gn))return Gn;let t;return t="undefined"!=typeof GEOWORLD_BASE_URL?GEOWORLD_BASE_URL:"object"==typeof define&&r.defined(define.amd)&&!define.amd.toUrlUndefined&&r.defined(e.toUrl)?Yt("..",nr("Core/buildModuleUrl.js")):function(){const e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){const n=e[t].getAttribute("src"),r=Yn.exec(n);if(null!==r)return r[1]}}(),Gn=new qn({url:Xn(t)}),Gn.appendForwardSlash(),Gn}function er(t){return Xn(e.toUrl(`../${t}`))}function tr(e){return Kn().getDerivedResource({url:e}).url}function nr(t){r.defined(Jn)||(Jn="object"==typeof define&&r.defined(define.amd)&&!define.amd.toUrlUndefined&&r.defined(e.toUrl)?er:tr);return Jn(t)}function rr(e,t,n){this.x=e,this.y=t,this.s=n}function or(e){e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT),this._xysFileUrlTemplate=qn.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=r.defaultValue(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=r.defaultValue(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new zt(this._sampleZeroJulianEphemerisDate,0,mt.TAI),this._stepSizeDays=r.defaultValue(e.stepSizeDays,1),this._samplesPerXysFile=r.defaultValue(e.samplesPerXysFile,1e3),this._totalSamples=r.defaultValue(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];const t=this._interpolationOrder,n=this._denominators=new Array(t+1),o=this._xTable=new Array(t+1),i=Math.pow(this._stepSizeDays,t);for(let e=0;e<=t;++e){n[e]=i,o[e]=e*this._stepSizeDays;for(let r=0;r<=t;++r)r!==e&&(n[e]*=e-r);n[e]=1/n[e]}this._work=new Array(t+1),this._coef=new Array(t+1)}nr._cesiumScriptRegex=Yn,nr._buildModuleUrlFromBaseUrl=tr,nr._clearBaseResource=function(){Gn=void 0},nr.setBaseUrl=function(e){Gn=qn.DEFAULT.getDerivedResource({url:e})},nr.getCesiumBaseUrl=Kn;const ir=new zt(0,0,mt.TAI);function sr(e,t,n){const r=ir;return r.dayNumber=t,r.secondsOfDay=n,zt.daysDifference(r,e._sampleZeroDateTT)}function ar(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n;const o=e._xysFileUrlTemplate;n=r.defined(o)?o.getDerivedResource({templateValues:{0:t}}):new qn({url:nr(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});const i=n.fetchJson().then((function(n){e._chunkDownloadsInProgress[t]=!1;const r=e._samples,o=n.samples,i=t*e._samplesPerXysFile*3;for(let e=0,t=o.length;e<t;++e)r[i+e]=o[e]}));return e._chunkDownloadsInProgress[t]=i,i}or.prototype.preload=function(e,t,n,r){const o=sr(this,e,t),i=sr(this,n,r);let s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=i/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);const u=s/this._samplesPerXysFile|0,c=a/this._samplesPerXysFile|0,l=[];for(let e=u;e<=c;++e)l.push(ar(this,e));return Promise.all(l)},or.prototype.computeXysRadians=function(e,t,n){const o=sr(this,e,t);if(o<0)return;const i=o/this._stepSizeDays|0;if(i>=this._totalSamples)return;const s=this._interpolationOrder;let a=i-(s/2|0);a<0&&(a=0);let u=a+s;u>=this._totalSamples&&(u=this._totalSamples-1,a=u-s,a<0&&(a=0));let c=!1;const l=this._samples;if(r.defined(l[3*a])||(ar(this,a/this._samplesPerXysFile|0),c=!0),r.defined(l[3*u])||(ar(this,u/this._samplesPerXysFile|0),c=!0),c)return;r.defined(n)?(n.x=0,n.y=0,n.s=0):n=new rr(0,0,0);const d=o-a*this._stepSizeDays,f=this._work,p=this._denominators,h=this._coef,m=this._xTable;let g,y;for(g=0;g<=s;++g)f[g]=d-m[g];for(g=0;g<=s;++g){for(h[g]=1,y=0;y<=s;++y)y!==g&&(h[g]*=f[y]);h[g]*=p[g];let e=3*(a+g);n.x+=h[g]*l[e++],n.y+=h[g]*l[e++],n.s+=h[g]*l[e]}return n};const ur={},cr={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},lr={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},dr={},fr={east:new n.Cartesian3,north:new n.Cartesian3,up:new n.Cartesian3,west:new n.Cartesian3,south:new n.Cartesian3,down:new n.Cartesian3};let pr=new n.Cartesian3,hr=new n.Cartesian3,mr=new n.Cartesian3;ur.localFrameToFixedFrameGenerator=function(e,t){if(!cr.hasOwnProperty(e)||!cr[e].hasOwnProperty(t))throw new c("firstAxis and secondAxis must be east, north, up, west, south or down.");const s=cr[e][t];let a;const u=e+t;return r.defined(dr[u])?a=dr[u]:(a=function(a,u,c){if(r.defined(c)||(c=new i.Matrix4),n.Cartesian3.equalsEpsilon(a,n.Cartesian3.ZERO,o.CesiumMath.EPSILON14))n.Cartesian3.unpack(lr[e],0,pr),n.Cartesian3.unpack(lr[t],0,hr),n.Cartesian3.unpack(lr[s],0,mr);else if(o.CesiumMath.equalsEpsilon(a.x,0,o.CesiumMath.EPSILON14)&&o.CesiumMath.equalsEpsilon(a.y,0,o.CesiumMath.EPSILON14)){const r=o.CesiumMath.sign(a.z);n.Cartesian3.unpack(lr[e],0,pr),"east"!==e&&"west"!==e&&n.Cartesian3.multiplyByScalar(pr,r,pr),n.Cartesian3.unpack(lr[t],0,hr),"east"!==t&&"west"!==t&&n.Cartesian3.multiplyByScalar(hr,r,hr),n.Cartesian3.unpack(lr[s],0,mr),"east"!==s&&"west"!==s&&n.Cartesian3.multiplyByScalar(mr,r,mr)}else{(u=r.defaultValue(u,n.Ellipsoid.WGS84)).geodeticSurfaceNormal(a,fr.up);const o=fr.up,i=fr.east;i.x=-a.y,i.y=a.x,i.z=0,n.Cartesian3.normalize(i,fr.east),n.Cartesian3.cross(o,i,fr.north),n.Cartesian3.multiplyByScalar(fr.up,-1,fr.down),n.Cartesian3.multiplyByScalar(fr.east,-1,fr.west),n.Cartesian3.multiplyByScalar(fr.north,-1,fr.south),pr=fr[e],hr=fr[t],mr=fr[s]}return c[0]=pr.x,c[1]=pr.y,c[2]=pr.z,c[3]=0,c[4]=hr.x,c[5]=hr.y,c[6]=hr.z,c[7]=0,c[8]=mr.x,c[9]=mr.y,c[10]=mr.z,c[11]=0,c[12]=a.x,c[13]=a.y,c[14]=a.z,c[15]=1,c},dr[u]=a),a},ur.eastNorthUpToFixedFrame=ur.localFrameToFixedFrameGenerator("east","north"),ur.northEastDownToFixedFrame=ur.localFrameToFixedFrameGenerator("north","east"),ur.northUpEastToFixedFrame=ur.localFrameToFixedFrameGenerator("north","up"),ur.northWestUpToFixedFrame=ur.localFrameToFixedFrameGenerator("north","west");const gr=new Ue,yr=new n.Cartesian3(1,1,1),vr=new i.Matrix4;ur.headingPitchRollToFixedFrame=function(e,t,o,s,a){s=r.defaultValue(s,ur.eastNorthUpToFixedFrame);const u=Ue.fromHeadingPitchRoll(t,gr),c=i.Matrix4.fromTranslationQuaternionRotationScale(n.Cartesian3.ZERO,u,yr,vr);return a=s(e,o,a),i.Matrix4.multiply(a,c,a)};const wr=new i.Matrix4,_r=new n.Matrix3;ur.headingPitchRollQuaternion=function(e,t,n,r,o){const s=ur.headingPitchRollToFixedFrame(e,t,n,r,wr),a=i.Matrix4.getMatrix3(s,_r);return Ue.fromRotationMatrix(a,o)};const Cr=new n.Cartesian3(1,1,1),br=new n.Cartesian3,xr=new i.Matrix4,Sr=new i.Matrix4,Ar=new n.Matrix3,Er=new Ue;ur.fixedFrameToHeadingPitchRoll=function(e,t,o,s){t=r.defaultValue(t,n.Ellipsoid.WGS84),o=r.defaultValue(o,ur.eastNorthUpToFixedFrame),r.defined(s)||(s=new Hn);const a=i.Matrix4.getTranslation(e,br);if(n.Cartesian3.equals(a,n.Cartesian3.ZERO))return s.heading=0,s.pitch=0,s.roll=0,s;let u=i.Matrix4.inverseTransformation(o(a,t,xr),xr),c=i.Matrix4.setScale(e,Cr,Sr);c=i.Matrix4.setTranslation(c,n.Cartesian3.ZERO,c),u=i.Matrix4.multiply(u,c,u);let l=Ue.fromRotationMatrix(i.Matrix4.getMatrix3(u,Ar),Er);return l=Ue.normalize(l,l),Hn.fromQuaternion(l,s)};const Or=o.CesiumMath.TWO_PI/86400;let Ir=new zt;ur.computeTemeToPseudoFixedMatrix=function(e,t){Ir=zt.addSeconds(e,-zt.computeTaiMinusUtc(e),Ir);const i=Ir.dayNumber,s=Ir.secondsOfDay;let a;const u=i-2451545;a=s>=43200?(u+.5)/ht.DAYS_PER_JULIAN_CENTURY:(u-.5)/ht.DAYS_PER_JULIAN_CENTURY;const c=(24110.54841+a*(8640184.812866+a*(.093104+-62e-7*a)))*Or%o.CesiumMath.TWO_PI+(72921158553e-15+11772758384668e-32*(i-2451545.5))*((s+.5*ht.SECONDS_PER_DAY)%ht.SECONDS_PER_DAY),l=Math.cos(c),d=Math.sin(c);return r.defined(t)?(t[0]=l,t[1]=-d,t[2]=0,t[3]=d,t[4]=l,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new n.Matrix3(l,d,0,-d,l,0,0,0,1)},ur.iau2006XysData=new or,ur.earthOrientationParameters=Bn.NONE;const Pr=32.184;ur.preloadIcrfFixed=function(e){const t=e.start.dayNumber,n=e.start.secondsOfDay+Pr,r=e.stop.dayNumber,o=e.stop.secondsOfDay+Pr,i=ur.iau2006XysData.preload(t,n,r,o),s=ur.earthOrientationParameters.getPromiseToLoad();return Promise.all([i,s])},ur.computeIcrfToFixedMatrix=function(e,t){r.defined(t)||(t=new n.Matrix3);const o=ur.computeFixedToIcrfMatrix(e,t);if(r.defined(o))return n.Matrix3.transpose(o,t)};const Rr=new rr(0,0,0),Tr=new lt(0,0,0,0,0),qr=new n.Matrix3,zr=new n.Matrix3;ur.computeFixedToIcrfMatrix=function(e,t){r.defined(t)||(t=new n.Matrix3);const i=ur.earthOrientationParameters.compute(e,Tr);if(!r.defined(i))return;const s=e.dayNumber,a=e.secondsOfDay+Pr,u=ur.iau2006XysData.computeXysRadians(s,a,Rr);if(!r.defined(u))return;const c=u.x+i.xPoleOffset,l=u.y+i.yPoleOffset,d=1/(1+Math.sqrt(1-c*c-l*l)),f=qr;f[0]=1-d*c*c,f[3]=-d*c*l,f[6]=c,f[1]=-d*c*l,f[4]=1-d*l*l,f[7]=l,f[2]=-c,f[5]=-l,f[8]=1-d*(c*c+l*l);const p=n.Matrix3.fromRotationZ(-u.s,zr),h=n.Matrix3.multiply(f,p,qr),m=e.dayNumber-2451545,g=(e.secondsOfDay-zt.computeTaiMinusUtc(e)+i.ut1MinusUtc)/ht.SECONDS_PER_DAY;let y=.779057273264+g+.00273781191135448*(m+g);y=y%1*o.CesiumMath.TWO_PI;const v=n.Matrix3.fromRotationZ(y,zr),w=n.Matrix3.multiply(h,v,qr),_=Math.cos(i.xPoleWander),C=Math.cos(i.yPoleWander),b=Math.sin(i.xPoleWander),x=Math.sin(i.yPoleWander);let S=s-2451545+a/ht.SECONDS_PER_DAY;S/=36525;const A=-47e-6*S*o.CesiumMath.RADIANS_PER_DEGREE/3600,E=Math.cos(A),O=Math.sin(A),I=zr;return I[0]=_*E,I[1]=_*O,I[2]=b,I[3]=-C*O+x*b*E,I[4]=C*E+x*b*O,I[5]=-x*_,I[6]=-x*O-C*b*E,I[7]=x*E-C*b*O,I[8]=C*_,n.Matrix3.multiply(w,I,t)};const Mr=new i.Cartesian4;ur.pointToWindowCoordinates=function(e,t,n,r){return(r=ur.pointToGLWindowCoordinates(e,t,n,r)).y=2*t[5]-r.y,r},ur.pointToGLWindowCoordinates=function(e,t,n,o){r.defined(o)||(o=new i.Cartesian2);const s=Mr;return i.Matrix4.multiplyByVector(e,i.Cartesian4.fromElements(n.x,n.y,n.z,1,s),s),i.Cartesian4.multiplyByScalar(s,1/s.w,s),i.Matrix4.multiplyByVector(t,s,s),i.Cartesian2.fromCartesian4(s,o)};const Dr=new n.Cartesian3,Ur=new n.Cartesian3,kr=new n.Cartesian3;ur.rotationMatrixFromPositionVelocity=function(e,t,i,s){const a=r.defaultValue(i,n.Ellipsoid.WGS84).geodeticSurfaceNormal(e,Dr);let u=n.Cartesian3.cross(t,a,Ur);n.Cartesian3.equalsEpsilon(u,n.Cartesian3.ZERO,o.CesiumMath.EPSILON6)&&(u=n.Cartesian3.clone(n.Cartesian3.UNIT_X,u));const c=n.Cartesian3.cross(u,t,kr);return n.Cartesian3.normalize(c,c),n.Cartesian3.cross(t,c,u),n.Cartesian3.negate(u,u),n.Cartesian3.normalize(u,u),r.defined(s)||(s=new n.Matrix3),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=u.x,s[4]=u.y,s[5]=u.z,s[6]=c.x,s[7]=c.y,s[8]=c.z,s};const Fr=new i.Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),Nr=new n.Cartographic,jr=new n.Cartesian3,Br=new n.Cartesian3,Vr=new n.Matrix3,$r=new i.Matrix4,Lr=new i.Matrix4;ur.basisTo2D=function(e,t,r){const o=i.Matrix4.getTranslation(t,Br),s=e.ellipsoid,a=s.cartesianToCartographic(o,Nr),u=e.project(a,jr);n.Cartesian3.fromElements(u.z,u.x,u.y,u);const c=ur.eastNorthUpToFixedFrame(o,s,$r),l=i.Matrix4.inverseTransformation(c,Lr),d=i.Matrix4.getMatrix3(t,Vr),f=i.Matrix4.multiplyByMatrix3(l,d,r);return i.Matrix4.multiply(Fr,f,r),i.Matrix4.setTranslation(r,u,r),r},ur.wgs84To2DModelMatrix=function(e,t,r){const o=e.ellipsoid,s=ur.eastNorthUpToFixedFrame(t,o,$r),a=i.Matrix4.inverseTransformation(s,Lr),u=o.cartesianToCartographic(t,Nr),c=e.project(u,jr);n.Cartesian3.fromElements(c.z,c.x,c.y,c);const l=i.Matrix4.fromTranslation(c,$r);return i.Matrix4.multiply(Fr,a,r),i.Matrix4.multiply(l,r,r),r};var Qr=ur;t.BoundingSphere=y,t.DeveloperError=c,t.FeatureDetection=De,t.GeographicProjection=h,t.Intersect=m,t.Interval=g,t.Quaternion=Ue,t.Resource=qn,t.Transforms=Qr,t.buildModuleUrl=nr}));
public/CIMSDK/Workers/WallGeometryLibrary-c46d2ee9.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./arrayRemoveDuplicates-398390b2","./Matrix3-aeb3c326","./defaultValue-865ac579","./Math-76ce6367","./PolylinePipeline-482bb0f7"],(function(e,t,i,n,o,r){"use strict";const a={};function s(e,t){return o.CesiumMath.equalsEpsilon(e.latitude,t.latitude,o.CesiumMath.EPSILON10)&&o.CesiumMath.equalsEpsilon(e.longitude,t.longitude,o.CesiumMath.EPSILON10)}const l=new i.Cartographic,h=new i.Cartographic;const c=new Array(2),g=new Array(2),u={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};a.computePositions=function(e,a,p,d,y,m){const P=function(e,o,r,a){const c=(o=t.arrayRemoveDuplicates(o,i.Cartesian3.equalsEpsilon)).length;if(c<2)return;const g=n.defined(a),u=n.defined(r),p=new Array(c),d=new Array(c),y=new Array(c),m=o[0];p[0]=m;const P=e.cartesianToCartographic(m,l);u&&(P.height=r[0]),d[0]=P.height,y[0]=g?a[0]:0;let f=d[0]===y[0],A=1;for(let t=1;t<c;++t){const n=o[t],l=e.cartesianToCartographic(n,h);u&&(l.height=r[t]),f=f&&0===l.height,s(P,l)?P.height<l.height&&(d[A-1]=l.height):(p[A]=n,d[A]=l.height,y[A]=g?a[t]:0,f=f&&d[A]===y[A],i.Cartographic.clone(l,P),++A)}return f||A<2?void 0:(p.length=A,d.length=A,y.length=A,{positions:p,topHeights:d,bottomHeights:y})}(e,a,p,d);if(!n.defined(P))return;a=P.positions,p=P.topHeights,d=P.bottomHeights;const f=a.length,A=f-2;let C,w;const b=o.CesiumMath.chordLength(y,e.maximumRadius),v=u;if(v.minDistance=b,v.ellipsoid=e,m){let e,t=0;for(e=0;e<f-1;e++)t+=r.PolylinePipeline.numberOfPoints(a[e],a[e+1],b)+1;C=new Float64Array(3*t),w=new Float64Array(3*t);const i=c,n=g;v.positions=i,v.height=n;let o=0;for(e=0;e<f-1;e++){i[0]=a[e],i[1]=a[e+1],n[0]=p[e],n[1]=p[e+1];const t=r.PolylinePipeline.generateArc(v);C.set(t,o),n[0]=d[e],n[1]=d[e+1],w.set(r.PolylinePipeline.generateArc(v),o),o+=t.length}}else v.positions=a,v.height=p,C=new Float64Array(r.PolylinePipeline.generateArc(v)),v.height=d,w=new Float64Array(r.PolylinePipeline.generateArc(v));return{bottomPositions:w,topPositions:C,numCorners:A}};var p=a;e.WallGeometryLibrary=p}));
public/CIMSDK/Workers/WebMercatorProjection-bfe55882.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
define(["exports","./Matrix3-aeb3c326","./defaultValue-865ac579","./Math-76ce6367"],(function(t,e,i,o){"use strict";function a(t){this._ellipsoid=i.defaultValue(t,e.Ellipsoid.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(a.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),a.mercatorAngleToGeodeticLatitude=function(t){return o.CesiumMath.PI_OVER_TWO-2*Math.atan(Math.exp(-t))},a.geodeticLatitudeToMercatorAngle=function(t){t>a.MaximumLatitude?t=a.MaximumLatitude:t<-a.MaximumLatitude&&(t=-a.MaximumLatitude);const e=Math.sin(t);return.5*Math.log((1+e)/(1-e))},a.MaximumLatitude=a.mercatorAngleToGeodeticLatitude(Math.PI),a.prototype.project=function(t,o){const r=this._semimajorAxis,n=t.longitude*r,u=a.geodeticLatitudeToMercatorAngle(t.latitude)*r,d=t.height;return i.defined(o)?(o.x=n,o.y=u,o.z=d,o):new e.Cartesian3(n,u,d)},a.prototype.unproject=function(t,o){const r=this._oneOverSemimajorAxis,n=t.x*r,u=a.mercatorAngleToGeodeticLatitude(t.y*r),d=t.z;return i.defined(o)?(o.longitude=n,o.latitude=u,o.height=d,o):new e.Cartographic(n,u,d)},t.WebMercatorProjection=a}));
public/CIMSDK/Workers/combineGeometry.js
@@ -1 +1 @@
define(["./PrimitivePipeline-d1154df9","./createTaskProcessorWorker","./Transforms-f3654378","./Matrix3-6e56fbc7","./defaultValue-865ac579","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryPipeline-3f4d7db4","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f","./IndexDatatype-16f6b4a1","./IntersectionTests-63574cfd","./Plane-4befcca0","./WebMercatorProjection-ab4c1f3a"],(function(e,t,i,r,n,a,o,c,s,m,f,b,d,u,P,p,l,y,G,C){"use strict";return t((function(t,i){const r=e.PrimitivePipeline.unpackCombineGeometryParameters(t),n=e.PrimitivePipeline.combineGeometry(r);return e.PrimitivePipeline.packCombineGeometryResults(n,i)}))}));
define(["./PrimitivePipeline-07eae5eb","./createTaskProcessorWorker","./Transforms-221c7c82","./Matrix3-aeb3c326","./defaultValue-865ac579","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryPipeline-a349886f","./AttributeCompression-10297289","./EncodedCartesian3-e8922703","./IndexDatatype-16f6b4a1","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./WebMercatorProjection-bfe55882"],(function(e,t,i,r,n,a,o,c,s,m,b,f,u,P,d,p,l,y,G,C){"use strict";return t((function(t,i){const r=e.PrimitivePipeline.unpackCombineGeometryParameters(t),n=e.PrimitivePipeline.combineGeometry(r);return e.PrimitivePipeline.packCombineGeometryResults(n,i)}))}));
public/CIMSDK/Workers/createBoxGeometry.js
@@ -1 +1 @@
define(["./BoxGeometry-a7e37078","./defaultValue-865ac579","./Transforms-f3654378","./Matrix3-6e56fbc7","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./VertexFormat-20b5279f"],(function(e,t,r,o,a,n,f,c,i,m,u,d,s,y){"use strict";return function(r,o){return t.defined(o)&&(r=e.BoxGeometry.unpack(r,o)),e.BoxGeometry.createGeometry(r)}}));
define(["./BoxGeometry-fa81cb29","./defaultValue-865ac579","./Transforms-221c7c82","./Matrix3-aeb3c326","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./VertexFormat-20b5279f"],(function(e,t,r,o,a,c,n,f,i,m,u,d,b,s){"use strict";return function(r,o){return t.defined(o)&&(r=e.BoxGeometry.unpack(r,o)),e.BoxGeometry.createGeometry(r)}}));
public/CIMSDK/Workers/createBoxOutlineGeometry.js
@@ -1 +1 @@
define(["./Transforms-f3654378","./Matrix3-6e56fbc7","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0"],(function(t,e,n,a,i,r,u,o,s,m,f,c){"use strict";const d=new e.Cartesian3;function p(t){const n=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).minimum,i=t.maximum;this._min=e.Cartesian3.clone(n),this._max=e.Cartesian3.clone(i),this._offsetAttribute=t.offsetAttribute,this._workerName="createBoxOutlineGeometry"}p.fromDimensions=function(t){const n=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).dimensions,i=e.Cartesian3.multiplyByScalar(n,.5,new e.Cartesian3);return new p({minimum:e.Cartesian3.negate(i,new e.Cartesian3),maximum:i,offsetAttribute:t.offsetAttribute})},p.fromAxisAlignedBoundingBox=function(t){return new p({minimum:t.minimum,maximum:t.maximum})},p.packedLength=2*e.Cartesian3.packedLength+1,p.pack=function(t,n,i){return i=a.defaultValue(i,0),e.Cartesian3.pack(t._min,n,i),e.Cartesian3.pack(t._max,n,i+e.Cartesian3.packedLength),n[i+2*e.Cartesian3.packedLength]=a.defaultValue(t._offsetAttribute,-1),n};const l=new e.Cartesian3,y=new e.Cartesian3,C={minimum:l,maximum:y,offsetAttribute:void 0};return p.unpack=function(t,n,i){n=a.defaultValue(n,0);const r=e.Cartesian3.unpack(t,n,l),u=e.Cartesian3.unpack(t,n+e.Cartesian3.packedLength,y),o=t[n+2*e.Cartesian3.packedLength];return a.defined(i)?(i._min=e.Cartesian3.clone(r,i._min),i._max=e.Cartesian3.clone(u,i._max),i._offsetAttribute=-1===o?void 0:o,i):(C.offsetAttribute=-1===o?void 0:o,new p(C))},p.createGeometry=function(o){const s=o._min,m=o._max;if(e.Cartesian3.equals(s,m))return;const f=new r.GeometryAttributes,c=new Uint16Array(24),p=new Float64Array(24);p[0]=s.x,p[1]=s.y,p[2]=s.z,p[3]=m.x,p[4]=s.y,p[5]=s.z,p[6]=m.x,p[7]=m.y,p[8]=s.z,p[9]=s.x,p[10]=m.y,p[11]=s.z,p[12]=s.x,p[13]=s.y,p[14]=m.z,p[15]=m.x,p[16]=s.y,p[17]=m.z,p[18]=m.x,p[19]=m.y,p[20]=m.z,p[21]=s.x,p[22]=m.y,p[23]=m.z,f.position=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),c[0]=4,c[1]=5,c[2]=5,c[3]=6,c[4]=6,c[5]=7,c[6]=7,c[7]=4,c[8]=0,c[9]=1,c[10]=1,c[11]=2,c[12]=2,c[13]=3,c[14]=3,c[15]=0,c[16]=0,c[17]=4,c[18]=1,c[19]=5,c[20]=2,c[21]=6,c[22]=3,c[23]=7;const l=e.Cartesian3.subtract(m,s,d),y=.5*e.Cartesian3.magnitude(l);if(a.defined(o._offsetAttribute)){const t=p.length,e=o._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,a=new Uint8Array(t/3).fill(e);f.applyOffset=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return new i.Geometry({attributes:f,indices:c,primitiveType:i.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(e.Cartesian3.ZERO,y),offsetAttribute:o._offsetAttribute})},function(t,e){return a.defined(e)&&(t=p.unpack(t,e)),p.createGeometry(t)}}));
define(["./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0"],(function(t,e,n,a,i,r,u,o,s,m,f,c){"use strict";const d=new e.Cartesian3;function p(t){const n=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).minimum,i=t.maximum;this._min=e.Cartesian3.clone(n),this._max=e.Cartesian3.clone(i),this._offsetAttribute=t.offsetAttribute,this._workerName="createBoxOutlineGeometry"}p.fromDimensions=function(t){const n=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).dimensions,i=e.Cartesian3.multiplyByScalar(n,.5,new e.Cartesian3);return new p({minimum:e.Cartesian3.negate(i,new e.Cartesian3),maximum:i,offsetAttribute:t.offsetAttribute})},p.fromAxisAlignedBoundingBox=function(t){return new p({minimum:t.minimum,maximum:t.maximum})},p.packedLength=2*e.Cartesian3.packedLength+1,p.pack=function(t,n,i){return i=a.defaultValue(i,0),e.Cartesian3.pack(t._min,n,i),e.Cartesian3.pack(t._max,n,i+e.Cartesian3.packedLength),n[i+2*e.Cartesian3.packedLength]=a.defaultValue(t._offsetAttribute,-1),n};const l=new e.Cartesian3,y=new e.Cartesian3,C={minimum:l,maximum:y,offsetAttribute:void 0};return p.unpack=function(t,n,i){n=a.defaultValue(n,0);const r=e.Cartesian3.unpack(t,n,l),u=e.Cartesian3.unpack(t,n+e.Cartesian3.packedLength,y),o=t[n+2*e.Cartesian3.packedLength];return a.defined(i)?(i._min=e.Cartesian3.clone(r,i._min),i._max=e.Cartesian3.clone(u,i._max),i._offsetAttribute=-1===o?void 0:o,i):(C.offsetAttribute=-1===o?void 0:o,new p(C))},p.createGeometry=function(o){const s=o._min,m=o._max;if(e.Cartesian3.equals(s,m))return;const f=new r.GeometryAttributes,c=new Uint16Array(24),p=new Float64Array(24);p[0]=s.x,p[1]=s.y,p[2]=s.z,p[3]=m.x,p[4]=s.y,p[5]=s.z,p[6]=m.x,p[7]=m.y,p[8]=s.z,p[9]=s.x,p[10]=m.y,p[11]=s.z,p[12]=s.x,p[13]=s.y,p[14]=m.z,p[15]=m.x,p[16]=s.y,p[17]=m.z,p[18]=m.x,p[19]=m.y,p[20]=m.z,p[21]=s.x,p[22]=m.y,p[23]=m.z,f.position=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p}),c[0]=4,c[1]=5,c[2]=5,c[3]=6,c[4]=6,c[5]=7,c[6]=7,c[7]=4,c[8]=0,c[9]=1,c[10]=1,c[11]=2,c[12]=2,c[13]=3,c[14]=3,c[15]=0,c[16]=0,c[17]=4,c[18]=1,c[19]=5,c[20]=2,c[21]=6,c[22]=3,c[23]=7;const l=e.Cartesian3.subtract(m,s,d),y=.5*e.Cartesian3.magnitude(l);if(a.defined(o._offsetAttribute)){const t=p.length,e=o._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,a=new Uint8Array(t/3).fill(e);f.applyOffset=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return new i.Geometry({attributes:f,indices:c,primitiveType:i.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(e.Cartesian3.ZERO,y),offsetAttribute:o._offsetAttribute})},function(t,e){return a.defined(e)&&(t=p.unpack(t,e)),p.createGeometry(t)}}));
public/CIMSDK/Workers/createCircleGeometry.js
@@ -1 +1 @@
define(["./Matrix3-6e56fbc7","./defaultValue-865ac579","./EllipseGeometry-7c4f7c10","./VertexFormat-20b5279f","./Math-76ce6367","./Transforms-f3654378","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipseGeometryLibrary-a73bd0b1","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryInstance-54a3e3b6","./GeometryOffsetAttribute-06264989","./GeometryPipeline-3f4d7db4","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f","./IndexDatatype-16f6b4a1","./IntersectionTests-63574cfd","./Plane-4befcca0"],(function(e,t,i,r,o,n,s,l,a,d,m,c,u,p,y,_,x,G,f,h,g,E){"use strict";function b(e){const r=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new i.EllipseGeometry(o),this._workerName="createCircleGeometry"}b.packedLength=i.EllipseGeometry.packedLength,b.pack=function(e,t,r){return i.EllipseGeometry.pack(e._ellipseGeometry,t,r)};const w=new i.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),A={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new r.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return b.unpack=function(o,n,s){const l=i.EllipseGeometry.unpack(o,n,w);return A.center=e.Cartesian3.clone(l._center,A.center),A.ellipsoid=e.Ellipsoid.clone(l._ellipsoid,A.ellipsoid),A.height=l._height,A.extrudedHeight=l._extrudedHeight,A.granularity=l._granularity,A.vertexFormat=r.VertexFormat.clone(l._vertexFormat,A.vertexFormat),A.stRotation=l._stRotation,A.shadowVolume=l._shadowVolume,t.defined(s)?(A.semiMajorAxis=l._semiMajorAxis,A.semiMinorAxis=l._semiMinorAxis,s._ellipseGeometry=new i.EllipseGeometry(A),s):(A.radius=l._semiMajorAxis,new b(A))},b.createGeometry=function(e){return i.EllipseGeometry.createGeometry(e._ellipseGeometry)},b.createShadowVolume=function(e,t,i){const o=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,s=t(o,n),l=i(o,n);return new b({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:o,extrudedHeight:s,height:l,vertexFormat:r.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(b.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(i,r){return t.defined(r)&&(i=b.unpack(i,r)),i._ellipseGeometry._center=e.Cartesian3.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(i._ellipseGeometry._ellipsoid),b.createGeometry(i)}}));
define(["./Matrix3-aeb3c326","./defaultValue-865ac579","./EllipseGeometry-5054f965","./VertexFormat-20b5279f","./Math-76ce6367","./Transforms-221c7c82","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipseGeometryLibrary-18d0a44c","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryInstance-8d112c0c","./GeometryOffsetAttribute-06264989","./GeometryPipeline-a349886f","./AttributeCompression-10297289","./EncodedCartesian3-e8922703","./IndexDatatype-16f6b4a1","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(e,t,i,r,o,n,s,a,l,d,m,c,u,p,y,_,x,G,h,f,g,E){"use strict";function w(e){const r=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new i.EllipseGeometry(o),this._workerName="createCircleGeometry"}w.packedLength=i.EllipseGeometry.packedLength,w.pack=function(e,t,r){return i.EllipseGeometry.pack(e._ellipseGeometry,t,r)};const A=new i.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),M={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new r.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return w.unpack=function(o,n,s){const a=i.EllipseGeometry.unpack(o,n,A);return M.center=e.Cartesian3.clone(a._center,M.center),M.ellipsoid=e.Ellipsoid.clone(a._ellipsoid,M.ellipsoid),M.height=a._height,M.extrudedHeight=a._extrudedHeight,M.granularity=a._granularity,M.vertexFormat=r.VertexFormat.clone(a._vertexFormat,M.vertexFormat),M.stRotation=a._stRotation,M.shadowVolume=a._shadowVolume,t.defined(s)?(M.semiMajorAxis=a._semiMajorAxis,M.semiMinorAxis=a._semiMinorAxis,s._ellipseGeometry=new i.EllipseGeometry(M),s):(M.radius=a._semiMajorAxis,new w(M))},w.createGeometry=function(e){return i.EllipseGeometry.createGeometry(e._ellipseGeometry)},w.createShadowVolume=function(e,t,i){const o=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,s=t(o,n),a=i(o,n);return new w({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:o,extrudedHeight:s,height:a,vertexFormat:r.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(w.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(i,r){return t.defined(r)&&(i=w.unpack(i,r)),i._ellipseGeometry._center=e.Cartesian3.clone(i._ellipseGeometry._center),i._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(i._ellipseGeometry._ellipsoid),w.createGeometry(i)}}));
public/CIMSDK/Workers/createCircleOutlineGeometry.js
@@ -1 +1 @@
define(["./Matrix3-6e56fbc7","./defaultValue-865ac579","./EllipseOutlineGeometry-389e4e67","./Math-76ce6367","./Transforms-f3654378","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipseGeometryLibrary-a73bd0b1","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,i,t,r,l,n,s,o,a,u,c,d,m,p,y){"use strict";function f(e){const r=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).radius,l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new t.EllipseOutlineGeometry(l),this._workerName="createCircleOutlineGeometry"}f.packedLength=t.EllipseOutlineGeometry.packedLength,f.pack=function(e,i,r){return t.EllipseOutlineGeometry.pack(e._ellipseGeometry,i,r)};const G=new t.EllipseOutlineGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),_={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return f.unpack=function(r,l,n){const s=t.EllipseOutlineGeometry.unpack(r,l,G);return _.center=e.Cartesian3.clone(s._center,_.center),_.ellipsoid=e.Ellipsoid.clone(s._ellipsoid,_.ellipsoid),_.height=s._height,_.extrudedHeight=s._extrudedHeight,_.granularity=s._granularity,_.numberOfVerticalLines=s._numberOfVerticalLines,i.defined(n)?(_.semiMajorAxis=s._semiMajorAxis,_.semiMinorAxis=s._semiMinorAxis,n._ellipseGeometry=new t.EllipseOutlineGeometry(_),n):(_.radius=s._semiMajorAxis,new f(_))},f.createGeometry=function(e){return t.EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)},function(t,r){return i.defined(r)&&(t=f.unpack(t,r)),t._ellipseGeometry._center=e.Cartesian3.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),f.createGeometry(t)}}));
define(["./Matrix3-aeb3c326","./defaultValue-865ac579","./EllipseOutlineGeometry-03a52f89","./Math-76ce6367","./Transforms-221c7c82","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipseGeometryLibrary-18d0a44c","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,i,t,r,l,n,s,o,a,c,u,d,m,p,y){"use strict";function f(e){const r=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).radius,l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new t.EllipseOutlineGeometry(l),this._workerName="createCircleOutlineGeometry"}f.packedLength=t.EllipseOutlineGeometry.packedLength,f.pack=function(e,i,r){return t.EllipseOutlineGeometry.pack(e._ellipseGeometry,i,r)};const G=new t.EllipseOutlineGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),_={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};return f.unpack=function(r,l,n){const s=t.EllipseOutlineGeometry.unpack(r,l,G);return _.center=e.Cartesian3.clone(s._center,_.center),_.ellipsoid=e.Ellipsoid.clone(s._ellipsoid,_.ellipsoid),_.height=s._height,_.extrudedHeight=s._extrudedHeight,_.granularity=s._granularity,_.numberOfVerticalLines=s._numberOfVerticalLines,i.defined(n)?(_.semiMajorAxis=s._semiMajorAxis,_.semiMinorAxis=s._semiMinorAxis,n._ellipseGeometry=new t.EllipseOutlineGeometry(_),n):(_.radius=s._semiMajorAxis,new f(_))},f.createGeometry=function(e){return t.EllipseOutlineGeometry.createGeometry(e._ellipseGeometry)},function(t,r){return i.defined(r)&&(t=f.unpack(t,r)),t._ellipseGeometry._center=e.Cartesian3.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),f.createGeometry(t)}}));
public/CIMSDK/Workers/createCoplanarPolygonGeometry.js
@@ -1 +1 @@
define(["./arrayRemoveDuplicates-398390b2","./BoundingRectangle-f7002576","./Transforms-f3654378","./Matrix2-23dd5853","./Matrix3-6e56fbc7","./ComponentDatatype-985dcc38","./CoplanarPolygonGeometryLibrary-e70c981f","./defaultValue-865ac579","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryInstance-54a3e3b6","./GeometryPipeline-3f4d7db4","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonGeometryLibrary-e0e45e51","./PolygonPipeline-47fb81c6","./VertexFormat-20b5279f","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./OrientedBoundingBox-ef95f619","./EllipsoidTangentPlane-2129690e","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f","./ArcType-68098157","./EllipsoidRhumbLine-b175af48"],(function(e,t,n,o,r,a,i,s,l,c,y,p,u,d,m,g,f,b,C,h,x,P,A,L,w,G,F,v,E){"use strict";const _=new r.Cartesian3,T=new t.BoundingRectangle,k=new o.Cartesian2,D=new o.Cartesian2,V=new r.Cartesian3,R=new r.Cartesian3,H=new r.Cartesian3,I=new r.Cartesian3,M=new r.Cartesian3,B=new r.Cartesian3,O=new n.Quaternion,z=new r.Matrix3,S=new r.Matrix3,N=new r.Cartesian3;function Q(e,t,i,y,p,m,f,b,C){const h=e.positions;let x=g.PolygonPipeline.triangulate(e.positions2D,e.holes);x.length<3&&(x=[0,1,2]);const P=u.IndexDatatype.createTypedArray(h.length,x.length);P.set(x);let A=z;if(0!==y){let e=n.Quaternion.fromAxisAngle(f,y,O);if(A=r.Matrix3.fromQuaternion(e,A),t.tangent||t.bitangent){e=n.Quaternion.fromAxisAngle(f,-y,O);const o=r.Matrix3.fromQuaternion(e,S);b=r.Cartesian3.normalize(r.Matrix3.multiplyByVector(o,b,b),b),t.bitangent&&(C=r.Cartesian3.normalize(r.Cartesian3.cross(f,b,C),C))}}else A=r.Matrix3.clone(r.Matrix3.IDENTITY,A);const L=D;t.st&&(L.x=i.x,L.y=i.y);const w=h.length,G=3*w,F=new Float64Array(G),v=t.normal?new Float32Array(G):void 0,E=t.tangent?new Float32Array(G):void 0,T=t.bitangent?new Float32Array(G):void 0,V=t.st?new Float32Array(2*w):void 0;let R=0,H=0,I=0,M=0,B=0;for(let e=0;e<w;e++){const n=h[e];if(F[R++]=n.x,F[R++]=n.y,F[R++]=n.z,t.st)if(s.defined(p)&&p.positions.length===w)V[B++]=p.positions[e].x,V[B++]=p.positions[e].y;else{const e=m(r.Matrix3.multiplyByVector(A,n,_),k);o.Cartesian2.subtract(e,L,e);const t=d.CesiumMath.clamp(e.x/i.width,0,1),a=d.CesiumMath.clamp(e.y/i.height,0,1);V[B++]=t,V[B++]=a}t.normal&&(v[H++]=f.x,v[H++]=f.y,v[H++]=f.z),t.tangent&&(E[M++]=b.x,E[M++]=b.y,E[M++]=b.z),t.bitangent&&(T[I++]=C.x,T[I++]=C.y,T[I++]=C.z)}const N=new c.GeometryAttributes;return t.position&&(N.position=new l.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:F})),t.normal&&(N.normal=new l.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),t.tangent&&(N.tangent=new l.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:E})),t.bitangent&&(N.bitangent=new l.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),t.st&&(N.st=new l.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),new l.Geometry({attributes:N,indices:P,primitiveType:l.PrimitiveType.TRIANGLES})}function j(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).polygonHierarchy,n=e.textureCoordinates,a=s.defaultValue(e.vertexFormat,f.VertexFormat.DEFAULT);this._vertexFormat=f.VertexFormat.clone(a),this._polygonHierarchy=t,this._stRotation=s.defaultValue(e.stRotation,0),this._ellipsoid=r.Ellipsoid.clone(s.defaultValue(e.ellipsoid,r.Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=m.PolygonGeometryLibrary.computeHierarchyPackedLength(t,r.Cartesian3)+f.VertexFormat.packedLength+r.Ellipsoid.packedLength+(s.defined(n)?m.PolygonGeometryLibrary.computeHierarchyPackedLength(n,o.Cartesian2):1)+2}j.fromPositions=function(e){return new j({polygonHierarchy:{positions:(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates})},j.pack=function(e,t,n){return n=s.defaultValue(n,0),n=m.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,n,r.Cartesian3),r.Ellipsoid.pack(e._ellipsoid,t,n),n+=r.Ellipsoid.packedLength,f.VertexFormat.pack(e._vertexFormat,t,n),n+=f.VertexFormat.packedLength,t[n++]=e._stRotation,s.defined(e._textureCoordinates)?n=m.PolygonGeometryLibrary.packPolygonHierarchy(e._textureCoordinates,t,n,o.Cartesian2):t[n++]=-1,t[n++]=e.packedLength,t};const U=r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),Y=new f.VertexFormat,q={polygonHierarchy:{}};return j.unpack=function(e,t,n){t=s.defaultValue(t,0);const a=m.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,r.Cartesian3);t=a.startingIndex,delete a.startingIndex;const i=r.Ellipsoid.unpack(e,t,U);t+=r.Ellipsoid.packedLength;const l=f.VertexFormat.unpack(e,t,Y);t+=f.VertexFormat.packedLength;const c=e[t++],y=-1===e[t]?void 0:m.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,o.Cartesian2);s.defined(y)?(t=y.startingIndex,delete y.startingIndex):t++;const p=e[t++];return s.defined(n)||(n=new j(q)),n._polygonHierarchy=a,n._ellipsoid=r.Ellipsoid.clone(i,n._ellipsoid),n._vertexFormat=f.VertexFormat.clone(l,n._vertexFormat),n._stRotation=c,n._textureCoordinates=y,n.packedLength=p,n},j.createGeometry=function(t){const o=t._vertexFormat,a=t._polygonHierarchy,c=t._stRotation,g=t._textureCoordinates,f=s.defined(g);let b=a.positions;if(b=e.arrayRemoveDuplicates(b,r.Cartesian3.equalsEpsilon,!0),b.length<3)return;let C=V,h=R,x=H,P=M;const A=B;if(!i.CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(b,I,P,A))return;if(C=r.Cartesian3.cross(P,A,C),C=r.Cartesian3.normalize(C,C),!r.Cartesian3.equalsEpsilon(I,r.Cartesian3.ZERO,d.CesiumMath.EPSILON6)){const e=t._ellipsoid.geodeticSurfaceNormal(I,N);r.Cartesian3.dot(C,e)<0&&(C=r.Cartesian3.negate(C,C),P=r.Cartesian3.negate(P,P))}const L=i.CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(I,P,A),w=i.CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(I,P,A);o.tangent&&(h=r.Cartesian3.clone(P,h)),o.bitangent&&(x=r.Cartesian3.clone(A,x));const G=m.PolygonGeometryLibrary.polygonsFromHierarchy(a,f,L,!1),F=G.hierarchy,v=G.polygons,E=f?m.PolygonGeometryLibrary.polygonsFromHierarchy(g,!0,(function(e){return e}),!1).polygons:void 0;if(0===F.length)return;b=F[0].outerRing;const _=n.BoundingSphere.fromPoints(b),k=m.PolygonGeometryLibrary.computeBoundingRectangle(C,w,b,c,T),D=[];for(let e=0;e<v.length;e++){const t=new y.GeometryInstance({geometry:Q(v[e],o,k,c,f?E[e]:void 0,w,C,h,x)});D.push(t)}const O=p.GeometryPipeline.combineInstances(D)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=u.IndexDatatype.createTypedArray(O.attributes.position.values.length/3,O.indices);const z=O.attributes;return o.position||delete z.position,new l.Geometry({attributes:z,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:_})},function(e,t){return s.defined(t)&&(e=j.unpack(e,t)),j.createGeometry(e)}}));
define(["./arrayRemoveDuplicates-398390b2","./BoundingRectangle-272c38cc","./Transforms-221c7c82","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./CoplanarPolygonGeometryLibrary-616dd2ed","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryInstance-8d112c0c","./GeometryPipeline-a349886f","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonGeometryLibrary-9908e46b","./PolygonPipeline-8efb7487","./VertexFormat-20b5279f","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./OrientedBoundingBox-34fc6856","./EllipsoidTangentPlane-a9681249","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./AttributeCompression-10297289","./EncodedCartesian3-e8922703","./ArcType-68098157","./EllipsoidRhumbLine-2cf9c5ef"],(function(e,t,n,o,a,r,i,s,l,c,y,p,u,d,m,g,b,f,C,h,x,P,A,L,w,G,F,v,E){"use strict";const _=new a.Cartesian3,T=new t.BoundingRectangle,k=new o.Cartesian2,D=new o.Cartesian2,V=new a.Cartesian3,R=new a.Cartesian3,H=new a.Cartesian3,I=new a.Cartesian3,M=new a.Cartesian3,B=new a.Cartesian3,O=new n.Quaternion,z=new a.Matrix3,S=new a.Matrix3,N=new a.Cartesian3;function Q(e,t,i,y,p,m,b,f,C){const h=e.positions;let x=g.PolygonPipeline.triangulate(e.positions2D,e.holes);x.length<3&&(x=[0,1,2]);const P=u.IndexDatatype.createTypedArray(h.length,x.length);P.set(x);let A=z;if(0!==y){let e=n.Quaternion.fromAxisAngle(b,y,O);if(A=a.Matrix3.fromQuaternion(e,A),t.tangent||t.bitangent){e=n.Quaternion.fromAxisAngle(b,-y,O);const o=a.Matrix3.fromQuaternion(e,S);f=a.Cartesian3.normalize(a.Matrix3.multiplyByVector(o,f,f),f),t.bitangent&&(C=a.Cartesian3.normalize(a.Cartesian3.cross(b,f,C),C))}}else A=a.Matrix3.clone(a.Matrix3.IDENTITY,A);const L=D;t.st&&(L.x=i.x,L.y=i.y);const w=h.length,G=3*w,F=new Float64Array(G),v=t.normal?new Float32Array(G):void 0,E=t.tangent?new Float32Array(G):void 0,T=t.bitangent?new Float32Array(G):void 0,V=t.st?new Float32Array(2*w):void 0;let R=0,H=0,I=0,M=0,B=0;for(let e=0;e<w;e++){const n=h[e];if(F[R++]=n.x,F[R++]=n.y,F[R++]=n.z,t.st)if(s.defined(p)&&p.positions.length===w)V[B++]=p.positions[e].x,V[B++]=p.positions[e].y;else{const e=m(a.Matrix3.multiplyByVector(A,n,_),k);o.Cartesian2.subtract(e,L,e);const t=d.CesiumMath.clamp(e.x/i.width,0,1),r=d.CesiumMath.clamp(e.y/i.height,0,1);V[B++]=t,V[B++]=r}t.normal&&(v[H++]=b.x,v[H++]=b.y,v[H++]=b.z),t.tangent&&(E[M++]=f.x,E[M++]=f.y,E[M++]=f.z),t.bitangent&&(T[I++]=C.x,T[I++]=C.y,T[I++]=C.z)}const N=new c.GeometryAttributes;return t.position&&(N.position=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:F})),t.normal&&(N.normal=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),t.tangent&&(N.tangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:E})),t.bitangent&&(N.bitangent=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:T})),t.st&&(N.st=new l.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),new l.Geometry({attributes:N,indices:P,primitiveType:l.PrimitiveType.TRIANGLES})}function j(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).polygonHierarchy,n=e.textureCoordinates,r=s.defaultValue(e.vertexFormat,b.VertexFormat.DEFAULT);this._vertexFormat=b.VertexFormat.clone(r),this._polygonHierarchy=t,this._stRotation=s.defaultValue(e.stRotation,0),this._ellipsoid=a.Ellipsoid.clone(s.defaultValue(e.ellipsoid,a.Ellipsoid.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=m.PolygonGeometryLibrary.computeHierarchyPackedLength(t,a.Cartesian3)+b.VertexFormat.packedLength+a.Ellipsoid.packedLength+(s.defined(n)?m.PolygonGeometryLibrary.computeHierarchyPackedLength(n,o.Cartesian2):1)+2}j.fromPositions=function(e){return new j({polygonHierarchy:{positions:(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates})},j.pack=function(e,t,n){return n=s.defaultValue(n,0),n=m.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,n,a.Cartesian3),a.Ellipsoid.pack(e._ellipsoid,t,n),n+=a.Ellipsoid.packedLength,b.VertexFormat.pack(e._vertexFormat,t,n),n+=b.VertexFormat.packedLength,t[n++]=e._stRotation,s.defined(e._textureCoordinates)?n=m.PolygonGeometryLibrary.packPolygonHierarchy(e._textureCoordinates,t,n,o.Cartesian2):t[n++]=-1,t[n++]=e.packedLength,t};const U=a.Ellipsoid.clone(a.Ellipsoid.UNIT_SPHERE),Y=new b.VertexFormat,q={polygonHierarchy:{}};return j.unpack=function(e,t,n){t=s.defaultValue(t,0);const r=m.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,a.Cartesian3);t=r.startingIndex,delete r.startingIndex;const i=a.Ellipsoid.unpack(e,t,U);t+=a.Ellipsoid.packedLength;const l=b.VertexFormat.unpack(e,t,Y);t+=b.VertexFormat.packedLength;const c=e[t++],y=-1===e[t]?void 0:m.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,o.Cartesian2);s.defined(y)?(t=y.startingIndex,delete y.startingIndex):t++;const p=e[t++];return s.defined(n)||(n=new j(q)),n._polygonHierarchy=r,n._ellipsoid=a.Ellipsoid.clone(i,n._ellipsoid),n._vertexFormat=b.VertexFormat.clone(l,n._vertexFormat),n._stRotation=c,n._textureCoordinates=y,n.packedLength=p,n},j.createGeometry=function(t){const o=t._vertexFormat,r=t._polygonHierarchy,c=t._stRotation,g=t._textureCoordinates,b=s.defined(g);let f=r.positions;if(f=e.arrayRemoveDuplicates(f,a.Cartesian3.equalsEpsilon,!0),f.length<3)return;let C=V,h=R,x=H,P=M;const A=B;if(!i.CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments(f,I,P,A))return;if(C=a.Cartesian3.cross(P,A,C),C=a.Cartesian3.normalize(C,C),!a.Cartesian3.equalsEpsilon(I,a.Cartesian3.ZERO,d.CesiumMath.EPSILON6)){const e=t._ellipsoid.geodeticSurfaceNormal(I,N);a.Cartesian3.dot(C,e)<0&&(C=a.Cartesian3.negate(C,C),P=a.Cartesian3.negate(P,P))}const L=i.CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction(I,P,A),w=i.CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction(I,P,A);o.tangent&&(h=a.Cartesian3.clone(P,h)),o.bitangent&&(x=a.Cartesian3.clone(A,x));const G=m.PolygonGeometryLibrary.polygonsFromHierarchy(r,b,L,!1),F=G.hierarchy,v=G.polygons,E=b?m.PolygonGeometryLibrary.polygonsFromHierarchy(g,!0,(function(e){return e}),!1).polygons:void 0;if(0===F.length)return;f=F[0].outerRing;const _=n.BoundingSphere.fromPoints(f),k=m.PolygonGeometryLibrary.computeBoundingRectangle(C,w,f,c,T),D=[];for(let e=0;e<v.length;e++){const t=new y.GeometryInstance({geometry:Q(v[e],o,k,c,b?E[e]:void 0,w,C,h,x)});D.push(t)}const O=p.GeometryPipeline.combineInstances(D)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=u.IndexDatatype.createTypedArray(O.attributes.position.values.length/3,O.indices);const z=O.attributes;return o.position||delete z.position,new l.Geometry({attributes:z,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:_})},function(e,t){return s.defined(t)&&(e=j.unpack(e,t)),j.createGeometry(e)}}));
public/CIMSDK/Workers/createCoplanarPolygonOutlineGeometry.js
@@ -1 +1 @@
define(["./arrayRemoveDuplicates-398390b2","./Transforms-f3654378","./Matrix3-6e56fbc7","./ComponentDatatype-985dcc38","./CoplanarPolygonGeometryLibrary-e70c981f","./defaultValue-865ac579","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryInstance-54a3e3b6","./GeometryPipeline-3f4d7db4","./IndexDatatype-16f6b4a1","./PolygonGeometryLibrary-e0e45e51","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./OrientedBoundingBox-ef95f619","./EllipsoidTangentPlane-2129690e","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f","./ArcType-68098157","./EllipsoidRhumbLine-b175af48","./PolygonPipeline-47fb81c6"],(function(e,t,n,o,r,i,a,c,y,l,s,u,p,d,f,m,g,b,h,P,G,L,C,T,E,A,H){"use strict";function k(e){const t=e.length,n=new Float64Array(3*t),r=s.IndexDatatype.createTypedArray(t,2*t);let i=0,y=0;for(let o=0;o<t;o++){const a=e[o];n[i++]=a.x,n[i++]=a.y,n[i++]=a.z,r[y++]=o,r[y++]=(o+1)%t}const l=new c.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});return new a.Geometry({attributes:l,indices:r,primitiveType:a.PrimitiveType.LINES})}function x(e){const t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=u.PolygonGeometryLibrary.computeHierarchyPackedLength(t,n.Cartesian3)+1}x.fromPositions=function(e){return new x({polygonHierarchy:{positions:(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).positions}})},x.pack=function(e,t,o){return o=i.defaultValue(o,0),t[o=u.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,o,n.Cartesian3)]=e.packedLength,t};const w={polygonHierarchy:{}};return x.unpack=function(e,t,o){t=i.defaultValue(t,0);const r=u.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,n.Cartesian3);t=r.startingIndex,delete r.startingIndex;const a=e[t];return i.defined(o)||(o=new x(w)),o._polygonHierarchy=r,o.packedLength=a,o},x.createGeometry=function(o){const i=o._polygonHierarchy;let c=i.positions;if(c=e.arrayRemoveDuplicates(c,n.Cartesian3.equalsEpsilon,!0),c.length<3)return;if(!r.CoplanarPolygonGeometryLibrary.validOutline(c))return;const s=u.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(i,!1);if(0===s.length)return;const p=[];for(let e=0;e<s.length;e++){const t=new y.GeometryInstance({geometry:k(s[e])});p.push(t)}const d=l.GeometryPipeline.combineInstances(p)[0],f=t.BoundingSphere.fromPoints(i.positions);return new a.Geometry({attributes:d.attributes,indices:d.indices,primitiveType:d.primitiveType,boundingSphere:f})},function(e,t){return i.defined(t)&&(e=x.unpack(e,t)),e._ellipsoid=n.Ellipsoid.clone(e._ellipsoid),x.createGeometry(e)}}));
define(["./arrayRemoveDuplicates-398390b2","./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./CoplanarPolygonGeometryLibrary-616dd2ed","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryInstance-8d112c0c","./GeometryPipeline-a349886f","./IndexDatatype-16f6b4a1","./PolygonGeometryLibrary-9908e46b","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./OrientedBoundingBox-34fc6856","./EllipsoidTangentPlane-a9681249","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./AttributeCompression-10297289","./EncodedCartesian3-e8922703","./ArcType-68098157","./EllipsoidRhumbLine-2cf9c5ef","./PolygonPipeline-8efb7487"],(function(e,t,n,o,r,i,a,c,y,l,s,u,p,d,m,f,g,b,h,P,G,L,C,T,E,A,H){"use strict";function k(e){const t=e.length,n=new Float64Array(3*t),r=s.IndexDatatype.createTypedArray(t,2*t);let i=0,y=0;for(let o=0;o<t;o++){const a=e[o];n[i++]=a.x,n[i++]=a.y,n[i++]=a.z,r[y++]=o,r[y++]=(o+1)%t}const l=new c.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:n})});return new a.Geometry({attributes:l,indices:r,primitiveType:a.PrimitiveType.LINES})}function x(e){const t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=u.PolygonGeometryLibrary.computeHierarchyPackedLength(t,n.Cartesian3)+1}x.fromPositions=function(e){return new x({polygonHierarchy:{positions:(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).positions}})},x.pack=function(e,t,o){return o=i.defaultValue(o,0),t[o=u.PolygonGeometryLibrary.packPolygonHierarchy(e._polygonHierarchy,t,o,n.Cartesian3)]=e.packedLength,t};const w={polygonHierarchy:{}};return x.unpack=function(e,t,o){t=i.defaultValue(t,0);const r=u.PolygonGeometryLibrary.unpackPolygonHierarchy(e,t,n.Cartesian3);t=r.startingIndex,delete r.startingIndex;const a=e[t];return i.defined(o)||(o=new x(w)),o._polygonHierarchy=r,o.packedLength=a,o},x.createGeometry=function(o){const i=o._polygonHierarchy;let c=i.positions;if(c=e.arrayRemoveDuplicates(c,n.Cartesian3.equalsEpsilon,!0),c.length<3)return;if(!r.CoplanarPolygonGeometryLibrary.validOutline(c))return;const s=u.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(i,!1);if(0===s.length)return;const p=[];for(let e=0;e<s.length;e++){const t=new y.GeometryInstance({geometry:k(s[e])});p.push(t)}const d=l.GeometryPipeline.combineInstances(p)[0],m=t.BoundingSphere.fromPoints(i.positions);return new a.Geometry({attributes:d.attributes,indices:d.indices,primitiveType:d.primitiveType,boundingSphere:m})},function(e,t){return i.defined(t)&&(e=x.unpack(e,t)),e._ellipsoid=n.Ellipsoid.clone(e._ellipsoid),x.createGeometry(e)}}));
public/CIMSDK/Workers/createCorridorGeometry.js
@@ -1 +1 @@
define(["./arrayRemoveDuplicates-398390b2","./Transforms-f3654378","./Matrix3-6e56fbc7","./ComponentDatatype-985dcc38","./PolylineVolumeGeometryLibrary-09ac3735","./CorridorGeometryLibrary-e4fe6e00","./defaultValue-865ac579","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-47fb81c6","./Matrix2-23dd5853","./VertexFormat-20b5279f","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-2129690e","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0","./PolylinePipeline-70a831f8","./EllipsoidGeodesic-3e762525","./EllipsoidRhumbLine-b175af48"],(function(t,e,r,a,i,o,n,s,l,d,u,c,m,f,y,p,g,h,C,b,A,_,w,v,T){"use strict";const G=new r.Cartesian3,E=new r.Cartesian3,V=new r.Cartesian3,x=new r.Cartesian3,L=new r.Cartesian3,P=new r.Cartesian3,F=new r.Cartesian3,N=new r.Cartesian3;function M(t,e){for(let r=0;r<t.length;r++)t[r]=e.scaleToGeodeticSurface(t[r],t[r]);return t}function D(t,e,a,i,n,s){const l=t.normals,d=t.tangents,u=t.bitangents,c=r.Cartesian3.normalize(r.Cartesian3.cross(a,e,F),F);s.normal&&o.CorridorGeometryLibrary.addAttribute(l,e,i,n),s.tangent&&o.CorridorGeometryLibrary.addAttribute(d,c,i,n),s.bitangent&&o.CorridorGeometryLibrary.addAttribute(u,a,i,n)}function O(t,e,i){const d=t.positions,m=t.corners,f=t.endPositions,y=t.lefts,p=t.normals,g=new l.GeometryAttributes;let h,C,b,A=0,_=0,w=0;for(C=0;C<d.length;C+=2)b=d[C].length-3,A+=b,w+=2*b,_+=d[C+1].length-3;for(A+=3,_+=3,C=0;C<m.length;C++){h=m[C];const t=m[C].leftPositions;n.defined(t)?(b=t.length,A+=b,w+=b):(b=m[C].rightPositions.length,_+=b,w+=b)}const v=n.defined(f);let T;v&&(T=f[0].length-3,A+=T,_+=T,T/=3,w+=6*T);const L=A+_,M=new Float64Array(L),O={normals:e.normal?new Float32Array(L):void 0,tangents:e.tangent?new Float32Array(L):void 0,bitangents:e.bitangent?new Float32Array(L):void 0};let I,S,R,k,H,z,B=0,U=L-1,Y=G,W=E;const q=T/2,J=u.IndexDatatype.createTypedArray(L/3,w);let j=0;if(v){z=V,H=x;const t=f[0];for(Y=r.Cartesian3.fromArray(p,0,Y),W=r.Cartesian3.fromArray(y,0,W),C=0;C<q;C++)z=r.Cartesian3.fromArray(t,3*(q-1-C),z),H=r.Cartesian3.fromArray(t,3*(q+C),H),o.CorridorGeometryLibrary.addAttribute(M,H,B),o.CorridorGeometryLibrary.addAttribute(M,z,void 0,U),D(O,Y,W,B,U,e),S=B/3,k=S+1,I=(U-2)/3,R=I-1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3}let K,Q,X=0,Z=0,$=d[X++],tt=d[X++];for(M.set($,B),M.set(tt,U-tt.length+1),W=r.Cartesian3.fromArray(y,Z,W),b=tt.length-3,C=0;C<b;C+=3)K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,C,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,b-C,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),D(O,Y,W,B,U,e),S=B/3,k=S+1,I=(U-2)/3,R=I-1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3;for(K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,b,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,b,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),Z+=3,C=0;C<m.length;C++){let t;h=m[C];const a=h.leftPositions,s=h.rightPositions;let l,u,c=P,f=V,g=x;if(Y=r.Cartesian3.fromArray(p,Z,Y),n.defined(a)){for(D(O,Y,W,void 0,U,e),U-=3,l=k,u=R,t=0;t<a.length/3;t++)c=r.Cartesian3.fromArray(a,3*t,c),J[j++]=l,J[j++]=u-t-1,J[j++]=u-t,o.CorridorGeometryLibrary.addAttribute(M,c,void 0,U),f=r.Cartesian3.fromArray(M,3*(u-t-1),f),g=r.Cartesian3.fromArray(M,3*l,g),W=r.Cartesian3.normalize(r.Cartesian3.subtract(f,g,W),W),D(O,Y,W,void 0,U,e),U-=3;c=r.Cartesian3.fromArray(M,3*l,c),f=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*u,f),c,f),g=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*(u-t),g),c,g),W=r.Cartesian3.normalize(r.Cartesian3.add(f,g,W),W),D(O,Y,W,B,void 0,e),B+=3}else{for(D(O,Y,W,B,void 0,e),B+=3,l=R,u=k,t=0;t<s.length/3;t++)c=r.Cartesian3.fromArray(s,3*t,c),J[j++]=l,J[j++]=u+t,J[j++]=u+t+1,o.CorridorGeometryLibrary.addAttribute(M,c,B),f=r.Cartesian3.fromArray(M,3*l,f),g=r.Cartesian3.fromArray(M,3*(u+t),g),W=r.Cartesian3.normalize(r.Cartesian3.subtract(f,g,W),W),D(O,Y,W,B,void 0,e),B+=3;c=r.Cartesian3.fromArray(M,3*l,c),f=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*(u+t),f),c,f),g=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*u,g),c,g),W=r.Cartesian3.normalize(r.Cartesian3.negate(r.Cartesian3.add(g,f,W),W),W),D(O,Y,W,void 0,U,e),U-=3}for($=d[X++],tt=d[X++],$.splice(0,3),tt.splice(tt.length-3,3),M.set($,B),M.set(tt,U-tt.length+1),b=tt.length-3,Z+=3,W=r.Cartesian3.fromArray(y,Z,W),t=0;t<tt.length;t+=3)K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,t,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,b-t,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),D(O,Y,W,B,U,e),k=B/3,S=k-1,R=(U-2)/3,I=R+1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3;B-=3,U+=3}if(Y=r.Cartesian3.fromArray(p,p.length-3,Y),D(O,Y,W,B,U,e),v){B+=3,U-=3,z=V,H=x;const t=f[1];for(C=0;C<q;C++)z=r.Cartesian3.fromArray(t,3*(T-C-1),z),H=r.Cartesian3.fromArray(t,3*C,H),o.CorridorGeometryLibrary.addAttribute(M,z,void 0,U),o.CorridorGeometryLibrary.addAttribute(M,H,B),D(O,Y,W,B,U,e),k=B/3,S=k-1,R=(U-2)/3,I=R+1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3}if(g.position=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:M}),e.st){const t=new Float32Array(L/3*2);let e,r,i=0;if(v){A/=3,_/=3;const a=Math.PI/(T+1);let o;r=1/(A-T+1),e=1/(_-T+1);const n=T/2;for(C=n+1;C<T+1;C++)o=c.CesiumMath.PI_OVER_TWO+a*C,t[i++]=e*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(C=1;C<_-T+1;C++)t[i++]=C*e,t[i++]=0;for(C=T;C>n;C--)o=c.CesiumMath.PI_OVER_TWO-C*a,t[i++]=1-e*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(C=n;C>0;C--)o=c.CesiumMath.PI_OVER_TWO-a*C,t[i++]=1-r*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(C=A-T;C>0;C--)t[i++]=C*r,t[i++]=1;for(C=1;C<n+1;C++)o=c.CesiumMath.PI_OVER_TWO+a*C,t[i++]=r*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o))}else{for(A/=3,_/=3,r=1/(A-1),e=1/(_-1),C=0;C<_;C++)t[i++]=C*e,t[i++]=0;for(C=A;C>0;C--)t[i++]=(C-1)*r,t[i++]=1}g.st=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}return e.normal&&(g.normal=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.normals})),e.tangent&&(g.tangent=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.tangents})),e.bitangent&&(g.bitangent=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.bitangents})),{attributes:g,indices:J}}function I(t,e,r){r[e++]=t[0],r[e++]=t[1],r[e++]=t[2];for(let a=3;a<t.length;a+=3){const i=t[a],o=t[a+1],n=t[a+2];r[e++]=i,r[e++]=o,r[e++]=n,r[e++]=i,r[e++]=o,r[e++]=n}return r[e++]=t[0],r[e++]=t[1],r[e++]=t[2],r}function S(t,e){const i=new y.VertexFormat({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,c=O(o.CorridorGeometryLibrary.computePositions(t),i,l),f=t.height,p=t.extrudedHeight;let g=c.attributes;const h=c.indices;let C=g.position.values,b=C.length;const A=new Float64Array(6*b);let _=new Float64Array(b);_.set(C);let w,v=new Float64Array(4*b);C=m.PolygonPipeline.scaleToGeodeticHeight(C,f,l),v=I(C,0,v),_=m.PolygonPipeline.scaleToGeodeticHeight(_,p,l),v=I(_,2*b,v),A.set(C),A.set(_,b),A.set(v,2*b),g.position.values=A,g=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;const a=t.position.values;let i,n;(e.normal||e.bitangent)&&(i=t.normal.values,n=t.bitangent.values);const s=t.position.values.length/18,l=3*s,d=2*s,u=2*l;let c;if(e.normal||e.bitangent||e.tangent){const s=e.normal?new Float32Array(6*l):void 0,d=e.tangent?new Float32Array(6*l):void 0,m=e.bitangent?new Float32Array(6*l):void 0;let f=G,y=E,p=V,g=x,h=L,C=P,b=u;for(c=0;c<l;c+=3){const t=b+u;f=r.Cartesian3.fromArray(a,c,f),y=r.Cartesian3.fromArray(a,c+l,y),p=r.Cartesian3.fromArray(a,(c+3)%l,p),y=r.Cartesian3.subtract(y,f,y),p=r.Cartesian3.subtract(p,f,p),g=r.Cartesian3.normalize(r.Cartesian3.cross(y,p,g),g),e.normal&&(o.CorridorGeometryLibrary.addAttribute(s,g,t),o.CorridorGeometryLibrary.addAttribute(s,g,t+3),o.CorridorGeometryLibrary.addAttribute(s,g,b),o.CorridorGeometryLibrary.addAttribute(s,g,b+3)),(e.tangent||e.bitangent)&&(C=r.Cartesian3.fromArray(i,c,C),e.bitangent&&(o.CorridorGeometryLibrary.addAttribute(m,C,t),o.CorridorGeometryLibrary.addAttribute(m,C,t+3),o.CorridorGeometryLibrary.addAttribute(m,C,b),o.CorridorGeometryLibrary.addAttribute(m,C,b+3)),e.tangent&&(h=r.Cartesian3.normalize(r.Cartesian3.cross(C,g,h),h),o.CorridorGeometryLibrary.addAttribute(d,h,t),o.CorridorGeometryLibrary.addAttribute(d,h,t+3),o.CorridorGeometryLibrary.addAttribute(d,h,b),o.CorridorGeometryLibrary.addAttribute(d,h,b+3))),b+=6}if(e.normal){for(s.set(i),c=0;c<l;c+=3)s[c+l]=-i[c],s[c+l+1]=-i[c+1],s[c+l+2]=-i[c+2];t.normal.values=s}else t.normal=void 0;if(e.bitangent?(m.set(n),m.set(n,l),t.bitangent.values=m):t.bitangent=void 0,e.tangent){const e=t.tangent.values;d.set(e),d.set(e,l),t.tangent.values=d}}if(e.st){const e=t.st.values,r=new Float32Array(6*d);r.set(e),r.set(e,d);let a=2*d;for(let t=0;t<2;t++){for(r[a++]=e[0],r[a++]=e[1],c=2;c<d;c+=2){const t=e[c],i=e[c+1];r[a++]=t,r[a++]=i,r[a++]=t,r[a++]=i}r[a++]=e[0],r[a++]=e[1]}t.st.values=r}return t}(g,e);const T=b/3;if(t.shadowVolume){const t=g.normal.values;b=t.length;let r=new Float32Array(6*b);for(w=0;w<b;w++)t[w]=-t[w];r.set(t,b),r=I(t,4*b,r),g.extrudeDirection=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:r}),e.normal||(g.normal=void 0)}if(n.defined(t.offsetAttribute)){let e=new Uint8Array(6*T);if(t.offsetAttribute===d.GeometryOffsetAttribute.TOP)e=e.fill(1,0,T).fill(1,2*T,4*T);else{const r=t.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;e=e.fill(r)}g.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}const F=h.length,N=T+T,M=u.IndexDatatype.createTypedArray(A.length/3,2*F+3*N);M.set(h);let D,S,R,k,H=F;for(w=0;w<F;w+=3){const t=h[w],e=h[w+1],r=h[w+2];M[H++]=r+T,M[H++]=e+T,M[H++]=t+T}for(w=0;w<N;w+=2)D=w+N,S=D+N,R=D+1,k=S+1,M[H++]=D,M[H++]=S,M[H++]=R,M[H++]=R,M[H++]=S,M[H++]=k;return{attributes:g,indices:M}}const R=new r.Cartesian3,k=new r.Cartesian3,H=new r.Cartographic;function z(t,e,a,i,o,n){const s=r.Cartesian3.subtract(e,t,R);r.Cartesian3.normalize(s,s);const l=a.geodeticSurfaceNormal(t,k),d=r.Cartesian3.cross(s,l,R);r.Cartesian3.multiplyByScalar(d,i,d);let u=o.latitude,c=o.longitude,m=n.latitude,f=n.longitude;r.Cartesian3.add(t,d,k),a.cartesianToCartographic(k,H);let y=H.latitude,p=H.longitude;u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),r.Cartesian3.subtract(t,d,k),a.cartesianToCartographic(k,H),y=H.latitude,p=H.longitude,u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),o.latitude=u,o.longitude=c,n.latitude=m,n.longitude=f}const B=new r.Cartesian3,U=new r.Cartesian3,Y=new r.Cartographic,W=new r.Cartographic;function q(e,a,o,s,l){e=M(e,a);const d=t.arrayRemoveDuplicates(e,r.Cartesian3.equalsEpsilon),u=d.length;if(u<2||o<=0)return new f.Rectangle;const c=.5*o;let m,y;if(Y.latitude=Number.POSITIVE_INFINITY,Y.longitude=Number.POSITIVE_INFINITY,W.latitude=Number.NEGATIVE_INFINITY,W.longitude=Number.NEGATIVE_INFINITY,s===i.CornerType.ROUNDED){const t=d[0];r.Cartesian3.subtract(t,d[1],B),r.Cartesian3.normalize(B,B),r.Cartesian3.multiplyByScalar(B,c,B),r.Cartesian3.add(t,B,U),a.cartesianToCartographic(U,H),m=H.latitude,y=H.longitude,Y.latitude=Math.min(Y.latitude,m),Y.longitude=Math.min(Y.longitude,y),W.latitude=Math.max(W.latitude,m),W.longitude=Math.max(W.longitude,y)}for(let t=0;t<u-1;++t)z(d[t],d[t+1],a,c,Y,W);const p=d[u-1];r.Cartesian3.subtract(p,d[u-2],B),r.Cartesian3.normalize(B,B),r.Cartesian3.multiplyByScalar(B,c,B),r.Cartesian3.add(p,B,U),z(p,U,a,c,Y,W),s===i.CornerType.ROUNDED&&(a.cartesianToCartographic(U,H),m=H.latitude,y=H.longitude,Y.latitude=Math.min(Y.latitude,m),Y.longitude=Math.min(Y.longitude,y),W.latitude=Math.max(W.latitude,m),W.longitude=Math.max(W.longitude,y));const g=n.defined(l)?l:new f.Rectangle;return g.north=W.latitude,g.south=Y.latitude,g.east=W.longitude,g.west=Y.longitude,g}function J(t){const e=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).positions,a=t.width,o=n.defaultValue(t.height,0),s=n.defaultValue(t.extrudedHeight,o);this._positions=e,this._ellipsoid=r.Ellipsoid.clone(n.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84)),this._vertexFormat=y.VertexFormat.clone(n.defaultValue(t.vertexFormat,y.VertexFormat.DEFAULT)),this._width=a,this._height=Math.max(o,s),this._extrudedHeight=Math.min(o,s),this._cornerType=n.defaultValue(t.cornerType,i.CornerType.ROUNDED),this._granularity=n.defaultValue(t.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=n.defaultValue(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*r.Cartesian3.packedLength+r.Ellipsoid.packedLength+y.VertexFormat.packedLength+7}J.pack=function(t,e,a){a=n.defaultValue(a,0);const i=t._positions,o=i.length;e[a++]=o;for(let t=0;t<o;++t,a+=r.Cartesian3.packedLength)r.Cartesian3.pack(i[t],e,a);return r.Ellipsoid.pack(t._ellipsoid,e,a),a+=r.Ellipsoid.packedLength,y.VertexFormat.pack(t._vertexFormat,e,a),a+=y.VertexFormat.packedLength,e[a++]=t._width,e[a++]=t._height,e[a++]=t._extrudedHeight,e[a++]=t._cornerType,e[a++]=t._granularity,e[a++]=t._shadowVolume?1:0,e[a]=n.defaultValue(t._offsetAttribute,-1),e};const j=r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),K=new y.VertexFormat,Q={positions:void 0,ellipsoid:j,vertexFormat:K,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return J.unpack=function(t,e,a){e=n.defaultValue(e,0);const i=t[e++],o=new Array(i);for(let a=0;a<i;++a,e+=r.Cartesian3.packedLength)o[a]=r.Cartesian3.unpack(t,e);const s=r.Ellipsoid.unpack(t,e,j);e+=r.Ellipsoid.packedLength;const l=y.VertexFormat.unpack(t,e,K);e+=y.VertexFormat.packedLength;const d=t[e++],u=t[e++],c=t[e++],m=t[e++],f=t[e++],p=1===t[e++],g=t[e];return n.defined(a)?(a._positions=o,a._ellipsoid=r.Ellipsoid.clone(s,a._ellipsoid),a._vertexFormat=y.VertexFormat.clone(l,a._vertexFormat),a._width=d,a._height=u,a._extrudedHeight=c,a._cornerType=m,a._granularity=f,a._shadowVolume=p,a._offsetAttribute=-1===g?void 0:g,a):(Q.positions=o,Q.width=d,Q.height=u,Q.extrudedHeight=c,Q.cornerType=m,Q.granularity=f,Q.shadowVolume=p,Q.offsetAttribute=-1===g?void 0:g,new J(Q))},J.computeRectangle=function(t,e){const a=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).positions,o=t.width;return q(a,n.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),o,n.defaultValue(t.cornerType,i.CornerType.ROUNDED),e)},J.createGeometry=function(i){let l=i._positions;const u=i._width,f=i._ellipsoid;l=M(l,f);const y=t.arrayRemoveDuplicates(l,r.Cartesian3.equalsEpsilon);if(y.length<2||u<=0)return;const p=i._height,g=i._extrudedHeight,h=!c.CesiumMath.equalsEpsilon(p,g,0,c.CesiumMath.EPSILON2),C=i._vertexFormat,b={ellipsoid:f,positions:y,width:u,cornerType:i._cornerType,granularity:i._granularity,saveAttributes:!0};let A;if(h)b.height=p,b.extrudedHeight=g,b.shadowVolume=i._shadowVolume,b.offsetAttribute=i._offsetAttribute,A=S(b,C);else{if(A=O(o.CorridorGeometryLibrary.computePositions(b),C,f),A.attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(A.attributes.position.values,p,f),n.defined(i._offsetAttribute)){const t=i._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,e=A.attributes.position.values.length,r=new Uint8Array(e/3).fill(t);A.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}}const _=A.attributes,w=e.BoundingSphere.fromVertices(_.position.values,void 0,3);return C.position||(A.attributes.position.values=void 0),new s.Geometry({attributes:_,indices:A.indices,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:w,offsetAttribute:i._offsetAttribute})},J.createShadowVolume=function(t,e,r){const a=t._granularity,i=t._ellipsoid,o=e(a,i),n=r(a,i);return new J({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:i,granularity:a,extrudedHeight:o,height:n,vertexFormat:y.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(J.prototype,{rectangle:{get:function(){return n.defined(this._rectangle)||(this._rectangle=q(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return n.defined(e)&&(t=J.unpack(t,e)),t._ellipsoid=r.Ellipsoid.clone(t._ellipsoid),J.createGeometry(t)}}));
define(["./arrayRemoveDuplicates-398390b2","./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./PolylineVolumeGeometryLibrary-7de9a48a","./CorridorGeometryLibrary-e69b5c03","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-8efb7487","./Matrix2-2fdcdec7","./VertexFormat-20b5279f","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-a9681249","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./PolylinePipeline-482bb0f7","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef"],(function(t,e,r,a,i,o,n,s,l,d,u,c,m,f,y,p,g,h,b,C,A,_,w,v,T){"use strict";const G=new r.Cartesian3,E=new r.Cartesian3,V=new r.Cartesian3,x=new r.Cartesian3,L=new r.Cartesian3,P=new r.Cartesian3,F=new r.Cartesian3,N=new r.Cartesian3;function M(t,e){for(let r=0;r<t.length;r++)t[r]=e.scaleToGeodeticSurface(t[r],t[r]);return t}function D(t,e,a,i,n,s){const l=t.normals,d=t.tangents,u=t.bitangents,c=r.Cartesian3.normalize(r.Cartesian3.cross(a,e,F),F);s.normal&&o.CorridorGeometryLibrary.addAttribute(l,e,i,n),s.tangent&&o.CorridorGeometryLibrary.addAttribute(d,c,i,n),s.bitangent&&o.CorridorGeometryLibrary.addAttribute(u,a,i,n)}function O(t,e,i){const d=t.positions,m=t.corners,f=t.endPositions,y=t.lefts,p=t.normals,g=new l.GeometryAttributes;let h,b,C,A=0,_=0,w=0;for(b=0;b<d.length;b+=2)C=d[b].length-3,A+=C,w+=2*C,_+=d[b+1].length-3;for(A+=3,_+=3,b=0;b<m.length;b++){h=m[b];const t=m[b].leftPositions;n.defined(t)?(C=t.length,A+=C,w+=C):(C=m[b].rightPositions.length,_+=C,w+=C)}const v=n.defined(f);let T;v&&(T=f[0].length-3,A+=T,_+=T,T/=3,w+=6*T);const L=A+_,M=new Float64Array(L),O={normals:e.normal?new Float32Array(L):void 0,tangents:e.tangent?new Float32Array(L):void 0,bitangents:e.bitangent?new Float32Array(L):void 0};let I,S,R,k,H,z,B=0,U=L-1,Y=G,W=E;const q=T/2,J=u.IndexDatatype.createTypedArray(L/3,w);let j=0;if(v){z=V,H=x;const t=f[0];for(Y=r.Cartesian3.fromArray(p,0,Y),W=r.Cartesian3.fromArray(y,0,W),b=0;b<q;b++)z=r.Cartesian3.fromArray(t,3*(q-1-b),z),H=r.Cartesian3.fromArray(t,3*(q+b),H),o.CorridorGeometryLibrary.addAttribute(M,H,B),o.CorridorGeometryLibrary.addAttribute(M,z,void 0,U),D(O,Y,W,B,U,e),S=B/3,k=S+1,I=(U-2)/3,R=I-1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3}let K,Q,X=0,Z=0,$=d[X++],tt=d[X++];for(M.set($,B),M.set(tt,U-tt.length+1),W=r.Cartesian3.fromArray(y,Z,W),C=tt.length-3,b=0;b<C;b+=3)K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,b,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,C-b,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),D(O,Y,W,B,U,e),S=B/3,k=S+1,I=(U-2)/3,R=I-1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3;for(K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,C,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,C,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),Z+=3,b=0;b<m.length;b++){let t;h=m[b];const a=h.leftPositions,s=h.rightPositions;let l,u,c=P,f=V,g=x;if(Y=r.Cartesian3.fromArray(p,Z,Y),n.defined(a)){for(D(O,Y,W,void 0,U,e),U-=3,l=k,u=R,t=0;t<a.length/3;t++)c=r.Cartesian3.fromArray(a,3*t,c),J[j++]=l,J[j++]=u-t-1,J[j++]=u-t,o.CorridorGeometryLibrary.addAttribute(M,c,void 0,U),f=r.Cartesian3.fromArray(M,3*(u-t-1),f),g=r.Cartesian3.fromArray(M,3*l,g),W=r.Cartesian3.normalize(r.Cartesian3.subtract(f,g,W),W),D(O,Y,W,void 0,U,e),U-=3;c=r.Cartesian3.fromArray(M,3*l,c),f=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*u,f),c,f),g=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*(u-t),g),c,g),W=r.Cartesian3.normalize(r.Cartesian3.add(f,g,W),W),D(O,Y,W,B,void 0,e),B+=3}else{for(D(O,Y,W,B,void 0,e),B+=3,l=R,u=k,t=0;t<s.length/3;t++)c=r.Cartesian3.fromArray(s,3*t,c),J[j++]=l,J[j++]=u+t,J[j++]=u+t+1,o.CorridorGeometryLibrary.addAttribute(M,c,B),f=r.Cartesian3.fromArray(M,3*l,f),g=r.Cartesian3.fromArray(M,3*(u+t),g),W=r.Cartesian3.normalize(r.Cartesian3.subtract(f,g,W),W),D(O,Y,W,B,void 0,e),B+=3;c=r.Cartesian3.fromArray(M,3*l,c),f=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*(u+t),f),c,f),g=r.Cartesian3.subtract(r.Cartesian3.fromArray(M,3*u,g),c,g),W=r.Cartesian3.normalize(r.Cartesian3.negate(r.Cartesian3.add(g,f,W),W),W),D(O,Y,W,void 0,U,e),U-=3}for($=d[X++],tt=d[X++],$.splice(0,3),tt.splice(tt.length-3,3),M.set($,B),M.set(tt,U-tt.length+1),C=tt.length-3,Z+=3,W=r.Cartesian3.fromArray(y,Z,W),t=0;t<tt.length;t+=3)K=i.geodeticSurfaceNormal(r.Cartesian3.fromArray($,t,F),F),Q=i.geodeticSurfaceNormal(r.Cartesian3.fromArray(tt,C-t,N),N),Y=r.Cartesian3.normalize(r.Cartesian3.add(K,Q,Y),Y),D(O,Y,W,B,U,e),k=B/3,S=k-1,R=(U-2)/3,I=R+1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3;B-=3,U+=3}if(Y=r.Cartesian3.fromArray(p,p.length-3,Y),D(O,Y,W,B,U,e),v){B+=3,U-=3,z=V,H=x;const t=f[1];for(b=0;b<q;b++)z=r.Cartesian3.fromArray(t,3*(T-b-1),z),H=r.Cartesian3.fromArray(t,3*b,H),o.CorridorGeometryLibrary.addAttribute(M,z,void 0,U),o.CorridorGeometryLibrary.addAttribute(M,H,B),D(O,Y,W,B,U,e),k=B/3,S=k-1,R=(U-2)/3,I=R+1,J[j++]=I,J[j++]=S,J[j++]=R,J[j++]=R,J[j++]=S,J[j++]=k,B+=3,U-=3}if(g.position=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:M}),e.st){const t=new Float32Array(L/3*2);let e,r,i=0;if(v){A/=3,_/=3;const a=Math.PI/(T+1);let o;r=1/(A-T+1),e=1/(_-T+1);const n=T/2;for(b=n+1;b<T+1;b++)o=c.CesiumMath.PI_OVER_TWO+a*b,t[i++]=e*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(b=1;b<_-T+1;b++)t[i++]=b*e,t[i++]=0;for(b=T;b>n;b--)o=c.CesiumMath.PI_OVER_TWO-b*a,t[i++]=1-e*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(b=n;b>0;b--)o=c.CesiumMath.PI_OVER_TWO-a*b,t[i++]=1-r*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o));for(b=A-T;b>0;b--)t[i++]=b*r,t[i++]=1;for(b=1;b<n+1;b++)o=c.CesiumMath.PI_OVER_TWO+a*b,t[i++]=r*(1+Math.cos(o)),t[i++]=.5*(1+Math.sin(o))}else{for(A/=3,_/=3,r=1/(A-1),e=1/(_-1),b=0;b<_;b++)t[i++]=b*e,t[i++]=0;for(b=A;b>0;b--)t[i++]=(b-1)*r,t[i++]=1}g.st=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}return e.normal&&(g.normal=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.normals})),e.tangent&&(g.tangent=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.tangents})),e.bitangent&&(g.bitangent=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O.bitangents})),{attributes:g,indices:J}}function I(t,e,r){r[e++]=t[0],r[e++]=t[1],r[e++]=t[2];for(let a=3;a<t.length;a+=3){const i=t[a],o=t[a+1],n=t[a+2];r[e++]=i,r[e++]=o,r[e++]=n,r[e++]=i,r[e++]=o,r[e++]=n}return r[e++]=t[0],r[e++]=t[1],r[e++]=t[2],r}function S(t,e){const i=new y.VertexFormat({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,c=O(o.CorridorGeometryLibrary.computePositions(t),i,l),f=t.height,p=t.extrudedHeight;let g=c.attributes;const h=c.indices;let b=g.position.values,C=b.length;const A=new Float64Array(6*C);let _=new Float64Array(C);_.set(b);let w,v=new Float64Array(4*C);b=m.PolygonPipeline.scaleToGeodeticHeight(b,f,l),v=I(b,0,v),_=m.PolygonPipeline.scaleToGeodeticHeight(_,p,l),v=I(_,2*C,v),A.set(b),A.set(_,C),A.set(v,2*C),g.position.values=A,g=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;const a=t.position.values;let i,n;(e.normal||e.bitangent)&&(i=t.normal.values,n=t.bitangent.values);const s=t.position.values.length/18,l=3*s,d=2*s,u=2*l;let c;if(e.normal||e.bitangent||e.tangent){const s=e.normal?new Float32Array(6*l):void 0,d=e.tangent?new Float32Array(6*l):void 0,m=e.bitangent?new Float32Array(6*l):void 0;let f=G,y=E,p=V,g=x,h=L,b=P,C=u;for(c=0;c<l;c+=3){const t=C+u;f=r.Cartesian3.fromArray(a,c,f),y=r.Cartesian3.fromArray(a,c+l,y),p=r.Cartesian3.fromArray(a,(c+3)%l,p),y=r.Cartesian3.subtract(y,f,y),p=r.Cartesian3.subtract(p,f,p),g=r.Cartesian3.normalize(r.Cartesian3.cross(y,p,g),g),e.normal&&(o.CorridorGeometryLibrary.addAttribute(s,g,t),o.CorridorGeometryLibrary.addAttribute(s,g,t+3),o.CorridorGeometryLibrary.addAttribute(s,g,C),o.CorridorGeometryLibrary.addAttribute(s,g,C+3)),(e.tangent||e.bitangent)&&(b=r.Cartesian3.fromArray(i,c,b),e.bitangent&&(o.CorridorGeometryLibrary.addAttribute(m,b,t),o.CorridorGeometryLibrary.addAttribute(m,b,t+3),o.CorridorGeometryLibrary.addAttribute(m,b,C),o.CorridorGeometryLibrary.addAttribute(m,b,C+3)),e.tangent&&(h=r.Cartesian3.normalize(r.Cartesian3.cross(b,g,h),h),o.CorridorGeometryLibrary.addAttribute(d,h,t),o.CorridorGeometryLibrary.addAttribute(d,h,t+3),o.CorridorGeometryLibrary.addAttribute(d,h,C),o.CorridorGeometryLibrary.addAttribute(d,h,C+3))),C+=6}if(e.normal){for(s.set(i),c=0;c<l;c+=3)s[c+l]=-i[c],s[c+l+1]=-i[c+1],s[c+l+2]=-i[c+2];t.normal.values=s}else t.normal=void 0;if(e.bitangent?(m.set(n),m.set(n,l),t.bitangent.values=m):t.bitangent=void 0,e.tangent){const e=t.tangent.values;d.set(e),d.set(e,l),t.tangent.values=d}}if(e.st){const e=t.st.values,r=new Float32Array(6*d);r.set(e),r.set(e,d);let a=2*d;for(let t=0;t<2;t++){for(r[a++]=e[0],r[a++]=e[1],c=2;c<d;c+=2){const t=e[c],i=e[c+1];r[a++]=t,r[a++]=i,r[a++]=t,r[a++]=i}r[a++]=e[0],r[a++]=e[1]}t.st.values=r}return t}(g,e);const T=C/3;if(t.shadowVolume){const t=g.normal.values;C=t.length;let r=new Float32Array(6*C);for(w=0;w<C;w++)t[w]=-t[w];r.set(t,C),r=I(t,4*C,r),g.extrudeDirection=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:r}),e.normal||(g.normal=void 0)}if(n.defined(t.offsetAttribute)){let e=new Uint8Array(6*T);if(t.offsetAttribute===d.GeometryOffsetAttribute.TOP)e=e.fill(1,0,T).fill(1,2*T,4*T);else{const r=t.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;e=e.fill(r)}g.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}const F=h.length,N=T+T,M=u.IndexDatatype.createTypedArray(A.length/3,2*F+3*N);M.set(h);let D,S,R,k,H=F;for(w=0;w<F;w+=3){const t=h[w],e=h[w+1],r=h[w+2];M[H++]=r+T,M[H++]=e+T,M[H++]=t+T}for(w=0;w<N;w+=2)D=w+N,S=D+N,R=D+1,k=S+1,M[H++]=D,M[H++]=S,M[H++]=R,M[H++]=R,M[H++]=S,M[H++]=k;return{attributes:g,indices:M}}const R=new r.Cartesian3,k=new r.Cartesian3,H=new r.Cartographic;function z(t,e,a,i,o,n){const s=r.Cartesian3.subtract(e,t,R);r.Cartesian3.normalize(s,s);const l=a.geodeticSurfaceNormal(t,k),d=r.Cartesian3.cross(s,l,R);r.Cartesian3.multiplyByScalar(d,i,d);let u=o.latitude,c=o.longitude,m=n.latitude,f=n.longitude;r.Cartesian3.add(t,d,k),a.cartesianToCartographic(k,H);let y=H.latitude,p=H.longitude;u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),r.Cartesian3.subtract(t,d,k),a.cartesianToCartographic(k,H),y=H.latitude,p=H.longitude,u=Math.min(u,y),c=Math.min(c,p),m=Math.max(m,y),f=Math.max(f,p),o.latitude=u,o.longitude=c,n.latitude=m,n.longitude=f}const B=new r.Cartesian3,U=new r.Cartesian3,Y=new r.Cartographic,W=new r.Cartographic;function q(e,a,o,s,l){e=M(e,a);const d=t.arrayRemoveDuplicates(e,r.Cartesian3.equalsEpsilon),u=d.length;if(u<2||o<=0)return new f.Rectangle;const c=.5*o;let m,y;if(Y.latitude=Number.POSITIVE_INFINITY,Y.longitude=Number.POSITIVE_INFINITY,W.latitude=Number.NEGATIVE_INFINITY,W.longitude=Number.NEGATIVE_INFINITY,s===i.CornerType.ROUNDED){const t=d[0];r.Cartesian3.subtract(t,d[1],B),r.Cartesian3.normalize(B,B),r.Cartesian3.multiplyByScalar(B,c,B),r.Cartesian3.add(t,B,U),a.cartesianToCartographic(U,H),m=H.latitude,y=H.longitude,Y.latitude=Math.min(Y.latitude,m),Y.longitude=Math.min(Y.longitude,y),W.latitude=Math.max(W.latitude,m),W.longitude=Math.max(W.longitude,y)}for(let t=0;t<u-1;++t)z(d[t],d[t+1],a,c,Y,W);const p=d[u-1];r.Cartesian3.subtract(p,d[u-2],B),r.Cartesian3.normalize(B,B),r.Cartesian3.multiplyByScalar(B,c,B),r.Cartesian3.add(p,B,U),z(p,U,a,c,Y,W),s===i.CornerType.ROUNDED&&(a.cartesianToCartographic(U,H),m=H.latitude,y=H.longitude,Y.latitude=Math.min(Y.latitude,m),Y.longitude=Math.min(Y.longitude,y),W.latitude=Math.max(W.latitude,m),W.longitude=Math.max(W.longitude,y));const g=n.defined(l)?l:new f.Rectangle;return g.north=W.latitude,g.south=Y.latitude,g.east=W.longitude,g.west=Y.longitude,g}function J(t){const e=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).positions,a=t.width,o=n.defaultValue(t.height,0),s=n.defaultValue(t.extrudedHeight,o);this._positions=e,this._ellipsoid=r.Ellipsoid.clone(n.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84)),this._vertexFormat=y.VertexFormat.clone(n.defaultValue(t.vertexFormat,y.VertexFormat.DEFAULT)),this._width=a,this._height=Math.max(o,s),this._extrudedHeight=Math.min(o,s),this._cornerType=n.defaultValue(t.cornerType,i.CornerType.ROUNDED),this._granularity=n.defaultValue(t.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=n.defaultValue(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*r.Cartesian3.packedLength+r.Ellipsoid.packedLength+y.VertexFormat.packedLength+7}J.pack=function(t,e,a){a=n.defaultValue(a,0);const i=t._positions,o=i.length;e[a++]=o;for(let t=0;t<o;++t,a+=r.Cartesian3.packedLength)r.Cartesian3.pack(i[t],e,a);return r.Ellipsoid.pack(t._ellipsoid,e,a),a+=r.Ellipsoid.packedLength,y.VertexFormat.pack(t._vertexFormat,e,a),a+=y.VertexFormat.packedLength,e[a++]=t._width,e[a++]=t._height,e[a++]=t._extrudedHeight,e[a++]=t._cornerType,e[a++]=t._granularity,e[a++]=t._shadowVolume?1:0,e[a]=n.defaultValue(t._offsetAttribute,-1),e};const j=r.Ellipsoid.clone(r.Ellipsoid.UNIT_SPHERE),K=new y.VertexFormat,Q={positions:void 0,ellipsoid:j,vertexFormat:K,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return J.unpack=function(t,e,a){e=n.defaultValue(e,0);const i=t[e++],o=new Array(i);for(let a=0;a<i;++a,e+=r.Cartesian3.packedLength)o[a]=r.Cartesian3.unpack(t,e);const s=r.Ellipsoid.unpack(t,e,j);e+=r.Ellipsoid.packedLength;const l=y.VertexFormat.unpack(t,e,K);e+=y.VertexFormat.packedLength;const d=t[e++],u=t[e++],c=t[e++],m=t[e++],f=t[e++],p=1===t[e++],g=t[e];return n.defined(a)?(a._positions=o,a._ellipsoid=r.Ellipsoid.clone(s,a._ellipsoid),a._vertexFormat=y.VertexFormat.clone(l,a._vertexFormat),a._width=d,a._height=u,a._extrudedHeight=c,a._cornerType=m,a._granularity=f,a._shadowVolume=p,a._offsetAttribute=-1===g?void 0:g,a):(Q.positions=o,Q.width=d,Q.height=u,Q.extrudedHeight=c,Q.cornerType=m,Q.granularity=f,Q.shadowVolume=p,Q.offsetAttribute=-1===g?void 0:g,new J(Q))},J.computeRectangle=function(t,e){const a=(t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT)).positions,o=t.width;return q(a,n.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),o,n.defaultValue(t.cornerType,i.CornerType.ROUNDED),e)},J.createGeometry=function(i){let l=i._positions;const u=i._width,f=i._ellipsoid;l=M(l,f);const y=t.arrayRemoveDuplicates(l,r.Cartesian3.equalsEpsilon);if(y.length<2||u<=0)return;const p=i._height,g=i._extrudedHeight,h=!c.CesiumMath.equalsEpsilon(p,g,0,c.CesiumMath.EPSILON2),b=i._vertexFormat,C={ellipsoid:f,positions:y,width:u,cornerType:i._cornerType,granularity:i._granularity,saveAttributes:!0};let A;if(h)C.height=p,C.extrudedHeight=g,C.shadowVolume=i._shadowVolume,C.offsetAttribute=i._offsetAttribute,A=S(C,b);else{if(A=O(o.CorridorGeometryLibrary.computePositions(C),b,f),A.attributes.position.values=m.PolygonPipeline.scaleToGeodeticHeight(A.attributes.position.values,p,f),n.defined(i._offsetAttribute)){const t=i._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,e=A.attributes.position.values.length,r=new Uint8Array(e/3).fill(t);A.attributes.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}}const _=A.attributes,w=e.BoundingSphere.fromVertices(_.position.values,void 0,3);return b.position||(A.attributes.position.values=void 0),new s.Geometry({attributes:_,indices:A.indices,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:w,offsetAttribute:i._offsetAttribute})},J.createShadowVolume=function(t,e,r){const a=t._granularity,i=t._ellipsoid,o=e(a,i),n=r(a,i);return new J({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:i,granularity:a,extrudedHeight:o,height:n,vertexFormat:y.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(J.prototype,{rectangle:{get:function(){return n.defined(this._rectangle)||(this._rectangle=q(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return n.defined(e)&&(t=J.unpack(t,e)),t._ellipsoid=r.Ellipsoid.clone(t._ellipsoid),J.createGeometry(t)}}));
public/CIMSDK/Workers/createCorridorOutlineGeometry.js
@@ -1 +1 @@
define(["./arrayRemoveDuplicates-398390b2","./Transforms-f3654378","./Matrix3-6e56fbc7","./ComponentDatatype-985dcc38","./PolylineVolumeGeometryLibrary-09ac3735","./CorridorGeometryLibrary-e4fe6e00","./defaultValue-865ac579","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-47fb81c6","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-2129690e","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0","./PolylinePipeline-70a831f8","./EllipsoidGeodesic-3e762525","./EllipsoidRhumbLine-b175af48"],(function(e,t,i,r,o,n,s,a,l,d,u,p,f,c,h,y,g,b,m,A,_,E,C,G){"use strict";const T=new i.Cartesian3,P=new i.Cartesian3,v=new i.Cartesian3;function w(e,t){const d=[],p=e.positions,f=e.corners,c=e.endPositions,h=new l.GeometryAttributes;let y,g,b,m=0,A=0,_=0;for(g=0;g<p.length;g+=2)b=p[g].length-3,m+=b,_+=b/3*4,A+=p[g+1].length-3;for(m+=3,A+=3,g=0;g<f.length;g++){y=f[g];const e=f[g].leftPositions;s.defined(e)?(b=e.length,m+=b,_+=b/3*2):(b=f[g].rightPositions.length,A+=b,_+=b/3*2)}const E=s.defined(c);let C;E&&(C=c[0].length-3,m+=C,A+=C,C/=3,_+=4*C);const G=m+A,w=new Float64Array(G);let L,D,x,k,V,N,O=0,H=G-1;const I=C/2,M=u.IndexDatatype.createTypedArray(G/3,_+4);let S=0;if(M[S++]=O/3,M[S++]=(H-2)/3,E){d.push(O/3),N=T,V=P;const e=c[0];for(g=0;g<I;g++)N=i.Cartesian3.fromArray(e,3*(I-1-g),N),V=i.Cartesian3.fromArray(e,3*(I+g),V),n.CorridorGeometryLibrary.addAttribute(w,V,O),n.CorridorGeometryLibrary.addAttribute(w,N,void 0,H),D=O/3,k=D+1,L=(H-2)/3,x=L-1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3}let B=0,R=p[B++],U=p[B++];for(w.set(R,O),w.set(U,H-U.length+1),b=U.length-3,d.push(O/3,(H-2)/3),g=0;g<b;g+=3)D=O/3,k=D+1,L=(H-2)/3,x=L-1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;for(g=0;g<f.length;g++){let e;y=f[g];const r=y.leftPositions,a=y.rightPositions;let l,u=v;if(s.defined(r)){for(H-=3,l=x,d.push(k),e=0;e<r.length/3;e++)u=i.Cartesian3.fromArray(r,3*e,u),M[S++]=l-e-1,M[S++]=l-e,n.CorridorGeometryLibrary.addAttribute(w,u,void 0,H),H-=3;d.push(l-Math.floor(r.length/6)),t===o.CornerType.BEVELED&&d.push((H-2)/3+1),O+=3}else{for(O+=3,l=k,d.push(x),e=0;e<a.length/3;e++)u=i.Cartesian3.fromArray(a,3*e,u),M[S++]=l+e,M[S++]=l+e+1,n.CorridorGeometryLibrary.addAttribute(w,u,O),O+=3;d.push(l+Math.floor(a.length/6)),t===o.CornerType.BEVELED&&d.push(O/3-1),H-=3}for(R=p[B++],U=p[B++],R.splice(0,3),U.splice(U.length-3,3),w.set(R,O),w.set(U,H-U.length+1),b=U.length-3,e=0;e<U.length;e+=3)k=O/3,D=k-1,x=(H-2)/3,L=x+1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;O-=3,H+=3,d.push(O/3,(H-2)/3)}if(E){O+=3,H-=3,N=T,V=P;const e=c[1];for(g=0;g<I;g++)N=i.Cartesian3.fromArray(e,3*(C-g-1),N),V=i.Cartesian3.fromArray(e,3*g,V),n.CorridorGeometryLibrary.addAttribute(w,N,void 0,H),n.CorridorGeometryLibrary.addAttribute(w,V,O),k=O/3,D=k-1,x=(H-2)/3,L=x+1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;d.push(O/3)}else d.push(O/3,(H-2)/3);return M[S++]=O/3,M[S++]=(H-2)/3,h.position=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w}),{attributes:h,indices:M,wallIndices:d}}function L(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions,r=e.width,n=s.defaultValue(e.height,0),a=s.defaultValue(e.extrudedHeight,n);this._positions=t,this._ellipsoid=i.Ellipsoid.clone(s.defaultValue(e.ellipsoid,i.Ellipsoid.WGS84)),this._width=r,this._height=Math.max(n,a),this._extrudedHeight=Math.min(n,a),this._cornerType=s.defaultValue(e.cornerType,o.CornerType.ROUNDED),this._granularity=s.defaultValue(e.granularity,p.CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*i.Cartesian3.packedLength+i.Ellipsoid.packedLength+6}L.pack=function(e,t,r){r=s.defaultValue(r,0);const o=e._positions,n=o.length;t[r++]=n;for(let e=0;e<n;++e,r+=i.Cartesian3.packedLength)i.Cartesian3.pack(o[e],t,r);return i.Ellipsoid.pack(e._ellipsoid,t,r),r+=i.Ellipsoid.packedLength,t[r++]=e._width,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._cornerType,t[r++]=e._granularity,t[r]=s.defaultValue(e._offsetAttribute,-1),t};const D=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),x={positions:void 0,ellipsoid:D,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return L.unpack=function(e,t,r){t=s.defaultValue(t,0);const o=e[t++],n=new Array(o);for(let r=0;r<o;++r,t+=i.Cartesian3.packedLength)n[r]=i.Cartesian3.unpack(e,t);const a=i.Ellipsoid.unpack(e,t,D);t+=i.Ellipsoid.packedLength;const l=e[t++],d=e[t++],u=e[t++],p=e[t++],f=e[t++],c=e[t];return s.defined(r)?(r._positions=n,r._ellipsoid=i.Ellipsoid.clone(a,r._ellipsoid),r._width=l,r._height=d,r._extrudedHeight=u,r._cornerType=p,r._granularity=f,r._offsetAttribute=-1===c?void 0:c,r):(x.positions=n,x.width=l,x.height=d,x.extrudedHeight=u,x.cornerType=p,x.granularity=f,x.offsetAttribute=-1===c?void 0:c,new L(x))},L.createGeometry=function(o){let l=o._positions;const c=o._width,h=o._ellipsoid;l=function(e,t){for(let i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(l,h);const y=e.arrayRemoveDuplicates(l,i.Cartesian3.equalsEpsilon);if(y.length<2||c<=0)return;const g=o._height,b=o._extrudedHeight,m=!p.CesiumMath.equalsEpsilon(g,b,0,p.CesiumMath.EPSILON2),A={ellipsoid:h,positions:y,width:c,cornerType:o._cornerType,granularity:o._granularity,saveAttributes:!1};let _;if(m)A.height=g,A.extrudedHeight=b,A.offsetAttribute=o._offsetAttribute,_=function(e){const t=e.ellipsoid,i=w(n.CorridorGeometryLibrary.computePositions(e),e.cornerType),o=i.wallIndices,l=e.height,p=e.extrudedHeight,c=i.attributes,h=i.indices;let y=c.position.values,g=y.length,b=new Float64Array(g);b.set(y);const m=new Float64Array(2*g);if(y=f.PolygonPipeline.scaleToGeodeticHeight(y,l,t),b=f.PolygonPipeline.scaleToGeodeticHeight(b,p,t),m.set(y),m.set(b,g),c.position.values=m,g/=3,s.defined(e.offsetAttribute)){let t=new Uint8Array(2*g);if(e.offsetAttribute===d.GeometryOffsetAttribute.TOP)t=t.fill(1,0,g);else{const i=e.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;t=t.fill(i)}c.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}let A;const _=h.length,E=u.IndexDatatype.createTypedArray(m.length/3,2*(_+o.length));E.set(h);let C,G,T=_;for(A=0;A<_;A+=2){const e=h[A],t=h[A+1];E[T++]=e+g,E[T++]=t+g}for(A=0;A<o.length;A++)C=o[A],G=C+g,E[T++]=C,E[T++]=G;return{attributes:c,indices:E}}(A);else{if(_=w(n.CorridorGeometryLibrary.computePositions(A),A.cornerType),_.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(_.attributes.position.values,g,h),s.defined(o._offsetAttribute)){const e=_.attributes.position.values.length,t=o._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(t);_.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}}const E=_.attributes,C=t.BoundingSphere.fromVertices(E.position.values,void 0,3);return new a.Geometry({attributes:E,indices:_.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:C,offsetAttribute:o._offsetAttribute})},function(e,t){return s.defined(t)&&(e=L.unpack(e,t)),e._ellipsoid=i.Ellipsoid.clone(e._ellipsoid),L.createGeometry(e)}}));
define(["./arrayRemoveDuplicates-398390b2","./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./PolylineVolumeGeometryLibrary-7de9a48a","./CorridorGeometryLibrary-e69b5c03","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-8efb7487","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-a9681249","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./PolylinePipeline-482bb0f7","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef"],(function(e,t,i,r,o,n,s,a,l,d,u,p,f,c,h,y,g,b,m,A,_,E,C,G){"use strict";const T=new i.Cartesian3,P=new i.Cartesian3,v=new i.Cartesian3;function w(e,t){const d=[],p=e.positions,f=e.corners,c=e.endPositions,h=new l.GeometryAttributes;let y,g,b,m=0,A=0,_=0;for(g=0;g<p.length;g+=2)b=p[g].length-3,m+=b,_+=b/3*4,A+=p[g+1].length-3;for(m+=3,A+=3,g=0;g<f.length;g++){y=f[g];const e=f[g].leftPositions;s.defined(e)?(b=e.length,m+=b,_+=b/3*2):(b=f[g].rightPositions.length,A+=b,_+=b/3*2)}const E=s.defined(c);let C;E&&(C=c[0].length-3,m+=C,A+=C,C/=3,_+=4*C);const G=m+A,w=new Float64Array(G);let L,D,x,k,V,N,O=0,H=G-1;const I=C/2,M=u.IndexDatatype.createTypedArray(G/3,_+4);let S=0;if(M[S++]=O/3,M[S++]=(H-2)/3,E){d.push(O/3),N=T,V=P;const e=c[0];for(g=0;g<I;g++)N=i.Cartesian3.fromArray(e,3*(I-1-g),N),V=i.Cartesian3.fromArray(e,3*(I+g),V),n.CorridorGeometryLibrary.addAttribute(w,V,O),n.CorridorGeometryLibrary.addAttribute(w,N,void 0,H),D=O/3,k=D+1,L=(H-2)/3,x=L-1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3}let B=0,R=p[B++],U=p[B++];for(w.set(R,O),w.set(U,H-U.length+1),b=U.length-3,d.push(O/3,(H-2)/3),g=0;g<b;g+=3)D=O/3,k=D+1,L=(H-2)/3,x=L-1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;for(g=0;g<f.length;g++){let e;y=f[g];const r=y.leftPositions,a=y.rightPositions;let l,u=v;if(s.defined(r)){for(H-=3,l=x,d.push(k),e=0;e<r.length/3;e++)u=i.Cartesian3.fromArray(r,3*e,u),M[S++]=l-e-1,M[S++]=l-e,n.CorridorGeometryLibrary.addAttribute(w,u,void 0,H),H-=3;d.push(l-Math.floor(r.length/6)),t===o.CornerType.BEVELED&&d.push((H-2)/3+1),O+=3}else{for(O+=3,l=k,d.push(x),e=0;e<a.length/3;e++)u=i.Cartesian3.fromArray(a,3*e,u),M[S++]=l+e,M[S++]=l+e+1,n.CorridorGeometryLibrary.addAttribute(w,u,O),O+=3;d.push(l+Math.floor(a.length/6)),t===o.CornerType.BEVELED&&d.push(O/3-1),H-=3}for(R=p[B++],U=p[B++],R.splice(0,3),U.splice(U.length-3,3),w.set(R,O),w.set(U,H-U.length+1),b=U.length-3,e=0;e<U.length;e+=3)k=O/3,D=k-1,x=(H-2)/3,L=x+1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;O-=3,H+=3,d.push(O/3,(H-2)/3)}if(E){O+=3,H-=3,N=T,V=P;const e=c[1];for(g=0;g<I;g++)N=i.Cartesian3.fromArray(e,3*(C-g-1),N),V=i.Cartesian3.fromArray(e,3*g,V),n.CorridorGeometryLibrary.addAttribute(w,N,void 0,H),n.CorridorGeometryLibrary.addAttribute(w,V,O),k=O/3,D=k-1,x=(H-2)/3,L=x+1,M[S++]=L,M[S++]=x,M[S++]=D,M[S++]=k,O+=3,H-=3;d.push(O/3)}else d.push(O/3,(H-2)/3);return M[S++]=O/3,M[S++]=(H-2)/3,h.position=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:w}),{attributes:h,indices:M,wallIndices:d}}function L(e){const t=(e=s.defaultValue(e,s.defaultValue.EMPTY_OBJECT)).positions,r=e.width,n=s.defaultValue(e.height,0),a=s.defaultValue(e.extrudedHeight,n);this._positions=t,this._ellipsoid=i.Ellipsoid.clone(s.defaultValue(e.ellipsoid,i.Ellipsoid.WGS84)),this._width=r,this._height=Math.max(n,a),this._extrudedHeight=Math.min(n,a),this._cornerType=s.defaultValue(e.cornerType,o.CornerType.ROUNDED),this._granularity=s.defaultValue(e.granularity,p.CesiumMath.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*i.Cartesian3.packedLength+i.Ellipsoid.packedLength+6}L.pack=function(e,t,r){r=s.defaultValue(r,0);const o=e._positions,n=o.length;t[r++]=n;for(let e=0;e<n;++e,r+=i.Cartesian3.packedLength)i.Cartesian3.pack(o[e],t,r);return i.Ellipsoid.pack(e._ellipsoid,t,r),r+=i.Ellipsoid.packedLength,t[r++]=e._width,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._cornerType,t[r++]=e._granularity,t[r]=s.defaultValue(e._offsetAttribute,-1),t};const D=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),x={positions:void 0,ellipsoid:D,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};return L.unpack=function(e,t,r){t=s.defaultValue(t,0);const o=e[t++],n=new Array(o);for(let r=0;r<o;++r,t+=i.Cartesian3.packedLength)n[r]=i.Cartesian3.unpack(e,t);const a=i.Ellipsoid.unpack(e,t,D);t+=i.Ellipsoid.packedLength;const l=e[t++],d=e[t++],u=e[t++],p=e[t++],f=e[t++],c=e[t];return s.defined(r)?(r._positions=n,r._ellipsoid=i.Ellipsoid.clone(a,r._ellipsoid),r._width=l,r._height=d,r._extrudedHeight=u,r._cornerType=p,r._granularity=f,r._offsetAttribute=-1===c?void 0:c,r):(x.positions=n,x.width=l,x.height=d,x.extrudedHeight=u,x.cornerType=p,x.granularity=f,x.offsetAttribute=-1===c?void 0:c,new L(x))},L.createGeometry=function(o){let l=o._positions;const c=o._width,h=o._ellipsoid;l=function(e,t){for(let i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(l,h);const y=e.arrayRemoveDuplicates(l,i.Cartesian3.equalsEpsilon);if(y.length<2||c<=0)return;const g=o._height,b=o._extrudedHeight,m=!p.CesiumMath.equalsEpsilon(g,b,0,p.CesiumMath.EPSILON2),A={ellipsoid:h,positions:y,width:c,cornerType:o._cornerType,granularity:o._granularity,saveAttributes:!1};let _;if(m)A.height=g,A.extrudedHeight=b,A.offsetAttribute=o._offsetAttribute,_=function(e){const t=e.ellipsoid,i=w(n.CorridorGeometryLibrary.computePositions(e),e.cornerType),o=i.wallIndices,l=e.height,p=e.extrudedHeight,c=i.attributes,h=i.indices;let y=c.position.values,g=y.length,b=new Float64Array(g);b.set(y);const m=new Float64Array(2*g);if(y=f.PolygonPipeline.scaleToGeodeticHeight(y,l,t),b=f.PolygonPipeline.scaleToGeodeticHeight(b,p,t),m.set(y),m.set(b,g),c.position.values=m,g/=3,s.defined(e.offsetAttribute)){let t=new Uint8Array(2*g);if(e.offsetAttribute===d.GeometryOffsetAttribute.TOP)t=t.fill(1,0,g);else{const i=e.offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1;t=t.fill(i)}c.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}let A;const _=h.length,E=u.IndexDatatype.createTypedArray(m.length/3,2*(_+o.length));E.set(h);let C,G,T=_;for(A=0;A<_;A+=2){const e=h[A],t=h[A+1];E[T++]=e+g,E[T++]=t+g}for(A=0;A<o.length;A++)C=o[A],G=C+g,E[T++]=C,E[T++]=G;return{attributes:c,indices:E}}(A);else{if(_=w(n.CorridorGeometryLibrary.computePositions(A),A.cornerType),_.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(_.attributes.position.values,g,h),s.defined(o._offsetAttribute)){const e=_.attributes.position.values.length,t=o._offsetAttribute===d.GeometryOffsetAttribute.NONE?0:1,i=new Uint8Array(e/3).fill(t);_.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}}const E=_.attributes,C=t.BoundingSphere.fromVertices(E.position.values,void 0,3);return new a.Geometry({attributes:E,indices:_.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:C,offsetAttribute:o._offsetAttribute})},function(e,t){return s.defined(t)&&(e=L.unpack(e,t)),e._ellipsoid=i.Ellipsoid.clone(e._ellipsoid),L.createGeometry(e)}}));
public/CIMSDK/Workers/createCylinderGeometry.js
@@ -1 +1 @@
define(["./CylinderGeometry-597b40fa","./defaultValue-865ac579","./Transforms-f3654378","./Matrix3-6e56fbc7","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./CylinderGeometryLibrary-f1481b60","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./VertexFormat-20b5279f"],(function(e,t,r,n,a,f,i,o,y,d,m,c,u,b,G,s){"use strict";return function(r,n){return t.defined(n)&&(r=e.CylinderGeometry.unpack(r,n)),e.CylinderGeometry.createGeometry(r)}}));
define(["./CylinderGeometry-80f4e5fa","./defaultValue-865ac579","./Transforms-221c7c82","./Matrix3-aeb3c326","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./CylinderGeometryLibrary-f1481b60","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./VertexFormat-20b5279f"],(function(e,t,r,a,n,i,o,c,f,d,y,m,u,b,G,s){"use strict";return function(r,a){return t.defined(a)&&(r=e.CylinderGeometry.unpack(r,a)),e.CylinderGeometry.createGeometry(r)}}));
public/CIMSDK/Workers/createCylinderOutlineGeometry.js
@@ -1 +1 @@
define(["./Transforms-f3654378","./Matrix2-23dd5853","./Matrix3-6e56fbc7","./ComponentDatatype-985dcc38","./CylinderGeometryLibrary-f1481b60","./defaultValue-865ac579","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0"],(function(t,e,i,n,o,r,a,s,u,f,c,d,l,m){"use strict";const b=new e.Cartesian2;function p(t){const e=(t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT)).length,i=t.topRadius,n=t.bottomRadius,o=r.defaultValue(t.slices,128),a=Math.max(r.defaultValue(t.numberOfVerticalLines,16),0);this._length=e,this._topRadius=i,this._bottomRadius=n,this._slices=o,this._numberOfVerticalLines=a,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}p.packedLength=6,p.pack=function(t,e,i){return i=r.defaultValue(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=r.defaultValue(t._offsetAttribute,-1),e};const y={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return p.unpack=function(t,e,i){e=r.defaultValue(e,0);const n=t[e++],o=t[e++],a=t[e++],s=t[e++],u=t[e++],f=t[e];return r.defined(i)?(i._length=n,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._numberOfVerticalLines=u,i._offsetAttribute=-1===f?void 0:f,i):(y.length=n,y.topRadius=o,y.bottomRadius=a,y.slices=s,y.numberOfVerticalLines=u,y.offsetAttribute=-1===f?void 0:f,new p(y))},p.createGeometry=function(c){let d=c._length;const l=c._topRadius,m=c._bottomRadius,p=c._slices,y=c._numberOfVerticalLines;if(d<=0||l<0||m<0||0===l&&0===m)return;const _=2*p,h=o.CylinderGeometryLibrary.computePositions(d,l,m,p,!1);let A,R=2*p;if(y>0){const t=Math.min(y,p);A=Math.round(p/t),R+=t}const G=f.IndexDatatype.createTypedArray(_,2*R);let O,V=0;for(O=0;O<p-1;O++)G[V++]=O,G[V++]=O+1,G[V++]=O+p,G[V++]=O+1+p;if(G[V++]=p-1,G[V++]=0,G[V++]=p+p-1,G[V++]=p,y>0)for(O=0;O<p;O+=A)G[V++]=O,G[V++]=O+p;const L=new s.GeometryAttributes;L.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:h}),b.x=.5*d,b.y=Math.max(m,l);const g=new t.BoundingSphere(i.Cartesian3.ZERO,e.Cartesian2.magnitude(b));if(r.defined(c._offsetAttribute)){d=h.length;const t=c._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,e=new Uint8Array(d/3).fill(t);L.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}return new a.Geometry({attributes:L,indices:G,primitiveType:a.PrimitiveType.LINES,boundingSphere:g,offsetAttribute:c._offsetAttribute})},function(t,e){return r.defined(e)&&(t=p.unpack(t,e)),p.createGeometry(t)}}));
define(["./Transforms-221c7c82","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./CylinderGeometryLibrary-f1481b60","./defaultValue-865ac579","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0"],(function(t,e,i,n,o,r,a,s,u,f,c,d,l,m){"use strict";const b=new e.Cartesian2;function p(t){const e=(t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT)).length,i=t.topRadius,n=t.bottomRadius,o=r.defaultValue(t.slices,128),a=Math.max(r.defaultValue(t.numberOfVerticalLines,16),0);this._length=e,this._topRadius=i,this._bottomRadius=n,this._slices=o,this._numberOfVerticalLines=a,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}p.packedLength=6,p.pack=function(t,e,i){return i=r.defaultValue(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=r.defaultValue(t._offsetAttribute,-1),e};const y={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};return p.unpack=function(t,e,i){e=r.defaultValue(e,0);const n=t[e++],o=t[e++],a=t[e++],s=t[e++],u=t[e++],f=t[e];return r.defined(i)?(i._length=n,i._topRadius=o,i._bottomRadius=a,i._slices=s,i._numberOfVerticalLines=u,i._offsetAttribute=-1===f?void 0:f,i):(y.length=n,y.topRadius=o,y.bottomRadius=a,y.slices=s,y.numberOfVerticalLines=u,y.offsetAttribute=-1===f?void 0:f,new p(y))},p.createGeometry=function(c){let d=c._length;const l=c._topRadius,m=c._bottomRadius,p=c._slices,y=c._numberOfVerticalLines;if(d<=0||l<0||m<0||0===l&&0===m)return;const _=2*p,h=o.CylinderGeometryLibrary.computePositions(d,l,m,p,!1);let A,R=2*p;if(y>0){const t=Math.min(y,p);A=Math.round(p/t),R+=t}const G=f.IndexDatatype.createTypedArray(_,2*R);let O,V=0;for(O=0;O<p-1;O++)G[V++]=O,G[V++]=O+1,G[V++]=O+p,G[V++]=O+1+p;if(G[V++]=p-1,G[V++]=0,G[V++]=p+p-1,G[V++]=p,y>0)for(O=0;O<p;O+=A)G[V++]=O,G[V++]=O+p;const L=new s.GeometryAttributes;L.position=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:h}),b.x=.5*d,b.y=Math.max(m,l);const g=new t.BoundingSphere(i.Cartesian3.ZERO,e.Cartesian2.magnitude(b));if(r.defined(c._offsetAttribute)){d=h.length;const t=c._offsetAttribute===u.GeometryOffsetAttribute.NONE?0:1,e=new Uint8Array(d/3).fill(t);L.applyOffset=new a.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}return new a.Geometry({attributes:L,indices:G,primitiveType:a.PrimitiveType.LINES,boundingSphere:g,offsetAttribute:c._offsetAttribute})},function(t,e){return r.defined(e)&&(t=p.unpack(t,e)),p.createGeometry(t)}}));
public/CIMSDK/Workers/createEllipseGeometry.js
@@ -1 +1 @@
define(["./Matrix3-6e56fbc7","./defaultValue-865ac579","./EllipseGeometry-7c4f7c10","./Math-76ce6367","./Transforms-f3654378","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipseGeometryLibrary-a73bd0b1","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryInstance-54a3e3b6","./GeometryOffsetAttribute-06264989","./GeometryPipeline-3f4d7db4","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f","./IndexDatatype-16f6b4a1","./IntersectionTests-63574cfd","./Plane-4befcca0","./VertexFormat-20b5279f"],(function(e,t,r,n,i,a,o,c,s,f,l,d,b,m,p,u,y,G,E,C,x,A){"use strict";return function(n,i){return t.defined(i)&&(n=r.EllipseGeometry.unpack(n,i)),n._center=e.Cartesian3.clone(n._center),n._ellipsoid=e.Ellipsoid.clone(n._ellipsoid),r.EllipseGeometry.createGeometry(n)}}));
define(["./Matrix3-aeb3c326","./defaultValue-865ac579","./EllipseGeometry-5054f965","./Math-76ce6367","./Transforms-221c7c82","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipseGeometryLibrary-18d0a44c","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryInstance-8d112c0c","./GeometryOffsetAttribute-06264989","./GeometryPipeline-a349886f","./AttributeCompression-10297289","./EncodedCartesian3-e8922703","./IndexDatatype-16f6b4a1","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./VertexFormat-20b5279f"],(function(e,t,r,a,n,i,o,c,s,l,d,f,m,b,p,u,y,G,E,C,x,A){"use strict";return function(a,n){return t.defined(n)&&(a=r.EllipseGeometry.unpack(a,n)),a._center=e.Cartesian3.clone(a._center),a._ellipsoid=e.Ellipsoid.clone(a._ellipsoid),r.EllipseGeometry.createGeometry(a)}}));
public/CIMSDK/Workers/createEllipseOutlineGeometry.js
@@ -1 +1 @@
define(["./Matrix3-6e56fbc7","./defaultValue-865ac579","./EllipseOutlineGeometry-389e4e67","./Math-76ce6367","./Transforms-f3654378","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipseGeometryLibrary-a73bd0b1","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,t,r,i,n,a,l,o,c,s,u,f,d,m,p){"use strict";return function(i,n){return t.defined(n)&&(i=r.EllipseOutlineGeometry.unpack(i,n)),i._center=e.Cartesian3.clone(i._center),i._ellipsoid=e.Ellipsoid.clone(i._ellipsoid),r.EllipseOutlineGeometry.createGeometry(i)}}));
define(["./Matrix3-aeb3c326","./defaultValue-865ac579","./EllipseOutlineGeometry-03a52f89","./Math-76ce6367","./Transforms-221c7c82","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipseGeometryLibrary-18d0a44c","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,t,r,i,n,a,c,l,o,s,d,u,f,m,p){"use strict";return function(i,n){return t.defined(n)&&(i=r.EllipseOutlineGeometry.unpack(i,n)),i._center=e.Cartesian3.clone(i._center),i._ellipsoid=e.Ellipsoid.clone(i._ellipsoid),r.EllipseOutlineGeometry.createGeometry(i)}}));
public/CIMSDK/Workers/createEllipsoidGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./EllipsoidGeometry-ce747f39","./Transforms-f3654378","./Matrix3-6e56fbc7","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./VertexFormat-20b5279f"],(function(e,t,r,o,a,i,n,f,c,d,m,u,s,y,b){"use strict";return function(r,o){return e.defined(o)&&(r=t.EllipsoidGeometry.unpack(r,o)),t.EllipsoidGeometry.createGeometry(r)}}));
define(["./defaultValue-865ac579","./EllipsoidGeometry-78610fac","./Transforms-221c7c82","./Matrix3-aeb3c326","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./VertexFormat-20b5279f"],(function(e,t,r,a,o,i,c,n,d,f,m,u,s,b,y){"use strict";return function(r,a){return e.defined(a)&&(r=t.EllipsoidGeometry.unpack(r,a)),t.EllipsoidGeometry.createGeometry(r)}}));
public/CIMSDK/Workers/createEllipsoidOutlineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./EllipsoidOutlineGeometry-badc7de6","./Transforms-f3654378","./Matrix3-6e56fbc7","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,t,r,i,n,a,o,f,u,d,c,l,m,s){"use strict";return function(r,i){return e.defined(r.buffer)&&(r=t.EllipsoidOutlineGeometry.unpack(r,i)),t.EllipsoidOutlineGeometry.createGeometry(r)}}));
define(["./defaultValue-865ac579","./EllipsoidOutlineGeometry-08bb8972","./Transforms-221c7c82","./Matrix3-aeb3c326","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,t,r,i,n,a,o,c,u,d,f,b,l,m){"use strict";return function(r,i){return e.defined(r.buffer)&&(r=t.EllipsoidOutlineGeometry.unpack(r,i)),t.EllipsoidOutlineGeometry.createGeometry(r)}}));
public/CIMSDK/Workers/createFrustumGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./FrustumGeometry-a3e4bc5e","./Transforms-f3654378","./Matrix3-6e56fbc7","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./Plane-4befcca0","./VertexFormat-20b5279f"],(function(e,t,r,a,n,u,c,o,m,f,i,s,b,d){"use strict";return function(r,a){return e.defined(a)&&(r=t.FrustumGeometry.unpack(r,a)),t.FrustumGeometry.createGeometry(r)}}));
define(["./defaultValue-865ac579","./FrustumGeometry-47bcac80","./Transforms-221c7c82","./Matrix3-aeb3c326","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./Plane-fbab0ca2","./VertexFormat-20b5279f"],(function(e,t,r,a,c,n,u,o,m,f,i,b,d,s){"use strict";return function(r,a){return e.defined(a)&&(r=t.FrustumGeometry.unpack(r,a)),t.FrustumGeometry.createGeometry(r)}}));
public/CIMSDK/Workers/createFrustumOutlineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Transforms-f3654378","./Matrix3-6e56fbc7","./ComponentDatatype-985dcc38","./FrustumGeometry-a3e4bc5e","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./Plane-4befcca0","./VertexFormat-20b5279f"],(function(e,t,r,n,a,u,i,o,c,s,p,m,f,h){"use strict";function d(n){const u=n.frustum,i=n.orientation,o=n.origin,c=e.defaultValue(n._drawNearPlane,!0);let s,p;u instanceof a.PerspectiveFrustum?(s=0,p=a.PerspectiveFrustum.packedLength):u instanceof a.OrthographicFrustum&&(s=1,p=a.OrthographicFrustum.packedLength),this._frustumType=s,this._frustum=u.clone(),this._origin=r.Cartesian3.clone(o),this._orientation=t.Quaternion.clone(i),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+r.Cartesian3.packedLength+t.Quaternion.packedLength}d.pack=function(n,u,i){i=e.defaultValue(i,0);const o=n._frustumType,c=n._frustum;return u[i++]=o,0===o?(a.PerspectiveFrustum.pack(c,u,i),i+=a.PerspectiveFrustum.packedLength):(a.OrthographicFrustum.pack(c,u,i),i+=a.OrthographicFrustum.packedLength),r.Cartesian3.pack(n._origin,u,i),i+=r.Cartesian3.packedLength,t.Quaternion.pack(n._orientation,u,i),u[i+=t.Quaternion.packedLength]=n._drawNearPlane?1:0,u};const g=new a.PerspectiveFrustum,l=new a.OrthographicFrustum,_=new t.Quaternion,k=new r.Cartesian3;return d.unpack=function(n,u,i){u=e.defaultValue(u,0);const o=n[u++];let c;0===o?(c=a.PerspectiveFrustum.unpack(n,u,g),u+=a.PerspectiveFrustum.packedLength):(c=a.OrthographicFrustum.unpack(n,u,l),u+=a.OrthographicFrustum.packedLength);const s=r.Cartesian3.unpack(n,u,k);u+=r.Cartesian3.packedLength;const p=t.Quaternion.unpack(n,u,_),m=1===n[u+=t.Quaternion.packedLength];if(!e.defined(i))return new d({frustum:c,origin:s,orientation:p,_drawNearPlane:m});const f=o===i._frustumType?i._frustum:void 0;return i._frustum=c.clone(f),i._frustumType=o,i._origin=r.Cartesian3.clone(s,i._origin),i._orientation=t.Quaternion.clone(p,i._orientation),i._drawNearPlane=m,i},d.createGeometry=function(e){const r=e._frustumType,o=e._frustum,c=e._origin,s=e._orientation,p=e._drawNearPlane,m=new Float64Array(24);a.FrustumGeometry._computeNearFarPlanes(c,s,r,o,m);const f=new i.GeometryAttributes({position:new u.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m})});let h,d;const g=p?2:1,l=new Uint16Array(8*(g+1));let _=p?0:1;for(;_<2;++_)h=p?8*_:0,d=4*_,l[h]=d,l[h+1]=d+1,l[h+2]=d+1,l[h+3]=d+2,l[h+4]=d+2,l[h+5]=d+3,l[h+6]=d+3,l[h+7]=d;for(_=0;_<2;++_)h=8*(g+_),d=4*_,l[h]=d,l[h+1]=d+4,l[h+2]=d+1,l[h+3]=d+5,l[h+4]=d+2,l[h+5]=d+6,l[h+6]=d+3,l[h+7]=d+7;return new u.Geometry({attributes:f,indices:l,primitiveType:u.PrimitiveType.LINES,boundingSphere:t.BoundingSphere.fromVertices(m)})},function(t,r){return e.defined(r)&&(t=d.unpack(t,r)),d.createGeometry(t)}}));
define(["./defaultValue-865ac579","./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./FrustumGeometry-47bcac80","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./Plane-fbab0ca2","./VertexFormat-20b5279f"],(function(e,t,r,n,a,u,i,o,c,s,p,m,d,f){"use strict";function h(n){const u=n.frustum,i=n.orientation,o=n.origin,c=e.defaultValue(n._drawNearPlane,!0);let s,p;u instanceof a.PerspectiveFrustum?(s=0,p=a.PerspectiveFrustum.packedLength):u instanceof a.OrthographicFrustum&&(s=1,p=a.OrthographicFrustum.packedLength),this._frustumType=s,this._frustum=u.clone(),this._origin=r.Cartesian3.clone(o),this._orientation=t.Quaternion.clone(i),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+r.Cartesian3.packedLength+t.Quaternion.packedLength}h.pack=function(n,u,i){i=e.defaultValue(i,0);const o=n._frustumType,c=n._frustum;return u[i++]=o,0===o?(a.PerspectiveFrustum.pack(c,u,i),i+=a.PerspectiveFrustum.packedLength):(a.OrthographicFrustum.pack(c,u,i),i+=a.OrthographicFrustum.packedLength),r.Cartesian3.pack(n._origin,u,i),i+=r.Cartesian3.packedLength,t.Quaternion.pack(n._orientation,u,i),u[i+=t.Quaternion.packedLength]=n._drawNearPlane?1:0,u};const g=new a.PerspectiveFrustum,l=new a.OrthographicFrustum,_=new t.Quaternion,k=new r.Cartesian3;return h.unpack=function(n,u,i){u=e.defaultValue(u,0);const o=n[u++];let c;0===o?(c=a.PerspectiveFrustum.unpack(n,u,g),u+=a.PerspectiveFrustum.packedLength):(c=a.OrthographicFrustum.unpack(n,u,l),u+=a.OrthographicFrustum.packedLength);const s=r.Cartesian3.unpack(n,u,k);u+=r.Cartesian3.packedLength;const p=t.Quaternion.unpack(n,u,_),m=1===n[u+=t.Quaternion.packedLength];if(!e.defined(i))return new h({frustum:c,origin:s,orientation:p,_drawNearPlane:m});const d=o===i._frustumType?i._frustum:void 0;return i._frustum=c.clone(d),i._frustumType=o,i._origin=r.Cartesian3.clone(s,i._origin),i._orientation=t.Quaternion.clone(p,i._orientation),i._drawNearPlane=m,i},h.createGeometry=function(e){const r=e._frustumType,o=e._frustum,c=e._origin,s=e._orientation,p=e._drawNearPlane,m=new Float64Array(24);a.FrustumGeometry._computeNearFarPlanes(c,s,r,o,m);const d=new i.GeometryAttributes({position:new u.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m})});let f,h;const g=p?2:1,l=new Uint16Array(8*(g+1));let _=p?0:1;for(;_<2;++_)f=p?8*_:0,h=4*_,l[f]=h,l[f+1]=h+1,l[f+2]=h+1,l[f+3]=h+2,l[f+4]=h+2,l[f+5]=h+3,l[f+6]=h+3,l[f+7]=h;for(_=0;_<2;++_)f=8*(g+_),h=4*_,l[f]=h,l[f+1]=h+4,l[f+2]=h+1,l[f+3]=h+5,l[f+4]=h+2,l[f+5]=h+6,l[f+6]=h+3,l[f+7]=h+7;return new u.Geometry({attributes:d,indices:l,primitiveType:u.PrimitiveType.LINES,boundingSphere:t.BoundingSphere.fromVertices(m)})},function(t,r){return e.defined(r)&&(t=h.unpack(t,r)),h.createGeometry(t)}}));
public/CIMSDK/Workers/createGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./PrimitivePipeline-d1154df9","./createTaskProcessorWorker","./Transforms-f3654378","./Matrix3-6e56fbc7","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryPipeline-3f4d7db4","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f","./IndexDatatype-16f6b4a1","./IntersectionTests-63574cfd","./Plane-4befcca0","./WebMercatorProjection-ab4c1f3a"],(function(e,t,r,n,o,i,s,a,c,f,u,d,m,b,l,p,y,P,k,C){"use strict";const G={};function W(t){let r=G[t];return e.defined(r)||("object"==typeof exports?G[r]=r=require(`Workers/${t}`):require([`Workers/${t}`],(function(e){r=e,G[r]=e}))),r}return r((function(r,n){const o=r.subTasks,i=o.length,s=new Array(i);for(let t=0;t<i;t++){const r=o[t],n=r.geometry,i=r.moduleName;if(e.defined(i)){const e=W(i);s[t]=e(n,r.offset)}else s[t]=n}return Promise.all(s).then((function(e){return t.PrimitivePipeline.packCreateGeometryResults(e,n)}))}))}));
define(["./defaultValue-865ac579","./PrimitivePipeline-07eae5eb","./createTaskProcessorWorker","./Transforms-221c7c82","./Matrix3-aeb3c326","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryPipeline-a349886f","./AttributeCompression-10297289","./EncodedCartesian3-e8922703","./IndexDatatype-16f6b4a1","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./WebMercatorProjection-bfe55882"],(function(e,t,r,n,o,i,a,s,c,f,u,b,d,m,l,p,y,P,k,C){"use strict";const G={};function W(t){let r=G[t];return e.defined(r)||("object"==typeof exports?G[r]=r=require(`Workers/${t}`):require([`Workers/${t}`],(function(e){r=e,G[r]=e}))),r}return r((function(r,n){const o=r.subTasks,i=o.length,a=new Array(i);for(let t=0;t<i;t++){const r=o[t],n=r.geometry,i=r.moduleName;if(e.defined(i)){const e=W(i);a[t]=e(n,r.offset)}else a[t]=n}return Promise.all(a).then((function(e){return t.PrimitivePipeline.packCreateGeometryResults(e,n)}))}))}));
public/CIMSDK/Workers/createGroundPolylineGeometry.js
@@ -1 +1 @@
define(["./Transforms-f3654378","./Matrix2-23dd5853","./Matrix3-6e56fbc7","./defaultValue-865ac579","./Math-76ce6367","./ArcType-68098157","./arrayRemoveDuplicates-398390b2","./ComponentDatatype-985dcc38","./EllipsoidGeodesic-3e762525","./EllipsoidRhumbLine-b175af48","./EncodedCartesian3-2008251f","./GeometryAttribute-e3f63a02","./IntersectionTests-63574cfd","./Plane-4befcca0","./WebMercatorProjection-ab4c1f3a","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0"],(function(e,t,a,n,i,r,s,o,l,c,u,C,d,h,p,f,g,m){"use strict";function w(i){i=n.defaultValue(i,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(i.ellipsoid,a.Ellipsoid.WGS84),this._rectangle=n.defaultValue(i.rectangle,t.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(i.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(i.numberOfLevelZeroTilesY,1),this._tileInfo=i.tileInfo}Object.defineProperties(w.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),w.prototype.getNumberOfXTilesAtLevel=function(e){if(!n.defined(this._tileInfo))return this._numberOfLevelZeroTilesX<<e;const t=this._tileInfo.lods.filter((function(t){return t.level===e}))[0].resolution;return Math.round(360/(this._tileInfo.rows*t))},w.prototype.getNumberOfYTilesAtLevel=function(e){if(!n.defined(this._tileInfo))return this._numberOfLevelZeroTilesY<<e;const t=this._tileInfo.lods.filter((function(t){return t.level===e}))[0].resolution;return Math.round(180/(this._tileInfo.cols*t))},w.prototype.rectangleToNativeRectangle=function(e,a){const r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(a)?(a.west=r,a.south=s,a.east=o,a.north=l,a):new t.Rectangle(r,s,o,l)},w.prototype.tileXYToNativeRectangle=function(e,t,a,n){const r=this.tileXYToRectangle(e,t,a,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},w.prototype.tileXYToRectangle=function(e,a,i,r){const s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),c=s.width/o,u=e*c+s.west,C=(e+1)*c+s.west,d=s.height/l,h=s.north-a*d,p=s.north-(a+1)*d;return n.defined(r)||(r=new t.Rectangle(u,p,C,h)),r.west=u,r.south=p,r.east=C,r.north=h,r},w.prototype.positionToTileXY=function(e,a,r){const s=this._rectangle;if(!t.Rectangle.contains(s,e))return;const o=this.getNumberOfXTilesAtLevel(a),l=this.getNumberOfYTilesAtLevel(a),c=s.width/o,u=s.height/l;let C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);let d=(C-s.west)/c|0;d>=o&&(d=o-1);let h=(s.north-e.latitude)/u|0;return h>=l&&(h=l-1),n.defined(r)?(r.x=d,r.y=h,r):new t.Cartesian2(d,h)};const y=new a.Cartesian3,M=new a.Cartesian3,T=new a.Cartographic,E=new a.Cartesian3,_=new a.Cartesian3,O=new e.BoundingSphere,b=new w,P=[new a.Cartographic,new a.Cartographic,new a.Cartographic,new a.Cartographic],A=new t.Cartesian2,k={};function I(e){a.Cartographic.fromRadians(e.east,e.north,0,P[0]),a.Cartographic.fromRadians(e.west,e.north,0,P[1]),a.Cartographic.fromRadians(e.east,e.south,0,P[2]),a.Cartographic.fromRadians(e.west,e.south,0,P[3]);let t=0,n=0,i=0,r=0;const s=k._terrainHeightsMaxLevel;let o;for(o=0;o<=s;++o){let e=!1;for(let t=0;t<4;++t){const a=P[t];if(b.positionToTileXY(a,o,A),0===t)i=A.x,r=A.y;else if(i!==A.x||r!==A.y){e=!0;break}}if(e)break;t=i,n=r}if(0!==o)return{x:t,y:n,level:o>s?s:o-1}}k.initialize=function(){let t=k._initPromise;return n.defined(t)||(t=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){k._terrainHeights=e})),k._initPromise=t),t},k.getMinimumMaximumHeights=function(e,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=I(e);let s=k._defaultMinTerrainHeight,o=k._defaultMaxTerrainHeight;if(n.defined(r)){const l=`${r.level}-${r.x}-${r.y}`,c=k._terrainHeights[l];n.defined(c)&&(s=c[0],o=c[1]),i.cartographicToCartesian(t.Rectangle.northeast(e,T),y),i.cartographicToCartesian(t.Rectangle.southwest(e,T),M),a.Cartesian3.midpoint(M,y,E);const u=i.scaleToGeodeticSurface(E,_);if(n.defined(u)){const e=a.Cartesian3.distance(E,u);s=Math.min(s,-e)}else s=k._defaultMinTerrainHeight}return s=Math.max(k._defaultMinTerrainHeight,s),{minimumTerrainHeight:s,maximumTerrainHeight:o}},k.getBoundingSphere=function(t,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=I(t);let s=k._defaultMaxTerrainHeight;if(n.defined(r)){const e=`${r.level}-${r.x}-${r.y}`,t=k._terrainHeights[e];n.defined(t)&&(s=t[1])}const o=e.BoundingSphere.fromRectangle3D(t,i,0);return e.BoundingSphere.fromRectangle3D(t,i,s,O),e.BoundingSphere.union(o,O,o)},k._terrainHeightsMaxLevel=6,k._defaultMaxTerrainHeight=9e3,k._defaultMinTerrainHeight=-1e5,k._terrainHeights=void 0,k._initPromise=void 0,Object.defineProperties(k,{initialized:{get:function(){return n.defined(k._terrainHeights)}}});var L=k;const S=[e.GeographicProjection,p.WebMercatorProjection],x=S.length,N=Math.cos(i.CesiumMath.toRadians(30)),R=Math.cos(i.CesiumMath.toRadians(150));function D(e){const t=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=t,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=a.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(D.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+a.Ellipsoid.packedLength+1+1}}}),D.setProjectionAndEllipsoid=function(e,t){let a=0;for(let e=0;e<x;e++)if(t instanceof S[e]){a=e;break}e._projectionIndex=a,e._ellipsoid=t.ellipsoid};const v=new a.Cartesian3,z=new a.Cartesian3,H=new a.Cartesian3;function B(e,t,n,i,r){const s=X(i,e,0,v),o=X(i,e,n,z),l=X(i,t,0,H),c=W(o,s,z),u=W(l,s,H);return a.Cartesian3.cross(u,c,r),a.Cartesian3.normalize(r,r)}const V=new a.Cartographic,j=new a.Cartesian3,G=new a.Cartesian3,Y=new a.Cartesian3;function F(e,t,n,i,s,o,u,C,d,h,p){if(0===s)return;let f;o===r.ArcType.GEODESIC?f=new l.EllipsoidGeodesic(e,t,u):o===r.ArcType.RHUMB&&(f=new c.EllipsoidRhumbLine(e,t,u));const g=f.surfaceDistance;if(g<s)return;const m=B(e,t,i,u,Y),w=Math.ceil(g/s),y=g/w;let M=y;const T=w-1;let E=C.length;for(let e=0;e<T;e++){const e=f.interpolateUsingSurfaceDistance(M,V),t=X(u,e,n,j),r=X(u,e,i,G);a.Cartesian3.pack(m,C,E),a.Cartesian3.pack(t,d,E),a.Cartesian3.pack(r,h,E),p.push(e.latitude),p.push(e.longitude),E+=3,M+=y}}const q=new a.Cartographic;function X(e,t,n,i){return a.Cartographic.clone(t,q),q.height=n,a.Cartographic.toCartesian(q,e,i)}function W(e,t,n){return a.Cartesian3.subtract(e,t,n),a.Cartesian3.normalize(n,n),n}function U(e,t,n,i){return i=W(e,t,i),i=a.Cartesian3.cross(i,n,i),i=a.Cartesian3.normalize(i,i),i=a.Cartesian3.cross(n,i,i)}D.pack=function(e,t,i){let r=n.defaultValue(i,0);const s=e._positions,o=s.length;t[r++]=o;for(let e=0;e<o;++e){const n=s[e];a.Cartesian3.pack(n,t,r),r+=3}return t[r++]=e.granularity,t[r++]=e.loop?1:0,t[r++]=e.arcType,a.Ellipsoid.pack(e._ellipsoid,t,r),r+=a.Ellipsoid.packedLength,t[r++]=e._projectionIndex,t[r++]=e._scene3DOnly?1:0,t},D.unpack=function(e,t,i){let r=n.defaultValue(t,0);const s=e[r++],o=new Array(s);for(let t=0;t<s;t++)o[t]=a.Cartesian3.unpack(e,r),r+=3;const l=e[r++],c=1===e[r++],u=e[r++],C=a.Ellipsoid.unpack(e,r);r+=a.Ellipsoid.packedLength;const d=e[r++],h=1===e[r++];return n.defined(i)||(i=new D({positions:o})),i._positions=o,i.granularity=l,i.loop=c,i.arcType=u,i._ellipsoid=C,i._projectionIndex=d,i._scene3DOnly=h,i};const Z=new a.Cartesian3,$=new a.Cartesian3,J=new a.Cartesian3,Q=new a.Cartesian3;function K(e,t,n,r,s){const o=W(n,t,Q),l=U(e,t,o,Z),c=U(r,t,o,$);if(i.CesiumMath.equalsEpsilon(a.Cartesian3.dot(l,c),-1,i.CesiumMath.EPSILON5))return s=a.Cartesian3.cross(o,l,s),s=a.Cartesian3.normalize(s,s);s=a.Cartesian3.add(c,l,s),s=a.Cartesian3.normalize(s,s);const u=a.Cartesian3.cross(o,s,J);return a.Cartesian3.dot(c,u)<0&&(s=a.Cartesian3.negate(s,s)),s}const ee=h.Plane.fromPointNormal(a.Cartesian3.ZERO,a.Cartesian3.UNIT_Y),te=new a.Cartesian3,ae=new a.Cartesian3,ne=new a.Cartesian3,ie=new a.Cartesian3,re=new a.Cartesian3,se=new a.Cartesian3,oe=new a.Cartographic,le=new a.Cartographic,ce=new a.Cartographic;D.createGeometry=function(l){const h=!l._scene3DOnly;let p=l.loop;const f=l._ellipsoid,g=l.granularity,m=l.arcType,w=new S[l._projectionIndex](f),y=1e3;let M,T;const E=l._positions,_=E.length;let O,b,P,A;2===_&&(p=!1);const k=new c.EllipsoidRhumbLine(void 0,void 0,f);let I,x,R;const D=[E[0]];for(T=0;T<_-1;T++)O=E[T],b=E[T+1],I=d.IntersectionTests.lineSegmentPlane(O,b,ee,se),!n.defined(I)||a.Cartesian3.equalsEpsilon(I,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(I,b,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(I)):l.arcType===r.ArcType.RHUMB&&(R=f.cartesianToCartographic(I,oe).longitude,P=f.cartesianToCartographic(O,oe),A=f.cartesianToCartographic(b,le),k.setEndPoints(P,A),x=k.findIntersectionWithLongitude(R,ce),I=f.cartographicToCartesian(x,se),!n.defined(I)||a.Cartesian3.equalsEpsilon(I,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(I,b,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(I)))),D.push(b);p&&(O=E[_-1],b=E[0],I=d.IntersectionTests.lineSegmentPlane(O,b,ee,se),!n.defined(I)||a.Cartesian3.equalsEpsilon(I,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(I,b,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(I)):l.arcType===r.ArcType.RHUMB&&(R=f.cartesianToCartographic(I,oe).longitude,P=f.cartesianToCartographic(O,oe),A=f.cartesianToCartographic(b,le),k.setEndPoints(P,A),x=k.findIntersectionWithLongitude(R,ce),I=f.cartographicToCartesian(x,se),!n.defined(I)||a.Cartesian3.equalsEpsilon(I,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(I,b,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(I)))));let v=D.length,z=new Array(v);for(T=0;T<v;T++){const e=a.Cartographic.fromCartesian(D[T],f);e.height=0,z[T]=e}if(z=s.arrayRemoveDuplicates(z,a.Cartographic.equalsEpsilon),v=z.length,v<2)return;const H=[],V=[],j=[],G=[];let Y=te,q=ae,U=ne,Z=ie,$=re;const J=z[0],Q=z[1];for(Y=X(f,z[v-1],0,Y),Z=X(f,Q,0,Z),q=X(f,J,0,q),U=X(f,J,y,U),$=p?K(Y,q,U,Z,$):B(J,Q,y,f,$),a.Cartesian3.pack($,V,0),a.Cartesian3.pack(q,j,0),a.Cartesian3.pack(U,G,0),H.push(J.latitude),H.push(J.longitude),F(J,Q,0,y,g,m,f,V,j,G,H),T=1;T<v-1;++T){Y=a.Cartesian3.clone(q,Y),q=a.Cartesian3.clone(Z,q);const e=z[T];X(f,e,y,U),X(f,z[T+1],0,Z),K(Y,q,U,Z,$),M=V.length,a.Cartesian3.pack($,V,M),a.Cartesian3.pack(q,j,M),a.Cartesian3.pack(U,G,M),H.push(e.latitude),H.push(e.longitude),F(z[T],z[T+1],0,y,g,m,f,V,j,G,H)}const ue=z[v-1],Ce=z[v-2];if(q=X(f,ue,0,q),U=X(f,ue,y,U),p){const e=z[0];Y=X(f,Ce,0,Y),Z=X(f,e,0,Z),$=K(Y,q,U,Z,$)}else $=B(Ce,ue,y,f,$);if(M=V.length,a.Cartesian3.pack($,V,M),a.Cartesian3.pack(q,j,M),a.Cartesian3.pack(U,G,M),H.push(ue.latitude),H.push(ue.longitude),p){for(F(ue,J,0,y,g,m,f,V,j,G,H),M=V.length,T=0;T<3;++T)V[M+T]=V[T],j[M+T]=j[T],G[M+T]=G[T];H.push(J.latitude),H.push(J.longitude)}return function(n,r,s,l,c,d,h){let p,f;const g=r._ellipsoid,m=s.length/3-1,w=8*m,y=4*w,M=36*m,T=w>65535?new Uint32Array(M):new Uint16Array(M),E=new Float64Array(3*w),_=new Float32Array(y),O=new Float32Array(y),b=new Float32Array(y),P=new Float32Array(y),A=new Float32Array(y);let k,I,S,x;h&&(k=new Float32Array(y),I=new Float32Array(y),S=new Float32Array(y),x=new Float32Array(2*w));const R=d.length/2;let D=0;const v=Oe;v.height=0;const z=be;z.height=0;let H=Pe,B=Ae;if(h)for(f=0,p=1;p<R;p++)v.latitude=d[f],v.longitude=d[f+1],z.latitude=d[f+2],z.longitude=d[f+3],H=r.project(v,H),B=r.project(z,B),D+=a.Cartesian3.distance(H,B),f+=2;const V=l.length/3;B=a.Cartesian3.unpack(l,0,B);let j,G=0;for(f=3,p=1;p<V;p++)H=a.Cartesian3.clone(B,H),B=a.Cartesian3.unpack(l,f,B),G+=a.Cartesian3.distance(H,B),f+=3;f=3;let Y=0,F=0,q=0,X=0,U=!1,Z=a.Cartesian3.unpack(s,0,Ie),$=a.Cartesian3.unpack(l,0,Ae),J=a.Cartesian3.unpack(c,0,Se);if(n){he(J,a.Cartesian3.unpack(s,s.length-6,ke),Z,$)&&(J=a.Cartesian3.negate(J,J))}let Q=0,K=0,ee=0;for(p=0;p<m;p++){const e=a.Cartesian3.clone(Z,ke),n=a.Cartesian3.clone($,Pe);let o,C,p,m,w=a.Cartesian3.clone(J,Le);if(U&&(w=a.Cartesian3.negate(w,w)),Z=a.Cartesian3.unpack(s,f,Ie),$=a.Cartesian3.unpack(l,f,Ae),J=a.Cartesian3.unpack(c,f,Se),U=he(J,e,Z,$),v.latitude=d[Y],v.longitude=d[Y+1],z.latitude=d[Y+2],z.longitude=d[Y+3],h){const e=_e(v,z);o=r.project(v,He),C=r.project(z,Be);const t=W(C,o,$e);t.y=Math.abs(t.y),p=Ve,m=je,0===e||a.Cartesian3.dot(t,a.Cartesian3.UNIT_Y)>N?(p=me(r,v,w,o,Ve),m=me(r,z,J,C,je)):1===e?(m=me(r,z,J,C,je),p.x=0,p.y=i.CesiumMath.sign(v.longitude-Math.abs(z.longitude)),p.z=0):(p=me(r,v,w,o,Ve),m.x=0,m.y=i.CesiumMath.sign(v.longitude-z.longitude),m.z=0)}const y=a.Cartesian3.distance(n,$),M=u.EncodedCartesian3.fromCartesian(e,Ue),T=a.Cartesian3.subtract(Z,e,Ge),R=a.Cartesian3.normalize(T,qe);let H=a.Cartesian3.subtract(n,e,Ye);H=a.Cartesian3.normalize(H,H);let B=a.Cartesian3.cross(R,H,qe);B=a.Cartesian3.normalize(B,B);let V=a.Cartesian3.cross(H,w,Xe);V=a.Cartesian3.normalize(V,V);let te=a.Cartesian3.subtract($,Z,Fe);te=a.Cartesian3.normalize(te,te);let ae=a.Cartesian3.cross(J,te,We);ae=a.Cartesian3.normalize(ae,ae);const ne=y/G,ie=Q/G;let re,se,oe,le=0,ce=0,ue=0;if(h){le=a.Cartesian3.distance(o,C),re=u.EncodedCartesian3.fromCartesian(o,Ze),se=a.Cartesian3.subtract(C,o,$e),oe=a.Cartesian3.normalize(se,Je);const e=oe.x;oe.x=oe.y,oe.y=-e,ce=le/D,ue=K/D}for(j=0;j<8;j++){const e=X+4*j,t=F+2*j,n=e+3,i=j<4?1:-1,r=2===j||3===j||6===j||7===j?1:-1;a.Cartesian3.pack(M.high,_,e),_[n]=T.x,a.Cartesian3.pack(M.low,O,e),O[n]=T.y,a.Cartesian3.pack(V,b,e),b[n]=T.z,a.Cartesian3.pack(ae,P,e),P[n]=ne*i,a.Cartesian3.pack(B,A,e);let s=ie*r;0===s&&r<0&&(s=9),A[n]=s,h&&(k[e]=re.high.x,k[e+1]=re.high.y,k[e+2]=re.low.x,k[e+3]=re.low.y,S[e]=-p.y,S[e+1]=p.x,S[e+2]=m.y,S[e+3]=-m.x,I[e]=se.x,I[e+1]=se.y,I[e+2]=oe.x,I[e+3]=oe.y,x[t]=ce*i,s=ue*r,0===s&&r<0&&(s=9),x[t+1]=s)}const Ce=ve,de=ze,pe=Re,fe=De,ge=t.Rectangle.fromCartographicArray(xe,Ne),we=L.getMinimumMaximumHeights(ge,g),ye=we.minimumTerrainHeight,Te=we.maximumTerrainHeight;ee+=ye,ee+=Te,Me(e,n,ye,Te,Ce,pe),Me(Z,$,ye,Te,de,fe);let Oe=a.Cartesian3.multiplyByScalar(B,i.CesiumMath.EPSILON5,Qe);a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(pe,Oe,pe),a.Cartesian3.add(fe,Oe,fe),Ee(Ce,de),Ee(pe,fe),a.Cartesian3.pack(Ce,E,q),a.Cartesian3.pack(de,E,q+3),a.Cartesian3.pack(fe,E,q+6),a.Cartesian3.pack(pe,E,q+9),Oe=a.Cartesian3.multiplyByScalar(B,-2*i.CesiumMath.EPSILON5,Qe),a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(pe,Oe,pe),a.Cartesian3.add(fe,Oe,fe),Ee(Ce,de),Ee(pe,fe),a.Cartesian3.pack(Ce,E,q+12),a.Cartesian3.pack(de,E,q+15),a.Cartesian3.pack(fe,E,q+18),a.Cartesian3.pack(pe,E,q+21),Y+=2,f+=3,F+=16,q+=24,X+=32,Q+=y,K+=le}f=0;let te=0;for(p=0;p<m;p++){for(j=0;j<tt;j++)T[f+j]=et[j]+te;te+=8,f+=tt}const ae=Ke;e.BoundingSphere.fromVertices(s,a.Cartesian3.ZERO,3,ae[0]),e.BoundingSphere.fromVertices(l,a.Cartesian3.ZERO,3,ae[1]);const ne=e.BoundingSphere.fromBoundingSpheres(ae);ne.radius+=ee/(2*m);const ie={position:new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:E}),startHiAndForwardOffsetX:at(_),startLoAndForwardOffsetY:at(O),startNormalAndForwardOffsetZ:at(b),endNormalAndTextureCoordinateNormalizationX:at(P),rightNormalAndTextureCoordinateNormalizationY:at(A)};h&&(ie.startHiLo2D=at(k),ie.offsetAndRight2D=at(I),ie.startEndNormals2D=at(S),ie.texcoordNormalization2D=new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:x}));return new C.Geometry({attributes:ie,indices:T,boundingSphere:ne})}(p,w,j,G,V,H,h)};const ue=new a.Cartesian3,Ce=new a.Matrix3,de=new e.Quaternion;function he(t,n,r,s){const o=W(r,n,ue),l=a.Cartesian3.dot(o,t);if(l>N||l<R){const n=W(s,r,Q),o=l<R?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,c=e.Quaternion.fromAxisAngle(n,o,de),u=a.Matrix3.fromQuaternion(c,Ce);return a.Matrix3.multiplyByVector(u,t,t),!0}return!1}const pe=new a.Cartographic,fe=new a.Cartesian3,ge=new a.Cartesian3;function me(e,t,n,r,s){const o=a.Cartographic.toCartesian(t,e._ellipsoid,fe);let l=a.Cartesian3.add(o,n,ge),c=!1;const u=e._ellipsoid;let C=u.cartesianToCartographic(l,pe);Math.abs(t.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(c=!0,l=a.Cartesian3.subtract(o,n,ge),C=u.cartesianToCartographic(l,pe)),C.height=0;const d=e.project(C,s);return(s=a.Cartesian3.subtract(d,r,s)).z=0,s=a.Cartesian3.normalize(s,s),c&&a.Cartesian3.negate(s,s),s}const we=new a.Cartesian3,ye=new a.Cartesian3;function Me(e,t,n,i,r,s){const o=a.Cartesian3.subtract(t,e,we);a.Cartesian3.normalize(o,o);const l=n-0;let c=a.Cartesian3.multiplyByScalar(o,l,ye);a.Cartesian3.add(e,c,r);const u=i-1e3;c=a.Cartesian3.multiplyByScalar(o,u,ye),a.Cartesian3.add(t,c,s)}const Te=new a.Cartesian3;function Ee(e,t){const n=h.Plane.getPointDistance(ee,e),r=h.Plane.getPointDistance(ee,t);let s=Te;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=W(t,e,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=W(e,t,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(t,s,t))}function _e(e,t){const a=Math.abs(e.longitude),n=Math.abs(t.longitude);if(i.CesiumMath.equalsEpsilon(a,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const n=i.CesiumMath.sign(t.longitude);return e.longitude=n*(a-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const a=i.CesiumMath.sign(e.longitude);return t.longitude=a*(n-i.CesiumMath.EPSILON11),2}return 0}const Oe=new a.Cartographic,be=new a.Cartographic,Pe=new a.Cartesian3,Ae=new a.Cartesian3,ke=new a.Cartesian3,Ie=new a.Cartesian3,Le=new a.Cartesian3,Se=new a.Cartesian3,xe=[Oe,be],Ne=new t.Rectangle,Re=new a.Cartesian3,De=new a.Cartesian3,ve=new a.Cartesian3,ze=new a.Cartesian3,He=new a.Cartesian3,Be=new a.Cartesian3,Ve=new a.Cartesian3,je=new a.Cartesian3,Ge=new a.Cartesian3,Ye=new a.Cartesian3,Fe=new a.Cartesian3,qe=new a.Cartesian3,Xe=new a.Cartesian3,We=new a.Cartesian3,Ue=new u.EncodedCartesian3,Ze=new u.EncodedCartesian3,$e=new a.Cartesian3,Je=new a.Cartesian3,Qe=new a.Cartesian3,Ke=[new e.BoundingSphere,new e.BoundingSphere],et=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],tt=et.length;function at(e){return new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return D._projectNormal=me,function(e,t){return L.initialize().then((function(){return n.defined(t)&&(e=D.unpack(e,t)),D.createGeometry(e)}))}}));
define(["./Transforms-221c7c82","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./defaultValue-865ac579","./Math-76ce6367","./ArcType-68098157","./arrayRemoveDuplicates-398390b2","./ComponentDatatype-985dcc38","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef","./EncodedCartesian3-e8922703","./GeometryAttribute-642addba","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./WebMercatorProjection-bfe55882","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0"],(function(e,t,a,n,i,r,s,o,l,c,u,C,d,h,p,f,g,m){"use strict";function w(i){i=n.defaultValue(i,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(i.ellipsoid,a.Ellipsoid.WGS84),this._rectangle=n.defaultValue(i.rectangle,t.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(i.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(i.numberOfLevelZeroTilesY,1),this._tileInfo=i.tileInfo}Object.defineProperties(w.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),w.prototype.getNumberOfXTilesAtLevel=function(e){if(!n.defined(this._tileInfo))return this._numberOfLevelZeroTilesX<<e;const t=this._tileInfo.lods.filter((function(t){return t.level===e}))[0].resolution;return Math.round(360/(this._tileInfo.rows*t))},w.prototype.getNumberOfYTilesAtLevel=function(e){if(!n.defined(this._tileInfo))return this._numberOfLevelZeroTilesY<<e;const t=this._tileInfo.lods.filter((function(t){return t.level===e}))[0].resolution;return Math.round(180/(this._tileInfo.cols*t))},w.prototype.rectangleToNativeRectangle=function(e,a){const r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(a)?(a.west=r,a.south=s,a.east=o,a.north=l,a):new t.Rectangle(r,s,o,l)},w.prototype.tileXYToNativeRectangle=function(e,t,a,n){const r=this.tileXYToRectangle(e,t,a,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},w.prototype.tileXYToRectangle=function(e,a,i,r){const s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),c=s.width/o,u=e*c+s.west,C=(e+1)*c+s.west,d=s.height/l,h=s.north-a*d,p=s.north-(a+1)*d;return n.defined(r)||(r=new t.Rectangle(u,p,C,h)),r.west=u,r.south=p,r.east=C,r.north=h,r},w.prototype.positionToTileXY=function(e,a,r){const s=this._rectangle;if(!t.Rectangle.contains(s,e))return;const o=this.getNumberOfXTilesAtLevel(a),l=this.getNumberOfYTilesAtLevel(a),c=s.width/o,u=s.height/l;let C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);let d=(C-s.west)/c|0;d>=o&&(d=o-1);let h=(s.north-e.latitude)/u|0;return h>=l&&(h=l-1),n.defined(r)?(r.x=d,r.y=h,r):new t.Cartesian2(d,h)};const y=new a.Cartesian3,M=new a.Cartesian3,T=new a.Cartographic,E=new a.Cartesian3,_=new a.Cartesian3,O=new e.BoundingSphere,b=new w,P=[new a.Cartographic,new a.Cartographic,new a.Cartographic,new a.Cartographic],A=new t.Cartesian2,k={};function I(e){a.Cartographic.fromRadians(e.east,e.north,0,P[0]),a.Cartographic.fromRadians(e.west,e.north,0,P[1]),a.Cartographic.fromRadians(e.east,e.south,0,P[2]),a.Cartographic.fromRadians(e.west,e.south,0,P[3]);let t=0,n=0,i=0,r=0;const s=k._terrainHeightsMaxLevel;let o;for(o=0;o<=s;++o){let e=!1;for(let t=0;t<4;++t){const a=P[t];if(b.positionToTileXY(a,o,A),0===t)i=A.x,r=A.y;else if(i!==A.x||r!==A.y){e=!0;break}}if(e)break;t=i,n=r}if(0!==o)return{x:t,y:n,level:o>s?s:o-1}}k.initialize=function(){let t=k._initPromise;return n.defined(t)||(t=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){k._terrainHeights=e})),k._initPromise=t),t},k.getMinimumMaximumHeights=function(e,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=I(e);let s=k._defaultMinTerrainHeight,o=k._defaultMaxTerrainHeight;if(n.defined(r)){const l=`${r.level}-${r.x}-${r.y}`,c=k._terrainHeights[l];n.defined(c)&&(s=c[0],o=c[1]),i.cartographicToCartesian(t.Rectangle.northeast(e,T),y),i.cartographicToCartesian(t.Rectangle.southwest(e,T),M),a.Cartesian3.midpoint(M,y,E);const u=i.scaleToGeodeticSurface(E,_);if(n.defined(u)){const e=a.Cartesian3.distance(E,u);s=Math.min(s,-e)}else s=k._defaultMinTerrainHeight}return s=Math.max(k._defaultMinTerrainHeight,s),{minimumTerrainHeight:s,maximumTerrainHeight:o}},k.getBoundingSphere=function(t,i){i=n.defaultValue(i,a.Ellipsoid.WGS84);const r=I(t);let s=k._defaultMaxTerrainHeight;if(n.defined(r)){const e=`${r.level}-${r.x}-${r.y}`,t=k._terrainHeights[e];n.defined(t)&&(s=t[1])}const o=e.BoundingSphere.fromRectangle3D(t,i,0);return e.BoundingSphere.fromRectangle3D(t,i,s,O),e.BoundingSphere.union(o,O,o)},k._terrainHeightsMaxLevel=6,k._defaultMaxTerrainHeight=9e3,k._defaultMinTerrainHeight=-1e5,k._terrainHeights=void 0,k._initPromise=void 0,Object.defineProperties(k,{initialized:{get:function(){return n.defined(k._terrainHeights)}}});var L=k;const S=[e.GeographicProjection,p.WebMercatorProjection],x=S.length,N=Math.cos(i.CesiumMath.toRadians(30)),R=Math.cos(i.CesiumMath.toRadians(150));function D(e){const t=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=t,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=a.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(D.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+a.Ellipsoid.packedLength+1+1}}}),D.setProjectionAndEllipsoid=function(e,t){let a=0;for(let e=0;e<x;e++)if(t instanceof S[e]){a=e;break}e._projectionIndex=a,e._ellipsoid=t.ellipsoid};const v=new a.Cartesian3,z=new a.Cartesian3,H=new a.Cartesian3;function B(e,t,n,i,r){const s=X(i,e,0,v),o=X(i,e,n,z),l=X(i,t,0,H),c=W(o,s,z),u=W(l,s,H);return a.Cartesian3.cross(u,c,r),a.Cartesian3.normalize(r,r)}const V=new a.Cartographic,j=new a.Cartesian3,G=new a.Cartesian3,Y=new a.Cartesian3;function F(e,t,n,i,s,o,u,C,d,h,p){if(0===s)return;let f;o===r.ArcType.GEODESIC?f=new l.EllipsoidGeodesic(e,t,u):o===r.ArcType.RHUMB&&(f=new c.EllipsoidRhumbLine(e,t,u));const g=f.surfaceDistance;if(g<s)return;const m=B(e,t,i,u,Y),w=Math.ceil(g/s),y=g/w;let M=y;const T=w-1;let E=C.length;for(let e=0;e<T;e++){const e=f.interpolateUsingSurfaceDistance(M,V),t=X(u,e,n,j),r=X(u,e,i,G);a.Cartesian3.pack(m,C,E),a.Cartesian3.pack(t,d,E),a.Cartesian3.pack(r,h,E),p.push(e.latitude),p.push(e.longitude),E+=3,M+=y}}const q=new a.Cartographic;function X(e,t,n,i){return a.Cartographic.clone(t,q),q.height=n,a.Cartographic.toCartesian(q,e,i)}function W(e,t,n){return a.Cartesian3.subtract(e,t,n),a.Cartesian3.normalize(n,n),n}function U(e,t,n,i){return i=W(e,t,i),i=a.Cartesian3.cross(i,n,i),i=a.Cartesian3.normalize(i,i),i=a.Cartesian3.cross(n,i,i)}D.pack=function(e,t,i){let r=n.defaultValue(i,0);const s=e._positions,o=s.length;t[r++]=o;for(let e=0;e<o;++e){const n=s[e];a.Cartesian3.pack(n,t,r),r+=3}return t[r++]=e.granularity,t[r++]=e.loop?1:0,t[r++]=e.arcType,a.Ellipsoid.pack(e._ellipsoid,t,r),r+=a.Ellipsoid.packedLength,t[r++]=e._projectionIndex,t[r++]=e._scene3DOnly?1:0,t},D.unpack=function(e,t,i){let r=n.defaultValue(t,0);const s=e[r++],o=new Array(s);for(let t=0;t<s;t++)o[t]=a.Cartesian3.unpack(e,r),r+=3;const l=e[r++],c=1===e[r++],u=e[r++],C=a.Ellipsoid.unpack(e,r);r+=a.Ellipsoid.packedLength;const d=e[r++],h=1===e[r++];return n.defined(i)||(i=new D({positions:o})),i._positions=o,i.granularity=l,i.loop=c,i.arcType=u,i._ellipsoid=C,i._projectionIndex=d,i._scene3DOnly=h,i};const Z=new a.Cartesian3,$=new a.Cartesian3,J=new a.Cartesian3,Q=new a.Cartesian3;function K(e,t,n,r,s){const o=W(n,t,Q),l=U(e,t,o,Z),c=U(r,t,o,$);if(i.CesiumMath.equalsEpsilon(a.Cartesian3.dot(l,c),-1,i.CesiumMath.EPSILON5))return s=a.Cartesian3.cross(o,l,s),s=a.Cartesian3.normalize(s,s);s=a.Cartesian3.add(c,l,s),s=a.Cartesian3.normalize(s,s);const u=a.Cartesian3.cross(o,s,J);return a.Cartesian3.dot(c,u)<0&&(s=a.Cartesian3.negate(s,s)),s}const ee=h.Plane.fromPointNormal(a.Cartesian3.ZERO,a.Cartesian3.UNIT_Y),te=new a.Cartesian3,ae=new a.Cartesian3,ne=new a.Cartesian3,ie=new a.Cartesian3,re=new a.Cartesian3,se=new a.Cartesian3,oe=new a.Cartographic,le=new a.Cartographic,ce=new a.Cartographic;D.createGeometry=function(l){const h=!l._scene3DOnly;let p=l.loop;const f=l._ellipsoid,g=l.granularity,m=l.arcType,w=new S[l._projectionIndex](f),y=1e3;let M,T;const E=l._positions,_=E.length;let O,b,P,A;2===_&&(p=!1);const k=new c.EllipsoidRhumbLine(void 0,void 0,f);let I,x,R;const D=[E[0]];for(T=0;T<_-1;T++)O=E[T],b=E[T+1],I=d.IntersectionTests.lineSegmentPlane(O,b,ee,se),!n.defined(I)||a.Cartesian3.equalsEpsilon(I,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(I,b,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(I)):l.arcType===r.ArcType.RHUMB&&(R=f.cartesianToCartographic(I,oe).longitude,P=f.cartesianToCartographic(O,oe),A=f.cartesianToCartographic(b,le),k.setEndPoints(P,A),x=k.findIntersectionWithLongitude(R,ce),I=f.cartographicToCartesian(x,se),!n.defined(I)||a.Cartesian3.equalsEpsilon(I,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(I,b,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(I)))),D.push(b);p&&(O=E[_-1],b=E[0],I=d.IntersectionTests.lineSegmentPlane(O,b,ee,se),!n.defined(I)||a.Cartesian3.equalsEpsilon(I,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(I,b,i.CesiumMath.EPSILON7)||(l.arcType===r.ArcType.GEODESIC?D.push(a.Cartesian3.clone(I)):l.arcType===r.ArcType.RHUMB&&(R=f.cartesianToCartographic(I,oe).longitude,P=f.cartesianToCartographic(O,oe),A=f.cartesianToCartographic(b,le),k.setEndPoints(P,A),x=k.findIntersectionWithLongitude(R,ce),I=f.cartographicToCartesian(x,se),!n.defined(I)||a.Cartesian3.equalsEpsilon(I,O,i.CesiumMath.EPSILON7)||a.Cartesian3.equalsEpsilon(I,b,i.CesiumMath.EPSILON7)||D.push(a.Cartesian3.clone(I)))));let v=D.length,z=new Array(v);for(T=0;T<v;T++){const e=a.Cartographic.fromCartesian(D[T],f);e.height=0,z[T]=e}if(z=s.arrayRemoveDuplicates(z,a.Cartographic.equalsEpsilon),v=z.length,v<2)return;const H=[],V=[],j=[],G=[];let Y=te,q=ae,U=ne,Z=ie,$=re;const J=z[0],Q=z[1];for(Y=X(f,z[v-1],0,Y),Z=X(f,Q,0,Z),q=X(f,J,0,q),U=X(f,J,y,U),$=p?K(Y,q,U,Z,$):B(J,Q,y,f,$),a.Cartesian3.pack($,V,0),a.Cartesian3.pack(q,j,0),a.Cartesian3.pack(U,G,0),H.push(J.latitude),H.push(J.longitude),F(J,Q,0,y,g,m,f,V,j,G,H),T=1;T<v-1;++T){Y=a.Cartesian3.clone(q,Y),q=a.Cartesian3.clone(Z,q);const e=z[T];X(f,e,y,U),X(f,z[T+1],0,Z),K(Y,q,U,Z,$),M=V.length,a.Cartesian3.pack($,V,M),a.Cartesian3.pack(q,j,M),a.Cartesian3.pack(U,G,M),H.push(e.latitude),H.push(e.longitude),F(z[T],z[T+1],0,y,g,m,f,V,j,G,H)}const ue=z[v-1],Ce=z[v-2];if(q=X(f,ue,0,q),U=X(f,ue,y,U),p){const e=z[0];Y=X(f,Ce,0,Y),Z=X(f,e,0,Z),$=K(Y,q,U,Z,$)}else $=B(Ce,ue,y,f,$);if(M=V.length,a.Cartesian3.pack($,V,M),a.Cartesian3.pack(q,j,M),a.Cartesian3.pack(U,G,M),H.push(ue.latitude),H.push(ue.longitude),p){for(F(ue,J,0,y,g,m,f,V,j,G,H),M=V.length,T=0;T<3;++T)V[M+T]=V[T],j[M+T]=j[T],G[M+T]=G[T];H.push(J.latitude),H.push(J.longitude)}return function(n,r,s,l,c,d,h){let p,f;const g=r._ellipsoid,m=s.length/3-1,w=8*m,y=4*w,M=36*m,T=w>65535?new Uint32Array(M):new Uint16Array(M),E=new Float64Array(3*w),_=new Float32Array(y),O=new Float32Array(y),b=new Float32Array(y),P=new Float32Array(y),A=new Float32Array(y);let k,I,S,x;h&&(k=new Float32Array(y),I=new Float32Array(y),S=new Float32Array(y),x=new Float32Array(2*w));const R=d.length/2;let D=0;const v=Oe;v.height=0;const z=be;z.height=0;let H=Pe,B=Ae;if(h)for(f=0,p=1;p<R;p++)v.latitude=d[f],v.longitude=d[f+1],z.latitude=d[f+2],z.longitude=d[f+3],H=r.project(v,H),B=r.project(z,B),D+=a.Cartesian3.distance(H,B),f+=2;const V=l.length/3;B=a.Cartesian3.unpack(l,0,B);let j,G=0;for(f=3,p=1;p<V;p++)H=a.Cartesian3.clone(B,H),B=a.Cartesian3.unpack(l,f,B),G+=a.Cartesian3.distance(H,B),f+=3;f=3;let Y=0,F=0,q=0,X=0,U=!1,Z=a.Cartesian3.unpack(s,0,Ie),$=a.Cartesian3.unpack(l,0,Ae),J=a.Cartesian3.unpack(c,0,Se);if(n){he(J,a.Cartesian3.unpack(s,s.length-6,ke),Z,$)&&(J=a.Cartesian3.negate(J,J))}let Q=0,K=0,ee=0;for(p=0;p<m;p++){const e=a.Cartesian3.clone(Z,ke),n=a.Cartesian3.clone($,Pe);let o,C,p,m,w=a.Cartesian3.clone(J,Le);if(U&&(w=a.Cartesian3.negate(w,w)),Z=a.Cartesian3.unpack(s,f,Ie),$=a.Cartesian3.unpack(l,f,Ae),J=a.Cartesian3.unpack(c,f,Se),U=he(J,e,Z,$),v.latitude=d[Y],v.longitude=d[Y+1],z.latitude=d[Y+2],z.longitude=d[Y+3],h){const e=_e(v,z);o=r.project(v,He),C=r.project(z,Be);const t=W(C,o,$e);t.y=Math.abs(t.y),p=Ve,m=je,0===e||a.Cartesian3.dot(t,a.Cartesian3.UNIT_Y)>N?(p=me(r,v,w,o,Ve),m=me(r,z,J,C,je)):1===e?(m=me(r,z,J,C,je),p.x=0,p.y=i.CesiumMath.sign(v.longitude-Math.abs(z.longitude)),p.z=0):(p=me(r,v,w,o,Ve),m.x=0,m.y=i.CesiumMath.sign(v.longitude-z.longitude),m.z=0)}const y=a.Cartesian3.distance(n,$),M=u.EncodedCartesian3.fromCartesian(e,Ue),T=a.Cartesian3.subtract(Z,e,Ge),R=a.Cartesian3.normalize(T,qe);let H=a.Cartesian3.subtract(n,e,Ye);H=a.Cartesian3.normalize(H,H);let B=a.Cartesian3.cross(R,H,qe);B=a.Cartesian3.normalize(B,B);let V=a.Cartesian3.cross(H,w,Xe);V=a.Cartesian3.normalize(V,V);let te=a.Cartesian3.subtract($,Z,Fe);te=a.Cartesian3.normalize(te,te);let ae=a.Cartesian3.cross(J,te,We);ae=a.Cartesian3.normalize(ae,ae);const ne=y/G,ie=Q/G;let re,se,oe,le=0,ce=0,ue=0;if(h){le=a.Cartesian3.distance(o,C),re=u.EncodedCartesian3.fromCartesian(o,Ze),se=a.Cartesian3.subtract(C,o,$e),oe=a.Cartesian3.normalize(se,Je);const e=oe.x;oe.x=oe.y,oe.y=-e,ce=le/D,ue=K/D}for(j=0;j<8;j++){const e=X+4*j,t=F+2*j,n=e+3,i=j<4?1:-1,r=2===j||3===j||6===j||7===j?1:-1;a.Cartesian3.pack(M.high,_,e),_[n]=T.x,a.Cartesian3.pack(M.low,O,e),O[n]=T.y,a.Cartesian3.pack(V,b,e),b[n]=T.z,a.Cartesian3.pack(ae,P,e),P[n]=ne*i,a.Cartesian3.pack(B,A,e);let s=ie*r;0===s&&r<0&&(s=9),A[n]=s,h&&(k[e]=re.high.x,k[e+1]=re.high.y,k[e+2]=re.low.x,k[e+3]=re.low.y,S[e]=-p.y,S[e+1]=p.x,S[e+2]=m.y,S[e+3]=-m.x,I[e]=se.x,I[e+1]=se.y,I[e+2]=oe.x,I[e+3]=oe.y,x[t]=ce*i,s=ue*r,0===s&&r<0&&(s=9),x[t+1]=s)}const Ce=ve,de=ze,pe=Re,fe=De,ge=t.Rectangle.fromCartographicArray(xe,Ne),we=L.getMinimumMaximumHeights(ge,g),ye=we.minimumTerrainHeight,Te=we.maximumTerrainHeight;ee+=ye,ee+=Te,Me(e,n,ye,Te,Ce,pe),Me(Z,$,ye,Te,de,fe);let Oe=a.Cartesian3.multiplyByScalar(B,i.CesiumMath.EPSILON5,Qe);a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(pe,Oe,pe),a.Cartesian3.add(fe,Oe,fe),Ee(Ce,de),Ee(pe,fe),a.Cartesian3.pack(Ce,E,q),a.Cartesian3.pack(de,E,q+3),a.Cartesian3.pack(fe,E,q+6),a.Cartesian3.pack(pe,E,q+9),Oe=a.Cartesian3.multiplyByScalar(B,-2*i.CesiumMath.EPSILON5,Qe),a.Cartesian3.add(Ce,Oe,Ce),a.Cartesian3.add(de,Oe,de),a.Cartesian3.add(pe,Oe,pe),a.Cartesian3.add(fe,Oe,fe),Ee(Ce,de),Ee(pe,fe),a.Cartesian3.pack(Ce,E,q+12),a.Cartesian3.pack(de,E,q+15),a.Cartesian3.pack(fe,E,q+18),a.Cartesian3.pack(pe,E,q+21),Y+=2,f+=3,F+=16,q+=24,X+=32,Q+=y,K+=le}f=0;let te=0;for(p=0;p<m;p++){for(j=0;j<tt;j++)T[f+j]=et[j]+te;te+=8,f+=tt}const ae=Ke;e.BoundingSphere.fromVertices(s,a.Cartesian3.ZERO,3,ae[0]),e.BoundingSphere.fromVertices(l,a.Cartesian3.ZERO,3,ae[1]);const ne=e.BoundingSphere.fromBoundingSpheres(ae);ne.radius+=ee/(2*m);const ie={position:new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:E}),startHiAndForwardOffsetX:at(_),startLoAndForwardOffsetY:at(O),startNormalAndForwardOffsetZ:at(b),endNormalAndTextureCoordinateNormalizationX:at(P),rightNormalAndTextureCoordinateNormalizationY:at(A)};h&&(ie.startHiLo2D=at(k),ie.offsetAndRight2D=at(I),ie.startEndNormals2D=at(S),ie.texcoordNormalization2D=new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:x}));return new C.Geometry({attributes:ie,indices:T,boundingSphere:ne})}(p,w,j,G,V,H,h)};const ue=new a.Cartesian3,Ce=new a.Matrix3,de=new e.Quaternion;function he(t,n,r,s){const o=W(r,n,ue),l=a.Cartesian3.dot(o,t);if(l>N||l<R){const n=W(s,r,Q),o=l<R?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,c=e.Quaternion.fromAxisAngle(n,o,de),u=a.Matrix3.fromQuaternion(c,Ce);return a.Matrix3.multiplyByVector(u,t,t),!0}return!1}const pe=new a.Cartographic,fe=new a.Cartesian3,ge=new a.Cartesian3;function me(e,t,n,r,s){const o=a.Cartographic.toCartesian(t,e._ellipsoid,fe);let l=a.Cartesian3.add(o,n,ge),c=!1;const u=e._ellipsoid;let C=u.cartesianToCartographic(l,pe);Math.abs(t.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(c=!0,l=a.Cartesian3.subtract(o,n,ge),C=u.cartesianToCartographic(l,pe)),C.height=0;const d=e.project(C,s);return(s=a.Cartesian3.subtract(d,r,s)).z=0,s=a.Cartesian3.normalize(s,s),c&&a.Cartesian3.negate(s,s),s}const we=new a.Cartesian3,ye=new a.Cartesian3;function Me(e,t,n,i,r,s){const o=a.Cartesian3.subtract(t,e,we);a.Cartesian3.normalize(o,o);const l=n-0;let c=a.Cartesian3.multiplyByScalar(o,l,ye);a.Cartesian3.add(e,c,r);const u=i-1e3;c=a.Cartesian3.multiplyByScalar(o,u,ye),a.Cartesian3.add(t,c,s)}const Te=new a.Cartesian3;function Ee(e,t){const n=h.Plane.getPointDistance(ee,e),r=h.Plane.getPointDistance(ee,t);let s=Te;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=W(t,e,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=W(e,t,s),a.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),a.Cartesian3.add(t,s,t))}function _e(e,t){const a=Math.abs(e.longitude),n=Math.abs(t.longitude);if(i.CesiumMath.equalsEpsilon(a,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const n=i.CesiumMath.sign(t.longitude);return e.longitude=n*(a-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const a=i.CesiumMath.sign(e.longitude);return t.longitude=a*(n-i.CesiumMath.EPSILON11),2}return 0}const Oe=new a.Cartographic,be=new a.Cartographic,Pe=new a.Cartesian3,Ae=new a.Cartesian3,ke=new a.Cartesian3,Ie=new a.Cartesian3,Le=new a.Cartesian3,Se=new a.Cartesian3,xe=[Oe,be],Ne=new t.Rectangle,Re=new a.Cartesian3,De=new a.Cartesian3,ve=new a.Cartesian3,ze=new a.Cartesian3,He=new a.Cartesian3,Be=new a.Cartesian3,Ve=new a.Cartesian3,je=new a.Cartesian3,Ge=new a.Cartesian3,Ye=new a.Cartesian3,Fe=new a.Cartesian3,qe=new a.Cartesian3,Xe=new a.Cartesian3,We=new a.Cartesian3,Ue=new u.EncodedCartesian3,Ze=new u.EncodedCartesian3,$e=new a.Cartesian3,Je=new a.Cartesian3,Qe=new a.Cartesian3,Ke=[new e.BoundingSphere,new e.BoundingSphere],et=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],tt=et.length;function at(e){return new C.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return D._projectNormal=me,function(e,t){return L.initialize().then((function(){return n.defined(t)&&(e=D.unpack(e,t)),D.createGeometry(e)}))}}));
public/CIMSDK/Workers/createPlaneGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Transforms-f3654378","./Matrix3-6e56fbc7","./ComponentDatatype-985dcc38","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./VertexFormat-20b5279f","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0"],(function(t,e,n,r,a,o,i,m,u,c,p,s){"use strict";function y(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT);const n=t.defaultValue(e.vertexFormat,i.VertexFormat.DEFAULT);this._vertexFormat=n,this._workerName="createPlaneGeometry"}y.packedLength=i.VertexFormat.packedLength,y.pack=function(e,n,r){return r=t.defaultValue(r,0),i.VertexFormat.pack(e._vertexFormat,n,r),n};const f=new i.VertexFormat,l={vertexFormat:f};y.unpack=function(e,n,r){n=t.defaultValue(n,0);const a=i.VertexFormat.unpack(e,n,f);return t.defined(r)?(r._vertexFormat=i.VertexFormat.clone(a,r._vertexFormat),r):new y(l)};const A=new n.Cartesian3(-.5,-.5,0),F=new n.Cartesian3(.5,.5,0);return y.createGeometry=function(t){const i=t._vertexFormat,m=new o.GeometryAttributes;let u,c;if(i.position){if(c=new Float64Array(12),c[0]=A.x,c[1]=A.y,c[2]=0,c[3]=F.x,c[4]=A.y,c[5]=0,c[6]=F.x,c[7]=F.y,c[8]=0,c[9]=A.x,c[10]=F.y,c[11]=0,m.position=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c}),i.normal){const t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,m.normal=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(i.st){const t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,m.st=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}if(i.tangent){const t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,m.tangent=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(i.bitangent){const t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,m.bitangent=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}u=new Uint16Array(6),u[0]=0,u[1]=1,u[2]=2,u[3]=0,u[4]=2,u[5]=3}return new a.Geometry({attributes:m,indices:u,primitiveType:a.PrimitiveType.TRIANGLES,boundingSphere:new e.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(e,n){return t.defined(n)&&(e=y.unpack(e,n)),y.createGeometry(e)}}));
define(["./defaultValue-865ac579","./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./VertexFormat-20b5279f","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0"],(function(t,e,n,r,a,o,i,m,c,u,p,s){"use strict";function y(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT);const n=t.defaultValue(e.vertexFormat,i.VertexFormat.DEFAULT);this._vertexFormat=n,this._workerName="createPlaneGeometry"}y.packedLength=i.VertexFormat.packedLength,y.pack=function(e,n,r){return r=t.defaultValue(r,0),i.VertexFormat.pack(e._vertexFormat,n,r),n};const l=new i.VertexFormat,f={vertexFormat:l};y.unpack=function(e,n,r){n=t.defaultValue(n,0);const a=i.VertexFormat.unpack(e,n,l);return t.defined(r)?(r._vertexFormat=i.VertexFormat.clone(a,r._vertexFormat),r):new y(f)};const A=new n.Cartesian3(-.5,-.5,0),F=new n.Cartesian3(.5,.5,0);return y.createGeometry=function(t){const i=t._vertexFormat,m=new o.GeometryAttributes;let c,u;if(i.position){if(u=new Float64Array(12),u[0]=A.x,u[1]=A.y,u[2]=0,u[3]=F.x,u[4]=A.y,u[5]=0,u[6]=F.x,u[7]=F.y,u[8]=0,u[9]=A.x,u[10]=F.y,u[11]=0,m.position=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),i.normal){const t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,m.normal=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(i.st){const t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,m.st=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}if(i.tangent){const t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,m.tangent=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(i.bitangent){const t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,m.bitangent=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}c=new Uint16Array(6),c[0]=0,c[1]=1,c[2]=2,c[3]=0,c[4]=2,c[5]=3}return new a.Geometry({attributes:m,indices:c,primitiveType:a.PrimitiveType.TRIANGLES,boundingSphere:new e.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(e,n){return t.defined(n)&&(e=y.unpack(e,n)),y.createGeometry(e)}}));
public/CIMSDK/Workers/createPlaneOutlineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Transforms-f3654378","./Matrix3-6e56fbc7","./ComponentDatatype-985dcc38","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./Math-76ce6367","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0"],(function(e,t,n,r,i,a,o,u,c,s,y){"use strict";function m(){this._workerName="createPlaneOutlineGeometry"}m.packedLength=0,m.pack=function(e,t){return t},m.unpack=function(t,n,r){return e.defined(r)?r:new m};const p=new n.Cartesian3(-.5,-.5,0),f=new n.Cartesian3(.5,.5,0);return m.createGeometry=function(){const e=new a.GeometryAttributes,o=new Uint16Array(8),u=new Float64Array(12);return u[0]=p.x,u[1]=p.y,u[2]=p.z,u[3]=f.x,u[4]=p.y,u[5]=p.z,u[6]=f.x,u[7]=f.y,u[8]=p.z,u[9]=p.x,u[10]=f.y,u[11]=p.z,e.position=new i.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),o[0]=0,o[1]=1,o[2]=1,o[3]=2,o[4]=2,o[5]=3,o[6]=3,o[7]=0,new i.Geometry({attributes:e,indices:o,primitiveType:i.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=m.unpack(t,n)),m.createGeometry(t)}}));
define(["./defaultValue-865ac579","./Transforms-221c7c82","./Matrix3-aeb3c326","./ComponentDatatype-985dcc38","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./Math-76ce6367","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0"],(function(e,t,n,r,a,i,o,c,u,s,y){"use strict";function m(){this._workerName="createPlaneOutlineGeometry"}m.packedLength=0,m.pack=function(e,t){return t},m.unpack=function(t,n,r){return e.defined(r)?r:new m};const p=new n.Cartesian3(-.5,-.5,0),d=new n.Cartesian3(.5,.5,0);return m.createGeometry=function(){const e=new i.GeometryAttributes,o=new Uint16Array(8),c=new Float64Array(12);return c[0]=p.x,c[1]=p.y,c[2]=p.z,c[3]=d.x,c[4]=p.y,c[5]=p.z,c[6]=d.x,c[7]=d.y,c[8]=p.z,c[9]=p.x,c[10]=d.y,c[11]=p.z,e.position=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c}),o[0]=0,o[1]=1,o[2]=1,o[3]=2,o[4]=2,o[5]=3,o[6]=3,o[7]=0,new a.Geometry({attributes:e,indices:o,primitiveType:a.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=m.unpack(t,n)),m.createGeometry(t)}}));
public/CIMSDK/Workers/createPolygonGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./ArcType-68098157","./BoundingRectangle-f7002576","./Transforms-f3654378","./Matrix2-23dd5853","./ComponentDatatype-985dcc38","./EllipsoidGeodesic-3e762525","./EllipsoidTangentPlane-2129690e","./GeometryAttribute-e3f63a02","./GeometryInstance-54a3e3b6","./GeometryOffsetAttribute-06264989","./GeometryPipeline-3f4d7db4","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonGeometryLibrary-e0e45e51","./PolygonPipeline-47fb81c6","./VertexFormat-20b5279f","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f","./arrayRemoveDuplicates-398390b2","./EllipsoidRhumbLine-b175af48","./GeometryAttributes-75794475"],(function(e,t,o,r,i,n,a,s,l,u,c,p,y,d,m,g,h,f,b,_,P,C,x,w,T,A,I,v,E){"use strict";const G=new t.Cartographic,O=new t.Cartographic;function L(e,t,o,r){const i=r.cartesianToCartographic(e,G).height,n=r.cartesianToCartographic(t,O);n.height=i,r.cartographicToCartesian(n,t);const a=r.cartesianToCartographic(o,O);a.height=i-100,r.cartographicToCartesian(a,o)}const V=new r.BoundingRectangle,D=new t.Cartesian3,H=new t.Cartesian3,F=new t.Cartesian3,N=new t.Cartesian3,R=new t.Cartesian3,M=new t.Cartesian3;let S=new t.Cartesian3,B=new t.Cartesian3,k=new t.Cartesian3;const z=new n.Cartesian2,W=new n.Cartesian2,Y=new t.Cartesian3,U=new i.Quaternion,j=new t.Matrix3,Q=new t.Matrix3;function q(o){const r=o.vertexFormat,s=o.geometry,l=o.shadowVolume,c=s.attributes.position.values,y=e.defined(s.attributes.st)?s.attributes.st.values:void 0;let d=c.length;const g=o.wall,h=o.top||g,f=o.bottom||g;if(r.st||r.normal||r.tangent||r.bitangent||l){const p=o.boundingRectangle,b=o.tangentPlane,_=o.ellipsoid,P=o.stRotation,C=o.perPositionHeight,x=z;x.x=p.x,x.y=p.y;const w=r.st?new Float32Array(d/3*2):void 0,T=new Float32Array(d/3);let A,I=0;r.normal&&(A=C&&h&&!g?s.attributes.normal.values:new Float32Array(d));const v=r.tangent?new Float32Array(d):void 0,E=r.bitangent?new Float32Array(d):void 0,G=l?new Float32Array(d):void 0;let O=0,V=0,q=H,K=F,Z=N,J=!0,X=j,$=Q;if(0!==P){let e=i.Quaternion.fromAxisAngle(b._plane.normal,P,U);X=t.Matrix3.fromQuaternion(e,X),e=i.Quaternion.fromAxisAngle(b._plane.normal,-P,U),$=t.Matrix3.fromQuaternion(e,$)}else X=t.Matrix3.clone(t.Matrix3.IDENTITY,X),$=t.Matrix3.clone(t.Matrix3.IDENTITY,$);let ee=0,te=0;h&&f&&(ee=d/2,te=d/3,d/=2);for(let i=0;i<d;i+=3){const a=t.Cartesian3.fromArray(c,i,Y);if(r.st&&!e.defined(y)){let e=t.Matrix3.multiplyByVector(X,a,D);e=_.scaleToGeodeticSurface(e,e);const o=b.projectPointOntoPlane(e,W);n.Cartesian2.subtract(o,x,o);const r=m.CesiumMath.clamp(o.x/p.width,0,1),i=m.CesiumMath.clamp(o.y/p.height,0,1);f&&(w[O+te]=r,w[O+1+te]=i),h&&(w[O]=r,w[O+1]=i);const s=t.Cartographic.fromCartesian(a);T[I++]=Math.floor(s.height+1e-5),O+=2}if(r.normal||r.tangent||r.bitangent||l){const e=V+1,n=V+2;if(g){if(i+3<d){const e=t.Cartesian3.fromArray(c,i+3,R);if(J){const o=t.Cartesian3.fromArray(c,i+d,M);C&&L(a,e,o,_),t.Cartesian3.subtract(e,a,e),t.Cartesian3.subtract(o,a,o),q=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,q),q),J=!1}t.Cartesian3.equalsEpsilon(e,a,m.CesiumMath.EPSILON10)&&(J=!0)}(r.tangent||r.bitangent)&&(Z=_.geodeticSurfaceNormal(a,Z),r.tangent&&(K=t.Cartesian3.normalize(t.Cartesian3.cross(Z,q,K),K)))}else q=_.geodeticSurfaceNormal(a,q),(r.tangent||r.bitangent)&&(C&&(S=t.Cartesian3.fromArray(A,V,S),B=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,S,B),B=t.Cartesian3.normalize(t.Matrix3.multiplyByVector($,B,B),B),r.bitangent&&(k=t.Cartesian3.normalize(t.Cartesian3.cross(S,B,k),k))),K=t.Cartesian3.cross(t.Cartesian3.UNIT_Z,q,K),K=t.Cartesian3.normalize(t.Matrix3.multiplyByVector($,K,K),K),r.bitangent&&(Z=t.Cartesian3.normalize(t.Cartesian3.cross(q,K,Z),Z)));r.normal&&(o.wall?(A[V+ee]=q.x,A[e+ee]=q.y,A[n+ee]=q.z):f&&(A[V+ee]=-q.x,A[e+ee]=-q.y,A[n+ee]=-q.z),(h&&!C||g)&&(A[V]=q.x,A[e]=q.y,A[n]=q.z)),l&&(g&&(q=_.geodeticSurfaceNormal(a,q)),G[V+ee]=-q.x,G[e+ee]=-q.y,G[n+ee]=-q.z),r.tangent&&(o.wall?(v[V+ee]=K.x,v[e+ee]=K.y,v[n+ee]=K.z):f&&(v[V+ee]=-K.x,v[e+ee]=-K.y,v[n+ee]=-K.z),h&&(C?(v[V]=B.x,v[e]=B.y,v[n]=B.z):(v[V]=K.x,v[e]=K.y,v[n]=K.z))),r.bitangent&&(f&&(E[V+ee]=Z.x,E[e+ee]=Z.y,E[n+ee]=Z.z),h&&(C?(E[V]=k.x,E[e]=k.y,E[n]=k.z):(E[V]=Z.x,E[e]=Z.y,E[n]=Z.z))),V+=3}}r.st&&!e.defined(y)&&(s.attributes.st=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:w}),s.attributes.height=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:1,values:T})),r.normal&&(s.attributes.normal=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r.tangent&&(s.attributes.tangent=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),r.bitangent&&(s.attributes.bitangent=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:E})),l&&(s.attributes.extrudeDirection=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G}))}if(o.extrude&&e.defined(o.offsetAttribute)){const e=c.length/3;let t=new Uint8Array(e);if(o.offsetAttribute===p.GeometryOffsetAttribute.TOP)h&&f||g?t=t.fill(1,0,e/2):h&&(t=t.fill(1));else{const e=o.offsetAttribute===p.GeometryOffsetAttribute.NONE?0:1;t=t.fill(e)}s.attributes.applyOffset=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return s}const K=new t.Cartographic,Z=new t.Cartographic,J={westOverIDL:0,eastOverIDL:0};let X=new s.EllipsoidGeodesic;function $(t,r,i,a,l){if(l=e.defaultValue(l,new n.Rectangle),!e.defined(t)||t.length<3)return l.west=0,l.north=0,l.south=0,l.east=0,l;if(i===o.ArcType.RHUMB)return n.Rectangle.fromCartesianArray(t,r,l);X.ellipsoid.equals(r)||(X=new s.EllipsoidGeodesic(void 0,void 0,r)),l.west=Number.POSITIVE_INFINITY,l.east=Number.NEGATIVE_INFINITY,l.south=Number.POSITIVE_INFINITY,l.north=Number.NEGATIVE_INFINITY,J.westOverIDL=Number.POSITIVE_INFINITY,J.eastOverIDL=Number.NEGATIVE_INFINITY;const u=1/m.CesiumMath.chordLength(a,r.maximumRadius),c=t.length;let p,y=r.cartesianToCartographic(t[0],Z),d=K;for(let e=1;e<c;e++)p=d,d=y,y=r.cartesianToCartographic(t[e],p),X.setEndPoints(d,y),te(X,u,l,J);return p=d,d=y,y=r.cartesianToCartographic(t[0],p),X.setEndPoints(d,y),te(X,u,l,J),l.east-l.west>J.eastOverIDL-J.westOverIDL&&(l.west=J.westOverIDL,l.east=J.eastOverIDL,l.east>m.CesiumMath.PI&&(l.east=l.east-m.CesiumMath.TWO_PI),l.west>m.CesiumMath.PI&&(l.west=l.west-m.CesiumMath.TWO_PI)),l}const ee=new t.Cartographic;function te(e,t,o,r){const i=e.surfaceDistance,n=Math.ceil(i*t),a=n>0?i/(n-1):Number.POSITIVE_INFINITY;let s=0;for(let t=0;t<n;t++){const t=e.interpolateUsingSurfaceDistance(s,ee);s+=a;const i=t.longitude,n=t.latitude;o.west=Math.min(o.west,i),o.east=Math.max(o.east,i),o.south=Math.min(o.south,n),o.north=Math.max(o.north,n);const l=i>=0?i:i+m.CesiumMath.TWO_PI;r.westOverIDL=Math.min(r.westOverIDL,l),r.eastOverIDL=Math.max(r.eastOverIDL,l)}}const oe=[];function re(t,o,r,i,n,a,s,u,p,y){const m={walls:[]};let f;if(s||u){const n=g.PolygonGeometryLibrary.createGeometryFromPositions(t,o,r,i,a,p,y),l=n.attributes.position.values,h=n.indices;let b,_;if(s&&u){const t=l.concat(l);b=t.length/3,_=d.IndexDatatype.createTypedArray(b,2*h.length),_.set(h);const o=h.length,i=b/2;for(f=0;f<o;f+=3){const e=_[f]+i,t=_[f+1]+i,r=_[f+2]+i;_[f+o]=r,_[f+1+o]=t,_[f+2+o]=e}if(n.attributes.position.values=t,a&&p.normal){const e=n.attributes.normal.values;n.attributes.normal.values=new Float32Array(t.length),n.attributes.normal.values.set(e)}if(p.st&&e.defined(r)){const e=n.attributes.st.values;n.attributes.st.values=new Float32Array(2*b),n.attributes.st.values=e.concat(e)}n.indices=_}else if(u){for(b=l.length/3,_=d.IndexDatatype.createTypedArray(b,h.length),f=0;f<h.length;f+=3)_[f]=h[f+2],_[f+1]=h[f+1],_[f+2]=h[f];n.indices=_}m.topAndBottom=new c.GeometryInstance({geometry:n})}let b=n.outerRing,_=l.EllipsoidTangentPlane.fromPoints(b,t),P=_.projectPointsOntoPlane(b,oe),C=h.PolygonPipeline.computeWindingOrder2D(P);C===h.WindingOrder.CLOCKWISE&&(b=b.slice().reverse());let x=g.PolygonGeometryLibrary.computeWallGeometry(b,r,t,i,a,y);m.walls.push(new c.GeometryInstance({geometry:x}));const w=n.holes;for(f=0;f<w.length;f++){let e=w[f];_=l.EllipsoidTangentPlane.fromPoints(e,t),P=_.projectPointsOntoPlane(e,oe),C=h.PolygonPipeline.computeWindingOrder2D(P),C===h.WindingOrder.COUNTER_CLOCKWISE&&(e=e.slice().reverse()),x=g.PolygonGeometryLibrary.computeWallGeometry(e,r,t,i,a,y),m.walls.push(new c.GeometryInstance({geometry:x}))}return m}function ie(r){const i=r.polygonHierarchy,a=e.defaultValue(r.vertexFormat,f.VertexFormat.DEFAULT),s=e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(r.granularity,m.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(r.stRotation,0),c=r.textureCoordinates,p=e.defaultValue(r.perPositionHeight,!1),y=p&&e.defined(r.extrudedHeight);let d=e.defaultValue(r.height,0),h=e.defaultValue(r.extrudedHeight,d);if(!y){const e=Math.max(d,h);h=Math.min(d,h),d=e}this._vertexFormat=f.VertexFormat.clone(a),this._ellipsoid=t.Ellipsoid.clone(s),this._granularity=l,this._stRotation=u,this._height=d,this._extrudedHeight=h,this._closeTop=e.defaultValue(r.closeTop,!0),this._closeBottom=e.defaultValue(r.closeBottom,!0),this._polygonHierarchy=i,this._perPositionHeight=p,this._perPositionHeightExtrude=y,this._shadowVolume=e.defaultValue(r.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=r.offsetAttribute,this._arcType=e.defaultValue(r.arcType,o.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=c,this.packedLength=g.PolygonGeometryLibrary.computeHierarchyPackedLength(i,t.Cartesian3)+t.Ellipsoid.packedLength+f.VertexFormat.packedLength+(c?g.PolygonGeometryLibrary.computeHierarchyPackedLength(c,n.Cartesian2):1)+12}ie.fromPositions=function(t){return new ie({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates})},ie.pack=function(o,r,i){return i=e.defaultValue(i,0),i=g.PolygonGeometryLibrary.packPolygonHierarchy(o._polygonHierarchy,r,i,t.Cartesian3),t.Ellipsoid.pack(o._ellipsoid,r,i),i+=t.Ellipsoid.packedLength,f.VertexFormat.pack(o._vertexFormat,r,i),i+=f.VertexFormat.packedLength,r[i++]=o._height,r[i++]=o._extrudedHeight,r[i++]=o._granularity,r[i++]=o._stRotation,r[i++]=o._perPositionHeightExtrude?1:0,r[i++]=o._perPositionHeight?1:0,r[i++]=o._closeTop?1:0,r[i++]=o._closeBottom?1:0,r[i++]=o._shadowVolume?1:0,r[i++]=e.defaultValue(o._offsetAttribute,-1),r[i++]=o._arcType,e.defined(o._textureCoordinates)?i=g.PolygonGeometryLibrary.packPolygonHierarchy(o._textureCoordinates,r,i,n.Cartesian2):r[i++]=-1,r[i++]=o.packedLength,r};const ne=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),ae=new f.VertexFormat,se={polygonHierarchy:{}};return ie.unpack=function(o,r,i){r=e.defaultValue(r,0);const a=g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,t.Cartesian3);r=a.startingIndex,delete a.startingIndex;const s=t.Ellipsoid.unpack(o,r,ne);r+=t.Ellipsoid.packedLength;const l=f.VertexFormat.unpack(o,r,ae);r+=f.VertexFormat.packedLength;const u=o[r++],c=o[r++],p=o[r++],y=o[r++],d=1===o[r++],m=1===o[r++],h=1===o[r++],b=1===o[r++],_=1===o[r++],P=o[r++],C=o[r++],x=-1===o[r]?void 0:g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,n.Cartesian2);e.defined(x)?(r=x.startingIndex,delete x.startingIndex):r++;const w=o[r++];return e.defined(i)||(i=new ie(se)),i._polygonHierarchy=a,i._ellipsoid=t.Ellipsoid.clone(s,i._ellipsoid),i._vertexFormat=f.VertexFormat.clone(l,i._vertexFormat),i._height=u,i._extrudedHeight=c,i._granularity=p,i._stRotation=y,i._perPositionHeightExtrude=d,i._perPositionHeight=m,i._closeTop=h,i._closeBottom=b,i._shadowVolume=_,i._offsetAttribute=-1===P?void 0:P,i._arcType=C,i._textureCoordinates=x,i.packedLength=w,i},ie.computeRectangle=function(r,i){const n=e.defaultValue(r.granularity,m.CesiumMath.RADIANS_PER_DEGREE),a=e.defaultValue(r.arcType,o.ArcType.GEODESIC),s=r.polygonHierarchy,l=e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84);return $(s.positions,l,a,n,i)},ie.createGeometry=function(t){const o=t._vertexFormat,r=t._ellipsoid,n=t._granularity,s=t._stRotation,f=t._polygonHierarchy,b=t._perPositionHeight,_=t._closeTop,P=t._closeBottom,C=t._arcType,x=t._textureCoordinates,w=e.defined(x);let T=f.positions;if(T.length<3)return;const A=l.EllipsoidTangentPlane.fromPoints(T,r),I=g.PolygonGeometryLibrary.polygonsFromHierarchy(f,w,A.projectPointsOntoPlane.bind(A),!b,r),v=I.hierarchy,E=I.polygons,G=w?g.PolygonGeometryLibrary.polygonsFromHierarchy(x,!0,(function(e){return e}),!1).polygons:void 0;if(0===v.length)return;T=v[0].outerRing;const O=g.PolygonGeometryLibrary.computeBoundingRectangle(A.plane.normal,A.projectPointOntoPlane.bind(A),T,s,V),L=[],D=t._height,H=t._extrudedHeight,F={perPositionHeight:b,vertexFormat:o,geometry:void 0,tangentPlane:A,boundingRectangle:O,ellipsoid:r,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:C};let N;if(t._perPositionHeightExtrude||!m.CesiumMath.equalsEpsilon(D,H,0,m.CesiumMath.EPSILON2))for(F.extrude=!0,F.top=_,F.bottom=P,F.shadowVolume=t._shadowVolume,F.offsetAttribute=t._offsetAttribute,N=0;N<E.length;N++){const e=re(r,E[N],w?G[N]:void 0,n,v[N],b,_,P,o,C);let t;_&&P?(t=e.topAndBottom,F.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,D,H,r,b)):_?(t=e.topAndBottom,t.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,D,r,!b),F.geometry=t.geometry):P&&(t=e.topAndBottom,t.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(t.geometry.attributes.position.values,H,r,!0),F.geometry=t.geometry),(_||P)&&(F.wall=!1,t.geometry=q(F),L.push(t));const i=e.walls;F.wall=!0;for(let e=0;e<i.length;e++){const t=i[e];F.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(t.geometry,D,H,r,b),t.geometry=q(F),L.push(t)}}else for(N=0;N<E.length;N++){const i=new c.GeometryInstance({geometry:g.PolygonGeometryLibrary.createGeometryFromPositions(r,E[N],w?G[N]:void 0,n,b,o,C)});if(i.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(i.geometry.attributes.position.values,D,r,!b),F.geometry=i.geometry,i.geometry=q(F),e.defined(t._offsetAttribute)){const e=i.geometry.attributes.position.values.length,o=t._offsetAttribute===p.GeometryOffsetAttribute.NONE?0:1,r=new Uint8Array(e/3).fill(o);i.geometry.attributes.applyOffset=new u.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}L.push(i)}const R=y.GeometryPipeline.combineInstances(L)[0];R.attributes.position.values=new Float64Array(R.attributes.position.values),R.indices=d.IndexDatatype.createTypedArray(R.attributes.position.values.length/3,R.indices);const M=R.attributes,S=i.BoundingSphere.fromVertices(M.position.values);return o.position||delete M.position,new u.Geometry({attributes:M,indices:R.indices,primitiveType:R.primitiveType,boundingSphere:S,offsetAttribute:t._offsetAttribute})},ie.createShadowVolume=function(e,t,o){const r=e._granularity,i=e._ellipsoid,n=t(r,i),a=o(r,i);return new ie({polygonHierarchy:e._polygonHierarchy,ellipsoid:i,stRotation:e._stRotation,granularity:r,perPositionHeight:!1,extrudedHeight:n,height:a,vertexFormat:f.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},Object.defineProperties(ie.prototype,{rectangle:{get:function(){if(!e.defined(this._rectangle)){const e=this._polygonHierarchy.positions;this._rectangle=$(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return e.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){const t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];const o=e._ellipsoid,r=e._polygonHierarchy.positions,i=e.rectangle;return u.Geometry._textureCoordinateRotationPoints(r,t,o,i)}(this)),this._textureCoordinateRotationPoints}}}),function(o,r){return e.defined(r)&&(o=ie.unpack(o,r)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),ie.createGeometry(o)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./ArcType-68098157","./BoundingRectangle-272c38cc","./Transforms-221c7c82","./Matrix2-2fdcdec7","./ComponentDatatype-985dcc38","./EllipsoidGeodesic-ec5fd429","./EllipsoidTangentPlane-a9681249","./GeometryAttribute-642addba","./GeometryInstance-8d112c0c","./GeometryOffsetAttribute-06264989","./GeometryPipeline-a349886f","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonGeometryLibrary-9908e46b","./PolygonPipeline-8efb7487","./VertexFormat-20b5279f","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./AttributeCompression-10297289","./EncodedCartesian3-e8922703","./arrayRemoveDuplicates-398390b2","./EllipsoidRhumbLine-2cf9c5ef","./GeometryAttributes-75794475"],(function(t,e,o,r,i,n,a,s,l,c,u,p,y,d,m,g,h,f,b,_,P,C,x,w,T,A,I,v,E){"use strict";const G=new e.Cartographic,O=new e.Cartographic;function L(t,e,o,r){const i=r.cartesianToCartographic(t,G).height,n=r.cartesianToCartographic(e,O);n.height=i,r.cartographicToCartesian(n,e);const a=r.cartesianToCartographic(o,O);a.height=i-100,r.cartographicToCartesian(a,o)}const V=new r.BoundingRectangle,D=new e.Cartesian3,H=new e.Cartesian3,F=new e.Cartesian3,N=new e.Cartesian3,R=new e.Cartesian3,M=new e.Cartesian3;let S=new e.Cartesian3,B=new e.Cartesian3,k=new e.Cartesian3;const z=new n.Cartesian2,W=new n.Cartesian2,Y=new e.Cartesian3,U=new i.Quaternion,j=new e.Matrix3,Q=new e.Matrix3;function q(o){const r=o.vertexFormat,s=o.geometry,l=o.shadowVolume,u=s.attributes.position.values,y=t.defined(s.attributes.st)?s.attributes.st.values:void 0;let d=u.length;const g=o.wall,h=o.top||g,f=o.bottom||g;if(r.st||r.normal||r.tangent||r.bitangent||l){const p=o.boundingRectangle,b=o.tangentPlane,_=o.ellipsoid,P=o.stRotation,C=o.perPositionHeight,x=z;x.x=p.x,x.y=p.y;const w=r.st?new Float32Array(d/3*2):void 0,T=new Float32Array(d/3);let A,I=0;r.normal&&(A=C&&h&&!g?s.attributes.normal.values:new Float32Array(d));const v=r.tangent?new Float32Array(d):void 0,E=r.bitangent?new Float32Array(d):void 0,G=l?new Float32Array(d):void 0;let O=0,V=0,q=H,K=F,Z=N,J=!0,X=j,$=Q;if(0!==P){let t=i.Quaternion.fromAxisAngle(b._plane.normal,P,U);X=e.Matrix3.fromQuaternion(t,X),t=i.Quaternion.fromAxisAngle(b._plane.normal,-P,U),$=e.Matrix3.fromQuaternion(t,$)}else X=e.Matrix3.clone(e.Matrix3.IDENTITY,X),$=e.Matrix3.clone(e.Matrix3.IDENTITY,$);let tt=0,et=0;h&&f&&(tt=d/2,et=d/3,d/=2);for(let i=0;i<d;i+=3){const a=e.Cartesian3.fromArray(u,i,Y);if(r.st&&!t.defined(y)){let t=e.Matrix3.multiplyByVector(X,a,D);t=_.scaleToGeodeticSurface(t,t);const o=b.projectPointOntoPlane(t,W);n.Cartesian2.subtract(o,x,o);const r=m.CesiumMath.clamp(o.x/p.width,0,1),i=m.CesiumMath.clamp(o.y/p.height,0,1);f&&(w[O+et]=r,w[O+1+et]=i),h&&(w[O]=r,w[O+1]=i);const s=e.Cartographic.fromCartesian(a);T[I++]=Math.floor(s.height+1e-5),O+=2}if(r.normal||r.tangent||r.bitangent||l){const t=V+1,n=V+2;if(g){if(i+3<d){const t=e.Cartesian3.fromArray(u,i+3,R);if(J){const o=e.Cartesian3.fromArray(u,i+d,M);C&&L(a,t,o,_),e.Cartesian3.subtract(t,a,t),e.Cartesian3.subtract(o,a,o),q=e.Cartesian3.normalize(e.Cartesian3.cross(o,t,q),q),J=!1}e.Cartesian3.equalsEpsilon(t,a,m.CesiumMath.EPSILON10)&&(J=!0)}(r.tangent||r.bitangent)&&(Z=_.geodeticSurfaceNormal(a,Z),r.tangent&&(K=e.Cartesian3.normalize(e.Cartesian3.cross(Z,q,K),K)))}else q=_.geodeticSurfaceNormal(a,q),(r.tangent||r.bitangent)&&(C&&(S=e.Cartesian3.fromArray(A,V,S),B=e.Cartesian3.cross(e.Cartesian3.UNIT_Z,S,B),B=e.Cartesian3.normalize(e.Matrix3.multiplyByVector($,B,B),B),r.bitangent&&(k=e.Cartesian3.normalize(e.Cartesian3.cross(S,B,k),k))),K=e.Cartesian3.cross(e.Cartesian3.UNIT_Z,q,K),K=e.Cartesian3.normalize(e.Matrix3.multiplyByVector($,K,K),K),r.bitangent&&(Z=e.Cartesian3.normalize(e.Cartesian3.cross(q,K,Z),Z)));r.normal&&(o.wall?(A[V+tt]=q.x,A[t+tt]=q.y,A[n+tt]=q.z):f&&(A[V+tt]=-q.x,A[t+tt]=-q.y,A[n+tt]=-q.z),(h&&!C||g)&&(A[V]=q.x,A[t]=q.y,A[n]=q.z)),l&&(g&&(q=_.geodeticSurfaceNormal(a,q)),G[V+tt]=-q.x,G[t+tt]=-q.y,G[n+tt]=-q.z),r.tangent&&(o.wall?(v[V+tt]=K.x,v[t+tt]=K.y,v[n+tt]=K.z):f&&(v[V+tt]=-K.x,v[t+tt]=-K.y,v[n+tt]=-K.z),h&&(C?(v[V]=B.x,v[t]=B.y,v[n]=B.z):(v[V]=K.x,v[t]=K.y,v[n]=K.z))),r.bitangent&&(f&&(E[V+tt]=Z.x,E[t+tt]=Z.y,E[n+tt]=Z.z),h&&(C?(E[V]=k.x,E[t]=k.y,E[n]=k.z):(E[V]=Z.x,E[t]=Z.y,E[n]=Z.z))),V+=3}}r.st&&!t.defined(y)&&(s.attributes.st=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:w}),s.attributes.height=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:1,values:T})),r.normal&&(s.attributes.normal=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r.tangent&&(s.attributes.tangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:v})),r.bitangent&&(s.attributes.bitangent=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:E})),l&&(s.attributes.extrudeDirection=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G}))}if(o.extrude&&t.defined(o.offsetAttribute)){const t=u.length/3;let e=new Uint8Array(t);if(o.offsetAttribute===p.GeometryOffsetAttribute.TOP)h&&f||g?e=e.fill(1,0,t/2):h&&(e=e.fill(1));else{const t=o.offsetAttribute===p.GeometryOffsetAttribute.NONE?0:1;e=e.fill(t)}s.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}return s}const K=new e.Cartographic,Z=new e.Cartographic,J={westOverIDL:0,eastOverIDL:0};let X=new s.EllipsoidGeodesic;function $(e,r,i,a,l){if(l=t.defaultValue(l,new n.Rectangle),!t.defined(e)||e.length<3)return l.west=0,l.north=0,l.south=0,l.east=0,l;if(i===o.ArcType.RHUMB)return n.Rectangle.fromCartesianArray(e,r,l);X.ellipsoid.equals(r)||(X=new s.EllipsoidGeodesic(void 0,void 0,r)),l.west=Number.POSITIVE_INFINITY,l.east=Number.NEGATIVE_INFINITY,l.south=Number.POSITIVE_INFINITY,l.north=Number.NEGATIVE_INFINITY,J.westOverIDL=Number.POSITIVE_INFINITY,J.eastOverIDL=Number.NEGATIVE_INFINITY;const c=1/m.CesiumMath.chordLength(a,r.maximumRadius),u=e.length;let p,y=r.cartesianToCartographic(e[0],Z),d=K;for(let t=1;t<u;t++)p=d,d=y,y=r.cartesianToCartographic(e[t],p),X.setEndPoints(d,y),et(X,c,l,J);return p=d,d=y,y=r.cartesianToCartographic(e[0],p),X.setEndPoints(d,y),et(X,c,l,J),l.east-l.west>J.eastOverIDL-J.westOverIDL&&(l.west=J.westOverIDL,l.east=J.eastOverIDL,l.east>m.CesiumMath.PI&&(l.east=l.east-m.CesiumMath.TWO_PI),l.west>m.CesiumMath.PI&&(l.west=l.west-m.CesiumMath.TWO_PI)),l}const tt=new e.Cartographic;function et(t,e,o,r){const i=t.surfaceDistance,n=Math.ceil(i*e),a=n>0?i/(n-1):Number.POSITIVE_INFINITY;let s=0;for(let e=0;e<n;e++){const e=t.interpolateUsingSurfaceDistance(s,tt);s+=a;const i=e.longitude,n=e.latitude;o.west=Math.min(o.west,i),o.east=Math.max(o.east,i),o.south=Math.min(o.south,n),o.north=Math.max(o.north,n);const l=i>=0?i:i+m.CesiumMath.TWO_PI;r.westOverIDL=Math.min(r.westOverIDL,l),r.eastOverIDL=Math.max(r.eastOverIDL,l)}}const ot=[];function rt(e,o,r,i,n,a,s,c,p,y){const m={walls:[]};let f;if(s||c){const n=g.PolygonGeometryLibrary.createGeometryFromPositions(e,o,r,i,a,p,y),l=n.attributes.position.values,h=n.indices;let b,_;if(s&&c){const e=l.concat(l);b=e.length/3,_=d.IndexDatatype.createTypedArray(b,2*h.length),_.set(h);const o=h.length,i=b/2;for(f=0;f<o;f+=3){const t=_[f]+i,e=_[f+1]+i,r=_[f+2]+i;_[f+o]=r,_[f+1+o]=e,_[f+2+o]=t}if(n.attributes.position.values=e,a&&p.normal){const t=n.attributes.normal.values;n.attributes.normal.values=new Float32Array(e.length),n.attributes.normal.values.set(t)}if(p.st&&t.defined(r)){const t=n.attributes.st.values;n.attributes.st.values=new Float32Array(2*b),n.attributes.st.values=t.concat(t)}n.indices=_}else if(c){for(b=l.length/3,_=d.IndexDatatype.createTypedArray(b,h.length),f=0;f<h.length;f+=3)_[f]=h[f+2],_[f+1]=h[f+1],_[f+2]=h[f];n.indices=_}m.topAndBottom=new u.GeometryInstance({geometry:n})}let b=n.outerRing,_=l.EllipsoidTangentPlane.fromPoints(b,e),P=_.projectPointsOntoPlane(b,ot),C=h.PolygonPipeline.computeWindingOrder2D(P);C===h.WindingOrder.CLOCKWISE&&(b=b.slice().reverse());let x=g.PolygonGeometryLibrary.computeWallGeometry(b,r,e,i,a,y);m.walls.push(new u.GeometryInstance({geometry:x}));const w=n.holes;for(f=0;f<w.length;f++){let t=w[f];_=l.EllipsoidTangentPlane.fromPoints(t,e),P=_.projectPointsOntoPlane(t,ot),C=h.PolygonPipeline.computeWindingOrder2D(P),C===h.WindingOrder.COUNTER_CLOCKWISE&&(t=t.slice().reverse()),x=g.PolygonGeometryLibrary.computeWallGeometry(t,r,e,i,a,y),m.walls.push(new u.GeometryInstance({geometry:x}))}return m}function it(r){const i=r.polygonHierarchy,a=t.defaultValue(r.vertexFormat,f.VertexFormat.DEFAULT),s=t.defaultValue(r.ellipsoid,e.Ellipsoid.WGS84),l=t.defaultValue(r.granularity,m.CesiumMath.RADIANS_PER_DEGREE),c=t.defaultValue(r.stRotation,0),u=r.textureCoordinates,p=t.defaultValue(r.perPositionHeight,!1),y=p&&t.defined(r.extrudedHeight);let d=t.defaultValue(r.height,0),h=t.defaultValue(r.extrudedHeight,d);if(!y){const t=Math.max(d,h);h=Math.min(d,h),d=t}this._vertexFormat=f.VertexFormat.clone(a),this._ellipsoid=e.Ellipsoid.clone(s),this._granularity=l,this._stRotation=c,this._height=d,this._extrudedHeight=h,this._closeTop=t.defaultValue(r.closeTop,!0),this._closeBottom=t.defaultValue(r.closeBottom,!0),this._polygonHierarchy=i,this._perPositionHeight=p,this._perPositionHeightExtrude=y,this._shadowVolume=t.defaultValue(r.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=r.offsetAttribute,this._arcType=t.defaultValue(r.arcType,o.ArcType.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=u,this.packedLength=g.PolygonGeometryLibrary.computeHierarchyPackedLength(i,e.Cartesian3)+e.Ellipsoid.packedLength+f.VertexFormat.packedLength+(u?g.PolygonGeometryLibrary.computeHierarchyPackedLength(u,n.Cartesian2):1)+12}it.fromPositions=function(e){return new it({polygonHierarchy:{positions:(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates})},it.pack=function(o,r,i){return i=t.defaultValue(i,0),i=g.PolygonGeometryLibrary.packPolygonHierarchy(o._polygonHierarchy,r,i,e.Cartesian3),e.Ellipsoid.pack(o._ellipsoid,r,i),i+=e.Ellipsoid.packedLength,f.VertexFormat.pack(o._vertexFormat,r,i),i+=f.VertexFormat.packedLength,r[i++]=o._height,r[i++]=o._extrudedHeight,r[i++]=o._granularity,r[i++]=o._stRotation,r[i++]=o._perPositionHeightExtrude?1:0,r[i++]=o._perPositionHeight?1:0,r[i++]=o._closeTop?1:0,r[i++]=o._closeBottom?1:0,r[i++]=o._shadowVolume?1:0,r[i++]=t.defaultValue(o._offsetAttribute,-1),r[i++]=o._arcType,t.defined(o._textureCoordinates)?i=g.PolygonGeometryLibrary.packPolygonHierarchy(o._textureCoordinates,r,i,n.Cartesian2):r[i++]=-1,r[i++]=o.packedLength,r};const nt=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),at=new f.VertexFormat,st={polygonHierarchy:{}};return it.unpack=function(o,r,i){r=t.defaultValue(r,0);const a=g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,e.Cartesian3);r=a.startingIndex,delete a.startingIndex;const s=e.Ellipsoid.unpack(o,r,nt);r+=e.Ellipsoid.packedLength;const l=f.VertexFormat.unpack(o,r,at);r+=f.VertexFormat.packedLength;const c=o[r++],u=o[r++],p=o[r++],y=o[r++],d=1===o[r++],m=1===o[r++],h=1===o[r++],b=1===o[r++],_=1===o[r++],P=o[r++],C=o[r++],x=-1===o[r]?void 0:g.PolygonGeometryLibrary.unpackPolygonHierarchy(o,r,n.Cartesian2);t.defined(x)?(r=x.startingIndex,delete x.startingIndex):r++;const w=o[r++];return t.defined(i)||(i=new it(st)),i._polygonHierarchy=a,i._ellipsoid=e.Ellipsoid.clone(s,i._ellipsoid),i._vertexFormat=f.VertexFormat.clone(l,i._vertexFormat),i._height=c,i._extrudedHeight=u,i._granularity=p,i._stRotation=y,i._perPositionHeightExtrude=d,i._perPositionHeight=m,i._closeTop=h,i._closeBottom=b,i._shadowVolume=_,i._offsetAttribute=-1===P?void 0:P,i._arcType=C,i._textureCoordinates=x,i.packedLength=w,i},it.computeRectangle=function(r,i){const n=t.defaultValue(r.granularity,m.CesiumMath.RADIANS_PER_DEGREE),a=t.defaultValue(r.arcType,o.ArcType.GEODESIC),s=r.polygonHierarchy,l=t.defaultValue(r.ellipsoid,e.Ellipsoid.WGS84);return $(s.positions,l,a,n,i)},it.createGeometry=function(e){const o=e._vertexFormat,r=e._ellipsoid,n=e._granularity,s=e._stRotation,f=e._polygonHierarchy,b=e._perPositionHeight,_=e._closeTop,P=e._closeBottom,C=e._arcType,x=e._textureCoordinates,w=t.defined(x);let T=f.positions;if(T.length<3)return;const A=l.EllipsoidTangentPlane.fromPoints(T,r),I=g.PolygonGeometryLibrary.polygonsFromHierarchy(f,w,A.projectPointsOntoPlane.bind(A),!b,r),v=I.hierarchy,E=I.polygons,G=w?g.PolygonGeometryLibrary.polygonsFromHierarchy(x,!0,(function(t){return t}),!1).polygons:void 0;if(0===v.length)return;T=v[0].outerRing;const O=g.PolygonGeometryLibrary.computeBoundingRectangle(A.plane.normal,A.projectPointOntoPlane.bind(A),T,s,V),L=[],D=e._height,H=e._extrudedHeight,F={perPositionHeight:b,vertexFormat:o,geometry:void 0,tangentPlane:A,boundingRectangle:O,ellipsoid:r,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:C};let N;if(e._perPositionHeightExtrude||!m.CesiumMath.equalsEpsilon(D,H,0,m.CesiumMath.EPSILON2))for(F.extrude=!0,F.top=_,F.bottom=P,F.shadowVolume=e._shadowVolume,F.offsetAttribute=e._offsetAttribute,N=0;N<E.length;N++){const t=rt(r,E[N],w?G[N]:void 0,n,v[N],b,_,P,o,C);let e;_&&P?(e=t.topAndBottom,F.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(e.geometry,D,H,r,b)):_?(e=t.topAndBottom,e.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(e.geometry.attributes.position.values,D,r,!b),F.geometry=e.geometry):P&&(e=t.topAndBottom,e.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(e.geometry.attributes.position.values,H,r,!0),F.geometry=e.geometry),(_||P)&&(F.wall=!1,e.geometry=q(F),L.push(e));const i=t.walls;F.wall=!0;for(let t=0;t<i.length;t++){const e=i[t];F.geometry=g.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(e.geometry,D,H,r,b),e.geometry=q(F),L.push(e)}}else for(N=0;N<E.length;N++){const i=new u.GeometryInstance({geometry:g.PolygonGeometryLibrary.createGeometryFromPositions(r,E[N],w?G[N]:void 0,n,b,o,C)});if(i.geometry.attributes.position.values=h.PolygonPipeline.scaleToGeodeticHeight(i.geometry.attributes.position.values,D,r,!b),F.geometry=i.geometry,i.geometry=q(F),t.defined(e._offsetAttribute)){const t=i.geometry.attributes.position.values.length,o=e._offsetAttribute===p.GeometryOffsetAttribute.NONE?0:1,r=new Uint8Array(t/3).fill(o);i.geometry.attributes.applyOffset=new c.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}L.push(i)}const R=y.GeometryPipeline.combineInstances(L)[0];R.attributes.position.values=new Float64Array(R.attributes.position.values),R.indices=d.IndexDatatype.createTypedArray(R.attributes.position.values.length/3,R.indices);const M=R.attributes,S=i.BoundingSphere.fromVertices(M.position.values);return o.position||delete M.position,new c.Geometry({attributes:M,indices:R.indices,primitiveType:R.primitiveType,boundingSphere:S,offsetAttribute:e._offsetAttribute})},it.createShadowVolume=function(t,e,o){const r=t._granularity,i=t._ellipsoid,n=e(r,i),a=o(r,i);return new it({polygonHierarchy:t._polygonHierarchy,ellipsoid:i,stRotation:t._stRotation,granularity:r,perPositionHeight:!1,extrudedHeight:n,height:a,vertexFormat:f.VertexFormat.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})},Object.defineProperties(it.prototype,{rectangle:{get:function(){if(!t.defined(this._rectangle)){const t=this._polygonHierarchy.positions;this._rectangle=$(t,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){const e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];const o=t._ellipsoid,r=t._polygonHierarchy.positions,i=t.rectangle;return c.Geometry._textureCoordinateRotationPoints(r,e,o,i)}(this)),this._textureCoordinateRotationPoints}}}),function(o,r){return t.defined(r)&&(o=it.unpack(o,r)),o._ellipsoid=e.Ellipsoid.clone(o._ellipsoid),it.createGeometry(o)}}));
public/CIMSDK/Workers/createPolygonOutlineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./ArcType-68098157","./Transforms-f3654378","./ComponentDatatype-985dcc38","./EllipsoidTangentPlane-2129690e","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryInstance-54a3e3b6","./GeometryOffsetAttribute-06264989","./GeometryPipeline-3f4d7db4","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonGeometryLibrary-e0e45e51","./PolygonPipeline-47fb81c6","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f","./arrayRemoveDuplicates-398390b2","./EllipsoidRhumbLine-b175af48"],(function(e,t,i,o,r,n,a,s,l,y,u,p,d,c,f,g,m,h,b,P,E,A,_,G,L,T){"use strict";const H=[],v=[];function C(e,t,o,y,u){const d=n.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(d)===f.WindingOrder.CLOCKWISE&&(d.reverse(),t=t.slice().reverse());let h=t.length,b=0;if(y)for(g=new Float64Array(2*h*3),m=0;m<h;m++){const e=t[m],i=t[(m+1)%h];g[b++]=e.x,g[b++]=e.y,g[b++]=e.z,g[b++]=i.x,g[b++]=i.y,g[b++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r),m=0;m<h;m++){let r;u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,v):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,v));const n=r.length;for(let e=0;e<n;++e)g[b++]=r[e]}}h=g.length/3;const P=2*h,E=p.IndexDatatype.createTypedArray(h,P);for(b=0,m=0;m<h-1;m++)E[b++]=m,E[b++]=m+1;return E[b++]=h-1,E[b++]=0,new l.GeometryInstance({geometry:new a.Geometry({attributes:new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:E,primitiveType:a.PrimitiveType.LINES})})}function x(e,t,o,y,u){const d=n.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(d)===f.WindingOrder.CLOCKWISE&&(d.reverse(),t=t.slice().reverse());let h=t.length;const b=new Array(h);let P=0;if(y)for(g=new Float64Array(2*h*3*2),m=0;m<h;++m){b[m]=P/3;const e=t[m],i=t[(m+1)%h];g[P++]=e.x,g[P++]=e.y,g[P++]=e.z,g[P++]=i.x,g[P++]=i.y,g[P++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=c.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r*2),m=0;m<h;++m){let r;b[m]=P/3,u===i.ArcType.GEODESIC?r=c.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,v):u===i.ArcType.RHUMB&&(r=c.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,v));const n=r.length;for(let e=0;e<n;++e)g[P++]=r[e]}}h=g.length/6;const E=b.length,A=2*(2*h+E),_=p.IndexDatatype.createTypedArray(h+E,A);for(P=0,m=0;m<h;++m)_[P++]=m,_[P++]=(m+1)%h,_[P++]=m+h,_[P++]=(m+1)%h+h;for(m=0;m<E;m++){const e=b[m];_[P++]=e,_[P++]=e+h}return new l.GeometryInstance({geometry:new a.Geometry({attributes:new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:_,primitiveType:a.PrimitiveType.LINES})})}function O(o){const r=o.polygonHierarchy,n=e.defaultValue(o.ellipsoid,t.Ellipsoid.WGS84),a=e.defaultValue(o.granularity,d.CesiumMath.RADIANS_PER_DEGREE),s=e.defaultValue(o.perPositionHeight,!1),l=s&&e.defined(o.extrudedHeight),y=e.defaultValue(o.arcType,i.ArcType.GEODESIC);let u=e.defaultValue(o.height,0),p=e.defaultValue(o.extrudedHeight,u);if(!l){const e=Math.max(u,p);p=Math.min(u,p),u=e}this._ellipsoid=t.Ellipsoid.clone(n),this._granularity=a,this._height=u,this._extrudedHeight=p,this._arcType=y,this._polygonHierarchy=r,this._perPositionHeight=s,this._perPositionHeightExtrude=l,this._offsetAttribute=o.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=c.PolygonGeometryLibrary.computeHierarchyPackedLength(r,t.Cartesian3)+t.Ellipsoid.packedLength+8}O.pack=function(i,o,r){return r=e.defaultValue(r,0),r=c.PolygonGeometryLibrary.packPolygonHierarchy(i._polygonHierarchy,o,r,t.Cartesian3),t.Ellipsoid.pack(i._ellipsoid,o,r),r+=t.Ellipsoid.packedLength,o[r++]=i._height,o[r++]=i._extrudedHeight,o[r++]=i._granularity,o[r++]=i._perPositionHeightExtrude?1:0,o[r++]=i._perPositionHeight?1:0,o[r++]=i._arcType,o[r++]=e.defaultValue(i._offsetAttribute,-1),o[r]=i.packedLength,o};const D=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),I={polygonHierarchy:{}};return O.unpack=function(i,o,r){o=e.defaultValue(o,0);const n=c.PolygonGeometryLibrary.unpackPolygonHierarchy(i,o,t.Cartesian3);o=n.startingIndex,delete n.startingIndex;const a=t.Ellipsoid.unpack(i,o,D);o+=t.Ellipsoid.packedLength;const s=i[o++],l=i[o++],y=i[o++],u=1===i[o++],p=1===i[o++],d=i[o++],f=i[o++],g=i[o];return e.defined(r)||(r=new O(I)),r._polygonHierarchy=n,r._ellipsoid=t.Ellipsoid.clone(a,r._ellipsoid),r._height=s,r._extrudedHeight=l,r._granularity=y,r._perPositionHeight=p,r._perPositionHeightExtrude=u,r._arcType=d,r._offsetAttribute=-1===f?void 0:f,r.packedLength=g,r},O.fromPositions=function(t){return new O({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,arcType:t.arcType,offsetAttribute:t.offsetAttribute})},O.createGeometry=function(t){const i=t._ellipsoid,n=t._granularity,s=t._polygonHierarchy,l=t._perPositionHeight,p=t._arcType,g=c.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(s,!l,i);if(0===g.length)return;let m;const h=[],b=d.CesiumMath.chordLength(n,i.maximumRadius),P=t._height,E=t._extrudedHeight;let A,_;if(t._perPositionHeightExtrude||!d.CesiumMath.equalsEpsilon(P,E,0,d.CesiumMath.EPSILON2))for(_=0;_<g.length;_++){if(m=x(i,g[_],b,l,p),m.geometry=c.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(m.geometry,P,E,i,l),e.defined(t._offsetAttribute)){const e=m.geometry.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===y.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(A=t._offsetAttribute===y.GeometryOffsetAttribute.NONE?0:1,i=i.fill(A)),m.geometry.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}h.push(m)}else for(_=0;_<g.length;_++){if(m=C(i,g[_],b,l,p),m.geometry.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(m.geometry.attributes.position.values,P,i,!l),e.defined(t._offsetAttribute)){const e=m.geometry.attributes.position.values.length;A=t._offsetAttribute===y.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(A);m.geometry.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}h.push(m)}const G=u.GeometryPipeline.combineInstances(h)[0],L=o.BoundingSphere.fromVertices(G.attributes.position.values);return new a.Geometry({attributes:G.attributes,indices:G.indices,primitiveType:G.primitiveType,boundingSphere:L,offsetAttribute:t._offsetAttribute})},function(i,o){return e.defined(o)&&(i=O.unpack(i,o)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),O.createGeometry(i)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./ArcType-68098157","./Transforms-221c7c82","./ComponentDatatype-985dcc38","./EllipsoidTangentPlane-a9681249","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryInstance-8d112c0c","./GeometryOffsetAttribute-06264989","./GeometryPipeline-a349886f","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonGeometryLibrary-9908e46b","./PolygonPipeline-8efb7487","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./AttributeCompression-10297289","./EncodedCartesian3-e8922703","./arrayRemoveDuplicates-398390b2","./EllipsoidRhumbLine-2cf9c5ef"],(function(e,t,i,o,r,n,a,s,l,y,u,p,c,d,f,g,m,h,b,P,E,A,_,G,L,T){"use strict";const H=[],v=[];function C(e,t,o,y,u){const c=n.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(c)===f.WindingOrder.CLOCKWISE&&(c.reverse(),t=t.slice().reverse());let h=t.length,b=0;if(y)for(g=new Float64Array(2*h*3),m=0;m<h;m++){const e=t[m],i=t[(m+1)%h];g[b++]=e.x,g[b++]=e.y,g[b++]=e.z,g[b++]=i.x,g[b++]=i.y,g[b++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=d.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=d.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r),m=0;m<h;m++){let r;u===i.ArcType.GEODESIC?r=d.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,v):u===i.ArcType.RHUMB&&(r=d.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,v));const n=r.length;for(let e=0;e<n;++e)g[b++]=r[e]}}h=g.length/3;const P=2*h,E=p.IndexDatatype.createTypedArray(h,P);for(b=0,m=0;m<h-1;m++)E[b++]=m,E[b++]=m+1;return E[b++]=h-1,E[b++]=0,new l.GeometryInstance({geometry:new a.Geometry({attributes:new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:E,primitiveType:a.PrimitiveType.LINES})})}function x(e,t,o,y,u){const c=n.EllipsoidTangentPlane.fromPoints(t,e).projectPointsOntoPlane(t,H);let g,m;f.PolygonPipeline.computeWindingOrder2D(c)===f.WindingOrder.CLOCKWISE&&(c.reverse(),t=t.slice().reverse());let h=t.length;const b=new Array(h);let P=0;if(y)for(g=new Float64Array(2*h*3*2),m=0;m<h;++m){b[m]=P/3;const e=t[m],i=t[(m+1)%h];g[P++]=e.x,g[P++]=e.y,g[P++]=e.z,g[P++]=i.x,g[P++]=i.y,g[P++]=i.z}else{let r=0;if(u===i.ArcType.GEODESIC)for(m=0;m<h;m++)r+=d.PolygonGeometryLibrary.subdivideLineCount(t[m],t[(m+1)%h],o);else if(u===i.ArcType.RHUMB)for(m=0;m<h;m++)r+=d.PolygonGeometryLibrary.subdivideRhumbLineCount(e,t[m],t[(m+1)%h],o);for(g=new Float64Array(3*r*2),m=0;m<h;++m){let r;b[m]=P/3,u===i.ArcType.GEODESIC?r=d.PolygonGeometryLibrary.subdivideLine(t[m],t[(m+1)%h],o,v):u===i.ArcType.RHUMB&&(r=d.PolygonGeometryLibrary.subdivideRhumbLine(e,t[m],t[(m+1)%h],o,v));const n=r.length;for(let e=0;e<n;++e)g[P++]=r[e]}}h=g.length/6;const E=b.length,A=2*(2*h+E),_=p.IndexDatatype.createTypedArray(h+E,A);for(P=0,m=0;m<h;++m)_[P++]=m,_[P++]=(m+1)%h,_[P++]=m+h,_[P++]=(m+1)%h+h;for(m=0;m<E;m++){const e=b[m];_[P++]=e,_[P++]=e+h}return new l.GeometryInstance({geometry:new a.Geometry({attributes:new s.GeometryAttributes({position:new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:g})}),indices:_,primitiveType:a.PrimitiveType.LINES})})}function O(o){const r=o.polygonHierarchy,n=e.defaultValue(o.ellipsoid,t.Ellipsoid.WGS84),a=e.defaultValue(o.granularity,c.CesiumMath.RADIANS_PER_DEGREE),s=e.defaultValue(o.perPositionHeight,!1),l=s&&e.defined(o.extrudedHeight),y=e.defaultValue(o.arcType,i.ArcType.GEODESIC);let u=e.defaultValue(o.height,0),p=e.defaultValue(o.extrudedHeight,u);if(!l){const e=Math.max(u,p);p=Math.min(u,p),u=e}this._ellipsoid=t.Ellipsoid.clone(n),this._granularity=a,this._height=u,this._extrudedHeight=p,this._arcType=y,this._polygonHierarchy=r,this._perPositionHeight=s,this._perPositionHeightExtrude=l,this._offsetAttribute=o.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=d.PolygonGeometryLibrary.computeHierarchyPackedLength(r,t.Cartesian3)+t.Ellipsoid.packedLength+8}O.pack=function(i,o,r){return r=e.defaultValue(r,0),r=d.PolygonGeometryLibrary.packPolygonHierarchy(i._polygonHierarchy,o,r,t.Cartesian3),t.Ellipsoid.pack(i._ellipsoid,o,r),r+=t.Ellipsoid.packedLength,o[r++]=i._height,o[r++]=i._extrudedHeight,o[r++]=i._granularity,o[r++]=i._perPositionHeightExtrude?1:0,o[r++]=i._perPositionHeight?1:0,o[r++]=i._arcType,o[r++]=e.defaultValue(i._offsetAttribute,-1),o[r]=i.packedLength,o};const D=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),I={polygonHierarchy:{}};return O.unpack=function(i,o,r){o=e.defaultValue(o,0);const n=d.PolygonGeometryLibrary.unpackPolygonHierarchy(i,o,t.Cartesian3);o=n.startingIndex,delete n.startingIndex;const a=t.Ellipsoid.unpack(i,o,D);o+=t.Ellipsoid.packedLength;const s=i[o++],l=i[o++],y=i[o++],u=1===i[o++],p=1===i[o++],c=i[o++],f=i[o++],g=i[o];return e.defined(r)||(r=new O(I)),r._polygonHierarchy=n,r._ellipsoid=t.Ellipsoid.clone(a,r._ellipsoid),r._height=s,r._extrudedHeight=l,r._granularity=y,r._perPositionHeight=p,r._perPositionHeightExtrude=u,r._arcType=c,r._offsetAttribute=-1===f?void 0:f,r.packedLength=g,r},O.fromPositions=function(t){return new O({polygonHierarchy:{positions:(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions},height:t.height,extrudedHeight:t.extrudedHeight,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,arcType:t.arcType,offsetAttribute:t.offsetAttribute})},O.createGeometry=function(t){const i=t._ellipsoid,n=t._granularity,s=t._polygonHierarchy,l=t._perPositionHeight,p=t._arcType,g=d.PolygonGeometryLibrary.polygonOutlinesFromHierarchy(s,!l,i);if(0===g.length)return;let m;const h=[],b=c.CesiumMath.chordLength(n,i.maximumRadius),P=t._height,E=t._extrudedHeight;let A,_;if(t._perPositionHeightExtrude||!c.CesiumMath.equalsEpsilon(P,E,0,c.CesiumMath.EPSILON2))for(_=0;_<g.length;_++){if(m=x(i,g[_],b,l,p),m.geometry=d.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(m.geometry,P,E,i,l),e.defined(t._offsetAttribute)){const e=m.geometry.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===y.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(A=t._offsetAttribute===y.GeometryOffsetAttribute.NONE?0:1,i=i.fill(A)),m.geometry.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}h.push(m)}else for(_=0;_<g.length;_++){if(m=C(i,g[_],b,l,p),m.geometry.attributes.position.values=f.PolygonPipeline.scaleToGeodeticHeight(m.geometry.attributes.position.values,P,i,!l),e.defined(t._offsetAttribute)){const e=m.geometry.attributes.position.values.length;A=t._offsetAttribute===y.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(A);m.geometry.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}h.push(m)}const G=u.GeometryPipeline.combineInstances(h)[0],L=o.BoundingSphere.fromVertices(G.attributes.position.values);return new a.Geometry({attributes:G.attributes,indices:G.indices,primitiveType:G.primitiveType,boundingSphere:L,offsetAttribute:t._offsetAttribute})},function(i,o){return e.defined(o)&&(i=O.unpack(i,o)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),O.createGeometry(i)}}));
public/CIMSDK/Workers/createPolylineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./ArcType-68098157","./arrayRemoveDuplicates-398390b2","./Transforms-f3654378","./Color-fc2285fc","./ComponentDatatype-985dcc38","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolylinePipeline-70a831f8","./VertexFormat-20b5279f","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./EllipsoidGeodesic-3e762525","./EllipsoidRhumbLine-b175af48","./IntersectionTests-63574cfd","./Plane-4befcca0"],(function(e,t,o,r,n,a,i,l,s,c,p,d,u,y,m,f,h,C,g,_,A){"use strict";const E=[];function P(e,t,o,r,n){const i=E;let l;i.length=n;const s=o.red,c=o.green,p=o.blue,d=o.alpha,u=r.red,y=r.green,m=r.blue,f=r.alpha;if(a.Color.equals(o,r)){for(l=0;l<n;l++)i[l]=a.Color.clone(o);return i}const h=(u-s)/n,C=(y-c)/n,g=(m-p)/n,_=(f-d)/n;for(l=0;l<n;l++)i[l]=new a.Color(s+l*h,c+l*C,p+l*g,d+l*_);return i}function b(r){const n=(r=e.defaultValue(r,e.defaultValue.EMPTY_OBJECT)).positions,i=r.colors,l=e.defaultValue(r.width,1),s=e.defaultValue(r.colorsPerVertex,!1);this._positions=n,this._colors=i,this._width=l,this._colorsPerVertex=s,this._vertexFormat=u.VertexFormat.clone(e.defaultValue(r.vertexFormat,u.VertexFormat.DEFAULT)),this._arcType=e.defaultValue(r.arcType,o.ArcType.GEODESIC),this._granularity=e.defaultValue(r.granularity,p.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84)),this._workerName="createPolylineGeometry";let c=1+n.length*t.Cartesian3.packedLength;c+=e.defined(i)?1+i.length*a.Color.packedLength:1,this.packedLength=c+t.Ellipsoid.packedLength+u.VertexFormat.packedLength+4}b.pack=function(o,r,n){let i;n=e.defaultValue(n,0);const l=o._positions;let s=l.length;for(r[n++]=s,i=0;i<s;++i,n+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[i],r,n);const c=o._colors;for(s=e.defined(c)?c.length:0,r[n++]=s,i=0;i<s;++i,n+=a.Color.packedLength)a.Color.pack(c[i],r,n);return t.Ellipsoid.pack(o._ellipsoid,r,n),n+=t.Ellipsoid.packedLength,u.VertexFormat.pack(o._vertexFormat,r,n),n+=u.VertexFormat.packedLength,r[n++]=o._width,r[n++]=o._colorsPerVertex?1:0,r[n++]=o._arcType,r[n]=o._granularity,r};const x=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),w=new u.VertexFormat,T={positions:void 0,colors:void 0,ellipsoid:x,vertexFormat:w,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};b.unpack=function(o,r,n){let i;r=e.defaultValue(r,0);let l=o[r++];const s=new Array(l);for(i=0;i<l;++i,r+=t.Cartesian3.packedLength)s[i]=t.Cartesian3.unpack(o,r);l=o[r++];const c=l>0?new Array(l):void 0;for(i=0;i<l;++i,r+=a.Color.packedLength)c[i]=a.Color.unpack(o,r);const p=t.Ellipsoid.unpack(o,r,x);r+=t.Ellipsoid.packedLength;const d=u.VertexFormat.unpack(o,r,w);r+=u.VertexFormat.packedLength;const y=o[r++],m=1===o[r++],f=o[r++],h=o[r];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=t.Ellipsoid.clone(p,n._ellipsoid),n._vertexFormat=u.VertexFormat.clone(d,n._vertexFormat),n._width=y,n._colorsPerVertex=m,n._arcType=f,n._granularity=h,n):(T.positions=s,T.colors=c,T.width=y,T.colorsPerVertex=m,T.arcType=f,T.granularity=h,new b(T))};const D=new t.Cartesian3,k=new t.Cartesian3,V=new t.Cartesian3,v=new t.Cartesian3;return b.createGeometry=function(u){const y=u._width,m=u._vertexFormat;let f=u._colors;const h=u._colorsPerVertex,C=u._arcType,g=u._granularity,_=u._ellipsoid;let A,b,x;const w=[];let T=r.arrayRemoveDuplicates(u._positions,t.Cartesian3.equalsEpsilon,!1,w);if(e.defined(f)&&w.length>0){let e=0,t=w[0];f=f.filter((function(o,r){let n=!1;return n=h?r===t||0===r&&1===t:r+1===t,!n||(e++,t=w[e],!1)}))}let L=T.length;if(L<2||y<=0)return;if(C===o.ArcType.GEODESIC||C===o.ArcType.RHUMB){let t,r;C===o.ArcType.GEODESIC?(t=p.CesiumMath.chordLength(g,_.maximumRadius),r=d.PolylinePipeline.numberOfPoints):(t=g,r=d.PolylinePipeline.numberOfPointsRhumbLine);const n=d.PolylinePipeline.extractHeights(T,_);if(e.defined(f)){let e=1;for(A=0;A<L-1;++A)e+=r(T[A],T[A+1],t);const o=new Array(e);let n=0;for(A=0;A<L-1;++A){const i=T[A],l=T[A+1],s=f[A],c=r(i,l,t);if(h&&A<e){const e=P(0,0,s,f[A+1],c),t=e.length;for(b=0;b<t;++b)o[n++]=e[b]}else for(b=0;b<c;++b)o[n++]=a.Color.clone(s)}o[n]=a.Color.clone(f[f.length-1]),f=o,E.length=0}T=C===o.ArcType.GEODESIC?d.PolylinePipeline.generateCartesianArc({positions:T,minDistance:t,ellipsoid:_,height:n}):d.PolylinePipeline.generateCartesianRhumbArc({positions:T,granularity:t,ellipsoid:_,height:n})}L=T.length;const F=4*L-4,G=new Float64Array(3*F),O=new Float64Array(3*F),R=new Float64Array(3*F),I=new Float32Array(2*F),S=m.st?new Float32Array(2*F):void 0,B=e.defined(f)?new Uint8Array(4*F):void 0;let M,U=0,N=0,H=0,W=0;for(b=0;b<L;++b){let o,r;0===b?(M=D,t.Cartesian3.subtract(T[0],T[1],M),t.Cartesian3.add(T[0],M,M)):M=T[b-1],t.Cartesian3.clone(M,V),t.Cartesian3.clone(T[b],k),b===L-1?(M=D,t.Cartesian3.subtract(T[L-1],T[L-2],M),t.Cartesian3.add(T[L-1],M,M)):M=T[b+1],t.Cartesian3.clone(M,v),e.defined(B)&&(o=0===b||h?f[b]:f[b-1],b!==L-1&&(r=f[b]));const n=b===L-1?2:4;for(x=0===b?2:0;x<n;++x){t.Cartesian3.pack(k,G,U),t.Cartesian3.pack(V,O,U),t.Cartesian3.pack(v,R,U),U+=3;const n=x-2<0?-1:1;if(I[N++]=x%2*2-1,I[N++]=n*y,m.st&&(S[H++]=b/(L-1),S[H++]=Math.max(I[N-2],0)),e.defined(B)){const e=x<2?o:r;B[W++]=a.Color.floatToByte(e.red),B[W++]=a.Color.floatToByte(e.green),B[W++]=a.Color.floatToByte(e.blue),B[W++]=a.Color.floatToByte(e.alpha)}}}const Y=new s.GeometryAttributes;Y.position=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:G}),Y.prevPosition=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:O}),Y.nextPosition=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:R}),Y.expandAndWidth=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:I}),m.st&&(Y.st=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:S})),e.defined(B)&&(Y.color=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:B,normalize:!0}));const q=c.IndexDatatype.createTypedArray(F,6*L-6);let z=0,J=0;const j=L-1;for(b=0;b<j;++b)q[J++]=z,q[J++]=z+2,q[J++]=z+1,q[J++]=z+1,q[J++]=z+2,q[J++]=z+3,z+=4;return new l.Geometry({attributes:Y,indices:q,primitiveType:l.PrimitiveType.TRIANGLES,boundingSphere:n.BoundingSphere.fromPoints(T),geometryType:l.GeometryType.POLYLINES})},function(o,r){return e.defined(r)&&(o=b.unpack(o,r)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),b.createGeometry(o)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./ArcType-68098157","./arrayRemoveDuplicates-398390b2","./Transforms-221c7c82","./Color-fb2d0086","./ComponentDatatype-985dcc38","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolylinePipeline-482bb0f7","./VertexFormat-20b5279f","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(e,t,o,r,n,a,i,l,s,c,p,d,u,y,m,f,h,C,g,_,b){"use strict";const A=[];function E(e,t,o,r,n){const i=A;let l;i.length=n;const s=o.red,c=o.green,p=o.blue,d=o.alpha,u=r.red,y=r.green,m=r.blue,f=r.alpha;if(a.Color.equals(o,r)){for(l=0;l<n;l++)i[l]=a.Color.clone(o);return i}const h=(u-s)/n,C=(y-c)/n,g=(m-p)/n,_=(f-d)/n;for(l=0;l<n;l++)i[l]=new a.Color(s+l*h,c+l*C,p+l*g,d+l*_);return i}function P(r){const n=(r=e.defaultValue(r,e.defaultValue.EMPTY_OBJECT)).positions,i=r.colors,l=e.defaultValue(r.width,1),s=e.defaultValue(r.colorsPerVertex,!1);this._positions=n,this._colors=i,this._width=l,this._colorsPerVertex=s,this._vertexFormat=u.VertexFormat.clone(e.defaultValue(r.vertexFormat,u.VertexFormat.DEFAULT)),this._arcType=e.defaultValue(r.arcType,o.ArcType.GEODESIC),this._granularity=e.defaultValue(r.granularity,p.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(r.ellipsoid,t.Ellipsoid.WGS84)),this._workerName="createPolylineGeometry";let c=1+n.length*t.Cartesian3.packedLength;c+=e.defined(i)?1+i.length*a.Color.packedLength:1,this.packedLength=c+t.Ellipsoid.packedLength+u.VertexFormat.packedLength+4}P.pack=function(o,r,n){let i;n=e.defaultValue(n,0);const l=o._positions;let s=l.length;for(r[n++]=s,i=0;i<s;++i,n+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[i],r,n);const c=o._colors;for(s=e.defined(c)?c.length:0,r[n++]=s,i=0;i<s;++i,n+=a.Color.packedLength)a.Color.pack(c[i],r,n);return t.Ellipsoid.pack(o._ellipsoid,r,n),n+=t.Ellipsoid.packedLength,u.VertexFormat.pack(o._vertexFormat,r,n),n+=u.VertexFormat.packedLength,r[n++]=o._width,r[n++]=o._colorsPerVertex?1:0,r[n++]=o._arcType,r[n]=o._granularity,r};const x=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),w=new u.VertexFormat,T={positions:void 0,colors:void 0,ellipsoid:x,vertexFormat:w,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};P.unpack=function(o,r,n){let i;r=e.defaultValue(r,0);let l=o[r++];const s=new Array(l);for(i=0;i<l;++i,r+=t.Cartesian3.packedLength)s[i]=t.Cartesian3.unpack(o,r);l=o[r++];const c=l>0?new Array(l):void 0;for(i=0;i<l;++i,r+=a.Color.packedLength)c[i]=a.Color.unpack(o,r);const p=t.Ellipsoid.unpack(o,r,x);r+=t.Ellipsoid.packedLength;const d=u.VertexFormat.unpack(o,r,w);r+=u.VertexFormat.packedLength;const y=o[r++],m=1===o[r++],f=o[r++],h=o[r];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=t.Ellipsoid.clone(p,n._ellipsoid),n._vertexFormat=u.VertexFormat.clone(d,n._vertexFormat),n._width=y,n._colorsPerVertex=m,n._arcType=f,n._granularity=h,n):(T.positions=s,T.colors=c,T.width=y,T.colorsPerVertex=m,T.arcType=f,T.granularity=h,new P(T))};const D=new t.Cartesian3,k=new t.Cartesian3,V=new t.Cartesian3,v=new t.Cartesian3;return P.createGeometry=function(u){const y=u._width,m=u._vertexFormat;let f=u._colors;const h=u._colorsPerVertex,C=u._arcType,g=u._granularity,_=u._ellipsoid;let b,P,x;const w=[];let T=r.arrayRemoveDuplicates(u._positions,t.Cartesian3.equalsEpsilon,!1,w);if(e.defined(f)&&w.length>0){let e=0,t=w[0];f=f.filter((function(o,r){let n=!1;return n=h?r===t||0===r&&1===t:r+1===t,!n||(e++,t=w[e],!1)}))}let L=T.length;if(L<2||y<=0)return;if(C===o.ArcType.GEODESIC||C===o.ArcType.RHUMB){let t,r;C===o.ArcType.GEODESIC?(t=p.CesiumMath.chordLength(g,_.maximumRadius),r=d.PolylinePipeline.numberOfPoints):(t=g,r=d.PolylinePipeline.numberOfPointsRhumbLine);const n=d.PolylinePipeline.extractHeights(T,_);if(e.defined(f)){let e=1;for(b=0;b<L-1;++b)e+=r(T[b],T[b+1],t);const o=new Array(e);let n=0;for(b=0;b<L-1;++b){const i=T[b],l=T[b+1],s=f[b],c=r(i,l,t);if(h&&b<e){const e=E(0,0,s,f[b+1],c),t=e.length;for(P=0;P<t;++P)o[n++]=e[P]}else for(P=0;P<c;++P)o[n++]=a.Color.clone(s)}o[n]=a.Color.clone(f[f.length-1]),f=o,A.length=0}T=C===o.ArcType.GEODESIC?d.PolylinePipeline.generateCartesianArc({positions:T,minDistance:t,ellipsoid:_,height:n}):d.PolylinePipeline.generateCartesianRhumbArc({positions:T,granularity:t,ellipsoid:_,height:n})}L=T.length;const F=4*L-4,G=new Float64Array(3*F),O=new Float64Array(3*F),R=new Float64Array(3*F),I=new Float32Array(2*F),S=m.st?new Float32Array(2*F):void 0,B=e.defined(f)?new Uint8Array(4*F):void 0;let M,U=0,N=0,H=0,W=0;for(P=0;P<L;++P){let o,r;0===P?(M=D,t.Cartesian3.subtract(T[0],T[1],M),t.Cartesian3.add(T[0],M,M)):M=T[P-1],t.Cartesian3.clone(M,V),t.Cartesian3.clone(T[P],k),P===L-1?(M=D,t.Cartesian3.subtract(T[L-1],T[L-2],M),t.Cartesian3.add(T[L-1],M,M)):M=T[P+1],t.Cartesian3.clone(M,v),e.defined(B)&&(o=0===P||h?f[P]:f[P-1],P!==L-1&&(r=f[P]));const n=P===L-1?2:4;for(x=0===P?2:0;x<n;++x){t.Cartesian3.pack(k,G,U),t.Cartesian3.pack(V,O,U),t.Cartesian3.pack(v,R,U),U+=3;const n=x-2<0?-1:1;if(I[N++]=x%2*2-1,I[N++]=n*y,m.st&&(S[H++]=P/(L-1),S[H++]=Math.max(I[N-2],0)),e.defined(B)){const e=x<2?o:r;B[W++]=a.Color.floatToByte(e.red),B[W++]=a.Color.floatToByte(e.green),B[W++]=a.Color.floatToByte(e.blue),B[W++]=a.Color.floatToByte(e.alpha)}}}const Y=new s.GeometryAttributes;Y.position=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:G}),Y.prevPosition=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:O}),Y.nextPosition=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:R}),Y.expandAndWidth=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:I}),m.st&&(Y.st=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:S})),e.defined(B)&&(Y.color=new l.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:B,normalize:!0}));const q=c.IndexDatatype.createTypedArray(F,6*L-6);let z=0,J=0;const j=L-1;for(P=0;P<j;++P)q[J++]=z,q[J++]=z+2,q[J++]=z+1,q[J++]=z+1,q[J++]=z+2,q[J++]=z+3,z+=4;return new l.Geometry({attributes:Y,indices:q,primitiveType:l.PrimitiveType.TRIANGLES,boundingSphere:n.BoundingSphere.fromPoints(T),geometryType:l.GeometryType.POLYLINES})},function(o,r){return e.defined(r)&&(o=P.unpack(o,r)),o._ellipsoid=t.Ellipsoid.clone(o._ellipsoid),P.createGeometry(o)}}));
public/CIMSDK/Workers/createPolylineVolumeGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./arrayRemoveDuplicates-398390b2","./BoundingRectangle-f7002576","./Transforms-f3654378","./Matrix2-23dd5853","./ComponentDatatype-985dcc38","./PolylineVolumeGeometryLibrary-09ac3735","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryPipeline-3f4d7db4","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-47fb81c6","./VertexFormat-20b5279f","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-2129690e","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0","./PolylinePipeline-70a831f8","./EllipsoidGeodesic-3e762525","./EllipsoidRhumbLine-b175af48","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f"],(function(e,t,n,o,i,a,r,l,s,p,c,d,u,m,y,g,f,h,b,P,E,_,k,v,V,x,L){"use strict";function C(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,i=n.shapePositions;this._positions=o,this._shape=i,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,l.CornerType.ROUNDED),this._vertexFormat=y.VertexFormat.clone(e.defaultValue(n.vertexFormat,y.VertexFormat.DEFAULT)),this._granularity=e.defaultValue(n.granularity,u.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let r=1+o.length*t.Cartesian3.packedLength;r+=1+i.length*a.Cartesian2.packedLength,this.packedLength=r+t.Ellipsoid.packedLength+y.VertexFormat.packedLength+2}C.pack=function(n,o,i){let r;i=e.defaultValue(i,0);const l=n._positions;let s=l.length;for(o[i++]=s,r=0;r<s;++r,i+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[r],o,i);const p=n._shape;for(s=p.length,o[i++]=s,r=0;r<s;++r,i+=a.Cartesian2.packedLength)a.Cartesian2.pack(p[r],o,i);return t.Ellipsoid.pack(n._ellipsoid,o,i),i+=t.Ellipsoid.packedLength,y.VertexFormat.pack(n._vertexFormat,o,i),i+=y.VertexFormat.packedLength,o[i++]=n._cornerType,o[i]=n._granularity,o};const F=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),A=new y.VertexFormat,T={polylinePositions:void 0,shapePositions:void 0,ellipsoid:F,vertexFormat:A,cornerType:void 0,granularity:void 0};C.unpack=function(n,o,i){let r;o=e.defaultValue(o,0);let l=n[o++];const s=new Array(l);for(r=0;r<l;++r,o+=t.Cartesian3.packedLength)s[r]=t.Cartesian3.unpack(n,o);l=n[o++];const p=new Array(l);for(r=0;r<l;++r,o+=a.Cartesian2.packedLength)p[r]=a.Cartesian2.unpack(n,o);const c=t.Ellipsoid.unpack(n,o,F);o+=t.Ellipsoid.packedLength;const d=y.VertexFormat.unpack(n,o,A);o+=y.VertexFormat.packedLength;const u=n[o++],m=n[o];return e.defined(i)?(i._positions=s,i._shape=p,i._ellipsoid=t.Ellipsoid.clone(c,i._ellipsoid),i._vertexFormat=y.VertexFormat.clone(d,i._vertexFormat),i._cornerType=u,i._granularity=m,i):(T.polylinePositions=s,T.shapePositions=p,T.cornerType=u,T.granularity=m,new C(T))};const G=new o.BoundingRectangle;return C.createGeometry=function(e){const a=e._positions,u=n.arrayRemoveDuplicates(a,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=l.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),u.length<2||y.length<3)return;m.PolygonPipeline.computeWindingOrder2D(y)===m.WindingOrder.CLOCKWISE&&y.reverse();const g=o.BoundingRectangle.fromPoints(y,G);return function(e,t,n,o){const a=new p.GeometryAttributes;o.position&&(a.position=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}));const u=t.length,y=e.length/3,g=(y-2*u)/(2*u),f=m.PolygonPipeline.triangulate(t),h=(g-1)*u*6+2*f.length,b=d.IndexDatatype.createTypedArray(y,h);let P,E,_,k,v,V;const x=2*u;let L=0;for(P=0;P<g-1;P++){for(E=0;E<u-1;E++)_=2*E+P*u*2,V=_+x,k=_+1,v=k+x,b[L++]=k,b[L++]=_,b[L++]=v,b[L++]=v,b[L++]=_,b[L++]=V;_=2*u-2+P*u*2,k=_+1,v=k+x,V=_+x,b[L++]=k,b[L++]=_,b[L++]=v,b[L++]=v,b[L++]=_,b[L++]=V}if(o.st||o.tangent||o.bitangent){const e=new Float32Array(2*y),o=1/(g-1),i=1/n.height,l=n.height/2;let p,c,d=0;for(P=0;P<g;P++){for(p=P*o,c=i*(t[0].y+l),e[d++]=p,e[d++]=c,E=1;E<u;E++)c=i*(t[E].y+l),e[d++]=p,e[d++]=c,e[d++]=p,e[d++]=c;c=i*(t[0].y+l),e[d++]=p,e[d++]=c}for(E=0;E<u;E++)p=0,c=i*(t[E].y+l),e[d++]=p,e[d++]=c;for(E=0;E<u;E++)p=(g-1)*o,c=i*(t[E].y+l),e[d++]=p,e[d++]=c;a.st=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(e)})}const C=y-2*u;for(P=0;P<f.length;P+=3){const e=f[P]+C,t=f[P+1]+C,n=f[P+2]+C;b[L++]=e,b[L++]=t,b[L++]=n,b[L++]=n+u,b[L++]=t+u,b[L++]=e+u}let F=new s.Geometry({attributes:a,indices:b,boundingSphere:i.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.TRIANGLES});if(o.normal&&(F=c.GeometryPipeline.computeNormal(F)),o.tangent||o.bitangent){try{F=c.GeometryPipeline.computeTangentAndBitangent(F)}catch(e){l.oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(F.attributes.tangent=void 0),o.bitangent||(F.attributes.bitangent=void 0),o.st||(F.attributes.st=void 0)}return F}(l.PolylineVolumeGeometryLibrary.computePositions(u,y,g,e,!0),y,g,e._vertexFormat)},function(n,o){return e.defined(o)&&(n=C.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),C.createGeometry(n)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./arrayRemoveDuplicates-398390b2","./BoundingRectangle-272c38cc","./Transforms-221c7c82","./Matrix2-2fdcdec7","./ComponentDatatype-985dcc38","./PolylineVolumeGeometryLibrary-7de9a48a","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryPipeline-a349886f","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-8efb7487","./VertexFormat-20b5279f","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-a9681249","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./PolylinePipeline-482bb0f7","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef","./AttributeCompression-10297289","./EncodedCartesian3-e8922703"],(function(e,t,n,o,i,a,r,l,s,p,c,d,u,m,y,g,f,h,b,P,E,_,k,v,V,x,L){"use strict";function C(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).polylinePositions,i=n.shapePositions;this._positions=o,this._shape=i,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(n.cornerType,l.CornerType.ROUNDED),this._vertexFormat=y.VertexFormat.clone(e.defaultValue(n.vertexFormat,y.VertexFormat.DEFAULT)),this._granularity=e.defaultValue(n.granularity,u.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let r=1+o.length*t.Cartesian3.packedLength;r+=1+i.length*a.Cartesian2.packedLength,this.packedLength=r+t.Ellipsoid.packedLength+y.VertexFormat.packedLength+2}C.pack=function(n,o,i){let r;i=e.defaultValue(i,0);const l=n._positions;let s=l.length;for(o[i++]=s,r=0;r<s;++r,i+=t.Cartesian3.packedLength)t.Cartesian3.pack(l[r],o,i);const p=n._shape;for(s=p.length,o[i++]=s,r=0;r<s;++r,i+=a.Cartesian2.packedLength)a.Cartesian2.pack(p[r],o,i);return t.Ellipsoid.pack(n._ellipsoid,o,i),i+=t.Ellipsoid.packedLength,y.VertexFormat.pack(n._vertexFormat,o,i),i+=y.VertexFormat.packedLength,o[i++]=n._cornerType,o[i]=n._granularity,o};const F=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),A=new y.VertexFormat,T={polylinePositions:void 0,shapePositions:void 0,ellipsoid:F,vertexFormat:A,cornerType:void 0,granularity:void 0};C.unpack=function(n,o,i){let r;o=e.defaultValue(o,0);let l=n[o++];const s=new Array(l);for(r=0;r<l;++r,o+=t.Cartesian3.packedLength)s[r]=t.Cartesian3.unpack(n,o);l=n[o++];const p=new Array(l);for(r=0;r<l;++r,o+=a.Cartesian2.packedLength)p[r]=a.Cartesian2.unpack(n,o);const c=t.Ellipsoid.unpack(n,o,F);o+=t.Ellipsoid.packedLength;const d=y.VertexFormat.unpack(n,o,A);o+=y.VertexFormat.packedLength;const u=n[o++],m=n[o];return e.defined(i)?(i._positions=s,i._shape=p,i._ellipsoid=t.Ellipsoid.clone(c,i._ellipsoid),i._vertexFormat=y.VertexFormat.clone(d,i._vertexFormat),i._cornerType=u,i._granularity=m,i):(T.polylinePositions=s,T.shapePositions=p,T.cornerType=u,T.granularity=m,new C(T))};const G=new o.BoundingRectangle;return C.createGeometry=function(e){const a=e._positions,u=n.arrayRemoveDuplicates(a,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=l.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),u.length<2||y.length<3)return;m.PolygonPipeline.computeWindingOrder2D(y)===m.WindingOrder.CLOCKWISE&&y.reverse();const g=o.BoundingRectangle.fromPoints(y,G);return function(e,t,n,o){const a=new p.GeometryAttributes;o.position&&(a.position=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}));const u=t.length,y=e.length/3,g=(y-2*u)/(2*u),f=m.PolygonPipeline.triangulate(t),h=(g-1)*u*6+2*f.length,b=d.IndexDatatype.createTypedArray(y,h);let P,E,_,k,v,V;const x=2*u;let L=0;for(P=0;P<g-1;P++){for(E=0;E<u-1;E++)_=2*E+P*u*2,V=_+x,k=_+1,v=k+x,b[L++]=k,b[L++]=_,b[L++]=v,b[L++]=v,b[L++]=_,b[L++]=V;_=2*u-2+P*u*2,k=_+1,v=k+x,V=_+x,b[L++]=k,b[L++]=_,b[L++]=v,b[L++]=v,b[L++]=_,b[L++]=V}if(o.st||o.tangent||o.bitangent){const e=new Float32Array(2*y),o=1/(g-1),i=1/n.height,l=n.height/2;let p,c,d=0;for(P=0;P<g;P++){for(p=P*o,c=i*(t[0].y+l),e[d++]=p,e[d++]=c,E=1;E<u;E++)c=i*(t[E].y+l),e[d++]=p,e[d++]=c,e[d++]=p,e[d++]=c;c=i*(t[0].y+l),e[d++]=p,e[d++]=c}for(E=0;E<u;E++)p=0,c=i*(t[E].y+l),e[d++]=p,e[d++]=c;for(E=0;E<u;E++)p=(g-1)*o,c=i*(t[E].y+l),e[d++]=p,e[d++]=c;a.st=new s.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(e)})}const C=y-2*u;for(P=0;P<f.length;P+=3){const e=f[P]+C,t=f[P+1]+C,n=f[P+2]+C;b[L++]=e,b[L++]=t,b[L++]=n,b[L++]=n+u,b[L++]=t+u,b[L++]=e+u}let F=new s.Geometry({attributes:a,indices:b,boundingSphere:i.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.TRIANGLES});if(o.normal&&(F=c.GeometryPipeline.computeNormal(F)),o.tangent||o.bitangent){try{F=c.GeometryPipeline.computeTangentAndBitangent(F)}catch(e){l.oneTimeWarning("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(F.attributes.tangent=void 0),o.bitangent||(F.attributes.bitangent=void 0),o.st||(F.attributes.st=void 0)}return F}(l.PolylineVolumeGeometryLibrary.computePositions(u,y,g,e,!0),y,g,e._vertexFormat)},function(n,o){return e.defined(o)&&(n=C.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),C.createGeometry(n)}}));
public/CIMSDK/Workers/createPolylineVolumeOutlineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./arrayRemoveDuplicates-398390b2","./BoundingRectangle-f7002576","./Transforms-f3654378","./Matrix2-23dd5853","./ComponentDatatype-985dcc38","./PolylineVolumeGeometryLibrary-09ac3735","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-47fb81c6","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-2129690e","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0","./PolylinePipeline-70a831f8","./EllipsoidGeodesic-3e762525","./EllipsoidRhumbLine-b175af48"],(function(e,t,i,n,o,a,l,r,s,p,c,d,u,y,f,g,h,m,E,P,_,k,b){"use strict";function C(i){const n=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).polylinePositions,o=i.shapePositions;this._positions=n,this._shape=o,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(i.cornerType,r.CornerType.ROUNDED),this._granularity=e.defaultValue(i.granularity,d.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let l=1+n.length*t.Cartesian3.packedLength;l+=1+o.length*a.Cartesian2.packedLength,this.packedLength=l+t.Ellipsoid.packedLength+2}C.pack=function(i,n,o){let l;o=e.defaultValue(o,0);const r=i._positions;let s=r.length;for(n[o++]=s,l=0;l<s;++l,o+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[l],n,o);const p=i._shape;for(s=p.length,n[o++]=s,l=0;l<s;++l,o+=a.Cartesian2.packedLength)a.Cartesian2.pack(p[l],n,o);return t.Ellipsoid.pack(i._ellipsoid,n,o),o+=t.Ellipsoid.packedLength,n[o++]=i._cornerType,n[o]=i._granularity,n};const L=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),T={polylinePositions:void 0,shapePositions:void 0,ellipsoid:L,height:void 0,cornerType:void 0,granularity:void 0};C.unpack=function(i,n,o){let l;n=e.defaultValue(n,0);let r=i[n++];const s=new Array(r);for(l=0;l<r;++l,n+=t.Cartesian3.packedLength)s[l]=t.Cartesian3.unpack(i,n);r=i[n++];const p=new Array(r);for(l=0;l<r;++l,n+=a.Cartesian2.packedLength)p[l]=a.Cartesian2.unpack(i,n);const c=t.Ellipsoid.unpack(i,n,L);n+=t.Ellipsoid.packedLength;const d=i[n++],u=i[n];return e.defined(o)?(o._positions=s,o._shape=p,o._ellipsoid=t.Ellipsoid.clone(c,o._ellipsoid),o._cornerType=d,o._granularity=u,o):(T.polylinePositions=s,T.shapePositions=p,T.cornerType=d,T.granularity=u,new C(T))};const D=new n.BoundingRectangle;return C.createGeometry=function(e){const a=e._positions,d=i.arrayRemoveDuplicates(a,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=r.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),d.length<2||y.length<3)return;u.PolygonPipeline.computeWindingOrder2D(y)===u.WindingOrder.CLOCKWISE&&y.reverse();const f=n.BoundingRectangle.fromPoints(y,D);return function(e,t){const i=new p.GeometryAttributes;i.position=new s.GeometryAttribute({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});const n=t.length,a=i.position.values.length/3,r=e.length/3/n,d=c.IndexDatatype.createTypedArray(a,2*n*(r+1));let u,y,f=0;u=0;let g=u*n;for(y=0;y<n-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=n-1+g,d[f++]=g,u=r-1,g=u*n,y=0;y<n-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=n-1+g,d[f++]=g,u=0;u<r-1;u++){const e=n*u,t=e+n;for(y=0;y<n;y++)d[f++]=y+e,d[f++]=y+t}return new s.Geometry({attributes:i,indices:c.IndexDatatype.createTypedArray(a,d),boundingSphere:o.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.LINES})}(r.PolylineVolumeGeometryLibrary.computePositions(d,y,f,e,!1),y)},function(i,n){return e.defined(n)&&(i=C.unpack(i,n)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),C.createGeometry(i)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./arrayRemoveDuplicates-398390b2","./BoundingRectangle-272c38cc","./Transforms-221c7c82","./Matrix2-2fdcdec7","./ComponentDatatype-985dcc38","./PolylineVolumeGeometryLibrary-7de9a48a","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-8efb7487","./combine-5e110d09","./RuntimeError-9e0724f9","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-a9681249","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./PolylinePipeline-482bb0f7","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef"],(function(e,t,i,n,o,a,l,r,s,p,c,d,u,y,f,g,h,m,E,P,_,b,k){"use strict";function C(i){const n=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).polylinePositions,o=i.shapePositions;this._positions=n,this._shape=o,this._ellipsoid=t.Ellipsoid.clone(e.defaultValue(i.ellipsoid,t.Ellipsoid.WGS84)),this._cornerType=e.defaultValue(i.cornerType,r.CornerType.ROUNDED),this._granularity=e.defaultValue(i.granularity,d.CesiumMath.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let l=1+n.length*t.Cartesian3.packedLength;l+=1+o.length*a.Cartesian2.packedLength,this.packedLength=l+t.Ellipsoid.packedLength+2}C.pack=function(i,n,o){let l;o=e.defaultValue(o,0);const r=i._positions;let s=r.length;for(n[o++]=s,l=0;l<s;++l,o+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[l],n,o);const p=i._shape;for(s=p.length,n[o++]=s,l=0;l<s;++l,o+=a.Cartesian2.packedLength)a.Cartesian2.pack(p[l],n,o);return t.Ellipsoid.pack(i._ellipsoid,n,o),o+=t.Ellipsoid.packedLength,n[o++]=i._cornerType,n[o]=i._granularity,n};const L=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),T={polylinePositions:void 0,shapePositions:void 0,ellipsoid:L,height:void 0,cornerType:void 0,granularity:void 0};C.unpack=function(i,n,o){let l;n=e.defaultValue(n,0);let r=i[n++];const s=new Array(r);for(l=0;l<r;++l,n+=t.Cartesian3.packedLength)s[l]=t.Cartesian3.unpack(i,n);r=i[n++];const p=new Array(r);for(l=0;l<r;++l,n+=a.Cartesian2.packedLength)p[l]=a.Cartesian2.unpack(i,n);const c=t.Ellipsoid.unpack(i,n,L);n+=t.Ellipsoid.packedLength;const d=i[n++],u=i[n];return e.defined(o)?(o._positions=s,o._shape=p,o._ellipsoid=t.Ellipsoid.clone(c,o._ellipsoid),o._cornerType=d,o._granularity=u,o):(T.polylinePositions=s,T.shapePositions=p,T.cornerType=d,T.granularity=u,new C(T))};const D=new n.BoundingRectangle;return C.createGeometry=function(e){const a=e._positions,d=i.arrayRemoveDuplicates(a,t.Cartesian3.equalsEpsilon);let y=e._shape;if(y=r.PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(y),d.length<2||y.length<3)return;u.PolygonPipeline.computeWindingOrder2D(y)===u.WindingOrder.CLOCKWISE&&y.reverse();const f=n.BoundingRectangle.fromPoints(y,D);return function(e,t){const i=new p.GeometryAttributes;i.position=new s.GeometryAttribute({componentDatatype:l.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e});const n=t.length,a=i.position.values.length/3,r=e.length/3/n,d=c.IndexDatatype.createTypedArray(a,2*n*(r+1));let u,y,f=0;u=0;let g=u*n;for(y=0;y<n-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=n-1+g,d[f++]=g,u=r-1,g=u*n,y=0;y<n-1;y++)d[f++]=y+g,d[f++]=y+g+1;for(d[f++]=n-1+g,d[f++]=g,u=0;u<r-1;u++){const e=n*u,t=e+n;for(y=0;y<n;y++)d[f++]=y+e,d[f++]=y+t}return new s.Geometry({attributes:i,indices:c.IndexDatatype.createTypedArray(a,d),boundingSphere:o.BoundingSphere.fromVertices(e),primitiveType:s.PrimitiveType.LINES})}(r.PolylineVolumeGeometryLibrary.computePositions(d,y,f,e,!1),y)},function(i,n){return e.defined(n)&&(i=C.unpack(i,n)),i._ellipsoid=t.Ellipsoid.clone(i._ellipsoid),C.createGeometry(i)}}));
public/CIMSDK/Workers/createRectangleGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./Matrix2-23dd5853","./Transforms-f3654378","./ComponentDatatype-985dcc38","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryInstance-54a3e3b6","./GeometryOffsetAttribute-06264989","./GeometryPipeline-3f4d7db4","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-47fb81c6","./RectangleGeometryLibrary-8206b1b0","./VertexFormat-20b5279f","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./AttributeCompression-b9d605fe","./EncodedCartesian3-2008251f","./IntersectionTests-63574cfd","./Plane-4befcca0","./EllipsoidRhumbLine-b175af48"],(function(t,e,n,a,o,r,i,s,l,u,c,m,p,d,g,y,f,h,b,_,A,x,w){"use strict";const C=new e.Cartesian3,v=new e.Cartesian3,R=new e.Cartesian3,E=new e.Cartesian3,G=new n.Rectangle,F=new n.Cartesian2,P=new a.BoundingSphere,V=new a.BoundingSphere;function L(t,e){const n=new r.Geometry({attributes:new i.GeometryAttributes,primitiveType:r.PrimitiveType.TRIANGLES});return n.attributes.position=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}const D=new e.Cartesian3,M=new e.Cartesian3;function T(t,n){const a=t._vertexFormat,i=t._ellipsoid,s=n.height,l=n.width,u=n.northCap,m=n.southCap;let p=0,g=s,y=s,f=0;u&&(p=1,y-=1,f+=1),m&&(g-=1,y-=1,f+=1),f+=l*y;const h=a.position?new Float64Array(3*f):void 0,b=a.st?new Float32Array(2*f):void 0;let _=0,A=0;const x=C,w=F;let G=Number.MAX_VALUE,P=Number.MAX_VALUE,V=-Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let t=p;t<g;++t)for(let e=0;e<l;++e)d.RectangleGeometryLibrary.computePosition(n,i,a.st,t,e,x,w),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=w.x,b[A++]=w.y,G=Math.min(G,w.x),P=Math.min(P,w.y),V=Math.max(V,w.x),D=Math.max(D,w.y));if(u&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,0,0,x,w),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=w.x,b[A++]=w.y,G=w.x,P=w.y,V=w.x,D=w.y)),m&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,s-1,0,x,w),h[_++]=x.x,h[_++]=x.y,h[_]=x.z,a.st&&(b[A++]=w.x,b[A]=w.y,G=Math.min(G,w.x),P=Math.min(P,w.y),V=Math.max(V,w.x),D=Math.max(D,w.y))),a.st&&(G<0||P<0||V>1||D>1))for(let t=0;t<b.length;t+=2)b[t]=(b[t]-G)/(V-G),b[t+1]=(b[t+1]-P)/(D-P);const M=function(t,n,a,o){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0;const c=E,m=R;let p=v;if(n.normal||n.tangent||n.bitangent)for(let d=0;d<r;d+=3){const r=e.Cartesian3.fromArray(t,d,C),g=u+1,y=u+2;p=a.geodeticSurfaceNormal(r,p),(n.tangent||n.bitangent)&&(e.Cartesian3.cross(e.Cartesian3.UNIT_Z,p,m),e.Matrix3.multiplyByVector(o,m,m),e.Cartesian3.normalize(m,m),n.bitangent&&e.Cartesian3.normalize(e.Cartesian3.cross(p,m,c),c)),n.normal&&(i[u]=p.x,i[g]=p.y,i[y]=p.z),n.tangent&&(s[u]=m.x,s[g]=m.y,s[y]=m.z),n.bitangent&&(l[u]=c.x,l[g]=c.y,l[y]=c.z),u+=3}return L(n,{positions:t,normals:i,tangents:s,bitangents:l})}(h,a,i,n.tangentRotationMatrix);let T=6*(l-1)*(y-1);u&&(T+=3*(l-1)),m&&(T+=3*(l-1));const O=c.IndexDatatype.createTypedArray(f,T);let N,S=0,I=0;for(N=0;N<y-1;++N){for(let t=0;t<l-1;++t){const t=S,e=t+l,n=e+1,a=t+1;O[I++]=t,O[I++]=e,O[I++]=a,O[I++]=a,O[I++]=e,O[I++]=n,++S}++S}if(u||m){let t=f-1;const e=f-1;let n,a;if(u&&m&&(t=f-2),S=0,u)for(N=0;N<l-1;N++)n=S,a=n+1,O[I++]=t,O[I++]=n,O[I++]=a,++S;if(m)for(S=(y-1)*l,N=0;N<l-1;N++)n=S,a=n+1,O[I++]=n,O[I++]=e,O[I++]=a,++S}return M.indices=O,a.st&&(M.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),M}function O(t,e,n,a,o){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n+2],t[e++]=o[n],t[e++]=o[n+1],t[e]=o[n+2],t}function N(t,e,n,a){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n],t[e]=a[n+1],t}const S=new g.VertexFormat;function I(n,a){const i=n._shadowVolume,d=n._offsetAttribute,y=n._vertexFormat,f=n._extrudedHeight,h=n._surfaceHeight,b=n._ellipsoid,_=a.height,A=a.width;let x;if(i){const t=g.VertexFormat.clone(y,S);t.normal=!0,n._vertexFormat=t}const w=T(n,a);i&&(n._vertexFormat=y);let G=p.PolygonPipeline.scaleToGeodeticHeight(w.attributes.position.values,h,b,!1);G=new Float64Array(G);let F=G.length;const P=2*F,V=new Float64Array(P);V.set(G);const I=p.PolygonPipeline.scaleToGeodeticHeight(w.attributes.position.values,f,b);V.set(I,F),w.attributes.position.values=V;const k=y.normal?new Float32Array(P):void 0,H=y.tangent?new Float32Array(P):void 0,z=y.bitangent?new Float32Array(P):void 0,B=y.st?new Float32Array(P/3*2):void 0;let U,Y,q;if(y.normal){for(Y=w.attributes.normal.values,k.set(Y),x=0;x<F;x++)Y[x]=-Y[x];k.set(Y,F),w.attributes.normal.values=k}if(i){Y=w.attributes.normal.values,y.normal||(w.attributes.normal=void 0);const t=new Float32Array(P);for(x=0;x<F;x++)Y[x]=-Y[x];t.set(Y,F),w.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}const X=t.defined(d);if(X){const t=F/3*2;let e=new Uint8Array(t);d===l.GeometryOffsetAttribute.TOP?e=e.fill(1,0,t/2):(q=d===l.GeometryOffsetAttribute.NONE?0:1,e=e.fill(q)),w.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}if(y.tangent){const t=w.attributes.tangent.values;for(H.set(t),x=0;x<F;x++)t[x]=-t[x];H.set(t,F),w.attributes.tangent.values=H}if(y.bitangent){const t=w.attributes.bitangent.values;z.set(t),z.set(t,F),w.attributes.bitangent.values=z}y.st&&(U=w.attributes.st.values,B.set(U),B.set(U,F/3*2),w.attributes.st.values=B);const Q=w.indices,W=Q.length,J=F/3,j=c.IndexDatatype.createTypedArray(P/3,2*W);for(j.set(Q),x=0;x<W;x+=3)j[x+W]=Q[x+2]+J,j[x+1+W]=Q[x+1]+J,j[x+2+W]=Q[x]+J;w.indices=j;const Z=a.northCap,K=a.southCap;let $=_,tt=2,et=0,nt=4,at=4;Z&&(tt-=1,$-=1,et+=1,nt-=2,at-=1),K&&(tt-=1,$-=1,et+=1,nt-=2,at-=1),et+=tt*A+2*$-nt;const ot=2*(et+at);let rt=new Float64Array(3*ot);const it=i?new Float32Array(3*ot):void 0;let st=X?new Uint8Array(ot):void 0,lt=y.st?new Float32Array(2*ot):void 0;const ut=d===l.GeometryOffsetAttribute.TOP;X&&!ut&&(q=d===l.GeometryOffsetAttribute.ALL?1:0,st=st.fill(q));let ct=0,mt=0,pt=0,dt=0;const gt=A*$;let yt;for(x=0;x<gt;x+=A)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1);if(K){const t=Z?gt+1:gt;for(yt=3*t,x=0;x<2;x++)rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*t,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1)}else for(x=gt-A;x<gt;x++)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1);for(x=gt-1;x>0;x-=A)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1);if(Z){const t=gt;for(yt=3*t,x=0;x<2;x++)rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*t,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1)}else for(x=A-1;x>=0;x--)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1);let ft=function(t,n,a){const o=t.length,r=n.normal?new Float32Array(o):void 0,i=n.tangent?new Float32Array(o):void 0,s=n.bitangent?new Float32Array(o):void 0;let l=0,u=0,c=0,p=!0,d=E,g=R,y=v;if(n.normal||n.tangent||n.bitangent)for(let f=0;f<o;f+=6){const h=e.Cartesian3.fromArray(t,f,C),b=e.Cartesian3.fromArray(t,(f+6)%o,D);if(p){const n=e.Cartesian3.fromArray(t,(f+3)%o,M);e.Cartesian3.subtract(b,h,b),e.Cartesian3.subtract(n,h,n),y=e.Cartesian3.normalize(e.Cartesian3.cross(n,b,y),y),p=!1}e.Cartesian3.equalsEpsilon(b,h,m.CesiumMath.EPSILON10)&&(p=!0),(n.tangent||n.bitangent)&&(d=a.geodeticSurfaceNormal(h,d),n.tangent&&(g=e.Cartesian3.normalize(e.Cartesian3.cross(d,y,g),g))),n.normal&&(r[l++]=y.x,r[l++]=y.y,r[l++]=y.z,r[l++]=y.x,r[l++]=y.y,r[l++]=y.z),n.tangent&&(i[u++]=g.x,i[u++]=g.y,i[u++]=g.z,i[u++]=g.x,i[u++]=g.y,i[u++]=g.z),n.bitangent&&(s[c++]=d.x,s[c++]=d.y,s[c++]=d.z,s[c++]=d.x,s[c++]=d.y,s[c++]=d.z)}return L(n,{positions:t,normals:r,tangents:i,bitangents:s})}(rt,y,b);y.st&&(ft.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:lt})),i&&(ft.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:it})),X&&(ft.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:st}));const ht=c.IndexDatatype.createTypedArray(ot,6*et);let bt,_t,At,xt;F=rt.length/3;let wt=0;for(x=0;x<F-1;x+=2){bt=x,xt=(bt+2)%F;const t=e.Cartesian3.fromArray(rt,3*bt,D),n=e.Cartesian3.fromArray(rt,3*xt,M);e.Cartesian3.equalsEpsilon(t,n,m.CesiumMath.EPSILON10)||(_t=(bt+1)%F,At=(_t+2)%F,ht[wt++]=bt,ht[wt++]=_t,ht[wt++]=xt,ht[wt++]=xt,ht[wt++]=_t,ht[wt++]=At)}return ft.indices=ht,ft=u.GeometryPipeline.combineInstances([new s.GeometryInstance({geometry:w}),new s.GeometryInstance({geometry:ft})]),ft[0]}const k=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3],H=new e.Cartographic,z=new e.Cartographic;function B(t,e,a,o,r){if(0===a)return n.Rectangle.clone(t,r);const i=d.RectangleGeometryLibrary.computeOptions(t,e,a,0,G,H),s=i.height,l=i.width,u=k;return d.RectangleGeometryLibrary.computePosition(i,o,!1,0,0,u[0]),d.RectangleGeometryLibrary.computePosition(i,o,!1,0,l-1,u[1]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,0,u[2]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,l-1,u[3]),n.Rectangle.fromCartesianArray(u,o,r)}function U(a){const o=(a=t.defaultValue(a,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(a.height,0),i=t.defaultValue(a.extrudedHeight,r);this._rectangle=n.Rectangle.clone(o),this._granularity=t.defaultValue(a.granularity,m.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.Ellipsoid.clone(t.defaultValue(a.ellipsoid,e.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(r,i),this._rotation=t.defaultValue(a.rotation,0),this._stRotation=t.defaultValue(a.stRotation,0),this._vertexFormat=g.VertexFormat.clone(t.defaultValue(a.vertexFormat,g.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(r,i),this._shadowVolume=t.defaultValue(a.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=a.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}U.packedLength=n.Rectangle.packedLength+e.Ellipsoid.packedLength+g.VertexFormat.packedLength+7,U.pack=function(a,o,r){return r=t.defaultValue(r,0),n.Rectangle.pack(a._rectangle,o,r),r+=n.Rectangle.packedLength,e.Ellipsoid.pack(a._ellipsoid,o,r),r+=e.Ellipsoid.packedLength,g.VertexFormat.pack(a._vertexFormat,o,r),r+=g.VertexFormat.packedLength,o[r++]=a._granularity,o[r++]=a._surfaceHeight,o[r++]=a._rotation,o[r++]=a._stRotation,o[r++]=a._extrudedHeight,o[r++]=a._shadowVolume?1:0,o[r]=t.defaultValue(a._offsetAttribute,-1),o};const Y=new n.Rectangle,q=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),X={rectangle:Y,ellipsoid:q,vertexFormat:S,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};U.unpack=function(a,o,r){o=t.defaultValue(o,0);const i=n.Rectangle.unpack(a,o,Y);o+=n.Rectangle.packedLength;const s=e.Ellipsoid.unpack(a,o,q);o+=e.Ellipsoid.packedLength;const l=g.VertexFormat.unpack(a,o,S);o+=g.VertexFormat.packedLength;const u=a[o++],c=a[o++],m=a[o++],p=a[o++],d=a[o++],y=1===a[o++],f=a[o];return t.defined(r)?(r._rectangle=n.Rectangle.clone(i,r._rectangle),r._ellipsoid=e.Ellipsoid.clone(s,r._ellipsoid),r._vertexFormat=g.VertexFormat.clone(l,r._vertexFormat),r._granularity=u,r._surfaceHeight=c,r._rotation=m,r._stRotation=p,r._extrudedHeight=d,r._shadowVolume=y,r._offsetAttribute=-1===f?void 0:f,r):(X.granularity=u,X.height=c,X.rotation=m,X.stRotation=p,X.extrudedHeight=d,X.shadowVolume=y,X.offsetAttribute=-1===f?void 0:f,new U(X))},U.computeRectangle=function(n,a){const o=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(n.granularity,m.CesiumMath.RADIANS_PER_DEGREE),i=t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84);return B(o,r,t.defaultValue(n.rotation,0),i,a)};const Q=new e.Matrix3,W=new a.Quaternion,J=new e.Cartographic;U.createGeometry=function(i){if(m.CesiumMath.equalsEpsilon(i._rectangle.north,i._rectangle.south,m.CesiumMath.EPSILON10)||m.CesiumMath.equalsEpsilon(i._rectangle.east,i._rectangle.west,m.CesiumMath.EPSILON10))return;let s=i._rectangle;const u=i._ellipsoid,c=i._rotation,g=i._stRotation,y=i._vertexFormat,f=d.RectangleGeometryLibrary.computeOptions(s,i._granularity,c,g,G,H,z),h=Q;if(0!==g||0!==c){const t=n.Rectangle.center(s,J),o=u.geodeticSurfaceNormalCartographic(t,D);a.Quaternion.fromAxisAngle(o,-g,W),e.Matrix3.fromQuaternion(W,h)}else e.Matrix3.clone(e.Matrix3.IDENTITY,h);const b=i._surfaceHeight,_=i._extrudedHeight,A=!m.CesiumMath.equalsEpsilon(b,_,0,m.CesiumMath.EPSILON2);let x,w;if(f.lonScalar=1/i._rectangle.width,f.latScalar=1/i._rectangle.height,f.tangentRotationMatrix=h,s=i._rectangle,A){x=I(i,f);const t=a.BoundingSphere.fromRectangle3D(s,u,b,V),e=a.BoundingSphere.fromRectangle3D(s,u,_,P);w=a.BoundingSphere.union(t,e)}else{if(x=T(i,f),x.attributes.position.values=p.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,b,u,!1),t.defined(i._offsetAttribute)){const t=x.attributes.position.values.length,e=i._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(e);x.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}w=a.BoundingSphere.fromRectangle3D(s,u,b)}return y.position||delete x.attributes.position,new r.Geometry({attributes:x.attributes,indices:x.indices,primitiveType:x.primitiveType,boundingSphere:w,offsetAttribute:i._offsetAttribute})},U.createShadowVolume=function(t,e,n){const a=t._granularity,o=t._ellipsoid,r=e(a,o),i=n(a,o);return new U({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:o,stRotation:t._stRotation,granularity:a,extrudedHeight:i,height:r,vertexFormat:g.VertexFormat.POSITION_ONLY,shadowVolume:!0})};const j=new n.Rectangle,Z=[new n.Cartesian2,new n.Cartesian2,new n.Cartesian2],K=new n.Matrix2,$=new e.Cartographic;return Object.defineProperties(U.prototype,{rectangle:{get:function(){return t.defined(this._rotatedRectangle)||(this._rotatedRectangle=B(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];const e=n.Rectangle.clone(t._rectangle,j),a=t._granularity,o=t._ellipsoid,r=B(e,a,t._rotation-t._stRotation,o,j),i=Z;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;const s=t.rectangle,l=n.Matrix2.fromRotation(t._stRotation,K),u=n.Rectangle.center(s,$);for(let t=0;t<3;++t){const e=i[t];e.x-=u.longitude,e.y-=u.latitude,n.Matrix2.multiplyByVector(l,e,e),e.x+=u.longitude,e.y+=u.latitude,e.x=(e.x-s.west)/s.width,e.y=(e.y-s.south)/s.height}const c=i[0],m=i[1],p=i[2],d=new Array(6);return n.Cartesian2.pack(c,d),n.Cartesian2.pack(m,d,2),n.Cartesian2.pack(p,d,4),d}(this)),this._textureCoordinateRotationPoints}}}),function(a,o){return t.defined(o)&&(a=U.unpack(a,o)),a._ellipsoid=e.Ellipsoid.clone(a._ellipsoid),a._rectangle=n.Rectangle.clone(a._rectangle),U.createGeometry(a)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./Matrix2-2fdcdec7","./Transforms-221c7c82","./ComponentDatatype-985dcc38","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryInstance-8d112c0c","./GeometryOffsetAttribute-06264989","./GeometryPipeline-a349886f","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-8efb7487","./RectangleGeometryLibrary-7aaf0b55","./VertexFormat-20b5279f","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./AttributeCompression-10297289","./EncodedCartesian3-e8922703","./IntersectionTests-7b064f18","./Plane-fbab0ca2","./EllipsoidRhumbLine-2cf9c5ef"],(function(t,e,n,a,o,r,i,s,l,u,c,m,p,d,g,y,f,h,b,_,A,x,w){"use strict";const C=new e.Cartesian3,v=new e.Cartesian3,R=new e.Cartesian3,E=new e.Cartesian3,G=new n.Rectangle,F=new n.Cartesian2,P=new a.BoundingSphere,V=new a.BoundingSphere;function L(t,e){const n=new r.Geometry({attributes:new i.GeometryAttributes,primitiveType:r.PrimitiveType.TRIANGLES});return n.attributes.position=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}const D=new e.Cartesian3,M=new e.Cartesian3;function T(t,n){const a=t._vertexFormat,i=t._ellipsoid,s=n.height,l=n.width,u=n.northCap,m=n.southCap;let p=0,g=s,y=s,f=0;u&&(p=1,y-=1,f+=1),m&&(g-=1,y-=1,f+=1),f+=l*y;const h=a.position?new Float64Array(3*f):void 0,b=a.st?new Float32Array(2*f):void 0;let _=0,A=0;const x=C,w=F;let G=Number.MAX_VALUE,P=Number.MAX_VALUE,V=-Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let t=p;t<g;++t)for(let e=0;e<l;++e)d.RectangleGeometryLibrary.computePosition(n,i,a.st,t,e,x,w),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=w.x,b[A++]=w.y,G=Math.min(G,w.x),P=Math.min(P,w.y),V=Math.max(V,w.x),D=Math.max(D,w.y));if(u&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,0,0,x,w),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,a.st&&(b[A++]=w.x,b[A++]=w.y,G=w.x,P=w.y,V=w.x,D=w.y)),m&&(d.RectangleGeometryLibrary.computePosition(n,i,a.st,s-1,0,x,w),h[_++]=x.x,h[_++]=x.y,h[_]=x.z,a.st&&(b[A++]=w.x,b[A]=w.y,G=Math.min(G,w.x),P=Math.min(P,w.y),V=Math.max(V,w.x),D=Math.max(D,w.y))),a.st&&(G<0||P<0||V>1||D>1))for(let t=0;t<b.length;t+=2)b[t]=(b[t]-G)/(V-G),b[t+1]=(b[t+1]-P)/(D-P);const M=function(t,n,a,o){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0;const c=E,m=R;let p=v;if(n.normal||n.tangent||n.bitangent)for(let d=0;d<r;d+=3){const r=e.Cartesian3.fromArray(t,d,C),g=u+1,y=u+2;p=a.geodeticSurfaceNormal(r,p),(n.tangent||n.bitangent)&&(e.Cartesian3.cross(e.Cartesian3.UNIT_Z,p,m),e.Matrix3.multiplyByVector(o,m,m),e.Cartesian3.normalize(m,m),n.bitangent&&e.Cartesian3.normalize(e.Cartesian3.cross(p,m,c),c)),n.normal&&(i[u]=p.x,i[g]=p.y,i[y]=p.z),n.tangent&&(s[u]=m.x,s[g]=m.y,s[y]=m.z),n.bitangent&&(l[u]=c.x,l[g]=c.y,l[y]=c.z),u+=3}return L(n,{positions:t,normals:i,tangents:s,bitangents:l})}(h,a,i,n.tangentRotationMatrix);let T=6*(l-1)*(y-1);u&&(T+=3*(l-1)),m&&(T+=3*(l-1));const O=c.IndexDatatype.createTypedArray(f,T);let N,S=0,I=0;for(N=0;N<y-1;++N){for(let t=0;t<l-1;++t){const t=S,e=t+l,n=e+1,a=t+1;O[I++]=t,O[I++]=e,O[I++]=a,O[I++]=a,O[I++]=e,O[I++]=n,++S}++S}if(u||m){let t=f-1;const e=f-1;let n,a;if(u&&m&&(t=f-2),S=0,u)for(N=0;N<l-1;N++)n=S,a=n+1,O[I++]=t,O[I++]=n,O[I++]=a,++S;if(m)for(S=(y-1)*l,N=0;N<l-1;N++)n=S,a=n+1,O[I++]=n,O[I++]=e,O[I++]=a,++S}return M.indices=O,a.st&&(M.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),M}function O(t,e,n,a,o){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n+2],t[e++]=o[n],t[e++]=o[n+1],t[e]=o[n+2],t}function N(t,e,n,a){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n],t[e]=a[n+1],t}const S=new g.VertexFormat;function I(n,a){const i=n._shadowVolume,d=n._offsetAttribute,y=n._vertexFormat,f=n._extrudedHeight,h=n._surfaceHeight,b=n._ellipsoid,_=a.height,A=a.width;let x;if(i){const t=g.VertexFormat.clone(y,S);t.normal=!0,n._vertexFormat=t}const w=T(n,a);i&&(n._vertexFormat=y);let G=p.PolygonPipeline.scaleToGeodeticHeight(w.attributes.position.values,h,b,!1);G=new Float64Array(G);let F=G.length;const P=2*F,V=new Float64Array(P);V.set(G);const I=p.PolygonPipeline.scaleToGeodeticHeight(w.attributes.position.values,f,b);V.set(I,F),w.attributes.position.values=V;const k=y.normal?new Float32Array(P):void 0,H=y.tangent?new Float32Array(P):void 0,z=y.bitangent?new Float32Array(P):void 0,B=y.st?new Float32Array(P/3*2):void 0;let U,Y,q;if(y.normal){for(Y=w.attributes.normal.values,k.set(Y),x=0;x<F;x++)Y[x]=-Y[x];k.set(Y,F),w.attributes.normal.values=k}if(i){Y=w.attributes.normal.values,y.normal||(w.attributes.normal=void 0);const t=new Float32Array(P);for(x=0;x<F;x++)Y[x]=-Y[x];t.set(Y,F),w.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}const X=t.defined(d);if(X){const t=F/3*2;let e=new Uint8Array(t);d===l.GeometryOffsetAttribute.TOP?e=e.fill(1,0,t/2):(q=d===l.GeometryOffsetAttribute.NONE?0:1,e=e.fill(q)),w.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}if(y.tangent){const t=w.attributes.tangent.values;for(H.set(t),x=0;x<F;x++)t[x]=-t[x];H.set(t,F),w.attributes.tangent.values=H}if(y.bitangent){const t=w.attributes.bitangent.values;z.set(t),z.set(t,F),w.attributes.bitangent.values=z}y.st&&(U=w.attributes.st.values,B.set(U),B.set(U,F/3*2),w.attributes.st.values=B);const Q=w.indices,W=Q.length,J=F/3,j=c.IndexDatatype.createTypedArray(P/3,2*W);for(j.set(Q),x=0;x<W;x+=3)j[x+W]=Q[x+2]+J,j[x+1+W]=Q[x+1]+J,j[x+2+W]=Q[x]+J;w.indices=j;const Z=a.northCap,K=a.southCap;let $=_,tt=2,et=0,nt=4,at=4;Z&&(tt-=1,$-=1,et+=1,nt-=2,at-=1),K&&(tt-=1,$-=1,et+=1,nt-=2,at-=1),et+=tt*A+2*$-nt;const ot=2*(et+at);let rt=new Float64Array(3*ot);const it=i?new Float32Array(3*ot):void 0;let st=X?new Uint8Array(ot):void 0,lt=y.st?new Float32Array(2*ot):void 0;const ut=d===l.GeometryOffsetAttribute.TOP;X&&!ut&&(q=d===l.GeometryOffsetAttribute.ALL?1:0,st=st.fill(q));let ct=0,mt=0,pt=0,dt=0;const gt=A*$;let yt;for(x=0;x<gt;x+=A)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1);if(K){const t=Z?gt+1:gt;for(yt=3*t,x=0;x<2;x++)rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*t,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1)}else for(x=gt-A;x<gt;x++)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1);for(x=gt-1;x>0;x-=A)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1);if(Z){const t=gt;for(yt=3*t,x=0;x<2;x++)rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*t,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1)}else for(x=A-1;x>=0;x--)yt=3*x,rt=O(rt,ct,yt,G,I),ct+=6,y.st&&(lt=N(lt,mt,2*x,U),mt+=4),i&&(pt+=3,it[pt++]=Y[yt],it[pt++]=Y[yt+1],it[pt++]=Y[yt+2]),ut&&(st[dt++]=1,dt+=1);let ft=function(t,n,a){const o=t.length,r=n.normal?new Float32Array(o):void 0,i=n.tangent?new Float32Array(o):void 0,s=n.bitangent?new Float32Array(o):void 0;let l=0,u=0,c=0,p=!0,d=E,g=R,y=v;if(n.normal||n.tangent||n.bitangent)for(let f=0;f<o;f+=6){const h=e.Cartesian3.fromArray(t,f,C),b=e.Cartesian3.fromArray(t,(f+6)%o,D);if(p){const n=e.Cartesian3.fromArray(t,(f+3)%o,M);e.Cartesian3.subtract(b,h,b),e.Cartesian3.subtract(n,h,n),y=e.Cartesian3.normalize(e.Cartesian3.cross(n,b,y),y),p=!1}e.Cartesian3.equalsEpsilon(b,h,m.CesiumMath.EPSILON10)&&(p=!0),(n.tangent||n.bitangent)&&(d=a.geodeticSurfaceNormal(h,d),n.tangent&&(g=e.Cartesian3.normalize(e.Cartesian3.cross(d,y,g),g))),n.normal&&(r[l++]=y.x,r[l++]=y.y,r[l++]=y.z,r[l++]=y.x,r[l++]=y.y,r[l++]=y.z),n.tangent&&(i[u++]=g.x,i[u++]=g.y,i[u++]=g.z,i[u++]=g.x,i[u++]=g.y,i[u++]=g.z),n.bitangent&&(s[c++]=d.x,s[c++]=d.y,s[c++]=d.z,s[c++]=d.x,s[c++]=d.y,s[c++]=d.z)}return L(n,{positions:t,normals:r,tangents:i,bitangents:s})}(rt,y,b);y.st&&(ft.attributes.st=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:lt})),i&&(ft.attributes.extrudeDirection=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:it})),X&&(ft.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:st}));const ht=c.IndexDatatype.createTypedArray(ot,6*et);let bt,_t,At,xt;F=rt.length/3;let wt=0;for(x=0;x<F-1;x+=2){bt=x,xt=(bt+2)%F;const t=e.Cartesian3.fromArray(rt,3*bt,D),n=e.Cartesian3.fromArray(rt,3*xt,M);e.Cartesian3.equalsEpsilon(t,n,m.CesiumMath.EPSILON10)||(_t=(bt+1)%F,At=(_t+2)%F,ht[wt++]=bt,ht[wt++]=_t,ht[wt++]=xt,ht[wt++]=xt,ht[wt++]=_t,ht[wt++]=At)}return ft.indices=ht,ft=u.GeometryPipeline.combineInstances([new s.GeometryInstance({geometry:w}),new s.GeometryInstance({geometry:ft})]),ft[0]}const k=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3],H=new e.Cartographic,z=new e.Cartographic;function B(t,e,a,o,r){if(0===a)return n.Rectangle.clone(t,r);const i=d.RectangleGeometryLibrary.computeOptions(t,e,a,0,G,H),s=i.height,l=i.width,u=k;return d.RectangleGeometryLibrary.computePosition(i,o,!1,0,0,u[0]),d.RectangleGeometryLibrary.computePosition(i,o,!1,0,l-1,u[1]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,0,u[2]),d.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,l-1,u[3]),n.Rectangle.fromCartesianArray(u,o,r)}function U(a){const o=(a=t.defaultValue(a,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(a.height,0),i=t.defaultValue(a.extrudedHeight,r);this._rectangle=n.Rectangle.clone(o),this._granularity=t.defaultValue(a.granularity,m.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.Ellipsoid.clone(t.defaultValue(a.ellipsoid,e.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(r,i),this._rotation=t.defaultValue(a.rotation,0),this._stRotation=t.defaultValue(a.stRotation,0),this._vertexFormat=g.VertexFormat.clone(t.defaultValue(a.vertexFormat,g.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(r,i),this._shadowVolume=t.defaultValue(a.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=a.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}U.packedLength=n.Rectangle.packedLength+e.Ellipsoid.packedLength+g.VertexFormat.packedLength+7,U.pack=function(a,o,r){return r=t.defaultValue(r,0),n.Rectangle.pack(a._rectangle,o,r),r+=n.Rectangle.packedLength,e.Ellipsoid.pack(a._ellipsoid,o,r),r+=e.Ellipsoid.packedLength,g.VertexFormat.pack(a._vertexFormat,o,r),r+=g.VertexFormat.packedLength,o[r++]=a._granularity,o[r++]=a._surfaceHeight,o[r++]=a._rotation,o[r++]=a._stRotation,o[r++]=a._extrudedHeight,o[r++]=a._shadowVolume?1:0,o[r]=t.defaultValue(a._offsetAttribute,-1),o};const Y=new n.Rectangle,q=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),X={rectangle:Y,ellipsoid:q,vertexFormat:S,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};U.unpack=function(a,o,r){o=t.defaultValue(o,0);const i=n.Rectangle.unpack(a,o,Y);o+=n.Rectangle.packedLength;const s=e.Ellipsoid.unpack(a,o,q);o+=e.Ellipsoid.packedLength;const l=g.VertexFormat.unpack(a,o,S);o+=g.VertexFormat.packedLength;const u=a[o++],c=a[o++],m=a[o++],p=a[o++],d=a[o++],y=1===a[o++],f=a[o];return t.defined(r)?(r._rectangle=n.Rectangle.clone(i,r._rectangle),r._ellipsoid=e.Ellipsoid.clone(s,r._ellipsoid),r._vertexFormat=g.VertexFormat.clone(l,r._vertexFormat),r._granularity=u,r._surfaceHeight=c,r._rotation=m,r._stRotation=p,r._extrudedHeight=d,r._shadowVolume=y,r._offsetAttribute=-1===f?void 0:f,r):(X.granularity=u,X.height=c,X.rotation=m,X.stRotation=p,X.extrudedHeight=d,X.shadowVolume=y,X.offsetAttribute=-1===f?void 0:f,new U(X))},U.computeRectangle=function(n,a){const o=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(n.granularity,m.CesiumMath.RADIANS_PER_DEGREE),i=t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84);return B(o,r,t.defaultValue(n.rotation,0),i,a)};const Q=new e.Matrix3,W=new a.Quaternion,J=new e.Cartographic;U.createGeometry=function(i){if(m.CesiumMath.equalsEpsilon(i._rectangle.north,i._rectangle.south,m.CesiumMath.EPSILON10)||m.CesiumMath.equalsEpsilon(i._rectangle.east,i._rectangle.west,m.CesiumMath.EPSILON10))return;let s=i._rectangle;const u=i._ellipsoid,c=i._rotation,g=i._stRotation,y=i._vertexFormat,f=d.RectangleGeometryLibrary.computeOptions(s,i._granularity,c,g,G,H,z),h=Q;if(0!==g||0!==c){const t=n.Rectangle.center(s,J),o=u.geodeticSurfaceNormalCartographic(t,D);a.Quaternion.fromAxisAngle(o,-g,W),e.Matrix3.fromQuaternion(W,h)}else e.Matrix3.clone(e.Matrix3.IDENTITY,h);const b=i._surfaceHeight,_=i._extrudedHeight,A=!m.CesiumMath.equalsEpsilon(b,_,0,m.CesiumMath.EPSILON2);let x,w;if(f.lonScalar=1/i._rectangle.width,f.latScalar=1/i._rectangle.height,f.tangentRotationMatrix=h,s=i._rectangle,A){x=I(i,f);const t=a.BoundingSphere.fromRectangle3D(s,u,b,V),e=a.BoundingSphere.fromRectangle3D(s,u,_,P);w=a.BoundingSphere.union(t,e)}else{if(x=T(i,f),x.attributes.position.values=p.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,b,u,!1),t.defined(i._offsetAttribute)){const t=x.attributes.position.values.length,e=i._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(e);x.attributes.applyOffset=new r.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}w=a.BoundingSphere.fromRectangle3D(s,u,b)}return y.position||delete x.attributes.position,new r.Geometry({attributes:x.attributes,indices:x.indices,primitiveType:x.primitiveType,boundingSphere:w,offsetAttribute:i._offsetAttribute})},U.createShadowVolume=function(t,e,n){const a=t._granularity,o=t._ellipsoid,r=e(a,o),i=n(a,o);return new U({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:o,stRotation:t._stRotation,granularity:a,extrudedHeight:i,height:r,vertexFormat:g.VertexFormat.POSITION_ONLY,shadowVolume:!0})};const j=new n.Rectangle,Z=[new n.Cartesian2,new n.Cartesian2,new n.Cartesian2],K=new n.Matrix2,$=new e.Cartographic;return Object.defineProperties(U.prototype,{rectangle:{get:function(){return t.defined(this._rotatedRectangle)||(this._rotatedRectangle=B(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];const e=n.Rectangle.clone(t._rectangle,j),a=t._granularity,o=t._ellipsoid,r=B(e,a,t._rotation-t._stRotation,o,j),i=Z;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;const s=t.rectangle,l=n.Matrix2.fromRotation(t._stRotation,K),u=n.Rectangle.center(s,$);for(let t=0;t<3;++t){const e=i[t];e.x-=u.longitude,e.y-=u.latitude,n.Matrix2.multiplyByVector(l,e,e),e.x+=u.longitude,e.y+=u.latitude,e.x=(e.x-s.west)/s.width,e.y=(e.y-s.south)/s.height}const c=i[0],m=i[1],p=i[2],d=new Array(6);return n.Cartesian2.pack(c,d),n.Cartesian2.pack(m,d,2),n.Cartesian2.pack(p,d,4),d}(this)),this._textureCoordinateRotationPoints}}}),function(a,o){return t.defined(o)&&(a=U.unpack(a,o)),a._ellipsoid=e.Ellipsoid.clone(a._ellipsoid),a._rectangle=n.Rectangle.clone(a._rectangle),U.createGeometry(a)}}));
public/CIMSDK/Workers/createRectangleOutlineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./Matrix2-23dd5853","./Transforms-f3654378","./ComponentDatatype-985dcc38","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-47fb81c6","./RectangleGeometryLibrary-8206b1b0","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./EllipsoidRhumbLine-b175af48"],(function(e,t,i,n,o,a,r,l,s,u,c,p,d,f,g,h){"use strict";const y=new n.BoundingSphere,m=new n.BoundingSphere,b=new t.Cartesian3,_=new i.Rectangle;function E(e,t){const i=e._ellipsoid,n=t.height,l=t.width,u=t.northCap,c=t.southCap;let d=n,f=2,g=0,h=4;u&&(f-=1,d-=1,g+=1,h-=2),c&&(f-=1,d-=1,g+=1,h-=2),g+=f*l+2*d-h;const y=new Float64Array(3*g);let m,_=0,E=0;const A=b;if(u)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,0,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;else for(m=0;m<l;m++)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(m=l-1,E=1;E<n;E++)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;if(E=n-1,!c)for(m=l-2;m>=0;m--)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(m=0,E=n-2;E>0;E--)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;const G=y.length/3*2,R=s.IndexDatatype.createTypedArray(y.length/3,G);let P=0;for(let e=0;e<y.length/3-1;e++)R[P++]=e,R[P++]=e+1;R[P++]=y.length/3-1,R[P++]=0;const L=new a.Geometry({attributes:new r.GeometryAttributes,primitiveType:a.PrimitiveType.LINES});return L.attributes.position=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:y}),L.indices=R,L}function A(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).rectangle,a=e.defaultValue(n.granularity,u.CesiumMath.RADIANS_PER_DEGREE),r=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(n.rotation,0),s=e.defaultValue(n.height,0),c=e.defaultValue(n.extrudedHeight,s);this._rectangle=i.Rectangle.clone(o),this._granularity=a,this._ellipsoid=r,this._surfaceHeight=Math.max(s,c),this._rotation=l,this._extrudedHeight=Math.min(s,c),this._offsetAttribute=n.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}A.packedLength=i.Rectangle.packedLength+t.Ellipsoid.packedLength+5,A.pack=function(n,o,a){return a=e.defaultValue(a,0),i.Rectangle.pack(n._rectangle,o,a),a+=i.Rectangle.packedLength,t.Ellipsoid.pack(n._ellipsoid,o,a),a+=t.Ellipsoid.packedLength,o[a++]=n._granularity,o[a++]=n._surfaceHeight,o[a++]=n._rotation,o[a++]=n._extrudedHeight,o[a]=e.defaultValue(n._offsetAttribute,-1),o};const G=new i.Rectangle,R=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),P={rectangle:G,ellipsoid:R,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};A.unpack=function(n,o,a){o=e.defaultValue(o,0);const r=i.Rectangle.unpack(n,o,G);o+=i.Rectangle.packedLength;const l=t.Ellipsoid.unpack(n,o,R);o+=t.Ellipsoid.packedLength;const s=n[o++],u=n[o++],c=n[o++],p=n[o++],d=n[o];return e.defined(a)?(a._rectangle=i.Rectangle.clone(r,a._rectangle),a._ellipsoid=t.Ellipsoid.clone(l,a._ellipsoid),a._surfaceHeight=u,a._rotation=c,a._extrudedHeight=p,a._offsetAttribute=-1===d?void 0:d,a):(P.granularity=s,P.height=u,P.rotation=c,P.extrudedHeight=p,P.offsetAttribute=-1===d?void 0:d,new A(P))};const L=new t.Cartographic;return A.createGeometry=function(t){const i=t._rectangle,r=t._ellipsoid,d=p.RectangleGeometryLibrary.computeOptions(i,t._granularity,t._rotation,0,_,L);let f,g;if(u.CesiumMath.equalsEpsilon(i.north,i.south,u.CesiumMath.EPSILON10)||u.CesiumMath.equalsEpsilon(i.east,i.west,u.CesiumMath.EPSILON10))return;const h=t._surfaceHeight,b=t._extrudedHeight;let A;if(!u.CesiumMath.equalsEpsilon(h,b,0,u.CesiumMath.EPSILON2)){if(f=function(e,t){const i=e._surfaceHeight,n=e._extrudedHeight,o=e._ellipsoid,a=n,r=i,l=E(e,t),u=t.height,p=t.width,d=c.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,r,o,!1);let f=d.length;const g=new Float64Array(2*f);g.set(d);const h=c.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,a,o);g.set(h,f),l.attributes.position.values=g;const y=t.northCap,m=t.southCap;let b=4;y&&(b-=1),m&&(b-=1);const _=2*(g.length/3+b),A=s.IndexDatatype.createTypedArray(g.length/3,_);f=g.length/6;let G,R=0;for(let e=0;e<f-1;e++)A[R++]=e,A[R++]=e+1,A[R++]=e+f,A[R++]=e+f+1;if(A[R++]=f-1,A[R++]=0,A[R++]=f+f-1,A[R++]=f,A[R++]=0,A[R++]=f,y)G=u-1;else{const e=p-1;A[R++]=e,A[R++]=e+f,G=p+u-2}if(A[R++]=G,A[R++]=G+f,!m){const e=p+G-1;A[R++]=e,A[R]=e+f}return l.indices=A,l}(t,d),e.defined(t._offsetAttribute)){const e=f.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===l.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(A=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,i=i.fill(A)),f.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}const u=n.BoundingSphere.fromRectangle3D(i,r,h,m),p=n.BoundingSphere.fromRectangle3D(i,r,b,y);g=n.BoundingSphere.union(u,p)}else{if(f=E(t,d),f.attributes.position.values=c.PolygonPipeline.scaleToGeodeticHeight(f.attributes.position.values,h,r,!1),e.defined(t._offsetAttribute)){const e=f.attributes.position.values.length;A=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(A);f.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}g=n.BoundingSphere.fromRectangle3D(i,r,h)}return new a.Geometry({attributes:f.attributes,indices:f.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})},function(n,o){return e.defined(o)&&(n=A.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),n._rectangle=i.Rectangle.clone(n._rectangle),A.createGeometry(n)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./Matrix2-2fdcdec7","./Transforms-221c7c82","./ComponentDatatype-985dcc38","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolygonPipeline-8efb7487","./RectangleGeometryLibrary-7aaf0b55","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./EllipsoidRhumbLine-2cf9c5ef"],(function(e,t,i,n,o,a,r,l,s,u,c,p,d,f,g,h){"use strict";const y=new n.BoundingSphere,m=new n.BoundingSphere,b=new t.Cartesian3,_=new i.Rectangle;function E(e,t){const i=e._ellipsoid,n=t.height,l=t.width,u=t.northCap,c=t.southCap;let d=n,f=2,g=0,h=4;u&&(f-=1,d-=1,g+=1,h-=2),c&&(f-=1,d-=1,g+=1,h-=2),g+=f*l+2*d-h;const y=new Float64Array(3*g);let m,_=0,E=0;const A=b;if(u)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,0,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;else for(m=0;m<l;m++)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(m=l-1,E=1;E<n;E++)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;if(E=n-1,!c)for(m=l-2;m>=0;m--)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;for(m=0,E=n-2;E>0;E--)p.RectangleGeometryLibrary.computePosition(t,i,!1,E,m,A),y[_++]=A.x,y[_++]=A.y,y[_++]=A.z;const G=y.length/3*2,R=s.IndexDatatype.createTypedArray(y.length/3,G);let P=0;for(let e=0;e<y.length/3-1;e++)R[P++]=e,R[P++]=e+1;R[P++]=y.length/3-1,R[P++]=0;const L=new a.Geometry({attributes:new r.GeometryAttributes,primitiveType:a.PrimitiveType.LINES});return L.attributes.position=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:y}),L.indices=R,L}function A(n){const o=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).rectangle,a=e.defaultValue(n.granularity,u.CesiumMath.RADIANS_PER_DEGREE),r=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84),l=e.defaultValue(n.rotation,0),s=e.defaultValue(n.height,0),c=e.defaultValue(n.extrudedHeight,s);this._rectangle=i.Rectangle.clone(o),this._granularity=a,this._ellipsoid=r,this._surfaceHeight=Math.max(s,c),this._rotation=l,this._extrudedHeight=Math.min(s,c),this._offsetAttribute=n.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}A.packedLength=i.Rectangle.packedLength+t.Ellipsoid.packedLength+5,A.pack=function(n,o,a){return a=e.defaultValue(a,0),i.Rectangle.pack(n._rectangle,o,a),a+=i.Rectangle.packedLength,t.Ellipsoid.pack(n._ellipsoid,o,a),a+=t.Ellipsoid.packedLength,o[a++]=n._granularity,o[a++]=n._surfaceHeight,o[a++]=n._rotation,o[a++]=n._extrudedHeight,o[a]=e.defaultValue(n._offsetAttribute,-1),o};const G=new i.Rectangle,R=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),P={rectangle:G,ellipsoid:R,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};A.unpack=function(n,o,a){o=e.defaultValue(o,0);const r=i.Rectangle.unpack(n,o,G);o+=i.Rectangle.packedLength;const l=t.Ellipsoid.unpack(n,o,R);o+=t.Ellipsoid.packedLength;const s=n[o++],u=n[o++],c=n[o++],p=n[o++],d=n[o];return e.defined(a)?(a._rectangle=i.Rectangle.clone(r,a._rectangle),a._ellipsoid=t.Ellipsoid.clone(l,a._ellipsoid),a._surfaceHeight=u,a._rotation=c,a._extrudedHeight=p,a._offsetAttribute=-1===d?void 0:d,a):(P.granularity=s,P.height=u,P.rotation=c,P.extrudedHeight=p,P.offsetAttribute=-1===d?void 0:d,new A(P))};const L=new t.Cartographic;return A.createGeometry=function(t){const i=t._rectangle,r=t._ellipsoid,d=p.RectangleGeometryLibrary.computeOptions(i,t._granularity,t._rotation,0,_,L);let f,g;if(u.CesiumMath.equalsEpsilon(i.north,i.south,u.CesiumMath.EPSILON10)||u.CesiumMath.equalsEpsilon(i.east,i.west,u.CesiumMath.EPSILON10))return;const h=t._surfaceHeight,b=t._extrudedHeight;let A;if(!u.CesiumMath.equalsEpsilon(h,b,0,u.CesiumMath.EPSILON2)){if(f=function(e,t){const i=e._surfaceHeight,n=e._extrudedHeight,o=e._ellipsoid,a=n,r=i,l=E(e,t),u=t.height,p=t.width,d=c.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,r,o,!1);let f=d.length;const g=new Float64Array(2*f);g.set(d);const h=c.PolygonPipeline.scaleToGeodeticHeight(l.attributes.position.values,a,o);g.set(h,f),l.attributes.position.values=g;const y=t.northCap,m=t.southCap;let b=4;y&&(b-=1),m&&(b-=1);const _=2*(g.length/3+b),A=s.IndexDatatype.createTypedArray(g.length/3,_);f=g.length/6;let G,R=0;for(let e=0;e<f-1;e++)A[R++]=e,A[R++]=e+1,A[R++]=e+f,A[R++]=e+f+1;if(A[R++]=f-1,A[R++]=0,A[R++]=f+f-1,A[R++]=f,A[R++]=0,A[R++]=f,y)G=u-1;else{const e=p-1;A[R++]=e,A[R++]=e+f,G=p+u-2}if(A[R++]=G,A[R++]=G+f,!m){const e=p+G-1;A[R++]=e,A[R]=e+f}return l.indices=A,l}(t,d),e.defined(t._offsetAttribute)){const e=f.attributes.position.values.length/3;let i=new Uint8Array(e);t._offsetAttribute===l.GeometryOffsetAttribute.TOP?i=i.fill(1,0,e/2):(A=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1,i=i.fill(A)),f.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}const u=n.BoundingSphere.fromRectangle3D(i,r,h,m),p=n.BoundingSphere.fromRectangle3D(i,r,b,y);g=n.BoundingSphere.union(u,p)}else{if(f=E(t,d),f.attributes.position.values=c.PolygonPipeline.scaleToGeodeticHeight(f.attributes.position.values,h,r,!1),e.defined(t._offsetAttribute)){const e=f.attributes.position.values.length;A=t._offsetAttribute===l.GeometryOffsetAttribute.NONE?0:1;const i=new Uint8Array(e/3).fill(A);f.attributes.applyOffset=new a.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}g=n.BoundingSphere.fromRectangle3D(i,r,h)}return new a.Geometry({attributes:f.attributes,indices:f.indices,primitiveType:a.PrimitiveType.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})},function(n,o){return e.defined(o)&&(n=A.unpack(n,o)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),n._rectangle=i.Rectangle.clone(n._rectangle),A.createGeometry(n)}}));
public/CIMSDK/Workers/createSimplePolylineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./ArcType-68098157","./Transforms-f3654378","./Color-fc2285fc","./ComponentDatatype-985dcc38","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolylinePipeline-70a831f8","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./EllipsoidGeodesic-3e762525","./EllipsoidRhumbLine-b175af48","./IntersectionTests-63574cfd","./Plane-4befcca0"],(function(e,o,t,l,r,n,i,a,s,c,p,d,f,y,u,h,C,T,g){"use strict";function m(e,o,t,l,n,i,a){const s=p.PolylinePipeline.numberOfPoints(e,o,n);let c;const d=t.red,f=t.green,y=t.blue,u=t.alpha,h=l.red,C=l.green,T=l.blue,g=l.alpha;if(r.Color.equals(t,l)){for(c=0;c<s;c++)i[a++]=r.Color.floatToByte(d),i[a++]=r.Color.floatToByte(f),i[a++]=r.Color.floatToByte(y),i[a++]=r.Color.floatToByte(u);return a}const m=(h-d)/s,P=(C-f)/s,_=(T-y)/s,B=(g-u)/s;let b=a;for(c=0;c<s;c++)i[b++]=r.Color.floatToByte(d+c*m),i[b++]=r.Color.floatToByte(f+c*P),i[b++]=r.Color.floatToByte(y+c*_),i[b++]=r.Color.floatToByte(u+c*B);return b}function P(l){const n=(l=e.defaultValue(l,e.defaultValue.EMPTY_OBJECT)).positions,i=l.colors,a=e.defaultValue(l.colorsPerVertex,!1);this._positions=n,this._colors=i,this._colorsPerVertex=a,this._arcType=e.defaultValue(l.arcType,t.ArcType.GEODESIC),this._granularity=e.defaultValue(l.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.defaultValue(l.ellipsoid,o.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";let s=1+n.length*o.Cartesian3.packedLength;s+=e.defined(i)?1+i.length*r.Color.packedLength:1,this.packedLength=s+o.Ellipsoid.packedLength+3}P.pack=function(t,l,n){let i;n=e.defaultValue(n,0);const a=t._positions;let s=a.length;for(l[n++]=s,i=0;i<s;++i,n+=o.Cartesian3.packedLength)o.Cartesian3.pack(a[i],l,n);const c=t._colors;for(s=e.defined(c)?c.length:0,l[n++]=s,i=0;i<s;++i,n+=r.Color.packedLength)r.Color.pack(c[i],l,n);return o.Ellipsoid.pack(t._ellipsoid,l,n),n+=o.Ellipsoid.packedLength,l[n++]=t._colorsPerVertex?1:0,l[n++]=t._arcType,l[n]=t._granularity,l},P.unpack=function(t,l,n){let i;l=e.defaultValue(l,0);let a=t[l++];const s=new Array(a);for(i=0;i<a;++i,l+=o.Cartesian3.packedLength)s[i]=o.Cartesian3.unpack(t,l);a=t[l++];const c=a>0?new Array(a):void 0;for(i=0;i<a;++i,l+=r.Color.packedLength)c[i]=r.Color.unpack(t,l);const p=o.Ellipsoid.unpack(t,l);l+=o.Ellipsoid.packedLength;const d=1===t[l++],f=t[l++],y=t[l];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=p,n._colorsPerVertex=d,n._arcType=f,n._granularity=y,n):new P({positions:s,colors:c,ellipsoid:p,colorsPerVertex:d,arcType:f,granularity:y})};const _=new Array(2),B=new Array(2),b={positions:_,height:B,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return P.createGeometry=function(d){const f=d._positions,y=d._colors,u=d._colorsPerVertex,h=d._arcType,C=d._granularity,T=d._ellipsoid,g=c.CesiumMath.chordLength(C,T.maximumRadius),P=e.defined(y)&&!u;let A;const E=f.length;let k,G,D,L,w=0;if(h===t.ArcType.GEODESIC||h===t.ArcType.RHUMB){let o,l,n;h===t.ArcType.GEODESIC?(o=c.CesiumMath.chordLength(C,T.maximumRadius),l=p.PolylinePipeline.numberOfPoints,n=p.PolylinePipeline.generateArc):(o=C,l=p.PolylinePipeline.numberOfPointsRhumbLine,n=p.PolylinePipeline.generateRhumbArc);const i=p.PolylinePipeline.extractHeights(f,T),a=b;if(h===t.ArcType.GEODESIC?a.minDistance=g:a.granularity=C,a.ellipsoid=T,P){let t=0;for(A=0;A<E-1;A++)t+=l(f[A],f[A+1],o)+1;k=new Float64Array(3*t),D=new Uint8Array(4*t),a.positions=_,a.height=B;let s=0;for(A=0;A<E-1;++A){_[0]=f[A],_[1]=f[A+1],B[0]=i[A],B[1]=i[A+1];const o=n(a);if(e.defined(y)){const e=o.length/3;L=y[A];for(let o=0;o<e;++o)D[s++]=r.Color.floatToByte(L.red),D[s++]=r.Color.floatToByte(L.green),D[s++]=r.Color.floatToByte(L.blue),D[s++]=r.Color.floatToByte(L.alpha)}k.set(o,w),w+=o.length}}else if(a.positions=f,a.height=i,k=new Float64Array(n(a)),e.defined(y)){for(D=new Uint8Array(k.length/3*4),A=0;A<E-1;++A){w=m(f[A],f[A+1],y[A],y[A+1],g,D,w)}const e=y[E-1];D[w++]=r.Color.floatToByte(e.red),D[w++]=r.Color.floatToByte(e.green),D[w++]=r.Color.floatToByte(e.blue),D[w++]=r.Color.floatToByte(e.alpha)}}else{G=P?2*E-2:E,k=new Float64Array(3*G),D=e.defined(y)?new Uint8Array(4*G):void 0;let t=0,l=0;for(A=0;A<E;++A){const n=f[A];if(P&&A>0&&(o.Cartesian3.pack(n,k,t),t+=3,L=y[A-1],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha)),P&&A===E-1)break;o.Cartesian3.pack(n,k,t),t+=3,e.defined(y)&&(L=y[A],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha))}}const V=new a.GeometryAttributes;V.position=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k}),e.defined(y)&&(V.color=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:D,normalize:!0})),G=k.length/3;const x=2*(G-1),S=s.IndexDatatype.createTypedArray(G,x);let I=0;for(A=0;A<G-1;++A)S[I++]=A,S[I++]=A+1;return new i.Geometry({attributes:V,indices:S,primitiveType:i.PrimitiveType.LINES,boundingSphere:l.BoundingSphere.fromPoints(f)})},function(t,l){return e.defined(l)&&(t=P.unpack(t,l)),t._ellipsoid=o.Ellipsoid.clone(t._ellipsoid),P.createGeometry(t)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./ArcType-68098157","./Transforms-221c7c82","./Color-fb2d0086","./ComponentDatatype-985dcc38","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./PolylinePipeline-482bb0f7","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(e,o,t,l,r,n,i,a,s,c,p,d,f,y,u,h,C,T,g){"use strict";function m(e,o,t,l,n,i,a){const s=p.PolylinePipeline.numberOfPoints(e,o,n);let c;const d=t.red,f=t.green,y=t.blue,u=t.alpha,h=l.red,C=l.green,T=l.blue,g=l.alpha;if(r.Color.equals(t,l)){for(c=0;c<s;c++)i[a++]=r.Color.floatToByte(d),i[a++]=r.Color.floatToByte(f),i[a++]=r.Color.floatToByte(y),i[a++]=r.Color.floatToByte(u);return a}const m=(h-d)/s,b=(C-f)/s,P=(T-y)/s,_=(g-u)/s;let B=a;for(c=0;c<s;c++)i[B++]=r.Color.floatToByte(d+c*m),i[B++]=r.Color.floatToByte(f+c*b),i[B++]=r.Color.floatToByte(y+c*P),i[B++]=r.Color.floatToByte(u+c*_);return B}function b(l){const n=(l=e.defaultValue(l,e.defaultValue.EMPTY_OBJECT)).positions,i=l.colors,a=e.defaultValue(l.colorsPerVertex,!1);this._positions=n,this._colors=i,this._colorsPerVertex=a,this._arcType=e.defaultValue(l.arcType,t.ArcType.GEODESIC),this._granularity=e.defaultValue(l.granularity,c.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.defaultValue(l.ellipsoid,o.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";let s=1+n.length*o.Cartesian3.packedLength;s+=e.defined(i)?1+i.length*r.Color.packedLength:1,this.packedLength=s+o.Ellipsoid.packedLength+3}b.pack=function(t,l,n){let i;n=e.defaultValue(n,0);const a=t._positions;let s=a.length;for(l[n++]=s,i=0;i<s;++i,n+=o.Cartesian3.packedLength)o.Cartesian3.pack(a[i],l,n);const c=t._colors;for(s=e.defined(c)?c.length:0,l[n++]=s,i=0;i<s;++i,n+=r.Color.packedLength)r.Color.pack(c[i],l,n);return o.Ellipsoid.pack(t._ellipsoid,l,n),n+=o.Ellipsoid.packedLength,l[n++]=t._colorsPerVertex?1:0,l[n++]=t._arcType,l[n]=t._granularity,l},b.unpack=function(t,l,n){let i;l=e.defaultValue(l,0);let a=t[l++];const s=new Array(a);for(i=0;i<a;++i,l+=o.Cartesian3.packedLength)s[i]=o.Cartesian3.unpack(t,l);a=t[l++];const c=a>0?new Array(a):void 0;for(i=0;i<a;++i,l+=r.Color.packedLength)c[i]=r.Color.unpack(t,l);const p=o.Ellipsoid.unpack(t,l);l+=o.Ellipsoid.packedLength;const d=1===t[l++],f=t[l++],y=t[l];return e.defined(n)?(n._positions=s,n._colors=c,n._ellipsoid=p,n._colorsPerVertex=d,n._arcType=f,n._granularity=y,n):new b({positions:s,colors:c,ellipsoid:p,colorsPerVertex:d,arcType:f,granularity:y})};const P=new Array(2),_=new Array(2),B={positions:P,height:_,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return b.createGeometry=function(d){const f=d._positions,y=d._colors,u=d._colorsPerVertex,h=d._arcType,C=d._granularity,T=d._ellipsoid,g=c.CesiumMath.chordLength(C,T.maximumRadius),b=e.defined(y)&&!u;let A;const E=f.length;let k,G,D,L,w=0;if(h===t.ArcType.GEODESIC||h===t.ArcType.RHUMB){let o,l,n;h===t.ArcType.GEODESIC?(o=c.CesiumMath.chordLength(C,T.maximumRadius),l=p.PolylinePipeline.numberOfPoints,n=p.PolylinePipeline.generateArc):(o=C,l=p.PolylinePipeline.numberOfPointsRhumbLine,n=p.PolylinePipeline.generateRhumbArc);const i=p.PolylinePipeline.extractHeights(f,T),a=B;if(h===t.ArcType.GEODESIC?a.minDistance=g:a.granularity=C,a.ellipsoid=T,b){let t=0;for(A=0;A<E-1;A++)t+=l(f[A],f[A+1],o)+1;k=new Float64Array(3*t),D=new Uint8Array(4*t),a.positions=P,a.height=_;let s=0;for(A=0;A<E-1;++A){P[0]=f[A],P[1]=f[A+1],_[0]=i[A],_[1]=i[A+1];const o=n(a);if(e.defined(y)){const e=o.length/3;L=y[A];for(let o=0;o<e;++o)D[s++]=r.Color.floatToByte(L.red),D[s++]=r.Color.floatToByte(L.green),D[s++]=r.Color.floatToByte(L.blue),D[s++]=r.Color.floatToByte(L.alpha)}k.set(o,w),w+=o.length}}else if(a.positions=f,a.height=i,k=new Float64Array(n(a)),e.defined(y)){for(D=new Uint8Array(k.length/3*4),A=0;A<E-1;++A){w=m(f[A],f[A+1],y[A],y[A+1],g,D,w)}const e=y[E-1];D[w++]=r.Color.floatToByte(e.red),D[w++]=r.Color.floatToByte(e.green),D[w++]=r.Color.floatToByte(e.blue),D[w++]=r.Color.floatToByte(e.alpha)}}else{G=b?2*E-2:E,k=new Float64Array(3*G),D=e.defined(y)?new Uint8Array(4*G):void 0;let t=0,l=0;for(A=0;A<E;++A){const n=f[A];if(b&&A>0&&(o.Cartesian3.pack(n,k,t),t+=3,L=y[A-1],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha)),b&&A===E-1)break;o.Cartesian3.pack(n,k,t),t+=3,e.defined(y)&&(L=y[A],D[l++]=r.Color.floatToByte(L.red),D[l++]=r.Color.floatToByte(L.green),D[l++]=r.Color.floatToByte(L.blue),D[l++]=r.Color.floatToByte(L.alpha))}}const V=new a.GeometryAttributes;V.position=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k}),e.defined(y)&&(V.color=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:D,normalize:!0})),G=k.length/3;const x=2*(G-1),S=s.IndexDatatype.createTypedArray(G,x);let I=0;for(A=0;A<G-1;++A)S[I++]=A,S[I++]=A+1;return new i.Geometry({attributes:V,indices:S,primitiveType:i.PrimitiveType.LINES,boundingSphere:l.BoundingSphere.fromPoints(f)})},function(t,l){return e.defined(l)&&(t=b.unpack(t,l)),t._ellipsoid=o.Ellipsoid.clone(t._ellipsoid),b.createGeometry(t)}}));
public/CIMSDK/Workers/createSphereGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./EllipsoidGeometry-ce747f39","./VertexFormat-20b5279f","./Math-76ce6367","./Transforms-f3654378","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,t,i,r,o,a,n,s,c,d,l,m,u,p,f){"use strict";function y(r){const o=e.defaultValue(r.radius,1),a={radii:new t.Cartesian3(o,o,o),stackPartitions:r.stackPartitions,slicePartitions:r.slicePartitions,vertexFormat:r.vertexFormat};this._ellipsoidGeometry=new i.EllipsoidGeometry(a),this._workerName="createSphereGeometry"}y.packedLength=i.EllipsoidGeometry.packedLength,y.pack=function(e,t,r){return i.EllipsoidGeometry.pack(e._ellipsoidGeometry,t,r)};const G=new i.EllipsoidGeometry,k={radius:void 0,radii:new t.Cartesian3,vertexFormat:new r.VertexFormat,stackPartitions:void 0,slicePartitions:void 0};return y.unpack=function(o,a,n){const s=i.EllipsoidGeometry.unpack(o,a,G);return k.vertexFormat=r.VertexFormat.clone(s._vertexFormat,k.vertexFormat),k.stackPartitions=s._stackPartitions,k.slicePartitions=s._slicePartitions,e.defined(n)?(t.Cartesian3.clone(s._radii,k.radii),n._ellipsoidGeometry=new i.EllipsoidGeometry(k),n):(k.radius=s._radii.x,new y(k))},y.createGeometry=function(e){return i.EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},function(t,i){return e.defined(i)&&(t=y.unpack(t,i)),y.createGeometry(t)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./EllipsoidGeometry-78610fac","./VertexFormat-20b5279f","./Math-76ce6367","./Transforms-221c7c82","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,t,i,r,o,a,n,s,c,d,l,m,u,p,y){"use strict";function f(r){const o=e.defaultValue(r.radius,1),a={radii:new t.Cartesian3(o,o,o),stackPartitions:r.stackPartitions,slicePartitions:r.slicePartitions,vertexFormat:r.vertexFormat};this._ellipsoidGeometry=new i.EllipsoidGeometry(a),this._workerName="createSphereGeometry"}f.packedLength=i.EllipsoidGeometry.packedLength,f.pack=function(e,t,r){return i.EllipsoidGeometry.pack(e._ellipsoidGeometry,t,r)};const G=new i.EllipsoidGeometry,k={radius:void 0,radii:new t.Cartesian3,vertexFormat:new r.VertexFormat,stackPartitions:void 0,slicePartitions:void 0};return f.unpack=function(o,a,n){const s=i.EllipsoidGeometry.unpack(o,a,G);return k.vertexFormat=r.VertexFormat.clone(s._vertexFormat,k.vertexFormat),k.stackPartitions=s._stackPartitions,k.slicePartitions=s._slicePartitions,e.defined(n)?(t.Cartesian3.clone(s._radii,k.radii),n._ellipsoidGeometry=new i.EllipsoidGeometry(k),n):(k.radius=s._radii.x,new f(k))},f.createGeometry=function(e){return i.EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},function(t,i){return e.defined(i)&&(t=f.unpack(t,i)),f.createGeometry(t)}}));
public/CIMSDK/Workers/createSphereOutlineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./EllipsoidOutlineGeometry-badc7de6","./Math-76ce6367","./Transforms-f3654378","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,i,t,n,r,o,s,a,d,l,c,u,m,p){"use strict";function y(n){const r=e.defaultValue(n.radius,1),o={radii:new i.Cartesian3(r,r,r),stackPartitions:n.stackPartitions,slicePartitions:n.slicePartitions,subdivisions:n.subdivisions};this._ellipsoidGeometry=new t.EllipsoidOutlineGeometry(o),this._workerName="createSphereOutlineGeometry"}y.packedLength=t.EllipsoidOutlineGeometry.packedLength,y.pack=function(e,i,n){return t.EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,i,n)};const f=new t.EllipsoidOutlineGeometry,G={radius:void 0,radii:new i.Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return y.unpack=function(n,r,o){const s=t.EllipsoidOutlineGeometry.unpack(n,r,f);return G.stackPartitions=s._stackPartitions,G.slicePartitions=s._slicePartitions,G.subdivisions=s._subdivisions,e.defined(o)?(i.Cartesian3.clone(s._radii,G.radii),o._ellipsoidGeometry=new t.EllipsoidOutlineGeometry(G),o):(G.radius=s._radii.x,new y(G))},y.createGeometry=function(e){return t.EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},function(i,t){return e.defined(t)&&(i=y.unpack(i,t)),y.createGeometry(i)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./EllipsoidOutlineGeometry-08bb8972","./Math-76ce6367","./Transforms-221c7c82","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./IndexDatatype-16f6b4a1"],(function(e,i,t,n,r,o,s,a,d,c,l,u,m,p){"use strict";function y(n){const r=e.defaultValue(n.radius,1),o={radii:new i.Cartesian3(r,r,r),stackPartitions:n.stackPartitions,slicePartitions:n.slicePartitions,subdivisions:n.subdivisions};this._ellipsoidGeometry=new t.EllipsoidOutlineGeometry(o),this._workerName="createSphereOutlineGeometry"}y.packedLength=t.EllipsoidOutlineGeometry.packedLength,y.pack=function(e,i,n){return t.EllipsoidOutlineGeometry.pack(e._ellipsoidGeometry,i,n)};const G=new t.EllipsoidOutlineGeometry,f={radius:void 0,radii:new i.Cartesian3,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};return y.unpack=function(n,r,o){const s=t.EllipsoidOutlineGeometry.unpack(n,r,G);return f.stackPartitions=s._stackPartitions,f.slicePartitions=s._slicePartitions,f.subdivisions=s._subdivisions,e.defined(o)?(i.Cartesian3.clone(s._radii,f.radii),o._ellipsoidGeometry=new t.EllipsoidOutlineGeometry(f),o):(f.radius=s._radii.x,new y(f))},y.createGeometry=function(e){return t.EllipsoidOutlineGeometry.createGeometry(e._ellipsoidGeometry)},function(i,t){return e.defined(t)&&(i=y.unpack(i,t)),y.createGeometry(i)}}));
public/CIMSDK/Workers/createVectorTileClampedPolylines.js
@@ -1 +1 @@
define(["./AttributeCompression-b9d605fe","./Matrix3-6e56fbc7","./combine-5e110d09","./IndexDatatype-16f6b4a1","./Math-76ce6367","./Matrix2-23dd5853","./createTaskProcessorWorker","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./WebGLConstants-258cf3a0","./RuntimeError-9e0724f9"],(function(t,e,a,s,n,r,i,o,c,d,l){"use strict";const f=32767,u=Math.cos(n.CesiumMath.toRadians(150)),h=new e.Cartographic,C=new e.Cartesian3;const p=new e.Cartographic,m=new e.Cartographic;function b(t){const e=8*t,a=3*e,n=4*e;this.startEllipsoidNormals=new Float32Array(a),this.endEllipsoidNormals=new Float32Array(a),this.startPositionAndHeights=new Float32Array(n),this.startFaceNormalAndVertexCornerIds=new Float32Array(n),this.endPositionAndHeights=new Float32Array(n),this.endFaceNormalAndHalfWidths=new Float32Array(n),this.vertexBatchIds=new Uint16Array(e),this.indices=s.IndexDatatype.createTypedArray(e,36*t),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}const A=new e.Cartesian3,w=new e.Cartesian3;function g(t,a,s,n,r){const i=e.Cartesian3.subtract(s,a,w);let o=e.Cartesian3.subtract(a,t,A);return e.Cartesian3.normalize(i,i),e.Cartesian3.normalize(o,o),e.Cartesian3.dot(i,o)<u&&(o=e.Cartesian3.multiplyByScalar(o,-1,A)),e.Cartesian3.add(i,o,r),e.Cartesian3.equals(r,e.Cartesian3.ZERO)&&(r=e.Cartesian3.subtract(t,a)),e.Cartesian3.cross(r,n,r),e.Cartesian3.cross(n,r,r),e.Cartesian3.normalize(r,r),r}const y=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],N=y.length,k=new e.Cartesian3,x=new e.Cartesian3,I=new e.Cartesian3,E=new e.Cartesian3,F=new e.Cartesian3;b.prototype.addVolume=function(t,a,s,n,r,i,o,c,d,l){let f=e.Cartesian3.add(a,d,k);const u=l.geodeticSurfaceNormal(f,x);f=e.Cartesian3.add(s,d,k);const h=l.geodeticSurfaceNormal(f,E),C=g(t,a,s,u,I),p=g(n,s,a,h,F),m=this.startEllipsoidNormals,b=this.endEllipsoidNormals,A=this.startPositionAndHeights,w=this.startFaceNormalAndVertexCornerIds,H=this.endPositionAndHeights,O=this.endFaceNormalAndHalfWidths,P=this.vertexBatchIds;let v,D=this.batchIdOffset,M=this.vec3Offset,S=this.vec4Offset;for(v=0;v<8;v++)e.Cartesian3.pack(u,m,M),e.Cartesian3.pack(h,b,M),e.Cartesian3.pack(a,A,S),A[S+3]=r,e.Cartesian3.pack(s,H,S),H[S+3]=i,e.Cartesian3.pack(C,w,S),w[S+3]=v,e.Cartesian3.pack(p,O,S),O[S+3]=o,P[D++]=c,M+=3,S+=4;this.batchIdOffset=D,this.vec3Offset=M,this.vec4Offset=S;const R=this.indices,U=this.volumeStartIndex,B=this.indexOffset;for(v=0;v<N;v++)R[B+v]=y[v]+U;this.volumeStartIndex+=8,this.indexOffset+=N};const H=new r.Rectangle,O=new e.Ellipsoid,P=new e.Cartesian3,v=new e.Cartesian3,D=new e.Cartesian3,M=new e.Cartesian3,S=new e.Cartesian3;return i((function(i,o){const c=new Uint16Array(i.positions),d=new Uint16Array(i.widths),l=new Uint32Array(i.counts),u=new Uint16Array(i.batchIds),A=H,w=O,g=P,y=new Float64Array(i.packedBuffer);let N=0;const k=y[N++],x=y[N++];let I;r.Rectangle.unpack(y,N,A),N+=r.Rectangle.packedLength,e.Ellipsoid.unpack(y,N,w),N+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(y,N,g);let E=c.length/3;const F=c.subarray(0,E),R=c.subarray(E,2*E),U=c.subarray(2*E,3*E);t.AttributeCompression.zigZagDeltaDecode(F,R,U),function(t,a,s,n){const r=n.length,i=t.length,o=new Uint8Array(i),c=p,d=m;let l=0;for(let s=0;s<r;s++){const r=n[s];let i=r;for(let s=1;s<r;s++){const n=l+s,r=n-1;d.longitude=t[n],d.latitude=a[n],c.longitude=t[r],c.latitude=a[r],e.Cartographic.equals(d,c)&&(i--,o[r]=1)}n[s]=i,l+=r}let f=0;for(let e=0;e<i;e++)1!==o[e]&&(t[f]=t[e],a[f]=a[e],s[f]=s[e],f++)}(F,R,U,l);const B=l.length;let V=0;for(I=0;I<B;I++){V+=l[I]-1}const T=new b(V),W=function(t,a,s,r,i,o,c){const d=t.length,l=new Float64Array(3*d);for(let u=0;u<d;++u){const d=t[u],p=a[u],m=s[u],b=n.CesiumMath.lerp(r.west,r.east,d/f),A=n.CesiumMath.lerp(r.south,r.north,p/f),w=n.CesiumMath.lerp(i,o,m/f),g=e.Cartographic.fromRadians(b,A,w,h),y=c.cartographicToCartesian(g,C);e.Cartesian3.pack(y,l,3*u)}return l}(F,R,U,A,k,x,w);E=F.length;const z=new Float32Array(3*E);for(I=0;I<E;++I)z[3*I]=W[3*I]-g.x,z[3*I+1]=W[3*I+1]-g.y,z[3*I+2]=W[3*I+2]-g.z;let q=0,L=0;for(I=0;I<B;I++){const t=l[I]-1,a=.5*d[I],s=u[I],r=q;for(let i=0;i<t;i++){const o=e.Cartesian3.unpack(z,q,D),c=e.Cartesian3.unpack(z,q+3,M);let d=U[L],l=U[L+1];d=n.CesiumMath.lerp(k,x,d/f),l=n.CesiumMath.lerp(k,x,l/f),L++;let u=v,h=S;if(0===i){const a=r+3*t,s=e.Cartesian3.unpack(z,a,v);if(e.Cartesian3.equals(s,o))e.Cartesian3.unpack(z,a-3,u);else{const t=e.Cartesian3.subtract(o,c,v);u=e.Cartesian3.add(t,o,v)}}else e.Cartesian3.unpack(z,q-3,u);if(i===t-1){const t=e.Cartesian3.unpack(z,r,S);if(e.Cartesian3.equals(t,c))e.Cartesian3.unpack(z,r+3,h);else{const t=e.Cartesian3.subtract(c,o,S);h=e.Cartesian3.add(t,c,S)}}else e.Cartesian3.unpack(z,q+6,h);T.addVolume(u,o,c,h,d,l,a,s,g,w),q+=3}q+=3,L++}const _=T.indices;o.push(T.startEllipsoidNormals.buffer),o.push(T.endEllipsoidNormals.buffer),o.push(T.startPositionAndHeights.buffer),o.push(T.startFaceNormalAndVertexCornerIds.buffer),o.push(T.endPositionAndHeights.buffer),o.push(T.endFaceNormalAndHalfWidths.buffer),o.push(T.vertexBatchIds.buffer),o.push(_.buffer);let G={indexDatatype:2===_.BYTES_PER_ELEMENT?s.IndexDatatype.UNSIGNED_SHORT:s.IndexDatatype.UNSIGNED_INT,startEllipsoidNormals:T.startEllipsoidNormals.buffer,endEllipsoidNormals:T.endEllipsoidNormals.buffer,startPositionAndHeights:T.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:T.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:T.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:T.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:T.vertexBatchIds.buffer,indices:_.buffer};if(i.keepDecodedPositions){const t=function(t){const e=t.length,a=new Uint32Array(e+1);let s=0;for(let n=0;n<e;++n)a[n]=s,s+=t[n];return a[e]=s,a}(l);o.push(W.buffer,t.buffer),G=a.combine(G,{decodedPositions:W.buffer,decodedPositionOffsets:t.buffer})}return G}))}));
define(["./AttributeCompression-10297289","./Matrix3-aeb3c326","./combine-5e110d09","./IndexDatatype-16f6b4a1","./Math-76ce6367","./Matrix2-2fdcdec7","./createTaskProcessorWorker","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./WebGLConstants-258cf3a0","./RuntimeError-9e0724f9"],(function(t,e,a,s,n,r,i,o,c,d,l){"use strict";const f=32767,u=Math.cos(n.CesiumMath.toRadians(150)),h=new e.Cartographic,C=new e.Cartesian3;const p=new e.Cartographic,m=new e.Cartographic;function b(t){const e=8*t,a=3*e,n=4*e;this.startEllipsoidNormals=new Float32Array(a),this.endEllipsoidNormals=new Float32Array(a),this.startPositionAndHeights=new Float32Array(n),this.startFaceNormalAndVertexCornerIds=new Float32Array(n),this.endPositionAndHeights=new Float32Array(n),this.endFaceNormalAndHalfWidths=new Float32Array(n),this.vertexBatchIds=new Uint16Array(e),this.indices=s.IndexDatatype.createTypedArray(e,36*t),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}const A=new e.Cartesian3,w=new e.Cartesian3;function g(t,a,s,n,r){const i=e.Cartesian3.subtract(s,a,w);let o=e.Cartesian3.subtract(a,t,A);return e.Cartesian3.normalize(i,i),e.Cartesian3.normalize(o,o),e.Cartesian3.dot(i,o)<u&&(o=e.Cartesian3.multiplyByScalar(o,-1,A)),e.Cartesian3.add(i,o,r),e.Cartesian3.equals(r,e.Cartesian3.ZERO)&&(r=e.Cartesian3.subtract(t,a)),e.Cartesian3.cross(r,n,r),e.Cartesian3.cross(n,r,r),e.Cartesian3.normalize(r,r),r}const y=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],N=y.length,k=new e.Cartesian3,x=new e.Cartesian3,I=new e.Cartesian3,E=new e.Cartesian3,F=new e.Cartesian3;b.prototype.addVolume=function(t,a,s,n,r,i,o,c,d,l){let f=e.Cartesian3.add(a,d,k);const u=l.geodeticSurfaceNormal(f,x);f=e.Cartesian3.add(s,d,k);const h=l.geodeticSurfaceNormal(f,E),C=g(t,a,s,u,I),p=g(n,s,a,h,F),m=this.startEllipsoidNormals,b=this.endEllipsoidNormals,A=this.startPositionAndHeights,w=this.startFaceNormalAndVertexCornerIds,H=this.endPositionAndHeights,O=this.endFaceNormalAndHalfWidths,P=this.vertexBatchIds;let v,D=this.batchIdOffset,M=this.vec3Offset,S=this.vec4Offset;for(v=0;v<8;v++)e.Cartesian3.pack(u,m,M),e.Cartesian3.pack(h,b,M),e.Cartesian3.pack(a,A,S),A[S+3]=r,e.Cartesian3.pack(s,H,S),H[S+3]=i,e.Cartesian3.pack(C,w,S),w[S+3]=v,e.Cartesian3.pack(p,O,S),O[S+3]=o,P[D++]=c,M+=3,S+=4;this.batchIdOffset=D,this.vec3Offset=M,this.vec4Offset=S;const R=this.indices,U=this.volumeStartIndex,B=this.indexOffset;for(v=0;v<N;v++)R[B+v]=y[v]+U;this.volumeStartIndex+=8,this.indexOffset+=N};const H=new r.Rectangle,O=new e.Ellipsoid,P=new e.Cartesian3,v=new e.Cartesian3,D=new e.Cartesian3,M=new e.Cartesian3,S=new e.Cartesian3;return i((function(i,o){const c=new Uint16Array(i.positions),d=new Uint16Array(i.widths),l=new Uint32Array(i.counts),u=new Uint16Array(i.batchIds),A=H,w=O,g=P,y=new Float64Array(i.packedBuffer);let N=0;const k=y[N++],x=y[N++];let I;r.Rectangle.unpack(y,N,A),N+=r.Rectangle.packedLength,e.Ellipsoid.unpack(y,N,w),N+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(y,N,g);let E=c.length/3;const F=c.subarray(0,E),R=c.subarray(E,2*E),U=c.subarray(2*E,3*E);t.AttributeCompression.zigZagDeltaDecode(F,R,U),function(t,a,s,n){const r=n.length,i=t.length,o=new Uint8Array(i),c=p,d=m;let l=0;for(let s=0;s<r;s++){const r=n[s];let i=r;for(let s=1;s<r;s++){const n=l+s,r=n-1;d.longitude=t[n],d.latitude=a[n],c.longitude=t[r],c.latitude=a[r],e.Cartographic.equals(d,c)&&(i--,o[r]=1)}n[s]=i,l+=r}let f=0;for(let e=0;e<i;e++)1!==o[e]&&(t[f]=t[e],a[f]=a[e],s[f]=s[e],f++)}(F,R,U,l);const B=l.length;let V=0;for(I=0;I<B;I++){V+=l[I]-1}const T=new b(V),W=function(t,a,s,r,i,o,c){const d=t.length,l=new Float64Array(3*d);for(let u=0;u<d;++u){const d=t[u],p=a[u],m=s[u],b=n.CesiumMath.lerp(r.west,r.east,d/f),A=n.CesiumMath.lerp(r.south,r.north,p/f),w=n.CesiumMath.lerp(i,o,m/f),g=e.Cartographic.fromRadians(b,A,w,h),y=c.cartographicToCartesian(g,C);e.Cartesian3.pack(y,l,3*u)}return l}(F,R,U,A,k,x,w);E=F.length;const z=new Float32Array(3*E);for(I=0;I<E;++I)z[3*I]=W[3*I]-g.x,z[3*I+1]=W[3*I+1]-g.y,z[3*I+2]=W[3*I+2]-g.z;let q=0,L=0;for(I=0;I<B;I++){const t=l[I]-1,a=.5*d[I],s=u[I],r=q;for(let i=0;i<t;i++){const o=e.Cartesian3.unpack(z,q,D),c=e.Cartesian3.unpack(z,q+3,M);let d=U[L],l=U[L+1];d=n.CesiumMath.lerp(k,x,d/f),l=n.CesiumMath.lerp(k,x,l/f),L++;let u=v,h=S;if(0===i){const a=r+3*t,s=e.Cartesian3.unpack(z,a,v);if(e.Cartesian3.equals(s,o))e.Cartesian3.unpack(z,a-3,u);else{const t=e.Cartesian3.subtract(o,c,v);u=e.Cartesian3.add(t,o,v)}}else e.Cartesian3.unpack(z,q-3,u);if(i===t-1){const t=e.Cartesian3.unpack(z,r,S);if(e.Cartesian3.equals(t,c))e.Cartesian3.unpack(z,r+3,h);else{const t=e.Cartesian3.subtract(c,o,S);h=e.Cartesian3.add(t,c,S)}}else e.Cartesian3.unpack(z,q+6,h);T.addVolume(u,o,c,h,d,l,a,s,g,w),q+=3}q+=3,L++}const _=T.indices;o.push(T.startEllipsoidNormals.buffer),o.push(T.endEllipsoidNormals.buffer),o.push(T.startPositionAndHeights.buffer),o.push(T.startFaceNormalAndVertexCornerIds.buffer),o.push(T.endPositionAndHeights.buffer),o.push(T.endFaceNormalAndHalfWidths.buffer),o.push(T.vertexBatchIds.buffer),o.push(_.buffer);let G={indexDatatype:2===_.BYTES_PER_ELEMENT?s.IndexDatatype.UNSIGNED_SHORT:s.IndexDatatype.UNSIGNED_INT,startEllipsoidNormals:T.startEllipsoidNormals.buffer,endEllipsoidNormals:T.endEllipsoidNormals.buffer,startPositionAndHeights:T.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:T.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:T.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:T.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:T.vertexBatchIds.buffer,indices:_.buffer};if(i.keepDecodedPositions){const t=function(t){const e=t.length,a=new Uint32Array(e+1);let s=0;for(let n=0;n<e;++n)a[n]=s,s+=t[n];return a[e]=s,a}(l);o.push(W.buffer,t.buffer),G=a.combine(G,{decodedPositions:W.buffer,decodedPositionOffsets:t.buffer})}return G}))}));
public/CIMSDK/Workers/createVectorTileGeometries.js
@@ -1 +1 @@
define(["./Transforms-f3654378","./BoxGeometry-a7e37078","./Matrix3-6e56fbc7","./Color-fc2285fc","./CylinderGeometry-597b40fa","./defaultValue-865ac579","./EllipsoidGeometry-ce747f39","./IndexDatatype-16f6b4a1","./Matrix2-23dd5853","./createTaskProcessorWorker","./Math-76ce6367","./combine-5e110d09","./RuntimeError-9e0724f9","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./VertexFormat-20b5279f","./CylinderGeometryLibrary-f1481b60"],(function(e,t,n,r,i,a,o,s,c,d,l,f,u,h,p,b,y,x,g,m){"use strict";function C(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}const I=new n.Cartesian3,M=c.Matrix4.packedLength+n.Cartesian3.packedLength,k=c.Matrix4.packedLength+2,B=c.Matrix4.packedLength+n.Cartesian3.packedLength,w=n.Cartesian3.packedLength+1,A={modelMatrix:new c.Matrix4,boundingVolume:new e.BoundingSphere};function O(e,t){let r=t*M;const i=n.Cartesian3.unpack(e,r,I);r+=n.Cartesian3.packedLength;const a=c.Matrix4.unpack(e,r,A.modelMatrix);c.Matrix4.multiplyByScale(a,i,a);const o=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=Math.sqrt(3),A}function L(e,t){let r=t*k;const i=e[r++],a=e[r++],o=n.Cartesian3.fromElements(i,i,a,I),s=c.Matrix4.unpack(e,r,A.modelMatrix);c.Matrix4.multiplyByScale(s,o,s);const d=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,d.center),d.radius=Math.sqrt(2),A}function v(e,t){let r=t*B;const i=n.Cartesian3.unpack(e,r,I);r+=n.Cartesian3.packedLength;const a=c.Matrix4.unpack(e,r,A.modelMatrix);c.Matrix4.multiplyByScale(a,i,a);const o=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=1,A}function E(e,t){let r=t*w;const i=e[r++],a=n.Cartesian3.unpack(e,r,I),o=c.Matrix4.fromTranslation(a,A.modelMatrix);c.Matrix4.multiplyByUniformScale(o,i,o);const s=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,s.center),s.radius=1,A}const U=new n.Cartesian3;function G(t,i,o,s,d){if(!a.defined(i))return;const l=o.length,f=s.attributes.position.values,u=s.indices,h=t.positions,p=t.vertexBatchIds,b=t.indices,y=t.batchIds,x=t.batchTableColors,g=t.batchedIndices,m=t.indexOffsets,I=t.indexCounts,M=t.boundingVolumes,k=t.modelMatrix,B=t.center;let w=t.positionOffset,A=t.batchIdIndex,O=t.indexOffset;const L=t.batchedIndicesOffset;for(let t=0;t<l;++t){const a=d(i,t),s=a.modelMatrix;c.Matrix4.multiply(k,s,s);const l=o[t],v=f.length;for(let e=0;e<v;e+=3){const t=n.Cartesian3.unpack(f,e,U);c.Matrix4.multiplyByPoint(s,t,t),n.Cartesian3.subtract(t,B,t),n.Cartesian3.pack(t,h,3*w+e),p[A++]=l}const E=u.length;for(let e=0;e<E;++e)b[O+e]=u[e]+w;const G=t+L;g[G]=new C({offset:O,count:E,color:r.Color.fromRgba(x[l]),batchIds:[l]}),y[G]=l,m[G]=O,I[G]=E,M[G]=e.BoundingSphere.transform(a.boundingVolume,s),w+=v/3,O+=E}t.positionOffset=w,t.batchIdIndex=A,t.indexOffset=O,t.batchedIndicesOffset+=l}const S=new n.Cartesian3,V=new c.Matrix4;function T(t,n,i){const a=i.length,o=2+a*e.BoundingSphere.packedLength+1+function(e){const t=e.length;let n=0;for(let i=0;i<t;++i)n+=r.Color.packedLength+3+e[i].batchIds.length;return n}(n),s=new Float64Array(o);let c=0;s[c++]=t,s[c++]=a;for(let t=0;t<a;++t)e.BoundingSphere.pack(i[t],s,c),c+=e.BoundingSphere.packedLength;const d=n.length;s[c++]=d;for(let e=0;e<d;++e){const t=n[e];r.Color.pack(t.color,s,c),c+=r.Color.packedLength,s[c++]=t.offset,s[c++]=t.count;const i=t.batchIds,a=i.length;s[c++]=a;for(let e=0;e<a;++e)s[c++]=i[e]}return s}return d((function(e,r){const d=a.defined(e.boxes)?new Float32Array(e.boxes):void 0,l=a.defined(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,f=a.defined(e.cylinders)?new Float32Array(e.cylinders):void 0,u=a.defined(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,h=a.defined(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,p=a.defined(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,b=a.defined(e.spheres)?new Float32Array(e.spheres):void 0,y=a.defined(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,x=a.defined(d)?l.length:0,g=a.defined(f)?u.length:0,m=a.defined(h)?p.length:0,C=a.defined(b)?y.length:0,I=t.BoxGeometry.getUnitBox(),M=i.CylinderGeometry.getUnitCylinder(),k=o.EllipsoidGeometry.getUnitEllipsoid(),B=I.attributes.position.values,w=M.attributes.position.values,A=k.attributes.position.values;let U=B.length*x;U+=w.length*g,U+=A.length*(m+C);const F=I.indices,R=M.indices,Z=k.indices;let D=F.length*x;D+=R.length*g,D+=Z.length*(m+C);const P=new Float32Array(U),q=new Uint16Array(U/3),W=s.IndexDatatype.createTypedArray(U/3,D),_=x+g+m+C,N=new Uint16Array(_),Y=new Array(_),j=new Uint32Array(_),z=new Uint32Array(_),H=new Array(_);!function(e){const t=new Float64Array(e);let r=0;n.Cartesian3.unpack(t,r,S),r+=n.Cartesian3.packedLength,c.Matrix4.unpack(t,r,V)}(e.packedBuffer);const J={batchTableColors:new Uint32Array(e.batchTableColors),positions:P,vertexBatchIds:q,indices:W,batchIds:N,batchedIndices:Y,indexOffsets:j,indexCounts:z,boundingVolumes:H,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:V,center:S};G(J,d,l,I,O),G(J,f,u,M,L),G(J,h,p,k,v),G(J,b,y,k,E);const K=T(W.BYTES_PER_ELEMENT,Y,H);return r.push(P.buffer,q.buffer,W.buffer),r.push(N.buffer,j.buffer,z.buffer),r.push(K.buffer),{positions:P.buffer,vertexBatchIds:q.buffer,indices:W.buffer,indexOffsets:j.buffer,indexCounts:z.buffer,batchIds:N.buffer,packedBuffer:K.buffer}}))}));
define(["./Transforms-221c7c82","./BoxGeometry-fa81cb29","./Matrix3-aeb3c326","./Color-fb2d0086","./CylinderGeometry-80f4e5fa","./defaultValue-865ac579","./EllipsoidGeometry-78610fac","./IndexDatatype-16f6b4a1","./Matrix2-2fdcdec7","./createTaskProcessorWorker","./Math-76ce6367","./combine-5e110d09","./RuntimeError-9e0724f9","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./GeometryOffsetAttribute-06264989","./VertexFormat-20b5279f","./CylinderGeometryLibrary-f1481b60"],(function(e,t,n,r,a,i,o,s,c,d,l,f,u,h,b,p,y,x,g,m){"use strict";function C(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}const I=new n.Cartesian3,M=c.Matrix4.packedLength+n.Cartesian3.packedLength,k=c.Matrix4.packedLength+2,B=c.Matrix4.packedLength+n.Cartesian3.packedLength,w=n.Cartesian3.packedLength+1,A={modelMatrix:new c.Matrix4,boundingVolume:new e.BoundingSphere};function O(e,t){let r=t*M;const a=n.Cartesian3.unpack(e,r,I);r+=n.Cartesian3.packedLength;const i=c.Matrix4.unpack(e,r,A.modelMatrix);c.Matrix4.multiplyByScale(i,a,i);const o=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=Math.sqrt(3),A}function L(e,t){let r=t*k;const a=e[r++],i=e[r++],o=n.Cartesian3.fromElements(a,a,i,I),s=c.Matrix4.unpack(e,r,A.modelMatrix);c.Matrix4.multiplyByScale(s,o,s);const d=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,d.center),d.radius=Math.sqrt(2),A}function v(e,t){let r=t*B;const a=n.Cartesian3.unpack(e,r,I);r+=n.Cartesian3.packedLength;const i=c.Matrix4.unpack(e,r,A.modelMatrix);c.Matrix4.multiplyByScale(i,a,i);const o=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,o.center),o.radius=1,A}function E(e,t){let r=t*w;const a=e[r++],i=n.Cartesian3.unpack(e,r,I),o=c.Matrix4.fromTranslation(i,A.modelMatrix);c.Matrix4.multiplyByUniformScale(o,a,o);const s=A.boundingVolume;return n.Cartesian3.clone(n.Cartesian3.ZERO,s.center),s.radius=1,A}const U=new n.Cartesian3;function G(t,a,o,s,d){if(!i.defined(a))return;const l=o.length,f=s.attributes.position.values,u=s.indices,h=t.positions,b=t.vertexBatchIds,p=t.indices,y=t.batchIds,x=t.batchTableColors,g=t.batchedIndices,m=t.indexOffsets,I=t.indexCounts,M=t.boundingVolumes,k=t.modelMatrix,B=t.center;let w=t.positionOffset,A=t.batchIdIndex,O=t.indexOffset;const L=t.batchedIndicesOffset;for(let t=0;t<l;++t){const i=d(a,t),s=i.modelMatrix;c.Matrix4.multiply(k,s,s);const l=o[t],v=f.length;for(let e=0;e<v;e+=3){const t=n.Cartesian3.unpack(f,e,U);c.Matrix4.multiplyByPoint(s,t,t),n.Cartesian3.subtract(t,B,t),n.Cartesian3.pack(t,h,3*w+e),b[A++]=l}const E=u.length;for(let e=0;e<E;++e)p[O+e]=u[e]+w;const G=t+L;g[G]=new C({offset:O,count:E,color:r.Color.fromRgba(x[l]),batchIds:[l]}),y[G]=l,m[G]=O,I[G]=E,M[G]=e.BoundingSphere.transform(i.boundingVolume,s),w+=v/3,O+=E}t.positionOffset=w,t.batchIdIndex=A,t.indexOffset=O,t.batchedIndicesOffset+=l}const S=new n.Cartesian3,V=new c.Matrix4;function T(t,n,a){const i=a.length,o=2+i*e.BoundingSphere.packedLength+1+function(e){const t=e.length;let n=0;for(let a=0;a<t;++a)n+=r.Color.packedLength+3+e[a].batchIds.length;return n}(n),s=new Float64Array(o);let c=0;s[c++]=t,s[c++]=i;for(let t=0;t<i;++t)e.BoundingSphere.pack(a[t],s,c),c+=e.BoundingSphere.packedLength;const d=n.length;s[c++]=d;for(let e=0;e<d;++e){const t=n[e];r.Color.pack(t.color,s,c),c+=r.Color.packedLength,s[c++]=t.offset,s[c++]=t.count;const a=t.batchIds,i=a.length;s[c++]=i;for(let e=0;e<i;++e)s[c++]=a[e]}return s}return d((function(e,r){const d=i.defined(e.boxes)?new Float32Array(e.boxes):void 0,l=i.defined(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,f=i.defined(e.cylinders)?new Float32Array(e.cylinders):void 0,u=i.defined(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,h=i.defined(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,b=i.defined(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,p=i.defined(e.spheres)?new Float32Array(e.spheres):void 0,y=i.defined(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,x=i.defined(d)?l.length:0,g=i.defined(f)?u.length:0,m=i.defined(h)?b.length:0,C=i.defined(p)?y.length:0,I=t.BoxGeometry.getUnitBox(),M=a.CylinderGeometry.getUnitCylinder(),k=o.EllipsoidGeometry.getUnitEllipsoid(),B=I.attributes.position.values,w=M.attributes.position.values,A=k.attributes.position.values;let U=B.length*x;U+=w.length*g,U+=A.length*(m+C);const F=I.indices,R=M.indices,Z=k.indices;let D=F.length*x;D+=R.length*g,D+=Z.length*(m+C);const P=new Float32Array(U),q=new Uint16Array(U/3),W=s.IndexDatatype.createTypedArray(U/3,D),_=x+g+m+C,N=new Uint16Array(_),Y=new Array(_),j=new Uint32Array(_),z=new Uint32Array(_),H=new Array(_);!function(e){const t=new Float64Array(e);let r=0;n.Cartesian3.unpack(t,r,S),r+=n.Cartesian3.packedLength,c.Matrix4.unpack(t,r,V)}(e.packedBuffer);const J={batchTableColors:new Uint32Array(e.batchTableColors),positions:P,vertexBatchIds:q,indices:W,batchIds:N,batchedIndices:Y,indexOffsets:j,indexCounts:z,boundingVolumes:H,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:V,center:S};G(J,d,l,I,O),G(J,f,u,M,L),G(J,h,b,k,v),G(J,p,y,k,E);const K=T(W.BYTES_PER_ELEMENT,Y,H);return r.push(P.buffer,q.buffer,W.buffer),r.push(N.buffer,j.buffer,z.buffer),r.push(K.buffer),{positions:P.buffer,vertexBatchIds:q.buffer,indices:W.buffer,indexOffsets:j.buffer,indexCounts:z.buffer,batchIds:N.buffer,packedBuffer:K.buffer}}))}));
public/CIMSDK/Workers/createVectorTilePoints.js
@@ -1 +1 @@
define(["./AttributeCompression-b9d605fe","./Matrix3-6e56fbc7","./Math-76ce6367","./Matrix2-23dd5853","./createTaskProcessorWorker","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./WebGLConstants-258cf3a0","./RuntimeError-9e0724f9"],(function(e,t,a,r,n,o,i,s,c){"use strict";const u=32767,p=new t.Cartographic,l=new t.Cartesian3,f=new r.Rectangle,d=new t.Ellipsoid,m={min:void 0,max:void 0};return n((function(n,o){const i=new Uint16Array(n.positions);!function(e){e=new Float64Array(e);let a=0;m.min=e[a++],m.max=e[a++],r.Rectangle.unpack(e,a,f),a+=r.Rectangle.packedLength,t.Ellipsoid.unpack(e,a,d)}(n.packedBuffer);const s=f,c=d,h=m.min,C=m.max,g=i.length/3,b=i.subarray(0,g),w=i.subarray(g,2*g),k=i.subarray(2*g,3*g);e.AttributeCompression.zigZagDeltaDecode(b,w,k);const y=new Float64Array(i.length);for(let e=0;e<g;++e){const r=b[e],n=w[e],o=k[e],i=a.CesiumMath.lerp(s.west,s.east,r/u),f=a.CesiumMath.lerp(s.south,s.north,n/u),d=a.CesiumMath.lerp(h,C,o/u),m=t.Cartographic.fromRadians(i,f,d,p),g=c.cartographicToCartesian(m,l);t.Cartesian3.pack(g,y,3*e)}return o.push(y.buffer),{positions:y.buffer}}))}));
define(["./AttributeCompression-10297289","./Matrix3-aeb3c326","./Math-76ce6367","./Matrix2-2fdcdec7","./createTaskProcessorWorker","./ComponentDatatype-985dcc38","./defaultValue-865ac579","./WebGLConstants-258cf3a0","./RuntimeError-9e0724f9"],(function(e,t,a,r,n,o,i,s,c){"use strict";const u=32767,p=new t.Cartographic,l=new t.Cartesian3,f=new r.Rectangle,m=new t.Ellipsoid,d={min:void 0,max:void 0};return n((function(n,o){const i=new Uint16Array(n.positions);!function(e){e=new Float64Array(e);let a=0;d.min=e[a++],d.max=e[a++],r.Rectangle.unpack(e,a,f),a+=r.Rectangle.packedLength,t.Ellipsoid.unpack(e,a,m)}(n.packedBuffer);const s=f,c=m,h=d.min,C=d.max,g=i.length/3,b=i.subarray(0,g),w=i.subarray(g,2*g),k=i.subarray(2*g,3*g);e.AttributeCompression.zigZagDeltaDecode(b,w,k);const y=new Float64Array(i.length);for(let e=0;e<g;++e){const r=b[e],n=w[e],o=k[e],i=a.CesiumMath.lerp(s.west,s.east,r/u),f=a.CesiumMath.lerp(s.south,s.north,n/u),m=a.CesiumMath.lerp(h,C,o/u),d=t.Cartographic.fromRadians(i,f,m,p),g=c.cartographicToCartesian(d,l);t.Cartesian3.pack(g,y,3*e)}return o.push(y.buffer),{positions:y.buffer}}))}));
public/CIMSDK/Workers/createVectorTilePolygons.js
@@ -1 +1 @@
define(["./AttributeCompression-b9d605fe","./Matrix3-6e56fbc7","./Color-fc2285fc","./defaultValue-865ac579","./IndexDatatype-16f6b4a1","./Math-76ce6367","./OrientedBoundingBox-ef95f619","./Matrix2-23dd5853","./createTaskProcessorWorker","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./Transforms-f3654378","./combine-5e110d09","./RuntimeError-9e0724f9","./EllipsoidTangentPlane-2129690e","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0"],(function(e,t,n,a,r,o,i,s,c,f,d,l,u,h,g,p,b,m){"use strict";const y=new t.Cartesian3,C=new t.Ellipsoid,I=new s.Rectangle,x={min:void 0,max:void 0,indexBytesPerElement:void 0};function w(e,t,a){const r=t.length,o=2+r*i.OrientedBoundingBox.packedLength+1+function(e){const t=e.length;let a=0;for(let r=0;r<t;++r)a+=n.Color.packedLength+3+e[r].batchIds.length;return a}(a),s=new Float64Array(o);let c=0;s[c++]=e,s[c++]=r;for(let e=0;e<r;++e)i.OrientedBoundingBox.pack(t[e],s,c),c+=i.OrientedBoundingBox.packedLength;const f=a.length;s[c++]=f;for(let e=0;e<f;++e){const t=a[e];n.Color.pack(t.color,s,c),c+=n.Color.packedLength,s[c++]=t.offset,s[c++]=t.count;const r=t.batchIds,o=r.length;s[c++]=o;for(let e=0;e<o;++e)s[c++]=r[e]}return s}const A=new t.Cartesian3,E=new t.Cartesian3,N=new t.Cartesian3,T=new t.Cartesian3,B=new t.Cartesian3,k=new t.Cartographic,L=new s.Rectangle;return c((function(c,f){let d;!function(e){const n=new Float64Array(e);let a=0;x.indexBytesPerElement=n[a++],x.min=n[a++],x.max=n[a++],t.Cartesian3.unpack(n,a,y),a+=t.Cartesian3.packedLength,t.Ellipsoid.unpack(n,a,C),a+=t.Ellipsoid.packedLength,s.Rectangle.unpack(n,a,I)}(c.packedBuffer),d=2===x.indexBytesPerElement?new Uint16Array(c.indices):new Uint32Array(c.indices);const l=new Uint16Array(c.positions),u=new Uint32Array(c.counts),h=new Uint32Array(c.indexCounts),g=new Uint32Array(c.batchIds),p=new Uint32Array(c.batchTableColors),b=new Array(u.length),m=y,O=C;let U=I;const P=x.min,F=x.max;let M,S,D,R=c.minimumHeights,_=c.maximumHeights;a.defined(R)&&a.defined(_)&&(R=new Float32Array(R),_=new Float32Array(_));const G=l.length/2,V=l.subarray(0,G),Y=l.subarray(G,2*G);e.AttributeCompression.zigZagDeltaDecode(V,Y);const v=new Float64Array(3*G);for(M=0;M<G;++M){const e=V[M],n=Y[M],a=o.CesiumMath.lerp(U.west,U.east,e/32767),r=o.CesiumMath.lerp(U.south,U.north,n/32767),i=t.Cartographic.fromRadians(a,r,0,k),s=O.cartographicToCartesian(i,A);t.Cartesian3.pack(s,v,3*M)}const H=u.length,W=new Array(H),z=new Array(H);let Z=0,j=0;for(M=0;M<H;++M)W[M]=Z,z[M]=j,Z+=u[M],j+=h[M];const q=new Float32Array(3*G*2),J=new Uint16Array(2*G),K=new Uint32Array(z.length),Q=new Uint32Array(h.length);let X=[];const $={};for(M=0;M<H;++M)D=p[M],a.defined($[D])?($[D].positionLength+=u[M],$[D].indexLength+=h[M],$[D].batchIds.push(M)):$[D]={positionLength:u[M],indexLength:h[M],offset:0,indexOffset:0,batchIds:[M]};let ee,te=0,ne=0;for(D in $)if($.hasOwnProperty(D)){ee=$[D],ee.offset=te,ee.indexOffset=ne;const e=2*ee.positionLength,t=2*ee.indexLength+6*ee.positionLength;te+=e,ne+=t,ee.indexLength=t}const ae=[];for(D in $)$.hasOwnProperty(D)&&(ee=$[D],ae.push({color:n.Color.fromRgba(parseInt(D)),offset:ee.indexOffset,count:ee.indexLength,batchIds:ee.batchIds}));for(M=0;M<H;++M){D=p[M],ee=$[D];const e=ee.offset;let n=3*e,r=e;const o=W[M],s=u[M],c=g[M];let f=P,l=F;a.defined(R)&&a.defined(_)&&(f=R[M],l=_[M]);let y=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(S=0;S<s;++S){const e=t.Cartesian3.unpack(v,3*o+3*S,A);O.scaleToGeodeticSurface(e,e);const a=O.cartesianToCartographic(e,k),i=a.latitude,s=a.longitude;y=Math.min(i,y),C=Math.max(i,C),I=Math.min(s,I),x=Math.max(s,x);const d=O.geodeticSurfaceNormal(e,E);let u=t.Cartesian3.multiplyByScalar(d,f,N);const h=t.Cartesian3.add(e,u,T);u=t.Cartesian3.multiplyByScalar(d,l,u);const g=t.Cartesian3.add(e,u,B);t.Cartesian3.subtract(g,m,g),t.Cartesian3.subtract(h,m,h),t.Cartesian3.pack(g,q,n),t.Cartesian3.pack(h,q,n+3),J[r]=c,J[r+1]=c,n+=6,r+=2}U=L,U.west=I,U.east=x,U.south=y,U.north=C,b[M]=i.OrientedBoundingBox.fromRectangle(U,P,F,O);let w=ee.indexOffset;const G=z[M],V=h[M];for(K[M]=w,S=0;S<V;S+=3){const t=d[G+S]-o,n=d[G+S+1]-o,a=d[G+S+2]-o;X[w++]=2*t+e,X[w++]=2*n+e,X[w++]=2*a+e,X[w++]=2*a+1+e,X[w++]=2*n+1+e,X[w++]=2*t+1+e}for(S=0;S<s;++S){const t=S,n=(S+1)%s;X[w++]=2*t+1+e,X[w++]=2*n+e,X[w++]=2*t+e,X[w++]=2*t+1+e,X[w++]=2*n+1+e,X[w++]=2*n+e}ee.offset+=2*s,ee.indexOffset=w,Q[M]=w-K[M]}X=r.IndexDatatype.createTypedArray(q.length/3,X);const re=ae.length;for(let e=0;e<re;++e){const t=ae[e].batchIds;let n=0;const a=t.length;for(let e=0;e<a;++e)n+=Q[t[e]];ae[e].count=n}const oe=w(2===X.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,b,ae);return f.push(q.buffer,X.buffer,K.buffer,Q.buffer,J.buffer,oe.buffer),{positions:q.buffer,indices:X.buffer,indexOffsets:K.buffer,indexCounts:Q.buffer,batchIds:J.buffer,packedBuffer:oe.buffer}}))}));
define(["./AttributeCompression-10297289","./Matrix3-aeb3c326","./Color-fb2d0086","./defaultValue-865ac579","./IndexDatatype-16f6b4a1","./Math-76ce6367","./OrientedBoundingBox-34fc6856","./Matrix2-2fdcdec7","./createTaskProcessorWorker","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./Transforms-221c7c82","./combine-5e110d09","./RuntimeError-9e0724f9","./EllipsoidTangentPlane-a9681249","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(e,t,n,a,r,o,i,s,c,f,d,l,u,h,g,p,b,m){"use strict";const y=new t.Cartesian3,C=new t.Ellipsoid,I=new s.Rectangle,x={min:void 0,max:void 0,indexBytesPerElement:void 0};function w(e,t,a){const r=t.length,o=2+r*i.OrientedBoundingBox.packedLength+1+function(e){const t=e.length;let a=0;for(let r=0;r<t;++r)a+=n.Color.packedLength+3+e[r].batchIds.length;return a}(a),s=new Float64Array(o);let c=0;s[c++]=e,s[c++]=r;for(let e=0;e<r;++e)i.OrientedBoundingBox.pack(t[e],s,c),c+=i.OrientedBoundingBox.packedLength;const f=a.length;s[c++]=f;for(let e=0;e<f;++e){const t=a[e];n.Color.pack(t.color,s,c),c+=n.Color.packedLength,s[c++]=t.offset,s[c++]=t.count;const r=t.batchIds,o=r.length;s[c++]=o;for(let e=0;e<o;++e)s[c++]=r[e]}return s}const A=new t.Cartesian3,E=new t.Cartesian3,N=new t.Cartesian3,T=new t.Cartesian3,B=new t.Cartesian3,k=new t.Cartographic,L=new s.Rectangle;return c((function(c,f){let d;!function(e){const n=new Float64Array(e);let a=0;x.indexBytesPerElement=n[a++],x.min=n[a++],x.max=n[a++],t.Cartesian3.unpack(n,a,y),a+=t.Cartesian3.packedLength,t.Ellipsoid.unpack(n,a,C),a+=t.Ellipsoid.packedLength,s.Rectangle.unpack(n,a,I)}(c.packedBuffer),d=2===x.indexBytesPerElement?new Uint16Array(c.indices):new Uint32Array(c.indices);const l=new Uint16Array(c.positions),u=new Uint32Array(c.counts),h=new Uint32Array(c.indexCounts),g=new Uint32Array(c.batchIds),p=new Uint32Array(c.batchTableColors),b=new Array(u.length),m=y,O=C;let U=I;const P=x.min,F=x.max;let M,S,D,R=c.minimumHeights,_=c.maximumHeights;a.defined(R)&&a.defined(_)&&(R=new Float32Array(R),_=new Float32Array(_));const G=l.length/2,V=l.subarray(0,G),Y=l.subarray(G,2*G);e.AttributeCompression.zigZagDeltaDecode(V,Y);const v=new Float64Array(3*G);for(M=0;M<G;++M){const e=V[M],n=Y[M],a=o.CesiumMath.lerp(U.west,U.east,e/32767),r=o.CesiumMath.lerp(U.south,U.north,n/32767),i=t.Cartographic.fromRadians(a,r,0,k),s=O.cartographicToCartesian(i,A);t.Cartesian3.pack(s,v,3*M)}const H=u.length,W=new Array(H),z=new Array(H);let Z=0,j=0;for(M=0;M<H;++M)W[M]=Z,z[M]=j,Z+=u[M],j+=h[M];const q=new Float32Array(3*G*2),J=new Uint16Array(2*G),K=new Uint32Array(z.length),Q=new Uint32Array(h.length);let X=[];const $={};for(M=0;M<H;++M)D=p[M],a.defined($[D])?($[D].positionLength+=u[M],$[D].indexLength+=h[M],$[D].batchIds.push(M)):$[D]={positionLength:u[M],indexLength:h[M],offset:0,indexOffset:0,batchIds:[M]};let ee,te=0,ne=0;for(D in $)if($.hasOwnProperty(D)){ee=$[D],ee.offset=te,ee.indexOffset=ne;const e=2*ee.positionLength,t=2*ee.indexLength+6*ee.positionLength;te+=e,ne+=t,ee.indexLength=t}const ae=[];for(D in $)$.hasOwnProperty(D)&&(ee=$[D],ae.push({color:n.Color.fromRgba(parseInt(D)),offset:ee.indexOffset,count:ee.indexLength,batchIds:ee.batchIds}));for(M=0;M<H;++M){D=p[M],ee=$[D];const e=ee.offset;let n=3*e,r=e;const o=W[M],s=u[M],c=g[M];let f=P,l=F;a.defined(R)&&a.defined(_)&&(f=R[M],l=_[M]);let y=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(S=0;S<s;++S){const e=t.Cartesian3.unpack(v,3*o+3*S,A);O.scaleToGeodeticSurface(e,e);const a=O.cartesianToCartographic(e,k),i=a.latitude,s=a.longitude;y=Math.min(i,y),C=Math.max(i,C),I=Math.min(s,I),x=Math.max(s,x);const d=O.geodeticSurfaceNormal(e,E);let u=t.Cartesian3.multiplyByScalar(d,f,N);const h=t.Cartesian3.add(e,u,T);u=t.Cartesian3.multiplyByScalar(d,l,u);const g=t.Cartesian3.add(e,u,B);t.Cartesian3.subtract(g,m,g),t.Cartesian3.subtract(h,m,h),t.Cartesian3.pack(g,q,n),t.Cartesian3.pack(h,q,n+3),J[r]=c,J[r+1]=c,n+=6,r+=2}U=L,U.west=I,U.east=x,U.south=y,U.north=C,b[M]=i.OrientedBoundingBox.fromRectangle(U,P,F,O);let w=ee.indexOffset;const G=z[M],V=h[M];for(K[M]=w,S=0;S<V;S+=3){const t=d[G+S]-o,n=d[G+S+1]-o,a=d[G+S+2]-o;X[w++]=2*t+e,X[w++]=2*n+e,X[w++]=2*a+e,X[w++]=2*a+1+e,X[w++]=2*n+1+e,X[w++]=2*t+1+e}for(S=0;S<s;++S){const t=S,n=(S+1)%s;X[w++]=2*t+1+e,X[w++]=2*n+e,X[w++]=2*t+e,X[w++]=2*t+1+e,X[w++]=2*n+1+e,X[w++]=2*n+e}ee.offset+=2*s,ee.indexOffset=w,Q[M]=w-K[M]}X=r.IndexDatatype.createTypedArray(q.length/3,X);const re=ae.length;for(let e=0;e<re;++e){const t=ae[e].batchIds;let n=0;const a=t.length;for(let e=0;e<a;++e)n+=Q[t[e]];ae[e].count=n}const oe=w(2===X.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,b,ae);return f.push(q.buffer,X.buffer,K.buffer,Q.buffer,J.buffer,oe.buffer),{positions:q.buffer,indices:X.buffer,indexOffsets:K.buffer,indexCounts:Q.buffer,batchIds:J.buffer,packedBuffer:oe.buffer}}))}));
public/CIMSDK/Workers/createVectorTilePolylines.js
@@ -1 +1 @@
define(["./Matrix3-6e56fbc7","./combine-5e110d09","./AttributeCompression-b9d605fe","./Math-76ce6367","./IndexDatatype-16f6b4a1","./Matrix2-23dd5853","./createTaskProcessorWorker","./defaultValue-865ac579","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./RuntimeError-9e0724f9"],(function(e,t,a,n,r,s,i,o,c,u,f){"use strict";const p=32767,d=new e.Cartographic,l=new e.Cartesian3;const C=new s.Rectangle,b=new e.Ellipsoid,w=new e.Cartesian3,h={min:void 0,max:void 0};const y=new e.Cartesian3,k=new e.Cartesian3,m=new e.Cartesian3,A=new e.Cartesian3,g=new e.Cartesian3;return i((function(i,o){const c=new Uint16Array(i.positions),u=new Uint16Array(i.widths),f=new Uint32Array(i.counts),x=new Uint16Array(i.batchIds);!function(t){t=new Float64Array(t);let a=0;h.min=t[a++],h.max=t[a++],s.Rectangle.unpack(t,a,C),a+=s.Rectangle.packedLength,e.Ellipsoid.unpack(t,a,b),a+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(t,a,w)}(i.packedBuffer);const D=b,E=w,I=function(t,r,s,i,o){const c=t.length/3,u=t.subarray(0,c),f=t.subarray(c,2*c),C=t.subarray(2*c,3*c);a.AttributeCompression.zigZagDeltaDecode(u,f,C);const b=new Float64Array(t.length);for(let t=0;t<c;++t){const a=u[t],c=f[t],w=C[t],h=n.CesiumMath.lerp(r.west,r.east,a/p),y=n.CesiumMath.lerp(r.south,r.north,c/p),k=n.CesiumMath.lerp(s,i,w/p),m=e.Cartographic.fromRadians(h,y,k,d),A=o.cartographicToCartesian(m,l);e.Cartesian3.pack(A,b,3*t)}return b}(c,C,h.min,h.max,D),P=I.length/3,U=4*P-4,M=new Float32Array(3*U),R=new Float32Array(3*U),T=new Float32Array(3*U),F=new Float32Array(2*U),N=new Uint16Array(U);let L,S=0,_=0,v=0,G=0,W=f.length;for(L=0;L<W;++L){const t=f[L],a=u[L],n=x[L];for(let r=0;r<t;++r){let s;if(0===r){const t=e.Cartesian3.unpack(I,3*G,y),a=e.Cartesian3.unpack(I,3*(G+1),k);s=e.Cartesian3.subtract(t,a,m),e.Cartesian3.add(t,s,s)}else s=e.Cartesian3.unpack(I,3*(G+r-1),m);const i=e.Cartesian3.unpack(I,3*(G+r),A);let o;if(r===t-1){const a=e.Cartesian3.unpack(I,3*(G+t-1),y),n=e.Cartesian3.unpack(I,3*(G+t-2),k);o=e.Cartesian3.subtract(a,n,g),e.Cartesian3.add(a,o,o)}else o=e.Cartesian3.unpack(I,3*(G+r+1),g);e.Cartesian3.subtract(s,E,s),e.Cartesian3.subtract(i,E,i),e.Cartesian3.subtract(o,E,o);const c=r===t-1?2:4;for(let t=0===r?2:0;t<c;++t){e.Cartesian3.pack(i,M,S),e.Cartesian3.pack(s,R,S),e.Cartesian3.pack(o,T,S),S+=3;const r=t-2<0?-1:1;F[_++]=t%2*2-1,F[_++]=r*a,N[v++]=n}}G+=t}const B=r.IndexDatatype.createTypedArray(U,6*P-6);let O=0,z=0;for(W=P-1,L=0;L<W;++L)B[z++]=O,B[z++]=O+2,B[z++]=O+1,B[z++]=O+1,B[z++]=O+2,B[z++]=O+3,O+=4;o.push(M.buffer,R.buffer,T.buffer),o.push(F.buffer,N.buffer,B.buffer);let H={indexDatatype:2===B.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,currentPositions:M.buffer,previousPositions:R.buffer,nextPositions:T.buffer,expandAndWidth:F.buffer,batchIds:N.buffer,indices:B.buffer};if(i.keepDecodedPositions){const e=function(e){const t=e.length,a=new Uint32Array(t+1);let n=0;for(let r=0;r<t;++r)a[r]=n,n+=e[r];return a[t]=n,a}(f);o.push(I.buffer,e.buffer),H=t.combine(H,{decodedPositions:I.buffer,decodedPositionOffsets:e.buffer})}return H}))}));
define(["./Matrix3-aeb3c326","./combine-5e110d09","./AttributeCompression-10297289","./Math-76ce6367","./IndexDatatype-16f6b4a1","./Matrix2-2fdcdec7","./createTaskProcessorWorker","./defaultValue-865ac579","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./RuntimeError-9e0724f9"],(function(e,t,a,n,r,s,i,o,c,u,f){"use strict";const p=32767,d=new e.Cartographic,l=new e.Cartesian3;const C=new s.Rectangle,b=new e.Ellipsoid,w=new e.Cartesian3,h={min:void 0,max:void 0};const y=new e.Cartesian3,k=new e.Cartesian3,m=new e.Cartesian3,A=new e.Cartesian3,g=new e.Cartesian3;return i((function(i,o){const c=new Uint16Array(i.positions),u=new Uint16Array(i.widths),f=new Uint32Array(i.counts),x=new Uint16Array(i.batchIds);!function(t){t=new Float64Array(t);let a=0;h.min=t[a++],h.max=t[a++],s.Rectangle.unpack(t,a,C),a+=s.Rectangle.packedLength,e.Ellipsoid.unpack(t,a,b),a+=e.Ellipsoid.packedLength,e.Cartesian3.unpack(t,a,w)}(i.packedBuffer);const D=b,E=w,I=function(t,r,s,i,o){const c=t.length/3,u=t.subarray(0,c),f=t.subarray(c,2*c),C=t.subarray(2*c,3*c);a.AttributeCompression.zigZagDeltaDecode(u,f,C);const b=new Float64Array(t.length);for(let t=0;t<c;++t){const a=u[t],c=f[t],w=C[t],h=n.CesiumMath.lerp(r.west,r.east,a/p),y=n.CesiumMath.lerp(r.south,r.north,c/p),k=n.CesiumMath.lerp(s,i,w/p),m=e.Cartographic.fromRadians(h,y,k,d),A=o.cartographicToCartesian(m,l);e.Cartesian3.pack(A,b,3*t)}return b}(c,C,h.min,h.max,D),P=I.length/3,U=4*P-4,M=new Float32Array(3*U),R=new Float32Array(3*U),T=new Float32Array(3*U),F=new Float32Array(2*U),N=new Uint16Array(U);let L,S=0,_=0,v=0,G=0,W=f.length;for(L=0;L<W;++L){const t=f[L],a=u[L],n=x[L];for(let r=0;r<t;++r){let s;if(0===r){const t=e.Cartesian3.unpack(I,3*G,y),a=e.Cartesian3.unpack(I,3*(G+1),k);s=e.Cartesian3.subtract(t,a,m),e.Cartesian3.add(t,s,s)}else s=e.Cartesian3.unpack(I,3*(G+r-1),m);const i=e.Cartesian3.unpack(I,3*(G+r),A);let o;if(r===t-1){const a=e.Cartesian3.unpack(I,3*(G+t-1),y),n=e.Cartesian3.unpack(I,3*(G+t-2),k);o=e.Cartesian3.subtract(a,n,g),e.Cartesian3.add(a,o,o)}else o=e.Cartesian3.unpack(I,3*(G+r+1),g);e.Cartesian3.subtract(s,E,s),e.Cartesian3.subtract(i,E,i),e.Cartesian3.subtract(o,E,o);const c=r===t-1?2:4;for(let t=0===r?2:0;t<c;++t){e.Cartesian3.pack(i,M,S),e.Cartesian3.pack(s,R,S),e.Cartesian3.pack(o,T,S),S+=3;const r=t-2<0?-1:1;F[_++]=t%2*2-1,F[_++]=r*a,N[v++]=n}}G+=t}const B=r.IndexDatatype.createTypedArray(U,6*P-6);let O=0,z=0;for(W=P-1,L=0;L<W;++L)B[z++]=O,B[z++]=O+2,B[z++]=O+1,B[z++]=O+1,B[z++]=O+2,B[z++]=O+3,O+=4;o.push(M.buffer,R.buffer,T.buffer),o.push(F.buffer,N.buffer,B.buffer);let H={indexDatatype:2===B.BYTES_PER_ELEMENT?r.IndexDatatype.UNSIGNED_SHORT:r.IndexDatatype.UNSIGNED_INT,currentPositions:M.buffer,previousPositions:R.buffer,nextPositions:T.buffer,expandAndWidth:F.buffer,batchIds:N.buffer,indices:B.buffer};if(i.keepDecodedPositions){const e=function(e){const t=e.length,a=new Uint32Array(t+1);let n=0;for(let r=0;r<t;++r)a[r]=n,n+=e[r];return a[t]=n,a}(f);o.push(I.buffer,e.buffer),H=t.combine(H,{decodedPositions:I.buffer,decodedPositionOffsets:e.buffer})}return H}))}));
public/CIMSDK/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
@@ -1 +1 @@
define(["./AxisAlignedBoundingBox-d1a0c6e6","./Transforms-f3654378","./Matrix2-23dd5853","./Matrix3-6e56fbc7","./defaultValue-865ac579","./TerrainEncoding-1a72b96a","./Math-76ce6367","./OrientedBoundingBox-ef95f619","./RuntimeError-9e0724f9","./WebMercatorProjection-ab4c1f3a","./createTaskProcessorWorker","./combine-5e110d09","./AttributeCompression-b9d605fe","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-2129690e","./IntersectionTests-63574cfd","./Plane-4befcca0"],(function(t,e,n,i,o,a,r,s,c,u,h,d,l,g,m,p,f,I){"use strict";const E=Uint16Array.BYTES_PER_ELEMENT,T=Int32Array.BYTES_PER_ELEMENT,C=Uint32Array.BYTES_PER_ELEMENT,M=Float32Array.BYTES_PER_ELEMENT,x=Float64Array.BYTES_PER_ELEMENT;function N(t,e,n){n=o.defaultValue(n,r.CesiumMath);const i=t.length;for(let o=0;o<i;++o)if(n.equalsEpsilon(t[o],e,r.CesiumMath.EPSILON12))return o;return-1}const b=new i.Cartographic,S=new i.Cartesian3,w=new i.Cartesian3,B=new i.Cartesian3,P=new n.Matrix4;function A(t,e,a,s,c,u,h,d,l,g,m){const p=d.length;for(let f=0;f<p;++f){const I=d[f],E=I.cartographic,T=I.index,C=t.length,M=E.longitude;let x=E.latitude;x=r.CesiumMath.clamp(x,-r.CesiumMath.PI_OVER_TWO,r.CesiumMath.PI_OVER_TWO);const N=E.height-h.skirtHeight;h.hMin=Math.min(h.hMin,N),i.Cartographic.fromRadians(M,x,N,b),g&&(b.longitude+=l),g?f===p-1?b.latitude+=m:0===f&&(b.latitude-=m):b.latitude+=l;const w=h.ellipsoid.cartographicToCartesian(b);t.push(w),e.push(N),a.push(n.Cartesian2.clone(a[T])),s.length>0&&s.push(s[T]),c.length>0&&c.push(c[T]),n.Matrix4.multiplyByPoint(h.toENU,w,S);const B=h.minimum,P=h.maximum;i.Cartesian3.minimumByComponent(S,B,B),i.Cartesian3.maximumByComponent(S,P,P);const A=h.lastBorderPoint;if(o.defined(A)){const t=A.index;u.push(t,C-1,C,C,T,t)}h.lastBorderPoint=I}}return h((function(h,d){h.ellipsoid=i.Ellipsoid.clone(h.ellipsoid),h.rectangle=n.Rectangle.clone(h.rectangle);const l=function(h,d,l,g,m,p,f,I,y,R,_){let W,v,F,O,V,Y;o.defined(g)?(W=g.west,v=g.south,F=g.east,O=g.north,V=g.width,Y=g.height):(W=r.CesiumMath.toRadians(m.west),v=r.CesiumMath.toRadians(m.south),F=r.CesiumMath.toRadians(m.east),O=r.CesiumMath.toRadians(m.north),V=r.CesiumMath.toRadians(g.width),Y=r.CesiumMath.toRadians(g.height));const U=[v,O],k=[W,F],H=e.Transforms.eastNorthUpToFixedFrame(d,l),L=n.Matrix4.inverseTransformation(H,P);let D,G;y&&(D=u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(v),G=1/(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(O)-D));const j=1!==p,z=new DataView(h);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY;const K=w;K.x=Number.POSITIVE_INFINITY,K.y=Number.POSITIVE_INFINITY,K.z=Number.POSITIVE_INFINITY;const Q=B;Q.x=Number.NEGATIVE_INFINITY,Q.y=Number.NEGATIVE_INFINITY,Q.z=Number.NEGATIVE_INFINITY;let X,Z,$=0,tt=0,et=0;for(Z=0;Z<4;++Z){let t=$;X=z.getUint32(t,!0),t+=C;const e=r.CesiumMath.toRadians(180*z.getFloat64(t,!0));t+=x,-1===N(k,e)&&k.push(e);const n=r.CesiumMath.toRadians(180*z.getFloat64(t,!0));t+=x,-1===N(U,n)&&U.push(n),t+=2*x;let i=z.getInt32(t,!0);t+=T,tt+=i,i=z.getInt32(t,!0),et+=3*i,$+=X+C}const nt=[],it=[],ot=new Array(tt),at=new Array(tt),rt=new Array(tt),st=y?new Array(tt):[],ct=j?new Array(tt):[],ut=new Array(et),ht=[],dt=[],lt=[],gt=[];let mt=0,pt=0;for($=0,Z=0;Z<4;++Z){X=z.getUint32($,!0),$+=C;const t=$,e=r.CesiumMath.toRadians(180*z.getFloat64($,!0));$+=x;const o=r.CesiumMath.toRadians(180*z.getFloat64($,!0));$+=x;const a=r.CesiumMath.toRadians(180*z.getFloat64($,!0)),s=.5*a;$+=x;const h=r.CesiumMath.toRadians(180*z.getFloat64($,!0)),d=.5*h;$+=x;const g=z.getInt32($,!0);$+=T;const m=z.getInt32($,!0);$+=T,$+=T;const p=new Array(g);for(let t=0;t<g;++t){const c=e+z.getUint8($++)*a;b.longitude=c;const g=o+z.getUint8($++)*h;b.latitude=g;let m=z.getFloat32($,!0);if($+=M,0!==m&&m<_&&(m*=-Math.pow(2,R)),m*=6371010,b.height=m,-1!==N(k,c)||-1!==N(U,g)){const e=N(nt,b,i.Cartographic);if(-1!==e){p[t]=it[e];continue}nt.push(i.Cartographic.clone(b)),it.push(mt)}p[t]=mt,Math.abs(c-W)<s?ht.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(c-F)<s?lt.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(g-v)<d?dt.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(g-O)<d&&gt.push({index:mt,cartographic:i.Cartographic.clone(b)}),q=Math.min(m,q),J=Math.max(m,J),rt[mt]=m;const f=l.cartographicToCartesian(b);if(ot[mt]=f,y&&(st[mt]=(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(g)-D)*G),j){const t=l.geodeticSurfaceNormal(f);ct[mt]=t}n.Matrix4.multiplyByPoint(L,f,S),i.Cartesian3.minimumByComponent(S,K,K),i.Cartesian3.maximumByComponent(S,Q,Q);let I=(c-W)/(F-W);I=r.CesiumMath.clamp(I,0,1);let E=(g-v)/(O-v);E=r.CesiumMath.clamp(E,0,1),at[mt]=new n.Cartesian2(I,E),++mt}const f=3*m;for(let t=0;t<f;++t,++pt)ut[pt]=p[z.getUint16($,!0)],$+=E;if(X!==$-t)throw new c.RuntimeError("Invalid terrain tile.")}ot.length=mt,at.length=mt,rt.length=mt,y&&(st.length=mt);j&&(ct.length=mt);const ft=mt,It=pt,Et={hMin:q,lastBorderPoint:void 0,skirtHeight:I,toENU:L,ellipsoid:l,minimum:K,maximum:Q};ht.sort((function(t,e){return e.cartographic.latitude-t.cartographic.latitude})),dt.sort((function(t,e){return t.cartographic.longitude-e.cartographic.longitude})),lt.sort((function(t,e){return t.cartographic.latitude-e.cartographic.latitude})),gt.sort((function(t,e){return e.cartographic.longitude-t.cartographic.longitude}));const Tt=1e-5;if(A(ot,rt,at,st,ct,ut,Et,ht,-Tt*V,!0,-Tt*Y),A(ot,rt,at,st,ct,ut,Et,dt,-Tt*Y,!1),A(ot,rt,at,st,ct,ut,Et,lt,Tt*V,!0,Tt*Y),A(ot,rt,at,st,ct,ut,Et,gt,Tt*Y,!1),ht.length>0&&gt.length>0){const t=ht[0].index,e=ft,n=gt[gt.length-1].index,i=ot.length-1;ut.push(n,i,e,e,t,n)}tt=ot.length;const Ct=e.BoundingSphere.fromPoints(ot);let Mt;o.defined(g)&&(Mt=s.OrientedBoundingBox.fromRectangle(g,q,J,l));const xt=new a.EllipsoidalOccluder(l).computeHorizonCullingPointPossiblyUnderEllipsoid(d,ot,q),Nt=new t.AxisAlignedBoundingBox(K,Q,d),bt=new a.TerrainEncoding(d,Nt,Et.hMin,J,H,!1,y,j,p,f),St=new Float32Array(tt*bt.stride);let wt=0;for(let t=0;t<tt;++t)wt=bt.encode(St,wt,ot[t],at[t],rt[t],void 0,st[t],ct[t]);const Bt=ht.map((function(t){return t.index})).reverse(),Pt=dt.map((function(t){return t.index})).reverse(),At=lt.map((function(t){return t.index})).reverse(),yt=gt.map((function(t){return t.index})).reverse();return Pt.unshift(At[At.length-1]),Pt.push(Bt[0]),yt.unshift(Bt[Bt.length-1]),yt.push(At[0]),{vertices:St,indices:new Uint16Array(ut),maximumHeight:J,minimumHeight:q,encoding:bt,boundingSphere3D:Ct,orientedBoundingBox:Mt,occludeePointInScaledSpace:xt,vertexCountWithoutSkirts:ft,indexCountWithoutSkirts:It,westIndicesSouthToNorth:Bt,southIndicesEastToWest:Pt,eastIndicesNorthToSouth:At,northIndicesWestToEast:yt}}(h.buffer,h.relativeToCenter,h.ellipsoid,h.rectangle,h.nativeRectangle,h.exaggeration,h.exaggerationRelativeHeight,h.skirtHeight,h.includeWebMercatorT,h.negativeAltitudeExponentBias,h.negativeElevationThreshold),g=l.vertices;d.push(g.buffer);const m=l.indices;return d.push(m.buffer),{vertices:g.buffer,indices:m.buffer,numberOfAttributes:l.encoding.stride,minimumHeight:l.minimumHeight,maximumHeight:l.maximumHeight,boundingSphere3D:l.boundingSphere3D,orientedBoundingBox:l.orientedBoundingBox,occludeePointInScaledSpace:l.occludeePointInScaledSpace,encoding:l.encoding,vertexCountWithoutSkirts:l.vertexCountWithoutSkirts,indexCountWithoutSkirts:l.indexCountWithoutSkirts,westIndicesSouthToNorth:l.westIndicesSouthToNorth,southIndicesEastToWest:l.southIndicesEastToWest,eastIndicesNorthToSouth:l.eastIndicesNorthToSouth,northIndicesWestToEast:l.northIndicesWestToEast}}))}));
define(["./AxisAlignedBoundingBox-73c388a7","./Transforms-221c7c82","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./defaultValue-865ac579","./TerrainEncoding-692d7e68","./Math-76ce6367","./OrientedBoundingBox-34fc6856","./RuntimeError-9e0724f9","./WebMercatorProjection-bfe55882","./createTaskProcessorWorker","./combine-5e110d09","./AttributeCompression-10297289","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-a9681249","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(t,e,n,i,o,a,r,s,c,u,h,d,l,g,m,p,I,f){"use strict";const E=Uint16Array.BYTES_PER_ELEMENT,T=Int32Array.BYTES_PER_ELEMENT,C=Uint32Array.BYTES_PER_ELEMENT,M=Float32Array.BYTES_PER_ELEMENT,x=Float64Array.BYTES_PER_ELEMENT;function N(t,e,n){n=o.defaultValue(n,r.CesiumMath);const i=t.length;for(let o=0;o<i;++o)if(n.equalsEpsilon(t[o],e,r.CesiumMath.EPSILON12))return o;return-1}const b=new i.Cartographic,S=new i.Cartesian3,w=new i.Cartesian3,B=new i.Cartesian3,P=new n.Matrix4;function A(t,e,a,s,c,u,h,d,l,g,m){const p=d.length;for(let I=0;I<p;++I){const f=d[I],E=f.cartographic,T=f.index,C=t.length,M=E.longitude;let x=E.latitude;x=r.CesiumMath.clamp(x,-r.CesiumMath.PI_OVER_TWO,r.CesiumMath.PI_OVER_TWO);const N=E.height-h.skirtHeight;h.hMin=Math.min(h.hMin,N),i.Cartographic.fromRadians(M,x,N,b),g&&(b.longitude+=l),g?I===p-1?b.latitude+=m:0===I&&(b.latitude-=m):b.latitude+=l;const w=h.ellipsoid.cartographicToCartesian(b);t.push(w),e.push(N),a.push(n.Cartesian2.clone(a[T])),s.length>0&&s.push(s[T]),c.length>0&&c.push(c[T]),n.Matrix4.multiplyByPoint(h.toENU,w,S);const B=h.minimum,P=h.maximum;i.Cartesian3.minimumByComponent(S,B,B),i.Cartesian3.maximumByComponent(S,P,P);const A=h.lastBorderPoint;if(o.defined(A)){const t=A.index;u.push(t,C-1,C,C,T,t)}h.lastBorderPoint=f}}return h((function(h,d){h.ellipsoid=i.Ellipsoid.clone(h.ellipsoid),h.rectangle=n.Rectangle.clone(h.rectangle);const l=function(h,d,l,g,m,p,I,f,y,R,_){let W,v,F,O,V,Y;o.defined(g)?(W=g.west,v=g.south,F=g.east,O=g.north,V=g.width,Y=g.height):(W=r.CesiumMath.toRadians(m.west),v=r.CesiumMath.toRadians(m.south),F=r.CesiumMath.toRadians(m.east),O=r.CesiumMath.toRadians(m.north),V=r.CesiumMath.toRadians(g.width),Y=r.CesiumMath.toRadians(g.height));const U=[v,O],k=[W,F],H=e.Transforms.eastNorthUpToFixedFrame(d,l),L=n.Matrix4.inverseTransformation(H,P);let D,G;y&&(D=u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(v),G=1/(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(O)-D));const j=1!==p,z=new DataView(h);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY;const K=w;K.x=Number.POSITIVE_INFINITY,K.y=Number.POSITIVE_INFINITY,K.z=Number.POSITIVE_INFINITY;const Q=B;Q.x=Number.NEGATIVE_INFINITY,Q.y=Number.NEGATIVE_INFINITY,Q.z=Number.NEGATIVE_INFINITY;let X,Z,$=0,tt=0,et=0;for(Z=0;Z<4;++Z){let t=$;X=z.getUint32(t,!0),t+=C;const e=r.CesiumMath.toRadians(180*z.getFloat64(t,!0));t+=x,-1===N(k,e)&&k.push(e);const n=r.CesiumMath.toRadians(180*z.getFloat64(t,!0));t+=x,-1===N(U,n)&&U.push(n),t+=2*x;let i=z.getInt32(t,!0);t+=T,tt+=i,i=z.getInt32(t,!0),et+=3*i,$+=X+C}const nt=[],it=[],ot=new Array(tt),at=new Array(tt),rt=new Array(tt),st=y?new Array(tt):[],ct=j?new Array(tt):[],ut=new Array(et),ht=[],dt=[],lt=[],gt=[];let mt=0,pt=0;for($=0,Z=0;Z<4;++Z){X=z.getUint32($,!0),$+=C;const t=$,e=r.CesiumMath.toRadians(180*z.getFloat64($,!0));$+=x;const o=r.CesiumMath.toRadians(180*z.getFloat64($,!0));$+=x;const a=r.CesiumMath.toRadians(180*z.getFloat64($,!0)),s=.5*a;$+=x;const h=r.CesiumMath.toRadians(180*z.getFloat64($,!0)),d=.5*h;$+=x;const g=z.getInt32($,!0);$+=T;const m=z.getInt32($,!0);$+=T,$+=T;const p=new Array(g);for(let t=0;t<g;++t){const c=e+z.getUint8($++)*a;b.longitude=c;const g=o+z.getUint8($++)*h;b.latitude=g;let m=z.getFloat32($,!0);if($+=M,0!==m&&m<_&&(m*=-Math.pow(2,R)),m*=6371010,b.height=m,-1!==N(k,c)||-1!==N(U,g)){const e=N(nt,b,i.Cartographic);if(-1!==e){p[t]=it[e];continue}nt.push(i.Cartographic.clone(b)),it.push(mt)}p[t]=mt,Math.abs(c-W)<s?ht.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(c-F)<s?lt.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(g-v)<d?dt.push({index:mt,cartographic:i.Cartographic.clone(b)}):Math.abs(g-O)<d&&gt.push({index:mt,cartographic:i.Cartographic.clone(b)}),q=Math.min(m,q),J=Math.max(m,J),rt[mt]=m;const I=l.cartographicToCartesian(b);if(ot[mt]=I,y&&(st[mt]=(u.WebMercatorProjection.geodeticLatitudeToMercatorAngle(g)-D)*G),j){const t=l.geodeticSurfaceNormal(I);ct[mt]=t}n.Matrix4.multiplyByPoint(L,I,S),i.Cartesian3.minimumByComponent(S,K,K),i.Cartesian3.maximumByComponent(S,Q,Q);let f=(c-W)/(F-W);f=r.CesiumMath.clamp(f,0,1);let E=(g-v)/(O-v);E=r.CesiumMath.clamp(E,0,1),at[mt]=new n.Cartesian2(f,E),++mt}const I=3*m;for(let t=0;t<I;++t,++pt)ut[pt]=p[z.getUint16($,!0)],$+=E;if(X!==$-t)throw new c.RuntimeError("Invalid terrain tile.")}ot.length=mt,at.length=mt,rt.length=mt,y&&(st.length=mt);j&&(ct.length=mt);const It=mt,ft=pt,Et={hMin:q,lastBorderPoint:void 0,skirtHeight:f,toENU:L,ellipsoid:l,minimum:K,maximum:Q};ht.sort((function(t,e){return e.cartographic.latitude-t.cartographic.latitude})),dt.sort((function(t,e){return t.cartographic.longitude-e.cartographic.longitude})),lt.sort((function(t,e){return t.cartographic.latitude-e.cartographic.latitude})),gt.sort((function(t,e){return e.cartographic.longitude-t.cartographic.longitude}));const Tt=1e-5;if(A(ot,rt,at,st,ct,ut,Et,ht,-Tt*V,!0,-Tt*Y),A(ot,rt,at,st,ct,ut,Et,dt,-Tt*Y,!1),A(ot,rt,at,st,ct,ut,Et,lt,Tt*V,!0,Tt*Y),A(ot,rt,at,st,ct,ut,Et,gt,Tt*Y,!1),ht.length>0&&gt.length>0){const t=ht[0].index,e=It,n=gt[gt.length-1].index,i=ot.length-1;ut.push(n,i,e,e,t,n)}tt=ot.length;const Ct=e.BoundingSphere.fromPoints(ot);let Mt;o.defined(g)&&(Mt=s.OrientedBoundingBox.fromRectangle(g,q,J,l));const xt=new a.EllipsoidalOccluder(l).computeHorizonCullingPointPossiblyUnderEllipsoid(d,ot,q),Nt=new t.AxisAlignedBoundingBox(K,Q,d),bt=new a.TerrainEncoding(d,Nt,Et.hMin,J,H,!1,y,j,p,I),St=new Float32Array(tt*bt.stride);let wt=0;for(let t=0;t<tt;++t)wt=bt.encode(St,wt,ot[t],at[t],rt[t],void 0,st[t],ct[t]);const Bt=ht.map((function(t){return t.index})).reverse(),Pt=dt.map((function(t){return t.index})).reverse(),At=lt.map((function(t){return t.index})).reverse(),yt=gt.map((function(t){return t.index})).reverse();return Pt.unshift(At[At.length-1]),Pt.push(Bt[0]),yt.unshift(Bt[Bt.length-1]),yt.push(At[0]),{vertices:St,indices:new Uint16Array(ut),maximumHeight:J,minimumHeight:q,encoding:bt,boundingSphere3D:Ct,orientedBoundingBox:Mt,occludeePointInScaledSpace:xt,vertexCountWithoutSkirts:It,indexCountWithoutSkirts:ft,westIndicesSouthToNorth:Bt,southIndicesEastToWest:Pt,eastIndicesNorthToSouth:At,northIndicesWestToEast:yt}}(h.buffer,h.relativeToCenter,h.ellipsoid,h.rectangle,h.nativeRectangle,h.exaggeration,h.exaggerationRelativeHeight,h.skirtHeight,h.includeWebMercatorT,h.negativeAltitudeExponentBias,h.negativeElevationThreshold),g=l.vertices;d.push(g.buffer);const m=l.indices;return d.push(m.buffer),{vertices:g.buffer,indices:m.buffer,numberOfAttributes:l.encoding.stride,minimumHeight:l.minimumHeight,maximumHeight:l.maximumHeight,boundingSphere3D:l.boundingSphere3D,orientedBoundingBox:l.orientedBoundingBox,occludeePointInScaledSpace:l.occludeePointInScaledSpace,encoding:l.encoding,vertexCountWithoutSkirts:l.vertexCountWithoutSkirts,indexCountWithoutSkirts:l.indexCountWithoutSkirts,westIndicesSouthToNorth:l.westIndicesSouthToNorth,southIndicesEastToWest:l.southIndicesEastToWest,eastIndicesNorthToSouth:l.eastIndicesNorthToSouth,northIndicesWestToEast:l.northIndicesWestToEast}}))}));
public/CIMSDK/Workers/createVerticesFromHeightmap.js
@@ -1,3 +1,3 @@
define(["./Matrix3-6e56fbc7","./AxisAlignedBoundingBox-d1a0c6e6","./Transforms-f3654378","./Matrix2-23dd5853","./defaultValue-865ac579","./TerrainEncoding-1a72b96a","./Math-76ce6367","./OrientedBoundingBox-ef95f619","./WebMercatorProjection-ab4c1f3a","./AttributeCompression-b9d605fe","./RuntimeError-9e0724f9","./createTaskProcessorWorker","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-2129690e","./IntersectionTests-63574cfd","./Plane-4befcca0"],(function(e,t,i,a,n,r,s,l,o,f,u,c,d,h,m,g,p,x){"use strict";var w=Object.freeze({NONE:0,LERC:1});const y={};function k(e,t){let i,a,n,r,s=0;const l=t.length;for(n=t[0],i=1;i<=l;i++)r=t[i%l],e[0]>Math.min(n[0],r[0])&&e[0]<=Math.max(n[0],r[0])&&e[1]<=Math.max(n[1],r[1])&&n[0]!==r[0]&&(a=(e[0]-n[0])*(r[1]-n[1])/(r[0]-n[0])+n[1],(n[1]===r[1]||e[1]<=a)&&s++),n=r;return s%2!=0}y.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});const I=new e.Cartesian3,b=new a.Matrix4,U=new e.Cartesian3,M=new e.Cartesian3;y.computeVertices=function(u){const c=u.flattenPolygonHeight||[1],d=u.flattenPolygon||[],h=Math.cos,m=Math.sin,g=Math.sqrt,p=Math.atan,x=Math.exp,w=s.CesiumMath.PI_OVER_TWO,T=s.CesiumMath.toRadians,v=u.heightmap,V=u.width,A=u.height,B=u.skirtHeight,D=B>0,S=n.defaultValue(u.isGeographic,!0),P=n.defaultValue(u.ellipsoid,e.Ellipsoid.WGS84),E=1/P.maximumRadius,C=a.Rectangle.clone(u.nativeRectangle),F=a.Rectangle.clone(u.rectangle);let N,O,R,L;n.defined(F)?(N=F.west,O=F.south,R=F.east,L=F.north):S?(N=T(C.west),O=T(C.south),R=T(C.east),L=T(C.north)):(N=C.west*E,O=w-2*p(x(-C.south*E)),R=C.east*E,L=w-2*p(x(-C.north*E)));let z=u.relativeToCenter;const H=n.defined(z);z=H?z:e.Cartesian3.ZERO;const _=n.defaultValue(u.includeWebMercatorT,!1),Y=n.defaultValue(u.exaggeration,1),W=n.defaultValue(u.exaggerationRelativeHeight,0),X=1!==Y,Z=n.defaultValue(u.structure,y.DEFAULT_STRUCTURE),j=n.defaultValue(Z.heightScale,y.DEFAULT_STRUCTURE.heightScale),G=n.defaultValue(Z.heightOffset,y.DEFAULT_STRUCTURE.heightOffset),q=n.defaultValue(Z.elementsPerHeight,y.DEFAULT_STRUCTURE.elementsPerHeight),Q=n.defaultValue(Z.stride,y.DEFAULT_STRUCTURE.stride),J=n.defaultValue(Z.elementMultiplier,y.DEFAULT_STRUCTURE.elementMultiplier),K=n.defaultValue(Z.isBigEndian,y.DEFAULT_STRUCTURE.isBigEndian);let $=a.Rectangle.computeWidth(C),ee=a.Rectangle.computeHeight(C);const te=$/(V-1),ie=ee/(A-1);S||($*=E,ee*=E);const ae=P.radiiSquared,ne=ae.x,re=ae.y,se=ae.z;let le=65536,oe=-65536;const fe=i.Transforms.eastNorthUpToFixedFrame(z,P),ue=a.Matrix4.inverseTransformation(fe,b);let ce,de;_&&(ce=o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(O),de=1/(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(L)-ce));const he=U;he.x=Number.POSITIVE_INFINITY,he.y=Number.POSITIVE_INFINITY,he.z=Number.POSITIVE_INFINITY;const me=M;me.x=Number.NEGATIVE_INFINITY,me.y=Number.NEGATIVE_INFINITY,me.z=Number.NEGATIVE_INFINITY;let ge=Number.POSITIVE_INFINITY;const pe=V*A,xe=pe+(B>0?2*V+2*A:0),we=new Array(xe),ye=new Array(xe),ke=new Array(xe),Ie=_?new Array(xe):[],be=X?new Array(xe):[],Ue=new Array(xe);let Me=0,Te=A,ve=0,Ve=V;D&&(--Me,++Te,--ve,++Ve);const Ae=1e-5;for(let t=Me;t<Te;++t){let i=t;i<0&&(i=0),i>=A&&(i=A-1);let n=C.north-ie*i;n=S?T(n):w-2*p(x(-n*E));let r=(n-O)/(L-O);r=s.CesiumMath.clamp(r,0,1);const l=t===Me,f=t===Te-1;B>0&&(l?n+=Ae*ee:f&&(n-=Ae*ee));const u=h(n),y=m(n),b=se*y;let U;_&&(U=(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(n)-ce)*de);for(let t=ve;t<Ve;++t){let o=t;o<0&&(o=0),o>=V&&(o=V-1);const p=i*(V*Q)+o*Q;let x;if(1===q)x=v[p];else{let e;if(x=0,K)for(e=0;e<q;++e)x=x*J+v[p+e];else for(e=q-1;e>=0;--e)x=x*J+v[p+e]}x=x*j+G,oe=Math.max(oe,x),le=Math.min(le,x);let w=C.west+te*o;S?w=T(w):w*=E;let M=(w-N)/(R-N);M=s.CesiumMath.clamp(M,0,1);let D=i*V+o;if(Ue[D]=0,B>0){const e=t===ve,a=t===Ve-1,n=l||f||e||a;if((l||f)&&(e||a))continue;n&&(x-=B,e?(D=pe+(A-i-1),w-=Ae*$):f?D=pe+A+(V-o-1):a?(D=pe+A+V+i,w+=Ae*$):l&&(D=pe+A+V+A+o),Ue[D]=1)}const F=u*h(w),O=u*m(w),L=ne*F,z=re*O,H=1/g(L*F+z*O+b*y),Y=L*H,W=z*H,Z=b*H;for(let e=0;e<c.length;e++)if(1!==c[e]){k([w,n],d[e])&&(x=c[e])}const ee=new e.Cartesian3;ee.x=Y+F*x,ee.y=W+O*x,ee.z=Z+y*x,a.Matrix4.multiplyByPoint(ue,ee,I),e.Cartesian3.minimumByComponent(I,he,he),e.Cartesian3.maximumByComponent(I,me,me),ge=Math.min(ge,x),we[D]=ee,ke[D]=new a.Cartesian2(M,r),ye[D]=x,_&&(Ie[D]=U),X&&(be[D]=P.geodeticSurfaceNormal(ee))}}const Be=new Array(xe);if(B>0){let t=0;for(let i=0;i<A;++i){let a=-1,n=1;i<2&&(a=0),i>=A-1&&(n=0);for(let r=0;r<V;++r){let s=-1,l=1;r<2&&(s=0),r>=V-1&&(l=0),t=i*V+r;try{const o=we[(i+a)*V+r],u=we[(i+n)*V+r],c=we[i*V+(r+s)],d=we[i*V+(r+l)],h=e.Cartesian3.subtract(c,d,new e.Cartesian3),m=e.Cartesian3.subtract(o,u,new e.Cartesian3),g=e.Cartesian3.cross(h,m,new e.Cartesian3),p=e.Cartesian3.normalize(g,new e.Cartesian3);Be[t]=f.AttributeCompression.octEncodeFloat(p)}catch(e){Be[t]=0}}}}const De=i.BoundingSphere.fromPoints(we);let Se,Pe;if(n.defined(F)&&(Se=l.OrientedBoundingBox.fromRectangle(F,le,oe,P)),H){Pe=new r.EllipsoidalOccluder(P).computeHorizonCullingPointPossiblyUnderEllipsoid(z,we,le)}const Ee=new t.AxisAlignedBoundingBox(he,me,z),Ce=new r.TerrainEncoding(z,Ee,ge,oe,fe,B>0,_,X,Y,W),Fe=new Float32Array(xe*Ce.stride);let Ne=0;for(let e=0;e<xe;++e)Ne=Ce.encode(Fe,Ne,we[e],ke[e],ye[e],B>0?Be[e]:void 0,Ie[e],be[e],B>0||void 0,Ue[e]);return{vertices:Fe,maximumHeight:oe,minimumHeight:le,encoding:Ce,boundingSphere3D:De,orientedBoundingBox:Se,occludeePointInScaledSpace:Pe}};var T,v=y,V={exports:{}};T=V,
define(["./Matrix3-aeb3c326","./AxisAlignedBoundingBox-73c388a7","./Transforms-221c7c82","./Matrix2-2fdcdec7","./defaultValue-865ac579","./TerrainEncoding-692d7e68","./Math-76ce6367","./OrientedBoundingBox-34fc6856","./WebMercatorProjection-bfe55882","./AttributeCompression-10297289","./RuntimeError-9e0724f9","./createTaskProcessorWorker","./combine-5e110d09","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./EllipsoidTangentPlane-a9681249","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(e,t,i,a,n,r,s,l,o,f,u,c,d,h,m,g,p,x){"use strict";var w=Object.freeze({NONE:0,LERC:1});const y={};function k(e,t){let i,a,n,r,s=0;const l=t.length;for(n=t[0],i=1;i<=l;i++)r=t[i%l],e[0]>Math.min(n[0],r[0])&&e[0]<=Math.max(n[0],r[0])&&e[1]<=Math.max(n[1],r[1])&&n[0]!==r[0]&&(a=(e[0]-n[0])*(r[1]-n[1])/(r[0]-n[0])+n[1],(n[1]===r[1]||e[1]<=a)&&s++),n=r;return s%2!=0}y.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});const I=new e.Cartesian3,b=new a.Matrix4,U=new e.Cartesian3,M=new e.Cartesian3;y.computeVertices=function(u){const c=u.flattenPolygonHeight||[1],d=u.flattenPolygon||[],h=Math.cos,m=Math.sin,g=Math.sqrt,p=Math.atan,x=Math.exp,w=s.CesiumMath.PI_OVER_TWO,T=s.CesiumMath.toRadians,v=u.heightmap,V=u.width,A=u.height,B=u.skirtHeight,D=B>0,S=n.defaultValue(u.isGeographic,!0),P=n.defaultValue(u.ellipsoid,e.Ellipsoid.WGS84),E=1/P.maximumRadius,C=a.Rectangle.clone(u.nativeRectangle),F=a.Rectangle.clone(u.rectangle);let N,O,R,L;n.defined(F)?(N=F.west,O=F.south,R=F.east,L=F.north):S?(N=T(C.west),O=T(C.south),R=T(C.east),L=T(C.north)):(N=C.west*E,O=w-2*p(x(-C.south*E)),R=C.east*E,L=w-2*p(x(-C.north*E)));let z=u.relativeToCenter;const H=n.defined(z);z=H?z:e.Cartesian3.ZERO;const _=n.defaultValue(u.includeWebMercatorT,!1),Y=n.defaultValue(u.exaggeration,1),W=n.defaultValue(u.exaggerationRelativeHeight,0),X=1!==Y,Z=n.defaultValue(u.structure,y.DEFAULT_STRUCTURE),j=n.defaultValue(Z.heightScale,y.DEFAULT_STRUCTURE.heightScale),G=n.defaultValue(Z.heightOffset,y.DEFAULT_STRUCTURE.heightOffset),q=n.defaultValue(Z.elementsPerHeight,y.DEFAULT_STRUCTURE.elementsPerHeight),Q=n.defaultValue(Z.stride,y.DEFAULT_STRUCTURE.stride),J=n.defaultValue(Z.elementMultiplier,y.DEFAULT_STRUCTURE.elementMultiplier),K=n.defaultValue(Z.isBigEndian,y.DEFAULT_STRUCTURE.isBigEndian);let $=a.Rectangle.computeWidth(C),ee=a.Rectangle.computeHeight(C);const te=$/(V-1),ie=ee/(A-1);S||($*=E,ee*=E);const ae=P.radiiSquared,ne=ae.x,re=ae.y,se=ae.z;let le=65536,oe=-65536;const fe=i.Transforms.eastNorthUpToFixedFrame(z,P),ue=a.Matrix4.inverseTransformation(fe,b);let ce,de;_&&(ce=o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(O),de=1/(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(L)-ce));const he=U;he.x=Number.POSITIVE_INFINITY,he.y=Number.POSITIVE_INFINITY,he.z=Number.POSITIVE_INFINITY;const me=M;me.x=Number.NEGATIVE_INFINITY,me.y=Number.NEGATIVE_INFINITY,me.z=Number.NEGATIVE_INFINITY;let ge=Number.POSITIVE_INFINITY;const pe=V*A,xe=pe+(B>0?2*V+2*A:0),we=new Array(xe),ye=new Array(xe),ke=new Array(xe),Ie=_?new Array(xe):[],be=X?new Array(xe):[],Ue=new Array(xe);let Me=0,Te=A,ve=0,Ve=V;D&&(--Me,++Te,--ve,++Ve);const Ae=1e-5;for(let t=Me;t<Te;++t){let i=t;i<0&&(i=0),i>=A&&(i=A-1);let n=C.north-ie*i;n=S?T(n):w-2*p(x(-n*E));let r=(n-O)/(L-O);r=s.CesiumMath.clamp(r,0,1);const l=t===Me,f=t===Te-1;B>0&&(l?n+=Ae*ee:f&&(n-=Ae*ee));const u=h(n),y=m(n),b=se*y;let U;_&&(U=(o.WebMercatorProjection.geodeticLatitudeToMercatorAngle(n)-ce)*de);for(let t=ve;t<Ve;++t){let o=t;o<0&&(o=0),o>=V&&(o=V-1);const p=i*(V*Q)+o*Q;let x;if(1===q)x=v[p];else{let e;if(x=0,K)for(e=0;e<q;++e)x=x*J+v[p+e];else for(e=q-1;e>=0;--e)x=x*J+v[p+e]}x=x*j+G,oe=Math.max(oe,x),le=Math.min(le,x);let w=C.west+te*o;S?w=T(w):w*=E;let M=(w-N)/(R-N);M=s.CesiumMath.clamp(M,0,1);let D=i*V+o;if(Ue[D]=0,B>0){const e=t===ve,a=t===Ve-1,n=l||f||e||a;if((l||f)&&(e||a))continue;n&&(x-=B,e?(D=pe+(A-i-1),w-=Ae*$):f?D=pe+A+(V-o-1):a?(D=pe+A+V+i,w+=Ae*$):l&&(D=pe+A+V+A+o),Ue[D]=1)}const F=u*h(w),O=u*m(w),L=ne*F,z=re*O,H=1/g(L*F+z*O+b*y),Y=L*H,W=z*H,Z=b*H;for(let e=0;e<c.length;e++)if(1!==c[e]){k([w,n],d[e])&&(x=c[e])}const ee=new e.Cartesian3;ee.x=Y+F*x,ee.y=W+O*x,ee.z=Z+y*x,a.Matrix4.multiplyByPoint(ue,ee,I),e.Cartesian3.minimumByComponent(I,he,he),e.Cartesian3.maximumByComponent(I,me,me),ge=Math.min(ge,x),we[D]=ee,ke[D]=new a.Cartesian2(M,r),ye[D]=x,_&&(Ie[D]=U),X&&(be[D]=P.geodeticSurfaceNormal(ee))}}const Be=new Array(xe);if(B>0){let t=0;for(let i=0;i<A;++i){let a=-1,n=1;i<2&&(a=0),i>=A-1&&(n=0);for(let r=0;r<V;++r){let s=-1,l=1;r<2&&(s=0),r>=V-1&&(l=0),t=i*V+r;try{const o=we[(i+a)*V+r],u=we[(i+n)*V+r],c=we[i*V+(r+s)],d=we[i*V+(r+l)],h=e.Cartesian3.subtract(c,d,new e.Cartesian3),m=e.Cartesian3.subtract(o,u,new e.Cartesian3),g=e.Cartesian3.cross(h,m,new e.Cartesian3),p=e.Cartesian3.normalize(g,new e.Cartesian3);Be[t]=f.AttributeCompression.octEncodeFloat(p)}catch(e){Be[t]=0}}}}const De=i.BoundingSphere.fromPoints(we);let Se,Pe;if(n.defined(F)&&(Se=l.OrientedBoundingBox.fromRectangle(F,le,oe,P)),H){Pe=new r.EllipsoidalOccluder(P).computeHorizonCullingPointPossiblyUnderEllipsoid(z,we,le)}const Ee=new t.AxisAlignedBoundingBox(he,me,z),Ce=new r.TerrainEncoding(z,Ee,ge,oe,fe,B>0,_,X,Y,W),Fe=new Float32Array(xe*Ce.stride);let Ne=0;for(let e=0;e<xe;++e)Ne=Ce.encode(Fe,Ne,we[e],ke[e],ye[e],B>0?Be[e]:void 0,Ie[e],be[e],B>0||void 0,Ue[e]);return{vertices:Fe,maximumHeight:oe,minimumHeight:le,encoding:Ce,boundingSphere3D:De,orientedBoundingBox:Se,occludeePointInScaledSpace:Pe}};var T,v=y,V={exports:{}};T=V,
/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */
function(){var e,t,i,a,n,r,s,l,o,f,u,c,d,h,m,g,p=(e={defaultNoDataValue:-34027999387901484e22,decode:function(r,s){var l=(s=s||{}).encodedMaskData||null===s.encodedMaskData,o=n(r,s.inputOffset||0,l),f=null!==s.noDataValue?s.noDataValue:e.defaultNoDataValue,u=t(o,s.pixelType||Float32Array,s.encodedMaskData,f,s.returnMask),c={width:o.width,height:o.height,pixelData:u.resultPixels,minValue:u.minValue,maxValue:o.pixels.maxValue,noDataValue:f};return u.resultMask&&(c.maskData=u.resultMask),s.returnEncodedMask&&o.mask&&(c.encodedMaskData=o.mask.bitset?o.mask.bitset:null),s.returnFileInfo&&(c.fileInfo=i(o),s.computeUsedBitDepths&&(c.fileInfo.bitDepths=a(o))),c}},t=function(e,t,i,a,n){var s,l,o,f=0,u=e.pixels.numBlocksX,c=e.pixels.numBlocksY,d=Math.floor(e.width/u),h=Math.floor(e.height/c),m=2*e.maxZError,g=Number.MAX_VALUE;i=i||(e.mask?e.mask.bitset:null),l=new t(e.width*e.height),n&&i&&(o=new Uint8Array(e.width*e.height));for(var p,x,w=new Float32Array(d*h),y=0;y<=c;y++){var k=y!==c?h:e.height%c;if(0!==k)for(var I=0;I<=u;I++){var b=I!==u?d:e.width%u;if(0!==b){var U,M,T,v,V=y*e.width*h+I*d,A=e.width-b,B=e.pixels.blocks[f];if(B.encoding<2?(0===B.encoding?U=B.rawData:(r(B.stuffedData,B.bitsPerPixel,B.numValidPixels,B.offset,m,w,e.pixels.maxValue),U=w),M=0):T=2===B.encoding?0:B.offset,i)for(x=0;x<k;x++){for(7&V&&(v=i[V>>3],v<<=7&V),p=0;p<b;p++)7&V||(v=i[V>>3]),128&v?(o&&(o[V]=1),g=g>(s=B.encoding<2?U[M++]:T)?s:g,l[V++]=s):(o&&(o[V]=0),l[V++]=a),v<<=1;V+=A}else if(B.encoding<2)for(x=0;x<k;x++){for(p=0;p<b;p++)g=g>(s=U[M++])?s:g,l[V++]=s;V+=A}else for(g=g>T?T:g,x=0;x<k;x++){for(p=0;p<b;p++)l[V++]=T;V+=A}if(1===B.encoding&&M!==B.numValidPixels)throw"Block and Mask do not match";f++}}}return{resultPixels:l,resultMask:o,minValue:g}},i=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},a=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,i={},a=0;a<t;a++){var n=e.pixels.blocks[a];0===n.encoding?i.float32=!0:1===n.encoding?i[n.bitsPerPixel]=!0:i[0]=!0}return Object.keys(i)},n=function(e,t,i){var a={},n=new Uint8Array(e,t,10);if(a.fileIdentifierString=String.fromCharCode.apply(null,n),"CntZImage"!==a.fileIdentifierString.trim())throw"Unexpected file identifier string: "+a.fileIdentifierString;t+=10;var r=new DataView(e,t,24);if(a.fileVersion=r.getInt32(0,!0),a.imageType=r.getInt32(4,!0),a.height=r.getUint32(8,!0),a.width=r.getUint32(12,!0),a.maxZError=r.getFloat64(16,!0),t+=24,!i)if(r=new DataView(e,t,16),a.mask={},a.mask.numBlocksY=r.getUint32(0,!0),a.mask.numBlocksX=r.getUint32(4,!0),a.mask.numBytes=r.getUint32(8,!0),a.mask.maxValue=r.getFloat32(12,!0),t+=16,a.mask.numBytes>0){var s=new Uint8Array(Math.ceil(a.width*a.height/8)),l=(r=new DataView(e,t,a.mask.numBytes)).getInt16(0,!0),o=2,f=0;do{if(l>0)for(;l--;)s[f++]=r.getUint8(o++);else{var u=r.getUint8(o++);for(l=-l;l--;)s[f++]=u}l=r.getInt16(o,!0),o+=2}while(o<a.mask.numBytes);if(-32768!==l||f<s.length)throw"Unexpected end of mask RLE encoding";a.mask.bitset=s,t+=a.mask.numBytes}else 0==(a.mask.numBytes|a.mask.numBlocksY|a.mask.maxValue)&&(a.mask.bitset=new Uint8Array(Math.ceil(a.width*a.height/8)));r=new DataView(e,t,16),a.pixels={},a.pixels.numBlocksY=r.getUint32(0,!0),a.pixels.numBlocksX=r.getUint32(4,!0),a.pixels.numBytes=r.getUint32(8,!0),a.pixels.maxValue=r.getFloat32(12,!0),t+=16;var c=a.pixels.numBlocksX,d=a.pixels.numBlocksY,h=c+(a.width%c>0?1:0),m=d+(a.height%d>0?1:0);a.pixels.blocks=new Array(h*m);for(var g=0,p=0;p<m;p++)for(var x=0;x<h;x++){var w=0,y=e.byteLength-t;r=new DataView(e,t,Math.min(10,y));var k={};a.pixels.blocks[g++]=k;var I=r.getUint8(0);if(w++,k.encoding=63&I,k.encoding>3)throw"Invalid block encoding ("+k.encoding+")";if(2!==k.encoding){if(0!==I&&2!==I){if(I>>=6,k.offsetType=I,2===I)k.offset=r.getInt8(1),w++;else if(1===I)k.offset=r.getInt16(1,!0),w+=2;else{if(0!==I)throw"Invalid block offset type";k.offset=r.getFloat32(1,!0),w+=4}if(1===k.encoding)if(I=r.getUint8(w),w++,k.bitsPerPixel=63&I,I>>=6,k.numValidPixelsType=I,2===I)k.numValidPixels=r.getUint8(w),w++;else if(1===I)k.numValidPixels=r.getUint16(w,!0),w+=2;else{if(0!==I)throw"Invalid valid pixel count type";k.numValidPixels=r.getUint32(w,!0),w+=4}}var b;if(t+=w,3!==k.encoding)if(0===k.encoding){var U=(a.pixels.numBytes-1)/4;if(U!==Math.floor(U))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*U),new Uint8Array(b).set(new Uint8Array(e,t,4*U));var M=new Float32Array(b);k.rawData=M,t+=4*U}else if(1===k.encoding){var T=Math.ceil(k.numValidPixels*k.bitsPerPixel/8),v=Math.ceil(T/4);b=new ArrayBuffer(4*v),new Uint8Array(b).set(new Uint8Array(e,t,T)),k.stuffedData=new Uint32Array(b),t+=T}}else t++}return a.eofOffset=t,a},r=function(e,t,i,a,n,r,s){var l,o,f,u=(1<<t)-1,c=0,d=0,h=Math.ceil((s-a)/n),m=4*e.length-Math.ceil(t*i/8);for(e[e.length-1]<<=8*m,l=0;l<i;l++){if(0===d&&(f=e[c++],d=32),d>=t)o=f>>>d-t&u,d-=t;else{var g=t-d;o=(f&u)<<g&u,o+=(f=e[c++])>>>(d=32-g)}r[l]=o<h?a+o*n:s}return r},e),x=(s=function(e,t,i,a,n,r,s,l){var o,f,u,c,d,h=(1<<i)-1,m=0,g=0,p=4*e.length-Math.ceil(i*a/8);if(e[e.length-1]<<=8*p,n)for(o=0;o<a;o++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&h,g-=i):(f=(u&h)<<(c=i-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=n[f];else for(d=Math.ceil((l-r)/s),o=0;o<a;o++)0===g&&(u=e[m++],g=32),g>=i?(f=u>>>g-i&h,g-=i):(f=(u&h)<<(c=i-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=f<d?r+f*s:l},l=function(e,t,i,a,n,r){var s,l=(1<<t)-1,o=0,f=0,u=0,c=0,d=0,h=[],m=4*e.length-Math.ceil(t*i/8);e[e.length-1]<<=8*m;var g=Math.ceil((r-a)/n);for(f=0;f<i;f++)0===c&&(s=e[o++],c=32),c>=t?(d=s>>>c-t&l,c-=t):(d=(s&l)<<(u=t-c)&l,d+=(s=e[o++])>>>(c=32-u)),h[f]=d<g?a+d*n:r;return h.unshift(a),h},o=function(e,t,i,a,n,r,s,l){var o,f,u,c,d=(1<<i)-1,h=0,m=0,g=0;if(n)for(o=0;o<a;o++)0===m&&(u=e[h++],m=32,g=0),m>=i?(f=u>>>g&d,m-=i,g+=i):(f=u>>>g&d,m=32-(c=i-m),f|=((u=e[h++])&(1<<c)-1)<<i-c,g=c),t[o]=n[f];else{var p=Math.ceil((l-r)/s);for(o=0;o<a;o++)0===m&&(u=e[h++],m=32,g=0),m>=i?(f=u>>>g&d,m-=i,g+=i):(f=u>>>g&d,m=32-(c=i-m),f|=((u=e[h++])&(1<<c)-1)<<i-c,g=c),t[o]=f<p?r+f*s:l}return t},f=function(e,t,i,a,n,r){var s,l=(1<<t)-1,o=0,f=0,u=0,c=0,d=0,h=0,m=[],g=Math.ceil((r-a)/n);for(f=0;f<i;f++)0===c&&(s=e[o++],c=32,h=0),c>=t?(d=s>>>h&l,c-=t,h+=t):(d=s>>>h&l,c=32-(u=t-c),d|=((s=e[o++])&(1<<u)-1)<<t-u,h=u),m[f]=d<g?a+d*n:r;return m.unshift(a),m},u=function(e,t,i,a){var n,r,s,l,o=(1<<i)-1,f=0,u=0,c=4*e.length-Math.ceil(i*a/8);for(e[e.length-1]<<=8*c,n=0;n<a;n++)0===u&&(s=e[f++],u=32),u>=i?(r=s>>>u-i&o,u-=i):(r=(s&o)<<(l=i-u)&o,r+=(s=e[f++])>>>(u=32-l)),t[n]=r;return t},c=function(e,t,i,a){var n,r,s,l,o=(1<<i)-1,f=0,u=0,c=0;for(n=0;n<a;n++)0===u&&(s=e[f++],u=32,c=0),u>=i?(r=s>>>c&o,u-=i,c+=i):(r=s>>>c&o,u=32-(l=i-u),r|=((s=e[f++])&(1<<l)-1)<<i-l,c=l),t[n]=r;return t},d={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,i=65535,a=e.length,n=Math.floor(a/2),r=0;n;){var s=n>=359?359:n;n-=s;do{t+=e[r++]<<8,i+=t+=e[r++]}while(--s);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&a&&(i+=t+=e[r]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,a=new Uint8Array(e,i,6),n={};if(n.fileIdentifierString=String.fromCharCode.apply(null,a),0!==n.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+n.fileIdentifierString;i+=6;var r,s=new DataView(e,i,8),l=s.getInt32(0,!0);if(n.fileVersion=l,i+=4,l>=3&&(n.checksum=s.getUint32(4,!0),i+=4),s=new DataView(e,i,12),n.height=s.getUint32(0,!0),n.width=s.getUint32(4,!0),i+=8,l>=4?(n.numDims=s.getUint32(8,!0),i+=4):n.numDims=1,s=new DataView(e,i,40),n.numValidPixel=s.getUint32(0,!0),n.microBlockSize=s.getInt32(4,!0),n.blobSize=s.getInt32(8,!0),n.imageType=s.getInt32(12,!0),n.maxZError=s.getFloat64(16,!0),n.zMin=s.getFloat64(24,!0),n.zMax=s.getFloat64(32,!0),i+=40,t.headerInfo=n,t.ptr=i,l>=3&&(r=l>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-r,n.blobSize-14))!==n.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,a=this.getDataTypeArray(i.imageType),n=i.numDims*this.getDataTypeSize(i.imageType),r=this.readSubArray(e,t.ptr,a,n),s=this.readSubArray(e,t.ptr+n,a,n);t.ptr+=2*n;var l,o=!0;for(l=0;l<i.numDims;l++)if(r[l]!==s[l]){o=!1;break}return i.minValues=r,i.maxValues=s,o},readSubArray:function(e,t,i,a){var n;if(i===Uint8Array)n=new Uint8Array(e,t,a);else{var r=new ArrayBuffer(a);new Uint8Array(r).set(new Uint8Array(e,t,a)),n=new i(r)}return n},readMask:function(e,t){var i,a,n=t.ptr,r=t.headerInfo,s=r.width*r.height,l=r.numValidPixel,o=new DataView(e,n,4),f={};if(f.numBytes=o.getUint32(0,!0),n+=4,(0===l||s===l)&&0!==f.numBytes)throw"invalid mask";if(0===l)i=new Uint8Array(Math.ceil(s/8)),f.bitset=i,a=new Uint8Array(s),t.pixels.resultMask=a,n+=f.numBytes;else if(f.numBytes>0){i=new Uint8Array(Math.ceil(s/8));var u=(o=new DataView(e,n,f.numBytes)).getInt16(0,!0),c=2,d=0,h=0;do{if(u>0)for(;u--;)i[d++]=o.getUint8(c++);else for(h=o.getUint8(c++),u=-u;u--;)i[d++]=h;u=o.getInt16(c,!0),c+=2}while(c<f.numBytes);if(-32768!==u||d<i.length)throw"Unexpected end of mask RLE encoding";a=new Uint8Array(s);var m=0,g=0;for(g=0;g<s;g++)7&g?(m=i[g>>3],m<<=7&g):m=i[g>>3],128&m&&(a[g]=1);t.pixels.resultMask=a,f.bitset=i,n+=f.numBytes}return t.ptr=n,t.mask=f,!0},readDataOneSweep:function(e,t,i){var a,n=t.ptr,r=t.headerInfo,s=r.numDims,l=r.width*r.height,o=r.imageType,f=r.numValidPixel*d.getDataTypeSize(o)*s,u=t.pixels.resultMask;if(i===Uint8Array)a=new Uint8Array(e,n,f);else{var c=new ArrayBuffer(f);new Uint8Array(c).set(new Uint8Array(e,n,f)),a=new i(c)}if(a.length===l*s)t.pixels.resultPixels=a;else{t.pixels.resultPixels=new i(l*s);var h=0,m=0,g=0,p=0;if(s>1)for(g=0;g<s;g++)for(p=g*l,m=0;m<l;m++)u[m]&&(t.pixels.resultPixels[p+m]=a[h++]);else for(m=0;m<l;m++)u[m]&&(t.pixels.resultPixels[m]=a[h++])}return n+=f,t.ptr=n,!0},readHuffmanTree:function(e,t){var i=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(e,t.ptr,16);if(t.ptr+=16,a.getInt32(0,!0)<2)throw"unsupported Huffman version";var n=a.getInt32(4,!0),r=a.getInt32(8,!0),s=a.getInt32(12,!0);if(r>=s)return!1;var l=new Uint32Array(s-r);d.decodeBits(e,t,l);var o,f,u,c,m=[];for(o=r;o<s;o++)m[f=o-(o<n?0:n)]={first:l[o-r],second:null};var g=e.byteLength-t.ptr,p=Math.ceil(g/4),x=new ArrayBuffer(4*p);new Uint8Array(x).set(new Uint8Array(e,t.ptr,g));var w,y=new Uint32Array(x),k=0,I=0;for(w=y[0],o=r;o<s;o++)(c=m[f=o-(o<n?0:n)].first)>0&&(m[f].second=w<<k>>>32-c,32-k>=c?32===(k+=c)&&(k=0,w=y[++I]):(k+=c-32,w=y[++I],m[f].second|=w>>>32-k));var b=0,U=0,M=new h;for(o=0;o<m.length;o++)void 0!==m[o]&&(b=Math.max(b,m[o].first));U=b>=i?i:b,b>=30&&console.log("WARning, large NUM LUT BITS IS "+b);var T,v,V,A,B,D=[];for(o=r;o<s;o++)if((c=m[f=o-(o<n?0:n)].first)>0)if(T=[c,f],c<=U)for(v=m[f].second<<U-c,V=1<<U-c,u=0;u<V;u++)D[v|u]=T;else for(v=m[f].second,B=M,A=c-1;A>=0;A--)v>>>A&1?(B.right||(B.right=new h),B=B.right):(B.left||(B.left=new h),B=B.left),0!==A||B.val||(B.val=T[1]);return{decodeLut:D,numBitsLUTQick:U,numBitsLUT:b,tree:M,stuffedData:y,srcPtr:I,bitPos:k}},readHuffman:function(e,t,i){var a,n,r,s,l,o,f,u,c,d=t.headerInfo,h=d.numDims,m=t.headerInfo.height,g=t.headerInfo.width,p=g*m,x=this.readHuffmanTree(e,t),w=x.decodeLut,y=x.tree,k=x.stuffedData,I=x.srcPtr,b=x.bitPos,U=x.numBitsLUTQick,M=x.numBitsLUT,T=0===t.headerInfo.imageType?128:0,v=t.pixels.resultMask,V=0;b>0&&(I++,b=0);var A,B=k[I],D=1===t.encodeMode,S=new i(p*h),P=S;for(A=0;A<d.numDims;A++){if(h>1&&(P=new i(S.buffer,p*A,p),V=0),t.headerInfo.numValidPixel===g*m)for(u=0,o=0;o<m;o++)for(f=0;f<g;f++,u++){if(n=0,l=s=B<<b>>>32-U,32-b<U&&(l=s|=k[I+1]>>>64-b-U),w[l])n=w[l][1],b+=w[l][0];else for(l=s=B<<b>>>32-M,32-b<M&&(l=s|=k[I+1]>>>64-b-M),a=y,c=0;c<M;c++)if(!(a=s>>>M-c-1&1?a.right:a.left).left&&!a.right){n=a.val,b=b+c+1;break}b>=32&&(b-=32,B=k[++I]),r=n-T,D?(r+=f>0?V:o>0?P[u-g]:V,r&=255,P[u]=r,V=r):P[u]=r}else for(u=0,o=0;o<m;o++)for(f=0;f<g;f++,u++)if(v[u]){if(n=0,l=s=B<<b>>>32-U,32-b<U&&(l=s|=k[I+1]>>>64-b-U),w[l])n=w[l][1],b+=w[l][0];else for(l=s=B<<b>>>32-M,32-b<M&&(l=s|=k[I+1]>>>64-b-M),a=y,c=0;c<M;c++)if(!(a=s>>>M-c-1&1?a.right:a.left).left&&!a.right){n=a.val,b=b+c+1;break}b>=32&&(b-=32,B=k[++I]),r=n-T,D?(f>0&&v[u-1]?r+=V:o>0&&v[u-g]?r+=P[u-g]:r+=V,r&=255,P[u]=r,V=r):P[u]=r}t.ptr=t.ptr+4*(I+1)+(b>0?4:0)}t.pixels.resultPixels=S},decodeBits:function(e,t,i,a,n){var r=t.headerInfo,d=r.fileVersion,h=0,m=new DataView(e,t.ptr,5),g=m.getUint8(0);h++;var p=g>>6,x=0===p?4:3-p,w=(32&g)>0,y=31&g,k=0;if(1===x)k=m.getUint8(h),h++;else if(2===x)k=m.getUint16(h,!0),h+=2;else{if(4!==x)throw"Invalid valid pixel count type";k=m.getUint32(h,!0),h+=4}var I,b,U,M,T,v,V,A,B,D=2*r.maxZError,S=r.numDims>1?r.maxValues[n]:r.zMax;if(w){for(t.counter.lut++,A=m.getUint8(h),h++,M=Math.ceil((A-1)*y/8),T=Math.ceil(M/4),b=new ArrayBuffer(4*T),U=new Uint8Array(b),t.ptr+=h,U.set(new Uint8Array(e,t.ptr,M)),V=new Uint32Array(b),t.ptr+=M,B=0;A-1>>>B;)B++;M=Math.ceil(k*B/8),T=Math.ceil(M/4),b=new ArrayBuffer(4*T),(U=new Uint8Array(b)).set(new Uint8Array(e,t.ptr,M)),I=new Uint32Array(b),t.ptr+=M,v=d>=3?f(V,y,A-1,a,D,S):l(V,y,A-1,a,D,S),d>=3?o(I,i,B,k,v):s(I,i,B,k,v)}else t.counter.bitstuffer++,B=y,t.ptr+=h,B>0&&(M=Math.ceil(k*B/8),T=Math.ceil(M/4),b=new ArrayBuffer(4*T),(U=new Uint8Array(b)).set(new Uint8Array(e,t.ptr,M)),I=new Uint32Array(b),t.ptr+=M,d>=3?null==a?c(I,i,B,k):o(I,i,B,k,!1,a,D,S):null==a?u(I,i,B,k):s(I,i,B,k,!1,a,D,S))},readTiles:function(e,t,i){var a=t.headerInfo,n=a.width,r=a.height,s=a.microBlockSize,l=a.imageType,o=d.getDataTypeSize(l),f=Math.ceil(n/s),u=Math.ceil(r/s);t.pixels.numBlocksY=u,t.pixels.numBlocksX=f,t.pixels.ptr=0;var c,h,m,g,p,x,w,y,k=0,I=0,b=0,U=0,M=0,T=0,v=0,V=0,A=0,B=0,D=0,S=0,P=0,E=0,C=0,F=new i(s*s),N=r%s||s,O=n%s||s,R=a.numDims,L=t.pixels.resultMask,z=t.pixels.resultPixels;for(b=0;b<u;b++)for(M=b!==u-1?s:N,U=0;U<f;U++)for(B=b*n*s+U*s,D=n-(T=U!==f-1?s:O),y=0;y<R;y++){if(R>1&&(z=new i(t.pixels.resultPixels.buffer,n*r*y*o,n*r)),v=e.byteLength-t.ptr,h={},C=0,C++,A=(V=(c=new DataView(e,t.ptr,Math.min(10,v))).getUint8(0))>>6&255,(V>>2&15)!=(U*s>>3&15))throw"integrity issue";if((p=3&V)>3)throw t.ptr+=C,"Invalid block encoding ("+p+")";if(2!==p)if(0===p){if(t.counter.uncompressed++,t.ptr+=C,S=(S=M*T*o)<(P=e.byteLength-t.ptr)?S:P,m=new ArrayBuffer(S%o==0?S:S+o-S%o),new Uint8Array(m).set(new Uint8Array(e,t.ptr,S)),g=new i(m),E=0,L)for(k=0;k<M;k++){for(I=0;I<T;I++)L[B]&&(z[B]=g[E++]),B++;B+=D}else for(k=0;k<M;k++){for(I=0;I<T;I++)z[B++]=g[E++];B+=D}t.ptr+=E*o}else if(x=d.getDataTypeUsed(l,A),w=d.getOnePixel(h,C,x,c),C+=d.getDataTypeSize(x),3===p)if(t.ptr+=C,t.counter.constantoffset++,L)for(k=0;k<M;k++){for(I=0;I<T;I++)L[B]&&(z[B]=w),B++;B+=D}else for(k=0;k<M;k++){for(I=0;I<T;I++)z[B++]=w;B+=D}else if(t.ptr+=C,d.decodeBits(e,t,F,w,y),C=0,L)for(k=0;k<M;k++){for(I=0;I<T;I++)L[B]&&(z[B]=F[C++]),B++;B+=D}else for(k=0;k<M;k++){for(I=0;I<T;I++)z[B++]=F[C++];B+=D}else t.counter.constant++,t.ptr+=C}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:d.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var t=e.headerInfo.zMax,i=e.headerInfo.numDims,a=e.headerInfo.height*e.headerInfo.width,n=a*i,r=0,s=0,l=0,o=e.pixels.resultMask;if(o)if(i>1)for(r=0;r<i;r++)for(l=r*a,s=0;s<a;s++)o[s]&&(e.pixels.resultPixels[l+s]=t);else for(s=0;s<a;s++)o[s]&&(e.pixels.resultPixels[s]=t);else if(e.pixels.resultPixels.fill)e.pixels.resultPixels.fill(t);else for(s=0;s<n;s++)e.pixels.resultPixels[s]=t},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null==t)return!1;var i;switch(e){case 0:i=t>=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,a){var n=0;switch(i){case 0:n=a.getInt8(t);break;case 1:n=a.getUint8(t);break;case 2:n=a.getInt16(t,!0);break;case 3:n=a.getUint16(t,!0);break;case 4:n=a.getInt32(t,!0);break;case 5:n=a.getUInt32(t,!0);break;case 6:n=a.getFloat32(t,!0);break;case 7:n=a.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return n}},h=function(e,t,i){this.val=e,this.left=t,this.right=i},{decode:function(e,t){var i=(t=t||{}).noDataValue,a=0,n={};n.ptr=t.inputOffset||0,n.pixels={},d.readHeaderInfo(e,n);var r=n.headerInfo,s=r.fileVersion,l=d.getDataTypeArray(r.imageType);d.readMask(e,n),r.numValidPixel===r.width*r.height||n.pixels.resultMask||(n.pixels.resultMask=t.maskData);var o,f=r.width*r.height;if(n.pixels.resultPixels=new l(f*r.numDims),n.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==r.numValidPixel)if(r.zMax===r.zMin)d.constructConstantSurface(n);else if(s>=4&&d.checkMinMaxRanges(e,n))d.constructConstantSurface(n);else{var u=new DataView(e,n.ptr,2),c=u.getUint8(0);if(n.ptr++,c)d.readDataOneSweep(e,n,l);else if(s>1&&r.imageType<=1&&Math.abs(r.maxZError-.5)<1e-5){var h=u.getUint8(1);if(n.ptr++,n.encodeMode=h,h>2||s<4&&h>1)throw"Invalid Huffman flag "+h;h?d.readHuffman(e,n,l):d.readTiles(e,n,l)}else d.readTiles(e,n,l)}n.eofOffset=n.ptr,t.inputOffset?(o=n.headerInfo.blobSize+t.inputOffset-n.ptr,Math.abs(o)>=1&&(n.eofOffset=t.inputOffset+n.headerInfo.blobSize)):(o=n.headerInfo.blobSize-n.ptr,Math.abs(o)>=1&&(n.eofOffset=n.headerInfo.blobSize));var m={width:r.width,height:r.height,pixelData:n.pixels.resultPixels,minValue:r.zMin,maxValue:r.zMax,validPixelCount:r.numValidPixel,dimCount:r.numDims,dimStats:{minValues:r.minValues,maxValues:r.maxValues},maskData:n.pixels.resultMask};if(n.pixels.resultMask&&d.isValidPixelValue(r.imageType,i)){var g=n.pixels.resultMask;for(a=0;a<f;a++)g[a]||(m.pixelData[a]=i);m.noDataValue=i}return n.noDataValue=i,t.returnFileInfo&&(m.fileInfo=d.formatFileInfo(n)),m},getBandCount:function(e){for(var t=0,i=0,a={ptr:0,pixels:{}};i<e.byteLength-58;)d.readHeaderInfo(e,a),i+=a.headerInfo.blobSize,t++,a.ptr=i;return t}}),w=(m=new ArrayBuffer(4),g=new Uint8Array(m),new Uint32Array(m)[0]=1,1===g[0]),y={decode:function(e,t){if(!w)throw"Big endian system is not supported.";var i,a,n=(t=t||{}).inputOffset||0,r=new Uint8Array(e,n,10),s=String.fromCharCode.apply(null,r);if("CntZImage"===s.trim())i=p,a=1;else{if("Lerc2"!==s.substring(0,5))throw"Unexpected file identifier string: "+s;i=x,a=2}for(var l,o,f,u,c,d,h=0,m=e.byteLength-10,g=[],y={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]};n<m;){var k=i.decode(e,{inputOffset:n,encodedMaskData:l,maskData:f,returnMask:0===h,returnEncodedMask:0===h,returnFileInfo:!0,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});n=k.fileInfo.eofOffset,0===h&&(l=k.encodedMaskData,f=k.maskData,y.width=k.width,y.height=k.height,y.dimCount=k.dimCount||1,y.pixelType=k.pixelType||k.fileInfo.pixelType,y.mask=k.maskData),a>1&&k.fileInfo.mask&&k.fileInfo.mask.numBytes>0&&g.push(k.maskData),h++,y.pixels.push(k.pixelData),y.statistics.push({minValue:k.minValue,maxValue:k.maxValue,noDataValue:k.noDataValue,dimStats:k.dimStats})}if(a>1&&g.length>1){for(d=y.width*y.height,y.bandMasks=g,(f=new Uint8Array(d)).set(g[0]),u=1;u<g.length;u++)for(o=g[u],c=0;c<d;c++)f[c]=f[c]&o[c];y.maskData=f}return y}};T.exports?T.exports=y:this.Lerc=y}();var A=V.exports;return c((function(t,i){if(t.encoding===w.LERC){let e;try{e=A.decode(t.heightmap)}catch(e){throw new u.RuntimeError(e)}if(e.statistics[0].minValue===Number.MAX_VALUE)throw new u.RuntimeError("Invalid tile data");t.heightmap=e.pixels[0],t.width=e.width,t.height=e.height}t.ellipsoid=e.Ellipsoid.clone(t.ellipsoid),t.rectangle=a.Rectangle.clone(t.rectangle);const n=v.computeVertices(t),r=n.vertices;return i.push(r.buffer),{vertices:r.buffer,numberOfAttributes:n.encoding.stride,minimumHeight:n.minimumHeight,maximumHeight:n.maximumHeight,gridWidth:t.width,gridHeight:t.height,boundingSphere3D:n.boundingSphere3D,orientedBoundingBox:n.orientedBoundingBox,occludeePointInScaledSpace:n.occludeePointInScaledSpace,encoding:n.encoding,westIndicesSouthToNorth:n.westIndicesSouthToNorth,southIndicesEastToWest:n.southIndicesEastToWest,eastIndicesNorthToSouth:n.eastIndicesNorthToSouth,northIndicesWestToEast:n.northIndicesWestToEast}}))}));
public/CIMSDK/Workers/createVerticesFromQuantizedTerrainMesh.js
@@ -1 +1 @@
define(["./AxisAlignedBoundingBox-d1a0c6e6","./Matrix2-23dd5853","./Matrix3-6e56fbc7","./defaultValue-865ac579","./TerrainEncoding-1a72b96a","./IndexDatatype-16f6b4a1","./Math-76ce6367","./Transforms-f3654378","./WebMercatorProjection-ab4c1f3a","./createTaskProcessorWorker","./RuntimeError-9e0724f9","./AttributeCompression-b9d605fe","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./combine-5e110d09"],(function(t,e,r,n,o,i,a,s,c,h,l,d,u,I,g){"use strict";function m(){s.DeveloperError.throwInstantiationError()}Object.defineProperties(m.prototype,{errorEvent:{get:s.DeveloperError.throwInstantiationError},credit:{get:s.DeveloperError.throwInstantiationError},tilingScheme:{get:s.DeveloperError.throwInstantiationError},ready:{get:s.DeveloperError.throwInstantiationError},readyPromise:{get:s.DeveloperError.throwInstantiationError},hasWaterMask:{get:s.DeveloperError.throwInstantiationError},hasVertexNormals:{get:s.DeveloperError.throwInstantiationError},availability:{get:s.DeveloperError.throwInstantiationError}});const f=[];m.getRegularGridIndices=function(t,e){let r=f[t];n.defined(r)||(f[t]=r=[]);let o=r[e];return n.defined(o)||(o=t*e<a.CesiumMath.SIXTY_FOUR_KILOBYTES?r[e]=new Uint16Array((t-1)*(e-1)*6):r[e]=new Uint32Array((t-1)*(e-1)*6),E(t,e,o,0)),o};const y=[];m.getRegularGridIndicesAndEdgeIndices=function(t,e){let r=y[t];n.defined(r)||(y[t]=r=[]);let o=r[e];if(!n.defined(o)){const n=m.getRegularGridIndices(t,e),i=p(t,e),a=i.westIndicesSouthToNorth,s=i.southIndicesEastToWest,c=i.eastIndicesNorthToSouth,h=i.northIndicesWestToEast;o=r[e]={indices:n,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:c,northIndicesWestToEast:h}}return o};const T=[];function p(t,e){const r=new Array(e),n=new Array(t),o=new Array(e),i=new Array(t);let a;for(a=0;a<t;++a)i[a]=a,n[a]=t*e-1-a;for(a=0;a<e;++a)o[a]=(a+1)*t-1,r[a]=(e-a-1)*t;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:i}}function E(t,e,r,n){let o=0;for(let i=0;i<e-1;++i){for(let e=0;e<t-1;++e){const e=o,i=e+t,a=i+1,s=e+1;r[n++]=e,r[n++]=i,r[n++]=s,r[n++]=s,r[n++]=i,r[n++]=a,++o}++o}}function x(t,e,r,n){let o=t[0];const i=t.length;for(let a=1;a<i;++a){const i=t[a];r[n++]=o,r[n++]=i,r[n++]=e,r[n++]=e,r[n++]=i,r[n++]=e+1,o=i,++e}return n}m.getRegularGridAndSkirtIndicesAndEdgeIndices=function(t,e){let r=T[t];n.defined(r)||(T[t]=r=[]);let o=r[e];if(!n.defined(o)){const n=t*e,a=(t-1)*(e-1)*6,s=2*t+2*e,c=n+s,h=a+6*Math.max(0,s-4),l=p(t,e),d=l.westIndicesSouthToNorth,u=l.southIndicesEastToWest,I=l.eastIndicesNorthToSouth,g=l.northIndicesWestToEast,f=i.IndexDatatype.createTypedArray(c,h);E(t,e,f,0),m.addSkirtIndices(d,u,I,g,n,f,a),o=r[e]={indices:f,westIndicesSouthToNorth:d,southIndicesEastToWest:u,eastIndicesNorthToSouth:I,northIndicesWestToEast:g,indexCountWithoutSkirts:a}}return o},m.addSkirtIndices=function(t,e,r,n,o,i,a){let s=o;a=x(t,s,i,a),s+=t.length,a=x(e,s,i,a),s+=e.length,a=x(r,s,i,a),s+=r.length,x(n,s,i,a)},m.heightmapTerrainQuality=.25,m.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,e,r){return 2*t.maximumRadius*Math.PI*m.heightmapTerrainQuality/(e*r)},m.prototype.requestTileGeometry=s.DeveloperError.throwInstantiationError,m.prototype.getLevelMaximumGeometricError=s.DeveloperError.throwInstantiationError,m.prototype.getTileDataAvailable=s.DeveloperError.throwInstantiationError,m.prototype.loadTileDataAvailability=s.DeveloperError.throwInstantiationError;const N=32767,w=new r.Cartesian3,M=new r.Cartesian3,b=new r.Cartesian3,S=new r.Cartographic,A=new e.Cartesian2,C=new r.Cartographic,W=[],v=[];function P(t,e){let r,n,o,i,a=0;const s=e.length;for(o=e[0],r=1;r<=s;r++)i=e[r%s],t[0]>Math.min(o[0],i[0])&&t[0]<=Math.max(o[0],i[0])&&t[1]<=Math.max(o[1],i[1])&&o[0]!==i[0]&&(n=(t[0]-o[0])*(i[1]-o[1])/(i[0]-o[0])+o[1],(o[1]===i[1]||t[1]<=n)&&a++),o=i;return a%2!=0}function k(t,e,r,n){const o=(t.x-r.x)*(e.y-r.y)-(t.y-r.y)*(e.x-r.x),i=(t.x-n.x)*(e.y-n.y)-(t.y-n.y)*(e.x-n.x);if(o*i>=0)return!1;const a=(r.x-t.x)*(n.y-t.y)-(r.y-t.y)*(n.x-t.x);if(a*(a+o-i)>=0)return!1;const s=a/(i-o),c=s*(e.x-t.x),h=s*(e.y-t.y);return{x:t.x+c,y:t.y+h}}function D(t,n,o,i,s,c,h,l,d){let u=Number.POSITIVE_INFINITY;const I=s.north,g=s.south;let m=s.east;const f=s.west;m<f&&(m+=a.CesiumMath.TWO_PI);const y=t.length;for(let s=0;s<y;++s){const y=t[s],T=o[y],p=i[y];S.longitude=a.CesiumMath.lerp(f,m,p.x),S.latitude=a.CesiumMath.lerp(g,I,p.y),S.height=T-n;const E=c.cartographicToCartesian(S,w);e.Matrix4.multiplyByPoint(h,E,E),r.Cartesian3.minimumByComponent(E,l,l),r.Cartesian3.maximumByComponent(E,d,d),u=Math.min(u,S.height)}return u}function F(t,e,r,o,i,s,h,l,d,u,I,g,m,f){const y=n.defined(h),T=d.north,p=d.south;let E=d.east;const x=d.west;E<x&&(E+=a.CesiumMath.TWO_PI);const N=r.length;for(let n=0;n<N;++n){const d=r[n],N=i[d],M=s[d];S.longitude=a.CesiumMath.lerp(x,E,M.x)+m,S.latitude=a.CesiumMath.lerp(p,T,M.y)+f,S.height=N-u;const b=l.cartographicToCartesian(S,w);if(y){const t=2*d;A.x=h[t],A.y=h[t+1]}let C,W;o.hasWebMercatorT&&(C=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(S.latitude)-I)*g),o.hasGeodeticSurfaceNormals&&(W=l.geodeticSurfaceNormal(b)),e=o.encode(t,e,b,M,S.height,A,C,W,1)}}function H(t,e){let r;return"function"==typeof t.slice&&(r=t.slice(),"function"!=typeof r.sort&&(r=void 0)),n.defined(r)||(r=Array.prototype.slice.call(t)),r.sort(e),r}return h((function(h,l){const d=h.flattenPolygonHeight||[1],u=h.flattenPolygon||[];let I=-65565;const g=h.quantizedVertices,f=g.length/3,y=h.octEncodedNormals,T=h.westIndices.length+h.eastIndices.length+h.southIndices.length+h.northIndices.length,p=h.includeWebMercatorT,E=h.exaggeration,x=h.exaggerationRelativeHeight,_=1!==E,G=e.Rectangle.clone(h.rectangle),V=G.west,Y=G.south,O=G.east,B=G.north;W.length=0,v.length=0;let R=!1;const L=[[V,Y],[O,Y],[O,B],[V,B]];for(let t=0;t<d.length;t++)if(1!==d[t]){R=!1;for(let r=0;r<u[t].length;r++){const n=u[t][r];C.longitude=n[0],C.latitude=n[1],C.height=0;if(e.Rectangle.contains(G,C)){W.push(d[t]),v.push(u[t]),R=!0;break}}if(!R)for(let e=0;e<L.length;e++){if(P(L[e],u[t])){W.push(d[t]),v.push(u[t]),R=!0;break}}if(!R)for(let e=0;e<u[t].length-1;e++){for(let r=0;r<L.length-1;r++){if(k({x:L[r][0],y:L[r][1]},{x:L[r+1][0],y:L[r+1][1]},{x:u[t][e][0],y:u[t][e][1]},{x:u[t][e+1][0],y:u[t][e+1][1]})){W.push(d[t]),v.push(u[t]),R=!0;break}}if(R)break}}const j=r.Ellipsoid.clone(h.ellipsoid),U=h.minimumHeight;let z=h.maximumHeight;const q=h.relativeToCenter,Q=s.Transforms.eastNorthUpToFixedFrame(q,j),K=e.Matrix4.inverseTransformation(Q,new e.Matrix4);let X,Z;p&&(X=c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(Y),Z=1/(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(B)-X));const J=g.subarray(0,f),$=g.subarray(f,2*f),tt=g.subarray(2*f,3*f),et=n.defined(y),rt=new Array(f),nt=new Array(f),ot=new Array(f),it=p?new Array(f):[],at=_?new Array(f):[],st=M;st.x=Number.POSITIVE_INFINITY,st.y=Number.POSITIVE_INFINITY,st.z=Number.POSITIVE_INFINITY;const ct=b;ct.x=Number.NEGATIVE_INFINITY,ct.y=Number.NEGATIVE_INFINITY,ct.z=Number.NEGATIVE_INFINITY;let ht=Number.POSITIVE_INFINITY,lt=Number.NEGATIVE_INFINITY,dt=Number.POSITIVE_INFINITY,ut=Number.NEGATIVE_INFINITY;for(let t=0;t<f;++t){const n=J[t],o=$[t],i=n/N,s=o/N;let h=a.CesiumMath.lerp(U,z,tt[t]/N);S.longitude=a.CesiumMath.lerp(V,O,i),S.latitude=a.CesiumMath.lerp(Y,B,s),S.height=h;for(let t=0;t<W.length;t++)if(1!==W[t]){P([S.longitude,S.latitude],v[t])&&(S.height=h=d[t],I=Math.max(I,d[t]))}ht=Math.min(S.longitude,ht),lt=Math.max(S.longitude,lt),dt=Math.min(S.latitude,dt),ut=Math.max(S.latitude,ut);const l=j.cartographicToCartesian(S);rt[t]=new e.Cartesian2(i,s),nt[t]=h,ot[t]=l,p&&(it[t]=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(S.latitude)-X)*Z),_&&(at[t]=j.geodeticSurfaceNormal(l)),e.Matrix4.multiplyByPoint(K,l,w),r.Cartesian3.minimumByComponent(w,st,st),r.Cartesian3.maximumByComponent(w,ct,ct)}-65565!==I&&(z=1.2*I);const It=H(h.westIndices,(function(t,e){return rt[t].y-rt[e].y})),gt=H(h.eastIndices,(function(t,e){return rt[e].y-rt[t].y})),mt=H(h.southIndices,(function(t,e){return rt[e].x-rt[t].x})),ft=H(h.northIndices,(function(t,e){return rt[t].x-rt[e].x}));let yt;if(U<0){yt=new o.EllipsoidalOccluder(j).computeHorizonCullingPointPossiblyUnderEllipsoid(q,ot,U)}let Tt=U;Tt=Math.min(Tt,D(h.westIndices,h.westSkirtHeight,nt,rt,G,j,K,st,ct)),Tt=Math.min(Tt,D(h.southIndices,h.southSkirtHeight,nt,rt,G,j,K,st,ct)),Tt=Math.min(Tt,D(h.eastIndices,h.eastSkirtHeight,nt,rt,G,j,K,st,ct)),Tt=Math.min(Tt,D(h.northIndices,h.northSkirtHeight,nt,rt,G,j,K,st,ct));const pt=new t.AxisAlignedBoundingBox(st,ct,q),Et=new o.TerrainEncoding(q,pt,Tt,z,Q,et,p,_,E,x),xt=Et.stride,Nt=new Float32Array(f*xt+T*xt);let wt=0;for(let t=0;t<f;++t){if(et){const e=2*t;A.x=y[e],A.y=y[e+1]}wt=Et.encode(Nt,wt,ot[t],rt[t],nt[t],A,it[t],at[t],0)}const Mt=Math.max(0,2*(T-4)),bt=h.indices.length+3*Mt,St=i.IndexDatatype.createTypedArray(f+T,bt);St.set(h.indices,0);const At=1e-4,Ct=(lt-ht)*At,Wt=(ut-dt)*At,vt=-Ct,Pt=Ct,kt=Wt,Dt=-Wt;let Ft=f*xt;return F(Nt,Ft,It,Et,nt,rt,y,j,G,h.westSkirtHeight,X,Z,vt,0),Ft+=h.westIndices.length*xt,F(Nt,Ft,mt,Et,nt,rt,y,j,G,h.southSkirtHeight,X,Z,0,Dt),Ft+=h.southIndices.length*xt,F(Nt,Ft,gt,Et,nt,rt,y,j,G,h.eastSkirtHeight,X,Z,Pt,0),Ft+=h.eastIndices.length*xt,F(Nt,Ft,ft,Et,nt,rt,y,j,G,h.northSkirtHeight,X,Z,0,kt),m.addSkirtIndices(It,mt,gt,ft,f,St,h.indices.length),l.push(Nt.buffer,St.buffer),{vertices:Nt.buffer,indices:St.buffer,westIndicesSouthToNorth:It,southIndicesEastToWest:mt,eastIndicesNorthToSouth:gt,northIndicesWestToEast:ft,vertexStride:xt,center:q,minimumHeight:U,maximumHeight:z,occludeePointInScaledSpace:yt,encoding:Et,indexCountWithoutSkirts:h.indices.length}}))}));
define(["./AxisAlignedBoundingBox-73c388a7","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./defaultValue-865ac579","./TerrainEncoding-692d7e68","./IndexDatatype-16f6b4a1","./Math-76ce6367","./Transforms-221c7c82","./WebMercatorProjection-bfe55882","./createTaskProcessorWorker","./RuntimeError-9e0724f9","./AttributeCompression-10297289","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./combine-5e110d09"],(function(t,e,r,n,o,i,a,s,c,h,l,u,d,I,g){"use strict";function m(){s.DeveloperError.throwInstantiationError()}Object.defineProperties(m.prototype,{errorEvent:{get:s.DeveloperError.throwInstantiationError},credit:{get:s.DeveloperError.throwInstantiationError},tilingScheme:{get:s.DeveloperError.throwInstantiationError},ready:{get:s.DeveloperError.throwInstantiationError},readyPromise:{get:s.DeveloperError.throwInstantiationError},hasWaterMask:{get:s.DeveloperError.throwInstantiationError},hasVertexNormals:{get:s.DeveloperError.throwInstantiationError},availability:{get:s.DeveloperError.throwInstantiationError}});const f=[];m.getRegularGridIndices=function(t,e){let r=f[t];n.defined(r)||(f[t]=r=[]);let o=r[e];return n.defined(o)||(o=t*e<a.CesiumMath.SIXTY_FOUR_KILOBYTES?r[e]=new Uint16Array((t-1)*(e-1)*6):r[e]=new Uint32Array((t-1)*(e-1)*6),E(t,e,o,0)),o};const y=[];m.getRegularGridIndicesAndEdgeIndices=function(t,e){let r=y[t];n.defined(r)||(y[t]=r=[]);let o=r[e];if(!n.defined(o)){const n=m.getRegularGridIndices(t,e),i=p(t,e),a=i.westIndicesSouthToNorth,s=i.southIndicesEastToWest,c=i.eastIndicesNorthToSouth,h=i.northIndicesWestToEast;o=r[e]={indices:n,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:c,northIndicesWestToEast:h}}return o};const T=[];function p(t,e){const r=new Array(e),n=new Array(t),o=new Array(e),i=new Array(t);let a;for(a=0;a<t;++a)i[a]=a,n[a]=t*e-1-a;for(a=0;a<e;++a)o[a]=(a+1)*t-1,r[a]=(e-a-1)*t;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:i}}function E(t,e,r,n){let o=0;for(let i=0;i<e-1;++i){for(let e=0;e<t-1;++e){const e=o,i=e+t,a=i+1,s=e+1;r[n++]=e,r[n++]=i,r[n++]=s,r[n++]=s,r[n++]=i,r[n++]=a,++o}++o}}function x(t,e,r,n){let o=t[0];const i=t.length;for(let a=1;a<i;++a){const i=t[a];r[n++]=o,r[n++]=i,r[n++]=e,r[n++]=e,r[n++]=i,r[n++]=e+1,o=i,++e}return n}m.getRegularGridAndSkirtIndicesAndEdgeIndices=function(t,e){let r=T[t];n.defined(r)||(T[t]=r=[]);let o=r[e];if(!n.defined(o)){const n=t*e,a=(t-1)*(e-1)*6,s=2*t+2*e,c=n+s,h=a+6*Math.max(0,s-4),l=p(t,e),u=l.westIndicesSouthToNorth,d=l.southIndicesEastToWest,I=l.eastIndicesNorthToSouth,g=l.northIndicesWestToEast,f=i.IndexDatatype.createTypedArray(c,h);E(t,e,f,0),m.addSkirtIndices(u,d,I,g,n,f,a),o=r[e]={indices:f,westIndicesSouthToNorth:u,southIndicesEastToWest:d,eastIndicesNorthToSouth:I,northIndicesWestToEast:g,indexCountWithoutSkirts:a}}return o},m.addSkirtIndices=function(t,e,r,n,o,i,a){let s=o;a=x(t,s,i,a),s+=t.length,a=x(e,s,i,a),s+=e.length,a=x(r,s,i,a),s+=r.length,x(n,s,i,a)},m.heightmapTerrainQuality=.25,m.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,e,r){return 2*t.maximumRadius*Math.PI*m.heightmapTerrainQuality/(e*r)},m.prototype.requestTileGeometry=s.DeveloperError.throwInstantiationError,m.prototype.getLevelMaximumGeometricError=s.DeveloperError.throwInstantiationError,m.prototype.getTileDataAvailable=s.DeveloperError.throwInstantiationError,m.prototype.loadTileDataAvailability=s.DeveloperError.throwInstantiationError;const N=32767,w=new r.Cartesian3,M=new r.Cartesian3,S=new r.Cartesian3,b=new r.Cartographic,A=new e.Cartesian2,C=new r.Cartographic,W=[],v=[];function P(t,e){let r,n,o,i,a=0;const s=e.length;for(o=e[0],r=1;r<=s;r++)i=e[r%s],t[0]>Math.min(o[0],i[0])&&t[0]<=Math.max(o[0],i[0])&&t[1]<=Math.max(o[1],i[1])&&o[0]!==i[0]&&(n=(t[0]-o[0])*(i[1]-o[1])/(i[0]-o[0])+o[1],(o[1]===i[1]||t[1]<=n)&&a++),o=i;return a%2!=0}function k(t,e,r,n){const o=(t.x-r.x)*(e.y-r.y)-(t.y-r.y)*(e.x-r.x),i=(t.x-n.x)*(e.y-n.y)-(t.y-n.y)*(e.x-n.x);if(o*i>=0)return!1;const a=(r.x-t.x)*(n.y-t.y)-(r.y-t.y)*(n.x-t.x);if(a*(a+o-i)>=0)return!1;const s=a/(i-o),c=s*(e.x-t.x),h=s*(e.y-t.y);return{x:t.x+c,y:t.y+h}}function D(t,n,o,i,s,c,h,l,u){let d=Number.POSITIVE_INFINITY;const I=s.north,g=s.south;let m=s.east;const f=s.west;m<f&&(m+=a.CesiumMath.TWO_PI);const y=t.length;for(let s=0;s<y;++s){const y=t[s],T=o[y],p=i[y];b.longitude=a.CesiumMath.lerp(f,m,p.x),b.latitude=a.CesiumMath.lerp(g,I,p.y),b.height=T-n;const E=c.cartographicToCartesian(b,w);e.Matrix4.multiplyByPoint(h,E,E),r.Cartesian3.minimumByComponent(E,l,l),r.Cartesian3.maximumByComponent(E,u,u),d=Math.min(d,b.height)}return d}function F(t,e,r,o,i,s,h,l,u,d,I,g,m,f){const y=n.defined(h),T=u.north,p=u.south;let E=u.east;const x=u.west;E<x&&(E+=a.CesiumMath.TWO_PI);const N=r.length;for(let n=0;n<N;++n){const u=r[n],N=i[u],M=s[u];b.longitude=a.CesiumMath.lerp(x,E,M.x)+m,b.latitude=a.CesiumMath.lerp(p,T,M.y)+f,b.height=N-d;const S=l.cartographicToCartesian(b,w);if(y){const t=2*u;A.x=h[t],A.y=h[t+1]}let C,W;o.hasWebMercatorT&&(C=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(b.latitude)-I)*g),o.hasGeodeticSurfaceNormals&&(W=l.geodeticSurfaceNormal(S)),e=o.encode(t,e,S,M,b.height,A,C,W,1)}}function H(t,e){let r;return"function"==typeof t.slice&&(r=t.slice(),"function"!=typeof r.sort&&(r=void 0)),n.defined(r)||(r=Array.prototype.slice.call(t)),r.sort(e),r}return h((function(h,l){const u=h.flattenPolygonHeight||[1],d=h.flattenPolygon||[];let I=-65565;const g=h.quantizedVertices,f=g.length/3,y=h.octEncodedNormals,T=h.westIndices.length+h.eastIndices.length+h.southIndices.length+h.northIndices.length,p=h.includeWebMercatorT,E=h.exaggeration,x=h.exaggerationRelativeHeight,_=1!==E,G=e.Rectangle.clone(h.rectangle),V=G.west,Y=G.south,O=G.east,B=G.north;W.length=0,v.length=0;let R=!1;const L=[[V,Y],[O,Y],[O,B],[V,B]];for(let t=0;t<u.length;t++)if(1!==u[t]){R=!1;for(let r=0;r<d[t].length;r++){const n=d[t][r];C.longitude=n[0],C.latitude=n[1],C.height=0;if(e.Rectangle.contains(G,C)){W.push(u[t]),v.push(d[t]),R=!0;break}}if(!R)for(let e=0;e<L.length;e++){if(P(L[e],d[t])){W.push(u[t]),v.push(d[t]),R=!0;break}}if(!R)for(let e=0;e<d[t].length-1;e++){for(let r=0;r<L.length-1;r++){if(k({x:L[r][0],y:L[r][1]},{x:L[r+1][0],y:L[r+1][1]},{x:d[t][e][0],y:d[t][e][1]},{x:d[t][e+1][0],y:d[t][e+1][1]})){W.push(u[t]),v.push(d[t]),R=!0;break}}if(R)break}}const j=r.Ellipsoid.clone(h.ellipsoid),U=h.minimumHeight;let z=h.maximumHeight;const q=h.relativeToCenter,Q=s.Transforms.eastNorthUpToFixedFrame(q,j),K=e.Matrix4.inverseTransformation(Q,new e.Matrix4);let X,Z;p&&(X=c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(Y),Z=1/(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(B)-X));const J=g.subarray(0,f),$=g.subarray(f,2*f),tt=g.subarray(2*f,3*f),et=n.defined(y),rt=new Array(f),nt=new Array(f),ot=new Array(f),it=p?new Array(f):[],at=_?new Array(f):[],st=M;st.x=Number.POSITIVE_INFINITY,st.y=Number.POSITIVE_INFINITY,st.z=Number.POSITIVE_INFINITY;const ct=S;ct.x=Number.NEGATIVE_INFINITY,ct.y=Number.NEGATIVE_INFINITY,ct.z=Number.NEGATIVE_INFINITY;let ht=Number.POSITIVE_INFINITY,lt=Number.NEGATIVE_INFINITY,ut=Number.POSITIVE_INFINITY,dt=Number.NEGATIVE_INFINITY;for(let t=0;t<f;++t){const n=J[t],o=$[t],i=n/N,s=o/N;let h=a.CesiumMath.lerp(U,z,tt[t]/N);b.longitude=a.CesiumMath.lerp(V,O,i),b.latitude=a.CesiumMath.lerp(Y,B,s),b.height=h;for(let t=0;t<W.length;t++)if(1!==W[t]){P([b.longitude,b.latitude],v[t])&&(b.height=h=u[t],I=Math.max(I,u[t]))}ht=Math.min(b.longitude,ht),lt=Math.max(b.longitude,lt),ut=Math.min(b.latitude,ut),dt=Math.max(b.latitude,dt);const l=j.cartographicToCartesian(b);rt[t]=new e.Cartesian2(i,s),nt[t]=h,ot[t]=l,p&&(it[t]=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(b.latitude)-X)*Z),_&&(at[t]=j.geodeticSurfaceNormal(l)),e.Matrix4.multiplyByPoint(K,l,w),r.Cartesian3.minimumByComponent(w,st,st),r.Cartesian3.maximumByComponent(w,ct,ct)}-65565!==I&&(z=1.2*I);const It=H(h.westIndices,(function(t,e){return rt[t].y-rt[e].y})),gt=H(h.eastIndices,(function(t,e){return rt[e].y-rt[t].y})),mt=H(h.southIndices,(function(t,e){return rt[e].x-rt[t].x})),ft=H(h.northIndices,(function(t,e){return rt[t].x-rt[e].x}));let yt;if(U<0){yt=new o.EllipsoidalOccluder(j).computeHorizonCullingPointPossiblyUnderEllipsoid(q,ot,U)}let Tt=U;Tt=Math.min(Tt,D(h.westIndices,h.westSkirtHeight,nt,rt,G,j,K,st,ct)),Tt=Math.min(Tt,D(h.southIndices,h.southSkirtHeight,nt,rt,G,j,K,st,ct)),Tt=Math.min(Tt,D(h.eastIndices,h.eastSkirtHeight,nt,rt,G,j,K,st,ct)),Tt=Math.min(Tt,D(h.northIndices,h.northSkirtHeight,nt,rt,G,j,K,st,ct));const pt=new t.AxisAlignedBoundingBox(st,ct,q),Et=new o.TerrainEncoding(q,pt,Tt,z,Q,et,p,_,E,x),xt=Et.stride,Nt=new Float32Array(f*xt+T*xt);let wt=0;for(let t=0;t<f;++t){if(et){const e=2*t;A.x=y[e],A.y=y[e+1]}wt=Et.encode(Nt,wt,ot[t],rt[t],nt[t],A,it[t],at[t],0)}const Mt=Math.max(0,2*(T-4)),St=h.indices.length+3*Mt,bt=i.IndexDatatype.createTypedArray(f+T,St);bt.set(h.indices,0);const At=1e-4,Ct=(lt-ht)*At,Wt=(dt-ut)*At,vt=-Ct,Pt=Ct,kt=Wt,Dt=-Wt;let Ft=f*xt;return F(Nt,Ft,It,Et,nt,rt,y,j,G,h.westSkirtHeight,X,Z,vt,0),Ft+=h.westIndices.length*xt,F(Nt,Ft,mt,Et,nt,rt,y,j,G,h.southSkirtHeight,X,Z,0,Dt),Ft+=h.southIndices.length*xt,F(Nt,Ft,gt,Et,nt,rt,y,j,G,h.eastSkirtHeight,X,Z,Pt,0),Ft+=h.eastIndices.length*xt,F(Nt,Ft,ft,Et,nt,rt,y,j,G,h.northSkirtHeight,X,Z,0,kt),m.addSkirtIndices(It,mt,gt,ft,f,bt,h.indices.length),l.push(Nt.buffer,bt.buffer),{vertices:Nt.buffer,indices:bt.buffer,westIndicesSouthToNorth:It,southIndicesEastToWest:mt,eastIndicesNorthToSouth:gt,northIndicesWestToEast:ft,vertexStride:xt,center:q,minimumHeight:U,maximumHeight:z,occludeePointInScaledSpace:yt,encoding:Et,indexCountWithoutSkirts:h.indices.length}}))}));
public/CIMSDK/Workers/createWallGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./Transforms-f3654378","./ComponentDatatype-985dcc38","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./VertexFormat-20b5279f","./WallGeometryLibrary-d0268552","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./arrayRemoveDuplicates-398390b2","./PolylinePipeline-70a831f8","./EllipsoidGeodesic-3e762525","./EllipsoidRhumbLine-b175af48","./IntersectionTests-63574cfd","./Plane-4befcca0"],(function(e,t,n,i,a,o,r,s,l,m,u,c,p,d,f,y,g,h,C,x){"use strict";const b=new t.Cartesian3,A=new t.Cartesian3,_=new t.Cartesian3,E=new t.Cartesian3,w=new t.Cartesian3,F=new t.Cartesian3,v=new t.Cartesian3;function L(n){const i=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).positions,a=n.maximumHeights,o=n.minimumHeights,r=e.defaultValue(n.vertexFormat,l.VertexFormat.DEFAULT),m=e.defaultValue(n.granularity,s.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84);this._positions=i,this._minimumHeights=o,this._maximumHeights=a,this._vertexFormat=l.VertexFormat.clone(r),this._granularity=m,this._ellipsoid=t.Ellipsoid.clone(u),this._workerName="createWallGeometry";let c=1+i.length*t.Cartesian3.packedLength+2;e.defined(o)&&(c+=o.length),e.defined(a)&&(c+=a.length),this.packedLength=c+t.Ellipsoid.packedLength+l.VertexFormat.packedLength+1}L.pack=function(n,i,a){let o;a=e.defaultValue(a,0);const r=n._positions;let s=r.length;for(i[a++]=s,o=0;o<s;++o,a+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[o],i,a);const m=n._minimumHeights;if(s=e.defined(m)?m.length:0,i[a++]=s,e.defined(m))for(o=0;o<s;++o)i[a++]=m[o];const u=n._maximumHeights;if(s=e.defined(u)?u.length:0,i[a++]=s,e.defined(u))for(o=0;o<s;++o)i[a++]=u[o];return t.Ellipsoid.pack(n._ellipsoid,i,a),a+=t.Ellipsoid.packedLength,l.VertexFormat.pack(n._vertexFormat,i,a),i[a+=l.VertexFormat.packedLength]=n._granularity,i};const V=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),k=new l.VertexFormat,H={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:V,vertexFormat:k,granularity:void 0};return L.unpack=function(n,i,a){let o;i=e.defaultValue(i,0);let r=n[i++];const s=new Array(r);for(o=0;o<r;++o,i+=t.Cartesian3.packedLength)s[o]=t.Cartesian3.unpack(n,i);let m,u;if(r=n[i++],r>0)for(m=new Array(r),o=0;o<r;++o)m[o]=n[i++];if(r=n[i++],r>0)for(u=new Array(r),o=0;o<r;++o)u[o]=n[i++];const c=t.Ellipsoid.unpack(n,i,V);i+=t.Ellipsoid.packedLength;const p=l.VertexFormat.unpack(n,i,k),d=n[i+=l.VertexFormat.packedLength];return e.defined(a)?(a._positions=s,a._minimumHeights=m,a._maximumHeights=u,a._ellipsoid=t.Ellipsoid.clone(c,a._ellipsoid),a._vertexFormat=l.VertexFormat.clone(p,a._vertexFormat),a._granularity=d,a):(H.positions=s,H.minimumHeights=m,H.maximumHeights=u,H.granularity=d,new L(H))},L.fromConstantHeights=function(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions;let i,a;const o=t.minimumHeight,r=t.maximumHeight,s=e.defined(o),l=e.defined(r);if(s||l){const e=n.length;i=s?new Array(e):void 0,a=l?new Array(e):void 0;for(let t=0;t<e;++t)s&&(i[t]=o),l&&(a[t]=r)}return new L({positions:n,maximumHeights:a,minimumHeights:i,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},L.createGeometry=function(l){const u=l._positions,c=l._minimumHeights,p=l._maximumHeights,d=l._vertexFormat,f=l._granularity,y=l._ellipsoid,g=m.WallGeometryLibrary.computePositions(y,u,p,c,f,!0);if(!e.defined(g))return;const h=g.bottomPositions,C=g.topPositions,x=g.numCorners;let L=C.length,V=2*L;const k=d.position?new Float64Array(V):void 0,H=d.normal?new Float32Array(V):void 0,G=d.tangent?new Float32Array(V):void 0,D=d.bitangent?new Float32Array(V):void 0,P=d.st?new Float32Array(V/3*2):void 0;let T,z=0,O=0,R=0,S=0,I=0,M=v,N=F,W=w,B=!0;L/=3;let U=0;const q=1/(L-x-1);for(T=0;T<L;++T){const e=3*T,n=t.Cartesian3.fromArray(C,e,b),i=t.Cartesian3.fromArray(h,e,A);if(d.position&&(k[z++]=i.x,k[z++]=i.y,k[z++]=i.z,k[z++]=n.x,k[z++]=n.y,k[z++]=n.z),d.st&&(P[I++]=U,P[I++]=0,P[I++]=U,P[I++]=1),d.normal||d.tangent||d.bitangent){let i=t.Cartesian3.clone(t.Cartesian3.ZERO,E);const a=t.Cartesian3.subtract(n,y.geodeticSurfaceNormal(n,A),A);if(T+1<L&&(i=t.Cartesian3.fromArray(C,e+3,E)),B){const e=t.Cartesian3.subtract(i,n,_),o=t.Cartesian3.subtract(a,n,b);M=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,M),M),B=!1}t.Cartesian3.equalsEpsilon(n,i,s.CesiumMath.EPSILON10)?B=!0:(U+=q,d.tangent&&(N=t.Cartesian3.normalize(t.Cartesian3.subtract(i,n,N),N)),d.bitangent&&(W=t.Cartesian3.normalize(t.Cartesian3.cross(M,N,W),W))),d.normal&&(H[O++]=M.x,H[O++]=M.y,H[O++]=M.z,H[O++]=M.x,H[O++]=M.y,H[O++]=M.z),d.tangent&&(G[S++]=N.x,G[S++]=N.y,G[S++]=N.z,G[S++]=N.x,G[S++]=N.y,G[S++]=N.z),d.bitangent&&(D[R++]=W.x,D[R++]=W.y,D[R++]=W.z,D[R++]=W.x,D[R++]=W.y,D[R++]=W.z)}}const J=new o.GeometryAttributes;d.position&&(J.position=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k})),d.normal&&(J.normal=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H})),d.tangent&&(J.tangent=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),d.bitangent&&(J.bitangent=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),d.st&&(J.st=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:P}));const Y=V/3;V-=6*(x+1);const Z=r.IndexDatatype.createTypedArray(Y,V);let j=0;for(T=0;T<Y-2;T+=2){const e=T,n=T+2,i=t.Cartesian3.fromArray(k,3*e,b),a=t.Cartesian3.fromArray(k,3*n,A);if(t.Cartesian3.equalsEpsilon(i,a,s.CesiumMath.EPSILON10))continue;const o=T+1,r=T+3;Z[j++]=o,Z[j++]=e,Z[j++]=r,Z[j++]=r,Z[j++]=e,Z[j++]=n}return new a.Geometry({attributes:J,indices:Z,primitiveType:a.PrimitiveType.TRIANGLES,boundingSphere:new n.BoundingSphere.fromVertices(k)})},function(n,i){return e.defined(i)&&(n=L.unpack(n,i)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),L.createGeometry(n)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./Transforms-221c7c82","./ComponentDatatype-985dcc38","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./VertexFormat-20b5279f","./WallGeometryLibrary-c46d2ee9","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./arrayRemoveDuplicates-398390b2","./PolylinePipeline-482bb0f7","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(e,t,n,i,a,o,r,s,l,m,c,u,p,d,f,y,g,h,C,b){"use strict";const x=new t.Cartesian3,A=new t.Cartesian3,_=new t.Cartesian3,E=new t.Cartesian3,w=new t.Cartesian3,F=new t.Cartesian3,v=new t.Cartesian3;function L(n){const i=(n=e.defaultValue(n,e.defaultValue.EMPTY_OBJECT)).positions,a=n.maximumHeights,o=n.minimumHeights,r=e.defaultValue(n.vertexFormat,l.VertexFormat.DEFAULT),m=e.defaultValue(n.granularity,s.CesiumMath.RADIANS_PER_DEGREE),c=e.defaultValue(n.ellipsoid,t.Ellipsoid.WGS84);this._positions=i,this._minimumHeights=o,this._maximumHeights=a,this._vertexFormat=l.VertexFormat.clone(r),this._granularity=m,this._ellipsoid=t.Ellipsoid.clone(c),this._workerName="createWallGeometry";let u=1+i.length*t.Cartesian3.packedLength+2;e.defined(o)&&(u+=o.length),e.defined(a)&&(u+=a.length),this.packedLength=u+t.Ellipsoid.packedLength+l.VertexFormat.packedLength+1}L.pack=function(n,i,a){let o;a=e.defaultValue(a,0);const r=n._positions;let s=r.length;for(i[a++]=s,o=0;o<s;++o,a+=t.Cartesian3.packedLength)t.Cartesian3.pack(r[o],i,a);const m=n._minimumHeights;if(s=e.defined(m)?m.length:0,i[a++]=s,e.defined(m))for(o=0;o<s;++o)i[a++]=m[o];const c=n._maximumHeights;if(s=e.defined(c)?c.length:0,i[a++]=s,e.defined(c))for(o=0;o<s;++o)i[a++]=c[o];return t.Ellipsoid.pack(n._ellipsoid,i,a),a+=t.Ellipsoid.packedLength,l.VertexFormat.pack(n._vertexFormat,i,a),i[a+=l.VertexFormat.packedLength]=n._granularity,i};const V=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),k=new l.VertexFormat,H={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:V,vertexFormat:k,granularity:void 0};return L.unpack=function(n,i,a){let o;i=e.defaultValue(i,0);let r=n[i++];const s=new Array(r);for(o=0;o<r;++o,i+=t.Cartesian3.packedLength)s[o]=t.Cartesian3.unpack(n,i);let m,c;if(r=n[i++],r>0)for(m=new Array(r),o=0;o<r;++o)m[o]=n[i++];if(r=n[i++],r>0)for(c=new Array(r),o=0;o<r;++o)c[o]=n[i++];const u=t.Ellipsoid.unpack(n,i,V);i+=t.Ellipsoid.packedLength;const p=l.VertexFormat.unpack(n,i,k),d=n[i+=l.VertexFormat.packedLength];return e.defined(a)?(a._positions=s,a._minimumHeights=m,a._maximumHeights=c,a._ellipsoid=t.Ellipsoid.clone(u,a._ellipsoid),a._vertexFormat=l.VertexFormat.clone(p,a._vertexFormat),a._granularity=d,a):(H.positions=s,H.minimumHeights=m,H.maximumHeights=c,H.granularity=d,new L(H))},L.fromConstantHeights=function(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions;let i,a;const o=t.minimumHeight,r=t.maximumHeight,s=e.defined(o),l=e.defined(r);if(s||l){const e=n.length;i=s?new Array(e):void 0,a=l?new Array(e):void 0;for(let t=0;t<e;++t)s&&(i[t]=o),l&&(a[t]=r)}return new L({positions:n,maximumHeights:a,minimumHeights:i,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},L.createGeometry=function(l){const c=l._positions,u=l._minimumHeights,p=l._maximumHeights,d=l._vertexFormat,f=l._granularity,y=l._ellipsoid,g=m.WallGeometryLibrary.computePositions(y,c,p,u,f,!0);if(!e.defined(g))return;const h=g.bottomPositions,C=g.topPositions,b=g.numCorners;let L=C.length,V=2*L;const k=d.position?new Float64Array(V):void 0,H=d.normal?new Float32Array(V):void 0,G=d.tangent?new Float32Array(V):void 0,D=d.bitangent?new Float32Array(V):void 0,P=d.st?new Float32Array(V/3*2):void 0;let T,z=0,O=0,R=0,S=0,I=0,M=v,N=F,W=w,B=!0;L/=3;let U=0;const q=1/(L-b-1);for(T=0;T<L;++T){const e=3*T,n=t.Cartesian3.fromArray(C,e,x),i=t.Cartesian3.fromArray(h,e,A);if(d.position&&(k[z++]=i.x,k[z++]=i.y,k[z++]=i.z,k[z++]=n.x,k[z++]=n.y,k[z++]=n.z),d.st&&(P[I++]=U,P[I++]=0,P[I++]=U,P[I++]=1),d.normal||d.tangent||d.bitangent){let i=t.Cartesian3.clone(t.Cartesian3.ZERO,E);const a=t.Cartesian3.subtract(n,y.geodeticSurfaceNormal(n,A),A);if(T+1<L&&(i=t.Cartesian3.fromArray(C,e+3,E)),B){const e=t.Cartesian3.subtract(i,n,_),o=t.Cartesian3.subtract(a,n,x);M=t.Cartesian3.normalize(t.Cartesian3.cross(o,e,M),M),B=!1}t.Cartesian3.equalsEpsilon(n,i,s.CesiumMath.EPSILON10)?B=!0:(U+=q,d.tangent&&(N=t.Cartesian3.normalize(t.Cartesian3.subtract(i,n,N),N)),d.bitangent&&(W=t.Cartesian3.normalize(t.Cartesian3.cross(M,N,W),W))),d.normal&&(H[O++]=M.x,H[O++]=M.y,H[O++]=M.z,H[O++]=M.x,H[O++]=M.y,H[O++]=M.z),d.tangent&&(G[S++]=N.x,G[S++]=N.y,G[S++]=N.z,G[S++]=N.x,G[S++]=N.y,G[S++]=N.z),d.bitangent&&(D[R++]=W.x,D[R++]=W.y,D[R++]=W.z,D[R++]=W.x,D[R++]=W.y,D[R++]=W.z)}}const J=new o.GeometryAttributes;d.position&&(J.position=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k})),d.normal&&(J.normal=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:H})),d.tangent&&(J.tangent=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),d.bitangent&&(J.bitangent=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),d.st&&(J.st=new a.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:P}));const Y=V/3;V-=6*(b+1);const Z=r.IndexDatatype.createTypedArray(Y,V);let j=0;for(T=0;T<Y-2;T+=2){const e=T,n=T+2,i=t.Cartesian3.fromArray(k,3*e,x),a=t.Cartesian3.fromArray(k,3*n,A);if(t.Cartesian3.equalsEpsilon(i,a,s.CesiumMath.EPSILON10))continue;const o=T+1,r=T+3;Z[j++]=o,Z[j++]=e,Z[j++]=r,Z[j++]=r,Z[j++]=e,Z[j++]=n}return new a.Geometry({attributes:J,indices:Z,primitiveType:a.PrimitiveType.TRIANGLES,boundingSphere:new n.BoundingSphere.fromVertices(k)})},function(n,i){return e.defined(i)&&(n=L.unpack(n,i)),n._ellipsoid=t.Ellipsoid.clone(n._ellipsoid),L.createGeometry(n)}}));
public/CIMSDK/Workers/createWallOutlineGeometry.js
@@ -1 +1 @@
define(["./defaultValue-865ac579","./Matrix3-6e56fbc7","./Transforms-f3654378","./ComponentDatatype-985dcc38","./GeometryAttribute-e3f63a02","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./WallGeometryLibrary-d0268552","./Matrix2-23dd5853","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./arrayRemoveDuplicates-398390b2","./PolylinePipeline-70a831f8","./EllipsoidGeodesic-3e762525","./EllipsoidRhumbLine-b175af48","./IntersectionTests-63574cfd","./Plane-4befcca0"],(function(e,i,t,n,o,a,s,r,l,m,d,u,c,p,f,h,g,y,_){"use strict";const E=new i.Cartesian3,C=new i.Cartesian3;function H(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,o=t.maximumHeights,a=t.minimumHeights,s=e.defaultValue(t.granularity,r.CesiumMath.RADIANS_PER_DEGREE),l=e.defaultValue(t.ellipsoid,i.Ellipsoid.WGS84);this._positions=n,this._minimumHeights=a,this._maximumHeights=o,this._granularity=s,this._ellipsoid=i.Ellipsoid.clone(l),this._workerName="createWallOutlineGeometry";let m=1+n.length*i.Cartesian3.packedLength+2;e.defined(a)&&(m+=a.length),e.defined(o)&&(m+=o.length),this.packedLength=m+i.Ellipsoid.packedLength+1}H.pack=function(t,n,o){let a;o=e.defaultValue(o,0);const s=t._positions;let r=s.length;for(n[o++]=r,a=0;a<r;++a,o+=i.Cartesian3.packedLength)i.Cartesian3.pack(s[a],n,o);const l=t._minimumHeights;if(r=e.defined(l)?l.length:0,n[o++]=r,e.defined(l))for(a=0;a<r;++a)n[o++]=l[a];const m=t._maximumHeights;if(r=e.defined(m)?m.length:0,n[o++]=r,e.defined(m))for(a=0;a<r;++a)n[o++]=m[a];return i.Ellipsoid.pack(t._ellipsoid,n,o),n[o+=i.Ellipsoid.packedLength]=t._granularity,n};const b=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),A={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:b,granularity:void 0};return H.unpack=function(t,n,o){let a;n=e.defaultValue(n,0);let s=t[n++];const r=new Array(s);for(a=0;a<s;++a,n+=i.Cartesian3.packedLength)r[a]=i.Cartesian3.unpack(t,n);let l,m;if(s=t[n++],s>0)for(l=new Array(s),a=0;a<s;++a)l[a]=t[n++];if(s=t[n++],s>0)for(m=new Array(s),a=0;a<s;++a)m[a]=t[n++];const d=i.Ellipsoid.unpack(t,n,b),u=t[n+=i.Ellipsoid.packedLength];return e.defined(o)?(o._positions=r,o._minimumHeights=l,o._maximumHeights=m,o._ellipsoid=i.Ellipsoid.clone(d,o._ellipsoid),o._granularity=u,o):(A.positions=r,A.minimumHeights=l,A.maximumHeights=m,A.granularity=u,new H(A))},H.fromConstantHeights=function(i){const t=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).positions;let n,o;const a=i.minimumHeight,s=i.maximumHeight,r=e.defined(a),l=e.defined(s);if(r||l){const e=t.length;n=r?new Array(e):void 0,o=l?new Array(e):void 0;for(let i=0;i<e;++i)r&&(n[i]=a),l&&(o[i]=s)}return new H({positions:t,maximumHeights:o,minimumHeights:n,ellipsoid:i.ellipsoid})},H.createGeometry=function(m){const d=m._positions,u=m._minimumHeights,c=m._maximumHeights,p=m._granularity,f=m._ellipsoid,h=l.WallGeometryLibrary.computePositions(f,d,c,u,p,!1);if(!e.defined(h))return;const g=h.bottomPositions,y=h.topPositions;let _=y.length,H=2*_;const b=new Float64Array(H);let A,k=0;for(_/=3,A=0;A<_;++A){const e=3*A,t=i.Cartesian3.fromArray(y,e,E),n=i.Cartesian3.fromArray(g,e,C);b[k++]=n.x,b[k++]=n.y,b[k++]=n.z,b[k++]=t.x,b[k++]=t.y,b[k++]=t.z}const w=new a.GeometryAttributes({position:new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:b})}),x=H/3;H=2*x-4+x;const G=s.IndexDatatype.createTypedArray(x,H);let L=0;for(A=0;A<x-2;A+=2){const e=A,t=A+2,n=i.Cartesian3.fromArray(b,3*e,E),o=i.Cartesian3.fromArray(b,3*t,C);if(i.Cartesian3.equalsEpsilon(n,o,r.CesiumMath.EPSILON10))continue;const a=A+1,s=A+3;G[L++]=a,G[L++]=e,G[L++]=a,G[L++]=s,G[L++]=e,G[L++]=t}return G[L++]=x-2,G[L++]=x-1,new o.Geometry({attributes:w,indices:G,primitiveType:o.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere.fromVertices(b)})},function(t,n){return e.defined(n)&&(t=H.unpack(t,n)),t._ellipsoid=i.Ellipsoid.clone(t._ellipsoid),H.createGeometry(t)}}));
define(["./defaultValue-865ac579","./Matrix3-aeb3c326","./Transforms-221c7c82","./ComponentDatatype-985dcc38","./GeometryAttribute-642addba","./GeometryAttributes-75794475","./IndexDatatype-16f6b4a1","./Math-76ce6367","./WallGeometryLibrary-c46d2ee9","./Matrix2-2fdcdec7","./RuntimeError-9e0724f9","./combine-5e110d09","./WebGLConstants-258cf3a0","./arrayRemoveDuplicates-398390b2","./PolylinePipeline-482bb0f7","./EllipsoidGeodesic-ec5fd429","./EllipsoidRhumbLine-2cf9c5ef","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(e,i,t,n,o,a,s,r,l,m,d,u,c,p,f,h,g,y,_){"use strict";const E=new i.Cartesian3,b=new i.Cartesian3;function C(t){const n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,o=t.maximumHeights,a=t.minimumHeights,s=e.defaultValue(t.granularity,r.CesiumMath.RADIANS_PER_DEGREE),l=e.defaultValue(t.ellipsoid,i.Ellipsoid.WGS84);this._positions=n,this._minimumHeights=a,this._maximumHeights=o,this._granularity=s,this._ellipsoid=i.Ellipsoid.clone(l),this._workerName="createWallOutlineGeometry";let m=1+n.length*i.Cartesian3.packedLength+2;e.defined(a)&&(m+=a.length),e.defined(o)&&(m+=o.length),this.packedLength=m+i.Ellipsoid.packedLength+1}C.pack=function(t,n,o){let a;o=e.defaultValue(o,0);const s=t._positions;let r=s.length;for(n[o++]=r,a=0;a<r;++a,o+=i.Cartesian3.packedLength)i.Cartesian3.pack(s[a],n,o);const l=t._minimumHeights;if(r=e.defined(l)?l.length:0,n[o++]=r,e.defined(l))for(a=0;a<r;++a)n[o++]=l[a];const m=t._maximumHeights;if(r=e.defined(m)?m.length:0,n[o++]=r,e.defined(m))for(a=0;a<r;++a)n[o++]=m[a];return i.Ellipsoid.pack(t._ellipsoid,n,o),n[o+=i.Ellipsoid.packedLength]=t._granularity,n};const H=i.Ellipsoid.clone(i.Ellipsoid.UNIT_SPHERE),A={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:H,granularity:void 0};return C.unpack=function(t,n,o){let a;n=e.defaultValue(n,0);let s=t[n++];const r=new Array(s);for(a=0;a<s;++a,n+=i.Cartesian3.packedLength)r[a]=i.Cartesian3.unpack(t,n);let l,m;if(s=t[n++],s>0)for(l=new Array(s),a=0;a<s;++a)l[a]=t[n++];if(s=t[n++],s>0)for(m=new Array(s),a=0;a<s;++a)m[a]=t[n++];const d=i.Ellipsoid.unpack(t,n,H),u=t[n+=i.Ellipsoid.packedLength];return e.defined(o)?(o._positions=r,o._minimumHeights=l,o._maximumHeights=m,o._ellipsoid=i.Ellipsoid.clone(d,o._ellipsoid),o._granularity=u,o):(A.positions=r,A.minimumHeights=l,A.maximumHeights=m,A.granularity=u,new C(A))},C.fromConstantHeights=function(i){const t=(i=e.defaultValue(i,e.defaultValue.EMPTY_OBJECT)).positions;let n,o;const a=i.minimumHeight,s=i.maximumHeight,r=e.defined(a),l=e.defined(s);if(r||l){const e=t.length;n=r?new Array(e):void 0,o=l?new Array(e):void 0;for(let i=0;i<e;++i)r&&(n[i]=a),l&&(o[i]=s)}return new C({positions:t,maximumHeights:o,minimumHeights:n,ellipsoid:i.ellipsoid})},C.createGeometry=function(m){const d=m._positions,u=m._minimumHeights,c=m._maximumHeights,p=m._granularity,f=m._ellipsoid,h=l.WallGeometryLibrary.computePositions(f,d,c,u,p,!1);if(!e.defined(h))return;const g=h.bottomPositions,y=h.topPositions;let _=y.length,C=2*_;const H=new Float64Array(C);let A,k=0;for(_/=3,A=0;A<_;++A){const e=3*A,t=i.Cartesian3.fromArray(y,e,E),n=i.Cartesian3.fromArray(g,e,b);H[k++]=n.x,H[k++]=n.y,H[k++]=n.z,H[k++]=t.x,H[k++]=t.y,H[k++]=t.z}const w=new a.GeometryAttributes({position:new o.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:H})}),x=C/3;C=2*x-4+x;const G=s.IndexDatatype.createTypedArray(x,C);let L=0;for(A=0;A<x-2;A+=2){const e=A,t=A+2,n=i.Cartesian3.fromArray(H,3*e,E),o=i.Cartesian3.fromArray(H,3*t,b);if(i.Cartesian3.equalsEpsilon(n,o,r.CesiumMath.EPSILON10))continue;const a=A+1,s=A+3;G[L++]=a,G[L++]=e,G[L++]=a,G[L++]=s,G[L++]=e,G[L++]=t}return G[L++]=x-2,G[L++]=x-1,new o.Geometry({attributes:w,indices:G,primitiveType:o.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere.fromVertices(H)})},function(t,n){return e.defined(n)&&(t=C.unpack(t,n)),t._ellipsoid=i.Ellipsoid.clone(t._ellipsoid),C.createGeometry(t)}}));
public/CIMSDK/Workers/decodeI3S.js
@@ -1 +1 @@
define(["./createTaskProcessorWorker","./defaultValue-865ac579","./WebMercatorProjection-ab4c1f3a","./Matrix3-6e56fbc7","./Math-76ce6367"],(function(e,t,n,r,o){"use strict";let a;function i(e,t,n,r){return r[e+t*n]}function s(e,t,n){const r=n.nativeExtent;let o=(e-r.west)/(r.east-r.west)*(n.width-1),a=(t-r.south)/(r.north-r.south)*(n.height-1);const s=Math.floor(o);let u=Math.floor(a);o-=s,a-=u;const c=s<n.width?s+1:s;let f=u<n.height?u+1:u;u=n.height-1-u,f=n.height-1-f;let l=function(e,t,n,r,o,a){return(n*(1-e)+r*e)*(1-t)+(o*(1-e)+a*e)*t}(o,a,i(s,u,n.width,n.buffer),i(c,u,n.width,n.buffer),i(s,f,n.width,n.buffer),i(c,f,n.width,n.buffer));return l=l*n.scale+n.offset,l}function u(e,t,o){for(let a=0;a<o.length;a++){const i=o[a].nativeExtent;let u=new r.Cartesian3;if("WebMercator"===o[a].projectionType){const i=o[a].projection._ellipsoid._radii;u=new n.WebMercatorProjection(new r.Ellipsoid(i.x,i.y,i.z)).project(new r.Cartographic(e,t,0))}else u.x=e,u.y=t;if(u.x>i.west&&u.x<i.east&&u.y>i.south&&u.y<i.north)return s(u.x,u.y,o[a])}return 0}function c(e,n,r,o){const i=new Uint8Array(e,0,5);return i[0]==="D".charCodeAt()&&i[1]==="R".charCodeAt()&&i[2]==="A".charCodeAt()&&i[3]==="C".charCodeAt()&&i[4]==="O".charCodeAt()?function(e){const n=a,r=new n.DecoderBuffer,o=new Uint8Array(e);r.Init(o,o.length);const i=new n.Decoder,s=i.GetEncodedGeometryType(r),u=new n.MetadataQuerier;let c,l;s===n.TRIANGULAR_MESH&&(c=new n.Mesh,l=i.DecodeBufferToMesh(r,c));const d={vertexCount:[0],featureCount:0};if(t.defined(l)&&l.ok()&&0!==c.ptr){const e=c.num_faces(),r=c.num_attributes(),o=c.num_points();d.indices=new Uint32Array(3*e);const a=d.indices;d.vertexCount[0]=o,d.scale_x=1,d.scale_y=1;const s=new n.DracoInt32Array(3);for(let t=0;t<e;++t)i.GetFaceFromMesh(c,t,s),a[3*t]=s.GetValue(0),a[3*t+1]=s.GetValue(1),a[3*t+2]=s.GetValue(2);n.destroy(s);for(let e=0;e<r;++e){const r=i.GetAttribute(c,e),a=f(n,i,c,r,o),s=r.attribute_type();let l="unknown";s===n.POSITION?l="positions":s===n.NORMAL?l="normals":s===n.COLOR?l="colors":s===n.TEX_COORD&&(l="uv0s");const y=i.GetAttributeMetadata(c,e);if(0!==y.ptr){const e=u.NumEntries(y);for(let t=0;t<e;++t){const e=u.GetEntryName(y,t);"i3s-scale_x"===e?d.scale_x=u.GetDoubleEntry(y,"i3s-scale_x"):"i3s-scale_y"===e?d.scale_y=u.GetDoubleEntry(y,"i3s-scale_y"):"i3s-attribute-type"===e&&(l=u.GetStringEntry(y,"i3s-attribute-type"))}}t.defined(d[l])&&console.log("Attribute already exists",l),d[l]=a,"feature-index"===l&&d.featureCount++}n.destroy(c)}return n.destroy(u),n.destroy(i),d}(e):function(e,n,r,o){const a={vertexCount:0},i=new DataView(e);try{let s=0;if(a.vertexCount=i.getUint32(s,1),s+=4,a.featureCount=i.getUint32(s,1),s+=4,t.defined(r))for(let n=0;n<r.attributes.length;n++)t.defined(l[r.attributes[n]])?s=l[r.attributes[n]](a,e,s):console.error("Unknown decoder for",r.attributes[n]);else{let r=n.ordering,i=n.featureAttributeOrder;t.defined(o)&&t.defined(o.geometryData)&&t.defined(o.geometryData[0])&&t.defined(o.geometryData[0].params)&&(r=Object.keys(o.geometryData[0].params.vertexAttributes),i=Object.keys(o.geometryData[0].params.featureAttributes));for(let n=0;n<r.length;n++){const o=l[r[n]];t.defined(o)||console.log(r[n]),s=o(a,e,s)}for(let n=0;n<i.length;n++){const r=l[i[n]];t.defined(r)||console.log(i[n]),s=r(a,e,s)}}}catch(e){console.error(e)}return a.scale_x=1,a.scale_y=1,a}(e,n,r,o)}function f(e,n,r,o,a){const i=o.num_components()*a;let s;const u=[function(){},function(){s=new e.DracoInt8Array(i);n.GetAttributeInt8ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Int8Array(i);for(let e=0;e<i;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt8Array(i);n.GetAttributeUInt8ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Uint8Array(i);for(let e=0;e<i;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt16Array(i);n.GetAttributeInt16ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Int16Array(i);for(let e=0;e<i;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt16Array(i);n.GetAttributeUInt16ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Uint16Array(i);for(let e=0;e<i;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt32Array(i);n.GetAttributeInt32ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Int32Array(i);for(let e=0;e<i;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt32Array(i);n.GetAttributeUInt32ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Uint32Array(i);for(let e=0;e<i;++e)t[e]=s.GetValue(e);return t},function(){},function(){},function(){s=new e.DracoFloat32Array(i);n.GetAttributeFloatForAllPoints(r,o,s)||console.error("Bad stream");const t=new Float32Array(i);for(let e=0;e<i;++e)t[e]=s.GetValue(e);return t},function(){},function(){s=new e.DracoUInt8Array(i);n.GetAttributeUInt8ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Uint8Array(i);for(let e=0;e<i;++e)t[e]=s.GetValue(e);return t}],c=u[o.data_type()]();return t.defined(s)&&e.destroy(s),c}const l={position:function(e,t,n){const r=3*e.vertexCount;return e.positions=new Float32Array(t,n,r),n+=4*r},normal:function(e,t,n){const r=3*e.vertexCount;return e.normals=new Float32Array(t,n,r),n+=4*r},uv0:function(e,t,n){const r=2*e.vertexCount;return e.uv0s=new Float32Array(t,n,r),n+=4*r},color:function(e,t,n){const r=4*e.vertexCount;return e.colors=new Uint8Array(t,n,r),n+=r},featureId:function(e,t,n){return n+=8*e.featureCount},id:function(e,t,n){return n+=8*e.featureCount},faceRange:function(e,t,n){const r=2*e.featureCount;return e.faceRange=new Uint32Array(t,n,r),n+=4*r},uvRegion:function(e,t,n){const r=4*e.vertexCount;return e["uv-region"]=new Uint16Array(t,n,r),n+=2*r},region:function(e,t,n){const r=4*e.vertexCount;return e["uv-region"]=new Uint16Array(t,n,r),n+=2*r}};function d(e){const n=c(e.binaryData,e.schema,e.bufferInfo,e.featureData);t.defined(e.geoidDataList)&&e.geoidDataList.length>0&&function(e,t,n,r,a,i,s){if(s)return;const c=u(a.longitude,a.latitude,i);for(let s=0;s<e;++s){const e=u(a.longitude+o.CesiumMath.toRadians(n*t[3*s]),a.latitude+o.CesiumMath.toRadians(r*t[3*s+1]),i);t[3*s+2]+=e-c}}(n.vertexCount,n.positions,n.scale_x,n.scale_y,e.cartographicCenter,e.geoidDataList,!1),function(e,n,a,i,s,u,c,f,l){if(0===e||!t.defined(n)||0===n.length)return;const d=new r.Ellipsoid(Math.sqrt(c.x),Math.sqrt(c.y),Math.sqrt(c.z));for(let c=0;c<e;++c){const e=3*c,y=e+1,b=e+2,h=new r.Cartographic;h.longitude=i.longitude+o.CesiumMath.toRadians(f*n[e]),h.latitude=i.latitude+o.CesiumMath.toRadians(l*n[y]),h.height=i.height+n[b];const p={};d.cartographicToCartesian(h,p),p.x-=s.x,p.y-=s.y,p.z-=s.z;const g={};if(r.Matrix3.multiplyByVector(u,p,g),n[e]=g.x,n[y]=g.y,n[b]=g.z,t.defined(a)){const t=new r.Cartesian3(a[e],a[y],a[b]),n={};r.Matrix3.multiplyByVector(u,t,n),a[e]=n.x,a[y]=n.y,a[b]=n.z}}}(n.vertexCount,n.positions,n.normals,e.cartographicCenter,e.cartesianCenter,e.parentRotation,e.ellipsoidRadiiSquare,n.scale_x,n.scale_y),t.defined(n.uv0s)&&t.defined(n["uv-region"])&&function(e,t,n){for(let r=0;r<e;++r){const e=n[4*r]/65535,o=n[4*r+1]/65535,a=(n[4*r+2]-n[4*r])/65535,i=(n[4*r+3]-n[4*r+1])/65535;t[2*r]*=a,t[2*r]+=e,t[2*r+1]*=i,t[2*r+1]+=o}}(n.vertexCount,n.uv0s,n["uv-region"]);const a=function(e,n,r,o,a,i){if(0===e||!t.defined(r)||0===r.length)return{buffers:[],bufferViews:[],accessors:[],meshes:[],nodes:[],nodesInScene:[]};const s=[],u=[],c=[],f=[],l=[],d=[];t.defined(n)&&(e=n.length);const y=new Uint32Array(e);if(t.defined(n))for(let t=0;t<e;++t)y[t]=n[t];else for(let t=0;t<e;++t)y[t]=t;const b=new Blob([y],{type:"application/binary"}),h=URL.createObjectURL(b),p=e,g=r.subarray(0,3*p),m=new Blob([g],{type:"application/binary"}),A=URL.createObjectURL(m);let w=Number.POSITIVE_INFINITY,I=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY;for(let e=0;e<g.length/3;e++)w=Math.min(w,g[3*e+0]),I=Math.max(I,g[3*e+0]),C=Math.min(C,g[3*e+1]),x=Math.max(x,g[3*e+1]),L=Math.min(L,g[3*e+2]),R=Math.max(R,g[3*e+2]);const O=o?o.subarray(0,3*p):void 0;let _;if(t.defined(O)){const e=new Blob([O],{type:"application/binary"});_=URL.createObjectURL(e)}const v=a?a.subarray(0,2*p):void 0;let G;if(t.defined(v)){const e=new Blob([v],{type:"application/binary"});G=URL.createObjectURL(e)}const M=t.defined(i)?i.subarray(0,4*p):void 0;let U;if(t.defined(M)){const e=new Blob([M],{type:"application/binary"});U=URL.createObjectURL(e)}let V=0,D=0,N=0,T=0,E=0;const F={POSITION:0};return s.push({uri:A,byteLength:g.byteLength}),u.push({buffer:0,byteOffset:0,byteLength:g.byteLength,target:34962}),c.push({bufferView:0,byteOffset:0,componentType:5126,count:e,type:"VEC3",max:[w,C,L],min:[I,x,R]}),t.defined(_)&&(++E,V=E,F.NORMAL=V,s.push({uri:_,byteLength:O.byteLength}),u.push({buffer:V,byteOffset:0,byteLength:O.byteLength,target:34962}),c.push({bufferView:V,byteOffset:0,componentType:5126,count:e,type:"VEC3"})),t.defined(G)&&(++E,D=E,F.TEXCOORD_0=D,s.push({uri:G,byteLength:v.byteLength}),u.push({buffer:D,byteOffset:0,byteLength:v.byteLength,target:34962}),c.push({bufferView:D,byteOffset:0,componentType:5126,count:e,type:"VEC2"})),t.defined(U)&&(++E,N=E,F.COLOR_0=N,s.push({uri:U,byteLength:M.byteLength}),u.push({buffer:N,byteOffset:0,byteLength:M.byteLength,target:34962}),c.push({bufferView:N,byteOffset:0,componentType:5121,normalized:!0,count:e,type:"VEC4"})),++E,T=E,s.push({uri:h,byteLength:y.byteLength}),u.push({buffer:T,byteOffset:0,byteLength:y.byteLength,target:34963}),c.push({bufferView:T,byteOffset:0,componentType:5125,count:e,type:"SCALAR"}),f.push({primitives:[{attributes:F,indices:T,material:0}]}),d.push(0),l.push({mesh:0}),{buffers:s,bufferViews:u,accessors:c,meshes:f,nodes:l,nodesInScene:d}}(n.vertexCount,n.indices,n.positions,n.normals,n.uv0s,n.colors),i={};if(t.defined(n["feature-index"]))i.positions=n.positions,i.indices=n.indices,i.featureIndex=n["feature-index"],i.cartesianCenter=e.cartesianCenter,i.parentRotation=e.parentRotation;else if(t.defined(n.faceRange)){i.positions=n.positions,i.indices=n.indices,i.sourceURL=e.url,i.cartesianCenter=e.cartesianCenter,i.parentRotation=e.parentRotation,i.featureIndex=new Array(n.positions.length);for(let e=0;e<n.faceRange.length-1;e+=2){const t=e/2,r=n.faceRange[e],o=n.faceRange[e+1];for(let e=r;e<=o;e++)i.featureIndex[3*e]=t,i.featureIndex[3*e+1]=t,i.featureIndex[3*e+2]=t}}a._customAttributes=i;return{meshData:a}}function y(t){a=t,self.onmessage=e(d),self.postMessage(!0)}return function(e){const n=e.data.webAssemblyConfig;if(t.defined(n))return require([n.modulePath],(function(e){t.defined(n.wasmBinaryFile)?(t.defined(e)||(e=self.DracoDecoderModule),e(n).then((function(e){y(e)}))):y(e())}))}}));
define(["./createTaskProcessorWorker","./defaultValue-865ac579","./WebMercatorProjection-bfe55882","./Matrix3-aeb3c326","./Math-76ce6367"],(function(e,t,n,r,o){"use strict";let i;function a(e,t,n,r){return r[e+t*n]}function s(e,t,n){const r=n.nativeExtent;let o=(e-r.west)/(r.east-r.west)*(n.width-1),i=(t-r.south)/(r.north-r.south)*(n.height-1);const s=Math.floor(o);let u=Math.floor(i);o-=s,i-=u;const c=s<n.width?s+1:s;let f=u<n.height?u+1:u;u=n.height-1-u,f=n.height-1-f;let l=function(e,t,n,r,o,i){return(n*(1-e)+r*e)*(1-t)+(o*(1-e)+i*e)*t}(o,i,a(s,u,n.width,n.buffer),a(c,u,n.width,n.buffer),a(s,f,n.width,n.buffer),a(c,f,n.width,n.buffer));return l=l*n.scale+n.offset,l}function u(e,t,o){for(let i=0;i<o.length;i++){const a=o[i].nativeExtent;let u=new r.Cartesian3;if("WebMercator"===o[i].projectionType){const a=o[i].projection._ellipsoid._radii;u=new n.WebMercatorProjection(new r.Ellipsoid(a.x,a.y,a.z)).project(new r.Cartographic(e,t,0))}else u.x=e,u.y=t;if(u.x>a.west&&u.x<a.east&&u.y>a.south&&u.y<a.north)return s(u.x,u.y,o[i])}return 0}function c(e,n,r,o){const a=new Uint8Array(e,0,5);return a[0]==="D".charCodeAt()&&a[1]==="R".charCodeAt()&&a[2]==="A".charCodeAt()&&a[3]==="C".charCodeAt()&&a[4]==="O".charCodeAt()?function(e){const n=i,r=new n.DecoderBuffer,o=new Uint8Array(e);r.Init(o,o.length);const a=new n.Decoder,s=a.GetEncodedGeometryType(r),u=new n.MetadataQuerier;let c,l;s===n.TRIANGULAR_MESH&&(c=new n.Mesh,l=a.DecodeBufferToMesh(r,c));const d={vertexCount:[0],featureCount:0};if(t.defined(l)&&l.ok()&&0!==c.ptr){const e=c.num_faces(),r=c.num_attributes(),o=c.num_points();d.indices=new Uint32Array(3*e);const i=d.indices;d.vertexCount[0]=o,d.scale_x=1,d.scale_y=1;const s=new n.DracoInt32Array(3);for(let t=0;t<e;++t)a.GetFaceFromMesh(c,t,s),i[3*t]=s.GetValue(0),i[3*t+1]=s.GetValue(1),i[3*t+2]=s.GetValue(2);n.destroy(s);for(let e=0;e<r;++e){const r=a.GetAttribute(c,e),i=f(n,a,c,r,o),s=r.attribute_type();let l="unknown";s===n.POSITION?l="positions":s===n.NORMAL?l="normals":s===n.COLOR?l="colors":s===n.TEX_COORD&&(l="uv0s");const y=a.GetAttributeMetadata(c,e);if(0!==y.ptr){const e=u.NumEntries(y);for(let t=0;t<e;++t){const e=u.GetEntryName(y,t);"i3s-scale_x"===e?d.scale_x=u.GetDoubleEntry(y,"i3s-scale_x"):"i3s-scale_y"===e?d.scale_y=u.GetDoubleEntry(y,"i3s-scale_y"):"i3s-attribute-type"===e&&(l=u.GetStringEntry(y,"i3s-attribute-type"))}}t.defined(d[l])&&console.log("Attribute already exists",l),d[l]=i,"feature-index"===l&&d.featureCount++}n.destroy(c)}return n.destroy(u),n.destroy(a),d}(e):function(e,n,r,o){const i={vertexCount:0},a=new DataView(e);try{let s=0;if(i.vertexCount=a.getUint32(s,1),s+=4,i.featureCount=a.getUint32(s,1),s+=4,t.defined(r))for(let n=0;n<r.attributes.length;n++)t.defined(l[r.attributes[n]])?s=l[r.attributes[n]](i,e,s):console.error("Unknown decoder for",r.attributes[n]);else{let r=n.ordering,a=n.featureAttributeOrder;t.defined(o)&&t.defined(o.geometryData)&&t.defined(o.geometryData[0])&&t.defined(o.geometryData[0].params)&&(r=Object.keys(o.geometryData[0].params.vertexAttributes),a=Object.keys(o.geometryData[0].params.featureAttributes));for(let n=0;n<r.length;n++){const o=l[r[n]];t.defined(o)||console.log(r[n]),s=o(i,e,s)}for(let n=0;n<a.length;n++){const r=l[a[n]];t.defined(r)||console.log(a[n]),s=r(i,e,s)}}}catch(e){console.error(e)}return i.scale_x=1,i.scale_y=1,i}(e,n,r,o)}function f(e,n,r,o,i){const a=o.num_components()*i;let s;const u=[function(){},function(){s=new e.DracoInt8Array(a);n.GetAttributeInt8ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Int8Array(a);for(let e=0;e<a;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt8Array(a);n.GetAttributeUInt8ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Uint8Array(a);for(let e=0;e<a;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt16Array(a);n.GetAttributeInt16ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Int16Array(a);for(let e=0;e<a;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt16Array(a);n.GetAttributeUInt16ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Uint16Array(a);for(let e=0;e<a;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt32Array(a);n.GetAttributeInt32ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Int32Array(a);for(let e=0;e<a;++e)t[e]=s.GetValue(e);return t},function(){s=new e.DracoInt32Array(a);n.GetAttributeUInt32ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Uint32Array(a);for(let e=0;e<a;++e)t[e]=s.GetValue(e);return t},function(){},function(){},function(){s=new e.DracoFloat32Array(a);n.GetAttributeFloatForAllPoints(r,o,s)||console.error("Bad stream");const t=new Float32Array(a);for(let e=0;e<a;++e)t[e]=s.GetValue(e);return t},function(){},function(){s=new e.DracoUInt8Array(a);n.GetAttributeUInt8ForAllPoints(r,o,s)||console.error("Bad stream");const t=new Uint8Array(a);for(let e=0;e<a;++e)t[e]=s.GetValue(e);return t}],c=u[o.data_type()]();return t.defined(s)&&e.destroy(s),c}const l={position:function(e,t,n){const r=3*e.vertexCount;return e.positions=new Float32Array(t,n,r),n+=4*r},normal:function(e,t,n){const r=3*e.vertexCount;return e.normals=new Float32Array(t,n,r),n+=4*r},uv0:function(e,t,n){const r=2*e.vertexCount;return e.uv0s=new Float32Array(t,n,r),n+=4*r},color:function(e,t,n){const r=4*e.vertexCount;return e.colors=new Uint8Array(t,n,r),n+=r},featureId:function(e,t,n){return n+=8*e.featureCount},id:function(e,t,n){return n+=8*e.featureCount},faceRange:function(e,t,n){const r=2*e.featureCount;return e.faceRange=new Uint32Array(t,n,r),n+=4*r},uvRegion:function(e,t,n){const r=4*e.vertexCount;return e["uv-region"]=new Uint16Array(t,n,r),n+=2*r},region:function(e,t,n){const r=4*e.vertexCount;return e["uv-region"]=new Uint16Array(t,n,r),n+=2*r}};function d(e){const n=c(e.binaryData,e.schema,e.bufferInfo,e.featureData);t.defined(e.geoidDataList)&&e.geoidDataList.length>0&&function(e,t,n,r,i,a,s){if(s)return;const c=u(i.longitude,i.latitude,a);for(let s=0;s<e;++s){const e=u(i.longitude+o.CesiumMath.toRadians(n*t[3*s]),i.latitude+o.CesiumMath.toRadians(r*t[3*s+1]),a);t[3*s+2]+=e-c}}(n.vertexCount,n.positions,n.scale_x,n.scale_y,e.cartographicCenter,e.geoidDataList,!1),function(e,n,i,a,s,u,c,f,l){if(0===e||!t.defined(n)||0===n.length)return;const d=new r.Ellipsoid(Math.sqrt(c.x),Math.sqrt(c.y),Math.sqrt(c.z));for(let c=0;c<e;++c){const e=3*c,y=e+1,b=e+2,h=new r.Cartographic;h.longitude=a.longitude+o.CesiumMath.toRadians(f*n[e]),h.latitude=a.latitude+o.CesiumMath.toRadians(l*n[y]),h.height=a.height+n[b];const p={};d.cartographicToCartesian(h,p),p.x-=s.x,p.y-=s.y,p.z-=s.z;const g={};if(r.Matrix3.multiplyByVector(u,p,g),n[e]=g.x,n[y]=g.y,n[b]=g.z,t.defined(i)){const t=new r.Cartesian3(i[e],i[y],i[b]),n={};r.Matrix3.multiplyByVector(u,t,n),i[e]=n.x,i[y]=n.y,i[b]=n.z}}}(n.vertexCount,n.positions,n.normals,e.cartographicCenter,e.cartesianCenter,e.parentRotation,e.ellipsoidRadiiSquare,n.scale_x,n.scale_y),t.defined(n.uv0s)&&t.defined(n["uv-region"])&&function(e,t,n){for(let r=0;r<e;++r){const e=n[4*r]/65535,o=n[4*r+1]/65535,i=(n[4*r+2]-n[4*r])/65535,a=(n[4*r+3]-n[4*r+1])/65535;t[2*r]*=i,t[2*r]+=e,t[2*r+1]*=a,t[2*r+1]+=o}}(n.vertexCount,n.uv0s,n["uv-region"]);const i=function(e,n,r,o,i,a){if(0===e||!t.defined(r)||0===r.length)return{buffers:[],bufferViews:[],accessors:[],meshes:[],nodes:[],nodesInScene:[]};const s=[],u=[],c=[],f=[],l=[],d=[];t.defined(n)&&(e=n.length);const y=new Uint32Array(e);if(t.defined(n))for(let t=0;t<e;++t)y[t]=n[t];else for(let t=0;t<e;++t)y[t]=t;const b=new Blob([y],{type:"application/binary"}),h=URL.createObjectURL(b),p=e,g=r.subarray(0,3*p),m=new Blob([g],{type:"application/binary"}),A=URL.createObjectURL(m);let w=Number.POSITIVE_INFINITY,I=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY;for(let e=0;e<g.length/3;e++)w=Math.min(w,g[3*e+0]),I=Math.max(I,g[3*e+0]),C=Math.min(C,g[3*e+1]),x=Math.max(x,g[3*e+1]),L=Math.min(L,g[3*e+2]),R=Math.max(R,g[3*e+2]);const O=o?o.subarray(0,3*p):void 0;let _;if(t.defined(O)){const e=new Blob([O],{type:"application/binary"});_=URL.createObjectURL(e)}const v=i?i.subarray(0,2*p):void 0;let G;if(t.defined(v)){const e=new Blob([v],{type:"application/binary"});G=URL.createObjectURL(e)}const M=t.defined(a)?a.subarray(0,4*p):void 0;let U;if(t.defined(M)){const e=new Blob([M],{type:"application/binary"});U=URL.createObjectURL(e)}let V=0,D=0,N=0,T=0,E=0;const F={POSITION:0};return s.push({uri:A,byteLength:g.byteLength}),u.push({buffer:0,byteOffset:0,byteLength:g.byteLength,target:34962}),c.push({bufferView:0,byteOffset:0,componentType:5126,count:e,type:"VEC3",max:[w,C,L],min:[I,x,R]}),t.defined(_)&&(++E,V=E,F.NORMAL=V,s.push({uri:_,byteLength:O.byteLength}),u.push({buffer:V,byteOffset:0,byteLength:O.byteLength,target:34962}),c.push({bufferView:V,byteOffset:0,componentType:5126,count:e,type:"VEC3"})),t.defined(G)&&(++E,D=E,F.TEXCOORD_0=D,s.push({uri:G,byteLength:v.byteLength}),u.push({buffer:D,byteOffset:0,byteLength:v.byteLength,target:34962}),c.push({bufferView:D,byteOffset:0,componentType:5126,count:e,type:"VEC2"})),t.defined(U)&&(++E,N=E,F.COLOR_0=N,s.push({uri:U,byteLength:M.byteLength}),u.push({buffer:N,byteOffset:0,byteLength:M.byteLength,target:34962}),c.push({bufferView:N,byteOffset:0,componentType:5121,normalized:!0,count:e,type:"VEC4"})),++E,T=E,s.push({uri:h,byteLength:y.byteLength}),u.push({buffer:T,byteOffset:0,byteLength:y.byteLength,target:34963}),c.push({bufferView:T,byteOffset:0,componentType:5125,count:e,type:"SCALAR"}),f.push({primitives:[{attributes:F,indices:T,material:0}]}),d.push(0),l.push({mesh:0}),{buffers:s,bufferViews:u,accessors:c,meshes:f,nodes:l,nodesInScene:d}}(n.vertexCount,n.indices,n.positions,n.normals,n.uv0s,n.colors),a={};if(t.defined(n["feature-index"]))a.positions=n.positions,a.indices=n.indices,a.featureIndex=n["feature-index"],a.cartesianCenter=e.cartesianCenter,a.parentRotation=e.parentRotation;else if(t.defined(n.faceRange)){a.positions=n.positions,a.indices=n.indices,a.sourceURL=e.url,a.cartesianCenter=e.cartesianCenter,a.parentRotation=e.parentRotation,a.featureIndex=new Array(n.positions.length);for(let e=0;e<n.faceRange.length-1;e+=2){const t=e/2,r=n.faceRange[e],o=n.faceRange[e+1];for(let e=r;e<=o;e++)a.featureIndex[3*e]=t,a.featureIndex[3*e+1]=t,a.featureIndex[3*e+2]=t}}i._customAttributes=a;return{meshData:i}}function y(t){i=t,self.onmessage=e(d),self.postMessage(!0)}return function(e){const n=e.data.webAssemblyConfig;if(t.defined(n))return require([n.modulePath],(function(e){t.defined(n.wasmBinaryFile)?(t.defined(e)||(e=self.DracoDecoderModule),e(n).then((function(e){y(e)}))):y(e())}))}}));
public/CIMSDK/Workers/upsampleQuantizedTerrainMesh.js
@@ -1 +1 @@
define(["./AttributeCompression-b9d605fe","./Transforms-f3654378","./Matrix2-23dd5853","./Matrix3-6e56fbc7","./defaultValue-865ac579","./TerrainEncoding-1a72b96a","./IndexDatatype-16f6b4a1","./Math-76ce6367","./OrientedBoundingBox-ef95f619","./createTaskProcessorWorker","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./combine-5e110d09","./RuntimeError-9e0724f9","./EllipsoidTangentPlane-2129690e","./AxisAlignedBoundingBox-d1a0c6e6","./IntersectionTests-63574cfd","./Plane-4befcca0"],(function(e,t,n,i,s,r,h,o,u,d,p,l,a,f,c,g,m,x){"use strict";const w={clipTriangleAtAxisAlignedThreshold:function(e,t,n,i,r,h){let o,u,d;s.defined(h)?h.length=0:h=[],t?(o=n<e,u=i<e,d=r<e):(o=n>e,u=i>e,d=r>e);const p=o+u+d;let l,a,f,c,g,m;return 1===p?o?(l=(e-n)/(i-n),a=(e-n)/(r-n),h.push(1),h.push(2),1!==a&&(h.push(-1),h.push(0),h.push(2),h.push(a)),1!==l&&(h.push(-1),h.push(0),h.push(1),h.push(l))):u?(f=(e-i)/(r-i),c=(e-i)/(n-i),h.push(2),h.push(0),1!==c&&(h.push(-1),h.push(1),h.push(0),h.push(c)),1!==f&&(h.push(-1),h.push(1),h.push(2),h.push(f))):d&&(g=(e-r)/(n-r),m=(e-r)/(i-r),h.push(0),h.push(1),1!==m&&(h.push(-1),h.push(2),h.push(1),h.push(m)),1!==g&&(h.push(-1),h.push(2),h.push(0),h.push(g))):2===p?o||n===e?u||i===e?d||r===e||(a=(e-n)/(r-n),f=(e-i)/(r-i),h.push(2),h.push(-1),h.push(0),h.push(2),h.push(a),h.push(-1),h.push(1),h.push(2),h.push(f)):(m=(e-r)/(i-r),l=(e-n)/(i-n),h.push(1),h.push(-1),h.push(2),h.push(1),h.push(m),h.push(-1),h.push(0),h.push(1),h.push(l)):(c=(e-i)/(n-i),g=(e-r)/(n-r),h.push(0),h.push(-1),h.push(1),h.push(0),h.push(c),h.push(-1),h.push(2),h.push(0),h.push(g)):3!==p&&(h.push(0),h.push(1),h.push(2)),h},computeBarycentricCoordinates:function(e,t,n,r,h,o,u,d,p){const l=n-u,a=u-h,f=o-d,c=r-d,g=1/(f*l+a*c),m=t-d,x=e-u,w=(f*x+a*m)*g,C=(-c*x+l*m)*g,B=1-w-C;return s.defined(p)?(p.x=w,p.y=C,p.z=B,p):new i.Cartesian3(w,C,B)},computeLineSegmentLineSegmentIntersection:function(e,t,i,r,h,o,u,d,p){const l=(d-o)*(i-e)-(u-h)*(r-t);if(0===l)return;const a=((u-h)*(t-o)-(d-o)*(e-h))/l,f=((i-e)*(t-o)-(r-t)*(e-h))/l;return a>=0&&a<=1&&f>=0&&f<=1?(s.defined(p)||(p=new n.Cartesian2),p.x=e+a*(i-e),p.y=t+a*(r-t),p):void 0}};var C=w;const B=32767,y=16383,I=[],A=[],b=[],v=new i.Cartographic;let T=new i.Cartesian3;const M=[],z=[],V=[],N=[],E=[],R=new i.Cartesian3,H=new t.BoundingSphere,O=new u.OrientedBoundingBox,S=new n.Cartesian2,U=new i.Cartesian3;function F(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}F.prototype.clone=function(e){return s.defined(e)||(e=new F),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},F.prototype.initializeIndexed=function(e,t,n,i,s){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=n,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0},F.prototype.initializeFromClipResult=function(e,t,n){let i=t+1;return-1!==e[t]?n[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=n[e[i]],++i,this.second=n[e[i]],++i,this.ratio=e[i],++i),i},F.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},F.prototype.isIndexed=function(){return s.defined(this.index)},F.prototype.getH=function(){return s.defined(this.index)?this.heightBuffer[this.index]:o.CesiumMath.lerp(this.first.getH(),this.second.getH(),this.ratio)},F.prototype.getU=function(){return s.defined(this.index)?this.uBuffer[this.index]:o.CesiumMath.lerp(this.first.getU(),this.second.getU(),this.ratio)},F.prototype.getV=function(){return s.defined(this.index)?this.vBuffer[this.index]:o.CesiumMath.lerp(this.first.getV(),this.second.getV(),this.ratio)};let P=new n.Cartesian2,D=-1;const W=[new i.Cartesian3,new i.Cartesian3],X=[new i.Cartesian3,new i.Cartesian3];function k(t,n){++D;let s=W[D],r=X[D];return s=e.AttributeCompression.octDecode(t.first.getNormalX(),t.first.getNormalY(),s),r=e.AttributeCompression.octDecode(t.second.getNormalX(),t.second.getNormalY(),r),T=i.Cartesian3.lerp(s,r,t.ratio,T),i.Cartesian3.normalize(T,T),e.AttributeCompression.octEncode(T,n),--D,n}F.prototype.getNormalX=function(){return s.defined(this.index)?this.normalBuffer[2*this.index]:(P=k(this,P),P.x)},F.prototype.getNormalY=function(){return s.defined(this.index)?this.normalBuffer[2*this.index+1]:(P=k(this,P),P.y)};const K=[];function L(e,t,n,i,r,h,o,u,d){if(0===o.length)return;let p=0,l=0;for(;l<o.length;)l=K[p++].initializeFromClipResult(o,l,u);for(let r=0;r<p;++r){const o=K[r];if(o.isIndexed())o.newIndex=h[o.index],o.uBuffer=e,o.vBuffer=t,o.heightBuffer=n,d&&(o.normalBuffer=i);else{const r=o.getKey();if(s.defined(h[r]))o.newIndex=h[r];else{const s=e.length;e.push(o.getU()),t.push(o.getV()),n.push(o.getH()),d&&(i.push(o.getNormalX()),i.push(o.getNormalY())),o.newIndex=s,h[r]=s}}}3===p?(r.push(K[0].newIndex),r.push(K[1].newIndex),r.push(K[2].newIndex)):4===p&&(r.push(K[0].newIndex),r.push(K[1].newIndex),r.push(K[2].newIndex),r.push(K[0].newIndex),r.push(K[2].newIndex),r.push(K[3].newIndex))}return K.push(new F),K.push(new F),K.push(new F),K.push(new F),d((function(e,s){const d=e.isEastChild,p=e.isNorthChild,l=d?y:0,a=d?B:y,f=p?y:0,c=p?B:y,g=M,m=z,x=V,w=E;g.length=0,m.length=0,x.length=0,w.length=0;const P=N;P.length=0;const D={},W=e.vertices;let X=e.indices;X=X.subarray(0,e.indexCountWithoutSkirts);const k=r.TerrainEncoding.clone(e.encoding),K=k.hasVertexNormals;let Y=0;const _=e.vertexCountWithoutSkirts,G=e.minimumHeight,J=e.maximumHeight,Z=new Array(_),j=new Array(_),q=new Array(_),Q=K?new Array(2*_):void 0;let $,ee,te,ne,ie;for(ee=0,te=0;ee<_;++ee,te+=2){const e=k.decodeTextureCoordinates(W,ee,S);if($=k.decodeHeight(W,ee),ne=o.CesiumMath.clamp(e.x*B|0,0,B),ie=o.CesiumMath.clamp(e.y*B|0,0,B),q[ee]=o.CesiumMath.clamp(($-G)/(J-G)*B|0,0,B),ne<20&&(ne=0),ie<20&&(ie=0),B-ne<20&&(ne=B),B-ie<20&&(ie=B),Z[ee]=ne,j[ee]=ie,K){const e=k.getOctEncodedNormal(W,ee,U);Q[te]=e.x,Q[te+1]=e.y}(d&&ne>=y||!d&&ne<=y)&&(p&&ie>=y||!p&&ie<=y)&&(D[ee]=Y,g.push(ne),m.push(ie),x.push(q[ee]),K&&(w.push(Q[te]),w.push(Q[te+1])),++Y)}const se=[];se.push(new F),se.push(new F),se.push(new F);const re=[];let he,oe;for(re.push(new F),re.push(new F),re.push(new F),ee=0;ee<X.length;ee+=3){const e=X[ee],t=X[ee+1],n=X[ee+2],i=Z[e],s=Z[t],r=Z[n];se[0].initializeIndexed(Z,j,q,Q,e),se[1].initializeIndexed(Z,j,q,Q,t),se[2].initializeIndexed(Z,j,q,Q,n);const h=C.clipTriangleAtAxisAlignedThreshold(y,d,i,s,r,I);he=0,he>=h.length||(he=re[0].initializeFromClipResult(h,he,se),he>=h.length||(he=re[1].initializeFromClipResult(h,he,se),he>=h.length||(he=re[2].initializeFromClipResult(h,he,se),oe=C.clipTriangleAtAxisAlignedThreshold(y,p,re[0].getV(),re[1].getV(),re[2].getV(),A),L(g,m,x,w,P,D,oe,re,K),he<h.length&&(re[2].clone(re[1]),re[2].initializeFromClipResult(h,he,se),oe=C.clipTriangleAtAxisAlignedThreshold(y,p,re[0].getV(),re[1].getV(),re[2].getV(),A),L(g,m,x,w,P,D,oe,re,K)))))}const ue=d?-32767:0,de=p?-32767:0,pe=[],le=[],ae=[],fe=[];let ce=Number.MAX_VALUE,ge=-ce;const me=b;me.length=0;const xe=i.Ellipsoid.clone(e.ellipsoid),we=n.Rectangle.clone(e.childRectangle),Ce=we.north,Be=we.south;let ye=we.east;const Ie=we.west;for(ye<Ie&&(ye+=o.CesiumMath.TWO_PI),ee=0;ee<g.length;++ee)ne=Math.round(g[ee]),ne<=l?(pe.push(ee),ne=0):ne>=a?(ae.push(ee),ne=B):ne=2*ne+ue,g[ee]=ne,ie=Math.round(m[ee]),ie<=f?(le.push(ee),ie=0):ie>=c?(fe.push(ee),ie=B):ie=2*ie+de,m[ee]=ie,$=o.CesiumMath.lerp(G,J,x[ee]/B),$<ce&&(ce=$),$>ge&&(ge=$),x[ee]=$,v.longitude=o.CesiumMath.lerp(Ie,ye,ne/B),v.latitude=o.CesiumMath.lerp(Be,Ce,ie/B),v.height=$,xe.cartographicToCartesian(v,T),me.push(T.x),me.push(T.y),me.push(T.z);const Ae=t.BoundingSphere.fromVertices(me,i.Cartesian3.ZERO,3,H),be=u.OrientedBoundingBox.fromRectangle(we,ce,ge,xe,O),ve=new r.EllipsoidalOccluder(xe).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(Ae.center,me,3,Ae.center,ce,R),Te=ge-ce,Me=new Uint16Array(g.length+m.length+x.length);for(ee=0;ee<g.length;++ee)Me[ee]=g[ee];let ze=g.length;for(ee=0;ee<m.length;++ee)Me[ze+ee]=m[ee];for(ze+=m.length,ee=0;ee<x.length;++ee)Me[ze+ee]=B*(x[ee]-ce)/Te;const Ve=h.IndexDatatype.createTypedArray(g.length,P);let Ne;if(K){const e=new Uint8Array(w);s.push(Me.buffer,Ve.buffer,e.buffer),Ne=e.buffer}else s.push(Me.buffer,Ve.buffer);return{vertices:Me.buffer,encodedNormals:Ne,indices:Ve.buffer,minimumHeight:ce,maximumHeight:ge,westIndices:pe,southIndices:le,eastIndices:ae,northIndices:fe,boundingSphere:Ae,orientedBoundingBox:be,horizonOcclusionPoint:ve}}))}));
define(["./AttributeCompression-10297289","./Transforms-221c7c82","./Matrix2-2fdcdec7","./Matrix3-aeb3c326","./defaultValue-865ac579","./TerrainEncoding-692d7e68","./IndexDatatype-16f6b4a1","./Math-76ce6367","./OrientedBoundingBox-34fc6856","./createTaskProcessorWorker","./ComponentDatatype-985dcc38","./WebGLConstants-258cf3a0","./combine-5e110d09","./RuntimeError-9e0724f9","./EllipsoidTangentPlane-a9681249","./AxisAlignedBoundingBox-73c388a7","./IntersectionTests-7b064f18","./Plane-fbab0ca2"],(function(e,t,n,i,s,r,h,o,u,p,d,a,l,c,f,g,m,x){"use strict";const w={clipTriangleAtAxisAlignedThreshold:function(e,t,n,i,r,h){let o,u,p;s.defined(h)?h.length=0:h=[],t?(o=n<e,u=i<e,p=r<e):(o=n>e,u=i>e,p=r>e);const d=o+u+p;let a,l,c,f,g,m;return 1===d?o?(a=(e-n)/(i-n),l=(e-n)/(r-n),h.push(1),h.push(2),1!==l&&(h.push(-1),h.push(0),h.push(2),h.push(l)),1!==a&&(h.push(-1),h.push(0),h.push(1),h.push(a))):u?(c=(e-i)/(r-i),f=(e-i)/(n-i),h.push(2),h.push(0),1!==f&&(h.push(-1),h.push(1),h.push(0),h.push(f)),1!==c&&(h.push(-1),h.push(1),h.push(2),h.push(c))):p&&(g=(e-r)/(n-r),m=(e-r)/(i-r),h.push(0),h.push(1),1!==m&&(h.push(-1),h.push(2),h.push(1),h.push(m)),1!==g&&(h.push(-1),h.push(2),h.push(0),h.push(g))):2===d?o||n===e?u||i===e?p||r===e||(l=(e-n)/(r-n),c=(e-i)/(r-i),h.push(2),h.push(-1),h.push(0),h.push(2),h.push(l),h.push(-1),h.push(1),h.push(2),h.push(c)):(m=(e-r)/(i-r),a=(e-n)/(i-n),h.push(1),h.push(-1),h.push(2),h.push(1),h.push(m),h.push(-1),h.push(0),h.push(1),h.push(a)):(f=(e-i)/(n-i),g=(e-r)/(n-r),h.push(0),h.push(-1),h.push(1),h.push(0),h.push(f),h.push(-1),h.push(2),h.push(0),h.push(g)):3!==d&&(h.push(0),h.push(1),h.push(2)),h},computeBarycentricCoordinates:function(e,t,n,r,h,o,u,p,d){const a=n-u,l=u-h,c=o-p,f=r-p,g=1/(c*a+l*f),m=t-p,x=e-u,w=(c*x+l*m)*g,C=(-f*x+a*m)*g,B=1-w-C;return s.defined(d)?(d.x=w,d.y=C,d.z=B,d):new i.Cartesian3(w,C,B)},computeLineSegmentLineSegmentIntersection:function(e,t,i,r,h,o,u,p,d){const a=(p-o)*(i-e)-(u-h)*(r-t);if(0===a)return;const l=((u-h)*(t-o)-(p-o)*(e-h))/a,c=((i-e)*(t-o)-(r-t)*(e-h))/a;return l>=0&&l<=1&&c>=0&&c<=1?(s.defined(d)||(d=new n.Cartesian2),d.x=e+l*(i-e),d.y=t+l*(r-t),d):void 0}};var C=w;const B=32767,y=16383,I=[],A=[],b=[],v=new i.Cartographic;let T=new i.Cartesian3;const M=[],z=[],V=[],N=[],E=[],R=new i.Cartesian3,H=new t.BoundingSphere,O=new u.OrientedBoundingBox,S=new n.Cartesian2,U=new i.Cartesian3;function F(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}F.prototype.clone=function(e){return s.defined(e)||(e=new F),e.uBuffer=this.uBuffer,e.vBuffer=this.vBuffer,e.heightBuffer=this.heightBuffer,e.normalBuffer=this.normalBuffer,e.index=this.index,e.first=this.first,e.second=this.second,e.ratio=this.ratio,e},F.prototype.initializeIndexed=function(e,t,n,i,s){this.uBuffer=e,this.vBuffer=t,this.heightBuffer=n,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0},F.prototype.initializeFromClipResult=function(e,t,n){let i=t+1;return-1!==e[t]?n[e[t]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=n[e[i]],++i,this.second=n[e[i]],++i,this.ratio=e[i],++i),i},F.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})},F.prototype.isIndexed=function(){return s.defined(this.index)},F.prototype.getH=function(){return s.defined(this.index)?this.heightBuffer[this.index]:o.CesiumMath.lerp(this.first.getH(),this.second.getH(),this.ratio)},F.prototype.getU=function(){return s.defined(this.index)?this.uBuffer[this.index]:o.CesiumMath.lerp(this.first.getU(),this.second.getU(),this.ratio)},F.prototype.getV=function(){return s.defined(this.index)?this.vBuffer[this.index]:o.CesiumMath.lerp(this.first.getV(),this.second.getV(),this.ratio)};let P=new n.Cartesian2,D=-1;const W=[new i.Cartesian3,new i.Cartesian3],X=[new i.Cartesian3,new i.Cartesian3];function k(t,n){++D;let s=W[D],r=X[D];return s=e.AttributeCompression.octDecode(t.first.getNormalX(),t.first.getNormalY(),s),r=e.AttributeCompression.octDecode(t.second.getNormalX(),t.second.getNormalY(),r),T=i.Cartesian3.lerp(s,r,t.ratio,T),i.Cartesian3.normalize(T,T),e.AttributeCompression.octEncode(T,n),--D,n}F.prototype.getNormalX=function(){return s.defined(this.index)?this.normalBuffer[2*this.index]:(P=k(this,P),P.x)},F.prototype.getNormalY=function(){return s.defined(this.index)?this.normalBuffer[2*this.index+1]:(P=k(this,P),P.y)};const K=[];function L(e,t,n,i,r,h,o,u,p){if(0===o.length)return;let d=0,a=0;for(;a<o.length;)a=K[d++].initializeFromClipResult(o,a,u);for(let r=0;r<d;++r){const o=K[r];if(o.isIndexed())o.newIndex=h[o.index],o.uBuffer=e,o.vBuffer=t,o.heightBuffer=n,p&&(o.normalBuffer=i);else{const r=o.getKey();if(s.defined(h[r]))o.newIndex=h[r];else{const s=e.length;e.push(o.getU()),t.push(o.getV()),n.push(o.getH()),p&&(i.push(o.getNormalX()),i.push(o.getNormalY())),o.newIndex=s,h[r]=s}}}3===d?(r.push(K[0].newIndex),r.push(K[1].newIndex),r.push(K[2].newIndex)):4===d&&(r.push(K[0].newIndex),r.push(K[1].newIndex),r.push(K[2].newIndex),r.push(K[0].newIndex),r.push(K[2].newIndex),r.push(K[3].newIndex))}return K.push(new F),K.push(new F),K.push(new F),K.push(new F),p((function(e,s){const p=e.isEastChild,d=e.isNorthChild,a=p?y:0,l=p?B:y,c=d?y:0,f=d?B:y,g=M,m=z,x=V,w=E;g.length=0,m.length=0,x.length=0,w.length=0;const P=N;P.length=0;const D={},W=e.vertices;let X=e.indices;X=X.subarray(0,e.indexCountWithoutSkirts);const k=r.TerrainEncoding.clone(e.encoding),K=k.hasVertexNormals;let Y=0;const _=e.vertexCountWithoutSkirts,G=e.minimumHeight,J=e.maximumHeight,Z=new Array(_),j=new Array(_),q=new Array(_),Q=K?new Array(2*_):void 0;let $,ee,te,ne,ie;for(ee=0,te=0;ee<_;++ee,te+=2){const e=k.decodeTextureCoordinates(W,ee,S);if($=k.decodeHeight(W,ee),ne=o.CesiumMath.clamp(e.x*B|0,0,B),ie=o.CesiumMath.clamp(e.y*B|0,0,B),q[ee]=o.CesiumMath.clamp(($-G)/(J-G)*B|0,0,B),ne<20&&(ne=0),ie<20&&(ie=0),B-ne<20&&(ne=B),B-ie<20&&(ie=B),Z[ee]=ne,j[ee]=ie,K){const e=k.getOctEncodedNormal(W,ee,U);Q[te]=e.x,Q[te+1]=e.y}(p&&ne>=y||!p&&ne<=y)&&(d&&ie>=y||!d&&ie<=y)&&(D[ee]=Y,g.push(ne),m.push(ie),x.push(q[ee]),K&&(w.push(Q[te]),w.push(Q[te+1])),++Y)}const se=[];se.push(new F),se.push(new F),se.push(new F);const re=[];let he,oe;for(re.push(new F),re.push(new F),re.push(new F),ee=0;ee<X.length;ee+=3){const e=X[ee],t=X[ee+1],n=X[ee+2],i=Z[e],s=Z[t],r=Z[n];se[0].initializeIndexed(Z,j,q,Q,e),se[1].initializeIndexed(Z,j,q,Q,t),se[2].initializeIndexed(Z,j,q,Q,n);const h=C.clipTriangleAtAxisAlignedThreshold(y,p,i,s,r,I);he=0,he>=h.length||(he=re[0].initializeFromClipResult(h,he,se),he>=h.length||(he=re[1].initializeFromClipResult(h,he,se),he>=h.length||(he=re[2].initializeFromClipResult(h,he,se),oe=C.clipTriangleAtAxisAlignedThreshold(y,d,re[0].getV(),re[1].getV(),re[2].getV(),A),L(g,m,x,w,P,D,oe,re,K),he<h.length&&(re[2].clone(re[1]),re[2].initializeFromClipResult(h,he,se),oe=C.clipTriangleAtAxisAlignedThreshold(y,d,re[0].getV(),re[1].getV(),re[2].getV(),A),L(g,m,x,w,P,D,oe,re,K)))))}const ue=p?-32767:0,pe=d?-32767:0,de=[],ae=[],le=[],ce=[];let fe=Number.MAX_VALUE,ge=-fe;const me=b;me.length=0;const xe=i.Ellipsoid.clone(e.ellipsoid),we=n.Rectangle.clone(e.childRectangle),Ce=we.north,Be=we.south;let ye=we.east;const Ie=we.west;for(ye<Ie&&(ye+=o.CesiumMath.TWO_PI),ee=0;ee<g.length;++ee)ne=Math.round(g[ee]),ne<=a?(de.push(ee),ne=0):ne>=l?(le.push(ee),ne=B):ne=2*ne+ue,g[ee]=ne,ie=Math.round(m[ee]),ie<=c?(ae.push(ee),ie=0):ie>=f?(ce.push(ee),ie=B):ie=2*ie+pe,m[ee]=ie,$=o.CesiumMath.lerp(G,J,x[ee]/B),$<fe&&(fe=$),$>ge&&(ge=$),x[ee]=$,v.longitude=o.CesiumMath.lerp(Ie,ye,ne/B),v.latitude=o.CesiumMath.lerp(Be,Ce,ie/B),v.height=$,xe.cartographicToCartesian(v,T),me.push(T.x),me.push(T.y),me.push(T.z);const Ae=t.BoundingSphere.fromVertices(me,i.Cartesian3.ZERO,3,H),be=u.OrientedBoundingBox.fromRectangle(we,fe,ge,xe,O),ve=new r.EllipsoidalOccluder(xe).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(Ae.center,me,3,Ae.center,fe,R),Te=ge-fe,Me=new Uint16Array(g.length+m.length+x.length);for(ee=0;ee<g.length;++ee)Me[ee]=g[ee];let ze=g.length;for(ee=0;ee<m.length;++ee)Me[ze+ee]=m[ee];for(ze+=m.length,ee=0;ee<x.length;++ee)Me[ze+ee]=B*(x[ee]-fe)/Te;const Ve=h.IndexDatatype.createTypedArray(g.length,P);let Ne;if(K){const e=new Uint8Array(w);s.push(Me.buffer,Ve.buffer,e.buffer),Ne=e.buffer}else s.push(Me.buffer,Ve.buffer);return{vertices:Me.buffer,encodedNormals:Ne,indices:Ve.buffer,minimumHeight:fe,maximumHeight:ge,westIndices:de,southIndices:ae,eastIndices:le,northIndices:ce,boundingSphere:Ae,orientedBoundingBox:be,horizonOcclusionPoint:ve}}))}));
public/CIMSDK/index.cjs
ÎļþÌ«´ó
public/CIMSDK/index.js
ÎļþÌ«´ó
public/mapscreen/css/css.css
ÎļþÒÑɾ³ý
public/mapscreen/css/style.css
ÎļþÒÑɾ³ý
public/mapscreen/images/3css_globe_diffuse.jpg
Binary files differ
public/mapscreen/images/css_1globe_halo.png
Binary files differ
public/mapscreen/images/css_globe_bg.jpg
Binary files differ
public/mapscreen/images/css_globe_diffuse.jpg
Binary files differ
public/mapscreen/images/css_globe_halo.png
Binary files differ
public/mapscreen/images/css_globe_halo.zip
Binary files differ
public/mapscreen/index.html
ÎļþÒÑɾ³ý
public/mapscreen/js/Stats.js
ÎļþÒÑɾ³ý
public/mapscreen/js/TweenMax.min.js
ÎļþÒÑɾ³ý
public/mapscreen/js/css_globe_PerspectiveTransform.js
ÎļþÒÑɾ³ý
public/mapscreen/js/dat.gui.min.js
ÎļþÒÑɾ³ý
public/mapscreen/js/modernizr.min.js
ÎļþÒÑɾ³ý
public/mapscreen/js/prefixfree.min.js
ÎļþÒÑɾ³ý
public/mapscreen/js/script.js
ÎļþÒÑɾ³ý
src/api/api.js
@@ -20,6 +20,17 @@
  //请求地址
  return request.get("/dataQuery/selectByPage", { params: params });
}
//查询字段信息
export function dataQuery_selectFields(params) {
  //请求地址
  return request.get("/dataQuery/selectFields", { params: params });
}
//获取RSA加密公钥
export function sign_getPublicKey(params) {
src/assets/js/Map/config.js
@@ -1,6 +1,6 @@
//是否为生产环境
const isWeb = false;
const isWeb = true;
//是否为生产环境
const webUrl = isWeb ? "/web" : ""
//配置文件地址
@@ -16,10 +16,15 @@
  moonTms: "/TMS",
  //Wmtsserver
  moonWmts:
    "http://172.16.2.10:50001/sj_raster/v6/wmts/service/system/10003901/1?ak=mf72ff9295c740ec0f37e61433e8a3ad8d",
    "http://172.16.2.10:50001/sj_raster/v6/wmts/service/system/10000201/3?ak=mf72ff9295c740ec0f37e61433e8a3ad8d&srs=ESRI:104903",
  //地形
  moonTerrain: "http://172.16.2.10:50001/sj_raster/v6/terrain_mesh/10013901/37",
  conditions: [
    ['=', '<>', 'like'],
    ['>=', '>', ' =', '<=', '<', '<>'],
    ['>=', '>', ' =', '<=', '<', '<>'],
  ]
};
export default config;
src/assets/js/Map/index.js
@@ -37,28 +37,27 @@
    sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
    Viewer.imageryLayers.removeAll();
    window.Viewer.imageryLayers.removeAll();
    // Viewer.scene.globe.showGroundAtmosphere = false;
    var terrain = new SmartEarth.Cesium.CesiumTerrainProvider({
    // server.AddTmsLayer(config.moonTms);
    server.AddWmtesLayer(config.moonWmts);
    var terrain = new Cesium.CesiumTerrainProvider({
      url: config.moonTerrain,
      tilingScheme: new SmartEarth.Cesium.GeographicTilingScheme({
        ellipsoid: SmartEarth.Cesium.Ellipsoid.MOON,
      tilingScheme: new Cesium.GeographicTilingScheme({
        ellipsoid: Cesium.Ellipsoid.MOON,
      }),
    });
    Viewer.terrainProvider = terrain;
    // Viewer.scene.globe.terrainExaggeration = 5;
    window.Viewer.terrainProvider = terrain;
    window.Viewer.scene.globe.terrainExaggeration = 1.0000001
    // server.AddTmsLayer("http://172.16.2.10:50001/sj_raster/v6/service/10003901/1");
    // server.AddTmsLayer(config.moonTms);
    server.AddWmtesLayer(config.moonWmts);
    // server.AddGeoWmsLayer();
    // var param = {
    //     name: labelName,
src/assets/js/Map/server.js
@@ -24,8 +24,9 @@
    // });
    // Viewer.imageryLayers.addImageryProvider(urlTemplateImageryProvider);
    sgworld.Creator.createUrlTemplateImageryProvider('tms服务', {
      url: Cesium.buildModuleUrl(url + "/{z}/{x}/{y}.png"),
      url: Cesium.buildModuleUrl(url + "/{z}/{x}/{reverseY}.png"),
    }, '0', undefined, true, "");
  },
  AddWmtesLayer(url) {
    var urlTemplateImageryProvider = earthCtrl.factory.createImageryLayer({
src/main.ts
@@ -3,6 +3,7 @@
import router from "./router";
import store from "./store";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "default-passive-events";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
@@ -10,6 +11,8 @@
import "./assets/css/global.css";
//自适应
import "amfe-flexible/index";
import zhlocale from "element-plus/lib/locale/lang/zh-cn";
//粒子特效
import VueParticles from "vue-particles";
import Drag from "./utils/drag";
@@ -20,7 +23,7 @@
}
app
  .use(ElementPlus)
  .use(ElementPlus, { locale: zhlocale })
  .use(store)
  .use(router)
  .use(VueParticles)
src/store/index.ts
@@ -13,6 +13,8 @@
      wkt: null,
      hasGeom: null,
      filter: null,
      count: 0,
      obj: null,
    },
  },
  mutations: {
src/views/Index.vue
@@ -41,7 +41,7 @@
import router from "@/router";
import { useStore } from "vuex"; // å¼•å…¥useStore æ–¹æ³•
import { dataQuery_selectByPage } from "@/api/api";
let map;
var viewer;
const store = useStore(); // è¯¥æ–¹æ³•用于返回store å®žä¾‹
@@ -67,14 +67,9 @@
  }
};
const setSpatialQuery = async (res) => {
  layerSpatialshow.value = true;
  store.state.spatialQueryData.wkt = res.value;
  store.state.spatialQueryData.hasGeom = 1;
  store.state.spatialQueryData.filter = "";
  store.state.spatialQueryData.name = "lunarplacenane";
  var obj = store.state.spatialQueryData;
  const data = await dataQuery_selectByPage(obj);
  debugger;
  layerSpatialshow.value = true;
};
const SETspatialClose = (res) => {
  layerSpatialshow.value = res;
src/views/query/SpatialQuery.vue
@@ -2,10 +2,10 @@
  <div
    v-drag="true"
    class="spatialBox"
    v-resizable="'right, bottom'"
  >
    <!--     v-resizable="'right, bottom'" -->
    <div class="spatialTitle">
      <label>空间查询 </label>
      <label>空间查询</label>
      <el-icon
        @click="setSpatialClose"
        :size="20"
@@ -13,6 +13,119 @@
        <Close />
      </el-icon>
    </div>
    <div class="spatialContent">
      <div>
        <el-row :gutter="20">
          <el-col :span="18">
            <el-input
              v-model="listData.filter"
              type="text"
              placeholder="请选择..."
              disabled
            />
          </el-col>
          <el-col :span="6">
            <el-button
              :icon="Plus"
              type="success"
              @click="dialogVisible = true"
            >高级查询</el-button>
          </el-col>
        </el-row>
      </div>
      <div class="spatialTable">
        <el-table
          :data="tableData"
          style="width: 100%; height: 73%;"
        >
          <el-table-column
            v-for="(item, index) in attributeData"
            :key="index"
            :label="item.alias"
            :prop="item.field"
            show-overflow-tooltip
            align="center"
            :fit="true"
            width="120"
          ></el-table-column>
        </el-table>
        <div class="spatialBottom">
          <el-pagination
            v-model:current-page="listData.pageIndex"
            v-model:page-size="listData.pageSize"
            :page-sizes="[10, 20, 100, 200]"
            small="small"
            :disabled="false"
            layout="total, sizes, prev, pager, next, jumper"
            :total="listData.count"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
        </div>
      </div>
    </div>
    <!-- é«˜çº§æŸ¥è¯¢ -->
    <el-dialog
      v-model="dialogVisible"
      title="高级查询"
      width="30%"
      :show-close="false"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
    >
      <div>
        <el-row :gutter="20">
          <el-col :span="8">
            <el-select
              v-model="formSql.field"
              class="m-2"
              placeholder="Select"
              @change="setFieldChange($event)"
            >
              <el-option
                v-for="item in fieldOption"
                :key="item.id"
                :label="item.alias"
                :value="item.id"
              />
            </el-select>
          </el-col>
          <el-col :span="8">
            <el-select
              v-model="formSql.type"
              class="m-2"
              placeholder="Select"
            >
              <el-option
                v-for="item in condOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </el-col>
          <el-col :span="8">
            <el-input v-model="formSql.value"></el-input>
          </el-col>
        </el-row>
      </div>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="dialogVisible = false">取消</el-button>
          <el-button
            type="primary"
            @click="setInsertDialog"
          > æ·»åŠ  </el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
@@ -24,13 +137,150 @@
  reactive,
  defineProps,
  defineEmits,
  nextTick,
} from "vue";
import { User, Lock } from "@element-plus/icons-vue";
import config from "@/assets/js/Map/config";
import { User, Lock, Plus } from "@element-plus/icons-vue";
import { dataQuery_selectByPage, dataQuery_selectFields } from "@/api/api";
import { ElMessage } from "element-plus";
import store from "@/store";
const emits = defineEmits(["SETspatialClose"]);
const setSpatialClose = () => {
  emits("SETspatialClose", false);
};
onMounted(() => {});
const dialogVisible = ref(false);
const listData = ref({
  pageIndex: 1,
  pageSize: 10,
  count: 0,
  wkt: null,
  hasGeom: 1,
  filter: "",
  name: "",
});
const condOption = ref([]);
const fieldOption = ref([]);
const attributeData = ref([]);
const tableData = ref([]);
const formSql = ref({
  field: "",
  type: "",
  value: "",
  cut: "",
});
const handleSizeChange = (res) => {
  listData.value.pageSize = res;
  setQueySpatialData();
};
const handleCurrentChange = (res) => {
  listData.value.pageIndex = res;
  setQueySpatialData();
};
const setInsertDialog = () => {
  if (!formSql.value.value) {
    return ElMessage.error("请输入要查询的参数");
  }
  dialogVisible.value = false;
  if (listData.value.filter != "") {
    listData.value.filter += " and ";
  }
  const val = null;
  if (formSql.value.cut === "long" || formSql.value.cut === "integer") {
    val = parseInt(formSql.value.value);
  } else if (formSql.value.cut === "double") {
    if (formSql.value.value.indexOf(".") != -1) {
      val = parseInt(formSql.value.value);
    } else {
      val = parseFloat(formSql.value.value).toFixed(1);
    }
  } else if (formSql.value.cut == "date" || formSql.value.cut == "datetime") {
    var time = new Date(formSql.value.value);
    var m = time.getMonth() + 1;
    var d = time.getDate();
    var y = time.getFullYear();
    val = "'" + y + "-" + add0(m) + "-" + add0(d) + "'";
  } else {
    val = "'" + formSql.value.value + "'";
  }
  listData.value.filter +=
    formSql.value.field + " " + formSql.value.type + " " + val;
  debugger;
  // debugger;
  // setFieldChange(attributeData.value[0]);
};
//格式化时间
const add0 = (m) => {
  return m < 10 ? "0" + m : m;
};
//查询列表数据
const setQueySpatialData = async () => {
  const data = await dataQuery_selectByPage(listData.value);
  if (data.code != 200) {
    return ElMessage.error("空间查询失败");
  }
  listData.value.count = data.count;
  tableData.value = data.result;
};
const setQueySpatialFields = async () => {
  const data = await dataQuery_selectFields({ name: listData.value.name });
  if (data.code != 200) {
    return ElMessage.error("字段查询失败");
  }
  attributeData.value = data.result;
  fieldOption.value = data.result;
  conditionChange(data.result[0]);
  setQueySpatialData();
};
const setFieldChange = (res) => {
  const val = fieldOption.value;
  const str = [];
  for (var i in val) {
    if (val[i].id === res) {
      str.push(val[i]);
    }
  }
  if (str.length > 0) {
    conditionChange(str[0]);
  }
};
const conditionChange = (res) => {
  formSql.value.field = res.field;
  formSql.value.cut = res.type;
  const type = res.type;
  var std = [];
  if (type == "text" || type == "blob") {
    std = config.conditions[0];
  } else if (type == "date" || type == "datetime") {
    std = config.conditions[2];
  } else {
    std = config.conditions[1];
  }
  var str = [];
  for (var i in std) {
    str.push({
      label: std[i],
      value: std[i],
    });
  }
  condOption.value = str;
  formSql.value.type = std[0];
};
//页面初始化
const startQueryData = () => {
  listData.value.wkt = store.state.spatialQueryData.wkt;
  listData.value.name = "lunarplacenane";
  listData.value.hasGeom = 1;
  //
  setQueySpatialFields();
};
onMounted(() => {
  startQueryData();
});
</script>
<style lang="less" scoped>
@@ -38,9 +288,10 @@
  width: 800px;
  height: 400px;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 5%;
  left: 5%;
  bottom: 5%;
  right: 5%;
  background: rgba(7, 8, 14, 0.8);
  border: 1px solid #d6e4ff;
  z-index: 10;
@@ -48,7 +299,9 @@
  .spatialTitle {
    padding: 10px;
    width: calc(100% - 20px);
    height: 66px;
    color: #d6e4ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
@@ -57,5 +310,126 @@
      font-size: 16px;
    }
  }
  .spatialContent {
    height: calc(100% - 10px);
    width: calc(100% - 20px);
    padding: 10px;
    .spatialTable {
      margin-top: 10px;
      width: 100%;
      height: calc(100% - 35px);
      position: relative;
      .el-table /deep/ .el-table__header-wrapper tr th {
        background-color: rgba(38, 47, 71, 1) !important;
        color: #d6e4ff;
      }
      // ä¿®æ”¹æ¯è¡Œæ ·å¼ï¼š
      .el-table /deep/ .el-table__row {
        background-color: rgba(38, 47, 71, 1) !important;
        color: #d6e4ff;
      }
      .el-table /deep/ .el-table__body tr.current-row > td {
        background-color: rgba(38, 47, 71, 1) !important;
      }
      .el-table /deep/ .el-table__body tr:hover > td {
        background-color: rgba(38, 47, 71, 1) !important;
      }
      // ä¿®æ”¹è¡¨æ ¼æ¯è¡Œè¾¹æ¡†çš„æ ·å¼ï¼š
      .el-table /deep/ td,
      .el-table /deep/ th.is-leaf {
        // border-bottom: 1px solid #409eff;
        // border-right: 1px solid #409eff;
      }
      .el-table /deep/ .el-table__cell {
        padding: 8px 0;
      }
      // è®¾ç½®è¡¨æ ¼æ¯è¡Œçš„高度:
      .el-table /deep/ .el-table__header tr,
      .el-table /deep/ .el-table__header th {
        height: 50px;
      }
      .el-table__body tr,
      .el-table__body td {
        height: 50px;
        padding: 0;
      }
      // è®¾ç½®è¡¨æ ¼è¾¹æ¡†é¢œè‰²ï¼š
      .el-table--border::after,
      .el-table--group::after {
        width: 0;
      }
      .el-table::before {
        height: 0;
      }
    }
  }
  .spatialBottom {
    padding: 10px;
    height: 40px;
  }
  /deep/.el-pagination button {
    background: transparent;
    color: #d6e4ff;
  }
  /deep/.el-pager li {
    background: transparent;
    color: #d6e4ff;
  }
  /deep/.el-pager li.is-active {
    color: #409eff;
  }
  /deep/.el-pagination__total {
    color: #d6e4ff;
  }
  /deep/.el-pagination__goto {
    color: #d6e4ff;
  }
  /deep/.el-pagination__classifier {
    color: #d6e4ff;
  }
  /deep/.el-input.is-disabled .el-input__wrapper {
    background: transparent !important;
    color: #d6e4ff;
  }
  /deep/.el-input.is-disabled .el-input__inner {
    color: #d6e4ff !important;
  }
  /deep/ .el-dialog {
    background: rgba(7, 8, 14, 0.8);
    border: 1px solid #d6e4ff;
    z-index: 10;
    box-shadow: inset 0px 10px 40px 10px rgba(38, 47, 71, 1);
  }
  /deep/.el-dialog__title {
    color: #d6e4ff !important;
  }
}
</style>
</style>
<style lang="less"  >
.el-scrollbar {
  background: rgba(7, 8, 14) !important;
  border: 1px solid #4472cb;
  color: #d6e4ff !important;
  box-shadow: inset 0px 1px 40px 1px rgba(38, 47, 71, 1);
  // .el-dropdown-menu {
  //   background: rgba(7, 8, 14, 0.8) !important;
  // }
  .el-select-dropdown__item {
    color: #d6e4ff;
  }
  .el-select-dropdown__item:hover {
    background: rgba(38, 47, 71, 1) !important;
  }
  .el-select-dropdown__item.hover,
  .el-select-dropdown__item:hover {
    background: rgba(38, 47, 71, 1) !important;
  }
}
.el-table__header-wrapper {
  border: 1px siolid #409eff;
}
</style>
vue.config.js
@@ -14,13 +14,14 @@
    // // é…ç½®è·¨åŸŸ-请求后端的代理接口
    proxy: {
      "/TMS": {
        target: "http://172.16.2.10:50001/sj_raster/v6/service/10003901/1", //对应自己的接口
        target: "http://192.168.20.39:9055/gisserver/tmsserver/moondom", //对应自己的接口
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          "^/TMS": "",
        },
      },
    },
  },
};