13 lines
241 KiB
JavaScript
13 lines
241 KiB
JavaScript
import{L as Zn,_ as so,u as ro,r as z,Y as oo,t as ao,a7 as lo,C as ho,N as co,d as Wt,o as nt,c as lt,k as F,K as Zi,f as D,e as $,w as et,Q as En,R as Rn,j as Ui,F as ps,l as pt,m as at,x as ji,G as uo,H as fo,Z as ms,p as go,q as po}from"./index.57224d07.js";import mo from"./downloads.4cdbbcc5.js";import{_ as _o,a as xo}from"./zhankaiss.dd067ea4.js";import{_ as yo,a as So}from"./face.9a19de2e.js";import"./index.b8675889.js";/* empty css */import{u as _s}from"./useEcharts.c43bfe26.js";import"./linesGL.901ceb35.js";import{d as Fe}from"./download.60adf562.js";import{e as vo}from"./element-resize-detector.ff2fdb0d.js";import{i as Co,ar as ai}from"./install.5b5161c6.js";import"./browser-detector.e77caf03.js";const Eo={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class Ro extends Error{constructor(t){const e=Eo[t];super(e),this.code=t,this.name="AssertionError",this.message=e}}const fr=Ro;function dt(n,t){if(!n)throw new fr(t)}const _t={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Xt(n){const t=Le();for(let e=0,i=n.length;e<i;++e)_r(t,n[e]);return t}function pn(n,t,e){return e?(e[0]=n[0]-t,e[1]=n[1]-t,e[2]=n[2]+t,e[3]=n[3]+t,e):[n[0]-t,n[1]-t,n[2]+t,n[3]+t]}function Io(n,t){return t?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t):n.slice()}function Un(n,t,e){let i,s;return t<n[0]?i=n[0]-t:n[2]<t?i=t-n[2]:i=0,e<n[1]?s=n[1]-e:n[3]<e?s=e-n[3]:s=0,i*i+s*s}function wo(n,t){return gr(n,t[0],t[1])}function Xe(n,t){return n[0]<=t[0]&&t[2]<=n[2]&&n[1]<=t[1]&&t[3]<=n[3]}function gr(n,t,e){return n[0]<=t&&t<=n[2]&&n[1]<=e&&e<=n[3]}function Pn(n,t){const e=n[0],i=n[1],s=n[2],r=n[3],o=t[0],a=t[1];let l=_t.UNKNOWN;return o<e?l=l|_t.LEFT:o>s&&(l=l|_t.RIGHT),a<i?l=l|_t.BELOW:a>r&&(l=l|_t.ABOVE),l===_t.UNKNOWN&&(l=_t.INTERSECTING),l}function Le(){return[1/0,1/0,-1/0,-1/0]}function je(n,t,e,i,s){return s?(s[0]=n,s[1]=t,s[2]=e,s[3]=i,s):[n,t,e,i]}function pr(n){return je(1/0,1/0,-1/0,-1/0,n)}function en(n,t){const e=n[0],i=n[1];return je(e,i,e,i,t)}function Mo(n,t,e,i,s){const r=pr(s);return xr(r,n,t,e,i)}function mr(n,t){return n[0]==t[0]&&n[2]==t[2]&&n[1]==t[1]&&n[3]==t[3]}function _r(n,t){t[0]<n[0]&&(n[0]=t[0]),t[0]>n[2]&&(n[2]=t[0]),t[1]<n[1]&&(n[1]=t[1]),t[1]>n[3]&&(n[3]=t[1])}function xr(n,t,e,i,s){for(;e<i;e+=s)Ao(n,t[e],t[e+1]);return n}function Ao(n,t,e){n[0]=Math.min(n[0],t),n[1]=Math.min(n[1],e),n[2]=Math.max(n[2],t),n[3]=Math.max(n[3],e)}function Lo(n,t){let e;return e=t(yr(n)),e||(e=t(Sr(n)),e)||(e=t(Cr(n)),e)||(e=t(vr(n)),e)?e:!1}function yr(n){return[n[0],n[1]]}function Sr(n){return[n[2],n[1]]}function pi(n){return[(n[0]+n[2])/2,(n[1]+n[3])/2]}function To(n,t,e,i,s){const[r,o,a,l,h,c,u,d]=bo(n,t,e,i);return je(Math.min(r,a,h,u),Math.min(o,l,c,d),Math.max(r,a,h,u),Math.max(o,l,c,d),s)}function bo(n,t,e,i){const s=t*i[0]/2,r=t*i[1]/2,o=Math.cos(e),a=Math.sin(e),l=s*o,h=s*a,c=r*o,u=r*a,d=n[0],f=n[1];return[d-l+u,f-h-c,d-l-u,f-h+c,d+l-u,f+h+c,d+l+u,f+h-c,d-l+u,f-h-c]}function mi(n){return n[3]-n[1]}function vr(n){return[n[0],n[3]]}function Cr(n){return[n[2],n[3]]}function Lt(n){return n[2]-n[0]}function Dt(n,t){return n[0]<=t[2]&&n[2]>=t[0]&&n[1]<=t[3]&&n[3]>=t[1]}function Do(n){return n[2]<n[0]||n[3]<n[1]}function ko(n,t){return t?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t):n}function Fo(n,t,e){let i=!1;const s=Pn(n,t),r=Pn(n,e);if(s===_t.INTERSECTING||r===_t.INTERSECTING)i=!0;else{const o=n[0],a=n[1],l=n[2],h=n[3],c=t[0],u=t[1],d=e[0],f=e[1],g=(f-u)/(d-c);let p,_;!!(r&_t.ABOVE)&&!(s&_t.ABOVE)&&(p=d-(f-h)/g,i=p>=o&&p<=l),!i&&!!(r&_t.RIGHT)&&!(s&_t.RIGHT)&&(_=f-(d-l)*g,i=_>=a&&_<=h),!i&&!!(r&_t.BELOW)&&!(s&_t.BELOW)&&(p=d-(f-a)/g,i=p>=o&&p<=l),!i&&!!(r&_t.LEFT)&&!(s&_t.LEFT)&&(_=f-(d-o)*g,i=_>=a&&_<=h)}return i}function Er(n,t){const e=t.getExtent(),i=pi(n);if(t.canWrapX()&&(i[0]<e[0]||i[0]>=e[2])){const s=Lt(e),o=Math.floor((i[0]-e[0])/s)*s;n[0]-=o,n[2]-=o}return n}function Oo(n,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[e[0],n[1],e[2],n[3]]];Er(n,t);const i=Lt(e);if(Lt(n)>i)return[[e[0],n[1],e[2],n[3]]];if(n[0]<e[0])return[[n[0]+i,n[1],e[2],n[3]],[e[0],n[1],n[2],n[3]]];if(n[2]>e[2])return[[n[0],n[1],e[2],n[3]],[e[0],n[1],n[2]-i,n[3]]]}return[n]}const St={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};class Po{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const Go=Po;class Bo{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const qe=Bo;function No(n,t,e){let i,s;e=e||_i;let r=0,o=n.length,a=!1;for(;r<o;)i=r+(o-r>>1),s=+e(n[i],t),s<0?r=i+1:(o=i,a=!s);return a?r:~r}function _i(n,t){return n>t?1:n<t?-1:0}function Rr(n,t,e){if(n[0]<=t)return 0;const i=n.length;if(t<=n[i-1])return i-1;if(typeof e=="function"){for(let s=1;s<i;++s){const r=n[s];if(r===t)return s;if(r<t)return e(t,n[s-1],r)>0?s-1:s}return i-1}if(e>0){for(let s=1;s<i;++s)if(n[s]<t)return s-1;return i-1}if(e<0){for(let s=1;s<i;++s)if(n[s]<=t)return s;return i-1}for(let s=1;s<i;++s){if(n[s]==t)return s;if(n[s]<t)return n[s-1]-t<t-n[s]?s-1:s}return i-1}function Wo(n,t,e){for(;t<e;){const i=n[t];n[t]=n[e],n[e]=i,++t,--e}}function jn(n,t){const e=Array.isArray(t)?t:[t],i=e.length;for(let s=0;s<i;s++)n[n.length]=e[s]}function Te(n,t){const e=n.length;if(e!==t.length)return!1;for(let i=0;i<e;i++)if(n[i]!==t[i])return!1;return!0}function Ir(){return!0}function xi(){}function Xo(n){let t=!1,e,i,s;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==s||!Te(r,i))&&(t=!0,s=this,i=r,e=n.apply(this,arguments)),e}}function Hn(n){for(const t in n)delete n[t]}function yi(n){let t;for(t in n)return!1;return!t}class Yo extends Go{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),s=i[t]||(i[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",i=e?t:t.type,s=this.listeners_&&this.listeners_[i];if(!s)return;const r=e?new qe(t):t;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let h=0,c=s.length;h<c;++h)if("handleEvent"in s[h]?l=s[h].handleEvent(r):l=s[h].call(this,r),l===!1||r.propagationStopped){l=!1;break}if(--o[i]===0){let h=a[i];for(delete a[i];h--;)this.removeEventListener(i,xi);delete o[i]}return l}disposeInternal(){this.listeners_&&Hn(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const s=i.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[s]=xi,++this.pendingRemovals_[t]):(i.splice(s,1),i.length===0&&delete this.listeners_[t]))}}}const wr=Yo;function tt(){throw new Error("Unimplemented abstract method.")}let zo=0;function st(n){return n.ol_uid||(n.ol_uid=String(++zo))}function Vo(n){return Math.pow(n,3)}function Zo(n){return 1-Vo(1-n)}function Uo(n){return 3*n*n-2*n*n*n}const he=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"";he.includes("firefox");const jo=he.includes("safari")&&!he.includes("chrom");jo&&(he.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(he));he.includes("webkit")&&he.includes("edge");he.includes("macintosh");const Kn=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,Ho=typeof Image<"u"&&Image.prototype.decode;(function(){let n=!1;try{const t=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return n})();function kt(n,t,e,i){let s;return e&&e.length?s=e.shift():Kn?s=new OffscreenCanvas(n||300,t||300):s=document.createElement("canvas"),n&&(s.width=n),t&&(s.height=t),s.getContext("2d",i)}function Ko(n){const t=n.canvas;t.width=1,t.height=1,n.clearRect(0,0,1,1)}const ct={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function Zt(n,t,e,i,s){if(i&&i!==n&&(e=e.bind(i)),s){const o=e;e=function(){n.removeEventListener(t,e),o.apply(this,arguments)}}const r={target:n,type:t,listener:e};return n.addEventListener(t,e),r}function nn(n,t,e,i){return Zt(n,t,e,i,!0)}function Ut(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),Hn(n))}function qo(n,t,e){const i=n;let s=!0,r=!1,o=!1;const a=[nn(i,St.LOAD,function(){o=!0,r||t()})];return i.src&&Ho?(r=!0,i.decode().then(function(){s&&t()}).catch(function(l){s&&(o?t():e())})):a.push(nn(i,St.ERROR,e)),function(){s=!1,a.forEach(Ut)}}const Mr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Jo{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Mr[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Ar=Jo,Di=6378137,Ye=Math.PI*Di,Qo=[-Ye,-Ye,Ye,Ye],$o=[-180,-85,180,85],Hi=Di*Math.log(Math.tan(Math.PI/2));class Oe extends Ar{constructor(t){super({code:t,units:"m",extent:Qo,global:!0,worldExtent:$o,getPointResolution:function(e,i){return e/Math.cosh(i[1]/Di)}})}}const xs=[new Oe("EPSG:3857"),new Oe("EPSG:102100"),new Oe("EPSG:102113"),new Oe("EPSG:900913"),new Oe("http://www.opengis.net/def/crs/EPSG/0/3857"),new Oe("http://www.opengis.net/gml/srs/epsg.xml#3857")];function ta(n,t,e){const i=n.length;e=e>1?e:2,t===void 0&&(e>2?t=n.slice():t=new Array(i));for(let s=0;s<i;s+=e){t[s]=Ye*n[s]/180;let r=Di*Math.log(Math.tan(Math.PI*(+n[s+1]+90)/360));r>Hi?r=Hi:r<-Hi&&(r=-Hi),t[s+1]=r}return t}function ea(n,t,e){const i=n.length;e=e>1?e:2,t===void 0&&(e>2?t=n.slice():t=new Array(i));for(let s=0;s<i;s+=e)t[s]=180*n[s]/Ye,t[s+1]=360*Math.atan(Math.exp(n[s+1]/Di))/Math.PI-90;return t}const ia=6378137,ys=[-180,-90,180,90],na=Math.PI*ia/180;class Se extends Ar{constructor(t,e){super({code:t,units:"degrees",extent:ys,axisOrientation:e,global:!0,metersPerUnit:na,worldExtent:ys})}}const Ss=[new Se("CRS:84"),new Se("EPSG:4326","neu"),new Se("urn:ogc:def:crs:OGC:1.3:CRS84"),new Se("urn:ogc:def:crs:OGC:2:84"),new Se("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Se("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Se("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Gn={};function sa(n){return Gn[n]||Gn[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function ra(n,t){Gn[n]=t}let Ve={};function sn(n,t,e){const i=n.getCode(),s=t.getCode();i in Ve||(Ve[i]={}),Ve[i][s]=e}function oa(n,t){let e;return n in Ve&&t in Ve[n]&&(e=Ve[n][t]),e}function yt(n,t,e){return Math.min(Math.max(n,t),e)}function aa(n,t,e,i,s,r){const o=s-e,a=r-i;if(o!==0||a!==0){const l=((n-e)*o+(t-i)*a)/(o*o+a*a);l>1?(e=s,i=r):l>0&&(e+=o*l,i+=a*l)}return Ze(n,t,e,i)}function Ze(n,t,e,i){const s=e-n,r=i-t;return s*s+r*r}function Me(n){return n*Math.PI/180}function vs(n,t){const e=n%t;return e*t<0?e+t:e}function It(n,t,e){return n+e*(t-n)}function la(n,t){const e=Math.pow(10,t);return Math.round(n*e)/e}function ha(n,t){return n[0]+=+t[0],n[1]+=+t[1],n}function Lr(n,t){const e=n[0],i=n[1],s=t[0],r=t[1],o=s[0],a=s[1],l=r[0],h=r[1],c=l-o,u=h-a,d=c===0&&u===0?0:(c*(e-o)+u*(i-a))/(c*c+u*u||0);let f,g;return d<=0?(f=o,g=a):d>=1?(f=l,g=h):(f=o+d*c,g=a+d*u),[f,g]}function bt(n,t){let e=!0;for(let i=n.length-1;i>=0;--i)if(n[i]!=t[i]){e=!1;break}return e}function ca(n,t){const e=Math.cos(t),i=Math.sin(t),s=n[0]*e-n[1]*i,r=n[1]*e+n[0]*i;return n[0]=s,n[1]=r,n}function Si(n,t){const e=n[0]-t[0],i=n[1]-t[1];return e*e+i*i}function Cs(n,t){return Math.sqrt(Si(n,t))}function ua(n,t){return Si(n,Lr(n,t))}function da(n,t){if(t.canWrapX()){const e=Lt(t.getExtent()),i=fa(n,t,e);i&&(n[0]-=i*e)}return n}function fa(n,t,e){const i=t.getExtent();let s=0;return t.canWrapX()&&(n[0]<i[0]||n[0]>i[2])&&(e=e||Lt(i),s=Math.floor((n[0]-i[0])/e)),s}const qn=63710088e-1;function ga(n,t,e){e=e||qn;const i=Me(n[1]),s=Me(t[1]),r=(s-i)/2,o=Me(t[0]-n[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(s);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function In(n,t){let e=0;for(let i=0,s=n.length;i<s-1;++i)e+=ga(n[i],n[i+1],t);return e}function Tr(n,t){t=t||{};const e=t.radius||qn,i=t.projection||"EPSG:3857",s=n.getType();s!=="GeometryCollection"&&(n=n.clone().transform(i,"EPSG:4326"));let r=0,o,a,l,h,c,u;switch(s){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":{o=n.getCoordinates(),r=In(o,e);break}case"MultiLineString":case"Polygon":{for(o=n.getCoordinates(),l=0,h=o.length;l<h;++l)r+=In(o[l],e);break}case"MultiPolygon":{for(o=n.getCoordinates(),l=0,h=o.length;l<h;++l)for(a=o[l],c=0,u=a.length;c<u;++c)r+=In(a[c],e);break}case"GeometryCollection":{const d=n.getGeometries();for(l=0,h=d.length;l<h;++l)r+=Tr(d[l],t);break}default:throw new Error("Unsupported geometry type: "+s)}return r}function Ki(n,t){let e=0;const i=n.length;let s=n[i-1][0],r=n[i-1][1];for(let o=0;o<i;o++){const a=n[o][0],l=n[o][1];e+=Me(a-s)*(2+Math.sin(Me(r))+Math.sin(Me(l))),s=a,r=l}return e*t*t/2}function br(n,t){t=t||{};const e=t.radius||qn,i=t.projection||"EPSG:3857",s=n.getType();s!=="GeometryCollection"&&(n=n.clone().transform(i,"EPSG:4326"));let r=0,o,a,l,h,c,u;switch(s){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(o=n.getCoordinates(),r=Math.abs(Ki(o[0],e)),l=1,h=o.length;l<h;++l)r-=Math.abs(Ki(o[l],e));break}case"MultiPolygon":{for(o=n.getCoordinates(),l=0,h=o.length;l<h;++l)for(a=o[l],r+=Math.abs(Ki(a[0],e)),c=1,u=a.length;c<u;++c)r-=Math.abs(Ki(a[c],e));break}case"GeometryCollection":{const d=n.getGeometries();for(l=0,h=d.length;l<h;++l)r+=br(d[l],t);break}default:throw new Error("Unsupported geometry type: "+s)}return r}const Dr={info:1,warn:2,error:3,none:4};let pa=Dr.info;function ma(...n){pa>Dr.warn||console.warn(...n)}let Bn=!0;function _a(n){Bn=!(n===void 0?!0:n)}function kr(n,t){if(t!==void 0){for(let e=0,i=n.length;e<i;++e)t[e]=n[e];t=t}else t=n.slice();return t}function xa(n,t){if(t!==void 0&&n!==t){for(let e=0,i=n.length;e<i;++e)t[e]=n[e];n=t}return n}function ya(n){ra(n.getCode(),n),sn(n,n,kr)}function Sa(n){n.forEach(ya)}function He(n){return typeof n=="string"?sa(n):n||null}function Es(n){Sa(n),n.forEach(function(t){n.forEach(function(e){t!==e&&sn(t,e,kr)})})}function va(n,t,e,i){n.forEach(function(s){t.forEach(function(r){sn(s,r,e),sn(r,s,i)})})}function Jn(n,t){return n?typeof n=="string"?He(n):n:He(t)}function Ca(n,t){const e=n.getCode(),i=t.getCode();let s=oa(e,i);return s||(s=xa),s}function Rs(n,t){const e=He(n),i=He(t);return Ca(e,i)}function vi(n,t){return n}function xt(n,t){return Bn&&!bt(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(Bn=!1,ma("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function Qn(n,t){return n}function ze(n,t){return n}function Ea(){Es(xs),Es(Ss),va(Ss,xs,ta,ea)}Ea();const Fr={PROPERTYCHANGE:"propertychange"};class mn extends wr{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(St.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,s=new Array(i);for(let r=0;r<i;++r)s[r]=Zt(this,t[r],e);return s}return Zt(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const s=t.length;i=new Array(s);for(let r=0;r<s;++r)i[r]=nn(this,t[r],e)}else i=nn(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)Ra(i);else if(Array.isArray(t))for(let s=0,r=t.length;s<r;++s)this.removeEventListener(t[s],e);else this.removeEventListener(t,e)}}mn.prototype.on;mn.prototype.once;mn.prototype.un;function Ra(n){if(Array.isArray(n))for(let t=0,e=n.length;t<e;++t)Ut(n[t]);else Ut(n)}const Or=mn;class Is extends qe{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class Ia extends Or{constructor(t){super(),this.on,this.once,this.un,st(this),this.values_=null,t!==void 0&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new Is(i,t,e)),i=Fr.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new Is(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const s=this.values_||(this.values_={});if(i)s[t]=e;else{const r=s[t];s[t]=e,r!==e&&this.notify(t,r)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){!t.values_||Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],yi(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const ce=Ia;class wa extends ce{constructor(t){super(),this.projection=He(t.projection),this.attributions_=ws(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(i,s){e.viewResolver=i,e.viewRejector=s})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=ws(t),this.changed()}setState(t){this.state_=t,this.changed()}}function ws(n){return n?Array.isArray(n)?function(t){return n}:typeof n=="function"?n:function(t){return[n]}:null}const Ma=wa,Aa=256;function Pr(n,t,e,i,s){let r;for(t+=i;t<e;t+=i)if(r=s(n.slice(t-i,t),n.slice(t,t+i)),r)return r;return!1}function La(n,t,e,i,s){return!Lo(s,function(o){return!Ee(n,t,e,i,o[0],o[1])})}function Ee(n,t,e,i,s,r){let o=0,a=n[e-i],l=n[e-i+1];for(;t<e;t+=i){const h=n[t],c=n[t+1];l<=r?c>r&&(h-a)*(r-l)-(s-a)*(c-l)>0&&o++:c<=r&&(h-a)*(r-l)-(s-a)*(c-l)<0&&o--,a=h,l=c}return o!==0}function Gr(n,t,e,i,s,r){if(e.length===0||!Ee(n,t,e[0],i,s,r))return!1;for(let o=1,a=e.length;o<a;++o)if(Ee(n,e[o-1],e[o],i,s,r))return!1;return!0}function $n(n,t,e,i,s){const r=xr(Le(),n,t,e,i);return Dt(s,r)?Xe(s,r)||r[0]>=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:Pr(n,t,e,i,function(o,a){return Fo(s,o,a)}):!1}function Ta(n,t,e,i,s){return!!($n(n,t,e,i,s)||Ee(n,t,e,i,s[0],s[1])||Ee(n,t,e,i,s[0],s[3])||Ee(n,t,e,i,s[2],s[1])||Ee(n,t,e,i,s[2],s[3]))}function ba(n,t,e,i,s){if(!Ta(n,t,e[0],i,s))return!1;if(e.length===1)return!0;for(let r=1,o=e.length;r<o;++r)if(La(n,e[r-1],e[r],i,s)&&!$n(n,e[r-1],e[r],i,s))return!1;return!0}function rn(n,t){return Array.isArray(n)?n:(t===void 0?t=[n,n]:(t[0]=n,t[1]=n),t)}class ts extends ce{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new ts(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(Ut(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=Zt(t,St.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?Da(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function Da(n){if(typeof n=="function")return n;let t;return Array.isArray(n)?t=n:(dt(typeof n.getZIndex=="function",41),t=[n]),function(){return t}}const Ms=ts;new Array(6);function ae(){return[1,0,0,1,0,0]}function ka(n,t,e,i,s,r,o){return n[0]=t,n[1]=e,n[2]=i,n[3]=s,n[4]=r,n[5]=o,n}function Fa(n,t){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}function Ct(n,t){const e=t[0],i=t[1];return t[0]=n[0]*e+n[2]*i+n[4],t[1]=n[1]*e+n[3]*i+n[5],t}function Oa(n,t,e){return ka(n,t,0,0,e,0,0)}function ki(n,t,e,i,s,r,o,a){const l=Math.sin(r),h=Math.cos(r);return n[0]=i*h,n[1]=s*l,n[2]=-i*l,n[3]=s*h,n[4]=o*i*h-a*i*l+t,n[5]=o*s*l+a*s*h+e,n}function Pa(n,t){const e=Ga(t);dt(e!==0,32);const i=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5];return n[0]=o/e,n[1]=-s/e,n[2]=-r/e,n[3]=i/e,n[4]=(r*l-o*a)/e,n[5]=-(i*l-s*a)/e,n}function Ga(n){return n[0]*n[3]-n[1]*n[2]}let As;function Ba(n){const t="matrix("+n.join(", ")+")";if(Kn)return t;const e=As||(As=document.createElement("div"));return e.style.transform=t,e.style.transform}function Ae(n,t,e,i,s,r){r=r||[];let o=0;for(let a=t;a<e;a+=i){const l=n[a],h=n[a+1];r[o++]=s[0]*l+s[2]*h+s[4],r[o++]=s[1]*l+s[3]*h+s[5]}return r&&r.length!=o&&(r.length=o),r}function Br(n,t,e,i,s,r,o){o=o||[];const a=Math.cos(s),l=Math.sin(s),h=r[0],c=r[1];let u=0;for(let d=t;d<e;d+=i){const f=n[d]-h,g=n[d+1]-c;o[u++]=h+f*a-g*l,o[u++]=c+f*l+g*a;for(let p=d+2;p<d+i;++p)o[u++]=n[p]}return o&&o.length!=u&&(o.length=u),o}function Na(n,t,e,i,s,r,o,a){a=a||[];const l=o[0],h=o[1];let c=0;for(let u=t;u<e;u+=i){const d=n[u]-l,f=n[u+1]-h;a[c++]=l+s*d,a[c++]=h+r*f;for(let g=u+2;g<u+i;++g)a[c++]=n[g]}return a&&a.length!=c&&(a.length=c),a}function Wa(n,t,e,i,s,r,o){o=o||[];let a=0;for(let l=t;l<e;l+=i){o[a++]=n[l]+s,o[a++]=n[l+1]+r;for(let h=l+2;h<l+i;++h)o[a++]=n[h]}return o&&o.length!=a&&(o.length=a),o}const Ls=ae();class Xa extends ce{constructor(){super(),this.extent_=Le(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Xo(function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);const s=this.clone();return s.applyTransform(i),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return tt()}closestPointXY(t,e,i,s){return tt()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return tt()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&pr(e),this.extentRevision_=this.getRevision()}return ko(this.extent_,t)}rotate(t,e){tt()}scale(t,e,i){tt()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return tt()}getType(){return tt()}applyTransform(t){tt()}intersectsExtent(t){return tt()}translate(t,e){tt()}transform(t,e){const i=He(t),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),h=i.getWorldExtent(),c=mi(h)/mi(l);return ki(Ls,h[0],h[3],c,-c,0,0,0),Ae(r,0,r.length,a,Ls,o),Rs(i,e)(r,o,a)}:Rs(i,e);return this.applyTransform(s),this}}const Ya=Xa;class za extends Ya{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Mo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return tt()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=Ts(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){tt()}setLayout(t,e,i){let s;if(t)s=Ts(t);else{for(let r=0;r<i;++r){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}s=e.length,t=Va(s)}this.layout=t,this.stride=s}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const s=this.getStride();Br(i,0,i.length,s,t,e,i),this.changed()}}scale(t,e,i){e===void 0&&(e=t),i||(i=pi(this.getExtent()));const s=this.getFlatCoordinates();if(s){const r=this.getStride();Na(s,0,s.length,r,t,e,i,s),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const s=this.getStride();Wa(i,0,i.length,s,t,e,i),this.changed()}}}function Va(n){let t;return n==2?t="XY":n==3?t="XYZ":n==4&&(t="XYZM"),t}function Ts(n){let t;return n=="XY"?t=2:n=="XYZ"||n=="XYM"?t=3:n=="XYZM"&&(t=4),t}function Za(n,t,e){const i=n.getFlatCoordinates();if(!i)return null;const s=n.getStride();return Ae(i,0,i.length,s,t,e)}const _n=za;function Ua(n,t,e,i){for(let s=0,r=e.length;s<r;++s)n[t++]=e[s];return t}function es(n,t,e,i){for(let s=0,r=e.length;s<r;++s){const o=e[s];for(let a=0;a<i;++a)n[t++]=o[a]}return t}function ja(n,t,e,i,s){s=s||[];let r=0;for(let o=0,a=e.length;o<a;++o){const l=es(n,t,e[o],i);s[r++]=l,t=l}return s.length=r,s}class is extends _n{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new is(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,s){const r=this.flatCoordinates,o=Ze(t,e,r[0],r[1]);if(o<s){const a=this.stride;for(let l=0;l<a;++l)i[l]=r[l];return i.length=a,o}return s}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return en(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return gr(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ua(this.flatCoordinates,0,t,this.stride),this.changed()}}const Ci=is,se={ADD:"add",REMOVE:"remove"},bs={LENGTH:"length"};class qi extends qe{constructor(t,e,i){super(t),this.element=e,this.index=i}}class Ha extends ce{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let i=0,s=this.array_.length;i<s;++i)this.assertUnique_(this.array_[i],i);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,s=e.length;i<s;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(bs.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new qi(se.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,s=e.length;i<s;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new qi(se.REMOVE,e,t)),e}setAt(t,e){const i=this.getLength();if(t>=i){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const s=this.array_[t];this.array_[t]=e,this.dispatchEvent(new qi(se.REMOVE,s,t)),this.dispatchEvent(new qi(se.ADD,e,t))}updateLength_(){this.set(bs.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,s=this.array_.length;i<s;++i)if(this.array_[i]===t&&i!==e)throw new fr(58)}}const Nn=Ha;function Ka(n,t,e,i,s){Nr(n,t,e||0,i||n.length-1,s||qa)}function Nr(n,t,e,i,s){for(;i>e;){if(i-e>600){var r=i-e+1,o=t-e+1,a=Math.log(r),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(r-l)/r)*(o-r/2<0?-1:1),c=Math.max(e,Math.floor(t-o*l/r+h)),u=Math.min(i,Math.floor(t+(r-o)*l/r+h));Nr(n,t,c,u,s)}var d=n[t],f=e,g=i;for(li(n,e,t),s(n[i],d)>0&&li(n,e,i);f<g;){for(li(n,f,g),f++,g--;s(n[f],d)<0;)f++;for(;s(n[g],d)>0;)g--}s(n[e],d)===0?li(n,e,g):(g++,li(n,g,i)),g<=t&&(e=g+1),t<=g&&(i=g-1)}}function li(n,t,e){var i=n[t];n[t]=n[e],n[e]=i}function qa(n,t){return n<t?-1:n>t?1:0}class Wr{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!Qi(t,e))return i;const s=this.toBBox,r=[];for(;e;){for(let o=0;o<e.children.length;o++){const a=e.children[o],l=e.leaf?s(a):a;Qi(t,l)&&(e.leaf?i.push(a):Mn(t,l)?this._all(a,i):r.push(a))}e=r.pop()}return i}collides(t){let e=this.data;if(!Qi(t,e))return!1;const i=[];for(;e;){for(let s=0;s<e.children.length;s++){const r=e.children[s],o=e.leaf?this.toBBox(r):r;if(Qi(t,o)){if(e.leaf||Mn(t,o))return!0;i.push(r)}}e=i.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let i=0;i<t.length;i++)this.insert(t[i]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const i=this.data;this.data=e,e=i}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Be([]),this}remove(t,e){if(!t)return this;let i=this.data;const s=this.toBBox(t),r=[],o=[];let a,l,h;for(;i||r.length;){if(i||(i=r.pop(),l=r[r.length-1],a=o.pop(),h=!0),i.leaf){const c=Ja(t,i.children,e);if(c!==-1)return i.children.splice(c,1),r.push(i),this._condense(r),this}!h&&!i.leaf&&Mn(i,s)?(r.push(i),o.push(a),a=0,l=i,i=i.children[0]):l?(a++,i=l.children[a],h=!1):i=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const i=[];for(;t;)t.leaf?e.push(...t.children):i.push(...t.children),t=i.pop();return e}_build(t,e,i,s){const r=i-e+1;let o=this._maxEntries,a;if(r<=o)return a=Be(t.slice(e,i+1)),Pe(a,this.toBBox),a;s||(s=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/Math.pow(o,s-1))),a=Be([]),a.leaf=!1,a.height=s;const l=Math.ceil(r/o),h=l*Math.ceil(Math.sqrt(o));Ds(t,e,i,h,this.compareMinX);for(let c=e;c<=i;c+=h){const u=Math.min(c+h-1,i);Ds(t,c,u,l,this.compareMinY);for(let d=c;d<=u;d+=l){const f=Math.min(d+l-1,u);a.children.push(this._build(t,d,f,s-1))}}return Pe(a,this.toBBox),a}_chooseSubtree(t,e,i,s){for(;s.push(e),!(e.leaf||s.length-1===i);){let r=1/0,o=1/0,a;for(let l=0;l<e.children.length;l++){const h=e.children[l],c=wn(h),u=tl(t,h)-c;u<o?(o=u,r=c<r?c:r,a=h):u===o&&c<r&&(r=c,a=h)}e=a||e.children[0]}return e}_insert(t,e,i){const s=i?t:this.toBBox(t),r=[],o=this._chooseSubtree(s,this.data,e,r);for(o.children.push(t),ui(o,s);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)}_split(t,e){const i=t[e],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const o=this._chooseSplitIndex(i,r,s),a=Be(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,Pe(i,this.toBBox),Pe(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,e){this.data=Be([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Pe(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let s,r=1/0,o=1/0;for(let a=e;a<=i-e;a++){const l=ci(t,0,a,this.toBBox),h=ci(t,a,i,this.toBBox),c=el(l,h),u=wn(l)+wn(h);c<r?(r=c,s=a,o=u<o?u:o):c===r&&u<o&&(o=u,s=a)}return s||i-e}_chooseSplitAxis(t,e,i){const s=t.leaf?this.compareMinX:Qa,r=t.leaf?this.compareMinY:$a,o=this._allDistMargin(t,e,i,s),a=this._allDistMargin(t,e,i,r);o<a&&t.children.sort(s)}_allDistMargin(t,e,i,s){t.children.sort(s);const r=this.toBBox,o=ci(t,0,e,r),a=ci(t,i-e,i,r);let l=Ji(o)+Ji(a);for(let h=e;h<i-e;h++){const c=t.children[h];ui(o,t.leaf?r(c):c),l+=Ji(o)}for(let h=i-e-1;h>=e;h--){const c=t.children[h];ui(a,t.leaf?r(c):c),l+=Ji(a)}return l}_adjustParentBBoxes(t,e,i){for(let s=i;s>=0;s--)ui(e[s],t)}_condense(t){for(let e=t.length-1,i;e>=0;e--)t[e].children.length===0?e>0?(i=t[e-1].children,i.splice(i.indexOf(t[e]),1)):this.clear():Pe(t[e],this.toBBox)}}function Ja(n,t,e){if(!e)return t.indexOf(n);for(let i=0;i<t.length;i++)if(e(n,t[i]))return i;return-1}function Pe(n,t){ci(n,0,n.children.length,t,n)}function ci(n,t,e,i,s){s||(s=Be(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r=t;r<e;r++){const o=n.children[r];ui(s,n.leaf?i(o):o)}return s}function ui(n,t){return n.minX=Math.min(n.minX,t.minX),n.minY=Math.min(n.minY,t.minY),n.maxX=Math.max(n.maxX,t.maxX),n.maxY=Math.max(n.maxY,t.maxY),n}function Qa(n,t){return n.minX-t.minX}function $a(n,t){return n.minY-t.minY}function wn(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function Ji(n){return n.maxX-n.minX+(n.maxY-n.minY)}function tl(n,t){return(Math.max(t.maxX,n.maxX)-Math.min(t.minX,n.minX))*(Math.max(t.maxY,n.maxY)-Math.min(t.minY,n.minY))}function el(n,t){const e=Math.max(n.minX,t.minX),i=Math.max(n.minY,t.minY),s=Math.min(n.maxX,t.maxX),r=Math.min(n.maxY,t.maxY);return Math.max(0,s-e)*Math.max(0,r-i)}function Mn(n,t){return n.minX<=t.minX&&n.minY<=t.minY&&t.maxX<=n.maxX&&t.maxY<=n.maxY}function Qi(n,t){return t.minX<=n.maxX&&t.minY<=n.maxY&&t.maxX>=n.minX&&t.maxY>=n.minY}function Be(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Ds(n,t,e,i,s){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=i)continue;const o=t+Math.ceil((e-t)/i/2)*i;Ka(n,o,t,e,s),r.push(t,o,o,e)}}class il{constructor(t){this.rbush_=new Wr(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[st(e)]=i}load(t,e){const i=new Array(e.length);for(let s=0,r=e.length;s<r;s++){const o=t[s],a=e[s],l={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:a};i[s]=l,this.items_[st(a)]=l}this.rbush_.load(i)}remove(t){const e=st(t),i=this.items_[e];return delete this.items_[e],this.rbush_.remove(i)!==null}update(t,e){const i=this.items_[st(e)],s=[i.minX,i.minY,i.maxX,i.maxY];mr(s,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(s){return s.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let s=0,r=t.length;s<r;s++)if(i=e(t[s]),i)return i;return i}isEmpty(){return yi(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return je(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}const Wn=il,Rt={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function nl(n,t){return[[-1/0,-1/0,1/0,1/0]]}let sl=!1;function rl(n,t,e,i,s,r,o){const a=new XMLHttpRequest;a.open("GET",typeof n=="function"?n(e,i,s):n,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=sl,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=t.getType();let c;h=="json"||h=="text"?c=a.responseText:h=="xml"?(c=a.responseXML,c||(c=new DOMParser().parseFromString(a.responseText,"application/xml"))):h=="arraybuffer"&&(c=a.response),c?r(t.readFeatures(c,{extent:e,featureProjection:s}),t.readProjection(c)):o()}else o()},a.onerror=o,a.send()}function ks(n,t){return function(e,i,s,r,o){const a=this;rl(n,t,e,i,s,function(l,h){a.addFeatures(l),r!==void 0&&r(l)},o||xi)}}class $t extends qe{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class al extends Ma{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=xi,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(dt(this.format_,7),this.loader_=ks(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:nl;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Wn:null,this.loadedExtentsRtree_=new Wn,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,s;Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),!e&&i===void 0&&(i=new Nn(s)),s!==void 0&&this.addFeaturesInternal(s),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=st(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const s=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new $t(Rt.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[Zt(e,St.CHANGE,this.handleFeatureChange_,this),Zt(e,Fr.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let i=!0;const s=e.getId();return s!==void 0&&(s.toString()in this.idIndex_?i=!1:this.idIndex_[s.toString()]=e),i&&(dt(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],s=[];for(let r=0,o=t.length;r<o;r++){const a=t[r],l=st(a);this.addToIndex_(l,a)&&i.push(a)}for(let r=0,o=i.length;r<o;r++){const a=i[r],l=st(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const c=h.getExtent();e.push(c),s.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,s),this.hasListener(Rt.ADDFEATURE))for(let r=0,o=i.length;r<o;r++)this.dispatchEvent(new $t(Rt.ADDFEATURE,i[r]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(Rt.ADDFEATURE,function(i){e||(e=!0,t.push(i.feature),e=!1)}),this.addEventListener(Rt.REMOVEFEATURE,function(i){e||(e=!0,t.remove(i.feature),e=!1)}),t.addEventListener(se.ADD,i=>{e||(e=!0,this.addFeature(i.element),e=!1)}),t.addEventListener(se.REMOVE,i=>{e||(e=!0,this.removeFeature(i.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(Ut);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(i);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new $t(Rt.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(s){if(s.getGeometry().intersectsCoordinate(t))return e(s)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(i){if(i.getGeometry().intersectsExtent(t)){const r=e(i);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),yi(this.nullGeometryFeatures_)||jn(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(i){e.push(i)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const s=Oo(t,e);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],s=t[1];let r=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Ir,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const c=h.getGeometry(),u=a;if(a=c.closestPointXY(i,s,o,a),a<u){r=h;const d=Math.sqrt(a);l[0]=i-d,l[1]=s-d,l[2]=i+d,l[3]=s+d}}}),r}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=st(e),s=e.getGeometry();if(!s)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);else{const o=s.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(o,e)):this.featuresRtree_&&this.featuresRtree_.update(o,e)}const r=e.getId();if(r!==void 0){const o=r.toString();this.idIndex_[o]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[o]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new $t(Rt.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:st(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&yi(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,i){const s=this.loadedExtentsRtree_,r=this.strategy_(t,e,i);for(let o=0,a=r.length;o<a;++o){const l=r[o];s.forEachInExtent(l,function(c){return Xe(c.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new $t(Rt.FEATURESLOADSTART)),this.loader_.call(this,l,e,i,c=>{--this.loadingExtentsCount_,this.dispatchEvent(new $t(Rt.FEATURESLOADEND,void 0,c))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new $t(Rt.FEATURESLOADERROR))}),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,function(s){if(mr(s.extent,t))return i=s,!0}),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=st(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=st(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(Ut),delete this.featureChangeKeys_[e];const s=t.getId();return s!==void 0&&delete this.idIndex_[s.toString()],delete this.uidIndex_[e],this.dispatchEvent(new $t(Rt.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){dt(this.format_,7),this.url_=t,this.setLoader(ks(t,this.format_))}}const Xr=al,Q={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class ll extends ce{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[Q.OPACITY]=t.opacity!==void 0?t.opacity:1,dt(typeof e[Q.OPACITY]=="number",64),e[Q.VISIBLE]=t.visible!==void 0?t.visible:!0,e[Q.Z_INDEX]=t.zIndex,e[Q.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[Q.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[Q.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[Q.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},i=this.getZIndex();return e.opacity=yt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=i===void 0&&!e.managed?1/0:i,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return tt()}getLayerStatesArray(t){return tt()}getExtent(){return this.get(Q.EXTENT)}getMaxResolution(){return this.get(Q.MAX_RESOLUTION)}getMinResolution(){return this.get(Q.MIN_RESOLUTION)}getMinZoom(){return this.get(Q.MIN_ZOOM)}getMaxZoom(){return this.get(Q.MAX_ZOOM)}getOpacity(){return this.get(Q.OPACITY)}getSourceState(){return tt()}getVisible(){return this.get(Q.VISIBLE)}getZIndex(){return this.get(Q.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Q.EXTENT,t)}setMaxResolution(t){this.set(Q.MAX_RESOLUTION,t)}setMinResolution(t){this.set(Q.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(Q.MAX_ZOOM,t)}setMinZoom(t){this.set(Q.MIN_ZOOM,t)}setOpacity(t){dt(typeof t=="number",64),this.set(Q.OPACITY,t)}setVisible(t){this.set(Q.VISIBLE,t)}setZIndex(t){this.set(Q.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const hl=ll,Xn={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},At={ANIMATING:0,INTERACTING:1},Tt={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function Fs(n,t,e){return function(i,s,r,o,a){if(!i)return;if(!s&&!t)return i;const l=t?0:r[0]*s,h=t?0:r[1]*s,c=a?a[0]:0,u=a?a[1]:0;let d=n[0]+l/2+c,f=n[2]-l/2+c,g=n[1]+h/2+u,p=n[3]-h/2+u;d>f&&(d=(f+d)/2,f=d),g>p&&(g=(p+g)/2,p=g);let _=yt(i[0],d,f),x=yt(i[1],g,p);if(o&&e&&s){const v=30*s;_+=-v*Math.log(1+Math.max(0,d-i[0])/v)+v*Math.log(1+Math.max(0,i[0]-f)/v),x+=-v*Math.log(1+Math.max(0,g-i[1])/v)+v*Math.log(1+Math.max(0,i[1]-p)/v)}return[_,x]}}function cl(n){return n}function ns(n,t,e,i){const s=Lt(t)/e[0],r=mi(t)/e[1];return i?Math.min(n,Math.max(s,r)):Math.min(n,Math.min(s,r))}function ss(n,t,e){let i=Math.min(n,t);const s=50;return i*=Math.log(1+s*Math.max(0,n/t-1))/s+1,e&&(i=Math.max(i,e),i/=Math.log(1+s*Math.max(0,e/n-1))/s+1),yt(i,e/2,t*2)}function ul(n,t,e,i){return t=t!==void 0?t:!0,function(s,r,o,a){if(s!==void 0){const l=n[0],h=n[n.length-1],c=e?ns(l,e,o,i):l;if(a)return t?ss(s,c,h):yt(s,h,c);const u=Math.min(c,s),d=Math.floor(Rr(n,u,r));return n[d]>c&&d<n.length-1?n[d+1]:n[d]}}}function dl(n,t,e,i,s,r){return i=i!==void 0?i:!0,e=e!==void 0?e:0,function(o,a,l,h){if(o!==void 0){const c=s?ns(t,s,l,r):t;if(h)return i?ss(o,c,e):yt(o,e,c);const u=1e-9,d=Math.ceil(Math.log(t/c)/Math.log(n)-u),f=-a*(.5-u)+.5,g=Math.min(c,o),p=Math.floor(Math.log(t/g)/Math.log(n)+f),_=Math.max(d,p),x=t/Math.pow(n,_);return yt(x,e,c)}}}function Os(n,t,e,i,s){return e=e!==void 0?e:!0,function(r,o,a,l){if(r!==void 0){const h=i?ns(n,i,a,s):n;return!e||!l?yt(r,t,h):ss(r,h,t)}}}function fl(n){if(n!==void 0)return 0}function Ps(n){if(n!==void 0)return n}function gl(n){const t=2*Math.PI/n;return function(e,i){if(i)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function pl(n){return n=n||Me(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=n?0:t}}function Gs(n,t,e,i,s,r,o){const a=n[t],l=n[t+1],h=n[e]-a,c=n[e+1]-l;let u;if(h===0&&c===0)u=t;else{const d=((s-a)*h+(r-l)*c)/(h*h+c*c);if(d>1)u=e;else if(d>0){for(let f=0;f<i;++f)o[f]=It(n[t+f],n[e+f],d);o.length=i;return}else u=t}for(let d=0;d<i;++d)o[d]=n[u+d];o.length=i}function rs(n,t,e,i,s){let r=n[t],o=n[t+1];for(t+=i;t<e;t+=i){const a=n[t],l=n[t+1],h=Ze(r,o,a,l);h>s&&(s=h),r=a,o=l}return s}function ml(n,t,e,i,s){for(let r=0,o=e.length;r<o;++r){const a=e[r];s=rs(n,t,a,i,s),t=a}return s}function os(n,t,e,i,s,r,o,a,l,h,c){if(t==e)return h;let u,d;if(s===0){if(d=Ze(o,a,n[t],n[t+1]),d<h){for(u=0;u<i;++u)l[u]=n[t+u];return l.length=i,d}return h}c=c||[NaN,NaN];let f=t+i;for(;f<e;)if(Gs(n,f-i,f,i,o,a,c),d=Ze(o,a,c[0],c[1]),d<h){for(h=d,u=0;u<i;++u)l[u]=c[u];l.length=i,f+=i}else f+=i*Math.max((Math.sqrt(d)-Math.sqrt(h))/s|0,1);if(r&&(Gs(n,e-i,t,i,o,a,c),d=Ze(o,a,c[0],c[1]),d<h)){for(h=d,u=0;u<i;++u)l[u]=c[u];l.length=i}return h}function _l(n,t,e,i,s,r,o,a,l,h,c){c=c||[NaN,NaN];for(let u=0,d=e.length;u<d;++u){const f=e[u];h=os(n,t,f,i,s,r,o,a,l,h,c),t=f}return h}function Yr(n,t,e,i,s,r,o){const a=(e-t)/i;if(a<3){for(;t<e;t+=i)r[o++]=n[t],r[o++]=n[t+1];return o}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[t,e-i];let c=0;for(;h.length>0;){const u=h.pop(),d=h.pop();let f=0;const g=n[d],p=n[d+1],_=n[u],x=n[u+1];for(let v=d+i;v<u;v+=i){const w=n[v],k=n[v+1],T=aa(w,k,g,p,_,x);T>f&&(c=v,f=T)}f>s&&(l[(c-t)/i]=1,d+i<c&&h.push(d,c),c+i<u&&h.push(c,u))}for(let u=0;u<a;++u)l[u]&&(r[o++]=n[t+u*i],r[o++]=n[t+u*i+1]);return o}function Ce(n,t){return t*Math.round(n/t)}function xl(n,t,e,i,s,r,o){if(t==e)return o;let a=Ce(n[t],s),l=Ce(n[t+1],s);t+=i,r[o++]=a,r[o++]=l;let h,c;do if(h=Ce(n[t],s),c=Ce(n[t+1],s),t+=i,t==e)return r[o++]=h,r[o++]=c,o;while(h==a&&c==l);for(;t<e;){const u=Ce(n[t],s),d=Ce(n[t+1],s);if(t+=i,u==h&&d==c)continue;const f=h-a,g=c-l,p=u-a,_=d-l;if(f*_==g*p&&(f<0&&p<f||f==p||f>0&&p>f)&&(g<0&&_<g||g==_||g>0&&_>g)){h=u,c=d;continue}r[o++]=h,r[o++]=c,a=h,l=c,h=u,c=d}return r[o++]=h,r[o++]=c,o}function yl(n,t,e,i,s,r,o,a){for(let l=0,h=e.length;l<h;++l){const c=e[l];o=xl(n,t,c,i,s,r,o),a.push(o),t=c}return o}function Re(n,t,e,i,s){s=s!==void 0?s:[];let r=0;for(let o=t;o<e;o+=i)s[r++]=n.slice(o,o+i);return s.length=r,s}function on(n,t,e,i,s){s=s!==void 0?s:[];let r=0;for(let o=0,a=e.length;o<a;++o){const l=e[o];s[r++]=Re(n,t,l,i,s[r]),t=l}return s.length=r,s}function Bs(n,t,e,i,s){s=s!==void 0?s:[];let r=0;for(let o=0,a=e.length;o<a;++o){const l=e[o];s[r++]=l.length===1&&l[0]===t?[]:on(n,t,l,i,s[r]),t=l[l.length-1]}return s.length=r,s}function zr(n,t,e,i){let s=0,r=n[e-i],o=n[e-i+1];for(;t<e;t+=i){const a=n[t],l=n[t+1];s+=o*a-r*l,r=a,o=l}return s/2}function Sl(n,t,e,i){let s=0;for(let r=0,o=e.length;r<o;++r){const a=e[r];s+=zr(n,t,a,i),t=a}return s}class an extends _n{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new an(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,s){return s<Un(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rs(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),os(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,s))}getArea(){return zr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Re(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=Yr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new an(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=es(this.flatCoordinates,0,t,this.stride),this.changed()}}const Ns=an;function vl(n,t,e,i,s,r,o){let a,l,h,c,u,d,f;const g=s[r+1],p=[];for(let v=0,w=e.length;v<w;++v){const k=e[v];for(c=n[k-i],d=n[k-i+1],a=t;a<k;a+=i)u=n[a],f=n[a+1],(g<=d&&f<=g||d<=g&&g<=f)&&(h=(g-d)/(f-d)*(u-c)+c,p.push(h)),c=u,d=f}let _=NaN,x=-1/0;for(p.sort(_i),c=p[0],a=1,l=p.length;a<l;++a){u=p[a];const v=Math.abs(u-c);v>x&&(h=(c+u)/2,Gr(n,t,e,i,h,g)&&(_=h,x=v)),c=u}return isNaN(_)&&(_=s[r]),o?(o.push(_,g,x),o):[_,g,x]}function Cl(n,t,e,i){for(;t<e-i;){for(let s=0;s<i;++s){const r=n[t+s];n[t+s]=n[e-i+s],n[e-i+s]=r}t+=i,e-=i}}function Vr(n,t,e,i){let s=0,r=n[e-i],o=n[e-i+1];for(;t<e;t+=i){const a=n[t],l=n[t+1];s+=(a-r)*(l+o),r=a,o=l}return s===0?void 0:s>0}function El(n,t,e,i,s){s=s!==void 0?s:!1;for(let r=0,o=e.length;r<o;++r){const a=e[r],l=Vr(n,t,a,i);if(r===0){if(s&&l||!s&&!l)return!1}else if(s&&!l||!s&&l)return!1;t=a}return!0}function Ws(n,t,e,i,s){s=s!==void 0?s:!1;for(let r=0,o=e.length;r<o;++r){const a=e[r],l=Vr(n,t,a,i);(r===0?s&&l||!s&&!l:s&&!l||!s&&l)&&Cl(n,t,a,i),t=a}return t}class ln extends _n{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?jn(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new ln(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,s){return s<Un(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ml(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),_l(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,s))}containsXY(t,e){return Gr(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Sl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Ws(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,on(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=pi(this.getExtent());this.flatInteriorPoint_=vl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Ci(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Ns(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,s=[];let r=0;for(let o=0,a=i.length;o<a;++o){const l=i[o],h=new Ns(e.slice(r,l),t);s.push(h),r=l}return s}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;El(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ws(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=yl(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new ln(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return ba(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=ja(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}function Xs(n){const t=n[0],e=n[1],i=n[2],s=n[3],r=[t,e,t,s,i,s,i,e,t,e];return new ln(r,"XY",[r.length])}const An=0;class Rl extends ce{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Jn(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&_a(),t.center&&(t.center=xt(t.center,this.projection_)),t.extent&&(t.extent=ze(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in Tt)delete e[a];this.setProperties(e,!0);const i=wl(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const s=Il(t),r=i.constraint,o=Ml(t);this.constraints_={center:s,resolution:r,rotation:o},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const s=t||[0,0,0,0];e=e||[0,0,0,0];const r=this.getResolution(),o=r/2*(s[3]-e[3]+e[1]-s[1]),a=r/2*(s[0]-e[0]+e[2]-s[2]);this.setCenterInternal([i[0]+o,i[1]-a])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let i=0;i<e.length;++i){let s=arguments[i];s.center&&(s=Object.assign({},s),s.center=xt(s.center,this.getProjection())),s.anchor&&(s=Object.assign({},s),s.anchor=xt(s.anchor,this.getProjection())),e[i]=s}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,i;e>1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let s=0;for(;s<e&&!this.isDef();++s){const c=arguments[s];c.center&&this.setCenterInternal(c.center),c.zoom!==void 0?this.setZoom(c.zoom):c.resolution&&this.setResolution(c.resolution),c.rotation!==void 0&&this.setRotation(c.rotation)}if(s===e){i&&$i(i,!0);return}let r=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;s<e;++s){const c=arguments[s],u={start:r,complete:!1,anchor:c.anchor,duration:c.duration!==void 0?c.duration:1e3,easing:c.easing||Uo,callback:i};if(c.center&&(u.sourceCenter=o,u.targetCenter=c.center.slice(),o=u.targetCenter),c.zoom!==void 0?(u.sourceResolution=a,u.targetResolution=this.getResolutionForZoom(c.zoom),a=u.targetResolution):c.resolution&&(u.sourceResolution=a,u.targetResolution=c.resolution,a=u.targetResolution),c.rotation!==void 0){u.sourceRotation=l;const d=vs(c.rotation-l+Math.PI,2*Math.PI)-Math.PI;u.targetRotation=l+d,l=u.targetRotation}Al(u)?u.complete=!0:r+=u.duration,h.push(u)}this.animations_.push(h),this.setHint(At.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[At.ANIMATING]>0}getInteracting(){return this.hints_[At.INTERACTING]>0}cancelAnimations(){this.setHint(At.ANIMATING,-this.hints_[At.ANIMATING]);let t;for(let e=0,i=this.animations_.length;e<i;++e){const s=this.animations_[e];if(s[0].callback&&$i(s[0].callback,!1),!t)for(let r=0,o=s.length;r<o;++r){const a=s[r];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const s=this.animations_[i];let r=!0;for(let o=0,a=s.length;o<a;++o){const l=s[o];if(l.complete)continue;const h=t-l.start;let c=l.duration>0?h/l.duration:1;c>=1?(l.complete=!0,c=1):r=!1;const u=l.easing(c);if(l.sourceCenter){const d=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],p=l.targetCenter[1];this.nextCenter_=l.targetCenter;const _=d+u*(g-d),x=f+u*(p-f);this.targetCenter_=[_,x]}if(l.sourceResolution&&l.targetResolution){const d=u===1?l.targetResolution:l.sourceResolution+u*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const d=u===1?vs(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+u*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(r){this.animations_[i]=null,this.setHint(At.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&$i(o,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const s=this.getCenterInternal();return s!==void 0&&(i=[s[0]-e[0],s[1]-e[1]],ca(i,t-this.getRotation()),ha(i,e)),i}calculateCenterZoom(t,e){let i;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const o=e[0]-t*(e[0]-s[0])/r,a=e[1]-t*(e[1]-s[1])/r;i=[o,a]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],s=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(s*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&vi(t,this.getProjection())}getCenterInternal(){return this.get(Tt.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return Qn(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();dt(e,1);const i=this.getResolution();dt(i!==void 0,2);const s=this.getRotation();return dt(s!==void 0,3),To(e,i,s,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Tt.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(ze(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=Lt(t)/e[0],s=mi(t)/e[1];return Math.max(i,s)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(e/i)/Math.log(t);return function(r){return e/Math.pow(t,r*s)}}getRotation(){return this.get(Tt.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(i/s)/e;return function(o){return Math.log(i/o)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const o=this.getViewportSizeMinusPadding_();s=Ln(s,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,i)}return{center:s.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,i,s;if(this.resolutions_){const r=Rr(this.resolutions_,t,1);e=r,i=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=i/this.resolutions_[r+1]}else i=this.maxResolution_,s=this.zoomFactor_;return e+Math.log(i/t)/Math.log(s)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=yt(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,yt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(dt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){dt(!Do(t),25);const s=ze(t,this.getProjection());i=Xs(s)}else if(t.getType()==="Circle"){const s=ze(t.getExtent(),this.getProjection());i=Xs(s),i.rotate(this.getRotation(),pi(s))}else i=t;this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride();let a=1/0,l=1/0,h=-1/0,c=-1/0;for(let u=0,d=r.length;u<d;u+=o){const f=r[u]*i-r[u+1]*s,g=r[u]*s+r[u+1]*i;a=Math.min(a,f),l=Math.min(l,g),h=Math.max(h,f),c=Math.max(c,g)}return[a,l,h,c]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());const s=e.padding!==void 0?e.padding:[0,0,0,0],r=e.nearest!==void 0?e.nearest:!1;let o;e.minResolution!==void 0?o=e.minResolution:e.maxZoom!==void 0?o=this.getResolutionForZoom(e.maxZoom):o=0;const a=this.rotatedExtentForGeometry(t);let l=this.getResolutionForExtentInternal(a,[i[0]-s[1]-s[3],i[1]-s[0]-s[2]]);l=isNaN(l)?o:Math.max(l,o),l=this.getConstrainedResolution(l,r?0:1);const h=this.getRotation(),c=Math.sin(h),u=Math.cos(h),d=pi(a);d[0]+=(s[1]-s[3])/2*l,d[1]+=(s[0]-s[2])/2*l;const f=d[0]*u-d[1]*c,g=d[1]*u+d[0]*c,p=this.getConstrainedCenter([f,g],l),_=e.callback?e.callback:xi;e.duration!==void 0?this.animateInternal({resolution:l,center:p,duration:e.duration,easing:e.easing},_):(this.targetResolution_=l,this.targetCenter_=p,this.applyTargetState_(!1,!0),$i(_,!0))}centerOn(t,e,i){this.centerOnInternal(xt(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(Ln(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,s){let r;const o=this.padding_;if(o&&t){const a=this.getViewportSizeMinusPadding_(-i),l=Ln(t,s,[a[0]/2+o[3],a[1]/2+o[0]],e,i);r=[t[0]-l[0],t[1]-l[1]]}return r}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=vi(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&xt(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),s=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,s,i);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=xt(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),s=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(s,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&xt(t,this.getProjection()))}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,s=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(s),o=this.constraints_.resolution(this.targetResolution_,0,r,i),a=this.constraints_.center(this.targetCenter_,o,r,i,this.calculateCenterShift(this.targetCenter_,o,s,r));this.get(Tt.ROTATION)!==s&&this.set(Tt.ROTATION,s),this.get(Tt.RESOLUTION)!==o&&(this.set(Tt.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(Tt.CENTER)||!bt(this.get(Tt.CENTER),a))&&this.set(Tt.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=t!==void 0?t:200;const s=e||0,r=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(r),a=this.constraints_.resolution(this.targetResolution_,s,o),l=this.constraints_.center(this.targetCenter_,a,o,!1,this.calculateCenterShift(this.targetCenter_,a,r,o));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=r,this.targetCenter_=l,this.applyTargetState_();return}i=i||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==r||!this.getCenterInternal()||!bt(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:l,resolution:a,duration:t,easing:Zo,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(At.INTERACTING,1)}endInteraction(t,e,i){i=i&&xt(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){!this.getInteracting()||(this.setHint(At.INTERACTING,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}}function $i(n,t){setTimeout(function(){n(t)},0)}function Il(n){if(n.extent!==void 0){const e=n.smoothExtentConstraint!==void 0?n.smoothExtentConstraint:!0;return Fs(n.extent,n.constrainOnlyCenter,e)}const t=Jn(n.projection,"EPSG:3857");if(n.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Fs(e,!1,!1)}return cl}function wl(n){let t,e,i,o=n.minZoom!==void 0?n.minZoom:An,a=n.maxZoom!==void 0?n.maxZoom:28;const l=n.zoomFactor!==void 0?n.zoomFactor:2,h=n.multiWorld!==void 0?n.multiWorld:!1,c=n.smoothResolutionConstraint!==void 0?n.smoothResolutionConstraint:!0,u=n.showFullExtent!==void 0?n.showFullExtent:!1,d=Jn(n.projection,"EPSG:3857"),f=d.getExtent();let g=n.constrainOnlyCenter,p=n.extent;if(!h&&!p&&d.isGlobal()&&(g=!1,p=f),n.resolutions!==void 0){const _=n.resolutions;e=_[o],i=_[a]!==void 0?_[a]:_[_.length-1],n.constrainResolution?t=ul(_,c,!g&&p,u):t=Os(e,i,c,!g&&p,u)}else{const x=(f?Math.max(Lt(f),mi(f)):360*Mr.degrees/d.getMetersPerUnit())/Aa/Math.pow(2,An),v=x/Math.pow(2,28-An);e=n.maxResolution,e!==void 0?o=0:e=x/Math.pow(l,o),i=n.minResolution,i===void 0&&(n.maxZoom!==void 0?n.maxResolution!==void 0?i=e/Math.pow(l,a):i=x/Math.pow(l,a):i=v),a=o+Math.floor(Math.log(e/i)/Math.log(l)),i=e/Math.pow(l,a-o),n.constrainResolution?t=dl(l,e,i,c,!g&&p,u):t=Os(e,i,c,!g&&p,u)}return{constraint:t,maxResolution:e,minResolution:i,minZoom:o,zoomFactor:l}}function Ml(n){if(n.enableRotation!==void 0?n.enableRotation:!0){const e=n.constrainRotation;return e===void 0||e===!0?pl():e===!1?Ps:typeof e=="number"?gl(e):Ps}return fl}function Al(n){return!(n.sourceCenter&&n.targetCenter&&!bt(n.sourceCenter,n.targetCenter)||n.sourceResolution!==n.targetResolution||n.sourceRotation!==n.targetRotation)}function Ln(n,t,e,i,s){const r=Math.cos(-s);let o=Math.sin(-s),a=n[0]*r-n[1]*o,l=n[1]*r+n[0]*o;a+=(t[0]/2-e[0])*i,l+=(e[1]-t[1]/2)*i,o=-o;const h=a*r-l*o,c=l*r+a*o;return[h,c]}const Ys=Rl;class Ll extends hl{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(Q.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(Q.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Ut(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=Zt(t,St.CHANGE,this.handleSourceChange_,this),t.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const i=this.getMapInternal();!t&&i&&(t=i.getView()),t instanceof Ys?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let s;e.layerStatesArray?s=e.layerStatesArray.find(o=>o.layer===this):s=this.getLayerState();const r=this.getExtent();return Tl(s,e.viewState)&&(!r||Dt(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];const s=t instanceof Ys?t.getViewStateAndExtent():t;let r=e(s);return Array.isArray(r)||(r=[r]),r}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(Q.MAP,t)}getMapInternal(){return this.get(Q.MAP)}setMap(t){this.mapPrecomposeKey_&&(Ut(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Ut(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Zt(t,Xn.PRECOMPOSE,function(e){const s=e.frameState.layerStatesArray,r=this.getLayerState(!1);dt(!s.some(function(o){return o.layer===r.layer}),67),s.push(r)},this),this.mapRenderKey_=Zt(this,St.CHANGE,t.render,t),this.changed())}setSource(t){this.set(Q.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Tl(n,t){if(!n.visible)return!1;const e=t.resolution;if(e<n.minResolution||e>=n.maxResolution)return!1;const i=t.zoom;return i>n.minZoom&&i<=n.maxZoom}const bl=Ll;class Dl extends Or{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return tt()}getData(t){return null}prepareFrame(t){return tt()}renderFrame(t,e){return tt()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(s,r)=>{const o=this.loadedTileCallback.bind(this,i,s);return t.forEachLoadedTile(e,s,r,o)}}forEachFeatureAtCoordinate(t,e,i,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===ct.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=ct.LOADED&&e!=ct.ERROR&&t.addEventListener(St.CHANGE,this.boundHandleImageChange_),e==ct.IDLE&&(t.load(),e=t.getState()),e==ct.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const kl=Dl;class Fl extends qe{constructor(t,e,i,s){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=s}}const Ol=Fl,Pl=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Gl=/^([a-z]*)$|^hsla?\(.*\)$/i;function Zr(n){return typeof n=="string"?n:Ur(n)}function Bl(n){const t=document.createElement("div");if(t.style.color=n,t.style.color!==""){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}return""}const Nl=function(){const t={};let e=0;return function(i){let s;if(t.hasOwnProperty(i))s=t[i];else{if(e>=1024){let r=0;for(const o in t)(r++&3)===0&&(delete t[o],--e)}s=Wl(i),t[i]=s,++e}return s}}();function hn(n){return Array.isArray(n)?n:Nl(n)}function Wl(n){let t,e,i,s,r;if(Gl.exec(n)&&(n=Bl(n)),Pl.exec(n)){const o=n.length-1;let a;o<=4?a=1:a=2;const l=o===4||o===8;t=parseInt(n.substr(1+0*a,a),16),e=parseInt(n.substr(1+1*a,a),16),i=parseInt(n.substr(1+2*a,a),16),l?s=parseInt(n.substr(1+3*a,a),16):s=255,a==1&&(t=(t<<4)+t,e=(e<<4)+e,i=(i<<4)+i,l&&(s=(s<<4)+s)),r=[t,e,i,s/255]}else n.startsWith("rgba(")?(r=n.slice(5,-1).split(",").map(Number),zs(r)):n.startsWith("rgb(")?(r=n.slice(4,-1).split(",").map(Number),r.push(1),zs(r)):dt(!1,14);return r}function zs(n){return n[0]=yt(n[0]+.5|0,0,255),n[1]=yt(n[1]+.5|0,0,255),n[2]=yt(n[2]+.5|0,0,255),n[3]=yt(n[3],0,1),n}function Ur(n){let t=n[0];t!=(t|0)&&(t=t+.5|0);let e=n[1];e!=(e|0)&&(e=e+.5|0);let i=n[2];i!=(i|0)&&(i=i+.5|0);const s=n[3]===void 0?1:Math.round(n[3]*100)/100;return"rgba("+t+","+e+","+i+","+s+")"}const Vs=[];let Ne=null;function Xl(){Ne=kt(1,1,void 0,{willReadFrequently:!0})}class Yl extends kl{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=ae(),this.pixelTransform=ae(),this.inversePixelTransform=ae(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){Ne||Xl(),Ne.clearRect(0,0,1,1);let s;try{Ne.drawImage(t,e,i,1,1,0,0,1,1),s=Ne.getImageData(0,0,1,1).data}catch{return Ne=null,null}return s}getBackground(t){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(t.viewState.resolution)),i||void 0}useContainer(t,e,i){const s=this.getLayer().getClassName();let r,o;if(t&&t.className===s&&(!i||t&&t.style.backgroundColor&&Te(hn(t.style.backgroundColor),hn(i)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){r=document.createElement("div"),r.className=s;let a=r.style;a.position="absolute",a.width="100%",a.height="100%",o=kt();const l=o.canvas;r.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=r,this.context=o}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const s=vr(i),r=Cr(i),o=Sr(i),a=yr(i);Ct(e.coordinateToPixelTransform,s),Ct(e.coordinateToPixelTransform,r),Ct(e.coordinateToPixelTransform,o),Ct(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Ct(l,s),Ct(l,r),Ct(l,o),Ct(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,i){const s=this.getLayer();if(s.hasListener(t)){const r=new Ol(t,this.inversePixelTransform,i,e);s.dispatchEvent(r)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Xn.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Xn.POSTRENDER,t,e)}getRenderTransform(t,e,i,s,r,o,a){const l=r/2,h=o/2,c=s/e,u=-c,d=-t[0]+a,f=-t[1];return ki(this.tempTransform,l,h,c,u,-i,d,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const zl=Yl,Je="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAXCAYAAAAP6L+eAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAP2SURBVDiNjZUxbxxVEMd/M+/tru9ufcbGNrIEggIButDRIsU1EqIyBRUSUiQ6QIpSGn8D4AOQD5CGgoYuEYiSjpOgiIgIMuAoji9n+273vRmKs8+OnShMs6vVvt/MPP3nP8L/CHcEgJ2T59NiGz99FcGf/eMp8BS2DdxCWLsA3zsBbuHsnCXQZwH9SxQQBghX0eEtIjURiOxRsEcBs29DCNxG2T7rSi4C5y0PEPZR3kX4lcAS+jATVoqzMw9bfKWD7Y6xjUDmT4xrZHYgXGp7EwF0eERY6xCBgh4lLJYdyvLIYtVOirLVouhrFaDSxdgILc4LwF/Axyd3PIduA7dR1lHuEgnEx3mxDJbLbtfitPWicUJZAQlzkexRmpxCW+t4ujuh3T8mDSDLuSuQJ6A1JU1dTqZpQRa8EvcquZd4EQAKaXOTpY2FTMx1knOYTNrxZLVPC6Qwr3YPGR4R0pi4uEAxTnVValqwYN3sXkeJPTepNVhXxRfMtRDREMgARiO21G/z7hhb/APTuZTWkEGNFEZAFmPIuZwm74h7t5RQ52xLLrak6x+8Ub311XXD+yreSxY7glfdrkXyYtgokeEyEueS+B1hGV1dRsGimpcpeKUaO5qsp8vvvFRufPieFP2tmZz0ZnZDI21KPvVIbLOHyQQdXIE5eLiMLHeQjYgcjTyEjofSPBrLvWrw+fsUL356XpqiXgb3xk0KvAhYDnVwaQqEe8ilATk4nOm0aREML9688dFF6EyfaHYUcUEvj/ocPNifjeJSD6fCy4C1QPPbjZvtP999Qjr6/sLZBGRHcqEYhpPFrcV5FX+i4o0a4xgz0ewuKao0nqWxv3+4fzz84tv04M51vP15JlGbaJAJTuuWWhfJ44yv9mcFylxuV080fJ9i5P0qTtNCqHJXsV6S2FP3LngleIyvffZ2e/frX1zk2NDDmNM4F2Hc8eKQdjQZHpPOKt7E+AnnAEs2St1emFqhx4YeWsqPs+uBqT4y1Ud275sfQ9ADMx1HSUeOTi1pSxhljvHBPh5FcHdOjceGkAdjeFg/ZqVc5GiaPZSWpMhTyV5iqItLk8WKSOutNjnrpFeFhkimxlg77xXM4TKEMIDAGuHgkCIUdVGLxcnEIgWKIqdeYa6pF0Lz0EZpZUw7hDzYIs1l8lTLfAXdzYTCCKt9AtO+js0CASHjtWqmGtmDEXl1SuIKmX8x7mCX9PeE0906S8AYpYNQow9GyGofp8F3G3yjxoZ72GANYxODC3KD2b46WS/OEOcamTGJNdrhMYl1mtXXmbJOw8szm4SZVbKJsXPCuTRRF6s/vR6YmRUnnZzG1snOO7fvnrtMn5rkOSEyg/8HfCwU8ZRvPMgAAAAASUVORK5CYII=",Qe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAXCAYAAAAP6L+eAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAQBSURBVDiNjZXPa11VEMc/M+ec+16S15TEJBJRC0WQvi79A9qN4MZlBF2ICxFcunIjtAVXroq4cuNSMItuXHXTgqV/gX1KsWIRDJg0aZKb9/LuPWfGxcvPpi3O5t7DZb5zZu58v18BcEc4jBsn3p+NaziAyOT5spAj0BsI14DVg/PiMwXWcVZwbhwXeVkBPQV6Fx1AoEcEIusk1klApEccrBK5gtJHAPHr6KluT934Oso14HsCb6BrhbDcQzdH6Hw6Ttps8flAYRvjMoV7OHMYA/x5IxJ3lLsoIwKFQJeEnIsUD0O3wBihg0+LFoIUwm4BMuuUAZT+IsZVjBunxyP+E2EAYW6KuNwl1dbrhFiSZK/EPRDRZgyVUDpJ2uFQc9HQnAu7DYXMRTL/ngUXvzOZ58YOqZt63RBKV8W6ufVuFTy1nsKkt7ZEkcZFxr4v424n7lPVDTXNKXAmwJGHyNpr6PIsYbhjSdU66jatGqeLeydoSQBeQtEg+43l/diRgGbqpkevW/van7A1IvdXcQbgDuGDj4kXZwhwrkqpdM19ulicUfWe4b2pSze/cO1s2N5vLUZMqoKbZxMXw1KcsnHT+IUpjPM4n0xmrP3LsLGP1sXDWIjZvJLoneI+LegMsfNuWnrvu+6lbz7UuXdeLcVnssapjHfUvAKLC9MoNcrD4y1SHiOakF5wwTzgKYiRongS9epofdLsSnrz0x86/a/fV+ZmKvFI5WG454GIrE0hg7mTwGcpI4hLcRR/zvf0yufp7S8/wvCmnQBt750lSeQCbn/gBHEcT4oVpIBP9vVk5OHP7ZPbt8rG7UcGVAErAT/fwYc19LeOCRIBFmbxeoTHIMUtt4i2GmTfik1Wzdv7+cn9W+0/Pz5Slz0XbaJKYy7ZVAsjbLmHnbrx4AH0p7Be0jJCMoXWgu5rsaCO2+7vX+W/bv7qSFbRsakMo+ehoWNrtLGOZgKFpckOH5AE7W/hjHDCTrGsraPjKHlopnUIum2Pv/3FVJ+a6tPium257Bq6Z0lH0zNhnG0ns41xDz8gyIFW3CEyIjBFYjxbDce5G4J1JVnVZlIVXN3FUcyDNN5KY4020zNhvNnstvM17QBKH8qhIE0o7ehgldiHsNkjzets3CulUrF4qBUYTot1u5pr11zauj0/Q3skRCdAD1VuIptXUJZQHhA2OsSFWQLjWa3NAgGh4D3VQmfHNnYorVKWA4W/sRdJ56GDCHfRwTraX0TXanS5QqiQjR1kYRanxhjh9LAjwJWjn3XGTQ4dBK5ifShA3hqReZ2WJZqFtxizRDMYkVmkpSbz2UHrHM/0WYIInDDTQ4uCY+8DWDlIPOF3J9t+Xhwlv8i7ziT8D4cG+A+S3jQF4r/VqQAAAABJRU5ErkJggg==",jr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAANZSURBVDiNtZW9biRFEIC/qu6Z3dldn+VDRrJDAoIBEUB00fklSAn9DkSWH4EECTKIEJfBA2AkEgLIbpFOSBdYYOmMMMeNd3ZmuqsIdr2396NDQlxJJZVara+q668FwB3hRk637OflBL8xRZ7aL5O4gZ4inAA1wv767AHC22vA5RboFNxf7SA+Az1D56B1i1Ah7CFcrm/OMOY4P+DU2L850A30cwItYa8iUlHQUrLPaKMw4hHlxSEFM+L8HpEaAYRT5Jl0AuKOcobSEghElIjsRLKHxdLipIJFCx7FXCRna9KQSYOSD94i8QjjCON0VYObyMW/Jswh1BWRGWXTz8qQc6nmZS8eS11HImR3SeOgfZN0mFXNQM9AJnGOcUzehot/RwTiny1lyWwUQh6nZJXiozLGEvewTmLuLQ2xkOXIZYmE7vHyut8t6MkkKjJHGKzAkQfIxSE6EYJmKzTaeBysShKn2W0k5gUR3CVpCJ1mKfohBRNkt5g52thFj19d4vU9nPmqoDrfQw5KZHe8o5OJRTEvk8VK3SfmvjN675OPR4cfvetmu5rslmBTKeJE1MdtziWyEw9maD3balMg1u/AH7+i47GHYiBq6UUhXmZ8HEUrpDxi785Rtfv+9+nq52/yb1/eD+opmfchek/2nh6lQTnHONnuY2AGdNEVQ5MQ3bwQ8fJpY47uxjfu3I17H5xZ88tX5fmnP1pyvXbXafnitOrLpub/kE3EDVAkMUosOimrDIL0m5vWbaVCn/RJcohiU8QYXhzrOL8P9S5GkIyS+ixDMulVWSY3Lb0/46+fvm3Pv3ioLssQpHWkiyq9ZRkoJVNigLGPr3sZ8c8oLg4pJsKoyJMqVHmqZpMkcSruz7QbRh9UWx/SwkQX4xhbtOkulgxXLamGzBzn5DUOiHKJzy+x25k0q5ohE7oouoiu18uUn5jb45XmxwH9e2ShaYbYEq67DfR8a1+s5T8toazkLpNetYSUU+AI4xwjky6WDIQnHblZTm4tFhSLxeTWYjGV68WsatqF092G7qolcX/9/OegK/DJupLHZCryVUuiZaCi55Juo9DxJv3B7ww0pPpDEnMc1sV6YdGz8nYTec3KAZC4IrHPwP4KRk3ieF35LeDLvieB1/OZ/gOh5x9VRnDXPwAAAABJRU5ErkJggg==",Vl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAeCAYAAADQBxWhAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAJBSURBVEiJ7ZfPa9NgHMaf933j27jazTqRLq02tc0q6E4DZYfCEPwFuwzmwYPiQTz4H3gQ/wBRPHhxetB58CKIbKcNRKig11EGdutoHW6dP7aqXS2NTeKhjQSNW96tKyg+EEieNzyf9/3mG/KGwFY8kmCGmbJA+gD40TpVCKyMwWga8+9yAEAAgB0Ij1gUJ1oIchUxMWUsLD5hiEcSBDi/3cAGFXGru+sNZYaZaguwKWaYKdp8hm2TBdInQbBpYpMPhrimKr/62djgqMcIPxUBhm5c7eeaquhzhSXnYU/Ga47kZgYvDEfBdzAA4L2xoO13jZzqBwD9/cqa836uqeCaqoQf3RysFz+UAUCfzZcAAPp3ozT29K3zfkLV8F2n4TucCKgT9895nbUXFYYuPa7N5Mr29W8rrc3kyl/Gnr1GB5d2HR9Isj27A/pso4RsbzCwXrjxqVQGAN6rKsbq5/La81dZfNPrTiDgslKn7KYRaBIAQDL/4rI+V1jKn7w44TYu1EitkjC05/a1o9Hx0dMAQHycRsfvnem5c/2YSIZr964nfujgPjkZU6RISKYdMpOPaPupfycXyfg7yvsf+u9BrWpVBwDKGCFNz6w0PK8SfmUWhq9MSqFuX315pQYA8wNnH9aXP9ZEMjZVXhvYOBcDbhq6VXkqr8gHesvQ6nS2yDVVcduebKTqdLb4pzFC1fAttHZzvZEqlMDKtBEIAitDDUbT7YQajKYZSl9XaWenDIL4dgOJiSmrsPiS/HTa+AP1A194w/sdsoQRAAAAAElFTkSuQmCC";function Zs(n){return Zn({url:"equipment/contractors",method:"get",params:n})}function ve(n){return Zn({url:"equipment/districtsBlocks",method:"get",params:n})}function Tn(n){return Zn({url:"equipment/cityAndCount",method:"get",params:n})}class as{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=rn(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new as({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return tt()}getImage(t){return tt()}getHitDetectionImage(){return tt()}getPixelRatio(t){return 1}getImageState(){return tt()}getImageSize(){return tt()}getOrigin(){return tt()}getSize(){return tt()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=rn(t)}listenImageChange(t){tt()}load(){tt()}unlistenImageChange(t){tt()}}const Hr=as;function Gt(n){return Array.isArray(n)?Ur(n):n}const Zl=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),Us=["style","variant","weight","size","lineHeight","family"],Kr=function(n){const t=n.match(Zl);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=Us.length;i<s;++i){const r=t[i+1];r!==void 0&&(e[Us[i]]=r)}return e.families=e.family.split(/,\s?/),e},qr="10px sans-serif",jt="#000",cn="round",Ei=[],Ri=0,Ke="round",Ii=10,wi="#000",Mi="center",un="middle",Ie=[0,0,0,0],Ai=1,te=new ce;let We=null,Yn;const zn={},Ul=function(){const t="32px ",e=["monospace","serif"],i=e.length,s="wmytzilWMYTZIL@#/&?$%10\uF013";let r,o;function a(h,c,u){let d=!0;for(let f=0;f<i;++f){const g=e[f];if(o=dn(h+" "+c+" "+t+g,s),u!=g){const p=dn(h+" "+c+" "+t+u+","+g,s);d=d&&p!=o}}return!!d}function l(){let h=!0;const c=te.getKeys();for(let u=0,d=c.length;u<d;++u){const f=c[u];te.get(f)<100&&(a.apply(this,f.split(`
|
|
`))?(Hn(zn),We=null,Yn=void 0,te.set(f,100)):(te.set(f,te.get(f)+1,!0),h=!1))}h&&(clearInterval(r),r=void 0)}return function(h){const c=Kr(h);if(!c)return;const u=c.families;for(let d=0,f=u.length;d<f;++d){const g=u[d],p=c.style+`
|
|
`+c.weight+`
|
|
`+g;te.get(p)===void 0&&(te.set(p,100,!0),a(c.style,c.weight,g)||(te.set(p,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),jl=function(){let n;return function(t){let e=zn[t];if(e==null){if(Kn){const i=Kr(t),s=Jr(t,"\u017Dg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=t,document.body.appendChild(n),e=n.offsetHeight,document.body.removeChild(n);zn[t]=e}return e}}();function Jr(n,t){return We||(We=kt(1,1)),n!=Yn&&(We.font=n,Yn=We.font),We.measureText(t)}function dn(n,t){return Jr(n,t).width}function js(n,t,e){if(t in e)return e[t];const i=t.split(`
|
|
`).reduce((s,r)=>Math.max(s,dn(n,r)),0);return e[t]=i,i}function Hl(n,t){const e=[],i=[],s=[];let r=0,o=0,a=0,l=0;for(let h=0,c=t.length;h<=c;h+=2){const u=t[h];if(u===`
|
|
`||h===c){r=Math.max(r,o),s.push(o),o=0,a+=l;continue}const d=t[h+1]||n.font,f=dn(d,u);e.push(f),o+=f;const g=jl(d);i.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:e,heights:i,lineWidths:s}}function Kl(n,t,e,i,s,r,o,a,l,h,c){n.save(),e!==1&&(n.globalAlpha*=e),t&&n.setTransform.apply(n,t),i.contextInstructions?(n.translate(l,h),n.scale(c[0],c[1]),ql(i,n)):c[0]<0||c[1]<0?(n.translate(l,h),n.scale(c[0],c[1]),n.drawImage(i,s,r,o,a,0,0,o,a)):n.drawImage(i,s,r,o,a,l,h,o*c[0],a*c[1]),n.restore()}function ql(n,t){const e=n.contextInstructions;for(let i=0,s=e.length;i<s;i+=2)Array.isArray(e[i+1])?t[e[i]].apply(t,e[i+1]):t[e[i]]=e[i+1]}class ls extends Hr{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new ls({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const i=this.renderOptions_,s=kt(i.size*t,i.size*t);this.draw_(i,s,t),e=s.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return ct.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius_,r=this.radius2_===void 0?s:this.radius2_;if(s<r){const Y=s;s=r,r=Y}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,l=r*Math.sin(a),h=Math.sqrt(r*r-l*l),c=s-h,u=Math.sqrt(l*l+c*c),d=u/l;if(t==="miter"&&d<=i)return d*e;const f=e/2/d,g=e/2*(c/u),_=Math.sqrt((s+f)*(s+f)+g*g)-s;if(this.radius2_===void 0||t==="bevel")return _*2;const x=s*Math.sin(a),v=Math.sqrt(s*s-x*x),w=r-v,T=Math.sqrt(x*x+w*w)/x;if(T<=i){const Y=T*e/2-r-s;return 2*Math.max(_,Y)}return _*2}createRenderOptions(){let t=Ke,e=0,i=null,s=0,r,o=0;this.stroke_&&(r=this.stroke_.getColor(),r===null&&(r=wi),r=Gt(r),o=this.stroke_.getWidth(),o===void 0&&(o=Ai),i=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Ke),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Ii));const a=this.calculateLineJoinSize_(t,o,e),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:r,strokeWidth:o,size:h,lineDash:i,lineDashOffset:s,lineJoin:t,miterLimit:e}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let s=this.fill_.getColor();s===null&&(s=jt),e.fillStyle=Gt(s),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),i=0;if(typeof e=="string"&&(e=hn(e)),e===null?i=1:Array.isArray(e)&&(i=e.length===4?e[3]:1),i===0){const s=kt(t.size,t.size);this.hitDetectionCanvas_=s.canvas,this.drawHitDetectionCanvas_(t,s)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const s=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(e*=2);const r=this.angle_-Math.PI/2,o=2*Math.PI/e;for(let a=0;a<e;a++){const l=r+a*o,h=a%2===0?i:s;t.lineTo(h*Math.cos(l),h*Math.sin(l))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=jt,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const fn=ls;class hs extends fn{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new hs({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const Li=hs;class cs{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new cs({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const mt=cs;class Jl{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];(t++&3)===0&&!i.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const s=Hs(t,e,i);return s in this.cache_?this.cache_[s]:null}set(t,e,i,s){const r=Hs(t,e,i);this.cache_[r]=s,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Hs(n,t,e){const i=e?Zr(e):"null";return t+":"+n+":"+i}const Ks=new Jl;let hi=null;class Ql extends wr{constructor(t,e,i,s,r,o){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=s,this.canvas_={},this.color_=o,this.unlisten_=null,this.imageState_=r,this.size_=i,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===ct.LOADED){hi||(hi=kt(1,1,void 0,{willReadFrequently:!0})),hi.drawImage(this.image_,0,0);try{hi.getImageData(0,0,1,1),this.tainted_=!1}catch{hi=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(St.CHANGE)}handleImageError_(){this.imageState_=ct.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=ct.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=kt(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===ct.IDLE){this.image_||this.initializeImage_(),this.imageState_=ct.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=qo(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==ct.LOADED)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const s=i.getContext("2d");s.scale(t,t),s.drawImage(e,0,0),s.globalCompositeOperation="multiply",s.fillStyle=Zr(this.color_),s.fillRect(0,0,i.width/t,i.height/t),s.globalCompositeOperation="destination-in",s.drawImage(e,0,0),this.canvas_[t]=i}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function $l(n,t,e,i,s,r){let o=Ks.get(t,i,r);return o||(o=new Ql(n,t,e,i,s,r),Ks.set(t,i,r,o)),o}function qs(n,t,e,i){return e!==void 0&&i!==void 0?[e/n,i/t]:e!==void 0?e/n:i!==void 0?i/t:1}class us extends Hr{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,i=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:i,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const o=t.img!==void 0?t.img:null;this.imgSize_=t.imgSize;let a=t.src;dt(!(a!==void 0&&o),4),dt(!o||o&&this.imgSize_,5),(a===void 0||a.length===0)&&o&&(a=o.src||st(o)),dt(a!==void 0&&a.length>0,6),dt(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),69);const l=t.src!==void 0?ct.IDLE:ct.LOADED;if(this.color_=t.color!==void 0?hn(t.color):null,this.iconImage_=$l(o,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let h,c;if(t.size)[h,c]=t.size;else{const u=this.getImage(1);if(u instanceof HTMLCanvasElement||u.src&&u.complete)h=u.width,c=u.height;else{this.initialOptions_=t;const d=()=>{if(this.unlistenImageChange(d),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(qs(f[0],f[1],t.width,t.height))};this.listenImageChange(d);return}}h!==void 0&&this.setScale(qs(h,c,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new us({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=i[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==ct.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==ct.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(St.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(St.CHANGE,t)}}const Qr=us;class ds{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new ds({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const le=ds;class re{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=Js,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new re({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Js,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function th(n){let t;if(typeof n=="function")t=n;else{let e;Array.isArray(n)?e=n:(dt(typeof n.getZIndex=="function",41),e=[n]),t=function(){return e}}return t}let bn=null;function eh(n,t){if(!bn){const e=new mt({color:"rgba(255,255,255,0.4)"}),i=new le({color:"#3399CC",width:1.25});bn=[new re({image:new Li({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}return bn}function ih(){const n={},t=[255,255,255,1],e=[0,153,255,1],i=3;return n.Polygon=[new re({fill:new mt({color:[255,255,255,.5]})})],n.MultiPolygon=n.Polygon,n.LineString=[new re({stroke:new le({color:t,width:i+2})}),new re({stroke:new le({color:e,width:i})})],n.MultiLineString=n.LineString,n.Circle=n.Polygon.concat(n.LineString),n.Point=[new re({image:new Li({radius:i*2,fill:new mt({color:e}),stroke:new le({color:t,width:i/2})}),zIndex:1/0})],n.MultiPoint=n.Point,n.GeometryCollection=n.Polygon.concat(n.LineString,n.Point),n}function Js(n){return n.getGeometry()}const ne=re,nh="#333";class fs{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=rn(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new mt({color:nh}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new fs({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=rn(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const di=fs;function sh(n,t,e,i,s,r,o){let a,l;const h=(e-t)/i;if(h===1)a=t;else if(h===2)a=t,l=s;else if(h!==0){let c=n[t],u=n[t+1],d=0;const f=[0];for(let _=t+i;_<e;_+=i){const x=n[_],v=n[_+1];d+=Math.sqrt((x-c)*(x-c)+(v-u)*(v-u)),f.push(d),c=x,u=v}const g=s*d,p=No(f,g);p<0?(l=(g-f[-p-2])/(f[-p-1]-f[-p-2]),a=t+(-p-2)*i):a=t+p*i}o=o>1?o:2,r=r||new Array(o);for(let c=0;c<o;++c)r[c]=a===void 0?NaN:l===void 0?n[a+c]:It(n[a+c],n[a+i+c],l);return r}function rh(n,t,e,i,s,r){if(e==t)return null;let o;if(s<n[t+i-1])return r?(o=n.slice(t,t+i),o[i-1]=s,o):null;if(n[e-1]<s)return r?(o=n.slice(e-i,e),o[i-1]=s,o):null;if(s==n[t+i-1])return n.slice(t,t+i);let a=t/i,l=e/i;for(;a<l;){const d=a+l>>1;s<n[(d+1)*i-1]?l=d:a=d+1}const h=n[a*i-1];if(s==h)return n.slice((a-1)*i,(a-1)*i+i);const c=n[(a+1)*i-1],u=(s-h)/(c-h);o=[];for(let d=0;d<i-1;++d)o.push(It(n[(a-1)*i+d],n[a*i+d],u));return o.push(s),o}function $r(n,t,e,i){let s=n[t],r=n[t+1],o=0;for(let a=t+i;a<e;a+=i){const l=n[a],h=n[a+1];o+=Math.sqrt((l-s)*(l-s)+(h-r)*(h-r)),s=l,r=h}return o}class gn extends _n{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){this.flatCoordinates?jn(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new gn(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,s){return s<Un(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rs(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),os(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,s))}forEachSegment(t){return Pr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return Re(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return $r(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=Yr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new gn(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return $n(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=es(this.flatCoordinates,0,t,this.stride),this.changed()}}const Qs=gn;function $s(n){return new ne({fill:Ti(n,""),stroke:bi(n,""),text:oh(n),image:ah(n)})}function Ti(n,t){const e=n[t+"fill-color"];if(!!e)return new mt({color:e})}function bi(n,t){const e=n[t+"stroke-width"],i=n[t+"stroke-color"];if(!(!e&&!i))return new le({width:e,color:i,lineCap:n[t+"stroke-line-cap"],lineJoin:n[t+"stroke-line-join"],lineDash:n[t+"stroke-line-dash"],lineDashOffset:n[t+"stroke-line-dash-offset"],miterLimit:n[t+"stroke-miter-limit"]})}function oh(n){const t=n["text-value"];return t?new di({text:t,font:n["text-font"],maxAngle:n["text-max-angle"],offsetX:n["text-offset-x"],offsetY:n["text-offset-y"],overflow:n["text-overflow"],placement:n["text-placement"],repeat:n["text-repeat"],scale:n["text-scale"],rotateWithView:n["text-rotate-with-view"],rotation:n["text-rotation"],textAlign:n["text-align"],justify:n["text-justify"],textBaseline:n["text-baseline"],padding:n["text-padding"],fill:Ti(n,"text-"),backgroundFill:Ti(n,"text-background-"),stroke:bi(n,"text-"),backgroundStroke:bi(n,"text-background-")}):void 0}function ah(n){const t=n["icon-src"],e=n["icon-img"];if(t||e)return new Qr({src:t,img:e,imgSize:n["icon-img-size"],anchor:n["icon-anchor"],anchorOrigin:n["icon-anchor-origin"],anchorXUnits:n["icon-anchor-x-units"],anchorYUnits:n["icon-anchor-y-units"],color:n["icon-color"],crossOrigin:n["icon-cross-origin"],offset:n["icon-offset"],displacement:n["icon-displacement"],opacity:n["icon-opacity"],scale:n["icon-scale"],width:n["icon-width"],height:n["icon-height"],rotation:n["icon-rotation"],rotateWithView:n["icon-rotate-with-view"],size:n["icon-size"],declutterMode:n["icon-declutter-mode"]});const i=n["shape-points"];if(i){const r="shape-";return new fn({points:i,fill:Ti(n,r),stroke:bi(n,r),radius:n["shape-radius"],radius1:n["shape-radius1"],radius2:n["shape-radius2"],angle:n["shape-angle"],displacement:n["shape-displacement"],rotation:n["shape-rotation"],rotateWithView:n["shape-rotate-with-view"],scale:n["shape-scale"],declutterMode:n["shape-declutter-mode"]})}const s=n["circle-radius"];if(s){const r="circle-";return new Li({radius:s,fill:Ti(n,r),stroke:bi(n,r),displacement:n["circle-displacement"],scale:n["circle-scale"],rotation:n["circle-rotation"],rotateWithView:n["circle-rotate-with-view"],declutterMode:n["circle-declutter-mode"]})}}const tr={RENDER_ORDER:"renderOrder"};class lh extends bl{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(tr.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new Wr(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(tr.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=eh;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof ne)e=t;else if(Array.isArray(t)){const i=t.length,s=new Array(i);for(let r=0;r<i;++r){const o=t[r];o instanceof ne?s[r]=o:s[r]=$s(o)}e=s}else e=$s(t);this.style_=e,this.styleFunction_=t===null?void 0:th(this.style_),this.changed()}}const hh=lh,Fi={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},tn=[Fi.FILL],oe=[Fi.STROKE],we=[Fi.BEGIN_PATH],er=[Fi.CLOSE_PATH],X=Fi;class ch{drawCustom(t,e,i,s){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const to=ch;class uh extends to{constructor(t,e,i,s){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=s,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(i){return i*e})}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),s=this.tmpCoordinate_,r=this.coordinates;let o=r.length;for(let a=0,l=t.length;a<l;a+=e)s[0]=t[a],s[1]=t[a+1],wo(i,s)&&(r[o++]=s[0],r[o++]=s[1]);return o}appendFlatLineCoordinates(t,e,i,s,r,o){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();o&&(e+=s);let c=t[e],u=t[e+1];const d=this.tmpCoordinate_;let f=!0,g,p,_;for(g=e+s;g<i;g+=s)d[0]=t[g],d[1]=t[g+1],_=Pn(h,d),_!==p?(f&&(a[l++]=c,a[l++]=u,f=!1),a[l++]=d[0],a[l++]=d[1]):_===_t.INTERSECTING?(a[l++]=d[0],a[l++]=d[1],f=!1):f=!0,c=d[0],u=d[1],p=_;return(r&&f||g===e+s)&&(a[l++]=c,a[l++]=u),l}drawCustomCoordinates_(t,e,i,s,r){for(let o=0,a=i.length;o<a;++o){const l=i[o],h=this.appendFlatLineCoordinates(t,e,l,s,!1,!1);r.push(h),e=l}return e}drawCustom(t,e,i,s){this.beginGeometry(t,e);const r=t.getType(),o=t.getStride(),a=this.coordinates.length;let l,h,c,u,d;switch(r){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),u=[];const f=t.getEndss();d=0;for(let g=0,p=f.length;g<p;++g){const _=[];d=this.drawCustomCoordinates_(l,d,f[g],o,_),u.push(_)}this.instructions.push([X.CUSTOM,a,u,t,i,Bs]),this.hitDetectionInstructions.push([X.CUSTOM,a,u,t,s||i,Bs]);break;case"Polygon":case"MultiLineString":c=[],l=r=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),d=this.drawCustomCoordinates_(l,0,t.getEnds(),o,c),this.instructions.push([X.CUSTOM,a,c,t,i,on]),this.hitDetectionInstructions.push([X.CUSTOM,a,c,t,s||i,on]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,o,!1,!1),this.instructions.push([X.CUSTOM,a,h,t,i,Re]),this.hitDetectionInstructions.push([X.CUSTOM,a,h,t,s||i,Re]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,o),h>a&&(this.instructions.push([X.CUSTOM,a,h,t,i,Re]),this.hitDetectionInstructions.push([X.CUSTOM,a,h,t,s||i,Re]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([X.CUSTOM,a,h,t,i]),this.hitDetectionInstructions.push([X.CUSTOM,a,h,t,s||i]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[X.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[X.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const i=t.length;let s,r,o=-1;for(e=0;e<i;++e)s=t[e],r=s[0],r==X.END_GEOMETRY?o=e:r==X.BEGIN_GEOMETRY&&(s[2]=e,Wo(this.hitDetectionInstructions,o,e),o=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const s=t.getColor();i.fillStyle=Gt(s||jt)}else i.fillStyle=void 0;if(e){const s=e.getColor();i.strokeStyle=Gt(s||wi);const r=e.getLineCap();i.lineCap=r!==void 0?r:cn;const o=e.getLineDash();i.lineDash=o?o.slice():Ei;const a=e.getLineDashOffset();i.lineDashOffset=a||Ri;const l=e.getLineJoin();i.lineJoin=l!==void 0?l:Ke;const h=e.getWidth();i.lineWidth=h!==void 0?h:Ai;const c=e.getMiterLimit();i.miterLimit=c!==void 0?c:Ii,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[X.SET_FILL_STYLE,e];return typeof e!="string"&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[X.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,s=t.lineCap,r=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=s||r!=t.currentLineDash&&!Te(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(i!==void 0&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[X.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Io(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;pn(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Oi=uh;class dh extends Oi{constructor(t,e,i,s){super(t,e,i,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),s=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,s);this.instructions.push([X.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([X.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),s=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,s);this.instructions.push([X.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([X.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),s=t.getSize(),r=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=s[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=s[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const fh=dh;class gh extends Oi{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinates_(t,e,i,s){const r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,s,!1,!1),a=[X.MOVE_TO_LINE_TO,r,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i}drawLineString(t,e){const i=this.state,s=i.strokeStyle,r=i.lineWidth;if(s===void 0||r===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([X.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Ei,Ri],we);const o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(oe),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,s=i.strokeStyle,r=i.lineWidth;if(s===void 0||r===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([X.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],we);const o=t.getEnds(),a=t.getFlatCoordinates(),l=t.getStride();let h=0;for(let c=0,u=o.length;c<u;++c)h=this.drawFlatCoordinates_(a,h,o[c],l);this.hitDetectionInstructions.push(oe),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(oe),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(oe),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(we)}}const ph=gh;class mh extends Oi{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinatess_(t,e,i,s){const r=this.state,o=r.fillStyle!==void 0,a=r.strokeStyle!==void 0,l=i.length;this.instructions.push(we),this.hitDetectionInstructions.push(we);for(let h=0;h<l;++h){const c=i[h],u=this.coordinates.length,d=this.appendFlatLineCoordinates(t,e,c,s,!0,!a),f=[X.MOVE_TO_LINE_TO,u,d];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(er),this.hitDetectionInstructions.push(er)),e=c}return o&&(this.instructions.push(tn),this.hitDetectionInstructions.push(tn)),a&&(this.instructions.push(oe),this.hitDetectionInstructions.push(oe)),e}drawCircle(t,e){const i=this.state,s=i.fillStyle,r=i.strokeStyle;if(s===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([X.SET_FILL_STYLE,jt]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([X.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=t.getFlatCoordinates(),a=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,a,!1,!1);const h=[X.CIRCLE,l];this.instructions.push(we,h),this.hitDetectionInstructions.push(we,h),i.fillStyle!==void 0&&(this.instructions.push(tn),this.hitDetectionInstructions.push(tn)),i.strokeStyle!==void 0&&(this.instructions.push(oe),this.hitDetectionInstructions.push(oe)),this.endGeometry(e)}drawPolygon(t,e){const i=this.state,s=i.fillStyle,r=i.strokeStyle;if(s===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([X.SET_FILL_STYLE,jt]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([X.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=t.getEnds(),a=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(a,0,o,l),this.endGeometry(e)}drawMultiPolygon(t,e){const i=this.state,s=i.fillStyle,r=i.strokeStyle;if(s===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([X.SET_FILL_STYLE,jt]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([X.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=t.getEndss(),a=t.getOrientedFlatCoordinates(),l=t.getStride();let h=0;for(let c=0,u=o.length;c<u;++c)h=this.drawFlatCoordinatess_(a,h,o[c],l);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let i=0,s=e.length;i<s;++i)e[i]=Ce(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const ir=mh;function _h(n,t,e,i,s){const r=[];let o=e,a=0,l=t.slice(e,2);for(;a<n&&o+s<i;){const[h,c]=l.slice(-2),u=t[o+s],d=t[o+s+1],f=Math.sqrt((u-h)*(u-h)+(d-c)*(d-c));if(a+=f,a>=n){const g=(n-a+f)/f,p=It(h,u,g),_=It(c,d,g);l.push(p,_),r.push(l),l=[p,_],a==n&&(o+=s),a=0}else if(a<n)l.push(t[o+s],t[o+s+1]),o+=s;else{const g=f-a,p=It(h,u,g/f),_=It(c,d,g/f);l.push(p,_),r.push(l),l=[p,_],a=0,o+=s}}return a>0&&r.push(l),r}function xh(n,t,e,i,s){let r=e,o=e,a=0,l=0,h=e,c,u,d,f,g,p,_,x,v,w;for(u=e;u<i;u+=s){const k=t[u],T=t[u+1];g!==void 0&&(v=k-g,w=T-p,f=Math.sqrt(v*v+w*w),_!==void 0&&(l+=d,c=Math.acos((_*v+x*w)/(d*f)),c>n&&(l>a&&(a=l,r=h,o=u),l=0,h=u-s)),d=f,_=v,x=w),g=k,p=T}return l+=f,l>a?[h,u]:[r,o]}const fi={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class yh extends Oi{constructor(t,e,i,s){super(t,e,i,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const i=this.textFillState_,s=this.textStrokeState_,r=this.textState_;if(this.text_===""||!r||!i&&!s)return;const o=this.coordinates;let a=o.length;const l=t.getType();let h=null,c=t.getStride();if(r.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!Dt(this.getBufferedMaxExtent(),t.getExtent()))return;let u;if(h=t.getFlatCoordinates(),l=="LineString")u=[h.length];else if(l=="MultiLineString")u=t.getEnds();else if(l=="Polygon")u=t.getEnds().slice(0,1);else if(l=="MultiPolygon"){const p=t.getEndss();u=[];for(let _=0,x=p.length;_<x;++_)u.push(p[_][0])}this.beginGeometry(t,e);const d=r.repeat,f=d?void 0:r.textAlign;let g=0;for(let p=0,_=u.length;p<_;++p){let x;d?x=_h(d*this.resolution,h,g,u[p],c):x=[h.slice(g,u[p])];for(let v=0,w=x.length;v<w;++v){const k=x[v];let T=0,Y=k.length;if(f==null){const W=xh(r.maxAngle,k,0,k.length,2);T=W[0],Y=W[1]}for(let W=T;W<Y;W+=c)o.push(k[W],k[W+1]);const Z=o.length;g=u[p],this.drawChars_(a,Z),a=Z}}this.endGeometry(e)}else{let u=r.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),c=2;break;case"Polygon":h=t.getFlatInteriorPoint(),r.overflow||u.push(h[2]/this.resolution),c=3;break;case"MultiPolygon":const _=t.getFlatInteriorPoints();h=[];for(let x=0,v=_.length;x<v;x+=3)r.overflow||u.push(_[x+2]/this.resolution),h.push(_[x],_[x+1]);if(h.length===0)return;c=2;break}const d=this.appendFlatPointCoordinates(h,c);if(d===a)return;if(u&&(d-a)/2!==h.length/c){let _=a/2;u=u.filter((x,v)=>{const w=o[(_+v)*2]===h[v*c]&&o[(_+v)*2+1]===h[v*c+1];return w||--_,w})}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let f=r.padding;if(f!=Ie&&(r.scale[0]<0||r.scale[1]<0)){let _=r.padding[0],x=r.padding[1],v=r.padding[2],w=r.padding[3];r.scale[0]<0&&(x=-x,w=-w),r.scale[1]<0&&(_=-_,v=-v),f=[_,x,v,w]}const g=this.pixelRatio;this.instructions.push([X.DRAW_IMAGE,a,d,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==Ie?Ie:f.map(function(_){return _*g}),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]);const p=1/g;this.hitDetectionInstructions.push([X.DRAW_IMAGE,a,d,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[p,p],NaN,void 0,this.declutterImageWithText_,f,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||Mi,justify:e.justify,textBaseline:e.textBaseline||un,scale:e.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=fi[s.textBaseline],c=this.textOffsetY_*l,u=this.text_,d=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([X.DRAW_CHARS,t,e,h,s.overflow,a,s.maxAngle,l,c,r,d*l,u,o,1]),this.hitDetectionInstructions.push([X.DRAW_CHARS,t,e,h,s.overflow,a,s.maxAngle,1,c,r,d,u,o,1/l])}setTextStyle(t,e){let i,s,r;if(!t)this.text_="";else{const o=t.getFill();o?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=Gt(o.getColor()||jt)):(s=null,this.textFillState_=s);const a=t.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const g=a.getLineDash(),p=a.getLineDashOffset(),_=a.getWidth(),x=a.getMiterLimit();r.lineCap=a.getLineCap()||cn,r.lineDash=g?g.slice():Ei,r.lineDashOffset=p===void 0?Ri:p,r.lineJoin=a.getLineJoin()||Ke,r.lineWidth=_===void 0?Ai:_,r.miterLimit=x===void 0?Ii:x,r.strokeStyle=Gt(a.getColor()||wi)}i=this.textState_;const l=t.getFont()||qr;Ul(l);const h=t.getScaleArray();i.overflow=t.getOverflow(),i.font=l,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||un,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Ie,i.scale=h===void 0?[1,1]:h;const c=t.getOffsetX(),u=t.getOffsetY(),d=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=d===void 0?!1:d,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:st(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=s?typeof s.fillStyle=="string"?s.fillStyle:"|"+st(s.fillStyle):""}this.declutterImageWithText_=e}}const Sh={Circle:ir,Default:Oi,Image:fh,LineString:ph,Polygon:ir,Text:yh};class vh{constructor(t,e,i,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const s in i){const r=i[s].finish();t[e][s]=r}}return t}getBuilder(t,e){const i=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[i];s===void 0&&(s={},this.buildersByZIndex_[i]=s);let r=s[e];if(r===void 0){const o=Sh[e];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}const nr=vh;function Ch(n,t,e,i,s,r,o,a,l,h,c,u){let d=n[t],f=n[t+1],g=0,p=0,_=0,x=0;function v(){g=d,p=f,t+=i,d=n[t],f=n[t+1],x+=_,_=Math.sqrt((d-g)*(d-g)+(f-p)*(f-p))}do v();while(t<e-i&&x+_<r);let w=_===0?0:(r-x)/_;const k=It(g,d,w),T=It(p,f,w),Y=t-i,Z=x,W=r+a*l(h,s,c);for(;t<e-i&&x+_<W;)v();w=_===0?0:(W-x)/_;const y=It(g,d,w),j=It(p,f,w);let it;if(u){const P=[k,T,y,j];Br(P,0,4,2,u,P,P),it=P[0]>P[2]}else it=k>y;const J=Math.PI,U=[],K=Y+i===t;t=Y,_=0,x=Z,d=n[t],f=n[t+1];let N;if(K){v(),N=Math.atan2(f-p,d-g),it&&(N+=N>0?-J:J);const P=(y+k)/2,E=(j+T)/2;return U[0]=[P,E,(W-r)/2,N,s],U}s=s.replace(/\n/g," ");for(let P=0,E=s.length;P<E;){v();let V=Math.atan2(f-p,d-g);if(it&&(V+=V>0?-J:J),N!==void 0){let vt=V-N;if(vt+=vt>J?-2*J:vt<-J?2*J:0,Math.abs(vt)>o)return null}N=V;const ht=P;let ot=0;for(;P<E;++P){const vt=it?E-P-1:P,Bt=a*l(h,s[vt],c);if(t+i<e&&x+_<r+ot+Bt/2)break;ot+=Bt}if(P===ht)continue;const Mt=it?s.substring(E-ht,E-P):s.substring(ht,P);w=_===0?0:(r+ot/2-x)/_;const M=It(g,d,w),Pi=It(p,f,w);U.push([M,Pi,ot/2,V,Mt]),r+=ot}return U}const Ge=Le(),ee=[],Yt=[],zt=[],ie=[];function sr(n){return n[3].declutterBox}const Eh=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function rr(n,t){return(t==="start"||t==="end")&&!Eh.test(n)&&(t=t==="start"?"left":"right"),fi[t]}function Rh(n,t,e){return e>0&&n.push(`
|
|
`,""),n.push(t,""),n}class Ih{constructor(t,e,i,s){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=ae(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,i,s){const r=t+e+i+s;if(this.labels_[r])return this.labels_[r];const o=s?this.strokeStates[s]:null,a=i?this.fillStates[i]:null,l=this.textStates[e],h=this.pixelRatio,c=[l.scale[0]*h,l.scale[1]*h],u=Array.isArray(t),d=l.justify?fi[l.justify]:rr(Array.isArray(t)?t[0]:t,l.textAlign||Mi),f=s&&o.lineWidth?o.lineWidth:0,g=u?t:t.split(`
|
|
`).reduce(Rh,[]),{width:p,height:_,widths:x,heights:v,lineWidths:w}=Hl(l,g),k=p+f,T=[],Y=(k+2)*c[0],Z=(_+f)*c[1],W={width:Y<0?Math.floor(Y):Math.ceil(Y),height:Z<0?Math.floor(Z):Math.ceil(Z),contextInstructions:T};(c[0]!=1||c[1]!=1)&&T.push("scale",c),s&&(T.push("strokeStyle",o.strokeStyle),T.push("lineWidth",f),T.push("lineCap",o.lineCap),T.push("lineJoin",o.lineJoin),T.push("miterLimit",o.miterLimit),T.push("setLineDash",[o.lineDash]),T.push("lineDashOffset",o.lineDashOffset)),i&&T.push("fillStyle",a.fillStyle),T.push("textBaseline","middle"),T.push("textAlign","center");const y=.5-d;let j=d*k+y*f;const it=[],J=[];let U=0,K=0,N=0,P=0,E;for(let V=0,ht=g.length;V<ht;V+=2){const ot=g[V];if(ot===`
|
|
`){K+=U,U=0,j=d*k+y*f,++P;continue}const Mt=g[V+1]||l.font;Mt!==E&&(s&&it.push("font",Mt),i&&J.push("font",Mt),E=Mt),U=Math.max(U,v[N]);const M=[ot,j+y*x[N]+d*(x[N]-w[P]),.5*(f+U)+K];j+=x[N],s&&it.push("strokeText",M),i&&J.push("fillText",M),++N}return Array.prototype.push.apply(T,it),Array.prototype.push.apply(T,J),this.labels_[r]=W,W}replayTextBackground_(t,e,i,s,r,o,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,s),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,s,r,o,a,l,h,c,u,d,f,g,p,_){a*=d[0],l*=d[1];let x=i-a,v=s-l;const w=r+h>t?t-h:r,k=o+c>e?e-c:o,T=g[3]+w*d[0]+g[1],Y=g[0]+k*d[1]+g[2],Z=x-g[3],W=v-g[0];(p||u!==0)&&(ee[0]=Z,ie[0]=Z,ee[1]=W,Yt[1]=W,Yt[0]=Z+T,zt[0]=Yt[0],zt[1]=W+Y,ie[1]=zt[1]);let y;return u!==0?(y=ki(ae(),i,s,1,1,u,-i,-s),Ct(y,ee),Ct(y,Yt),Ct(y,zt),Ct(y,ie),je(Math.min(ee[0],Yt[0],zt[0],ie[0]),Math.min(ee[1],Yt[1],zt[1],ie[1]),Math.max(ee[0],Yt[0],zt[0],ie[0]),Math.max(ee[1],Yt[1],zt[1],ie[1]),Ge)):je(Math.min(Z,Z+T),Math.min(W,W+Y),Math.max(Z,Z+T),Math.max(W,W+Y),Ge),f&&(x=Math.round(x),v=Math.round(v)),{drawImageX:x,drawImageY:v,drawImageW:w,drawImageH:k,originX:h,originY:c,declutterBox:{minX:Ge[0],minY:Ge[1],maxX:Ge[2],maxY:Ge[3],value:_},canvasTransform:y,scale:d}}replayImageOrLabel_(t,e,i,s,r,o,a){const l=!!(o||a),h=s.declutterBox,c=t.canvas,u=a?a[2]*s.scale[0]/2:0;return h.minX-u<=c.width/e&&h.maxX+u>=0&&h.minY-u<=c.height/e&&h.maxY+u>=0&&(l&&this.replayTextBackground_(t,ee,Yt,zt,ie,o,a),Kl(t,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){if(this.alignFill_){const e=Ct(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,s){const r=this.textStates[e],o=this.createLabel(t,e,s,i),a=this.strokeStates[i],l=this.pixelRatio,h=rr(Array.isArray(t)?t[0]:t,r.textAlign||Mi),c=fi[r.textBaseline||un],u=a&&a.lineWidth?a.lineWidth:0,d=o.width/l-2*r.scale[0],f=h*d+2*(.5-h)*u,g=c*o.height/l+2*(.5-c)*u;return{label:o,anchorX:f,anchorY:g}}execute_(t,e,i,s,r,o,a,l){let h;this.pixelCoordinates_&&Te(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Ae(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Fa(this.renderedTransform_,i));let c=0;const u=s.length;let d=0,f,g,p,_,x,v,w,k,T,Y,Z,W,y=0,j=0,it=null,J=null;const U=this.coordinateCache_,K=this.viewRotation_,N=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,P={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:K},E=this.instructions!=s||this.overlaps?0:200;let V,ht,ot,Mt;for(;c<u;){const M=s[c];switch(M[0]){case X.BEGIN_GEOMETRY:V=M[1],Mt=M[3],V.getGeometry()?a!==void 0&&!Dt(a,Mt.getExtent())?c=M[2]+1:++c:c=M[2];break;case X.BEGIN_PATH:y>E&&(this.fill_(t),y=0),j>E&&(t.stroke(),j=0),!y&&!j&&(t.beginPath(),_=NaN,x=NaN),++c;break;case X.CIRCLE:d=M[1];const vt=h[d],Bt=h[d+1],be=h[d+2],xn=h[d+3],Gi=be-vt,Bi=xn-Bt,De=Math.sqrt(Gi*Gi+Bi*Bi);t.moveTo(vt+De,Bt),t.arc(vt,Bt,De,0,2*Math.PI,!0),++c;break;case X.CLOSE_PATH:t.closePath(),++c;break;case X.CUSTOM:d=M[1],f=M[2];const Ni=M[3],yn=M[4],Wi=M.length==6?M[5]:void 0;P.geometry=Ni,P.feature=V,c in U||(U[c]=[]);const ue=U[c];Wi?Wi(h,d,f,2,ue):(ue[0]=h[d],ue[1]=h[d+1],ue.length=2),yn(ue,P),++c;break;case X.DRAW_IMAGE:d=M[1],f=M[2],k=M[3],g=M[4],p=M[5];let de=M[6];const Sn=M[7],vn=M[8],Ht=M[9],Xi=M[10];let $e=M[11];const Cn=M[12];let ke=M[13];const Ft=M[14],fe=M[15];if(!k&&M.length>=20){T=M[19],Y=M[20],Z=M[21],W=M[22];const S=this.drawLabelWithPointPlacement_(T,Y,Z,W);k=S.label,M[3]=k;const m=M[23];g=(S.anchorX-m)*this.pixelRatio,M[4]=g;const I=M[24];p=(S.anchorY-I)*this.pixelRatio,M[5]=p,de=k.height,M[6]=de,ke=k.width,M[13]=ke}let ti;M.length>25&&(ti=M[25]);let ei,ge,Kt;M.length>17?(ei=M[16],ge=M[17],Kt=M[18]):(ei=Ie,ge=!1,Kt=!1),Xi&&N?$e+=K:!Xi&&!N&&($e-=K);let pe=0;for(;d<f;d+=2){if(ti&&ti[pe++]<ke/this.pixelRatio)continue;const S=this.calculateImageOrLabelDimensions_(k.width,k.height,h[d],h[d+1],ke,de,g,p,vn,Ht,$e,Cn,r,ei,ge||Kt,V),m=[t,e,k,S,Sn,ge?it:null,Kt?J:null];if(l){if(Ft==="none")continue;if(Ft==="obstacle"){l.insert(S.declutterBox);continue}else{let I,R;if(fe){const L=f-d;if(!fe[L]){fe[L]=m;continue}if(I=fe[L],delete fe[L],R=sr(I),l.collides(R))continue}if(l.collides(S.declutterBox))continue;I&&(l.insert(R),this.replayImageOrLabel_.apply(this,I)),l.insert(S.declutterBox)}}this.replayImageOrLabel_.apply(this,m)}++c;break;case X.DRAW_CHARS:const ii=M[1],Ot=M[2],Nt=M[3],me=M[4];W=M[5];const ni=M[6],Yi=M[7],zi=M[8];Z=M[9];const si=M[10];T=M[11],Y=M[12];const ri=[M[13],M[13]],_e=this.textStates[Y],qt=_e.font,xe=[_e.scale[0]*Yi,_e.scale[1]*Yi];let Jt;qt in this.widths_?Jt=this.widths_[qt]:(Jt={},this.widths_[qt]=Jt);const oi=$r(h,ii,Ot,2),Vi=Math.abs(xe[0])*js(qt,T,Jt);if(me||Vi<=oi){const S=this.textStates[Y].textAlign,m=(oi-Vi)*fi[S],I=Ch(h,ii,Ot,2,T,m,ni,Math.abs(xe[0]),js,qt,Jt,N?0:this.viewRotation_);t:if(I){const R=[];let L,O,G,A,B;if(Z)for(L=0,O=I.length;L<O;++L){B=I[L],G=B[4],A=this.createLabel(G,Y,"",Z),g=B[2]+(xe[0]<0?-si:si),p=Nt*A.height+(.5-Nt)*2*si*xe[1]/xe[0]-zi;const H=this.calculateImageOrLabelDimensions_(A.width,A.height,B[0],B[1],A.width,A.height,g,p,0,0,B[3],ri,!1,Ie,!1,V);if(l&&l.collides(H.declutterBox))break t;R.push([t,e,A,H,1,null,null])}if(W)for(L=0,O=I.length;L<O;++L){B=I[L],G=B[4],A=this.createLabel(G,Y,W,""),g=B[2],p=Nt*A.height-zi;const H=this.calculateImageOrLabelDimensions_(A.width,A.height,B[0],B[1],A.width,A.height,g,p,0,0,B[3],ri,!1,Ie,!1,V);if(l&&l.collides(H.declutterBox))break t;R.push([t,e,A,H,1,null,null])}l&&l.load(R.map(sr));for(let H=0,ft=R.length;H<ft;++H)this.replayImageOrLabel_.apply(this,R[H])}}++c;break;case X.END_GEOMETRY:if(o!==void 0){V=M[1];const S=o(V,Mt);if(S)return S}++c;break;case X.FILL:E?y++:this.fill_(t),++c;break;case X.MOVE_TO_LINE_TO:for(d=M[1],f=M[2],ht=h[d],ot=h[d+1],v=ht+.5|0,w=ot+.5|0,(v!==_||w!==x)&&(t.moveTo(ht,ot),_=v,x=w),d+=2;d<f;d+=2)ht=h[d],ot=h[d+1],v=ht+.5|0,w=ot+.5|0,(d==f-2||v!==_||w!==x)&&(t.lineTo(ht,ot),_=v,x=w);++c;break;case X.SET_FILL_STYLE:it=M,this.alignFill_=M[2],y&&(this.fill_(t),y=0,j&&(t.stroke(),j=0)),t.fillStyle=M[1],++c;break;case X.SET_STROKE_STYLE:J=M,j&&(t.stroke(),j=0),this.setStrokeStyle_(t,M),++c;break;case X.STROKE:E?j++:t.stroke(),++c;break;default:++c;break}}y&&this.fill_(t),j&&t.stroke()}execute(t,e,i,s,r,o){this.viewRotation_=s,this.execute_(t,e,i,this.instructions,r,void 0,void 0,o)}executeHitDetection(t,e,i,s,r){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,s,r)}}const wh=Ih,Dn=["Polygon","Circle","LineString","Image","Text","Default"];class Mh{constructor(t,e,i,s,r,o){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=ae(),this.createExecutors_(r)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t){for(const e in t){let i=this.executorsByZIndex_[e];i===void 0&&(i={},this.executorsByZIndex_[e]=i);const s=t[e];for(const r in s){const o=s[r];i[r]=new wh(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let s=0,r=t.length;s<r;++s)if(t[s]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,s,r,o){s=Math.round(s);const a=s*2+1,l=ki(this.hitDetectionTransform_,s+.5,s+.5,1/e,-1/e,-i,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=kt(a,a,void 0,{willReadFrequently:!0}));const c=this.hitDetectionContext_;c.canvas.width!==a||c.canvas.height!==a?(c.canvas.width=a,c.canvas.height=a):h||c.clearRect(0,0,a,a);let u;this.renderBuffer_!==void 0&&(u=Le(),_r(u,t),pn(u,e*(this.renderBuffer_+s),u));const d=Ah(s);let f;function g(T,Y){const Z=c.getImageData(0,0,a,a).data;for(let W=0,y=d.length;W<y;W++)if(Z[d[W]]>0){if(!o||f!=="Image"&&f!=="Text"||o.includes(T)){const j=(d[W]-3)/4,it=s-j%a,J=s-(j/a|0),U=r(T,Y,it*it+J*J);if(U)return U}c.clearRect(0,0,a,a);break}}const p=Object.keys(this.executorsByZIndex_).map(Number);p.sort(_i);let _,x,v,w,k;for(_=p.length-1;_>=0;--_){const T=p[_].toString();for(v=this.executorsByZIndex_[T],x=Dn.length-1;x>=0;--x)if(f=Dn[x],w=v[f],w!==void 0&&(k=w.executeHitDetection(c,l,i,g,u),k))return k}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],s=e[1],r=e[2],o=e[3],a=[i,s,i,o,r,o,r,s];return Ae(a,0,8,2,t,a),a}isEmpty(){return yi(this.executorsByZIndex_)}execute(t,e,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(_i),this.maxExtent_&&(t.save(),this.clip(t,i)),o=o||Dn;let h,c,u,d,f,g;for(a&&l.reverse(),h=0,c=l.length;h<c;++h){const p=l[h].toString();for(f=this.executorsByZIndex_[p],u=0,d=o.length;u<d;++u){const _=o[u];g=f[_],g!==void 0&&g.execute(t,e,i,s,r,a)}}this.maxExtent_&&t.restore()}}const kn={};function Ah(n){if(kn[n]!==void 0)return kn[n];const t=n*2+1,e=n*n,i=new Array(e+1);for(let r=0;r<=n;++r)for(let o=0;o<=n;++o){const a=r*r+o*o;if(a>e)break;let l=i[a];l||(l=[],i[a]=l),l.push(((n+r)*t+(n+o))*4+3),r>0&&l.push(((n-r)*t+(n+o))*4+3),o>0&&(l.push(((n+r)*t+(n-o))*4+3),r>0&&l.push(((n-r)*t+(n-o))*4+3))}const s=[];for(let r=0,o=i.length;r<o;++r)i[r]&&s.push(...i[r]);return kn[n]=s,s}const or=Mh;class Lh extends to{constructor(t,e,i,s,r,o,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=s,this.transformRotation_=s?la(Math.atan2(s[1],s[0]),10):0,this.viewRotation_=r,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=ae()}drawImages_(t,e,i,s){if(!this.image_)return;const r=Ae(t,e,i,s,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;this.imageOpacity_!=1&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;this.transformRotation_===0&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let c=0,u=r.length;c<u;c+=2){const d=r[c]-this.imageAnchorX_,f=r[c+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=d+this.imageAnchorX_,p=f+this.imageAnchorY_;ki(a,g,p,1,1,h,-g,-p),o.setTransform.apply(o,a),o.translate(g,p),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,d,f,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(o.globalAlpha=l)}drawText_(t,e,i,s){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const r=Ae(t,e,i,s,this.transform_,this.pixelCoordinates_),o=this.context_;let a=this.textRotation_;for(this.transformRotation_===0&&(a-=this.viewRotation_),this.textRotateWithView_&&(a+=this.viewRotation_);e<i;e+=s){const l=r[e]+this.textOffsetX_,h=r[e+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(o.translate(l-this.textOffsetX_,h-this.textOffsetY_),o.rotate(a),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&o.strokeText(this.text_,l,h),this.textFillState_&&o.fillText(this.text_,l,h))}}moveToLineTo_(t,e,i,s,r){const o=this.context_,a=Ae(t,e,i,s,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);let l=a.length;r&&(l-=2);for(let h=2;h<l;h+=2)o.lineTo(a[h],a[h+1]);return r&&o.closePath(),i}drawRings_(t,e,i,s){for(let r=0,o=i.length;r<o;++r)e=this.moveToLineTo_(t,e,i[r],s,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Dt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Za(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],s=e[3]-e[1],r=Math.sqrt(i*i+s*s),o=this.context_;o.beginPath(),o.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}}drawFeature(t,e){const i=e.getGeometryFunction()(t);!i||(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let i=0,s=e.length;i<s;++i)this.drawGeometry(e[i])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),this.text_!==""&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),this.text_!==""&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Dt(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(!!Dt(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const i=this.context_,s=t.getFlatCoordinates();let r=0;const o=t.getEnds(),a=t.getStride();i.beginPath();for(let l=0,h=o.length;l<h;++l)r=this.moveToLineTo_(s,r,o[l],a,!1);i.stroke()}if(this.text_!==""){const i=t.getFlatMidpoints();this.drawText_(i,0,i.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Dt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Dt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let s=0;const r=t.getEndss(),o=t.getStride();e.beginPath();for(let a=0,l=r.length;a<l;++a){const h=r[a];s=this.drawRings_(i,s,h,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),Te(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,s=t.textAlign?t.textAlign:Mi;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=s&&(i.textAlign=s,e.textAlign=s),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=s,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:s,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const i=t.getColor();this.fillState_={fillStyle:Gt(i||jt)}}if(!e)this.strokeState_=null;else{const i=e.getColor(),s=e.getLineCap(),r=e.getLineDash(),o=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),c=r||Ei;this.strokeState_={lineCap:s!==void 0?s:cn,lineDash:this.pixelRatio_===1?c:c.map(u=>u*this.pixelRatio_),lineDashOffset:(o||Ri)*this.pixelRatio_,lineJoin:a!==void 0?a:Ke,lineWidth:(l!==void 0?l:Ai)*this.pixelRatio_,miterLimit:h!==void 0?h:Ii,strokeStyle:Gt(i||wi)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const i=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const o=t.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:Gt(f||jt)}}const i=t.getStroke();if(!i)this.textStrokeState_=null;else{const f=i.getColor(),g=i.getLineCap(),p=i.getLineDash(),_=i.getLineDashOffset(),x=i.getLineJoin(),v=i.getWidth(),w=i.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:cn,lineDash:p||Ei,lineDashOffset:_||Ri,lineJoin:x!==void 0?x:Ke,lineWidth:v!==void 0?v:Ai,miterLimit:w!==void 0?w:Ii,strokeStyle:Gt(f||wi)}}const s=t.getFont(),r=t.getOffsetX(),o=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),c=t.getText(),u=t.getTextAlign(),d=t.getTextBaseline();this.textState_={font:s!==void 0?s:qr,textAlign:u!==void 0?u:Mi,textBaseline:d!==void 0?d:un},this.text_=c!==void 0?Array.isArray(c)?c.reduce((f,g,p)=>f+=p%2?" ":g,""):c:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const Th=Lh,Pt=.5;function bh(n,t,e,i,s,r,o){const a=n[0]*Pt,l=n[1]*Pt,h=kt(a,l);h.imageSmoothingEnabled=!1;const c=h.canvas,u=new Th(h,Pt,s,null,o),d=e.length,f=Math.floor((256*256*256-1)/d),g={};for(let _=1;_<=d;++_){const x=e[_-1],v=x.getStyleFunction()||i;if(!i)continue;let w=v(x,r);if(!w)continue;Array.isArray(w)||(w=[w]);const T=(_*f).toString(16).padStart(7,"#00000");for(let Y=0,Z=w.length;Y<Z;++Y){const W=w[Y],y=W.getGeometryFunction()(x);if(!y||!Dt(s,y.getExtent()))continue;const j=W.clone(),it=j.getFill();it&&it.setColor(T);const J=j.getStroke();J&&(J.setColor(T),J.setLineDash(null)),j.setText(void 0);const U=W.getImage();if(U&&U.getOpacity()!==0){const E=U.getImageSize();if(!E)continue;const V=kt(E[0],E[1],void 0,{alpha:!1}),ht=V.canvas;V.fillStyle=T,V.fillRect(0,0,ht.width,ht.height),j.setImage(new Qr({img:ht,imgSize:E,anchor:U.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:U.getOrigin(),opacity:1,size:U.getSize(),scale:U.getScale(),rotation:U.getRotation(),rotateWithView:U.getRotateWithView()}))}const K=j.getZIndex()||0;let N=g[K];N||(N={},g[K]=N,N.Polygon=[],N.Circle=[],N.LineString=[],N.Point=[]);const P=y.getType();if(P==="GeometryCollection"){const E=y.getGeometriesArrayRecursive();for(let V=0,ht=E.length;V<ht;++V){const ot=E[V];N[ot.getType().replace("Multi","")].push(ot,j)}}else N[P.replace("Multi","")].push(y,j)}}const p=Object.keys(g).map(Number).sort(_i);for(let _=0,x=p.length;_<x;++_){const v=g[p[_]];for(const w in v){const k=v[w];for(let T=0,Y=k.length;T<Y;T+=2){u.setStyle(k[T+1]);for(let Z=0,W=t.length;Z<W;++Z)u.setTransform(t[Z]),u.drawGeometry(k[T])}}}return h.getImageData(0,0,c.width,c.height)}function Dh(n,t,e){const i=[];if(e){const s=Math.floor(Math.round(n[0])*Pt),r=Math.floor(Math.round(n[1])*Pt),o=(yt(s,0,e.width-1)+yt(r,0,e.height-1)*e.width)*4,a=e.data[o],l=e.data[o+1],c=e.data[o+2]+256*(l+256*a),u=Math.floor((256*256*256-1)/t.length);c&&c%u===0&&i.push(t[c/u-1])}return i}const kh=.5,eo={Point:Yh,LineString:Nh,Polygon:Vh,MultiPoint:zh,MultiLineString:Wh,MultiPolygon:Xh,GeometryCollection:Bh,Circle:Ph};function Fh(n,t){return parseInt(st(n),10)-parseInt(st(t),10)}function Oh(n,t){const e=Vn(n,t);return e*e}function Vn(n,t){return kh*n/t}function Ph(n,t,e,i,s){const r=e.getFill(),o=e.getStroke();if(r||o){const l=n.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(r,o),l.drawCircle(t,i)}const a=e.getText();if(a&&a.getText()){const l=(s||n).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,i)}}function ar(n,t,e,i,s,r,o){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==ct.LOADED||h==ct.ERROR?l.unlistenImageChange(s):(h==ct.IDLE&&l.load(),l.listenImageChange(s),a=!0)}return Gh(n,t,e,i,r,o),a}function Gh(n,t,e,i,s,r){const o=e.getGeometryFunction()(t);if(!o)return;const a=o.simplifyTransformed(i,s);if(e.getRenderer())io(n,a,e,t);else{const h=eo[a.getType()];h(n,a,e,t,r)}}function io(n,t,e,i){if(t.getType()=="GeometryCollection"){const r=t.getGeometries();for(let o=0,a=r.length;o<a;++o)io(n,r[o],e,i);return}n.getBuilder(e.getZIndex(),"Default").drawCustom(t,i,e.getRenderer(),e.getHitDetectionRenderer())}function Bh(n,t,e,i,s){const r=t.getGeometriesArray();let o,a;for(o=0,a=r.length;o<a;++o){const l=eo[r[o].getType()];l(n,r[o],e,i,s)}}function Nh(n,t,e,i,s){const r=e.getStroke();if(r){const a=n.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawLineString(t,i)}const o=e.getText();if(o&&o.getText()){const a=(s||n).getBuilder(e.getZIndex(),"Text");a.setTextStyle(o),a.drawText(t,i)}}function Wh(n,t,e,i,s){const r=e.getStroke();if(r){const a=n.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawMultiLineString(t,i)}const o=e.getText();if(o&&o.getText()){const a=(s||n).getBuilder(e.getZIndex(),"Text");a.setTextStyle(o),a.drawText(t,i)}}function Xh(n,t,e,i,s){const r=e.getFill(),o=e.getStroke();if(o||r){const l=n.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,o),l.drawMultiPolygon(t,i)}const a=e.getText();if(a&&a.getText()){const l=(s||n).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,i)}}function Yh(n,t,e,i,s){const r=e.getImage(),o=e.getText();let a;if(r){if(r.getImageState()!=ct.LOADED)return;let l=n;if(s){const c=r.getDeclutterMode();if(c!=="none")if(l=s,c==="obstacle"){const u=n.getBuilder(e.getZIndex(),"Image");u.setImageStyle(r,a),u.drawPoint(t,i)}else o&&o.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawPoint(t,i)}if(o&&o.getText()){let l=n;s&&(l=s);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(t,i)}}function zh(n,t,e,i,s){const r=e.getImage(),o=e.getText();let a;if(r){if(r.getImageState()!=ct.LOADED)return;let l=n;if(s){const c=r.getDeclutterMode();if(c!=="none")if(l=s,c==="obstacle"){const u=n.getBuilder(e.getZIndex(),"Image");u.setImageStyle(r,a),u.drawMultiPoint(t,i)}else o&&o.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawMultiPoint(t,i)}if(o&&o.getText()){let l=n;s&&(l=s);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(t,i)}}function Vh(n,t,e,i,s){const r=e.getFill(),o=e.getStroke();if(r||o){const l=n.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,o),l.drawPolygon(t,i)}const a=e.getText();if(a&&a.getText()){const l=(s||n).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,i)}}class Zh extends zl{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=Le(),this.wrappedRenderedExtent_=Le(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,i){const s=e.extent,r=e.viewState,o=r.center,a=r.resolution,l=r.projection,h=r.rotation,c=l.getExtent(),u=this.getLayer().getSource(),d=e.pixelRatio,f=e.viewHints,g=!(f[At.ANIMATING]||f[At.INTERACTING]),p=this.compositionContext_,_=Math.round(e.size[0]*d),x=Math.round(e.size[1]*d),v=u.getWrapX()&&l.canWrapX(),w=v?Lt(c):null,k=v?Math.ceil((s[2]-c[2])/w)+1:1;let T=v?Math.floor((s[0]-c[0])/w):0;do{const Y=this.getRenderTransform(o,a,h,d,_,x,T*w);t.execute(p,1,Y,h,g,void 0,i)}while(++T<k)}setupCompositionContext_(){if(this.opacity_!==1){const t=kt(this.context.canvas.width,this.context.canvas.height,Vs);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,Ko(this.compositionContext_),Vs.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const i=t.pixelRatio,s=t.layerStatesArray[t.layerIndex];Oa(this.pixelTransform,1/i,1/i),Pa(this.inversePixelTransform,this.pixelTransform);const r=Ba(this.pixelTransform);this.useContainer(e,r,this.getBackground(t));const o=this.context,a=o.canvas,l=this.replayGroup_,h=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!h||h.isEmpty()))return null;const c=Math.round(t.size[0]*i),u=Math.round(t.size[1]*i);a.width!=c||a.height!=u?(a.width=c,a.height=u,a.style.transform!==r&&(a.style.transform=r)):this.containerReused||o.clearRect(0,0,c,u),this.preRender(o,t);const d=t.viewState;d.projection,this.opacity_=s.opacity,this.setupCompositionContext_();let f=!1,g=!0;if(s.extent&&this.clipping){const p=ze(s.extent);g=Dt(p,t.extent),f=g&&!Xe(p,t.extent),f&&this.clipUnrotated(this.compositionContext_,t,p)}return g&&this.renderWorlds(l,t),f&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,t),this.renderedRotation_!==d.rotation&&(this.renderedRotation_=d.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=[this.context.canvas.width,this.context.canvas.height];Ct(this.pixelTransform,i);const s=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),c=[],u=i[0]*Pt,d=i[1]*Pt;c.push(this.getRenderTransform(s,r,o,Pt,u,d,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Xe(g,l)){let p=l[0];const _=Lt(g);let x=0,v;for(;p<g[0];)--x,v=_*x,c.push(this.getRenderTransform(s,r,o,Pt,u,d,v).slice()),p+=_;for(x=0,p=l[2];p>g[2];)++x,v=_*x,c.push(this.getRenderTransform(s,r,o,Pt,u,d,v).slice()),p-=_}this.hitDetectionImageData_=bh(i,c,this.renderedFeatures_,h.getStyleFunction(),l,r,o)}e(Dh(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,i,s,r){if(!this.replayGroup_)return;const o=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},c=function(f,g,p){const _=st(f),x=h[_];if(x){if(x!==!0&&p<x.distanceSq){if(p===0)return h[_]=!0,r.splice(r.lastIndexOf(x),1),s(f,l,g);x.geometry=g,x.distanceSq=p}}else{if(p===0)return h[_]=!0,s(f,l,g);r.push(h[_]={feature:f,layer:l,geometry:g,distanceSq:p,callback:s})}};let u;const d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some(f=>u=f.forEachFeatureAtCoordinate(t,o,a,i,c,f===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(g=>g.value):null)),u}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const s=t.viewHints[At.ANIMATING],r=t.viewHints[At.INTERACTING],o=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!o&&s||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,c=h.projection,u=h.resolution,d=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let p=e.getRenderOrder();p===void 0&&(p=Fh);const _=h.center.slice(),x=pn(l,g*u),v=x.slice(),w=[x.slice()],k=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!Xe(k,t.extent)){const N=Lt(k),P=Math.max(Lt(x)/2,N);x[0]=k[0]-P,x[2]=k[2]+P,da(_,c);const E=Er(w[0],c);E[0]<k[0]&&E[2]<k[2]?w.push([E[0]+N,E[1],E[2]+N,E[3]]):E[0]>k[0]&&E[2]>k[2]&&w.push([E[0]-N,E[1],E[2]-N,E[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==f&&this.renderedRenderOrder_==p&&Xe(this.wrappedRenderedExtent_,x))return Te(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=_,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const T=new nr(Vn(u,d),x,u,d);let Y;this.getLayer().getDeclutter()&&(Y=new nr(Vn(u,d),x,u,d));let Z;for(let N=0,P=w.length;N<P;++N)i.loadFeatures(w[N],u,c);const W=Oh(u,d);let y=!0;const j=N=>{let P;const E=N.getStyleFunction()||e.getStyleFunction();if(E&&(P=E(N,u)),P){const V=this.renderFeature(N,W,P,T,Z,Y);y=y&&!V}},it=Qn(x),J=i.getFeaturesInExtent(it);p&&J.sort(p);for(let N=0,P=J.length;N<P;++N)j(J[N]);this.renderedFeatures_=J,this.ready=y;const U=T.finish(),K=new or(x,u,d,i.getOverlaps(),U,e.getRenderBuffer());return Y&&(this.declutterExecutorGroup=new or(x,u,d,i.getOverlaps(),Y.finish(),e.getRenderBuffer())),this.renderedResolution_=u,this.renderedRevision_=f,this.renderedRenderOrder_=p,this.renderedExtent_=v,this.wrappedRenderedExtent_=x,this.renderedCenter_=_,this.renderedProjection_=c,this.replayGroup_=K,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,s,r,o){if(!i)return!1;let a=!1;if(Array.isArray(i))for(let l=0,h=i.length;l<h;++l)a=ar(s,t,i[l],e,this.boundHandleStyleImageChange_,r,o)||a;else a=ar(s,t,i,e,this.boundHandleStyleImageChange_,r,o);return a}}const Uh=Zh;class jh extends hh{constructor(t){super(t)}createRenderer(){return new Uh(this)}}const no=jh,Vt={SINGLECLICK:"singleclick",CLICK:St.CLICK,DBLCLICK:St.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},lr={ACTIVE:"active"};class Hh extends ce{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(lr.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(lr.ACTIVE,t)}setMap(t){this.map_=t}}const Kh=Hh;class qh extends Kh{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Vt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Vt.POINTERUP){const i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==Vt.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==Vt.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}const Jh=qh,Qh=function(n){const t=n.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},$h=Ir,tc=function(n){return n.type==Vt.SINGLECLICK},ec=function(n){const t=n.originalEvent;return dt(t!==void 0,56),t.isPrimary&&t.button===0},hr=0,gi=1,cr=[0,0,0,0],Ue=[],Fn={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class On extends qe{constructor(t,e,i){super(t),this.features=e,this.mapBrowserEvent=i}}class ic extends Jh{constructor(t){super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:ec,this.defaultDeleteCondition_=function(i){return Qh(i)&&tc(i)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:$h,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new Wn,this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new no({source:new Xr({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:sc(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null;let e;if(t.features?e=t.features:t.source&&(this.source_=t.source,e=new Nn(this.source_.getFeatures()),this.source_.addEventListener(Rt.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(Rt.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(se.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(se.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=t.snapToPointer===void 0?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const s=this.SEGMENT_WRITERS_[e.getType()];s&&s(t,e)}const i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),t.addEventListener(St.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new Nn;const i=this.featuresBeingModified_.getArray();for(let s=0,r=e.length;s<r;++s){const o=e[s];for(let a=0,l=o.length;a<l;++a){const h=o[a].feature;h&&!i.includes(h)&&this.featuresBeingModified_.push(h)}}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new On(Fn.MODIFYSTART,this.featuresBeingModified_,t))}}removeFeature_(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(St.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(t){const e=this.rBush_,i=[];e.forEach(function(s){t===s.feature&&i.push(s)});for(let s=i.length-1;s>=0;--s){const r=i[s];for(let o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===r&&this.dragSegments_.splice(o,1);e.remove(r)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const i=e.getCoordinates(),s={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),s)}writeMultiPointGeometry_(t,e){const i=e.getCoordinates();for(let s=0,r=i.length;s<r;++s){const o=i[s],a={feature:t,geometry:e,depth:[s],index:s,segment:[o,o]};this.rBush_.insert(e.getExtent(),a)}}writeLineStringGeometry_(t,e){const i=e.getCoordinates();for(let s=0,r=i.length-1;s<r;++s){const o=i.slice(s,s+2),a={feature:t,geometry:e,index:s,segment:o};this.rBush_.insert(Xt(o),a)}}writeMultiLineStringGeometry_(t,e){const i=e.getCoordinates();for(let s=0,r=i.length;s<r;++s){const o=i[s];for(let a=0,l=o.length-1;a<l;++a){const h=o.slice(a,a+2),c={feature:t,geometry:e,depth:[s],index:a,segment:h};this.rBush_.insert(Xt(h),c)}}}writePolygonGeometry_(t,e){const i=e.getCoordinates();for(let s=0,r=i.length;s<r;++s){const o=i[s];for(let a=0,l=o.length-1;a<l;++a){const h=o.slice(a,a+2),c={feature:t,geometry:e,depth:[s],index:a,segment:h};this.rBush_.insert(Xt(h),c)}}}writeMultiPolygonGeometry_(t,e){const i=e.getCoordinates();for(let s=0,r=i.length;s<r;++s){const o=i[s];for(let a=0,l=o.length;a<l;++a){const h=o[a];for(let c=0,u=h.length-1;c<u;++c){const d=h.slice(c,c+2),f={feature:t,geometry:e,depth:[a,s],index:c,segment:d};this.rBush_.insert(Xt(d),f)}}}}writeCircleGeometry_(t,e){const i=e.getCenter(),s={feature:t,geometry:e,index:hr,segment:[i,i]},r={feature:t,geometry:e,index:gi,segment:[i,i]},o=[s,r];s.featureSegments=o,r.featureSegments=o,this.rBush_.insert(en(i),s);let a=e;this.rBush_.insert(a.getExtent(),r)}writeGeometryCollectionGeometry_(t,e){const i=e.getGeometriesArray();for(let s=0;s<i.length;++s){const r=i[s],o=this.SEGMENT_WRITERS_[r.getType()];o(t,r)}}createOrUpdateVertexFeature_(t,e,i){let s=this.vertexFeature_;return s?s.getGeometry().setCoordinates(t):(s=new Ms(new Ci(t)),this.vertexFeature_=s,this.overlay_.getSource().addFeature(s)),s.set("features",e),s.set("geometries",i),s}handleEvent(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;let e;return!t.map.getView().getInteracting()&&t.type==Vt.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=Vt.SINGLECLICK||!this.ignoreNextSingleClick_?e=this.removePoint():e=!0),t.type==Vt.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(t)&&!e}handleDragEvent(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);const e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],i=[],s=[];for(let r=0,o=this.dragSegments_.length;r<o;++r){const a=this.dragSegments_[r],l=a[0],h=l.feature;i.includes(h)||i.push(h);const c=l.geometry;s.includes(c)||s.push(c);const u=l.depth;let d;const f=l.segment,g=a[1];for(;e.length<c.getStride();)e.push(f[g][e.length]);switch(c.getType()){case"Point":d=e,f[0]=e,f[1]=e;break;case"MultiPoint":d=c.getCoordinates(),d[l.index]=e,f[0]=e,f[1]=e;break;case"LineString":d=c.getCoordinates(),d[l.index+g]=e,f[g]=e;break;case"MultiLineString":d=c.getCoordinates(),d[u[0]][l.index+g]=e,f[g]=e;break;case"Polygon":d=c.getCoordinates(),d[u[0]][l.index+g]=e,f[g]=e;break;case"MultiPolygon":d=c.getCoordinates(),d[u[1]][u[0]][l.index+g]=e,f[g]=e;break;case"Circle":if(f[0]=e,f[1]=e,l.index===hr)this.changingFeature_=!0,c.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let p=Cs(xt(c.getCenter()),xt(e));c.setRadius(p),this.changingFeature_=!1}break}d&&this.setGeometryCoordinates_(c,d)}this.createOrUpdateVertexFeature_(e,i,s)}handleDownEvent(t){if(!this.condition_(t))return!1;const e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;const i=this.vertexFeature_;if(i){t.map.getView().getProjection();const s=[],r=i.getGeometry().getCoordinates(),o=Xt([r]),a=this.rBush_.getInExtent(o),l={};a.sort(nc);for(let h=0,c=a.length;h<c;++h){const u=a[h],d=u.segment;let f=st(u.geometry);const g=u.depth;if(g&&(f+="-"+g.join("-")),l[f]||(l[f]=new Array(2)),u.geometry.getType()==="Circle"&&u.index===gi){const p=dr(e,u);bt(p,r)&&!l[f][0]&&(this.dragSegments_.push([u,0]),l[f][0]=u);continue}if(bt(d[0],r)&&!l[f][0]){this.dragSegments_.push([u,0]),l[f][0]=u;continue}if(bt(d[1],r)&&!l[f][1]){if(l[f][0]&&l[f][0].index===0){let p=u.geometry.getCoordinates();switch(u.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":p=p[g[1]];case"Polygon":if(u.index!==p[g[0]].length-2)continue;break}}this.dragSegments_.push([u,1]),l[f][1]=u;continue}st(d)in this.vertexSegments_&&!l[f][0]&&!l[f][1]&&this.insertVertexCondition_(t)&&s.push(u)}s.length&&this.willModifyFeatures_(t,[s]);for(let h=s.length-1;h>=0;--h)this.insertVertex_(s[h],r)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const i=this.dragSegments_[e][0],s=i.geometry;if(s.getType()==="Circle"){const r=s.getCenter(),o=i.featureSegments[0],a=i.featureSegments[1];o.segment[0]=r,o.segment[1]=r,a.segment[0]=r,a.segment[1]=r,this.rBush_.update(en(r),o);let l=s;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(Xt(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new On(Fn.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,i){const s=i||e.getCoordinateFromPixel(t);e.getView().getProjection();const r=function(l,h){return ur(s,l)-ur(s,h)};let o,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?h=>h===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,(h,c,u)=>{u&&(u=new Ci(vi(u.getCoordinates())));const d=u||h.getGeometry();if(d.getType()==="Point"&&h instanceof Ms&&this.features_.getArray().includes(h)){a=d;const f=h.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:h,geometry:a,segment:[f,f]}]}return!0},{layerFilter:l})}if(!o){const l=ze(en(s,cr)),h=e.getView().getResolution()*this.pixelTolerance_,c=Qn(pn(l,h,cr));o=this.rBush_.getInExtent(c)}if(o&&o.length>0){const l=o.sort(r)[0],h=l.segment;let c=dr(s,l);const u=e.getPixelFromCoordinate(c);let d=Cs(t,u);if(a||d<=this.pixelTolerance_){const f={};if(f[st(h)]=!0,this.snapToPointer_||(this.delta_[0]=c[0]-s[0],this.delta_[1]=c[1]-s[1]),l.geometry.getType()==="Circle"&&l.index===gi)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(c,[l.feature],[l.geometry]);else{const g=e.getPixelFromCoordinate(h[0]),p=e.getPixelFromCoordinate(h[1]),_=Si(u,g),x=Si(u,p);d=Math.sqrt(Math.min(_,x)),this.snappedToVertex_=d<=this.pixelTolerance_,this.snappedToVertex_&&(c=_>x?h[1]:h[0]),this.createOrUpdateVertexFeature_(c,[l.feature],[l.geometry]);const v={};v[st(l.geometry)]=!0;for(let w=1,k=o.length;w<k;++w){const T=o[w].segment;if(bt(h[0],T[0])&&bt(h[1],T[1])||bt(h[0],T[1])&&bt(h[1],T[0])){const Y=st(o[w].geometry);Y in v||(v[Y]=!0,f[st(T)]=!0)}else break}}this.vertexSegments_=f;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(t,e){const i=t.segment,s=t.feature,r=t.geometry,o=t.depth,a=t.index;let l;for(;e.length<r.getStride();)e.push(0);switch(r.getType()){case"MultiLineString":l=r.getCoordinates(),l[o[0]].splice(a+1,0,e);break;case"Polygon":l=r.getCoordinates(),l[o[0]].splice(a+1,0,e);break;case"MultiPolygon":l=r.getCoordinates(),l[o[1]][o[0]].splice(a+1,0,e);break;case"LineString":l=r.getCoordinates(),l.splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(r,l);const h=this.rBush_;h.remove(t),this.updateSegmentIndices_(r,a,o,1);const c={segment:[i[0],e],feature:s,geometry:r,depth:o,index:a};h.insert(Xt(c.segment),c),this.dragSegments_.push([c,1]);const u={segment:[e,i[1]],feature:s,geometry:r,depth:o,index:a+1};h.insert(Xt(u.segment),u),this.dragSegments_.push([u,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Vt.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);const e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new On(Fn.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1}removeVertex_(){const t=this.dragSegments_,e={};let i=!1,s,r,o,a,l,h,c,u,d,f,g;for(l=t.length-1;l>=0;--l)o=t[l],f=o[0],g=st(f.feature),f.depth&&(g+="-"+f.depth.join("-")),g in e||(e[g]={}),o[1]===0?(e[g].right=f,e[g].index=f.index):o[1]==1&&(e[g].left=f,e[g].index=f.index+1);for(g in e){switch(d=e[g].right,c=e[g].left,h=e[g].index,u=h-1,c!==void 0?f=c:f=d,u<0&&(u=0),a=f.geometry,r=a.getCoordinates(),s=r,i=!1,a.getType()){case"MultiLineString":r[f.depth[0]].length>2&&(r[f.depth[0]].splice(h,1),i=!0);break;case"LineString":r.length>2&&(r.splice(h,1),i=!0);break;case"MultiPolygon":s=s[f.depth[1]];case"Polygon":s=s[f.depth[0]],s.length>4&&(h==s.length-1&&(h=0),s.splice(h,1),i=!0,h===0&&(s.pop(),s.push(s[0]),u=s.length-1));break}if(i){this.setGeometryCoordinates_(a,r);const p=[];if(c!==void 0&&(this.rBush_.remove(c),p.push(c.segment[0])),d!==void 0&&(this.rBush_.remove(d),p.push(d.segment[1])),c!==void 0&&d!==void 0){const _={depth:f.depth,feature:f.feature,geometry:f.geometry,index:u,segment:p};this.rBush_.insert(Xt(_.segment),_)}this.updateSegmentIndices_(a,h,f.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return i}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,s){this.rBush_.forEachInExtent(t.getExtent(),function(r){r.geometry===t&&(i===void 0||r.depth===void 0||Te(r.depth,i))&&r.index>e&&(r.index+=s)})}}function nc(n,t){return n.index-t.index}function ur(n,t,e){const i=t.geometry;if(i.getType()==="Circle"){let r=i;if(t.index===gi){const o=Si(r.getCenter(),xt(n)),a=Math.sqrt(o)-r.getRadius();return a*a}}const s=xt(n);return Ue[0]=xt(t.segment[0]),Ue[1]=xt(t.segment[1]),ua(s,Ue)}function dr(n,t,e){const i=t.geometry;if(i.getType()==="Circle"&&t.index===gi)return vi(i.getClosestPoint(xt(n)));const s=xt(n);return Ue[0]=xt(t.segment[0]),Ue[1]=xt(t.segment[1]),vi(Lr(s,Ue))}function sc(){const n=ih();return function(t,e){return n.Point}}const rc=ic;const wt=n=>(go("data-v-6c4dd7e7"),n=n(),po(),n),oc={class:"center"},ac=wt(()=>F("div",{style:{width:"100%",height:"100%"},id:"cesiumContainer"},null,-1)),lc={class:"rightWra"},hc={class:"rightTop"},cc=wt(()=>F("div",{class:"title"},[F("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}}),F("span",null,"\u4F4D\u7F6E\u5B9A\u4F4D")],-1)),uc={class:"depth"},dc={class:"rightCenter"},fc={key:0,class:"zoning"},gc={key:1,class:"LonAndLat"},pc={class:"LonAndLatDiv"},mc={class:"LonAndLatDiv"},_c={key:2,class:"LonAndLat"},xc={class:"LonDiv"},yc={class:"inputDiv"},Sc={class:"LatDiv"},vc={class:"inputDiv"},Cc={class:"seach_button"},Ec={class:"rightbottom"},Rc=wt(()=>F("div",{class:"title"},[F("div",{style:{width:"3px",height:"19px",opacity:"1",background:"rgba(100, 195, 164, 1)","margin-right":"12px"}}),F("span",null,"\u4FE1\u606F\u7EDF\u8BA1")],-1)),Ic=["id"],wc={key:0,style:{width:"14px"},src:Je},Mc={key:1,style:{width:"14px"},src:Qe},Ac=["id"],Lc={key:0,style:{width:"14px"},src:Je},Tc={key:1,style:{width:"14px"},src:Qe},bc=["id"],Dc={key:0,style:{width:"14px"},src:Je},kc={key:1,style:{width:"14px"},src:Qe},Fc=["id"],Oc={key:0,style:{width:"14px"},src:Je},Pc={key:1,style:{width:"14px"},src:Qe},Gc=["id"],Bc={key:0,style:{width:"14px"},src:Je},Nc={key:1,style:{width:"14px"},src:Qe},Wc=["id"],Xc={key:0,style:{width:"14px"},src:Je},Yc={key:1,style:{width:"14px"},src:Qe},zc={class:"chart_div"},Vc={class:"chart_div_title"},Zc=wt(()=>F("img",{src:mo,style:{width:"14px",height:"14px",cursor:"pointer"}},null,-1)),Uc={key:0,class:"Involution"},jc=wt(()=>F("img",{src:jr},null,-1)),Hc={key:0},Kc=wt(()=>F("img",{src:jr},null,-1)),qc=wt(()=>F("img",{src:_o},null,-1)),Jc=wt(()=>F("img",{src:xo},null,-1)),Qc={class:"tool"},$c=wt(()=>F("img",{src:yo,alt:""},null,-1)),tu=wt(()=>F("img",{src:So,alt:""},null,-1)),eu=wt(()=>F("img",{src:Vl,alt:""},null,-1)),iu={class:"treeDiv"},nu=["id"],su={class:"farmlandTimeDivCenter"},ru={id:"popup",class:"ol-popup"},ou=wt(()=>F("div",{class:"pophead",style:{width:"100%"}},[F("div",{id:"popup-title",style:{"font-size":"20px","font-weight":"400","letter-spacing":"1px","line-height":"42px","padding-left":"20px","border-radius":"8px",margin:"20px",background:"rgba(100, 195, 164, 0.05)"}}),F("a",{href:"#",id:"popup-closer",class:"ol-popup-closer"})],-1)),au={id:"popup-background"},lu=wt(()=>F("div",{id:"popup-content",style:{padding:"10px","font-size":"14px"}},null,-1)),hu={id:"popup-pagination"},cu={__name:"index",setup(n){const t=ro();z([]),z(!1);let e=z(!1),i=z(!1),s=z(""),r=z([]),o=z("");z(""),z("");let a=z({Lon:"",Lat:""}),l=z({Lon:{londu:"",lonfen:"",lonmiao:""},Lat:{latdu:"",latfen:"",latmiao:""}});const h=z("null");let c=z(null),u=z([]),d=z("2"),f=z([]),g=z(1),p=z([]);const _={children:"children",label:"label"};let x=z(!0);z([]);let v=z([]),w=z([]),k=z([]),T=z("");z({});let Y=z(""),Z=z(""),W=z("\u9AD8\u6807\u51C6\u519C\u7530");oo(()=>f.value,(S,m)=>{S.length>m.length?S.filter(R=>{if(m.findIndex(O=>O===R)<0)return R}).forEach(R=>{K[R]?["\u571F\u5730\u786E\u6743","\u4E09\u8C03"].includes(R)?Ni(N[R]):De(K[R]):P[R]&&(["\u571F\u5730\u786E\u6743","\u4E09\u8C03"].includes(R)?Ni(N[R]):De(P[R]))}):S.length<m.length&&m.filter(R=>{if(S.findIndex(O=>O===R)<0)return R}).forEach(R=>{K[R]?E.getLayers().getArray().forEach((L,O)=>{L.A.name&&L.A.name==K[R].name&&E.getLayers().removeAt(O)}):P[R]&&R!=="\u571F\u5730\u786E\u6743"?E.getLayers().getArray().forEach((L,O)=>{L.A.name&&L.A.name==P[R].name&&E.getLayers().removeAt(O)}):N[R]&&E.getLayers().getArray().forEach((L,O)=>{L.A.name&&L.A.name==N[R].name&&E.getLayers().removeAt(O)})})});let y=z([]),j=z(!1),it=z(!1);const J=[{label:"\u9AD8\u6807\u51C6\u519C\u7530",children:[{label:"\u9AD8\u6807\u51C6\u519C\u7530"}]},{label:"\u6C38\u4E45\u57FA\u672C\u519C\u7530",children:[{label:"\u6C38\u4E45\u57FA\u672C\u519C\u7530"}]},{label:"\u8015\u5730",children:[{label:"\u8015\u5730"}]},{label:"\u7CAE\u98DF\u529F\u80FD\u533A",children:[{label:"\u7247\u5757\u4FE1\u606F"},{label:"\u5730\u5757\u4FE1\u606F"}]},{label:"\u571F\u5730\u786E\u6743",children:[{label:"\u571F\u5730\u786E\u6743"}]},{label:"\u4E09\u8C03",children:[{label:"\u4E09\u8C03"}]}];let U=z({2012:!0,2013:!0,2014:!0,2015:!0,2016:!0,2017:!0,2018:!0,2019:!0,2020:!0,2021:!0,2022:!0}),K={2012:{setOf:"T2012@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2013:{setOf:"T2013@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2014:{setOf:"T2014@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2015:{setOf:"T2015@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2016:{setOf:"T2016@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2017:{setOf:"T2017@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2018:{setOf:"T2018@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2019:{setOf:"T2019@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2020:{setOf:"T2020@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2021:{setOf:"T2021@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"},2022:{setOf:"T2022@gaobiaozhunnongtianxk",name:"map-gaobiaozhunnongtianxk"}},N={\u571F\u5730\u786E\u6743:{name:"DK3702112022WGS84",setOf:"tudiquequanxk"},\u4E09\u8C03:{name:"T2021DLTB",setOf:"sandiaoshujuWGS84"}},P={\u6C38\u4E45\u57FA\u672C\u519C\u7530:{setOf:"yongnongSanqusanxianWGS84@yongjiujibennongtianxk",name:"map-yongjiujibennongtianxk"},\u8015\u5730:{setOf:"gengbaoSanqusanxianWGS84@gengdibaohuxk",name:"map-gengdibaohuxk"},\u7247\u5757\u4FE1\u606F:{setOf:"LQPK3702112019WGS84@liangqupiankuaixk",name:"map-liangqupiankuaixk"},\u5730\u5757\u4FE1\u606F:{setOf:"LQDK3702112019WGS84@liangqudikuaixk",name:"map-liangqudikuaixk"},\u571F\u5730\u786E\u6743:{setOf:"DK3702112022WGS84@tudiquequanxk",name:"map-tudiquequanxk"},\u4E09\u8C03:{setOf:"T2021DLTB@sandiaoshujuWGS84",name:"map-sandiaoshujuWGS84"}};ao(()=>{Mt(),Pi(),fe(),ke(),Ft("\u9AD8\u6807\u51C6\u519C\u7530");var S=window.location.host,m=/^(([-\u4E00-\u9FA5a-z0-9]{1,63})\.)+([\u4E00-\u9FA5a-z]{2,63})\.?$/;m.test(S)?(alert("\u8BF7\u4F7F\u7528\u91D1\u5B8F\u7F51\u8BBF\u95EE\u672C\u9875\u9762!"),lo().delView(t.currentRoute.value),t.go(-1)):console.log("\u91D1\u5B8F\u7F51");let I=document.querySelector(".rightWra");I.style.transform="translate(101%,0)",localStorage.setItem(t.currentRoute.value.path,!0)}),ho(()=>{document.querySelector(".mode").style.display="none",window.document.querySelector("#screenfull").style.display="block"});let E=z(null);z(null);let V=z(null),ht=z(null),ot=z(null);function Mt(){var S=document.querySelector(".center"),m=document.getElementById("cesiumContainer");E=new ol.Map({target:"cesiumContainer",controls:[],view:new ol.View({center:[119.88661841637813,35.85667692242919],zoom:11,maxZoom:16.5,projection:"EPSG:4326"}),layers:[new ol.layer.Tile({source:new ol.source.XYZ({url:`${serverAPI.tiandituLayers}`,projection:serverAPI.tiandituLayers=="http://59.206.203.34/tileservice/SdRasterPubMap?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=sdimg2017&STYLE=default&TILEMATRIXSET=img2017&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=application%2Fpng"?"EPSG:4326":"EPSG:3857"}),preload:20})]}),Gi(),Bi(),E.on("moveend",function(R){var L=E.getView().getZoom();L>=13?c.setVisible(!0):c.setVisible(!1)}),E.on("singleclick",function(R){y=z([]);var L=R.coordinate,O=L[0],G=L[1],A=E.getView();E.getView().getZoom(),A.animate({center:[O,G],duration:1e3}),f.value.forEach(B=>{P[B]?M(R,P[B].setOf,`${serverAPI.geoserverUrl2}/${P[B].name}/rest/maps/${P[B].setOf}`,B):K[B]&&M(R,K[B].setOf,`${serverAPI.geoserverUrl2}/${K[B].name}/rest/maps/${K[B].setOf}`,B)})});var I=new ResizeObserver(function(R){R.forEach(function(L){var O=L.contentRect.width,G=L.contentRect.height;m.style.width=O+"px",m.style.height=G+"px",E.updateSize()})});I.observe(S)}function M(S,m,I,R){var L=new ol.geom.Point(S.coordinate),O=new ol.supermap.QueryByGeometryParameters({queryParams:{name:m},geometry:L});let G=document.querySelector("#popup-title"),A=z(null);var B=z(1),H=1;new ol.supermap.QueryService(I).queryByGeometry(O,function(b){if(b.result.currentCount>0){y.value.push({name:R,information:b.result.recordsets[0].features.features[0].properties}),y.value.length>1?j.value=!0:j.value=!1,b.result.recordsets[0].features&&(ot.setPosition(L.flatCoordinates),y.value[0].name>=2019?(G.innerHTML="\u9AD8\u6807\u51C6\u519C\u7530",V.innerHTML='<div class="content-children"><p id="P-id">\u9879\u76EE\u540D\u79F0: <span>'+y.value[0].information.XMMC+"</span></p><p>\u9879\u76EE\u7F16\u53F7: <span>"+y.value[0].information.XMBH+"</span></p><p>\u9879\u76EE\u9762\u79EF: <span>"+y.value[0].information.XMMJ+"</span></p><p>\u5730\u5757\u9762\u79EF: <span>"+y.value[0].information.DKMJ+"</span></p><p>\u6807\u8BC6\u7801: <span>"+y.value[0].information.BSM+"</span></p><p>\u5730\u5757\u7F16\u53F7: <span>"+y.value[0].information.DKBH+"</span></p><p>\u9879\u76EE\u5E74\u4EFD: <span>"+y.value[0].information.XMNF+"</span></p></div>"):y.value[0].name>=2011&&y.value[0].name<=2018?(G.innerHTML="\u9AD8\u6807\u51C6\u519C\u7530",V.innerHTML='<div class="content-children"><p id="P-id">\u9879\u76EE\u540D\u79F0:<span>'+y.value[0].information.XMMC+"</span></p><p>\u6807\u8BC6\u7801: <span>"+y.value[0].information.BSM+"</span></p><p>\u5730\u5757\u9762\u79EF: <span>"+y.value[0].information.DIKUAIAREA+"</span></p><p>\u5730\u5757\u7528\u9014/\u7C7B\u578B: <span>"+y.value[0].information.DLBM+"</span></p><p>\u9879\u76EE\u7F16\u53F7: <span>"+y.value[0].information.XMBH+"</span></p></div>"):y.value[0].name=="\u6C38\u4E45\u57FA\u672C\u519C\u7530"?(G.innerHTML="\u6C38\u4E45\u57FA\u672C\u519C\u7530",V.innerHTML='<div class="content-children"><p>\u7C7B\u578B: <span>'+y.value[0].name+"</span></p><p>\u5730\u7C7B\u540D\u79F0: <span>"+y.value[0].information.DLMC+"</span></p><p>\u6743\u5C5E\u6027\u8D28: <span>"+y.value[0].information.QSXZ+"</span></p><p>\u6743\u5C5E\u5355\u4F4D\u540D\u79F0: <span>"+y.value[0].information.QSDWMC+"</span></p><p>\u5750\u843D\u5355\u4F4D\u540D\u79F0: <span>"+y.value[0].information.ZLDWMC+"</span></p><p>\u6263\u9664\u5730\u7C7B\u7F16\u7801: <span>"+y.value[0].information.KCDLBM+"</span></p><p>\u6263\u9664\u7CFB\u6570: <span>"+y.value[0].information.KCXS+"</span></p><p>\u6263\u9664\u9762\u79EF: <span>"+y.value[0].information.KCMJ+"</span></p><p>\u8015\u5730\u7C7B\u578B: <span>"+y.value[0].information.GDLX+"</span></p><p>\u8015\u5730\u5761\u5EA6\u7EA7\u522B: <span>"+y.value[0].information.GDPDJB+"</span></p><p>\u79CD\u690D\u5C5E\u6027\u4EE3\u7801: <span>"+y.value[0].information.ZZSXDM+"</span></p><p>\u79CD\u690D\u5C5E\u6027\u540D\u79F0: <span>"+y.value[0].information.ZZSXMC+"</span></p><p>\u8015\u5730\u7B49\u7EA7: <span>"+y.value[0].information.GDDJ+"</span></p><p>\u6570\u636E\u5E74\u4EFD: <span>"+y.value[0].information.SJNF+"</span></p><p>\u4FDD\u62A4\u5F00\u59CB\u65F6\u95F4: <span>"+y.value[0].information.BHKSSJ+"</span></p><p>\u6C38\u4E45\u57FA\u672C\u519C\u7530\u9762\u79EF: <span>"+(y.value[0].information.YJJBNTMJ_Y/666).toFixed(2)+"(\u4EA9)</span></p></div>"):y.value[0].name=="\u8015\u5730"?(G.innerHTML="\u8015\u5730",V.innerHTML='<div class="content-children"><p>\u5730\u7C7B\u540D\u79F0: <span>'+y.value[0].information.DLMC+"</span></p><p>\u6743\u5C5E\u5355\u4F4D\u540D\u79F0: <span>"+y.value[0].information.QSDWMC+"</span></p><p>\u5750\u843D\u5355\u4F4D\u540D\u79F0: <span>"+y.value[0].information.ZLDWMC+"</span></p><p>\u6263\u9664\u5730\u7C7B\u7F16\u7801: <span>"+y.value[0].information.KCDLBM+"</span></p><p>\u6263\u9664\u7CFB\u6570: <span>"+y.value[0].information.KCXS+"</span></p><p>\u6263\u9664\u9762\u79EF: <span>"+y.value[0].information.KCMJ+"</span></p><p>\u8015\u5730\u7C7B\u578B: <span>"+y.value[0].information.GDLX+"</span></p><p>\u8015\u5730\u5761\u5EA6\u7EA7\u522B: <span>"+y.value[0].information.GDPDJB+"</span></p><p>\u79CD\u690D\u5C5E\u6027\u4EE3\u7801: <span>"+y.value[0].information.ZZSXDM+"</span></p><p>\u79CD\u690D\u5C5E\u6027\u540D\u79F0: <span>"+y.value[0].information.ZZSXMC+"</span></p><p>\u6570\u636E\u5E74\u4EFD: <span>"+y.value[0].information.SJNF+"</span></p><p>\u56FE\u6591\u9762\u79EF: <span>"+(y.value[0].information.TBMJ_YS/666).toFixed(2)+"(\u4EA9)</span></p><p>\u56FE\u6591\u5730\u7C7B\u9762\u79EF: <span>"+(y.value[0].information.TBDLMJ_YS/666).toFixed(2)+"(\u4EA9)</span></p></div>"):y.value[0].name=="\u7247\u5757\u4FE1\u606F"?(G.innerHTML="\u7247\u5757\u4FE1\u606F",V.innerHTML='<div class="content-children"><p>\u6807\u8BC6\u7801: <span>'+y.value[0].information.BSM+"</span></p><p>\u8981\u7D20\u4EE3\u7801: <span>"+y.value[0].information.YSDM+"</span></p><p>\u4E24\u533A\u4EE3\u7801: <span>"+y.value[0].information.LQDM+"</span></p><p>\u4E24\u533A\u7247\u5757\u4EE3\u7801: <span>"+y.value[0].information.LQPKDM+"</span></p><p>\u4E24\u533A\u7247\u5757\u9762\u79EF(\u4EA9): <span>"+y.value[0].information.LQPKMJM+"</span></p><p>\u7247\u5757\u7C7B\u578B: <span>"+y.value[0].information.PKLX+"</span></p></div>"):y.value[0].name=="\u5730\u5757\u4FE1\u606F"?(G.innerHTML="\u5730\u5757\u4FE1\u606F",V.innerHTML='<div class="content-children"><p>\u6807\u8BC6\u7801: <span>'+y.value[0].information.BSM+"</span></p><p>\u8981\u7D20\u4EE3\u7801: <span>"+y.value[0].information.YSDM+"</span></p><p>\u4E24\u533A\u7247\u5757\u4EE3\u7801: <span>"+y.value[0].information.LQPKDM+"</span></p><p>\u4E24\u533A\u7C7B\u578B: <span>"+y.value[0].information.LQLX+"</span></p><p>\u533A\u57DF\u5212\u5206\u7C7B\u578B: <span>"+y.value[0].information.QYHFLX+"</span></p><p>\u4E24\u533A\u5730\u5757\u4EE3\u7801: <span>"+y.value[0].information.LQDKDM+"</span></p><p>\u4E24\u533A\u5730\u5757\u9762\u79EF(\u4EA9): <span>"+y.value[0].information.LQDKMJM+"</span></p><p>\u98DE\u5165\u5730\u6807\u8BC6: <span>"+y.value[0].information.FRDBS+"</span></p><p>\u5761\u5EA6\u7EA7\u522B: <span>"+y.value[0].information.PDJB+"</span></p><p>\u662F\u5426\u9AD8\u6807\u51C6\u519C\u7530: <span>"+y.value[0].information.SFGBZNT+"</span></p><p>\u7ECF\u8425\u4E3B\u4F53\u7C7B\u578B: <span>"+y.value[0].information.JYZTLX+"</span></p></div>"):y.value[0].name=="\u571F\u5730\u786E\u6743"?(G.innerHTML="\u571F\u5730\u786E\u6743",Zs({dkbm:y.value[0].information.DKBM}).then(ut=>{let Qt=[];ut.data[0].cbdkxxes.forEach(ye=>{Qt.push(ye.cyxm)}),V.innerHTML='<div class="content-children"><p>\u8981\u7D20\u4EE3\u7801: <span>'+y.value[0].information.YSDM+"</span></p><p>\u5730\u5757\u7F16\u7801: <span>"+y.value[0].information.DKBM+"</span></p><p>\u5730\u5757\u540D\u79F0: <span>"+y.value[0].information.DKMC+"</span></p><p>\u6240\u6709\u6743\u6027\u8D28: <span>"+y.value[0].information.SYQXZ+"</span></p><p>\u5730\u5757\u7C7B\u522B:<span>"+y.value[0].information.DKLB+"</span></p><p>\u571F\u5730\u5229\u7528\u7C7B\u578B: <span>"+y.value[0].information.TDLYLX+"</span></p><p>\u5730\u529B\u7B49\u7EA7: <span>"+y.value[0].information.DLDJ+"</span></p><p>\u571F\u5730\u7528\u9014: <span>"+y.value[0].information.TDYT+"</span></p><p>\u662F\u5426\u57FA\u672C\u519C\u7530: <span>"+y.value[0].information.SFJBNT+"</span></p><p>\u5B9E\u6D4B\u9762\u79EF\u4EA9: <span>"+(y.value[0].information.SCMJ/666).toFixed(2)+"</span></p><p>\u627F\u5305\u65B9: <span>"+ut.data[0].cbfmc+"</span></p><p>\u627F\u5305\u65B9\u5BB6\u5EAD\u6210\u5458:<span>"+Qt.join(",")+"</span></p></div>"})):y.value[0].name=="\u4E09\u8C03"&&(G.innerHTML="\u4E09\u8C03",V.innerHTML='<div class="content-children"><p>\u6807\u8BC6\u7801: <span>'+y.value[0].information.BSM+"</span></p><p>\u5730\u7C7B\u540D\u79F0: <span>"+y.value[0].information.DLMC+"</span></p><p>\u56FE\u6591\u9762\u79EF: <span>"+(attr.information.TBMJ/666).toFixed(2)+"(\u4EA9)</span></p><p>\u5750\u843D\u5355\u4F4D\u540D\u79F0: <span>"+attr.information.ZLDWMC+"</span></p><p>\u6743\u5C5E\u6027\u8D28: <span>"+attr.information.QSXZ+"</span></p><p>\u6743\u5C5E\u5355\u4F4D\u540D\u79F0: <span>"+attr.information.QSDWMC+"</span></p><p>\u8015\u5730\u5761\u5EA6\u7EA7\u522B: <span>"+attr.information.GDPDJB+"</span></p><p>\u98DE\u5165\u5730\u6807\u8BC6: <span>"+y.value[0].information.FRDBS+"</span></p><p>\u79CD\u690D\u7C7B\u578B: <span>"+attr.information.ZZSXMC+"</span></p></div>"));var gt=E.getLayers().getArray().find(ut=>ut.get("id")==="zhezhao");E.removeLayer(gt),A=E.getLayers().getArray().find(ut=>ut.get("id")==="dianjigaoliang"),E.removeLayer(A);var Et=new ol.format.GeoJSON().readFeatures(b.result.recordsets[0].features),q=new ol.source.Vector;q.addFeatures(Et);const C=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(255, 219, 113, 1.0)",width:5})});var rt=new ol.layer.Vector({id:"dianjigaoliang",source:q,zIndex:9999});rt.setStyle(C),E.addLayer(rt)}}),ht.addEventListener("click",function(){A=E.getLayers().getArray().find(b=>b.get("id")==="dianjigaoliang"),E.removeLayer(A),ot.setPosition(void 0)}),document.getElementById("popup-prev").addEventListener("click",function(){B.value>1&&(B.value--,ft(),B.value<=1&&(it.value=!1))}),document.getElementById("popup-next").addEventListener("click",function(b){var gt=y.value.length,Et=Math.ceil(gt/H);B.value<Et&&(B.value++,ft(),B.value==Et&&(it.value=!0))});function ft(){var b=(B.value-1)*H,gt=b+H,Et=y.value;let q=document.getElementById("popup-content");for(var rt=b;rt<gt&&rt<Et.length;rt++){var C=Et[rt];C.name>=2019?(G.innerHTML="\u9AD8\u6807\u51C6\u519C\u7530",q.innerHTML='<div class="content-children"><p>\u7C7B\u578B: <span>\u9AD8\u6807\u51C6\u519C\u7530</span></p><p>\u9879\u76EE\u7F16\u53F7: <span>'+C.information.XMBH+"</span></p><p>\u9879\u76EE\u9762\u79EF: <span>"+C.information.XMMJ+"</span></p><p>\u5730\u5757\u9762\u79EF: <span>"+C.information.DKMJ+"</span></p><p>\u6807\u8BC6\u7801: <span>"+C.information.BSM+"</span></p><p>\u5730\u5757\u7F16\u53F7: <span>"+C.information.DKBH+"</span></p><p>\u9879\u76EE\u5E74\u4EFD: <span>"+C.information.XMNF+'</span></p><p id="P-id">\u9879\u76EE\u540D\u79F0: <span>'+C.information.XMMC+"</span></p></div>"):C.name>=2011&&C.name<=2018?(G.innerHTML="\u9AD8\u6807\u51C6\u519C\u7530",q.innerHTML='<div class="content-children"><p>\u6807\u8BC6\u7801: <span>'+C.information.BSM+"</span></p><p>\u5730\u5757\u9762\u79EF: <span>"+C.information.DIKUAIAREA+"</span></p><p>\u5730\u5757\u7528\u9014/\u7C7B\u578B: <span>"+C.information.DLBM+"</span></p><p>\u9879\u76EE\u7F16\u53F7: <span>"+C.information.XMBH+'</span></p><p id="P-id">\u9879\u76EE\u540D\u79F0:<span>'+C.information.XMMC+"</span></p></div>"):C.name=="\u6C38\u4E45\u57FA\u672C\u519C\u7530"?(G.innerHTML="\u6C38\u4E45\u57FA\u672C\u519C\u7530",q.innerHTML='<div class="content-children"><p>\u7C7B\u578B: <span>'+C.name+"</span></p><p>\u5730\u7C7B\u540D\u79F0: <span>"+C.information.DLMC+"</span></p><p>\u6743\u5C5E\u6027\u8D28: <span>"+C.information.QSXZ+"</span></p><p>\u6743\u5C5E\u5355\u4F4D\u540D\u79F0: <span>"+C.information.QSDWMC+"</span></p><p>\u5750\u843D\u5355\u4F4D\u540D\u79F0: <span>"+C.information.ZLDWMC+"</span></p><p>\u6263\u9664\u5730\u7C7B\u7F16\u7801: <span>"+C.information.KCDLBM+"</span></p><p>\u6263\u9664\u7CFB\u6570: <span>"+C.information.KCXS+"</span></p><p>\u6263\u9664\u9762\u79EF: <span>"+C.information.KCMJ+"</span></p><p>\u8015\u5730\u7C7B\u578B: <span>"+C.information.GDLX+"</span></p><p>\u8015\u5730\u5761\u5EA6\u7EA7\u522B: <span>"+C.information.GDPDJB+"</span></p><p>\u79CD\u690D\u5C5E\u6027\u4EE3\u7801: <span>"+C.information.ZZSXDM+"</span></p><p>\u79CD\u690D\u5C5E\u6027\u540D\u79F0: <span>"+C.information.ZZSXMC+"</span></p><p>\u8015\u5730\u7B49\u7EA7: <span>"+C.information.GDDJ+"</span></p><p>\u6570\u636E\u5E74\u4EFD: <span>"+C.information.SJNF+"</span></p><p>\u4FDD\u62A4\u5F00\u59CB\u65F6\u95F4: <span>"+C.information.BHKSSJ+"</span></p><p>\u6C38\u4E45\u57FA\u672C\u519C\u7530\u9762\u79EF: <span>"+(C.information.YJJBNTMJ_Y/666).toFixed(2)+"(\u4EA9)</span></p></div>"):C.name=="\u8015\u5730"?(G.innerHTML="\u8015\u5730",q.innerHTML='<div class="content-children"><p>\u7C7B\u578B: <span>'+C.name+"</span></p><p>\u5730\u7C7B\u540D\u79F0: <span>"+C.information.DLMC+"</span></p><p>\u6743\u5C5E\u5355\u4F4D\u540D\u79F0: <span>"+C.information.QSDWMC+"</span></p><p>\u5750\u843D\u5355\u4F4D\u540D\u79F0: <span>"+C.information.ZLDWMC+"</span></p><p>\u6263\u9664\u5730\u7C7B\u7F16\u7801: <span>"+C.information.KCDLBM+"</span></p><p>\u6263\u9664\u7CFB\u6570: <span>"+C.information.KCXS+"</span></p><p>\u6263\u9664\u9762\u79EF: <span>"+C.information.KCMJ+"</span></p><p>\u8015\u5730\u7C7B\u578B: <span>"+C.information.GDLX+"</span></p><p>\u8015\u5730\u5761\u5EA6\u7EA7\u522B: <span>"+C.information.GDPDJB+"</span></p><p>\u79CD\u690D\u5C5E\u6027\u4EE3\u7801: <span>"+C.information.ZZSXDM+"</span></p><p>\u79CD\u690D\u5C5E\u6027\u540D\u79F0: <span>"+C.information.ZZSXMC+"</span></p><p>\u6570\u636E\u5E74\u4EFD: <span>"+C.information.SJNF+"</span></p><p>\u56FE\u6591\u9762\u79EF: <span>"+(C.information.TBMJ_YS/666).toFixed(2)+"(\u4EA9)</span></p><p>\u56FE\u6591\u5730\u7C7B\u9762\u79EF: <span>"+(C.information.TBDLMJ_YS/666).toFixed(2)+"(\u4EA9)</span></p></div>"):C.name=="\u7247\u5757\u4FE1\u606F"?(G.innerHTML="\u7247\u5757\u4FE1\u606F",q.innerHTML='<div class="content-children"><p>\u7C7B\u578B: <span>'+C.name+"</span></p><p>\u6807\u8BC6\u7801: <span>"+C.information.BSM+"</span></p><p>\u8981\u7D20\u4EE3\u7801: <span>"+C.information.YSDM+"</span></p><p>\u4E24\u533A\u4EE3\u7801: <span>"+C.information.LQDM+"</span></p><p>\u4E24\u533A\u7247\u5757\u4EE3\u7801: <span>"+C.information.LQPKDM+"</span></p><p>\u4E24\u533A\u7247\u5757\u9762\u79EF(\u4EA9): <span>"+C.information.LQPKMJM+"</span></p><p>\u7247\u5757\u7C7B\u578B: <span>"+C.information.PKLX+"</span></p></div>"):C.name=="\u5730\u5757\u4FE1\u606F"?(G.innerHTML="\u5730\u5757\u4FE1\u606F",q.innerHTML='<div class="content-children"><p>\u7C7B\u578B: <span>'+C.name+"</span></p><p>\u6807\u8BC6\u7801: <span>"+C.information.BSM+"</span></p><p>\u8981\u7D20\u4EE3\u7801: <span>"+C.information.YSDM+"</span></p><p>\u4E24\u533A\u7247\u5757\u4EE3\u7801: <span>"+C.information.LQPKDM+"</span></p><p>\u4E24\u533A\u7C7B\u578B: <span>"+C.information.LQLX+"</span></p><p>\u533A\u57DF\u5212\u5206\u7C7B\u578B: <span>"+C.information.QYHFLX+"</span></p><p>\u4E24\u533A\u5730\u5757\u4EE3\u7801: <span>"+C.information.LQDKDM+"</span></p><p>\u4E24\u533A\u5730\u5757\u540D\u79F0: <span>"+C.information.LQDKMC+"</span></p><p>\u4E24\u533A\u5730\u5757\u9762\u79EF(\u4EA9): <span>"+C.information.LQDKMJM+"</span></p><p>\u98DE\u5165\u5730\u6807\u8BC6: <span>"+C.information.FRDBS+"</span></p><p>\u5761\u5EA6\u7EA7\u522B: <span>"+C.information.PDJB+"</span></p><p>\u662F\u5426\u9AD8\u6807\u51C6\u519C\u7530: <span>"+C.information.SFGBZNT+"</span></p><p>\u7ECF\u8425\u4E3B\u4F53\u7C7B\u578B: <span>"+C.information.JYZTLX+"</span></p></div>"):C.name=="\u571F\u5730\u786E\u6743"?(G.innerHTML="\u571F\u5730\u786E\u6743",Zs({dkbm:C.information.DKBM}).then(ut=>{let Qt=[];ut.data[0].cbdkxxes.forEach(ye=>{Qt.push(ye.cyxm)}),q.innerHTML='<div class="content-children"><p>\u7C7B\u578B: <span>'+C.name+"</span></p><p>\u8981\u7D20\u4EE3\u7801: <span>"+C.information.YSDM+"</span></p><p>\u5730\u5757\u7F16\u7801: <span>"+C.information.DKBM+"</span></p><p>\u5730\u5757\u540D\u79F0: <span>"+C.information.DKMC+"</span></p><p>\u6240\u6709\u6743\u6027\u8D28: <span>"+C.information.SYQXZ+"</span></p><p>\u5730\u5757\u7C7B\u522B:<span>"+C.information.DKLB+"</span></p><p>\u571F\u5730\u5229\u7528\u7C7B\u578B: <span>"+C.information.TDLYLX+"</span></p><p>\u5730\u529B\u7B49\u7EA7: <span>"+C.information.DLDJ+"</span></p><p>\u571F\u5730\u7528\u9014: <span>"+C.information.TDYT+"</span></p><p>\u662F\u5426\u57FA\u672C\u519C\u7530: <span>"+C.information.SFJBNT+"</span></p><p>\u5B9E\u6D4B\u9762\u79EF\u4EA9: <span>"+(C.information.SCMJ/666).toFixed(2)+"</span></p><p>\u627F\u5305\u65B9: <span>"+ut.data[0].cbfmc+"</span></p><p>\u627F\u5305\u65B9\u5BB6\u5EAD\u6210\u5458:<span>"+Qt.join(",")+"</span></p></div>"})):C.name=="\u4E09\u8C03"&&(G.innerHTML="\u4E09\u8C03",q.innerHTML='<div class="content-children"><p>\u6807\u8BC6\u7801: <span>'+y.value[0].information.BSM+"</span></p><p>\u5730\u7C7B\u540D\u79F0: <span>"+y.value[0].information.DLMC+"</span></p><p>\u56FE\u6591\u9762\u79EF: <span>"+(C.information.TBMJ/666).toFixed(2)+"(\u4EA9)</span></p><p>\u5750\u843D\u5355\u4F4D\u540D\u79F0: <span>"+C.information.ZLDWMC+"</span></p><p>\u6743\u5C5E\u6027\u8D28: <span>"+C.information.QSXZ+"</span></p><p>\u6743\u5C5E\u5355\u4F4D\u540D\u79F0: <span>"+C.information.QSDWMC+"</span></p><p>\u8015\u5730\u5761\u5EA6\u7EA7\u522B: <span>"+C.information.GDPDJB+"</span></p><p>\u98DE\u5165\u5730\u6807\u8BC6: <span>"+y.value[0].information.FRDBS+"</span></p><p>\u79CD\u690D\u7C7B\u578B: <span>"+C.information.ZZSXMC+"</span></p></div>")}}}const Pi=()=>{document.getElementById("popup"),V=document.getElementById("popup-content"),ht=document.getElementById("popup-closer"),ot=new ol.Overlay({element:document.getElementById("popup"),positioning:"bottom-center",stopEvent:!0,offset:[0,-10]}),E.addOverlay(ot)};function vt(S,m){var I=E.getView();I.animate({center:[S,m],duration:1e3,zoom:17})}function Bt(S){let m="",I="",R="",L="",O="";!S.villageValue&&S.value?(I=`${serverAPI.geoserverUrl2}/data-liangquhuadingWGS84/rest/data`,m=S.value,R="XJQY3702112019WGS84",L="liangquhuadingWGS84",O="XJQYMC"):S.value&&S.villageValue&&(I=`${serverAPI.geoserverUrl2}/data-liangquhuadingWGS84/rest/data`,m=S.villageValue,R="CJQY3702112019WGS84",L="liangquhuadingWGS84",O="CJQYMC");var G=new ol.supermap.GetFeaturesBySQLParameters({queryParameter:{name:`${R}@${L}`,attributeFilter:`${O} like '%${m}%'`},datasetNames:[`${L}:${R}`]});new ol.supermap.FeatureService(I).getFeaturesBySQL(G,function(A){if(A.result.featureCount!=0){var B=E.getLayers().getArray().find(q=>q.get("id")==="zhezhao");E.removeLayer(B);var H=E.getLayers().getArray().find(q=>q.get("id")==="dianjigaoliang");E.removeLayer(H);var ft=new ol.format.GeoJSON().readFeatures(A.result.features),b=new ol.source.Vector;b.addFeatures(ft);const Et=new ol.style.Style({stroke:new ol.style.Stroke({color:"rgba(85, 255, 255, 1.0)",width:2})});var gt=new ol.layer.Vector({id:"dianjigaoliang",source:b});gt.setStyle(Et),E.addLayer(gt),E.getView().fit(b.getExtent())}})}function be(S,m){const I=[];I.push(S.Lon),I.push(S.Lat),xn(I,m.setOf,`${serverAPI.geoserverUrl2}/${m.name}/rest/maps/${m.setOf}`)}function xn(S,m,I){var R=new ol.geom.Point(S),L=new ol.supermap.QueryByGeometryParameters({queryParams:{name:m},geometry:R});new ol.supermap.QueryService(I).queryByGeometry(L,function(O){if(O.result.currentCount>0){var G=E.getLayers().getArray().find(gt=>gt.get("id")==="zhezhao");E.removeLayer(G);var A=E.getLayers().getArray().find(gt=>gt.get("id")==="dianjigaoliang");E.removeLayer(A);var B=new ol.format.GeoJSON().readFeatures(O.result.recordsets[0].features),H=new ol.source.Vector;H.addFeatures(B);const b=new ol.style.Style({fill:new ol.style.Fill({color:"rgba(0, 255, 0, 0.1)"}),stroke:new ol.style.Stroke({color:"rgba(85, 255, 255, 1.0)",width:2})});var ft=new ol.layer.Vector({id:"dianjigaoliang",source:H});ft.setStyle(b),E.addLayer(ft),E.getView().fit(H.getExtent())}else vt(S[0],S[1])})}const Gi=()=>{c=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl2+"/map-huangdaoqu_bianjie/rest/maps/CJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"CJQY3702112019WGS84",projection:"EPSG:4326",zIndex:9999}),E.addLayer(c)},Bi=()=>{var S=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl2+"/map-huangdaoqu_bianjie/rest/maps/XJQY3702112019WGS84%40huangdaoqu_bianjie",cacheEnabled:!1}),name:"XJQY3702112019WGS84",projection:"EPSG:4326",zIndex:9999});E.addLayer(S)},De=S=>{let m=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:`${serverAPI.geoserverUrl2}/${S.name}/rest/maps/${S.setOf}`,cacheEnabled:!1}),name:S.name,projection:"EPSG:4326",zIndex:S.name=="map-liangqudikuaixk"?9998:999});E.addLayer(m)},Ni=S=>{let m=new ol.layer.Tile({source:new ol.source.TileSuperMapRest({url:serverAPI.geoserverUrl2+`/map-ugcv5-${S.name}${S.setOf}/rest/maps/${S.name}@${S.setOf}`,cacheEnabled:!1}),name:S.name,projection:"EPSG:4326"});E.addLayer(m)};z({label:[]});function yn(){if(i.value=!i.value,i.value){let S=document.querySelector(".rightWra");S.style.transform="translate(0,0)"}else{let S=document.querySelector(".rightWra");S.style.transform="translate(101%,0)"}}const Wi=(S,m)=>{let I=!1;if(u.value.forEach((R,L)=>{if(S.label==R)u.value.splice(L,1),I=!0;else if(S.label=="\u9AD8\u6807\u51C6\u519C\u7530")for(const O in K)u.value.indexOf(O)!==-1&&(u.value.splice(u.value.indexOf(O),1),I=!0,p.value=[])}),!I)if(S.label=="\u9AD8\u6807\u51C6\u519C\u7530")for(const R in K)u.value.push(R);else for(const R in P)S.label==R&&u.value.push(R);S.label=="\u9AD8\u6807\u51C6\u519C\u7530"&&(x.value=!x.value,x.value?U=z({2012:!1,2013:!1,2014:!1,2015:!1,2016:!1,2017:!1,2018:!1,2019:!1,2020:!1,2021:!1,2022:!1}):U=z({2012:!0,2013:!0,2014:!0,2015:!0,2016:!0,2017:!0,2018:!0,2019:!0,2020:!0,2021:!0,2022:!0})),p.value.forEach(R=>{u.value.indexOf(R)!==-1&&u.value.splice(u.value.indexOf(R),1)}),f.value=JSON.parse(JSON.stringify(u.value))},ue=(S,{node:m,data:I})=>{if(m.data.children)return S("span",{class:{gbz:!I.children}},m.label);switch(m.label){case"\u9AD8\u6807\u51C6\u519C\u7530":return S("span",{class:{gbz:!I.children},style:{"border-radius":"2px",background:" rgba(42, 167, 44, 1)",border:"2px solid rgba(254, 255, 181, 1)",padding:"5px 15px 5px 15px"}},m.label);case"\u6C38\u4E45\u57FA\u672C\u519C\u7530":return S("span",{class:{yjjbnt:!I.children},style:{"border-radius":"2px",background:"rgba(242, 145, 61, 1)",border:"2px solid rgba(254, 255, 181, 1)",padding:"5px 15px 5px 15px"}},m.label);case"\u8015\u5730":return S("span",{class:{gd:!I.children},style:{"border-radius":"2px",background:"rgba(242, 221, 61, 1)",border:"2px solid rgba(254, 255, 181, 1)",padding:"5px 15px 5px 15px"}},m.label);case"\u7247\u5757\u4FE1\u606F":return S("span",{class:{pkxx:!I.children},style:{"border-radius":"2px",background:"rgba(255, 151, 148, 1)",border:"2px solid rgba(254, 255, 181, 1)",padding:"5px 15px 5px 15px"}},m.label);case"\u5730\u5757\u4FE1\u606F":return S("span",{class:{dkxx:!I.children},style:{"border-radius":"2px",background:"rgba(114, 138, 223, 1)",border:"2px solid rgba(254, 255, 181, 1)",padding:"5px 15px 5px 15px"}},m.label);case"\u7CAE\u98DF\u529F\u80FD\u533A":return S("span",{class:{gbz:!I.children},style:{"border-radius":"2px",background:"rgba(242, 145, 61, 1)",border:"2px solid rgba(254, 255, 181, 1)",padding:"5px 15px 5px 15px"}},m.label);case"\u571F\u5730\u786E\u6743":return S("span",{class:{tdqq:!I.children},style:{"border-radius":"2px",background:"rgba(56, 192, 255, 1)",border:"2px solid rgba(254, 255, 181, 1)",padding:"5px 15px 5px 15px"}},m.label);case"\u4E09\u8C03":return S("span",{class:{gbz:!I.children},style:{"border-radius":"2px",background:"rgba(0,255,0)",border:"2px solid rgba(254, 255, 181, 1)",padding:"5px 15px 5px 15px"}},m.label)}},de=S=>{d.value=S},Sn=()=>{s.value="",o.value="",a.value.Lon="",a.value.Lat="",l.value.Lon.londu="",l.value.Lon.lonfen="",l.value.Lon.lonmiao="",l.value.Lat.latdu="",l.value.Lat.latfen="",l.value.Lat.latmiao="";var S=E.getLayers().getArray().find(I=>I.get("id")==="dianjigaoliang");E.removeLayer(S);var m=E.getView();m.animate({center:["119.88661841637813","35.85667692242919"],duration:1e3,zoom:11})},vn=()=>{d.value==1?Bt({villageValue:s.value,value:o.value}):d.value==2?Bt({villageValue:s.value,value:T.value}):d.value==3?u.value.length>0?u.value.forEach(S=>{P[S]?be(a.value,P[S]):K[S]&&be(a.value,K[S])}):a.value.Lon.length>0&&a.value.Lat.length>0?vt(a.value.Lon,a.value.Lat):ms.error("\u8BF7\u8F93\u5165\u7ECF\u7EAC\u5EA6"):d.value==4&&(u.value.lengt>0?u.value.forEach(S=>{P[S]?be({Lon:Ht(l.value.Lon.londu,l.value.Lon.lonfen,l.value.Lon.lonmiao),Lat:Ht(l.value.Lat.latdu,l.value.Lat.latfen,l.value.Lat.latmiao)},P[S]):K[S]&&be({Lon:Ht(l.value.Lon.londu,l.value.Lon.lonfen,l.value.Lon.lonmiao),Lat:Ht(l.value.Lat.latdu,l.value.Lat.latfen,l.value.Lat.latmiao)},K[S])}):l.value.Lon.londu.length>0&&l.value.Lon.lonfen.length>0&&l.value.Lon.lonmiao.length>0&&l.value.Lat.latdu.length>0&&l.value.Lat.latfen.length>0&&l.value.Lat.latmiao.length>0?vt(Ht(l.value.Lon.londu,l.value.Lon.lonfen,l.value.Lon.lonmiao),Ht(l.value.Lat.latdu,l.value.Lat.latfen,l.value.Lat.latmiao)):ms.error("\u8BF7\u8F93\u5165\u7ECF\u7EAC\u5EA6"))};function Ht(S,m,I){var R=0;I!=null&&I!==""&&(R=Number(I/60));var L=0;m!=null&&m!==""?L=(Number(m)+R)/60:L=R;var O=0;return S!=null&&S!==""?O=(Number(S)+L).toFixed(6):O=L.toFixed(6),O}const Xi=S=>{let m=S.target.innerText;U.value[m]=!U.value[m],f.value.indexOf(m)==-1?(f.value.push(m),De(K[m]),p.value.indexOf(m)!==-1&&p.value.splice(p.value.indexOf(m),1)):(p.value.push(m),f.value.splice(f.value.indexOf(m),1),E.getLayers().getArray().forEach((I,R)=>{I.A.name&&I.A.source.options.url==`${serverAPI.geoserverUrl2}/${K[m].name}/rest/maps/${K[m].setOf}`&&E.getLayers().removeAt(R)}))},$e=S=>{switch(S.target.innerText){case"\u9AD8\u6807\u51C6\u519C\u7530":g.value=1,W.value="\u9AD8\u6807\u51C6\u519C\u7530",Ft("\u9AD8\u6807\u51C6\u519C\u7530");break;case"\u6C38\u4E45\u57FA\u672C\u519C\u7530":g.value=2,W.value="\u6C38\u4E45\u57FA\u672C\u519C\u7530",Ft("\u6C38\u4E45\u57FA\u672C\u519C\u7530");break;case"\u8015\u5730":g.value=3,W.value="\u8015\u5730",Ft("\u8015\u5730");break;case"\u7247\u5757\u4FE1\u606F":g.value=4,W.value="\u7247\u5757\u4FE1\u606F",Ft("\u4E24\u533A\u7247\u5757");break;case"\u5730\u5757\u4FE1\u606F":g.value=5,W.value="\u5730\u5757\u4FE1\u606F",Ft("\u4E24\u533A\u5730\u5757");break;case"\u571F\u5730\u786E\u6743":g.value=6,W.value="\u571F\u5730\u786E\u6743",Ft("\u571F\u5730\u786E\u6743");break}},Cn=S=>{k.value.forEach(m=>{m.cjqydm==o.value&&(T.value=m.cjqymc)}),Tn({divisions:o.value}).then(m=>{r.value=m.data})},ke=()=>{Tn().then(S=>{k.value=S.data})},Ft=S=>{ve({flag:S}).then(m=>{Z.value=m.data[m.data.length-1].zSum,Y.value=m.data[m.data.length-1].zQuantity,v.value=m.data,Vi()})},fe=S=>{Tn().then(m=>{w.value=m.data})},ti=S=>{switch(g.value){case 1:ve({flag:"\u9AD8\u6807\u51C6\u519C\u7530",whetherToDownload:!0}).then(m=>{Fe(m.data[m.data.length-1].downloadPath)});break;case 2:ve({flag:"\u6C38\u4E45\u57FA\u672C\u519C\u7530",whetherToDownload:!0}).then(m=>{Fe(m.data[m.data.length-1].downloadPath)});break;case 3:ve({flag:"\u8015\u5730",whetherToDownload:!0}).then(m=>{Fe(m.data[m.data.length-1].downloadPath)});break;case 4:ve({flag:"\u4E24\u533A\u7247\u5757",whetherToDownload:!0}).then(m=>{Fe(m.data[m.data.length-1].downloadPath)});break;case 5:ve({flag:"\u4E24\u533A\u5730\u5757",whetherToDownload:!0}).then(m=>{Fe(m.data[m.data.length-1].downloadPath)});break;case 6:ve({flag:"\u571F\u5730\u786E\u6743",whetherToDownload:!0}).then(m=>{Fe(m.data[m.data.length-1].downloadPath)});break}},ei=new ne({fill:new mt({color:"rgba(255, 255, 255, 0.2)"}),stroke:new le({color:"rgba(255, 219, 113, 1.0)",lineDash:[10,10],width:2}),image:new Li({radius:5,stroke:new le({color:"rgba(0, 0, 0, 0.7)"}),fill:new mt({color:"rgba(255, 255, 255, 0.2)"})})}),ge=new ne({text:new di({font:"12px Calibri,sans-serif",fill:new mt({color:"rgba(255, 255, 255, 1)"}),backgroundFill:new mt({color:"rgba(0, 0, 0, 0.4)"}),padding:[2,2,2,2],textBaseline:"bottom",offsetY:-12}),image:new fn({radius:6,points:3,angle:Math.PI,displacement:[0,8],fill:new mt({color:"rgba(0, 0, 0, 0.4)"})})}),Kt=new ne({image:new Li({radius:5,stroke:new le({color:"rgba(0, 0, 0, 0.7)"}),fill:new mt({color:"rgba(0, 0, 0, 0.4)"})}),text:new di({text:"Drag to modify",font:"12px Calibri,sans-serif",fill:new mt({color:"rgba(255, 255, 255, 1)"}),backgroundFill:new mt({color:"rgba(0, 0, 0, 0.7)"}),padding:[2,2,2,2],textAlign:"left",offsetX:15})}),pe=[ge];var ii,Ot,Nt,me;function ni(){me&&(E.removeLayer(me),me=null),Ot&&(E.removeInteraction(Ot),Ot=null),Nt=null}function Yi(){e.value=!e.value,ni(),oi("length")}function zi(){e.value=!e.value,ni(),oi("area")}function si(){e.value=!e.value,ni()}const ri=new ne({text:new di({font:"12px Calibri,sans-serif",fill:new mt({color:"red"}),backgroundFill:new mt({color:"rgba(0, 0, 0, 0.4)"}),padding:[2,2,2,2],textAlign:"left",offsetX:15})}),_e=new ne({text:new di({font:"14px Calibri,sans-serif",fill:new mt({color:"rgba(255, 255, 255, 1)"}),backgroundFill:new mt({color:"rgba(0, 0, 0, 0.4)"}),padding:[3,3,3,3],textBaseline:"bottom",offsetY:-15}),image:new fn({radius:8,points:3,angle:Math.PI,displacement:[0,10],fill:new mt({color:"rgba(0, 0, 0, 0.4)"})})});var qt=function(S){var m=Tr(S,{projection:E.getView().getProjection()}),I;return m>1e3?I=Math.round(m/1e3*100)/100+" km":I=Math.round(m*100)/100+" m",I},xe=function(S){var m=br(S,{projection:E.getView().getProjection()}),I;return m>1e4?I=Math.round(m/1e6*100)/100+" km\xB2":I=Math.round(m*100)/100+" m\xB2",I};function Jt(S,m,I,R){const L=[ei],O=S.getGeometry(),G=O.getType();let A,B,H;if((!I||I===G)&&(G==="Polygon"?(A=O.getInteriorPoint(),B=xe(O),H=new Qs(O.getCoordinates()[0])):G==="LineString"&&(A=new Ci(O.getLastCoordinate()),B=qt(O),H=O)),m&&H){let ft=0;H.forEachSegment(function(b,gt){const Et=new Qs([b,gt]),q=qt(Et);pe.length-1<ft&&pe.push(ge.clone());const rt=new Ci(Et.getCoordinateAt(.5));pe[ft].setGeometry(rt),pe[ft].getText().setText(q),L.push(pe[ft]),ft++})}return B&&(_e.setGeometry(A),_e.getText().setText(B),L.push(_e)),R&&G==="Point"&&!Nt.getOverlay().getSource().getFeatures().length&&(ii=O,ri.getText().setText(R),L.push(ri)),L}function oi(S){let m=S==="area"?"Polygon":"LineString",I="\u53CC\u51FB\u53F3\u952E\u7ED3\u675F\u7ED8\u5236",R="\u8BF7\u70B9\u51FB\u9F20\u6807\u53F3\u952E\u5F00\u59CB\u7ED8\u5236",L=R,O=new Xr;Nt=new rc({source:O,style:Kt}),me=new no({source:O,zIndex:9998,style:function(G){return Jt(G,!0)}}),E.addLayer(me),Ot=new ol.interaction.Draw({source:O,type:m,style:function(G){return Jt(G,!0,m,L)},condition:function(G){return G.originalEvent.buttons===2}}),E.addInteraction(Ot),Ot.on("drawstart",function(G){O.clear(),Nt.setActive(!1),L=I},this),Ot.on("drawend",function(){Kt.setGeometry(ii),Nt.setActive(!0),E.once("pointermove",function(){Kt.setGeometry()}),L=R},this)}function Vi(){const S=Co(h.value);let m=[],I=[],R=[],L=[{type:"bar",yAxisIndex:0,name:"\u9762\u79EF(\u4EA9)",barWidth:"15",itemStyle:{normal:{color:new ai(0,0,0,1,[{offset:0,color:"rgba(255, 211, 81, 1)"},{offset:1,color:"rgba(255, 211, 81, 0)"}],!1),barBorderRadius:[100,100,0,0]}},renderItem:function(A,B){},data:I}];g.value=="1"?v.value.forEach(A=>{m.indexOf(A.year)==-1&&(m.push(A.name),I.push(A.sum))}):g.value=="2"?v.value.forEach(A=>{m.push(A.name),I.push(A.sum),R.push(A.quantity?A.quantity:0)}):g.value=="3"?(v.value.forEach(A=>{m.push(A.name),I.push(A.sum),R.push(A.quantity?A.quantity:0)}),L.push({type:"bar",yAxisIndex:0,name:"\u6570\u91CF(\u4E2A)",barWidth:"15",itemStyle:{normal:{color:new ai(0,0,0,1,[{offset:0,color:"rgba(0, 209, 195, 0.8)"},{offset:1,color:"rgba(0, 209, 195, 0)"}],!1),barBorderRadius:[100,100,0,0]}},renderItem:function(A,B){},data:R})):g.value=="4"?(v.value.forEach(A=>{m.push(A.name),I.push(A.sum),R.push(A.quantity?A.quantity:0)}),L.push({type:"bar",yAxisIndex:0,name:"\u6570\u91CF(\u4E2A)",barWidth:"15",itemStyle:{normal:{color:new ai(0,0,0,1,[{offset:0,color:"rgba(0, 209, 195, 0.8)"},{offset:1,color:"rgba(0, 209, 195, 0)"}],!1),barBorderRadius:[100,100,0,0]}},renderItem:function(A,B){},data:R})):g.value=="5"?(v.value.forEach(A=>{m.push(A.name),I.push(A.sum),R.push(A.quantity?A.quantity:0)}),L.push({type:"bar",yAxisIndex:0,name:"\u6570\u91CF(\u4E2A)",barWidth:"15",itemStyle:{normal:{color:new ai(0,0,0,1,[{offset:0,color:"rgba(0, 209, 195, 0.8)"},{offset:1,color:"rgba(0, 209, 195, 0)"}],!1),barBorderRadius:[100,100,0,0]}},renderItem:function(A,B){},data:R})):g.value=="6"&&(v.value.forEach(A=>{m.push(A.name),I.push(A.sum),R.push(A.quantity?A.quantity:0)}),L.push({type:"bar",yAxisIndex:0,name:"\u6570\u91CF(\u4E2A)",barWidth:"15",itemStyle:{normal:{color:new ai(0,0,0,1,[{offset:0,color:"rgba(0, 209, 195, 0.8)"},{offset:1,color:"rgba(0, 209, 195, 0)"}],!1),barBorderRadius:[100,100,0,0]}},renderItem:function(A,B){},data:R}));let O=10/m.length*100;if(g.value==1){let ft=function(q,rt){const C=[];return q.forEach((ut,Qt)=>{const ye=[];for(let gs=0;gs<Qt;gs++)ye.push("");ut&&(ye.push(ut),C.push({name:rt,type:"bar",xAxisIndex:Qt,barWidth:10,data:ye}))}),C},A=[],B=[],H=[];v.value.forEach(q=>{A.indexOf(q.year)==-1&&A.push(q.year)}),v.value.forEach(q=>{let rt=[];A.forEach((C,ut)=>{C==q.year?rt.push(q.sum):rt.push(void 0)}),B.push(rt)}),B.forEach((q,rt)=>{H.push(...ft(B[rt],`${v.value[rt].name}`))});let b={xAxis:A.map((q,rt)=>{const C=Array(A.length).fill("");return C[rt]=q+"\u5E74",{type:"category",position:"bottom",data:C,axisLine:{lineStyle:{color:"rgba(153, 153, 153, 1)"}}}}),grid:{top:"10%",left:"5%",right:"5%",bottom:"0%",containLabel:!0},yAxis:{type:"value",axisLabel:{interval:0,color:"rgba(153, 153, 153, 1)"}},tooltip:{trigger:"axis",triggerOn:"click",enterable:!0,hideDelay:200,extraCssText:"max-width:200%;max-height:83%; overflow: auto;",axisPointer:{type:"shadow"},textStyle:{color:"#CFE3FC"},borderWidth:1,formatter:function(q){var rt='<div class="aaa" style="height: auto;max-height: 240px;overflow-y: auto;">';return q.forEach(C=>{if(C.value>0){for(let ut=0;ut<v.value.length;ut++)v.value[ut].name==C.seriesName&&(rt+=`<div style='height: auto;color:${C.color};border:1px solid${C.color};margin:5px 0;padding:5px'><div>${v.value[ut].name}:</div>
|
|
\u6295\u8D44\u91D1\u989D\uFF1A${v.value[ut].quantity} \u4E07\u5143<br/>
|
|
\u9762\u79EF\uFF1A${v.value[ut].sum} \u4EA9
|
|
</div>`);rt+="</div>"}}),rt}},dataZoom:[{type:"slider",width:"40%",zoomLock:!0,top:"78%",start:0,end:O/3,show:!0,showDataShadow:!1,showDetail:!1,fillerColor:"rgba(64, 158, 255)",borderRadius:"50%",moveHandleSize:0,moveHandleStyle:{},left:"35%",height:12,handleSize:"80%",handleIcon:"path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z",handleStyle:{borderWidth:0,color:"rgba(64, 158, 255)"}},{type:"inside"}],series:H},gt=window.document.querySelector(".Farmland_area");gt.style.height="350px",b&&S.setOption(b,{notMerge:!0,grid:{bottom:20}}),_s(S,b),vo().listenTo(h.value,()=>{co(()=>{S.resize()})})}else{var G={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(9, 24, 48, 0.5)",borderColor:"rgba(75, 253, 238, 0.4)",textStyle:{color:"#CFE3FC"},borderWidth:1},grid:{left:"10px",right:"10px",top:"10px",bottom:"10px",containLabel:!0},toolbox:{show:!0,orient:"vertical",x:"right",y:"center"},dataZoom:[{type:"slider",width:"40%",zoomLock:!0,top:"90%",start:0,end:O/3,show:!1,showDataShadow:!1,showDetail:!1,fillerColor:"rgba(64, 158, 255)",borderRadius:"50%",moveHandleSize:0,moveHandleStyle:{},left:"35%",height:12,handleSize:"80%",handleIcon:"path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z",handleStyle:{borderWidth:0,color:"rgba(64, 158, 255)"}},{type:"inside"}],xAxis:[{type:"category",boundaryGap:!0,axisTick:{show:!1},data:m,axisLine:{lineStyle:{color:"rgba(120, 160, 236, 1)"}},axisLabel:{interval:0,color:"rgba(153, 153, 153, 1)",fontSize:14}}],yAxis:[{type:"value",axisTick:{show:!0},axisLine:{show:!0,lineStyle:{color:"rgba(120, 160, 236, 1)"},symbol:["none","arrow"],symbolSize:[5,12],symbolOffset:[0,10]},max:102,axisLabel:{interval:0,color:"rgba(153, 153, 153, 1)"},splitLine:{show:!1,lineStyle:{color:"rgba(39, 57, 75, 1)",width:1,type:"solid"}}}],series:L};let A=window.document.querySelector(".Farmland_area");A.style.height="70%",G&&S.setOption(G,{notMerge:!0,grid:{bottom:20}}),_s(S,G)}}return(S,m)=>{const I=Wt("el-option"),R=Wt("el-select"),L=Wt("el-input"),O=Wt("el-button"),G=Wt("el-col"),A=Wt("el-row"),B=Wt("el-icon"),H=Wt("el-tooltip"),ft=Wt("el-tree");return nt(),lt("div",oc,[ac,F("div",lc,[F("div",hc,[cc,F("div",uc,[F("p",{class:Zi(D(d)=="2"?"SelectedDiv":""),onClick:m[0]||(m[0]=b=>de(2))},"\u884C\u653F\u533A",2),F("p",{class:Zi(D(d)=="3"?"SelectedDiv":""),onClick:m[1]||(m[1]=b=>de(3))},"\u7ECF\u7EAC\u5EA6",2),F("p",{class:Zi(D(d)=="4"?"SelectedDiv":""),onClick:m[2]||(m[2]=b=>de(4))},"\u5EA6\u5206\u79D2",2)]),F("div",dc,[D(d)=="2"?(nt(),lt("div",fc,[$(R,{onChange:m[3]||(m[3]=b=>Cn()),"popper-class":"select_city",modelValue:D(o),"onUpdate:modelValue":m[4]||(m[4]=b=>ps(o)?o.value=b:o=b),placeholder:"\u8BF7\u9009\u62E9\u9547"},{default:et(()=>[(nt(!0),lt(En,null,Rn(D(w),b=>(nt(),Ui(I,{key:b.cjqydm,label:b.cjqymc,value:b.cjqydm},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),$(R,{"popper-class":"select_city",modelValue:D(s),"onUpdate:modelValue":m[5]||(m[5]=b=>ps(s)?s.value=b:s=b),placeholder:"\u8BF7\u9009\u62E9\u6751"},{default:et(()=>[(nt(!0),lt(En,null,Rn(D(r),b=>(nt(),Ui(I,{key:b.cjqydm,label:b.cjqymc,value:b.cjqymc},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):pt("",!0),D(d)=="3"?(nt(),lt("div",gc,[F("div",pc,[at(" \u7ECF\u5EA6\uFF1A "),$(L,{class:"seach_input",modelValue:D(a).Lon,"onUpdate:modelValue":m[6]||(m[6]=b=>D(a).Lon=b),placeholder:"\u8BF7\u8F93\u5165\u7ECF\u5EA6",clearable:""},null,8,["modelValue"])]),F("div",mc,[at(" \u7EAC\u5EA6\uFF1A "),$(L,{class:"seach_input",modelValue:D(a).Lat,"onUpdate:modelValue":m[7]||(m[7]=b=>D(a).Lat=b),placeholder:"\u8BF7\u8F93\u5165\u7EAC\u5EA6",clearable:""},null,8,["modelValue"])])])):pt("",!0),D(d)=="4"?(nt(),lt("div",_c,[F("div",xc,[at(" \u7ECF\u5EA6\uFF1A "),F("div",yc,[$(L,{class:"seach_input",modelValue:D(l).Lon.londu,"onUpdate:modelValue":m[8]||(m[8]=b=>D(l).Lon.londu=b),placeholder:"\u5EA6",clearable:""},{append:et(()=>[at("\xB0")]),_:1},8,["modelValue"]),$(L,{class:"seach_input",modelValue:D(l).Lon.lonfen,"onUpdate:modelValue":m[9]||(m[9]=b=>D(l).Lon.lonfen=b),placeholder:"\u5206",clearable:""},{append:et(()=>[at("\u2032")]),_:1},8,["modelValue"]),$(L,{class:"seach_input",modelValue:D(l).Lon.lonmiao,"onUpdate:modelValue":m[10]||(m[10]=b=>D(l).Lon.lonmiao=b),placeholder:"\u79D2",clearable:""},{append:et(()=>[at("\u2033")]),_:1},8,["modelValue"])])]),F("div",Sc,[at(" \u7EAC\u5EA6\uFF1A "),F("div",vc,[$(L,{class:"seach_input",modelValue:D(l).Lat.latdu,"onUpdate:modelValue":m[11]||(m[11]=b=>D(l).Lat.latdu=b),placeholder:"\u5EA6",clearable:""},{append:et(()=>[at("\xB0")]),_:1},8,["modelValue"]),$(L,{class:"seach_input",modelValue:D(l).Lat.latfen,"onUpdate:modelValue":m[12]||(m[12]=b=>D(l).Lat.latfen=b),placeholder:"\u5206",clearable:""},{append:et(()=>[at("\u2032")]),_:1},8,["modelValue"]),$(L,{class:"seach_input",modelValue:D(l).Lat.latmiao,"onUpdate:modelValue":m[13]||(m[13]=b=>D(l).Lat.latmiao=b),placeholder:"\u79D2",clearable:""},{append:et(()=>[at("\u2033")]),_:1},8,["modelValue"])])])])):pt("",!0)]),F("div",Cc,[$(O,{class:"seach",onClick:m[14]||(m[14]=b=>vn())},{default:et(()=>[at("\u67E5\u8BE2")]),_:1}),$(O,{class:"resetting",onClick:m[15]||(m[15]=b=>Sn())},{default:et(()=>[at("\u91CD\u7F6E")]),_:1})])]),F("div",Ec,[Rc,F("div",{class:"overview",onClick:m[16]||(m[16]=b=>$e(b))},[$(A,{gutter:10},{default:et(()=>[$(G,{span:8},{default:et(()=>[F("div",{id:D(g)==1?"overviewItemSelect":"",class:"overviewItem"},[D(g)==1?(nt(),lt("img",wc)):pt("",!0),at(" \u9AD8\u6807\u51C6\u519C\u7530 "),D(g)==1?(nt(),lt("img",Mc)):pt("",!0)],8,Ic)]),_:1}),$(G,{span:8},{default:et(()=>[F("div",{id:D(g)==2?"overviewItemSelect":"",class:"overviewItem"},[D(g)==2?(nt(),lt("img",Lc)):pt("",!0),at(" \u6C38\u4E45\u57FA\u672C\u519C\u7530 "),D(g)==2?(nt(),lt("img",Tc)):pt("",!0)],8,Ac)]),_:1}),$(G,{span:8},{default:et(()=>[F("div",{id:D(g)==3?"overviewItemSelect":"",class:"overviewItem"},[D(g)==3?(nt(),lt("img",Dc)):pt("",!0),at(" \u8015\u5730 "),D(g)==3?(nt(),lt("img",kc)):pt("",!0)],8,bc)]),_:1})]),_:1}),$(A,{gutter:10},{default:et(()=>[$(G,{span:8},{default:et(()=>[F("div",{id:D(g)==4?"overviewItemSelect":"",class:"overviewItem"},[D(g)==4?(nt(),lt("img",Oc)):pt("",!0),at(" \u7247\u5757\u4FE1\u606F "),D(g)==4?(nt(),lt("img",Pc)):pt("",!0)],8,Fc)]),_:1}),$(G,{span:8},{default:et(()=>[F("div",{id:D(g)==5?"overviewItemSelect":"",class:"overviewItem"},[D(g)==5?(nt(),lt("img",Bc)):pt("",!0),at(" \u5730\u5757\u4FE1\u606F "),D(g)==5?(nt(),lt("img",Nc)):pt("",!0)],8,Gc)]),_:1}),$(G,{span:8},{default:et(()=>[F("div",{id:D(g)==6?"overviewItemSelect":"",class:"overviewItem"},[D(g)==6?(nt(),lt("img",Xc)):pt("",!0),at(" \u571F\u5730\u786E\u6743 "),D(g)==6?(nt(),lt("img",Yc)):pt("",!0)],8,Wc)]),_:1})]),_:1})]),F("div",zc,[F("div",Vc,[F("span",null,ji(D(W)),1),F("p",{onClick:m[17]||(m[17]=b=>ti())},[at(" \u4E0B\u8F7D \xA0 "),Zc])]),D(g)!==1?(nt(),lt("div",Uc,[F("p",null,[jc,at(" \u603B\u9762\u79EF\uFF1A "),F("span",null,ji(D(Z)?D(Z):0)+" \u4EA9",1)]),[3,4,5,6].includes(D(g))?(nt(),lt("p",Hc,[Kc,at(" \u603B\u4E2A\u6570\uFF1A "),F("span",null,ji(D(Y)?D(Y):0),1)])):pt("",!0)])):pt("",!0),F("div",{ref_key:"Farmland_area",ref:h,class:"Farmland_area"},null,512)])]),F("div",{class:"rightFoldDiv",onClick:m[18]||(m[18]=b=>yn())},[$(H,{disabled:!D(i),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u6536\u8D77",placement:"top"},{default:et(()=>[D(i)?(nt(),Ui(B,{key:0},{default:et(()=>[qc]),_:1})):pt("",!0)]),_:1},8,["disabled"]),$(H,{disabled:D(i),"hide-after":"0","show-arrow":!1,"show-after":"200",class:"box-item",effect:"dark",content:"\u5C55\u5F00",placement:"top"},{default:et(()=>[D(i)?pt("",!0):(nt(),Ui(B,{key:0},{default:et(()=>[Jc]),_:1}))]),_:1},8,["disabled"])]),F("div",Qc,[F("span",{onClick:Yi},[$(H,{class:"box-item",disabled:D(e),"show-arrow":!1,"hide-after":"0","show-after":"200",effect:"dark",content:"\u6D4B\u91CF\u7EBF",placement:"left",offset:"1"},{default:et(()=>[$c]),_:1},8,["disabled"])]),F("span",{onClick:zi},[$(H,{class:"box-item",disabled:D(e),"show-arrow":!1,"hide-after":"0","show-after":"200",effect:"dark",content:"\u6D4B\u91CF\u9762",placement:"left",offset:"1"},{default:et(()=>[tu]),_:1},8,["disabled"])]),F("span",{onClick:si},[$(H,{class:"box-item",disabled:D(e),"show-arrow":!1,"hide-after":"0","show-after":"200",effect:"dark",content:"\u6E05\u9664",placement:"left",offset:"1"},{default:et(()=>[eu]),_:1},8,["disabled"])])])]),F("div",iu,[$(ft,{props:_,data:J,onCheck:Wi,"render-content":ue,"show-checkbox":""})]),F("div",{class:"farmlandTimeDiv",id:D(x)?"appear":"",onClick:m[19]||(m[19]=b=>Xi(b))},[F("div",su,[(nt(!0),lt(En,null,Rn(D(K),(b,gt)=>(nt(),lt("div",{class:Zi({flag:D(U)[gt]==!0}),key:b},ji(gt),3))),128))])],8,nu),F("div",ru,[ou,F("div",au,[lu,uo(F("div",hu,[$(O,{id:"popup-prev",disabled:!D(it)},{default:et(()=>[at("\u4E0A\u4E00\u5C42")]),_:1},8,["disabled"]),$(O,{id:"popup-next",disabled:D(it)},{default:et(()=>[at("\u4E0B\u4E00\u5C42")]),_:1},8,["disabled"])],512),[[fo,D(j)]])])])])}}},Eu=so(cu,[["__scopeId","data-v-6c4dd7e7"]]);export{Eu as default};
|